@onkernel/sdk 0.24.0 → 0.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/LICENSE +1 -1
  3. package/README.md +9 -4
  4. package/client.d.mts +6 -6
  5. package/client.d.mts.map +1 -1
  6. package/client.d.ts +6 -6
  7. package/client.d.ts.map +1 -1
  8. package/client.js.map +1 -1
  9. package/client.mjs.map +1 -1
  10. package/package.json +2 -2
  11. package/resources/agents/agents.d.mts +2 -2
  12. package/resources/agents/agents.d.mts.map +1 -1
  13. package/resources/agents/agents.d.ts +2 -2
  14. package/resources/agents/agents.d.ts.map +1 -1
  15. package/resources/agents/agents.js.map +1 -1
  16. package/resources/agents/agents.mjs.map +1 -1
  17. package/resources/agents/auth/auth.d.mts +135 -126
  18. package/resources/agents/auth/auth.d.mts.map +1 -1
  19. package/resources/agents/auth/auth.d.ts +135 -126
  20. package/resources/agents/auth/auth.d.ts.map +1 -1
  21. package/resources/agents/auth/auth.js +2 -18
  22. package/resources/agents/auth/auth.js.map +1 -1
  23. package/resources/agents/auth/auth.mjs +2 -18
  24. package/resources/agents/auth/auth.mjs.map +1 -1
  25. package/resources/agents/auth/index.d.mts +2 -2
  26. package/resources/agents/auth/index.d.mts.map +1 -1
  27. package/resources/agents/auth/index.d.ts +2 -2
  28. package/resources/agents/auth/index.d.ts.map +1 -1
  29. package/resources/agents/auth/index.js.map +1 -1
  30. package/resources/agents/auth/index.mjs.map +1 -1
  31. package/resources/agents/auth/invocations.d.mts +28 -33
  32. package/resources/agents/auth/invocations.d.mts.map +1 -1
  33. package/resources/agents/auth/invocations.d.ts +28 -33
  34. package/resources/agents/auth/invocations.d.ts.map +1 -1
  35. package/resources/agents/auth/invocations.js +5 -20
  36. package/resources/agents/auth/invocations.js.map +1 -1
  37. package/resources/agents/auth/invocations.mjs +5 -20
  38. package/resources/agents/auth/invocations.mjs.map +1 -1
  39. package/resources/agents/index.d.mts +1 -1
  40. package/resources/agents/index.d.mts.map +1 -1
  41. package/resources/agents/index.d.ts +1 -1
  42. package/resources/agents/index.d.ts.map +1 -1
  43. package/resources/agents/index.js.map +1 -1
  44. package/resources/agents/index.mjs.map +1 -1
  45. package/resources/browsers/browsers.d.mts +84 -3
  46. package/resources/browsers/browsers.d.mts.map +1 -1
  47. package/resources/browsers/browsers.d.ts +84 -3
  48. package/resources/browsers/browsers.d.ts.map +1 -1
  49. package/resources/browsers/browsers.js +13 -0
  50. package/resources/browsers/browsers.js.map +1 -1
  51. package/resources/browsers/browsers.mjs +13 -0
  52. package/resources/browsers/browsers.mjs.map +1 -1
  53. package/resources/browsers/index.d.mts +2 -2
  54. package/resources/browsers/index.d.mts.map +1 -1
  55. package/resources/browsers/index.d.ts +2 -2
  56. package/resources/browsers/index.d.ts.map +1 -1
  57. package/resources/browsers/index.js.map +1 -1
  58. package/resources/browsers/index.mjs.map +1 -1
  59. package/resources/browsers/process.d.mts +52 -1
  60. package/resources/browsers/process.d.mts.map +1 -1
  61. package/resources/browsers/process.d.ts +52 -1
  62. package/resources/browsers/process.d.ts.map +1 -1
  63. package/resources/browsers/process.js +19 -0
  64. package/resources/browsers/process.js.map +1 -1
  65. package/resources/browsers/process.mjs +19 -0
  66. package/resources/browsers/process.mjs.map +1 -1
  67. package/resources/credentials.d.mts +107 -16
  68. package/resources/credentials.d.mts.map +1 -1
  69. package/resources/credentials.d.ts +107 -16
  70. package/resources/credentials.d.ts.map +1 -1
  71. package/resources/credentials.js +33 -14
  72. package/resources/credentials.js.map +1 -1
  73. package/resources/credentials.mjs +33 -14
  74. package/resources/credentials.mjs.map +1 -1
  75. package/resources/index.d.mts +3 -3
  76. package/resources/index.d.mts.map +1 -1
  77. package/resources/index.d.ts +3 -3
  78. package/resources/index.d.ts.map +1 -1
  79. package/resources/index.js.map +1 -1
  80. package/resources/index.mjs.map +1 -1
  81. package/resources/proxies.d.mts +153 -1
  82. package/resources/proxies.d.mts.map +1 -1
  83. package/resources/proxies.d.ts +153 -1
  84. package/resources/proxies.d.ts.map +1 -1
  85. package/resources/proxies.js +6 -0
  86. package/resources/proxies.js.map +1 -1
  87. package/resources/proxies.mjs +6 -0
  88. package/resources/proxies.mjs.map +1 -1
  89. package/src/client.ts +8 -0
  90. package/src/resources/agents/agents.ts +0 -4
  91. package/src/resources/agents/auth/auth.ts +146 -136
  92. package/src/resources/agents/auth/index.ts +0 -3
  93. package/src/resources/agents/auth/invocations.ts +31 -39
  94. package/src/resources/agents/index.ts +0 -2
  95. package/src/resources/browsers/browsers.ts +104 -0
  96. package/src/resources/browsers/index.ts +4 -0
  97. package/src/resources/browsers/process.ts +68 -0
  98. package/src/resources/credentials.ts +127 -18
  99. package/src/resources/index.ts +4 -0
  100. package/src/resources/proxies.ts +248 -0
  101. package/src/version.ts +1 -1
  102. package/version.d.mts +1 -1
  103. package/version.d.ts +1 -1
  104. package/version.js +1 -1
  105. package/version.mjs +1 -1
