@vercel/sdk 1.17.3 → 1.17.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.
Files changed (84) hide show
  1. package/README.md +28 -24
  2. package/bin/mcp-server.js +1270 -988
  3. package/bin/mcp-server.js.map +15 -9
  4. package/esm/__tests__/accessgroups.test.js +3 -1
  5. package/esm/__tests__/accessgroups.test.js.map +1 -1
  6. package/esm/__tests__/domains.test.js +4 -10
  7. package/esm/__tests__/domains.test.js.map +1 -1
  8. package/esm/__tests__/edgeconfig.test.js +6 -6
  9. package/esm/__tests__/edgeconfig.test.js.map +1 -1
  10. package/esm/__tests__/rollingrelease.test.js +2 -6
  11. package/esm/__tests__/rollingrelease.test.js.map +1 -1
  12. package/esm/__tests__/security.test.js +4 -4
  13. package/esm/__tests__/security.test.js.map +1 -1
  14. package/esm/__tests__/teams.test.js +2 -2
  15. package/esm/__tests__/teams.test.js.map +1 -1
  16. package/esm/funcs/edgeCacheDangerouslyDeleteBySrcImages.d.ts +17 -0
  17. package/esm/funcs/edgeCacheDangerouslyDeleteBySrcImages.d.ts.map +1 -0
  18. package/esm/funcs/edgeCacheDangerouslyDeleteBySrcImages.js +85 -0
  19. package/esm/funcs/edgeCacheDangerouslyDeleteBySrcImages.js.map +1 -0
  20. package/esm/funcs/edgeCacheInvalidateBySrcImages.d.ts +17 -0
  21. package/esm/funcs/edgeCacheInvalidateBySrcImages.d.ts.map +1 -0
  22. package/esm/funcs/edgeCacheInvalidateBySrcImages.js +85 -0
  23. package/esm/funcs/edgeCacheInvalidateBySrcImages.js.map +1 -0
  24. package/esm/lib/config.d.ts +2 -2
  25. package/esm/lib/config.js +2 -2
  26. package/esm/mcp-server/mcp-server.js +1 -1
  27. package/esm/mcp-server/server.d.ts.map +1 -1
  28. package/esm/mcp-server/server.js +5 -1
  29. package/esm/mcp-server/server.js.map +1 -1
  30. package/esm/mcp-server/tools/edgeCacheDangerouslyDeleteBySrcImages.d.ts +7 -0
  31. package/esm/mcp-server/tools/edgeCacheDangerouslyDeleteBySrcImages.d.ts.map +1 -0
  32. package/esm/mcp-server/tools/edgeCacheDangerouslyDeleteBySrcImages.js +27 -0
  33. package/esm/mcp-server/tools/edgeCacheDangerouslyDeleteBySrcImages.js.map +1 -0
  34. package/esm/mcp-server/tools/edgeCacheInvalidateBySrcImages.d.ts +7 -0
  35. package/esm/mcp-server/tools/edgeCacheInvalidateBySrcImages.d.ts.map +1 -0
  36. package/esm/mcp-server/tools/edgeCacheInvalidateBySrcImages.js +27 -0
  37. package/esm/mcp-server/tools/edgeCacheInvalidateBySrcImages.js.map +1 -0
  38. package/esm/models/createprojectop.d.ts +18 -18
  39. package/esm/models/createprojectop.d.ts.map +1 -1
  40. package/esm/models/createprojectop.js +18 -18
  41. package/esm/models/createprojectop.js.map +1 -1
  42. package/esm/models/dangerouslydeletebysrcimagesop.d.ts +44 -0
  43. package/esm/models/dangerouslydeletebysrcimagesop.d.ts.map +1 -0
  44. package/esm/models/dangerouslydeletebysrcimagesop.js +51 -0
  45. package/esm/models/dangerouslydeletebysrcimagesop.js.map +1 -0
  46. package/esm/models/invalidatebysrcimagesop.d.ts +42 -0
  47. package/esm/models/invalidatebysrcimagesop.d.ts.map +1 -0
  48. package/esm/models/invalidatebysrcimagesop.js +51 -0
  49. package/esm/models/invalidatebysrcimagesop.js.map +1 -0
  50. package/esm/models/team.d.ts +11 -11
  51. package/esm/models/team.d.ts.map +1 -1
  52. package/esm/models/team.js +8 -8
  53. package/esm/models/team.js.map +1 -1
  54. package/esm/models/updateprojectop.d.ts +18 -18
  55. package/esm/models/updateprojectop.d.ts.map +1 -1
  56. package/esm/models/updateprojectop.js +18 -18
  57. package/esm/models/updateprojectop.js.map +1 -1
  58. package/esm/sdk/edgecache.d.ts +16 -0
  59. package/esm/sdk/edgecache.d.ts.map +1 -1
  60. package/esm/sdk/edgecache.js +20 -0
  61. package/esm/sdk/edgecache.js.map +1 -1
  62. package/examples/package-lock.json +1 -1
  63. package/jsr.json +1 -1
  64. package/package.json +1 -1
  65. package/src/__tests__/accessgroups.test.ts +3 -1
  66. package/src/__tests__/domains.test.ts +4 -10
  67. package/src/__tests__/edgeconfig.test.ts +6 -6
  68. package/src/__tests__/rollingrelease.test.ts +2 -6
  69. package/src/__tests__/security.test.ts +4 -4
  70. package/src/__tests__/teams.test.ts +2 -2
  71. package/src/funcs/edgeCacheDangerouslyDeleteBySrcImages.ts +171 -0
  72. package/src/funcs/edgeCacheInvalidateBySrcImages.ts +171 -0
  73. package/src/lib/config.ts +2 -2
  74. package/src/mcp-server/mcp-server.ts +1 -1
  75. package/src/mcp-server/server.ts +5 -1
  76. package/src/mcp-server/tools/edgeCacheDangerouslyDeleteBySrcImages.ts +37 -0
  77. package/src/mcp-server/tools/edgeCacheInvalidateBySrcImages.ts +36 -0
  78. package/src/models/createprojectop.ts +30 -30
  79. package/src/models/dangerouslydeletebysrcimagesop.ts +141 -0
  80. package/src/models/invalidatebysrcimagesop.ts +127 -0
  81. package/src/models/team.ts +15 -15
  82. package/src/models/updateprojectop.ts +30 -30
  83. package/src/sdk/edgecache.ts +38 -0
  84. package/vercel-spec.json +241 -61
