@vercel/sdk 1.6.2 → 1.6.4
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 +2 -10
- package/bin/mcp-server.js +4541 -3497
- package/bin/mcp-server.js.map +36 -48
- package/docs/sdks/edgeconfig/README.md +2 -6
- package/docs/sdks/integrations/README.md +0 -161
- package/docs/sdks/logdrains/README.md +0 -260
- package/docs/sdks/marketplace/README.md +2 -6
- package/docs/sdks/security/README.md +90 -0
- package/docs/sdks/webhooks/README.md +2 -6
- package/esm/__tests__/deployments.test.js +16 -1
- package/esm/__tests__/deployments.test.js.map +1 -1
- package/esm/__tests__/integrations.test.js +5 -40
- package/esm/__tests__/integrations.test.js.map +1 -1
- package/esm/__tests__/logdrains.test.js +7 -89
- package/esm/__tests__/logdrains.test.js.map +1 -1
- package/esm/__tests__/marketplace.test.js +7 -2
- package/esm/__tests__/marketplace.test.js.map +1 -1
- package/esm/__tests__/projects.test.js +4 -4
- package/esm/__tests__/projects.test.js.map +1 -1
- package/esm/__tests__/security.test.js +164 -17
- package/esm/__tests__/security.test.js.map +1 -1
- package/esm/funcs/securityPutFirewallConfig.d.ts +19 -0
- package/esm/funcs/securityPutFirewallConfig.d.ts.map +1 -0
- package/esm/funcs/{logDrainsCreateConfigurableLogDrain.js → securityPutFirewallConfig.js} +13 -11
- package/esm/funcs/securityPutFirewallConfig.js.map +1 -0
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/lib/matchers.d.ts +3 -1
- package/esm/lib/matchers.d.ts.map +1 -1
- package/esm/lib/matchers.js +10 -0
- package/esm/lib/matchers.js.map +1 -1
- package/esm/lib/sdks.js +7 -2
- package/esm/lib/sdks.js.map +1 -1
- 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 +3 -11
- package/esm/mcp-server/server.js.map +1 -1
- package/esm/mcp-server/tools/securityPutFirewallConfig.d.ts +7 -0
- package/esm/mcp-server/tools/securityPutFirewallConfig.d.ts.map +1 -0
- package/esm/mcp-server/tools/securityPutFirewallConfig.js +28 -0
- package/esm/mcp-server/tools/{integrationsGitNamespaces.js.map → securityPutFirewallConfig.js.map} +1 -1
- package/esm/models/authtoken.d.ts +6 -0
- package/esm/models/authtoken.d.ts.map +1 -1
- package/esm/models/authtoken.js +2 -0
- package/esm/models/authtoken.js.map +1 -1
- package/esm/models/authuser.d.ts +87 -0
- package/esm/models/authuser.d.ts.map +1 -1
- package/esm/models/authuser.js +57 -0
- package/esm/models/authuser.js.map +1 -1
- package/esm/models/canceldeploymentop.d.ts +277 -76
- package/esm/models/canceldeploymentop.d.ts.map +1 -1
- package/esm/models/canceldeploymentop.js +271 -73
- package/esm/models/canceldeploymentop.js.map +1 -1
- package/esm/models/createdeploymentop.d.ts +274 -73
- package/esm/models/createdeploymentop.d.ts.map +1 -1
- package/esm/models/createdeploymentop.js +270 -72
- package/esm/models/createdeploymentop.js.map +1 -1
- package/esm/models/createlogdrainop.d.ts +51 -51
- package/esm/models/createlogdrainop.d.ts.map +1 -1
- package/esm/models/createlogdrainop.js +74 -75
- package/esm/models/createlogdrainop.js.map +1 -1
- package/esm/models/createprojectenvop.d.ts +12 -18
- package/esm/models/createprojectenvop.d.ts.map +1 -1
- package/esm/models/createprojectenvop.js +12 -12
- package/esm/models/createprojectenvop.js.map +1 -1
- package/esm/models/createprojectop.d.ts +221 -29
- package/esm/models/createprojectop.d.ts.map +1 -1
- package/esm/models/createprojectop.js +174 -11
- package/esm/models/createprojectop.js.map +1 -1
- package/esm/models/editprojectenvop.d.ts +4 -7
- package/esm/models/editprojectenvop.d.ts.map +1 -1
- package/esm/models/editprojectenvop.js +4 -4
- package/esm/models/editprojectenvop.js.map +1 -1
- package/esm/models/exchangessotokenop.d.ts +34 -0
- package/esm/models/exchangessotokenop.d.ts.map +1 -1
- package/esm/models/exchangessotokenop.js +25 -0
- package/esm/models/exchangessotokenop.js.map +1 -1
- package/esm/models/filterprojectenvsop.d.ts +18 -27
- package/esm/models/filterprojectenvsop.d.ts.map +1 -1
- package/esm/models/filterprojectenvsop.js +18 -18
- package/esm/models/filterprojectenvsop.js.map +1 -1
- package/esm/models/getconfigurationsop.d.ts +19 -16
- package/esm/models/getconfigurationsop.d.ts.map +1 -1
- package/esm/models/getconfigurationsop.js +25 -27
- package/esm/models/getconfigurationsop.js.map +1 -1
- package/esm/models/getcustomenvironmentop.d.ts +3 -0
- package/esm/models/getcustomenvironmentop.d.ts.map +1 -1
- package/esm/models/getcustomenvironmentop.js.map +1 -1
- package/esm/models/getdeploymentop.d.ts +574 -172
- package/esm/models/getdeploymentop.d.ts.map +1 -1
- package/esm/models/getdeploymentop.js +567 -171
- package/esm/models/getdeploymentop.js.map +1 -1
- package/esm/models/getfirewallconfigop.d.ts +214 -214
- package/esm/models/getfirewallconfigop.d.ts.map +1 -1
- package/esm/models/getfirewallconfigop.js +210 -231
- package/esm/models/getfirewallconfigop.js.map +1 -1
- package/esm/models/getintegrationlogdrainsop.d.ts +11 -11
- package/esm/models/getintegrationlogdrainsop.d.ts.map +1 -1
- package/esm/models/getintegrationlogdrainsop.js +14 -13
- package/esm/models/getintegrationlogdrainsop.js.map +1 -1
- package/esm/models/getprojectdomainsop.d.ts +198 -36
- package/esm/models/getprojectdomainsop.d.ts.map +1 -1
- package/esm/models/getprojectdomainsop.js +193 -32
- package/esm/models/getprojectdomainsop.js.map +1 -1
- package/esm/models/getprojectenvop.d.ts +10 -16
- package/esm/models/getprojectenvop.d.ts.map +1 -1
- package/esm/models/getprojectenvop.js +10 -10
- package/esm/models/getprojectenvop.js.map +1 -1
- package/esm/models/getprojectsop.d.ts +221 -29
- package/esm/models/getprojectsop.d.ts.map +1 -1
- package/esm/models/getprojectsop.js +173 -11
- package/esm/models/getprojectsop.js.map +1 -1
- package/esm/models/getteammembersop.d.ts +9 -9
- package/esm/models/getteammembersop.js +3 -3
- package/esm/models/getteammembersop.js.map +1 -1
- package/esm/models/getv9projectsidornamecustomenvironmentsop.d.ts +3 -0
- package/esm/models/getv9projectsidornamecustomenvironmentsop.d.ts.map +1 -1
- package/esm/models/getv9projectsidornamecustomenvironmentsop.js.map +1 -1
- package/esm/models/putfirewallconfigop.d.ts +2901 -0
- package/esm/models/putfirewallconfigop.d.ts.map +1 -0
- package/esm/models/putfirewallconfigop.js +2383 -0
- package/esm/models/putfirewallconfigop.js.map +1 -0
- package/esm/models/removeprojectenvop.d.ts +18 -27
- package/esm/models/removeprojectenvop.d.ts.map +1 -1
- package/esm/models/removeprojectenvop.js +18 -18
- package/esm/models/removeprojectenvop.js.map +1 -1
- package/esm/models/updatefirewallconfigop.d.ts +323 -323
- package/esm/models/updatefirewallconfigop.d.ts.map +1 -1
- package/esm/models/updatefirewallconfigop.js +379 -357
- package/esm/models/updatefirewallconfigop.js.map +1 -1
- package/esm/models/updateprojectdatacacheop.d.ts +229 -37
- package/esm/models/updateprojectdatacacheop.d.ts.map +1 -1
- package/esm/models/updateprojectdatacacheop.js +189 -23
- package/esm/models/updateprojectdatacacheop.js.map +1 -1
- package/esm/models/updateprojectop.d.ts +221 -29
- package/esm/models/updateprojectop.d.ts.map +1 -1
- package/esm/models/updateprojectop.js +174 -11
- package/esm/models/updateprojectop.js.map +1 -1
- package/esm/models/userevent.d.ts +608 -524
- package/esm/models/userevent.d.ts.map +1 -1
- package/esm/models/userevent.js +748 -666
- package/esm/models/userevent.js.map +1 -1
- package/esm/sdk/integrations.d.ts +0 -16
- package/esm/sdk/integrations.d.ts.map +1 -1
- package/esm/sdk/integrations.js +0 -20
- package/esm/sdk/integrations.js.map +1 -1
- package/esm/sdk/logdrains.d.ts +0 -24
- package/esm/sdk/logdrains.d.ts.map +1 -1
- package/esm/sdk/logdrains.js +0 -30
- package/esm/sdk/logdrains.js.map +1 -1
- package/esm/sdk/security.d.ts +8 -0
- package/esm/sdk/security.d.ts.map +1 -1
- package/esm/sdk/security.js +10 -0
- package/esm/sdk/security.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +3 -3
- package/src/__tests__/deployments.test.ts +16 -1
- package/src/__tests__/integrations.test.ts +9 -44
- package/src/__tests__/logdrains.test.ts +13 -95
- package/src/__tests__/marketplace.test.ts +7 -2
- package/src/__tests__/projects.test.ts +4 -4
- package/src/__tests__/security.test.ts +166 -19
- package/src/funcs/{logDrainsCreateConfigurableLogDrain.ts → securityPutFirewallConfig.ts} +31 -22
- package/src/lib/config.ts +3 -3
- package/src/lib/matchers.ts +20 -0
- package/src/lib/sdks.ts +8 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +3 -11
- package/src/mcp-server/tools/securityPutFirewallConfig.ts +37 -0
- package/src/models/authtoken.ts +2 -0
- package/src/models/authuser.ts +126 -0
- package/src/models/canceldeploymentop.ts +592 -149
- package/src/models/createdeploymentop.ts +616 -165
- package/src/models/createlogdrainop.ts +95 -112
- package/src/models/createprojectenvop.ts +24 -30
- package/src/models/createprojectop.ts +378 -21
- package/src/models/editprojectenvop.ts +8 -11
- package/src/models/exchangessotokenop.ts +44 -0
- package/src/models/filterprojectenvsop.ts +36 -45
- package/src/models/getconfigurationsop.ts +34 -39
- package/src/models/getcustomenvironmentop.ts +3 -0
- package/src/models/getdeploymentop.ts +1288 -353
- package/src/models/getfirewallconfigop.ts +555 -410
- package/src/models/getintegrationlogdrainsop.ts +15 -20
- package/src/models/getprojectdomainsop.ts +470 -63
- package/src/models/getprojectenvop.ts +20 -26
- package/src/models/getprojectsop.ts +380 -22
- package/src/models/getteammembersop.ts +3 -3
- package/src/models/getv9projectsidornamecustomenvironmentsop.ts +3 -0
- package/src/models/putfirewallconfigop.ts +4932 -0
- package/src/models/removeprojectenvop.ts +36 -45
- package/src/models/updatefirewallconfigop.ts +820 -612
- package/src/models/updateprojectdatacacheop.ts +395 -40
- package/src/models/updateprojectop.ts +378 -21
- package/src/models/userevent.ts +1363 -1203
- package/src/sdk/integrations.ts +0 -44
- package/src/sdk/logdrains.ts +0 -66
- package/src/sdk/security.ts +22 -0
- package/vercel-spec.json +1780 -1622
- package/esm/funcs/integrationsGitNamespaces.d.ts +0 -18
- package/esm/funcs/integrationsGitNamespaces.d.ts.map +0 -1
- package/esm/funcs/integrationsGitNamespaces.js +0 -86
- package/esm/funcs/integrationsGitNamespaces.js.map +0 -1
- package/esm/funcs/integrationsSearchRepo.d.ts +0 -17
- package/esm/funcs/integrationsSearchRepo.d.ts.map +0 -1
- package/esm/funcs/integrationsSearchRepo.js +0 -89
- package/esm/funcs/integrationsSearchRepo.js.map +0 -1
- package/esm/funcs/logDrainsCreateConfigurableLogDrain.d.ts +0 -18
- package/esm/funcs/logDrainsCreateConfigurableLogDrain.d.ts.map +0 -1
- package/esm/funcs/logDrainsCreateConfigurableLogDrain.js.map +0 -1
- package/esm/funcs/logDrainsGetAllLogDrains.d.ts +0 -18
- package/esm/funcs/logDrainsGetAllLogDrains.d.ts.map +0 -1
- package/esm/funcs/logDrainsGetAllLogDrains.js +0 -88
- package/esm/funcs/logDrainsGetAllLogDrains.js.map +0 -1
- package/esm/funcs/logDrainsGetConfigurableLogDrain.d.ts +0 -19
- package/esm/funcs/logDrainsGetConfigurableLogDrain.d.ts.map +0 -1
- package/esm/funcs/logDrainsGetConfigurableLogDrain.js +0 -92
- package/esm/funcs/logDrainsGetConfigurableLogDrain.js.map +0 -1
- package/esm/mcp-server/tools/integrationsGitNamespaces.d.ts +0 -7
- package/esm/mcp-server/tools/integrationsGitNamespaces.d.ts.map +0 -1
- package/esm/mcp-server/tools/integrationsGitNamespaces.js +0 -28
- package/esm/mcp-server/tools/integrationsSearchRepo.d.ts +0 -7
- package/esm/mcp-server/tools/integrationsSearchRepo.d.ts.map +0 -1
- package/esm/mcp-server/tools/integrationsSearchRepo.js +0 -28
- package/esm/mcp-server/tools/integrationsSearchRepo.js.map +0 -1
- package/esm/mcp-server/tools/logDrainsCreateConfigurableLogDrain.d.ts +0 -7
- package/esm/mcp-server/tools/logDrainsCreateConfigurableLogDrain.d.ts.map +0 -1
- package/esm/mcp-server/tools/logDrainsCreateConfigurableLogDrain.js +0 -28
- package/esm/mcp-server/tools/logDrainsCreateConfigurableLogDrain.js.map +0 -1
- package/esm/mcp-server/tools/logDrainsGetAllLogDrains.d.ts +0 -7
- package/esm/mcp-server/tools/logDrainsGetAllLogDrains.d.ts.map +0 -1
- package/esm/mcp-server/tools/logDrainsGetAllLogDrains.js +0 -28
- package/esm/mcp-server/tools/logDrainsGetAllLogDrains.js.map +0 -1
- package/esm/mcp-server/tools/logDrainsGetConfigurableLogDrain.d.ts +0 -7
- package/esm/mcp-server/tools/logDrainsGetConfigurableLogDrain.d.ts.map +0 -1
- package/esm/mcp-server/tools/logDrainsGetConfigurableLogDrain.js +0 -28
- package/esm/mcp-server/tools/logDrainsGetConfigurableLogDrain.js.map +0 -1
- package/esm/models/createconfigurablelogdrainop.d.ts +0 -451
- package/esm/models/createconfigurablelogdrainop.d.ts.map +0 -1
- package/esm/models/createconfigurablelogdrainop.js +0 -348
- package/esm/models/createconfigurablelogdrainop.js.map +0 -1
- package/esm/models/getalllogdrainsop.d.ts +0 -294
- package/esm/models/getalllogdrainsop.d.ts.map +0 -1
- package/esm/models/getalllogdrainsop.js +0 -231
- package/esm/models/getalllogdrainsop.js.map +0 -1
- package/esm/models/getconfigurablelogdrainop.d.ts +0 -292
- package/esm/models/getconfigurablelogdrainop.d.ts.map +0 -1
- package/esm/models/getconfigurablelogdrainop.js +0 -230
- package/esm/models/getconfigurablelogdrainop.js.map +0 -1
- package/esm/models/gitnamespacesop.d.ts +0 -126
- package/esm/models/gitnamespacesop.d.ts.map +0 -1
- package/esm/models/gitnamespacesop.js +0 -115
- package/esm/models/gitnamespacesop.js.map +0 -1
- package/esm/models/searchrepoop.d.ts +0 -421
- package/esm/models/searchrepoop.d.ts.map +0 -1
- package/esm/models/searchrepoop.js +0 -385
- package/esm/models/searchrepoop.js.map +0 -1
- package/src/funcs/integrationsGitNamespaces.ts +0 -185
- package/src/funcs/integrationsSearchRepo.ts +0 -181
- package/src/funcs/logDrainsGetAllLogDrains.ts +0 -187
- package/src/funcs/logDrainsGetConfigurableLogDrain.ts +0 -199
- package/src/mcp-server/tools/integrationsGitNamespaces.ts +0 -37
- package/src/mcp-server/tools/integrationsSearchRepo.ts +0 -37
- package/src/mcp-server/tools/logDrainsCreateConfigurableLogDrain.ts +0 -39
- package/src/mcp-server/tools/logDrainsGetAllLogDrains.ts +0 -37
- package/src/mcp-server/tools/logDrainsGetConfigurableLogDrain.ts +0 -39
- package/src/models/createconfigurablelogdrainop.ts +0 -652
- package/src/models/getalllogdrainsop.ts +0 -416
- package/src/models/getconfigurablelogdrainop.ts +0 -420
- package/src/models/gitnamespacesop.ts +0 -235
- package/src/models/searchrepoop.ts +0 -784
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { expect, test } from "vitest";
|
|
6
6
|
import { Vercel } from "../index.js";
|
|
7
7
|
import { createTestHTTPClient } from "./testclient.js";
|
|
8
8
|
|
|
@@ -30,10 +30,170 @@ test("Security Update Attack Challenge Mode", async () => {
|
|
|
30
30
|
});
|
|
31
31
|
});
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
test("Security Put Firewall Config", async () => {
|
|
34
|
+
const testHttpClient = createTestHTTPClient("putFirewallConfig");
|
|
35
|
+
|
|
36
|
+
const vercel = new Vercel({
|
|
37
|
+
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
38
|
+
httpClient: testHttpClient,
|
|
39
|
+
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
const result = await vercel.security.putFirewallConfig({
|
|
43
|
+
projectId: "<id>",
|
|
44
|
+
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
|
|
45
|
+
slug: "my-team-url-slug",
|
|
46
|
+
requestBody: {
|
|
47
|
+
firewallEnabled: true,
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
expect(result).toBeDefined();
|
|
51
|
+
expect(result).toEqual({
|
|
52
|
+
active: {
|
|
53
|
+
ownerId: "<id>",
|
|
54
|
+
projectKey: "<value>",
|
|
55
|
+
id: "<id>",
|
|
56
|
+
version: 4570.86,
|
|
57
|
+
updatedAt: "<value>",
|
|
58
|
+
firewallEnabled: true,
|
|
59
|
+
crs: {
|
|
60
|
+
sd: {
|
|
61
|
+
active: false,
|
|
62
|
+
action: "deny",
|
|
63
|
+
},
|
|
64
|
+
ma: {
|
|
65
|
+
active: false,
|
|
66
|
+
action: "log",
|
|
67
|
+
},
|
|
68
|
+
lfi: {
|
|
69
|
+
active: false,
|
|
70
|
+
action: "log",
|
|
71
|
+
},
|
|
72
|
+
rfi: {
|
|
73
|
+
active: false,
|
|
74
|
+
action: "deny",
|
|
75
|
+
},
|
|
76
|
+
rce: {
|
|
77
|
+
active: false,
|
|
78
|
+
action: "deny",
|
|
79
|
+
},
|
|
80
|
+
php: {
|
|
81
|
+
active: true,
|
|
82
|
+
action: "deny",
|
|
83
|
+
},
|
|
84
|
+
gen: {
|
|
85
|
+
active: false,
|
|
86
|
+
action: "deny",
|
|
87
|
+
},
|
|
88
|
+
xss: {
|
|
89
|
+
active: false,
|
|
90
|
+
action: "deny",
|
|
91
|
+
},
|
|
92
|
+
sqli: {
|
|
93
|
+
active: true,
|
|
94
|
+
action: "log",
|
|
95
|
+
},
|
|
96
|
+
sf: {
|
|
97
|
+
active: true,
|
|
98
|
+
action: "deny",
|
|
99
|
+
},
|
|
100
|
+
java: {
|
|
101
|
+
active: true,
|
|
102
|
+
action: "log",
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
rules: [
|
|
106
|
+
{
|
|
107
|
+
id: "<id>",
|
|
108
|
+
name: "<value>",
|
|
109
|
+
active: true,
|
|
110
|
+
conditionGroup: [
|
|
111
|
+
{
|
|
112
|
+
conditions: [
|
|
113
|
+
{
|
|
114
|
+
type: "ip_address",
|
|
115
|
+
op: "suf",
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
type: "geo_as_number",
|
|
119
|
+
op: "pre",
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
type: "ja3_digest",
|
|
123
|
+
op: "inc",
|
|
124
|
+
},
|
|
125
|
+
],
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
conditions: [
|
|
129
|
+
{
|
|
130
|
+
type: "geo_as_number",
|
|
131
|
+
op: "neq",
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
type: "protocol",
|
|
135
|
+
op: "sub",
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
type: "ja3_digest",
|
|
139
|
+
op: "suf",
|
|
140
|
+
},
|
|
141
|
+
],
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
conditions: [
|
|
145
|
+
{
|
|
146
|
+
type: "region",
|
|
147
|
+
op: "neq",
|
|
148
|
+
},
|
|
149
|
+
],
|
|
150
|
+
},
|
|
151
|
+
],
|
|
152
|
+
action: {},
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
id: "<id>",
|
|
156
|
+
name: "<value>",
|
|
157
|
+
active: false,
|
|
158
|
+
conditionGroup: [],
|
|
159
|
+
action: {},
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
id: "<id>",
|
|
163
|
+
name: "<value>",
|
|
164
|
+
active: false,
|
|
165
|
+
conditionGroup: [
|
|
166
|
+
{
|
|
167
|
+
conditions: [
|
|
168
|
+
{
|
|
169
|
+
type: "scheme",
|
|
170
|
+
op: "neq",
|
|
171
|
+
},
|
|
172
|
+
],
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
conditions: [],
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
conditions: [
|
|
179
|
+
{
|
|
180
|
+
type: "header",
|
|
181
|
+
op: "inc",
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
type: "query",
|
|
185
|
+
op: "eq",
|
|
186
|
+
},
|
|
187
|
+
],
|
|
188
|
+
},
|
|
189
|
+
],
|
|
190
|
+
action: {},
|
|
191
|
+
},
|
|
192
|
+
],
|
|
193
|
+
ips: [],
|
|
194
|
+
changes: [],
|
|
195
|
+
},
|
|
196
|
+
});
|
|
37
197
|
});
|
|
38
198
|
|
|
39
199
|
test("Security Update Firewall Config", async () => {
|
|
@@ -189,20 +349,7 @@ test("Security Get Bypass Ip", async () => {
|
|
|
189
349
|
slug: "my-team-url-slug",
|
|
190
350
|
});
|
|
191
351
|
expect(result).toBeDefined();
|
|
192
|
-
expect(result).toEqual({
|
|
193
|
-
result: [
|
|
194
|
-
{
|
|
195
|
-
ownerId: "<id>",
|
|
196
|
-
id: "<id>",
|
|
197
|
-
domain: "unfinished-lender.info",
|
|
198
|
-
ip: "cae5:14bd:ddd0:3cea:5afd:1bfe:276c:9c15",
|
|
199
|
-
createdAt: "1718184278808",
|
|
200
|
-
updatedAt: "1744577466408",
|
|
201
|
-
updatedAtHour: "<value>",
|
|
202
|
-
},
|
|
203
|
-
],
|
|
204
|
-
pagination: "<value>",
|
|
205
|
-
});
|
|
352
|
+
expect(result).toEqual({});
|
|
206
353
|
});
|
|
207
354
|
|
|
208
355
|
test("Security Add Bypass Ip", async () => {
|
|
@@ -10,12 +10,6 @@ import { safeParse } from "../lib/schemas.js";
|
|
|
10
10
|
import { RequestOptions } from "../lib/sdks.js";
|
|
11
11
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
12
|
import { pathToFunc } from "../lib/url.js";
|
|
13
|
-
import {
|
|
14
|
-
CreateConfigurableLogDrainRequest,
|
|
15
|
-
CreateConfigurableLogDrainRequest$outboundSchema,
|
|
16
|
-
CreateConfigurableLogDrainResponseBody,
|
|
17
|
-
CreateConfigurableLogDrainResponseBody$inboundSchema,
|
|
18
|
-
} from "../models/createconfigurablelogdrainop.js";
|
|
19
13
|
import {
|
|
20
14
|
ConnectionError,
|
|
21
15
|
InvalidRequestError,
|
|
@@ -23,6 +17,12 @@ import {
|
|
|
23
17
|
RequestTimeoutError,
|
|
24
18
|
UnexpectedClientError,
|
|
25
19
|
} from "../models/httpclienterrors.js";
|
|
20
|
+
import {
|
|
21
|
+
PutFirewallConfigRequest,
|
|
22
|
+
PutFirewallConfigRequest$outboundSchema,
|
|
23
|
+
PutFirewallConfigResponseBody,
|
|
24
|
+
PutFirewallConfigResponseBody$inboundSchema,
|
|
25
|
+
} from "../models/putfirewallconfigop.js";
|
|
26
26
|
import { SDKError } from "../models/sdkerror.js";
|
|
27
27
|
import { SDKValidationError } from "../models/sdkvalidationerror.js";
|
|
28
28
|
import {
|
|
@@ -33,24 +33,29 @@ import {
|
|
|
33
33
|
VercelForbiddenError,
|
|
34
34
|
VercelForbiddenError$inboundSchema,
|
|
35
35
|
} from "../models/vercelforbiddenerror.js";
|
|
36
|
+
import {
|
|
37
|
+
VercelNotFoundError,
|
|
38
|
+
VercelNotFoundError$inboundSchema,
|
|
39
|
+
} from "../models/vercelnotfounderror.js";
|
|
36
40
|
import { APICall, APIPromise } from "../types/async.js";
|
|
37
41
|
import { Result } from "../types/fp.js";
|
|
38
42
|
|
|
39
43
|
/**
|
|
40
|
-
*
|
|
44
|
+
* Put Firewall Configuration
|
|
41
45
|
*
|
|
42
46
|
* @remarks
|
|
43
|
-
*
|
|
47
|
+
* Set the firewall configuration to provided rules and settings. Creates or overwrite the existing firewall configuration.
|
|
44
48
|
*/
|
|
45
|
-
export function
|
|
49
|
+
export function securityPutFirewallConfig(
|
|
46
50
|
client: VercelCore,
|
|
47
|
-
request:
|
|
51
|
+
request: PutFirewallConfigRequest,
|
|
48
52
|
options?: RequestOptions,
|
|
49
53
|
): APIPromise<
|
|
50
54
|
Result<
|
|
51
|
-
|
|
55
|
+
PutFirewallConfigResponseBody,
|
|
52
56
|
| VercelBadRequestError
|
|
53
57
|
| VercelForbiddenError
|
|
58
|
+
| VercelNotFoundError
|
|
54
59
|
| SDKError
|
|
55
60
|
| SDKValidationError
|
|
56
61
|
| UnexpectedClientError
|
|
@@ -69,14 +74,15 @@ export function logDrainsCreateConfigurableLogDrain(
|
|
|
69
74
|
|
|
70
75
|
async function $do(
|
|
71
76
|
client: VercelCore,
|
|
72
|
-
request:
|
|
77
|
+
request: PutFirewallConfigRequest,
|
|
73
78
|
options?: RequestOptions,
|
|
74
79
|
): Promise<
|
|
75
80
|
[
|
|
76
81
|
Result<
|
|
77
|
-
|
|
82
|
+
PutFirewallConfigResponseBody,
|
|
78
83
|
| VercelBadRequestError
|
|
79
84
|
| VercelForbiddenError
|
|
85
|
+
| VercelNotFoundError
|
|
80
86
|
| SDKError
|
|
81
87
|
| SDKValidationError
|
|
82
88
|
| UnexpectedClientError
|
|
@@ -90,7 +96,7 @@ async function $do(
|
|
|
90
96
|
> {
|
|
91
97
|
const parsed = safeParse(
|
|
92
98
|
request,
|
|
93
|
-
(value) =>
|
|
99
|
+
(value) => PutFirewallConfigRequest$outboundSchema.parse(value),
|
|
94
100
|
"Input validation failed",
|
|
95
101
|
);
|
|
96
102
|
if (!parsed.ok) {
|
|
@@ -99,9 +105,10 @@ async function $do(
|
|
|
99
105
|
const payload = parsed.value;
|
|
100
106
|
const body = encodeJSON("body", payload.RequestBody, { explode: true });
|
|
101
107
|
|
|
102
|
-
const path = pathToFunc("/v1/
|
|
108
|
+
const path = pathToFunc("/v1/security/firewall/config")();
|
|
103
109
|
|
|
104
110
|
const query = encodeFormQuery({
|
|
111
|
+
"projectId": payload.projectId,
|
|
105
112
|
"slug": payload.slug,
|
|
106
113
|
"teamId": payload.teamId,
|
|
107
114
|
});
|
|
@@ -117,7 +124,7 @@ async function $do(
|
|
|
117
124
|
|
|
118
125
|
const context = {
|
|
119
126
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
120
|
-
operationID: "
|
|
127
|
+
operationID: "putFirewallConfig",
|
|
121
128
|
oAuth2Scopes: [],
|
|
122
129
|
|
|
123
130
|
resolvedSecurity: requestSecurity,
|
|
@@ -131,7 +138,7 @@ async function $do(
|
|
|
131
138
|
|
|
132
139
|
const requestRes = client._createRequest(context, {
|
|
133
140
|
security: requestSecurity,
|
|
134
|
-
method: "
|
|
141
|
+
method: "PUT",
|
|
135
142
|
baseURL: options?.serverURL,
|
|
136
143
|
path: path,
|
|
137
144
|
headers: headers,
|
|
@@ -146,7 +153,7 @@ async function $do(
|
|
|
146
153
|
|
|
147
154
|
const doResult = await client._do(req, {
|
|
148
155
|
context,
|
|
149
|
-
errorCodes: ["400", "401", "403", "4XX", "5XX"],
|
|
156
|
+
errorCodes: ["400", "401", "402", "403", "404", "4XX", "500", "5XX"],
|
|
150
157
|
retryConfig: context.retryConfig,
|
|
151
158
|
retryCodes: context.retryCodes,
|
|
152
159
|
});
|
|
@@ -160,9 +167,10 @@ async function $do(
|
|
|
160
167
|
};
|
|
161
168
|
|
|
162
169
|
const [result] = await M.match<
|
|
163
|
-
|
|
170
|
+
PutFirewallConfigResponseBody,
|
|
164
171
|
| VercelBadRequestError
|
|
165
172
|
| VercelForbiddenError
|
|
173
|
+
| VercelNotFoundError
|
|
166
174
|
| SDKError
|
|
167
175
|
| SDKValidationError
|
|
168
176
|
| UnexpectedClientError
|
|
@@ -171,11 +179,12 @@ async function $do(
|
|
|
171
179
|
| RequestTimeoutError
|
|
172
180
|
| ConnectionError
|
|
173
181
|
>(
|
|
174
|
-
M.json(200,
|
|
182
|
+
M.json(200, PutFirewallConfigResponseBody$inboundSchema),
|
|
175
183
|
M.jsonErr(400, VercelBadRequestError$inboundSchema),
|
|
176
184
|
M.jsonErr(401, VercelForbiddenError$inboundSchema),
|
|
177
|
-
M.
|
|
178
|
-
M.fail("
|
|
185
|
+
M.jsonErr(404, VercelNotFoundError$inboundSchema),
|
|
186
|
+
M.fail([402, 403, "4XX"]),
|
|
187
|
+
M.fail([500, "5XX"]),
|
|
179
188
|
)(response, { extraFields: responseFields });
|
|
180
189
|
if (!result.ok) {
|
|
181
190
|
return [result, { status: "complete", request: req, response }];
|
package/src/lib/config.ts
CHANGED
|
@@ -57,7 +57,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
57
57
|
export const SDK_METADATA = {
|
|
58
58
|
language: "typescript",
|
|
59
59
|
openapiDocVersion: "0.0.1",
|
|
60
|
-
sdkVersion: "1.6.
|
|
61
|
-
genVersion: "2.
|
|
62
|
-
userAgent: "speakeasy-sdk/typescript 1.6.
|
|
60
|
+
sdkVersion: "1.6.4",
|
|
61
|
+
genVersion: "2.593.3",
|
|
62
|
+
userAgent: "speakeasy-sdk/typescript 1.6.4 2.593.3 0.0.1 @vercel/sdk",
|
|
63
63
|
} as const;
|
package/src/lib/matchers.ts
CHANGED
|
@@ -10,6 +10,7 @@ import { isPlainObject } from "./is-plain-object.js";
|
|
|
10
10
|
import { safeParse } from "./schemas.js";
|
|
11
11
|
|
|
12
12
|
export type Encoding =
|
|
13
|
+
| "jsonl"
|
|
13
14
|
| "json"
|
|
14
15
|
| "text"
|
|
15
16
|
| "bytes"
|
|
@@ -19,6 +20,7 @@ export type Encoding =
|
|
|
19
20
|
| "fail";
|
|
20
21
|
|
|
21
22
|
const DEFAULT_CONTENT_TYPES: Record<Encoding, string> = {
|
|
23
|
+
jsonl: "application/jsonl",
|
|
22
24
|
json: "application/json",
|
|
23
25
|
text: "text/plain",
|
|
24
26
|
bytes: "application/octet-stream",
|
|
@@ -72,6 +74,21 @@ export function json<T>(
|
|
|
72
74
|
return { ...options, enc: "json", codes, schema };
|
|
73
75
|
}
|
|
74
76
|
|
|
77
|
+
export function jsonl<T>(
|
|
78
|
+
codes: StatusCodePredicate,
|
|
79
|
+
schema: Schema<T>,
|
|
80
|
+
options?: MatchOptions,
|
|
81
|
+
): ValueMatcher<T> {
|
|
82
|
+
return { ...options, enc: "jsonl", codes, schema };
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function jsonlErr<E>(
|
|
86
|
+
codes: StatusCodePredicate,
|
|
87
|
+
schema: Schema<E>,
|
|
88
|
+
options?: MatchOptions,
|
|
89
|
+
): ErrorMatcher<E> {
|
|
90
|
+
return { ...options, err: true, enc: "jsonl", codes, schema };
|
|
91
|
+
}
|
|
75
92
|
export function textErr<E>(
|
|
76
93
|
codes: StatusCodePredicate,
|
|
77
94
|
schema: Schema<E>,
|
|
@@ -204,6 +221,9 @@ export function match<T, E>(
|
|
|
204
221
|
case "json":
|
|
205
222
|
raw = await response.json();
|
|
206
223
|
break;
|
|
224
|
+
case "jsonl":
|
|
225
|
+
raw = response.body;
|
|
226
|
+
break;
|
|
207
227
|
case "bytes":
|
|
208
228
|
raw = new Uint8Array(await response.arrayBuffer());
|
|
209
229
|
break;
|
package/src/lib/sdks.ts
CHANGED
|
@@ -298,7 +298,9 @@ export class ClientSDK {
|
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
300
|
|
|
301
|
-
const jsonLikeContentTypeRE =
|
|
301
|
+
const jsonLikeContentTypeRE = /(application|text)\/.*?\+*json.*/;
|
|
302
|
+
const jsonlLikeContentTypeRE =
|
|
303
|
+
/(application|text)\/(.*?\+*\bjsonl\b.*|.*?\+*\bx-ndjson\b.*)/;
|
|
302
304
|
async function logRequest(logger: Logger | undefined, req: Request) {
|
|
303
305
|
if (!logger) {
|
|
304
306
|
return;
|
|
@@ -364,9 +366,13 @@ async function logResponse(
|
|
|
364
366
|
logger.group("Body:");
|
|
365
367
|
switch (true) {
|
|
366
368
|
case matchContentType(res, "application/json")
|
|
367
|
-
|| jsonLikeContentTypeRE.test(ct):
|
|
369
|
+
|| jsonLikeContentTypeRE.test(ct) && !jsonlLikeContentTypeRE.test(ct):
|
|
368
370
|
logger.log(await res.clone().json());
|
|
369
371
|
break;
|
|
372
|
+
case matchContentType(res, "application/jsonl")
|
|
373
|
+
|| jsonlLikeContentTypeRE.test(ct):
|
|
374
|
+
logger.log(await res.clone().text());
|
|
375
|
+
break;
|
|
370
376
|
case matchContentType(res, "text/event-stream"):
|
|
371
377
|
logger.log(`<${contentType}>`);
|
|
372
378
|
break;
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -97,15 +97,10 @@ import { tool$environmentUpdateCustomEnvironment } from "./tools/environmentUpda
|
|
|
97
97
|
import { tool$integrationsDeleteConfiguration } from "./tools/integrationsDeleteConfiguration.js";
|
|
98
98
|
import { tool$integrationsGetConfiguration } from "./tools/integrationsGetConfiguration.js";
|
|
99
99
|
import { tool$integrationsGetConfigurations } from "./tools/integrationsGetConfigurations.js";
|
|
100
|
-
import { tool$integrationsGitNamespaces } from "./tools/integrationsGitNamespaces.js";
|
|
101
|
-
import { tool$integrationsSearchRepo } from "./tools/integrationsSearchRepo.js";
|
|
102
100
|
import { tool$integrationsUpdateIntegrationDeploymentAction } from "./tools/integrationsUpdateIntegrationDeploymentAction.js";
|
|
103
|
-
import { tool$logDrainsCreateConfigurableLogDrain } from "./tools/logDrainsCreateConfigurableLogDrain.js";
|
|
104
101
|
import { tool$logDrainsCreateLogDrain } from "./tools/logDrainsCreateLogDrain.js";
|
|
105
102
|
import { tool$logDrainsDeleteConfigurableLogDrain } from "./tools/logDrainsDeleteConfigurableLogDrain.js";
|
|
106
103
|
import { tool$logDrainsDeleteIntegrationLogDrain } from "./tools/logDrainsDeleteIntegrationLogDrain.js";
|
|
107
|
-
import { tool$logDrainsGetAllLogDrains } from "./tools/logDrainsGetAllLogDrains.js";
|
|
108
|
-
import { tool$logDrainsGetConfigurableLogDrain } from "./tools/logDrainsGetConfigurableLogDrain.js";
|
|
109
104
|
import { tool$logDrainsGetIntegrationLogDrains } from "./tools/logDrainsGetIntegrationLogDrains.js";
|
|
110
105
|
import { tool$marketplaceCreateEvent } from "./tools/marketplaceCreateEvent.js";
|
|
111
106
|
import { tool$marketplaceCreateInstallationIntegrationConfiguration } from "./tools/marketplaceCreateInstallationIntegrationConfiguration.js";
|
|
@@ -154,6 +149,7 @@ import { tool$securityAddBypassIp } from "./tools/securityAddBypassIp.js";
|
|
|
154
149
|
import { tool$securityGetActiveAttackStatus } from "./tools/securityGetActiveAttackStatus.js";
|
|
155
150
|
import { tool$securityGetBypassIp } from "./tools/securityGetBypassIp.js";
|
|
156
151
|
import { tool$securityGetFirewallConfig } from "./tools/securityGetFirewallConfig.js";
|
|
152
|
+
import { tool$securityPutFirewallConfig } from "./tools/securityPutFirewallConfig.js";
|
|
157
153
|
import { tool$securityRemoveBypassIp } from "./tools/securityRemoveBypassIp.js";
|
|
158
154
|
import { tool$securityUpdateAttackChallengeMode } from "./tools/securityUpdateAttackChallengeMode.js";
|
|
159
155
|
import { tool$securityUpdateFirewallConfig } from "./tools/securityUpdateFirewallConfig.js";
|
|
@@ -188,7 +184,7 @@ export function createMCPServer(deps: {
|
|
|
188
184
|
}) {
|
|
189
185
|
const server = new McpServer({
|
|
190
186
|
name: "Vercel",
|
|
191
|
-
version: "1.6.
|
|
187
|
+
version: "1.6.4",
|
|
192
188
|
});
|
|
193
189
|
|
|
194
190
|
const client = new VercelCore({
|
|
@@ -277,8 +273,6 @@ export function createMCPServer(deps: {
|
|
|
277
273
|
tool(tool$integrationsGetConfigurations);
|
|
278
274
|
tool(tool$integrationsGetConfiguration);
|
|
279
275
|
tool(tool$integrationsDeleteConfiguration);
|
|
280
|
-
tool(tool$integrationsGitNamespaces);
|
|
281
|
-
tool(tool$integrationsSearchRepo);
|
|
282
276
|
tool(tool$domainsBuyDomain);
|
|
283
277
|
tool(tool$domainsCheckDomainPrice);
|
|
284
278
|
tool(tool$domainsCheckDomainStatus);
|
|
@@ -293,10 +287,7 @@ export function createMCPServer(deps: {
|
|
|
293
287
|
tool(tool$dnsCreateRecord);
|
|
294
288
|
tool(tool$dnsUpdateRecord);
|
|
295
289
|
tool(tool$dnsRemoveRecord);
|
|
296
|
-
tool(tool$logDrainsGetConfigurableLogDrain);
|
|
297
290
|
tool(tool$logDrainsDeleteConfigurableLogDrain);
|
|
298
|
-
tool(tool$logDrainsGetAllLogDrains);
|
|
299
|
-
tool(tool$logDrainsCreateConfigurableLogDrain);
|
|
300
291
|
tool(tool$logDrainsGetIntegrationLogDrains);
|
|
301
292
|
tool(tool$logDrainsCreateLogDrain);
|
|
302
293
|
tool(tool$logDrainsDeleteIntegrationLogDrain);
|
|
@@ -350,6 +341,7 @@ export function createMCPServer(deps: {
|
|
|
350
341
|
tool(tool$environmentUpdateCustomEnvironment);
|
|
351
342
|
tool(tool$environmentRemoveCustomEnvironment);
|
|
352
343
|
tool(tool$securityUpdateAttackChallengeMode);
|
|
344
|
+
tool(tool$securityPutFirewallConfig);
|
|
353
345
|
tool(tool$securityUpdateFirewallConfig);
|
|
354
346
|
tool(tool$securityGetFirewallConfig);
|
|
355
347
|
tool(tool$securityGetActiveAttackStatus);
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { securityPutFirewallConfig } from "../../funcs/securityPutFirewallConfig.js";
|
|
6
|
+
import { PutFirewallConfigRequest$inboundSchema } from "../../models/putfirewallconfigop.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: PutFirewallConfigRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$securityPutFirewallConfig: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "security-put-firewall-config",
|
|
15
|
+
description: `Put Firewall Configuration
|
|
16
|
+
|
|
17
|
+
Set the firewall configuration to provided rules and settings. Creates or overwrite the existing firewall configuration.`,
|
|
18
|
+
args,
|
|
19
|
+
tool: async (client, args, ctx) => {
|
|
20
|
+
const [result, apiCall] = await securityPutFirewallConfig(
|
|
21
|
+
client,
|
|
22
|
+
args.request,
|
|
23
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
24
|
+
).$inspect();
|
|
25
|
+
|
|
26
|
+
if (!result.ok) {
|
|
27
|
+
return {
|
|
28
|
+
content: [{ type: "text", text: result.error.message }],
|
|
29
|
+
isError: true,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const value = result.value;
|
|
34
|
+
|
|
35
|
+
return formatResult(value, apiCall);
|
|
36
|
+
},
|
|
37
|
+
};
|
package/src/models/authtoken.ts
CHANGED
|
@@ -24,6 +24,7 @@ export const AuthTokenScopesOrigin = {
|
|
|
24
24
|
Otp: "otp",
|
|
25
25
|
Sms: "sms",
|
|
26
26
|
Invite: "invite",
|
|
27
|
+
Google: "google",
|
|
27
28
|
} as const;
|
|
28
29
|
export type AuthTokenScopesOrigin = ClosedEnum<typeof AuthTokenScopesOrigin>;
|
|
29
30
|
|
|
@@ -75,6 +76,7 @@ export const ScopesOrigin = {
|
|
|
75
76
|
Otp: "otp",
|
|
76
77
|
Sms: "sms",
|
|
77
78
|
Invite: "invite",
|
|
79
|
+
Google: "google",
|
|
78
80
|
} as const;
|
|
79
81
|
export type ScopesOrigin = ClosedEnum<typeof ScopesOrigin>;
|
|
80
82
|
|