@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.
- package/dist/{ad-6bik9TAn.d.mts → ad-CGkhJPVn.d.mts} +14 -1
- package/dist/{ad-C2p52oCB.d.ts → ad-RIZX47MU.d.ts} +14 -1
- package/dist/{chunk-KY2FA6GK.mjs → chunk-2T2ZOW4M.mjs} +2 -2
- package/dist/{chunk-2P66EBGO.mjs → chunk-3F52E2FP.mjs} +59 -1
- package/dist/chunk-3F52E2FP.mjs.map +1 -0
- package/dist/{chunk-W5SSH3G4.mjs → chunk-7AWD25WF.mjs} +1 -1
- package/dist/chunk-7AWD25WF.mjs.map +1 -0
- package/dist/{chunk-5SMXMNL2.mjs → chunk-UMXMIDO6.mjs} +2 -2
- package/dist/formFields/index.mjs +3 -3
- package/dist/graphql/index.cjs +61 -0
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +19 -2
- package/dist/graphql/index.d.ts +19 -2
- package/dist/graphql/index.mjs +7 -1
- package/dist/hooks/index.cjs +27 -0
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.mts +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.mjs +4 -4
- package/dist/index.cjs +61 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +31 -1
- package/dist/index.d.ts +31 -1
- package/dist/index.mjs +58 -0
- package/dist/index.mjs.map +1 -1
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.mjs +1 -1
- package/dist/utils/index.mjs +2 -2
- package/package.json +1 -1
- package/dist/chunk-2P66EBGO.mjs.map +0 -1
- package/dist/chunk-W5SSH3G4.mjs.map +0 -1
- /package/dist/{chunk-KY2FA6GK.mjs.map → chunk-2T2ZOW4M.mjs.map} +0 -0
- /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
|
|
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
|
|
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-
|
|
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-
|
|
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-
|
|
4623
|
+
//# sourceMappingURL=chunk-3F52E2FP.mjs.map
|