@zyacreatives/shared 2.0.61 → 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 +208 -1
- package/dist/schemas/brand.js +74 -8
- package/dist/schemas/creative.d.ts +269 -1
- package/dist/schemas/creative.js +76 -9
- package/dist/schemas/project.d.ts +5 -5
- package/dist/schemas/user.d.ts +124 -34
- package/dist/types/brand.d.ts +5 -1
- package/dist/types/creative.d.ts +5 -1
- package/package.json +1 -1
- package/src/constants.ts +11 -0
- package/src/schemas/brand.ts +84 -9
- package/src/schemas/creative.ts +87 -16
- package/src/types/brand.ts +10 -0
- package/src/types/creative.ts +9 -0
package/dist/schemas/user.d.ts
CHANGED
|
@@ -40,14 +40,14 @@ export declare const MinimalUserSchema: z.ZodObject<{
|
|
|
40
40
|
id: z.ZodCUID2;
|
|
41
41
|
username: z.ZodOptional<z.ZodString>;
|
|
42
42
|
email: z.ZodString;
|
|
43
|
-
name: z.ZodOptional<z.ZodString>;
|
|
44
|
-
image: z.ZodOptional<z.ZodString>;
|
|
45
43
|
role: z.ZodEnum<{
|
|
46
44
|
CREATIVE: "CREATIVE";
|
|
47
45
|
BRAND: "BRAND";
|
|
48
46
|
INVESTOR: "INVESTOR";
|
|
49
47
|
ADMIN: "ADMIN";
|
|
50
48
|
}>;
|
|
49
|
+
name: z.ZodOptional<z.ZodString>;
|
|
50
|
+
image: z.ZodOptional<z.ZodString>;
|
|
51
51
|
}, z.core.$strip>;
|
|
52
52
|
export declare const UserStatsEntitySchema: z.ZodObject<{
|
|
53
53
|
followerCount: z.ZodInt;
|
|
@@ -102,6 +102,24 @@ export declare const UserProfileEntitySchema: z.ZodObject<{
|
|
|
102
102
|
bio: z.ZodOptional<z.ZodString>;
|
|
103
103
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
104
104
|
disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
105
|
+
links: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
106
|
+
name: z.ZodString;
|
|
107
|
+
url: z.ZodString;
|
|
108
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
109
|
+
readonly INSTAGRAM: "Instagram";
|
|
110
|
+
readonly LINKEDIN: "LinkedIn";
|
|
111
|
+
readonly TWITTER: "Twitter";
|
|
112
|
+
readonly YOUTUBE: "Youtube";
|
|
113
|
+
readonly PORTFOLIO: "Portfolio Website";
|
|
114
|
+
readonly GENERIC_WEBSITE: "Generic Website";
|
|
115
|
+
}>>;
|
|
116
|
+
}, z.core.$strip>>>;
|
|
117
|
+
achievements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
118
|
+
title: z.ZodString;
|
|
119
|
+
description: z.ZodString;
|
|
120
|
+
link: z.ZodOptional<z.ZodString>;
|
|
121
|
+
year: z.ZodOptional<z.ZodNumber>;
|
|
122
|
+
}, z.core.$strip>>>;
|
|
105
123
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
106
124
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
107
125
|
}, z.core.$strip>;
|
|
@@ -109,6 +127,7 @@ export declare const UserProfileEntitySchema: z.ZodObject<{
|
|
|
109
127
|
id: z.ZodCUID2;
|
|
110
128
|
userId: z.ZodCUID2;
|
|
111
129
|
bio: z.ZodOptional<z.ZodString>;
|
|
130
|
+
role: z.ZodOptional<z.ZodString>;
|
|
112
131
|
location: z.ZodOptional<z.ZodString>;
|
|
113
132
|
experienceLevel: z.ZodOptional<z.ZodEnum<{
|
|
114
133
|
"0-1 year": "0-1 year";
|
|
@@ -118,6 +137,32 @@ export declare const UserProfileEntitySchema: z.ZodObject<{
|
|
|
118
137
|
}>>;
|
|
119
138
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
120
139
|
disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
140
|
+
workExperience: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
141
|
+
companyName: z.ZodString;
|
|
142
|
+
position: z.ZodString;
|
|
143
|
+
startDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
144
|
+
endDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
145
|
+
currentlyWorking: z.ZodOptional<z.ZodBoolean>;
|
|
146
|
+
description: z.ZodOptional<z.ZodString>;
|
|
147
|
+
}, z.core.$strip>>>;
|
|
148
|
+
links: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
149
|
+
name: z.ZodString;
|
|
150
|
+
url: z.ZodString;
|
|
151
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
152
|
+
readonly INSTAGRAM: "Instagram";
|
|
153
|
+
readonly LINKEDIN: "LinkedIn";
|
|
154
|
+
readonly TWITTER: "Twitter";
|
|
155
|
+
readonly YOUTUBE: "Youtube";
|
|
156
|
+
readonly PORTFOLIO: "Portfolio Website";
|
|
157
|
+
readonly GENERIC_WEBSITE: "Generic Website";
|
|
158
|
+
}>>;
|
|
159
|
+
}, z.core.$strip>>>;
|
|
160
|
+
achievements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
161
|
+
title: z.ZodString;
|
|
162
|
+
description: z.ZodString;
|
|
163
|
+
link: z.ZodOptional<z.ZodString>;
|
|
164
|
+
year: z.ZodOptional<z.ZodNumber>;
|
|
165
|
+
}, z.core.$strip>>>;
|
|
121
166
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
122
167
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
123
168
|
}, z.core.$strip>;
|
|
@@ -178,11 +223,11 @@ export declare const UserWithProjectsEntitySchema: z.ZodObject<{
|
|
|
178
223
|
userId: z.ZodString;
|
|
179
224
|
description: z.ZodOptional<z.ZodString>;
|
|
180
225
|
title: z.ZodString;
|
|
181
|
-
|
|
226
|
+
url: z.ZodOptional<z.ZodString>;
|
|
182
227
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
183
228
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
184
|
-
url: z.ZodOptional<z.ZodString>;
|
|
185
229
|
imagePlaceholderUrl: z.ZodString;
|
|
230
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
186
231
|
projectCreatorType: z.ZodEnum<{
|
|
187
232
|
readonly CREATIVE: "CREATIVE";
|
|
188
233
|
readonly BRAND: "BRAND";
|
|
@@ -217,8 +262,8 @@ export declare const UserWithProjectLikesEntitySchema: z.ZodObject<{
|
|
|
217
262
|
id: z.ZodString;
|
|
218
263
|
description: z.ZodOptional<z.ZodString>;
|
|
219
264
|
title: z.ZodString;
|
|
220
|
-
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
221
265
|
imagePlaceholderUrl: z.ZodString;
|
|
266
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
222
267
|
startDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
223
268
|
endDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
224
269
|
}, z.core.$strip>;
|
|
@@ -239,8 +284,8 @@ export declare const UserWithProjectBookmarksEntitySchema: z.ZodObject<{
|
|
|
239
284
|
id: z.ZodString;
|
|
240
285
|
description: z.ZodOptional<z.ZodString>;
|
|
241
286
|
title: z.ZodString;
|
|
242
|
-
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
243
287
|
imagePlaceholderUrl: z.ZodString;
|
|
288
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
244
289
|
startDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
245
290
|
endDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
246
291
|
}, z.core.$strip>;
|
|
@@ -258,52 +303,52 @@ export declare const UserWithFollowingEntitySchema: z.ZodObject<{
|
|
|
258
303
|
id: z.ZodCUID2;
|
|
259
304
|
username: z.ZodOptional<z.ZodString>;
|
|
260
305
|
email: z.ZodString;
|
|
261
|
-
name: z.ZodOptional<z.ZodString>;
|
|
262
|
-
image: z.ZodOptional<z.ZodString>;
|
|
263
306
|
role: z.ZodEnum<{
|
|
264
307
|
CREATIVE: "CREATIVE";
|
|
265
308
|
BRAND: "BRAND";
|
|
266
309
|
INVESTOR: "INVESTOR";
|
|
267
310
|
ADMIN: "ADMIN";
|
|
268
311
|
}>;
|
|
312
|
+
name: z.ZodOptional<z.ZodString>;
|
|
313
|
+
image: z.ZodOptional<z.ZodString>;
|
|
269
314
|
following: z.ZodArray<z.ZodObject<{
|
|
270
315
|
id: z.ZodCUID2;
|
|
271
316
|
username: z.ZodOptional<z.ZodString>;
|
|
272
317
|
email: z.ZodString;
|
|
273
|
-
name: z.ZodOptional<z.ZodString>;
|
|
274
|
-
image: z.ZodOptional<z.ZodString>;
|
|
275
318
|
role: z.ZodEnum<{
|
|
276
319
|
CREATIVE: "CREATIVE";
|
|
277
320
|
BRAND: "BRAND";
|
|
278
321
|
INVESTOR: "INVESTOR";
|
|
279
322
|
ADMIN: "ADMIN";
|
|
280
323
|
}>;
|
|
324
|
+
name: z.ZodOptional<z.ZodString>;
|
|
325
|
+
image: z.ZodOptional<z.ZodString>;
|
|
281
326
|
}, z.core.$strip>>;
|
|
282
327
|
}, z.core.$strip>;
|
|
283
328
|
export declare const UserWithFollowersEntitySchema: z.ZodObject<{
|
|
284
329
|
id: z.ZodCUID2;
|
|
285
330
|
username: z.ZodOptional<z.ZodString>;
|
|
286
331
|
email: z.ZodString;
|
|
287
|
-
name: z.ZodOptional<z.ZodString>;
|
|
288
|
-
image: z.ZodOptional<z.ZodString>;
|
|
289
332
|
role: z.ZodEnum<{
|
|
290
333
|
CREATIVE: "CREATIVE";
|
|
291
334
|
BRAND: "BRAND";
|
|
292
335
|
INVESTOR: "INVESTOR";
|
|
293
336
|
ADMIN: "ADMIN";
|
|
294
337
|
}>;
|
|
338
|
+
name: z.ZodOptional<z.ZodString>;
|
|
339
|
+
image: z.ZodOptional<z.ZodString>;
|
|
295
340
|
followers: z.ZodArray<z.ZodObject<{
|
|
296
341
|
id: z.ZodCUID2;
|
|
297
342
|
username: z.ZodOptional<z.ZodString>;
|
|
298
343
|
email: z.ZodString;
|
|
299
|
-
name: z.ZodOptional<z.ZodString>;
|
|
300
|
-
image: z.ZodOptional<z.ZodString>;
|
|
301
344
|
role: z.ZodEnum<{
|
|
302
345
|
CREATIVE: "CREATIVE";
|
|
303
346
|
BRAND: "BRAND";
|
|
304
347
|
INVESTOR: "INVESTOR";
|
|
305
348
|
ADMIN: "ADMIN";
|
|
306
349
|
}>;
|
|
350
|
+
name: z.ZodOptional<z.ZodString>;
|
|
351
|
+
image: z.ZodOptional<z.ZodString>;
|
|
307
352
|
}, z.core.$strip>>;
|
|
308
353
|
}, z.core.$strip>;
|
|
309
354
|
export declare const GetUserFollowingOutputSchema: z.ZodObject<{
|
|
@@ -311,26 +356,26 @@ export declare const GetUserFollowingOutputSchema: z.ZodObject<{
|
|
|
311
356
|
id: z.ZodCUID2;
|
|
312
357
|
username: z.ZodOptional<z.ZodString>;
|
|
313
358
|
email: z.ZodString;
|
|
314
|
-
name: z.ZodOptional<z.ZodString>;
|
|
315
|
-
image: z.ZodOptional<z.ZodString>;
|
|
316
359
|
role: z.ZodEnum<{
|
|
317
360
|
CREATIVE: "CREATIVE";
|
|
318
361
|
BRAND: "BRAND";
|
|
319
362
|
INVESTOR: "INVESTOR";
|
|
320
363
|
ADMIN: "ADMIN";
|
|
321
364
|
}>;
|
|
365
|
+
name: z.ZodOptional<z.ZodString>;
|
|
366
|
+
image: z.ZodOptional<z.ZodString>;
|
|
322
367
|
following: z.ZodArray<z.ZodObject<{
|
|
323
368
|
id: z.ZodCUID2;
|
|
324
369
|
username: z.ZodOptional<z.ZodString>;
|
|
325
370
|
email: z.ZodString;
|
|
326
|
-
name: z.ZodOptional<z.ZodString>;
|
|
327
|
-
image: z.ZodOptional<z.ZodString>;
|
|
328
371
|
role: z.ZodEnum<{
|
|
329
372
|
CREATIVE: "CREATIVE";
|
|
330
373
|
BRAND: "BRAND";
|
|
331
374
|
INVESTOR: "INVESTOR";
|
|
332
375
|
ADMIN: "ADMIN";
|
|
333
376
|
}>;
|
|
377
|
+
name: z.ZodOptional<z.ZodString>;
|
|
378
|
+
image: z.ZodOptional<z.ZodString>;
|
|
334
379
|
}, z.core.$strip>>;
|
|
335
380
|
}, z.core.$strip>;
|
|
336
381
|
}, z.core.$strip>;
|
|
@@ -339,26 +384,26 @@ export declare const GetUserFollowersOutputSchema: z.ZodObject<{
|
|
|
339
384
|
id: z.ZodCUID2;
|
|
340
385
|
username: z.ZodOptional<z.ZodString>;
|
|
341
386
|
email: z.ZodString;
|
|
342
|
-
name: z.ZodOptional<z.ZodString>;
|
|
343
|
-
image: z.ZodOptional<z.ZodString>;
|
|
344
387
|
role: z.ZodEnum<{
|
|
345
388
|
CREATIVE: "CREATIVE";
|
|
346
389
|
BRAND: "BRAND";
|
|
347
390
|
INVESTOR: "INVESTOR";
|
|
348
391
|
ADMIN: "ADMIN";
|
|
349
392
|
}>;
|
|
393
|
+
name: z.ZodOptional<z.ZodString>;
|
|
394
|
+
image: z.ZodOptional<z.ZodString>;
|
|
350
395
|
followers: z.ZodArray<z.ZodObject<{
|
|
351
396
|
id: z.ZodCUID2;
|
|
352
397
|
username: z.ZodOptional<z.ZodString>;
|
|
353
398
|
email: z.ZodString;
|
|
354
|
-
name: z.ZodOptional<z.ZodString>;
|
|
355
|
-
image: z.ZodOptional<z.ZodString>;
|
|
356
399
|
role: z.ZodEnum<{
|
|
357
400
|
CREATIVE: "CREATIVE";
|
|
358
401
|
BRAND: "BRAND";
|
|
359
402
|
INVESTOR: "INVESTOR";
|
|
360
403
|
ADMIN: "ADMIN";
|
|
361
404
|
}>;
|
|
405
|
+
name: z.ZodOptional<z.ZodString>;
|
|
406
|
+
image: z.ZodOptional<z.ZodString>;
|
|
362
407
|
}, z.core.$strip>>;
|
|
363
408
|
}, z.core.$strip>;
|
|
364
409
|
}, z.core.$strip>;
|
|
@@ -447,6 +492,24 @@ export declare const GetAuthenticatedUserProfileOutputSchema: z.ZodObject<{
|
|
|
447
492
|
bio: z.ZodOptional<z.ZodString>;
|
|
448
493
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
449
494
|
disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
495
|
+
links: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
496
|
+
name: z.ZodString;
|
|
497
|
+
url: z.ZodString;
|
|
498
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
499
|
+
readonly INSTAGRAM: "Instagram";
|
|
500
|
+
readonly LINKEDIN: "LinkedIn";
|
|
501
|
+
readonly TWITTER: "Twitter";
|
|
502
|
+
readonly YOUTUBE: "Youtube";
|
|
503
|
+
readonly PORTFOLIO: "Portfolio Website";
|
|
504
|
+
readonly GENERIC_WEBSITE: "Generic Website";
|
|
505
|
+
}>>;
|
|
506
|
+
}, z.core.$strip>>>;
|
|
507
|
+
achievements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
508
|
+
title: z.ZodString;
|
|
509
|
+
description: z.ZodString;
|
|
510
|
+
link: z.ZodOptional<z.ZodString>;
|
|
511
|
+
year: z.ZodOptional<z.ZodNumber>;
|
|
512
|
+
}, z.core.$strip>>>;
|
|
450
513
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
451
514
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
452
515
|
}, z.core.$strip>;
|
|
@@ -454,6 +517,7 @@ export declare const GetAuthenticatedUserProfileOutputSchema: z.ZodObject<{
|
|
|
454
517
|
id: z.ZodCUID2;
|
|
455
518
|
userId: z.ZodCUID2;
|
|
456
519
|
bio: z.ZodOptional<z.ZodString>;
|
|
520
|
+
role: z.ZodOptional<z.ZodString>;
|
|
457
521
|
location: z.ZodOptional<z.ZodString>;
|
|
458
522
|
experienceLevel: z.ZodOptional<z.ZodEnum<{
|
|
459
523
|
"0-1 year": "0-1 year";
|
|
@@ -463,6 +527,32 @@ export declare const GetAuthenticatedUserProfileOutputSchema: z.ZodObject<{
|
|
|
463
527
|
}>>;
|
|
464
528
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
465
529
|
disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
530
|
+
workExperience: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
531
|
+
companyName: z.ZodString;
|
|
532
|
+
position: z.ZodString;
|
|
533
|
+
startDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
534
|
+
endDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
535
|
+
currentlyWorking: z.ZodOptional<z.ZodBoolean>;
|
|
536
|
+
description: z.ZodOptional<z.ZodString>;
|
|
537
|
+
}, z.core.$strip>>>;
|
|
538
|
+
links: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
539
|
+
name: z.ZodString;
|
|
540
|
+
url: z.ZodString;
|
|
541
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
542
|
+
readonly INSTAGRAM: "Instagram";
|
|
543
|
+
readonly LINKEDIN: "LinkedIn";
|
|
544
|
+
readonly TWITTER: "Twitter";
|
|
545
|
+
readonly YOUTUBE: "Youtube";
|
|
546
|
+
readonly PORTFOLIO: "Portfolio Website";
|
|
547
|
+
readonly GENERIC_WEBSITE: "Generic Website";
|
|
548
|
+
}>>;
|
|
549
|
+
}, z.core.$strip>>>;
|
|
550
|
+
achievements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
551
|
+
title: z.ZodString;
|
|
552
|
+
description: z.ZodString;
|
|
553
|
+
link: z.ZodOptional<z.ZodString>;
|
|
554
|
+
year: z.ZodOptional<z.ZodNumber>;
|
|
555
|
+
}, z.core.$strip>>>;
|
|
466
556
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
467
557
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
468
558
|
}, z.core.$strip>;
|
|
@@ -523,11 +613,11 @@ export declare const GetAuthenticatedUserWithProjectsOutputSchema: z.ZodObject<{
|
|
|
523
613
|
userId: z.ZodString;
|
|
524
614
|
description: z.ZodOptional<z.ZodString>;
|
|
525
615
|
title: z.ZodString;
|
|
526
|
-
|
|
616
|
+
url: z.ZodOptional<z.ZodString>;
|
|
527
617
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
528
618
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
529
|
-
url: z.ZodOptional<z.ZodString>;
|
|
530
619
|
imagePlaceholderUrl: z.ZodString;
|
|
620
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
531
621
|
projectCreatorType: z.ZodEnum<{
|
|
532
622
|
readonly CREATIVE: "CREATIVE";
|
|
533
623
|
readonly BRAND: "BRAND";
|
|
@@ -562,8 +652,8 @@ export declare const GetAuthenticatedUserWithProjectBookmarksOutputSchema: z.Zod
|
|
|
562
652
|
id: z.ZodString;
|
|
563
653
|
description: z.ZodOptional<z.ZodString>;
|
|
564
654
|
title: z.ZodString;
|
|
565
|
-
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
566
655
|
imagePlaceholderUrl: z.ZodString;
|
|
656
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
567
657
|
startDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
568
658
|
endDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
569
659
|
}, z.core.$strip>;
|
|
@@ -573,52 +663,52 @@ export declare const GetAuthenticatedUserWithUserFollowingOutputSchema: z.ZodObj
|
|
|
573
663
|
id: z.ZodCUID2;
|
|
574
664
|
username: z.ZodOptional<z.ZodString>;
|
|
575
665
|
email: z.ZodString;
|
|
576
|
-
name: z.ZodOptional<z.ZodString>;
|
|
577
|
-
image: z.ZodOptional<z.ZodString>;
|
|
578
666
|
role: z.ZodEnum<{
|
|
579
667
|
CREATIVE: "CREATIVE";
|
|
580
668
|
BRAND: "BRAND";
|
|
581
669
|
INVESTOR: "INVESTOR";
|
|
582
670
|
ADMIN: "ADMIN";
|
|
583
671
|
}>;
|
|
672
|
+
name: z.ZodOptional<z.ZodString>;
|
|
673
|
+
image: z.ZodOptional<z.ZodString>;
|
|
584
674
|
following: z.ZodArray<z.ZodObject<{
|
|
585
675
|
id: z.ZodCUID2;
|
|
586
676
|
username: z.ZodOptional<z.ZodString>;
|
|
587
677
|
email: z.ZodString;
|
|
588
|
-
name: z.ZodOptional<z.ZodString>;
|
|
589
|
-
image: z.ZodOptional<z.ZodString>;
|
|
590
678
|
role: z.ZodEnum<{
|
|
591
679
|
CREATIVE: "CREATIVE";
|
|
592
680
|
BRAND: "BRAND";
|
|
593
681
|
INVESTOR: "INVESTOR";
|
|
594
682
|
ADMIN: "ADMIN";
|
|
595
683
|
}>;
|
|
684
|
+
name: z.ZodOptional<z.ZodString>;
|
|
685
|
+
image: z.ZodOptional<z.ZodString>;
|
|
596
686
|
}, z.core.$strip>>;
|
|
597
687
|
}, z.core.$strip>;
|
|
598
688
|
export declare const GetAuthenticatedUserWithUserFollowersOutputSchema: z.ZodObject<{
|
|
599
689
|
id: z.ZodCUID2;
|
|
600
690
|
username: z.ZodOptional<z.ZodString>;
|
|
601
691
|
email: z.ZodString;
|
|
602
|
-
name: z.ZodOptional<z.ZodString>;
|
|
603
|
-
image: z.ZodOptional<z.ZodString>;
|
|
604
692
|
role: z.ZodEnum<{
|
|
605
693
|
CREATIVE: "CREATIVE";
|
|
606
694
|
BRAND: "BRAND";
|
|
607
695
|
INVESTOR: "INVESTOR";
|
|
608
696
|
ADMIN: "ADMIN";
|
|
609
697
|
}>;
|
|
698
|
+
name: z.ZodOptional<z.ZodString>;
|
|
699
|
+
image: z.ZodOptional<z.ZodString>;
|
|
610
700
|
followers: z.ZodArray<z.ZodObject<{
|
|
611
701
|
id: z.ZodCUID2;
|
|
612
702
|
username: z.ZodOptional<z.ZodString>;
|
|
613
703
|
email: z.ZodString;
|
|
614
|
-
name: z.ZodOptional<z.ZodString>;
|
|
615
|
-
image: z.ZodOptional<z.ZodString>;
|
|
616
704
|
role: z.ZodEnum<{
|
|
617
705
|
CREATIVE: "CREATIVE";
|
|
618
706
|
BRAND: "BRAND";
|
|
619
707
|
INVESTOR: "INVESTOR";
|
|
620
708
|
ADMIN: "ADMIN";
|
|
621
709
|
}>;
|
|
710
|
+
name: z.ZodOptional<z.ZodString>;
|
|
711
|
+
image: z.ZodOptional<z.ZodString>;
|
|
622
712
|
}, z.core.$strip>>;
|
|
623
713
|
}, z.core.$strip>;
|
|
624
714
|
export declare const GetAuthenticatedUserWithProjectLikesOutputSchema: z.ZodObject<{
|
|
@@ -636,8 +726,8 @@ export declare const GetAuthenticatedUserWithProjectLikesOutputSchema: z.ZodObje
|
|
|
636
726
|
id: z.ZodString;
|
|
637
727
|
description: z.ZodOptional<z.ZodString>;
|
|
638
728
|
title: z.ZodString;
|
|
639
|
-
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
640
729
|
imagePlaceholderUrl: z.ZodString;
|
|
730
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
641
731
|
startDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
642
732
|
endDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
643
733
|
}, z.core.$strip>;
|
package/dist/types/brand.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "@hono/zod-openapi";
|
|
2
|
-
import { BrandEntitySchema, ListBrandsInputSchema, CreateBrandProfileInputSchema, UpdateBrandProfileInputSchema, GetBrandInputSchema, CreateBrandOutputSchema, GetBrandOutputSchema, UpdateBrandOutputSchema } from "../schemas/brand";
|
|
2
|
+
import { BrandEntitySchema, ListBrandsInputSchema, CreateBrandProfileInputSchema, UpdateBrandProfileInputSchema, GetBrandInputSchema, CreateBrandOutputSchema, GetBrandOutputSchema, UpdateBrandOutputSchema, BrandWithUserEntitySchema, SearchBrandInputSchema, SearchBrandOutputSchema, MinimalBrandEntitySchema } from "../schemas/brand";
|
|
3
3
|
export type BrandEntity = z.infer<typeof BrandEntitySchema>;
|
|
4
4
|
export type ListBrandsInput = z.infer<typeof ListBrandsInputSchema>;
|
|
5
5
|
export type CreateBrandProfileInput = z.infer<typeof CreateBrandProfileInputSchema>;
|
|
@@ -8,3 +8,7 @@ export type GetBrandInput = z.infer<typeof GetBrandInputSchema>;
|
|
|
8
8
|
export type CreateBrandOutput = z.infer<typeof CreateBrandOutputSchema>;
|
|
9
9
|
export type GetBrandOutput = z.infer<typeof GetBrandOutputSchema>;
|
|
10
10
|
export type UpdateBrandOutput = z.infer<typeof UpdateBrandOutputSchema>;
|
|
11
|
+
export type BrandWithUserEntity = z.infer<typeof BrandWithUserEntitySchema>;
|
|
12
|
+
export type SearchBrandInput = z.infer<typeof SearchBrandInputSchema>;
|
|
13
|
+
export type SearchBrandOutput = z.infer<typeof SearchBrandOutputSchema>;
|
|
14
|
+
export type MinimalBrandEntity = z.infer<typeof MinimalBrandEntitySchema>;
|
package/dist/types/creative.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "@hono/zod-openapi";
|
|
2
|
-
import { CreativeEntitySchema, ListCreativesInputSchema, CreateCreativeProfileInputSchema, UpdateCreativeProfileInputSchema, GetCreativeInputSchema, CreateCreativeOutputSchema, GetCreativeOutputSchema, UpdateCreativeOutputSchema } from "../schemas/creative";
|
|
2
|
+
import { CreativeEntitySchema, ListCreativesInputSchema, CreateCreativeProfileInputSchema, UpdateCreativeProfileInputSchema, GetCreativeInputSchema, CreateCreativeOutputSchema, GetCreativeOutputSchema, UpdateCreativeOutputSchema, CreativeWithUserEntitySchema, SearchCreativeInputSchema, SearchCreativeOutputSchema, MinimalCreativeEntitySchema } from "../schemas/creative";
|
|
3
3
|
export type CreativeEntity = z.infer<typeof CreativeEntitySchema>;
|
|
4
4
|
export type ListCreativesInput = z.infer<typeof ListCreativesInputSchema>;
|
|
5
5
|
export type CreateCreativeProfileInput = z.infer<typeof CreateCreativeProfileInputSchema>;
|
|
@@ -8,3 +8,7 @@ export type GetCreativeInput = z.infer<typeof GetCreativeInputSchema>;
|
|
|
8
8
|
export type CreateCreativeOutput = z.infer<typeof CreateCreativeOutputSchema>;
|
|
9
9
|
export type GetCreativeOutput = z.infer<typeof GetCreativeOutputSchema>;
|
|
10
10
|
export type UpdateCreativeOutput = z.infer<typeof UpdateCreativeOutputSchema>;
|
|
11
|
+
export type CreativeWithUserEntity = z.infer<typeof CreativeWithUserEntitySchema>;
|
|
12
|
+
export type SearchCreativeInput = z.infer<typeof SearchCreativeInputSchema>;
|
|
13
|
+
export type SearchCreativeOutput = z.infer<typeof SearchCreativeOutputSchema>;
|
|
14
|
+
export type MinimalCreativeEntity = z.infer<typeof MinimalCreativeEntitySchema>;
|
package/package.json
CHANGED
package/src/constants.ts
CHANGED
|
@@ -219,6 +219,16 @@ export const ACTIVITY_TYPES = {
|
|
|
219
219
|
UNBOOKMARK: "UNBOOKMARK",
|
|
220
220
|
VIEW: "VIEW",
|
|
221
221
|
} as const;
|
|
222
|
+
|
|
223
|
+
export const LINK_TYPES = {
|
|
224
|
+
INSTAGRAM: "Instagram",
|
|
225
|
+
LINKEDIN: "LinkedIn",
|
|
226
|
+
TWITTER: "Twitter",
|
|
227
|
+
YOUTUBE: "Youtube",
|
|
228
|
+
PORTFOLIO: "Portfolio Website",
|
|
229
|
+
GENERIC_WEBSITE: "Generic Website",
|
|
230
|
+
} as const;
|
|
231
|
+
|
|
222
232
|
export type ActivityType = (typeof ACTIVITY_TYPES)[keyof typeof ACTIVITY_TYPES];
|
|
223
233
|
export type PostBadgeType =
|
|
224
234
|
(typeof POST_BADGE_TYPES)[keyof typeof POST_BADGE_TYPES];
|
|
@@ -237,6 +247,7 @@ export type JobAvailabilityTypes =
|
|
|
237
247
|
export type WageTypes = (typeof WAGE_TYPES)[keyof typeof WAGE_TYPES];
|
|
238
248
|
export type PostType = (typeof POST_TYPES)[keyof typeof POST_TYPES];
|
|
239
249
|
export type MessageType = (typeof MESSAGE_TYPES)[keyof typeof MESSAGE_TYPES];
|
|
250
|
+
export type LinkType = (typeof LINK_TYPES)[keyof typeof LINK_TYPES];
|
|
240
251
|
export type ActivityParentType =
|
|
241
252
|
(typeof ACTIVITY_PARENT_TYPES)[keyof typeof ACTIVITY_PARENT_TYPES];
|
|
242
253
|
export type UserStatus = (typeof USER_STATUSES)[keyof typeof USER_STATUSES];
|
package/src/schemas/brand.ts
CHANGED
|
@@ -1,6 +1,27 @@
|
|
|
1
1
|
import { z } from "@hono/zod-openapi";
|
|
2
|
-
import {
|
|
3
|
-
import { EXPERIENCE_LEVELS, ExperienceLevel } from "../constants";
|
|
2
|
+
import { ProfileIdentifierSchema } from "./common";
|
|
3
|
+
import { EXPERIENCE_LEVELS, ExperienceLevel, LINK_TYPES } from "../constants";
|
|
4
|
+
import { MinimalUserSchema } from "./user";
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
export const MinimalBrandEntitySchema = z.object({
|
|
8
|
+
id: z.cuid2().openapi({ example: "brd_cksd0v6q0000s9a5y8z7p3x9" }),
|
|
9
|
+
userId: z.cuid2().openapi({ example: "user_owner_123" }),
|
|
10
|
+
brandName: z.string().openapi({ example: "TechInnovate Inc." }),
|
|
11
|
+
bio: z
|
|
12
|
+
.string()
|
|
13
|
+
.optional()
|
|
14
|
+
.openapi({ example: "Leading software development firm focused on AI." }),
|
|
15
|
+
tags: z
|
|
16
|
+
.array(z.string())
|
|
17
|
+
.optional()
|
|
18
|
+
.openapi({ example: ["technology", "saas", "startup"] }),
|
|
19
|
+
disciplines: z
|
|
20
|
+
.array(z.string())
|
|
21
|
+
.optional()
|
|
22
|
+
.openapi({ example: ["Marketing", "Product Development"] }),
|
|
23
|
+
|
|
24
|
+
})
|
|
4
25
|
|
|
5
26
|
export const BrandEntitySchema = z
|
|
6
27
|
.object({
|
|
@@ -19,6 +40,18 @@ export const BrandEntitySchema = z
|
|
|
19
40
|
.array(z.string())
|
|
20
41
|
.optional()
|
|
21
42
|
.openapi({ example: ["Marketing", "Product Development"] }),
|
|
43
|
+
|
|
44
|
+
links: z.object({
|
|
45
|
+
name: z.string(),
|
|
46
|
+
url: z.string(),
|
|
47
|
+
type: z.enum(LINK_TYPES).default(LINK_TYPES.GENERIC_WEBSITE),
|
|
48
|
+
}).array().optional(),
|
|
49
|
+
achievements: z.object({
|
|
50
|
+
title: z.string(),
|
|
51
|
+
description: z.string(),
|
|
52
|
+
link: z.string().optional(),
|
|
53
|
+
year: z.number().int().optional(),
|
|
54
|
+
}).array().optional(),
|
|
22
55
|
createdAt: z.coerce
|
|
23
56
|
.date()
|
|
24
57
|
.optional()
|
|
@@ -72,13 +105,6 @@ export const CreateBrandProfileInputSchema = z
|
|
|
72
105
|
.string()
|
|
73
106
|
.min(1, "Brand name is required")
|
|
74
107
|
.openapi({ example: "Acme Creative Studio" }),
|
|
75
|
-
bio: z
|
|
76
|
-
.string()
|
|
77
|
-
.max(210)
|
|
78
|
-
.optional()
|
|
79
|
-
.openapi({
|
|
80
|
-
example: "We help brands tell their stories through design.",
|
|
81
|
-
}),
|
|
82
108
|
tags: z
|
|
83
109
|
.array(z.string())
|
|
84
110
|
.optional()
|
|
@@ -96,6 +122,17 @@ export const CreateBrandProfileInputSchema = z
|
|
|
96
122
|
export const UpdateBrandProfileInputSchema = z
|
|
97
123
|
.object({
|
|
98
124
|
brandName: z.string().min(1).optional().openapi({ example: "Acme Studio" }),
|
|
125
|
+
links: z.object({
|
|
126
|
+
name: z.string(),
|
|
127
|
+
url: z.string(),
|
|
128
|
+
type: z.enum(LINK_TYPES).default(LINK_TYPES.GENERIC_WEBSITE),
|
|
129
|
+
}).array().optional(),
|
|
130
|
+
achievements: z.object({
|
|
131
|
+
title: z.string(),
|
|
132
|
+
description: z.string(),
|
|
133
|
+
link: z.string().optional(),
|
|
134
|
+
year: z.number().int().optional(),
|
|
135
|
+
}).array().optional(),
|
|
99
136
|
bio: z
|
|
100
137
|
.string()
|
|
101
138
|
.max(210)
|
|
@@ -127,3 +164,41 @@ export const CreateBrandOutputSchema = BrandEntitySchema;
|
|
|
127
164
|
export const GetBrandOutputSchema = BrandEntitySchema;
|
|
128
165
|
|
|
129
166
|
export const UpdateBrandOutputSchema = BrandEntitySchema;
|
|
167
|
+
|
|
168
|
+
export const BrandWithUserEntitySchema = BrandEntitySchema.extend({
|
|
169
|
+
user: MinimalUserSchema,
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
export const SearchBrandInputSchema = z.object({
|
|
173
|
+
string: z
|
|
174
|
+
.string()
|
|
175
|
+
.min(1, { message: "Search string cannot be empty" })
|
|
176
|
+
.max(200, { message: "Search string cannot exceed 200 characters" }),
|
|
177
|
+
limit: z.coerce
|
|
178
|
+
.number()
|
|
179
|
+
.int({ message: "Limit must be an integer" })
|
|
180
|
+
.min(1, { message: "Limit must be at least 1" })
|
|
181
|
+
.max(100, { message: "Limit cannot exceed 100" })
|
|
182
|
+
.default(20),
|
|
183
|
+
cursor: z.string().optional(),
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
export const SearchBrandOutputSchema = z.object({
|
|
187
|
+
brands: z.array(BrandWithUserEntitySchema),
|
|
188
|
+
nextCursor: z.string().optional(),
|
|
189
|
+
})
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
export const BrandAboutInputSchema = z.object({
|
|
193
|
+
links: z.object({
|
|
194
|
+
name: z.string(),
|
|
195
|
+
url: z.string(),
|
|
196
|
+
type: z.enum(LINK_TYPES).default(LINK_TYPES.GENERIC_WEBSITE),
|
|
197
|
+
}).array().optional(),
|
|
198
|
+
achievements: z.object({
|
|
199
|
+
title: z.string(),
|
|
200
|
+
description: z.string(),
|
|
201
|
+
link: z.string().optional(),
|
|
202
|
+
year: z.number().int().optional(),
|
|
203
|
+
}).array().optional(),
|
|
204
|
+
})
|