@timardex/cluemart-shared 4.0.1 → 4.0.3

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 (35) hide show
  1. package/dist/{ad-6bik9TAn.d.mts → ad-CGkhJPVn.d.mts} +14 -1
  2. package/dist/{ad-C2p52oCB.d.ts → ad-RIZX47MU.d.ts} +14 -1
  3. package/dist/{chunk-KY2FA6GK.mjs → chunk-2T2ZOW4M.mjs} +2 -2
  4. package/dist/{chunk-2P66EBGO.mjs → chunk-3F52E2FP.mjs} +59 -1
  5. package/dist/chunk-3F52E2FP.mjs.map +1 -0
  6. package/dist/{chunk-W5SSH3G4.mjs → chunk-7AWD25WF.mjs} +1 -1
  7. package/dist/chunk-7AWD25WF.mjs.map +1 -0
  8. package/dist/{chunk-5SMXMNL2.mjs → chunk-UMXMIDO6.mjs} +2 -2
  9. package/dist/formFields/index.mjs +3 -3
  10. package/dist/graphql/index.cjs +61 -0
  11. package/dist/graphql/index.cjs.map +1 -1
  12. package/dist/graphql/index.d.mts +19 -2
  13. package/dist/graphql/index.d.ts +19 -2
  14. package/dist/graphql/index.mjs +7 -1
  15. package/dist/hooks/index.cjs +27 -0
  16. package/dist/hooks/index.cjs.map +1 -1
  17. package/dist/hooks/index.d.mts +1 -1
  18. package/dist/hooks/index.d.ts +1 -1
  19. package/dist/hooks/index.mjs +4 -4
  20. package/dist/index.cjs +61 -0
  21. package/dist/index.cjs.map +1 -1
  22. package/dist/index.d.mts +31 -1
  23. package/dist/index.d.ts +31 -1
  24. package/dist/index.mjs +58 -0
  25. package/dist/index.mjs.map +1 -1
  26. package/dist/types/index.cjs.map +1 -1
  27. package/dist/types/index.d.mts +1 -1
  28. package/dist/types/index.d.ts +1 -1
  29. package/dist/types/index.mjs +1 -1
  30. package/dist/utils/index.mjs +2 -2
  31. package/package.json +1 -1
  32. package/dist/chunk-2P66EBGO.mjs.map +0 -1
  33. package/dist/chunk-W5SSH3G4.mjs.map +0 -1
  34. /package/dist/{chunk-KY2FA6GK.mjs.map → chunk-2T2ZOW4M.mjs.map} +0 -0
  35. /package/dist/{chunk-5SMXMNL2.mjs.map → chunk-UMXMIDO6.mjs.map} +0 -0
@@ -265,5 +265,18 @@ interface AdMetricsType {
265
265
  resource: AdMetricsResourceType[];
266
266
  updatedAt: Date | null;
267
267
  }
268
+ type ResourceAdMetricsBucketType = {
269
+ clicks: number;
270
+ date: Date;
271
+ impressions: number;
272
+ platform: EnumAdPlatform;
273
+ };
274
+ type ResourceAdMetricsType = {
275
+ buckets: ResourceAdMetricsBucketType[];
276
+ totals: {
277
+ clicks: number;
278
+ impressions: number;
279
+ };
280
+ };
268
281
 
