@timardex/cluemart-shared 1.7.89 → 1.7.91

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 (68) hide show
  1. package/dist/{ad-CjiiPTke.d.mts → ad-DjHlreUH.d.mts} +1 -1
  2. package/dist/{ad-BwfNEfvN.d.ts → ad-DzAxJcWT.d.ts} +1 -1
  3. package/dist/{affiliate-B4e50Q65.d.ts → affiliate-BVLyYY70.d.ts} +1 -1
  4. package/dist/{affiliate-Ci9YSdAV.d.mts → affiliate-BpjRWPUA.d.mts} +1 -1
  5. package/dist/auth/index.cjs +7 -0
  6. package/dist/auth/index.cjs.map +1 -1
  7. package/dist/auth/index.d.mts +2 -2
  8. package/dist/auth/index.d.ts +2 -2
  9. package/dist/auth/index.mjs +2 -2
  10. package/dist/billingCatalog-DDAU9BWV.d.mts +54 -0
  11. package/dist/billingCatalog-oWAfZX95.d.ts +54 -0
  12. package/dist/{chunk-VMBAS4XH.mjs → chunk-3ZPHXVUT.mjs} +88 -4
  13. package/dist/chunk-3ZPHXVUT.mjs.map +1 -0
  14. package/dist/{chunk-JECW5GUI.mjs → chunk-JAIBL6IU.mjs} +2 -2
  15. package/dist/{chunk-F6O72A6T.mjs → chunk-JX7Q5EI4.mjs} +3 -3
  16. package/dist/{chunk-N2YXGFSZ.mjs → chunk-P4NLBWEJ.mjs} +1 -2
  17. package/dist/{chunk-N2YXGFSZ.mjs.map → chunk-P4NLBWEJ.mjs.map} +1 -1
  18. package/dist/{chunk-GA6E5NK3.mjs → chunk-PSKWWPLY.mjs} +8 -1
  19. package/dist/chunk-PSKWWPLY.mjs.map +1 -0
  20. package/dist/{chunk-364EX22V.mjs → chunk-STNE7PMX.mjs} +1 -1
  21. package/dist/{chunk-MOVX7LKH.mjs → chunk-YRO6KEZG.mjs} +2 -2
  22. package/dist/{chunk-M3R2UY5Z.mjs → chunk-ZW4M5EGZ.mjs} +225 -153
  23. package/dist/chunk-ZW4M5EGZ.mjs.map +1 -0
  24. package/dist/enums/index.cjs +0 -1
  25. package/dist/enums/index.cjs.map +1 -1
  26. package/dist/enums/index.d.mts +1 -2
  27. package/dist/enums/index.d.ts +1 -2
  28. package/dist/enums/index.mjs +1 -1
  29. package/dist/formFields/index.cjs +59 -0
  30. package/dist/formFields/index.cjs.map +1 -1
  31. package/dist/formFields/index.mjs +5 -5
  32. package/dist/graphql/index.cjs +233 -152
  33. package/dist/graphql/index.cjs.map +1 -1
  34. package/dist/graphql/index.d.mts +37 -35
  35. package/dist/graphql/index.d.ts +37 -35
  36. package/dist/graphql/index.mjs +9 -5
  37. package/dist/hooks/index.cjs +231 -107
  38. package/dist/hooks/index.cjs.map +1 -1
  39. package/dist/hooks/index.d.mts +3 -3
  40. package/dist/hooks/index.d.ts +3 -3
  41. package/dist/hooks/index.mjs +8 -8
  42. package/dist/index.cjs +323 -153
  43. package/dist/index.cjs.map +1 -1
  44. package/dist/index.d.mts +124 -38
  45. package/dist/index.d.ts +124 -38
  46. package/dist/index.mjs +314 -152
  47. package/dist/index.mjs.map +1 -1
  48. package/dist/sharing/index.cjs.map +1 -1
  49. package/dist/sharing/index.mjs +3 -3
  50. package/dist/types/index.cjs.map +1 -1
  51. package/dist/types/index.d.mts +4 -3
  52. package/dist/types/index.d.ts +4 -3
  53. package/dist/types/index.mjs +2 -2
  54. package/dist/{user-BC4SpAj_.d.ts → user-C1yYa8oa.d.ts} +19 -6
  55. package/dist/{user-DzOlyCj5.d.mts → user-DCpVFB6K.d.mts} +19 -6
  56. package/dist/utils/index.cjs +90 -0
  57. package/dist/utils/index.cjs.map +1 -1
  58. package/dist/utils/index.d.mts +27 -4
  59. package/dist/utils/index.d.ts +27 -4
  60. package/dist/utils/index.mjs +16 -4
  61. package/package.json +1 -1
  62. package/dist/chunk-GA6E5NK3.mjs.map +0 -1
  63. package/dist/chunk-M3R2UY5Z.mjs.map +0 -1
  64. package/dist/chunk-VMBAS4XH.mjs.map +0 -1
  65. /package/dist/{chunk-JECW5GUI.mjs.map → chunk-JAIBL6IU.mjs.map} +0 -0
  66. /package/dist/{chunk-F6O72A6T.mjs.map → chunk-JX7Q5EI4.mjs.map} +0 -0
  67. /package/dist/{chunk-364EX22V.mjs.map → chunk-STNE7PMX.mjs.map} +0 -0
  68. /package/dist/{chunk-MOVX7LKH.mjs.map → chunk-YRO6KEZG.mjs.map} +0 -0
