Skip to content

Where people and agents ship software together. The open-source git platform for the whole job: issues, agents, checks and deploys to the edge.

g1t.sh
6,597 linesCodeBlameRaw
1// @generated from apps/docs/src/data/openapi.json by crates/g1t/src/ops.rs.
2// Do not edit: run `G1T_WRITE_OPS=1 cargo test -p g1t ops_table`.
3
4use crate::ops::{Field, In, Operation, Param};
5
6#[rustfmt::skip]
7pub static OPERATIONS: &[Operation] = &[
8 Operation {
9 id: "accept_repo_invitation",
10 method: "PATCH",
11 path: "/user/repository_invitations/{id}",
12 tag: "Access",
13 summary: "Accept a repository invitation",
14 scope: Some("account:write"),
15 params: &[
16 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
17 ],
18 body: &[],
19 },
20 Operation {
21 id: "add_collaborator",
22 method: "POST",
23 path: "/repos/{owner}/{name}/collaborators",
24 tag: "Access",
25 summary: "Add a collaborator",
26 scope: Some("access:admin"),
27 params: &[
28 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
29 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
30 ],
31 body: &[
32 Field { name: "invitee", kind: "string", required: true, values: &[] },
33 Field { name: "role", kind: "string", required: true, values: &["read", "triage", "write", "maintain", "admin"] },
34 ],
35 },
36 Operation {
37 id: "create_deploy_key",
38 method: "POST",
39 path: "/repos/{owner}/{name}/keys",
40 tag: "Access",
41 summary: "Create a deploy key",
42 scope: Some("access:admin"),
43 params: &[
44 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
45 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
46 ],
47 body: &[
48 Field { name: "key", kind: "string", required: true, values: &[] },
49 Field { name: "read_only", kind: "boolean", required: false, values: &[] },
50 Field { name: "title", kind: "string", required: false, values: &[] },
51 ],
52 },
53 Operation {
54 id: "decline_repo_invitation",
55 method: "DELETE",
56 path: "/user/repository_invitations/{id}",
57 tag: "Access",
58 summary: "Decline a repository invitation",
59 scope: Some("account:write"),
60 params: &[
61 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
62 ],
63 body: &[],
64 },
65 Operation {
66 id: "delete_deploy_key",
67 method: "DELETE",
68 path: "/repos/{owner}/{name}/keys/{id}",
69 tag: "Access",
70 summary: "Delete a deploy key",
71 scope: Some("access:admin"),
72 params: &[
73 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
74 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
75 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
76 ],
77 body: &[],
78 },
79 Operation {
80 id: "get_collaborator_permission",
81 method: "GET",
82 path: "/repos/{owner}/{name}/collaborators/{username}/permission",
83 tag: "Access",
84 summary: "Get someone's permission",
85 scope: Some("access:read"),
86 params: &[
87 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
88 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
89 Param { name: "username", location: In::Path, kind: "string", required: true, values: &[] },
90 ],
91 body: &[],
92 },
93 Operation {
94 id: "get_deploy_key",
95 method: "GET",
96 path: "/repos/{owner}/{name}/keys/{id}",
97 tag: "Access",
98 summary: "Get a deploy key",
99 scope: Some("access:read"),
100 params: &[
101 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
102 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
103 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
104 ],
105 body: &[],
106 },
107 Operation {
108 id: "list_collaborators",
109 method: "GET",
110 path: "/repos/{owner}/{name}/collaborators",
111 tag: "Access",
112 summary: "List who has access",
113 scope: Some("access:read"),
114 params: &[
115 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
116 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
117 ],
118 body: &[],
119 },
120 Operation {
121 id: "list_deploy_keys",
122 method: "GET",
123 path: "/repos/{owner}/{name}/keys",
124 tag: "Access",
125 summary: "List deploy keys",
126 scope: Some("access:read"),
127 params: &[
128 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
129 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
130 ],
131 body: &[],
132 },
133 Operation {
134 id: "list_my_repo_invitations",
135 method: "GET",
136 path: "/user/repository_invitations",
137 tag: "Access",
138 summary: "List your repository invitations",
139 scope: Some("account:read"),
140 params: &[],
141 body: &[],
142 },
143 Operation {
144 id: "list_outside_collaborators",
145 method: "GET",
146 path: "/workspaces/{workspace}/outside_collaborators",
147 tag: "Access",
148 summary: "List outside collaborators",
149 scope: Some("access:read"),
150 params: &[
151 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
152 ],
153 body: &[],
154 },
155 Operation {
156 id: "list_repo_invitations",
157 method: "GET",
158 path: "/repos/{owner}/{name}/invitations",
159 tag: "Access",
160 summary: "List a repository's invitations",
161 scope: Some("access:read"),
162 params: &[
163 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
164 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
165 ],
166 body: &[],
167 },
168 Operation {
169 id: "remove_collaborator",
170 method: "DELETE",
171 path: "/repos/{owner}/{name}/collaborators/{username}",
172 tag: "Access",
173 summary: "Remove a collaborator",
174 scope: Some("access:admin"),
175 params: &[
176 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
177 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
178 Param { name: "username", location: In::Path, kind: "string", required: true, values: &[] },
179 ],
180 body: &[],
181 },
182 Operation {
183 id: "revoke_repo_invitation",
184 method: "DELETE",
185 path: "/repos/{owner}/{name}/invitations/{id}",
186 tag: "Access",
187 summary: "Revoke a repository invitation",
188 scope: Some("access:admin"),
189 params: &[
190 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
191 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
192 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
193 ],
194 body: &[],
195 },
196 Operation {
197 id: "set_base_permission",
198 method: "PUT",
199 path: "/workspaces/{workspace}/base_permission",
200 tag: "Access",
201 summary: "Set the base permission",
202 scope: Some("access:admin"),
203 params: &[
204 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
205 ],
206 body: &[
207 Field { name: "base_permission", kind: "string", required: true, values: &["none", "read", "write", "admin"] },
208 ],
209 },
210 Operation {
211 id: "update_collaborator",
212 method: "PATCH",
213 path: "/repos/{owner}/{name}/collaborators/{username}",
214 tag: "Access",
215 summary: "Change a collaborator's role",
216 scope: Some("access:admin"),
217 params: &[
218 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
219 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
220 Param { name: "username", location: In::Path, kind: "string", required: true, values: &[] },
221 ],
222 body: &[
223 Field { name: "role", kind: "string", required: true, values: &["read", "triage", "write", "maintain", "admin"] },
224 ],
225 },
226 Operation {
227 id: "add_email",
228 method: "POST",
229 path: "/user/emails",
230 tag: "Accounts",
231 summary: "Add an email address",
232 scope: Some("account:write"),
233 params: &[],
234 body: &[
235 Field { name: "email", kind: "string", required: true, values: &[] },
236 Field { name: "password", kind: "string", required: true, values: &[] },
237 ],
238 },
239 Operation {
240 id: "confirm_email",
241 method: "POST",
242 path: "/user/emails/confirm",
243 tag: "Accounts",
244 summary: "Confirm an email address",
245 scope: Some("account:write"),
246 params: &[],
247 body: &[
248 Field { name: "code", kind: "string", required: true, values: &[] },
249 ],
250 },
251 Operation {
252 id: "device_code",
253 method: "POST",
254 path: "/device/code",
255 tag: "Accounts",
256 summary: "Start signing in",
257 scope: None,
258 params: &[],
259 body: &[
260 Field { name: "client_name", kind: "string", required: false, values: &[] },
261 ],
262 },
263 Operation {
264 id: "device_token",
265 method: "POST",
266 path: "/device/token",
267 tag: "Accounts",
268 summary: "Finish signing in",
269 scope: None,
270 params: &[],
271 body: &[
272 Field { name: "device_code", kind: "string", required: true, values: &[] },
273 ],
274 },
275 Operation {
276 id: "list_emails",
277 method: "GET",
278 path: "/user/emails",
279 tag: "Accounts",
280 summary: "List your email addresses",
281 scope: Some("account:read"),
282 params: &[],
283 body: &[],
284 },
285 Operation {
286 id: "remove_email",
287 method: "DELETE",
288 path: "/user/emails/{email}",
289 tag: "Accounts",
290 summary: "Remove an email address",
291 scope: Some("account:write"),
292 params: &[
293 Param { name: "email", location: In::Path, kind: "string", required: true, values: &[] },
294 ],
295 body: &[
296 Field { name: "password", kind: "string", required: true, values: &[] },
297 ],
298 },
299 Operation {
300 id: "update_email_settings",
301 method: "PATCH",
302 path: "/user/email-settings",
303 tag: "Accounts",
304 summary: "Change your email settings",
305 scope: Some("account:write"),
306 params: &[],
307 body: &[
308 Field { name: "backup", kind: "string", required: false, values: &[] },
309 Field { name: "block_private_pushes", kind: "boolean", required: false, values: &[] },
310 Field { name: "password", kind: "string", required: false, values: &[] },
311 Field { name: "primary", kind: "string", required: false, values: &[] },
312 Field { name: "private_email", kind: "boolean", required: false, values: &[] },
313 ],
314 },
315 Operation {
316 id: "whoami",
317 method: "GET",
318 path: "/user",
319 tag: "Accounts",
320 summary: "Get the current user",
321 scope: None,
322 params: &[],
323 body: &[],
324 },
325 Operation {
326 id: "cancel_workflow_run",
327 method: "POST",
328 path: "/repos/{owner}/{name}/actions/runs/{id}/cancel",
329 tag: "Actions",
330 summary: "Cancel a workflow run",
331 scope: Some("workflows:write"),
332 params: &[
333 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
334 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
335 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
336 ],
337 body: &[
338 Field { name: "force", kind: "boolean", required: false, values: &[] },
339 ],
340 },
341 Operation {
342 id: "delete_artifact",
343 method: "DELETE",
344 path: "/repos/{owner}/{name}/actions/artifacts/{id}",
345 tag: "Actions",
346 summary: "Delete an artifact",
347 scope: Some("workflows:write"),
348 params: &[
349 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
350 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
351 Param { name: "id", location: In::Path, kind: "integer", required: true, values: &[] },
352 ],
353 body: &[],
354 },
355 Operation {
356 id: "delete_cache",
357 method: "DELETE",
358 path: "/repos/{owner}/{name}/actions/caches/{id}",
359 tag: "Actions",
360 summary: "Delete a cache by id",
361 scope: Some("workflows:write"),
362 params: &[
363 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
364 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
365 Param { name: "id", location: In::Path, kind: "integer", required: true, values: &[] },
366 ],
367 body: &[],
368 },
369 Operation {
370 id: "delete_caches_by_key",
371 method: "DELETE",
372 path: "/repos/{owner}/{name}/actions/caches",
373 tag: "Actions",
374 summary: "Delete caches by key",
375 scope: Some("workflows:write"),
376 params: &[
377 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
378 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
379 ],
380 body: &[
381 Field { name: "key", kind: "string", required: true, values: &[] },
382 Field { name: "ref", kind: "string", required: false, values: &[] },
383 ],
384 },
385 Operation {
386 id: "disable_workflow",
387 method: "PUT",
388 path: "/repos/{owner}/{name}/actions/workflows/{workflow}/disable",
389 tag: "Actions",
390 summary: "Turn a workflow off",
391 scope: Some("workflows:write"),
392 params: &[
393 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
394 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
395 Param { name: "workflow", location: In::Path, kind: "string", required: true, values: &[] },
396 ],
397 body: &[
398 Field { name: "enabled", kind: "boolean", required: true, values: &[] },
399 ],
400 },
401 Operation {
402 id: "dispatch_workflow",
403 method: "POST",
404 path: "/repos/{owner}/{name}/actions/workflows/{workflow}/dispatches",
405 tag: "Actions",
406 summary: "Run a workflow",
407 scope: Some("workflows:write"),
408 params: &[
409 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
410 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
411 Param { name: "workflow", location: In::Path, kind: "string", required: true, values: &[] },
412 ],
413 body: &[
414 Field { name: "inputs", kind: "object", required: false, values: &[] },
415 Field { name: "ref", kind: "string", required: false, values: &[] },
416 ],
417 },
418 Operation {
419 id: "download_artifact",
420 method: "GET",
421 path: "/repos/{owner}/{name}/actions/artifacts/{id}/zip",
422 tag: "Actions",
423 summary: "Download an artifact",
424 scope: Some("workflows:read"),
425 params: &[
426 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
427 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
428 Param { name: "id", location: In::Path, kind: "integer", required: true, values: &[] },
429 ],
430 body: &[],
431 },
432 Operation {
433 id: "enable_workflow",
434 method: "PUT",
435 path: "/repos/{owner}/{name}/actions/workflows/{workflow}/enable",
436 tag: "Actions",
437 summary: "Turn a workflow on",
438 scope: Some("workflows:write"),
439 params: &[
440 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
441 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
442 Param { name: "workflow", location: In::Path, kind: "string", required: true, values: &[] },
443 ],
444 body: &[
445 Field { name: "enabled", kind: "boolean", required: true, values: &[] },
446 ],
447 },
448 Operation {
449 id: "force_cancel_workflow_run",
450 method: "POST",
451 path: "/repos/{owner}/{name}/actions/runs/{id}/force-cancel",
452 tag: "Actions",
453 summary: "Force-cancel a workflow run",
454 scope: Some("workflows:write"),
455 params: &[
456 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
457 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
458 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
459 ],
460 body: &[
461 Field { name: "force", kind: "boolean", required: false, values: &[] },
462 ],
463 },
464 Operation {
465 id: "get_artifact",
466 method: "GET",
467 path: "/repos/{owner}/{name}/actions/artifacts/{id}",
468 tag: "Actions",
469 summary: "Get an artifact",
470 scope: Some("workflows:read"),
471 params: &[
472 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
473 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
474 Param { name: "id", location: In::Path, kind: "integer", required: true, values: &[] },
475 ],
476 body: &[],
477 },
478 Operation {
479 id: "get_artifact_retention",
480 method: "GET",
481 path: "/repos/{owner}/{name}/actions/permissions/artifact-and-log-retention",
482 tag: "Actions",
483 summary: "Get artifact retention",
484 scope: Some("workflows:read"),
485 params: &[
486 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
487 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
488 ],
489 body: &[],
490 },
491 Operation {
492 id: "get_cache_usage",
493 method: "GET",
494 path: "/repos/{owner}/{name}/actions/cache/usage",
495 tag: "Actions",
496 summary: "Get a repository's cache usage",
497 scope: Some("workflows:read"),
498 params: &[
499 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
500 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
501 ],
502 body: &[],
503 },
504 Operation {
505 id: "get_job_logs",
506 method: "GET",
507 path: "/repos/{owner}/{name}/actions/jobs/{job}/logs",
508 tag: "Actions",
509 summary: "Get a job's log",
510 scope: Some("workflows:read"),
511 params: &[
512 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
513 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
514 Param { name: "job", location: In::Path, kind: "string", required: true, values: &[] },
515 Param { name: "after", location: In::Query, kind: "integer", required: false, values: &[] },
516 Param { name: "tail", location: In::Query, kind: "integer", required: false, values: &[] },
517 ],
518 body: &[],
519 },
520 Operation {
521 id: "get_workflow",
522 method: "GET",
523 path: "/repos/{owner}/{name}/actions/workflows/{workflow}",
524 tag: "Actions",
525 summary: "Get a workflow",
526 scope: Some("workflows:read"),
527 params: &[
528 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
529 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
530 Param { name: "workflow", location: In::Path, kind: "string", required: true, values: &[] },
531 Param { name: "ref", location: In::Query, kind: "string", required: false, values: &[] },
532 ],
533 body: &[],
534 },
535 Operation {
536 id: "get_workflow_run",
537 method: "GET",
538 path: "/repos/{owner}/{name}/actions/runs/{id}",
539 tag: "Actions",
540 summary: "Get a workflow run",
541 scope: Some("workflows:read"),
542 params: &[
543 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
544 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
545 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
546 ],
547 body: &[],
548 },
549 Operation {
550 id: "get_workflow_run_attempt",
551 method: "GET",
552 path: "/repos/{owner}/{name}/actions/runs/{id}/attempts/{attempt}",
553 tag: "Actions",
554 summary: "Get a workflow run attempt",
555 scope: Some("workflows:read"),
556 params: &[
557 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
558 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
559 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
560 Param { name: "attempt", location: In::Path, kind: "integer", required: true, values: &[] },
561 ],
562 body: &[],
563 },
564 Operation {
565 id: "list_artifacts",
566 method: "GET",
567 path: "/repos/{owner}/{name}/actions/artifacts",
568 tag: "Actions",
569 summary: "List a repository's artifacts",
570 scope: Some("workflows:read"),
571 params: &[
572 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
573 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
574 Param { name: "name", location: In::Query, kind: "string", required: false, values: &[] },
575 Param { name: "page", location: In::Query, kind: "integer", required: false, values: &[] },
576 Param { name: "per_page", location: In::Query, kind: "integer", required: false, values: &[] },
577 ],
578 body: &[],
579 },
580 Operation {
581 id: "list_caches",
582 method: "GET",
583 path: "/repos/{owner}/{name}/actions/caches",
584 tag: "Actions",
585 summary: "List a repository's caches",
586 scope: Some("workflows:read"),
587 params: &[
588 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
589 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
590 Param { name: "key", location: In::Query, kind: "string", required: false, values: &[] },
591 Param { name: "ref", location: In::Query, kind: "string", required: false, values: &[] },
592 Param { name: "sort", location: In::Query, kind: "string", required: false, values: &["last_accessed_at", "created_at", "size_in_bytes"] },
593 Param { name: "direction", location: In::Query, kind: "string", required: false, values: &["asc", "desc"] },
594 Param { name: "page", location: In::Query, kind: "integer", required: false, values: &[] },
595 Param { name: "per_page", location: In::Query, kind: "integer", required: false, values: &[] },
596 ],
597 body: &[],
598 },
599 Operation {
600 id: "list_runs_of_workflow",
601 method: "GET",
602 path: "/repos/{owner}/{name}/actions/workflows/{workflow}/runs",
603 tag: "Actions",
604 summary: "List a workflow's runs",
605 scope: Some("workflows:read"),
606 params: &[
607 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
608 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
609 Param { name: "workflow", location: In::Path, kind: "string", required: true, values: &[] },
610 Param { name: "branch", location: In::Query, kind: "string", required: false, values: &[] },
611 Param { name: "event", location: In::Query, kind: "string", required: false, values: &[] },
612 Param { name: "per_page", location: In::Query, kind: "integer", required: false, values: &[] },
613 ],
614 body: &[],
615 },
616 Operation {
617 id: "list_workflow_run_artifacts",
618 method: "GET",
619 path: "/repos/{owner}/{name}/actions/runs/{id}/artifacts",
620 tag: "Actions",
621 summary: "List a workflow run's artifacts",
622 scope: Some("workflows:read"),
623 params: &[
624 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
625 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
626 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
627 Param { name: "name", location: In::Query, kind: "string", required: false, values: &[] },
628 ],
629 body: &[],
630 },
631 Operation {
632 id: "list_workflow_runs",
633 method: "GET",
634 path: "/repos/{owner}/{name}/actions/runs",
635 tag: "Actions",
636 summary: "List workflow runs",
637 scope: Some("workflows:read"),
638 params: &[
639 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
640 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
641 Param { name: "workflow", location: In::Query, kind: "string", required: false, values: &[] },
642 Param { name: "branch", location: In::Query, kind: "string", required: false, values: &[] },
643 Param { name: "event", location: In::Query, kind: "string", required: false, values: &[] },
644 Param { name: "pull", location: In::Query, kind: "integer", required: false, values: &[] },
645 Param { name: "head_sha", location: In::Query, kind: "string", required: false, values: &[] },
646 Param { name: "per_page", location: In::Query, kind: "integer", required: false, values: &[] },
647 ],
648 body: &[],
649 },
650 Operation {
651 id: "list_workflows",
652 method: "GET",
653 path: "/repos/{owner}/{name}/actions/workflows",
654 tag: "Actions",
655 summary: "List workflows",
656 scope: Some("workflows:read"),
657 params: &[
658 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
659 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
660 ],
661 body: &[],
662 },
663 Operation {
664 id: "rerun_failed_jobs",
665 method: "POST",
666 path: "/repos/{owner}/{name}/actions/runs/{id}/rerun-failed-jobs",
667 tag: "Actions",
668 summary: "Re-run failed jobs",
669 scope: Some("workflows:write"),
670 params: &[
671 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
672 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
673 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
674 ],
675 body: &[
676 Field { name: "debug", kind: "boolean", required: false, values: &[] },
677 Field { name: "enable_debug_logging", kind: "boolean", required: false, values: &[] },
678 Field { name: "failed_only", kind: "boolean", required: false, values: &[] },
679 Field { name: "job", kind: "string", required: false, values: &[] },
680 ],
681 },
682 Operation {
683 id: "rerun_job",
684 method: "POST",
685 path: "/repos/{owner}/{name}/actions/jobs/{job}/rerun",
686 tag: "Actions",
687 summary: "Re-run a job",
688 scope: Some("workflows:write"),
689 params: &[
690 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
691 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
692 Param { name: "job", location: In::Path, kind: "string", required: true, values: &[] },
693 ],
694 body: &[
695 Field { name: "debug", kind: "boolean", required: false, values: &[] },
696 Field { name: "enable_debug_logging", kind: "boolean", required: false, values: &[] },
697 Field { name: "failed_only", kind: "boolean", required: false, values: &[] },
698 Field { name: "id", kind: "string", required: false, values: &[] },
699 ],
700 },
701 Operation {
702 id: "rerun_workflow_run",
703 method: "POST",
704 path: "/repos/{owner}/{name}/actions/runs/{id}/rerun",
705 tag: "Actions",
706 summary: "Re-run a workflow run",
707 scope: Some("workflows:write"),
708 params: &[
709 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
710 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
711 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
712 ],
713 body: &[
714 Field { name: "debug", kind: "boolean", required: false, values: &[] },
715 Field { name: "enable_debug_logging", kind: "boolean", required: false, values: &[] },
716 Field { name: "failed_only", kind: "boolean", required: false, values: &[] },
717 Field { name: "job", kind: "string", required: false, values: &[] },
718 ],
719 },
720 Operation {
721 id: "set_artifact_retention",
722 method: "PUT",
723 path: "/repos/{owner}/{name}/actions/permissions/artifact-and-log-retention",
724 tag: "Actions",
725 summary: "Set artifact retention",
726 scope: Some("workflows:write"),
727 params: &[
728 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
729 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
730 ],
731 body: &[
732 Field { name: "days", kind: "integer", required: true, values: &[] },
733 ],
734 },
735 Operation {
736 id: "update_workflow",
737 method: "PATCH",
738 path: "/repos/{owner}/{name}/actions/workflows/{workflow}",
739 tag: "Actions",
740 summary: "Turn a workflow on or off",
741 scope: Some("workflows:write"),
742 params: &[
743 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
744 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
745 Param { name: "workflow", location: In::Path, kind: "string", required: true, values: &[] },
746 ],
747 body: &[
748 Field { name: "enabled", kind: "boolean", required: true, values: &[] },
749 ],
750 },
751 Operation {
752 id: "create_workspace_artifact",
753 method: "POST",
754 path: "/workspaces/{workspace}/artifacts",
755 tag: "Artifacts",
756 summary: "Create an artifact",
757 scope: Some("artifacts:write"),
758 params: &[
759 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
760 ],
761 body: &[
762 Field { name: "icon", kind: "string", required: false, values: &[] },
763 Field { name: "kind", kind: "string", required: false, values: &["doc", "slides", "design", "dashboard"] },
764 Field { name: "markdown", kind: "string", required: false, values: &[] },
765 Field { name: "parent_id", kind: "string", required: false, values: &[] },
766 Field { name: "space", kind: "string", required: false, values: &[] },
767 Field { name: "template_id", kind: "string", required: false, values: &[] },
768 Field { name: "title", kind: "string", required: false, values: &[] },
769 ],
770 },
771 Operation {
772 id: "edit_workspace_artifact",
773 method: "PUT",
774 path: "/workspaces/{workspace}/artifacts/{artifact_id}/content",
775 tag: "Artifacts",
776 summary: "Edit an artifact's content",
777 scope: Some("artifacts:write"),
778 params: &[
779 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
780 Param { name: "artifact_id", location: In::Path, kind: "string", required: true, values: &[] },
781 ],
782 body: &[
783 Field { name: "kind", kind: "string", required: false, values: &["doc", "slides", "design", "dashboard"] },
784 Field { name: "markdown", kind: "string", required: false, values: &[] },
785 Field { name: "marks_current", kind: "boolean", required: false, values: &[] },
786 Field { name: "note", kind: "string", required: false, values: &[] },
787 Field { name: "ops", kind: "array", required: false, values: &[] },
788 Field { name: "suggest_only", kind: "boolean", required: false, values: &[] },
789 Field { name: "target", kind: "object", required: false, values: &[] },
790 ],
791 },
792 Operation {
793 id: "get_workspace_artifact",
794 method: "GET",
795 path: "/workspaces/{workspace}/artifacts/{artifact_id}",
796 tag: "Artifacts",
797 summary: "Get an artifact",
798 scope: Some("artifacts:read"),
799 params: &[
800 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
801 Param { name: "artifact_id", location: In::Path, kind: "string", required: true, values: &[] },
802 ],
803 body: &[],
804 },
805 Operation {
806 id: "get_workspace_artifact_access",
807 method: "GET",
808 path: "/workspaces/{workspace}/artifacts/{artifact_id}/access",
809 tag: "Artifacts",
810 summary: "Get who can open an artifact",
811 scope: Some("artifacts:read"),
812 params: &[
813 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
814 Param { name: "artifact_id", location: In::Path, kind: "string", required: true, values: &[] },
815 ],
816 body: &[],
817 },
818 Operation {
819 id: "get_workspace_artifact_content",
820 method: "GET",
821 path: "/workspaces/{workspace}/artifacts/{artifact_id}/content",
822 tag: "Artifacts",
823 summary: "Get an artifact's content",
824 scope: Some("artifacts:read"),
825 params: &[
826 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
827 Param { name: "artifact_id", location: In::Path, kind: "string", required: true, values: &[] },
828 ],
829 body: &[],
830 },
831 Operation {
832 id: "list_workspace_artifact_spaces",
833 method: "GET",
834 path: "/workspaces/{workspace}/artifact-spaces",
835 tag: "Artifacts",
836 summary: "List artifact spaces",
837 scope: Some("artifacts:read"),
838 params: &[
839 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
840 ],
841 body: &[],
842 },
843 Operation {
844 id: "list_workspace_artifact_templates",
845 method: "GET",
846 path: "/workspaces/{workspace}/artifact-templates",
847 tag: "Artifacts",
848 summary: "List artifact templates",
849 scope: Some("artifacts:read"),
850 params: &[
851 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
852 Param { name: "kind", location: In::Query, kind: "string", required: false, values: &["doc", "slides", "design", "dashboard"] },
853 ],
854 body: &[],
855 },
856 Operation {
857 id: "list_workspace_artifact_versions",
858 method: "GET",
859 path: "/workspaces/{workspace}/artifacts/{artifact_id}/versions",
860 tag: "Artifacts",
861 summary: "List an artifact's versions",
862 scope: Some("artifacts:read"),
863 params: &[
864 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
865 Param { name: "artifact_id", location: In::Path, kind: "string", required: true, values: &[] },
866 ],
867 body: &[],
868 },
869 Operation {
870 id: "list_workspace_artifacts",
871 method: "GET",
872 path: "/workspaces/{workspace}/artifacts",
873 tag: "Artifacts",
874 summary: "List a workspace's artifacts",
875 scope: Some("artifacts:read"),
876 params: &[
877 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
878 Param { name: "tab", location: In::Query, kind: "string", required: false, values: &["all", "yours", "shared"] },
879 Param { name: "kind", location: In::Query, kind: "string", required: false, values: &["doc", "slides", "design", "dashboard"] },
880 Param { name: "space", location: In::Query, kind: "string", required: false, values: &[] },
881 Param { name: "project", location: In::Query, kind: "string", required: false, values: &[] },
882 Param { name: "q", location: In::Query, kind: "string", required: false, values: &[] },
883 Param { name: "state", location: In::Query, kind: "string", required: false, values: &["active", "trashed"] },
884 Param { name: "cursor", location: In::Query, kind: "string", required: false, values: &[] },
885 Param { name: "limit", location: In::Query, kind: "integer", required: false, values: &[] },
886 ],
887 body: &[],
888 },
889 Operation {
890 id: "purge_workspace_artifact",
891 method: "POST",
892 path: "/workspaces/{workspace}/artifacts/{artifact_id}/purge",
893 tag: "Artifacts",
894 summary: "Delete an artifact for good",
895 scope: Some("artifacts:admin"),
896 params: &[
897 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
898 Param { name: "artifact_id", location: In::Path, kind: "string", required: true, values: &[] },
899 ],
900 body: &[],
901 },
902 Operation {
903 id: "query_workspace_dataset",
904 method: "POST",
905 path: "/workspaces/{workspace}/datasets/query",
906 tag: "Artifacts",
907 summary: "Query a dataset",
908 scope: Some("artifacts:read"),
909 params: &[
910 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
911 ],
912 body: &[
913 Field { name: "query", kind: "object", required: true, values: &[] },
914 ],
915 },
916 Operation {
917 id: "restore_workspace_artifact",
918 method: "POST",
919 path: "/workspaces/{workspace}/artifacts/{artifact_id}/restore",
920 tag: "Artifacts",
921 summary: "Restore an artifact from the trash",
922 scope: Some("artifacts:write"),
923 params: &[
924 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
925 Param { name: "artifact_id", location: In::Path, kind: "string", required: true, values: &[] },
926 ],
927 body: &[],
928 },
929 Operation {
930 id: "restore_workspace_artifact_version",
931 method: "POST",
932 path: "/workspaces/{workspace}/artifacts/{artifact_id}/versions/{version_id}/restore",
933 tag: "Artifacts",
934 summary: "Restore an artifact version",
935 scope: Some("artifacts:write"),
936 params: &[
937 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
938 Param { name: "artifact_id", location: In::Path, kind: "string", required: true, values: &[] },
939 Param { name: "version_id", location: In::Path, kind: "string", required: true, values: &[] },
940 ],
941 body: &[],
942 },
943 Operation {
944 id: "search_workspace_artifacts",
945 method: "GET",
946 path: "/workspaces/{workspace}/artifacts/search",
947 tag: "Artifacts",
948 summary: "Search a workspace's artifacts",
949 scope: Some("artifacts:read"),
950 params: &[
951 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
952 Param { name: "q", location: In::Query, kind: "string", required: true, values: &[] },
953 Param { name: "kind", location: In::Query, kind: "string", required: false, values: &["doc", "slides", "design", "dashboard"] },
954 Param { name: "space", location: In::Query, kind: "string", required: false, values: &[] },
955 Param { name: "project", location: In::Query, kind: "string", required: false, values: &[] },
956 Param { name: "limit", location: In::Query, kind: "integer", required: false, values: &[] },
957 ],
958 body: &[],
959 },
960 Operation {
961 id: "set_workspace_artifact_access",
962 method: "PUT",
963 path: "/workspaces/{workspace}/artifacts/{artifact_id}/access",
964 tag: "Artifacts",
965 summary: "Share an artifact",
966 scope: Some("artifacts:admin"),
967 params: &[
968 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
969 Param { name: "artifact_id", location: In::Path, kind: "string", required: true, values: &[] },
970 ],
971 body: &[
972 Field { name: "agent", kind: "string", required: false, values: &[] },
973 Field { name: "agent_mode", kind: "string", required: false, values: &["suggest", "edit"] },
974 Field { name: "general_access", kind: "string", required: false, values: &["none", "workspace", "link"] },
975 Field { name: "general_role", kind: "string", required: false, values: &["view", "comment", "edit"] },
976 Field { name: "inherit", kind: "boolean", required: false, values: &[] },
977 Field { name: "notify", kind: "string", required: false, values: &[] },
978 Field { name: "principal", kind: "string", required: false, values: &[] },
979 Field { name: "role", kind: "string", required: false, values: &["view", "comment", "edit", "manage", "none"] },
980 Field { name: "team", kind: "string", required: false, values: &[] },
981 Field { name: "username", kind: "string", required: false, values: &[] },
982 ],
983 },
984 Operation {
985 id: "trash_workspace_artifact",
986 method: "DELETE",
987 path: "/workspaces/{workspace}/artifacts/{artifact_id}",
988 tag: "Artifacts",
989 summary: "Move an artifact to the trash",
990 scope: Some("artifacts:write"),
991 params: &[
992 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
993 Param { name: "artifact_id", location: In::Path, kind: "string", required: true, values: &[] },
994 ],
995 body: &[],
996 },
997 Operation {
998 id: "update_workspace_artifact",
999 method: "PATCH",
1000 path: "/workspaces/{workspace}/artifacts/{artifact_id}",
1001 tag: "Artifacts",
1002 summary: "Update an artifact",
1003 scope: Some("artifacts:write"),
1004 params: &[
1005 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
1006 Param { name: "artifact_id", location: In::Path, kind: "string", required: true, values: &[] },
1007 ],
1008 body: &[
1009 Field { name: "before_id", kind: "string", required: false, values: &[] },
1010 Field { name: "icon", kind: "string", required: false, values: &[] },
1011 Field { name: "parent_id", kind: "string", required: false, values: &[] },
1012 Field { name: "space", kind: "string", required: false, values: &[] },
1013 Field { name: "title", kind: "string", required: false, values: &[] },
1014 ],
1015 },
1016 Operation {
1017 id: "get_billing_details",
1018 method: "GET",
1019 path: "/workspaces/{workspace}/billing_details",
1020 tag: "Billing",
1021 summary: "Get a workspace's billing details",
1022 scope: Some("billing:read"),
1023 params: &[
1024 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
1025 ],
1026 body: &[],
1027 },
1028 Operation {
1029 id: "get_budget",
1030 method: "GET",
1031 path: "/workspaces/{workspace}/budget",
1032 tag: "Billing",
1033 summary: "Get a workspace's budget",
1034 scope: Some("billing:read"),
1035 params: &[
1036 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
1037 ],
1038 body: &[],
1039 },
1040 Operation {
1041 id: "get_usage",
1042 method: "GET",
1043 path: "/workspaces/{workspace}/usage",
1044 tag: "Billing",
1045 summary: "Get a workspace's usage",
1046 scope: Some("billing:read"),
1047 params: &[
1048 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
1049 Param { name: "from", location: In::Query, kind: "string", required: false, values: &[] },
1050 Param { name: "until", location: In::Query, kind: "string", required: false, values: &[] },
1051 Param { name: "products", location: In::Query, kind: "array", required: false, values: &[] },
1052 Param { name: "projects", location: In::Query, kind: "array", required: false, values: &[] },
1053 Param { name: "group_by", location: In::Query, kind: "string", required: false, values: &["product", "project", "day"] },
1054 ],
1055 body: &[],
1056 },
1057 Operation {
1058 id: "list_invoices",
1059 method: "GET",
1060 path: "/workspaces/{workspace}/invoices",
1061 tag: "Billing",
1062 summary: "List a workspace's invoices",
1063 scope: Some("billing:read"),
1064 params: &[
1065 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
1066 ],
1067 body: &[],
1068 },
1069 Operation {
1070 id: "set_budget",
1071 method: "PUT",
1072 path: "/workspaces/{workspace}/budget",
1073 tag: "Billing",
1074 summary: "Change a workspace's budget",
1075 scope: Some("billing:write"),
1076 params: &[
1077 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
1078 ],
1079 body: &[
1080 Field { name: "alerts", kind: "array", required: false, values: &[] },
1081 Field { name: "amount_micros", kind: "integer", required: false, values: &[] },
1082 Field { name: "pause_at_limit", kind: "boolean", required: false, values: &[] },
1083 Field { name: "webhook", kind: "string", required: false, values: &[] },
1084 ],
1085 },
1086 Operation {
1087 id: "create_check_run",
1088 method: "POST",
1089 path: "/repos/{owner}/{name}/check-runs",
1090 tag: "Checks",
1091 summary: "Create a check run",
1092 scope: Some("checks:write"),
1093 params: &[
1094 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
1095 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
1096 ],
1097 body: &[
1098 Field { name: "actions", kind: "array", required: false, values: &[] },
1099 Field { name: "app", kind: "string", required: false, values: &[] },
1100 Field { name: "completed_at", kind: "string", required: false, values: &[] },
1101 Field { name: "conclusion", kind: "string", required: false, values: &["success", "failure", "neutral", "cancelled", "skipped", "timed_out", "action_required"] },
1102 Field { name: "details_url", kind: "string", required: false, values: &[] },
1103 Field { name: "external_id", kind: "string", required: false, values: &[] },
1104 Field { name: "head_sha", kind: "string", required: true, values: &[] },
1105 Field { name: "name", kind: "string", required: true, values: &[] },
1106 Field { name: "output", kind: "object", required: false, values: &[] },
1107 Field { name: "started_at", kind: "string", required: false, values: &[] },
1108 Field { name: "status", kind: "string", required: false, values: &["queued", "in_progress", "completed"] },
1109 ],
1110 },
1111 Operation {
1112 id: "create_commit_status",
1113 method: "POST",
1114 path: "/repos/{owner}/{name}/statuses/{sha}",
1115 tag: "Checks",
1116 summary: "Create a commit status",
1117 scope: Some("checks:write"),
1118 params: &[
1119 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
1120 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
1121 Param { name: "sha", location: In::Path, kind: "string", required: true, values: &[] },
1122 ],
1123 body: &[
1124 Field { name: "context", kind: "string", required: false, values: &[] },
1125 Field { name: "description", kind: "string", required: false, values: &[] },
1126 Field { name: "state", kind: "string", required: true, values: &["pending", "success", "failure", "error"] },
1127 Field { name: "target_url", kind: "string", required: false, values: &[] },
1128 ],
1129 },
1130 Operation {
1131 id: "get_check_run",
1132 method: "GET",
1133 path: "/repos/{owner}/{name}/check-runs/{id}",
1134 tag: "Checks",
1135 summary: "Get a check run",
1136 scope: Some("checks:read"),
1137 params: &[
1138 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
1139 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
1140 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
1141 ],
1142 body: &[],
1143 },
1144 Operation {
1145 id: "get_check_suite",
1146 method: "GET",
1147 path: "/repos/{owner}/{name}/check-suites/{id}",
1148 tag: "Checks",
1149 summary: "Get a check suite",
1150 scope: Some("checks:read"),
1151 params: &[
1152 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
1153 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
1154 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
1155 ],
1156 body: &[],
1157 },
1158 Operation {
1159 id: "get_combined_status",
1160 method: "GET",
1161 path: "/repos/{owner}/{name}/commits/{ref}/status",
1162 tag: "Checks",
1163 summary: "Get a commit's combined status",
1164 scope: Some("checks:read"),
1165 params: &[
1166 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
1167 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
1168 Param { name: "ref", location: In::Path, kind: "string", required: true, values: &[] },
1169 ],
1170 body: &[],
1171 },
1172 Operation {
1173 id: "list_check_run_annotations",
1174 method: "GET",
1175 path: "/repos/{owner}/{name}/check-runs/{id}/annotations",
1176 tag: "Checks",
1177 summary: "List a check run's annotations",
1178 scope: Some("checks:read"),
1179 params: &[
1180 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
1181 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
1182 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
1183 ],
1184 body: &[],
1185 },
1186 Operation {
1187 id: "list_check_runs_for_ref",
1188 method: "GET",
1189 path: "/repos/{owner}/{name}/commits/{ref}/check-runs",
1190 tag: "Checks",
1191 summary: "List a commit's check runs",
1192 scope: Some("checks:read"),
1193 params: &[
1194 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
1195 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
1196 Param { name: "ref", location: In::Path, kind: "string", required: true, values: &[] },
1197 Param { name: "check_name", location: In::Query, kind: "string", required: false, values: &[] },
1198 Param { name: "status", location: In::Query, kind: "string", required: false, values: &["queued", "in_progress", "completed"] },
1199 Param { name: "app", location: In::Query, kind: "string", required: false, values: &[] },
1200 Param { name: "filter", location: In::Query, kind: "string", required: false, values: &["latest", "all"] },
1201 ],
1202 body: &[],
1203 },
1204 Operation {
1205 id: "list_check_suites_for_ref",
1206 method: "GET",
1207 path: "/repos/{owner}/{name}/commits/{ref}/check-suites",
1208 tag: "Checks",
1209 summary: "List a commit's check suites",
1210 scope: Some("checks:read"),
1211 params: &[
1212 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
1213 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
1214 Param { name: "ref", location: In::Path, kind: "string", required: true, values: &[] },
1215 Param { name: "app", location: In::Query, kind: "string", required: false, values: &[] },
1216 Param { name: "check_name", location: In::Query, kind: "string", required: false, values: &[] },
1217 ],
1218 body: &[],
1219 },
1220 Operation {
1221 id: "list_commit_statuses",
1222 method: "GET",
1223 path: "/repos/{owner}/{name}/commits/{ref}/statuses",
1224 tag: "Checks",
1225 summary: "List a commit's statuses",
1226 scope: Some("checks:read"),
1227 params: &[
1228 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
1229 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
1230 Param { name: "ref", location: In::Path, kind: "string", required: true, values: &[] },
1231 ],
1232 body: &[],
1233 },
1234 Operation {
1235 id: "rerequest_check_run",
1236 method: "POST",
1237 path: "/repos/{owner}/{name}/check-runs/{id}/rerequest",
1238 tag: "Checks",
1239 summary: "Rerequest a check run",
1240 scope: Some("checks:write"),
1241 params: &[
1242 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
1243 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
1244 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
1245 ],
1246 body: &[],
1247 },
1248 Operation {
1249 id: "rerequest_check_suite",
1250 method: "POST",
1251 path: "/repos/{owner}/{name}/check-suites/{id}/rerequest",
1252 tag: "Checks",
1253 summary: "Rerequest a check suite",
1254 scope: Some("checks:write"),
1255 params: &[
1256 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
1257 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
1258 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
1259 ],
1260 body: &[],
1261 },
1262 Operation {
1263 id: "update_check_run",
1264 method: "PATCH",
1265 path: "/repos/{owner}/{name}/check-runs/{id}",
1266 tag: "Checks",
1267 summary: "Update a check run",
1268 scope: Some("checks:write"),
1269 params: &[
1270 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
1271 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
1272 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
1273 ],
1274 body: &[
1275 Field { name: "actions", kind: "array", required: false, values: &[] },
1276 Field { name: "completed_at", kind: "string", required: false, values: &[] },
1277 Field { name: "conclusion", kind: "string", required: false, values: &["success", "failure", "neutral", "cancelled", "skipped", "timed_out", "action_required"] },
1278 Field { name: "details_url", kind: "string", required: false, values: &[] },
1279 Field { name: "external_id", kind: "string", required: false, values: &[] },
1280 Field { name: "name", kind: "string", required: false, values: &[] },
1281 Field { name: "output", kind: "object", required: false, values: &[] },
1282 Field { name: "started_at", kind: "string", required: false, values: &[] },
1283 Field { name: "status", kind: "string", required: false, values: &["queued", "in_progress", "completed"] },
1284 ],
1285 },
1286 Operation {
1287 id: "claim_issue",
1288 method: "POST",
1289 path: "/repos/{owner}/{name}/issues/{number}/claim",
1290 tag: "Claims and work",
1291 summary: "Claim an issue",
1292 scope: Some("issues:write"),
1293 params: &[
1294 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
1295 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
1296 Param { name: "number", location: In::Path, kind: "integer", required: true, values: &[] },
1297 ],
1298 body: &[
1299 Field { name: "note", kind: "string", required: false, values: &[] },
1300 Field { name: "session_id", kind: "string", required: false, values: &[] },
1301 Field { name: "ttl_minutes", kind: "integer", required: false, values: &[] },
1302 ],
1303 },
1304 Operation {
1305 id: "get_work",
1306 method: "GET",
1307 path: "/repos/{owner}/{name}/issues/{number}/work",
1308 tag: "Claims and work",
1309 summary: "Get an issue's work context",
1310 scope: Some("issues:read"),
1311 params: &[
1312 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
1313 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
1314 Param { name: "number", location: In::Path, kind: "integer", required: true, values: &[] },
1315 ],
1316 body: &[],
1317 },
1318 Operation {
1319 id: "hand_off_issue",
1320 method: "POST",
1321 path: "/repos/{owner}/{name}/issues/{number}/handoff",
1322 tag: "Claims and work",
1323 summary: "Hand off an issue",
1324 scope: Some("issues:write"),
1325 params: &[
1326 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
1327 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
1328 Param { name: "number", location: In::Path, kind: "integer", required: true, values: &[] },
1329 ],
1330 body: &[
1331 Field { name: "note", kind: "string", required: true, values: &[] },
1332 Field { name: "session_id", kind: "string", required: false, values: &[] },
1333 Field { name: "to", kind: "string", required: false, values: &[] },
1334 ],
1335 },
1336 Operation {
1337 id: "list_claims",
1338 method: "GET",
1339 path: "/repos/{owner}/{name}/claims",
1340 tag: "Claims and work",
1341 summary: "List claims",
1342 scope: Some("issues:read"),
1343 params: &[
1344 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
1345 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
1346 Param { name: "state", location: In::Query, kind: "string", required: false, values: &["active", "released", "expired", "handed_off"] },
1347 Param { name: "issue", location: In::Query, kind: "integer", required: false, values: &[] },
1348 ],
1349 body: &[],
1350 },
1351 Operation {
1352 id: "release_claim",
1353 method: "POST",
1354 path: "/repos/{owner}/{name}/issues/{number}/release",
1355 tag: "Claims and work",
1356 summary: "Release a claim",
1357 scope: Some("issues:write"),
1358 params: &[
1359 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
1360 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
1361 Param { name: "number", location: In::Path, kind: "integer", required: true, values: &[] },
1362 ],
1363 body: &[
1364 Field { name: "reason", kind: "string", required: false, values: &[] },
1365 Field { name: "session_id", kind: "string", required: false, values: &[] },
1366 ],
1367 },
1368 Operation {
1369 id: "get_code_scanning_alert",
1370 method: "GET",
1371 path: "/repos/{owner}/{name}/code-scanning/alerts/{number}",
1372 tag: "Code scanning",
1373 summary: "Get a code scanning alert",
1374 scope: Some("security:read"),
1375 params: &[
1376 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
1377 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
1378 Param { name: "number", location: In::Path, kind: "integer", required: true, values: &[] },
1379 ],
1380 body: &[],
1381 },
1382 Operation {
1383 id: "get_sarif_upload",
1384 method: "GET",
1385 path: "/repos/{owner}/{name}/code-scanning/sarifs/{id}",
1386 tag: "Code scanning",
1387 summary: "Get a SARIF upload",
1388 scope: Some("security:read"),
1389 params: &[
1390 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
1391 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
1392 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
1393 ],
1394 body: &[],
1395 },
1396 Operation {
1397 id: "list_code_scanning_alerts",
1398 method: "GET",
1399 path: "/repos/{owner}/{name}/code-scanning/alerts",
1400 tag: "Code scanning",
1401 summary: "List code scanning alerts",
1402 scope: Some("security:read"),
1403 params: &[
1404 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
1405 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
1406 Param { name: "state", location: In::Query, kind: "string", required: false, values: &["open", "dismissed", "fixed"] },
1407 Param { name: "severity", location: In::Query, kind: "string", required: false, values: &["critical", "high", "medium", "low", "unknown"] },
1408 Param { name: "tool", location: In::Query, kind: "string", required: false, values: &[] },
1409 Param { name: "rule_id", location: In::Query, kind: "string", required: false, values: &[] },
1410 ],
1411 body: &[],
1412 },
1413 Operation {
1414 id: "list_code_scanning_alerts_for_workspace",
1415 method: "GET",
1416 path: "/workspaces/{workspace}/code-scanning/alerts",
1417 tag: "Code scanning",
1418 summary: "List code scanning alerts for a workspace",
1419 scope: Some("security:read"),
1420 params: &[
1421 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
1422 Param { name: "state", location: In::Query, kind: "string", required: false, values: &["open", "dismissed", "fixed"] },
1423 Param { name: "severity", location: In::Query, kind: "string", required: false, values: &["critical", "high", "medium", "low", "unknown"] },
1424 Param { name: "tool", location: In::Query, kind: "string", required: false, values: &[] },
1425 Param { name: "rule_id", location: In::Query, kind: "string", required: false, values: &[] },
1426 ],
1427 body: &[],
1428 },
1429 Operation {
1430 id: "list_code_scanning_analyses",
1431 method: "GET",
1432 path: "/repos/{owner}/{name}/code-scanning/analyses",
1433 tag: "Code scanning",
1434 summary: "List code scanning analyses",
1435 scope: Some("security:read"),
1436 params: &[
1437 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
1438 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
1439 ],
1440 body: &[],
1441 },
1442 Operation {
1443 id: "update_code_scanning_alert",
1444 method: "PATCH",
1445 path: "/repos/{owner}/{name}/code-scanning/alerts/{number}",
1446 tag: "Code scanning",
1447 summary: "Dismiss or reopen a code scanning alert",
1448 scope: Some("security:write"),
1449 params: &[
1450 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
1451 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
1452 Param { name: "number", location: In::Path, kind: "integer", required: true, values: &[] },
1453 ],
1454 body: &[
1455 Field { name: "dismissed_comment", kind: "string", required: false, values: &[] },
1456 Field { name: "dismissed_reason", kind: "string", required: false, values: &["false_positive", "wont_fix", "used_in_tests"] },
1457 Field { name: "state", kind: "string", required: true, values: &["open", "dismissed"] },
1458 ],
1459 },
1460 Operation {
1461 id: "upload_sarif",
1462 method: "POST",
1463 path: "/repos/{owner}/{name}/code-scanning/sarifs",
1464 tag: "Code scanning",
1465 summary: "Upload a SARIF file",
1466 scope: Some("security:write"),
1467 params: &[
1468 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
1469 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
1470 ],
1471 body: &[
1472 Field { name: "category", kind: "string", required: false, values: &[] },
1473 Field { name: "checkout_uri", kind: "string", required: false, values: &[] },
1474 Field { name: "commit_sha", kind: "string", required: true, values: &[] },
1475 Field { name: "ref", kind: "string", required: true, values: &[] },
1476 Field { name: "sarif", kind: "string", required: true, values: &[] },
1477 Field { name: "tool_name", kind: "string", required: false, values: &[] },
1478 ],
1479 },
1480 Operation {
1481 id: "list_decisions",
1482 method: "GET",
1483 path: "/repos/{owner}/{name}/pulls/{number}/decisions",
1484 tag: "Decisions and why",
1485 summary: "List a pull request's decisions",
1486 scope: Some("pull_requests:read"),
1487 params: &[
1488 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
1489 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
1490 Param { name: "number", location: In::Path, kind: "integer", required: true, values: &[] },
1491 ],
1492 body: &[],
1493 },
1494 Operation {
1495 id: "list_issue_decisions",
1496 method: "GET",
1497 path: "/repos/{owner}/{name}/issues/{number}/decisions",
1498 tag: "Decisions and why",
1499 summary: "List an issue's decisions",
1500 scope: Some("pull_requests:read"),
1501 params: &[
1502 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
1503 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
1504 Param { name: "number", location: In::Path, kind: "integer", required: true, values: &[] },
1505 ],
1506 body: &[],
1507 },
1508 Operation {
1509 id: "record_decision",
1510 method: "POST",
1511 path: "/repos/{owner}/{name}/pulls/{number}/decisions",
1512 tag: "Decisions and why",
1513 summary: "Record a decision",
1514 scope: Some("pull_requests:write"),
1515 params: &[
1516 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
1517 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
1518 Param { name: "number", location: In::Path, kind: "integer", required: true, values: &[] },
1519 ],
1520 body: &[
1521 Field { name: "evidence", kind: "object", required: false, values: &[] },
1522 Field { name: "kind", kind: "string", required: true, values: &["proposal", "claim", "fix", "note"] },
1523 Field { name: "session_id", kind: "string", required: false, values: &[] },
1524 Field { name: "summary", kind: "string", required: true, values: &[] },
1525 ],
1526 },
1527 Operation {
1528 id: "why",
1529 method: "GET",
1530 path: "/repos/{owner}/{name}/why",
1531 tag: "Decisions and why",
1532 summary: "Explain a line",
1533 scope: Some("code:read"),
1534 params: &[
1535 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
1536 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
1537 Param { name: "path", location: In::Query, kind: "string", required: true, values: &[] },
1538 Param { name: "line", location: In::Query, kind: "integer", required: true, values: &[] },
1539 Param { name: "ref", location: In::Query, kind: "string", required: false, values: &[] },
1540 ],
1541 body: &[],
1542 },
1543 Operation {
1544 id: "create_deployment",
1545 method: "POST",
1546 path: "/repos/{owner}/{name}/deployments",
1547 tag: "Deployments",
1548 summary: "Create a deployment",
1549 scope: Some("deployments:write"),
1550 params: &[
1551 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
1552 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
1553 ],
1554 body: &[
1555 Field { name: "description", kind: "string", required: false, values: &[] },
1556 Field { name: "environment", kind: "string", required: false, values: &[] },
1557 Field { name: "environment_url", kind: "string", required: false, values: &[] },
1558 Field { name: "log_url", kind: "string", required: false, values: &[] },
1559 Field { name: "payload", kind: "object", required: false, values: &[] },
1560 Field { name: "production_environment", kind: "boolean", required: false, values: &[] },
1561 Field { name: "ref", kind: "string", required: true, values: &[] },
1562 Field { name: "sha", kind: "string", required: false, values: &[] },
1563 Field { name: "state", kind: "string", required: false, values: &["queued", "in_progress", "success", "failure", "error", "inactive"] },
1564 Field { name: "task", kind: "string", required: false, values: &[] },
1565 Field { name: "transient_environment", kind: "boolean", required: false, values: &[] },
1566 ],
1567 },
1568 Operation {
1569 id: "create_deployment_status",
1570 method: "POST",
1571 path: "/repos/{owner}/{name}/deployments/{id}/statuses",
1572 tag: "Deployments",
1573 summary: "Create a deployment status",
1574 scope: Some("deployments:write"),
1575 params: &[
1576 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
1577 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
1578 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
1579 ],
1580 body: &[
1581 Field { name: "auto_inactive", kind: "boolean", required: false, values: &[] },
1582 Field { name: "description", kind: "string", required: false, values: &[] },
1583 Field { name: "environment_url", kind: "string", required: false, values: &[] },
1584 Field { name: "log_url", kind: "string", required: false, values: &[] },
1585 Field { name: "state", kind: "string", required: true, values: &["queued", "in_progress", "success", "failure", "error", "inactive"] },
1586 ],
1587 },
1588 Operation {
1589 id: "get_deployment",
1590 method: "GET",
1591 path: "/repos/{owner}/{name}/deployments/{id}",
1592 tag: "Deployments",
1593 summary: "Get a deployment",
1594 scope: Some("deployments:read"),
1595 params: &[
1596 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
1597 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
1598 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
1599 ],
1600 body: &[],
1601 },
1602 Operation {
1603 id: "get_environment",
1604 method: "GET",
1605 path: "/repos/{owner}/{name}/environments/{environment}",
1606 tag: "Deployments",
1607 summary: "Get an environment",
1608 scope: Some("deployments:read"),
1609 params: &[
1610 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
1611 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
1612 Param { name: "environment", location: In::Path, kind: "string", required: true, values: &[] },
1613 ],
1614 body: &[],
1615 },
1616 Operation {
1617 id: "list_deployment_statuses",
1618 method: "GET",
1619 path: "/repos/{owner}/{name}/deployments/{id}/statuses",
1620 tag: "Deployments",
1621 summary: "List deployment statuses",
1622 scope: Some("deployments:read"),
1623 params: &[
1624 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
1625 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
1626 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
1627 ],
1628 body: &[],
1629 },
1630 Operation {
1631 id: "list_deployments",
1632 method: "GET",
1633 path: "/repos/{owner}/{name}/deployments",
1634 tag: "Deployments",
1635 summary: "List deployments",
1636 scope: Some("deployments:read"),
1637 params: &[
1638 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
1639 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
1640 Param { name: "environment", location: In::Query, kind: "string", required: false, values: &[] },
1641 Param { name: "ref", location: In::Query, kind: "string", required: false, values: &[] },
1642 Param { name: "sha", location: In::Query, kind: "string", required: false, values: &[] },
1643 Param { name: "task", location: In::Query, kind: "string", required: false, values: &[] },
1644 Param { name: "state", location: In::Query, kind: "string", required: false, values: &["queued", "in_progress", "success", "failure", "error", "inactive"] },
1645 Param { name: "source", location: In::Query, kind: "string", required: false, values: &["api", "actions", "g1t_page"] },
1646 Param { name: "creator", location: In::Query, kind: "string", required: false, values: &[] },
1647 Param { name: "page", location: In::Query, kind: "integer", required: false, values: &[] },
1648 Param { name: "per_page", location: In::Query, kind: "integer", required: false, values: &[] },
1649 ],
1650 body: &[],
1651 },
1652 Operation {
1653 id: "list_environments",
1654 method: "GET",
1655 path: "/repos/{owner}/{name}/environments",
1656 tag: "Deployments",
1657 summary: "List environments",
1658 scope: Some("deployments:read"),
1659 params: &[
1660 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
1661 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
1662 ],
1663 body: &[],
1664 },
1665 Operation {
1666 id: "start_deployment_build",
1667 method: "POST",
1668 path: "/repos/{owner}/{name}/deployments/builds",
1669 tag: "Deployments",
1670 summary: "Start a g1t.page build from a workflow",
1671 scope: Some("deployments:write"),
1672 params: &[
1673 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
1674 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
1675 ],
1676 body: &[
1677 Field { name: "project", kind: "string", required: false, values: &[] },
1678 Field { name: "sha", kind: "string", required: false, values: &[] },
1679 ],
1680 },
1681 Operation {
1682 id: "connect_integration",
1683 method: "POST",
1684 path: "/workspaces/{workspace}/integrations",
1685 tag: "Integrations",
1686 summary: "Connect an integration",
1687 scope: Some("workspace:admin"),
1688 params: &[
1689 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
1690 ],
1691 body: &[
1692 Field { name: "config", kind: "object", required: false, values: &[] },
1693 Field { name: "name", kind: "string", required: false, values: &[] },
1694 Field { name: "provider", kind: "string", required: true, values: &["anthropic", "openai", "gemini", "xai", "mistral", "deepseek", "azure_openai", "openrouter", "groq", "together", "fireworks", "cerebras", "anthropic_endpoint", "openai_endpoint", "sentry", "datadog", "webhook", "jira", "linear"] },
1695 Field { name: "secret", kind: "string", required: false, values: &[] },
1696 Field { name: "signing_secret", kind: "string", required: false, values: &[] },
1697 ],
1698 },
1699 Operation {
1700 id: "disconnect_integration",
1701 method: "DELETE",
1702 path: "/workspaces/{workspace}/integrations/{id}",
1703 tag: "Integrations",
1704 summary: "Disconnect an integration",
1705 scope: Some("workspace:admin"),
1706 params: &[
1707 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
1708 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
1709 ],
1710 body: &[],
1711 },
1712 Operation {
1713 id: "get_context",
1714 method: "GET",
1715 path: "/repos/{owner}/{name}/context",
1716 tag: "Integrations",
1717 summary: "Look up a ticket",
1718 scope: Some("memory:read"),
1719 params: &[
1720 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
1721 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
1722 Param { name: "reference", location: In::Query, kind: "string", required: true, values: &[] },
1723 ],
1724 body: &[],
1725 },
1726 Operation {
1727 id: "import_issue",
1728 method: "POST",
1729 path: "/repos/{owner}/{name}/issues/import",
1730 tag: "Integrations",
1731 summary: "Import an issue",
1732 scope: Some("issues:write"),
1733 params: &[
1734 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
1735 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
1736 ],
1737 body: &[
1738 Field { name: "reference", kind: "string", required: true, values: &[] },
1739 ],
1740 },
1741 Operation {
1742 id: "list_integrations",
1743 method: "GET",
1744 path: "/workspaces/{workspace}/integrations",
1745 tag: "Integrations",
1746 summary: "List integrations",
1747 scope: Some("workspace:read"),
1748 params: &[
1749 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
1750 ],
1751 body: &[],
1752 },
1753 Operation {
1754 id: "test_integration",
1755 method: "POST",
1756 path: "/workspaces/{workspace}/integrations/{id}/test",
1757 tag: "Integrations",
1758 summary: "Test an integration",
1759 scope: Some("workspace:admin"),
1760 params: &[
1761 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
1762 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
1763 ],
1764 body: &[],
1765 },
1766 Operation {
1767 id: "update_integration",
1768 method: "PATCH",
1769 path: "/workspaces/{workspace}/integrations/{id}",
1770 tag: "Integrations",
1771 summary: "Update an integration",
1772 scope: Some("workspace:admin"),
1773 params: &[
1774 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
1775 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
1776 ],
1777 body: &[
1778 Field { name: "config", kind: "object", required: false, values: &[] },
1779 Field { name: "name", kind: "string", required: false, values: &[] },
1780 Field { name: "secret", kind: "string", required: false, values: &[] },
1781 Field { name: "signing_secret", kind: "string", required: false, values: &[] },
1782 ],
1783 },
1784 Operation {
1785 id: "accept_invitation",
1786 method: "POST",
1787 path: "/user/invitations/{id}/accept",
1788 tag: "Invites",
1789 summary: "Accept a workspace invitation",
1790 scope: Some("account:write"),
1791 params: &[
1792 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
1793 ],
1794 body: &[],
1795 },
1796 Operation {
1797 id: "create_invite",
1798 method: "POST",
1799 path: "/user/invites",
1800 tag: "Invites",
1801 summary: "Invite a friend to g1t",
1802 scope: Some("account:write"),
1803 params: &[],
1804 body: &[
1805 Field { name: "email", kind: "string", required: true, values: &[] },
1806 Field { name: "message", kind: "string", required: false, values: &[] },
1807 Field { name: "role", kind: "string", required: false, values: &["member", "owner"] },
1808 Field { name: "workspace", kind: "string", required: false, values: &[] },
1809 ],
1810 },
1811 Operation {
1812 id: "decline_invitation",
1813 method: "POST",
1814 path: "/user/invitations/{id}/decline",
1815 tag: "Invites",
1816 summary: "Decline a workspace invitation",
1817 scope: Some("account:write"),
1818 params: &[
1819 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
1820 ],
1821 body: &[],
1822 },
1823 Operation {
1824 id: "invite_member",
1825 method: "POST",
1826 path: "/workspaces/{workspace}/invitations",
1827 tag: "Invites",
1828 summary: "Invite someone to a workspace",
1829 scope: Some("workspace:admin"),
1830 params: &[
1831 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
1832 ],
1833 body: &[
1834 Field { name: "email", kind: "string", required: false, values: &[] },
1835 Field { name: "role", kind: "string", required: false, values: &["member", "owner"] },
1836 Field { name: "username", kind: "string", required: false, values: &[] },
1837 ],
1838 },
1839 Operation {
1840 id: "list_invitations",
1841 method: "GET",
1842 path: "/user/invitations",
1843 tag: "Invites",
1844 summary: "List your workspace invitations",
1845 scope: Some("account:read"),
1846 params: &[],
1847 body: &[],
1848 },
1849 Operation {
1850 id: "list_invites",
1851 method: "GET",
1852 path: "/user/invites",
1853 tag: "Invites",
1854 summary: "List your invites to g1t",
1855 scope: Some("account:read"),
1856 params: &[],
1857 body: &[],
1858 },
1859 Operation {
1860 id: "list_workspace_invites",
1861 method: "GET",
1862 path: "/workspaces/{workspace}/invitations",
1863 tag: "Invites",
1864 summary: "List a workspace's invites",
1865 scope: Some("workspace:read"),
1866 params: &[
1867 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
1868 ],
1869 body: &[],
1870 },
1871 Operation {
1872 id: "resend_invite",
1873 method: "POST",
1874 path: "/user/invites/{id}/resend",
1875 tag: "Invites",
1876 summary: "Send an invite to g1t again",
1877 scope: Some("account:write"),
1878 params: &[
1879 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
1880 ],
1881 body: &[],
1882 },
1883 Operation {
1884 id: "revoke_invite",
1885 method: "DELETE",
1886 path: "/user/invites/{id}",
1887 tag: "Invites",
1888 summary: "Revoke an invite to g1t",
1889 scope: Some("account:write"),
1890 params: &[
1891 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
1892 ],
1893 body: &[],
1894 },
1895 Operation {
1896 id: "revoke_workspace_invite",
1897 method: "DELETE",
1898 path: "/workspaces/{workspace}/invitations/{id}",
1899 tag: "Invites",
1900 summary: "Revoke a workspace's invite",
1901 scope: Some("workspace:admin"),
1902 params: &[
1903 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
1904 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
1905 ],
1906 body: &[],
1907 },
1908 Operation {
1909 id: "add_comment",
1910 method: "POST",
1911 path: "/repos/{owner}/{name}/issues/{number}/comments",
1912 tag: "Issues",
1913 summary: "Add a comment",
1914 scope: Some("issues:write"),
1915 params: &[
1916 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
1917 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
1918 Param { name: "number", location: In::Path, kind: "integer", required: true, values: &[] },
1919 ],
1920 body: &[
1921 Field { name: "body", kind: "string", required: true, values: &[] },
1922 Field { name: "line", kind: "integer", required: false, values: &[] },
1923 Field { name: "path", kind: "string", required: false, values: &[] },
1924 ],
1925 },
1926 Operation {
1927 id: "add_issue_labels",
1928 method: "POST",
1929 path: "/repos/{owner}/{name}/issues/{number}/labels",
1930 tag: "Issues",
1931 summary: "Add labels to an issue",
1932 scope: Some("issues:write"),
1933 params: &[
1934 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
1935 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
1936 Param { name: "number", location: In::Path, kind: "integer", required: true, values: &[] },
1937 ],
1938 body: &[
1939 Field { name: "labels", kind: "array", required: true, values: &[] },
1940 ],
1941 },
1942 Operation {
1943 id: "close_issue",
1944 method: "POST",
1945 path: "/repos/{owner}/{name}/issues/{number}/close",
1946 tag: "Issues",
1947 summary: "Close an issue",
1948 scope: Some("issues:write"),
1949 params: &[
1950 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
1951 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
1952 Param { name: "number", location: In::Path, kind: "integer", required: true, values: &[] },
1953 ],
1954 body: &[
1955 Field { name: "reason", kind: "string", required: false, values: &["completed", "not_planned"] },
1956 ],
1957 },
1958 Operation {
1959 id: "create_issue",
1960 method: "POST",
1961 path: "/repos/{owner}/{name}/issues",
1962 tag: "Issues",
1963 summary: "Create an issue",
1964 scope: Some("issues:write"),
1965 params: &[
1966 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
1967 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
1968 ],
1969 body: &[
1970 Field { name: "body", kind: "string", required: false, values: &[] },
1971 Field { name: "checks", kind: "array", required: false, values: &[] },
1972 Field { name: "labels", kind: "array", required: false, values: &[] },
1973 Field { name: "milestone", kind: "integer", required: false, values: &[] },
1974 Field { name: "title", kind: "string", required: true, values: &[] },
1975 ],
1976 },
1977 Operation {
1978 id: "delete_comment",
1979 method: "DELETE",
1980 path: "/repos/{owner}/{name}/issues/comments/{comment_id}",
1981 tag: "Issues",
1982 summary: "Delete a comment",
1983 scope: Some("issues:write"),
1984 params: &[
1985 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
1986 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
1987 Param { name: "comment_id", location: In::Path, kind: "string", required: true, values: &[] },
1988 ],
1989 body: &[],
1990 },
1991 Operation {
1992 id: "edit_comment",
1993 method: "PATCH",
1994 path: "/repos/{owner}/{name}/issues/comments/{comment_id}",
1995 tag: "Issues",
1996 summary: "Edit a comment",
1997 scope: Some("issues:write"),
1998 params: &[
1999 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
2000 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
2001 Param { name: "comment_id", location: In::Path, kind: "string", required: true, values: &[] },
2002 ],
2003 body: &[
2004 Field { name: "body", kind: "string", required: true, values: &[] },
2005 ],
2006 },
2007 Operation {
2008 id: "get_issue",
2009 method: "GET",
2010 path: "/repos/{owner}/{name}/issues/{number}",
2011 tag: "Issues",
2012 summary: "Get an issue",
2013 scope: Some("issues:read"),
2014 params: &[
2015 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
2016 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
2017 Param { name: "number", location: In::Path, kind: "integer", required: true, values: &[] },
2018 ],
2019 body: &[],
2020 },
2021 Operation {
2022 id: "list_issue_labels",
2023 method: "GET",
2024 path: "/repos/{owner}/{name}/issues/{number}/labels",
2025 tag: "Issues",
2026 summary: "List an issue's labels",
2027 scope: Some("issues:read"),
2028 params: &[
2029 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
2030 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
2031 Param { name: "number", location: In::Path, kind: "integer", required: true, values: &[] },
2032 ],
2033 body: &[],
2034 },
2035 Operation {
2036 id: "list_issues",
2037 method: "GET",
2038 path: "/repos/{owner}/{name}/issues",
2039 tag: "Issues",
2040 summary: "List issues",
2041 scope: Some("issues:read"),
2042 params: &[
2043 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
2044 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
2045 Param { name: "state", location: In::Query, kind: "string", required: false, values: &["open", "closed"] },
2046 Param { name: "label", location: In::Query, kind: "string", required: false, values: &[] },
2047 Param { name: "milestone", location: In::Query, kind: "integer", required: false, values: &[] },
2048 ],
2049 body: &[],
2050 },
2051 Operation {
2052 id: "remove_issue_label",
2053 method: "DELETE",
2054 path: "/repos/{owner}/{name}/issues/{number}/labels/{label}",
2055 tag: "Issues",
2056 summary: "Remove labels from an issue",
2057 scope: Some("issues:write"),
2058 params: &[
2059 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
2060 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
2061 Param { name: "number", location: In::Path, kind: "integer", required: true, values: &[] },
2062 Param { name: "label", location: In::Path, kind: "string", required: true, values: &[] },
2063 ],
2064 body: &[
2065 Field { name: "labels", kind: "array", required: false, values: &[] },
2066 ],
2067 },
2068 Operation {
2069 id: "remove_issue_labels",
2070 method: "DELETE",
2071 path: "/repos/{owner}/{name}/issues/{number}/labels",
2072 tag: "Issues",
2073 summary: "Remove labels from an issue",
2074 scope: Some("issues:write"),
2075 params: &[
2076 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
2077 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
2078 Param { name: "number", location: In::Path, kind: "integer", required: true, values: &[] },
2079 ],
2080 body: &[
2081 Field { name: "label", kind: "string", required: false, values: &[] },
2082 Field { name: "labels", kind: "array", required: false, values: &[] },
2083 ],
2084 },
2085 Operation {
2086 id: "reopen_issue",
2087 method: "POST",
2088 path: "/repos/{owner}/{name}/issues/{number}/reopen",
2089 tag: "Issues",
2090 summary: "Reopen an issue",
2091 scope: Some("issues:write"),
2092 params: &[
2093 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
2094 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
2095 Param { name: "number", location: In::Path, kind: "integer", required: true, values: &[] },
2096 ],
2097 body: &[],
2098 },
2099 Operation {
2100 id: "set_issue_labels",
2101 method: "PUT",
2102 path: "/repos/{owner}/{name}/issues/{number}/labels",
2103 tag: "Issues",
2104 summary: "Set an issue's labels",
2105 scope: Some("issues:write"),
2106 params: &[
2107 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
2108 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
2109 Param { name: "number", location: In::Path, kind: "integer", required: true, values: &[] },
2110 ],
2111 body: &[
2112 Field { name: "labels", kind: "array", required: true, values: &[] },
2113 ],
2114 },
2115 Operation {
2116 id: "update_issue",
2117 method: "PATCH",
2118 path: "/repos/{owner}/{name}/issues/{number}",
2119 tag: "Issues",
2120 summary: "Update an issue",
2121 scope: Some("issues:write"),
2122 params: &[
2123 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
2124 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
2125 Param { name: "number", location: In::Path, kind: "integer", required: true, values: &[] },
2126 ],
2127 body: &[
2128 Field { name: "assignees", kind: "array", required: false, values: &[] },
2129 Field { name: "blocked_by", kind: "array", required: false, values: &[] },
2130 Field { name: "body", kind: "string", required: false, values: &[] },
2131 Field { name: "labels", kind: "array", required: false, values: &[] },
2132 Field { name: "milestone", kind: "integer", required: false, values: &[] },
2133 Field { name: "title", kind: "string", required: false, values: &[] },
2134 ],
2135 },
2136 Operation {
2137 id: "add_default_labels",
2138 method: "POST",
2139 path: "/repos/{owner}/{name}/labels/defaults",
2140 tag: "Labels and milestones",
2141 summary: "Add the default labels",
2142 scope: Some("issues:write"),
2143 params: &[
2144 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
2145 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
2146 ],
2147 body: &[],
2148 },
2149 Operation {
2150 id: "create_label",
2151 method: "POST",
2152 path: "/repos/{owner}/{name}/labels",
2153 tag: "Labels and milestones",
2154 summary: "Create a label",
2155 scope: Some("issues:write"),
2156 params: &[
2157 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
2158 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
2159 ],
2160 body: &[
2161 Field { name: "color", kind: "string", required: false, values: &[] },
2162 Field { name: "description", kind: "string", required: false, values: &[] },
2163 Field { name: "label", kind: "string", required: true, values: &[] },
2164 ],
2165 },
2166 Operation {
2167 id: "create_milestone",
2168 method: "POST",
2169 path: "/repos/{owner}/{name}/milestones",
2170 tag: "Labels and milestones",
2171 summary: "Create a milestone",
2172 scope: Some("issues:write"),
2173 params: &[
2174 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
2175 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
2176 ],
2177 body: &[
2178 Field { name: "description", kind: "string", required: false, values: &[] },
2179 Field { name: "due_on", kind: "string", required: false, values: &[] },
2180 Field { name: "state", kind: "string", required: false, values: &["open", "closed"] },
2181 Field { name: "title", kind: "string", required: true, values: &[] },
2182 ],
2183 },
2184 Operation {
2185 id: "delete_label",
2186 method: "DELETE",
2187 path: "/repos/{owner}/{name}/labels/{label}",
2188 tag: "Labels and milestones",
2189 summary: "Delete a label",
2190 scope: Some("issues:write"),
2191 params: &[
2192 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
2193 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
2194 Param { name: "label", location: In::Path, kind: "string", required: true, values: &[] },
2195 ],
2196 body: &[],
2197 },
2198 Operation {
2199 id: "delete_milestone",
2200 method: "DELETE",
2201 path: "/repos/{owner}/{name}/milestones/{milestone}",
2202 tag: "Labels and milestones",
2203 summary: "Delete a milestone",
2204 scope: Some("issues:write"),
2205 params: &[
2206 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
2207 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
2208 Param { name: "milestone", location: In::Path, kind: "integer", required: true, values: &[] },
2209 ],
2210 body: &[],
2211 },
2212 Operation {
2213 id: "get_milestone",
2214 method: "GET",
2215 path: "/repos/{owner}/{name}/milestones/{milestone}",
2216 tag: "Labels and milestones",
2217 summary: "Get a milestone",
2218 scope: Some("repo:read"),
2219 params: &[
2220 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
2221 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
2222 Param { name: "milestone", location: In::Path, kind: "integer", required: true, values: &[] },
2223 ],
2224 body: &[],
2225 },
2226 Operation {
2227 id: "list_labels",
2228 method: "GET",
2229 path: "/repos/{owner}/{name}/labels",
2230 tag: "Labels and milestones",
2231 summary: "List labels",
2232 scope: Some("repo:read"),
2233 params: &[
2234 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
2235 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
2236 ],
2237 body: &[],
2238 },
2239 Operation {
2240 id: "list_milestones",
2241 method: "GET",
2242 path: "/repos/{owner}/{name}/milestones",
2243 tag: "Labels and milestones",
2244 summary: "List milestones",
2245 scope: Some("repo:read"),
2246 params: &[
2247 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
2248 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
2249 Param { name: "state", location: In::Query, kind: "string", required: false, values: &["open", "closed"] },
2250 ],
2251 body: &[],
2252 },
2253 Operation {
2254 id: "update_label",
2255 method: "PATCH",
2256 path: "/repos/{owner}/{name}/labels/{label}",
2257 tag: "Labels and milestones",
2258 summary: "Update a label",
2259 scope: Some("issues:write"),
2260 params: &[
2261 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
2262 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
2263 Param { name: "label", location: In::Path, kind: "string", required: true, values: &[] },
2264 ],
2265 body: &[
2266 Field { name: "color", kind: "string", required: false, values: &[] },
2267 Field { name: "description", kind: "string", required: false, values: &[] },
2268 Field { name: "new_name", kind: "string", required: false, values: &[] },
2269 ],
2270 },
2271 Operation {
2272 id: "update_milestone",
2273 method: "PATCH",
2274 path: "/repos/{owner}/{name}/milestones/{milestone}",
2275 tag: "Labels and milestones",
2276 summary: "Update a milestone",
2277 scope: Some("issues:write"),
2278 params: &[
2279 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
2280 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
2281 Param { name: "milestone", location: In::Path, kind: "integer", required: true, values: &[] },
2282 ],
2283 body: &[
2284 Field { name: "description", kind: "string", required: false, values: &[] },
2285 Field { name: "due_on", kind: "string", required: false, values: &[] },
2286 Field { name: "state", kind: "string", required: false, values: &["open", "closed"] },
2287 Field { name: "title", kind: "string", required: false, values: &[] },
2288 ],
2289 },
2290 Operation {
2291 id: "leave_workspace",
2292 method: "DELETE",
2293 path: "/user/memberships/{workspace}",
2294 tag: "Members",
2295 summary: "Leave a workspace",
2296 scope: Some("account:write"),
2297 params: &[
2298 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
2299 ],
2300 body: &[],
2301 },
2302 Operation {
2303 id: "list_members",
2304 method: "GET",
2305 path: "/workspaces/{workspace}/members",
2306 tag: "Members",
2307 summary: "List a workspace's members",
2308 scope: Some("workspace:read"),
2309 params: &[
2310 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
2311 ],
2312 body: &[],
2313 },
2314 Operation {
2315 id: "remove_member",
2316 method: "DELETE",
2317 path: "/workspaces/{workspace}/members/{username}",
2318 tag: "Members",
2319 summary: "Remove a member",
2320 scope: Some("workspace:admin"),
2321 params: &[
2322 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
2323 Param { name: "username", location: In::Path, kind: "string", required: true, values: &[] },
2324 ],
2325 body: &[],
2326 },
2327 Operation {
2328 id: "transfer_ownership",
2329 method: "POST",
2330 path: "/workspaces/{workspace}/transfer_ownership",
2331 tag: "Members",
2332 summary: "Transfer a workspace's ownership",
2333 scope: Some("workspace:admin"),
2334 params: &[
2335 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
2336 ],
2337 body: &[
2338 Field { name: "username", kind: "string", required: true, values: &[] },
2339 ],
2340 },
2341 Operation {
2342 id: "update_member",
2343 method: "PATCH",
2344 path: "/workspaces/{workspace}/members/{username}",
2345 tag: "Members",
2346 summary: "Change a member's role",
2347 scope: Some("workspace:admin"),
2348 params: &[
2349 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
2350 Param { name: "username", location: In::Path, kind: "string", required: true, values: &[] },
2351 ],
2352 body: &[
2353 Field { name: "org_roles", kind: "array", required: false, values: &[] },
2354 Field { name: "role", kind: "string", required: false, values: &["owner", "member"] },
2355 ],
2356 },
2357 Operation {
2358 id: "recall",
2359 method: "GET",
2360 path: "/repos/{owner}/{name}/memory",
2361 tag: "Memory",
2362 summary: "Recall memory",
2363 scope: Some("memory:read"),
2364 params: &[
2365 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
2366 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
2367 Param { name: "q", location: In::Query, kind: "string", required: false, values: &[] },
2368 Param { name: "limit", location: In::Query, kind: "integer", required: false, values: &[] },
2369 ],
2370 body: &[],
2371 },
2372 Operation {
2373 id: "remember",
2374 method: "POST",
2375 path: "/repos/{owner}/{name}/memory",
2376 tag: "Memory",
2377 summary: "Remember something",
2378 scope: Some("memory:write"),
2379 params: &[
2380 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
2381 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
2382 ],
2383 body: &[
2384 Field { name: "from_number", kind: "integer", required: false, values: &[] },
2385 Field { name: "kind", kind: "string", required: false, values: &["fact", "convention", "decision", "gotcha"] },
2386 Field { name: "scope", kind: "string", required: false, values: &["project", "workspace"] },
2387 Field { name: "text", kind: "string", required: true, values: &[] },
2388 ],
2389 },
2390 Operation {
2391 id: "delete_issue_subscription",
2392 method: "DELETE",
2393 path: "/repos/{owner}/{name}/issues/{number}/subscription",
2394 tag: "Notifications",
2395 summary: "Unsubscribe from an issue",
2396 scope: Some("notifications:write"),
2397 params: &[
2398 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
2399 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
2400 Param { name: "number", location: In::Path, kind: "integer", required: true, values: &[] },
2401 ],
2402 body: &[
2403 Field { name: "id", kind: "string", required: false, values: &[] },
2404 ],
2405 },
2406 Operation {
2407 id: "delete_repo_subscription",
2408 method: "DELETE",
2409 path: "/repos/{owner}/{name}/subscription",
2410 tag: "Notifications",
2411 summary: "Stop watching a repository",
2412 scope: Some("notifications:write"),
2413 params: &[
2414 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
2415 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
2416 ],
2417 body: &[],
2418 },
2419 Operation {
2420 id: "delete_thread_subscription",
2421 method: "DELETE",
2422 path: "/notifications/threads/{id}/subscription",
2423 tag: "Notifications",
2424 summary: "Unsubscribe from a thread",
2425 scope: Some("notifications:write"),
2426 params: &[
2427 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
2428 ],
2429 body: &[
2430 Field { name: "number", kind: "integer", required: false, values: &[] },
2431 ],
2432 },
2433 Operation {
2434 id: "get_issue_subscription",
2435 method: "GET",
2436 path: "/repos/{owner}/{name}/issues/{number}/subscription",
2437 tag: "Notifications",
2438 summary: "Get your subscription to an issue",
2439 scope: Some("notifications:read"),
2440 params: &[
2441 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
2442 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
2443 Param { name: "number", location: In::Path, kind: "integer", required: true, values: &[] },
2444 ],
2445 body: &[],
2446 },
2447 Operation {
2448 id: "get_notification_thread",
2449 method: "GET",
2450 path: "/notifications/threads/{id}",
2451 tag: "Notifications",
2452 summary: "Get a thread",
2453 scope: Some("notifications:read"),
2454 params: &[
2455 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
2456 ],
2457 body: &[],
2458 },
2459 Operation {
2460 id: "get_repo_subscription",
2461 method: "GET",
2462 path: "/repos/{owner}/{name}/subscription",
2463 tag: "Notifications",
2464 summary: "Get how you watch a repository",
2465 scope: Some("notifications:read"),
2466 params: &[
2467 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
2468 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
2469 ],
2470 body: &[],
2471 },
2472 Operation {
2473 id: "get_thread_subscription",
2474 method: "GET",
2475 path: "/notifications/threads/{id}/subscription",
2476 tag: "Notifications",
2477 summary: "Get a thread subscription",
2478 scope: Some("notifications:read"),
2479 params: &[
2480 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
2481 ],
2482 body: &[],
2483 },
2484 Operation {
2485 id: "list_notifications",
2486 method: "GET",
2487 path: "/notifications",
2488 tag: "Notifications",
2489 summary: "List notifications",
2490 scope: Some("notifications:read"),
2491 params: &[
2492 Param { name: "all", location: In::Query, kind: "boolean", required: false, values: &[] },
2493 Param { name: "participating", location: In::Query, kind: "boolean", required: false, values: &[] },
2494 Param { name: "view", location: In::Query, kind: "string", required: false, values: &["inbox", "saved", "done"] },
2495 Param { name: "reason", location: In::Query, kind: "string", required: false, values: &["agent", "review_requested", "assign", "mention", "team_mention", "ci_activity", "security_alert", "state_change", "author", "comment", "manual", "subscribed"] },
2496 Param { name: "severity", location: In::Query, kind: "string", required: false, values: &["error", "warning", "success", "info"] },
2497 Param { name: "since", location: In::Query, kind: "string", required: false, values: &[] },
2498 Param { name: "before", location: In::Query, kind: "string", required: false, values: &[] },
2499 Param { name: "cursor", location: In::Query, kind: "string", required: false, values: &[] },
2500 Param { name: "per_page", location: In::Query, kind: "integer", required: false, values: &[] },
2501 ],
2502 body: &[],
2503 },
2504 Operation {
2505 id: "list_repo_notifications",
2506 method: "GET",
2507 path: "/repos/{owner}/{name}/notifications",
2508 tag: "Notifications",
2509 summary: "List a repository's notifications",
2510 scope: Some("notifications:read"),
2511 params: &[
2512 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
2513 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
2514 Param { name: "all", location: In::Query, kind: "boolean", required: false, values: &[] },
2515 Param { name: "participating", location: In::Query, kind: "boolean", required: false, values: &[] },
2516 Param { name: "view", location: In::Query, kind: "string", required: false, values: &["inbox", "saved", "done"] },
2517 Param { name: "reason", location: In::Query, kind: "string", required: false, values: &["agent", "review_requested", "assign", "mention", "team_mention", "ci_activity", "security_alert", "state_change", "author", "comment", "manual", "subscribed"] },
2518 Param { name: "severity", location: In::Query, kind: "string", required: false, values: &["error", "warning", "success", "info"] },
2519 Param { name: "since", location: In::Query, kind: "string", required: false, values: &[] },
2520 Param { name: "before", location: In::Query, kind: "string", required: false, values: &[] },
2521 Param { name: "cursor", location: In::Query, kind: "string", required: false, values: &[] },
2522 Param { name: "per_page", location: In::Query, kind: "integer", required: false, values: &[] },
2523 ],
2524 body: &[],
2525 },
2526 Operation {
2527 id: "list_watched_repos",
2528 method: "GET",
2529 path: "/user/subscriptions",
2530 tag: "Notifications",
2531 summary: "List repositories you watch",
2532 scope: Some("notifications:read"),
2533 params: &[],
2534 body: &[],
2535 },
2536 Operation {
2537 id: "mark_notifications_read",
2538 method: "PUT",
2539 path: "/notifications",
2540 tag: "Notifications",
2541 summary: "Mark notifications read",
2542 scope: Some("notifications:write"),
2543 params: &[],
2544 body: &[
2545 Field { name: "last_read_at", kind: "string", required: false, values: &[] },
2546 Field { name: "read", kind: "boolean", required: false, values: &[] },
2547 ],
2548 },
2549 Operation {
2550 id: "mark_repo_notifications_read",
2551 method: "PUT",
2552 path: "/repos/{owner}/{name}/notifications",
2553 tag: "Notifications",
2554 summary: "Mark a repository's notifications read",
2555 scope: Some("notifications:write"),
2556 params: &[
2557 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
2558 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
2559 ],
2560 body: &[
2561 Field { name: "last_read_at", kind: "string", required: false, values: &[] },
2562 Field { name: "read", kind: "boolean", required: false, values: &[] },
2563 ],
2564 },
2565 Operation {
2566 id: "mark_thread_done",
2567 method: "DELETE",
2568 path: "/notifications/threads/{id}",
2569 tag: "Notifications",
2570 summary: "Mark a thread done",
2571 scope: Some("notifications:write"),
2572 params: &[
2573 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
2574 ],
2575 body: &[
2576 Field { name: "done", kind: "boolean", required: false, values: &[] },
2577 ],
2578 },
2579 Operation {
2580 id: "mark_thread_read",
2581 method: "PATCH",
2582 path: "/notifications/threads/{id}",
2583 tag: "Notifications",
2584 summary: "Mark a thread read",
2585 scope: Some("notifications:write"),
2586 params: &[
2587 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
2588 ],
2589 body: &[
2590 Field { name: "read", kind: "boolean", required: false, values: &[] },
2591 ],
2592 },
2593 Operation {
2594 id: "save_thread",
2595 method: "PUT",
2596 path: "/notifications/threads/{id}/saved",
2597 tag: "Notifications",
2598 summary: "Save a thread",
2599 scope: Some("notifications:write"),
2600 params: &[
2601 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
2602 ],
2603 body: &[
2604 Field { name: "saved", kind: "boolean", required: false, values: &[] },
2605 ],
2606 },
2607 Operation {
2608 id: "set_issue_subscription",
2609 method: "PUT",
2610 path: "/repos/{owner}/{name}/issues/{number}/subscription",
2611 tag: "Notifications",
2612 summary: "Subscribe to an issue",
2613 scope: Some("notifications:write"),
2614 params: &[
2615 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
2616 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
2617 Param { name: "number", location: In::Path, kind: "integer", required: true, values: &[] },
2618 ],
2619 body: &[
2620 Field { name: "id", kind: "string", required: false, values: &[] },
2621 Field { name: "ignored", kind: "boolean", required: false, values: &[] },
2622 Field { name: "subscribed", kind: "boolean", required: false, values: &[] },
2623 ],
2624 },
2625 Operation {
2626 id: "set_repo_subscription",
2627 method: "PUT",
2628 path: "/repos/{owner}/{name}/subscription",
2629 tag: "Notifications",
2630 summary: "Watch a repository",
2631 scope: Some("notifications:write"),
2632 params: &[
2633 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
2634 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
2635 ],
2636 body: &[
2637 Field { name: "events", kind: "array", required: false, values: &[] },
2638 Field { name: "ignored", kind: "boolean", required: false, values: &[] },
2639 Field { name: "level", kind: "string", required: false, values: &["participating", "all", "ignore", "custom"] },
2640 Field { name: "subscribed", kind: "boolean", required: false, values: &[] },
2641 ],
2642 },
2643 Operation {
2644 id: "set_thread_subscription",
2645 method: "PUT",
2646 path: "/notifications/threads/{id}/subscription",
2647 tag: "Notifications",
2648 summary: "Set a thread subscription",
2649 scope: Some("notifications:write"),
2650 params: &[
2651 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
2652 ],
2653 body: &[
2654 Field { name: "ignored", kind: "boolean", required: false, values: &[] },
2655 Field { name: "number", kind: "integer", required: false, values: &[] },
2656 Field { name: "subscribed", kind: "boolean", required: false, values: &[] },
2657 ],
2658 },
2659 Operation {
2660 id: "snooze_thread",
2661 method: "PUT",
2662 path: "/notifications/threads/{id}/snooze",
2663 tag: "Notifications",
2664 summary: "Snooze a thread",
2665 scope: Some("notifications:write"),
2666 params: &[
2667 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
2668 ],
2669 body: &[
2670 Field { name: "until", kind: "string", required: false, values: &[] },
2671 ],
2672 },
2673 Operation {
2674 id: "unsave_thread",
2675 method: "DELETE",
2676 path: "/notifications/threads/{id}/saved",
2677 tag: "Notifications",
2678 summary: "Unsave a thread",
2679 scope: Some("notifications:write"),
2680 params: &[
2681 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
2682 ],
2683 body: &[
2684 Field { name: "saved", kind: "boolean", required: false, values: &[] },
2685 ],
2686 },
2687 Operation {
2688 id: "unsnooze_thread",
2689 method: "DELETE",
2690 path: "/notifications/threads/{id}/snooze",
2691 tag: "Notifications",
2692 summary: "Bring a snoozed thread back",
2693 scope: Some("notifications:write"),
2694 params: &[
2695 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
2696 ],
2697 body: &[
2698 Field { name: "until", kind: "string", required: false, values: &[] },
2699 ],
2700 },
2701 Operation {
2702 id: "create_ingest_token",
2703 method: "POST",
2704 path: "/workspaces/{workspace}/projects/{project}/observability/tokens",
2705 tag: "Observability",
2706 summary: "Create an ingest token",
2707 scope: Some("observability:write"),
2708 params: &[
2709 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
2710 Param { name: "project", location: In::Path, kind: "string", required: true, values: &[] },
2711 ],
2712 body: &[
2713 Field { name: "name", kind: "string", required: true, values: &[] },
2714 ],
2715 },
2716 Operation {
2717 id: "create_telemetry_export",
2718 method: "POST",
2719 path: "/workspaces/{workspace}/projects/{project}/observability/exports",
2720 tag: "Observability",
2721 summary: "Create a telemetry export",
2722 scope: Some("observability:write"),
2723 params: &[
2724 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
2725 Param { name: "project", location: In::Path, kind: "string", required: true, values: &[] },
2726 ],
2727 body: &[
2728 Field { name: "enabled", kind: "boolean", required: false, values: &[] },
2729 Field { name: "endpoint", kind: "string", required: true, values: &[] },
2730 Field { name: "headers", kind: "object", required: false, values: &[] },
2731 Field { name: "name", kind: "string", required: true, values: &[] },
2732 Field { name: "signals", kind: "array", required: false, values: &[] },
2733 ],
2734 },
2735 Operation {
2736 id: "delete_ingest_token",
2737 method: "DELETE",
2738 path: "/workspaces/{workspace}/projects/{project}/observability/tokens/{id}",
2739 tag: "Observability",
2740 summary: "Delete an ingest token",
2741 scope: Some("observability:write"),
2742 params: &[
2743 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
2744 Param { name: "project", location: In::Path, kind: "string", required: true, values: &[] },
2745 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
2746 ],
2747 body: &[],
2748 },
2749 Operation {
2750 id: "delete_telemetry_export",
2751 method: "DELETE",
2752 path: "/workspaces/{workspace}/projects/{project}/observability/exports/{id}",
2753 tag: "Observability",
2754 summary: "Delete a telemetry export",
2755 scope: Some("observability:write"),
2756 params: &[
2757 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
2758 Param { name: "project", location: In::Path, kind: "string", required: true, values: &[] },
2759 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
2760 ],
2761 body: &[],
2762 },
2763 Operation {
2764 id: "get_metric",
2765 method: "GET",
2766 path: "/workspaces/{workspace}/projects/{project}/observability/metrics/{metric}",
2767 tag: "Observability",
2768 summary: "Get a metric",
2769 scope: Some("observability:read"),
2770 params: &[
2771 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
2772 Param { name: "project", location: In::Path, kind: "string", required: true, values: &[] },
2773 Param { name: "metric", location: In::Path, kind: "string", required: true, values: &[] },
2774 Param { name: "from", location: In::Query, kind: "string", required: false, values: &[] },
2775 Param { name: "to", location: In::Query, kind: "string", required: false, values: &[] },
2776 Param { name: "aggregate", location: In::Query, kind: "string", required: false, values: &["avg", "sum", "min", "max", "p50", "p95", "p99"] },
2777 Param { name: "group_by", location: In::Query, kind: "string", required: false, values: &[] },
2778 Param { name: "step", location: In::Query, kind: "integer", required: false, values: &[] },
2779 Param { name: "service", location: In::Query, kind: "string", required: false, values: &[] },
2780 Param { name: "environment", location: In::Query, kind: "string", required: false, values: &[] },
2781 ],
2782 body: &[],
2783 },
2784 Operation {
2785 id: "get_observability_overview",
2786 method: "GET",
2787 path: "/workspaces/{workspace}/projects/{project}/observability/overview",
2788 tag: "Observability",
2789 summary: "Get a project's observability overview",
2790 scope: Some("observability:read"),
2791 params: &[
2792 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
2793 Param { name: "project", location: In::Path, kind: "string", required: true, values: &[] },
2794 Param { name: "from", location: In::Query, kind: "string", required: false, values: &[] },
2795 Param { name: "to", location: In::Query, kind: "string", required: false, values: &[] },
2796 Param { name: "environment", location: In::Query, kind: "string", required: false, values: &[] },
2797 Param { name: "service", location: In::Query, kind: "string", required: false, values: &[] },
2798 Param { name: "deployment_id", location: In::Query, kind: "string", required: false, values: &[] },
2799 Param { name: "step", location: In::Query, kind: "integer", required: false, values: &[] },
2800 ],
2801 body: &[],
2802 },
2803 Operation {
2804 id: "get_observability_settings",
2805 method: "GET",
2806 path: "/workspaces/{workspace}/projects/{project}/observability/settings",
2807 tag: "Observability",
2808 summary: "Get observability settings",
2809 scope: Some("observability:read"),
2810 params: &[
2811 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
2812 Param { name: "project", location: In::Path, kind: "string", required: true, values: &[] },
2813 ],
2814 body: &[],
2815 },
2816 Operation {
2817 id: "get_observability_usage",
2818 method: "GET",
2819 path: "/workspaces/{workspace}/projects/{project}/observability/usage",
2820 tag: "Observability",
2821 summary: "Get observability usage",
2822 scope: Some("observability:read"),
2823 params: &[
2824 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
2825 Param { name: "project", location: In::Path, kind: "string", required: true, values: &[] },
2826 ],
2827 body: &[],
2828 },
2829 Operation {
2830 id: "get_request",
2831 method: "GET",
2832 path: "/workspaces/{workspace}/projects/{project}/observability/requests/{id}",
2833 tag: "Observability",
2834 summary: "Get a request",
2835 scope: Some("observability:read"),
2836 params: &[
2837 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
2838 Param { name: "project", location: In::Path, kind: "string", required: true, values: &[] },
2839 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
2840 ],
2841 body: &[],
2842 },
2843 Operation {
2844 id: "get_trace",
2845 method: "GET",
2846 path: "/workspaces/{workspace}/projects/{project}/observability/traces/{trace_id}",
2847 tag: "Observability",
2848 summary: "Get a trace",
2849 scope: Some("observability:read"),
2850 params: &[
2851 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
2852 Param { name: "project", location: In::Path, kind: "string", required: true, values: &[] },
2853 Param { name: "trace_id", location: In::Path, kind: "string", required: true, values: &[] },
2854 ],
2855 body: &[],
2856 },
2857 Operation {
2858 id: "list_errors",
2859 method: "GET",
2860 path: "/workspaces/{workspace}/projects/{project}/observability/errors",
2861 tag: "Observability",
2862 summary: "List errors",
2863 scope: Some("observability:read"),
2864 params: &[
2865 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
2866 Param { name: "project", location: In::Path, kind: "string", required: true, values: &[] },
2867 Param { name: "state", location: In::Query, kind: "string", required: false, values: &["open", "resolved", "ignored"] },
2868 Param { name: "environment", location: In::Query, kind: "string", required: false, values: &[] },
2869 Param { name: "service", location: In::Query, kind: "string", required: false, values: &[] },
2870 Param { name: "from", location: In::Query, kind: "string", required: false, values: &[] },
2871 Param { name: "to", location: In::Query, kind: "string", required: false, values: &[] },
2872 ],
2873 body: &[],
2874 },
2875 Operation {
2876 id: "list_ingest_tokens",
2877 method: "GET",
2878 path: "/workspaces/{workspace}/projects/{project}/observability/tokens",
2879 tag: "Observability",
2880 summary: "List ingest tokens",
2881 scope: Some("observability:read"),
2882 params: &[
2883 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
2884 Param { name: "project", location: In::Path, kind: "string", required: true, values: &[] },
2885 ],
2886 body: &[],
2887 },
2888 Operation {
2889 id: "list_logs",
2890 method: "GET",
2891 path: "/workspaces/{workspace}/projects/{project}/observability/logs",
2892 tag: "Observability",
2893 summary: "List logs",
2894 scope: Some("observability:read"),
2895 params: &[
2896 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
2897 Param { name: "project", location: In::Path, kind: "string", required: true, values: &[] },
2898 Param { name: "from", location: In::Query, kind: "string", required: false, values: &[] },
2899 Param { name: "to", location: In::Query, kind: "string", required: false, values: &[] },
2900 Param { name: "q", location: In::Query, kind: "string", required: false, values: &[] },
2901 Param { name: "level", location: In::Query, kind: "string", required: false, values: &[] },
2902 Param { name: "trace_id", location: In::Query, kind: "string", required: false, values: &[] },
2903 Param { name: "request_id", location: In::Query, kind: "string", required: false, values: &[] },
2904 Param { name: "environment", location: In::Query, kind: "string", required: false, values: &[] },
2905 Param { name: "service", location: In::Query, kind: "string", required: false, values: &[] },
2906 Param { name: "deployment_id", location: In::Query, kind: "string", required: false, values: &[] },
2907 Param { name: "cursor", location: In::Query, kind: "string", required: false, values: &[] },
2908 Param { name: "limit", location: In::Query, kind: "integer", required: false, values: &[] },
2909 ],
2910 body: &[],
2911 },
2912 Operation {
2913 id: "list_metrics",
2914 method: "GET",
2915 path: "/workspaces/{workspace}/projects/{project}/observability/metrics",
2916 tag: "Observability",
2917 summary: "List metrics",
2918 scope: Some("observability:read"),
2919 params: &[
2920 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
2921 Param { name: "project", location: In::Path, kind: "string", required: true, values: &[] },
2922 ],
2923 body: &[],
2924 },
2925 Operation {
2926 id: "list_requests",
2927 method: "GET",
2928 path: "/workspaces/{workspace}/projects/{project}/observability/requests",
2929 tag: "Observability",
2930 summary: "List requests",
2931 scope: Some("observability:read"),
2932 params: &[
2933 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
2934 Param { name: "project", location: In::Path, kind: "string", required: true, values: &[] },
2935 Param { name: "from", location: In::Query, kind: "string", required: false, values: &[] },
2936 Param { name: "to", location: In::Query, kind: "string", required: false, values: &[] },
2937 Param { name: "q", location: In::Query, kind: "string", required: false, values: &[] },
2938 Param { name: "status", location: In::Query, kind: "string", required: false, values: &[] },
2939 Param { name: "errors_only", location: In::Query, kind: "boolean", required: false, values: &[] },
2940 Param { name: "route", location: In::Query, kind: "string", required: false, values: &[] },
2941 Param { name: "min_duration_ms", location: In::Query, kind: "integer", required: false, values: &[] },
2942 Param { name: "environment", location: In::Query, kind: "string", required: false, values: &[] },
2943 Param { name: "service", location: In::Query, kind: "string", required: false, values: &[] },
2944 Param { name: "deployment_id", location: In::Query, kind: "string", required: false, values: &[] },
2945 Param { name: "cursor", location: In::Query, kind: "string", required: false, values: &[] },
2946 Param { name: "limit", location: In::Query, kind: "integer", required: false, values: &[] },
2947 ],
2948 body: &[],
2949 },
2950 Operation {
2951 id: "list_telemetry_exports",
2952 method: "GET",
2953 path: "/workspaces/{workspace}/projects/{project}/observability/exports",
2954 tag: "Observability",
2955 summary: "List telemetry exports",
2956 scope: Some("observability:read"),
2957 params: &[
2958 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
2959 Param { name: "project", location: In::Path, kind: "string", required: true, values: &[] },
2960 ],
2961 body: &[],
2962 },
2963 Operation {
2964 id: "list_traces",
2965 method: "GET",
2966 path: "/workspaces/{workspace}/projects/{project}/observability/traces",
2967 tag: "Observability",
2968 summary: "List traces",
2969 scope: Some("observability:read"),
2970 params: &[
2971 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
2972 Param { name: "project", location: In::Path, kind: "string", required: true, values: &[] },
2973 Param { name: "from", location: In::Query, kind: "string", required: false, values: &[] },
2974 Param { name: "to", location: In::Query, kind: "string", required: false, values: &[] },
2975 Param { name: "q", location: In::Query, kind: "string", required: false, values: &[] },
2976 Param { name: "errors_only", location: In::Query, kind: "boolean", required: false, values: &[] },
2977 Param { name: "min_duration_ms", location: In::Query, kind: "integer", required: false, values: &[] },
2978 Param { name: "environment", location: In::Query, kind: "string", required: false, values: &[] },
2979 Param { name: "service", location: In::Query, kind: "string", required: false, values: &[] },
2980 Param { name: "cursor", location: In::Query, kind: "string", required: false, values: &[] },
2981 Param { name: "limit", location: In::Query, kind: "integer", required: false, values: &[] },
2982 ],
2983 body: &[],
2984 },
2985 Operation {
2986 id: "update_error",
2987 method: "PATCH",
2988 path: "/workspaces/{workspace}/projects/{project}/observability/errors/{fingerprint}",
2989 tag: "Observability",
2990 summary: "Update an error",
2991 scope: Some("observability:write"),
2992 params: &[
2993 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
2994 Param { name: "project", location: In::Path, kind: "string", required: true, values: &[] },
2995 Param { name: "fingerprint", location: In::Path, kind: "string", required: true, values: &[] },
2996 ],
2997 body: &[
2998 Field { name: "issue_number", kind: "integer", required: false, values: &[] },
2999 Field { name: "state", kind: "string", required: false, values: &["open", "resolved", "ignored"] },
3000 ],
3001 },
3002 Operation {
3003 id: "update_observability_settings",
3004 method: "PATCH",
3005 path: "/workspaces/{workspace}/projects/{project}/observability/settings",
3006 tag: "Observability",
3007 summary: "Update observability settings",
3008 scope: Some("observability:write"),
3009 params: &[
3010 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
3011 Param { name: "project", location: In::Path, kind: "string", required: true, values: &[] },
3012 ],
3013 body: &[
3014 Field { name: "deployments", kind: "boolean", required: false, values: &[] },
3015 Field { name: "retention_days", kind: "integer", required: false, values: &[] },
3016 ],
3017 },
3018 Operation {
3019 id: "update_telemetry_export",
3020 method: "PATCH",
3021 path: "/workspaces/{workspace}/projects/{project}/observability/exports/{id}",
3022 tag: "Observability",
3023 summary: "Update a telemetry export",
3024 scope: Some("observability:write"),
3025 params: &[
3026 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
3027 Param { name: "project", location: In::Path, kind: "string", required: true, values: &[] },
3028 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
3029 ],
3030 body: &[
3031 Field { name: "enabled", kind: "boolean", required: false, values: &[] },
3032 Field { name: "endpoint", kind: "string", required: false, values: &[] },
3033 Field { name: "headers", kind: "object", required: false, values: &[] },
3034 Field { name: "name", kind: "string", required: false, values: &[] },
3035 Field { name: "signals", kind: "array", required: false, values: &[] },
3036 ],
3037 },
3038 Operation {
3039 id: "delete_package",
3040 method: "DELETE",
3041 path: "/workspaces/{workspace}/packages/{package_type}/{package_name}",
3042 tag: "Packages",
3043 summary: "Delete a package",
3044 scope: Some("packages:delete"),
3045 params: &[
3046 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
3047 Param { name: "package_type", location: In::Path, kind: "string", required: true, values: &["container", "npm", "cargo", "maven", "nuget", "rubygems", "composer"] },
3048 Param { name: "package_name", location: In::Path, kind: "string", required: true, values: &[] },
3049 ],
3050 body: &[],
3051 },
3052 Operation {
3053 id: "delete_package_version",
3054 method: "DELETE",
3055 path: "/workspaces/{workspace}/packages/{package_type}/{package_name}/versions/{version_id}",
3056 tag: "Packages",
3057 summary: "Delete a package version",
3058 scope: Some("packages:delete"),
3059 params: &[
3060 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
3061 Param { name: "package_type", location: In::Path, kind: "string", required: true, values: &["container", "npm", "cargo", "maven", "nuget", "rubygems", "composer"] },
3062 Param { name: "package_name", location: In::Path, kind: "string", required: true, values: &[] },
3063 Param { name: "version_id", location: In::Path, kind: "string", required: true, values: &[] },
3064 ],
3065 body: &[],
3066 },
3067 Operation {
3068 id: "get_package",
3069 method: "GET",
3070 path: "/workspaces/{workspace}/packages/{package_type}/{package_name}",
3071 tag: "Packages",
3072 summary: "Get a package",
3073 scope: Some("packages:read"),
3074 params: &[
3075 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
3076 Param { name: "package_type", location: In::Path, kind: "string", required: true, values: &["container", "npm", "cargo", "maven", "nuget", "rubygems", "composer"] },
3077 Param { name: "package_name", location: In::Path, kind: "string", required: true, values: &[] },
3078 ],
3079 body: &[],
3080 },
3081 Operation {
3082 id: "get_package_version",
3083 method: "GET",
3084 path: "/workspaces/{workspace}/packages/{package_type}/{package_name}/versions/{version_id}",
3085 tag: "Packages",
3086 summary: "Get a package version",
3087 scope: Some("packages:read"),
3088 params: &[
3089 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
3090 Param { name: "package_type", location: In::Path, kind: "string", required: true, values: &["container", "npm", "cargo", "maven", "nuget", "rubygems", "composer"] },
3091 Param { name: "package_name", location: In::Path, kind: "string", required: true, values: &[] },
3092 Param { name: "version_id", location: In::Path, kind: "string", required: true, values: &[] },
3093 ],
3094 body: &[],
3095 },
3096 Operation {
3097 id: "link_package",
3098 method: "PUT",
3099 path: "/workspaces/{workspace}/packages/{package_type}/{package_name}/repository",
3100 tag: "Packages",
3101 summary: "Link a package to a repository",
3102 scope: Some("packages:write"),
3103 params: &[
3104 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
3105 Param { name: "package_type", location: In::Path, kind: "string", required: true, values: &["container", "npm", "cargo", "maven", "nuget", "rubygems", "composer"] },
3106 Param { name: "package_name", location: In::Path, kind: "string", required: true, values: &[] },
3107 ],
3108 body: &[
3109 Field { name: "repository", kind: "string", required: true, values: &[] },
3110 ],
3111 },
3112 Operation {
3113 id: "list_package_access",
3114 method: "GET",
3115 path: "/workspaces/{workspace}/packages/{package_type}/{package_name}/access",
3116 tag: "Packages",
3117 summary: "List who has access to a package",
3118 scope: Some("packages:read"),
3119 params: &[
3120 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
3121 Param { name: "package_type", location: In::Path, kind: "string", required: true, values: &["container", "npm", "cargo", "maven", "nuget", "rubygems", "composer"] },
3122 Param { name: "package_name", location: In::Path, kind: "string", required: true, values: &[] },
3123 ],
3124 body: &[],
3125 },
3126 Operation {
3127 id: "list_package_actions_access",
3128 method: "GET",
3129 path: "/workspaces/{workspace}/packages/{package_type}/{package_name}/actions-access",
3130 tag: "Packages",
3131 summary: "List a package's Actions access",
3132 scope: Some("packages:read"),
3133 params: &[
3134 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
3135 Param { name: "package_type", location: In::Path, kind: "string", required: true, values: &["container", "npm", "cargo", "maven", "nuget", "rubygems", "composer"] },
3136 Param { name: "package_name", location: In::Path, kind: "string", required: true, values: &[] },
3137 ],
3138 body: &[],
3139 },
3140 Operation {
3141 id: "list_package_versions",
3142 method: "GET",
3143 path: "/workspaces/{workspace}/packages/{package_type}/{package_name}/versions",
3144 tag: "Packages",
3145 summary: "List a package's versions",
3146 scope: Some("packages:read"),
3147 params: &[
3148 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
3149 Param { name: "package_type", location: In::Path, kind: "string", required: true, values: &["container", "npm", "cargo", "maven", "nuget", "rubygems", "composer"] },
3150 Param { name: "package_name", location: In::Path, kind: "string", required: true, values: &[] },
3151 Param { name: "state", location: In::Query, kind: "string", required: false, values: &["active", "deleted"] },
3152 ],
3153 body: &[],
3154 },
3155 Operation {
3156 id: "list_packages",
3157 method: "GET",
3158 path: "/workspaces/{workspace}/packages",
3159 tag: "Packages",
3160 summary: "List a workspace's packages",
3161 scope: Some("packages:read"),
3162 params: &[
3163 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
3164 Param { name: "package_type", location: In::Query, kind: "string", required: false, values: &["container", "npm", "cargo", "maven", "nuget", "rubygems", "composer"] },
3165 Param { name: "q", location: In::Query, kind: "string", required: false, values: &[] },
3166 Param { name: "state", location: In::Query, kind: "string", required: false, values: &["active", "deleted"] },
3167 ],
3168 body: &[],
3169 },
3170 Operation {
3171 id: "remove_package_access",
3172 method: "DELETE",
3173 path: "/workspaces/{workspace}/packages/{package_type}/{package_name}/access",
3174 tag: "Packages",
3175 summary: "Remove a person's or team's role on a package",
3176 scope: Some("packages:write"),
3177 params: &[
3178 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
3179 Param { name: "package_type", location: In::Path, kind: "string", required: true, values: &["container", "npm", "cargo", "maven", "nuget", "rubygems", "composer"] },
3180 Param { name: "package_name", location: In::Path, kind: "string", required: true, values: &[] },
3181 ],
3182 body: &[
3183 Field { name: "team", kind: "string", required: false, values: &[] },
3184 Field { name: "username", kind: "string", required: false, values: &[] },
3185 ],
3186 },
3187 Operation {
3188 id: "remove_package_actions_access",
3189 method: "DELETE",
3190 path: "/workspaces/{workspace}/packages/{package_type}/{package_name}/actions-access/{repository}",
3191 tag: "Packages",
3192 summary: "Remove a repository's Actions access to a package",
3193 scope: Some("packages:write"),
3194 params: &[
3195 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
3196 Param { name: "package_type", location: In::Path, kind: "string", required: true, values: &["container", "npm", "cargo", "maven", "nuget", "rubygems", "composer"] },
3197 Param { name: "package_name", location: In::Path, kind: "string", required: true, values: &[] },
3198 Param { name: "repository", location: In::Path, kind: "string", required: true, values: &[] },
3199 ],
3200 body: &[],
3201 },
3202 Operation {
3203 id: "restore_package",
3204 method: "POST",
3205 path: "/workspaces/{workspace}/packages/{package_type}/{package_name}/restore",
3206 tag: "Packages",
3207 summary: "Restore a package",
3208 scope: Some("packages:delete"),
3209 params: &[
3210 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
3211 Param { name: "package_type", location: In::Path, kind: "string", required: true, values: &["container", "npm", "cargo", "maven", "nuget", "rubygems", "composer"] },
3212 Param { name: "package_name", location: In::Path, kind: "string", required: true, values: &[] },
3213 ],
3214 body: &[],
3215 },
3216 Operation {
3217 id: "restore_package_version",
3218 method: "POST",
3219 path: "/workspaces/{workspace}/packages/{package_type}/{package_name}/versions/{version_id}/restore",
3220 tag: "Packages",
3221 summary: "Restore a package version",
3222 scope: Some("packages:delete"),
3223 params: &[
3224 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
3225 Param { name: "package_type", location: In::Path, kind: "string", required: true, values: &["container", "npm", "cargo", "maven", "nuget", "rubygems", "composer"] },
3226 Param { name: "package_name", location: In::Path, kind: "string", required: true, values: &[] },
3227 Param { name: "version_id", location: In::Path, kind: "string", required: true, values: &[] },
3228 ],
3229 body: &[],
3230 },
3231 Operation {
3232 id: "set_package_access",
3233 method: "PUT",
3234 path: "/workspaces/{workspace}/packages/{package_type}/{package_name}/access",
3235 tag: "Packages",
3236 summary: "Give a person or team a role on a package",
3237 scope: Some("packages:write"),
3238 params: &[
3239 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
3240 Param { name: "package_type", location: In::Path, kind: "string", required: true, values: &["container", "npm", "cargo", "maven", "nuget", "rubygems", "composer"] },
3241 Param { name: "package_name", location: In::Path, kind: "string", required: true, values: &[] },
3242 ],
3243 body: &[
3244 Field { name: "role", kind: "string", required: true, values: &["read", "write", "admin"] },
3245 Field { name: "team", kind: "string", required: false, values: &[] },
3246 Field { name: "username", kind: "string", required: false, values: &[] },
3247 ],
3248 },
3249 Operation {
3250 id: "set_package_actions_access",
3251 method: "PUT",
3252 path: "/workspaces/{workspace}/packages/{package_type}/{package_name}/actions-access",
3253 tag: "Packages",
3254 summary: "Give a repository's workflows access to a package",
3255 scope: Some("packages:write"),
3256 params: &[
3257 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
3258 Param { name: "package_type", location: In::Path, kind: "string", required: true, values: &["container", "npm", "cargo", "maven", "nuget", "rubygems", "composer"] },
3259 Param { name: "package_name", location: In::Path, kind: "string", required: true, values: &[] },
3260 ],
3261 body: &[
3262 Field { name: "repository", kind: "string", required: true, values: &[] },
3263 Field { name: "role", kind: "string", required: true, values: &["read", "write"] },
3264 ],
3265 },
3266 Operation {
3267 id: "unlink_package",
3268 method: "DELETE",
3269 path: "/workspaces/{workspace}/packages/{package_type}/{package_name}/repository",
3270 tag: "Packages",
3271 summary: "Unlink a package from its repository",
3272 scope: Some("packages:write"),
3273 params: &[
3274 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
3275 Param { name: "package_type", location: In::Path, kind: "string", required: true, values: &["container", "npm", "cargo", "maven", "nuget", "rubygems", "composer"] },
3276 Param { name: "package_name", location: In::Path, kind: "string", required: true, values: &[] },
3277 ],
3278 body: &[],
3279 },
3280 Operation {
3281 id: "update_package",
3282 method: "PATCH",
3283 path: "/workspaces/{workspace}/packages/{package_type}/{package_name}",
3284 tag: "Packages",
3285 summary: "Update a package",
3286 scope: Some("packages:write"),
3287 params: &[
3288 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
3289 Param { name: "package_type", location: In::Path, kind: "string", required: true, values: &["container", "npm", "cargo", "maven", "nuget", "rubygems", "composer"] },
3290 Param { name: "package_name", location: In::Path, kind: "string", required: true, values: &[] },
3291 ],
3292 body: &[
3293 Field { name: "inherit_access", kind: "boolean", required: false, values: &[] },
3294 Field { name: "visibility", kind: "string", required: false, values: &["public", "private"] },
3295 ],
3296 },
3297 Operation {
3298 id: "get_token_policy",
3299 method: "GET",
3300 path: "/workspaces/{workspace}/personal-access-token-policy",
3301 tag: "Personal access tokens",
3302 summary: "Get a workspace's personal access token policy",
3303 scope: Some("workspace:read"),
3304 params: &[
3305 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
3306 ],
3307 body: &[],
3308 },
3309 Operation {
3310 id: "list_member_tokens",
3311 method: "GET",
3312 path: "/workspaces/{workspace}/personal-access-tokens",
3313 tag: "Personal access tokens",
3314 summary: "List the personal access tokens that reach a workspace",
3315 scope: Some("access:read"),
3316 params: &[
3317 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
3318 ],
3319 body: &[],
3320 },
3321 Operation {
3322 id: "list_token_requests",
3323 method: "GET",
3324 path: "/workspaces/{workspace}/personal-access-token-requests",
3325 tag: "Personal access tokens",
3326 summary: "List personal access tokens waiting for approval",
3327 scope: Some("access:read"),
3328 params: &[
3329 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
3330 ],
3331 body: &[],
3332 },
3333 Operation {
3334 id: "review_token_request",
3335 method: "POST",
3336 path: "/workspaces/{workspace}/personal-access-token-requests/{id}",
3337 tag: "Personal access tokens",
3338 summary: "Approve or deny a personal access token",
3339 scope: Some("access:admin"),
3340 params: &[
3341 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
3342 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
3343 ],
3344 body: &[
3345 Field { name: "decision", kind: "string", required: true, values: &["approve", "deny"] },
3346 Field { name: "reason", kind: "string", required: false, values: &[] },
3347 ],
3348 },
3349 Operation {
3350 id: "revoke_member_token",
3351 method: "POST",
3352 path: "/workspaces/{workspace}/personal-access-tokens/{id}",
3353 tag: "Personal access tokens",
3354 summary: "Revoke a member's token in a workspace",
3355 scope: Some("access:admin"),
3356 params: &[
3357 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
3358 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
3359 ],
3360 body: &[
3361 Field { name: "reason", kind: "string", required: false, values: &[] },
3362 ],
3363 },
3364 Operation {
3365 id: "set_token_policy",
3366 method: "PATCH",
3367 path: "/workspaces/{workspace}/personal-access-token-policy",
3368 tag: "Personal access tokens",
3369 summary: "Set a workspace's personal access token policy",
3370 scope: Some("workspace:admin"),
3371 params: &[
3372 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
3373 ],
3374 body: &[
3375 Field { name: "allow_tokens_for_all_workspaces", kind: "boolean", required: false, values: &[] },
3376 Field { name: "allow_tokens_for_this_workspace", kind: "boolean", required: false, values: &[] },
3377 Field { name: "forbid_no_expiry", kind: "boolean", required: false, values: &[] },
3378 Field { name: "max_lifetime_days", kind: "integer", required: false, values: &[] },
3379 Field { name: "require_approval", kind: "boolean", required: false, values: &[] },
3380 ],
3381 },
3382 Operation {
3383 id: "list_pinned_projects",
3384 method: "GET",
3385 path: "/user/pinned_projects/{workspace}",
3386 tag: "Pinned projects",
3387 summary: "List your pinned projects",
3388 scope: Some("account:read"),
3389 params: &[
3390 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
3391 ],
3392 body: &[],
3393 },
3394 Operation {
3395 id: "pin_project",
3396 method: "PUT",
3397 path: "/user/pinned_projects/{workspace}/{project}",
3398 tag: "Pinned projects",
3399 summary: "Pin a project",
3400 scope: Some("account:write"),
3401 params: &[
3402 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
3403 Param { name: "project", location: In::Path, kind: "string", required: true, values: &[] },
3404 ],
3405 body: &[
3406 Field { name: "position", kind: "integer", required: false, values: &[] },
3407 ],
3408 },
3409 Operation {
3410 id: "reorder_pinned_projects",
3411 method: "PUT",
3412 path: "/user/pinned_projects/{workspace}",
3413 tag: "Pinned projects",
3414 summary: "Reorder your pinned projects",
3415 scope: Some("account:write"),
3416 params: &[
3417 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
3418 ],
3419 body: &[
3420 Field { name: "projects", kind: "array", required: true, values: &[] },
3421 ],
3422 },
3423 Operation {
3424 id: "unpin_project",
3425 method: "DELETE",
3426 path: "/user/pinned_projects/{workspace}/{project}",
3427 tag: "Pinned projects",
3428 summary: "Unpin a project",
3429 scope: Some("account:write"),
3430 params: &[
3431 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
3432 Param { name: "project", location: In::Path, kind: "string", required: true, values: &[] },
3433 ],
3434 body: &[],
3435 },
3436 Operation {
3437 id: "get_project",
3438 method: "GET",
3439 path: "/workspaces/{workspace}/projects/{project}",
3440 tag: "Projects",
3441 summary: "Get a project",
3442 scope: Some("repo:read"),
3443 params: &[
3444 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
3445 Param { name: "project", location: In::Path, kind: "string", required: true, values: &[] },
3446 ],
3447 body: &[],
3448 },
3449 Operation {
3450 id: "list_projects",
3451 method: "GET",
3452 path: "/workspaces/{workspace}/projects",
3453 tag: "Projects",
3454 summary: "List a workspace's projects",
3455 scope: Some("repo:read"),
3456 params: &[
3457 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
3458 ],
3459 body: &[],
3460 },
3461 Operation {
3462 id: "update_project",
3463 method: "PATCH",
3464 path: "/workspaces/{workspace}/projects/{project}",
3465 tag: "Projects",
3466 summary: "Update a project",
3467 scope: Some("repo:write"),
3468 params: &[
3469 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
3470 Param { name: "project", location: In::Path, kind: "string", required: true, values: &[] },
3471 ],
3472 body: &[
3473 Field { name: "description", kind: "string", required: false, values: &[] },
3474 Field { name: "docs_url", kind: "string", required: false, values: &[] },
3475 Field { name: "homepage", kind: "string", required: false, values: &[] },
3476 Field { name: "kind", kind: "string", required: false, values: &["auto", "app", "library", "tool", "docs", "other"] },
3477 Field { name: "links", kind: "array", required: false, values: &[] },
3478 Field { name: "name", kind: "string", required: false, values: &[] },
3479 Field { name: "production_url", kind: "string", required: false, values: &[] },
3480 Field { name: "root_dir", kind: "string", required: false, values: &[] },
3481 Field { name: "runs", kind: "string", required: false, values: &["auto", "g1t", "elsewhere"] },
3482 ],
3483 },
3484 Operation {
3485 id: "close_pull_request",
3486 method: "POST",
3487 path: "/repos/{owner}/{name}/pulls/{number}/close",
3488 tag: "Pull requests",
3489 summary: "Close a pull request",
3490 scope: Some("pull_requests:write"),
3491 params: &[
3492 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
3493 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
3494 Param { name: "number", location: In::Path, kind: "integer", required: true, values: &[] },
3495 ],
3496 body: &[],
3497 },
3498 Operation {
3499 id: "convert_pull_request_to_draft",
3500 method: "POST",
3501 path: "/repos/{owner}/{name}/pulls/{number}/draft",
3502 tag: "Pull requests",
3503 summary: "Convert a pull request to a draft",
3504 scope: Some("pull_requests:write"),
3505 params: &[
3506 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
3507 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
3508 Param { name: "number", location: In::Path, kind: "integer", required: true, values: &[] },
3509 ],
3510 body: &[],
3511 },
3512 Operation {
3513 id: "create_pull_request",
3514 method: "POST",
3515 path: "/repos/{owner}/{name}/pulls",
3516 tag: "Pull requests",
3517 summary: "Create a pull request",
3518 scope: Some("pull_requests:write"),
3519 params: &[
3520 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
3521 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
3522 ],
3523 body: &[
3524 Field { name: "agent", kind: "string", required: false, values: &[] },
3525 Field { name: "base", kind: "string", required: false, values: &[] },
3526 Field { name: "body", kind: "string", required: false, values: &[] },
3527 Field { name: "branch", kind: "string", required: false, values: &[] },
3528 Field { name: "issue", kind: "integer", required: false, values: &[] },
3529 Field { name: "title", kind: "string", required: false, values: &[] },
3530 ],
3531 },
3532 Operation {
3533 id: "get_merge_queue",
3534 method: "GET",
3535 path: "/repos/{owner}/{name}/queue",
3536 tag: "Pull requests",
3537 summary: "Get the merge queue",
3538 scope: Some("pull_requests:read"),
3539 params: &[
3540 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
3541 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
3542 ],
3543 body: &[],
3544 },
3545 Operation {
3546 id: "get_pull_request",
3547 method: "GET",
3548 path: "/repos/{owner}/{name}/pulls/{number}",
3549 tag: "Pull requests",
3550 summary: "Get a pull request",
3551 scope: Some("pull_requests:read"),
3552 params: &[
3553 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
3554 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
3555 Param { name: "number", location: In::Path, kind: "integer", required: true, values: &[] },
3556 ],
3557 body: &[],
3558 },
3559 Operation {
3560 id: "get_pull_request_changes",
3561 method: "GET",
3562 path: "/repos/{owner}/{name}/pulls/{number}/changes",
3563 tag: "Pull requests",
3564 summary: "Get a pull request's changes",
3565 scope: Some("pull_requests:read"),
3566 params: &[
3567 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
3568 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
3569 Param { name: "number", location: In::Path, kind: "integer", required: true, values: &[] },
3570 ],
3571 body: &[],
3572 },
3573 Operation {
3574 id: "list_pull_requests",
3575 method: "GET",
3576 path: "/repos/{owner}/{name}/pulls",
3577 tag: "Pull requests",
3578 summary: "List pull requests",
3579 scope: Some("pull_requests:read"),
3580 params: &[
3581 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
3582 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
3583 Param { name: "state", location: In::Query, kind: "string", required: false, values: &["open", "closed"] },
3584 Param { name: "label", location: In::Query, kind: "string", required: false, values: &[] },
3585 Param { name: "milestone", location: In::Query, kind: "integer", required: false, values: &[] },
3586 Param { name: "base", location: In::Query, kind: "string", required: false, values: &[] },
3587 ],
3588 body: &[],
3589 },
3590 Operation {
3591 id: "mark_pull_request_ready",
3592 method: "POST",
3593 path: "/repos/{owner}/{name}/pulls/{number}/ready",
3594 tag: "Pull requests",
3595 summary: "Mark a pull request ready",
3596 scope: Some("pull_requests:write"),
3597 params: &[
3598 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
3599 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
3600 Param { name: "number", location: In::Path, kind: "integer", required: true, values: &[] },
3601 ],
3602 body: &[
3603 Field { name: "summary", kind: "string", required: true, values: &[] },
3604 ],
3605 },
3606 Operation {
3607 id: "merge_pull_request",
3608 method: "POST",
3609 path: "/repos/{owner}/{name}/pulls/{number}/merge",
3610 tag: "Pull requests",
3611 summary: "Merge a pull request",
3612 scope: Some("pull_requests:write"),
3613 params: &[
3614 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
3615 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
3616 Param { name: "number", location: In::Path, kind: "integer", required: true, values: &[] },
3617 ],
3618 body: &[
3619 Field { name: "bypass_rules", kind: "boolean", required: false, values: &[] },
3620 Field { name: "ignore_checks", kind: "boolean", required: false, values: &[] },
3621 Field { name: "keep_issue_open", kind: "boolean", required: false, values: &[] },
3622 ],
3623 },
3624 Operation {
3625 id: "remove_requested_reviewers",
3626 method: "DELETE",
3627 path: "/repos/{owner}/{name}/pulls/{number}/requested_reviewers",
3628 tag: "Pull requests",
3629 summary: "Remove requested reviewers",
3630 scope: Some("pull_requests:write"),
3631 params: &[
3632 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
3633 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
3634 Param { name: "number", location: In::Path, kind: "integer", required: true, values: &[] },
3635 ],
3636 body: &[
3637 Field { name: "reviewers", kind: "array", required: false, values: &[] },
3638 Field { name: "team_reviewers", kind: "array", required: false, values: &[] },
3639 ],
3640 },
3641 Operation {
3642 id: "reopen_pull_request",
3643 method: "POST",
3644 path: "/repos/{owner}/{name}/pulls/{number}/reopen",
3645 tag: "Pull requests",
3646 summary: "Reopen a pull request",
3647 scope: Some("pull_requests:write"),
3648 params: &[
3649 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
3650 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
3651 Param { name: "number", location: In::Path, kind: "integer", required: true, values: &[] },
3652 ],
3653 body: &[],
3654 },
3655 Operation {
3656 id: "request_reviewers",
3657 method: "POST",
3658 path: "/repos/{owner}/{name}/pulls/{number}/requested_reviewers",
3659 tag: "Pull requests",
3660 summary: "Request reviewers",
3661 scope: Some("pull_requests:write"),
3662 params: &[
3663 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
3664 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
3665 Param { name: "number", location: In::Path, kind: "integer", required: true, values: &[] },
3666 ],
3667 body: &[
3668 Field { name: "reviewers", kind: "array", required: false, values: &[] },
3669 Field { name: "team_reviewers", kind: "array", required: false, values: &[] },
3670 ],
3671 },
3672 Operation {
3673 id: "review_pull_request",
3674 method: "POST",
3675 path: "/repos/{owner}/{name}/pulls/{number}/reviews",
3676 tag: "Pull requests",
3677 summary: "Review a pull request",
3678 scope: Some("pull_requests:write"),
3679 params: &[
3680 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
3681 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
3682 Param { name: "number", location: In::Path, kind: "integer", required: true, values: &[] },
3683 ],
3684 body: &[
3685 Field { name: "body", kind: "string", required: false, values: &[] },
3686 Field { name: "verdict", kind: "string", required: true, values: &["approve", "request_changes"] },
3687 ],
3688 },
3689 Operation {
3690 id: "update_pull_request",
3691 method: "PATCH",
3692 path: "/repos/{owner}/{name}/pulls/{number}",
3693 tag: "Pull requests",
3694 summary: "Update a pull request",
3695 scope: Some("pull_requests:write"),
3696 params: &[
3697 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
3698 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
3699 Param { name: "number", location: In::Path, kind: "integer", required: true, values: &[] },
3700 ],
3701 body: &[
3702 Field { name: "assignees", kind: "array", required: false, values: &[] },
3703 Field { name: "base", kind: "string", required: false, values: &[] },
3704 Field { name: "labels", kind: "array", required: false, values: &[] },
3705 Field { name: "milestone", kind: "integer", required: false, values: &[] },
3706 Field { name: "reviewers", kind: "array", required: false, values: &[] },
3707 Field { name: "state", kind: "string", required: false, values: &["open", "closed"] },
3708 ],
3709 },
3710 Operation {
3711 id: "create_release",
3712 method: "POST",
3713 path: "/repos/{owner}/{name}/releases",
3714 tag: "Releases",
3715 summary: "Create a release",
3716 scope: Some("repo:write"),
3717 params: &[
3718 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
3719 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
3720 ],
3721 body: &[
3722 Field { name: "body", kind: "string", required: false, values: &[] },
3723 Field { name: "draft", kind: "boolean", required: false, values: &[] },
3724 Field { name: "prerelease", kind: "boolean", required: false, values: &[] },
3725 Field { name: "release_name", kind: "string", required: false, values: &[] },
3726 Field { name: "tag_name", kind: "string", required: true, values: &[] },
3727 Field { name: "target", kind: "string", required: false, values: &[] },
3728 ],
3729 },
3730 Operation {
3731 id: "delete_release",
3732 method: "DELETE",
3733 path: "/repos/{owner}/{name}/releases/{id}",
3734 tag: "Releases",
3735 summary: "Delete a release",
3736 scope: Some("repo:write"),
3737 params: &[
3738 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
3739 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
3740 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
3741 ],
3742 body: &[],
3743 },
3744 Operation {
3745 id: "get_latest_release",
3746 method: "GET",
3747 path: "/repos/{owner}/{name}/releases/latest",
3748 tag: "Releases",
3749 summary: "Get the latest release",
3750 scope: Some("repo:read"),
3751 params: &[
3752 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
3753 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
3754 ],
3755 body: &[],
3756 },
3757 Operation {
3758 id: "get_release",
3759 method: "GET",
3760 path: "/repos/{owner}/{name}/releases/{id}",
3761 tag: "Releases",
3762 summary: "Get a release",
3763 scope: Some("repo:read"),
3764 params: &[
3765 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
3766 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
3767 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
3768 ],
3769 body: &[],
3770 },
3771 Operation {
3772 id: "get_release_by_tag",
3773 method: "GET",
3774 path: "/repos/{owner}/{name}/releases/tags/{tag}",
3775 tag: "Releases",
3776 summary: "Get a release by its tag",
3777 scope: Some("repo:read"),
3778 params: &[
3779 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
3780 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
3781 Param { name: "tag", location: In::Path, kind: "string", required: true, values: &[] },
3782 ],
3783 body: &[],
3784 },
3785 Operation {
3786 id: "list_releases",
3787 method: "GET",
3788 path: "/repos/{owner}/{name}/releases",
3789 tag: "Releases",
3790 summary: "List releases",
3791 scope: Some("repo:read"),
3792 params: &[
3793 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
3794 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
3795 ],
3796 body: &[],
3797 },
3798 Operation {
3799 id: "update_release",
3800 method: "PATCH",
3801 path: "/repos/{owner}/{name}/releases/{id}",
3802 tag: "Releases",
3803 summary: "Update a release",
3804 scope: Some("repo:write"),
3805 params: &[
3806 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
3807 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
3808 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
3809 ],
3810 body: &[
3811 Field { name: "body", kind: "string", required: false, values: &[] },
3812 Field { name: "draft", kind: "boolean", required: false, values: &[] },
3813 Field { name: "prerelease", kind: "boolean", required: false, values: &[] },
3814 Field { name: "release_name", kind: "string", required: false, values: &[] },
3815 ],
3816 },
3817 Operation {
3818 id: "archive_repo",
3819 method: "POST",
3820 path: "/repos/{owner}/{name}/archive",
3821 tag: "Repositories",
3822 summary: "Archive a repository",
3823 scope: Some("repo:admin"),
3824 params: &[
3825 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
3826 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
3827 ],
3828 body: &[],
3829 },
3830 Operation {
3831 id: "create_branch",
3832 method: "POST",
3833 path: "/repos/{owner}/{name}/branches",
3834 tag: "Repositories",
3835 summary: "Create a branch",
3836 scope: Some("repo:write"),
3837 params: &[
3838 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
3839 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
3840 ],
3841 body: &[
3842 Field { name: "from", kind: "string", required: false, values: &[] },
3843 Field { name: "name", kind: "string", required: true, values: &[] },
3844 ],
3845 },
3846 Operation {
3847 id: "create_repo",
3848 method: "POST",
3849 path: "/repos",
3850 tag: "Repositories",
3851 summary: "Create a repository",
3852 scope: Some("repo:write"),
3853 params: &[],
3854 body: &[
3855 Field { name: "description", kind: "string", required: false, values: &[] },
3856 Field { name: "import_url", kind: "string", required: false, values: &[] },
3857 Field { name: "name", kind: "string", required: true, values: &[] },
3858 Field { name: "private", kind: "boolean", required: false, values: &[] },
3859 Field { name: "workspace", kind: "string", required: false, values: &[] },
3860 ],
3861 },
3862 Operation {
3863 id: "delete_branch",
3864 method: "DELETE",
3865 path: "/repos/{owner}/{name}/branches/{branch}",
3866 tag: "Repositories",
3867 summary: "Delete a branch",
3868 scope: Some("repo:write"),
3869 params: &[
3870 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
3871 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
3872 Param { name: "branch", location: In::Path, kind: "string", required: true, values: &[] },
3873 ],
3874 body: &[
3875 Field { name: "head", kind: "string", required: false, values: &[] },
3876 ],
3877 },
3878 Operation {
3879 id: "delete_repo",
3880 method: "DELETE",
3881 path: "/repos/{owner}/{name}",
3882 tag: "Repositories",
3883 summary: "Delete a repository",
3884 scope: Some("repo:admin"),
3885 params: &[
3886 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
3887 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
3888 ],
3889 body: &[
3890 Field { name: "confirm", kind: "string", required: true, values: &[] },
3891 ],
3892 },
3893 Operation {
3894 id: "download_tarball_archive",
3895 method: "GET",
3896 path: "/repos/{owner}/{name}/tarball/{ref}",
3897 tag: "Repositories",
3898 summary: "Download a repository archive (tar)",
3899 scope: Some("code:read"),
3900 params: &[
3901 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
3902 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
3903 Param { name: "ref", location: In::Path, kind: "string", required: true, values: &[] },
3904 ],
3905 body: &[],
3906 },
3907 Operation {
3908 id: "download_zipball_archive",
3909 method: "GET",
3910 path: "/repos/{owner}/{name}/zipball/{ref}",
3911 tag: "Repositories",
3912 summary: "Download a repository archive (zip)",
3913 scope: Some("code:read"),
3914 params: &[
3915 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
3916 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
3917 Param { name: "ref", location: In::Path, kind: "string", required: true, values: &[] },
3918 ],
3919 body: &[],
3920 },
3921 Operation {
3922 id: "get_codeowners_errors",
3923 method: "GET",
3924 path: "/repos/{owner}/{name}/codeowners/errors",
3925 tag: "Repositories",
3926 summary: "List CODEOWNERS errors",
3927 scope: Some("repo:read"),
3928 params: &[
3929 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
3930 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
3931 Param { name: "ref", location: In::Query, kind: "string", required: false, values: &[] },
3932 ],
3933 body: &[],
3934 },
3935 Operation {
3936 id: "get_contents",
3937 method: "GET",
3938 path: "/repos/{owner}/{name}/contents",
3939 tag: "Repositories",
3940 summary: "Get repository contents",
3941 scope: Some("code:read"),
3942 params: &[
3943 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
3944 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
3945 Param { name: "path", location: In::Query, kind: "string", required: false, values: &[] },
3946 Param { name: "ref", location: In::Query, kind: "string", required: false, values: &[] },
3947 ],
3948 body: &[],
3949 },
3950 Operation {
3951 id: "get_repo",
3952 method: "GET",
3953 path: "/repos/{owner}/{name}",
3954 tag: "Repositories",
3955 summary: "Get a repository",
3956 scope: Some("repo:read"),
3957 params: &[
3958 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
3959 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
3960 ],
3961 body: &[],
3962 },
3963 Operation {
3964 id: "get_repo_settings",
3965 method: "GET",
3966 path: "/repos/{owner}/{name}/settings",
3967 tag: "Repositories",
3968 summary: "Get repository settings",
3969 scope: Some("repo:read"),
3970 params: &[
3971 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
3972 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
3973 ],
3974 body: &[],
3975 },
3976 Operation {
3977 id: "list_check_names",
3978 method: "GET",
3979 path: "/repos/{owner}/{name}/check-names",
3980 tag: "Repositories",
3981 summary: "List check names",
3982 scope: Some("repo:read"),
3983 params: &[
3984 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
3985 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
3986 ],
3987 body: &[],
3988 },
3989 Operation {
3990 id: "list_commits",
3991 method: "GET",
3992 path: "/repos/{owner}/{name}/commits",
3993 tag: "Repositories",
3994 summary: "List commits",
3995 scope: Some("code:read"),
3996 params: &[
3997 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
3998 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
3999 Param { name: "ref", location: In::Query, kind: "string", required: false, values: &[] },
4000 Param { name: "path", location: In::Query, kind: "string", required: false, values: &[] },
4001 Param { name: "limit", location: In::Query, kind: "integer", required: false, values: &[] },
4002 ],
4003 body: &[],
4004 },
4005 Operation {
4006 id: "list_deleted_repos",
4007 method: "GET",
4008 path: "/workspaces/{workspace}/repos/deleted",
4009 tag: "Repositories",
4010 summary: "List recently deleted repositories",
4011 scope: Some("repo:read"),
4012 params: &[
4013 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
4014 ],
4015 body: &[],
4016 },
4017 Operation {
4018 id: "list_events",
4019 method: "GET",
4020 path: "/repos/{owner}/{name}/events",
4021 tag: "Repositories",
4022 summary: "List repository events",
4023 scope: Some("repo:read"),
4024 params: &[
4025 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
4026 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
4027 Param { name: "before", location: In::Query, kind: "string", required: false, values: &[] },
4028 Param { name: "after", location: In::Query, kind: "string", required: false, values: &[] },
4029 Param { name: "types", location: In::Query, kind: "array", required: false, values: &[] },
4030 Param { name: "numbers", location: In::Query, kind: "array", required: false, values: &[] },
4031 Param { name: "since", location: In::Query, kind: "string", required: false, values: &[] },
4032 Param { name: "limit", location: In::Query, kind: "integer", required: false, values: &[] },
4033 Param { name: "wait", location: In::Query, kind: "integer", required: false, values: &[] },
4034 ],
4035 body: &[],
4036 },
4037 Operation {
4038 id: "list_repos",
4039 method: "GET",
4040 path: "/repos",
4041 tag: "Repositories",
4042 summary: "List repositories",
4043 scope: Some("repo:read"),
4044 params: &[
4045 Param { name: "q", location: In::Query, kind: "string", required: false, values: &[] },
4046 ],
4047 body: &[],
4048 },
4049 Operation {
4050 id: "purge_repo",
4051 method: "POST",
4052 path: "/repos/{owner}/{name}/purge",
4053 tag: "Repositories",
4054 summary: "Purge a deleted repository",
4055 scope: Some("repo:admin"),
4056 params: &[
4057 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
4058 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
4059 ],
4060 body: &[
4061 Field { name: "confirm", kind: "string", required: true, values: &[] },
4062 ],
4063 },
4064 Operation {
4065 id: "rename_branch",
4066 method: "POST",
4067 path: "/repos/{owner}/{name}/branches/{branch}/rename",
4068 tag: "Repositories",
4069 summary: "Rename a branch",
4070 scope: Some("repo:write"),
4071 params: &[
4072 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
4073 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
4074 Param { name: "branch", location: In::Path, kind: "string", required: true, values: &[] },
4075 ],
4076 body: &[
4077 Field { name: "new_name", kind: "string", required: true, values: &[] },
4078 ],
4079 },
4080 Operation {
4081 id: "rename_repo",
4082 method: "POST",
4083 path: "/repos/{owner}/{name}/rename",
4084 tag: "Repositories",
4085 summary: "Rename a repository",
4086 scope: Some("repo:admin"),
4087 params: &[
4088 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
4089 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
4090 ],
4091 body: &[
4092 Field { name: "name", kind: "string", required: true, values: &[] },
4093 ],
4094 },
4095 Operation {
4096 id: "restore_repo",
4097 method: "POST",
4098 path: "/repos/{owner}/{name}/restore",
4099 tag: "Repositories",
4100 summary: "Restore a deleted repository",
4101 scope: Some("repo:admin"),
4102 params: &[
4103 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
4104 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
4105 ],
4106 body: &[],
4107 },
4108 Operation {
4109 id: "set_repo_visibility",
4110 method: "POST",
4111 path: "/repos/{owner}/{name}/visibility",
4112 tag: "Repositories",
4113 summary: "Change a repository's visibility",
4114 scope: Some("repo:admin"),
4115 params: &[
4116 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
4117 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
4118 ],
4119 body: &[
4120 Field { name: "confirm", kind: "string", required: true, values: &[] },
4121 Field { name: "private", kind: "boolean", required: true, values: &[] },
4122 ],
4123 },
4124 Operation {
4125 id: "transfer_repo",
4126 method: "POST",
4127 path: "/repos/{owner}/{name}/transfer",
4128 tag: "Repositories",
4129 summary: "Transfer a repository",
4130 scope: Some("repo:admin"),
4131 params: &[
4132 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
4133 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
4134 ],
4135 body: &[
4136 Field { name: "to", kind: "string", required: true, values: &[] },
4137 ],
4138 },
4139 Operation {
4140 id: "unarchive_repo",
4141 method: "POST",
4142 path: "/repos/{owner}/{name}/unarchive",
4143 tag: "Repositories",
4144 summary: "Unarchive a repository",
4145 scope: Some("repo:admin"),
4146 params: &[
4147 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
4148 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
4149 ],
4150 body: &[],
4151 },
4152 Operation {
4153 id: "update_repo",
4154 method: "PATCH",
4155 path: "/repos/{owner}/{name}",
4156 tag: "Repositories",
4157 summary: "Update a repository",
4158 scope: Some("repo:write"),
4159 params: &[
4160 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
4161 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
4162 ],
4163 body: &[
4164 Field { name: "default_branch", kind: "string", required: false, values: &[] },
4165 Field { name: "description", kind: "string", required: false, values: &[] },
4166 Field { name: "private", kind: "boolean", required: false, values: &[] },
4167 Field { name: "protected", kind: "boolean", required: false, values: &[] },
4168 Field { name: "topics", kind: "array", required: false, values: &[] },
4169 Field { name: "website", kind: "string", required: false, values: &[] },
4170 ],
4171 },
4172 Operation {
4173 id: "update_repo_settings",
4174 method: "PATCH",
4175 path: "/repos/{owner}/{name}/settings",
4176 tag: "Repositories",
4177 summary: "Update repository settings",
4178 scope: Some("repo:write"),
4179 params: &[
4180 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
4181 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
4182 ],
4183 body: &[
4184 Field { name: "allow_ignoring_checks", kind: "boolean", required: false, values: &[] },
4185 Field { name: "auto_merge", kind: "boolean", required: false, values: &[] },
4186 Field { name: "count_agent_approvals", kind: "boolean", required: false, values: &[] },
4187 Field { name: "merge_queue", kind: "boolean", required: false, values: &[] },
4188 Field { name: "require_code_owner_review", kind: "boolean", required: false, values: &[] },
4189 Field { name: "require_up_to_date", kind: "boolean", required: false, values: &[] },
4190 Field { name: "required_approvals", kind: "integer", required: false, values: &[] },
4191 Field { name: "required_checks", kind: "array", required: false, values: &[] },
4192 ],
4193 },
4194 Operation {
4195 id: "get_languages",
4196 method: "GET",
4197 path: "/repos/{owner}/{name}/languages",
4198 tag: "Repository insights",
4199 summary: "Get a repository's languages",
4200 scope: Some("repo:read"),
4201 params: &[
4202 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
4203 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
4204 ],
4205 body: &[],
4206 },
4207 Operation {
4208 id: "get_license",
4209 method: "GET",
4210 path: "/repos/{owner}/{name}/license",
4211 tag: "Repository insights",
4212 summary: "Get a repository's license",
4213 scope: Some("repo:read"),
4214 params: &[
4215 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
4216 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
4217 ],
4218 body: &[],
4219 },
4220 Operation {
4221 id: "list_contributors",
4222 method: "GET",
4223 path: "/repos/{owner}/{name}/contributors",
4224 tag: "Repository insights",
4225 summary: "List a repository's contributors",
4226 scope: Some("repo:read"),
4227 params: &[
4228 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
4229 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
4230 ],
4231 body: &[],
4232 },
4233 Operation {
4234 id: "create_repo_ruleset",
4235 method: "POST",
4236 path: "/repos/{owner}/{name}/rulesets",
4237 tag: "Rules",
4238 summary: "Create a repository ruleset",
4239 scope: Some("repo:admin"),
4240 params: &[
4241 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
4242 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
4243 ],
4244 body: &[
4245 Field { name: "bypass_actors", kind: "array", required: false, values: &[] },
4246 Field { name: "conditions", kind: "object", required: false, values: &[] },
4247 Field { name: "enforcement", kind: "string", required: false, values: &["active", "evaluate", "disabled"] },
4248 Field { name: "rules", kind: "array", required: false, values: &[] },
4249 Field { name: "ruleset_name", kind: "string", required: false, values: &[] },
4250 Field { name: "target", kind: "string", required: false, values: &["branch", "tag"] },
4251 ],
4252 },
4253 Operation {
4254 id: "create_workspace_ruleset",
4255 method: "POST",
4256 path: "/workspaces/{workspace}/rulesets",
4257 tag: "Rules",
4258 summary: "Create a workspace ruleset",
4259 scope: Some("workspace:admin"),
4260 params: &[
4261 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
4262 ],
4263 body: &[
4264 Field { name: "bypass_actors", kind: "array", required: false, values: &[] },
4265 Field { name: "conditions", kind: "object", required: false, values: &[] },
4266 Field { name: "enforcement", kind: "string", required: false, values: &["active", "evaluate", "disabled"] },
4267 Field { name: "rules", kind: "array", required: false, values: &[] },
4268 Field { name: "ruleset_name", kind: "string", required: false, values: &[] },
4269 Field { name: "target", kind: "string", required: false, values: &["branch", "tag"] },
4270 ],
4271 },
4272 Operation {
4273 id: "delete_repo_ruleset",
4274 method: "DELETE",
4275 path: "/repos/{owner}/{name}/rulesets/{id}",
4276 tag: "Rules",
4277 summary: "Delete a repository ruleset",
4278 scope: Some("repo:admin"),
4279 params: &[
4280 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
4281 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
4282 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
4283 ],
4284 body: &[],
4285 },
4286 Operation {
4287 id: "delete_workspace_ruleset",
4288 method: "DELETE",
4289 path: "/workspaces/{workspace}/rulesets/{id}",
4290 tag: "Rules",
4291 summary: "Delete a workspace ruleset",
4292 scope: Some("workspace:admin"),
4293 params: &[
4294 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
4295 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
4296 ],
4297 body: &[],
4298 },
4299 Operation {
4300 id: "get_branch_rules",
4301 method: "GET",
4302 path: "/repos/{owner}/{name}/rules/branches/{branch}",
4303 tag: "Rules",
4304 summary: "Get the rules for a branch",
4305 scope: Some("repo:read"),
4306 params: &[
4307 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
4308 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
4309 Param { name: "branch", location: In::Path, kind: "string", required: true, values: &[] },
4310 Param { name: "target", location: In::Query, kind: "string", required: false, values: &["branch", "tag"] },
4311 ],
4312 body: &[],
4313 },
4314 Operation {
4315 id: "get_repo_ruleset",
4316 method: "GET",
4317 path: "/repos/{owner}/{name}/rulesets/{id}",
4318 tag: "Rules",
4319 summary: "Get a repository ruleset",
4320 scope: Some("repo:read"),
4321 params: &[
4322 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
4323 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
4324 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
4325 ],
4326 body: &[],
4327 },
4328 Operation {
4329 id: "get_workspace_ruleset",
4330 method: "GET",
4331 path: "/workspaces/{workspace}/rulesets/{id}",
4332 tag: "Rules",
4333 summary: "Get a workspace ruleset",
4334 scope: Some("workspace:read"),
4335 params: &[
4336 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
4337 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
4338 ],
4339 body: &[],
4340 },
4341 Operation {
4342 id: "list_repo_rulesets",
4343 method: "GET",
4344 path: "/repos/{owner}/{name}/rulesets",
4345 tag: "Rules",
4346 summary: "List a repository's rulesets",
4347 scope: Some("repo:read"),
4348 params: &[
4349 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
4350 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
4351 Param { name: "include_parents", location: In::Query, kind: "boolean", required: false, values: &[] },
4352 ],
4353 body: &[],
4354 },
4355 Operation {
4356 id: "list_rule_evaluations",
4357 method: "GET",
4358 path: "/repos/{owner}/{name}/rules/evaluations",
4359 tag: "Rules",
4360 summary: "List a repository's rule evaluations",
4361 scope: Some("repo:read"),
4362 params: &[
4363 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
4364 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
4365 Param { name: "ruleset_id", location: In::Query, kind: "string", required: false, values: &[] },
4366 Param { name: "verdict", location: In::Query, kind: "string", required: false, values: &["pass", "fail", "bypass"] },
4367 Param { name: "problems_only", location: In::Query, kind: "boolean", required: false, values: &[] },
4368 Param { name: "before", location: In::Query, kind: "string", required: false, values: &[] },
4369 Param { name: "limit", location: In::Query, kind: "integer", required: false, values: &[] },
4370 ],
4371 body: &[],
4372 },
4373 Operation {
4374 id: "list_workspace_rule_evaluations",
4375 method: "GET",
4376 path: "/workspaces/{workspace}/rules/evaluations",
4377 tag: "Rules",
4378 summary: "List a workspace's rule evaluations",
4379 scope: Some("workspace:read"),
4380 params: &[
4381 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
4382 Param { name: "ruleset_id", location: In::Query, kind: "string", required: false, values: &[] },
4383 Param { name: "verdict", location: In::Query, kind: "string", required: false, values: &["pass", "fail", "bypass"] },
4384 Param { name: "problems_only", location: In::Query, kind: "boolean", required: false, values: &[] },
4385 Param { name: "before", location: In::Query, kind: "string", required: false, values: &[] },
4386 Param { name: "limit", location: In::Query, kind: "integer", required: false, values: &[] },
4387 ],
4388 body: &[],
4389 },
4390 Operation {
4391 id: "list_workspace_rulesets",
4392 method: "GET",
4393 path: "/workspaces/{workspace}/rulesets",
4394 tag: "Rules",
4395 summary: "List a workspace's rulesets",
4396 scope: Some("workspace:read"),
4397 params: &[
4398 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
4399 ],
4400 body: &[],
4401 },
4402 Operation {
4403 id: "update_repo_ruleset",
4404 method: "PUT",
4405 path: "/repos/{owner}/{name}/rulesets/{id}",
4406 tag: "Rules",
4407 summary: "Update a repository ruleset",
4408 scope: Some("repo:admin"),
4409 params: &[
4410 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
4411 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
4412 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
4413 ],
4414 body: &[
4415 Field { name: "bypass_actors", kind: "array", required: false, values: &[] },
4416 Field { name: "conditions", kind: "object", required: false, values: &[] },
4417 Field { name: "enforcement", kind: "string", required: false, values: &["active", "evaluate", "disabled"] },
4418 Field { name: "rules", kind: "array", required: false, values: &[] },
4419 Field { name: "ruleset_name", kind: "string", required: false, values: &[] },
4420 Field { name: "target", kind: "string", required: false, values: &["branch", "tag"] },
4421 ],
4422 },
4423 Operation {
4424 id: "update_workspace_ruleset",
4425 method: "PUT",
4426 path: "/workspaces/{workspace}/rulesets/{id}",
4427 tag: "Rules",
4428 summary: "Update a workspace ruleset",
4429 scope: Some("workspace:admin"),
4430 params: &[
4431 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
4432 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
4433 ],
4434 body: &[
4435 Field { name: "bypass_actors", kind: "array", required: false, values: &[] },
4436 Field { name: "conditions", kind: "object", required: false, values: &[] },
4437 Field { name: "enforcement", kind: "string", required: false, values: &["active", "evaluate", "disabled"] },
4438 Field { name: "rules", kind: "array", required: false, values: &[] },
4439 Field { name: "ruleset_name", kind: "string", required: false, values: &[] },
4440 Field { name: "target", kind: "string", required: false, values: &["branch", "tag"] },
4441 ],
4442 },
4443 Operation {
4444 id: "approve_workflow_run",
4445 method: "POST",
4446 path: "/repos/{owner}/{name}/actions/runs/{id}/approve",
4447 tag: "Run protection",
4448 summary: "Approve a workflow run",
4449 scope: Some("workflows:write"),
4450 params: &[
4451 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
4452 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
4453 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
4454 ],
4455 body: &[],
4456 },
4457 Operation {
4458 id: "create_repository_dispatch",
4459 method: "POST",
4460 path: "/repos/{owner}/{name}/dispatches",
4461 tag: "Run protection",
4462 summary: "Create a repository dispatch event",
4463 scope: Some("code:write"),
4464 params: &[
4465 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
4466 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
4467 ],
4468 body: &[
4469 Field { name: "client_payload", kind: "object", required: false, values: &[] },
4470 Field { name: "event_type", kind: "string", required: true, values: &[] },
4471 ],
4472 },
4473 Operation {
4474 id: "create_workspace_managed_workflow",
4475 method: "POST",
4476 path: "/workspaces/{workspace}/actions/managed-workflows",
4477 tag: "Run protection",
4478 summary: "Add a workflow a workspace manages",
4479 scope: Some("workspace:admin"),
4480 params: &[
4481 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
4482 ],
4483 body: &[
4484 Field { name: "mode", kind: "string", required: true, values: &["required", "default"] },
4485 Field { name: "name", kind: "string", required: true, values: &[] },
4486 Field { name: "repositories", kind: "array", required: false, values: &[] },
4487 Field { name: "source", kind: "string", required: true, values: &[] },
4488 Field { name: "visibility", kind: "string", required: false, values: &["all", "public", "private"] },
4489 ],
4490 },
4491 Operation {
4492 id: "delete_environment",
4493 method: "DELETE",
4494 path: "/repos/{owner}/{name}/environments/{environment}",
4495 tag: "Run protection",
4496 summary: "Delete an environment's protection rules",
4497 scope: Some("repo:admin"),
4498 params: &[
4499 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
4500 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
4501 Param { name: "environment", location: In::Path, kind: "string", required: true, values: &[] },
4502 ],
4503 body: &[],
4504 },
4505 Operation {
4506 id: "delete_workspace_managed_workflow",
4507 method: "DELETE",
4508 path: "/workspaces/{workspace}/actions/managed-workflows/{workflow}",
4509 tag: "Run protection",
4510 summary: "Remove a workflow a workspace manages",
4511 scope: Some("workspace:admin"),
4512 params: &[
4513 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
4514 Param { name: "workflow", location: In::Path, kind: "string", required: true, values: &[] },
4515 ],
4516 body: &[],
4517 },
4518 Operation {
4519 id: "get_actions_access",
4520 method: "GET",
4521 path: "/repos/{owner}/{name}/actions/permissions/access",
4522 tag: "Run protection",
4523 summary: "Get who may use a repository's actions and workflows",
4524 scope: Some("repo:read"),
4525 params: &[
4526 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
4527 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
4528 ],
4529 body: &[],
4530 },
4531 Operation {
4532 id: "get_fork_pr_approval",
4533 method: "GET",
4534 path: "/repos/{owner}/{name}/actions/permissions/fork-pr-contributor-approval",
4535 tag: "Run protection",
4536 summary: "Get the approval policy for outside pull requests",
4537 scope: Some("repo:read"),
4538 params: &[
4539 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
4540 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
4541 ],
4542 body: &[],
4543 },
4544 Operation {
4545 id: "get_pending_deployments",
4546 method: "GET",
4547 path: "/repos/{owner}/{name}/actions/runs/{id}/pending_deployments",
4548 tag: "Run protection",
4549 summary: "Get a run's pending deployments",
4550 scope: Some("workflows:read"),
4551 params: &[
4552 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
4553 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
4554 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
4555 ],
4556 body: &[],
4557 },
4558 Operation {
4559 id: "get_workflow_permissions",
4560 method: "GET",
4561 path: "/repos/{owner}/{name}/actions/permissions/workflow",
4562 tag: "Run protection",
4563 summary: "Get the default workflow permissions",
4564 scope: Some("repo:read"),
4565 params: &[
4566 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
4567 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
4568 ],
4569 body: &[],
4570 },
4571 Operation {
4572 id: "get_workspace_workflow_permissions",
4573 method: "GET",
4574 path: "/workspaces/{workspace}/actions/permissions/workflow",
4575 tag: "Run protection",
4576 summary: "Get a workspace's default workflow permissions",
4577 scope: Some("workspace:read"),
4578 params: &[
4579 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
4580 ],
4581 body: &[],
4582 },
4583 Operation {
4584 id: "list_workspace_managed_workflows",
4585 method: "GET",
4586 path: "/workspaces/{workspace}/actions/managed-workflows",
4587 tag: "Run protection",
4588 summary: "List the workflows a workspace manages",
4589 scope: Some("workspace:read"),
4590 params: &[
4591 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
4592 ],
4593 body: &[],
4594 },
4595 Operation {
4596 id: "review_pending_deployments",
4597 method: "POST",
4598 path: "/repos/{owner}/{name}/actions/runs/{id}/pending_deployments",
4599 tag: "Run protection",
4600 summary: "Review a run's pending deployments",
4601 scope: Some("workflows:write"),
4602 params: &[
4603 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
4604 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
4605 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
4606 ],
4607 body: &[
4608 Field { name: "comment", kind: "string", required: false, values: &[] },
4609 Field { name: "environment_names", kind: "array", required: false, values: &[] },
4610 Field { name: "state", kind: "string", required: true, values: &["approved", "rejected"] },
4611 ],
4612 },
4613 Operation {
4614 id: "set_actions_access",
4615 method: "PUT",
4616 path: "/repos/{owner}/{name}/actions/permissions/access",
4617 tag: "Run protection",
4618 summary: "Set who may use a repository's actions and workflows",
4619 scope: Some("repo:admin"),
4620 params: &[
4621 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
4622 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
4623 ],
4624 body: &[
4625 Field { name: "access_level", kind: "string", required: true, values: &["none", "organization", "user"] },
4626 ],
4627 },
4628 Operation {
4629 id: "set_fork_pr_approval",
4630 method: "PUT",
4631 path: "/repos/{owner}/{name}/actions/permissions/fork-pr-contributor-approval",
4632 tag: "Run protection",
4633 summary: "Set the approval policy for outside pull requests",
4634 scope: Some("repo:admin"),
4635 params: &[
4636 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
4637 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
4638 ],
4639 body: &[
4640 Field { name: "approval_policy", kind: "string", required: true, values: &["first_time_contributors", "outside_contributors", "all_external_contributors"] },
4641 ],
4642 },
4643 Operation {
4644 id: "set_workflow_permissions",
4645 method: "PUT",
4646 path: "/repos/{owner}/{name}/actions/permissions/workflow",
4647 tag: "Run protection",
4648 summary: "Set the default workflow permissions",
4649 scope: Some("repo:admin"),
4650 params: &[
4651 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
4652 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
4653 ],
4654 body: &[
4655 Field { name: "can_approve_pull_request_reviews", kind: "boolean", required: false, values: &[] },
4656 Field { name: "default_workflow_permissions", kind: "string", required: false, values: &["read", "write", "inherit"] },
4657 ],
4658 },
4659 Operation {
4660 id: "set_workspace_workflow_permissions",
4661 method: "PUT",
4662 path: "/workspaces/{workspace}/actions/permissions/workflow",
4663 tag: "Run protection",
4664 summary: "Set a workspace's default workflow permissions",
4665 scope: Some("workspace:admin"),
4666 params: &[
4667 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
4668 ],
4669 body: &[
4670 Field { name: "can_approve_pull_request_reviews", kind: "boolean", required: false, values: &[] },
4671 Field { name: "default_workflow_permissions", kind: "string", required: false, values: &["read", "write"] },
4672 Field { name: "max_workflow_permissions", kind: "string", required: false, values: &["read", "write"] },
4673 ],
4674 },
4675 Operation {
4676 id: "update_environment",
4677 method: "PUT",
4678 path: "/repos/{owner}/{name}/environments/{environment}",
4679 tag: "Run protection",
4680 summary: "Create or update an environment's protection rules",
4681 scope: Some("repo:admin"),
4682 params: &[
4683 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
4684 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
4685 Param { name: "environment", location: In::Path, kind: "string", required: true, values: &[] },
4686 ],
4687 body: &[
4688 Field { name: "branch_policies", kind: "array", required: false, values: &[] },
4689 Field { name: "can_admins_bypass", kind: "boolean", required: false, values: &[] },
4690 Field { name: "deployment_branch_policy", kind: "object", required: false, values: &[] },
4691 Field { name: "prevent_self_review", kind: "boolean", required: false, values: &[] },
4692 Field { name: "reviewers", kind: "array", required: false, values: &[] },
4693 Field { name: "wait_timer", kind: "integer", required: false, values: &[] },
4694 ],
4695 },
4696 Operation {
4697 id: "update_workspace_managed_workflow",
4698 method: "PATCH",
4699 path: "/workspaces/{workspace}/actions/managed-workflows/{workflow}",
4700 tag: "Run protection",
4701 summary: "Update a workflow a workspace manages",
4702 scope: Some("workspace:admin"),
4703 params: &[
4704 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
4705 Param { name: "workflow", location: In::Path, kind: "string", required: true, values: &[] },
4706 ],
4707 body: &[
4708 Field { name: "mode", kind: "string", required: false, values: &["required", "default"] },
4709 Field { name: "refresh", kind: "boolean", required: false, values: &[] },
4710 Field { name: "repositories", kind: "array", required: false, values: &[] },
4711 Field { name: "source", kind: "string", required: false, values: &[] },
4712 Field { name: "visibility", kind: "string", required: false, values: &["all", "public", "private"] },
4713 ],
4714 },
4715 Operation {
4716 id: "create_runner_group",
4717 method: "POST",
4718 path: "/workspaces/{workspace}/actions/runner-groups",
4719 tag: "Runners",
4720 summary: "Create a runner group",
4721 scope: Some("runners:admin"),
4722 params: &[
4723 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
4724 ],
4725 body: &[
4726 Field { name: "id", kind: "string", required: false, values: &[] },
4727 Field { name: "name", kind: "string", required: true, values: &[] },
4728 Field { name: "repositories", kind: "array", required: false, values: &[] },
4729 ],
4730 },
4731 Operation {
4732 id: "create_runner_registration_token",
4733 method: "POST",
4734 path: "/repos/{owner}/{name}/actions/runners/registration-token",
4735 tag: "Runners",
4736 summary: "Create a runner registration token",
4737 scope: Some("runners:admin"),
4738 params: &[
4739 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
4740 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
4741 ],
4742 body: &[
4743 Field { name: "group", kind: "string", required: false, values: &[] },
4744 Field { name: "workspace", kind: "string", required: false, values: &[] },
4745 ],
4746 },
4747 Operation {
4748 id: "create_runner_registration_token_for_workspace",
4749 method: "POST",
4750 path: "/workspaces/{workspace}/actions/runners/registration-token",
4751 tag: "Runners",
4752 summary: "Create a runner registration token for a workspace",
4753 scope: Some("runners:admin"),
4754 params: &[
4755 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
4756 ],
4757 body: &[
4758 Field { name: "group", kind: "string", required: false, values: &[] },
4759 ],
4760 },
4761 Operation {
4762 id: "delete_runner_group",
4763 method: "DELETE",
4764 path: "/workspaces/{workspace}/actions/runner-groups/{id}",
4765 tag: "Runners",
4766 summary: "Delete a runner group",
4767 scope: Some("runners:admin"),
4768 params: &[
4769 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
4770 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
4771 ],
4772 body: &[],
4773 },
4774 Operation {
4775 id: "get_runner_settings",
4776 method: "GET",
4777 path: "/repos/{owner}/{name}/actions/runner-settings",
4778 tag: "Runners",
4779 summary: "Get runner settings",
4780 scope: Some("runners:read"),
4781 params: &[
4782 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
4783 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
4784 ],
4785 body: &[],
4786 },
4787 Operation {
4788 id: "get_runner_settings_for_workspace",
4789 method: "GET",
4790 path: "/workspaces/{workspace}/actions/runner-settings",
4791 tag: "Runners",
4792 summary: "Get runner settings for a workspace",
4793 scope: Some("runners:read"),
4794 params: &[
4795 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
4796 ],
4797 body: &[],
4798 },
4799 Operation {
4800 id: "list_runner_groups",
4801 method: "GET",
4802 path: "/workspaces/{workspace}/actions/runner-groups",
4803 tag: "Runners",
4804 summary: "List runner groups",
4805 scope: Some("runners:read"),
4806 params: &[
4807 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
4808 ],
4809 body: &[],
4810 },
4811 Operation {
4812 id: "list_runners",
4813 method: "GET",
4814 path: "/repos/{owner}/{name}/actions/runners",
4815 tag: "Runners",
4816 summary: "List self-hosted runners",
4817 scope: Some("runners:read"),
4818 params: &[
4819 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
4820 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
4821 ],
4822 body: &[],
4823 },
4824 Operation {
4825 id: "list_runners_for_workspace",
4826 method: "GET",
4827 path: "/workspaces/{workspace}/actions/runners",
4828 tag: "Runners",
4829 summary: "List self-hosted runners for a workspace",
4830 scope: Some("runners:read"),
4831 params: &[
4832 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
4833 ],
4834 body: &[],
4835 },
4836 Operation {
4837 id: "remove_runner",
4838 method: "DELETE",
4839 path: "/repos/{owner}/{name}/actions/runners/{id}",
4840 tag: "Runners",
4841 summary: "Remove a self-hosted runner",
4842 scope: Some("runners:admin"),
4843 params: &[
4844 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
4845 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
4846 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
4847 ],
4848 body: &[
4849 Field { name: "workspace", kind: "string", required: false, values: &[] },
4850 ],
4851 },
4852 Operation {
4853 id: "remove_runner_for_workspace",
4854 method: "DELETE",
4855 path: "/workspaces/{workspace}/actions/runners/{id}",
4856 tag: "Runners",
4857 summary: "Remove a self-hosted runner for a workspace",
4858 scope: Some("runners:admin"),
4859 params: &[
4860 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
4861 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
4862 ],
4863 body: &[],
4864 },
4865 Operation {
4866 id: "update_runner_group",
4867 method: "PATCH",
4868 path: "/workspaces/{workspace}/actions/runner-groups/{id}",
4869 tag: "Runners",
4870 summary: "Change a runner group",
4871 scope: Some("runners:admin"),
4872 params: &[
4873 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
4874 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
4875 ],
4876 body: &[
4877 Field { name: "name", kind: "string", required: false, values: &[] },
4878 Field { name: "repositories", kind: "array", required: false, values: &[] },
4879 ],
4880 },
4881 Operation {
4882 id: "update_runner_settings",
4883 method: "PATCH",
4884 path: "/repos/{owner}/{name}/actions/runner-settings",
4885 tag: "Runners",
4886 summary: "Change runner settings",
4887 scope: Some("runners:admin"),
4888 params: &[
4889 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
4890 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
4891 ],
4892 body: &[
4893 Field { name: "agent_labels", kind: "array", required: false, values: &[] },
4894 Field { name: "agents_on_self_hosted", kind: "boolean", required: false, values: &[] },
4895 Field { name: "fork_pull_requests", kind: "boolean", required: false, values: &[] },
4896 Field { name: "inherit", kind: "boolean", required: false, values: &[] },
4897 Field { name: "workspace", kind: "string", required: false, values: &[] },
4898 ],
4899 },
4900 Operation {
4901 id: "update_runner_settings_for_workspace",
4902 method: "PATCH",
4903 path: "/workspaces/{workspace}/actions/runner-settings",
4904 tag: "Runners",
4905 summary: "Change runner settings for a workspace",
4906 scope: Some("runners:admin"),
4907 params: &[
4908 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
4909 ],
4910 body: &[
4911 Field { name: "agent_labels", kind: "array", required: false, values: &[] },
4912 Field { name: "agents_on_self_hosted", kind: "boolean", required: false, values: &[] },
4913 Field { name: "fork_pull_requests", kind: "boolean", required: false, values: &[] },
4914 Field { name: "inherit", kind: "boolean", required: false, values: &[] },
4915 ],
4916 },
4917 Operation {
4918 id: "search",
4919 method: "GET",
4920 path: "/search",
4921 tag: "Search",
4922 summary: "Search g1t",
4923 scope: Some("repo:read"),
4924 params: &[
4925 Param { name: "q", location: In::Query, kind: "string", required: true, values: &[] },
4926 Param { name: "type", location: In::Query, kind: "string", required: false, values: &["repositories", "code", "issues", "pulls", "people"] },
4927 Param { name: "page", location: In::Query, kind: "integer", required: false, values: &[] },
4928 Param { name: "per_page", location: In::Query, kind: "integer", required: false, values: &[] },
4929 ],
4930 body: &[],
4931 },
4932 Operation {
4933 id: "bypass_push_protection",
4934 method: "POST",
4935 path: "/repos/{owner}/{name}/secret-scanning/alerts/{id}/bypass",
4936 tag: "Secret scanning",
4937 summary: "Bypass push protection",
4938 scope: Some("security:write"),
4939 params: &[
4940 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
4941 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
4942 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
4943 ],
4944 body: &[
4945 Field { name: "comment", kind: "string", required: false, values: &[] },
4946 Field { name: "reason", kind: "string", required: true, values: &["false_positive", "used_in_tests", "will_fix_later"] },
4947 ],
4948 },
4949 Operation {
4950 id: "check_secret_validity",
4951 method: "POST",
4952 path: "/repos/{owner}/{name}/secret-scanning/alerts/{id}/validity",
4953 tag: "Secret scanning",
4954 summary: "Check whether a secret still works",
4955 scope: Some("security:write"),
4956 params: &[
4957 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
4958 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
4959 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
4960 ],
4961 body: &[],
4962 },
4963 Operation {
4964 id: "create_custom_pattern",
4965 method: "POST",
4966 path: "/repos/{owner}/{name}/secret-scanning/custom-patterns",
4967 tag: "Secret scanning",
4968 summary: "Create a custom pattern",
4969 scope: Some("security:write"),
4970 params: &[
4971 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
4972 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
4973 ],
4974 body: &[
4975 Field { name: "after", kind: "string", required: false, values: &[] },
4976 Field { name: "before", kind: "string", required: false, values: &[] },
4977 Field { name: "pattern", kind: "string", required: true, values: &[] },
4978 Field { name: "pattern_name", kind: "string", required: true, values: &[] },
4979 Field { name: "publish", kind: "boolean", required: false, values: &[] },
4980 Field { name: "test_strings", kind: "array", required: false, values: &[] },
4981 Field { name: "workspace", kind: "string", required: false, values: &[] },
4982 ],
4983 },
4984 Operation {
4985 id: "create_custom_pattern_for_workspace",
4986 method: "POST",
4987 path: "/workspaces/{workspace}/secret-scanning/custom-patterns",
4988 tag: "Secret scanning",
4989 summary: "Create a custom pattern for a workspace",
4990 scope: Some("security:write"),
4991 params: &[
4992 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
4993 ],
4994 body: &[
4995 Field { name: "after", kind: "string", required: false, values: &[] },
4996 Field { name: "before", kind: "string", required: false, values: &[] },
4997 Field { name: "pattern", kind: "string", required: true, values: &[] },
4998 Field { name: "pattern_name", kind: "string", required: true, values: &[] },
4999 Field { name: "publish", kind: "boolean", required: false, values: &[] },
5000 Field { name: "test_strings", kind: "array", required: false, values: &[] },
5001 ],
5002 },
5003 Operation {
5004 id: "delete_custom_pattern",
5005 method: "DELETE",
5006 path: "/repos/{owner}/{name}/secret-scanning/custom-patterns/{id}",
5007 tag: "Secret scanning",
5008 summary: "Delete a custom pattern",
5009 scope: Some("security:write"),
5010 params: &[
5011 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
5012 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
5013 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
5014 ],
5015 body: &[
5016 Field { name: "workspace", kind: "string", required: false, values: &[] },
5017 ],
5018 },
5019 Operation {
5020 id: "delete_custom_pattern_for_workspace",
5021 method: "DELETE",
5022 path: "/workspaces/{workspace}/secret-scanning/custom-patterns/{id}",
5023 tag: "Secret scanning",
5024 summary: "Delete a custom pattern for a workspace",
5025 scope: Some("security:write"),
5026 params: &[
5027 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
5028 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
5029 ],
5030 body: &[],
5031 },
5032 Operation {
5033 id: "dry_run_custom_pattern",
5034 method: "POST",
5035 path: "/repos/{owner}/{name}/secret-scanning/custom-patterns/dry-run",
5036 tag: "Secret scanning",
5037 summary: "Dry-run a custom pattern",
5038 scope: Some("security:write"),
5039 params: &[
5040 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
5041 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
5042 ],
5043 body: &[
5044 Field { name: "after", kind: "string", required: false, values: &[] },
5045 Field { name: "before", kind: "string", required: false, values: &[] },
5046 Field { name: "pattern", kind: "string", required: true, values: &[] },
5047 Field { name: "pattern_name", kind: "string", required: false, values: &[] },
5048 Field { name: "repos", kind: "array", required: false, values: &[] },
5049 Field { name: "workspace", kind: "string", required: false, values: &[] },
5050 ],
5051 },
5052 Operation {
5053 id: "dry_run_custom_pattern_for_workspace",
5054 method: "POST",
5055 path: "/workspaces/{workspace}/secret-scanning/custom-patterns/dry-run",
5056 tag: "Secret scanning",
5057 summary: "Dry-run a custom pattern for a workspace",
5058 scope: Some("security:write"),
5059 params: &[
5060 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
5061 ],
5062 body: &[
5063 Field { name: "after", kind: "string", required: false, values: &[] },
5064 Field { name: "before", kind: "string", required: false, values: &[] },
5065 Field { name: "pattern", kind: "string", required: true, values: &[] },
5066 Field { name: "pattern_name", kind: "string", required: false, values: &[] },
5067 Field { name: "repos", kind: "array", required: false, values: &[] },
5068 ],
5069 },
5070 Operation {
5071 id: "get_secret_scanning_alert",
5072 method: "GET",
5073 path: "/repos/{owner}/{name}/secret-scanning/alerts/{id}",
5074 tag: "Secret scanning",
5075 summary: "Get a secret scanning alert",
5076 scope: Some("security:read"),
5077 params: &[
5078 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
5079 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
5080 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
5081 ],
5082 body: &[],
5083 },
5084 Operation {
5085 id: "list_bypass_requests",
5086 method: "GET",
5087 path: "/workspaces/{workspace}/secret-scanning/bypass-requests",
5088 tag: "Secret scanning",
5089 summary: "List push protection bypass requests",
5090 scope: Some("security:read"),
5091 params: &[
5092 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
5093 Param { name: "state", location: In::Query, kind: "string", required: false, values: &["pending", "approved", "denied", "cancelled"] },
5094 Param { name: "repo", location: In::Query, kind: "string", required: false, values: &[] },
5095 ],
5096 body: &[],
5097 },
5098 Operation {
5099 id: "list_custom_patterns",
5100 method: "GET",
5101 path: "/repos/{owner}/{name}/secret-scanning/custom-patterns",
5102 tag: "Secret scanning",
5103 summary: "List custom patterns",
5104 scope: Some("security:read"),
5105 params: &[
5106 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
5107 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
5108 ],
5109 body: &[],
5110 },
5111 Operation {
5112 id: "list_custom_patterns_for_workspace",
5113 method: "GET",
5114 path: "/workspaces/{workspace}/secret-scanning/custom-patterns",
5115 tag: "Secret scanning",
5116 summary: "List custom patterns for a workspace",
5117 scope: Some("security:read"),
5118 params: &[
5119 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
5120 ],
5121 body: &[],
5122 },
5123 Operation {
5124 id: "list_secret_scanning_alerts",
5125 method: "GET",
5126 path: "/repos/{owner}/{name}/secret-scanning/alerts",
5127 tag: "Secret scanning",
5128 summary: "List secret scanning alerts",
5129 scope: Some("security:read"),
5130 params: &[
5131 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
5132 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
5133 Param { name: "state", location: In::Query, kind: "string", required: false, values: &["open", "dismissed", "fixed"] },
5134 Param { name: "secret_type", location: In::Query, kind: "string", required: false, values: &[] },
5135 Param { name: "validity", location: In::Query, kind: "string", required: false, values: &["active", "inactive", "unknown", "unsupported"] },
5136 Param { name: "bypassed", location: In::Query, kind: "boolean", required: false, values: &[] },
5137 ],
5138 body: &[],
5139 },
5140 Operation {
5141 id: "list_secret_scanning_alerts_for_workspace",
5142 method: "GET",
5143 path: "/workspaces/{workspace}/secret-scanning/alerts",
5144 tag: "Secret scanning",
5145 summary: "List secret scanning alerts for a workspace",
5146 scope: Some("security:read"),
5147 params: &[
5148 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
5149 Param { name: "state", location: In::Query, kind: "string", required: false, values: &["open", "dismissed", "fixed"] },
5150 Param { name: "secret_type", location: In::Query, kind: "string", required: false, values: &[] },
5151 Param { name: "validity", location: In::Query, kind: "string", required: false, values: &["active", "inactive", "unknown", "unsupported"] },
5152 Param { name: "bypassed", location: In::Query, kind: "boolean", required: false, values: &[] },
5153 ],
5154 body: &[],
5155 },
5156 Operation {
5157 id: "list_secret_scanning_locations",
5158 method: "GET",
5159 path: "/repos/{owner}/{name}/secret-scanning/alerts/{id}/locations",
5160 tag: "Secret scanning",
5161 summary: "List where a secret was found",
5162 scope: Some("security:read"),
5163 params: &[
5164 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
5165 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
5166 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
5167 ],
5168 body: &[],
5169 },
5170 Operation {
5171 id: "review_bypass_request",
5172 method: "PATCH",
5173 path: "/workspaces/{workspace}/secret-scanning/bypass-requests/{id}",
5174 tag: "Secret scanning",
5175 summary: "Review a bypass request",
5176 scope: Some("security:write"),
5177 params: &[
5178 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
5179 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
5180 ],
5181 body: &[
5182 Field { name: "comment", kind: "string", required: false, values: &[] },
5183 Field { name: "decision", kind: "string", required: true, values: &["approve", "deny", "cancel"] },
5184 ],
5185 },
5186 Operation {
5187 id: "update_custom_pattern",
5188 method: "PATCH",
5189 path: "/repos/{owner}/{name}/secret-scanning/custom-patterns/{id}",
5190 tag: "Secret scanning",
5191 summary: "Update a custom pattern",
5192 scope: Some("security:write"),
5193 params: &[
5194 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
5195 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
5196 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
5197 ],
5198 body: &[
5199 Field { name: "after", kind: "string", required: false, values: &[] },
5200 Field { name: "before", kind: "string", required: false, values: &[] },
5201 Field { name: "pattern", kind: "string", required: true, values: &[] },
5202 Field { name: "pattern_name", kind: "string", required: true, values: &[] },
5203 Field { name: "publish", kind: "boolean", required: false, values: &[] },
5204 Field { name: "test_strings", kind: "array", required: false, values: &[] },
5205 Field { name: "workspace", kind: "string", required: false, values: &[] },
5206 ],
5207 },
5208 Operation {
5209 id: "update_custom_pattern_for_workspace",
5210 method: "PATCH",
5211 path: "/workspaces/{workspace}/secret-scanning/custom-patterns/{id}",
5212 tag: "Secret scanning",
5213 summary: "Update a custom pattern for a workspace",
5214 scope: Some("security:write"),
5215 params: &[
5216 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
5217 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
5218 ],
5219 body: &[
5220 Field { name: "after", kind: "string", required: false, values: &[] },
5221 Field { name: "before", kind: "string", required: false, values: &[] },
5222 Field { name: "pattern", kind: "string", required: true, values: &[] },
5223 Field { name: "pattern_name", kind: "string", required: true, values: &[] },
5224 Field { name: "publish", kind: "boolean", required: false, values: &[] },
5225 Field { name: "test_strings", kind: "array", required: false, values: &[] },
5226 ],
5227 },
5228 Operation {
5229 id: "update_secret_scanning_alert",
5230 method: "PATCH",
5231 path: "/repos/{owner}/{name}/secret-scanning/alerts/{id}",
5232 tag: "Secret scanning",
5233 summary: "Dismiss or reopen a secret scanning alert",
5234 scope: Some("security:write"),
5235 params: &[
5236 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
5237 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
5238 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
5239 ],
5240 body: &[
5241 Field { name: "comment", kind: "string", required: false, values: &[] },
5242 Field { name: "reason", kind: "string", required: false, values: &["false_positive", "used_in_tests", "revoked", "wont_fix"] },
5243 Field { name: "state", kind: "string", required: true, values: &["open", "dismissed"] },
5244 ],
5245 },
5246 Operation {
5247 id: "delete_actions_secret",
5248 method: "DELETE",
5249 path: "/repos/{owner}/{name}/actions/secrets/{setting}",
5250 tag: "Secrets and variables",
5251 summary: "Delete a secret",
5252 scope: Some("secrets:admin"),
5253 params: &[
5254 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
5255 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
5256 Param { name: "setting", location: In::Path, kind: "string", required: true, values: &[] },
5257 ],
5258 body: &[
5259 Field { name: "id", kind: "string", required: false, values: &[] },
5260 Field { name: "workspace", kind: "string", required: false, values: &[] },
5261 ],
5262 },
5263 Operation {
5264 id: "delete_actions_secret_for_workspace",
5265 method: "DELETE",
5266 path: "/workspaces/{workspace}/actions/secrets/{setting}",
5267 tag: "Secrets and variables",
5268 summary: "Delete a secret for a workspace",
5269 scope: Some("secrets:admin"),
5270 params: &[
5271 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
5272 Param { name: "setting", location: In::Path, kind: "string", required: true, values: &[] },
5273 ],
5274 body: &[
5275 Field { name: "id", kind: "string", required: false, values: &[] },
5276 ],
5277 },
5278 Operation {
5279 id: "delete_actions_variable",
5280 method: "DELETE",
5281 path: "/repos/{owner}/{name}/actions/variables/{setting}",
5282 tag: "Secrets and variables",
5283 summary: "Delete a variable",
5284 scope: Some("secrets:admin"),
5285 params: &[
5286 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
5287 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
5288 Param { name: "setting", location: In::Path, kind: "string", required: true, values: &[] },
5289 ],
5290 body: &[
5291 Field { name: "id", kind: "string", required: false, values: &[] },
5292 Field { name: "workspace", kind: "string", required: false, values: &[] },
5293 ],
5294 },
5295 Operation {
5296 id: "delete_actions_variable_for_workspace",
5297 method: "DELETE",
5298 path: "/workspaces/{workspace}/actions/variables/{setting}",
5299 tag: "Secrets and variables",
5300 summary: "Delete a variable for a workspace",
5301 scope: Some("secrets:admin"),
5302 params: &[
5303 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
5304 Param { name: "setting", location: In::Path, kind: "string", required: true, values: &[] },
5305 ],
5306 body: &[
5307 Field { name: "id", kind: "string", required: false, values: &[] },
5308 ],
5309 },
5310 Operation {
5311 id: "list_actions_secrets",
5312 method: "GET",
5313 path: "/repos/{owner}/{name}/actions/secrets",
5314 tag: "Secrets and variables",
5315 summary: "List secrets",
5316 scope: Some("secrets:read"),
5317 params: &[
5318 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
5319 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
5320 ],
5321 body: &[],
5322 },
5323 Operation {
5324 id: "list_actions_secrets_for_workspace",
5325 method: "GET",
5326 path: "/workspaces/{workspace}/actions/secrets",
5327 tag: "Secrets and variables",
5328 summary: "List secrets for a workspace",
5329 scope: Some("secrets:read"),
5330 params: &[
5331 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
5332 ],
5333 body: &[],
5334 },
5335 Operation {
5336 id: "list_actions_variables",
5337 method: "GET",
5338 path: "/repos/{owner}/{name}/actions/variables",
5339 tag: "Secrets and variables",
5340 summary: "List variables",
5341 scope: Some("secrets:read"),
5342 params: &[
5343 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
5344 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
5345 ],
5346 body: &[],
5347 },
5348 Operation {
5349 id: "list_actions_variables_for_workspace",
5350 method: "GET",
5351 path: "/workspaces/{workspace}/actions/variables",
5352 tag: "Secrets and variables",
5353 summary: "List variables for a workspace",
5354 scope: Some("secrets:read"),
5355 params: &[
5356 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
5357 ],
5358 body: &[],
5359 },
5360 Operation {
5361 id: "set_actions_secret",
5362 method: "PUT",
5363 path: "/repos/{owner}/{name}/actions/secrets/{setting}",
5364 tag: "Secrets and variables",
5365 summary: "Set a secret",
5366 scope: Some("secrets:admin"),
5367 params: &[
5368 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
5369 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
5370 Param { name: "setting", location: In::Path, kind: "string", required: true, values: &[] },
5371 ],
5372 body: &[
5373 Field { name: "available_to", kind: "array", required: false, values: &[] },
5374 Field { name: "brokered_hosts", kind: "array", required: false, values: &[] },
5375 Field { name: "environments", kind: "array", required: false, values: &[] },
5376 Field { name: "id", kind: "string", required: false, values: &[] },
5377 Field { name: "note", kind: "string", required: false, values: &[] },
5378 Field { name: "projects", kind: "array", required: false, values: &[] },
5379 Field { name: "value", kind: "string", required: false, values: &[] },
5380 Field { name: "workspace", kind: "string", required: false, values: &[] },
5381 ],
5382 },
5383 Operation {
5384 id: "set_actions_secret_for_workspace",
5385 method: "PUT",
5386 path: "/workspaces/{workspace}/actions/secrets/{setting}",
5387 tag: "Secrets and variables",
5388 summary: "Set a secret for a workspace",
5389 scope: Some("secrets:admin"),
5390 params: &[
5391 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
5392 Param { name: "setting", location: In::Path, kind: "string", required: true, values: &[] },
5393 ],
5394 body: &[
5395 Field { name: "available_to", kind: "array", required: false, values: &[] },
5396 Field { name: "brokered_hosts", kind: "array", required: false, values: &[] },
5397 Field { name: "environments", kind: "array", required: false, values: &[] },
5398 Field { name: "id", kind: "string", required: false, values: &[] },
5399 Field { name: "note", kind: "string", required: false, values: &[] },
5400 Field { name: "projects", kind: "array", required: false, values: &[] },
5401 Field { name: "value", kind: "string", required: false, values: &[] },
5402 ],
5403 },
5404 Operation {
5405 id: "set_actions_variable",
5406 method: "POST",
5407 path: "/repos/{owner}/{name}/actions/variables",
5408 tag: "Secrets and variables",
5409 summary: "Set a variable",
5410 scope: Some("secrets:admin"),
5411 params: &[
5412 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
5413 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
5414 ],
5415 body: &[
5416 Field { name: "available_to", kind: "array", required: false, values: &[] },
5417 Field { name: "brokered_hosts", kind: "array", required: false, values: &[] },
5418 Field { name: "environments", kind: "array", required: false, values: &[] },
5419 Field { name: "id", kind: "string", required: false, values: &[] },
5420 Field { name: "note", kind: "string", required: false, values: &[] },
5421 Field { name: "projects", kind: "array", required: false, values: &[] },
5422 Field { name: "setting", kind: "string", required: true, values: &[] },
5423 Field { name: "value", kind: "string", required: false, values: &[] },
5424 Field { name: "workspace", kind: "string", required: false, values: &[] },
5425 ],
5426 },
5427 Operation {
5428 id: "set_actions_variable_for_workspace",
5429 method: "POST",
5430 path: "/workspaces/{workspace}/actions/variables",
5431 tag: "Secrets and variables",
5432 summary: "Set a variable for a workspace",
5433 scope: Some("secrets:admin"),
5434 params: &[
5435 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
5436 ],
5437 body: &[
5438 Field { name: "available_to", kind: "array", required: false, values: &[] },
5439 Field { name: "brokered_hosts", kind: "array", required: false, values: &[] },
5440 Field { name: "environments", kind: "array", required: false, values: &[] },
5441 Field { name: "id", kind: "string", required: false, values: &[] },
5442 Field { name: "note", kind: "string", required: false, values: &[] },
5443 Field { name: "projects", kind: "array", required: false, values: &[] },
5444 Field { name: "setting", kind: "string", required: true, values: &[] },
5445 Field { name: "value", kind: "string", required: false, values: &[] },
5446 ],
5447 },
5448 Operation {
5449 id: "update_actions_variable",
5450 method: "PATCH",
5451 path: "/repos/{owner}/{name}/actions/variables/{setting}",
5452 tag: "Secrets and variables",
5453 summary: "Update a variable",
5454 scope: Some("secrets:admin"),
5455 params: &[
5456 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
5457 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
5458 Param { name: "setting", location: In::Path, kind: "string", required: true, values: &[] },
5459 ],
5460 body: &[
5461 Field { name: "available_to", kind: "array", required: false, values: &[] },
5462 Field { name: "brokered_hosts", kind: "array", required: false, values: &[] },
5463 Field { name: "environments", kind: "array", required: false, values: &[] },
5464 Field { name: "id", kind: "string", required: false, values: &[] },
5465 Field { name: "note", kind: "string", required: false, values: &[] },
5466 Field { name: "projects", kind: "array", required: false, values: &[] },
5467 Field { name: "value", kind: "string", required: false, values: &[] },
5468 Field { name: "workspace", kind: "string", required: false, values: &[] },
5469 ],
5470 },
5471 Operation {
5472 id: "update_actions_variable_for_workspace",
5473 method: "PATCH",
5474 path: "/workspaces/{workspace}/actions/variables/{setting}",
5475 tag: "Secrets and variables",
5476 summary: "Update a variable for a workspace",
5477 scope: Some("secrets:admin"),
5478 params: &[
5479 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
5480 Param { name: "setting", location: In::Path, kind: "string", required: true, values: &[] },
5481 ],
5482 body: &[
5483 Field { name: "available_to", kind: "array", required: false, values: &[] },
5484 Field { name: "brokered_hosts", kind: "array", required: false, values: &[] },
5485 Field { name: "environments", kind: "array", required: false, values: &[] },
5486 Field { name: "id", kind: "string", required: false, values: &[] },
5487 Field { name: "note", kind: "string", required: false, values: &[] },
5488 Field { name: "projects", kind: "array", required: false, values: &[] },
5489 Field { name: "value", kind: "string", required: false, values: &[] },
5490 ],
5491 },
5492 Operation {
5493 id: "dismiss_security_alert",
5494 method: "POST",
5495 path: "/repos/{owner}/{name}/security/alerts/{id}/dismiss",
5496 tag: "Security",
5497 summary: "Dismiss a security alert",
5498 scope: Some("repo:admin"),
5499 params: &[
5500 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
5501 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
5502 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
5503 ],
5504 body: &[
5505 Field { name: "comment", kind: "string", required: false, values: &[] },
5506 Field { name: "reason", kind: "string", required: true, values: &["false_positive", "used_in_tests", "revoked", "wont_fix", "fix_started", "no_bandwidth", "tolerable_risk", "inaccurate", "not_used"] },
5507 ],
5508 },
5509 Operation {
5510 id: "list_security_alerts",
5511 method: "GET",
5512 path: "/repos/{owner}/{name}/security/alerts",
5513 tag: "Security",
5514 summary: "List security alerts",
5515 scope: Some("repo:read"),
5516 params: &[
5517 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
5518 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
5519 Param { name: "state", location: In::Query, kind: "string", required: false, values: &["open", "dismissed", "fixed"] },
5520 Param { name: "kind", location: In::Query, kind: "string", required: false, values: &["secret", "dependency"] },
5521 ],
5522 body: &[],
5523 },
5524 Operation {
5525 id: "reopen_security_alert",
5526 method: "POST",
5527 path: "/repos/{owner}/{name}/security/alerts/{id}/reopen",
5528 tag: "Security",
5529 summary: "Reopen a security alert",
5530 scope: Some("repo:admin"),
5531 params: &[
5532 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
5533 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
5534 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
5535 ],
5536 body: &[],
5537 },
5538 Operation {
5539 id: "create_security_advisory",
5540 method: "POST",
5541 path: "/repos/{owner}/{name}/security/advisories",
5542 tag: "Security advisories",
5543 summary: "Create a security advisory",
5544 scope: Some("security:write"),
5545 params: &[
5546 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
5547 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
5548 ],
5549 body: &[
5550 Field { name: "affected_versions", kind: "string", required: false, values: &[] },
5551 Field { name: "credits", kind: "array", required: false, values: &[] },
5552 Field { name: "cve_id", kind: "string", required: false, values: &[] },
5553 Field { name: "cvss_score", kind: "number", required: false, values: &[] },
5554 Field { name: "cvss_vector", kind: "string", required: false, values: &[] },
5555 Field { name: "description", kind: "string", required: false, values: &[] },
5556 Field { name: "ecosystem", kind: "string", required: false, values: &[] },
5557 Field { name: "package", kind: "string", required: false, values: &[] },
5558 Field { name: "patched_versions", kind: "string", required: false, values: &[] },
5559 Field { name: "severity", kind: "string", required: true, values: &["critical", "high", "medium", "low"] },
5560 Field { name: "title", kind: "string", required: true, values: &[] },
5561 ],
5562 },
5563 Operation {
5564 id: "get_security_advisory",
5565 method: "GET",
5566 path: "/repos/{owner}/{name}/security/advisories/{id}",
5567 tag: "Security advisories",
5568 summary: "Get a security advisory",
5569 scope: Some("security:read"),
5570 params: &[
5571 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
5572 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
5573 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
5574 ],
5575 body: &[],
5576 },
5577 Operation {
5578 id: "list_security_advisories",
5579 method: "GET",
5580 path: "/repos/{owner}/{name}/security/advisories",
5581 tag: "Security advisories",
5582 summary: "List security advisories",
5583 scope: Some("security:read"),
5584 params: &[
5585 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
5586 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
5587 Param { name: "state", location: In::Query, kind: "string", required: false, values: &["draft", "published", "withdrawn"] },
5588 ],
5589 body: &[],
5590 },
5591 Operation {
5592 id: "list_vulnerability_reports",
5593 method: "GET",
5594 path: "/repos/{owner}/{name}/security/reports",
5595 tag: "Security advisories",
5596 summary: "List vulnerability reports",
5597 scope: Some("security:read"),
5598 params: &[
5599 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
5600 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
5601 Param { name: "state", location: In::Query, kind: "string", required: false, values: &["new", "accepted", "declined"] },
5602 ],
5603 body: &[],
5604 },
5605 Operation {
5606 id: "report_vulnerability",
5607 method: "POST",
5608 path: "/repos/{owner}/{name}/security/reports",
5609 tag: "Security advisories",
5610 summary: "Report a vulnerability privately",
5611 scope: Some("security:write"),
5612 params: &[
5613 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
5614 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
5615 ],
5616 body: &[
5617 Field { name: "description", kind: "string", required: true, values: &[] },
5618 Field { name: "email", kind: "string", required: false, values: &[] },
5619 Field { name: "severity", kind: "string", required: false, values: &["critical", "high", "medium", "low"] },
5620 Field { name: "title", kind: "string", required: true, values: &[] },
5621 ],
5622 },
5623 Operation {
5624 id: "review_vulnerability_report",
5625 method: "PATCH",
5626 path: "/repos/{owner}/{name}/security/reports/{id}",
5627 tag: "Security advisories",
5628 summary: "Accept or decline a vulnerability report",
5629 scope: Some("security:write"),
5630 params: &[
5631 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
5632 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
5633 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
5634 ],
5635 body: &[
5636 Field { name: "decision", kind: "string", required: true, values: &["accept", "decline"] },
5637 Field { name: "note", kind: "string", required: false, values: &[] },
5638 ],
5639 },
5640 Operation {
5641 id: "set_security_advisory_state",
5642 method: "POST",
5643 path: "/repos/{owner}/{name}/security/advisories/{id}/state",
5644 tag: "Security advisories",
5645 summary: "Publish or withdraw a security advisory",
5646 scope: Some("security:write"),
5647 params: &[
5648 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
5649 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
5650 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
5651 ],
5652 body: &[
5653 Field { name: "state", kind: "string", required: true, values: &["published", "withdrawn"] },
5654 ],
5655 },
5656 Operation {
5657 id: "update_security_advisory",
5658 method: "PATCH",
5659 path: "/repos/{owner}/{name}/security/advisories/{id}",
5660 tag: "Security advisories",
5661 summary: "Update a security advisory",
5662 scope: Some("security:write"),
5663 params: &[
5664 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
5665 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
5666 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
5667 ],
5668 body: &[
5669 Field { name: "affected_versions", kind: "string", required: false, values: &[] },
5670 Field { name: "credits", kind: "array", required: false, values: &[] },
5671 Field { name: "cve_id", kind: "string", required: false, values: &[] },
5672 Field { name: "cvss_score", kind: "number", required: false, values: &[] },
5673 Field { name: "cvss_vector", kind: "string", required: false, values: &[] },
5674 Field { name: "description", kind: "string", required: false, values: &[] },
5675 Field { name: "ecosystem", kind: "string", required: false, values: &[] },
5676 Field { name: "package", kind: "string", required: false, values: &[] },
5677 Field { name: "patched_versions", kind: "string", required: false, values: &[] },
5678 Field { name: "severity", kind: "string", required: false, values: &["critical", "high", "medium", "low"] },
5679 Field { name: "title", kind: "string", required: false, values: &[] },
5680 ],
5681 },
5682 Operation {
5683 id: "get_security_overview",
5684 method: "GET",
5685 path: "/workspaces/{workspace}/security/overview",
5686 tag: "Security settings",
5687 summary: "Get the security overview",
5688 scope: Some("security:read"),
5689 params: &[
5690 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
5691 Param { name: "days", location: In::Query, kind: "integer", required: false, values: &[] },
5692 ],
5693 body: &[],
5694 },
5695 Operation {
5696 id: "get_security_settings",
5697 method: "GET",
5698 path: "/repos/{owner}/{name}/security/settings",
5699 tag: "Security settings",
5700 summary: "Get a repository's security settings",
5701 scope: Some("security:read"),
5702 params: &[
5703 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
5704 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
5705 ],
5706 body: &[],
5707 },
5708 Operation {
5709 id: "get_workspace_security_settings",
5710 method: "GET",
5711 path: "/workspaces/{workspace}/security/settings",
5712 tag: "Security settings",
5713 summary: "Get a workspace's security settings",
5714 scope: Some("security:read"),
5715 params: &[
5716 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
5717 ],
5718 body: &[],
5719 },
5720 Operation {
5721 id: "update_security_settings",
5722 method: "PATCH",
5723 path: "/repos/{owner}/{name}/security/settings",
5724 tag: "Security settings",
5725 summary: "Update a repository's security settings",
5726 scope: Some("security:write"),
5727 params: &[
5728 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
5729 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
5730 ],
5731 body: &[
5732 Field { name: "code_scanning_gate", kind: "string", required: false, values: &["none", "errors", "critical", "high", "medium", "any"] },
5733 Field { name: "dependency_review", kind: "boolean", required: false, values: &[] },
5734 Field { name: "history_alerts", kind: "boolean", required: false, values: &[] },
5735 Field { name: "private_vulnerability_reporting", kind: "boolean", required: false, values: &[] },
5736 Field { name: "review_comment", kind: "boolean", required: false, values: &[] },
5737 Field { name: "review_deny_licenses", kind: "array", required: false, values: &[] },
5738 Field { name: "review_fail_on", kind: "string", required: false, values: &["critical", "high", "medium", "low", "none"] },
5739 ],
5740 },
5741 Operation {
5742 id: "update_workspace_security_settings",
5743 method: "PATCH",
5744 path: "/workspaces/{workspace}/security/settings",
5745 tag: "Security settings",
5746 summary: "Update a workspace's security settings",
5747 scope: Some("security:write"),
5748 params: &[
5749 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
5750 ],
5751 body: &[
5752 Field { name: "delegated_bypass", kind: "boolean", required: false, values: &[] },
5753 Field { name: "validity_checks", kind: "boolean", required: false, values: &[] },
5754 ],
5755 },
5756 Operation {
5757 id: "end_session",
5758 method: "POST",
5759 path: "/repos/{owner}/{name}/sessions/{id}/end",
5760 tag: "Sessions",
5761 summary: "End a session",
5762 scope: Some("pull_requests:write"),
5763 params: &[
5764 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
5765 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
5766 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
5767 ],
5768 body: &[
5769 Field { name: "reason", kind: "string", required: false, values: &[] },
5770 Field { name: "result", kind: "string", required: false, values: &[] },
5771 ],
5772 },
5773 Operation {
5774 id: "get_session",
5775 method: "GET",
5776 path: "/repos/{owner}/{name}/sessions/{id}",
5777 tag: "Sessions",
5778 summary: "Get a session",
5779 scope: Some("pull_requests:read"),
5780 params: &[
5781 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
5782 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
5783 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
5784 Param { name: "after", location: In::Query, kind: "integer", required: false, values: &[] },
5785 ],
5786 body: &[],
5787 },
5788 Operation {
5789 id: "list_sessions",
5790 method: "GET",
5791 path: "/repos/{owner}/{name}/sessions",
5792 tag: "Sessions",
5793 summary: "List sessions",
5794 scope: Some("pull_requests:read"),
5795 params: &[
5796 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
5797 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
5798 Param { name: "state", location: In::Query, kind: "string", required: false, values: &["active", "idle", "ended"] },
5799 Param { name: "issue", location: In::Query, kind: "integer", required: false, values: &[] },
5800 Param { name: "pull", location: In::Query, kind: "integer", required: false, values: &[] },
5801 Param { name: "path", location: In::Query, kind: "string", required: false, values: &[] },
5802 Param { name: "subagents", location: In::Query, kind: "boolean", required: false, values: &[] },
5803 ],
5804 body: &[],
5805 },
5806 Operation {
5807 id: "read_session",
5808 method: "GET",
5809 path: "/repos/{owner}/{name}/pulls/{number}/session",
5810 tag: "Sessions",
5811 summary: "Read a session",
5812 scope: Some("pull_requests:read"),
5813 params: &[
5814 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
5815 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
5816 Param { name: "number", location: In::Path, kind: "integer", required: true, values: &[] },
5817 Param { name: "after", location: In::Query, kind: "integer", required: false, values: &[] },
5818 ],
5819 body: &[],
5820 },
5821 Operation {
5822 id: "record_session",
5823 method: "POST",
5824 path: "/repos/{owner}/{name}/pulls/{number}/session",
5825 tag: "Sessions",
5826 summary: "Record session entries",
5827 scope: Some("pull_requests:write"),
5828 params: &[
5829 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
5830 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
5831 Param { name: "number", location: In::Path, kind: "integer", required: true, values: &[] },
5832 ],
5833 body: &[
5834 Field { name: "entries", kind: "array", required: true, values: &[] },
5835 ],
5836 },
5837 Operation {
5838 id: "record_session_entries",
5839 method: "POST",
5840 path: "/repos/{owner}/{name}/sessions/{id}/entries",
5841 tag: "Sessions",
5842 summary: "Record entries in a session",
5843 scope: Some("pull_requests:write"),
5844 params: &[
5845 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
5846 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
5847 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
5848 ],
5849 body: &[
5850 Field { name: "entries", kind: "array", required: false, values: &[] },
5851 Field { name: "touched", kind: "array", required: false, values: &[] },
5852 ],
5853 },
5854 Operation {
5855 id: "start_agent_session",
5856 method: "POST",
5857 path: "/repos/{owner}/{name}/agent-sessions",
5858 tag: "Sessions",
5859 summary: "Start an agent session on an issue",
5860 scope: Some("pull_requests:write"),
5861 params: &[
5862 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
5863 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
5864 ],
5865 body: &[
5866 Field { name: "body", kind: "string", required: false, values: &[] },
5867 Field { name: "handoff", kind: "boolean", required: false, values: &[] },
5868 Field { name: "instruction", kind: "string", required: false, values: &[] },
5869 Field { name: "issue", kind: "integer", required: false, values: &[] },
5870 Field { name: "mode", kind: "string", required: false, values: &["plan", "implement", "review"] },
5871 Field { name: "title", kind: "string", required: false, values: &[] },
5872 ],
5873 },
5874 Operation {
5875 id: "start_session",
5876 method: "POST",
5877 path: "/repos/{owner}/{name}/sessions",
5878 tag: "Sessions",
5879 summary: "Start a session",
5880 scope: Some("pull_requests:write"),
5881 params: &[
5882 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
5883 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
5884 ],
5885 body: &[
5886 Field { name: "agent_type", kind: "string", required: false, values: &[] },
5887 Field { name: "branch", kind: "string", required: false, values: &[] },
5888 Field { name: "harness", kind: "string", required: true, values: &["claude_code", "claude_managed_agents", "codex", "cursor", "copilot", "other"] },
5889 Field { name: "harness_session_id", kind: "string", required: false, values: &[] },
5890 Field { name: "head_commit", kind: "string", required: false, values: &[] },
5891 Field { name: "issue", kind: "integer", required: false, values: &[] },
5892 Field { name: "model", kind: "string", required: false, values: &[] },
5893 Field { name: "parent_id", kind: "string", required: false, values: &[] },
5894 Field { name: "prompt", kind: "string", required: false, values: &[] },
5895 Field { name: "pull", kind: "integer", required: false, values: &[] },
5896 Field { name: "task", kind: "string", required: false, values: &[] },
5897 Field { name: "title", kind: "string", required: false, values: &[] },
5898 ],
5899 },
5900 Operation {
5901 id: "update_session",
5902 method: "PATCH",
5903 path: "/repos/{owner}/{name}/sessions/{id}",
5904 tag: "Sessions",
5905 summary: "Update a session",
5906 scope: Some("pull_requests:write"),
5907 params: &[
5908 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
5909 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
5910 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
5911 ],
5912 body: &[
5913 Field { name: "agent_type", kind: "string", required: false, values: &[] },
5914 Field { name: "branch", kind: "string", required: false, values: &[] },
5915 Field { name: "head_commit", kind: "string", required: false, values: &[] },
5916 Field { name: "issue", kind: "integer", required: false, values: &[] },
5917 Field { name: "model", kind: "string", required: false, values: &[] },
5918 Field { name: "prompt", kind: "string", required: false, values: &[] },
5919 Field { name: "pull", kind: "integer", required: false, values: &[] },
5920 Field { name: "result", kind: "string", required: false, values: &[] },
5921 Field { name: "task", kind: "string", required: false, values: &[] },
5922 Field { name: "title", kind: "string", required: false, values: &[] },
5923 ],
5924 },
5925 Operation {
5926 id: "check_starred",
5927 method: "GET",
5928 path: "/user/starred/{owner}/{name}",
5929 tag: "Stars",
5930 summary: "Check whether you starred a repository",
5931 scope: Some("account:read"),
5932 params: &[
5933 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
5934 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
5935 ],
5936 body: &[],
5937 },
5938 Operation {
5939 id: "list_stargazers",
5940 method: "GET",
5941 path: "/repos/{owner}/{name}/stargazers",
5942 tag: "Stars",
5943 summary: "List who starred a repository",
5944 scope: Some("repo:read"),
5945 params: &[
5946 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
5947 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
5948 Param { name: "page", location: In::Query, kind: "integer", required: false, values: &[] },
5949 ],
5950 body: &[],
5951 },
5952 Operation {
5953 id: "list_starred",
5954 method: "GET",
5955 path: "/user/starred",
5956 tag: "Stars",
5957 summary: "List repositories you starred",
5958 scope: Some("account:read"),
5959 params: &[],
5960 body: &[],
5961 },
5962 Operation {
5963 id: "star_repo",
5964 method: "PUT",
5965 path: "/user/starred/{owner}/{name}",
5966 tag: "Stars",
5967 summary: "Star a repository",
5968 scope: Some("account:write"),
5969 params: &[
5970 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
5971 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
5972 ],
5973 body: &[],
5974 },
5975 Operation {
5976 id: "unstar_repo",
5977 method: "DELETE",
5978 path: "/user/starred/{owner}/{name}",
5979 tag: "Stars",
5980 summary: "Unstar a repository",
5981 scope: Some("account:write"),
5982 params: &[
5983 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
5984 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
5985 ],
5986 body: &[],
5987 },
5988 Operation {
5989 id: "compare_dependencies",
5990 method: "GET",
5991 path: "/repos/{owner}/{name}/dependency-graph/compare/{basehead}",
5992 tag: "Supply chain",
5993 summary: "Compare dependencies",
5994 scope: Some("security:read"),
5995 params: &[
5996 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
5997 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
5998 Param { name: "basehead", location: In::Path, kind: "string", required: true, values: &[] },
5999 ],
6000 body: &[],
6001 },
6002 Operation {
6003 id: "get_dependency_graph",
6004 method: "GET",
6005 path: "/repos/{owner}/{name}/dependency-graph",
6006 tag: "Supply chain",
6007 summary: "Get the dependency graph",
6008 scope: Some("security:read"),
6009 params: &[
6010 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
6011 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
6012 ],
6013 body: &[],
6014 },
6015 Operation {
6016 id: "get_sbom",
6017 method: "GET",
6018 path: "/repos/{owner}/{name}/dependency-graph/sbom",
6019 tag: "Supply chain",
6020 summary: "Export an SBOM",
6021 scope: Some("security:read"),
6022 params: &[
6023 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
6024 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
6025 ],
6026 body: &[],
6027 },
6028 Operation {
6029 id: "get_vulnerability_alert",
6030 method: "GET",
6031 path: "/repos/{owner}/{name}/vulnerability-alerts/{id}",
6032 tag: "Supply chain",
6033 summary: "Get a vulnerability alert",
6034 scope: Some("security:read"),
6035 params: &[
6036 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
6037 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
6038 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
6039 ],
6040 body: &[],
6041 },
6042 Operation {
6043 id: "list_vulnerability_alerts",
6044 method: "GET",
6045 path: "/repos/{owner}/{name}/vulnerability-alerts",
6046 tag: "Supply chain",
6047 summary: "List vulnerability alerts",
6048 scope: Some("security:read"),
6049 params: &[
6050 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
6051 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
6052 Param { name: "state", location: In::Query, kind: "string", required: false, values: &["open", "dismissed", "fixed"] },
6053 Param { name: "severity", location: In::Query, kind: "string", required: false, values: &["critical", "high", "medium", "low", "unknown"] },
6054 Param { name: "ecosystem", location: In::Query, kind: "string", required: false, values: &[] },
6055 Param { name: "package", location: In::Query, kind: "string", required: false, values: &[] },
6056 ],
6057 body: &[],
6058 },
6059 Operation {
6060 id: "list_vulnerability_alerts_for_workspace",
6061 method: "GET",
6062 path: "/workspaces/{workspace}/vulnerability-alerts",
6063 tag: "Supply chain",
6064 summary: "List vulnerability alerts for a workspace",
6065 scope: Some("security:read"),
6066 params: &[
6067 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
6068 Param { name: "state", location: In::Query, kind: "string", required: false, values: &["open", "dismissed", "fixed"] },
6069 Param { name: "severity", location: In::Query, kind: "string", required: false, values: &["critical", "high", "medium", "low", "unknown"] },
6070 Param { name: "ecosystem", location: In::Query, kind: "string", required: false, values: &[] },
6071 Param { name: "package", location: In::Query, kind: "string", required: false, values: &[] },
6072 ],
6073 body: &[],
6074 },
6075 Operation {
6076 id: "update_vulnerability_alert",
6077 method: "PATCH",
6078 path: "/repos/{owner}/{name}/vulnerability-alerts/{id}",
6079 tag: "Supply chain",
6080 summary: "Dismiss or reopen a vulnerability alert",
6081 scope: Some("security:write"),
6082 params: &[
6083 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
6084 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
6085 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
6086 ],
6087 body: &[
6088 Field { name: "comment", kind: "string", required: false, values: &[] },
6089 Field { name: "reason", kind: "string", required: false, values: &["fix_started", "no_bandwidth", "tolerable_risk", "inaccurate", "not_used"] },
6090 Field { name: "state", kind: "string", required: true, values: &["open", "dismissed"] },
6091 ],
6092 },
6093 Operation {
6094 id: "create_team",
6095 method: "POST",
6096 path: "/workspaces/{workspace}/teams",
6097 tag: "Teams",
6098 summary: "Create a team",
6099 scope: Some("workspace:admin"),
6100 params: &[
6101 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
6102 ],
6103 body: &[
6104 Field { name: "description", kind: "string", required: false, values: &[] },
6105 Field { name: "members", kind: "array", required: false, values: &[] },
6106 Field { name: "name", kind: "string", required: true, values: &[] },
6107 Field { name: "notify", kind: "boolean", required: false, values: &[] },
6108 Field { name: "parent", kind: "string", required: false, values: &[] },
6109 Field { name: "slug", kind: "string", required: false, values: &[] },
6110 Field { name: "visibility", kind: "string", required: false, values: &["visible", "secret"] },
6111 ],
6112 },
6113 Operation {
6114 id: "delete_team",
6115 method: "DELETE",
6116 path: "/workspaces/{workspace}/teams/{team}",
6117 tag: "Teams",
6118 summary: "Delete a team",
6119 scope: Some("workspace:admin"),
6120 params: &[
6121 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
6122 Param { name: "team", location: In::Path, kind: "string", required: true, values: &[] },
6123 ],
6124 body: &[],
6125 },
6126 Operation {
6127 id: "get_team",
6128 method: "GET",
6129 path: "/workspaces/{workspace}/teams/{team}",
6130 tag: "Teams",
6131 summary: "Get a team",
6132 scope: Some("workspace:read"),
6133 params: &[
6134 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
6135 Param { name: "team", location: In::Path, kind: "string", required: true, values: &[] },
6136 ],
6137 body: &[],
6138 },
6139 Operation {
6140 id: "list_child_teams",
6141 method: "GET",
6142 path: "/workspaces/{workspace}/teams/{team}/teams",
6143 tag: "Teams",
6144 summary: "List child teams",
6145 scope: Some("workspace:read"),
6146 params: &[
6147 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
6148 Param { name: "team", location: In::Path, kind: "string", required: true, values: &[] },
6149 ],
6150 body: &[],
6151 },
6152 Operation {
6153 id: "list_team_members",
6154 method: "GET",
6155 path: "/workspaces/{workspace}/teams/{team}/members",
6156 tag: "Teams",
6157 summary: "List a team's members",
6158 scope: Some("workspace:read"),
6159 params: &[
6160 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
6161 Param { name: "team", location: In::Path, kind: "string", required: true, values: &[] },
6162 Param { name: "include_child_teams", location: In::Query, kind: "boolean", required: false, values: &[] },
6163 ],
6164 body: &[],
6165 },
6166 Operation {
6167 id: "list_team_repos",
6168 method: "GET",
6169 path: "/workspaces/{workspace}/teams/{team}/repos",
6170 tag: "Teams",
6171 summary: "List a team's repositories",
6172 scope: Some("workspace:read"),
6173 params: &[
6174 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
6175 Param { name: "team", location: In::Path, kind: "string", required: true, values: &[] },
6176 ],
6177 body: &[],
6178 },
6179 Operation {
6180 id: "list_teams",
6181 method: "GET",
6182 path: "/workspaces/{workspace}/teams",
6183 tag: "Teams",
6184 summary: "List teams",
6185 scope: Some("workspace:read"),
6186 params: &[
6187 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
6188 Param { name: "q", location: In::Query, kind: "string", required: false, values: &[] },
6189 ],
6190 body: &[],
6191 },
6192 Operation {
6193 id: "list_user_teams",
6194 method: "GET",
6195 path: "/workspaces/{workspace}/members/{username}/teams",
6196 tag: "Teams",
6197 summary: "List someone's teams",
6198 scope: Some("workspace:read"),
6199 params: &[
6200 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
6201 Param { name: "username", location: In::Path, kind: "string", required: true, values: &[] },
6202 ],
6203 body: &[],
6204 },
6205 Operation {
6206 id: "remove_team_member",
6207 method: "DELETE",
6208 path: "/workspaces/{workspace}/teams/{team}/members/{username}",
6209 tag: "Teams",
6210 summary: "Remove a team member",
6211 scope: Some("workspace:admin"),
6212 params: &[
6213 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
6214 Param { name: "team", location: In::Path, kind: "string", required: true, values: &[] },
6215 Param { name: "username", location: In::Path, kind: "string", required: true, values: &[] },
6216 ],
6217 body: &[],
6218 },
6219 Operation {
6220 id: "remove_team_repo",
6221 method: "DELETE",
6222 path: "/workspaces/{workspace}/teams/{team}/repos/{repo}",
6223 tag: "Teams",
6224 summary: "Remove a team from a repository",
6225 scope: Some("access:admin"),
6226 params: &[
6227 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
6228 Param { name: "team", location: In::Path, kind: "string", required: true, values: &[] },
6229 Param { name: "repo", location: In::Path, kind: "string", required: true, values: &[] },
6230 ],
6231 body: &[],
6232 },
6233 Operation {
6234 id: "set_team_member",
6235 method: "PUT",
6236 path: "/workspaces/{workspace}/teams/{team}/members/{username}",
6237 tag: "Teams",
6238 summary: "Add or change a team member",
6239 scope: Some("workspace:admin"),
6240 params: &[
6241 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
6242 Param { name: "team", location: In::Path, kind: "string", required: true, values: &[] },
6243 Param { name: "username", location: In::Path, kind: "string", required: true, values: &[] },
6244 ],
6245 body: &[
6246 Field { name: "role", kind: "string", required: false, values: &["member", "maintainer"] },
6247 ],
6248 },
6249 Operation {
6250 id: "set_team_repo",
6251 method: "PUT",
6252 path: "/workspaces/{workspace}/teams/{team}/repos/{repo}",
6253 tag: "Teams",
6254 summary: "Give a team a role on a repository",
6255 scope: Some("access:admin"),
6256 params: &[
6257 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
6258 Param { name: "team", location: In::Path, kind: "string", required: true, values: &[] },
6259 Param { name: "repo", location: In::Path, kind: "string", required: true, values: &[] },
6260 ],
6261 body: &[
6262 Field { name: "role", kind: "string", required: true, values: &["read", "triage", "write", "maintain", "admin"] },
6263 ],
6264 },
6265 Operation {
6266 id: "set_team_review_assignment",
6267 method: "PUT",
6268 path: "/workspaces/{workspace}/teams/{team}/review_assignment",
6269 tag: "Teams",
6270 summary: "Set a team's review assignment",
6271 scope: Some("workspace:admin"),
6272 params: &[
6273 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
6274 Param { name: "team", location: In::Path, kind: "string", required: true, values: &[] },
6275 ],
6276 body: &[
6277 Field { name: "algorithm", kind: "string", required: false, values: &["round_robin", "load_balance"] },
6278 Field { name: "busy_at", kind: "integer", required: false, values: &[] },
6279 Field { name: "count", kind: "integer", required: false, values: &[] },
6280 Field { name: "enabled", kind: "boolean", required: false, values: &[] },
6281 Field { name: "excluded", kind: "array", required: false, values: &[] },
6282 Field { name: "include_child_teams", kind: "boolean", required: false, values: &[] },
6283 Field { name: "notify_team", kind: "boolean", required: false, values: &[] },
6284 Field { name: "skip_busy", kind: "boolean", required: false, values: &[] },
6285 ],
6286 },
6287 Operation {
6288 id: "update_team",
6289 method: "PATCH",
6290 path: "/workspaces/{workspace}/teams/{team}",
6291 tag: "Teams",
6292 summary: "Update a team",
6293 scope: Some("workspace:admin"),
6294 params: &[
6295 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
6296 Param { name: "team", location: In::Path, kind: "string", required: true, values: &[] },
6297 ],
6298 body: &[
6299 Field { name: "description", kind: "string", required: false, values: &[] },
6300 Field { name: "name", kind: "string", required: false, values: &[] },
6301 Field { name: "notify", kind: "boolean", required: false, values: &[] },
6302 Field { name: "parent", kind: "string", required: false, values: &[] },
6303 Field { name: "review_assignment", kind: "object", required: false, values: &[] },
6304 Field { name: "slug", kind: "string", required: false, values: &[] },
6305 Field { name: "visibility", kind: "string", required: false, values: &["visible", "secret"] },
6306 ],
6307 },
6308 Operation {
6309 id: "create_webhook",
6310 method: "POST",
6311 path: "/repos/{owner}/{name}/hooks",
6312 tag: "Webhooks",
6313 summary: "Create a webhook",
6314 scope: Some("webhooks:admin"),
6315 params: &[
6316 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
6317 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
6318 ],
6319 body: &[
6320 Field { name: "events", kind: "array", required: false, values: &[] },
6321 Field { name: "secret", kind: "string", required: false, values: &[] },
6322 Field { name: "url", kind: "string", required: true, values: &[] },
6323 Field { name: "workspace", kind: "string", required: false, values: &[] },
6324 ],
6325 },
6326 Operation {
6327 id: "create_webhook_for_workspace",
6328 method: "POST",
6329 path: "/workspaces/{workspace}/hooks",
6330 tag: "Webhooks",
6331 summary: "Create a webhook for a workspace",
6332 scope: Some("webhooks:admin"),
6333 params: &[
6334 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
6335 ],
6336 body: &[
6337 Field { name: "events", kind: "array", required: false, values: &[] },
6338 Field { name: "secret", kind: "string", required: false, values: &[] },
6339 Field { name: "url", kind: "string", required: true, values: &[] },
6340 ],
6341 },
6342 Operation {
6343 id: "delete_webhook",
6344 method: "DELETE",
6345 path: "/repos/{owner}/{name}/hooks/{id}",
6346 tag: "Webhooks",
6347 summary: "Delete a webhook",
6348 scope: Some("webhooks:admin"),
6349 params: &[
6350 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
6351 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
6352 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
6353 ],
6354 body: &[
6355 Field { name: "workspace", kind: "string", required: false, values: &[] },
6356 ],
6357 },
6358 Operation {
6359 id: "delete_webhook_for_workspace",
6360 method: "DELETE",
6361 path: "/workspaces/{workspace}/hooks/{id}",
6362 tag: "Webhooks",
6363 summary: "Delete a webhook for a workspace",
6364 scope: Some("webhooks:admin"),
6365 params: &[
6366 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
6367 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
6368 ],
6369 body: &[],
6370 },
6371 Operation {
6372 id: "list_webhook_deliveries",
6373 method: "GET",
6374 path: "/repos/{owner}/{name}/hooks/{id}/deliveries",
6375 tag: "Webhooks",
6376 summary: "List webhook deliveries",
6377 scope: Some("webhooks:read"),
6378 params: &[
6379 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
6380 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
6381 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
6382 ],
6383 body: &[],
6384 },
6385 Operation {
6386 id: "list_webhook_deliveries_for_workspace",
6387 method: "GET",
6388 path: "/workspaces/{workspace}/hooks/{id}/deliveries",
6389 tag: "Webhooks",
6390 summary: "List webhook deliveries for a workspace",
6391 scope: Some("webhooks:read"),
6392 params: &[
6393 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
6394 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
6395 ],
6396 body: &[],
6397 },
6398 Operation {
6399 id: "list_webhooks",
6400 method: "GET",
6401 path: "/repos/{owner}/{name}/hooks",
6402 tag: "Webhooks",
6403 summary: "List webhooks",
6404 scope: Some("webhooks:read"),
6405 params: &[
6406 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
6407 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
6408 ],
6409 body: &[],
6410 },
6411 Operation {
6412 id: "list_webhooks_for_workspace",
6413 method: "GET",
6414 path: "/workspaces/{workspace}/hooks",
6415 tag: "Webhooks",
6416 summary: "List webhooks for a workspace",
6417 scope: Some("webhooks:read"),
6418 params: &[
6419 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
6420 ],
6421 body: &[],
6422 },
6423 Operation {
6424 id: "ping_webhook",
6425 method: "POST",
6426 path: "/repos/{owner}/{name}/hooks/{id}/pings",
6427 tag: "Webhooks",
6428 summary: "Ping a webhook",
6429 scope: Some("webhooks:admin"),
6430 params: &[
6431 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
6432 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
6433 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
6434 ],
6435 body: &[
6436 Field { name: "workspace", kind: "string", required: false, values: &[] },
6437 ],
6438 },
6439 Operation {
6440 id: "ping_webhook_for_workspace",
6441 method: "POST",
6442 path: "/workspaces/{workspace}/hooks/{id}/pings",
6443 tag: "Webhooks",
6444 summary: "Ping a webhook for a workspace",
6445 scope: Some("webhooks:admin"),
6446 params: &[
6447 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
6448 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
6449 ],
6450 body: &[],
6451 },
6452 Operation {
6453 id: "redeliver_webhook",
6454 method: "POST",
6455 path: "/repos/{owner}/{name}/hooks/{id}/deliveries/{delivery}/redeliver",
6456 tag: "Webhooks",
6457 summary: "Redeliver a webhook delivery",
6458 scope: Some("webhooks:admin"),
6459 params: &[
6460 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
6461 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
6462 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
6463 Param { name: "delivery", location: In::Path, kind: "string", required: true, values: &[] },
6464 ],
6465 body: &[
6466 Field { name: "workspace", kind: "string", required: false, values: &[] },
6467 ],
6468 },
6469 Operation {
6470 id: "redeliver_webhook_for_workspace",
6471 method: "POST",
6472 path: "/workspaces/{workspace}/hooks/{id}/deliveries/{delivery}/redeliver",
6473 tag: "Webhooks",
6474 summary: "Redeliver a webhook delivery for a workspace",
6475 scope: Some("webhooks:admin"),
6476 params: &[
6477 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
6478 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
6479 Param { name: "delivery", location: In::Path, kind: "string", required: true, values: &[] },
6480 ],
6481 body: &[],
6482 },
6483 Operation {
6484 id: "update_webhook",
6485 method: "PATCH",
6486 path: "/repos/{owner}/{name}/hooks/{id}",
6487 tag: "Webhooks",
6488 summary: "Update a webhook",
6489 scope: Some("webhooks:admin"),
6490 params: &[
6491 Param { name: "owner", location: In::Path, kind: "string", required: true, values: &[] },
6492 Param { name: "name", location: In::Path, kind: "string", required: true, values: &[] },
6493 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
6494 ],
6495 body: &[
6496 Field { name: "active", kind: "boolean", required: false, values: &[] },
6497 Field { name: "events", kind: "array", required: false, values: &[] },
6498 Field { name: "url", kind: "string", required: false, values: &[] },
6499 Field { name: "workspace", kind: "string", required: false, values: &[] },
6500 ],
6501 },
6502 Operation {
6503 id: "update_webhook_for_workspace",
6504 method: "PATCH",
6505 path: "/workspaces/{workspace}/hooks/{id}",
6506 tag: "Webhooks",
6507 summary: "Update a webhook for a workspace",
6508 scope: Some("webhooks:admin"),
6509 params: &[
6510 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
6511 Param { name: "id", location: In::Path, kind: "string", required: true, values: &[] },
6512 ],
6513 body: &[
6514 Field { name: "active", kind: "boolean", required: false, values: &[] },
6515 Field { name: "events", kind: "array", required: false, values: &[] },
6516 Field { name: "url", kind: "string", required: false, values: &[] },
6517 ],
6518 },
6519 Operation {
6520 id: "create_workspace",
6521 method: "POST",
6522 path: "/workspaces",
6523 tag: "Workspaces",
6524 summary: "Create a workspace",
6525 scope: Some("workspace:admin"),
6526 params: &[],
6527 body: &[
6528 Field { name: "name", kind: "string", required: false, values: &[] },
6529 Field { name: "slug", kind: "string", required: true, values: &[] },
6530 ],
6531 },
6532 Operation {
6533 id: "delete_workspace",
6534 method: "DELETE",
6535 path: "/workspaces/{workspace}",
6536 tag: "Workspaces",
6537 summary: "Delete a workspace",
6538 scope: Some("workspace:admin"),
6539 params: &[
6540 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
6541 ],
6542 body: &[
6543 Field { name: "confirm", kind: "string", required: true, values: &[] },
6544 ],
6545 },
6546 Operation {
6547 id: "get_workspace",
6548 method: "GET",
6549 path: "/workspaces/{workspace}",
6550 tag: "Workspaces",
6551 summary: "Get a workspace",
6552 scope: Some("workspace:read"),
6553 params: &[
6554 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
6555 ],
6556 body: &[],
6557 },
6558 Operation {
6559 id: "get_workspace_activity",
6560 method: "GET",
6561 path: "/workspaces/{workspace}/activity",
6562 tag: "Workspaces",
6563 summary: "Get a workspace's activity",
6564 scope: Some("repo:read"),
6565 params: &[
6566 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
6567 Param { name: "since", location: In::Query, kind: "string", required: false, values: &[] },
6568 Param { name: "until", location: In::Query, kind: "string", required: false, values: &[] },
6569 Param { name: "kinds", location: In::Query, kind: "array", required: false, values: &[] },
6570 Param { name: "limit", location: In::Query, kind: "integer", required: false, values: &[] },
6571 ],
6572 body: &[],
6573 },
6574 Operation {
6575 id: "update_workspace",
6576 method: "PATCH",
6577 path: "/workspaces/{workspace}",
6578 tag: "Workspaces",
6579 summary: "Update a workspace",
6580 scope: Some("workspace:admin"),
6581 params: &[
6582 Param { name: "workspace", location: In::Path, kind: "string", required: true, values: &[] },
6583 ],
6584 body: &[
6585 Field { name: "base_permission", kind: "string", required: false, values: &["none", "read", "write", "admin"] },
6586 Field { name: "description", kind: "string", required: false, values: &[] },
6587 Field { name: "members_can_change_repo_visibility", kind: "boolean", required: false, values: &[] },
6588 Field { name: "members_can_create_private_repositories", kind: "boolean", required: false, values: &[] },
6589 Field { name: "members_can_create_public_repositories", kind: "boolean", required: false, values: &[] },
6590 Field { name: "members_can_delete_repositories", kind: "boolean", required: false, values: &[] },
6591 Field { name: "members_can_invite_outside_collaborators", kind: "boolean", required: false, values: &[] },
6592 Field { name: "name", kind: "string", required: false, values: &[] },
6593 Field { name: "team_creation", kind: "string", required: false, values: &["members", "owners"] },
6594 Field { name: "two_factor_requirement_enabled", kind: "boolean", required: false, values: &[] },
6595 ],
6596 },
6597];