@timardex/cluemart-shared 1.4.78 → 1.4.80

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 (46) hide show
  1. package/dist/{chunk-KYDS4REE.mjs → chunk-2VZKL2X6.mjs} +2 -2
  2. package/dist/{chunk-4LT5GOOP.mjs → chunk-AOPQ64JU.mjs} +3 -3
  3. package/dist/{chunk-FL4P2WWM.mjs → chunk-HU2XPJFC.mjs} +3 -2
  4. package/dist/{chunk-FL4P2WWM.mjs.map → chunk-HU2XPJFC.mjs.map} +1 -1
  5. package/dist/{chunk-SSNWS3V4.mjs → chunk-T6D7HTHH.mjs} +143 -2
  6. package/dist/chunk-T6D7HTHH.mjs.map +1 -0
  7. package/dist/{chunk-USQKKCIA.mjs → chunk-VE6JFCH2.mjs} +8 -2
  8. package/dist/{chunk-USQKKCIA.mjs.map → chunk-VE6JFCH2.mjs.map} +1 -1
  9. package/dist/enums/index.cjs +7 -0
  10. package/dist/enums/index.cjs.map +1 -1
  11. package/dist/enums/index.d.mts +5 -1
  12. package/dist/enums/index.d.ts +5 -1
  13. package/dist/enums/index.mjs +3 -1
  14. package/dist/formFields/index.cjs.map +1 -1
  15. package/dist/formFields/index.mjs +3 -3
  16. package/dist/graphql/index.cjs +145 -0
  17. package/dist/graphql/index.cjs.map +1 -1
  18. package/dist/graphql/index.d.mts +47 -3
  19. package/dist/graphql/index.d.ts +47 -3
  20. package/dist/graphql/index.mjs +10 -2
  21. package/dist/hooks/index.cjs +86 -1
  22. package/dist/hooks/index.cjs.map +1 -1
  23. package/dist/hooks/index.d.mts +1 -1
  24. package/dist/hooks/index.d.ts +1 -1
  25. package/dist/hooks/index.mjs +5 -5
  26. package/dist/index.cjs +154 -1
  27. package/dist/index.cjs.map +1 -1
  28. package/dist/index.d.mts +83 -3
  29. package/dist/index.d.ts +83 -3
  30. package/dist/index.mjs +149 -1
  31. package/dist/index.mjs.map +1 -1
  32. package/dist/{post-DZF3nYKf.d.mts → post-7mWg32YL.d.mts} +17 -4
  33. package/dist/{post-DdErP7-k.d.ts → post-Bf93S2HP.d.ts} +17 -4
  34. package/dist/{resourceActivities-CqrscA5x.d.mts → resourceActivities-5kKwlOry.d.mts} +21 -2
  35. package/dist/{resourceActivities-2FaGRW-i.d.ts → resourceActivities-Bf_CX38O.d.ts} +21 -2
  36. package/dist/types/index.cjs +2 -1
  37. package/dist/types/index.cjs.map +1 -1
  38. package/dist/types/index.d.mts +2 -2
  39. package/dist/types/index.d.ts +2 -2
  40. package/dist/types/index.mjs +1 -1
  41. package/dist/utils/index.cjs.map +1 -1
  42. package/dist/utils/index.mjs +2 -2
  43. package/package.json +1 -1
  44. package/dist/chunk-SSNWS3V4.mjs.map +0 -1
  45. /package/dist/{chunk-KYDS4REE.mjs.map → chunk-2VZKL2X6.mjs.map} +0 -0
  46. /package/dist/{chunk-4LT5GOOP.mjs.map → chunk-AOPQ64JU.mjs.map} +0 -0
package/dist/index.d.mts CHANGED
@@ -205,6 +205,10 @@ declare enum EnumBillingPeriod {
205
205
  YEARLY_ANNUAL_BILLED = "yearly_annual_billed",
206
206
  YEARLY_MONTHLY_BILLED = "yearly_monthly_billed"
207
207
  }
208
+ declare enum EnumGameType {
209
+ DAILY_CLUE = "daily_clue",
210
+ DAILY_REWARD = "daily_reward"
211
+ }
208
212
 