@@ -4,7 +4,6 @@ import { APIResource } from '../../../core/resource';
4
4
  import * as InvocationsAPI from './invocations';
5
5
  import {
6
6
  InvocationCreateParams,
7
- InvocationDiscoverParams,
8
7
  InvocationExchangeParams,
9
8
  InvocationExchangeResponse,
10
9
  InvocationSubmitParams,
@@ -28,8 +27,8 @@ export class Auth extends APIResource {
28
27
  * @example
29
28
  * ```ts
30
29
  * const authAgent = await client.agents.auth.create({
30
+ * domain: 'netflix.com',
31
31
  * profile_name: 'user-123',
32
- * target_domain: 'netflix.com',
33
32
  * });
34
33
  * ```
35
34
  */
@@ -51,7 +50,7 @@ export class Auth extends APIResource {
51
50
  }
52
51
 
53
52
  /**
54
- * List auth agents with optional filters for profile_name and target_domain.
53
+ * List auth agents with optional filters for profile_name and domain.
55
54
  *
56
55
  * @example
57
56
  * ```ts
@@ -86,126 +85,148 @@ export class Auth extends APIResource {
86
85
  headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
87
86
  });
88
87
  }
89
-
90
- /**
91
- * Triggers automatic re-authentication for an auth agent using stored credentials.
92
- * Requires the auth agent to have a linked credential, stored selectors, and
93
- * login_url. Returns immediately with status indicating whether re-auth was
94
- * started.
95
- *
96
- * @example
97
- * ```ts
98
- * const reauthResponse = await client.agents.auth.reauth(
99
- * 'id',
100
- * );
101
- * ```
102
- */
103
- reauth(id: string, options?: RequestOptions): APIPromise<ReauthResponse> {
104
- return this._client.post(path`/agents/auth/${id}/reauth`, options);
105
- }
106
88
  }
107
89
 
108
90
  export type AuthAgentsOffsetPagination = OffsetPagination<AuthAgent>;
109
91
 
110
92
  /**
111
- * Response from discover endpoint matching AuthBlueprint schema
93
+ * Response from get invocation endpoint
112
94
  */
113
- export interface AgentAuthDiscoverResponse {
95
+ export interface AgentAuthInvocationResponse {
114
96
  /**
115
- * Whether discovery succeeded
97
+ * App name (org name at time of invocation creation)
116
98
  */
117
- success: boolean;
99
+ app_name: string;
118
100
 
119
101
  /**
120
- * Error message if discovery failed
102
+ * Domain for authentication
121
103
  */
122
- error_message?: string;
104
+ domain: string;
123
105
 
124
106
  /**
125
- * Discovered form fields (present when success is true)
107
+ * When the handoff code expires
126
108
  */
127
- fields?: Array<DiscoveredField>;
109
+ expires_at: string;
128
110
 
129
111
  /**
130
- * Whether user is already logged in
112
+ * Invocation status
131
113
  */
132
- logged_in?: boolean;
114
+ status: 'IN_PROGRESS' | 'SUCCESS' | 'EXPIRED' | 'CANCELED' | 'FAILED';
133
115
 
134
116
  /**
135
- * URL of the discovered login page
117
+ * Current step in the invocation workflow
136
118
  */
137
- login_url?: string;
119
+ step:
120
+ | 'initialized'
121
+ | 'discovering'
122
+ | 'awaiting_input'
123
+ | 'awaiting_external_action'
124
+ | 'submitting'
125
+ | 'completed'
126
+ | 'expired';
138
127
 
139
128
  /**
140
- * Title of the login page
129
+ * The invocation type:
130
+ *
131
+ * - login: First-time authentication
132
+ * - reauth: Re-authentication for previously authenticated agents
133
+ * - auto_login: Legacy type (no longer created, kept for backward compatibility)
141
134
  */
142
- page_title?: string;
143
- }
135
+ type: 'login' | 'auto_login' | 'reauth';
144
136
 
145
- /**
146
- * Response from get invocation endpoint
147
- */
148
- export interface AgentAuthInvocationResponse {
149
137
  /**
150
- * App name (org name at time of invocation creation)
138
+ * Error message explaining why the invocation failed (present when status=FAILED)
151
139
  */
152
- app_name: string;
140
+ error_message?: string | null;
153
141
 
154
142
  /**
155
- * When the handoff code expires
143
+ * Instructions for user when external action is required (present when
144
+ * step=awaiting_external_action)
156
145
  */
157
- expires_at: string;
146
+ external_action_message?: string | null;
158
147
 
159
148
  /**
160
- * Invocation status
149
+ * Browser live view URL for debugging the invocation
161
150
  */
162
- status: 'IN_PROGRESS' | 'SUCCESS' | 'EXPIRED' | 'CANCELED';
151
+ live_view_url?: string | null;
163
152
 
164
153
  /**
165
- * Target domain for authentication
154
+ * MFA method options to choose from (present when step=awaiting_input and MFA
155
+ * selection is required)
166
156
  */
167
- target_domain: string;
168
- }
157
+ mfa_options?: Array<AgentAuthInvocationResponse.MfaOption> | null;
169
158
 
170
- /**
171
- * Response from submit endpoint matching SubmitResult schema
172
- */
173
- export interface AgentAuthSubmitResponse {
174
159
  /**
175
- * Whether submission succeeded
160
+ * Fields currently awaiting input (present when step=awaiting_input)
176
161
  */
177
- success: boolean;
162
+ pending_fields?: Array<DiscoveredField> | null;
178
163
 
179
164
  /**
180
- * Additional fields needed (e.g., OTP) - present when needs_additional_auth is
181
- * true
165
+ * SSO buttons available on the page (present when step=awaiting_input)
182
166
  */
183
- additional_fields?: Array<DiscoveredField>;
167
+ pending_sso_buttons?: Array<AgentAuthInvocationResponse.PendingSSOButton> | null;
184
168
 
185
169
  /**
186
- * App name (only present when logged_in is true)
170
+ * Names of fields that have been submitted (present when step=submitting or later)
187
171
  */
188
- app_name?: string;
172
+ submitted_fields?: Array<string> | null;
173
+ }
189
174
 
175
+ export namespace AgentAuthInvocationResponse {
190
176
  /**
191
- * Error message if submission failed
177
+ * An MFA method option for verification
192
178
  */
193
- error_message?: string;
179
+ export interface MfaOption {
180
+ /**
181
+ * The visible option text
182
+ */
183
+ label: string;
194
184
 
195
- /**
196
- * Whether user is now logged in
197
- */
198
- logged_in?: boolean;
185
+ /**
186
+ * The MFA delivery method type
187
+ */
188
+ type: 'sms' | 'call' | 'email' | 'totp' | 'push' | 'security_key';
189
+
190
+ /**
191
+ * Additional instructions from the site
192
+ */
193
+ description?: string | null;
194
+
195
+ /**
196
+ * The masked destination (phone/email) if shown
197
+ */
198
+ target?: string | null;
199
+ }
199
200
 
200
201
  /**
201
- * Whether additional authentication fields are needed
202
+ * An SSO button for signing in with an external identity provider
202
203
  */
203
- needs_additional_auth?: boolean;
204
+ export interface PendingSSOButton {
205
+ /**
206
+ * Visible button text
207
+ */
208
+ label: string;
209
+
210
+ /**
211
+ * Identity provider name
212
+ */
213
+ provider: string;
214
+
215
+ /**
216
+ * XPath selector for the button
217
+ */
218
+ selector: string;
219
+ }
220
+ }
204
221
 
222
+ /**
223
+ * Response from submit endpoint - returns immediately after submission is accepted
224
+ */
225
+ export interface AgentAuthSubmitResponse {
205
226
  /**
206
- * Target domain (only present when logged_in is true)
227
+ * Whether the submission was accepted for processing
207
228
  */
208
- target_domain?: string;
229
+ accepted: boolean;
209
230
  }
210
231
 
211
232
  /**
@@ -233,6 +254,13 @@ export interface AuthAgent {
233
254
  */
234
255
  status: 'AUTHENTICATED' | 'NEEDS_AUTH';
235
256
 
257
+ /**
258
+ * Additional domains that are valid for this auth agent's authentication flow
259
+ * (besides the primary domain). Useful when login pages redirect to different
260
+ * domains.
261
+ */
262
+ allowed_domains?: Array<string>;
263
+
236
264
  /**
237
265
  * Whether automatic re-authentication is possible (has credential_id, selectors,
238
266
  * and login_url)
@@ -258,21 +286,34 @@ export interface AuthAgent {
258
286
  * When the last authentication check was performed
259
287
  */
260
288
  last_auth_check_at?: string;
289
+
290
+ /**
291
+ * URL where the browser landed after successful login. Query parameters and
292
+ * fragments are stripped for privacy.
293
+ */
294
+ post_login_url?: string;
261
295
  }
262
296
 
263
297
  /**
264
298
  * Request to create or find an auth agent
265
299
  */
266
300
  export interface AuthAgentCreateRequest {
301
+ /**
302
+ * Domain for authentication
303
+ */
304
+ domain: string;
305
+
267
306
  /**
268
307
  * Name of the profile to use for this auth agent
269
308
  */
270
309
  profile_name: string;
271
310
 
272
311
  /**
273
- * Target domain for authentication
312
+ * Additional domains that are valid for this auth agent's authentication flow
313
+ * (besides the primary domain). Useful when login pages redirect to different
314
+ * domains.
274
315
  */
275
- target_domain: string;
316
+ allowed_domains?: Array<string>;
276
317
 
277
318
  /**
278
319
  * Optional name of an existing credential to use for this auth agent. If provided,
@@ -323,52 +364,37 @@ export interface AuthAgentInvocationCreateRequest {
323
364
  }
324
365
 
325
366
  /**
326
- * Response when the agent is already authenticated.
367
+ * Response from creating an invocation. Always returns an invocation_id.
327
368
  */
328
- export type AuthAgentInvocationCreateResponse =
329
- | AuthAgentInvocationCreateResponse.AuthAgentAlreadyAuthenticated
330
- | AuthAgentInvocationCreateResponse.AuthAgentInvocationCreated;
331
-
332
- export namespace AuthAgentInvocationCreateResponse {
369
+ export interface AuthAgentInvocationCreateResponse {
333
370
  /**
334
- * Response when the agent is already authenticated.
371
+ * When the handoff code expires.
335
372
  */
336
- export interface AuthAgentAlreadyAuthenticated {
337
- /**
338
- * Indicates the agent is already authenticated and no invocation was created.
339
- */
340
- status: 'already_authenticated';
341
- }
373
+ expires_at: string;
342
374
 
343
375
  /**
344
- * Response when a new invocation was created.
376
+ * One-time code for handoff.
345
377
  */
346
- export interface AuthAgentInvocationCreated {
347
- /**
348
- * When the handoff code expires.
349
- */
350
- expires_at: string;
351
-
352
- /**
353
- * One-time code for handoff.
354
- */
355
- handoff_code: string;
378
+ handoff_code: string;
356
379
 
357
- /**
358
- * URL to redirect user to.
359
- */
360
- hosted_url: string;
380
+ /**
381
+ * URL to redirect user to.
382
+ */
383
+ hosted_url: string;
361
384
 
362
- /**
363
- * Unique identifier for the invocation.
364
- */
365
- invocation_id: string;
385
+ /**
386
+ * Unique identifier for the invocation.
387
+ */
388
+ invocation_id: string;
366
389
 
367
- /**
368
- * Indicates an invocation was created.
369
- */
370
- status: 'invocation_created';
371
- }
390
+ /**
391
+ * The invocation type:
392
+ *
393
+ * - login: First-time authentication
394
+ * - reauth: Re-authentication for previously authenticated agents
395
+ * - auto_login: Legacy type (no longer created, kept for backward compatibility)
396
+ */
397
+ type: 'login' | 'auto_login' | 'reauth';
372
398
  }
373
399
 
374
400
  /**
@@ -393,7 +419,7 @@ export interface DiscoveredField {
393
419
  /**
394
420
  * Field type
395
421
  */
396
- type: 'text' | 'email' | 'password' | 'tel' | 'number' | 'url' | 'code';
422
+ type: 'text' | 'email' | 'password' | 'tel' | 'number' | 'url' | 'code' | 'totp';
397
423
 
398
424
  /**
399
425
  * Field placeholder
@@ -406,36 +432,23 @@ export interface DiscoveredField {
406
432
  required?: boolean;
407
433
  }
408
434
 
409
- /**
410
- * Response from triggering re-authentication
411
- */
412
- export interface ReauthResponse {
413
- /**
414
- * Result of the re-authentication attempt
415
- */
416
- status: 'reauth_started' | 'already_authenticated' | 'cannot_reauth';
417
-
418
- /**
419
- * ID of the re-auth invocation if one was created
420
- */
421
- invocation_id?: string;
422
-
435
+ export interface AuthCreateParams {
423
436
  /**
424
- * Human-readable description of the result
437
+ * Domain for authentication
425
438
  */
426
- message?: string;
427
- }
439
+ domain: string;
428
440
 
429
- export interface AuthCreateParams {
430
441
  /**
431
442
  * Name of the profile to use for this auth agent
432
443
  */
433
444
  profile_name: string;
434
445
 
435
446
  /**
436
- * Target domain for authentication
447
+ * Additional domains that are valid for this auth agent's authentication flow
448
+ * (besides the primary domain). Useful when login pages redirect to different
449
+ * domains.
437
450
  */
438
- target_domain: string;
451
+ allowed_domains?: Array<string>;
439
452
 
440
453
  /**
441
454
  * Optional name of an existing credential to use for this auth agent. If provided,
@@ -470,21 +483,20 @@ export namespace AuthCreateParams {
470
483
 
471
484
  export interface AuthListParams extends OffsetPaginationParams {
472
485
  /**
473
- * Filter by profile name
486
+ * Filter by domain
474
487
  */
475
- profile_name?: string;
488
+ domain?: string;
476
489
 
477
490
  /**
478
- * Filter by target domain
491
+ * Filter by profile name
479
492
  */
480
- target_domain?: string;
493
+ profile_name?: string;
481
494
  }
482
495
 
483
496
  Auth.Invocations = Invocations;
484
497
 
485
498
  export declare namespace Auth {
486
499
  export {
487
- type AgentAuthDiscoverResponse as AgentAuthDiscoverResponse,
488
500
  type AgentAuthInvocationResponse as AgentAuthInvocationResponse,
489
501
  type AgentAuthSubmitResponse as AgentAuthSubmitResponse,
490
502
  type AuthAgent as AuthAgent,
@@ -492,7 +504,6 @@ export declare namespace Auth {
492
504
  type AuthAgentInvocationCreateRequest as AuthAgentInvocationCreateRequest,
493
505
  type AuthAgentInvocationCreateResponse as AuthAgentInvocationCreateResponse,
494
506
  type DiscoveredField as DiscoveredField,
495
- type ReauthResponse as ReauthResponse,
496
507
  type AuthAgentsOffsetPagination as AuthAgentsOffsetPagination,
497
508
  type AuthCreateParams as AuthCreateParams,
498
509
  type AuthListParams as AuthListParams,
@@ -502,7 +513,6 @@ export declare namespace Auth {
502
513
  Invocations as Invocations,
503
514
  type InvocationExchangeResponse as InvocationExchangeResponse,
504
515
  type InvocationCreateParams as InvocationCreateParams,
505
- type InvocationDiscoverParams as InvocationDiscoverParams,
506
516
  type InvocationExchangeParams as InvocationExchangeParams,
507
517
  type InvocationSubmitParams as InvocationSubmitParams,
508
518
  };
@@ -2,7 +2,6 @@
2
2
 
3
3
  export {
4
4
  Auth,
5
- type AgentAuthDiscoverResponse,
6
5
  type AgentAuthInvocationResponse,
7
6
  type AgentAuthSubmitResponse,
8
7
  type AuthAgent,
@@ -10,7 +9,6 @@ export {
10
9
  type AuthAgentInvocationCreateRequest,
11
10
  type AuthAgentInvocationCreateResponse,
12
11
  type DiscoveredField,
13
- type ReauthResponse,
14
12
  type AuthCreateParams,
15
13
  type AuthListParams,
16
14
  type AuthAgentsOffsetPagination,
@@ -19,7 +17,6 @@ export {
19
17
  Invocations,
20
18
  type InvocationExchangeResponse,
21
19
  type InvocationCreateParams,
22
- type InvocationDiscoverParams,
23
20
  type InvocationExchangeParams,
24
21
  type InvocationSubmitParams,
25
22
  } from './invocations';
@@ -28,8 +28,8 @@ export class Invocations extends APIResource {
28
28
  }
29
29
 
30
30
  /**
31
- * Returns invocation details including app_name and target_domain. Uses the JWT
32
- * returned by the exchange endpoint, or standard API key or JWT authentication.
31
+ * Returns invocation details including status, app_name, and domain. Supports both
32
+ * API key and JWT (from exchange endpoint) authentication.
33
33
  *
34
34
  * @example
35
35
  * ```ts
@@ -43,27 +43,6 @@ export class Invocations extends APIResource {
43
43
  return this._client.get(path`/agents/auth/invocations/${invocationID}`, options);
44
44
  }
45
45
 
46
- /**
47
- * Inspects the target site to detect logged-in state or discover required fields.
48
- * Returns 200 with success: true when fields are found, or 4xx/5xx for failures.
49
- * Requires the JWT returned by the exchange endpoint.
50
- *
51
- * @example
52
- * ```ts
53
- * const agentAuthDiscoverResponse =
54
- * await client.agents.auth.invocations.discover(
55
- * 'invocation_id',
56
- * );
57
- * ```
58
- */
59
- discover(
60
- invocationID: string,
61
- body: InvocationDiscoverParams | null | undefined = {},
62
- options?: RequestOptions,
63
- ): APIPromise<AuthAPI.AgentAuthDiscoverResponse> {
64
- return this._client.post(path`/agents/auth/invocations/${invocationID}/discover`, { body, ...options });
65
- }
66
-
67
46
  /**
68
47
  * Validates the handoff code and returns a JWT token for subsequent requests. No
69
48
  * authentication required (the handoff code serves as the credential).
@@ -86,8 +65,9 @@ export class Invocations extends APIResource {
86
65
  }
87
66
 
88
67
  /**
89
- * Submits field values for the discovered login form and may return additional
90
- * auth fields or success. Requires the JWT returned by the exchange endpoint.
68
+ * Submits field values for the discovered login form. Returns immediately after
69
+ * submission is accepted. Poll the invocation endpoint to track progress and get
70
+ * results.
91
71
  *
92
72
  * @example
93
73
  * ```ts
@@ -141,14 +121,6 @@ export interface InvocationCreateParams {
141
121
  save_credential_as?: string;
142
122
  }
143
123
 
144
- export interface InvocationDiscoverParams {
145
- /**
146
- * Optional login page URL. If provided, will override the stored login URL for
147
- * this discovery invocation and skip Phase 1 discovery.
148
- */
149
- login_url?: string;
150
- }
151
-
152
124
  export interface InvocationExchangeParams {
153
125
  /**
154
126
  * Handoff code from start endpoint
@@ -156,18 +128,38 @@ export interface InvocationExchangeParams {
156
128
  code: string;
157
129
  }
158
130
 
159
- export interface InvocationSubmitParams {
160
- /**
161
- * Values for the discovered login fields
162
- */
163
- field_values: { [key: string]: string };
131
+ export type InvocationSubmitParams =
132
+ | InvocationSubmitParams.Variant0
133
+ | InvocationSubmitParams.Variant1
134
+ | InvocationSubmitParams.Variant2;
135
+
136
+ export declare namespace InvocationSubmitParams {
137
+ export interface Variant0 {
138
+ /**
139
+ * Values for the discovered login fields
140
+ */
141
+ field_values: { [key: string]: string };
142
+ }
143
+
144
+ export interface Variant1 {
145
+ /**
146
+ * Selector of SSO button to click
147
+ */
148
+ sso_button: string;
149
+ }
150
+
151
+ export interface Variant2 {
152
+ /**
153
+ * The MFA delivery method type
154
+ */
155
+ selected_mfa_type: 'sms' | 'call' | 'email' | 'totp' | 'push' | 'security_key';
156
+ }
164
157
  }
165
158
 
166
159
  export declare namespace Invocations {
167
160
  export {
168
161
  type InvocationExchangeResponse as InvocationExchangeResponse,
169
162
  type InvocationCreateParams as InvocationCreateParams,
170
- type InvocationDiscoverParams as InvocationDiscoverParams,
171
163
  type InvocationExchangeParams as InvocationExchangeParams,
172
164
  type InvocationSubmitParams as InvocationSubmitParams,
173
165
  };
@@ -3,7 +3,6 @@
3
3
  export { Agents } from './agents';
4
4
  export {
5
5
  Auth,
6
- type AgentAuthDiscoverResponse,
7
6
  type AgentAuthInvocationResponse,
8
7
  type AgentAuthSubmitResponse,
9
8
  type AuthAgent,
@@ -11,7 +10,6 @@ export {
11
10
  type AuthAgentInvocationCreateRequest,
12
11
  type AuthAgentInvocationCreateResponse,
13
12
  type DiscoveredField,
14
- type ReauthResponse,
15
13
  type AuthCreateParams,
16
14
  type AuthListParams,
17
15
  type AuthAgentsOffsetPagination,