@onkernel/sdk 0.30.0 → 0.33.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 (154) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/client.d.mts +8 -7
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +8 -7
  5. package/client.d.ts.map +1 -1
  6. package/client.js +12 -5
  7. package/client.js.map +1 -1
  8. package/client.mjs +12 -5
  9. package/client.mjs.map +1 -1
  10. package/package.json +3 -2
  11. package/resources/auth/auth.d.mts +10 -0
  12. package/resources/auth/auth.d.mts.map +1 -0
  13. package/resources/auth/auth.d.ts +10 -0
  14. package/resources/auth/auth.d.ts.map +1 -0
  15. package/resources/auth/auth.js +17 -0
  16. package/resources/auth/auth.js.map +1 -0
  17. package/resources/auth/auth.mjs +12 -0
  18. package/resources/auth/auth.mjs.map +1 -0
  19. package/resources/auth/connections.d.mts +793 -0
  20. package/resources/auth/connections.d.mts.map +1 -0
  21. package/resources/auth/connections.d.ts +793 -0
  22. package/resources/auth/connections.d.ts.map +1 -0
  23. package/resources/auth/connections.js +118 -0
  24. package/resources/auth/connections.js.map +1 -0
  25. package/resources/auth/connections.mjs +114 -0
  26. package/resources/auth/connections.mjs.map +1 -0
  27. package/resources/auth/index.d.mts +3 -0
  28. package/resources/auth/index.d.mts.map +1 -0
  29. package/resources/auth/index.d.ts +3 -0
  30. package/resources/auth/index.d.ts.map +1 -0
  31. package/resources/{agents/auth → auth}/index.js +3 -3
  32. package/resources/auth/index.js.map +1 -0
  33. package/resources/auth/index.mjs +4 -0
  34. package/resources/auth/index.mjs.map +1 -0
  35. package/resources/{agents/auth.d.mts.map → auth.d.mts.map} +1 -1
  36. package/resources/auth.d.ts.map +1 -0
  37. package/resources/{agents/auth.js → auth.js} +1 -1
  38. package/resources/auth.js.map +1 -0
  39. package/resources/auth.mjs.map +1 -0
  40. package/resources/browsers/browsers.d.mts +2 -2
  41. package/resources/browsers/browsers.d.mts.map +1 -1
  42. package/resources/browsers/browsers.d.ts +2 -2
  43. package/resources/browsers/browsers.d.ts.map +1 -1
  44. package/resources/browsers/browsers.js.map +1 -1
  45. package/resources/browsers/browsers.mjs.map +1 -1
  46. package/resources/browsers/computer.d.mts +199 -1
  47. package/resources/browsers/computer.d.mts.map +1 -1
  48. package/resources/browsers/computer.d.ts +199 -1
  49. package/resources/browsers/computer.d.ts.map +1 -1
  50. package/resources/browsers/computer.js +31 -0
  51. package/resources/browsers/computer.js.map +1 -1
  52. package/resources/browsers/computer.mjs +31 -0
  53. package/resources/browsers/computer.mjs.map +1 -1
  54. package/resources/browsers/index.d.mts +1 -1
  55. package/resources/browsers/index.d.mts.map +1 -1
  56. package/resources/browsers/index.d.ts +1 -1
  57. package/resources/browsers/index.d.ts.map +1 -1
  58. package/resources/browsers/index.js.map +1 -1
  59. package/resources/browsers/index.mjs.map +1 -1
  60. package/resources/credential-providers.d.mts +66 -1
  61. package/resources/credential-providers.d.mts.map +1 -1
  62. package/resources/credential-providers.d.ts +66 -1
  63. package/resources/credential-providers.d.ts.map +1 -1
  64. package/resources/credential-providers.js +21 -6
  65. package/resources/credential-providers.js.map +1 -1
  66. package/resources/credential-providers.mjs +21 -6
  67. package/resources/credential-providers.mjs.map +1 -1
  68. package/resources/credentials.d.mts +4 -0
  69. package/resources/credentials.d.mts.map +1 -1
  70. package/resources/credentials.d.ts +4 -0
  71. package/resources/credentials.d.ts.map +1 -1
  72. package/resources/index.d.mts +2 -2
  73. package/resources/index.d.mts.map +1 -1
  74. package/resources/index.d.ts +2 -2
  75. package/resources/index.d.ts.map +1 -1
  76. package/resources/index.js +3 -3
  77. package/resources/index.js.map +1 -1
  78. package/resources/index.mjs +1 -1
  79. package/resources/index.mjs.map +1 -1
  80. package/src/client.ts +24 -9
  81. package/src/resources/auth/auth.ts +41 -0
  82. package/src/resources/auth/connections.ts +973 -0
  83. package/src/resources/auth/index.ts +17 -0
  84. package/src/resources/browsers/browsers.ts +4 -0
  85. package/src/resources/browsers/computer.ts +257 -0
  86. package/src/resources/browsers/index.ts +2 -0
  87. package/src/resources/credential-providers.ts +88 -6
  88. package/src/resources/credentials.ts +5 -0
  89. package/src/resources/index.ts +3 -1
  90. package/src/version.ts +1 -1
  91. package/version.d.mts +1 -1
  92. package/version.d.ts +1 -1
  93. package/version.js +1 -1
  94. package/version.mjs +1 -1
  95. package/resources/agents/agents.d.mts +0 -10
  96. package/resources/agents/agents.d.mts.map +0 -1
  97. package/resources/agents/agents.d.ts +0 -10
  98. package/resources/agents/agents.d.ts.map +0 -1
  99. package/resources/agents/agents.js +0 -17
  100. package/resources/agents/agents.js.map +0 -1
  101. package/resources/agents/agents.mjs +0 -12
  102. package/resources/agents/agents.mjs.map +0 -1
  103. package/resources/agents/auth/auth.d.mts +0 -405
  104. package/resources/agents/auth/auth.d.mts.map +0 -1
  105. package/resources/agents/auth/auth.d.ts +0 -405
  106. package/resources/agents/auth/auth.d.ts.map +0 -1
  107. package/resources/agents/auth/auth.js +0 -81
  108. package/resources/agents/auth/auth.js.map +0 -1
  109. package/resources/agents/auth/auth.mjs +0 -76
  110. package/resources/agents/auth/auth.mjs.map +0 -1
  111. package/resources/agents/auth/index.d.mts +0 -3
  112. package/resources/agents/auth/index.d.mts.map +0 -1
  113. package/resources/agents/auth/index.d.ts +0 -3
  114. package/resources/agents/auth/index.d.ts.map +0 -1
  115. package/resources/agents/auth/index.js.map +0 -1
  116. package/resources/agents/auth/index.mjs +0 -4
  117. package/resources/agents/auth/index.mjs.map +0 -1
  118. package/resources/agents/auth/invocations.d.mts +0 -125
  119. package/resources/agents/auth/invocations.d.mts.map +0 -1
  120. package/resources/agents/auth/invocations.d.ts +0 -125
  121. package/resources/agents/auth/invocations.d.ts.map +0 -1
  122. package/resources/agents/auth/invocations.js +0 -79
  123. package/resources/agents/auth/invocations.js.map +0 -1
  124. package/resources/agents/auth/invocations.mjs +0 -75
  125. package/resources/agents/auth/invocations.mjs.map +0 -1
  126. package/resources/agents/auth.d.ts.map +0 -1
  127. package/resources/agents/auth.js.map +0 -1
  128. package/resources/agents/auth.mjs.map +0 -1
  129. package/resources/agents/index.d.mts +0 -3
  130. package/resources/agents/index.d.mts.map +0 -1
  131. package/resources/agents/index.d.ts +0 -3
  132. package/resources/agents/index.d.ts.map +0 -1
  133. package/resources/agents/index.js +0 -9
  134. package/resources/agents/index.js.map +0 -1
  135. package/resources/agents/index.mjs +0 -4
  136. package/resources/agents/index.mjs.map +0 -1
  137. package/resources/agents.d.mts +0 -2
  138. package/resources/agents.d.mts.map +0 -1
  139. package/resources/agents.d.ts +0 -2
  140. package/resources/agents.d.ts.map +0 -1
  141. package/resources/agents.js +0 -6
  142. package/resources/agents.js.map +0 -1
  143. package/resources/agents.mjs +0 -3
  144. package/resources/agents.mjs.map +0 -1
  145. package/src/resources/agents/agents.ts +0 -39
  146. package/src/resources/agents/auth/auth.ts +0 -524
  147. package/src/resources/agents/auth/index.ts +0 -22
  148. package/src/resources/agents/auth/invocations.ts +0 -166
  149. package/src/resources/agents/index.ts +0 -16
  150. package/src/resources/agents.ts +0 -3
  151. /package/resources/{agents/auth.d.mts → auth.d.mts} +0 -0
  152. /package/resources/{agents/auth.d.ts → auth.d.ts} +0 -0
  153. /package/resources/{agents/auth.mjs → auth.mjs} +0 -0
  154. /package/src/resources/{agents/auth.ts → auth.ts} +0 -0
