vercel-api-js 0.1.1 → 0.1.3
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/.turbo/turbo-build.log +10 -0
- package/CHANGELOG.md +12 -0
- package/dist/index.cjs +260 -255
- package/dist/index.d.ts +1664 -905
- package/dist/index.mjs +260 -255
- package/package.json +2 -30
- package/tsconfig.json +17 -101
- package/.nvmrc +0 -1
package/dist/index.cjs
CHANGED
|
@@ -28,13 +28,13 @@ function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
|
28
28
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
const baseUrl =
|
|
32
|
-
async function fetch$1({ url, method, body, headers, pathParams, queryParams, signal, token, fetchImpl
|
|
31
|
+
const baseUrl = 'https://api.vercel.com';
|
|
32
|
+
async function fetch$1({ url, method, body, headers, pathParams, queryParams, signal, token, fetchImpl }) {
|
|
33
33
|
try {
|
|
34
34
|
const requestHeaders = {
|
|
35
|
-
|
|
35
|
+
'Content-Type': 'application/json',
|
|
36
36
|
Authorization: `Bearer ${token}`,
|
|
37
|
-
...headers
|
|
37
|
+
...headers
|
|
38
38
|
};
|
|
39
39
|
/**
|
|
40
40
|
* As the fetch API is being used, when multipart/form-data is specified
|
|
@@ -42,14 +42,14 @@ async function fetch$1({ url, method, body, headers, pathParams, queryParams, si
|
|
|
42
42
|
* the correct boundary.
|
|
43
43
|
* https://developer.mozilla.org/en-US/docs/Web/API/FormData/Using_FormData_Objects#sending_files_using_a_formdata_object
|
|
44
44
|
*/
|
|
45
|
-
if (requestHeaders[
|
|
46
|
-
delete requestHeaders[
|
|
45
|
+
if (requestHeaders['Content-Type']?.toLowerCase().includes('multipart/form-data')) {
|
|
46
|
+
delete requestHeaders['Content-Type'];
|
|
47
47
|
}
|
|
48
48
|
const response = await fetchImpl(`${baseUrl}${resolveUrl(url, queryParams, pathParams)}`, {
|
|
49
49
|
signal,
|
|
50
50
|
method: method.toUpperCase(),
|
|
51
51
|
body: body ? (body instanceof FormData ? body : JSON.stringify(body)) : undefined,
|
|
52
|
-
headers: requestHeaders
|
|
52
|
+
headers: requestHeaders
|
|
53
53
|
});
|
|
54
54
|
if (!response.ok) {
|
|
55
55
|
let error;
|
|
@@ -58,13 +58,13 @@ async function fetch$1({ url, method, body, headers, pathParams, queryParams, si
|
|
|
58
58
|
}
|
|
59
59
|
catch (e) {
|
|
60
60
|
error = {
|
|
61
|
-
status:
|
|
62
|
-
payload: e instanceof Error ? `Unexpected error (${e.message})` :
|
|
61
|
+
status: 'unknown',
|
|
62
|
+
payload: e instanceof Error ? `Unexpected error (${e.message})` : 'Unexpected error'
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
65
|
throw error;
|
|
66
66
|
}
|
|
67
|
-
if (response.headers?.get(
|
|
67
|
+
if (response.headers?.get('content-type')?.includes('json')) {
|
|
68
68
|
return await response.json();
|
|
69
69
|
}
|
|
70
70
|
else {
|
|
@@ -74,9 +74,9 @@ async function fetch$1({ url, method, body, headers, pathParams, queryParams, si
|
|
|
74
74
|
}
|
|
75
75
|
catch (e) {
|
|
76
76
|
let errorObject = {
|
|
77
|
-
name:
|
|
78
|
-
message: e instanceof Error ? `Network error (${e.message})` :
|
|
79
|
-
stack: e
|
|
77
|
+
name: 'unknown',
|
|
78
|
+
message: e instanceof Error ? `Network error (${e.message})` : 'Network error',
|
|
79
|
+
stack: e
|
|
80
80
|
};
|
|
81
81
|
throw errorObject;
|
|
82
82
|
}
|
|
@@ -85,752 +85,752 @@ const resolveUrl = (url, queryParams = {}, pathParams = {}) => {
|
|
|
85
85
|
let query = new URLSearchParams(queryParams).toString();
|
|
86
86
|
if (query)
|
|
87
87
|
query = `?${query}`;
|
|
88
|
-
return url.replace(/\{\w*\}/g, (key) => pathParams[key.slice(1, -1)]) + query;
|
|
88
|
+
return url.replace(/\{\w*\}/g, (key) => pathParams[key.slice(1, -1)] ?? '') + query;
|
|
89
89
|
};
|
|
90
90
|
|
|
91
91
|
/**
|
|
92
92
|
* Records an artifacts cache usage event. The body of this request is an array of cache usage events. The supported event types are `HIT` and `MISS`. The source is either `LOCAL` the cache event was on the users filesystem cache or `REMOTE` if the cache event is for a remote cache. When the event is a `HIT` the request also accepts a number `duration` which is the time taken to generate the artifact in the cache.
|
|
93
93
|
*/
|
|
94
94
|
const recordEvents = (variables, signal) => fetch$1({
|
|
95
|
-
url:
|
|
96
|
-
method:
|
|
95
|
+
url: '/v8/artifacts/events',
|
|
96
|
+
method: 'post',
|
|
97
97
|
...variables,
|
|
98
|
-
signal
|
|
98
|
+
signal
|
|
99
99
|
});
|
|
100
100
|
/**
|
|
101
101
|
* Check the status of Remote Caching for this principal. Returns a JSON-encoded status indicating if Remote Caching is enabled, disabled, or disabled due to usage limits.
|
|
102
102
|
*/
|
|
103
103
|
const status = (variables, signal) => fetch$1({
|
|
104
|
-
url:
|
|
105
|
-
method:
|
|
104
|
+
url: '/v8/artifacts/status',
|
|
105
|
+
method: 'get',
|
|
106
106
|
...variables,
|
|
107
|
-
signal
|
|
107
|
+
signal
|
|
108
108
|
});
|
|
109
109
|
/**
|
|
110
110
|
* Uploads a cache artifact identified by the `hash` specified on the path. The cache artifact can then be downloaded with the provided `hash`.
|
|
111
111
|
*/
|
|
112
|
-
const uploadArtifact = (variables, signal) => fetch$1({ url:
|
|
112
|
+
const uploadArtifact = (variables, signal) => fetch$1({ url: '/v8/artifacts/{hash}', method: 'put', ...variables, signal });
|
|
113
113
|
/**
|
|
114
114
|
* Downloads a cache artifact indentified by its `hash` specified on the request path. The artifact is downloaded as an octet-stream. The client should verify the content-length header and response body.
|
|
115
115
|
*/
|
|
116
|
-
const downloadArtifact = (variables, signal) => fetch$1({ url:
|
|
116
|
+
const downloadArtifact = (variables, signal) => fetch$1({ url: '/v8/artifacts/{hash}', method: 'get', ...variables, signal });
|
|
117
117
|
/**
|
|
118
118
|
* Query information about an array of artifacts.
|
|
119
119
|
*/
|
|
120
120
|
const artifactQuery = (variables, signal) => fetch$1({
|
|
121
|
-
url:
|
|
122
|
-
method:
|
|
121
|
+
url: '/v8/artifacts',
|
|
122
|
+
method: 'post',
|
|
123
123
|
...variables,
|
|
124
|
-
signal
|
|
124
|
+
signal
|
|
125
125
|
});
|
|
126
126
|
/**
|
|
127
127
|
* Retrieves information for a deployment either by supplying its ID (`id` property) or Hostname (`url` property). Additional details will be included when the authenticated user is an owner of the deployment.
|
|
128
128
|
*/
|
|
129
|
-
const getDeployment = (variables, signal) => fetch$1({ url:
|
|
129
|
+
const getDeployment = (variables, signal) => fetch$1({ url: '/v13/deployments/{idOrUrl}', method: 'get', ...variables, signal });
|
|
130
130
|
/**
|
|
131
131
|
* Create a new deployment with all the required and intended data. If the deployment is not a git deployment, all files must be provided with the request, either referenced or inlined. Additionally, a deployment id can be specified to redeploy a previous deployment.
|
|
132
132
|
*/
|
|
133
|
-
const createDeployment = (variables, signal) => fetch$1({ url:
|
|
133
|
+
const createDeployment = (variables, signal) => fetch$1({ url: '/v13/deployments', method: 'post', ...variables, signal });
|
|
134
134
|
/**
|
|
135
135
|
* This endpoint allows you to cancel a deployment which is currently building, by supplying its `id` in the URL.
|
|
136
136
|
*/
|
|
137
|
-
const cancelDeployment = (variables, signal) => fetch$1({ url:
|
|
137
|
+
const cancelDeployment = (variables, signal) => fetch$1({ url: '/v12/deployments/{id}/cancel', method: 'patch', ...variables, signal });
|
|
138
138
|
/**
|
|
139
139
|
* Get cert by id
|
|
140
140
|
*/
|
|
141
141
|
const getCertById = (variables, signal) => fetch$1({
|
|
142
|
-
url:
|
|
143
|
-
method:
|
|
142
|
+
url: '/v7/certs/{id}',
|
|
143
|
+
method: 'get',
|
|
144
144
|
...variables,
|
|
145
|
-
signal
|
|
145
|
+
signal
|
|
146
146
|
});
|
|
147
147
|
/**
|
|
148
148
|
* Remove cert
|
|
149
149
|
*/
|
|
150
150
|
const removeCert = (variables, signal) => fetch$1({
|
|
151
|
-
url:
|
|
152
|
-
method:
|
|
151
|
+
url: '/v7/certs/{id}',
|
|
152
|
+
method: 'delete',
|
|
153
153
|
...variables,
|
|
154
|
-
signal
|
|
154
|
+
signal
|
|
155
155
|
});
|
|
156
156
|
/**
|
|
157
157
|
* Issue a new cert
|
|
158
158
|
*/
|
|
159
159
|
const issueCert = (variables, signal) => fetch$1({
|
|
160
|
-
url:
|
|
161
|
-
method:
|
|
160
|
+
url: '/v7/certs',
|
|
161
|
+
method: 'post',
|
|
162
162
|
...variables,
|
|
163
|
-
signal
|
|
163
|
+
signal
|
|
164
164
|
});
|
|
165
165
|
/**
|
|
166
166
|
* Upload a cert
|
|
167
167
|
*/
|
|
168
168
|
const uploadCert = (variables, signal) => fetch$1({
|
|
169
|
-
url:
|
|
170
|
-
method:
|
|
169
|
+
url: '/v7/certs',
|
|
170
|
+
method: 'put',
|
|
171
171
|
...variables,
|
|
172
|
-
signal
|
|
172
|
+
signal
|
|
173
173
|
});
|
|
174
174
|
/**
|
|
175
175
|
* Get the build logs of a deployment by deployment ID and build ID. It can work as an infinite stream of logs or as a JSON endpoint depending on the input parameters.
|
|
176
176
|
*/
|
|
177
|
-
const getDeploymentEvents = (variables, signal) => fetch$1({ url:
|
|
177
|
+
const getDeploymentEvents = (variables, signal) => fetch$1({ url: '/v2/deployments/{idOrUrl}/events', method: 'get', ...variables, signal });
|
|
178
178
|
/**
|
|
179
179
|
* Retrieves a list of "events" generated by the User on Vercel. Events are generated when the User performs a particular action, such as logging in, creating a deployment, and joining a Team (just to name a few). When the `teamId` parameter is supplied, then the events that are returned will be in relation to the Team that was specified.
|
|
180
180
|
*/
|
|
181
181
|
const listUserEvents = (variables, signal) => fetch$1({
|
|
182
|
-
url:
|
|
183
|
-
method:
|
|
182
|
+
url: '/v3/events',
|
|
183
|
+
method: 'get',
|
|
184
184
|
...variables,
|
|
185
|
-
signal
|
|
185
|
+
signal
|
|
186
186
|
});
|
|
187
187
|
/**
|
|
188
188
|
* Retrieves a list of aliases for the authenticated User or Team. When `domain` is provided, only aliases for that domain will be returned. When `projectId` is provided, it will only return the given project aliases.
|
|
189
189
|
*/
|
|
190
190
|
const listAliases = (variables, signal) => fetch$1({
|
|
191
|
-
url:
|
|
192
|
-
method:
|
|
191
|
+
url: '/v4/aliases',
|
|
192
|
+
method: 'get',
|
|
193
193
|
...variables,
|
|
194
|
-
signal
|
|
194
|
+
signal
|
|
195
195
|
});
|
|
196
196
|
/**
|
|
197
197
|
* Retrieves an Alias for the given host name or alias ID.
|
|
198
198
|
*/
|
|
199
199
|
const getAlias = (variables, signal) => fetch$1({
|
|
200
|
-
url:
|
|
201
|
-
method:
|
|
200
|
+
url: '/v4/aliases/{idOrAlias}',
|
|
201
|
+
method: 'get',
|
|
202
202
|
...variables,
|
|
203
|
-
signal
|
|
203
|
+
signal
|
|
204
204
|
});
|
|
205
205
|
/**
|
|
206
206
|
* Delete an Alias with the specified ID.
|
|
207
207
|
*/
|
|
208
208
|
const deleteAlias = (variables, signal) => fetch$1({
|
|
209
|
-
url:
|
|
210
|
-
method:
|
|
209
|
+
url: '/v2/aliases/{aliasId}',
|
|
210
|
+
method: 'delete',
|
|
211
211
|
...variables,
|
|
212
|
-
signal
|
|
212
|
+
signal
|
|
213
213
|
});
|
|
214
214
|
/**
|
|
215
215
|
* Retrieves all Aliases for the Deployment with the given ID. The authenticated User must own the deployment.
|
|
216
216
|
*/
|
|
217
|
-
const listDeploymentAliases = (variables, signal) => fetch$1({ url:
|
|
217
|
+
const listDeploymentAliases = (variables, signal) => fetch$1({ url: '/v2/deployments/{id}/aliases', method: 'get', ...variables, signal });
|
|
218
218
|
/**
|
|
219
219
|
* Creates a new alias for the deployment with the given deployment ID. The authenticated user must own this deployment. If the desired alias is already assigned to another deployment, then it will be removed from the old deployment and assigned to the new one.
|
|
220
220
|
*/
|
|
221
|
-
const assignAlias = (variables, signal) => fetch$1({ url:
|
|
221
|
+
const assignAlias = (variables, signal) => fetch$1({ url: '/v2/deployments/{id}/aliases', method: 'post', ...variables, signal });
|
|
222
222
|
/**
|
|
223
223
|
* Before you create a deployment you need to upload the required files for that deployment. To do it, you need to first upload each file to this endpoint. Once that's completed, you can create a new deployment with the uploaded files. The file content must be placed inside the body of the request. In the case of a successful response you'll receive a status code 200 with an empty body.
|
|
224
224
|
*/
|
|
225
|
-
const uploadFile = (variables, signal) => fetch$1({ url:
|
|
225
|
+
const uploadFile = (variables, signal) => fetch$1({ url: '/v2/files', method: 'post', ...variables, signal });
|
|
226
226
|
/**
|
|
227
227
|
* Retrieves information related to the currently authenticated User.
|
|
228
228
|
*/
|
|
229
229
|
const getAuthUser = (variables, signal) => fetch$1({
|
|
230
|
-
url:
|
|
231
|
-
method:
|
|
230
|
+
url: '/v2/user',
|
|
231
|
+
method: 'get',
|
|
232
232
|
...variables,
|
|
233
|
-
signal
|
|
233
|
+
signal
|
|
234
234
|
});
|
|
235
235
|
/**
|
|
236
236
|
* Initiates the deletion process for the currently authenticated User, by sending a deletion confirmation email. The email contains a link that the user needs to visit in order to proceed with the deletion process.
|
|
237
237
|
*/
|
|
238
238
|
const requestDelete = (variables, signal) => fetch$1({
|
|
239
|
-
url:
|
|
240
|
-
method:
|
|
239
|
+
url: '/v1/user',
|
|
240
|
+
method: 'delete',
|
|
241
241
|
...variables,
|
|
242
|
-
signal
|
|
242
|
+
signal
|
|
243
243
|
});
|
|
244
244
|
/**
|
|
245
245
|
* Retrieve a list of the current User's authentication tokens.
|
|
246
246
|
*/
|
|
247
247
|
const listAuthTokens = (variables, signal) => fetch$1({
|
|
248
|
-
url:
|
|
249
|
-
method:
|
|
248
|
+
url: '/v5/user/tokens',
|
|
249
|
+
method: 'get',
|
|
250
250
|
...variables,
|
|
251
|
-
signal
|
|
251
|
+
signal
|
|
252
252
|
});
|
|
253
253
|
/**
|
|
254
254
|
* Creates and returns a new authentication token for the currently authenticated User. The `bearerToken` property is only provided once, in the response body, so be sure to save it on the client for use with API requests.
|
|
255
255
|
*/
|
|
256
|
-
const createAuthToken = (variables, signal) => fetch$1({ url:
|
|
256
|
+
const createAuthToken = (variables, signal) => fetch$1({ url: '/v3/user/tokens', method: 'post', ...variables, signal });
|
|
257
257
|
/**
|
|
258
258
|
* Retrieve metadata about an authentication token belonging to the currently authenticated User.
|
|
259
259
|
*/
|
|
260
260
|
const getAuthToken = (variables, signal) => fetch$1({
|
|
261
|
-
url:
|
|
262
|
-
method:
|
|
261
|
+
url: '/v5/user/tokens/{tokenId}',
|
|
262
|
+
method: 'get',
|
|
263
263
|
...variables,
|
|
264
|
-
signal
|
|
264
|
+
signal
|
|
265
265
|
});
|
|
266
266
|
/**
|
|
267
267
|
* Invalidate an authentication token, such that it will no longer be valid for future HTTP requests.
|
|
268
268
|
*/
|
|
269
269
|
const deleteAuthToken = (variables, signal) => fetch$1({
|
|
270
|
-
url:
|
|
271
|
-
method:
|
|
270
|
+
url: '/v3/user/tokens/{tokenId}',
|
|
271
|
+
method: 'delete',
|
|
272
272
|
...variables,
|
|
273
|
-
signal
|
|
273
|
+
signal
|
|
274
274
|
});
|
|
275
275
|
/**
|
|
276
276
|
* Retrieves a list of DNS records created for a domain name. By default it returns 20 records if no limit is provided. The rest can be retrieved using the pagination options.
|
|
277
277
|
*/
|
|
278
|
-
const getRecords = (variables, signal) => fetch$1({ url:
|
|
278
|
+
const getRecords = (variables, signal) => fetch$1({ url: '/v4/domains/{domain}/records', method: 'get', ...variables, signal });
|
|
279
279
|
/**
|
|
280
280
|
* Creates a DNS record for a domain.
|
|
281
281
|
*/
|
|
282
|
-
const createRecord = (variables, signal) => fetch$1({ url:
|
|
282
|
+
const createRecord = (variables, signal) => fetch$1({ url: '/v2/domains/{domain}/records', method: 'post', ...variables, signal });
|
|
283
283
|
/**
|
|
284
284
|
* Updates an existing DNS record for a domain name.
|
|
285
285
|
*/
|
|
286
|
-
const updateRecord = (variables, signal) => fetch$1({ url:
|
|
286
|
+
const updateRecord = (variables, signal) => fetch$1({ url: '/v1/domains/records/{recordId}', method: 'patch', ...variables, signal });
|
|
287
287
|
/**
|
|
288
288
|
* Removes an existing DNS record from a domain name.
|
|
289
289
|
*/
|
|
290
290
|
const removeRecord = (variables, signal) => fetch$1({
|
|
291
|
-
url:
|
|
292
|
-
method:
|
|
291
|
+
url: '/v2/domains/{domain}/records/{recordId}',
|
|
292
|
+
method: 'delete',
|
|
293
293
|
...variables,
|
|
294
|
-
signal
|
|
294
|
+
signal
|
|
295
295
|
});
|
|
296
296
|
/**
|
|
297
297
|
* Check if a domain name is available for purchase.
|
|
298
298
|
*/
|
|
299
299
|
const checkDomainStatus = (variables, signal) => fetch$1({
|
|
300
|
-
url:
|
|
301
|
-
method:
|
|
300
|
+
url: '/v4/domains/status',
|
|
301
|
+
method: 'get',
|
|
302
302
|
...variables,
|
|
303
|
-
signal
|
|
303
|
+
signal
|
|
304
304
|
});
|
|
305
305
|
/**
|
|
306
306
|
* Check the price to purchase a domain and how long a single purchase period is.
|
|
307
307
|
*/
|
|
308
308
|
const checkDomainPrice = (variables, signal) => fetch$1({
|
|
309
|
-
url:
|
|
310
|
-
method:
|
|
309
|
+
url: '/v4/domains/price',
|
|
310
|
+
method: 'get',
|
|
311
311
|
...variables,
|
|
312
|
-
signal
|
|
312
|
+
signal
|
|
313
313
|
});
|
|
314
314
|
/**
|
|
315
315
|
* Allows to purchase the specified domain.
|
|
316
316
|
*/
|
|
317
317
|
const buyDomain = (variables, signal) => fetch$1({
|
|
318
|
-
url:
|
|
319
|
-
method:
|
|
318
|
+
url: '/v4/domains/buy',
|
|
319
|
+
method: 'post',
|
|
320
320
|
...variables,
|
|
321
|
-
signal
|
|
321
|
+
signal
|
|
322
322
|
});
|
|
323
323
|
/**
|
|
324
324
|
* Get a Domain's configuration.
|
|
325
325
|
*/
|
|
326
|
-
const getDomainConfig = (variables, signal) => fetch$1({ url:
|
|
326
|
+
const getDomainConfig = (variables, signal) => fetch$1({ url: '/v6/domains/{domain}/config', method: 'get', ...variables, signal });
|
|
327
327
|
/**
|
|
328
328
|
* Get information for a single domain in an account or team.
|
|
329
329
|
*/
|
|
330
330
|
const getDomain = (variables, signal) => fetch$1({
|
|
331
|
-
url:
|
|
332
|
-
method:
|
|
331
|
+
url: '/v5/domains/{domain}',
|
|
332
|
+
method: 'get',
|
|
333
333
|
...variables,
|
|
334
|
-
signal
|
|
334
|
+
signal
|
|
335
335
|
});
|
|
336
336
|
/**
|
|
337
337
|
* Retrieves a list of domains registered for the authenticating user. By default it returns the last 20 domains if no limit is provided.
|
|
338
338
|
*/
|
|
339
339
|
const getDomains = (variables, signal) => fetch$1({
|
|
340
|
-
url:
|
|
341
|
-
method:
|
|
340
|
+
url: '/v5/domains',
|
|
341
|
+
method: 'get',
|
|
342
342
|
...variables,
|
|
343
|
-
signal
|
|
343
|
+
signal
|
|
344
344
|
});
|
|
345
345
|
/**
|
|
346
346
|
* This endpoint is used for registering a new domain name with Vercel for the authenticating user, and also for initiating a domain transfer request from an external Registrar to Vercel.
|
|
347
347
|
*/
|
|
348
|
-
const createOrTransferDomain = (variables, signal) => fetch$1({ url:
|
|
348
|
+
const createOrTransferDomain = (variables, signal) => fetch$1({ url: '/v5/domains', method: 'post', ...variables, signal });
|
|
349
349
|
/**
|
|
350
350
|
* Delete a previously registered domain name from Vercel. Deleting a domain will automatically remove any associated aliases.
|
|
351
351
|
*/
|
|
352
352
|
const deleteDomain = (variables, signal) => fetch$1({
|
|
353
|
-
url:
|
|
354
|
-
method:
|
|
353
|
+
url: '/v6/domains/{domain}',
|
|
354
|
+
method: 'delete',
|
|
355
355
|
...variables,
|
|
356
|
-
signal
|
|
356
|
+
signal
|
|
357
357
|
});
|
|
358
358
|
/**
|
|
359
359
|
* Retrieves the active Vercel secrets for the authenticated user. By default it returns 20 secrets. The rest can be retrieved using the pagination options. The body will contain an entry for each secret.
|
|
360
360
|
*/
|
|
361
361
|
const getSecrets = (variables, signal) => fetch$1({
|
|
362
|
-
url:
|
|
363
|
-
method:
|
|
362
|
+
url: '/v3/secrets',
|
|
363
|
+
method: 'get',
|
|
364
364
|
...variables,
|
|
365
|
-
signal
|
|
365
|
+
signal
|
|
366
366
|
});
|
|
367
367
|
/**
|
|
368
368
|
* Allows to create a new secret.
|
|
369
369
|
*/
|
|
370
370
|
const createSecret = (variables, signal) => fetch$1({
|
|
371
|
-
url:
|
|
372
|
-
method:
|
|
371
|
+
url: '/v2/secrets/{name}',
|
|
372
|
+
method: 'post',
|
|
373
373
|
...variables,
|
|
374
|
-
signal
|
|
374
|
+
signal
|
|
375
375
|
});
|
|
376
376
|
/**
|
|
377
377
|
* Enables to edit the name of a user's secret. The name has to be unique to that user's secrets.
|
|
378
378
|
*/
|
|
379
|
-
const renameSecret = (variables, signal) => fetch$1({ url:
|
|
379
|
+
const renameSecret = (variables, signal) => fetch$1({ url: '/v2/secrets/{name}', method: 'patch', ...variables, signal });
|
|
380
380
|
/**
|
|
381
381
|
* Retrieves the information for a specific secret by passing either the secret id or name in the URL.
|
|
382
382
|
*/
|
|
383
383
|
const getSecret = (variables, signal) => fetch$1({
|
|
384
|
-
url:
|
|
385
|
-
method:
|
|
384
|
+
url: '/v3/secrets/{idOrName}',
|
|
385
|
+
method: 'get',
|
|
386
386
|
...variables,
|
|
387
|
-
signal
|
|
387
|
+
signal
|
|
388
388
|
});
|
|
389
389
|
/**
|
|
390
390
|
* This deletes the user's secret defined in the URL.
|
|
391
391
|
*/
|
|
392
392
|
const deleteSecret = (variables, signal) => fetch$1({
|
|
393
|
-
url:
|
|
394
|
-
method:
|
|
393
|
+
url: '/v2/secrets/{idOrName}',
|
|
394
|
+
method: 'delete',
|
|
395
395
|
...variables,
|
|
396
|
-
signal
|
|
396
|
+
signal
|
|
397
397
|
});
|
|
398
398
|
/**
|
|
399
399
|
* This API allows you to delete a deployment, either by supplying its `id` in the URL or the `url` of the deployment as a query parameter. You can obtain the ID, for example, by listing all deployments.
|
|
400
400
|
*/
|
|
401
|
-
const deleteDeployment = (variables, signal) => fetch$1({ url:
|
|
401
|
+
const deleteDeployment = (variables, signal) => fetch$1({ url: '/v13/deployments/{id}', method: 'delete', ...variables, signal });
|
|
402
402
|
/**
|
|
403
403
|
* List deployments under the account corresponding to the API token. If a deployment hasn't finished uploading (is incomplete), the `url` property will have a value of `null`.
|
|
404
404
|
*/
|
|
405
405
|
const getDeployments = (variables, signal) => fetch$1({
|
|
406
|
-
url:
|
|
407
|
-
method:
|
|
406
|
+
url: '/v6/deployments',
|
|
407
|
+
method: 'get',
|
|
408
408
|
...variables,
|
|
409
|
-
signal
|
|
409
|
+
signal
|
|
410
410
|
});
|
|
411
411
|
/**
|
|
412
412
|
* Allows to retrieve the list of projects of the authenticated user. The list will be paginated and the provided query parameters allow filtering the returned projects.
|
|
413
413
|
*/
|
|
414
414
|
const getProjects = (variables, signal) => fetch$1({
|
|
415
|
-
url:
|
|
416
|
-
method:
|
|
415
|
+
url: '/v9/projects',
|
|
416
|
+
method: 'get',
|
|
417
417
|
...variables,
|
|
418
|
-
signal
|
|
418
|
+
signal
|
|
419
419
|
});
|
|
420
420
|
/**
|
|
421
421
|
* Allows to create a new project with the provided configuration. It only requires the project `name` but more configuration can be provided to override the defaults.
|
|
422
422
|
*/
|
|
423
423
|
const createProject = (variables, signal) => fetch$1({
|
|
424
|
-
url:
|
|
425
|
-
method:
|
|
424
|
+
url: '/v9/projects',
|
|
425
|
+
method: 'post',
|
|
426
426
|
...variables,
|
|
427
|
-
signal
|
|
427
|
+
signal
|
|
428
428
|
});
|
|
429
429
|
/**
|
|
430
430
|
* Get the information for a specific project by passing either the project `id` or `name` in the URL.
|
|
431
431
|
*/
|
|
432
432
|
const getProject = (variables, signal) => fetch$1({
|
|
433
|
-
url:
|
|
434
|
-
method:
|
|
433
|
+
url: '/v9/projects/{idOrName}',
|
|
434
|
+
method: 'get',
|
|
435
435
|
...variables,
|
|
436
|
-
signal
|
|
436
|
+
signal
|
|
437
437
|
});
|
|
438
438
|
/**
|
|
439
439
|
* Update the fields of a project using either its `name` or `id`.
|
|
440
440
|
*/
|
|
441
|
-
const updateProject = (variables, signal) => fetch$1({ url:
|
|
441
|
+
const updateProject = (variables, signal) => fetch$1({ url: '/v9/projects/{idOrName}', method: 'patch', ...variables, signal });
|
|
442
442
|
/**
|
|
443
443
|
* Delete a specific project by passing either the project `id` or `name` in the URL.
|
|
444
444
|
*/
|
|
445
445
|
const deleteProject = (variables, signal) => fetch$1({
|
|
446
|
-
url:
|
|
447
|
-
method:
|
|
446
|
+
url: '/v9/projects/{idOrName}',
|
|
447
|
+
method: 'delete',
|
|
448
448
|
...variables,
|
|
449
|
-
signal
|
|
449
|
+
signal
|
|
450
450
|
});
|
|
451
451
|
/**
|
|
452
452
|
* Retrieve the domains associated with a given project by passing either the project `id` or `name` in the URL.
|
|
453
453
|
*/
|
|
454
|
-
const getProjectDomains = (variables, signal) => fetch$1({ url:
|
|
454
|
+
const getProjectDomains = (variables, signal) => fetch$1({ url: '/v9/projects/{idOrName}/domains', method: 'get', ...variables, signal });
|
|
455
455
|
/**
|
|
456
456
|
* Get project domain by project id/name and domain name.
|
|
457
457
|
*/
|
|
458
|
-
const getProjectDomain = (variables, signal) => fetch$1({ url:
|
|
458
|
+
const getProjectDomain = (variables, signal) => fetch$1({ url: '/v9/projects/{idOrName}/domains/{domain}', method: 'get', ...variables, signal });
|
|
459
459
|
/**
|
|
460
460
|
* Update a project domain's configuration, including the name, git branch and redirect of the domain.
|
|
461
461
|
*/
|
|
462
|
-
const updateProjectDomain = (variables, signal) => fetch$1({ url:
|
|
462
|
+
const updateProjectDomain = (variables, signal) => fetch$1({ url: '/v9/projects/{idOrName}/domains/{domain}', method: 'patch', ...variables, signal });
|
|
463
463
|
/**
|
|
464
464
|
* Remove a domain from a project by passing the domain name and by specifying the project by either passing the project `id` or `name` in the URL.
|
|
465
465
|
*/
|
|
466
|
-
const removeProjectDomain = (variables, signal) => fetch$1({ url:
|
|
466
|
+
const removeProjectDomain = (variables, signal) => fetch$1({ url: '/v9/projects/{idOrName}/domains/{domain}', method: 'delete', ...variables, signal });
|
|
467
467
|
/**
|
|
468
468
|
* Add a domain to the project by passing its domain name and by specifying the project by either passing the project `id` or `name` in the URL. If the domain is not yet verified to be used on this project, the request will return `verified = false`, and the domain will need to be verified according to the `verification` challenge via `POST /projects/:idOrName/domains/:domain/verify`. If the domain already exists on the project, the request will fail with a `400` status code.
|
|
469
469
|
*/
|
|
470
|
-
const addProjectDomain = (variables, signal) => fetch$1({ url:
|
|
470
|
+
const addProjectDomain = (variables, signal) => fetch$1({ url: '/v10/projects/{idOrName}/domains', method: 'post', ...variables, signal });
|
|
471
471
|
/**
|
|
472
472
|
* Attempts to verify a project domain with `verified = false` by checking the correctness of the project domain's `verification` challenge.
|
|
473
473
|
*/
|
|
474
|
-
const verifyProjectDomain = (variables, signal) => fetch$1({ url:
|
|
474
|
+
const verifyProjectDomain = (variables, signal) => fetch$1({ url: '/v9/projects/{idOrName}/domains/{domain}/verify', method: 'post', ...variables, signal });
|
|
475
475
|
/**
|
|
476
476
|
* Retrieve the environment variables for a given project by passing either the project `id` or `name` in the URL.
|
|
477
477
|
*/
|
|
478
|
-
const filterProjectEnvs = (variables, signal) => fetch$1({ url:
|
|
478
|
+
const filterProjectEnvs = (variables, signal) => fetch$1({ url: '/v9/projects/{idOrName}/env', method: 'get', ...variables, signal });
|
|
479
479
|
/**
|
|
480
480
|
* Retrieve the environment variable for a given project.
|
|
481
481
|
*/
|
|
482
482
|
const getProjectEnv = (variables, signal) => fetch$1({
|
|
483
|
-
url:
|
|
484
|
-
method:
|
|
483
|
+
url: '/v1/projects/{idOrName}/env/{id}',
|
|
484
|
+
method: 'get',
|
|
485
485
|
...variables,
|
|
486
|
-
signal
|
|
486
|
+
signal
|
|
487
487
|
});
|
|
488
488
|
/**
|
|
489
489
|
* Create one ore more environment variables for a project by passing its `key`, `value`, `type` and `target` and by specifying the project by either passing the project `id` or `name` in the URL.
|
|
490
490
|
*/
|
|
491
|
-
const createProjectEnv = (variables, signal) => fetch$1({ url:
|
|
491
|
+
const createProjectEnv = (variables, signal) => fetch$1({ url: '/v10/projects/{idOrName}/env', method: 'post', ...variables, signal });
|
|
492
492
|
/**
|
|
493
493
|
* Delete a specific environment variable for a given project by passing the environment variable identifier and either passing the project `id` or `name` in the URL.
|
|
494
494
|
*/
|
|
495
|
-
const removeProjectEnv = (variables, signal) => fetch$1({ url:
|
|
495
|
+
const removeProjectEnv = (variables, signal) => fetch$1({ url: '/v9/projects/{idOrName}/env/{id}', method: 'delete', ...variables, signal });
|
|
496
496
|
/**
|
|
497
497
|
* Edit a specific environment variable for a given project by passing the environment variable identifier and either passing the project `id` or `name` in the URL.
|
|
498
498
|
*/
|
|
499
|
-
const editProjectEnv = (variables, signal) => fetch$1({ url:
|
|
499
|
+
const editProjectEnv = (variables, signal) => fetch$1({ url: '/v9/projects/{idOrName}/env/{id}', method: 'patch', ...variables, signal });
|
|
500
500
|
/**
|
|
501
501
|
* Verify the user accepted the login request and get a authentication token. The user email address and the token received after requesting the login must be added to the URL as a query string with the names `email` and `token`.
|
|
502
502
|
*/
|
|
503
503
|
const verifyToken = (variables, signal) => fetch$1({
|
|
504
|
-
url:
|
|
505
|
-
method:
|
|
504
|
+
url: '/registration/verify',
|
|
505
|
+
method: 'get',
|
|
506
506
|
...variables,
|
|
507
|
-
signal
|
|
507
|
+
signal
|
|
508
508
|
});
|
|
509
509
|
/**
|
|
510
510
|
* Request a new login for a user to get a token. This will respond with a verification token and send an email to confirm the request. Once confirmed you can use the verification token to get an authentication token.
|
|
511
511
|
*/
|
|
512
512
|
const emailLogin = (variables, signal) => fetch$1({
|
|
513
|
-
url:
|
|
514
|
-
method:
|
|
513
|
+
url: '/registration',
|
|
514
|
+
method: 'post',
|
|
515
515
|
...variables,
|
|
516
|
-
signal
|
|
516
|
+
signal
|
|
517
517
|
});
|
|
518
518
|
/**
|
|
519
519
|
* Allows to retrieve all configurations for an authenticated integration. When the `project` view is used, configurations generated for the authorization flow will be filtered out of the results.
|
|
520
520
|
*/
|
|
521
|
-
const getConfigurations = (variables, signal) => fetch$1({ url:
|
|
521
|
+
const getConfigurations = (variables, signal) => fetch$1({ url: '/v1/integrations/configurations', method: 'get', ...variables, signal });
|
|
522
522
|
/**
|
|
523
523
|
* Allows to retrieve a the configuration with the provided id in case it exists. The authenticated user or team must be the owner of the config in order to access it.
|
|
524
524
|
*/
|
|
525
|
-
const getConfiguration = (variables, signal) => fetch$1({ url:
|
|
525
|
+
const getConfiguration = (variables, signal) => fetch$1({ url: '/v1/integrations/configuration/{id}', method: 'get', ...variables, signal });
|
|
526
526
|
/**
|
|
527
527
|
* Allows to remove the configuration with the `id` provided in the parameters. The configuration and all of its resources will be removed. This includes Webhooks, LogDrains and Project Env variables.
|
|
528
528
|
*/
|
|
529
|
-
const deleteConfiguration = (variables, signal) => fetch$1({ url:
|
|
529
|
+
const deleteConfiguration = (variables, signal) => fetch$1({ url: '/v1/integrations/configuration/{id}', method: 'delete', ...variables, signal });
|
|
530
530
|
/**
|
|
531
531
|
* Retrieves a list of all Integration log drains that are defined for the authorized account. When using an OAuth2 token, the list is limited to log drains created by the authenticated integration.
|
|
532
532
|
*/
|
|
533
|
-
const getIntegrationLogDrains = (variables, signal) => fetch$1({ url:
|
|
533
|
+
const getIntegrationLogDrains = (variables, signal) => fetch$1({ url: '/v2/integrations/log-drains', method: 'get', ...variables, signal });
|
|
534
534
|
/**
|
|
535
535
|
* Creates an Integration log drain. This endpoint must be called with an OAuth2 client (integration), since log drains are tied to integrations. If it is called with a different token type it will produce a 400 error.
|
|
536
536
|
*/
|
|
537
537
|
const createLogDrain = (variables, signal) => fetch$1({
|
|
538
|
-
url:
|
|
539
|
-
method:
|
|
538
|
+
url: '/v2/integrations/log-drains',
|
|
539
|
+
method: 'post',
|
|
540
540
|
...variables,
|
|
541
|
-
signal
|
|
541
|
+
signal
|
|
542
542
|
});
|
|
543
543
|
/**
|
|
544
544
|
* Deletes the Integration log drain with the provided `id`. When using an OAuth2 Token, the log drain can be deleted only if the integration owns it.
|
|
545
545
|
*/
|
|
546
|
-
const deleteIntegrationLogDrain = (variables, signal) => fetch$1({ url:
|
|
546
|
+
const deleteIntegrationLogDrain = (variables, signal) => fetch$1({ url: '/v1/integrations/log-drains/{id}', method: 'delete', ...variables, signal });
|
|
547
547
|
/**
|
|
548
548
|
* Lists git namespaces for a supported provider. Supported providers are `github`, `gitlab` and `bitbucket`. If the provider is not provided, it will try to obtain it from the user that authenticated the request.
|
|
549
549
|
*/
|
|
550
550
|
const gitNamespaces = (variables, signal) => fetch$1({
|
|
551
|
-
url:
|
|
552
|
-
method:
|
|
551
|
+
url: '/v1/integrations/git-namespaces',
|
|
552
|
+
method: 'get',
|
|
553
553
|
...variables,
|
|
554
|
-
signal
|
|
554
|
+
signal
|
|
555
555
|
});
|
|
556
556
|
/**
|
|
557
557
|
* Lists git repositories linked to a namespace `id` for a supported provider. A specific namespace `id` can be obtained via the `git-namespaces` endpoint. Supported providers are `github`, `gitlab` and `bitbucket`. If the provider or namespace is not provided, it will try to obtain it from the user that authenticated the request.
|
|
558
558
|
*/
|
|
559
559
|
const searchRepo = (variables, signal) => fetch$1({
|
|
560
|
-
url:
|
|
561
|
-
method:
|
|
560
|
+
url: '/v1/integrations/search-repo',
|
|
561
|
+
method: 'get',
|
|
562
562
|
...variables,
|
|
563
|
-
signal
|
|
563
|
+
signal
|
|
564
564
|
});
|
|
565
565
|
/**
|
|
566
566
|
* Creates a webhook
|
|
567
567
|
*/
|
|
568
568
|
const createWebhook = (variables, signal) => fetch$1({
|
|
569
|
-
url:
|
|
570
|
-
method:
|
|
569
|
+
url: '/v1/webhooks',
|
|
570
|
+
method: 'post',
|
|
571
571
|
...variables,
|
|
572
|
-
signal
|
|
572
|
+
signal
|
|
573
573
|
});
|
|
574
574
|
/**
|
|
575
575
|
* Get a list of webhooks
|
|
576
576
|
*/
|
|
577
|
-
const getWebhooks = (variables, signal) => fetch$1({ url:
|
|
577
|
+
const getWebhooks = (variables, signal) => fetch$1({ url: '/v1/webhooks', method: 'get', ...variables, signal });
|
|
578
578
|
/**
|
|
579
579
|
* Get a webhook
|
|
580
580
|
*/
|
|
581
581
|
const getWebhook = (variables, signal) => fetch$1({
|
|
582
|
-
url:
|
|
583
|
-
method:
|
|
582
|
+
url: '/v1/webhooks/{id}',
|
|
583
|
+
method: 'get',
|
|
584
584
|
...variables,
|
|
585
|
-
signal
|
|
585
|
+
signal
|
|
586
586
|
});
|
|
587
587
|
/**
|
|
588
588
|
* Deletes a webhook
|
|
589
589
|
*/
|
|
590
590
|
const deleteWebhook = (variables, signal) => fetch$1({
|
|
591
|
-
url:
|
|
592
|
-
method:
|
|
591
|
+
url: '/v1/webhooks/{id}',
|
|
592
|
+
method: 'delete',
|
|
593
593
|
...variables,
|
|
594
|
-
signal
|
|
594
|
+
signal
|
|
595
595
|
});
|
|
596
596
|
/**
|
|
597
597
|
* Retrieves a Configurable Log Drain. This endpoint must be called with a team AccessToken (integration OAuth2 clients are not allowed). Only log drains owned by the authenticated team can be accessed.
|
|
598
598
|
*/
|
|
599
|
-
const getConfigurableLogDrain = (variables, signal) => fetch$1({ url:
|
|
599
|
+
const getConfigurableLogDrain = (variables, signal) => fetch$1({ url: '/v1/log-drains/{id}', method: 'get', ...variables, signal });
|
|
600
600
|
/**
|
|
601
601
|
* Deletes a Configurable Log Drain. This endpoint must be called with a team AccessToken (integration OAuth2 clients are not allowed). Only log drains owned by the authenticated team can be deleted.
|
|
602
602
|
*/
|
|
603
|
-
const deleteConfigurableLogDrain = (variables, signal) => fetch$1({ url:
|
|
603
|
+
const deleteConfigurableLogDrain = (variables, signal) => fetch$1({ url: '/v1/log-drains/{id}', method: 'delete', ...variables, signal });
|
|
604
604
|
/**
|
|
605
605
|
* Retrieves a list of Configurable Log Drains. This endpoint must be called with a team AccessToken (integration OAuth2 clients are not allowed). Only log drains owned by the authenticated team can be accessed.
|
|
606
606
|
*/
|
|
607
|
-
const getConfigurableLogDrains = (variables, signal) => fetch$1({ url:
|
|
607
|
+
const getConfigurableLogDrains = (variables, signal) => fetch$1({ url: '/v1/log-drains', method: 'get', ...variables, signal });
|
|
608
608
|
/**
|
|
609
609
|
* Creates a configurable log drain. This endpoint must be called with a team AccessToken (integration OAuth2 clients are not allowed)
|
|
610
610
|
*/
|
|
611
|
-
const createConfigurableLogDrain = (variables, signal) => fetch$1({ url:
|
|
611
|
+
const createConfigurableLogDrain = (variables, signal) => fetch$1({ url: '/v1/log-drains', method: 'post', ...variables, signal });
|
|
612
612
|
/**
|
|
613
613
|
* Get information for the Team specified by the `teamId` parameter.
|
|
614
614
|
*/
|
|
615
615
|
const getTeam = (variables, signal) => fetch$1({
|
|
616
|
-
url:
|
|
617
|
-
method:
|
|
616
|
+
url: '/v2/teams/{teamId}',
|
|
617
|
+
method: 'get',
|
|
618
618
|
...variables,
|
|
619
|
-
signal
|
|
619
|
+
signal
|
|
620
620
|
});
|
|
621
621
|
/**
|
|
622
622
|
* Update the information of a Team specified by the `teamId` parameter. The request body should contain the information that will be updated on the Team.
|
|
623
623
|
*/
|
|
624
624
|
const patchTeam = (variables, signal) => fetch$1({
|
|
625
|
-
url:
|
|
626
|
-
method:
|
|
625
|
+
url: '/v2/teams/{teamId}',
|
|
626
|
+
method: 'patch',
|
|
627
627
|
...variables,
|
|
628
|
-
signal
|
|
628
|
+
signal
|
|
629
629
|
});
|
|
630
630
|
/**
|
|
631
631
|
* Get a paginated list of all the Teams the authenticated User is a member of.
|
|
632
632
|
*/
|
|
633
633
|
const getTeams = (variables, signal) => fetch$1({
|
|
634
|
-
url:
|
|
635
|
-
method:
|
|
634
|
+
url: '/v2/teams',
|
|
635
|
+
method: 'get',
|
|
636
636
|
...variables,
|
|
637
|
-
signal
|
|
637
|
+
signal
|
|
638
638
|
});
|
|
639
639
|
/**
|
|
640
640
|
* Create a new Team under your account. You need to send a POST request with the desired Team slug, and optionally the Team name.
|
|
641
641
|
*/
|
|
642
642
|
const createTeam = (variables, signal) => fetch$1({
|
|
643
|
-
url:
|
|
644
|
-
method:
|
|
643
|
+
url: '/v1/teams',
|
|
644
|
+
method: 'post',
|
|
645
645
|
...variables,
|
|
646
|
-
signal
|
|
646
|
+
signal
|
|
647
647
|
});
|
|
648
648
|
/**
|
|
649
649
|
* Delete a team under your account. You need to send a `DELETE` request with the desired team `id`. An optional array of reasons for deletion may also be sent.
|
|
650
650
|
*/
|
|
651
651
|
const deleteTeam = (variables, signal) => fetch$1({
|
|
652
|
-
url:
|
|
653
|
-
method:
|
|
652
|
+
url: '/v1/teams/{teamId}',
|
|
653
|
+
method: 'delete',
|
|
654
654
|
...variables,
|
|
655
|
-
signal
|
|
655
|
+
signal
|
|
656
656
|
});
|
|
657
657
|
/**
|
|
658
658
|
* Delete an active Team invite code.
|
|
659
659
|
*/
|
|
660
660
|
const deleteTeamInviteCode = (variables, signal) => fetch$1({
|
|
661
|
-
url:
|
|
662
|
-
method:
|
|
661
|
+
url: '/v1/teams/{teamId}/invites/{inviteId}',
|
|
662
|
+
method: 'delete',
|
|
663
663
|
...variables,
|
|
664
|
-
signal
|
|
664
|
+
signal
|
|
665
665
|
});
|
|
666
666
|
/**
|
|
667
667
|
* Get a paginated list of team members for the provided team.
|
|
668
668
|
*/
|
|
669
669
|
const getTeamMembers = (variables, signal) => fetch$1({
|
|
670
|
-
url:
|
|
671
|
-
method:
|
|
670
|
+
url: '/v2/teams/{teamId}/members',
|
|
671
|
+
method: 'get',
|
|
672
672
|
...variables,
|
|
673
|
-
signal
|
|
673
|
+
signal
|
|
674
674
|
});
|
|
675
675
|
/**
|
|
676
676
|
* Invite a user to join the team specified in the URL. The authenticated user needs to be an `OWNER` in order to successfully invoke this endpoint. The user can be specified with an email or an ID. If both email and ID are provided, ID will take priority.
|
|
677
677
|
*/
|
|
678
678
|
const inviteUserToTeam = (variables, signal) => fetch$1({
|
|
679
|
-
url:
|
|
680
|
-
method:
|
|
679
|
+
url: '/v1/teams/{teamId}/members',
|
|
680
|
+
method: 'post',
|
|
681
681
|
...variables,
|
|
682
|
-
signal
|
|
682
|
+
signal
|
|
683
683
|
});
|
|
684
684
|
/**
|
|
685
685
|
* Request access to a team as a member. An owner has to approve the request. Only 10 users can request access to a team at the same time.
|
|
686
686
|
*/
|
|
687
687
|
const requestAccessToTeam = (variables, signal) => fetch$1({
|
|
688
|
-
url:
|
|
689
|
-
method:
|
|
688
|
+
url: '/v1/teams/{teamId}/request',
|
|
689
|
+
method: 'post',
|
|
690
690
|
...variables,
|
|
691
|
-
signal
|
|
691
|
+
signal
|
|
692
692
|
});
|
|
693
693
|
/**
|
|
694
694
|
* Check the status of a join request. It'll respond with a 404 if the request has been declined. If no `userId` path segment was provided, this endpoint will instead return the status of the authenticated user.
|
|
695
695
|
*/
|
|
696
696
|
const getTeamAccessRequest = (variables, signal) => fetch$1({
|
|
697
|
-
url:
|
|
698
|
-
method:
|
|
697
|
+
url: '/v1/teams/{teamId}/request/{userId}',
|
|
698
|
+
method: 'get',
|
|
699
699
|
...variables,
|
|
700
|
-
signal
|
|
700
|
+
signal
|
|
701
701
|
});
|
|
702
702
|
/**
|
|
703
703
|
* Join a team with a provided invite code or team ID.
|
|
704
704
|
*/
|
|
705
705
|
const joinTeam = (variables, signal) => fetch$1({
|
|
706
|
-
url:
|
|
707
|
-
method:
|
|
706
|
+
url: '/v1/teams/{teamId}/members/teams/join',
|
|
707
|
+
method: 'post',
|
|
708
708
|
...variables,
|
|
709
|
-
signal
|
|
709
|
+
signal
|
|
710
710
|
});
|
|
711
711
|
/**
|
|
712
712
|
* Update the membership of a Team Member on the Team specified by `teamId`, such as changing the _role_ of the member, or confirming a request to join the Team for an unconfirmed member. The authenticated user must be an `OWNER` of the Team.
|
|
713
713
|
*/
|
|
714
|
-
const updateTeamMember = (variables, signal) => fetch$1({ url:
|
|
714
|
+
const updateTeamMember = (variables, signal) => fetch$1({ url: '/v1/teams/{teamId}/members/{uid}', method: 'patch', ...variables, signal });
|
|
715
715
|
/**
|
|
716
716
|
* Remove a Team Member from the Team, or dismiss a user that requested access, or leave a team.
|
|
717
717
|
*/
|
|
718
718
|
const removeTeamMember = (variables, signal) => fetch$1({
|
|
719
|
-
url:
|
|
720
|
-
method:
|
|
719
|
+
url: '/v1/teams/{teamId}/members/{uid}',
|
|
720
|
+
method: 'delete',
|
|
721
721
|
...variables,
|
|
722
|
-
signal
|
|
722
|
+
signal
|
|
723
723
|
});
|
|
724
724
|
/**
|
|
725
725
|
* Allows to retrieve the file structure of a deployment by supplying the deployment unique identifier.
|
|
726
726
|
*/
|
|
727
|
-
const listDeploymentFiles = (variables, signal) => fetch$1({ url:
|
|
727
|
+
const listDeploymentFiles = (variables, signal) => fetch$1({ url: '/v6/deployments/{id}/files', method: 'get', ...variables, signal });
|
|
728
728
|
/**
|
|
729
729
|
* Allows to retrieve the content of a file by supplying the file identifier and the deployment unique identifier. The response body will contain the raw content of the file.
|
|
730
730
|
*/
|
|
731
|
-
const getDeploymentFileContents = (variables, signal) => fetch$1({ url:
|
|
731
|
+
const getDeploymentFileContents = (variables, signal) => fetch$1({ url: '/v6/deployments/{id}/files/{fileId}', method: 'get', ...variables, signal });
|
|
732
732
|
/**
|
|
733
733
|
* Retrieves the list of builds given their deployment's unique identifier.
|
|
734
734
|
*/
|
|
735
|
-
const listDeploymentBuilds = (variables, signal) => fetch$1({ url:
|
|
735
|
+
const listDeploymentBuilds = (variables, signal) => fetch$1({ url: '/v11/deployments/{deploymentId}/builds', method: 'get', ...variables, signal });
|
|
736
736
|
/**
|
|
737
737
|
* Creates a new check. This endpoint must be called with an OAuth2 or it will produce a 400 error.
|
|
738
738
|
*/
|
|
739
|
-
const createCheck = (variables, signal) => fetch$1({ url:
|
|
739
|
+
const createCheck = (variables, signal) => fetch$1({ url: '/v1/deployments/{deploymentId}/checks', method: 'post', ...variables, signal });
|
|
740
740
|
/**
|
|
741
741
|
* List all of the checks created for a deployment.
|
|
742
742
|
*/
|
|
743
743
|
const getAllChecks = (variables, signal) => fetch$1({
|
|
744
|
-
url:
|
|
745
|
-
method:
|
|
744
|
+
url: '/v1/deployments/{deploymentId}/checks',
|
|
745
|
+
method: 'get',
|
|
746
746
|
...variables,
|
|
747
|
-
signal
|
|
747
|
+
signal
|
|
748
748
|
});
|
|
749
749
|
/**
|
|
750
750
|
* Return a detailed response for a single check.
|
|
751
751
|
*/
|
|
752
752
|
const getCheck = (variables, signal) => fetch$1({
|
|
753
|
-
url:
|
|
754
|
-
method:
|
|
753
|
+
url: '/v1/deployments/{deploymentId}/checks/{checkId}',
|
|
754
|
+
method: 'get',
|
|
755
755
|
...variables,
|
|
756
|
-
signal
|
|
756
|
+
signal
|
|
757
757
|
});
|
|
758
758
|
/**
|
|
759
759
|
* Update an existing check. This endpoint must be called with an OAuth2 or it will produce a 400 error.
|
|
760
760
|
*/
|
|
761
|
-
const updateCheck = (variables, signal) => fetch$1({ url:
|
|
761
|
+
const updateCheck = (variables, signal) => fetch$1({ url: '/v1/deployments/{deploymentId}/checks/{checkId}', method: 'patch', ...variables, signal });
|
|
762
762
|
/**
|
|
763
763
|
* Rerequest a selected check that has failed.
|
|
764
764
|
*/
|
|
765
765
|
const rerequestCheck = (variables, signal) => fetch$1({
|
|
766
|
-
url:
|
|
767
|
-
method:
|
|
766
|
+
url: '/v1/deployments/{deploymentId}/checks/{checkId}/rerequest',
|
|
767
|
+
method: 'post',
|
|
768
768
|
...variables,
|
|
769
|
-
signal
|
|
769
|
+
signal
|
|
770
770
|
});
|
|
771
771
|
/**
|
|
772
772
|
* Returns all Edge Configs.
|
|
773
773
|
*/
|
|
774
774
|
const getEdgeConfigs = (variables, signal) => fetch$1({
|
|
775
|
-
url:
|
|
776
|
-
method:
|
|
775
|
+
url: '/v1/edge-config',
|
|
776
|
+
method: 'get',
|
|
777
777
|
...variables,
|
|
778
|
-
signal
|
|
778
|
+
signal
|
|
779
779
|
});
|
|
780
780
|
/**
|
|
781
781
|
* Creates an Edge Config.
|
|
782
782
|
*/
|
|
783
|
-
const createEdgeConfig = (variables, signal) => fetch$1({ url:
|
|
783
|
+
const createEdgeConfig = (variables, signal) => fetch$1({ url: '/v1/edge-config', method: 'post', ...variables, signal });
|
|
784
784
|
/**
|
|
785
785
|
* Returns an Edge Config.
|
|
786
786
|
*/
|
|
787
787
|
const getEdgeConfig = (variables, signal) => fetch$1({
|
|
788
|
-
url:
|
|
789
|
-
method:
|
|
788
|
+
url: '/v1/edge-config/{edgeConfigId}',
|
|
789
|
+
method: 'get',
|
|
790
790
|
...variables,
|
|
791
|
-
signal
|
|
791
|
+
signal
|
|
792
792
|
});
|
|
793
793
|
/**
|
|
794
794
|
* Updates an Edge Config.
|
|
795
795
|
*/
|
|
796
|
-
const updateEdgeConfig = (variables, signal) => fetch$1({ url:
|
|
796
|
+
const updateEdgeConfig = (variables, signal) => fetch$1({ url: '/v1/edge-config/{edgeConfigId}', method: 'put', ...variables, signal });
|
|
797
797
|
/**
|
|
798
798
|
* Delete an Edge Config by id.
|
|
799
799
|
*/
|
|
800
800
|
const deleteEdgeConfig = (variables, signal) => fetch$1({
|
|
801
|
-
url:
|
|
802
|
-
method:
|
|
801
|
+
url: '/v1/edge-config/{edgeConfigId}',
|
|
802
|
+
method: 'delete',
|
|
803
803
|
...variables,
|
|
804
|
-
signal
|
|
804
|
+
signal
|
|
805
805
|
});
|
|
806
806
|
/**
|
|
807
807
|
* Returns all items of an Edge Config.
|
|
808
808
|
*/
|
|
809
|
-
const getEdgeConfigItems = (variables, signal) => fetch$1({ url:
|
|
809
|
+
const getEdgeConfigItems = (variables, signal) => fetch$1({ url: '/v1/edge-config/{edgeConfigId}/items', method: 'get', ...variables, signal });
|
|
810
810
|
/**
|
|
811
811
|
* Update multiple Edge Config Items in batch.
|
|
812
812
|
*/
|
|
813
|
-
const patchtEdgeConfigItems = (variables, signal) => fetch$1({ url:
|
|
813
|
+
const patchtEdgeConfigItems = (variables, signal) => fetch$1({ url: '/v1/edge-config/{edgeConfigId}/items', method: 'patch', ...variables, signal });
|
|
814
814
|
/**
|
|
815
815
|
* Returns a specific Edge Config Item.
|
|
816
816
|
*/
|
|
817
|
-
const getEdgeConfigItem = (variables, signal) => fetch$1({ url:
|
|
817
|
+
const getEdgeConfigItem = (variables, signal) => fetch$1({ url: '/v1/edge-config/{edgeConfigId}/item/{edgeConfigItemKey}', method: 'get', ...variables, signal });
|
|
818
818
|
/**
|
|
819
819
|
* Returns all tokens of an Edge Config.
|
|
820
820
|
*/
|
|
821
|
-
const getEdgeConfigTokens = (variables, signal) => fetch$1({ url:
|
|
821
|
+
const getEdgeConfigTokens = (variables, signal) => fetch$1({ url: '/v1/edge-config/{edgeConfigId}/tokens', method: 'get', ...variables, signal });
|
|
822
822
|
/**
|
|
823
823
|
* Deletes one or more tokens of an existing Edge Config.
|
|
824
824
|
*/
|
|
825
|
-
const deleteEdgeConfigTokens = (variables, signal) => fetch$1({ url:
|
|
825
|
+
const deleteEdgeConfigTokens = (variables, signal) => fetch$1({ url: '/v1/edge-config/{edgeConfigId}/tokens', method: 'delete', ...variables, signal });
|
|
826
826
|
/**
|
|
827
827
|
* Return meta data about an Edge Config token.
|
|
828
828
|
*/
|
|
829
|
-
const getEdgeConfigToken = (variables, signal) => fetch$1({ url:
|
|
829
|
+
const getEdgeConfigToken = (variables, signal) => fetch$1({ url: '/v1/edge-config/{edgeConfigId}/token/{token}', method: 'get', ...variables, signal });
|
|
830
830
|
/**
|
|
831
831
|
* Adds a token to an existing Edge Config.
|
|
832
832
|
*/
|
|
833
|
-
const createEdgeConfigToken = (variables, signal) => fetch$1({ url:
|
|
833
|
+
const createEdgeConfigToken = (variables, signal) => fetch$1({ url: '/v1/edge-config/{edgeConfigId}/token', method: 'post', ...variables, signal });
|
|
834
834
|
const operationsByTag = {
|
|
835
835
|
artifacts: { recordEvents, status, uploadArtifact, downloadArtifact, artifactQuery },
|
|
836
836
|
deployments: {
|
|
@@ -843,7 +843,7 @@ const operationsByTag = {
|
|
|
843
843
|
getDeployments,
|
|
844
844
|
listDeploymentFiles,
|
|
845
845
|
getDeploymentFileContents,
|
|
846
|
-
listDeploymentBuilds
|
|
846
|
+
listDeploymentBuilds
|
|
847
847
|
},
|
|
848
848
|
certs: { getCertById, removeCert, issueCert, uploadCert },
|
|
849
849
|
user: { listUserEvents, getAuthUser, requestDelete },
|
|
@@ -858,7 +858,7 @@ const operationsByTag = {
|
|
|
858
858
|
getDomain,
|
|
859
859
|
getDomains,
|
|
860
860
|
createOrTransferDomain,
|
|
861
|
-
deleteDomain
|
|
861
|
+
deleteDomain
|
|
862
862
|
},
|
|
863
863
|
secrets: { getSecrets, createSecret, renameSecret, getSecret, deleteSecret },
|
|
864
864
|
projects: {
|
|
@@ -877,7 +877,7 @@ const operationsByTag = {
|
|
|
877
877
|
getProjectEnv,
|
|
878
878
|
createProjectEnv,
|
|
879
879
|
removeProjectEnv,
|
|
880
|
-
editProjectEnv
|
|
880
|
+
editProjectEnv
|
|
881
881
|
},
|
|
882
882
|
integrations: { getConfigurations, getConfiguration, deleteConfiguration, gitNamespaces, searchRepo },
|
|
883
883
|
logDrains: {
|
|
@@ -887,7 +887,7 @@ const operationsByTag = {
|
|
|
887
887
|
getConfigurableLogDrain,
|
|
888
888
|
deleteConfigurableLogDrain,
|
|
889
889
|
getConfigurableLogDrains,
|
|
890
|
-
createConfigurableLogDrain
|
|
890
|
+
createConfigurableLogDrain
|
|
891
891
|
},
|
|
892
892
|
webhooks: { createWebhook, getWebhooks, getWebhook, deleteWebhook },
|
|
893
893
|
teams: {
|
|
@@ -903,7 +903,7 @@ const operationsByTag = {
|
|
|
903
903
|
getTeamAccessRequest,
|
|
904
904
|
joinTeam,
|
|
905
905
|
updateTeamMember,
|
|
906
|
-
removeTeamMember
|
|
906
|
+
removeTeamMember
|
|
907
907
|
},
|
|
908
908
|
checks: { createCheck, getAllChecks, getCheck, updateCheck, rerequestCheck },
|
|
909
909
|
edgeConfig: {
|
|
@@ -918,8 +918,8 @@ const operationsByTag = {
|
|
|
918
918
|
getEdgeConfigTokens,
|
|
919
919
|
deleteEdgeConfigTokens,
|
|
920
920
|
getEdgeConfigToken,
|
|
921
|
-
createEdgeConfigToken
|
|
922
|
-
}
|
|
921
|
+
createEdgeConfigToken
|
|
922
|
+
}
|
|
923
923
|
};
|
|
924
924
|
|
|
925
925
|
var _VercelApi_token, _VercelApi_fetch;
|
|
@@ -929,10 +929,10 @@ class VercelApi {
|
|
|
929
929
|
_VercelApi_fetch.set(this, void 0);
|
|
930
930
|
__classPrivateFieldSet(this, _VercelApi_token, options.token, "f");
|
|
931
931
|
if (!options.token)
|
|
932
|
-
throw new Error(
|
|
932
|
+
throw new Error('Token is required');
|
|
933
933
|
__classPrivateFieldSet(this, _VercelApi_fetch, options.fetch || fetch, "f");
|
|
934
934
|
if (!__classPrivateFieldGet(this, _VercelApi_fetch, "f"))
|
|
935
|
-
throw new Error(
|
|
935
|
+
throw new Error('Fetch is required');
|
|
936
936
|
}
|
|
937
937
|
get api() {
|
|
938
938
|
const token = __classPrivateFieldGet(this, _VercelApi_token, "f");
|
|
@@ -951,11 +951,16 @@ class VercelApi {
|
|
|
951
951
|
return (params) => {
|
|
952
952
|
return method({ ...params, token, fetchImpl });
|
|
953
953
|
};
|
|
954
|
-
}
|
|
954
|
+
}
|
|
955
955
|
});
|
|
956
|
-
}
|
|
956
|
+
}
|
|
957
957
|
});
|
|
958
958
|
}
|
|
959
|
+
async request(endpoint, params) {
|
|
960
|
+
const [method = '', url = ''] = endpoint.split(' ');
|
|
961
|
+
const extraParams = (params || {});
|
|
962
|
+
return fetch$1({ ...extraParams, method, url, token: __classPrivateFieldGet(this, _VercelApi_token, "f"), fetchImpl: __classPrivateFieldGet(this, _VercelApi_fetch, "f") });
|
|
963
|
+
}
|
|
959
964
|
}
|
|
960
965
|
_VercelApi_token = new WeakMap(), _VercelApi_fetch = new WeakMap();
|
|
961
966
|
|