-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathtypes.ts
26929 lines (26927 loc) · 922 KB
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/**
* This file was auto-generated by openapi-typescript.
* Do not make direct changes to the file.
*/
export interface paths {
"/": {
/**
* Get Hypermedia links to resources accessible in GitHub's REST API
*/
get: {
responses: {
/**
* response
*/
"200": {
"application/json": {
current_user_url: string;
current_user_authorizations_html_url: string;
authorizations_url: string;
code_search_url: string;
commit_search_url: string;
emails_url: string;
emojis_url: string;
events_url: string;
feeds_url: string;
followers_url: string;
following_url: string;
gists_url: string;
hub_url: string;
issue_search_url: string;
issues_url: string;
keys_url: string;
label_search_url: string;
notifications_url: string;
organization_url: string;
organization_repositories_url: string;
organization_teams_url: string;
public_gists_url: string;
rate_limit_url: string;
repository_url: string;
repository_search_url: string;
current_user_repositories_url: string;
starred_url: string;
starred_gists_url: string;
topic_search_url?: string;
user_url: string;
user_organizations_url: string;
user_repositories_url: string;
user_search_url: string;
};
};
};
};
};
"/app": {
/**
* Returns the GitHub App associated with the authentication credentials used. To see how many app installations are associated with this GitHub App, see the `installations_count` in the response. For more details about your app's installations, see the "[List installations for the authenticated app](https://developer.github.com/v3/apps/#list-installations-for-the-authenticated-app)" endpoint.
*
* You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
*/
get: {
parameters: {};
responses: {
/**
* response
*/
"200": {
"application/json": components["schemas"]["integration"];
};
};
};
};
"/app-manifests/{code}/conversions": {
/**
* Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://developer.github.com/apps/building-github-apps/creating-github-apps-from-a-manifest/). When you create a GitHub App with the manifest flow, you receive a temporary `code` used to retrieve the GitHub App's `id`, `pem` (private key), and `webhook_secret`.
*/
post: {
parameters: {
path: {
code: string;
};
};
responses: {
/**
* response
*/
"201": {
"application/json": components["schemas"]["integration"] &
({
client_id: string;
client_secret: string;
webhook_secret: string;
pem: string;
} & { [key: string]: any });
};
"404": unknown;
"422": unknown;
};
};
};
"/app/hook/config": {
/**
* Returns the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)."
*
* You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
*/
get: {
responses: {
/**
* Default response
*/
"200": {
"application/json": components["schemas"]["webhook-config"];
};
};
};
/**
* Updates the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)."
*
* You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
*/
patch: {
requestBody: {
"application/json": {
url?: components["schemas"]["webhook-config-url"];
content_type?: components["schemas"]["webhook-config-content-type"];
secret?: components["schemas"]["webhook-config-secret"];
insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"];
};
};
responses: {
/**
* Default response
*/
"200": {
"application/json": components["schemas"]["webhook-config"];
};
};
};
};
"/app/installations": {
/**
* You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
*
* The permissions the installation has are included under the `permissions` key.
*/
get: {
parameters: {
query: {
per_page?: components["parameters"]["per_page"];
page?: components["parameters"]["page"];
since?: components["parameters"]["since"];
outdated?: string;
};
};
responses: {
/**
* The permissions the installation has are included under the `permissions` key.
*/
"200": {
"application/json": components["schemas"]["installation"][];
};
};
};
};
"/app/installations/{installation_id}": {
/**
* Enables an authenticated GitHub App to find an installation's information using the installation id. The installation's account type (`target_type`) will be either an organization or a user account, depending which account the repository belongs to.
*
* You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
*/
get: {
parameters: {
path: {
installation_id: components["parameters"]["installation_id"];
};
};
responses: {
/**
* response
*/
"200": {
"application/json": components["schemas"]["installation"];
};
"404": unknown;
"415": unknown;
};
};
/**
* Uninstalls a GitHub App on a user, organization, or business account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an app installation](https://developer.github.com/v3/apps/#suspend-an-app-installation)" endpoint.
*
* You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
*/
delete: {
parameters: {
path: {
installation_id: components["parameters"]["installation_id"];
};
};
responses: {
/**
* Empty response
*/
"204": never;
"404": unknown;
};
};
};
"/app/installations/{installation_id}/access_tokens": {
/**
* Creates an installation access token that enables a GitHub App to make authenticated API requests for the app's installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of `401 - Unauthorized`, and requires creating a new installation token. By default the installation token has access to all repositories that the installation can access. To restrict the access to specific repositories, you can provide the `repository_ids` when creating the token. When you omit `repository_ids`, the response does not contain the `repositories` key.
*
* You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
*/
post: {
parameters: {
path: {
installation_id: components["parameters"]["installation_id"];
};
};
requestBody: {
"application/json": {
/**
* List of repository names that the token should have access to
*/
repositories?: string[];
/**
* List of repository IDs that the token should have access to
*/
repository_ids?: number[];
permissions?: {
contents?: string;
issues?: string;
deployments?: string;
single_file?: string;
def_not_a_repo?: string;
};
};
};
responses: {
/**
* response
*/
"201": {
"application/json": components["schemas"]["installation-token"];
};
"401": unknown;
"403": unknown;
"404": unknown;
"415": unknown;
"422": unknown;
};
};
};
"/app/installations/{installation_id}/suspended": {
/**
* **Note:** Suspending a GitHub App installation is currently in beta and subject to change. Before you can suspend a GitHub App, the app owner must enable suspending installations for the app by opting-in to the beta. For more information, see "[Suspending a GitHub App installation](https://developer.github.com/apps/managing-github-apps/suspending-a-github-app-installation/)."
*
* Suspends a GitHub App on a user, organization, or business account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account.
*
* To suspend a GitHub App, you must be an account owner or have admin permissions in the repository or organization where the app is installed.
*
* You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
*/
put: {
parameters: {
path: {
installation_id: components["parameters"]["installation_id"];
};
};
responses: {
/**
* Empty response
*/
"204": never;
"404": unknown;
};
};
/**
* **Note:** Suspending a GitHub App installation is currently in beta and subject to change. Before you can suspend a GitHub App, the app owner must enable suspending installations for the app by opting-in to the beta. For more information, see "[Suspending a GitHub App installation](https://developer.github.com/apps/managing-github-apps/suspending-a-github-app-installation/)."
*
* Removes a GitHub App installation suspension.
*
* To unsuspend a GitHub App, you must be an account owner or have admin permissions in the repository or organization where the app is installed and suspended.
*
* You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
*/
delete: {
parameters: {
path: {
installation_id: components["parameters"]["installation_id"];
};
};
responses: {
/**
* Empty response
*/
"204": never;
"404": unknown;
};
};
};
"/applications/grants": {
/**
* **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
*
* You can use this API to list the set of OAuth applications that have been granted access to your account. Unlike the [list your authorizations](https://developer.github.com/v3/oauth_authorizations/#list-your-authorizations) API, this API does not manage individual tokens. This API will return one entry for each OAuth application that has been granted access to your account, regardless of the number of tokens an application has generated for your user. The list of OAuth applications returned matches what is shown on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). The `scopes` returned are the union of scopes authorized for the application. For example, if an application has one token with `repo` scope and another token with `user` scope, the grant will return `["repo", "user"]`.
*/
get: {
parameters: {
query: {
per_page?: components["parameters"]["per_page"];
page?: components["parameters"]["page"];
};
};
responses: {
/**
* response
*/
"200": {
"application/json": components["schemas"]["application-grant"][];
};
"304": never;
"401": unknown;
"403": unknown;
"404": unknown;
};
};
};
"/applications/grants/{grant_id}": {
/**
* **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
*/
get: {
parameters: {
path: {
grant_id: components["parameters"]["grant_id"];
};
};
responses: {
/**
* response
*/
"200": {
"application/json": components["schemas"]["application-grant"];
};
"304": never;
"401": unknown;
"403": unknown;
};
};
/**
* **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
*
* Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for your user. Once deleted, the application has no access to your account and is no longer listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized).
*/
delete: {
parameters: {
path: {
grant_id: components["parameters"]["grant_id"];
};
};
responses: {
/**
* Empty response
*/
"204": never;
"304": never;
"401": unknown;
"403": unknown;
};
};
};
"/applications/{client_id}/grant": {
/**
* OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted.
* Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized).
*/
delete: {
parameters: {
path: {
client_id: components["parameters"]["client-id"];
};
};
requestBody: {
"application/json": {
/**
* The OAuth access token used to authenticate to the GitHub API.
*/
access_token?: string;
};
};
responses: {
/**
* Empty response
*/
"204": never;
"422": unknown;
};
};
};
"/applications/{client_id}/grants/{access_token}": {
/**
* **Deprecation Notice:** GitHub will replace and discontinue OAuth endpoints containing `access_token` in the path parameter. We are introducing new endpoints that allow you to securely manage tokens for OAuth Apps by using `access_token` as an input parameter. The OAuth Application API will be removed on May 5, 2021. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/).
*
* OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid token as `:access_token` and the grant for the token's owner will be deleted.
*
* Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the Applications settings page under "Authorized OAuth Apps" on GitHub](https://github.com/settings/applications#authorized).
*/
delete: {
parameters: {
path: {
client_id: components["parameters"]["client-id"];
access_token: components["parameters"]["access-token"];
};
};
responses: {
/**
* Empty response
*/
"204": never;
};
};
};
"/applications/{client_id}/token": {
/**
* OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`.
*/
post: {
parameters: {
path: {
client_id: components["parameters"]["client-id"];
};
};
requestBody: {
"application/json": {
/**
* The access_token of the OAuth application.
*/
access_token: string;
};
};
responses: {
/**
* response
*/
"200": {
"application/json": components["schemas"]["authorization"];
};
"404": unknown;
"422": unknown;
};
};
/**
* OAuth applications can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`.
*/
patch: {
parameters: {
path: {
client_id: components["parameters"]["client-id"];
};
};
requestBody: {
"application/json": {
/**
* The access_token of the OAuth application.
*/
access_token: string;
};
};
responses: {
/**
* response
*/
"200": {
"application/json": components["schemas"]["authorization"];
};
"422": unknown;
};
};
/**
* OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password.
*/
delete: {
parameters: {
path: {
client_id: components["parameters"]["client-id"];
};
};
requestBody: {
"application/json": {
/**
* The OAuth access token used to authenticate to the GitHub API.
*/
access_token?: string;
};
};
responses: {
/**
* Empty response
*/
"204": never;
"422": unknown;
};
};
};
"/applications/{client_id}/tokens/{access_token}": {
/**
* **Deprecation Notice:** GitHub will replace and discontinue OAuth endpoints containing `access_token` in the path parameter. We are introducing new endpoints that allow you to securely manage tokens for OAuth Apps by using `access_token` as an input parameter. The OAuth Application API will be removed on May 5, 2021. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/).
*
* OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`.
*/
get: {
parameters: {
path: {
client_id: components["parameters"]["client-id"];
access_token: components["parameters"]["access-token"];
};
};
responses: {
/**
* response
*/
"200": {
"application/json": components["schemas"]["authorization"];
};
"404": unknown;
};
};
/**
* **Deprecation Notice:** GitHub will replace and discontinue OAuth endpoints containing `access_token` in the path parameter. We are introducing new endpoints that allow you to securely manage tokens for OAuth Apps by using `access_token` as an input parameter. The OAuth Application API will be removed on May 5, 2021. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/).
*
* OAuth applications can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`.
*/
post: {
parameters: {
path: {
client_id: components["parameters"]["client-id"];
access_token: components["parameters"]["access-token"];
};
};
responses: {
/**
* response
*/
"200": {
"application/json": components["schemas"]["authorization"];
};
};
};
/**
* **Deprecation Notice:** GitHub will replace and discontinue OAuth endpoints containing `access_token` in the path parameter. We are introducing new endpoints that allow you to securely manage tokens for OAuth Apps by using `access_token` as an input parameter. The OAuth Application API will be removed on May 5, 2021. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/).
*
* OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password.
*/
delete: {
parameters: {
path: {
client_id: components["parameters"]["client-id"];
access_token: components["parameters"]["access-token"];
};
};
responses: {
/**
* Empty response
*/
"204": never;
};
};
};
"/apps/{app_slug}": {
/**
* **Note**: The `:app_slug` is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., `https://github.com/settings/apps/:app_slug`).
*
* If the GitHub App you specify is public, you can access this endpoint without authenticating. If the GitHub App you specify is private, you must authenticate with a [personal access token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.
*/
get: {
parameters: {
path: {
app_slug: components["parameters"]["app_slug"];
};
};
responses: {
/**
* response
*/
"200": {
"application/json": components["schemas"]["integration"];
};
"403": unknown;
"404": unknown;
"415": unknown;
};
};
};
"/authorizations": {
/**
* **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
*/
get: {
parameters: {
query: {
per_page?: components["parameters"]["per_page"];
page?: components["parameters"]["page"];
};
};
responses: {
/**
* response
*/
"200": {
"application/json": components["schemas"]["authorization"][];
};
"304": never;
"401": unknown;
"403": unknown;
"404": unknown;
};
};
/**
* **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
*
* **Warning:** Apps must use the [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api).
*
* Creates OAuth tokens using [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication). If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://developer.github.com/v3/auth/#working-with-two-factor-authentication)."
*
* To create tokens for a particular OAuth application using this endpoint, you must authenticate as the user you want to create an authorization for and provide the app's client ID and secret, found on your OAuth application's settings page. If your OAuth application intends to create multiple tokens for one user, use `fingerprint` to differentiate between them.
*
* You can also create tokens on GitHub from the [personal access tokens settings](https://github.com/settings/tokens) page. Read more about these tokens in [the GitHub Help documentation](https://help.github.com/articles/creating-an-access-token-for-command-line-use).
*
* Organizations that enforce SAML SSO require personal access tokens to be allowed. Read more about allowing tokens in [the GitHub Help documentation](https://help.github.com/articles/about-identity-and-access-management-with-saml-single-sign-on).
*/
post: {
parameters: {};
requestBody: {
"application/json": {
/**
* A list of scopes that this authorization is in.
*/
scopes?: string[] | null;
/**
* A note to remind you what the OAuth token is for.
*/
note?: string;
/**
* A URL to remind you what app the OAuth token is for.
*/
note_url?: string;
/**
* The OAuth app client key for which to create the token.
*/
client_id?: string;
/**
* The OAuth app client secret for which to create the token.
*/
client_secret?: string;
/**
* A unique string to distinguish an authorization from others created for the same client ID and user.
*/
fingerprint?: string;
};
};
responses: {
/**
* response
*/
"201": {
"application/json": components["schemas"]["authorization"];
};
"304": never;
"401": unknown;
"403": unknown;
"410": unknown;
"422": unknown;
};
};
};
"/authorizations/clients/{client_id}": {
/**
* **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
*
* **Warning:** Apps must use the [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api).
*
* Creates a new authorization for the specified OAuth application, only if an authorization for that application doesn't already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one.
*
* If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://developer.github.com/v3/auth/#working-with-two-factor-authentication)."
*
* **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
*/
put: {
parameters: {
path: {
client_id: components["parameters"]["client-id"];
};
};
requestBody: {
"application/json": {
/**
* The OAuth app client secret for which to create the token.
*/
client_secret: string;
/**
* A list of scopes that this authorization is in.
*/
scopes?: string[] | null;
/**
* A note to remind you what the OAuth token is for.
*/
note?: string;
/**
* A URL to remind you what app the OAuth token is for.
*/
note_url?: string;
/**
* A unique string to distinguish an authorization from others created for the same client ID and user.
*/
fingerprint?: string;
};
};
responses: {
/**
* Response if returning an existing token
*/
"200": {
"application/json": components["schemas"]["authorization"];
};
/**
* **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
*/
"201": {
"application/json": components["schemas"]["authorization"];
};
"304": never;
"401": unknown;
"403": unknown;
"422": unknown;
};
};
};
"/authorizations/clients/{client_id}/{fingerprint}": {
/**
* **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
*
* **Warning:** Apps must use the [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api).
*
* This method will create a new authorization for the specified OAuth application, only if an authorization for that application and fingerprint do not already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. `fingerprint` is a unique string to distinguish an authorization from others created for the same client ID and user. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one.
*
* If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://developer.github.com/v3/auth/#working-with-two-factor-authentication)."
*/
put: {
parameters: {
path: {
client_id: components["parameters"]["client-id"];
fingerprint: string;
};
};
requestBody: {
"application/json": {
/**
* The OAuth app client secret for which to create the token.
*/
client_secret: string;
/**
* A list of scopes that this authorization is in.
*/
scopes?: string[] | null;
/**
* A note to remind you what the OAuth token is for.
*/
note?: string;
/**
* A URL to remind you what app the OAuth token is for.
*/
note_url?: string;
};
};
responses: {
/**
* Response if returning an existing token
*/
"200": {
"application/json": components["schemas"]["authorization"];
};
/**
* Response if returning a new token
*/
"201": {
"application/json": components["schemas"]["authorization"];
};
"422": unknown;
};
};
};
"/authorizations/{authorization_id}": {
/**
* **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
*/
get: {
parameters: {
path: {
authorization_id: components["parameters"]["authorization_id"];
};
};
responses: {
/**
* response
*/
"200": {
"application/json": components["schemas"]["authorization"];
};
"304": never;
"401": unknown;
"403": unknown;
};
};
/**
* **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
*
* If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://developer.github.com/v3/auth/#working-with-two-factor-authentication)."
*
* You can only send one of these scope keys at a time.
*/
patch: {
parameters: {
path: {
authorization_id: components["parameters"]["authorization_id"];
};
};
requestBody: {
"application/json": {
/**
* A list of scopes that this authorization is in.
*/
scopes?: string[] | null;
/**
* A list of scopes to add to this authorization.
*/
add_scopes?: string[];
/**
* A list of scopes to remove from this authorization.
*/
remove_scopes?: string[];
/**
* A note to remind you what the OAuth token is for.
*/
note?: string;
/**
* A URL to remind you what app the OAuth token is for.
*/
note_url?: string;
/**
* A unique string to distinguish an authorization from others created for the same client ID and user.
*/
fingerprint?: string;
};
};
responses: {
/**
* response
*/
"200": {
"application/json": components["schemas"]["authorization"];
};
"422": unknown;
};
};
/**
* **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
*/
delete: {
parameters: {
path: {
authorization_id: components["parameters"]["authorization_id"];
};
};
responses: {
/**
* Empty response
*/
"204": never;
"304": never;
"401": unknown;
"403": unknown;
};
};
};
"/codes_of_conduct": {
get: {
parameters: {};
responses: {
/**
* response
*/
"200": {
"application/json": components["schemas"]["code-of-conduct"][];
};
"304": never;
"415": unknown;
};
};
};
"/codes_of_conduct/{key}": {
get: {
parameters: {
path: {
key: string;
};
};
responses: {
/**
* response
*/
"200": {
"application/json": components["schemas"]["code-of-conduct"];
};
"304": never;
"404": unknown;
"415": unknown;
};
};
};
"/content_references/{content_reference_id}/attachments": {
/**
* Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` of the content reference from the [`content_reference` event](https://developer.github.com/webhooks/event-payloads/#content_reference) to create an attachment.
*
* The app must create a content attachment within six hours of the content reference URL being posted. See "[Using content attachments](https://developer.github.com/apps/using-content-attachments/)" for details about content attachments.
*
* You must use an [installation access token](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.
*/
post: {
parameters: {
path: {
content_reference_id: number;
};
};
requestBody: {
"application/json": {
/**
* The title of the attachment
*/
title: string;
/**
* The body of the attachment
*/
body: string;
};
};
responses: {
/**
* response
*/
"200": {
"application/json": components["schemas"]["content-reference-attachment"];
};
"304": never;
"403": unknown;
"404": unknown;
"410": unknown;
"415": unknown;
"422": unknown;
};
};
};
"/emojis": {
/**
* Lists all the emojis available to use on GitHub.
*/
get: {
parameters: {};
responses: {
/**
* response
*/
"200": {
"application/json": { [key: string]: string };
};
"304": never;
};
};
};
"/enterprises/{enterprise}/actions/permissions": {
/**
* Gets the GitHub Actions permissions policy for organizations and allowed actions in an enterprise.
*
* You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
*/
get: {
parameters: {
path: {
enterprise: components["parameters"]["enterprise"];
};
};
responses: {
/**
* response
*/
"200": {
"application/json": components["schemas"]["actions-enterprise-permissions"];
};