@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.
- package/dist/schemas/creative.d.ts +13 -13
- package/dist/schemas/creative.js +7 -20
- package/dist/schemas/user.d.ts +6 -6
- package/package.json +1 -1
- package/src/schemas/creative.ts +218 -235
|
@@ -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.
|
|
41
|
-
type: z.
|
|
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.
|
|
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.
|
|
154
|
-
type: z.
|
|
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.
|
|
194
|
-
type: z.
|
|
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.
|
|
234
|
-
type: z.
|
|
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;
|
package/dist/schemas/creative.js
CHANGED
|
@@ -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
|
-
|
|
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().
|
|
173
|
+
currentlyWorking: zod_openapi_1.z.boolean().default(false),
|
|
187
174
|
description: zod_openapi_1.z.string().optional(),
|
|
188
175
|
})
|
|
189
176
|
.array()
|
package/dist/schemas/user.d.ts
CHANGED
|
@@ -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.
|
|
139
|
-
type: z.
|
|
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.
|
|
580
|
-
type: z.
|
|
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
package/src/schemas/creative.ts
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
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
|
-
|
|
108
|
-
|
|
101
|
+
.object({
|
|
102
|
+
query: z.string().optional().openapi({ example: "logo designer" }),
|
|
109
103
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
104
|
+
disciplines: z
|
|
105
|
+
.array(z.string())
|
|
106
|
+
.optional()
|
|
107
|
+
.openapi({ example: ["branding", "web design"] }),
|
|
114
108
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
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
|
-
|
|
123
|
+
location: z.string().optional().openapi({ example: "Los Angeles" }),
|
|
133
124
|
|
|
134
|
-
|
|
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
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
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
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
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
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
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
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
.
|
|
189
|
-
|
|
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
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
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
|
-
|
|
253
|
-
|
|
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
|
-
|
|
248
|
+
user: MinimalUserSchema,
|
|
266
249
|
});
|
|
267
250
|
|
|
268
251
|
export const SearchCreativeInputSchema = z.object({
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
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
|
-
|
|
284
|
-
|
|
266
|
+
creatives: z.array(CreativeWithUserEntitySchema),
|
|
267
|
+
nextCursor: z.string().optional().nullable(),
|
|
285
268
|
});
|