@onkernel/sdk 0.100.0 → 0.102.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 +30 -0
- package/client.d.mts +3 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +3 -0
- 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/lib/browser-routing.d.mts.map +1 -1
- package/lib/browser-routing.d.ts.map +1 -1
- package/lib/browser-routing.js +23 -6
- package/lib/browser-routing.js.map +1 -1
- package/lib/browser-routing.mjs +23 -6
- package/lib/browser-routing.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/auth/connections.d.mts +6 -0
- package/resources/auth/connections.d.mts.map +1 -1
- package/resources/auth/connections.d.ts +6 -0
- package/resources/auth/connections.d.ts.map +1 -1
- package/resources/browsers/computer.d.mts +6 -2
- package/resources/browsers/computer.d.mts.map +1 -1
- package/resources/browsers/computer.d.ts +6 -2
- package/resources/browsers/computer.d.ts.map +1 -1
- package/resources/browsers/telemetry.d.mts +4 -3
- package/resources/browsers/telemetry.d.mts.map +1 -1
- package/resources/browsers/telemetry.d.ts +4 -3
- package/resources/browsers/telemetry.d.ts.map +1 -1
- package/resources/config-registry/config-registry.d.mts +58 -8
- package/resources/config-registry/config-registry.d.mts.map +1 -1
- package/resources/config-registry/config-registry.d.ts +58 -8
- package/resources/config-registry/config-registry.d.ts.map +1 -1
- package/resources/config-registry/config-registry.js.map +1 -1
- package/resources/config-registry/config-registry.mjs.map +1 -1
- package/resources/index.d.mts +1 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -0
- 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/resources/invocations.d.mts +44 -15
- package/resources/invocations.d.mts.map +1 -1
- package/resources/invocations.d.ts +44 -15
- package/resources/invocations.d.ts.map +1 -1
- package/resources/organization/entitlements.d.mts +20 -0
- package/resources/organization/entitlements.d.mts.map +1 -1
- package/resources/organization/entitlements.d.ts +20 -0
- package/resources/organization/entitlements.d.ts.map +1 -1
- package/resources/organization/limits.d.mts +10 -1
- package/resources/organization/limits.d.mts.map +1 -1
- package/resources/organization/limits.d.ts +10 -1
- package/resources/organization/limits.d.ts.map +1 -1
- package/resources/organization/limits.js +1 -1
- package/resources/organization/limits.mjs +1 -1
- package/resources/proxies.d.mts +36 -18
- package/resources/proxies.d.mts.map +1 -1
- package/resources/proxies.d.ts +36 -18
- package/resources/proxies.d.ts.map +1 -1
- package/resources/vault-provider-configs.d.mts +179 -0
- package/resources/vault-provider-configs.d.mts.map +1 -0
- package/resources/vault-provider-configs.d.ts +179 -0
- package/resources/vault-provider-configs.d.ts.map +1 -0
- package/resources/vault-provider-configs.js +99 -0
- package/resources/vault-provider-configs.js.map +1 -0
- package/resources/vault-provider-configs.mjs +95 -0
- package/resources/vault-provider-configs.mjs.map +1 -0
- package/resources/vaults/index.d.mts +1 -1
- package/resources/vaults/index.d.mts.map +1 -1
- package/resources/vaults/index.d.ts +1 -1
- package/resources/vaults/index.d.ts.map +1 -1
- package/resources/vaults/index.js.map +1 -1
- package/resources/vaults/index.mjs.map +1 -1
- package/resources/vaults/items.d.mts +662 -36
- package/resources/vaults/items.d.mts.map +1 -1
- package/resources/vaults/items.d.ts +662 -36
- package/resources/vaults/items.d.ts.map +1 -1
- package/resources/vaults/items.js +99 -6
- package/resources/vaults/items.js.map +1 -1
- package/resources/vaults/items.mjs +99 -6
- package/resources/vaults/items.mjs.map +1 -1
- package/resources/vaults/vaults.d.mts +33 -4
- package/resources/vaults/vaults.d.mts.map +1 -1
- package/resources/vaults/vaults.d.ts +33 -4
- package/resources/vaults/vaults.d.ts.map +1 -1
- package/resources/vaults/vaults.js +31 -2
- package/resources/vaults/vaults.js.map +1 -1
- package/resources/vaults/vaults.mjs +31 -2
- package/resources/vaults/vaults.mjs.map +1 -1
- package/src/client.ts +19 -0
- package/src/lib/browser-routing.ts +27 -6
- package/src/resources/auth/connections.ts +7 -0
- package/src/resources/browsers/computer.ts +6 -2
- package/src/resources/browsers/telemetry.ts +5 -2
- package/src/resources/config-registry/config-registry.ts +71 -8
- package/src/resources/index.ts +8 -0
- package/src/resources/invocations.ts +44 -15
- package/src/resources/organization/entitlements.ts +23 -0
- package/src/resources/organization/limits.ts +12 -1
- package/src/resources/proxies.ts +36 -18
- package/src/resources/vault-provider-configs.ts +250 -0
- package/src/resources/vaults/index.ts +9 -0
- package/src/resources/vaults/items.ts +818 -35
- package/src/resources/vaults/vaults.ts +49 -2
- 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
|
@@ -12,18 +12,38 @@ export class Vaults extends APIResource {
|
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* Get a vault
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* const vault = await client.vaults.retrieve('id_or_name');
|
|
19
|
+
* ```
|
|
15
20
|
*/
|
|
16
21
|
retrieve(idOrName, options) {
|
|
17
22
|
return this._client.get(path `/vaults/${idOrName}`, options);
|
|
18
23
|
}
|
|
19
24
|
/**
|
|
20
25
|
* List vaults in the current project
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* // Automatically fetches more pages as needed.
|
|
30
|
+
* for await (const vault of client.vaults.list()) {
|
|
31
|
+
* // ...
|
|
32
|
+
* }
|
|
33
|
+
* ```
|
|
21
34
|
*/
|
|
22
35
|
list(query = {}, options) {
|
|
23
36
|
return this._client.getAPIList('/vaults', (OffsetPagination), { query, ...options });
|
|
24
37
|
}
|
|
25
38
|
/**
|
|
26
|
-
*
|
|
39
|
+
* Unresolved payment operations block deletion. Reconcile the original attempt
|
|
40
|
+
* with the provider or support first; deleting or recreating an item is not proof
|
|
41
|
+
* that a payment did not occur.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```ts
|
|
45
|
+
* await client.vaults.delete('id_or_name');
|
|
46
|
+
* ```
|
|
27
47
|
*/
|
|
28
48
|
delete(idOrName, options) {
|
|
29
49
|
return this._client.delete(path `/vaults/${idOrName}`, {
|
|
@@ -32,7 +52,16 @@ export class Vaults extends APIResource {
|
|
|
32
52
|
});
|
|
33
53
|
}
|
|
34
54
|
/**
|
|
35
|
-
*
|
|
55
|
+
* Free organizations can store up to 3 non-deleted vaults across all projects.
|
|
56
|
+
* Paid plans and active trials have no vault cap. Retrieving an existing vault by
|
|
57
|
+
* name succeeds even at the limit.
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```ts
|
|
61
|
+
* const vault = await client.vaults.upsert({
|
|
62
|
+
* name: 'checkout',
|
|
63
|
+
* });
|
|
64
|
+
* ```
|
|
36
65
|
*/
|
|
37
66
|
upsert(body, options) {
|
|
38
67
|
return this._client.post('/vaults', { body, ...options });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vaults.mjs","sourceRoot":"","sources":["../../src/resources/vaults/vaults.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,QAAQ,oBAAgB;AACpC,OAAO,
|
|
1
|
+
{"version":3,"file":"vaults.mjs","sourceRoot":"","sources":["../../src/resources/vaults/vaults.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,QAAQ,oBAAgB;AACpC,OAAO,EAgBL,KAAK,GAaN,oBAAgB;AAEjB,OAAO,EAAE,gBAAgB,EAA4C,kCAA8B;AACnG,OAAO,EAAE,YAAY,EAAE,mCAA+B;AAEtD,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD,MAAM,OAAO,MAAO,SAAQ,WAAW;IAAvC;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAgE3D,CAAC;IA9DC;;;;;;;OAOG;IACH,QAAQ,CAAC,QAAgB,EAAE,OAAwB;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,WAAW,QAAQ,EAAE,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;IAED;;;;;;;;;;OAUG;IACH,IAAI,CACF,QAA4C,EAAE,EAC9C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE,CAAA,gBAAuB,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5F,CAAC;IAED;;;;;;;;;OASG;IACH,MAAM,CAAC,QAAgB,EAAE,OAAwB;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,WAAW,QAAQ,EAAE,EAAE;YACpD,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;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,IAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5D,CAAC;CACF;AA0BD,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC"}
|
package/src/client.ts
CHANGED
|
@@ -136,6 +136,14 @@ import {
|
|
|
136
136
|
ProxyUpdateParams,
|
|
137
137
|
ProxyUpdateResponse,
|
|
138
138
|
} from './resources/proxies';
|
|
139
|
+
import {
|
|
140
|
+
VaultProviderConfig,
|
|
141
|
+
VaultProviderConfigCreateParams,
|
|
142
|
+
VaultProviderConfigListParams,
|
|
143
|
+
VaultProviderConfigUpdateParams,
|
|
144
|
+
VaultProviderConfigs,
|
|
145
|
+
VaultProviderConfigsOffsetPagination,
|
|
146
|
+
} from './resources/vault-provider-configs';
|
|
139
147
|
import {
|
|
140
148
|
AuditLogEntriesPageTokenPagination,
|
|
141
149
|
AuditLogEntry,
|
|
@@ -1067,6 +1075,7 @@ export class Kernel {
|
|
|
1067
1075
|
* Create and manage browser pools for acquiring and releasing browsers.
|
|
1068
1076
|
*/
|
|
1069
1077
|
browserPools: API.BrowserPools = new API.BrowserPools(this);
|
|
1078
|
+
vaultProviderConfigs: API.VaultProviderConfigs = new API.VaultProviderConfigs(this);
|
|
1070
1079
|
vaults: API.Vaults = new API.Vaults(this);
|
|
1071
1080
|
/**
|
|
1072
1081
|
* Create and manage credentials for authentication.
|
|
@@ -1105,6 +1114,7 @@ Kernel.Telemetry = Telemetry;
|
|
|
1105
1114
|
Kernel.Proxies = Proxies;
|
|
1106
1115
|
Kernel.Extensions = Extensions;
|
|
1107
1116
|
Kernel.BrowserPools = BrowserPools;
|
|
1117
|
+
Kernel.VaultProviderConfigs = VaultProviderConfigs;
|
|
1108
1118
|
Kernel.Vaults = Vaults;
|
|
1109
1119
|
Kernel.Credentials = Credentials;
|
|
1110
1120
|
Kernel.Projects = Projects;
|
|
@@ -1263,6 +1273,15 @@ export declare namespace Kernel {
|
|
|
1263
1273
|
type BrowserPoolReleaseParams as BrowserPoolReleaseParams,
|
|
1264
1274
|
};
|
|
1265
1275
|
|
|
1276
|
+
export {
|
|
1277
|
+
VaultProviderConfigs as VaultProviderConfigs,
|
|
1278
|
+
type VaultProviderConfig as VaultProviderConfig,
|
|
1279
|
+
type VaultProviderConfigsOffsetPagination as VaultProviderConfigsOffsetPagination,
|
|
1280
|
+
type VaultProviderConfigCreateParams as VaultProviderConfigCreateParams,
|
|
1281
|
+
type VaultProviderConfigUpdateParams as VaultProviderConfigUpdateParams,
|
|
1282
|
+
type VaultProviderConfigListParams as VaultProviderConfigListParams,
|
|
1283
|
+
};
|
|
1284
|
+
|
|
1266
1285
|
export {
|
|
1267
1286
|
Vaults as Vaults,
|
|
1268
1287
|
type Vault as Vault,
|
|
@@ -47,6 +47,8 @@ const DEFAULT_BROWSER_ROUTING_SUBRESOURCES = [
|
|
|
47
47
|
'computer',
|
|
48
48
|
'playwright',
|
|
49
49
|
'process',
|
|
50
|
+
'fs',
|
|
51
|
+
'logs/stream',
|
|
50
52
|
];
|
|
51
53
|
const BROWSER_ROUTE_CACHEABLE_PATH = /^\/(?:v\d+\/)?browsers(?:\/[^/]+)?\/?$/;
|
|
52
54
|
const BROWSER_POOL_ACQUIRE_PATH = /^\/(?:v\d+\/)?browser_pools\/[^/]+\/acquire\/?$/;
|
|
@@ -278,9 +280,13 @@ async function routeRequest(
|
|
|
278
280
|
|
|
279
281
|
const headers = new Headers(request.headers);
|
|
280
282
|
headers.delete('authorization');
|
|
283
|
+
const body = requestBodyForFetch(request, init);
|
|
281
284
|
const routed = await innerFetch(target.toString(), buildRoutedInit(input, request, init, headers));
|
|
282
285
|
if ((routed.status === 401 || routed.status === 403) && target.searchParams.get('jwt')) {
|
|
283
286
|
cache.deleteIfJwt(sessionId, target.searchParams.get('jwt') ?? '');
|
|
287
|
+
if (isStreamingBody(body)) {
|
|
288
|
+
return routed;
|
|
289
|
+
}
|
|
284
290
|
await CancelReadableStream(routed.body);
|
|
285
291
|
return innerFetch(input, init);
|
|
286
292
|
}
|
|
@@ -294,6 +300,14 @@ function buildRoutedInit(
|
|
|
294
300
|
headers: Headers,
|
|
295
301
|
): RequestInit {
|
|
296
302
|
const method = request.method.toUpperCase();
|
|
303
|
+
const body = method === 'GET' || method === 'HEAD' ? undefined : requestBodyForFetch(request, originalInit);
|
|
304
|
+
if (derivesOwnContentType(body) && !new Headers(originalInit?.headers).get('content-type')) {
|
|
305
|
+
// `request` was constructed from the same body, so its content-type carries
|
|
306
|
+
// that construction's multipart boundary. The routed fetch re-encodes the
|
|
307
|
+
// body with a new boundary, so let it derive the header again.
|
|
308
|
+
headers.delete('content-type');
|
|
309
|
+
}
|
|
310
|
+
|
|
297
311
|
const routedInit = {
|
|
298
312
|
...((originalInit ?? {}) as Record<string, unknown>),
|
|
299
313
|
method,
|
|
@@ -305,14 +319,13 @@ function buildRoutedInit(
|
|
|
305
319
|
delete routedInit['body'];
|
|
306
320
|
delete routedInit['duplex'];
|
|
307
321
|
|
|
322
|
+
if (body !== undefined) {
|
|
323
|
+
routedInit.body = body;
|
|
324
|
+
}
|
|
308
325
|
if (method !== 'GET' && method !== 'HEAD') {
|
|
309
|
-
const body = requestBodyForFetch(request, originalInit);
|
|
310
|
-
if (body !== undefined) {
|
|
311
|
-
routedInit.body = body;
|
|
312
|
-
}
|
|
313
326
|
if (originalInit?.duplex !== undefined) {
|
|
314
327
|
routedInit.duplex = originalInit.duplex;
|
|
315
|
-
} else if (
|
|
328
|
+
} else if (isStreamingBody(body)) {
|
|
316
329
|
routedInit.duplex = 'half';
|
|
317
330
|
}
|
|
318
331
|
}
|
|
@@ -331,7 +344,15 @@ function requestBodyForFetch(
|
|
|
331
344
|
return request.body ?? undefined;
|
|
332
345
|
}
|
|
333
346
|
|
|
334
|
-
function
|
|
347
|
+
function derivesOwnContentType(body: RequestInit['body'] | undefined): boolean {
|
|
348
|
+
return (
|
|
349
|
+
((globalThis as any).FormData && body instanceof (globalThis as any).FormData) ||
|
|
350
|
+
((globalThis as any).URLSearchParams && body instanceof (globalThis as any).URLSearchParams) ||
|
|
351
|
+
((globalThis as any).Blob && body instanceof (globalThis as any).Blob)
|
|
352
|
+
);
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
function isStreamingBody(body: RequestInit['body'] | undefined): boolean {
|
|
335
356
|
return (
|
|
336
357
|
((globalThis as any).ReadableStream && body instanceof (globalThis as any).ReadableStream) ||
|
|
337
358
|
(typeof body === 'object' && body !== null && Symbol.asyncIterator in body)
|
|
@@ -904,6 +904,13 @@ export interface ManagedAuthBrowserConfig {
|
|
|
904
904
|
*/
|
|
905
905
|
proxy?: BrowsersAPI.BrowserProxyConfig;
|
|
906
906
|
|
|
907
|
+
/**
|
|
908
|
+
* Browser region. Omit on create to use us-east, on update to keep the current
|
|
909
|
+
* region, or on login to inherit it. Login overrides apply only to that login.
|
|
910
|
+
* Non-default regions require an eligible plan and organization access.
|
|
911
|
+
*/
|
|
912
|
+
region?: 'us-east' | 'eu-west' | 'ap-southeast';
|
|
913
|
+
|
|
907
914
|
/**
|
|
908
915
|
* Whether managed auth browser sessions use stealth mode. Defaults to true when
|
|
909
916
|
* omitted.
|
|
@@ -439,7 +439,9 @@ export namespace ComputerBatchParams {
|
|
|
439
439
|
* List of key symbols to press. Each item should be a key symbol supported by
|
|
440
440
|
* xdotool (see X11 keysym definitions). Examples include "Return", "Shift",
|
|
441
441
|
* "Ctrl", "Alt", "F5". Items in this list could also be combinations, e.g.
|
|
442
|
-
* "Ctrl+t" or "Ctrl+Shift+Tab".
|
|
442
|
+
* "Ctrl+t" or "Ctrl+Shift+Tab". Use X11 names for punctuation in combinations,
|
|
443
|
+
* such as "Ctrl+minus" or "Ctrl+plus". A literal hyphen is also accepted as an
|
|
444
|
+
* alias, so "Ctrl+-" is normalized to "Ctrl+minus".
|
|
443
445
|
*/
|
|
444
446
|
keys: Array<string>;
|
|
445
447
|
|
|
@@ -654,7 +656,9 @@ export interface ComputerPressKeyParams {
|
|
|
654
656
|
* List of key symbols to press. Each item should be a key symbol supported by
|
|
655
657
|
* xdotool (see X11 keysym definitions). Examples include "Return", "Shift",
|
|
656
658
|
* "Ctrl", "Alt", "F5". Items in this list could also be combinations, e.g.
|
|
657
|
-
* "Ctrl+t" or "Ctrl+Shift+Tab".
|
|
659
|
+
* "Ctrl+t" or "Ctrl+Shift+Tab". Use X11 names for punctuation in combinations,
|
|
660
|
+
* such as "Ctrl+minus" or "Ctrl+plus". A literal hyphen is also accepted as an
|
|
661
|
+
* alias, so "Ctrl+-" is normalized to "Ctrl+minus".
|
|
658
662
|
*/
|
|
659
663
|
keys: Array<string>;
|
|
660
664
|
|
|
@@ -4338,13 +4338,16 @@ export namespace BrowserProxyErrorEvent {
|
|
|
4338
4338
|
* Proxy-layer error code: the X-Kernel-Proxy-Error response header value from a
|
|
4339
4339
|
* branded 5xx error page served by the metro egress host-proxy. Values mirror what
|
|
4340
4340
|
* the proxy emits: destination_blocked, provider_blacklisted,
|
|
4341
|
-
* provider_unreachable,
|
|
4342
|
-
* upstream_connect_failed. Unknown header
|
|
4341
|
+
* provider_unreachable, provider_rejected, origin_tls_timeout, proxy_unavailable,
|
|
4342
|
+
* upstream_timeout, upstream_dns_failure, upstream_connect_failed. Unknown header
|
|
4343
|
+
* values are dropped.
|
|
4343
4344
|
*/
|
|
4344
4345
|
code:
|
|
4345
4346
|
| 'destination_blocked'
|
|
4346
4347
|
| 'provider_blacklisted'
|
|
4347
4348
|
| 'provider_unreachable'
|
|
4349
|
+
| 'provider_rejected'
|
|
4350
|
+
| 'origin_tls_timeout'
|
|
4348
4351
|
| 'proxy_unavailable'
|
|
4349
4352
|
| 'upstream_timeout'
|
|
4350
4353
|
| 'upstream_dns_failure'
|
|
@@ -85,8 +85,13 @@ export interface Analysis {
|
|
|
85
85
|
created_at: string;
|
|
86
86
|
|
|
87
87
|
/**
|
|
88
|
-
*
|
|
89
|
-
|
|
88
|
+
* Deadline after which a still-running analysis becomes expired.
|
|
89
|
+
*/
|
|
90
|
+
expires_at: string;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Present for failed, canceled, or expired analyses. Messages contain safe retry
|
|
94
|
+
* guidance rather than internal workflow errors.
|
|
90
95
|
*/
|
|
91
96
|
failure: Shared.ErrorModel | null;
|
|
92
97
|
|
|
@@ -98,7 +103,7 @@ export interface Analysis {
|
|
|
98
103
|
/**
|
|
99
104
|
* Lifecycle status of a background analysis.
|
|
100
105
|
*/
|
|
101
|
-
status: 'running' | 'completed' | 'failed' | 'canceled';
|
|
106
|
+
status: 'running' | 'completed' | 'failed' | 'canceled' | 'expired';
|
|
102
107
|
}
|
|
103
108
|
|
|
104
109
|
export interface AnalysisSummary {
|
|
@@ -147,6 +152,28 @@ export interface ConfigRegistryResponse {
|
|
|
147
152
|
recommendation: RecommendationResult | null;
|
|
148
153
|
|
|
149
154
|
target: Target;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Short advisory markdown to facilitate navigating this target. Returned even when
|
|
158
|
+
* no configuration reached the target, since knowing what prevented success is
|
|
159
|
+
* useful without a configuration. Not verified against this target. Null when
|
|
160
|
+
* nothing applicable was observed or no notes exist.
|
|
161
|
+
*/
|
|
162
|
+
guidance?: string | null;
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* How far the workload pass got, when an intent was supplied and a pass ran. A run
|
|
166
|
+
* outcome rather than advice, so it is reported whether or not any guidance could
|
|
167
|
+
* be assembled. Null when no intent was supplied or no pass ran.
|
|
168
|
+
*/
|
|
169
|
+
workload_outcome?:
|
|
170
|
+
| 'completed'
|
|
171
|
+
| 'turn_limit'
|
|
172
|
+
| 'auth_required'
|
|
173
|
+
| 'payment_required'
|
|
174
|
+
| 'blocked'
|
|
175
|
+
| 'error'
|
|
176
|
+
| null;
|
|
150
177
|
}
|
|
151
178
|
|
|
152
179
|
export interface Evidence {
|
|
@@ -196,9 +223,20 @@ export interface LookupRequest {
|
|
|
196
223
|
}
|
|
197
224
|
|
|
198
225
|
export interface LookupResponse {
|
|
199
|
-
|
|
226
|
+
/**
|
|
227
|
+
* A recommendation or a structured no-recommendation result.
|
|
228
|
+
*/
|
|
229
|
+
recommendation: RecommendationResult | null;
|
|
200
230
|
|
|
201
231
|
target: Target;
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Short advisory markdown to facilitate navigating this target. Returned even when
|
|
235
|
+
* no configuration reached the target, since knowing what prevented success is
|
|
236
|
+
* useful without a configuration. Not verified against this target. Null when
|
|
237
|
+
* nothing applicable was observed or no notes exist.
|
|
238
|
+
*/
|
|
239
|
+
guidance?: string | null;
|
|
202
240
|
}
|
|
203
241
|
|
|
204
242
|
export interface NoRecommendation {
|
|
@@ -295,7 +333,8 @@ export namespace Proxy {
|
|
|
295
333
|
*/
|
|
296
334
|
export interface IspProxyConfig {
|
|
297
335
|
/**
|
|
298
|
-
* ISO 3166 country code.
|
|
336
|
+
* ISO 3166 country code. Supported countries are US, GB, FR, DE, and SG. Defaults
|
|
337
|
+
* to US if not provided.
|
|
299
338
|
*/
|
|
300
339
|
country?: string;
|
|
301
340
|
}
|
|
@@ -316,7 +355,8 @@ export namespace Proxy {
|
|
|
316
355
|
city?: string;
|
|
317
356
|
|
|
318
357
|
/**
|
|
319
|
-
* ISO 3166 country code.
|
|
358
|
+
* ISO 3166 country code. If omitted, the proxy uses the global pool without
|
|
359
|
+
* country targeting.
|
|
320
360
|
*/
|
|
321
361
|
country?: string;
|
|
322
362
|
|
|
@@ -346,7 +386,8 @@ export namespace Proxy {
|
|
|
346
386
|
city?: string;
|
|
347
387
|
|
|
348
388
|
/**
|
|
349
|
-
* ISO 3166 country code
|
|
389
|
+
* ISO 3166 country code. If omitted, the proxy uses the global pool without
|
|
390
|
+
* country targeting.
|
|
350
391
|
*/
|
|
351
392
|
country?: string;
|
|
352
393
|
|
|
@@ -438,7 +479,7 @@ export interface RecommendationSummary {
|
|
|
438
479
|
/**
|
|
439
480
|
* Lifecycle status of the most recently requested analysis for this exact target.
|
|
440
481
|
*/
|
|
441
|
-
analysis_status: 'running' | 'completed' | 'failed' | 'canceled';
|
|
482
|
+
analysis_status: 'running' | 'completed' | 'failed' | 'canceled' | 'expired';
|
|
442
483
|
|
|
443
484
|
/**
|
|
444
485
|
* Most recent time the selected project requested an analysis for this exact
|
|
@@ -482,6 +523,17 @@ export interface ResolveRequest {
|
|
|
482
523
|
* Kernel uses its default country selection.
|
|
483
524
|
*/
|
|
484
525
|
allowed_proxy_countries?: Array<string>;
|
|
526
|
+
|
|
527
|
+
/**
|
|
528
|
+
* Plain-language description of the workload you intend to run against this
|
|
529
|
+
* target, in a sentence or two. Requires an https target, because the pass treats
|
|
530
|
+
* any non-HTTPS destination as off-site and will not drive an http one. Kernel
|
|
531
|
+
* uses it to drive the browser further into the site, where it can observe
|
|
532
|
+
* protections that only appear once a session interacts. When this target already
|
|
533
|
+
* has a verified configuration, the run confirms that one instead of re-deriving
|
|
534
|
+
* the whole matrix, so supplying an intent narrows what can be recommended.
|
|
535
|
+
*/
|
|
536
|
+
intent?: string;
|
|
485
537
|
}
|
|
486
538
|
|
|
487
539
|
export interface Target {
|
|
@@ -538,6 +590,17 @@ export interface ConfigRegistryResolveParams {
|
|
|
538
590
|
* Kernel uses its default country selection.
|
|
539
591
|
*/
|
|
540
592
|
allowed_proxy_countries?: Array<string>;
|
|
593
|
+
|
|
594
|
+
/**
|
|
595
|
+
* Plain-language description of the workload you intend to run against this
|
|
596
|
+
* target, in a sentence or two. Requires an https target, because the pass treats
|
|
597
|
+
* any non-HTTPS destination as off-site and will not drive an http one. Kernel
|
|
598
|
+
* uses it to drive the browser further into the site, where it can observe
|
|
599
|
+
* protections that only appear once a session interacts. When this target already
|
|
600
|
+
* has a verified configuration, the run confirms that one instead of re-deriving
|
|
601
|
+
* the whole matrix, so supplying an intent narrows what can be recommended.
|
|
602
|
+
*/
|
|
603
|
+
intent?: string;
|
|
541
604
|
}
|
|
542
605
|
|
|
543
606
|
ConfigRegistry.Analyses = Analyses;
|
package/src/resources/index.ts
CHANGED
|
@@ -180,6 +180,14 @@ export {
|
|
|
180
180
|
type ProxyListResponsesOffsetPagination,
|
|
181
181
|
} from './proxies';
|
|
182
182
|
export { Telemetry } from './telemetry/telemetry';
|
|
183
|
+
export {
|
|
184
|
+
VaultProviderConfigs,
|
|
185
|
+
type VaultProviderConfig,
|
|
186
|
+
type VaultProviderConfigCreateParams,
|
|
187
|
+
type VaultProviderConfigUpdateParams,
|
|
188
|
+
type VaultProviderConfigListParams,
|
|
189
|
+
type VaultProviderConfigsOffsetPagination,
|
|
190
|
+
} from './vault-provider-configs';
|
|
183
191
|
export {
|
|
184
192
|
Vaults,
|
|
185
193
|
type Vault,
|
|
@@ -197,8 +197,8 @@ export namespace InvocationStateEvent {
|
|
|
197
197
|
finished_at?: string | null;
|
|
198
198
|
|
|
199
199
|
/**
|
|
200
|
-
*
|
|
201
|
-
*
|
|
200
|
+
* The action result or detailed failure output. Often a JSON-encoded value, but
|
|
201
|
+
* failures may contain plain text. May contain sensitive application data.
|
|
202
202
|
*/
|
|
203
203
|
output?: string;
|
|
204
204
|
|
|
@@ -208,7 +208,13 @@ export namespace InvocationStateEvent {
|
|
|
208
208
|
payload?: string;
|
|
209
209
|
|
|
210
210
|
/**
|
|
211
|
-
*
|
|
211
|
+
* A nonempty, customer-safe summary of the recorded failure output, always present
|
|
212
|
+
* when status is failed and omitted otherwise, including in the first failed
|
|
213
|
+
* invocation_state event. Recognized messages receive a specific summary; other
|
|
214
|
+
* failures receive a generic summary. Message matching does not establish whether
|
|
215
|
+
* the failure originated in the platform or action code. Does not include raw
|
|
216
|
+
* action output or internal error details. Available for historical invocations as
|
|
217
|
+
* well. Human-readable text, not a stable identifier for retry logic.
|
|
212
218
|
*/
|
|
213
219
|
status_reason?: string;
|
|
214
220
|
}
|
|
@@ -231,13 +237,18 @@ export interface InvocationCreateResponse {
|
|
|
231
237
|
status: 'queued' | 'running' | 'succeeded' | 'failed';
|
|
232
238
|
|
|
233
239
|
/**
|
|
234
|
-
* The
|
|
235
|
-
*
|
|
240
|
+
* The action result or detailed failure output. Often a JSON-encoded value, but
|
|
241
|
+
* failures may contain plain text. May contain sensitive application data.
|
|
236
242
|
*/
|
|
237
243
|
output?: string;
|
|
238
244
|
|
|
239
245
|
/**
|
|
240
|
-
*
|
|
246
|
+
* A nonempty, customer-safe summary of the recorded failure output, always present
|
|
247
|
+
* when status is failed and omitted otherwise. Recognized messages receive a
|
|
248
|
+
* specific summary; other failures receive a generic summary. Message matching
|
|
249
|
+
* does not establish whether the failure originated in the platform or action
|
|
250
|
+
* code. Does not include raw action output or internal error details.
|
|
251
|
+
* Human-readable text, not a stable identifier for retry logic.
|
|
241
252
|
*/
|
|
242
253
|
status_reason?: string;
|
|
243
254
|
}
|
|
@@ -280,8 +291,8 @@ export interface InvocationRetrieveResponse {
|
|
|
280
291
|
finished_at?: string | null;
|
|
281
292
|
|
|
282
293
|
/**
|
|
283
|
-
*
|
|
284
|
-
*
|
|
294
|
+
* The action result or detailed failure output. Often a JSON-encoded value, but
|
|
295
|
+
* failures may contain plain text. May contain sensitive application data.
|
|
285
296
|
*/
|
|
286
297
|
output?: string;
|
|
287
298
|
|
|
@@ -291,7 +302,13 @@ export interface InvocationRetrieveResponse {
|
|
|
291
302
|
payload?: string;
|
|
292
303
|
|
|
293
304
|
/**
|
|
294
|
-
*
|
|
305
|
+
* A nonempty, customer-safe summary of the recorded failure output, always present
|
|
306
|
+
* when status is failed and omitted otherwise, including in the first failed
|
|
307
|
+
* invocation_state event. Recognized messages receive a specific summary; other
|
|
308
|
+
* failures receive a generic summary. Message matching does not establish whether
|
|
309
|
+
* the failure originated in the platform or action code. Does not include raw
|
|
310
|
+
* action output or internal error details. Available for historical invocations as
|
|
311
|
+
* well. Human-readable text, not a stable identifier for retry logic.
|
|
295
312
|
*/
|
|
296
313
|
status_reason?: string;
|
|
297
314
|
}
|
|
@@ -334,8 +351,8 @@ export interface InvocationUpdateResponse {
|
|
|
334
351
|
finished_at?: string | null;
|
|
335
352
|
|
|
336
353
|
/**
|
|
337
|
-
*
|
|
338
|
-
*
|
|
354
|
+
* The action result or detailed failure output. Often a JSON-encoded value, but
|
|
355
|
+
* failures may contain plain text. May contain sensitive application data.
|
|
339
356
|
*/
|
|
340
357
|
output?: string;
|
|
341
358
|
|
|
@@ -345,7 +362,13 @@ export interface InvocationUpdateResponse {
|
|
|
345
362
|
payload?: string;
|
|
346
363
|
|
|
347
364
|
/**
|
|
348
|
-
*
|
|
365
|
+
* A nonempty, customer-safe summary of the recorded failure output, always present
|
|
366
|
+
* when status is failed and omitted otherwise, including in the first failed
|
|
367
|
+
* invocation_state event. Recognized messages receive a specific summary; other
|
|
368
|
+
* failures receive a generic summary. Message matching does not establish whether
|
|
369
|
+
* the failure originated in the platform or action code. Does not include raw
|
|
370
|
+
* action output or internal error details. Available for historical invocations as
|
|
371
|
+
* well. Human-readable text, not a stable identifier for retry logic.
|
|
349
372
|
*/
|
|
350
373
|
status_reason?: string;
|
|
351
374
|
}
|
|
@@ -388,8 +411,8 @@ export interface InvocationListResponse {
|
|
|
388
411
|
finished_at?: string | null;
|
|
389
412
|
|
|
390
413
|
/**
|
|
391
|
-
*
|
|
392
|
-
*
|
|
414
|
+
* The action result or detailed failure output. Often a JSON-encoded value, but
|
|
415
|
+
* failures may contain plain text. May contain sensitive application data.
|
|
393
416
|
*/
|
|
394
417
|
output?: string;
|
|
395
418
|
|
|
@@ -399,7 +422,13 @@ export interface InvocationListResponse {
|
|
|
399
422
|
payload?: string;
|
|
400
423
|
|
|
401
424
|
/**
|
|
402
|
-
*
|
|
425
|
+
* A nonempty, customer-safe summary of the recorded failure output, always present
|
|
426
|
+
* when status is failed and omitted otherwise, including in the first failed
|
|
427
|
+
* invocation_state event. Recognized messages receive a specific summary; other
|
|
428
|
+
* failures receive a generic summary. Message matching does not establish whether
|
|
429
|
+
* the failure originated in the platform or action code. Does not include raw
|
|
430
|
+
* action output or internal error details. Available for historical invocations as
|
|
431
|
+
* well. Human-readable text, not a stable identifier for retry logic.
|
|
403
432
|
*/
|
|
404
433
|
status_reason?: string;
|
|
405
434
|
}
|
|
@@ -57,6 +57,12 @@ export namespace OrgEntitlements {
|
|
|
57
57
|
profiles: Features.Profiles;
|
|
58
58
|
|
|
59
59
|
proxy_bypass_hosts: Features.ProxyBypassHosts;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Whether the organization can access vaults, using the same access check as vault
|
|
63
|
+
* API routes.
|
|
64
|
+
*/
|
|
65
|
+
vaults: Features.Vaults;
|
|
60
66
|
}
|
|
61
67
|
|
|
62
68
|
export namespace Features {
|
|
@@ -176,6 +182,17 @@ export namespace OrgEntitlements {
|
|
|
176
182
|
*/
|
|
177
183
|
enabled: boolean;
|
|
178
184
|
}
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Whether the organization can access vaults, using the same access check as vault
|
|
188
|
+
* API routes.
|
|
189
|
+
*/
|
|
190
|
+
export interface Vaults {
|
|
191
|
+
/**
|
|
192
|
+
* Whether the organization is entitled to use this feature.
|
|
193
|
+
*/
|
|
194
|
+
enabled: boolean;
|
|
195
|
+
}
|
|
179
196
|
}
|
|
180
197
|
|
|
181
198
|
export interface Limits {
|
|
@@ -195,6 +212,12 @@ export namespace OrgEntitlements {
|
|
|
195
212
|
* Effective organization-wide concurrent app invocation ceiling.
|
|
196
213
|
*/
|
|
197
214
|
max_concurrent_invocations: number;
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Maximum non-deleted vaults allowed org-wide across all projects. Null means
|
|
218
|
+
* unlimited. The vaults feature flag still controls access.
|
|
219
|
+
*/
|
|
220
|
+
max_vaults: number | null;
|
|
198
221
|
}
|
|
199
222
|
|
|
200
223
|
export interface Plan {
|
|
@@ -9,7 +9,7 @@ import { RequestOptions } from '../../internal/request-options';
|
|
|
9
9
|
*/
|
|
10
10
|
export class Limits extends APIResource {
|
|
11
11
|
/**
|
|
12
|
-
* Get the organization's effective limits and managed auth usage.
|
|
12
|
+
* Get the organization's effective limits and managed auth and vault usage.
|
|
13
13
|
*/
|
|
14
14
|
retrieve(options?: RequestOptions): APIPromise<OrgLimits> {
|
|
15
15
|
return this._client.get('/org/limits', options);
|
|
@@ -39,6 +39,12 @@ export interface OrgLimits {
|
|
|
39
39
|
*/
|
|
40
40
|
max_auth_connections: number | null;
|
|
41
41
|
|
|
42
|
+
/**
|
|
43
|
+
* Maximum non-deleted vaults allowed org-wide across all projects. Null means
|
|
44
|
+
* unlimited.
|
|
45
|
+
*/
|
|
46
|
+
max_vaults: number | null;
|
|
47
|
+
|
|
42
48
|
/**
|
|
43
49
|
* Smallest health_check_interval the organization's plan accepts on a managed auth
|
|
44
50
|
* connection. Requests below this are rejected with 400. Existing connections
|
|
@@ -46,6 +52,11 @@ export interface OrgLimits {
|
|
|
46
52
|
*/
|
|
47
53
|
min_health_check_interval_seconds: number;
|
|
48
54
|
|
|
55
|
+
/**
|
|
56
|
+
* Current non-deleted vault count across all projects in the organization.
|
|
57
|
+
*/
|
|
58
|
+
vaults_used: number;
|
|
59
|
+
|
|
49
60
|
/**
|
|
50
61
|
* Default maximum concurrent browsers applied to every project that has no
|
|
51
62
|
* explicit per-project override. Null means no org-level default, so such projects
|