Skip to content

Commit 068027a

Browse files
chore: retrigger Stainless codegen for projects resource
1 parent 87b21a8 commit 068027a

File tree

10 files changed

+511
-2
lines changed

10 files changed

+511
-2
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 104
1+
configured_endpoints: 111
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-49a1a92e00d1eb87e91e8527275cb0705fce2edea30e70fea745f134dd451fbd.yml
33
openapi_spec_hash: 3aa6ab6939790f538332054162fbdedc
4-
config_hash: 16e4457a0bb26e98a335a1c2a572290a
4+
config_hash: 9818dd634f87b677410eefd013d7a179

api.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,34 @@ Methods:
299299
- <code title="delete /credentials/{id_or_name}">client.credentials.<a href="./src/resources/credentials.ts">delete</a>(idOrName) -> void</code>
300300
- <code title="get /credentials/{id_or_name}/totp-code">client.credentials.<a href="./src/resources/credentials.ts">totpCode</a>(idOrName) -> CredentialTotpCodeResponse</code>
301301

302+
# Projects
303+
304+
Types:
305+
306+
- <code><a href="./src/resources/projects/projects.ts">CreateProjectRequest</a></code>
307+
- <code><a href="./src/resources/projects/projects.ts">Project</a></code>
308+
- <code><a href="./src/resources/projects/projects.ts">UpdateProjectRequest</a></code>
309+
310+
Methods:
311+
312+
- <code title="post /projects">client.projects.<a href="./src/resources/projects/projects.ts">create</a>({ ...params }) -> Project</code>
313+
- <code title="get /projects/{id}">client.projects.<a href="./src/resources/projects/projects.ts">retrieve</a>(id) -> Project</code>
314+
- <code title="patch /projects/{id}">client.projects.<a href="./src/resources/projects/projects.ts">update</a>(id, { ...params }) -> Project</code>
315+
- <code title="get /projects">client.projects.<a href="./src/resources/projects/projects.ts">list</a>({ ...params }) -> ProjectsOffsetPagination</code>
316+
- <code title="delete /projects/{id}">client.projects.<a href="./src/resources/projects/projects.ts">delete</a>(id) -> void</code>
317+
318+
## Limits
319+
320+
Types:
321+
322+
- <code><a href="./src/resources/projects/limits.ts">ProjectLimits</a></code>
323+
- <code><a href="./src/resources/projects/limits.ts">UpdateProjectLimitsRequest</a></code>
324+
325+
Methods:
326+
327+
- <code title="get /projects/{id}/limits">client.projects.limits.<a href="./src/resources/projects/limits.ts">retrieve</a>(id) -> ProjectLimits</code>
328+
- <code title="patch /projects/{id}/limits">client.projects.limits.<a href="./src/resources/projects/limits.ts">update</a>(id, { ...params }) -> ProjectLimits</code>
329+
302330
# CredentialProviders
303331

304332
Types:

src/client.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,16 @@ import {
118118
Browsers,
119119
Profile,
120120
} 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';
121131
import { type Fetch } from './internal/builtin-types';
122132
import { HeadersLike, NullableHeaders, buildHeaders } from './internal/headers';
123133
import { FinalRequestOptions, RequestOptions } from './internal/request-options';
@@ -925,6 +935,10 @@ export class Kernel {
925935
* Create and manage credentials for authentication.
926936
*/
927937
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);
928942
/**
929943
* Configure external credential providers like 1Password.
930944
*/
@@ -941,6 +955,7 @@ Kernel.Proxies = Proxies;
941955
Kernel.Extensions = Extensions;
942956
Kernel.BrowserPools = BrowserPools;
943957
Kernel.Credentials = Credentials;
958+
Kernel.Projects = Projects;
944959
Kernel.CredentialProviders = CredentialProviders;
945960

946961
export declare namespace Kernel {
@@ -1057,6 +1072,17 @@ export declare namespace Kernel {
10571072
type CredentialListParams as CredentialListParams,
10581073
};
10591074

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+
10601086
export {
10611087
CredentialProviders as CredentialProviders,
10621088
type CreateCredentialProviderRequest as CreateCredentialProviderRequest,

src/resources/index.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,16 @@ export {
9696
type InvocationListResponsesOffsetPagination,
9797
} from './invocations';
9898
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';
99109
export {
100110
Proxies,
101111
type ProxyCreateResponse,

src/resources/projects.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
export * from './projects/index';

src/resources/projects/index.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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';

src/resources/projects/limits.ts

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
}

0 commit comments

Comments
 (0)