@timardex/cluemart-shared 1.0.32 → 1.0.34
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-CFZ3I1a4.d.ts → auth-DmkwZu5m.d.mts} +0 -2
- package/dist/{auth-DyTQ50tf.d.mts → auth-DmkwZu5m.d.ts} +0 -2
- package/dist/formFields/index.cjs +1 -0
- package/dist/formFields/index.cjs.map +1 -1
- package/dist/formFields/index.mjs +1 -0
- package/dist/formFields/index.mjs.map +1 -1
- package/dist/graphql/index.cjs +17 -5
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +7 -1
- package/dist/graphql/index.d.ts +7 -1
- package/dist/graphql/index.mjs +16 -5
- package/dist/graphql/index.mjs.map +1 -1
- package/dist/hooks/index.cjs +45 -48
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.mts +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.mjs +29 -32
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +63 -53
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +85 -80
- package/dist/index.d.ts +85 -80
- package/dist/index.mjs +62 -53
- package/dist/index.mjs.map +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,84 +1,6 @@
|
|
|
1
1
|
import { Control, FieldErrors, UseFormHandleSubmit, UseFormReset, UseFormSetValue, UseFormWatch } from 'react-hook-form';
|
|
2
2
|
import * as _apollo_client from '@apollo/client';
|
|
3
3
|
|
|
4
|
-
declare enum EnumInviteStatus {
|
|
5
|
-
ACCEPTED = "Accepted",
|
|
6
|
-
COMPLETED = "Completed",
|
|
7
|
-
EXPIRED = "Expired",
|
|
8
|
-
NO_STATUS = "No_Status",
|
|
9
|
-
PENDING = "Pending",
|
|
10
|
-
REJECTED = "Rejected",
|
|
11
|
-
WAITING = "Waiting"
|
|
12
|
-
}
|
|
13
|
-
declare enum EnumPaymentMethod {
|
|
14
|
-
CASH = "cash",
|
|
15
|
-
EFTPOS = "eftpos",
|
|
16
|
-
BANK_TRANSFER = "bank_transfer",
|
|
17
|
-
PAYPAL = "paypal",
|
|
18
|
-
STRIPE = "stripe"
|
|
19
|
-
}
|
|
20
|
-
declare enum EnumResourceType {
|
|
21
|
-
MARKET = "market",
|
|
22
|
-
STALLHOLDER = "stallholder"
|
|
23
|
-
}
|
|
24
|
-
declare enum EnumRelationResource {
|
|
25
|
-
MARKET_INVITE_STALLHOLDER = "market_invite_stallholder",
|
|
26
|
-
STALLHOLDER_APPLICATION_TO_MARKET = "stallholder_application_to_market"
|
|
27
|
-
}
|
|
28
|
-
declare enum EnumNotification {
|
|
29
|
-
CREATED_MARKET = "created_market",
|
|
30
|
-
CREATED_STALLHOLDER = "created_stallholder",
|
|
31
|
-
NEW_CHAT_MESSAGE = "new_chat_message",
|
|
32
|
-
MARKET_INVITE_STALLHOLDER = "market_invite_stallholder",
|
|
33
|
-
STALLHOLDER_APPLICATION_TO_MARKET = "stallholder_application_to_market"
|
|
34
|
-
}
|
|
35
|
-
declare enum EnumResourceTypeIcon {
|
|
36
|
-
MARKET = "compass",
|
|
37
|
-
STALLHOLDER = "store"
|
|
38
|
-
}
|
|
39
|
-
declare enum EnumRegions {
|
|
40
|
-
Auckland = "Auckland",
|
|
41
|
-
BayOfPlenty = "Bay of Plenty",
|
|
42
|
-
Canterbury = "Canterbury",
|
|
43
|
-
Gisborne = "Gisborne",
|
|
44
|
-
HawkesBay = "Hawke's Bay",
|
|
45
|
-
ManawatuWanganui = "Manawatu-Wanganui",
|
|
46
|
-
Marlborough = "Marlborough",
|
|
47
|
-
Nelson = "Nelson",
|
|
48
|
-
Northland = "Northland",
|
|
49
|
-
Otago = "Otago",
|
|
50
|
-
Southland = "Southland",
|
|
51
|
-
Taranaki = "Taranaki",
|
|
52
|
-
Waikato = "Waikato",
|
|
53
|
-
Wellington = "Wellington"
|
|
54
|
-
}
|
|
55
|
-
declare enum ImageTypeEnum {
|
|
56
|
-
AVATAR = "avatar",
|
|
57
|
-
COVER = "cover",
|
|
58
|
-
IMAGE = "image",
|
|
59
|
-
LOGO = "logo"
|
|
60
|
-
}
|
|
61
|
-
declare enum EnumUserLicence {
|
|
62
|
-
ENTERPRISE_MARKET = "enterprise_market",
|
|
63
|
-
ENTERPRISE_STALLHOLDER = "enterprise_stallholder",
|
|
64
|
-
PRO_MARKET = "pro_market",
|
|
65
|
-
PRO_STALLHOLDER = "pro_stallholder",
|
|
66
|
-
STANDARD_MARKET = "standard_market",
|
|
67
|
-
STANDARD_STALLHOLDER = "standard_stallholder"
|
|
68
|
-
}
|
|
69
|
-
declare enum EnumUserRole {
|
|
70
|
-
ADMIN = "admin",
|
|
71
|
-
CUSTOMER = "customer"
|
|
72
|
-
}
|
|
73
|
-
declare enum EnumSocialMedia {
|
|
74
|
-
FACEBOOK = "facebook",
|
|
75
|
-
INSTAGRAM = "instagram",
|
|
76
|
-
TIKTOK = "tiktok",
|
|
77
|
-
TWITTER = "twitter",
|
|
78
|
-
WEBSITE = "website",
|
|
79
|
-
YOUTUBE = "youtube"
|
|
80
|
-
}
|
|
81
|
-
|
|
82
4
|
type LoginFormData = {
|
|
83
5
|
email: string;
|
|
84
6
|
password: string;
|
|
@@ -100,7 +22,6 @@ type RegisterFormData = {
|
|
|
100
22
|
lastName: string;
|
|
101
23
|
password: string;
|
|
102
24
|
preferredRegion: string;
|
|
103
|
-
role: EnumUserRole;
|
|
104
25
|
};
|
|
105
26
|
interface CreateRegisterFormData {
|
|
106
27
|
control: Control<RegisterFormData, any>;
|
|
@@ -185,6 +106,84 @@ interface ChatType {
|
|
|
185
106
|
updatedAt: string;
|
|
186
107
|
}
|
|
187
108
|
|
|
109
|
+
declare enum EnumInviteStatus {
|
|
110
|
+
ACCEPTED = "Accepted",
|
|
111
|
+
COMPLETED = "Completed",
|
|
112
|
+
EXPIRED = "Expired",
|
|
113
|
+
NO_STATUS = "No_Status",
|
|
114
|
+
PENDING = "Pending",
|
|
115
|
+
REJECTED = "Rejected",
|
|
116
|
+
WAITING = "Waiting"
|
|
117
|
+
}
|
|
118
|
+
declare enum EnumPaymentMethod {
|
|
119
|
+
CASH = "cash",
|
|
120
|
+
EFTPOS = "eftpos",
|
|
121
|
+
BANK_TRANSFER = "bank_transfer",
|
|
122
|
+
PAYPAL = "paypal",
|
|
123
|
+
STRIPE = "stripe"
|
|
124
|
+
}
|
|
125
|
+
declare enum EnumResourceType {
|
|
126
|
+
MARKET = "market",
|
|
127
|
+
STALLHOLDER = "stallholder"
|
|
128
|
+
}
|
|
129
|
+
declare enum EnumRelationResource {
|
|
130
|
+
MARKET_INVITE_STALLHOLDER = "market_invite_stallholder",
|
|
131
|
+
STALLHOLDER_APPLICATION_TO_MARKET = "stallholder_application_to_market"
|
|
132
|
+
}
|
|
133
|
+
declare enum EnumNotification {
|
|
134
|
+
CREATED_MARKET = "created_market",
|
|
135
|
+
CREATED_STALLHOLDER = "created_stallholder",
|
|
136
|
+
NEW_CHAT_MESSAGE = "new_chat_message",
|
|
137
|
+
MARKET_INVITE_STALLHOLDER = "market_invite_stallholder",
|
|
138
|
+
STALLHOLDER_APPLICATION_TO_MARKET = "stallholder_application_to_market"
|
|
139
|
+
}
|
|
140
|
+
declare enum EnumResourceTypeIcon {
|
|
141
|
+
MARKET = "compass",
|
|
142
|
+
STALLHOLDER = "store"
|
|
143
|
+
}
|
|
144
|
+
declare enum EnumRegions {
|
|
145
|
+
Auckland = "Auckland",
|
|
146
|
+
BayOfPlenty = "Bay of Plenty",
|
|
147
|
+
Canterbury = "Canterbury",
|
|
148
|
+
Gisborne = "Gisborne",
|
|
149
|
+
HawkesBay = "Hawke's Bay",
|
|
150
|
+
ManawatuWanganui = "Manawatu-Wanganui",
|
|
151
|
+
Marlborough = "Marlborough",
|
|
152
|
+
Nelson = "Nelson",
|
|
153
|
+
Northland = "Northland",
|
|
154
|
+
Otago = "Otago",
|
|
155
|
+
Southland = "Southland",
|
|
156
|
+
Taranaki = "Taranaki",
|
|
157
|
+
Waikato = "Waikato",
|
|
158
|
+
Wellington = "Wellington"
|
|
159
|
+
}
|
|
160
|
+
declare enum ImageTypeEnum {
|
|
161
|
+
AVATAR = "avatar",
|
|
162
|
+
COVER = "cover",
|
|
163
|
+
IMAGE = "image",
|
|
164
|
+
LOGO = "logo"
|
|
165
|
+
}
|
|
166
|
+
declare enum EnumUserLicence {
|
|
167
|
+
ENTERPRISE_MARKET = "enterprise_market",
|
|
168
|
+
ENTERPRISE_STALLHOLDER = "enterprise_stallholder",
|
|
169
|
+
PRO_MARKET = "pro_market",
|
|
170
|
+
PRO_STALLHOLDER = "pro_stallholder",
|
|
171
|
+
STANDARD_MARKET = "standard_market",
|
|
172
|
+
STANDARD_STALLHOLDER = "standard_stallholder"
|
|
173
|
+
}
|
|
174
|
+
declare enum EnumUserRole {
|
|
175
|
+
ADMIN = "admin",
|
|
176
|
+
CUSTOMER = "customer"
|
|
177
|
+
}
|
|
178
|
+
declare enum EnumSocialMedia {
|
|
179
|
+
FACEBOOK = "facebook",
|
|
180
|
+
INSTAGRAM = "instagram",
|
|
181
|
+
TIKTOK = "tiktok",
|
|
182
|
+
TWITTER = "twitter",
|
|
183
|
+
WEBSITE = "website",
|
|
184
|
+
YOUTUBE = "youtube"
|
|
185
|
+
}
|
|
186
|
+
|
|
188
187
|
type RelationLog = {
|
|
189
188
|
createdAt?: string;
|
|
190
189
|
updatedAt?: string;
|
|
@@ -970,6 +969,12 @@ declare const useGetUserMarkets: () => {
|
|
|
970
969
|
refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<any>>;
|
|
971
970
|
userMarkets: MarketType[];
|
|
972
971
|
};
|
|
972
|
+
declare const useGetUserStallholder: () => {
|
|
973
|
+
error: _apollo_client.ApolloError | undefined;
|
|
974
|
+
loading: boolean;
|
|
975
|
+
refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<any>>;
|
|
976
|
+
userStallholder: StallholderType;
|
|
977
|
+
};
|
|
973
978
|
declare const useGetUserFavourites: () => {
|
|
974
979
|
error: _apollo_client.ApolloError | undefined;
|
|
975
980
|
loading: boolean;
|
|
@@ -1048,4 +1053,4 @@ declare const categoryColors: Record<string, string>;
|
|
|
1048
1053
|
|
|
1049
1054
|
declare const socialMediaFields: FormField[];
|
|
1050
1055
|
|
|
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 };
|
|
1056
|
+
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, useGetUserStallholder, 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
|
@@ -1,84 +1,6 @@
|
|
|
1
1
|
import { Control, FieldErrors, UseFormHandleSubmit, UseFormReset, UseFormSetValue, UseFormWatch } from 'react-hook-form';
|
|
2
2
|
import * as _apollo_client from '@apollo/client';
|
|
3
3
|
|
|
4
|
-
declare enum EnumInviteStatus {
|
|
5
|
-
ACCEPTED = "Accepted",
|
|
6
|
-
COMPLETED = "Completed",
|
|
7
|
-
EXPIRED = "Expired",
|
|
8
|
-
NO_STATUS = "No_Status",
|
|
9
|
-
PENDING = "Pending",
|
|
10
|
-
REJECTED = "Rejected",
|
|
11
|
-
WAITING = "Waiting"
|
|
12
|
-
}
|
|
13
|
-
declare enum EnumPaymentMethod {
|
|
14
|
-
CASH = "cash",
|
|
15
|
-
EFTPOS = "eftpos",
|
|
16
|
-
BANK_TRANSFER = "bank_transfer",
|
|
17
|
-
PAYPAL = "paypal",
|
|
18
|
-
STRIPE = "stripe"
|
|
19
|
-
}
|
|
20
|
-
declare enum EnumResourceType {
|
|
21
|
-
MARKET = "market",
|
|
22
|
-
STALLHOLDER = "stallholder"
|
|
23
|
-
}
|
|
24
|
-
declare enum EnumRelationResource {
|
|
25
|
-
MARKET_INVITE_STALLHOLDER = "market_invite_stallholder",
|
|
26
|
-
STALLHOLDER_APPLICATION_TO_MARKET = "stallholder_application_to_market"
|
|
27
|
-
}
|
|
28
|
-
declare enum EnumNotification {
|
|
29
|
-
CREATED_MARKET = "created_market",
|
|
30
|
-
CREATED_STALLHOLDER = "created_stallholder",
|
|
31
|
-
NEW_CHAT_MESSAGE = "new_chat_message",
|
|
32
|
-
MARKET_INVITE_STALLHOLDER = "market_invite_stallholder",
|
|
33
|
-
STALLHOLDER_APPLICATION_TO_MARKET = "stallholder_application_to_market"
|
|
34
|
-
}
|
|
35
|
-
declare enum EnumResourceTypeIcon {
|
|
36
|
-
MARKET = "compass",
|
|
37
|
-
STALLHOLDER = "store"
|
|
38
|
-
}
|
|
39
|
-
declare enum EnumRegions {
|
|
40
|
-
Auckland = "Auckland",
|
|
41
|
-
BayOfPlenty = "Bay of Plenty",
|
|
42
|
-
Canterbury = "Canterbury",
|
|
43
|
-
Gisborne = "Gisborne",
|
|
44
|
-
HawkesBay = "Hawke's Bay",
|
|
45
|
-
ManawatuWanganui = "Manawatu-Wanganui",
|
|
46
|
-
Marlborough = "Marlborough",
|
|
47
|
-
Nelson = "Nelson",
|
|
48
|
-
Northland = "Northland",
|
|
49
|
-
Otago = "Otago",
|
|
50
|
-
Southland = "Southland",
|
|
51
|
-
Taranaki = "Taranaki",
|
|
52
|
-
Waikato = "Waikato",
|
|
53
|
-
Wellington = "Wellington"
|
|
54
|
-
}
|
|
55
|
-
declare enum ImageTypeEnum {
|
|
56
|
-
AVATAR = "avatar",
|
|
57
|
-
COVER = "cover",
|
|
58
|
-
IMAGE = "image",
|
|
59
|
-
LOGO = "logo"
|
|
60
|
-
}
|
|
61
|
-
declare enum EnumUserLicence {
|
|
62
|
-
ENTERPRISE_MARKET = "enterprise_market",
|
|
63
|
-
ENTERPRISE_STALLHOLDER = "enterprise_stallholder",
|
|
64
|
-
PRO_MARKET = "pro_market",
|
|
65
|
-
PRO_STALLHOLDER = "pro_stallholder",
|
|
66
|
-
STANDARD_MARKET = "standard_market",
|
|
67
|
-
STANDARD_STALLHOLDER = "standard_stallholder"
|
|
68
|
-
}
|
|
69
|
-
declare enum EnumUserRole {
|
|
70
|
-
ADMIN = "admin",
|
|
71
|
-
CUSTOMER = "customer"
|
|
72
|
-
}
|
|
73
|
-
declare enum EnumSocialMedia {
|
|
74
|
-
FACEBOOK = "facebook",
|
|
75
|
-
INSTAGRAM = "instagram",
|
|
76
|
-
TIKTOK = "tiktok",
|
|
77
|
-
TWITTER = "twitter",
|
|
78
|
-
WEBSITE = "website",
|
|
79
|
-
YOUTUBE = "youtube"
|
|
80
|
-
}
|
|
81
|
-
|
|
82
4
|
type LoginFormData = {
|
|
83
5
|
email: string;
|
|
84
6
|
password: string;
|
|
@@ -100,7 +22,6 @@ type RegisterFormData = {
|
|
|
100
22
|
lastName: string;
|
|
101
23
|
password: string;
|
|
102
24
|
preferredRegion: string;
|
|
103
|
-
role: EnumUserRole;
|
|
104
25
|
};
|
|
105
26
|
interface CreateRegisterFormData {
|
|
106
27
|
control: Control<RegisterFormData, any>;
|
|
@@ -185,6 +106,84 @@ interface ChatType {
|
|
|
185
106
|
updatedAt: string;
|
|
186
107
|
}
|
|
187
108
|
|
|
109
|
+
declare enum EnumInviteStatus {
|
|
110
|
+
ACCEPTED = "Accepted",
|
|
111
|
+
COMPLETED = "Completed",
|
|
112
|
+
EXPIRED = "Expired",
|
|
113
|
+
NO_STATUS = "No_Status",
|
|
114
|
+
PENDING = "Pending",
|
|
115
|
+
REJECTED = "Rejected",
|
|
116
|
+
WAITING = "Waiting"
|
|
117
|
+
}
|
|
118
|
+
declare enum EnumPaymentMethod {
|
|
119
|
+
CASH = "cash",
|
|
120
|
+
EFTPOS = "eftpos",
|
|
121
|
+
BANK_TRANSFER = "bank_transfer",
|
|
122
|
+
PAYPAL = "paypal",
|
|
123
|
+
STRIPE = "stripe"
|
|
124
|
+
}
|
|
125
|
+
declare enum EnumResourceType {
|
|
126
|
+
MARKET = "market",
|
|
127
|
+
STALLHOLDER = "stallholder"
|
|
128
|
+
}
|
|
129
|
+
declare enum EnumRelationResource {
|
|
130
|
+
MARKET_INVITE_STALLHOLDER = "market_invite_stallholder",
|
|
131
|
+
STALLHOLDER_APPLICATION_TO_MARKET = "stallholder_application_to_market"
|
|
132
|
+
}
|
|
133
|
+
declare enum EnumNotification {
|
|
134
|
+
CREATED_MARKET = "created_market",
|
|
135
|
+
CREATED_STALLHOLDER = "created_stallholder",
|
|
136
|
+
NEW_CHAT_MESSAGE = "new_chat_message",
|
|
137
|
+
MARKET_INVITE_STALLHOLDER = "market_invite_stallholder",
|
|
138
|
+
STALLHOLDER_APPLICATION_TO_MARKET = "stallholder_application_to_market"
|
|
139
|
+
}
|
|
140
|
+
declare enum EnumResourceTypeIcon {
|
|
141
|
+
MARKET = "compass",
|
|
142
|
+
STALLHOLDER = "store"
|
|
143
|
+
}
|
|
144
|
+
declare enum EnumRegions {
|
|
145
|
+
Auckland = "Auckland",
|
|
146
|
+
BayOfPlenty = "Bay of Plenty",
|
|
147
|
+
Canterbury = "Canterbury",
|
|
148
|
+
Gisborne = "Gisborne",
|
|
149
|
+
HawkesBay = "Hawke's Bay",
|
|
150
|
+
ManawatuWanganui = "Manawatu-Wanganui",
|
|
151
|
+
Marlborough = "Marlborough",
|
|
152
|
+
Nelson = "Nelson",
|
|
153
|
+
Northland = "Northland",
|
|
154
|
+
Otago = "Otago",
|
|
155
|
+
Southland = "Southland",
|
|
156
|
+
Taranaki = "Taranaki",
|
|
157
|
+
Waikato = "Waikato",
|
|
158
|
+
Wellington = "Wellington"
|
|
159
|
+
}
|
|
160
|
+
declare enum ImageTypeEnum {
|
|
161
|
+
AVATAR = "avatar",
|
|
162
|
+
COVER = "cover",
|
|
163
|
+
IMAGE = "image",
|
|
164
|
+
LOGO = "logo"
|
|
165
|
+
}
|
|
166
|
+
declare enum EnumUserLicence {
|
|
167
|
+
ENTERPRISE_MARKET = "enterprise_market",
|
|
168
|
+
ENTERPRISE_STALLHOLDER = "enterprise_stallholder",
|
|
169
|
+
PRO_MARKET = "pro_market",
|
|
170
|
+
PRO_STALLHOLDER = "pro_stallholder",
|
|
171
|
+
STANDARD_MARKET = "standard_market",
|
|
172
|
+
STANDARD_STALLHOLDER = "standard_stallholder"
|
|
173
|
+
}
|
|
174
|
+
declare enum EnumUserRole {
|
|
175
|
+
ADMIN = "admin",
|
|
176
|
+
CUSTOMER = "customer"
|
|
177
|
+
}
|
|
178
|
+
declare enum EnumSocialMedia {
|
|
179
|
+
FACEBOOK = "facebook",
|
|
180
|
+
INSTAGRAM = "instagram",
|
|
181
|
+
TIKTOK = "tiktok",
|
|
182
|
+
TWITTER = "twitter",
|
|
183
|
+
WEBSITE = "website",
|
|
184
|
+
YOUTUBE = "youtube"
|
|
185
|
+
}
|
|
186
|
+
|
|
188
187
|
type RelationLog = {
|
|
189
188
|
createdAt?: string;
|
|
190
189
|
updatedAt?: string;
|
|
@@ -970,6 +969,12 @@ declare const useGetUserMarkets: () => {
|
|
|
970
969
|
refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<any>>;
|
|
971
970
|
userMarkets: MarketType[];
|
|
972
971
|
};
|
|
972
|
+
declare const useGetUserStallholder: () => {
|
|
973
|
+
error: _apollo_client.ApolloError | undefined;
|
|
974
|
+
loading: boolean;
|
|
975
|
+
refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<any>>;
|
|
976
|
+
userStallholder: StallholderType;
|
|
977
|
+
};
|
|
973
978
|
declare const useGetUserFavourites: () => {
|
|
974
979
|
error: _apollo_client.ApolloError | undefined;
|
|
975
980
|
loading: boolean;
|
|
@@ -1048,4 +1053,4 @@ declare const categoryColors: Record<string, string>;
|
|
|
1048
1053
|
|
|
1049
1054
|
declare const socialMediaFields: FormField[];
|
|
1050
1055
|
|
|
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 };
|
|
1056
|
+
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, useGetUserStallholder, 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
|
@@ -47,22 +47,22 @@ var EnumResourceTypeIcon = /* @__PURE__ */ ((EnumResourceTypeIcon2) => {
|
|
|
47
47
|
EnumResourceTypeIcon2["STALLHOLDER"] = "store";
|
|
48
48
|
return EnumResourceTypeIcon2;
|
|
49
49
|
})(EnumResourceTypeIcon || {});
|
|
50
|
-
var EnumRegions = /* @__PURE__ */ ((
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
return
|
|
50
|
+
var EnumRegions = /* @__PURE__ */ ((EnumRegions2) => {
|
|
51
|
+
EnumRegions2["Auckland"] = "Auckland";
|
|
52
|
+
EnumRegions2["BayOfPlenty"] = "Bay of Plenty";
|
|
53
|
+
EnumRegions2["Canterbury"] = "Canterbury";
|
|
54
|
+
EnumRegions2["Gisborne"] = "Gisborne";
|
|
55
|
+
EnumRegions2["HawkesBay"] = "Hawke's Bay";
|
|
56
|
+
EnumRegions2["ManawatuWanganui"] = "Manawatu-Wanganui";
|
|
57
|
+
EnumRegions2["Marlborough"] = "Marlborough";
|
|
58
|
+
EnumRegions2["Nelson"] = "Nelson";
|
|
59
|
+
EnumRegions2["Northland"] = "Northland";
|
|
60
|
+
EnumRegions2["Otago"] = "Otago";
|
|
61
|
+
EnumRegions2["Southland"] = "Southland";
|
|
62
|
+
EnumRegions2["Taranaki"] = "Taranaki";
|
|
63
|
+
EnumRegions2["Waikato"] = "Waikato";
|
|
64
|
+
EnumRegions2["Wellington"] = "Wellington";
|
|
65
|
+
return EnumRegions2;
|
|
66
66
|
})(EnumRegions || {});
|
|
67
67
|
var ImageTypeEnum = /* @__PURE__ */ ((ImageTypeEnum2) => {
|
|
68
68
|
ImageTypeEnum2["AVATAR"] = "avatar";
|
|
@@ -360,16 +360,16 @@ var startTimeCannotBeInPastTest = yup.string().test(
|
|
|
360
360
|
}
|
|
361
361
|
);
|
|
362
362
|
var dateTimeSchema = yup.object().shape({
|
|
363
|
-
endDate: yup.string().concat(endDateNotInPastTest).concat(endDateAfterStartDateTest).required("End date is required"),
|
|
364
|
-
endTime: yup.string().concat(endTimeMustBeAfterStartTimeTest).required("End time is required"),
|
|
365
|
-
startDate: yup.string().concat(startDateNotInPastTest).required("Start date is required"),
|
|
366
|
-
startTime: yup.string().concat(startTimeCannotBeInPastTest).required("Start time is required")
|
|
363
|
+
endDate: yup.string().label("End Date").concat(endDateNotInPastTest).concat(endDateAfterStartDateTest).required("End date is required"),
|
|
364
|
+
endTime: yup.string().label("End Time").concat(endTimeMustBeAfterStartTimeTest).required("End time is required"),
|
|
365
|
+
startDate: yup.string().label("Start Date").concat(startDateNotInPastTest).required("Start date is required"),
|
|
366
|
+
startTime: yup.string().label("Start Time").concat(startTimeCannotBeInPastTest).required("Start time is required")
|
|
367
367
|
});
|
|
368
368
|
var siteTypesSchema = yup.object({
|
|
369
|
-
label: yup.string().trim().optional(),
|
|
369
|
+
label: yup.string().trim().label("Site Label").optional(),
|
|
370
370
|
price: yup.number().when("label", {
|
|
371
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(
|
|
372
|
+
then: (schema) => schema.typeError("Site price must be a number").label("Site Price").min(0.1, "Site price must be at least 0.1").required("Site price is required").test(
|
|
373
373
|
"no-leading-zeros",
|
|
374
374
|
"",
|
|
375
375
|
noLeadingZeros("Site price", { allowDecimal: true })
|
|
@@ -378,7 +378,7 @@ var siteTypesSchema = yup.object({
|
|
|
378
378
|
})
|
|
379
379
|
});
|
|
380
380
|
var dateTimeWithPriceSchema = dateTimeSchema.shape({
|
|
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(
|
|
381
|
+
marketPrice: yup.number().typeError("Market price must be a number").label("Market Price").min(0.1, "Market price must be at least 0.1").required("Market price is required").test(
|
|
382
382
|
"no-leading-zeros",
|
|
383
383
|
"",
|
|
384
384
|
noLeadingZeros("Market price", { allowDecimal: true })
|
|
@@ -386,40 +386,40 @@ var dateTimeWithPriceSchema = dateTimeSchema.shape({
|
|
|
386
386
|
siteTypes: yup.array().of(siteTypesSchema).nullable().optional()
|
|
387
387
|
});
|
|
388
388
|
var locationSchema = yup.object().shape({
|
|
389
|
-
city: yup.string().required("City is required"),
|
|
389
|
+
city: yup.string().label("City").required("City is required"),
|
|
390
390
|
coordinates: yup.array().of(yup.number().required("Coordinates must be numbers")).length(
|
|
391
391
|
2,
|
|
392
392
|
"Coordinates must contain exactly two numbers (longitude, latitude)"
|
|
393
393
|
).required("Coordinates are required"),
|
|
394
|
-
country: yup.string().required("Country is required"),
|
|
395
|
-
fullAddress: yup.string().required("Address is required"),
|
|
396
|
-
latitude: yup.number().required("Latitude is required"),
|
|
397
|
-
longitude: yup.number().required("Longitude is required"),
|
|
398
|
-
region: yup.string().required("Region is required"),
|
|
394
|
+
country: yup.string().label("Country").required("Country is required"),
|
|
395
|
+
fullAddress: yup.string().label("Address").required("Address is required"),
|
|
396
|
+
latitude: yup.number().label("Latitude").required("Latitude is required"),
|
|
397
|
+
longitude: yup.number().label("Longitude").required("Longitude is required"),
|
|
398
|
+
region: yup.string().label("Region").required("Region is required"),
|
|
399
399
|
type: yup.string().oneOf(["Point"], "Type must be 'Point'").default("Point").required("Type is required")
|
|
400
400
|
});
|
|
401
|
-
var emailSchema = yup.string().email("Invalid email address").required("Email is required").transform(
|
|
401
|
+
var emailSchema = yup.string().email("Invalid email address").required("Email is required").label("Email").transform(
|
|
402
402
|
(value) => typeof value === "string" ? value.toLowerCase() : value
|
|
403
403
|
);
|
|
404
|
-
var passwordSchema = yup.string().trim().min(8, "Password must be at least 8 characters long").required("Password is required");
|
|
404
|
+
var passwordSchema = yup.string().trim().label("Password").min(8, "Password must be at least 8 characters long").required("Password is required");
|
|
405
405
|
var socialMediaSchema = yup.object({
|
|
406
|
-
name: yup.mixed().oneOf(Object.values(EnumSocialMedia)).optional(),
|
|
406
|
+
name: yup.mixed().oneOf(Object.values(EnumSocialMedia)).label("Social Media Name").optional(),
|
|
407
407
|
link: yup.string().when("name", {
|
|
408
408
|
is: (name) => !!name,
|
|
409
409
|
// If name has a value
|
|
410
|
-
then: () => normalizedUrlTransform().required("Link is required when name is set").url("Link must be a valid URL"),
|
|
410
|
+
then: () => normalizedUrlTransform().required("Link is required when name is set").url("Link must be a valid URL").label("Social Media Link"),
|
|
411
411
|
otherwise: (schema) => schema.notRequired()
|
|
412
412
|
})
|
|
413
413
|
});
|
|
414
414
|
var globalResourceSchema = yup.object().shape({
|
|
415
415
|
active: yup.boolean().required("Active is required"),
|
|
416
416
|
cover: yup.object({
|
|
417
|
-
source: yup.string().required("Cover is required"),
|
|
418
|
-
title: yup.string().required("Cover is required")
|
|
417
|
+
source: yup.string().label("Cover").required("Cover is required"),
|
|
418
|
+
title: yup.string().label("Cover Title").required("Cover is required")
|
|
419
419
|
}),
|
|
420
|
-
description: yup.string().trim().min(3).required("Description is required"),
|
|
421
|
-
name: yup.string().trim().min(3).required("Name is required"),
|
|
422
|
-
region: yup.string().required("Region is required"),
|
|
420
|
+
description: yup.string().label("Description").trim().min(3).required("Description is required"),
|
|
421
|
+
name: yup.string().label("Name").trim().min(3).required("Name is required"),
|
|
422
|
+
region: yup.string().label("Region").required("Region is required"),
|
|
423
423
|
socialMedia: yup.array().of(socialMediaSchema).nullable().optional()
|
|
424
424
|
});
|
|
425
425
|
|
|
@@ -429,7 +429,7 @@ var nzBankAccountRegex = /^\d{2}-\d{4}-\d{7}-\d{2}$/;
|
|
|
429
429
|
var marketSchema = globalResourceSchema.shape({
|
|
430
430
|
dateTime: yup2.array().of(dateTimeSchema).required("DateTime is required"),
|
|
431
431
|
location: locationSchema,
|
|
432
|
-
provider: yup2.string().trim().min(3).required("Provider is required"),
|
|
432
|
+
provider: yup2.string().label("Provider").trim().min(3).required("Provider is required"),
|
|
433
433
|
tags: yup2.array().of(yup2.string().defined()).min(1, "Tags are required").required("Tags are required")
|
|
434
434
|
});
|
|
435
435
|
var paymentTargetSchema = yup2.object({
|
|
@@ -547,11 +547,10 @@ var loginSchema = yup5.object().shape({
|
|
|
547
547
|
});
|
|
548
548
|
var registerSchema = yup5.object().shape({
|
|
549
549
|
email: emailSchema,
|
|
550
|
-
firstName: yup5.string().required("First Name is required"),
|
|
551
|
-
lastName: yup5.string().required("Last Name is required"),
|
|
550
|
+
firstName: yup5.string().label("First Name").required("First Name is required"),
|
|
551
|
+
lastName: yup5.string().label("Last Name").required("Last Name is required"),
|
|
552
552
|
password: passwordSchema,
|
|
553
|
-
preferredRegion: yup5.string().required("Preferred Region is required")
|
|
554
|
-
role: yup5.mixed().oneOf(Object.values(EnumUserRole)).required("Role is required")
|
|
553
|
+
preferredRegion: yup5.string().label("Preferred Region").required("Preferred Region is required")
|
|
555
554
|
});
|
|
556
555
|
var requestPasswordResetSchema = yup5.object().shape({
|
|
557
556
|
email: emailSchema
|
|
@@ -1115,8 +1114,7 @@ var defaultValues3 = {
|
|
|
1115
1114
|
firstName: "",
|
|
1116
1115
|
lastName: "",
|
|
1117
1116
|
password: "",
|
|
1118
|
-
preferredRegion: ""
|
|
1119
|
-
role: "customer" /* CUSTOMER */
|
|
1117
|
+
preferredRegion: ""
|
|
1120
1118
|
};
|
|
1121
1119
|
function useRegisterForm() {
|
|
1122
1120
|
const {
|
|
@@ -1131,7 +1129,7 @@ function useRegisterForm() {
|
|
|
1131
1129
|
defaultValues: defaultValues3,
|
|
1132
1130
|
resolver: yupResolver7(registerSchema)
|
|
1133
1131
|
});
|
|
1134
|
-
const { email, firstName, lastName, password, preferredRegion
|
|
1132
|
+
const { email, firstName, lastName, password, preferredRegion } = getValues();
|
|
1135
1133
|
return {
|
|
1136
1134
|
control,
|
|
1137
1135
|
fields: {
|
|
@@ -1139,8 +1137,7 @@ function useRegisterForm() {
|
|
|
1139
1137
|
firstName,
|
|
1140
1138
|
lastName,
|
|
1141
1139
|
password,
|
|
1142
|
-
preferredRegion
|
|
1143
|
-
role
|
|
1140
|
+
preferredRegion
|
|
1144
1141
|
},
|
|
1145
1142
|
formState: { errors },
|
|
1146
1143
|
handleSubmit,
|
|
@@ -1356,15 +1353,10 @@ var LOGOUT_MUTATION = gql2`
|
|
|
1356
1353
|
var REFRESH_TOKEN_MUTATION = gql2`
|
|
1357
1354
|
mutation refreshToken($input: RefreshTokenInputType!) {
|
|
1358
1355
|
refreshToken(input: $input) {
|
|
1359
|
-
message
|
|
1360
1356
|
refreshToken
|
|
1361
1357
|
token
|
|
1362
|
-
user {
|
|
1363
|
-
...UserFields
|
|
1364
|
-
}
|
|
1365
1358
|
}
|
|
1366
1359
|
}
|
|
1367
|
-
${USER_FIELDS_FRAGMENT}
|
|
1368
1360
|
`;
|
|
1369
1361
|
var RESET_PASSWORD_MUTATION = gql2`
|
|
1370
1362
|
mutation resetPassword($input: ResetPasswordInputType!) {
|
|
@@ -1978,6 +1970,14 @@ var GET_USER_MARKETS = gql8`
|
|
|
1978
1970
|
}
|
|
1979
1971
|
${MARKET}
|
|
1980
1972
|
`;
|
|
1973
|
+
var GET_USER_STALLHOLDER = gql8`
|
|
1974
|
+
query getUserStallholder {
|
|
1975
|
+
userStallholder {
|
|
1976
|
+
...StallholderFields
|
|
1977
|
+
}
|
|
1978
|
+
}
|
|
1979
|
+
${STALLHOLDER}
|
|
1980
|
+
`;
|
|
1981
1981
|
var GET_USER_FAVOURITES = gql8`
|
|
1982
1982
|
query getUserFavourites {
|
|
1983
1983
|
userFavourites {
|
|
@@ -2887,6 +2887,13 @@ var useGetUserMarkets = () => {
|
|
|
2887
2887
|
const userMarkets = data?.userMarkets;
|
|
2888
2888
|
return { error, loading, refetch, userMarkets };
|
|
2889
2889
|
};
|
|
2890
|
+
var useGetUserStallholder = () => {
|
|
2891
|
+
const { loading, error, data, refetch } = useQuery5(GET_USER_STALLHOLDER, {
|
|
2892
|
+
fetchPolicy: "network-only"
|
|
2893
|
+
});
|
|
2894
|
+
const userStallholder = data?.userStallholder;
|
|
2895
|
+
return { error, loading, refetch, userStallholder };
|
|
2896
|
+
};
|
|
2890
2897
|
var useGetUserFavourites = () => {
|
|
2891
2898
|
const { loading, error, data, refetch } = useQuery5(GET_USER_FAVOURITES, {
|
|
2892
2899
|
fetchPolicy: "network-only"
|
|
@@ -3192,6 +3199,7 @@ var marketInfoPaymentTarget = [
|
|
|
3192
3199
|
},
|
|
3193
3200
|
{
|
|
3194
3201
|
helperText: "Account number *",
|
|
3202
|
+
keyboardType: "number-pad",
|
|
3195
3203
|
name: "accountNumber",
|
|
3196
3204
|
placeholder: "Account number"
|
|
3197
3205
|
},
|
|
@@ -3981,6 +3989,7 @@ export {
|
|
|
3981
3989
|
useGetUserFavourites,
|
|
3982
3990
|
useGetUserMarkets,
|
|
3983
3991
|
useGetUserNotifications,
|
|
3992
|
+
useGetUserStallholder,
|
|
3984
3993
|
useGetUsers,
|
|
3985
3994
|
useLocationSearch,
|
|
3986
3995
|
useLogin,
|