@vercel/sdk 1.18.3 → 1.18.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 (250) hide show
  1. package/README.md +42 -22
  2. package/bin/mcp-server.js +2709 -2592
  3. package/bin/mcp-server.js.map +32 -32
  4. package/esm/__tests__/accessgroups.test.js +1 -3
  5. package/esm/__tests__/accessgroups.test.js.map +1 -1
  6. package/esm/__tests__/bulkredirects.test.d.ts +2 -0
  7. package/esm/__tests__/bulkredirects.test.d.ts.map +1 -0
  8. package/esm/__tests__/bulkredirects.test.js +171 -0
  9. package/esm/__tests__/bulkredirects.test.js.map +1 -0
  10. package/esm/__tests__/domains.test.js +9 -6
  11. package/esm/__tests__/domains.test.js.map +1 -1
  12. package/esm/__tests__/edgeconfig.test.js +6 -6
  13. package/esm/__tests__/edgeconfig.test.js.map +1 -1
  14. package/esm/__tests__/security.test.js +23 -14
  15. package/esm/__tests__/security.test.js.map +1 -1
  16. package/esm/__tests__/vercel.test.js +15 -143
  17. package/esm/__tests__/vercel.test.js.map +1 -1
  18. package/esm/funcs/{deleteV1BulkRedirects.d.ts → bulkRedirectsDeleteRedirects.d.ts} +6 -3
  19. package/esm/funcs/bulkRedirectsDeleteRedirects.d.ts.map +1 -0
  20. package/esm/funcs/{deleteV1BulkRedirects.js → bulkRedirectsDeleteRedirects.js} +19 -9
  21. package/esm/funcs/bulkRedirectsDeleteRedirects.js.map +1 -0
  22. package/esm/funcs/{patchV1BulkRedirects.d.ts → bulkRedirectsEditRedirect.d.ts} +6 -3
  23. package/esm/funcs/bulkRedirectsEditRedirect.d.ts.map +1 -0
  24. package/esm/funcs/{patchV1BulkRedirects.js → bulkRedirectsEditRedirect.js} +19 -9
  25. package/esm/funcs/bulkRedirectsEditRedirect.js.map +1 -0
  26. package/esm/funcs/{getV1BulkRedirects.d.ts → bulkRedirectsGetRedirects.d.ts} +6 -3
  27. package/esm/funcs/bulkRedirectsGetRedirects.d.ts.map +1 -0
  28. package/esm/funcs/{getV1BulkRedirects.js → bulkRedirectsGetRedirects.js} +19 -9
  29. package/esm/funcs/bulkRedirectsGetRedirects.js.map +1 -0
  30. package/esm/funcs/{getV1BulkRedirectsVersions.d.ts → bulkRedirectsGetVersions.d.ts} +6 -3
  31. package/esm/funcs/bulkRedirectsGetVersions.d.ts.map +1 -0
  32. package/esm/funcs/{getV1BulkRedirectsVersions.js → bulkRedirectsGetVersions.js} +19 -9
  33. package/esm/funcs/bulkRedirectsGetVersions.js.map +1 -0
  34. package/esm/funcs/{postV1BulkRedirectsRestore.d.ts → bulkRedirectsRestoreRedirects.d.ts} +6 -3
  35. package/esm/funcs/bulkRedirectsRestoreRedirects.d.ts.map +1 -0
  36. package/esm/funcs/{postV1BulkRedirectsRestore.js → bulkRedirectsRestoreRedirects.js} +19 -9
  37. package/esm/funcs/bulkRedirectsRestoreRedirects.js.map +1 -0
  38. package/esm/funcs/bulkRedirectsStageRedirects.d.ts +17 -0
  39. package/esm/funcs/bulkRedirectsStageRedirects.d.ts.map +1 -0
  40. package/esm/funcs/bulkRedirectsStageRedirects.js +83 -0
  41. package/esm/funcs/bulkRedirectsStageRedirects.js.map +1 -0
  42. package/esm/funcs/{postV1BulkRedirectsVersions.d.ts → bulkRedirectsUpdateVersion.d.ts} +6 -3
  43. package/esm/funcs/bulkRedirectsUpdateVersion.d.ts.map +1 -0
  44. package/esm/funcs/{postV1BulkRedirectsVersions.js → bulkRedirectsUpdateVersion.js} +19 -9
  45. package/esm/funcs/bulkRedirectsUpdateVersion.js.map +1 -0
  46. package/esm/lib/config.d.ts +2 -2
  47. package/esm/lib/config.js +2 -2
  48. package/esm/mcp-server/mcp-server.js +1 -1
  49. package/esm/mcp-server/server.js +15 -15
  50. package/esm/mcp-server/server.js.map +1 -1
  51. package/esm/mcp-server/tools/bulkRedirectsDeleteRedirects.d.ts +7 -0
  52. package/esm/mcp-server/tools/bulkRedirectsDeleteRedirects.d.ts.map +1 -0
  53. package/esm/mcp-server/tools/bulkRedirectsDeleteRedirects.js +28 -0
  54. package/esm/mcp-server/tools/bulkRedirectsDeleteRedirects.js.map +1 -0
  55. package/esm/mcp-server/tools/bulkRedirectsEditRedirect.d.ts +7 -0
  56. package/esm/mcp-server/tools/bulkRedirectsEditRedirect.d.ts.map +1 -0
  57. package/esm/mcp-server/tools/bulkRedirectsEditRedirect.js +28 -0
  58. package/esm/mcp-server/tools/bulkRedirectsEditRedirect.js.map +1 -0
  59. package/esm/mcp-server/tools/bulkRedirectsGetRedirects.d.ts +7 -0
  60. package/esm/mcp-server/tools/bulkRedirectsGetRedirects.d.ts.map +1 -0
  61. package/esm/mcp-server/tools/bulkRedirectsGetRedirects.js +28 -0
  62. package/esm/mcp-server/tools/bulkRedirectsGetRedirects.js.map +1 -0
  63. package/esm/mcp-server/tools/bulkRedirectsGetVersions.d.ts +7 -0
  64. package/esm/mcp-server/tools/bulkRedirectsGetVersions.d.ts.map +1 -0
  65. package/esm/mcp-server/tools/bulkRedirectsGetVersions.js +28 -0
  66. package/esm/mcp-server/tools/bulkRedirectsGetVersions.js.map +1 -0
  67. package/esm/mcp-server/tools/bulkRedirectsRestoreRedirects.d.ts +7 -0
  68. package/esm/mcp-server/tools/bulkRedirectsRestoreRedirects.d.ts.map +1 -0
  69. package/esm/mcp-server/tools/bulkRedirectsRestoreRedirects.js +28 -0
  70. package/esm/mcp-server/tools/bulkRedirectsRestoreRedirects.js.map +1 -0
  71. package/esm/mcp-server/tools/bulkRedirectsStageRedirects.d.ts +7 -0
  72. package/esm/mcp-server/tools/bulkRedirectsStageRedirects.d.ts.map +1 -0
  73. package/esm/mcp-server/tools/bulkRedirectsStageRedirects.js +28 -0
  74. package/esm/mcp-server/tools/bulkRedirectsStageRedirects.js.map +1 -0
  75. package/esm/mcp-server/tools/bulkRedirectsUpdateVersion.d.ts +7 -0
  76. package/esm/mcp-server/tools/bulkRedirectsUpdateVersion.d.ts.map +1 -0
  77. package/esm/mcp-server/tools/bulkRedirectsUpdateVersion.js +28 -0
  78. package/esm/mcp-server/tools/bulkRedirectsUpdateVersion.js.map +1 -0
  79. package/esm/models/artifactqueryop.d.ts +8 -8
  80. package/esm/models/artifactqueryop.d.ts.map +1 -1
  81. package/esm/models/artifactqueryop.js +8 -8
  82. package/esm/models/artifactqueryop.js.map +1 -1
  83. package/esm/models/deleteredirectsop.d.ts +112 -0
  84. package/esm/models/deleteredirectsop.d.ts.map +1 -0
  85. package/esm/models/deleteredirectsop.js +99 -0
  86. package/esm/models/deleteredirectsop.js.map +1 -0
  87. package/esm/models/{patchv1bulkredirectsop.d.ts → editredirectop.d.ts} +39 -29
  88. package/esm/models/editredirectop.d.ts.map +1 -0
  89. package/esm/models/editredirectop.js +123 -0
  90. package/esm/models/editredirectop.js.map +1 -0
  91. package/esm/models/getfirewallconfigop.d.ts +8 -8
  92. package/esm/models/getfirewallconfigop.d.ts.map +1 -1
  93. package/esm/models/getfirewallconfigop.js +10 -8
  94. package/esm/models/getfirewallconfigop.js.map +1 -1
  95. package/esm/models/{getv1bulkredirectsop.d.ts → getredirectsop.d.ts} +37 -27
  96. package/esm/models/getredirectsop.d.ts.map +1 -0
  97. package/esm/models/{getv1bulkredirectsop.js → getredirectsop.js} +38 -28
  98. package/esm/models/getredirectsop.js.map +1 -0
  99. package/esm/models/{getv1bulkredirectsversionsop.d.ts → getversionsop.d.ts} +23 -13
  100. package/esm/models/getversionsop.d.ts.map +1 -0
  101. package/esm/models/{getv1bulkredirectsversionsop.js → getversionsop.js} +17 -13
  102. package/esm/models/getversionsop.js.map +1 -0
  103. package/esm/models/listaccessgroupsop.d.ts +8 -8
  104. package/esm/models/listaccessgroupsop.d.ts.map +1 -1
  105. package/esm/models/listaccessgroupsop.js +8 -8
  106. package/esm/models/listaccessgroupsop.js.map +1 -1
  107. package/esm/models/putfirewallconfigop.d.ts +11 -6
  108. package/esm/models/putfirewallconfigop.d.ts.map +1 -1
  109. package/esm/models/putfirewallconfigop.js +12 -2
  110. package/esm/models/putfirewallconfigop.js.map +1 -1
  111. package/esm/models/restoreredirectsop.d.ts +114 -0
  112. package/esm/models/restoreredirectsop.d.ts.map +1 -0
  113. package/esm/models/restoreredirectsop.js +101 -0
  114. package/esm/models/restoreredirectsop.js.map +1 -0
  115. package/esm/models/{putv1bulkredirectsop.d.ts → stageredirectsop.d.ts} +44 -21
  116. package/esm/models/stageredirectsop.d.ts.map +1 -0
  117. package/esm/models/stageredirectsop.js +136 -0
  118. package/esm/models/stageredirectsop.js.map +1 -0
  119. package/esm/models/team.d.ts +6 -6
  120. package/esm/models/team.d.ts.map +1 -1
  121. package/esm/models/team.js +6 -4
  122. package/esm/models/team.js.map +1 -1
  123. package/esm/models/updateversionop.d.ts +120 -0
  124. package/esm/models/updateversionop.d.ts.map +1 -0
  125. package/esm/models/updateversionop.js +106 -0
  126. package/esm/models/updateversionop.js.map +1 -0
  127. package/esm/sdk/bulkredirects.d.ts +60 -0
  128. package/esm/sdk/bulkredirects.d.ts.map +1 -0
  129. package/esm/sdk/bulkredirects.js +78 -0
  130. package/esm/sdk/bulkredirects.js.map +1 -0
  131. package/esm/sdk/sdk.d.ts +4 -33
  132. package/esm/sdk/sdk.d.ts.map +1 -1
  133. package/esm/sdk/sdk.js +4 -47
  134. package/esm/sdk/sdk.js.map +1 -1
  135. package/examples/package-lock.json +1 -1
  136. package/jsr.json +1 -1
  137. package/package.json +1 -1
  138. package/src/__tests__/accessgroups.test.ts +1 -3
  139. package/src/__tests__/bulkredirects.test.ts +192 -0
  140. package/src/__tests__/domains.test.ts +9 -6
  141. package/src/__tests__/edgeconfig.test.ts +6 -6
  142. package/src/__tests__/security.test.ts +23 -14
  143. package/src/__tests__/vercel.test.ts +26 -160
  144. package/src/funcs/{deleteV1BulkRedirects.ts → bulkRedirectsDeleteRedirects.ts} +28 -17
  145. package/src/funcs/{patchV1BulkRedirects.ts → bulkRedirectsEditRedirect.ts} +29 -18
  146. package/src/funcs/{getV1BulkRedirects.ts → bulkRedirectsGetRedirects.ts} +28 -17
  147. package/src/funcs/{getV1BulkRedirectsVersions.ts → bulkRedirectsGetVersions.ts} +28 -17
  148. package/src/funcs/{postV1BulkRedirectsRestore.ts → bulkRedirectsRestoreRedirects.ts} +29 -18
  149. package/src/funcs/bulkRedirectsStageRedirects.ts +171 -0
  150. package/src/funcs/{postV1BulkRedirectsVersions.ts → bulkRedirectsUpdateVersion.ts} +29 -18
  151. package/src/lib/config.ts +2 -2
  152. package/src/mcp-server/mcp-server.ts +1 -1
  153. package/src/mcp-server/server.ts +15 -15
  154. package/src/mcp-server/tools/bulkRedirectsDeleteRedirects.ts +37 -0
  155. package/src/mcp-server/tools/bulkRedirectsEditRedirect.ts +37 -0
  156. package/src/mcp-server/tools/{getV1BulkRedirects.ts → bulkRedirectsGetRedirects.ts} +9 -7
  157. package/src/mcp-server/tools/{putV1BulkRedirects.ts → bulkRedirectsGetVersions.ts} +9 -7
  158. package/src/mcp-server/tools/bulkRedirectsRestoreRedirects.ts +38 -0
  159. package/src/mcp-server/tools/bulkRedirectsStageRedirects.ts +37 -0
  160. package/src/mcp-server/tools/bulkRedirectsUpdateVersion.ts +38 -0
  161. package/src/models/artifactqueryop.ts +17 -21
  162. package/src/models/deleteredirectsop.ts +275 -0
  163. package/src/models/{patchv1bulkredirectsop.ts → editredirectop.ts} +78 -74
  164. package/src/models/getfirewallconfigop.ts +25 -17
  165. package/src/models/{getv1bulkredirectsop.ts → getredirectsop.ts} +91 -66
  166. package/src/models/{getv1bulkredirectsversionsop.ts → getversionsop.ts} +42 -34
  167. package/src/models/listaccessgroupsop.ts +18 -26
  168. package/src/models/putfirewallconfigop.ts +35 -4
  169. package/src/models/restoreredirectsop.ts +281 -0
  170. package/src/models/{putv1bulkredirectsop.ts → stageredirectsop.ts} +113 -50
  171. package/src/models/team.ts +14 -10
  172. package/src/models/updateversionop.ts +285 -0
  173. package/src/sdk/bulkredirects.ts +162 -0
  174. package/src/sdk/sdk.ts +7 -132
  175. package/vercel-spec.json +212 -36
  176. package/esm/funcs/deleteV1BulkRedirects.d.ts.map +0 -1
  177. package/esm/funcs/deleteV1BulkRedirects.js.map +0 -1
  178. package/esm/funcs/getV1BulkRedirects.d.ts.map +0 -1
  179. package/esm/funcs/getV1BulkRedirects.js.map +0 -1
  180. package/esm/funcs/getV1BulkRedirectsVersions.d.ts.map +0 -1
  181. package/esm/funcs/getV1BulkRedirectsVersions.js.map +0 -1
  182. package/esm/funcs/patchV1BulkRedirects.d.ts.map +0 -1
  183. package/esm/funcs/patchV1BulkRedirects.js.map +0 -1
  184. package/esm/funcs/postV1BulkRedirectsRestore.d.ts.map +0 -1
  185. package/esm/funcs/postV1BulkRedirectsRestore.js.map +0 -1
  186. package/esm/funcs/postV1BulkRedirectsVersions.d.ts.map +0 -1
  187. package/esm/funcs/postV1BulkRedirectsVersions.js.map +0 -1
  188. package/esm/funcs/putV1BulkRedirects.d.ts +0 -11
  189. package/esm/funcs/putV1BulkRedirects.d.ts.map +0 -1
  190. package/esm/funcs/putV1BulkRedirects.js +0 -69
  191. package/esm/funcs/putV1BulkRedirects.js.map +0 -1
  192. package/esm/mcp-server/tools/deleteV1BulkRedirects.d.ts +0 -7
  193. package/esm/mcp-server/tools/deleteV1BulkRedirects.d.ts.map +0 -1
  194. package/esm/mcp-server/tools/deleteV1BulkRedirects.js +0 -26
  195. package/esm/mcp-server/tools/deleteV1BulkRedirects.js.map +0 -1
  196. package/esm/mcp-server/tools/getV1BulkRedirects.d.ts +0 -7
  197. package/esm/mcp-server/tools/getV1BulkRedirects.d.ts.map +0 -1
  198. package/esm/mcp-server/tools/getV1BulkRedirects.js +0 -26
  199. package/esm/mcp-server/tools/getV1BulkRedirects.js.map +0 -1
  200. package/esm/mcp-server/tools/getV1BulkRedirectsVersions.d.ts +0 -7
  201. package/esm/mcp-server/tools/getV1BulkRedirectsVersions.d.ts.map +0 -1
  202. package/esm/mcp-server/tools/getV1BulkRedirectsVersions.js +0 -26
  203. package/esm/mcp-server/tools/getV1BulkRedirectsVersions.js.map +0 -1
  204. package/esm/mcp-server/tools/patchV1BulkRedirects.d.ts +0 -7
  205. package/esm/mcp-server/tools/patchV1BulkRedirects.d.ts.map +0 -1
  206. package/esm/mcp-server/tools/patchV1BulkRedirects.js +0 -26
  207. package/esm/mcp-server/tools/patchV1BulkRedirects.js.map +0 -1
  208. package/esm/mcp-server/tools/postV1BulkRedirectsRestore.d.ts +0 -7
  209. package/esm/mcp-server/tools/postV1BulkRedirectsRestore.d.ts.map +0 -1
  210. package/esm/mcp-server/tools/postV1BulkRedirectsRestore.js +0 -26
  211. package/esm/mcp-server/tools/postV1BulkRedirectsRestore.js.map +0 -1
  212. package/esm/mcp-server/tools/postV1BulkRedirectsVersions.d.ts +0 -7
  213. package/esm/mcp-server/tools/postV1BulkRedirectsVersions.d.ts.map +0 -1
  214. package/esm/mcp-server/tools/postV1BulkRedirectsVersions.js +0 -26
  215. package/esm/mcp-server/tools/postV1BulkRedirectsVersions.js.map +0 -1
  216. package/esm/mcp-server/tools/putV1BulkRedirects.d.ts +0 -7
  217. package/esm/mcp-server/tools/putV1BulkRedirects.d.ts.map +0 -1
  218. package/esm/mcp-server/tools/putV1BulkRedirects.js +0 -26
  219. package/esm/mcp-server/tools/putV1BulkRedirects.js.map +0 -1
  220. package/esm/models/deletev1bulkredirectsop.d.ts +0 -102
  221. package/esm/models/deletev1bulkredirectsop.d.ts.map +0 -1
  222. package/esm/models/deletev1bulkredirectsop.js +0 -95
  223. package/esm/models/deletev1bulkredirectsop.js.map +0 -1
  224. package/esm/models/getv1bulkredirectsop.d.ts.map +0 -1
  225. package/esm/models/getv1bulkredirectsop.js.map +0 -1
  226. package/esm/models/getv1bulkredirectsversionsop.d.ts.map +0 -1
  227. package/esm/models/getv1bulkredirectsversionsop.js.map +0 -1
  228. package/esm/models/patchv1bulkredirectsop.d.ts.map +0 -1
  229. package/esm/models/patchv1bulkredirectsop.js +0 -121
  230. package/esm/models/patchv1bulkredirectsop.js.map +0 -1
  231. package/esm/models/postv1bulkredirectsrestoreop.d.ts +0 -104
  232. package/esm/models/postv1bulkredirectsrestoreop.d.ts.map +0 -1
  233. package/esm/models/postv1bulkredirectsrestoreop.js +0 -96
  234. package/esm/models/postv1bulkredirectsrestoreop.js.map +0 -1
  235. package/esm/models/postv1bulkredirectsversionsop.d.ts +0 -110
  236. package/esm/models/postv1bulkredirectsversionsop.d.ts.map +0 -1
  237. package/esm/models/postv1bulkredirectsversionsop.js +0 -102
  238. package/esm/models/postv1bulkredirectsversionsop.js.map +0 -1
  239. package/esm/models/putv1bulkredirectsop.d.ts.map +0 -1
  240. package/esm/models/putv1bulkredirectsop.js +0 -108
  241. package/esm/models/putv1bulkredirectsop.js.map +0 -1
  242. package/src/funcs/putV1BulkRedirects.ts +0 -156
  243. package/src/mcp-server/tools/deleteV1BulkRedirects.ts +0 -36
  244. package/src/mcp-server/tools/getV1BulkRedirectsVersions.ts +0 -35
  245. package/src/mcp-server/tools/patchV1BulkRedirects.ts +0 -36
  246. package/src/mcp-server/tools/postV1BulkRedirectsRestore.ts +0 -36
  247. package/src/mcp-server/tools/postV1BulkRedirectsVersions.ts +0 -36
  248. package/src/models/deletev1bulkredirectsop.ts +0 -267
  249. package/src/models/postv1bulkredirectsrestoreop.ts +0 -275
  250. package/src/models/postv1bulkredirectsversionsop.ts +0 -296