269
- export { type StartImpersonationPayloadType as $, type AuthHandoffTokenMutationResponse as A, type AdSettingsType as B, type CreateLoginFormData as C, type AuthHandoffTokenPayloadType as D, EnumAdShowOn as E, type AuthPayloadType as F, type CreateAdFormData as G, EnumAdApprovalStatus as H, EnumAdBookingSlotKind as I, EnumAdBookingState as J, EnumAdPaymentStatus as K, EnumAdStatus as L, EnumAdStyle as M, EnumAdType as N, EnumVerificationType as O, type PartnerType as P, type LoginFormData as Q, type RefreshImpersonationMutationResponse as R, type StartImpersonationMutationResponse as S, type MarketingMaterialRequestInputType as T, type PosterInputType as U, type RefreshTokenPayloadType as V, type RegisterFormData as W, type RequestPasswordResetFormData as X, type ResetPasswordFormData as Y, type SchoolCampaignType as Z, type SchoolRegisteredUserType as _, type AuthMutationResponse as a, type ValidateVerificationTokenFormData as a0, type RefreshTokenMutationResponse as b, EnumAdPlatform as c, type AdType as d, type AppSettingsType as e, type SchoolType as f, type SchoolReturnType as g, type CreateRegisterFormData as h, type CreateRequestPasswordResetFormData as i, type CreateValidateVerificationTokenFormData as j, type CreateResetPasswordFormData as k, type PartnerFormData as l, type AdFormData as m, type CreateAdFormState as n, type CreatePartnerFormData as o, type AppSettingsFormData as p, type CreateAppSettingsFormData as q, type SchoolFormData as r, type CreateSchoolFormData as s, type AdBookingType as t, type AdDailyPriceType as u, type AdFormState as v, type AdMetricsResourceType as w, type AdMetricsType as x, type AdResource as y, type AdSettingsFormData as z };
282
+ export { type SchoolCampaignType as $, type AuthHandoffTokenMutationResponse as A, type AdSettingsFormData as B, type CreateLoginFormData as C, type AdSettingsType as D, EnumAdShowOn as E, type AuthHandoffTokenPayloadType as F, type AuthPayloadType as G, type CreateAdFormData as H, EnumAdApprovalStatus as I, EnumAdBookingSlotKind as J, EnumAdBookingState as K, EnumAdPaymentStatus as L, EnumAdStatus as M, EnumAdStyle as N, EnumAdType as O, type PartnerType as P, EnumVerificationType as Q, type RefreshImpersonationMutationResponse as R, type StartImpersonationMutationResponse as S, type LoginFormData as T, type MarketingMaterialRequestInputType as U, type PosterInputType as V, type RefreshTokenPayloadType as W, type RegisterFormData as X, type RequestPasswordResetFormData as Y, type ResetPasswordFormData as Z, type ResourceAdMetricsBucketType as _, type AuthMutationResponse as a, type SchoolRegisteredUserType as a0, type StartImpersonationPayloadType as a1, type ValidateVerificationTokenFormData as a2, type RefreshTokenMutationResponse as b, EnumAdPlatform as c, type AdType as d, type ResourceAdMetricsType as e, type AppSettingsType as f, type SchoolType as g, type SchoolReturnType as h, type CreateRegisterFormData as i, type CreateRequestPasswordResetFormData as j, type CreateValidateVerificationTokenFormData as k, type CreateResetPasswordFormData as l, type PartnerFormData as m, type AdFormData as n, type CreateAdFormState as o, type CreatePartnerFormData as p, type AppSettingsFormData as q, type CreateAppSettingsFormData as r, type SchoolFormData as s, type CreateSchoolFormData as t, type AdBookingType as u, type AdDailyPriceType as v, type AdFormState as w, type AdMetricsResourceType as x, type AdMetricsType as y, type AdResource as z };
@@ -265,5 +265,18 @@ interface AdMetricsType {
265
265
  resource: AdMetricsResourceType[];
266
266
  updatedAt: Date | null;
267
267
  }
268
+ type ResourceAdMetricsBucketType = {
269
+ clicks: number;
270
+ date: Date;
271
+ impressions: number;
272
+ platform: EnumAdPlatform;
273
+ };
274
+ type ResourceAdMetricsType = {
275
+ buckets: ResourceAdMetricsBucketType[];
276
+ totals: {
277
+ clicks: number;
278
+ impressions: number;
279
+ };
280
+ };
268
281
 
