@vercel/sdk 1.18.1 → 1.18.3
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 +75 -80
- package/bin/mcp-server.js +4746 -2929
- package/bin/mcp-server.js.map +63 -45
- package/esm/__tests__/domains.test.js +12 -65
- package/esm/__tests__/domains.test.js.map +1 -1
- package/esm/__tests__/edgeconfig.test.js +6 -6
- package/esm/__tests__/edgeconfig.test.js.map +1 -1
- package/esm/__tests__/integrations.test.js +1 -1
- package/esm/__tests__/logdrains.test.js +6 -2
- package/esm/__tests__/logdrains.test.js.map +1 -1
- package/esm/__tests__/security.test.js +20 -35
- package/esm/__tests__/security.test.js.map +1 -1
- package/esm/__tests__/teams.test.js +16 -0
- package/esm/__tests__/teams.test.js.map +1 -1
- package/esm/__tests__/vercel.test.js +150 -1
- package/esm/__tests__/vercel.test.js.map +1 -1
- package/esm/funcs/deleteV1BulkRedirects.d.ts +14 -0
- package/esm/funcs/deleteV1BulkRedirects.d.ts.map +1 -0
- package/esm/funcs/deleteV1BulkRedirects.js +74 -0
- package/esm/funcs/deleteV1BulkRedirects.js.map +1 -0
- package/esm/funcs/domainsCreateOrTransferDomain.js +2 -2
- package/esm/funcs/domainsCreateOrTransferDomain.js.map +1 -1
- package/esm/funcs/getV1BulkRedirects.d.ts +14 -0
- package/esm/funcs/getV1BulkRedirects.d.ts.map +1 -0
- package/esm/funcs/getV1BulkRedirects.js +80 -0
- package/esm/funcs/getV1BulkRedirects.js.map +1 -0
- package/esm/funcs/getV1BulkRedirectsVersions.d.ts +14 -0
- package/esm/funcs/getV1BulkRedirectsVersions.d.ts.map +1 -0
- package/esm/funcs/getV1BulkRedirectsVersions.js +73 -0
- package/esm/funcs/getV1BulkRedirectsVersions.js.map +1 -0
- package/esm/funcs/integrationsGetBillingPlans.js +1 -0
- package/esm/funcs/integrationsGetBillingPlans.js.map +1 -1
- package/esm/funcs/patchV1BulkRedirects.d.ts +14 -0
- package/esm/funcs/patchV1BulkRedirects.d.ts.map +1 -0
- package/esm/funcs/patchV1BulkRedirects.js +74 -0
- package/esm/funcs/patchV1BulkRedirects.js.map +1 -0
- package/esm/funcs/postV1BulkRedirectsRestore.d.ts +14 -0
- package/esm/funcs/postV1BulkRedirectsRestore.d.ts.map +1 -0
- package/esm/funcs/postV1BulkRedirectsRestore.js +74 -0
- package/esm/funcs/postV1BulkRedirectsRestore.js.map +1 -0
- package/esm/funcs/postV1BulkRedirectsVersions.d.ts +14 -0
- package/esm/funcs/postV1BulkRedirectsVersions.d.ts.map +1 -0
- package/esm/funcs/postV1BulkRedirectsVersions.js +74 -0
- package/esm/funcs/postV1BulkRedirectsVersions.js.map +1 -0
- package/esm/funcs/putV1BulkRedirects.d.ts +11 -0
- package/esm/funcs/putV1BulkRedirects.d.ts.map +1 -0
- package/esm/funcs/putV1BulkRedirects.js +69 -0
- package/esm/funcs/putV1BulkRedirects.js.map +1 -0
- package/esm/funcs/teamsPostTeamDsyncRoles.d.ts +17 -0
- package/esm/funcs/teamsPostTeamDsyncRoles.d.ts.map +1 -0
- package/esm/funcs/{domainsBuyDomain.js → teamsPostTeamDsyncRoles.js} +17 -12
- package/esm/funcs/teamsPostTeamDsyncRoles.js.map +1 -0
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/mcp-server/mcp-server.js +1 -1
- package/esm/mcp-server/server.d.ts.map +1 -1
- package/esm/mcp-server/server.js +17 -5
- package/esm/mcp-server/server.js.map +1 -1
- package/esm/mcp-server/tools/deleteV1BulkRedirects.d.ts +7 -0
- package/esm/mcp-server/tools/deleteV1BulkRedirects.d.ts.map +1 -0
- package/esm/mcp-server/tools/deleteV1BulkRedirects.js +26 -0
- package/esm/mcp-server/tools/deleteV1BulkRedirects.js.map +1 -0
- package/esm/mcp-server/tools/getV1BulkRedirects.d.ts +7 -0
- package/esm/mcp-server/tools/getV1BulkRedirects.d.ts.map +1 -0
- package/esm/mcp-server/tools/getV1BulkRedirects.js +26 -0
- package/esm/mcp-server/tools/getV1BulkRedirects.js.map +1 -0
- package/esm/mcp-server/tools/getV1BulkRedirectsVersions.d.ts +7 -0
- package/esm/mcp-server/tools/getV1BulkRedirectsVersions.d.ts.map +1 -0
- package/esm/mcp-server/tools/getV1BulkRedirectsVersions.js +26 -0
- package/esm/mcp-server/tools/getV1BulkRedirectsVersions.js.map +1 -0
- package/esm/mcp-server/tools/patchV1BulkRedirects.d.ts +7 -0
- package/esm/mcp-server/tools/patchV1BulkRedirects.d.ts.map +1 -0
- package/esm/mcp-server/tools/patchV1BulkRedirects.js +26 -0
- package/esm/mcp-server/tools/patchV1BulkRedirects.js.map +1 -0
- package/esm/mcp-server/tools/postV1BulkRedirectsRestore.d.ts +7 -0
- package/esm/mcp-server/tools/postV1BulkRedirectsRestore.d.ts.map +1 -0
- package/esm/mcp-server/tools/postV1BulkRedirectsRestore.js +26 -0
- package/esm/mcp-server/tools/postV1BulkRedirectsRestore.js.map +1 -0
- package/esm/mcp-server/tools/postV1BulkRedirectsVersions.d.ts +7 -0
- package/esm/mcp-server/tools/postV1BulkRedirectsVersions.d.ts.map +1 -0
- package/esm/mcp-server/tools/postV1BulkRedirectsVersions.js +26 -0
- package/esm/mcp-server/tools/postV1BulkRedirectsVersions.js.map +1 -0
- package/esm/mcp-server/tools/putV1BulkRedirects.d.ts +7 -0
- package/esm/mcp-server/tools/putV1BulkRedirects.d.ts.map +1 -0
- package/esm/mcp-server/tools/putV1BulkRedirects.js +26 -0
- package/esm/mcp-server/tools/putV1BulkRedirects.js.map +1 -0
- package/esm/mcp-server/tools/teamsPostTeamDsyncRoles.d.ts +7 -0
- package/esm/mcp-server/tools/teamsPostTeamDsyncRoles.d.ts.map +1 -0
- package/esm/mcp-server/tools/teamsPostTeamDsyncRoles.js +28 -0
- package/esm/mcp-server/tools/teamsPostTeamDsyncRoles.js.map +1 -0
- package/esm/models/artifactqueryop.d.ts +8 -8
- package/esm/models/artifactqueryop.d.ts.map +1 -1
- package/esm/models/artifactqueryop.js +8 -8
- package/esm/models/artifactqueryop.js.map +1 -1
- package/esm/models/authuser.d.ts +5 -0
- package/esm/models/authuser.d.ts.map +1 -1
- package/esm/models/authuser.js +2 -0
- package/esm/models/authuser.js.map +1 -1
- package/esm/models/canceldeploymentop.d.ts +48 -2
- package/esm/models/canceldeploymentop.d.ts.map +1 -1
- package/esm/models/canceldeploymentop.js +44 -2
- package/esm/models/canceldeploymentop.js.map +1 -1
- package/esm/models/createdeploymentop.d.ts +48 -2
- package/esm/models/createdeploymentop.d.ts.map +1 -1
- package/esm/models/createdeploymentop.js +48 -2
- package/esm/models/createdeploymentop.js.map +1 -1
- package/esm/models/createedgeconfigop.d.ts +5 -0
- package/esm/models/createedgeconfigop.d.ts.map +1 -1
- package/esm/models/createedgeconfigop.js +2 -0
- package/esm/models/createedgeconfigop.js.map +1 -1
- package/esm/models/createintegrationstoredirectop.d.ts +222 -152
- package/esm/models/createintegrationstoredirectop.d.ts.map +1 -1
- package/esm/models/createintegrationstoredirectop.js +298 -218
- package/esm/models/createintegrationstoredirectop.js.map +1 -1
- package/esm/models/createortransferdomainop.d.ts +4 -40
- package/esm/models/createortransferdomainop.d.ts.map +1 -1
- package/esm/models/createortransferdomainop.js +0 -24
- package/esm/models/createortransferdomainop.js.map +1 -1
- package/esm/models/createprojectop.d.ts +138 -6
- package/esm/models/createprojectop.d.ts.map +1 -1
- package/esm/models/createprojectop.js +126 -6
- package/esm/models/createprojectop.js.map +1 -1
- package/esm/models/createwebhookop.d.ts +4 -2
- package/esm/models/createwebhookop.d.ts.map +1 -1
- package/esm/models/createwebhookop.js +4 -2
- package/esm/models/createwebhookop.js.map +1 -1
- package/esm/models/deletev1bulkredirectsop.d.ts +102 -0
- package/esm/models/deletev1bulkredirectsop.d.ts.map +1 -0
- package/esm/models/deletev1bulkredirectsop.js +95 -0
- package/esm/models/deletev1bulkredirectsop.js.map +1 -0
- package/esm/models/getbillingplansop.d.ts +2 -0
- package/esm/models/getbillingplansop.d.ts.map +1 -1
- package/esm/models/getbillingplansop.js +2 -0
- package/esm/models/getbillingplansop.js.map +1 -1
- package/esm/models/getconfigurationop.d.ts +61 -1
- package/esm/models/getconfigurationop.d.ts.map +1 -1
- package/esm/models/getconfigurationop.js +44 -1
- package/esm/models/getconfigurationop.js.map +1 -1
- package/esm/models/getconfigurationproductsop.d.ts +200 -200
- package/esm/models/getconfigurationproductsop.js +290 -290
- package/esm/models/getconfigurationsop.d.ts +61 -0
- package/esm/models/getconfigurationsop.d.ts.map +1 -1
- package/esm/models/getconfigurationsop.js +44 -0
- package/esm/models/getconfigurationsop.js.map +1 -1
- package/esm/models/getdeploymenteventsop.d.ts +6 -6
- package/esm/models/getdeploymenteventsop.d.ts.map +1 -1
- package/esm/models/getdeploymenteventsop.js +6 -6
- package/esm/models/getdeploymenteventsop.js.map +1 -1
- package/esm/models/getdeploymentop.d.ts +94 -4
- package/esm/models/getdeploymentop.d.ts.map +1 -1
- package/esm/models/getdeploymentop.js +86 -4
- package/esm/models/getdeploymentop.js.map +1 -1
- package/esm/models/getedgeconfigop.d.ts +5 -0
- package/esm/models/getedgeconfigop.d.ts.map +1 -1
- package/esm/models/getedgeconfigop.js +2 -0
- package/esm/models/getedgeconfigop.js.map +1 -1
- package/esm/models/getfirewallconfigop.d.ts +336 -103
- package/esm/models/getfirewallconfigop.d.ts.map +1 -1
- package/esm/models/getfirewallconfigop.js +358 -98
- package/esm/models/getfirewallconfigop.js.map +1 -1
- package/esm/models/getorderop.d.ts +126 -42
- package/esm/models/getorderop.d.ts.map +1 -1
- package/esm/models/getorderop.js +138 -24
- package/esm/models/getorderop.js.map +1 -1
- package/esm/models/getprojectdomainsop.d.ts +5 -5
- package/esm/models/getprojectdomainsop.d.ts.map +1 -1
- package/esm/models/getprojectdomainsop.js +5 -6
- package/esm/models/getprojectdomainsop.js.map +1 -1
- package/esm/models/getprojectsop.d.ts +109 -6
- package/esm/models/getprojectsop.d.ts.map +1 -1
- package/esm/models/getprojectsop.js +97 -6
- package/esm/models/getprojectsop.js.map +1 -1
- package/esm/models/getv1bulkredirectsop.d.ts +190 -0
- package/esm/models/getv1bulkredirectsop.d.ts.map +1 -0
- package/esm/models/getv1bulkredirectsop.js +195 -0
- package/esm/models/getv1bulkredirectsop.js.map +1 -0
- package/esm/models/getv1bulkredirectsversionsop.d.ts +80 -0
- package/esm/models/getv1bulkredirectsversionsop.d.ts.map +1 -0
- package/esm/models/getv1bulkredirectsversionsop.js +64 -0
- package/esm/models/getv1bulkredirectsversionsop.js.map +1 -0
- package/esm/models/getwebhookop.d.ts +2 -1
- package/esm/models/getwebhookop.d.ts.map +1 -1
- package/esm/models/getwebhookop.js +2 -1
- package/esm/models/getwebhookop.js.map +1 -1
- package/esm/models/getwebhooksop.d.ts +4 -2
- package/esm/models/getwebhooksop.d.ts.map +1 -1
- package/esm/models/getwebhooksop.js +4 -2
- package/esm/models/getwebhooksop.js.map +1 -1
- package/esm/models/listaccessgroupsop.d.ts +8 -8
- package/esm/models/listaccessgroupsop.d.ts.map +1 -1
- package/esm/models/listaccessgroupsop.js +8 -8
- package/esm/models/listaccessgroupsop.js.map +1 -1
- package/esm/models/patchv1bulkredirectsop.d.ts +133 -0
- package/esm/models/patchv1bulkredirectsop.d.ts.map +1 -0
- package/esm/models/patchv1bulkredirectsop.js +121 -0
- package/esm/models/patchv1bulkredirectsop.js.map +1 -0
- package/esm/models/postteamdsyncrolesop.d.ts +98 -0
- package/esm/models/postteamdsyncrolesop.d.ts.map +1 -0
- package/esm/models/postteamdsyncrolesop.js +113 -0
- package/esm/models/postteamdsyncrolesop.js.map +1 -0
- package/esm/models/postv1bulkredirectsrestoreop.d.ts +104 -0
- package/esm/models/postv1bulkredirectsrestoreop.d.ts.map +1 -0
- package/esm/models/postv1bulkredirectsrestoreop.js +96 -0
- package/esm/models/postv1bulkredirectsrestoreop.js.map +1 -0
- package/esm/models/postv1bulkredirectsversionsop.d.ts +110 -0
- package/esm/models/postv1bulkredirectsversionsop.d.ts.map +1 -0
- package/esm/models/postv1bulkredirectsversionsop.js +102 -0
- package/esm/models/postv1bulkredirectsversionsop.js.map +1 -0
- package/esm/models/putfirewallconfigop.d.ts +357 -100
- package/esm/models/putfirewallconfigop.d.ts.map +1 -1
- package/esm/models/putfirewallconfigop.js +379 -102
- package/esm/models/putfirewallconfigop.js.map +1 -1
- package/esm/models/putv1bulkredirectsop.d.ts +122 -0
- package/esm/models/putv1bulkredirectsop.d.ts.map +1 -0
- package/esm/models/putv1bulkredirectsop.js +108 -0
- package/esm/models/putv1bulkredirectsop.js.map +1 -0
- package/esm/models/updateedgeconfigop.d.ts +5 -0
- package/esm/models/updateedgeconfigop.d.ts.map +1 -1
- package/esm/models/updateedgeconfigop.js +2 -0
- package/esm/models/updateedgeconfigop.js.map +1 -1
- package/esm/models/updatefirewallconfigop.d.ts +30 -0
- package/esm/models/updatefirewallconfigop.d.ts.map +1 -1
- package/esm/models/updatefirewallconfigop.js +32 -0
- package/esm/models/updatefirewallconfigop.js.map +1 -1
- package/esm/models/updateinstallationop.d.ts +18 -0
- package/esm/models/updateinstallationop.d.ts.map +1 -1
- package/esm/models/updateinstallationop.js +17 -0
- package/esm/models/updateinstallationop.js.map +1 -1
- package/esm/models/updateprojectdatacacheop.d.ts +124 -21
- package/esm/models/updateprojectdatacacheop.d.ts.map +1 -1
- package/esm/models/updateprojectdatacacheop.js +118 -24
- package/esm/models/updateprojectdatacacheop.js.map +1 -1
- package/esm/models/updateprojectop.d.ts +138 -6
- package/esm/models/updateprojectop.d.ts.map +1 -1
- package/esm/models/updateprojectop.js +126 -6
- package/esm/models/updateprojectop.js.map +1 -1
- package/esm/models/updateprojectprotectionbypassop.d.ts +49 -0
- package/esm/models/updateprojectprotectionbypassop.d.ts.map +1 -1
- package/esm/models/updateprojectprotectionbypassop.js +27 -0
- package/esm/models/updateprojectprotectionbypassop.js.map +1 -1
- package/esm/models/userevent.d.ts +792 -966
- package/esm/models/userevent.d.ts.map +1 -1
- package/esm/models/userevent.js +1047 -1248
- package/esm/models/userevent.js.map +1 -1
- package/esm/sdk/domains.d.ts +0 -16
- package/esm/sdk/domains.d.ts.map +1 -1
- package/esm/sdk/domains.js +0 -20
- package/esm/sdk/domains.js.map +1 -1
- package/esm/sdk/sdk.d.ts +33 -1
- package/esm/sdk/sdk.d.ts.map +1 -1
- package/esm/sdk/sdk.js +47 -0
- package/esm/sdk/sdk.js.map +1 -1
- package/esm/sdk/teams.d.ts +8 -0
- package/esm/sdk/teams.d.ts.map +1 -1
- package/esm/sdk/teams.js +10 -0
- package/esm/sdk/teams.js.map +1 -1
- package/examples/package-lock.json +2 -2
- package/jsr.json +1 -1
- package/package.json +2 -2
- package/src/__tests__/domains.test.ts +16 -70
- package/src/__tests__/edgeconfig.test.ts +6 -6
- package/src/__tests__/integrations.test.ts +1 -1
- package/src/__tests__/logdrains.test.ts +6 -2
- package/src/__tests__/security.test.ts +20 -35
- package/src/__tests__/teams.test.ts +19 -0
- package/src/__tests__/vercel.test.ts +177 -1
- package/src/funcs/deleteV1BulkRedirects.ts +161 -0
- package/src/funcs/domainsCreateOrTransferDomain.ts +2 -2
- package/src/funcs/getV1BulkRedirects.ts +167 -0
- package/src/funcs/getV1BulkRedirectsVersions.ts +160 -0
- package/src/funcs/integrationsGetBillingPlans.ts +1 -0
- package/src/funcs/patchV1BulkRedirects.ts +161 -0
- package/src/funcs/postV1BulkRedirectsRestore.ts +161 -0
- package/src/funcs/postV1BulkRedirectsVersions.ts +161 -0
- package/src/funcs/putV1BulkRedirects.ts +156 -0
- package/src/funcs/{domainsBuyDomain.ts → teamsPostTeamDsyncRoles.ts} +29 -24
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +17 -5
- package/src/mcp-server/tools/deleteV1BulkRedirects.ts +36 -0
- package/src/mcp-server/tools/getV1BulkRedirects.ts +35 -0
- package/src/mcp-server/tools/getV1BulkRedirectsVersions.ts +35 -0
- package/src/mcp-server/tools/patchV1BulkRedirects.ts +36 -0
- package/src/mcp-server/tools/postV1BulkRedirectsRestore.ts +36 -0
- package/src/mcp-server/tools/postV1BulkRedirectsVersions.ts +36 -0
- package/src/mcp-server/tools/putV1BulkRedirects.ts +35 -0
- package/src/mcp-server/tools/teamsPostTeamDsyncRoles.ts +37 -0
- package/src/models/artifactqueryop.ts +21 -17
- package/src/models/authuser.ts +7 -0
- package/src/models/canceldeploymentop.ts +133 -4
- package/src/models/createdeploymentop.ts +116 -4
- package/src/models/createedgeconfigop.ts +7 -0
- package/src/models/createintegrationstoredirectop.ts +708 -471
- package/src/models/createortransferdomainop.ts +0 -83
- package/src/models/createprojectop.ts +346 -12
- package/src/models/createwebhookop.ts +4 -2
- package/src/models/deletev1bulkredirectsop.ts +267 -0
- package/src/models/getbillingplansop.ts +4 -0
- package/src/models/getconfigurationop.ts +87 -1
- package/src/models/getconfigurationproductsop.ts +627 -627
- package/src/models/getconfigurationsop.ts +87 -0
- package/src/models/getdeploymenteventsop.ts +17 -13
- package/src/models/getdeploymentop.ts +271 -8
- package/src/models/getedgeconfigop.ts +7 -0
- package/src/models/getfirewallconfigop.ts +835 -274
- package/src/models/getorderop.ts +469 -112
- package/src/models/getprojectdomainsop.ts +11 -9
- package/src/models/getprojectsop.ts +260 -12
- package/src/models/getv1bulkredirectsop.ts +467 -0
- package/src/models/getv1bulkredirectsversionsop.ts +192 -0
- package/src/models/getwebhookop.ts +2 -1
- package/src/models/getwebhooksop.ts +4 -2
- package/src/models/listaccessgroupsop.ts +26 -18
- package/src/models/patchv1bulkredirectsop.ts +336 -0
- package/src/models/postteamdsyncrolesop.ts +291 -0
- package/src/models/postv1bulkredirectsrestoreop.ts +275 -0
- package/src/models/postv1bulkredirectsversionsop.ts +296 -0
- package/src/models/putfirewallconfigop.ts +1025 -284
- package/src/models/putv1bulkredirectsop.ts +304 -0
- package/src/models/updateedgeconfigop.ts +7 -0
- package/src/models/updatefirewallconfigop.ts +107 -0
- package/src/models/updateinstallationop.ts +30 -0
- package/src/models/updateprojectdatacacheop.ts +322 -63
- package/src/models/updateprojectop.ts +346 -12
- package/src/models/updateprojectprotectionbypassop.ts +84 -0
- package/src/models/userevent.ts +2415 -2887
- package/src/sdk/domains.ts +0 -41
- package/src/sdk/sdk.ts +132 -1
- package/src/sdk/teams.ts +22 -0
- package/vercel-spec.json +3260 -1294
- package/esm/funcs/domainsBuyDomain.d.ts +0 -17
- package/esm/funcs/domainsBuyDomain.d.ts.map +0 -1
- package/esm/funcs/domainsBuyDomain.js.map +0 -1
- package/esm/mcp-server/tools/domainsBuyDomain.d.ts +0 -7
- package/esm/mcp-server/tools/domainsBuyDomain.d.ts.map +0 -1
- package/esm/mcp-server/tools/domainsBuyDomain.js +0 -28
- package/esm/mcp-server/tools/domainsBuyDomain.js.map +0 -1
- package/esm/models/buydomainop.d.ts +0 -180
- package/esm/models/buydomainop.d.ts.map +0 -1
- package/esm/models/buydomainop.js +0 -159
- package/esm/models/buydomainop.js.map +0 -1
- package/src/mcp-server/tools/domainsBuyDomain.ts +0 -37
- package/src/models/buydomainop.ts +0 -453
|
@@ -109,47 +109,34 @@ test("Security Put Firewall Config", async () => {
|
|
|
109
109
|
active: true,
|
|
110
110
|
conditionGroup: [
|
|
111
111
|
{
|
|
112
|
-
conditions: [
|
|
113
|
-
{
|
|
114
|
-
type: "target_path",
|
|
115
|
-
op: "pre",
|
|
116
|
-
},
|
|
117
|
-
],
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
conditions: [
|
|
121
|
-
{
|
|
122
|
-
type: "target_path",
|
|
123
|
-
op: "pre",
|
|
124
|
-
},
|
|
125
|
-
],
|
|
112
|
+
conditions: [],
|
|
126
113
|
},
|
|
127
114
|
],
|
|
128
115
|
action: {},
|
|
116
|
+
valid: false,
|
|
117
|
+
validationErrors: [
|
|
118
|
+
"<value 1>",
|
|
119
|
+
"<value 2>",
|
|
120
|
+
"<value 3>",
|
|
121
|
+
],
|
|
129
122
|
},
|
|
130
123
|
{
|
|
131
124
|
id: "<id>",
|
|
132
125
|
name: "<value>",
|
|
133
|
-
active:
|
|
126
|
+
active: false,
|
|
134
127
|
conditionGroup: [
|
|
135
128
|
{
|
|
136
129
|
conditions: [
|
|
137
130
|
{
|
|
138
|
-
type: "
|
|
139
|
-
op: "
|
|
140
|
-
},
|
|
141
|
-
],
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
conditions: [
|
|
145
|
-
{
|
|
146
|
-
type: "target_path",
|
|
147
|
-
op: "pre",
|
|
131
|
+
type: "bot_name",
|
|
132
|
+
op: "re",
|
|
148
133
|
},
|
|
149
134
|
],
|
|
150
135
|
},
|
|
151
136
|
],
|
|
152
137
|
action: {},
|
|
138
|
+
valid: true,
|
|
139
|
+
validationErrors: null,
|
|
153
140
|
},
|
|
154
141
|
],
|
|
155
142
|
ips: [],
|
|
@@ -260,17 +247,15 @@ test("Security Get Firewall Config", async () => {
|
|
|
260
247
|
{
|
|
261
248
|
conditions: [
|
|
262
249
|
{
|
|
263
|
-
type: "
|
|
264
|
-
op: "
|
|
265
|
-
},
|
|
266
|
-
{
|
|
267
|
-
type: "header",
|
|
268
|
-
op: "ex",
|
|
250
|
+
type: "ja4_digest",
|
|
251
|
+
op: "sub",
|
|
269
252
|
},
|
|
270
253
|
],
|
|
271
254
|
},
|
|
272
255
|
],
|
|
273
256
|
action: {},
|
|
257
|
+
valid: false,
|
|
258
|
+
validationErrors: [],
|
|
274
259
|
},
|
|
275
260
|
],
|
|
276
261
|
ips: [
|
|
@@ -322,10 +307,10 @@ test("Security Get Bypass Ip", async () => {
|
|
|
322
307
|
{
|
|
323
308
|
ownerId: "<id>",
|
|
324
309
|
id: "<id>",
|
|
325
|
-
domain: "
|
|
326
|
-
ip: "
|
|
327
|
-
createdAt: "
|
|
328
|
-
updatedAt: "
|
|
310
|
+
domain: "corrupt-unblinking.name",
|
|
311
|
+
ip: "67.198.116.145",
|
|
312
|
+
createdAt: "1704746155127",
|
|
313
|
+
updatedAt: "1735656563089",
|
|
329
314
|
updatedAtHour: "<value>",
|
|
330
315
|
},
|
|
331
316
|
],
|
|
@@ -398,3 +398,22 @@ test("Teams Invite User To Team", async () => {
|
|
|
398
398
|
],
|
|
399
399
|
});
|
|
400
400
|
});
|
|
401
|
+
|
|
402
|
+
test("Teams Post Team Dsync Roles", async () => {
|
|
403
|
+
const testHttpClient = createTestHTTPClient("postTeamDsyncRoles");
|
|
404
|
+
|
|
405
|
+
const vercel = new Vercel({
|
|
406
|
+
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
407
|
+
httpClient: testHttpClient,
|
|
408
|
+
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
|
|
409
|
+
});
|
|
410
|
+
|
|
411
|
+
const result = await vercel.teams.postTeamDsyncRoles({
|
|
412
|
+
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
|
|
413
|
+
slug: "my-team-url-slug",
|
|
414
|
+
});
|
|
415
|
+
expect(result).toBeDefined();
|
|
416
|
+
expect(result).toEqual({
|
|
417
|
+
ok: true,
|
|
418
|
+
});
|
|
419
|
+
});
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import { assert, it } from "vitest";
|
|
5
|
+
import { assert, expect, it, test } from "vitest";
|
|
6
|
+
import { Vercel } from "../index.js";
|
|
7
|
+
import { createTestHTTPClient } from "./testclient.js";
|
|
6
8
|
|
|
7
9
|
it.skip("Vercel Post /Domains", async () => {
|
|
8
10
|
assert.fail(
|
|
@@ -39,3 +41,177 @@ it.skip("Vercel Get /V1 /Integrations/integration/{integration Id Or Slug}/produ
|
|
|
39
41
|
"incomplete test found please make sure to address the following errors: [`workflow step get_/v1/integrations/integration/{integrationIdOrSlug}/products/{productIdOrSlug}/plans.test referencing operation get_/v1/integrations/integration/{integrationIdOrSlug}/products/{productIdOrSlug}/plans not found in document`]",
|
|
40
42
|
);
|
|
41
43
|
});
|
|
44
|
+
|
|
45
|
+
test("Vercel Put /V1 /Bulk Redirects", async () => {
|
|
46
|
+
const testHttpClient = createTestHTTPClient("put_/v1/bulk-redirects");
|
|
47
|
+
|
|
48
|
+
const vercel = new Vercel({
|
|
49
|
+
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
50
|
+
httpClient: testHttpClient,
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
const result = await vercel.putV1BulkRedirects();
|
|
54
|
+
expect(result).toBeDefined();
|
|
55
|
+
expect(result).toEqual({
|
|
56
|
+
alias: "<value>",
|
|
57
|
+
version: {
|
|
58
|
+
id: "<id>",
|
|
59
|
+
key: "<key>",
|
|
60
|
+
lastModified: 8885.75,
|
|
61
|
+
createdBy: "<value>",
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
test("Vercel Get /V1 /Bulk Redirects", async () => {
|
|
67
|
+
const testHttpClient = createTestHTTPClient("get_/v1/bulk-redirects");
|
|
68
|
+
|
|
69
|
+
const vercel = new Vercel({
|
|
70
|
+
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
71
|
+
httpClient: testHttpClient,
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
const result = await vercel.getV1BulkRedirects({
|
|
75
|
+
projectId: "<id>",
|
|
76
|
+
});
|
|
77
|
+
expect(result).toBeDefined();
|
|
78
|
+
expect(result).toEqual({
|
|
79
|
+
"redirects": [
|
|
80
|
+
{
|
|
81
|
+
"destination": "<value>",
|
|
82
|
+
"source": "<value>",
|
|
83
|
+
},
|
|
84
|
+
],
|
|
85
|
+
"pagination": {
|
|
86
|
+
"page": 6667.14,
|
|
87
|
+
"per_page": 8650.59,
|
|
88
|
+
"numPages": 8888.83,
|
|
89
|
+
},
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
test("Vercel Delete /V1 /Bulk Redirects", async () => {
|
|
94
|
+
const testHttpClient = createTestHTTPClient("delete_/v1/bulk-redirects");
|
|
95
|
+
|
|
96
|
+
const vercel = new Vercel({
|
|
97
|
+
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
98
|
+
httpClient: testHttpClient,
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
const result = await vercel.deleteV1BulkRedirects({
|
|
102
|
+
projectId: "<id>",
|
|
103
|
+
});
|
|
104
|
+
expect(result).toBeDefined();
|
|
105
|
+
expect(result).toEqual({
|
|
106
|
+
alias: null,
|
|
107
|
+
version: {
|
|
108
|
+
id: "<id>",
|
|
109
|
+
key: "<key>",
|
|
110
|
+
lastModified: 7414.09,
|
|
111
|
+
createdBy: "<value>",
|
|
112
|
+
},
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
test("Vercel Patch /V1 /Bulk Redirects", async () => {
|
|
117
|
+
const testHttpClient = createTestHTTPClient("patch_/v1/bulk-redirects");
|
|
118
|
+
|
|
119
|
+
const vercel = new Vercel({
|
|
120
|
+
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
121
|
+
httpClient: testHttpClient,
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
const result = await vercel.patchV1BulkRedirects({
|
|
125
|
+
projectId: "<id>",
|
|
126
|
+
});
|
|
127
|
+
expect(result).toBeDefined();
|
|
128
|
+
expect(result).toEqual({
|
|
129
|
+
alias: "<value>",
|
|
130
|
+
version: {
|
|
131
|
+
id: "<id>",
|
|
132
|
+
key: "<key>",
|
|
133
|
+
lastModified: 3750.92,
|
|
134
|
+
createdBy: "<value>",
|
|
135
|
+
},
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
test("Vercel Post /V1 /Bulk Redirects/restore", async () => {
|
|
140
|
+
const testHttpClient = createTestHTTPClient(
|
|
141
|
+
"post_/v1/bulk-redirects/restore",
|
|
142
|
+
);
|
|
143
|
+
|
|
144
|
+
const vercel = new Vercel({
|
|
145
|
+
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
146
|
+
httpClient: testHttpClient,
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
const result = await vercel.postV1BulkRedirectsRestore({
|
|
150
|
+
projectId: "<id>",
|
|
151
|
+
});
|
|
152
|
+
expect(result).toBeDefined();
|
|
153
|
+
expect(result).toEqual({
|
|
154
|
+
version: {
|
|
155
|
+
id: "<id>",
|
|
156
|
+
key: "<key>",
|
|
157
|
+
lastModified: 7169.03,
|
|
158
|
+
createdBy: "<value>",
|
|
159
|
+
},
|
|
160
|
+
restored: [
|
|
161
|
+
"<value 1>",
|
|
162
|
+
"<value 2>",
|
|
163
|
+
"<value 3>",
|
|
164
|
+
],
|
|
165
|
+
failedToRestore: [],
|
|
166
|
+
});
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
test("Vercel Get /V1 /Bulk Redirects/versions", async () => {
|
|
170
|
+
const testHttpClient = createTestHTTPClient(
|
|
171
|
+
"get_/v1/bulk-redirects/versions",
|
|
172
|
+
);
|
|
173
|
+
|
|
174
|
+
const vercel = new Vercel({
|
|
175
|
+
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
176
|
+
httpClient: testHttpClient,
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
const result = await vercel.getV1BulkRedirectsVersions({
|
|
180
|
+
projectId: "<id>",
|
|
181
|
+
});
|
|
182
|
+
expect(result).toBeDefined();
|
|
183
|
+
expect(result).toEqual({
|
|
184
|
+
versions: [
|
|
185
|
+
{
|
|
186
|
+
id: "<id>",
|
|
187
|
+
key: "<key>",
|
|
188
|
+
lastModified: 994.47,
|
|
189
|
+
createdBy: "<value>",
|
|
190
|
+
},
|
|
191
|
+
],
|
|
192
|
+
});
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
test("Vercel Post /V1 /Bulk Redirects/versions", async () => {
|
|
196
|
+
const testHttpClient = createTestHTTPClient(
|
|
197
|
+
"post_/v1/bulk-redirects/versions",
|
|
198
|
+
);
|
|
199
|
+
|
|
200
|
+
const vercel = new Vercel({
|
|
201
|
+
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
202
|
+
httpClient: testHttpClient,
|
|
203
|
+
});
|
|
204
|
+
|
|
205
|
+
const result = await vercel.postV1BulkRedirectsVersions({
|
|
206
|
+
projectId: "<id>",
|
|
207
|
+
});
|
|
208
|
+
expect(result).toBeDefined();
|
|
209
|
+
expect(result).toEqual({
|
|
210
|
+
version: {
|
|
211
|
+
id: "<id>",
|
|
212
|
+
key: "<key>",
|
|
213
|
+
lastModified: 9507.66,
|
|
214
|
+
createdBy: "<value>",
|
|
215
|
+
},
|
|
216
|
+
});
|
|
217
|
+
});
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { VercelCore } from "../core.js";
|
|
6
|
+
import { encodeFormQuery, 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
|
+
DeleteV1BulkRedirectsRequest,
|
|
14
|
+
DeleteV1BulkRedirectsRequest$outboundSchema,
|
|
15
|
+
DeleteV1BulkRedirectsResponseBody,
|
|
16
|
+
DeleteV1BulkRedirectsResponseBody$inboundSchema,
|
|
17
|
+
} from "../models/deletev1bulkredirectsop.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
|
+
* 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.
|
|
33
|
+
*/
|
|
34
|
+
export function deleteV1BulkRedirects(
|
|
35
|
+
client: VercelCore,
|
|
36
|
+
request: DeleteV1BulkRedirectsRequest,
|
|
37
|
+
options?: RequestOptions,
|
|
38
|
+
): APIPromise<
|
|
39
|
+
Result<
|
|
40
|
+
DeleteV1BulkRedirectsResponseBody,
|
|
41
|
+
| VercelError
|
|
42
|
+
| ResponseValidationError
|
|
43
|
+
| ConnectionError
|
|
44
|
+
| RequestAbortedError
|
|
45
|
+
| RequestTimeoutError
|
|
46
|
+
| InvalidRequestError
|
|
47
|
+
| UnexpectedClientError
|
|
48
|
+
| SDKValidationError
|
|
49
|
+
>
|
|
50
|
+
> {
|
|
51
|
+
return new APIPromise($do(
|
|
52
|
+
client,
|
|
53
|
+
request,
|
|
54
|
+
options,
|
|
55
|
+
));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
async function $do(
|
|
59
|
+
client: VercelCore,
|
|
60
|
+
request: DeleteV1BulkRedirectsRequest,
|
|
61
|
+
options?: RequestOptions,
|
|
62
|
+
): Promise<
|
|
63
|
+
[
|
|
64
|
+
Result<
|
|
65
|
+
DeleteV1BulkRedirectsResponseBody,
|
|
66
|
+
| VercelError
|
|
67
|
+
| ResponseValidationError
|
|
68
|
+
| ConnectionError
|
|
69
|
+
| RequestAbortedError
|
|
70
|
+
| RequestTimeoutError
|
|
71
|
+
| InvalidRequestError
|
|
72
|
+
| UnexpectedClientError
|
|
73
|
+
| SDKValidationError
|
|
74
|
+
>,
|
|
75
|
+
APICall,
|
|
76
|
+
]
|
|
77
|
+
> {
|
|
78
|
+
const parsed = safeParse(
|
|
79
|
+
request,
|
|
80
|
+
(value) => DeleteV1BulkRedirectsRequest$outboundSchema.parse(value),
|
|
81
|
+
"Input validation failed",
|
|
82
|
+
);
|
|
83
|
+
if (!parsed.ok) {
|
|
84
|
+
return [parsed, { status: "invalid" }];
|
|
85
|
+
}
|
|
86
|
+
const payload = parsed.value;
|
|
87
|
+
const body = encodeJSON("body", payload.RequestBody, { explode: true });
|
|
88
|
+
|
|
89
|
+
const path = pathToFunc("/v1/bulk-redirects")();
|
|
90
|
+
|
|
91
|
+
const query = encodeFormQuery({
|
|
92
|
+
"projectId": payload.projectId,
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
const headers = new Headers(compactMap({
|
|
96
|
+
"Content-Type": "application/json",
|
|
97
|
+
Accept: "application/json",
|
|
98
|
+
}));
|
|
99
|
+
|
|
100
|
+
const context = {
|
|
101
|
+
options: client._options,
|
|
102
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
103
|
+
operationID: "delete_/v1/bulk-redirects",
|
|
104
|
+
oAuth2Scopes: null,
|
|
105
|
+
|
|
106
|
+
resolvedSecurity: null,
|
|
107
|
+
|
|
108
|
+
securitySource: null,
|
|
109
|
+
retryConfig: options?.retries
|
|
110
|
+
|| client._options.retryConfig
|
|
111
|
+
|| { strategy: "none" },
|
|
112
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
const requestRes = client._createRequest(context, {
|
|
116
|
+
method: "DELETE",
|
|
117
|
+
baseURL: options?.serverURL,
|
|
118
|
+
path: path,
|
|
119
|
+
headers: headers,
|
|
120
|
+
query: query,
|
|
121
|
+
body: body,
|
|
122
|
+
userAgent: client._options.userAgent,
|
|
123
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
124
|
+
}, options);
|
|
125
|
+
if (!requestRes.ok) {
|
|
126
|
+
return [requestRes, { status: "invalid" }];
|
|
127
|
+
}
|
|
128
|
+
const req = requestRes.value;
|
|
129
|
+
|
|
130
|
+
const doResult = await client._do(req, {
|
|
131
|
+
context,
|
|
132
|
+
errorCodes: ["400", "401", "403", "404", "4XX", "500", "5XX"],
|
|
133
|
+
retryConfig: context.retryConfig,
|
|
134
|
+
retryCodes: context.retryCodes,
|
|
135
|
+
});
|
|
136
|
+
if (!doResult.ok) {
|
|
137
|
+
return [doResult, { status: "request-error", request: req }];
|
|
138
|
+
}
|
|
139
|
+
const response = doResult.value;
|
|
140
|
+
|
|
141
|
+
const [result] = await M.match<
|
|
142
|
+
DeleteV1BulkRedirectsResponseBody,
|
|
143
|
+
| VercelError
|
|
144
|
+
| ResponseValidationError
|
|
145
|
+
| ConnectionError
|
|
146
|
+
| RequestAbortedError
|
|
147
|
+
| RequestTimeoutError
|
|
148
|
+
| InvalidRequestError
|
|
149
|
+
| UnexpectedClientError
|
|
150
|
+
| SDKValidationError
|
|
151
|
+
>(
|
|
152
|
+
M.json(200, DeleteV1BulkRedirectsResponseBody$inboundSchema),
|
|
153
|
+
M.fail([400, 401, 403, 404, "4XX"]),
|
|
154
|
+
M.fail([500, "5XX"]),
|
|
155
|
+
)(response, req);
|
|
156
|
+
if (!result.ok) {
|
|
157
|
+
return [result, { status: "complete", request: req, response }];
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
return [result, { status: "complete", request: req, response }];
|
|
161
|
+
}
|
|
@@ -139,7 +139,7 @@ async function $do(
|
|
|
139
139
|
|
|
140
140
|
const doResult = await client._do(req, {
|
|
141
141
|
context,
|
|
142
|
-
errorCodes: ["400", "401", "402", "403", "404", "409", "4XX", "
|
|
142
|
+
errorCodes: ["400", "401", "402", "403", "404", "409", "4XX", "5XX"],
|
|
143
143
|
retryConfig: context.retryConfig,
|
|
144
144
|
retryCodes: context.retryCodes,
|
|
145
145
|
});
|
|
@@ -161,7 +161,7 @@ async function $do(
|
|
|
161
161
|
>(
|
|
162
162
|
M.json(200, CreateOrTransferDomainResponseBody$inboundSchema),
|
|
163
163
|
M.fail([400, 401, 402, 403, 404, 409, "4XX"]),
|
|
164
|
-
M.fail(
|
|
164
|
+
M.fail("5XX"),
|
|
165
165
|
)(response, req);
|
|
166
166
|
if (!result.ok) {
|
|
167
167
|
return [result, { status: "complete", request: req, response }];
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { VercelCore } from "../core.js";
|
|
6
|
+
import { encodeFormQuery } 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
|
+
GetV1BulkRedirectsRequest,
|
|
14
|
+
GetV1BulkRedirectsRequest$outboundSchema,
|
|
15
|
+
GetV1BulkRedirectsResponseBody,
|
|
16
|
+
GetV1BulkRedirectsResponseBody$inboundSchema,
|
|
17
|
+
} from "../models/getv1bulkredirectsop.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
|
+
* Get the version history for a project's bulk redirects
|
|
33
|
+
*/
|
|
34
|
+
export function getV1BulkRedirects(
|
|
35
|
+
client: VercelCore,
|
|
36
|
+
request: GetV1BulkRedirectsRequest,
|
|
37
|
+
options?: RequestOptions,
|
|
38
|
+
): APIPromise<
|
|
39
|
+
Result<
|
|
40
|
+
GetV1BulkRedirectsResponseBody,
|
|
41
|
+
| VercelError
|
|
42
|
+
| ResponseValidationError
|
|
43
|
+
| ConnectionError
|
|
44
|
+
| RequestAbortedError
|
|
45
|
+
| RequestTimeoutError
|
|
46
|
+
| InvalidRequestError
|
|
47
|
+
| UnexpectedClientError
|
|
48
|
+
| SDKValidationError
|
|
49
|
+
>
|
|
50
|
+
> {
|
|
51
|
+
return new APIPromise($do(
|
|
52
|
+
client,
|
|
53
|
+
request,
|
|
54
|
+
options,
|
|
55
|
+
));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
async function $do(
|
|
59
|
+
client: VercelCore,
|
|
60
|
+
request: GetV1BulkRedirectsRequest,
|
|
61
|
+
options?: RequestOptions,
|
|
62
|
+
): Promise<
|
|
63
|
+
[
|
|
64
|
+
Result<
|
|
65
|
+
GetV1BulkRedirectsResponseBody,
|
|
66
|
+
| VercelError
|
|
67
|
+
| ResponseValidationError
|
|
68
|
+
| ConnectionError
|
|
69
|
+
| RequestAbortedError
|
|
70
|
+
| RequestTimeoutError
|
|
71
|
+
| InvalidRequestError
|
|
72
|
+
| UnexpectedClientError
|
|
73
|
+
| SDKValidationError
|
|
74
|
+
>,
|
|
75
|
+
APICall,
|
|
76
|
+
]
|
|
77
|
+
> {
|
|
78
|
+
const parsed = safeParse(
|
|
79
|
+
request,
|
|
80
|
+
(value) => GetV1BulkRedirectsRequest$outboundSchema.parse(value),
|
|
81
|
+
"Input validation failed",
|
|
82
|
+
);
|
|
83
|
+
if (!parsed.ok) {
|
|
84
|
+
return [parsed, { status: "invalid" }];
|
|
85
|
+
}
|
|
86
|
+
const payload = parsed.value;
|
|
87
|
+
const body = null;
|
|
88
|
+
|
|
89
|
+
const path = pathToFunc("/v1/bulk-redirects")();
|
|
90
|
+
|
|
91
|
+
const query = encodeFormQuery({
|
|
92
|
+
"diff": payload.diff,
|
|
93
|
+
"page": payload.page,
|
|
94
|
+
"per_page": payload.per_page,
|
|
95
|
+
"projectId": payload.projectId,
|
|
96
|
+
"q": payload.q,
|
|
97
|
+
"sort_by": payload.sort_by,
|
|
98
|
+
"sort_order": payload.sort_order,
|
|
99
|
+
"versionId": payload.versionId,
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
const headers = new Headers(compactMap({
|
|
103
|
+
Accept: "application/json",
|
|
104
|
+
}));
|
|
105
|
+
|
|
106
|
+
const context = {
|
|
107
|
+
options: client._options,
|
|
108
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
109
|
+
operationID: "get_/v1/bulk-redirects",
|
|
110
|
+
oAuth2Scopes: null,
|
|
111
|
+
|
|
112
|
+
resolvedSecurity: null,
|
|
113
|
+
|
|
114
|
+
securitySource: null,
|
|
115
|
+
retryConfig: options?.retries
|
|
116
|
+
|| client._options.retryConfig
|
|
117
|
+
|| { strategy: "none" },
|
|
118
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
const requestRes = client._createRequest(context, {
|
|
122
|
+
method: "GET",
|
|
123
|
+
baseURL: options?.serverURL,
|
|
124
|
+
path: path,
|
|
125
|
+
headers: headers,
|
|
126
|
+
query: query,
|
|
127
|
+
body: body,
|
|
128
|
+
userAgent: client._options.userAgent,
|
|
129
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
130
|
+
}, options);
|
|
131
|
+
if (!requestRes.ok) {
|
|
132
|
+
return [requestRes, { status: "invalid" }];
|
|
133
|
+
}
|
|
134
|
+
const req = requestRes.value;
|
|
135
|
+
|
|
136
|
+
const doResult = await client._do(req, {
|
|
137
|
+
context,
|
|
138
|
+
errorCodes: ["400", "401", "403", "404", "4XX", "5XX"],
|
|
139
|
+
retryConfig: context.retryConfig,
|
|
140
|
+
retryCodes: context.retryCodes,
|
|
141
|
+
});
|
|
142
|
+
if (!doResult.ok) {
|
|
143
|
+
return [doResult, { status: "request-error", request: req }];
|
|
144
|
+
}
|
|
145
|
+
const response = doResult.value;
|
|
146
|
+
|
|
147
|
+
const [result] = await M.match<
|
|
148
|
+
GetV1BulkRedirectsResponseBody,
|
|
149
|
+
| VercelError
|
|
150
|
+
| ResponseValidationError
|
|
151
|
+
| ConnectionError
|
|
152
|
+
| RequestAbortedError
|
|
153
|
+
| RequestTimeoutError
|
|
154
|
+
| InvalidRequestError
|
|
155
|
+
| UnexpectedClientError
|
|
156
|
+
| SDKValidationError
|
|
157
|
+
>(
|
|
158
|
+
M.json(200, GetV1BulkRedirectsResponseBody$inboundSchema),
|
|
159
|
+
M.fail([400, 401, 403, 404, "4XX"]),
|
|
160
|
+
M.fail("5XX"),
|
|
161
|
+
)(response, req);
|
|
162
|
+
if (!result.ok) {
|
|
163
|
+
return [result, { status: "complete", request: req, response }];
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
return [result, { status: "complete", request: req, response }];
|
|
167
|
+
}
|