@onkernel/sdk 0.46.0 → 0.48.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.
Files changed (92) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/client.d.mts +6 -0
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +6 -0
  5. package/client.d.ts.map +1 -1
  6. package/client.js +6 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +6 -0
  9. package/client.mjs.map +1 -1
  10. package/internal/utils/env.js +2 -2
  11. package/internal/utils/env.js.map +1 -1
  12. package/internal/utils/env.mjs +2 -2
  13. package/internal/utils/env.mjs.map +1 -1
  14. package/package.json +1 -1
  15. package/resources/auth/connections.d.mts +11 -4
  16. package/resources/auth/connections.d.mts.map +1 -1
  17. package/resources/auth/connections.d.ts +11 -4
  18. package/resources/auth/connections.d.ts.map +1 -1
  19. package/resources/auth/connections.js +3 -2
  20. package/resources/auth/connections.js.map +1 -1
  21. package/resources/auth/connections.mjs +3 -2
  22. package/resources/auth/connections.mjs.map +1 -1
  23. package/resources/browser-pools.d.mts +4 -0
  24. package/resources/browser-pools.d.mts.map +1 -1
  25. package/resources/browser-pools.d.ts +4 -0
  26. package/resources/browser-pools.d.ts.map +1 -1
  27. package/resources/browsers/browsers.d.mts +16 -0
  28. package/resources/browsers/browsers.d.mts.map +1 -1
  29. package/resources/browsers/browsers.d.ts +16 -0
  30. package/resources/browsers/browsers.d.ts.map +1 -1
  31. package/resources/browsers/browsers.js.map +1 -1
  32. package/resources/browsers/browsers.mjs.map +1 -1
  33. package/resources/index.d.mts +1 -0
  34. package/resources/index.d.mts.map +1 -1
  35. package/resources/index.d.ts +1 -0
  36. package/resources/index.d.ts.map +1 -1
  37. package/resources/index.js +3 -1
  38. package/resources/index.js.map +1 -1
  39. package/resources/index.mjs +1 -0
  40. package/resources/index.mjs.map +1 -1
  41. package/resources/invocations.d.mts +4 -0
  42. package/resources/invocations.d.mts.map +1 -1
  43. package/resources/invocations.d.ts +4 -0
  44. package/resources/invocations.d.ts.map +1 -1
  45. package/resources/projects/index.d.mts +3 -0
  46. package/resources/projects/index.d.mts.map +1 -0
  47. package/resources/projects/index.d.ts +3 -0
  48. package/resources/projects/index.d.ts.map +1 -0
  49. package/resources/projects/index.js +9 -0
  50. package/resources/projects/index.js.map +1 -0
  51. package/resources/projects/index.mjs +4 -0
  52. package/resources/projects/index.mjs.map +1 -0
  53. package/resources/projects/limits.d.mts +103 -0
  54. package/resources/projects/limits.d.mts.map +1 -0
  55. package/resources/projects/limits.d.ts +103 -0
  56. package/resources/projects/limits.d.ts.map +1 -0
  57. package/resources/projects/limits.js +42 -0
  58. package/resources/projects/limits.js.map +1 -0
  59. package/resources/projects/limits.mjs +38 -0
  60. package/resources/projects/limits.mjs.map +1 -0
  61. package/resources/projects/projects.d.mts +125 -0
  62. package/resources/projects/projects.d.mts.map +1 -0
  63. package/resources/projects/projects.d.ts +125 -0
  64. package/resources/projects/projects.d.ts.map +1 -0
  65. package/resources/projects/projects.js +87 -0
  66. package/resources/projects/projects.js.map +1 -0
  67. package/resources/projects/projects.mjs +82 -0
  68. package/resources/projects/projects.mjs.map +1 -0
  69. package/resources/projects.d.mts +2 -0
  70. package/resources/projects.d.mts.map +1 -0
  71. package/resources/projects.d.ts +2 -0
  72. package/resources/projects.d.ts.map +1 -0
  73. package/resources/projects.js +6 -0
  74. package/resources/projects.js.map +1 -0
  75. package/resources/projects.mjs +3 -0
  76. package/resources/projects.mjs.map +1 -0
  77. package/src/client.ts +26 -0
  78. package/src/internal/utils/env.ts +2 -2
  79. package/src/resources/auth/connections.ts +12 -4
  80. package/src/resources/browser-pools.ts +5 -0
  81. package/src/resources/browsers/browsers.ts +20 -0
  82. package/src/resources/index.ts +10 -0
  83. package/src/resources/invocations.ts +5 -0
  84. package/src/resources/projects/index.ts +18 -0
  85. package/src/resources/projects/limits.ts +128 -0
  86. package/src/resources/projects/projects.ts +179 -0
  87. package/src/resources/projects.ts +3 -0
  88. package/src/version.ts +1 -1
  89. package/version.d.mts +1 -1
  90. package/version.d.ts +1 -1
  91. package/version.js +1 -1
  92. package/version.mjs +1 -1
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Projects = void 0;
5
+ const tslib_1 = require("../../internal/tslib.js");
6
+ const resource_1 = require("../../core/resource.js");
7
+ const LimitsAPI = tslib_1.__importStar(require("./limits.js"));
8
+ const limits_1 = require("./limits.js");
9
+ const pagination_1 = require("../../core/pagination.js");
10
+ const headers_1 = require("../../internal/headers.js");
11
+ const path_1 = require("../../internal/utils/path.js");
12
+ /**
13
+ * Create and manage projects for resource isolation within an organization.
14
+ */
15
+ class Projects extends resource_1.APIResource {
16
+ constructor() {
17
+ super(...arguments);
18
+ this.limits = new LimitsAPI.Limits(this._client);
19
+ }
20
+ /**
21
+ * Create a new project within the authenticated organization. Requires a paid plan
22
+ * and the projects feature flag.
23
+ *
24
+ * @example
25
+ * ```ts
26
+ * const project = await client.projects.create({
27
+ * name: 'staging',
28
+ * });
29
+ * ```
30
+ */
31
+ create(body, options) {
32
+ return this._client.post('/projects', { body, ...options });
33
+ }
34
+ /**
35
+ * Get a project by ID.
36
+ *
37
+ * @example
38
+ * ```ts
39
+ * const project = await client.projects.retrieve('id');
40
+ * ```
41
+ */
42
+ retrieve(id, options) {
43
+ return this._client.get((0, path_1.path) `/projects/${id}`, options);
44
+ }
45
+ /**
46
+ * Update a project's name or status.
47
+ *
48
+ * @example
49
+ * ```ts
50
+ * const project = await client.projects.update('id');
51
+ * ```
52
+ */
53
+ update(id, body, options) {
54
+ return this._client.patch((0, path_1.path) `/projects/${id}`, { body, ...options });
55
+ }
56
+ /**
57
+ * List projects for the authenticated organization.
58
+ *
59
+ * @example
60
+ * ```ts
61
+ * // Automatically fetches more pages as needed.
62
+ * for await (const project of client.projects.list()) {
63
+ * // ...
64
+ * }
65
+ * ```
66
+ */
67
+ list(query = {}, options) {
68
+ return this._client.getAPIList('/projects', (pagination_1.OffsetPagination), { query, ...options });
69
+ }
70
+ /**
71
+ * Soft-delete a project. The project must be empty (no active resources).
72
+ *
73
+ * @example
74
+ * ```ts
75
+ * await client.projects.delete('id');
76
+ * ```
77
+ */
78
+ delete(id, options) {
79
+ return this._client.delete((0, path_1.path) `/projects/${id}`, {
80
+ ...options,
81
+ headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
82
+ });
83
+ }
84
+ }
85
+ exports.Projects = Projects;
86
+ Projects.Limits = limits_1.Limits;
87
+ //# sourceMappingURL=projects.js.map
@@ -0,0 +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;;GAEG;AACH,MAAa,QAAS,SAAQ,sBAAW;IAAzC;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAyEhE,CAAC;IAvEC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,IAAyB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9D,CAAC;IAED;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,aAAa,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,EAAU,EAAE,IAAyB,EAAE,OAAwB;QACpE,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,aAAa,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;IAED;;;;;;;;;;OAUG;IACH,IAAI,CACF,QAA8C,EAAE,EAChD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,WAAW,EAAE,CAAA,6BAAyB,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChG,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,aAAa,EAAE,EAAE,EAAE;YAChD,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;AA1ED,4BA0EC;AAuED,QAAQ,CAAC,MAAM,GAAG,eAAM,CAAC"}
@@ -0,0 +1,82 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../../core/resource.mjs";
3
+ import * as LimitsAPI from "./limits.mjs";
4
+ import { Limits } from "./limits.mjs";
5
+ import { OffsetPagination } from "../../core/pagination.mjs";
6
+ import { buildHeaders } from "../../internal/headers.mjs";
7
+ import { path } from "../../internal/utils/path.mjs";
8
+ /**
9
+ * Create and manage projects for resource isolation within an organization.
10
+ */
11
+ export class Projects extends APIResource {
12
+ constructor() {
13
+ super(...arguments);
14
+ this.limits = new LimitsAPI.Limits(this._client);
15
+ }
16
+ /**
17
+ * Create a new project within the authenticated organization. Requires a paid plan
18
+ * and the projects feature flag.
19
+ *
20
+ * @example
21
+ * ```ts
22
+ * const project = await client.projects.create({
23
+ * name: 'staging',
24
+ * });
25
+ * ```
26
+ */
27
+ create(body, options) {
28
+ return this._client.post('/projects', { body, ...options });
29
+ }
30
+ /**
31
+ * Get a project by ID.
32
+ *
33
+ * @example
34
+ * ```ts
35
+ * const project = await client.projects.retrieve('id');
36
+ * ```
37
+ */
38
+ retrieve(id, options) {
39
+ return this._client.get(path `/projects/${id}`, options);
40
+ }
41
+ /**
42
+ * Update a project's name or status.
43
+ *
44
+ * @example
45
+ * ```ts
46
+ * const project = await client.projects.update('id');
47
+ * ```
48
+ */
49
+ update(id, body, options) {
50
+ return this._client.patch(path `/projects/${id}`, { body, ...options });
51
+ }
52
+ /**
53
+ * List projects for the authenticated organization.
54
+ *
55
+ * @example
56
+ * ```ts
57
+ * // Automatically fetches more pages as needed.
58
+ * for await (const project of client.projects.list()) {
59
+ * // ...
60
+ * }
61
+ * ```
62
+ */
63
+ list(query = {}, options) {
64
+ return this._client.getAPIList('/projects', (OffsetPagination), { query, ...options });
65
+ }
66
+ /**
67
+ * Soft-delete a project. The project must be empty (no active resources).
68
+ *
69
+ * @example
70
+ * ```ts
71
+ * await client.projects.delete('id');
72
+ * ```
73
+ */
74
+ delete(id, options) {
75
+ return this._client.delete(path `/projects/${id}`, {
76
+ ...options,
77
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
78
+ });
79
+ }
80
+ }
81
+ Projects.Limits = Limits;
82
+ //# sourceMappingURL=projects.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"projects.mjs","sourceRoot":"","sources":["../../src/resources/projects/projects.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,SAAS;OACd,EAAqB,MAAM,EAA6C;OAExE,EAAE,gBAAgB,EAA4C;OAC9D,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf;;GAEG;AACH,MAAM,OAAO,QAAS,SAAQ,WAAW;IAAzC;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAyEhE,CAAC;IAvEC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,IAAyB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9D,CAAC;IAED;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,aAAa,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,EAAU,EAAE,IAAyB,EAAE,OAAwB;QACpE,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,aAAa,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;IAED;;;;;;;;;;OAUG;IACH,IAAI,CACF,QAA8C,EAAE,EAChD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,WAAW,EAAE,CAAA,gBAAyB,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChG,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,aAAa,EAAE,EAAE,EAAE;YAChD,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;AAuED,QAAQ,CAAC,MAAM,GAAG,MAAM,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./projects/index.mjs";
2
+ //# sourceMappingURL=projects.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"projects.d.mts","sourceRoot":"","sources":["../src/resources/projects.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export * from "./projects/index.js";
2
+ //# sourceMappingURL=projects.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../src/resources/projects.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ const tslib_1 = require("../internal/tslib.js");
5
+ tslib_1.__exportStar(require("./projects/index.js"), exports);
6
+ //# sourceMappingURL=projects.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"projects.js","sourceRoot":"","sources":["../src/resources/projects.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,8DAAiC"}
@@ -0,0 +1,3 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ export * from "./projects/index.mjs";
3
+ //# sourceMappingURL=projects.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"projects.mjs","sourceRoot":"","sources":["../src/resources/projects.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
package/src/client.ts CHANGED
@@ -118,6 +118,16 @@ import {
118
118
  Browsers,
119
119
  Profile,
120
120
  } from './resources/browsers/browsers';
