Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.456.0 (#15)
Browse files Browse the repository at this point in the history
Co-authored-by: speakeasybot <[email protected]>
  • Loading branch information
github-actions[bot] and speakeasybot authored Dec 19, 2024
1 parent 321b022 commit 21e3d97
Show file tree
Hide file tree
Showing 4,086 changed files with 194,208 additions and 184,763 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
3 changes: 3 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
**/*
!/FUNCTIONS.md
!/RUNTIMES.md
!/REACT_QUERY.md
!/**/*.ts
!/**/*.js
!/**/*.map
Expand Down
5,918 changes: 3,382 additions & 2,536 deletions .speakeasy/gen.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ generation:
oAuth2ClientCredentialsEnabled: false
oAuth2PasswordEnabled: false
typescript:
version: 1.1.0
version: 1.2.0
additionalDependencies:
dependencies: {}
devDependencies: {}
Expand Down
14 changes: 7 additions & 7 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
speakeasyVersion: 1.445.2
speakeasyVersion: 1.456.0
sources:
vercel-OAS:
sourceNamespace: vercel-oas
sourceRevisionDigest: sha256:3c1e85cab336c0235a040fd11e8ab4d2b9c08476bf8d72a7e3a015be87feca9a
sourceBlobDigest: sha256:46f762ba4155cb91aa2073e556643914a6812716da541f1f35581e3a0647e4bf
sourceRevisionDigest: sha256:c7348ff56305ab2f7e9365158f186a14d9d38df3069bf7fb3f272ed2338452ff
sourceBlobDigest: sha256:8e5405c9babf34e8d5d5af47d77d0531db9a7706e7ce134ef7066c1211646721
tags:
- latest
- speakeasy-sdk-regen-1733427270
- speakeasy-sdk-regen-1734555116
- 0.0.1
targets:
vercel:
source: vercel-OAS
sourceNamespace: vercel-oas
sourceRevisionDigest: sha256:3c1e85cab336c0235a040fd11e8ab4d2b9c08476bf8d72a7e3a015be87feca9a
sourceBlobDigest: sha256:46f762ba4155cb91aa2073e556643914a6812716da541f1f35581e3a0647e4bf
sourceRevisionDigest: sha256:c7348ff56305ab2f7e9365158f186a14d9d38df3069bf7fb3f272ed2338452ff
sourceBlobDigest: sha256:8e5405c9babf34e8d5d5af47d77d0531db9a7706e7ce134ef7066c1211646721
codeSamplesNamespace: vercel-oas-typescript-code-samples
codeSamplesRevisionDigest: sha256:0d896b6ff46b215e21e7920c6467936bb0280fa8c8887376d1411cfbc9fb8253
codeSamplesRevisionDigest: sha256:e0836b9c86412a333a623eb30ba145ae8a0aa0b243ab4d314a3f4caf4591bc30
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
2 changes: 1 addition & 1 deletion FUNCTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ specific category of applications.
```typescript
import { VercelCore } from "@vercel/sdk/core.js";
import { projectsUpdateProject } from "@vercel/sdk/funcs/projectsUpdateProject.js";
import { SDKValidationError } from "@vercel/sdk/models/errors/sdkvalidationerror.js";
import { SDKValidationError } from "@vercel/sdk/models/sdkvalidationerror.js";

// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
Expand Down
91 changes: 61 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,25 @@ The `@vercel/sdk` is a type-safe Typescript SDK that gives you full control over

<!-- Start Table of Contents [toc] -->
## Table of Contents
<!-- $toc-max-depth=2 -->
* [@vercel/sdk](#vercelsdk)
* [SDK Installation](#sdk-installation)
* [Requirements](#requirements)
* [Access Tokens](#access-tokens)
* [Authentication](#authentication)
* [SDK Example Usage](#sdk-example-usage)
* [Available Resources and Operations](#available-resources-and-operations)
* [Standalone functions](#standalone-functions)
* [File uploads](#file-uploads)
* [Retries](#retries)
* [Error Handling](#error-handling)
* [Server Selection](#server-selection)
* [Custom HTTP Client](#custom-http-client)
* [Debugging](#debugging)
* [Development](#development)
* [Maturity](#maturity)
* [Contributions](#contributions)

* [SDK Installation](#sdk-installation)
* [Requirements](#requirements)
* [SDK Example Usage](#sdk-example-usage)
* [Available Resources and Operations](#available-resources-and-operations)
* [Standalone functions](#standalone-functions)
* [File uploads](#file-uploads)
* [Retries](#retries)
* [Error Handling](#error-handling)
* [Server Selection](#server-selection)
* [Custom HTTP Client](#custom-http-client)
* [Authentication](#authentication)
* [Debugging](#debugging)
<!-- End Table of Contents [toc] -->

<!-- Start SDK Installation [installation] -->
Expand Down Expand Up @@ -572,6 +578,7 @@ Certain SDK methods accept files as part of a multi-part request. It is possible
```typescript
import { Vercel } from "@vercel/sdk";
import { openAsBlob } from "node:fs";

const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
Expand All @@ -585,6 +592,7 @@ async function run() {
xArtifactClientInteractive: 0,
xArtifactTag: "Tc0BmHvJYMIYJ62/zx87YqO0Flxk+5Ovip25NY825CQ=",
hash: "12HKQaOmR5t5Uy6vdcQsNIiZgHGB",
requestBody: await openAsBlob("example.file"),
});

