@timardex/cluemart-shared 2.4.0 → 2.5.1

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 (59) hide show
  1. package/dist/{ad-DRI2CIzV.d.ts → ad-C7GbDyUi.d.ts} +1 -1
  2. package/dist/{ad-BSyVGv8q.d.mts → ad-DB9gvcJW.d.mts} +1 -1
  3. package/dist/auth/index.mjs +1 -1
  4. package/dist/{chunk-J72IMZ6E.mjs → chunk-4CQLKIQ6.mjs} +1 -1
  5. package/dist/chunk-4CQLKIQ6.mjs.map +1 -0
  6. package/dist/{chunk-XGGFB7HY.mjs → chunk-A52C6JDT.mjs} +2 -2
  7. package/dist/chunk-A52C6JDT.mjs.map +1 -0
  8. package/dist/{chunk-LHKJJ7SO.mjs → chunk-CQ26N3W6.mjs} +2 -2
  9. package/dist/{chunk-LEAXY4DI.mjs → chunk-H6HM2FOZ.mjs} +3 -3
  10. package/dist/{chunk-ZECVZFK3.mjs → chunk-NEOBS55J.mjs} +4 -3
  11. package/dist/{chunk-ZECVZFK3.mjs.map → chunk-NEOBS55J.mjs.map} +1 -1
  12. package/dist/{chunk-2RHUGVV3.mjs → chunk-WOBG6I4T.mjs} +175 -12
  13. package/dist/chunk-WOBG6I4T.mjs.map +1 -0
  14. package/dist/chunk-YCUKTVVA.mjs +69 -0
  15. package/dist/chunk-YCUKTVVA.mjs.map +1 -0
  16. package/dist/enums/index.cjs +1 -1
  17. package/dist/enums/index.cjs.map +1 -1
  18. package/dist/enums/index.d.mts +2 -2
  19. package/dist/enums/index.d.ts +2 -2
  20. package/dist/enums/index.mjs +1 -1
  21. package/dist/formFields/index.cjs +2 -1
  22. package/dist/formFields/index.cjs.map +1 -1
  23. package/dist/formFields/index.mjs +5 -5
  24. package/dist/graphql/index.cjs +193 -13
  25. package/dist/graphql/index.cjs.map +1 -1
  26. package/dist/graphql/index.d.mts +46 -3
  27. package/dist/graphql/index.d.ts +46 -3
  28. package/dist/graphql/index.mjs +9 -3
  29. package/dist/hooks/index.cjs +25 -14
  30. package/dist/hooks/index.cjs.map +1 -1
  31. package/dist/hooks/index.d.mts +1 -1
  32. package/dist/hooks/index.d.ts +1 -1
  33. package/dist/hooks/index.mjs +7 -7
  34. package/dist/index.cjs +211 -14
  35. package/dist/index.cjs.map +1 -1
  36. package/dist/index.d.mts +69 -9
  37. package/dist/index.d.ts +69 -9
  38. package/dist/index.mjs +198 -10
  39. package/dist/index.mjs.map +1 -1
  40. package/dist/region/index.cjs.map +1 -1
  41. package/dist/region/index.mjs +1 -1
  42. package/dist/sharing/index.cjs.map +1 -1
  43. package/dist/sharing/index.mjs +3 -3
  44. package/dist/types/index.d.mts +1 -1
  45. package/dist/types/index.d.ts +1 -1
  46. package/dist/types/index.mjs +1 -1
  47. package/dist/utils/index.cjs +36 -1
  48. package/dist/utils/index.cjs.map +1 -1
  49. package/dist/utils/index.d.mts +23 -6
  50. package/dist/utils/index.d.ts +23 -6
  51. package/dist/utils/index.mjs +17 -5
  52. package/package.json +1 -1
  53. package/dist/chunk-2RHUGVV3.mjs.map +0 -1
  54. package/dist/chunk-7DQBUZXY.mjs +0 -41
  55. package/dist/chunk-7DQBUZXY.mjs.map +0 -1
  56. package/dist/chunk-J72IMZ6E.mjs.map +0 -1
  57. package/dist/chunk-XGGFB7HY.mjs.map +0 -1
  58. /package/dist/{chunk-LHKJJ7SO.mjs.map → chunk-CQ26N3W6.mjs.map} +0 -0
  59. /package/dist/{chunk-LEAXY4DI.mjs.map → chunk-H6HM2FOZ.mjs.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import { L as LocationType, r as VendorFormData, s as CreateVendorFormData, t as VendorInfoFormData, u as CreateVendorInfoFormData, v as UnregisteredVendorFormData, w as CreateUnregisteredVendorFormData, x as EventFormData, y as CreateEventFormData, z as EventInfoFormData, A as CreateEventInfoFormData, B as BaseResourceTypeFormData, D as PostFormData, H as CreatePostFormData, I as CouponDefaultsFormData, J as CreateCouponFormData } from '../global-EGbrTMk6.mjs';
2
2
  import { e as UserFormData, C as CreateUserFormData } from '../user-Znc91Cw5.mjs';
3
- import { C as CreateLoginFormData, g as CreateRegisterFormData, h as CreateRequestPasswordResetFormData, i as CreateValidateVerificationTokenFormData, j as CreateResetPasswordFormData, k as PartnerFormData, l as AdFormData, m as CreateAdFormState, n as CreatePartnerFormData, o as AppSettingsFormData, p as CreateAppSettingsFormData, q as SchoolFormData, r as CreateSchoolFormData } from '../ad-BSyVGv8q.mjs';
3
+ import { C as CreateLoginFormData, g as CreateRegisterFormData, h as CreateRequestPasswordResetFormData, i as CreateValidateVerificationTokenFormData, j as CreateResetPasswordFormData, k as PartnerFormData, l as AdFormData, m as CreateAdFormState, n as CreatePartnerFormData, o as AppSettingsFormData, p as CreateAppSettingsFormData, q as SchoolFormData, r as CreateSchoolFormData } from '../ad-DB9gvcJW.mjs';
4
4
  import { a as AffiliateFormData, A as AffiliateType, C as CreateAffiliateFormData } from '../affiliate-DJhVZJ2h.mjs';
5
5
  import { C as ContactUsFormData, a as CreateContactUsFormData } from '../contactUs-BDJutwcx.mjs';
6
6
  import 'react-hook-form';
@@ -1,6 +1,6 @@
1
1
  import { L as LocationType, r as VendorFormData, s as CreateVendorFormData, t as VendorInfoFormData, u as CreateVendorInfoFormData, v as UnregisteredVendorFormData, w as CreateUnregisteredVendorFormData, x as EventFormData, y as CreateEventFormData, z as EventInfoFormData, A as CreateEventInfoFormData, B as BaseResourceTypeFormData, D as PostFormData, H as CreatePostFormData, I as CouponDefaultsFormData, J as CreateCouponFormData } from '../global-LtQJ2t6c.js';
2
2
  import { e as UserFormData, C as CreateUserFormData } from '../user-GnrqZmZP.js';
3
- import { C as CreateLoginFormData, g as CreateRegisterFormData, h as CreateRequestPasswordResetFormData, i as CreateValidateVerificationTokenFormData, j as CreateResetPasswordFormData, k as PartnerFormData, l as AdFormData, m as CreateAdFormState, n as CreatePartnerFormData, o as AppSettingsFormData, p as CreateAppSettingsFormData, q as SchoolFormData, r as CreateSchoolFormData } from '../ad-DRI2CIzV.js';
3
+ import { C as CreateLoginFormData, g as CreateRegisterFormData, h as CreateRequestPasswordResetFormData, i as CreateValidateVerificationTokenFormData, j as CreateResetPasswordFormData, k as PartnerFormData, l as AdFormData, m as CreateAdFormState, n as CreatePartnerFormData, o as AppSettingsFormData, p as CreateAppSettingsFormData, q as SchoolFormData, r as CreateSchoolFormData } from '../ad-C7GbDyUi.js';
4
4
  import { a as AffiliateFormData, A as AffiliateType, C as CreateAffiliateFormData } from '../affiliate-DuDoOxK_.js';
5
5
  import { C as ContactUsFormData, a as CreateContactUsFormData } from '../contactUs-6b5g9DV-.js';
6
6
  import 'react-hook-form';
@@ -1,18 +1,18 @@
1
- import "../chunk-LHKJJ7SO.mjs";
1
+ import "../chunk-CQ26N3W6.mjs";
2
2
  import "../chunk-VA5YN2K3.mjs";
3
3
  import "../chunk-VPANTTZI.mjs";
4
4
  import "../chunk-DWO35OY4.mjs";
5
- import "../chunk-LEAXY4DI.mjs";
5
+ import "../chunk-H6HM2FOZ.mjs";
6
6
  import {
7
7
  SCHOOL_MIN_STUDENT_COUNT,
8
8
  isValidIrdNumber,
9
9
  normalizeUrl
10
- } from "../chunk-ZECVZFK3.mjs";
10
+ } from "../chunk-NEOBS55J.mjs";
11
11
  import "../chunk-RE4NZPYY.mjs";
