@timardex/cluemart-shared 1.5.721 → 1.5.723

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 (44) hide show
  1. package/dist/{chunk-KFTS32TG.mjs → chunk-3AI2ROPT.mjs} +43 -14
  2. package/dist/chunk-3AI2ROPT.mjs.map +1 -0
  3. package/dist/{chunk-6B75Q67V.mjs → chunk-4SNW63TJ.mjs} +2 -1
  4. package/dist/{chunk-6B75Q67V.mjs.map → chunk-4SNW63TJ.mjs.map} +1 -1
  5. package/dist/{chunk-JZY6HGS7.mjs → chunk-6IEQBYEB.mjs} +3 -3
  6. package/dist/{chunk-PWJWWXIP.mjs → chunk-HGS6TJTA.mjs} +35 -3
  7. package/dist/chunk-HGS6TJTA.mjs.map +1 -0
  8. package/dist/{chunk-PRAR43V7.mjs → chunk-SG3S3VQ2.mjs} +2 -2
  9. package/dist/enums/index.cjs +1 -0
  10. package/dist/enums/index.cjs.map +1 -1
  11. package/dist/enums/index.d.mts +2 -1
  12. package/dist/enums/index.d.ts +2 -1
  13. package/dist/enums/index.mjs +1 -1
  14. package/dist/formFields/index.cjs +16 -0
  15. package/dist/formFields/index.cjs.map +1 -1
  16. package/dist/formFields/index.mjs +3 -3
  17. package/dist/graphql/index.cjs +42 -13
  18. package/dist/graphql/index.cjs.map +1 -1
  19. package/dist/graphql/index.d.mts +5 -5
  20. package/dist/graphql/index.d.ts +5 -5
  21. package/dist/graphql/index.mjs +2 -2
  22. package/dist/hooks/index.cjs +49 -7
  23. package/dist/hooks/index.cjs.map +1 -1
  24. package/dist/hooks/index.mjs +5 -5
  25. package/dist/index.cjs +79 -13
  26. package/dist/index.cjs.map +1 -1
  27. package/dist/index.d.mts +14 -6
  28. package/dist/index.d.ts +14 -6
  29. package/dist/index.mjs +75 -13
  30. package/dist/index.mjs.map +1 -1
  31. package/dist/sharing/index.cjs +16 -0
  32. package/dist/sharing/index.cjs.map +1 -1
  33. package/dist/sharing/index.mjs +3 -3
  34. package/dist/types/index.mjs +1 -1
  35. package/dist/utils/index.cjs +36 -0
  36. package/dist/utils/index.cjs.map +1 -1
  37. package/dist/utils/index.d.mts +10 -3
  38. package/dist/utils/index.d.ts +10 -3
  39. package/dist/utils/index.mjs +10 -2
  40. package/package.json +1 -1
  41. package/dist/chunk-KFTS32TG.mjs.map +0 -1
  42. package/dist/chunk-PWJWWXIP.mjs.map +0 -1
  43. /package/dist/{chunk-JZY6HGS7.mjs.map → chunk-6IEQBYEB.mjs.map} +0 -0
  44. /package/dist/{chunk-PRAR43V7.mjs.map → chunk-SG3S3VQ2.mjs.map} +0 -0
package/dist/index.d.mts CHANGED
@@ -201,7 +201,8 @@ declare enum EnumEventDateStatus {
201
201
  UPCOMING = "Upcoming",
202
202
  ENDED = "Ended",
203
203
  RE_SCHEDULED = "Rescheduled",
204
- CANCELED = "Canceled"
204
+ CANCELED = "Canceled",
205
+ INVALID = "Invalid"
205
206
  }
206
207
  declare enum EnumSubscriptionStatus {
207
208
  ACTIVE = "active",
@@ -1750,7 +1751,7 @@ declare const useUpdateEventInfo: () => {
1750
1751
  }>>;
1751
1752
  };
1752
1753
 
