diff --git a/src/management/__generated/managers/organizations-manager.ts b/src/management/__generated/managers/organizations-manager.ts index 2b2d5ff2d..f697f9789 100644 --- a/src/management/__generated/managers/organizations-manager.ts +++ b/src/management/__generated/managers/organizations-manager.ts @@ -9,6 +9,7 @@ import type { GetInvitations200ResponseOneOfInner, GetMembers200Response, GetOrganizationClientGrants200Response, + GetOrganizationClientGrants200ResponseOneOfInner, GetOrganizationMemberRoles200Response, GetOrganizations200Response, GetOrganizations200ResponseOneOfInner, @@ -17,6 +18,7 @@ import type { PostEnabledConnectionsRequest, PostInvitationsRequest, PostMembersRequest, + PostOrganizationClientGrantsRequest, PostOrganizationMemberRolesRequest, PostOrganizations201Response, PostOrganizationsRequest, @@ -25,10 +27,10 @@ import type { GetMembers200ResponseOneOf, GetMembers200ResponseOneOfInner, GetOrganizationClientGrants200ResponseOneOf, - GetOrganizationClientGrants200ResponseOneOfInner, GetOrganizationMemberRoles200ResponseOneOf, GetOrganizationMemberRoles200ResponseOneOfInner, GetOrganizations200ResponseOneOf, + DeleteClientGrantsByGrantIdRequest, DeleteEnabledConnectionsByConnectionIdRequest, DeleteInvitationsByInvitationIdRequest, DeleteMembersOperationRequest, @@ -49,6 +51,7 @@ import type { PostEnabledConnectionsOperationRequest, PostInvitationsOperationRequest, PostMembersOperationRequest, + PostOrganizationClientGrantsOperationRequest, PostOrganizationMemberRolesOperationRequest, } from '../models/index.js'; @@ -58,6 +61,30 @@ const { BaseAPI } = runtime; * */ export class OrganizationsManager extends BaseAPI { + /** + * Remove a client grant from an organization + * + * @throws {RequiredError} + */ + async deleteClientGrantsByGrantId( + requestParameters: DeleteClientGrantsByGrantIdRequest, + initOverrides?: InitOverride + ): Promise> { + runtime.validateRequiredRequestParams(requestParameters, ['id', 'grant_id']); + + const response = await this.request( + { + path: `/organizations/{id}/client-grants/{grant_id}` + .replace('{id}', encodeURIComponent(String(requestParameters.id))) + .replace('{grant_id}', encodeURIComponent(String(requestParameters.grant_id))), + method: 'DELETE', + }, + initOverrides + ); + + return runtime.VoidApiResponse.fromResponse(response); + } + /** * Delete connections from an organization * @@ -859,6 +886,38 @@ export class OrganizationsManager extends BaseAPI { return runtime.VoidApiResponse.fromResponse(response); } + /** + * Associate a client grant with an organization + * + * @throws {RequiredError} + */ + async postOrganizationClientGrants( + requestParameters: PostOrganizationClientGrantsOperationRequest, + bodyParameters: PostOrganizationClientGrantsRequest, + initOverrides?: InitOverride + ): Promise> { + runtime.validateRequiredRequestParams(requestParameters, ['id']); + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request( + { + path: `/organizations/{id}/client-grants`.replace( + '{id}', + encodeURIComponent(String(requestParameters.id)) + ), + method: 'POST', + headers: headerParameters, + body: bodyParameters, + }, + initOverrides + ); + + return runtime.JSONApiResponse.fromResponse(response); + } + /** * Assign one or more roles to a given user that will be applied in the context of the provided organization * diff --git a/src/management/__generated/models/index.ts b/src/management/__generated/models/index.ts index 9b77657e0..595644a93 100644 --- a/src/management/__generated/models/index.ts +++ b/src/management/__generated/models/index.ts @@ -10513,6 +10513,16 @@ export interface PostMembersRequest { */ members: Array; } +/** + * + */ +export interface PostOrganizationClientGrantsRequest { + /** + * A Client Grant ID to add to the organization. + * + */ + grant_id: string; +} /** * */ @@ -14924,6 +14934,21 @@ export interface GetLogsByIdRequest { */ id: string; } +/** + * + */ +export interface DeleteClientGrantsByGrantIdRequest { + /** + * Organization identifier + * + */ + id: string; + /** + * The Client Grant ID to remove from the organization + * + */ + grant_id: string; +} /** * */ @@ -15319,6 +15344,16 @@ export interface PostMembersOperationRequest { */ id: string; } +/** + * + */ +export interface PostOrganizationClientGrantsOperationRequest { + /** + * Organization identifier + * + */ + id: string; +} /** * */