209
213
  type RelationDate = {
210
214
  dateTime: DateTimeType & {
@@ -840,11 +844,13 @@ interface UserType {
840
844
  email: string;
841
845
  events: string[] | null;
842
846
  firstName: string;
847
+ games: string[] | null;
843
848
  isTester: boolean;
844
849
  lastName: string;
845
850
  licences: UserLicenceType[] | null;
846
851
  partner: string | null;
847
852
  password: string;
853
+ points: number | null;
848
854
  platform: EnumOSPlatform | null;
849
855
  preferredRegion: string;
850
856
  promoCodes?: string[] | null;
@@ -956,9 +962,10 @@ interface PartnerType extends BaseResourceType {
956
962
  declare enum EnumPostType {
957
963
  DAILY_MEETS = "daily_meets",
958
964
  DAILY_TIPS = "daily_tips",
959
- DAILY_POLL = "daily_poll"
965
+ DAILY_GAMES = "daily_games"
960
966
  }
961
967
  declare enum EnumPostContentType {
968
+ GAME = "game",
962
969
  IMAGE = "image",
963
970
  LIST = "list",
964
971
  TEXTAREA = "textarea",
@@ -992,7 +999,17 @@ type PostContentList = {
992
999
  }[];
993
1000
  };
994
1001
  };
995
- type PostContentData = PostContentTextarea | PostContentImage | PostContentVideo | PostContentList;
1002
+ type PostContentGame = {
1003
+ game: {
1004
+ title: string;
1005
+ gameType: EnumGameType;
1006
+ gameInfo: {
1007
+ dailyClue?: string;
1008
+ };
1009
+ gameEndDate?: string;
1010
+ };
1011
+ };
1012
+ type PostContentData = PostContentGame | PostContentTextarea | PostContentImage | PostContentVideo | PostContentList;
996
1013
  type PostContentFormData = {
997
1014
  contentData?: PostContentData | null;
998
1015
  contentOrder?: number | null;
@@ -1055,6 +1072,25 @@ interface GoogleImportedMarket extends EventListItemType {
1055
1072
  website?: string;
1056
1073
  }
1057
1074
 
1075
+ type DailyClueGameData = {
1076
+ lastFoundDate: string;
1077
+ streak: number;
1078
+ points: number;
1079
+ collectedLetters?: string[];
1080
+ gameEndDate?: string;
1081
+ };
1082
+ type GameType = {
1083
+ _id: string;
1084
+ active: boolean;
1085
+ createdAt: Date;
1086
+ deletedAt: Date | null;
1087
+ gameData: {
1088
+ dailyClue?: DailyClueGameData | null;
1089
+ };
1090
+ updatedAt: Date | null;
1091
+ owner: OwnerType | null;
1092
+ };
1093
+
1058
1094
  declare const vendorElectricity: {
1059
1095
  details: FormField;
1060
1096
  isRequired: FormField;
@@ -2098,6 +2134,50 @@ declare const useGetAppSettings: () => {
2098
2134
  }>>;
2099
2135
  };
2100
2136
 
2137
+ declare const useStartGame: () => {
2138
+ error: _apollo_client.ApolloError | undefined;
2139
+ loading: boolean;
2140
+ startGame: (options?: _apollo_client.MutationFunctionOptions<{
2141
+ startGame: {
2142
+ _id: string;
2143
+ };
2144
+ }, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<{
2145
+ startGame: {
2146
+ _id: string;
2147
+ };
2148
+ }>>;
2149
+ };
2150
+ declare const useLeaveGame: () => {
2151
+ error: _apollo_client.ApolloError | undefined;
2152
+ leaveGame: (options?: _apollo_client.MutationFunctionOptions<{
2153
+ leaveGame: {
2154
+ userId: string;
2155
+ };
2156
+ }, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<{
2157
+ leaveGame: {
2158
+ userId: string;
2159
+ };
2160
+ }>>;
2161
+ loading: boolean;
2162
+ };
2163
+
2164
+ declare const useGetGames: (userId?: string) => {
2165
+ error: _apollo_client.ApolloError | undefined;
2166
+ games: GameType[];
2167
+ loading: boolean;
2168
+ refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<{
2169
+ games: GameType[];
2170
+ }>>;
2171
+ };
2172
+ declare const useGetGame: (_id: string) => {
2173
+ error: _apollo_client.ApolloError | undefined;
2174
+ game: GameType | null;
2175
+ loading: boolean;
2176
+ refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<{
2177
+ game: GameType | null;
2178
+ }>>;
2179
+ };
2180
+
2101
2181
  interface PlacePrediction {
2102
2182
  place_id: string;
2103
2183
  description: string;
@@ -2293,4 +2373,4 @@ declare const cluemartSocialMedia: SocialMediaType[];
2293
2373
  declare const IOS_URL = "https://apps.apple.com/nz/app/cluemart/id6747251008";
2294
2374
  declare const ANDROID_URL = "https://play.google.com/store/apps/details?id=com.timardex.cluemart";
2295
2375
 
2296
- export { ANDROID_URL, type AdFormData, type AdResource, type AdType, type AdminUpdateResourceType, type AppSettingsFormData, type AppSettingsType, type AssociateType, 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 DateTimeType, type DateTimeWithPriceType, type DeviceInfo, EnumActivity, EnumAdShowOn, EnumAdStatus, EnumAdStyle, EnumAdType, EnumBillingPeriod, EnumChatReportReason, EnumChatType, EnumEventDateStatus, EnumEventType, EnumFoodFlavor, EnumFoodType, 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 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 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, 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, 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, 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, useToggleChatMessageLike, useUpdateAd, useUpdateAppSettings, 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 };
2376
+ export { ANDROID_URL, type AdFormData, type AdResource, type AdType, type AdminUpdateResourceType, type AppSettingsFormData, type AppSettingsType, type AssociateType, 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, 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 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, 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, 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, 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
@@ -205,6 +205,10 @@ declare enum EnumBillingPeriod {
205
205
  YEARLY_ANNUAL_BILLED = "yearly_annual_billed",
206
206
  YEARLY_MONTHLY_BILLED = "yearly_monthly_billed"
207
207
  }
208
+ declare enum EnumGameType {
209
+ DAILY_CLUE = "daily_clue",
210
+ DAILY_REWARD = "daily_reward"
211
+ }
208
212
 
209
213
  type RelationDate = {
210
214
  dateTime: DateTimeType & {
@@ -840,11 +844,13 @@ interface UserType {
840
844
  email: string;
841
845
  events: string[] | null;
842
846
  firstName: string;
847
+ games: string[] | null;
843
848
  isTester: boolean;
844
849
  lastName: string;
845
850
  licences: UserLicenceType[] | null;
846
851
  partner: string | null;
847
852
  password: string;
853
+ points: number | null;
848
854
  platform: EnumOSPlatform | null;
849
855
  preferredRegion: string;
850
856
  promoCodes?: string[] | null;
@@ -956,9 +962,10 @@ interface PartnerType extends BaseResourceType {
956
962
  declare enum EnumPostType {
957
963
  DAILY_MEETS = "daily_meets",
958
964
  DAILY_TIPS = "daily_tips",
959
- DAILY_POLL = "daily_poll"
965
+ DAILY_GAMES = "daily_games"
960
966
  }
961
967
  declare enum EnumPostContentType {
968
+ GAME = "game",
962
969
  IMAGE = "image",
963
970
  LIST = "list",
964
971
  TEXTAREA = "textarea",
@@ -992,7 +999,17 @@ type PostContentList = {
992
999
  }[];
993
1000
  };
994
1001
  };
995
- type PostContentData = PostContentTextarea | PostContentImage | PostContentVideo | PostContentList;
1002
+ type PostContentGame = {
1003
+ game: {
1004
+ title: string;
1005
+ gameType: EnumGameType;
1006
+ gameInfo: {
1007
+ dailyClue?: string;
1008
+ };
1009
+ gameEndDate?: string;
1010
+ };
1011
+ };
1012
+ type PostContentData = PostContentGame | PostContentTextarea | PostContentImage | PostContentVideo | PostContentList;
996
1013
  type PostContentFormData = {
997
1014
  contentData?: PostContentData | null;
998
1015
  contentOrder?: number | null;
@@ -1055,6 +1072,25 @@ interface GoogleImportedMarket extends EventListItemType {
1055
1072
  website?: string;
1056
1073
  }
1057
1074
 
1075
+ type DailyClueGameData = {
1076
+ lastFoundDate: string;
1077
+ streak: number;
1078
+ points: number;
1079
+ collectedLetters?: string[];
1080
+ gameEndDate?: string;
1081
+ };
1082
+ type GameType = {
1083
+ _id: string;
1084
+ active: boolean;
1085
+ createdAt: Date;
1086
+ deletedAt: Date | null;
1087
+ gameData: {
1088
+ dailyClue?: DailyClueGameData | null;
1089
+ };
1090
+ updatedAt: Date | null;
1091
+ owner: OwnerType | null;
1092
+ };
1093
+
1058
1094
  declare const vendorElectricity: {
1059
1095
  details: FormField;
1060
1096
  isRequired: FormField;
@@ -2098,6 +2134,50 @@ declare const useGetAppSettings: () => {
2098
2134
  }>>;
2099
2135
  };
2100
2136
 
2137
+ declare const useStartGame: () => {
2138
+ error: _apollo_client.ApolloError | undefined;
2139
+ loading: boolean;
2140
+ startGame: (options?: _apollo_client.MutationFunctionOptions<{
2141
+ startGame: {
2142
+ _id: string;
2143
+ };
2144
+ }, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<{
2145
+ startGame: {
2146
+ _id: string;
2147
+ };
2148
+ }>>;
2149
+ };
2150
+ declare const useLeaveGame: () => {
2151
+ error: _apollo_client.ApolloError | undefined;
2152
+ leaveGame: (options?: _apollo_client.MutationFunctionOptions<{
2153
+ leaveGame: {
2154
+ userId: string;
2155
+ };
2156
+ }, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<{
2157
+ leaveGame: {
2158
+ userId: string;
2159
+ };
2160
+ }>>;
2161
+ loading: boolean;
2162
+ };
2163
+
2164
+ declare const useGetGames: (userId?: string) => {
2165
+ error: _apollo_client.ApolloError | undefined;
2166
+ games: GameType[];
2167
+ loading: boolean;
2168
+ refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<{
2169
+ games: GameType[];
2170
+ }>>;
2171
+ };
2172
+ declare const useGetGame: (_id: string) => {
2173
+ error: _apollo_client.ApolloError | undefined;
2174
+ game: GameType | null;
2175
+ loading: boolean;
2176
+ refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<{
2177
+ game: GameType | null;
2178
+ }>>;
2179
+ };
2180
+
2101
2181
  interface PlacePrediction {
2102
2182
  place_id: string;
2103
2183
  description: string;
@@ -2293,4 +2373,4 @@ declare const cluemartSocialMedia: SocialMediaType[];
2293
2373
  declare const IOS_URL = "https://apps.apple.com/nz/app/cluemart/id6747251008";
2294
2374
  declare const ANDROID_URL = "https://play.google.com/store/apps/details?id=com.timardex.cluemart";
2295
2375
 
2296
- export { ANDROID_URL, type AdFormData, type AdResource, type AdType, type AdminUpdateResourceType, type AppSettingsFormData, type AppSettingsType, type AssociateType, 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 DateTimeType, type DateTimeWithPriceType, type DeviceInfo, EnumActivity, EnumAdShowOn, EnumAdStatus, EnumAdStyle, EnumAdType, EnumBillingPeriod, EnumChatReportReason, EnumChatType, EnumEventDateStatus, EnumEventType, EnumFoodFlavor, EnumFoodType, 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 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 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, 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, 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, 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, useToggleChatMessageLike, useUpdateAd, useUpdateAppSettings, 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 };
2376
+ export { ANDROID_URL, type AdFormData, type AdResource, type AdType, type AdminUpdateResourceType, type AppSettingsFormData, type AppSettingsType, type AssociateType, 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, 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 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, 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, 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, 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
@@ -225,6 +225,11 @@ var EnumBillingPeriod = /* @__PURE__ */ ((EnumBillingPeriod2) => {
225
225
  EnumBillingPeriod2["YEARLY_MONTHLY_BILLED"] = "yearly_monthly_billed";
226
226
  return EnumBillingPeriod2;
227
227
  })(EnumBillingPeriod || {});
228
+ var EnumGameType = /* @__PURE__ */ ((EnumGameType2) => {
229
+ EnumGameType2["DAILY_CLUE"] = "daily_clue";
230
+ EnumGameType2["DAILY_REWARD"] = "daily_reward";
231
+ return EnumGameType2;
232
+ })(EnumGameType || {});
228
233
 
229
234
  // src/formFields/vendor/vendor.ts
230
235
  var vendorBasicInfoFields = [
@@ -2444,12 +2449,14 @@ var USER_FIELDS_FRAGMENT = gql2`
2444
2449
  email
2445
2450
  events
2446
2451
  firstName
2452
+ games
2447
2453
  isTester
2448
2454
  lastName
2449
2455
  licences {
2450
2456
  ...LicenceFields
2451
2457
  }
2452
2458
  partner
2459
+ points
2453
2460
  platform
2454
2461
  preferredRegion
2455
2462
  promoCodes
@@ -5465,6 +5472,14 @@ import { gql as gql30 } from "@apollo/client";
5465
5472
  import { gql as gql29 } from "@apollo/client";
5466
5473
  var POST_CONTENT_DATA_FIELDS_FRAGMENT = gql29`
5467
5474
  fragment PostContentDataFields on PostContentData {
5475
+ game {
5476
+ title
5477
+ gameType
5478
+ gameInfo {
5479
+ dailyClue
5480
+ }
5481
+ gameEndDate
5482
+ }
5468
5483
  textarea {
5469
5484
  title
5470
5485
  data
@@ -5692,6 +5707,133 @@ var useGetAppSettings = () => {
5692
5707
  return { appSettings, error, loading, refetch };
5693
5708
  };
5694
5709
 
5710
+ // src/graphql/hooks/game/hooksMutation.ts
5711
+ import { useMutation as useMutation18 } from "@apollo/client";
5712
+
5713
+ // src/graphql/mutations/game.ts
5714
+ import { gql as gql34 } from "@apollo/client";
5715
+
5716
+ // src/graphql/queries/game.ts
5717
+ import { gql as gql33 } from "@apollo/client";
5718
+ var DAILY_CLUE_GAME_DATA_FIELDS_FRAGMENT = gql33`
5719
+ fragment DailyClueGameDataFields on DailyClueGameDataType {
5720
+ lastFoundDate
5721
+ streak
5722
+ points
5723
+ collectedLetters
5724
+ gameEndDate
5725
+ }
5726
+ `;
5727
+ var GAME_FIELDS_FRAGMENT = gql33`
5728
+ fragment GameFields on GameType {
5729
+ _id
5730
+ active
5731
+ createdAt
5732
+ deletedAt
5733
+ gameData {
5734
+ dailyClue {
5735
+ ...DailyClueGameDataFields
5736
+ }
5737
+ }
5738
+ updatedAt
5739
+ owner {
5740
+ ...OwnerFields
5741
+ }
5742
+ }
5743
+ ${DAILY_CLUE_GAME_DATA_FIELDS_FRAGMENT}
5744
+ ${OWNER_FIELDS_FRAGMENT}
5745
+ `;
5746
+ var GET_GAMES = gql33`
5747
+ query getGames($userId: ID) {
5748
+ games(userId: $userId) {
5749
+ ...GameFields
5750
+ }
5751
+ }
5752
+ ${GAME_FIELDS_FRAGMENT}
5753
+ `;
5754
+ var GET_GAME = gql33`
5755
+ query getGame($_id: ID!) {
5756
+ game(_id: $_id) {
5757
+ ...GameFields
5758
+ }
5759
+ }
5760
+ ${GAME_FIELDS_FRAGMENT}
5761
+ `;
5762
+
5763
+ // src/graphql/mutations/game.ts
5764
+ var START_GAME_MUTATION = gql34`
5765
+ mutation startGame($input: GameInputType!) {
5766
+ startGame(input: $input) {
5767
+ ...GameFields
5768
+ }
5769
+ }
5770
+ ${GAME_FIELDS_FRAGMENT}
5771
+ `;
5772
+ var LEAVE_GAME_MUTATION = gql34`
5773
+ mutation leaveGame($_id: ID!) {
5774
+ leaveGame(_id: $_id) {
5775
+ ...GameFields
5776
+ }
5777
+ }
5778
+ ${GAME_FIELDS_FRAGMENT}
5779
+ `;
5780
+
5781
+ // src/graphql/hooks/game/hooksMutation.ts
5782
+ var useStartGame = () => {
5783
+ const [startGame, { loading, error }] = useMutation18(START_GAME_MUTATION, {
5784
+ awaitRefetchQueries: true,
5785
+ refetchQueries: (mutationResult) => {
5786
+ const gameId = mutationResult?.data?.startGame?._id;
5787
+ if (!gameId) return [];
5788
+ return [
5789
+ {
5790
+ query: GET_GAME,
5791
+ variables: { _id: gameId }
5792
+ // Pass the gameId for refetching
5793
+ }
5794
+ ];
5795
+ }
5796
+ });
5797
+ return { error, loading, startGame };
5798
+ };
5799
+ var useLeaveGame = () => {
5800
+ const [leaveGame, { loading, error }] = useMutation18(LEAVE_GAME_MUTATION, {
5801
+ awaitRefetchQueries: true,
5802
+ refetchQueries: (mutationResult) => {
5803
+ const userId = mutationResult?.data?.leaveGame?.userId;
5804
+ if (!userId) return [];
5805
+ return [
5806
+ {
5807
+ query: GET_GAMES,
5808
+ variables: { userId }
5809
+ // Pass the userId for refetching
5810
+ }
5811
+ ];
5812
+ }
5813
+ });
5814
+ return { error, leaveGame, loading };
5815
+ };
5816
+
5817
+ // src/graphql/hooks/game/hooksQuery.ts
5818
+ import { useQuery as useQuery13 } from "@apollo/client";
5819
+ var useGetGames = (userId) => {
5820
+ const { loading, error, data, refetch } = useQuery13(GET_GAMES, {
5821
+ fetchPolicy: "network-only",
5822
+ variables: { userId }
5823
+ });
5824
+ const games = data?.games || [];
5825
+ return { error, games, loading, refetch };
5826
+ };
5827
+ var useGetGame = (_id) => {
5828
+ const { loading, error, data, refetch } = useQuery13(GET_GAME, {
5829
+ fetchPolicy: "network-only",
5830
+ skip: !_id,
5831
+ variables: { _id }
5832
+ });
5833
+ const game = data?.game || null;
5834
+ return { error, game, loading, refetch };
5835
+ };
5836
+
5695
5837
  // src/hooks/useLocationSearch.ts
5696
5838
  var handleApiError = (error, message) => {
5697
5839
  console.error(message, error);
@@ -6331,10 +6473,11 @@ import * as yup8 from "yup";
6331
6473
  var EnumPostType = /* @__PURE__ */ ((EnumPostType2) => {
6332
6474
  EnumPostType2["DAILY_MEETS"] = "daily_meets";
6333
6475
  EnumPostType2["DAILY_TIPS"] = "daily_tips";
6334
- EnumPostType2["DAILY_POLL"] = "daily_poll";
6476
+ EnumPostType2["DAILY_GAMES"] = "daily_games";
6335
6477
  return EnumPostType2;
6336
6478
  })(EnumPostType || {});
6337
6479
  var EnumPostContentType = /* @__PURE__ */ ((EnumPostContentType2) => {
6480
+ EnumPostContentType2["GAME"] = "game";
6338
6481
  EnumPostContentType2["IMAGE"] = "image";
6339
6482
  EnumPostContentType2["LIST"] = "list";
6340
6483
  EnumPostContentType2["TEXTAREA"] = "textarea";
@@ -7523,6 +7666,7 @@ export {
7523
7666
  EnumEventType,
7524
7667
  EnumFoodFlavor,
7525
7668
  EnumFoodType,
7669
+ EnumGameType,
7526
7670
  EnumInviteStatus,
7527
7671
  EnumNotificationResourceType,
7528
7672
  EnumNotificationType,
@@ -7662,6 +7806,8 @@ export {
7662
7806
  useGetEvents,
7663
7807
  useGetEventsByRegion,
7664
7808
  useGetEventsNearMe,
7809
+ useGetGame,
7810
+ useGetGames,
7665
7811
  useGetNotificationCount,
7666
7812
  useGetNotificationCountSubscription,
7667
7813
  useGetPartner,
@@ -7694,6 +7840,7 @@ export {
7694
7840
  useGetVendorRelations,
7695
7841
  useGetVendors,
7696
7842
  useGetVendorsByRegion,
7843
+ useLeaveGame,
7697
7844
  useLocationSearch,
7698
7845
  useLogin,
7699
7846
  useLoginForm,
@@ -7722,6 +7869,7 @@ export {
7722
7869
  useSelectPackage,
7723
7870
  useSelectStandardPackage,
7724
7871
  useSendChatMessage,
7872
+ useStartGame,
7725
7873
  useToggleChatMessageLike,
7726
7874
  useUpdateAd,
7727
7875
  useUpdateAppSettings,