121
+ import {
122
+ CreateProjectRequest,
123
+ Project,
124
+ ProjectCreateParams,
125
+ ProjectListParams,
126
+ ProjectUpdateParams,
127
+ Projects,
128
+ ProjectsOffsetPagination,
129
+ UpdateProjectRequest,
130
+ } from './resources/projects/projects';
121
131
  import { type Fetch } from './internal/builtin-types';
122
132
  import { HeadersLike, NullableHeaders, buildHeaders } from './internal/headers';
123
133
  import { FinalRequestOptions, RequestOptions } from './internal/request-options';
@@ -925,6 +935,10 @@ export class Kernel {
925
935
  * Create and manage credentials for authentication.
926
936
  */
927
937
  credentials: API.Credentials = new API.Credentials(this);
938
+ /**
939
+ * Create and manage projects for resource isolation within an organization.
940
+ */
941
+ projects: API.Projects = new API.Projects(this);
928
942
  /**
929
943
  * Configure external credential providers like 1Password.
930
944
  */
@@ -941,6 +955,7 @@ Kernel.Proxies = Proxies;
941
955
  Kernel.Extensions = Extensions;
942
956
  Kernel.BrowserPools = BrowserPools;
943
957
  Kernel.Credentials = Credentials;
958
+ Kernel.Projects = Projects;
944
959
  Kernel.CredentialProviders = CredentialProviders;
945
960
 
946
961
  export declare namespace Kernel {
@@ -1057,6 +1072,17 @@ export declare namespace Kernel {
1057
1072
  type CredentialListParams as CredentialListParams,
1058
1073
  };
1059
1074
 
1075
+ export {
1076
+ Projects as Projects,
1077
+ type CreateProjectRequest as CreateProjectRequest,
1078
+ type Project as Project,
1079
+ type UpdateProjectRequest as UpdateProjectRequest,
1080
+ type ProjectsOffsetPagination as ProjectsOffsetPagination,
1081
+ type ProjectCreateParams as ProjectCreateParams,
1082
+ type ProjectUpdateParams as ProjectUpdateParams,
1083
+ type ProjectListParams as ProjectListParams,
1084
+ };
1085
+
1060
1086
  export {
1061
1087
  CredentialProviders as CredentialProviders,
1062
1088
  type CreateCredentialProviderRequest as CreateCredentialProviderRequest,
@@ -9,10 +9,10 @@
9
9
  */
10
10
  export const readEnv = (env: string): string | undefined => {
11
11
  if (typeof (globalThis as any).process !== 'undefined') {
12
- return (globalThis as any).process.env?.[env]?.trim() ?? undefined;
12
+ return (globalThis as any).process.env?.[env]?.trim() || undefined;
13
13
  }
14
14
  if (typeof (globalThis as any).Deno !== 'undefined') {
15
- return (globalThis as any).Deno.env?.get?.(env)?.trim();
15
+ return (globalThis as any).Deno.env?.get?.(env)?.trim() || undefined;
16
16
  }
17
17
  return undefined;
18
18
  };
@@ -14,8 +14,9 @@ import { path } from '../../internal/utils/path';
14
14
  */
15
15
  export class Connections extends APIResource {
16
16
  /**
17
- * Creates an auth connection for a profile and domain combination. Returns 409
18
- * Conflict if an auth connection already exists for the given profile and domain.
17
+ * Creates an auth connection for a profile and domain combination. If the provided
18
+ * profile_name does not exist, it is created automatically. Returns 409 Conflict
19
+ * if an auth connection already exists for the given profile and domain.
19
20
  *
20
21
  * @example
21
22
  * ```ts
@@ -334,6 +335,11 @@ export interface ManagedAuth {
334
335
  */
335
336
  live_view_url?: string | null;
336
337
 
338
+ /**
339
+ * Optional login page URL to skip discovery
340
+ */
341
+ login_url?: string;
342
+
337
343
  /**
338
344
  * MFA method options (present when flow_step=awaiting_input and MFA selection
339
345
  * required)
@@ -521,7 +527,8 @@ export interface ManagedAuthCreateRequest {
521
527
  domain: string;
522
528
 
523
529
  /**
524
- * Name of the profile to manage authentication for
530
+ * Name of the profile to manage authentication for. If the profile does not exist,
531
+ * it is created automatically.
525
532
  */
526
533
  profile_name: string;
527
534
 
@@ -975,7 +982,8 @@ export interface ConnectionCreateParams {
975
982
  domain: string;
976
983
 
977
984
  /**
978
- * Name of the profile to manage authentication for
985
+ * Name of the profile to manage authentication for. If the profile does not exist,
986
+ * it is created automatically.
979
987
  */
980
988
  profile_name: string;
981
989
 
@@ -305,6 +305,11 @@ export interface BrowserPoolAcquireResponse {
305
305
  */
306
306
  webdriver_ws_url: string;
307
307
 
308
+ /**
309
+ * Metro-API HTTP base URL for this browser session.
310
+ */
311
+ base_url?: string;
312
+
308
313
  /**
309
314
  * Remote URL for live viewing the browser session. Only available for non-headless
310
315
  * browsers.
@@ -318,6 +318,11 @@ export interface BrowserCreateResponse {
318
318
  */
319
319
  webdriver_ws_url: string;
320
320
 
321
+ /**
322
+ * Metro-API HTTP base URL for this browser session.
323
+ */
324
+ base_url?: string;
325
+
321
326
  /**
322
327
  * Remote URL for live viewing the browser session. Only available for non-headless
323
328
  * browsers.
@@ -419,6 +424,11 @@ export interface BrowserRetrieveResponse {
419
424
  */
420
425
  webdriver_ws_url: string;
421
426
 
427
+ /**
428
+ * Metro-API HTTP base URL for this browser session.
429
+ */
430
+ base_url?: string;
431
+
422
432
  /**
423
433
  * Remote URL for live viewing the browser session. Only available for non-headless
424
434
  * browsers.
@@ -520,6 +530,11 @@ export interface BrowserUpdateResponse {
520
530
  */
521
531
  webdriver_ws_url: string;
522
532
 
533
+ /**
534
+ * Metro-API HTTP base URL for this browser session.
535
+ */
536
+ base_url?: string;
537
+
523
538
  /**
524
539
  * Remote URL for live viewing the browser session. Only available for non-headless
525
540
  * browsers.
@@ -621,6 +636,11 @@ export interface BrowserListResponse {
621
636
  */
622
637
  webdriver_ws_url: string;
623
638
 
639
+ /**
640
+ * Metro-API HTTP base URL for this browser session.
641
+ */
642
+ base_url?: string;
643
+
624
644
  /**
625
645
  * Remote URL for live viewing the browser session. Only available for non-headless
626
646
  * browsers.
@@ -96,6 +96,16 @@ export {
96
96
  type InvocationListResponsesOffsetPagination,
97
97
  } from './invocations';
98
98
  export { Profiles, type ProfileCreateParams, type ProfileListParams } from './profiles';
99
+ export {
100
+ Projects,
101
+ type CreateProjectRequest,
102
+ type Project,
103
+ type UpdateProjectRequest,
104
+ type ProjectCreateParams,
105
+ type ProjectUpdateParams,
106
+ type ProjectListParams,
107
+ type ProjectsOffsetPagination,
108
+ } from './projects/projects';
99
109
  export {
100
110
  Proxies,
101
111
  type ProxyCreateResponse,
@@ -453,6 +453,11 @@ export namespace InvocationListBrowsersResponse {
453
453
  */
454
454
  webdriver_ws_url: string;
455
455
 
456
+ /**
457
+ * Metro-API HTTP base URL for this browser session.
458
+ */
459
+ base_url?: string;
460
+
456
461
  /**
457
462
  * Remote URL for live viewing the browser session. Only available for non-headless
458
463
  * browsers.
@@ -0,0 +1,18 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export {
4
+ Limits,
5
+ type ProjectLimits,
6
+ type UpdateProjectLimitsRequest,
7
+ type LimitUpdateParams,
8
+ } from './limits';
9
+ export {
10
+ Projects,
11
+ type CreateProjectRequest,
12
+ type Project,
13
+ type UpdateProjectRequest,
14
+ type ProjectCreateParams,
15
+ type ProjectUpdateParams,
16
+ type ProjectListParams,
17
+ type ProjectsOffsetPagination,
18
+ } from './projects';
@@ -0,0 +1,128 @@
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 { RequestOptions } from '../../internal/request-options';
6
+ import { path } from '../../internal/utils/path';
7
+
8
+ /**
9
+ * Create and manage projects for resource isolation within an organization.
10
+ */
11
+ export class Limits extends APIResource {
12
+ /**
13
+ * Get the resource limit overrides for a project. Null values mean no
14
+ * project-level cap (org limit applies).
15
+ *
16
+ * @example
17
+ * ```ts
18
+ * const projectLimits = await client.projects.limits.retrieve(
19
+ * 'id',
20
+ * );
21
+ * ```
22
+ */
23
+ retrieve(id: string, options?: RequestOptions): APIPromise<ProjectLimits> {
24
+ return this._client.get(path`/projects/${id}/limits`, options);
25
+ }
26
+
27
+ /**
28
+ * Update resource limit overrides for a project. Only fields present in the
29
+ * request are modified. Set a field to 0 to remove that limit cap; omit a field to
30
+ * leave it unchanged.
31
+ *
32
+ * @example
33
+ * ```ts
34
+ * const projectLimits = await client.projects.limits.update(
35
+ * 'id',
36
+ * );
37
+ * ```
38
+ */
39
+ update(id: string, body: LimitUpdateParams, options?: RequestOptions): APIPromise<ProjectLimits> {
40
+ return this._client.patch(path`/projects/${id}/limits`, { body, ...options });
41
+ }
42
+ }
43
+
44
+ export interface ProjectLimits {
45
+ /**
46
+ * Maximum concurrent app invocations for this project. Null means no project-level
47
+ * cap.
48
+ */
49
+ max_concurrent_invocations?: number | null;
50
+
51
+ /**
52
+ * Maximum concurrent browser sessions for this project. Null means no
53
+ * project-level cap.
54
+ */
55
+ max_concurrent_sessions?: number | null;
56
+
57
+ /**
58
+ * Maximum persistent browser sessions for this project. Null means no
59
+ * project-level cap.
60
+ */
61
+ max_persistent_sessions?: number | null;
62
+
63
+ /**
64
+ * Maximum pooled sessions capacity for this project. Null means no project-level
65
+ * cap.
66
+ */
67
+ max_pooled_sessions?: number | null;
68
+ }
69
+
70
+ export interface UpdateProjectLimitsRequest {
71
+ /**
72
+ * Maximum concurrent app invocations for this project. Set to 0 to remove the cap;
73
+ * omit to leave unchanged.
74
+ */
75
+ max_concurrent_invocations?: number | null;
76
+
77
+ /**
78
+ * Maximum concurrent browser sessions for this project. Set to 0 to remove the
79
+ * cap; omit to leave unchanged.
80
+ */
81
+ max_concurrent_sessions?: number | null;
82
+
83
+ /**
84
+ * Maximum persistent browser sessions for this project. Set to 0 to remove the
85
+ * cap; omit to leave unchanged.
86
+ */
87
+ max_persistent_sessions?: number | null;
88
+
89
+ /**
90
+ * Maximum pooled sessions capacity for this project. Set to 0 to remove the cap;
91
+ * omit to leave unchanged.
92
+ */
93
+ max_pooled_sessions?: number | null;
94
+ }
95
+
96
+ export interface LimitUpdateParams {
97
+ /**
98
+ * Maximum concurrent app invocations for this project. Set to 0 to remove the cap;
99
+ * omit to leave unchanged.
100
+ */
101
+ max_concurrent_invocations?: number | null;
102
+
103
+ /**
104
+ * Maximum concurrent browser sessions for this project. Set to 0 to remove the
105
+ * cap; omit to leave unchanged.
106
+ */
107
+ max_concurrent_sessions?: number | null;
108
+
109
+ /**
110
+ * Maximum persistent browser sessions for this project. Set to 0 to remove the
111
+ * cap; omit to leave unchanged.
112
+ */
113
+ max_persistent_sessions?: number | null;
114
+
115
+ /**
116
+ * Maximum pooled sessions capacity for this project. Set to 0 to remove the cap;
117
+ * omit to leave unchanged.
118
+ */
119
+ max_pooled_sessions?: number | null;
120
+ }
121
+
122
+ export declare namespace Limits {
123
+ export {
124
+ type ProjectLimits as ProjectLimits,
125
+ type UpdateProjectLimitsRequest as UpdateProjectLimitsRequest,
126
+ type LimitUpdateParams as LimitUpdateParams,
127
+ };
128
+ }