@timardex/cluemart-shared 2.0.13 → 2.0.15

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 (38) hide show
  1. package/dist/{ad-DtHc-l0P.d.ts → ad-CpsTouG6.d.ts} +7 -1
  2. package/dist/{ad-uqMx-9wk.d.mts → ad-DwFDtNp7.d.mts} +7 -1
  3. package/dist/{chunk-DS2Y6BNU.mjs → chunk-6HI3OSCZ.mjs} +18 -7
  4. package/dist/chunk-6HI3OSCZ.mjs.map +1 -0
  5. package/dist/{chunk-XU65BXAM.mjs → chunk-KGPPKS5M.mjs} +1 -1
  6. package/dist/chunk-KGPPKS5M.mjs.map +1 -0
  7. package/dist/{chunk-VHYU2BPC.mjs → chunk-NERMP6D5.mjs} +2 -2
  8. package/dist/{chunk-AUWZYZK5.mjs → chunk-ZUXHEXJU.mjs} +2 -2
  9. package/dist/{chunk-AUWZYZK5.mjs.map → chunk-ZUXHEXJU.mjs.map} +1 -1
  10. package/dist/formFields/index.cjs +1 -1
  11. package/dist/formFields/index.cjs.map +1 -1
  12. package/dist/formFields/index.mjs +3 -3
  13. package/dist/graphql/index.cjs +17 -6
  14. package/dist/graphql/index.cjs.map +1 -1
  15. package/dist/graphql/index.d.mts +5 -3
  16. package/dist/graphql/index.d.ts +5 -3
  17. package/dist/graphql/index.mjs +1 -1
  18. package/dist/hooks/index.cjs +29 -3
  19. package/dist/hooks/index.cjs.map +1 -1
  20. package/dist/hooks/index.d.mts +1 -1
  21. package/dist/hooks/index.d.ts +1 -1
  22. package/dist/hooks/index.mjs +23 -5
  23. package/dist/hooks/index.mjs.map +1 -1
  24. package/dist/index.cjs +18 -7
  25. package/dist/index.cjs.map +1 -1
  26. package/dist/index.d.mts +11 -3
  27. package/dist/index.d.ts +11 -3
  28. package/dist/index.mjs +18 -7
  29. package/dist/index.mjs.map +1 -1
  30. package/dist/types/index.cjs.map +1 -1
  31. package/dist/types/index.d.mts +1 -1
  32. package/dist/types/index.d.ts +1 -1
  33. package/dist/types/index.mjs +1 -1
  34. package/dist/utils/index.mjs +2 -2
  35. package/package.json +1 -1
  36. package/dist/chunk-DS2Y6BNU.mjs.map +0 -1
  37. package/dist/chunk-XU65BXAM.mjs.map +0 -1
  38. /package/dist/{chunk-VHYU2BPC.mjs.map → chunk-NERMP6D5.mjs.map} +0 -0
@@ -4,7 +4,7 @@ import { DocumentNode } from 'graphql';
4
4
  import { A as AdminUpdateResourceType, C as ChatType, R as ReportChatUser, N as NotificationType, a as NotificationCount, b as ResourceActivityType } from '../resourceActivities-D9-mYXe8.mjs';
5
5
  import { M as MutationResponse, E as EventType, c as EventListItemType, d as EventInfoType, U as UseGetResourcesByRegionOptions, P as PosterUsageType, e as RelationType, f as ResourceConnectionsType, V as VendorClaimTokenValidation, g as UnregisteredVendorType, h as VendorType, i as VendorInfoType, j as MyPendingVendorClaim, k as UserLicenceType, l as PostType, G as GameDocType, m as GameLeaderboard, n as CouponType, o as CouponTypeList } from '../global-DwPcHR4_.mjs';
6
6
  import { S as SafeUserType, R as RedeemRewardMutationResponse, b as ResourceByUser, U as UsersByPromoCode, c as SubscriptionStatusData, d as SubscriptionPlansResponse } from '../user-Ml-C8k8S.mjs';
7
- import { A as AuthMutationResponse, R as RefreshTokenMutationResponse, P as PartnerType, a as AdType, E as EnumAdStatus, b as AppSettingsType, S as SchoolType, c as SchoolReturnType } from '../ad-uqMx-9wk.mjs';
7
+ import { A as AuthMutationResponse, R as RefreshTokenMutationResponse, P as PartnerType, a as AdType, b as AdPlatform, E as EnumAdStatus, c as AppSettingsType, S as SchoolType, d as SchoolReturnType } from '../ad-DwFDtNp7.mjs';
8
8
  import { EnumEventDateStatus, EnumResourceType } from '../enums/index.mjs';
