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