@timardex/cluemart-shared 1.5.509 → 1.5.511
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-RQDZX76B.mjs → chunk-2GSMGPKT.mjs} +19 -8
- package/dist/{chunk-RQDZX76B.mjs.map → chunk-2GSMGPKT.mjs.map} +1 -1
- package/dist/{chunk-UOPC7KMU.mjs → chunk-FTEZFZZW.mjs} +10 -19
- package/dist/chunk-FTEZFZZW.mjs.map +1 -0
- package/dist/{chunk-7GWVTPXL.mjs → chunk-LJJCZVW4.mjs} +3 -2
- package/dist/{chunk-7GWVTPXL.mjs.map → chunk-LJJCZVW4.mjs.map} +1 -1
- package/dist/{chunk-EFNSI75F.mjs → chunk-OMXMDHJ3.mjs} +2 -2
- package/dist/formFields/index.mjs +3 -3
- package/dist/{game-CoVv7iyf.d.mts → game-65XFYqKi.d.mts} +18 -10
- package/dist/{game-BzOJ4f7U.d.ts → game-PMt_jT_7.d.ts} +18 -10
- package/dist/graphql/index.cjs +18 -7
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +2 -2
- package/dist/graphql/index.d.ts +2 -2
- package/dist/graphql/index.mjs +1 -1
- package/dist/hooks/index.cjs +18 -7
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.mts +2 -2
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.mjs +4 -4
- package/dist/index.cjs +32 -29
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +18 -11
- package/dist/index.d.ts +18 -11
- package/dist/index.mjs +32 -29
- package/dist/index.mjs.map +1 -1
- package/dist/{post-CcJowEi5.d.mts → post-BJHPePwy.d.mts} +1 -1
- package/dist/{post-D9_1FbFI.d.ts → post-fnGzMU9c.d.ts} +1 -1
- package/dist/types/index.cjs +2 -1
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.mts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.mjs +1 -1
- package/dist/utils/index.cjs +8 -17
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.mts +1 -2
- package/dist/utils/index.d.ts +1 -2
- package/dist/utils/index.mjs +2 -2
- package/package.json +1 -1
- package/dist/chunk-UOPC7KMU.mjs.map +0 -1
- /package/dist/{chunk-EFNSI75F.mjs.map → chunk-OMXMDHJ3.mjs.map} +0 -0
package/dist/index.d.mts
CHANGED
|
@@ -1065,16 +1065,11 @@ type DailyClueGameData = {
|
|
|
1065
1065
|
};
|
|
1066
1066
|
streak: number;
|
|
1067
1067
|
};
|
|
1068
|
-
type GameDataMap = {
|
|
1069
|
-
[EnumGameType.DAILY_CLUE]: DailyClueGameData;
|
|
1070
|
-
};
|
|
1071
|
-
type GameData = {
|
|
1072
|
-
[K in keyof GameDataMap]?: GameDataMap[K] | null;
|
|
1073
|
-
};
|
|
1074
1068
|
declare enum EnumGameStatus {
|
|
1075
1069
|
GAME_COMPLETED = "GAME_COMPLETED",
|
|
1070
|
+
GAME_IN_PROGRESS = "GAME_IN_PROGRESS",
|
|
1076
1071
|
GAME_LEFT = "GAME_LEFT",
|
|
1077
|
-
|
|
1072
|
+
GAME_STARTED = "GAME_STARTED"
|
|
1078
1073
|
}
|
|
1079
1074
|
type GameHistory = {
|
|
1080
1075
|
gameDate: GameDate;
|
|
@@ -1082,13 +1077,26 @@ type GameHistory = {
|
|
|
1082
1077
|
gameType: EnumGameType;
|
|
1083
1078
|
pointsEarned: number;
|
|
1084
1079
|
};
|
|
1080
|
+
type GameDataMap = {
|
|
1081
|
+
[EnumGameType.DAILY_CLUE]: DailyClueGameData;
|
|
1082
|
+
};
|
|
1083
|
+
type GameDataMapType = {
|
|
1084
|
+
[K in keyof GameDataMap]?: GameDataMap[K] | null;
|
|
1085
|
+
};
|
|
1086
|
+
type GameDataType = {
|
|
1087
|
+
active: boolean;
|
|
1088
|
+
createdAt: Date;
|
|
1089
|
+
gameData: GameDataMapType;
|
|
1090
|
+
gameHistory: GameHistory[] | null;
|
|
1091
|
+
gameType: EnumGameType;
|
|
1092
|
+
updatedAt: Date | null;
|
|
1093
|
+
};
|
|
1085
1094
|
type GameType = {
|
|
1086
1095
|
_id: string;
|
|
1087
1096
|
active: boolean;
|
|
1088
1097
|
createdAt: Date;
|
|
1089
1098
|
deletedAt: Date | null;
|
|
1090
|
-
|
|
1091
|
-
gameHistory: GameHistory[] | null;
|
|
1099
|
+
game: GameDataType[] | null;
|
|
1092
1100
|
owner: OwnerType;
|
|
1093
1101
|
points: number;
|
|
1094
1102
|
updatedAt: Date | null;
|
|
@@ -2437,7 +2445,6 @@ declare const fonts: {
|
|
|
2437
2445
|
/** Seeded shuffle so all players see the same letter order / placements for a game. */
|
|
2438
2446
|
declare function seededShuffle<T>(array: readonly T[], seed: string): T[];
|
|
2439
2447
|
declare function computeDailyClueState(dailyClue: DailyClueGameData): {
|
|
2440
|
-
gameHistory: GameHistory | null;
|
|
2441
2448
|
todaysClue: GamePlacementClue | null;
|
|
2442
2449
|
todaysLetter: string | null;
|
|
2443
2450
|
todaysPlacement: GamePlacement | null;
|
|
@@ -2505,4 +2512,4 @@ declare const cluemartSocialMedia: SocialMediaType[];
|
|
|
2505
2512
|
declare const IOS_URL = "https://apps.apple.com/nz/app/cluemart/id6747251008";
|
|
2506
2513
|
declare const ANDROID_URL = "https://play.google.com/store/apps/details?id=com.timardex.cluemart";
|
|
2507
2514
|
|
|
2508
|
-
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
|
|
2515
|
+
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 GameDataType, 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, isIsoDateString, licenseNiceNames, lightColors, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, normalizeUrl, nzStartOfDay, 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
|
@@ -1065,16 +1065,11 @@ type DailyClueGameData = {
|
|
|
1065
1065
|
};
|
|
1066
1066
|
streak: number;
|
|
1067
1067
|
};
|
|
1068
|
-
type GameDataMap = {
|
|
1069
|
-
[EnumGameType.DAILY_CLUE]: DailyClueGameData;
|
|
1070
|
-
};
|
|
1071
|
-
type GameData = {
|
|
1072
|
-
[K in keyof GameDataMap]?: GameDataMap[K] | null;
|
|
1073
|
-
};
|
|
1074
1068
|
declare enum EnumGameStatus {
|
|
1075
1069
|
GAME_COMPLETED = "GAME_COMPLETED",
|
|
1070
|
+
GAME_IN_PROGRESS = "GAME_IN_PROGRESS",
|
|
1076
1071
|
GAME_LEFT = "GAME_LEFT",
|
|
1077
|
-
|
|
1072
|
+
GAME_STARTED = "GAME_STARTED"
|
|
1078
1073
|
}
|
|
1079
1074
|
type GameHistory = {
|
|
1080
1075
|
gameDate: GameDate;
|
|
@@ -1082,13 +1077,26 @@ type GameHistory = {
|
|
|
1082
1077
|
gameType: EnumGameType;
|
|
1083
1078
|
pointsEarned: number;
|
|
1084
1079
|
};
|
|
1080
|
+
type GameDataMap = {
|
|
1081
|
+
[EnumGameType.DAILY_CLUE]: DailyClueGameData;
|
|
1082
|
+
};
|
|
1083
|
+
type GameDataMapType = {
|
|
1084
|
+
[K in keyof GameDataMap]?: GameDataMap[K] | null;
|
|
1085
|
+
};
|
|
1086
|
+
type GameDataType = {
|
|
1087
|
+
active: boolean;
|
|
1088
|
+
createdAt: Date;
|
|
1089
|
+
gameData: GameDataMapType;
|
|
1090
|
+
gameHistory: GameHistory[] | null;
|
|
1091
|
+
gameType: EnumGameType;
|
|
1092
|
+
updatedAt: Date | null;
|
|
1093
|
+
};
|
|
1085
1094
|
type GameType = {
|
|
1086
1095
|
_id: string;
|
|
1087
1096
|
active: boolean;
|
|
1088
1097
|
createdAt: Date;
|
|
1089
1098
|
deletedAt: Date | null;
|
|
1090
|
-
|
|
1091
|
-
gameHistory: GameHistory[] | null;
|
|
1099
|
+
game: GameDataType[] | null;
|
|
1092
1100
|
owner: OwnerType;
|
|
1093
1101
|
points: number;
|
|
1094
1102
|
updatedAt: Date | null;
|
|
@@ -2437,7 +2445,6 @@ declare const fonts: {
|
|
|
2437
2445
|
/** Seeded shuffle so all players see the same letter order / placements for a game. */
|
|
2438
2446
|
declare function seededShuffle<T>(array: readonly T[], seed: string): T[];
|
|
2439
2447
|
declare function computeDailyClueState(dailyClue: DailyClueGameData): {
|
|
2440
|
-
gameHistory: GameHistory | null;
|
|
2441
2448
|
todaysClue: GamePlacementClue | null;
|
|
2442
2449
|
todaysLetter: string | null;
|
|
2443
2450
|
todaysPlacement: GamePlacement | null;
|
|
@@ -2505,4 +2512,4 @@ declare const cluemartSocialMedia: SocialMediaType[];
|
|
|
2505
2512
|
declare const IOS_URL = "https://apps.apple.com/nz/app/cluemart/id6747251008";
|
|
2506
2513
|
declare const ANDROID_URL = "https://play.google.com/store/apps/details?id=com.timardex.cluemart";
|
|
2507
2514
|
|
|
2508
|
-
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
|
|
2515
|
+
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 GameDataType, 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, isIsoDateString, licenseNiceNames, lightColors, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, normalizeUrl, nzStartOfDay, 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
|
@@ -538,11 +538,12 @@ var EnumGameType = /* @__PURE__ */ ((EnumGameType2) => {
|
|
|
538
538
|
var gameTypeToDisplayName = {
|
|
539
539
|
["dailyClue" /* DAILY_CLUE */]: "Daily Clue"
|
|
540
540
|
};
|
|
541
|
-
var EnumGameStatus = /* @__PURE__ */ ((
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
541
|
+
var EnumGameStatus = /* @__PURE__ */ ((EnumGameStatus3) => {
|
|
542
|
+
EnumGameStatus3["GAME_COMPLETED"] = "GAME_COMPLETED";
|
|
543
|
+
EnumGameStatus3["GAME_IN_PROGRESS"] = "GAME_IN_PROGRESS";
|
|
544
|
+
EnumGameStatus3["GAME_LEFT"] = "GAME_LEFT";
|
|
545
|
+
EnumGameStatus3["GAME_STARTED"] = "GAME_STARTED";
|
|
546
|
+
return EnumGameStatus3;
|
|
546
547
|
})(EnumGameStatus || {});
|
|
547
548
|
|
|
548
549
|
// src/utils/date.ts
|
|
@@ -666,12 +667,6 @@ function computeDailyClueState(dailyClue) {
|
|
|
666
667
|
}
|
|
667
668
|
if (today.isAfter(end)) {
|
|
668
669
|
return {
|
|
669
|
-
gameHistory: {
|
|
670
|
-
gameDate: dailyClue.gameFields.gameDate,
|
|
671
|
-
gameStatus: "GAME_COMPLETED" /* GAME_COMPLETED */,
|
|
672
|
-
gameType: dailyClue.gameFields.gameType,
|
|
673
|
-
pointsEarned: dailyClue.points
|
|
674
|
-
},
|
|
675
670
|
todaysClue: null,
|
|
676
671
|
todaysLetter: null,
|
|
677
672
|
todaysPlacement: null
|
|
@@ -679,31 +674,28 @@ function computeDailyClueState(dailyClue) {
|
|
|
679
674
|
}
|
|
680
675
|
const index = getDayIndex(start, today);
|
|
681
676
|
console.log("DEBUG", {
|
|
677
|
+
collected,
|
|
682
678
|
end: end.format(),
|
|
683
679
|
index,
|
|
684
|
-
|
|
685
|
-
|
|
680
|
+
shuffled,
|
|
681
|
+
shuffledPlacements,
|
|
686
682
|
start: start.format(),
|
|
687
683
|
today: today.format()
|
|
688
684
|
});
|
|
689
685
|
if (index < 0 || index >= shuffled.length) return null;
|
|
690
|
-
const
|
|
691
|
-
if (
|
|
692
|
-
const alreadyHaveTodaysSlot = (collected ?? []).some(
|
|
693
|
-
(l) => l.trim().toLowerCase() === letterToday
|
|
694
|
-
);
|
|
695
|
-
if (alreadyHaveTodaysSlot) {
|
|
686
|
+
const collectedCount = (collected ?? []).length;
|
|
687
|
+
if (collectedCount > index) {
|
|
696
688
|
return {
|
|
697
|
-
gameHistory: null,
|
|
698
689
|
todaysClue: null,
|
|
699
690
|
todaysLetter: null,
|
|
700
691
|
todaysPlacement: null
|
|
701
692
|
};
|
|
702
693
|
}
|
|
694
|
+
const letterToday = shuffled[index];
|
|
695
|
+
if (!letterToday) return null;
|
|
703
696
|
return {
|
|
704
|
-
gameHistory: null,
|
|
705
697
|
todaysClue: shuffledPlacements[index].clue,
|
|
706
|
-
todaysLetter:
|
|
698
|
+
todaysLetter: letterToday,
|
|
707
699
|
todaysPlacement: shuffledPlacements[index].id
|
|
708
700
|
};
|
|
709
701
|
}
|
|
@@ -5728,12 +5720,10 @@ var GAME_HISTORY_FIELDS_FRAGMENT = gql29`
|
|
|
5728
5720
|
}
|
|
5729
5721
|
${GAME_DATE_FIELDS_FRAGMENT}
|
|
5730
5722
|
`;
|
|
5731
|
-
var
|
|
5732
|
-
fragment
|
|
5733
|
-
_id
|
|
5723
|
+
var GAME_DATA_FIELDS_FRAGMENT = gql29`
|
|
5724
|
+
fragment GameDataFields on GameDataType {
|
|
5734
5725
|
active
|
|
5735
5726
|
createdAt
|
|
5736
|
-
deletedAt
|
|
5737
5727
|
gameData {
|
|
5738
5728
|
dailyClue {
|
|
5739
5729
|
...DailyClueGameDataFields
|
|
@@ -5742,16 +5732,29 @@ var GAME_FIELDS_FRAGMENT = gql29`
|
|
|
5742
5732
|
gameHistory {
|
|
5743
5733
|
...GameHistoryFields
|
|
5744
5734
|
}
|
|
5735
|
+
gameType
|
|
5745
5736
|
updatedAt
|
|
5737
|
+
}
|
|
5738
|
+
${DAILY_CLUE_GAME_DATA_FIELDS_FRAGMENT}
|
|
5739
|
+
${GAME_HISTORY_FIELDS_FRAGMENT}
|
|
5740
|
+
`;
|
|
5741
|
+
var GAME_FIELDS_FRAGMENT = gql29`
|
|
5742
|
+
fragment GameFields on GameType {
|
|
5743
|
+
_id
|
|
5744
|
+
active
|
|
5745
|
+
createdAt
|
|
5746
|
+
deletedAt
|
|
5747
|
+
game {
|
|
5748
|
+
...GameDataFields
|
|
5749
|
+
}
|
|
5746
5750
|
owner {
|
|
5747
5751
|
...OwnerFields
|
|
5748
5752
|
}
|
|
5749
5753
|
points
|
|
5754
|
+
updatedAt
|
|
5750
5755
|
}
|
|
5751
|
-
${DAILY_CLUE_GAME_DATA_FIELDS_FRAGMENT}
|
|
5752
5756
|
${OWNER_FIELDS_FRAGMENT}
|
|
5753
|
-
${
|
|
5754
|
-
${GAME_HISTORY_FIELDS_FRAGMENT}
|
|
5757
|
+
${GAME_DATA_FIELDS_FRAGMENT}
|
|
5755
5758
|
`;
|
|
5756
5759
|
var GET_GAMES = gql29`
|
|
5757
5760
|
query getGames {
|