@onkernel/sdk 0.23.0 → 0.25.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.
- package/CHANGELOG.md +25 -0
- package/LICENSE +1 -1
- package/README.md +7 -2
- package/client.d.mts +7 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +7 -4
- package/client.d.ts.map +1 -1
- package/client.js +3 -0
- package/client.js.map +1 -1
- package/client.mjs +3 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agents/agents.d.mts +2 -2
- package/resources/agents/agents.d.mts.map +1 -1
- package/resources/agents/agents.d.ts +2 -2
- package/resources/agents/agents.d.ts.map +1 -1
- package/resources/agents/agents.js.map +1 -1
- package/resources/agents/agents.mjs.map +1 -1
- package/resources/agents/auth/auth.d.mts +146 -70
- package/resources/agents/auth/auth.d.mts.map +1 -1
- package/resources/agents/auth/auth.d.ts +146 -70
- package/resources/agents/auth/auth.d.ts.map +1 -1
- package/resources/agents/auth/auth.js +21 -2
- package/resources/agents/auth/auth.js.map +1 -1
- package/resources/agents/auth/auth.mjs +21 -2
- package/resources/agents/auth/auth.mjs.map +1 -1
- package/resources/agents/auth/index.d.mts +2 -2
- package/resources/agents/auth/index.d.mts.map +1 -1
- package/resources/agents/auth/index.d.ts +2 -2
- package/resources/agents/auth/index.d.ts.map +1 -1
- package/resources/agents/auth/index.js.map +1 -1
- package/resources/agents/auth/index.mjs.map +1 -1
- package/resources/agents/auth/invocations.d.mts +26 -31
- package/resources/agents/auth/invocations.d.mts.map +1 -1
- package/resources/agents/auth/invocations.d.ts +26 -31
- package/resources/agents/auth/invocations.d.ts.map +1 -1
- package/resources/agents/auth/invocations.js +5 -20
- package/resources/agents/auth/invocations.js.map +1 -1
- package/resources/agents/auth/invocations.mjs +5 -20
- package/resources/agents/auth/invocations.mjs.map +1 -1
- package/resources/agents/index.d.mts +1 -1
- package/resources/agents/index.d.mts.map +1 -1
- package/resources/agents/index.d.ts +1 -1
- package/resources/agents/index.d.ts.map +1 -1
- package/resources/agents/index.js.map +1 -1
- package/resources/agents/index.mjs.map +1 -1
- package/resources/browser-pools.d.mts +63 -98
- package/resources/browser-pools.d.mts.map +1 -1
- package/resources/browser-pools.d.ts +63 -98
- package/resources/browser-pools.d.ts.map +1 -1
- package/resources/credentials.d.mts +254 -0
- package/resources/credentials.d.mts.map +1 -0
- package/resources/credentials.d.ts +254 -0
- package/resources/credentials.d.ts.map +1 -0
- package/resources/credentials.js +101 -0
- package/resources/credentials.js.map +1 -0
- package/resources/credentials.mjs +97 -0
- package/resources/credentials.mjs.map +1 -0
- package/resources/index.d.mts +3 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/proxies.d.mts +137 -1
- package/resources/proxies.d.mts.map +1 -1
- package/resources/proxies.d.ts +137 -1
- package/resources/proxies.d.ts.map +1 -1
- package/resources/proxies.js +6 -0
- package/resources/proxies.js.map +1 -1
- package/resources/proxies.mjs +6 -0
- package/resources/proxies.mjs.map +1 -1
- package/src/client.ts +27 -8
- package/src/resources/agents/agents.ts +0 -2
- package/src/resources/agents/auth/auth.ts +170 -73
- package/src/resources/agents/auth/index.ts +0 -2
- package/src/resources/agents/auth/invocations.ts +25 -36
- package/src/resources/agents/index.ts +0 -1
- package/src/resources/browser-pools.ts +72 -115
- package/src/resources/credentials.ts +314 -0
- package/src/resources/index.ts +12 -4
- package/src/resources/proxies.ts +228 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { APIResource } from "../../../core/resource.js";
|
|
2
2
|
import * as InvocationsAPI from "./invocations.js";
|
|
3
|
-
import { InvocationCreateParams,
|
|
3
|
+
import { InvocationCreateParams, InvocationExchangeParams, InvocationExchangeResponse, InvocationSubmitParams, Invocations } from "./invocations.js";
|
|
4
4
|
import { APIPromise } from "../../../core/api-promise.js";
|
|
5
5
|
import { OffsetPagination, type OffsetPaginationParams, PagePromise } from "../../../core/pagination.js";
|
|
6
6
|
import { RequestOptions } from "../../../internal/request-options.js";
|
|
@@ -15,8 +15,8 @@ export declare class Auth extends APIResource {
|
|
|
15
15
|
* @example
|
|
16
16
|
* ```ts
|
|
17
17
|
* const authAgent = await client.agents.auth.create({
|
|
18
|
+
* domain: 'netflix.com',
|
|
18
19
|
* profile_name: 'user-123',
|
|
19
|
-
* target_domain: 'netflix.com',
|
|
20
20
|
* });
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
@@ -32,7 +32,7 @@ export declare class Auth extends APIResource {
|
|
|
32
32
|
*/
|
|
33
33
|
retrieve(id: string, options?: RequestOptions): APIPromise<AuthAgent>;
|
|
34
34
|
/**
|
|
35
|
-
* List auth agents with optional filters for profile_name and
|
|
35
|
+
* List auth agents with optional filters for profile_name and domain.
|
|
36
36
|
*
|
|
37
37
|
* @example
|
|
38
38
|
* ```ts
|
|
@@ -43,37 +43,21 @@ export declare class Auth extends APIResource {
|
|
|
43
43
|
* ```
|
|
44
44
|
*/
|
|
45
45
|
list(query?: AuthListParams | null | undefined, options?: RequestOptions): PagePromise<AuthAgentsOffsetPagination, AuthAgent>;
|
|
46
|
-
}
|
|
47
|
-
export type AuthAgentsOffsetPagination = OffsetPagination<AuthAgent>;
|
|
48
|
-
/**
|
|
49
|
-
* Response from discover endpoint matching AuthBlueprint schema
|
|
50
|
-
*/
|
|
51
|
-
export interface AgentAuthDiscoverResponse {
|
|
52
|
-
/**
|
|
53
|
-
* Whether discovery succeeded
|
|
54
|
-
*/
|
|
55
|
-
success: boolean;
|
|
56
|
-
/**
|
|
57
|
-
* Error message if discovery failed
|
|
58
|
-
*/
|
|
59
|
-
error_message?: string;
|
|
60
|
-
/**
|
|
61
|
-
* Discovered form fields (present when success is true)
|
|
62
|
-
*/
|
|
63
|
-
fields?: Array<DiscoveredField>;
|
|
64
46
|
/**
|
|
65
|
-
*
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
*
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
*
|
|
47
|
+
* Deletes an auth agent and terminates its workflow. This will:
|
|
48
|
+
*
|
|
49
|
+
* - Soft delete the auth agent record
|
|
50
|
+
* - Gracefully terminate the agent's Temporal workflow
|
|
51
|
+
* - Cancel any in-progress invocations
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```ts
|
|
55
|
+
* await client.agents.auth.delete('id');
|
|
56
|
+
* ```
|
|
74
57
|
*/
|
|
75
|
-
|
|
58
|
+
delete(id: string, options?: RequestOptions): APIPromise<void>;
|
|
76
59
|
}
|
|
60
|
+
export type AuthAgentsOffsetPagination = OffsetPagination<AuthAgent>;
|
|
77
61
|
/**
|
|
78
62
|
* Response from get invocation endpoint
|
|
79
63
|
*/
|
|
@@ -82,6 +66,10 @@ export interface AgentAuthInvocationResponse {
|
|
|
82
66
|
* App name (org name at time of invocation creation)
|
|
83
67
|
*/
|
|
84
68
|
app_name: string;
|
|
69
|
+
/**
|
|
70
|
+
* Domain for authentication
|
|
71
|
+
*/
|
|
72
|
+
domain: string;
|
|
85
73
|
/**
|
|
86
74
|
* When the handoff code expires
|
|
87
75
|
*/
|
|
@@ -89,45 +77,72 @@ export interface AgentAuthInvocationResponse {
|
|
|
89
77
|
/**
|
|
90
78
|
* Invocation status
|
|
91
79
|
*/
|
|
92
|
-
status: 'IN_PROGRESS' | 'SUCCESS' | 'EXPIRED' | 'CANCELED';
|
|
80
|
+
status: 'IN_PROGRESS' | 'SUCCESS' | 'EXPIRED' | 'CANCELED' | 'FAILED';
|
|
93
81
|
/**
|
|
94
|
-
*
|
|
82
|
+
* Current step in the invocation workflow
|
|
95
83
|
*/
|
|
96
|
-
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Response from submit endpoint matching SubmitResult schema
|
|
100
|
-
*/
|
|
101
|
-
export interface AgentAuthSubmitResponse {
|
|
84
|
+
step: 'initialized' | 'discovering' | 'awaiting_input' | 'awaiting_external_action' | 'submitting' | 'completed' | 'expired';
|
|
102
85
|
/**
|
|
103
|
-
*
|
|
86
|
+
* The invocation type:
|
|
87
|
+
*
|
|
88
|
+
* - login: First-time authentication
|
|
89
|
+
* - reauth: Re-authentication for previously authenticated agents
|
|
90
|
+
* - auto_login: Legacy type (no longer created, kept for backward compatibility)
|
|
104
91
|
*/
|
|
105
|
-
|
|
92
|
+
type: 'login' | 'auto_login' | 'reauth';
|
|
106
93
|
/**
|
|
107
|
-
*
|
|
108
|
-
* true
|
|
94
|
+
* Error message explaining why the invocation failed (present when status=FAILED)
|
|
109
95
|
*/
|
|
110
|
-
|
|
96
|
+
error_message?: string | null;
|
|
111
97
|
/**
|
|
112
|
-
*
|
|
98
|
+
* Instructions for user when external action is required (present when
|
|
99
|
+
* step=awaiting_external_action)
|
|
113
100
|
*/
|
|
114
|
-
|
|
101
|
+
external_action_message?: string | null;
|
|
115
102
|
/**
|
|
116
|
-
*
|
|
103
|
+
* Browser live view URL for debugging the invocation
|
|
117
104
|
*/
|
|
118
|
-
|
|
105
|
+
live_view_url?: string | null;
|
|
119
106
|
/**
|
|
120
|
-
*
|
|
107
|
+
* Fields currently awaiting input (present when step=awaiting_input)
|
|
121
108
|
*/
|
|
122
|
-
|
|
109
|
+
pending_fields?: Array<DiscoveredField> | null;
|
|
123
110
|
/**
|
|
124
|
-
*
|
|
111
|
+
* SSO buttons available on the page (present when step=awaiting_input)
|
|
125
112
|
*/
|
|
126
|
-
|
|
113
|
+
pending_sso_buttons?: Array<AgentAuthInvocationResponse.PendingSSOButton> | null;
|
|
114
|
+
/**
|
|
115
|
+
* Names of fields that have been submitted (present when step=submitting or later)
|
|
116
|
+
*/
|
|
117
|
+
submitted_fields?: Array<string> | null;
|
|
118
|
+
}
|
|
119
|
+
export declare namespace AgentAuthInvocationResponse {
|
|
120
|
+
/**
|
|
121
|
+
* An SSO button for signing in with an external identity provider
|
|
122
|
+
*/
|
|
123
|
+
interface PendingSSOButton {
|
|
124
|
+
/**
|
|
125
|
+
* Visible button text
|
|
126
|
+
*/
|
|
127
|
+
label: string;
|
|
128
|
+
/**
|
|
129
|
+
* Identity provider name
|
|
130
|
+
*/
|
|
131
|
+
provider: string;
|
|
132
|
+
/**
|
|
133
|
+
* XPath selector for the button
|
|
134
|
+
*/
|
|
135
|
+
selector: string;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Response from submit endpoint - returns immediately after submission is accepted
|
|
140
|
+
*/
|
|
141
|
+
export interface AgentAuthSubmitResponse {
|
|
127
142
|
/**
|
|
128
|
-
*
|
|
143
|
+
* Whether the submission was accepted for processing
|
|
129
144
|
*/
|
|
130
|
-
|
|
145
|
+
accepted: boolean;
|
|
131
146
|
}
|
|
132
147
|
/**
|
|
133
148
|
* An auth agent that manages authentication for a specific domain and profile
|
|
@@ -150,6 +165,29 @@ export interface AuthAgent {
|
|
|
150
165
|
* Current authentication status of the managed profile
|
|
151
166
|
*/
|
|
152
167
|
status: 'AUTHENTICATED' | 'NEEDS_AUTH';
|
|
168
|
+
/**
|
|
169
|
+
* Additional domains that are valid for this auth agent's authentication flow
|
|
170
|
+
* (besides the primary domain). Useful when login pages redirect to different
|
|
171
|
+
* domains.
|
|
172
|
+
*/
|
|
173
|
+
allowed_domains?: Array<string>;
|
|
174
|
+
/**
|
|
175
|
+
* Whether automatic re-authentication is possible (has credential_id, selectors,
|
|
176
|
+
* and login_url)
|
|
177
|
+
*/
|
|
178
|
+
can_reauth?: boolean;
|
|
179
|
+
/**
|
|
180
|
+
* ID of the linked credential for automatic re-authentication
|
|
181
|
+
*/
|
|
182
|
+
credential_id?: string;
|
|
183
|
+
/**
|
|
184
|
+
* Name of the linked credential for automatic re-authentication
|
|
185
|
+
*/
|
|
186
|
+
credential_name?: string;
|
|
187
|
+
/**
|
|
188
|
+
* Whether this auth agent has stored selectors for deterministic re-authentication
|
|
189
|
+
*/
|
|
190
|
+
has_selectors?: boolean;
|
|
153
191
|
/**
|
|
154
192
|
* When the last authentication check was performed
|
|
155
193
|
*/
|
|
@@ -159,14 +197,26 @@ export interface AuthAgent {
|
|
|
159
197
|
* Request to create or find an auth agent
|
|
160
198
|
*/
|
|
161
199
|
export interface AuthAgentCreateRequest {
|
|
200
|
+
/**
|
|
201
|
+
* Domain for authentication
|
|
202
|
+
*/
|
|
203
|
+
domain: string;
|
|
162
204
|
/**
|
|
163
205
|
* Name of the profile to use for this auth agent
|
|
164
206
|
*/
|
|
165
207
|
profile_name: string;
|
|
166
208
|
/**
|
|
167
|
-
*
|
|
209
|
+
* Additional domains that are valid for this auth agent's authentication flow
|
|
210
|
+
* (besides the primary domain). Useful when login pages redirect to different
|
|
211
|
+
* domains.
|
|
212
|
+
*/
|
|
213
|
+
allowed_domains?: Array<string>;
|
|
214
|
+
/**
|
|
215
|
+
* Optional name of an existing credential to use for this auth agent. If provided,
|
|
216
|
+
* the credential will be linked to the agent and its values will be used to
|
|
217
|
+
* auto-fill the login form on invocation.
|
|
168
218
|
*/
|
|
169
|
-
|
|
219
|
+
credential_name?: string;
|
|
170
220
|
/**
|
|
171
221
|
* Optional login page URL. If provided, will be stored on the agent and used to
|
|
172
222
|
* skip discovery in future invocations.
|
|
@@ -196,27 +246,41 @@ export interface AuthAgentInvocationCreateRequest {
|
|
|
196
246
|
* ID of the auth agent to create an invocation for
|
|
197
247
|
*/
|
|
198
248
|
auth_agent_id: string;
|
|
249
|
+
/**
|
|
250
|
+
* If provided, saves the submitted credentials under this name upon successful
|
|
251
|
+
* login. The credential will be linked to the auth agent for automatic
|
|
252
|
+
* re-authentication.
|
|
253
|
+
*/
|
|
254
|
+
save_credential_as?: string;
|
|
199
255
|
}
|
|
200
256
|
/**
|
|
201
|
-
* Response from creating an
|
|
257
|
+
* Response from creating an invocation. Always returns an invocation_id.
|
|
202
258
|
*/
|
|
203
259
|
export interface AuthAgentInvocationCreateResponse {
|
|
204
260
|
/**
|
|
205
|
-
* When the handoff code expires
|
|
261
|
+
* When the handoff code expires.
|
|
206
262
|
*/
|
|
207
263
|
expires_at: string;
|
|
208
264
|
/**
|
|
209
|
-
* One-time code for handoff
|
|
265
|
+
* One-time code for handoff.
|
|
210
266
|
*/
|
|
211
267
|
handoff_code: string;
|
|
212
268
|
/**
|
|
213
|
-
* URL to redirect user to
|
|
269
|
+
* URL to redirect user to.
|
|
214
270
|
*/
|
|
215
271
|
hosted_url: string;
|
|
216
272
|
/**
|
|
217
|
-
* Unique identifier for the invocation
|
|
273
|
+
* Unique identifier for the invocation.
|
|
218
274
|
*/
|
|
219
275
|
invocation_id: string;
|
|
276
|
+
/**
|
|
277
|
+
* The invocation type:
|
|
278
|
+
*
|
|
279
|
+
* - login: First-time authentication
|
|
280
|
+
* - reauth: Re-authentication for previously authenticated agents
|
|
281
|
+
* - auto_login: Legacy type (no longer created, kept for backward compatibility)
|
|
282
|
+
*/
|
|
283
|
+
type: 'login' | 'auto_login' | 'reauth';
|
|
220
284
|
}
|
|
221
285
|
/**
|
|
222
286
|
* A discovered form field
|
|
@@ -237,7 +301,7 @@ export interface DiscoveredField {
|
|
|
237
301
|
/**
|
|
238
302
|
* Field type
|
|
239
303
|
*/
|
|
240
|
-
type: 'text' | 'email' | 'password' | 'tel' | 'number' | 'url' | 'code';
|
|
304
|
+
type: 'text' | 'email' | 'password' | 'tel' | 'number' | 'url' | 'code' | 'totp';
|
|
241
305
|
/**
|
|
242
306
|
* Field placeholder
|
|
243
307
|
*/
|
|
@@ -248,14 +312,26 @@ export interface DiscoveredField {
|
|
|
248
312
|
required?: boolean;
|
|
249
313
|
}
|
|
250
314
|
export interface AuthCreateParams {
|
|
315
|
+
/**
|
|
316
|
+
* Domain for authentication
|
|
317
|
+
*/
|
|
318
|
+
domain: string;
|
|
251
319
|
/**
|
|
252
320
|
* Name of the profile to use for this auth agent
|
|
253
321
|
*/
|
|
254
322
|
profile_name: string;
|
|
255
323
|
/**
|
|
256
|
-
*
|
|
324
|
+
* Additional domains that are valid for this auth agent's authentication flow
|
|
325
|
+
* (besides the primary domain). Useful when login pages redirect to different
|
|
326
|
+
* domains.
|
|
327
|
+
*/
|
|
328
|
+
allowed_domains?: Array<string>;
|
|
329
|
+
/**
|
|
330
|
+
* Optional name of an existing credential to use for this auth agent. If provided,
|
|
331
|
+
* the credential will be linked to the agent and its values will be used to
|
|
332
|
+
* auto-fill the login form on invocation.
|
|
257
333
|
*/
|
|
258
|
-
|
|
334
|
+
credential_name?: string;
|
|
259
335
|
/**
|
|
260
336
|
* Optional login page URL. If provided, will be stored on the agent and used to
|
|
261
337
|
* skip discovery in future invocations.
|
|
@@ -279,16 +355,16 @@ export declare namespace AuthCreateParams {
|
|
|
279
355
|
}
|
|
280
356
|
export interface AuthListParams extends OffsetPaginationParams {
|
|
281
357
|
/**
|
|
282
|
-
* Filter by
|
|
358
|
+
* Filter by domain
|
|
283
359
|
*/
|
|
284
|
-
|
|
360
|
+
domain?: string;
|
|
285
361
|
/**
|
|
286
|
-
* Filter by
|
|
362
|
+
* Filter by profile name
|
|
287
363
|
*/
|
|
288
|
-
|
|
364
|
+
profile_name?: string;
|
|
289
365
|
}
|
|
290
366
|
export declare namespace Auth {
|
|
291
|
-
export { type
|
|
292
|
-
export { Invocations as Invocations, type InvocationExchangeResponse as InvocationExchangeResponse, type InvocationCreateParams as InvocationCreateParams, type
|
|
367
|
+
export { type AgentAuthInvocationResponse as AgentAuthInvocationResponse, type AgentAuthSubmitResponse as AgentAuthSubmitResponse, type AuthAgent as AuthAgent, type AuthAgentCreateRequest as AuthAgentCreateRequest, type AuthAgentInvocationCreateRequest as AuthAgentInvocationCreateRequest, type AuthAgentInvocationCreateResponse as AuthAgentInvocationCreateResponse, type DiscoveredField as DiscoveredField, type AuthAgentsOffsetPagination as AuthAgentsOffsetPagination, type AuthCreateParams as AuthCreateParams, type AuthListParams as AuthListParams, };
|
|
368
|
+
export { Invocations as Invocations, type InvocationExchangeResponse as InvocationExchangeResponse, type InvocationCreateParams as InvocationCreateParams, type InvocationExchangeParams as InvocationExchangeParams, type InvocationSubmitParams as InvocationSubmitParams, };
|
|
293
369
|
}
|
|
294
370
|
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/resources/agents/auth/auth.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,cAAc;OACnB,EACL,sBAAsB,EACtB,wBAAwB,EACxB,
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/resources/agents/auth/auth.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,cAAc;OACnB,EACL,sBAAsB,EACtB,wBAAwB,EACxB,0BAA0B,EAC1B,sBAAsB,EACtB,WAAW,EACZ;OACM,EAAE,UAAU,EAAE;OACd,EAAE,gBAAgB,EAAE,KAAK,sBAAsB,EAAE,WAAW,EAAE;OAE9D,EAAE,cAAc,EAAE;AAGzB,qBAAa,IAAK,SAAQ,WAAW;IACnC,WAAW,EAAE,cAAc,CAAC,WAAW,CAAgD;IAEvF;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,IAAI,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,SAAS,CAAC;IAI/E;;;;;;;;OAQG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,SAAS,CAAC;IAIrE;;;;;;;;;;OAUG;IACH,IAAI,CACF,KAAK,GAAE,cAAc,GAAG,IAAI,GAAG,SAAc,EAC7C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,0BAA0B,EAAE,SAAS,CAAC;IAIrD;;;;;;;;;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,WAAW,cAAe,SAAQ,sBAAsB;IAC5D;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAID,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EACL,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,SAAS,IAAI,SAAS,EAC3B,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,cAAc,IAAI,cAAc,GACtC,CAAC;IAEF,OAAO,EACL,WAAW,IAAI,WAAW,EAC1B,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
|
|
@@ -7,6 +7,7 @@ const resource_1 = require("../../../core/resource.js");
|
|
|
7
7
|
const InvocationsAPI = tslib_1.__importStar(require("./invocations.js"));
|
|
8
8
|
const invocations_1 = require("./invocations.js");
|
|
9
9
|
const pagination_1 = require("../../../core/pagination.js");
|
|
10
|
+
const headers_1 = require("../../../internal/headers.js");
|
|
10
11
|
const path_1 = require("../../../internal/utils/path.js");
|
|
11
12
|
class Auth extends resource_1.APIResource {
|
|
12
13
|
constructor() {
|
|
@@ -22,8 +23,8 @@ class Auth extends resource_1.APIResource {
|
|
|
22
23
|
* @example
|
|
23
24
|
* ```ts
|
|
24
25
|
* const authAgent = await client.agents.auth.create({
|
|
26
|
+
* domain: 'netflix.com',
|
|
25
27
|
* profile_name: 'user-123',
|
|
26
|
-
* target_domain: 'netflix.com',
|
|
27
28
|
* });
|
|
28
29
|
* ```
|
|
29
30
|
*/
|
|
@@ -43,7 +44,7 @@ class Auth extends resource_1.APIResource {
|
|
|
43
44
|
return this._client.get((0, path_1.path) `/agents/auth/${id}`, options);
|
|
44
45
|
}
|
|
45
46
|
/**
|
|
46
|
-
* List auth agents with optional filters for profile_name and
|
|
47
|
+
* List auth agents with optional filters for profile_name and domain.
|
|
47
48
|
*
|
|
48
49
|
* @example
|
|
49
50
|
* ```ts
|
|
@@ -56,6 +57,24 @@ class Auth extends resource_1.APIResource {
|
|
|
56
57
|
list(query = {}, options) {
|
|
57
58
|
return this._client.getAPIList('/agents/auth', (pagination_1.OffsetPagination), { query, ...options });
|
|
58
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* Deletes an auth agent and terminates its workflow. This will:
|
|
62
|
+
*
|
|
63
|
+
* - Soft delete the auth agent record
|
|
64
|
+
* - Gracefully terminate the agent's Temporal workflow
|
|
65
|
+
* - Cancel any in-progress invocations
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```ts
|
|
69
|
+
* await client.agents.auth.delete('id');
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
delete(id, options) {
|
|
73
|
+
return this._client.delete((0, path_1.path) `/agents/auth/${id}`, {
|
|
74
|
+
...options,
|
|
75
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
76
|
+
});
|
|
77
|
+
}
|
|
59
78
|
}
|
|
60
79
|
exports.Auth = Auth;
|
|
61
80
|
Auth.Invocations = invocations_1.Invocations;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/resources/agents/auth/auth.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,wDAAqD;AACrD,yEAAgD;AAChD,
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/resources/agents/auth/auth.ts"],"names":[],"mappings":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../../../core/resource.mjs";
|
|
|
3
3
|
import * as InvocationsAPI from "./invocations.mjs";
|
|
4
4
|
import { Invocations, } from "./invocations.mjs";
|
|
5
5
|
import { OffsetPagination } from "../../../core/pagination.mjs";
|
|
6
|
+
import { buildHeaders } from "../../../internal/headers.mjs";
|
|
6
7
|
import { path } from "../../../internal/utils/path.mjs";
|
|
7
8
|
export class Auth extends APIResource {
|
|
8
9
|
constructor() {
|
|
@@ -18,8 +19,8 @@ export class Auth extends APIResource {
|
|
|
18
19
|
* @example
|
|
19
20
|
* ```ts
|
|
20
21
|
* const authAgent = await client.agents.auth.create({
|
|
22
|
+
* domain: 'netflix.com',
|
|
21
23
|
* profile_name: 'user-123',
|
|
22
|
-
* target_domain: 'netflix.com',
|
|
23
24
|
* });
|
|
24
25
|
* ```
|
|
25
26
|
*/
|
|
@@ -39,7 +40,7 @@ export class Auth extends APIResource {
|
|
|
39
40
|
return this._client.get(path `/agents/auth/${id}`, options);
|
|
40
41
|
}
|
|
41
42
|
/**
|
|
42
|
-
* List auth agents with optional filters for profile_name and
|
|
43
|
+
* List auth agents with optional filters for profile_name and domain.
|
|
43
44
|
*
|
|
44
45
|
* @example
|
|
45
46
|
* ```ts
|
|
@@ -52,6 +53,24 @@ export class Auth extends APIResource {
|
|
|
52
53
|
list(query = {}, options) {
|
|
53
54
|
return this._client.getAPIList('/agents/auth', (OffsetPagination), { query, ...options });
|
|
54
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* Deletes an auth agent and terminates its workflow. This will:
|
|
58
|
+
*
|
|
59
|
+
* - Soft delete the auth agent record
|
|
60
|
+
* - Gracefully terminate the agent's Temporal workflow
|
|
61
|
+
* - Cancel any in-progress invocations
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```ts
|
|
65
|
+
* await client.agents.auth.delete('id');
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
delete(id, options) {
|
|
69
|
+
return this._client.delete(path `/agents/auth/${id}`, {
|
|
70
|
+
...options,
|
|
71
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
72
|
+
});
|
|
73
|
+
}
|
|
55
74
|
}
|
|
56
75
|
Auth.Invocations = Invocations;
|
|
57
76
|
//# sourceMappingURL=auth.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.mjs","sourceRoot":"","sources":["../../../src/resources/agents/auth/auth.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,cAAc;OACnB,
|
|
1
|
+
{"version":3,"file":"auth.mjs","sourceRoot":"","sources":["../../../src/resources/agents/auth/auth.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,cAAc;OACnB,EAKL,WAAW,GACZ;OAEM,EAAE,gBAAgB,EAA4C;OAC9D,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,IAAK,SAAQ,WAAW;IAArC;;QACE,gBAAW,GAA+B,IAAI,cAAc,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAqEzF,CAAC;IAnEC;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,IAAsB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;;;OAQG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,gBAAgB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;IAED;;;;;;;;;;OAUG;IACH,IAAI,CACF,QAA2C,EAAE,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,cAAc,EAAE,CAAA,gBAA2B,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrG,CAAC;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,gBAAgB,EAAE,EAAE,EAAE;YACnD,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF;AAmXD,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { Auth, type
|
|
2
|
-
export { Invocations, type InvocationExchangeResponse, type InvocationCreateParams, type
|
|
1
|
+
export { Auth, type AgentAuthInvocationResponse, type AgentAuthSubmitResponse, type AuthAgent, type AuthAgentCreateRequest, type AuthAgentInvocationCreateRequest, type AuthAgentInvocationCreateResponse, type DiscoveredField, type AuthCreateParams, type AuthListParams, type AuthAgentsOffsetPagination, } from "./auth.mjs";
|
|
2
|
+
export { Invocations, type InvocationExchangeResponse, type InvocationCreateParams, type InvocationExchangeParams, type InvocationSubmitParams, } from "./invocations.mjs";
|
|
3
3
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/resources/agents/auth/index.ts"],"names":[],"mappings":"OAEO,EACL,IAAI,EACJ,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/resources/agents/auth/index.ts"],"names":[],"mappings":"OAEO,EACL,IAAI,EACJ,KAAK,2BAA2B,EAChC,KAAK,uBAAuB,EAC5B,KAAK,SAAS,EACd,KAAK,sBAAsB,EAC3B,KAAK,gCAAgC,EACrC,KAAK,iCAAiC,EACtC,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,0BAA0B,GAChC;OACM,EACL,WAAW,EACX,KAAK,0BAA0B,EAC/B,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,GAC5B"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { Auth, type
|
|
2
|
-
export { Invocations, type InvocationExchangeResponse, type InvocationCreateParams, type
|
|
1
|
+
export { Auth, type AgentAuthInvocationResponse, type AgentAuthSubmitResponse, type AuthAgent, type AuthAgentCreateRequest, type AuthAgentInvocationCreateRequest, type AuthAgentInvocationCreateResponse, type DiscoveredField, type AuthCreateParams, type AuthListParams, type AuthAgentsOffsetPagination, } from "./auth.js";
|
|
2
|
+
export { Invocations, type InvocationExchangeResponse, type InvocationCreateParams, type InvocationExchangeParams, type InvocationSubmitParams, } from "./invocations.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/agents/auth/index.ts"],"names":[],"mappings":"OAEO,EACL,IAAI,EACJ,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/agents/auth/index.ts"],"names":[],"mappings":"OAEO,EACL,IAAI,EACJ,KAAK,2BAA2B,EAChC,KAAK,uBAAuB,EAC5B,KAAK,SAAS,EACd,KAAK,sBAAsB,EAC3B,KAAK,gCAAgC,EACrC,KAAK,iCAAiC,EACtC,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,0BAA0B,GAChC;OACM,EACL,WAAW,EACX,KAAK,0BAA0B,EAC/B,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,GAC5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/agents/auth/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/agents/auth/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kCAYgB;AAXd,4FAAA,IAAI,OAAA;AAYN,gDAMuB;AALrB,0GAAA,WAAW,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/resources/agents/auth/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,IAAI,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/resources/agents/auth/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,IAAI,GAWL;OACM,EACL,WAAW,GAKZ"}
|
|
@@ -18,8 +18,8 @@ export declare class Invocations extends APIResource {
|
|
|
18
18
|
*/
|
|
19
19
|
create(body: InvocationCreateParams, options?: RequestOptions): APIPromise<AuthAPI.AuthAgentInvocationCreateResponse>;
|
|
20
20
|
/**
|
|
21
|
-
* Returns invocation details including app_name and
|
|
22
|
-
*
|
|
21
|
+
* Returns invocation details including status, app_name, and domain. Supports both
|
|
22
|
+
* API key and JWT (from exchange endpoint) authentication.
|
|
23
23
|
*
|
|
24
24
|
* @example
|
|
25
25
|
* ```ts
|
|
@@ -30,20 +30,6 @@ export declare class Invocations extends APIResource {
|
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
|
32
32
|
retrieve(invocationID: string, options?: RequestOptions): APIPromise<AuthAPI.AgentAuthInvocationResponse>;
|
|
33
|
-
/**
|
|
34
|
-
* Inspects the target site to detect logged-in state or discover required fields.
|
|
35
|
-
* Returns 200 with success: true when fields are found, or 4xx/5xx for failures.
|
|
36
|
-
* Requires the JWT returned by the exchange endpoint.
|
|
37
|
-
*
|
|
38
|
-
* @example
|
|
39
|
-
* ```ts
|
|
40
|
-
* const agentAuthDiscoverResponse =
|
|
41
|
-
* await client.agents.auth.invocations.discover(
|
|
42
|
-
* 'invocation_id',
|
|
43
|
-
* );
|
|
44
|
-
* ```
|
|
45
|
-
*/
|
|
46
|
-
discover(invocationID: string, body?: InvocationDiscoverParams | null | undefined, options?: RequestOptions): APIPromise<AuthAPI.AgentAuthDiscoverResponse>;
|
|
47
33
|
/**
|
|
48
34
|
* Validates the handoff code and returns a JWT token for subsequent requests. No
|
|
49
35
|
* authentication required (the handoff code serves as the credential).
|
|
@@ -59,8 +45,9 @@ export declare class Invocations extends APIResource {
|
|
|
59
45
|
*/
|
|
60
46
|
exchange(invocationID: string, body: InvocationExchangeParams, options?: RequestOptions): APIPromise<InvocationExchangeResponse>;
|
|
61
47
|
/**
|
|
62
|
-
* Submits field values for the discovered login form
|
|
63
|
-
*
|
|
48
|
+
* Submits field values for the discovered login form. Returns immediately after
|
|
49
|
+
* submission is accepted. Poll the invocation endpoint to track progress and get
|
|
50
|
+
* results.
|
|
64
51
|
*
|
|
65
52
|
* @example
|
|
66
53
|
* ```ts
|
|
@@ -96,13 +83,12 @@ export interface InvocationCreateParams {
|
|
|
96
83
|
* ID of the auth agent to create an invocation for
|
|
97
84
|
*/
|
|
98
85
|
auth_agent_id: string;
|
|
99
|
-
}
|
|
100
|
-
export interface InvocationDiscoverParams {
|
|
101
86
|
/**
|
|
102
|
-
*
|
|
103
|
-
*
|
|
87
|
+
* If provided, saves the submitted credentials under this name upon successful
|
|
88
|
+
* login. The credential will be linked to the auth agent for automatic
|
|
89
|
+
* re-authentication.
|
|
104
90
|
*/
|
|
105
|
-
|
|
91
|
+
save_credential_as?: string;
|
|
106
92
|
}
|
|
107
93
|
export interface InvocationExchangeParams {
|
|
108
94
|
/**
|
|
@@ -110,15 +96,24 @@ export interface InvocationExchangeParams {
|
|
|
110
96
|
*/
|
|
111
97
|
code: string;
|
|
112
98
|
}
|
|
113
|
-
export
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
99
|
+
export type InvocationSubmitParams = InvocationSubmitParams.Variant0 | InvocationSubmitParams.Variant1;
|
|
100
|
+
export declare namespace InvocationSubmitParams {
|
|
101
|
+
interface Variant0 {
|
|
102
|
+
/**
|
|
103
|
+
* Values for the discovered login fields
|
|
104
|
+
*/
|
|
105
|
+
field_values: {
|
|
106
|
+
[key: string]: string;
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
interface Variant1 {
|
|
110
|
+
/**
|
|
111
|
+
* Selector of SSO button to click
|
|
112
|
+
*/
|
|
113
|
+
sso_button: string;
|
|
114
|
+
}
|
|
120
115
|
}
|
|
121
116
|
export declare namespace Invocations {
|
|
122
|
-
export { type InvocationExchangeResponse as InvocationExchangeResponse, type InvocationCreateParams as InvocationCreateParams, type
|
|
117
|
+
export { type InvocationExchangeResponse as InvocationExchangeResponse, type InvocationCreateParams as InvocationCreateParams, type InvocationExchangeParams as InvocationExchangeParams, type InvocationSubmitParams as InvocationSubmitParams, };
|
|
123
118
|
}
|
|
124
119
|
//# sourceMappingURL=invocations.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invocations.d.mts","sourceRoot":"","sources":["../../../src/resources/agents/auth/invocations.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;OACZ,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;;;OAYG;IACH,MAAM,CACJ,IAAI,EAAE,sBAAsB,EAC5B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,OAAO,CAAC,iCAAiC,CAAC;IAIxD;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,OAAO,CAAC,2BAA2B,CAAC;IAIzG;;;;;;;;;;;;OAYG;IACH,QAAQ,CACN,YAAY,EAAE,MAAM,EACpB,IAAI,
|
|
1
|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