9
9
  import { B as BillingCatalogEntryType } from '../billingCatalog-DDAU9BWV.mjs';
10
10
  import { A as AffiliateType } from '../affiliate-6NsbC06m.mjs';
@@ -1012,7 +1012,7 @@ declare const useGetAd: (_id: string) => {
1012
1012
  ad: AdType;
1013
1013
  }>>;
1014
1014
  };
1015
- declare const useGetAdsByRegion: (region: string, status?: EnumAdStatus) => {
1015
+ declare const useGetAdsByRegion: (region: string, platform: AdPlatform, status?: EnumAdStatus) => {
1016
1016
  adsByRegion: AdType[];
1017
1017
  error: _apollo_client.ApolloError | undefined;
1018
1018
  loading: boolean;
@@ -1249,7 +1249,9 @@ declare const useUpdateGoogleImportedMarkets: () => {
1249
1249
  }>>;
1250
1250
  };
1251
1251
 
1252
- declare const useGetAppSettings: () => {
1252
+ declare const useGetAppSettings: ({ skip, }?: {
1253
+ skip?: boolean;
1254
+ }) => {
1253
1255
  appSettings: AppSettingsType | null;
1254
1256
  error: _apollo_client.ApolloError | undefined;
1255
1257
  loading: boolean;
@@ -4,7 +4,7 @@ import { DocumentNode } from 'graphql';
4
4
  import { A as AdminUpdateResourceType, C as ChatType, R as ReportChatUser, N as NotificationType, a as NotificationCount, b as ResourceActivityType } from '../resourceActivities-CJ2ivv01.js';
5
5
  import { M as MutationResponse, E as EventType, c as EventListItemType, d as EventInfoType, U as UseGetResourcesByRegionOptions, P as PosterUsageType, e as RelationType, f as ResourceConnectionsType, V as VendorClaimTokenValidation, g as UnregisteredVendorType, h as VendorType, i as VendorInfoType, j as MyPendingVendorClaim, k as UserLicenceType, l as PostType, G as GameDocType, m as GameLeaderboard, n as CouponType, o as CouponTypeList } from '../global-s3frnbGC.js';
6
6
  import { S as SafeUserType, R as RedeemRewardMutationResponse, b as ResourceByUser, U as UsersByPromoCode, c as SubscriptionStatusData, d as SubscriptionPlansResponse } from '../user-CteW0WdG.js';
7
- import { A as AuthMutationResponse, R as RefreshTokenMutationResponse, P as PartnerType, a as AdType, E as EnumAdStatus, b as AppSettingsType, S as SchoolType, c as SchoolReturnType } from '../ad-DtHc-l0P.js';
7
+ import { A as AuthMutationResponse, R as RefreshTokenMutationResponse, P as PartnerType, a as AdType, b as AdPlatform, E as EnumAdStatus, c as AppSettingsType, S as SchoolType, d as SchoolReturnType } from '../ad-CpsTouG6.js';
8
8
  import { EnumEventDateStatus, EnumResourceType } from '../enums/index.js';
9
9
  import { B as BillingCatalogEntryType } from '../billingCatalog-oWAfZX95.js';
10
10
  import { A as AffiliateType } from '../affiliate-CYnVduRf.js';
@@ -1012,7 +1012,7 @@ declare const useGetAd: (_id: string) => {
1012
1012
  ad: AdType;
1013
1013
  }>>;
1014
1014
  };
1015
- declare const useGetAdsByRegion: (region: string, status?: EnumAdStatus) => {
1015
+ declare const useGetAdsByRegion: (region: string, platform: AdPlatform, status?: EnumAdStatus) => {
1016
1016
  adsByRegion: AdType[];
1017
1017
  error: _apollo_client.ApolloError | undefined;
1018
1018
  loading: boolean;
@@ -1249,7 +1249,9 @@ declare const useUpdateGoogleImportedMarkets: () => {
1249
1249
  }>>;
1250
1250
  };
1251
1251
 
1252
- declare const useGetAppSettings: () => {
1252
+ declare const useGetAppSettings: ({ skip, }?: {
1253
+ skip?: boolean;
1254
+ }) => {
1253
1255
  appSettings: AppSettingsType | null;
1254
1256
  error: _apollo_client.ApolloError | undefined;
1255
1257
  loading: boolean;
@@ -163,7 +163,7 @@ import {
163
163
  useUpdateUser,
164
164
  useUpdateVendor,
165
165
  useUpdateVendorInfo
166
- } from "../chunk-DS2Y6BNU.mjs";
166
+ } from "../chunk-6HI3OSCZ.mjs";
167
167
  import {
168
168
  GET_EVENT,
169
169
  GET_EVENTS,
@@ -4864,8 +4864,12 @@ var GET_AD = import_client44.gql`
4864
4864
  ${AD_FIELDS_FRAGMENT}
4865
4865
  `;
4866
4866
  var GET_ADS_BY_REGION = import_client44.gql`
4867
- query getAdsByRegion($region: String!, $status: AdStatusTypeEnum) {
4868
- adsByRegion(region: $region, status: $status) {
4867
+ query getAdsByRegion(
4868
+ $region: String!
4869
+ $platform: String!
4870
+ $status: AdStatusTypeEnum
4871
+ ) {
4872
+ adsByRegion(region: $region, platform: $platform, status: $status) {
4869
4873
  ...AdFields
4870
4874
  }
4871
4875
  }
@@ -5351,6 +5355,10 @@ var import_client65 = require("@apollo/client");
5351
5355
  var APP_SETTINGS_FIELDS_FRAGMENT = import_client65.gql`
5352
5356
  fragment AppSettingsFields on AppSettingsType {
5353
5357
  _id
5358
+ adSettings {
5359
+ mobileDisplayEnabled
5360
+ webDisplayEnabled
5361
+ }
5354
5362
  appVersion
5355
5363
  createdAt
5356
5364
  isOfflineMode
@@ -6397,6 +6405,10 @@ var postSchema = yup8.object().shape({
6397
6405
  // src/yupSchema/appSettings.ts
6398
6406
  var yup9 = __toESM(require("yup"));
6399
6407
  var appSettingsSchema = yup9.object({
6408
+ adSettings: yup9.object({
6409
+ mobileDisplayEnabled: yup9.boolean().label("Mobile Ad Display").required("Mobile Ad Display is required"),
6410
+ webDisplayEnabled: yup9.boolean().label("Web Ad Display").required("Web Ad Display is required")
6411
+ }).label("Ad Settings").required("Ad Settings is required"),
6400
6412
  appVersion: yup9.string().trim().label("App Version").matches(
6401
6413
  /^\d+\.\d+\.\d+$/,
6402
6414
  "App Version must be in the format X.Y.Z (e.g. 1.12.50)"
@@ -7629,6 +7641,10 @@ var import_yup16 = require("@hookform/resolvers/yup");
7629
7641
  var import_react5 = __toESM(require("react"));
7630
7642
  var import_react_hook_form16 = require("react-hook-form");
7631
7643
  var defaultValues10 = {
7644
+ adSettings: {
7645
+ mobileDisplayEnabled: false,
7646
+ webDisplayEnabled: false
7647
+ },
7632
7648
  appVersion: "",
7633
7649
  isOfflineMode: false,
7634
7650
  minimumRedeemableAffiliatePoints: 0
@@ -7649,6 +7665,10 @@ function useAppSettingsForm(data) {
7649
7665
  import_react5.default.useEffect(() => {
7650
7666
  if (data) {
7651
7667
  reset({
7668
+ adSettings: {
7669
+ mobileDisplayEnabled: data.adSettings?.mobileDisplayEnabled ?? false,
7670
+ webDisplayEnabled: data.adSettings?.webDisplayEnabled ?? false
7671
+ },
7652
7672
  appVersion: data.appVersion,
7653
7673
  isOfflineMode: data.isOfflineMode,
7654
7674
  minimumRedeemableAffiliatePoints: data.minimumRedeemableAffiliatePoints
@@ -7657,10 +7677,16 @@ function useAppSettingsForm(data) {
7657
7677
  reset(defaultValues10);
7658
7678
  }
7659
7679
  }, [data]);
7660
- const { appVersion, isOfflineMode, minimumRedeemableAffiliatePoints } = getValues();
7680
+ const {
7681
+ adSettings,
7682
+ appVersion,
7683
+ isOfflineMode,
7684
+ minimumRedeemableAffiliatePoints
7685
+ } = getValues();
7661
7686
  return {
7662
7687
  control,
7663
7688
  fields: {
7689
+ adSettings,
7664
7690
  appVersion,
7665
7691
  isOfflineMode,
7666
7692
  minimumRedeemableAffiliatePoints