@zyacreatives/shared 2.0.62 → 2.0.64

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.
@@ -1,10 +1,31 @@
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
+ tags: zod_openapi_1.z
21
+ .array(zod_openapi_1.z.string())
22
+ .optional()
23
+ .openapi({ example: ["branding", "typography", "UX"] }),
24
+ disciplines: zod_openapi_1.z
25
+ .array(zod_openapi_1.z.string())
26
+ .optional()
27
+ .openapi({ example: ["Design", "Art Direction"] }),
28
+ });
8
29
  exports.CreativeEntitySchema = zod_openapi_1.z
9
30
  .object({
10
31
  id: zod_openapi_1.z.cuid2().openapi({ example: "cre_cksd0v6q0000s9a5y8z7p3x9" }),
@@ -12,6 +33,7 @@ exports.CreativeEntitySchema = zod_openapi_1.z
12
33
  bio: zod_openapi_1.z.string().optional().openapi({
13
34
  example: "A multi-disciplinary designer specializing in brand identity.",
14
35
  }),
36
+ role: zod_openapi_1.z.string().optional().openapi({ example: "Designer" }),
15
37
  location: zod_openapi_1.z.string().optional().openapi({ example: "London, UK" }),
16
38
  experienceLevel: zod_openapi_1.z
17
39
  .enum(Object.values(constants_1.EXPERIENCE_LEVELS))
@@ -25,6 +47,25 @@ exports.CreativeEntitySchema = zod_openapi_1.z
25
47
  .array(zod_openapi_1.z.string())
26
48
  .optional()
27
49
  .openapi({ example: ["Design", "Art Direction"] }),
50
+ workExperience: zod_openapi_1.z.object({
51
+ companyName: zod_openapi_1.z.string(),
52
+ position: zod_openapi_1.z.string(),
53
+ startDate: zod_openapi_1.z.coerce.date().optional(),
54
+ endDate: zod_openapi_1.z.coerce.date().optional(),
55
+ currentlyWorking: zod_openapi_1.z.boolean().optional(),
56
+ description: zod_openapi_1.z.string().optional(),
57
+ }).array().optional(),
58
+ links: zod_openapi_1.z.object({
59
+ name: zod_openapi_1.z.string(),
60
+ url: zod_openapi_1.z.string(),
61
+ type: zod_openapi_1.z.enum(constants_1.LINK_TYPES).default(constants_1.LINK_TYPES.GENERIC_WEBSITE),
62
+ }).array().optional(),
63
+ achievements: zod_openapi_1.z.object({
64
+ title: zod_openapi_1.z.string(),
65
+ description: zod_openapi_1.z.string(),
66
+ link: zod_openapi_1.z.string().optional(),
67
+ year: zod_openapi_1.z.number().int().optional(),
68
+ }).array().optional(),
28
69
  createdAt: zod_openapi_1.z.coerce
29
70
  .date()
30
71
  .optional()
@@ -76,14 +117,7 @@ exports.CreateCreativeProfileInputSchema = zod_openapi_1.z
76
117
  .openapi({
77
118
  example: constants_1.EXPERIENCE_LEVELS.YEAR_1_3,
78
119
  }),
79
- bio: zod_openapi_1.z
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
- }),
120
+ role: zod_openapi_1.z.string().optional().openapi({ example: "Designer" }),
87
121
  location: zod_openapi_1.z
88
122
  .string()
89
123
  .max(100)
@@ -115,6 +149,7 @@ exports.UpdateCreativeProfileInputSchema = zod_openapi_1.z
115
149
  .array(zod_openapi_1.z.string())
116
150
  .optional()
117
151
  .openapi({ example: ["react", "design", "product"] }),
152
+ role: zod_openapi_1.z.string().optional().openapi({ example: "Designer" }),
118
153
  bio: zod_openapi_1.z
119
154
  .string()
120
155
  .max(210)
@@ -130,6 +165,25 @@ exports.UpdateCreativeProfileInputSchema = zod_openapi_1.z
130
165
  .min(1, "At least one discipline is required")
131
166
  .optional()
132
167
  .openapi({ example: ["frontend", "ui-ux"] }),
168
+ workExperience: zod_openapi_1.z.object({
169
+ companyName: zod_openapi_1.z.string(),
170
+ position: zod_openapi_1.z.string(),
171
+ startDate: zod_openapi_1.z.coerce.date().optional(),
172
+ endDate: zod_openapi_1.z.coerce.date().optional(),
173
+ currentlyWorking: zod_openapi_1.z.boolean().optional(),
174
+ description: zod_openapi_1.z.string().optional(),
175
+ }).array().optional(),
176
+ links: zod_openapi_1.z.object({
177
+ name: zod_openapi_1.z.string(),
178
+ url: zod_openapi_1.z.string(),
179
+ type: zod_openapi_1.z.enum(constants_1.LINK_TYPES).default(constants_1.LINK_TYPES.GENERIC_WEBSITE),
180
+ }).array().optional(),
181
+ achievements: zod_openapi_1.z.object({
182
+ title: zod_openapi_1.z.string(),
183
+ description: zod_openapi_1.z.string(),
184
+ link: zod_openapi_1.z.string().optional(),
185
+ year: zod_openapi_1.z.number().int().optional(),
186
+ }).array().optional(),
133
187
  })
