@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.
- package/CHANGELOG.md +22 -0
- package/client.d.mts +6 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +6 -0
- package/client.d.ts.map +1 -1
- package/client.js +6 -0
- package/client.js.map +1 -1
- package/client.mjs +6 -0
- package/client.mjs.map +1 -1
- package/internal/utils/env.js +2 -2
- package/internal/utils/env.js.map +1 -1
- package/internal/utils/env.mjs +2 -2
- package/internal/utils/env.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/auth/connections.d.mts +11 -4
- package/resources/auth/connections.d.mts.map +1 -1
- package/resources/auth/connections.d.ts +11 -4
- package/resources/auth/connections.d.ts.map +1 -1
- package/resources/auth/connections.js +3 -2
- package/resources/auth/connections.js.map +1 -1
- package/resources/auth/connections.mjs +3 -2
- package/resources/auth/connections.mjs.map +1 -1
- package/resources/browser-pools.d.mts +4 -0
- package/resources/browser-pools.d.mts.map +1 -1
- package/resources/browser-pools.d.ts +4 -0
- package/resources/browser-pools.d.ts.map +1 -1
- package/resources/browsers/browsers.d.mts +16 -0
- package/resources/browsers/browsers.d.mts.map +1 -1
- package/resources/browsers/browsers.d.ts +16 -0
- 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/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 +4 -0
- package/resources/invocations.d.mts.map +1 -1
- package/resources/invocations.d.ts +4 -0
- package/resources/invocations.d.ts.map +1 -1
- package/resources/projects/index.d.mts +3 -0
- package/resources/projects/index.d.mts.map +1 -0
- package/resources/projects/index.d.ts +3 -0
- package/resources/projects/index.d.ts.map +1 -0
- package/resources/projects/index.js +9 -0
- package/resources/projects/index.js.map +1 -0
- package/resources/projects/index.mjs +4 -0
- package/resources/projects/index.mjs.map +1 -0
- package/resources/projects/limits.d.mts +103 -0
- package/resources/projects/limits.d.mts.map +1 -0
- package/resources/projects/limits.d.ts +103 -0
- package/resources/projects/limits.d.ts.map +1 -0
- package/resources/projects/limits.js +42 -0
- package/resources/projects/limits.js.map +1 -0
- package/resources/projects/limits.mjs +38 -0
- package/resources/projects/limits.mjs.map +1 -0
- package/resources/projects/projects.d.mts +125 -0
- package/resources/projects/projects.d.mts.map +1 -0
- package/resources/projects/projects.d.ts +125 -0
- package/resources/projects/projects.d.ts.map +1 -0
- package/resources/projects/projects.js +87 -0
- package/resources/projects/projects.js.map +1 -0
- package/resources/projects/projects.mjs +82 -0
- package/resources/projects/projects.mjs.map +1 -0
- package/resources/projects.d.mts +2 -0
- package/resources/projects.d.mts.map +1 -0
- package/resources/projects.d.ts +2 -0
- package/resources/projects.d.ts.map +1 -0
- package/resources/projects.js +6 -0
- package/resources/projects.js.map +1 -0
- package/resources/projects.mjs +3 -0
- package/resources/projects.mjs.map +1 -0
- package/src/client.ts +26 -0
- package/src/internal/utils/env.ts +2 -2
- package/src/resources/auth/connections.ts +12 -4
- package/src/resources/browser-pools.ts +5 -0
- package/src/resources/browsers/browsers.ts +20 -0
- package/src/resources/index.ts +10 -0
- package/src/resources/invocations.ts +5 -0
- package/src/resources/projects/index.ts +18 -0
- package/src/resources/projects/limits.ts +128 -0
- package/src/resources/projects/projects.ts +179 -0
- package/src/resources/projects.ts +3 -0
- 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
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import * as LimitsAPI from './limits';
|
|
5
|
+
import { LimitUpdateParams, Limits, ProjectLimits, UpdateProjectLimitsRequest } from './limits';
|
|
6
|
+
import { APIPromise } from '../../core/api-promise';
|
|
7
|
+
import { OffsetPagination, type OffsetPaginationParams, PagePromise } from '../../core/pagination';
|
|
8
|
+
import { buildHeaders } from '../../internal/headers';
|
|
9
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
10
|
+
import { path } from '../../internal/utils/path';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Create and manage projects for resource isolation within an organization.
|
|
14
|
+
*/
|
|
15
|
+
export class Projects extends APIResource {
|
|
16
|
+
limits: LimitsAPI.Limits = new LimitsAPI.Limits(this._client);
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Create a new project within the authenticated organization. Requires a paid plan
|
|
20
|
+
* and the projects feature flag.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const project = await client.projects.create({
|
|
25
|
+
* name: 'staging',
|
|
26
|
+
* });
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
create(body: ProjectCreateParams, options?: RequestOptions): APIPromise<Project> {
|
|
30
|
+
return this._client.post('/projects', { body, ...options });
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Get a project by ID.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* const project = await client.projects.retrieve('id');
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<Project> {
|
|
42
|
+
return this._client.get(path`/projects/${id}`, options);
|
|
43
|
+
}
|
|
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: string, body: ProjectUpdateParams, options?: RequestOptions): APIPromise<Project> {
|
|
54
|
+
return this._client.patch(path`/projects/${id}`, { body, ...options });
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* List projects for the authenticated organization.
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```ts
|
|
62
|
+
* // Automatically fetches more pages as needed.
|
|
63
|
+
* for await (const project of client.projects.list()) {
|
|
64
|
+
* // ...
|
|
65
|
+
* }
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
list(
|
|
69
|
+
query: ProjectListParams | null | undefined = {},
|
|
70
|
+
options?: RequestOptions,
|
|
71
|
+
): PagePromise<ProjectsOffsetPagination, Project> {
|
|
72
|
+
return this._client.getAPIList('/projects', OffsetPagination<Project>, { query, ...options });
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Soft-delete a project. The project must be empty (no active resources).
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* ```ts
|
|
80
|
+
* await client.projects.delete('id');
|
|
81
|
+
* ```
|
|
82
|
+
*/
|
|
83
|
+
delete(id: string, options?: RequestOptions): APIPromise<void> {
|
|
84
|
+
return this._client.delete(path`/projects/${id}`, {
|
|
85
|
+
...options,
|
|
86
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export type ProjectsOffsetPagination = OffsetPagination<Project>;
|
|
92
|
+
|
|
93
|
+
export interface CreateProjectRequest {
|
|
94
|
+
/**
|
|
95
|
+
* Project name (1-255 characters)
|
|
96
|
+
*/
|
|
97
|
+
name: string;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export interface Project {
|
|
101
|
+
/**
|
|
102
|
+
* Unique project identifier
|
|
103
|
+
*/
|
|
104
|
+
id: string;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* When the project was created
|
|
108
|
+
*/
|
|
109
|
+
created_at: string;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Project name
|
|
113
|
+
*/
|
|
114
|
+
name: string;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Project status
|
|
118
|
+
*/
|
|
119
|
+
status: 'active' | 'archived';
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* When the project was last updated
|
|
123
|
+
*/
|
|
124
|
+
updated_at: string;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export interface UpdateProjectRequest {
|
|
128
|
+
/**
|
|
129
|
+
* New project name
|
|
130
|
+
*/
|
|
131
|
+
name?: string;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* New project status
|
|
135
|
+
*/
|
|
136
|
+
status?: 'active' | 'archived';
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export interface ProjectCreateParams {
|
|
140
|
+
/**
|
|
141
|
+
* Project name (1-255 characters)
|
|
142
|
+
*/
|
|
143
|
+
name: string;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export interface ProjectUpdateParams {
|
|
147
|
+
/**
|
|
148
|
+
* New project name
|
|
149
|
+
*/
|
|
150
|
+
name?: string;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* New project status
|
|
154
|
+
*/
|
|
155
|
+
status?: 'active' | 'archived';
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export interface ProjectListParams extends OffsetPaginationParams {}
|
|
159
|
+
|
|
160
|
+
Projects.Limits = Limits;
|
|
161
|
+
|
|
162
|
+
export declare namespace Projects {
|
|
163
|
+
export {
|
|
164
|
+
type CreateProjectRequest as CreateProjectRequest,
|
|
165
|
+
type Project as Project,
|
|
166
|
+
type UpdateProjectRequest as UpdateProjectRequest,
|
|
167
|
+
type ProjectsOffsetPagination as ProjectsOffsetPagination,
|
|
168
|
+
type ProjectCreateParams as ProjectCreateParams,
|
|
169
|
+
type ProjectUpdateParams as ProjectUpdateParams,
|
|
170
|
+
type ProjectListParams as ProjectListParams,
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
export {
|
|
174
|
+
Limits as Limits,
|
|
175
|
+
type ProjectLimits as ProjectLimits,
|
|
176
|
+
type UpdateProjectLimitsRequest as UpdateProjectLimitsRequest,
|
|
177
|
+
type LimitUpdateParams as LimitUpdateParams,
|
|
178
|
+
};
|
|
179
|
+
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.48.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.48.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.48.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.48.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|