@@ -1,108 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
- import * as z from "zod/v3";
5
- import { safeParse } from "../lib/schemas.js";
6
- /** @internal */
7
- export const StatusCode$inboundSchema = z.union([z.number(), z.string()]);
8
- /** @internal */
9
- export const StatusCode$outboundSchema = z.union([z.number(), z.string()]);
10
- export function statusCodeToJSON(statusCode) {
11
- return JSON.stringify(StatusCode$outboundSchema.parse(statusCode));
12
- }
13
- export function statusCodeFromJSON(jsonString) {
14
- return safeParse(jsonString, (x) => StatusCode$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'StatusCode' from JSON`);
15
- }
16
- /** @internal */
17
- export const Redirects$inboundSchema = z.object({
18
- source: z.string(),
19
- destination: z.string(),
20
- statusCode: z.union([z.number(), z.string()]).optional(),
21
- permanent: z.boolean().optional(),
22
- caseSensitive: z.boolean().optional(),
23
- query: z.boolean().optional(),
24
- });
25
- /** @internal */
26
- export const Redirects$outboundSchema = z.object({
27
- source: z.string(),
28
- destination: z.string(),
29
- statusCode: z.union([z.number(), z.string()]).optional(),
30
- permanent: z.boolean().optional(),
31
- caseSensitive: z.boolean().optional(),
32
- query: z.boolean().optional(),
33
- });
34
- export function redirectsToJSON(redirects) {
35
- return JSON.stringify(Redirects$outboundSchema.parse(redirects));
36
- }
37
- export function redirectsFromJSON(jsonString) {
38
- return safeParse(jsonString, (x) => Redirects$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Redirects' from JSON`);
39
- }
40
- /** @internal */
41
- export const PutV1BulkRedirectsRequestBody$inboundSchema = z.object({
42
- projectId: z.string(),
43
- teamId: z.string(),
44
- overwrite: z.boolean().optional(),
45
- name: z.string().optional(),
46
- redirects: z.array(z.lazy(() => Redirects$inboundSchema)).optional(),
47
- });
48
- /** @internal */
49
- export const PutV1BulkRedirectsRequestBody$outboundSchema = z.object({
50
- projectId: z.string(),
51
- teamId: z.string(),
52
- overwrite: z.boolean().optional(),
53
- name: z.string().optional(),
54
- redirects: z.array(z.lazy(() => Redirects$outboundSchema)).optional(),
55
- });
56
- export function putV1BulkRedirectsRequestBodyToJSON(putV1BulkRedirectsRequestBody) {
57
- return JSON.stringify(PutV1BulkRedirectsRequestBody$outboundSchema.parse(putV1BulkRedirectsRequestBody));
58
- }
59
- export function putV1BulkRedirectsRequestBodyFromJSON(jsonString) {
60
- return safeParse(jsonString, (x) => PutV1BulkRedirectsRequestBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PutV1BulkRedirectsRequestBody' from JSON`);
61
- }
62
- /** @internal */
63
- export const PutV1BulkRedirectsVersion$inboundSchema = z.object({
64
- id: z.string(),
65
- key: z.string(),
66
- lastModified: z.number(),
67
- createdBy: z.string(),
68
- name: z.string().optional(),
69
- isStaging: z.boolean().optional(),
70
- isLive: z.boolean().optional(),
71
- redirectCount: z.number().optional(),
72
- alias: z.string().optional(),
73
- });
74
- /** @internal */
75
- export const PutV1BulkRedirectsVersion$outboundSchema = z.object({
76
- id: z.string(),
77
- key: z.string(),
78
- lastModified: z.number(),
79
- createdBy: z.string(),
80
- name: z.string().optional(),
81
- isStaging: z.boolean().optional(),
82
- isLive: z.boolean().optional(),
83
- redirectCount: z.number().optional(),
84
- alias: z.string().optional(),
85
- });
86
- export function putV1BulkRedirectsVersionToJSON(putV1BulkRedirectsVersion) {
87
- return JSON.stringify(PutV1BulkRedirectsVersion$outboundSchema.parse(putV1BulkRedirectsVersion));
88
- }
89
- export function putV1BulkRedirectsVersionFromJSON(jsonString) {
90
- return safeParse(jsonString, (x) => PutV1BulkRedirectsVersion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PutV1BulkRedirectsVersion' from JSON`);
91
- }
92
- /** @internal */
93
- export const PutV1BulkRedirectsResponseBody$inboundSchema = z.object({
94
- alias: z.nullable(z.string()),
95
- version: z.lazy(() => PutV1BulkRedirectsVersion$inboundSchema),
96
- });
97
- /** @internal */
98
- export const PutV1BulkRedirectsResponseBody$outboundSchema = z.object({
99
- alias: z.nullable(z.string()),
100
- version: z.lazy(() => PutV1BulkRedirectsVersion$outboundSchema),
101
- });
102
- export function putV1BulkRedirectsResponseBodyToJSON(putV1BulkRedirectsResponseBody) {
103
- return JSON.stringify(PutV1BulkRedirectsResponseBody$outboundSchema.parse(putV1BulkRedirectsResponseBody));
104
- }
105
- export function putV1BulkRedirectsResponseBodyFromJSON(jsonString) {
106
- return safeParse(jsonString, (x) => PutV1BulkRedirectsResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PutV1BulkRedirectsResponseBody' from JSON`);
107
- }
108
- //# sourceMappingURL=putv1bulkredirectsop.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"putv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AA4C,GAIrD,CAAC,CAAC,MAAM,CAAC;IACX,KAAK,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC7B,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,uCAAuC,CAAC;CAC/D,CAAC,CAAC;AAOH,gBAAgB;AAChB,MAAM,CAAC,MAAM,6CAA6C,GAItD,CAAC,CAAC,MAAM,CAAC;IACX,KAAK,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC7B,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,wCAAwC,CAAC;CAChE,CAAC,CAAC;AAEH,MAAM,UAAU,oCAAoC,CAClD,8BAA8D;IAE9D,OAAO,IAAI,CAAC,SAAS,CACnB,6CAA6C,CAAC,KAAK,CACjD,8BAA8B,CAC/B,CACF,CAAC;AACJ,CAAC;AACD,MAAM,UAAU,sCAAsC,CACpD,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,4CAA4C,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACxE,4DAA4D,CAC7D,CAAC;AACJ,CAAC"}
@@ -1,156 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import { VercelCore } from "../core.js";
6
- import { encodeJSON } from "../lib/encodings.js";
7
- import * as M from "../lib/matchers.js";
8
- import { compactMap } from "../lib/primitives.js";
9
- import { safeParse } from "../lib/schemas.js";
10
- import { RequestOptions } from "../lib/sdks.js";
11
- import { pathToFunc } from "../lib/url.js";
12
- import {
13
- ConnectionError,
14
- InvalidRequestError,
15
- RequestAbortedError,
16
- RequestTimeoutError,
17
- UnexpectedClientError,
18
- } from "../models/httpclienterrors.js";
19
- import {
20
- PutV1BulkRedirectsRequestBody,
21
- PutV1BulkRedirectsRequestBody$outboundSchema,
22
- PutV1BulkRedirectsResponseBody,
23
- PutV1BulkRedirectsResponseBody$inboundSchema,
24
- } from "../models/putv1bulkredirectsop.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
- export function putV1BulkRedirects(
32
- client: VercelCore,
33
- request?: PutV1BulkRedirectsRequestBody | undefined,
34
- options?: RequestOptions,
35
- ): APIPromise<
36
- Result<
37
- PutV1BulkRedirectsResponseBody,
38
- | VercelError
39
- | ResponseValidationError
40
- | ConnectionError
41
- | RequestAbortedError
42
- | RequestTimeoutError
43
- | InvalidRequestError
44
- | UnexpectedClientError
45
- | SDKValidationError
46
- >
47
- > {
48
- return new APIPromise($do(
49
- client,
50
- request,
51
- options,
52
- ));
53
- }
54
-
55
- async function $do(
56
- client: VercelCore,
57
- request?: PutV1BulkRedirectsRequestBody | undefined,
58
- options?: RequestOptions,
59
- ): Promise<
60
- [
61
- Result<
62
- PutV1BulkRedirectsResponseBody,
63
- | VercelError
64
- | ResponseValidationError
65
- | ConnectionError
66
- | RequestAbortedError
67
- | RequestTimeoutError
68
- | InvalidRequestError
69
- | UnexpectedClientError
70
- | SDKValidationError
71
- >,
72
- APICall,
73
- ]
74
- > {
75
- const parsed = safeParse(
76
- request,
77
- (value) =>
78
- PutV1BulkRedirectsRequestBody$outboundSchema.optional().parse(value),
79
- "Input validation failed",
80
- );
81
- if (!parsed.ok) {
82
- return [parsed, { status: "invalid" }];
83
- }
84
- const payload = parsed.value;
85
- const body = payload === undefined
86
- ? null
87
- : encodeJSON("body", payload, { explode: true });
88
-
89
- const path = pathToFunc("/v1/bulk-redirects")();
90
-
91
- const headers = new Headers(compactMap({
92
- "Content-Type": "application/json",
93
- Accept: "application/json",
94
- }));
95
-
96
- const context = {
97
- options: client._options,
98
- baseURL: options?.serverURL ?? client._baseURL ?? "",
99
- operationID: "put_/v1/bulk-redirects",
100
- oAuth2Scopes: null,
101
-
102
- resolvedSecurity: null,
103
-
104
- securitySource: null,
105
- retryConfig: options?.retries
106
- || client._options.retryConfig
107
- || { strategy: "none" },
108
- retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
109
- };
110
-
111
- const requestRes = client._createRequest(context, {
112
- method: "PUT",
113
- baseURL: options?.serverURL,
114
- path: path,
115
- headers: headers,
116
- body: body,
117
- userAgent: client._options.userAgent,
118
- timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
119
- }, options);
120
- if (!requestRes.ok) {
121
- return [requestRes, { status: "invalid" }];
122
- }
123
- const req = requestRes.value;
124
-
125
- const doResult = await client._do(req, {
126
- context,
127
- errorCodes: ["400", "401", "403", "4XX", "500", "5XX"],
128
- retryConfig: context.retryConfig,
129
- retryCodes: context.retryCodes,
130
- });
131
- if (!doResult.ok) {
132
- return [doResult, { status: "request-error", request: req }];
133
- }
134
- const response = doResult.value;
135
-
136
- const [result] = await M.match<
137
- PutV1BulkRedirectsResponseBody,
138
- | VercelError
139
- | ResponseValidationError
140
- | ConnectionError
141
- | RequestAbortedError
142
- | RequestTimeoutError
143
- | InvalidRequestError
144
- | UnexpectedClientError
145
- | SDKValidationError
146
- >(
147
- M.json(200, PutV1BulkRedirectsResponseBody$inboundSchema),
148
- M.fail([400, 401, 403, "4XX"]),
149
- M.fail([500, "5XX"]),
150
- )(response, req);
151
- if (!result.ok) {
152
- return [result, { status: "complete", request: req, response }];
153
- }
154
-
155
- return [result, { status: "complete", request: req, response }];
156
- }
@@ -1,36 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import { deleteV1BulkRedirects } from "../../funcs/deleteV1BulkRedirects.js";
6
- import { DeleteV1BulkRedirectsRequest$inboundSchema } from "../../models/deletev1bulkredirectsop.js";
7
- import { formatResult, ToolDefinition } from "../tools.js";
8
-
9
- const args = {
10
- request: DeleteV1BulkRedirectsRequest$inboundSchema,
11
- };
12
-
13
- export const tool$deleteV1BulkRedirects: ToolDefinition<typeof args> = {
14
- name: "delete-v1-bulk-redirects",
15
- description:
16
- `Deletes the provided redirects from the latest version of the projects' bulk redirects. Stages a new change with the new redirects and returns the alias for the new version in the response.`,
17
- args,
18
- tool: async (client, args, ctx) => {
19
- const [result, apiCall] = await deleteV1BulkRedirects(
20
- client,
21
- args.request,
22
- { fetchOptions: { signal: ctx.signal } },
23
- ).$inspect();
24
-
25
- if (!result.ok) {
26
- return {
27
- content: [{ type: "text", text: result.error.message }],
28
- isError: true,
29
- };
30
- }
31
-
32
- const value = result.value;
33
-
34
- return formatResult(value, apiCall);
35
- },
36
- };
@@ -1,35 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import { getV1BulkRedirectsVersions } from "../../funcs/getV1BulkRedirectsVersions.js";
6
- import { GetV1BulkRedirectsVersionsRequest$inboundSchema } from "../../models/getv1bulkredirectsversionsop.js";
7
- import { formatResult, ToolDefinition } from "../tools.js";
8
-
9
- const args = {
10
- request: GetV1BulkRedirectsVersionsRequest$inboundSchema,
11
- };
12
-
13
- export const tool$getV1BulkRedirectsVersions: ToolDefinition<typeof args> = {
14
- name: "get-v1-bulk-redirects-versions",
15
- description: `Get the version history for a project's bulk redirects`,
16
- args,
17
- tool: async (client, args, ctx) => {
18
- const [result, apiCall] = await getV1BulkRedirectsVersions(
19
- client,
20
- args.request,
21
- { fetchOptions: { signal: ctx.signal } },
22
- ).$inspect();
23
-
24
- if (!result.ok) {
25
- return {
26
- content: [{ type: "text", text: result.error.message }],
27
- isError: true,
28
- };
29
- }
30
-
31
- const value = result.value;
32
-
33
- return formatResult(value, apiCall);
34
- },
35
- };
@@ -1,36 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import { patchV1BulkRedirects } from "../../funcs/patchV1BulkRedirects.js";
6
- import { PatchV1BulkRedirectsRequest$inboundSchema } from "../../models/patchv1bulkredirectsop.js";
7
- import { formatResult, ToolDefinition } from "../tools.js";
8
-
9
- const args = {
10
- request: PatchV1BulkRedirectsRequest$inboundSchema,
11
- };
12
-
13
- export const tool$patchV1BulkRedirects: ToolDefinition<typeof args> = {
14
- name: "patch-v1-bulk-redirects",
15
- description:
16
- `Edits a single redirect identified by its source path. Stages a new change with the modified redirect and returns the alias for the new version in the response.`,
17
- args,
18
- tool: async (client, args, ctx) => {
19
- const [result, apiCall] = await patchV1BulkRedirects(
20
- client,
21
- args.request,
22
- { fetchOptions: { signal: ctx.signal } },
23
- ).$inspect();
24
-
25
- if (!result.ok) {
26
- return {
27
- content: [{ type: "text", text: result.error.message }],
28
- isError: true,
29
- };
30
- }
31
-
32
- const value = result.value;
33
-
34
- return formatResult(value, apiCall);
35
- },
36
- };
@@ -1,36 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import { postV1BulkRedirectsRestore } from "../../funcs/postV1BulkRedirectsRestore.js";
6
- import { PostV1BulkRedirectsRestoreRequest$inboundSchema } from "../../models/postv1bulkredirectsrestoreop.js";
7
- import { formatResult, ToolDefinition } from "../tools.js";
8
-
9
- const args = {
10
- request: PostV1BulkRedirectsRestoreRequest$inboundSchema,
11
- };
12
-
13
- export const tool$postV1BulkRedirectsRestore: ToolDefinition<typeof args> = {
14
- name: "post-v1-bulk-redirects-restore",
15
- description:
16
- `Restores the provided redirects in the staging version to the value in the production version. If no production version exists, removes the redirects from staging.`,
17
- args,
18
- tool: async (client, args, ctx) => {
19
- const [result, apiCall] = await postV1BulkRedirectsRestore(
20
- client,
21
- args.request,
22
- { fetchOptions: { signal: ctx.signal } },
23
- ).$inspect();
24
-
25
- if (!result.ok) {
26
- return {
27
- content: [{ type: "text", text: result.error.message }],
28
- isError: true,
29
- };
30
- }
31
-
32
- const value = result.value;
33
-
34
- return formatResult(value, apiCall);
35
- },
36
- };
@@ -1,36 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import { postV1BulkRedirectsVersions } from "../../funcs/postV1BulkRedirectsVersions.js";
6
- import { PostV1BulkRedirectsVersionsRequest$inboundSchema } from "../../models/postv1bulkredirectsversionsop.js";
7
- import { formatResult, ToolDefinition } from "../tools.js";
8
-
9
- const args = {
10
- request: PostV1BulkRedirectsVersionsRequest$inboundSchema,
11
- };
12
-
13
- export const tool$postV1BulkRedirectsVersions: ToolDefinition<typeof args> = {
14
- name: "post-v1-bulk-redirects-versions",
15
- description:
16
- `Update a version by promoting staging to production or restoring a previous production version`,
17
- args,
18
- tool: async (client, args, ctx) => {
19
- const [result, apiCall] = await postV1BulkRedirectsVersions(
20
- client,
21
- args.request,
22
- { fetchOptions: { signal: ctx.signal } },
23
- ).$inspect();
24
-
25
- if (!result.ok) {
26
- return {
27
- content: [{ type: "text", text: result.error.message }],
28
- isError: true,
29
- };
30
- }
31
-
32
- const value = result.value;
33
-
34
- return formatResult(value, apiCall);
35
- },
36
- };