Skip to content

Commit 3b3da2b

Browse files
committed
feat: add support for new Security Managers APIs (addSecurityManagerTeam, listSecurityManagerTeams, removeSecurityManagerTeam)
1 parent ff025a2 commit 3b3da2b

File tree

3 files changed

+80
-0
lines changed

3 files changed

+80
-0
lines changed

src/generated/endpoints.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -818,6 +818,9 @@ const Endpoints: EndpointsDefaultsAndDecorations = {
818818
updateImport: ["PATCH /repos/{owner}/{repo}/import"],
819819
},
820820
orgs: {
821+
addSecurityManagerTeam: [
822+
"PUT /orgs/{org}/security-managers/teams/{team_slug}",
823+
],
821824
blockUser: ["PUT /orgs/{org}/blocks/{username}"],
822825
cancelInvitation: ["DELETE /orgs/{org}/invitations/{invitation_id}"],
823826
checkBlockedUser: ["GET /orgs/{org}/blocks/{username}"],
@@ -850,6 +853,7 @@ const Endpoints: EndpointsDefaultsAndDecorations = {
850853
listOutsideCollaborators: ["GET /orgs/{org}/outside_collaborators"],
851854
listPendingInvitations: ["GET /orgs/{org}/invitations"],
852855
listPublicMembers: ["GET /orgs/{org}/public_members"],
856+
listSecurityManagerTeams: ["GET /orgs/{org}/security-managers"],
853857
listWebhookDeliveries: ["GET /orgs/{org}/hooks/{hook_id}/deliveries"],
854858
listWebhooks: ["GET /orgs/{org}/hooks"],
855859
pingWebhook: ["POST /orgs/{org}/hooks/{hook_id}/pings"],
@@ -864,6 +868,9 @@ const Endpoints: EndpointsDefaultsAndDecorations = {
864868
removePublicMembershipForAuthenticatedUser: [
865869
"DELETE /orgs/{org}/public_members/{username}",
866870
],
871+
removeSecurityManagerTeam: [
872+
"DELETE /orgs/{org}/security-managers/teams/{team_slug}",
873+
],
867874
setMembershipForUser: ["PUT /orgs/{org}/memberships/{username}"],
868875
setPublicMembershipForAuthenticatedUser: [
869876
"PUT /orgs/{org}/public_members/{username}",

src/generated/method-types.ts

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5845,6 +5845,23 @@ export type RestEndpointMethods = {
58455845
};
58465846
};
58475847
orgs: {
5848+
/**
5849+
* Adds a team as a security manager for an organization. For more information, see "[Managing security for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization) for an organization."
5850+
*
5851+
* To use this endpoint, you must be an administrator for the organization, and you must use an access token with the `write:org` scope.
5852+
*
5853+
* GitHub Apps must have the `administration` organization read-write permission to use this endpoint.
5854+
*/
5855+
addSecurityManagerTeam: {
5856+
(
5857+
params?: RestEndpointMethodTypes["orgs"]["addSecurityManagerTeam"]["parameters"]
5858+
): Promise<
5859+
RestEndpointMethodTypes["orgs"]["addSecurityManagerTeam"]["response"]
5860+
>;
5861+
defaults: RequestInterface["defaults"];
5862+
endpoint: EndpointInterface<{ url: string }>;
5863+
};
5864+
58485865
blockUser: {
58495866
(
58505867
params?: RestEndpointMethodTypes["orgs"]["blockUser"]["parameters"]
@@ -6171,6 +6188,22 @@ export type RestEndpointMethods = {
61716188
defaults: RequestInterface["defaults"];
61726189
endpoint: EndpointInterface<{ url: string }>;
61736190
};
6191+
/**
6192+
* Lists teams that are security managers for an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."
6193+
*
6194+
* To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `read:org` scope.
6195+
*
6196+
* GitHub Apps must have the `administration` organization read permission to use this endpoint.
6197+
*/
6198+
listSecurityManagerTeams: {
6199+
(
6200+
params?: RestEndpointMethodTypes["orgs"]["listSecurityManagerTeams"]["parameters"]
6201+
): Promise<
6202+
RestEndpointMethodTypes["orgs"]["listSecurityManagerTeams"]["response"]
6203+
>;
6204+
defaults: RequestInterface["defaults"];
6205+
endpoint: EndpointInterface<{ url: string }>;
6206+
};
61746207
/**
61756208
* Returns a list of webhook deliveries for a webhook configured in an organization.
61766209
*/
@@ -6259,6 +6292,22 @@ export type RestEndpointMethods = {
62596292
defaults: RequestInterface["defaults"];
62606293
endpoint: EndpointInterface<{ url: string }>;
62616294
};
6295+
/**
6296+
* Removes the security manager role from a team for an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization) team from an organization."
6297+
*
6298+
* To use this endpoint, you must be an administrator for the organization, and you must use an access token with the `admin:org` scope.
6299+
*
6300+
* GitHub Apps must have the `administration` organization read-write permission to use this endpoint.
6301+
*/
6302+
removeSecurityManagerTeam: {
6303+
(
6304+
params?: RestEndpointMethodTypes["orgs"]["removeSecurityManagerTeam"]["parameters"]
6305+
): Promise<
6306+
RestEndpointMethodTypes["orgs"]["removeSecurityManagerTeam"]["response"]
6307+
>;
6308+
defaults: RequestInterface["defaults"];
6309+
endpoint: EndpointInterface<{ url: string }>;
6310+
};
62626311
/**
62636312
* Only authenticated organization owners can add a member to the organization or update the member's role.
62646313
*

src/generated/parameters-and-response-types.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3132,6 +3132,14 @@ export type RestEndpointMethodTypes = {
31323132
};
31333133
};
31343134
orgs: {
3135+
addSecurityManagerTeam: {
3136+
parameters: RequestParameters &
3137+
Omit<
3138+
Endpoints["PUT /orgs/{org}/security-managers/teams/{team_slug}"]["parameters"],
3139+
"baseUrl" | "headers" | "mediaType"
3140+
>;
3141+
response: Endpoints["PUT /orgs/{org}/security-managers/teams/{team_slug}"]["response"];
3142+
};
31353143
blockUser: {
31363144
parameters: RequestParameters &
31373145
Omit<
@@ -3356,6 +3364,14 @@ export type RestEndpointMethodTypes = {
33563364
>;
33573365
response: Endpoints["GET /orgs/{org}/public_members"]["response"];
33583366
};
3367+
listSecurityManagerTeams: {
3368+
parameters: RequestParameters &
3369+
Omit<
3370+
Endpoints["GET /orgs/{org}/security-managers"]["parameters"],
3371+
"baseUrl" | "headers" | "mediaType"
3372+
>;
3373+
response: Endpoints["GET /orgs/{org}/security-managers"]["response"];
3374+
};
33593375
listWebhookDeliveries: {
33603376
parameters: RequestParameters &
33613377
Omit<
@@ -3420,6 +3436,14 @@ export type RestEndpointMethodTypes = {
34203436
>;
34213437
response: Endpoints["DELETE /orgs/{org}/public_members/{username}"]["response"];
34223438
};
3439+
removeSecurityManagerTeam: {
3440+
parameters: RequestParameters &
3441+
Omit<
3442+
Endpoints["DELETE /orgs/{org}/security-managers/teams/{team_slug}"]["parameters"],
3443+
"baseUrl" | "headers" | "mediaType"
3444+
>;
3445+
response: Endpoints["DELETE /orgs/{org}/security-managers/teams/{team_slug}"]["response"];
3446+
};
34233447
setMembershipForUser: {
34243448
parameters: RequestParameters &
34253449
Omit<

0 commit comments

Comments
 (0)