@onkernel/sdk 0.47.0 → 0.49.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 +23 -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/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 +17 -1
- package/resources/browsers/browsers.d.mts.map +1 -1
- package/resources/browsers/browsers.d.ts +17 -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/replays.d.mts +2 -1
- package/resources/browsers/replays.d.mts.map +1 -1
- package/resources/browsers/replays.d.ts +2 -1
- package/resources/browsers/replays.d.ts.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/browser-pools.ts +5 -0
- package/src/resources/browsers/browsers.ts +21 -1
- package/src/resources/browsers/replays.ts +2 -1
- 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 @@
|
|
|
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()
|
|
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
|
};
|
|
@@ -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.
|
|
@@ -821,7 +841,7 @@ export interface BrowserListParams extends OffsetPaginationParams {
|
|
|
821
841
|
include_deleted?: boolean;
|
|
822
842
|
|
|
823
843
|
/**
|
|
824
|
-
* Search browsers by session ID, profile ID, or
|
|
844
|
+
* Search browsers by session ID, profile ID, proxy ID, or pool name.
|
|
825
845
|
*/
|
|
826
846
|
query?: string;
|
|
827
847
|
|
|
@@ -143,7 +143,8 @@ export interface ReplayDownloadParams {
|
|
|
143
143
|
|
|
144
144
|
export interface ReplayStartParams {
|
|
145
145
|
/**
|
|
146
|
-
* Recording framerate in fps.
|
|
146
|
+
* Recording framerate in fps. Values above 20 require GPU to be enabled on the
|
|
147
|
+
* browser session.
|
|
147
148
|
*/
|
|
148
149
|
framerate?: number;
|
|
149
150
|
|
package/src/resources/index.ts
CHANGED
|
@@ -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
|
+
}
|
|
@@ -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.49.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.49.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.49.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.49.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|