@timardex/cluemart-shared 1.0.31 → 1.0.32

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/index.d.mts CHANGED
@@ -143,20 +143,20 @@ interface CreateResetPasswordFormData {
143
143
  setValue: UseFormSetValue<ResetPasswordFormData>;
144
144
  watch: UseFormWatch<ResetPasswordFormData>;
145
145
  }
146
- type ValidateTokenFormData = {
146
+ type ValidateVerificationTokenFormData = {
147
147
  email: string;
148
- token: string;
148
+ verificationToken: string;
149
149
  };
150
- interface CreateValidateTokenFormData {
151
- control: Control<ValidateTokenFormData, any>;
152
- fields: ValidateTokenFormData;
150
+ interface CreateValidateVerificationTokenFormData {
151
+ control: Control<ValidateVerificationTokenFormData, any>;
152
+ fields: ValidateVerificationTokenFormData;
153
153
  formState: {
154
- errors: FieldErrors<ValidateTokenFormData>;
154
+ errors: FieldErrors<ValidateVerificationTokenFormData>;
155
155
  };
156
- handleSubmit: UseFormHandleSubmit<ValidateTokenFormData, any>;
157
- reset: UseFormReset<ValidateTokenFormData>;
158
- setValue: UseFormSetValue<ValidateTokenFormData>;
159
- watch: UseFormWatch<ValidateTokenFormData>;
156
+ handleSubmit: UseFormHandleSubmit<ValidateVerificationTokenFormData, any>;
157
+ reset: UseFormReset<ValidateVerificationTokenFormData>;
158
+ setValue: UseFormSetValue<ValidateVerificationTokenFormData>;
159
+ watch: UseFormWatch<ValidateVerificationTokenFormData>;
160
160
  }
161
161
 
162
162
  interface ChatInput {
@@ -403,6 +403,7 @@ interface UserType {
403
403
  markets: string[] | null;
404
404
  password: string;
405
405
  preferredRegion: string;
406
+ refreshToken: string | null;
406
407
  role: EnumUserRole;
407
408
  stallholder: string | null;
408
409
  updatedAt: string;
@@ -656,7 +657,7 @@ declare function useRegisterForm(): CreateRegisterFormData;
656
657
 
657
658
  declare function useRequestPasswordResetForm(): CreateRequestPasswordResetFormData;
658
659
 
659
- declare function useValidateTokenForm(): CreateValidateTokenFormData;
660
+ declare function useValidateVerificationTokenForm(): CreateValidateVerificationTokenFormData;
660
661
 
661
662
  declare function useResetPasswordForm(): CreateResetPasswordFormData;
662
663
 
@@ -667,25 +668,35 @@ declare const defaultStallholderFormValues: StallholderFormData;
667
668
  declare const defaultStallholderApplyFormValues: StallholderApplyFormFormData;
668
669
  declare function mapBaseResourceTypeToFormData(data: MarketFormData | StallholderFormData): BaseResourceTypeFormData;
669
670
 
671
+ declare const useRegister: () => {
672
+ error: _apollo_client.ApolloError | undefined;
673
+ loading: boolean;
674
+ register: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
675
+ };
670
676
  declare const useLogin: () => {
671
677
  error: _apollo_client.ApolloError | undefined;
672
678
  loading: boolean;
673
679
  login: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
674
680
  };
675
- declare const useRegister: () => {
681
+ declare const useLogout: () => {
676
682
  error: _apollo_client.ApolloError | undefined;
677
683
  loading: boolean;
678
- register: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
684
+ logout: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
685
+ };
686
+ declare const useRefreshToken: () => {
687
+ error: _apollo_client.ApolloError | undefined;
688
+ loading: boolean;
689
+ refreshToken: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
679
690
  };
680
691
  declare const useRequestPasswordReset: () => {
681
692
  error: _apollo_client.ApolloError | undefined;
682
693
  loading: boolean;
683
694
  requestPasswordReset: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
684
695
  };
685
- declare const useValidateToken: () => {
696
+ declare const useValidateVerificationToken: () => {
686
697
  error: _apollo_client.ApolloError | undefined;
687
698
  loading: boolean;
688
- validateToken: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
699
+ validateVerificationToken: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
689
700
  };
690
701
  declare const useResetPassword: () => {
691
702
  error: _apollo_client.ApolloError | undefined;
@@ -1028,7 +1039,7 @@ declare const loginFields: FormField[];
1028
1039
  declare const registerFields: FormField[];
1029
1040
  declare const requestPasswordResetFields: FormField[];
1030
1041
  declare const resetPasswordFields: FormField[];
1031
- declare const validateTokenFields: FormField[];
1042
+ declare const validateVerificationTokenFields: FormField[];
1032
1043
 
1033
1044
  declare const profileFields: FormField[];
1034
1045
 
@@ -1037,4 +1048,4 @@ declare const categoryColors: Record<string, string>;
1037
1048
 
1038
1049
  declare const socialMediaFields: FormField[];
1039
1050
 
1040
- export { type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatInput, type ChatMessageInput, type ChatMessageType, type ChatType, type CreateLoginFormData, type CreateMarketFormData, type CreateMarketInfoFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateStallholderApplyFormFormData, type CreateStallholderFormData, type CreateUserFormData, type CreateValidateTokenFormData, type DateTimeType, type DateTimeWithPriceType, EnumInviteStatus, EnumNotification, EnumPaymentMethod, EnumRegions, EnumRelationResource, EnumResourceType, EnumResourceTypeIcon, EnumSocialMedia, EnumUserLicence, EnumUserRole, type FormDateField, type FormField, type GeocodeLocation, type ImageObjectType, ImageTypeEnum, type LocationType, type LoginFormData, type MapMultiLocation, type MarketFormData, type MarketInfoFormData, type MarketInfoType, type MarketType, type MarketWithConnectionDatesType, type NotificationType, type Nullable, type OptionItem, type PaymentTargetType, type PlacePrediction, type PosterInputType, type Region, type RegisterFormData, type RelationDate, type RelationLog, type RelationType, type RequestPasswordResetFormData, type Requirement, type ResetPasswordFormData, type ResourceConnectionsType, type ResourceImageType, type SatllholderWithConnectionDatesType, type SiteType, type SocialMediaType, type StallholderApplyFormFormData, type StallholderApplyFormType, type StallholderAttributes, type StallholderFormData, type StallholderLocation, type StallholderType, type Subcategory, type UserFormData, type UserType, type ValidateTokenFormData, availableCategories, availableCityOptions, availableRegionOptions, availableRegionTypes, availableTagTypes, capitalizeFirstLetter, categoryColors, dateFormat, defaultMarketFormValues, defaultMarketInfoFormValues, defaultRegion, defaultStallholderApplyFormValues, defaultStallholderFormValues, formatDate, formatTimestamp, getCurrentAndFutureDates, getFutureDatesAfterThreshold, globalDefaultValues, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, marketBasicInfoFields, marketEndDateFields, marketInfo, marketInfoPaymentTarget, marketPriceByDateFields, marketStartDateFields, normalizeUrl, packagingOptions, paymentMethodOptions, producedIngOptions, profileFields, registerFields, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, siteTypeOptions, socialMediaFields, sortDatesByProximity, stallholderBasicInfoFields, stallholderElectricity, stallholderEndDateFields, stallholderFullAddress, stallholderGazebo, stallholderLocationDescription, stallholderMultiLocation, stallholderPackaging, stallholderPaymentMethod, stallholderPriceRange, stallholderProducedIn, stallholderStallSize, stallholderStartDateFields, stallholderTable, statusOptions, tagOptions, timeFormat, truncateText, useAddParticipantToChat, useAddUserFavouriteResource, useCreateChat, useCreateMarket, useCreateMarketInfo, useCreatePoster, useCreateRelation, useCreateStallholder, useCreateStallholderApplyForm, useCreateUser, useDeleteChat, useDeleteMarket, useDeleteRelation, useDeleteStallholder, useGetChat, useGetChatSubscription, useGetMarket, useGetMarketInfo, useGetMarketRelations, useGetMarkets, useGetMarketsByRegion, useGetMarketsNearMe, useGetNotification, useGetRelation, useGetRelationByMarketAndStallholder, useGetResourceConnections, useGetStallholder, useGetStallholderApplyForm, useGetStallholderRelations, useGetStallholders, useGetStallholdersByRegion, useGetUser, useGetUserChats, useGetUserFavourites, useGetUserMarkets, useGetUserNotifications, useGetUsers, useLocationSearch, useLogin, useLoginForm, useMarketForm, useMarketInfoForm, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchMarkets, useSearchStallholders, useSendChatMessage, useStallholderApplyForm, useStallholderForm, useUpdateMarket, useUpdateMarketInfo, useUpdateRelation, useUpdateStallholder, useUpdateStallholderApplyForm, useUpdateUser, useUserForm, useValidateToken, useValidateTokenForm, validateTokenFields };
1051
+ export { type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatInput, type ChatMessageInput, type ChatMessageType, type ChatType, type CreateLoginFormData, type CreateMarketFormData, type CreateMarketInfoFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateStallholderApplyFormFormData, type CreateStallholderFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type DateTimeType, type DateTimeWithPriceType, EnumInviteStatus, EnumNotification, EnumPaymentMethod, EnumRegions, EnumRelationResource, EnumResourceType, EnumResourceTypeIcon, EnumSocialMedia, EnumUserLicence, EnumUserRole, type FormDateField, type FormField, type GeocodeLocation, type ImageObjectType, ImageTypeEnum, type LocationType, type LoginFormData, type MapMultiLocation, type MarketFormData, type MarketInfoFormData, type MarketInfoType, type MarketType, type MarketWithConnectionDatesType, type NotificationType, type Nullable, type OptionItem, type PaymentTargetType, type PlacePrediction, type PosterInputType, type Region, type RegisterFormData, type RelationDate, type RelationLog, type RelationType, type RequestPasswordResetFormData, type Requirement, type ResetPasswordFormData, type ResourceConnectionsType, type ResourceImageType, type SatllholderWithConnectionDatesType, type SiteType, type SocialMediaType, type StallholderApplyFormFormData, type StallholderApplyFormType, type StallholderAttributes, type StallholderFormData, type StallholderLocation, type StallholderType, type Subcategory, type UserFormData, type UserType, type ValidateVerificationTokenFormData, availableCategories, availableCityOptions, availableRegionOptions, availableRegionTypes, availableTagTypes, capitalizeFirstLetter, categoryColors, dateFormat, defaultMarketFormValues, defaultMarketInfoFormValues, defaultRegion, defaultStallholderApplyFormValues, defaultStallholderFormValues, formatDate, formatTimestamp, getCurrentAndFutureDates, getFutureDatesAfterThreshold, globalDefaultValues, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, marketBasicInfoFields, marketEndDateFields, marketInfo, marketInfoPaymentTarget, marketPriceByDateFields, marketStartDateFields, normalizeUrl, packagingOptions, paymentMethodOptions, producedIngOptions, profileFields, registerFields, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, siteTypeOptions, socialMediaFields, sortDatesByProximity, stallholderBasicInfoFields, stallholderElectricity, stallholderEndDateFields, stallholderFullAddress, stallholderGazebo, stallholderLocationDescription, stallholderMultiLocation, stallholderPackaging, stallholderPaymentMethod, stallholderPriceRange, stallholderProducedIn, stallholderStallSize, stallholderStartDateFields, stallholderTable, statusOptions, tagOptions, timeFormat, truncateText, useAddParticipantToChat, useAddUserFavouriteResource, useCreateChat, useCreateMarket, useCreateMarketInfo, useCreatePoster, useCreateRelation, useCreateStallholder, useCreateStallholderApplyForm, useCreateUser, useDeleteChat, useDeleteMarket, useDeleteRelation, useDeleteStallholder, useGetChat, useGetChatSubscription, useGetMarket, useGetMarketInfo, useGetMarketRelations, useGetMarkets, useGetMarketsByRegion, useGetMarketsNearMe, useGetNotification, useGetRelation, useGetRelationByMarketAndStallholder, useGetResourceConnections, useGetStallholder, useGetStallholderApplyForm, useGetStallholderRelations, useGetStallholders, useGetStallholdersByRegion, useGetUser, useGetUserChats, useGetUserFavourites, useGetUserMarkets, useGetUserNotifications, useGetUsers, useLocationSearch, useLogin, useLoginForm, useLogout, useMarketForm, useMarketInfoForm, useRefreshToken, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchMarkets, useSearchStallholders, useSendChatMessage, useStallholderApplyForm, useStallholderForm, useUpdateMarket, useUpdateMarketInfo, useUpdateRelation, useUpdateStallholder, useUpdateStallholderApplyForm, useUpdateUser, useUserForm, useValidateVerificationToken, useValidateVerificationTokenForm, validateVerificationTokenFields };
package/dist/index.d.ts CHANGED
@@ -143,20 +143,20 @@ interface CreateResetPasswordFormData {
143
143
  setValue: UseFormSetValue<ResetPasswordFormData>;
144
144
  watch: UseFormWatch<ResetPasswordFormData>;
145
145
  }
146
- type ValidateTokenFormData = {
146
+ type ValidateVerificationTokenFormData = {
147
147
  email: string;
148
- token: string;
148
+ verificationToken: string;
149
149
  };
150
- interface CreateValidateTokenFormData {
151
- control: Control<ValidateTokenFormData, any>;
152
- fields: ValidateTokenFormData;
150
+ interface CreateValidateVerificationTokenFormData {
151
+ control: Control<ValidateVerificationTokenFormData, any>;
152
+ fields: ValidateVerificationTokenFormData;
153
153
  formState: {
154
- errors: FieldErrors<ValidateTokenFormData>;
154
+ errors: FieldErrors<ValidateVerificationTokenFormData>;
155
155
  };
156
- handleSubmit: UseFormHandleSubmit<ValidateTokenFormData, any>;
157
- reset: UseFormReset<ValidateTokenFormData>;
158
- setValue: UseFormSetValue<ValidateTokenFormData>;
159
- watch: UseFormWatch<ValidateTokenFormData>;
156
+ handleSubmit: UseFormHandleSubmit<ValidateVerificationTokenFormData, any>;
157
+ reset: UseFormReset<ValidateVerificationTokenFormData>;
158
+ setValue: UseFormSetValue<ValidateVerificationTokenFormData>;
159
+ watch: UseFormWatch<ValidateVerificationTokenFormData>;
160
160
  }
161
161
 
162
162
  interface ChatInput {
@@ -403,6 +403,7 @@ interface UserType {
403
403
  markets: string[] | null;
404
404
  password: string;
405
405
  preferredRegion: string;
406
+ refreshToken: string | null;
406
407
  role: EnumUserRole;
407
408
  stallholder: string | null;
408
409
  updatedAt: string;
@@ -656,7 +657,7 @@ declare function useRegisterForm(): CreateRegisterFormData;
656
657
 
657
658
  declare function useRequestPasswordResetForm(): CreateRequestPasswordResetFormData;
658
659
 
659
- declare function useValidateTokenForm(): CreateValidateTokenFormData;
660
+ declare function useValidateVerificationTokenForm(): CreateValidateVerificationTokenFormData;
660
661
 
661
662
  declare function useResetPasswordForm(): CreateResetPasswordFormData;
662
663
 
@@ -667,25 +668,35 @@ declare const defaultStallholderFormValues: StallholderFormData;
667
668
  declare const defaultStallholderApplyFormValues: StallholderApplyFormFormData;
668
669
  declare function mapBaseResourceTypeToFormData(data: MarketFormData | StallholderFormData): BaseResourceTypeFormData;
669
670
 
671
+ declare const useRegister: () => {
672
+ error: _apollo_client.ApolloError | undefined;
673
+ loading: boolean;
674
+ register: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
675
+ };
670
676
  declare const useLogin: () => {
671
677
  error: _apollo_client.ApolloError | undefined;
672
678
  loading: boolean;
673
679
  login: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
674
680
  };
675
- declare const useRegister: () => {
681
+ declare const useLogout: () => {
676
682
  error: _apollo_client.ApolloError | undefined;
677
683
  loading: boolean;
678
- register: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
684
+ logout: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
685
+ };
686
+ declare const useRefreshToken: () => {
687
+ error: _apollo_client.ApolloError | undefined;
688
+ loading: boolean;
689
+ refreshToken: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
679
690
  };
680
691
  declare const useRequestPasswordReset: () => {
681
692
  error: _apollo_client.ApolloError | undefined;
682
693
  loading: boolean;
683
694
  requestPasswordReset: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
684
695
  };
685
- declare const useValidateToken: () => {
696
+ declare const useValidateVerificationToken: () => {
686
697
  error: _apollo_client.ApolloError | undefined;
687
698
  loading: boolean;
688
- validateToken: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
699
+ validateVerificationToken: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
689
700
  };
690
701
  declare const useResetPassword: () => {
691
702
  error: _apollo_client.ApolloError | undefined;
@@ -1028,7 +1039,7 @@ declare const loginFields: FormField[];
1028
1039
  declare const registerFields: FormField[];
1029
1040
  declare const requestPasswordResetFields: FormField[];
1030
1041
  declare const resetPasswordFields: FormField[];
1031
- declare const validateTokenFields: FormField[];
1042
+ declare const validateVerificationTokenFields: FormField[];
1032
1043
 
1033
1044
  declare const profileFields: FormField[];
1034
1045
 
@@ -1037,4 +1048,4 @@ declare const categoryColors: Record<string, string>;
1037
1048
 
1038
1049
  declare const socialMediaFields: FormField[];
1039
1050
 
1040
- export { type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatInput, type ChatMessageInput, type ChatMessageType, type ChatType, type CreateLoginFormData, type CreateMarketFormData, type CreateMarketInfoFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateStallholderApplyFormFormData, type CreateStallholderFormData, type CreateUserFormData, type CreateValidateTokenFormData, type DateTimeType, type DateTimeWithPriceType, EnumInviteStatus, EnumNotification, EnumPaymentMethod, EnumRegions, EnumRelationResource, EnumResourceType, EnumResourceTypeIcon, EnumSocialMedia, EnumUserLicence, EnumUserRole, type FormDateField, type FormField, type GeocodeLocation, type ImageObjectType, ImageTypeEnum, type LocationType, type LoginFormData, type MapMultiLocation, type MarketFormData, type MarketInfoFormData, type MarketInfoType, type MarketType, type MarketWithConnectionDatesType, type NotificationType, type Nullable, type OptionItem, type PaymentTargetType, type PlacePrediction, type PosterInputType, type Region, type RegisterFormData, type RelationDate, type RelationLog, type RelationType, type RequestPasswordResetFormData, type Requirement, type ResetPasswordFormData, type ResourceConnectionsType, type ResourceImageType, type SatllholderWithConnectionDatesType, type SiteType, type SocialMediaType, type StallholderApplyFormFormData, type StallholderApplyFormType, type StallholderAttributes, type StallholderFormData, type StallholderLocation, type StallholderType, type Subcategory, type UserFormData, type UserType, type ValidateTokenFormData, availableCategories, availableCityOptions, availableRegionOptions, availableRegionTypes, availableTagTypes, capitalizeFirstLetter, categoryColors, dateFormat, defaultMarketFormValues, defaultMarketInfoFormValues, defaultRegion, defaultStallholderApplyFormValues, defaultStallholderFormValues, formatDate, formatTimestamp, getCurrentAndFutureDates, getFutureDatesAfterThreshold, globalDefaultValues, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, marketBasicInfoFields, marketEndDateFields, marketInfo, marketInfoPaymentTarget, marketPriceByDateFields, marketStartDateFields, normalizeUrl, packagingOptions, paymentMethodOptions, producedIngOptions, profileFields, registerFields, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, siteTypeOptions, socialMediaFields, sortDatesByProximity, stallholderBasicInfoFields, stallholderElectricity, stallholderEndDateFields, stallholderFullAddress, stallholderGazebo, stallholderLocationDescription, stallholderMultiLocation, stallholderPackaging, stallholderPaymentMethod, stallholderPriceRange, stallholderProducedIn, stallholderStallSize, stallholderStartDateFields, stallholderTable, statusOptions, tagOptions, timeFormat, truncateText, useAddParticipantToChat, useAddUserFavouriteResource, useCreateChat, useCreateMarket, useCreateMarketInfo, useCreatePoster, useCreateRelation, useCreateStallholder, useCreateStallholderApplyForm, useCreateUser, useDeleteChat, useDeleteMarket, useDeleteRelation, useDeleteStallholder, useGetChat, useGetChatSubscription, useGetMarket, useGetMarketInfo, useGetMarketRelations, useGetMarkets, useGetMarketsByRegion, useGetMarketsNearMe, useGetNotification, useGetRelation, useGetRelationByMarketAndStallholder, useGetResourceConnections, useGetStallholder, useGetStallholderApplyForm, useGetStallholderRelations, useGetStallholders, useGetStallholdersByRegion, useGetUser, useGetUserChats, useGetUserFavourites, useGetUserMarkets, useGetUserNotifications, useGetUsers, useLocationSearch, useLogin, useLoginForm, useMarketForm, useMarketInfoForm, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchMarkets, useSearchStallholders, useSendChatMessage, useStallholderApplyForm, useStallholderForm, useUpdateMarket, useUpdateMarketInfo, useUpdateRelation, useUpdateStallholder, useUpdateStallholderApplyForm, useUpdateUser, useUserForm, useValidateToken, useValidateTokenForm, validateTokenFields };
1051
+ export { type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatInput, type ChatMessageInput, type ChatMessageType, type ChatType, type CreateLoginFormData, type CreateMarketFormData, type CreateMarketInfoFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateStallholderApplyFormFormData, type CreateStallholderFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type DateTimeType, type DateTimeWithPriceType, EnumInviteStatus, EnumNotification, EnumPaymentMethod, EnumRegions, EnumRelationResource, EnumResourceType, EnumResourceTypeIcon, EnumSocialMedia, EnumUserLicence, EnumUserRole, type FormDateField, type FormField, type GeocodeLocation, type ImageObjectType, ImageTypeEnum, type LocationType, type LoginFormData, type MapMultiLocation, type MarketFormData, type MarketInfoFormData, type MarketInfoType, type MarketType, type MarketWithConnectionDatesType, type NotificationType, type Nullable, type OptionItem, type PaymentTargetType, type PlacePrediction, type PosterInputType, type Region, type RegisterFormData, type RelationDate, type RelationLog, type RelationType, type RequestPasswordResetFormData, type Requirement, type ResetPasswordFormData, type ResourceConnectionsType, type ResourceImageType, type SatllholderWithConnectionDatesType, type SiteType, type SocialMediaType, type StallholderApplyFormFormData, type StallholderApplyFormType, type StallholderAttributes, type StallholderFormData, type StallholderLocation, type StallholderType, type Subcategory, type UserFormData, type UserType, type ValidateVerificationTokenFormData, availableCategories, availableCityOptions, availableRegionOptions, availableRegionTypes, availableTagTypes, capitalizeFirstLetter, categoryColors, dateFormat, defaultMarketFormValues, defaultMarketInfoFormValues, defaultRegion, defaultStallholderApplyFormValues, defaultStallholderFormValues, formatDate, formatTimestamp, getCurrentAndFutureDates, getFutureDatesAfterThreshold, globalDefaultValues, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, marketBasicInfoFields, marketEndDateFields, marketInfo, marketInfoPaymentTarget, marketPriceByDateFields, marketStartDateFields, normalizeUrl, packagingOptions, paymentMethodOptions, producedIngOptions, profileFields, registerFields, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, siteTypeOptions, socialMediaFields, sortDatesByProximity, stallholderBasicInfoFields, stallholderElectricity, stallholderEndDateFields, stallholderFullAddress, stallholderGazebo, stallholderLocationDescription, stallholderMultiLocation, stallholderPackaging, stallholderPaymentMethod, stallholderPriceRange, stallholderProducedIn, stallholderStallSize, stallholderStartDateFields, stallholderTable, statusOptions, tagOptions, timeFormat, truncateText, useAddParticipantToChat, useAddUserFavouriteResource, useCreateChat, useCreateMarket, useCreateMarketInfo, useCreatePoster, useCreateRelation, useCreateStallholder, useCreateStallholderApplyForm, useCreateUser, useDeleteChat, useDeleteMarket, useDeleteRelation, useDeleteStallholder, useGetChat, useGetChatSubscription, useGetMarket, useGetMarketInfo, useGetMarketRelations, useGetMarkets, useGetMarketsByRegion, useGetMarketsNearMe, useGetNotification, useGetRelation, useGetRelationByMarketAndStallholder, useGetResourceConnections, useGetStallholder, useGetStallholderApplyForm, useGetStallholderRelations, useGetStallholders, useGetStallholdersByRegion, useGetUser, useGetUserChats, useGetUserFavourites, useGetUserMarkets, useGetUserNotifications, useGetUsers, useLocationSearch, useLogin, useLoginForm, useLogout, useMarketForm, useMarketInfoForm, useRefreshToken, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchMarkets, useSearchStallholders, useSendChatMessage, useStallholderApplyForm, useStallholderForm, useUpdateMarket, useUpdateMarketInfo, useUpdateRelation, useUpdateStallholder, useUpdateStallholderApplyForm, useUpdateUser, useUserForm, useValidateVerificationToken, useValidateVerificationTokenForm, validateVerificationTokenFields };
package/dist/index.mjs CHANGED
@@ -562,9 +562,9 @@ var resetPasswordSchema = yup5.object().shape({
562
562
  // eslint-disable-next-line sort-keys
563
563
  confirmPassword: yup5.string().oneOf([yup5.ref("password")], "Passwords must match").required("Confirm Password is required")
564
564
  });
565
- var validateTokenSchema = yup5.object().shape({
565
+ var validateVerificationTokenSchema = yup5.object().shape({
566
566
  email: emailSchema,
567
- token: yup5.string().required("Verification code is required").matches(/^\d{5}$/, "Verification code must be exactly 5 digits")
567
+ verificationToken: yup5.string().required("Verification code is required").matches(/^\d{5}$/, "Verification code must be exactly 5 digits")
568
568
  });
569
569
 
570
570
  // src/hooks/utils.ts
@@ -1183,14 +1183,14 @@ function useRequestPasswordResetForm() {
1183
1183
  };
1184
1184
  }
1185
1185
 
1186
- // src/hooks/auth/useValidateTokenForm.ts
1186
+ // src/hooks/auth/useValidateVerificationTokenForm.ts
1187
1187
  import { yupResolver as yupResolver9 } from "@hookform/resolvers/yup";
1188
1188
  import { useForm as useForm9 } from "react-hook-form";
1189
1189
  var defaultValues5 = {
1190
1190
  email: "",
1191
- token: ""
1191
+ verificationToken: ""
1192
1192
  };
1193
- function useValidateTokenForm() {
1193
+ function useValidateVerificationTokenForm() {
1194
1194
  const {
1195
1195
  control,
1196
1196
  formState: { errors },
@@ -1201,14 +1201,14 @@ function useValidateTokenForm() {
1201
1201
  watch
1202
1202
  } = useForm9({
1203
1203
  defaultValues: defaultValues5,
1204
- resolver: yupResolver9(validateTokenSchema)
1204
+ resolver: yupResolver9(validateVerificationTokenSchema)
1205
1205
  });
1206
- const { email, token } = getValues();
1206
+ const { email, verificationToken } = getValues();
1207
1207
  return {
1208
1208
  control,
1209
1209
  fields: {
1210
1210
  email,
1211
- token
1211
+ verificationToken
1212
1212
  },
1213
1213
  formState: { errors },
1214
1214
  handleSubmit,
@@ -1311,6 +1311,7 @@ var USER_FIELDS_FRAGMENT = gql`
1311
1311
  licences
1312
1312
  markets
1313
1313
  preferredRegion
1314
+ refreshToken
1314
1315
  role
1315
1316
  stallholder
1316
1317
  updatedAt
@@ -1319,10 +1320,24 @@ var USER_FIELDS_FRAGMENT = gql`
1319
1320
  `;
1320
1321
 
1321
1322
  // src/graphql/mutations/auth.ts
1323
+ var REGISTER_MUTATION = gql2`
1324
+ mutation register($input: RegisterInputType!) {
1325
+ register(input: $input) {
1326
+ message
1327
+ refreshToken
1328
+ token
1329
+ user {
1330
+ ...UserFields
1331
+ }
1332
+ }
1333
+ }
1334
+ ${USER_FIELDS_FRAGMENT}
1335
+ `;
1322
1336
  var LOGIN_MUTATION = gql2`
1323
1337
  mutation login($input: LoginInputType!) {
1324
1338
  login(input: $input) {
1325
1339
  message
1340
+ refreshToken
1326
1341
  token
1327
1342
  user {
1328
1343
  ...UserFields
@@ -1331,10 +1346,18 @@ var LOGIN_MUTATION = gql2`
1331
1346
  }
1332
1347
  ${USER_FIELDS_FRAGMENT}
1333
1348
  `;
1334
- var REGISTER_MUTATION = gql2`
1335
- mutation register($input: RegisterInputType!) {
1336
- register(input: $input) {
1349
+ var LOGOUT_MUTATION = gql2`
1350
+ mutation logout {
1351
+ logout {
1352
+ message
1353
+ }
1354
+ }
1355
+ `;
1356
+ var REFRESH_TOKEN_MUTATION = gql2`
1357
+ mutation refreshToken($input: RefreshTokenInputType!) {
1358
+ refreshToken(input: $input) {
1337
1359
  message
1360
+ refreshToken
1338
1361
  token
1339
1362
  user {
1340
1363
  ...UserFields
@@ -1357,22 +1380,34 @@ var REQUEST_PASSWORD_RESET_MUTATION = gql2`
1357
1380
  }
1358
1381
  }
1359
1382
  `;
1360
- var VALIDATE_TOKEN_MUTATION = gql2`
1361
- mutation validateToken($input: ValidateTokenInputType!) {
1362
- validateToken(input: $input) {
1383
+ var VALIDATE_VERIFICATION_TOKEN_MUTATION = gql2`
1384
+ mutation validateVerificationToken(
1385
+ $input: ValidateVerificationTokenInputType!
1386
+ ) {
1387
+ validateVerificationToken(input: $input) {
1363
1388
  message
1364
1389
  }
1365
1390
  }
1366
1391
  `;
1367
1392
 
1368
1393
  // src/graphql/hooks/auth.ts
1394
+ var useRegister = () => {
1395
+ const [register, { loading, error }] = useMutation(REGISTER_MUTATION);
1396
+ return { error, loading, register };
1397
+ };
1369
1398
  var useLogin = () => {
1370
1399
  const [login, { loading, error }] = useMutation(LOGIN_MUTATION);
1371
1400
  return { error, loading, login };
1372
1401
  };
1373
- var useRegister = () => {
1374
- const [register, { loading, error }] = useMutation(REGISTER_MUTATION);
1375
- return { error, loading, register };
1402
+ var useLogout = () => {
1403
+ const [logout, { loading, error }] = useMutation(LOGOUT_MUTATION);
1404
+ return { error, loading, logout };
1405
+ };
1406
+ var useRefreshToken = () => {
1407
+ const [refreshToken, { loading, error }] = useMutation(
1408
+ REFRESH_TOKEN_MUTATION
1409
+ );
1410
+ return { error, loading, refreshToken };
1376
1411
  };
1377
1412
  var useRequestPasswordReset = () => {
1378
1413
  const [requestPasswordReset, { loading, error }] = useMutation(
@@ -1380,11 +1415,11 @@ var useRequestPasswordReset = () => {
1380
1415
  );
1381
1416
  return { error, loading, requestPasswordReset };
1382
1417
  };
1383
- var useValidateToken = () => {
1384
- const [validateToken, { loading, error }] = useMutation(
1385
- VALIDATE_TOKEN_MUTATION
1418
+ var useValidateVerificationToken = () => {
1419
+ const [validateVerificationToken, { loading, error }] = useMutation(
1420
+ VALIDATE_VERIFICATION_TOKEN_MUTATION
1386
1421
  );
1387
- return { error, loading, validateToken };
1422
+ return { error, loading, validateVerificationToken };
1388
1423
  };
1389
1424
  var useResetPassword = () => {
1390
1425
  const [resetPassword, { loading, error }] = useMutation(
@@ -3446,7 +3481,7 @@ var resetPasswordFields = [
3446
3481
  secureTextEntry: true
3447
3482
  }
3448
3483
  ];
3449
- var validateTokenFields = [
3484
+ var validateVerificationTokenFields = [
3450
3485
  {
3451
3486
  disabled: true,
3452
3487
  helperText: "Your email address",
@@ -3950,8 +3985,10 @@ export {
3950
3985
  useLocationSearch,
3951
3986
  useLogin,
3952
3987
  useLoginForm,
3988
+ useLogout,
3953
3989
  useMarketForm,
3954
3990
  useMarketInfoForm,
3991
+ useRefreshToken,
3955
3992
  useRegister,
3956
3993
  useRegisterForm,
3957
3994
  useRemoveParticipantFromChat,
@@ -3972,8 +4009,8 @@ export {
3972
4009
  useUpdateStallholderApplyForm,
3973
4010
  useUpdateUser,
3974
4011
  useUserForm,
3975
- useValidateToken,
3976
- useValidateTokenForm,
3977
- validateTokenFields
4012
+ useValidateVerificationToken,
4013
+ useValidateVerificationTokenForm,
4014
+ validateVerificationTokenFields
3978
4015
  };
3979
4016
  //# sourceMappingURL=index.mjs.map