Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: enable isolatedModules and change imports #573

Merged
merged 1 commit into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 54 additions & 54 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,68 +249,68 @@ export import toFile = Uploads.toFile;
export import fileFromPath = Uploads.fileFromPath;

export namespace Anthropic {
export import RequestOptions = Core.RequestOptions;
export type RequestOptions = Core.RequestOptions;

export import Page = Pagination.Page;
export import PageParams = Pagination.PageParams;
export import PageResponse = Pagination.PageResponse;
export type PageParams = Pagination.PageParams;
export type PageResponse<T> = Pagination.PageResponse<T>;

export import Completions = API.Completions;
export import Completion = API.Completion;
export import CompletionCreateParams = API.CompletionCreateParams;
export import CompletionCreateParamsNonStreaming = API.CompletionCreateParamsNonStreaming;
export import CompletionCreateParamsStreaming = API.CompletionCreateParamsStreaming;
export type Completion = API.Completion;
export type CompletionCreateParams = API.CompletionCreateParams;
export type CompletionCreateParamsNonStreaming = API.CompletionCreateParamsNonStreaming;
export type CompletionCreateParamsStreaming = API.CompletionCreateParamsStreaming;

export import Messages = API.Messages;
export import ContentBlock = API.ContentBlock;
export import ContentBlockDeltaEvent = API.ContentBlockDeltaEvent;
export import ContentBlockStartEvent = API.ContentBlockStartEvent;
export import ContentBlockStopEvent = API.ContentBlockStopEvent;
export import ImageBlockParam = API.ImageBlockParam;
export import InputJSONDelta = API.InputJSONDelta;
export import Message = API.Message;
export import MessageDeltaEvent = API.MessageDeltaEvent;
export import MessageDeltaUsage = API.MessageDeltaUsage;
export import MessageParam = API.MessageParam;
export import MessageStartEvent = API.MessageStartEvent;
export import MessageStopEvent = API.MessageStopEvent;
export import MessageStreamEvent = API.MessageStreamEvent;
export import Metadata = API.Metadata;
export import Model = API.Model;
export import RawContentBlockDeltaEvent = API.RawContentBlockDeltaEvent;
export import RawContentBlockStartEvent = API.RawContentBlockStartEvent;
export import RawContentBlockStopEvent = API.RawContentBlockStopEvent;
export import RawMessageDeltaEvent = API.RawMessageDeltaEvent;
export import RawMessageStartEvent = API.RawMessageStartEvent;
export import RawMessageStopEvent = API.RawMessageStopEvent;
export import RawMessageStreamEvent = API.RawMessageStreamEvent;
export import TextBlock = API.TextBlock;
export import TextBlockParam = API.TextBlockParam;
export import TextDelta = API.TextDelta;
export import Tool = API.Tool;
export import ToolChoice = API.ToolChoice;
export import ToolChoiceAny = API.ToolChoiceAny;
export import ToolChoiceAuto = API.ToolChoiceAuto;
export import ToolChoiceTool = API.ToolChoiceTool;
export import ToolResultBlockParam = API.ToolResultBlockParam;
export import ToolUseBlock = API.ToolUseBlock;
export import ToolUseBlockParam = API.ToolUseBlockParam;
export import Usage = API.Usage;
export import MessageCreateParams = API.MessageCreateParams;
export import MessageCreateParamsNonStreaming = API.MessageCreateParamsNonStreaming;
export import MessageCreateParamsStreaming = API.MessageCreateParamsStreaming;
export type ContentBlock = API.ContentBlock;
export type ContentBlockDeltaEvent = API.ContentBlockDeltaEvent;
export type ContentBlockStartEvent = API.ContentBlockStartEvent;
export type ContentBlockStopEvent = API.ContentBlockStopEvent;
export type ImageBlockParam = API.ImageBlockParam;
export type InputJSONDelta = API.InputJSONDelta;
export type Message = API.Message;
export type MessageDeltaEvent = API.MessageDeltaEvent;
export type MessageDeltaUsage = API.MessageDeltaUsage;
export type MessageParam = API.MessageParam;
export type MessageStartEvent = API.MessageStartEvent;
export type MessageStopEvent = API.MessageStopEvent;
export type MessageStreamEvent = API.MessageStreamEvent;
export type Metadata = API.Metadata;
export type Model = API.Model;
export type RawContentBlockDeltaEvent = API.RawContentBlockDeltaEvent;
export type RawContentBlockStartEvent = API.RawContentBlockStartEvent;
export type RawContentBlockStopEvent = API.RawContentBlockStopEvent;
export type RawMessageDeltaEvent = API.RawMessageDeltaEvent;
export type RawMessageStartEvent = API.RawMessageStartEvent;
export type RawMessageStopEvent = API.RawMessageStopEvent;
export type RawMessageStreamEvent = API.RawMessageStreamEvent;
export type TextBlock = API.TextBlock;
export type TextBlockParam = API.TextBlockParam;
export type TextDelta = API.TextDelta;
export type Tool = API.Tool;
export type ToolChoice = API.ToolChoice;
export type ToolChoiceAny = API.ToolChoiceAny;
export type ToolChoiceAuto = API.ToolChoiceAuto;
export type ToolChoiceTool = API.ToolChoiceTool;
export type ToolResultBlockParam = API.ToolResultBlockParam;
export type ToolUseBlock = API.ToolUseBlock;
export type ToolUseBlockParam = API.ToolUseBlockParam;
export type Usage = API.Usage;
export type MessageCreateParams = API.MessageCreateParams;
export type MessageCreateParamsNonStreaming = API.MessageCreateParamsNonStreaming;
export type MessageCreateParamsStreaming = API.MessageCreateParamsStreaming;

export import Beta = API.Beta;
export import AnthropicBeta = API.AnthropicBeta;
export import BetaAPIError = API.BetaAPIError;
export import BetaAuthenticationError = API.BetaAuthenticationError;
export import BetaError = API.BetaError;
export import BetaErrorResponse = API.BetaErrorResponse;
export import BetaInvalidRequestError = API.BetaInvalidRequestError;
export import BetaNotFoundError = API.BetaNotFoundError;
export import BetaOverloadedError = API.BetaOverloadedError;
export import BetaPermissionError = API.BetaPermissionError;
export import BetaRateLimitError = API.BetaRateLimitError;
export type AnthropicBeta = API.AnthropicBeta;
export type BetaAPIError = API.BetaAPIError;
export type BetaAuthenticationError = API.BetaAuthenticationError;
export type BetaError = API.BetaError;
export type BetaErrorResponse = API.BetaErrorResponse;
export type BetaInvalidRequestError = API.BetaInvalidRequestError;
export type BetaNotFoundError = API.BetaNotFoundError;
export type BetaOverloadedError = API.BetaOverloadedError;
export type BetaPermissionError = API.BetaPermissionError;
export type BetaRateLimitError = API.BetaRateLimitError;
}