@@ -1,5 +1,7 @@
1
1
  import { ClientSDK, RequestOptions } from "../lib/sdks.js";
2
+ import { DangerouslyDeleteBySrcImagesRequest } from "../models/dangerouslydeletebysrcimagesop.js";
2
3
  import { DangerouslyDeleteByTagsRequest } from "../models/dangerouslydeletebytagsop.js";
4
+ import { InvalidateBySrcImagesRequest } from "../models/invalidatebysrcimagesop.js";
3
5
  import { InvalidateByTagsRequest } from "../models/invalidatebytagsop.js";
4
6
  export declare class EdgeCache extends ClientSDK {
5
7
  /**
@@ -16,5 +18,19 @@ export declare class EdgeCache extends ClientSDK {
16
18
  * Marks a cache tag as deleted, causing cache entries associated with that tag to be revalidated in the foreground on the next request. Use this method with caution because one tag can be associated with many paths and deleting the cache can cause many concurrent requests to the origin leading to cache stampede problem. A good use case for deleting the cache is when the origin has also been deleted, for example it returns a 404 or 410 status code.
17
19
  */
18
20
  dangerouslyDeleteByTags(request: DangerouslyDeleteByTagsRequest, options?: RequestOptions): Promise<void>;
21
+ /**
22
+ * Invalidate by source image
23
+ *
24
+ * @remarks
25
+ * Marks a source image as stale, causing its corresponding transformed images to be revalidated in the background on the next request.
26
+ */
27
+ invalidateBySrcImages(request: InvalidateBySrcImagesRequest, options?: RequestOptions): Promise<void>;
28
+ /**
29
+ * Dangerously delete by source image
30
+ *
31
+ * @remarks
32
+ * Marks a source image as deleted, causing cache entries associated with that source image to be revalidated in the foreground on the next request. Use this method with caution because one source image can be associated with many paths and deleting the cache can cause many concurrent requests to the origin leading to cache stampede problem. A good use case for deleting the cache is when the origin has also been deleted, for example it returns a 404 or 410 status code.
33
+ */
34
+ dangerouslyDeleteBySrcImages(request: DangerouslyDeleteBySrcImagesRequest, options?: RequestOptions): Promise<void>;
19
35
  }
20
36
  //# sourceMappingURL=edgecache.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"edgecache.d.ts","sourceRoot":"","sources":["../../src/sdk/edgecache.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,8BAA8B,EAAE,MAAM,wCAAwC,CAAC;AACxF,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAG1E,qBAAa,SAAU,SAAQ,SAAS;IACtC;;;;;OAKG;IACG,gBAAgB,CACpB,OAAO,EAAE,uBAAuB,EAChC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,IAAI,CAAC;IAQhB;;;;;OAKG;IACG,uBAAuB,CAC3B,OAAO,EAAE,8BAA8B,EACvC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,IAAI,CAAC;CAOjB"}
