@timardex/cluemart-shared 1.7.52 → 1.7.53

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 (45) hide show
  1. package/dist/{ad-pKQyCByG.d.mts → ad-C4p6YSGQ.d.mts} +2 -2
  2. package/dist/{ad-34yU-w4_.d.ts → ad-mUnDAPSR.d.ts} +2 -2
  3. package/dist/{affiliate-BAPSapGb.d.mts → affiliate-BtwUxF_w.d.mts} +2 -2
  4. package/dist/{affiliate-CDTvlRy_.d.ts → affiliate-CVSQtlRk.d.ts} +2 -2
  5. package/dist/auth/index.d.mts +3 -3
  6. package/dist/auth/index.d.ts +3 -3
  7. package/dist/{chunk-Q2ZUHS2F.mjs → chunk-BHEP7DY7.mjs} +2 -2
  8. package/dist/{chunk-LA47T6CY.mjs → chunk-GW52WYYK.mjs} +1 -1
  9. package/dist/{chunk-LA47T6CY.mjs.map → chunk-GW52WYYK.mjs.map} +1 -1
  10. package/dist/{contactUs-BduAESy_.d.mts → contactUs-CfJflYDQ.d.mts} +1 -1
  11. package/dist/{contactUs-DibxoLX8.d.ts → contactUs-UWXzii_N.d.ts} +1 -1
  12. package/dist/formFields/index.d.mts +1 -1
  13. package/dist/formFields/index.d.ts +1 -1
  14. package/dist/formFields/index.mjs +2 -2
  15. package/dist/{global-ByrmQuY-.d.ts → global-SpvNInzo.d.ts} +1 -1
  16. package/dist/{global-Czw-WbJm.d.mts → global-eKtRdO3m.d.mts} +1 -1
  17. package/dist/graphql/index.d.mts +5 -5
  18. package/dist/graphql/index.d.ts +5 -5
  19. package/dist/hooks/index.cjs +8 -11
  20. package/dist/hooks/index.cjs.map +1 -1
  21. package/dist/hooks/index.d.mts +5 -5
  22. package/dist/hooks/index.d.ts +5 -5
  23. package/dist/hooks/index.mjs +10 -13
  24. package/dist/hooks/index.mjs.map +1 -1
  25. package/dist/index.cjs.map +1 -1
  26. package/dist/index.d.mts +1 -1
  27. package/dist/index.d.ts +1 -1
  28. package/dist/index.mjs.map +1 -1
  29. package/dist/map/index.d.mts +1 -1
  30. package/dist/map/index.d.ts +1 -1
  31. package/dist/{resourceActivities-Bc6LGgAC.d.mts → resourceActivities-Bh_nj9xh.d.mts} +1 -1
  32. package/dist/{resourceActivities-CRYuwJ-B.d.ts → resourceActivities-BxscFtkL.d.ts} +1 -1
  33. package/dist/sharing/index.d.mts +1 -1
  34. package/dist/sharing/index.d.ts +1 -1
  35. package/dist/types/index.cjs.map +1 -1
  36. package/dist/types/index.d.mts +7 -7
  37. package/dist/types/index.d.ts +7 -7
  38. package/dist/types/index.mjs +1 -1
  39. package/dist/{user-MFVGM3EX.d.mts → user-BvBpIU4z.d.mts} +1 -1
  40. package/dist/{user-DT6GjxaP.d.ts → user-CmGQOai2.d.ts} +1 -1
  41. package/dist/utils/index.d.mts +3 -3
  42. package/dist/utils/index.d.ts +3 -3
  43. package/dist/utils/index.mjs +2 -2
  44. package/package.json +1 -1
  45. /package/dist/{chunk-Q2ZUHS2F.mjs.map → chunk-BHEP7DY7.mjs.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  import { EnumPartnerType, EnumResourceType, EnumOSPlatform } from './enums/index.mjs';
2
- import { Q as BaseResourceType, L as LocationType, B as BaseResourceTypeFormData, a2 as CreateFormData, aL as ResourceContactDetailsType, aN as ResourceImageType, aO as SocialMediaType, aS as TermsAgreement, ao as OwnerType, aC as PromoCodeType, M as MutationResponse } from './global-Czw-WbJm.mjs';
2
+ import { Q as BaseResourceType, L as LocationType, B as BaseResourceTypeFormData, a2 as CreateFormData, aL as ResourceContactDetailsType, aN as ResourceImageType, aO as SocialMediaType, aS as TermsAgreement, ao as OwnerType, aC as PromoCodeType, M as MutationResponse } from './global-eKtRdO3m.mjs';
3
3
  import { PosterAssetId } from './images/index.mjs';
4
- import { S as SafeUserType } from './user-MFVGM3EX.mjs';
4
+ import { S as SafeUserType } from './user-BvBpIU4z.mjs';
5
5
 
6
6
  interface PartnerFormData extends BaseResourceTypeFormData {
7
7
  location: LocationType;
@@ -1,7 +1,7 @@
1
1
  import { EnumPartnerType, EnumResourceType, EnumOSPlatform } from './enums/index.js';
2
- import { Q as BaseResourceType, L as LocationType, B as BaseResourceTypeFormData, a2 as CreateFormData, aL as ResourceContactDetailsType, aN as ResourceImageType, aO as SocialMediaType, aS as TermsAgreement, ao as OwnerType, aC as PromoCodeType, M as MutationResponse } from './global-ByrmQuY-.js';
2
+ import { Q as BaseResourceType, L as LocationType, B as BaseResourceTypeFormData, a2 as CreateFormData, aL as ResourceContactDetailsType, aN as ResourceImageType, aO as SocialMediaType, aS as TermsAgreement, ao as OwnerType, aC as PromoCodeType, M as MutationResponse } from './global-SpvNInzo.js';
3
3
  import { PosterAssetId } from './images/index.js';
4
- import { S as SafeUserType } from './user-DT6GjxaP.js';
4
+ import { S as SafeUserType } from './user-CmGQOai2.js';
5
5
 
6
6
  interface PartnerFormData extends BaseResourceTypeFormData {
7
7
  location: LocationType;
@@ -1,6 +1,6 @@
1
1
  import { EnumResourceType } from './enums/index.mjs';
2
- import { aC as PromoCodeType, L as LocationType, aO as SocialMediaType, ao as OwnerType, a2 as CreateFormData } from './global-Czw-WbJm.mjs';
3
- import { U as UserFormData } from './user-MFVGM3EX.mjs';
2
+ import { aC as PromoCodeType, L as LocationType, aO as SocialMediaType, ao as OwnerType, a2 as CreateFormData } from './global-eKtRdO3m.mjs';
3
+ import { U as UserFormData } from './user-BvBpIU4z.mjs';
4
4
 
5
5
  declare enum EnumAffiliateParticipantType {
6
6
  INDIVIDUAL = "INDIVIDUAL",
@@ -1,6 +1,6 @@
1
1
  import { EnumResourceType } from './enums/index.js';
2
- import { aC as PromoCodeType, L as LocationType, aO as SocialMediaType, ao as OwnerType, a2 as CreateFormData } from './global-ByrmQuY-.js';
3
- import { U as UserFormData } from './user-DT6GjxaP.js';
2
+ import { aC as PromoCodeType, L as LocationType, aO as SocialMediaType, ao as OwnerType, a2 as CreateFormData } from './global-SpvNInzo.js';
3
+ import { U as UserFormData } from './user-CmGQOai2.js';
4
4
 
5
5
  declare enum EnumAffiliateParticipantType {
6
6
  INDIVIDUAL = "INDIVIDUAL",
@@ -1,9 +1,9 @@
1
1
  import { EnumUserRole, EnumResourceType, EnumUserLicence } from '../enums/index.mjs';
2
- import { P as Permission, S as SafeUserType } from '../user-MFVGM3EX.mjs';
3
- export { a as PERMISSIONS, W as WILDCARD_PERMISSION } from '../user-MFVGM3EX.mjs';
2
+ import { P as Permission, S as SafeUserType } from '../user-BvBpIU4z.mjs';
3
+ export { a as PERMISSIONS, W as WILDCARD_PERMISSION } from '../user-BvBpIU4z.mjs';
4
4
  import { T as Tier } from '../subscription-bmAdrnfi.mjs';
5
5
  import React, { ReactNode } from 'react';
6
- import '../global-Czw-WbJm.mjs';
6
+ import '../global-eKtRdO3m.mjs';
7
7
  import 'react-hook-form';
8
8
 
9
9
  type AuthManager = {
@@ -1,9 +1,9 @@
1
1
  import { EnumUserRole, EnumResourceType, EnumUserLicence } from '../enums/index.js';
2
- import { P as Permission, S as SafeUserType } from '../user-DT6GjxaP.js';
3
- export { a as PERMISSIONS, W as WILDCARD_PERMISSION } from '../user-DT6GjxaP.js';
2
+ import { P as Permission, S as SafeUserType } from '../user-CmGQOai2.js';
3
+ export { a as PERMISSIONS, W as WILDCARD_PERMISSION } from '../user-CmGQOai2.js';
4
4
  import { T as Tier } from '../subscription-BU8GvH2K.js';
5
5
  import React, { ReactNode } from 'react';
6
- import '../global-ByrmQuY-.js';
6
+ import '../global-SpvNInzo.js';
7
7
  import 'react-hook-form';
8
8
 
9
9
  type AuthManager = {
@@ -10,7 +10,7 @@ import {
10
10
  import {
11
11
  PROMO_CODE_PREFIX,
12
12
  gameScreenIdentifierList
13
- } from "./chunk-LA47T6CY.mjs";
13
+ } from "./chunk-GW52WYYK.mjs";
14
14
  import {
15
15
  isTransientNetworkError
16
16
  } from "./chunk-RAYUJODN.mjs";
@@ -1696,4 +1696,4 @@ export {
1696
1696
  toUserFacingErrorMessage,
1697
1697
  getErrorMessage
1698
1698
  };
1699
- //# sourceMappingURL=chunk-Q2ZUHS2F.mjs.map
1699
+ //# sourceMappingURL=chunk-BHEP7DY7.mjs.map
@@ -232,4 +232,4 @@ export {
232
232
  EnumCouponQualificationType,
233
233
  EnumCouponListType
234
234
  };
235
- //# sourceMappingURL=chunk-LA47T6CY.mjs.map
235
+ //# sourceMappingURL=chunk-GW52WYYK.mjs.map
@@ -1 +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 PromoCodeType,\n TermsAgreement,\n} from \"src\";\n\nimport { MutationResponse } from \"./global\";\nimport { SafeUserType } 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 = {\n email: string;\n firstName: string;\n lastName: string;\n password: string;\n platform?: EnumOSPlatform;\n preferredRegion: string;\n promoCode?: PromoCodeType | null;\n termsAgreement?: TermsAgreement | 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 RefreshTokenPayloadType = {\n refreshToken: string;\n token: string;\n};\n\nexport type RefreshTokenMutationResponse =\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 EnumResourceType,\n EnumSocialMedia,\n EnumUserLicence,\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: string;\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 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 interface Category {\n color?: string | 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\nexport interface UseGetResourcesByRegionOptions {\n onlyClaimed?: boolean;\n limit?: number;\n offset?: number;\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 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 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 clicks?: number; // How many times the ad was clicked\n createdAt: Date;\n impressions?: number; // How often the ad was seen\n start: Date; // ISO date string\n updatedAt: Date | null;\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\">;\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 MARKET_FACES = \"market_faces\",\n CLUE_BITES = \"clue_bites\",\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 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 overallPoints: number;\n owner: OwnerType;\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 your actions turn into a timeline.\",\n id: \"activities\",\n match: \"/profile/activities\",\n },\n {\n clue: \"Where conversations happen without speaking.\",\n id: \"chat\",\n match: \"/profile/chat\",\n },\n {\n clue: \"The place to redefine who you are.\",\n id: \"edit-profile\",\n match: \"/profile/edit-profile\",\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: \"/games\",\n },\n {\n clue: \"Your starting point for everything.\",\n id: \"home\",\n match: \"/\",\n },\n {\n clue: \"Where the app whispers what you shouldn’t miss.\",\n id: \"notifications\",\n match: \"/notifications\",\n },\n {\n clue: \"Where you fine-tune your experience.\",\n id: \"options\",\n match: \"/options\",\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: \"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: \"Your identity, on display.\",\n id: \"profile\",\n match: \"/profile\",\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] 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 collected: string[] | null; // The letters the user has found, e.g. [\"C\", \"L\", \"U\"]\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 \"src/enums\";\n\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 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\n | CouponMarketVisitOption\n | 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;\n};\n\nexport type CouponDefaultsFormData = {\n couponDescription: string;\n couponOption: CouponOption;\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 createdAt: Date;\n updatedAt: Date | null;\n userId: string;\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;\n createdAt: Date;\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":";AAUO,IAAK,uBAAL,kBAAKA,0BAAL;AACL,EAAAA,sBAAA,cAAW;AACX,EAAAA,sBAAA,oBAAiB;AAFP,SAAAA;AAAA,GAAA;;;ACaL,IAAM,oBAAoB;;;ACnB1B,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,eAAL,kBAAKC,kBAAL;AACL,EAAAA,cAAA,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E,MAAM;AAAA,IACN,IAAI;AAAA,IACJ,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,IAAI;AAAA,IACJ,OAAO;AAAA,EACT;AACF;;;ACrGO,IAAK,eAAL,kBAAKC,kBAAL;AACL,EAAAA,cAAA,gBAAa;AACb,EAAAA,cAAA,eAAY;AACZ,EAAAA,cAAA,iBAAc;AAHJ,SAAAA;AAAA,GAAA;AAWL,IAAM,wBAAsD;AAAA,EACjE,CAAC,4BAAuB,GAAG;AAAA,EAC3B,CAAC,0BAAsB,GAAG;AAAA,EAC1B,CAAC,6BAAwB,GAAG;AAC9B;;;ACJO,IAAK,+BAAL,kBAAKC,kCAAL;AACL,EAAAA,8BAAA,gBAAa;AACb,EAAAA,8BAAA,iBAAc;AACd,EAAAA,8BAAA,aAAU;AAHA,SAAAA;AAAA,GAAA;AA6BL,IAAK,0BAAL,kBAAKC,6BAAL;AACL,EAAAA,yBAAA,4CAAyC;AACzC,EAAAA,yBAAA,gCAA6B;AAC7B,EAAAA,yBAAA,oCAAiC;AACjC,EAAAA,yBAAA,yCAAsC;AACtC,EAAAA,yBAAA,4BAAyB;AACzB,EAAAA,yBAAA,6BAA0B;AANhB,SAAAA;AAAA,GAAA;;;AC9BL,IAAK,8BAAL,kBAAKC,iCAAL;AACL,EAAAA,6BAAA,cAAW;AACX,EAAAA,6BAAA,kBAAe;AACf,EAAAA,6BAAA,qBAAkB;AAHR,SAAAA;AAAA,GAAA;AA8FL,IAAK,qBAAL,kBAAKC,wBAAL;AACL,EAAAA,oBAAA,YAAS;AACT,EAAAA,oBAAA,WAAQ;AACR,EAAAA,oBAAA,aAAU;AAHA,SAAAA;AAAA,GAAA;","names":["EnumVerificationType","EnumAdShowOn","EnumAdStatus","EnumAdType","EnumAdStyle","EnumActivity","EnumPostType","EnumPostContentType","EnumGameStatus","EnumGameType","EnumAffiliateParticipantType","EnumAffiliateRewardType","EnumCouponQualificationType","EnumCouponListType"]}
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 PromoCodeType,\n TermsAgreement,\n} from \"src\";\n\nimport { MutationResponse } from \"./global\";\nimport { SafeUserType } 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 = {\n email: string;\n firstName: string;\n lastName: string;\n password: string;\n platform?: EnumOSPlatform;\n preferredRegion: string;\n promoCode?: PromoCodeType | null;\n termsAgreement?: TermsAgreement | 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 RefreshTokenPayloadType = {\n refreshToken: string;\n token: string;\n};\n\nexport type RefreshTokenMutationResponse =\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 EnumResourceType,\n EnumSocialMedia,\n EnumUserLicence,\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: string;\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 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 interface Category {\n color?: string | 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\nexport interface UseGetResourcesByRegionOptions {\n onlyClaimed?: boolean;\n limit?: number;\n offset?: number;\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 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 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 clicks?: number; // How many times the ad was clicked\n createdAt: Date;\n impressions?: number; // How often the ad was seen\n start: Date; // ISO date string\n updatedAt: Date | null;\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\">;\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 MARKET_FACES = \"market_faces\",\n CLUE_BITES = \"clue_bites\",\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 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 overallPoints: number;\n owner: OwnerType;\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 your actions turn into a timeline.\",\n id: \"activities\",\n match: \"/profile/activities\",\n },\n {\n clue: \"Where conversations happen without speaking.\",\n id: \"chat\",\n match: \"/profile/chat\",\n },\n {\n clue: \"The place to redefine who you are.\",\n id: \"edit-profile\",\n match: \"/profile/edit-profile\",\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: \"/games\",\n },\n {\n clue: \"Your starting point for everything.\",\n id: \"home\",\n match: \"/\",\n },\n {\n clue: \"Where the app whispers what you shouldn’t miss.\",\n id: \"notifications\",\n match: \"/notifications\",\n },\n {\n clue: \"Where you fine-tune your experience.\",\n id: \"options\",\n match: \"/options\",\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: \"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: \"Your identity, on display.\",\n id: \"profile\",\n match: \"/profile\",\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] 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 collected: string[] | null; // The letters the user has found, e.g. [\"C\", \"L\", \"U\"]\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 \"src/enums\";\n\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 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\n | CouponMarketVisitOption\n | 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;\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 createdAt: Date;\n updatedAt: Date | null;\n userId: string;\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;\n createdAt: Date;\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":";AAUO,IAAK,uBAAL,kBAAKA,0BAAL;AACL,EAAAA,sBAAA,cAAW;AACX,EAAAA,sBAAA,oBAAiB;AAFP,SAAAA;AAAA,GAAA;;;ACaL,IAAM,oBAAoB;;;ACnB1B,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,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;AA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AAWL,IAAM,wBAAsD;AAAA,EACjE,CAAC,4BAAuB,GAAG;AAAA,EAC3B,CAAC,0BAAsB,GAAG;AAAA,EAC1B,CAAC,6BAAwB,GAAG;AAC9B;;;ACJO,IAAK,+BAAL,kBAAKC,kCAAL;AACL,EAAAA,8BAAA,gBAAa;AACb,EAAAA,8BAAA,iBAAc;AACd,EAAAA,8BAAA,aAAU;AAHA,SAAAA;AAAA,GAAA;AA6BL,IAAK,0BAAL,kBAAKC,6BAAL;AACL,EAAAA,yBAAA,4CAAyC;AACzC,EAAAA,yBAAA,gCAA6B;AAC7B,EAAAA,yBAAA,oCAAiC;AACjC,EAAAA,yBAAA,yCAAsC;AACtC,EAAAA,yBAAA,4BAAyB;AACzB,EAAAA,yBAAA,6BAA0B;AANhB,SAAAA;AAAA,GAAA;;;AC9BL,IAAK,8BAAL,kBAAKC,iCAAL;AACL,EAAAA,6BAAA,cAAW;AACX,EAAAA,6BAAA,kBAAe;AACf,EAAAA,6BAAA,qBAAkB;AAHR,SAAAA;AAAA,GAAA;AA8FL,IAAK,qBAAL,kBAAKC,wBAAL;AACL,EAAAA,oBAAA,YAAS;AACT,EAAAA,oBAAA,WAAQ;AACR,EAAAA,oBAAA,aAAU;AAHA,SAAAA;AAAA,GAAA;","names":["EnumVerificationType","EnumAdShowOn","EnumAdStatus","EnumAdType","EnumAdStyle","EnumActivity","EnumPostType","EnumPostContentType","EnumGameStatus","EnumGameType","EnumAffiliateParticipantType","EnumAffiliateRewardType","EnumCouponQualificationType","EnumCouponListType"]}
@@ -1,4 +1,4 @@
1
- import { a2 as CreateFormData } from './global-Czw-WbJm.mjs';
1
+ import { a2 as CreateFormData } from './global-eKtRdO3m.mjs';
2
2
 
3
3
  type ContactUsFormData = {
4
4
  email: string;
@@ -1,4 +1,4 @@
1
- import { a2 as CreateFormData } from './global-ByrmQuY-.js';
1
+ import { a2 as CreateFormData } from './global-SpvNInzo.js';
2
2
 
3
3
  type ContactUsFormData = {
4
4
  email: string;
@@ -1,4 +1,4 @@
1
- import { O as OptionItem, F as FormField, a as FormDateField, R as RefundPolicy, b as Requirement, S as StallType, C as Category } from '../global-Czw-WbJm.mjs';
1
+ import { O as OptionItem, F as FormField, a as FormDateField, R as RefundPolicy, b as Requirement, S as StallType, C as Category } from '../global-eKtRdO3m.mjs';
2
2
  import 'react-hook-form';
3
3
  import '../enums/index.mjs';
4
4
 
@@ -1,4 +1,4 @@
1
- import { O as OptionItem, F as FormField, a as FormDateField, R as RefundPolicy, b as Requirement, S as StallType, C as Category } from '../global-ByrmQuY-.js';
1
+ import { O as OptionItem, F as FormField, a as FormDateField, R as RefundPolicy, b as Requirement, S as StallType, C as Category } from '../global-SpvNInzo.js';
2
2
  import 'react-hook-form';
3
3
  import '../enums/index.js';
4
4
 
@@ -46,9 +46,9 @@ import {
46
46
  import {
47
47
  availableCategories,
48
48
  categoryColors
49
- } from "../chunk-Q2ZUHS2F.mjs";
49
+ } from "../chunk-BHEP7DY7.mjs";
50
50
  import "../chunk-SD42WIMV.mjs";
51
- import "../chunk-LA47T6CY.mjs";
51
+ import "../chunk-GW52WYYK.mjs";
52
52
  import "../chunk-RAYUJODN.mjs";
53
53
  import "../chunk-DQ7ZHIXW.mjs";
54
54
  import "../chunk-X3OLM35T.mjs";
@@ -414,7 +414,7 @@ type CouponVendorProduct = {
414
414
  };
415
415
  type CouponDefaultsFormData = {
416
416
  couponDescription: string;
417
- couponOption: CouponOption;
417
+ couponOption: CouponOption | null;
418
418
  couponVendorProducts?: CouponVendorProduct[];
419
419
  endDate: Date;
420
420
  resourceId: string;
@@ -414,7 +414,7 @@ type CouponVendorProduct = {
414
414
  };
415
415
  type CouponDefaultsFormData = {
416
416
  couponDescription: string;
417
- couponOption: CouponOption;
417
+ couponOption: CouponOption | null;
418
418
  couponVendorProducts?: CouponVendorProduct[];
419
419
  endDate: Date;
420
420
  resourceId: string;
@@ -1,11 +1,11 @@
1
1
  import * as _apollo_client from '@apollo/client';
2
2
  import { DocumentNode } from 'graphql';
3
- import { A as AdminUpdateResourceType, C as ChatType, R as ReportChatUser, N as NotificationType, a as NotificationCount, b as ResourceActivityType } from '../resourceActivities-Bc6LGgAC.mjs';
4
- import { M as MutationResponse, E as EventType, c as EventListItemType, d as EventInfoType, U as UseGetResourcesByRegionOptions, P as PosterUsageType, e as RelationType, f as ResourceConnectionsType, V as VendorClaimTokenValidation, g as UnregisteredVendorType, h as VendorType, i as VendorInfoType, j as MyPendingVendorClaim, k as UserLicenceType, l as PostType, m as EnumPostType, G as GameDocType, n as GameLeaderboard, o as CouponType, p as CouponTypeList } from '../global-Czw-WbJm.mjs';
5
- import { A as AuthMutationResponse, R as RefreshTokenMutationResponse, P as PartnerType, a as AdType, E as EnumAdStatus, b as AppSettingsType, S as SchoolType, c as SchoolReturnType } from '../ad-pKQyCByG.mjs';
3
+ import { A as AdminUpdateResourceType, C as ChatType, R as ReportChatUser, N as NotificationType, a as NotificationCount, b as ResourceActivityType } from '../resourceActivities-Bh_nj9xh.mjs';
4
+ import { M as MutationResponse, E as EventType, c as EventListItemType, d as EventInfoType, U as UseGetResourcesByRegionOptions, P as PosterUsageType, e as RelationType, f as ResourceConnectionsType, V as VendorClaimTokenValidation, g as UnregisteredVendorType, h as VendorType, i as VendorInfoType, j as MyPendingVendorClaim, k as UserLicenceType, l as PostType, m as EnumPostType, G as GameDocType, n as GameLeaderboard, o as CouponType, p as CouponTypeList } from '../global-eKtRdO3m.mjs';
5
+ import { A as AuthMutationResponse, R as RefreshTokenMutationResponse, P as PartnerType, a as AdType, E as EnumAdStatus, b as AppSettingsType, S as SchoolType, c as SchoolReturnType } from '../ad-C4p6YSGQ.mjs';
6
6
  import { EnumEventDateStatus, EnumResourceType } from '../enums/index.mjs';
7
- import { S as SafeUserType, R as RedeemRewardMutationResponse, b as ResourceByUser, c as SubscriptionPlansResponse, d as SubscriptionStatusData } from '../user-MFVGM3EX.mjs';
8
- import { A as AffiliateType } from '../affiliate-BAPSapGb.mjs';
7
+ import { S as SafeUserType, R as RedeemRewardMutationResponse, b as ResourceByUser, c as SubscriptionPlansResponse, d as SubscriptionStatusData } from '../user-BvBpIU4z.mjs';
8
+ import { A as AffiliateType } from '../affiliate-BtwUxF_w.mjs';
9
9
  import 'react-hook-form';
10
10
  import '../images/index.mjs';
11
11
 
@@ -1,11 +1,11 @@
1
1
  import * as _apollo_client from '@apollo/client';
2
2
  import { DocumentNode } from 'graphql';
3
- import { A as AdminUpdateResourceType, C as ChatType, R as ReportChatUser, N as NotificationType, a as NotificationCount, b as ResourceActivityType } from '../resourceActivities-CRYuwJ-B.js';
4
- import { M as MutationResponse, E as EventType, c as EventListItemType, d as EventInfoType, U as UseGetResourcesByRegionOptions, P as PosterUsageType, e as RelationType, f as ResourceConnectionsType, V as VendorClaimTokenValidation, g as UnregisteredVendorType, h as VendorType, i as VendorInfoType, j as MyPendingVendorClaim, k as UserLicenceType, l as PostType, m as EnumPostType, G as GameDocType, n as GameLeaderboard, o as CouponType, p as CouponTypeList } from '../global-ByrmQuY-.js';
5
- import { A as AuthMutationResponse, R as RefreshTokenMutationResponse, P as PartnerType, a as AdType, E as EnumAdStatus, b as AppSettingsType, S as SchoolType, c as SchoolReturnType } from '../ad-34yU-w4_.js';
3
+ import { A as AdminUpdateResourceType, C as ChatType, R as ReportChatUser, N as NotificationType, a as NotificationCount, b as ResourceActivityType } from '../resourceActivities-BxscFtkL.js';
4
+ import { M as MutationResponse, E as EventType, c as EventListItemType, d as EventInfoType, U as UseGetResourcesByRegionOptions, P as PosterUsageType, e as RelationType, f as ResourceConnectionsType, V as VendorClaimTokenValidation, g as UnregisteredVendorType, h as VendorType, i as VendorInfoType, j as MyPendingVendorClaim, k as UserLicenceType, l as PostType, m as EnumPostType, G as GameDocType, n as GameLeaderboard, o as CouponType, p as CouponTypeList } from '../global-SpvNInzo.js';
5
+ import { A as AuthMutationResponse, R as RefreshTokenMutationResponse, P as PartnerType, a as AdType, E as EnumAdStatus, b as AppSettingsType, S as SchoolType, c as SchoolReturnType } from '../ad-mUnDAPSR.js';
6
6
  import { EnumEventDateStatus, EnumResourceType } from '../enums/index.js';
7
- import { S as SafeUserType, R as RedeemRewardMutationResponse, b as ResourceByUser, c as SubscriptionPlansResponse, d as SubscriptionStatusData } from '../user-DT6GjxaP.js';
8
- import { A as AffiliateType } from '../affiliate-CDTvlRy_.js';
7
+ import { S as SafeUserType, R as RedeemRewardMutationResponse, b as ResourceByUser, c as SubscriptionPlansResponse, d as SubscriptionStatusData } from '../user-CmGQOai2.js';
8
+ import { A as AffiliateType } from '../affiliate-CVSQtlRk.js';
9
9
  import 'react-hook-form';
10
10
  import '../images/index.js';
11
11
 
@@ -6001,21 +6001,21 @@ var couponPurchaseOptionSchema = yup10.object().shape({
6001
6001
  }),
6002
6002
  type: yup10.mixed().oneOf(["PURCHASE" /* PURCHASE */], "Type must be PURCHASE").required("Type is required"),
6003
6003
  unit: yup10.string().label("Unit").trim().required("Unit is required")
6004
- });
6004
+ }).nullable().defined("Coupon option is required");
6005
6005
  var couponMarketVisitOptionSchema = yup10.object().shape({
6006
6006
  type: yup10.mixed().oneOf(
6007
6007
  ["MARKET_VISIT" /* MARKET_VISIT */],
6008
6008
  "Type must be MARKET_VISIT"
6009
6009
  ).required("Type is required"),
6010
6010
  visits: yup10.number().transform((_, originalValue) => toOptionalNumber(originalValue)).label("Visits").typeError("Visits must be a number").integer("Visits must be a whole number").min(1, "Visits must be at least 1").required("Visits is required")
6011
- });
6011
+ }).nullable().defined("Coupon option is required");
6012
6012
  var couponMarketPassportOptionSchema = yup10.object().shape({
6013
6013
  type: yup10.mixed().oneOf(
6014
6014
  ["MARKET_PASSPORT" /* MARKET_PASSPORT */],
6015
6015
  "Type must be MARKET_PASSPORT"
6016
6016
  ).required("Type is required"),
6017
6017
  visits: yup10.number().transform((_, originalValue) => toOptionalNumber(originalValue)).label("Visits").typeError("Visits must be a number").integer("Visits must be a whole number").min(1, "Visits must be at least 1").required("Visits is required")
6018
- });
6018
+ }).nullable().defined("Coupon option is required");
6019
6019
  var couponOptionSchema = yup10.lazy((value) => {
6020
6020
  const type = value?.type;
6021
6021
  if (type === "MARKET_VISIT" /* MARKET_VISIT */) {
@@ -7455,21 +7455,18 @@ function useAffiliateForm(data) {
7455
7455
 
7456
7456
  // src/hooks/useCouponForm.tsx
7457
7457
  var import_yup19 = require("@hookform/resolvers/yup");
7458
+ var import_dayjs4 = __toESM(require("dayjs"));
7458
7459
  var React12 = __toESM(require("react"));
7459
7460
  var import_react_hook_form19 = require("react-hook-form");
7461
+ var defaultDate = (0, import_dayjs4.default)().add(1, "day").toDate();
7460
7462
  var defaultValues11 = {
7461
7463
  couponDescription: "",
7462
- couponOption: {
7463
- buy: 0,
7464
- get: 0,
7465
- type: "PURCHASE" /* PURCHASE */,
7466
- unit: ""
7467
- },
7464
+ couponOption: null,
7468
7465
  couponVendorProducts: [],
7469
- endDate: /* @__PURE__ */ new Date(),
7466
+ endDate: defaultDate,
7470
7467
  resourceId: "",
7471
7468
  resourceType: "",
7472
- startDate: /* @__PURE__ */ new Date()
7469
+ startDate: defaultDate
7473
7470
  };
7474
7471
  function useCouponForm(data) {
7475
7472
  const {