Skip to content

Commit e2e2565

Browse files
committed
Added changes for connection endpoint
1 parent d8d359c commit e2e2565

File tree

3 files changed

+83
-18
lines changed

3 files changed

+83
-18
lines changed

src/management/__generated/managers/connections-manager.ts

+15-13
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import type {
1313
PostScimToken201Response,
1414
PostScimTokenRequest,
1515
GetConnections200ResponseOneOf,
16+
ConnectionForList,
1617
DeleteConnectionsByIdRequest,
1718
DeleteScimConfigurationRequest,
1819
DeleteTokensByTokenIdRequest,
@@ -148,24 +149,26 @@ export class ConnectionsManager extends BaseAPI {
148149
}
149150

150151
/**
151-
* Retrieves every connection matching the specified strategy. All connections are retrieved if no strategy is being specified. Accepts a list of fields to include or exclude in the resulting list of connection objects.
152+
* Retrieves detailed list of all <a href="https://auth0.com/docs/authenticate/identity-providers">connections</a> that match the specified strategy. If no strategy is provided, all connections within your tenant are retrieved. This action can accept a list of fields to include or exclude from the resulting list of connections.
153+
*
152154
* This endpoint supports two types of pagination:
153-
* - Offset pagination
154-
* - Checkpoint pagination
155+
* <ul>
156+
* <li>Offset pagination</li>
157+
* <li>Checkpoint pagination</li>
158+
* </ul>
155159
*
156-
* Checkpoint pagination should be used if you need to retrieve more than 1000 connections.
160+
* Checkpoint pagination must be used if you need to retrieve more than 1000 connections.
157161
*
158162
* <h2>Checkpoint Pagination</h2>
159163
*
160164
* To search by checkpoint, use the following parameters:
161-
* - from: Optional id from which to start selection.
162-
* - take: The total amount of entries to retrieve when using the from parameter. Defaults to 50.
165+
* <ul>
166+
* <li><code>from</code>: Optional id from which to start selection.</li>
167+
* <li><code>take</code>: The total amount of entries to retrieve when using the from parameter. Defaults to 50.</li>
168+
* </ul>
163169
*
164-
* The first time you call this endpoint using Checkpoint Pagination, you should omit the <code>from</code> parameter.
165-
* If there are more results, a <code>next</code> value will be included in the response. You can use this for subsequent API calls.
166-
* When <code>next</code> is no longer included in the response, this indicates there are no more pages remaining.
170+
* <b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no pages are remaining.
167171
*
168-
* Note: The <code>include_totals</code> parameter is not supported when using checkpoint pagination.
169172
* Get all connections
170173
*
171174
* @throws {RequiredError}
@@ -177,7 +180,7 @@ export class ConnectionsManager extends BaseAPI {
177180
async getAll(
178181
requestParameters?: GetConnectionsRequest,
179182
initOverrides?: InitOverride
180-
): Promise<ApiResponse<Array<Connection>>>;
183+
): Promise<ApiResponse<Array<ConnectionForList>>>;
181184
async getAll(
182185
requestParameters: GetConnectionsRequest = {},
183186
initOverrides?: InitOverride
@@ -237,8 +240,7 @@ export class ConnectionsManager extends BaseAPI {
237240
}
238241

239242
/**
240-
* Retrieves a connection by its <code>ID</code>.
241-
*
243+
* Retrieve details for a specified <a href="https://auth0.com/docs/authenticate/identity-providers">connection</a> along with options that can be used for identity provider configuration.
242244
* Get a connection
243245
*
244246
* @throws {RequiredError}

src/management/__generated/models/index.ts

+68-3
Original file line numberDiff line numberDiff line change
@@ -3003,6 +3003,11 @@ export interface Connection {
30033003
*
30043004
*/
30053005
is_domain_connection: boolean;
3006+
/**
3007+
* Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD.
3008+
*
3009+
*/
3010+
show_as_button: boolean;
30063011
/**
30073012
* Metadata associated with the connection in the form of an object with string values (max 255 chars). Maximum of 10 metadata properties allowed.
30083013
*
@@ -3039,6 +3044,11 @@ export interface ConnectionCreate {
30393044
/**
30403045
*/
30413046
is_domain_connection?: boolean;
3047+
/**
3048+
* Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. (Defaults to <code>false</code>.)
3049+
*
3050+
*/
3051+
show_as_button?: boolean;
30423052
/**
30433053
* Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.
30443054
*
@@ -3405,6 +3415,56 @@ export interface ConnectionCreateOptionsValidationUsername {
34053415
*/
34063416
max: number;
34073417
}
3418+
/**
3419+
*
3420+
*/
3421+
export interface ConnectionForList {
3422+
/**
3423+
* The name of the connection
3424+
*
3425+
*/
3426+
name?: string;
3427+
/**
3428+
* Connection name used in login screen
3429+
*
3430+
*/
3431+
display_name?: string;
3432+
/**
3433+
* In order to return options in the response, the `read:connections_options` scope must be present
3434+
*
3435+
*/
3436+
options?: { [key: string]: any };
3437+
/**
3438+
* The connection's identifier
3439+
*
3440+
*/
3441+
id?: string;
3442+
/**
3443+
* The type of the connection, related to the identity provider
3444+
*
3445+
*/
3446+
strategy?: string;
3447+
/**
3448+
* Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.
3449+
*
3450+
*/
3451+
realms?: Array<string>;
3452+
/**
3453+
* True if the connection is domain level
3454+
*
3455+
*/
3456+
is_domain_connection?: boolean;
3457+
/**
3458+
* Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD.
3459+
*
3460+
*/
3461+
show_as_button?: boolean;
3462+
/**
3463+
* Metadata associated with the connection in the form of an object with string values (max 255 chars). Maximum of 10 metadata properties allowed.
3464+
*
3465+
*/
3466+
metadata?: { [key: string]: any };
3467+
}
34083468
/**
34093469
*
34103470
*/
@@ -3430,6 +3490,11 @@ export interface ConnectionUpdate {
34303490
*
34313491
*/
34323492
realms?: Array<string>;
3493+
/**
3494+
* Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. (Defaults to <code>false</code>.)
3495+
*
3496+
*/
3497+
show_as_button?: boolean;
34333498
/**
34343499
* Metadata associated with the connection in the form of an object with string values (max 255 chars). Maximum of 10 metadata properties allowed.
34353500
*
@@ -5325,7 +5390,7 @@ export interface GetClients200ResponseOneOf1 {
53255390
/**
53265391
*
53275392
*/
5328-
export type GetConnections200Response = Array<Connection> | GetConnections200ResponseOneOf;
5393+
export type GetConnections200Response = Array<ConnectionForList> | GetConnections200ResponseOneOf;
53295394
/**
53305395
*
53315396
*/
@@ -5341,7 +5406,7 @@ export interface GetConnections200ResponseOneOf {
53415406
total: number;
53425407
/**
53435408
*/
5344-
connections: Array<Connection>;
5409+
connections: Array<ConnectionForList>;
53455410
}
53465411
/**
53475412
*
@@ -17927,7 +17992,7 @@ export type GetConnectionsStrategyEnum =
1792717992
*/
1792817993
export interface GetConnectionsRequest {
1792917994
/**
17930-
* The amount of entries per page. Default: no paging is used, all connections are returned
17995+
* The amount of entries per page. Defaults to 100 if not provided
1793117996
*
1793217997
*/
1793317998
per_page?: number;

test/management/connections.test.ts

-2
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,6 @@ describe('ConnectionsManager', () => {
9898
expect(connections.data[0].realms?.[0]).toBe(response[0].realms[0]);
9999
expect(connections.data[0].is_domain_connection).toBe(response[0].is_domain_connection);
100100
expect(connections.data[0].metadata?.test).toBe(response[0].metadata.test);
101-
expect(connections.data[0].enabled_clients[0]).toBe(response[0].enabled_clients[0]);
102-
103101
done();
104102
});
105103
});

0 commit comments

Comments
 (0)