1
+ {"version":3,"file":"edgecache.d.ts","sourceRoot":"","sources":["../../src/sdk/edgecache.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,mCAAmC,EAAE,MAAM,6CAA6C,CAAC;AAClG,OAAO,EAAE,8BAA8B,EAAE,MAAM,wCAAwC,CAAC;AACxF,OAAO,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AACpF,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAG1E,qBAAa,SAAU,SAAQ,SAAS;IACtC;;;;;OAKG;IACG,gBAAgB,CACpB,OAAO,EAAE,uBAAuB,EAChC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,IAAI,CAAC;IAQhB;;;;;OAKG;IACG,uBAAuB,CAC3B,OAAO,EAAE,8BAA8B,EACvC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,IAAI,CAAC;IAQhB;;;;;OAKG;IACG,qBAAqB,CACzB,OAAO,EAAE,4BAA4B,EACrC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,IAAI,CAAC;IAQhB;;;;;OAKG;IACG,4BAA4B,CAChC,OAAO,EAAE,mCAAmC,EAC5C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,IAAI,CAAC;CAOjB"}
@@ -1,7 +1,9 @@
1
1
  /*
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
+ import { edgeCacheDangerouslyDeleteBySrcImages } from "../funcs/edgeCacheDangerouslyDeleteBySrcImages.js";
4
5
  import { edgeCacheDangerouslyDeleteByTags } from "../funcs/edgeCacheDangerouslyDeleteByTags.js";
6
+ import { edgeCacheInvalidateBySrcImages } from "../funcs/edgeCacheInvalidateBySrcImages.js";
5
7
  import { edgeCacheInvalidateByTags } from "../funcs/edgeCacheInvalidateByTags.js";
6
8
  import { ClientSDK } from "../lib/sdks.js";
7
9
  import { unwrapAsync } from "../types/fp.js";
@@ -24,5 +26,23 @@ export class EdgeCache extends ClientSDK {
24
26
  async dangerouslyDeleteByTags(request, options) {
25
27
  return unwrapAsync(edgeCacheDangerouslyDeleteByTags(this, request, options));
26
28
  }
29
+ /**
30
+ * Invalidate by source image
31
+ *
32
+ * @remarks
33
+ * Marks a source image as stale, causing its corresponding transformed images to be revalidated in the background on the next request.
34
+ */
35
+ async invalidateBySrcImages(request, options) {
36
+ return unwrapAsync(edgeCacheInvalidateBySrcImages(this, request, options));
37
+ }
38
+ /**
39
+ * Dangerously delete by source image
40
+ *
41
+ * @remarks
42
+ * Marks a source image as deleted, causing cache entries associated with that source image to be revalidated in the foreground on the next request. Use this method with caution because one source image can be associated with many paths and deleting the cache can cause many concurrent requests to the origin leading to cache stampede problem. A good use case for deleting the cache is when the origin has also been deleted, for example it returns a 404 or 410 status code.
43
+ */
44
+ async dangerouslyDeleteBySrcImages(request, options) {
45
+ return unwrapAsync(edgeCacheDangerouslyDeleteBySrcImages(this, request, options));
46
+ }
27
47
  }
28
48
  //# sourceMappingURL=edgecache.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"edgecache.js","sourceRoot":"","sources":["../../src/sdk/edgecache.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,gCAAgC,EAAE,MAAM,8CAA8C,CAAC;AAChG,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC;AAClF,OAAO,EAAE,SAAS,EAAkB,MAAM,gBAAgB,CAAC;AAG3D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,OAAO,SAAU,SAAQ,SAAS;IACtC;;;;;OAKG;IACH,KAAK,CAAC,gBAAgB,CACpB,OAAgC,EAChC,OAAwB;QAExB,OAAO,WAAW,CAAC,yBAAyB,CAC1C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,uBAAuB,CAC3B,OAAuC,EACvC,OAAwB;QAExB,OAAO,WAAW,CAAC,gCAAgC,CACjD,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF"}
