11# Warp API TypeScript API Library
22
3- [ ![ NPM version] ( < https://img.shields.io/npm/v/warp-api .svg?label=npm%20(stable) > )] ( https://npmjs.org/package/warp-api ) ![ npm bundle size] ( https://img.shields.io/bundlephobia/minzip/warp-api )
3+ [ ![ 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 )
44
55This library provides convenient access to the Warp API REST API from server-side TypeScript or JavaScript.
66
@@ -15,15 +15,15 @@ npm install git+ssh://git@github.com:stainless-sdks/warp-api-typescript.git
1515```
1616
1717> [ !NOTE]
18- > Once this package is [ published to npm] ( https://www.stainless.com/docs/guides/publish ) , this will become: ` npm install warp-api `
18+ > Once this package is [ published to npm] ( https://www.stainless.com/docs/guides/publish ) , this will become: ` npm install warp-sdk `
1919
2020## Usage
2121
2222The full API of this library can be found in [ api.md] ( api.md ) .
2323
2424<!-- prettier-ignore -->
2525``` js
26- import WarpAPI from ' warp-api ' ;
26+ import WarpAPI from ' warp-sdk ' ;
2727
2828const client = new WarpAPI ({
2929 apiKey: process .env [' WARP_API_API_KEY' ], // This is the default and can be omitted
@@ -40,7 +40,7 @@ This library includes TypeScript definitions for all request params and response
4040
4141<!-- prettier-ignore -->
4242``` ts
43- import WarpAPI from ' warp-api ' ;
43+ import WarpAPI from ' warp-sdk ' ;
4444
4545const client = new WarpAPI ({
4646 apiKey: process .env [' WARP_API_API_KEY' ], // This is the default and can be omitted
@@ -165,7 +165,7 @@ The log level can be configured in two ways:
1651652 . Using the ` logLevel ` client option (overrides the environment variable if set)
166166
167167``` ts
168- import WarpAPI from ' warp-api ' ;
168+ import WarpAPI from ' warp-sdk ' ;
169169
170170const client = new WarpAPI ({
171171 logLevel: ' debug' , // Show all log messages
@@ -193,7 +193,7 @@ When providing a custom logger, the `logLevel` option still controls which messa
193193below the configured level will not be sent to your logger.
194194
195195``` ts
196- import WarpAPI from ' warp-api ' ;
196+ import WarpAPI from ' warp-sdk ' ;
197197import pino from ' pino' ;
198198
199199const logger = pino ();
@@ -262,7 +262,7 @@ globalThis.fetch = fetch;
262262Or pass it to the client:
263263
264264``` ts
265- import WarpAPI from ' warp-api ' ;
265+ import WarpAPI from ' warp-sdk ' ;
266266import fetch from ' my-fetch' ;
267267
268268const client = new WarpAPI ({ fetch });
@@ -273,7 +273,7 @@ const client = new WarpAPI({ fetch });
273273If 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.)
274274
275275``` ts
276- import WarpAPI from ' warp-api ' ;
276+ import WarpAPI from ' warp-sdk ' ;
277277
278278const client = new WarpAPI ({
279279 fetchOptions: {
@@ -290,7 +290,7 @@ options to requests:
290290<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 >
291291
292292``` ts
293- import WarpAPI from ' warp-api ' ;
293+ import WarpAPI from ' warp-sdk ' ;
294294import * as undici from ' undici' ;
295295
296296const proxyAgent = new undici .ProxyAgent (' http://localhost:8888' );
@@ -304,7 +304,7 @@ const client = new WarpAPI({
304304<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 >
305305
306306``` ts
307- import WarpAPI from ' warp-api ' ;
307+ import WarpAPI from ' warp-sdk ' ;
308308
309309const client = new WarpAPI ({
310310 fetchOptions: {
@@ -316,7 +316,7 @@ const client = new WarpAPI({
316316<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 >
317317
318318``` ts
319- import WarpAPI from ' npm:warp-api ' ;
319+ import WarpAPI from ' npm:warp-sdk ' ;
320320
321321const httpClient = Deno .createHttpClient ({ proxy: { url: ' http://localhost:8888' } });
322322const client = new WarpAPI ({
0 commit comments