@onkernel/sdk 0.66.0 → 0.68.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 +39 -0
- package/client.d.mts +6 -3
- package/client.d.mts.map +1 -1
- package/client.d.ts +6 -3
- package/client.d.ts.map +1 -1
- package/client.js +6 -1
- package/client.js.map +1 -1
- package/client.mjs +6 -1
- package/client.mjs.map +1 -1
- package/core/pagination.d.mts.map +1 -1
- package/core/pagination.d.ts.map +1 -1
- package/core/pagination.js +16 -4
- package/core/pagination.js.map +1 -1
- package/core/pagination.mjs +16 -4
- package/core/pagination.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/api-keys.d.mts +48 -2
- package/resources/api-keys.d.mts.map +1 -1
- package/resources/api-keys.d.ts +48 -2
- package/resources/api-keys.d.ts.map +1 -1
- package/resources/api-keys.js +15 -2
- package/resources/api-keys.js.map +1 -1
- package/resources/api-keys.mjs +15 -2
- package/resources/api-keys.mjs.map +1 -1
- package/resources/auth/connections.d.mts +20 -20
- package/resources/auth/connections.d.ts +20 -20
- package/resources/browser-pools.d.mts +7 -7
- package/resources/browser-pools.d.ts +7 -7
- package/resources/browser-pools.js +1 -1
- package/resources/browser-pools.mjs +1 -1
- package/resources/browsers/browsers.d.mts +2 -2
- package/resources/browsers/browsers.d.ts +2 -2
- package/resources/credentials.d.mts +1 -2
- package/resources/credentials.d.mts.map +1 -1
- package/resources/credentials.d.ts +1 -2
- package/resources/credentials.d.ts.map +1 -1
- package/resources/credentials.js +1 -2
- package/resources/credentials.js.map +1 -1
- package/resources/credentials.mjs +1 -2
- package/resources/credentials.mjs.map +1 -1
- package/resources/extensions.d.mts +1 -1
- package/resources/extensions.d.ts +1 -1
- package/resources/extensions.js +1 -1
- package/resources/extensions.mjs +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/proxies.d.mts +3 -3
- package/resources/proxies.d.ts +3 -3
- package/resources/proxies.js +3 -3
- package/resources/proxies.mjs +3 -3
- package/src/client.ts +13 -0
- package/src/core/pagination.ts +18 -4
- package/src/resources/api-keys.ts +67 -2
- package/src/resources/auth/connections.ts +20 -20
- package/src/resources/browser-pools.ts +7 -7
- package/src/resources/browsers/browsers.ts +2 -2
- package/src/resources/credentials.ts +1 -2
- package/src/resources/extensions.ts +1 -1
- package/src/resources/index.ts +2 -0
- package/src/resources/proxies.ts +3 -3
- 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
|
@@ -34,8 +34,12 @@ export class APIKeys extends APIResource {
|
|
|
34
34
|
* const apiKey = await client.apiKeys.retrieve('id');
|
|
35
35
|
* ```
|
|
36
36
|
*/
|
|
37
|
-
retrieve(
|
|
38
|
-
|
|
37
|
+
retrieve(
|
|
38
|
+
id: string,
|
|
39
|
+
query: APIKeyRetrieveParams | null | undefined = {},
|
|
40
|
+
options?: RequestOptions,
|
|
41
|
+
): APIPromise<APIKey> {
|
|
42
|
+
return this._client.get(path`/org/api_keys/${id}`, { query, ...options });
|
|
39
43
|
}
|
|
40
44
|
|
|
41
45
|
/**
|
|
@@ -84,6 +88,24 @@ export class APIKeys extends APIResource {
|
|
|
84
88
|
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
85
89
|
});
|
|
86
90
|
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Rotate an API key. Issues a new key that copies the name and project of the
|
|
94
|
+
* rotated key, and schedules the rotated key to expire after a grace period so
|
|
95
|
+
* in-flight callers can swap over. The new plaintext key is returned once.
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* ```ts
|
|
99
|
+
* const createdAPIKey = await client.apiKeys.rotate('id');
|
|
100
|
+
* ```
|
|
101
|
+
*/
|
|
102
|
+
rotate(
|
|
103
|
+
id: string,
|
|
104
|
+
body: APIKeyRotateParams | null | undefined = {},
|
|
105
|
+
options?: RequestOptions,
|
|
106
|
+
): APIPromise<CreatedAPIKey> {
|
|
107
|
+
return this._client.post(path`/org/api_keys/${id}/rotate`, { body, ...options });
|
|
108
|
+
}
|
|
87
109
|
}
|
|
88
110
|
|
|
89
111
|
export type APIKeysOffsetPagination = OffsetPagination<APIKey>;
|
|
@@ -101,6 +123,12 @@ export interface APIKey {
|
|
|
101
123
|
|
|
102
124
|
created_by: APIKey.CreatedBy;
|
|
103
125
|
|
|
126
|
+
/**
|
|
127
|
+
* When the API key was deleted (soft-deleted). Null for keys that have not been
|
|
128
|
+
* deleted.
|
|
129
|
+
*/
|
|
130
|
+
deleted_at: string | null;
|
|
131
|
+
|
|
104
132
|
/**
|
|
105
133
|
* When the API key expires
|
|
106
134
|
*/
|
|
@@ -174,6 +202,14 @@ export interface APIKeyCreateParams {
|
|
|
174
202
|
project_id?: string | null;
|
|
175
203
|
}
|
|
176
204
|
|
|
205
|
+
export interface APIKeyRetrieveParams {
|
|
206
|
+
/**
|
|
207
|
+
* When true, return the API key even if it has been deleted (soft-deleted), for
|
|
208
|
+
* audit purposes. Defaults to false, which returns 404 for a deleted key.
|
|
209
|
+
*/
|
|
210
|
+
include_deleted?: boolean;
|
|
211
|
+
}
|
|
212
|
+
|
|
177
213
|
export interface APIKeyUpdateParams {
|
|
178
214
|
/**
|
|
179
215
|
* New API key name
|
|
@@ -182,6 +218,12 @@ export interface APIKeyUpdateParams {
|
|
|
182
218
|
}
|
|
183
219
|
|
|
184
220
|
export interface APIKeyListParams extends OffsetPaginationParams {
|
|
221
|
+
/**
|
|
222
|
+
* Deprecated: use status=all instead. When true, include deleted (soft-deleted)
|
|
223
|
+
* API keys in the results for audit purposes.
|
|
224
|
+
*/
|
|
225
|
+
include_deleted?: boolean;
|
|
226
|
+
|
|
185
227
|
/**
|
|
186
228
|
* Case-insensitive substring match against API key name, creator, and project. API
|
|
187
229
|
* key identifiers and masked keys match by exact value or prefix.
|
|
@@ -197,6 +239,27 @@ export interface APIKeyListParams extends OffsetPaginationParams {
|
|
|
197
239
|
* Sort direction for API keys.
|
|
198
240
|
*/
|
|
199
241
|
sort_direction?: 'asc' | 'desc';
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* Filter API keys by status. "active" returns keys that are not deleted (default;
|
|
245
|
+
* expired-but-not-deleted keys are still included), "deleted" returns only
|
|
246
|
+
* soft-deleted keys, "all" returns both.
|
|
247
|
+
*/
|
|
248
|
+
status?: 'active' | 'deleted' | 'all';
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
export interface APIKeyRotateParams {
|
|
252
|
+
/**
|
|
253
|
+
* Lifetime in days for the new key, up to 3650. Omit to reuse the rotated key's
|
|
254
|
+
* original lifetime, or never-expires if it had none.
|
|
255
|
+
*/
|
|
256
|
+
days_to_expire?: number | null;
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Grace period in days before the rotated key expires. Use 0 to expire it
|
|
260
|
+
* immediately. Omit for the default grace period of 7 days.
|
|
261
|
+
*/
|
|
262
|
+
expire_in_days?: number | null;
|
|
200
263
|
}
|
|
201
264
|
|
|
202
265
|
export declare namespace APIKeys {
|
|
@@ -205,7 +268,9 @@ export declare namespace APIKeys {
|
|
|
205
268
|
type CreatedAPIKey as CreatedAPIKey,
|
|
206
269
|
type APIKeysOffsetPagination as APIKeysOffsetPagination,
|
|
207
270
|
type APIKeyCreateParams as APIKeyCreateParams,
|
|
271
|
+
type APIKeyRetrieveParams as APIKeyRetrieveParams,
|
|
208
272
|
type APIKeyUpdateParams as APIKeyUpdateParams,
|
|
209
273
|
type APIKeyListParams as APIKeyListParams,
|
|
274
|
+
type APIKeyRotateParams as APIKeyRotateParams,
|
|
210
275
|
};
|
|
211
276
|
}
|
|
@@ -699,8 +699,8 @@ export interface ManagedAuthCreateRequest {
|
|
|
699
699
|
login_url?: string;
|
|
700
700
|
|
|
701
701
|
/**
|
|
702
|
-
* Proxy selection. Provide either id or name. The proxy must
|
|
703
|
-
*
|
|
702
|
+
* Proxy selection. Provide either id or name. The proxy must be in the same
|
|
703
|
+
* project as the resource referencing it.
|
|
704
704
|
*/
|
|
705
705
|
proxy?: ManagedAuthCreateRequest.Proxy;
|
|
706
706
|
|
|
@@ -748,8 +748,8 @@ export namespace ManagedAuthCreateRequest {
|
|
|
748
748
|
}
|
|
749
749
|
|
|
750
750
|
/**
|
|
751
|
-
* Proxy selection. Provide either id or name. The proxy must
|
|
752
|
-
*
|
|
751
|
+
* Proxy selection. Provide either id or name. The proxy must be in the same
|
|
752
|
+
* project as the resource referencing it.
|
|
753
753
|
*/
|
|
754
754
|
export interface Proxy {
|
|
755
755
|
/**
|
|
@@ -812,8 +812,8 @@ export interface ManagedAuthUpdateRequest {
|
|
|
812
812
|
login_url?: string;
|
|
813
813
|
|
|
814
814
|
/**
|
|
815
|
-
* Proxy selection. Provide either id or name. The proxy must
|
|
816
|
-
*
|
|
815
|
+
* Proxy selection. Provide either id or name. The proxy must be in the same
|
|
816
|
+
* project as the resource referencing it.
|
|
817
817
|
*/
|
|
818
818
|
proxy?: ManagedAuthUpdateRequest.Proxy;
|
|
819
819
|
|
|
@@ -859,8 +859,8 @@ export namespace ManagedAuthUpdateRequest {
|
|
|
859
859
|
}
|
|
860
860
|
|
|
861
861
|
/**
|
|
862
|
-
* Proxy selection. Provide either id or name. The proxy must
|
|
863
|
-
*
|
|
862
|
+
* Proxy selection. Provide either id or name. The proxy must be in the same
|
|
863
|
+
* project as the resource referencing it.
|
|
864
864
|
*/
|
|
865
865
|
export interface Proxy {
|
|
866
866
|
/**
|
|
@@ -1215,8 +1215,8 @@ export interface ConnectionCreateParams {
|
|
|
1215
1215
|
login_url?: string;
|
|
1216
1216
|
|
|
1217
1217
|
/**
|
|
1218
|
-
* Proxy selection. Provide either id or name. The proxy must
|
|
1219
|
-
*
|
|
1218
|
+
* Proxy selection. Provide either id or name. The proxy must be in the same
|
|
1219
|
+
* project as the resource referencing it.
|
|
1220
1220
|
*/
|
|
1221
1221
|
proxy?: ConnectionCreateParams.Proxy;
|
|
1222
1222
|
|
|
@@ -1264,8 +1264,8 @@ export namespace ConnectionCreateParams {
|
|
|
1264
1264
|
}
|
|
1265
1265
|
|
|
1266
1266
|
/**
|
|
1267
|
-
* Proxy selection. Provide either id or name. The proxy must
|
|
1268
|
-
*
|
|
1267
|
+
* Proxy selection. Provide either id or name. The proxy must be in the same
|
|
1268
|
+
* project as the resource referencing it.
|
|
1269
1269
|
*/
|
|
1270
1270
|
export interface Proxy {
|
|
1271
1271
|
/**
|
|
@@ -1325,8 +1325,8 @@ export interface ConnectionUpdateParams {
|
|
|
1325
1325
|
login_url?: string;
|
|
1326
1326
|
|
|
1327
1327
|
/**
|
|
1328
|
-
* Proxy selection. Provide either id or name. The proxy must
|
|
1329
|
-
*
|
|
1328
|
+
* Proxy selection. Provide either id or name. The proxy must be in the same
|
|
1329
|
+
* project as the resource referencing it.
|
|
1330
1330
|
*/
|
|
1331
1331
|
proxy?: ConnectionUpdateParams.Proxy;
|
|
1332
1332
|
|
|
@@ -1372,8 +1372,8 @@ export namespace ConnectionUpdateParams {
|
|
|
1372
1372
|
}
|
|
1373
1373
|
|
|
1374
1374
|
/**
|
|
1375
|
-
* Proxy selection. Provide either id or name. The proxy must
|
|
1376
|
-
*
|
|
1375
|
+
* Proxy selection. Provide either id or name. The proxy must be in the same
|
|
1376
|
+
* project as the resource referencing it.
|
|
1377
1377
|
*/
|
|
1378
1378
|
export interface Proxy {
|
|
1379
1379
|
/**
|
|
@@ -1402,8 +1402,8 @@ export interface ConnectionListParams extends OffsetPaginationParams {
|
|
|
1402
1402
|
|
|
1403
1403
|
export interface ConnectionLoginParams {
|
|
1404
1404
|
/**
|
|
1405
|
-
* Proxy selection. Provide either id or name. The proxy must
|
|
1406
|
-
*
|
|
1405
|
+
* Proxy selection. Provide either id or name. The proxy must be in the same
|
|
1406
|
+
* project as the resource referencing it.
|
|
1407
1407
|
*/
|
|
1408
1408
|
proxy?: ConnectionLoginParams.Proxy;
|
|
1409
1409
|
|
|
@@ -1416,8 +1416,8 @@ export interface ConnectionLoginParams {
|
|
|
1416
1416
|
|
|
1417
1417
|
export namespace ConnectionLoginParams {
|
|
1418
1418
|
/**
|
|
1419
|
-
* Proxy selection. Provide either id or name. The proxy must
|
|
1420
|
-
*
|
|
1419
|
+
* Proxy selection. Provide either id or name. The proxy must be in the same
|
|
1420
|
+
* project as the resource referencing it.
|
|
1421
1421
|
*/
|
|
1422
1422
|
export interface Proxy {
|
|
1423
1423
|
/**
|
|
@@ -57,7 +57,7 @@ export class BrowserPools extends APIResource {
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
/**
|
|
60
|
-
* List browser pools
|
|
60
|
+
* List browser pools in the resolved project.
|
|
61
61
|
*
|
|
62
62
|
* @example
|
|
63
63
|
* ```ts
|
|
@@ -241,8 +241,8 @@ export namespace BrowserPool {
|
|
|
241
241
|
profile?: Shared.BrowserProfile;
|
|
242
242
|
|
|
243
243
|
/**
|
|
244
|
-
* Optional proxy to associate to the browser session. Must reference a proxy
|
|
245
|
-
*
|
|
244
|
+
* Optional proxy to associate to the browser session. Must reference a proxy in
|
|
245
|
+
* the same project as the browser session.
|
|
246
246
|
*/
|
|
247
247
|
proxy_id?: string;
|
|
248
248
|
|
|
@@ -467,8 +467,8 @@ export interface BrowserPoolCreateParams {
|
|
|
467
467
|
profile?: Shared.BrowserProfile;
|
|
468
468
|
|
|
469
469
|
/**
|
|
470
|
-
* Optional proxy to associate to the browser session. Must reference a proxy
|
|
471
|
-
*
|
|
470
|
+
* Optional proxy to associate to the browser session. Must reference a proxy in
|
|
471
|
+
* the same project as the browser session.
|
|
472
472
|
*/
|
|
473
473
|
proxy_id?: string;
|
|
474
474
|
|
|
@@ -559,8 +559,8 @@ export interface BrowserPoolUpdateParams {
|
|
|
559
559
|
profile?: Shared.BrowserProfile;
|
|
560
560
|
|
|
561
561
|
/**
|
|
562
|
-
* Optional proxy to associate to the browser session. Must reference a proxy
|
|
563
|
-
*
|
|
562
|
+
* Optional proxy to associate to the browser session. Must reference a proxy in
|
|
563
|
+
* the same project as the browser session.
|
|
564
564
|
*/
|
|
565
565
|
proxy_id?: string;
|
|
566
566
|
|
|
@@ -941,8 +941,8 @@ export interface BrowserCreateParams {
|
|
|
941
941
|
profile?: Shared.BrowserProfile;
|
|
942
942
|
|
|
943
943
|
/**
|
|
944
|
-
* Optional proxy to associate to the browser session. Must reference a proxy
|
|
945
|
-
*
|
|
944
|
+
* Optional proxy to associate to the browser session. Must reference a proxy in
|
|
945
|
+
* the same project as the browser session.
|
|
946
946
|
*/
|
|
947
947
|
proxy_id?: string;
|
|
948
948
|
|
|
@@ -60,8 +60,7 @@ export class Credentials extends APIResource {
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
/**
|
|
63
|
-
* List credentials
|
|
64
|
-
* returned.
|
|
63
|
+
* List credentials in the resolved project. Credential values are not returned.
|
|
65
64
|
*
|
|
66
65
|
* @example
|
|
67
66
|
* ```ts
|
package/src/resources/index.ts
CHANGED
package/src/resources/proxies.ts
CHANGED
|
@@ -12,21 +12,21 @@ import { path } from '../internal/utils/path';
|
|
|
12
12
|
*/
|
|
13
13
|
export class Proxies extends APIResource {
|
|
14
14
|
/**
|
|
15
|
-
* Create a new proxy configuration
|
|
15
|
+
* Create a new proxy configuration in the resolved project.
|
|
16
16
|
*/
|
|
17
17
|
create(body: ProxyCreateParams, options?: RequestOptions): APIPromise<ProxyCreateResponse> {
|
|
18
18
|
return this._client.post('/proxies', { body, ...options });
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
|
-
* Retrieve a proxy
|
|
22
|
+
* Retrieve a proxy in the resolved project by ID.
|
|
23
23
|
*/
|
|
24
24
|
retrieve(id: string, options?: RequestOptions): APIPromise<ProxyRetrieveResponse> {
|
|
25
25
|
return this._client.get(path`/proxies/${id}`, options);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
* List proxies
|
|
29
|
+
* List proxies in the resolved project.
|
|
30
30
|
*/
|
|
31
31
|
list(
|
|
32
32
|
query: ProxyListParams | null | undefined = {},
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.68.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.68.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.68.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.68.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|