vercel-api-js 1.0.1 → 1.0.2

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.
Files changed (58) hide show
  1. package/dist/index.cjs +4495 -0
  2. package/dist/index.d.cts +42176 -0
  3. package/dist/index.d.mts +41456 -998
  4. package/dist/index.d.ts +41456 -998
  5. package/dist/index.mjs +4488 -5
  6. package/dist/mcp.cjs +4946 -0
  7. package/dist/mcp.d.cts +5 -0
  8. package/dist/mcp.d.mts +5 -1
  9. package/dist/mcp.d.ts +5 -1
  10. package/dist/mcp.mjs +4944 -1
  11. package/dist/shared/vercel-api-js.BaOSBqhR.cjs +6795 -0
  12. package/dist/shared/vercel-api-js.BnRX1F13.mjs +6510 -0
  13. package/dist/shared/vercel-api-js.C9s64N79.d.cts +35 -0
  14. package/dist/shared/vercel-api-js.C9s64N79.d.mts +35 -0
  15. package/dist/shared/vercel-api-js.C9s64N79.d.ts +35 -0
  16. package/package.json +25 -18
  17. package/dist/client.d.mts +0 -228
  18. package/dist/client.d.ts +0 -228
  19. package/dist/client.js +0 -75
  20. package/dist/client.mjs +0 -68
  21. package/dist/generated/components.d.mts +0 -2600
  22. package/dist/generated/components.d.ts +0 -2600
  23. package/dist/generated/components.js +0 -3579
  24. package/dist/generated/components.mjs +0 -3395
  25. package/dist/generated/mcp.d.mts +0 -2061
  26. package/dist/generated/mcp.d.ts +0 -2061
  27. package/dist/generated/mcp.js +0 -4692
  28. package/dist/generated/mcp.mjs +0 -4508
  29. package/dist/generated/schemas.d.mts +0 -19403
  30. package/dist/generated/schemas.d.ts +0 -19403
  31. package/dist/generated/schemas.js +0 -7619
  32. package/dist/generated/schemas.mjs +0 -7589
  33. package/dist/generated/types.d.mts +0 -15009
  34. package/dist/generated/types.d.ts +0 -15009
  35. package/dist/generated/types.js +0 -951
  36. package/dist/generated/types.mjs +0 -946
  37. package/dist/index.js +0 -49
  38. package/dist/mcp.js +0 -5
  39. package/dist/utils/fetch.d.mts +0 -18
  40. package/dist/utils/fetch.d.ts +0 -18
  41. package/dist/utils/fetch.js +0 -8
  42. package/dist/utils/fetch.mjs +0 -5
  43. package/dist/utils/fetcher.d.mts +0 -21
  44. package/dist/utils/fetcher.d.ts +0 -21
  45. package/dist/utils/fetcher.js +0 -69
  46. package/dist/utils/fetcher.mjs +0 -66
  47. package/dist/utils/lang.d.mts +0 -1
  48. package/dist/utils/lang.d.ts +0 -1
  49. package/dist/utils/lang.js +0 -9
  50. package/dist/utils/lang.mjs +0 -6
  51. package/dist/utils/mcp.d.mts +0 -1
  52. package/dist/utils/mcp.d.ts +0 -1
  53. package/dist/utils/mcp.js +0 -2
  54. package/dist/utils/mcp.mjs +0 -1
  55. package/dist/utils/types.d.mts +0 -3
  56. package/dist/utils/types.d.ts +0 -3
  57. package/dist/utils/types.js +0 -2
  58. package/dist/utils/types.mjs +0 -1
