@vercel/sdk 1.6.1 → 1.6.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.
- package/README.md +4 -0
- package/bin/mcp-server.js +514 -246
- package/bin/mcp-server.js.map +12 -6
- package/docs/sdks/projects/README.md +162 -0
- package/esm/__tests__/projects.test.js +41 -13
- package/esm/__tests__/projects.test.js.map +1 -1
- package/esm/__tests__/security.test.js +14 -1
- package/esm/__tests__/security.test.js.map +1 -1
- package/esm/funcs/projectsPauseProject.d.ts +18 -0
- package/esm/funcs/projectsPauseProject.d.ts.map +1 -0
- package/esm/funcs/projectsPauseProject.js +92 -0
- package/esm/funcs/projectsPauseProject.js.map +1 -0
- package/esm/funcs/projectsUnpauseProject.d.ts +18 -0
- package/esm/funcs/projectsUnpauseProject.d.ts.map +1 -0
- package/esm/funcs/projectsUnpauseProject.js +92 -0
- package/esm/funcs/projectsUnpauseProject.js.map +1 -0
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/mcp-server/mcp-server.js +1 -1
- package/esm/mcp-server/server.d.ts.map +1 -1
- package/esm/mcp-server/server.js +5 -1
- package/esm/mcp-server/server.js.map +1 -1
- package/esm/mcp-server/tools/projectsPauseProject.d.ts +7 -0
- package/esm/mcp-server/tools/projectsPauseProject.d.ts.map +1 -0
- package/esm/mcp-server/tools/projectsPauseProject.js +27 -0
- package/esm/mcp-server/tools/projectsPauseProject.js.map +1 -0
- package/esm/mcp-server/tools/projectsUnpauseProject.d.ts +7 -0
- package/esm/mcp-server/tools/projectsUnpauseProject.d.ts.map +1 -0
- package/esm/mcp-server/tools/projectsUnpauseProject.js +27 -0
- package/esm/mcp-server/tools/projectsUnpauseProject.js.map +1 -0
- package/esm/models/pauseprojectop.d.ts +42 -0
- package/esm/models/pauseprojectop.d.ts.map +1 -0
- package/esm/models/pauseprojectop.js +35 -0
- package/esm/models/pauseprojectop.js.map +1 -0
- package/esm/models/unpauseprojectop.d.ts +42 -0
- package/esm/models/unpauseprojectop.d.ts.map +1 -0
- package/esm/models/unpauseprojectop.js +35 -0
- package/esm/models/unpauseprojectop.js.map +1 -0
- package/esm/sdk/projects.d.ts +16 -0
- package/esm/sdk/projects.d.ts.map +1 -1
- package/esm/sdk/projects.js +20 -0
- package/esm/sdk/projects.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/__tests__/projects.test.ts +47 -13
- package/src/__tests__/security.test.ts +14 -1
- package/src/funcs/projectsPauseProject.ts +190 -0
- package/src/funcs/projectsUnpauseProject.ts +190 -0
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +5 -1
- package/src/mcp-server/tools/projectsPauseProject.ts +35 -0
- package/src/mcp-server/tools/projectsUnpauseProject.ts +35 -0
- package/src/models/pauseprojectop.ts +83 -0
- package/src/models/unpauseprojectop.ts +83 -0
- package/src/sdk/projects.ts +38 -0
- package/vercel-spec.json +155 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "./sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type UnpauseProjectRequest = {
|
|
11
|
+
/**
|
|
12
|
+
* The unique project identifier
|
|
13
|
+
*/
|
|
14
|
+
projectId: string;
|
|
15
|
+
/**
|
|
16
|
+
* The Team identifier to perform the request on behalf of.
|
|
17
|
+
*/
|
|
18
|
+
teamId?: string | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* The Team slug to perform the request on behalf of.
|
|
21
|
+
*/
|
|
22
|
+
slug?: string | undefined;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const UnpauseProjectRequest$inboundSchema: z.ZodType<
|
|
27
|
+
UnpauseProjectRequest,
|
|
28
|
+
z.ZodTypeDef,
|
|
29
|
+
unknown
|
|
30
|
+
> = z.object({
|
|
31
|
+
projectId: z.string(),
|
|
32
|
+
teamId: z.string().optional(),
|
|
33
|
+
slug: z.string().optional(),
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
/** @internal */
|
|
37
|
+
export type UnpauseProjectRequest$Outbound = {
|
|
38
|
+
projectId: string;
|
|
39
|
+
teamId?: string | undefined;
|
|
40
|
+
slug?: string | undefined;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/** @internal */
|
|
44
|
+
export const UnpauseProjectRequest$outboundSchema: z.ZodType<
|
|
45
|
+
UnpauseProjectRequest$Outbound,
|
|
46
|
+
z.ZodTypeDef,
|
|
47
|
+
UnpauseProjectRequest
|
|
48
|
+
> = z.object({
|
|
49
|
+
projectId: z.string(),
|
|
50
|
+
teamId: z.string().optional(),
|
|
51
|
+
slug: z.string().optional(),
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* @internal
|
|
56
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
57
|
+
*/
|
|
58
|
+
export namespace UnpauseProjectRequest$ {
|
|
59
|
+
/** @deprecated use `UnpauseProjectRequest$inboundSchema` instead. */
|
|
60
|
+
export const inboundSchema = UnpauseProjectRequest$inboundSchema;
|
|
61
|
+
/** @deprecated use `UnpauseProjectRequest$outboundSchema` instead. */
|
|
62
|
+
export const outboundSchema = UnpauseProjectRequest$outboundSchema;
|
|
63
|
+
/** @deprecated use `UnpauseProjectRequest$Outbound` instead. */
|
|
64
|
+
export type Outbound = UnpauseProjectRequest$Outbound;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function unpauseProjectRequestToJSON(
|
|
68
|
+
unpauseProjectRequest: UnpauseProjectRequest,
|
|
69
|
+
): string {
|
|
70
|
+
return JSON.stringify(
|
|
71
|
+
UnpauseProjectRequest$outboundSchema.parse(unpauseProjectRequest),
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function unpauseProjectRequestFromJSON(
|
|
76
|
+
jsonString: string,
|
|
77
|
+
): SafeParseResult<UnpauseProjectRequest, SDKValidationError> {
|
|
78
|
+
return safeParse(
|
|
79
|
+
jsonString,
|
|
80
|
+
(x) => UnpauseProjectRequest$inboundSchema.parse(JSON.parse(x)),
|
|
81
|
+
`Failed to parse 'UnpauseProjectRequest' from JSON`,
|
|
82
|
+
);
|
|
83
|
+
}
|
package/src/sdk/projects.ts
CHANGED
|
@@ -15,9 +15,11 @@ import { projectsGetProjectDomains } from "../funcs/projectsGetProjectDomains.js
|
|
|
15
15
|
import { projectsGetProjectEnv } from "../funcs/projectsGetProjectEnv.js";
|
|
16
16
|
import { projectsGetProjects } from "../funcs/projectsGetProjects.js";
|
|
17
17
|
import { projectsListPromoteAliases } from "../funcs/projectsListPromoteAliases.js";
|
|
18
|
+
import { projectsPauseProject } from "../funcs/projectsPauseProject.js";
|
|
18
19
|
import { projectsRemoveProjectDomain } from "../funcs/projectsRemoveProjectDomain.js";
|
|
19
20
|
import { projectsRemoveProjectEnv } from "../funcs/projectsRemoveProjectEnv.js";
|
|
20
21
|
import { projectsRequestPromote } from "../funcs/projectsRequestPromote.js";
|
|
22
|
+
import { projectsUnpauseProject } from "../funcs/projectsUnpauseProject.js";
|
|
21
23
|
import { projectsUpdateProject } from "../funcs/projectsUpdateProject.js";
|
|
22
24
|
import { projectsUpdateProjectDataCache } from "../funcs/projectsUpdateProjectDataCache.js";
|
|
23
25
|
import { projectsUpdateProjectDomain } from "../funcs/projectsUpdateProjectDomain.js";
|
|
@@ -73,6 +75,7 @@ import {
|
|
|
73
75
|
ListPromoteAliasesRequest,
|
|
74
76
|
ListPromoteAliasesResponseBody,
|
|
75
77
|
} from "../models/listpromotealiasesop.js";
|
|
78
|
+
import { PauseProjectRequest } from "../models/pauseprojectop.js";
|
|
76
79
|
import {
|
|
77
80
|
RemoveProjectDomainRequest,
|
|
78
81
|
RemoveProjectDomainResponseBody,
|
|
@@ -82,6 +85,7 @@ import {
|
|
|
82
85
|
RemoveProjectEnvResponseBody,
|
|
83
86
|
} from "../models/removeprojectenvop.js";
|
|
84
87
|
import { RequestPromoteRequest } from "../models/requestpromoteop.js";
|
|
88
|
+
import { UnpauseProjectRequest } from "../models/unpauseprojectop.js";
|
|
85
89
|
import {
|
|
86
90
|
UpdateProjectDataCacheRequest,
|
|
87
91
|
UpdateProjectDataCacheResponseBody,
|
|
@@ -461,4 +465,38 @@ export class Projects extends ClientSDK {
|
|
|
461
465
|
options,
|
|
462
466
|
));
|
|
463
467
|
}
|
|
468
|
+
|
|
469
|
+
/**
|
|
470
|
+
* Pause a project
|
|
471
|
+
*
|
|
472
|
+
* @remarks
|
|
473
|
+
* 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.
|
|
474
|
+
*/
|
|
475
|
+
async pauseProject(
|
|
476
|
+
request: PauseProjectRequest,
|
|
477
|
+
options?: RequestOptions,
|
|
478
|
+
): Promise<void> {
|
|
479
|
+
return unwrapAsync(projectsPauseProject(
|
|
480
|
+
this,
|
|
481
|
+
request,
|
|
482
|
+
options,
|
|
483
|
+
));
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
/**
|
|
487
|
+
* Unpause a project
|
|
488
|
+
*
|
|
489
|
+
* @remarks
|
|
490
|
+
* 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.
|
|
491
|
+
*/
|
|
492
|
+
async unpauseProject(
|
|
493
|
+
request: UnpauseProjectRequest,
|
|
494
|
+
options?: RequestOptions,
|
|
495
|
+
): Promise<void> {
|
|
496
|
+
return unwrapAsync(projectsUnpauseProject(
|
|
497
|
+
this,
|
|
498
|
+
request,
|
|
499
|
+
options,
|
|
500
|
+
));
|
|
501
|
+
}
|
|
464
502
|
}
|
package/vercel-spec.json
CHANGED
|
@@ -49859,6 +49859,161 @@
|
|
|
49859
49859
|
]
|
|
49860
49860
|
}
|
|
49861
49861
|
},
|
|
49862
|
+
"/v1/projects/{projectId}/pause": {
|
|
49863
|
+
"post": {
|
|
49864
|
+
"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.",
|
|
49865
|
+
"operationId": "pauseProject",
|
|
49866
|
+
"security": [
|
|
49867
|
+
{
|
|
49868
|
+
"bearerToken": []
|
|
49869
|
+
}
|
|
49870
|
+
],
|
|
49871
|
+
"summary": "Pause a project",
|
|
49872
|
+
"tags": [
|
|
49873
|
+
"projects"
|
|
49874
|
+
],
|
|
49875
|
+
"responses": {
|
|
49876
|
+
"200": {
|
|
49877
|
+
"description": ""
|
|
49878
|
+
},
|
|
49879
|
+
"400": {
|
|
49880
|
+
"description": "One of the provided values in the request query is invalid.",
|
|
49881
|
+
"content": {
|
|
49882
|
+
"application/json": {
|
|
49883
|
+
"schema": {
|
|
49884
|
+
"$ref": "#/components/schemas/VercelBadRequestError"
|
|
49885
|
+
}
|
|
49886
|
+
}
|
|
49887
|
+
}
|
|
49888
|
+
},
|
|
49889
|
+
"401": {
|
|
49890
|
+
"description": "",
|
|
49891
|
+
"content": {
|
|
49892
|
+
"application/json": {
|
|
49893
|
+
"schema": {
|
|
49894
|
+
"$ref": "#/components/schemas/VercelForbiddenError"
|
|
49895
|
+
}
|
|
49896
|
+
}
|
|
49897
|
+
}
|
|
49898
|
+
},
|
|
49899
|
+
"402": {
|
|
49900
|
+
"description": "The account was soft-blocked for an unhandled reason.\nThe account is missing a payment so payment method must be updated"
|
|
49901
|
+
},
|
|
49902
|
+
"403": {
|
|
49903
|
+
"description": "You do not have permission to access this resource."
|
|
49904
|
+
},
|
|
49905
|
+
"500": {
|
|
49906
|
+
"description": ""
|
|
49907
|
+
}
|
|
49908
|
+
},
|
|
49909
|
+
"parameters": [
|
|
49910
|
+
{
|
|
49911
|
+
"name": "projectId",
|
|
49912
|
+
"description": "The unique project identifier",
|
|
49913
|
+
"in": "path",
|
|
49914
|
+
"required": true,
|
|
49915
|
+
"schema": {
|
|
49916
|
+
"type": "string",
|
|
49917
|
+
"description": "The unique project identifier"
|
|
49918
|
+
}
|
|
49919
|
+
},
|
|
49920
|
+
{
|
|
49921
|
+
"description": "The Team identifier to perform the request on behalf of.",
|
|
49922
|
+
"in": "query",
|
|
49923
|
+
"name": "teamId",
|
|
49924
|
+
"schema": {
|
|
49925
|
+
"type": "string",
|
|
49926
|
+
"example": "team_1a2b3c4d5e6f7g8h9i0j1k2l"
|
|
49927
|
+
}
|
|
49928
|
+
},
|
|
49929
|
+
{
|
|
49930
|
+
"description": "The Team slug to perform the request on behalf of.",
|
|
49931
|
+
"in": "query",
|
|
49932
|
+
"name": "slug",
|
|
49933
|
+
"schema": {
|
|
49934
|
+
"type": "string",
|
|
49935
|
+
"example": "my-team-url-slug"
|
|
49936
|
+
}
|
|
49937
|
+
}
|
|
49938
|
+
]
|
|
49939
|
+
}
|
|
49940
|
+
},
|
|
49941
|
+
"/v1/projects/{projectId}/unpause": {
|
|
49942
|
+
"post": {
|
|
49943
|
+
"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.",
|
|
49944
|
+
"operationId": "unpauseProject",
|
|
49945
|
+
"security": [
|
|
49946
|
+
{
|
|
49947
|
+
"bearerToken": []
|
|
49948
|
+
}
|
|
49949
|
+
],
|
|
49950
|
+
"summary": "Unpause a project",
|
|
49951
|
+
"tags": [
|
|
49952
|
+
"projects"
|
|
49953
|
+
],
|
|
49954
|
+
"responses": {
|
|
49955
|
+
"200": {
|
|
49956
|
+
"description": ""
|
|
49957
|
+
},
|
|
49958
|
+
"400": {
|
|
49959
|
+
"description": "One of the provided values in the request query is invalid.",
|
|
49960
|
+
"content": {
|
|
49961
|
+
"application/json": {
|
|
49962
|
+
"schema": {
|
|
49963
|
+
"$ref": "#/components/schemas/VercelBadRequestError"
|
|
49964
|
+
}
|
|
49965
|
+
}
|
|
49966
|
+
}
|
|
49967
|
+
},
|
|
49968
|
+
"401": {
|
|
49969
|
+
"description": "",
|
|
49970
|
+
"content": {
|
|
49971
|
+
"application/json": {
|
|
49972
|
+
"schema": {
|
|
49973
|
+
"$ref": "#/components/schemas/VercelForbiddenError"
|
|
49974
|
+
}
|
|
49975
|
+
}
|
|
49976
|
+
}
|
|
49977
|
+
},
|
|
49978
|
+
"403": {
|
|
49979
|
+
"description": "You do not have permission to access this resource."
|
|
49980
|
+
},
|
|
49981
|
+
"500": {
|
|
49982
|
+
"description": ""
|
|
49983
|
+
}
|
|
49984
|
+
},
|
|
49985
|
+
"parameters": [
|
|
49986
|
+
{
|
|
49987
|
+
"name": "projectId",
|
|
49988
|
+
"description": "The unique project identifier",
|
|
49989
|
+
"in": "path",
|
|
49990
|
+
"required": true,
|
|
49991
|
+
"schema": {
|
|
49992
|
+
"type": "string",
|
|
49993
|
+
"description": "The unique project identifier"
|
|
49994
|
+
}
|
|
49995
|
+
},
|
|
49996
|
+
{
|
|
49997
|
+
"description": "The Team identifier to perform the request on behalf of.",
|
|
49998
|
+
"in": "query",
|
|
49999
|
+
"name": "teamId",
|
|
50000
|
+
"schema": {
|
|
50001
|
+
"type": "string",
|
|
50002
|
+
"example": "team_1a2b3c4d5e6f7g8h9i0j1k2l"
|
|
50003
|
+
}
|
|
50004
|
+
},
|
|
50005
|
+
{
|
|
50006
|
+
"description": "The Team slug to perform the request on behalf of.",
|
|
50007
|
+
"in": "query",
|
|
50008
|
+
"name": "slug",
|
|
50009
|
+
"schema": {
|
|
50010
|
+
"type": "string",
|
|
50011
|
+
"example": "my-team-url-slug"
|
|
50012
|
+
}
|
|
50013
|
+
}
|
|
50014
|
+
]
|
|
50015
|
+
}
|
|
50016
|
+
},
|
|
49862
50017
|
"/v1/security/attack-mode": {
|
|
49863
50018
|
"post": {
|
|
49864
50019
|
"description": "Update the setting for determining if the project has Attack Challenge mode enabled.",
|