package/dist/index.cjs CHANGED
@@ -36,6 +36,9 @@ __export(index_exports, {
36
36
  AFFILIATE_PARTICIPANT_TYPE_LABELS: () => AFFILIATE_PARTICIPANT_TYPE_LABELS,
37
37
  AFFILIATE_REWARDS: () => AFFILIATE_REWARDS,
38
38
  ANDROID_URL: () => ANDROID_URL,
39
+ BILLING_CATALOG_CURRENCY: () => BILLING_CATALOG_CURRENCY,
40
+ BILLING_CATALOG_DEFINITIONS: () => BILLING_CATALOG_DEFINITIONS,
41
+ BILLING_CATALOG_KEYS: () => BILLING_CATALOG_KEYS,
39
42
  CLUEMART_MAIN_DOMAIN_URL: () => CLUEMART_MAIN_DOMAIN_URL,
40
43
  CM_AFFILIATE_PROMO_CODE: () => CM_AFFILIATE_PROMO_CODE,
41
44
  CM_SCHOOL_PROMO_CODE: () => CM_SCHOOL_PROMO_CODE,
@@ -93,6 +96,7 @@ __export(index_exports, {
93
96
  GET_VENDOR_BY_SLUG: () => GET_VENDOR_BY_SLUG,
94
97
  GET_VENDOR_INFO: () => GET_VENDOR_INFO,
95
98
  IMAGE_EXTENSION: () => IMAGE_EXTENSION,
99
+ INITIAL_BILLING_CATALOG: () => INITIAL_BILLING_CATALOG,
96
100
  IOS_URL: () => IOS_URL,
97
101
  ImageTypeEnum: () => ImageTypeEnum,
98
102
  KNOWN_EVENT_SCHEDULE_STATUSES: () => KNOWN_EVENT_SCHEDULE_STATUSES,
@@ -154,6 +158,7 @@ __export(index_exports, {
154
158
  badgeIds: () => badgeIds,
155
159
  badges: () => badges,
156
160
  bankAccountDetailsFields: () => bankAccountDetailsFields,
161
+ billingCatalogDefinitionMatches: () => billingCatalogDefinitionMatches,
157
162
  buildApplicationShareDescription: () => buildApplicationShareDescription,
158
163
  buildCalendarSheetContentData: () => buildCalendarSheetContentData,
159
164
  buildFacebookShareQuote: () => buildFacebookShareQuote,
@@ -222,6 +227,7 @@ __export(index_exports, {
222
227
  gameScreenIdentifierList: () => gameScreenIdentifierList,
223
228
  gameTypeToDisplayName: () => gameTypeToDisplayName,
224
229
  getAllowedEventDateStatuses: () => getAllowedEventDateStatuses,
230
+ getBillingCatalogKeyForSelection: () => getBillingCatalogKeyForSelection,
225
231
  getCurrentAndFutureDates: () => getCurrentAndFutureDates,
226
232
  getDefaultAdminHome: () => getDefaultAdminHome,
227
233
  getErrorMessage: () => getErrorMessage,
@@ -374,6 +380,7 @@ __export(index_exports, {
374
380
  useGetAffiliate: () => useGetAffiliate,
375
381
  useGetAffiliates: () => useGetAffiliates,
376
382
  useGetAppSettings: () => useGetAppSettings,
383
+ useGetBillingCatalog: () => useGetBillingCatalog,
377
384
  useGetChat: () => useGetChat,
378
385
  useGetChatSubscription: () => useGetChatSubscription,
379
386
  useGetChatsByRegion: () => useGetChatsByRegion,
@@ -452,15 +459,16 @@ __export(index_exports, {
452
459
  useSearchEvents: () => useSearchEvents,
453
460
  useSearchPartners: () => useSearchPartners,
454
461
  useSearchVendors: () => useSearchVendors,
455
- useSelectPackage: () => useSelectPackage,
456
462
  useSelectStandardPackage: () => useSelectStandardPackage,
457
463
  useSendChatMessage: () => useSendChatMessage,
458
464
  useStartGame: () => useStartGame,
465
+ useSyncBillingCatalogPrice: () => useSyncBillingCatalogPrice,
459
466
  useToggleChatMessageLike: () => useToggleChatMessageLike,
460
467
  useUnlinkUnregisteredVendorByInviterId: () => useUnlinkUnregisteredVendorByInviterId,
461
468
  useUpdateAd: () => useUpdateAd,
462
469
  useUpdateAffiliateDetails: () => useUpdateAffiliateDetails,
463
470
  useUpdateAppSettings: () => useUpdateAppSettings,
471
+ useUpdateBillingCatalogPrice: () => useUpdateBillingCatalogPrice,
464
472
  useUpdateCoupon: () => useUpdateCoupon,
465
473
  useUpdateDailyClueGame: () => useUpdateDailyClueGame,
466
474
  useUpdateEvent: () => useUpdateEvent,
@@ -744,7 +752,6 @@ var EnumSubscriptionStatus = /* @__PURE__ */ ((EnumSubscriptionStatus2) => {
744
752
  var EnumBillingPeriod = /* @__PURE__ */ ((EnumBillingPeriod2) => {
745
753
  EnumBillingPeriod2["MONTHLY_CANCEL_ANYTIME"] = "monthly_cancel_anytime";
746
754
  EnumBillingPeriod2["YEARLY_ANNUAL_BILLED"] = "yearly_annual_billed";
747
- EnumBillingPeriod2["YEARLY_MONTHLY_BILLED"] = "yearly_monthly_billed";
748
755
  return EnumBillingPeriod2;
749
756
  })(EnumBillingPeriod || {});
750
757
  var EnumReward = /* @__PURE__ */ ((EnumReward2) => {
@@ -3045,6 +3052,84 @@ function isTransientNetworkError(err) {
3045
3052
  return TRANSIENT_NETWORK_PATTERNS.some((pattern) => pattern.test(message));
3046
3053
  }
3047
3054
 
3055
+ // src/utils/billingCatalog/index.ts
3056
+ var BILLING_CATALOG_KEYS = [
3057
+ "pro_vendor_monthly",
3058
+ "pro_vendor_yearly",
3059
+ "pro_plus_vendor_monthly",
3060
+ "pro_plus_vendor_yearly"
3061
+ ];
3062
+ var BILLING_CATALOG_CURRENCY = "nzd";
3063
+ var BILLING_CATALOG_DEFINITIONS = {
3064
+ pro_plus_vendor_monthly: {
3065
+ billingPeriod: "monthly_cancel_anytime" /* MONTHLY_CANCEL_ANYTIME */,
3066
+ licenceType: "pro_plus_vendor" /* PRO_PLUS_VENDOR */
3067
+ },
3068
+ pro_plus_vendor_yearly: {
3069
+ billingPeriod: "yearly_annual_billed" /* YEARLY_ANNUAL_BILLED */,
3070
+ licenceType: "pro_plus_vendor" /* PRO_PLUS_VENDOR */
3071
+ },
3072
+ pro_vendor_monthly: {
3073
+ billingPeriod: "monthly_cancel_anytime" /* MONTHLY_CANCEL_ANYTIME */,
3074
+ licenceType: "pro_vendor" /* PRO_VENDOR */
3075
+ },
3076
+ pro_vendor_yearly: {
3077
+ billingPeriod: "yearly_annual_billed" /* YEARLY_ANNUAL_BILLED */,
3078
+ licenceType: "pro_vendor" /* PRO_VENDOR */
3079
+ }
3080
+ };
3081
+ function getBillingCatalogKeyForSelection(licenceType, billingPeriod) {
3082
+ const match = Object.entries(BILLING_CATALOG_DEFINITIONS).find(
3083
+ ([, definition]) => definition.licenceType === licenceType && definition.billingPeriod === billingPeriod
3084
+ );
3085
+ return match?.[0] ?? null;
3086
+ }
3087
+ var INITIAL_BILLING_CATALOG = [
3088
+ {
3089
+ active: true,
3090
+ billingPeriod: "monthly_cancel_anytime" /* MONTHLY_CANCEL_ANYTIME */,
3091
+ currency: BILLING_CATALOG_CURRENCY,
3092
+ key: "pro_vendor_monthly",
3093
+ licenceType: "pro_vendor" /* PRO_VENDOR */,
3094
+ taxInclusive: true,
3095
+ unitAmount: 3999
3096
+ },
3097
+ {
3098
+ active: true,
3099
+ billingPeriod: "yearly_annual_billed" /* YEARLY_ANNUAL_BILLED */,
3100
+ currency: BILLING_CATALOG_CURRENCY,
3101
+ key: "pro_vendor_yearly",
3102
+ licenceType: "pro_vendor" /* PRO_VENDOR */,
3103
+ taxInclusive: true,
3104
+ unitAmount: 40788
3105
+ },
3106
+ {
3107
+ active: true,
3108
+ billingPeriod: "monthly_cancel_anytime" /* MONTHLY_CANCEL_ANYTIME */,
3109
+ currency: BILLING_CATALOG_CURRENCY,
3110
+ key: "pro_plus_vendor_monthly",
3111
+ licenceType: "pro_plus_vendor" /* PRO_PLUS_VENDOR */,
3112
+ taxInclusive: true,
3113
+ unitAmount: 6499
3114
+ },
3115
+ {
3116
+ active: true,
3117
+ billingPeriod: "yearly_annual_billed" /* YEARLY_ANNUAL_BILLED */,
3118
+ currency: BILLING_CATALOG_CURRENCY,
3119
+ key: "pro_plus_vendor_yearly",
3120
+ licenceType: "pro_plus_vendor" /* PRO_PLUS_VENDOR */,
3121
+ taxInclusive: true,
3122
+ unitAmount: 62388
3123
+ }
3124
+ ];
3125
+ function billingCatalogDefinitionMatches(entry) {
3126
+ const definition = BILLING_CATALOG_DEFINITIONS[entry.key];
3127
+ if (!definition) {
3128
+ return false;
3129
+ }
3130
+ return definition.billingPeriod === entry.billingPeriod && definition.licenceType === entry.licenceType;
3131
+ }
3132
+
3048
3133
  // src/utils/toUserFacingErrorMessage.ts
3049
3134
  var DEFAULT_USER_FACING_ERROR = "Something went wrong. Please try again.";
3050
3135
  var NETWORK_USER_FACING_ERROR = "Unable to connect. Please check your internet connection and try again.";
@@ -3954,12 +4039,19 @@ var REDEEMED_REWARD_FIELDS_FRAGMENT = import_client.gql`
3954
4039
  `;
3955
4040
  var STRIPE_FIELDS_FRAGMENT = import_client.gql`
3956
4041
  fragment StripeSubscriptionFields on StripeSubscriptionType {
4042
+ billingPeriod
4043
+ cancelAtPeriodEnd
3957
4044
  customerId
3958
4045
  subscriptionId
3959
4046
  status
3960
4047
  currentPlan
3961
4048
  startDate
3962
4049
  endDate
4050
+ pendingPlan
4051
+ pendingBillingPeriod
4052
+ pendingChangeEffectiveAt
4053
+ priceId
4054
+ scheduleId
3963
4055
  }
3964
4056
  `;
3965
4057
  var USER_FIELDS_FRAGMENT = import_client.gql`
@@ -7364,11 +7456,8 @@ var import_client53 = require("@apollo/client");
7364
7456
  // src/graphql/mutations/stripe.ts
7365
7457
  var import_client52 = require("@apollo/client");
7366
7458
  var CREATE_CHECKOUT_SESSION_MUTATION = import_client52.gql`
7367
- mutation createCheckoutSession(
7368
- $planId: LicencesEnumType!
7369
- $billingPeriod: BillingPeriodEnumType
7370
- ) {
7371
- createCheckoutSession(planId: $planId, billingPeriod: $billingPeriod) {
7459
+ mutation createCheckoutSession($input: CreateCheckoutSessionInputType!) {
7460
+ createCheckoutSession(input: $input) {
7372
7461
  data {
7373
7462
  sessionId
7374
7463
  checkoutUrl
@@ -7380,25 +7469,38 @@ var CREATE_CHECKOUT_SESSION_MUTATION = import_client52.gql`
7380
7469
  var CANCEL_SUBSCRIPTION_MUTATION = import_client52.gql`
7381
7470
  mutation cancelSubscription {
7382
7471
  cancelSubscription {
7383
- data
7472
+ data {
7473
+ billingPeriod
7474
+ cancelAtPeriodEnd
7475
+ currentPlan
7476
+ endDate
7477
+ pendingBillingPeriod
7478
+ pendingChangeEffectiveAt
7479
+ pendingPlan
7480
+ priceId
7481
+ scheduleId
7482
+ status
7483
+ subscriptionId
7484
+ }
7384
7485
  message
7385
7486
  }
7386
7487
  }
7387
7488
  `;
7388
7489
  var UPDATE_SUBSCRIPTION_PLAN_MUTATION = import_client52.gql`
7389
- mutation updateSubscriptionPlan(
7390
- $newPlanId: LicencesEnumType!
7391
- $billingPeriod: BillingPeriodEnumType
7392
- ) {
7393
- updateSubscriptionPlan(
7394
- newPlanId: $newPlanId
7395
- billingPeriod: $billingPeriod
7396
- ) {
7490
+ mutation updateSubscriptionPlan($input: UpdateSubscriptionPlanInputType!) {
7491
+ updateSubscriptionPlan(input: $input) {
7397
7492
  data {
7398
- subscriptionId
7399
- status
7400
- priceId
7493
+ billingPeriod
7494
+ cancelAtPeriodEnd
7401
7495
  currentPlan
7496
+ endDate
7497
+ pendingBillingPeriod
7498
+ pendingChangeEffectiveAt
7499
+ pendingPlan
7500
+ priceId
7501
+ scheduleId
7502
+ status
7503
+ subscriptionId
7402
7504
  }
7403
7505
  message
7404
7506
  }
@@ -7414,29 +7516,6 @@ var CREATE_CUSTOMER_PORTAL = import_client52.gql`
7414
7516
  }
7415
7517
  }
7416
7518
  `;
7417
- var SELECT_PACKAGE_MUTATION = import_client52.gql`
7418
- mutation selectPackage(
7419
- $billingPeriod: BillingPeriodEnumType
7420
- $selectedLicence: LicencesEnumType!
7421
- $useStripe: Boolean
7422
- ) {
7423
- selectPackage(
7424
- billingPeriod: $billingPeriod
7425
- selectedLicence: $selectedLicence
7426
- useStripe: $useStripe
7427
- ) {
7428
- data {
7429
- checkoutUrl
7430
- licences {
7431
- ...LicenceFields
7432
- }
7433
- userId
7434
- }
7435
- message
7436
- }
7437
- }
7438
- ${LICENCE_FIELDS_FRAGMENT}
7439
- `;
7440
7519
 
7441
7520
  // src/graphql/hooks/stripe/hooksMutation.ts
7442
7521
  var useCreateCheckoutSession = () => {
@@ -7455,21 +7534,6 @@ var useCreateCustomerPortal = () => {
7455
7534
  const [createCustomerPortal, { loading, error }] = (0, import_client53.useMutation)(CREATE_CUSTOMER_PORTAL);
7456
7535
  return { createCustomerPortal, error, loading };
7457
7536
  };
7458
- var useSelectPackage = () => {
7459
- const [selectPackage, { loading, error }] = (0, import_client53.useMutation)(SELECT_PACKAGE_MUTATION, {
7460
- awaitRefetchQueries: true,
7461
- refetchQueries: (mutationResult) => {
7462
- const userId = mutationResult?.data?.selectPackage?.data?.userId;
7463
- if (!userId) return [];
7464
- return [
7465
- { query: GET_USER, variables: { _id: userId } },
7466
- { query: GET_USER_EVENTS },
7467
- { query: GET_USER_VENDORS }
7468
- ];
7469
- }
7470
- });
7471
- return { error, loading, selectPackage };
7472
- };
7473
7537
 
7474
7538
  // src/graphql/hooks/stripe/hooksQuery.ts
7475
7539
  var import_client55 = require("@apollo/client");
@@ -7479,10 +7543,17 @@ var import_client54 = require("@apollo/client");
7479
7543
  var GET_SUBSCRIPTION_STATUS = import_client54.gql`
7480
7544
  query getSubscriptionStatus {
7481
7545
  getSubscriptionStatus {
7482
- subscriptionId
7483
- status
7484
- priceId
7546
+ billingPeriod
7547
+ cancelAtPeriodEnd
7485
7548
  currentPlan
7549
+ endDate
7550
+ pendingBillingPeriod
7551
+ pendingChangeEffectiveAt
7552
+ pendingPlan
7553
+ priceId
7554
+ scheduleId
7555
+ status
7556
+ subscriptionId
7486
7557
  }
7487
7558
  }
7488
7559
  `;
@@ -7509,7 +7580,6 @@ var GET_SUBSCRIPTION_PLANS = import_client54.gql`
7509
7580
  }
7510
7581
  }
7511
7582
  isNewUser
7512
- isTester
7513
7583
  appliedDiscountType
7514
7584
  }
7515
7585
  }
@@ -7818,15 +7888,107 @@ var useGetAppSettings = () => {
7818
7888
  return { appSettings, error, loading, refetch };
7819
7889
  };
7820
7890
 
7821
- // src/graphql/hooks/game/hooksMutation.ts
7891
+ // src/graphql/hooks/billingCatalog/hooksMutation.ts
7822
7892
  var import_client68 = require("@apollo/client");
7823
7893
 
7824
- // src/graphql/mutations/game.ts
7894
+ // src/graphql/mutations/billingCatalog.ts
7825
7895
  var import_client67 = require("@apollo/client");
7826
7896
 
7827
- // src/graphql/queries/game/game.ts
7897
+ // src/graphql/queries/billingCatalog.ts
7828
7898
  var import_client66 = require("@apollo/client");
7829
- var GAME_HISTORY_FIELDS_FRAGMENT = import_client66.gql`
7899
+ var BILLING_CATALOG_FIELDS_FRAGMENT = import_client66.gql`
7900
+ fragment BillingCatalogFields on BillingCatalogEntryType {
7901
+ _id
7902
+ active
7903
+ billingPeriod
7904
+ createdAt
7905
+ currency
7906
+ effectiveFrom
7907
+ key
7908
+ licenceType
7909
+ revision
7910
+ stripePriceId
7911
+ stripeProductId
7912
+ taxInclusive
7913
+ unitAmount
7914
+ updatedAt
7915
+ updatedBy
7916
+ }
7917
+ `;
7918
+ var GET_BILLING_CATALOG = import_client66.gql`
7919
+ query getBillingCatalog {
7920
+ billingCatalog {
7921
+ ...BillingCatalogFields
7922
+ }
7923
+ }
7924
+ ${BILLING_CATALOG_FIELDS_FRAGMENT}
7925
+ `;
7926
+
7927
+ // src/graphql/mutations/billingCatalog.ts
7928
+ var UPDATE_BILLING_CATALOG_PRICE_MUTATION = import_client67.gql`
7929
+ mutation updateBillingCatalogPrice(
7930
+ $input: UpdateBillingCatalogPriceInputType!
7931
+ ) {
7932
+ updateBillingCatalogPrice(input: $input) {
7933
+ data {
7934
+ ...BillingCatalogFields
7935
+ }
7936
+ message
7937
+ }
7938
+ }
7939
+ ${BILLING_CATALOG_FIELDS_FRAGMENT}
7940
+ `;
7941
+ var SYNC_BILLING_CATALOG_PRICE_MUTATION = import_client67.gql`
7942
+ mutation syncBillingCatalogPrice($input: SyncBillingCatalogPriceInputType!) {
7943
+ syncBillingCatalogPrice(input: $input) {
7944
+ data {
7945
+ ...BillingCatalogFields
7946
+ }
7947
+ message
7948
+ }
7949
+ }
7950
+ ${BILLING_CATALOG_FIELDS_FRAGMENT}
7951
+ `;
7952
+
7953
+ // src/graphql/hooks/billingCatalog/hooksMutation.ts
7954
+ var useUpdateBillingCatalogPrice = () => {
7955
+ const [updateBillingCatalogPrice, { error, loading }] = (0, import_client68.useMutation)(UPDATE_BILLING_CATALOG_PRICE_MUTATION, {
7956
+ awaitRefetchQueries: true,
7957
+ refetchQueries: [{ query: GET_BILLING_CATALOG }]
7958
+ });
7959
+ return { error, loading, updateBillingCatalogPrice };
7960
+ };
7961
+ var useSyncBillingCatalogPrice = () => {
7962
+ const [syncBillingCatalogPrice, { error, loading }] = (0, import_client68.useMutation)(SYNC_BILLING_CATALOG_PRICE_MUTATION, {
7963
+ awaitRefetchQueries: true,
7964
+ refetchQueries: [{ query: GET_BILLING_CATALOG }]
7965
+ });
7966
+ return { error, loading, syncBillingCatalogPrice };
7967
+ };
7968
+
7969
+ // src/graphql/hooks/billingCatalog/hooksQuery.ts
7970
+ var import_client69 = require("@apollo/client");
7971
+ var useGetBillingCatalog = () => {
7972
+ const { data, error, loading, refetch } = (0, import_client69.useQuery)(GET_BILLING_CATALOG, {
7973
+ fetchPolicy: "network-only"
7974
+ });
7975
+ return {
7976
+ billingCatalog: data?.billingCatalog ?? [],
7977
+ error,
7978
+ loading,
7979
+ refetch
7980
+ };
7981
+ };
7982
+
7983
+ // src/graphql/hooks/game/hooksMutation.ts
7984
+ var import_client72 = require("@apollo/client");
7985
+
7986
+ // src/graphql/mutations/game.ts
7987
+ var import_client71 = require("@apollo/client");
7988
+
7989
+ // src/graphql/queries/game/game.ts
7990
+ var import_client70 = require("@apollo/client");
7991
+ var GAME_HISTORY_FIELDS_FRAGMENT = import_client70.gql`
7830
7992
  fragment GameHistoryFields on GameHistoryType {
7831
7993
  createdAt
7832
7994
  gameDate {
@@ -7841,7 +8003,7 @@ var GAME_HISTORY_FIELDS_FRAGMENT = import_client66.gql`
7841
8003
  }
7842
8004
  ${GAME_DATE_FIELDS_FRAGMENT}
7843
8005
  `;
7844
- var GAME_DATA_FIELDS_FRAGMENT = import_client66.gql`
8006
+ var GAME_DATA_FIELDS_FRAGMENT = import_client70.gql`
7845
8007
  fragment GameDataFields on GameDataType {
7846
8008
  dailyClue {
7847
8009
  ...DailyClueGameDataFields
@@ -7856,7 +8018,7 @@ var GAME_DATA_FIELDS_FRAGMENT = import_client66.gql`
7856
8018
  ${DAILY_CLUE_GAME_DATA_FIELDS_FRAGMENT}
7857
8019
  ${PUZZLE_GAME_DATA_FIELDS_FRAGMENT}
7858
8020
  `;
7859
- var GAME_FIELDS_FRAGMENT = import_client66.gql`
8021
+ var GAME_FIELDS_FRAGMENT = import_client70.gql`
7860
8022
  fragment GameFields on GameType {
7861
8023
  _id
7862
8024
  active
@@ -7875,7 +8037,7 @@ var GAME_FIELDS_FRAGMENT = import_client66.gql`
7875
8037
  ${GAME_DATA_FIELDS_FRAGMENT}
7876
8038
  ${GAME_HISTORY_FIELDS_FRAGMENT}
7877
8039
  `;
7878
- var GAME_DOC_FIELDS_FRAGMENT = import_client66.gql`
8040
+ var GAME_DOC_FIELDS_FRAGMENT = import_client70.gql`
7879
8041
  fragment GameDocFields on GameDocType {
7880
8042
  _id
7881
8043
  active
@@ -7893,7 +8055,7 @@ var GAME_DOC_FIELDS_FRAGMENT = import_client66.gql`
7893
8055
  ${OWNER_FIELDS_FRAGMENT}
7894
8056
  ${GAME_FIELDS_FRAGMENT}
7895
8057
  `;
7896
- var GET_GAMES = import_client66.gql`
8058
+ var GET_GAMES = import_client70.gql`
7897
8059
  query getGames {
7898
8060
  games {
7899
8061
  ...GameDocFields
@@ -7901,7 +8063,7 @@ var GET_GAMES = import_client66.gql`
7901
8063
  }
7902
8064
  ${GAME_DOC_FIELDS_FRAGMENT}
7903
8065
  `;
7904
- var GET_GAME = import_client66.gql`
8066
+ var GET_GAME = import_client70.gql`
7905
8067
  query getGame($_id: ID) {
7906
8068
  game(_id: $_id) {
7907
8069
  ...GameDocFields
@@ -7909,7 +8071,7 @@ var GET_GAME = import_client66.gql`
7909
8071
  }
7910
8072
  ${GAME_DOC_FIELDS_FRAGMENT}
7911
8073
  `;
7912
- var GET_GAME_LEADERBOARD = import_client66.gql`
8074
+ var GET_GAME_LEADERBOARD = import_client70.gql`
7913
8075
  query getGameLeaderboard {
7914
8076
  gameLeaderboard {
7915
8077
  gameHistory {
@@ -7924,7 +8086,7 @@ var GET_GAME_LEADERBOARD = import_client66.gql`
7924
8086
  `;
7925
8087
 
7926
8088
  // src/graphql/mutations/game.ts
7927
- var START_GAME_MUTATION = import_client67.gql`
8089
+ var START_GAME_MUTATION = import_client71.gql`
7928
8090
  mutation startGame($input: BaseGameInputType!) {
7929
8091
  startGame(input: $input) {
7930
8092
  data {
@@ -7935,7 +8097,7 @@ var START_GAME_MUTATION = import_client67.gql`
7935
8097
  }
7936
8098
  ${GAME_DOC_FIELDS_FRAGMENT}
7937
8099
  `;
7938
- var LEAVE_GAME_MUTATION = import_client67.gql`
8100
+ var LEAVE_GAME_MUTATION = import_client71.gql`
7939
8101
  mutation leaveGame(
7940
8102
  $_id: ID!
7941
8103
  $gameType: GameTypeEnumType!
@@ -7947,7 +8109,7 @@ var LEAVE_GAME_MUTATION = import_client67.gql`
7947
8109
  }
7948
8110
  }
7949
8111
  `;
7950
- var UPDATE_DAILY_CLUE_MUTATION = import_client67.gql`
8112
+ var UPDATE_DAILY_CLUE_MUTATION = import_client71.gql`
7951
8113
  mutation updateDailyClueGame(
7952
8114
  $_id: ID!
7953
8115
  $foundLetter: String!
@@ -7968,7 +8130,7 @@ var UPDATE_DAILY_CLUE_MUTATION = import_client67.gql`
7968
8130
  }
7969
8131
  ${GAME_DOC_FIELDS_FRAGMENT}
7970
8132
  `;
7971
- var UPDATE_PUZZLE_GAME_MUTATION = import_client67.gql`
8133
+ var UPDATE_PUZZLE_GAME_MUTATION = import_client71.gql`
7972
8134
  mutation updatePuzzleGame(
7973
8135
  $_id: ID!
7974
8136
  $answeredQuestions: [PuzzleAnsweredQuestionInputType!]!
@@ -7992,7 +8154,7 @@ var UPDATE_PUZZLE_GAME_MUTATION = import_client67.gql`
7992
8154
 
7993
8155
  // src/graphql/hooks/game/hooksMutation.ts
7994
8156
  var useStartGame = () => {
7995
- const [startGame, { loading, error }] = (0, import_client68.useMutation)(START_GAME_MUTATION, {
8157
+ const [startGame, { loading, error }] = (0, import_client72.useMutation)(START_GAME_MUTATION, {
7996
8158
  awaitRefetchQueries: true,
7997
8159
  refetchQueries: (mutationResult) => {
7998
8160
  const gameId = mutationResult?.data?.startGame?.data?._id;
@@ -8015,7 +8177,7 @@ var useStartGame = () => {
8015
8177
  return { error, loading, startGame };
8016
8178
  };
8017
8179
  var useLeaveGame = () => {
8018
- const [leaveGame, { loading, error }] = (0, import_client68.useMutation)(LEAVE_GAME_MUTATION, {
8180
+ const [leaveGame, { loading, error }] = (0, import_client72.useMutation)(LEAVE_GAME_MUTATION, {
8019
8181
  awaitRefetchQueries: true,
8020
8182
  refetchQueries: [
8021
8183
  {
@@ -8026,7 +8188,7 @@ var useLeaveGame = () => {
8026
8188
  return { error, leaveGame, loading };
8027
8189
  };
8028
8190
  var useUpdateDailyClueGame = () => {
8029
- const [updateDailyClueGame, { loading, error }] = (0, import_client68.useMutation)(UPDATE_DAILY_CLUE_MUTATION, {
8191
+ const [updateDailyClueGame, { loading, error }] = (0, import_client72.useMutation)(UPDATE_DAILY_CLUE_MUTATION, {
8030
8192
  awaitRefetchQueries: true,
8031
8193
  refetchQueries: (mutationResult) => {
8032
8194
  const gameId = mutationResult?.data?.updateDailyClueGame?.data?._id;
@@ -8043,7 +8205,7 @@ var useUpdateDailyClueGame = () => {
8043
8205
  return { error, loading, updateDailyClueGame };
8044
8206
  };
8045
8207
  var useUpdatePuzzleGame = () => {
8046
- const [updatePuzzleGame, { loading, error }] = (0, import_client68.useMutation)(UPDATE_PUZZLE_GAME_MUTATION, {
8208
+ const [updatePuzzleGame, { loading, error }] = (0, import_client72.useMutation)(UPDATE_PUZZLE_GAME_MUTATION, {
8047
8209
  awaitRefetchQueries: true,
8048
8210
  refetchQueries: (mutationResult) => {
8049
8211
  const gameId = mutationResult?.data?.updatePuzzleGame?.data?._id;
@@ -8061,16 +8223,16 @@ var useUpdatePuzzleGame = () => {
8061
8223
  };
8062
8224
 
8063
8225
  // src/graphql/hooks/game/hooksQuery.ts
8064
- var import_client69 = require("@apollo/client");
8226
+ var import_client73 = require("@apollo/client");
8065
8227
  var useGetGames = () => {
8066
- const { loading, error, data, refetch } = (0, import_client69.useQuery)(GET_GAMES, {
8228
+ const { loading, error, data, refetch } = (0, import_client73.useQuery)(GET_GAMES, {
8067
8229
  fetchPolicy: "network-only"
8068
8230
  });
8069
8231
  const games = data?.games || [];
8070
8232
  return { error, games, loading, refetch };
8071
8233
  };
8072
8234
  var useGetGame = (_id) => {
8073
- const { loading, error, data, refetch } = (0, import_client69.useQuery)(GET_GAME, {
8235
+ const { loading, error, data, refetch } = (0, import_client73.useQuery)(GET_GAME, {
8074
8236
  fetchPolicy: "network-only",
8075
8237
  skip: !_id,
8076
8238
  variables: _id ? { _id } : void 0
@@ -8079,7 +8241,7 @@ var useGetGame = (_id) => {
8079
8241
  return { error, game, loading, refetch };
8080
8242
  };
8081
8243
  var useGetGameLeaderboard = () => {
8082
- const { loading, error, data, refetch } = (0, import_client69.useQuery)(GET_GAME_LEADERBOARD, {
8244
+ const { loading, error, data, refetch } = (0, import_client73.useQuery)(GET_GAME_LEADERBOARD, {
8083
8245
  fetchPolicy: "network-only"
8084
8246
  });
8085
8247
  const gameLeaderboard = data?.gameLeaderboard || [];
@@ -8087,14 +8249,14 @@ var useGetGameLeaderboard = () => {
8087
8249
  };
8088
8250
 
8089
8251
  // src/graphql/hooks/school/hooksMutation.ts
8090
- var import_client72 = require("@apollo/client");
8252
+ var import_client76 = require("@apollo/client");
8091
8253
 
8092
8254
  // src/graphql/mutations/school.ts
8093
- var import_client71 = require("@apollo/client");
8255
+ var import_client75 = require("@apollo/client");
8094
8256
 
8095
8257
  // src/graphql/queries/school.ts
8096
- var import_client70 = require("@apollo/client");
8097
- var SCHOOL_REGISTERED_USERS_FIELDS_FRAGMENT = import_client70.gql`
8258
+ var import_client74 = require("@apollo/client");
8259
+ var SCHOOL_REGISTERED_USERS_FIELDS_FRAGMENT = import_client74.gql`
8098
8260
  fragment SchoolRegisteredUsersFields on SchoolRegisteredUserType {
8099
8261
  _id
8100
8262
  active
@@ -8107,14 +8269,14 @@ var SCHOOL_REGISTERED_USERS_FIELDS_FRAGMENT = import_client70.gql`
8107
8269
  }
8108
8270
  ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
8109
8271
  `;
8110
- var SCHOOL_CAMPAIGN_FIELDS_FRAGMENT = import_client70.gql`
8272
+ var SCHOOL_CAMPAIGN_FIELDS_FRAGMENT = import_client74.gql`
8111
8273
  fragment SchoolCampaignFields on SchoolCampaignType {
8112
8274
  endDate
8113
8275
  name
8114
8276
  startDate
8115
8277
  }
8116
8278
  `;
8117
- var SCHOOL = import_client70.gql`
8279
+ var SCHOOL = import_client74.gql`
8118
8280
  fragment SchoolFields on SchoolType {
8119
8281
  _id
8120
8282
  active
@@ -8158,7 +8320,7 @@ var SCHOOL = import_client70.gql`
8158
8320
  ${SOCIAL_MEDIA_FIELDS_FRAGMENT}
8159
8321
  ${SCHOOL_CAMPAIGN_FIELDS_FRAGMENT}
8160
8322
  `;
8161
- var GET_SCHOOL = import_client70.gql`
8323
+ var GET_SCHOOL = import_client74.gql`
8162
8324
  query getSchool($_id: ID!) {
8163
8325
  school(_id: $_id) {
8164
8326
  school {
@@ -8172,7 +8334,7 @@ var GET_SCHOOL = import_client70.gql`
8172
8334
  ${SCHOOL}
8173
8335
  ${SCHOOL_REGISTERED_USERS_FIELDS_FRAGMENT}
8174
8336
  `;
8175
- var GET_SCHOOLS = import_client70.gql`
8337
+ var GET_SCHOOLS = import_client74.gql`
8176
8338
  query getSchools {
8177
8339
  schools {
8178
8340
  ...SchoolFields
@@ -8182,7 +8344,7 @@ var GET_SCHOOLS = import_client70.gql`
8182
8344
  `;
8183
8345
 
8184
8346
  // src/graphql/mutations/school.ts
8185
- var CREATE_SCHOOL_MUTATION = import_client71.gql`
8347
+ var CREATE_SCHOOL_MUTATION = import_client75.gql`
8186
8348
  mutation createSchool($input: SchoolInputType!) {
8187
8349
  createSchool(input: $input) {
8188
8350
  data {
@@ -8193,7 +8355,7 @@ var CREATE_SCHOOL_MUTATION = import_client71.gql`
8193
8355
  }
8194
8356
  ${SCHOOL}
8195
8357
  `;
8196
- var UPDATE_SCHOOL_MUTATION = import_client71.gql`
8358
+ var UPDATE_SCHOOL_MUTATION = import_client75.gql`
8197
8359
  mutation updateSchool($_id: ID!, $input: SchoolInputType!) {
8198
8360
  updateSchool(_id: $_id, input: $input) {
8199
8361
  data {
@@ -8204,7 +8366,7 @@ var UPDATE_SCHOOL_MUTATION = import_client71.gql`
8204
8366
  }
8205
8367
  ${SCHOOL}
8206
8368
  `;
8207
- var DELETE_SCHOOL_MUTATION = import_client71.gql`
8369
+ var DELETE_SCHOOL_MUTATION = import_client75.gql`
8208
8370
  mutation deleteSchool($_id: ID!) {
8209
8371
  deleteSchool(_id: $_id) {
8210
8372
  data
@@ -8212,7 +8374,7 @@ var DELETE_SCHOOL_MUTATION = import_client71.gql`
8212
8374
  }
8213
8375
  }
8214
8376
  `;
8215
- var REQUEST_MARKETING_MATERIAL_MUTATION = import_client71.gql`
8377
+ var REQUEST_MARKETING_MATERIAL_MUTATION = import_client75.gql`
8216
8378
  mutation requestMarketingMaterial(
8217
8379
  $input: MarketingMaterialRequestInputType!
8218
8380
  ) {
@@ -8225,35 +8387,35 @@ var REQUEST_MARKETING_MATERIAL_MUTATION = import_client71.gql`
8225
8387
 
8226
8388
  // src/graphql/hooks/school/hooksMutation.ts
8227
8389
  var useCreateSchool = () => {
8228
- const [createSchool, { loading, error }] = (0, import_client72.useMutation)(CREATE_SCHOOL_MUTATION, {
8390
+ const [createSchool, { loading, error }] = (0, import_client76.useMutation)(CREATE_SCHOOL_MUTATION, {
8229
8391
  awaitRefetchQueries: true,
8230
8392
  refetchQueries: [{ query: GET_SCHOOLS }]
8231
8393
  });
8232
8394
  return { createSchool, error, loading };
8233
8395
  };
8234
8396
  var useUpdateSchool = () => {
8235
- const [updateSchool, { loading, error }] = (0, import_client72.useMutation)(UPDATE_SCHOOL_MUTATION, {
8397
+ const [updateSchool, { loading, error }] = (0, import_client76.useMutation)(UPDATE_SCHOOL_MUTATION, {
8236
8398
  awaitRefetchQueries: true,
8237
8399
  refetchQueries: [{ query: GET_SCHOOLS }]
8238
8400
  });
8239
8401
  return { error, loading, updateSchool };
8240
8402
  };
8241
8403
  var useDeleteSchool = () => {
8242
- const [deleteSchool, { loading, error }] = (0, import_client72.useMutation)(DELETE_SCHOOL_MUTATION, {
8404
+ const [deleteSchool, { loading, error }] = (0, import_client76.useMutation)(DELETE_SCHOOL_MUTATION, {
8243
8405
  awaitRefetchQueries: true,
8244
8406
  refetchQueries: [{ query: GET_SCHOOLS }]
8245
8407
  });
8246
8408
  return { deleteSchool, error, loading };
8247
8409
  };
8248
8410
  var useRequestMarketingMaterial = () => {
8249
- const [requestMarketingMaterial, { loading, error }] = (0, import_client72.useMutation)(REQUEST_MARKETING_MATERIAL_MUTATION);
8411
+ const [requestMarketingMaterial, { loading, error }] = (0, import_client76.useMutation)(REQUEST_MARKETING_MATERIAL_MUTATION);
8250
8412
  return { error, loading, requestMarketingMaterial };
8251
8413
  };
8252
8414
 
8253
8415
  // src/graphql/hooks/school/hooksQuery.ts
8254
- var import_client73 = require("@apollo/client");
8416
+ var import_client77 = require("@apollo/client");
8255
8417
  var useGetSchools = () => {
8256
- const { data, loading, error, refetch } = (0, import_client73.useQuery)(
8418
+ const { data, loading, error, refetch } = (0, import_client77.useQuery)(
8257
8419
  GET_SCHOOLS,
8258
8420
  {
8259
8421
  fetchPolicy: "network-only"
@@ -8267,7 +8429,7 @@ var useGetSchools = () => {
8267
8429
  };
8268
8430
  };
8269
8431
  var useGetSchool = (_id) => {
8270
- const { data, loading, error, refetch } = (0, import_client73.useQuery)(GET_SCHOOL, {
8432
+ const { data, loading, error, refetch } = (0, import_client77.useQuery)(GET_SCHOOL, {
8271
8433
  fetchPolicy: "network-only",
8272
8434
  skip: !_id,
8273
8435
  variables: { _id }
@@ -8281,11 +8443,11 @@ var useGetSchool = (_id) => {
8281
8443
  };
8282
8444
 
8283
8445
  // src/graphql/hooks/affiliate/hooksQuery.ts
8284
- var import_client75 = require("@apollo/client");
8446
+ var import_client79 = require("@apollo/client");
8285
8447
 
8286
8448
  // src/graphql/queries/affiliate.ts
8287
- var import_client74 = require("@apollo/client");
8288
- var AFFILIATE_REWARD_FIELDS_FRAGMENT = import_client74.gql`
8449
+ var import_client78 = require("@apollo/client");
8450
+ var AFFILIATE_REWARD_FIELDS_FRAGMENT = import_client78.gql`
8289
8451
  fragment AffiliateRewardFields on AffiliateRewardType {
8290
8452
  createdAt
8291
8453
  redeemedAt
@@ -8294,7 +8456,7 @@ var AFFILIATE_REWARD_FIELDS_FRAGMENT = import_client74.gql`
8294
8456
  rewardValue
8295
8457
  }
8296
8458
  `;
8297
- var AFFILIATE_RESOURCE_FIELDS_FRAGMENT = import_client74.gql`
8459
+ var AFFILIATE_RESOURCE_FIELDS_FRAGMENT = import_client78.gql`
8298
8460
  fragment AffiliateResourceFields on AffiliateResourceType {
8299
8461
  resourceActive
8300
8462
  resourceDeletedAt
@@ -8311,13 +8473,13 @@ var AFFILIATE_RESOURCE_FIELDS_FRAGMENT = import_client74.gql`
8311
8473
  ${AFFILIATE_REWARD_FIELDS_FRAGMENT}
8312
8474
  ${OWNER_FIELDS_FRAGMENT}
8313
8475
  `;
8314
- var AFFILIATE_BANK_ACCOUNT_DETAILS_FIELDS_FRAGMENT = import_client74.gql`
8476
+ var AFFILIATE_BANK_ACCOUNT_DETAILS_FIELDS_FRAGMENT = import_client78.gql`
8315
8477
  fragment AffiliateBankAccountDetailsFields on AffiliateBankAccountDetailsType {
8316
8478
  accountHolderName
8317
8479
  accountNumber
8318
8480
  }
8319
8481
  `;
8320
- var AFFILIATE_DETAILS_FIELDS_FRAGMENT = import_client74.gql`
8482
+ var AFFILIATE_DETAILS_FIELDS_FRAGMENT = import_client78.gql`
8321
8483
  fragment AffiliateDetailsFields on AffiliateDetailsType {
8322
8484
  bankAccountDetails {
8323
8485
  ...AffiliateBankAccountDetailsFields
@@ -8345,7 +8507,7 @@ var AFFILIATE_DETAILS_FIELDS_FRAGMENT = import_client74.gql`
8345
8507
  ${SOCIAL_MEDIA_FIELDS_FRAGMENT}
8346
8508
  ${TERMS_AGREEMENT_FIELDS_FRAGMENT}
8347
8509
  `;
8348
- var AFFILIATE_FIELDS_FRAGMENT = import_client74.gql`
8510
+ var AFFILIATE_FIELDS_FRAGMENT = import_client78.gql`
8349
8511
  fragment AffiliateFields on AffiliateType {
8350
8512
  _id
8351
8513
  active
@@ -8377,7 +8539,7 @@ var AFFILIATE_FIELDS_FRAGMENT = import_client74.gql`
8377
8539
  ${AFFILIATE_RESOURCE_FIELDS_FRAGMENT}
8378
8540
  ${OWNER_FIELDS_FRAGMENT}
8379
8541
  `;
8380
- var GET_AFFILIATE = import_client74.gql`
8542
+ var GET_AFFILIATE = import_client78.gql`
8381
8543
  query getAffiliate($_id: ID!) {
8382
8544
  affiliate(_id: $_id) {
8383
8545
  ...AffiliateFields
@@ -8385,7 +8547,7 @@ var GET_AFFILIATE = import_client74.gql`
8385
8547
  }
8386
8548
  ${AFFILIATE_FIELDS_FRAGMENT}
8387
8549
  `;
8388
- var GET_AFFILIATES = import_client74.gql`
8550
+ var GET_AFFILIATES = import_client78.gql`
8389
8551
  query getAffiliates {
8390
8552
  affiliates {
8391
8553
  ...AffiliateFields
@@ -8396,7 +8558,7 @@ var GET_AFFILIATES = import_client74.gql`
8396
8558
 
8397
8559
  // src/graphql/hooks/affiliate/hooksQuery.ts
8398
8560
  var useGetAffiliate = (_id) => {
8399
- const { data, loading, error, refetch } = (0, import_client75.useQuery)(GET_AFFILIATE, {
8561
+ const { data, loading, error, refetch } = (0, import_client79.useQuery)(GET_AFFILIATE, {
8400
8562
  fetchPolicy: "network-only",
8401
8563
  skip: !_id || _id === "",
8402
8564
  variables: { _id }
@@ -8410,7 +8572,7 @@ var useGetAffiliate = (_id) => {
8410
8572
  };
8411
8573
  };
8412
8574
  var useGetAffiliates = () => {
8413
- const { data, loading, error, refetch } = (0, import_client75.useQuery)(GET_AFFILIATES, {
8575
+ const { data, loading, error, refetch } = (0, import_client79.useQuery)(GET_AFFILIATES, {
8414
8576
  fetchPolicy: "network-only"
8415
8577
  });
8416
8578
  const affiliates = data?.affiliates || [];
@@ -8423,11 +8585,11 @@ var useGetAffiliates = () => {
8423
8585
  };
8424
8586
 
8425
8587
  // src/graphql/hooks/affiliate/hooksMutation.ts
8426
- var import_client77 = require("@apollo/client");
8588
+ var import_client81 = require("@apollo/client");
8427
8589
 
8428
8590
  // src/graphql/mutations/affiliate.ts
8429
- var import_client76 = require("@apollo/client");
8430
- var CREATE_AFFILIATE_MUTATION = import_client76.gql`
8591
+ var import_client80 = require("@apollo/client");
8592
+ var CREATE_AFFILIATE_MUTATION = import_client80.gql`
8431
8593
  mutation createAffiliate($input: AffiliateDetailsInputType!) {
8432
8594
  createAffiliate(input: $input) {
8433
8595
  data {
@@ -8438,7 +8600,7 @@ var CREATE_AFFILIATE_MUTATION = import_client76.gql`
8438
8600
  }
8439
8601
  ${AFFILIATE_FIELDS_FRAGMENT}
8440
8602
  `;
8441
- var UPDATE_AFFILIATE_DETAILS_MUTATION = import_client76.gql`
8603
+ var UPDATE_AFFILIATE_DETAILS_MUTATION = import_client80.gql`
8442
8604
  mutation updateAffiliateDetails(
8443
8605
  $input: AffiliateDetailsInputType!
8444
8606
  $affiliateId: ID!
@@ -8452,7 +8614,7 @@ var UPDATE_AFFILIATE_DETAILS_MUTATION = import_client76.gql`
8452
8614
  }
8453
8615
  ${AFFILIATE_FIELDS_FRAGMENT}
8454
8616
  `;
8455
- var DELETE_AFFILIATE_MUTATION = import_client76.gql`
8617
+ var DELETE_AFFILIATE_MUTATION = import_client80.gql`
8456
8618
  mutation deleteAffiliate($_id: ID!) {
8457
8619
  deleteAffiliate(_id: $_id) {
8458
8620
  data
@@ -8460,7 +8622,7 @@ var DELETE_AFFILIATE_MUTATION = import_client76.gql`
8460
8622
  }
8461
8623
  }
8462
8624
  `;
8463
- var REDEEM_AFFILIATE_REWARD_MUTATION = import_client76.gql`
8625
+ var REDEEM_AFFILIATE_REWARD_MUTATION = import_client80.gql`
8464
8626
  mutation redeemAffiliateReward($affiliateId: ID!) {
8465
8627
  redeemAffiliateReward(affiliateId: $affiliateId) {
8466
8628
  data {
@@ -8471,7 +8633,7 @@ var REDEEM_AFFILIATE_REWARD_MUTATION = import_client76.gql`
8471
8633
  }
8472
8634
  ${AFFILIATE_FIELDS_FRAGMENT}
8473
8635
  `;
8474
- var ASSIGN_AFFILIATE_RESOURCE_REWARD_MUTATION = import_client76.gql`
8636
+ var ASSIGN_AFFILIATE_RESOURCE_REWARD_MUTATION = import_client80.gql`
8475
8637
  mutation assignAffiliateResourceReward(
8476
8638
  $affiliateId: ID!
8477
8639
  $resourceId: ID!
@@ -8492,7 +8654,7 @@ var ASSIGN_AFFILIATE_RESOURCE_REWARD_MUTATION = import_client76.gql`
8492
8654
  }
8493
8655
  ${AFFILIATE_FIELDS_FRAGMENT}
8494
8656
  `;
8495
- var ASSIGN_AFFILIATE_BONUS_REWARD_MUTATION = import_client76.gql`
8657
+ var ASSIGN_AFFILIATE_BONUS_REWARD_MUTATION = import_client80.gql`
8496
8658
  mutation assignAffiliateBonusReward(
8497
8659
  $affiliateId: ID!
8498
8660
  $rewardType: AffiliateRewardEnumType!
@@ -8512,7 +8674,7 @@ var ASSIGN_AFFILIATE_BONUS_REWARD_MUTATION = import_client76.gql`
8512
8674
 
8513
8675
  // src/graphql/hooks/affiliate/hooksMutation.ts
8514
8676
  var useCreateAffiliate = () => {
8515
- const [createAffiliate, { loading, error }] = (0, import_client77.useMutation)(CREATE_AFFILIATE_MUTATION, {
8677
+ const [createAffiliate, { loading, error }] = (0, import_client81.useMutation)(CREATE_AFFILIATE_MUTATION, {
8516
8678
  awaitRefetchQueries: true,
8517
8679
  refetchQueries: (mutationResult) => {
8518
8680
  const affiliateId = mutationResult?.data?.createAffiliate?.data?._id;
@@ -8523,7 +8685,7 @@ var useCreateAffiliate = () => {
8523
8685
  return { createAffiliate, error, loading };
8524
8686
  };
8525
8687
  var useUpdateAffiliateDetails = () => {
8526
- const [updateAffiliateDetails, { loading, error }] = (0, import_client77.useMutation)(UPDATE_AFFILIATE_DETAILS_MUTATION, {
8688
+ const [updateAffiliateDetails, { loading, error }] = (0, import_client81.useMutation)(UPDATE_AFFILIATE_DETAILS_MUTATION, {
8527
8689
  awaitRefetchQueries: true,
8528
8690
  refetchQueries: (mutationResult) => {
8529
8691
  const affiliateId = mutationResult?.data?.updateAffiliateDetails?.data?._id;
@@ -8534,14 +8696,14 @@ var useUpdateAffiliateDetails = () => {
8534
8696
  return { error, loading, updateAffiliateDetails };
8535
8697
  };
8536
8698
  var useDeleteAffiliate = () => {
8537
- const [deleteAffiliate, { loading, error }] = (0, import_client77.useMutation)(DELETE_AFFILIATE_MUTATION, {
8699
+ const [deleteAffiliate, { loading, error }] = (0, import_client81.useMutation)(DELETE_AFFILIATE_MUTATION, {
8538
8700
  awaitRefetchQueries: true,
8539
8701
  refetchQueries: [{ query: GET_AFFILIATES }]
8540
8702
  });
8541
8703
  return { deleteAffiliate, error, loading };
8542
8704
  };
8543
8705
  var useRedeemAffiliateReward = () => {
8544
- const [redeemAffiliateReward, { loading, error }] = (0, import_client77.useMutation)(REDEEM_AFFILIATE_REWARD_MUTATION, {
8706
+ const [redeemAffiliateReward, { loading, error }] = (0, import_client81.useMutation)(REDEEM_AFFILIATE_REWARD_MUTATION, {
8545
8707
  awaitRefetchQueries: true,
8546
8708
  refetchQueries: (mutationResult) => {
8547
8709
  const affiliateId = mutationResult?.data?.redeemAffiliateReward?.data?._id;
@@ -8552,7 +8714,7 @@ var useRedeemAffiliateReward = () => {
8552
8714
  return { error, loading, redeemAffiliateReward };
8553
8715
  };
8554
8716
  var useAssignAffiliateResourceReward = () => {
8555
- const [assignAffiliateResourceReward, { loading, error }] = (0, import_client77.useMutation)(ASSIGN_AFFILIATE_RESOURCE_REWARD_MUTATION, {
8717
+ const [assignAffiliateResourceReward, { loading, error }] = (0, import_client81.useMutation)(ASSIGN_AFFILIATE_RESOURCE_REWARD_MUTATION, {
8556
8718
  awaitRefetchQueries: true,
8557
8719
  refetchQueries: (mutationResult) => {
8558
8720
  const affiliateId = mutationResult?.data?.assignAffiliateResourceReward?.data?._id;
@@ -8563,7 +8725,7 @@ var useAssignAffiliateResourceReward = () => {
8563
8725
  return { assignAffiliateResourceReward, error, loading };
8564
8726
  };
8565
8727
  var useAssignAffiliateBonusReward = () => {
8566
- const [assignAffiliateBonusReward, { loading, error }] = (0, import_client77.useMutation)(ASSIGN_AFFILIATE_BONUS_REWARD_MUTATION, {
8728
+ const [assignAffiliateBonusReward, { loading, error }] = (0, import_client81.useMutation)(ASSIGN_AFFILIATE_BONUS_REWARD_MUTATION, {
8567
8729
  awaitRefetchQueries: true,
8568
8730
  refetchQueries: (mutationResult) => {
8569
8731
  const affiliateId = mutationResult?.data?.assignAffiliateBonusReward?.data?._id;
@@ -8575,14 +8737,14 @@ var useAssignAffiliateBonusReward = () => {
8575
8737
  };
8576
8738
 
8577
8739
  // src/graphql/hooks/coupon/hooksMutation.ts
8578
- var import_client80 = require("@apollo/client");
8740
+ var import_client84 = require("@apollo/client");
8579
8741
 
8580
8742
  // src/graphql/mutations/coupon.ts
8581
- var import_client79 = require("@apollo/client");
8743
+ var import_client83 = require("@apollo/client");
8582
8744
 
8583
8745
  // src/graphql/queries/coupon.ts
8584
- var import_client78 = require("@apollo/client");
8585
- var COUPON_CODE_FIELDS_FRAGMENT = import_client78.gql`
8746
+ var import_client82 = require("@apollo/client");
8747
+ var COUPON_CODE_FIELDS_FRAGMENT = import_client82.gql`
8586
8748
  fragment CouponCodeFields on CouponCodeType {
8587
8749
  code
8588
8750
  qrCode {
@@ -8594,7 +8756,7 @@ var COUPON_CODE_FIELDS_FRAGMENT = import_client78.gql`
8594
8756
  }
8595
8757
  ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
8596
8758
  `;
8597
- var COUPON_PARTICIPANT_USER_FIELDS_FRAGMENT = import_client78.gql`
8759
+ var COUPON_PARTICIPANT_USER_FIELDS_FRAGMENT = import_client82.gql`
8598
8760
  fragment CouponParticipantUserFields on CouponParticipantUserType {
8599
8761
  couponCollectedCount
8600
8762
  couponRedeemedAt
@@ -8606,7 +8768,7 @@ var COUPON_PARTICIPANT_USER_FIELDS_FRAGMENT = import_client78.gql`
8606
8768
  nickName
8607
8769
  }
8608
8770
  `;
8609
- var COUPON_OPTION_FIELDS_FRAGMENT = import_client78.gql`
8771
+ var COUPON_OPTION_FIELDS_FRAGMENT = import_client82.gql`
8610
8772
  fragment CouponOptionFields on CouponOptionType {
8611
8773
  type
8612
8774
  buy
@@ -8616,7 +8778,7 @@ var COUPON_OPTION_FIELDS_FRAGMENT = import_client78.gql`
8616
8778
  maxRewardCount
8617
8779
  }
8618
8780
  `;
8619
- var COUPON_VENDOR_PRODUCT_FIELDS_FRAGMENT = import_client78.gql`
8781
+ var COUPON_VENDOR_PRODUCT_FIELDS_FRAGMENT = import_client82.gql`
8620
8782
  fragment CouponVendorProductFields on CouponVendorProductType {
8621
8783
  couponId
8622
8784
  vendorId
@@ -8624,7 +8786,7 @@ var COUPON_VENDOR_PRODUCT_FIELDS_FRAGMENT = import_client78.gql`
8624
8786
  vendorCouponId
8625
8787
  }
8626
8788
  `;
8627
- var COUPON_DATA_PRODUCTS_FIELDS_FRAGMENT = import_client78.gql`
8789
+ var COUPON_DATA_PRODUCTS_FIELDS_FRAGMENT = import_client82.gql`
8628
8790
  fragment CouponDataProductsFields on CouponDataProductsType {
8629
8791
  active
8630
8792
  couponId
@@ -8640,7 +8802,7 @@ var COUPON_DATA_PRODUCTS_FIELDS_FRAGMENT = import_client78.gql`
8640
8802
  ${VENDOR_PRODUCT_LIST_FIELDS_FRAGMENT}
8641
8803
  ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
8642
8804
  `;
8643
- var COUPON_DATA_FIELDS_FRAGMENT = import_client78.gql`
8805
+ var COUPON_DATA_FIELDS_FRAGMENT = import_client82.gql`
8644
8806
  fragment CouponDataFields on CouponDataType {
8645
8807
  _id
8646
8808
  active
@@ -8674,7 +8836,7 @@ var COUPON_DATA_FIELDS_FRAGMENT = import_client78.gql`
8674
8836
  ${COUPON_VENDOR_PRODUCT_FIELDS_FRAGMENT}
8675
8837
  ${COUPON_DATA_PRODUCTS_FIELDS_FRAGMENT}
8676
8838
  `;
8677
- var COUPON = import_client78.gql`
8839
+ var COUPON = import_client82.gql`
8678
8840
  fragment CouponFields on CouponType {
8679
8841
  _id
8680
8842
  active
@@ -8691,7 +8853,7 @@ var COUPON = import_client78.gql`
8691
8853
  ${OWNER_FIELDS_FRAGMENT}
8692
8854
  ${COUPON_DATA_FIELDS_FRAGMENT}
8693
8855
  `;
8694
- var GET_COUPONS = import_client78.gql`
8856
+ var GET_COUPONS = import_client82.gql`
8695
8857
  query getCoupons(
8696
8858
  $region: String
8697
8859
  $category: String
@@ -8726,7 +8888,7 @@ var GET_COUPONS = import_client78.gql`
8726
8888
  }
8727
8889
  ${COUPON}
8728
8890
  `;
8729
- var GET_COUPON = import_client78.gql`
8891
+ var GET_COUPON = import_client82.gql`
8730
8892
  query getCoupon($_id: ID!) {
8731
8893
  coupon(_id: $_id) {
8732
8894
  ...CouponFields
@@ -8736,7 +8898,7 @@ var GET_COUPON = import_client78.gql`
8736
8898
  `;
8737
8899
 
8738
8900
  // src/graphql/mutations/coupon.ts
8739
- var CREATE_COUPON_MUTATION = import_client79.gql`
8901
+ var CREATE_COUPON_MUTATION = import_client83.gql`
8740
8902
  mutation createCoupon($input: CouponInputType!) {
8741
8903
  createCoupon(input: $input) {
8742
8904
  data {
@@ -8747,7 +8909,7 @@ var CREATE_COUPON_MUTATION = import_client79.gql`
8747
8909
  }
8748
8910
  ${COUPON}
8749
8911
  `;
8750
- var UPDATE_COUPON_MUTATION = import_client79.gql`
8912
+ var UPDATE_COUPON_MUTATION = import_client83.gql`
8751
8913
  mutation updateCoupon(
8752
8914
  $couponDocumentId: ID!
8753
8915
  $couponId: ID!
@@ -8766,7 +8928,7 @@ var UPDATE_COUPON_MUTATION = import_client79.gql`
8766
8928
  }
8767
8929
  ${COUPON}
8768
8930
  `;
8769
- var DELETE_COUPON_MUTATION = import_client79.gql`
8931
+ var DELETE_COUPON_MUTATION = import_client83.gql`
8770
8932
  mutation deleteCoupon($input: ProductCouponInputType!) {
8771
8933
  deleteCoupon(input: $input) {
8772
8934
  data
@@ -8774,7 +8936,7 @@ var DELETE_COUPON_MUTATION = import_client79.gql`
8774
8936
  }
8775
8937
  }
8776
8938
  `;
8777
- var SCAN_COUPON_MUTATION = import_client79.gql`
8939
+ var SCAN_COUPON_MUTATION = import_client83.gql`
8778
8940
  mutation scanCoupon($input: ProductCouponInputType!) {
8779
8941
  scanCoupon(input: $input) {
8780
8942
  data
@@ -8782,7 +8944,7 @@ var SCAN_COUPON_MUTATION = import_client79.gql`
8782
8944
  }
8783
8945
  }
8784
8946
  `;
8785
- var REWARD_COUPON_MUTATION = import_client79.gql`
8947
+ var REWARD_COUPON_MUTATION = import_client83.gql`
8786
8948
  mutation rewardCoupon($input: ProductCouponInputType!, $userId: ID!) {
8787
8949
  rewardCoupon(input: $input, userId: $userId) {
8788
8950
  data
@@ -8793,32 +8955,32 @@ var REWARD_COUPON_MUTATION = import_client79.gql`
8793
8955
 
8794
8956
  // src/graphql/hooks/coupon/hooksMutation.ts
8795
8957
  var useCreateCoupon = () => {
8796
- const [createCoupon, { loading, error }] = (0, import_client80.useMutation)(CREATE_COUPON_MUTATION, {
8958
+ const [createCoupon, { loading, error }] = (0, import_client84.useMutation)(CREATE_COUPON_MUTATION, {
8797
8959
  awaitRefetchQueries: true,
8798
8960
  refetchQueries: [GET_COUPONS]
8799
8961
  });
8800
8962
  return { createCoupon, error, loading };
8801
8963
  };
8802
8964
  var useUpdateCoupon = () => {
8803
- const [updateCoupon, { loading, error }] = (0, import_client80.useMutation)(UPDATE_COUPON_MUTATION, {
8965
+ const [updateCoupon, { loading, error }] = (0, import_client84.useMutation)(UPDATE_COUPON_MUTATION, {
8804
8966
  awaitRefetchQueries: true,
8805
8967
  refetchQueries: [GET_COUPONS]
8806
8968
  });
8807
8969
  return { error, loading, updateCoupon };
8808
8970
  };
8809
8971
  var useDeleteCoupon = () => {
8810
- const [deleteCoupon, { loading, error }] = (0, import_client80.useMutation)(DELETE_COUPON_MUTATION, {
8972
+ const [deleteCoupon, { loading, error }] = (0, import_client84.useMutation)(DELETE_COUPON_MUTATION, {
8811
8973
  awaitRefetchQueries: true,
8812
8974
  refetchQueries: [GET_COUPONS]
8813
8975
  });
8814
8976
  return { deleteCoupon, error, loading };
8815
8977
  };
8816
8978
  var useScanCoupon = () => {
8817
- const [scanCoupon, { loading, error }] = (0, import_client80.useMutation)(SCAN_COUPON_MUTATION);
8979
+ const [scanCoupon, { loading, error }] = (0, import_client84.useMutation)(SCAN_COUPON_MUTATION);
8818
8980
  return { error, loading, scanCoupon };
8819
8981
  };
8820
8982
  var useRewardCoupon = () => {
8821
- const [rewardCoupon, { loading, error }] = (0, import_client80.useMutation)(REWARD_COUPON_MUTATION, {
8983
+ const [rewardCoupon, { loading, error }] = (0, import_client84.useMutation)(REWARD_COUPON_MUTATION, {
8822
8984
  awaitRefetchQueries: true,
8823
8985
  refetchQueries: [GET_COUPONS]
8824
8986
  });
@@ -8826,9 +8988,9 @@ var useRewardCoupon = () => {
8826
8988
  };
8827
8989
 
8828
8990
  // src/graphql/hooks/coupon/hooksQuery.ts
8829
- var import_client81 = require("@apollo/client");
8991
+ var import_client85 = require("@apollo/client");
8830
8992
  var useGetCoupons = (variables) => {
8831
- const { loading, error, data, refetch } = (0, import_client81.useQuery)(GET_COUPONS, {
8993
+ const { loading, error, data, refetch } = (0, import_client85.useQuery)(GET_COUPONS, {
8832
8994
  fetchPolicy: "network-only",
8833
8995
  variables
8834
8996
  });
@@ -8840,7 +9002,7 @@ var useGetCoupons = (variables) => {
8840
9002
  return { coupons, error, loading, refetch };
8841
9003
  };
8842
9004
  var useGetCoupon = (_id) => {
8843
- const { loading, error, data, refetch } = (0, import_client81.useQuery)(GET_COUPON, {
9005
+ const { loading, error, data, refetch } = (0, import_client85.useQuery)(GET_COUPON, {
8844
9006
  fetchPolicy: "network-only",
8845
9007
  skip: !_id || _id === "",
8846
9008
  variables: { _id }
@@ -9410,6 +9572,9 @@ function canAccessAdminPath(roles, pathname) {
9410
9572
  AFFILIATE_PARTICIPANT_TYPE_LABELS,
9411
9573
  AFFILIATE_REWARDS,
9412
9574
  ANDROID_URL,
9575
+ BILLING_CATALOG_CURRENCY,
9576
+ BILLING_CATALOG_DEFINITIONS,
9577
+ BILLING_CATALOG_KEYS,
9413
9578
  CLUEMART_MAIN_DOMAIN_URL,
9414
9579
  CM_AFFILIATE_PROMO_CODE,
9415
9580
  CM_SCHOOL_PROMO_CODE,
@@ -9467,6 +9632,7 @@ function canAccessAdminPath(roles, pathname) {
9467
9632
  GET_VENDOR_BY_SLUG,
9468
9633
  GET_VENDOR_INFO,
9469
9634
  IMAGE_EXTENSION,
9635
+ INITIAL_BILLING_CATALOG,
9470
9636
  IOS_URL,
9471
9637
  ImageTypeEnum,
9472
9638
  KNOWN_EVENT_SCHEDULE_STATUSES,
@@ -9528,6 +9694,7 @@ function canAccessAdminPath(roles, pathname) {
9528
9694
  badgeIds,
9529
9695
  badges,
9530
9696
  bankAccountDetailsFields,
9697
+ billingCatalogDefinitionMatches,
9531
9698
  buildApplicationShareDescription,
9532
9699
  buildCalendarSheetContentData,
9533
9700
  buildFacebookShareQuote,
@@ -9596,6 +9763,7 @@ function canAccessAdminPath(roles, pathname) {
9596
9763
  gameScreenIdentifierList,
9597
9764
  gameTypeToDisplayName,
9598
9765
  getAllowedEventDateStatuses,
9766
+ getBillingCatalogKeyForSelection,
9599
9767
  getCurrentAndFutureDates,
9600
9768
  getDefaultAdminHome,
9601
9769
  getErrorMessage,
@@ -9748,6 +9916,7 @@ function canAccessAdminPath(roles, pathname) {
9748
9916
  useGetAffiliate,
9749
9917
  useGetAffiliates,
9750
9918
  useGetAppSettings,
9919
+ useGetBillingCatalog,
9751
9920
  useGetChat,
9752
9921
  useGetChatSubscription,
9753
9922
  useGetChatsByRegion,
@@ -9826,15 +9995,16 @@ function canAccessAdminPath(roles, pathname) {
9826
9995
  useSearchEvents,
9827
9996
  useSearchPartners,
9828
9997
  useSearchVendors,
9829
- useSelectPackage,
9830
9998
  useSelectStandardPackage,
9831
9999
  useSendChatMessage,
9832
10000
  useStartGame,
10001
+ useSyncBillingCatalogPrice,
9833
10002
  useToggleChatMessageLike,
9834
10003
  useUnlinkUnregisteredVendorByInviterId,
9835
10004
  useUpdateAd,
9836
10005
  useUpdateAffiliateDetails,
9837
10006
  useUpdateAppSettings,
10007
+ useUpdateBillingCatalogPrice,
9838
10008
  useUpdateCoupon,
9839
10009
  useUpdateDailyClueGame,
9840
10010
  useUpdateEvent,