@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/{auth-gmfsaSPo.d.ts → auth-CFZ3I1a4.d.ts} +11 -11
- package/dist/{auth-CAeHx-BM.d.mts → auth-DyTQ50tf.d.mts} +11 -11
- package/dist/formFields/index.cjs +3 -3
- package/dist/formFields/index.cjs.map +1 -1
- package/dist/formFields/index.d.mts +3 -3
- package/dist/formFields/index.d.ts +3 -3
- package/dist/formFields/index.mjs +2 -2
- package/dist/formFields/index.mjs.map +1 -1
- package/dist/{global-BevIF4_9.d.ts → global-CXknaniY.d.ts} +1 -0
- package/dist/{global-B-4Ee_Hl.d.mts → global-K_y4U9DZ.d.mts} +1 -0
- package/dist/graphql/index.cjs +54 -15
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +16 -6
- package/dist/graphql/index.d.ts +16 -6
- package/dist/graphql/index.mjs +51 -14
- package/dist/graphql/index.mjs.map +1 -1
- package/dist/hooks/index.cjs +10 -10
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.mts +4 -4
- package/dist/hooks/index.d.ts +4 -4
- package/dist/hooks/index.mjs +9 -9
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +67 -28
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +28 -17
- package/dist/index.d.ts +28 -17
- package/dist/index.mjs +62 -25
- package/dist/index.mjs.map +1 -1
- package/dist/types/index.d.mts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/utils/index.d.mts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/package.json +1 -1
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
|
|
146
|
+
type ValidateVerificationTokenFormData = {
|
|
147
147
|
email: string;
|
|
148
|
-
|
|
148
|
+
verificationToken: string;
|
|
149
149
|
};
|
|
150
|
-
interface
|
|
151
|
-
control: Control<
|
|
152
|
-
fields:
|
|
150
|
+
interface CreateValidateVerificationTokenFormData {
|
|
151
|
+
control: Control<ValidateVerificationTokenFormData, any>;
|
|
152
|
+
fields: ValidateVerificationTokenFormData;
|
|
153
153
|
formState: {
|
|
154
|
-
errors: FieldErrors<
|
|
154
|
+
errors: FieldErrors<ValidateVerificationTokenFormData>;
|
|
155
155
|
};
|
|
156
|
-
handleSubmit: UseFormHandleSubmit<
|
|
157
|
-
reset: UseFormReset<
|
|
158
|
-
setValue: UseFormSetValue<
|
|
159
|
-
watch: UseFormWatch<
|
|
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
|
|
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
|
|
681
|
+
declare const useLogout: () => {
|
|
676
682
|
error: _apollo_client.ApolloError | undefined;
|
|
677
683
|
loading: boolean;
|
|
678
|
-
|
|
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
|
|
696
|
+
declare const useValidateVerificationToken: () => {
|
|
686
697
|
error: _apollo_client.ApolloError | undefined;
|
|
687
698
|
loading: boolean;
|
|
688
|
-
|
|
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
|
|
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
|
|
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
|
|
146
|
+
type ValidateVerificationTokenFormData = {
|
|
147
147
|
email: string;
|
|
148
|
-
|
|
148
|
+
verificationToken: string;
|
|
149
149
|
};
|
|
150
|
-
interface
|
|
151
|
-
control: Control<
|
|
152
|
-
fields:
|
|
150
|
+
interface CreateValidateVerificationTokenFormData {
|
|
151
|
+
control: Control<ValidateVerificationTokenFormData, any>;
|
|
152
|
+
fields: ValidateVerificationTokenFormData;
|
|
153
153
|
formState: {
|
|
154
|
-
errors: FieldErrors<
|
|
154
|
+
errors: FieldErrors<ValidateVerificationTokenFormData>;
|
|
155
155
|
};
|
|
156
|
-
handleSubmit: UseFormHandleSubmit<
|
|
157
|
-
reset: UseFormReset<
|
|
158
|
-
setValue: UseFormSetValue<
|
|
159
|
-
watch: UseFormWatch<
|
|
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
|
|
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
|
|
681
|
+
declare const useLogout: () => {
|
|
676
682
|
error: _apollo_client.ApolloError | undefined;
|
|
677
683
|
loading: boolean;
|
|
678
|
-
|
|
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
|
|
696
|
+
declare const useValidateVerificationToken: () => {
|
|
686
697
|
error: _apollo_client.ApolloError | undefined;
|
|
687
698
|
loading: boolean;
|
|
688
|
-
|
|
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
|
|
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
|
|
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
|
|
565
|
+
var validateVerificationTokenSchema = yup5.object().shape({
|
|
566
566
|
email: emailSchema,
|
|
567
|
-
|
|
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/
|
|
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
|
-
|
|
1191
|
+
verificationToken: ""
|
|
1192
1192
|
};
|
|
1193
|
-
function
|
|
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(
|
|
1204
|
+
resolver: yupResolver9(validateVerificationTokenSchema)
|
|
1205
1205
|
});
|
|
1206
|
-
const { email,
|
|
1206
|
+
const { email, verificationToken } = getValues();
|
|
1207
1207
|
return {
|
|
1208
1208
|
control,
|
|
1209
1209
|
fields: {
|
|
1210
1210
|
email,
|
|
1211
|
-
|
|
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
|
|
1335
|
-
mutation
|
|
1336
|
-
|
|
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
|
|
1361
|
-
mutation
|
|
1362
|
-
|
|
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
|
|
1374
|
-
const [
|
|
1375
|
-
return { error, loading,
|
|
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
|
|
1384
|
-
const [
|
|
1385
|
-
|
|
1418
|
+
var useValidateVerificationToken = () => {
|
|
1419
|
+
const [validateVerificationToken, { loading, error }] = useMutation(
|
|
1420
|
+
VALIDATE_VERIFICATION_TOKEN_MUTATION
|
|
1386
1421
|
);
|
|
1387
|
-
return { error, loading,
|
|
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
|
|
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
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
4012
|
+
useValidateVerificationToken,
|
|
4013
|
+
useValidateVerificationTokenForm,
|
|
4014
|
+
validateVerificationTokenFields
|
|
3978
4015
|
};
|
|
3979
4016
|
//# sourceMappingURL=index.mjs.map
|