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
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.1.0"
".": "0.2.0"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 3
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-c4c5f89f67a73e4d17377d2b96fc201a63cd5458cbebaa23e78f92b59b90cc5b.yml
openapi_spec_hash: 931c6189a4fc4ee320963646b1b7edbe
config_hash: a1f8af77d3fd2148abd3ad8d4dbf20a4
config_hash: f555d17517c40197d3ba9240ca35e1ee
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 0.2.0 (2025-12-17)

Full Changelog: [v0.1.0...v0.2.0](https://github.com/warpdotdev/warp-sdk-typescript/compare/v0.1.0...v0.2.0)

### Features

* **api:** manual updates ([8dade21](https://github.com/warpdotdev/warp-sdk-typescript/commit/8dade211b6dd9b977eb6d5b095a6d121a567d028))


### Documentation

* add environment and config usage documentation ([7314503](https://github.com/warpdotdev/warp-sdk-typescript/commit/7314503e1f9db4d4c4d55c5b860fae7998fd1b5d))

## 0.1.0 (2025-12-15)

Full Changelog: [v0.0.1...v0.1.0](https://github.com/warpdotdev/warp-sdk-typescript/compare/v0.0.1...v0.1.0)
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ $ cd warp-sdk-typescript
# With yarn
$ yarn link
$ cd ../my-package
$ yarn link warp-sdk
$ yarn link warp-agent-sdk

# With pnpm
$ pnpm link --global
$ cd ../my-package
$ pnpm link -—global warp-sdk
$ pnpm link -—global warp-agent-sdk
```

## Running tests
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Warp API TypeScript API Library

[![NPM version](<https://img.shields.io/npm/v/warp-sdk.svg?label=npm%20(stable)>)](https://npmjs.org/package/warp-sdk) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/warp-sdk)
[![NPM version](<https://img.shields.io/npm/v/warp-agent-sdk.svg?label=npm%20(stable)>)](https://npmjs.org/package/warp-agent-sdk) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/warp-agent-sdk)

This library provides convenient access to the Warp API REST API from server-side TypeScript or JavaScript.

Expand All @@ -11,7 +11,7 @@ It is generated with [Stainless](https://www.stainless.com/).
## Installation

```sh
npm install warp-sdk
npm install warp-agent-sdk
```

## Usage
Expand All @@ -20,7 +20,7 @@ The full API of this library can be found in [api.md](api.md).

<!-- prettier-ignore -->
```js
import WarpAPI from 'warp-sdk';
import WarpAPI from 'warp-agent-sdk';

const client = new WarpAPI({
apiKey: process.env['WARP_API_KEY'], // This is the default and can be omitted
Expand Down Expand Up @@ -98,7 +98,7 @@ This library includes TypeScript definitions for all request params and response

<!-- prettier-ignore -->
```ts
import WarpAPI from 'warp-sdk';
import WarpAPI from 'warp-agent-sdk';

const client = new WarpAPI({
apiKey: process.env['WARP_API_KEY'], // This is the default and can be omitted
Expand Down Expand Up @@ -223,7 +223,7 @@ The log level can be configured in two ways:
2. Using the `logLevel` client option (overrides the environment variable if set)

```ts
import WarpAPI from 'warp-sdk';
import WarpAPI from 'warp-agent-sdk';

const client = new WarpAPI({
logLevel: 'debug', // Show all log messages
Expand Down Expand Up @@ -251,7 +251,7 @@ When providing a custom logger, the `logLevel` option still controls which messa
below the configured level will not be sent to your logger.

```ts
import WarpAPI from 'warp-sdk';
import WarpAPI from 'warp-agent-sdk';
import pino from 'pino';

const logger = pino();
Expand Down Expand Up @@ -320,7 +320,7 @@ globalThis.fetch = fetch;
Or pass it to the client:

```ts
import WarpAPI from 'warp-sdk';
import WarpAPI from 'warp-agent-sdk';
import fetch from 'my-fetch';

const client = new WarpAPI({ fetch });
Expand All @@ -331,7 +331,7 @@ const client = new WarpAPI({ fetch });
If you want to set custom `fetch` options without overriding the `fetch` function, you can provide a `fetchOptions` object when instantiating the client or making a request. (Request-specific options override client options.)

```ts
import WarpAPI from 'warp-sdk';
import WarpAPI from 'warp-agent-sdk';

const client = new WarpAPI({
fetchOptions: {
Expand All @@ -348,7 +348,7 @@ options to requests:
<img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/node.svg" align="top" width="18" height="21"> **Node** <sup>[[docs](https://github.com/nodejs/undici/blob/main/docs/docs/api/ProxyAgent.md#example---proxyagent-with-fetch)]</sup>

```ts
import WarpAPI from 'warp-sdk';
import WarpAPI from 'warp-agent-sdk';
import * as undici from 'undici';

const proxyAgent = new undici.ProxyAgent('http://localhost:8888');
Expand All @@ -362,7 +362,7 @@ const client = new WarpAPI({
<img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/bun.svg" align="top" width="18" height="21"> **Bun** <sup>[[docs](https://bun.sh/guides/http/proxy)]</sup>

```ts
import WarpAPI from 'warp-sdk';
import WarpAPI from 'warp-agent-sdk';

const client = new WarpAPI({
fetchOptions: {
Expand All @@ -374,7 +374,7 @@ const client = new WarpAPI({
<img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/deno.svg" align="top" width="18" height="21"> **Deno** <sup>[[docs](https://docs.deno.com/api/deno/~/Deno.createHttpClient)]</sup>

```ts
import WarpAPI from 'npm:warp-sdk';
import WarpAPI from 'npm:warp-agent-sdk';

const httpClient = Deno.createHttpClient({ proxy: { url: 'http://localhost:8888' } });
const client = new WarpAPI({
Expand Down
2 changes: 1 addition & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default tseslint.config(
{
patterns: [
{
regex: '^warp-sdk(/.*)?',
regex: '^warp-agent-sdk(/.*)?',
message: 'Use a relative import, not a package import.',
},
],
Expand Down
4 changes: 2 additions & 2 deletions jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ const config: JestConfigWithTsJest = {
'^.+\\.(t|j)sx?$': ['@swc/jest', { sourceMaps: 'inline' }],
},
moduleNameMapper: {
'^warp-sdk$': '<rootDir>/src/index.ts',
'^warp-sdk/(.*)$': '<rootDir>/src/$1',
'^warp-agent-sdk$': '<rootDir>/src/index.ts',
'^warp-agent-sdk/(.*)$': '<rootDir>/src/$1',
},
modulePathIgnorePatterns: [
'<rootDir>/ecosystem-tests/',
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "warp-sdk",
"version": "0.1.0",
"name": "warp-agent-sdk",
"version": "0.2.0",
"description": "The official TypeScript library for the Warp API API",
"author": "Warp API <>",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ onlyBuiltDependencies:
- '@swc/core'
minimumReleaseAge: 1440
minimumReleaseAgeExclude:
- warp-sdk
- warp-agent-sdk
6 changes: 3 additions & 3 deletions scripts/build
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ node scripts/utils/check-version.cjs

# Build into dist and will publish the package from there,
# so that src/resources/foo.ts becomes <package root>/resources/foo.js
# This way importing from `"warp-sdk/resources/foo"` works
# This way importing from `"warp-agent-sdk/resources/foo"` works
# even with `"moduleResolution": "node"`

rm -rf dist; mkdir dist
Expand Down Expand Up @@ -42,8 +42,8 @@ node scripts/utils/postprocess-files.cjs

# make sure that nothing crashes when we require the output CJS or
# import the output ESM
(cd dist && node -e 'require("warp-sdk")')
(cd dist && node -e 'import("warp-sdk")' --input-type=module)
(cd dist && node -e 'require("warp-agent-sdk")')
(cd dist && node -e 'import("warp-agent-sdk")' --input-type=module)

if [ -e ./scripts/build-deno ]
then
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '0.1.0'; // x-release-please-version
export const VERSION = '0.2.0'; // x-release-please-version
2 changes: 1 addition & 1 deletion tests/api-resources/agent/agent.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

import WarpAPI from 'warp-sdk';
import WarpAPI from 'warp-agent-sdk';

const client = new WarpAPI({
apiKey: 'My API Key',
Expand Down
2 changes: 1 addition & 1 deletion tests/api-resources/agent/tasks.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

import WarpAPI from 'warp-sdk';
import WarpAPI from 'warp-agent-sdk';

const client = new WarpAPI({
apiKey: 'My API Key',
Expand Down
2 changes: 1 addition & 1 deletion tests/base64.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { fromBase64, toBase64 } from 'warp-sdk/internal/utils/base64';
import { fromBase64, toBase64 } from 'warp-agent-sdk/internal/utils/base64';

describe.each(['Buffer', 'atob'])('with %s', (mode) => {
let originalBuffer: BufferConstructor;
Expand Down
2 changes: 1 addition & 1 deletion tests/buildHeaders.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { inspect } from 'node:util';
import { buildHeaders, type HeadersLike, type NullableHeaders } from 'warp-sdk/internal/headers';
import { buildHeaders, type HeadersLike, type NullableHeaders } from 'warp-agent-sdk/internal/headers';

function inspectNullableHeaders(headers: NullableHeaders) {
return `NullableHeaders {${[
Expand Down
4 changes: 2 additions & 2 deletions tests/form.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { multipartFormRequestOptions, createForm } from 'warp-sdk/internal/uploads';
import { toFile } from 'warp-sdk/core/uploads';
import { multipartFormRequestOptions, createForm } from 'warp-agent-sdk/internal/uploads';
import { toFile } from 'warp-agent-sdk/core/uploads';

describe('form data validation', () => {
test('valid values do not error', async () => {
Expand Down
6 changes: 3 additions & 3 deletions tests/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

import { APIPromise } from 'warp-sdk/core/api-promise';
import { APIPromise } from 'warp-agent-sdk/core/api-promise';

import util from 'node:util';
import WarpAPI from 'warp-sdk';
import { APIUserAbortError } from 'warp-sdk';
import WarpAPI from 'warp-agent-sdk';
import { APIUserAbortError } from 'warp-agent-sdk';
const defaultFetch = fetch;

describe('instantiate client', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/path.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createPathTagFunction, encodeURIPath } from 'warp-sdk/internal/utils/path';
import { createPathTagFunction, encodeURIPath } from 'warp-agent-sdk/internal/utils/path';
import { inspect } from 'node:util';
import { runInNewContext } from 'node:vm';

Expand Down
6 changes: 3 additions & 3 deletions tests/qs/stringify.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import iconv from 'iconv-lite';
import { stringify } from 'warp-sdk/internal/qs';
import { encode } from 'warp-sdk/internal/qs/utils';
import { StringifyOptions } from 'warp-sdk/internal/qs/types';
import { stringify } from 'warp-agent-sdk/internal/qs';
import { encode } from 'warp-agent-sdk/internal/qs/utils';
import { StringifyOptions } from 'warp-agent-sdk/internal/qs/types';
import { empty_test_cases } from './empty-keys-cases';
import assert from 'assert';

Expand Down
2 changes: 1 addition & 1 deletion tests/qs/utils.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { combine, merge, is_buffer, assign_single_source } from 'warp-sdk/internal/qs/utils';
import { combine, merge, is_buffer, assign_single_source } from 'warp-agent-sdk/internal/qs/utils';

describe('merge()', function () {
// t.deepEqual(merge(null, true), [null, true], 'merges true into null');
Expand Down
2 changes: 1 addition & 1 deletion tests/stringifyQuery.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

import { WarpAPI } from 'warp-sdk';
import { WarpAPI } from 'warp-agent-sdk';

const { stringifyQuery } = WarpAPI.prototype as any;

Expand Down
6 changes: 3 additions & 3 deletions tests/uploads.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import fs from 'fs';
import type { ResponseLike } from 'warp-sdk/internal/to-file';
import { toFile } from 'warp-sdk/core/uploads';
import type { ResponseLike } from 'warp-agent-sdk/internal/to-file';
import { toFile } from 'warp-agent-sdk/core/uploads';
import { File } from 'node:buffer';

class MyClass {
Expand Down Expand Up @@ -97,7 +97,7 @@ describe('missing File error message', () => {
});

test('is thrown', async () => {
const uploads = await import('warp-sdk/core/uploads');
const uploads = await import('warp-agent-sdk/core/uploads');
await expect(
uploads.toFile(mockResponse({ url: 'https://example.com/my/audio.mp3' })),
).rejects.toMatchInlineSnapshot(
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"compilerOptions": {
"rootDir": "./dist/src",
"paths": {
"warp-sdk/*": ["./dist/src/*"],
"warp-sdk": ["./dist/src/index.ts"]
"warp-agent-sdk/*": ["./dist/src/*"],
"warp-agent-sdk": ["./dist/src/index.ts"]
},
"noEmit": false,
"declaration": true,
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"moduleResolution": "node",
"esModuleInterop": true,
"paths": {
"warp-sdk/*": ["./src/*"],
"warp-sdk": ["./src/index.ts"]
"warp-agent-sdk/*": ["./src/*"],
"warp-agent-sdk": ["./src/index.ts"]
},
"noEmit": true,

Expand Down