@@ -1,405 +0,0 @@
1
- import { APIResource } from "../../../core/resource.js";
2
- import * as InvocationsAPI from "./invocations.js";
3
- import { InvocationCreateParams, InvocationExchangeParams, InvocationExchangeResponse, InvocationSubmitParams, Invocations } from "./invocations.js";
4
- import { APIPromise } from "../../../core/api-promise.js";
5
- import { OffsetPagination, type OffsetPaginationParams, PagePromise } from "../../../core/pagination.js";
6
- import { RequestOptions } from "../../../internal/request-options.js";
7
- export declare class Auth extends APIResource {
8
- invocations: InvocationsAPI.Invocations;
9
- /**
10
- * Creates a new auth agent for the specified domain and profile combination, or
11
- * returns an existing one if it already exists. This is idempotent - calling with
12
- * the same domain and profile will return the same agent. Does NOT start an
13
- * invocation - use POST /agents/auth/invocations to start an auth flow.
14
- *
15
- * @example
16
- * ```ts
17
- * const authAgent = await client.agents.auth.create({
18
- * domain: 'netflix.com',
19
- * profile_name: 'user-123',
20
- * });
21
- * ```
22
- */
23
- create(body: AuthCreateParams, options?: RequestOptions): APIPromise<AuthAgent>;
24
- /**
25
- * Retrieve an auth agent by its ID. Returns the current authentication status of
26
- * the managed profile.
27
- *
28
- * @example
29
- * ```ts
30
- * const authAgent = await client.agents.auth.retrieve('id');
31
- * ```
32
- */
33
- retrieve(id: string, options?: RequestOptions): APIPromise<AuthAgent>;
34
- /**
35
- * List auth agents with optional filters for profile_name and domain.
36
- *
37
- * @example
38
- * ```ts
39
- * // Automatically fetches more pages as needed.
40
- * for await (const authAgent of client.agents.auth.list()) {
41
- * // ...
42
- * }
43
- * ```
44
- */
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
- export type AuthAgentsOffsetPagination = OffsetPagination<AuthAgent>;
61
- /**
62
- * Response from get invocation endpoint
63
- */
64
- export interface AgentAuthInvocationResponse {
65
- /**
66
- * App name (org name at time of invocation creation)
67
- */
68
- app_name: string;
69
- /**
70
- * Domain for authentication
71
- */
72
- domain: string;
73
- /**
74
- * When the handoff code expires
75
- */
76
- expires_at: string;
77
- /**
78
- * Invocation status
79
- */
80
- status: 'IN_PROGRESS' | 'SUCCESS' | 'EXPIRED' | 'CANCELED' | 'FAILED';
81
- /**
82
- * Current step in the invocation workflow
83
- */
84
- step: 'initialized' | 'discovering' | 'awaiting_input' | 'awaiting_external_action' | 'submitting' | 'completed' | 'expired';
85
- /**
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)
91
- */
92
- type: 'login' | 'auto_login' | 'reauth';
93
- /**
94
- * Error message explaining why the invocation failed (present when status=FAILED)
95
- */
96
- error_message?: string | null;
97
- /**
98
- * Instructions for user when external action is required (present when
99
- * step=awaiting_external_action)
100
- */
101
- external_action_message?: string | null;
102
- /**
103
- * Browser live view URL for debugging the invocation
104
- */
105
- live_view_url?: string | null;
106
- /**
107
- * MFA method options to choose from (present when step=awaiting_input and MFA
108
- * selection is required)
109
- */
110
- mfa_options?: Array<AgentAuthInvocationResponse.MfaOption> | null;
111
- /**
112
- * Fields currently awaiting input (present when step=awaiting_input)
113
- */
114
- pending_fields?: Array<DiscoveredField> | null;
115
- /**
116
- * SSO buttons available on the page (present when step=awaiting_input)
117
- */
118
- pending_sso_buttons?: Array<AgentAuthInvocationResponse.PendingSSOButton> | null;
119
- /**
120
- * SSO provider being used for authentication (e.g., google, github, microsoft)
121
- */
122
- sso_provider?: string | null;
123
- /**
124
- * Names of fields that have been submitted (present when step=submitting or later)
125
- */
126
- submitted_fields?: Array<string> | null;
127
- }
128
- export declare namespace AgentAuthInvocationResponse {
129
- /**
130
- * An MFA method option for verification
131
- */
132
- interface MfaOption {
133
- /**
134
- * The visible option text
135
- */
136
- label: string;
137
- /**
138
- * The MFA delivery method type
139
- */
140
- type: 'sms' | 'call' | 'email' | 'totp' | 'push' | 'security_key';
141
- /**
142
- * Additional instructions from the site
143
- */
144
- description?: string | null;
145
- /**
146
- * The masked destination (phone/email) if shown
147
- */
148
- target?: string | null;
149
- }
150
- /**
151
- * An SSO button for signing in with an external identity provider
152
- */
153
- interface PendingSSOButton {
154
- /**
155
- * Visible button text
156
- */
157
- label: string;
158
- /**
159
- * Identity provider name
160
- */
161
- provider: string;
162
- /**
163
- * XPath selector for the button
164
- */
165
- selector: string;
166
- }
167
- }
168
- /**
169
- * Response from submit endpoint - returns immediately after submission is accepted
170
- */
171
- export interface AgentAuthSubmitResponse {
172
- /**
173
- * Whether the submission was accepted for processing
174
- */
175
- accepted: boolean;
176
- }
177
- /**
178
- * An auth agent that manages authentication for a specific domain and profile
179
- * combination
180
- */
181
- export interface AuthAgent {
182
- /**
183
- * Unique identifier for the auth agent
184
- */
185
- id: string;
186
- /**
187
- * Target domain for authentication
188
- */
189
- domain: string;
190
- /**
191
- * Name of the profile associated with this auth agent
192
- */
193
- profile_name: string;
194
- /**
195
- * Current authentication status of the managed profile
196
- */
197
- status: 'AUTHENTICATED' | 'NEEDS_AUTH';
198
- /**
199
- * Additional domains that are valid for this auth agent's authentication flow
200
- * (besides the primary domain). Useful when login pages redirect to different
201
- * domains.
202
- */
203
- allowed_domains?: Array<string>;
204
- /**
205
- * Whether automatic re-authentication is possible (has credential_id, selectors,
206
- * and login_url)
207
- */
208
- can_reauth?: boolean;
209
- /**
210
- * ID of the linked credential for automatic re-authentication
211
- */
212
- credential_id?: string;
213
- /**
214
- * Name of the linked credential for automatic re-authentication
215
- */
216
- credential_name?: string;
217
- /**
218
- * Whether this auth agent has stored selectors for deterministic re-authentication
219
- */
220
- has_selectors?: boolean;
221
- /**
222
- * When the last authentication check was performed
223
- */
224
- last_auth_check_at?: string;
225
- /**
226
- * URL where the browser landed after successful login. Query parameters and
227
- * fragments are stripped for privacy.
228
- */
229
- post_login_url?: string;
230
- }
231
- /**
232
- * Request to create or find an auth agent
233
- */
234
- export interface AuthAgentCreateRequest {
235
- /**
236
- * Domain for authentication
237
- */
238
- domain: string;
239
- /**
240
- * Name of the profile to use for this auth agent
241
- */
242
- profile_name: string;
243
- /**
244
- * Additional domains that are valid for this auth agent's authentication flow
245
- * (besides the primary domain). Useful when login pages redirect to different
246
- * domains.
247
- */
248
- allowed_domains?: Array<string>;
249
- /**
250
- * Optional name of an existing credential to use for this auth agent. If provided,
251
- * the credential will be linked to the agent and its values will be used to
252
- * auto-fill the login form on invocation.
253
- */
254
- credential_name?: string;
255
- /**
256
- * Optional login page URL. If provided, will be stored on the agent and used to
257
- * skip discovery in future invocations.
258
- */
259
- login_url?: string;
260
- /**
261
- * Optional proxy configuration
262
- */
263
- proxy?: AuthAgentCreateRequest.Proxy;
264
- }
265
- export declare namespace AuthAgentCreateRequest {
266
- /**
267
- * Optional proxy configuration
268
- */
269
- interface Proxy {
270
- /**
271
- * ID of the proxy to use
272
- */
273
- proxy_id?: string;
274
- }
275
- }
276
- /**
277
- * Request to create an invocation for an existing auth agent
278
- */
279
- export interface AuthAgentInvocationCreateRequest {
280
- /**
281
- * ID of the auth agent to create an invocation for
282
- */
283
- auth_agent_id: string;
284
- /**
285
- * If provided, saves the submitted credentials under this name upon successful
286
- * login. The credential will be linked to the auth agent for automatic
287
- * re-authentication.
288
- */
289
- save_credential_as?: string;
290
- }
291
- /**
292
- * Response from creating an invocation. Always returns an invocation_id.
293
- */
294
- export interface AuthAgentInvocationCreateResponse {
295
- /**
296
- * When the handoff code expires.
297
- */
298
- expires_at: string;
299
- /**
300
- * One-time code for handoff.
301
- */
302
- handoff_code: string;
303
- /**
304
- * URL to redirect user to.
305
- */
306
- hosted_url: string;
307
- /**
308
- * Unique identifier for the invocation.
309
- */
310
- invocation_id: string;
311
- /**
312
- * The invocation type:
313
- *
314
- * - login: First-time authentication
315
- * - reauth: Re-authentication for previously authenticated agents
316
- * - auto_login: Legacy type (no longer created, kept for backward compatibility)
317
- */
318
- type: 'login' | 'auto_login' | 'reauth';
319
- }
320
- /**
321
- * A discovered form field
322
- */
323
- export interface DiscoveredField {
324
- /**
325
- * Field label
326
- */
327
- label: string;
328
- /**
329
- * Field name
330
- */
331
- name: string;
332
- /**
333
- * CSS selector for the field
334
- */
335
- selector: string;
336
- /**
337
- * Field type
338
- */
339
- type: 'text' | 'email' | 'password' | 'tel' | 'number' | 'url' | 'code' | 'totp';
340
- /**
341
- * Field placeholder
342
- */
343
- placeholder?: string;
344
- /**
345
- * Whether field is required
346
- */
347
- required?: boolean;
348
- }
349
- export interface AuthCreateParams {
350
- /**
351
- * Domain for authentication
352
- */
353
- domain: string;
354
- /**
355
- * Name of the profile to use for this auth agent
356
- */
357
- profile_name: string;
358
- /**
359
- * Additional domains that are valid for this auth agent's authentication flow
360
- * (besides the primary domain). Useful when login pages redirect to different
361
- * domains.
362
- */
363
- allowed_domains?: Array<string>;
364
- /**
365
- * Optional name of an existing credential to use for this auth agent. If provided,
366
- * the credential will be linked to the agent and its values will be used to
367
- * auto-fill the login form on invocation.
368
- */
369
- credential_name?: string;
370
- /**
371
- * Optional login page URL. If provided, will be stored on the agent and used to
372
- * skip discovery in future invocations.
373
- */
374
- login_url?: string;
375
- /**
376
- * Optional proxy configuration
377
- */
378
- proxy?: AuthCreateParams.Proxy;
379
- }
380
- export declare namespace AuthCreateParams {
381
- /**
382
- * Optional proxy configuration
383
- */
384
- interface Proxy {
385
- /**
386
- * ID of the proxy to use
387
- */
388
- proxy_id?: string;
389
- }
390
- }
391
- export interface AuthListParams extends OffsetPaginationParams {
392
- /**
393
- * Filter by domain
394
- */
395
- domain?: string;
396
- /**
397
- * Filter by profile name
398
- */
399
- profile_name?: string;
400
- }
401
- export declare namespace Auth {
402
- 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, };
403
- export { Invocations as Invocations, type InvocationExchangeResponse as InvocationExchangeResponse, type InvocationCreateParams as InvocationCreateParams, type InvocationExchangeParams as InvocationExchangeParams, type InvocationSubmitParams as InvocationSubmitParams, };
404
- }
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BAAiB,gBAAgB,CAAC;IAChC;;OAEG;IACH,UAAiB,KAAK;QACpB;;WAEG;QACH,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB;CACF;AAED,MAAM,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"}
@@ -1,81 +0,0 @@
1
- "use strict";
2
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.Auth = void 0;
5
- const tslib_1 = require("../../../internal/tslib.js");
6
- const resource_1 = require("../../../core/resource.js");
7
- const InvocationsAPI = tslib_1.__importStar(require("./invocations.js"));
8
- const invocations_1 = require("./invocations.js");
9
- const pagination_1 = require("../../../core/pagination.js");
10
- const headers_1 = require("../../../internal/headers.js");
11
- const path_1 = require("../../../internal/utils/path.js");
12
- class Auth extends resource_1.APIResource {
13
- constructor() {
14
- super(...arguments);
15
- this.invocations = new InvocationsAPI.Invocations(this._client);
16
- }
17
- /**
18
- * Creates a new auth agent for the specified domain and profile combination, or
19
- * returns an existing one if it already exists. This is idempotent - calling with
20
- * the same domain and profile will return the same agent. Does NOT start an
21
- * invocation - use POST /agents/auth/invocations to start an auth flow.
22
- *
23
- * @example
24
- * ```ts
25
- * const authAgent = await client.agents.auth.create({
26
- * domain: 'netflix.com',
27
- * profile_name: 'user-123',
28
- * });
29
- * ```
30
- */
31
- create(body, options) {
32
- return this._client.post('/agents/auth', { body, ...options });
33
- }
34
- /**
35
- * Retrieve an auth agent by its ID. Returns the current authentication status of
36
- * the managed profile.
37
- *
38
- * @example
39
- * ```ts
40
- * const authAgent = await client.agents.auth.retrieve('id');
41
- * ```
42
- */
43
- retrieve(id, options) {
44
- return this._client.get((0, path_1.path) `/agents/auth/${id}`, options);
45
- }
46
- /**
47
- * List auth agents with optional filters for profile_name and domain.
48
- *
49
- * @example
50
- * ```ts
51
- * // Automatically fetches more pages as needed.
52
- * for await (const authAgent of client.agents.auth.list()) {
53
- * // ...
54
- * }
55
- * ```
56
- */
57
- list(query = {}, options) {
58
- return this._client.getAPIList('/agents/auth', (pagination_1.OffsetPagination), { query, ...options });
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
- exports.Auth = Auth;
80
- Auth.Invocations = invocations_1.Invocations;
81
- //# sourceMappingURL=auth.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/resources/agents/auth/au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 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- import { APIResource } from "../../../core/resource.mjs";
3
- import * as InvocationsAPI from "./invocations.mjs";
4
- import { Invocations, } from "./invocations.mjs";
5
- import { OffsetPagination } from "../../../core/pagination.mjs";
6
- import { buildHeaders } from "../../../internal/headers.mjs";
7
- import { path } from "../../../internal/utils/path.mjs";
8
- export class Auth extends APIResource {
9
- constructor() {
10
- super(...arguments);
11
- this.invocations = new InvocationsAPI.Invocations(this._client);
12
- }
13
- /**
14
- * Creates a new auth agent for the specified domain and profile combination, or
15
- * returns an existing one if it already exists. This is idempotent - calling with
16
- * the same domain and profile will return the same agent. Does NOT start an
17
- * invocation - use POST /agents/auth/invocations to start an auth flow.
18
- *
19
- * @example
20
- * ```ts
21
- * const authAgent = await client.agents.auth.create({
22
- * domain: 'netflix.com',
23
- * profile_name: 'user-123',
24
- * });
25
- * ```
26
- */
27
- create(body, options) {
28
- return this._client.post('/agents/auth', { body, ...options });
29
- }
30
- /**
31
- * Retrieve an auth agent by its ID. Returns the current authentication status of
32
- * the managed profile.
33
- *
34
- * @example
35
- * ```ts
36
- * const authAgent = await client.agents.auth.retrieve('id');
37
- * ```
38
- */
39
- retrieve(id, options) {
40
- return this._client.get(path `/agents/auth/${id}`, options);
41
- }
42
- /**
43
- * List auth agents with optional filters for profile_name and domain.
44
- *
45
- * @example
46
- * ```ts
47
- * // Automatically fetches more pages as needed.
48
- * for await (const authAgent of client.agents.auth.list()) {
49
- * // ...
50
- * }
51
- * ```
52
- */
53
- list(query = {}, options) {
54
- return this._client.getAPIList('/agents/auth', (OffsetPagination), { query, ...options });
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
- Auth.Invocations = Invocations;
76
- //# sourceMappingURL=auth.mjs.map
@@ -1 +0,0 @@
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;AA6ZD,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC"}
@@ -1,3 +0,0 @@
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
- //# sourceMappingURL=index.d.mts.map
@@ -1 +0,0 @@
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 +0,0 @@
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
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
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 +0,0 @@
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,4 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- export { Auth, } from "./auth.mjs";
3
- export { Invocations, } from "./invocations.mjs";
4
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
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"}