@timardex/cluemart-shared 4.0.0 → 4.0.2

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-DJUHk_vq.d.mts → ad-BZNpotSr.d.mts} +20 -5
  2. package/dist/{ad-CJlx_QPS.d.ts → ad-ywfA4Mtj.d.ts} +20 -5
  3. package/dist/{chunk-RU6XOXWO.mjs → chunk-2DDCCME4.mjs} +1 -1
  4. package/dist/chunk-2DDCCME4.mjs.map +1 -0
  5. package/dist/{chunk-RNY3JPNY.mjs → chunk-35EIWOKC.mjs} +2 -2
  6. package/dist/{chunk-UN33JW2N.mjs → chunk-3ETQ4BPX.mjs} +2 -2
  7. package/dist/{chunk-2P66EBGO.mjs → chunk-DDPU7U6H.mjs} +58 -1
  8. package/dist/chunk-DDPU7U6H.mjs.map +1 -0
  9. package/dist/formFields/index.mjs +3 -3
  10. package/dist/graphql/index.cjs +60 -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 +26 -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 +60 -0
  21. package/dist/index.cjs.map +1 -1
  22. package/dist/index.d.mts +37 -5
  23. package/dist/index.d.ts +37 -5
  24. package/dist/index.mjs +57 -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-RU6XOXWO.mjs.map +0 -1
  34. /package/dist/{chunk-RNY3JPNY.mjs.map → chunk-35EIWOKC.mjs.map} +0 -0
  35. /package/dist/{chunk-UN33JW2N.mjs.map → chunk-3ETQ4BPX.mjs.map} +0 -0
@@ -251,16 +251,31 @@ type AdSettingsType = {
251
251
  _id: "default";
252
252
  approvalRequired: boolean;
253
253
  };
254
- interface AdMetricsType {
255
- _id: string;
256
- adId: string;
254
+ type AdMetricsResourceType = {
257
255
  clicks: number;
258
- createdAt: Date;
259
256
  date: Date;
260
257
  impressions: number;
261
258
  placement: EnumAdShowOn;
262
259
  platform: EnumAdPlatform;
260
+ };
261
+ interface AdMetricsType {
262
+ _id: string;
263
+ adId: string;
264
+ createdAt: Date;
265
+ resource: AdMetricsResourceType[];
263
266
  updatedAt: Date | null;
264
267
  }
268
+ type ResourceAdMetricsBucketType = {
269
+ clicks: number;
270
+ date: Date;
271
+ impressions: number;
272
+ };
273
+ type ResourceAdMetricsType = {
274
+ buckets: ResourceAdMetricsBucketType[];
275
+ totals: {
276
+ clicks: number;
277
+ impressions: number;
278
+ };
279
+ };
265
280
 
266
- export { type ValidateVerificationTokenFormData as $, type AuthHandoffTokenMutationResponse as A, type AuthHandoffTokenPayloadType as B, type CreateLoginFormData as C, type AuthPayloadType as D, EnumAdShowOn as E, type CreateAdFormData as F, EnumAdApprovalStatus as G, EnumAdBookingSlotKind as H, EnumAdBookingState as I, EnumAdPaymentStatus as J, EnumAdStatus as K, EnumAdStyle as L, EnumAdType as M, EnumVerificationType as N, type LoginFormData as O, type PartnerType as P, type MarketingMaterialRequestInputType as Q, type RefreshImpersonationMutationResponse as R, type StartImpersonationMutationResponse as S, type PosterInputType as T, type RefreshTokenPayloadType as U, type RegisterFormData as V, type RequestPasswordResetFormData as W, type ResetPasswordFormData as X, type SchoolCampaignType as Y, type SchoolRegisteredUserType as Z, type StartImpersonationPayloadType as _, type AuthMutationResponse as a, 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 AdMetricsType as w, type AdResource as x, type AdSettingsFormData as y, type AdSettingsType as z };
281
+ 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 };
@@ -251,16 +251,31 @@ type AdSettingsType = {
251
251
  _id: "default";
252
252
  approvalRequired: boolean;
253
253
  };
254
- interface AdMetricsType {
255
- _id: string;
256
- adId: string;
254
+ type AdMetricsResourceType = {
257
255
  clicks: number;
258
- createdAt: Date;
259
256
  date: Date;
260
257
  impressions: number;
261
258
  placement: EnumAdShowOn;
262
259
  platform: EnumAdPlatform;
260
+ };
261
+ interface AdMetricsType {
262
+ _id: string;
263
+ adId: string;
264
+ createdAt: Date;
265
+ resource: AdMetricsResourceType[];
263
266
  updatedAt: Date | null;
264
267
  }
268
+ type ResourceAdMetricsBucketType = {
269
+ clicks: number;
270
+ date: Date;
271
+ impressions: number;
272
+ };
273
+ type ResourceAdMetricsType = {
274
+ buckets: ResourceAdMetricsBucketType[];
275
+ totals: {
276
+ clicks: number;
277
+ impressions: number;
278
+ };
279
+ };
265
280
 
266
- export { type ValidateVerificationTokenFormData as $, type AuthHandoffTokenMutationResponse as A, type AuthHandoffTokenPayloadType as B, type CreateLoginFormData as C, type AuthPayloadType as D, EnumAdShowOn as E, type CreateAdFormData as F, EnumAdApprovalStatus as G, EnumAdBookingSlotKind as H, EnumAdBookingState as I, EnumAdPaymentStatus as J, EnumAdStatus as K, EnumAdStyle as L, EnumAdType as M, EnumVerificationType as N, type LoginFormData as O, type PartnerType as P, type MarketingMaterialRequestInputType as Q, type RefreshImpersonationMutationResponse as R, type StartImpersonationMutationResponse as S, type PosterInputType as T, type RefreshTokenPayloadType as U, type RegisterFormData as V, type RequestPasswordResetFormData as W, type ResetPasswordFormData as X, type SchoolCampaignType as Y, type SchoolRegisteredUserType as Z, type StartImpersonationPayloadType as _, type AuthMutationResponse as a, 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 AdMetricsType as w, type AdResource as x, type AdSettingsFormData as y, type AdSettingsType as z };
281
+ 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 };
@@ -279,4 +279,4 @@ export {
279
279
  EnumCouponQualificationType,
280
280
  EnumCouponListType
281
281
  };