export default Anthropic;
90 changes: 45 additions & 45 deletions src/resources/beta/beta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,51 +74,51 @@ export interface BetaRateLimitError {
}

export namespace Beta {
export import AnthropicBeta = BetaAPI.AnthropicBeta;
export import BetaAPIError = BetaAPI.BetaAPIError;
export import BetaAuthenticationError = BetaAPI.BetaAuthenticationError;
export import BetaError = BetaAPI.BetaError;
export import BetaErrorResponse = BetaAPI.BetaErrorResponse;
export import BetaInvalidRequestError = BetaAPI.BetaInvalidRequestError;
export import BetaNotFoundError = BetaAPI.BetaNotFoundError;
export import BetaOverloadedError = BetaAPI.BetaOverloadedError;
export import BetaPermissionError = BetaAPI.BetaPermissionError;
export import BetaRateLimitError = BetaAPI.BetaRateLimitError;
export type AnthropicBeta = BetaAPI.AnthropicBeta;
export type BetaAPIError = BetaAPI.BetaAPIError;
export type BetaAuthenticationError = BetaAPI.BetaAuthenticationError;
export type BetaError = BetaAPI.BetaError;
export type BetaErrorResponse = BetaAPI.BetaErrorResponse;
export type BetaInvalidRequestError = BetaAPI.BetaInvalidRequestError;
export type BetaNotFoundError = BetaAPI.BetaNotFoundError;
export type BetaOverloadedError = BetaAPI.BetaOverloadedError;
export type BetaPermissionError = BetaAPI.BetaPermissionError;
export type BetaRateLimitError = BetaAPI.BetaRateLimitError;
export import Messages = MessagesAPI.Messages;
export import BetaCacheControlEphemeral = MessagesAPI.BetaCacheControlEphemeral;
export import BetaContentBlock = MessagesAPI.BetaContentBlock;
export import BetaContentBlockParam = MessagesAPI.BetaContentBlockParam;
export import BetaImageBlockParam = MessagesAPI.BetaImageBlockParam;
export import BetaInputJSONDelta = MessagesAPI.BetaInputJSONDelta;
export import BetaMessage = MessagesAPI.BetaMessage;
export import BetaMessageDeltaUsage = MessagesAPI.BetaMessageDeltaUsage;
export import BetaMessageParam = MessagesAPI.BetaMessageParam;
export import BetaMetadata = MessagesAPI.BetaMetadata;
export import BetaRawContentBlockDeltaEvent = MessagesAPI.BetaRawContentBlockDeltaEvent;
export import BetaRawContentBlockStartEvent = MessagesAPI.BetaRawContentBlockStartEvent;
export import BetaRawContentBlockStopEvent = MessagesAPI.BetaRawContentBlockStopEvent;
export import BetaRawMessageDeltaEvent = MessagesAPI.BetaRawMessageDeltaEvent;
export import BetaRawMessageStartEvent = MessagesAPI.BetaRawMessageStartEvent;
export import BetaRawMessageStopEvent = MessagesAPI.BetaRawMessageStopEvent;
export import BetaRawMessageStreamEvent = MessagesAPI.BetaRawMessageStreamEvent;
export import BetaTextBlock = MessagesAPI.BetaTextBlock;
export import BetaTextBlockParam = MessagesAPI.BetaTextBlockParam;
export import BetaTextDelta = MessagesAPI.BetaTextDelta;
export import BetaTool = MessagesAPI.BetaTool;
export import BetaToolBash20241022 = MessagesAPI.BetaToolBash20241022;
export import BetaToolChoice = MessagesAPI.BetaToolChoice;
export import BetaToolChoiceAny = MessagesAPI.BetaToolChoiceAny;
export import BetaToolChoiceAuto = MessagesAPI.BetaToolChoiceAuto;
export import BetaToolChoiceTool = MessagesAPI.BetaToolChoiceTool;
export import BetaToolComputerUse20241022 = MessagesAPI.BetaToolComputerUse20241022;
export import BetaToolResultBlockParam = MessagesAPI.BetaToolResultBlockParam;
export import BetaToolTextEditor20241022 = MessagesAPI.BetaToolTextEditor20241022;
export import BetaToolUnion = MessagesAPI.BetaToolUnion;
export import BetaToolUseBlock = MessagesAPI.BetaToolUseBlock;
export import BetaToolUseBlockParam = MessagesAPI.BetaToolUseBlockParam;
export import BetaUsage = MessagesAPI.BetaUsage;
export import MessageCreateParams = MessagesAPI.MessageCreateParams;
export import MessageCreateParamsNonStreaming = MessagesAPI.MessageCreateParamsNonStreaming;
export import MessageCreateParamsStreaming = MessagesAPI.MessageCreateParamsStreaming;
export type BetaCacheControlEphemeral = MessagesAPI.BetaCacheControlEphemeral;
export type BetaContentBlock = MessagesAPI.BetaContentBlock;
export type BetaContentBlockParam = MessagesAPI.BetaContentBlockParam;
export type BetaImageBlockParam = MessagesAPI.BetaImageBlockParam;
export type BetaInputJSONDelta = MessagesAPI.BetaInputJSONDelta;
export type BetaMessage = MessagesAPI.BetaMessage;
export type BetaMessageDeltaUsage = MessagesAPI.BetaMessageDeltaUsage;
export type BetaMessageParam = MessagesAPI.BetaMessageParam;
export type BetaMetadata = MessagesAPI.BetaMetadata;
export type BetaRawContentBlockDeltaEvent = MessagesAPI.BetaRawContentBlockDeltaEvent;
export type BetaRawContentBlockStartEvent = MessagesAPI.BetaRawContentBlockStartEvent;
export type BetaRawContentBlockStopEvent = MessagesAPI.BetaRawContentBlockStopEvent;
export type BetaRawMessageDeltaEvent = MessagesAPI.BetaRawMessageDeltaEvent;
export type BetaRawMessageStartEvent = MessagesAPI.BetaRawMessageStartEvent;
export type BetaRawMessageStopEvent = MessagesAPI.BetaRawMessageStopEvent;
export type BetaRawMessageStreamEvent = MessagesAPI.BetaRawMessageStreamEvent;
export type BetaTextBlock = MessagesAPI.BetaTextBlock;
export type BetaTextBlockParam = MessagesAPI.BetaTextBlockParam;
export type BetaTextDelta = MessagesAPI.BetaTextDelta;
export type BetaTool = MessagesAPI.BetaTool;
export type BetaToolBash20241022 = MessagesAPI.BetaToolBash20241022;
export type BetaToolChoice = MessagesAPI.BetaToolChoice;
export type BetaToolChoiceAny = MessagesAPI.BetaToolChoiceAny;
export type BetaToolChoiceAuto = MessagesAPI.BetaToolChoiceAuto;
export type BetaToolChoiceTool = MessagesAPI.BetaToolChoiceTool;
export type BetaToolComputerUse20241022 = MessagesAPI.BetaToolComputerUse20241022;
export type BetaToolResultBlockParam = MessagesAPI.BetaToolResultBlockParam;
export type BetaToolTextEditor20241022 = MessagesAPI.BetaToolTextEditor20241022;
export type BetaToolUnion = MessagesAPI.BetaToolUnion;
export type BetaToolUseBlock = MessagesAPI.BetaToolUseBlock;
export type BetaToolUseBlockParam = MessagesAPI.BetaToolUseBlockParam;
export type BetaUsage = MessagesAPI.BetaUsage;
export type MessageCreateParams = MessagesAPI.MessageCreateParams;
export type MessageCreateParamsNonStreaming = MessagesAPI.MessageCreateParamsNonStreaming;
export type MessageCreateParamsStreaming = MessagesAPI.MessageCreateParamsStreaming;
export import PromptCaching = PromptCachingAPI.PromptCaching;
}
90 changes: 45 additions & 45 deletions src/resources/beta/index.ts
Original file line number Diff line number Diff line change
@@ -1,54 +1,54 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

