@zyacreatives/shared 2.5.50 → 2.5.51

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.
@@ -3,131 +3,92 @@ import { LINK_TYPES } from "../constants";
3
3
  import { ProfileIdentifierSchema } from "./common";
4
4
  import { MinimalUserSchema } from "./user";
5
5
 
6
- export const MinimalBrandEntitySchema = z.object({
7
- id: z.cuid2().openapi({ example: "brd_cksd0v6q0000s9a5y8z7p3x9" }),
8
- userId: z.cuid2().openapi({ example: "user_owner_123" }),
9
- brandName: z.string().openapi({ example: "TechInnovate Inc." }),
10
- bio: z.string().optional().openapi({
11
- example: "Leading software development firm focused on AI.",
12
- }),
13
- disciplines: z
14
- .array(z.string())
15
- .optional()
16
- .openapi({ example: ["Marketing", "Product Development"] }),
17
- createdAt: z.coerce
18
- .date()
19
- .optional()
20
- .openapi({ example: "2025-10-13T09:00:00.000Z" }),
21
- updatedAt: z.coerce.date().openapi({ example: "2025-10-13T09:00:00.000Z" }),
6
+
7
+ const BrandShape = z.object({
8
+ brandName: z.string().min(1).max(200),
9
+ bio: z.string().max(600).default(""),
10
+ location: z.string(),
11
+ disciplines: z.array(z.string()).default([]),
12
+ links: z
13
+ .array(
14
+ z.object({
15
+ url: z.url(),
16
+ type: z.enum(LINK_TYPES).default(LINK_TYPES.GENERIC_WEBSITE),
17
+ }),
18
+ )
19
+ .default([]),
20
+ achievements: z
21
+ .array(
22
+ z.object({
23
+ title: z.string(),
24
+ link: z.url().optional(),
25
+ year: z.number().int().optional(),
26
+ }),
27
+ )
28
+ .default([]),
22
29
  });
23
30
 
24
- export type MinimalBrandEntity = z.infer<typeof MinimalBrandEntitySchema>;
31
+ export type BrandShapeType = z.infer<typeof BrandShape>;
32
+
25
33
 
26
34
  export const BrandEntitySchema = z
27
35
  .object({
28
36
  id: z.cuid2().openapi({ example: "brd_cksd0v6q0000s9a5y8z7p3x9" }),
29
37
  userId: z.cuid2().openapi({ example: "user_owner_123" }),
30
- brandName: z.string().openapi({ example: "TechInnovate Inc." }),
31
- bio: z.string().optional().openapi({
32
- example: "Leading software development firm focused on AI.",
33
- }),
34
- location: z.string().openapi({
35
- example: "UK",
36
- }),
37
- disciplines: z
38
- .array(z.string())
39
- .optional()
40
- .openapi({ example: ["Marketing", "Product Development"] }),
41
- links: z
42
- .object({
43
- url: z.url(),
44
- type: z.enum(LINK_TYPES).default(LINK_TYPES.GENERIC_WEBSITE),
45
- })
46
- .array()
47
- .optional(),
48
- achievements: z
49
- .object({
50
- title: z.string(),
51
- link: z.url().optional(),
52
- year: z.number().int().optional(),
53
- })
54
- .array()
55
- .optional(),
56
- createdAt: z.coerce.date().openapi({ example: "2025-10-13T09:00:00.000Z" }),
57
- updatedAt: z.coerce.date().openapi({ example: "2025-10-13T09:00:00.000Z" }),
38
+ ...BrandShape.shape,
39
+ createdAt: z.iso.datetime(),
40
+ updatedAt: z.iso.datetime(),
58
41
  version: z.int(),
59
42
  })
60
- .openapi("BrandEntitySchema");
43
+ .openapi("BrandEntity");
61
44
 
62
45
  export type BrandEntity = z.infer<typeof BrandEntitySchema>;
63
46
 
64
- export const CreateBrandProfileInputSchema = z
65
- .object({
66
- brandName: z
67
- .string()
68
- .min(1, "Brand name is required")
69
- .openapi({ example: "Acme Creative Studio" }),
70
- location: z.string().openapi({
71
- example: "UK",
72
- }),
73
- disciplineSlugs: z
74
- .array(z.string())
75
- .min(1, "At least one discipline is required")
76
- .default([])
77
- .openapi({ example: ["ui-ux", "frontend"] }),
78
- })
79
- .openapi({
80
- title: "create brand profile",
81
- });
47
+ export const MinimalBrandEntitySchema = BrandEntitySchema.pick({
48
+ id: true,
49
+ userId: true,
50
+ brandName: true,
51
+ bio: true,
52
+ disciplines: true,
53
+ createdAt: true,
54
+ updatedAt: true,
55
+ });
56
+
57
+ export type MinimalBrandEntity = z.infer<typeof MinimalBrandEntitySchema>;
58
+
59
+ export const BrandWithUserEntitySchema = MinimalBrandEntitySchema.extend({
60
+ user: MinimalUserSchema,
61
+ });
62
+
63
+ export type BrandWithUserEntity = z.infer<typeof BrandWithUserEntitySchema>;
64
+
65
+ export const CreateBrandProfileInputSchema = BrandShape.pick({
66
+ brandName: true,
67
+ location: true,
68
+ }).extend({
69
+ disciplineSlugs: z
70
+ .array(z.string())
71
+ .min(1, "At least one discipline is required"),
72
+ });
82
73
 
83
74
  export type CreateBrandProfileInput = z.infer<
84
75
  typeof CreateBrandProfileInputSchema
85
76
  >;
86
77
 
87
- export const UpdateBrandProfileInputSchema = z
88
- .object({
89
- brandName: z.string().min(1).optional().openapi({ example: "Acme Studio" }),
90
- links: z
91
- .object({
92
- url: z.union([
93
- z.url({ message: "Please enter a valid URL" }),
94
- z.literal(""),
95
- ]),
96
- type: z.enum(LINK_TYPES),
97
- })
98
- .array()
99
- .optional(),
100
- location: z.string().openapi({
101
- example: "UK",
102
- }),
103
- achievements: z
104
- .object({
105
- title: z.string(),
106
- link: z.url().optional(),
107
- year: z.number().int().optional(),
108
- })
109
- .array()
110
- .optional(),
111
- bio: z
112
- .string()
113
- .max(600)
114
- .optional()
115
- .openapi({ example: "Updated bio for our creative agency." }),
116
- disciplineSlugs: z
117
- .array(z.string())
118
- .min(1, "At least one discipline is required")
119
- .optional()
120
- .openapi({ example: ["frontend", "ui-ux"] }),
78
+ export const UpdateBrandProfileInputSchema = BrandShape.partial()
79
+ .extend({
80
+ disciplineSlugs: z.array(z.string()).optional(),
121
81
  version: z.int(),
122
82
  })
123
- .openapi({
124
- title: "update brand profile",
83
+ .refine((d) => Object.values(d).some((v) => v !== undefined), {
84
+ message: "At least one field must be provided",
125
85
  });
126
86
 
127
87
  export type UpdateBrandProfileInput = z.infer<
128
88
  typeof UpdateBrandProfileInputSchema
129
89
  >;
130
90
 
91
+
131
92
  export const GetBrandInputSchema = z.object({
132
93
  value: z.cuid2(),
133
94
  by: ProfileIdentifierSchema.shape.by,
@@ -137,35 +98,9 @@ export type GetBrandInput = z.infer<typeof GetBrandInputSchema>;
137
98
 
138
99
  export const GetBrandQuerySchema = ProfileIdentifierSchema;
139
100
 
140
- export const CreateBrandOutputSchema = BrandEntitySchema;
141
-
142
- export type CreateBrandOutput = z.infer<typeof CreateBrandOutputSchema>;
143
-
144
- export const GetBrandOutputSchema = BrandEntitySchema;
145
-
146
- export type GetBrandOutput = z.infer<typeof GetBrandOutputSchema>;
147
-
148
- export const UpdateBrandOutputSchema = BrandEntitySchema;
149
-
150
- export type UpdateBrandOutput = z.infer<typeof UpdateBrandOutputSchema>;
151
-
152
- export const BrandWithUserEntitySchema = MinimalBrandEntitySchema.extend({
153
- user: MinimalUserSchema,
154
- });
155
-
156
- export type BrandWithUserEntity = z.infer<typeof BrandWithUserEntitySchema>;
157
-
158
101
  export const SearchBrandInputSchema = z.object({
159
- string: z
160
- .string()
161
- .min(1, { message: "Search string cannot be empty" })
162
- .max(200, { message: "Search string cannot exceed 200 characters" }),
163
- limit: z.coerce
164
- .number()
165
- .int({ message: "Limit must be an integer" })
166
- .min(1, { message: "Limit must be at least 1" })
167
- .max(100, { message: "Limit cannot exceed 100" })
168
- .default(20),
102
+ string: z.string().min(1, "Search string cannot be empty").max(200),
103
+ limit: z.coerce.number().int().min(1).max(100).default(20),
169
104
  cursor: z.string().optional(),
170
105
  });
171
106
 
@@ -173,7 +108,16 @@ export type SearchBrandInput = z.infer<typeof SearchBrandInputSchema>;
173
108
 
174
109
  export const SearchBrandOutputSchema = z.object({
175
110
  brands: z.array(BrandWithUserEntitySchema),
176
- nextCursor: z.string().optional().nullable(),
111
+ nextCursor: z.string().nullable().optional(),
177
112
  });
178
113
 
179
114
  export type SearchBrandOutput = z.infer<typeof SearchBrandOutputSchema>;
115
+
116
+ export const CreateBrandOutputSchema = BrandEntitySchema;
117
+ export type CreateBrandOutput = z.infer<typeof CreateBrandOutputSchema>;
118
+
119
+ export const GetBrandOutputSchema = BrandEntitySchema;
120
+ export type GetBrandOutput = z.infer<typeof GetBrandOutputSchema>;
121
+
122
+ export const UpdateBrandOutputSchema = BrandEntitySchema;
123
+ export type UpdateBrandOutput = z.infer<typeof UpdateBrandOutputSchema>;
@@ -1,6 +1,7 @@
1
1
  import { z } from "@hono/zod-openapi";
2
2
  import { CommentEntitySchema } from "./comment";
3
3
  import { ActivitySchema } from "./activity";
4
+ import { LINK_TYPES } from "../constants";
4
5
 
5
6
  export const CuidSchema = z.cuid2({ error: "Invalid CUID2 is written." });
6
7
 
@@ -51,3 +52,34 @@ export const EntityRepliesOutputSchema = z.object({
51
52
  nextCursor: z.string().nullable(),
52
53
  });
53
54
  export type EntityRepliesOutput = z.infer<typeof EntityRepliesOutputSchema>;
55
+
56
+
57
+ export const LinkSchema = z.object({
58
+ url: z.url({ message: "Please enter a valid URL" }).or(z.literal("")),
59
+ type: z.enum(LINK_TYPES).default(LINK_TYPES.GENERIC_WEBSITE),
60
+ });
61
+
62
+ export const AchievementSchema = z.object({
63
+ title: z.string().min(1),
64
+ link: z.url().optional(),
65
+ year: z.number().int().optional(),
66
+ });
67
+
68
+ export const WorkExperienceSchema = z.object({
69
+ companyName: z.string().min(1),
70
+ position: z.string().min(1),
71
+ startDate: z.iso.datetime().optional(),
72
+ endDate: z.iso.datetime().optional(),
73
+ currentlyWorking: z.boolean().default(false),
74
+ description: z.string().default(""),
75
+ });
76
+
77
+ export const WebsiteUrlInputSchema = z
78
+ .string()
79
+ .transform((val) => {
80
+ if (!val) return val;
81
+ if (val.startsWith("http://") || val.startsWith("https://")) return val;
82
+ return `https://${val}`;
83
+ })
84
+ .pipe(z.url("Invalid URL").or(z.literal("")))
85
+ .optional();
@@ -3,200 +3,128 @@ import { EXPERIENCE_LEVELS, ExperienceLevel, LINK_TYPES } from "../constants";
3
3
  import { ProfileIdentifierSchema } from "./common";
4
4
  import { MinimalUserSchema } from "./user";
5
5
 
6
- // -----------------------------------------------------------------------------
7
- // Minimal Creative Entity
8
- // -----------------------------------------------------------------------------
9
- export const MinimalCreativeEntitySchema = z.object({
10
- id: z.cuid2().openapi({ example: "cre_cksd0v6q0000s9a5y8z7p3x9" }),
11
- userId: z.cuid2().openapi({ example: "user_abc123" }),
12
- bio: z.string().optional().openapi({
13
- example: "A multi-disciplinary designer specializing in brand identity.",
14
- }),
15
- role: z.string().optional().openapi({ example: "Designer" }),
16
- location: z.string().optional().openapi({ example: "London, UK" }),
17
- experienceLevel: z
18
- .enum(
19
- Object.values(EXPERIENCE_LEVELS) as [
20
- ExperienceLevel,
21
- ...ExperienceLevel[],
22
- ],
6
+ /**
7
+ * --------------------------------
8
+ * SHAPE
9
+ * --------------------------------
10
+ */
11
+
12
+ const CreativeShape = z.object({
13
+ bio: z.string().max(600).default(""),
14
+ role: z.string().default(""),
15
+ location: z.string().max(100).default(""),
16
+ experienceLevel: z.enum(
17
+ Object.values(EXPERIENCE_LEVELS) as [ExperienceLevel, ...ExperienceLevel[]],
18
+ ),
19
+ disciplines: z.array(z.string()).default([]),
20
+
21
+ workExperience: z
22
+ .array(
23
+ z.object({
24
+ companyName: z.string(),
25
+ position: z.string(),
26
+ startDate: z.string().datetime().optional(),
27
+ endDate: z.string().datetime().optional(),
28
+ currentlyWorking: z.boolean().default(false),
29
+ description: z.string().default(""),
30
+ }),
23
31
  )
24
- .optional()
25
- .openapi({ example: EXPERIENCE_LEVELS.YEAR_0_1 }),
26
- disciplines: z
27
- .array(z.string())
28
- .optional()
29
- .openapi({ example: ["Design", "Art Direction"] }),
30
- createdAt: z.coerce.date().openapi({ example: "2025-10-13T09:00:00.000Z" }),
31
- updatedAt: z.coerce.date().openapi({ example: "2025-10-13T09:00:00.000Z" }),
32
+ .default([]),
33
+
34
+ links: z
35
+ .array(
36
+ z.object({
37
+ url: z.url(),
38
+ type: z.enum(LINK_TYPES).default(LINK_TYPES.GENERIC_WEBSITE),
39
+ }),
40
+ )
41
+ .default([]),
42
+
43
+ achievements: z
44
+ .array(
45
+ z.object({
46
+ title: z.string(),
47
+ link: z.url().optional(),
48
+ year: z.number().int().optional(),
49
+ }),
50
+ )
51
+ .default([]),
32
52
  });
33
53
 
34
- export type MinimalCreativeEntity = z.infer<typeof MinimalCreativeEntitySchema>;
54
+ export type CreativeShapeType = z.infer<typeof CreativeShape>;
55
+
56
+ /**
57
+ * --------------------------------
58
+ * ENTITY (DTO)
59
+ * --------------------------------
60
+ */
35
61
 
36
- // -----------------------------------------------------------------------------
37
- // Full Creative Entity
38
- // -----------------------------------------------------------------------------
39
62
  export const CreativeEntitySchema = z
40
63
  .object({
41
- id: z.cuid2().openapi({ example: "cre_cksd0v6q0000s9a5y8z7p3x9" }),
42
- userId: z.cuid2().openapi({ example: "user_abc123" }),
43
- bio: z.string().optional().openapi({
44
- example: "A multi-disciplinary designer specializing in brand identity.",
45
- }),
46
- role: z.string().optional().openapi({ example: "Designer" }),
64
+ id: z.cuid2(),
65
+ userId: z.cuid2(),
66
+ ...CreativeShape.shape,
67
+ createdAt: z.string().datetime(),
68
+ updatedAt: z.string().datetime(),
47
69
  version: z.int(),
48
- location: z.string().optional().openapi({ example: "London, UK" }),
49
- experienceLevel: z
50
- .enum(
51
- Object.values(EXPERIENCE_LEVELS) as [
52
- ExperienceLevel,
53
- ...ExperienceLevel[],
54
- ],
55
- )
56
- .optional()
57
- .openapi({ example: EXPERIENCE_LEVELS.YEAR_0_1 }),
58
- disciplines: z
59
- .array(z.string())
60
- .optional()
61
- .openapi({ example: ["Design", "Art Direction"] }),
62
- workExperience: z
63
- .object({
64
- companyName: z.string(),
65
- position: z.string(),
66
- startDate: z.coerce.date().optional(),
67
- endDate: z.coerce.date().optional(),
68
- currentlyWorking: z.boolean().optional(),
69
- description: z.string(),
70
- })
71
- .array()
72
- .optional(),
73
- links: z
74
- .object({
75
- url: z.union([
76
- z.url({ message: "Please enter a valid URL" }),
77
- z.literal(""),
78
- ]),
79
- type: z.enum(LINK_TYPES),
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
- updatedAt: z.coerce.date().openapi({ example: "2025-10-13T09:00:00.000Z" }),
96
70
  })
97
- .openapi({
98
- title: "CreativeEntitySchema",
99
- description:
100
- "Represents a creative profile, including bio, experience level, location, disciplines and timestamps.",
101
- });
71
+ .openapi("Creative");
102
72
 
103
73
  export type CreativeEntity = z.infer<typeof CreativeEntitySchema>;
104
74
 
105
- // -----------------------------------------------------------------------------
106
- // Creative Profile Actions (Create / Update)
107
- // -----------------------------------------------------------------------------
108
- export const CreateCreativeProfileInputSchema = z
109
- .object({
110
- experienceLevel: z
111
- .enum(EXPERIENCE_LEVELS)
112
- .describe("Overall experience range of the creative.")
113
- .openapi({ example: EXPERIENCE_LEVELS.YEAR_1_3 }),
114
- role: z.string().openapi({ example: "Designer" }),
115
- location: z
116
- .string()
117
- .max(100)
118
- .describe("Primary location where the creative works or resides.")
119
- .openapi({ example: "Lagos, Nigeria" }),
120
- disciplineSlugs: z
121
- .array(z.string())
122
- .min(1, "At least one discipline is required")
123
- .default([])
124
- .describe("List of discipline slugs representing the creative’s fields.")
125
- .openapi({ example: ["ui-ux", "frontend"] }),
126
- })
127
- .openapi({
128
- title: "create creative profile",
129
- description: "Payload for creating a new creative profile.",
130
- });
75
+ export const MinimalCreativeEntitySchema = CreativeEntitySchema.pick({
76
+ id: true,
77
+ userId: true,
78
+ bio: true,
79
+ role: true,
80
+ location: true,
81
+ experienceLevel: true,
82
+ disciplines: true,
83
+ createdAt: true,
84
+ updatedAt: true,
85
+ });
86
+
87
+ export type MinimalCreativeEntity = z.infer<typeof MinimalCreativeEntitySchema>;
88
+
89
+ /**
90
+ * --------------------------------
91
+ * INPUT DTOs
92
+ * --------------------------------
93
+ */
94
+
95
+ export const CreateCreativeProfileInputSchema = CreativeShape.pick({
96
+ experienceLevel: true,
97
+ role: true,
98
+ location: true,
99
+ }).extend({
100
+ disciplineSlugs: z
101
+ .array(z.string())
102
+ .min(1, "At least one discipline is required"),
103
+ });
131
104
 
132
105
  export type CreateCreativeProfileInput = z.infer<
133
106
  typeof CreateCreativeProfileInputSchema
134
107
  >;
135
108
 
136
- export const UpdateCreativeProfileInputSchema = z
137
- .object({
138
- experienceLevel: z
139
- .enum(EXPERIENCE_LEVELS)
140
- .optional()
141
- .openapi({ example: EXPERIENCE_LEVELS.YEAR_3_5 }),
142
- role: z.string().optional().openapi({ example: "Designer" }),
143
- bio: z
144
- .string()
145
- .max(600)
146
- .optional()
147
- .openapi({ example: "I am a freelance UI/UX designer." }),
148
- location: z
149
- .string()
150
- .max(100)
151
- .optional()
152
- .openapi({ example: "Lagos, Nigeria" }),
153
- disciplineSlugs: z
154
- .array(z.string())
155
- .min(1, "At least one discipline is required")
156
- .optional()
157
- .openapi({ example: ["frontend", "ui-ux"] }),
158
- workExperience: z
159
- .object({
160
- companyName: z.string(),
161
- position: z.string(),
162
- startDate: z.string().optional(),
163
- endDate: z.string().optional(),
164
- currentlyWorking: z.boolean().default(false),
165
- description: z.string().optional(),
166
- })
167
- .array()
168
- .optional(),
169
- links: z
170
- .object({
171
- url: z.union([
172
- z.url({ message: "Please enter a valid URL" }),
173
- z.literal(""),
174
- ]),
175
- type: z.enum(LINK_TYPES),
176
- })
177
- .array()
178
- .optional(),
109
+ export const UpdateCreativeProfileInputSchema = CreativeShape.partial()
110
+ .extend({
111
+ disciplineSlugs: z.array(z.string()).optional(),
179
112
  version: z.int(),
180
- achievements: z
181
- .object({
182
- title: z.string(),
183
- link: z.string().optional(),
184
- year: z.coerce.number().int().optional(),
185
- })
186
- .array()
187
- .optional(),
188
113
  })
189
- .openapi({
190
- title: "update creative profile",
114
+ .refine((d) => Object.values(d).some((v) => v !== undefined), {
115
+ message: "At least one field must be provided",
191
116
  });
192
117
 
193
118
  export type UpdateCreativeProfileInput = z.infer<
194
119
  typeof UpdateCreativeProfileInputSchema
195
120
  >;
196
121
 
197
- // -----------------------------------------------------------------------------
198
- // Queries & Outputs
199
- // -----------------------------------------------------------------------------
122
+ /**
123
+ * --------------------------------
124
+ * GET
125
+ * --------------------------------
126
+ */
127
+
200
128
  export const GetCreativeInputSchema = z.object({
201
129
  value: z.cuid2(),
202
130
  by: ProfileIdentifierSchema.shape.by,
@@ -206,7 +134,12 @@ export type GetCreativeInput = z.infer<typeof GetCreativeInputSchema>;
206
134
 
207
135
  export const GetCreativeQuerySchema = ProfileIdentifierSchema;
208
136
 
209
- // Re-exports for explicit intent
137
+ /**
138
+ * --------------------------------
139
+ * OUTPUT ALIASES
140
+ * --------------------------------
141
+ */
142
+
210
143
  export const CreateCreativeOutputSchema = CreativeEntitySchema;
211
144
  export type CreateCreativeOutput = z.infer<typeof CreateCreativeOutputSchema>;
212
145
 
@@ -216,9 +149,12 @@ export type GetCreativeOutput = z.infer<typeof GetCreativeOutputSchema>;
216
149
  export const UpdateCreativeOutputSchema = CreativeEntitySchema;
217
150
  export type UpdateCreativeOutput = z.infer<typeof UpdateCreativeOutputSchema>;
218
151
 
219
- // -----------------------------------------------------------------------------
220
- // Entity With User
221
- // -----------------------------------------------------------------------------
152
+ /**
153
+ * --------------------------------
154
+ * ENTITY WITH USER
155
+ * --------------------------------
156
+ */
157
+
222
158
  export const CreativeWithUserEntitySchema = MinimalCreativeEntitySchema.extend({
223
159
  user: MinimalUserSchema,
224
160
  });
@@ -227,20 +163,15 @@ export type CreativeWithUserEntity = z.infer<
227
163
  typeof CreativeWithUserEntitySchema
228
164
  >;
229
165
 
230
- // -----------------------------------------------------------------------------
231
- // Search Actions
232
- // -----------------------------------------------------------------------------
166
+ /**
167
+ * --------------------------------
168
+ * SEARCH
169
+ * --------------------------------
170
+ */
171
+
233
172
  export const SearchCreativeInputSchema = z.object({
234
- string: z
235
- .string()
236
- .min(1, { message: "Search string cannot be empty" })
237
- .max(200, { message: "Search string cannot exceed 200 characters" }),
238
- limit: z.coerce
239
- .number()
240
- .int({ message: "Limit must be an integer" })
241
- .min(1, { message: "Limit must be at least 1" })
242
- .max(100, { message: "Limit cannot exceed 100" })
243
- .default(20),
173
+ string: z.string().min(1).max(200),
174
+ limit: z.coerce.number().int().min(1).max(100).default(20),
244
175
  cursor: z.string().optional(),
245
176
  });
246
177