1
+ {"version":3,"file":"edgecache.js","sourceRoot":"","sources":["../../src/sdk/edgecache.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,qCAAqC,EAAE,MAAM,mDAAmD,CAAC;AAC1G,OAAO,EAAE,gCAAgC,EAAE,MAAM,8CAA8C,CAAC;AAChG,OAAO,EAAE,8BAA8B,EAAE,MAAM,4CAA4C,CAAC;AAC5F,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC;AAClF,OAAO,EAAE,SAAS,EAAkB,MAAM,gBAAgB,CAAC;AAK3D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,OAAO,SAAU,SAAQ,SAAS;IACtC;;;;;OAKG;IACH,KAAK,CAAC,gBAAgB,CACpB,OAAgC,EAChC,OAAwB;QAExB,OAAO,WAAW,CAAC,yBAAyB,CAC1C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,uBAAuB,CAC3B,OAAuC,EACvC,OAAwB;QAExB,OAAO,WAAW,CAAC,gCAAgC,CACjD,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,qBAAqB,CACzB,OAAqC,EACrC,OAAwB;QAExB,OAAO,WAAW,CAAC,8BAA8B,CAC/C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,4BAA4B,CAChC,OAA4C,EAC5C,OAAwB;QAExB,OAAO,WAAW,CAAC,qCAAqC,CACtD,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "..": {
20
20
  "name": "@vercel/sdk",
21
- "version": "1.17.3",
21
+ "version": "1.17.4",
22
22
  "dependencies": {
23
23
  "@modelcontextprotocol/sdk": ">=1.5.0 <1.10.0",
24
24
  "zod": "^3.25.0 || ^4.0.0"
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@vercel/sdk",
5
- "version": "1.17.3",
5
+ "version": "1.17.4",
6
6
  "exports": {
7
7
  ".": "./src/index.ts",
8
8
  "./models": "./src/models/index.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/sdk",
3
- "version": "1.17.3",
3
+ "version": "1.17.4",
4
4
  "author": "Speakeasy",
5
5
  "type": "module",
6
6
  "bin": {
@@ -107,7 +107,9 @@ test("Access Groups Update Access Group", async () => {
107
107
  });
108
108
  expect(result).toBeDefined();
109
109
  expect(result).toEqual({
110
- entitlements: [],
110
+ entitlements: [
111
+ "v0",
112
+ ],
111
113
  name: "my-access-group",
112
114
  createdAt: "1588720733602",
113
115
  teamId: "team_123a6c5209bc3778245d011443644c8d27dc2c50",
@@ -130,17 +130,11 @@ test("Domains Get Domain Config", async () => {
130
130
  });
131
131
  expect(result).toBeDefined();
132
132
  expect(result).toEqual({
133
- configuredBy: "dns-01",
134
- acceptedChallenges: [],
135
- recommendedIPv4: [
136
- {
137
- rank: 4769.73,
138
- value: [
139
- "<value 1>",
140
- "<value 2>",
141
- ],
142
- },
133
+ configuredBy: "CNAME",
134
+ acceptedChallenges: [
135
+ "http-01",
143
136
  ],
137
+ recommendedIPv4: [],
144
138
  recommendedCNAME: [],
145
139
  misconfigured: false,
146
140
  });
@@ -50,8 +50,8 @@ test("Edge Config Create Edge Config", async () => {
50
50
  });
51
51
  expect(result).toBeDefined();
52
52
  expect(result).toEqual({
53
- createdAt: 5448.83,
54
- updatedAt: 4236.55,
53
+ createdAt: 5488.14,
54
+ updatedAt: 7151.9,
55
55
  id: "<id>",
56
56
  slug: "<value>",
57
57
  ownerId: "<id>",
@@ -77,8 +77,8 @@ test("Edge Config Get Edge Config", async () => {
77
77
  });
78
78
  expect(result).toBeDefined();
79
79
  expect(result).toEqual({
80
- createdAt: 6458.94,
81
- updatedAt: 4375.87,
80
+ createdAt: 6027.63,
81
+ updatedAt: 5448.83,
82
82
  id: "<id>",
83
83
  slug: "<value>",
84
84
  ownerId: "<id>",
@@ -107,8 +107,8 @@ test("Edge Config Update Edge Config", async () => {
107
107
  });
108
108
  expect(result).toBeDefined();
109
109
  expect(result).toEqual({
110
- createdAt: 8917.73,
111
- updatedAt: 9636.63,
110
+ createdAt: 4236.55,
111
+ updatedAt: 6458.94,
112
112
  id: "<id>",
113
113
  slug: "<value>",
114
114
  ownerId: "<id>",
@@ -362,12 +362,8 @@ test("Rolling Release Get Rolling Release Billing Status", async () => {
362
362
  });
363
363
  expect(result).toBeDefined();
364
364
  expect(result).toEqual({
365
- availableSlots: 7151.9,
366
- reason: "no_available_slots",
365
+ availableSlots: "unlimited",
366
+ reason: "unlimited_slots",
367
367
  message: "<value>",
368
- enabledProjects: [
369
- "<value 1>",
370
- "<value 2>",
371
- ],
372
368
  });
373
369
  });
@@ -322,10 +322,10 @@ test("Security Get Bypass Ip", async () => {
322
322
  {
323
323
  ownerId: "<id>",
324
324
  id: "<id>",
325
- domain: "second-newsletter.name",
326
- ip: "165.112.228.246",
327
- createdAt: "1716245811354",
328
- updatedAt: "1735671604252",
325
+ domain: "insignificant-parsnip.info",
326
+ ip: "f8bb:ce11:0cbd:fbab:2e3e:b95b:ac0d:ddef",
327
+ createdAt: "1715491040793",
328
+ updatedAt: "1735640959124",
329
329
  updatedAtHour: "<value>",
330
330
  },
331
331
  ],
@@ -167,8 +167,8 @@ test("Teams Get Team", async () => {
167
167
  emailDomain: "example.com",
168
168
  saml: {
169
169
  connection: {
170
- type: "OktaSAML",
171
170
  status: "linked",
171
+ type: "OktaSAML",
172
172
  state: "active",
173
173
  connectedAt: 1611796915677,
174
174
  lastReceivedWebhookEvent: 1611796915677,
@@ -240,8 +240,8 @@ test("Teams Patch Team", async () => {
240
240
  emailDomain: "example.com",
241
241
  saml: {
242
242
  connection: {
243
- type: "OktaSAML",
244
243
  status: "linked",
244
+ type: "OktaSAML",
245
245
  state: "active",
246
246
  connectedAt: 1611796915677,
247
247
  lastReceivedWebhookEvent: 1611796915677,
@@ -0,0 +1,171 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { VercelCore } from "../core.js";
7
+ import { encodeFormQuery, encodeJSON } from "../lib/encodings.js";
8
+ import * as M from "../lib/matchers.js";
9
+ import { compactMap } from "../lib/primitives.js";
10
+ import { safeParse } from "../lib/schemas.js";
11
+ import { RequestOptions } from "../lib/sdks.js";
12
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
13
+ import { pathToFunc } from "../lib/url.js";
14
+ import {
15
+ DangerouslyDeleteBySrcImagesRequest,
16
+ DangerouslyDeleteBySrcImagesRequest$outboundSchema,
17
+ } from "../models/dangerouslydeletebysrcimagesop.js";
18
+ import {
19
+ ConnectionError,
20
+ InvalidRequestError,
21
+ RequestAbortedError,
22
+ RequestTimeoutError,
23
+ UnexpectedClientError,
24
+ } from "../models/httpclienterrors.js";
25
+ import { ResponseValidationError } from "../models/responsevalidationerror.js";
26
+ import { SDKValidationError } from "../models/sdkvalidationerror.js";
27
+ import { VercelError } from "../models/vercelerror.js";
28
+ import { APICall, APIPromise } from "../types/async.js";
29
+ import { Result } from "../types/fp.js";
30
+
31
+ /**
32
+ * Dangerously delete by source image
33
+ *
34
+ * @remarks
35
+ * Marks a source image as deleted, causing cache entries associated with that source image to be revalidated in the foreground on the next request. Use this method with caution because one source image can be associated with many paths and deleting the cache can cause many concurrent requests to the origin leading to cache stampede problem. A good use case for deleting the cache is when the origin has also been deleted, for example it returns a 404 or 410 status code.
36
+ */
37
+ export function edgeCacheDangerouslyDeleteBySrcImages(
38
+ client: VercelCore,
39
+ request: DangerouslyDeleteBySrcImagesRequest,
40
+ options?: RequestOptions,
41
+ ): APIPromise<
42
+ Result<
43
+ void,
44
+ | VercelError
45
+ | ResponseValidationError
46
+ | ConnectionError
47
+ | RequestAbortedError
48
+ | RequestTimeoutError
49
+ | InvalidRequestError
50
+ | UnexpectedClientError
51
+ | SDKValidationError
52
+ >
53
+ > {
54
+ return new APIPromise($do(
55
+ client,
56
+ request,
57
+ options,
58
+ ));
59
+ }
60
+
61
+ async function $do(
62
+ client: VercelCore,
63
+ request: DangerouslyDeleteBySrcImagesRequest,
64
+ options?: RequestOptions,
65
+ ): Promise<
66
+ [
67
+ Result<
68
+ void,
69
+ | VercelError
70
+ | ResponseValidationError
71
+ | ConnectionError
72
+ | RequestAbortedError
73
+ | RequestTimeoutError
74
+ | InvalidRequestError
75
+ | UnexpectedClientError
76
+ | SDKValidationError
77
+ >,
78
+ APICall,
79
+ ]
80
+ > {
81
+ const parsed = safeParse(
82
+ request,
83
+ (value) => DangerouslyDeleteBySrcImagesRequest$outboundSchema.parse(value),
84
+ "Input validation failed",
85
+ );
86
+ if (!parsed.ok) {
87
+ return [parsed, { status: "invalid" }];
88
+ }
89
+ const payload = parsed.value;
90
+ const body = encodeJSON("body", payload.RequestBody, { explode: true });
91
+
92
+ const path = pathToFunc("/v1/edge-cache/dangerously-delete-by-src-images")();
93
+
94
+ const query = encodeFormQuery({
95
+ "projectIdOrName": payload.projectIdOrName,
96
+ "slug": payload.slug,
97
+ "teamId": payload.teamId,
98
+ });
99
+
100
+ const headers = new Headers(compactMap({
101
+ "Content-Type": "application/json",
102
+ Accept: "*/*",
103
+ }));
104
+
105
+ const secConfig = await extractSecurity(client._options.bearerToken);
106
+ const securityInput = secConfig == null ? {} : { bearerToken: secConfig };
107
+ const requestSecurity = resolveGlobalSecurity(securityInput);
108
+
109
+ const context = {
110
+ options: client._options,
111
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
112
+ operationID: "dangerouslyDeleteBySrcImages",
113
+ oAuth2Scopes: null,
114
+
115
+ resolvedSecurity: requestSecurity,
116
+
117
+ securitySource: client._options.bearerToken,
118
+ retryConfig: options?.retries
119
+ || client._options.retryConfig
120
+ || { strategy: "none" },
121
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
122
+ };
123
+
124
+ const requestRes = client._createRequest(context, {
125
+ security: requestSecurity,
126
+ method: "POST",
127
+ baseURL: options?.serverURL,
128
+ path: path,
129
+ headers: headers,
130
+ query: query,
131
+ body: body,
132
+ userAgent: client._options.userAgent,
133
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
134
+ }, options);
135
+ if (!requestRes.ok) {
136
+ return [requestRes, { status: "invalid" }];
137
+ }
138
+ const req = requestRes.value;
139
+
140
+ const doResult = await client._do(req, {
141
+ context,
142
+ errorCodes: ["400", "401", "402", "403", "404", "4XX", "5XX"],
143
+ retryConfig: context.retryConfig,
144
+ retryCodes: context.retryCodes,
145
+ });
146
+ if (!doResult.ok) {
147
+ return [doResult, { status: "request-error", request: req }];
148
+ }
149
+ const response = doResult.value;
150
+
151
+ const [result] = await M.match<
152
+ void,
153
+ | VercelError
154
+ | ResponseValidationError
155
+ | ConnectionError
156
+ | RequestAbortedError
157
+ | RequestTimeoutError
158
+ | InvalidRequestError
159
+ | UnexpectedClientError
160
+ | SDKValidationError
161
+ >(
162
+ M.nil(200, z.void()),
163
+ M.fail([400, 401, 402, 403, 404, "4XX"]),
164
+ M.fail("5XX"),
165
+ )(response, req);
166
+ if (!result.ok) {
167
+ return [result, { status: "complete", request: req, response }];
168
+ }
169
+
170
+ return [result, { status: "complete", request: req, response }];
171
+ }
@@ -0,0 +1,171 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { VercelCore } from "../core.js";
7
+ import { encodeFormQuery, encodeJSON } from "../lib/encodings.js";
8
+ import * as M from "../lib/matchers.js";
9
+ import { compactMap } from "../lib/primitives.js";
10
+ import { safeParse } from "../lib/schemas.js";
11
+ import { RequestOptions } from "../lib/sdks.js";
12
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
13
+ import { pathToFunc } from "../lib/url.js";
14
+ import {
15
+ ConnectionError,
16
+ InvalidRequestError,
17
+ RequestAbortedError,
18
+ RequestTimeoutError,
19
+ UnexpectedClientError,
20
+ } from "../models/httpclienterrors.js";
21
+ import {
22
+ InvalidateBySrcImagesRequest,
23
+ InvalidateBySrcImagesRequest$outboundSchema,
24
+ } from "../models/invalidatebysrcimagesop.js";
25
+ import { ResponseValidationError } from "../models/responsevalidationerror.js";
26
+ import { SDKValidationError } from "../models/sdkvalidationerror.js";
27
+ import { VercelError } from "../models/vercelerror.js";
28
+ import { APICall, APIPromise } from "../types/async.js";
29
+ import { Result } from "../types/fp.js";
30
+
31
+ /**
32
+ * Invalidate by source image
33
+ *
34
+ * @remarks
35
+ * Marks a source image as stale, causing its corresponding transformed images to be revalidated in the background on the next request.
36
+ */
37
+ export function edgeCacheInvalidateBySrcImages(
38
+ client: VercelCore,
39
+ request: InvalidateBySrcImagesRequest,
40
+ options?: RequestOptions,
41
+ ): APIPromise<
42
+ Result<
43
+ void,
44
+ | VercelError
45
+ | ResponseValidationError
46
+ | ConnectionError
47
+ | RequestAbortedError
48
+ | RequestTimeoutError
49
+ | InvalidRequestError
50
+ | UnexpectedClientError
51
+ | SDKValidationError
52
+ >
53
+ > {
54
+ return new APIPromise($do(
55
+ client,
56
+ request,
57
+ options,
58
+ ));
59
+ }
60
+
61
+ async function $do(
62
+ client: VercelCore,
63
+ request: InvalidateBySrcImagesRequest,
64
+ options?: RequestOptions,
65
+ ): Promise<
66
+ [
67
+ Result<
68
+ void,
69
+ | VercelError
70
+ | ResponseValidationError
71
+ | ConnectionError
72
+ | RequestAbortedError
73
+ | RequestTimeoutError
74
+ | InvalidRequestError
75
+ | UnexpectedClientError
76
+ | SDKValidationError
77
+ >,
78
+ APICall,
79
+ ]
80
+ > {
81
+ const parsed = safeParse(
82
+ request,
83
+ (value) => InvalidateBySrcImagesRequest$outboundSchema.parse(value),
84
+ "Input validation failed",
85
+ );
86
+ if (!parsed.ok) {
87
+ return [parsed, { status: "invalid" }];
88
+ }
89
+ const payload = parsed.value;
90
+ const body = encodeJSON("body", payload.RequestBody, { explode: true });
91
+
92
+ const path = pathToFunc("/v1/edge-cache/invalidate-by-src-images")();
93
+
94
+ const query = encodeFormQuery({
95
+ "projectIdOrName": payload.projectIdOrName,
96
+ "slug": payload.slug,
97
+ "teamId": payload.teamId,
98
+ });
99
+
100
+ const headers = new Headers(compactMap({
101
+ "Content-Type": "application/json",
102
+ Accept: "*/*",
103
+ }));
104
+
105
+ const secConfig = await extractSecurity(client._options.bearerToken);
106
+ const securityInput = secConfig == null ? {} : { bearerToken: secConfig };
107
+ const requestSecurity = resolveGlobalSecurity(securityInput);
108
+
109
+ const context = {
110
+ options: client._options,
111
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
112
+ operationID: "invalidateBySrcImages",
113
+ oAuth2Scopes: null,
114
+
115
+ resolvedSecurity: requestSecurity,
116
+
117
+ securitySource: client._options.bearerToken,
118
+ retryConfig: options?.retries
119
+ || client._options.retryConfig
120
+ || { strategy: "none" },
121
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
122
+ };
123
+
124
+ const requestRes = client._createRequest(context, {
125
+ security: requestSecurity,
126
+ method: "POST",
127
+ baseURL: options?.serverURL,
128
+ path: path,
129
+ headers: headers,
130
+ query: query,
131
+ body: body,
132
+ userAgent: client._options.userAgent,
133
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
134
+ }, options);
135
+ if (!requestRes.ok) {
136
+ return [requestRes, { status: "invalid" }];
137
+ }
138
+ const req = requestRes.value;
139
+
140
+ const doResult = await client._do(req, {
141
+ context,
142
+ errorCodes: ["400", "401", "402", "403", "404", "4XX", "5XX"],
143
+ retryConfig: context.retryConfig,
144
+ retryCodes: context.retryCodes,
145
+ });
146
+ if (!doResult.ok) {
147
+ return [doResult, { status: "request-error", request: req }];
148
+ }
149
+ const response = doResult.value;
150
+
151
+ const [result] = await M.match<
152
+ void,
153
+ | VercelError
154
+ | ResponseValidationError
155
+ | ConnectionError
156
+ | RequestAbortedError
157
+ | RequestTimeoutError
158
+ | InvalidRequestError
159
+ | UnexpectedClientError
160
+ | SDKValidationError
161
+ >(
162
+ M.nil(200, z.void()),
163
+ M.fail([400, 401, 402, 403, 404, "4XX"]),
164
+ M.fail("5XX"),
165
+ )(response, req);
166
+ if (!result.ok) {
167
+ return [result, { status: "complete", request: req, response }];
168
+ }
169
+
170
+ return [result, { status: "complete", request: req, response }];
171
+ }
package/src/lib/config.ts CHANGED
@@ -61,7 +61,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
61
61
  export const SDK_METADATA = {
62
62
  language: "typescript",
63
63
  openapiDocVersion: "0.0.1",
64
- sdkVersion: "1.17.3",
64
+ sdkVersion: "1.17.4",
65
65
  genVersion: "2.755.9",
66
- userAgent: "speakeasy-sdk/typescript 1.17.3 2.755.9 0.0.1 @vercel/sdk",
66
+ userAgent: "speakeasy-sdk/typescript 1.17.4 2.755.9 0.0.1 @vercel/sdk",
67
67
  } as const;
@@ -19,7 +19,7 @@ const routes = buildRouteMap({
19
19
  export const app = buildApplication(routes, {
20
20
  name: "mcp",
21
21
  versionInfo: {
22
- currentVersion: "1.17.3",
22
+ currentVersion: "1.17.4",
23
23
  },
24
24
  });
25
25
 
@@ -95,7 +95,9 @@ import { tool$drainsGetDrain } from "./tools/drainsGetDrain.js";
95
95
  import { tool$drainsGetDrains } from "./tools/drainsGetDrains.js";
96
96
  import { tool$drainsTestDrain } from "./tools/drainsTestDrain.js";
97
97
  import { tool$drainsUpdateDrain } from "./tools/drainsUpdateDrain.js";
98
+ import { tool$edgeCacheDangerouslyDeleteBySrcImages } from "./tools/edgeCacheDangerouslyDeleteBySrcImages.js";
98
99
  import { tool$edgeCacheDangerouslyDeleteByTags } from "./tools/edgeCacheDangerouslyDeleteByTags.js";
100
+ import { tool$edgeCacheInvalidateBySrcImages } from "./tools/edgeCacheInvalidateBySrcImages.js";
99
101
  import { tool$edgeCacheInvalidateByTags } from "./tools/edgeCacheInvalidateByTags.js";
100
102
  import { tool$edgeConfigCreateEdgeConfig } from "./tools/edgeConfigCreateEdgeConfig.js";
101
103
  import { tool$edgeConfigCreateEdgeConfigToken } from "./tools/edgeConfigCreateEdgeConfigToken.js";
@@ -240,7 +242,7 @@ export function createMCPServer(deps: {
240
242
  }) {
241
243
  const server = new McpServer({
242
244
  name: "Vercel",
243
- version: "1.17.3",
245
+ version: "1.17.4",
244
246
  });
245
247
 
246
248
  const client = new VercelCore({
@@ -381,6 +383,8 @@ export function createMCPServer(deps: {
381
383
  tool(tool$drainsTestDrain);
382
384
  tool(tool$edgeCacheInvalidateByTags);
383
385
  tool(tool$edgeCacheDangerouslyDeleteByTags);
386
+ tool(tool$edgeCacheInvalidateBySrcImages);
387
+ tool(tool$edgeCacheDangerouslyDeleteBySrcImages);
384
388
  tool(tool$edgeConfigGetEdgeConfigs);
385
389
  tool(tool$edgeConfigCreateEdgeConfig);
386
390
  tool(tool$edgeConfigGetEdgeConfig);
@@ -0,0 +1,37 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { edgeCacheDangerouslyDeleteBySrcImages } from "../../funcs/edgeCacheDangerouslyDeleteBySrcImages.js";
6
+ import { DangerouslyDeleteBySrcImagesRequest$inboundSchema } from "../../models/dangerouslydeletebysrcimagesop.js";
7
+ import { formatResult, ToolDefinition } from "../tools.js";
8
+
9
+ const args = {
10
+ request: DangerouslyDeleteBySrcImagesRequest$inboundSchema,
11
+ };
12
+
13
+ export const tool$edgeCacheDangerouslyDeleteBySrcImages: ToolDefinition<
14
+ typeof args
15
+ > = {
16
+ name: "edge-cache-dangerously-delete-by-src-images",
17
+ description: `Dangerously delete by source image
18
+
19
+ Marks a source image as deleted, causing cache entries associated with that source image to be revalidated in the foreground on the next request. Use this method with caution because one source image can be associated with many paths and deleting the cache can cause many concurrent requests to the origin leading to cache stampede problem. A good use case for deleting the cache is when the origin has also been deleted, for example it returns a 404 or 410 status code.`,
20
+ args,
21
+ tool: async (client, args, ctx) => {
22
+ const [result, apiCall] = await edgeCacheDangerouslyDeleteBySrcImages(
23
+ client,
24
+ args.request,
25
+ { fetchOptions: { signal: ctx.signal } },
26
+ ).$inspect();
27
+
28
+ if (!result.ok) {
29
+ return {
30
+ content: [{ type: "text", text: result.error.message }],
31
+ isError: true,
32
+ };
33
+ }
34
+
35
+ return formatResult(void 0, apiCall);
36
+ },
37
+ };