1753
- declare const useGetEvents: () => {
1754
+ declare const useGetEvents: (dateStatus?: EnumEventDateStatus) => {
1754
1755
  error: _apollo_client.ApolloError | undefined;
1755
1756
  events: EventListItemType[];
1756
1757
  loading: boolean;
@@ -1774,7 +1775,7 @@ declare const useGetEventByPlaceId: (googlePlaceId: string) => {
1774
1775
  eventByPlaceId: EventListItemType | null;
1775
1776
  }>>;
1776
1777
  };
1777
- declare const useGetEventsByRegion: (region: string, options?: UseGetResourcesByRegionOptions) => {
1778
+ declare const useGetEventsByRegion: (region: string, options?: UseGetResourcesByRegionOptions, dateStatus?: EnumEventDateStatus) => {
1778
1779
  error: _apollo_client.ApolloError | undefined;
1779
1780
  eventsByRegion: EventListItemType[];
1780
1781
  fetchMore: <TFetchData = {
@@ -1794,7 +1795,7 @@ declare const useGetEventsByRegion: (region: string, options?: UseGetResourcesBy
1794
1795
  eventsByRegion: EventListItemType[];
1795
1796
  }>>;
1796
1797
  };
1797
- declare const useSearchEvents: (region: string, search?: string, tags?: string[]) => {
1798
+ declare const useSearchEvents: (region: string, searchQuery?: string, tags?: string[], dateStatus?: EnumEventDateStatus) => {
1798
1799
  error: _apollo_client.ApolloError | undefined;
1799
1800
  eventsSearch: EventListItemType[];
1800
1801
  loading: boolean;
@@ -1806,7 +1807,7 @@ declare const useGetEventsNearMe: (location: {
1806
1807
  latitude: number;
1807
1808
  longitude: number;
1808
1809
  radius?: number;
1809
- }) => {
1810
+ }, dateStatus?: EnumEventDateStatus) => {
1810
1811
  error: _apollo_client.ApolloError | undefined;
1811
1812
  eventsNearMe: EventListItemType[];
1812
1813
  loading: boolean;
@@ -2915,4 +2916,11 @@ declare const rewardNiceNames: Record<EnumReward, {
2915
2916
  declare const SCHOOL_MIN_STUDENT_COUNT = 300;
2916
2917
  declare const SCHOOL_MAX_STUDENT_COUNT = 0;
2917
2918
 
2918
- export { ANDROID_URL, type AdFormData, type AdFormState, type AdResource, type AdType, type AdminUpdateResourceType, type AppSettingsFormData, type AppSettingsType, type AssociateType, type AuthPayloadType, type BadgeBasename, type BadgeId, type BaseGameMap, type BaseGameType, type BaseResourceType, type BaseResourceTypeFormData, CLUEMART_MAIN_DOMAIN_URL, type Category, type ChatMessageInput, type ChatMessageReaction, type ChatMessageReplyPreview, type ChatMessageSeen, type ChatMessageType, type ChatType, type CluiImageBasename, type CluiImageId, type ContactUsFormData, type CreateAdFormData, type CreateAdFormState, type CreateAppSettingsFormData, type CreateBulkNotificationInput, type CreateContactUsFormData, type CreateEventFormData, type CreateEventInfoFormData, type CreateFormData, type CreateLoginFormData, type CreatePartnerFormData, type CreatePostFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateSchoolFormData, type CreateUnregisteredVendorFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type CreateVendorFormData, type CreateVendorInfoFormData, DEFAULT_RESOURCES_RETURN_LIMIT, DEFAULT_RESOURCES_RETURN_OFFSET, DEFAULT_SHARE_OG_IMAGE, type DailyClueBaseGame, type DailyClueGameData, type DateTimeType, type DateTimeWithPriceType, type DeviceInfo, EnumActivity, EnumAdShowOn, EnumAdStatus, EnumAdStyle, EnumAdType, EnumBillingPeriod, EnumChatReportReason, EnumChatType, EnumEventDateStatus, EnumEventType, EnumFoodFlavor, EnumFoodType, EnumGameStatus, EnumGameType, EnumInviteStatus, EnumNotificationResourceType, EnumNotificationType, EnumOSPlatform, EnumPartnerType, EnumPaymentMethod, EnumPostContentType, EnumPostType, EnumRegions, EnumRelationResource, EnumResourceType, EnumReward, EnumSocialMedia, EnumSubscriptionStatus, EnumUserLicence, EnumUserRole, EnumVendorType, EnumVerificationType, type EventFormData, type EventInfoFormData, type EventInfoType, type EventListItemType, type EventStatusType, type EventType, type FormDateField, type FormField, type GameDate, type GameDocType, type GameHistory, type GameLeaderboard, type GamePlacement, type GamePlacementClue, type GameType, type GeocodeLocation, type GlobalGameData, type GoogleAddressComponent, type GoogleImportedMarket, IMAGE_EXTENSION, IOS_URL, type IconBasename, type IconId, type ImageObjectType, ImageTypeEnum, type LocationGeoType, type LocationType, type LoginFormData, type LogoBasename, type LogoId, type MarketingMaterialRequestInputType, type NotificationCount, type NotificationDataType, type NotificationType, type Nullable, OG_DESCRIPTION_LINE_BREAK, type OptionItem, type OtherImagesBasename, type OtherImagesId, type OwnerType, POST_SHARE_RESOURCE_TYPES, PROMO_CODE_PREFIX, PUBLIC_SHARE_PATH_TYPES, type ParticipantType, type PartnerFormData, type PartnerType, type PaymentInfoType, type PostContentData, type PostContentFormData, type PostContentGame, type PostContentImage, type PostContentList, type PostContentTextarea, type PostContentType, type PostContentVideo, type PostFileInput, type PostFormData, type PostShareResourceType, type PostType, type PosterAssetId, type PosterImageBasename, type PosterInputType, type PosterUsageType, type PromoCodeType, type PublicSharePathType, type PushTokenType, type PuzzleAnswer, type PuzzleAnsweredQuestion, type PuzzleBaseGame, type PuzzleGameData, type PuzzleQuestion, RELATION_SHARE_APPLICATION, RELATION_SHARE_INVITATION, RELATION_SHARE_RESOURCE_TYPES, RESOURCE_SHARE_TYPES, type RedeemRewardInput, type RedeemRewardResponse, type RedeemedReward, type RefreshTokenPayloadType, type RefundPolicy, type Region, type RegisterFormData, type RelationDate, type RelationInputType, type RelationSharePathType, type RelationShareResourceType, type RelationType, type ReportChatUser, type RequestPasswordResetFormData, type Requirement, type ResetPasswordFormData, type ResourceActivityEntry, type ResourceActivityInputType, type ResourceActivityType, type ResourceByUser, type ResourceConnectionsType, type ResourceContactDetailsType, type ResourceDetails, type ResourceImageType, type ResourceShareType, SAVED_EMAIL_KEY, SAVED_PASSWORD_KEY, SAVED_REFRESH_TOKEN_KEY, SAVED_TOKEN_KEY, SCHOOL_MAX_STUDENT_COUNT, SCHOOL_MIN_STUDENT_COUNT, SHARE_APPLICATION_DEADLINE_PREFIX, SHARE_CALENDAR_ICON, SHARE_CATEGORIES_SECTION_HEADING, SHARE_CATEGORY_ICON, SHARE_CHECKMARK_ICON, SHARE_CLOCK_ICON, SHARE_COMPLIANCE_PREFIX, SHARE_DESCRIPTION_SECTION_BREAK, SHARE_DOLLAR_ICON, SHARE_FOOD_TRUCK_LINE, SHARE_INFO_ICON, SHARE_MARKET_DATES_SECTION_HEADING, SHARE_MORE_INFO_LINE, SHARE_PRICE_RANGE_PREFIX, SHARE_RAIN_OR_SHINE_LINE, SHARE_REQUIREMENTS_SECTION_HEADING, SHARE_RESOURCE_LABEL, SHARE_RULER_ICON, SHARE_SITE_URL, SHARE_STALL_SIZE_PREFIX, SHARE_TAGS_SECTION_HEADING, SHARE_TYPE_PATH_REGEX, type SafeUserType, type SchoolCampaignType, type SchoolFormData, type SchoolRegisteredUserType, type SchoolReturnType, type SchoolType, type ShareEventForInvitation, type ShareEventForPublic, type ShareEventInfoForInvitation, type ShareMessageFooterPlacement, type ShareResourceType, type ShareType, type ShareVendorForApplication, type ShareVendorForPublic, type ShareVendorInfoForApplication, type SocialMediaType, type StallType, type StripeSubscription, type Subcategory, type SubcategoryItems, type SubscriptionPlanData, type SubscriptionPlansResponse, type SubscriptionPricingData, type SubscriptionStatusData, TIERS_BY_PRIORITY, TIER_DISPLAY_LABELS, TIER_FROM_LICENCE, type TermsAgreement, type Tier, USER_STORAGE_KEY, type UnregisteredVendorFormData, type UnregisteredVendorInvitationType, type UnregisteredVendorType, type UseGetResourcesByRegionOptions, type UserActivity, type UserActivityEvent, type UserFormData, type UserLicenceType, type UserType, type ValidateVerificationTokenFormData, type VendorAttributes, type VendorCalendarData, type VendorFormData, type VendorInfoFormData, type VendorInfoType, type VendorProductList, type VendorType, appendShareMoreInfoLine, availableCategories, availableRegionOptions, availableRegionTypes, availableTagTypes, badgeFiles, badgeIds, badges, buildApplicationShareDescription, buildFacebookShareQuote, buildInvitationShareDescription, buildPublicEventShareDescription, buildPublicVendorShareDescription, buildShareMessageSections, buildShareOgDescription, buildShareOgDescriptionFromSections, buildSharePagePath, buildShareUrl, capitalizeFirstLetter, categoryColors, cluemartSocialMedia, cluiFiles, cluiIds, cluiImages, companyContactFields, computeDailyClueState, contactUsFields, darkColors, dateFormat, emailField, eventBasicInfoFields, eventEndDateFields, eventInfo, eventInfoPaymentInfo, eventStartDateFields, fonts, foodFlavourOptions, formatCategoryLabel, formatDate, formatShareApplicationCategoriesSection, formatShareApplicationComplianceSection, formatShareApplicationPriceRangeLine, formatShareApplicationStallSizeLine, formatShareInvitationApplicationDeadlineLine, formatShareInvitationMarketDatesSection, formatShareInvitationRequirementsSection, formatShareIsFoodTrueLine, formatShareMarketDate, formatShareRainOrShineLine, formatShareStallLine, formatShareTagsSection, formatStallCapacityLabel, formatTimestamp, gameScreenIdentifierList, gameTypeToDisplayName, getCurrentAndFutureDates, iconFiles, iconIds, icons, isFutureDatesBeforeThreshold, isIsoDateString, isPostShareResourceType, isRelationShareResourceType, joinShareDescriptionSections, joinShareOgDescriptionSections, licenseNiceNames, lightColors, loginFields, logoFiles, logoIds, logos, mapArrayToOptions, normalizeShareOgDescription, normalizeShareRouteId, normalizeShareText, normalizeUrl, nzStartOfDay, otherImages, otherImagesFiles, otherImagesIds, packagingOptions, partnerBasicInfoFields, paymentMethodOptions, posterFiles, posterIds, posters, priceUnits, producedIngOptions, productLabelGroups, profileFields, refundPolicyOptions, registerFields, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, rewardNiceNames, seededShuffle, shareMessageFooterPlacementForType, socialMediaFields, sortDatesChronologically, splitShareDescriptionSections, stallTypeOptions, statusOptions, tagOptions, timeFormat, toNZTime, truncateText, useAddParticipantToChat, useAddUserFavouriteResource, useAddUserGoingResource, useAddUserInterestResource, useAddUserPresentResource, useAdminPermanentlyDeleteResource, useAdminResendUserVerificationEmail, useAdminUpdateResourceType, useCancelSubscription, useContactUs, useCrawlGoogleMarkets, useCreateAd, useCreateBulkNotifications, useCreateCheckoutSession, useCreateCustomerPortal, useCreateEvent, useCreateEventInfo, useCreatePartner, useCreatePost, useCreatePoster, useCreatePrivateChat, useCreatePushToken, useCreateRelation, useCreateResourceActivity, useCreateSchool, useCreateUnregisteredVendor, useCreateUser, useCreateVendor, useCreateVendorInfo, useDeleteAd, useDeleteAllNotifications, useDeleteChat, useDeleteEvent, useDeleteNotification, useDeletePartner, useDeletePost, useDeleteRelation, useDeleteSchool, useDeleteUnregisteredVendor, useDeleteUser, useDeleteVendor, useGetAd, useGetAds, useGetAdsByRegion, useGetAppSettings, useGetChat, useGetChatSubscription, useGetChatsByRegion, useGetEvent, useGetEventByPlaceId, useGetEventInfo, useGetEventRelations, useGetEvents, useGetEventsByRegion, useGetEventsNearMe, useGetGame, useGetGameLeaderboard, useGetGames, useGetNotificationCount, useGetNotificationCountSubscription, useGetPartner, useGetPartners, useGetPartnersByRegion, useGetPost, useGetPosts, useGetPostsByType, useGetRelation, useGetRelationByEventAndVendor, useGetReportedChatUsers, useGetResourceActivity, useGetResourceConnections, useGetSchool, useGetSchools, useGetSubscriptionPlans, useGetSubscriptionStatus, useGetUnregisteredVendor, useGetUnregisteredVendors, useGetUnregisteredVendorsByInviterId, useGetUser, useGetUserActivities, useGetUserChats, useGetUserEvents, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserPartners, useGetUserResources, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLeaveGame, useLogin, useLogout, useMarkAllNotificationsRead, useMarkChatMessagesSeen, useMarkNotificationRead, useRedeemReward, useRefreshToken, useRegister, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRemoveUserGoingResource, useRemoveUserInterestResource, useRemoveUserPresentResource, useReportChatUser, useRequestMarketingMaterial, useRequestPasswordReset, useResetPassword, useSearchEvents, useSearchPartners, useSearchVendors, useSelectPackage, useSelectStandardPackage, useSendChatMessage, useStartGame, useToggleChatMessageLike, useUnlinkUnregisteredVendorByInviterId, useUpdateAd, useUpdateAppSettings, useUpdateDailyClueGame, useUpdateEvent, useUpdateEventInfo, useUpdateGoogleImportedMarkets, useUpdatePartner, useUpdatePost, useUpdatePuzzleGame, useUpdateRelation, useUpdateSchool, useUpdateSubscriptionPlan, useUpdateUnregisteredVendor, useUpdateUser, useUpdateVendor, useUpdateVendorInfo, useValidateVerificationToken, validateVerificationTokenFields, vendorAvailability, vendorBasicInfoFields, vendorCompliance, vendorElectricity, vendorEndDateFields, vendorFoodFlavour, vendorFullAddress, vendorGazebo, vendorLocationDescription, vendorMenuFields, vendorPackaging, vendorPriceRange, vendorProducedIn, vendorStallSize, vendorStartDateFields, vendorTable };
2919
+ declare const EVENT_DATE_STATUS_PERIOD_MAP: Partial<Record<EnumEventDateStatus, EnumEventDateStatus[]>>;
2920
+ declare function getAllowedEventDateStatuses(period: EnumEventDateStatus): EnumEventDateStatus[];
2921
+ declare function eventMatchesDateStatusPeriod(dateTime: Pick<DateTimeType, "dateStatus">[] | null | undefined, period: EnumEventDateStatus): boolean;
2922
+ declare function filterEventsByDateStatusPeriod<T extends {
2923
+ dateTime?: Pick<DateTimeType, "dateStatus">[] | null;
2924
+ }>(events: T[], period: EnumEventDateStatus): T[];
2925
+
2926
+ export { ANDROID_URL, type AdFormData, type AdFormState, type AdResource, type AdType, type AdminUpdateResourceType, type AppSettingsFormData, type AppSettingsType, type AssociateType, type AuthPayloadType, type BadgeBasename, type BadgeId, type BaseGameMap, type BaseGameType, type BaseResourceType, type BaseResourceTypeFormData, CLUEMART_MAIN_DOMAIN_URL, type Category, type ChatMessageInput, type ChatMessageReaction, type ChatMessageReplyPreview, type ChatMessageSeen, type ChatMessageType, type ChatType, type CluiImageBasename, type CluiImageId, type ContactUsFormData, type CreateAdFormData, type CreateAdFormState, type CreateAppSettingsFormData, type CreateBulkNotificationInput, type CreateContactUsFormData, type CreateEventFormData, type CreateEventInfoFormData, type CreateFormData, type CreateLoginFormData, type CreatePartnerFormData, type CreatePostFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateSchoolFormData, type CreateUnregisteredVendorFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type CreateVendorFormData, type CreateVendorInfoFormData, DEFAULT_RESOURCES_RETURN_LIMIT, DEFAULT_RESOURCES_RETURN_OFFSET, DEFAULT_SHARE_OG_IMAGE, type DailyClueBaseGame, type DailyClueGameData, type DateTimeType, type DateTimeWithPriceType, type DeviceInfo, EVENT_DATE_STATUS_PERIOD_MAP, EnumActivity, EnumAdShowOn, EnumAdStatus, EnumAdStyle, EnumAdType, EnumBillingPeriod, EnumChatReportReason, EnumChatType, EnumEventDateStatus, EnumEventType, EnumFoodFlavor, EnumFoodType, EnumGameStatus, EnumGameType, EnumInviteStatus, EnumNotificationResourceType, EnumNotificationType, EnumOSPlatform, EnumPartnerType, EnumPaymentMethod, EnumPostContentType, EnumPostType, EnumRegions, EnumRelationResource, EnumResourceType, EnumReward, EnumSocialMedia, EnumSubscriptionStatus, EnumUserLicence, EnumUserRole, EnumVendorType, EnumVerificationType, type EventFormData, type EventInfoFormData, type EventInfoType, type EventListItemType, type EventStatusType, type EventType, type FormDateField, type FormField, type GameDate, type GameDocType, type GameHistory, type GameLeaderboard, type GamePlacement, type GamePlacementClue, type GameType, type GeocodeLocation, type GlobalGameData, type GoogleAddressComponent, type GoogleImportedMarket, IMAGE_EXTENSION, IOS_URL, type IconBasename, type IconId, type ImageObjectType, ImageTypeEnum, type LocationGeoType, type LocationType, type LoginFormData, type LogoBasename, type LogoId, type MarketingMaterialRequestInputType, type NotificationCount, type NotificationDataType, type NotificationType, type Nullable, OG_DESCRIPTION_LINE_BREAK, type OptionItem, type OtherImagesBasename, type OtherImagesId, type OwnerType, POST_SHARE_RESOURCE_TYPES, PROMO_CODE_PREFIX, PUBLIC_SHARE_PATH_TYPES, type ParticipantType, type PartnerFormData, type PartnerType, type PaymentInfoType, type PostContentData, type PostContentFormData, type PostContentGame, type PostContentImage, type PostContentList, type PostContentTextarea, type PostContentType, type PostContentVideo, type PostFileInput, type PostFormData, type PostShareResourceType, type PostType, type PosterAssetId, type PosterImageBasename, type PosterInputType, type PosterUsageType, type PromoCodeType, type PublicSharePathType, type PushTokenType, type PuzzleAnswer, type PuzzleAnsweredQuestion, type PuzzleBaseGame, type PuzzleGameData, type PuzzleQuestion, RELATION_SHARE_APPLICATION, RELATION_SHARE_INVITATION, RELATION_SHARE_RESOURCE_TYPES, RESOURCE_SHARE_TYPES, type RedeemRewardInput, type RedeemRewardResponse, type RedeemedReward, type RefreshTokenPayloadType, type RefundPolicy, type Region, type RegisterFormData, type RelationDate, type RelationInputType, type RelationSharePathType, type RelationShareResourceType, type RelationType, type ReportChatUser, type RequestPasswordResetFormData, type Requirement, type ResetPasswordFormData, type ResourceActivityEntry, type ResourceActivityInputType, type ResourceActivityType, type ResourceByUser, type ResourceConnectionsType, type ResourceContactDetailsType, type ResourceDetails, type ResourceImageType, type ResourceShareType, SAVED_EMAIL_KEY, SAVED_PASSWORD_KEY, SAVED_REFRESH_TOKEN_KEY, SAVED_TOKEN_KEY, SCHOOL_MAX_STUDENT_COUNT, SCHOOL_MIN_STUDENT_COUNT, SHARE_APPLICATION_DEADLINE_PREFIX, SHARE_CALENDAR_ICON, SHARE_CATEGORIES_SECTION_HEADING, SHARE_CATEGORY_ICON, SHARE_CHECKMARK_ICON, SHARE_CLOCK_ICON, SHARE_COMPLIANCE_PREFIX, SHARE_DESCRIPTION_SECTION_BREAK, SHARE_DOLLAR_ICON, SHARE_FOOD_TRUCK_LINE, SHARE_INFO_ICON, SHARE_MARKET_DATES_SECTION_HEADING, SHARE_MORE_INFO_LINE, SHARE_PRICE_RANGE_PREFIX, SHARE_RAIN_OR_SHINE_LINE, SHARE_REQUIREMENTS_SECTION_HEADING, SHARE_RESOURCE_LABEL, SHARE_RULER_ICON, SHARE_SITE_URL, SHARE_STALL_SIZE_PREFIX, SHARE_TAGS_SECTION_HEADING, SHARE_TYPE_PATH_REGEX, type SafeUserType, type SchoolCampaignType, type SchoolFormData, type SchoolRegisteredUserType, type SchoolReturnType, type SchoolType, type ShareEventForInvitation, type ShareEventForPublic, type ShareEventInfoForInvitation, type ShareMessageFooterPlacement, type ShareResourceType, type ShareType, type ShareVendorForApplication, type ShareVendorForPublic, type ShareVendorInfoForApplication, type SocialMediaType, type StallType, type StripeSubscription, type Subcategory, type SubcategoryItems, type SubscriptionPlanData, type SubscriptionPlansResponse, type SubscriptionPricingData, type SubscriptionStatusData, TIERS_BY_PRIORITY, TIER_DISPLAY_LABELS, TIER_FROM_LICENCE, type TermsAgreement, type Tier, USER_STORAGE_KEY, type UnregisteredVendorFormData, type UnregisteredVendorInvitationType, type UnregisteredVendorType, type UseGetResourcesByRegionOptions, type UserActivity, type UserActivityEvent, type UserFormData, type UserLicenceType, type UserType, type ValidateVerificationTokenFormData, type VendorAttributes, type VendorCalendarData, type VendorFormData, type VendorInfoFormData, type VendorInfoType, type VendorProductList, type VendorType, appendShareMoreInfoLine, availableCategories, availableRegionOptions, availableRegionTypes, availableTagTypes, badgeFiles, badgeIds, badges, buildApplicationShareDescription, buildFacebookShareQuote, buildInvitationShareDescription, buildPublicEventShareDescription, buildPublicVendorShareDescription, buildShareMessageSections, buildShareOgDescription, buildShareOgDescriptionFromSections, buildSharePagePath, buildShareUrl, capitalizeFirstLetter, categoryColors, cluemartSocialMedia, cluiFiles, cluiIds, cluiImages, companyContactFields, computeDailyClueState, contactUsFields, darkColors, dateFormat, emailField, eventBasicInfoFields, eventEndDateFields, eventInfo, eventInfoPaymentInfo, eventMatchesDateStatusPeriod, eventStartDateFields, filterEventsByDateStatusPeriod, fonts, foodFlavourOptions, formatCategoryLabel, formatDate, formatShareApplicationCategoriesSection, formatShareApplicationComplianceSection, formatShareApplicationPriceRangeLine, formatShareApplicationStallSizeLine, formatShareInvitationApplicationDeadlineLine, formatShareInvitationMarketDatesSection, formatShareInvitationRequirementsSection, formatShareIsFoodTrueLine, formatShareMarketDate, formatShareRainOrShineLine, formatShareStallLine, formatShareTagsSection, formatStallCapacityLabel, formatTimestamp, gameScreenIdentifierList, gameTypeToDisplayName, getAllowedEventDateStatuses, getCurrentAndFutureDates, iconFiles, iconIds, icons, isFutureDatesBeforeThreshold, isIsoDateString, isPostShareResourceType, isRelationShareResourceType, joinShareDescriptionSections, joinShareOgDescriptionSections, licenseNiceNames, lightColors, loginFields, logoFiles, logoIds, logos, mapArrayToOptions, normalizeShareOgDescription, normalizeShareRouteId, normalizeShareText, normalizeUrl, nzStartOfDay, otherImages, otherImagesFiles, otherImagesIds, packagingOptions, partnerBasicInfoFields, paymentMethodOptions, posterFiles, posterIds, posters, priceUnits, producedIngOptions, productLabelGroups, profileFields, refundPolicyOptions, registerFields, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, rewardNiceNames, seededShuffle, shareMessageFooterPlacementForType, socialMediaFields, sortDatesChronologically, splitShareDescriptionSections, stallTypeOptions, statusOptions, tagOptions, timeFormat, toNZTime, truncateText, useAddParticipantToChat, useAddUserFavouriteResource, useAddUserGoingResource, useAddUserInterestResource, useAddUserPresentResource, useAdminPermanentlyDeleteResource, useAdminResendUserVerificationEmail, useAdminUpdateResourceType, useCancelSubscription, useContactUs, useCrawlGoogleMarkets, useCreateAd, useCreateBulkNotifications, useCreateCheckoutSession, useCreateCustomerPortal, useCreateEvent, useCreateEventInfo, useCreatePartner, useCreatePost, useCreatePoster, useCreatePrivateChat, useCreatePushToken, useCreateRelation, useCreateResourceActivity, useCreateSchool, useCreateUnregisteredVendor, useCreateUser, useCreateVendor, useCreateVendorInfo, useDeleteAd, useDeleteAllNotifications, useDeleteChat, useDeleteEvent, useDeleteNotification, useDeletePartner, useDeletePost, useDeleteRelation, useDeleteSchool, useDeleteUnregisteredVendor, useDeleteUser, useDeleteVendor, useGetAd, useGetAds, useGetAdsByRegion, useGetAppSettings, useGetChat, useGetChatSubscription, useGetChatsByRegion, useGetEvent, useGetEventByPlaceId, useGetEventInfo, useGetEventRelations, useGetEvents, useGetEventsByRegion, useGetEventsNearMe, useGetGame, useGetGameLeaderboard, useGetGames, useGetNotificationCount, useGetNotificationCountSubscription, useGetPartner, useGetPartners, useGetPartnersByRegion, useGetPost, useGetPosts, useGetPostsByType, useGetRelation, useGetRelationByEventAndVendor, useGetReportedChatUsers, useGetResourceActivity, useGetResourceConnections, useGetSchool, useGetSchools, useGetSubscriptionPlans, useGetSubscriptionStatus, useGetUnregisteredVendor, useGetUnregisteredVendors, useGetUnregisteredVendorsByInviterId, useGetUser, useGetUserActivities, useGetUserChats, useGetUserEvents, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserPartners, useGetUserResources, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLeaveGame, useLogin, useLogout, useMarkAllNotificationsRead, useMarkChatMessagesSeen, useMarkNotificationRead, useRedeemReward, useRefreshToken, useRegister, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRemoveUserGoingResource, useRemoveUserInterestResource, useRemoveUserPresentResource, useReportChatUser, useRequestMarketingMaterial, useRequestPasswordReset, useResetPassword, useSearchEvents, useSearchPartners, useSearchVendors, useSelectPackage, useSelectStandardPackage, useSendChatMessage, useStartGame, useToggleChatMessageLike, useUnlinkUnregisteredVendorByInviterId, useUpdateAd, useUpdateAppSettings, useUpdateDailyClueGame, useUpdateEvent, useUpdateEventInfo, useUpdateGoogleImportedMarkets, useUpdatePartner, useUpdatePost, useUpdatePuzzleGame, useUpdateRelation, useUpdateSchool, useUpdateSubscriptionPlan, useUpdateUnregisteredVendor, useUpdateUser, useUpdateVendor, useUpdateVendorInfo, useValidateVerificationToken, validateVerificationTokenFields, vendorAvailability, vendorBasicInfoFields, vendorCompliance, vendorElectricity, vendorEndDateFields, vendorFoodFlavour, vendorFullAddress, vendorGazebo, vendorLocationDescription, vendorMenuFields, vendorPackaging, vendorPriceRange, vendorProducedIn, vendorStallSize, vendorStartDateFields, vendorTable };
package/dist/index.d.ts CHANGED
@@ -201,7 +201,8 @@ declare enum EnumEventDateStatus {
201
201
  UPCOMING = "Upcoming",
202
202
  ENDED = "Ended",
203
203
  RE_SCHEDULED = "Rescheduled",
204
- CANCELED = "Canceled"
204
+ CANCELED = "Canceled",
205
+ INVALID = "Invalid"
205
206
  }
206
207
  declare enum EnumSubscriptionStatus {
207
208
  ACTIVE = "active",
@@ -1750,7 +1751,7 @@ declare const useUpdateEventInfo: () => {
1750
1751
  }>>;
1751
1752
  };
1752
1753
 
1753
- declare const useGetEvents: () => {
1754
+ declare const useGetEvents: (dateStatus?: EnumEventDateStatus) => {
1754
1755
  error: _apollo_client.ApolloError | undefined;
1755
1756
  events: EventListItemType[];
1756
1757
  loading: boolean;
@@ -1774,7 +1775,7 @@ declare const useGetEventByPlaceId: (googlePlaceId: string) => {
1774
1775
  eventByPlaceId: EventListItemType | null;
1775
1776
  }>>;
1776
1777
  };
1777
- declare const useGetEventsByRegion: (region: string, options?: UseGetResourcesByRegionOptions) => {
1778
+ declare const useGetEventsByRegion: (region: string, options?: UseGetResourcesByRegionOptions, dateStatus?: EnumEventDateStatus) => {
1778
1779
  error: _apollo_client.ApolloError | undefined;
1779
1780
  eventsByRegion: EventListItemType[];
1780
1781
  fetchMore: <TFetchData = {
@@ -1794,7 +1795,7 @@ declare const useGetEventsByRegion: (region: string, options?: UseGetResourcesBy
1794
1795
  eventsByRegion: EventListItemType[];
1795
1796
  }>>;
1796
1797
  };
1797
- declare const useSearchEvents: (region: string, search?: string, tags?: string[]) => {
1798
+ declare const useSearchEvents: (region: string, searchQuery?: string, tags?: string[], dateStatus?: EnumEventDateStatus) => {
1798
1799
  error: _apollo_client.ApolloError | undefined;
1799
1800
  eventsSearch: EventListItemType[];
1800
1801
  loading: boolean;
@@ -1806,7 +1807,7 @@ declare const useGetEventsNearMe: (location: {
1806
1807
  latitude: number;
1807
1808
  longitude: number;
1808
1809
  radius?: number;
1809
- }) => {
1810
+ }, dateStatus?: EnumEventDateStatus) => {
1810
1811
  error: _apollo_client.ApolloError | undefined;
1811
1812
  eventsNearMe: EventListItemType[];
1812
1813
  loading: boolean;
@@ -2915,4 +2916,11 @@ declare const rewardNiceNames: Record<EnumReward, {
2915
2916
  declare const SCHOOL_MIN_STUDENT_COUNT = 300;
2916
2917
  declare const SCHOOL_MAX_STUDENT_COUNT = 0;
2917
2918
 
2918
- export { ANDROID_URL, type AdFormData, type AdFormState, type AdResource, type AdType, type AdminUpdateResourceType, type AppSettingsFormData, type AppSettingsType, type AssociateType, type AuthPayloadType, type BadgeBasename, type BadgeId, type BaseGameMap, type BaseGameType, type BaseResourceType, type BaseResourceTypeFormData, CLUEMART_MAIN_DOMAIN_URL, type Category, type ChatMessageInput, type ChatMessageReaction, type ChatMessageReplyPreview, type ChatMessageSeen, type ChatMessageType, type ChatType, type CluiImageBasename, type CluiImageId, type ContactUsFormData, type CreateAdFormData, type CreateAdFormState, type CreateAppSettingsFormData, type CreateBulkNotificationInput, type CreateContactUsFormData, type CreateEventFormData, type CreateEventInfoFormData, type CreateFormData, type CreateLoginFormData, type CreatePartnerFormData, type CreatePostFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateSchoolFormData, type CreateUnregisteredVendorFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type CreateVendorFormData, type CreateVendorInfoFormData, DEFAULT_RESOURCES_RETURN_LIMIT, DEFAULT_RESOURCES_RETURN_OFFSET, DEFAULT_SHARE_OG_IMAGE, type DailyClueBaseGame, type DailyClueGameData, type DateTimeType, type DateTimeWithPriceType, type DeviceInfo, EnumActivity, EnumAdShowOn, EnumAdStatus, EnumAdStyle, EnumAdType, EnumBillingPeriod, EnumChatReportReason, EnumChatType, EnumEventDateStatus, EnumEventType, EnumFoodFlavor, EnumFoodType, EnumGameStatus, EnumGameType, EnumInviteStatus, EnumNotificationResourceType, EnumNotificationType, EnumOSPlatform, EnumPartnerType, EnumPaymentMethod, EnumPostContentType, EnumPostType, EnumRegions, EnumRelationResource, EnumResourceType, EnumReward, EnumSocialMedia, EnumSubscriptionStatus, EnumUserLicence, EnumUserRole, EnumVendorType, EnumVerificationType, type EventFormData, type EventInfoFormData, type EventInfoType, type EventListItemType, type EventStatusType, type EventType, type FormDateField, type FormField, type GameDate, type GameDocType, type GameHistory, type GameLeaderboard, type GamePlacement, type GamePlacementClue, type GameType, type GeocodeLocation, type GlobalGameData, type GoogleAddressComponent, type GoogleImportedMarket, IMAGE_EXTENSION, IOS_URL, type IconBasename, type IconId, type ImageObjectType, ImageTypeEnum, type LocationGeoType, type LocationType, type LoginFormData, type LogoBasename, type LogoId, type MarketingMaterialRequestInputType, type NotificationCount, type NotificationDataType, type NotificationType, type Nullable, OG_DESCRIPTION_LINE_BREAK, type OptionItem, type OtherImagesBasename, type OtherImagesId, type OwnerType, POST_SHARE_RESOURCE_TYPES, PROMO_CODE_PREFIX, PUBLIC_SHARE_PATH_TYPES, type ParticipantType, type PartnerFormData, type PartnerType, type PaymentInfoType, type PostContentData, type PostContentFormData, type PostContentGame, type PostContentImage, type PostContentList, type PostContentTextarea, type PostContentType, type PostContentVideo, type PostFileInput, type PostFormData, type PostShareResourceType, type PostType, type PosterAssetId, type PosterImageBasename, type PosterInputType, type PosterUsageType, type PromoCodeType, type PublicSharePathType, type PushTokenType, type PuzzleAnswer, type PuzzleAnsweredQuestion, type PuzzleBaseGame, type PuzzleGameData, type PuzzleQuestion, RELATION_SHARE_APPLICATION, RELATION_SHARE_INVITATION, RELATION_SHARE_RESOURCE_TYPES, RESOURCE_SHARE_TYPES, type RedeemRewardInput, type RedeemRewardResponse, type RedeemedReward, type RefreshTokenPayloadType, type RefundPolicy, type Region, type RegisterFormData, type RelationDate, type RelationInputType, type RelationSharePathType, type RelationShareResourceType, type RelationType, type ReportChatUser, type RequestPasswordResetFormData, type Requirement, type ResetPasswordFormData, type ResourceActivityEntry, type ResourceActivityInputType, type ResourceActivityType, type ResourceByUser, type ResourceConnectionsType, type ResourceContactDetailsType, type ResourceDetails, type ResourceImageType, type ResourceShareType, SAVED_EMAIL_KEY, SAVED_PASSWORD_KEY, SAVED_REFRESH_TOKEN_KEY, SAVED_TOKEN_KEY, SCHOOL_MAX_STUDENT_COUNT, SCHOOL_MIN_STUDENT_COUNT, SHARE_APPLICATION_DEADLINE_PREFIX, SHARE_CALENDAR_ICON, SHARE_CATEGORIES_SECTION_HEADING, SHARE_CATEGORY_ICON, SHARE_CHECKMARK_ICON, SHARE_CLOCK_ICON, SHARE_COMPLIANCE_PREFIX, SHARE_DESCRIPTION_SECTION_BREAK, SHARE_DOLLAR_ICON, SHARE_FOOD_TRUCK_LINE, SHARE_INFO_ICON, SHARE_MARKET_DATES_SECTION_HEADING, SHARE_MORE_INFO_LINE, SHARE_PRICE_RANGE_PREFIX, SHARE_RAIN_OR_SHINE_LINE, SHARE_REQUIREMENTS_SECTION_HEADING, SHARE_RESOURCE_LABEL, SHARE_RULER_ICON, SHARE_SITE_URL, SHARE_STALL_SIZE_PREFIX, SHARE_TAGS_SECTION_HEADING, SHARE_TYPE_PATH_REGEX, type SafeUserType, type SchoolCampaignType, type SchoolFormData, type SchoolRegisteredUserType, type SchoolReturnType, type SchoolType, type ShareEventForInvitation, type ShareEventForPublic, type ShareEventInfoForInvitation, type ShareMessageFooterPlacement, type ShareResourceType, type ShareType, type ShareVendorForApplication, type ShareVendorForPublic, type ShareVendorInfoForApplication, type SocialMediaType, type StallType, type StripeSubscription, type Subcategory, type SubcategoryItems, type SubscriptionPlanData, type SubscriptionPlansResponse, type SubscriptionPricingData, type SubscriptionStatusData, TIERS_BY_PRIORITY, TIER_DISPLAY_LABELS, TIER_FROM_LICENCE, type TermsAgreement, type Tier, USER_STORAGE_KEY, type UnregisteredVendorFormData, type UnregisteredVendorInvitationType, type UnregisteredVendorType, type UseGetResourcesByRegionOptions, type UserActivity, type UserActivityEvent, type UserFormData, type UserLicenceType, type UserType, type ValidateVerificationTokenFormData, type VendorAttributes, type VendorCalendarData, type VendorFormData, type VendorInfoFormData, type VendorInfoType, type VendorProductList, type VendorType, appendShareMoreInfoLine, availableCategories, availableRegionOptions, availableRegionTypes, availableTagTypes, badgeFiles, badgeIds, badges, buildApplicationShareDescription, buildFacebookShareQuote, buildInvitationShareDescription, buildPublicEventShareDescription, buildPublicVendorShareDescription, buildShareMessageSections, buildShareOgDescription, buildShareOgDescriptionFromSections, buildSharePagePath, buildShareUrl, capitalizeFirstLetter, categoryColors, cluemartSocialMedia, cluiFiles, cluiIds, cluiImages, companyContactFields, computeDailyClueState, contactUsFields, darkColors, dateFormat, emailField, eventBasicInfoFields, eventEndDateFields, eventInfo, eventInfoPaymentInfo, eventStartDateFields, fonts, foodFlavourOptions, formatCategoryLabel, formatDate, formatShareApplicationCategoriesSection, formatShareApplicationComplianceSection, formatShareApplicationPriceRangeLine, formatShareApplicationStallSizeLine, formatShareInvitationApplicationDeadlineLine, formatShareInvitationMarketDatesSection, formatShareInvitationRequirementsSection, formatShareIsFoodTrueLine, formatShareMarketDate, formatShareRainOrShineLine, formatShareStallLine, formatShareTagsSection, formatStallCapacityLabel, formatTimestamp, gameScreenIdentifierList, gameTypeToDisplayName, getCurrentAndFutureDates, iconFiles, iconIds, icons, isFutureDatesBeforeThreshold, isIsoDateString, isPostShareResourceType, isRelationShareResourceType, joinShareDescriptionSections, joinShareOgDescriptionSections, licenseNiceNames, lightColors, loginFields, logoFiles, logoIds, logos, mapArrayToOptions, normalizeShareOgDescription, normalizeShareRouteId, normalizeShareText, normalizeUrl, nzStartOfDay, otherImages, otherImagesFiles, otherImagesIds, packagingOptions, partnerBasicInfoFields, paymentMethodOptions, posterFiles, posterIds, posters, priceUnits, producedIngOptions, productLabelGroups, profileFields, refundPolicyOptions, registerFields, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, rewardNiceNames, seededShuffle, shareMessageFooterPlacementForType, socialMediaFields, sortDatesChronologically, splitShareDescriptionSections, stallTypeOptions, statusOptions, tagOptions, timeFormat, toNZTime, truncateText, useAddParticipantToChat, useAddUserFavouriteResource, useAddUserGoingResource, useAddUserInterestResource, useAddUserPresentResource, useAdminPermanentlyDeleteResource, useAdminResendUserVerificationEmail, useAdminUpdateResourceType, useCancelSubscription, useContactUs, useCrawlGoogleMarkets, useCreateAd, useCreateBulkNotifications, useCreateCheckoutSession, useCreateCustomerPortal, useCreateEvent, useCreateEventInfo, useCreatePartner, useCreatePost, useCreatePoster, useCreatePrivateChat, useCreatePushToken, useCreateRelation, useCreateResourceActivity, useCreateSchool, useCreateUnregisteredVendor, useCreateUser, useCreateVendor, useCreateVendorInfo, useDeleteAd, useDeleteAllNotifications, useDeleteChat, useDeleteEvent, useDeleteNotification, useDeletePartner, useDeletePost, useDeleteRelation, useDeleteSchool, useDeleteUnregisteredVendor, useDeleteUser, useDeleteVendor, useGetAd, useGetAds, useGetAdsByRegion, useGetAppSettings, useGetChat, useGetChatSubscription, useGetChatsByRegion, useGetEvent, useGetEventByPlaceId, useGetEventInfo, useGetEventRelations, useGetEvents, useGetEventsByRegion, useGetEventsNearMe, useGetGame, useGetGameLeaderboard, useGetGames, useGetNotificationCount, useGetNotificationCountSubscription, useGetPartner, useGetPartners, useGetPartnersByRegion, useGetPost, useGetPosts, useGetPostsByType, useGetRelation, useGetRelationByEventAndVendor, useGetReportedChatUsers, useGetResourceActivity, useGetResourceConnections, useGetSchool, useGetSchools, useGetSubscriptionPlans, useGetSubscriptionStatus, useGetUnregisteredVendor, useGetUnregisteredVendors, useGetUnregisteredVendorsByInviterId, useGetUser, useGetUserActivities, useGetUserChats, useGetUserEvents, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserPartners, useGetUserResources, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLeaveGame, useLogin, useLogout, useMarkAllNotificationsRead, useMarkChatMessagesSeen, useMarkNotificationRead, useRedeemReward, useRefreshToken, useRegister, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRemoveUserGoingResource, useRemoveUserInterestResource, useRemoveUserPresentResource, useReportChatUser, useRequestMarketingMaterial, useRequestPasswordReset, useResetPassword, useSearchEvents, useSearchPartners, useSearchVendors, useSelectPackage, useSelectStandardPackage, useSendChatMessage, useStartGame, useToggleChatMessageLike, useUnlinkUnregisteredVendorByInviterId, useUpdateAd, useUpdateAppSettings, useUpdateDailyClueGame, useUpdateEvent, useUpdateEventInfo, useUpdateGoogleImportedMarkets, useUpdatePartner, useUpdatePost, useUpdatePuzzleGame, useUpdateRelation, useUpdateSchool, useUpdateSubscriptionPlan, useUpdateUnregisteredVendor, useUpdateUser, useUpdateVendor, useUpdateVendorInfo, useValidateVerificationToken, validateVerificationTokenFields, vendorAvailability, vendorBasicInfoFields, vendorCompliance, vendorElectricity, vendorEndDateFields, vendorFoodFlavour, vendorFullAddress, vendorGazebo, vendorLocationDescription, vendorMenuFields, vendorPackaging, vendorPriceRange, vendorProducedIn, vendorStallSize, vendorStartDateFields, vendorTable };
2919
+ declare const EVENT_DATE_STATUS_PERIOD_MAP: Partial<Record<EnumEventDateStatus, EnumEventDateStatus[]>>;
2920
+ declare function getAllowedEventDateStatuses(period: EnumEventDateStatus): EnumEventDateStatus[];
2921
+ declare function eventMatchesDateStatusPeriod(dateTime: Pick<DateTimeType, "dateStatus">[] | null | undefined, period: EnumEventDateStatus): boolean;
2922
+ declare function filterEventsByDateStatusPeriod<T extends {
2923
+ dateTime?: Pick<DateTimeType, "dateStatus">[] | null;
2924
+ }>(events: T[], period: EnumEventDateStatus): T[];
2925
+
2926
+ export { ANDROID_URL, type AdFormData, type AdFormState, type AdResource, type AdType, type AdminUpdateResourceType, type AppSettingsFormData, type AppSettingsType, type AssociateType, type AuthPayloadType, type BadgeBasename, type BadgeId, type BaseGameMap, type BaseGameType, type BaseResourceType, type BaseResourceTypeFormData, CLUEMART_MAIN_DOMAIN_URL, type Category, type ChatMessageInput, type ChatMessageReaction, type ChatMessageReplyPreview, type ChatMessageSeen, type ChatMessageType, type ChatType, type CluiImageBasename, type CluiImageId, type ContactUsFormData, type CreateAdFormData, type CreateAdFormState, type CreateAppSettingsFormData, type CreateBulkNotificationInput, type CreateContactUsFormData, type CreateEventFormData, type CreateEventInfoFormData, type CreateFormData, type CreateLoginFormData, type CreatePartnerFormData, type CreatePostFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateSchoolFormData, type CreateUnregisteredVendorFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type CreateVendorFormData, type CreateVendorInfoFormData, DEFAULT_RESOURCES_RETURN_LIMIT, DEFAULT_RESOURCES_RETURN_OFFSET, DEFAULT_SHARE_OG_IMAGE, type DailyClueBaseGame, type DailyClueGameData, type DateTimeType, type DateTimeWithPriceType, type DeviceInfo, EVENT_DATE_STATUS_PERIOD_MAP, EnumActivity, EnumAdShowOn, EnumAdStatus, EnumAdStyle, EnumAdType, EnumBillingPeriod, EnumChatReportReason, EnumChatType, EnumEventDateStatus, EnumEventType, EnumFoodFlavor, EnumFoodType, EnumGameStatus, EnumGameType, EnumInviteStatus, EnumNotificationResourceType, EnumNotificationType, EnumOSPlatform, EnumPartnerType, EnumPaymentMethod, EnumPostContentType, EnumPostType, EnumRegions, EnumRelationResource, EnumResourceType, EnumReward, EnumSocialMedia, EnumSubscriptionStatus, EnumUserLicence, EnumUserRole, EnumVendorType, EnumVerificationType, type EventFormData, type EventInfoFormData, type EventInfoType, type EventListItemType, type EventStatusType, type EventType, type FormDateField, type FormField, type GameDate, type GameDocType, type GameHistory, type GameLeaderboard, type GamePlacement, type GamePlacementClue, type GameType, type GeocodeLocation, type GlobalGameData, type GoogleAddressComponent, type GoogleImportedMarket, IMAGE_EXTENSION, IOS_URL, type IconBasename, type IconId, type ImageObjectType, ImageTypeEnum, type LocationGeoType, type LocationType, type LoginFormData, type LogoBasename, type LogoId, type MarketingMaterialRequestInputType, type NotificationCount, type NotificationDataType, type NotificationType, type Nullable, OG_DESCRIPTION_LINE_BREAK, type OptionItem, type OtherImagesBasename, type OtherImagesId, type OwnerType, POST_SHARE_RESOURCE_TYPES, PROMO_CODE_PREFIX, PUBLIC_SHARE_PATH_TYPES, type ParticipantType, type PartnerFormData, type PartnerType, type PaymentInfoType, type PostContentData, type PostContentFormData, type PostContentGame, type PostContentImage, type PostContentList, type PostContentTextarea, type PostContentType, type PostContentVideo, type PostFileInput, type PostFormData, type PostShareResourceType, type PostType, type PosterAssetId, type PosterImageBasename, type PosterInputType, type PosterUsageType, type PromoCodeType, type PublicSharePathType, type PushTokenType, type PuzzleAnswer, type PuzzleAnsweredQuestion, type PuzzleBaseGame, type PuzzleGameData, type PuzzleQuestion, RELATION_SHARE_APPLICATION, RELATION_SHARE_INVITATION, RELATION_SHARE_RESOURCE_TYPES, RESOURCE_SHARE_TYPES, type RedeemRewardInput, type RedeemRewardResponse, type RedeemedReward, type RefreshTokenPayloadType, type RefundPolicy, type Region, type RegisterFormData, type RelationDate, type RelationInputType, type RelationSharePathType, type RelationShareResourceType, type RelationType, type ReportChatUser, type RequestPasswordResetFormData, type Requirement, type ResetPasswordFormData, type ResourceActivityEntry, type ResourceActivityInputType, type ResourceActivityType, type ResourceByUser, type ResourceConnectionsType, type ResourceContactDetailsType, type ResourceDetails, type ResourceImageType, type ResourceShareType, SAVED_EMAIL_KEY, SAVED_PASSWORD_KEY, SAVED_REFRESH_TOKEN_KEY, SAVED_TOKEN_KEY, SCHOOL_MAX_STUDENT_COUNT, SCHOOL_MIN_STUDENT_COUNT, SHARE_APPLICATION_DEADLINE_PREFIX, SHARE_CALENDAR_ICON, SHARE_CATEGORIES_SECTION_HEADING, SHARE_CATEGORY_ICON, SHARE_CHECKMARK_ICON, SHARE_CLOCK_ICON, SHARE_COMPLIANCE_PREFIX, SHARE_DESCRIPTION_SECTION_BREAK, SHARE_DOLLAR_ICON, SHARE_FOOD_TRUCK_LINE, SHARE_INFO_ICON, SHARE_MARKET_DATES_SECTION_HEADING, SHARE_MORE_INFO_LINE, SHARE_PRICE_RANGE_PREFIX, SHARE_RAIN_OR_SHINE_LINE, SHARE_REQUIREMENTS_SECTION_HEADING, SHARE_RESOURCE_LABEL, SHARE_RULER_ICON, SHARE_SITE_URL, SHARE_STALL_SIZE_PREFIX, SHARE_TAGS_SECTION_HEADING, SHARE_TYPE_PATH_REGEX, type SafeUserType, type SchoolCampaignType, type SchoolFormData, type SchoolRegisteredUserType, type SchoolReturnType, type SchoolType, type ShareEventForInvitation, type ShareEventForPublic, type ShareEventInfoForInvitation, type ShareMessageFooterPlacement, type ShareResourceType, type ShareType, type ShareVendorForApplication, type ShareVendorForPublic, type ShareVendorInfoForApplication, type SocialMediaType, type StallType, type StripeSubscription, type Subcategory, type SubcategoryItems, type SubscriptionPlanData, type SubscriptionPlansResponse, type SubscriptionPricingData, type SubscriptionStatusData, TIERS_BY_PRIORITY, TIER_DISPLAY_LABELS, TIER_FROM_LICENCE, type TermsAgreement, type Tier, USER_STORAGE_KEY, type UnregisteredVendorFormData, type UnregisteredVendorInvitationType, type UnregisteredVendorType, type UseGetResourcesByRegionOptions, type UserActivity, type UserActivityEvent, type UserFormData, type UserLicenceType, type UserType, type ValidateVerificationTokenFormData, type VendorAttributes, type VendorCalendarData, type VendorFormData, type VendorInfoFormData, type VendorInfoType, type VendorProductList, type VendorType, appendShareMoreInfoLine, availableCategories, availableRegionOptions, availableRegionTypes, availableTagTypes, badgeFiles, badgeIds, badges, buildApplicationShareDescription, buildFacebookShareQuote, buildInvitationShareDescription, buildPublicEventShareDescription, buildPublicVendorShareDescription, buildShareMessageSections, buildShareOgDescription, buildShareOgDescriptionFromSections, buildSharePagePath, buildShareUrl, capitalizeFirstLetter, categoryColors, cluemartSocialMedia, cluiFiles, cluiIds, cluiImages, companyContactFields, computeDailyClueState, contactUsFields, darkColors, dateFormat, emailField, eventBasicInfoFields, eventEndDateFields, eventInfo, eventInfoPaymentInfo, eventMatchesDateStatusPeriod, eventStartDateFields, filterEventsByDateStatusPeriod, fonts, foodFlavourOptions, formatCategoryLabel, formatDate, formatShareApplicationCategoriesSection, formatShareApplicationComplianceSection, formatShareApplicationPriceRangeLine, formatShareApplicationStallSizeLine, formatShareInvitationApplicationDeadlineLine, formatShareInvitationMarketDatesSection, formatShareInvitationRequirementsSection, formatShareIsFoodTrueLine, formatShareMarketDate, formatShareRainOrShineLine, formatShareStallLine, formatShareTagsSection, formatStallCapacityLabel, formatTimestamp, gameScreenIdentifierList, gameTypeToDisplayName, getAllowedEventDateStatuses, getCurrentAndFutureDates, iconFiles, iconIds, icons, isFutureDatesBeforeThreshold, isIsoDateString, isPostShareResourceType, isRelationShareResourceType, joinShareDescriptionSections, joinShareOgDescriptionSections, licenseNiceNames, lightColors, loginFields, logoFiles, logoIds, logos, mapArrayToOptions, normalizeShareOgDescription, normalizeShareRouteId, normalizeShareText, normalizeUrl, nzStartOfDay, otherImages, otherImagesFiles, otherImagesIds, packagingOptions, partnerBasicInfoFields, paymentMethodOptions, posterFiles, posterIds, posters, priceUnits, producedIngOptions, productLabelGroups, profileFields, refundPolicyOptions, registerFields, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, rewardNiceNames, seededShuffle, shareMessageFooterPlacementForType, socialMediaFields, sortDatesChronologically, splitShareDescriptionSections, stallTypeOptions, statusOptions, tagOptions, timeFormat, toNZTime, truncateText, useAddParticipantToChat, useAddUserFavouriteResource, useAddUserGoingResource, useAddUserInterestResource, useAddUserPresentResource, useAdminPermanentlyDeleteResource, useAdminResendUserVerificationEmail, useAdminUpdateResourceType, useCancelSubscription, useContactUs, useCrawlGoogleMarkets, useCreateAd, useCreateBulkNotifications, useCreateCheckoutSession, useCreateCustomerPortal, useCreateEvent, useCreateEventInfo, useCreatePartner, useCreatePost, useCreatePoster, useCreatePrivateChat, useCreatePushToken, useCreateRelation, useCreateResourceActivity, useCreateSchool, useCreateUnregisteredVendor, useCreateUser, useCreateVendor, useCreateVendorInfo, useDeleteAd, useDeleteAllNotifications, useDeleteChat, useDeleteEvent, useDeleteNotification, useDeletePartner, useDeletePost, useDeleteRelation, useDeleteSchool, useDeleteUnregisteredVendor, useDeleteUser, useDeleteVendor, useGetAd, useGetAds, useGetAdsByRegion, useGetAppSettings, useGetChat, useGetChatSubscription, useGetChatsByRegion, useGetEvent, useGetEventByPlaceId, useGetEventInfo, useGetEventRelations, useGetEvents, useGetEventsByRegion, useGetEventsNearMe, useGetGame, useGetGameLeaderboard, useGetGames, useGetNotificationCount, useGetNotificationCountSubscription, useGetPartner, useGetPartners, useGetPartnersByRegion, useGetPost, useGetPosts, useGetPostsByType, useGetRelation, useGetRelationByEventAndVendor, useGetReportedChatUsers, useGetResourceActivity, useGetResourceConnections, useGetSchool, useGetSchools, useGetSubscriptionPlans, useGetSubscriptionStatus, useGetUnregisteredVendor, useGetUnregisteredVendors, useGetUnregisteredVendorsByInviterId, useGetUser, useGetUserActivities, useGetUserChats, useGetUserEvents, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserPartners, useGetUserResources, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLeaveGame, useLogin, useLogout, useMarkAllNotificationsRead, useMarkChatMessagesSeen, useMarkNotificationRead, useRedeemReward, useRefreshToken, useRegister, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRemoveUserGoingResource, useRemoveUserInterestResource, useRemoveUserPresentResource, useReportChatUser, useRequestMarketingMaterial, useRequestPasswordReset, useResetPassword, useSearchEvents, useSearchPartners, useSearchVendors, useSelectPackage, useSelectStandardPackage, useSendChatMessage, useStartGame, useToggleChatMessageLike, useUnlinkUnregisteredVendorByInviterId, useUpdateAd, useUpdateAppSettings, useUpdateDailyClueGame, useUpdateEvent, useUpdateEventInfo, useUpdateGoogleImportedMarkets, useUpdatePartner, useUpdatePost, useUpdatePuzzleGame, useUpdateRelation, useUpdateSchool, useUpdateSubscriptionPlan, useUpdateUnregisteredVendor, useUpdateUser, useUpdateVendor, useUpdateVendorInfo, useValidateVerificationToken, validateVerificationTokenFields, vendorAvailability, vendorBasicInfoFields, vendorCompliance, vendorElectricity, vendorEndDateFields, vendorFoodFlavour, vendorFullAddress, vendorGazebo, vendorLocationDescription, vendorMenuFields, vendorPackaging, vendorPriceRange, vendorProducedIn, vendorStallSize, vendorStartDateFields, vendorTable };
package/dist/index.mjs CHANGED
@@ -218,6 +218,7 @@ var EnumEventDateStatus = /* @__PURE__ */ ((EnumEventDateStatus2) => {
218
218
  EnumEventDateStatus2["ENDED"] = "Ended";
219
219
  EnumEventDateStatus2["RE_SCHEDULED"] = "Rescheduled";
220
220
  EnumEventDateStatus2["CANCELED"] = "Canceled";
221
+ EnumEventDateStatus2["INVALID"] = "Invalid";
221
222
  return EnumEventDateStatus2;
222
223
  })(EnumEventDateStatus || {});
223
224
  var EnumSubscriptionStatus = /* @__PURE__ */ ((EnumSubscriptionStatus2) => {
@@ -796,6 +797,34 @@ var rewardNiceNames = {
796
797
  var SCHOOL_MIN_STUDENT_COUNT = 300;
797
798
  var SCHOOL_MAX_STUDENT_COUNT = 0;
798
799
 
800
+ // src/utils/eventDateStatus.ts
801
+ var EVENT_DATE_STATUS_PERIOD_MAP = {
802
+ ["Today" /* TODAY */]: [
803
+ "Started" /* STARTED */,
804
+ "Starting_Soon" /* STARTING_SOON */,
805
+ "Today" /* TODAY */
806
+ ],
807
+ ["This_Week" /* THIS_WEEK */]: [
808
+ "Started" /* STARTED */,
809
+ "Starting_Soon" /* STARTING_SOON */,
810
+ "This_Week" /* THIS_WEEK */,
811
+ "Today" /* TODAY */,
812
+ "Tomorrow" /* TOMORROW */
813
+ ]
814
+ };
815
+ function getAllowedEventDateStatuses(period) {
816
+ return EVENT_DATE_STATUS_PERIOD_MAP[period] ?? [period];
817
+ }
818
+ function eventMatchesDateStatusPeriod(dateTime, period) {
819
+ const allowedStatuses = getAllowedEventDateStatuses(period);
820
+ return dateTime?.some((dt) => allowedStatuses.includes(dt.dateStatus)) ?? false;
821
+ }
822
+ function filterEventsByDateStatusPeriod(events, period) {
823
+ return events.filter(
824
+ (event) => eventMatchesDateStatusPeriod(event.dateTime, period)
825
+ );
826
+ }
827
+
799
828
  // src/formFields/vendor/vendorInfo.ts
800
829
  var vendorElectricity = {
801
830
  details: {
@@ -2915,8 +2944,8 @@ var EVENT = gql3`
2915
2944
  ${RELATION_DATES_FRAGMENT}
2916
2945
  `;
2917
2946
  var GET_EVENTS = gql3`
2918
- query getEvents {
2919
- events {
2947
+ query getEvents($dateStatus: EventDateStatusEnumType) {
2948
+ events(dateStatus: $dateStatus) {
2920
2949
  ...EventListItemFields
2921
2950
  }
2922
2951
  }
@@ -2942,24 +2971,49 @@ var GET_EVENTS_BY_REGION = gql3`
2942
2971
  query getEventsByRegion(
2943
2972
  $region: String!
2944
2973
  $options: ResourcesByRegionOptions
2974
+ $dateStatus: EventDateStatusEnumType
2945
2975
  ) {
2946
- eventsByRegion(region: $region, options: $options) {
2976
+ eventsByRegion(
2977
+ region: $region
2978
+ options: $options
2979
+ dateStatus: $dateStatus
2980
+ ) {
2947
2981
  ...EventListItemFields
2948
2982
  }
2949
2983
  }
2950
2984
  ${EVENT_LIST_ITEM}
2951
2985
  `;
2952
2986
  var SEARCH_EVENTS = gql3`
2953
- query searchEvents($region: String, $search: String, $tags: [String]) {
2954
- eventsSearch(region: $region, search: $search, tags: $tags) {
2987
+ query searchEvents(
2988
+ $region: String
2989
+ $search: String
2990
+ $tags: [String]
2991
+ $dateStatus: EventDateStatusEnumType
2992
+ ) {
2993
+ eventsSearch(
2994
+ region: $region
2995
+ search: $search
2996
+ tags: $tags
2997
+ dateStatus: $dateStatus
2998
+ ) {
2955
2999
  ...EventListItemFields
2956
3000
  }
2957
3001
  }
2958
3002
  ${EVENT_LIST_ITEM}
2959
3003
  `;
2960
3004
  var GET_EVENTS_NEAR_ME = gql3`
2961
- query getEventsNearMe($latitude: Float!, $longitude: Float!, $radius: Int) {
2962
- eventsNearMe(latitude: $latitude, longitude: $longitude, radius: $radius) {
3005
+ query getEventsNearMe(
3006
+ $latitude: Float!
3007
+ $longitude: Float!
3008
+ $radius: Int
3009
+ $dateStatus: EventDateStatusEnumType
3010
+ ) {
3011
+ eventsNearMe(
3012
+ latitude: $latitude
3013
+ longitude: $longitude
3014
+ radius: $radius
3015
+ dateStatus: $dateStatus
3016
+ ) {
2963
3017
  ...EventListItemFields
2964
3018
  }
2965
3019
  }
@@ -4047,9 +4101,10 @@ var useUpdateEventInfo = () => {
4047
4101
 
4048
4102
  // src/graphql/hooks/event/hooksQuery.ts
4049
4103
  import { useQuery as useQuery2 } from "@apollo/client";
4050
- var useGetEvents = () => {
4104
+ var useGetEvents = (dateStatus) => {
4051
4105
  const { loading, error, data, refetch } = useQuery2(GET_EVENTS, {
4052
- fetchPolicy: "network-only"
4106
+ fetchPolicy: "network-only",
4107
+ variables: { dateStatus }
4053
4108
  });
4054
4109
  const events = data?.events || [];
4055
4110
  return { error, events, loading, refetch };
@@ -4072,8 +4127,9 @@ var useGetEventByPlaceId = (googlePlaceId) => {
4072
4127
  const eventByPlaceId = data?.eventByPlaceId || null;
4073
4128
  return { error, eventByPlaceId, loading, refetch };
4074
4129
  };
4075
- var useGetEventsByRegion = (region, options) => {
4130
+ var useGetEventsByRegion = (region, options, dateStatus) => {
4076
4131
  const variables = {
4132
+ dateStatus,
4077
4133
  options,
4078
4134
  region
4079
4135
  };
@@ -4091,14 +4147,15 @@ var useGetEventsByRegion = (region, options) => {
4091
4147
  refetch
4092
4148
  };
4093
4149
  };
4094
- var useSearchEvents = (region, search, tags) => {
4095
- const normalizedSearch = search?.trim() ?? "";
4150
+ var useSearchEvents = (region, searchQuery, tags, dateStatus) => {
4151
+ const normalizedSearch = searchQuery?.trim() ?? "";
4096
4152
  const normalizedTags = (tags ?? []).filter(Boolean);
4097
4153
  const shouldRunQuery = Boolean(region?.trim()) && (normalizedSearch.length > 3 || normalizedTags.length > 0);
4098
4154
  const { loading, error, data, refetch } = useQuery2(SEARCH_EVENTS, {
4099
4155
  fetchPolicy: "network-only",
4100
4156
  skip: !shouldRunQuery,
4101
4157
  variables: {
4158
+ dateStatus,
4102
4159
  region,
4103
4160
  search: normalizedSearch,
4104
4161
  tags: normalizedTags
@@ -4111,11 +4168,12 @@ var useSearchEvents = (region, search, tags) => {
4111
4168
  refetch
4112
4169
  };
4113
4170
  };
4114
- var useGetEventsNearMe = (location) => {
4171
+ var useGetEventsNearMe = (location, dateStatus) => {
4115
4172
  const { loading, error, data, refetch } = useQuery2(GET_EVENTS_NEAR_ME, {
4116
4173
  fetchPolicy: "network-only",
4117
4174
  skip: !location.latitude || !location.longitude,
4118
4175
  variables: {
4176
+ dateStatus,
4119
4177
  latitude: location.latitude,
4120
4178
  longitude: location.longitude,
4121
4179
  radius: location.radius || 1e4
@@ -7125,6 +7183,7 @@ export {
7125
7183
  DEFAULT_RESOURCES_RETURN_LIMIT,
7126
7184
  DEFAULT_RESOURCES_RETURN_OFFSET,
7127
7185
  DEFAULT_SHARE_OG_IMAGE,
7186
+ EVENT_DATE_STATUS_PERIOD_MAP,
7128
7187
  EnumActivity,
7129
7188
  EnumAdShowOn,
7130
7189
  EnumAdStatus,
@@ -7234,7 +7293,9 @@ export {
7234
7293
  eventEndDateFields,
7235
7294
  eventInfo,
7236
7295
  eventInfoPaymentInfo,
7296
+ eventMatchesDateStatusPeriod,
7237
7297
  eventStartDateFields,
7298
+ filterEventsByDateStatusPeriod,
7238
7299
  fonts,
7239
7300
  foodFlavourOptions,
7240
7301
  formatCategoryLabel,
@@ -7255,6 +7316,7 @@ export {
7255
7316
  formatTimestamp,
7256
7317
  gameScreenIdentifierList,
7257
7318
  gameTypeToDisplayName,
7319
+ getAllowedEventDateStatuses,
7258
7320
  getCurrentAndFutureDates,
7259
7321
  iconFiles,
7260
7322
  iconIds,