@onkernel/sdk 0.23.0 → 0.24.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 +9 -0
- package/client.d.mts +5 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +5 -2
- 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 +113 -15
- package/resources/agents/auth/auth.d.mts.map +1 -1
- package/resources/agents/auth/auth.d.ts +113 -15
- package/resources/agents/auth/auth.d.ts.map +1 -1
- package/resources/agents/auth/auth.js +35 -0
- package/resources/agents/auth/auth.js.map +1 -1
- package/resources/agents/auth/auth.mjs +35 -0
- package/resources/agents/auth/auth.mjs.map +1 -1
- package/resources/agents/auth/index.d.mts +1 -1
- package/resources/agents/auth/index.d.mts.map +1 -1
- package/resources/agents/auth/index.d.ts +1 -1
- 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 +6 -0
- package/resources/agents/auth/invocations.d.mts.map +1 -1
- package/resources/agents/auth/invocations.d.ts +6 -0
- package/resources/agents/auth/invocations.d.ts.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 +163 -0
- package/resources/credentials.d.mts.map +1 -0
- package/resources/credentials.d.ts +163 -0
- package/resources/credentials.d.ts.map +1 -0
- package/resources/credentials.js +82 -0
- package/resources/credentials.js.map +1 -0
- package/resources/credentials.mjs +78 -0
- package/resources/credentials.mjs.map +1 -0
- package/resources/index.d.mts +2 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -1
- 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/src/client.ts +23 -8
- package/src/resources/agents/agents.ts +2 -0
- package/src/resources/agents/auth/auth.ts +138 -14
- package/src/resources/agents/auth/index.ts +1 -0
- package/src/resources/agents/auth/invocations.ts +7 -0
- package/src/resources/agents/index.ts +1 -0
- package/src/resources/browser-pools.ts +72 -115
- package/src/resources/credentials.ts +205 -0
- package/src/resources/index.ts +10 -4
- 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
|
@@ -43,6 +43,33 @@ export declare class Auth extends APIResource {
|
|
|
43
43
|
* ```
|
|
44
44
|
*/
|
|
45
45
|
list(query?: AuthListParams | null | undefined, options?: RequestOptions): PagePromise<AuthAgentsOffsetPagination, AuthAgent>;
|
|
46
|
+
/**
|
|
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
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
delete(id: string, options?: RequestOptions): APIPromise<void>;
|
|
59
|
+
/**
|
|
60
|
+
* Triggers automatic re-authentication for an auth agent using stored credentials.
|
|
61
|
+
* Requires the auth agent to have a linked credential, stored selectors, and
|
|
62
|
+
* login_url. Returns immediately with status indicating whether re-auth was
|
|
63
|
+
* started.
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```ts
|
|
67
|
+
* const reauthResponse = await client.agents.auth.reauth(
|
|
68
|
+
* 'id',
|
|
69
|
+
* );
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
reauth(id: string, options?: RequestOptions): APIPromise<ReauthResponse>;
|
|
46
73
|
}
|
|
47
74
|
export type AuthAgentsOffsetPagination = OffsetPagination<AuthAgent>;
|
|
48
75
|
/**
|
|
@@ -150,6 +177,23 @@ export interface AuthAgent {
|
|
|
150
177
|
* Current authentication status of the managed profile
|
|
151
178
|
*/
|
|
152
179
|
status: 'AUTHENTICATED' | 'NEEDS_AUTH';
|
|
180
|
+
/**
|
|
181
|
+
* Whether automatic re-authentication is possible (has credential_id, selectors,
|
|
182
|
+
* and login_url)
|
|
183
|
+
*/
|
|
184
|
+
can_reauth?: boolean;
|
|
185
|
+
/**
|
|
186
|
+
* ID of the linked credential for automatic re-authentication
|
|
187
|
+
*/
|
|
188
|
+
credential_id?: string;
|
|
189
|
+
/**
|
|
190
|
+
* Name of the linked credential for automatic re-authentication
|
|
191
|
+
*/
|
|
192
|
+
credential_name?: string;
|
|
193
|
+
/**
|
|
194
|
+
* Whether this auth agent has stored selectors for deterministic re-authentication
|
|
195
|
+
*/
|
|
196
|
+
has_selectors?: boolean;
|
|
153
197
|
/**
|
|
154
198
|
* When the last authentication check was performed
|
|
155
199
|
*/
|
|
@@ -167,6 +211,12 @@ export interface AuthAgentCreateRequest {
|
|
|
167
211
|
* Target domain for authentication
|
|
168
212
|
*/
|
|
169
213
|
target_domain: 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.
|
|
218
|
+
*/
|
|
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,52 @@ 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
|
|
257
|
+
* Response when the agent is already authenticated.
|
|
202
258
|
*/
|
|
203
|
-
export
|
|
204
|
-
|
|
205
|
-
* When the handoff code expires
|
|
206
|
-
*/
|
|
207
|
-
expires_at: string;
|
|
208
|
-
/**
|
|
209
|
-
* One-time code for handoff
|
|
210
|
-
*/
|
|
211
|
-
handoff_code: string;
|
|
259
|
+
export type AuthAgentInvocationCreateResponse = AuthAgentInvocationCreateResponse.AuthAgentAlreadyAuthenticated | AuthAgentInvocationCreateResponse.AuthAgentInvocationCreated;
|
|
260
|
+
export declare namespace AuthAgentInvocationCreateResponse {
|
|
212
261
|
/**
|
|
213
|
-
*
|
|
262
|
+
* Response when the agent is already authenticated.
|
|
214
263
|
*/
|
|
215
|
-
|
|
264
|
+
interface AuthAgentAlreadyAuthenticated {
|
|
265
|
+
/**
|
|
266
|
+
* Indicates the agent is already authenticated and no invocation was created.
|
|
267
|
+
*/
|
|
268
|
+
status: 'already_authenticated';
|
|
269
|
+
}
|
|
216
270
|
/**
|
|
217
|
-
*
|
|
271
|
+
* Response when a new invocation was created.
|
|
218
272
|
*/
|
|
219
|
-
|
|
273
|
+
interface AuthAgentInvocationCreated {
|
|
274
|
+
/**
|
|
275
|
+
* When the handoff code expires.
|
|
276
|
+
*/
|
|
277
|
+
expires_at: string;
|
|
278
|
+
/**
|
|
279
|
+
* One-time code for handoff.
|
|
280
|
+
*/
|
|
281
|
+
handoff_code: string;
|
|
282
|
+
/**
|
|
283
|
+
* URL to redirect user to.
|
|
284
|
+
*/
|
|
285
|
+
hosted_url: string;
|
|
286
|
+
/**
|
|
287
|
+
* Unique identifier for the invocation.
|
|
288
|
+
*/
|
|
289
|
+
invocation_id: string;
|
|
290
|
+
/**
|
|
291
|
+
* Indicates an invocation was created.
|
|
292
|
+
*/
|
|
293
|
+
status: 'invocation_created';
|
|
294
|
+
}
|
|
220
295
|
}
|
|
221
296
|
/**
|
|
222
297
|
* A discovered form field
|
|
@@ -247,6 +322,23 @@ export interface DiscoveredField {
|
|
|
247
322
|
*/
|
|
248
323
|
required?: boolean;
|
|
249
324
|
}
|
|
325
|
+
/**
|
|
326
|
+
* Response from triggering re-authentication
|
|
327
|
+
*/
|
|
328
|
+
export interface ReauthResponse {
|
|
329
|
+
/**
|
|
330
|
+
* Result of the re-authentication attempt
|
|
331
|
+
*/
|
|
332
|
+
status: 'reauth_started' | 'already_authenticated' | 'cannot_reauth';
|
|
333
|
+
/**
|
|
334
|
+
* ID of the re-auth invocation if one was created
|
|
335
|
+
*/
|
|
336
|
+
invocation_id?: string;
|
|
337
|
+
/**
|
|
338
|
+
* Human-readable description of the result
|
|
339
|
+
*/
|
|
340
|
+
message?: string;
|
|
341
|
+
}
|
|
250
342
|
export interface AuthCreateParams {
|
|
251
343
|
/**
|
|
252
344
|
* Name of the profile to use for this auth agent
|
|
@@ -256,6 +348,12 @@ export interface AuthCreateParams {
|
|
|
256
348
|
* Target domain for authentication
|
|
257
349
|
*/
|
|
258
350
|
target_domain: string;
|
|
351
|
+
/**
|
|
352
|
+
* Optional name of an existing credential to use for this auth agent. If provided,
|
|
353
|
+
* the credential will be linked to the agent and its values will be used to
|
|
354
|
+
* auto-fill the login form on invocation.
|
|
355
|
+
*/
|
|
356
|
+
credential_name?: string;
|
|
259
357
|
/**
|
|
260
358
|
* Optional login page URL. If provided, will be stored on the agent and used to
|
|
261
359
|
* skip discovery in future invocations.
|
|
@@ -288,7 +386,7 @@ export interface AuthListParams extends OffsetPaginationParams {
|
|
|
288
386
|
target_domain?: string;
|
|
289
387
|
}
|
|
290
388
|
export declare namespace Auth {
|
|
291
|
-
export { type AgentAuthDiscoverResponse as AgentAuthDiscoverResponse, 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, };
|
|
389
|
+
export { type AgentAuthDiscoverResponse as AgentAuthDiscoverResponse, 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 ReauthResponse as ReauthResponse, type AuthAgentsOffsetPagination as AuthAgentsOffsetPagination, type AuthCreateParams as AuthCreateParams, type AuthListParams as AuthListParams, };
|
|
292
390
|
export { Invocations as Invocations, type InvocationExchangeResponse as InvocationExchangeResponse, type InvocationCreateParams as InvocationCreateParams, type InvocationDiscoverParams as InvocationDiscoverParams, type InvocationExchangeParams as InvocationExchangeParams, type InvocationSubmitParams as InvocationSubmitParams, };
|
|
293
391
|
}
|
|
294
392
|
//# sourceMappingURL=auth.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.mts","sourceRoot":"","sources":["../../../src/resources/agents/auth/auth.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,cAAc;OACnB,EACL,sBAAsB,EACtB,wBAAwB,EACxB,wBAAwB,EACxB,0BAA0B,EAC1B,sBAAsB,EACtB,WAAW,EACZ;OACM,EAAE,UAAU,EAAE;OACd,EAAE,gBAAgB,EAAE,KAAK,sBAAsB,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"auth.d.mts","sourceRoot":"","sources":["../../../src/resources/agents/auth/auth.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,cAAc;OACnB,EACL,sBAAsB,EACtB,wBAAwB,EACxB,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;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAO9D;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,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sB;IAC5D;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAID,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EACL,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,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,cAAc,IAAI,cAAc,EACrC,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,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
|
|
@@ -43,6 +43,33 @@ export declare class Auth extends APIResource {
|
|
|
43
43
|
* ```
|
|
44
44
|
*/
|
|
45
45
|
list(query?: AuthListParams | null | undefined, options?: RequestOptions): PagePromise<AuthAgentsOffsetPagination, AuthAgent>;
|
|
46
|
+
/**
|
|
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
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
delete(id: string, options?: RequestOptions): APIPromise<void>;
|
|
59
|
+
/**
|
|
60
|
+
* Triggers automatic re-authentication for an auth agent using stored credentials.
|
|
61
|
+
* Requires the auth agent to have a linked credential, stored selectors, and
|
|
62
|
+
* login_url. Returns immediately with status indicating whether re-auth was
|
|
63
|
+
* started.
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```ts
|
|
67
|
+
* const reauthResponse = await client.agents.auth.reauth(
|
|
68
|
+
* 'id',
|
|
69
|
+
* );
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
reauth(id: string, options?: RequestOptions): APIPromise<ReauthResponse>;
|
|
46
73
|
}
|
|
47
74
|
export type AuthAgentsOffsetPagination = OffsetPagination<AuthAgent>;
|
|
48
75
|
/**
|
|
@@ -150,6 +177,23 @@ export interface AuthAgent {
|
|
|
150
177
|
* Current authentication status of the managed profile
|
|
151
178
|
*/
|
|
152
179
|
status: 'AUTHENTICATED' | 'NEEDS_AUTH';
|
|
180
|
+
/**
|
|
181
|
+
* Whether automatic re-authentication is possible (has credential_id, selectors,
|
|
182
|
+
* and login_url)
|
|
183
|
+
*/
|
|
184
|
+
can_reauth?: boolean;
|
|
185
|
+
/**
|
|
186
|
+
* ID of the linked credential for automatic re-authentication
|
|
187
|
+
*/
|
|
188
|
+
credential_id?: string;
|
|
189
|
+
/**
|
|
190
|
+
* Name of the linked credential for automatic re-authentication
|
|
191
|
+
*/
|
|
192
|
+
credential_name?: string;
|
|
193
|
+
/**
|
|
194
|
+
* Whether this auth agent has stored selectors for deterministic re-authentication
|
|
195
|
+
*/
|
|
196
|
+
has_selectors?: boolean;
|
|
153
197
|
/**
|
|
154
198
|
* When the last authentication check was performed
|
|
155
199
|
*/
|
|
@@ -167,6 +211,12 @@ export interface AuthAgentCreateRequest {
|
|
|
167
211
|
* Target domain for authentication
|
|
168
212
|
*/
|
|
169
213
|
target_domain: 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.
|
|
218
|
+
*/
|
|
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,52 @@ 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
|
|
257
|
+
* Response when the agent is already authenticated.
|
|
202
258
|
*/
|
|
203
|
-
export
|
|
204
|
-
|
|
205
|
-
* When the handoff code expires
|
|
206
|
-
*/
|
|
207
|
-
expires_at: string;
|
|
208
|
-
/**
|
|
209
|
-
* One-time code for handoff
|
|
210
|
-
*/
|
|
211
|
-
handoff_code: string;
|
|
259
|
+
export type AuthAgentInvocationCreateResponse = AuthAgentInvocationCreateResponse.AuthAgentAlreadyAuthenticated | AuthAgentInvocationCreateResponse.AuthAgentInvocationCreated;
|
|
260
|
+
export declare namespace AuthAgentInvocationCreateResponse {
|
|
212
261
|
/**
|
|
213
|
-
*
|
|
262
|
+
* Response when the agent is already authenticated.
|
|
214
263
|
*/
|
|
215
|
-
|
|
264
|
+
interface AuthAgentAlreadyAuthenticated {
|
|
265
|
+
/**
|
|
266
|
+
* Indicates the agent is already authenticated and no invocation was created.
|
|
267
|
+
*/
|
|
268
|
+
status: 'already_authenticated';
|
|
269
|
+
}
|
|
216
270
|
/**
|
|
217
|
-
*
|
|
271
|
+
* Response when a new invocation was created.
|
|
218
272
|
*/
|
|
219
|
-
|
|
273
|
+
interface AuthAgentInvocationCreated {
|
|
274
|
+
/**
|
|
275
|
+
* When the handoff code expires.
|
|
276
|
+
*/
|
|
277
|
+
expires_at: string;
|
|
278
|
+
/**
|
|
279
|
+
* One-time code for handoff.
|
|
280
|
+
*/
|
|
281
|
+
handoff_code: string;
|
|
282
|
+
/**
|
|
283
|
+
* URL to redirect user to.
|
|
284
|
+
*/
|
|
285
|
+
hosted_url: string;
|
|
286
|
+
/**
|
|
287
|
+
* Unique identifier for the invocation.
|
|
288
|
+
*/
|
|
289
|
+
invocation_id: string;
|
|
290
|
+
/**
|
|
291
|
+
* Indicates an invocation was created.
|
|
292
|
+
*/
|
|
293
|
+
status: 'invocation_created';
|
|
294
|
+
}
|
|
220
295
|
}
|
|
221
296
|
/**
|
|
222
297
|
* A discovered form field
|
|
@@ -247,6 +322,23 @@ export interface DiscoveredField {
|
|
|
247
322
|
*/
|
|
248
323
|
required?: boolean;
|
|
249
324
|
}
|
|
325
|
+
/**
|
|
326
|
+
* Response from triggering re-authentication
|
|
327
|
+
*/
|
|
328
|
+
export interface ReauthResponse {
|
|
329
|
+
/**
|
|
330
|
+
* Result of the re-authentication attempt
|
|
331
|
+
*/
|
|
332
|
+
status: 'reauth_started' | 'already_authenticated' | 'cannot_reauth';
|
|
333
|
+
/**
|
|
334
|
+
* ID of the re-auth invocation if one was created
|
|
335
|
+
*/
|
|
336
|
+
invocation_id?: string;
|
|
337
|
+
/**
|
|
338
|
+
* Human-readable description of the result
|
|
339
|
+
*/
|
|
340
|
+
message?: string;
|
|
341
|
+
}
|
|
250
342
|
export interface AuthCreateParams {
|
|
251
343
|
/**
|
|
252
344
|
* Name of the profile to use for this auth agent
|
|
@@ -256,6 +348,12 @@ export interface AuthCreateParams {
|
|
|
256
348
|
* Target domain for authentication
|
|
257
349
|
*/
|
|
258
350
|
target_domain: string;
|
|
351
|
+
/**
|
|
352
|
+
* Optional name of an existing credential to use for this auth agent. If provided,
|
|
353
|
+
* the credential will be linked to the agent and its values will be used to
|
|
354
|
+
* auto-fill the login form on invocation.
|
|
355
|
+
*/
|
|
356
|
+
credential_name?: string;
|
|
259
357
|
/**
|
|
260
358
|
* Optional login page URL. If provided, will be stored on the agent and used to
|
|
261
359
|
* skip discovery in future invocations.
|
|
@@ -288,7 +386,7 @@ export interface AuthListParams extends OffsetPaginationParams {
|
|
|
288
386
|
target_domain?: string;
|
|
289
387
|
}
|
|
290
388
|
export declare namespace Auth {
|
|
291
|
-
export { type AgentAuthDiscoverResponse as AgentAuthDiscoverResponse, 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, };
|
|
389
|
+
export { type AgentAuthDiscoverResponse as AgentAuthDiscoverResponse, 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 ReauthResponse as ReauthResponse, type AuthAgentsOffsetPagination as AuthAgentsOffsetPagination, type AuthCreateParams as AuthCreateParams, type AuthListParams as AuthListParams, };
|
|
292
390
|
export { Invocations as Invocations, type InvocationExchangeResponse as InvocationExchangeResponse, type InvocationCreateParams as InvocationCreateParams, type InvocationDiscoverParams as InvocationDiscoverParams, type InvocationExchangeParams as InvocationExchangeParams, type InvocationSubmitParams as InvocationSubmitParams, };
|
|
293
391
|
}
|
|
294
392
|
//# 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,wBAAwB,EACxB,0BAA0B,EAC1B,sBAAsB,EACtB,WAAW,EACZ;OACM,EAAE,UAAU,EAAE;OACd,EAAE,gBAAgB,EAAE,KAAK,sBAAsB,EAAE,WAAW,EAAE;
|
|
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,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;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CA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;WAEG;QACH,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB;CACF;AAED,MAAM,WAAW,cAAe,SAAQ,sBAAsB;IAC5D;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAID,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EACL,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,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,cAAc,IAAI,cAAc,EACrC,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,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() {
|
|
@@ -56,6 +57,40 @@ 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
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Triggers automatic re-authentication for an auth agent using stored credentials.
|
|
80
|
+
* Requires the auth agent to have a linked credential, stored selectors, and
|
|
81
|
+
* login_url. Returns immediately with status indicating whether re-auth was
|
|
82
|
+
* started.
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* ```ts
|
|
86
|
+
* const reauthResponse = await client.agents.auth.reauth(
|
|
87
|
+
* 'id',
|
|
88
|
+
* );
|
|
89
|
+
* ```
|
|
90
|
+
*/
|
|
91
|
+
reauth(id, options) {
|
|
92
|
+
return this._client.post((0, path_1.path) `/agents/auth/${id}/reauth`, options);
|
|
93
|
+
}
|
|
59
94
|
}
|
|
60
95
|
exports.Auth = Auth;
|
|
61
96
|
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,kDAOuB;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ED;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,gBAAgB,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IACrE,CAAC;CACF;AAvFD,oBAuFC;AAyXD,IAAI,CAAC,WAAW,GAAG,yBAAW,CAAC"}
|
|
@@ -3,6 +3,7 @@ import { APIResource } from "../../../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() {
|
|
@@ -52,6 +53,40 @@ 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
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Triggers automatic re-authentication for an auth agent using stored credentials.
|
|
76
|
+
* Requires the auth agent to have a linked credential, stored selectors, and
|
|
77
|
+
* login_url. Returns immediately with status indicating whether re-auth was
|
|
78
|
+
* started.
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* ```ts
|
|
82
|
+
* const reauthResponse = await client.agents.auth.reauth(
|
|
83
|
+
* 'id',
|
|
84
|
+
* );
|
|
85
|
+
* ```
|
|
86
|
+
*/
|
|
87
|
+
reauth(id, options) {
|
|
88
|
+
return this._client.post(path `/agents/auth/${id}/reauth`, options);
|
|
89
|
+
}
|
|
55
90
|
}
|
|
56
91
|
Auth.Invocations = Invocations;
|
|
57
92
|
//# 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,EAML,WAAW,GACZ;OAEM,EAAE,gBAAgB,EAA4C;
|
|
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,EAML,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;IAsFzF,CAAC;IApFC;;;;;;;;;;;;;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;IAED;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,gBAAgB,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IACrE,CAAC;CACF;AAyXD,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { Auth, type AgentAuthDiscoverResponse, type AgentAuthInvocationResponse, type AgentAuthSubmitResponse, type AuthAgent, type AuthAgentCreateRequest, type AuthAgentInvocationCreateRequest, type AuthAgentInvocationCreateResponse, type DiscoveredField, type AuthCreateParams, type AuthListParams, type AuthAgentsOffsetPagination, } from "./auth.mjs";
|
|
1
|
+
export { Auth, type AgentAuthDiscoverResponse, type AgentAuthInvocationResponse, type AgentAuthSubmitResponse, type AuthAgent, type AuthAgentCreateRequest, type AuthAgentInvocationCreateRequest, type AuthAgentInvocationCreateResponse, type DiscoveredField, type ReauthResponse, type AuthCreateParams, type AuthListParams, type AuthAgentsOffsetPagination, } from "./auth.mjs";
|
|
2
2
|
export { Invocations, type InvocationExchangeResponse, type InvocationCreateParams, type InvocationDiscoverParams, 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,yBAAyB,EAC9B,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,wBAAwB,EAC7B,KAAK,sBAAsB,GAC5B"}
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/resources/agents/auth/index.ts"],"names":[],"mappings":"OAEO,EACL,IAAI,EACJ,KAAK,yBAAyB,EAC9B,KAAK,2BAA2B,EAChC,KAAK,uBAAuB,EAC5B,KAAK,SAAS,EACd,KAAK,sBAAsB,EAC3B,KAAK,gCAAgC,EACrC,KAAK,iCAAiC,EACtC,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,0BAA0B,GAChC;OACM,EACL,WAAW,EACX,KAAK,0BAA0B,EAC/B,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,GAC5B"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { Auth, type AgentAuthDiscoverResponse, type AgentAuthInvocationResponse, type AgentAuthSubmitResponse, type AuthAgent, type AuthAgentCreateRequest, type AuthAgentInvocationCreateRequest, type AuthAgentInvocationCreateResponse, type DiscoveredField, type AuthCreateParams, type AuthListParams, type AuthAgentsOffsetPagination, } from "./auth.js";
|
|
1
|
+
export { Auth, type AgentAuthDiscoverResponse, type AgentAuthInvocationResponse, type AgentAuthSubmitResponse, type AuthAgent, type AuthAgentCreateRequest, type AuthAgentInvocationCreateRequest, type AuthAgentInvocationCreateResponse, type DiscoveredField, type ReauthResponse, type AuthCreateParams, type AuthListParams, type AuthAgentsOffsetPagination, } from "./auth.js";
|
|
2
2
|
export { Invocations, type InvocationExchangeResponse, type InvocationCreateParams, type InvocationDiscoverParams, 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,yBAAyB,EAC9B,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,wBAAwB,EAC7B,KAAK,sBAAsB,GAC5B"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/agents/auth/index.ts"],"names":[],"mappings":"OAEO,EACL,IAAI,EACJ,KAAK,yBAAyB,EAC9B,KAAK,2BAA2B,EAChC,KAAK,uBAAuB,EAC5B,KAAK,SAAS,EACd,KAAK,sBAAsB,EAC3B,KAAK,gCAAgC,EACrC,KAAK,iCAAiC,EACtC,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,0BAA0B,GAChC;OACM,EACL,WAAW,EACX,KAAK,0BAA0B,EAC/B,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,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,kCAcgB;AAbd,4FAAA,IAAI,OAAA;AAcN,gDAOuB;AANrB,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,GAaL;OACM,EACL,WAAW,GAMZ"}
|
|
@@ -96,6 +96,12 @@ export interface InvocationCreateParams {
|
|
|
96
96
|
* ID of the auth agent to create an invocation for
|
|
97
97
|
*/
|
|
98
98
|
auth_agent_id: string;
|
|
99
|
+
/**
|
|
100
|
+
* If provided, saves the submitted credentials under this name upon successful
|
|
101
|
+
* login. The credential will be linked to the auth agent for automatic
|
|
102
|
+
* re-authentication.
|
|
103
|
+
*/
|
|
104
|
+
save_credential_as?: string;
|
|
99
105
|
}
|
|
100
106
|
export interface InvocationDiscoverParams {
|
|
101
107
|
/**
|
|
@@ -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,GAAE,wBAAwB,GAAG,IAAI,GAAG,SAAc,EACtD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,OAAO,CAAC,yBAAyB,CAAC;IAIhD;;;;;;;;;;;;OAYG;IACH,QAAQ,CACN,YAAY,EAAE,MAAM,EACpB,IAAI,EAAE,wBAAwB,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,0BAA0B,CAAC;IAIzC;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CACJ,YAAY,EAAE,MAAM,EACpB,IAAI,EAAE,sBAAsB,EAC5B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,OAAO,CAAC,uBAAuB,CAAC;CAG/C;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"invocations.d.mts","sourceRoot":"","sources":["../../../src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vC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,YAAY,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CACzC;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
|
|
@@ -96,6 +96,12 @@ export interface InvocationCreateParams {
|
|
|
96
96
|
* ID of the auth agent to create an invocation for
|
|
97
97
|
*/
|
|
98
98
|
auth_agent_id: string;
|
|
99
|
+
/**
|
|
100
|
+
* If provided, saves the submitted credentials under this name upon successful
|
|
101
|
+
* login. The credential will be linked to the auth agent for automatic
|
|
102
|
+
* re-authentication.
|
|
103
|
+
*/
|
|
104
|
+
save_credential_as?: string;
|
|
99
105
|
}
|
|
100
106
|
export interface InvocationDiscoverParams {
|
|
101
107
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invocations.d.ts","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,QAA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BAAsB,EACrD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { Agents } from "./agents.mjs";
|
|
2
|
-
export { Auth, type AgentAuthDiscoverResponse, type AgentAuthInvocationResponse, type AgentAuthSubmitResponse, type AuthAgent, type AuthAgentCreateRequest, type AuthAgentInvocationCreateRequest, type AuthAgentInvocationCreateResponse, type DiscoveredField, type AuthCreateParams, type AuthListParams, type AuthAgentsOffsetPagination, } from "./auth/index.mjs";
|
|
2
|
+
export { Auth, type AgentAuthDiscoverResponse, type AgentAuthInvocationResponse, type AgentAuthSubmitResponse, type AuthAgent, type AuthAgentCreateRequest, type AuthAgentInvocationCreateRequest, type AuthAgentInvocationCreateResponse, type DiscoveredField, type ReauthResponse, type AuthCreateParams, type AuthListParams, type AuthAgentsOffsetPagination, } from "./auth/index.mjs";
|
|
3
3
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/agents/index.ts"],"names":[],"mappings":"OAEO,EAAE,MAAM,EAAE;OACV,EACL,IAAI,EACJ,KAAK,yBAAyB,EAC9B,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"}
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/agents/index.ts"],"names":[],"mappings":"OAEO,EAAE,MAAM,EAAE;OACV,EACL,IAAI,EACJ,KAAK,yBAAyB,EAC9B,KAAK,2BAA2B,EAChC,KAAK,uBAAuB,EAC5B,KAAK,SAAS,EACd,KAAK,sBAAsB,EAC3B,KAAK,gCAAgC,EACrC,KAAK,iCAAiC,EACtC,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,0BAA0B,GAChC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { Agents } from "./agents.js";
|
|
2
|
-
export { Auth, type AgentAuthDiscoverResponse, type AgentAuthInvocationResponse, type AgentAuthSubmitResponse, type AuthAgent, type AuthAgentCreateRequest, type AuthAgentInvocationCreateRequest, type AuthAgentInvocationCreateResponse, type DiscoveredField, type AuthCreateParams, type AuthListParams, type AuthAgentsOffsetPagination, } from "./auth/index.js";
|
|
2
|
+
export { Auth, type AgentAuthDiscoverResponse, type AgentAuthInvocationResponse, type AgentAuthSubmitResponse, type AuthAgent, type AuthAgentCreateRequest, type AuthAgentInvocationCreateRequest, type AuthAgentInvocationCreateResponse, type DiscoveredField, type ReauthResponse, type AuthCreateParams, type AuthListParams, type AuthAgentsOffsetPagination, } from "./auth/index.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/agents/index.ts"],"names":[],"mappings":"OAEO,EAAE,MAAM,EAAE;OACV,EACL,IAAI,EACJ,KAAK,yBAAyB,EAC9B,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"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/agents/index.ts"],"names":[],"mappings":"OAEO,EAAE,MAAM,EAAE;OACV,EACL,IAAI,EACJ,KAAK,yBAAyB,EAC9B,KAAK,2BAA2B,EAChC,KAAK,uBAAuB,EAC5B,KAAK,SAAS,EACd,KAAK,sBAAsB,EAC3B,KAAK,gCAAgC,EACrC,KAAK,iCAAiC,EACtC,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,0BAA0B,GAChC"}
|