@onkernel/sdk 0.26.0 → 0.28.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 +23 -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/auth/auth.d.mts +4 -0
- package/resources/agents/auth/auth.d.mts.map +1 -1
- package/resources/agents/auth/auth.d.ts +4 -0
- package/resources/agents/auth/auth.d.ts.map +1 -1
- package/resources/agents/auth/auth.js.map +1 -1
- package/resources/agents/auth/auth.mjs.map +1 -1
- package/resources/browser-pools.d.mts +9 -3
- package/resources/browser-pools.d.mts.map +1 -1
- package/resources/browser-pools.d.ts +9 -3
- package/resources/browser-pools.d.ts.map +1 -1
- package/resources/browsers/browsers.d.mts +26 -6
- package/resources/browsers/browsers.d.mts.map +1 -1
- package/resources/browsers/browsers.d.ts +26 -6
- package/resources/browsers/browsers.d.ts.map +1 -1
- package/resources/browsers/browsers.js +4 -4
- package/resources/browsers/browsers.js.map +1 -1
- package/resources/browsers/browsers.mjs +4 -4
- package/resources/browsers/browsers.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 +202 -0
- package/resources/credential-providers.d.mts.map +1 -0
- package/resources/credential-providers.d.ts +202 -0
- package/resources/credential-providers.d.ts.map +1 -0
- package/resources/credential-providers.js +89 -0
- package/resources/credential-providers.js.map +1 -0
- package/resources/credential-providers.mjs +85 -0
- package/resources/credential-providers.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 +25 -0
- package/src/resources/agents/auth/auth.ts +5 -0
- package/src/resources/browser-pools.ts +9 -3
- package/src/resources/browsers/browsers.ts +35 -6
- package/src/resources/browsers/index.ts +1 -0
- package/src/resources/credential-providers.ts +265 -0
- package/src/resources/index.ts +11 -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
|
@@ -105,8 +105,12 @@ export class Browsers extends APIResource {
|
|
|
105
105
|
* );
|
|
106
106
|
* ```
|
|
107
107
|
*/
|
|
108
|
-
retrieve(
|
|
109
|
-
|
|
108
|
+
retrieve(
|
|
109
|
+
id: string,
|
|
110
|
+
query: BrowserRetrieveParams | null | undefined = {},
|
|
111
|
+
options?: RequestOptions,
|
|
112
|
+
): APIPromise<BrowserRetrieveResponse> {
|
|
113
|
+
return this._client.get(path`/browsers/${id}`, { query, ...options });
|
|
110
114
|
}
|
|
111
115
|
|
|
112
116
|
/**
|
|
@@ -124,8 +128,8 @@ export class Browsers extends APIResource {
|
|
|
124
128
|
}
|
|
125
129
|
|
|
126
130
|
/**
|
|
127
|
-
* List all browser sessions with pagination support. Use
|
|
128
|
-
*
|
|
131
|
+
* List all browser sessions with pagination support. Use status parameter to
|
|
132
|
+
* filter by session state.
|
|
129
133
|
*
|
|
130
134
|
* @example
|
|
131
135
|
* ```ts
|
|
@@ -618,20 +622,44 @@ export interface BrowserCreateParams {
|
|
|
618
622
|
viewport?: Shared.BrowserViewport;
|
|
619
623
|
}
|
|
620
624
|
|
|
625
|
+
export interface BrowserRetrieveParams {
|
|
626
|
+
/**
|
|
627
|
+
* When true, includes soft-deleted browser sessions in the lookup.
|
|
628
|
+
*/
|
|
629
|
+
include_deleted?: boolean;
|
|
630
|
+
}
|
|
631
|
+
|
|
621
632
|
export interface BrowserUpdateParams {
|
|
633
|
+
/**
|
|
634
|
+
* Profile to load into the browser session. Only allowed if the session does not
|
|
635
|
+
* already have a profile loaded.
|
|
636
|
+
*/
|
|
637
|
+
profile?: Shared.BrowserProfile;
|
|
638
|
+
|
|
622
639
|
/**
|
|
623
640
|
* ID of the proxy to use. Omit to leave unchanged, set to empty string to remove
|
|
624
641
|
* proxy.
|
|
625
642
|
*/
|
|
626
643
|
proxy_id?: string | null;
|
|
644
|
+
|
|
645
|
+
/**
|
|
646
|
+
* Viewport configuration to apply to the browser session.
|
|
647
|
+
*/
|
|
648
|
+
viewport?: Shared.BrowserViewport;
|
|
627
649
|
}
|
|
628
650
|
|
|
629
651
|
export interface BrowserListParams extends OffsetPaginationParams {
|
|
630
652
|
/**
|
|
631
|
-
* When true, includes soft-deleted browser
|
|
632
|
-
* active sessions.
|
|
653
|
+
* Deprecated: Use status=all instead. When true, includes soft-deleted browser
|
|
654
|
+
* sessions in the results alongside active sessions.
|
|
633
655
|
*/
|
|
634
656
|
include_deleted?: boolean;
|
|
657
|
+
|
|
658
|
+
/**
|
|
659
|
+
* Filter sessions by status. "active" returns only active sessions (default),
|
|
660
|
+
* "deleted" returns only soft-deleted sessions, "all" returns both.
|
|
661
|
+
*/
|
|
662
|
+
status?: 'active' | 'deleted' | 'all';
|
|
635
663
|
}
|
|
636
664
|
|
|
637
665
|
export interface BrowserDeleteParams {
|
|
@@ -680,6 +708,7 @@ export declare namespace Browsers {
|
|
|
680
708
|
type BrowserListResponse as BrowserListResponse,
|
|
681
709
|
type BrowserListResponsesOffsetPagination as BrowserListResponsesOffsetPagination,
|
|
682
710
|
type BrowserCreateParams as BrowserCreateParams,
|
|
711
|
+
type BrowserRetrieveParams as BrowserRetrieveParams,
|
|
683
712
|
type BrowserUpdateParams as BrowserUpdateParams,
|
|
684
713
|
type BrowserListParams as BrowserListParams,
|
|
685
714
|
type BrowserDeleteParams as BrowserDeleteParams,
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { buildHeaders } from '../internal/headers';
|
|
6
|
+
import { RequestOptions } from '../internal/request-options';
|
|
7
|
+
import { path } from '../internal/utils/path';
|
|
8
|
+
|
|
9
|
+
export class CredentialProviders extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Configure an external credential provider (e.g., 1Password) for automatic
|
|
12
|
+
* credential lookup.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const credentialProvider =
|
|
17
|
+
* await client.credentialProviders.create({
|
|
18
|
+
* token: 'ops_eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...',
|
|
19
|
+
* provider_type: 'onepassword',
|
|
20
|
+
* });
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
create(body: CredentialProviderCreateParams, options?: RequestOptions): APIPromise<CredentialProvider> {
|
|
24
|
+
return this._client.post('/org/credential-providers', { body, ...options });
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Retrieve a credential provider by its ID.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* const credentialProvider =
|
|
33
|
+
* await client.credentialProviders.retrieve('id');
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<CredentialProvider> {
|
|
37
|
+
return this._client.get(path`/org/credential-providers/${id}`, options);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Update a credential provider's configuration.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```ts
|
|
45
|
+
* const credentialProvider =
|
|
46
|
+
* await client.credentialProviders.update('id');
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
update(
|
|
50
|
+
id: string,
|
|
51
|
+
body: CredentialProviderUpdateParams,
|
|
52
|
+
options?: RequestOptions,
|
|
53
|
+
): APIPromise<CredentialProvider> {
|
|
54
|
+
return this._client.patch(path`/org/credential-providers/${id}`, { body, ...options });
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* List external credential providers configured for the organization.
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```ts
|
|
62
|
+
* const credentialProviders =
|
|
63
|
+
* await client.credentialProviders.list();
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
list(options?: RequestOptions): APIPromise<CredentialProviderListResponse> {
|
|
67
|
+
return this._client.get('/org/credential-providers', options);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Delete a credential provider by its ID.
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* ```ts
|
|
75
|
+
* await client.credentialProviders.delete('id');
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
78
|
+
delete(id: string, options?: RequestOptions): APIPromise<void> {
|
|
79
|
+
return this._client.delete(path`/org/credential-providers/${id}`, {
|
|
80
|
+
...options,
|
|
81
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Validate the credential provider's token and list accessible vaults.
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* ```ts
|
|
90
|
+
* const credentialProviderTestResult =
|
|
91
|
+
* await client.credentialProviders.test('id');
|
|
92
|
+
* ```
|
|
93
|
+
*/
|
|
94
|
+
test(id: string, options?: RequestOptions): APIPromise<CredentialProviderTestResult> {
|
|
95
|
+
return this._client.post(path`/org/credential-providers/${id}/test`, options);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Request to create an external credential provider
|
|
101
|
+
*/
|
|
102
|
+
export interface CreateCredentialProviderRequest {
|
|
103
|
+
/**
|
|
104
|
+
* Service account token for the provider (e.g., 1Password service account token)
|
|
105
|
+
*/
|
|
106
|
+
token: string;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Type of credential provider
|
|
110
|
+
*/
|
|
111
|
+
provider_type: 'onepassword';
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* How long to cache credential lists (default 300 seconds)
|
|
115
|
+
*/
|
|
116
|
+
cache_ttl_seconds?: number;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* An external credential provider (e.g., 1Password) for automatic credential
|
|
121
|
+
* lookup
|
|
122
|
+
*/
|
|
123
|
+
export interface CredentialProvider {
|
|
124
|
+
/**
|
|
125
|
+
* Unique identifier for the credential provider
|
|
126
|
+
*/
|
|
127
|
+
id: string;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* When the credential provider was created
|
|
131
|
+
*/
|
|
132
|
+
created_at: string;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Whether the provider is enabled for credential lookups
|
|
136
|
+
*/
|
|
137
|
+
enabled: boolean;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Priority order for credential lookups (lower numbers are checked first)
|
|
141
|
+
*/
|
|
142
|
+
priority: number;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Type of credential provider
|
|
146
|
+
*/
|
|
147
|
+
provider_type: 'onepassword';
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* When the credential provider was last updated
|
|
151
|
+
*/
|
|
152
|
+
updated_at: string;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Result of testing a credential provider connection
|
|
157
|
+
*/
|
|
158
|
+
export interface CredentialProviderTestResult {
|
|
159
|
+
/**
|
|
160
|
+
* Whether the connection test was successful
|
|
161
|
+
*/
|
|
162
|
+
success: boolean;
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* List of vaults accessible by the service account
|
|
166
|
+
*/
|
|
167
|
+
vaults: Array<CredentialProviderTestResult.Vault>;
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Error message if the test failed
|
|
171
|
+
*/
|
|
172
|
+
error?: string;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export namespace CredentialProviderTestResult {
|
|
176
|
+
export interface Vault {
|
|
177
|
+
/**
|
|
178
|
+
* Vault ID
|
|
179
|
+
*/
|
|
180
|
+
id: string;
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Vault name
|
|
184
|
+
*/
|
|
185
|
+
name: string;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Request to update a credential provider
|
|
191
|
+
*/
|
|
192
|
+
export interface UpdateCredentialProviderRequest {
|
|
193
|
+
/**
|
|
194
|
+
* New service account token (to rotate credentials)
|
|
195
|
+
*/
|
|
196
|
+
token?: string;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* How long to cache credential lists
|
|
200
|
+
*/
|
|
201
|
+
cache_ttl_seconds?: number;
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Whether the provider is enabled for credential lookups
|
|
205
|
+
*/
|
|
206
|
+
enabled?: boolean;
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Priority order for credential lookups (lower numbers are checked first)
|
|
210
|
+
*/
|
|
211
|
+
priority?: number;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export type CredentialProviderListResponse = Array<CredentialProvider>;
|
|
215
|
+
|
|
216
|
+
export interface CredentialProviderCreateParams {
|
|
217
|
+
/**
|
|
218
|
+
* Service account token for the provider (e.g., 1Password service account token)
|
|
219
|
+
*/
|
|
220
|
+
token: string;
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Type of credential provider
|
|
224
|
+
*/
|
|
225
|
+
provider_type: 'onepassword';
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* How long to cache credential lists (default 300 seconds)
|
|
229
|
+
*/
|
|
230
|
+
cache_ttl_seconds?: number;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
export interface CredentialProviderUpdateParams {
|
|
234
|
+
/**
|
|
235
|
+
* New service account token (to rotate credentials)
|
|
236
|
+
*/
|
|
237
|
+
token?: string;
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* How long to cache credential lists
|
|
241
|
+
*/
|
|
242
|
+
cache_ttl_seconds?: number;
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* Whether the provider is enabled for credential lookups
|
|
246
|
+
*/
|
|
247
|
+
enabled?: boolean;
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Priority order for credential lookups (lower numbers are checked first)
|
|
251
|
+
*/
|
|
252
|
+
priority?: number;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
export declare namespace CredentialProviders {
|
|
256
|
+
export {
|
|
257
|
+
type CreateCredentialProviderRequest as CreateCredentialProviderRequest,
|
|
258
|
+
type CredentialProvider as CredentialProvider,
|
|
259
|
+
type CredentialProviderTestResult as CredentialProviderTestResult,
|
|
260
|
+
type UpdateCredentialProviderRequest as UpdateCredentialProviderRequest,
|
|
261
|
+
type CredentialProviderListResponse as CredentialProviderListResponse,
|
|
262
|
+
type CredentialProviderCreateParams as CredentialProviderCreateParams,
|
|
263
|
+
type CredentialProviderUpdateParams as CredentialProviderUpdateParams,
|
|
264
|
+
};
|
|
265
|
+
}
|
package/src/resources/index.ts
CHANGED
|
@@ -28,12 +28,23 @@ export {
|
|
|
28
28
|
type BrowserUpdateResponse,
|
|
29
29
|
type BrowserListResponse,
|
|
30
30
|
type BrowserCreateParams,
|
|
31
|
+
type BrowserRetrieveParams,
|
|
31
32
|
type BrowserUpdateParams,
|
|
32
33
|
type BrowserListParams,
|
|
33
34
|
type BrowserDeleteParams,
|
|
34
35
|
type BrowserLoadExtensionsParams,
|
|
35
36
|
type BrowserListResponsesOffsetPagination,
|
|
36
37
|
} from './browsers/browsers';
|
|
38
|
+
export {
|
|
39
|
+
CredentialProviders,
|
|
40
|
+
type CreateCredentialProviderRequest,
|
|
41
|
+
type CredentialProvider,
|
|
42
|
+
type CredentialProviderTestResult,
|
|
43
|
+
type UpdateCredentialProviderRequest,
|
|
44
|
+
type CredentialProviderListResponse,
|
|
45
|
+
type CredentialProviderCreateParams,
|
|
46
|
+
type CredentialProviderUpdateParams,
|
|
47
|
+
} from './credential-providers';
|
|
37
48
|
export {
|
|
38
49
|
Credentials,
|
|
39
50
|
type CreateCredentialRequest,
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.28.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.28.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.28.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.28.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|