// Handle the result
Expand Down Expand Up @@ -668,27 +676,23 @@ run();
<!-- Start Error Handling [errors] -->
## Error Handling

All SDK methods return a response object or throw an error. By default, an API error will throw a `errors.SDKError`.
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 `readAccessGroup` method may throw the following errors:

If a HTTP request fails, an operation my also throw an error from the `models/errors/httpclienterrors.ts` module:
| Error Type | Status Code | Content Type |
| ---------------------------- | ----------- | ---------------- |
| models.VercelBadRequestError | 400 | application/json |
| models.VercelForbiddenError | 401 | application/json |
| models.VercelNotFoundError | 404 | application/json |
| models.SDKError | 4XX, 5XX | \*/\* |

| HTTP Client Error | Description |
| ---------------------------------------------------- | ---------------------------------------------------- |
| RequestAbortedError | HTTP request was aborted by the client |
| RequestTimeoutError | HTTP request timed out due to an AbortSignal signal |
| ConnectionError | HTTP client was unable to make a request to a server |
| InvalidRequestError | Any input used to create a request is invalid |
| UnexpectedClientError | Unrecognised or unexpected error |

In addition, when custom error responses are specified for an operation, the SDK may throw their associated Error type. You can refer to respective *Errors* tables in SDK docs for more details on possible error types for each operation. For example, the `readAccessGroup` method may throw the following errors:

| Error Type | Status Code | Content Type |
| --------------- | ----------- | ------------ |
| errors.SDKError | 4XX, 5XX | \*/\* |
If the method throws an error and it is not captured by the known errors, it will default to throwing a `SDKError`.