269
- export { type StartImpersonationPayloadType as $, type AuthHandoffTokenMutationResponse as A, type AdSettingsType as B, type CreateLoginFormData as C, type AuthHandoffTokenPayloadType as D, EnumAdShowOn as E, type AuthPayloadType as F, type CreateAdFormData as G, EnumAdApprovalStatus as H, EnumAdBookingSlotKind as I, EnumAdBookingState as J, EnumAdPaymentStatus as K, EnumAdStatus as L, EnumAdStyle as M, EnumAdType as N, EnumVerificationType as O, type PartnerType as P, type LoginFormData as Q, type RefreshImpersonationMutationResponse as R, type StartImpersonationMutationResponse as S, type MarketingMaterialRequestInputType as T, type PosterInputType as U, type RefreshTokenPayloadType as V, type RegisterFormData as W, type RequestPasswordResetFormData as X, type ResetPasswordFormData as Y, type SchoolCampaignType as Z, type SchoolRegisteredUserType as _, type AuthMutationResponse as a, type ValidateVerificationTokenFormData as a0, type RefreshTokenMutationResponse as b, EnumAdPlatform as c, type AdType as d, type AppSettingsType as e, type SchoolType as f, type SchoolReturnType as g, type CreateRegisterFormData as h, type CreateRequestPasswordResetFormData as i, type CreateValidateVerificationTokenFormData as j, type CreateResetPasswordFormData as k, type PartnerFormData as l, type AdFormData as m, type CreateAdFormState as n, type CreatePartnerFormData as o, type AppSettingsFormData as p, type CreateAppSettingsFormData as q, type SchoolFormData as r, type CreateSchoolFormData as s, type AdBookingType as t, type AdDailyPriceType as u, type AdFormState as v, type AdMetricsResourceType as w, type AdMetricsType as x, type AdResource as y, type AdSettingsFormData as z };
282
+ export { type SchoolCampaignType as $, type AuthHandoffTokenMutationResponse as A, type AdSettingsFormData as B, type CreateLoginFormData as C, type AdSettingsType as D, EnumAdShowOn as E, type AuthHandoffTokenPayloadType as F, type AuthPayloadType as G, type CreateAdFormData as H, EnumAdApprovalStatus as I, EnumAdBookingSlotKind as J, EnumAdBookingState as K, EnumAdPaymentStatus as L, EnumAdStatus as M, EnumAdStyle as N, EnumAdType as O, type PartnerType as P, EnumVerificationType as Q, type RefreshImpersonationMutationResponse as R, type StartImpersonationMutationResponse as S, type LoginFormData as T, type MarketingMaterialRequestInputType as U, type PosterInputType as V, type RefreshTokenPayloadType as W, type RegisterFormData as X, type RequestPasswordResetFormData as Y, type ResetPasswordFormData as Z, type ResourceAdMetricsBucketType as _, type AuthMutationResponse as a, type SchoolRegisteredUserType as a0, type StartImpersonationPayloadType as a1, type ValidateVerificationTokenFormData as a2, type RefreshTokenMutationResponse as b, EnumAdPlatform as c, type AdType as d, type ResourceAdMetricsType as e, type AppSettingsType as f, type SchoolType as g, type SchoolReturnType as h, type CreateRegisterFormData as i, type CreateRequestPasswordResetFormData as j, type CreateValidateVerificationTokenFormData as k, type CreateResetPasswordFormData as l, type PartnerFormData as m, type AdFormData as n, type CreateAdFormState as o, type CreatePartnerFormData as p, type AppSettingsFormData as q, type CreateAppSettingsFormData as r, type SchoolFormData as s, type CreateSchoolFormData as t, type AdBookingType as u, type AdDailyPriceType as v, type AdFormState as w, type AdMetricsResourceType as x, type AdMetricsType as y, type AdResource as z };
@@ -11,7 +11,7 @@ import {
11
11
  import {
12
12
  PROMO_CODE_PREFIX,
13
13
  gameScreenIdentifierList
14
- } from "./chunk-W5SSH3G4.mjs";
14
+ } from "./chunk-7AWD25WF.mjs";
15
15
  import {
16
16
  isTransientNetworkError
17
17
  } from "./chunk-RAYUJODN.mjs";
@@ -1935,4 +1935,4 @@ export {
1935
1935
  toUserFacingErrorMessage,
1936
1936
  getErrorMessage
1937
1937
  };
1938
- //# sourceMappingURL=chunk-KY2FA6GK.mjs.map
1938
+ //# sourceMappingURL=chunk-2T2ZOW4M.mjs.map
@@ -2264,6 +2264,14 @@ var GET_ADS_BY_REGION = gql20`
2264
2264
  }
2265
2265
  ${AD_FIELDS_FRAGMENT}
2266
2266
  `;
