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