@@ -1,4692 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.readAccessGroup = readAccessGroup;
7
- exports.updateAccessGroup = updateAccessGroup;
8
- exports.deleteAccessGroup = deleteAccessGroup;
9
- exports.listAccessGroupMembers = listAccessGroupMembers;
10
- exports.listAccessGroups = listAccessGroups;
11
- exports.createAccessGroup = createAccessGroup;
12
- exports.listAccessGroupProjects = listAccessGroupProjects;
13
- exports.createAccessGroupProject = createAccessGroupProject;
14
- exports.readAccessGroupProject = readAccessGroupProject;
15
- exports.updateAccessGroupProject = updateAccessGroupProject;
16
- exports.deleteAccessGroupProject = deleteAccessGroupProject;
17
- exports.recordEvents = recordEvents;
18
- exports.status = status;
19
- exports.uploadArtifact = uploadArtifact;
20
- exports.downloadArtifact = downloadArtifact;
21
- exports.artifactQuery = artifactQuery;
22
- exports.createCheck = createCheck;
23
- exports.getAllChecks = getAllChecks;
24
- exports.getCheck = getCheck;
25
- exports.updateCheck = updateCheck;
26
- exports.rerequestCheck = rerequestCheck;
27
- exports.purgeAllDataCache = purgeAllDataCache;
28
- exports.updateDataCacheBillingSettings = updateDataCacheBillingSettings;
29
- exports.updateProjectDataCache = updateProjectDataCache;
30
- exports.getDeploymentEvents = getDeploymentEvents;
31
- exports.updateIntegrationDeploymentAction = updateIntegrationDeploymentAction;
32
- exports.getDeployment = getDeployment;
33
- exports.createDeployment = createDeployment;
34
- exports.cancelDeployment = cancelDeployment;
35
- exports.buyDomain = buyDomain;
36
- exports.checkDomainPrice = checkDomainPrice;
37
- exports.checkDomainStatus = checkDomainStatus;
38
- exports.getRecords = getRecords;
39
- exports.createRecord = createRecord;
40
- exports.updateRecord = updateRecord;
41
- exports.removeRecord = removeRecord;
42
- exports.getDomainTransfer = getDomainTransfer;
43
- exports.getDomainConfig = getDomainConfig;
44
- exports.getDomain = getDomain;
45
- exports.getDomains = getDomains;
46
- exports.createOrTransferDomain = createOrTransferDomain;
47
- exports.patchDomain = patchDomain;
48
- exports.deleteDomain = deleteDomain;
49
- exports.getEdgeConfigs = getEdgeConfigs;
50
- exports.createEdgeConfig = createEdgeConfig;
51
- exports.getEdgeConfig = getEdgeConfig;
52
- exports.updateEdgeConfig = updateEdgeConfig;
53
- exports.deleteEdgeConfig = deleteEdgeConfig;
54
- exports.getEdgeConfigItems = getEdgeConfigItems;
55
- exports.patchEdgeConfigItems = patchEdgeConfigItems;
56
- exports.getEdgeConfigSchema = getEdgeConfigSchema;
57
- exports.patchEdgeConfigSchema = patchEdgeConfigSchema;
58
- exports.deleteEdgeConfigSchema = deleteEdgeConfigSchema;
59
- exports.getEdgeConfigItem = getEdgeConfigItem;
60
- exports.getEdgeConfigTokens = getEdgeConfigTokens;
61
- exports.deleteEdgeConfigTokens = deleteEdgeConfigTokens;
62
- exports.getEdgeConfigToken = getEdgeConfigToken;
63
- exports.createEdgeConfigToken = createEdgeConfigToken;
64
- exports.getEdgeConfigBackup = getEdgeConfigBackup;
65
- exports.getEdgeConfigBackups = getEdgeConfigBackups;
66
- exports.listUserEvents = listUserEvents;
67
- exports.getAccountInfo = getAccountInfo;
68
- exports.getMember = getMember;
69
- exports.createEvent = createEvent;
70
- exports.getIntegrationResources = getIntegrationResources;
71
- exports.getIntegrationResource = getIntegrationResource;
72
- exports.deleteIntegrationResource = deleteIntegrationResource;
73
- exports.importResource = importResource;
74
- exports.submitBillingData = submitBillingData;
75
- exports.submitInvoice = submitInvoice;
76
- exports.getInvoice = getInvoice;
77
- exports.updateInvoice = updateInvoice;
78
- exports.submitPrepaymentBalances = submitPrepaymentBalances;
79
- exports.updateResourceSecrets = updateResourceSecrets;
80
- exports.updateResourceSecretsById = updateResourceSecretsById;
81
- exports.getConfigurations = getConfigurations;
82
- exports.getConfiguration = getConfiguration;
83
- exports.deleteConfiguration = deleteConfiguration;
84
- exports.exchangeSsoToken = exchangeSsoToken;
85
- exports.getIntegrationLogDrains = getIntegrationLogDrains;
86
- exports.createLogDrain = createLogDrain;
87
- exports.deleteIntegrationLogDrain = deleteIntegrationLogDrain;
88
- exports.getRuntimeLogs = getRuntimeLogs;
89
- exports.createExperimentationItem = createExperimentationItem;
90
- exports.updateExperimentationItem = updateExperimentationItem;
91
- exports.deleteExperimentationItem = deleteExperimentationItem;
92
- exports.updateExperimentationEdgeConfig = updateExperimentationEdgeConfig;
93
- exports.getProjectMembers = getProjectMembers;
94
- exports.addProjectMember = addProjectMember;
95
- exports.removeProjectMember = removeProjectMember;
96
- exports.getProjects = getProjects;
97
- exports.createProject = createProject;
98
- exports.getProject = getProject;
99
- exports.updateProject = updateProject;
100
- exports.deleteProject = deleteProject;
101
- exports.createCustomEnvironment = createCustomEnvironment;
102
- exports.listCustomEnvironments = listCustomEnvironments;
103
- exports.getCustomEnvironment = getCustomEnvironment;
104
- exports.updateCustomEnvironment = updateCustomEnvironment;
105
- exports.removeCustomEnvironment = removeCustomEnvironment;
106
- exports.getProjectDomains = getProjectDomains;
107
- exports.getProjectDomain = getProjectDomain;
108
- exports.updateProjectDomain = updateProjectDomain;
109
- exports.removeProjectDomain = removeProjectDomain;
110
- exports.addProjectDomain = addProjectDomain;
111
- exports.moveProjectDomain = moveProjectDomain;
112
- exports.verifyProjectDomain = verifyProjectDomain;
113
- exports.filterProjectEnvs = filterProjectEnvs;
114
- exports.createProjectEnv = createProjectEnv;
115
- exports.getProjectEnv = getProjectEnv;
116
- exports.removeProjectEnv = removeProjectEnv;
117
- exports.editProjectEnv = editProjectEnv;
118
- exports.getRollingReleaseBillingStatus = getRollingReleaseBillingStatus;
119
- exports.getRollingReleaseConfig = getRollingReleaseConfig;
120
- exports.deleteRollingReleaseConfig = deleteRollingReleaseConfig;
121
- exports.updateRollingReleaseConfig = updateRollingReleaseConfig;
122
- exports.getRollingRelease = getRollingRelease;
123
- exports.approveRollingReleaseStage = approveRollingReleaseStage;
124
- exports.completeRollingRelease = completeRollingRelease;
125
- exports.createProjectTransferRequest = createProjectTransferRequest;
126
- exports.acceptProjectTransferRequest = acceptProjectTransferRequest;
127
- exports.updateProjectProtectionBypass = updateProjectProtectionBypass;
128
- exports.requestPromote = requestPromote;
129
- exports.listPromoteAliases = listPromoteAliases;
130
- exports.pauseProject = pauseProject;
131
- exports.unpauseProject = unpauseProject;
132
- exports.updateAttackChallengeMode = updateAttackChallengeMode;
133
- exports.putFirewallConfig = putFirewallConfig;
134
- exports.updateFirewallConfig = updateFirewallConfig;
135
- exports.getFirewallConfig = getFirewallConfig;
136
- exports.getActiveAttackStatus = getActiveAttackStatus;
137
- exports.getBypassIp = getBypassIp;
138
- exports.addBypassIp = addBypassIp;
139
- exports.removeBypassIp = removeBypassIp;
140
- exports.getTeamMembers = getTeamMembers;
141
- exports.inviteUserToTeam = inviteUserToTeam;
142
- exports.requestAccessToTeam = requestAccessToTeam;
143
- exports.getTeamAccessRequest = getTeamAccessRequest;
144
- exports.joinTeam = joinTeam;
145
- exports.updateTeamMember = updateTeamMember;
146
- exports.removeTeamMember = removeTeamMember;
147
- exports.getTeam = getTeam;
148
- exports.patchTeam = patchTeam;
149
- exports.getTeams = getTeams;
150
- exports.createTeam = createTeam;
151
- exports.deleteTeam = deleteTeam;
152
- exports.deleteTeamInviteCode = deleteTeamInviteCode;
153
- exports.uploadFile = uploadFile;
154
- exports.listAuthTokens = listAuthTokens;
155
- exports.createAuthToken = createAuthToken;
156
- exports.getAuthToken = getAuthToken;
157
- exports.deleteAuthToken = deleteAuthToken;
158
- exports.getAuthUser = getAuthUser;
159
- exports.requestDelete = requestDelete;
160
- exports.createWebhook = createWebhook;
161
- exports.getWebhooks = getWebhooks;
162
- exports.getWebhook = getWebhook;
163
- exports.deleteWebhook = deleteWebhook;
164
- exports.listDeploymentAliases = listDeploymentAliases;
165
- exports.assignAlias = assignAlias;
166
- exports.listAliases = listAliases;
167
- exports.getAlias = getAlias;
168
- exports.deleteAlias = deleteAlias;
169
- exports.patchUrlProtectionBypass = patchUrlProtectionBypass;
170
- exports.listCerts = listCerts;
171
- exports.getCertById = getCertById;
172
- exports.removeCert = removeCert;
173
- exports.issueCert = issueCert;
174
- exports.uploadCert = uploadCert;
175
- exports.listDeploymentFiles = listDeploymentFiles;
176
- exports.getDeploymentFileContents = getDeploymentFileContents;
177
- exports.getDeployments = getDeployments;
178
- exports.deleteDeployment = deleteDeployment;
179
- exports.getSecrets = getSecrets;
180
- exports.createSecret = createSecret;
181
- exports.renameSecret = renameSecret;
182
- exports.getSecret = getSecret;
183
- exports.deleteSecret = deleteSecret;
184
- exports.initMcpTools = initMcpTools;
185
- const fetcher_1 = __importDefault(require("../utils/fetcher.js"));
186
- const schemas_ts_1 = require("./schemas.js");
187
- /**
188
- * @description Allows to read an access group
189
- * @summary Reads an access group
190
- * {@link /v1/access-groups/:idOrName}
191
- */
192
- async function readAccessGroup({ pathParams: { idOrName }, queryParams, config = {} }) {
193
- const { client: request = fetcher_1.default, ...requestConfig } = config;
194
- if (!idOrName) {
195
- throw new Error(`Missing required path parameter: idOrName`);
196
- }
197
- const data = await request({ method: 'GET', url: `/v1/access-groups/${idOrName}`, queryParams, ...requestConfig });
198
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
199
- }
200
- /**
201
- * @description Allows to update an access group metadata
202
- * @summary Update an access group
203
- * {@link /v1/access-groups/:idOrName}
204
- */
205
- async function updateAccessGroup({ pathParams: { idOrName }, queryParams, config = {} }) {
206
- const { client: request = fetcher_1.default, ...requestConfig } = config;
207
- if (!idOrName) {
208
- throw new Error(`Missing required path parameter: idOrName`);
209
- }
210
- const data = await request({
211
- method: 'POST',
212
- url: `/v1/access-groups/${idOrName}`,
213
- queryParams,
214
- ...requestConfig,
215
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
216
- });
217
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
218
- }
219
- /**
220
- * @description Allows to delete an access group
221
- * @summary Deletes an access group
222
- * {@link /v1/access-groups/:idOrName}
223
- */
224
- async function deleteAccessGroup({ pathParams: { idOrName }, queryParams, config = {} }) {
225
- const { client: request = fetcher_1.default, ...requestConfig } = config;
226
- if (!idOrName) {
227
- throw new Error(`Missing required path parameter: idOrName`);
228
- }
229
- const data = await request({ method: 'DELETE', url: `/v1/access-groups/${idOrName}`, queryParams, ...requestConfig });
230
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
231
- }
232
- /**
233
- * @description List members of an access group
234
- * @summary List members of an access group
235
- * {@link /v1/access-groups/:idOrName/members}
236
- */
237
- async function listAccessGroupMembers({ pathParams: { idOrName }, queryParams, config = {} }) {
238
- const { client: request = fetcher_1.default, ...requestConfig } = config;
239
- if (!idOrName) {
240
- throw new Error(`Missing required path parameter: idOrName`);
241
- }
242
- const data = await request({ method: 'GET', url: `/v1/access-groups/${idOrName}/members`, queryParams, ...requestConfig });
243
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
244
- }
245
- /**
246
- * @description List access groups
247
- * @summary List access groups for a team, project or member
248
- * {@link /v1/access-groups}
249
- */
250
- async function listAccessGroups({ queryParams, config = {} }) {
251
- const { client: request = fetcher_1.default, ...requestConfig } = config;
252
- const data = await request({ method: 'GET', url: `/v1/access-groups`, queryParams, ...requestConfig });
253
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
254
- }
255
- /**
256
- * @description Allows to create an access group
257
- * @summary Creates an access group
258
- * {@link /v1/access-groups}
259
- */
260
- async function createAccessGroup({ queryParams, config = {} }) {
261
- const { client: request = fetcher_1.default, ...requestConfig } = config;
262
- const data = await request({
263
- method: 'POST',
264
- url: `/v1/access-groups`,
265
- queryParams,
266
- ...requestConfig,
267
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
268
- });
269
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
270
- }
271
- /**
272
- * @description List projects of an access group
273
- * @summary List projects of an access group
274
- * {@link /v1/access-groups/:idOrName/projects}
275
- */
276
- async function listAccessGroupProjects({ pathParams: { idOrName }, queryParams, config = {} }) {
277
- const { client: request = fetcher_1.default, ...requestConfig } = config;
278
- if (!idOrName) {
279
- throw new Error(`Missing required path parameter: idOrName`);
280
- }
281
- const data = await request({ method: 'GET', url: `/v1/access-groups/${idOrName}/projects`, queryParams, ...requestConfig });
282
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
283
- }
284
- /**
285
- * @description Allows creation of an access group project
286
- * @summary Create an access group project
287
- * {@link /v1/access-groups/:accessGroupIdOrName/projects}
288
- */
289
- async function createAccessGroupProject({ pathParams: { accessGroupIdOrName }, queryParams, config = {} }) {
290
- const { client: request = fetcher_1.default, ...requestConfig } = config;
291
- if (!accessGroupIdOrName) {
292
- throw new Error(`Missing required path parameter: accessGroupIdOrName`);
293
- }
294
- const data = await request({
295
- method: 'POST',
296
- url: `/v1/access-groups/${accessGroupIdOrName}/projects`,
297
- queryParams,
298
- ...requestConfig,
299
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
300
- });
301
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
302
- }
303
- /**
304
- * @description Allows reading an access group project
305
- * @summary Reads an access group project
306
- * {@link /v1/access-groups/:accessGroupIdOrName/projects/:projectId}
307
- */
308
- async function readAccessGroupProject({ pathParams: { accessGroupIdOrName, projectId }, queryParams, config = {} }) {
309
- const { client: request = fetcher_1.default, ...requestConfig } = config;
310
- if (!accessGroupIdOrName) {
311
- throw new Error(`Missing required path parameter: accessGroupIdOrName`);
312
- }
313
- if (!projectId) {
314
- throw new Error(`Missing required path parameter: projectId`);
315
- }
316
- const data = await request({
317
- method: 'GET',
318
- url: `/v1/access-groups/${accessGroupIdOrName}/projects/${projectId}`,
319
- queryParams,
320
- ...requestConfig
321
- });
322
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
323
- }
324
- /**
325
- * @description Allows update of an access group project
326
- * @summary Update an access group project
327
- * {@link /v1/access-groups/:accessGroupIdOrName/projects/:projectId}
328
- */
329
- async function updateAccessGroupProject({ pathParams: { accessGroupIdOrName, projectId }, queryParams, config = {} }) {
330
- const { client: request = fetcher_1.default, ...requestConfig } = config;
331
- if (!accessGroupIdOrName) {
332
- throw new Error(`Missing required path parameter: accessGroupIdOrName`);
333
- }
334
- if (!projectId) {
335
- throw new Error(`Missing required path parameter: projectId`);
336
- }
337
- const data = await request({
338
- method: 'PATCH',
339
- url: `/v1/access-groups/${accessGroupIdOrName}/projects/${projectId}`,
340
- queryParams,
341
- ...requestConfig,
342
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
343
- });
344
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
345
- }
346
- /**
347
- * @description Allows deletion of an access group project
348
- * @summary Delete an access group project
349
- * {@link /v1/access-groups/:accessGroupIdOrName/projects/:projectId}
350
- */
351
- async function deleteAccessGroupProject({ pathParams: { accessGroupIdOrName, projectId }, queryParams, config = {} }) {
352
- const { client: request = fetcher_1.default, ...requestConfig } = config;
353
- if (!accessGroupIdOrName) {
354
- throw new Error(`Missing required path parameter: accessGroupIdOrName`);
355
- }
356
- if (!projectId) {
357
- throw new Error(`Missing required path parameter: projectId`);
358
- }
359
- const data = await request({
360
- method: 'DELETE',
361
- url: `/v1/access-groups/${accessGroupIdOrName}/projects/${projectId}`,
362
- queryParams,
363
- ...requestConfig
364
- });
365
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
366
- }
367
- /**
368
- * @description 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.
369
- * @summary Record an artifacts cache usage event
370
- * {@link /v8/artifacts/events}
371
- */
372
- async function recordEvents({ queryParams, headers, config = {} }) {
373
- const { client: request = fetcher_1.default, ...requestConfig } = config;
374
- const data = await request({
375
- method: 'POST',
376
- url: `/v8/artifacts/events`,
377
- queryParams,
378
- ...requestConfig,
379
- headers: { 'Content-Type': 'applicationJson', ...headers, ...requestConfig.headers }
380
- });
381
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
382
- }
383
- /**
384
- * @description 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.
385
- * @summary Get status of Remote Caching for this principal
386
- * {@link /v8/artifacts/status}
387
- */
388
- async function status({ queryParams, config = {} }) {
389
- const { client: request = fetcher_1.default, ...requestConfig } = config;
390
- const data = await request({ method: 'GET', url: `/v8/artifacts/status`, queryParams, ...requestConfig });
391
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
392
- }
393
- /**
394
- * @description Uploads a cache artifact identified by the `hash` specified on the path. The cache artifact can then be downloaded with the provided `hash`.
395
- * @summary Upload a cache artifact
396
- * {@link /v8/artifacts/:hash}
397
- */
398
- async function uploadArtifact({ pathParams: { hash }, headers, queryParams, config = {} }) {
399
- const { client: request = fetcher_1.default, ...requestConfig } = config;
400
- if (!hash) {
401
- throw new Error(`Missing required path parameter: hash`);
402
- }
403
- const data = await request({
404
- method: 'PUT',
405
- url: `/v8/artifacts/${hash}`,
406
- queryParams,
407
- ...requestConfig,
408
- headers: { 'Content-Type': 'applicationOctetStream', ...headers, ...requestConfig.headers }
409
- });
410
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
411
- }
412
- /**
413
- * @description 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.
414
- * @summary Download a cache artifact
415
- * {@link /v8/artifacts/:hash}
416
- */
417
- async function downloadArtifact({ pathParams: { hash }, queryParams, headers, config = {} }) {
418
- const { client: request = fetcher_1.default, ...requestConfig } = config;
419
- if (!hash) {
420
- throw new Error(`Missing required path parameter: hash`);
421
- }
422
- const data = await request({
423
- method: 'GET',
424
- url: `/v8/artifacts/${hash}`,
425
- queryParams,
426
- ...requestConfig,
427
- headers: { ...headers, ...requestConfig.headers }
428
- });
429
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
430
- }
431
- /**
432
- * @description Query information about an array of artifacts.
433
- * @summary Query information about an artifact
434
- * {@link /v8/artifacts}
435
- */
436
- async function artifactQuery({ queryParams, config = {} }) {
437
- const { client: request = fetcher_1.default, ...requestConfig } = config;
438
- const data = await request({
439
- method: 'POST',
440
- url: `/v8/artifacts`,
441
- queryParams,
442
- ...requestConfig,
443
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
444
- });
445
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
446
- }
447
- /**
448
- * @description Creates a new check. This endpoint must be called with an OAuth2 or it will produce a 400 error.
449
- * @summary Creates a new Check
450
- * {@link /v1/deployments/:deploymentId/checks}
451
- */
452
- async function createCheck({ pathParams: { deploymentId }, queryParams, config = {} }) {
453
- const { client: request = fetcher_1.default, ...requestConfig } = config;
454
- if (!deploymentId) {
455
- throw new Error(`Missing required path parameter: deploymentId`);
456
- }
457
- const data = await request({
458
- method: 'POST',
459
- url: `/v1/deployments/${deploymentId}/checks`,
460
- queryParams,
461
- ...requestConfig,
462
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
463
- });
464
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
465
- }
466
- /**
467
- * @description List all of the checks created for a deployment.
468
- * @summary Retrieve a list of all checks
469
- * {@link /v1/deployments/:deploymentId/checks}
470
- */
471
- async function getAllChecks({ pathParams: { deploymentId }, queryParams, config = {} }) {
472
- const { client: request = fetcher_1.default, ...requestConfig } = config;
473
- if (!deploymentId) {
474
- throw new Error(`Missing required path parameter: deploymentId`);
475
- }
476
- const data = await request({ method: 'GET', url: `/v1/deployments/${deploymentId}/checks`, queryParams, ...requestConfig });
477
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
478
- }
479
- /**
480
- * @description Return a detailed response for a single check.
481
- * @summary Get a single check
482
- * {@link /v1/deployments/:deploymentId/checks/:checkId}
483
- */
484
- async function getCheck({ pathParams: { deploymentId, checkId }, queryParams, config = {} }) {
485
- const { client: request = fetcher_1.default, ...requestConfig } = config;
486
- if (!deploymentId) {
487
- throw new Error(`Missing required path parameter: deploymentId`);
488
- }
489
- if (!checkId) {
490
- throw new Error(`Missing required path parameter: checkId`);
491
- }
492
- const data = await request({ method: 'GET', url: `/v1/deployments/${deploymentId}/checks/${checkId}`, queryParams, ...requestConfig });
493
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
494
- }
495
- /**
496
- * @description Update an existing check. This endpoint must be called with an OAuth2 or it will produce a 400 error.
497
- * @summary Update a check
498
- * {@link /v1/deployments/:deploymentId/checks/:checkId}
499
- */
500
- async function updateCheck({ pathParams: { deploymentId, checkId }, queryParams, config = {} }) {
501
- const { client: request = fetcher_1.default, ...requestConfig } = config;
502
- if (!deploymentId) {
503
- throw new Error(`Missing required path parameter: deploymentId`);
504
- }
505
- if (!checkId) {
506
- throw new Error(`Missing required path parameter: checkId`);
507
- }
508
- const data = await request({
509
- method: 'PATCH',
510
- url: `/v1/deployments/${deploymentId}/checks/${checkId}`,
511
- queryParams,
512
- ...requestConfig,
513
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
514
- });
515
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
516
- }
517
- /**
518
- * @description Rerequest a selected check that has failed.
519
- * @summary Rerequest a check
520
- * {@link /v1/deployments/:deploymentId/checks/:checkId/rerequest}
521
- */
522
- async function rerequestCheck({ pathParams: { deploymentId, checkId }, queryParams, config = {} }) {
523
- const { client: request = fetcher_1.default, ...requestConfig } = config;
524
- if (!deploymentId) {
525
- throw new Error(`Missing required path parameter: deploymentId`);
526
- }
527
- if (!checkId) {
528
- throw new Error(`Missing required path parameter: checkId`);
529
- }
530
- const data = await request({
531
- method: 'POST',
532
- url: `/v1/deployments/${deploymentId}/checks/${checkId}/rerequest`,
533
- queryParams,
534
- ...requestConfig
535
- });
536
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
537
- }
538
- /**
539
- * {@link /data-cache/purge-all}
540
- */
541
- async function purgeAllDataCache({ queryParams, config = {} }) {
542
- const { client: request = fetcher_1.default, ...requestConfig } = config;
543
- const data = await request({ method: 'DELETE', url: `/data-cache/purge-all`, queryParams, ...requestConfig });
544
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
545
- }
546
- /**
547
- * {@link /data-cache/billing-settings}
548
- */
549
- async function updateDataCacheBillingSettings({ config = {} }) {
550
- const { client: request = fetcher_1.default, ...requestConfig } = config;
551
- const data = await request({
552
- method: 'PATCH',
553
- url: `/data-cache/billing-settings`,
554
- ...requestConfig,
555
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
556
- });
557
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
558
- }
559
- /**
560
- * @description Update the data cache feature on a project.
561
- * @summary Update the data cache feature
562
- * {@link /v1/data-cache/projects/:projectId}
563
- */
564
- async function updateProjectDataCache({ pathParams: { projectId }, queryParams, config = {} }) {
565
- const { client: request = fetcher_1.default, ...requestConfig } = config;
566
- if (!projectId) {
567
- throw new Error(`Missing required path parameter: projectId`);
568
- }
569
- const data = await request({
570
- method: 'PATCH',
571
- url: `/v1/data-cache/projects/${projectId}`,
572
- queryParams,
573
- ...requestConfig,
574
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
575
- });
576
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
577
- }
578
- /**
579
- * @description 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.
580
- * @summary Get deployment events
581
- * {@link /v3/deployments/:idOrUrl/events}
582
- */
583
- async function getDeploymentEvents({ pathParams: { idOrUrl }, queryParams, config = {} }) {
584
- const { client: request = fetcher_1.default, ...requestConfig } = config;
585
- if (!idOrUrl) {
586
- throw new Error(`Missing required path parameter: idOrUrl`);
587
- }
588
- const data = await request({ method: 'GET', url: `/v3/deployments/${idOrUrl}/events`, queryParams, ...requestConfig });
589
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
590
- }
591
- /**
592
- * @description Updates the deployment integration action for the specified integration installation
593
- * @summary Update deployment integration action
594
- * {@link /v1/deployments/:deploymentId/integrations/:integrationConfigurationId/resources/:resourceId/actions/:action}
595
- */
596
- async function updateIntegrationDeploymentAction({ pathParams: { deploymentId, integrationConfigurationId, resourceId, action }, config = {} }) {
597
- const { client: request = fetcher_1.default, ...requestConfig } = config;
598
- if (!deploymentId) {
599
- throw new Error(`Missing required path parameter: deploymentId`);
600
- }
601
- if (!integrationConfigurationId) {
602
- throw new Error(`Missing required path parameter: integrationConfigurationId`);
603
- }
604
- if (!resourceId) {
605
- throw new Error(`Missing required path parameter: resourceId`);
606
- }
607
- if (!action) {
608
- throw new Error(`Missing required path parameter: action`);
609
- }
610
- const data = await request({
611
- method: 'PATCH',
612
- url: `/v1/deployments/${deploymentId}/integrations/${integrationConfigurationId}/resources/${resourceId}/actions/${action}`,
613
- ...requestConfig,
614
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
615
- });
616
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
617
- }
618
- /**
619
- * @description 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 or team is an owner of the deployment.
620
- * @summary Get a deployment by ID or URL
621
- * {@link /v13/deployments/:idOrUrl}
622
- */
623
- async function getDeployment({ pathParams: { idOrUrl }, queryParams, config = {} }) {
624
- const { client: request = fetcher_1.default, ...requestConfig } = config;
625
- if (!idOrUrl) {
626
- throw new Error(`Missing required path parameter: idOrUrl`);
627
- }
628
- const data = await request({ method: 'GET', url: `/v13/deployments/${idOrUrl}`, queryParams, ...requestConfig });
629
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
630
- }
631
- /**
632
- * @description 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.
633
- * @summary Create a new deployment
634
- * {@link /v13/deployments}
635
- */
636
- async function createDeployment({ queryParams, config = {} }) {
637
- const { client: request = fetcher_1.default, ...requestConfig } = config;
638
- const data = await request({
639
- method: 'POST',
640
- url: `/v13/deployments`,
641
- queryParams,
642
- ...requestConfig,
643
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
644
- });
645
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
646
- }
647
- /**
648
- * @description This endpoint allows you to cancel a deployment which is currently building, by supplying its `id` in the URL.
649
- * @summary Cancel a deployment
650
- * {@link /v12/deployments/:id/cancel}
651
- */
652
- async function cancelDeployment({ pathParams: { id }, queryParams, config = {} }) {
653
- const { client: request = fetcher_1.default, ...requestConfig } = config;
654
- if (!id) {
655
- throw new Error(`Missing required path parameter: id`);
656
- }
657
- const data = await request({ method: 'PATCH', url: `/v12/deployments/${id}/cancel`, queryParams, ...requestConfig });
658
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
659
- }
660
- /**
661
- * @description Allows to purchase the specified domain.
662
- * @summary Purchase a domain
663
- * {@link /v5/domains/buy}
664
- */
665
- async function buyDomain({ queryParams, config = {} }) {
666
- const { client: request = fetcher_1.default, ...requestConfig } = config;
667
- const data = await request({
668
- method: 'POST',
669
- url: `/v5/domains/buy`,
670
- queryParams,
671
- ...requestConfig,
672
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
673
- });
674
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
675
- }
676
- /**
677
- * @description Check the price to purchase a domain and how long a single purchase period is.
678
- * @summary Check the price for a domain
679
- * {@link /v4/domains/price}
680
- */
681
- async function checkDomainPrice({ queryParams, config = {} }) {
682
- const { client: request = fetcher_1.default, ...requestConfig } = config;
683
- const data = await request({ method: 'GET', url: `/v4/domains/price`, queryParams, ...requestConfig });
684
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
685
- }
686
- /**
687
- * @description Check if a domain name is available for purchase.
688
- * @summary Check a Domain Availability
689
- * {@link /v4/domains/status}
690
- */
691
- async function checkDomainStatus({ queryParams, config = {} }) {
692
- const { client: request = fetcher_1.default, ...requestConfig } = config;
693
- const data = await request({ method: 'GET', url: `/v4/domains/status`, queryParams, ...requestConfig });
694
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
695
- }
696
- /**
697
- * @description 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.
698
- * @summary List existing DNS records
699
- * {@link /v4/domains/:domain/records}
700
- */
701
- async function getRecords({ pathParams: { domain }, queryParams, config = {} }) {
702
- const { client: request = fetcher_1.default, ...requestConfig } = config;
703
- if (!domain) {
704
- throw new Error(`Missing required path parameter: domain`);
705
- }
706
- const data = await request({ method: 'GET', url: `/v4/domains/${domain}/records`, queryParams, ...requestConfig });
707
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
708
- }
709
- /**
710
- * @description Creates a DNS record for a domain.
711
- * @summary Create a DNS record
712
- * {@link /v2/domains/:domain/records}
713
- */
714
- async function createRecord({ pathParams: { domain }, queryParams, config = {} }) {
715
- const { client: request = fetcher_1.default, ...requestConfig } = config;
716
- if (!domain) {
717
- throw new Error(`Missing required path parameter: domain`);
718
- }
719
- const data = await request({
720
- method: 'POST',
721
- url: `/v2/domains/${domain}/records`,
722
- queryParams,
723
- ...requestConfig,
724
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
725
- });
726
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
727
- }
728
- /**
729
- * @description Updates an existing DNS record for a domain name.
730
- * @summary Update an existing DNS record
731
- * {@link /v1/domains/records/:recordId}
732
- */
733
- async function updateRecord({ pathParams: { recordId }, queryParams, config = {} }) {
734
- const { client: request = fetcher_1.default, ...requestConfig } = config;
735
- if (!recordId) {
736
- throw new Error(`Missing required path parameter: recordId`);
737
- }
738
- const data = await request({
739
- method: 'PATCH',
740
- url: `/v1/domains/records/${recordId}`,
741
- queryParams,
742
- ...requestConfig,
743
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
744
- });
745
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
746
- }
747
- /**
748
- * @description Removes an existing DNS record from a domain name.
749
- * @summary Delete a DNS record
750
- * {@link /v2/domains/:domain/records/:recordId}
751
- */
752
- async function removeRecord({ pathParams: { domain, recordId }, queryParams, config = {} }) {
753
- const { client: request = fetcher_1.default, ...requestConfig } = config;
754
- if (!domain) {
755
- throw new Error(`Missing required path parameter: domain`);
756
- }
757
- if (!recordId) {
758
- throw new Error(`Missing required path parameter: recordId`);
759
- }
760
- const data = await request({ method: 'DELETE', url: `/v2/domains/${domain}/records/${recordId}`, queryParams, ...requestConfig });
761
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
762
- }
763
- /**
764
- * @description Fetch domain transfer availability or transfer status if a transfer is in progress.
765
- * @summary Get domain transfer info.
766
- * {@link /v1/domains/:domain/registry}
767
- */
768
- async function getDomainTransfer({ pathParams: { domain }, queryParams, config = {} }) {
769
- const { client: request = fetcher_1.default, ...requestConfig } = config;
770
- if (!domain) {
771
- throw new Error(`Missing required path parameter: domain`);
772
- }
773
- const data = await request({ method: 'GET', url: `/v1/domains/${domain}/registry`, queryParams, ...requestConfig });
774
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
775
- }
776
- /**
777
- * @description Get a Domain's configuration.
778
- * @summary Get a Domain's configuration
779
- * {@link /v6/domains/:domain/config}
780
- */
781
- async function getDomainConfig({ pathParams: { domain }, queryParams, config = {} }) {
782
- const { client: request = fetcher_1.default, ...requestConfig } = config;
783
- if (!domain) {
784
- throw new Error(`Missing required path parameter: domain`);
785
- }
786
- const data = await request({ method: 'GET', url: `/v6/domains/${domain}/config`, queryParams, ...requestConfig });
787
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
788
- }
789
- /**
790
- * @description Get information for a single domain in an account or team.
791
- * @summary Get Information for a Single Domain
792
- * {@link /v5/domains/:domain}
793
- */
794
- async function getDomain({ pathParams: { domain }, queryParams, config = {} }) {
795
- const { client: request = fetcher_1.default, ...requestConfig } = config;
796
- if (!domain) {
797
- throw new Error(`Missing required path parameter: domain`);
798
- }
799
- const data = await request({ method: 'GET', url: `/v5/domains/${domain}`, queryParams, ...requestConfig });
800
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
801
- }
802
- /**
803
- * @description Retrieves a list of domains registered for the authenticated user or team. By default it returns the last 20 domains if no limit is provided.
804
- * @summary List all the domains
805
- * {@link /v5/domains}
806
- */
807
- async function getDomains({ queryParams, config = {} }) {
808
- const { client: request = fetcher_1.default, ...requestConfig } = config;
809
- const data = await request({ method: 'GET', url: `/v5/domains`, queryParams, ...requestConfig });
810
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
811
- }
812
- /**
813
- * @description This endpoint is used for adding a new apex domain name with Vercel for the authenticating user. Can also be used for initiating a domain transfer request from an external Registrar to Vercel.
814
- * @summary Register or transfer-in a new Domain
815
- * {@link /v7/domains}
816
- */
817
- async function createOrTransferDomain({ queryParams, config = {} }) {
818
- const { client: request = fetcher_1.default, ...requestConfig } = config;
819
- const data = await request({
820
- method: 'POST',
821
- url: `/v7/domains`,
822
- queryParams,
823
- ...requestConfig,
824
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
825
- });
826
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
827
- }
828
- /**
829
- * @description Update or move apex domain.
830
- * @summary Update or move apex domain
831
- * {@link /v3/domains/:domain}
832
- */
833
- async function patchDomain({ pathParams: { domain }, queryParams, config = {} }) {
834
- const { client: request = fetcher_1.default, ...requestConfig } = config;
835
- if (!domain) {
836
- throw new Error(`Missing required path parameter: domain`);
837
- }
838
- const data = await request({
839
- method: 'PATCH',
840
- url: `/v3/domains/${domain}`,
841
- queryParams,
842
- ...requestConfig,
843
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
844
- });
845
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
846
- }
847
- /**
848
- * @description Delete a previously registered domain name from Vercel. Deleting a domain will automatically remove any associated aliases.
849
- * @summary Remove a domain by name
850
- * {@link /v6/domains/:domain}
851
- */
852
- async function deleteDomain({ pathParams: { domain }, queryParams, config = {} }) {
853
- const { client: request = fetcher_1.default, ...requestConfig } = config;
854
- if (!domain) {
855
- throw new Error(`Missing required path parameter: domain`);
856
- }
857
- const data = await request({ method: 'DELETE', url: `/v6/domains/${domain}`, queryParams, ...requestConfig });
858
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
859
- }
860
- /**
861
- * @description Returns all Edge Configs.
862
- * @summary Get Edge Configs
863
- * {@link /v1/edge-config}
864
- */
865
- async function getEdgeConfigs({ queryParams, config = {} }) {
866
- const { client: request = fetcher_1.default, ...requestConfig } = config;
867
- const data = await request({ method: 'GET', url: `/v1/edge-config`, queryParams, ...requestConfig });
868
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
869
- }
870
- /**
871
- * @description Creates an Edge Config.
872
- * @summary Create an Edge Config
873
- * {@link /v1/edge-config}
874
- */
875
- async function createEdgeConfig({ queryParams, config = {} }) {
876
- const { client: request = fetcher_1.default, ...requestConfig } = config;
877
- const data = await request({
878
- method: 'POST',
879
- url: `/v1/edge-config`,
880
- queryParams,
881
- ...requestConfig,
882
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
883
- });
884
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
885
- }
886
- /**
887
- * @description Returns an Edge Config.
888
- * @summary Get an Edge Config
889
- * {@link /v1/edge-config/:edgeConfigId}
890
- */
891
- async function getEdgeConfig({ pathParams: { edgeConfigId }, queryParams, config = {} }) {
892
- const { client: request = fetcher_1.default, ...requestConfig } = config;
893
- if (!edgeConfigId) {
894
- throw new Error(`Missing required path parameter: edgeConfigId`);
895
- }
896
- const data = await request({ method: 'GET', url: `/v1/edge-config/${edgeConfigId}`, queryParams, ...requestConfig });
897
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
898
- }
899
- /**
900
- * @description Updates an Edge Config.
901
- * @summary Update an Edge Config
902
- * {@link /v1/edge-config/:edgeConfigId}
903
- */
904
- async function updateEdgeConfig({ pathParams: { edgeConfigId }, queryParams, config = {} }) {
905
- const { client: request = fetcher_1.default, ...requestConfig } = config;
906
- if (!edgeConfigId) {
907
- throw new Error(`Missing required path parameter: edgeConfigId`);
908
- }
909
- const data = await request({
910
- method: 'PUT',
911
- url: `/v1/edge-config/${edgeConfigId}`,
912
- queryParams,
913
- ...requestConfig,
914
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
915
- });
916
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
917
- }
918
- /**
919
- * @description Delete an Edge Config by id.
920
- * @summary Delete an Edge Config
921
- * {@link /v1/edge-config/:edgeConfigId}
922
- */
923
- async function deleteEdgeConfig({ pathParams: { edgeConfigId }, queryParams, config = {} }) {
924
- const { client: request = fetcher_1.default, ...requestConfig } = config;
925
- if (!edgeConfigId) {
926
- throw new Error(`Missing required path parameter: edgeConfigId`);
927
- }
928
- const data = await request({ method: 'DELETE', url: `/v1/edge-config/${edgeConfigId}`, queryParams, ...requestConfig });
929
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
930
- }
931
- /**
932
- * @description Returns all items of an Edge Config.
933
- * @summary Get Edge Config items
934
- * {@link /v1/edge-config/:edgeConfigId/items}
935
- */
936
- async function getEdgeConfigItems({ pathParams: { edgeConfigId }, queryParams, config = {} }) {
937
- const { client: request = fetcher_1.default, ...requestConfig } = config;
938
- if (!edgeConfigId) {
939
- throw new Error(`Missing required path parameter: edgeConfigId`);
940
- }
941
- const data = await request({ method: 'GET', url: `/v1/edge-config/${edgeConfigId}/items`, queryParams, ...requestConfig });
942
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
943
- }
944
- /**
945
- * @description Update multiple Edge Config Items in batch.
946
- * @summary Update Edge Config items in batch
947
- * {@link /v1/edge-config/:edgeConfigId/items}
948
- */
949
- async function patchEdgeConfigItems({ pathParams: { edgeConfigId }, queryParams, config = {} }) {
950
- const { client: request = fetcher_1.default, ...requestConfig } = config;
951
- if (!edgeConfigId) {
952
- throw new Error(`Missing required path parameter: edgeConfigId`);
953
- }
954
- const data = await request({
955
- method: 'PATCH',
956
- url: `/v1/edge-config/${edgeConfigId}/items`,
957
- queryParams,
958
- ...requestConfig,
959
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
960
- });
961
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
962
- }
963
- /**
964
- * @description Returns the schema of an Edge Config.
965
- * @summary Get Edge Config schema
966
- * {@link /v1/edge-config/:edgeConfigId/schema}
967
- */
968
- async function getEdgeConfigSchema({ pathParams: { edgeConfigId }, queryParams, config = {} }) {
969
- const { client: request = fetcher_1.default, ...requestConfig } = config;
970
- if (!edgeConfigId) {
971
- throw new Error(`Missing required path parameter: edgeConfigId`);
972
- }
973
- const data = await request({ method: 'GET', url: `/v1/edge-config/${edgeConfigId}/schema`, queryParams, ...requestConfig });
974
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
975
- }
976
- /**
977
- * @description Update an Edge Config's schema.
978
- * @summary Update Edge Config schema
979
- * {@link /v1/edge-config/:edgeConfigId/schema}
980
- */
981
- async function patchEdgeConfigSchema({ pathParams: { edgeConfigId }, queryParams, config = {} }) {
982
- const { client: request = fetcher_1.default, ...requestConfig } = config;
983
- if (!edgeConfigId) {
984
- throw new Error(`Missing required path parameter: edgeConfigId`);
985
- }
986
- const data = await request({
987
- method: 'POST',
988
- url: `/v1/edge-config/${edgeConfigId}/schema`,
989
- queryParams,
990
- ...requestConfig,
991
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
992
- });
993
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
994
- }
995
- /**
996
- * @description Deletes the schema of existing Edge Config.
997
- * @summary Delete an Edge Config's schema
998
- * {@link /v1/edge-config/:edgeConfigId/schema}
999
- */
1000
- async function deleteEdgeConfigSchema({ pathParams: { edgeConfigId }, queryParams, config = {} }) {
1001
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1002
- if (!edgeConfigId) {
1003
- throw new Error(`Missing required path parameter: edgeConfigId`);
1004
- }
1005
- const data = await request({ method: 'DELETE', url: `/v1/edge-config/${edgeConfigId}/schema`, queryParams, ...requestConfig });
1006
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1007
- }
1008
- /**
1009
- * @description Returns a specific Edge Config Item.
1010
- * @summary Get an Edge Config item
1011
- * {@link /v1/edge-config/:edgeConfigId/item/:edgeConfigItemKey}
1012
- */
1013
- async function getEdgeConfigItem({ pathParams: { edgeConfigId, edgeConfigItemKey }, queryParams, config = {} }) {
1014
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1015
- if (!edgeConfigId) {
1016
- throw new Error(`Missing required path parameter: edgeConfigId`);
1017
- }
1018
- if (!edgeConfigItemKey) {
1019
- throw new Error(`Missing required path parameter: edgeConfigItemKey`);
1020
- }
1021
- const data = await request({ method: 'GET', url: `/v1/edge-config/${edgeConfigId}/item/${edgeConfigItemKey}`, queryParams, ...requestConfig });
1022
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1023
- }
1024
- /**
1025
- * @description Returns all tokens of an Edge Config.
1026
- * @summary Get all tokens of an Edge Config
1027
- * {@link /v1/edge-config/:edgeConfigId/tokens}
1028
- */
1029
- async function getEdgeConfigTokens({ pathParams: { edgeConfigId }, queryParams, config = {} }) {
1030
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1031
- if (!edgeConfigId) {
1032
- throw new Error(`Missing required path parameter: edgeConfigId`);
1033
- }
1034
- const data = await request({ method: 'GET', url: `/v1/edge-config/${edgeConfigId}/tokens`, queryParams, ...requestConfig });
1035
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1036
- }
1037
- /**
1038
- * @description Deletes one or more tokens of an existing Edge Config.
1039
- * @summary Delete one or more Edge Config tokens
1040
- * {@link /v1/edge-config/:edgeConfigId/tokens}
1041
- */
1042
- async function deleteEdgeConfigTokens({ pathParams: { edgeConfigId }, queryParams, config = {} }) {
1043
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1044
- if (!edgeConfigId) {
1045
- throw new Error(`Missing required path parameter: edgeConfigId`);
1046
- }
1047
- const data = await request({
1048
- method: 'DELETE',
1049
- url: `/v1/edge-config/${edgeConfigId}/tokens`,
1050
- queryParams,
1051
- ...requestConfig,
1052
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
1053
- });
1054
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1055
- }
1056
- /**
1057
- * @description Return meta data about an Edge Config token.
1058
- * @summary Get Edge Config token meta data
1059
- * {@link /v1/edge-config/:edgeConfigId/token/:token}
1060
- */
1061
- async function getEdgeConfigToken({ pathParams: { edgeConfigId, token }, queryParams, config = {} }) {
1062
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1063
- if (!edgeConfigId) {
1064
- throw new Error(`Missing required path parameter: edgeConfigId`);
1065
- }
1066
- if (!token) {
1067
- throw new Error(`Missing required path parameter: token`);
1068
- }
1069
- const data = await request({ method: 'GET', url: `/v1/edge-config/${edgeConfigId}/token/${token}`, queryParams, ...requestConfig });
1070
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1071
- }
1072
- /**
1073
- * @description Adds a token to an existing Edge Config.
1074
- * @summary Create an Edge Config token
1075
- * {@link /v1/edge-config/:edgeConfigId/token}
1076
- */
1077
- async function createEdgeConfigToken({ pathParams: { edgeConfigId }, queryParams, config = {} }) {
1078
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1079
- if (!edgeConfigId) {
1080
- throw new Error(`Missing required path parameter: edgeConfigId`);
1081
- }
1082
- const data = await request({
1083
- method: 'POST',
1084
- url: `/v1/edge-config/${edgeConfigId}/token`,
1085
- queryParams,
1086
- ...requestConfig,
1087
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
1088
- });
1089
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1090
- }
1091
- /**
1092
- * @description Retrieves a specific version of an Edge Config from backup storage.
1093
- * @summary Get Edge Config backup
1094
- * {@link /v1/edge-config/:edgeConfigId/backups/:edgeConfigBackupVersionId}
1095
- */
1096
- async function getEdgeConfigBackup({ pathParams: { edgeConfigId, edgeConfigBackupVersionId }, queryParams, config = {} }) {
1097
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1098
- if (!edgeConfigId) {
1099
- throw new Error(`Missing required path parameter: edgeConfigId`);
1100
- }
1101
- if (!edgeConfigBackupVersionId) {
1102
- throw new Error(`Missing required path parameter: edgeConfigBackupVersionId`);
1103
- }
1104
- const data = await request({
1105
- method: 'GET',
1106
- url: `/v1/edge-config/${edgeConfigId}/backups/${edgeConfigBackupVersionId}`,
1107
- queryParams,
1108
- ...requestConfig
1109
- });
1110
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1111
- }
1112
- /**
1113
- * @description Returns backups of an Edge Config.
1114
- * @summary Get Edge Config backups
1115
- * {@link /v1/edge-config/:edgeConfigId/backups}
1116
- */
1117
- async function getEdgeConfigBackups({ pathParams: { edgeConfigId }, queryParams, config = {} }) {
1118
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1119
- if (!edgeConfigId) {
1120
- throw new Error(`Missing required path parameter: edgeConfigId`);
1121
- }
1122
- const data = await request({ method: 'GET', url: `/v1/edge-config/${edgeConfigId}/backups`, queryParams, ...requestConfig });
1123
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1124
- }
1125
- /**
1126
- * @description 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.
1127
- * @summary List User Events
1128
- * {@link /v3/events}
1129
- */
1130
- async function listUserEvents({ queryParams, config = {} }) {
1131
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1132
- const data = await request({ method: 'GET', url: `/v3/events`, queryParams, ...requestConfig });
1133
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1134
- }
1135
- /**
1136
- * @description Fetches the best account or user’s contact info
1137
- * @summary Get Account Information
1138
- * {@link /v1/installations/:integrationConfigurationId/account}
1139
- */
1140
- async function getAccountInfo({ pathParams: { integrationConfigurationId }, config = {} }) {
1141
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1142
- if (!integrationConfigurationId) {
1143
- throw new Error(`Missing required path parameter: integrationConfigurationId`);
1144
- }
1145
- const data = await request({ method: 'GET', url: `/v1/installations/${integrationConfigurationId}/account`, ...requestConfig });
1146
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1147
- }
1148
- /**
1149
- * @description Returns the member role and other information for a given member ID ("user_id" claim in the SSO OIDC token).
1150
- * @summary Get Member Information
1151
- * {@link /v1/installations/:integrationConfigurationId/member/:memberId}
1152
- */
1153
- async function getMember({ pathParams: { integrationConfigurationId, memberId }, config = {} }) {
1154
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1155
- if (!integrationConfigurationId) {
1156
- throw new Error(`Missing required path parameter: integrationConfigurationId`);
1157
- }
1158
- if (!memberId) {
1159
- throw new Error(`Missing required path parameter: memberId`);
1160
- }
1161
- const data = await request({ method: 'GET', url: `/v1/installations/${integrationConfigurationId}/member/${memberId}`, ...requestConfig });
1162
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1163
- }
1164
- /**
1165
- * @description Partner notifies Vercel of any changes made to an Installation or a Resource. Vercel is expected to use `list-resources` and other read APIs to get the new state.<br/> <br/> `resource.updated` event should be dispatched when any state of a resource linked to Vercel is modified by the partner.<br/> `installation.updated` event should be dispatched when an installation's billing plan is changed via the provider instead of Vercel.<br/> <br/> Resource update use cases: <br/> <br/> - The user renames a database in the partner’s application. The partner should dispatch a `resource.updated` event to notify Vercel to update the resource in Vercel’s datastores.<br/> - A resource has been suspended due to a lack of use. The partner should dispatch a `resource.updated` event to notify Vercel to update the resource's status in Vercel's datastores.<br/>
1166
- * @summary Create Event
1167
- * {@link /v1/installations/:integrationConfigurationId/events}
1168
- */
1169
- async function createEvent({ pathParams: { integrationConfigurationId }, config = {} }) {
1170
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1171
- if (!integrationConfigurationId) {
1172
- throw new Error(`Missing required path parameter: integrationConfigurationId`);
1173
- }
1174
- const data = await request({
1175
- method: 'POST',
1176
- url: `/v1/installations/${integrationConfigurationId}/events`,
1177
- ...requestConfig,
1178
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
1179
- });
1180
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1181
- }
1182
- /**
1183
- * @description Get all resources for a given installation ID.
1184
- * @summary Get Integration Resources
1185
- * {@link /v1/installations/:integrationConfigurationId/resources}
1186
- */
1187
- async function getIntegrationResources({ pathParams: { integrationConfigurationId }, config = {} }) {
1188
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1189
- if (!integrationConfigurationId) {
1190
- throw new Error(`Missing required path parameter: integrationConfigurationId`);
1191
- }
1192
- const data = await request({ method: 'GET', url: `/v1/installations/${integrationConfigurationId}/resources`, ...requestConfig });
1193
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1194
- }
1195
- /**
1196
- * @description Get a resource by its partner ID.
1197
- * @summary Get Integration Resource
1198
- * {@link /v1/installations/:integrationConfigurationId/resources/:resourceId}
1199
- */
1200
- async function getIntegrationResource({ pathParams: { integrationConfigurationId, resourceId }, config = {} }) {
1201
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1202
- if (!integrationConfigurationId) {
1203
- throw new Error(`Missing required path parameter: integrationConfigurationId`);
1204
- }
1205
- if (!resourceId) {
1206
- throw new Error(`Missing required path parameter: resourceId`);
1207
- }
1208
- const data = await request({
1209
- method: 'GET',
1210
- url: `/v1/installations/${integrationConfigurationId}/resources/${resourceId}`,
1211
- ...requestConfig
1212
- });
1213
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1214
- }
1215
- /**
1216
- * @description Delete a resource owned by the selected installation ID.
1217
- * @summary Delete Integration Resource
1218
- * {@link /v1/installations/:integrationConfigurationId/resources/:resourceId}
1219
- */
1220
- async function deleteIntegrationResource({ pathParams: { integrationConfigurationId, resourceId }, config = {} }) {
1221
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1222
- if (!integrationConfigurationId) {
1223
- throw new Error(`Missing required path parameter: integrationConfigurationId`);
1224
- }
1225
- if (!resourceId) {
1226
- throw new Error(`Missing required path parameter: resourceId`);
1227
- }
1228
- const data = await request({
1229
- method: 'DELETE',
1230
- url: `/v1/installations/${integrationConfigurationId}/resources/${resourceId}`,
1231
- ...requestConfig
1232
- });
1233
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1234
- }
1235
- /**
1236
- * @description This endpoint imports (upserts) a resource to Vercel's installation. This may be needed if resources can be independently created on the partner's side and need to be synchronized to Vercel.
1237
- * @summary Import Resource
1238
- * {@link /v1/installations/:integrationConfigurationId/resources/:resourceId}
1239
- */
1240
- async function importResource({ pathParams: { integrationConfigurationId, resourceId }, config = {} }) {
1241
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1242
- if (!integrationConfigurationId) {
1243
- throw new Error(`Missing required path parameter: integrationConfigurationId`);
1244
- }
1245
- if (!resourceId) {
1246
- throw new Error(`Missing required path parameter: resourceId`);
1247
- }
1248
- const data = await request({
1249
- method: 'PUT',
1250
- url: `/v1/installations/${integrationConfigurationId}/resources/${resourceId}`,
1251
- ...requestConfig,
1252
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
1253
- });
1254
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1255
- }
1256
- /**
1257
- * @description Sends the billing and usage data. The partner should do this at least once a day and ideally once per hour. <br/> Use the `credentials.access_token` we provided in the [Upsert Installation](#upsert-installation) body to authorize this request.
1258
- * @summary Submit Billing Data
1259
- * {@link /v1/installations/:integrationConfigurationId/billing}
1260
- */
1261
- async function submitBillingData({ pathParams: { integrationConfigurationId }, config = {} }) {
1262
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1263
- if (!integrationConfigurationId) {
1264
- throw new Error(`Missing required path parameter: integrationConfigurationId`);
1265
- }
1266
- const data = await request({
1267
- method: 'POST',
1268
- url: `/v1/installations/${integrationConfigurationId}/billing`,
1269
- ...requestConfig,
1270
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
1271
- });
1272
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1273
- }
1274
- /**
1275
- * @description This endpoint allows the partner to submit an invoice to Vercel. The invoice is created in Vercel's billing system and sent to the customer. Depending on the type of billing plan, the invoice can be sent at a time of signup, at the start of the billing period, or at the end of the billing period.<br/> <br/> Use the `credentials.access_token` we provided in the [Upsert Installation](#upsert-installation) body to authorize this request. <br/> There are several limitations to the invoice submission:<br/> <br/> 1. A resource can only be billed once per the billing period and the billing plan.<br/> 2. The billing plan used to bill the resource must have been active for this resource during the billing period.<br/> 3. The billing plan used must be a subscription plan.<br/> 4. The interim usage data must be sent hourly for all types of subscriptions. See [Send subscription billing and usage data](#send-subscription-billing-and-usage-data) API on how to send interim billing and usage data.<br/>
1276
- * @summary Submit Invoice
1277
- * {@link /v1/installations/:integrationConfigurationId/billing/invoices}
1278
- */
1279
- async function submitInvoice({ pathParams: { integrationConfigurationId }, config = {} }) {
1280
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1281
- if (!integrationConfigurationId) {
1282
- throw new Error(`Missing required path parameter: integrationConfigurationId`);
1283
- }
1284
- const data = await request({
1285
- method: 'POST',
1286
- url: `/v1/installations/${integrationConfigurationId}/billing/invoices`,
1287
- ...requestConfig,
1288
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
1289
- });
1290
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1291
- }
1292
- /**
1293
- * @description Get Invoice details and status for a given invoice ID.<br/> <br/> See Billing Events with Webhooks documentation on how to receive invoice events. This endpoint is used to retrieve the invoice details.
1294
- * @summary Get Invoice
1295
- * {@link /v1/installations/:integrationConfigurationId/billing/invoices/:invoiceId}
1296
- */
1297
- async function getInvoice({ pathParams: { integrationConfigurationId, invoiceId }, config = {} }) {
1298
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1299
- if (!integrationConfigurationId) {
1300
- throw new Error(`Missing required path parameter: integrationConfigurationId`);
1301
- }
1302
- if (!invoiceId) {
1303
- throw new Error(`Missing required path parameter: invoiceId`);
1304
- }
1305
- const data = await request({
1306
- method: 'GET',
1307
- url: `/v1/installations/${integrationConfigurationId}/billing/invoices/${invoiceId}`,
1308
- ...requestConfig
1309
- });
1310
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1311
- }
1312
- /**
1313
- * @description This endpoint allows the partner to request a refund for an invoice to Vercel. The invoice is created using the [Submit Invoice API](#submit-invoice-api).
1314
- * @summary Invoice Actions
1315
- * {@link /v1/installations/:integrationConfigurationId/billing/invoices/:invoiceId/actions}
1316
- */
1317
- async function updateInvoice({ pathParams: { integrationConfigurationId, invoiceId }, config = {} }) {
1318
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1319
- if (!integrationConfigurationId) {
1320
- throw new Error(`Missing required path parameter: integrationConfigurationId`);
1321
- }
1322
- if (!invoiceId) {
1323
- throw new Error(`Missing required path parameter: invoiceId`);
1324
- }
1325
- const data = await request({
1326
- method: 'POST',
1327
- url: `/v1/installations/${integrationConfigurationId}/billing/invoices/${invoiceId}/actions`,
1328
- ...requestConfig,
1329
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
1330
- });
1331
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1332
- }
1333
- /**
1334
- * @description Sends the prepayment balances. The partner should do this at least once a day and ideally once per hour. <br/> Use the `credentials.access_token` we provided in the [Upsert Installation](#upsert-installation) body to authorize this request.
1335
- * @summary Submit Prepayment Balances
1336
- * {@link /v1/installations/:integrationConfigurationId/billing/balance}
1337
- */
1338
- async function submitPrepaymentBalances({ pathParams: { integrationConfigurationId }, config = {} }) {
1339
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1340
- if (!integrationConfigurationId) {
1341
- throw new Error(`Missing required path parameter: integrationConfigurationId`);
1342
- }
1343
- const data = await request({
1344
- method: 'POST',
1345
- url: `/v1/installations/${integrationConfigurationId}/billing/balance`,
1346
- ...requestConfig,
1347
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
1348
- });
1349
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1350
- }
1351
- /**
1352
- * @description This endpoint is deprecated and replaced with the endpoint [Update Resource Secrets](#update-resource-secrets). <br/> This endpoint updates the secrets of a resource. If a resource has projects connected, the connected secrets are updated with the new secrets. The old secrets may still be used by existing connected projects because they are not automatically redeployed. Redeployment is a manual action and must be completed by the user. All new project connections will use the new secrets.<br/> <br/> Use cases for this endpoint:<br/> <br/> - Resetting the credentials of a database in the partner. If the user requests the credentials to be updated in the partner’s application, the partner post the new set of secrets to Vercel, the user should redeploy their application and the expire the old credentials.<br/>
1353
- * @summary Update Resource Secrets (Deprecated)
1354
- * {@link /v1/installations/:integrationConfigurationId/products/:integrationProductIdOrSlug/resources/:resourceId/secrets}
1355
- */
1356
- async function updateResourceSecrets({ pathParams: { integrationConfigurationId, integrationProductIdOrSlug, resourceId }, config = {} }) {
1357
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1358
- if (!integrationConfigurationId) {
1359
- throw new Error(`Missing required path parameter: integrationConfigurationId`);
1360
- }
1361
- if (!integrationProductIdOrSlug) {
1362
- throw new Error(`Missing required path parameter: integrationProductIdOrSlug`);
1363
- }
1364
- if (!resourceId) {
1365
- throw new Error(`Missing required path parameter: resourceId`);
1366
- }
1367
- const data = await request({
1368
- method: 'PUT',
1369
- url: `/v1/installations/${integrationConfigurationId}/products/${integrationProductIdOrSlug}/resources/${resourceId}/secrets`,
1370
- ...requestConfig,
1371
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
1372
- });
1373
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1374
- }
1375
- /**
1376
- * @description This endpoint updates the secrets of a resource. If a resource has projects connected, the connected secrets are updated with the new secrets. The old secrets may still be used by existing connected projects because they are not automatically redeployed. Redeployment is a manual action and must be completed by the user. All new project connections will use the new secrets.<br/> <br/> Use cases for this endpoint:<br/> <br/> - Resetting the credentials of a database in the partner. If the user requests the credentials to be updated in the partner’s application, the partner post the new set of secrets to Vercel, the user should redeploy their application and the expire the old credentials.<br/>
1377
- * @summary Update Resource Secrets
1378
- * {@link /v1/installations/:integrationConfigurationId/resources/:resourceId/secrets}
1379
- */
1380
- async function updateResourceSecretsById({ pathParams: { integrationConfigurationId, resourceId }, config = {} }) {
1381
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1382
- if (!integrationConfigurationId) {
1383
- throw new Error(`Missing required path parameter: integrationConfigurationId`);
1384
- }
1385
- if (!resourceId) {
1386
- throw new Error(`Missing required path parameter: resourceId`);
1387
- }
1388
- const data = await request({
1389
- method: 'PUT',
1390
- url: `/v1/installations/${integrationConfigurationId}/resources/${resourceId}/secrets`,
1391
- ...requestConfig,
1392
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
1393
- });
1394
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1395
- }
1396
- /**
1397
- * @description 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.
1398
- * @summary Get configurations for the authenticated user or team
1399
- * {@link /v1/integrations/configurations}
1400
- */
1401
- async function getConfigurations({ queryParams, config = {} }) {
1402
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1403
- const data = await request({ method: 'GET', url: `/v1/integrations/configurations`, queryParams, ...requestConfig });
1404
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1405
- }
1406
- /**
1407
- * @description 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.
1408
- * @summary Retrieve an integration configuration
1409
- * {@link /v1/integrations/configuration/:id}
1410
- */
1411
- async function getConfiguration({ pathParams: { id }, queryParams, config = {} }) {
1412
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1413
- if (!id) {
1414
- throw new Error(`Missing required path parameter: id`);
1415
- }
1416
- const data = await request({ method: 'GET', url: `/v1/integrations/configuration/${id}`, queryParams, ...requestConfig });
1417
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1418
- }
1419
- /**
1420
- * @description 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.
1421
- * @summary Delete an integration configuration
1422
- * {@link /v1/integrations/configuration/:id}
1423
- */
1424
- async function deleteConfiguration({ pathParams: { id }, queryParams, config = {} }) {
1425
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1426
- if (!id) {
1427
- throw new Error(`Missing required path parameter: id`);
1428
- }
1429
- const data = await request({ method: 'DELETE', url: `/v1/integrations/configuration/${id}`, queryParams, ...requestConfig });
1430
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1431
- }
1432
- /**
1433
- * @description During the autorization process, Vercel sends the user to the provider [redirectLoginUrl](https://vercel.com/docs/integrations/create-integration/submit-integration#redirect-login-url), that includes the OAuth authorization `code` parameter. The provider then calls the SSO Token Exchange endpoint with the sent code and receives the OIDC token. They log the user in based on this token and redirects the user back to the Vercel account using deep-link parameters included the redirectLoginUrl. Providers should not persist the returned `id_token` in a database since the token will expire. See [**Authentication with SSO**](https://vercel.com/docs/integrations/create-integration/marketplace-api#authentication-with-sso) for more details.
1434
- * @summary SSO Token Exchange
1435
- * {@link /v1/integrations/sso/token}
1436
- */
1437
- async function exchangeSsoToken({ config = {} }) {
1438
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1439
- const data = await request({
1440
- method: 'POST',
1441
- url: `/v1/integrations/sso/token`,
1442
- ...requestConfig,
1443
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
1444
- });
1445
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1446
- }
1447
- /**
1448
- * @description Retrieves a list of all Integration log drains that are defined for the authenticated user or team. When using an OAuth2 token, the list is limited to log drains created by the authenticated integration.
1449
- * @summary Retrieves a list of Integration log drains
1450
- * {@link /v2/integrations/log-drains}
1451
- */
1452
- async function getIntegrationLogDrains({ queryParams, config = {} }) {
1453
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1454
- const data = await request({ method: 'GET', url: `/v2/integrations/log-drains`, queryParams, ...requestConfig });
1455
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1456
- }
1457
- /**
1458
- * @description 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.
1459
- * @summary Creates a new Integration Log Drain
1460
- * {@link /v2/integrations/log-drains}
1461
- */
1462
- async function createLogDrain({ queryParams, config = {} }) {
1463
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1464
- const data = await request({
1465
- method: 'POST',
1466
- url: `/v2/integrations/log-drains`,
1467
- queryParams,
1468
- ...requestConfig,
1469
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
1470
- });
1471
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1472
- }
1473
- /**
1474
- * @description 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.
1475
- * @summary Deletes the Integration log drain with the provided `id`
1476
- * {@link /v1/integrations/log-drains/:id}
1477
- */
1478
- async function deleteIntegrationLogDrain({ pathParams: { id }, queryParams, config = {} }) {
1479
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1480
- if (!id) {
1481
- throw new Error(`Missing required path parameter: id`);
1482
- }
1483
- const data = await request({ method: 'DELETE', url: `/v1/integrations/log-drains/${id}`, queryParams, ...requestConfig });
1484
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1485
- }
1486
- /**
1487
- * @description Returns a stream of logs for a given deployment.
1488
- * @summary Get logs for a deployment
1489
- * {@link /v1/projects/:projectId/deployments/:deploymentId/runtime-logs}
1490
- */
1491
- async function getRuntimeLogs({ pathParams: { projectId, deploymentId }, queryParams, config = {} }) {
1492
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1493
- if (!projectId) {
1494
- throw new Error(`Missing required path parameter: projectId`);
1495
- }
1496
- if (!deploymentId) {
1497
- throw new Error(`Missing required path parameter: deploymentId`);
1498
- }
1499
- const data = await request({
1500
- method: 'GET',
1501
- url: `/v1/projects/${projectId}/deployments/${deploymentId}/runtime-logs`,
1502
- queryParams,
1503
- ...requestConfig
1504
- });
1505
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1506
- }
1507
- /**
1508
- * @description Create one or multiple experimentation items
1509
- * @summary Create one or multiple experimentation items
1510
- * {@link /v1/installations/:integrationConfigurationId/resources/:resourceId/experimentation/items}
1511
- */
1512
- async function createExperimentationItem({ pathParams: { integrationConfigurationId, resourceId }, config = {} }) {
1513
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1514
- if (!integrationConfigurationId) {
1515
- throw new Error(`Missing required path parameter: integrationConfigurationId`);
1516
- }
1517
- if (!resourceId) {
1518
- throw new Error(`Missing required path parameter: resourceId`);
1519
- }
1520
- const data = await request({
1521
- method: 'POST',
1522
- url: `/v1/installations/${integrationConfigurationId}/resources/${resourceId}/experimentation/items`,
1523
- ...requestConfig,
1524
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
1525
- });
1526
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1527
- }
1528
- /**
1529
- * @description Patch an existing experimentation item
1530
- * @summary Patch an existing experimentation item
1531
- * {@link /v1/installations/:integrationConfigurationId/resources/:resourceId/experimentation/items/:itemId}
1532
- */
1533
- async function updateExperimentationItem({ pathParams: { integrationConfigurationId, resourceId, itemId }, config = {} }) {
1534
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1535
- if (!integrationConfigurationId) {
1536
- throw new Error(`Missing required path parameter: integrationConfigurationId`);
1537
- }
1538
- if (!resourceId) {
1539
- throw new Error(`Missing required path parameter: resourceId`);
1540
- }
1541
- if (!itemId) {
1542
- throw new Error(`Missing required path parameter: itemId`);
1543
- }
1544
- const data = await request({
1545
- method: 'PATCH',
1546
- url: `/v1/installations/${integrationConfigurationId}/resources/${resourceId}/experimentation/items/${itemId}`,
1547
- ...requestConfig,
1548
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
1549
- });
1550
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1551
- }
1552
- /**
1553
- * @description Delete an existing experimentation item
1554
- * @summary Delete an existing experimentation item
1555
- * {@link /v1/installations/:integrationConfigurationId/resources/:resourceId/experimentation/items/:itemId}
1556
- */
1557
- async function deleteExperimentationItem({ pathParams: { integrationConfigurationId, resourceId, itemId }, config = {} }) {
1558
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1559
- if (!integrationConfigurationId) {
1560
- throw new Error(`Missing required path parameter: integrationConfigurationId`);
1561
- }
1562
- if (!resourceId) {
1563
- throw new Error(`Missing required path parameter: resourceId`);
1564
- }
1565
- if (!itemId) {
1566
- throw new Error(`Missing required path parameter: itemId`);
1567
- }
1568
- const data = await request({
1569
- method: 'DELETE',
1570
- url: `/v1/installations/${integrationConfigurationId}/resources/${resourceId}/experimentation/items/${itemId}`,
1571
- ...requestConfig
1572
- });
1573
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1574
- }
1575
- /**
1576
- * @description When the user enabled Edge Config syncing, then this endpoint can be used by the partner to push their configuration data into the relevant Edge Config.
1577
- * @summary Push data into a user-provided Edge Config
1578
- * {@link /v1/installations/:integrationConfigurationId/resources/:resourceId/experimentation/edge-config}
1579
- */
1580
- async function updateExperimentationEdgeConfig({ pathParams: { integrationConfigurationId, resourceId }, config = {} }) {
1581
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1582
- if (!integrationConfigurationId) {
1583
- throw new Error(`Missing required path parameter: integrationConfigurationId`);
1584
- }
1585
- if (!resourceId) {
1586
- throw new Error(`Missing required path parameter: resourceId`);
1587
- }
1588
- const data = await request({
1589
- method: 'PUT',
1590
- url: `/v1/installations/${integrationConfigurationId}/resources/${resourceId}/experimentation/edge-config`,
1591
- ...requestConfig,
1592
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
1593
- });
1594
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1595
- }
1596
- /**
1597
- * @description Lists all members of a project.
1598
- * @summary List project members
1599
- * {@link /v1/projects/:idOrName/members}
1600
- */
1601
- async function getProjectMembers({ pathParams: { idOrName }, queryParams, config = {} }) {
1602
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1603
- if (!idOrName) {
1604
- throw new Error(`Missing required path parameter: idOrName`);
1605
- }
1606
- const data = await request({ method: 'GET', url: `/v1/projects/${idOrName}/members`, queryParams, ...requestConfig });
1607
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1608
- }
1609
- /**
1610
- * @description Adds a new member to the project.
1611
- * @summary Adds a new member to a project.
1612
- * {@link /v1/projects/:idOrName/members}
1613
- */
1614
- async function addProjectMember({ pathParams: { idOrName }, queryParams, config = {} }) {
1615
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1616
- if (!idOrName) {
1617
- throw new Error(`Missing required path parameter: idOrName`);
1618
- }
1619
- const data = await request({
1620
- method: 'POST',
1621
- url: `/v1/projects/${idOrName}/members`,
1622
- queryParams,
1623
- ...requestConfig,
1624
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
1625
- });
1626
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1627
- }
1628
- /**
1629
- * @description Remove a member from a specific project
1630
- * @summary Remove a Project Member
1631
- * {@link /v1/projects/:idOrName/members/:uid}
1632
- */
1633
- async function removeProjectMember({ pathParams: { idOrName, uid }, queryParams, config = {} }) {
1634
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1635
- if (!idOrName) {
1636
- throw new Error(`Missing required path parameter: idOrName`);
1637
- }
1638
- if (!uid) {
1639
- throw new Error(`Missing required path parameter: uid`);
1640
- }
1641
- const data = await request({ method: 'DELETE', url: `/v1/projects/${idOrName}/members/${uid}`, queryParams, ...requestConfig });
1642
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1643
- }
1644
- /**
1645
- * @description Allows to retrieve the list of projects of the authenticated user or team. The list will be paginated and the provided query parameters allow filtering the returned projects.
1646
- * @summary Retrieve a list of projects
1647
- * {@link /v10/projects}
1648
- */
1649
- async function getProjects({ queryParams, config = {} }) {
1650
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1651
- const data = await request({ method: 'GET', url: `/v10/projects`, queryParams, ...requestConfig });
1652
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1653
- }
1654
- /**
1655
- * @description 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.
1656
- * @summary Create a new project
1657
- * {@link /v11/projects}
1658
- */
1659
- async function createProject({ queryParams, config = {} }) {
1660
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1661
- const data = await request({
1662
- method: 'POST',
1663
- url: `/v11/projects`,
1664
- queryParams,
1665
- ...requestConfig,
1666
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
1667
- });
1668
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1669
- }
1670
- /**
1671
- * @description Get the information for a specific project by passing either the project `id` or `name` in the URL.
1672
- * @summary Find a project by id or name
1673
- * {@link /v9/projects/:idOrName}
1674
- */
1675
- async function getProject({ pathParams: { idOrName }, queryParams, config = {} }) {
1676
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1677
- if (!idOrName) {
1678
- throw new Error(`Missing required path parameter: idOrName`);
1679
- }
1680
- const data = await request({ method: 'GET', url: `/v9/projects/${idOrName}`, queryParams, ...requestConfig });
1681
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1682
- }
1683
- /**
1684
- * @description Update the fields of a project using either its `name` or `id`.
1685
- * @summary Update an existing project
1686
- * {@link /v9/projects/:idOrName}
1687
- */
1688
- async function updateProject({ pathParams: { idOrName }, queryParams, config = {} }) {
1689
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1690
- if (!idOrName) {
1691
- throw new Error(`Missing required path parameter: idOrName`);
1692
- }
1693
- const data = await request({
1694
- method: 'PATCH',
1695
- url: `/v9/projects/${idOrName}`,
1696
- queryParams,
1697
- ...requestConfig,
1698
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
1699
- });
1700
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1701
- }
1702
- /**
1703
- * @description Delete a specific project by passing either the project `id` or `name` in the URL.
1704
- * @summary Delete a Project
1705
- * {@link /v9/projects/:idOrName}
1706
- */
1707
- async function deleteProject({ pathParams: { idOrName }, queryParams, config = {} }) {
1708
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1709
- if (!idOrName) {
1710
- throw new Error(`Missing required path parameter: idOrName`);
1711
- }
1712
- const data = await request({ method: 'DELETE', url: `/v9/projects/${idOrName}`, queryParams, ...requestConfig });
1713
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1714
- }
1715
- /**
1716
- * @description Creates a custom environment for the current project. Cannot be named 'Production' or 'Preview'.
1717
- * @summary Create a custom environment for the current project.
1718
- * {@link /v9/projects/:idOrName/custom-environments}
1719
- */
1720
- async function createCustomEnvironment({ pathParams: { idOrName }, queryParams, config = {} }) {
1721
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1722
- if (!idOrName) {
1723
- throw new Error(`Missing required path parameter: idOrName`);
1724
- }
1725
- const data = await request({
1726
- method: 'POST',
1727
- url: `/v9/projects/${idOrName}/custom-environments`,
1728
- queryParams,
1729
- ...requestConfig,
1730
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
1731
- });
1732
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1733
- }
1734
- /**
1735
- * @description Retrieve custom environments for the project. Must not be named 'Production' or 'Preview'.
1736
- * @summary Retrieve custom environments
1737
- * {@link /v9/projects/:idOrName/custom-environments}
1738
- */
1739
- async function listCustomEnvironments({ pathParams: { idOrName }, queryParams, config = {} }) {
1740
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1741
- if (!idOrName) {
1742
- throw new Error(`Missing required path parameter: idOrName`);
1743
- }
1744
- const data = await request({ method: 'GET', url: `/v9/projects/${idOrName}/custom-environments`, queryParams, ...requestConfig });
1745
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1746
- }
1747
- /**
1748
- * @description Retrieve a custom environment for the project. Must not be named 'Production' or 'Preview'.
1749
- * @summary Retrieve a custom environment
1750
- * {@link /v9/projects/:idOrName/custom-environments/:environmentSlugOrId}
1751
- */
1752
- async function getCustomEnvironment({ pathParams: { idOrName, environmentSlugOrId }, queryParams, config = {} }) {
1753
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1754
- if (!idOrName) {
1755
- throw new Error(`Missing required path parameter: idOrName`);
1756
- }
1757
- if (!environmentSlugOrId) {
1758
- throw new Error(`Missing required path parameter: environmentSlugOrId`);
1759
- }
1760
- const data = await request({
1761
- method: 'GET',
1762
- url: `/v9/projects/${idOrName}/custom-environments/${environmentSlugOrId}`,
1763
- queryParams,
1764
- ...requestConfig
1765
- });
1766
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1767
- }
1768
- /**
1769
- * @description Update a custom environment for the project. Must not be named 'Production' or 'Preview'.
1770
- * @summary Update a custom environment
1771
- * {@link /v9/projects/:idOrName/custom-environments/:environmentSlugOrId}
1772
- */
1773
- async function updateCustomEnvironment({ pathParams: { idOrName, environmentSlugOrId }, queryParams, config = {} }) {
1774
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1775
- if (!idOrName) {
1776
- throw new Error(`Missing required path parameter: idOrName`);
1777
- }
1778
- if (!environmentSlugOrId) {
1779
- throw new Error(`Missing required path parameter: environmentSlugOrId`);
1780
- }
1781
- const data = await request({
1782
- method: 'PATCH',
1783
- url: `/v9/projects/${idOrName}/custom-environments/${environmentSlugOrId}`,
1784
- queryParams,
1785
- ...requestConfig,
1786
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
1787
- });
1788
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1789
- }
1790
- /**
1791
- * @description Remove a custom environment for the project. Must not be named 'Production' or 'Preview'.
1792
- * @summary Remove a custom environment
1793
- * {@link /v9/projects/:idOrName/custom-environments/:environmentSlugOrId}
1794
- */
1795
- async function removeCustomEnvironment({ pathParams: { idOrName, environmentSlugOrId }, queryParams, config = {} }) {
1796
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1797
- if (!idOrName) {
1798
- throw new Error(`Missing required path parameter: idOrName`);
1799
- }
1800
- if (!environmentSlugOrId) {
1801
- throw new Error(`Missing required path parameter: environmentSlugOrId`);
1802
- }
1803
- const data = await request({
1804
- method: 'DELETE',
1805
- url: `/v9/projects/${idOrName}/custom-environments/${environmentSlugOrId}`,
1806
- queryParams,
1807
- ...requestConfig,
1808
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
1809
- });
1810
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1811
- }
1812
- /**
1813
- * @description Retrieve the domains associated with a given project by passing either the project `id` or `name` in the URL.
1814
- * @summary Retrieve project domains by project by id or name
1815
- * {@link /v9/projects/:idOrName/domains}
1816
- */
1817
- async function getProjectDomains({ pathParams: { idOrName }, queryParams, config = {} }) {
1818
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1819
- if (!idOrName) {
1820
- throw new Error(`Missing required path parameter: idOrName`);
1821
- }
1822
- const data = await request({ method: 'GET', url: `/v9/projects/${idOrName}/domains`, queryParams, ...requestConfig });
1823
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1824
- }
1825
- /**
1826
- * @description Get project domain by project id/name and domain name.
1827
- * @summary Get a project domain
1828
- * {@link /v9/projects/:idOrName/domains/:domain}
1829
- */
1830
- async function getProjectDomain({ pathParams: { idOrName, domain }, queryParams, config = {} }) {
1831
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1832
- if (!idOrName) {
1833
- throw new Error(`Missing required path parameter: idOrName`);
1834
- }
1835
- if (!domain) {
1836
- throw new Error(`Missing required path parameter: domain`);
1837
- }
1838
- const data = await request({ method: 'GET', url: `/v9/projects/${idOrName}/domains/${domain}`, queryParams, ...requestConfig });
1839
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1840
- }
1841
- /**
1842
- * @description Update a project domain's configuration, including the name, git branch and redirect of the domain.
1843
- * @summary Update a project domain
1844
- * {@link /v9/projects/:idOrName/domains/:domain}
1845
- */
1846
- async function updateProjectDomain({ pathParams: { idOrName, domain }, queryParams, config = {} }) {
1847
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1848
- if (!idOrName) {
1849
- throw new Error(`Missing required path parameter: idOrName`);
1850
- }
1851
- if (!domain) {
1852
- throw new Error(`Missing required path parameter: domain`);
1853
- }
1854
- const data = await request({
1855
- method: 'PATCH',
1856
- url: `/v9/projects/${idOrName}/domains/${domain}`,
1857
- queryParams,
1858
- ...requestConfig,
1859
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
1860
- });
1861
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1862
- }
1863
- /**
1864
- * @description 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.
1865
- * @summary Remove a domain from a project
1866
- * {@link /v9/projects/:idOrName/domains/:domain}
1867
- */
1868
- async function removeProjectDomain({ pathParams: { idOrName, domain }, queryParams, config = {} }) {
1869
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1870
- if (!idOrName) {
1871
- throw new Error(`Missing required path parameter: idOrName`);
1872
- }
1873
- if (!domain) {
1874
- throw new Error(`Missing required path parameter: domain`);
1875
- }
1876
- const data = await request({
1877
- method: 'DELETE',
1878
- url: `/v9/projects/${idOrName}/domains/${domain}`,
1879
- queryParams,
1880
- ...requestConfig,
1881
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
1882
- });
1883
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1884
- }
1885
- /**
1886
- * @description 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.
1887
- * @summary Add a domain to a project
1888
- * {@link /v10/projects/:idOrName/domains}
1889
- */
1890
- async function addProjectDomain({ pathParams: { idOrName }, queryParams, config = {} }) {
1891
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1892
- if (!idOrName) {
1893
- throw new Error(`Missing required path parameter: idOrName`);
1894
- }
1895
- const data = await request({
1896
- method: 'POST',
1897
- url: `/v10/projects/${idOrName}/domains`,
1898
- queryParams,
1899
- ...requestConfig,
1900
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
1901
- });
1902
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1903
- }
1904
- /**
1905
- * @description Move one project's domain to another project. Also allows the move of all redirects pointed to that domain in the same project.
1906
- * @summary Move a project domain
1907
- * {@link /v1/projects/:idOrName/domains/:domain/move}
1908
- */
1909
- async function moveProjectDomain({ pathParams: { idOrName, domain }, queryParams, config = {} }) {
1910
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1911
- if (!idOrName) {
1912
- throw new Error(`Missing required path parameter: idOrName`);
1913
- }
1914
- if (!domain) {
1915
- throw new Error(`Missing required path parameter: domain`);
1916
- }
1917
- const data = await request({
1918
- method: 'POST',
1919
- url: `/v1/projects/${idOrName}/domains/${domain}/move`,
1920
- queryParams,
1921
- ...requestConfig,
1922
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
1923
- });
1924
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1925
- }
1926
- /**
1927
- * @description Attempts to verify a project domain with `verified = false` by checking the correctness of the project domain's `verification` challenge.
1928
- * @summary Verify project domain
1929
- * {@link /v9/projects/:idOrName/domains/:domain/verify}
1930
- */
1931
- async function verifyProjectDomain({ pathParams: { idOrName, domain }, queryParams, config = {} }) {
1932
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1933
- if (!idOrName) {
1934
- throw new Error(`Missing required path parameter: idOrName`);
1935
- }
1936
- if (!domain) {
1937
- throw new Error(`Missing required path parameter: domain`);
1938
- }
1939
- const data = await request({ method: 'POST', url: `/v9/projects/${idOrName}/domains/${domain}/verify`, queryParams, ...requestConfig });
1940
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1941
- }
1942
- /**
1943
- * @description Retrieve the environment variables for a given project by passing either the project `id` or `name` in the URL.
1944
- * @summary Retrieve the environment variables of a project by id or name
1945
- * {@link /v10/projects/:idOrName/env}
1946
- */
1947
- async function filterProjectEnvs({ pathParams: { idOrName }, queryParams, config = {} }) {
1948
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1949
- if (!idOrName) {
1950
- throw new Error(`Missing required path parameter: idOrName`);
1951
- }
1952
- const data = await request({ method: 'GET', url: `/v10/projects/${idOrName}/env`, queryParams, ...requestConfig });
1953
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1954
- }
1955
- /**
1956
- * @description Create one or 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. If you include `upsert=true` as a query parameter, a new environment variable will not be created if it already exists but, the existing variable's value will be updated.
1957
- * @summary Create one or more environment variables
1958
- * {@link /v10/projects/:idOrName/env}
1959
- */
1960
- async function createProjectEnv({ pathParams: { idOrName }, queryParams, config = {} }) {
1961
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1962
- if (!idOrName) {
1963
- throw new Error(`Missing required path parameter: idOrName`);
1964
- }
1965
- const data = await request({
1966
- method: 'POST',
1967
- url: `/v10/projects/${idOrName}/env`,
1968
- queryParams,
1969
- ...requestConfig,
1970
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
1971
- });
1972
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1973
- }
1974
- /**
1975
- * @description Retrieve the environment variable for a given project.
1976
- * @summary Retrieve the decrypted value of an environment variable of a project by id
1977
- * {@link /v1/projects/:idOrName/env/:id}
1978
- */
1979
- async function getProjectEnv({ pathParams: { idOrName, id }, queryParams, config = {} }) {
1980
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1981
- if (!idOrName) {
1982
- throw new Error(`Missing required path parameter: idOrName`);
1983
- }
1984
- if (!id) {
1985
- throw new Error(`Missing required path parameter: id`);
1986
- }
1987
- const data = await request({ method: 'GET', url: `/v1/projects/${idOrName}/env/${id}`, queryParams, ...requestConfig });
1988
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
1989
- }
1990
- /**
1991
- * @description 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.
1992
- * @summary Remove an environment variable
1993
- * {@link /v9/projects/:idOrName/env/:id}
1994
- */
1995
- async function removeProjectEnv({ pathParams: { idOrName, id }, queryParams, config = {} }) {
1996
- const { client: request = fetcher_1.default, ...requestConfig } = config;
1997
- if (!idOrName) {
1998
- throw new Error(`Missing required path parameter: idOrName`);
1999
- }
2000
- if (!id) {
2001
- throw new Error(`Missing required path parameter: id`);
2002
- }
2003
- const data = await request({ method: 'DELETE', url: `/v9/projects/${idOrName}/env/${id}`, queryParams, ...requestConfig });
2004
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2005
- }
2006
- /**
2007
- * @description 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.
2008
- * @summary Edit an environment variable
2009
- * {@link /v9/projects/:idOrName/env/:id}
2010
- */
2011
- async function editProjectEnv({ pathParams: { idOrName, id }, queryParams, config = {} }) {
2012
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2013
- if (!idOrName) {
2014
- throw new Error(`Missing required path parameter: idOrName`);
2015
- }
2016
- if (!id) {
2017
- throw new Error(`Missing required path parameter: id`);
2018
- }
2019
- const data = await request({
2020
- method: 'PATCH',
2021
- url: `/v9/projects/${idOrName}/env/${id}`,
2022
- queryParams,
2023
- ...requestConfig,
2024
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
2025
- });
2026
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2027
- }
2028
- /**
2029
- * @description Get the Rolling Releases billing status for a project. The team level billing status is used to determine if the project can be configured for rolling releases.
2030
- * @summary Get rolling release billing status
2031
- * {@link /v1/projects/:idOrName/rolling-release/billing}
2032
- */
2033
- async function getRollingReleaseBillingStatus({ pathParams: { idOrName }, queryParams, config = {} }) {
2034
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2035
- if (!idOrName) {
2036
- throw new Error(`Missing required path parameter: idOrName`);
2037
- }
2038
- const data = await request({ method: 'GET', url: `/v1/projects/${idOrName}/rolling-release/billing`, queryParams, ...requestConfig });
2039
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2040
- }
2041
- /**
2042
- * @description Get the Rolling Releases configuration for a project. The project-level config is simply a template that will be used for any future rolling release, and not the configuration for any active rolling release.
2043
- * @summary Get rolling release configuration
2044
- * {@link /v1/projects/:idOrName/rolling-release/config}
2045
- */
2046
- async function getRollingReleaseConfig({ pathParams: { idOrName }, queryParams, config = {} }) {
2047
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2048
- if (!idOrName) {
2049
- throw new Error(`Missing required path parameter: idOrName`);
2050
- }
2051
- const data = await request({ method: 'GET', url: `/v1/projects/${idOrName}/rolling-release/config`, queryParams, ...requestConfig });
2052
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2053
- }
2054
- /**
2055
- * @description Disable Rolling Releases for a project means that future deployments will not undergo a rolling release. Changing the config never alters a rollout that's already in-flight—it only affects the next production deployment. If you want to also stop the current rollout, call this endpoint to disable the feature, and then call either the /complete or /abort endpoint.
2056
- * @summary Delete rolling release configuration
2057
- * {@link /v1/projects/:idOrName/rolling-release/config}
2058
- */
2059
- async function deleteRollingReleaseConfig({ pathParams: { idOrName }, queryParams, config = {} }) {
2060
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2061
- if (!idOrName) {
2062
- throw new Error(`Missing required path parameter: idOrName`);
2063
- }
2064
- const data = await request({ method: 'DELETE', url: `/v1/projects/${idOrName}/rolling-release/config`, queryParams, ...requestConfig });
2065
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2066
- }
2067
- /**
2068
- * @description Update (or disable) Rolling Releases for a project. Changing the config never alters a rollout that's already in-flight. It only affects the next production deployment. This also applies to disabling Rolling Releases. If you want to also stop the current rollout, call this endpoint to disable the feature, and then call either the /complete or /abort endpoint. Note: Enabling Rolling Releases automatically enables skew protection on the project with the default value if it wasn't configured already.
2069
- * @summary Update the rolling release settings for the project
2070
- * {@link /v1/projects/:idOrName/rolling-release/config}
2071
- */
2072
- async function updateRollingReleaseConfig({ pathParams: { idOrName }, queryParams, config = {} }) {
2073
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2074
- if (!idOrName) {
2075
- throw new Error(`Missing required path parameter: idOrName`);
2076
- }
2077
- const data = await request({ method: 'PATCH', url: `/v1/projects/${idOrName}/rolling-release/config`, queryParams, ...requestConfig });
2078
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2079
- }
2080
- /**
2081
- * @description Return the Rolling Release for a project, regardless of whether the rollout is active, aborted, or completed. If the feature is enabled but no deployment has occurred yet, null will be returned.
2082
- * @summary Get the active rolling release information for a project
2083
- * {@link /v1/projects/:idOrName/rolling-release}
2084
- */
2085
- async function getRollingRelease({ pathParams: { idOrName }, queryParams, config = {} }) {
2086
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2087
- if (!idOrName) {
2088
- throw new Error(`Missing required path parameter: idOrName`);
2089
- }
2090
- const data = await request({ method: 'GET', url: `/v1/projects/${idOrName}/rolling-release`, queryParams, ...requestConfig });
2091
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2092
- }
2093
- /**
2094
- * @description Advance a rollout to the next stage. This is only needed when rolling releases is configured to require manual approval.
2095
- * @summary Update the active rolling release to the next stage for a project
2096
- * {@link /v1/projects/:idOrName/rolling-release/approve-stage}
2097
- */
2098
- async function approveRollingReleaseStage({ pathParams: { idOrName }, queryParams, config = {} }) {
2099
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2100
- if (!idOrName) {
2101
- throw new Error(`Missing required path parameter: idOrName`);
2102
- }
2103
- const data = await request({
2104
- method: 'POST',
2105
- url: `/v1/projects/${idOrName}/rolling-release/approve-stage`,
2106
- queryParams,
2107
- ...requestConfig,
2108
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
2109
- });
2110
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2111
- }
2112
- /**
2113
- * @description Force-complete a Rolling Release. The canary deployment will begin serving 100% of the traffic.
2114
- * @summary Complete the rolling release for the project
2115
- * {@link /v1/projects/:idOrName/rolling-release/complete}
2116
- */
2117
- async function completeRollingRelease({ pathParams: { idOrName }, queryParams, config = {} }) {
2118
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2119
- if (!idOrName) {
2120
- throw new Error(`Missing required path parameter: idOrName`);
2121
- }
2122
- const data = await request({
2123
- method: 'POST',
2124
- url: `/v1/projects/${idOrName}/rolling-release/complete`,
2125
- queryParams,
2126
- ...requestConfig,
2127
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
2128
- });
2129
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2130
- }
2131
- /**
2132
- * @description Initiates a project transfer request from one team to another. <br/> Returns a `code` that remains valid for 24 hours and can be used to accept the transfer request by another team using the `PUT /projects/transfer-request/:code` endpoint. <br/> Users can also accept the project transfer request using the claim URL: `https://vercel.com/claim-deployment?code=<code>&returnUrl=<returnUrl>`. <br/> The `code` parameter specifies the project transfer request code generated using this endpoint. <br/> The `returnUrl` parameter redirects users to a specific page of the application if the claim URL is invalid or expired.
2133
- * @summary Create project transfer request
2134
- * {@link /projects/:idOrName/transfer-request}
2135
- */
2136
- async function createProjectTransferRequest({ pathParams: { idOrName }, queryParams, config = {} }) {
2137
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2138
- if (!idOrName) {
2139
- throw new Error(`Missing required path parameter: idOrName`);
2140
- }
2141
- const data = await request({
2142
- method: 'POST',
2143
- url: `/projects/${idOrName}/transfer-request`,
2144
- queryParams,
2145
- ...requestConfig,
2146
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
2147
- });
2148
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2149
- }
2150
- /**
2151
- * @description Accept a project transfer request initated by another team. <br/> The `code` is generated using the `POST /projects/:idOrName/transfer-request` endpoint.
2152
- * @summary Accept project transfer request
2153
- * {@link /projects/transfer-request/:code}
2154
- */
2155
- async function acceptProjectTransferRequest({ pathParams: { code }, queryParams, config = {} }) {
2156
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2157
- if (!code) {
2158
- throw new Error(`Missing required path parameter: code`);
2159
- }
2160
- const data = await request({
2161
- method: 'PUT',
2162
- url: `/projects/transfer-request/${code}`,
2163
- queryParams,
2164
- ...requestConfig,
2165
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
2166
- });
2167
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2168
- }
2169
- /**
2170
- * @description Update the deployment protection automation bypass for a project
2171
- * @summary Update Protection Bypass for Automation
2172
- * {@link /v1/projects/:idOrName/protection-bypass}
2173
- */
2174
- async function updateProjectProtectionBypass({ pathParams: { idOrName }, queryParams, config = {} }) {
2175
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2176
- if (!idOrName) {
2177
- throw new Error(`Missing required path parameter: idOrName`);
2178
- }
2179
- const data = await request({
2180
- method: 'PATCH',
2181
- url: `/v1/projects/${idOrName}/protection-bypass`,
2182
- queryParams,
2183
- ...requestConfig,
2184
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
2185
- });
2186
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2187
- }
2188
- /**
2189
- * @description Allows users to promote a deployment to production. Note: This does NOT rebuild the deployment. If you need that, then call create-deployments endpoint.
2190
- * @summary Points all production domains for a project to the given deploy
2191
- * {@link /v10/projects/:projectId/promote/:deploymentId}
2192
- */
2193
- async function requestPromote({ pathParams: { projectId, deploymentId }, queryParams, config = {} }) {
2194
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2195
- if (!projectId) {
2196
- throw new Error(`Missing required path parameter: projectId`);
2197
- }
2198
- if (!deploymentId) {
2199
- throw new Error(`Missing required path parameter: deploymentId`);
2200
- }
2201
- const data = await request({ method: 'POST', url: `/v10/projects/${projectId}/promote/${deploymentId}`, queryParams, ...requestConfig });
2202
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2203
- }
2204
- /**
2205
- * @description Get a list of aliases related to the last promote request with their mapping status
2206
- * @summary Gets a list of aliases with status for the current promote
2207
- * {@link /v1/projects/:projectId/promote/aliases}
2208
- */
2209
- async function listPromoteAliases({ pathParams: { projectId }, queryParams, config = {} }) {
2210
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2211
- if (!projectId) {
2212
- throw new Error(`Missing required path parameter: projectId`);
2213
- }
2214
- const data = await request({ method: 'GET', url: `/v1/projects/${projectId}/promote/aliases`, queryParams, ...requestConfig });
2215
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2216
- }
2217
- /**
2218
- * @description Pause a project by passing its project `id` in the URL. If the project does not exist given the id then the request will fail with 400 status code. If the project disables auto assigning custom production domains and blocks the active Production Deployment then the request will return with 200 status code.
2219
- * @summary Pause a project
2220
- * {@link /v1/projects/:projectId/pause}
2221
- */
2222
- async function pauseProject({ pathParams: { projectId }, queryParams, config = {} }) {
2223
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2224
- if (!projectId) {
2225
- throw new Error(`Missing required path parameter: projectId`);
2226
- }
2227
- const data = await request({ method: 'POST', url: `/v1/projects/${projectId}/pause`, queryParams, ...requestConfig });
2228
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2229
- }
2230
- /**
2231
- * @description Unpause a project by passing its project `id` in the URL. If the project does not exist given the id then the request will fail with 400 status code. If the project enables auto assigning custom production domains and unblocks the active Production Deployment then the request will return with 200 status code.
2232
- * @summary Unpause a project
2233
- * {@link /v1/projects/:projectId/unpause}
2234
- */
2235
- async function unpauseProject({ pathParams: { projectId }, queryParams, config = {} }) {
2236
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2237
- if (!projectId) {
2238
- throw new Error(`Missing required path parameter: projectId`);
2239
- }
2240
- const data = await request({ method: 'POST', url: `/v1/projects/${projectId}/unpause`, queryParams, ...requestConfig });
2241
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2242
- }
2243
- /**
2244
- * @description Update the setting for determining if the project has Attack Challenge mode enabled.
2245
- * @summary Update Attack Challenge mode
2246
- * {@link /v1/security/attack-mode}
2247
- */
2248
- async function updateAttackChallengeMode({ queryParams, config = {} }) {
2249
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2250
- const data = await request({
2251
- method: 'POST',
2252
- url: `/v1/security/attack-mode`,
2253
- queryParams,
2254
- ...requestConfig,
2255
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
2256
- });
2257
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2258
- }
2259
- /**
2260
- * @description Set the firewall configuration to provided rules and settings. Creates or overwrite the existing firewall configuration.
2261
- * @summary Put Firewall Configuration
2262
- * {@link /v1/security/firewall/config}
2263
- */
2264
- async function putFirewallConfig({ queryParams, config = {} }) {
2265
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2266
- const data = await request({
2267
- method: 'PUT',
2268
- url: `/v1/security/firewall/config`,
2269
- queryParams,
2270
- ...requestConfig,
2271
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
2272
- });
2273
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2274
- }
2275
- /**
2276
- * @description Process updates to modify the existing firewall config for a project
2277
- * @summary Update Firewall Configuration
2278
- * {@link /v1/security/firewall/config}
2279
- */
2280
- async function updateFirewallConfig({ queryParams, config = {} }) {
2281
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2282
- const data = await request({
2283
- method: 'PATCH',
2284
- url: `/v1/security/firewall/config`,
2285
- queryParams,
2286
- ...requestConfig,
2287
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
2288
- });
2289
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2290
- }
2291
- /**
2292
- * @description Retrieve the specified firewall configuration for a project. The deployed configVersion will be `active`
2293
- * @summary Read Firewall Configuration
2294
- * {@link /v1/security/firewall/config/:configVersion}
2295
- */
2296
- async function getFirewallConfig({ pathParams: { configVersion }, queryParams, config = {} }) {
2297
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2298
- if (!configVersion) {
2299
- throw new Error(`Missing required path parameter: configVersion`);
2300
- }
2301
- const data = await request({ method: 'GET', url: `/v1/security/firewall/config/${configVersion}`, queryParams, ...requestConfig });
2302
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2303
- }
2304
- /**
2305
- * @description Retrieve active attack data within the last 24h window
2306
- * @summary Read active attack data
2307
- * {@link /v1/security/firewall/attack-status}
2308
- */
2309
- async function getActiveAttackStatus({ queryParams, config = {} }) {
2310
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2311
- const data = await request({ method: 'GET', url: `/v1/security/firewall/attack-status`, queryParams, ...requestConfig });
2312
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2313
- }
2314
- /**
2315
- * @description Retrieve the system bypass rules configured for the specified project
2316
- * @summary Read System Bypass
2317
- * {@link /v1/security/firewall/bypass}
2318
- */
2319
- async function getBypassIp({ queryParams, config = {} }) {
2320
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2321
- const data = await request({ method: 'GET', url: `/v1/security/firewall/bypass`, queryParams, ...requestConfig });
2322
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2323
- }
2324
- /**
2325
- * @description Create new system bypass rules
2326
- * @summary Create System Bypass Rule
2327
- * {@link /v1/security/firewall/bypass}
2328
- */
2329
- async function addBypassIp({ queryParams, config = {} }) {
2330
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2331
- const data = await request({
2332
- method: 'POST',
2333
- url: `/v1/security/firewall/bypass`,
2334
- queryParams,
2335
- ...requestConfig,
2336
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
2337
- });
2338
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2339
- }
2340
- /**
2341
- * @description Remove system bypass rules
2342
- * @summary Remove System Bypass Rule
2343
- * {@link /v1/security/firewall/bypass}
2344
- */
2345
- async function removeBypassIp({ queryParams, config = {} }) {
2346
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2347
- const data = await request({
2348
- method: 'DELETE',
2349
- url: `/v1/security/firewall/bypass`,
2350
- queryParams,
2351
- ...requestConfig,
2352
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
2353
- });
2354
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2355
- }
2356
- /**
2357
- * @description Get a paginated list of team members for the provided team.
2358
- * @summary List team members
2359
- * {@link /v3/teams/:teamId/members}
2360
- */
2361
- async function getTeamMembers({ pathParams: { teamId }, queryParams, config = {} }) {
2362
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2363
- if (!teamId) {
2364
- throw new Error(`Missing required path parameter: teamId`);
2365
- }
2366
- const data = await request({ method: 'GET', url: `/v3/teams/${teamId}/members`, queryParams, ...requestConfig });
2367
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2368
- }
2369
- /**
2370
- * @description 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.
2371
- * @summary Invite a user
2372
- * {@link /v1/teams/:teamId/members}
2373
- */
2374
- async function inviteUserToTeam({ pathParams: { teamId }, config = {} }) {
2375
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2376
- if (!teamId) {
2377
- throw new Error(`Missing required path parameter: teamId`);
2378
- }
2379
- const data = await request({
2380
- method: 'POST',
2381
- url: `/v1/teams/${teamId}/members`,
2382
- ...requestConfig,
2383
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
2384
- });
2385
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2386
- }
2387
- /**
2388
- * @description 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.
2389
- * @summary Request access to a team
2390
- * {@link /v1/teams/:teamId/request}
2391
- */
2392
- async function requestAccessToTeam({ pathParams: { teamId }, config = {} }) {
2393
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2394
- if (!teamId) {
2395
- throw new Error(`Missing required path parameter: teamId`);
2396
- }
2397
- const data = await request({
2398
- method: 'POST',
2399
- url: `/v1/teams/${teamId}/request`,
2400
- ...requestConfig,
2401
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
2402
- });
2403
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2404
- }
2405
- /**
2406
- * @description 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.
2407
- * @summary Get access request status
2408
- * {@link /v1/teams/:teamId/request/:userId}
2409
- */
2410
- async function getTeamAccessRequest({ pathParams: { userId, teamId }, config = {} }) {
2411
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2412
- if (!userId) {
2413
- throw new Error(`Missing required path parameter: userId`);
2414
- }
2415
- if (!teamId) {
2416
- throw new Error(`Missing required path parameter: teamId`);
2417
- }
2418
- const data = await request({ method: 'GET', url: `/v1/teams/${teamId}/request/${userId}`, ...requestConfig });
2419
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2420
- }
2421
- /**
2422
- * @description Join a team with a provided invite code or team ID.
2423
- * @summary Join a team
2424
- * {@link /v1/teams/:teamId/members/teams/join}
2425
- */
2426
- async function joinTeam({ pathParams: { teamId }, config = {} }) {
2427
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2428
- if (!teamId) {
2429
- throw new Error(`Missing required path parameter: teamId`);
2430
- }
2431
- const data = await request({
2432
- method: 'POST',
2433
- url: `/v1/teams/${teamId}/members/teams/join`,
2434
- ...requestConfig,
2435
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
2436
- });
2437
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2438
- }
2439
- /**
2440
- * @description 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.
2441
- * @summary Update a Team Member
2442
- * {@link /v1/teams/:teamId/members/:uid}
2443
- */
2444
- async function updateTeamMember({ pathParams: { uid, teamId }, config = {} }) {
2445
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2446
- if (!uid) {
2447
- throw new Error(`Missing required path parameter: uid`);
2448
- }
2449
- if (!teamId) {
2450
- throw new Error(`Missing required path parameter: teamId`);
2451
- }
2452
- const data = await request({
2453
- method: 'PATCH',
2454
- url: `/v1/teams/${teamId}/members/${uid}`,
2455
- ...requestConfig,
2456
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
2457
- });
2458
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2459
- }
2460
- /**
2461
- * @description Remove a Team Member from the Team, or dismiss a user that requested access, or leave a team.
2462
- * @summary Remove a Team Member
2463
- * {@link /v1/teams/:teamId/members/:uid}
2464
- */
2465
- async function removeTeamMember({ pathParams: { uid, teamId }, queryParams, config = {} }) {
2466
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2467
- if (!uid) {
2468
- throw new Error(`Missing required path parameter: uid`);
2469
- }
2470
- if (!teamId) {
2471
- throw new Error(`Missing required path parameter: teamId`);
2472
- }
2473
- const data = await request({ method: 'DELETE', url: `/v1/teams/${teamId}/members/${uid}`, queryParams, ...requestConfig });
2474
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2475
- }
2476
- /**
2477
- * @description Get information for the Team specified by the `teamId` parameter.
2478
- * @summary Get a Team
2479
- * {@link /v2/teams/:teamId}
2480
- */
2481
- async function getTeam({ pathParams: { teamId }, queryParams, config = {} }) {
2482
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2483
- if (!teamId) {
2484
- throw new Error(`Missing required path parameter: teamId`);
2485
- }
2486
- const data = await request({ method: 'GET', url: `/v2/teams/${teamId}`, queryParams, ...requestConfig });
2487
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2488
- }
2489
- /**
2490
- * @description 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.
2491
- * @summary Update a Team
2492
- * {@link /v2/teams/:teamId}
2493
- */
2494
- async function patchTeam({ pathParams: { teamId }, queryParams, config = {} }) {
2495
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2496
- if (!teamId) {
2497
- throw new Error(`Missing required path parameter: teamId`);
2498
- }
2499
- const data = await request({
2500
- method: 'PATCH',
2501
- url: `/v2/teams/${teamId}`,
2502
- queryParams,
2503
- ...requestConfig,
2504
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
2505
- });
2506
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2507
- }
2508
- /**
2509
- * @description Get a paginated list of all the Teams the authenticated User is a member of.
2510
- * @summary List all teams
2511
- * {@link /v2/teams}
2512
- */
2513
- async function getTeams({ queryParams, config = {} }) {
2514
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2515
- const data = await request({ method: 'GET', url: `/v2/teams`, queryParams, ...requestConfig });
2516
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2517
- }
2518
- /**
2519
- * @description Create a new Team under your account. You need to send a POST request with the desired Team slug, and optionally the Team name.
2520
- * @summary Create a Team
2521
- * {@link /v1/teams}
2522
- */
2523
- async function createTeam({ config = {} }) {
2524
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2525
- const data = await request({
2526
- method: 'POST',
2527
- url: `/v1/teams`,
2528
- ...requestConfig,
2529
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
2530
- });
2531
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2532
- }
2533
- /**
2534
- * @description 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.
2535
- * @summary Delete a Team
2536
- * {@link /v1/teams/:teamId}
2537
- */
2538
- async function deleteTeam({ pathParams: { teamId }, queryParams, config = {} }) {
2539
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2540
- if (!teamId) {
2541
- throw new Error(`Missing required path parameter: teamId`);
2542
- }
2543
- const data = await request({
2544
- method: 'DELETE',
2545
- url: `/v1/teams/${teamId}`,
2546
- queryParams,
2547
- ...requestConfig,
2548
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
2549
- });
2550
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2551
- }
2552
- /**
2553
- * @description Delete an active Team invite code.
2554
- * @summary Delete a Team invite code
2555
- * {@link /v1/teams/:teamId/invites/:inviteId}
2556
- */
2557
- async function deleteTeamInviteCode({ pathParams: { inviteId, teamId }, config = {} }) {
2558
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2559
- if (!inviteId) {
2560
- throw new Error(`Missing required path parameter: inviteId`);
2561
- }
2562
- if (!teamId) {
2563
- throw new Error(`Missing required path parameter: teamId`);
2564
- }
2565
- const data = await request({ method: 'DELETE', url: `/v1/teams/${teamId}/invites/${inviteId}`, ...requestConfig });
2566
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2567
- }
2568
- /**
2569
- * @description 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.
2570
- * @summary Upload Deployment Files
2571
- * {@link /v2/files}
2572
- */
2573
- async function uploadFile({ queryParams, headers, config = {} }) {
2574
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2575
- const data = await request({
2576
- method: 'POST',
2577
- url: `/v2/files`,
2578
- queryParams,
2579
- ...requestConfig,
2580
- headers: { 'Content-Type': 'applicationOctetStream', ...headers, ...requestConfig.headers }
2581
- });
2582
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2583
- }
2584
- /**
2585
- * @description Retrieve a list of the current User's authentication tokens.
2586
- * @summary List Auth Tokens
2587
- * {@link /v5/user/tokens}
2588
- */
2589
- async function listAuthTokens({ config = {} }) {
2590
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2591
- const data = await request({ method: 'GET', url: `/v5/user/tokens`, ...requestConfig });
2592
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2593
- }
2594
- /**
2595
- * @description 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.
2596
- * @summary Create an Auth Token
2597
- * {@link /v3/user/tokens}
2598
- */
2599
- async function createAuthToken({ queryParams, config = {} }) {
2600
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2601
- const data = await request({
2602
- method: 'POST',
2603
- url: `/v3/user/tokens`,
2604
- queryParams,
2605
- ...requestConfig,
2606
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
2607
- });
2608
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2609
- }
2610
- /**
2611
- * @description Retrieve metadata about an authentication token belonging to the currently authenticated User.
2612
- * @summary Get Auth Token Metadata
2613
- * {@link /v5/user/tokens/:tokenId}
2614
- */
2615
- async function getAuthToken({ pathParams: { tokenId }, config = {} }) {
2616
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2617
- if (!tokenId) {
2618
- throw new Error(`Missing required path parameter: tokenId`);
2619
- }
2620
- const data = await request({ method: 'GET', url: `/v5/user/tokens/${tokenId}`, ...requestConfig });
2621
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2622
- }
2623
- /**
2624
- * @description Invalidate an authentication token, such that it will no longer be valid for future HTTP requests.
2625
- * @summary Delete an authentication token
2626
- * {@link /v3/user/tokens/:tokenId}
2627
- */
2628
- async function deleteAuthToken({ pathParams: { tokenId }, config = {} }) {
2629
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2630
- if (!tokenId) {
2631
- throw new Error(`Missing required path parameter: tokenId`);
2632
- }
2633
- const data = await request({ method: 'DELETE', url: `/v3/user/tokens/${tokenId}`, ...requestConfig });
2634
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2635
- }
2636
- /**
2637
- * @description Retrieves information related to the currently authenticated User.
2638
- * @summary Get the User
2639
- * {@link /v2/user}
2640
- */
2641
- async function getAuthUser({ config = {} }) {
2642
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2643
- const data = await request({ method: 'GET', url: `/v2/user`, ...requestConfig });
2644
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2645
- }
2646
- /**
2647
- * @description 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.
2648
- * @summary Delete User Account
2649
- * {@link /v1/user}
2650
- */
2651
- async function requestDelete({ config = {} }) {
2652
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2653
- const data = await request({
2654
- method: 'DELETE',
2655
- url: `/v1/user`,
2656
- ...requestConfig,
2657
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
2658
- });
2659
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2660
- }
2661
- /**
2662
- * @description Creates a webhook
2663
- * @summary Creates a webhook
2664
- * {@link /v1/webhooks}
2665
- */
2666
- async function createWebhook({ queryParams, config = {} }) {
2667
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2668
- const data = await request({
2669
- method: 'POST',
2670
- url: `/v1/webhooks`,
2671
- queryParams,
2672
- ...requestConfig,
2673
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
2674
- });
2675
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2676
- }
2677
- /**
2678
- * @description Get a list of webhooks
2679
- * @summary Get a list of webhooks
2680
- * {@link /v1/webhooks}
2681
- */
2682
- async function getWebhooks({ queryParams, config = {} }) {
2683
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2684
- const data = await request({ method: 'GET', url: `/v1/webhooks`, queryParams, ...requestConfig });
2685
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2686
- }
2687
- /**
2688
- * @description Get a webhook
2689
- * @summary Get a webhook
2690
- * {@link /v1/webhooks/:id}
2691
- */
2692
- async function getWebhook({ pathParams: { id }, queryParams, config = {} }) {
2693
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2694
- if (!id) {
2695
- throw new Error(`Missing required path parameter: id`);
2696
- }
2697
- const data = await request({ method: 'GET', url: `/v1/webhooks/${id}`, queryParams, ...requestConfig });
2698
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2699
- }
2700
- /**
2701
- * @description Deletes a webhook
2702
- * @summary Deletes a webhook
2703
- * {@link /v1/webhooks/:id}
2704
- */
2705
- async function deleteWebhook({ pathParams: { id }, queryParams, config = {} }) {
2706
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2707
- if (!id) {
2708
- throw new Error(`Missing required path parameter: id`);
2709
- }
2710
- const data = await request({ method: 'DELETE', url: `/v1/webhooks/${id}`, queryParams, ...requestConfig });
2711
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2712
- }
2713
- /**
2714
- * @description Retrieves all Aliases for the Deployment with the given ID. The authenticated user or team must own the deployment.
2715
- * @summary List Deployment Aliases
2716
- * {@link /v2/deployments/:id/aliases}
2717
- */
2718
- async function listDeploymentAliases({ pathParams: { id }, queryParams, config = {} }) {
2719
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2720
- if (!id) {
2721
- throw new Error(`Missing required path parameter: id`);
2722
- }
2723
- const data = await request({ method: 'GET', url: `/v2/deployments/${id}/aliases`, queryParams, ...requestConfig });
2724
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2725
- }
2726
- /**
2727
- * @description Creates a new alias for the deployment with the given deployment ID. The authenticated user or team 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.
2728
- * @summary Assign an Alias
2729
- * {@link /v2/deployments/:id/aliases}
2730
- */
2731
- async function assignAlias({ pathParams: { id }, queryParams, config = {} }) {
2732
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2733
- if (!id) {
2734
- throw new Error(`Missing required path parameter: id`);
2735
- }
2736
- const data = await request({
2737
- method: 'POST',
2738
- url: `/v2/deployments/${id}/aliases`,
2739
- queryParams,
2740
- ...requestConfig,
2741
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
2742
- });
2743
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2744
- }
2745
- /**
2746
- * @description 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.
2747
- * @summary List aliases
2748
- * {@link /v4/aliases}
2749
- */
2750
- async function listAliases({ queryParams, config = {} }) {
2751
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2752
- const data = await request({ method: 'GET', url: `/v4/aliases`, queryParams, ...requestConfig });
2753
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2754
- }
2755
- /**
2756
- * @description Retrieves an Alias for the given host name or alias ID.
2757
- * @summary Get an Alias
2758
- * {@link /v4/aliases/:idOrAlias}
2759
- */
2760
- async function getAlias({ pathParams: { idOrAlias }, queryParams, config = {} }) {
2761
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2762
- if (!idOrAlias) {
2763
- throw new Error(`Missing required path parameter: idOrAlias`);
2764
- }
2765
- const data = await request({ method: 'GET', url: `/v4/aliases/${idOrAlias}`, queryParams, ...requestConfig });
2766
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2767
- }
2768
- /**
2769
- * @description Delete an Alias with the specified ID.
2770
- * @summary Delete an Alias
2771
- * {@link /v2/aliases/:aliasId}
2772
- */
2773
- async function deleteAlias({ pathParams: { aliasId }, queryParams, config = {} }) {
2774
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2775
- if (!aliasId) {
2776
- throw new Error(`Missing required path parameter: aliasId`);
2777
- }
2778
- const data = await request({ method: 'DELETE', url: `/v2/aliases/${aliasId}`, queryParams, ...requestConfig });
2779
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2780
- }
2781
- /**
2782
- * @description Update the protection bypass for the alias or deployment URL (used for user access & comment access for deployments). Used as shareable links and user scoped access for Vercel Authentication and also to allow external (logged in) people to comment on previews for Preview Comments (next-live-mode).
2783
- * @summary Update the protection bypass for a URL
2784
- * {@link /aliases/:id/protection-bypass}
2785
- */
2786
- async function patchUrlProtectionBypass({ pathParams: { id }, queryParams, config = {} }) {
2787
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2788
- if (!id) {
2789
- throw new Error(`Missing required path parameter: id`);
2790
- }
2791
- const data = await request({
2792
- method: 'PATCH',
2793
- url: `/aliases/${id}/protection-bypass`,
2794
- queryParams,
2795
- ...requestConfig,
2796
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
2797
- });
2798
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2799
- }
2800
- /**
2801
- * {@link /certs}
2802
- */
2803
- async function listCerts({ config = {} }) {
2804
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2805
- const data = await request({ method: 'GET', url: `/certs`, ...requestConfig });
2806
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2807
- }
2808
- /**
2809
- * @description Get cert by id
2810
- * @summary Get cert by id
2811
- * {@link /v8/certs/:id}
2812
- */
2813
- async function getCertById({ pathParams: { id }, queryParams, config = {} }) {
2814
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2815
- if (!id) {
2816
- throw new Error(`Missing required path parameter: id`);
2817
- }
2818
- const data = await request({ method: 'GET', url: `/v8/certs/${id}`, queryParams, ...requestConfig });
2819
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2820
- }
2821
- /**
2822
- * @description Remove cert
2823
- * @summary Remove cert
2824
- * {@link /v8/certs/:id}
2825
- */
2826
- async function removeCert({ pathParams: { id }, queryParams, config = {} }) {
2827
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2828
- if (!id) {
2829
- throw new Error(`Missing required path parameter: id`);
2830
- }
2831
- const data = await request({ method: 'DELETE', url: `/v8/certs/${id}`, queryParams, ...requestConfig });
2832
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2833
- }
2834
- /**
2835
- * @description Issue a new cert
2836
- * @summary Issue a new cert
2837
- * {@link /v8/certs}
2838
- */
2839
- async function issueCert({ queryParams, config = {} }) {
2840
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2841
- const data = await request({
2842
- method: 'POST',
2843
- url: `/v8/certs`,
2844
- queryParams,
2845
- ...requestConfig,
2846
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
2847
- });
2848
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2849
- }
2850
- /**
2851
- * @description Upload a cert
2852
- * @summary Upload a cert
2853
- * {@link /v8/certs}
2854
- */
2855
- async function uploadCert({ queryParams, config = {} }) {
2856
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2857
- const data = await request({
2858
- method: 'PUT',
2859
- url: `/v8/certs`,
2860
- queryParams,
2861
- ...requestConfig,
2862
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
2863
- });
2864
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2865
- }
2866
- /**
2867
- * @description Allows to retrieve the file structure of the source code of a deployment by supplying the deployment unique identifier. If the deployment was created with the Vercel CLI or the API directly with the `files` key, it will have a file tree that can be retrievable.
2868
- * @summary List Deployment Files
2869
- * {@link /v6/deployments/:id/files}
2870
- */
2871
- async function listDeploymentFiles({ pathParams: { id }, queryParams, config = {} }) {
2872
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2873
- if (!id) {
2874
- throw new Error(`Missing required path parameter: id`);
2875
- }
2876
- const data = await request({ method: 'GET', url: `/v6/deployments/${id}/files`, queryParams, ...requestConfig });
2877
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2878
- }
2879
- /**
2880
- * @description Allows to retrieve the content of a file by supplying the file identifier and the deployment unique identifier. The response body will contain a JSON response containing the contents of the file encoded as base64.
2881
- * @summary Get Deployment File Contents
2882
- * {@link /v8/deployments/:id/files/:fileId}
2883
- */
2884
- async function getDeploymentFileContents({ pathParams: { id, fileId }, queryParams, config = {} }) {
2885
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2886
- if (!id) {
2887
- throw new Error(`Missing required path parameter: id`);
2888
- }
2889
- if (!fileId) {
2890
- throw new Error(`Missing required path parameter: fileId`);
2891
- }
2892
- const data = await request({ method: 'GET', url: `/v8/deployments/${id}/files/${fileId}`, queryParams, ...requestConfig });
2893
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2894
- }
2895
- /**
2896
- * @description List deployments under the authenticated user or team. If a deployment hasn't finished uploading (is incomplete), the `url` property will have a value of `null`.
2897
- * @summary List deployments
2898
- * {@link /v6/deployments}
2899
- */
2900
- async function getDeployments({ queryParams, config = {} }) {
2901
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2902
- const data = await request({ method: 'GET', url: `/v6/deployments`, queryParams, ...requestConfig });
2903
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2904
- }
2905
- /**
2906
- * @description 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.
2907
- * @summary Delete a Deployment
2908
- * {@link /v13/deployments/:id}
2909
- */
2910
- async function deleteDeployment({ pathParams: { id }, queryParams, config = {} }) {
2911
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2912
- if (!id) {
2913
- throw new Error(`Missing required path parameter: id`);
2914
- }
2915
- const data = await request({ method: 'DELETE', url: `/v13/deployments/${id}`, queryParams, ...requestConfig });
2916
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2917
- }
2918
- /**
2919
- * @description Retrieves the active Vercel secrets for the authenticated user or team. By default it returns 20 secrets. The rest can be retrieved using the pagination options. The body will contain an entry for each secret.
2920
- * @summary List secrets
2921
- * {@link /v3/secrets}
2922
- */
2923
- async function getSecrets({ queryParams, config = {} }) {
2924
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2925
- const data = await request({ method: 'GET', url: `/v3/secrets`, queryParams, ...requestConfig });
2926
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2927
- }
2928
- /**
2929
- * @description Allows to create a new secret.
2930
- * @summary Create a new secret
2931
- * {@link /v2/secrets/:name}
2932
- */
2933
- async function createSecret({ pathParams: { name }, queryParams, config = {} }) {
2934
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2935
- if (!name) {
2936
- throw new Error(`Missing required path parameter: name`);
2937
- }
2938
- const data = await request({
2939
- method: 'POST',
2940
- url: `/v2/secrets/${name}`,
2941
- queryParams,
2942
- ...requestConfig,
2943
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
2944
- });
2945
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2946
- }
2947
- /**
2948
- * @description Enables to edit the name of a secret. The name has to be unique to the user or team’s secrets.
2949
- * @summary Change secret name
2950
- * {@link /v2/secrets/:name}
2951
- */
2952
- async function renameSecret({ pathParams: { name }, queryParams, config = {} }) {
2953
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2954
- if (!name) {
2955
- throw new Error(`Missing required path parameter: name`);
2956
- }
2957
- const data = await request({
2958
- method: 'PATCH',
2959
- url: `/v2/secrets/${name}`,
2960
- queryParams,
2961
- ...requestConfig,
2962
- headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
2963
- });
2964
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2965
- }
2966
- /**
2967
- * @description Retrieves the information for a specific secret by passing either the secret id or name in the URL.
2968
- * @summary Get a single secret
2969
- * {@link /v3/secrets/:idOrName}
2970
- */
2971
- async function getSecret({ pathParams: { idOrName }, queryParams, config = {} }) {
2972
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2973
- if (!idOrName) {
2974
- throw new Error(`Missing required path parameter: idOrName`);
2975
- }
2976
- const data = await request({ method: 'GET', url: `/v3/secrets/${idOrName}`, queryParams, ...requestConfig });
2977
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2978
- }
2979
- /**
2980
- * @description This deletes the user or team’s secret defined in the URL.
2981
- * @summary Delete a secret
2982
- * {@link /v2/secrets/:idOrName}
2983
- */
2984
- async function deleteSecret({ pathParams: { idOrName }, queryParams, config = {} }) {
2985
- const { client: request = fetcher_1.default, ...requestConfig } = config;
2986
- if (!idOrName) {
2987
- throw new Error(`Missing required path parameter: idOrName`);
2988
- }
2989
- const data = await request({ method: 'DELETE', url: `/v2/secrets/${idOrName}`, queryParams, ...requestConfig });
2990
- return { content: [{ type: 'text', text: JSON.stringify(data) }] };
2991
- }
2992
- function initMcpTools(serverLike, config) {
2993
- const server = serverLike;
2994
- server.tool('readAccessGroup', 'Allows to read an access group', { idOrName: schemas_ts_1.readAccessGroupPathParamsSchema.shape.idOrName, queryParams: schemas_ts_1.readAccessGroupQueryParamsSchema }, async ({ idOrName, queryParams }) => {
2995
- try {
2996
- return await readAccessGroup({ pathParams: { idOrName }, queryParams, config });
2997
- }
2998
- catch (error) {
2999
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3000
- }
3001
- });
3002
- server.tool('updateAccessGroup', 'Allows to update an access group metadata', { idOrName: schemas_ts_1.updateAccessGroupPathParamsSchema.shape.idOrName, queryParams: schemas_ts_1.updateAccessGroupQueryParamsSchema }, async ({ idOrName, queryParams }) => {
3003
- try {
3004
- return await updateAccessGroup({ pathParams: { idOrName }, queryParams, config });
3005
- }
3006
- catch (error) {
3007
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3008
- }
3009
- });
3010
- server.tool('deleteAccessGroup', 'Allows to delete an access group', { idOrName: schemas_ts_1.deleteAccessGroupPathParamsSchema.shape.idOrName, queryParams: schemas_ts_1.deleteAccessGroupQueryParamsSchema }, async ({ idOrName, queryParams }) => {
3011
- try {
3012
- return await deleteAccessGroup({ pathParams: { idOrName }, queryParams, config });
3013
- }
3014
- catch (error) {
3015
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3016
- }
3017
- });
3018
- server.tool('listAccessGroupMembers', 'List members of an access group', {
3019
- idOrName: schemas_ts_1.listAccessGroupMembersPathParamsSchema.shape.idOrName,
3020
- queryParams: schemas_ts_1.listAccessGroupMembersQueryParamsSchema
3021
- }, async ({ idOrName, queryParams }) => {
3022
- try {
3023
- return await listAccessGroupMembers({ pathParams: { idOrName }, queryParams, config });
3024
- }
3025
- catch (error) {
3026
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3027
- }
3028
- });
3029
- server.tool('listAccessGroups', 'List access groups', { queryParams: schemas_ts_1.listAccessGroupsQueryParamsSchema }, async ({ queryParams }) => {
3030
- try {
3031
- return await listAccessGroups({ queryParams, config });
3032
- }
3033
- catch (error) {
3034
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3035
- }
3036
- });
3037
- server.tool('createAccessGroup', 'Allows to create an access group', { queryParams: schemas_ts_1.createAccessGroupQueryParamsSchema }, async ({ queryParams }) => {
3038
- try {
3039
- return await createAccessGroup({ queryParams, config });
3040
- }
3041
- catch (error) {
3042
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3043
- }
3044
- });
3045
- server.tool('listAccessGroupProjects', 'List projects of an access group', {
3046
- idOrName: schemas_ts_1.listAccessGroupProjectsPathParamsSchema.shape.idOrName,
3047
- queryParams: schemas_ts_1.listAccessGroupProjectsQueryParamsSchema
3048
- }, async ({ idOrName, queryParams }) => {
3049
- try {
3050
- return await listAccessGroupProjects({ pathParams: { idOrName }, queryParams, config });
3051
- }
3052
- catch (error) {
3053
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3054
- }
3055
- });
3056
- server.tool('createAccessGroupProject', 'Allows creation of an access group project', {
3057
- accessGroupIdOrName: schemas_ts_1.createAccessGroupProjectPathParamsSchema.shape.accessGroupIdOrName,
3058
- queryParams: schemas_ts_1.createAccessGroupProjectQueryParamsSchema
3059
- }, async ({ accessGroupIdOrName, queryParams }) => {
3060
- try {
3061
- return await createAccessGroupProject({ pathParams: { accessGroupIdOrName }, queryParams, config });
3062
- }
3063
- catch (error) {
3064
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3065
- }
3066
- });
3067
- server.tool('readAccessGroupProject', 'Allows reading an access group project', {
3068
- accessGroupIdOrName: schemas_ts_1.readAccessGroupProjectPathParamsSchema.shape.accessGroupIdOrName,
3069
- projectId: schemas_ts_1.readAccessGroupProjectPathParamsSchema.shape.projectId,
3070
- queryParams: schemas_ts_1.readAccessGroupProjectQueryParamsSchema
3071
- }, async ({ accessGroupIdOrName, projectId, queryParams }) => {
3072
- try {
3073
- return await readAccessGroupProject({ pathParams: { accessGroupIdOrName, projectId }, queryParams, config });
3074
- }
3075
- catch (error) {
3076
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3077
- }
3078
- });
3079
- server.tool('updateAccessGroupProject', 'Allows update of an access group project', {
3080
- accessGroupIdOrName: schemas_ts_1.updateAccessGroupProjectPathParamsSchema.shape.accessGroupIdOrName,
3081
- projectId: schemas_ts_1.updateAccessGroupProjectPathParamsSchema.shape.projectId,
3082
- queryParams: schemas_ts_1.updateAccessGroupProjectQueryParamsSchema
3083
- }, async ({ accessGroupIdOrName, projectId, queryParams }) => {
3084
- try {
3085
- return await updateAccessGroupProject({ pathParams: { accessGroupIdOrName, projectId }, queryParams, config });
3086
- }
3087
- catch (error) {
3088
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3089
- }
3090
- });
3091
- server.tool('deleteAccessGroupProject', 'Allows deletion of an access group project', {
3092
- accessGroupIdOrName: schemas_ts_1.deleteAccessGroupProjectPathParamsSchema.shape.accessGroupIdOrName,
3093
- projectId: schemas_ts_1.deleteAccessGroupProjectPathParamsSchema.shape.projectId,
3094
- queryParams: schemas_ts_1.deleteAccessGroupProjectQueryParamsSchema
3095
- }, async ({ accessGroupIdOrName, projectId, queryParams }) => {
3096
- try {
3097
- return await deleteAccessGroupProject({ pathParams: { accessGroupIdOrName, projectId }, queryParams, config });
3098
- }
3099
- catch (error) {
3100
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3101
- }
3102
- });
3103
- server.tool('recordEvents', '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.', { queryParams: schemas_ts_1.recordEventsQueryParamsSchema, headers: schemas_ts_1.recordEventsHeaderParamsSchema }, async ({ queryParams, headers }) => {
3104
- try {
3105
- return await recordEvents({ queryParams, headers, config });
3106
- }
3107
- catch (error) {
3108
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3109
- }
3110
- });
3111
- server.tool('status', '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.', { queryParams: schemas_ts_1.statusQueryParamsSchema }, async ({ queryParams }) => {
3112
- try {
3113
- return await status({ queryParams, config });
3114
- }
3115
- catch (error) {
3116
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3117
- }
3118
- });
3119
- server.tool('uploadArtifact', 'Uploads a cache artifact identified by the `hash` specified on the path. The cache artifact can then be downloaded with the provided `hash`.', {
3120
- hash: schemas_ts_1.uploadArtifactPathParamsSchema.shape.hash,
3121
- headers: schemas_ts_1.uploadArtifactHeaderParamsSchema,
3122
- queryParams: schemas_ts_1.uploadArtifactQueryParamsSchema
3123
- }, async ({ hash, headers, queryParams }) => {
3124
- try {
3125
- return await uploadArtifact({ pathParams: { hash }, headers, queryParams, config });
3126
- }
3127
- catch (error) {
3128
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3129
- }
3130
- });
3131
- server.tool('downloadArtifact', '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.', {
3132
- hash: schemas_ts_1.downloadArtifactPathParamsSchema.shape.hash,
3133
- queryParams: schemas_ts_1.downloadArtifactQueryParamsSchema,
3134
- headers: schemas_ts_1.downloadArtifactHeaderParamsSchema
3135
- }, async ({ hash, queryParams, headers }) => {
3136
- try {
3137
- return await downloadArtifact({ pathParams: { hash }, queryParams, headers, config });
3138
- }
3139
- catch (error) {
3140
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3141
- }
3142
- });
3143
- server.tool('artifactQuery', 'Query information about an array of artifacts.', { queryParams: schemas_ts_1.artifactQueryQueryParamsSchema }, async ({ queryParams }) => {
3144
- try {
3145
- return await artifactQuery({ queryParams, config });
3146
- }
3147
- catch (error) {
3148
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3149
- }
3150
- });
3151
- server.tool('createCheck', 'Creates a new check. This endpoint must be called with an OAuth2 or it will produce a 400 error.', { deploymentId: schemas_ts_1.createCheckPathParamsSchema.shape.deploymentId, queryParams: schemas_ts_1.createCheckQueryParamsSchema }, async ({ deploymentId, queryParams }) => {
3152
- try {
3153
- return await createCheck({ pathParams: { deploymentId }, queryParams, config });
3154
- }
3155
- catch (error) {
3156
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3157
- }
3158
- });
3159
- server.tool('getAllChecks', 'List all of the checks created for a deployment.', { deploymentId: schemas_ts_1.getAllChecksPathParamsSchema.shape.deploymentId, queryParams: schemas_ts_1.getAllChecksQueryParamsSchema }, async ({ deploymentId, queryParams }) => {
3160
- try {
3161
- return await getAllChecks({ pathParams: { deploymentId }, queryParams, config });
3162
- }
3163
- catch (error) {
3164
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3165
- }
3166
- });
3167
- server.tool('getCheck', 'Return a detailed response for a single check.', {
3168
- deploymentId: schemas_ts_1.getCheckPathParamsSchema.shape.deploymentId,
3169
- checkId: schemas_ts_1.getCheckPathParamsSchema.shape.checkId,
3170
- queryParams: schemas_ts_1.getCheckQueryParamsSchema
3171
- }, async ({ deploymentId, checkId, queryParams }) => {
3172
- try {
3173
- return await getCheck({ pathParams: { deploymentId, checkId }, queryParams, config });
3174
- }
3175
- catch (error) {
3176
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3177
- }
3178
- });
3179
- server.tool('updateCheck', 'Update an existing check. This endpoint must be called with an OAuth2 or it will produce a 400 error.', {
3180
- deploymentId: schemas_ts_1.updateCheckPathParamsSchema.shape.deploymentId,
3181
- checkId: schemas_ts_1.updateCheckPathParamsSchema.shape.checkId,
3182
- queryParams: schemas_ts_1.updateCheckQueryParamsSchema
3183
- }, async ({ deploymentId, checkId, queryParams }) => {
3184
- try {
3185
- return await updateCheck({ pathParams: { deploymentId, checkId }, queryParams, config });
3186
- }
3187
- catch (error) {
3188
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3189
- }
3190
- });
3191
- server.tool('rerequestCheck', 'Rerequest a selected check that has failed.', {
3192
- deploymentId: schemas_ts_1.rerequestCheckPathParamsSchema.shape.deploymentId,
3193
- checkId: schemas_ts_1.rerequestCheckPathParamsSchema.shape.checkId,
3194
- queryParams: schemas_ts_1.rerequestCheckQueryParamsSchema
3195
- }, async ({ deploymentId, checkId, queryParams }) => {
3196
- try {
3197
- return await rerequestCheck({ pathParams: { deploymentId, checkId }, queryParams, config });
3198
- }
3199
- catch (error) {
3200
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3201
- }
3202
- });
3203
- server.tool('purgeAllDataCache', 'Make a DELETE request to /data-cache/purge-all', { queryParams: schemas_ts_1.purgeAllDataCacheQueryParamsSchema }, async ({ queryParams }) => {
3204
- try {
3205
- return await purgeAllDataCache({ queryParams, config });
3206
- }
3207
- catch (error) {
3208
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3209
- }
3210
- });
3211
- server.tool('updateDataCacheBillingSettings', 'Make a PATCH request to /data-cache/billing-settings', async () => {
3212
- try {
3213
- return await updateDataCacheBillingSettings({ config });
3214
- }
3215
- catch (error) {
3216
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3217
- }
3218
- });
3219
- server.tool('updateProjectDataCache', 'Update the data cache feature on a project.', {
3220
- projectId: schemas_ts_1.updateProjectDataCachePathParamsSchema.shape.projectId,
3221
- queryParams: schemas_ts_1.updateProjectDataCacheQueryParamsSchema
3222
- }, async ({ projectId, queryParams }) => {
3223
- try {
3224
- return await updateProjectDataCache({ pathParams: { projectId }, queryParams, config });
3225
- }
3226
- catch (error) {
3227
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3228
- }
3229
- });
3230
- server.tool('getDeploymentEvents', '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.', {
3231
- idOrUrl: schemas_ts_1.getDeploymentEventsPathParamsSchema.shape.idOrUrl,
3232
- queryParams: schemas_ts_1.getDeploymentEventsQueryParamsSchema
3233
- }, async ({ idOrUrl, queryParams }) => {
3234
- try {
3235
- return await getDeploymentEvents({ pathParams: { idOrUrl }, queryParams, config });
3236
- }
3237
- catch (error) {
3238
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3239
- }
3240
- });
3241
- server.tool('updateIntegrationDeploymentAction', 'Updates the deployment integration action for the specified integration installation', {
3242
- deploymentId: schemas_ts_1.updateIntegrationDeploymentActionPathParamsSchema.shape.deploymentId,
3243
- integrationConfigurationId: schemas_ts_1.updateIntegrationDeploymentActionPathParamsSchema.shape.integrationConfigurationId,
3244
- resourceId: schemas_ts_1.updateIntegrationDeploymentActionPathParamsSchema.shape.resourceId,
3245
- action: schemas_ts_1.updateIntegrationDeploymentActionPathParamsSchema.shape.action
3246
- }, async ({ deploymentId, integrationConfigurationId, resourceId, action }) => {
3247
- try {
3248
- return await updateIntegrationDeploymentAction({
3249
- pathParams: { deploymentId, integrationConfigurationId, resourceId, action },
3250
- config
3251
- });
3252
- }
3253
- catch (error) {
3254
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3255
- }
3256
- });
3257
- server.tool('getDeployment', '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 or team is an owner of the deployment.', { idOrUrl: schemas_ts_1.getDeploymentPathParamsSchema.shape.idOrUrl, queryParams: schemas_ts_1.getDeploymentQueryParamsSchema }, async ({ idOrUrl, queryParams }) => {
3258
- try {
3259
- return await getDeployment({ pathParams: { idOrUrl }, queryParams, config });
3260
- }
3261
- catch (error) {
3262
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3263
- }
3264
- });
3265
- server.tool('createDeployment', '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.', { queryParams: schemas_ts_1.createDeploymentQueryParamsSchema }, async ({ queryParams }) => {
3266
- try {
3267
- return await createDeployment({ queryParams, config });
3268
- }
3269
- catch (error) {
3270
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3271
- }
3272
- });
3273
- server.tool('cancelDeployment', 'This endpoint allows you to cancel a deployment which is currently building, by supplying its `id` in the URL.', { id: schemas_ts_1.cancelDeploymentPathParamsSchema.shape.id, queryParams: schemas_ts_1.cancelDeploymentQueryParamsSchema }, async ({ id, queryParams }) => {
3274
- try {
3275
- return await cancelDeployment({ pathParams: { id }, queryParams, config });
3276
- }
3277
- catch (error) {
3278
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3279
- }
3280
- });
3281
- server.tool('buyDomain', 'Allows to purchase the specified domain.', { queryParams: schemas_ts_1.buyDomainQueryParamsSchema }, async ({ queryParams }) => {
3282
- try {
3283
- return await buyDomain({ queryParams, config });
3284
- }
3285
- catch (error) {
3286
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3287
- }
3288
- });
3289
- server.tool('checkDomainPrice', 'Check the price to purchase a domain and how long a single purchase period is.', { queryParams: schemas_ts_1.checkDomainPriceQueryParamsSchema }, async ({ queryParams }) => {
3290
- try {
3291
- return await checkDomainPrice({ queryParams, config });
3292
- }
3293
- catch (error) {
3294
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3295
- }
3296
- });
3297
- server.tool('checkDomainStatus', 'Check if a domain name is available for purchase.', { queryParams: schemas_ts_1.checkDomainStatusQueryParamsSchema }, async ({ queryParams }) => {
3298
- try {
3299
- return await checkDomainStatus({ queryParams, config });
3300
- }
3301
- catch (error) {
3302
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3303
- }
3304
- });
3305
- server.tool('getRecords', '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.', { domain: schemas_ts_1.getRecordsPathParamsSchema.shape.domain, queryParams: schemas_ts_1.getRecordsQueryParamsSchema }, async ({ domain, queryParams }) => {
3306
- try {
3307
- return await getRecords({ pathParams: { domain }, queryParams, config });
3308
- }
3309
- catch (error) {
3310
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3311
- }
3312
- });
3313
- server.tool('createRecord', 'Creates a DNS record for a domain.', { domain: schemas_ts_1.createRecordPathParamsSchema.shape.domain, queryParams: schemas_ts_1.createRecordQueryParamsSchema }, async ({ domain, queryParams }) => {
3314
- try {
3315
- return await createRecord({ pathParams: { domain }, queryParams, config });
3316
- }
3317
- catch (error) {
3318
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3319
- }
3320
- });
3321
- server.tool('updateRecord', 'Updates an existing DNS record for a domain name.', { recordId: schemas_ts_1.updateRecordPathParamsSchema.shape.recordId, queryParams: schemas_ts_1.updateRecordQueryParamsSchema }, async ({ recordId, queryParams }) => {
3322
- try {
3323
- return await updateRecord({ pathParams: { recordId }, queryParams, config });
3324
- }
3325
- catch (error) {
3326
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3327
- }
3328
- });
3329
- server.tool('removeRecord', 'Removes an existing DNS record from a domain name.', {
3330
- domain: schemas_ts_1.removeRecordPathParamsSchema.shape.domain,
3331
- recordId: schemas_ts_1.removeRecordPathParamsSchema.shape.recordId,
3332
- queryParams: schemas_ts_1.removeRecordQueryParamsSchema
3333
- }, async ({ domain, recordId, queryParams }) => {
3334
- try {
3335
- return await removeRecord({ pathParams: { domain, recordId }, queryParams, config });
3336
- }
3337
- catch (error) {
3338
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3339
- }
3340
- });
3341
- server.tool('getDomainTransfer', 'Fetch domain transfer availability or transfer status if a transfer is in progress.', { domain: schemas_ts_1.getDomainTransferPathParamsSchema.shape.domain, queryParams: schemas_ts_1.getDomainTransferQueryParamsSchema }, async ({ domain, queryParams }) => {
3342
- try {
3343
- return await getDomainTransfer({ pathParams: { domain }, queryParams, config });
3344
- }
3345
- catch (error) {
3346
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3347
- }
3348
- });
3349
- server.tool('getDomainConfig', "Get a Domain's configuration.", { domain: schemas_ts_1.getDomainConfigPathParamsSchema.shape.domain, queryParams: schemas_ts_1.getDomainConfigQueryParamsSchema }, async ({ domain, queryParams }) => {
3350
- try {
3351
- return await getDomainConfig({ pathParams: { domain }, queryParams, config });
3352
- }
3353
- catch (error) {
3354
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3355
- }
3356
- });
3357
- server.tool('getDomain', 'Get information for a single domain in an account or team.', { domain: schemas_ts_1.getDomainPathParamsSchema.shape.domain, queryParams: schemas_ts_1.getDomainQueryParamsSchema }, async ({ domain, queryParams }) => {
3358
- try {
3359
- return await getDomain({ pathParams: { domain }, queryParams, config });
3360
- }
3361
- catch (error) {
3362
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3363
- }
3364
- });
3365
- server.tool('getDomains', 'Retrieves a list of domains registered for the authenticated user or team. By default it returns the last 20 domains if no limit is provided.', { queryParams: schemas_ts_1.getDomainsQueryParamsSchema }, async ({ queryParams }) => {
3366
- try {
3367
- return await getDomains({ queryParams, config });
3368
- }
3369
- catch (error) {
3370
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3371
- }
3372
- });
3373
- server.tool('createOrTransferDomain', 'This endpoint is used for adding a new apex domain name with Vercel for the authenticating user. Can also be used for initiating a domain transfer request from an external Registrar to Vercel.', { queryParams: schemas_ts_1.createOrTransferDomainQueryParamsSchema }, async ({ queryParams }) => {
3374
- try {
3375
- return await createOrTransferDomain({ queryParams, config });
3376
- }
3377
- catch (error) {
3378
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3379
- }
3380
- });
3381
- server.tool('patchDomain', 'Update or move apex domain.', { domain: schemas_ts_1.patchDomainPathParamsSchema.shape.domain, queryParams: schemas_ts_1.patchDomainQueryParamsSchema }, async ({ domain, queryParams }) => {
3382
- try {
3383
- return await patchDomain({ pathParams: { domain }, queryParams, config });
3384
- }
3385
- catch (error) {
3386
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3387
- }
3388
- });
3389
- server.tool('deleteDomain', 'Delete a previously registered domain name from Vercel. Deleting a domain will automatically remove any associated aliases.', { domain: schemas_ts_1.deleteDomainPathParamsSchema.shape.domain, queryParams: schemas_ts_1.deleteDomainQueryParamsSchema }, async ({ domain, queryParams }) => {
3390
- try {
3391
- return await deleteDomain({ pathParams: { domain }, queryParams, config });
3392
- }
3393
- catch (error) {
3394
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3395
- }
3396
- });
3397
- server.tool('getEdgeConfigs', 'Returns all Edge Configs.', { queryParams: schemas_ts_1.getEdgeConfigsQueryParamsSchema }, async ({ queryParams }) => {
3398
- try {
3399
- return await getEdgeConfigs({ queryParams, config });
3400
- }
3401
- catch (error) {
3402
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3403
- }
3404
- });
3405
- server.tool('createEdgeConfig', 'Creates an Edge Config.', { queryParams: schemas_ts_1.createEdgeConfigQueryParamsSchema }, async ({ queryParams }) => {
3406
- try {
3407
- return await createEdgeConfig({ queryParams, config });
3408
- }
3409
- catch (error) {
3410
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3411
- }
3412
- });
3413
- server.tool('getEdgeConfig', 'Returns an Edge Config.', { edgeConfigId: schemas_ts_1.getEdgeConfigPathParamsSchema.shape.edgeConfigId, queryParams: schemas_ts_1.getEdgeConfigQueryParamsSchema }, async ({ edgeConfigId, queryParams }) => {
3414
- try {
3415
- return await getEdgeConfig({ pathParams: { edgeConfigId }, queryParams, config });
3416
- }
3417
- catch (error) {
3418
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3419
- }
3420
- });
3421
- server.tool('updateEdgeConfig', 'Updates an Edge Config.', {
3422
- edgeConfigId: schemas_ts_1.updateEdgeConfigPathParamsSchema.shape.edgeConfigId,
3423
- queryParams: schemas_ts_1.updateEdgeConfigQueryParamsSchema
3424
- }, async ({ edgeConfigId, queryParams }) => {
3425
- try {
3426
- return await updateEdgeConfig({ pathParams: { edgeConfigId }, queryParams, config });
3427
- }
3428
- catch (error) {
3429
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3430
- }
3431
- });
3432
- server.tool('deleteEdgeConfig', 'Delete an Edge Config by id.', {
3433
- edgeConfigId: schemas_ts_1.deleteEdgeConfigPathParamsSchema.shape.edgeConfigId,
3434
- queryParams: schemas_ts_1.deleteEdgeConfigQueryParamsSchema
3435
- }, async ({ edgeConfigId, queryParams }) => {
3436
- try {
3437
- return await deleteEdgeConfig({ pathParams: { edgeConfigId }, queryParams, config });
3438
- }
3439
- catch (error) {
3440
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3441
- }
3442
- });
3443
- server.tool('getEdgeConfigItems', 'Returns all items of an Edge Config.', {
3444
- edgeConfigId: schemas_ts_1.getEdgeConfigItemsPathParamsSchema.shape.edgeConfigId,
3445
- queryParams: schemas_ts_1.getEdgeConfigItemsQueryParamsSchema
3446
- }, async ({ edgeConfigId, queryParams }) => {
3447
- try {
3448
- return await getEdgeConfigItems({ pathParams: { edgeConfigId }, queryParams, config });
3449
- }
3450
- catch (error) {
3451
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3452
- }
3453
- });
3454
- server.tool('patchEdgeConfigItems', 'Update multiple Edge Config Items in batch.', {
3455
- edgeConfigId: schemas_ts_1.patchEdgeConfigItemsPathParamsSchema.shape.edgeConfigId,
3456
- queryParams: schemas_ts_1.patchEdgeConfigItemsQueryParamsSchema
3457
- }, async ({ edgeConfigId, queryParams }) => {
3458
- try {
3459
- return await patchEdgeConfigItems({ pathParams: { edgeConfigId }, queryParams, config });
3460
- }
3461
- catch (error) {
3462
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3463
- }
3464
- });
3465
- server.tool('getEdgeConfigSchema', 'Returns the schema of an Edge Config.', {
3466
- edgeConfigId: schemas_ts_1.getEdgeConfigSchemaPathParamsSchema.shape.edgeConfigId,
3467
- queryParams: schemas_ts_1.getEdgeConfigSchemaQueryParamsSchema
3468
- }, async ({ edgeConfigId, queryParams }) => {
3469
- try {
3470
- return await getEdgeConfigSchema({ pathParams: { edgeConfigId }, queryParams, config });
3471
- }
3472
- catch (error) {
3473
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3474
- }
3475
- });
3476
- server.tool('patchEdgeConfigSchema', "Update an Edge Config's schema.", {
3477
- edgeConfigId: schemas_ts_1.patchEdgeConfigSchemaPathParamsSchema.shape.edgeConfigId,
3478
- queryParams: schemas_ts_1.patchEdgeConfigSchemaQueryParamsSchema
3479
- }, async ({ edgeConfigId, queryParams }) => {
3480
- try {
3481
- return await patchEdgeConfigSchema({ pathParams: { edgeConfigId }, queryParams, config });
3482
- }
3483
- catch (error) {
3484
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3485
- }
3486
- });
3487
- server.tool('deleteEdgeConfigSchema', 'Deletes the schema of existing Edge Config.', {
3488
- edgeConfigId: schemas_ts_1.deleteEdgeConfigSchemaPathParamsSchema.shape.edgeConfigId,
3489
- queryParams: schemas_ts_1.deleteEdgeConfigSchemaQueryParamsSchema
3490
- }, async ({ edgeConfigId, queryParams }) => {
3491
- try {
3492
- return await deleteEdgeConfigSchema({ pathParams: { edgeConfigId }, queryParams, config });
3493
- }
3494
- catch (error) {
3495
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3496
- }
3497
- });
3498
- server.tool('getEdgeConfigItem', 'Returns a specific Edge Config Item.', {
3499
- edgeConfigId: schemas_ts_1.getEdgeConfigItemPathParamsSchema.shape.edgeConfigId,
3500
- edgeConfigItemKey: schemas_ts_1.getEdgeConfigItemPathParamsSchema.shape.edgeConfigItemKey,
3501
- queryParams: schemas_ts_1.getEdgeConfigItemQueryParamsSchema
3502
- }, async ({ edgeConfigId, edgeConfigItemKey, queryParams }) => {
3503
- try {
3504
- return await getEdgeConfigItem({ pathParams: { edgeConfigId, edgeConfigItemKey }, queryParams, config });
3505
- }
3506
- catch (error) {
3507
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3508
- }
3509
- });
3510
- server.tool('getEdgeConfigTokens', 'Returns all tokens of an Edge Config.', {
3511
- edgeConfigId: schemas_ts_1.getEdgeConfigTokensPathParamsSchema.shape.edgeConfigId,
3512
- queryParams: schemas_ts_1.getEdgeConfigTokensQueryParamsSchema
3513
- }, async ({ edgeConfigId, queryParams }) => {
3514
- try {
3515
- return await getEdgeConfigTokens({ pathParams: { edgeConfigId }, queryParams, config });
3516
- }
3517
- catch (error) {
3518
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3519
- }
3520
- });
3521
- server.tool('deleteEdgeConfigTokens', 'Deletes one or more tokens of an existing Edge Config.', {
3522
- edgeConfigId: schemas_ts_1.deleteEdgeConfigTokensPathParamsSchema.shape.edgeConfigId,
3523
- queryParams: schemas_ts_1.deleteEdgeConfigTokensQueryParamsSchema
3524
- }, async ({ edgeConfigId, queryParams }) => {
3525
- try {
3526
- return await deleteEdgeConfigTokens({ pathParams: { edgeConfigId }, queryParams, config });
3527
- }
3528
- catch (error) {
3529
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3530
- }
3531
- });
3532
- server.tool('getEdgeConfigToken', 'Return meta data about an Edge Config token.', {
3533
- edgeConfigId: schemas_ts_1.getEdgeConfigTokenPathParamsSchema.shape.edgeConfigId,
3534
- token: schemas_ts_1.getEdgeConfigTokenPathParamsSchema.shape.token,
3535
- queryParams: schemas_ts_1.getEdgeConfigTokenQueryParamsSchema
3536
- }, async ({ edgeConfigId, token, queryParams }) => {
3537
- try {
3538
- return await getEdgeConfigToken({ pathParams: { edgeConfigId, token }, queryParams, config });
3539
- }
3540
- catch (error) {
3541
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3542
- }
3543
- });
3544
- server.tool('createEdgeConfigToken', 'Adds a token to an existing Edge Config.', {
3545
- edgeConfigId: schemas_ts_1.createEdgeConfigTokenPathParamsSchema.shape.edgeConfigId,
3546
- queryParams: schemas_ts_1.createEdgeConfigTokenQueryParamsSchema
3547
- }, async ({ edgeConfigId, queryParams }) => {
3548
- try {
3549
- return await createEdgeConfigToken({ pathParams: { edgeConfigId }, queryParams, config });
3550
- }
3551
- catch (error) {
3552
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3553
- }
3554
- });
3555
- server.tool('getEdgeConfigBackup', 'Retrieves a specific version of an Edge Config from backup storage.', {
3556
- edgeConfigId: schemas_ts_1.getEdgeConfigBackupPathParamsSchema.shape.edgeConfigId,
3557
- edgeConfigBackupVersionId: schemas_ts_1.getEdgeConfigBackupPathParamsSchema.shape.edgeConfigBackupVersionId,
3558
- queryParams: schemas_ts_1.getEdgeConfigBackupQueryParamsSchema
3559
- }, async ({ edgeConfigId, edgeConfigBackupVersionId, queryParams }) => {
3560
- try {
3561
- return await getEdgeConfigBackup({
3562
- pathParams: { edgeConfigId, edgeConfigBackupVersionId },
3563
- queryParams,
3564
- config
3565
- });
3566
- }
3567
- catch (error) {
3568
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3569
- }
3570
- });
3571
- server.tool('getEdgeConfigBackups', 'Returns backups of an Edge Config.', {
3572
- edgeConfigId: schemas_ts_1.getEdgeConfigBackupsPathParamsSchema.shape.edgeConfigId,
3573
- queryParams: schemas_ts_1.getEdgeConfigBackupsQueryParamsSchema
3574
- }, async ({ edgeConfigId, queryParams }) => {
3575
- try {
3576
- return await getEdgeConfigBackups({ pathParams: { edgeConfigId }, queryParams, config });
3577
- }
3578
- catch (error) {
3579
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3580
- }
3581
- });
3582
- server.tool('listUserEvents', '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.', { queryParams: schemas_ts_1.listUserEventsQueryParamsSchema }, async ({ queryParams }) => {
3583
- try {
3584
- return await listUserEvents({ queryParams, config });
3585
- }
3586
- catch (error) {
3587
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3588
- }
3589
- });
3590
- server.tool('getAccountInfo', 'Fetches the best account or user’s contact info', { integrationConfigurationId: schemas_ts_1.getAccountInfoPathParamsSchema.shape.integrationConfigurationId }, async ({ integrationConfigurationId }) => {
3591
- try {
3592
- return await getAccountInfo({ pathParams: { integrationConfigurationId }, config });
3593
- }
3594
- catch (error) {
3595
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3596
- }
3597
- });
3598
- server.tool('getMember', 'Returns the member role and other information for a given member ID ("user_id" claim in the SSO OIDC token).', {
3599
- integrationConfigurationId: schemas_ts_1.getMemberPathParamsSchema.shape.integrationConfigurationId,
3600
- memberId: schemas_ts_1.getMemberPathParamsSchema.shape.memberId
3601
- }, async ({ integrationConfigurationId, memberId }) => {
3602
- try {
3603
- return await getMember({ pathParams: { integrationConfigurationId, memberId }, config });
3604
- }
3605
- catch (error) {
3606
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3607
- }
3608
- });
3609
- server.tool('createEvent', "Partner notifies Vercel of any changes made to an Installation or a Resource. Vercel is expected to use `list-resources` and other read APIs to get the new state.<br/> <br/> `resource.updated` event should be dispatched when any state of a resource linked to Vercel is modified by the partner.<br/> `installation.updated` event should be dispatched when an installation's billing plan is changed via the provider instead of Vercel.<br/> <br/> Resource update use cases: <br/> <br/> - The user renames a database in the partner’s application. The partner should dispatch a `resource.updated` event to notify Vercel to update the resource in Vercel’s datastores.<br/> - A resource has been suspended due to a lack of use. The partner should dispatch a `resource.updated` event to notify Vercel to update the resource's status in Vercel's datastores.<br/>", { integrationConfigurationId: schemas_ts_1.createEventPathParamsSchema.shape.integrationConfigurationId }, async ({ integrationConfigurationId }) => {
3610
- try {
3611
- return await createEvent({ pathParams: { integrationConfigurationId }, config });
3612
- }
3613
- catch (error) {
3614
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3615
- }
3616
- });
3617
- server.tool('getIntegrationResources', 'Get all resources for a given installation ID.', { integrationConfigurationId: schemas_ts_1.getIntegrationResourcesPathParamsSchema.shape.integrationConfigurationId }, async ({ integrationConfigurationId }) => {
3618
- try {
3619
- return await getIntegrationResources({ pathParams: { integrationConfigurationId }, config });
3620
- }
3621
- catch (error) {
3622
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3623
- }
3624
- });
3625
- server.tool('getIntegrationResource', 'Get a resource by its partner ID.', {
3626
- integrationConfigurationId: schemas_ts_1.getIntegrationResourcePathParamsSchema.shape.integrationConfigurationId,
3627
- resourceId: schemas_ts_1.getIntegrationResourcePathParamsSchema.shape.resourceId
3628
- }, async ({ integrationConfigurationId, resourceId }) => {
3629
- try {
3630
- return await getIntegrationResource({ pathParams: { integrationConfigurationId, resourceId }, config });
3631
- }
3632
- catch (error) {
3633
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3634
- }
3635
- });
3636
- server.tool('deleteIntegrationResource', 'Delete a resource owned by the selected installation ID.', {
3637
- integrationConfigurationId: schemas_ts_1.deleteIntegrationResourcePathParamsSchema.shape.integrationConfigurationId,
3638
- resourceId: schemas_ts_1.deleteIntegrationResourcePathParamsSchema.shape.resourceId
3639
- }, async ({ integrationConfigurationId, resourceId }) => {
3640
- try {
3641
- return await deleteIntegrationResource({ pathParams: { integrationConfigurationId, resourceId }, config });
3642
- }
3643
- catch (error) {
3644
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3645
- }
3646
- });
3647
- server.tool('importResource', "This endpoint imports (upserts) a resource to Vercel's installation. This may be needed if resources can be independently created on the partner's side and need to be synchronized to Vercel.", {
3648
- integrationConfigurationId: schemas_ts_1.importResourcePathParamsSchema.shape.integrationConfigurationId,
3649
- resourceId: schemas_ts_1.importResourcePathParamsSchema.shape.resourceId
3650
- }, async ({ integrationConfigurationId, resourceId }) => {
3651
- try {
3652
- return await importResource({ pathParams: { integrationConfigurationId, resourceId }, config });
3653
- }
3654
- catch (error) {
3655
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3656
- }
3657
- });
3658
- server.tool('submitBillingData', 'Sends the billing and usage data. The partner should do this at least once a day and ideally once per hour. <br/> Use the `credentials.access_token` we provided in the [Upsert Installation](#upsert-installation) body to authorize this request.', { integrationConfigurationId: schemas_ts_1.submitBillingDataPathParamsSchema.shape.integrationConfigurationId }, async ({ integrationConfigurationId }) => {
3659
- try {
3660
- return await submitBillingData({ pathParams: { integrationConfigurationId }, config });
3661
- }
3662
- catch (error) {
3663
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3664
- }
3665
- });
3666
- server.tool('submitInvoice', "This endpoint allows the partner to submit an invoice to Vercel. The invoice is created in Vercel's billing system and sent to the customer. Depending on the type of billing plan, the invoice can be sent at a time of signup, at the start of the billing period, or at the end of the billing period.<br/> <br/> Use the `credentials.access_token` we provided in the [Upsert Installation](#upsert-installation) body to authorize this request. <br/> There are several limitations to the invoice submission:<br/> <br/> 1. A resource can only be billed once per the billing period and the billing plan.<br/> 2. The billing plan used to bill the resource must have been active for this resource during the billing period.<br/> 3. The billing plan used must be a subscription plan.<br/> 4. The interim usage data must be sent hourly for all types of subscriptions. See [Send subscription billing and usage data](#send-subscription-billing-and-usage-data) API on how to send interim billing and usage data.<br/>", { integrationConfigurationId: schemas_ts_1.submitInvoicePathParamsSchema.shape.integrationConfigurationId }, async ({ integrationConfigurationId }) => {
3667
- try {
3668
- return await submitInvoice({ pathParams: { integrationConfigurationId }, config });
3669
- }
3670
- catch (error) {
3671
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3672
- }
3673
- });
3674
- server.tool('getInvoice', 'Get Invoice details and status for a given invoice ID.<br/> <br/> See Billing Events with Webhooks documentation on how to receive invoice events. This endpoint is used to retrieve the invoice details.', {
3675
- integrationConfigurationId: schemas_ts_1.getInvoicePathParamsSchema.shape.integrationConfigurationId,
3676
- invoiceId: schemas_ts_1.getInvoicePathParamsSchema.shape.invoiceId
3677
- }, async ({ integrationConfigurationId, invoiceId }) => {
3678
- try {
3679
- return await getInvoice({ pathParams: { integrationConfigurationId, invoiceId }, config });
3680
- }
3681
- catch (error) {
3682
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3683
- }
3684
- });
3685
- server.tool('updateInvoice', 'This endpoint allows the partner to request a refund for an invoice to Vercel. The invoice is created using the [Submit Invoice API](#submit-invoice-api).', {
3686
- integrationConfigurationId: schemas_ts_1.updateInvoicePathParamsSchema.shape.integrationConfigurationId,
3687
- invoiceId: schemas_ts_1.updateInvoicePathParamsSchema.shape.invoiceId
3688
- }, async ({ integrationConfigurationId, invoiceId }) => {
3689
- try {
3690
- return await updateInvoice({ pathParams: { integrationConfigurationId, invoiceId }, config });
3691
- }
3692
- catch (error) {
3693
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3694
- }
3695
- });
3696
- server.tool('submitPrepaymentBalances', 'Sends the prepayment balances. The partner should do this at least once a day and ideally once per hour. <br/> Use the `credentials.access_token` we provided in the [Upsert Installation](#upsert-installation) body to authorize this request.', { integrationConfigurationId: schemas_ts_1.submitPrepaymentBalancesPathParamsSchema.shape.integrationConfigurationId }, async ({ integrationConfigurationId }) => {
3697
- try {
3698
- return await submitPrepaymentBalances({ pathParams: { integrationConfigurationId }, config });
3699
- }
3700
- catch (error) {
3701
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3702
- }
3703
- });
3704
- server.tool('updateResourceSecrets', 'This endpoint is deprecated and replaced with the endpoint [Update Resource Secrets](#update-resource-secrets). <br/> This endpoint updates the secrets of a resource. If a resource has projects connected, the connected secrets are updated with the new secrets. The old secrets may still be used by existing connected projects because they are not automatically redeployed. Redeployment is a manual action and must be completed by the user. All new project connections will use the new secrets.<br/> <br/> Use cases for this endpoint:<br/> <br/> - Resetting the credentials of a database in the partner. If the user requests the credentials to be updated in the partner’s application, the partner post the new set of secrets to Vercel, the user should redeploy their application and the expire the old credentials.<br/>', {
3705
- integrationConfigurationId: schemas_ts_1.updateResourceSecretsPathParamsSchema.shape.integrationConfigurationId,
3706
- integrationProductIdOrSlug: schemas_ts_1.updateResourceSecretsPathParamsSchema.shape.integrationProductIdOrSlug,
3707
- resourceId: schemas_ts_1.updateResourceSecretsPathParamsSchema.shape.resourceId
3708
- }, async ({ integrationConfigurationId, integrationProductIdOrSlug, resourceId }) => {
3709
- try {
3710
- return await updateResourceSecrets({
3711
- pathParams: { integrationConfigurationId, integrationProductIdOrSlug, resourceId },
3712
- config
3713
- });
3714
- }
3715
- catch (error) {
3716
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3717
- }
3718
- });
3719
- server.tool('updateResourceSecretsById', 'This endpoint updates the secrets of a resource. If a resource has projects connected, the connected secrets are updated with the new secrets. The old secrets may still be used by existing connected projects because they are not automatically redeployed. Redeployment is a manual action and must be completed by the user. All new project connections will use the new secrets.<br/> <br/> Use cases for this endpoint:<br/> <br/> - Resetting the credentials of a database in the partner. If the user requests the credentials to be updated in the partner’s application, the partner post the new set of secrets to Vercel, the user should redeploy their application and the expire the old credentials.<br/>', {
3720
- integrationConfigurationId: schemas_ts_1.updateResourceSecretsByIdPathParamsSchema.shape.integrationConfigurationId,
3721
- resourceId: schemas_ts_1.updateResourceSecretsByIdPathParamsSchema.shape.resourceId
3722
- }, async ({ integrationConfigurationId, resourceId }) => {
3723
- try {
3724
- return await updateResourceSecretsById({ pathParams: { integrationConfigurationId, resourceId }, config });
3725
- }
3726
- catch (error) {
3727
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3728
- }
3729
- });
3730
- server.tool('getConfigurations', '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.', { queryParams: schemas_ts_1.getConfigurationsQueryParamsSchema }, async ({ queryParams }) => {
3731
- try {
3732
- return await getConfigurations({ queryParams, config });
3733
- }
3734
- catch (error) {
3735
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3736
- }
3737
- });
3738
- server.tool('getConfiguration', '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.', { id: schemas_ts_1.getConfigurationPathParamsSchema.shape.id, queryParams: schemas_ts_1.getConfigurationQueryParamsSchema }, async ({ id, queryParams }) => {
3739
- try {
3740
- return await getConfiguration({ pathParams: { id }, queryParams, config });
3741
- }
3742
- catch (error) {
3743
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3744
- }
3745
- });
3746
- server.tool('deleteConfiguration', '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.', { id: schemas_ts_1.deleteConfigurationPathParamsSchema.shape.id, queryParams: schemas_ts_1.deleteConfigurationQueryParamsSchema }, async ({ id, queryParams }) => {
3747
- try {
3748
- return await deleteConfiguration({ pathParams: { id }, queryParams, config });
3749
- }
3750
- catch (error) {
3751
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3752
- }
3753
- });
3754
- server.tool('exchangeSsoToken', 'During the autorization process, Vercel sends the user to the provider [redirectLoginUrl](https://vercel.com/docs/integrations/create-integration/submit-integration#redirect-login-url), that includes the OAuth authorization `code` parameter. The provider then calls the SSO Token Exchange endpoint with the sent code and receives the OIDC token. They log the user in based on this token and redirects the user back to the Vercel account using deep-link parameters included the redirectLoginUrl. Providers should not persist the returned `id_token` in a database since the token will expire. See [**Authentication with SSO**](https://vercel.com/docs/integrations/create-integration/marketplace-api#authentication-with-sso) for more details.', async () => {
3755
- try {
3756
- return await exchangeSsoToken({ config });
3757
- }
3758
- catch (error) {
3759
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3760
- }
3761
- });
3762
- server.tool('getIntegrationLogDrains', 'Retrieves a list of all Integration log drains that are defined for the authenticated user or team. When using an OAuth2 token, the list is limited to log drains created by the authenticated integration.', { queryParams: schemas_ts_1.getIntegrationLogDrainsQueryParamsSchema }, async ({ queryParams }) => {
3763
- try {
3764
- return await getIntegrationLogDrains({ queryParams, config });
3765
- }
3766
- catch (error) {
3767
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3768
- }
3769
- });
3770
- server.tool('createLogDrain', '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.', { queryParams: schemas_ts_1.createLogDrainQueryParamsSchema }, async ({ queryParams }) => {
3771
- try {
3772
- return await createLogDrain({ queryParams, config });
3773
- }
3774
- catch (error) {
3775
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3776
- }
3777
- });
3778
- server.tool('deleteIntegrationLogDrain', '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.', {
3779
- id: schemas_ts_1.deleteIntegrationLogDrainPathParamsSchema.shape.id,
3780
- queryParams: schemas_ts_1.deleteIntegrationLogDrainQueryParamsSchema
3781
- }, async ({ id, queryParams }) => {
3782
- try {
3783
- return await deleteIntegrationLogDrain({ pathParams: { id }, queryParams, config });
3784
- }
3785
- catch (error) {
3786
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3787
- }
3788
- });
3789
- server.tool('getRuntimeLogs', 'Returns a stream of logs for a given deployment.', {
3790
- projectId: schemas_ts_1.getRuntimeLogsPathParamsSchema.shape.projectId,
3791
- deploymentId: schemas_ts_1.getRuntimeLogsPathParamsSchema.shape.deploymentId,
3792
- queryParams: schemas_ts_1.getRuntimeLogsQueryParamsSchema
3793
- }, async ({ projectId, deploymentId, queryParams }) => {
3794
- try {
3795
- return await getRuntimeLogs({ pathParams: { projectId, deploymentId }, queryParams, config });
3796
- }
3797
- catch (error) {
3798
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3799
- }
3800
- });
3801
- server.tool('createExperimentationItem', 'Create one or multiple experimentation items', {
3802
- integrationConfigurationId: schemas_ts_1.createExperimentationItemPathParamsSchema.shape.integrationConfigurationId,
3803
- resourceId: schemas_ts_1.createExperimentationItemPathParamsSchema.shape.resourceId
3804
- }, async ({ integrationConfigurationId, resourceId }) => {
3805
- try {
3806
- return await createExperimentationItem({ pathParams: { integrationConfigurationId, resourceId }, config });
3807
- }
3808
- catch (error) {
3809
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3810
- }
3811
- });
3812
- server.tool('updateExperimentationItem', 'Patch an existing experimentation item', {
3813
- integrationConfigurationId: schemas_ts_1.updateExperimentationItemPathParamsSchema.shape.integrationConfigurationId,
3814
- resourceId: schemas_ts_1.updateExperimentationItemPathParamsSchema.shape.resourceId,
3815
- itemId: schemas_ts_1.updateExperimentationItemPathParamsSchema.shape.itemId
3816
- }, async ({ integrationConfigurationId, resourceId, itemId }) => {
3817
- try {
3818
- return await updateExperimentationItem({
3819
- pathParams: { integrationConfigurationId, resourceId, itemId },
3820
- config
3821
- });
3822
- }
3823
- catch (error) {
3824
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3825
- }
3826
- });
3827
- server.tool('deleteExperimentationItem', 'Delete an existing experimentation item', {
3828
- integrationConfigurationId: schemas_ts_1.deleteExperimentationItemPathParamsSchema.shape.integrationConfigurationId,
3829
- resourceId: schemas_ts_1.deleteExperimentationItemPathParamsSchema.shape.resourceId,
3830
- itemId: schemas_ts_1.deleteExperimentationItemPathParamsSchema.shape.itemId
3831
- }, async ({ integrationConfigurationId, resourceId, itemId }) => {
3832
- try {
3833
- return await deleteExperimentationItem({
3834
- pathParams: { integrationConfigurationId, resourceId, itemId },
3835
- config
3836
- });
3837
- }
3838
- catch (error) {
3839
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3840
- }
3841
- });
3842
- server.tool('updateExperimentationEdgeConfig', 'When the user enabled Edge Config syncing, then this endpoint can be used by the partner to push their configuration data into the relevant Edge Config.', {
3843
- integrationConfigurationId: schemas_ts_1.updateExperimentationEdgeConfigPathParamsSchema.shape.integrationConfigurationId,
3844
- resourceId: schemas_ts_1.updateExperimentationEdgeConfigPathParamsSchema.shape.resourceId
3845
- }, async ({ integrationConfigurationId, resourceId }) => {
3846
- try {
3847
- return await updateExperimentationEdgeConfig({
3848
- pathParams: { integrationConfigurationId, resourceId },
3849
- config
3850
- });
3851
- }
3852
- catch (error) {
3853
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3854
- }
3855
- });
3856
- server.tool('getProjectMembers', 'Lists all members of a project.', { idOrName: schemas_ts_1.getProjectMembersPathParamsSchema.shape.idOrName, queryParams: schemas_ts_1.getProjectMembersQueryParamsSchema }, async ({ idOrName, queryParams }) => {
3857
- try {
3858
- return await getProjectMembers({ pathParams: { idOrName }, queryParams, config });
3859
- }
3860
- catch (error) {
3861
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3862
- }
3863
- });
3864
- server.tool('addProjectMember', 'Adds a new member to the project.', { idOrName: schemas_ts_1.addProjectMemberPathParamsSchema.shape.idOrName, queryParams: schemas_ts_1.addProjectMemberQueryParamsSchema }, async ({ idOrName, queryParams }) => {
3865
- try {
3866
- return await addProjectMember({ pathParams: { idOrName }, queryParams, config });
3867
- }
3868
- catch (error) {
3869
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3870
- }
3871
- });
3872
- server.tool('removeProjectMember', 'Remove a member from a specific project', {
3873
- idOrName: schemas_ts_1.removeProjectMemberPathParamsSchema.shape.idOrName,
3874
- uid: schemas_ts_1.removeProjectMemberPathParamsSchema.shape.uid,
3875
- queryParams: schemas_ts_1.removeProjectMemberQueryParamsSchema
3876
- }, async ({ idOrName, uid, queryParams }) => {
3877
- try {
3878
- return await removeProjectMember({ pathParams: { idOrName, uid }, queryParams, config });
3879
- }
3880
- catch (error) {
3881
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3882
- }
3883
- });
3884
- server.tool('getProjects', 'Allows to retrieve the list of projects of the authenticated user or team. The list will be paginated and the provided query parameters allow filtering the returned projects.', { queryParams: schemas_ts_1.getProjectsQueryParamsSchema }, async ({ queryParams }) => {
3885
- try {
3886
- return await getProjects({ queryParams, config });
3887
- }
3888
- catch (error) {
3889
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3890
- }
3891
- });
3892
- server.tool('createProject', '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.', { queryParams: schemas_ts_1.createProjectQueryParamsSchema }, async ({ queryParams }) => {
3893
- try {
3894
- return await createProject({ queryParams, config });
3895
- }
3896
- catch (error) {
3897
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3898
- }
3899
- });
3900
- server.tool('getProject', 'Get the information for a specific project by passing either the project `id` or `name` in the URL.', { idOrName: schemas_ts_1.getProjectPathParamsSchema.shape.idOrName, queryParams: schemas_ts_1.getProjectQueryParamsSchema }, async ({ idOrName, queryParams }) => {
3901
- try {
3902
- return await getProject({ pathParams: { idOrName }, queryParams, config });
3903
- }
3904
- catch (error) {
3905
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3906
- }
3907
- });
3908
- server.tool('updateProject', 'Update the fields of a project using either its `name` or `id`.', { idOrName: schemas_ts_1.updateProjectPathParamsSchema.shape.idOrName, queryParams: schemas_ts_1.updateProjectQueryParamsSchema }, async ({ idOrName, queryParams }) => {
3909
- try {
3910
- return await updateProject({ pathParams: { idOrName }, queryParams, config });
3911
- }
3912
- catch (error) {
3913
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3914
- }
3915
- });
3916
- server.tool('deleteProject', 'Delete a specific project by passing either the project `id` or `name` in the URL.', { idOrName: schemas_ts_1.deleteProjectPathParamsSchema.shape.idOrName, queryParams: schemas_ts_1.deleteProjectQueryParamsSchema }, async ({ idOrName, queryParams }) => {
3917
- try {
3918
- return await deleteProject({ pathParams: { idOrName }, queryParams, config });
3919
- }
3920
- catch (error) {
3921
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3922
- }
3923
- });
3924
- server.tool('createCustomEnvironment', "Creates a custom environment for the current project. Cannot be named 'Production' or 'Preview'.", {
3925
- idOrName: schemas_ts_1.createCustomEnvironmentPathParamsSchema.shape.idOrName,
3926
- queryParams: schemas_ts_1.createCustomEnvironmentQueryParamsSchema
3927
- }, async ({ idOrName, queryParams }) => {
3928
- try {
3929
- return await createCustomEnvironment({ pathParams: { idOrName }, queryParams, config });
3930
- }
3931
- catch (error) {
3932
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3933
- }
3934
- });
3935
- server.tool('listCustomEnvironments', "Retrieve custom environments for the project. Must not be named 'Production' or 'Preview'.", {
3936
- idOrName: schemas_ts_1.listCustomEnvironmentsPathParamsSchema.shape.idOrName,
3937
- queryParams: schemas_ts_1.listCustomEnvironmentsQueryParamsSchema
3938
- }, async ({ idOrName, queryParams }) => {
3939
- try {
3940
- return await listCustomEnvironments({ pathParams: { idOrName }, queryParams, config });
3941
- }
3942
- catch (error) {
3943
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3944
- }
3945
- });
3946
- server.tool('getCustomEnvironment', "Retrieve a custom environment for the project. Must not be named 'Production' or 'Preview'.", {
3947
- idOrName: schemas_ts_1.getCustomEnvironmentPathParamsSchema.shape.idOrName,
3948
- environmentSlugOrId: schemas_ts_1.getCustomEnvironmentPathParamsSchema.shape.environmentSlugOrId,
3949
- queryParams: schemas_ts_1.getCustomEnvironmentQueryParamsSchema
3950
- }, async ({ idOrName, environmentSlugOrId, queryParams }) => {
3951
- try {
3952
- return await getCustomEnvironment({ pathParams: { idOrName, environmentSlugOrId }, queryParams, config });
3953
- }
3954
- catch (error) {
3955
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3956
- }
3957
- });
3958
- server.tool('updateCustomEnvironment', "Update a custom environment for the project. Must not be named 'Production' or 'Preview'.", {
3959
- idOrName: schemas_ts_1.updateCustomEnvironmentPathParamsSchema.shape.idOrName,
3960
- environmentSlugOrId: schemas_ts_1.updateCustomEnvironmentPathParamsSchema.shape.environmentSlugOrId,
3961
- queryParams: schemas_ts_1.updateCustomEnvironmentQueryParamsSchema
3962
- }, async ({ idOrName, environmentSlugOrId, queryParams }) => {
3963
- try {
3964
- return await updateCustomEnvironment({ pathParams: { idOrName, environmentSlugOrId }, queryParams, config });
3965
- }
3966
- catch (error) {
3967
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3968
- }
3969
- });
3970
- server.tool('removeCustomEnvironment', "Remove a custom environment for the project. Must not be named 'Production' or 'Preview'.", {
3971
- idOrName: schemas_ts_1.removeCustomEnvironmentPathParamsSchema.shape.idOrName,
3972
- environmentSlugOrId: schemas_ts_1.removeCustomEnvironmentPathParamsSchema.shape.environmentSlugOrId,
3973
- queryParams: schemas_ts_1.removeCustomEnvironmentQueryParamsSchema
3974
- }, async ({ idOrName, environmentSlugOrId, queryParams }) => {
3975
- try {
3976
- return await removeCustomEnvironment({ pathParams: { idOrName, environmentSlugOrId }, queryParams, config });
3977
- }
3978
- catch (error) {
3979
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3980
- }
3981
- });
3982
- server.tool('getProjectDomains', 'Retrieve the domains associated with a given project by passing either the project `id` or `name` in the URL.', { idOrName: schemas_ts_1.getProjectDomainsPathParamsSchema.shape.idOrName, queryParams: schemas_ts_1.getProjectDomainsQueryParamsSchema }, async ({ idOrName, queryParams }) => {
3983
- try {
3984
- return await getProjectDomains({ pathParams: { idOrName }, queryParams, config });
3985
- }
3986
- catch (error) {
3987
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
3988
- }
3989
- });
3990
- server.tool('getProjectDomain', 'Get project domain by project id/name and domain name.', {
3991
- idOrName: schemas_ts_1.getProjectDomainPathParamsSchema.shape.idOrName,
3992
- domain: schemas_ts_1.getProjectDomainPathParamsSchema.shape.domain,
3993
- queryParams: schemas_ts_1.getProjectDomainQueryParamsSchema
3994
- }, async ({ idOrName, domain, queryParams }) => {
3995
- try {
3996
- return await getProjectDomain({ pathParams: { idOrName, domain }, queryParams, config });
3997
- }
3998
- catch (error) {
3999
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4000
- }
4001
- });
4002
- server.tool('updateProjectDomain', "Update a project domain's configuration, including the name, git branch and redirect of the domain.", {
4003
- idOrName: schemas_ts_1.updateProjectDomainPathParamsSchema.shape.idOrName,
4004
- domain: schemas_ts_1.updateProjectDomainPathParamsSchema.shape.domain,
4005
- queryParams: schemas_ts_1.updateProjectDomainQueryParamsSchema
4006
- }, async ({ idOrName, domain, queryParams }) => {
4007
- try {
4008
- return await updateProjectDomain({ pathParams: { idOrName, domain }, queryParams, config });
4009
- }
4010
- catch (error) {
4011
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4012
- }
4013
- });
4014
- server.tool('removeProjectDomain', '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.', {
4015
- idOrName: schemas_ts_1.removeProjectDomainPathParamsSchema.shape.idOrName,
4016
- domain: schemas_ts_1.removeProjectDomainPathParamsSchema.shape.domain,
4017
- queryParams: schemas_ts_1.removeProjectDomainQueryParamsSchema
4018
- }, async ({ idOrName, domain, queryParams }) => {
4019
- try {
4020
- return await removeProjectDomain({ pathParams: { idOrName, domain }, queryParams, config });
4021
- }
4022
- catch (error) {
4023
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4024
- }
4025
- });
4026
- server.tool('addProjectDomain', '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.', { idOrName: schemas_ts_1.addProjectDomainPathParamsSchema.shape.idOrName, queryParams: schemas_ts_1.addProjectDomainQueryParamsSchema }, async ({ idOrName, queryParams }) => {
4027
- try {
4028
- return await addProjectDomain({ pathParams: { idOrName }, queryParams, config });
4029
- }
4030
- catch (error) {
4031
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4032
- }
4033
- });
4034
- server.tool('moveProjectDomain', "Move one project's domain to another project. Also allows the move of all redirects pointed to that domain in the same project.", {
4035
- idOrName: schemas_ts_1.moveProjectDomainPathParamsSchema.shape.idOrName,
4036
- domain: schemas_ts_1.moveProjectDomainPathParamsSchema.shape.domain,
4037
- queryParams: schemas_ts_1.moveProjectDomainQueryParamsSchema
4038
- }, async ({ idOrName, domain, queryParams }) => {
4039
- try {
4040
- return await moveProjectDomain({ pathParams: { idOrName, domain }, queryParams, config });
4041
- }
4042
- catch (error) {
4043
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4044
- }
4045
- });
4046
- server.tool('verifyProjectDomain', "Attempts to verify a project domain with `verified = false` by checking the correctness of the project domain's `verification` challenge.", {
4047
- idOrName: schemas_ts_1.verifyProjectDomainPathParamsSchema.shape.idOrName,
4048
- domain: schemas_ts_1.verifyProjectDomainPathParamsSchema.shape.domain,
4049
- queryParams: schemas_ts_1.verifyProjectDomainQueryParamsSchema
4050
- }, async ({ idOrName, domain, queryParams }) => {
4051
- try {
4052
- return await verifyProjectDomain({ pathParams: { idOrName, domain }, queryParams, config });
4053
- }
4054
- catch (error) {
4055
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4056
- }
4057
- });
4058
- server.tool('filterProjectEnvs', 'Retrieve the environment variables for a given project by passing either the project `id` or `name` in the URL.', { idOrName: schemas_ts_1.filterProjectEnvsPathParamsSchema.shape.idOrName, queryParams: schemas_ts_1.filterProjectEnvsQueryParamsSchema }, async ({ idOrName, queryParams }) => {
4059
- try {
4060
- return await filterProjectEnvs({ pathParams: { idOrName }, queryParams, config });
4061
- }
4062
- catch (error) {
4063
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4064
- }
4065
- });
4066
- server.tool('createProjectEnv', "Create one or 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. If you include `upsert=true` as a query parameter, a new environment variable will not be created if it already exists but, the existing variable's value will be updated.", { idOrName: schemas_ts_1.createProjectEnvPathParamsSchema.shape.idOrName, queryParams: schemas_ts_1.createProjectEnvQueryParamsSchema }, async ({ idOrName, queryParams }) => {
4067
- try {
4068
- return await createProjectEnv({ pathParams: { idOrName }, queryParams, config });
4069
- }
4070
- catch (error) {
4071
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4072
- }
4073
- });
4074
- server.tool('getProjectEnv', 'Retrieve the environment variable for a given project.', {
4075
- idOrName: schemas_ts_1.getProjectEnvPathParamsSchema.shape.idOrName,
4076
- id: schemas_ts_1.getProjectEnvPathParamsSchema.shape.id,
4077
- queryParams: schemas_ts_1.getProjectEnvQueryParamsSchema
4078
- }, async ({ idOrName, id, queryParams }) => {
4079
- try {
4080
- return await getProjectEnv({ pathParams: { idOrName, id }, queryParams, config });
4081
- }
4082
- catch (error) {
4083
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4084
- }
4085
- });
4086
- server.tool('removeProjectEnv', '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.', {
4087
- idOrName: schemas_ts_1.removeProjectEnvPathParamsSchema.shape.idOrName,
4088
- id: schemas_ts_1.removeProjectEnvPathParamsSchema.shape.id,
4089
- queryParams: schemas_ts_1.removeProjectEnvQueryParamsSchema
4090
- }, async ({ idOrName, id, queryParams }) => {
4091
- try {
4092
- return await removeProjectEnv({ pathParams: { idOrName, id }, queryParams, config });
4093
- }
4094
- catch (error) {
4095
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4096
- }
4097
- });
4098
- server.tool('editProjectEnv', '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.', {
4099
- idOrName: schemas_ts_1.editProjectEnvPathParamsSchema.shape.idOrName,
4100
- id: schemas_ts_1.editProjectEnvPathParamsSchema.shape.id,
4101
- queryParams: schemas_ts_1.editProjectEnvQueryParamsSchema
4102
- }, async ({ idOrName, id, queryParams }) => {
4103
- try {
4104
- return await editProjectEnv({ pathParams: { idOrName, id }, queryParams, config });
4105
- }
4106
- catch (error) {
4107
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4108
- }
4109
- });
4110
- server.tool('getRollingReleaseBillingStatus', 'Get the Rolling Releases billing status for a project. The team level billing status is used to determine if the project can be configured for rolling releases.', {
4111
- idOrName: schemas_ts_1.getRollingReleaseBillingStatusPathParamsSchema.shape.idOrName,
4112
- queryParams: schemas_ts_1.getRollingReleaseBillingStatusQueryParamsSchema
4113
- }, async ({ idOrName, queryParams }) => {
4114
- try {
4115
- return await getRollingReleaseBillingStatus({ pathParams: { idOrName }, queryParams, config });
4116
- }
4117
- catch (error) {
4118
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4119
- }
4120
- });
4121
- server.tool('getRollingReleaseConfig', 'Get the Rolling Releases configuration for a project. The project-level config is simply a template that will be used for any future rolling release, and not the configuration for any active rolling release.', {
4122
- idOrName: schemas_ts_1.getRollingReleaseConfigPathParamsSchema.shape.idOrName,
4123
- queryParams: schemas_ts_1.getRollingReleaseConfigQueryParamsSchema
4124
- }, async ({ idOrName, queryParams }) => {
4125
- try {
4126
- return await getRollingReleaseConfig({ pathParams: { idOrName }, queryParams, config });
4127
- }
4128
- catch (error) {
4129
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4130
- }
4131
- });
4132
- server.tool('deleteRollingReleaseConfig', "Disable Rolling Releases for a project means that future deployments will not undergo a rolling release. Changing the config never alters a rollout that's already in-flight—it only affects the next production deployment. If you want to also stop the current rollout, call this endpoint to disable the feature, and then call either the /complete or /abort endpoint.", {
4133
- idOrName: schemas_ts_1.deleteRollingReleaseConfigPathParamsSchema.shape.idOrName,
4134
- queryParams: schemas_ts_1.deleteRollingReleaseConfigQueryParamsSchema
4135
- }, async ({ idOrName, queryParams }) => {
4136
- try {
4137
- return await deleteRollingReleaseConfig({ pathParams: { idOrName }, queryParams, config });
4138
- }
4139
- catch (error) {
4140
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4141
- }
4142
- });
4143
- server.tool('updateRollingReleaseConfig', "Update (or disable) Rolling Releases for a project. Changing the config never alters a rollout that's already in-flight. It only affects the next production deployment. This also applies to disabling Rolling Releases. If you want to also stop the current rollout, call this endpoint to disable the feature, and then call either the /complete or /abort endpoint. Note: Enabling Rolling Releases automatically enables skew protection on the project with the default value if it wasn't configured already.", {
4144
- idOrName: schemas_ts_1.updateRollingReleaseConfigPathParamsSchema.shape.idOrName,
4145
- queryParams: schemas_ts_1.updateRollingReleaseConfigQueryParamsSchema
4146
- }, async ({ idOrName, queryParams }) => {
4147
- try {
4148
- return await updateRollingReleaseConfig({ pathParams: { idOrName }, queryParams, config });
4149
- }
4150
- catch (error) {
4151
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4152
- }
4153
- });
4154
- server.tool('getRollingRelease', 'Return the Rolling Release for a project, regardless of whether the rollout is active, aborted, or completed. If the feature is enabled but no deployment has occurred yet, null will be returned.', { idOrName: schemas_ts_1.getRollingReleasePathParamsSchema.shape.idOrName, queryParams: schemas_ts_1.getRollingReleaseQueryParamsSchema }, async ({ idOrName, queryParams }) => {
4155
- try {
4156
- return await getRollingRelease({ pathParams: { idOrName }, queryParams, config });
4157
- }
4158
- catch (error) {
4159
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4160
- }
4161
- });
4162
- server.tool('approveRollingReleaseStage', 'Advance a rollout to the next stage. This is only needed when rolling releases is configured to require manual approval.', {
4163
- idOrName: schemas_ts_1.approveRollingReleaseStagePathParamsSchema.shape.idOrName,
4164
- queryParams: schemas_ts_1.approveRollingReleaseStageQueryParamsSchema
4165
- }, async ({ idOrName, queryParams }) => {
4166
- try {
4167
- return await approveRollingReleaseStage({ pathParams: { idOrName }, queryParams, config });
4168
- }
4169
- catch (error) {
4170
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4171
- }
4172
- });
4173
- server.tool('completeRollingRelease', 'Force-complete a Rolling Release. The canary deployment will begin serving 100% of the traffic.', {
4174
- idOrName: schemas_ts_1.completeRollingReleasePathParamsSchema.shape.idOrName,
4175
- queryParams: schemas_ts_1.completeRollingReleaseQueryParamsSchema
4176
- }, async ({ idOrName, queryParams }) => {
4177
- try {
4178
- return await completeRollingRelease({ pathParams: { idOrName }, queryParams, config });
4179
- }
4180
- catch (error) {
4181
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4182
- }
4183
- });
4184
- server.tool('createProjectTransferRequest', 'Initiates a project transfer request from one team to another. <br/> Returns a `code` that remains valid for 24 hours and can be used to accept the transfer request by another team using the `PUT /projects/transfer-request/:code` endpoint. <br/> Users can also accept the project transfer request using the claim URL: `https://vercel.com/claim-deployment?code=<code>&returnUrl=<returnUrl>`. <br/> The `code` parameter specifies the project transfer request code generated using this endpoint. <br/> The `returnUrl` parameter redirects users to a specific page of the application if the claim URL is invalid or expired.', {
4185
- idOrName: schemas_ts_1.createProjectTransferRequestPathParamsSchema.shape.idOrName,
4186
- queryParams: schemas_ts_1.createProjectTransferRequestQueryParamsSchema
4187
- }, async ({ idOrName, queryParams }) => {
4188
- try {
4189
- return await createProjectTransferRequest({ pathParams: { idOrName }, queryParams, config });
4190
- }
4191
- catch (error) {
4192
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4193
- }
4194
- });
4195
- server.tool('acceptProjectTransferRequest', 'Accept a project transfer request initated by another team. <br/> The `code` is generated using the `POST /projects/:idOrName/transfer-request` endpoint.', {
4196
- code: schemas_ts_1.acceptProjectTransferRequestPathParamsSchema.shape.code,
4197
- queryParams: schemas_ts_1.acceptProjectTransferRequestQueryParamsSchema
4198
- }, async ({ code, queryParams }) => {
4199
- try {
4200
- return await acceptProjectTransferRequest({ pathParams: { code }, queryParams, config });
4201
- }
4202
- catch (error) {
4203
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4204
- }
4205
- });
4206
- server.tool('updateProjectProtectionBypass', 'Update the deployment protection automation bypass for a project', {
4207
- idOrName: schemas_ts_1.updateProjectProtectionBypassPathParamsSchema.shape.idOrName,
4208
- queryParams: schemas_ts_1.updateProjectProtectionBypassQueryParamsSchema
4209
- }, async ({ idOrName, queryParams }) => {
4210
- try {
4211
- return await updateProjectProtectionBypass({ pathParams: { idOrName }, queryParams, config });
4212
- }
4213
- catch (error) {
4214
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4215
- }
4216
- });
4217
- server.tool('requestPromote', 'Allows users to promote a deployment to production. Note: This does NOT rebuild the deployment. If you need that, then call create-deployments endpoint.', {
4218
- projectId: schemas_ts_1.requestPromotePathParamsSchema.shape.projectId,
4219
- deploymentId: schemas_ts_1.requestPromotePathParamsSchema.shape.deploymentId,
4220
- queryParams: schemas_ts_1.requestPromoteQueryParamsSchema
4221
- }, async ({ projectId, deploymentId, queryParams }) => {
4222
- try {
4223
- return await requestPromote({ pathParams: { projectId, deploymentId }, queryParams, config });
4224
- }
4225
- catch (error) {
4226
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4227
- }
4228
- });
4229
- server.tool('listPromoteAliases', 'Get a list of aliases related to the last promote request with their mapping status', {
4230
- projectId: schemas_ts_1.listPromoteAliasesPathParamsSchema.shape.projectId,
4231
- queryParams: schemas_ts_1.listPromoteAliasesQueryParamsSchema
4232
- }, async ({ projectId, queryParams }) => {
4233
- try {
4234
- return await listPromoteAliases({ pathParams: { projectId }, queryParams, config });
4235
- }
4236
- catch (error) {
4237
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4238
- }
4239
- });
4240
- server.tool('pauseProject', 'Pause a project by passing its project `id` in the URL. If the project does not exist given the id then the request will fail with 400 status code. If the project disables auto assigning custom production domains and blocks the active Production Deployment then the request will return with 200 status code.', { projectId: schemas_ts_1.pauseProjectPathParamsSchema.shape.projectId, queryParams: schemas_ts_1.pauseProjectQueryParamsSchema }, async ({ projectId, queryParams }) => {
4241
- try {
4242
- return await pauseProject({ pathParams: { projectId }, queryParams, config });
4243
- }
4244
- catch (error) {
4245
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4246
- }
4247
- });
4248
- server.tool('unpauseProject', 'Unpause a project by passing its project `id` in the URL. If the project does not exist given the id then the request will fail with 400 status code. If the project enables auto assigning custom production domains and unblocks the active Production Deployment then the request will return with 200 status code.', { projectId: schemas_ts_1.unpauseProjectPathParamsSchema.shape.projectId, queryParams: schemas_ts_1.unpauseProjectQueryParamsSchema }, async ({ projectId, queryParams }) => {
4249
- try {
4250
- return await unpauseProject({ pathParams: { projectId }, queryParams, config });
4251
- }
4252
- catch (error) {
4253
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4254
- }
4255
- });
4256
- server.tool('updateAttackChallengeMode', 'Update the setting for determining if the project has Attack Challenge mode enabled.', { queryParams: schemas_ts_1.updateAttackChallengeModeQueryParamsSchema }, async ({ queryParams }) => {
4257
- try {
4258
- return await updateAttackChallengeMode({ queryParams, config });
4259
- }
4260
- catch (error) {
4261
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4262
- }
4263
- });
4264
- server.tool('putFirewallConfig', 'Set the firewall configuration to provided rules and settings. Creates or overwrite the existing firewall configuration.', { queryParams: schemas_ts_1.putFirewallConfigQueryParamsSchema }, async ({ queryParams }) => {
4265
- try {
4266
- return await putFirewallConfig({ queryParams, config });
4267
- }
4268
- catch (error) {
4269
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4270
- }
4271
- });
4272
- server.tool('updateFirewallConfig', 'Process updates to modify the existing firewall config for a project', { queryParams: schemas_ts_1.updateFirewallConfigQueryParamsSchema }, async ({ queryParams }) => {
4273
- try {
4274
- return await updateFirewallConfig({ queryParams, config });
4275
- }
4276
- catch (error) {
4277
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4278
- }
4279
- });
4280
- server.tool('getFirewallConfig', 'Retrieve the specified firewall configuration for a project. The deployed configVersion will be `active`', {
4281
- configVersion: schemas_ts_1.getFirewallConfigPathParamsSchema.shape.configVersion,
4282
- queryParams: schemas_ts_1.getFirewallConfigQueryParamsSchema
4283
- }, async ({ configVersion, queryParams }) => {
4284
- try {
4285
- return await getFirewallConfig({ pathParams: { configVersion }, queryParams, config });
4286
- }
4287
- catch (error) {
4288
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4289
- }
4290
- });
4291
- server.tool('getActiveAttackStatus', 'Retrieve active attack data within the last 24h window', { queryParams: schemas_ts_1.getActiveAttackStatusQueryParamsSchema }, async ({ queryParams }) => {
4292
- try {
4293
- return await getActiveAttackStatus({ queryParams, config });
4294
- }
4295
- catch (error) {
4296
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4297
- }
4298
- });
4299
- server.tool('getBypassIp', 'Retrieve the system bypass rules configured for the specified project', { queryParams: schemas_ts_1.getBypassIpQueryParamsSchema }, async ({ queryParams }) => {
4300
- try {
4301
- return await getBypassIp({ queryParams, config });
4302
- }
4303
- catch (error) {
4304
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4305
- }
4306
- });
4307
- server.tool('addBypassIp', 'Create new system bypass rules', { queryParams: schemas_ts_1.addBypassIpQueryParamsSchema }, async ({ queryParams }) => {
4308
- try {
4309
- return await addBypassIp({ queryParams, config });
4310
- }
4311
- catch (error) {
4312
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4313
- }
4314
- });
4315
- server.tool('removeBypassIp', 'Remove system bypass rules', { queryParams: schemas_ts_1.removeBypassIpQueryParamsSchema }, async ({ queryParams }) => {
4316
- try {
4317
- return await removeBypassIp({ queryParams, config });
4318
- }
4319
- catch (error) {
4320
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4321
- }
4322
- });
4323
- server.tool('getTeamMembers', 'Get a paginated list of team members for the provided team.', { teamId: schemas_ts_1.getTeamMembersPathParamsSchema.shape.teamId, queryParams: schemas_ts_1.getTeamMembersQueryParamsSchema }, async ({ teamId, queryParams }) => {
4324
- try {
4325
- return await getTeamMembers({ pathParams: { teamId }, queryParams, config });
4326
- }
4327
- catch (error) {
4328
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4329
- }
4330
- });
4331
- server.tool('inviteUserToTeam', '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.', { teamId: schemas_ts_1.inviteUserToTeamPathParamsSchema.shape.teamId }, async ({ teamId }) => {
4332
- try {
4333
- return await inviteUserToTeam({ pathParams: { teamId }, config });
4334
- }
4335
- catch (error) {
4336
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4337
- }
4338
- });
4339
- server.tool('requestAccessToTeam', '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.', { teamId: schemas_ts_1.requestAccessToTeamPathParamsSchema.shape.teamId }, async ({ teamId }) => {
4340
- try {
4341
- return await requestAccessToTeam({ pathParams: { teamId }, config });
4342
- }
4343
- catch (error) {
4344
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4345
- }
4346
- });
4347
- server.tool('getTeamAccessRequest', "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.", {
4348
- userId: schemas_ts_1.getTeamAccessRequestPathParamsSchema.shape.userId,
4349
- teamId: schemas_ts_1.getTeamAccessRequestPathParamsSchema.shape.teamId
4350
- }, async ({ userId, teamId }) => {
4351
- try {
4352
- return await getTeamAccessRequest({ pathParams: { userId, teamId }, config });
4353
- }
4354
- catch (error) {
4355
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4356
- }
4357
- });
4358
- server.tool('joinTeam', 'Join a team with a provided invite code or team ID.', { teamId: schemas_ts_1.joinTeamPathParamsSchema.shape.teamId }, async ({ teamId }) => {
4359
- try {
4360
- return await joinTeam({ pathParams: { teamId }, config });
4361
- }
4362
- catch (error) {
4363
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4364
- }
4365
- });
4366
- server.tool('updateTeamMember', '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.', { uid: schemas_ts_1.updateTeamMemberPathParamsSchema.shape.uid, teamId: schemas_ts_1.updateTeamMemberPathParamsSchema.shape.teamId }, async ({ uid, teamId }) => {
4367
- try {
4368
- return await updateTeamMember({ pathParams: { uid, teamId }, config });
4369
- }
4370
- catch (error) {
4371
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4372
- }
4373
- });
4374
- server.tool('removeTeamMember', 'Remove a Team Member from the Team, or dismiss a user that requested access, or leave a team.', {
4375
- uid: schemas_ts_1.removeTeamMemberPathParamsSchema.shape.uid,
4376
- teamId: schemas_ts_1.removeTeamMemberPathParamsSchema.shape.teamId,
4377
- queryParams: schemas_ts_1.removeTeamMemberQueryParamsSchema
4378
- }, async ({ uid, teamId, queryParams }) => {
4379
- try {
4380
- return await removeTeamMember({ pathParams: { uid, teamId }, queryParams, config });
4381
- }
4382
- catch (error) {
4383
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4384
- }
4385
- });
4386
- server.tool('getTeam', 'Get information for the Team specified by the `teamId` parameter.', { teamId: schemas_ts_1.getTeamPathParamsSchema.shape.teamId, queryParams: schemas_ts_1.getTeamQueryParamsSchema }, async ({ teamId, queryParams }) => {
4387
- try {
4388
- return await getTeam({ pathParams: { teamId }, queryParams, config });
4389
- }
4390
- catch (error) {
4391
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4392
- }
4393
- });
4394
- server.tool('patchTeam', '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.', { teamId: schemas_ts_1.patchTeamPathParamsSchema.shape.teamId, queryParams: schemas_ts_1.patchTeamQueryParamsSchema }, async ({ teamId, queryParams }) => {
4395
- try {
4396
- return await patchTeam({ pathParams: { teamId }, queryParams, config });
4397
- }
4398
- catch (error) {
4399
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4400
- }
4401
- });
4402
- server.tool('getTeams', 'Get a paginated list of all the Teams the authenticated User is a member of.', { queryParams: schemas_ts_1.getTeamsQueryParamsSchema }, async ({ queryParams }) => {
4403
- try {
4404
- return await getTeams({ queryParams, config });
4405
- }
4406
- catch (error) {
4407
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4408
- }
4409
- });
4410
- server.tool('createTeam', 'Create a new Team under your account. You need to send a POST request with the desired Team slug, and optionally the Team name.', async () => {
4411
- try {
4412
- return await createTeam({ config });
4413
- }
4414
- catch (error) {
4415
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4416
- }
4417
- });
4418
- server.tool('deleteTeam', '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.', { teamId: schemas_ts_1.deleteTeamPathParamsSchema.shape.teamId, queryParams: schemas_ts_1.deleteTeamQueryParamsSchema }, async ({ teamId, queryParams }) => {
4419
- try {
4420
- return await deleteTeam({ pathParams: { teamId }, queryParams, config });
4421
- }
4422
- catch (error) {
4423
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4424
- }
4425
- });
4426
- server.tool('deleteTeamInviteCode', 'Delete an active Team invite code.', {
4427
- inviteId: schemas_ts_1.deleteTeamInviteCodePathParamsSchema.shape.inviteId,
4428
- teamId: schemas_ts_1.deleteTeamInviteCodePathParamsSchema.shape.teamId
4429
- }, async ({ inviteId, teamId }) => {
4430
- try {
4431
- return await deleteTeamInviteCode({ pathParams: { inviteId, teamId }, config });
4432
- }
4433
- catch (error) {
4434
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4435
- }
4436
- });
4437
- server.tool('uploadFile', "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.", { queryParams: schemas_ts_1.uploadFileQueryParamsSchema, headers: schemas_ts_1.uploadFileHeaderParamsSchema }, async ({ queryParams, headers }) => {
4438
- try {
4439
- return await uploadFile({ queryParams, headers, config });
4440
- }
4441
- catch (error) {
4442
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4443
- }
4444
- });
4445
- server.tool('listAuthTokens', "Retrieve a list of the current User's authentication tokens.", async () => {
4446
- try {
4447
- return await listAuthTokens({ config });
4448
- }
4449
- catch (error) {
4450
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4451
- }
4452
- });
4453
- server.tool('createAuthToken', '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.', { queryParams: schemas_ts_1.createAuthTokenQueryParamsSchema }, async ({ queryParams }) => {
4454
- try {
4455
- return await createAuthToken({ queryParams, config });
4456
- }
4457
- catch (error) {
4458
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4459
- }
4460
- });
4461
- server.tool('getAuthToken', 'Retrieve metadata about an authentication token belonging to the currently authenticated User.', { tokenId: schemas_ts_1.getAuthTokenPathParamsSchema.shape.tokenId }, async ({ tokenId }) => {
4462
- try {
4463
- return await getAuthToken({ pathParams: { tokenId }, config });
4464
- }
4465
- catch (error) {
4466
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4467
- }
4468
- });
4469
- server.tool('deleteAuthToken', 'Invalidate an authentication token, such that it will no longer be valid for future HTTP requests.', { tokenId: schemas_ts_1.deleteAuthTokenPathParamsSchema.shape.tokenId }, async ({ tokenId }) => {
4470
- try {
4471
- return await deleteAuthToken({ pathParams: { tokenId }, config });
4472
- }
4473
- catch (error) {
4474
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4475
- }
4476
- });
4477
- server.tool('getAuthUser', 'Retrieves information related to the currently authenticated User.', async () => {
4478
- try {
4479
- return await getAuthUser({ config });
4480
- }
4481
- catch (error) {
4482
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4483
- }
4484
- });
4485
- server.tool('requestDelete', '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.', async () => {
4486
- try {
4487
- return await requestDelete({ config });
4488
- }
4489
- catch (error) {
4490
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4491
- }
4492
- });
4493
- server.tool('createWebhook', 'Creates a webhook', { queryParams: schemas_ts_1.createWebhookQueryParamsSchema }, async ({ queryParams }) => {
4494
- try {
4495
- return await createWebhook({ queryParams, config });
4496
- }
4497
- catch (error) {
4498
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4499
- }
4500
- });
4501
- server.tool('getWebhooks', 'Get a list of webhooks', { queryParams: schemas_ts_1.getWebhooksQueryParamsSchema }, async ({ queryParams }) => {
4502
- try {
4503
- return await getWebhooks({ queryParams, config });
4504
- }
4505
- catch (error) {
4506
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4507
- }
4508
- });
4509
- server.tool('getWebhook', 'Get a webhook', { id: schemas_ts_1.getWebhookPathParamsSchema.shape.id, queryParams: schemas_ts_1.getWebhookQueryParamsSchema }, async ({ id, queryParams }) => {
4510
- try {
4511
- return await getWebhook({ pathParams: { id }, queryParams, config });
4512
- }
4513
- catch (error) {
4514
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4515
- }
4516
- });
4517
- server.tool('deleteWebhook', 'Deletes a webhook', { id: schemas_ts_1.deleteWebhookPathParamsSchema.shape.id, queryParams: schemas_ts_1.deleteWebhookQueryParamsSchema }, async ({ id, queryParams }) => {
4518
- try {
4519
- return await deleteWebhook({ pathParams: { id }, queryParams, config });
4520
- }
4521
- catch (error) {
4522
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4523
- }
4524
- });
4525
- server.tool('listDeploymentAliases', 'Retrieves all Aliases for the Deployment with the given ID. The authenticated user or team must own the deployment.', { id: schemas_ts_1.listDeploymentAliasesPathParamsSchema.shape.id, queryParams: schemas_ts_1.listDeploymentAliasesQueryParamsSchema }, async ({ id, queryParams }) => {
4526
- try {
4527
- return await listDeploymentAliases({ pathParams: { id }, queryParams, config });
4528
- }
4529
- catch (error) {
4530
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4531
- }
4532
- });
4533
- server.tool('assignAlias', 'Creates a new alias for the deployment with the given deployment ID. The authenticated user or team 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.', { id: schemas_ts_1.assignAliasPathParamsSchema.shape.id, queryParams: schemas_ts_1.assignAliasQueryParamsSchema }, async ({ id, queryParams }) => {
4534
- try {
4535
- return await assignAlias({ pathParams: { id }, queryParams, config });
4536
- }
4537
- catch (error) {
4538
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4539
- }
4540
- });
4541
- server.tool('listAliases', '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.', { queryParams: schemas_ts_1.listAliasesQueryParamsSchema }, async ({ queryParams }) => {
4542
- try {
4543
- return await listAliases({ queryParams, config });
4544
- }
4545
- catch (error) {
4546
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4547
- }
4548
- });
4549
- server.tool('getAlias', 'Retrieves an Alias for the given host name or alias ID.', { idOrAlias: schemas_ts_1.getAliasPathParamsSchema.shape.idOrAlias, queryParams: schemas_ts_1.getAliasQueryParamsSchema }, async ({ idOrAlias, queryParams }) => {
4550
- try {
4551
- return await getAlias({ pathParams: { idOrAlias }, queryParams, config });
4552
- }
4553
- catch (error) {
4554
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4555
- }
4556
- });
4557
- server.tool('deleteAlias', 'Delete an Alias with the specified ID.', { aliasId: schemas_ts_1.deleteAliasPathParamsSchema.shape.aliasId, queryParams: schemas_ts_1.deleteAliasQueryParamsSchema }, async ({ aliasId, queryParams }) => {
4558
- try {
4559
- return await deleteAlias({ pathParams: { aliasId }, queryParams, config });
4560
- }
4561
- catch (error) {
4562
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4563
- }
4564
- });
4565
- server.tool('patchUrlProtectionBypass', 'Update the protection bypass for the alias or deployment URL (used for user access & comment access for deployments). Used as shareable links and user scoped access for Vercel Authentication and also to allow external (logged in) people to comment on previews for Preview Comments (next-live-mode).', {
4566
- id: schemas_ts_1.patchUrlProtectionBypassPathParamsSchema.shape.id,
4567
- queryParams: schemas_ts_1.patchUrlProtectionBypassQueryParamsSchema
4568
- }, async ({ id, queryParams }) => {
4569
- try {
4570
- return await patchUrlProtectionBypass({ pathParams: { id }, queryParams, config });
4571
- }
4572
- catch (error) {
4573
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4574
- }
4575
- });
4576
- server.tool('listCerts', 'Make a GET request to /certs', async () => {
4577
- try {
4578
- return await listCerts({ config });
4579
- }
4580
- catch (error) {
4581
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4582
- }
4583
- });
4584
- server.tool('getCertById', 'Get cert by id', { id: schemas_ts_1.getCertByIdPathParamsSchema.shape.id, queryParams: schemas_ts_1.getCertByIdQueryParamsSchema }, async ({ id, queryParams }) => {
4585
- try {
4586
- return await getCertById({ pathParams: { id }, queryParams, config });
4587
- }
4588
- catch (error) {
4589
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4590
- }
4591
- });
4592
- server.tool('removeCert', 'Remove cert', { id: schemas_ts_1.removeCertPathParamsSchema.shape.id, queryParams: schemas_ts_1.removeCertQueryParamsSchema }, async ({ id, queryParams }) => {
4593
- try {
4594
- return await removeCert({ pathParams: { id }, queryParams, config });
4595
- }
4596
- catch (error) {
4597
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4598
- }
4599
- });
4600
- server.tool('issueCert', 'Issue a new cert', { queryParams: schemas_ts_1.issueCertQueryParamsSchema }, async ({ queryParams }) => {
4601
- try {
4602
- return await issueCert({ queryParams, config });
4603
- }
4604
- catch (error) {
4605
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4606
- }
4607
- });
4608
- server.tool('uploadCert', 'Upload a cert', { queryParams: schemas_ts_1.uploadCertQueryParamsSchema }, async ({ queryParams }) => {
4609
- try {
4610
- return await uploadCert({ queryParams, config });
4611
- }
4612
- catch (error) {
4613
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4614
- }
4615
- });
4616
- server.tool('listDeploymentFiles', 'Allows to retrieve the file structure of the source code of a deployment by supplying the deployment unique identifier. If the deployment was created with the Vercel CLI or the API directly with the `files` key, it will have a file tree that can be retrievable.', { id: schemas_ts_1.listDeploymentFilesPathParamsSchema.shape.id, queryParams: schemas_ts_1.listDeploymentFilesQueryParamsSchema }, async ({ id, queryParams }) => {
4617
- try {
4618
- return await listDeploymentFiles({ pathParams: { id }, queryParams, config });
4619
- }
4620
- catch (error) {
4621
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4622
- }
4623
- });
4624
- server.tool('getDeploymentFileContents', 'Allows to retrieve the content of a file by supplying the file identifier and the deployment unique identifier. The response body will contain a JSON response containing the contents of the file encoded as base64.', {
4625
- id: schemas_ts_1.getDeploymentFileContentsPathParamsSchema.shape.id,
4626
- fileId: schemas_ts_1.getDeploymentFileContentsPathParamsSchema.shape.fileId,
4627
- queryParams: schemas_ts_1.getDeploymentFileContentsQueryParamsSchema
4628
- }, async ({ id, fileId, queryParams }) => {
4629
- try {
4630
- return await getDeploymentFileContents({ pathParams: { id, fileId }, queryParams, config });
4631
- }
4632
- catch (error) {
4633
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4634
- }
4635
- });
4636
- server.tool('getDeployments', "List deployments under the authenticated user or team. If a deployment hasn't finished uploading (is incomplete), the `url` property will have a value of `null`.", { queryParams: schemas_ts_1.getDeploymentsQueryParamsSchema }, async ({ queryParams }) => {
4637
- try {
4638
- return await getDeployments({ queryParams, config });
4639
- }
4640
- catch (error) {
4641
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4642
- }
4643
- });
4644
- server.tool('deleteDeployment', '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.', { id: schemas_ts_1.deleteDeploymentPathParamsSchema.shape.id, queryParams: schemas_ts_1.deleteDeploymentQueryParamsSchema }, async ({ id, queryParams }) => {
4645
- try {
4646
- return await deleteDeployment({ pathParams: { id }, queryParams, config });
4647
- }
4648
- catch (error) {
4649
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4650
- }
4651
- });
4652
- server.tool('getSecrets', 'Retrieves the active Vercel secrets for the authenticated user or team. By default it returns 20 secrets. The rest can be retrieved using the pagination options. The body will contain an entry for each secret.', { queryParams: schemas_ts_1.getSecretsQueryParamsSchema }, async ({ queryParams }) => {
4653
- try {
4654
- return await getSecrets({ queryParams, config });
4655
- }
4656
- catch (error) {
4657
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4658
- }
4659
- });
4660
- server.tool('createSecret', 'Allows to create a new secret.', { name: schemas_ts_1.createSecretPathParamsSchema.shape.name, queryParams: schemas_ts_1.createSecretQueryParamsSchema }, async ({ name, queryParams }) => {
4661
- try {
4662
- return await createSecret({ pathParams: { name }, queryParams, config });
4663
- }
4664
- catch (error) {
4665
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4666
- }
4667
- });
4668
- server.tool('renameSecret', 'Enables to edit the name of a secret. The name has to be unique to the user or team’s secrets.', { name: schemas_ts_1.renameSecretPathParamsSchema.shape.name, queryParams: schemas_ts_1.renameSecretQueryParamsSchema }, async ({ name, queryParams }) => {
4669
- try {
4670
- return await renameSecret({ pathParams: { name }, queryParams, config });
4671
- }
4672
- catch (error) {
4673
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4674
- }
4675
- });
4676
- server.tool('getSecret', 'Retrieves the information for a specific secret by passing either the secret id or name in the URL.', { idOrName: schemas_ts_1.getSecretPathParamsSchema.shape.idOrName, queryParams: schemas_ts_1.getSecretQueryParamsSchema }, async ({ idOrName, queryParams }) => {
4677
- try {
4678
- return await getSecret({ pathParams: { idOrName }, queryParams, config });
4679
- }
4680
- catch (error) {
4681
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4682
- }
4683
- });
4684
- server.tool('deleteSecret', 'This deletes the user or team’s secret defined in the URL.', { idOrName: schemas_ts_1.deleteSecretPathParamsSchema.shape.idOrName, queryParams: schemas_ts_1.deleteSecretQueryParamsSchema }, async ({ idOrName, queryParams }) => {
4685
- try {
4686
- return await deleteSecret({ pathParams: { idOrName }, queryParams, config });
4687
- }
4688
- catch (error) {
4689
- return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
4690
- }
4691
- });
4692
- }