Skip to content

Commit 96d4b00

Browse files
authored
Merge pull request #107 from kernel/next
release: 0.54.0
2 parents d4d579e + de53ea5 commit 96d4b00

3 files changed

Lines changed: 57 additions & 13 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 112
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/kernel-7d2d29d7598105d50e5118e0bc5ac654361a92cb95555705dbd1d236848e1456.yml
3-
openapi_spec_hash: 10002eae793e08f81932239bbc72b503
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/kernel-a33e59aa1758ba51f13538838ecd70b0a23ed69739b3022e8c2ce0622e42b904.yml
3+
openapi_spec_hash: c042d2f6880c927be09aa9fa79d7241e
44
config_hash: 08d55086449943a8fec212b870061a3f

src/resources/auth/connections.ts

Lines changed: 50 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,12 @@ export interface ManagedAuth {
212212
*/
213213
profile_name: string;
214214

215+
/**
216+
* Whether to record browser session replays for this connection by default. Useful
217+
* for debugging login flows. Can be overridden per-login.
218+
*/
219+
record_session: boolean;
220+
215221
/**
216222
* Whether credentials are saved after every successful login. One-time codes
217223
* (TOTP, SMS, etc.) are not saved.
@@ -272,7 +278,8 @@ export interface ManagedAuth {
272278
credential?: ManagedAuth.Credential;
273279

274280
/**
275-
* Fields awaiting input (present when flow_step=awaiting_input)
281+
* Fields awaiting input (present when flow_step=awaiting_input; may also be
282+
* present with awaiting_external_action as fallback actions)
276283
*/
277284
discovered_fields?: Array<ManagedAuth.DiscoveredField> | null;
278285

@@ -362,13 +369,14 @@ export interface ManagedAuth {
362369
login_url?: string;
363370

364371
/**
365-
* MFA method options (present when flow_step=awaiting_input and MFA selection
366-
* required)
372+
* MFA method options (present when flow_step=awaiting_input; may also be present
373+
* with awaiting_external_action as fallback actions)
367374
*/
368375
mfa_options?: Array<ManagedAuth.MfaOption> | null;
369376

370377
/**
371-
* SSO buttons available (present when flow_step=awaiting_input)
378+
* SSO buttons available (present when flow_step=awaiting_input; may also be
379+
* present with awaiting_external_action as fallback actions)
372380
*/
373381
pending_sso_buttons?: Array<ManagedAuth.PendingSSOButton> | null;
374382

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

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

@@ -611,6 +620,12 @@ export interface ManagedAuthCreateRequest {
611620
*/
612621
proxy?: ManagedAuthCreateRequest.Proxy;
613622

623+
/**
624+
* Whether to record browser sessions for this connection by default. Useful for
625+
* debugging. Can be overridden per-login. Defaults to false.
626+
*/
627+
record_session?: boolean;
628+
614629
/**
615630
* Whether to save credentials after every successful login. Defaults to true.
616631
* One-time codes (TOTP, SMS, etc.) are not saved.
@@ -699,6 +714,11 @@ export interface ManagedAuthUpdateRequest {
699714
*/
700715
proxy?: ManagedAuthUpdateRequest.Proxy;
701716

717+
/**
718+
* Whether to record browser sessions for this connection by default
719+
*/
720+
record_session?: boolean;
721+
702722
/**
703723
* Whether to save credentials after every successful login
704724
*/
@@ -830,7 +850,8 @@ export namespace ConnectionFollowResponse {
830850
timestamp: string;
831851

832852
/**
833-
* Fields awaiting input (present when flow_step=AWAITING_INPUT).
853+
* Fields awaiting input (present when flow_step=AWAITING_INPUT; may also be
854+
* present with AWAITING_EXTERNAL_ACTION as fallback actions).
834855
*/
835856
discovered_fields?: Array<ManagedAuthStateEvent.DiscoveredField>;
836857

@@ -866,13 +887,14 @@ export namespace ConnectionFollowResponse {
866887
live_view_url?: string;
867888

868889
/**
869-
* MFA method options (present when flow_step=AWAITING_INPUT and MFA selection
870-
* required).
890+
* MFA method options (present when flow_step=AWAITING_INPUT; may also be present
891+
* with AWAITING_EXTERNAL_ACTION as fallback actions).
871892
*/
872893
mfa_options?: Array<ManagedAuthStateEvent.MfaOption>;
873894

874895
/**
875-
* SSO buttons available (present when flow_step=AWAITING_INPUT).
896+
* SSO buttons available (present when flow_step=AWAITING_INPUT; may also be
897+
* present with AWAITING_EXTERNAL_ACTION as fallback actions).
876898
*/
877899
pending_sso_buttons?: Array<ManagedAuthStateEvent.PendingSSOButton>;
878900

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

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

@@ -1074,6 +1097,12 @@ export interface ConnectionCreateParams {
10741097
*/
10751098
proxy?: ConnectionCreateParams.Proxy;
10761099

1100+
/**
1101+
* Whether to record browser sessions for this connection by default. Useful for
1102+
* debugging. Can be overridden per-login. Defaults to false.
1103+
*/
1104+
record_session?: boolean;
1105+
10771106
/**
10781107
* Whether to save credentials after every successful login. Defaults to true.
10791108
* One-time codes (TOTP, SMS, etc.) are not saved.
@@ -1159,6 +1188,11 @@ export interface ConnectionUpdateParams {
11591188
*/
11601189
proxy?: ConnectionUpdateParams.Proxy;
11611190

1191+
/**
1192+
* Whether to record browser sessions for this connection by default
1193+
*/
1194+
record_session?: boolean;
1195+
11621196
/**
11631197
* Whether to save credentials after every successful login
11641198
*/
@@ -1230,6 +1264,12 @@ export interface ConnectionLoginParams {
12301264
* caller's org.
12311265
*/
12321266
proxy?: ConnectionLoginParams.Proxy;
1267+
1268+
/**
1269+
* Override the connection's default for recording this login's browser session.
1270+
* When omitted, the connection's record_session default is used.
1271+
*/
1272+
record_session?: boolean;
12331273
}
12341274

12351275
export namespace ConnectionLoginParams {

tests/api-resources/auth/connections.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ describe('resource connections', () => {
3838
health_check_interval: 3600,
3939
login_url: 'https://netflix.com/login',
4040
proxy: { id: 'id', name: 'name' },
41+
record_session: false,
4142
save_credentials: true,
4243
});
4344
});
@@ -136,7 +137,10 @@ describe('resource connections', () => {
136137
await expect(
137138
client.auth.connections.login(
138139
'id',
139-
{ proxy: { id: 'id', name: 'name' } },
140+
{
141+
proxy: { id: 'id', name: 'name' },
142+
record_session: true,
143+
},
140144
{ path: '/_stainless_unknown_path' },
141145
),
142146
).rejects.toThrow(Kernel.NotFoundError);

0 commit comments

Comments
 (0)