Skip to content

Commit 39db3fa

Browse files
feat(api): manual updates
1 parent 14328eb commit 39db3fa

4 files changed

Lines changed: 8 additions & 8 deletions

File tree

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 3
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-c4c5f89f67a73e4d17377d2b96fc201a63cd5458cbebaa23e78f92b59b90cc5b.yml
33
openapi_spec_hash: 931c6189a4fc4ee320963646b1b7edbe
4-
config_hash: 554356d6e2bebaa59aaebbc75eebf525
4+
config_hash: 9c63a294a8e5fdc1f71187a9461b5b40

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The full API of this library can be found in [api.md](api.md).
2626
import WarpAPI from 'warp-sdk';
2727

2828
const client = new WarpAPI({
29-
apiKey: process.env['WARP_API_API_KEY'], // This is the default and can be omitted
29+
apiKey: process.env['WARP_API_KEY'], // This is the default and can be omitted
3030
});
3131

3232
const response = await client.agent.run({ prompt: 'Fix the bug in auth.go' });
@@ -43,7 +43,7 @@ This library includes TypeScript definitions for all request params and response
4343
import WarpAPI from 'warp-sdk';
4444

4545
const client = new WarpAPI({
46-
apiKey: process.env['WARP_API_API_KEY'], // This is the default and can be omitted
46+
apiKey: process.env['WARP_API_KEY'], // This is the default and can be omitted
4747
});
4848

4949
const params: WarpAPI.AgentRunParams = { prompt: 'Fix the bug in auth.go' };

src/client.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ export class WarpAPI {
128128
/**
129129
* API Client for interfacing with the Warp API API.
130130
*
131-
* @param {string | undefined} [opts.apiKey=process.env['WARP_API_API_KEY'] ?? undefined]
131+
* @param {string | undefined} [opts.apiKey=process.env['WARP_API_KEY'] ?? undefined]
132132
* @param {string} [opts.baseURL=process.env['WARP_API_BASE_URL'] ?? https://app.warp.dev/api/v1] - Override the default base URL for the API.
133133
* @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
134134
* @param {MergedRequestInit} [opts.fetchOptions] - Additional `RequestInit` options to be passed to `fetch` calls.
@@ -139,12 +139,12 @@ export class WarpAPI {
139139
*/
140140
constructor({
141141
baseURL = readEnv('WARP_API_BASE_URL'),
142-
apiKey = readEnv('WARP_API_API_KEY'),
142+
apiKey = readEnv('WARP_API_KEY'),
143143
...opts
144144
}: ClientOptions = {}) {
145145
if (apiKey === undefined) {
146146
throw new Errors.WarpAPIError(
147-
"The WARP_API_API_KEY environment variable is missing or empty; either provide it, or instantiate the WarpAPI client with an apiKey option, like new WarpAPI({ apiKey: 'My API Key' }).",
147+
"The WARP_API_KEY environment variable is missing or empty; either provide it, or instantiate the WarpAPI client with an apiKey option, like new WarpAPI({ apiKey: 'My API Key' }).",
148148
);
149149
}
150150

tests/index.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,14 +413,14 @@ describe('instantiate client', () => {
413413

414414
test('with environment variable arguments', () => {
415415
// set options via env var
416-
process.env['WARP_API_API_KEY'] = 'My API Key';
416+
process.env['WARP_API_KEY'] = 'My API Key';
417417
const client = new WarpAPI();
418418
expect(client.apiKey).toBe('My API Key');
419419
});
420420

421421
test('with overridden environment variable arguments', () => {
422422
// set options via env var
423-
process.env['WARP_API_API_KEY'] = 'another My API Key';
423+
process.env['WARP_API_KEY'] = 'another My API Key';
424424
const client = new WarpAPI({ apiKey: 'My API Key' });
425425
expect(client.apiKey).toBe('My API Key');
426426
});

0 commit comments

Comments
 (0)