```typescript
import { Vercel } from "@vercel/sdk";
import { SDKValidationError } from "@vercel/sdk/models/errors/sdkvalidationerror.js";
import { SDKValidationError } from "@vercel/sdk/models/sdkvalidationerror.js";
import { VercelBadRequestError } from "@vercel/sdk/models/vercelbadrequesterror.js";
import { VercelForbiddenError } from "@vercel/sdk/models/vercelforbiddenerror.js";
import { VercelNotFoundError } from "@vercel/sdk/models/vercelnotfounderror.js";

const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
Expand All @@ -705,14 +709,31 @@ async function run() {
console.log(result);
} catch (err) {
switch (true) {
// The server response does not match the expected SDK schema
case (err instanceof SDKValidationError): {
// Validation errors can be pretty-printed
// Pretty-print will provide a human-readable multi-line error message
console.error(err.pretty());
// Raw value may also be inspected
console.error(err.rawValue);
return;
}
case (err instanceof VercelBadRequestError): {
// Handle err.data$: VercelBadRequestErrorData
console.error(err);
return;
}
case (err instanceof VercelForbiddenError): {
// Handle err.data$: VercelForbiddenErrorData
console.error(err);
return;
}
case (err instanceof VercelNotFoundError): {
// Handle err.data$: VercelNotFoundErrorData
console.error(err);
return;
}
default: {
// Other errors such as network errors, see HTTPClientErrors for more details
throw err;
}
}
Expand All @@ -723,7 +744,17 @@ run();

```

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 string since validation errors can list many issues and the plain error string may be difficult read when debugging.
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.

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:

| HTTP Client Error | Description |
| ---------------------------------------------------- | ---------------------------------------------------- |
| RequestAbortedError | HTTP request was aborted by the client |
| RequestTimeoutError | HTTP request timed out due to an AbortSignal signal |
| ConnectionError | HTTP client was unable to make a request to a server |
| InvalidRequestError | Any input used to create a request is invalid |
| UnexpectedClientError | Unrecognised or unexpected error |
<!-- End Error Handling [errors] -->

<!-- Start Server Selection [server] -->
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,14 @@ Based on:
### Generated
- [typescript v1.1.0] .
### Releases
- [NPM v1.1.0] https://www.npmjs.com/package/@vercel/sdk/v/1.1.0 - .
- [NPM v1.1.0] https://www.npmjs.com/package/@vercel/sdk/v/1.1.0 - .

## 2024-12-18 20:51:51
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.456.0 (2.481.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v1.2.0] .
### Releases
- [NPM v1.2.0] https://www.npmjs.com/package/@vercel/sdk/v/1.2.0 - .
17 changes: 17 additions & 0 deletions docs/models/acceptedchallenges.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# AcceptedChallenges

Which challenge types the domain can use for issuing certs.

## Example Usage

```typescript
import { AcceptedChallenges } from "@vercel/sdk/models/getdomainconfigop.js";

let value: AcceptedChallenges = "http-01";
```

## Values

```typescript
"dns-01" | "http-01"
```
15 changes: 15 additions & 0 deletions docs/models/access.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Access

## Example Usage

```typescript
import { Access } from "@vercel/sdk/models/getaliasop.js";

let value: Access = "granted";
```

## Values

```typescript
"requested" | "granted"
```
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Example Usage

```typescript
import { AccessGroups } from "@vercel/sdk/models/operations/listaccessgroups.js";
import { AccessGroups } from "@vercel/sdk/models/listaccessgroupsop.js";

let value: AccessGroups = {
isDsyncManaged: false,
Expand Down
17 changes: 17 additions & 0 deletions docs/models/aclaction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# ACLAction

Enum containing the actions that can be performed against a resource. Group operations are included.

## Example Usage

```typescript
import { ACLAction } from "@vercel/sdk/models/aclaction.js";

let value: ACLAction = "update";
```

## Values

```typescript
"create" | "delete" | "read" | "update" | "list"
```
15 changes: 15 additions & 0 deletions docs/models/action.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Action

## Example Usage

```typescript
import { Action } from "@vercel/sdk/models/updateinvoiceop.js";

let value: Action = "refund";
```

## Values

```typescript
"refund"
```
15 changes: 15 additions & 0 deletions docs/models/action1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Action1

## Example Usage

```typescript
import { Action1 } from "@vercel/sdk/models/putfirewallconfigop.js";

let value: Action1 = "rate_limit";
```

## Values

```typescript
"log" | "challenge" | "deny" | "rate_limit"
```
Loading

0 comments on commit 21e3d97

Please sign in to comment.