Skip to content

Commit e5f2f85

Browse files
committed
feat: new endpoints and deprecations coming from restructuring in GitHubs REST API docs
1 parent e710fd6 commit e5f2f85

File tree

2 files changed

+889
-68
lines changed

2 files changed

+889
-68
lines changed

src/generated/endpoints.ts

Lines changed: 84 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,14 @@ const Endpoints: EndpointsDefaultsAndDecorations = {
106106
{ mediaType: { previews: ["machine-man"] } }
107107
],
108108
checkAccountIsAssociatedWithAny: [
109-
"GET /marketplace_listing/accounts/{account_id}"
109+
"GET /marketplace_listing/accounts/{account_id}",
110+
{},
111+
{ renamed: ["apps", "getSubscriptionPlanForAccount"] }
110112
],
111113
checkAccountIsAssociatedWithAnyStubbed: [
112-
"GET /marketplace_listing/stubbed/accounts/{account_id}"
114+
"GET /marketplace_listing/stubbed/accounts/{account_id}",
115+
{},
116+
{ renamed: ["apps", "getSubscriptionPlanForAccountStubbed"] }
113117
],
114118
checkToken: [
115119
"POST /applications/{client_id}/token",
@@ -159,15 +163,29 @@ const Endpoints: EndpointsDefaultsAndDecorations = {
159163
"GET /repos/{owner}/{repo}/installation",
160164
{ mediaType: { previews: ["machine-man"] } }
161165
],
166+
getSubscriptionPlanForAccount: [
167+
"GET /marketplace_listing/accounts/{account_id}"
168+
],
169+
getSubscriptionPlanForAccountStubbed: [
170+
"GET /marketplace_listing/stubbed/accounts/{account_id}"
171+
],
162172
getUserInstallation: [
163173
"GET /users/{username}/installation",
164174
{ mediaType: { previews: ["machine-man"] } }
165175
],
176+
listAccountsForPlan: ["GET /marketplace_listing/plans/{plan_id}/accounts"],
177+
listAccountsForPlanStubbed: [
178+
"GET /marketplace_listing/stubbed/plans/{plan_id}/accounts"
179+
],
166180
listAccountsUserOrOrgOnPlan: [
167-
"GET /marketplace_listing/plans/{plan_id}/accounts"
181+
"GET /marketplace_listing/plans/{plan_id}/accounts",
182+
{},
183+
{ renamed: ["apps", "listAccountsForPlan"] }
168184
],
169185
listAccountsUserOrOrgOnPlanStubbed: [
170-
"GET /marketplace_listing/stubbed/plans/{plan_id}/accounts"
186+
"GET /marketplace_listing/stubbed/plans/{plan_id}/accounts",
187+
{},
188+
{ renamed: ["apps", "listAccountsForPlanStubbed"] }
171189
],
172190
listInstallationReposForAuthenticatedUser: [
173191
"GET /user/installations/{installation_id}/repositories",
@@ -182,17 +200,25 @@ const Endpoints: EndpointsDefaultsAndDecorations = {
182200
{ mediaType: { previews: ["machine-man"] } }
183201
],
184202
listMarketplacePurchasesForAuthenticatedUser: [
185-
"GET /user/marketplace_purchases"
203+
"GET /user/marketplace_purchases",
204+
{},
205+
{ renamed: ["apps", "listSubscriptionsForAuthenticatedUser"] }
186206
],
187207
listMarketplacePurchasesForAuthenticatedUserStubbed: [
188-
"GET /user/marketplace_purchases/stubbed"
208+
"GET /user/marketplace_purchases/stubbed",
209+
{},
210+
{ renamed: ["apps", "listSubscriptionsForAuthenticatedUserStubbed"] }
189211
],
190212
listPlans: ["GET /marketplace_listing/plans"],
191213
listPlansStubbed: ["GET /marketplace_listing/stubbed/plans"],
192214
listRepos: [
193215
"GET /installation/repositories",
194216
{ mediaType: { previews: ["machine-man"] } }
195217
],
218+
listSubscriptionsForAuthenticatedUser: ["GET /user/marketplace_purchases"],
219+
listSubscriptionsForAuthenticatedUserStubbed: [
220+
"GET /user/marketplace_purchases/stubbed"
221+
],
196222
removeRepoFromInstallation: [
197223
"DELETE /user/installations/{installation_id}/repositories/{repository_id}",
198224
{ mediaType: { previews: ["machine-man"] } }
@@ -253,6 +279,10 @@ const Endpoints: EndpointsDefaultsAndDecorations = {
253279
]
254280
},
255281
codesOfConduct: {
282+
getAllCodesOfConduct: [
283+
"GET /codes_of_conduct",
284+
{ mediaType: { previews: ["scarlet-witch"] } }
285+
],
256286
getConductCode: [
257287
"GET /codes_of_conduct/{key}",
258288
{ mediaType: { previews: ["scarlet-witch"] } }
@@ -263,7 +293,8 @@ const Endpoints: EndpointsDefaultsAndDecorations = {
263293
],
264294
listConductCodes: [
265295
"GET /codes_of_conduct",
266-
{ mediaType: { previews: ["scarlet-witch"] } }
296+
{ mediaType: { previews: ["scarlet-witch"] } },
297+
{ renamed: ["codesOfConduct", "getAllCodesOfConduct"] }
267298
]
268299
},
269300
emojis: { get: ["GET /emojis"] },
@@ -280,9 +311,14 @@ const Endpoints: EndpointsDefaultsAndDecorations = {
280311
list: ["GET /gists"],
281312
listComments: ["GET /gists/{gist_id}/comments"],
282313
listCommits: ["GET /gists/{gist_id}/commits"],
314+
listForUser: ["GET /users/{username}/gists"],
283315
listForks: ["GET /gists/{gist_id}/forks"],
284316
listPublic: ["GET /gists/public"],
285-
listPublicForUser: ["GET /users/{username}/gists"],
317+
listPublicForUser: [
318+
"GET /users/{username}/gists",
319+
{},
320+
{ renamed: ["gists", "listForUser"] }
321+
],
286322
listStarred: ["GET /gists/starred"],
287323
star: ["PUT /gists/{gist_id}/star"],
288324
unstar: ["DELETE /gists/{gist_id}/star"],
@@ -380,14 +416,28 @@ const Endpoints: EndpointsDefaultsAndDecorations = {
380416
],
381417
listMilestonesForRepo: ["GET /repos/{owner}/{repo}/milestones"],
382418
lock: ["PUT /repos/{owner}/{repo}/issues/{issue_number}/lock"],
419+
removeAllLabels: [
420+
"DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels"
421+
],
383422
removeAssignees: [
384423
"DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees"
385424
],
386425
removeLabel: [
387426
"DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}"
388427
],
389-
removeLabels: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels"],
390-
replaceLabels: ["PUT /repos/{owner}/{repo}/issues/{issue_number}/labels"],
428+
removeLabels: [
429+
"DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels",
430+
{},
431+
{ renamed: ["issues", "removeAllLabels"] }
432+
],
433+
replaceAllLabels: [
434+
"PUT /repos/{owner}/{repo}/issues/{issue_number}/labels"
435+
],
436+
replaceLabels: [
437+
"PUT /repos/{owner}/{repo}/issues/{issue_number}/labels",
438+
{},
439+
{ renamed: ["issues", "replaceAllLabels"] }
440+
],
391441
unlock: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock"],
392442
update: ["PATCH /repos/{owner}/{repo}/issues/{issue_number}"],
393443
updateComment: ["PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}"],
@@ -852,6 +902,10 @@ const Endpoints: EndpointsDefaultsAndDecorations = {
852902
{ mediaType: { previews: ["dorian"] } }
853903
],
854904
get: ["GET /repos/{owner}/{repo}"],
905+
getAllTopics: [
906+
"GET /repos/{owner}/{repo}/topics",
907+
{ mediaType: { previews: ["mercy"] } }
908+
],
855909
getAppsWithAccessToProtectedBranch: [
856910
"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps"
857911
],
@@ -913,7 +967,11 @@ const Endpoints: EndpointsDefaultsAndDecorations = {
913967
"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users"
914968
],
915969
getViews: ["GET /repos/{owner}/{repo}/traffic/views"],
916-
list: ["GET /user/repos"],
970+
list: [
971+
"GET /user/repos",
972+
{},
973+
{ renamed: ["repos", "listForAuthenticatedUser"] }
974+
],
917975
listAssetsForRelease: [
918976
"GET /repos/{owner}/{repo}/releases/{release_id}/assets"
919977
],
@@ -935,6 +993,7 @@ const Endpoints: EndpointsDefaultsAndDecorations = {
935993
],
936994
listDeployments: ["GET /repos/{owner}/{repo}/deployments"],
937995
listDownloads: ["GET /repos/{owner}/{repo}/downloads"],
996+
listForAuthenticatedUser: ["GET /user/repos"],
938997
listForOrg: ["GET /orgs/{org}/repos"],
939998
listForUser: ["GET /users/{username}/repos"],
940999
listForks: ["GET /repos/{owner}/{repo}/forks"],
@@ -957,7 +1016,8 @@ const Endpoints: EndpointsDefaultsAndDecorations = {
9571016
listTeams: ["GET /repos/{owner}/{repo}/teams"],
9581017
listTopics: [
9591018
"GET /repos/{owner}/{repo}/topics",
960-
{ mediaType: { previews: ["mercy"] } }
1019+
{ mediaType: { previews: ["mercy"] } },
1020+
{ renamed: ["repos", "getAllTopics"] }
9611021
],
9621022
merge: ["POST /repos/{owner}/{repo}/merges"],
9631023
pingHook: ["POST /repos/{owner}/{repo}/hooks/{hook_id}/pings"],
@@ -1004,6 +1064,10 @@ const Endpoints: EndpointsDefaultsAndDecorations = {
10041064
{},
10051065
{ mapToData: "users" }
10061066
],
1067+
replaceAllTopics: [
1068+
"PUT /repos/{owner}/{repo}/topics",
1069+
{ mediaType: { previews: ["mercy"] } }
1070+
],
10071071
replaceProtectedBranchAppRestrictions: [
10081072
"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps",
10091073
{},
@@ -1026,7 +1090,8 @@ const Endpoints: EndpointsDefaultsAndDecorations = {
10261090
],
10271091
replaceTopics: [
10281092
"PUT /repos/{owner}/{repo}/topics",
1029-
{ mediaType: { previews: ["mercy"] } }
1093+
{ mediaType: { previews: ["mercy"] } },
1094+
{ renamed: ["repos", "replaceAllTopics"] }
10301095
],
10311096
requestPageBuild: ["POST /repos/{owner}/{repo}/pages/builds"],
10321097
retrieveCommunityProfileMetrics: [
@@ -1161,9 +1226,14 @@ const Endpoints: EndpointsDefaultsAndDecorations = {
11611226
list: ["GET /users"],
11621227
listBlocked: ["GET /user/blocks"],
11631228
listEmails: ["GET /user/emails"],
1229+
listFollowedByAuthenticated: ["GET /user/following"],
11641230
listFollowersForAuthenticatedUser: ["GET /user/followers"],
11651231
listFollowersForUser: ["GET /users/{username}/followers"],
1166-
listFollowingForAuthenticatedUser: ["GET /user/following"],
1232+
listFollowingForAuthenticatedUser: [
1233+
"GET /user/following",
1234+
{},
1235+
{ renamed: ["users", "listFollowedByAuthenticated"] }
1236+
],
11671237
listFollowingForUser: ["GET /users/{username}/following"],
11681238
listGpgKeys: ["GET /user/gpg_keys"],
11691239
listGpgKeysForUser: ["GET /users/{username}/gpg_keys"],

0 commit comments

Comments
 (0)