12
12
  import {
13
13
  dateFormat,
14
14
  timeFormat
15
- } from "../chunk-J72IMZ6E.mjs";
15
+ } from "../chunk-4CQLKIQ6.mjs";
16
16
  import {
17
17
  EnumAdShowOn,
18
18
  EnumAdStatus,
@@ -24,9 +24,9 @@ import {
24
24
  } from "../chunk-WWAHS5R2.mjs";
25
25
  import "../chunk-RAYUJODN.mjs";
26
26
  import "../chunk-DQ7ZHIXW.mjs";
27
- import "../chunk-2RHUGVV3.mjs";
27
+ import "../chunk-WOBG6I4T.mjs";
28
28
  import "../chunk-TKSBCN3N.mjs";
29
- import "../chunk-7DQBUZXY.mjs";
29
+ import "../chunk-YCUKTVVA.mjs";
30
30
  import {
31
31
  EnumEventDateStatus,
32
32
  EnumEventType,
@@ -36,7 +36,7 @@ import {
36
36
  EnumResourceType,
37
37
  EnumSocialMedia,
38
38
  EnumVendorType
39
- } from "../chunk-XGGFB7HY.mjs";
39
+ } from "../chunk-A52C6JDT.mjs";
40
40
  import "../chunk-NPFJ2CN2.mjs";
41
41
 
42
42
  // src/hooks/useLocationSearch.ts
package/dist/index.cjs CHANGED
@@ -34,6 +34,8 @@ __export(index_exports, {
34
34
  ADMIN_APP_ROLES: () => ADMIN_APP_ROLES,
35
35
  ADMIN_DASHBOARD_CONTEXTS: () => ADMIN_DASHBOARD_CONTEXTS,
36
36
  AD_BOOKING_FIELDS_FRAGMENT: () => AD_BOOKING_FIELDS_FRAGMENT,
37
+ AD_METRIC_IMPRESSION_RETRY_DELAY_MS: () => AD_METRIC_IMPRESSION_RETRY_DELAY_MS,
38
+ AD_METRIC_ROTATION_INTERVAL_MS: () => AD_METRIC_ROTATION_INTERVAL_MS,
37
39
  AFFILIATE_PARTICIPANT_TYPE_LABELS: () => AFFILIATE_PARTICIPANT_TYPE_LABELS,
38
40
  AFFILIATE_REWARDS: () => AFFILIATE_REWARDS,
39
41
  ANDROID_URL: () => ANDROID_URL,
@@ -97,6 +99,7 @@ __export(index_exports, {
97
99
  FUTURE_EVENT_DATE_STATUSES: () => FUTURE_EVENT_DATE_STATUSES,
98
100
  GET_AD_BOOKING: () => GET_AD_BOOKING,
99
101
  GET_AD_DAILY_PRICES: () => GET_AD_DAILY_PRICES,
102
+ GET_AD_METRIC_TOTALS: () => GET_AD_METRIC_TOTALS,
100
103
  GET_AD_SETTINGS: () => GET_AD_SETTINGS,
101
104
  GET_EVENT: () => GET_EVENT,
102
105
  GET_EVENTS: () => GET_EVENTS,
@@ -190,6 +193,7 @@ __export(index_exports, {
190
193
  badges: () => badges,
191
194
  bankAccountDetailsFields: () => bankAccountDetailsFields,
192
195
  billingCatalogDefinitionMatches: () => billingCatalogDefinitionMatches,
196
+ buildAdMetricSlotKey: () => buildAdMetricSlotKey,
193
197
  buildApplicationShareDescription: () => buildApplicationShareDescription,
194
198
  buildCalendarSheetContentData: () => buildCalendarSheetContentData,
195
199
  buildInvitationShareDescription: () => buildInvitationShareDescription,
@@ -262,6 +266,9 @@ __export(index_exports, {
262
266
  futureTimePeriods: () => futureTimePeriods,
263
267
  gameScreenIdentifierList: () => gameScreenIdentifierList,
264
268
  gameTypeToDisplayName: () => gameTypeToDisplayName,
269
+ generateAdClickId: () => generateAdClickId,
270
+ getAdMetricRotationIndex: () => getAdMetricRotationIndex,
271
+ getAdMetricRotationSlot: () => getAdMetricRotationSlot,
265
272
  getAllowedEventDateStatuses: () => getAllowedEventDateStatuses,
266
273
  getBillingCatalogKeyForSelection: () => getBillingCatalogKeyForSelection,
267
274
  getCurrentAndFutureDates: () => getCurrentAndFutureDates,
@@ -376,6 +383,7 @@ __export(index_exports, {
376
383
  truncateText: () => truncateText,
377
384
  updateSingleDateTimeStatus: () => updateSingleDateTimeStatus,
378
385
  useActivateVendorClaim: () => useActivateVendorClaim,
386
+ useAdMetricsReporter: () => useAdMetricsReporter,
379
387
  useAddParticipantToChat: () => useAddParticipantToChat,
380
388
  useAddUserFavouriteResource: () => useAddUserFavouriteResource,
381
389
  useAddUserGoingResource: () => useAddUserGoingResource,
@@ -426,6 +434,7 @@ __export(index_exports, {
426
434
  useDeleteVendor: () => useDeleteVendor,
427
435
  useEndImpersonation: () => useEndImpersonation,
428
436
  useGetAd: () => useGetAd,
437
+ useGetAdMetricTotals: () => useGetAdMetricTotals,
429
438
  useGetAds: () => useGetAds,
430
439
  useGetAdsByRegion: () => useGetAdsByRegion,
431
440
  useGetAffiliate: () => useGetAffiliate,
@@ -560,12 +569,12 @@ module.exports = __toCommonJS(index_exports);
560
569
  // src/enums/index.ts
561
570
  var EnumInviteStatus = /* @__PURE__ */ ((EnumInviteStatus2) => {
562
571
  EnumInviteStatus2["ACCEPTED"] = "Accepted";
572
+ EnumInviteStatus2["CANCELED"] = "Canceled";
563
573
  EnumInviteStatus2["COMPLETED"] = "Completed";
564
574
  EnumInviteStatus2["EXPIRED"] = "Expired";
565
575
  EnumInviteStatus2["NO_STATUS"] = "No_Status";
566
576
  EnumInviteStatus2["PENDING"] = "Pending";
567
577
  EnumInviteStatus2["REJECTED"] = "Rejected";
568
- EnumInviteStatus2["UNAVAILABLE"] = "Unavailable";
569
578
  return EnumInviteStatus2;
570
579
  })(EnumInviteStatus || {});
571
580
  var EnumChatReportReason = /* @__PURE__ */ ((EnumChatReportReason2) => {
@@ -3433,6 +3442,28 @@ function isTransientNetworkError(err) {
3433
3442
  return TRANSIENT_NETWORK_PATTERNS.some((pattern) => pattern.test(message));
3434
3443
  }
3435
3444
 
3445
+ // src/utils/adMetrics.ts
3446
+ var AD_METRIC_ROTATION_INTERVAL_MS = 8e3;
3447
+ var AD_METRIC_IMPRESSION_RETRY_DELAY_MS = 1e3;
3448
+ function getAdMetricRotationSlot(epochMilliseconds) {
3449
+ return Math.floor(epochMilliseconds / AD_METRIC_ROTATION_INTERVAL_MS);
3450
+ }
3451
+ function getAdMetricRotationIndex(epochMilliseconds, count) {
3452
+ if (count <= 0) return 0;
3453
+ return getAdMetricRotationSlot(epochMilliseconds) % count;
3454
+ }
3455
+ function buildAdMetricSlotKey(adId, placement, slot) {
3456
+ return `${adId}:${placement}:${slot}`;
3457
+ }
3458
+ function generateAdClickId() {
3459
+ const cryptoApi = globalThis.crypto;
3460
+ if (typeof cryptoApi?.randomUUID === "function") {
3461
+ return cryptoApi.randomUUID();
3462
+ }
3463
+ const randomPart = Math.random().toString(36).slice(2) || "0";
3464
+ return `click-${Date.now()}-${randomPart}`;
3465
+ }
3466
+
3436
3467
  // src/utils/billingCatalog/index.ts
3437
3468
  var BILLING_CATALOG_KEYS = [
3438
3469
  "pro_vendor_monthly",
@@ -3602,6 +3633,7 @@ function getVendorEventsData({
3602
3633
  // src/utils/relations/preservedRelationDateStatuses.ts
3603
3634
  var PRESERVED_RELATION_DATE_STATUSES = /* @__PURE__ */ new Set([
3604
3635
  "Accepted" /* ACCEPTED */,
3636
+ "Canceled" /* CANCELED */,
3605
3637
  "Completed" /* COMPLETED */,
3606
3638
  "Rejected" /* REJECTED */
3607
3639
  ]);
@@ -7797,6 +7829,7 @@ var useGetUsersByPromoCode = (promoCode, options) => {
7797
7829
 
7798
7830
  // src/graphql/hooks/ad/hooksMutation.ts
7799
7831
  var import_client48 = require("@apollo/client");
7832
+ var import_react = require("react");
7800
7833
 
7801
7834
  // src/graphql/mutations/ad.ts
7802
7835
  var import_client45 = require("@apollo/client");
@@ -7962,6 +7995,15 @@ var GET_AD_SETTINGS = import_client46.gql`
7962
7995
  }
7963
7996
  }
7964
7997
  `;
7998
+ var GET_AD_METRIC_TOTALS = import_client46.gql`
7999
+ query getAdMetricTotals($filter: AdMetricTotalsFilterInputGraphQLType) {
8000
+ adMetricTotals(filter: $filter) {
8001
+ adId
8002
+ clicks
8003
+ impressions
8004
+ }
8005
+ }
8006
+ `;
7965
8007
 
7966
8008
  // src/graphql/mutations/adBooking.ts
7967
8009
  var CREATE_AD_CHECKOUT_MUTATION = import_client47.gql`
@@ -8078,14 +8120,147 @@ var useRecordAdClick = () => {
8078
8120
  recordAdClick
8079
8121
  };
8080
8122
  };
8123
+ var defaultAdMetricErrorHandler = (message, error) => {
8124
+ console.error(message, error);
8125
+ };
8126
+ var useAdMetricsReporter = (input, onError = defaultAdMetricErrorHandler) => {
8127
+ const { recordAdImpression } = useRecordAdImpression();
8128
+ const { recordAdClick } = useRecordAdClick();
8129
+ const reportedSlotRef = (0, import_react.useRef)({
8130
+ keys: /* @__PURE__ */ new Set(),
8131
+ slot: -1
8132
+ });
8133
+ const inFlightRef = (0, import_react.useRef)(false);
8134
+ const disposedRef = (0, import_react.useRef)(false);
8135
+ const safeOnError = (0, import_react.useCallback)(
8136
+ (message, error) => {
8137
+ try {
8138
+ onError(message, error);
8139
+ } catch {
8140
+ }
8141
+ },
8142
+ [onError]
8143
+ );
8144
+ (0, import_react.useEffect)(() => {
8145
+ disposedRef.current = false;
8146
+ return () => {
8147
+ disposedRef.current = true;
8148
+ };
8149
+ }, []);
8150
+ const reportImpression = (0, import_react.useCallback)(
8151
+ async (opts) => {
8152
+ if (inFlightRef.current || disposedRef.current) return false;
8153
+ const now = opts?.nowMs ?? Date.now();
8154
+ const slot = getAdMetricRotationSlot(now);
8155
+ const key = buildAdMetricSlotKey(input.adId, input.placement, slot);
8156
+ const reported = reportedSlotRef.current;
8157
+ if (reported.slot !== slot) {
8158
+ reported.slot = slot;
8159
+ reported.keys.clear();
8160
+ }
8161
+ if (reported.keys.has(key)) return false;
8162
+ inFlightRef.current = true;
8163
+ try {
8164
+ const result = await recordAdImpression({
8165
+ variables: {
8166
+ input: {
8167
+ adId: input.adId,
8168
+ placement: input.placement,
8169
+ platform: input.platform,
8170
+ region: input.region
8171
+ }
8172
+ }
8173
+ });
8174
+ if (result.data?.recordAdImpression?.data !== true) {
8175
+ return false;
8176
+ }
8177
+ reported.keys.add(key);
8178
+ return true;
8179
+ } catch (error) {
8180
+ safeOnError(
8181
+ "Ad impression report failed; retrying within the rotation.",
8182
+ error
8183
+ );
8184
+ if (!disposedRef.current && getAdMetricRotationSlot(Date.now()) === slot) {
8185
+ await new Promise(
8186
+ (resolve) => setTimeout(resolve, AD_METRIC_IMPRESSION_RETRY_DELAY_MS)
8187
+ );
8188
+ if (!disposedRef.current && getAdMetricRotationSlot(Date.now()) === slot) {
8189
+ try {
8190
+ const retryResult = await recordAdImpression({
8191
+ variables: {
8192
+ input: {
8193
+ adId: input.adId,
8194
+ placement: input.placement,
8195
+ platform: input.platform,
8196
+ region: input.region
8197
+ }
8198
+ }
8199
+ });
8200
+ if (retryResult.data?.recordAdImpression?.data !== true) {
8201
+ return false;
8202
+ }
8203
+ reported.keys.add(key);
8204
+ return true;
8205
+ } catch (retryError) {
8206
+ safeOnError("Ad impression retry failed.", retryError);
8207
+ }
8208
+ }
8209
+ }
8210
+ return false;
8211
+ } finally {
8212
+ inFlightRef.current = false;
8213
+ }
8214
+ },
8215
+ [
8216
+ input.adId,
8217
+ input.placement,
8218
+ input.platform,
8219
+ input.region,
8220
+ safeOnError,
8221
+ recordAdImpression
8222
+ ]
8223
+ );
8224
+ const reportClick = (0, import_react.useCallback)(
8225
+ (adIdOverride) => {
8226
+ try {
8227
+ void recordAdClick({
8228
+ variables: {
8229
+ input: {
8230
+ adId: adIdOverride ?? input.adId,
8231
+ clickId: generateAdClickId(),
8232
+ placement: input.placement,
8233
+ platform: input.platform,
8234
+ region: input.region
8235
+ }
8236
+ }
8237
+ }).catch((error) => {
8238
+ safeOnError("Ad click report failed.", error);
8239
+ });
8240
+ } catch (error) {
8241
+ safeOnError("Ad click report failed.", error);
8242
+ }
8243
+ },
8244
+ [
8245
+ input.adId,
8246
+ input.placement,
8247
+ input.platform,
8248
+ input.region,
8249
+ safeOnError,
8250
+ recordAdClick
8251
+ ]
8252
+ );
8253
+ return { reportClick, reportImpression };
8254
+ };
8081
8255
 
8082
8256
  // src/graphql/hooks/ad/hooksQuery.ts
8083
8257
  var import_client49 = require("@apollo/client");
8084
- var useGetAds = () => {
8258
+ var useGetAds = (skip = false) => {
8085
8259
  const { data, loading, error, refetch } = (0, import_client49.useQuery)(
8086
8260
  GET_ADS,
8087
8261
  {
8088
- fetchPolicy: "no-cache"
8262
+ fetchPolicy: "no-cache",
8263
+ skip
8089
8264
  }
8090
8265
  );
8091
8266
  return {
@@ -8121,6 +8296,19 @@ var useGetAdsByRegion = (region, platform, showOn) => {
8121
8296
  refetch
8122
8297
  };
8123
8298
  };
8299
+ var useGetAdMetricTotals = (filter, skip = false) => {
8300
+ const { data, loading, error, refetch } = (0, import_client49.useQuery)(GET_AD_METRIC_TOTALS, {
8301
+ fetchPolicy: "no-cache",
8302
+ skip,
8303
+ variables: filter ? { filter } : void 0
8304
+ });
8305
+ return {
8306
+ adMetricTotals: data?.adMetricTotals || [],
8307
+ error,
8308
+ loading,
8309
+ refetch
8310
+ };
8311
+ };
8124
8312
 
8125
8313
  // src/graphql/hooks/resourceActivities/hooksMutation.ts
8126
8314
  var import_client51 = require("@apollo/client");
@@ -9735,7 +9923,7 @@ var useGetCoupon = (_id) => {
9735
9923
 
9736
9924
  // src/graphql/hooks/usePaginatedList.ts
9737
9925
  var import_client88 = require("@apollo/client");
9738
- var import_react = require("react");
9926
+ var import_react2 = require("react");
9739
9927
  function usePaginatedList({
9740
9928
  document,
9741
9929
  getItems,
@@ -9749,12 +9937,12 @@ function usePaginatedList({
9749
9937
  `usePaginatedList: pageSize must be a positive integer, received ${String(pageSize)}.`
9750
9938
  );
9751
9939
  }
9752
- const [offset, setOffset] = (0, import_react.useState)(0);
9753
- const [items, setItems] = (0, import_react.useState)([]);
9754
- const [hasMore, setHasMore] = (0, import_react.useState)(!skip);
9755
- const [hasSettled, setHasSettled] = (0, import_react.useState)(false);
9940
+ const [offset, setOffset] = (0, import_react2.useState)(0);
9941
+ const [items, setItems] = (0, import_react2.useState)([]);
9942
+ const [hasMore, setHasMore] = (0, import_react2.useState)(!skip);
9943
+ const [hasSettled, setHasSettled] = (0, import_react2.useState)(false);
9756
9944
  const variablesKey = JSON.stringify(variables ?? null);
9757
- (0, import_react.useEffect)(() => {
9945
+ (0, import_react2.useEffect)(() => {
9758
9946
  setItems([]);
9759
9947
  setHasMore(!skip);
9760
9948
  setHasSettled(false);
@@ -9765,14 +9953,14 @@ function usePaginatedList({
9765
9953
  skip,
9766
9954
  variables: { ...variables, options: { limit: pageSize + 1, offset } }
9767
9955
  });
9768
- const refetchRef = (0, import_react.useRef)(refetch);
9956
+ const refetchRef = (0, import_react2.useRef)(refetch);
9769
9957
  refetchRef.current = refetch;
9770
- const variablesRef = (0, import_react.useRef)(variables);
9958
+ const variablesRef = (0, import_react2.useRef)(variables);
9771
9959
  variablesRef.current = variables;
9772
9960
  const rawPage = getItems(data);
9773
9961
  const page = rawPage.length > pageSize ? rawPage.slice(0, pageSize) : rawPage;
9774
9962
  const hasMorePage = rawPage.length > pageSize;
9775
- (0, import_react.useEffect)(() => {
9963
+ (0, import_react2.useEffect)(() => {
9776
9964
  if (loading || skip || error) {
9777
9965
  return;
9778
9966
  }
@@ -9788,7 +9976,7 @@ function usePaginatedList({
9788
9976
  setHasSettled(true);
9789
9977
  setHasMore(hasMorePage);
9790
9978
  }, [loading, skip, error, page, hasMorePage, hasSettled, pageSize, getId]);
9791
- const loadMore = (0, import_react.useCallback)(() => {
9979
+ const loadMore = (0, import_react2.useCallback)(() => {
9792
9980
  if (loading || skip) {
9793
9981
  return;
9794
9982
  }
@@ -9804,7 +9992,7 @@ function usePaginatedList({
9804
9992
  }
9805
9993
  setOffset(offset + pageSize);
9806
9994
  }, [loading, skip, error, hasSettled, hasMore, offset, pageSize]);
9807
- const refresh = (0, import_react.useCallback)(() => {
9995
+ const refresh = (0, import_react2.useCallback)(() => {
9808
9996
  setItems([]);
9809
9997
  setHasMore(!skip);
9810
9998
  setHasSettled(false);
@@ -10387,6 +10575,8 @@ function canAccessAdminPath(roles, pathname) {
10387
10575
  ADMIN_APP_ROLES,
10388
10576
  ADMIN_DASHBOARD_CONTEXTS,
10389
10577
  AD_BOOKING_FIELDS_FRAGMENT,
10578
+ AD_METRIC_IMPRESSION_RETRY_DELAY_MS,
10579
+ AD_METRIC_ROTATION_INTERVAL_MS,
10390
10580
  AFFILIATE_PARTICIPANT_TYPE_LABELS,
10391
10581
  AFFILIATE_REWARDS,
10392
10582
  ANDROID_URL,
@@ -10450,6 +10640,7 @@ function canAccessAdminPath(roles, pathname) {
10450
10640
  FUTURE_EVENT_DATE_STATUSES,
10451
10641
  GET_AD_BOOKING,
10452
10642
  GET_AD_DAILY_PRICES,
10643
+ GET_AD_METRIC_TOTALS,
10453
10644
  GET_AD_SETTINGS,
10454
10645
  GET_EVENT,
10455
10646
  GET_EVENTS,
@@ -10543,6 +10734,7 @@ function canAccessAdminPath(roles, pathname) {
10543
10734
  badges,
10544
10735
  bankAccountDetailsFields,
10545
10736
  billingCatalogDefinitionMatches,
10737
+ buildAdMetricSlotKey,
10546
10738
  buildApplicationShareDescription,
10547
10739
  buildCalendarSheetContentData,
10548
10740
  buildInvitationShareDescription,
@@ -10615,6 +10807,9 @@ function canAccessAdminPath(roles, pathname) {
10615
10807
  futureTimePeriods,
10616
10808
  gameScreenIdentifierList,
10617
10809
  gameTypeToDisplayName,
10810
+ generateAdClickId,
10811
+ getAdMetricRotationIndex,
10812
+ getAdMetricRotationSlot,
10618
10813
  getAllowedEventDateStatuses,
10619
10814
  getBillingCatalogKeyForSelection,
10620
10815
  getCurrentAndFutureDates,
@@ -10729,6 +10924,7 @@ function canAccessAdminPath(roles, pathname) {
10729
10924
  truncateText,
10730
10925
  updateSingleDateTimeStatus,
10731
10926
  useActivateVendorClaim,
10927
+ useAdMetricsReporter,
10732
10928
  useAddParticipantToChat,
10733
10929
  useAddUserFavouriteResource,
10734
10930
  useAddUserGoingResource,
@@ -10779,6 +10975,7 @@ function canAccessAdminPath(roles, pathname) {
10779
10975
  useDeleteVendor,
10780
10976
  useEndImpersonation,
10781
10977
  useGetAd,
10978
+ useGetAdMetricTotals,
10782
10979
  useGetAds,
10783
10980
  useGetAdsByRegion,
10784
10981
  useGetAffiliate,