@onkernel/sdk 0.30.0 → 0.32.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 +48 -0
- package/client.d.mts +8 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +8 -4
- package/client.d.ts.map +1 -1
- package/client.js +12 -2
- package/client.js.map +1 -1
- package/client.mjs +12 -2
- package/client.mjs.map +1 -1
- package/package.json +3 -2
- package/resources/agents/auth/auth.d.mts +115 -46
- package/resources/agents/auth/auth.d.mts.map +1 -1
- package/resources/agents/auth/auth.d.ts +115 -46
- package/resources/agents/auth/auth.d.ts.map +1 -1
- package/resources/agents/auth/auth.js +15 -30
- package/resources/agents/auth/auth.js.map +1 -1
- package/resources/agents/auth/auth.mjs +15 -30
- package/resources/agents/auth/auth.mjs.map +1 -1
- package/resources/agents/auth/invocations.d.mts +18 -47
- package/resources/agents/auth/invocations.d.mts.map +1 -1
- package/resources/agents/auth/invocations.d.ts +18 -47
- package/resources/agents/auth/invocations.d.ts.map +1 -1
- package/resources/agents/auth/invocations.js +16 -45
- package/resources/agents/auth/invocations.js.map +1 -1
- package/resources/agents/auth/invocations.mjs +16 -45
- package/resources/agents/auth/invocations.mjs.map +1 -1
- package/resources/auth/auth.d.mts +10 -0
- package/resources/auth/auth.d.mts.map +1 -0
- package/resources/auth/auth.d.ts +10 -0
- package/resources/auth/auth.d.ts.map +1 -0
- package/resources/auth/auth.js +17 -0
- package/resources/auth/auth.js.map +1 -0
- package/resources/auth/auth.mjs +12 -0
- package/resources/auth/auth.mjs.map +1 -0
- package/resources/auth/connections.d.mts +688 -0
- package/resources/auth/connections.d.mts.map +1 -0
- package/resources/auth/connections.d.ts +688 -0
- package/resources/auth/connections.d.ts.map +1 -0
- package/resources/auth/connections.js +123 -0
- package/resources/auth/connections.js.map +1 -0
- package/resources/auth/connections.mjs +119 -0
- package/resources/auth/connections.mjs.map +1 -0
- package/resources/auth/index.d.mts +3 -0
- package/resources/auth/index.d.mts.map +1 -0
- package/resources/auth/index.d.ts +3 -0
- package/resources/auth/index.d.ts.map +1 -0
- package/resources/auth/index.js +9 -0
- package/resources/auth/index.js.map +1 -0
- package/resources/auth/index.mjs +4 -0
- package/resources/auth/index.mjs.map +1 -0
- package/resources/auth.d.mts +2 -0
- package/resources/auth.d.mts.map +1 -0
- package/resources/auth.d.ts +2 -0
- package/resources/auth.d.ts.map +1 -0
- package/resources/auth.js +6 -0
- package/resources/auth.js.map +1 -0
- package/resources/auth.mjs +3 -0
- package/resources/auth.mjs.map +1 -0
- package/resources/browsers/browsers.d.mts +2 -2
- package/resources/browsers/browsers.d.mts.map +1 -1
- package/resources/browsers/browsers.d.ts +2 -2
- package/resources/browsers/browsers.d.ts.map +1 -1
- package/resources/browsers/browsers.js.map +1 -1
- package/resources/browsers/browsers.mjs.map +1 -1
- package/resources/browsers/computer.d.mts +199 -1
- package/resources/browsers/computer.d.mts.map +1 -1
- package/resources/browsers/computer.d.ts +199 -1
- package/resources/browsers/computer.d.ts.map +1 -1
- package/resources/browsers/computer.js +31 -0
- package/resources/browsers/computer.js.map +1 -1
- package/resources/browsers/computer.mjs +31 -0
- package/resources/browsers/computer.mjs.map +1 -1
- package/resources/browsers/index.d.mts +1 -1
- package/resources/browsers/index.d.mts.map +1 -1
- package/resources/browsers/index.d.ts +1 -1
- package/resources/browsers/index.d.ts.map +1 -1
- package/resources/browsers/index.js.map +1 -1
- package/resources/browsers/index.mjs.map +1 -1
- package/resources/credential-providers.d.mts +66 -1
- package/resources/credential-providers.d.mts.map +1 -1
- package/resources/credential-providers.d.ts +66 -1
- package/resources/credential-providers.d.ts.map +1 -1
- package/resources/credential-providers.js +21 -6
- package/resources/credential-providers.js.map +1 -1
- package/resources/credential-providers.mjs +21 -6
- package/resources/credential-providers.mjs.map +1 -1
- 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 +24 -4
- package/src/resources/agents/auth/auth.ts +121 -46
- package/src/resources/agents/auth/invocations.ts +18 -47
- package/src/resources/auth/auth.ts +43 -0
- package/src/resources/auth/connections.ts +848 -0
- package/src/resources/auth/index.ts +18 -0
- package/src/resources/auth.ts +3 -0
- package/src/resources/browsers/browsers.ts +4 -0
- package/src/resources/browsers/computer.ts +257 -0
- package/src/resources/browsers/index.ts +2 -0
- package/src/resources/credential-providers.ts +88 -6
- package/src/resources/index.ts +3 -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
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export { Auth } from './auth';
|
|
4
|
+
export {
|
|
5
|
+
Connections,
|
|
6
|
+
type LoginRequest,
|
|
7
|
+
type LoginResponse,
|
|
8
|
+
type ManagedAuth,
|
|
9
|
+
type ManagedAuthCreateRequest,
|
|
10
|
+
type SubmitFieldsRequest,
|
|
11
|
+
type SubmitFieldsResponse,
|
|
12
|
+
type ConnectionFollowResponse,
|
|
13
|
+
type ConnectionCreateParams,
|
|
14
|
+
type ConnectionListParams,
|
|
15
|
+
type ConnectionLoginParams,
|
|
16
|
+
type ConnectionSubmitParams,
|
|
17
|
+
type ManagedAuthsOffsetPagination,
|
|
18
|
+
} from './connections';
|
|
@@ -5,9 +5,11 @@ import * as Shared from '../shared';
|
|
|
5
5
|
import * as ComputerAPI from './computer';
|
|
6
6
|
import {
|
|
7
7
|
Computer,
|
|
8
|
+
ComputerBatchParams,
|
|
8
9
|
ComputerCaptureScreenshotParams,
|
|
9
10
|
ComputerClickMouseParams,
|
|
10
11
|
ComputerDragMouseParams,
|
|
12
|
+
ComputerGetMousePositionResponse,
|
|
11
13
|
ComputerMoveMouseParams,
|
|
12
14
|
ComputerPressKeyParams,
|
|
13
15
|
ComputerScrollParams,
|
|
@@ -764,7 +766,9 @@ export declare namespace Browsers {
|
|
|
764
766
|
|
|
765
767
|
export {
|
|
766
768
|
Computer as Computer,
|
|
769
|
+
type ComputerGetMousePositionResponse as ComputerGetMousePositionResponse,
|
|
767
770
|
type ComputerSetCursorVisibilityResponse as ComputerSetCursorVisibilityResponse,
|
|
771
|
+
type ComputerBatchParams as ComputerBatchParams,
|
|
768
772
|
type ComputerCaptureScreenshotParams as ComputerCaptureScreenshotParams,
|
|
769
773
|
type ComputerClickMouseParams as ComputerClickMouseParams,
|
|
770
774
|
type ComputerDragMouseParams as ComputerDragMouseParams,
|
|
@@ -7,6 +7,26 @@ import { RequestOptions } from '../../internal/request-options';
|
|
|
7
7
|
import { path } from '../../internal/utils/path';
|
|
8
8
|
|
|
9
9
|
export class Computer extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Send an array of computer actions to execute in order on the browser instance.
|
|
12
|
+
* Execution stops on the first error. This reduces network latency compared to
|
|
13
|
+
* sending individual action requests.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* await client.browsers.computer.batch('id', {
|
|
18
|
+
* actions: [{ type: 'click_mouse' }],
|
|
19
|
+
* });
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
batch(id: string, body: ComputerBatchParams, options?: RequestOptions): APIPromise<void> {
|
|
23
|
+
return this._client.post(path`/browsers/${id}/computer/batch`, {
|
|
24
|
+
body,
|
|
25
|
+
...options,
|
|
26
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
|
|
10
30
|
/**
|
|
11
31
|
* Capture a screenshot of the browser instance
|
|
12
32
|
*
|
|
@@ -72,6 +92,19 @@ export class Computer extends APIResource {
|
|
|
72
92
|
});
|
|
73
93
|
}
|
|
74
94
|
|
|
95
|
+
/**
|
|
96
|
+
* Get the current mouse cursor position on the browser instance
|
|
97
|
+
*
|
|
98
|
+
* @example
|
|
99
|
+
* ```ts
|
|
100
|
+
* const response =
|
|
101
|
+
* await client.browsers.computer.getMousePosition('id');
|
|
102
|
+
* ```
|
|
103
|
+
*/
|
|
104
|
+
getMousePosition(id: string, options?: RequestOptions): APIPromise<ComputerGetMousePositionResponse> {
|
|
105
|
+
return this._client.post(path`/browsers/${id}/computer/get_mouse_position`, options);
|
|
106
|
+
}
|
|
107
|
+
|
|
75
108
|
/**
|
|
76
109
|
* Move the mouse cursor to the specified coordinates on the browser instance
|
|
77
110
|
*
|
|
@@ -163,6 +196,18 @@ export class Computer extends APIResource {
|
|
|
163
196
|
}
|
|
164
197
|
}
|
|
165
198
|
|
|
199
|
+
export interface ComputerGetMousePositionResponse {
|
|
200
|
+
/**
|
|
201
|
+
* X coordinate of the cursor
|
|
202
|
+
*/
|
|
203
|
+
x: number;
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Y coordinate of the cursor
|
|
207
|
+
*/
|
|
208
|
+
y: number;
|
|
209
|
+
}
|
|
210
|
+
|
|
166
211
|
/**
|
|
167
212
|
* Generic OK response.
|
|
168
213
|
*/
|
|
@@ -173,6 +218,216 @@ export interface ComputerSetCursorVisibilityResponse {
|
|
|
173
218
|
ok: boolean;
|
|
174
219
|
}
|
|
175
220
|
|
|
221
|
+
export interface ComputerBatchParams {
|
|
222
|
+
/**
|
|
223
|
+
* Ordered list of actions to execute. Execution stops on the first error.
|
|
224
|
+
*/
|
|
225
|
+
actions: Array<ComputerBatchParams.Action>;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
export namespace ComputerBatchParams {
|
|
229
|
+
/**
|
|
230
|
+
* A single computer action to execute as part of a batch. The `type` field selects
|
|
231
|
+
* which action to perform, and the corresponding field contains the action
|
|
232
|
+
* parameters. Exactly one action field matching the type must be provided.
|
|
233
|
+
*/
|
|
234
|
+
export interface Action {
|
|
235
|
+
/**
|
|
236
|
+
* The type of action to perform.
|
|
237
|
+
*/
|
|
238
|
+
type:
|
|
239
|
+
| 'click_mouse'
|
|
240
|
+
| 'move_mouse'
|
|
241
|
+
| 'type_text'
|
|
242
|
+
| 'press_key'
|
|
243
|
+
| 'scroll'
|
|
244
|
+
| 'drag_mouse'
|
|
245
|
+
| 'set_cursor'
|
|
246
|
+
| 'sleep';
|
|
247
|
+
|
|
248
|
+
click_mouse?: Action.ClickMouse;
|
|
249
|
+
|
|
250
|
+
drag_mouse?: Action.DragMouse;
|
|
251
|
+
|
|
252
|
+
move_mouse?: Action.MoveMouse;
|
|
253
|
+
|
|
254
|
+
press_key?: Action.PressKey;
|
|
255
|
+
|
|
256
|
+
scroll?: Action.Scroll;
|
|
257
|
+
|
|
258
|
+
set_cursor?: Action.SetCursor;
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Pause execution for a specified duration.
|
|
262
|
+
*/
|
|
263
|
+
sleep?: Action.Sleep;
|
|
264
|
+
|
|
265
|
+
type_text?: Action.TypeText;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
export namespace Action {
|
|
269
|
+
export interface ClickMouse {
|
|
270
|
+
/**
|
|
271
|
+
* X coordinate of the click position
|
|
272
|
+
*/
|
|
273
|
+
x: number;
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* Y coordinate of the click position
|
|
277
|
+
*/
|
|
278
|
+
y: number;
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* Mouse button to interact with
|
|
282
|
+
*/
|
|
283
|
+
button?: 'left' | 'right' | 'middle' | 'back' | 'forward';
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* Type of click action
|
|
287
|
+
*/
|
|
288
|
+
click_type?: 'down' | 'up' | 'click';
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* Modifier keys to hold during the click
|
|
292
|
+
*/
|
|
293
|
+
hold_keys?: Array<string>;
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* Number of times to repeat the click
|
|
297
|
+
*/
|
|
298
|
+
num_clicks?: number;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
export interface DragMouse {
|
|
302
|
+
/**
|
|
303
|
+
* Ordered list of [x, y] coordinate pairs to move through while dragging. Must
|
|
304
|
+
* contain at least 2 points.
|
|
305
|
+
*/
|
|
306
|
+
path: Array<Array<number>>;
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* Mouse button to drag with
|
|
310
|
+
*/
|
|
311
|
+
button?: 'left' | 'middle' | 'right';
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* Delay in milliseconds between button down and starting to move along the path.
|
|
315
|
+
*/
|
|
316
|
+
delay?: number;
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* Modifier keys to hold during the drag
|
|
320
|
+
*/
|
|
321
|
+
hold_keys?: Array<string>;
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Delay in milliseconds between relative steps while dragging (not the initial
|
|
325
|
+
* delay).
|
|
326
|
+
*/
|
|
327
|
+
step_delay_ms?: number;
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* Number of relative move steps per segment in the path. Minimum 1.
|
|
331
|
+
*/
|
|
332
|
+
steps_per_segment?: number;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
export interface MoveMouse {
|
|
336
|
+
/**
|
|
337
|
+
* X coordinate to move the cursor to
|
|
338
|
+
*/
|
|
339
|
+
x: number;
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* Y coordinate to move the cursor to
|
|
343
|
+
*/
|
|
344
|
+
y: number;
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* Modifier keys to hold during the move
|
|
348
|
+
*/
|
|
349
|
+
hold_keys?: Array<string>;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
export interface PressKey {
|
|
353
|
+
/**
|
|
354
|
+
* List of key symbols to press. Each item should be a key symbol supported by
|
|
355
|
+
* xdotool (see X11 keysym definitions). Examples include "Return", "Shift",
|
|
356
|
+
* "Ctrl", "Alt", "F5". Items in this list could also be combinations, e.g.
|
|
357
|
+
* "Ctrl+t" or "Ctrl+Shift+Tab".
|
|
358
|
+
*/
|
|
359
|
+
keys: Array<string>;
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* Duration to hold the keys down in milliseconds. If omitted or 0, keys are
|
|
363
|
+
* tapped.
|
|
364
|
+
*/
|
|
365
|
+
duration?: number;
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* Optional modifier keys to hold during the key press sequence.
|
|
369
|
+
*/
|
|
370
|
+
hold_keys?: Array<string>;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
export interface Scroll {
|
|
374
|
+
/**
|
|
375
|
+
* X coordinate at which to perform the scroll
|
|
376
|
+
*/
|
|
377
|
+
x: number;
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* Y coordinate at which to perform the scroll
|
|
381
|
+
*/
|
|
382
|
+
y: number;
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* Horizontal scroll amount. Positive scrolls right, negative scrolls left.
|
|
386
|
+
*/
|
|
387
|
+
delta_x?: number;
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* Vertical scroll amount. Positive scrolls down, negative scrolls up.
|
|
391
|
+
*/
|
|
392
|
+
delta_y?: number;
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* Modifier keys to hold during the scroll
|
|
396
|
+
*/
|
|
397
|
+
hold_keys?: Array<string>;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
export interface SetCursor {
|
|
401
|
+
/**
|
|
402
|
+
* Whether the cursor should be hidden or visible
|
|
403
|
+
*/
|
|
404
|
+
hidden: boolean;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
/**
|
|
408
|
+
* Pause execution for a specified duration.
|
|
409
|
+
*/
|
|
410
|
+
export interface Sleep {
|
|
411
|
+
/**
|
|
412
|
+
* Duration to sleep in milliseconds.
|
|
413
|
+
*/
|
|
414
|
+
duration_ms: number;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
export interface TypeText {
|
|
418
|
+
/**
|
|
419
|
+
* Text to type on the browser instance
|
|
420
|
+
*/
|
|
421
|
+
text: string;
|
|
422
|
+
|
|
423
|
+
/**
|
|
424
|
+
* Delay in milliseconds between keystrokes
|
|
425
|
+
*/
|
|
426
|
+
delay?: number;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
|
|
176
431
|
export interface ComputerCaptureScreenshotParams {
|
|
177
432
|
region?: ComputerCaptureScreenshotParams.Region;
|
|
178
433
|
}
|
|
@@ -353,7 +608,9 @@ export interface ComputerTypeTextParams {
|
|
|
353
608
|
|
|
354
609
|
export declare namespace Computer {
|
|
355
610
|
export {
|
|
611
|
+
type ComputerGetMousePositionResponse as ComputerGetMousePositionResponse,
|
|
356
612
|
type ComputerSetCursorVisibilityResponse as ComputerSetCursorVisibilityResponse,
|
|
613
|
+
type ComputerBatchParams as ComputerBatchParams,
|
|
357
614
|
type ComputerCaptureScreenshotParams as ComputerCaptureScreenshotParams,
|
|
358
615
|
type ComputerClickMouseParams as ComputerClickMouseParams,
|
|
359
616
|
type ComputerDragMouseParams as ComputerDragMouseParams,
|
|
@@ -18,7 +18,9 @@ export {
|
|
|
18
18
|
} from './browsers';
|
|
19
19
|
export {
|
|
20
20
|
Computer,
|
|
21
|
+
type ComputerGetMousePositionResponse,
|
|
21
22
|
type ComputerSetCursorVisibilityResponse,
|
|
23
|
+
type ComputerBatchParams,
|
|
22
24
|
type ComputerCaptureScreenshotParams,
|
|
23
25
|
type ComputerClickMouseParams,
|
|
24
26
|
type ComputerDragMouseParams,
|
|
@@ -16,12 +16,13 @@ export class CredentialProviders extends APIResource {
|
|
|
16
16
|
* const credentialProvider =
|
|
17
17
|
* await client.credentialProviders.create({
|
|
18
18
|
* token: 'ops_eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...',
|
|
19
|
+
* name: 'my-1password',
|
|
19
20
|
* provider_type: 'onepassword',
|
|
20
21
|
* });
|
|
21
22
|
* ```
|
|
22
23
|
*/
|
|
23
24
|
create(body: CredentialProviderCreateParams, options?: RequestOptions): APIPromise<CredentialProvider> {
|
|
24
|
-
return this._client.post('/org/
|
|
25
|
+
return this._client.post('/org/credential_providers', { body, ...options });
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
/**
|
|
@@ -34,7 +35,7 @@ export class CredentialProviders extends APIResource {
|
|
|
34
35
|
* ```
|
|
35
36
|
*/
|
|
36
37
|
retrieve(id: string, options?: RequestOptions): APIPromise<CredentialProvider> {
|
|
37
|
-
return this._client.get(path`/org/
|
|
38
|
+
return this._client.get(path`/org/credential_providers/${id}`, options);
|
|
38
39
|
}
|
|
39
40
|
|
|
40
41
|
/**
|
|
@@ -51,7 +52,7 @@ export class CredentialProviders extends APIResource {
|
|
|
51
52
|
body: CredentialProviderUpdateParams,
|
|
52
53
|
options?: RequestOptions,
|
|
53
54
|
): APIPromise<CredentialProvider> {
|
|
54
|
-
return this._client.patch(path`/org/
|
|
55
|
+
return this._client.patch(path`/org/credential_providers/${id}`, { body, ...options });
|
|
55
56
|
}
|
|
56
57
|
|
|
57
58
|
/**
|
|
@@ -64,7 +65,7 @@ export class CredentialProviders extends APIResource {
|
|
|
64
65
|
* ```
|
|
65
66
|
*/
|
|
66
67
|
list(options?: RequestOptions): APIPromise<CredentialProviderListResponse> {
|
|
67
|
-
return this._client.get('/org/
|
|
68
|
+
return this._client.get('/org/credential_providers', options);
|
|
68
69
|
}
|
|
69
70
|
|
|
70
71
|
/**
|
|
@@ -76,12 +77,27 @@ export class CredentialProviders extends APIResource {
|
|
|
76
77
|
* ```
|
|
77
78
|
*/
|
|
78
79
|
delete(id: string, options?: RequestOptions): APIPromise<void> {
|
|
79
|
-
return this._client.delete(path`/org/
|
|
80
|
+
return this._client.delete(path`/org/credential_providers/${id}`, {
|
|
80
81
|
...options,
|
|
81
82
|
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
82
83
|
});
|
|
83
84
|
}
|
|
84
85
|
|
|
86
|
+
/**
|
|
87
|
+
* Returns available credential items (e.g., 1Password login items) from the
|
|
88
|
+
* provider.
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* ```ts
|
|
92
|
+
* const response = await client.credentialProviders.listItems(
|
|
93
|
+
* 'id',
|
|
94
|
+
* );
|
|
95
|
+
* ```
|
|
96
|
+
*/
|
|
97
|
+
listItems(id: string, options?: RequestOptions): APIPromise<CredentialProviderListItemsResponse> {
|
|
98
|
+
return this._client.get(path`/org/credential_providers/${id}/items`, options);
|
|
99
|
+
}
|
|
100
|
+
|
|
85
101
|
/**
|
|
86
102
|
* Validate the credential provider's token and list accessible vaults.
|
|
87
103
|
*
|
|
@@ -92,7 +108,7 @@ export class CredentialProviders extends APIResource {
|
|
|
92
108
|
* ```
|
|
93
109
|
*/
|
|
94
110
|
test(id: string, options?: RequestOptions): APIPromise<CredentialProviderTestResult> {
|
|
95
|
-
return this._client.post(path`/org/
|
|
111
|
+
return this._client.post(path`/org/credential_providers/${id}/test`, options);
|
|
96
112
|
}
|
|
97
113
|
}
|
|
98
114
|
|
|
@@ -105,6 +121,11 @@ export interface CreateCredentialProviderRequest {
|
|
|
105
121
|
*/
|
|
106
122
|
token: string;
|
|
107
123
|
|
|
124
|
+
/**
|
|
125
|
+
* Human-readable name for this provider instance (unique per org)
|
|
126
|
+
*/
|
|
127
|
+
name: string;
|
|
128
|
+
|
|
108
129
|
/**
|
|
109
130
|
* Type of credential provider
|
|
110
131
|
*/
|
|
@@ -136,6 +157,11 @@ export interface CredentialProvider {
|
|
|
136
157
|
*/
|
|
137
158
|
enabled: boolean;
|
|
138
159
|
|
|
160
|
+
/**
|
|
161
|
+
* Human-readable name for this provider instance
|
|
162
|
+
*/
|
|
163
|
+
name: string;
|
|
164
|
+
|
|
139
165
|
/**
|
|
140
166
|
* Priority order for credential lookups (lower numbers are checked first)
|
|
141
167
|
*/
|
|
@@ -152,6 +178,41 @@ export interface CredentialProvider {
|
|
|
152
178
|
updated_at: string;
|
|
153
179
|
}
|
|
154
180
|
|
|
181
|
+
/**
|
|
182
|
+
* A credential item from an external provider (e.g., a 1Password login item)
|
|
183
|
+
*/
|
|
184
|
+
export interface CredentialProviderItem {
|
|
185
|
+
/**
|
|
186
|
+
* Unique identifier for the item within the provider
|
|
187
|
+
*/
|
|
188
|
+
id: string;
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Path to reference this item (VaultName/ItemTitle format)
|
|
192
|
+
*/
|
|
193
|
+
path: string;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Display name of the credential item
|
|
197
|
+
*/
|
|
198
|
+
title: string;
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* ID of the vault containing this item
|
|
202
|
+
*/
|
|
203
|
+
vault_id: string;
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Name of the vault containing this item
|
|
207
|
+
*/
|
|
208
|
+
vault_name: string;
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* URLs associated with this credential
|
|
212
|
+
*/
|
|
213
|
+
urls?: Array<string>;
|
|
214
|
+
}
|
|
215
|
+
|
|
155
216
|
/**
|
|
156
217
|
* Result of testing a credential provider connection
|
|
157
218
|
*/
|
|
@@ -205,6 +266,11 @@ export interface UpdateCredentialProviderRequest {
|
|
|
205
266
|
*/
|
|
206
267
|
enabled?: boolean;
|
|
207
268
|
|
|
269
|
+
/**
|
|
270
|
+
* Human-readable name for this provider instance
|
|
271
|
+
*/
|
|
272
|
+
name?: string;
|
|
273
|
+
|
|
208
274
|
/**
|
|
209
275
|
* Priority order for credential lookups (lower numbers are checked first)
|
|
210
276
|
*/
|
|
@@ -213,12 +279,21 @@ export interface UpdateCredentialProviderRequest {
|
|
|
213
279
|
|
|
214
280
|
export type CredentialProviderListResponse = Array<CredentialProvider>;
|
|
215
281
|
|
|
282
|
+
export interface CredentialProviderListItemsResponse {
|
|
283
|
+
items?: Array<CredentialProviderItem>;
|
|
284
|
+
}
|
|
285
|
+
|
|
216
286
|
export interface CredentialProviderCreateParams {
|
|
217
287
|
/**
|
|
218
288
|
* Service account token for the provider (e.g., 1Password service account token)
|
|
219
289
|
*/
|
|
220
290
|
token: string;
|
|
221
291
|
|
|
292
|
+
/**
|
|
293
|
+
* Human-readable name for this provider instance (unique per org)
|
|
294
|
+
*/
|
|
295
|
+
name: string;
|
|
296
|
+
|
|
222
297
|
/**
|
|
223
298
|
* Type of credential provider
|
|
224
299
|
*/
|
|
@@ -246,6 +321,11 @@ export interface CredentialProviderUpdateParams {
|
|
|
246
321
|
*/
|
|
247
322
|
enabled?: boolean;
|
|
248
323
|
|
|
324
|
+
/**
|
|
325
|
+
* Human-readable name for this provider instance
|
|
326
|
+
*/
|
|
327
|
+
name?: string;
|
|
328
|
+
|
|
249
329
|
/**
|
|
250
330
|
* Priority order for credential lookups (lower numbers are checked first)
|
|
251
331
|
*/
|
|
@@ -256,9 +336,11 @@ export declare namespace CredentialProviders {
|
|
|
256
336
|
export {
|
|
257
337
|
type CreateCredentialProviderRequest as CreateCredentialProviderRequest,
|
|
258
338
|
type CredentialProvider as CredentialProvider,
|
|
339
|
+
type CredentialProviderItem as CredentialProviderItem,
|
|
259
340
|
type CredentialProviderTestResult as CredentialProviderTestResult,
|
|
260
341
|
type UpdateCredentialProviderRequest as UpdateCredentialProviderRequest,
|
|
261
342
|
type CredentialProviderListResponse as CredentialProviderListResponse,
|
|
343
|
+
type CredentialProviderListItemsResponse as CredentialProviderListItemsResponse,
|
|
262
344
|
type CredentialProviderCreateParams as CredentialProviderCreateParams,
|
|
263
345
|
type CredentialProviderUpdateParams as CredentialProviderUpdateParams,
|
|
264
346
|
};
|
package/src/resources/index.ts
CHANGED
|
@@ -8,6 +8,7 @@ export {
|
|
|
8
8
|
type AppListParams,
|
|
9
9
|
type AppListResponsesOffsetPagination,
|
|
10
10
|
} from './apps';
|
|
11
|
+
export { Auth } from './auth/auth';
|
|
11
12
|
export {
|
|
12
13
|
BrowserPools,
|
|
13
14
|
type BrowserPool,
|
|
@@ -39,9 +40,11 @@ export {
|
|
|
39
40
|
CredentialProviders,
|
|
40
41
|
type CreateCredentialProviderRequest,
|
|
41
42
|
type CredentialProvider,
|
|
43
|
+
type CredentialProviderItem,
|
|
42
44
|
type CredentialProviderTestResult,
|
|
43
45
|
type UpdateCredentialProviderRequest,
|
|
44
46
|
type CredentialProviderListResponse,
|
|
47
|
+
type CredentialProviderListItemsResponse,
|
|
45
48
|
type CredentialProviderCreateParams,
|
|
46
49
|
type CredentialProviderUpdateParams,
|
|
47
50
|
} from './credential-providers';
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.32.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.32.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.32.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.32.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|