134
188
  .openapi({
135
189
  title: "update creative profile",
@@ -142,9 +196,9 @@ exports.GetCreativeQuerySchema = common_1.ProfileIdentifierSchema;
142
196
  exports.CreateCreativeOutputSchema = exports.CreativeEntitySchema;
143
197
  exports.GetCreativeOutputSchema = exports.CreativeEntitySchema;
144
198
  exports.UpdateCreativeOutputSchema = exports.CreativeEntitySchema;
145
- exports.CreativeWithUserEntitySchema = exports.CreativeEntitySchema.extend({
199
+ exports.CreativeWithUserEntitySchema = exports.MinimalCreativeEntitySchema.extend({
146
200
  user: user_1.MinimalUserSchema,
147
- });
201
+ }).optional();
148
202
  exports.SearchCreativeInputSchema = zod_openapi_1.z.object({
149
203
  string: zod_openapi_1.z
150
204
  .string()
@@ -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>;
@@ -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>;
@@ -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<{
@@ -1,5 +1,5 @@
1
1
  import { z } from "@hono/zod-openapi";
2
- import { BrandEntitySchema, ListBrandsInputSchema, CreateBrandProfileInputSchema, UpdateBrandProfileInputSchema, GetBrandInputSchema, CreateBrandOutputSchema, GetBrandOutputSchema, UpdateBrandOutputSchema, BrandWithUserEntitySchema, SearchBrandInputSchema, SearchBrandOutputSchema } 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>;
@@ -11,3 +11,4 @@ export type UpdateBrandOutput = z.infer<typeof UpdateBrandOutputSchema>;
11
11
  export type BrandWithUserEntity = z.infer<typeof BrandWithUserEntitySchema>;
12
12
  export type SearchBrandInput = z.infer<typeof SearchBrandInputSchema>;
13
13
  export type SearchBrandOutput = z.infer<typeof SearchBrandOutputSchema>;
14
+ export type MinimalBrandEntity = z.infer<typeof MinimalBrandEntitySchema>;
@@ -1,5 +1,5 @@
1
1
  import { z } from "@hono/zod-openapi";
2
- import { CreativeEntitySchema, ListCreativesInputSchema, CreateCreativeProfileInputSchema, UpdateCreativeProfileInputSchema, GetCreativeInputSchema, CreateCreativeOutputSchema, GetCreativeOutputSchema, UpdateCreativeOutputSchema, CreativeWithUserEntitySchema, SearchCreativeInputSchema, SearchCreativeOutputSchema } 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>;
@@ -11,3 +11,4 @@ export type UpdateCreativeOutput = z.infer<typeof UpdateCreativeOutputSchema>;
11
11
  export type CreativeWithUserEntity = z.infer<typeof CreativeWithUserEntitySchema>;
12
12
  export type SearchCreativeInput = z.infer<typeof SearchCreativeInputSchema>;
13
13
  export type SearchCreativeOutput = z.infer<typeof SearchCreativeOutputSchema>;
14
+ export type MinimalCreativeEntity = z.infer<typeof MinimalCreativeEntitySchema>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "2.0.62",
3
+ "version": "2.0.64",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
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];
@@ -1,8 +1,28 @@
1
1
  import { z } from "@hono/zod-openapi";
2
- import { CuidSchema, ProfileIdentifierSchema } from "./common";
3
- import { EXPERIENCE_LEVELS, ExperienceLevel } from "../constants";
2
+ import { ProfileIdentifierSchema } from "./common";
3
+ import { EXPERIENCE_LEVELS, ExperienceLevel, LINK_TYPES } from "../constants";
4
4
  import { MinimalUserSchema } from "./user";
5
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
+ })
25
+
6
26
  export const BrandEntitySchema = z
7
27
  .object({
8
28
  id: z.cuid2().openapi({ example: "brd_cksd0v6q0000s9a5y8z7p3x9" }),
@@ -20,6 +40,18 @@ export const BrandEntitySchema = z
20
40
  .array(z.string())
21
41
  .optional()
22
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(),
23
55
  createdAt: z.coerce
24
56
  .date()
25
57
  .optional()
@@ -73,13 +105,6 @@ export const CreateBrandProfileInputSchema = z
73
105
  .string()
74
106
  .min(1, "Brand name is required")
75
107
  .openapi({ example: "Acme Creative Studio" }),
76
- bio: z
77
- .string()
78
- .max(210)
79
- .optional()
80
- .openapi({
81
- example: "We help brands tell their stories through design.",
82
- }),
83
108
  tags: z
84
109
  .array(z.string())
85
110
  .optional()
@@ -97,6 +122,17 @@ export const CreateBrandProfileInputSchema = z
97
122
  export const UpdateBrandProfileInputSchema = z
98
123
  .object({
99
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(),
100
136
  bio: z
101
137
  .string()
102
138
  .max(210)
@@ -150,4 +186,4 @@ export const SearchBrandInputSchema = z.object({
150
186
  export const SearchBrandOutputSchema = z.object({
151
187
  brands: z.array(BrandWithUserEntitySchema),
152
188
  nextCursor: z.string().optional(),
153
- })
189
+ })