export {
AnthropicBeta,
BetaAPIError,
BetaAuthenticationError,
BetaError,
BetaErrorResponse,
BetaInvalidRequestError,
BetaNotFoundError,
BetaOverloadedError,
BetaPermissionError,
BetaRateLimitError,
Beta,
type AnthropicBeta,
type BetaAPIError,
type BetaAuthenticationError,
type BetaError,
type BetaErrorResponse,
type BetaInvalidRequestError,
type BetaNotFoundError,
type BetaOverloadedError,
type BetaPermissionError,
type BetaRateLimitError,
} from './beta';
export {
BetaCacheControlEphemeral,
BetaContentBlock,
BetaContentBlockParam,
BetaImageBlockParam,
BetaInputJSONDelta,
BetaMessage,
BetaMessageDeltaUsage,
BetaMessageParam,
BetaMetadata,
BetaRawContentBlockDeltaEvent,
BetaRawContentBlockStartEvent,
BetaRawContentBlockStopEvent,
BetaRawMessageDeltaEvent,
BetaRawMessageStartEvent,
BetaRawMessageStopEvent,
BetaRawMessageStreamEvent,
BetaTextBlock,
BetaTextBlockParam,
BetaTextDelta,
BetaTool,
BetaToolBash20241022,
BetaToolChoice,
BetaToolChoiceAny,
BetaToolChoiceAuto,
BetaToolChoiceTool,
BetaToolComputerUse20241022,
BetaToolResultBlockParam,
BetaToolTextEditor20241022,
BetaToolUnion,
BetaToolUseBlock,
BetaToolUseBlockParam,
BetaUsage,
MessageCreateParams,
MessageCreateParamsNonStreaming,
MessageCreateParamsStreaming,
Messages,
type BetaCacheControlEphemeral,
type BetaContentBlock,
type BetaContentBlockParam,
type BetaImageBlockParam,
type BetaInputJSONDelta,
type BetaMessage,
type BetaMessageDeltaUsage,
type BetaMessageParam,
type BetaMetadata,
type BetaRawContentBlockDeltaEvent,
type BetaRawContentBlockStartEvent,
type BetaRawContentBlockStopEvent,
type BetaRawMessageDeltaEvent,
type BetaRawMessageStartEvent,
type BetaRawMessageStopEvent,
type BetaRawMessageStreamEvent,
type BetaTextBlock,
type BetaTextBlockParam,
type BetaTextDelta,
type BetaTool,
type BetaToolBash20241022,
type BetaToolChoice,
type BetaToolChoiceAny,
type BetaToolChoiceAuto,
type BetaToolChoiceTool,
type BetaToolComputerUse20241022,
type BetaToolResultBlockParam,
type BetaToolTextEditor20241022,
type BetaToolUnion,
type BetaToolUseBlock,
type BetaToolUseBlockParam,
type BetaUsage,
type MessageCreateParams,
type MessageCreateParamsNonStreaming,
type MessageCreateParamsStreaming,
} from './messages/index';
export { PromptCaching } from './prompt-caching/index';
26 changes: 13 additions & 13 deletions src/resources/beta/messages/batches.ts
Original file line number Diff line number Diff line change
Expand Up @@ -644,18 +644,18 @@ export interface BatchResultsParams {
}

