Skip to content

Commit

Permalink
[SDK-4646] Add MFA tenant setting and handle deprecations (#960)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamjmcgrath authored Oct 30, 2023
2 parents 674cf53 + 9f848bb commit 5f184fc
Show file tree
Hide file tree
Showing 8 changed files with 227 additions and 114 deletions.
44 changes: 44 additions & 0 deletions src/deprecations.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// These can be removed in the next major.
import {
EmailProviderCreate,
EmailProviderCreateNameEnum,
EmailProviderUpdate,
EmailProviderUpdateNameEnum,
EmailProviderUpdateCredentials,
ClientCreateOidcLogout,
ClientOidcLogout,
ClientUpdateOidcLogout,
} from './management/__generated/models/index.js';

/**
* @deprecated Use {@link EmailProviderUpdate} instead.
*/
export type PatchProviderRequest = EmailProviderUpdate;
/**
* @deprecated Use {@link EmailProviderUpdateNameEnum} instead.
*/
export const PatchProviderRequestNameEnum = EmailProviderUpdateNameEnum;
/**
* @deprecated Use {@link EmailProviderCreate} instead.
*/
export type PostProviderRequest = EmailProviderCreate;
/**
* @deprecated Use {@link EmailProviderCreateNameEnum} instead.
*/
export const PostProviderRequestNameEnum = EmailProviderCreateNameEnum;
/**
* @deprecated Use {@link EmailProviderUpdateCredentials} instead.
*/
export type PostProviderRequestCredentials = EmailProviderUpdateCredentials;
/**
* @deprecated Use {@link ClientCreateOidcLogout} instead.
*/
export type ClientCreateOidcBackchannelLogout = ClientCreateOidcLogout;
/**
* @deprecated Use {@link ClientOidcLogout} instead.
*/
export type ClientOidcBackchannelLogout = ClientOidcLogout;
/**
* @deprecated Use {@link ClientUpdateOidcLogout} instead.
*/
export type ClientUpdateOidcBackchannelLogout = ClientUpdateOidcLogout;
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ export * from './auth/index.js';
export * from './userinfo/index.js';
export * from './lib/errors.js';
export * from './lib/models.js';
export * from './deprecations.js';
8 changes: 4 additions & 4 deletions src/management/__generated/managers/emails-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import * as runtime from '../../../lib/runtime.js';
import type { InitOverride, ApiResponse } from '../../../lib/runtime.js';
import type {
EmailProvider,
PatchProviderRequest,
PostProviderRequest,
EmailProviderCreate,
EmailProviderUpdate,
GetProviderRequest,
} from '../models/index.js';

Expand Down Expand Up @@ -58,7 +58,7 @@ export class EmailsManager extends BaseAPI {
* @throws {RequiredError}
*/
async update(
bodyParameters: PatchProviderRequest,
bodyParameters: EmailProviderUpdate,
initOverrides?: InitOverride
): Promise<ApiResponse<EmailProvider>> {
const headerParameters: runtime.HTTPHeaders = {};
Expand Down Expand Up @@ -89,7 +89,7 @@ export class EmailsManager extends BaseAPI {
* @throws {RequiredError}
*/
async configure(
bodyParameters: PostProviderRequest,
bodyParameters: EmailProviderCreate,
initOverrides?: InitOverride
): Promise<ApiResponse<EmailProvider>> {
const headerParameters: runtime.HTTPHeaders = {};
Expand Down
2 changes: 1 addition & 1 deletion src/management/__generated/managers/grants-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export class GrantsManager extends BaseAPI {

const response = await this.request(
{
path: `/grants/`,
path: `/grants`,
method: 'DELETE',
query: queryParameters,
},
Expand Down
29 changes: 22 additions & 7 deletions src/management/__generated/managers/organizations-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -362,19 +362,34 @@ export class OrganizationsManager extends BaseAPI {
}

/**
* List organization members. This endpoint supports two types of pagination:
* List organization members.
*
* <ul>
* <li>
* Use the <code>fields</code> parameter to optionally define the specific member details retrieved. If
* <code>fields</code> is left blank, all fields (except roles) are returned.
* </li>
* <li>
* Member roles are not sent by default. Use <code>fields=roles</code> to retrieve the roles assigned to each listed
* member. To use this parameter, you must include the <code>read:organization_member_roles</code> scope in the token.
* </li>
* </ul>
*
* This endpoint supports two types of pagination:
*
* - Offset pagination
* - Checkpoint pagination
*
* Checkpoint pagination must be used if you need to retrieve more than 1000 organization members.
* Checkpoint pagination must be used if you need to retrieve more than 1000
* organization members.
*
* <h2>Checkpoint Pagination</h2>
*
* To search by checkpoint, use the following parameters:
* - from: Optional id from which to start selection.
* - take: The total amount of entries to retrieve when using the from parameter. Defaults to 50.
*
* Note: The first time you call this endpoint using Checkpoint Pagination, you should omit the <code>from</code> parameter. If there are more results, a <code>next</code> value will be included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, this indicates there are no more pages remaining.
* To search by checkpoint, use the following parameters: - from: Optional id from which to start selection. - take: The
* total amount of entries to retrieve when using the from parameter. Defaults to 50. Note: The first time you call this
* endpoint using Checkpoint Pagination, you should omit the <code>from</code> parameter. If there are more results, a
* <code>next</code> value will be included in the response. You can use this for subsequent API calls. When
* <code>next</code> is no longer included in the response, this indicates there are no more pages remaining.
*
* Get members who belong to an organization
*
Expand Down
4 changes: 2 additions & 2 deletions src/management/__generated/managers/roles-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import type {
GetRolePermission200ResponseOneOf,
Permission,
GetRoleUser200ResponseOneOf,
GetMembers200ResponseOneOfInner,
GetRoleUser200ResponseOneOfInner,
GetOrganizationMemberRoles200ResponseOneOf,
DeleteRolePermissionAssignmentRequest,
DeleteRolesByIdRequest,
Expand Down Expand Up @@ -166,7 +166,7 @@ export class RolesManager extends BaseAPI {
async getUsers(
requestParameters?: GetRoleUserRequest,
initOverrides?: InitOverride
): Promise<ApiResponse<Array<GetMembers200ResponseOneOfInner>>>;
): Promise<ApiResponse<Array<GetRoleUser200ResponseOneOfInner>>>;
async getUsers(
requestParameters: GetRoleUserRequest,
initOverrides?: InitOverride
Expand Down
Loading

0 comments on commit 5f184fc

Please sign in to comment.