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