@timardex/cluemart-shared 1.0.30 → 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 +51 -3
- package/dist/formFields/index.cjs.map +1 -1
- package/dist/formFields/index.d.mts +4 -3
- package/dist/formFields/index.d.ts +4 -3
- package/dist/formFields/index.mjs +49 -2
- package/dist/formFields/index.mjs.map +1 -1
- package/dist/{global-BPTHVdhZ.d.ts → global-CXknaniY.d.ts} +7 -1
- package/dist/{global-BXE1MTDE.d.mts → global-K_y4U9DZ.d.mts} +7 -1
- package/dist/graphql/index.cjs +58 -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 +55 -14
- package/dist/graphql/index.mjs.map +1 -1
- package/dist/hooks/index.cjs +26 -11
- 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 +25 -10
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +135 -29
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +34 -17
- package/dist/index.d.ts +34 -17
- package/dist/index.mjs +129 -26
- 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 {
|
|
@@ -214,8 +214,13 @@ interface RelationType {
|
|
|
214
214
|
updatedAt?: string;
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
+
type SiteType = {
|
|
218
|
+
label?: string;
|
|
219
|
+
price?: number;
|
|
220
|
+
};
|
|
217
221
|
interface DateTimeWithPriceType extends DateTimeType {
|
|
218
222
|
marketPrice: number;
|
|
223
|
+
siteTypes?: SiteType[] | null;
|
|
219
224
|
}
|
|
220
225
|
type PaymentTargetType = {
|
|
221
226
|
accountHolderName?: string;
|
|
@@ -398,6 +403,7 @@ interface UserType {
|
|
|
398
403
|
markets: string[] | null;
|
|
399
404
|
password: string;
|
|
400
405
|
preferredRegion: string;
|
|
406
|
+
refreshToken: string | null;
|
|
401
407
|
role: EnumUserRole;
|
|
402
408
|
stallholder: string | null;
|
|
403
409
|
updatedAt: string;
|
|
@@ -651,7 +657,7 @@ declare function useRegisterForm(): CreateRegisterFormData;
|
|
|
651
657
|
|
|
652
658
|
declare function useRequestPasswordResetForm(): CreateRequestPasswordResetFormData;
|
|
653
659
|
|
|
654
|
-
declare function
|
|
660
|
+
declare function useValidateVerificationTokenForm(): CreateValidateVerificationTokenFormData;
|
|
655
661
|
|
|
656
662
|
declare function useResetPasswordForm(): CreateResetPasswordFormData;
|
|
657
663
|
|
|
@@ -662,25 +668,35 @@ declare const defaultStallholderFormValues: StallholderFormData;
|
|
|
662
668
|
declare const defaultStallholderApplyFormValues: StallholderApplyFormFormData;
|
|
663
669
|
declare function mapBaseResourceTypeToFormData(data: MarketFormData | StallholderFormData): BaseResourceTypeFormData;
|
|
664
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
|
+
};
|
|
665
676
|
declare const useLogin: () => {
|
|
666
677
|
error: _apollo_client.ApolloError | undefined;
|
|
667
678
|
loading: boolean;
|
|
668
679
|
login: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
|
|
669
680
|
};
|
|
670
|
-
declare const
|
|
681
|
+
declare const useLogout: () => {
|
|
671
682
|
error: _apollo_client.ApolloError | undefined;
|
|
672
683
|
loading: boolean;
|
|
673
|
-
|
|
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>>;
|
|
674
690
|
};
|
|
675
691
|
declare const useRequestPasswordReset: () => {
|
|
676
692
|
error: _apollo_client.ApolloError | undefined;
|
|
677
693
|
loading: boolean;
|
|
678
694
|
requestPasswordReset: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
|
|
679
695
|
};
|
|
680
|
-
declare const
|
|
696
|
+
declare const useValidateVerificationToken: () => {
|
|
681
697
|
error: _apollo_client.ApolloError | undefined;
|
|
682
698
|
loading: boolean;
|
|
683
|
-
|
|
699
|
+
validateVerificationToken: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
|
|
684
700
|
};
|
|
685
701
|
declare const useResetPassword: () => {
|
|
686
702
|
error: _apollo_client.ApolloError | undefined;
|
|
@@ -1017,12 +1033,13 @@ declare const marketInfo: FormField[];
|
|
|
1017
1033
|
declare const marketInfoPaymentTarget: FormField[];
|
|
1018
1034
|
declare const marketPriceByDateFields: FormField[];
|
|
1019
1035
|
declare const requirementsOptions: Requirement[];
|
|
1036
|
+
declare const siteTypeOptions: SiteType[];
|
|
1020
1037
|
|
|
1021
1038
|
declare const loginFields: FormField[];
|
|
1022
1039
|
declare const registerFields: FormField[];
|
|
1023
1040
|
declare const requestPasswordResetFields: FormField[];
|
|
1024
1041
|
declare const resetPasswordFields: FormField[];
|
|
1025
|
-
declare const
|
|
1042
|
+
declare const validateVerificationTokenFields: FormField[];
|
|
1026
1043
|
|
|
1027
1044
|
declare const profileFields: FormField[];
|
|
1028
1045
|
|
|
@@ -1031,4 +1048,4 @@ declare const categoryColors: Record<string, string>;
|
|
|
1031
1048
|
|
|
1032
1049
|
declare const socialMediaFields: FormField[];
|
|
1033
1050
|
|
|
1034
|
-
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 {
|
|
@@ -214,8 +214,13 @@ interface RelationType {
|
|
|
214
214
|
updatedAt?: string;
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
+
type SiteType = {
|
|
218
|
+
label?: string;
|
|
219
|
+
price?: number;
|
|
220
|
+
};
|
|
217
221
|
interface DateTimeWithPriceType extends DateTimeType {
|
|
218
222
|
marketPrice: number;
|
|
223
|
+
siteTypes?: SiteType[] | null;
|
|
219
224
|
}
|
|
220
225
|
type PaymentTargetType = {
|
|
221
226
|
accountHolderName?: string;
|
|
@@ -398,6 +403,7 @@ interface UserType {
|
|
|
398
403
|
markets: string[] | null;
|
|
399
404
|
password: string;
|
|
400
405
|
preferredRegion: string;
|
|
406
|
+
refreshToken: string | null;
|
|
401
407
|
role: EnumUserRole;
|
|
402
408
|
stallholder: string | null;
|
|
403
409
|
updatedAt: string;
|
|
@@ -651,7 +657,7 @@ declare function useRegisterForm(): CreateRegisterFormData;
|
|
|
651
657
|
|
|
652
658
|
declare function useRequestPasswordResetForm(): CreateRequestPasswordResetFormData;
|
|
653
659
|
|
|
654
|
-
declare function
|
|
660
|
+
declare function useValidateVerificationTokenForm(): CreateValidateVerificationTokenFormData;
|
|
655
661
|
|
|
656
662
|
declare function useResetPasswordForm(): CreateResetPasswordFormData;
|
|
657
663
|
|
|
@@ -662,25 +668,35 @@ declare const defaultStallholderFormValues: StallholderFormData;
|
|
|
662
668
|
declare const defaultStallholderApplyFormValues: StallholderApplyFormFormData;
|
|
663
669
|
declare function mapBaseResourceTypeToFormData(data: MarketFormData | StallholderFormData): BaseResourceTypeFormData;
|
|
664
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
|
+
};
|
|
665
676
|
declare const useLogin: () => {
|
|
666
677
|
error: _apollo_client.ApolloError | undefined;
|
|
667
678
|
loading: boolean;
|
|
668
679
|
login: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
|
|
669
680
|
};
|
|
670
|
-
declare const
|
|
681
|
+
declare const useLogout: () => {
|
|
671
682
|
error: _apollo_client.ApolloError | undefined;
|
|
672
683
|
loading: boolean;
|
|
673
|
-
|
|
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>>;
|
|
674
690
|
};
|
|
675
691
|
declare const useRequestPasswordReset: () => {
|
|
676
692
|
error: _apollo_client.ApolloError | undefined;
|
|
677
693
|
loading: boolean;
|
|
678
694
|
requestPasswordReset: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
|
|
679
695
|
};
|
|
680
|
-
declare const
|
|
696
|
+
declare const useValidateVerificationToken: () => {
|
|
681
697
|
error: _apollo_client.ApolloError | undefined;
|
|
682
698
|
loading: boolean;
|
|
683
|
-
|
|
699
|
+
validateVerificationToken: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
|
|
684
700
|
};
|
|
685
701
|
declare const useResetPassword: () => {
|
|
686
702
|
error: _apollo_client.ApolloError | undefined;
|
|
@@ -1017,12 +1033,13 @@ declare const marketInfo: FormField[];
|
|
|
1017
1033
|
declare const marketInfoPaymentTarget: FormField[];
|
|
1018
1034
|
declare const marketPriceByDateFields: FormField[];
|
|
1019
1035
|
declare const requirementsOptions: Requirement[];
|
|
1036
|
+
declare const siteTypeOptions: SiteType[];
|
|
1020
1037
|
|
|
1021
1038
|
declare const loginFields: FormField[];
|
|
1022
1039
|
declare const registerFields: FormField[];
|
|
1023
1040
|
declare const requestPasswordResetFields: FormField[];
|
|
1024
1041
|
declare const resetPasswordFields: FormField[];
|
|
1025
|
-
declare const
|
|
1042
|
+
declare const validateVerificationTokenFields: FormField[];
|
|
1026
1043
|
|
|
1027
1044
|
declare const profileFields: FormField[];
|
|
1028
1045
|
|
|
@@ -1031,4 +1048,4 @@ declare const categoryColors: Record<string, string>;
|
|
|
1031
1048
|
|
|
1032
1049
|
declare const socialMediaFields: FormField[];
|
|
1033
1050
|
|
|
1034
|
-
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
|
@@ -365,12 +365,25 @@ var dateTimeSchema = yup.object().shape({
|
|
|
365
365
|
startDate: yup.string().concat(startDateNotInPastTest).required("Start date is required"),
|
|
366
366
|
startTime: yup.string().concat(startTimeCannotBeInPastTest).required("Start time is required")
|
|
367
367
|
});
|
|
368
|
+
var siteTypesSchema = yup.object({
|
|
369
|
+
label: yup.string().trim().optional(),
|
|
370
|
+
price: yup.number().when("label", {
|
|
371
|
+
is: (label) => !!label,
|
|
372
|
+
then: (schema) => schema.typeError("Site price must be a number").min(0.1, "Site price must be at least 0.1").required("Site price is required").test(
|
|
373
|
+
"no-leading-zeros",
|
|
374
|
+
"",
|
|
375
|
+
noLeadingZeros("Site price", { allowDecimal: true })
|
|
376
|
+
),
|
|
377
|
+
otherwise: (schema) => schema.notRequired()
|
|
378
|
+
})
|
|
379
|
+
});
|
|
368
380
|
var dateTimeWithPriceSchema = dateTimeSchema.shape({
|
|
369
381
|
marketPrice: yup.number().typeError("Market price must be a number").min(0.1, "Market price must be at least 0.1").required("Market price is required").test(
|
|
370
382
|
"no-leading-zeros",
|
|
371
383
|
"",
|
|
372
384
|
noLeadingZeros("Market price", { allowDecimal: true })
|
|
373
|
-
)
|
|
385
|
+
),
|
|
386
|
+
siteTypes: yup.array().of(siteTypesSchema).nullable().optional()
|
|
374
387
|
});
|
|
375
388
|
var locationSchema = yup.object().shape({
|
|
376
389
|
city: yup.string().required("City is required"),
|
|
@@ -549,9 +562,9 @@ var resetPasswordSchema = yup5.object().shape({
|
|
|
549
562
|
// eslint-disable-next-line sort-keys
|
|
550
563
|
confirmPassword: yup5.string().oneOf([yup5.ref("password")], "Passwords must match").required("Confirm Password is required")
|
|
551
564
|
});
|
|
552
|
-
var
|
|
565
|
+
var validateVerificationTokenSchema = yup5.object().shape({
|
|
553
566
|
email: emailSchema,
|
|
554
|
-
|
|
567
|
+
verificationToken: yup5.string().required("Verification code is required").matches(/^\d{5}$/, "Verification code must be exactly 5 digits")
|
|
555
568
|
});
|
|
556
569
|
|
|
557
570
|
// src/hooks/utils.ts
|
|
@@ -613,6 +626,7 @@ var defaultMarketInfoFormValues = {
|
|
|
613
626
|
endDate: "04-05-2025",
|
|
614
627
|
endTime: "15:00",
|
|
615
628
|
marketPrice: 0,
|
|
629
|
+
siteTypes: [],
|
|
616
630
|
startDate: "04-05-2025",
|
|
617
631
|
startTime: "09:00"
|
|
618
632
|
},
|
|
@@ -620,6 +634,7 @@ var defaultMarketInfoFormValues = {
|
|
|
620
634
|
endDate: "05-05-2025",
|
|
621
635
|
endTime: "15:00",
|
|
622
636
|
marketPrice: 0,
|
|
637
|
+
siteTypes: [],
|
|
623
638
|
startDate: "05-05-2025",
|
|
624
639
|
startTime: "09:00"
|
|
625
640
|
}
|
|
@@ -1168,14 +1183,14 @@ function useRequestPasswordResetForm() {
|
|
|
1168
1183
|
};
|
|
1169
1184
|
}
|
|
1170
1185
|
|
|
1171
|
-
// src/hooks/auth/
|
|
1186
|
+
// src/hooks/auth/useValidateVerificationTokenForm.ts
|
|
1172
1187
|
import { yupResolver as yupResolver9 } from "@hookform/resolvers/yup";
|
|
1173
1188
|
import { useForm as useForm9 } from "react-hook-form";
|
|
1174
1189
|
var defaultValues5 = {
|
|
1175
1190
|
email: "",
|
|
1176
|
-
|
|
1191
|
+
verificationToken: ""
|
|
1177
1192
|
};
|
|
1178
|
-
function
|
|
1193
|
+
function useValidateVerificationTokenForm() {
|
|
1179
1194
|
const {
|
|
1180
1195
|
control,
|
|
1181
1196
|
formState: { errors },
|
|
@@ -1186,14 +1201,14 @@ function useValidateTokenForm() {
|
|
|
1186
1201
|
watch
|
|
1187
1202
|
} = useForm9({
|
|
1188
1203
|
defaultValues: defaultValues5,
|
|
1189
|
-
resolver: yupResolver9(
|
|
1204
|
+
resolver: yupResolver9(validateVerificationTokenSchema)
|
|
1190
1205
|
});
|
|
1191
|
-
const { email,
|
|
1206
|
+
const { email, verificationToken } = getValues();
|
|
1192
1207
|
return {
|
|
1193
1208
|
control,
|
|
1194
1209
|
fields: {
|
|
1195
1210
|
email,
|
|
1196
|
-
|
|
1211
|
+
verificationToken
|
|
1197
1212
|
},
|
|
1198
1213
|
formState: { errors },
|
|
1199
1214
|
handleSubmit,
|
|
@@ -1296,6 +1311,7 @@ var USER_FIELDS_FRAGMENT = gql`
|
|
|
1296
1311
|
licences
|
|
1297
1312
|
markets
|
|
1298
1313
|
preferredRegion
|
|
1314
|
+
refreshToken
|
|
1299
1315
|
role
|
|
1300
1316
|
stallholder
|
|
1301
1317
|
updatedAt
|
|
@@ -1304,10 +1320,24 @@ var USER_FIELDS_FRAGMENT = gql`
|
|
|
1304
1320
|
`;
|
|
1305
1321
|
|
|
1306
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
|
+
`;
|
|
1307
1336
|
var LOGIN_MUTATION = gql2`
|
|
1308
1337
|
mutation login($input: LoginInputType!) {
|
|
1309
1338
|
login(input: $input) {
|
|
1310
1339
|
message
|
|
1340
|
+
refreshToken
|
|
1311
1341
|
token
|
|
1312
1342
|
user {
|
|
1313
1343
|
...UserFields
|
|
@@ -1316,10 +1346,18 @@ var LOGIN_MUTATION = gql2`
|
|
|
1316
1346
|
}
|
|
1317
1347
|
${USER_FIELDS_FRAGMENT}
|
|
1318
1348
|
`;
|
|
1319
|
-
var
|
|
1320
|
-
mutation
|
|
1321
|
-
|
|
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) {
|
|
1322
1359
|
message
|
|
1360
|
+
refreshToken
|
|
1323
1361
|
token
|
|
1324
1362
|
user {
|
|
1325
1363
|
...UserFields
|
|
@@ -1342,22 +1380,34 @@ var REQUEST_PASSWORD_RESET_MUTATION = gql2`
|
|
|
1342
1380
|
}
|
|
1343
1381
|
}
|
|
1344
1382
|
`;
|
|
1345
|
-
var
|
|
1346
|
-
mutation
|
|
1347
|
-
|
|
1383
|
+
var VALIDATE_VERIFICATION_TOKEN_MUTATION = gql2`
|
|
1384
|
+
mutation validateVerificationToken(
|
|
1385
|
+
$input: ValidateVerificationTokenInputType!
|
|
1386
|
+
) {
|
|
1387
|
+
validateVerificationToken(input: $input) {
|
|
1348
1388
|
message
|
|
1349
1389
|
}
|
|
1350
1390
|
}
|
|
1351
1391
|
`;
|
|
1352
1392
|
|
|
1353
1393
|
// src/graphql/hooks/auth.ts
|
|
1394
|
+
var useRegister = () => {
|
|
1395
|
+
const [register, { loading, error }] = useMutation(REGISTER_MUTATION);
|
|
1396
|
+
return { error, loading, register };
|
|
1397
|
+
};
|
|
1354
1398
|
var useLogin = () => {
|
|
1355
1399
|
const [login, { loading, error }] = useMutation(LOGIN_MUTATION);
|
|
1356
1400
|
return { error, loading, login };
|
|
1357
1401
|
};
|
|
1358
|
-
var
|
|
1359
|
-
const [
|
|
1360
|
-
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 };
|
|
1361
1411
|
};
|
|
1362
1412
|
var useRequestPasswordReset = () => {
|
|
1363
1413
|
const [requestPasswordReset, { loading, error }] = useMutation(
|
|
@@ -1365,11 +1415,11 @@ var useRequestPasswordReset = () => {
|
|
|
1365
1415
|
);
|
|
1366
1416
|
return { error, loading, requestPasswordReset };
|
|
1367
1417
|
};
|
|
1368
|
-
var
|
|
1369
|
-
const [
|
|
1370
|
-
|
|
1418
|
+
var useValidateVerificationToken = () => {
|
|
1419
|
+
const [validateVerificationToken, { loading, error }] = useMutation(
|
|
1420
|
+
VALIDATE_VERIFICATION_TOKEN_MUTATION
|
|
1371
1421
|
);
|
|
1372
|
-
return { error, loading,
|
|
1422
|
+
return { error, loading, validateVerificationToken };
|
|
1373
1423
|
};
|
|
1374
1424
|
var useResetPassword = () => {
|
|
1375
1425
|
const [resetPassword, { loading, error }] = useMutation(
|
|
@@ -1602,6 +1652,10 @@ var MARKET_INFO = gql5`
|
|
|
1602
1652
|
endDate
|
|
1603
1653
|
endTime
|
|
1604
1654
|
marketPrice
|
|
1655
|
+
siteTypes {
|
|
1656
|
+
label
|
|
1657
|
+
price
|
|
1658
|
+
}
|
|
1605
1659
|
startDate
|
|
1606
1660
|
startTime
|
|
1607
1661
|
}
|
|
@@ -3313,6 +3367,52 @@ var requirementsOptions = [
|
|
|
3313
3367
|
value: false
|
|
3314
3368
|
}
|
|
3315
3369
|
];
|
|
3370
|
+
var siteTypeOptions = [
|
|
3371
|
+
{
|
|
3372
|
+
label: "3x3m tent site",
|
|
3373
|
+
price: 0
|
|
3374
|
+
},
|
|
3375
|
+
{
|
|
3376
|
+
label: "2x2m mini stall",
|
|
3377
|
+
price: 0
|
|
3378
|
+
},
|
|
3379
|
+
{
|
|
3380
|
+
label: "1.8m table only",
|
|
3381
|
+
price: 0
|
|
3382
|
+
},
|
|
3383
|
+
{
|
|
3384
|
+
label: "Food truck site",
|
|
3385
|
+
price: 0
|
|
3386
|
+
},
|
|
3387
|
+
{
|
|
3388
|
+
label: "Wall-based vendor",
|
|
3389
|
+
price: 0
|
|
3390
|
+
},
|
|
3391
|
+
{
|
|
3392
|
+
label: "Workshop/seating area",
|
|
3393
|
+
price: 0
|
|
3394
|
+
},
|
|
3395
|
+
{
|
|
3396
|
+
label: "Shared table space",
|
|
3397
|
+
price: 0
|
|
3398
|
+
},
|
|
3399
|
+
{
|
|
3400
|
+
label: "Corner stall",
|
|
3401
|
+
price: 0
|
|
3402
|
+
},
|
|
3403
|
+
{
|
|
3404
|
+
label: "Double stall (6x3m)",
|
|
3405
|
+
price: 0
|
|
3406
|
+
},
|
|
3407
|
+
{
|
|
3408
|
+
label: "Inside hall stall",
|
|
3409
|
+
price: 0
|
|
3410
|
+
},
|
|
3411
|
+
{
|
|
3412
|
+
label: "Outdoor open area",
|
|
3413
|
+
price: 0
|
|
3414
|
+
}
|
|
3415
|
+
];
|
|
3316
3416
|
|
|
3317
3417
|
// src/formFields/auth.ts
|
|
3318
3418
|
var loginFields = [
|
|
@@ -3381,7 +3481,7 @@ var resetPasswordFields = [
|
|
|
3381
3481
|
secureTextEntry: true
|
|
3382
3482
|
}
|
|
3383
3483
|
];
|
|
3384
|
-
var
|
|
3484
|
+
var validateVerificationTokenFields = [
|
|
3385
3485
|
{
|
|
3386
3486
|
disabled: true,
|
|
3387
3487
|
helperText: "Your email address",
|
|
@@ -3824,6 +3924,7 @@ export {
|
|
|
3824
3924
|
requestPasswordResetFields,
|
|
3825
3925
|
requirementsOptions,
|
|
3826
3926
|
resetPasswordFields,
|
|
3927
|
+
siteTypeOptions,
|
|
3827
3928
|
socialMediaFields,
|
|
3828
3929
|
sortDatesByProximity,
|
|
3829
3930
|
stallholderBasicInfoFields,
|
|
@@ -3884,8 +3985,10 @@ export {
|
|
|
3884
3985
|
useLocationSearch,
|
|
3885
3986
|
useLogin,
|
|
3886
3987
|
useLoginForm,
|
|
3988
|
+
useLogout,
|
|
3887
3989
|
useMarketForm,
|
|
3888
3990
|
useMarketInfoForm,
|
|
3991
|
+
useRefreshToken,
|
|
3889
3992
|
useRegister,
|
|
3890
3993
|
useRegisterForm,
|
|
3891
3994
|
useRemoveParticipantFromChat,
|
|
@@ -3906,8 +4009,8 @@ export {
|
|
|
3906
4009
|
useUpdateStallholderApplyForm,
|
|
3907
4010
|
useUpdateUser,
|
|
3908
4011
|
useUserForm,
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
4012
|
+
useValidateVerificationToken,
|
|
4013
|
+
useValidateVerificationTokenForm,
|
|
4014
|
+
validateVerificationTokenFields
|
|
3912
4015
|
};
|
|
3913
4016
|
//# sourceMappingURL=index.mjs.map
|