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