@timardex/cluemart-shared 1.0.14 → 1.0.16
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-CdcH8nqw.d.mts +84 -0
- package/dist/auth-TM_XttY3.d.ts +84 -0
- package/dist/chat-NGx5Emrr.d.mts +27 -0
- package/dist/chat-NGx5Emrr.d.ts +27 -0
- package/dist/chunk-K5NK2CK5.mjs +133 -0
- package/dist/chunk-K5NK2CK5.mjs.map +1 -0
- package/dist/chunk-L2H5WFGC.mjs +100 -0
- package/dist/chunk-L2H5WFGC.mjs.map +1 -0
- package/dist/enums/index.cjs +134 -0
- package/dist/enums/index.cjs.map +1 -0
- package/dist/enums/index.d.mts +75 -0
- package/dist/enums/index.d.ts +75 -0
- package/dist/enums/index.mjs +27 -0
- package/dist/enums/index.mjs.map +1 -0
- package/dist/formFields/index.cjs +888 -0
- package/dist/formFields/index.cjs.map +1 -0
- package/dist/formFields/index.d.mts +60 -0
- package/dist/formFields/index.d.ts +60 -0
- package/dist/formFields/index.mjs +754 -0
- package/dist/formFields/index.mjs.map +1 -0
- package/dist/global-B7gB8cvC.d.ts +338 -0
- package/dist/global-B8kYikwQ.d.mts +338 -0
- package/dist/graphql/index.cjs +1634 -0
- package/dist/graphql/index.cjs.map +1 -0
- package/dist/graphql/index.d.mts +299 -0
- package/dist/graphql/index.d.ts +299 -0
- package/dist/graphql/index.mjs +1558 -0
- package/dist/graphql/index.mjs.map +1 -0
- package/dist/hooks/index.cjs +1090 -0
- package/dist/hooks/index.cjs.map +1 -0
- package/dist/hooks/index.d.mts +78 -0
- package/dist/hooks/index.d.ts +78 -0
- package/dist/hooks/index.mjs +970 -0
- package/dist/hooks/index.mjs.map +1 -0
- package/dist/index.cjs +89 -83
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.mts +16 -299
- package/dist/index.d.ts +16 -299
- package/dist/index.mjs +87 -60
- package/dist/index.mjs.map +1 -1
- package/dist/types/index.cjs +19 -0
- package/dist/types/index.cjs.map +1 -0
- package/dist/types/index.d.mts +12 -0
- package/dist/types/index.d.ts +12 -0
- package/dist/types/index.mjs +1 -0
- package/dist/types/index.mjs.map +1 -0
- package/dist/utils/index.cjs +215 -0
- package/dist/utils/index.cjs.map +1 -0
- package/dist/utils/index.d.mts +66 -0
- package/dist/utils/index.d.ts +66 -0
- package/dist/utils/index.mjs +38 -0
- package/dist/utils/index.mjs.map +1 -0
- package/package.json +37 -4
- package/dist/index.js.map +0 -1
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
import { EnumInviteStatus, EnumResourceType, EnumRelationResource, EnumPaymentMethod, EnumRejectionPolicy, EnumUserLicence, EnumUserRole, EnumNotification } from './enums/index.mjs';
|
|
2
|
+
import { Control, FieldErrors, UseFormHandleSubmit, UseFormReset, UseFormSetValue, UseFormWatch } from 'react-hook-form';
|
|
3
|
+
|
|
4
|
+
type RelationLog = {
|
|
5
|
+
createdAt?: string;
|
|
6
|
+
updatedAt?: string;
|
|
7
|
+
updatedBy: {
|
|
8
|
+
resourceId: string;
|
|
9
|
+
resourceName: string;
|
|
10
|
+
resourceType: EnumResourceType;
|
|
11
|
+
startDate: string;
|
|
12
|
+
toStatus: EnumInviteStatus;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
type RelationDate = {
|
|
16
|
+
lastUpdateBy: string;
|
|
17
|
+
marketPrice: number;
|
|
18
|
+
startDate: string;
|
|
19
|
+
status: EnumInviteStatus;
|
|
20
|
+
};
|
|
21
|
+
interface RelationType {
|
|
22
|
+
_id?: string;
|
|
23
|
+
apiMessage?: string;
|
|
24
|
+
createdAt?: string;
|
|
25
|
+
lastUpdateBy: EnumResourceType;
|
|
26
|
+
marketId: string;
|
|
27
|
+
relationDates: RelationDate[];
|
|
28
|
+
relationLogs?: RelationLog[] | null;
|
|
29
|
+
relationType: EnumRelationResource;
|
|
30
|
+
stallholderId: string;
|
|
31
|
+
updatedAt?: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
type DateTimeWithPrice = DateTimeType & {
|
|
35
|
+
marketPrice: number;
|
|
36
|
+
};
|
|
37
|
+
type StallApplicationInfoType = {
|
|
38
|
+
applicationDeadlineHours: number;
|
|
39
|
+
paymentDueHours: number;
|
|
40
|
+
paymentMethod: EnumPaymentMethod;
|
|
41
|
+
paymentTarget: {
|
|
42
|
+
accountHolderName?: string;
|
|
43
|
+
accountNumber?: string;
|
|
44
|
+
link?: string;
|
|
45
|
+
};
|
|
46
|
+
rejectionPolicy: EnumRejectionPolicy;
|
|
47
|
+
stallCapacity: number;
|
|
48
|
+
};
|
|
49
|
+
interface MarketFormData extends BaseResourceTypeFormData {
|
|
50
|
+
dateTime: DateTimeWithPrice[];
|
|
51
|
+
location: LocationType;
|
|
52
|
+
provider: string;
|
|
53
|
+
stallApplicationInfo: StallApplicationInfoType;
|
|
54
|
+
tags?: string[] | null;
|
|
55
|
+
}
|
|
56
|
+
interface CreateMarketFormData {
|
|
57
|
+
control: Control<MarketFormData, any>;
|
|
58
|
+
fields: MarketFormData;
|
|
59
|
+
formState: {
|
|
60
|
+
errors: FieldErrors<MarketFormData>;
|
|
61
|
+
};
|
|
62
|
+
handleSubmit: UseFormHandleSubmit<MarketFormData, any>;
|
|
63
|
+
reset: UseFormReset<MarketFormData>;
|
|
64
|
+
setValue: UseFormSetValue<MarketFormData>;
|
|
65
|
+
watch: UseFormWatch<MarketFormData>;
|
|
66
|
+
}
|
|
67
|
+
interface MarketType extends BaseResourceType {
|
|
68
|
+
dateTime: MarketFormData["dateTime"];
|
|
69
|
+
location: MarketFormData["location"];
|
|
70
|
+
provider: string;
|
|
71
|
+
stallApplicationInfo: MarketFormData["stallApplicationInfo"];
|
|
72
|
+
tags: string[] | null;
|
|
73
|
+
}
|
|
74
|
+
interface MarketWithConnectionDatesType extends MarketType {
|
|
75
|
+
relationDates: RelationDate[] | undefined;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
type StallholderLocation = {
|
|
79
|
+
dateTime: Nullable<DateTimeType> | null;
|
|
80
|
+
description?: string | null;
|
|
81
|
+
location: Nullable<LocationType> | null;
|
|
82
|
+
resourceId?: MapMultiLocation["resourceId"];
|
|
83
|
+
resourceName?: MapMultiLocation["resourceName"];
|
|
84
|
+
resourceType?: MapMultiLocation["resourceType"];
|
|
85
|
+
};
|
|
86
|
+
interface StallholderFormData extends BaseResourceTypeFormData {
|
|
87
|
+
categories: Category[];
|
|
88
|
+
locations?: StallholderLocation[] | null;
|
|
89
|
+
multiLocation: boolean;
|
|
90
|
+
products: string[];
|
|
91
|
+
specialities?: string[] | null;
|
|
92
|
+
}
|
|
93
|
+
interface CreateStallholderFormData {
|
|
94
|
+
control: Control<StallholderFormData, any>;
|
|
95
|
+
fields: StallholderFormData;
|
|
96
|
+
formState: {
|
|
97
|
+
errors: FieldErrors<StallholderFormData>;
|
|
98
|
+
};
|
|
99
|
+
handleSubmit: UseFormHandleSubmit<StallholderFormData, any>;
|
|
100
|
+
reset: UseFormReset<StallholderFormData>;
|
|
101
|
+
setValue: UseFormSetValue<StallholderFormData>;
|
|
102
|
+
watch: UseFormWatch<StallholderFormData>;
|
|
103
|
+
}
|
|
104
|
+
type StallholderAttributes = {
|
|
105
|
+
details?: string | null;
|
|
106
|
+
isRequired: boolean;
|
|
107
|
+
};
|
|
108
|
+
type StallholderApplyFormFormData = {
|
|
109
|
+
_id?: string;
|
|
110
|
+
active: boolean;
|
|
111
|
+
electricity: StallholderAttributes;
|
|
112
|
+
foodSafetyGradeFiles?: string[] | null;
|
|
113
|
+
foodSafetyGradeFilesUpload?: string[] | null;
|
|
114
|
+
gazebo: StallholderAttributes;
|
|
115
|
+
packaging: string[];
|
|
116
|
+
paymentMethod: EnumPaymentMethod;
|
|
117
|
+
priceRange: {
|
|
118
|
+
max: number;
|
|
119
|
+
min: number;
|
|
120
|
+
};
|
|
121
|
+
producedIn: string[];
|
|
122
|
+
stallSize: {
|
|
123
|
+
depth: number;
|
|
124
|
+
width: number;
|
|
125
|
+
};
|
|
126
|
+
table: StallholderAttributes;
|
|
127
|
+
};
|
|
128
|
+
interface CreateStallholderApplyFormFormData {
|
|
129
|
+
control: Control<StallholderApplyFormFormData, any>;
|
|
130
|
+
fields: StallholderApplyFormFormData;
|
|
131
|
+
formState: {
|
|
132
|
+
errors: FieldErrors<StallholderApplyFormFormData>;
|
|
133
|
+
};
|
|
134
|
+
handleSubmit: UseFormHandleSubmit<StallholderApplyFormFormData, any>;
|
|
135
|
+
reset: UseFormReset<StallholderApplyFormFormData>;
|
|
136
|
+
setValue: UseFormSetValue<StallholderApplyFormFormData>;
|
|
137
|
+
watch: UseFormWatch<StallholderApplyFormFormData>;
|
|
138
|
+
}
|
|
139
|
+
interface StallholderType extends BaseResourceType {
|
|
140
|
+
applyFormId: string;
|
|
141
|
+
categories: StallholderFormData["categories"];
|
|
142
|
+
locations: StallholderLocation[] | null;
|
|
143
|
+
multiLocation: boolean;
|
|
144
|
+
products: StallholderFormData["products"];
|
|
145
|
+
specialities: string[] | null;
|
|
146
|
+
}
|
|
147
|
+
interface StallholderApplyFormType {
|
|
148
|
+
_id: string;
|
|
149
|
+
active: boolean;
|
|
150
|
+
electricity: {
|
|
151
|
+
details: string | null;
|
|
152
|
+
isRequired: boolean;
|
|
153
|
+
};
|
|
154
|
+
foodSafetyGradeFiles: string[] | null;
|
|
155
|
+
gazebo: {
|
|
156
|
+
details: string | null;
|
|
157
|
+
isRequired: boolean;
|
|
158
|
+
};
|
|
159
|
+
packaging: string[];
|
|
160
|
+
paymentMethod: EnumPaymentMethod;
|
|
161
|
+
priceRange: {
|
|
162
|
+
max: number;
|
|
163
|
+
min: number;
|
|
164
|
+
};
|
|
165
|
+
producedIn: string[];
|
|
166
|
+
stallholderId: string;
|
|
167
|
+
stallSize: {
|
|
168
|
+
depth: number;
|
|
169
|
+
width: number;
|
|
170
|
+
};
|
|
171
|
+
table: {
|
|
172
|
+
details: string | null;
|
|
173
|
+
isRequired: boolean;
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
interface SatllholderWithConnectionDatesType extends StallholderType {
|
|
177
|
+
relationDates: RelationDate[] | undefined;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
type UserFormData = {
|
|
181
|
+
_id?: string;
|
|
182
|
+
active: boolean;
|
|
183
|
+
avatar?: ResourceImageType | null;
|
|
184
|
+
avatarUpload?: ResourceImageType | null;
|
|
185
|
+
confirmPassword: string;
|
|
186
|
+
email: string;
|
|
187
|
+
firstName: string;
|
|
188
|
+
lastName: string;
|
|
189
|
+
password: string;
|
|
190
|
+
preferredRegion: string;
|
|
191
|
+
role: EnumUserRole;
|
|
192
|
+
};
|
|
193
|
+
interface CreateUserFormData {
|
|
194
|
+
control: Control<UserFormData, any>;
|
|
195
|
+
fields: UserFormData;
|
|
196
|
+
formState: {
|
|
197
|
+
errors: FieldErrors<UserFormData>;
|
|
198
|
+
};
|
|
199
|
+
handleSubmit: UseFormHandleSubmit<UserFormData, any>;
|
|
200
|
+
reset: UseFormReset<UserFormData>;
|
|
201
|
+
setValue: UseFormSetValue<UserFormData>;
|
|
202
|
+
watch: UseFormWatch<UserFormData>;
|
|
203
|
+
}
|
|
204
|
+
interface UserType {
|
|
205
|
+
_id: string;
|
|
206
|
+
active: boolean;
|
|
207
|
+
avatar: ResourceImageType | null;
|
|
208
|
+
createdAt: string;
|
|
209
|
+
email: string;
|
|
210
|
+
favourites: {
|
|
211
|
+
markets: string[];
|
|
212
|
+
stallholders: string[];
|
|
213
|
+
};
|
|
214
|
+
firstName: string;
|
|
215
|
+
lastName: string;
|
|
216
|
+
licences: EnumUserLicence[] | null;
|
|
217
|
+
markets: string[] | null;
|
|
218
|
+
password: string;
|
|
219
|
+
preferredRegion: string;
|
|
220
|
+
role: EnumUserRole;
|
|
221
|
+
stallholder: string | null;
|
|
222
|
+
updatedAt: string;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
type Nullable<T> = {
|
|
226
|
+
[K in keyof T]: T[K] | null | undefined;
|
|
227
|
+
};
|
|
228
|
+
type ResourceImageType = {
|
|
229
|
+
source: string;
|
|
230
|
+
title: string;
|
|
231
|
+
};
|
|
232
|
+
interface BaseResourceTypeFormData {
|
|
233
|
+
_id?: string;
|
|
234
|
+
active: boolean;
|
|
235
|
+
cover: ResourceImageType;
|
|
236
|
+
coverUpload?: ResourceImageType | null;
|
|
237
|
+
description: string;
|
|
238
|
+
images?: ResourceImageType[] | null;
|
|
239
|
+
imagesUpload?: ResourceImageType[] | null;
|
|
240
|
+
logo?: ResourceImageType | null;
|
|
241
|
+
logoUpload?: ResourceImageType | null;
|
|
242
|
+
name: string;
|
|
243
|
+
promoCode?: string | null;
|
|
244
|
+
region: string;
|
|
245
|
+
}
|
|
246
|
+
interface BaseResourceType {
|
|
247
|
+
_id: string;
|
|
248
|
+
active: boolean;
|
|
249
|
+
cover: ResourceImageType;
|
|
250
|
+
createdAt: string;
|
|
251
|
+
description: string;
|
|
252
|
+
images: ResourceImageType[] | null;
|
|
253
|
+
logo: ResourceImageType | null;
|
|
254
|
+
name: string;
|
|
255
|
+
owner: Pick<UserType, "_id" | "email" | "licences">;
|
|
256
|
+
promoCode: string | null;
|
|
257
|
+
region: string;
|
|
258
|
+
relationIds: string[] | null;
|
|
259
|
+
updatedAt: string;
|
|
260
|
+
}
|
|
261
|
+
type LocationType = {
|
|
262
|
+
city: string;
|
|
263
|
+
coordinates: number[];
|
|
264
|
+
country: string;
|
|
265
|
+
fullAddress: string;
|
|
266
|
+
latitude: number;
|
|
267
|
+
longitude: number;
|
|
268
|
+
region: string;
|
|
269
|
+
type: "Point";
|
|
270
|
+
};
|
|
271
|
+
type DateTimeType = {
|
|
272
|
+
endDate: string;
|
|
273
|
+
endTime: string;
|
|
274
|
+
startDate: string;
|
|
275
|
+
startTime: string;
|
|
276
|
+
};
|
|
277
|
+
type Region = {
|
|
278
|
+
latitude: number;
|
|
279
|
+
latitudeDelta: number;
|
|
280
|
+
longitude: number;
|
|
281
|
+
longitudeDelta: number;
|
|
282
|
+
};
|
|
283
|
+
type GeocodeLocation = Pick<LocationType, "latitude" | "longitude">;
|
|
284
|
+
type MapMultiLocation = {
|
|
285
|
+
dateTime: DateTimeType | null;
|
|
286
|
+
location: LocationType | null;
|
|
287
|
+
resourceId?: string;
|
|
288
|
+
resourceName?: string;
|
|
289
|
+
resourceType?: EnumResourceType;
|
|
290
|
+
};
|
|
291
|
+
interface FormField {
|
|
292
|
+
disabled?: boolean;
|
|
293
|
+
helperText?: string;
|
|
294
|
+
isTextArea?: boolean;
|
|
295
|
+
keyboardType?: "default" | "email-address" | "number-pad";
|
|
296
|
+
name: string;
|
|
297
|
+
placeholder: string;
|
|
298
|
+
secureTextEntry?: boolean;
|
|
299
|
+
}
|
|
300
|
+
interface FormDateField {
|
|
301
|
+
dateMode: "date" | "time";
|
|
302
|
+
helperText?: string;
|
|
303
|
+
name: "endDate" | "endTime" | "startDate" | "startTime";
|
|
304
|
+
placeholder: string;
|
|
305
|
+
}
|
|
306
|
+
interface Subcategory {
|
|
307
|
+
id: string;
|
|
308
|
+
name: string;
|
|
309
|
+
items?: string[] | null;
|
|
310
|
+
}
|
|
311
|
+
interface Category {
|
|
312
|
+
id: string;
|
|
313
|
+
name: string;
|
|
314
|
+
subcategories?: Subcategory[] | null;
|
|
315
|
+
}
|
|
316
|
+
type OptionItem = {
|
|
317
|
+
value: string;
|
|
318
|
+
label: string;
|
|
319
|
+
};
|
|
320
|
+
type ImageObjectType = {
|
|
321
|
+
uri: string;
|
|
322
|
+
type: string;
|
|
323
|
+
name: string;
|
|
324
|
+
};
|
|
325
|
+
type NotificationType = {
|
|
326
|
+
createdBy: string;
|
|
327
|
+
important: boolean;
|
|
328
|
+
message: string;
|
|
329
|
+
notifyUser: string | null;
|
|
330
|
+
resourceId: string;
|
|
331
|
+
resourceType: EnumNotification;
|
|
332
|
+
};
|
|
333
|
+
interface ResourceConnectionsType {
|
|
334
|
+
markets: MarketWithConnectionDatesType[] | null;
|
|
335
|
+
stallholders: SatllholderWithConnectionDatesType[] | null;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
export type { BaseResourceTypeFormData as B, Category as C, DateTimeType as D, FormField as F, GeocodeLocation as G, ImageObjectType as I, LocationType as L, MapMultiLocation as M, Nullable as N, OptionItem as O, ResourceImageType as R, Subcategory as S, UserFormData as U, BaseResourceType as a, Region as b, FormDateField as c, NotificationType as d, ResourceConnectionsType as e, DateTimeWithPrice as f, StallApplicationInfoType as g, MarketFormData as h, CreateMarketFormData as i, MarketType as j, MarketWithConnectionDatesType as k, RelationLog as l, RelationDate as m, RelationType as n, StallholderLocation as o, StallholderFormData as p, CreateStallholderFormData as q, StallholderAttributes as r, StallholderApplyFormFormData as s, CreateStallholderApplyFormFormData as t, StallholderType as u, StallholderApplyFormType as v, SatllholderWithConnectionDatesType as w, CreateUserFormData as x, UserType as y };
|