@ndrs92/contracts 0.1.0 → 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.
Files changed (33) hide show
  1. package/dist/cjs/business/business.owner.schema.d.ts +605 -0
  2. package/dist/cjs/business/business.owner.schema.js +68 -0
  3. package/dist/cjs/business/business.owner.schema.js.map +1 -0
  4. package/dist/cjs/business/business.owner.types.d.ts +5 -0
  5. package/dist/cjs/business/business.owner.types.js +3 -0
  6. package/dist/cjs/business/business.owner.types.js.map +1 -0
  7. package/dist/cjs/business/business.request.schema.d.ts +322 -0
  8. package/dist/cjs/business/business.request.schema.js +111 -0
  9. package/dist/cjs/business/business.request.schema.js.map +1 -0
  10. package/dist/cjs/business/business.request.types.d.ts +6 -0
  11. package/dist/cjs/business/business.request.types.js +3 -0
  12. package/dist/cjs/business/business.request.types.js.map +1 -0
  13. package/dist/cjs/index.d.ts +4 -0
  14. package/dist/cjs/index.js +8 -1
  15. package/dist/cjs/index.js.map +1 -1
  16. package/dist/esm/business/business.owner.schema.d.ts +605 -0
  17. package/dist/esm/business/business.owner.schema.js +65 -0
  18. package/dist/esm/business/business.owner.schema.js.map +1 -0
  19. package/dist/esm/business/business.owner.types.d.ts +5 -0
  20. package/dist/esm/business/business.owner.types.js +2 -0
  21. package/dist/esm/business/business.owner.types.js.map +1 -0
  22. package/dist/esm/business/business.request.schema.d.ts +322 -0
  23. package/dist/esm/business/business.request.schema.js +108 -0
  24. package/dist/esm/business/business.request.schema.js.map +1 -0
  25. package/dist/esm/business/business.request.types.d.ts +6 -0
  26. package/dist/esm/business/business.request.types.js +2 -0
  27. package/dist/esm/business/business.request.types.js.map +1 -0
  28. package/dist/esm/index.d.ts +4 -0
  29. package/dist/esm/index.js +2 -0
  30. package/dist/esm/index.js.map +1 -1
  31. package/package.json +3 -3
  32. package/dist/tsconfig.cjs.tsbuildinfo +0 -1
  33. package/dist/tsconfig.esm.tsbuildinfo +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"business.owner.types.js","sourceRoot":"","sources":["../../../src/business/business.owner.types.ts"],"names":[],"mappings":"AACA,OAAO,EACL,mBAAmB,EACnB,2BAA2B,EAC3B,6BAA6B,GAC9B,MAAM,4BAA4B,CAAC"}
