@timardex/cluemart-shared 2.0.13 → 2.0.14

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.
@@ -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, E as EnumAdStatus, b as AppSettingsType, S as SchoolType, c as SchoolReturnType } from '../ad-Dm8ht5tc.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';
@@ -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, E as EnumAdStatus, b as AppSettingsType, S as SchoolType, c as SchoolReturnType } from '../ad-C6QfVk6L.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';
@@ -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-BO7IQ33V.mjs";
167
167
  import {
168
168
  GET_EVENT,
169
169
  GET_EVENTS,
@@ -5351,6 +5351,10 @@ var import_client65 = require("@apollo/client");
5351
5351
  var APP_SETTINGS_FIELDS_FRAGMENT = import_client65.gql`
5352
5352
  fragment AppSettingsFields on AppSettingsType {
5353
5353
  _id
5354
+ adSettings {
5355
+ mobileDisplayEnabled
5356
+ webDisplayEnabled
5357
+ }
5354
5358
  appVersion
5355
5359
  createdAt
5356
5360
  isOfflineMode
@@ -6397,6 +6401,10 @@ var postSchema = yup8.object().shape({
6397
6401
  // src/yupSchema/appSettings.ts
6398
6402
  var yup9 = __toESM(require("yup"));
6399
6403
  var appSettingsSchema = yup9.object({
6404
+ adSettings: yup9.object({
6405
+ mobileDisplayEnabled: yup9.boolean().label("Mobile Ad Display").required("Mobile Ad Display is required"),
6406
+ webDisplayEnabled: yup9.boolean().label("Web Ad Display").required("Web Ad Display is required")
6407
+ }).label("Ad Settings").required("Ad Settings is required"),
6400
6408
  appVersion: yup9.string().trim().label("App Version").matches(
6401
6409
  /^\d+\.\d+\.\d+$/,
6402
6410
  "App Version must be in the format X.Y.Z (e.g. 1.12.50)"
@@ -7629,6 +7637,10 @@ var import_yup16 = require("@hookform/resolvers/yup");
7629
7637
  var import_react5 = __toESM(require("react"));
7630
7638
  var import_react_hook_form16 = require("react-hook-form");
7631
7639
  var defaultValues10 = {
7640
+ adSettings: {
7641
+ mobileDisplayEnabled: false,
7642
+ webDisplayEnabled: false
7643
+ },
7632
7644
  appVersion: "",
7633
7645
  isOfflineMode: false,
7634
7646
  minimumRedeemableAffiliatePoints: 0
@@ -7649,6 +7661,10 @@ function useAppSettingsForm(data) {
7649
7661
  import_react5.default.useEffect(() => {
7650
7662
  if (data) {
7651
7663
  reset({
7664
+ adSettings: {
7665
+ mobileDisplayEnabled: data.adSettings?.mobileDisplayEnabled ?? false,
7666
+ webDisplayEnabled: data.adSettings?.webDisplayEnabled ?? false
7667
+ },
7652
7668
  appVersion: data.appVersion,
7653
7669
  isOfflineMode: data.isOfflineMode,
7654
7670
  minimumRedeemableAffiliatePoints: data.minimumRedeemableAffiliatePoints
@@ -7657,10 +7673,16 @@ function useAppSettingsForm(data) {
7657
7673
  reset(defaultValues10);
7658
7674
  }
7659
7675
  }, [data]);
7660
- const { appVersion, isOfflineMode, minimumRedeemableAffiliatePoints } = getValues();
7676
+ const {
7677
+ adSettings,
7678
+ appVersion,
7679
+ isOfflineMode,
7680
+ minimumRedeemableAffiliatePoints
7681
+ } = getValues();
7661
7682
  return {
7662
7683
  control,
7663
7684
  fields: {
7685
+ adSettings,
7664
7686
  appVersion,
7665
7687
  isOfflineMode,
7666
7688
  minimumRedeemableAffiliatePoints