@ndrs92/contracts 0.0.0-stage → 0.2.0
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/cjs/business/business.owner.schema.d.ts +605 -0
- package/dist/cjs/business/business.owner.schema.js +68 -0
- package/dist/cjs/business/business.owner.schema.js.map +1 -0
- package/dist/cjs/business/business.owner.types.d.ts +5 -0
- package/dist/cjs/business/business.owner.types.js +3 -0
- package/dist/cjs/business/business.owner.types.js.map +1 -0
- package/dist/cjs/business/business.request.schema.d.ts +322 -0
- package/dist/cjs/business/business.request.schema.js +111 -0
- package/dist/cjs/business/business.request.schema.js.map +1 -0
- package/dist/cjs/business/business.request.types.d.ts +6 -0
- package/dist/cjs/business/business.request.types.js +3 -0
- package/dist/cjs/business/business.request.types.js.map +1 -0
- package/dist/cjs/business/business.schema.d.ts +427 -0
- package/dist/cjs/business/business.schema.js +211 -0
- package/dist/cjs/business/business.schema.js.map +1 -0
- package/dist/cjs/business/business.types.d.ts +3 -0
- package/dist/cjs/business/business.types.js +3 -0
- package/dist/cjs/business/business.types.js.map +1 -0
- package/dist/cjs/event/event.schema.d.ts +101 -0
- package/dist/cjs/event/event.schema.js +58 -0
- package/dist/cjs/event/event.schema.js.map +1 -0
- package/dist/cjs/event/event.types.d.ts +4 -0
- package/dist/cjs/event/event.types.js +3 -0
- package/dist/cjs/event/event.types.js.map +1 -0
- package/dist/cjs/index.d.ts +8 -0
- package/dist/cjs/index.js +30 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/package.json +3 -0
- package/dist/esm/business/business.owner.schema.d.ts +605 -0
- package/dist/esm/business/business.owner.schema.js +65 -0
- package/dist/esm/business/business.owner.schema.js.map +1 -0
- package/dist/esm/business/business.owner.types.d.ts +5 -0
- package/dist/esm/business/business.owner.types.js +2 -0
- package/dist/esm/business/business.owner.types.js.map +1 -0
- package/dist/esm/business/business.request.schema.d.ts +322 -0
- package/dist/esm/business/business.request.schema.js +108 -0
- package/dist/esm/business/business.request.schema.js.map +1 -0
- package/dist/esm/business/business.request.types.d.ts +6 -0
- package/dist/esm/business/business.request.types.js +2 -0
- package/dist/esm/business/business.request.types.js.map +1 -0
- package/dist/esm/business/business.schema.d.ts +427 -0
- package/dist/esm/business/business.schema.js +208 -0
- package/dist/esm/business/business.schema.js.map +1 -0
- package/dist/esm/business/business.types.d.ts +3 -0
- package/dist/esm/business/business.types.js +2 -0
- package/dist/esm/business/business.types.js.map +1 -0
- package/dist/esm/event/event.schema.d.ts +101 -0
- package/dist/esm/event/event.schema.js +55 -0
- package/dist/esm/event/event.schema.js.map +1 -0
- package/dist/esm/event/event.types.d.ts +4 -0
- package/dist/esm/event/event.types.js +2 -0
- package/dist/esm/event/event.types.js.map +1 -0
- package/dist/esm/index.d.ts +8 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/index.js.map +1 -0
- package/package.json +33 -6
- package/README.md +0 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"business.owner.types.js","sourceRoot":"","sources":["../../../src/business/business.owner.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** Wire-format payload accepted by POST /business. */
|
|
3
|
+
export declare const CreateBusinessRequestSchema: z.ZodObject<{
|
|
4
|
+
name: z.ZodString;
|
|
5
|
+
description: z.ZodOptional<z.ZodString>;
|
|
6
|
+
providerType: z.ZodDefault<z.ZodEnum<{
|
|
7
|
+
community: "community";
|
|
8
|
+
business: "business";
|
|
9
|
+
}>>;
|
|
10
|
+
category: z.ZodEnum<{
|
|
11
|
+
food: "food";
|
|
12
|
+
entertainment: "entertainment";
|
|
13
|
+
services: "services";
|
|
14
|
+
shopping: "shopping";
|
|
15
|
+
education: "education";
|
|
16
|
+
health: "health";
|
|
17
|
+
}>;
|
|
18
|
+
subCategory: z.ZodOptional<z.ZodEnum<{
|
|
19
|
+
restaurant: "restaurant";
|
|
20
|
+
cafe: "cafe";
|
|
21
|
+
bar: "bar";
|
|
22
|
+
bakery: "bakery";
|
|
23
|
+
catering: "catering";
|
|
24
|
+
club: "club";
|
|
25
|
+
event_venue: "event_venue";
|
|
26
|
+
event_organizer: "event_organizer";
|
|
27
|
+
cultural_center: "cultural_center";
|
|
28
|
+
dance_school: "dance_school";
|
|
29
|
+
beauty_salon: "beauty_salon";
|
|
30
|
+
barbershop: "barbershop";
|
|
31
|
+
repair: "repair";
|
|
32
|
+
agency: "agency";
|
|
33
|
+
translator: "translator";
|
|
34
|
+
photographer: "photographer";
|
|
35
|
+
freelancer: "freelancer";
|
|
36
|
+
latin_store: "latin_store";
|
|
37
|
+
supermarket: "supermarket";
|
|
38
|
+
clothing: "clothing";
|
|
39
|
+
product_seller: "product_seller";
|
|
40
|
+
language_school: "language_school";
|
|
41
|
+
academy: "academy";
|
|
42
|
+
private_teacher: "private_teacher";
|
|
43
|
+
clinic: "clinic";
|
|
44
|
+
gym: "gym";
|
|
45
|
+
}>>;
|
|
46
|
+
profile: z.ZodDefault<z.ZodObject<{
|
|
47
|
+
headline: z.ZodOptional<z.ZodString>;
|
|
48
|
+
services: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
49
|
+
specialties: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
50
|
+
languages: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
51
|
+
serviceArea: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
52
|
+
availability: z.ZodOptional<z.ZodObject<{
|
|
53
|
+
type: z.ZodEnum<{
|
|
54
|
+
appointment: "appointment";
|
|
55
|
+
walk_in: "walk_in";
|
|
56
|
+
online: "online";
|
|
57
|
+
flexible: "flexible";
|
|
58
|
+
}>;
|
|
59
|
+
description: z.ZodOptional<z.ZodString>;
|
|
60
|
+
}, z.core.$strip>>;
|
|
61
|
+
openingHours: z.ZodOptional<z.ZodObject<{
|
|
62
|
+
monday: z.ZodObject<{
|
|
63
|
+
isOpen: z.ZodBoolean;
|
|
64
|
+
intervals: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
65
|
+
open: z.ZodString;
|
|
66
|
+
close: z.ZodString;
|
|
67
|
+
}, z.core.$strip>>>;
|
|
68
|
+
}, z.core.$strip>;
|
|
69
|
+
tuesday: z.ZodObject<{
|
|
70
|
+
isOpen: z.ZodBoolean;
|
|
71
|
+
intervals: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
72
|
+
open: z.ZodString;
|
|
73
|
+
close: z.ZodString;
|
|
74
|
+
}, z.core.$strip>>>;
|
|
75
|
+
}, z.core.$strip>;
|
|
76
|
+
wednesday: z.ZodObject<{
|
|
77
|
+
isOpen: z.ZodBoolean;
|
|
78
|
+
intervals: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
79
|
+
open: z.ZodString;
|
|
80
|
+
close: z.ZodString;
|
|
81
|
+
}, z.core.$strip>>>;
|
|
82
|
+
}, z.core.$strip>;
|
|
83
|
+
thursday: z.ZodObject<{
|
|
84
|
+
isOpen: z.ZodBoolean;
|
|
85
|
+
intervals: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
86
|
+
open: z.ZodString;
|
|
87
|
+
close: z.ZodString;
|
|
88
|
+
}, z.core.$strip>>>;
|
|
89
|
+
}, z.core.$strip>;
|
|
90
|
+
friday: z.ZodObject<{
|
|
91
|
+
isOpen: z.ZodBoolean;
|
|
92
|
+
intervals: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
93
|
+
open: z.ZodString;
|
|
94
|
+
close: z.ZodString;
|
|
95
|
+
}, z.core.$strip>>>;
|
|
96
|
+
}, z.core.$strip>;
|
|
97
|
+
saturday: z.ZodObject<{
|
|
98
|
+
isOpen: z.ZodBoolean;
|
|
99
|
+
intervals: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
100
|
+
open: z.ZodString;
|
|
101
|
+
close: z.ZodString;
|
|
102
|
+
}, z.core.$strip>>>;
|
|
103
|
+
}, z.core.$strip>;
|
|
104
|
+
sunday: z.ZodObject<{
|
|
105
|
+
isOpen: z.ZodBoolean;
|
|
106
|
+
intervals: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
107
|
+
open: z.ZodString;
|
|
108
|
+
close: z.ZodString;
|
|
109
|
+
}, z.core.$strip>>>;
|
|
110
|
+
}, z.core.$strip>;
|
|
111
|
+
}, z.core.$strip>>;
|
|
112
|
+
pricing: z.ZodOptional<z.ZodObject<{
|
|
113
|
+
type: z.ZodEnum<{
|
|
114
|
+
fixed: "fixed";
|
|
115
|
+
hourly: "hourly";
|
|
116
|
+
starting_at: "starting_at";
|
|
117
|
+
range: "range";
|
|
118
|
+
}>;
|
|
119
|
+
currency: z.ZodDefault<z.ZodEnum<{
|
|
120
|
+
EUR: "EUR";
|
|
121
|
+
}>>;
|
|
122
|
+
amount: z.ZodOptional<z.ZodNumber>;
|
|
123
|
+
minAmount: z.ZodOptional<z.ZodNumber>;
|
|
124
|
+
maxAmount: z.ZodOptional<z.ZodNumber>;
|
|
125
|
+
description: z.ZodOptional<z.ZodString>;
|
|
126
|
+
}, z.core.$strip>>;
|
|
127
|
+
}, z.core.$strip>>;
|
|
128
|
+
images: z.ZodObject<{
|
|
129
|
+
profile: z.ZodString;
|
|
130
|
+
cover: z.ZodOptional<z.ZodString>;
|
|
131
|
+
gallery: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
132
|
+
}, z.core.$strip>;
|
|
133
|
+
documents: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
134
|
+
type: z.ZodEnum<{
|
|
135
|
+
menu: "menu";
|
|
136
|
+
catalog: "catalog";
|
|
137
|
+
portfolio: "portfolio";
|
|
138
|
+
brochure: "brochure";
|
|
139
|
+
}>;
|
|
140
|
+
url: z.ZodString;
|
|
141
|
+
name: z.ZodOptional<z.ZodString>;
|
|
142
|
+
}, z.core.$strip>>>;
|
|
143
|
+
location: z.ZodObject<{
|
|
144
|
+
address: z.ZodString;
|
|
145
|
+
cityId: z.ZodString;
|
|
146
|
+
country: z.ZodString;
|
|
147
|
+
latitude: z.ZodNumber;
|
|
148
|
+
longitude: z.ZodNumber;
|
|
149
|
+
}, z.core.$strip>;
|
|
150
|
+
contact: z.ZodDefault<z.ZodObject<{
|
|
151
|
+
email: z.ZodOptional<z.ZodString>;
|
|
152
|
+
phone: z.ZodOptional<z.ZodString>;
|
|
153
|
+
website: z.ZodOptional<z.ZodString>;
|
|
154
|
+
instagram: z.ZodOptional<z.ZodString>;
|
|
155
|
+
whatsapp: z.ZodOptional<z.ZodString>;
|
|
156
|
+
}, z.core.$strip>>;
|
|
157
|
+
community: z.ZodDefault<z.ZodObject<{
|
|
158
|
+
isLatinoOwned: z.ZodDefault<z.ZodBoolean>;
|
|
159
|
+
countryOfOrigin: z.ZodOptional<z.ZodString>;
|
|
160
|
+
}, z.core.$strip>>;
|
|
161
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
162
|
+
}, z.core.$strip>;
|
|
163
|
+
export declare const UpdateBusinessRequestSchema: z.ZodObject<{
|
|
164
|
+
name: z.ZodOptional<z.ZodString>;
|
|
165
|
+
description: z.ZodOptional<z.ZodString>;
|
|
166
|
+
providerType: z.ZodOptional<z.ZodEnum<{
|
|
167
|
+
community: "community";
|
|
168
|
+
business: "business";
|
|
169
|
+
}>>;
|
|
170
|
+
category: z.ZodOptional<z.ZodEnum<{
|
|
171
|
+
food: "food";
|
|
172
|
+
entertainment: "entertainment";
|
|
173
|
+
services: "services";
|
|
174
|
+
shopping: "shopping";
|
|
175
|
+
education: "education";
|
|
176
|
+
health: "health";
|
|
177
|
+
}>>;
|
|
178
|
+
subCategory: z.ZodOptional<z.ZodEnum<{
|
|
179
|
+
restaurant: "restaurant";
|
|
180
|
+
cafe: "cafe";
|
|
181
|
+
bar: "bar";
|
|
182
|
+
bakery: "bakery";
|
|
183
|
+
catering: "catering";
|
|
184
|
+
club: "club";
|
|
185
|
+
event_venue: "event_venue";
|
|
186
|
+
event_organizer: "event_organizer";
|
|
187
|
+
cultural_center: "cultural_center";
|
|
188
|
+
dance_school: "dance_school";
|
|
189
|
+
beauty_salon: "beauty_salon";
|
|
190
|
+
barbershop: "barbershop";
|
|
191
|
+
repair: "repair";
|
|
192
|
+
agency: "agency";
|
|
193
|
+
translator: "translator";
|
|
194
|
+
photographer: "photographer";
|
|
195
|
+
freelancer: "freelancer";
|
|
196
|
+
latin_store: "latin_store";
|
|
197
|
+
supermarket: "supermarket";
|
|
198
|
+
clothing: "clothing";
|
|
199
|
+
product_seller: "product_seller";
|
|
200
|
+
language_school: "language_school";
|
|
201
|
+
academy: "academy";
|
|
202
|
+
private_teacher: "private_teacher";
|
|
203
|
+
clinic: "clinic";
|
|
204
|
+
gym: "gym";
|
|
205
|
+
}>>;
|
|
206
|
+
profile: z.ZodOptional<z.ZodObject<{
|
|
207
|
+
headline: z.ZodOptional<z.ZodString>;
|
|
208
|
+
services: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
209
|
+
specialties: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
210
|
+
languages: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
211
|
+
serviceArea: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
212
|
+
availability: z.ZodOptional<z.ZodObject<{
|
|
213
|
+
type: z.ZodEnum<{
|
|
214
|
+
appointment: "appointment";
|
|
215
|
+
walk_in: "walk_in";
|
|
216
|
+
online: "online";
|
|
217
|
+
flexible: "flexible";
|
|
218
|
+
}>;
|
|
219
|
+
description: z.ZodOptional<z.ZodString>;
|
|
220
|
+
}, z.core.$strip>>;
|
|
221
|
+
openingHours: z.ZodOptional<z.ZodObject<{
|
|
222
|
+
monday: z.ZodObject<{
|
|
223
|
+
isOpen: z.ZodBoolean;
|
|
224
|
+
intervals: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
225
|
+
open: z.ZodString;
|
|
226
|
+
close: z.ZodString;
|
|
227
|
+
}, z.core.$strip>>>;
|
|
228
|
+
}, z.core.$strip>;
|
|
229
|
+
tuesday: z.ZodObject<{
|
|
230
|
+
isOpen: z.ZodBoolean;
|
|
231
|
+
intervals: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
232
|
+
open: z.ZodString;
|
|
233
|
+
close: z.ZodString;
|
|
234
|
+
}, z.core.$strip>>>;
|
|
235
|
+
}, z.core.$strip>;
|
|
236
|
+
wednesday: z.ZodObject<{
|
|
237
|
+
isOpen: z.ZodBoolean;
|
|
238
|
+
intervals: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
239
|
+
open: z.ZodString;
|
|
240
|
+
close: z.ZodString;
|
|
241
|
+
}, z.core.$strip>>>;
|
|
242
|
+
}, z.core.$strip>;
|
|
243
|
+
thursday: z.ZodObject<{
|
|
244
|
+
isOpen: z.ZodBoolean;
|
|
245
|
+
intervals: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
246
|
+
open: z.ZodString;
|
|
247
|
+
close: z.ZodString;
|
|
248
|
+
}, z.core.$strip>>>;
|
|
249
|
+
}, z.core.$strip>;
|
|
250
|
+
friday: z.ZodObject<{
|
|
251
|
+
isOpen: z.ZodBoolean;
|
|
252
|
+
intervals: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
253
|
+
open: z.ZodString;
|
|
254
|
+
close: z.ZodString;
|
|
255
|
+
}, z.core.$strip>>>;
|
|
256
|
+
}, z.core.$strip>;
|
|
257
|
+
saturday: z.ZodObject<{
|
|
258
|
+
isOpen: z.ZodBoolean;
|
|
259
|
+
intervals: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
260
|
+
open: z.ZodString;
|
|
261
|
+
close: z.ZodString;
|
|
262
|
+
}, z.core.$strip>>>;
|
|
263
|
+
}, z.core.$strip>;
|
|
264
|
+
sunday: z.ZodObject<{
|
|
265
|
+
isOpen: z.ZodBoolean;
|
|
266
|
+
intervals: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
267
|
+
open: z.ZodString;
|
|
268
|
+
close: z.ZodString;
|
|
269
|
+
}, z.core.$strip>>>;
|
|
270
|
+
}, z.core.$strip>;
|
|
271
|
+
}, z.core.$strip>>;
|
|
272
|
+
pricing: z.ZodOptional<z.ZodObject<{
|
|
273
|
+
type: z.ZodEnum<{
|
|
274
|
+
fixed: "fixed";
|
|
275
|
+
hourly: "hourly";
|
|
276
|
+
starting_at: "starting_at";
|
|
277
|
+
range: "range";
|
|
278
|
+
}>;
|
|
279
|
+
currency: z.ZodDefault<z.ZodEnum<{
|
|
280
|
+
EUR: "EUR";
|
|
281
|
+
}>>;
|
|
282
|
+
amount: z.ZodOptional<z.ZodNumber>;
|
|
283
|
+
minAmount: z.ZodOptional<z.ZodNumber>;
|
|
284
|
+
maxAmount: z.ZodOptional<z.ZodNumber>;
|
|
285
|
+
description: z.ZodOptional<z.ZodString>;
|
|
286
|
+
}, z.core.$strip>>;
|
|
287
|
+
}, z.core.$strip>>;
|
|
288
|
+
images: z.ZodOptional<z.ZodObject<{
|
|
289
|
+
profile: z.ZodString;
|
|
290
|
+
cover: z.ZodOptional<z.ZodString>;
|
|
291
|
+
gallery: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
292
|
+
}, z.core.$strip>>;
|
|
293
|
+
documents: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
294
|
+
type: z.ZodEnum<{
|
|
295
|
+
menu: "menu";
|
|
296
|
+
catalog: "catalog";
|
|
297
|
+
portfolio: "portfolio";
|
|
298
|
+
brochure: "brochure";
|
|
299
|
+
}>;
|
|
300
|
+
url: z.ZodString;
|
|
301
|
+
name: z.ZodOptional<z.ZodString>;
|
|
302
|
+
}, z.core.$strip>>>;
|
|
303
|
+
location: z.ZodOptional<z.ZodObject<{
|
|
304
|
+
address: z.ZodString;
|
|
305
|
+
cityId: z.ZodString;
|
|
306
|
+
country: z.ZodString;
|
|
307
|
+
latitude: z.ZodNumber;
|
|
308
|
+
longitude: z.ZodNumber;
|
|
309
|
+
}, z.core.$strip>>;
|
|
310
|
+
contact: z.ZodOptional<z.ZodObject<{
|
|
311
|
+
email: z.ZodOptional<z.ZodString>;
|
|
312
|
+
phone: z.ZodOptional<z.ZodString>;
|
|
313
|
+
website: z.ZodOptional<z.ZodString>;
|
|
314
|
+
instagram: z.ZodOptional<z.ZodString>;
|
|
315
|
+
whatsapp: z.ZodOptional<z.ZodString>;
|
|
316
|
+
}, z.core.$strip>>;
|
|
317
|
+
community: z.ZodOptional<z.ZodObject<{
|
|
318
|
+
isLatinoOwned: z.ZodDefault<z.ZodBoolean>;
|
|
319
|
+
countryOfOrigin: z.ZodOptional<z.ZodString>;
|
|
320
|
+
}, z.core.$strip>>;
|
|
321
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
322
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateBusinessRequestSchema = exports.CreateBusinessRequestSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const business_schema_js_1 = require("./business.schema.js");
|
|
6
|
+
const OpeningHoursTimeSchema = zod_1.z.string().regex(/^([01]\d|2[0-3]):[0-5]\d$/);
|
|
7
|
+
const OpeningHoursIntervalRequestSchema = zod_1.z.object({
|
|
8
|
+
open: OpeningHoursTimeSchema,
|
|
9
|
+
close: OpeningHoursTimeSchema,
|
|
10
|
+
});
|
|
11
|
+
const OpeningHoursDayRequestSchema = zod_1.z.object({
|
|
12
|
+
isOpen: zod_1.z.boolean(),
|
|
13
|
+
intervals: zod_1.z.array(OpeningHoursIntervalRequestSchema).default([]),
|
|
14
|
+
});
|
|
15
|
+
const OpeningHoursRequestSchema = zod_1.z.object({
|
|
16
|
+
monday: OpeningHoursDayRequestSchema,
|
|
17
|
+
tuesday: OpeningHoursDayRequestSchema,
|
|
18
|
+
wednesday: OpeningHoursDayRequestSchema,
|
|
19
|
+
thursday: OpeningHoursDayRequestSchema,
|
|
20
|
+
friday: OpeningHoursDayRequestSchema,
|
|
21
|
+
saturday: OpeningHoursDayRequestSchema,
|
|
22
|
+
sunday: OpeningHoursDayRequestSchema,
|
|
23
|
+
});
|
|
24
|
+
const BusinessProfileRequestSchema = zod_1.z.object({
|
|
25
|
+
headline: zod_1.z.string().optional(),
|
|
26
|
+
services: zod_1.z.array(zod_1.z.string()).default([]),
|
|
27
|
+
specialties: zod_1.z.array(zod_1.z.string()).default([]),
|
|
28
|
+
languages: zod_1.z.array(zod_1.z.string()).default([]),
|
|
29
|
+
serviceArea: zod_1.z.array(zod_1.z.string()).default([]),
|
|
30
|
+
availability: zod_1.z.object({
|
|
31
|
+
type: business_schema_js_1.BusinessAvailabilityTypeSchema,
|
|
32
|
+
description: zod_1.z.string().optional(),
|
|
33
|
+
}).optional(),
|
|
34
|
+
openingHours: OpeningHoursRequestSchema.optional(),
|
|
35
|
+
pricing: zod_1.z.object({
|
|
36
|
+
type: business_schema_js_1.BusinessPricingTypeSchema,
|
|
37
|
+
currency: zod_1.z.enum(["EUR"]).default("EUR"),
|
|
38
|
+
amount: zod_1.z.number().nonnegative().optional(),
|
|
39
|
+
minAmount: zod_1.z.number().nonnegative().optional(),
|
|
40
|
+
maxAmount: zod_1.z.number().nonnegative().optional(),
|
|
41
|
+
description: zod_1.z.string().optional(),
|
|
42
|
+
}).optional(),
|
|
43
|
+
});
|
|
44
|
+
const BusinessImagesRequestSchema = zod_1.z.object({
|
|
45
|
+
profile: zod_1.z.string().min(1),
|
|
46
|
+
cover: zod_1.z.string().optional(),
|
|
47
|
+
gallery: zod_1.z.array(zod_1.z.string()).default([]),
|
|
48
|
+
});
|
|
49
|
+
const BusinessDocumentRequestSchema = zod_1.z.object({
|
|
50
|
+
type: business_schema_js_1.BusinessDocumentTypeSchema,
|
|
51
|
+
url: zod_1.z.string().min(1),
|
|
52
|
+
name: zod_1.z.string().optional(),
|
|
53
|
+
});
|
|
54
|
+
const BusinessLocationRequestSchema = zod_1.z.object({
|
|
55
|
+
address: zod_1.z.string(),
|
|
56
|
+
cityId: zod_1.z.string(),
|
|
57
|
+
country: zod_1.z.string(),
|
|
58
|
+
latitude: zod_1.z.number(),
|
|
59
|
+
longitude: zod_1.z.number(),
|
|
60
|
+
});
|
|
61
|
+
const BusinessContactRequestSchema = zod_1.z.object({
|
|
62
|
+
email: zod_1.z.string().optional(),
|
|
63
|
+
phone: zod_1.z.string().optional(),
|
|
64
|
+
website: zod_1.z.string().optional(),
|
|
65
|
+
instagram: zod_1.z.string().optional(),
|
|
66
|
+
whatsapp: zod_1.z.string().optional(),
|
|
67
|
+
});
|
|
68
|
+
const BusinessCommunityRequestSchema = zod_1.z.object({
|
|
69
|
+
isLatinoOwned: zod_1.z.boolean().default(true),
|
|
70
|
+
countryOfOrigin: zod_1.z.string().optional(),
|
|
71
|
+
});
|
|
72
|
+
/** Wire-format payload accepted by POST /business. */
|
|
73
|
+
exports.CreateBusinessRequestSchema = zod_1.z.object({
|
|
74
|
+
name: zod_1.z.string().min(2),
|
|
75
|
+
description: zod_1.z.string().optional(),
|
|
76
|
+
providerType: business_schema_js_1.BusinessProviderTypeSchema.default("business"),
|
|
77
|
+
category: business_schema_js_1.BusinessCategorySchema,
|
|
78
|
+
subCategory: business_schema_js_1.BusinessSubCategorySchema.optional(),
|
|
79
|
+
profile: BusinessProfileRequestSchema.default({
|
|
80
|
+
services: [], specialties: [], languages: [], serviceArea: [],
|
|
81
|
+
}),
|
|
82
|
+
images: BusinessImagesRequestSchema,
|
|
83
|
+
documents: zod_1.z.array(BusinessDocumentRequestSchema).default([]),
|
|
84
|
+
location: BusinessLocationRequestSchema,
|
|
85
|
+
contact: BusinessContactRequestSchema.default({}),
|
|
86
|
+
community: BusinessCommunityRequestSchema.default({ isLatinoOwned: true }),
|
|
87
|
+
tags: zod_1.z.array(zod_1.z.string()).default([]),
|
|
88
|
+
});
|
|
89
|
+
/**
|
|
90
|
+
* Wire-format partial update. Top-level defaults are intentionally removed,
|
|
91
|
+
* while defaults inside an explicitly supplied nested object remain active.
|
|
92
|
+
* Nested objects retain the existing shallow replacement behavior.
|
|
93
|
+
*/
|
|
94
|
+
const createShape = exports.CreateBusinessRequestSchema.shape;
|
|
95
|
+
exports.UpdateBusinessRequestSchema = zod_1.z.object({
|
|
96
|
+
name: createShape.name.optional(),
|
|
97
|
+
description: createShape.description,
|
|
98
|
+
providerType: createShape.providerType.unwrap().optional(),
|
|
99
|
+
category: createShape.category.optional(),
|
|
100
|
+
subCategory: createShape.subCategory,
|
|
101
|
+
profile: createShape.profile.unwrap().optional(),
|
|
102
|
+
images: createShape.images.optional(),
|
|
103
|
+
documents: createShape.documents.unwrap().optional(),
|
|
104
|
+
location: createShape.location.optional(),
|
|
105
|
+
contact: createShape.contact.unwrap().optional(),
|
|
106
|
+
community: createShape.community.unwrap().optional(),
|
|
107
|
+
tags: createShape.tags.unwrap().optional(),
|
|
108
|
+
}).refine((data) => Object.keys(data).length > 0, {
|
|
109
|
+
message: "At least one supported field must be provided.",
|
|
110
|
+
});
|
|
111
|
+
//# sourceMappingURL=business.request.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"business.request.schema.js","sourceRoot":"","sources":["../../../src/business/business.request.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,6DAO8B;AAE9B,MAAM,sBAAsB,GAAG,OAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC;AAC7E,MAAM,iCAAiC,GAAG,OAAC,CAAC,MAAM,CAAC;IACjD,IAAI,EAAE,sBAAsB;IAC5B,KAAK,EAAE,sBAAsB;CAC9B,CAAC,CAAC;AACH,MAAM,4BAA4B,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5C,MAAM,EAAE,OAAC,CAAC,OAAO,EAAE;IACnB,SAAS,EAAE,OAAC,CAAC,KAAK,CAAC,iCAAiC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;CAClE,CAAC,CAAC;AACH,MAAM,yBAAyB,GAAG,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+
export type CreateBusinessRequest = z.input<typeof CreateBusinessRequestSchema>;
|
|
4
|
+
export type ParsedCreateBusinessRequest = z.output<typeof CreateBusinessRequestSchema>;
|
|
5
|
+
export type UpdateBusinessRequest = z.input<typeof UpdateBusinessRequestSchema>;
|
|
6
|
+
export type ParsedUpdateBusinessRequest = z.output<typeof UpdateBusinessRequestSchema>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"business.request.types.js","sourceRoot":"","sources":["../../../src/business/business.request.types.ts"],"names":[],"mappings":""}
|