Skip to content

Commit f224eff

Browse files
Stainless Botstainless-app[bot]
authored andcommitted
chore(internal): minor reformatting (#444)
1 parent e04e3cf commit f224eff

File tree

4 files changed

+18
-11
lines changed

4 files changed

+18
-11
lines changed

src/index.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
import * as Core from './core';
43
import * as Errors from './error';
5-
import { type Agent } from './_shims/index';
64
import * as Uploads from './uploads';
5+
import { type Agent } from './_shims/index';
6+
import * as Core from '@anthropic-ai/sdk/core';
77
import * as API from '@anthropic-ai/sdk/resources/index';
88

99
export interface ClientOptions {
@@ -74,7 +74,9 @@ export interface ClientOptions {
7474
defaultQuery?: Core.DefaultQuery;
7575
}
7676

77-
/** API Client for interfacing with the Anthropic API. */
77+
/**
78+
* API Client for interfacing with the Anthropic API.
79+
*/
7880
export class Anthropic extends Core.APIClient {
7981
apiKey: string | null;
8082
authToken: string | null;
@@ -114,6 +116,7 @@ export class Anthropic extends Core.APIClient {
114116
maxRetries: options.maxRetries,
115117
fetch: options.fetch,
116118
});
119+
117120
this._options = options;
118121

119122
this.apiKey = apiKey;

src/resources/completions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
import * as Core from '@anthropic-ai/sdk/core';
4-
import { APIPromise } from '@anthropic-ai/sdk/core';
53
import { APIResource } from '@anthropic-ai/sdk/resource';
4+
import { APIPromise } from '@anthropic-ai/sdk/core';
5+
import * as Core from '@anthropic-ai/sdk/core';
66
import * as CompletionsAPI from '@anthropic-ai/sdk/resources/completions';
77
import { Stream } from '@anthropic-ai/sdk/streaming';
88

src/resources/messages.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
import * as Core from '@anthropic-ai/sdk/core';
4-
import { APIPromise } from '@anthropic-ai/sdk/core';
53
import { APIResource } from '@anthropic-ai/sdk/resource';
4+
import { APIPromise } from '@anthropic-ai/sdk/core';
5+
import * as Core from '@anthropic-ai/sdk/core';
66
import { MessageStream } from '@anthropic-ai/sdk/lib/MessageStream';
7-
export { MessageStream } from '@anthropic-ai/sdk/lib/MessageStream';
87
import * as MessagesAPI from '@anthropic-ai/sdk/resources/messages';
98
import { Stream } from '@anthropic-ai/sdk/streaming';
109

10+
export { MessageStream } from '@anthropic-ai/sdk/lib/MessageStream';
11+
1112
export class Messages extends APIResource {
1213
/**
1314
* Create a Message.

tests/stringifyQuery.test.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
import { APIClient } from '@anthropic-ai/sdk/core';
1+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
const { stringifyQuery } = APIClient.prototype as any;
3+
import { Anthropic } from '@anthropic-ai/sdk';
44

5-
describe('APIClient.stringifyQuery', () => {
5+
const { stringifyQuery } = Anthropic.prototype as any;
6+
7+
describe(stringifyQuery, () => {
68
for (const [input, expected] of [
79
[{ a: '1', b: 2, c: true }, 'a=1&b=2&c=true'],
810
[{ a: null, b: false, c: undefined }, 'a=&b=false'],
@@ -18,6 +20,7 @@ describe('APIClient.stringifyQuery', () => {
1820
expect(stringifyQuery(input)).toEqual(expected);
1921
});
2022
}
23+
2124
for (const value of [[], {}, new Date()]) {
2225
it(`${JSON.stringify(value)} -> <error>`, () => {
2326
expect(() => stringifyQuery({ value })).toThrow(`Cannot stringify type ${typeof value}`);

0 commit comments

Comments
 (0)