282
- //# sourceMappingURL=chunk-RU6XOXWO.mjs.map
282
+ //# sourceMappingURL=chunk-2DDCCME4.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/types/auth.ts","../src/types/global.ts","../src/types/ad.ts","../src/types/resourceActivities.ts","../src/types/post.ts","../src/types/game/index.ts","../src/types/game/dailyClue.ts","../src/types/game/global.ts","../src/types/affiliate.ts","../src/types/coupon/index.ts"],"sourcesContent":["import {\n CreateFormData,\n EnumOSPlatform,\n EnumResourceType,\n PromoCodeType,\n TermsAgreement,\n} from \"src\";\n\nimport { MutationResponse } from \"./global\";\nimport { SafeUserType, UserFormData } from \"./user\";\n\nexport enum EnumVerificationType {\n REGISTER = \"register\",\n RESET_PASSWORD = \"resetPassword\",\n}\n\nexport type LoginFormData = {\n email: string;\n isAdminPage?: boolean;\n password: string;\n platform?: EnumOSPlatform;\n};\n\nexport type CreateLoginFormData = CreateFormData<LoginFormData>;\n\nexport type RegisterFormData = Pick<\n UserFormData,\n | \"email\"\n | \"firstName\"\n | \"lastName\"\n | \"nickName\"\n | \"platform\"\n | \"preferredRegion\"\n | \"termsAgreement\"\n> & {\n interests: EnumResourceType[];\n password: string;\n promoCode?: PromoCodeType | null;\n};\n\nexport type CreateRegisterFormData = CreateFormData<RegisterFormData>;\n\nexport type RequestPasswordResetFormData = {\n email: string;\n};\n\nexport type CreateRequestPasswordResetFormData =\n CreateFormData<RequestPasswordResetFormData>;\n\nexport type ResetPasswordFormData = {\n confirmPassword: string;\n email: string;\n password: string;\n};\n\nexport type CreateResetPasswordFormData = CreateFormData<ResetPasswordFormData>;\n\nexport type ValidateVerificationTokenFormData = {\n email: string;\n verificationToken: string;\n verificationType?: EnumVerificationType;\n};\n\nexport type CreateValidateVerificationTokenFormData =\n CreateFormData<ValidateVerificationTokenFormData>;\n\nexport type AuthPayloadType = {\n refreshToken: string | null;\n token: string;\n user: SafeUserType;\n};\n\nexport type AuthMutationResponse = MutationResponse<AuthPayloadType>;\n\nexport type AuthHandoffTokenPayloadType = {\n expiresAt: Date;\n token: string;\n};\n\nexport type AuthHandoffTokenMutationResponse =\n MutationResponse<AuthHandoffTokenPayloadType>;\n\nexport type RefreshTokenPayloadType = {\n refreshToken: string;\n token: string;\n};\n\nexport type RefreshTokenMutationResponse =\n MutationResponse<RefreshTokenPayloadType>;\n\nexport type StartImpersonationPayloadType = {\n expiresAt: Date;\n refreshToken: string;\n sessionId: string;\n token: string;\n user: SafeUserType;\n};\n\nexport type StartImpersonationMutationResponse =\n MutationResponse<StartImpersonationPayloadType>;\n\nexport type RefreshImpersonationMutationResponse =\n MutationResponse<RefreshTokenPayloadType>;\n","import {\n Control,\n FieldValues,\n FormState,\n UseFormGetValues,\n UseFormHandleSubmit,\n UseFormReset,\n UseFormSetValue,\n UseFormWatch,\n} from \"react-hook-form\";\n\nimport {\n EnumEventDateStatus,\n EnumEventType,\n EnumPartnerType,\n EnumRegions,\n EnumResourceType,\n EnumSocialMedia,\n EnumUserLicence,\n EnumUserRole,\n} from \"../enums\";\n\nimport { EventListItemType } from \"./event\";\nimport { EnumPostType } from \"./post\";\nimport { VendorType } from \"./vendor\";\n\nexport const PROMO_CODE_PREFIX = \"CM-\";\n\nexport type PromoCodeType = `${typeof PROMO_CODE_PREFIX}${string}`;\n\nexport type Nullable<T> = {\n [K in keyof T]: T[K] | null | undefined;\n};\n\n/** Uniform mutation response envelope used across GraphQL mutations. */\nexport type MutationResponse<T> = {\n data: T | null;\n message: string | null;\n};\n\nexport type DeviceInfo = {\n appBuildNumber: string;\n appId: string;\n appVersion: string;\n brand: string;\n deviceName: string;\n installationId: string;\n manufacturer: string;\n modelName: string;\n osName: string;\n osVersion: string;\n timestamp: Date;\n};\n\nexport type TermsAgreement = DeviceInfo & {\n termVersion: string;\n};\n\nexport type ResourceContactDetailsType = {\n email?: string | null;\n landlinePhone?: string | null;\n mobilePhone?: string | null;\n};\n\nexport type ResourceImageType = {\n active: boolean;\n source: string;\n title: string;\n};\n\nexport type SocialMediaType = {\n name?: EnumSocialMedia;\n link?: string;\n};\n\nexport type UserLicenceType = {\n expiryDate: Date;\n issuedDate: Date;\n licenceType: EnumUserLicence;\n prevLicenceType?: EnumUserLicence | null;\n};\n\nexport type OwnerType = {\n email: string;\n userId: string;\n};\n\nexport interface BaseResourceTypeFormData {\n _id?: string;\n active: boolean;\n contactDetails: ResourceContactDetailsType | null;\n cover: ResourceImageType;\n coverUpload?: ResourceImageType | null;\n description: string;\n images?: ResourceImageType[] | null;\n imagesUpload?: ResourceImageType[] | null;\n logo?: ResourceImageType | null;\n logoUpload?: ResourceImageType | null;\n name: string;\n promoCodes?: PromoCodeType[] | null;\n region: string;\n socialMedia: SocialMediaType[] | null;\n termsAgreement?: TermsAgreement | null;\n}\n\nexport type PosterUsageType = {\n month: string;\n count: number;\n};\n\nexport type RelatedPostType = {\n postActive: boolean;\n postId: string;\n postSlug: string;\n postType: EnumPostType;\n};\n\nexport type SocialShareResourceType = {\n qrCode: ResourceImageType;\n socialImage: ResourceImageType;\n};\n\nexport type BaseResourceType = Omit<\n BaseResourceTypeFormData,\n \"_id\" | \"coverUpload\" | \"imagesUpload\" | \"logoUpload\"\n> & {\n _id: string;\n adIds?: string[] | null;\n approvedAt?: Date | null;\n createdAt: Date;\n deletedAt: Date | null;\n owner: OwnerType;\n posterUsage?: PosterUsageType | null;\n rating?: number | null;\n relatedPost?: RelatedPostType | null;\n reviewCount?: number | null;\n sharePublic?: SocialShareResourceType | null;\n slug: string;\n updatedAt: Date | null;\n};\n\nexport type LocationGeoType = {\n coordinates: number[]; // [longitude, latitude]\n type: \"Point\"; // Mongoose GeoJSON type\n};\n\nexport type LocationType = {\n city: string;\n country: string;\n fullAddress: string;\n geo: LocationGeoType;\n latitude: number;\n longitude: number;\n region: string;\n};\n\nexport type DateTimeType = {\n dateStatus: EnumEventDateStatus;\n endDate: string;\n endTime: string;\n startDate: string;\n startTime: string;\n};\n\nexport type DateTimeFormValue = {\n dateStatus: EnumEventDateStatus;\n endDate?: string;\n endTime?: string;\n startDate?: string;\n startTime?: string;\n};\n\nexport type Region = {\n latitude: number;\n latitudeDelta: number;\n longitude: number;\n longitudeDelta: number;\n};\n\nexport type ResourceDetails = {\n dateTime: DateTimeType[] | null;\n description: string | null;\n eventStatus?: EventStatusType | null;\n location: LocationType | null;\n resourceCover: ResourceImageType | null;\n resourceId: string;\n resourceLogo: ResourceImageType | null;\n resourceName: string;\n resourceType: EnumResourceType;\n};\n\nexport type GeocodeLocation = Pick<LocationType, \"latitude\" | \"longitude\">;\n\nexport type EventStatusType = {\n claimed: boolean;\n eventType: EnumEventType;\n googlePlaceId?: string | null;\n};\n\nexport interface FormField {\n disabled?: boolean;\n helperText?: string;\n isTextArea?: boolean;\n keyboardType?:\n | \"default\"\n | \"email-address\"\n | \"number-pad\"\n | \"url\"\n | \"decimal-pad\"\n | \"phone-pad\";\n name: string;\n placeholder: string;\n required?: boolean;\n secureTextEntry?: boolean;\n}\n\nexport interface FormDateField {\n dateMode: \"date\" | \"time\";\n helperText?: string;\n name: \"endDate\" | \"endTime\" | \"startDate\" | \"startTime\";\n placeholder: string;\n}\n\nexport interface SubcategoryItems {\n id: string;\n name: string;\n description?: string | null;\n}\n\nexport interface Subcategory {\n id: string;\n name: string;\n items?: SubcategoryItems[] | null;\n}\n\nexport type CategoryColorType = {\n primary: string;\n secondary: string;\n};\n\nexport interface Category {\n color?: CategoryColorType | null;\n description?: string | null;\n id: string;\n name: string;\n subcategories: Subcategory[];\n}\n\nexport type OptionItem = {\n value: string;\n label: string;\n};\n\nexport type ImageObjectType = {\n uri: string;\n type: string;\n name: string;\n};\n\nexport interface ResourceConnectionsType {\n events: EventListItemType[] | null;\n vendors: VendorType[] | null;\n}\n\nexport interface CreateFormData<T extends FieldValues> {\n control: Control<T, any>;\n fields: T;\n formState: FormState<T>;\n handleSubmit: UseFormHandleSubmit<T, any>;\n reset: UseFormReset<T>;\n setValue: UseFormSetValue<T>;\n watch: UseFormWatch<T>;\n getValues: UseFormGetValues<T>;\n}\n\n/** Offset-pagination input for plain list fields (events/vendors/partners/posts/users). */\nexport interface PaginationOptions {\n limit?: number;\n offset?: number;\n}\n\n/** Server-side filter input for the super-admin users list query. */\nexport interface UserListFilter {\n active?: boolean | null;\n hasLicences?: boolean | null;\n role?: EnumUserRole | null;\n search?: string | null;\n}\n\n/** Server-side filter input for the admin partners list query. */\nexport interface PartnerListFilter {\n active?: boolean | null;\n partnerType?: EnumPartnerType | null;\n region?: EnumRegions | null;\n search?: string | null;\n}\n\n/** Server-side filter input for the admin vendors list query. */\nexport interface VendorListFilter {\n active?: boolean | null;\n region?: EnumRegions | null;\n search?: string | null;\n}\n\n/** Server-side filter input for the admin events list query. */\nexport interface EventListFilter {\n active?: boolean | null;\n claimed?: boolean | null;\n region?: EnumRegions | null;\n search?: string | null;\n}\n\n/** Server-side filter input for the admin posts list query. */\nexport interface PostListFilter {\n active?: boolean | null;\n postType?: EnumPostType | null;\n search?: string | null;\n}\n\nexport interface UseGetResourcesByRegionOptions extends PaginationOptions {\n onlyClaimed?: boolean;\n skip?: boolean;\n}\n","import { EnumResourceType } from \"src/enums\";\n\nimport { CreateFormData } from \"./global\";\n\nexport enum EnumAdShowOn {\n EVENTS_PAGE = \"Events_page\",\n FRONT_PAGE = \"Front_page\",\n PARTNERS_PAGE = \"Partners_page\",\n VENDORS_PAGE = \"Vendors_page\",\n}\n\nexport enum EnumAdPlatform {\n MOBILE = \"mobile\",\n WEB = \"web\",\n}\n\nexport enum EnumAdStatus {\n ACTIVE = \"Active\",\n PAUSED = \"Paused\",\n EXPIRED = \"Expired\",\n}\n\nexport enum EnumAdType {\n SPONSORED = \"Sponsored\",\n FREE = \"Free\",\n}\n\nexport enum EnumAdStyle {\n BLOOM = \"Bloom\",\n RISE = \"Rise\",\n}\n\nexport enum EnumAdBookingSlotKind {\n PAID = \"paid\",\n RESERVED = \"reserved\",\n}\n\nexport enum EnumAdBookingState {\n HELD = \"held\",\n PENDING_APPROVAL = \"pending_approval\",\n APPROVED = \"approved\",\n FAILED = \"failed\",\n CANCELLED = \"cancelled\",\n REJECTED = \"rejected\",\n}\n\nexport enum EnumAdPaymentStatus {\n PENDING = \"pending\",\n PAID = \"paid\",\n FAILED = \"failed\",\n CANCELLED = \"cancelled\",\n}\n\nexport enum EnumAdApprovalStatus {\n PENDING = \"pending\",\n APPROVED = \"approved\",\n REJECTED = \"rejected\",\n}\n\nexport type AdResource = {\n adDescription: string;\n adImage: string;\n adStyle: EnumAdStyle;\n adTitle: string;\n adType: EnumAdType;\n resourceId: string;\n resourceName: string;\n resourceRegion: string;\n resourceType: EnumResourceType;\n resourceSlug: string;\n};\n\nexport interface AdFormData {\n active: boolean;\n end: Date; // ISO date string\n resource: AdResource;\n showOn: EnumAdShowOn[];\n start?: Date; // ISO date string\n status: EnumAdStatus;\n targetRegion: string[];\n}\n\n// Form state matches the validation schema: all resource fields are present.\n// Use empty strings / explicit enum defaults in `defaultValues` for \"create\" flows.\nexport type AdFormState = AdFormData;\n\nexport type CreateAdFormData = CreateFormData<AdFormData>;\nexport type CreateAdFormState = CreateFormData<AdFormState>;\n\nexport interface AdType extends AdFormData {\n _id: string;\n approvalStatus?: EnumAdApprovalStatus;\n bookingIds?: string[];\n bookingKind?: EnumAdBookingSlotKind;\n createdAt: Date;\n paymentStatus?: EnumAdPaymentStatus;\n start: Date; // ISO date string\n updatedAt: Date | null;\n}\n\nexport type AdBookingType = {\n _id: string;\n adId?: string | null;\n approvalStatus: EnumAdApprovalStatus;\n checkoutAttemptId?: string | null;\n currency?: string | null;\n dayKey: Date;\n expiresAt?: Date | null;\n placement: EnumAdShowOn;\n purchaseKey?: string | null;\n region: string;\n resource: AdResource;\n slotKind: EnumAdBookingSlotKind.PAID;\n slotNumber: number;\n state: EnumAdBookingState;\n stripeCheckoutSessionId?: string | null;\n stripePaymentIntentId?: string | null;\n unitAmount?: number | null;\n userId: string;\n};\n\nexport type AdDailyPriceType = {\n _id: string;\n active: boolean;\n currency: \"nzd\";\n key: EnumAdShowOn;\n revision: number;\n unitAmount: number;\n};\n\nexport type AdSettingsType = {\n _id: \"default\";\n approvalRequired: boolean;\n};\n\nexport type AdMetricsResourceType = {\n clicks: number;\n date: Date;\n impressions: number;\n placement: EnumAdShowOn;\n platform: EnumAdPlatform;\n};\n\nexport interface AdMetricsType {\n _id: string;\n // References the Ad this metric row belongs to (ref: \"Ad\"). Same string-ID\n // convention as AdBooking.adId, but required here: a metrics row only exists\n // once the ad has been created, whereas a booking's adId stays null until\n // approval.\n adId: string;\n createdAt: Date;\n // One bucket per NZ calendar day, placement and platform, mirroring how\n // ResourceActivityType stores its per-resource `activity` entries.\n resource: AdMetricsResourceType[];\n updatedAt: Date | null;\n}\n\nexport type ResourceAdMetricsBucketType = {\n clicks: number;\n date: Date;\n impressions: number;\n};\n\nexport type ResourceAdMetricsType = {\n buckets: ResourceAdMetricsBucketType[];\n totals: {\n clicks: number;\n impressions: number;\n };\n};\n","import {\n EnumEventDateStatus,\n EnumOSPlatform,\n EnumResourceType,\n} from \"src/enums\";\n\nimport { LocationGeoType } from \"./global\";\n\nexport enum EnumActivity {\n FAVORITE = \"FAVORITE\",\n GOING = \"GOING\",\n INTERESTED = \"INTERESTED\",\n PRESENT = \"PRESENT\",\n VIEW = \"VIEW\",\n}\n\nexport type ResourceActivityEntry = {\n activityType: EnumActivity;\n location: LocationGeoType | null;\n dateStatus?: EnumEventDateStatus | null;\n startDate?: string | null;\n startTime?: string | null;\n timestamp: Date;\n userAgent: EnumOSPlatform;\n userId?: string | null;\n};\n\nexport type ResourceActivityType = {\n _id: string;\n resourceType: EnumResourceType;\n resourceId: string;\n activity: ResourceActivityEntry[];\n};\n\nexport type ResourceActivityInputType = {\n resourceId: string;\n resourceType: EnumResourceType;\n activity: Omit<ResourceActivityEntry, \"timestamp\" | \"userId\">;\n};\n","import { EnumResourceType } from \"src/enums\";\n\nimport { BaseGameType } from \"./game\";\nimport {\n CreateFormData,\n ResourceImageType,\n SocialShareResourceType,\n} from \"./global\";\n\nexport enum EnumPostType {\n CLUE_BITES = \"clue_bites\",\n //CLUE_GUIDES_FOR_ORGANISERS = \"clue_guides_for_organisers\",\n //CLUE_GUIDES_FOR_VENDORS = \"clue_guides_for_vendors\",\n MARKET_FACES = \"market_faces\",\n PLAY_AND_WIN = \"play_and_win\",\n}\n\nexport enum EnumPostContentType {\n GAME = \"game\",\n IMAGE = \"image\",\n LIST = \"list\",\n TEXTAREA = \"textarea\",\n VIDEO = \"video\",\n}\n\nexport type PostFileInput = {\n source: File;\n title?: string;\n};\n\nexport type PostContentTextarea = {\n textarea: {\n title?: string;\n data: string;\n };\n};\n\nexport type PostContentImage = {\n images: ResourceImageType[] | null;\n imagesUpload?: PostFileInput[] | null;\n};\n\nexport type PostContentVideo = {\n video: {\n source: string;\n title?: string;\n };\n};\n\nexport type PostContentList = {\n list: {\n title?: string;\n items: {\n text: string;\n }[];\n };\n};\n\nexport type PostContentGame = {\n game: BaseGameType;\n};\n\nexport type PostContentData =\n | PostContentGame\n | PostContentTextarea\n | PostContentImage\n | PostContentVideo\n | PostContentList;\n\nexport type PostContentFormData = {\n contentData?: PostContentData | null;\n contentOrder?: number | null;\n contentType?: EnumPostContentType | null;\n};\n\nexport type PostResource = {\n resourceSlug: string;\n resourceId: string;\n resourceType: EnumResourceType;\n resourceRegion: string;\n};\n\nexport interface PostFormData {\n active: boolean;\n caption: string;\n content: PostContentFormData[];\n cover?: ResourceImageType | null;\n coverUpload?: PostFileInput | null;\n postType: EnumPostType;\n resource?: PostResource | null;\n tags?: string[] | null;\n title: string;\n notifyUsers?: boolean | null;\n}\n\nexport type CreatePostFormData = CreateFormData<PostFormData>;\n\nexport type PostContentType = Omit<PostContentFormData, \"contentData\"> & {\n contentData: Omit<PostContentData, \"imagesUpload\">;\n};\n\nexport type PostType = Omit<\n PostFormData,\n \"content\" | \"coverUpload\" | \"resource\"\n> & {\n _id: string;\n approvedAt?: Date | null;\n content: PostContentType[];\n createdAt: Date;\n deletedAt: Date | null;\n resource?: PostResource | null;\n slug: string;\n sharePublic?: SocialShareResourceType | null;\n updatedAt: Date | null;\n};\n","import { OwnerType } from \"../global\";\n\nimport { DailyClueBaseGame, DailyClueGameData } from \"./dailyClue\";\nimport { EnumGameType, GameDate } from \"./global\";\nimport { PuzzleBaseGame, PuzzleGameData } from \"./puzzleGame\";\n\nexport type BaseGameMap = {\n [EnumGameType.DAILY_CLUE]: DailyClueBaseGame;\n [EnumGameType.MINI_QUIZ]: PuzzleBaseGame;\n [EnumGameType.ODD_ONE_OUT]: PuzzleBaseGame;\n};\n\nexport type BaseGameType = {\n gameType: EnumGameType;\n gameTypeId: string;\n gameTitle: string;\n} & {\n [K in keyof BaseGameMap]?: BaseGameMap[K] | null;\n};\n\nexport enum EnumGameStatus {\n GAME_COMPLETED = \"GAME_COMPLETED\",\n GAME_IN_PROGRESS = \"GAME_IN_PROGRESS\",\n GAME_LEFT = \"GAME_LEFT\",\n GAME_STARTED = \"GAME_STARTED\",\n}\n\nexport type GameHistory = Pick<\n BaseGameType,\n \"gameTitle\" | \"gameType\" | \"gameTypeId\"\n> & {\n createdAt: Date;\n gameDate: GameDate;\n gameStatus: EnumGameStatus;\n /** Per-event delta. Not persisted for overallGamePoints (computed at read time). */\n pointsEarned: number;\n /** Running total for this game instance; computed at read time, not stored in Mongo. */\n overallGamePoints?: number;\n};\n\ntype GameDataMap = {\n [EnumGameType.DAILY_CLUE]: DailyClueGameData;\n [EnumGameType.MINI_QUIZ]: PuzzleGameData;\n [EnumGameType.ODD_ONE_OUT]: PuzzleGameData;\n};\ntype GameDataType = {\n [K in keyof GameDataMap]?: GameDataMap[K] | null;\n};\n\nexport type GameType = Pick<\n BaseGameType,\n \"gameTitle\" | \"gameType\" | \"gameTypeId\"\n> & {\n _id: string;\n active: boolean;\n createdAt: Date;\n gameData: GameDataType;\n gameHistory: GameHistory[] | null;\n /**\n * Set by the resolver that completed this row.\n * - `false`: completed but the points award has not been confirmed yet, so a\n * retry may still need to credit it.\n * - `true`: points confirmed credited.\n * - absent: row completed before this marker existed, so its award was already\n * granted through the legacy path and must never be credited again.\n */\n pointsCredited?: boolean | null;\n updatedAt: Date | null;\n};\n\nexport type GameDocType = {\n _id: string;\n active: boolean;\n createdAt: Date;\n deletedAt: Date | null;\n games: GameType[] | null;\n owner: OwnerType;\n points: number;\n updatedAt: Date | null;\n};\n\nexport type GameLeaderboard = {\n gameHistory: GameHistory[] | null;\n nickName: string;\n overallPoints: number;\n userId: string;\n};\n","import { GameDate, GlobalGameData } from \"./global\";\n\nconst OBJECT_ID_PATH_SEGMENT = \"[a-f0-9]{24}\";\nconst OBJECT_ID_PATH_SEGMENT_END = `${OBJECT_ID_PATH_SEGMENT}$`;\n\nexport const gameScreenIdentifierList = [\n {\n clue: \"Where conversations happen without speaking.\",\n id: \"chat\",\n match: \"/chat\",\n },\n {\n clue: \"Where you can find your loyalties.\",\n id: \"coupons\",\n match: \"/profile/account/coupons\",\n },\n {\n clue: \"A single moment worth showing up for.\",\n id: \"single-event\",\n match: new RegExp(`^/events/${OBJECT_ID_PATH_SEGMENT_END}`),\n },\n {\n clue: \"What’s happening around you, right now.\",\n id: \"events-near-me\",\n match: \"/events/events-near-me\",\n },\n {\n clue: \"Where events appear as pins on a map.\",\n id: \"events-map\",\n match: \"/events/events-map\",\n },\n {\n clue: \"A collection of events worth attending.\",\n id: \"events\",\n match: \"/events\",\n },\n {\n clue: \"What’s happening in a wider area — not just nearby.\",\n id: \"events-region\",\n match: /^\\/events\\/region\\/[^/]+$/,\n },\n {\n clue: \"Where fun becomes a challenge.\",\n id: \"games\",\n match: \"/profile/account/games\",\n },\n {\n clue: \"Your starting point for everything.\",\n id: \"home\",\n match: \"/home\",\n },\n {\n clue: \"Where the app whispers what you shouldn’t miss.\",\n id: \"notifications\",\n match: \"/notifications\",\n },\n {\n clue: \"An organisation or creator supporting the community.\",\n id: \"single-partner\",\n match: new RegExp(`^/partners/${OBJECT_ID_PATH_SEGMENT_END}`),\n },\n {\n clue: \"Organisations and creators supporting the community.\",\n id: \"partners\",\n match: \"/partners\",\n },\n {\n clue: \"Where your actions turn into a timeline.\",\n id: \"activities\",\n match: \"/profile/account/favourites\",\n },\n {\n clue: \"The place to redefine who you are.\",\n id: \"edit-profile\",\n match: \"/profile/account\",\n },\n {\n clue: \"Your identity, on display.\",\n id: \"profile\",\n match: \"/profile\",\n },\n {\n clue: \"Where you can redeem your rewards.\",\n id: \"rewards\",\n match: \"/profile/account/rewards\",\n },\n {\n clue: \"A single published post in full view.\",\n id: \"single-visitor-post\",\n match: new RegExp(`^/visitors/post/${OBJECT_ID_PATH_SEGMENT_END}`),\n },\n {\n clue: \"One stallholder offering something valuable.\",\n id: \"single-vendor\",\n match: new RegExp(`^/vendors/${OBJECT_ID_PATH_SEGMENT_END}`),\n },\n {\n clue: \"Where every stallholder waits under the right category.\",\n id: \"vendors\",\n match: \"/vendors\",\n },\n {\n clue: \"Where you browse articles and posts from around the platform.\",\n id: \"visitors\",\n match: \"/visitors\",\n },\n {\n clue: \"Where you fine-tune your experience.\",\n id: \"options\",\n match: \"/options\",\n },\n] as const;\n\nexport type GamePlacement = (typeof gameScreenIdentifierList)[number][\"id\"];\nexport type GamePlacementClue =\n (typeof gameScreenIdentifierList)[number][\"clue\"];\n\nexport type DailyClueBaseGame = {\n gameDate: GameDate;\n gameSolution: string;\n};\n\nexport type DailyClueGameData = GlobalGameData & {\n gameFields: DailyClueBaseGame;\n lastFoundDate: Date | null;\n letterInfo: {\n // Multiset of found letters: one entry per collected occurrence, so a\n // duplicate letter (e.g. two \"E\"s in \"EXPLORE\") appears twice once both\n // are found. Consumers must count occurrences, not use `includes`.\n collected: string[] | null;\n solutionShuffled: string[]; // The letters of the solution, but shuffled, e.g. [\"L\", \"C\", \"U\"]\n todaysClue: GamePlacementClue | null; // The clue for user to find the letter, e.g. related to {todaysPlacement}\n todaysLetter: string | null; // The letter the user has to find today, e.g. \"C\"\n todaysPlacement: GamePlacement | null; // The screen where the user has to find the clue, e.g. \"HomeScreen\"\n };\n};\n","export enum EnumGameType {\n DAILY_CLUE = \"dailyClue\",\n MINI_QUIZ = \"miniQuiz\",\n ODD_ONE_OUT = \"oddOneOut\",\n}\n\nexport type GameDate = {\n startDate: Date;\n endDate: Date;\n};\n\nexport const gameTypeToDisplayName: Record<EnumGameType, string> = {\n [EnumGameType.DAILY_CLUE]: \"Daily Clue\",\n [EnumGameType.MINI_QUIZ]: \"Mini Quiz\",\n [EnumGameType.ODD_ONE_OUT]: \"Odd One Out\",\n};\n\nexport type GlobalGameData = {\n points: number;\n // User has found the clue 3 days in a row, this is incrementing if the user finds the clue and decrements if user misses a day\n streak: number;\n};\n","import { EnumResourceType } from \"src/enums\";\n\nimport {\n CreateFormData,\n LocationType,\n OwnerType,\n PromoCodeType,\n SocialMediaType,\n} from \"./global\";\nimport { UserFormData } from \"./user\";\n\nexport enum EnumAffiliateParticipantType {\n INDIVIDUAL = \"INDIVIDUAL\",\n SOLE_TRADER = \"SOLE_TRADER\",\n COMPANY = \"COMPANY\",\n}\n\nexport type AffiliateContactDetails = {\n mobilePhone: string;\n};\n\nexport type AffiliateBankAccountDetailsType = {\n accountHolderName: string;\n accountNumber: string;\n};\n\nexport type AffiliateUserDefaultFields = Pick<\n UserFormData,\n \"email\" | \"firstName\" | \"lastName\" | \"termsAgreement\"\n>;\n\nexport type AffiliateDetailsType = AffiliateUserDefaultFields & {\n bankAccountDetails: AffiliateBankAccountDetailsType;\n contactDetails: AffiliateContactDetails;\n irdNumber: string;\n location: LocationType;\n participantType: EnumAffiliateParticipantType;\n socialMedia: SocialMediaType[] | null;\n};\n\nexport enum EnumAffiliateRewardType {\n ACTIVE_EVENT_WITH_VENDOR_REGISTRATIONS = \"ACTIVE_EVENT_WITH_VENDOR_REGISTRATIONS\",\n ACTIVE_VENDOR_BONUS_REWARD = \"ACTIVE_VENDOR_BONUS_REWARD\",\n ACTIVE_VENDOR_PRO_SUBSCRIPTION = \"ACTIVE_VENDOR_PRO_SUBSCRIPTION\",\n ACTIVE_VENDOR_STANDARD_SUBSCRIPTION = \"ACTIVE_VENDOR_STANDARD_SUBSCRIPTION\",\n NEW_EVENT_REGISTRATION = \"NEW_EVENT_REGISTRATION\",\n NEW_VENDOR_REGISTRATION = \"NEW_VENDOR_REGISTRATION\",\n}\n\nexport type AffiliateRewardType = {\n createdAt: Date;\n redeemedAt: Date | null;\n rewardDescription: string;\n rewardType: EnumAffiliateRewardType;\n rewardValue: number;\n};\n\nexport type AffiliateResourceType = {\n resourceActive: boolean;\n resourceDeletedAt: Date | null;\n resourceId: string;\n resourceName: string;\n resourceOwner: OwnerType;\n resourceType: EnumResourceType;\n rewards: AffiliateRewardType[];\n};\n\nexport type RedeemHistoryType = {\n paidAt?: Date | null;\n redeemedAt: Date;\n rewardValue: number;\n};\n\nexport interface AffiliateType {\n _id: string;\n active: boolean;\n approvedAt?: Date | null;\n affiliateBonusRewards?: AffiliateRewardType[] | null;\n affiliateCode: PromoCodeType | null;\n affiliateDetails: AffiliateDetailsType | null;\n affiliateResources: AffiliateResourceType[];\n createdAt: Date;\n deletedAt: Date | null;\n overallPoints: number;\n owner: OwnerType;\n redeemHistory?: RedeemHistoryType[] | null;\n updatedAt: Date | null;\n}\n\nexport type AffiliateFormData = Omit<\n AffiliateDetailsType,\n \"email\" | \"firstName\" | \"lastName\"\n>;\n\nexport type CreateAffiliateFormData = CreateFormData<AffiliateFormData>;\n","import { EnumResourceType } from \"../../enums\";\nimport { CreateFormData, OwnerType, ResourceImageType } from \"../global\";\nimport { VendorProductList } from \"../vendor\";\n\nexport type ProductCoupon = {\n couponDocumentId: string;\n couponId: string;\n};\n\nexport enum EnumCouponQualificationType {\n PURCHASE = \"PURCHASE\",\n MARKET_VISIT = \"MARKET_VISIT\",\n MARKET_PASSPORT = \"MARKET_PASSPORT\",\n}\n\nexport type CouponPurchaseOption = {\n buy: number;\n get: number;\n maxRewardCount: number;\n type: EnumCouponQualificationType.PURCHASE;\n unit: string;\n};\n\nexport type CouponMarketVisitOption = {\n type: EnumCouponQualificationType.MARKET_VISIT;\n visits: number;\n};\n\nexport type CouponMarketPassportOption = {\n type: EnumCouponQualificationType.MARKET_PASSPORT;\n visits: number;\n};\n\nexport type CouponOption =\n CouponPurchaseOption | CouponMarketVisitOption | CouponMarketPassportOption;\n\nexport type CouponVendorProduct = {\n couponId: string;\n productId: string;\n vendorId: string;\n\n // Required only for MARKET_PASSPORT: which Vendor coupon contributes\n // progress when scanned.\n vendorCouponId?: string | null;\n};\n\nexport type CouponDefaultsFormData = {\n couponDescription: string;\n couponOption: CouponOption | null;\n couponVendorProducts?: CouponVendorProduct[];\n endDate: Date;\n resourceId: string;\n resourceType: EnumResourceType;\n startDate: Date;\n};\n\nexport type CreateCouponFormData = CreateFormData<CouponDefaultsFormData>;\n\nexport type CouponParticipantUserType = {\n couponCollectedCount: number;\n couponRedeemedAt: Date | null;\n couponRedeemedCount: number;\n couponCycleRedeemed: boolean;\n createdAt: Date;\n updatedAt: Date | null;\n userId: string;\n // Not persisted; resolved on read by `attachCouponDataProducts` from\n // `UserModel` via the participant's `userId`.\n nickName?: string | null;\n};\n\nexport type CouponCodeType = {\n code: string;\n qrCode: ResourceImageType;\n shareableQrCode: ResourceImageType;\n};\n\nexport type CouponDataProductsType = {\n active: boolean | null;\n couponId: string;\n productsList: VendorProductList[];\n vendorId: string;\n vendorLogo: ResourceImageType | null;\n vendorName: string;\n};\n\nexport type CouponDataType = CouponDefaultsFormData & {\n _id: string;\n active: boolean;\n couponCode: CouponCodeType | null;\n createdAt: Date;\n deletedAt: Date | null;\n participantUsers: CouponParticipantUserType[] | null;\n // products are not saved in the database, but are returned by the backend for convenience\n products?: CouponDataProductsType[] | null;\n updatedAt: Date | null;\n};\n\nexport interface CouponType {\n _id: string;\n active: boolean;\n couponData: CouponDataType[] | null;\n createdAt: Date;\n deletedAt: Date | null;\n owner: OwnerType;\n updatedAt: Date | null;\n}\n\nexport enum EnumCouponListType {\n ACTIVE = \"active\",\n OWNED = \"owned\",\n SCANNED = \"scanned\",\n}\n\nexport type CouponTypeList = {\n active: {\n data: CouponType[] | null;\n listName: EnumCouponListType.ACTIVE;\n };\n owned: {\n data: CouponType[] | null;\n listName: EnumCouponListType.OWNED;\n };\n scanned: {\n data: CouponType[] | null;\n listName: EnumCouponListType.SCANNED;\n };\n};\n"],"mappings":";AAWO,IAAK,uBAAL,kBAAKA,0BAAL;AACL,EAAAA,sBAAA,cAAW;AACX,EAAAA,sBAAA,oBAAiB;AAFP,SAAAA;AAAA,GAAA;;;ACeL,IAAM,oBAAoB;;;ACtB1B,IAAK,eAAL,kBAAKC,kBAAL;AACL,EAAAA,cAAA,iBAAc;AACd,EAAAA,cAAA,gBAAa;AACb,EAAAA,cAAA,mBAAgB;AAChB,EAAAA,cAAA,kBAAe;AAJL,SAAAA;AAAA,GAAA;AAOL,IAAK,iBAAL,kBAAKC,oBAAL;AACL,EAAAA,gBAAA,YAAS;AACT,EAAAA,gBAAA,SAAM;AAFI,SAAAA;AAAA,GAAA;AAKL,IAAK,eAAL,kBAAKC,kBAAL;AACL,EAAAA,cAAA,YAAS;AACT,EAAAA,cAAA,YAAS;AACT,EAAAA,cAAA,aAAU;AAHA,SAAAA;AAAA,GAAA;AAML,IAAK,aAAL,kBAAKC,gBAAL;AACL,EAAAA,YAAA,eAAY;AACZ,EAAAA,YAAA,UAAO;AAFG,SAAAA;AAAA,GAAA;AAKL,IAAK,cAAL,kBAAKC,iBAAL;AACL,EAAAA,aAAA,WAAQ;AACR,EAAAA,aAAA,UAAO;AAFG,SAAAA;AAAA,GAAA;AAKL,IAAK,wBAAL,kBAAKC,2BAAL;AACL,EAAAA,uBAAA,UAAO;AACP,EAAAA,uBAAA,cAAW;AAFD,SAAAA;AAAA,GAAA;AAKL,IAAK,qBAAL,kBAAKC,wBAAL;AACL,EAAAA,oBAAA,UAAO;AACP,EAAAA,oBAAA,sBAAmB;AACnB,EAAAA,oBAAA,cAAW;AACX,EAAAA,oBAAA,YAAS;AACT,EAAAA,oBAAA,eAAY;AACZ,EAAAA,oBAAA,cAAW;AAND,SAAAA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ationType","EnumAdShowOn","EnumAdPlatform","EnumAdStatus","EnumAdType","EnumAdStyle","EnumAdBookingSlotKind","EnumAdBookingState","EnumAdPaymentStatus","EnumAdApprovalStatus","EnumActivity","EnumPostType","EnumPostContentType","EnumGameStatus","EnumGameType","EnumAffiliateParticipantType","EnumAffiliateRewardType","EnumCouponQualificationType","EnumCouponListType"]}
@@ -11,7 +11,7 @@ import {
11
11
  import {
12
12
  PROMO_CODE_PREFIX,
13
13
  gameScreenIdentifierList
14
- } from "./chunk-RU6XOXWO.mjs";
14
+ } from "./chunk-2DDCCME4.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-RNY3JPNY.mjs.map
1938
+ //# sourceMappingURL=chunk-35EIWOKC.mjs.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  mapArrayToOptions
3
- } from "./chunk-RNY3JPNY.mjs";
3
+ } from "./chunk-35EIWOKC.mjs";
4
4
  import {
5
5
  EnumFoodFlavor
6
6
  } from "./chunk-A52C6JDT.mjs";
