From 9f2d9b12bed606650520c0609215716981b8ca9a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2024 17:51:28 +0000 Subject: [PATCH] chore(internal): use reexports not destructuring (#604) --- src/index.ts | 40 ++++++++++++++++++---------------------- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/src/index.ts b/src/index.ts index 70c9d5d7..738c4ce0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -289,31 +289,9 @@ export class Anthropic extends Core.APIClient { static fileFromPath = Uploads.fileFromPath; } -export const { HUMAN_PROMPT, AI_PROMPT } = Anthropic; - -export { - AnthropicError, - APIError, - APIConnectionError, - APIConnectionTimeoutError, - APIUserAbortError, - NotFoundError, - ConflictError, - RateLimitError, - BadRequestError, - AuthenticationError, - InternalServerError, - PermissionDeniedError, - UnprocessableEntityError, -} from './error'; - -export import toFile = Uploads.toFile; -export import fileFromPath = Uploads.fileFromPath; - Anthropic.Completions = Completions; Anthropic.Messages = Messages; Anthropic.Beta = Beta; - export declare namespace Anthropic { export type RequestOptions = Core.RequestOptions; @@ -384,5 +362,23 @@ export declare namespace Anthropic { type BetaRateLimitError as BetaRateLimitError, }; } +export const { HUMAN_PROMPT, AI_PROMPT } = Anthropic; + +export { toFile, fileFromPath } from '@anthropic-ai/sdk/uploads'; +export { + AnthropicError, + APIError, + APIConnectionError, + APIConnectionTimeoutError, + APIUserAbortError, + NotFoundError, + ConflictError, + RateLimitError, + BadRequestError, + AuthenticationError, + InternalServerError, + PermissionDeniedError, + UnprocessableEntityError, +} from '@anthropic-ai/sdk/error'; export default Anthropic;