@onkernel/sdk 0.88.0 → 0.90.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 +17 -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/package.json +1 -1
- package/resources/auth/connections.d.mts +42 -0
- package/resources/auth/connections.d.mts.map +1 -1
- package/resources/auth/connections.d.ts +42 -0
- package/resources/auth/connections.d.ts.map +1 -1
- package/resources/browser-pools.d.mts +40 -0
- package/resources/browser-pools.d.mts.map +1 -1
- package/resources/browser-pools.d.ts +40 -0
- package/resources/browser-pools.d.ts.map +1 -1
- package/resources/browsers/browsers.d.mts +81 -1
- package/resources/browsers/browsers.d.mts.map +1 -1
- package/resources/browsers/browsers.d.ts +81 -1
- 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/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/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/invocations.d.mts +9 -0
- package/resources/invocations.d.mts.map +1 -1
- package/resources/invocations.d.ts +9 -0
- package/resources/invocations.d.ts.map +1 -1
- package/resources/organization/limits.d.mts +18 -3
- package/resources/organization/limits.d.mts.map +1 -1
- package/resources/organization/limits.d.ts +18 -3
- package/resources/organization/limits.d.ts.map +1 -1
- package/resources/organization/limits.js +1 -3
- package/resources/organization/limits.js.map +1 -1
- package/resources/organization/limits.mjs +1 -3
- package/resources/organization/limits.mjs.map +1 -1
- package/resources/projects/limits.d.mts +4 -4
- package/resources/projects/limits.d.mts.map +1 -1
- package/resources/projects/limits.d.ts +4 -4
- package/resources/projects/limits.d.ts.map +1 -1
- package/resources/projects/limits.js +6 -6
- package/resources/projects/limits.js.map +1 -1
- package/resources/projects/limits.mjs +6 -6
- package/resources/projects/limits.mjs.map +1 -1
- package/resources/projects/projects.d.mts +12 -10
- package/resources/projects/projects.d.mts.map +1 -1
- package/resources/projects/projects.d.ts +12 -10
- package/resources/projects/projects.d.ts.map +1 -1
- package/resources/projects/projects.js +11 -9
- package/resources/projects/projects.js.map +1 -1
- package/resources/projects/projects.mjs +11 -9
- package/resources/projects/projects.mjs.map +1 -1
- package/src/client.ts +11 -0
- package/src/resources/auth/connections.ts +72 -0
- package/src/resources/browser-pools.ts +48 -0
- package/src/resources/browsers/browsers.ts +93 -0
- package/src/resources/browsers/index.ts +1 -0
- package/src/resources/index.ts +1 -0
- package/src/resources/invocations.ts +11 -0
- package/src/resources/organization/limits.ts +21 -3
- package/src/resources/projects/limits.ts +6 -6
- package/src/resources/projects/projects.ts +15 -13
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../src/resources/projects/projects.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,SAAS,oBAAiB;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,EAAE,aAAa,EAAE,0BAA0B,EAAE,oBAAiB;AAChG,OAAO,EAAE,UAAU,EAAE,kCAA+B;AACpD,OAAO,EAAE,gBAAgB,EAAE,KAAK,sBAAsB,EAAE,WAAW,EAAE,iCAA8B;AAEnG,OAAO,EAAE,cAAc,EAAE,0CAA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AAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;IAEF,OAAO,EACL,MAAM,IAAI,MAAM,EAChB,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
|
|
@@ -37,22 +37,24 @@ class Projects extends resource_1.APIResource {
|
|
|
37
37
|
*
|
|
38
38
|
* @example
|
|
39
39
|
* ```ts
|
|
40
|
-
* const project = await client.projects.retrieve(
|
|
40
|
+
* const project = await client.projects.retrieve(
|
|
41
|
+
* 'id_or_name',
|
|
42
|
+
* );
|
|
41
43
|
* ```
|
|
42
44
|
*/
|
|
43
|
-
retrieve(
|
|
44
|
-
return this._client.get((0, path_1.path) `/org/projects/${
|
|
45
|
+
retrieve(idOrName, options) {
|
|
46
|
+
return this._client.get((0, path_1.path) `/org/projects/${idOrName}`, options);
|
|
45
47
|
}
|
|
46
48
|
/**
|
|
47
49
|
* Update a project's name or status.
|
|
48
50
|
*
|
|
49
51
|
* @example
|
|
50
52
|
* ```ts
|
|
51
|
-
* const project = await client.projects.update('
|
|
53
|
+
* const project = await client.projects.update('id_or_name');
|
|
52
54
|
* ```
|
|
53
55
|
*/
|
|
54
|
-
update(
|
|
55
|
-
return this._client.patch((0, path_1.path) `/org/projects/${
|
|
56
|
+
update(idOrName, body, options) {
|
|
57
|
+
return this._client.patch((0, path_1.path) `/org/projects/${idOrName}`, { body, ...options });
|
|
56
58
|
}
|
|
57
59
|
/**
|
|
58
60
|
* List projects for the authenticated organization.
|
|
@@ -73,11 +75,11 @@ class Projects extends resource_1.APIResource {
|
|
|
73
75
|
*
|
|
74
76
|
* @example
|
|
75
77
|
* ```ts
|
|
76
|
-
* await client.projects.delete('
|
|
78
|
+
* await client.projects.delete('id_or_name');
|
|
77
79
|
* ```
|
|
78
80
|
*/
|
|
79
|
-
delete(
|
|
80
|
-
return this._client.delete((0, path_1.path) `/org/projects/${
|
|
81
|
+
delete(idOrName, options) {
|
|
82
|
+
return this._client.delete((0, path_1.path) `/org/projects/${idOrName}`, {
|
|
81
83
|
...options,
|
|
82
84
|
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
83
85
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projects.js","sourceRoot":"","sources":["../../src/resources/projects/projects.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,+DAAsC;AACtC,wCAAgG;AAEhG,yDAAmG;AACnG,uDAAsD;AAEtD,uDAAiD;AAEjD;;;;GAIG;AACH,MAAa,QAAS,SAAQ,sBAAW;IAAzC;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"projects.js","sourceRoot":"","sources":["../../src/resources/projects/projects.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,+DAAsC;AACtC,wCAAgG;AAEhG,yDAAmG;AACnG,uDAAsD;AAEtD,uDAAiD;AAEjD;;;;GAIG;AACH,MAAa,QAAS,SAAQ,sBAAW;IAAzC;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IA0EhE,CAAC;IAxEC;;;;;;;;;OASG;IACH,MAAM,CAAC,IAAyB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClE,CAAC;IAED;;;;;;;;;OASG;IACH,QAAQ,CAAC,QAAgB,EAAE,OAAwB;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,iBAAiB,QAAQ,EAAE,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,QAAgB,EAAE,IAAyB,EAAE,OAAwB;QAC1E,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,iBAAiB,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnF,CAAC;IAED;;;;;;;;;;OAUG;IACH,IAAI,CACF,QAA8C,EAAE,EAChD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,eAAe,EAAE,CAAA,6BAAyB,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpG,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,QAAgB,EAAE,OAAwB;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,iBAAiB,QAAQ,EAAE,EAAE;YAC1D,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF;AA3ED,4BA2EC;AAkFD,QAAQ,CAAC,MAAM,GAAG,eAAM,CAAC"}
|
|
@@ -33,22 +33,24 @@ export class Projects extends APIResource {
|
|
|
33
33
|
*
|
|
34
34
|
* @example
|
|
35
35
|
* ```ts
|
|
36
|
-
* const project = await client.projects.retrieve(
|
|
36
|
+
* const project = await client.projects.retrieve(
|
|
37
|
+
* 'id_or_name',
|
|
38
|
+
* );
|
|
37
39
|
* ```
|
|
38
40
|
*/
|
|
39
|
-
retrieve(
|
|
40
|
-
return this._client.get(path `/org/projects/${
|
|
41
|
+
retrieve(idOrName, options) {
|
|
42
|
+
return this._client.get(path `/org/projects/${idOrName}`, options);
|
|
41
43
|
}
|
|
42
44
|
/**
|
|
43
45
|
* Update a project's name or status.
|
|
44
46
|
*
|
|
45
47
|
* @example
|
|
46
48
|
* ```ts
|
|
47
|
-
* const project = await client.projects.update('
|
|
49
|
+
* const project = await client.projects.update('id_or_name');
|
|
48
50
|
* ```
|
|
49
51
|
*/
|
|
50
|
-
update(
|
|
51
|
-
return this._client.patch(path `/org/projects/${
|
|
52
|
+
update(idOrName, body, options) {
|
|
53
|
+
return this._client.patch(path `/org/projects/${idOrName}`, { body, ...options });
|
|
52
54
|
}
|
|
53
55
|
/**
|
|
54
56
|
* List projects for the authenticated organization.
|
|
@@ -69,11 +71,11 @@ export class Projects extends APIResource {
|
|
|
69
71
|
*
|
|
70
72
|
* @example
|
|
71
73
|
* ```ts
|
|
72
|
-
* await client.projects.delete('
|
|
74
|
+
* await client.projects.delete('id_or_name');
|
|
73
75
|
* ```
|
|
74
76
|
*/
|
|
75
|
-
delete(
|
|
76
|
-
return this._client.delete(path `/org/projects/${
|
|
77
|
+
delete(idOrName, options) {
|
|
78
|
+
return this._client.delete(path `/org/projects/${idOrName}`, {
|
|
77
79
|
...options,
|
|
78
80
|
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
79
81
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projects.mjs","sourceRoot":"","sources":["../../src/resources/projects/projects.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,SAAS,qBAAiB;AACtC,OAAO,EAAqB,MAAM,EAA6C,qBAAiB;AAEhG,OAAO,EAAE,gBAAgB,EAA4C,kCAA8B;AACnG,OAAO,EAAE,YAAY,EAAE,mCAA+B;AAEtD,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD;;;;GAIG;AACH,MAAM,OAAO,QAAS,SAAQ,WAAW;IAAzC;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;
|
|
1
|
+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,CAAC,CAAC;IACpG,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,QAAgB,EAAE,OAAwB;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,iBAAiB,QAAQ,EAAE,EAAE;YAC1D,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF;AAkFD,QAAQ,CAAC,MAAM,GAAG,MAAM,CAAC"}
|
package/src/client.ts
CHANGED
|
@@ -153,6 +153,7 @@ import {
|
|
|
153
153
|
BrowserListResponse,
|
|
154
154
|
BrowserListResponsesOffsetPagination,
|
|
155
155
|
BrowserLoadExtensionsParams,
|
|
156
|
+
BrowserNetworkConfig,
|
|
156
157
|
BrowserPoolRef,
|
|
157
158
|
BrowserProxy,
|
|
158
159
|
BrowserProxyConfig,
|
|
@@ -204,6 +205,8 @@ export interface ClientOptions {
|
|
|
204
205
|
|
|
205
206
|
projectID?: string | null | undefined;
|
|
206
207
|
|
|
208
|
+
project?: string | null | undefined;
|
|
209
|
+
|
|
207
210
|
/**
|
|
208
211
|
* Specifies the environment to use for the API.
|
|
209
212
|
*
|
|
@@ -288,6 +291,7 @@ export interface ClientOptions {
|
|
|
288
291
|
export class Kernel {
|
|
289
292
|
apiKey: string;
|
|
290
293
|
projectID: string | null;
|
|
294
|
+
project: string | null;
|
|
291
295
|
|
|
292
296
|
baseURL: string;
|
|
293
297
|
maxRetries: number;
|
|
@@ -308,6 +312,7 @@ export class Kernel {
|
|
|
308
312
|
*
|
|
309
313
|
* @param {string | undefined} [opts.apiKey=process.env['KERNEL_API_KEY'] ?? undefined]
|
|
310
314
|
* @param {string | null | undefined} [opts.projectID]
|
|
315
|
+
* @param {string | null | undefined} [opts.project]
|
|
311
316
|
* @param {Environment} [opts.environment=production] - Specifies the environment URL to use for the API.
|
|
312
317
|
* @param {string} [opts.baseURL=process.env['KERNEL_BASE_URL'] ?? https://api.onkernel.com/] - Override the default base URL for the API.
|
|
313
318
|
* @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
|
|
@@ -321,6 +326,7 @@ export class Kernel {
|
|
|
321
326
|
baseURL = readEnv('KERNEL_BASE_URL'),
|
|
322
327
|
apiKey = readEnv('KERNEL_API_KEY'),
|
|
323
328
|
projectID = null,
|
|
329
|
+
project = null,
|
|
324
330
|
...opts
|
|
325
331
|
}: ClientOptions = {}) {
|
|
326
332
|
// Check for Bun runtime in a way that avoids type errors if Bun is not defined
|
|
@@ -344,6 +350,7 @@ export class Kernel {
|
|
|
344
350
|
const options: ClientOptions = {
|
|
345
351
|
apiKey,
|
|
346
352
|
projectID,
|
|
353
|
+
project,
|
|
347
354
|
...opts,
|
|
348
355
|
baseURL,
|
|
349
356
|
environment: opts.environment ?? 'production',
|
|
@@ -392,6 +399,7 @@ export class Kernel {
|
|
|
392
399
|
|
|
393
400
|
this.apiKey = apiKey;
|
|
394
401
|
this.projectID = projectID;
|
|
402
|
+
this.project = project;
|
|
395
403
|
}
|
|
396
404
|
|
|
397
405
|
/**
|
|
@@ -410,6 +418,7 @@ export class Kernel {
|
|
|
410
418
|
fetchOptions: this.fetchOptions,
|
|
411
419
|
apiKey: this.apiKey,
|
|
412
420
|
projectID: this.projectID,
|
|
421
|
+
project: this.project,
|
|
413
422
|
...options,
|
|
414
423
|
});
|
|
415
424
|
client.browserRouteCache = this.browserRouteCache;
|
|
@@ -887,6 +896,7 @@ export class Kernel {
|
|
|
887
896
|
...(options.timeout ? { 'X-Stainless-Timeout': String(Math.trunc(options.timeout / 1000)) } : {}),
|
|
888
897
|
...getPlatformHeaders(),
|
|
889
898
|
'X-Kernel-Project-Id': this.projectID,
|
|
899
|
+
'X-Kernel-Project': this.project,
|
|
890
900
|
},
|
|
891
901
|
await this.authHeaders(options),
|
|
892
902
|
this._options.defaultHeaders,
|
|
@@ -1115,6 +1125,7 @@ export declare namespace Kernel {
|
|
|
1115
1125
|
|
|
1116
1126
|
export {
|
|
1117
1127
|
Browsers as Browsers,
|
|
1128
|
+
type BrowserNetworkConfig as BrowserNetworkConfig,
|
|
1118
1129
|
type BrowserPoolRef as BrowserPoolRef,
|
|
1119
1130
|
type BrowserProxy as BrowserProxy,
|
|
1120
1131
|
type BrowserProxyConfig as BrowserProxyConfig,
|
|
@@ -648,11 +648,42 @@ export namespace ManagedAuth {
|
|
|
648
648
|
| 'account'
|
|
649
649
|
| 'other';
|
|
650
650
|
|
|
651
|
+
/**
|
|
652
|
+
* Context captured for a choice.
|
|
653
|
+
*/
|
|
654
|
+
context?: string | null;
|
|
655
|
+
|
|
651
656
|
/**
|
|
652
657
|
* Additional context for the choice.
|
|
653
658
|
*/
|
|
654
659
|
description?: string | null;
|
|
655
660
|
|
|
661
|
+
/**
|
|
662
|
+
* Display text captured for a choice.
|
|
663
|
+
*/
|
|
664
|
+
display_text?: string | null;
|
|
665
|
+
|
|
666
|
+
/**
|
|
667
|
+
* Masked phone number or email address shown for an MFA choice.
|
|
668
|
+
*/
|
|
669
|
+
masked_destination?: string | null;
|
|
670
|
+
|
|
671
|
+
/**
|
|
672
|
+
* Semantic MFA method. Choice id remains the stable identity of the exact option
|
|
673
|
+
* selected.
|
|
674
|
+
*/
|
|
675
|
+
mfa_type?:
|
|
676
|
+
| 'sms'
|
|
677
|
+
| 'call'
|
|
678
|
+
| 'email'
|
|
679
|
+
| 'totp'
|
|
680
|
+
| 'push'
|
|
681
|
+
| 'password'
|
|
682
|
+
| 'passkey'
|
|
683
|
+
| 'switch'
|
|
684
|
+
| 'other'
|
|
685
|
+
| null;
|
|
686
|
+
|
|
656
687
|
/**
|
|
657
688
|
* Selector for the visible choice, when available.
|
|
658
689
|
*/
|
|
@@ -754,6 +785,11 @@ export namespace ManagedAuth {
|
|
|
754
785
|
*/
|
|
755
786
|
type: 'identifier' | 'password' | 'code' | 'totp_code' | 'totp_secret' | 'text';
|
|
756
787
|
|
|
788
|
+
/**
|
|
789
|
+
* Context shown near the field, including a masked code destination.
|
|
790
|
+
*/
|
|
791
|
+
hint?: string;
|
|
792
|
+
|
|
757
793
|
/**
|
|
758
794
|
* Human-readable label shown to the user.
|
|
759
795
|
*/
|
|
@@ -1697,11 +1733,42 @@ export namespace ConnectionFollowResponse {
|
|
|
1697
1733
|
| 'account'
|
|
1698
1734
|
| 'other';
|
|
1699
1735
|
|
|
1736
|
+
/**
|
|
1737
|
+
* Context captured for a choice.
|
|
1738
|
+
*/
|
|
1739
|
+
context?: string | null;
|
|
1740
|
+
|
|
1700
1741
|
/**
|
|
1701
1742
|
* Additional context for the choice.
|
|
1702
1743
|
*/
|
|
1703
1744
|
description?: string | null;
|
|
1704
1745
|
|
|
1746
|
+
/**
|
|
1747
|
+
* Display text captured for a choice.
|
|
1748
|
+
*/
|
|
1749
|
+
display_text?: string | null;
|
|
1750
|
+
|
|
1751
|
+
/**
|
|
1752
|
+
* Masked phone number or email address shown for an MFA choice.
|
|
1753
|
+
*/
|
|
1754
|
+
masked_destination?: string | null;
|
|
1755
|
+
|
|
1756
|
+
/**
|
|
1757
|
+
* Semantic MFA method. Choice id remains the stable identity of the exact option
|
|
1758
|
+
* selected.
|
|
1759
|
+
*/
|
|
1760
|
+
mfa_type?:
|
|
1761
|
+
| 'sms'
|
|
1762
|
+
| 'call'
|
|
1763
|
+
| 'email'
|
|
1764
|
+
| 'totp'
|
|
1765
|
+
| 'push'
|
|
1766
|
+
| 'password'
|
|
1767
|
+
| 'passkey'
|
|
1768
|
+
| 'switch'
|
|
1769
|
+
| 'other'
|
|
1770
|
+
| null;
|
|
1771
|
+
|
|
1705
1772
|
/**
|
|
1706
1773
|
* Selector for the visible choice, when available.
|
|
1707
1774
|
*/
|
|
@@ -1774,6 +1841,11 @@ export namespace ConnectionFollowResponse {
|
|
|
1774
1841
|
*/
|
|
1775
1842
|
type: 'identifier' | 'password' | 'code' | 'totp_code' | 'totp_secret' | 'text';
|
|
1776
1843
|
|
|
1844
|
+
/**
|
|
1845
|
+
* Context shown near the field, including a masked code destination.
|
|
1846
|
+
*/
|
|
1847
|
+
hint?: string;
|
|
1848
|
+
|
|
1777
1849
|
/**
|
|
1778
1850
|
* Human-readable label shown to the user.
|
|
1779
1851
|
*/
|
|
@@ -196,6 +196,11 @@ export interface BrowserPool {
|
|
|
196
196
|
*/
|
|
197
197
|
extension_ids: Array<string>;
|
|
198
198
|
|
|
199
|
+
/**
|
|
200
|
+
* Geographic region of the browser pool. Fixed once the pool is created.
|
|
201
|
+
*/
|
|
202
|
+
region: 'us-east' | 'eu-west';
|
|
203
|
+
|
|
199
204
|
/**
|
|
200
205
|
* Browser pool name, if set
|
|
201
206
|
*/
|
|
@@ -258,6 +263,12 @@ export namespace BrowserPool {
|
|
|
258
263
|
*/
|
|
259
264
|
name?: string;
|
|
260
265
|
|
|
266
|
+
/**
|
|
267
|
+
* Network configuration applied to browsers in this pool, if any. Omitted when the
|
|
268
|
+
* pool has no network configuration.
|
|
269
|
+
*/
|
|
270
|
+
network?: BrowsersAPI.BrowserNetworkConfig;
|
|
271
|
+
|
|
261
272
|
/**
|
|
262
273
|
* Profile configuration for browsers in a pool. Provide either id or name.
|
|
263
274
|
* Profiles must be created beforehand. Unlike single browser sessions, pools load
|
|
@@ -363,6 +374,11 @@ export interface BrowserPoolAcquireResponse {
|
|
|
363
374
|
*/
|
|
364
375
|
headless: boolean;
|
|
365
376
|
|
|
377
|
+
/**
|
|
378
|
+
* Geographic region of the browser session. Fixed once the session is created.
|
|
379
|
+
*/
|
|
380
|
+
region: 'us-east' | 'eu-west';
|
|
381
|
+
|
|
366
382
|
/**
|
|
367
383
|
* Unique identifier for the browser session
|
|
368
384
|
*/
|
|
@@ -422,6 +438,12 @@ export interface BrowserPoolAcquireResponse {
|
|
|
422
438
|
*/
|
|
423
439
|
name?: string;
|
|
424
440
|
|
|
441
|
+
/**
|
|
442
|
+
* Network configuration the session was created with, if any. Omitted when the
|
|
443
|
+
* session has no network configuration.
|
|
444
|
+
*/
|
|
445
|
+
network?: BrowsersAPI.BrowserNetworkConfig;
|
|
446
|
+
|
|
425
447
|
/**
|
|
426
448
|
* Browser pool this session was acquired from, if any.
|
|
427
449
|
*/
|
|
@@ -536,6 +558,11 @@ export interface BrowserPoolCreateParams {
|
|
|
536
558
|
*/
|
|
537
559
|
name?: string;
|
|
538
560
|
|
|
561
|
+
/**
|
|
562
|
+
* Network configuration applied to browsers in this pool.
|
|
563
|
+
*/
|
|
564
|
+
network?: BrowsersAPI.BrowserNetworkConfig;
|
|
565
|
+
|
|
539
566
|
/**
|
|
540
567
|
* Profile configuration for browsers in a pool. Provide either id or name.
|
|
541
568
|
* Profiles must be created beforehand. Unlike single browser sessions, pools load
|
|
@@ -558,6 +585,13 @@ export interface BrowserPoolCreateParams {
|
|
|
558
585
|
*/
|
|
559
586
|
refresh_on_profile_update?: boolean;
|
|
560
587
|
|
|
588
|
+
/**
|
|
589
|
+
* Geographic region for the browser pool. It is fixed once the pool is created.
|
|
590
|
+
* Region selection requires a Start-Up or Enterprise plan, defaults to us-east
|
|
591
|
+
* when omitted on create.
|
|
592
|
+
*/
|
|
593
|
+
region?: 'us-east' | 'eu-west';
|
|
594
|
+
|
|
561
595
|
/**
|
|
562
596
|
* Optional URL to navigate to when a new browser is warmed into the pool.
|
|
563
597
|
* Best-effort: failures to navigate do not fail pool fill. Only applied to
|
|
@@ -770,6 +804,15 @@ export interface BrowserPoolUpdateParams {
|
|
|
770
804
|
*/
|
|
771
805
|
name?: string;
|
|
772
806
|
|
|
807
|
+
/**
|
|
808
|
+
* If provided, replaces the pool's network configuration. Omit to leave the
|
|
809
|
+
* existing configuration unchanged; an empty object ({}) removes it, while
|
|
810
|
+
* network: {private_hosts: []} sets an explicit empty list. Only applied to
|
|
811
|
+
* browsers created in the pool after the update; browsers already in the pool keep
|
|
812
|
+
* their configuration until discarded (see discard_all_idle).
|
|
813
|
+
*/
|
|
814
|
+
network?: BrowsersAPI.BrowserNetworkConfig;
|
|
815
|
+
|
|
773
816
|
/**
|
|
774
817
|
* Profile configuration for browsers in a pool. Provide either id or name.
|
|
775
818
|
* Profiles must be created beforehand. Unlike single browser sessions, pools load
|
|
@@ -976,6 +1019,11 @@ export interface BrowserPoolListParams extends OffsetPaginationParams {
|
|
|
976
1019
|
* value.
|
|
977
1020
|
*/
|
|
978
1021
|
query?: string;
|
|
1022
|
+
|
|
1023
|
+
/**
|
|
1024
|
+
* Filter pools by geographic region. Omit to list pools in all regions.
|
|
1025
|
+
*/
|
|
1026
|
+
region?: 'us-east' | 'eu-west';
|
|
979
1027
|
}
|
|
980
1028
|
|
|
981
1029
|
export interface BrowserPoolDeleteParams {
|
|
@@ -281,6 +281,37 @@ export type BrowserListResponsesOffsetPagination = OffsetPagination<BrowserListR
|
|
|
281
281
|
|
|
282
282
|
export type ProfilesOffsetPagination = OffsetPagination<Profile>;
|
|
283
283
|
|
|
284
|
+
/**
|
|
285
|
+
* Network configuration for a browser session or browser pool.
|
|
286
|
+
*/
|
|
287
|
+
export interface BrowserNetworkConfig {
|
|
288
|
+
/**
|
|
289
|
+
* Destinations the browser reaches directly through the session's own network
|
|
290
|
+
* instead of through Kernel-managed egress — for private hosts reachable over a
|
|
291
|
+
* VPN or tunnel the session has joined (e.g. a Tailscale tailnet). By default,
|
|
292
|
+
* private IP ranges already route directly: RFC1918 (10.0.0.0/8, 172.16.0.0/12,
|
|
293
|
+
* 192.168.0.0/16), CGNAT/Tailscale (100.64.0.0/10), and IPv6 ULA (fc00::/7). An
|
|
294
|
+
* explicitly supplied list replaces those defaults with exactly the entries given,
|
|
295
|
+
* and an empty list ([]) disables them so all traffic uses Kernel-managed egress;
|
|
296
|
+
* omit private_hosts to keep the defaults. Entries are hostname patterns
|
|
297
|
+
* ("_.example.ts.net", "preview.internal") or IP/CIDR literals ("100.64.0.0/10",
|
|
298
|
+
* "10.1.30.63"). IP and CIDR entries only match URLs written with a literal IP
|
|
299
|
+
* address; they never match hostnames that resolve into the range, so private DNS
|
|
300
|
+
* names need a hostname entry even when they resolve inside the default ranges.
|
|
301
|
+
* CIDRs must be in canonical masked form (host bits zero), and only the private
|
|
302
|
+
* ranges listed above are accepted; public, loopback, link-local, and unspecified
|
|
303
|
+
* ranges are rejected. Exact IPv6 addresses must be bracketed ("[fd00::1]"); IPv6
|
|
304
|
+
* CIDR ranges are unbracketed ("fd00::/8"). Wildcards are limited to one leading
|
|
305
|
+
* "_." over a suffix with at least two labels that is not a public suffix (so
|
|
306
|
+
* "_.co.uk" or "_.ts.net" are rejected, while "\*.example.ts.net" is accepted).
|
|
307
|
+
* Hostname and IP entries may carry a port; CIDR ranges may not. Hostname entries
|
|
308
|
+
* are not resolved during validation, so callers must ensure they identify private
|
|
309
|
+
* destinations. Not related to a proxy's bypass_hosts, which selects between
|
|
310
|
+
* upstream-proxy and Kernel-managed direct egress and cannot reach into a VPN.
|
|
311
|
+
*/
|
|
312
|
+
private_hosts?: Array<string>;
|
|
313
|
+
}
|
|
314
|
+
|
|
284
315
|
/**
|
|
285
316
|
* Browser pool this session was acquired from, if any.
|
|
286
317
|
*/
|
|
@@ -423,6 +454,11 @@ export interface BrowserCreateResponse {
|
|
|
423
454
|
*/
|
|
424
455
|
headless: boolean;
|
|
425
456
|
|
|
457
|
+
/**
|
|
458
|
+
* Geographic region of the browser session. Fixed once the session is created.
|
|
459
|
+
*/
|
|
460
|
+
region: 'us-east' | 'eu-west';
|
|
461
|
+
|
|
426
462
|
/**
|
|
427
463
|
* Unique identifier for the browser session
|
|
428
464
|
*/
|
|
@@ -482,6 +518,12 @@ export interface BrowserCreateResponse {
|
|
|
482
518
|
*/
|
|
483
519
|
name?: string;
|
|
484
520
|
|
|
521
|
+
/**
|
|
522
|
+
* Network configuration the session was created with, if any. Omitted when the
|
|
523
|
+
* session has no network configuration.
|
|
524
|
+
*/
|
|
525
|
+
network?: BrowserNetworkConfig;
|
|
526
|
+
|
|
485
527
|
/**
|
|
486
528
|
* Browser pool this session was acquired from, if any.
|
|
487
529
|
*/
|
|
@@ -567,6 +609,11 @@ export interface BrowserRetrieveResponse {
|
|
|
567
609
|
*/
|
|
568
610
|
headless: boolean;
|
|
569
611
|
|
|
612
|
+
/**
|
|
613
|
+
* Geographic region of the browser session. Fixed once the session is created.
|
|
614
|
+
*/
|
|
615
|
+
region: 'us-east' | 'eu-west';
|
|
616
|
+
|
|
570
617
|
/**
|
|
571
618
|
* Unique identifier for the browser session
|
|
572
619
|
*/
|
|
@@ -626,6 +673,12 @@ export interface BrowserRetrieveResponse {
|
|
|
626
673
|
*/
|
|
627
674
|
name?: string;
|
|
628
675
|
|
|
676
|
+
/**
|
|
677
|
+
* Network configuration the session was created with, if any. Omitted when the
|
|
678
|
+
* session has no network configuration.
|
|
679
|
+
*/
|
|
680
|
+
network?: BrowserNetworkConfig;
|
|
681
|
+
|
|
629
682
|
/**
|
|
630
683
|
* Browser pool this session was acquired from, if any.
|
|
631
684
|
*/
|
|
@@ -711,6 +764,11 @@ export interface BrowserUpdateResponse {
|
|
|
711
764
|
*/
|
|
712
765
|
headless: boolean;
|
|
713
766
|
|
|
767
|
+
/**
|
|
768
|
+
* Geographic region of the browser session. Fixed once the session is created.
|
|
769
|
+
*/
|
|
770
|
+
region: 'us-east' | 'eu-west';
|
|
771
|
+
|
|
714
772
|
/**
|
|
715
773
|
* Unique identifier for the browser session
|
|
716
774
|
*/
|
|
@@ -770,6 +828,12 @@ export interface BrowserUpdateResponse {
|
|
|
770
828
|
*/
|
|
771
829
|
name?: string;
|
|
772
830
|
|
|
831
|
+
/**
|
|
832
|
+
* Network configuration the session was created with, if any. Omitted when the
|
|
833
|
+
* session has no network configuration.
|
|
834
|
+
*/
|
|
835
|
+
network?: BrowserNetworkConfig;
|
|
836
|
+
|
|
773
837
|
/**
|
|
774
838
|
* Browser pool this session was acquired from, if any.
|
|
775
839
|
*/
|
|
@@ -855,6 +919,11 @@ export interface BrowserListResponse {
|
|
|
855
919
|
*/
|
|
856
920
|
headless: boolean;
|
|
857
921
|
|
|
922
|
+
/**
|
|
923
|
+
* Geographic region of the browser session. Fixed once the session is created.
|
|
924
|
+
*/
|
|
925
|
+
region: 'us-east' | 'eu-west';
|
|
926
|
+
|
|
858
927
|
/**
|
|
859
928
|
* Unique identifier for the browser session
|
|
860
929
|
*/
|
|
@@ -914,6 +983,12 @@ export interface BrowserListResponse {
|
|
|
914
983
|
*/
|
|
915
984
|
name?: string;
|
|
916
985
|
|
|
986
|
+
/**
|
|
987
|
+
* Network configuration the session was created with, if any. Omitted when the
|
|
988
|
+
* session has no network configuration.
|
|
989
|
+
*/
|
|
990
|
+
network?: BrowserNetworkConfig;
|
|
991
|
+
|
|
917
992
|
/**
|
|
918
993
|
* Browser pool this session was acquired from, if any.
|
|
919
994
|
*/
|
|
@@ -1052,6 +1127,11 @@ export interface BrowserCreateParams {
|
|
|
1052
1127
|
*/
|
|
1053
1128
|
name?: string;
|
|
1054
1129
|
|
|
1130
|
+
/**
|
|
1131
|
+
* Network configuration for the browser session. Cannot be changed after creation.
|
|
1132
|
+
*/
|
|
1133
|
+
network?: BrowserNetworkConfig;
|
|
1134
|
+
|
|
1055
1135
|
/**
|
|
1056
1136
|
* Profile selection for the browser session. Provide either id or name. If
|
|
1057
1137
|
* specified, the matching profile will be loaded into the browser session.
|
|
@@ -1076,6 +1156,13 @@ export interface BrowserCreateParams {
|
|
|
1076
1156
|
*/
|
|
1077
1157
|
proxy_id?: string;
|
|
1078
1158
|
|
|
1159
|
+
/**
|
|
1160
|
+
* Geographic region for the browser session. It is fixed once the session is
|
|
1161
|
+
* created. Region selection requires a Start-Up or Enterprise plan, defaults to
|
|
1162
|
+
* us-east when omitted on create.
|
|
1163
|
+
*/
|
|
1164
|
+
region?: 'us-east' | 'eu-west';
|
|
1165
|
+
|
|
1079
1166
|
/**
|
|
1080
1167
|
* Optional URL to open when the browser session is created. Navigation is
|
|
1081
1168
|
* best-effort, so navigation failures do not prevent the session from being
|
|
@@ -1410,6 +1497,11 @@ export interface BrowserListParams extends OffsetPaginationParams {
|
|
|
1410
1497
|
*/
|
|
1411
1498
|
query?: string;
|
|
1412
1499
|
|
|
1500
|
+
/**
|
|
1501
|
+
* Filter sessions by geographic region. Omit to list sessions in all regions.
|
|
1502
|
+
*/
|
|
1503
|
+
region?: 'us-east' | 'eu-west';
|
|
1504
|
+
|
|
1413
1505
|
/**
|
|
1414
1506
|
* Filter sessions by status. "active" returns only active sessions (default),
|
|
1415
1507
|
* "deleted" returns only soft-deleted sessions, "all" returns both.
|
|
@@ -1488,6 +1580,7 @@ Browsers.Playwright = Playwright;
|
|
|
1488
1580
|
|
|
1489
1581
|
export declare namespace Browsers {
|
|
1490
1582
|
export {
|
|
1583
|
+
type BrowserNetworkConfig as BrowserNetworkConfig,
|
|
1491
1584
|
type BrowserPoolRef as BrowserPoolRef,
|
|
1492
1585
|
type BrowserProxy as BrowserProxy,
|
|
1493
1586
|
type BrowserProxyConfig as BrowserProxyConfig,
|
package/src/resources/index.ts
CHANGED
|
@@ -434,6 +434,11 @@ export namespace InvocationListBrowsersResponse {
|
|
|
434
434
|
*/
|
|
435
435
|
headless: boolean;
|
|
436
436
|
|
|
437
|
+
/**
|
|
438
|
+
* Geographic region of the browser session. Fixed once the session is created.
|
|
439
|
+
*/
|
|
440
|
+
region: 'us-east' | 'eu-west';
|
|
441
|
+
|
|
437
442
|
/**
|
|
438
443
|
* Unique identifier for the browser session
|
|
439
444
|
*/
|
|
@@ -493,6 +498,12 @@ export namespace InvocationListBrowsersResponse {
|
|
|
493
498
|
*/
|
|
494
499
|
name?: string;
|
|
495
500
|
|
|
501
|
+
/**
|
|
502
|
+
* Network configuration the session was created with, if any. Omitted when the
|
|
503
|
+
* session has no network configuration.
|
|
504
|
+
*/
|
|
505
|
+
network?: BrowsersAPI.BrowserNetworkConfig;
|
|
506
|
+
|
|
496
507
|
/**
|
|
497
508
|
* Browser pool this session was acquired from, if any.
|
|
498
509
|
*/
|
|
@@ -9,9 +9,7 @@ import { RequestOptions } from '../../internal/request-options';
|
|
|
9
9
|
*/
|
|
10
10
|
export class Limits extends APIResource {
|
|
11
11
|
/**
|
|
12
|
-
* Get the organization's
|
|
13
|
-
* across on-demand sessions and browser pool reservations — and the default
|
|
14
|
-
* per-project concurrency cap applied to projects without an explicit override.
|
|
12
|
+
* Get the organization's effective limits and managed auth usage.
|
|
15
13
|
*/
|
|
16
14
|
retrieve(options?: RequestOptions): APIPromise<OrgLimits> {
|
|
17
15
|
return this._client.get('/org/limits', options);
|
|
@@ -28,6 +26,26 @@ export class Limits extends APIResource {
|
|
|
28
26
|
}
|
|
29
27
|
|
|
30
28
|
export interface OrgLimits {
|
|
29
|
+
/**
|
|
30
|
+
* The organization's current non-deleted managed auth connections, counted
|
|
31
|
+
* org-wide across every project. Compare against max_auth_connections to show
|
|
32
|
+
* remaining capacity before a create is rejected with 403 insufficient_plan.
|
|
33
|
+
*/
|
|
34
|
+
auth_connections_used: number;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Maximum managed auth connections the organization's plan allows. Null means
|
|
38
|
+
* unlimited. Counted org-wide, so it cannot be multiplied across projects.
|
|
39
|
+
*/
|
|
40
|
+
max_auth_connections: number | null;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Smallest health_check_interval the organization's plan accepts on a managed auth
|
|
44
|
+
* connection. Requests below this are rejected with 400. Existing connections
|
|
45
|
+
* stored below the floor are grandfathered until edited.
|
|
46
|
+
*/
|
|
47
|
+
min_health_check_interval_seconds: number;
|
|
48
|
+
|
|
31
49
|
/**
|
|
32
50
|
* Default maximum concurrent browsers applied to every project that has no
|
|
33
51
|
* explicit per-project override. Null means no org-level default, so such projects
|