@@ -987,4 +987,4 @@ export {
987
987
  contactUsFields,
988
988
  partnerBasicInfoFields
989
989
  };
990
- //# sourceMappingURL=chunk-UN33JW2N.mjs.map
990
+ //# sourceMappingURL=chunk-3ETQ4BPX.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,24 @@ 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
+ }
2401
+ totals {
2402
+ clicks
2403
+ impressions
2404
+ }
2405
+ }
2406
+ }
2407
+ `;
2382
2408
 
2383
2409
  // src/graphql/mutations/adBooking.ts
2384
2410
  var CREATE_AD_CHECKOUT_MUTATION = gql23`
@@ -2684,6 +2710,34 @@ var useGetAdMetricTotals = (filter, skip = false) => {
2684
2710
  refetch
2685
2711
  };
2686
2712
  };
2713
+ var useGetResourceAdMetrics = (resourceId, resourceType) => {
2714
+ const skip = !resourceId || resourceId === "" || !resourceType;
2715
+ const { data, loading, error, refetch } = useQuery6(GET_RESOURCE_AD_METRICS, {
2716
+ fetchPolicy: "no-cache",
2717
+ skip,
2718
+ variables: skip ? void 0 : { resourceId, resourceType }
2719
+ });
2720
+ return {
2721
+ error,
2722
+ loading,
2723
+ refetch,
2724
+ resourceAdMetrics: data?.resourceAdMetrics ?? null
2725
+ };
2726
+ };
2727
+ var useGetResourceAds = (resourceId, resourceType) => {
2728
+ const skip = !resourceId || resourceId === "" || !resourceType;
2729
+ const { data, loading, error, refetch } = useQuery6(GET_RESOURCE_ADS, {
2730
+ fetchPolicy: "no-cache",
2731
+ skip,
2732
+ variables: skip ? void 0 : { resourceId, resourceType }
2733
+ });
2734
+ return {
2735
+ ads: data?.resourceAds ?? [],
2736
+ error,
2737
+ loading,
2738
+ refetch
2739
+ };
2740
+ };
2687
2741
 
