@zyacreatives/shared 2.1.43 → 2.1.45

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.
@@ -37,15 +37,15 @@ export declare const CreativeEntitySchema: z.ZodObject<{
37
37
  description: z.ZodString;
38
38
  }, z.core.$strip>>>;
39
39
  links: z.ZodOptional<z.ZodArray<z.ZodObject<{
40
- url: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
41
- type: z.ZodOptional<z.ZodEnum<{
40
+ url: z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>;
41
+ type: z.ZodEnum<{
42
42
  readonly INSTAGRAM: "Instagram";
43
43
  readonly LINKEDIN: "LinkedIn";
44
44
  readonly TWITTER: "Twitter";
45
45
  readonly YOUTUBE: "Youtube";
46
46
  readonly PORTFOLIO: "Portfolio Website";
47
47
  readonly GENERIC_WEBSITE: "Generic Website";
48
- }>>;
48
+ }>;
49
49
  }, z.core.$strip>>>;
50
50
  achievements: z.ZodOptional<z.ZodArray<z.ZodObject<{
51
51
  title: z.ZodString;
@@ -95,7 +95,7 @@ export declare const UpdateCreativeProfileInputSchema: z.ZodObject<{
95
95
  position: z.ZodString;
96
96
  startDate: z.ZodOptional<z.ZodString>;
97
97
  endDate: z.ZodOptional<z.ZodString>;
98
- currentlyWorking: z.ZodOptional<z.ZodBoolean>;
98
+ currentlyWorking: z.ZodDefault<z.ZodBoolean>;
99
99
  description: z.ZodOptional<z.ZodString>;
100
100
  }, z.core.$strip>>>;
101
101
  links: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -150,15 +150,15 @@ export declare const CreateCreativeOutputSchema: z.ZodObject<{
150
150
  description: z.ZodString;
151
151
  }, z.core.$strip>>>;
152
152
  links: z.ZodOptional<z.ZodArray<z.ZodObject<{
153
- url: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
154
- type: z.ZodOptional<z.ZodEnum<{
153
+ url: z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>;
154
+ type: z.ZodEnum<{
155
155
  readonly INSTAGRAM: "Instagram";
156
156
  readonly LINKEDIN: "LinkedIn";
157
157
  readonly TWITTER: "Twitter";
158
158
  readonly YOUTUBE: "Youtube";
159
159
  readonly PORTFOLIO: "Portfolio Website";
160
160
  readonly GENERIC_WEBSITE: "Generic Website";
161
- }>>;
161
+ }>;
162
162
  }, z.core.$strip>>>;
163
163
  achievements: z.ZodOptional<z.ZodArray<z.ZodObject<{
164
164
  title: z.ZodString;
@@ -190,15 +190,15 @@ export declare const GetCreativeOutputSchema: z.ZodObject<{
190
190
  description: z.ZodString;
191
191
  }, z.core.$strip>>>;
192
192
  links: z.ZodOptional<z.ZodArray<z.ZodObject<{
193
- url: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
194
- type: z.ZodOptional<z.ZodEnum<{
193
+ url: z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>;
194
+ type: z.ZodEnum<{
195
195
  readonly INSTAGRAM: "Instagram";
196
196
  readonly LINKEDIN: "LinkedIn";
197
197
  readonly TWITTER: "Twitter";
198
198
  readonly YOUTUBE: "Youtube";
199
199
  readonly PORTFOLIO: "Portfolio Website";
200
200
  readonly GENERIC_WEBSITE: "Generic Website";
201
- }>>;
201
+ }>;
202
202
  }, z.core.$strip>>>;
203
203
  achievements: z.ZodOptional<z.ZodArray<z.ZodObject<{
204
204
  title: z.ZodString;
@@ -230,15 +230,15 @@ export declare const UpdateCreativeOutputSchema: z.ZodObject<{
230
230
  description: z.ZodString;
231
231
  }, z.core.$strip>>>;
232
232
  links: z.ZodOptional<z.ZodArray<z.ZodObject<{
233
- url: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
234
- type: z.ZodOptional<z.ZodEnum<{
233
+ url: z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>;
234
+ type: z.ZodEnum<{
235
235
  readonly INSTAGRAM: "Instagram";
236
236
  readonly LINKEDIN: "LinkedIn";
237
237
  readonly TWITTER: "Twitter";
238
238
  readonly YOUTUBE: "Youtube";
239
239
  readonly PORTFOLIO: "Portfolio Website";
240
240
  readonly GENERIC_WEBSITE: "Generic Website";
241
- }>>;
241
+ }>;
242
242
  }, z.core.$strip>>>;
243
243
  achievements: z.ZodOptional<z.ZodArray<z.ZodObject<{
244
244
  title: z.ZodString;
@@ -57,13 +57,11 @@ exports.CreativeEntitySchema = zod_openapi_1.z
57
57
  .optional(),
58
58
  links: zod_openapi_1.z
59
59
  .object({
60
- url: zod_openapi_1.z
61
- .union([
60
+ url: zod_openapi_1.z.union([
62
61
  zod_openapi_1.z.url({ message: "Please enter a valid URL" }),
63
62
  zod_openapi_1.z.literal(""),
64
- ])
65
- .optional(),
66
- type: zod_openapi_1.z.enum(constants_1.LINK_TYPES).optional(),
63
+ ]),
64
+ type: zod_openapi_1.z.enum(constants_1.LINK_TYPES),
67
65
  })
68
66
  .array()
69
67
  .optional(),
@@ -79,9 +77,7 @@ exports.CreativeEntitySchema = zod_openapi_1.z
79
77
  .date()
80
78
  .optional()
81
79
  .openapi({ example: "2025-10-13T09:00:00.000Z" }),
82
- updatedAt: zod_openapi_1.z.coerce
83
- .date()
84
- .openapi({ example: "2025-10-13T09:00:00.000Z" }),
80
+ updatedAt: zod_openapi_1.z.coerce.date().openapi({ example: "2025-10-13T09:00:00.000Z" }),
85
81
  })
86
82
  .openapi({
87
83
  title: "CreativeEntitySchema",
@@ -98,19 +94,10 @@ exports.ListCreativesInputSchema = zod_openapi_1.z
98
94
  .array(zod_openapi_1.z.enum(Object.values(constants_1.EXPERIENCE_LEVELS)))
99
95
  .optional()
100
96
  .openapi({
101
- example: [
102
- constants_1.EXPERIENCE_LEVELS.YEAR_1_3,
103
- constants_1.EXPERIENCE_LEVELS.YEAR_5_PLUS,
104
- ],
97
+ example: [constants_1.EXPERIENCE_LEVELS.YEAR_1_3, constants_1.EXPERIENCE_LEVELS.YEAR_5_PLUS],
105
98
  }),
106
99
  location: zod_openapi_1.z.string().optional().openapi({ example: "Los Angeles" }),
107
- page: zod_openapi_1.z
108
- .number()
109
- .int()
110
- .min(1)
111
- .default(1)
112
- .optional()
113
- .openapi({ example: 1 }),
100
+ page: zod_openapi_1.z.number().int().min(1).default(1).optional().openapi({ example: 1 }),
114
101
  perPage: zod_openapi_1.z
115
102
  .number()
116
103
  .int()
@@ -183,7 +170,7 @@ exports.UpdateCreativeProfileInputSchema = zod_openapi_1.z
183
170
  position: zod_openapi_1.z.string(),
184
171
  startDate: zod_openapi_1.z.string().optional(),
185
172
  endDate: zod_openapi_1.z.string().optional(),
186
- currentlyWorking: zod_openapi_1.z.boolean().optional(),
173
+ currentlyWorking: zod_openapi_1.z.boolean().default(false),
187
174
  description: zod_openapi_1.z.string().optional(),
188
175
  })
189
176
  .array()
@@ -135,15 +135,15 @@ export declare const UserProfileEntitySchema: z.ZodObject<{
135
135
  description: z.ZodString;
136
136
  }, z.core.$strip>>>;
137
137
  links: z.ZodOptional<z.ZodArray<z.ZodObject<{
138
- url: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
139
- type: z.ZodOptional<z.ZodEnum<{
138
+ url: z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>;
139
+ type: z.ZodEnum<{
140
140
  readonly INSTAGRAM: "Instagram";
141
141
  readonly LINKEDIN: "LinkedIn";
142
142
  readonly TWITTER: "Twitter";
143
143
  readonly YOUTUBE: "Youtube";
144
144
  readonly PORTFOLIO: "Portfolio Website";
145
145
  readonly GENERIC_WEBSITE: "Generic Website";
146
- }>>;
146
+ }>;
147
147
  }, z.core.$strip>>>;
148
148
  achievements: z.ZodOptional<z.ZodArray<z.ZodObject<{
149
149
  title: z.ZodString;
@@ -576,15 +576,15 @@ export declare const GetAuthenticatedUserProfileOutputSchema: z.ZodObject<{
576
576
  description: z.ZodString;
577
577
  }, z.core.$strip>>>;
578
578
  links: z.ZodOptional<z.ZodArray<z.ZodObject<{
579
- url: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
580
- type: z.ZodOptional<z.ZodEnum<{
579
+ url: z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>;
580
+ type: z.ZodEnum<{
581
581
  readonly INSTAGRAM: "Instagram";
582
582
  readonly LINKEDIN: "LinkedIn";
583
583
  readonly TWITTER: "Twitter";
584
584
  readonly YOUTUBE: "Youtube";
585
585
  readonly PORTFOLIO: "Portfolio Website";
586
586
  readonly GENERIC_WEBSITE: "Generic Website";
587
- }>>;
587
+ }>;
588
588
  }, z.core.$strip>>>;
589
589
  achievements: z.ZodOptional<z.ZodArray<z.ZodObject<{
590
590
  title: z.ZodString;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "2.1.43",
3
+ "version": "2.1.45",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -4,253 +4,236 @@ import { ProfileIdentifierSchema } from "./common";
4
4
  import { MinimalUserSchema } from "./user";
5
5
 
6
6
  export const MinimalCreativeEntitySchema = z.object({
7
+ id: z.cuid2().openapi({ example: "cre_cksd0v6q0000s9a5y8z7p3x9" }),
8
+ userId: z.cuid2().openapi({ example: "user_abc123" }),
9
+ bio: z.string().optional().openapi({
10
+ example: "A multi-disciplinary designer specializing in brand identity.",
11
+ }),
12
+ role: z.string().optional().openapi({ example: "Designer" }),
13
+ location: z.string().optional().openapi({ example: "London, UK" }),
14
+ experienceLevel: z
15
+ .enum(
16
+ Object.values(EXPERIENCE_LEVELS) as [
17
+ ExperienceLevel,
18
+ ...ExperienceLevel[]
19
+ ]
20
+ )
21
+ .optional()
22
+ .openapi({ example: EXPERIENCE_LEVELS.YEAR_0_1 }),
23
+
24
+ disciplines: z
25
+ .array(z.string())
26
+ .optional()
27
+ .openapi({ example: ["Design", "Art Direction"] }),
28
+ createdAt: z.coerce
29
+ .date()
30
+ .optional()
31
+ .openapi({ example: "2025-10-13T09:00:00.000Z" }),
32
+ updatedAt: z.coerce.date().openapi({ example: "2025-10-13T09:00:00.000Z" }),
33
+ });
34
+
35
+ export const CreativeEntitySchema = z
36
+ .object({
7
37
  id: z.cuid2().openapi({ example: "cre_cksd0v6q0000s9a5y8z7p3x9" }),
8
38
  userId: z.cuid2().openapi({ example: "user_abc123" }),
9
39
  bio: z.string().optional().openapi({
10
- example:
11
- "A multi-disciplinary designer specializing in brand identity.",
40
+ example: "A multi-disciplinary designer specializing in brand identity.",
12
41
  }),
13
42
  role: z.string().optional().openapi({ example: "Designer" }),
14
43
  location: z.string().optional().openapi({ example: "London, UK" }),
15
44
  experienceLevel: z
16
- .enum(
17
- Object.values(EXPERIENCE_LEVELS) as [
18
- ExperienceLevel,
19
- ...ExperienceLevel[],
20
- ],
21
- )
22
- .optional()
23
- .openapi({ example: EXPERIENCE_LEVELS.YEAR_0_1 }),
45
+ .enum(
46
+ Object.values(EXPERIENCE_LEVELS) as [
47
+ ExperienceLevel,
48
+ ...ExperienceLevel[]
49
+ ]
50
+ )
51
+ .optional()
52
+ .openapi({ example: EXPERIENCE_LEVELS.YEAR_0_1 }),
24
53
 
25
54
  disciplines: z
26
- .array(z.string())
27
- .optional()
28
- .openapi({ example: ["Design", "Art Direction"] }),
55
+ .array(z.string())
56
+ .optional()
57
+ .openapi({ example: ["Design", "Art Direction"] }),
58
+ workExperience: z
59
+ .object({
60
+ companyName: z.string(),
61
+ position: z.string(),
62
+ startDate: z.coerce.date().optional(),
63
+ endDate: z.coerce.date().optional(),
64
+ currentlyWorking: z.boolean().optional(),
65
+ description: z.string(),
66
+ })
67
+ .array()
68
+ .optional(),
69
+ links: z
70
+ .object({
71
+ url: z.union([
72
+ z.url({ message: "Please enter a valid URL" }),
73
+ z.literal(""),
74
+ ]),
75
+ type: z.enum(LINK_TYPES),
76
+ })
77
+ .array()
78
+ .optional(),
79
+ achievements: z
80
+ .object({
81
+ title: z.string(),
82
+ link: z.string().optional(),
83
+ year: z.coerce.number().int().optional(),
84
+ })
85
+ .array()
86
+ .optional(),
29
87
  createdAt: z.coerce
30
- .date()
31
- .optional()
32
- .openapi({ example: "2025-10-13T09:00:00.000Z" }),
33
- updatedAt: z.coerce.date().openapi({ example: "2025-10-13T09:00:00.000Z" }),
34
- });
35
-
36
- export const CreativeEntitySchema = z
37
- .object({
38
- id: z.cuid2().openapi({ example: "cre_cksd0v6q0000s9a5y8z7p3x9" }),
39
- userId: z.cuid2().openapi({ example: "user_abc123" }),
40
- bio: z.string().optional().openapi({
41
- example:
42
- "A multi-disciplinary designer specializing in brand identity.",
43
- }),
44
- role: z.string().optional().openapi({ example: "Designer" }),
45
- location: z.string().optional().openapi({ example: "London, UK" }),
46
- experienceLevel: z
47
- .enum(
48
- Object.values(EXPERIENCE_LEVELS) as [
49
- ExperienceLevel,
50
- ...ExperienceLevel[],
51
- ],
52
- )
53
- .optional()
54
- .openapi({ example: EXPERIENCE_LEVELS.YEAR_0_1 }),
88
+ .date()
89
+ .optional()
90
+ .openapi({ example: "2025-10-13T09:00:00.000Z" }),
55
91
 
56
- disciplines: z
57
- .array(z.string())
58
- .optional()
59
- .openapi({ example: ["Design", "Art Direction"] }),
60
- workExperience: z
61
- .object({
62
- companyName: z.string(),
63
- position: z.string(),
64
- startDate: z.coerce.date().optional(),
65
- endDate: z.coerce.date().optional(),
66
- currentlyWorking: z.boolean().optional(),
67
- description: z.string(),
68
- })
69
- .array()
70
- .optional(),
71
- links: z
72
- .object({
73
- url: z
74
- .union([
75
- z.url({ message: "Please enter a valid URL" }),
76
- z.literal(""),
77
- ])
78
- .optional(),
79
- type: z.enum(LINK_TYPES).optional(),
80
- })
81
- .array()
82
- .optional(),
83
- achievements: z
84
- .object({
85
- title: z.string(),
86
- link: z.string().optional(),
87
- year: z.coerce.number().int().optional(),
88
- })
89
- .array()
90
- .optional(),
91
- createdAt: z.coerce
92
- .date()
93
- .optional()
94
- .openapi({ example: "2025-10-13T09:00:00.000Z" }),
95
-
96
- updatedAt: z.coerce
97
- .date()
98
- .openapi({ example: "2025-10-13T09:00:00.000Z" }),
99
- })
100
- .openapi({
101
- title: "CreativeEntitySchema",
102
- description:
103
- "Represents a creative profile, including bio, experience level, location, disciplines and timestamps.",
104
- });
92
+ updatedAt: z.coerce.date().openapi({ example: "2025-10-13T09:00:00.000Z" }),
93
+ })
94
+ .openapi({
95
+ title: "CreativeEntitySchema",
96
+ description:
97
+ "Represents a creative profile, including bio, experience level, location, disciplines and timestamps.",
98
+ });
105
99
 
106
100
  export const ListCreativesInputSchema = z
107
- .object({
108
- query: z.string().optional().openapi({ example: "logo designer" }),
101
+ .object({
102
+ query: z.string().optional().openapi({ example: "logo designer" }),
109
103
 
110
- disciplines: z
111
- .array(z.string())
112
- .optional()
113
- .openapi({ example: ["branding", "web design"] }),
104
+ disciplines: z
105
+ .array(z.string())
106
+ .optional()
107
+ .openapi({ example: ["branding", "web design"] }),
114
108
 
115
- experienceLevels: z
116
- .array(
117
- z.enum(
118
- Object.values(EXPERIENCE_LEVELS) as [
119
- ExperienceLevel,
120
- ...ExperienceLevel[],
121
- ],
122
- ),
123
- )
124
- .optional()
125
- .openapi({
126
- example: [
127
- EXPERIENCE_LEVELS.YEAR_1_3,
128
- EXPERIENCE_LEVELS.YEAR_5_PLUS,
129
- ],
130
- }),
109
+ experienceLevels: z
110
+ .array(
111
+ z.enum(
112
+ Object.values(EXPERIENCE_LEVELS) as [
113
+ ExperienceLevel,
114
+ ...ExperienceLevel[]
115
+ ]
116
+ )
117
+ )
118
+ .optional()
119
+ .openapi({
120
+ example: [EXPERIENCE_LEVELS.YEAR_1_3, EXPERIENCE_LEVELS.YEAR_5_PLUS],
121
+ }),
131
122
 
132
- location: z.string().optional().openapi({ example: "Los Angeles" }),
123
+ location: z.string().optional().openapi({ example: "Los Angeles" }),
133
124
 
134
- page: z
135
- .number()
136
- .int()
137
- .min(1)
138
- .default(1)
139
- .optional()
140
- .openapi({ example: 1 }),
125
+ page: z.number().int().min(1).default(1).optional().openapi({ example: 1 }),
141
126
 
142
- perPage: z
143
- .number()
144
- .int()
145
- .min(1)
146
- .max(100)
147
- .default(20)
148
- .optional()
149
- .openapi({ example: 20 }),
150
- })
151
- .openapi({
152
- title: "ListCreativesInput",
153
- description:
154
- "Query parameters for filtering and paginating creatives. Supports text search, discipline filtering, experience level filtering, tag filtering, location filtering, and pagination settings.",
155
- });
127
+ perPage: z
128
+ .number()
129
+ .int()
130
+ .min(1)
131
+ .max(100)
132
+ .default(20)
133
+ .optional()
134
+ .openapi({ example: 20 }),
135
+ })
136
+ .openapi({
137
+ title: "ListCreativesInput",
138
+ description:
139
+ "Query parameters for filtering and paginating creatives. Supports text search, discipline filtering, experience level filtering, tag filtering, location filtering, and pagination settings.",
140
+ });
156
141
 
157
142
  export const CreateCreativeProfileInputSchema = z
158
- .object({
159
- experienceLevel: z
160
- .enum(EXPERIENCE_LEVELS)
161
- .describe("Overall experience range of the creative.")
162
- .default(EXPERIENCE_LEVELS.YEAR_0_1)
163
- .openapi({
164
- example: EXPERIENCE_LEVELS.YEAR_1_3,
165
- }),
166
- role: z.string().optional().openapi({ example: "Designer" }),
143
+ .object({
144
+ experienceLevel: z
145
+ .enum(EXPERIENCE_LEVELS)
146
+ .describe("Overall experience range of the creative.")
147
+ .default(EXPERIENCE_LEVELS.YEAR_0_1)
148
+ .openapi({
149
+ example: EXPERIENCE_LEVELS.YEAR_1_3,
150
+ }),
151
+ role: z.string().optional().openapi({ example: "Designer" }),
167
152
 
168
- location: z
169
- .string()
170
- .max(100)
171
- .optional()
172
- .describe("Primary location where the creative works or resides.")
173
- .openapi({
174
- example: "Lagos, Nigeria",
175
- }),
153
+ location: z
154
+ .string()
155
+ .max(100)
156
+ .optional()
157
+ .describe("Primary location where the creative works or resides.")
158
+ .openapi({
159
+ example: "Lagos, Nigeria",
160
+ }),
176
161
 
177
- disciplineSlugs: z
178
- .array(z.string())
179
- .min(1, "At least one discipline is required")
180
- .default([])
181
- .describe(
182
- "List of discipline slugs representing the creative’s fields.",
183
- )
184
- .openapi({
185
- example: ["ui-ux", "frontend"],
186
- }),
187
- })
188
- .openapi({
189
- title: "create creative profile",
190
- description: "Payload for creating a new creative profile.",
191
- });
162
+ disciplineSlugs: z
163
+ .array(z.string())
164
+ .min(1, "At least one discipline is required")
165
+ .default([])
166
+ .describe("List of discipline slugs representing the creative’s fields.")
167
+ .openapi({
168
+ example: ["ui-ux", "frontend"],
169
+ }),
170
+ })
171
+ .openapi({
172
+ title: "create creative profile",
173
+ description: "Payload for creating a new creative profile.",
174
+ });
192
175
 
193
176
  export const UpdateCreativeProfileInputSchema = z
194
- .object({
195
- experienceLevel: z
196
- .enum(EXPERIENCE_LEVELS)
197
- .optional()
198
- .openapi({ example: EXPERIENCE_LEVELS.YEAR_3_5 }),
199
- role: z.string().optional().openapi({ example: "Designer" }),
200
- bio: z
201
- .string()
202
- .max(600)
203
- .optional()
204
- .openapi({ example: "I am a freelance UI/UX designer." }),
205
- location: z
206
- .string()
207
- .max(100)
208
- .optional()
209
- .openapi({ example: "Lagos, Nigeria" }),
210
- disciplineSlugs: z
211
- .array(z.string())
212
- .min(1, "At least one discipline is required")
213
- .optional()
214
- .openapi({ example: ["frontend", "ui-ux"] }),
215
- workExperience: z
216
- .object({
217
- companyName: z.string(),
218
- position: z.string(),
219
- startDate: z.string().optional(),
220
- endDate: z.string().optional(),
221
- currentlyWorking: z.boolean().optional(),
222
- description: z.string().optional(),
223
- })
224
- .array()
225
- .optional(),
226
- links: z
227
- .object({
228
- url: z
229
- .union([
230
- z.url({ message: "Please enter a valid URL" }),
231
- z.literal(""),
232
- ])
233
- .optional(),
234
- type: z.enum(LINK_TYPES).optional(),
235
- })
236
- .array()
237
- .optional(),
238
- achievements: z
239
- .object({
240
- title: z.string(),
241
- link: z.string().optional(),
242
- year: z.coerce.number().int().optional(),
243
- })
244
- .array()
245
- .optional(),
246
- })
247
- .openapi({
248
- title: "update creative profile",
249
- });
177
+ .object({
178
+ experienceLevel: z
179
+ .enum(EXPERIENCE_LEVELS)
180
+ .optional()
181
+ .openapi({ example: EXPERIENCE_LEVELS.YEAR_3_5 }),
182
+ role: z.string().optional().openapi({ example: "Designer" }),
183
+ bio: z
184
+ .string()
185
+ .max(600)
186
+ .optional()
187
+ .openapi({ example: "I am a freelance UI/UX designer." }),
188
+ location: z
189
+ .string()
190
+ .max(100)
191
+ .optional()
192
+ .openapi({ example: "Lagos, Nigeria" }),
193
+ disciplineSlugs: z
194
+ .array(z.string())
195
+ .min(1, "At least one discipline is required")
196
+ .optional()
197
+ .openapi({ example: ["frontend", "ui-ux"] }),
198
+ workExperience: z
199
+ .object({
200
+ companyName: z.string(),
201
+ position: z.string(),
202
+ startDate: z.string().optional(),
203
+ endDate: z.string().optional(),
204
+ currentlyWorking: z.boolean().default(false),
205
+ description: z.string().optional(),
206
+ })
207
+ .array()
208
+ .optional(),
209
+ links: z
210
+ .object({
211
+ url: z
212
+ .union([
213
+ z.url({ message: "Please enter a valid URL" }),
214
+ z.literal(""),
215
+ ])
216
+ .optional(),
217
+ type: z.enum(LINK_TYPES).optional(),
218
+ })
219
+ .array()
220
+ .optional(),
221
+ achievements: z
222
+ .object({
223
+ title: z.string(),
224
+ link: z.string().optional(),
225
+ year: z.coerce.number().int().optional(),
226
+ })
227
+ .array()
228
+ .optional(),
229
+ })
230
+ .openapi({
231
+ title: "update creative profile",
232
+ });
250
233
 
251
234
  export const GetCreativeInputSchema = z.object({
252
- value: z.cuid2(),
253
- by: ProfileIdentifierSchema.shape.by,
235
+ value: z.cuid2(),
236
+ by: ProfileIdentifierSchema.shape.by,
254
237
  });
255
238
 
256
239
  export const GetCreativeQuerySchema = ProfileIdentifierSchema;
@@ -262,24 +245,24 @@ export const GetCreativeOutputSchema = CreativeEntitySchema;
262
245
  export const UpdateCreativeOutputSchema = CreativeEntitySchema;
263
246
 
264
247
  export const CreativeWithUserEntitySchema = MinimalCreativeEntitySchema.extend({
265
- user: MinimalUserSchema,
248
+ user: MinimalUserSchema,
266
249
  });
267
250
 
268
251
  export const SearchCreativeInputSchema = z.object({
269
- string: z
270
- .string()
271
- .min(1, { message: "Search string cannot be empty" })
272
- .max(200, { message: "Search string cannot exceed 200 characters" }),
273
- limit: z.coerce
274
- .number()
275
- .int({ message: "Limit must be an integer" })
276
- .min(1, { message: "Limit must be at least 1" })
277
- .max(100, { message: "Limit cannot exceed 100" })
278
- .default(20),
279
- cursor: z.string().optional(),
252
+ string: z
253
+ .string()
254
+ .min(1, { message: "Search string cannot be empty" })
255
+ .max(200, { message: "Search string cannot exceed 200 characters" }),
256
+ limit: z.coerce
257
+ .number()
258
+ .int({ message: "Limit must be an integer" })
259
+ .min(1, { message: "Limit must be at least 1" })
260
+ .max(100, { message: "Limit cannot exceed 100" })
261
+ .default(20),
262
+ cursor: z.string().optional(),
280
263
  });
281
264
 
282
265
  export const SearchCreativeOutputSchema = z.object({
283
- creatives: z.array(CreativeWithUserEntitySchema),
284
- nextCursor: z.string().optional().nullable(),
266
+ creatives: z.array(CreativeWithUserEntitySchema),
267
+ nextCursor: z.string().optional().nullable(),
285
268
  });