2267
+ var GET_RESOURCE_ADS = gql20`
2268
+ query getResourceAds($resourceId: ID!, $resourceType: ResourceTypeEnum!) {
2269
+ resourceAds(resourceId: $resourceId, resourceType: $resourceType) {
2270
+ ...AdFields
2271
+ }
2272
+ }
2273
+ ${AD_FIELDS_FRAGMENT}
2274
+ `;
2267
2275
 
2268
2276
  // src/graphql/mutations/ad.ts
2269
2277
  var CREATE_AD_MUTATION = gql21`
@@ -2379,6 +2387,25 @@ var GET_AD_METRIC_TOTALS = gql22`
2379
2387
  }
2380
2388
  }
2381
2389
  `;
2390
+ var GET_RESOURCE_AD_METRICS = gql22`
2391
+ query getResourceAdMetrics(
2392
+ $resourceId: ID!
2393
+ $resourceType: ResourceTypeEnum!
2394
+ ) {
2395
+ resourceAdMetrics(resourceId: $resourceId, resourceType: $resourceType) {
2396
+ buckets {
2397
+ clicks
2398
+ date
2399
+ impressions
2400
+ platform
2401
+ }
2402
+ totals {
2403
+ clicks
2404
+ impressions
2405
+ }
2406
+ }
2407
+ }
2408
+ `;
2382
2409
 
2383
2410
  // src/graphql/mutations/adBooking.ts
2384
2411
  var CREATE_AD_CHECKOUT_MUTATION = gql23`
@@ -2684,6 +2711,34 @@ var useGetAdMetricTotals = (filter, skip = false) => {
2684
2711
  refetch
2685
2712
  };
2686
2713
  };
2714
+ var useGetResourceAdMetrics = (resourceId, resourceType) => {
2715
+ const skip = !resourceId || resourceId === "" || !resourceType;
2716
+ const { data, loading, error, refetch } = useQuery6(GET_RESOURCE_AD_METRICS, {
2717
+ fetchPolicy: "no-cache",
2718
+ skip,
2719
+ variables: skip ? void 0 : { resourceId, resourceType }
2720
+ });
2721
+ return {
2722
+ error,
2723
+ loading,
2724
+ refetch,
2725
+ resourceAdMetrics: data?.resourceAdMetrics ?? null
2726
+ };
2727
+ };
2728
+ var useGetResourceAds = (resourceId, resourceType) => {
2729
+ const skip = !resourceId || resourceId === "" || !resourceType;
2730
+ const { data, loading, error, refetch } = useQuery6(GET_RESOURCE_ADS, {
2731
+ fetchPolicy: "no-cache",
2732
+ skip,
2733
+ variables: skip ? void 0 : { resourceId, resourceType }
2734
+ });
2735
+ return {
2736
+ ads: data?.resourceAds ?? [],
2737
+ error,
2738
+ loading,
2739
+ refetch
2740
+ };
2741
+ };
2687
2742
 
2688
2743
  // src/graphql/hooks/resourceActivities/hooksMutation.ts
2689
2744
  import { useMutation as useMutation12 } from "@apollo/client";
@@ -4491,6 +4546,7 @@ export {
4491
4546
  GET_AD_DAILY_PRICES,
4492
4547
  GET_AD_SETTINGS,
4493
4548
  GET_AD_METRIC_TOTALS,
4549
+ GET_RESOURCE_AD_METRICS,
4494
4550
  CREATE_AD_CHECKOUT_MUTATION,
4495
4551
  APPROVE_AD_BOOKING_MUTATION,
4496
4552
  UPDATE_AD_DAILY_PRICE_MUTATION,
@@ -4507,6 +4563,8 @@ export {
4507
4563
  useGetAd,
4508
4564
  useGetAdsByRegion,
4509
4565
  useGetAdMetricTotals,
4566
+ useGetResourceAdMetrics,
4567
+ useGetResourceAds,
4510
4568
  useCreateResourceActivity,
4511
4569
  useGetResourceActivity,
4512
4570
  useCreateCheckoutSession,
@@ -4562,4 +4620,4 @@ export {
4562
4620
  useGetCoupon,
4563
4621
  usePaginatedList
4564
4622
  };
4565
- //# sourceMappingURL=chunk-2P66EBGO.mjs.map
4623
+ //# sourceMappingURL=chunk-3F52E2FP.mjs.map