@timardex/cluemart-shared 1.5.512 → 1.5.514
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-YHE6M5DD.mjs → chunk-3WSV6DBG.mjs} +151 -3
- package/dist/chunk-3WSV6DBG.mjs.map +1 -0
- package/dist/{chunk-KPO6ZYQ4.mjs → chunk-TL6OY4BM.mjs} +1 -1
- package/dist/graphql/index.cjs +153 -0
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +35 -2
- package/dist/graphql/index.d.ts +35 -2
- package/dist/graphql/index.mjs +11 -1
- package/dist/hooks/index.cjs +180 -2
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.mts +5 -2
- package/dist/hooks/index.d.ts +5 -2
- package/dist/hooks/index.mjs +96 -4
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +249 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +59 -2
- package/dist/index.d.ts +59 -2
- package/dist/index.mjs +242 -2
- package/dist/index.mjs.map +1 -1
- package/dist/{post-CdBp2FwH.d.ts → post-BdZppiSg.d.ts} +24 -3
- package/dist/{post-DHlHtpG9.d.mts → post-DJUVmC92.d.mts} +24 -3
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-YHE6M5DD.mjs.map +0 -1
- /package/dist/{chunk-KPO6ZYQ4.mjs.map → chunk-TL6OY4BM.mjs.map} +0 -0
package/dist/index.d.mts
CHANGED
|
@@ -849,14 +849,15 @@ interface UserType {
|
|
|
849
849
|
isTester: boolean;
|
|
850
850
|
lastName: string;
|
|
851
851
|
licences: UserLicenceType[] | null;
|
|
852
|
+
overallPoints: number | null;
|
|
852
853
|
partner: string | null;
|
|
853
854
|
password: string;
|
|
854
|
-
overallPoints: number | null;
|
|
855
855
|
platform: EnumOSPlatform | null;
|
|
856
856
|
preferredRegion: string;
|
|
857
857
|
promoCodes?: string[] | null;
|
|
858
858
|
refreshToken: string | null;
|
|
859
859
|
role: EnumUserRole;
|
|
860
|
+
school: string | null;
|
|
860
861
|
stripe?: StripeSubscription;
|
|
861
862
|
termsAgreement?: TermsAgreement | null;
|
|
862
863
|
updatedAt: Date | null;
|
|
@@ -1213,6 +1214,26 @@ interface GoogleImportedMarket extends EventListItemType {
|
|
|
1213
1214
|
website?: string;
|
|
1214
1215
|
}
|
|
1215
1216
|
|
|
1217
|
+
interface SchoolFormData {
|
|
1218
|
+
active: boolean;
|
|
1219
|
+
contactDetails: ResourceContactDetailsType | null;
|
|
1220
|
+
location: LocationType;
|
|
1221
|
+
logo?: ResourceImageType | null;
|
|
1222
|
+
logoUpload?: ResourceImageType | null;
|
|
1223
|
+
name: string;
|
|
1224
|
+
region: string;
|
|
1225
|
+
studentCount: number;
|
|
1226
|
+
termsAgreement?: TermsAgreement | null;
|
|
1227
|
+
}
|
|
1228
|
+
type CreateSchoolFormData = CreateFormData<SchoolFormData>;
|
|
1229
|
+
type SchoolType = Omit<SchoolFormData, "logoUpload"> & {
|
|
1230
|
+
_id: string;
|
|
1231
|
+
createdAt: Date;
|
|
1232
|
+
deletedAt: Date | null;
|
|
1233
|
+
owner: OwnerType | null;
|
|
1234
|
+
updatedAt: Date | null;
|
|
1235
|
+
};
|
|
1236
|
+
|
|
1216
1237
|
declare const vendorElectricity: {
|
|
1217
1238
|
details: FormField;
|
|
1218
1239
|
isRequired: FormField;
|
|
@@ -2305,6 +2326,39 @@ declare const useGetGameLeaderboard: () => {
|
|
|
2305
2326
|
}>>;
|
|
2306
2327
|
};
|
|
2307
2328
|
|
|
2329
|
+
declare const useCreateSchool: () => {
|
|
2330
|
+
createSchool: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
|
|
2331
|
+
error: _apollo_client.ApolloError | undefined;
|
|
2332
|
+
loading: boolean;
|
|
2333
|
+
};
|
|
2334
|
+
declare const useUpdateSchool: () => {
|
|
2335
|
+
error: _apollo_client.ApolloError | undefined;
|
|
2336
|
+
loading: boolean;
|
|
2337
|
+
updateSchool: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
|
|
2338
|
+
};
|
|
2339
|
+
declare const useDeleteSchool: () => {
|
|
2340
|
+
deleteSchool: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
|
|
2341
|
+
error: _apollo_client.ApolloError | undefined;
|
|
2342
|
+
loading: boolean;
|
|
2343
|
+
};
|
|
2344
|
+
|
|
2345
|
+
declare const useGetSchools: () => {
|
|
2346
|
+
error: _apollo_client.ApolloError | undefined;
|
|
2347
|
+
loading: boolean;
|
|
2348
|
+
refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<{
|
|
2349
|
+
schools: SchoolType[];
|
|
2350
|
+
}>>;
|
|
2351
|
+
schools: SchoolType[];
|
|
2352
|
+
};
|
|
2353
|
+
declare const useGetSchool: (_id: string) => {
|
|
2354
|
+
error: _apollo_client.ApolloError | undefined;
|
|
2355
|
+
loading: boolean;
|
|
2356
|
+
refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<{
|
|
2357
|
+
school: SchoolType | null;
|
|
2358
|
+
}>>;
|
|
2359
|
+
school: SchoolType | null;
|
|
2360
|
+
};
|
|
2361
|
+
|
|
2308
2362
|
interface PlacePrediction {
|
|
2309
2363
|
place_id: string;
|
|
2310
2364
|
description: string;
|
|
@@ -2374,6 +2428,7 @@ declare function useValidateVerificationTokenForm(): CreateValidateVerificationT
|
|
|
2374
2428
|
|
|
2375
2429
|
declare function useResetPasswordForm(): CreateResetPasswordFormData;
|
|
2376
2430
|
|
|
2431
|
+
declare const defaultLocation: LocationType;
|
|
2377
2432
|
declare const globalDefaultValues: BaseResourceTypeFormData;
|
|
2378
2433
|
declare const defaultPartnerFormValues: PartnerFormData;
|
|
2379
2434
|
declare const defaultEventFormValues: EventFormData;
|
|
@@ -2399,6 +2454,8 @@ declare function usePostForm(data?: PostFormData): CreatePostFormData;
|
|
|
2399
2454
|
|
|
2400
2455
|
declare function useAppSettingsForm(data?: AppSettingsFormData): CreateAppSettingsFormData;
|
|
2401
2456
|
|
|
2457
|
+
declare function useSchoolForm(data?: SchoolFormData): CreateSchoolFormData;
|
|
2458
|
+
|
|
2402
2459
|
declare const SAVED_PASSWORD_KEY = "savedPassword";
|
|
2403
2460
|
declare const SAVED_EMAIL_KEY = "savedEmail";
|
|
2404
2461
|
declare const SAVED_TOKEN_KEY = "savedToken";
|
|
@@ -2512,4 +2569,4 @@ declare const cluemartSocialMedia: SocialMediaType[];
|
|
|
2512
2569
|
declare const IOS_URL = "https://apps.apple.com/nz/app/cluemart/id6747251008";
|
|
2513
2570
|
declare const ANDROID_URL = "https://play.google.com/store/apps/details?id=com.timardex.cluemart";
|
|
2514
2571
|
|
|
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 GameDate, type GameDocType, 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 };
|
|
2572
|
+
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 CreateSchoolFormData, 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 GameDate, type GameDocType, 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 SchoolFormData, type SchoolType, 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, defaultLocation, 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, useCreateSchool, useCreateUnregisteredVendor, useCreateUser, useCreateVendor, useCreateVendorInfo, useDeleteAd, useDeleteAllNotifications, useDeleteChat, useDeleteEvent, useDeleteNotification, useDeletePartner, useDeletePost, useDeleteRelation, useDeleteSchool, 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, useGetSchool, useGetSchools, 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, useSchoolForm, useSearchEvents, useSearchPartners, useSearchVendors, useSelectPackage, useSelectStandardPackage, useSendChatMessage, useStartGame, useToggleChatMessageLike, useUpdateAd, useUpdateAppSettings, useUpdateDailyClueGame, useUpdateEvent, useUpdateEventInfo, useUpdateGoogleImportedMarkets, useUpdatePartner, useUpdatePost, useUpdateRelation, useUpdateSchool, 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
|
@@ -849,14 +849,15 @@ interface UserType {
|
|
|
849
849
|
isTester: boolean;
|
|
850
850
|
lastName: string;
|
|
851
851
|
licences: UserLicenceType[] | null;
|
|
852
|
+
overallPoints: number | null;
|
|
852
853
|
partner: string | null;
|
|
853
854
|
password: string;
|
|
854
|
-
overallPoints: number | null;
|
|
855
855
|
platform: EnumOSPlatform | null;
|
|
856
856
|
preferredRegion: string;
|
|
857
857
|
promoCodes?: string[] | null;
|
|
858
858
|
refreshToken: string | null;
|
|
859
859
|
role: EnumUserRole;
|
|
860
|
+
school: string | null;
|
|
860
861
|
stripe?: StripeSubscription;
|
|
861
862
|
termsAgreement?: TermsAgreement | null;
|
|
862
863
|
updatedAt: Date | null;
|
|
@@ -1213,6 +1214,26 @@ interface GoogleImportedMarket extends EventListItemType {
|
|
|
1213
1214
|
website?: string;
|
|
1214
1215
|
}
|
|
1215
1216
|
|
|
1217
|
+
interface SchoolFormData {
|
|
1218
|
+
active: boolean;
|
|
1219
|
+
contactDetails: ResourceContactDetailsType | null;
|
|
1220
|
+
location: LocationType;
|
|
1221
|
+
logo?: ResourceImageType | null;
|
|
1222
|
+
logoUpload?: ResourceImageType | null;
|
|
1223
|
+
name: string;
|
|
1224
|
+
region: string;
|
|
1225
|
+
studentCount: number;
|
|
1226
|
+
termsAgreement?: TermsAgreement | null;
|
|
1227
|
+
}
|
|
1228
|
+
type CreateSchoolFormData = CreateFormData<SchoolFormData>;
|
|
1229
|
+
type SchoolType = Omit<SchoolFormData, "logoUpload"> & {
|
|
1230
|
+
_id: string;
|
|
1231
|
+
createdAt: Date;
|
|
1232
|
+
deletedAt: Date | null;
|
|
1233
|
+
owner: OwnerType | null;
|
|
1234
|
+
updatedAt: Date | null;
|
|
1235
|
+
};
|
|
1236
|
+
|
|
1216
1237
|
declare const vendorElectricity: {
|
|
1217
1238
|
details: FormField;
|
|
1218
1239
|
isRequired: FormField;
|
|
@@ -2305,6 +2326,39 @@ declare const useGetGameLeaderboard: () => {
|
|
|
2305
2326
|
}>>;
|
|
2306
2327
|
};
|
|
2307
2328
|
|
|
2329
|
+
declare const useCreateSchool: () => {
|
|
2330
|
+
createSchool: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
|
|
2331
|
+
error: _apollo_client.ApolloError | undefined;
|
|
2332
|
+
loading: boolean;
|
|
2333
|
+
};
|
|
2334
|
+
declare const useUpdateSchool: () => {
|
|
2335
|
+
error: _apollo_client.ApolloError | undefined;
|
|
2336
|
+
loading: boolean;
|
|
2337
|
+
updateSchool: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
|
|
2338
|
+
};
|
|
2339
|
+
declare const useDeleteSchool: () => {
|
|
2340
|
+
deleteSchool: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
|
|
2341
|
+
error: _apollo_client.ApolloError | undefined;
|
|
2342
|
+
loading: boolean;
|
|
2343
|
+
};
|
|
2344
|
+
|
|
2345
|
+
declare const useGetSchools: () => {
|
|
2346
|
+
error: _apollo_client.ApolloError | undefined;
|
|
2347
|
+
loading: boolean;
|
|
2348
|
+
refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<{
|
|
2349
|
+
schools: SchoolType[];
|
|
2350
|
+
}>>;
|
|
2351
|
+
schools: SchoolType[];
|
|
2352
|
+
};
|
|
2353
|
+
declare const useGetSchool: (_id: string) => {
|
|
2354
|
+
error: _apollo_client.ApolloError | undefined;
|
|
2355
|
+
loading: boolean;
|
|
2356
|
+
refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<{
|
|
2357
|
+
school: SchoolType | null;
|
|
2358
|
+
}>>;
|
|
2359
|
+
school: SchoolType | null;
|
|
2360
|
+
};
|
|
2361
|
+
|
|
2308
2362
|
interface PlacePrediction {
|
|
2309
2363
|
place_id: string;
|
|
2310
2364
|
description: string;
|
|
@@ -2374,6 +2428,7 @@ declare function useValidateVerificationTokenForm(): CreateValidateVerificationT
|
|
|
2374
2428
|
|
|
2375
2429
|
declare function useResetPasswordForm(): CreateResetPasswordFormData;
|
|
2376
2430
|
|
|
2431
|
+
declare const defaultLocation: LocationType;
|
|
2377
2432
|
declare const globalDefaultValues: BaseResourceTypeFormData;
|
|
2378
2433
|
declare const defaultPartnerFormValues: PartnerFormData;
|
|
2379
2434
|
declare const defaultEventFormValues: EventFormData;
|
|
@@ -2399,6 +2454,8 @@ declare function usePostForm(data?: PostFormData): CreatePostFormData;
|
|
|
2399
2454
|
|
|
2400
2455
|
declare function useAppSettingsForm(data?: AppSettingsFormData): CreateAppSettingsFormData;
|
|
2401
2456
|
|
|
2457
|
+
declare function useSchoolForm(data?: SchoolFormData): CreateSchoolFormData;
|
|
2458
|
+
|
|
2402
2459
|
declare const SAVED_PASSWORD_KEY = "savedPassword";
|
|
2403
2460
|
declare const SAVED_EMAIL_KEY = "savedEmail";
|
|
2404
2461
|
declare const SAVED_TOKEN_KEY = "savedToken";
|
|
@@ -2512,4 +2569,4 @@ declare const cluemartSocialMedia: SocialMediaType[];
|
|
|
2512
2569
|
declare const IOS_URL = "https://apps.apple.com/nz/app/cluemart/id6747251008";
|
|
2513
2570
|
declare const ANDROID_URL = "https://play.google.com/store/apps/details?id=com.timardex.cluemart";
|
|
2514
2571
|
|
|
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 GameDate, type GameDocType, 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 };
|
|
2572
|
+
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 CreateSchoolFormData, 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 GameDate, type GameDocType, 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 SchoolFormData, type SchoolType, 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, defaultLocation, 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, useCreateSchool, useCreateUnregisteredVendor, useCreateUser, useCreateVendor, useCreateVendorInfo, useDeleteAd, useDeleteAllNotifications, useDeleteChat, useDeleteEvent, useDeleteNotification, useDeletePartner, useDeletePost, useDeleteRelation, useDeleteSchool, 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, useGetSchool, useGetSchools, 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, useSchoolForm, useSearchEvents, useSearchPartners, useSearchVendors, useSelectPackage, useSelectStandardPackage, useSendChatMessage, useStartGame, useToggleChatMessageLike, useUpdateAd, useUpdateAppSettings, useUpdateDailyClueGame, useUpdateEvent, useUpdateEventInfo, useUpdateGoogleImportedMarkets, useUpdatePartner, useUpdatePost, useUpdateRelation, useUpdateSchool, 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
|
@@ -2660,6 +2660,7 @@ var USER_FIELDS_FRAGMENT = gql2`
|
|
|
2660
2660
|
promoCodes
|
|
2661
2661
|
refreshToken
|
|
2662
2662
|
role
|
|
2663
|
+
school
|
|
2663
2664
|
termsAgreement {
|
|
2664
2665
|
...TermsAgreementFields
|
|
2665
2666
|
}
|
|
@@ -6134,6 +6135,148 @@ var useGetGameLeaderboard = () => {
|
|
|
6134
6135
|
return { error, gameLeaderboard, loading, refetch };
|
|
6135
6136
|
};
|
|
6136
6137
|
|
|
6138
|
+
// src/graphql/hooks/school/hooksMutation.ts
|
|
6139
|
+
import { useMutation as useMutation19 } from "@apollo/client";
|
|
6140
|
+
|
|
6141
|
+
// src/graphql/mutations/school.ts
|
|
6142
|
+
import { gql as gql36 } from "@apollo/client";
|
|
6143
|
+
|
|
6144
|
+
// src/graphql/queries/school.ts
|
|
6145
|
+
import { gql as gql35 } from "@apollo/client";
|
|
6146
|
+
var SCHOOL = gql35`
|
|
6147
|
+
fragment SchoolFields on SchoolType {
|
|
6148
|
+
_id
|
|
6149
|
+
active
|
|
6150
|
+
contactDetails {
|
|
6151
|
+
...ContactDetailsFields
|
|
6152
|
+
}
|
|
6153
|
+
location {
|
|
6154
|
+
...LocationFields
|
|
6155
|
+
}
|
|
6156
|
+
createdAt
|
|
6157
|
+
deletedAt
|
|
6158
|
+
logo {
|
|
6159
|
+
...ResourceImageFields
|
|
6160
|
+
}
|
|
6161
|
+
name
|
|
6162
|
+
owner {
|
|
6163
|
+
...OwnerFields
|
|
6164
|
+
}
|
|
6165
|
+
region
|
|
6166
|
+
studentCount
|
|
6167
|
+
termsAgreement {
|
|
6168
|
+
...TermsAgreementFields
|
|
6169
|
+
}
|
|
6170
|
+
updatedAt
|
|
6171
|
+
}
|
|
6172
|
+
${OWNER_FIELDS_FRAGMENT}
|
|
6173
|
+
${LOCATION_FIELDS_FRAGMENT}
|
|
6174
|
+
${RESOURCE_IMAGE_FIELDS_FRAGMENT}
|
|
6175
|
+
${CONTACT_DETAILS_FIELDS_FRAGMENT}
|
|
6176
|
+
${TERMS_AGREEMENT_FIELDS_FRAGMENT}
|
|
6177
|
+
`;
|
|
6178
|
+
var GET_SCHOOL = gql35`
|
|
6179
|
+
query getSchool($_id: ID!) {
|
|
6180
|
+
school(_id: $_id) {
|
|
6181
|
+
...SchoolFields
|
|
6182
|
+
}
|
|
6183
|
+
}
|
|
6184
|
+
${SCHOOL}
|
|
6185
|
+
`;
|
|
6186
|
+
var GET_SCHOOLS = gql35`
|
|
6187
|
+
query getSchools {
|
|
6188
|
+
schools {
|
|
6189
|
+
...SchoolFields
|
|
6190
|
+
}
|
|
6191
|
+
}
|
|
6192
|
+
${SCHOOL}
|
|
6193
|
+
`;
|
|
6194
|
+
|
|
6195
|
+
// src/graphql/mutations/school.ts
|
|
6196
|
+
var CREATE_SCHOOL_MUTATION = gql36`
|
|
6197
|
+
mutation createSchool($input: SchoolInputType!) {
|
|
6198
|
+
createSchool(input: $input) {
|
|
6199
|
+
...SchoolFields
|
|
6200
|
+
}
|
|
6201
|
+
}
|
|
6202
|
+
${SCHOOL}
|
|
6203
|
+
`;
|
|
6204
|
+
var UPDATE_SCHOOL_MUTATION = gql36`
|
|
6205
|
+
mutation updateSchool($_id: ID!, $input: SchoolInputType!) {
|
|
6206
|
+
updateSchool(_id: $_id, input: $input) {
|
|
6207
|
+
...SchoolFields
|
|
6208
|
+
}
|
|
6209
|
+
}
|
|
6210
|
+
${SCHOOL}
|
|
6211
|
+
`;
|
|
6212
|
+
var DELETE_SCHOOL_MUTATION = gql36`
|
|
6213
|
+
mutation deleteSchool($_id: ID!) {
|
|
6214
|
+
deleteSchool(_id: $_id)
|
|
6215
|
+
}
|
|
6216
|
+
`;
|
|
6217
|
+
|
|
6218
|
+
// src/graphql/hooks/school/hooksMutation.ts
|
|
6219
|
+
var useCreateSchool = () => {
|
|
6220
|
+
const [createSchool, { loading, error }] = useMutation19(
|
|
6221
|
+
CREATE_SCHOOL_MUTATION,
|
|
6222
|
+
{
|
|
6223
|
+
awaitRefetchQueries: true,
|
|
6224
|
+
refetchQueries: [{ query: GET_SCHOOLS }]
|
|
6225
|
+
}
|
|
6226
|
+
);
|
|
6227
|
+
return { createSchool, error, loading };
|
|
6228
|
+
};
|
|
6229
|
+
var useUpdateSchool = () => {
|
|
6230
|
+
const [updateSchool, { loading, error }] = useMutation19(
|
|
6231
|
+
UPDATE_SCHOOL_MUTATION,
|
|
6232
|
+
{
|
|
6233
|
+
awaitRefetchQueries: true,
|
|
6234
|
+
refetchQueries: [{ query: GET_SCHOOLS }]
|
|
6235
|
+
}
|
|
6236
|
+
);
|
|
6237
|
+
return { error, loading, updateSchool };
|
|
6238
|
+
};
|
|
6239
|
+
var useDeleteSchool = () => {
|
|
6240
|
+
const [deleteSchool, { loading, error }] = useMutation19(
|
|
6241
|
+
DELETE_SCHOOL_MUTATION,
|
|
6242
|
+
{
|
|
6243
|
+
awaitRefetchQueries: true,
|
|
6244
|
+
refetchQueries: [{ query: GET_SCHOOLS }]
|
|
6245
|
+
}
|
|
6246
|
+
);
|
|
6247
|
+
return { deleteSchool, error, loading };
|
|
6248
|
+
};
|
|
6249
|
+
|
|
6250
|
+
// src/graphql/hooks/school/hooksQuery.ts
|
|
6251
|
+
import { useQuery as useQuery14 } from "@apollo/client";
|
|
6252
|
+
var useGetSchools = () => {
|
|
6253
|
+
const { data, loading, error, refetch } = useQuery14(
|
|
6254
|
+
GET_SCHOOLS,
|
|
6255
|
+
{
|
|
6256
|
+
fetchPolicy: "network-only"
|
|
6257
|
+
}
|
|
6258
|
+
);
|
|
6259
|
+
return {
|
|
6260
|
+
error,
|
|
6261
|
+
loading,
|
|
6262
|
+
refetch,
|
|
6263
|
+
schools: data?.schools || []
|
|
6264
|
+
};
|
|
6265
|
+
};
|
|
6266
|
+
var useGetSchool = (_id) => {
|
|
6267
|
+
const { data, loading, error, refetch } = useQuery14(GET_SCHOOL, {
|
|
6268
|
+
fetchPolicy: "network-only",
|
|
6269
|
+
skip: !_id,
|
|
6270
|
+
variables: { _id }
|
|
6271
|
+
});
|
|
6272
|
+
return {
|
|
6273
|
+
error,
|
|
6274
|
+
loading,
|
|
6275
|
+
refetch,
|
|
6276
|
+
school: data?.school || null
|
|
6277
|
+
};
|
|
6278
|
+
};
|
|
6279
|
+
|
|
6137
6280
|
// src/hooks/useLocationSearch.ts
|
|
6138
6281
|
var handleApiError = (error, message) => {
|
|
6139
6282
|
console.error(message, error);
|
|
@@ -6644,8 +6787,8 @@ import * as yup4 from "yup";
|
|
|
6644
6787
|
var userSchema = yup4.object().shape({
|
|
6645
6788
|
active: yup4.boolean().required("Active is required"),
|
|
6646
6789
|
email: emailRequiredSchema,
|
|
6647
|
-
firstName: yup4.string().label("First Name").required("First name is required"),
|
|
6648
|
-
lastName: yup4.string().label("Last Name").required("Last name is required"),
|
|
6790
|
+
firstName: yup4.string().label("First Name").trim().required("First name is required"),
|
|
6791
|
+
lastName: yup4.string().label("Last Name").trim().required("Last name is required"),
|
|
6649
6792
|
isTester: yup4.boolean().required("Tester status is required"),
|
|
6650
6793
|
password: yup4.string().nullable().trim().label("Password").min(8, "Password must be at least 8 characters long").notRequired(),
|
|
6651
6794
|
preferredRegion: yup4.string().label("Preferred Region").required("Preferred region is required"),
|
|
@@ -7891,6 +8034,96 @@ function useAppSettingsForm(data) {
|
|
|
7891
8034
|
};
|
|
7892
8035
|
}
|
|
7893
8036
|
|
|
8037
|
+
// src/hooks/useSchoolForm.ts
|
|
8038
|
+
import { yupResolver as yupResolver16 } from "@hookform/resolvers/yup";
|
|
8039
|
+
import { useEffect as useEffect7 } from "react";
|
|
8040
|
+
import { useForm as useForm16 } from "react-hook-form";
|
|
8041
|
+
|
|
8042
|
+
// src/yupSchema/school.ts
|
|
8043
|
+
import * as yup11 from "yup";
|
|
8044
|
+
var schoolSchema = yup11.object().shape({
|
|
8045
|
+
active: yup11.boolean().required("Active is required"),
|
|
8046
|
+
contactDetails: contactDetailsSchema,
|
|
8047
|
+
location: locationSchema,
|
|
8048
|
+
name: yup11.string().trim().required("Name is required"),
|
|
8049
|
+
region: yup11.string().trim().required("Region is required"),
|
|
8050
|
+
studentCount: yup11.number().label("Student Count").min(0, "Student count cannot be negative").required("Student count is required").test("no-leading-zeros", "", noLeadingZeros("Student Count"))
|
|
8051
|
+
});
|
|
8052
|
+
|
|
8053
|
+
// src/hooks/useSchoolForm.ts
|
|
8054
|
+
var defaultSchoolFormValues = {
|
|
8055
|
+
active: false,
|
|
8056
|
+
contactDetails: null,
|
|
8057
|
+
location: defaultLocation,
|
|
8058
|
+
logo: null,
|
|
8059
|
+
logoUpload: null,
|
|
8060
|
+
name: "",
|
|
8061
|
+
region: "",
|
|
8062
|
+
studentCount: 0,
|
|
8063
|
+
termsAgreement: null
|
|
8064
|
+
};
|
|
8065
|
+
function useSchoolForm(data) {
|
|
8066
|
+
const {
|
|
8067
|
+
control,
|
|
8068
|
+
formState,
|
|
8069
|
+
getValues,
|
|
8070
|
+
handleSubmit,
|
|
8071
|
+
reset,
|
|
8072
|
+
setValue,
|
|
8073
|
+
watch
|
|
8074
|
+
} = useForm16({
|
|
8075
|
+
defaultValues: defaultSchoolFormValues,
|
|
8076
|
+
resolver: yupResolver16(schoolSchema)
|
|
8077
|
+
});
|
|
8078
|
+
useEffect7(() => {
|
|
8079
|
+
if (data) {
|
|
8080
|
+
reset({
|
|
8081
|
+
active: data.active,
|
|
8082
|
+
contactDetails: data.contactDetails,
|
|
8083
|
+
location: data.location,
|
|
8084
|
+
logo: data.logo,
|
|
8085
|
+
logoUpload: data.logoUpload,
|
|
8086
|
+
name: data.name,
|
|
8087
|
+
region: data.region,
|
|
8088
|
+
studentCount: data.studentCount,
|
|
8089
|
+
termsAgreement: data.termsAgreement
|
|
8090
|
+
});
|
|
8091
|
+
} else {
|
|
8092
|
+
reset(defaultSchoolFormValues);
|
|
8093
|
+
}
|
|
8094
|
+
}, [data]);
|
|
8095
|
+
const {
|
|
8096
|
+
active,
|
|
8097
|
+
contactDetails,
|
|
8098
|
+
location,
|
|
8099
|
+
logo,
|
|
8100
|
+
logoUpload,
|
|
8101
|
+
name,
|
|
8102
|
+
region,
|
|
8103
|
+
studentCount,
|
|
8104
|
+
termsAgreement
|
|
8105
|
+
} = getValues();
|
|
8106
|
+
return {
|
|
8107
|
+
control,
|
|
8108
|
+
fields: {
|
|
8109
|
+
active,
|
|
8110
|
+
contactDetails,
|
|
8111
|
+
location,
|
|
8112
|
+
logo,
|
|
8113
|
+
logoUpload,
|
|
8114
|
+
name,
|
|
8115
|
+
region,
|
|
8116
|
+
studentCount,
|
|
8117
|
+
termsAgreement
|
|
8118
|
+
},
|
|
8119
|
+
formState,
|
|
8120
|
+
handleSubmit,
|
|
8121
|
+
reset,
|
|
8122
|
+
setValue,
|
|
8123
|
+
watch
|
|
8124
|
+
};
|
|
8125
|
+
}
|
|
8126
|
+
|
|
7894
8127
|
// src/storage/index.ts
|
|
7895
8128
|
var SAVED_PASSWORD_KEY = "savedPassword";
|
|
7896
8129
|
var SAVED_EMAIL_KEY = "savedEmail";
|
|
@@ -8006,6 +8239,7 @@ export {
|
|
|
8006
8239
|
dateFormat,
|
|
8007
8240
|
defaultEventFormValues,
|
|
8008
8241
|
defaultEventInfoFormValues,
|
|
8242
|
+
defaultLocation,
|
|
8009
8243
|
defaultPartnerFormValues,
|
|
8010
8244
|
defaultUnregisteredVendorFormValues,
|
|
8011
8245
|
defaultVendorFormValues,
|
|
@@ -8082,6 +8316,7 @@ export {
|
|
|
8082
8316
|
useCreatePushToken,
|
|
8083
8317
|
useCreateRelation,
|
|
8084
8318
|
useCreateResourceActivity,
|
|
8319
|
+
useCreateSchool,
|
|
8085
8320
|
useCreateUnregisteredVendor,
|
|
8086
8321
|
useCreateUser,
|
|
8087
8322
|
useCreateVendor,
|
|
@@ -8094,6 +8329,7 @@ export {
|
|
|
8094
8329
|
useDeletePartner,
|
|
8095
8330
|
useDeletePost,
|
|
8096
8331
|
useDeleteRelation,
|
|
8332
|
+
useDeleteSchool,
|
|
8097
8333
|
useDeleteUnregisteredVendor,
|
|
8098
8334
|
useDeleteUser,
|
|
8099
8335
|
useDeleteVendor,
|
|
@@ -8129,6 +8365,8 @@ export {
|
|
|
8129
8365
|
useGetReportedChatUsers,
|
|
8130
8366
|
useGetResourceActivity,
|
|
8131
8367
|
useGetResourceConnections,
|
|
8368
|
+
useGetSchool,
|
|
8369
|
+
useGetSchools,
|
|
8132
8370
|
useGetSubscriptionPlans,
|
|
8133
8371
|
useGetSubscriptionStatus,
|
|
8134
8372
|
useGetUnregisteredVendor,
|
|
@@ -8171,6 +8409,7 @@ export {
|
|
|
8171
8409
|
useRequestPasswordResetForm,
|
|
8172
8410
|
useResetPassword,
|
|
8173
8411
|
useResetPasswordForm,
|
|
8412
|
+
useSchoolForm,
|
|
8174
8413
|
useSearchEvents,
|
|
8175
8414
|
useSearchPartners,
|
|
8176
8415
|
useSearchVendors,
|
|
@@ -8188,6 +8427,7 @@ export {
|
|
|
8188
8427
|
useUpdatePartner,
|
|
8189
8428
|
useUpdatePost,
|
|
8190
8429
|
useUpdateRelation,
|
|
8430
|
+
useUpdateSchool,
|
|
8191
8431
|
useUpdateSubscriptionPlan,
|
|
8192
8432
|
useUpdateUnregisteredVendor,
|
|
8193
8433
|
useUpdateUser,
|