Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 112
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/kernel-7d2d29d7598105d50e5118e0bc5ac654361a92cb95555705dbd1d236848e1456.yml
openapi_spec_hash: 10002eae793e08f81932239bbc72b503
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/kernel-a33e59aa1758ba51f13538838ecd70b0a23ed69739b3022e8c2ce0622e42b904.yml
openapi_spec_hash: c042d2f6880c927be09aa9fa79d7241e
config_hash: 08d55086449943a8fec212b870061a3f
60 changes: 50 additions & 10 deletions src/resources/auth/connections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,12 @@ export interface ManagedAuth {
*/
profile_name: string;

/**
* Whether to record browser session replays for this connection by default. Useful
* for debugging login flows. Can be overridden per-login.
*/
record_session: boolean;

/**
* Whether credentials are saved after every successful login. One-time codes
* (TOTP, SMS, etc.) are not saved.
Expand Down Expand Up @@ -272,7 +278,8 @@ export interface ManagedAuth {
credential?: ManagedAuth.Credential;

/**
* Fields awaiting input (present when flow_step=awaiting_input)
* Fields awaiting input (present when flow_step=awaiting_input; may also be
* present with awaiting_external_action as fallback actions)
*/
discovered_fields?: Array<ManagedAuth.DiscoveredField> | null;

Expand Down Expand Up @@ -362,13 +369,14 @@ export interface ManagedAuth {
login_url?: string;

/**
* MFA method options (present when flow_step=awaiting_input and MFA selection
* required)
* MFA method options (present when flow_step=awaiting_input; may also be present
* with awaiting_external_action as fallback actions)
*/
mfa_options?: Array<ManagedAuth.MfaOption> | null;

/**
* SSO buttons available (present when flow_step=awaiting_input)
* SSO buttons available (present when flow_step=awaiting_input; may also be
* present with awaiting_external_action as fallback actions)
*/
pending_sso_buttons?: Array<ManagedAuth.PendingSSOButton> | null;

Expand All @@ -384,7 +392,8 @@ export interface ManagedAuth {

/**
* Non-MFA choices presented during the auth flow, such as account selection or org
* pickers (present when flow_step=awaiting_input).
* pickers (present when flow_step=awaiting_input; may also be present with
* awaiting_external_action as fallback actions).
*/
sign_in_options?: Array<ManagedAuth.SignInOption> | null;

Expand Down Expand Up @@ -611,6 +620,12 @@ export interface ManagedAuthCreateRequest {
*/
proxy?: ManagedAuthCreateRequest.Proxy;

/**
* Whether to record browser sessions for this connection by default. Useful for
* debugging. Can be overridden per-login. Defaults to false.
*/
record_session?: boolean;

/**
* Whether to save credentials after every successful login. Defaults to true.
* One-time codes (TOTP, SMS, etc.) are not saved.
Expand Down Expand Up @@ -699,6 +714,11 @@ export interface ManagedAuthUpdateRequest {
*/
proxy?: ManagedAuthUpdateRequest.Proxy;

/**
* Whether to record browser sessions for this connection by default
*/
record_session?: boolean;

/**
* Whether to save credentials after every successful login
*/
Expand Down Expand Up @@ -830,7 +850,8 @@ export namespace ConnectionFollowResponse {
timestamp: string;

/**
* Fields awaiting input (present when flow_step=AWAITING_INPUT).
* Fields awaiting input (present when flow_step=AWAITING_INPUT; may also be
* present with AWAITING_EXTERNAL_ACTION as fallback actions).
*/
discovered_fields?: Array<ManagedAuthStateEvent.DiscoveredField>;

Expand Down Expand Up @@ -866,13 +887,14 @@ export namespace ConnectionFollowResponse {
live_view_url?: string;

/**
* MFA method options (present when flow_step=AWAITING_INPUT and MFA selection
* required).
* MFA method options (present when flow_step=AWAITING_INPUT; may also be present
* with AWAITING_EXTERNAL_ACTION as fallback actions).
*/
mfa_options?: Array<ManagedAuthStateEvent.MfaOption>;

/**
* SSO buttons available (present when flow_step=AWAITING_INPUT).
* SSO buttons available (present when flow_step=AWAITING_INPUT; may also be
* present with AWAITING_EXTERNAL_ACTION as fallback actions).
*/
pending_sso_buttons?: Array<ManagedAuthStateEvent.PendingSSOButton>;

Expand All @@ -883,7 +905,8 @@ export namespace ConnectionFollowResponse {

/**
* Non-MFA choices presented during the auth flow, such as account selection or org
* pickers (present when flow_step=AWAITING_INPUT).
* pickers (present when flow_step=AWAITING_INPUT; may also be present with
* AWAITING_EXTERNAL_ACTION as fallback actions).
*/
sign_in_options?: Array<ManagedAuthStateEvent.SignInOption>;

Expand Down Expand Up @@ -1074,6 +1097,12 @@ export interface ConnectionCreateParams {
*/
proxy?: ConnectionCreateParams.Proxy;

/**
* Whether to record browser sessions for this connection by default. Useful for
* debugging. Can be overridden per-login. Defaults to false.
*/
record_session?: boolean;

/**
* Whether to save credentials after every successful login. Defaults to true.
* One-time codes (TOTP, SMS, etc.) are not saved.
Expand Down Expand Up @@ -1159,6 +1188,11 @@ export interface ConnectionUpdateParams {
*/
proxy?: ConnectionUpdateParams.Proxy;

/**
* Whether to record browser sessions for this connection by default
*/
record_session?: boolean;

/**
* Whether to save credentials after every successful login
*/
Expand Down Expand Up @@ -1230,6 +1264,12 @@ export interface ConnectionLoginParams {
* caller's org.
*/
proxy?: ConnectionLoginParams.Proxy;

/**
* Override the connection's default for recording this login's browser session.
* When omitted, the connection's record_session default is used.
*/
record_session?: boolean;
}

export namespace ConnectionLoginParams {
Expand Down
6 changes: 5 additions & 1 deletion tests/api-resources/auth/connections.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ describe('resource connections', () => {
health_check_interval: 3600,
login_url: 'https://netflix.com/login',
proxy: { id: 'id', name: 'name' },
record_session: false,
save_credentials: true,
});
});
Expand Down Expand Up @@ -136,7 +137,10 @@ describe('resource connections', () => {
await expect(
client.auth.connections.login(
'id',
{ proxy: { id: 'id', name: 'name' } },
{
proxy: { id: 'id', name: 'name' },
record_session: true,
},
{ path: '/_stainless_unknown_path' },
),
).rejects.toThrow(Kernel.NotFoundError);
Expand Down
Loading