diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 466df71..2be9c43 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.1.0" + ".": "0.2.0" } diff --git a/.stats.yml b/.stats.yml index 94c02f3..b03576e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md index 771fb15..0f5b798 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e4e9381..4ca8d32 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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 diff --git a/README.md b/README.md index 08fc416..8cc0256 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Warp API TypeScript API Library -[![NPM version]()](https://npmjs.org/package/warp-sdk) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/warp-sdk) +[![NPM version]()](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. @@ -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 @@ -20,7 +20,7 @@ The full API of this library can be found in [api.md](api.md). ```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 @@ -98,7 +98,7 @@ This library includes TypeScript definitions for all request params and response ```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 @@ -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 @@ -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(); @@ -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 }); @@ -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: { @@ -348,7 +348,7 @@ options to requests: **Node** [[docs](https://github.com/nodejs/undici/blob/main/docs/docs/api/ProxyAgent.md#example---proxyagent-with-fetch)] ```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'); @@ -362,7 +362,7 @@ const client = new WarpAPI({ **Bun** [[docs](https://bun.sh/guides/http/proxy)] ```ts -import WarpAPI from 'warp-sdk'; +import WarpAPI from 'warp-agent-sdk'; const client = new WarpAPI({ fetchOptions: { @@ -374,7 +374,7 @@ const client = new WarpAPI({ **Deno** [[docs](https://docs.deno.com/api/deno/~/Deno.createHttpClient)] ```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({ diff --git a/eslint.config.mjs b/eslint.config.mjs index 118b955..e5f2fa9 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -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.', }, ], diff --git a/jest.config.ts b/jest.config.ts index b340e13..0ea6a06 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -7,8 +7,8 @@ const config: JestConfigWithTsJest = { '^.+\\.(t|j)sx?$': ['@swc/jest', { sourceMaps: 'inline' }], }, moduleNameMapper: { - '^warp-sdk$': '/src/index.ts', - '^warp-sdk/(.*)$': '/src/$1', + '^warp-agent-sdk$': '/src/index.ts', + '^warp-agent-sdk/(.*)$': '/src/$1', }, modulePathIgnorePatterns: [ '/ecosystem-tests/', diff --git a/package.json b/package.json index 82fd609..98cda1b 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 812ad3b..da2c7aa 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -2,4 +2,4 @@ onlyBuiltDependencies: - '@swc/core' minimumReleaseAge: 1440 minimumReleaseAgeExclude: - - warp-sdk + - warp-agent-sdk diff --git a/scripts/build b/scripts/build index 60ae0a5..222c4c3 100755 --- a/scripts/build +++ b/scripts/build @@ -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 /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 @@ -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 diff --git a/src/version.ts b/src/version.ts index 1baa228..bade2ff 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '0.1.0'; // x-release-please-version +export const VERSION = '0.2.0'; // x-release-please-version diff --git a/tests/api-resources/agent/agent.test.ts b/tests/api-resources/agent/agent.test.ts index dd1c7cf..5e6f641 100644 --- a/tests/api-resources/agent/agent.test.ts +++ b/tests/api-resources/agent/agent.test.ts @@ -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', diff --git a/tests/api-resources/agent/tasks.test.ts b/tests/api-resources/agent/tasks.test.ts index 5e5ef6c..0b0a5b9 100644 --- a/tests/api-resources/agent/tasks.test.ts +++ b/tests/api-resources/agent/tasks.test.ts @@ -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', diff --git a/tests/base64.test.ts b/tests/base64.test.ts index 0730964..843e634 100644 --- a/tests/base64.test.ts +++ b/tests/base64.test.ts @@ -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; diff --git a/tests/buildHeaders.test.ts b/tests/buildHeaders.test.ts index e79ff3b..b480f32 100644 --- a/tests/buildHeaders.test.ts +++ b/tests/buildHeaders.test.ts @@ -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 {${[ diff --git a/tests/form.test.ts b/tests/form.test.ts index f91bfed..72ab45f 100644 --- a/tests/form.test.ts +++ b/tests/form.test.ts @@ -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 () => { diff --git a/tests/index.test.ts b/tests/index.test.ts index b406121..a9e3bed 100644 --- a/tests/index.test.ts +++ b/tests/index.test.ts @@ -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', () => { diff --git a/tests/path.test.ts b/tests/path.test.ts index 231d957..f640355 100644 --- a/tests/path.test.ts +++ b/tests/path.test.ts @@ -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'; diff --git a/tests/qs/stringify.test.ts b/tests/qs/stringify.test.ts index c6edfc1..fc411e9 100644 --- a/tests/qs/stringify.test.ts +++ b/tests/qs/stringify.test.ts @@ -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'; diff --git a/tests/qs/utils.test.ts b/tests/qs/utils.test.ts index 0bae6e8..aa4b43d 100644 --- a/tests/qs/utils.test.ts +++ b/tests/qs/utils.test.ts @@ -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'); diff --git a/tests/stringifyQuery.test.ts b/tests/stringifyQuery.test.ts index 8cb21b5..ff5b1db 100644 --- a/tests/stringifyQuery.test.ts +++ b/tests/stringifyQuery.test.ts @@ -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; diff --git a/tests/uploads.test.ts b/tests/uploads.test.ts index b3a85c8..9968957 100644 --- a/tests/uploads.test.ts +++ b/tests/uploads.test.ts @@ -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 { @@ -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( diff --git a/tsconfig.build.json b/tsconfig.build.json index b3a58cd..2e9b1f3 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -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, diff --git a/tsconfig.json b/tsconfig.json index 8ca24e6..32e65cf 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -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,