Skip to content

Commit a6d61f9

Browse files
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.560.1 (#98)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
1 parent 0c6a69e commit a6d61f9

File tree

1,211 files changed

+55641
-45446
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,211 files changed

+55641
-45446
lines changed

.speakeasy/gen.lock

Lines changed: 156 additions & 24 deletions
Large diffs are not rendered by default.

.speakeasy/gen.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ generation:
77
maintainOpenAPIOrder: true
88
usageSnippets:
99
optionalPropertyRendering: withExample
10+
sdkInitStyle: constructor
1011
useClassNamesForArrayFields: true
1112
fixes:
1213
nameResolutionDec2023: true
@@ -22,13 +23,14 @@ generation:
2223
generateNewTests: true
2324
skipResponseBodyAssertions: false
2425
typescript:
25-
version: 1.7.7
26+
version: 1.8.0
2627
additionalDependencies:
2728
dependencies: {}
2829
devDependencies: {}
2930
peerDependencies: {}
3031
additionalPackageJSON: {}
3132
author: Speakeasy
33+
baseErrorName: VercelError
3234
clientServerStatusCodesAsErrors: true
3335
defaultErrorName: SDKError
3436
enableCustomCodeRegions: false

.speakeasy/workflow.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
speakeasyVersion: 1.552.0
1+
speakeasyVersion: 1.560.1
22
sources:
33
vercel-OAS:
44
sourceNamespace: vercel-oas
5-
sourceRevisionDigest: sha256:d248e7ef8a1b3530b94bb3ac06cfa026af2f1e8c223cf87a83414447bde4160a
6-
sourceBlobDigest: sha256:bb084c4d0e086b36cd08111bf5629c6a350902f4128541fd32cd0aafc394556c
5+
sourceRevisionDigest: sha256:8741783d95728d1a17484a1e673c9f580b54e0b60fe48debd8b19c203edb133d
6+
sourceBlobDigest: sha256:f9bfc441285c734029e6d4b96a3c0790724339049d94437b9d881089d5a9625a
77
tags:
88
- latest
9-
- speakeasy-sdk-regen-1748364328
9+
- speakeasy-sdk-regen-1749534087
1010
- 0.0.1
1111
targets:
1212
vercel:
1313
source: vercel-OAS
1414
sourceNamespace: vercel-oas
15-
sourceRevisionDigest: sha256:d248e7ef8a1b3530b94bb3ac06cfa026af2f1e8c223cf87a83414447bde4160a
16-
sourceBlobDigest: sha256:bb084c4d0e086b36cd08111bf5629c6a350902f4128541fd32cd0aafc394556c
15+
sourceRevisionDigest: sha256:8741783d95728d1a17484a1e673c9f580b54e0b60fe48debd8b19c203edb133d
16+
sourceBlobDigest: sha256:f9bfc441285c734029e6d4b96a3c0790724339049d94437b9d881089d5a9625a
1717
codeSamplesNamespace: vercel-oas-typescript-code-samples
18-
codeSamplesRevisionDigest: sha256:61e028ba385c635f6d95236bc8b36e7dfbee52b6490ab7555a5d0830ba56d739
18+
codeSamplesRevisionDigest: sha256:99ab271232da889a9c5419e4197e6dda07e5a9baf981e49daff093fa010c79f2
1919
workflow:
2020
workflowVersion: 1.0.0
2121
speakeasyVersion: latest

FUNCTIONS.md

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ specific category of applications.
2121
```typescript
2222
import { VercelCore } from "@vercel/sdk/core.js";
2323
import { projectsUpdateProject } from "@vercel/sdk/funcs/projectsUpdateProject.js";
24-
import { SDKValidationError } from "@vercel/sdk/models/sdkvalidationerror.js";
2524

2625
// Use `VercelCore` for best tree-shaking performance.
2726
// You can create one instance of it to use across an application.
@@ -38,28 +37,12 @@ async function run() {
3837
name: "a-project-name",
3938
},
4039
});
41-
42-
switch (true) {
43-
case res.ok:
44-
// The success case will be handled outside of the switch block
45-
break;
46-
case res.error instanceof SDKValidationError:
47-
// Pretty-print validation errors.
48-
return console.log(res.error.pretty());
49-
case res.error instanceof Error:
50-
return console.log(res.error);
51-
default:
52-
// TypeScript's type checking will fail on the following line if the above
53-
// cases were not exhaustive.
54-
res.error satisfies never;
55-
throw new Error("Assertion failed: expected error checks to be exhaustive: " + res.error);
40+
if (res.ok) {
41+
const { value: result } = res;
42+
console.log(result);
43+
} else {
44+
console.log("projectsUpdateProject failed:", res.error);
5645
}
57-
58-
59-
const { value: result } = res;
60-
61-
// Handle the result
62-
console.log(result);
6346
}
6447

6548
run();

README.md

Lines changed: 49 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,6 @@ async function run() {
204204
token: "fdhfr820ad#@FAdlj$$",
205205
});
206206

207-
// Handle the result
208207
console.log(result);
209208
}
210209

@@ -243,7 +242,6 @@ async function run() {
243242
slug: "my-team-url-slug",
244243
});
245244

246-
// Handle the result
247245
console.log(result);
248246
}
249247

@@ -272,7 +270,6 @@ async function run() {
272270
},
273271
});
274272

275-
// Handle the result
276273
console.log(result);
277274
}
278275

@@ -563,7 +560,6 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
563560
- [`artifactsUploadArtifact`](docs/sdks/artifacts/README.md#uploadartifact) - Upload a cache artifact
564561
- [`authenticationCreateAuthToken`](docs/sdks/authentication/README.md#createauthtoken) - Create an Auth Token
565562
- [`authenticationDeleteAuthToken`](docs/sdks/authentication/README.md#deleteauthtoken) - Delete an authentication token
566-
- [`authenticationExchangeSsoToken`](docs/sdks/authentication/README.md#exchangessotoken) - SSO Token Exchange
567563
- [`authenticationGetAuthToken`](docs/sdks/authentication/README.md#getauthtoken) - Get Auth Token Metadata
568564
- [`authenticationListAuthTokens`](docs/sdks/authentication/README.md#listauthtokens) - List Auth Tokens
569565
- [`certsGetCertById`](docs/sdks/certs/README.md#getcertbyid) - Get cert by id
@@ -585,6 +581,7 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
585581
- [`deploymentsGetDeployments`](docs/sdks/deployments/README.md#getdeployments) - List deployments
586582
- [`deploymentsListDeploymentFiles`](docs/sdks/deployments/README.md#listdeploymentfiles) - List Deployment Files
587583
- [`deploymentsUpdateIntegrationDeploymentAction`](docs/sdks/deployments/README.md#updateintegrationdeploymentaction) - Update deployment integration action
584+
- [`deploymentsUpdateIntegrationDeploymentAction`](docs/sdks/integrations/README.md#updateintegrationdeploymentaction) - Update deployment integration action
588585
- [`deploymentsUploadFile`](docs/sdks/deployments/README.md#uploadfile) - Upload Deployment Files
589586
- [`dnsCreateRecord`](docs/sdks/dns/README.md#createrecord) - Create a DNS record
590587
- [`dnsGetRecords`](docs/sdks/dns/README.md#getrecords) - List existing DNS records
@@ -624,7 +621,6 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
624621
- [`integrationsDeleteConfiguration`](docs/sdks/integrations/README.md#deleteconfiguration) - Delete an integration configuration
625622
- [`integrationsGetConfiguration`](docs/sdks/integrations/README.md#getconfiguration) - Retrieve an integration configuration
626623
- [`integrationsGetConfigurations`](docs/sdks/integrations/README.md#getconfigurations) - Get configurations for the authenticated user or team
627-
- [`integrationsUpdateIntegrationDeploymentAction`](docs/sdks/integrations/README.md#updateintegrationdeploymentaction) - Update deployment integration action
628624
- [`logDrainsCreateLogDrain`](docs/sdks/logdrains/README.md#createlogdrain) - Creates a new Integration Log Drain
629625
- [`logDrainsDeleteConfigurableLogDrain`](docs/sdks/logdrains/README.md#deleteconfigurablelogdrain) - Deletes a Configurable Log Drain
630626
- [`logDrainsDeleteIntegrationLogDrain`](docs/sdks/logdrains/README.md#deleteintegrationlogdrain) - Deletes the Integration log drain with the provided `id`
@@ -634,6 +630,7 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
634630
- [`marketplaceCreateInstallationIntegrationConfiguration`](docs/sdks/marketplace/README.md#createinstallationintegrationconfiguration) - Create one or multiple experimentation items
635631
- [`marketplaceCreateInstallationIntegrationEdgeConfig`](docs/sdks/marketplace/README.md#createinstallationintegrationedgeconfig) - Get the data of a user-provided Edge Config
636632
- [`marketplaceDeleteInstallationIntegrationConfiguration`](docs/sdks/marketplace/README.md#deleteinstallationintegrationconfiguration) - Delete an existing experimentation item
633+
- [`marketplaceExchangeSsoToken`](docs/sdks/authentication/README.md#exchangessotoken) - SSO Token Exchange
637634
- [`marketplaceExchangeSsoToken`](docs/sdks/marketplace/README.md#exchangessotoken) - SSO Token Exchange
638635
- [`marketplaceGetAccountInfo`](docs/sdks/marketplace/README.md#getaccountinfo) - Get Account Information
639636
- [`marketplaceGetInvoice`](docs/sdks/marketplace/README.md#getinvoice) - Get Invoice
@@ -744,7 +741,6 @@ async function run() {
744741
requestBody: await openAsBlob("example.file"),
745742
});
746743

747-
// Handle the result
748744
console.log(result);
749745
}
750746

@@ -782,7 +778,6 @@ async function run() {
782778
},
783779
});
784780

785-
// Handle the result
786781
console.log(result);
787782
}
788783

@@ -814,7 +809,6 @@ async function run() {
814809
token: "fdhfr820ad#@FAdlj$$",
815810
});
816811

817-
// Handle the result
818812
console.log(result);
819813
}
820814

@@ -826,65 +820,45 @@ run();
826820
<!-- Start Error Handling [errors] -->
827821
## Error Handling
828822

829-
Some methods specify known errors which can be thrown. All the known errors are enumerated in the `models/errors.ts` module. The known errors for a method are documented under the *Errors* tables in SDK docs. For example, the `postDomains` method may throw the following errors:
823+
[`VercelError`](./src/models/vercelerror.ts) is the base class for all HTTP error responses. It has the following properties:
830824

831-
| Error Type | Status Code | Content Type |
832-
| ---------------------------- | ----------- | ---------------- |
833-
| models.VercelBadRequestError | 400 | application/json |
834-
| models.VercelForbiddenError | 401 | application/json |
835-
| models.VercelNotFoundError | 404 | application/json |
836-
| models.SDKError | 4XX, 5XX | \*/\* |
837-
838-
If the method throws an error and it is not captured by the known errors, it will default to throwing a `SDKError`.
825+
| Property | Type | Description |
826+
| ------------------- | ---------- | --------------------------------------------------------------------------------------- |
827+
| `error.message` | `string` | Error message |
828+
| `error.statusCode` | `number` | HTTP response status code eg `404` |
829+
| `error.headers` | `Headers` | HTTP response headers |
830+
| `error.body` | `string` | HTTP body. Can be empty string if no body is returned. |
831+
| `error.rawResponse` | `Response` | Raw HTTP response |
832+
| `error.data$` | | Optional. Some errors may contain structured data. [See Error Classes](#error-classes). |
839833

834+
### Example
840835
```typescript
841836
import { Vercel } from "@vercel/sdk";
842-
import { SDKValidationError } from "@vercel/sdk/models/sdkvalidationerror.js";
843837
import { VercelBadRequestError } from "@vercel/sdk/models/vercelbadrequesterror.js";
844-
import { VercelForbiddenError } from "@vercel/sdk/models/vercelforbiddenerror.js";
845-
import { VercelNotFoundError } from "@vercel/sdk/models/vercelnotfounderror.js";
838+
import { VercelError } from "@vercel/sdk/models/vercelerror.js.js";
846839

847840
const vercel = new Vercel();
848841

849842
async function run() {
850-
let result;
851843
try {
852-
result = await vercel.postDomains({
844+
const result = await vercel.postDomains({
853845
name: "example.com",
854846
method: "transfer-in",
855847
token: "fdhfr820ad#@FAdlj$$",
856848
});
857849

858-
// Handle the result
859850
console.log(result);
860-
} catch (err) {
861-
switch (true) {
862-
// The server response does not match the expected SDK schema
863-
case (err instanceof SDKValidationError): {
864-
// Pretty-print will provide a human-readable multi-line error message
865-
console.error(err.pretty());
866-
// Raw value may also be inspected
867-
console.error(err.rawValue);
868-
return;
869-
}
870-
case (err instanceof VercelBadRequestError): {
871-
// Handle err.data$: VercelBadRequestErrorData
872-
console.error(err);
873-
return;
874-
}
875-
case (err instanceof VercelForbiddenError): {
876-
// Handle err.data$: VercelForbiddenErrorData
877-
console.error(err);
878-
return;
879-
}
880-
case (err instanceof VercelNotFoundError): {
881-
// Handle err.data$: VercelNotFoundErrorData
882-
console.error(err);
883-
return;
884-
}
885-
default: {
886-
// Other errors such as network errors, see HTTPClientErrors for more details
887-
throw err;
851+
} catch (error) {
852+
// The base class for HTTP error responses
853+
if (error instanceof VercelError) {
854+
console.log(error.message);
855+
console.log(error.statusCode);
856+
console.log(error.body);
857+
console.log(error.headers);
858+
859+
// Depending on the method different errors may be thrown
860+
if (error instanceof VercelBadRequestError) {
861+
console.log(error.data$.error); // models.ErrorT
888862
}
889863
}
890864
}
@@ -894,17 +868,32 @@ run();
894868

895869
```
896870

897-
Validation errors can also occur when either method arguments or data returned from the server do not match the expected format. The `SDKValidationError` that is thrown as a result will capture the raw value that failed validation in an attribute called `rawValue`. Additionally, a `pretty()` method is available on this error that can be used to log a nicely formatted multi-line string since validation errors can list many issues and the plain error string may be difficult read when debugging.
871+
### Error Classes
872+
**Primary errors:**
873+
* [`VercelError`](./src/models/vercelerror.ts): The base class for HTTP error responses.
874+
* [`VercelBadRequestError`](docs/models/vercelbadrequesterror.md): Status code `400`. *
875+
* [`VercelForbiddenError`](docs/models/vercelforbiddenerror.md): Status code `401`. *
876+
877+
<details><summary>Less common errors (8)</summary>
898878

899-
In some rare cases, the SDK can fail to get a response from the server or even make the request due to unexpected circumstances such as network conditions. These types of errors are captured in the `models/httpclienterrors.ts` module:
879+
<br />
880+
881+
**Network errors:**
882+
* [`ConnectionError`](./src/models/httpclienterrors.ts): HTTP client was unable to make a request to a server.
883+
* [`RequestTimeoutError`](./src/models/httpclienterrors.ts): HTTP request timed out due to an AbortSignal signal.
884+
* [`RequestAbortedError`](./src/models/httpclienterrors.ts): HTTP request was aborted by the client.
885+
* [`InvalidRequestError`](./src/models/httpclienterrors.ts): Any input used to create a request is invalid.
886+
* [`UnexpectedClientError`](./src/models/httpclienterrors.ts): Unrecognised or unexpected error.
887+
888+
889+
**Inherit from [`VercelError`](./src/models/vercelerror.ts)**:
890+
* [`VercelNotFoundError`](docs/models/vercelnotfounderror.md): Status code `404`. Applicable to 93 of 167 methods.*
891+
* [`VercelRateLimitError`](docs/models/vercelratelimiterror.md): . Status code `429`. Applicable to 1 of 167 methods.*
892+
* [`ResponseValidationError`](./src/models/responsevalidationerror.ts): Type mismatch between the data returned from the server and the structure expected by the SDK. See `error.rawValue` for the raw value and `error.pretty()` for a nicely formatted multi-line string.
893+
894+
</details>
900895

901-
| HTTP Client Error | Description |
902-
| ---------------------------------------------------- | ---------------------------------------------------- |
903-
| RequestAbortedError | HTTP request was aborted by the client |
904-
| RequestTimeoutError | HTTP request timed out due to an AbortSignal signal |
905-
| ConnectionError | HTTP client was unable to make a request to a server |
906-
| InvalidRequestError | Any input used to create a request is invalid |
907-
| UnexpectedClientError | Unrecognised or unexpected error |
896+
\* Check [the method documentation](#available-resources-and-operations) to see if the error is applicable.
908897
<!-- End Error Handling [errors] -->
909898

910899
<!-- Start Server Selection [server] -->
@@ -927,7 +916,6 @@ async function run() {
927916
token: "fdhfr820ad#@FAdlj$$",
928917
});
929918

930-
// Handle the result
931919
console.log(result);
932920
}
933921

RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,4 +358,14 @@ Based on:
358358
### Generated
359359
- [typescript v1.7.7] .
360360
### Releases
361-
- [NPM v1.7.7] https://www.npmjs.com/package/@vercel/sdk/v/1.7.7 - .
361+
- [NPM v1.7.7] https://www.npmjs.com/package/@vercel/sdk/v/1.7.7 - .
362+
363+
## 2025-06-11 15:54:00
364+
### Changes
365+
Based on:
366+
- OpenAPI Doc
367+
- Speakeasy CLI 1.560.1 (2.625.0) https://github.com/speakeasy-api/speakeasy
368+
### Generated
369+
- [typescript v1.8.0] .
370+
### Releases
371+
- [NPM v1.8.0] https://www.npmjs.com/package/@vercel/sdk/v/1.8.0 - .

USAGE.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ async function run() {
2626
slug: "my-team-url-slug",
2727
});
2828

29-
// Handle the result
3029
console.log(result);
3130
}
3231

@@ -55,7 +54,6 @@ async function run() {
5554
},
5655
});
5756

58-
// Handle the result
5957
console.log(result);
6058
}
6159

docs/models/acceptprojecttransferrequestrequest.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ let value: AcceptProjectTransferRequestRequest = {
99
code: "<value>",
1010
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
1111
slug: "my-team-url-slug",
12-
requestBody: {
13-
newProjectName: "a-project-name",
14-
},
1512
};
1613
```
1714

docs/models/accessgroups.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import { AccessGroups } from "@vercel/sdk/models/listaccessgroupsop.js";
77

88
let value: AccessGroups = {
9-
isDsyncManaged: false,
9+
isDsyncManaged: true,
1010
name: "my-access-group",
1111
createdAt: "1588720733602",
1212
teamId: "team_123a6c5209bc3778245d011443644c8d27dc2c50",

0 commit comments

Comments
 (0)