@timardex/cluemart-shared 1.5.493 → 1.5.495
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-USQKKCIA.mjs → chunk-534WN2SR.mjs} +7 -3
- package/dist/chunk-534WN2SR.mjs.map +1 -0
- package/dist/{chunk-KYDS4REE.mjs → chunk-F4IWHY4O.mjs} +98 -18
- package/dist/chunk-F4IWHY4O.mjs.map +1 -0
- package/dist/{chunk-GSNFQJBZ.mjs → chunk-KPO6ZYQ4.mjs} +2 -95
- package/dist/chunk-KPO6ZYQ4.mjs.map +1 -0
- package/dist/chunk-QG5DPPZI.mjs +96 -0
- package/dist/chunk-QG5DPPZI.mjs.map +1 -0
- package/dist/{chunk-4LT5GOOP.mjs → chunk-SKWWATIR.mjs} +3 -3
- package/dist/enums/index.cjs +6 -2
- package/dist/enums/index.cjs.map +1 -1
- package/dist/enums/index.d.mts +7 -3
- package/dist/enums/index.d.ts +7 -3
- package/dist/enums/index.mjs +1 -1
- package/dist/formFields/index.cjs +11 -6
- package/dist/formFields/index.cjs.map +1 -1
- package/dist/formFields/index.mjs +4 -3
- package/dist/game-DTrJRy_s.d.mts +120 -0
- package/dist/game-lvz2AUuu.d.ts +120 -0
- package/dist/graphql/index.d.mts +2 -1
- package/dist/graphql/index.d.ts +2 -1
- package/dist/graphql/index.mjs +1 -1
- package/dist/hooks/index.cjs +24 -19
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.mts +2 -1
- package/dist/hooks/index.d.ts +2 -1
- package/dist/hooks/index.mjs +5 -4
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +205 -120
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +17 -4
- package/dist/index.d.ts +17 -4
- package/dist/index.mjs +203 -120
- package/dist/index.mjs.map +1 -1
- package/dist/{post-C67Q-sXR.d.ts → post-DXOToXeT.d.ts} +3 -119
- package/dist/{post-C9rtHepe.d.mts → post-wptsHKVN.d.mts} +3 -119
- package/dist/types/index.d.mts +2 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/types/index.mjs +6 -4
- package/dist/utils/index.cjs +174 -15
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.mts +11 -1
- package/dist/utils/index.d.ts +11 -1
- package/dist/utils/index.mjs +7 -2
- package/package.json +1 -1
- package/dist/chunk-GSNFQJBZ.mjs.map +0 -1
- package/dist/chunk-KYDS4REE.mjs.map +0 -1
- package/dist/chunk-USQKKCIA.mjs.map +0 -1
- /package/dist/{chunk-4LT5GOOP.mjs.map → chunk-SKWWATIR.mjs.map} +0 -0
package/dist/index.d.mts
CHANGED
|
@@ -116,9 +116,13 @@ declare enum EnumNotificationResourceType {
|
|
|
116
116
|
DEACTIVATED_EVENT = "deactivated_event",
|
|
117
117
|
DEACTIVATED_PARTNER = "deactivated_partner",
|
|
118
118
|
DEACTIVATED_VENDOR = "deactivated_vendor",
|
|
119
|
+
DOWNGRADED_EVENT = "downgraded_event",
|
|
120
|
+
DOWNGRADED_PARTNER = "downgraded_partner",
|
|
121
|
+
DOWNGRADED_VENDOR = "downgraded_vendor",
|
|
119
122
|
DECLINED_EVENT = "declined_event",
|
|
120
123
|
DECLINED_PARTNER = "declined_partner",
|
|
121
124
|
DECLINED_VENDOR = "declined_vendor",
|
|
125
|
+
DAILY_CLUE_LETTER_AVAILABLE = "daily_clue_letter_available",
|
|
122
126
|
EVENT_INVITE_VENDOR = "event_invite_vendor",
|
|
123
127
|
EVENT_STARTING_SOON = "event_starting_soon",
|
|
124
128
|
EXPIRATION_REMINDER_EVENT = "expiration_reminder_event",
|
|
@@ -129,11 +133,11 @@ declare enum EnumNotificationResourceType {
|
|
|
129
133
|
VENDOR_APPLICATION_TO_EVENT = "vendor_application_to_event"
|
|
130
134
|
}
|
|
131
135
|
declare enum EnumNotificationType {
|
|
136
|
+
CHAT = "chat",
|
|
132
137
|
EVENT = "event",
|
|
133
|
-
VENDOR = "vendor",
|
|
134
138
|
RELATION = "relation",
|
|
135
|
-
|
|
136
|
-
|
|
139
|
+
SYSTEM = "system",
|
|
140
|
+
VENDOR = "vendor"
|
|
137
141
|
}
|
|
138
142
|
declare enum EnumRegions {
|
|
139
143
|
All = "All Regions",
|
|
@@ -2407,6 +2411,15 @@ declare const fonts: {
|
|
|
2407
2411
|
};
|
|
2408
2412
|
};
|
|
2409
2413
|
|
|
2414
|
+
/** Seeded shuffle so all players see the same letter order / placements for a game. */
|
|
2415
|
+
declare function seededShuffle<T>(array: readonly T[], seed: string): T[];
|
|
2416
|
+
declare function computeDailyClueState(dailyClue: DailyClueGameData): {
|
|
2417
|
+
gameHistory: GameHistory | null;
|
|
2418
|
+
todaysClue: GamePlacementClue | null;
|
|
2419
|
+
todaysLetter: string | null;
|
|
2420
|
+
todaysPlacement: GamePlacement | null;
|
|
2421
|
+
} | null;
|
|
2422
|
+
|
|
2410
2423
|
declare const dateFormat = "DD-MM-YYYY";
|
|
2411
2424
|
declare const timeFormat = "HH:mm";
|
|
2412
2425
|
declare function toNZTime(date: Date | string): string;
|
|
@@ -2465,4 +2478,4 @@ declare const cluemartSocialMedia: SocialMediaType[];
|
|
|
2465
2478
|
declare const IOS_URL = "https://apps.apple.com/nz/app/cluemart/id6747251008";
|
|
2466
2479
|
declare const ANDROID_URL = "https://play.google.com/store/apps/details?id=com.timardex.cluemart";
|
|
2467
2480
|
|
|
2468
|
-
export { ANDROID_URL, type AdFormData, type AdResource, type AdType, type AdminUpdateResourceType, type AppSettingsFormData, type AppSettingsType, type AssociateType, type BaseGame, type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatMessageInput, type ChatMessageReaction, type ChatMessageReplyPreview, type ChatMessageSeen, type ChatMessageType, type ChatType, type ContactUsFormData, type CreateAdFormData, 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 CreateUnregisteredVendorFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type CreateVendorFormData, type CreateVendorInfoFormData, 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, EnumSocialMedia, EnumSubscriptionStatus, EnumUserLicence, EnumUserRole, EnumVendorType, EnumVerificationType, type EventFormData, type EventInfoFormData, type EventInfoType, type EventListItemType, type EventStatusType, type EventType, type FormDateField, type FormField, type GameData, type GameDate, type GameHistory, type GameLeaderboard, type GamePlacement, type GamePlacementClue, type GameType, type GeocodeLocation, type GoogleAddressComponent, type GoogleImportedMarket, IOS_URL, type ImageObjectType, ImageTypeEnum, type LocationGeoType, type LocationType, type LoginFormData, type NotificationCount, type NotificationDataType, type NotificationType, type Nullable, type OptionItem, type OwnerType, type ParticipantType, type PartnerFormData, type PartnerType, type PaymentInfoType, type PlacePrediction, type PostContentData, type PostContentFormData, type PostContentGame, type PostContentImage, type PostContentList, type PostContentTextarea, type PostContentType, type PostContentVideo, type PostFileInput, type PostFormData, type PostType, type PosterInputType, type PosterUsageType, type RefundPolicy, type Region, type RegisterFormData, type RelationDate, 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, SAVED_EMAIL_KEY, SAVED_PASSWORD_KEY, SAVED_REFRESH_TOKEN_KEY, SAVED_TOKEN_KEY, type SocialMediaType, type StallType, type StripeSubscription, type Subcategory, type SubcategoryItems, type SubscriptionPlanData, type SubscriptionPlansResponse, type SubscriptionPricingData, type SubscriptionStatusData, type TermsAgreement, USER_STORAGE_KEY, type UnregisteredVendorFormData, type UnregisteredVendorInvitationType, type UnregisteredVendorType, type UseGetEventsByRegionOptions, 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, availableCategories, availableRegionOptions, availableRegionTypes, availableTagTypes, capitalizeFirstLetter, categoryColors, cluemartSocialMedia, companyContactFields, contactUsFields, darkColors, dateFormat, defaultEventFormValues, defaultEventInfoFormValues, defaultPartnerFormValues, defaultUnregisteredVendorFormValues, defaultVendorFormValues, defaultVendorInfoFormValues, emailField, eventBasicInfoFields, eventEndDateFields, eventInfo, eventInfoPaymentInfo, eventStartDateFields, fonts, foodFlavourOptions, formatDate, formatTimestamp, gameScreenIdentifierList, gameTypeToDisplayName, getCurrentAndFutureDates, globalDefaultValues, isFutureDatesBeforeThreshold, licenseNiceNames, lightColors, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, normalizeUrl, packagingOptions, partnerBasicInfoFields, paymentMethodOptions, priceUnits, producedIngOptions, productLabelGroups, profileFields, refundPolicyOptions, registerFields, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, socialMediaFields, sortDatesChronologically, stallTypeOptions, statusOptions, tagOptions, timeFormat, toNZTime, truncateText, useAdForm, useAddParticipantToChat, useAddUserFavouriteResource, useAddUserGoingResource, useAddUserInterestResource, useAddUserPresentResource, useAdminPermanentlyDeleteResource, useAdminResendUserVerificationEmail, useAdminUpdateResourceType, useAppSettingsForm, useCancelSubscription, useContactUs, useContactUsForm, useCrawlGoogleMarkets, useCreateAd, useCreateBulkNotifications, useCreateCheckoutSession, useCreateCustomerPortal, useCreateEvent, useCreateEventInfo, useCreatePartner, useCreatePost, useCreatePoster, useCreatePrivateChat, useCreatePushToken, useCreateRelation, useCreateResourceActivity, useCreateUnregisteredVendor, useCreateUser, useCreateVendor, useCreateVendorInfo, useDeleteAd, useDeleteAllNotifications, useDeleteChat, useDeleteEvent, useDeleteNotification, useDeletePartner, useDeletePost, useDeleteRelation, useDeleteUnregisteredVendor, useDeleteUser, useDeleteVendor, useEventForm, useEventInfoForm, 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, useGetSubscriptionPlans, useGetSubscriptionStatus, useGetUnregisteredVendor, useGetUnregisteredVendors, useGetUser, useGetUserActivities, useGetUserChats, useGetUserEvents, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserPartners, useGetUserResources, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLeaveGame, useLocationSearch, useLogin, useLoginForm, useLogout, useMarkAllNotificationsRead, useMarkChatMessagesSeen, useMarkNotificationRead, usePartnerForm, usePostForm, useRefreshToken, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRemoveUserGoingResource, useRemoveUserInterestResource, useRemoveUserPresentResource, useReportChatUser, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchEvents, useSearchPartners, useSearchVendors, useSelectPackage, useSelectStandardPackage, useSendChatMessage, useStartGame, useToggleChatMessageLike, useUpdateAd, useUpdateAppSettings, useUpdateDailyClueGame, useUpdateEvent, useUpdateEventInfo, useUpdateGoogleImportedMarkets, useUpdatePartner, useUpdatePost, useUpdateRelation, useUpdateSubscriptionPlan, useUpdateUnregisteredVendor, useUpdateUser, useUpdateVendor, useUpdateVendorInfo, useUserForm, useValidateVerificationToken, useValidateVerificationTokenForm, useVendorForm, useVendorInfoForm, validateVerificationTokenFields, vendorAvailability, vendorBasicInfoFields, vendorCompliance, vendorElectricity, vendorEndDateFields, vendorFoodFlavour, vendorFullAddress, vendorGazebo, vendorLocationDescription, vendorMenuFields, vendorPackaging, vendorPriceRange, vendorProducedIn, vendorStallSize, vendorStartDateFields, vendorTable };
|
|
2481
|
+
export { ANDROID_URL, type AdFormData, type AdResource, type AdType, type AdminUpdateResourceType, type AppSettingsFormData, type AppSettingsType, type AssociateType, type BaseGame, type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatMessageInput, type ChatMessageReaction, type ChatMessageReplyPreview, type ChatMessageSeen, type ChatMessageType, type ChatType, type ContactUsFormData, type CreateAdFormData, 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 CreateUnregisteredVendorFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type CreateVendorFormData, type CreateVendorInfoFormData, 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, EnumSocialMedia, EnumSubscriptionStatus, EnumUserLicence, EnumUserRole, EnumVendorType, EnumVerificationType, type EventFormData, type EventInfoFormData, type EventInfoType, type EventListItemType, type EventStatusType, type EventType, type FormDateField, type FormField, type GameData, type GameDate, type GameHistory, type GameLeaderboard, type GamePlacement, type GamePlacementClue, type GameType, type GeocodeLocation, type GoogleAddressComponent, type GoogleImportedMarket, IOS_URL, type ImageObjectType, ImageTypeEnum, type LocationGeoType, type LocationType, type LoginFormData, type NotificationCount, type NotificationDataType, type NotificationType, type Nullable, type OptionItem, type OwnerType, type ParticipantType, type PartnerFormData, type PartnerType, type PaymentInfoType, type PlacePrediction, type PostContentData, type PostContentFormData, type PostContentGame, type PostContentImage, type PostContentList, type PostContentTextarea, type PostContentType, type PostContentVideo, type PostFileInput, type PostFormData, type PostType, type PosterInputType, type PosterUsageType, type RefundPolicy, type Region, type RegisterFormData, type RelationDate, 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, SAVED_EMAIL_KEY, SAVED_PASSWORD_KEY, SAVED_REFRESH_TOKEN_KEY, SAVED_TOKEN_KEY, type SocialMediaType, type StallType, type StripeSubscription, type Subcategory, type SubcategoryItems, type SubscriptionPlanData, type SubscriptionPlansResponse, type SubscriptionPricingData, type SubscriptionStatusData, type TermsAgreement, USER_STORAGE_KEY, type UnregisteredVendorFormData, type UnregisteredVendorInvitationType, type UnregisteredVendorType, type UseGetEventsByRegionOptions, 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, availableCategories, availableRegionOptions, availableRegionTypes, availableTagTypes, capitalizeFirstLetter, categoryColors, cluemartSocialMedia, companyContactFields, computeDailyClueState, contactUsFields, darkColors, dateFormat, defaultEventFormValues, defaultEventInfoFormValues, defaultPartnerFormValues, defaultUnregisteredVendorFormValues, defaultVendorFormValues, defaultVendorInfoFormValues, emailField, eventBasicInfoFields, eventEndDateFields, eventInfo, eventInfoPaymentInfo, eventStartDateFields, fonts, foodFlavourOptions, formatDate, formatTimestamp, gameScreenIdentifierList, gameTypeToDisplayName, getCurrentAndFutureDates, globalDefaultValues, isFutureDatesBeforeThreshold, licenseNiceNames, lightColors, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, normalizeUrl, packagingOptions, partnerBasicInfoFields, paymentMethodOptions, priceUnits, producedIngOptions, productLabelGroups, profileFields, refundPolicyOptions, registerFields, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, seededShuffle, socialMediaFields, sortDatesChronologically, stallTypeOptions, statusOptions, tagOptions, timeFormat, toNZTime, truncateText, useAdForm, useAddParticipantToChat, useAddUserFavouriteResource, useAddUserGoingResource, useAddUserInterestResource, useAddUserPresentResource, useAdminPermanentlyDeleteResource, useAdminResendUserVerificationEmail, useAdminUpdateResourceType, useAppSettingsForm, useCancelSubscription, useContactUs, useContactUsForm, useCrawlGoogleMarkets, useCreateAd, useCreateBulkNotifications, useCreateCheckoutSession, useCreateCustomerPortal, useCreateEvent, useCreateEventInfo, useCreatePartner, useCreatePost, useCreatePoster, useCreatePrivateChat, useCreatePushToken, useCreateRelation, useCreateResourceActivity, useCreateUnregisteredVendor, useCreateUser, useCreateVendor, useCreateVendorInfo, useDeleteAd, useDeleteAllNotifications, useDeleteChat, useDeleteEvent, useDeleteNotification, useDeletePartner, useDeletePost, useDeleteRelation, useDeleteUnregisteredVendor, useDeleteUser, useDeleteVendor, useEventForm, useEventInfoForm, 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, useGetSubscriptionPlans, useGetSubscriptionStatus, useGetUnregisteredVendor, useGetUnregisteredVendors, useGetUser, useGetUserActivities, useGetUserChats, useGetUserEvents, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserPartners, useGetUserResources, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLeaveGame, useLocationSearch, useLogin, useLoginForm, useLogout, useMarkAllNotificationsRead, useMarkChatMessagesSeen, useMarkNotificationRead, usePartnerForm, usePostForm, useRefreshToken, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRemoveUserGoingResource, useRemoveUserInterestResource, useRemoveUserPresentResource, useReportChatUser, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchEvents, useSearchPartners, useSearchVendors, useSelectPackage, useSelectStandardPackage, useSendChatMessage, useStartGame, useToggleChatMessageLike, useUpdateAd, useUpdateAppSettings, useUpdateDailyClueGame, useUpdateEvent, useUpdateEventInfo, useUpdateGoogleImportedMarkets, useUpdatePartner, useUpdatePost, useUpdateRelation, useUpdateSubscriptionPlan, useUpdateUnregisteredVendor, useUpdateUser, useUpdateVendor, useUpdateVendorInfo, useUserForm, useValidateVerificationToken, useValidateVerificationTokenForm, useVendorForm, useVendorInfoForm, validateVerificationTokenFields, vendorAvailability, vendorBasicInfoFields, vendorCompliance, vendorElectricity, vendorEndDateFields, vendorFoodFlavour, vendorFullAddress, vendorGazebo, vendorLocationDescription, vendorMenuFields, vendorPackaging, vendorPriceRange, vendorProducedIn, vendorStallSize, vendorStartDateFields, vendorTable };
|
package/dist/index.d.ts
CHANGED
|
@@ -116,9 +116,13 @@ declare enum EnumNotificationResourceType {
|
|
|
116
116
|
DEACTIVATED_EVENT = "deactivated_event",
|
|
117
117
|
DEACTIVATED_PARTNER = "deactivated_partner",
|
|
118
118
|
DEACTIVATED_VENDOR = "deactivated_vendor",
|
|
119
|
+
DOWNGRADED_EVENT = "downgraded_event",
|
|
120
|
+
DOWNGRADED_PARTNER = "downgraded_partner",
|
|
121
|
+
DOWNGRADED_VENDOR = "downgraded_vendor",
|
|
119
122
|
DECLINED_EVENT = "declined_event",
|
|
120
123
|
DECLINED_PARTNER = "declined_partner",
|
|
121
124
|
DECLINED_VENDOR = "declined_vendor",
|
|
125
|
+
DAILY_CLUE_LETTER_AVAILABLE = "daily_clue_letter_available",
|
|
122
126
|
EVENT_INVITE_VENDOR = "event_invite_vendor",
|
|
123
127
|
EVENT_STARTING_SOON = "event_starting_soon",
|
|
124
128
|
EXPIRATION_REMINDER_EVENT = "expiration_reminder_event",
|
|
@@ -129,11 +133,11 @@ declare enum EnumNotificationResourceType {
|
|
|
129
133
|
VENDOR_APPLICATION_TO_EVENT = "vendor_application_to_event"
|
|
130
134
|
}
|
|
131
135
|
declare enum EnumNotificationType {
|
|
136
|
+
CHAT = "chat",
|
|
132
137
|
EVENT = "event",
|
|
133
|
-
VENDOR = "vendor",
|
|
134
138
|
RELATION = "relation",
|
|
135
|
-
|
|
136
|
-
|
|
139
|
+
SYSTEM = "system",
|
|
140
|
+
VENDOR = "vendor"
|
|
137
141
|
}
|
|
138
142
|
declare enum EnumRegions {
|
|
139
143
|
All = "All Regions",
|
|
@@ -2407,6 +2411,15 @@ declare const fonts: {
|
|
|
2407
2411
|
};
|
|
2408
2412
|
};
|
|
2409
2413
|
|
|
2414
|
+
/** Seeded shuffle so all players see the same letter order / placements for a game. */
|
|
2415
|
+
declare function seededShuffle<T>(array: readonly T[], seed: string): T[];
|
|
2416
|
+
declare function computeDailyClueState(dailyClue: DailyClueGameData): {
|
|
2417
|
+
gameHistory: GameHistory | null;
|
|
2418
|
+
todaysClue: GamePlacementClue | null;
|
|
2419
|
+
todaysLetter: string | null;
|
|
2420
|
+
todaysPlacement: GamePlacement | null;
|
|
2421
|
+
} | null;
|
|
2422
|
+
|
|
2410
2423
|
declare const dateFormat = "DD-MM-YYYY";
|
|
2411
2424
|
declare const timeFormat = "HH:mm";
|
|
2412
2425
|
declare function toNZTime(date: Date | string): string;
|
|
@@ -2465,4 +2478,4 @@ declare const cluemartSocialMedia: SocialMediaType[];
|
|
|
2465
2478
|
declare const IOS_URL = "https://apps.apple.com/nz/app/cluemart/id6747251008";
|
|
2466
2479
|
declare const ANDROID_URL = "https://play.google.com/store/apps/details?id=com.timardex.cluemart";
|
|
2467
2480
|
|
|
2468
|
-
export { ANDROID_URL, type AdFormData, type AdResource, type AdType, type AdminUpdateResourceType, type AppSettingsFormData, type AppSettingsType, type AssociateType, type BaseGame, type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatMessageInput, type ChatMessageReaction, type ChatMessageReplyPreview, type ChatMessageSeen, type ChatMessageType, type ChatType, type ContactUsFormData, type CreateAdFormData, 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 CreateUnregisteredVendorFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type CreateVendorFormData, type CreateVendorInfoFormData, 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, EnumSocialMedia, EnumSubscriptionStatus, EnumUserLicence, EnumUserRole, EnumVendorType, EnumVerificationType, type EventFormData, type EventInfoFormData, type EventInfoType, type EventListItemType, type EventStatusType, type EventType, type FormDateField, type FormField, type GameData, type GameDate, type GameHistory, type GameLeaderboard, type GamePlacement, type GamePlacementClue, type GameType, type GeocodeLocation, type GoogleAddressComponent, type GoogleImportedMarket, IOS_URL, type ImageObjectType, ImageTypeEnum, type LocationGeoType, type LocationType, type LoginFormData, type NotificationCount, type NotificationDataType, type NotificationType, type Nullable, type OptionItem, type OwnerType, type ParticipantType, type PartnerFormData, type PartnerType, type PaymentInfoType, type PlacePrediction, type PostContentData, type PostContentFormData, type PostContentGame, type PostContentImage, type PostContentList, type PostContentTextarea, type PostContentType, type PostContentVideo, type PostFileInput, type PostFormData, type PostType, type PosterInputType, type PosterUsageType, type RefundPolicy, type Region, type RegisterFormData, type RelationDate, 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, SAVED_EMAIL_KEY, SAVED_PASSWORD_KEY, SAVED_REFRESH_TOKEN_KEY, SAVED_TOKEN_KEY, type SocialMediaType, type StallType, type StripeSubscription, type Subcategory, type SubcategoryItems, type SubscriptionPlanData, type SubscriptionPlansResponse, type SubscriptionPricingData, type SubscriptionStatusData, type TermsAgreement, USER_STORAGE_KEY, type UnregisteredVendorFormData, type UnregisteredVendorInvitationType, type UnregisteredVendorType, type UseGetEventsByRegionOptions, 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, availableCategories, availableRegionOptions, availableRegionTypes, availableTagTypes, capitalizeFirstLetter, categoryColors, cluemartSocialMedia, companyContactFields, contactUsFields, darkColors, dateFormat, defaultEventFormValues, defaultEventInfoFormValues, defaultPartnerFormValues, defaultUnregisteredVendorFormValues, defaultVendorFormValues, defaultVendorInfoFormValues, emailField, eventBasicInfoFields, eventEndDateFields, eventInfo, eventInfoPaymentInfo, eventStartDateFields, fonts, foodFlavourOptions, formatDate, formatTimestamp, gameScreenIdentifierList, gameTypeToDisplayName, getCurrentAndFutureDates, globalDefaultValues, isFutureDatesBeforeThreshold, licenseNiceNames, lightColors, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, normalizeUrl, packagingOptions, partnerBasicInfoFields, paymentMethodOptions, priceUnits, producedIngOptions, productLabelGroups, profileFields, refundPolicyOptions, registerFields, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, socialMediaFields, sortDatesChronologically, stallTypeOptions, statusOptions, tagOptions, timeFormat, toNZTime, truncateText, useAdForm, useAddParticipantToChat, useAddUserFavouriteResource, useAddUserGoingResource, useAddUserInterestResource, useAddUserPresentResource, useAdminPermanentlyDeleteResource, useAdminResendUserVerificationEmail, useAdminUpdateResourceType, useAppSettingsForm, useCancelSubscription, useContactUs, useContactUsForm, useCrawlGoogleMarkets, useCreateAd, useCreateBulkNotifications, useCreateCheckoutSession, useCreateCustomerPortal, useCreateEvent, useCreateEventInfo, useCreatePartner, useCreatePost, useCreatePoster, useCreatePrivateChat, useCreatePushToken, useCreateRelation, useCreateResourceActivity, useCreateUnregisteredVendor, useCreateUser, useCreateVendor, useCreateVendorInfo, useDeleteAd, useDeleteAllNotifications, useDeleteChat, useDeleteEvent, useDeleteNotification, useDeletePartner, useDeletePost, useDeleteRelation, useDeleteUnregisteredVendor, useDeleteUser, useDeleteVendor, useEventForm, useEventInfoForm, 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, useGetSubscriptionPlans, useGetSubscriptionStatus, useGetUnregisteredVendor, useGetUnregisteredVendors, useGetUser, useGetUserActivities, useGetUserChats, useGetUserEvents, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserPartners, useGetUserResources, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLeaveGame, useLocationSearch, useLogin, useLoginForm, useLogout, useMarkAllNotificationsRead, useMarkChatMessagesSeen, useMarkNotificationRead, usePartnerForm, usePostForm, useRefreshToken, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRemoveUserGoingResource, useRemoveUserInterestResource, useRemoveUserPresentResource, useReportChatUser, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchEvents, useSearchPartners, useSearchVendors, useSelectPackage, useSelectStandardPackage, useSendChatMessage, useStartGame, useToggleChatMessageLike, useUpdateAd, useUpdateAppSettings, useUpdateDailyClueGame, useUpdateEvent, useUpdateEventInfo, useUpdateGoogleImportedMarkets, useUpdatePartner, useUpdatePost, useUpdateRelation, useUpdateSubscriptionPlan, useUpdateUnregisteredVendor, useUpdateUser, useUpdateVendor, useUpdateVendorInfo, useUserForm, useValidateVerificationToken, useValidateVerificationTokenForm, useVendorForm, useVendorInfoForm, validateVerificationTokenFields, vendorAvailability, vendorBasicInfoFields, vendorCompliance, vendorElectricity, vendorEndDateFields, vendorFoodFlavour, vendorFullAddress, vendorGazebo, vendorLocationDescription, vendorMenuFields, vendorPackaging, vendorPriceRange, vendorProducedIn, vendorStallSize, vendorStartDateFields, vendorTable };
|
|
2481
|
+
export { ANDROID_URL, type AdFormData, type AdResource, type AdType, type AdminUpdateResourceType, type AppSettingsFormData, type AppSettingsType, type AssociateType, type BaseGame, type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatMessageInput, type ChatMessageReaction, type ChatMessageReplyPreview, type ChatMessageSeen, type ChatMessageType, type ChatType, type ContactUsFormData, type CreateAdFormData, 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 CreateUnregisteredVendorFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type CreateVendorFormData, type CreateVendorInfoFormData, 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, EnumSocialMedia, EnumSubscriptionStatus, EnumUserLicence, EnumUserRole, EnumVendorType, EnumVerificationType, type EventFormData, type EventInfoFormData, type EventInfoType, type EventListItemType, type EventStatusType, type EventType, type FormDateField, type FormField, type GameData, type GameDate, type GameHistory, type GameLeaderboard, type GamePlacement, type GamePlacementClue, type GameType, type GeocodeLocation, type GoogleAddressComponent, type GoogleImportedMarket, IOS_URL, type ImageObjectType, ImageTypeEnum, type LocationGeoType, type LocationType, type LoginFormData, type NotificationCount, type NotificationDataType, type NotificationType, type Nullable, type OptionItem, type OwnerType, type ParticipantType, type PartnerFormData, type PartnerType, type PaymentInfoType, type PlacePrediction, type PostContentData, type PostContentFormData, type PostContentGame, type PostContentImage, type PostContentList, type PostContentTextarea, type PostContentType, type PostContentVideo, type PostFileInput, type PostFormData, type PostType, type PosterInputType, type PosterUsageType, type RefundPolicy, type Region, type RegisterFormData, type RelationDate, 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, SAVED_EMAIL_KEY, SAVED_PASSWORD_KEY, SAVED_REFRESH_TOKEN_KEY, SAVED_TOKEN_KEY, type SocialMediaType, type StallType, type StripeSubscription, type Subcategory, type SubcategoryItems, type SubscriptionPlanData, type SubscriptionPlansResponse, type SubscriptionPricingData, type SubscriptionStatusData, type TermsAgreement, USER_STORAGE_KEY, type UnregisteredVendorFormData, type UnregisteredVendorInvitationType, type UnregisteredVendorType, type UseGetEventsByRegionOptions, 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, availableCategories, availableRegionOptions, availableRegionTypes, availableTagTypes, capitalizeFirstLetter, categoryColors, cluemartSocialMedia, companyContactFields, computeDailyClueState, contactUsFields, darkColors, dateFormat, defaultEventFormValues, defaultEventInfoFormValues, defaultPartnerFormValues, defaultUnregisteredVendorFormValues, defaultVendorFormValues, defaultVendorInfoFormValues, emailField, eventBasicInfoFields, eventEndDateFields, eventInfo, eventInfoPaymentInfo, eventStartDateFields, fonts, foodFlavourOptions, formatDate, formatTimestamp, gameScreenIdentifierList, gameTypeToDisplayName, getCurrentAndFutureDates, globalDefaultValues, isFutureDatesBeforeThreshold, licenseNiceNames, lightColors, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, normalizeUrl, packagingOptions, partnerBasicInfoFields, paymentMethodOptions, priceUnits, producedIngOptions, productLabelGroups, profileFields, refundPolicyOptions, registerFields, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, seededShuffle, socialMediaFields, sortDatesChronologically, stallTypeOptions, statusOptions, tagOptions, timeFormat, toNZTime, truncateText, useAdForm, useAddParticipantToChat, useAddUserFavouriteResource, useAddUserGoingResource, useAddUserInterestResource, useAddUserPresentResource, useAdminPermanentlyDeleteResource, useAdminResendUserVerificationEmail, useAdminUpdateResourceType, useAppSettingsForm, useCancelSubscription, useContactUs, useContactUsForm, useCrawlGoogleMarkets, useCreateAd, useCreateBulkNotifications, useCreateCheckoutSession, useCreateCustomerPortal, useCreateEvent, useCreateEventInfo, useCreatePartner, useCreatePost, useCreatePoster, useCreatePrivateChat, useCreatePushToken, useCreateRelation, useCreateResourceActivity, useCreateUnregisteredVendor, useCreateUser, useCreateVendor, useCreateVendorInfo, useDeleteAd, useDeleteAllNotifications, useDeleteChat, useDeleteEvent, useDeleteNotification, useDeletePartner, useDeletePost, useDeleteRelation, useDeleteUnregisteredVendor, useDeleteUser, useDeleteVendor, useEventForm, useEventInfoForm, 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, useGetSubscriptionPlans, useGetSubscriptionStatus, useGetUnregisteredVendor, useGetUnregisteredVendors, useGetUser, useGetUserActivities, useGetUserChats, useGetUserEvents, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserPartners, useGetUserResources, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLeaveGame, useLocationSearch, useLogin, useLoginForm, useLogout, useMarkAllNotificationsRead, useMarkChatMessagesSeen, useMarkNotificationRead, usePartnerForm, usePostForm, useRefreshToken, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRemoveUserGoingResource, useRemoveUserInterestResource, useRemoveUserPresentResource, useReportChatUser, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchEvents, useSearchPartners, useSearchVendors, useSelectPackage, useSelectStandardPackage, useSendChatMessage, useStartGame, useToggleChatMessageLike, useUpdateAd, useUpdateAppSettings, useUpdateDailyClueGame, useUpdateEvent, useUpdateEventInfo, useUpdateGoogleImportedMarkets, useUpdatePartner, useUpdatePost, useUpdateRelation, useUpdateSubscriptionPlan, useUpdateUnregisteredVendor, useUpdateUser, useUpdateVendor, useUpdateVendorInfo, useUserForm, useValidateVerificationToken, useValidateVerificationTokenForm, useVendorForm, useVendorInfoForm, validateVerificationTokenFields, vendorAvailability, vendorBasicInfoFields, vendorCompliance, vendorElectricity, vendorEndDateFields, vendorFoodFlavour, vendorFullAddress, vendorGazebo, vendorLocationDescription, vendorMenuFields, vendorPackaging, vendorPriceRange, vendorProducedIn, vendorStallSize, vendorStartDateFields, vendorTable };
|
package/dist/index.mjs
CHANGED
|
@@ -126,9 +126,13 @@ var EnumNotificationResourceType = /* @__PURE__ */ ((EnumNotificationResourceTyp
|
|
|
126
126
|
EnumNotificationResourceType2["DEACTIVATED_EVENT"] = "deactivated_event";
|
|
127
127
|
EnumNotificationResourceType2["DEACTIVATED_PARTNER"] = "deactivated_partner";
|
|
128
128
|
EnumNotificationResourceType2["DEACTIVATED_VENDOR"] = "deactivated_vendor";
|
|
129
|
+
EnumNotificationResourceType2["DOWNGRADED_EVENT"] = "downgraded_event";
|
|
130
|
+
EnumNotificationResourceType2["DOWNGRADED_PARTNER"] = "downgraded_partner";
|
|
131
|
+
EnumNotificationResourceType2["DOWNGRADED_VENDOR"] = "downgraded_vendor";
|
|
129
132
|
EnumNotificationResourceType2["DECLINED_EVENT"] = "declined_event";
|
|
130
133
|
EnumNotificationResourceType2["DECLINED_PARTNER"] = "declined_partner";
|
|
131
134
|
EnumNotificationResourceType2["DECLINED_VENDOR"] = "declined_vendor";
|
|
135
|
+
EnumNotificationResourceType2["DAILY_CLUE_LETTER_AVAILABLE"] = "daily_clue_letter_available";
|
|
132
136
|
EnumNotificationResourceType2["EVENT_INVITE_VENDOR"] = "event_invite_vendor" /* EVENT_INVITE_VENDOR */;
|
|
133
137
|
EnumNotificationResourceType2["EVENT_STARTING_SOON"] = "event_starting_soon";
|
|
134
138
|
EnumNotificationResourceType2["EXPIRATION_REMINDER_EVENT"] = "expiration_reminder_event";
|
|
@@ -140,11 +144,11 @@ var EnumNotificationResourceType = /* @__PURE__ */ ((EnumNotificationResourceTyp
|
|
|
140
144
|
return EnumNotificationResourceType2;
|
|
141
145
|
})(EnumNotificationResourceType || {});
|
|
142
146
|
var EnumNotificationType = /* @__PURE__ */ ((EnumNotificationType2) => {
|
|
147
|
+
EnumNotificationType2["CHAT"] = "chat";
|
|
143
148
|
EnumNotificationType2["EVENT"] = "event" /* EVENT */;
|
|
144
|
-
EnumNotificationType2["VENDOR"] = "vendor" /* VENDOR */;
|
|
145
149
|
EnumNotificationType2["RELATION"] = "relation";
|
|
146
|
-
EnumNotificationType2["CHAT"] = "chat";
|
|
147
150
|
EnumNotificationType2["SYSTEM"] = "system";
|
|
151
|
+
EnumNotificationType2["VENDOR"] = "vendor" /* VENDOR */;
|
|
148
152
|
return EnumNotificationType2;
|
|
149
153
|
})(EnumNotificationType || {});
|
|
150
154
|
var EnumRegions = /* @__PURE__ */ ((EnumRegions2) => {
|
|
@@ -429,25 +433,192 @@ var priceUnits = [
|
|
|
429
433
|
{ label: "Half dozen", value: "HALF_DOZEN" }
|
|
430
434
|
];
|
|
431
435
|
|
|
432
|
-
// src/utils/
|
|
436
|
+
// src/utils/dailyClueGame.ts
|
|
433
437
|
import dayjs from "dayjs";
|
|
438
|
+
import utc from "dayjs/plugin/utc";
|
|
439
|
+
|
|
440
|
+
// src/types/game.ts
|
|
441
|
+
var gameScreenIdentifierList = [
|
|
442
|
+
{
|
|
443
|
+
clue: "Where your actions turn into a timeline.",
|
|
444
|
+
id: "activities"
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
clue: "Where conversations happen without speaking.",
|
|
448
|
+
id: "chat"
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
clue: "The place to redefine who you are.",
|
|
452
|
+
id: "edit-profile"
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
clue: "A single moment worth showing up for.",
|
|
456
|
+
id: "event"
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
clue: "What\u2019s happening around you, right now.",
|
|
460
|
+
id: "events-near-me"
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
clue: "A collection of things worth attending.",
|
|
464
|
+
id: "events"
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
clue: "What\u2019s happening in a wider area\u2014not just nearby.",
|
|
468
|
+
id: "events/region"
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
clue: "Where fun becomes a challenge.",
|
|
472
|
+
id: "games"
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
clue: "Your starting point for everything.",
|
|
476
|
+
id: "home"
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
clue: "Where the app taps you on the shoulder.",
|
|
480
|
+
id: "notifications"
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
clue: "Where you fine-tune your experience.",
|
|
484
|
+
id: "options"
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
clue: "A single collaborator in the ecosystem.",
|
|
488
|
+
id: "partner"
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
clue: "The network behind the scenes.",
|
|
492
|
+
id: "partners"
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
clue: "Where you share something with everyone.",
|
|
496
|
+
id: "post"
|
|
497
|
+
},
|
|
498
|
+
{
|
|
499
|
+
clue: "Your identity, on display.",
|
|
500
|
+
id: "profile"
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
clue: "One provider offering something valuable.",
|
|
504
|
+
id: "vendor"
|
|
505
|
+
},
|
|
506
|
+
{
|
|
507
|
+
clue: "A marketplace of providers.",
|
|
508
|
+
id: "vendors"
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
clue: "People who stopped by to see you.",
|
|
512
|
+
id: "visitors"
|
|
513
|
+
}
|
|
514
|
+
];
|
|
515
|
+
var EnumGameType = /* @__PURE__ */ ((EnumGameType2) => {
|
|
516
|
+
EnumGameType2["DAILY_CLUE"] = "dailyClue";
|
|
517
|
+
return EnumGameType2;
|
|
518
|
+
})(EnumGameType || {});
|
|
519
|
+
var gameTypeToDisplayName = {
|
|
520
|
+
["dailyClue" /* DAILY_CLUE */]: "Daily Clue"
|
|
521
|
+
};
|
|
522
|
+
var EnumGameStatus = /* @__PURE__ */ ((EnumGameStatus2) => {
|
|
523
|
+
EnumGameStatus2["GAME_COMPLETED"] = "GAME_COMPLETED";
|
|
524
|
+
EnumGameStatus2["GAME_LEFT"] = "GAME_LEFT";
|
|
525
|
+
EnumGameStatus2["GAME_IN_PROGRESS"] = "GAME_IN_PROGRESS";
|
|
526
|
+
return EnumGameStatus2;
|
|
527
|
+
})(EnumGameStatus || {});
|
|
528
|
+
|
|
529
|
+
// src/utils/dailyClueGame.ts
|
|
530
|
+
dayjs.extend(utc);
|
|
531
|
+
function createSeededRng(seed) {
|
|
532
|
+
let t = seed >>> 0;
|
|
533
|
+
return function random() {
|
|
534
|
+
t += 1831565813;
|
|
535
|
+
let x = t;
|
|
536
|
+
x = Math.imul(x ^ x >>> 15, x | 1);
|
|
537
|
+
x ^= x + Math.imul(x ^ x >>> 7, x | 61);
|
|
538
|
+
return ((x ^ x >>> 14) >>> 0) / 4294967296;
|
|
539
|
+
};
|
|
540
|
+
}
|
|
541
|
+
function hashStringToNumber(seed) {
|
|
542
|
+
let hash = 2166136261;
|
|
543
|
+
for (let i = 0; i < seed.length; i++) {
|
|
544
|
+
hash ^= seed.codePointAt(i) ?? 0;
|
|
545
|
+
hash = Math.imul(hash, 16777619);
|
|
546
|
+
}
|
|
547
|
+
return hash >>> 0;
|
|
548
|
+
}
|
|
549
|
+
function seededShuffle(array6, seed) {
|
|
550
|
+
const rng = createSeededRng(hashStringToNumber(seed));
|
|
551
|
+
const result = [...array6];
|
|
552
|
+
for (let i = result.length - 1; i > 0; i--) {
|
|
553
|
+
const j = Math.floor(rng() * (i + 1));
|
|
554
|
+
[result[i], result[j]] = [result[j], result[i]];
|
|
555
|
+
}
|
|
556
|
+
return result;
|
|
557
|
+
}
|
|
558
|
+
function getDayIndex(startDate) {
|
|
559
|
+
return dayjs().utc().startOf("day").diff(dayjs(startDate).utc().startOf("day"), "day");
|
|
560
|
+
}
|
|
561
|
+
function computeDailyClueState(dailyClue) {
|
|
562
|
+
const { startDate, endDate } = dailyClue.gameFields.gameDate;
|
|
563
|
+
const { shuffled, collected } = dailyClue.letterInfo;
|
|
564
|
+
const shuffledPlacements = seededShuffle(
|
|
565
|
+
gameScreenIdentifierList,
|
|
566
|
+
startDate.toISOString()
|
|
567
|
+
);
|
|
568
|
+
const today = dayjs().utc().startOf("day");
|
|
569
|
+
const start = dayjs(startDate).utc().startOf("day");
|
|
570
|
+
const end = dayjs(endDate).utc().startOf("day");
|
|
571
|
+
if (today.isBefore(start)) {
|
|
572
|
+
return null;
|
|
573
|
+
}
|
|
574
|
+
if (today.isAfter(end)) {
|
|
575
|
+
return null;
|
|
576
|
+
}
|
|
577
|
+
const index = getDayIndex(startDate);
|
|
578
|
+
if (index < 0 || index >= shuffled.length) return null;
|
|
579
|
+
if (collected?.includes(shuffled[index])) {
|
|
580
|
+
return null;
|
|
581
|
+
}
|
|
582
|
+
if (today.isAfter(end)) {
|
|
583
|
+
return {
|
|
584
|
+
gameHistory: {
|
|
585
|
+
gameDate: dailyClue.gameFields.gameDate,
|
|
586
|
+
gameStatus: "GAME_COMPLETED" /* GAME_COMPLETED */,
|
|
587
|
+
gameType: dailyClue.gameFields.gameType,
|
|
588
|
+
pointsEarned: dailyClue.points
|
|
589
|
+
},
|
|
590
|
+
todaysClue: null,
|
|
591
|
+
todaysLetter: null,
|
|
592
|
+
todaysPlacement: null
|
|
593
|
+
};
|
|
594
|
+
}
|
|
595
|
+
return {
|
|
596
|
+
gameHistory: null,
|
|
597
|
+
todaysClue: shuffledPlacements[index].clue,
|
|
598
|
+
todaysLetter: shuffled[index],
|
|
599
|
+
todaysPlacement: shuffledPlacements[index].id
|
|
600
|
+
};
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
// src/utils/index.ts
|
|
604
|
+
import dayjs2 from "dayjs";
|
|
434
605
|
import customParseFormat from "dayjs/plugin/customParseFormat.js";
|
|
435
606
|
import isSameOrAfter from "dayjs/plugin/isSameOrAfter.js";
|
|
436
607
|
import timezone from "dayjs/plugin/timezone.js";
|
|
437
|
-
import
|
|
608
|
+
import utc2 from "dayjs/plugin/utc.js";
|
|
438
609
|
var dateFormat = "DD-MM-YYYY";
|
|
439
610
|
var timeFormat = "HH:mm";
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
611
|
+
dayjs2.extend(customParseFormat);
|
|
612
|
+
dayjs2.extend(utc2);
|
|
613
|
+
dayjs2.extend(timezone);
|
|
614
|
+
dayjs2.extend(isSameOrAfter);
|
|
444
615
|
var NZ_TZ = "Pacific/Auckland";
|
|
445
616
|
function toNZTime(date3) {
|
|
446
|
-
return
|
|
617
|
+
return dayjs2(date3).tz(NZ_TZ).format();
|
|
447
618
|
}
|
|
448
619
|
var formatDate = (dateStr, display = "datetime", timeStr) => {
|
|
449
620
|
const dateTimeStr = timeStr ? `${dateStr} ${timeStr}` : dateStr;
|
|
450
|
-
const dateTime = timeStr ?
|
|
621
|
+
const dateTime = timeStr ? dayjs2(dateTimeStr, `${dateFormat} ${timeFormat}`) : dayjs2(dateStr, dateFormat);
|
|
451
622
|
const formattedDate = dateTime.format("dddd, D MMMM, YYYY");
|
|
452
623
|
const formattedTime = dateTime.format("h:mm a");
|
|
453
624
|
switch (display) {
|
|
@@ -462,9 +633,9 @@ var formatDate = (dateStr, display = "datetime", timeStr) => {
|
|
|
462
633
|
}
|
|
463
634
|
};
|
|
464
635
|
var getCurrentAndFutureDates = (dates) => {
|
|
465
|
-
const now =
|
|
636
|
+
const now = dayjs2();
|
|
466
637
|
return dates.filter((dateObj) => {
|
|
467
|
-
const dateTime =
|
|
638
|
+
const dateTime = dayjs2(
|
|
468
639
|
`${dateObj.startDate} ${dateObj.startTime}`,
|
|
469
640
|
`${dateFormat} ${timeFormat}`
|
|
470
641
|
);
|
|
@@ -472,16 +643,15 @@ var getCurrentAndFutureDates = (dates) => {
|
|
|
472
643
|
});
|
|
473
644
|
};
|
|
474
645
|
var isFutureDatesBeforeThreshold = (date3, minHoursFromNow) => {
|
|
475
|
-
const threshold = minHoursFromNow ?
|
|
476
|
-
const dateTime =
|
|
646
|
+
const threshold = minHoursFromNow ? dayjs2().add(minHoursFromNow, "hour") : dayjs2().startOf("day");
|
|
647
|
+
const dateTime = dayjs2(
|
|
477
648
|
`${date3.startDate} ${date3.startTime}`,
|
|
478
649
|
`${dateFormat} ${timeFormat}`
|
|
479
650
|
);
|
|
480
651
|
return dateTime.isSameOrAfter(threshold);
|
|
481
652
|
};
|
|
482
653
|
var formatTimestamp = (timestamp) => {
|
|
483
|
-
const formattedDate =
|
|
484
|
-
const formattedTime = dayjs(timestamp).tz("Pacific/Auckland").format(timeFormat);
|
|
654
|
+
const formattedDate = dayjs2(timestamp).tz("Pacific/Auckland").format(dateFormat);
|
|
485
655
|
return formatDate(formattedDate, "date");
|
|
486
656
|
};
|
|
487
657
|
var isIsoDateString = (value) => {
|
|
@@ -532,8 +702,8 @@ function sortDatesChronologically(dates) {
|
|
|
532
702
|
}
|
|
533
703
|
return [...dates].sort((a, b) => {
|
|
534
704
|
const dateTimeFormat = `${dateFormat} ${timeFormat}`;
|
|
535
|
-
const dateA =
|
|
536
|
-
const dateB =
|
|
705
|
+
const dateA = dayjs2(`${a.startDate} ${a.startTime}`, dateTimeFormat);
|
|
706
|
+
const dateB = dayjs2(`${b.startDate} ${b.startTime}`, dateTimeFormat);
|
|
537
707
|
return dateA.valueOf() - dateB.valueOf();
|
|
538
708
|
});
|
|
539
709
|
}
|
|
@@ -6020,7 +6190,7 @@ import * as React from "react";
|
|
|
6020
6190
|
import { useForm } from "react-hook-form";
|
|
6021
6191
|
|
|
6022
6192
|
// src/yupSchema/global.ts
|
|
6023
|
-
import
|
|
6193
|
+
import dayjs3 from "dayjs";
|
|
6024
6194
|
import customParseFormat2 from "dayjs/plugin/customParseFormat.js";
|
|
6025
6195
|
import isSameOrAfter2 from "dayjs/plugin/isSameOrAfter.js";
|
|
6026
6196
|
import * as yup from "yup";
|
|
@@ -6049,8 +6219,8 @@ var noLeadingZeros = (fieldName, options = {}) => {
|
|
|
6049
6219
|
return true;
|
|
6050
6220
|
};
|
|
6051
6221
|
};
|
|
6052
|
-
|
|
6053
|
-
|
|
6222
|
+
dayjs3.extend(isSameOrAfter2);
|
|
6223
|
+
dayjs3.extend(customParseFormat2);
|
|
6054
6224
|
var emailRequiredSchema = yup.string().email("Invalid email address").required("Email is required").label("Email").transform(
|
|
6055
6225
|
(value) => typeof value === "string" ? value.trim().toLowerCase() : value
|
|
6056
6226
|
);
|
|
@@ -6081,12 +6251,12 @@ var contactDetailsSchema = yup.object({
|
|
|
6081
6251
|
landlinePhone: landlinePhoneSchema
|
|
6082
6252
|
}).nullable().default(void 0);
|
|
6083
6253
|
var endDateNotInPastTest = yup.string().test("not-in-past", "End date cannot be in the past", (value) => {
|
|
6084
|
-
const now =
|
|
6085
|
-
return value ?
|
|
6254
|
+
const now = dayjs3();
|
|
6255
|
+
return value ? dayjs3(value, dateFormat, true).isSameOrAfter(now, "day") : false;
|
|
6086
6256
|
});
|
|
6087
6257
|
var startDateNotInPastTest = yup.string().test("not-in-past", "Start date cannot be in the past", (value) => {
|
|
6088
|
-
const now =
|
|
6089
|
-
return value ?
|
|
6258
|
+
const now = dayjs3();
|
|
6259
|
+
return value ? dayjs3(value, dateFormat, true).isSameOrAfter(now, "day") : false;
|
|
6090
6260
|
});
|
|
6091
6261
|
var endDateAfterStartDateTest = yup.string().test(
|
|
6092
6262
|
"end-after-start",
|
|
@@ -6094,8 +6264,8 @@ var endDateAfterStartDateTest = yup.string().test(
|
|
|
6094
6264
|
function(value) {
|
|
6095
6265
|
const { startDate } = this.parent;
|
|
6096
6266
|
if (!startDate || !value) return false;
|
|
6097
|
-
return
|
|
6098
|
-
|
|
6267
|
+
return dayjs3(value, dateFormat, true).isSameOrAfter(
|
|
6268
|
+
dayjs3(startDate, dateFormat, true),
|
|
6099
6269
|
"day"
|
|
6100
6270
|
);
|
|
6101
6271
|
}
|
|
@@ -6106,12 +6276,12 @@ var endTimeMustBeAfterStartTimeTest = yup.string().test(
|
|
|
6106
6276
|
function(value) {
|
|
6107
6277
|
const { startDate, endDate, startTime } = this.parent;
|
|
6108
6278
|
if (!startDate || !endDate || !startTime || !value) return false;
|
|
6109
|
-
const startDateTime =
|
|
6279
|
+
const startDateTime = dayjs3(
|
|
6110
6280
|
`${startDate} ${startTime}`,
|
|
6111
6281
|
`${dateFormat} ${timeFormat}`,
|
|
6112
6282
|
true
|
|
6113
6283
|
);
|
|
6114
|
-
const endDateTime =
|
|
6284
|
+
const endDateTime = dayjs3(
|
|
6115
6285
|
`${endDate} ${value}`,
|
|
6116
6286
|
`${dateFormat} ${timeFormat}`,
|
|
6117
6287
|
true
|
|
@@ -6123,10 +6293,10 @@ var startTimeCannotBeInPastTest = yup.string().test(
|
|
|
6123
6293
|
"valid-start-time",
|
|
6124
6294
|
"Start time cannot be in the past",
|
|
6125
6295
|
function(value) {
|
|
6126
|
-
const now =
|
|
6296
|
+
const now = dayjs3();
|
|
6127
6297
|
const { startDate } = this.parent;
|
|
6128
6298
|
if (!startDate || !value) return false;
|
|
6129
|
-
const startDateTime =
|
|
6299
|
+
const startDateTime = dayjs3(
|
|
6130
6300
|
`${startDate} ${value}`,
|
|
6131
6301
|
`${dateFormat} ${timeFormat}`,
|
|
6132
6302
|
true
|
|
@@ -7732,95 +7902,6 @@ var EnumActivity = /* @__PURE__ */ ((EnumActivity2) => {
|
|
|
7732
7902
|
EnumActivity2["VIEW"] = "VIEW";
|
|
7733
7903
|
return EnumActivity2;
|
|
7734
7904
|
})(EnumActivity || {});
|
|
7735
|
-
|
|
7736
|
-
// src/types/game.ts
|
|
7737
|
-
var gameScreenIdentifierList = [
|
|
7738
|
-
{
|
|
7739
|
-
clue: "Where your actions turn into a timeline.",
|
|
7740
|
-
id: "activities"
|
|
7741
|
-
},
|
|
7742
|
-
{
|
|
7743
|
-
clue: "Where conversations happen without speaking.",
|
|
7744
|
-
id: "chat"
|
|
7745
|
-
},
|
|
7746
|
-
{
|
|
7747
|
-
clue: "The place to redefine who you are.",
|
|
7748
|
-
id: "edit-profile"
|
|
7749
|
-
},
|
|
7750
|
-
{
|
|
7751
|
-
clue: "A single moment worth showing up for.",
|
|
7752
|
-
id: "event"
|
|
7753
|
-
},
|
|
7754
|
-
{
|
|
7755
|
-
clue: "What\u2019s happening around you, right now.",
|
|
7756
|
-
id: "events-near-me"
|
|
7757
|
-
},
|
|
7758
|
-
{
|
|
7759
|
-
clue: "A collection of things worth attending.",
|
|
7760
|
-
id: "events"
|
|
7761
|
-
},
|
|
7762
|
-
{
|
|
7763
|
-
clue: "What\u2019s happening in a wider area\u2014not just nearby.",
|
|
7764
|
-
id: "events/region"
|
|
7765
|
-
},
|
|
7766
|
-
{
|
|
7767
|
-
clue: "Where fun becomes a challenge.",
|
|
7768
|
-
id: "games"
|
|
7769
|
-
},
|
|
7770
|
-
{
|
|
7771
|
-
clue: "Your starting point for everything.",
|
|
7772
|
-
id: "home"
|
|
7773
|
-
},
|
|
7774
|
-
{
|
|
7775
|
-
clue: "Where the app taps you on the shoulder.",
|
|
7776
|
-
id: "notifications"
|
|
7777
|
-
},
|
|
7778
|
-
{
|
|
7779
|
-
clue: "Where you fine-tune your experience.",
|
|
7780
|
-
id: "options"
|
|
7781
|
-
},
|
|
7782
|
-
{
|
|
7783
|
-
clue: "A single collaborator in the ecosystem.",
|
|
7784
|
-
id: "partner"
|
|
7785
|
-
},
|
|
7786
|
-
{
|
|
7787
|
-
clue: "The network behind the scenes.",
|
|
7788
|
-
id: "partners"
|
|
7789
|
-
},
|
|
7790
|
-
{
|
|
7791
|
-
clue: "Where you share something with everyone.",
|
|
7792
|
-
id: "post"
|
|
7793
|
-
},
|
|
7794
|
-
{
|
|
7795
|
-
clue: "Your identity, on display.",
|
|
7796
|
-
id: "profile"
|
|
7797
|
-
},
|
|
7798
|
-
{
|
|
7799
|
-
clue: "One provider offering something valuable.",
|
|
7800
|
-
id: "vendor"
|
|
7801
|
-
},
|
|
7802
|
-
{
|
|
7803
|
-
clue: "A marketplace of providers.",
|
|
7804
|
-
id: "vendors"
|
|
7805
|
-
},
|
|
7806
|
-
{
|
|
7807
|
-
clue: "People who stopped by to see you.",
|
|
7808
|
-
id: "visitors"
|
|
7809
|
-
}
|
|
7810
|
-
];
|
|
7811
|
-
var EnumGameType = /* @__PURE__ */ ((EnumGameType2) => {
|
|
7812
|
-
EnumGameType2["DAILY_CLUE"] = "dailyClue";
|
|
7813
|
-
return EnumGameType2;
|
|
7814
|
-
})(EnumGameType || {});
|
|
7815
|
-
var gameTypeToDisplayName = {
|
|
7816
|
-
["dailyClue" /* DAILY_CLUE */]: "Daily Clue"
|
|
7817
|
-
};
|
|
7818
|
-
var EnumGameStatus = /* @__PURE__ */ ((EnumGameStatus2) => {
|
|
7819
|
-
EnumGameStatus2["GAME_COMPLETED"] = "GAME_COMPLETED";
|
|
7820
|
-
EnumGameStatus2["GAME_LEFT"] = "GAME_LEFT";
|
|
7821
|
-
EnumGameStatus2["GAME_IN_PROGRESS"] = "GAME_IN_PROGRESS";
|
|
7822
|
-
return EnumGameStatus2;
|
|
7823
|
-
})(EnumGameStatus || {});
|
|
7824
7905
|
export {
|
|
7825
7906
|
ANDROID_URL,
|
|
7826
7907
|
EnumActivity,
|
|
@@ -7869,6 +7950,7 @@ export {
|
|
|
7869
7950
|
categoryColors,
|
|
7870
7951
|
cluemartSocialMedia,
|
|
7871
7952
|
companyContactFields,
|
|
7953
|
+
computeDailyClueState,
|
|
7872
7954
|
contactUsFields,
|
|
7873
7955
|
darkColors,
|
|
7874
7956
|
dateFormat,
|
|
@@ -7912,6 +7994,7 @@ export {
|
|
|
7912
7994
|
requestPasswordResetFields,
|
|
7913
7995
|
requirementsOptions,
|
|
7914
7996
|
resetPasswordFields,
|
|
7997
|
+
seededShuffle,
|
|
7915
7998
|
socialMediaFields,
|
|
7916
7999
|
sortDatesChronologically,
|
|
7917
8000
|
stallTypeOptions,
|