Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
231 changes: 136 additions & 95 deletions .speakeasy/gen.lock

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@ generation:
schemas:
allOfMergeStrategy: shallowMerge
requestBodyFieldName: ""
versioningStrategy: automatic
persistentEdits: {}
tests:
generateTests: true
generateNewTests: true
skipResponseBodyAssertions: false
typescript:
version: 1.18.10
version: 1.19.0
acceptHeaderEnum: true
additionalDependencies:
dependencies: {}
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.700.2
speakeasyVersion: 1.701.0
sources:
vercel-OAS:
sourceNamespace: vercel-oas
sourceRevisionDigest: sha256:faf5f54213d282605ca8be089cd202e2b3c552ddda1798bc422d548918294b26
sourceBlobDigest: sha256:61ab3cbad492d95b68a399c2584fac2150612a1bd36c8e1172c135b106c35f99
sourceRevisionDigest: sha256:6551c3557b2e28b024811ded22fc7ad7eb19db1b952858e10ce0a5844f9f8eef
sourceBlobDigest: sha256:b7450cbf8fdfa65dfd7fb1f38c7c6d5d1ed9ddca22714d732b1856b32639bf14
tags:
- latest
- speakeasy-sdk-regen-1769904768
- speakeasy-sdk-regen-1770163817
- 0.0.1
targets:
vercel:
source: vercel-OAS
sourceNamespace: vercel-oas
sourceRevisionDigest: sha256:faf5f54213d282605ca8be089cd202e2b3c552ddda1798bc422d548918294b26
sourceBlobDigest: sha256:61ab3cbad492d95b68a399c2584fac2150612a1bd36c8e1172c135b106c35f99
sourceRevisionDigest: sha256:6551c3557b2e28b024811ded22fc7ad7eb19db1b952858e10ce0a5844f9f8eef
sourceBlobDigest: sha256:b7450cbf8fdfa65dfd7fb1f38c7c6d5d1ed9ddca22714d732b1856b32639bf14
codeSamplesNamespace: vercel-oas-typescript-code-samples
codeSamplesRevisionDigest: sha256:adc760120ed1655173747b6ba7bdf4fdcae929f83611b62db5565df5b0b0bb78
codeSamplesRevisionDigest: sha256:8bc8d7cfc2182337054656e703fb7e577a148e0160470d54dec0758e3a8f2744
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ The `@vercel/sdk` is a type-safe Typescript SDK that gives you full control over
* [SDK Example Usage](#sdk-example-usage)
* [Available Resources and Operations](#available-resources-and-operations)
* [Standalone functions](#standalone-functions)
* [Json Streaming](#json-streaming)
* [File uploads](#file-uploads)
* [Retries](#retries)
* [Error Handling](#error-handling)
Expand Down Expand Up @@ -860,6 +861,43 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
</details>
<!-- End Standalone functions [standalone-funcs] -->

<!-- Start Json Streaming [jsonl] -->
## Json Streaming

Json Streaming ([jsonl][jsonl-format] / [x-ndjson][x-ndjson]) content type can be used to stream content from certain operations. These operations expose the stream as an [AsyncGenerator][async-generator] that can be consumed using a `for await...of` loop in TypeScript/JavaScript. The loop will terminate when the server no longer has any events to send and closes the underlying connection.

Here's an example of consuming a JSONL stream:

```typescript
import { Vercel } from "@vercel/sdk";

const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
const result = await vercel.billing.listBillingCharges({
from: "2025-01-01T00:00:00.000Z",
to: "2025-01-31T00:00:00.000Z",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});

for await (const event of result) {
// Handle the event
console.log(event);
}
}

run();

```

[jsonl-format]: https://jsonlines.org/
[x-ndjson]: https://github.com/ndjson/ndjson-spec
[async-generator]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AsyncGenerator
<!-- End Json Streaming [jsonl] -->

<!-- Start File uploads [file-upload] -->
## File uploads

Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -918,4 +918,14 @@ Based on:
### Generated
- [typescript v1.18.10] .
### Releases
- [NPM v1.18.10] https://www.npmjs.com/package/@vercel/sdk/v/1.18.10 - .
- [NPM v1.18.10] https://www.npmjs.com/package/@vercel/sdk/v/1.18.10 - .

## 2026-02-04 00:09:38
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.701.0 (2.803.3) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v1.19.0] .
### Releases
- [NPM v1.19.0] https://www.npmjs.com/package/@vercel/sdk/v/1.19.0 - .
4 changes: 2 additions & 2 deletions docs/models/authuserdefault.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ An object containing infomation related to the amount of platform resources may
```typescript
import { AuthUserDefault } from "@vercel/sdk/models/authuser.js";

let value: AuthUserDefault = "enhanced";
let value: AuthUserDefault = "standard";
```

## Values

```typescript
"enhanced" | "turbo" | "standard"
"standard" | "enhanced" | "turbo"
```
17 changes: 17 additions & 0 deletions docs/models/billingcurrency.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# BillingCurrency

Currency used for billing (ISO 4217)

## Example Usage

```typescript
import { BillingCurrency } from "@vercel/sdk/models/listbillingchargesop.js";

let value: BillingCurrency = "USD";
```

## Values

```typescript
"USD"
```
4 changes: 2 additions & 2 deletions docs/models/canceldeploymentdefault.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ Build resource configuration snapshot for this deployment.
```typescript
import { CancelDeploymentDefault } from "@vercel/sdk/models/canceldeploymentop.js";

let value: CancelDeploymentDefault = "enhanced";
let value: CancelDeploymentDefault = "standard";
```

## Values

```typescript
"enhanced" | "turbo" | "standard"
"standard" | "enhanced" | "turbo"
```
2 changes: 1 addition & 1 deletion docs/models/canceldeploymentpurchasetype.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ let value: CancelDeploymentPurchaseType = "enhanced";
## Values

```typescript
"enhanced" | "turbo"
"standard" | "enhanced" | "turbo"
```
17 changes: 17 additions & 0 deletions docs/models/chargecategory.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# ChargeCategory

Classification of the charge

## Example Usage

```typescript
import { ChargeCategory } from "@vercel/sdk/models/listbillingchargesop.js";

let value: ChargeCategory = "Tax";
```

## Values

```typescript
"Adjustment" | "Credit" | "Purchase" | "Tax" | "Usage"
```
17 changes: 17 additions & 0 deletions docs/models/contractcommitmentcategory.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# ContractCommitmentCategory

Highest-level classification of the contract commitment. 'Spend' for Pro ($20/month), 'Usage' for Enterprise (MIU allocation).

## Example Usage

```typescript
import { ContractCommitmentCategory } from "@vercel/sdk/models/listcontractcommitmentsop.js";

let value: ContractCommitmentCategory = "Spend";
```

## Values

```typescript
"Usage" | "Spend"
```
4 changes: 2 additions & 2 deletions docs/models/createdeploymentdefault.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ Build resource configuration snapshot for this deployment.
```typescript
import { CreateDeploymentDefault } from "@vercel/sdk/models/createdeploymentop.js";

let value: CreateDeploymentDefault = "standard";
let value: CreateDeploymentDefault = "turbo";
```

## Values

```typescript
"enhanced" | "turbo" | "standard"
"standard" | "enhanced" | "turbo"
```
4 changes: 2 additions & 2 deletions docs/models/createdeploymentpurchasetype.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ Build resource configuration snapshot for this deployment.
```typescript
import { CreateDeploymentPurchaseType } from "@vercel/sdk/models/createdeploymentop.js";

let value: CreateDeploymentPurchaseType = "enhanced";
let value: CreateDeploymentPurchaseType = "standard";
```

## Values

```typescript
"enhanced" | "turbo"
"standard" | "enhanced" | "turbo"
```
53 changes: 53 additions & 0 deletions docs/models/listbillingchargesresponsebody.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# ListBillingChargesResponseBody

Extension of the base schema for Focus charges. Includes pricing information for all customers.

## Example Usage

```typescript
import { ListBillingChargesResponseBody } from "@vercel/sdk/models/listbillingchargesop.js";

let value: ListBillingChargesResponseBody = {
billedCost: 5918.14,
billingCurrency: "USD",
chargeCategory: "Adjustment",
chargePeriodStart: "<value>",
chargePeriodEnd: "<value>",
consumedQuantity: 9008.03,
consumedUnit: "<value>",
effectiveCost: 8630.21,
serviceName: "<value>",
serviceProviderName: "<value>",
tags: {
"key": "<value>",
"key1": "<value>",
},
pricingCategory: "Other",
pricingCurrency: "USD",
pricingQuantity: 7629.01,
pricingUnit: "<value>",
};
```

## Fields

| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| `billedCost` | *number* | :heavy_check_mark: | Charge amount serving as the basis for invoicing |
| `billingCurrency` | [models.BillingCurrency](../models/billingcurrency.md) | :heavy_check_mark: | Currency used for billing (ISO 4217) |
| `chargeCategory` | [models.ChargeCategory](../models/chargecategory.md) | :heavy_check_mark: | Classification of the charge |
| `chargePeriodStart` | *string* | :heavy_check_mark: | Inclusive start of the charge period (ISO 8601 UTC) |
| `chargePeriodEnd` | *string* | :heavy_check_mark: | Exclusive end of the charge period (ISO 8601 UTC) - Required in v1.3 |
| `consumedQuantity` | *number* | :heavy_check_mark: | Volume of resource consumed |
| `consumedUnit` | *string* | :heavy_check_mark: | Unit of measurement for consumed quantity |
| `effectiveCost` | *number* | :heavy_check_mark: | Amortized cost representation including discounts, pre-commitment credit purchase amount, etc. |
| `regionId` | *string* | :heavy_minus_sign: | Provider-assigned region identifier |
| `regionName` | *string* | :heavy_minus_sign: | Display name for the region |
| `serviceName` | *string* | :heavy_check_mark: | Display name for the service/product |
| `serviceCategory` | [models.ServiceCategory](../models/servicecategory.md) | :heavy_minus_sign: | High-level category of the service |
| `serviceProviderName` | *string* | :heavy_check_mark: | Entity making the resource/service available for purchase (v1.3) |
| `tags` | Record<string, *string*> | :heavy_check_mark: | Custom key-value metadata (ProjectId, ProjectName) |
| `pricingCategory` | [models.PricingCategory](../models/pricingcategory.md) | :heavy_check_mark: | Pricing model used for the charge. |
| `pricingCurrency` | [models.PricingCurrency](../models/pricingcurrency.md) | :heavy_check_mark: | N/A |
| `pricingQuantity` | *number* | :heavy_check_mark: | N/A |
| `pricingUnit` | *string* | :heavy_check_mark: | N/A |
Loading
Loading