@@ -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,108 @@
1
+ import { z } from "zod";
2
+ import { BusinessAvailabilityTypeSchema, BusinessCategorySchema, BusinessDocumentTypeSchema, BusinessPricingTypeSchema, BusinessProviderTypeSchema, BusinessSubCategorySchema, } from "./business.schema.js";
3
+ const OpeningHoursTimeSchema = z.string().regex(/^([01]\d|2[0-3]):[0-5]\d$/);
4
+ const OpeningHoursIntervalRequestSchema = z.object({
5
+ open: OpeningHoursTimeSchema,
6
+ close: OpeningHoursTimeSchema,
7
+ });
8
+ const OpeningHoursDayRequestSchema = z.object({
9
+ isOpen: z.boolean(),
10
+ intervals: z.array(OpeningHoursIntervalRequestSchema).default([]),
11
+ });
12
+ const OpeningHoursRequestSchema = z.object({
13
+ monday: OpeningHoursDayRequestSchema,
14
+ tuesday: OpeningHoursDayRequestSchema,
15
+ wednesday: OpeningHoursDayRequestSchema,
16
+ thursday: OpeningHoursDayRequestSchema,
17
+ friday: OpeningHoursDayRequestSchema,
18
+ saturday: OpeningHoursDayRequestSchema,
19
+ sunday: OpeningHoursDayRequestSchema,
20
+ });
21
+ const BusinessProfileRequestSchema = z.object({
22
+ headline: z.string().optional(),
23
+ services: z.array(z.string()).default([]),
24
+ specialties: z.array(z.string()).default([]),
25
+ languages: z.array(z.string()).default([]),
26
+ serviceArea: z.array(z.string()).default([]),
27
+ availability: z.object({
28
+ type: BusinessAvailabilityTypeSchema,
29
+ description: z.string().optional(),
30
+ }).optional(),
31
+ openingHours: OpeningHoursRequestSchema.optional(),
32
+ pricing: z.object({
33
+ type: BusinessPricingTypeSchema,
34
+ currency: z.enum(["EUR"]).default("EUR"),
35
+ amount: z.number().nonnegative().optional(),
36
+ minAmount: z.number().nonnegative().optional(),
37
+ maxAmount: z.number().nonnegative().optional(),
38
+ description: z.string().optional(),
39
+ }).optional(),
40
+ });
41
+ const BusinessImagesRequestSchema = z.object({
42
+ profile: z.string().min(1),
43
+ cover: z.string().optional(),
44
+ gallery: z.array(z.string()).default([]),
45
+ });
46
+ const BusinessDocumentRequestSchema = z.object({
47
+ type: BusinessDocumentTypeSchema,
48
+ url: z.string().min(1),
49
+ name: z.string().optional(),
50
+ });
51
+ const BusinessLocationRequestSchema = z.object({
52
+ address: z.string(),
53
+ cityId: z.string(),
54
+ country: z.string(),
55
+ latitude: z.number(),
56
+ longitude: z.number(),
57
+ });
58
+ const BusinessContactRequestSchema = z.object({
59
+ email: z.string().optional(),
60
+ phone: z.string().optional(),
61
+ website: z.string().optional(),
62
+ instagram: z.string().optional(),
63
+ whatsapp: z.string().optional(),
64
+ });
65
+ const BusinessCommunityRequestSchema = z.object({
66
+ isLatinoOwned: z.boolean().default(true),
67
+ countryOfOrigin: z.string().optional(),
68
+ });
69
+ /** Wire-format payload accepted by POST /business. */
70
+ export const CreateBusinessRequestSchema = z.object({
71
+ name: z.string().min(2),
72
+ description: z.string().optional(),
73
+ providerType: BusinessProviderTypeSchema.default("business"),
74
+ category: BusinessCategorySchema,
75
+ subCategory: BusinessSubCategorySchema.optional(),
76
+ profile: BusinessProfileRequestSchema.default({
77
+ services: [], specialties: [], languages: [], serviceArea: [],
78
+ }),
79
+ images: BusinessImagesRequestSchema,
80
+ documents: z.array(BusinessDocumentRequestSchema).default([]),
81
+ location: BusinessLocationRequestSchema,
82
+ contact: BusinessContactRequestSchema.default({}),
83
+ community: BusinessCommunityRequestSchema.default({ isLatinoOwned: true }),
84
+ tags: z.array(z.string()).default([]),
85
+ });
86
+ /**
87
+ * Wire-format partial update. Top-level defaults are intentionally removed,
88
+ * while defaults inside an explicitly supplied nested object remain active.
89
+ * Nested objects retain the existing shallow replacement behavior.
90
+ */
91
+ const createShape = CreateBusinessRequestSchema.shape;
92
+ export const UpdateBusinessRequestSchema = z.object({
93
+ name: createShape.name.optional(),
94
+ description: createShape.description,
95
+ providerType: createShape.providerType.unwrap().optional(),
96
+ category: createShape.category.optional(),
97
+ subCategory: createShape.subCategory,
98
+ profile: createShape.profile.unwrap().optional(),
99
+ images: createShape.images.optional(),
100
+ documents: createShape.documents.unwrap().optional(),
101
+ location: createShape.location.optional(),
102
+ contact: createShape.contact.unwrap().optional(),
103
+ community: createShape.community.unwrap().optional(),
104
+ tags: createShape.tags.unwrap().optional(),
105
+ }).refine((data) => Object.keys(data).length > 0, {
106
+ message: "At least one supported field must be provided.",
107
+ });
108
+ //# 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,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,8BAA8B,EAC9B,sBAAsB,EACtB,0BAA0B,EAC1B,yBAAyB,EACzB,0BAA0B,EAC1B,yBAAyB,GAC1B,MAAM,sBAAsB,CAAC;AAE9B,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC;AAC7E,MAAM,iCAAiC,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,IAAI,EAAE,sBAAsB;IAC5B,KAAK,EAAE,sBAAsB;CAC9B,CAAC,CAAC;AACH,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE;IACnB,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,iCAAiC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;CAClE,CAAC,CAAC;AACH,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,MAAM,EAAE,4BAA4B;IACpC,OAAO,EAAE,4BAA4B;IACrC,SAAS,EAAE,4BAA4B;IACvC,QAAQ,EAAE,4BAA4B;IACtC,MAAM,EAAE,4BAA4B;IACpC,QAAQ,EAAE,4BAA4B;IACtC,MAAM,EAAE,4BAA4B;CACrC,CAAC,CAAC;AAEH,MAA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AAC,IAAI,CAAC,QAAQ,EAAE;IACjC,WAAW,EAAE,WAAW,CAAC,WAAW;IACpC,YAAY,EAAE,WAAW,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC1D,QAAQ,EAAE,WAAW,CAAC,QAAQ,CAAC,QAAQ,EAAE;IACzC,WAAW,EAAE,WAAW,CAAC,WAAW;IACpC,OAAO,EAAE,WAAW,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChD,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,QAAQ,EAAE;IACrC,SAAS,EAAE,WAAW,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACpD,QAAQ,EAAE,WAAW,CAAC,QAAQ,CAAC,QAAQ,EAAE;IACzC,OAAO,EAAE,WAAW,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChD,SAAS,EAAE,WAAW,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACpD,IAAI,EAAE,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC3C,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE;IAChD,OAAO,EAAE,gDAAgD;CAC1D,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { z } from "zod";
2
+ import { CreateBusinessRequestSchema, UpdateBusinessRequestSchema } from "./business.request.schema.js";
3
+ 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,2 @@
1
+ import { CreateBusinessRequestSchema, UpdateBusinessRequestSchema, } from "./business.request.schema.js";
2
+ //# sourceMappingURL=business.request.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"business.request.types.js","sourceRoot":"","sources":["../../../src/business/business.request.types.ts"],"names":[],"mappings":"AACA,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,GAC5B,MAAM,8BAA8B,CAAC"}
@@ -2,3 +2,7 @@ export { PublicEventSchema, PublicEventCreatorSchema, PublicEventWithCreatorSche
2
2
  export type { PublicEvent, PublicEventWithCreator, } from "./event/event.types.js";
3
3
  export { BusinessProviderTypeSchema, BusinessCategorySchema, BusinessSubCategorySchema, BusinessAvailabilityTypeSchema, BusinessPricingTypeSchema, BusinessDocumentTypeSchema, BusinessVerificationStatusSchema, OpeningHoursSchema, PublicBusinessProfileSchema, PublicBusinessContactSchema, PublicBusinessCommunitySchema, PublicBusinessRatingSchema, PublicBusinessVerificationSchema, PublicBusinessSchema, } from "./business/business.schema.js";
4
4
  export type { PublicBusiness, } from "./business/business.types.js";
5
+ export { CreateBusinessRequestSchema, UpdateBusinessRequestSchema, } from "./business/business.request.schema.js";
6
+ export type { CreateBusinessRequest, ParsedCreateBusinessRequest, UpdateBusinessRequest, ParsedUpdateBusinessRequest, } from "./business/business.request.types.js";
7
+ export { OwnerBusinessSchema, OwnerBusinessResponseSchema, OwnerBusinessesResponseSchema, } from "./business/business.owner.schema.js";
8
+ export type { OwnerBusiness, OwnerBusinessResponse, OwnerBusinessesResponse, } from "./business/business.owner.types.js";
package/dist/esm/index.js CHANGED
@@ -1,3 +1,5 @@
1
1
  export { PublicEventSchema, PublicEventCreatorSchema, PublicEventWithCreatorSchema, } from "./event/event.schema.js";
2
2
  export { BusinessProviderTypeSchema, BusinessCategorySchema, BusinessSubCategorySchema, BusinessAvailabilityTypeSchema, BusinessPricingTypeSchema, BusinessDocumentTypeSchema, BusinessVerificationStatusSchema, OpeningHoursSchema, PublicBusinessProfileSchema, PublicBusinessContactSchema, PublicBusinessCommunitySchema, PublicBusinessRatingSchema, PublicBusinessVerificationSchema, PublicBusinessSchema, } from "./business/business.schema.js";
3
+ export { CreateBusinessRequestSchema, UpdateBusinessRequestSchema, } from "./business/business.request.schema.js";
4
+ export { OwnerBusinessSchema, OwnerBusinessResponseSchema, OwnerBusinessesResponseSchema, } from "./business/business.owner.schema.js";
3
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,iBAAiB,EACjB,wBAAwB,EACxB,4BAA4B,GAC7B,MAAM,yBAAyB,CAAC;AAOjC,OAAO,EACH,0BAA0B,EAC1B,sBAAsB,EACtB,yBAAyB,EACzB,8BAA8B,EAC9B,yBAAyB,EACzB,0BAA0B,EAC1B,gCAAgC,EAChC,kBAAkB,EAClB,2BAA2B,EAC3B,2BAA2B,EAC3B,6BAA6B,EAC7B,0BAA0B,EAC1B,gCAAgC,EAChC,oBAAoB,GACvB,MAAM,+BAA+B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,iBAAiB,EACjB,wBAAwB,EACxB,4BAA4B,GAC7B,MAAM,yBAAyB,CAAC;AAOjC,OAAO,EACH,0BAA0B,EAC1B,sBAAsB,EACtB,yBAAyB,EACzB,8BAA8B,EAC9B,yBAAyB,EACzB,0BAA0B,EAC1B,gCAAgC,EAChC,kBAAkB,EAClB,2BAA2B,EAC3B,2BAA2B,EAC3B,6BAA6B,EAC7B,0BAA0B,EAC1B,gCAAgC,EAChC,oBAAoB,GACvB,MAAM,+BAA+B,CAAC;AAMvC,OAAO,EACH,2BAA2B,EAC3B,2BAA2B,GAC9B,MAAM,uCAAuC,CAAC;AAS/C,OAAO,EACH,mBAAmB,EACnB,2BAA2B,EAC3B,6BAA6B,GAChC,MAAM,qCAAqC,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
2
  {
3
3
  "name": "@ndrs92/contracts",
4
- "version": "0.1.0",
4
+ "version": "0.2.0",
5
5
  "type": "module",
6
6
  "description": "Shared API contracts for the Veci platform",
7
7
  "main": "./dist/cjs/index.js",
@@ -23,8 +23,8 @@
23
23
  ],
24
24
  "scripts": {
25
25
  "build": "npm run build:esm && npm run build:cjs",
26
- "build:esm": "tsc -p tsconfig.esm.json",
27
- "build:cjs": "tsc -p tsconfig.cjs.json && node -e \"require('fs').writeFileSync('dist/cjs/package.json', JSON.stringify({ type: 'commonjs' }, null, 2) + '\\n')\"",
26
+ "build:esm": "tsc -b tsconfig.esm.json --force",
27
+ "build:cjs": "tsc -b tsconfig.cjs.json --force && node -e \"const fs = require('fs'); fs.mkdirSync('dist/cjs', { recursive: true }); fs.writeFileSync('dist/cjs/package.json', JSON.stringify({ type: 'commonjs' }, null, 2) + '\\n')\"",
28
28
  "test": "vitest run src"
29
29
  },
30
30
  "dependencies": {