@timardex/cluemart-shared 2.5.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.
- package/dist/{ad-DRI2CIzV.d.ts → ad-C7GbDyUi.d.ts} +1 -1
- package/dist/{ad-BSyVGv8q.d.mts → ad-DB9gvcJW.d.mts} +1 -1
- package/dist/{chunk-L4NHGGT7.mjs → chunk-H6HM2FOZ.mjs} +2 -2
- package/dist/{chunk-DEK7NF3O.mjs → chunk-NEOBS55J.mjs} +1 -1
- package/dist/{chunk-2RHUGVV3.mjs → chunk-WOBG6I4T.mjs} +175 -12
- package/dist/chunk-WOBG6I4T.mjs.map +1 -0
- package/dist/chunk-YCUKTVVA.mjs +69 -0
- package/dist/chunk-YCUKTVVA.mjs.map +1 -0
- package/dist/formFields/index.mjs +3 -3
- package/dist/graphql/index.cjs +193 -13
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +46 -3
- package/dist/graphql/index.d.ts +46 -3
- package/dist/graphql/index.mjs +8 -2
- package/dist/hooks/index.cjs +23 -13
- 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 +209 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +61 -2
- package/dist/index.d.ts +61 -2
- package/dist/index.mjs +196 -9
- package/dist/index.mjs.map +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/utils/index.cjs +34 -0
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.mts +17 -1
- package/dist/utils/index.d.ts +17 -1
- package/dist/utils/index.mjs +15 -3
- package/package.json +1 -1
- package/dist/chunk-2RHUGVV3.mjs.map +0 -1
- package/dist/chunk-7DQBUZXY.mjs +0 -41
- package/dist/chunk-7DQBUZXY.mjs.map +0 -1
- /package/dist/{chunk-L4NHGGT7.mjs.map → chunk-H6HM2FOZ.mjs.map} +0 -0
- /package/dist/{chunk-DEK7NF3O.mjs.map → chunk-NEOBS55J.mjs.map} +0 -0
package/dist/types/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { A as AdminUpdateResourceType, c as ChatMessageInput, d as ChatMessageReaction, e as ChatMessageReplyPreview, f as ChatMessageSeen, g as ChatMessageType, C as ChatType, h as CreateBulkNotificationInput, E as EnumActivity, a as NotificationCount, i as NotificationDataType, N as NotificationType, P as ParticipantType, R as ReportChatUser, j as ResourceActivityEntry, k as ResourceActivityInputType, b as ResourceActivityType } from '../resourceActivities-BytCHUvO.mjs';
|
|
2
|
-
export { s as AdBookingType, t as AdDailyPriceType, l as AdFormData, u as AdFormState, v as AdMetricsType, w as AdResource, x as AdSettingsFormData, y as AdSettingsType,
|
|
2
|
+
export { s as AdBookingType, t as AdDailyPriceType, l as AdFormData, u as AdFormState, v as AdMetricsType, w as AdResource, x as AdSettingsFormData, y as AdSettingsType, c as AdType, o as AppSettingsFormData, d as AppSettingsType, A as AuthMutationResponse, z as AuthPayloadType, B as CreateAdFormData, m as CreateAdFormState, p as CreateAppSettingsFormData, C as CreateLoginFormData, n as CreatePartnerFormData, g as CreateRegisterFormData, h as CreateRequestPasswordResetFormData, j as CreateResetPasswordFormData, r as CreateSchoolFormData, i as CreateValidateVerificationTokenFormData, D as EnumAdApprovalStatus, F as EnumAdBookingSlotKind, G as EnumAdBookingState, H as EnumAdPaymentStatus, b as EnumAdPlatform, E as EnumAdShowOn, I as EnumAdStatus, J as EnumAdStyle, K as EnumAdType, L as EnumVerificationType, M as LoginFormData, N as MarketingMaterialRequestInputType, k as PartnerFormData, P as PartnerType, O as PosterInputType, R as RefreshImpersonationMutationResponse, a as RefreshTokenMutationResponse, Q as RefreshTokenPayloadType, T as RegisterFormData, U as RequestPasswordResetFormData, V as ResetPasswordFormData, W as SchoolCampaignType, q as SchoolFormData, X as SchoolRegisteredUserType, f as SchoolReturnType, e as SchoolType, S as StartImpersonationMutationResponse, Y as StartImpersonationPayloadType, Z as ValidateVerificationTokenFormData } from '../ad-DB9gvcJW.mjs';
|
|
3
3
|
export { C as ContactUsFormData, a as CreateContactUsFormData } from '../contactUs-BDJutwcx.mjs';
|
|
4
4
|
import { d as EventListItemType } from '../global-EGbrTMk6.mjs';
|
|
5
5
|
export { N as BaseGameMap, Q as BaseGameType, T as BaseResourceType, B as BaseResourceTypeFormData, C as Category, c as CategoryColorType, W as CouponCodeType, X as CouponDataProductsType, Y as CouponDataType, I as CouponDefaultsFormData, Z as CouponMarketPassportOption, _ as CouponMarketVisitOption, $ as CouponOption, a0 as CouponParticipantUserType, a1 as CouponPurchaseOption, p as CouponType, q as CouponTypeList, a2 as CouponVendorProduct, J as CreateCouponFormData, y as CreateEventFormData, A as CreateEventInfoFormData, a3 as CreateFormData, H as CreatePostFormData, w as CreateUnregisteredVendorFormData, s as CreateVendorFormData, u as CreateVendorInfoFormData, a4 as DailyClueBaseGame, a5 as DailyClueGameData, a6 as DateTimeFormValue, a7 as DateTimeType, a8 as DateTimeWithPriceFormValue, a9 as DateTimeWithPriceType, aa as DeviceInfo, ab as EnumCouponListType, ac as EnumCouponQualificationType, ad as EnumGameStatus, ae as EnumGameType, af as EnumPostContentType, ag as EnumPostType, x as EventFormData, z as EventInfoFormData, e as EventInfoType, ah as EventListFilter, ai as EventStatusType, E as EventType, a as FormDateField, F as FormField, aj as GameDate, G as GameDocType, ak as GameHistory, o as GameLeaderboard, al as GamePlacement, am as GamePlacementClue, an as GameType, ao as GeocodeLocation, ap as GlobalGameData, aq as ImageObjectType, ar as LocationGeoType, L as LocationType, M as MutationResponse, l as MyPendingVendorClaim, as as Nullable, O as OptionItem, at as OwnerType, au as PROMO_CODE_PREFIX, av as PaginationOptions, aw as PartnerListFilter, ax as PaymentInfoType, ay as PostContentData, az as PostContentFormData, aA as PostContentGame, aB as PostContentImage, aC as PostContentList, aD as PostContentTextarea, aE as PostContentType, aF as PostContentVideo, aG as PostFileInput, D as PostFormData, aH as PostListFilter, aI as PostResource, n as PostType, P as PosterUsageType, aJ as ProductCoupon, aK as PromoCodeType, aL as PuzzleAnswer, aM as PuzzleAnsweredQuestion, aN as PuzzleBaseGame, aO as PuzzleGameData, aP as PuzzleQuestion, R as RefundPolicy, K as Region, aQ as RelatedPostType, aR as RelationDate, g as RelationHistoryType, aS as RelationInputType, f as RelationType, b as Requirement, h as ResourceConnectionsType, aT as ResourceContactDetailsType, aU as ResourceDetails, aV as ResourceImageType, aW as ResourceRelationField, aX as SocialMediaType, aY as SocialShareResourceType, S as StallType, aZ as Subcategory, a_ as SubcategoryItems, a$ as TermsAgreement, v as UnregisteredVendorFormData, b0 as UnregisteredVendorInvitationType, i as UnregisteredVendorType, U as UseGetResourcesByRegionOptions, m as UserLicenceType, b1 as UserListFilter, b2 as VendorAttributes, b3 as VendorAvailability, b4 as VendorCalendarData, V as VendorClaimTokenValidation, b5 as VendorDowngradeSnapshot, r as VendorFormData, t as VendorInfoFormData, k as VendorInfoType, b6 as VendorListFilter, b7 as VendorProductList, j as VendorType, b8 as gameScreenIdentifierList, b9 as gameTypeToDisplayName } from '../global-EGbrTMk6.mjs';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { A as AdminUpdateResourceType, c as ChatMessageInput, d as ChatMessageReaction, e as ChatMessageReplyPreview, f as ChatMessageSeen, g as ChatMessageType, C as ChatType, h as CreateBulkNotificationInput, E as EnumActivity, a as NotificationCount, i as NotificationDataType, N as NotificationType, P as ParticipantType, R as ReportChatUser, j as ResourceActivityEntry, k as ResourceActivityInputType, b as ResourceActivityType } from '../resourceActivities-DlUEbCkT.js';
|
|
2
|
-
export { s as AdBookingType, t as AdDailyPriceType, l as AdFormData, u as AdFormState, v as AdMetricsType, w as AdResource, x as AdSettingsFormData, y as AdSettingsType,
|
|
2
|
+
export { s as AdBookingType, t as AdDailyPriceType, l as AdFormData, u as AdFormState, v as AdMetricsType, w as AdResource, x as AdSettingsFormData, y as AdSettingsType, c as AdType, o as AppSettingsFormData, d as AppSettingsType, A as AuthMutationResponse, z as AuthPayloadType, B as CreateAdFormData, m as CreateAdFormState, p as CreateAppSettingsFormData, C as CreateLoginFormData, n as CreatePartnerFormData, g as CreateRegisterFormData, h as CreateRequestPasswordResetFormData, j as CreateResetPasswordFormData, r as CreateSchoolFormData, i as CreateValidateVerificationTokenFormData, D as EnumAdApprovalStatus, F as EnumAdBookingSlotKind, G as EnumAdBookingState, H as EnumAdPaymentStatus, b as EnumAdPlatform, E as EnumAdShowOn, I as EnumAdStatus, J as EnumAdStyle, K as EnumAdType, L as EnumVerificationType, M as LoginFormData, N as MarketingMaterialRequestInputType, k as PartnerFormData, P as PartnerType, O as PosterInputType, R as RefreshImpersonationMutationResponse, a as RefreshTokenMutationResponse, Q as RefreshTokenPayloadType, T as RegisterFormData, U as RequestPasswordResetFormData, V as ResetPasswordFormData, W as SchoolCampaignType, q as SchoolFormData, X as SchoolRegisteredUserType, f as SchoolReturnType, e as SchoolType, S as StartImpersonationMutationResponse, Y as StartImpersonationPayloadType, Z as ValidateVerificationTokenFormData } from '../ad-C7GbDyUi.js';
|
|
3
3
|
export { C as ContactUsFormData, a as CreateContactUsFormData } from '../contactUs-6b5g9DV-.js';
|
|
4
4
|
import { d as EventListItemType } from '../global-LtQJ2t6c.js';
|
|
5
5
|
export { N as BaseGameMap, Q as BaseGameType, T as BaseResourceType, B as BaseResourceTypeFormData, C as Category, c as CategoryColorType, W as CouponCodeType, X as CouponDataProductsType, Y as CouponDataType, I as CouponDefaultsFormData, Z as CouponMarketPassportOption, _ as CouponMarketVisitOption, $ as CouponOption, a0 as CouponParticipantUserType, a1 as CouponPurchaseOption, p as CouponType, q as CouponTypeList, a2 as CouponVendorProduct, J as CreateCouponFormData, y as CreateEventFormData, A as CreateEventInfoFormData, a3 as CreateFormData, H as CreatePostFormData, w as CreateUnregisteredVendorFormData, s as CreateVendorFormData, u as CreateVendorInfoFormData, a4 as DailyClueBaseGame, a5 as DailyClueGameData, a6 as DateTimeFormValue, a7 as DateTimeType, a8 as DateTimeWithPriceFormValue, a9 as DateTimeWithPriceType, aa as DeviceInfo, ab as EnumCouponListType, ac as EnumCouponQualificationType, ad as EnumGameStatus, ae as EnumGameType, af as EnumPostContentType, ag as EnumPostType, x as EventFormData, z as EventInfoFormData, e as EventInfoType, ah as EventListFilter, ai as EventStatusType, E as EventType, a as FormDateField, F as FormField, aj as GameDate, G as GameDocType, ak as GameHistory, o as GameLeaderboard, al as GamePlacement, am as GamePlacementClue, an as GameType, ao as GeocodeLocation, ap as GlobalGameData, aq as ImageObjectType, ar as LocationGeoType, L as LocationType, M as MutationResponse, l as MyPendingVendorClaim, as as Nullable, O as OptionItem, at as OwnerType, au as PROMO_CODE_PREFIX, av as PaginationOptions, aw as PartnerListFilter, ax as PaymentInfoType, ay as PostContentData, az as PostContentFormData, aA as PostContentGame, aB as PostContentImage, aC as PostContentList, aD as PostContentTextarea, aE as PostContentType, aF as PostContentVideo, aG as PostFileInput, D as PostFormData, aH as PostListFilter, aI as PostResource, n as PostType, P as PosterUsageType, aJ as ProductCoupon, aK as PromoCodeType, aL as PuzzleAnswer, aM as PuzzleAnsweredQuestion, aN as PuzzleBaseGame, aO as PuzzleGameData, aP as PuzzleQuestion, R as RefundPolicy, K as Region, aQ as RelatedPostType, aR as RelationDate, g as RelationHistoryType, aS as RelationInputType, f as RelationType, b as Requirement, h as ResourceConnectionsType, aT as ResourceContactDetailsType, aU as ResourceDetails, aV as ResourceImageType, aW as ResourceRelationField, aX as SocialMediaType, aY as SocialShareResourceType, S as StallType, aZ as Subcategory, a_ as SubcategoryItems, a$ as TermsAgreement, v as UnregisteredVendorFormData, b0 as UnregisteredVendorInvitationType, i as UnregisteredVendorType, U as UseGetResourcesByRegionOptions, m as UserLicenceType, b1 as UserListFilter, b2 as VendorAttributes, b3 as VendorAvailability, b4 as VendorCalendarData, V as VendorClaimTokenValidation, b5 as VendorDowngradeSnapshot, r as VendorFormData, t as VendorInfoFormData, k as VendorInfoType, b6 as VendorListFilter, b7 as VendorProductList, j as VendorType, b8 as gameScreenIdentifierList, b9 as gameTypeToDisplayName } from '../global-LtQJ2t6c.js';
|
package/dist/utils/index.cjs
CHANGED
|
@@ -30,6 +30,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// src/utils/index.ts
|
|
31
31
|
var utils_exports = {};
|
|
32
32
|
__export(utils_exports, {
|
|
33
|
+
AD_METRIC_IMPRESSION_RETRY_DELAY_MS: () => AD_METRIC_IMPRESSION_RETRY_DELAY_MS,
|
|
34
|
+
AD_METRIC_ROTATION_INTERVAL_MS: () => AD_METRIC_ROTATION_INTERVAL_MS,
|
|
33
35
|
AFFILIATE_PARTICIPANT_TYPE_LABELS: () => AFFILIATE_PARTICIPANT_TYPE_LABELS,
|
|
34
36
|
AFFILIATE_REWARDS: () => AFFILIATE_REWARDS,
|
|
35
37
|
ANDROID_URL: () => ANDROID_URL,
|
|
@@ -59,6 +61,7 @@ __export(utils_exports, {
|
|
|
59
61
|
availableRegionOptions: () => availableRegionOptions,
|
|
60
62
|
availableRegionTypes: () => availableRegionTypes,
|
|
61
63
|
billingCatalogDefinitionMatches: () => billingCatalogDefinitionMatches,
|
|
64
|
+
buildAdMetricSlotKey: () => buildAdMetricSlotKey,
|
|
62
65
|
buildCalendarSheetContentData: () => buildCalendarSheetContentData,
|
|
63
66
|
buildRelationEligibleEventSchedule: () => buildRelationEligibleEventSchedule,
|
|
64
67
|
capitalizeFirstLetter: () => capitalizeFirstLetter,
|
|
@@ -90,6 +93,9 @@ __export(utils_exports, {
|
|
|
90
93
|
formatTimestamp: () => formatTimestamp,
|
|
91
94
|
fromCalendarIsoDate: () => fromCalendarIsoDate,
|
|
92
95
|
futureTimePeriods: () => futureTimePeriods,
|
|
96
|
+
generateAdClickId: () => generateAdClickId,
|
|
97
|
+
getAdMetricRotationIndex: () => getAdMetricRotationIndex,
|
|
98
|
+
getAdMetricRotationSlot: () => getAdMetricRotationSlot,
|
|
93
99
|
getAllowedEventDateStatuses: () => getAllowedEventDateStatuses,
|
|
94
100
|
getBillingCatalogKeyForSelection: () => getBillingCatalogKeyForSelection,
|
|
95
101
|
getCurrentAndFutureDates: () => getCurrentAndFutureDates,
|
|
@@ -2344,6 +2350,28 @@ function isTransientNetworkError(err) {
|
|
|
2344
2350
|
return TRANSIENT_NETWORK_PATTERNS.some((pattern) => pattern.test(message));
|
|
2345
2351
|
}
|
|
2346
2352
|
|
|
2353
|
+
// src/utils/adMetrics.ts
|
|
2354
|
+
var AD_METRIC_ROTATION_INTERVAL_MS = 8e3;
|
|
2355
|
+
var AD_METRIC_IMPRESSION_RETRY_DELAY_MS = 1e3;
|
|
2356
|
+
function getAdMetricRotationSlot(epochMilliseconds) {
|
|
2357
|
+
return Math.floor(epochMilliseconds / AD_METRIC_ROTATION_INTERVAL_MS);
|
|
2358
|
+
}
|
|
2359
|
+
function getAdMetricRotationIndex(epochMilliseconds, count) {
|
|
2360
|
+
if (count <= 0) return 0;
|
|
2361
|
+
return getAdMetricRotationSlot(epochMilliseconds) % count;
|
|
2362
|
+
}
|
|
2363
|
+
function buildAdMetricSlotKey(adId, placement, slot) {
|
|
2364
|
+
return `${adId}:${placement}:${slot}`;
|
|
2365
|
+
}
|
|
2366
|
+
function generateAdClickId() {
|
|
2367
|
+
const cryptoApi = globalThis.crypto;
|
|
2368
|
+
if (typeof cryptoApi?.randomUUID === "function") {
|
|
2369
|
+
return cryptoApi.randomUUID();
|
|
2370
|
+
}
|
|
2371
|
+
const randomPart = Math.random().toString(36).slice(2) || "0";
|
|
2372
|
+
return `click-${Date.now()}-${randomPart}`;
|
|
2373
|
+
}
|
|
2374
|
+
|
|
2347
2375
|
// src/utils/billingCatalog/index.ts
|
|
2348
2376
|
var BILLING_CATALOG_KEYS = [
|
|
2349
2377
|
"pro_vendor_monthly",
|
|
@@ -2558,6 +2586,8 @@ function getErrorMessage(error, fallback = DEFAULT_USER_FACING_ERROR) {
|
|
|
2558
2586
|
}
|
|
2559
2587
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2560
2588
|
0 && (module.exports = {
|
|
2589
|
+
AD_METRIC_IMPRESSION_RETRY_DELAY_MS,
|
|
2590
|
+
AD_METRIC_ROTATION_INTERVAL_MS,
|
|
2561
2591
|
AFFILIATE_PARTICIPANT_TYPE_LABELS,
|
|
2562
2592
|
AFFILIATE_REWARDS,
|
|
2563
2593
|
ANDROID_URL,
|
|
@@ -2587,6 +2617,7 @@ function getErrorMessage(error, fallback = DEFAULT_USER_FACING_ERROR) {
|
|
|
2587
2617
|
availableRegionOptions,
|
|
2588
2618
|
availableRegionTypes,
|
|
2589
2619
|
billingCatalogDefinitionMatches,
|
|
2620
|
+
buildAdMetricSlotKey,
|
|
2590
2621
|
buildCalendarSheetContentData,
|
|
2591
2622
|
buildRelationEligibleEventSchedule,
|
|
2592
2623
|
capitalizeFirstLetter,
|
|
@@ -2618,6 +2649,9 @@ function getErrorMessage(error, fallback = DEFAULT_USER_FACING_ERROR) {
|
|
|
2618
2649
|
formatTimestamp,
|
|
2619
2650
|
fromCalendarIsoDate,
|
|
2620
2651
|
futureTimePeriods,
|
|
2652
|
+
generateAdClickId,
|
|
2653
|
+
getAdMetricRotationIndex,
|
|
2654
|
+
getAdMetricRotationSlot,
|
|
2621
2655
|
getAllowedEventDateStatuses,
|
|
2622
2656
|
getBillingCatalogKeyForSelection,
|
|
2623
2657
|
getCurrentAndFutureDates,
|