export namespace Batches {
export import BetaMessageBatch = BatchesAPI.BetaMessageBatch;
export import BetaMessageBatchCanceledResult = BatchesAPI.BetaMessageBatchCanceledResult;
export import BetaMessageBatchErroredResult = BatchesAPI.BetaMessageBatchErroredResult;
export import BetaMessageBatchExpiredResult = BatchesAPI.BetaMessageBatchExpiredResult;
export import BetaMessageBatchIndividualResponse = BatchesAPI.BetaMessageBatchIndividualResponse;
export import BetaMessageBatchRequestCounts = BatchesAPI.BetaMessageBatchRequestCounts;
export import BetaMessageBatchResult = BatchesAPI.BetaMessageBatchResult;
export import BetaMessageBatchSucceededResult = BatchesAPI.BetaMessageBatchSucceededResult;
export type BetaMessageBatch = BatchesAPI.BetaMessageBatch;
export type BetaMessageBatchCanceledResult = BatchesAPI.BetaMessageBatchCanceledResult;
export type BetaMessageBatchErroredResult = BatchesAPI.BetaMessageBatchErroredResult;
export type BetaMessageBatchExpiredResult = BatchesAPI.BetaMessageBatchExpiredResult;
export type BetaMessageBatchIndividualResponse = BatchesAPI.BetaMessageBatchIndividualResponse;
export type BetaMessageBatchRequestCounts = BatchesAPI.BetaMessageBatchRequestCounts;
export type BetaMessageBatchResult = BatchesAPI.BetaMessageBatchResult;
export type BetaMessageBatchSucceededResult = BatchesAPI.BetaMessageBatchSucceededResult;
export import BetaMessageBatchesPage = BatchesAPI.BetaMessageBatchesPage;
export import BatchCreateParams = BatchesAPI.BatchCreateParams;
export import BatchRetrieveParams = BatchesAPI.BatchRetrieveParams;
export import BatchListParams = BatchesAPI.BatchListParams;
export import BatchCancelParams = BatchesAPI.BatchCancelParams;
export import BatchResultsParams = BatchesAPI.BatchResultsParams;
export type BatchCreateParams = BatchesAPI.BatchCreateParams;
export type BatchRetrieveParams = BatchesAPI.BatchRetrieveParams;
export type BatchListParams = BatchesAPI.BatchListParams;
export type BatchCancelParams = BatchesAPI.BatchCancelParams;
export type BatchResultsParams = BatchesAPI.BatchResultsParams;
}
Loading