@kammcs/buildit-mcp 0.0.0-stage → 0.2.0

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.
@@ -0,0 +1,1681 @@
1
+ /**
2
+ * Exact schemas for the agent API: closed objects and enums, patterns and bounds. The test fake uses them to check requests and its own responses against the contract; the server parses responses with the tolerant schemas.ts.
3
+ *
4
+ * GENERATED by scripts/generate.ts from openapi/openapi.json (agent API
5
+ * 1.2.0). Do not edit: change the contract, then run
6
+ * `npm run generate`.
7
+ */
8
+ import { z } from 'zod';
9
+ export const AllowedTransitionSchema = z.strictObject({
10
+ to: z.string(),
11
+ required_fields: z.array(z.string()),
12
+ admins_only: z.boolean(),
13
+ });
14
+ export const ChannelNameSchema = z.string().min(1).max(100);
15
+ export const ChannelRefSchema = z.string().min(1).max(100);
16
+ export const ChannelVisibilitySchema = z.enum(['public', 'private']);
17
+ export const ColorSchema = z.string().regex(new RegExp('^#[0-9A-Fa-f]{6}$', 'u'));
18
+ export const CommentBodySchema = z.string().min(1).max(20000);
19
+ export const CompleteSprintRequestSchema = z.strictObject({
20
+ carry_to: z.enum(['next', 'new', 'backlog']).optional(),
21
+ });
22
+ export const CursorSchema = z.string().min(1).max(2048);
23
+ export const CustomValueInSchema = z
24
+ .union([
25
+ z.string().max(2048),
26
+ z.number().min(-1000000000000000).max(1000000000000000),
27
+ z.boolean(),
28
+ z.array(z.string().min(1).max(320)).max(100),
29
+ ])
30
+ .nullable();
31
+ export const DateSchema = z
32
+ .string()
33
+ .regex(new RegExp('^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$', 'u'));
34
+ export const DevelopmentBranchSchema = z.strictObject({
35
+ name: z.string(),
36
+ state: z.enum(['active', 'deleted']),
37
+ repo: z.string(),
38
+ url: z.string(),
39
+ });
40
+ export const EmptyRequestSchema = z.strictObject({});
41
+ export const EntityKindSchema = z.enum([
42
+ 'project',
43
+ 'item',
44
+ 'initiative',
45
+ 'status',
46
+ 'type',
47
+ 'label',
48
+ 'field',
49
+ 'option',
50
+ 'user',
51
+ 'sprint',
52
+ 'release',
53
+ 'workflow',
54
+ 'link',
55
+ 'comment',
56
+ 'page',
57
+ 'channel',
58
+ 'message',
59
+ 'plan',
60
+ 'route',
61
+ ]);
62
+ export const EstimateSchema = z.number().min(0).max(9999.99);
63
+ export const EstimateScaleSchema = z.enum(['none', 'points', 'tshirt']);
64
+ export const FeedbackDeviceSchema = z.strictObject({
65
+ app: z.string().max(80).nullable(),
66
+ build: z.string().max(80).nullable(),
67
+ platform: z.string().max(80).nullable(),
68
+ os: z.string().max(80).nullable(),
69
+ form: z.string().max(80).nullable(),
70
+ });
71
+ export const FieldKindSchema = z.enum([
72
+ 'text',
73
+ 'number',
74
+ 'date',
75
+ 'single_select',
76
+ 'multi_select',
77
+ 'member',
78
+ 'multi_member',
79
+ 'url',
80
+ 'checkbox',
81
+ ]);
82
+ export const InitiativeKeySchema = z
83
+ .string()
84
+ .regex(new RegExp('^[A-Z][A-Z0-9]{1,5}-[1-9][0-9]{0,8}$', 'u'));
85
+ export const InitiativeRefSchema = z
86
+ .string()
87
+ .regex(new RegExp('^(#?[A-Za-z][A-Za-z0-9]{1,5}-[1-9][0-9]{0,8}|[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12})$', 'u'));
88
+ export const ItemCountsSchema = z.strictObject({
89
+ not_started: z.int(),
90
+ started: z.int(),
91
+ done: z.int(),
92
+ canceled: z.int(),
93
+ });
94
+ export const ItemKeySchema = z
95
+ .string()
96
+ .regex(new RegExp('^[A-Z][A-Z0-9]{1,5}-[1-9][0-9]{0,8}$', 'u'));
97
+ export const ItemLevelSchema = z.enum(['epic', 'standard', 'subtask']);
98
+ export const ItemRefSchema = z
99
+ .string()
100
+ .regex(new RegExp('^(#?[A-Za-z][A-Za-z0-9]{1,5}-[1-9][0-9]{0,8}|[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12})$', 'u'));
101
+ export const ItemTitleSchema = z.string().min(1).max(255);
102
+ export const LabelRefSchema = z.string().min(1).max(40);
103
+ export const LinkCountsSchema = z.strictObject({
104
+ blocks: z.int().min(0),
105
+ blocked_by: z.int().min(0),
106
+ relates: z.int().min(0),
107
+ duplicates: z.int().min(0),
108
+ duplicated_by: z.int().min(0),
109
+ blocked_by_open: z.int().min(0),
110
+ });
111
+ export const LinkKindSchema = z.enum([
112
+ 'blocks',
113
+ 'blocked_by',
114
+ 'relates',
115
+ 'duplicates',
116
+ 'duplicated_by',
117
+ ]);
118
+ export const LocaleSchema = z.enum(['en', 'es-419', 'fr-CA', 'sr-Cyrl', 'sr-Latn']);
119
+ export const MarkdownDescriptionSchema = z.string().max(262144);
120
+ export const MessageKindSchema = z.enum([
121
+ 'text',
122
+ 'system',
123
+ 'call',
124
+ 'meeting',
125
+ 'work_item',
126
+ 'thread_broadcast',
127
+ ]);
128
+ export const NameRefSchema = z.string().min(1).max(60);
129
+ export const NewProjectKeySchema = z.string().regex(new RegExp('^[A-Za-z][A-Za-z0-9]{1,5}$', 'u'));
130
+ export const OrgRoleSchema = z.enum(['owner', 'admin', 'member', 'guest']);
131
+ export const PageBodySchema = z.string().max(1048576);
132
+ export const PageSearchMatchSchema = z.strictObject({
133
+ score: z.number(),
134
+ title_highlight: z.string(),
135
+ snippet: z.string().nullable(),
136
+ });
137
+ export const PageTitleSchema = z.string().min(1).max(200);
138
+ export const PlanActionSchema = z.enum([
139
+ 'delete_item',
140
+ 'move_item',
141
+ 'bulk_update',
142
+ 'archive_status',
143
+ 'workflow_change',
144
+ 'work_type_change',
145
+ 'field_change',
146
+ 'label_change',
147
+ ]);
148
+ export const PlanHandleSchema = z.string().regex(new RegExp('^[A-Za-z0-9_-]{22,64}$', 'u'));
149
+ export const PrioritySchema = z.enum(['none', 'low', 'medium', 'high', 'urgent']);
150
+ export const ProjectKeySchema = z.string().regex(new RegExp('^[A-Z][A-Z0-9]{1,5}$', 'u'));
151
+ export const ProjectRefSchema = z.string().regex(new RegExp('^[A-Za-z][A-Za-z0-9]{1,5}$', 'u'));
152
+ export const ProjectTemplateSchema = z.enum([
153
+ 'software_scrum',
154
+ 'software_kanban',
155
+ 'design',
156
+ 'ops',
157
+ 'marketing',
158
+ ]);
159
+ export const RateLimitsSchema = z.strictObject({
160
+ requests_per_minute: z.int(),
161
+ user_requests_per_minute: z.int(),
162
+ writes_per_minute: z.int(),
163
+ writes_per_day: z.int(),
164
+ org_requests_per_minute: z.int(),
165
+ });
166
+ export const ReleaseRefSchema = z.string().min(1).max(80);
167
+ export const ReleaseStatusSchema = z.enum(['unreleased', 'released', 'archived']);
168
+ export const ScopeSchema = z.enum([
169
+ 'projects:read',
170
+ 'projects:write',
171
+ 'projects:delete',
172
+ 'projects:admin',
173
+ 'pages:read',
174
+ 'pages:write',
175
+ 'chat:read',
176
+ ]);
177
+ export const SearchMatchSchema = z.strictObject({
178
+ score: z.number(),
179
+ title_highlight: z.string(),
180
+ snippet: z.string().nullable(),
181
+ });
182
+ export const SprintRefSchema = z.string().min(1).max(80);
183
+ export const SprintStateSchema = z.enum(['planned', 'active', 'completed']);
184
+ export const StatusCategorySchema = z.enum(['not_started', 'started', 'done', 'canceled']);
185
+ export const TimestampSchema = z
186
+ .string()
187
+ .regex(new RegExp('^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$', 'u'));
188
+ export const TransitionMoveSchema = z.strictObject({
189
+ to: z.string(),
190
+ to_id: z
191
+ .string()
192
+ .regex(new RegExp('^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$', 'u')),
193
+ required_fields: z.array(z.string()),
194
+ admins_only: z.boolean(),
195
+ });
196
+ export const UserRefSchema = z.string().min(1).max(320);
197
+ export const UuidSchema = z
198
+ .string()
199
+ .regex(new RegExp('^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$', 'u'));
200
+ export const WorkflowRefSchema = z.string().min(1).max(60);
201
+ export const AddCommentRequestSchema = z.strictObject({
202
+ body: CommentBodySchema,
203
+ idempotency_key: UuidSchema.optional(),
204
+ });
205
+ export const AddLinkRequestSchema = z.strictObject({ kind: LinkKindSchema, target: ItemRefSchema });
206
+ export const ArchiveStatusArgsSchema = z.strictObject({
207
+ project: ProjectRefSchema,
208
+ workflow: WorkflowRefSchema.optional(),
209
+ status: NameRefSchema,
210
+ replacement: NameRefSchema,
211
+ });
212
+ export const BoardColumnSchema = z.strictObject({
213
+ id: UuidSchema,
214
+ name: z.string(),
215
+ position: z.int(),
216
+ wip_limit: z.int().nullable(),
217
+ statuses: z.array(z.string()),
218
+ });
219
+ export const ChannelBriefSchema = z.strictObject({ id: UuidSchema, name: z.string() });
220
+ export const CreateChannelRequestSchema = z.strictObject({
221
+ name: ChannelNameSchema,
222
+ description: z.string().max(1000).optional(),
223
+ visibility: ChannelVisibilitySchema,
224
+ members: z.array(UserRefSchema).max(50).optional(),
225
+ idempotency_key: UuidSchema.optional(),
226
+ });
227
+ export const CreatePageRequestSchema = z.strictObject({
228
+ title: PageTitleSchema,
229
+ body: PageBodySchema.optional(),
230
+ parent_id: UuidSchema.optional(),
231
+ position: z.int().min(0).optional(),
232
+ idempotency_key: UuidSchema.optional(),
233
+ });
234
+ export const CreateProjectRequestSchema = z.strictObject({
235
+ channel: ChannelRefSchema,
236
+ key: NewProjectKeySchema,
237
+ template: ProjectTemplateSchema.optional(),
238
+ sprints_enabled: z.boolean().optional(),
239
+ releases_enabled: z.boolean().optional(),
240
+ estimate_scale: EstimateScaleSchema.optional(),
241
+ estimate_values: z.array(z.number().min(0).max(9999.99)).min(1).max(30).optional(),
242
+ idempotency_key: UuidSchema.optional(),
243
+ });
244
+ export const CreateReleaseRequestSchema = z.strictObject({
245
+ name: z.string().min(1).max(80),
246
+ description: z.string().max(10000).optional(),
247
+ start_date: DateSchema.optional(),
248
+ target_date: DateSchema.optional(),
249
+ });
250
+ export const CreateSprintRequestSchema = z.strictObject({
251
+ name: z.string().min(1).max(80),
252
+ goal: z.string().max(500).optional(),
253
+ starts_on: DateSchema.optional(),
254
+ ends_on: DateSchema.optional(),
255
+ });
256
+ export const CustomValuesInSchema = z.record(z.string().min(1).max(60), CustomValueInSchema);
257
+ export const DeleteItemArgsSchema = z.strictObject({ item: ItemRefSchema });
258
+ export const DescriptionEditSchema = z.union([
259
+ z.strictObject({
260
+ mode: z.literal('replace'),
261
+ text: MarkdownDescriptionSchema,
262
+ description_version: z.int().min(1),
263
+ }),
264
+ z.strictObject({ mode: z.literal('append'), text: MarkdownDescriptionSchema }),
265
+ ]);
266
+ export const DevelopmentCommitSchema = z.strictObject({
267
+ sha: z.string(),
268
+ title: z.string().max(255).nullable(),
269
+ repo: z.string(),
270
+ url: z.string(),
271
+ author: z.string().max(100).nullable(),
272
+ committed_at: TimestampSchema,
273
+ });
274
+ export const DevelopmentPullRequestSchema = z.strictObject({
275
+ number: z.int().min(1),
276
+ title: z.string().max(255).nullable(),
277
+ state: z.enum(['open', 'draft', 'merged', 'closed']),
278
+ repo: z.string(),
279
+ url: z.string(),
280
+ author: z.string().max(100).nullable(),
281
+ updated_at: TimestampSchema,
282
+ });
283
+ export const ErrorSchema = z.strictObject({
284
+ error: z.union([
285
+ z.strictObject({
286
+ code: z.literal('bad_request'),
287
+ message: z.string().min(1),
288
+ hint: z.string().optional(),
289
+ details: z.strictObject({}),
290
+ }),
291
+ z.strictObject({
292
+ code: z.literal('token_invalid'),
293
+ message: z.string().min(1),
294
+ hint: z.string().optional(),
295
+ details: z.strictObject({}),
296
+ }),
297
+ z.strictObject({
298
+ code: z.literal('token_expired'),
299
+ message: z.string().min(1),
300
+ hint: z.string().optional(),
301
+ details: z.strictObject({
302
+ expired_at: z
303
+ .string()
304
+ .regex(new RegExp('^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$', 'u')),
305
+ }),
306
+ }),
307
+ z.strictObject({
308
+ code: z.literal('token_revoked'),
309
+ message: z.string().min(1),
310
+ hint: z.string().optional(),
311
+ details: z.strictObject({
312
+ revoked_at: z
313
+ .string()
314
+ .regex(new RegExp('^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$', 'u')),
315
+ }),
316
+ }),
317
+ z.strictObject({
318
+ code: z.literal('token_suspended'),
319
+ message: z.string().min(1),
320
+ hint: z.string().optional(),
321
+ details: z.strictObject({}),
322
+ }),
323
+ z.strictObject({
324
+ code: z.literal('agent_access_off'),
325
+ message: z.string().min(1),
326
+ hint: z.string().optional(),
327
+ details: z.strictObject({}),
328
+ }),
329
+ z.strictObject({
330
+ code: z.literal('projects_off'),
331
+ message: z.string().min(1),
332
+ hint: z.string().optional(),
333
+ details: z.strictObject({}),
334
+ }),
335
+ z.strictObject({
336
+ code: z.literal('scope_missing'),
337
+ message: z.string().min(1),
338
+ hint: z.string().optional(),
339
+ details: z.strictObject({
340
+ scope: z.enum([
341
+ 'projects:read',
342
+ 'projects:write',
343
+ 'projects:delete',
344
+ 'projects:admin',
345
+ 'pages:read',
346
+ 'pages:write',
347
+ 'chat:read',
348
+ ]),
349
+ granted: z.array(z.enum([
350
+ 'projects:read',
351
+ 'projects:write',
352
+ 'projects:delete',
353
+ 'projects:admin',
354
+ 'pages:read',
355
+ 'pages:write',
356
+ 'chat:read',
357
+ ])),
358
+ }),
359
+ }),
360
+ z.strictObject({
361
+ code: z.literal('outside_limits'),
362
+ message: z.string().min(1),
363
+ hint: z.string().optional(),
364
+ details: z.strictObject({ kind: z.enum(['project', 'channel']), ref: z.string().max(400) }),
365
+ }),
366
+ z.strictObject({
367
+ code: z.literal('forbidden'),
368
+ message: z.string().min(1),
369
+ hint: z.string().optional(),
370
+ details: z.strictObject({
371
+ reason: z.enum(['admins_only', 'not_in_channel', 'not_reporter', 'guest', 'other']),
372
+ }),
373
+ }),
374
+ z.strictObject({
375
+ code: z.literal('archived'),
376
+ message: z.string().min(1),
377
+ hint: z.string().optional(),
378
+ details: z.strictObject({ kind: EntityKindSchema, ref: z.string().max(400) }),
379
+ }),
380
+ z.strictObject({
381
+ code: z.literal('not_found'),
382
+ message: z.string().min(1),
383
+ hint: z.string().optional(),
384
+ details: z.strictObject({ kind: EntityKindSchema, ref: z.string().max(400) }),
385
+ }),
386
+ z.strictObject({
387
+ code: z.literal('method_not_allowed'),
388
+ message: z.string().min(1),
389
+ hint: z.string().optional(),
390
+ details: z.strictObject({ allowed: z.array(z.enum(['GET', 'POST', 'PATCH', 'DELETE'])) }),
391
+ }),
392
+ z.strictObject({
393
+ code: z.literal('conflict'),
394
+ message: z.string().min(1),
395
+ hint: z.string().optional(),
396
+ details: z.strictObject({
397
+ kind: z.enum(['item', 'description', 'page']),
398
+ current: z.strictObject({
399
+ version: z.int().optional(),
400
+ description_version: z.int().optional(),
401
+ }),
402
+ }),
403
+ }),
404
+ z.strictObject({
405
+ code: z.literal('idempotency_conflict'),
406
+ message: z.string().min(1),
407
+ hint: z.string().optional(),
408
+ details: z.strictObject({ idempotency_key: z.string() }),
409
+ }),
410
+ z.strictObject({
411
+ code: z.literal('plan_used'),
412
+ message: z.string().min(1),
413
+ hint: z.string().optional(),
414
+ details: z.strictObject({
415
+ handle: z.string(),
416
+ used_at: z
417
+ .string()
418
+ .regex(new RegExp('^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$', 'u')),
419
+ }),
420
+ }),
421
+ z.strictObject({
422
+ code: z.literal('plan_stale'),
423
+ message: z.string().min(1),
424
+ hint: z.string().optional(),
425
+ details: z.strictObject({
426
+ handle: z.string(),
427
+ changed: z.array(z.strictObject({ kind: EntityKindSchema, ref: z.string().max(400) })),
428
+ }),
429
+ }),
430
+ z.strictObject({
431
+ code: z.literal('plan_expired'),
432
+ message: z.string().min(1),
433
+ hint: z.string().optional(),
434
+ details: z.strictObject({ handle: z.string() }),
435
+ }),
436
+ z.strictObject({
437
+ code: z.literal('body_too_large'),
438
+ message: z.string().min(1),
439
+ hint: z.string().optional(),
440
+ details: z.strictObject({ max_bytes: z.int() }),
441
+ }),
442
+ z.strictObject({
443
+ code: z.literal('validation'),
444
+ message: z.string().min(1),
445
+ hint: z.string().optional(),
446
+ details: z.strictObject({
447
+ fields: z.array(z.strictObject({ path: z.string(), message: z.string() })).min(1),
448
+ }),
449
+ }),
450
+ z.strictObject({
451
+ code: z.literal('image_layout_invalid'),
452
+ message: z.string().min(1),
453
+ hint: z.string().optional(),
454
+ details: z.strictObject({
455
+ fields: z.array(z.strictObject({ path: z.string(), message: z.string() })).min(1),
456
+ }),
457
+ }),
458
+ z.strictObject({
459
+ code: z.literal('ambiguous'),
460
+ message: z.string().min(1),
461
+ hint: z.string().optional(),
462
+ details: z.strictObject({
463
+ kind: EntityKindSchema,
464
+ ref: z.string().max(400),
465
+ candidates: z.array(z.strictObject({ id: z.string(), label: z.string() })).max(20),
466
+ }),
467
+ }),
468
+ z.strictObject({
469
+ code: z.literal('transition_not_allowed'),
470
+ message: z.string().min(1),
471
+ hint: z.string().optional(),
472
+ details: z.strictObject({
473
+ from: z.string(),
474
+ to: z.string(),
475
+ allowed: z.array(z.string()),
476
+ required_fields: z.array(z.string()),
477
+ admins_only: z.boolean(),
478
+ moves: z.array(TransitionMoveSchema).optional(),
479
+ }),
480
+ }),
481
+ z.strictObject({
482
+ code: z.literal('field_required'),
483
+ message: z.string().min(1),
484
+ hint: z.string().optional(),
485
+ details: z.strictObject({ fields: z.array(z.string()).min(1) }),
486
+ }),
487
+ z.strictObject({
488
+ code: z.literal('bulk_too_large'),
489
+ message: z.string().min(1),
490
+ hint: z.string().optional(),
491
+ details: z.strictObject({ max: z.literal(50), count: z.int() }),
492
+ }),
493
+ z.strictObject({
494
+ code: z.literal('limit_reached'),
495
+ message: z.string().min(1),
496
+ hint: z.string().optional(),
497
+ details: z.strictObject({
498
+ limit: z.enum([
499
+ 'types',
500
+ 'workflows',
501
+ 'statuses',
502
+ 'fields',
503
+ 'labels',
504
+ 'options',
505
+ 'members',
506
+ 'items',
507
+ ]),
508
+ max: z.int(),
509
+ }),
510
+ }),
511
+ z.strictObject({
512
+ code: z.literal('rate_limited'),
513
+ message: z.string().min(1),
514
+ hint: z.string().optional(),
515
+ details: z.strictObject({
516
+ retry_after: z.int().min(1),
517
+ bucket: z.enum([
518
+ 'token_requests_per_minute',
519
+ 'token_writes_per_minute',
520
+ 'token_writes_per_day',
521
+ 'org_requests_per_minute',
522
+ 'user_requests_per_minute',
523
+ ]),
524
+ }),
525
+ }),
526
+ z.strictObject({
527
+ code: z.literal('internal'),
528
+ message: z.string().min(1),
529
+ hint: z.string().optional(),
530
+ details: z.strictObject({}),
531
+ }),
532
+ z.strictObject({
533
+ code: z.literal('unavailable'),
534
+ message: z.string().min(1),
535
+ hint: z.string().optional(),
536
+ details: z.strictObject({}),
537
+ }),
538
+ z.strictObject({
539
+ code: z.literal('release_archived'),
540
+ message: z.string().min(1),
541
+ hint: z.string().optional(),
542
+ details: z.strictObject({ ref: z.string().max(400) }),
543
+ }),
544
+ z.strictObject({
545
+ code: z.literal('release_not_released'),
546
+ message: z.string().min(1),
547
+ hint: z.string().optional(),
548
+ details: z.strictObject({ ref: z.string().max(400) }),
549
+ }),
550
+ ]),
551
+ });
552
+ export const FeedbackSchema = z.strictObject({
553
+ reporter_name: z.string().max(100).nullable(),
554
+ org_name: z.string().max(100),
555
+ org_label: z.string(),
556
+ kind: z.enum(['bug', 'feature']),
557
+ severity: z.enum(['blocker', 'annoying', 'minor']),
558
+ device: FeedbackDeviceSchema,
559
+ plus_ones: z.int().min(0),
560
+ state: z.enum(['open', 'org_off', 'org_deleted', 'reporter_gone', 'blocked', 'ended']),
561
+ });
562
+ export const FieldChangeArgsSchema = z.union([
563
+ z.strictObject({
564
+ op: z.literal('create'),
565
+ project: ProjectRefSchema,
566
+ name: z.string().min(1).max(60),
567
+ kind: FieldKindSchema,
568
+ options: z
569
+ .array(z.strictObject({
570
+ id: z.string().min(1).max(64).optional(),
571
+ label: z.string().min(1).max(60),
572
+ color: ColorSchema.nullable().optional(),
573
+ }))
574
+ .max(100)
575
+ .optional(),
576
+ types: z.array(NameRefSchema).max(100).nullable().optional(),
577
+ required_on_create: z.boolean().optional(),
578
+ position: z.int().optional(),
579
+ }),
580
+ z.strictObject({
581
+ op: z.literal('update'),
582
+ project: ProjectRefSchema,
583
+ field: NameRefSchema,
584
+ name: z.string().min(1).max(60).optional(),
585
+ options: z
586
+ .array(z.strictObject({
587
+ id: z.string().min(1).max(64).optional(),
588
+ label: z.string().min(1).max(60),
589
+ color: ColorSchema.nullable().optional(),
590
+ }))
591
+ .max(100)
592
+ .optional(),
593
+ types: z.array(NameRefSchema).max(100).nullable().optional(),
594
+ required_on_create: z.boolean().optional(),
595
+ position: z.int().optional(),
596
+ }),
597
+ z.strictObject({ op: z.literal('archive'), project: ProjectRefSchema, field: NameRefSchema }),
598
+ z.strictObject({ op: z.literal('restore'), project: ProjectRefSchema, field: NameRefSchema }),
599
+ ]);
600
+ export const FieldOptionSchema = z.strictObject({
601
+ id: z.string(),
602
+ label: z.string(),
603
+ color: ColorSchema.nullable(),
604
+ });
605
+ export const InitiativeBriefSchema = z.strictObject({
606
+ id: UuidSchema,
607
+ key: InitiativeKeySchema,
608
+ name: z.string(),
609
+ });
610
+ export const ItemBriefSchema = z.strictObject({
611
+ id: UuidSchema,
612
+ key: ItemKeySchema,
613
+ title: z.string(),
614
+ });
615
+ export const LabelSchema = z.strictObject({
616
+ id: UuidSchema,
617
+ name: z.string(),
618
+ color: ColorSchema.nullable(),
619
+ });
620
+ export const LabelChangeArgsSchema = z.union([
621
+ z.strictObject({
622
+ op: z.literal('create'),
623
+ project: ProjectRefSchema,
624
+ name: z.string().min(1).max(40),
625
+ color: ColorSchema.optional(),
626
+ }),
627
+ z.strictObject({
628
+ op: z.literal('update'),
629
+ project: ProjectRefSchema,
630
+ label: LabelRefSchema,
631
+ name: z.string().min(1).max(40).optional(),
632
+ color: ColorSchema.nullable().optional(),
633
+ }),
634
+ z.strictObject({ op: z.literal('delete'), project: ProjectRefSchema, label: LabelRefSchema }),
635
+ ]);
636
+ export const MessageAuthorSchema = z.strictObject({
637
+ id: UuidSchema,
638
+ display_name: z.string(),
639
+ email: z.string().nullable(),
640
+ type: z.enum(['user', 'app']),
641
+ });
642
+ export const MetaResponseSchema = z.strictObject({
643
+ api_version: z.string(),
644
+ min_mcp_version: z.string(),
645
+ deprecations: z.array(z.strictObject({
646
+ operation: z.string(),
647
+ note: z.string(),
648
+ removed_after: DateSchema.nullable(),
649
+ })),
650
+ operations: z.array(z.string()).optional(),
651
+ });
652
+ export const MoveItemArgsSchema = z.strictObject({
653
+ item: ItemRefSchema,
654
+ project: ProjectRefSchema,
655
+ type: NameRefSchema.optional(),
656
+ status: NameRefSchema.optional(),
657
+ });
658
+ export const OrgMemberSchema = z.strictObject({
659
+ id: UuidSchema,
660
+ display_name: z.string(),
661
+ email: z.string().nullable(),
662
+ role: OrgRoleSchema,
663
+ });
664
+ export const PlanEffectSchema = z.strictObject({
665
+ op: z.enum(['create', 'update', 'archive', 'restore', 'delete', 'move', 'transition', 'relabel']),
666
+ kind: z.enum(['item', 'workflow', 'status', 'transition', 'type', 'field', 'option', 'label']),
667
+ target: z.string(),
668
+ id: UuidSchema.nullable(),
669
+ before: z.unknown(),
670
+ after: z.unknown(),
671
+ });
672
+ export const PlanningItemsRequestSchema = z.strictObject({
673
+ items: z.array(ItemRefSchema).min(1).max(50),
674
+ });
675
+ export const ProjectBriefSchema = z.strictObject({
676
+ id: UuidSchema,
677
+ key: ProjectKeySchema,
678
+ name: z.string(),
679
+ });
680
+ export const ProjectMemberSchema = z.strictObject({
681
+ id: UuidSchema,
682
+ display_name: z.string(),
683
+ email: z.string().nullable(),
684
+ role: OrgRoleSchema,
685
+ is_project_admin: z.boolean(),
686
+ });
687
+ export const ProjectTypeSchema = z.strictObject({
688
+ id: UuidSchema,
689
+ name: z.string(),
690
+ system_key: z.string().nullable(),
691
+ level: ItemLevelSchema,
692
+ icon: z.string().nullable(),
693
+ color: ColorSchema.nullable(),
694
+ workflow: z.strictObject({ id: UuidSchema, name: z.string() }),
695
+ });
696
+ export const RankPositionSchema = z.strictObject({
697
+ before: ItemRefSchema.optional(),
698
+ after: ItemRefSchema.optional(),
699
+ });
700
+ export const ReleaseSchema = z.strictObject({
701
+ id: UuidSchema,
702
+ name: z.string(),
703
+ description: z.string().nullable(),
704
+ status: ReleaseStatusSchema,
705
+ start_date: DateSchema.nullable(),
706
+ target_date: DateSchema.nullable(),
707
+ released_at: TimestampSchema.nullable(),
708
+ notes_page_id: UuidSchema.nullable(),
709
+ item_count: z.int(),
710
+ done_count: z.int(),
711
+ });
712
+ export const ReleaseBriefSchema = z.strictObject({
713
+ id: UuidSchema,
714
+ name: z.string(),
715
+ status: ReleaseStatusSchema,
716
+ });
717
+ export const ReleaseNotesRequestSchema = z.strictObject({
718
+ locale: LocaleSchema.optional(),
719
+ page_version: z.int().min(1).optional(),
720
+ });
721
+ export const ReleaseNotesResponseSchema = z.strictObject({
722
+ page_id: UuidSchema.nullable(),
723
+ page_version: z.int().nullable(),
724
+ created: z.boolean(),
725
+ overwrote_edits: z.boolean(),
726
+ needs_confirmation: z.boolean(),
727
+ markdown: z.string().optional(),
728
+ });
729
+ export const ReleaseVersionRequestSchema = z.strictObject({
730
+ released_on: DateSchema.optional(),
731
+ move_open_to: ReleaseRefSchema.optional(),
732
+ });
733
+ export const RemoveLinkResponseSchema = z.strictObject({ id: UuidSchema, removed: z.boolean() });
734
+ export const SprintSchema = z.strictObject({
735
+ id: UuidSchema,
736
+ number: z.int(),
737
+ name: z.string(),
738
+ goal: z.string().nullable(),
739
+ state: SprintStateSchema,
740
+ starts_on: DateSchema.nullable(),
741
+ ends_on: DateSchema.nullable(),
742
+ started_at: TimestampSchema.nullable(),
743
+ completed_at: TimestampSchema.nullable(),
744
+ item_count: z.int(),
745
+ done_count: z.int(),
746
+ });
747
+ export const SprintBoardMoveSchema = z.strictObject({
748
+ id: UuidSchema,
749
+ key: ItemKeySchema,
750
+ title: z.string(),
751
+ from: z.string(),
752
+ to: z.string(),
753
+ });
754
+ export const SprintBriefSchema = z.strictObject({
755
+ id: UuidSchema,
756
+ number: z.int(),
757
+ name: z.string(),
758
+ state: SprintStateSchema,
759
+ });
760
+ export const SprintNotMovedSchema = z.strictObject({
761
+ id: UuidSchema,
762
+ key: ItemKeySchema,
763
+ title: z.string(),
764
+ status: z.string(),
765
+ reason: z.enum(['no_board_status', 'transition_not_allowed', 'required_fields', 'admins_only']),
766
+ required_fields: z.array(z.string()),
767
+ });
768
+ export const StartSprintRequestSchema = z.strictObject({
769
+ starts_on: DateSchema.optional(),
770
+ ends_on: DateSchema.optional(),
771
+ goal: z.string().max(500).optional(),
772
+ });
773
+ export const StatusBriefSchema = z.strictObject({
774
+ id: UuidSchema,
775
+ name: z.string(),
776
+ category: StatusCategorySchema,
777
+ });
778
+ export const TypeBriefSchema = z.strictObject({
779
+ id: UuidSchema,
780
+ name: z.string(),
781
+ level: ItemLevelSchema,
782
+ });
783
+ export const UpdatePageRequestSchema = z.strictObject({
784
+ version: z.int().min(1),
785
+ title: PageTitleSchema.optional(),
786
+ body: PageBodySchema.optional(),
787
+ parent_id: UuidSchema.nullable().optional(),
788
+ position: z.int().min(0).optional(),
789
+ });
790
+ export const UpdateReleaseRequestSchema = z.strictObject({
791
+ name: z.string().min(1).max(80).optional(),
792
+ description: z.string().max(10000).nullable().optional(),
793
+ start_date: DateSchema.nullable().optional(),
794
+ target_date: DateSchema.nullable().optional(),
795
+ released_on: DateSchema.optional(),
796
+ });
797
+ export const UserSchema = z.strictObject({
798
+ id: UuidSchema,
799
+ display_name: z.string(),
800
+ email: z.string().nullable(),
801
+ });
802
+ export const WorkTypeChangeArgsSchema = z.union([
803
+ z.strictObject({
804
+ op: z.literal('create'),
805
+ name: z.string().min(1).max(60),
806
+ level: ItemLevelSchema.optional(),
807
+ icon: z.string().regex(new RegExp('^[a-z0-9_]{1,64}$', 'u')).optional(),
808
+ color: ColorSchema.optional(),
809
+ position: z.int().optional(),
810
+ add_to_project: z
811
+ .strictObject({ project: ProjectRefSchema, workflow: WorkflowRefSchema })
812
+ .optional(),
813
+ }),
814
+ z.strictObject({
815
+ op: z.literal('update'),
816
+ type: NameRefSchema,
817
+ name: z.string().min(1).max(60).optional(),
818
+ icon: z.string().regex(new RegExp('^[a-z0-9_]{1,64}$', 'u')).nullable().optional(),
819
+ color: ColorSchema.nullable().optional(),
820
+ position: z.int().optional(),
821
+ }),
822
+ z.strictObject({ op: z.literal('archive'), type: NameRefSchema }),
823
+ z.strictObject({ op: z.literal('restore'), type: NameRefSchema }),
824
+ ]);
825
+ export const WorkflowDefStatusSchema = z.strictObject({
826
+ id: UuidSchema,
827
+ name: z.string().min(1).max(60).nullable().optional(),
828
+ system_key: z
829
+ .enum([
830
+ 'backlog',
831
+ 'todo',
832
+ 'in_progress',
833
+ 'in_review',
834
+ 'done',
835
+ 'canceled',
836
+ 'triage',
837
+ 'wont_fix',
838
+ 'requested',
839
+ 'briefed',
840
+ 'changes_requested',
841
+ 'approved',
842
+ 'new',
843
+ 'triaged',
844
+ 'waiting_on_requester',
845
+ 'resolved',
846
+ 'wont_do',
847
+ 'waiting',
848
+ 'reported',
849
+ 'investigating',
850
+ 'mitigated',
851
+ ])
852
+ .nullable()
853
+ .optional(),
854
+ category: StatusCategorySchema,
855
+ color: ColorSchema.nullable().optional(),
856
+ position: z.int().nullable().optional(),
857
+ is_initial: z.boolean().nullable().optional(),
858
+ board_column_id: UuidSchema.nullable().optional(),
859
+ archived_at: TimestampSchema.nullable().optional(),
860
+ });
861
+ export const WorkflowDefTransitionSchema = z.strictObject({
862
+ id: UuidSchema,
863
+ from_status_id: UuidSchema.nullable().optional(),
864
+ to_status_id: UuidSchema,
865
+ required_fields: z
866
+ .array(z
867
+ .string()
868
+ .regex(new RegExp('^(assignee|estimate|due_date|fix_release|sprint|cf:[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12})$', 'u')))
869
+ .nullable()
870
+ .optional(),
871
+ admins_only: z.boolean().nullable().optional(),
872
+ });
873
+ export const WorkflowStatusSchema = z.strictObject({
874
+ id: UuidSchema,
875
+ name: z.string(),
876
+ system_key: z.string().nullable(),
877
+ category: StatusCategorySchema,
878
+ color: ColorSchema.nullable(),
879
+ position: z.int(),
880
+ is_initial: z.boolean(),
881
+ board_column: z.string().nullable(),
882
+ allowed: z.array(AllowedTransitionSchema),
883
+ });
884
+ export const BulkPatchSchema = z.strictObject({
885
+ status: NameRefSchema.optional(),
886
+ assignee: UserRefSchema.nullable().optional(),
887
+ priority: PrioritySchema.optional(),
888
+ start_date: DateSchema.nullable().optional(),
889
+ due_date: DateSchema.nullable().optional(),
890
+ estimate: EstimateSchema.nullable().optional(),
891
+ sprint: SprintRefSchema.nullable().optional(),
892
+ fix_release: ReleaseRefSchema.nullable().optional(),
893
+ parent: ItemRefSchema.nullable().optional(),
894
+ initiative: InitiativeRefSchema.nullable().optional(),
895
+ labels: z.array(LabelRefSchema).max(100).optional(),
896
+ add_labels: z.array(LabelRefSchema).max(100).optional(),
897
+ remove_labels: z.array(LabelRefSchema).max(100).optional(),
898
+ custom: CustomValuesInSchema.optional(),
899
+ });
900
+ export const ChannelSchema = z.strictObject({
901
+ id: UuidSchema,
902
+ name: z.string(),
903
+ description: z.string().nullable(),
904
+ visibility: z.enum(['public', 'private']),
905
+ is_org_wide: z.boolean(),
906
+ is_archived: z.boolean(),
907
+ project: ProjectBriefSchema.nullable(),
908
+ last_message_at: TimestampSchema.nullable(),
909
+ });
910
+ export const CommentSchema = z.strictObject({
911
+ id: UuidSchema,
912
+ author: UserSchema.nullable(),
913
+ body: z.string(),
914
+ mentions: z.array(UserSchema),
915
+ created_at: TimestampSchema,
916
+ edited_at: TimestampSchema.nullable(),
917
+ via_agent: z.string().nullable(),
918
+ });
919
+ export const CompleteSprintResponseSchema = z.strictObject({
920
+ sprint: SprintSchema,
921
+ committed_count: z.int(),
922
+ committed_points: z.number(),
923
+ completed_count: z.int(),
924
+ completed_points: z.number(),
925
+ carried_count: z.int(),
926
+ carried_to: SprintBriefSchema.nullable(),
927
+ });
928
+ export const CreateItemRequestSchema = z.strictObject({
929
+ project: ProjectRefSchema.optional(),
930
+ type: NameRefSchema.optional(),
931
+ title: ItemTitleSchema,
932
+ description: MarkdownDescriptionSchema.optional(),
933
+ parent: ItemRefSchema.optional(),
934
+ status: NameRefSchema.optional(),
935
+ assignee: UserRefSchema.optional(),
936
+ priority: PrioritySchema.optional(),
937
+ labels: z.array(LabelRefSchema).max(100).optional(),
938
+ estimate: EstimateSchema.optional(),
939
+ start_date: DateSchema.optional(),
940
+ due_date: DateSchema.optional(),
941
+ sprint: SprintRefSchema.optional(),
942
+ fix_release: ReleaseRefSchema.optional(),
943
+ initiative: InitiativeRefSchema.optional(),
944
+ custom: CustomValuesInSchema.optional(),
945
+ position: RankPositionSchema.optional(),
946
+ idempotency_key: UuidSchema.optional(),
947
+ });
948
+ export const CustomValueOutSchema = z.union([
949
+ z.string(),
950
+ z.number(),
951
+ z.boolean(),
952
+ z.array(z.string()),
953
+ UserSchema,
954
+ z.array(UserSchema),
955
+ ]);
956
+ export const DevelopmentSchema = z.strictObject({
957
+ pull_requests: z.array(DevelopmentPullRequestSchema).max(20),
958
+ branches: z.array(DevelopmentBranchSchema).max(20),
959
+ commits: z.array(DevelopmentCommitSchema).max(20),
960
+ counts: z.strictObject({
961
+ pull_requests: z.int().min(0),
962
+ branches: z.int().min(0),
963
+ commits: z.int().min(0),
964
+ }),
965
+ });
966
+ export const FieldDefSchema = z.strictObject({
967
+ id: UuidSchema,
968
+ name: z.string(),
969
+ kind: FieldKindSchema,
970
+ options: z.array(FieldOptionSchema),
971
+ types: z.array(z.string()).nullable(),
972
+ required_on_create: z.boolean(),
973
+ position: z.int(),
974
+ });
975
+ export const HistoryEventSchema = z.strictObject({
976
+ id: z.int(),
977
+ at: TimestampSchema,
978
+ actor: UserSchema.nullable(),
979
+ via_agent: z.string().nullable(),
980
+ kind: z.enum(['created', 'changed', 'moved', 'linked', 'unlinked', 'deleted', 'imported']),
981
+ field: z.string().nullable(),
982
+ old: z.unknown(),
983
+ new: z.unknown(),
984
+ old_label: z.string().nullable(),
985
+ new_label: z.string().nullable(),
986
+ });
987
+ export const ItemSummarySchema = z.strictObject({
988
+ id: UuidSchema,
989
+ key: ItemKeySchema,
990
+ number: z.int(),
991
+ project: ProjectBriefSchema,
992
+ type: TypeBriefSchema,
993
+ status: StatusBriefSchema,
994
+ title: z.string(),
995
+ priority: PrioritySchema,
996
+ assignee: UserSchema.nullable(),
997
+ reporter: UserSchema.nullable(),
998
+ parent: ItemBriefSchema.nullable(),
999
+ initiative: InitiativeBriefSchema.nullable(),
1000
+ labels: z.array(LabelSchema),
1001
+ estimate: z.number().nullable(),
1002
+ start_date: DateSchema.nullable(),
1003
+ due_date: DateSchema.nullable(),
1004
+ sprint: SprintBriefSchema.nullable(),
1005
+ fix_release: ReleaseBriefSchema.nullable(),
1006
+ rank: z.string(),
1007
+ version: z.int(),
1008
+ description_version: z.int(),
1009
+ created_at: TimestampSchema,
1010
+ updated_at: TimestampSchema,
1011
+ started_at: TimestampSchema.nullable(),
1012
+ completed_at: TimestampSchema.nullable(),
1013
+ canceled_at: TimestampSchema.nullable(),
1014
+ });
1015
+ export const LinkedItemSchema = z.strictObject({
1016
+ id: UuidSchema,
1017
+ key: ItemKeySchema,
1018
+ title: z.string(),
1019
+ status: StatusBriefSchema,
1020
+ });
1021
+ export const ListMembersResponseSchema = z.strictObject({
1022
+ items: z.array(OrgMemberSchema),
1023
+ next_cursor: z.string().nullable(),
1024
+ });
1025
+ export const ListProjectMembersResponseSchema = z.strictObject({
1026
+ items: z.array(ProjectMemberSchema),
1027
+ next_cursor: z.string().nullable(),
1028
+ });
1029
+ export const ListReleasesResponseSchema = z.strictObject({
1030
+ items: z.array(ReleaseSchema),
1031
+ next_cursor: z.string().nullable(),
1032
+ });
1033
+ export const ListSprintsResponseSchema = z.strictObject({
1034
+ items: z.array(SprintSchema),
1035
+ next_cursor: z.string().nullable(),
1036
+ });
1037
+ export const MeResponseSchema = z.strictObject({
1038
+ user: UserSchema,
1039
+ org: z.strictObject({ id: UuidSchema, name: z.string(), test: z.boolean().optional() }),
1040
+ token: z.strictObject({
1041
+ id: UuidSchema,
1042
+ name: z.string(),
1043
+ scopes: z.array(ScopeSchema),
1044
+ expires_at: TimestampSchema,
1045
+ created_at: TimestampSchema,
1046
+ limits: z.strictObject({
1047
+ projects: z.array(ProjectBriefSchema).nullable(),
1048
+ channels: z.array(ChannelBriefSchema).nullable(),
1049
+ }),
1050
+ }),
1051
+ features: z.strictObject({ projects: z.boolean() }),
1052
+ projects: z.array(ProjectBriefSchema),
1053
+ rate_limits: RateLimitsSchema,
1054
+ });
1055
+ export const MessageSchema = z.strictObject({
1056
+ id: UuidSchema,
1057
+ channel_id: UuidSchema,
1058
+ author: MessageAuthorSchema.nullable(),
1059
+ kind: MessageKindSchema,
1060
+ body: z.string(),
1061
+ code: z.string().nullable(),
1062
+ code_language: z.string().nullable(),
1063
+ file: z
1064
+ .strictObject({
1065
+ id: UuidSchema,
1066
+ name: z.string(),
1067
+ type: z.string(),
1068
+ duration_ms: z.int().min(1).nullable(),
1069
+ })
1070
+ .nullable(),
1071
+ photos: z.array(z.strictObject({
1072
+ id: UuidSchema,
1073
+ name: z.string(),
1074
+ type: z.string(),
1075
+ alt: z.string().nullable(),
1076
+ duration_ms: z.int().min(1).nullable(),
1077
+ })),
1078
+ mentions: z.array(UserSchema),
1079
+ reply_count: z.int(),
1080
+ last_reply_at: TimestampSchema.nullable(),
1081
+ created_at: TimestampSchema,
1082
+ edited_at: TimestampSchema.nullable(),
1083
+ deleted: z.boolean(),
1084
+ via_agent: z.string().nullable(),
1085
+ });
1086
+ export const PageSchema = z.strictObject({
1087
+ id: UuidSchema,
1088
+ title: z.string(),
1089
+ parent_id: UuidSchema.nullable(),
1090
+ position: z.int(),
1091
+ is_home: z.boolean(),
1092
+ version: z.int(),
1093
+ updated_at: TimestampSchema,
1094
+ updated_by: UserSchema.nullable(),
1095
+ updated_via_agent: z.string().nullable(),
1096
+ channel: ChannelBriefSchema,
1097
+ body: z.string(),
1098
+ created_at: TimestampSchema,
1099
+ created_by: UserSchema.nullable(),
1100
+ });
1101
+ export const PageSearchResultSchema = z.strictObject({
1102
+ id: UuidSchema,
1103
+ title: z.string(),
1104
+ parent_id: UuidSchema.nullable(),
1105
+ channel: ChannelBriefSchema,
1106
+ updated_at: TimestampSchema,
1107
+ match: PageSearchMatchSchema,
1108
+ });
1109
+ export const PageSummarySchema = z.strictObject({
1110
+ id: UuidSchema,
1111
+ title: z.string(),
1112
+ parent_id: UuidSchema.nullable(),
1113
+ position: z.int(),
1114
+ is_home: z.boolean(),
1115
+ version: z.int(),
1116
+ updated_at: TimestampSchema,
1117
+ updated_by: UserSchema.nullable(),
1118
+ updated_via_agent: z.string().nullable(),
1119
+ });
1120
+ export const PlanPreviewSchema = z.strictObject({
1121
+ summary: z.string(),
1122
+ effects: z.array(PlanEffectSchema).max(500),
1123
+ item_count: z.int(),
1124
+ warnings: z.array(z.string()),
1125
+ });
1126
+ export const ProjectSummarySchema = z.strictObject({
1127
+ id: UuidSchema,
1128
+ key: ProjectKeySchema,
1129
+ name: z.string(),
1130
+ channel: ChannelBriefSchema,
1131
+ archived: z.boolean(),
1132
+ template_key: z.string(),
1133
+ sprints_enabled: z.boolean(),
1134
+ releases_enabled: z.boolean(),
1135
+ estimate_scale: EstimateScaleSchema,
1136
+ item_counts: ItemCountsSchema,
1137
+ });
1138
+ export const RankItemRequestSchema = RankPositionSchema;
1139
+ export const ReleaseItemsResponseSchema = z.strictObject({
1140
+ release: ReleaseSchema,
1141
+ changed: z.array(ItemBriefSchema),
1142
+ });
1143
+ export const ReleaseResponseSchema = z.strictObject({ release: ReleaseSchema });
1144
+ export const SprintItemsResponseSchema = z.strictObject({
1145
+ sprint: SprintSchema,
1146
+ changed: z.array(ItemBriefSchema),
1147
+ });
1148
+ export const SprintResponseSchema = z.strictObject({ sprint: SprintSchema });
1149
+ export const StartSprintResponseSchema = z.strictObject({
1150
+ sprint: SprintSchema,
1151
+ moved_to_board: z.array(SprintBoardMoveSchema),
1152
+ not_moved: z.array(SprintNotMovedSchema),
1153
+ });
1154
+ export const TransitionSetSchema = z.strictObject({
1155
+ assignee: UserRefSchema.nullable().optional(),
1156
+ estimate: EstimateSchema.nullable().optional(),
1157
+ due_date: DateSchema.nullable().optional(),
1158
+ sprint: SprintRefSchema.nullable().optional(),
1159
+ fix_release: ReleaseRefSchema.nullable().optional(),
1160
+ custom: CustomValuesInSchema.optional(),
1161
+ });
1162
+ export const UpdateItemRequestSchema = z.strictObject({
1163
+ if_version: z.int().min(1).optional(),
1164
+ title: ItemTitleSchema.optional(),
1165
+ description: DescriptionEditSchema.optional(),
1166
+ type: NameRefSchema.optional(),
1167
+ status: NameRefSchema.optional(),
1168
+ parent: ItemRefSchema.nullable().optional(),
1169
+ assignee: UserRefSchema.nullable().optional(),
1170
+ priority: PrioritySchema.optional(),
1171
+ labels: z.array(LabelRefSchema).max(100).optional(),
1172
+ add_labels: z.array(LabelRefSchema).max(100).optional(),
1173
+ remove_labels: z.array(LabelRefSchema).max(100).optional(),
1174
+ estimate: EstimateSchema.nullable().optional(),
1175
+ start_date: DateSchema.nullable().optional(),
1176
+ due_date: DateSchema.nullable().optional(),
1177
+ sprint: SprintRefSchema.nullable().optional(),
1178
+ fix_release: ReleaseRefSchema.nullable().optional(),
1179
+ initiative: InitiativeRefSchema.nullable().optional(),
1180
+ custom: CustomValuesInSchema.optional(),
1181
+ });
1182
+ export const WorkTypeSchema = z.strictObject({
1183
+ id: UuidSchema,
1184
+ name: z.string(),
1185
+ system_key: z.string().nullable(),
1186
+ level: ItemLevelSchema,
1187
+ icon: z.string().nullable(),
1188
+ color: ColorSchema.nullable(),
1189
+ position: z.int(),
1190
+ archived: z.boolean(),
1191
+ projects: z.array(z.strictObject({
1192
+ project: ProjectBriefSchema,
1193
+ workflow: z.strictObject({ id: UuidSchema, name: z.string() }),
1194
+ })),
1195
+ });
1196
+ export const WorkflowDefinitionSchema = z.strictObject({
1197
+ workflow: z.strictObject({
1198
+ id: UuidSchema,
1199
+ name: z.string().min(1).max(60),
1200
+ restrict_transitions: z.boolean().nullable().optional(),
1201
+ system_key: z.enum(['default', 'bug', 'incident']).nullable().optional(),
1202
+ }),
1203
+ statuses: z.array(WorkflowDefStatusSchema).max(200).optional(),
1204
+ transitions: z.array(WorkflowDefTransitionSchema).max(1000).optional(),
1205
+ type_ids: z.array(UuidSchema).max(100).optional(),
1206
+ replacements: z.record(UuidSchema, UuidSchema).optional(),
1207
+ });
1208
+ export const WorkflowSummarySchema = z.strictObject({
1209
+ id: UuidSchema,
1210
+ name: z.string(),
1211
+ system_key: z.string().nullable(),
1212
+ restrict_transitions: z.boolean(),
1213
+ types: z.array(z.string()),
1214
+ statuses: z.array(WorkflowStatusSchema),
1215
+ });
1216
+ export const AddCommentResponseSchema = z.strictObject({
1217
+ comment: CommentSchema,
1218
+ created: z.boolean(),
1219
+ });
1220
+ export const BulkUpdateArgsSchema = z.strictObject({
1221
+ items: z.array(ItemRefSchema).min(1).max(50),
1222
+ patch: BulkPatchSchema,
1223
+ });
1224
+ export const CreateChannelResponseSchema = z.strictObject({
1225
+ channel: ChannelSchema,
1226
+ members: z.array(UserSchema),
1227
+ created: z.boolean(),
1228
+ });
1229
+ export const CreatePageResponseSchema = z.strictObject({ page: PageSchema, created: z.boolean() });
1230
+ export const CreatePlanResponseSchema = z.strictObject({
1231
+ handle: PlanHandleSchema,
1232
+ action: PlanActionSchema,
1233
+ preview: PlanPreviewSchema,
1234
+ expires_at: TimestampSchema,
1235
+ });
1236
+ export const CreateProjectResponseSchema = z.strictObject({
1237
+ project: ProjectSummarySchema,
1238
+ created: z.boolean(),
1239
+ });
1240
+ export const CustomFieldValueSchema = z.strictObject({
1241
+ field_id: UuidSchema,
1242
+ field: z.string(),
1243
+ kind: FieldKindSchema,
1244
+ value: CustomValueOutSchema,
1245
+ });
1246
+ export const DescribeProjectResponseSchema = z.strictObject({
1247
+ project: z.strictObject({
1248
+ id: UuidSchema,
1249
+ key: ProjectKeySchema,
1250
+ name: z.string(),
1251
+ channel: ChannelBriefSchema,
1252
+ archived: z.boolean(),
1253
+ template_key: z.string(),
1254
+ sprints_enabled: z.boolean(),
1255
+ releases_enabled: z.boolean(),
1256
+ estimate_scale: EstimateScaleSchema,
1257
+ item_counts: ItemCountsSchema,
1258
+ estimate_values: z.array(z.number()),
1259
+ time_zone: z.string(),
1260
+ default_type: z.string().nullable(),
1261
+ }),
1262
+ types: z.array(ProjectTypeSchema),
1263
+ workflows: z.array(WorkflowSummarySchema),
1264
+ board_columns: z.array(BoardColumnSchema),
1265
+ labels: z.array(LabelSchema),
1266
+ fields: z.array(FieldDefSchema),
1267
+ members: z.array(ProjectMemberSchema),
1268
+ });
1269
+ export const GetWorkflowResponseSchema = z.strictObject({
1270
+ project: ProjectBriefSchema,
1271
+ workflow: WorkflowSummarySchema,
1272
+ board_columns: z.array(z.strictObject({ id: UuidSchema, name: z.string() })),
1273
+ fields: z.array(z.strictObject({ id: UuidSchema, name: z.string() })),
1274
+ types: z.array(z.strictObject({ id: UuidSchema, name: z.string() })),
1275
+ workflow_def: WorkflowDefinitionSchema,
1276
+ });
1277
+ export const ItemHistoryResponseSchema = z.strictObject({
1278
+ items: z.array(HistoryEventSchema),
1279
+ next_cursor: z.string().nullable(),
1280
+ });
1281
+ export const LinkSchema = z.strictObject({
1282
+ id: UuidSchema,
1283
+ kind: LinkKindSchema,
1284
+ item: LinkedItemSchema.nullable(),
1285
+ });
1286
+ export const ListChannelMessagesResponseSchema = z.strictObject({
1287
+ items: z.array(MessageSchema),
1288
+ next_cursor: z.string().nullable(),
1289
+ });
1290
+ export const ListChannelsResponseSchema = z.strictObject({
1291
+ items: z.array(ChannelSchema),
1292
+ next_cursor: z.string().nullable(),
1293
+ });
1294
+ export const ListCommentsResponseSchema = z.strictObject({
1295
+ items: z.array(CommentSchema),
1296
+ next_cursor: z.string().nullable(),
1297
+ });
1298
+ export const ListPagesResponseSchema = z.strictObject({
1299
+ items: z.array(PageSummarySchema),
1300
+ next_cursor: z.string().nullable(),
1301
+ });
1302
+ export const ListProjectsResponseSchema = z.strictObject({
1303
+ items: z.array(ProjectSummarySchema),
1304
+ next_cursor: z.string().nullable(),
1305
+ });
1306
+ export const ListWorkTypesResponseSchema = z.strictObject({ items: z.array(WorkTypeSchema) });
1307
+ export const PageResponseSchema = z.strictObject({ page: PageSchema });
1308
+ export const PlanResultSchema = z.union([
1309
+ z.strictObject({ action: z.literal('delete_item'), deleted: z.array(ItemBriefSchema) }),
1310
+ z.strictObject({
1311
+ action: z.literal('move_item'),
1312
+ item: ItemSummarySchema,
1313
+ old_key: ItemKeySchema,
1314
+ }),
1315
+ z.strictObject({ action: z.literal('bulk_update'), items: z.array(ItemSummarySchema) }),
1316
+ z.strictObject({ action: z.literal('archive_status'), moved_items: z.int() }),
1317
+ z.strictObject({ action: z.literal('workflow_change'), workflow_id: UuidSchema }),
1318
+ z.strictObject({ action: z.literal('work_type_change'), type_id: UuidSchema }),
1319
+ z.strictObject({ action: z.literal('field_change'), field_id: UuidSchema }),
1320
+ z.strictObject({ action: z.literal('label_change'), label_id: UuidSchema }),
1321
+ ]);
1322
+ export const RankItemResponseSchema = z.strictObject({ item: ItemSummarySchema });
1323
+ export const SearchPagesResponseSchema = z.strictObject({
1324
+ items: z.array(PageSearchResultSchema),
1325
+ next_cursor: z.string().nullable(),
1326
+ });
1327
+ export const ThreadResponseSchema = z.strictObject({
1328
+ root: MessageSchema,
1329
+ replies: z.array(MessageSchema),
1330
+ next_cursor: z.string().nullable(),
1331
+ });
1332
+ export const TransitionItemRequestSchema = z.strictObject({
1333
+ status: NameRefSchema,
1334
+ comment: CommentBodySchema.optional(),
1335
+ set: TransitionSetSchema.optional(),
1336
+ if_version: z.int().min(1).optional(),
1337
+ });
1338
+ export const TransitionItemResponseSchema = z.strictObject({
1339
+ item: ItemSummarySchema,
1340
+ comment: CommentSchema.nullable(),
1341
+ });
1342
+ export const WorkflowChangeArgsSchema = z.strictObject({
1343
+ project: ProjectRefSchema,
1344
+ workflow_def: WorkflowDefinitionSchema,
1345
+ });
1346
+ export const AddLinkResponseSchema = z.strictObject({ link: LinkSchema, created: z.boolean() });
1347
+ export const ApplyPlanResponseSchema = z.strictObject({
1348
+ handle: PlanHandleSchema,
1349
+ action: PlanActionSchema,
1350
+ applied_at: TimestampSchema,
1351
+ result: PlanResultSchema,
1352
+ });
1353
+ export const CreatePlanRequestSchema = z.union([
1354
+ z.strictObject({ action: z.literal('delete_item'), args: DeleteItemArgsSchema }),
1355
+ z.strictObject({ action: z.literal('move_item'), args: MoveItemArgsSchema }),
1356
+ z.strictObject({ action: z.literal('bulk_update'), args: BulkUpdateArgsSchema }),
1357
+ z.strictObject({ action: z.literal('archive_status'), args: ArchiveStatusArgsSchema }),
1358
+ z.strictObject({ action: z.literal('workflow_change'), args: WorkflowChangeArgsSchema }),
1359
+ z.strictObject({ action: z.literal('work_type_change'), args: WorkTypeChangeArgsSchema }),
1360
+ z.strictObject({ action: z.literal('field_change'), args: FieldChangeArgsSchema }),
1361
+ z.strictObject({ action: z.literal('label_change'), args: LabelChangeArgsSchema }),
1362
+ ]);
1363
+ export const ItemDetailSchema = z.strictObject({
1364
+ id: UuidSchema,
1365
+ key: ItemKeySchema,
1366
+ number: z.int(),
1367
+ project: ProjectBriefSchema,
1368
+ type: TypeBriefSchema,
1369
+ status: StatusBriefSchema,
1370
+ title: z.string(),
1371
+ priority: PrioritySchema,
1372
+ assignee: UserSchema.nullable(),
1373
+ reporter: UserSchema.nullable(),
1374
+ parent: ItemBriefSchema.nullable(),
1375
+ initiative: InitiativeBriefSchema.nullable(),
1376
+ labels: z.array(LabelSchema),
1377
+ estimate: z.number().nullable(),
1378
+ start_date: DateSchema.nullable(),
1379
+ due_date: DateSchema.nullable(),
1380
+ sprint: SprintBriefSchema.nullable(),
1381
+ fix_release: ReleaseBriefSchema.nullable(),
1382
+ rank: z.string(),
1383
+ version: z.int(),
1384
+ description_version: z.int(),
1385
+ created_at: TimestampSchema,
1386
+ updated_at: TimestampSchema,
1387
+ started_at: TimestampSchema.nullable(),
1388
+ completed_at: TimestampSchema.nullable(),
1389
+ canceled_at: TimestampSchema.nullable(),
1390
+ description: z.string(),
1391
+ description_truncated: z.boolean(),
1392
+ description_offset: z.int().min(0).optional(),
1393
+ description_next_offset: z.int().min(0).nullable().optional(),
1394
+ description_length: z.int().min(0).optional(),
1395
+ custom: z.array(CustomFieldValueSchema),
1396
+ });
1397
+ export const ItemSearchResultSchema = z.strictObject({
1398
+ id: UuidSchema,
1399
+ key: ItemKeySchema,
1400
+ number: z.int(),
1401
+ project: ProjectBriefSchema,
1402
+ type: TypeBriefSchema,
1403
+ status: StatusBriefSchema,
1404
+ title: z.string(),
1405
+ priority: PrioritySchema,
1406
+ assignee: UserSchema.nullable(),
1407
+ reporter: UserSchema.nullable(),
1408
+ parent: ItemBriefSchema.nullable(),
1409
+ initiative: InitiativeBriefSchema.nullable(),
1410
+ labels: z.array(LabelSchema),
1411
+ estimate: z.number().nullable(),
1412
+ start_date: DateSchema.nullable(),
1413
+ due_date: DateSchema.nullable(),
1414
+ sprint: SprintBriefSchema.nullable(),
1415
+ fix_release: ReleaseBriefSchema.nullable(),
1416
+ rank: z.string(),
1417
+ version: z.int(),
1418
+ description_version: z.int(),
1419
+ created_at: TimestampSchema,
1420
+ updated_at: TimestampSchema,
1421
+ started_at: TimestampSchema.nullable(),
1422
+ completed_at: TimestampSchema.nullable(),
1423
+ canceled_at: TimestampSchema.nullable(),
1424
+ match: SearchMatchSchema.optional(),
1425
+ link_counts: LinkCountsSchema.optional(),
1426
+ activity_at: TimestampSchema.optional(),
1427
+ description: z.string().optional(),
1428
+ custom: z.array(CustomFieldValueSchema).optional(),
1429
+ });
1430
+ export const CreateItemResponseSchema = z.strictObject({
1431
+ item: ItemDetailSchema,
1432
+ created: z.boolean(),
1433
+ });
1434
+ export const GetItemResponseSchema = z.strictObject({
1435
+ item: ItemDetailSchema,
1436
+ children: z.array(ItemSummarySchema),
1437
+ links: z.array(LinkSchema),
1438
+ comments: z.array(CommentSchema),
1439
+ comments_next_cursor: z.string().nullable(),
1440
+ history: z.array(HistoryEventSchema).optional(),
1441
+ development: DevelopmentSchema.optional(),
1442
+ feedback: FeedbackSchema.optional(),
1443
+ });
1444
+ export const ItemWriteResponseSchema = z.strictObject({ item: ItemDetailSchema });
1445
+ export const SearchItemsResponseSchema = z.strictObject({
1446
+ items: z.array(ItemSearchResultSchema),
1447
+ next_cursor: z.string().nullable(),
1448
+ });
1449
+ /** Each operation's query parameters, as read from a URL (repeated parameters as arrays). */
1450
+ export const QUERY_SCHEMAS = {
1451
+ add_comment: z.strictObject({}),
1452
+ add_link: z.strictObject({}),
1453
+ add_release_items: z.strictObject({}),
1454
+ add_sprint_items: z.strictObject({}),
1455
+ apply_plan: z.strictObject({}),
1456
+ archive_release: z.strictObject({}),
1457
+ complete_sprint: z.strictObject({}),
1458
+ create_channel: z.strictObject({}),
1459
+ create_item: z.strictObject({}),
1460
+ create_page: z.strictObject({}),
1461
+ create_plan: z.strictObject({}),
1462
+ create_project: z.strictObject({}),
1463
+ create_release: z.strictObject({}),
1464
+ create_sprint: z.strictObject({}),
1465
+ describe_project: z.strictObject({}),
1466
+ generate_release_notes: z.strictObject({}),
1467
+ get_item: z.strictObject({
1468
+ detail: z.enum(['concise', 'full']).optional(),
1469
+ include_history: z.enum(['true', 'false']).optional(),
1470
+ include_development: z.enum(['true', 'false']).optional(),
1471
+ description_offset: z.coerce.number().int().min(0).max(262144).optional(),
1472
+ }),
1473
+ get_item_history: z.strictObject({
1474
+ cursor: CursorSchema.optional(),
1475
+ limit: z.coerce.number().int().min(1).max(100).optional(),
1476
+ }),
1477
+ get_me: z.strictObject({}),
1478
+ get_meta: z.strictObject({}),
1479
+ get_page: z.strictObject({}),
1480
+ get_thread: z.strictObject({
1481
+ cursor: CursorSchema.optional(),
1482
+ limit: z.coerce.number().int().min(1).max(100).optional(),
1483
+ }),
1484
+ get_workflow: z.strictObject({}),
1485
+ list_channel_messages: z.strictObject({
1486
+ since: TimestampSchema.optional(),
1487
+ cursor: CursorSchema.optional(),
1488
+ limit: z.coerce.number().int().min(1).max(100).optional(),
1489
+ }),
1490
+ list_channels: z.strictObject({
1491
+ include_archived: z.enum(['true', 'false']).optional(),
1492
+ cursor: CursorSchema.optional(),
1493
+ limit: z.coerce.number().int().min(1).max(100).optional(),
1494
+ }),
1495
+ list_comments: z.strictObject({
1496
+ order: z.enum(['asc', 'desc']).optional(),
1497
+ cursor: CursorSchema.optional(),
1498
+ limit: z.coerce.number().int().min(1).max(100).optional(),
1499
+ }),
1500
+ list_members: z.strictObject({
1501
+ q: z.string().min(1).max(100).optional(),
1502
+ cursor: CursorSchema.optional(),
1503
+ limit: z.coerce.number().int().min(1).max(100).optional(),
1504
+ }),
1505
+ list_pages: z.strictObject({
1506
+ cursor: CursorSchema.optional(),
1507
+ limit: z.coerce.number().int().min(1).max(100).optional(),
1508
+ }),
1509
+ list_project_members: z.strictObject({
1510
+ q: z.string().min(1).max(100).optional(),
1511
+ cursor: CursorSchema.optional(),
1512
+ limit: z.coerce.number().int().min(1).max(100).optional(),
1513
+ }),
1514
+ list_projects: z.strictObject({
1515
+ include_archived: z.enum(['true', 'false']).optional(),
1516
+ cursor: CursorSchema.optional(),
1517
+ limit: z.coerce.number().int().min(1).max(100).optional(),
1518
+ }),
1519
+ list_releases: z.strictObject({
1520
+ status: z.array(ReleaseStatusSchema).max(3).optional(),
1521
+ cursor: CursorSchema.optional(),
1522
+ limit: z.coerce.number().int().min(1).max(100).optional(),
1523
+ }),
1524
+ list_sprints: z.strictObject({
1525
+ state: z.array(SprintStateSchema).max(3).optional(),
1526
+ cursor: CursorSchema.optional(),
1527
+ limit: z.coerce.number().int().min(1).max(100).optional(),
1528
+ }),
1529
+ list_work_types: z.strictObject({ include_archived: z.enum(['true', 'false']).optional() }),
1530
+ rank_item: z.strictObject({}),
1531
+ release_version: z.strictObject({}),
1532
+ remove_link: z.strictObject({}),
1533
+ remove_release_items: z.strictObject({}),
1534
+ remove_sprint_items: z.strictObject({}),
1535
+ reopen_release: z.strictObject({}),
1536
+ restore_release: z.strictObject({}),
1537
+ search_items: z.strictObject({
1538
+ q: z.string().min(1).max(200).optional(),
1539
+ project: z.array(ProjectRefSchema).max(20).optional(),
1540
+ type: z.array(NameRefSchema).max(20).optional(),
1541
+ status: z.array(NameRefSchema).max(20).optional(),
1542
+ category: z.array(StatusCategorySchema).max(4).optional(),
1543
+ priority: z.array(PrioritySchema).max(5).optional(),
1544
+ assignee: z
1545
+ .array(z.union([z.literal('none'), UserRefSchema]))
1546
+ .max(20)
1547
+ .optional(),
1548
+ label: z.array(LabelRefSchema).max(20).optional(),
1549
+ sprint: SprintRefSchema.optional(),
1550
+ release: z.string().min(1).max(80).optional(),
1551
+ parent: ItemRefSchema.optional(),
1552
+ has_link: z
1553
+ .array(z
1554
+ .string()
1555
+ .regex(new RegExp('^(blocks|blocked_by|relates|duplicates|duplicated_by)(?::(open|not_started|started|done|canceled))?$', 'u')))
1556
+ .max(10)
1557
+ .optional(),
1558
+ updated_since: TimestampSchema.optional(),
1559
+ activity_since: TimestampSchema.optional(),
1560
+ sort: z
1561
+ .array(z
1562
+ .string()
1563
+ .regex(new RegExp('^-?(rank|number|title|priority|status_category|due_date|start_date|estimate|created_at|updated_at)$', 'u')))
1564
+ .max(5)
1565
+ .optional(),
1566
+ detail: z.enum(['concise', 'full']).optional(),
1567
+ cursor: CursorSchema.optional(),
1568
+ limit: z.coerce.number().int().min(1).max(100).optional(),
1569
+ }),
1570
+ search_pages: z.strictObject({
1571
+ q: z.string().min(1).max(200),
1572
+ channel: z.array(ChannelRefSchema).max(20).optional(),
1573
+ cursor: CursorSchema.optional(),
1574
+ limit: z.coerce.number().int().min(1).max(100).optional(),
1575
+ }),
1576
+ start_sprint: z.strictObject({}),
1577
+ transition_item: z.strictObject({}),
1578
+ update_item: z.strictObject({}),
1579
+ update_page: z.strictObject({}),
1580
+ update_release: z.strictObject({}),
1581
+ };
1582
+ /** Each operation's request body schema, or null when it takes none. */
1583
+ export const REQUEST_SCHEMAS = {
1584
+ add_comment: AddCommentRequestSchema,
1585
+ add_link: AddLinkRequestSchema,
1586
+ add_release_items: PlanningItemsRequestSchema,
1587
+ add_sprint_items: PlanningItemsRequestSchema,
1588
+ apply_plan: EmptyRequestSchema,
1589
+ archive_release: null,
1590
+ complete_sprint: CompleteSprintRequestSchema,
1591
+ create_channel: CreateChannelRequestSchema,
1592
+ create_item: CreateItemRequestSchema,
1593
+ create_page: CreatePageRequestSchema,
1594
+ create_plan: CreatePlanRequestSchema,
1595
+ create_project: CreateProjectRequestSchema,
1596
+ create_release: CreateReleaseRequestSchema,
1597
+ create_sprint: CreateSprintRequestSchema,
1598
+ describe_project: null,
1599
+ generate_release_notes: ReleaseNotesRequestSchema,
1600
+ get_item: null,
1601
+ get_item_history: null,
1602
+ get_me: null,
1603
+ get_meta: null,
1604
+ get_page: null,
1605
+ get_thread: null,
1606
+ get_workflow: null,
1607
+ list_channel_messages: null,
1608
+ list_channels: null,
1609
+ list_comments: null,
1610
+ list_members: null,
1611
+ list_pages: null,
1612
+ list_project_members: null,
1613
+ list_projects: null,
1614
+ list_releases: null,
1615
+ list_sprints: null,
1616
+ list_work_types: null,
1617
+ rank_item: RankItemRequestSchema,
1618
+ release_version: ReleaseVersionRequestSchema,
1619
+ remove_link: null,
1620
+ remove_release_items: PlanningItemsRequestSchema,
1621
+ remove_sprint_items: PlanningItemsRequestSchema,
1622
+ reopen_release: null,
1623
+ restore_release: null,
1624
+ search_items: null,
1625
+ search_pages: null,
1626
+ start_sprint: StartSprintRequestSchema,
1627
+ transition_item: TransitionItemRequestSchema,
1628
+ update_item: UpdateItemRequestSchema,
1629
+ update_page: UpdatePageRequestSchema,
1630
+ update_release: UpdateReleaseRequestSchema,
1631
+ };
1632
+ /** Each operation's success response schema. */
1633
+ export const RESPONSE_SCHEMAS = {
1634
+ add_comment: AddCommentResponseSchema,
1635
+ add_link: AddLinkResponseSchema,
1636
+ add_release_items: ReleaseItemsResponseSchema,
1637
+ add_sprint_items: SprintItemsResponseSchema,
1638
+ apply_plan: ApplyPlanResponseSchema,
1639
+ archive_release: ReleaseResponseSchema,
1640
+ complete_sprint: CompleteSprintResponseSchema,
1641
+ create_channel: CreateChannelResponseSchema,
1642
+ create_item: CreateItemResponseSchema,
1643
+ create_page: CreatePageResponseSchema,
1644
+ create_plan: CreatePlanResponseSchema,
1645
+ create_project: CreateProjectResponseSchema,
1646
+ create_release: ReleaseResponseSchema,
1647
+ create_sprint: SprintResponseSchema,
1648
+ describe_project: DescribeProjectResponseSchema,
1649
+ generate_release_notes: ReleaseNotesResponseSchema,
1650
+ get_item: GetItemResponseSchema,
1651
+ get_item_history: ItemHistoryResponseSchema,
1652
+ get_me: MeResponseSchema,
1653
+ get_meta: MetaResponseSchema,
1654
+ get_page: PageResponseSchema,
1655
+ get_thread: ThreadResponseSchema,
1656
+ get_workflow: GetWorkflowResponseSchema,
1657
+ list_channel_messages: ListChannelMessagesResponseSchema,
1658
+ list_channels: ListChannelsResponseSchema,
1659
+ list_comments: ListCommentsResponseSchema,
1660
+ list_members: ListMembersResponseSchema,
1661
+ list_pages: ListPagesResponseSchema,
1662
+ list_project_members: ListProjectMembersResponseSchema,
1663
+ list_projects: ListProjectsResponseSchema,
1664
+ list_releases: ListReleasesResponseSchema,
1665
+ list_sprints: ListSprintsResponseSchema,
1666
+ list_work_types: ListWorkTypesResponseSchema,
1667
+ rank_item: RankItemResponseSchema,
1668
+ release_version: ReleaseResponseSchema,
1669
+ remove_link: RemoveLinkResponseSchema,
1670
+ remove_release_items: ReleaseItemsResponseSchema,
1671
+ remove_sprint_items: SprintItemsResponseSchema,
1672
+ reopen_release: ReleaseResponseSchema,
1673
+ restore_release: ReleaseResponseSchema,
1674
+ search_items: SearchItemsResponseSchema,
1675
+ search_pages: SearchPagesResponseSchema,
1676
+ start_sprint: StartSprintResponseSchema,
1677
+ transition_item: TransitionItemResponseSchema,
1678
+ update_item: ItemWriteResponseSchema,
1679
+ update_page: PageResponseSchema,
1680
+ update_release: ReleaseResponseSchema,
1681
+ };