casedev 0.52.0 → 0.53.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 +8 -0
- package/client.d.mts +0 -3
- package/client.d.mts.map +1 -1
- package/client.d.ts +0 -3
- package/client.d.ts.map +1 -1
- package/client.js +0 -3
- package/client.js.map +1 -1
- package/client.mjs +0 -3
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/index.d.mts +0 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +0 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +1 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +0 -1
- package/resources/index.mjs.map +1 -1
- package/src/client.ts +0 -5
- package/src/resources/index.ts +0 -1
- 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
- package/resources/applications/applications.d.mts +0 -10
- package/resources/applications/applications.d.mts.map +0 -1
- package/resources/applications/applications.d.ts +0 -10
- package/resources/applications/applications.d.ts.map +0 -1
- package/resources/applications/applications.js +0 -17
- package/resources/applications/applications.js.map +0 -1
- package/resources/applications/applications.mjs +0 -12
- package/resources/applications/applications.mjs.map +0 -1
- package/resources/applications/index.d.mts +0 -3
- package/resources/applications/index.d.mts.map +0 -1
- package/resources/applications/index.d.ts +0 -3
- package/resources/applications/index.d.ts.map +0 -1
- package/resources/applications/index.js +0 -9
- package/resources/applications/index.js.map +0 -1
- package/resources/applications/index.mjs +0 -4
- package/resources/applications/index.mjs.map +0 -1
- package/resources/applications/v1/deployments.d.mts +0 -118
- package/resources/applications/v1/deployments.d.mts.map +0 -1
- package/resources/applications/v1/deployments.d.ts +0 -118
- package/resources/applications/v1/deployments.d.ts.map +0 -1
- package/resources/applications/v1/deployments.js +0 -102
- package/resources/applications/v1/deployments.js.map +0 -1
- package/resources/applications/v1/deployments.mjs +0 -98
- package/resources/applications/v1/deployments.mjs.map +0 -1
- package/resources/applications/v1/index.d.mts +0 -5
- package/resources/applications/v1/index.d.mts.map +0 -1
- package/resources/applications/v1/index.d.ts +0 -5
- package/resources/applications/v1/index.d.ts.map +0 -1
- package/resources/applications/v1/index.js +0 -13
- package/resources/applications/v1/index.js.map +0 -1
- package/resources/applications/v1/index.mjs +0 -6
- package/resources/applications/v1/index.mjs.map +0 -1
- package/resources/applications/v1/projects.d.mts +0 -313
- package/resources/applications/v1/projects.d.mts.map +0 -1
- package/resources/applications/v1/projects.d.ts +0 -313
- package/resources/applications/v1/projects.d.ts.map +0 -1
- package/resources/applications/v1/projects.js +0 -148
- package/resources/applications/v1/projects.js.map +0 -1
- package/resources/applications/v1/projects.mjs +0 -144
- package/resources/applications/v1/projects.mjs.map +0 -1
- package/resources/applications/v1/v1.d.mts +0 -18
- package/resources/applications/v1/v1.d.mts.map +0 -1
- package/resources/applications/v1/v1.d.ts +0 -18
- package/resources/applications/v1/v1.d.ts.map +0 -1
- package/resources/applications/v1/v1.js +0 -25
- package/resources/applications/v1/v1.js.map +0 -1
- package/resources/applications/v1/v1.mjs +0 -20
- package/resources/applications/v1/v1.mjs.map +0 -1
- package/resources/applications/v1/workflows.d.mts +0 -22
- package/resources/applications/v1/workflows.d.mts.map +0 -1
- package/resources/applications/v1/workflows.d.ts +0 -22
- package/resources/applications/v1/workflows.d.ts.map +0 -1
- package/resources/applications/v1/workflows.js +0 -24
- package/resources/applications/v1/workflows.js.map +0 -1
- package/resources/applications/v1/workflows.mjs +0 -20
- package/resources/applications/v1/workflows.mjs.map +0 -1
- package/resources/applications/v1.d.mts +0 -2
- package/resources/applications/v1.d.mts.map +0 -1
- package/resources/applications/v1.d.ts +0 -2
- package/resources/applications/v1.d.ts.map +0 -1
- package/resources/applications/v1.js +0 -6
- package/resources/applications/v1.js.map +0 -1
- package/resources/applications/v1.mjs +0 -3
- package/resources/applications/v1.mjs.map +0 -1
- package/resources/applications.d.mts +0 -2
- package/resources/applications.d.mts.map +0 -1
- package/resources/applications.d.ts +0 -2
- package/resources/applications.d.ts.map +0 -1
- package/resources/applications.js +0 -6
- package/resources/applications.js.map +0 -1
- package/resources/applications.mjs +0 -3
- package/resources/applications.mjs.map +0 -1
- package/src/resources/applications/applications.ts +0 -15
- package/src/resources/applications/index.ts +0 -4
- package/src/resources/applications/v1/deployments.ts +0 -196
- package/src/resources/applications/v1/index.ts +0 -28
- package/src/resources/applications/v1/projects.ts +0 -493
- package/src/resources/applications/v1/v1.ts +0 -71
- package/src/resources/applications/v1/workflows.ts +0 -34
- package/src/resources/applications/v1.ts +0 -3
- package/src/resources/applications.ts +0 -3
|
@@ -1,196 +0,0 @@
|
|
|
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 { buildHeaders } from '../../../internal/headers';
|
|
6
|
-
import { RequestOptions } from '../../../internal/request-options';
|
|
7
|
-
import { path } from '../../../internal/utils/path';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Web application deployment management
|
|
11
|
-
*/
|
|
12
|
-
export class Deployments extends APIResource {
|
|
13
|
-
/**
|
|
14
|
-
* Creates a deployment for an existing project by fetching repository files from
|
|
15
|
-
* GitHub and uploading them to the hosting provider. Use ref to deploy a branch,
|
|
16
|
-
* tag, or commit other than the project default branch.
|
|
17
|
-
*/
|
|
18
|
-
create(body: DeploymentCreateParams, options?: RequestOptions): APIPromise<void> {
|
|
19
|
-
return this._client.post('/applications/v1/deployments', {
|
|
20
|
-
body,
|
|
21
|
-
...options,
|
|
22
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Returns deployment details for one project in the authenticated organization.
|
|
28
|
-
* Set includeLogs=true to include recent build output in the response.
|
|
29
|
-
*/
|
|
30
|
-
retrieve(id: string, query: DeploymentRetrieveParams, options?: RequestOptions): APIPromise<void> {
|
|
31
|
-
return this._client.get(path`/applications/v1/deployments/${id}`, {
|
|
32
|
-
query,
|
|
33
|
-
...options,
|
|
34
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Lists recent deployments for one project in the authenticated organization. Use
|
|
40
|
-
* the optional filters to narrow results by target or deployment state.
|
|
41
|
-
*/
|
|
42
|
-
list(query: DeploymentListParams, options?: RequestOptions): APIPromise<void> {
|
|
43
|
-
return this._client.get('/applications/v1/deployments', {
|
|
44
|
-
query,
|
|
45
|
-
...options,
|
|
46
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Cancels a running deployment after verifying that the referenced project belongs
|
|
52
|
-
* to the authenticated organization. Use this when a build is stuck,
|
|
53
|
-
* misconfigured, or no longer needed.
|
|
54
|
-
*/
|
|
55
|
-
cancel(id: string, body: DeploymentCancelParams, options?: RequestOptions): APIPromise<void> {
|
|
56
|
-
return this._client.post(path`/applications/v1/deployments/${id}/cancel`, {
|
|
57
|
-
body,
|
|
58
|
-
...options,
|
|
59
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Create a deployment from raw file contents for application deployments
|
|
65
|
-
*/
|
|
66
|
-
createFromFiles(options?: RequestOptions): APIPromise<void> {
|
|
67
|
-
return this._client.post('/applications/v1/deployments/from-files', {
|
|
68
|
-
...options,
|
|
69
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* Returns build and runtime log events for a deployment after verifying access to
|
|
75
|
-
* the owning project. Use this when you need detailed output for a failed or
|
|
76
|
-
* in-progress build.
|
|
77
|
-
*/
|
|
78
|
-
getLogs(id: string, query: DeploymentGetLogsParams, options?: RequestOptions): APIPromise<void> {
|
|
79
|
-
return this._client.get(path`/applications/v1/deployments/${id}/logs`, {
|
|
80
|
-
query,
|
|
81
|
-
...options,
|
|
82
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* Returns the current status of a deployment without fetching full build logs. Use
|
|
88
|
-
* this endpoint for lightweight polling while a deployment is building or waiting
|
|
89
|
-
* to become ready.
|
|
90
|
-
*/
|
|
91
|
-
getStatus(id: string, options?: RequestOptions): APIPromise<void> {
|
|
92
|
-
return this._client.get(path`/applications/v1/deployments/${id}/status`, {
|
|
93
|
-
...options,
|
|
94
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Stream real-time deployment progress events via Server-Sent Events
|
|
100
|
-
*/
|
|
101
|
-
stream(id: string, query: DeploymentStreamParams, options?: RequestOptions): APIPromise<void> {
|
|
102
|
-
return this._client.get(path`/applications/v1/deployments/${id}/stream`, {
|
|
103
|
-
query,
|
|
104
|
-
...options,
|
|
105
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
export interface DeploymentCreateParams {
|
|
111
|
-
/**
|
|
112
|
-
* Project ID to deploy
|
|
113
|
-
*/
|
|
114
|
-
projectId: string;
|
|
115
|
-
|
|
116
|
-
/**
|
|
117
|
-
* Git branch, tag, or commit to deploy. Defaults to the project branch.
|
|
118
|
-
*/
|
|
119
|
-
ref?: string;
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* Deployment target environment
|
|
123
|
-
*/
|
|
124
|
-
target?: 'production' | 'preview';
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
export interface DeploymentRetrieveParams {
|
|
128
|
-
/**
|
|
129
|
-
* Project ID used to verify access to the deployment
|
|
130
|
-
*/
|
|
131
|
-
projectId: string;
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* Whether to include build logs in the response
|
|
135
|
-
*/
|
|
136
|
-
includeLogs?: boolean;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
export interface DeploymentListParams {
|
|
140
|
-
/**
|
|
141
|
-
* Project ID to list deployments for
|
|
142
|
-
*/
|
|
143
|
-
projectId: string;
|
|
144
|
-
|
|
145
|
-
/**
|
|
146
|
-
* Maximum number of deployments to return
|
|
147
|
-
*/
|
|
148
|
-
limit?: number;
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* Deployment state to filter by
|
|
152
|
-
*/
|
|
153
|
-
state?: string;
|
|
154
|
-
|
|
155
|
-
/**
|
|
156
|
-
* Deployment target to filter by
|
|
157
|
-
*/
|
|
158
|
-
target?: 'production' | 'staging';
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
export interface DeploymentCancelParams {
|
|
162
|
-
/**
|
|
163
|
-
* Project ID used to verify access to the deployment
|
|
164
|
-
*/
|
|
165
|
-
projectId: string;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
export interface DeploymentGetLogsParams {
|
|
169
|
-
/**
|
|
170
|
-
* Project ID used to verify access to the deployment
|
|
171
|
-
*/
|
|
172
|
-
projectId: string;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
export interface DeploymentStreamParams {
|
|
176
|
-
/**
|
|
177
|
-
* Project ID (for authorization)
|
|
178
|
-
*/
|
|
179
|
-
projectId: string;
|
|
180
|
-
|
|
181
|
-
/**
|
|
182
|
-
* Resume stream from this index (for reconnection)
|
|
183
|
-
*/
|
|
184
|
-
startIndex?: number;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
export declare namespace Deployments {
|
|
188
|
-
export {
|
|
189
|
-
type DeploymentCreateParams as DeploymentCreateParams,
|
|
190
|
-
type DeploymentRetrieveParams as DeploymentRetrieveParams,
|
|
191
|
-
type DeploymentListParams as DeploymentListParams,
|
|
192
|
-
type DeploymentCancelParams as DeploymentCancelParams,
|
|
193
|
-
type DeploymentGetLogsParams as DeploymentGetLogsParams,
|
|
194
|
-
type DeploymentStreamParams as DeploymentStreamParams,
|
|
195
|
-
};
|
|
196
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
export {
|
|
4
|
-
Deployments,
|
|
5
|
-
type DeploymentCreateParams,
|
|
6
|
-
type DeploymentRetrieveParams,
|
|
7
|
-
type DeploymentListParams,
|
|
8
|
-
type DeploymentCancelParams,
|
|
9
|
-
type DeploymentGetLogsParams,
|
|
10
|
-
type DeploymentStreamParams,
|
|
11
|
-
} from './deployments';
|
|
12
|
-
export {
|
|
13
|
-
Projects,
|
|
14
|
-
type ProjectListResponse,
|
|
15
|
-
type ProjectCreateParams,
|
|
16
|
-
type ProjectListParams,
|
|
17
|
-
type ProjectDeleteParams,
|
|
18
|
-
type ProjectCreateDeploymentParams,
|
|
19
|
-
type ProjectCreateDomainParams,
|
|
20
|
-
type ProjectCreateEnvParams,
|
|
21
|
-
type ProjectDeleteDomainParams,
|
|
22
|
-
type ProjectDeleteEnvParams,
|
|
23
|
-
type ProjectGetRuntimeLogsParams,
|
|
24
|
-
type ProjectListDeploymentsParams,
|
|
25
|
-
type ProjectListEnvParams,
|
|
26
|
-
} from './projects';
|
|
27
|
-
export { V1 } from './v1';
|
|
28
|
-
export { Workflows, type WorkflowGetStatusParams } from './workflows';
|
|
@@ -1,493 +0,0 @@
|
|
|
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 { buildHeaders } from '../../../internal/headers';
|
|
6
|
-
import { RequestOptions } from '../../../internal/request-options';
|
|
7
|
-
import { path } from '../../../internal/utils/path';
|
|
8
|
-
|
|
9
|
-
export class Projects extends APIResource {
|
|
10
|
-
/**
|
|
11
|
-
* Creates a new application project, validates GitHub access, provisions a default
|
|
12
|
-
* case.dev domain, and starts the deployment workflow. The initial response
|
|
13
|
-
* returns as soon as the workflow is queued so clients can poll for progress.
|
|
14
|
-
*/
|
|
15
|
-
create(body: ProjectCreateParams, options?: RequestOptions): APIPromise<void> {
|
|
16
|
-
return this._client.post('/applications/v1/projects', {
|
|
17
|
-
body,
|
|
18
|
-
...options,
|
|
19
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Returns project details, domains, and recent deployment information for one
|
|
25
|
-
* application project. Use this endpoint when you need a single record with
|
|
26
|
-
* hosting metadata for a details view.
|
|
27
|
-
*/
|
|
28
|
-
retrieve(id: string, options?: RequestOptions): APIPromise<void> {
|
|
29
|
-
return this._client.get(path`/applications/v1/projects/${id}`, {
|
|
30
|
-
...options,
|
|
31
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Lists application projects for the authenticated organization. Use enrich=true
|
|
37
|
-
* to include additional hosting metadata for projects linked to Vercel.
|
|
38
|
-
*/
|
|
39
|
-
list(
|
|
40
|
-
query: ProjectListParams | null | undefined = {},
|
|
41
|
-
options?: RequestOptions,
|
|
42
|
-
): APIPromise<ProjectListResponse> {
|
|
43
|
-
return this._client.get('/applications/v1/projects', { query, ...options });
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Soft-deletes an application project from Case.dev. By default it also removes
|
|
48
|
-
* the linked hosting project; set deleteFromHosting=false to keep the external
|
|
49
|
-
* hosting resources intact.
|
|
50
|
-
*/
|
|
51
|
-
delete(
|
|
52
|
-
id: string,
|
|
53
|
-
params: ProjectDeleteParams | null | undefined = {},
|
|
54
|
-
options?: RequestOptions,
|
|
55
|
-
): APIPromise<void> {
|
|
56
|
-
const { deleteFromHosting } = params ?? {};
|
|
57
|
-
return this._client.delete(path`/applications/v1/projects/${id}`, {
|
|
58
|
-
query: { deleteFromHosting },
|
|
59
|
-
...options,
|
|
60
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Starts a new deployment for an existing project using its saved repository and
|
|
66
|
-
* hosting configuration. Any environment variables passed in the request are
|
|
67
|
-
* merged into the deployment workflow before the build starts.
|
|
68
|
-
*/
|
|
69
|
-
createDeployment(
|
|
70
|
-
id: string,
|
|
71
|
-
body: ProjectCreateDeploymentParams | null | undefined = {},
|
|
72
|
-
options?: RequestOptions,
|
|
73
|
-
): APIPromise<void> {
|
|
74
|
-
return this._client.post(path`/applications/v1/projects/${id}/deployments`, {
|
|
75
|
-
body,
|
|
76
|
-
...options,
|
|
77
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* Add a custom domain to a project
|
|
83
|
-
*/
|
|
84
|
-
createDomain(id: string, body: ProjectCreateDomainParams, options?: RequestOptions): APIPromise<void> {
|
|
85
|
-
return this._client.post(path`/applications/v1/projects/${id}/domains`, {
|
|
86
|
-
body,
|
|
87
|
-
...options,
|
|
88
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* Create a new environment variable for a project
|
|
94
|
-
*/
|
|
95
|
-
createEnv(id: string, body: ProjectCreateEnvParams, options?: RequestOptions): APIPromise<void> {
|
|
96
|
-
return this._client.post(path`/applications/v1/projects/${id}/env`, {
|
|
97
|
-
body,
|
|
98
|
-
...options,
|
|
99
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* Remove a domain from a project
|
|
105
|
-
*/
|
|
106
|
-
deleteDomain(
|
|
107
|
-
domain: string,
|
|
108
|
-
params: ProjectDeleteDomainParams,
|
|
109
|
-
options?: RequestOptions,
|
|
110
|
-
): APIPromise<void> {
|
|
111
|
-
const { id } = params;
|
|
112
|
-
return this._client.delete(path`/applications/v1/projects/${id}/domains/${domain}`, {
|
|
113
|
-
...options,
|
|
114
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* Delete an environment variable from a project
|
|
120
|
-
*/
|
|
121
|
-
deleteEnv(envID: string, params: ProjectDeleteEnvParams, options?: RequestOptions): APIPromise<void> {
|
|
122
|
-
const { id } = params;
|
|
123
|
-
return this._client.delete(path`/applications/v1/projects/${id}/env/${envID}`, {
|
|
124
|
-
...options,
|
|
125
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* Get runtime/function logs for a project
|
|
131
|
-
*/
|
|
132
|
-
getRuntimeLogs(
|
|
133
|
-
id: string,
|
|
134
|
-
query: ProjectGetRuntimeLogsParams | null | undefined = {},
|
|
135
|
-
options?: RequestOptions,
|
|
136
|
-
): APIPromise<void> {
|
|
137
|
-
return this._client.get(path`/applications/v1/projects/${id}/runtime-logs`, {
|
|
138
|
-
query,
|
|
139
|
-
...options,
|
|
140
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
141
|
-
});
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* Lists deployments for one project in the authenticated organization. If the
|
|
146
|
-
* hosting project has not been created yet, this endpoint returns an empty list
|
|
147
|
-
* with a progress message instead of failing.
|
|
148
|
-
*/
|
|
149
|
-
listDeployments(
|
|
150
|
-
id: string,
|
|
151
|
-
query: ProjectListDeploymentsParams | null | undefined = {},
|
|
152
|
-
options?: RequestOptions,
|
|
153
|
-
): APIPromise<void> {
|
|
154
|
-
return this._client.get(path`/applications/v1/projects/${id}/deployments`, {
|
|
155
|
-
query,
|
|
156
|
-
...options,
|
|
157
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* List all domains configured for a project
|
|
163
|
-
*/
|
|
164
|
-
listDomains(id: string, options?: RequestOptions): APIPromise<void> {
|
|
165
|
-
return this._client.get(path`/applications/v1/projects/${id}/domains`, {
|
|
166
|
-
...options,
|
|
167
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
168
|
-
});
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
/**
|
|
172
|
-
* List all environment variables for a project (values are hidden unless
|
|
173
|
-
* decrypt=true)
|
|
174
|
-
*/
|
|
175
|
-
listEnv(
|
|
176
|
-
id: string,
|
|
177
|
-
query: ProjectListEnvParams | null | undefined = {},
|
|
178
|
-
options?: RequestOptions,
|
|
179
|
-
): APIPromise<void> {
|
|
180
|
-
return this._client.get(path`/applications/v1/projects/${id}/env`, {
|
|
181
|
-
query,
|
|
182
|
-
...options,
|
|
183
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
184
|
-
});
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
export interface ProjectListResponse {
|
|
189
|
-
/**
|
|
190
|
-
* Projects and deployed apps visible to the organization
|
|
191
|
-
*/
|
|
192
|
-
projects?: Array<ProjectListResponse.Project>;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
export namespace ProjectListResponse {
|
|
196
|
-
export interface Project {
|
|
197
|
-
/**
|
|
198
|
-
* Project identifier
|
|
199
|
-
*/
|
|
200
|
-
id?: string;
|
|
201
|
-
|
|
202
|
-
/**
|
|
203
|
-
* When the project record was created
|
|
204
|
-
*/
|
|
205
|
-
createdAt?: string;
|
|
206
|
-
|
|
207
|
-
/**
|
|
208
|
-
* Custom or generated domains assigned to the project
|
|
209
|
-
*/
|
|
210
|
-
domains?: Array<Project.Domain>;
|
|
211
|
-
|
|
212
|
-
/**
|
|
213
|
-
* Detected or configured application framework
|
|
214
|
-
*/
|
|
215
|
-
framework?: string;
|
|
216
|
-
|
|
217
|
-
/**
|
|
218
|
-
* Default Git branch used for deployments
|
|
219
|
-
*/
|
|
220
|
-
gitBranch?: string;
|
|
221
|
-
|
|
222
|
-
/**
|
|
223
|
-
* Connected Git repository in owner/repo format
|
|
224
|
-
*/
|
|
225
|
-
gitRepo?: string;
|
|
226
|
-
|
|
227
|
-
/**
|
|
228
|
-
* Project display name
|
|
229
|
-
*/
|
|
230
|
-
name?: string;
|
|
231
|
-
|
|
232
|
-
/**
|
|
233
|
-
* Current project deployment status
|
|
234
|
-
*/
|
|
235
|
-
status?: string;
|
|
236
|
-
|
|
237
|
-
/**
|
|
238
|
-
* When the project record was last updated
|
|
239
|
-
*/
|
|
240
|
-
updatedAt?: string;
|
|
241
|
-
|
|
242
|
-
/**
|
|
243
|
-
* Hosting provider project ID, when linked
|
|
244
|
-
*/
|
|
245
|
-
vercelProjectId?: string;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
export namespace Project {
|
|
249
|
-
export interface Domain {
|
|
250
|
-
/**
|
|
251
|
-
* Domain record identifier
|
|
252
|
-
*/
|
|
253
|
-
id?: string;
|
|
254
|
-
|
|
255
|
-
/**
|
|
256
|
-
* Hostname assigned to the project
|
|
257
|
-
*/
|
|
258
|
-
domain?: string;
|
|
259
|
-
|
|
260
|
-
/**
|
|
261
|
-
* Whether this is the primary project domain
|
|
262
|
-
*/
|
|
263
|
-
isPrimary?: boolean;
|
|
264
|
-
|
|
265
|
-
/**
|
|
266
|
-
* Whether the domain has been verified by the hosting provider
|
|
267
|
-
*/
|
|
268
|
-
isVerified?: boolean;
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
export interface ProjectCreateParams {
|
|
274
|
-
/**
|
|
275
|
-
* GitHub repository URL or owner/repo identifier
|
|
276
|
-
*/
|
|
277
|
-
gitRepo: string;
|
|
278
|
-
|
|
279
|
-
/**
|
|
280
|
-
* Human-readable project name
|
|
281
|
-
*/
|
|
282
|
-
name: string;
|
|
283
|
-
|
|
284
|
-
/**
|
|
285
|
-
* Custom build command to override the framework default
|
|
286
|
-
*/
|
|
287
|
-
buildCommand?: string;
|
|
288
|
-
|
|
289
|
-
/**
|
|
290
|
-
* Environment variables to create before the first deployment
|
|
291
|
-
*/
|
|
292
|
-
environmentVariables?: Array<ProjectCreateParams.EnvironmentVariable>;
|
|
293
|
-
|
|
294
|
-
/**
|
|
295
|
-
* Framework preset for the hosting project, such as nextjs or remix
|
|
296
|
-
*/
|
|
297
|
-
framework?: string;
|
|
298
|
-
|
|
299
|
-
/**
|
|
300
|
-
* Git branch to deploy. Defaults to main.
|
|
301
|
-
*/
|
|
302
|
-
gitBranch?: string;
|
|
303
|
-
|
|
304
|
-
/**
|
|
305
|
-
* Custom install command to override the framework default
|
|
306
|
-
*/
|
|
307
|
-
installCommand?: string;
|
|
308
|
-
|
|
309
|
-
/**
|
|
310
|
-
* Build output directory relative to the project root
|
|
311
|
-
*/
|
|
312
|
-
outputDirectory?: string;
|
|
313
|
-
|
|
314
|
-
/**
|
|
315
|
-
* Repository subdirectory that contains the app to deploy
|
|
316
|
-
*/
|
|
317
|
-
rootDirectory?: string;
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
export namespace ProjectCreateParams {
|
|
321
|
-
export interface EnvironmentVariable {
|
|
322
|
-
/**
|
|
323
|
-
* Environment variable name
|
|
324
|
-
*/
|
|
325
|
-
key: string;
|
|
326
|
-
|
|
327
|
-
/**
|
|
328
|
-
* Deployment targets that should receive this variable
|
|
329
|
-
*/
|
|
330
|
-
target: Array<'production' | 'preview' | 'development'>;
|
|
331
|
-
|
|
332
|
-
/**
|
|
333
|
-
* Environment variable value
|
|
334
|
-
*/
|
|
335
|
-
value: string;
|
|
336
|
-
|
|
337
|
-
/**
|
|
338
|
-
* Storage mode for the environment variable value
|
|
339
|
-
*/
|
|
340
|
-
type?: 'plain' | 'encrypted' | 'secret';
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
export interface ProjectListParams {
|
|
345
|
-
/**
|
|
346
|
-
* Whether to include additional hosting metadata from Vercel
|
|
347
|
-
*/
|
|
348
|
-
enrich?: boolean;
|
|
349
|
-
|
|
350
|
-
/**
|
|
351
|
-
* Maximum number of projects to return from each backing source
|
|
352
|
-
*/
|
|
353
|
-
limit?: number;
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
export interface ProjectDeleteParams {
|
|
357
|
-
/**
|
|
358
|
-
* Whether to also delete the linked hosting project. Defaults to true.
|
|
359
|
-
*/
|
|
360
|
-
deleteFromHosting?: boolean;
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
export interface ProjectCreateDeploymentParams {
|
|
364
|
-
/**
|
|
365
|
-
* Additional environment variables to set or update before deployment
|
|
366
|
-
*/
|
|
367
|
-
environmentVariables?: Array<ProjectCreateDeploymentParams.EnvironmentVariable>;
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
export namespace ProjectCreateDeploymentParams {
|
|
371
|
-
export interface EnvironmentVariable {
|
|
372
|
-
/**
|
|
373
|
-
* Environment variable name
|
|
374
|
-
*/
|
|
375
|
-
key: string;
|
|
376
|
-
|
|
377
|
-
/**
|
|
378
|
-
* Deployment targets that should receive this variable
|
|
379
|
-
*/
|
|
380
|
-
target: Array<'production' | 'preview' | 'development'>;
|
|
381
|
-
|
|
382
|
-
/**
|
|
383
|
-
* Environment variable value
|
|
384
|
-
*/
|
|
385
|
-
value: string;
|
|
386
|
-
|
|
387
|
-
/**
|
|
388
|
-
* Storage mode for the environment variable value
|
|
389
|
-
*/
|
|
390
|
-
type?: 'plain' | 'encrypted' | 'secret';
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
export interface ProjectCreateDomainParams {
|
|
395
|
-
/**
|
|
396
|
-
* Domain name to add
|
|
397
|
-
*/
|
|
398
|
-
domain: string;
|
|
399
|
-
|
|
400
|
-
/**
|
|
401
|
-
* Git branch to associate with this domain
|
|
402
|
-
*/
|
|
403
|
-
gitBranch?: string;
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
export interface ProjectCreateEnvParams {
|
|
407
|
-
/**
|
|
408
|
-
* Environment variable name
|
|
409
|
-
*/
|
|
410
|
-
key: string;
|
|
411
|
-
|
|
412
|
-
/**
|
|
413
|
-
* Deployment targets for this variable
|
|
414
|
-
*/
|
|
415
|
-
target: Array<'production' | 'preview' | 'development'>;
|
|
416
|
-
|
|
417
|
-
/**
|
|
418
|
-
* Environment variable value
|
|
419
|
-
*/
|
|
420
|
-
value: string;
|
|
421
|
-
|
|
422
|
-
/**
|
|
423
|
-
* Specific git branch (for preview deployments)
|
|
424
|
-
*/
|
|
425
|
-
gitBranch?: string;
|
|
426
|
-
|
|
427
|
-
/**
|
|
428
|
-
* Variable type
|
|
429
|
-
*/
|
|
430
|
-
type?: 'plain' | 'encrypted' | 'secret';
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
export interface ProjectDeleteDomainParams {
|
|
434
|
-
/**
|
|
435
|
-
* Project ID
|
|
436
|
-
*/
|
|
437
|
-
id: string;
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
export interface ProjectDeleteEnvParams {
|
|
441
|
-
/**
|
|
442
|
-
* Project ID
|
|
443
|
-
*/
|
|
444
|
-
id: string;
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
export interface ProjectGetRuntimeLogsParams {
|
|
448
|
-
/**
|
|
449
|
-
* Maximum number of logs to return
|
|
450
|
-
*/
|
|
451
|
-
limit?: number;
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
export interface ProjectListDeploymentsParams {
|
|
455
|
-
/**
|
|
456
|
-
* Maximum number of deployments to return
|
|
457
|
-
*/
|
|
458
|
-
limit?: number;
|
|
459
|
-
|
|
460
|
-
/**
|
|
461
|
-
* Deployment state to filter by
|
|
462
|
-
*/
|
|
463
|
-
state?: string;
|
|
464
|
-
|
|
465
|
-
/**
|
|
466
|
-
* Deployment target to filter by
|
|
467
|
-
*/
|
|
468
|
-
target?: 'production' | 'staging';
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
export interface ProjectListEnvParams {
|
|
472
|
-
/**
|
|
473
|
-
* Whether to decrypt and return values (requires appropriate permissions)
|
|
474
|
-
*/
|
|
475
|
-
decrypt?: boolean;
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
export declare namespace Projects {
|
|
479
|
-
export {
|
|
480
|
-
type ProjectListResponse as ProjectListResponse,
|
|
481
|
-
type ProjectCreateParams as ProjectCreateParams,
|
|
482
|
-
type ProjectListParams as ProjectListParams,
|
|
483
|
-
type ProjectDeleteParams as ProjectDeleteParams,
|
|
484
|
-
type ProjectCreateDeploymentParams as ProjectCreateDeploymentParams,
|
|
485
|
-
type ProjectCreateDomainParams as ProjectCreateDomainParams,
|
|
486
|
-
type ProjectCreateEnvParams as ProjectCreateEnvParams,
|
|
487
|
-
type ProjectDeleteDomainParams as ProjectDeleteDomainParams,
|
|
488
|
-
type ProjectDeleteEnvParams as ProjectDeleteEnvParams,
|
|
489
|
-
type ProjectGetRuntimeLogsParams as ProjectGetRuntimeLogsParams,
|
|
490
|
-
type ProjectListDeploymentsParams as ProjectListDeploymentsParams,
|
|
491
|
-
type ProjectListEnvParams as ProjectListEnvParams,
|
|
492
|
-
};
|
|
493
|
-
}
|