@zyacreatives/shared 2.0.62 → 2.0.63
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/constants.d.ts +9 -0
- package/dist/constants.js +9 -1
- package/dist/schemas/brand.d.ts +158 -5
- package/dist/schemas/brand.js +53 -8
- package/dist/schemas/creative.d.ts +211 -9
- package/dist/schemas/creative.js +56 -10
- package/dist/schemas/user.d.ts +116 -26
- package/dist/types/brand.d.ts +2 -1
- package/dist/types/creative.d.ts +2 -1
- package/package.json +1 -1
- package/src/constants.ts +11 -0
- package/src/schemas/brand.ts +60 -9
- package/src/schemas/creative.ts +65 -18
- package/src/types/brand.ts +3 -0
- package/src/types/creative.ts +2 -0
|
@@ -1,8 +1,22 @@
|
|
|
1
1
|
import { z } from "@hono/zod-openapi";
|
|
2
|
+
export declare const MinimalCreativeEntitySchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodCUID2;
|
|
4
|
+
userId: z.ZodCUID2;
|
|
5
|
+
bio: z.ZodOptional<z.ZodString>;
|
|
6
|
+
role: z.ZodOptional<z.ZodString>;
|
|
7
|
+
location: z.ZodOptional<z.ZodString>;
|
|
8
|
+
experienceLevel: z.ZodOptional<z.ZodEnum<{
|
|
9
|
+
"0-1 year": "0-1 year";
|
|
10
|
+
"1-3 years": "1-3 years";
|
|
11
|
+
"3-5 years": "3-5 years";
|
|
12
|
+
"5+ years": "5+ years";
|
|
13
|
+
}>>;
|
|
14
|
+
}, z.core.$strip>;
|
|
2
15
|
export declare const CreativeEntitySchema: z.ZodObject<{
|
|
3
16
|
id: z.ZodCUID2;
|
|
4
17
|
userId: z.ZodCUID2;
|
|
5
18
|
bio: z.ZodOptional<z.ZodString>;
|
|
19
|
+
role: z.ZodOptional<z.ZodString>;
|
|
6
20
|
location: z.ZodOptional<z.ZodString>;
|
|
7
21
|
experienceLevel: z.ZodOptional<z.ZodEnum<{
|
|
8
22
|
"0-1 year": "0-1 year";
|
|
@@ -12,6 +26,32 @@ export declare const CreativeEntitySchema: z.ZodObject<{
|
|
|
12
26
|
}>>;
|
|
13
27
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
14
28
|
disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
29
|
+
workExperience: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
30
|
+
companyName: z.ZodString;
|
|
31
|
+
position: z.ZodString;
|
|
32
|
+
startDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
33
|
+
endDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
34
|
+
currentlyWorking: z.ZodOptional<z.ZodBoolean>;
|
|
35
|
+
description: z.ZodOptional<z.ZodString>;
|
|
36
|
+
}, z.core.$strip>>>;
|
|
37
|
+
links: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
38
|
+
name: z.ZodString;
|
|
39
|
+
url: z.ZodString;
|
|
40
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
41
|
+
readonly INSTAGRAM: "Instagram";
|
|
42
|
+
readonly LINKEDIN: "LinkedIn";
|
|
43
|
+
readonly TWITTER: "Twitter";
|
|
44
|
+
readonly YOUTUBE: "Youtube";
|
|
45
|
+
readonly PORTFOLIO: "Portfolio Website";
|
|
46
|
+
readonly GENERIC_WEBSITE: "Generic Website";
|
|
47
|
+
}>>;
|
|
48
|
+
}, z.core.$strip>>>;
|
|
49
|
+
achievements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
50
|
+
title: z.ZodString;
|
|
51
|
+
description: z.ZodString;
|
|
52
|
+
link: z.ZodOptional<z.ZodString>;
|
|
53
|
+
year: z.ZodOptional<z.ZodNumber>;
|
|
54
|
+
}, z.core.$strip>>>;
|
|
15
55
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
16
56
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
17
57
|
}, z.core.$strip>;
|
|
@@ -36,7 +76,7 @@ export declare const CreateCreativeProfileInputSchema: z.ZodObject<{
|
|
|
36
76
|
readonly YEAR_3_5: "3-5 years";
|
|
37
77
|
readonly YEAR_5_PLUS: "5+ years";
|
|
38
78
|
}>>;
|
|
39
|
-
|
|
79
|
+
role: z.ZodOptional<z.ZodString>;
|
|
40
80
|
location: z.ZodOptional<z.ZodString>;
|
|
41
81
|
disciplineSlugs: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
42
82
|
}, z.core.$strip>;
|
|
@@ -48,9 +88,36 @@ export declare const UpdateCreativeProfileInputSchema: z.ZodObject<{
|
|
|
48
88
|
readonly YEAR_5_PLUS: "5+ years";
|
|
49
89
|
}>>;
|
|
50
90
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
91
|
+
role: z.ZodOptional<z.ZodString>;
|
|
51
92
|
bio: z.ZodOptional<z.ZodString>;
|
|
52
93
|
location: z.ZodOptional<z.ZodString>;
|
|
53
94
|
disciplineSlugs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
95
|
+
workExperience: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
96
|
+
companyName: z.ZodString;
|
|
97
|
+
position: z.ZodString;
|
|
98
|
+
startDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
99
|
+
endDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
100
|
+
currentlyWorking: z.ZodOptional<z.ZodBoolean>;
|
|
101
|
+
description: z.ZodOptional<z.ZodString>;
|
|
102
|
+
}, z.core.$strip>>>;
|
|
103
|
+
links: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
104
|
+
name: z.ZodString;
|
|
105
|
+
url: z.ZodString;
|
|
106
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
107
|
+
readonly INSTAGRAM: "Instagram";
|
|
108
|
+
readonly LINKEDIN: "LinkedIn";
|
|
109
|
+
readonly TWITTER: "Twitter";
|
|
110
|
+
readonly YOUTUBE: "Youtube";
|
|
111
|
+
readonly PORTFOLIO: "Portfolio Website";
|
|
112
|
+
readonly GENERIC_WEBSITE: "Generic Website";
|
|
113
|
+
}>>;
|
|
114
|
+
}, z.core.$strip>>>;
|
|
115
|
+
achievements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
116
|
+
title: z.ZodString;
|
|
117
|
+
description: z.ZodString;
|
|
118
|
+
link: z.ZodOptional<z.ZodString>;
|
|
119
|
+
year: z.ZodOptional<z.ZodNumber>;
|
|
120
|
+
}, z.core.$strip>>>;
|
|
54
121
|
}, z.core.$strip>;
|
|
55
122
|
export declare const GetCreativeInputSchema: z.ZodObject<{
|
|
56
123
|
value: z.ZodCUID2;
|
|
@@ -69,6 +136,7 @@ export declare const CreateCreativeOutputSchema: z.ZodObject<{
|
|
|
69
136
|
id: z.ZodCUID2;
|
|
70
137
|
userId: z.ZodCUID2;
|
|
71
138
|
bio: z.ZodOptional<z.ZodString>;
|
|
139
|
+
role: z.ZodOptional<z.ZodString>;
|
|
72
140
|
location: z.ZodOptional<z.ZodString>;
|
|
73
141
|
experienceLevel: z.ZodOptional<z.ZodEnum<{
|
|
74
142
|
"0-1 year": "0-1 year";
|
|
@@ -78,6 +146,32 @@ export declare const CreateCreativeOutputSchema: z.ZodObject<{
|
|
|
78
146
|
}>>;
|
|
79
147
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
80
148
|
disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
149
|
+
workExperience: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
150
|
+
companyName: z.ZodString;
|
|
151
|
+
position: z.ZodString;
|
|
152
|
+
startDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
153
|
+
endDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
154
|
+
currentlyWorking: z.ZodOptional<z.ZodBoolean>;
|
|
155
|
+
description: z.ZodOptional<z.ZodString>;
|
|
156
|
+
}, z.core.$strip>>>;
|
|
157
|
+
links: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
158
|
+
name: z.ZodString;
|
|
159
|
+
url: z.ZodString;
|
|
160
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
161
|
+
readonly INSTAGRAM: "Instagram";
|
|
162
|
+
readonly LINKEDIN: "LinkedIn";
|
|
163
|
+
readonly TWITTER: "Twitter";
|
|
164
|
+
readonly YOUTUBE: "Youtube";
|
|
165
|
+
readonly PORTFOLIO: "Portfolio Website";
|
|
166
|
+
readonly GENERIC_WEBSITE: "Generic Website";
|
|
167
|
+
}>>;
|
|
168
|
+
}, z.core.$strip>>>;
|
|
169
|
+
achievements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
170
|
+
title: z.ZodString;
|
|
171
|
+
description: z.ZodString;
|
|
172
|
+
link: z.ZodOptional<z.ZodString>;
|
|
173
|
+
year: z.ZodOptional<z.ZodNumber>;
|
|
174
|
+
}, z.core.$strip>>>;
|
|
81
175
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
82
176
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
83
177
|
}, z.core.$strip>;
|
|
@@ -85,6 +179,7 @@ export declare const GetCreativeOutputSchema: z.ZodObject<{
|
|
|
85
179
|
id: z.ZodCUID2;
|
|
86
180
|
userId: z.ZodCUID2;
|
|
87
181
|
bio: z.ZodOptional<z.ZodString>;
|
|
182
|
+
role: z.ZodOptional<z.ZodString>;
|
|
88
183
|
location: z.ZodOptional<z.ZodString>;
|
|
89
184
|
experienceLevel: z.ZodOptional<z.ZodEnum<{
|
|
90
185
|
"0-1 year": "0-1 year";
|
|
@@ -94,6 +189,32 @@ export declare const GetCreativeOutputSchema: z.ZodObject<{
|
|
|
94
189
|
}>>;
|
|
95
190
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
96
191
|
disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
192
|
+
workExperience: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
193
|
+
companyName: z.ZodString;
|
|
194
|
+
position: z.ZodString;
|
|
195
|
+
startDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
196
|
+
endDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
197
|
+
currentlyWorking: z.ZodOptional<z.ZodBoolean>;
|
|
198
|
+
description: z.ZodOptional<z.ZodString>;
|
|
199
|
+
}, z.core.$strip>>>;
|
|
200
|
+
links: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
201
|
+
name: z.ZodString;
|
|
202
|
+
url: z.ZodString;
|
|
203
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
204
|
+
readonly INSTAGRAM: "Instagram";
|
|
205
|
+
readonly LINKEDIN: "LinkedIn";
|
|
206
|
+
readonly TWITTER: "Twitter";
|
|
207
|
+
readonly YOUTUBE: "Youtube";
|
|
208
|
+
readonly PORTFOLIO: "Portfolio Website";
|
|
209
|
+
readonly GENERIC_WEBSITE: "Generic Website";
|
|
210
|
+
}>>;
|
|
211
|
+
}, z.core.$strip>>>;
|
|
212
|
+
achievements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
213
|
+
title: z.ZodString;
|
|
214
|
+
description: z.ZodString;
|
|
215
|
+
link: z.ZodOptional<z.ZodString>;
|
|
216
|
+
year: z.ZodOptional<z.ZodNumber>;
|
|
217
|
+
}, z.core.$strip>>>;
|
|
97
218
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
98
219
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
99
220
|
}, z.core.$strip>;
|
|
@@ -101,6 +222,7 @@ export declare const UpdateCreativeOutputSchema: z.ZodObject<{
|
|
|
101
222
|
id: z.ZodCUID2;
|
|
102
223
|
userId: z.ZodCUID2;
|
|
103
224
|
bio: z.ZodOptional<z.ZodString>;
|
|
225
|
+
role: z.ZodOptional<z.ZodString>;
|
|
104
226
|
location: z.ZodOptional<z.ZodString>;
|
|
105
227
|
experienceLevel: z.ZodOptional<z.ZodEnum<{
|
|
106
228
|
"0-1 year": "0-1 year";
|
|
@@ -110,13 +232,40 @@ export declare const UpdateCreativeOutputSchema: z.ZodObject<{
|
|
|
110
232
|
}>>;
|
|
111
233
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
112
234
|
disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
235
|
+
workExperience: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
236
|
+
companyName: z.ZodString;
|
|
237
|
+
position: z.ZodString;
|
|
238
|
+
startDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
239
|
+
endDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
240
|
+
currentlyWorking: z.ZodOptional<z.ZodBoolean>;
|
|
241
|
+
description: z.ZodOptional<z.ZodString>;
|
|
242
|
+
}, z.core.$strip>>>;
|
|
243
|
+
links: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
244
|
+
name: z.ZodString;
|
|
245
|
+
url: z.ZodString;
|
|
246
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
247
|
+
readonly INSTAGRAM: "Instagram";
|
|
248
|
+
readonly LINKEDIN: "LinkedIn";
|
|
249
|
+
readonly TWITTER: "Twitter";
|
|
250
|
+
readonly YOUTUBE: "Youtube";
|
|
251
|
+
readonly PORTFOLIO: "Portfolio Website";
|
|
252
|
+
readonly GENERIC_WEBSITE: "Generic Website";
|
|
253
|
+
}>>;
|
|
254
|
+
}, z.core.$strip>>>;
|
|
255
|
+
achievements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
256
|
+
title: z.ZodString;
|
|
257
|
+
description: z.ZodString;
|
|
258
|
+
link: z.ZodOptional<z.ZodString>;
|
|
259
|
+
year: z.ZodOptional<z.ZodNumber>;
|
|
260
|
+
}, z.core.$strip>>>;
|
|
113
261
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
114
262
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
115
263
|
}, z.core.$strip>;
|
|
116
|
-
export declare const CreativeWithUserEntitySchema: z.ZodObject<{
|
|
264
|
+
export declare const CreativeWithUserEntitySchema: z.ZodOptional<z.ZodObject<{
|
|
117
265
|
id: z.ZodCUID2;
|
|
118
266
|
userId: z.ZodCUID2;
|
|
119
267
|
bio: z.ZodOptional<z.ZodString>;
|
|
268
|
+
role: z.ZodOptional<z.ZodString>;
|
|
120
269
|
location: z.ZodOptional<z.ZodString>;
|
|
121
270
|
experienceLevel: z.ZodOptional<z.ZodEnum<{
|
|
122
271
|
"0-1 year": "0-1 year";
|
|
@@ -126,32 +275,59 @@ export declare const CreativeWithUserEntitySchema: z.ZodObject<{
|
|
|
126
275
|
}>>;
|
|
127
276
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
128
277
|
disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
278
|
+
workExperience: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
279
|
+
companyName: z.ZodString;
|
|
280
|
+
position: z.ZodString;
|
|
281
|
+
startDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
282
|
+
endDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
283
|
+
currentlyWorking: z.ZodOptional<z.ZodBoolean>;
|
|
284
|
+
description: z.ZodOptional<z.ZodString>;
|
|
285
|
+
}, z.core.$strip>>>;
|
|
286
|
+
links: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
287
|
+
name: z.ZodString;
|
|
288
|
+
url: z.ZodString;
|
|
289
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
290
|
+
readonly INSTAGRAM: "Instagram";
|
|
291
|
+
readonly LINKEDIN: "LinkedIn";
|
|
292
|
+
readonly TWITTER: "Twitter";
|
|
293
|
+
readonly YOUTUBE: "Youtube";
|
|
294
|
+
readonly PORTFOLIO: "Portfolio Website";
|
|
295
|
+
readonly GENERIC_WEBSITE: "Generic Website";
|
|
296
|
+
}>>;
|
|
297
|
+
}, z.core.$strip>>>;
|
|
298
|
+
achievements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
299
|
+
title: z.ZodString;
|
|
300
|
+
description: z.ZodString;
|
|
301
|
+
link: z.ZodOptional<z.ZodString>;
|
|
302
|
+
year: z.ZodOptional<z.ZodNumber>;
|
|
303
|
+
}, z.core.$strip>>>;
|
|
129
304
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
130
305
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
131
306
|
user: z.ZodObject<{
|
|
132
307
|
id: z.ZodCUID2;
|
|
133
308
|
username: z.ZodOptional<z.ZodString>;
|
|
134
309
|
email: z.ZodString;
|
|
135
|
-
name: z.ZodOptional<z.ZodString>;
|
|
136
|
-
image: z.ZodOptional<z.ZodString>;
|
|
137
310
|
role: z.ZodEnum<{
|
|
138
311
|
CREATIVE: "CREATIVE";
|
|
139
312
|
BRAND: "BRAND";
|
|
140
313
|
INVESTOR: "INVESTOR";
|
|
141
314
|
ADMIN: "ADMIN";
|
|
142
315
|
}>;
|
|
316
|
+
name: z.ZodOptional<z.ZodString>;
|
|
317
|
+
image: z.ZodOptional<z.ZodString>;
|
|
143
318
|
}, z.core.$strip>;
|
|
144
|
-
}, z.core.$strip
|
|
319
|
+
}, z.core.$strip>>;
|
|
145
320
|
export declare const SearchCreativeInputSchema: z.ZodObject<{
|
|
146
321
|
string: z.ZodString;
|
|
147
322
|
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
148
323
|
cursor: z.ZodOptional<z.ZodString>;
|
|
149
324
|
}, z.core.$strip>;
|
|
150
325
|
export declare const SearchCreativeOutputSchema: z.ZodObject<{
|
|
151
|
-
creatives: z.ZodArray<z.ZodObject<{
|
|
326
|
+
creatives: z.ZodArray<z.ZodOptional<z.ZodObject<{
|
|
152
327
|
id: z.ZodCUID2;
|
|
153
328
|
userId: z.ZodCUID2;
|
|
154
329
|
bio: z.ZodOptional<z.ZodString>;
|
|
330
|
+
role: z.ZodOptional<z.ZodString>;
|
|
155
331
|
location: z.ZodOptional<z.ZodString>;
|
|
156
332
|
experienceLevel: z.ZodOptional<z.ZodEnum<{
|
|
157
333
|
"0-1 year": "0-1 year";
|
|
@@ -161,21 +337,47 @@ export declare const SearchCreativeOutputSchema: z.ZodObject<{
|
|
|
161
337
|
}>>;
|
|
162
338
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
163
339
|
disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
340
|
+
workExperience: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
341
|
+
companyName: z.ZodString;
|
|
342
|
+
position: z.ZodString;
|
|
343
|
+
startDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
344
|
+
endDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
345
|
+
currentlyWorking: z.ZodOptional<z.ZodBoolean>;
|
|
346
|
+
description: z.ZodOptional<z.ZodString>;
|
|
347
|
+
}, z.core.$strip>>>;
|
|
348
|
+
links: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
349
|
+
name: z.ZodString;
|
|
350
|
+
url: z.ZodString;
|
|
351
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
352
|
+
readonly INSTAGRAM: "Instagram";
|
|
353
|
+
readonly LINKEDIN: "LinkedIn";
|
|
354
|
+
readonly TWITTER: "Twitter";
|
|
355
|
+
readonly YOUTUBE: "Youtube";
|
|
356
|
+
readonly PORTFOLIO: "Portfolio Website";
|
|
357
|
+
readonly GENERIC_WEBSITE: "Generic Website";
|
|
358
|
+
}>>;
|
|
359
|
+
}, z.core.$strip>>>;
|
|
360
|
+
achievements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
361
|
+
title: z.ZodString;
|
|
362
|
+
description: z.ZodString;
|
|
363
|
+
link: z.ZodOptional<z.ZodString>;
|
|
364
|
+
year: z.ZodOptional<z.ZodNumber>;
|
|
365
|
+
}, z.core.$strip>>>;
|
|
164
366
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
165
367
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
166
368
|
user: z.ZodObject<{
|
|
167
369
|
id: z.ZodCUID2;
|
|
168
370
|
username: z.ZodOptional<z.ZodString>;
|
|
169
371
|
email: z.ZodString;
|
|
170
|
-
name: z.ZodOptional<z.ZodString>;
|
|
171
|
-
image: z.ZodOptional<z.ZodString>;
|
|
172
372
|
role: z.ZodEnum<{
|
|
173
373
|
CREATIVE: "CREATIVE";
|
|
174
374
|
BRAND: "BRAND";
|
|
175
375
|
INVESTOR: "INVESTOR";
|
|
176
376
|
ADMIN: "ADMIN";
|
|
177
377
|
}>;
|
|
378
|
+
name: z.ZodOptional<z.ZodString>;
|
|
379
|
+
image: z.ZodOptional<z.ZodString>;
|
|
178
380
|
}, z.core.$strip>;
|
|
179
|
-
}, z.core.$strip
|
|
381
|
+
}, z.core.$strip>>>;
|
|
180
382
|
nextCursor: z.ZodOptional<z.ZodString>;
|
|
181
383
|
}, z.core.$strip>;
|
package/dist/schemas/creative.js
CHANGED
|
@@ -1,10 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SearchCreativeOutputSchema = exports.SearchCreativeInputSchema = exports.CreativeWithUserEntitySchema = exports.UpdateCreativeOutputSchema = exports.GetCreativeOutputSchema = exports.CreateCreativeOutputSchema = exports.GetCreativeQuerySchema = exports.GetCreativeInputSchema = exports.UpdateCreativeProfileInputSchema = exports.CreateCreativeProfileInputSchema = exports.ListCreativesInputSchema = exports.CreativeEntitySchema = void 0;
|
|
3
|
+
exports.SearchCreativeOutputSchema = exports.SearchCreativeInputSchema = exports.CreativeWithUserEntitySchema = exports.UpdateCreativeOutputSchema = exports.GetCreativeOutputSchema = exports.CreateCreativeOutputSchema = exports.GetCreativeQuerySchema = exports.GetCreativeInputSchema = exports.UpdateCreativeProfileInputSchema = exports.CreateCreativeProfileInputSchema = exports.ListCreativesInputSchema = exports.CreativeEntitySchema = exports.MinimalCreativeEntitySchema = void 0;
|
|
4
4
|
const zod_openapi_1 = require("@hono/zod-openapi");
|
|
5
5
|
const constants_1 = require("../constants");
|
|
6
6
|
const common_1 = require("./common");
|
|
7
7
|
const user_1 = require("./user");
|
|
8
|
+
exports.MinimalCreativeEntitySchema = zod_openapi_1.z.object({
|
|
9
|
+
id: zod_openapi_1.z.cuid2().openapi({ example: "cre_cksd0v6q0000s9a5y8z7p3x9" }),
|
|
10
|
+
userId: zod_openapi_1.z.cuid2().openapi({ example: "user_abc123" }),
|
|
11
|
+
bio: zod_openapi_1.z.string().optional().openapi({
|
|
12
|
+
example: "A multi-disciplinary designer specializing in brand identity.",
|
|
13
|
+
}),
|
|
14
|
+
role: zod_openapi_1.z.string().optional().openapi({ example: "Designer" }),
|
|
15
|
+
location: zod_openapi_1.z.string().optional().openapi({ example: "London, UK" }),
|
|
16
|
+
experienceLevel: zod_openapi_1.z
|
|
17
|
+
.enum(Object.values(constants_1.EXPERIENCE_LEVELS))
|
|
18
|
+
.optional()
|
|
19
|
+
.openapi({ example: constants_1.EXPERIENCE_LEVELS.YEAR_0_1 }),
|
|
20
|
+
});
|
|
8
21
|
exports.CreativeEntitySchema = zod_openapi_1.z
|
|
9
22
|
.object({
|
|
10
23
|
id: zod_openapi_1.z.cuid2().openapi({ example: "cre_cksd0v6q0000s9a5y8z7p3x9" }),
|
|
@@ -12,6 +25,7 @@ exports.CreativeEntitySchema = zod_openapi_1.z
|
|
|
12
25
|
bio: zod_openapi_1.z.string().optional().openapi({
|
|
13
26
|
example: "A multi-disciplinary designer specializing in brand identity.",
|
|
14
27
|
}),
|
|
28
|
+
role: zod_openapi_1.z.string().optional().openapi({ example: "Designer" }),
|
|
15
29
|
location: zod_openapi_1.z.string().optional().openapi({ example: "London, UK" }),
|
|
16
30
|
experienceLevel: zod_openapi_1.z
|
|
17
31
|
.enum(Object.values(constants_1.EXPERIENCE_LEVELS))
|
|
@@ -25,6 +39,25 @@ exports.CreativeEntitySchema = zod_openapi_1.z
|
|
|
25
39
|
.array(zod_openapi_1.z.string())
|
|
26
40
|
.optional()
|
|
27
41
|
.openapi({ example: ["Design", "Art Direction"] }),
|
|
42
|
+
workExperience: zod_openapi_1.z.object({
|
|
43
|
+
companyName: zod_openapi_1.z.string(),
|
|
44
|
+
position: zod_openapi_1.z.string(),
|
|
45
|
+
startDate: zod_openapi_1.z.coerce.date().optional(),
|
|
46
|
+
endDate: zod_openapi_1.z.coerce.date().optional(),
|
|
47
|
+
currentlyWorking: zod_openapi_1.z.boolean().optional(),
|
|
48
|
+
description: zod_openapi_1.z.string().optional(),
|
|
49
|
+
}).array().optional(),
|
|
50
|
+
links: zod_openapi_1.z.object({
|
|
51
|
+
name: zod_openapi_1.z.string(),
|
|
52
|
+
url: zod_openapi_1.z.string(),
|
|
53
|
+
type: zod_openapi_1.z.enum(constants_1.LINK_TYPES).default(constants_1.LINK_TYPES.GENERIC_WEBSITE),
|
|
54
|
+
}).array().optional(),
|
|
55
|
+
achievements: zod_openapi_1.z.object({
|
|
56
|
+
title: zod_openapi_1.z.string(),
|
|
57
|
+
description: zod_openapi_1.z.string(),
|
|
58
|
+
link: zod_openapi_1.z.string().optional(),
|
|
59
|
+
year: zod_openapi_1.z.number().int().optional(),
|
|
60
|
+
}).array().optional(),
|
|
28
61
|
createdAt: zod_openapi_1.z.coerce
|
|
29
62
|
.date()
|
|
30
63
|
.optional()
|
|
@@ -76,14 +109,7 @@ exports.CreateCreativeProfileInputSchema = zod_openapi_1.z
|
|
|
76
109
|
.openapi({
|
|
77
110
|
example: constants_1.EXPERIENCE_LEVELS.YEAR_1_3,
|
|
78
111
|
}),
|
|
79
|
-
|
|
80
|
-
.string()
|
|
81
|
-
.max(210)
|
|
82
|
-
.optional()
|
|
83
|
-
.describe("Short professional summary or introduction.")
|
|
84
|
-
.openapi({
|
|
85
|
-
example: "I am a freelance UI/UX designer.",
|
|
86
|
-
}),
|
|
112
|
+
role: zod_openapi_1.z.string().optional().openapi({ example: "Designer" }),
|
|
87
113
|
location: zod_openapi_1.z
|
|
88
114
|
.string()
|
|
89
115
|
.max(100)
|
|
@@ -115,6 +141,7 @@ exports.UpdateCreativeProfileInputSchema = zod_openapi_1.z
|
|
|
115
141
|
.array(zod_openapi_1.z.string())
|
|
116
142
|
.optional()
|
|
117
143
|
.openapi({ example: ["react", "design", "product"] }),
|
|
144
|
+
role: zod_openapi_1.z.string().optional().openapi({ example: "Designer" }),
|
|
118
145
|
bio: zod_openapi_1.z
|
|
119
146
|
.string()
|
|
120
147
|
.max(210)
|
|
@@ -130,6 +157,25 @@ exports.UpdateCreativeProfileInputSchema = zod_openapi_1.z
|
|
|
130
157
|
.min(1, "At least one discipline is required")
|
|
131
158
|
.optional()
|
|
132
159
|
.openapi({ example: ["frontend", "ui-ux"] }),
|
|
160
|
+
workExperience: zod_openapi_1.z.object({
|
|
161
|
+
companyName: zod_openapi_1.z.string(),
|
|
162
|
+
position: zod_openapi_1.z.string(),
|
|
163
|
+
startDate: zod_openapi_1.z.coerce.date().optional(),
|
|
164
|
+
endDate: zod_openapi_1.z.coerce.date().optional(),
|
|
165
|
+
currentlyWorking: zod_openapi_1.z.boolean().optional(),
|
|
166
|
+
description: zod_openapi_1.z.string().optional(),
|
|
167
|
+
}).array().optional(),
|
|
168
|
+
links: zod_openapi_1.z.object({
|
|
169
|
+
name: zod_openapi_1.z.string(),
|
|
170
|
+
url: zod_openapi_1.z.string(),
|
|
171
|
+
type: zod_openapi_1.z.enum(constants_1.LINK_TYPES).default(constants_1.LINK_TYPES.GENERIC_WEBSITE),
|
|
172
|
+
}).array().optional(),
|
|
173
|
+
achievements: zod_openapi_1.z.object({
|
|
174
|
+
title: zod_openapi_1.z.string(),
|
|
175
|
+
description: zod_openapi_1.z.string(),
|
|
176
|
+
link: zod_openapi_1.z.string().optional(),
|
|
177
|
+
year: zod_openapi_1.z.number().int().optional(),
|
|
178
|
+
}).array().optional(),
|
|
133
179
|
})
|
|
134
180
|
.openapi({
|
|
135
181
|
title: "update creative profile",
|
|
@@ -144,7 +190,7 @@ exports.GetCreativeOutputSchema = exports.CreativeEntitySchema;
|
|
|
144
190
|
exports.UpdateCreativeOutputSchema = exports.CreativeEntitySchema;
|
|
145
191
|
exports.CreativeWithUserEntitySchema = exports.CreativeEntitySchema.extend({
|
|
146
192
|
user: user_1.MinimalUserSchema,
|
|
147
|
-
});
|
|
193
|
+
}).optional();
|
|
148
194
|
exports.SearchCreativeInputSchema = zod_openapi_1.z.object({
|
|
149
195
|
string: zod_openapi_1.z
|
|
150
196
|
.string()
|