2688
2742
  // src/graphql/hooks/resourceActivities/hooksMutation.ts
2689
2743
  import { useMutation as useMutation12 } from "@apollo/client";
@@ -4491,6 +4545,7 @@ export {
4491
4545
  GET_AD_DAILY_PRICES,
4492
4546
  GET_AD_SETTINGS,
4493
4547
  GET_AD_METRIC_TOTALS,
4548
+ GET_RESOURCE_AD_METRICS,
4494
4549
  CREATE_AD_CHECKOUT_MUTATION,
4495
4550
  APPROVE_AD_BOOKING_MUTATION,
4496
4551
  UPDATE_AD_DAILY_PRICE_MUTATION,
@@ -4507,6 +4562,8 @@ export {
4507
4562
  useGetAd,
4508
4563
  useGetAdsByRegion,
4509
4564
  useGetAdMetricTotals,
4565
+ useGetResourceAdMetrics,
4566
+ useGetResourceAds,
4510
4567
  useCreateResourceActivity,
4511
4568
  useGetResourceActivity,
4512
4569
  useCreateCheckoutSession,
@@ -4562,4 +4619,4 @@ export {
4562
4619
  useGetCoupon,
4563
4620
  usePaginatedList
4564
4621
  };
4565
- //# sourceMappingURL=chunk-2P66EBGO.mjs.map
4622
+ //# sourceMappingURL=chunk-DDPU7U6H.mjs.map