From 6421d69314e89cde4a85d2a70f1dae4cf570d0f7 Mon Sep 17 00:00:00 2001 From: Stainless Bot Date: Fri, 1 Nov 2024 04:32:16 +0000 Subject: [PATCH] refactor: use type imports for type-only imports (#1159) --- src/index.ts | 377 ++++++++++++------ src/lib/AssistantStream.ts | 3 +- src/resources/audio/audio.ts | 70 ++-- src/resources/audio/index.ts | 24 +- src/resources/audio/speech.ts | 6 +- src/resources/audio/transcriptions.ts | 21 +- src/resources/audio/translations.ts | 17 +- src/resources/batches.ts | 18 +- src/resources/beta/assistants.ts | 37 +- src/resources/beta/beta.ts | 158 +++++--- src/resources/beta/index.ts | 82 ++-- src/resources/beta/threads/index.ts | 126 +++--- src/resources/beta/threads/messages.ts | 71 ++-- src/resources/beta/threads/runs/index.ts | 72 ++-- src/resources/beta/threads/runs/runs.ts | 113 ++++-- src/resources/beta/threads/runs/steps.ts | 48 ++- src/resources/beta/threads/threads.ts | 198 ++++++--- .../beta/vector-stores/file-batches.ts | 11 +- src/resources/beta/vector-stores/files.ts | 17 +- src/resources/beta/vector-stores/index.ts | 48 +-- .../beta/vector-stores/vector-stores.ts | 76 ++-- src/resources/chat/chat.ts | 114 ++++-- src/resources/chat/completions.ts | 71 ++-- src/resources/chat/index.ts | 66 +-- src/resources/completions.ts | 16 +- src/resources/embeddings.ts | 13 +- src/resources/files.ts | 21 +- src/resources/fine-tuning/fine-tuning.ts | 43 +- src/resources/fine-tuning/index.ts | 16 +- src/resources/fine-tuning/jobs/checkpoints.ts | 13 +- src/resources/fine-tuning/jobs/index.ts | 28 +- src/resources/fine-tuning/jobs/jobs.ts | 47 ++- src/resources/images.ts | 17 +- src/resources/index.ts | 74 ++-- src/resources/models.ts | 9 +- src/resources/moderations.ts | 19 +- src/resources/uploads/index.ts | 4 +- src/resources/uploads/parts.ts | 6 +- src/resources/uploads/uploads.ts | 19 +- tsconfig.json | 2 +- 40 files changed, 1307 insertions(+), 884 deletions(-) diff --git a/src/index.ts b/src/index.ts index 56108223a..c1506997b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,12 +1,108 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Errors from './error'; -import * as Uploads from './uploads'; import { type Agent, type RequestInit } from './_shims/index'; import * as qs from './internal/qs'; import * as Core from './core'; +import * as Errors from './error'; import * as Pagination from './pagination'; +import { type CursorPageParams, CursorPageResponse, PageResponse } from './pagination'; +import * as Uploads from './uploads'; import * as API from './resources/index'; +import { + Batch, + BatchCreateParams, + BatchError, + BatchListParams, + BatchRequestCounts, + Batches, + BatchesPage, +} from './resources/batches'; +import { + Completion, + CompletionChoice, + CompletionCreateParams, + CompletionCreateParamsNonStreaming, + CompletionCreateParamsStreaming, + CompletionUsage, + Completions, +} from './resources/completions'; +import { + CreateEmbeddingResponse, + Embedding, + EmbeddingCreateParams, + EmbeddingModel, + Embeddings, +} from './resources/embeddings'; +import { + FileContent, + FileCreateParams, + FileDeleted, + FileListParams, + FileObject, + FileObjectsPage, + FilePurpose, + Files, +} from './resources/files'; +import { + Image, + ImageCreateVariationParams, + ImageEditParams, + ImageGenerateParams, + ImageModel, + Images, + ImagesResponse, +} from './resources/images'; +import { Model, ModelDeleted, Models, ModelsPage } from './resources/models'; +import { + Moderation, + ModerationCreateParams, + ModerationCreateResponse, + ModerationImageURLInput, + ModerationModel, + ModerationMultiModalInput, + ModerationTextInput, + Moderations, +} from './resources/moderations'; +import { Audio, AudioModel, AudioResponseFormat } from './resources/audio/audio'; +import { Beta } from './resources/beta/beta'; +import { Chat, ChatModel } from './resources/chat/chat'; +import { + ChatCompletion, + ChatCompletionAssistantMessageParam, + ChatCompletionAudio, + ChatCompletionAudioParam, + ChatCompletionChunk, + ChatCompletionContentPart, + ChatCompletionContentPartImage, + ChatCompletionContentPartInputAudio, + ChatCompletionContentPartRefusal, + ChatCompletionContentPartText, + ChatCompletionCreateParams, + ChatCompletionCreateParamsNonStreaming, + ChatCompletionCreateParamsStreaming, + ChatCompletionFunctionCallOption, + ChatCompletionFunctionMessageParam, + ChatCompletionMessage, + ChatCompletionMessageParam, + ChatCompletionMessageToolCall, + ChatCompletionModality, + ChatCompletionNamedToolChoice, + ChatCompletionRole, + ChatCompletionStreamOptions, + ChatCompletionSystemMessageParam, + ChatCompletionTokenLogprob, + ChatCompletionTool, + ChatCompletionToolChoiceOption, + ChatCompletionToolMessageParam, + ChatCompletionUserMessageParam, +} from './resources/chat/completions'; +import { FineTuning } from './resources/fine-tuning/fine-tuning'; +import { + Upload, + UploadCompleteParams, + UploadCreateParams, + Uploads as UploadsAPIUploads, +} from './resources/uploads/uploads'; export interface ClientOptions { /** @@ -209,138 +305,167 @@ export class OpenAI extends Core.APIClient { static fileFromPath = Uploads.fileFromPath; } -export const { - OpenAIError, - APIError, - APIConnectionError, - APIConnectionTimeoutError, - APIUserAbortError, - NotFoundError, - ConflictError, - RateLimitError, - BadRequestError, - AuthenticationError, - InternalServerError, - PermissionDeniedError, - UnprocessableEntityError, -} = Errors; +export const OpenAIError = Errors.OpenAIError; +export const APIError = Errors.APIError; +export const APIConnectionError = Errors.APIConnectionError; +export const APIConnectionTimeoutError = Errors.APIConnectionTimeoutError; +export const APIUserAbortError = Errors.APIUserAbortError; +export const NotFoundError = Errors.NotFoundError; +export const ConflictError = Errors.ConflictError; +export const RateLimitError = Errors.RateLimitError; +export const BadRequestError = Errors.BadRequestError; +export const AuthenticationError = Errors.AuthenticationError; +export const InternalServerError = Errors.InternalServerError; +export const PermissionDeniedError = Errors.PermissionDeniedError; +export const UnprocessableEntityError = Errors.UnprocessableEntityError; export import toFile = Uploads.toFile; export import fileFromPath = Uploads.fileFromPath; -export namespace OpenAI { - export import RequestOptions = Core.RequestOptions; +OpenAI.Completions = Completions; +OpenAI.Chat = Chat; +OpenAI.Embeddings = Embeddings; +OpenAI.Files = Files; +OpenAI.FileObjectsPage = FileObjectsPage; +OpenAI.Images = Images; +OpenAI.Audio = Audio; +OpenAI.Moderations = Moderations; +OpenAI.Models = Models; +OpenAI.ModelsPage = ModelsPage; +OpenAI.FineTuning = FineTuning; +OpenAI.Beta = Beta; +OpenAI.Batches = Batches; +OpenAI.BatchesPage = BatchesPage; +OpenAI.Uploads = UploadsAPIUploads; + +export declare namespace OpenAI { + export type RequestOptions = Core.RequestOptions; export import Page = Pagination.Page; - export import PageResponse = Pagination.PageResponse; + export { type PageResponse as PageResponse }; export import CursorPage = Pagination.CursorPage; - export import CursorPageParams = Pagination.CursorPageParams; - export import CursorPageResponse = Pagination.CursorPageResponse; - - export import Completions = API.Completions; - export import Completion = API.Completion; - export import CompletionChoice = API.CompletionChoice; - export import CompletionUsage = API.CompletionUsage; - export import CompletionCreateParams = API.CompletionCreateParams; - export import CompletionCreateParamsNonStreaming = API.CompletionCreateParamsNonStreaming; - export import CompletionCreateParamsStreaming = API.CompletionCreateParamsStreaming; - - export import Chat = API.Chat; - export import ChatModel = API.ChatModel; - export import ChatCompletion = API.ChatCompletion; - export import ChatCompletionAssistantMessageParam = API.ChatCompletionAssistantMessageParam; - export import ChatCompletionAudio = API.ChatCompletionAudio; - export import ChatCompletionAudioParam = API.ChatCompletionAudioParam; - export import ChatCompletionChunk = API.ChatCompletionChunk; - export import ChatCompletionContentPart = API.ChatCompletionContentPart; - export import ChatCompletionContentPartImage = API.ChatCompletionContentPartImage; - export import ChatCompletionContentPartInputAudio = API.ChatCompletionContentPartInputAudio; - export import ChatCompletionContentPartRefusal = API.ChatCompletionContentPartRefusal; - export import ChatCompletionContentPartText = API.ChatCompletionContentPartText; - export import ChatCompletionFunctionCallOption = API.ChatCompletionFunctionCallOption; - export import ChatCompletionFunctionMessageParam = API.ChatCompletionFunctionMessageParam; - export import ChatCompletionMessage = API.ChatCompletionMessage; - export import ChatCompletionMessageParam = API.ChatCompletionMessageParam; - export import ChatCompletionMessageToolCall = API.ChatCompletionMessageToolCall; - export import ChatCompletionModality = API.ChatCompletionModality; - export import ChatCompletionNamedToolChoice = API.ChatCompletionNamedToolChoice; - export import ChatCompletionRole = API.ChatCompletionRole; - export import ChatCompletionStreamOptions = API.ChatCompletionStreamOptions; - export import ChatCompletionSystemMessageParam = API.ChatCompletionSystemMessageParam; - export import ChatCompletionTokenLogprob = API.ChatCompletionTokenLogprob; - export import ChatCompletionTool = API.ChatCompletionTool; - export import ChatCompletionToolChoiceOption = API.ChatCompletionToolChoiceOption; - export import ChatCompletionToolMessageParam = API.ChatCompletionToolMessageParam; - export import ChatCompletionUserMessageParam = API.ChatCompletionUserMessageParam; - export import ChatCompletionCreateParams = API.ChatCompletionCreateParams; - export import ChatCompletionCreateParamsNonStreaming = API.ChatCompletionCreateParamsNonStreaming; - export import ChatCompletionCreateParamsStreaming = API.ChatCompletionCreateParamsStreaming; - - export import Embeddings = API.Embeddings; - export import CreateEmbeddingResponse = API.CreateEmbeddingResponse; - export import Embedding = API.Embedding; - export import EmbeddingModel = API.EmbeddingModel; - export import EmbeddingCreateParams = API.EmbeddingCreateParams; - - export import Files = API.Files; - export import FileContent = API.FileContent; - export import FileDeleted = API.FileDeleted; - export import FileObject = API.FileObject; - export import FilePurpose = API.FilePurpose; - export import FileObjectsPage = API.FileObjectsPage; - export import FileCreateParams = API.FileCreateParams; - export import FileListParams = API.FileListParams; - - export import Images = API.Images; - export import Image = API.Image; - export import ImageModel = API.ImageModel; - export import ImagesResponse = API.ImagesResponse; - export import ImageCreateVariationParams = API.ImageCreateVariationParams; - export import ImageEditParams = API.ImageEditParams; - export import ImageGenerateParams = API.ImageGenerateParams; - - export import Audio = API.Audio; - export import AudioModel = API.AudioModel; - export import AudioResponseFormat = API.AudioResponseFormat; - - export import Moderations = API.Moderations; - export import Moderation = API.Moderation; - export import ModerationImageURLInput = API.ModerationImageURLInput; - export import ModerationModel = API.ModerationModel; - export import ModerationMultiModalInput = API.ModerationMultiModalInput; - export import ModerationTextInput = API.ModerationTextInput; - export import ModerationCreateResponse = API.ModerationCreateResponse; - export import ModerationCreateParams = API.ModerationCreateParams; - - export import Models = API.Models; - export import Model = API.Model; - export import ModelDeleted = API.ModelDeleted; - export import ModelsPage = API.ModelsPage; - - export import FineTuning = API.FineTuning; - - export import Beta = API.Beta; - - export import Batches = API.Batches; - export import Batch = API.Batch; - export import BatchError = API.BatchError; - export import BatchRequestCounts = API.BatchRequestCounts; - export import BatchesPage = API.BatchesPage; - export import BatchCreateParams = API.BatchCreateParams; - export import BatchListParams = API.BatchListParams; - - export import Uploads = API.Uploads; - export import Upload = API.Upload; - export import UploadCreateParams = API.UploadCreateParams; - export import UploadCompleteParams = API.UploadCompleteParams; - - export import ErrorObject = API.ErrorObject; - export import FunctionDefinition = API.FunctionDefinition; - export import FunctionParameters = API.FunctionParameters; - export import ResponseFormatJSONObject = API.ResponseFormatJSONObject; - export import ResponseFormatJSONSchema = API.ResponseFormatJSONSchema; - export import ResponseFormatText = API.ResponseFormatText; + export { type CursorPageParams as CursorPageParams, type CursorPageResponse as CursorPageResponse }; + + export { + Completions as Completions, + type Completion as Completion, + type CompletionChoice as CompletionChoice, + type CompletionUsage as CompletionUsage, + type CompletionCreateParams as CompletionCreateParams, + type CompletionCreateParamsNonStreaming as CompletionCreateParamsNonStreaming, + type CompletionCreateParamsStreaming as CompletionCreateParamsStreaming, + }; + + export { + Chat as Chat, + type ChatModel as ChatModel, + type ChatCompletion as ChatCompletion, + type ChatCompletionAssistantMessageParam as ChatCompletionAssistantMessageParam, + type ChatCompletionAudio as ChatCompletionAudio, + type ChatCompletionAudioParam as ChatCompletionAudioParam, + type ChatCompletionChunk as ChatCompletionChunk, + type ChatCompletionContentPart as ChatCompletionContentPart, + type ChatCompletionContentPartImage as ChatCompletionContentPartImage, + type ChatCompletionContentPartInputAudio as ChatCompletionContentPartInputAudio, + type ChatCompletionContentPartRefusal as ChatCompletionContentPartRefusal, + type ChatCompletionContentPartText as ChatCompletionContentPartText, + type ChatCompletionFunctionCallOption as ChatCompletionFunctionCallOption, + type ChatCompletionFunctionMessageParam as ChatCompletionFunctionMessageParam, + type ChatCompletionMessage as ChatCompletionMessage, + type ChatCompletionMessageParam as ChatCompletionMessageParam, + type ChatCompletionMessageToolCall as ChatCompletionMessageToolCall, + type ChatCompletionModality as ChatCompletionModality, + type ChatCompletionNamedToolChoice as ChatCompletionNamedToolChoice, + type ChatCompletionRole as ChatCompletionRole, + type ChatCompletionStreamOptions as ChatCompletionStreamOptions, + type ChatCompletionSystemMessageParam as ChatCompletionSystemMessageParam, + type ChatCompletionTokenLogprob as ChatCompletionTokenLogprob, + type ChatCompletionTool as ChatCompletionTool, + type ChatCompletionToolChoiceOption as ChatCompletionToolChoiceOption, + type ChatCompletionToolMessageParam as ChatCompletionToolMessageParam, + type ChatCompletionUserMessageParam as ChatCompletionUserMessageParam, + type ChatCompletionCreateParams as ChatCompletionCreateParams, + type ChatCompletionCreateParamsNonStreaming as ChatCompletionCreateParamsNonStreaming, + type ChatCompletionCreateParamsStreaming as ChatCompletionCreateParamsStreaming, + }; + + export { + Embeddings as Embeddings, + type CreateEmbeddingResponse as CreateEmbeddingResponse, + type Embedding as Embedding, + type EmbeddingModel as EmbeddingModel, + type EmbeddingCreateParams as EmbeddingCreateParams, + }; + + export { + Files as Files, + type FileContent as FileContent, + type FileDeleted as FileDeleted, + type FileObject as FileObject, + type FilePurpose as FilePurpose, + FileObjectsPage as FileObjectsPage, + type FileCreateParams as FileCreateParams, + type FileListParams as FileListParams, + }; + + export { + Images as Images, + type Image as Image, + type ImageModel as ImageModel, + type ImagesResponse as ImagesResponse, + type ImageCreateVariationParams as ImageCreateVariationParams, + type ImageEditParams as ImageEditParams, + type ImageGenerateParams as ImageGenerateParams, + }; + + export { Audio as Audio, type AudioModel as AudioModel, type AudioResponseFormat as AudioResponseFormat }; + + export { + Moderations as Moderations, + type Moderation as Moderation, + type ModerationImageURLInput as ModerationImageURLInput, + type ModerationModel as ModerationModel, + type ModerationMultiModalInput as ModerationMultiModalInput, + type ModerationTextInput as ModerationTextInput, + type ModerationCreateResponse as ModerationCreateResponse, + type ModerationCreateParams as ModerationCreateParams, + }; + + export { + Models as Models, + type Model as Model, + type ModelDeleted as ModelDeleted, + ModelsPage as ModelsPage, + }; + + export { FineTuning as FineTuning }; + + export { Beta as Beta }; + + export { + Batches as Batches, + type Batch as Batch, + type BatchError as BatchError, + type BatchRequestCounts as BatchRequestCounts, + BatchesPage as BatchesPage, + type BatchCreateParams as BatchCreateParams, + type BatchListParams as BatchListParams, + }; + + export { + UploadsAPIUploads as Uploads, + type Upload as Upload, + type UploadCreateParams as UploadCreateParams, + type UploadCompleteParams as UploadCompleteParams, + }; + + export type ErrorObject = API.ErrorObject; + export type FunctionDefinition = API.FunctionDefinition; + export type FunctionParameters = API.FunctionParameters; + export type ResponseFormatJSONObject = API.ResponseFormatJSONObject; + export type ResponseFormatJSONSchema = API.ResponseFormatJSONSchema; + export type ResponseFormatText = API.ResponseFormatText; } // ---------------------- Azure ---------------------- diff --git a/src/lib/AssistantStream.ts b/src/lib/AssistantStream.ts index 7c5ffb58e..c826c910e 100644 --- a/src/lib/AssistantStream.ts +++ b/src/lib/AssistantStream.ts @@ -6,7 +6,7 @@ import { Text, ImageFile, TextDelta, - Messages, + MessageDelta, MessageContent, } from 'openai/resources/beta/threads/messages'; import * as Core from 'openai/core'; @@ -31,7 +31,6 @@ import { import { RunStep, RunStepDelta, ToolCall, ToolCallDelta } from 'openai/resources/beta/threads/runs/steps'; import { ThreadCreateAndRunParamsBase, Threads } from 'openai/resources/beta/threads/threads'; import { BaseEvents, EventStream } from './EventStream'; -import MessageDelta = Messages.MessageDelta; export interface AssistantStreamEvents extends BaseEvents { run: (run: Run) => void; diff --git a/src/resources/audio/audio.ts b/src/resources/audio/audio.ts index e06e28094..b9a7ad4f8 100644 --- a/src/resources/audio/audio.ts +++ b/src/resources/audio/audio.ts @@ -1,10 +1,26 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../../resource'; -import * as AudioAPI from './audio'; import * as SpeechAPI from './speech'; +import { Speech, SpeechCreateParams, SpeechModel } from './speech'; import * as TranscriptionsAPI from './transcriptions'; +import { + Transcription, + TranscriptionCreateParams, + TranscriptionCreateResponse, + TranscriptionSegment, + TranscriptionVerbose, + TranscriptionWord, + Transcriptions, +} from './transcriptions'; import * as TranslationsAPI from './translations'; +import { + Translation, + TranslationCreateParams, + TranslationCreateResponse, + TranslationVerbose, + Translations, +} from './translations'; export class Audio extends APIResource { transcriptions: TranscriptionsAPI.Transcriptions = new TranscriptionsAPI.Transcriptions(this._client); @@ -20,30 +36,30 @@ export type AudioModel = 'whisper-1'; */ export type AudioResponseFormat = 'json' | 'text' | 'srt' | 'verbose_json' | 'vtt'; -export namespace Audio { - export import AudioModel = AudioAPI.AudioModel; - export import AudioResponseFormat = AudioAPI.AudioResponseFormat; - export import Transcriptions = TranscriptionsAPI.Transcriptions; - export import Transcription = TranscriptionsAPI.Transcription; - export import TranscriptionSegment = TranscriptionsAPI.TranscriptionSegment; - export import TranscriptionVerbose = TranscriptionsAPI.TranscriptionVerbose; - export import TranscriptionWord = TranscriptionsAPI.TranscriptionWord; - export import TranscriptionCreateResponse = TranscriptionsAPI.TranscriptionCreateResponse; - export type TranscriptionCreateParams< - ResponseFormat extends AudioAPI.AudioResponseFormat | undefined = - | AudioAPI.AudioResponseFormat - | undefined, - > = TranscriptionsAPI.TranscriptionCreateParams; - export import Translations = TranslationsAPI.Translations; - export import Translation = TranslationsAPI.Translation; - export import TranslationVerbose = TranslationsAPI.TranslationVerbose; - export import TranslationCreateResponse = TranslationsAPI.TranslationCreateResponse; - export type TranslationCreateParams< - ResponseFormat extends AudioAPI.AudioResponseFormat | undefined = - | AudioAPI.AudioResponseFormat - | undefined, - > = TranslationsAPI.TranslationCreateParams; - export import Speech = SpeechAPI.Speech; - export import SpeechModel = SpeechAPI.SpeechModel; - export import SpeechCreateParams = SpeechAPI.SpeechCreateParams; +Audio.Transcriptions = Transcriptions; +Audio.Translations = Translations; +Audio.Speech = Speech; + +export declare namespace Audio { + export { type AudioModel as AudioModel, type AudioResponseFormat as AudioResponseFormat }; + + export { + Transcriptions as Transcriptions, + type Transcription as Transcription, + type TranscriptionSegment as TranscriptionSegment, + type TranscriptionVerbose as TranscriptionVerbose, + type TranscriptionWord as TranscriptionWord, + type TranscriptionCreateResponse as TranscriptionCreateResponse, + type TranscriptionCreateParams as TranscriptionCreateParams, + }; + + export { + Translations as Translations, + type Translation as Translation, + type TranslationVerbose as TranslationVerbose, + type TranslationCreateResponse as TranslationCreateResponse, + type TranslationCreateParams as TranslationCreateParams, + }; + + export { Speech as Speech, type SpeechModel as SpeechModel, type SpeechCreateParams as SpeechCreateParams }; } diff --git a/src/resources/audio/index.ts b/src/resources/audio/index.ts index 952c05b03..2bbe9e3ab 100644 --- a/src/resources/audio/index.ts +++ b/src/resources/audio/index.ts @@ -1,20 +1,20 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { AudioModel, AudioResponseFormat, Audio } from './audio'; -export { SpeechModel, SpeechCreateParams, Speech } from './speech'; +export { Audio, type AudioModel, type AudioResponseFormat } from './audio'; +export { Speech, type SpeechModel, type SpeechCreateParams } from './speech'; export { - Transcription, - TranscriptionSegment, - TranscriptionVerbose, - TranscriptionWord, - TranscriptionCreateResponse, - TranscriptionCreateParams, Transcriptions, + type Transcription, + type TranscriptionSegment, + type TranscriptionVerbose, + type TranscriptionWord, + type TranscriptionCreateResponse, + type TranscriptionCreateParams, } from './transcriptions'; export { - Translation, - TranslationVerbose, - TranslationCreateResponse, - TranslationCreateParams, Translations, + type Translation, + type TranslationVerbose, + type TranslationCreateResponse, + type TranslationCreateParams, } from './translations'; diff --git a/src/resources/audio/speech.ts b/src/resources/audio/speech.ts index 34fb26b02..da99bf649 100644 --- a/src/resources/audio/speech.ts +++ b/src/resources/audio/speech.ts @@ -2,7 +2,6 @@ import { APIResource } from '../../resource'; import * as Core from '../../core'; -import * as SpeechAPI from './speech'; import { type Response } from '../../_shims/index'; export class Speech extends APIResource { @@ -49,7 +48,6 @@ export interface SpeechCreateParams { speed?: number; } -export namespace Speech { - export import SpeechModel = SpeechAPI.SpeechModel; - export import SpeechCreateParams = SpeechAPI.SpeechCreateParams; +export declare namespace Speech { + export { type SpeechModel as SpeechModel, type SpeechCreateParams as SpeechCreateParams }; } diff --git a/src/resources/audio/transcriptions.ts b/src/resources/audio/transcriptions.ts index 902dc9e5f..dd4258787 100644 --- a/src/resources/audio/transcriptions.ts +++ b/src/resources/audio/transcriptions.ts @@ -2,7 +2,6 @@ import { APIResource } from '../../resource'; import * as Core from '../../core'; -import * as TranscriptionsAPI from './transcriptions'; import * as AudioAPI from './audio'; export class Transcriptions extends APIResource { @@ -205,15 +204,13 @@ export interface TranscriptionCreateParams< timestamp_granularities?: Array<'word' | 'segment'>; } -export namespace Transcriptions { - export import Transcription = TranscriptionsAPI.Transcription; - export import TranscriptionSegment = TranscriptionsAPI.TranscriptionSegment; - export import TranscriptionVerbose = TranscriptionsAPI.TranscriptionVerbose; - export import TranscriptionWord = TranscriptionsAPI.TranscriptionWord; - export import TranscriptionCreateResponse = TranscriptionsAPI.TranscriptionCreateResponse; - export type TranscriptionCreateParams< - ResponseFormat extends AudioAPI.AudioResponseFormat | undefined = - | AudioAPI.AudioResponseFormat - | undefined, - > = TranscriptionsAPI.TranscriptionCreateParams; +export declare namespace Transcriptions { + export { + type Transcription as Transcription, + type TranscriptionSegment as TranscriptionSegment, + type TranscriptionVerbose as TranscriptionVerbose, + type TranscriptionWord as TranscriptionWord, + type TranscriptionCreateResponse as TranscriptionCreateResponse, + type TranscriptionCreateParams as TranscriptionCreateParams, + }; } diff --git a/src/resources/audio/translations.ts b/src/resources/audio/translations.ts index 36c2dc7c2..b98a95044 100644 --- a/src/resources/audio/translations.ts +++ b/src/resources/audio/translations.ts @@ -2,7 +2,6 @@ import { APIResource } from '../../resource'; import * as Core from '../../core'; -import * as TranslationsAPI from './translations'; import * as AudioAPI from './audio'; import * as TranscriptionsAPI from './transcriptions'; @@ -98,13 +97,11 @@ export interface TranslationCreateParams< temperature?: number; } -export namespace Translations { - export import Translation = TranslationsAPI.Translation; - export import TranslationVerbose = TranslationsAPI.TranslationVerbose; - export import TranslationCreateResponse = TranslationsAPI.TranslationCreateResponse; - export type TranslationCreateParams< - ResponseFormat extends AudioAPI.AudioResponseFormat | undefined = - | AudioAPI.AudioResponseFormat - | undefined, - > = TranslationsAPI.TranslationCreateParams; +export declare namespace Translations { + export { + type Translation as Translation, + type TranslationVerbose as TranslationVerbose, + type TranslationCreateResponse as TranslationCreateResponse, + type TranslationCreateParams as TranslationCreateParams, + }; } diff --git a/src/resources/batches.ts b/src/resources/batches.ts index 738582f9e..e68e7569c 100644 --- a/src/resources/batches.ts +++ b/src/resources/batches.ts @@ -244,11 +244,15 @@ export interface BatchCreateParams { export interface BatchListParams extends CursorPageParams {} -export namespace Batches { - export import Batch = BatchesAPI.Batch; - export import BatchError = BatchesAPI.BatchError; - export import BatchRequestCounts = BatchesAPI.BatchRequestCounts; - export import BatchesPage = BatchesAPI.BatchesPage; - export import BatchCreateParams = BatchesAPI.BatchCreateParams; - export import BatchListParams = BatchesAPI.BatchListParams; +Batches.BatchesPage = BatchesPage; + +export declare namespace Batches { + export { + type Batch as Batch, + type BatchError as BatchError, + type BatchRequestCounts as BatchRequestCounts, + BatchesPage as BatchesPage, + type BatchCreateParams as BatchCreateParams, + type BatchListParams as BatchListParams, + }; } diff --git a/src/resources/beta/assistants.ts b/src/resources/beta/assistants.ts index aa7362297..6d48089ce 100644 --- a/src/resources/beta/assistants.ts +++ b/src/resources/beta/assistants.ts @@ -3,7 +3,6 @@ import { APIResource } from '../../resource'; import { isRequestOptions } from '../../core'; import * as Core from '../../core'; -import * as AssistantsAPI from './assistants'; import * as Shared from '../shared'; import * as ChatAPI from '../chat/chat'; import * as MessagesAPI from './threads/messages'; @@ -1396,20 +1395,24 @@ export interface AssistantListParams extends CursorPageParams { order?: 'asc' | 'desc'; } -export namespace Assistants { - export import Assistant = AssistantsAPI.Assistant; - export import AssistantDeleted = AssistantsAPI.AssistantDeleted; - export import AssistantStreamEvent = AssistantsAPI.AssistantStreamEvent; - export import AssistantTool = AssistantsAPI.AssistantTool; - export import CodeInterpreterTool = AssistantsAPI.CodeInterpreterTool; - export import FileSearchTool = AssistantsAPI.FileSearchTool; - export import FunctionTool = AssistantsAPI.FunctionTool; - export import MessageStreamEvent = AssistantsAPI.MessageStreamEvent; - export import RunStepStreamEvent = AssistantsAPI.RunStepStreamEvent; - export import RunStreamEvent = AssistantsAPI.RunStreamEvent; - export import ThreadStreamEvent = AssistantsAPI.ThreadStreamEvent; - export import AssistantsPage = AssistantsAPI.AssistantsPage; - export import AssistantCreateParams = AssistantsAPI.AssistantCreateParams; - export import AssistantUpdateParams = AssistantsAPI.AssistantUpdateParams; - export import AssistantListParams = AssistantsAPI.AssistantListParams; +Assistants.AssistantsPage = AssistantsPage; + +export declare namespace Assistants { + export { + type Assistant as Assistant, + type AssistantDeleted as AssistantDeleted, + type AssistantStreamEvent as AssistantStreamEvent, + type AssistantTool as AssistantTool, + type CodeInterpreterTool as CodeInterpreterTool, + type FileSearchTool as FileSearchTool, + type FunctionTool as FunctionTool, + type MessageStreamEvent as MessageStreamEvent, + type RunStepStreamEvent as RunStepStreamEvent, + type RunStreamEvent as RunStreamEvent, + type ThreadStreamEvent as ThreadStreamEvent, + AssistantsPage as AssistantsPage, + type AssistantCreateParams as AssistantCreateParams, + type AssistantUpdateParams as AssistantUpdateParams, + type AssistantListParams as AssistantListParams, + }; } diff --git a/src/resources/beta/beta.ts b/src/resources/beta/beta.ts index 0bcf217a8..b904abe4a 100644 --- a/src/resources/beta/beta.ts +++ b/src/resources/beta/beta.ts @@ -3,8 +3,59 @@ import { APIResource } from '../../resource'; import * as AssistantsAPI from './assistants'; import * as ChatAPI from './chat/chat'; +import { + Assistant, + AssistantCreateParams, + AssistantDeleted, + AssistantListParams, + AssistantStreamEvent, + AssistantTool, + AssistantUpdateParams, + Assistants, + AssistantsPage, + CodeInterpreterTool, + FileSearchTool, + FunctionTool, + MessageStreamEvent, + RunStepStreamEvent, + RunStreamEvent, + ThreadStreamEvent, +} from './assistants'; import * as ThreadsAPI from './threads/threads'; +import { + AssistantResponseFormatOption, + AssistantToolChoice, + AssistantToolChoiceFunction, + AssistantToolChoiceOption, + Thread, + ThreadCreateAndRunParams, + ThreadCreateAndRunParamsNonStreaming, + ThreadCreateAndRunParamsStreaming, + ThreadCreateAndRunPollParams, + ThreadCreateAndRunStreamParams, + ThreadCreateParams, + ThreadDeleted, + ThreadUpdateParams, + Threads, +} from './threads/threads'; import * as VectorStoresAPI from './vector-stores/vector-stores'; +import { + AutoFileChunkingStrategyParam, + FileChunkingStrategy, + FileChunkingStrategyParam, + OtherFileChunkingStrategyObject, + StaticFileChunkingStrategy, + StaticFileChunkingStrategyObject, + StaticFileChunkingStrategyParam, + VectorStore, + VectorStoreCreateParams, + VectorStoreDeleted, + VectorStoreListParams, + VectorStoreUpdateParams, + VectorStores, + VectorStoresPage, +} from './vector-stores/vector-stores'; +import { Chat } from './chat/chat'; export class Beta extends APIResource { vectorStores: VectorStoresAPI.VectorStores = new VectorStoresAPI.VectorStores(this._client); @@ -13,50 +64,65 @@ export class Beta extends APIResource { threads: ThreadsAPI.Threads = new ThreadsAPI.Threads(this._client); } -export namespace Beta { - export import VectorStores = VectorStoresAPI.VectorStores; - export import AutoFileChunkingStrategyParam = VectorStoresAPI.AutoFileChunkingStrategyParam; - export import FileChunkingStrategy = VectorStoresAPI.FileChunkingStrategy; - export import FileChunkingStrategyParam = VectorStoresAPI.FileChunkingStrategyParam; - export import OtherFileChunkingStrategyObject = VectorStoresAPI.OtherFileChunkingStrategyObject; - export import StaticFileChunkingStrategy = VectorStoresAPI.StaticFileChunkingStrategy; - export import StaticFileChunkingStrategyObject = VectorStoresAPI.StaticFileChunkingStrategyObject; - export import StaticFileChunkingStrategyParam = VectorStoresAPI.StaticFileChunkingStrategyParam; - export import VectorStore = VectorStoresAPI.VectorStore; - export import VectorStoreDeleted = VectorStoresAPI.VectorStoreDeleted; - export import VectorStoresPage = VectorStoresAPI.VectorStoresPage; - export import VectorStoreCreateParams = VectorStoresAPI.VectorStoreCreateParams; - export import VectorStoreUpdateParams = VectorStoresAPI.VectorStoreUpdateParams; - export import VectorStoreListParams = VectorStoresAPI.VectorStoreListParams; - export import Chat = ChatAPI.Chat; - export import Assistants = AssistantsAPI.Assistants; - export import Assistant = AssistantsAPI.Assistant; - export import AssistantDeleted = AssistantsAPI.AssistantDeleted; - export import AssistantStreamEvent = AssistantsAPI.AssistantStreamEvent; - export import AssistantTool = AssistantsAPI.AssistantTool; - export import CodeInterpreterTool = AssistantsAPI.CodeInterpreterTool; - export import FileSearchTool = AssistantsAPI.FileSearchTool; - export import FunctionTool = AssistantsAPI.FunctionTool; - export import MessageStreamEvent = AssistantsAPI.MessageStreamEvent; - export import RunStepStreamEvent = AssistantsAPI.RunStepStreamEvent; - export import RunStreamEvent = AssistantsAPI.RunStreamEvent; - export import ThreadStreamEvent = AssistantsAPI.ThreadStreamEvent; - export import AssistantsPage = AssistantsAPI.AssistantsPage; - export import AssistantCreateParams = AssistantsAPI.AssistantCreateParams; - export import AssistantUpdateParams = AssistantsAPI.AssistantUpdateParams; - export import AssistantListParams = AssistantsAPI.AssistantListParams; - export import Threads = ThreadsAPI.Threads; - export import AssistantResponseFormatOption = ThreadsAPI.AssistantResponseFormatOption; - export import AssistantToolChoice = ThreadsAPI.AssistantToolChoice; - export import AssistantToolChoiceFunction = ThreadsAPI.AssistantToolChoiceFunction; - export import AssistantToolChoiceOption = ThreadsAPI.AssistantToolChoiceOption; - export import Thread = ThreadsAPI.Thread; - export import ThreadDeleted = ThreadsAPI.ThreadDeleted; - export import ThreadCreateParams = ThreadsAPI.ThreadCreateParams; - export import ThreadUpdateParams = ThreadsAPI.ThreadUpdateParams; - export import ThreadCreateAndRunParams = ThreadsAPI.ThreadCreateAndRunParams; - export import ThreadCreateAndRunParamsNonStreaming = ThreadsAPI.ThreadCreateAndRunParamsNonStreaming; - export import ThreadCreateAndRunParamsStreaming = ThreadsAPI.ThreadCreateAndRunParamsStreaming; - export import ThreadCreateAndRunPollParams = ThreadsAPI.ThreadCreateAndRunPollParams; - export import ThreadCreateAndRunStreamParams = ThreadsAPI.ThreadCreateAndRunStreamParams; +Beta.VectorStores = VectorStores; +Beta.VectorStoresPage = VectorStoresPage; +Beta.Assistants = Assistants; +Beta.AssistantsPage = AssistantsPage; +Beta.Threads = Threads; + +export declare namespace Beta { + export { + VectorStores as VectorStores, + type AutoFileChunkingStrategyParam as AutoFileChunkingStrategyParam, + type FileChunkingStrategy as FileChunkingStrategy, + type FileChunkingStrategyParam as FileChunkingStrategyParam, + type OtherFileChunkingStrategyObject as OtherFileChunkingStrategyObject, + type StaticFileChunkingStrategy as StaticFileChunkingStrategy, + type StaticFileChunkingStrategyObject as StaticFileChunkingStrategyObject, + type StaticFileChunkingStrategyParam as StaticFileChunkingStrategyParam, + type VectorStore as VectorStore, + type VectorStoreDeleted as VectorStoreDeleted, + VectorStoresPage as VectorStoresPage, + type VectorStoreCreateParams as VectorStoreCreateParams, + type VectorStoreUpdateParams as VectorStoreUpdateParams, + type VectorStoreListParams as VectorStoreListParams, + }; + + export { Chat }; + + export { + Assistants as Assistants, + type Assistant as Assistant, + type AssistantDeleted as AssistantDeleted, + type AssistantStreamEvent as AssistantStreamEvent, + type AssistantTool as AssistantTool, + type CodeInterpreterTool as CodeInterpreterTool, + type FileSearchTool as FileSearchTool, + type FunctionTool as FunctionTool, + type MessageStreamEvent as MessageStreamEvent, + type RunStepStreamEvent as RunStepStreamEvent, + type RunStreamEvent as RunStreamEvent, + type ThreadStreamEvent as ThreadStreamEvent, + AssistantsPage as AssistantsPage, + type AssistantCreateParams as AssistantCreateParams, + type AssistantUpdateParams as AssistantUpdateParams, + type AssistantListParams as AssistantListParams, + }; + + export { + Threads as Threads, + type AssistantResponseFormatOption as AssistantResponseFormatOption, + type AssistantToolChoice as AssistantToolChoice, + type AssistantToolChoiceFunction as AssistantToolChoiceFunction, + type AssistantToolChoiceOption as AssistantToolChoiceOption, + type Thread as Thread, + type ThreadDeleted as ThreadDeleted, + type ThreadCreateParams as ThreadCreateParams, + type ThreadUpdateParams as ThreadUpdateParams, + type ThreadCreateAndRunParams as ThreadCreateAndRunParams, + type ThreadCreateAndRunParamsNonStreaming as ThreadCreateAndRunParamsNonStreaming, + type ThreadCreateAndRunParamsStreaming as ThreadCreateAndRunParamsStreaming, + type ThreadCreateAndRunPollParams, + type ThreadCreateAndRunStreamParams, + }; } diff --git a/src/resources/beta/index.ts b/src/resources/beta/index.ts index 9fcf805a1..d7111288f 100644 --- a/src/resources/beta/index.ts +++ b/src/resources/beta/index.ts @@ -1,54 +1,54 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. export { - Assistant, - AssistantDeleted, - AssistantStreamEvent, - AssistantTool, - CodeInterpreterTool, - FileSearchTool, - FunctionTool, - MessageStreamEvent, - RunStepStreamEvent, - RunStreamEvent, - ThreadStreamEvent, - AssistantCreateParams, - AssistantUpdateParams, - AssistantListParams, AssistantsPage, Assistants, + type Assistant, + type AssistantDeleted, + type AssistantStreamEvent, + type AssistantTool, + type CodeInterpreterTool, + type FileSearchTool, + type FunctionTool, + type MessageStreamEvent, + type RunStepStreamEvent, + type RunStreamEvent, + type ThreadStreamEvent, + type AssistantCreateParams, + type AssistantUpdateParams, + type AssistantListParams, } from './assistants'; +export { Beta } from './beta'; +export { Chat } from './chat/index'; export { - AssistantResponseFormatOption, - AssistantToolChoice, - AssistantToolChoiceFunction, - AssistantToolChoiceOption, - Thread, - ThreadDeleted, - ThreadCreateParams, - ThreadUpdateParams, - ThreadCreateAndRunParams, - ThreadCreateAndRunParamsNonStreaming, - ThreadCreateAndRunParamsStreaming, - ThreadCreateAndRunPollParams, - ThreadCreateAndRunStreamParams, Threads, + type AssistantResponseFormatOption, + type AssistantToolChoice, + type AssistantToolChoiceFunction, + type AssistantToolChoiceOption, + type Thread, + type ThreadDeleted, + type ThreadCreateParams, + type ThreadUpdateParams, + type ThreadCreateAndRunParams, + type ThreadCreateAndRunParamsNonStreaming, + type ThreadCreateAndRunParamsStreaming, + type ThreadCreateAndRunPollParams, + type ThreadCreateAndRunStreamParams, } from './threads/index'; -export { Beta } from './beta'; -export { Chat } from './chat/index'; export { - AutoFileChunkingStrategyParam, - FileChunkingStrategy, - FileChunkingStrategyParam, - OtherFileChunkingStrategyObject, - StaticFileChunkingStrategy, - StaticFileChunkingStrategyObject, - StaticFileChunkingStrategyParam, - VectorStore, - VectorStoreDeleted, - VectorStoreCreateParams, - VectorStoreUpdateParams, - VectorStoreListParams, VectorStoresPage, VectorStores, + type AutoFileChunkingStrategyParam, + type FileChunkingStrategy, + type FileChunkingStrategyParam, + type OtherFileChunkingStrategyObject, + type StaticFileChunkingStrategy, + type StaticFileChunkingStrategyObject, + type StaticFileChunkingStrategyParam, + type VectorStore, + type VectorStoreDeleted, + type VectorStoreCreateParams, + type VectorStoreUpdateParams, + type VectorStoreListParams, } from './vector-stores/index'; diff --git a/src/resources/beta/threads/index.ts b/src/resources/beta/threads/index.ts index 1964cffb8..f67a1edde 100644 --- a/src/resources/beta/threads/index.ts +++ b/src/resources/beta/threads/index.ts @@ -1,73 +1,73 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. export { - Annotation, - AnnotationDelta, - FileCitationAnnotation, - FileCitationDeltaAnnotation, - FilePathAnnotation, - FilePathDeltaAnnotation, - ImageFile, - ImageFileContentBlock, - ImageFileDelta, - ImageFileDeltaBlock, - ImageURL, - ImageURLContentBlock, - ImageURLDelta, - ImageURLDeltaBlock, - Message, - MessageContent, - MessageContentDelta, - MessageContentPartParam, - MessageDeleted, - MessageDelta, - MessageDeltaEvent, - RefusalContentBlock, - RefusalDeltaBlock, - Text, - TextContentBlock, - TextContentBlockParam, - TextDelta, - TextDeltaBlock, - MessageCreateParams, - MessageUpdateParams, - MessageListParams, MessagesPage, Messages, + type Annotation, + type AnnotationDelta, + type FileCitationAnnotation, + type FileCitationDeltaAnnotation, + type FilePathAnnotation, + type FilePathDeltaAnnotation, + type ImageFile, + type ImageFileContentBlock, + type ImageFileDelta, + type ImageFileDeltaBlock, + type ImageURL, + type ImageURLContentBlock, + type ImageURLDelta, + type ImageURLDeltaBlock, + type Message, + type MessageContent, + type MessageContentDelta, + type MessageContentPartParam, + type MessageDeleted, + type MessageDelta, + type MessageDeltaEvent, + type RefusalContentBlock, + type RefusalDeltaBlock, + type Text, + type TextContentBlock, + type TextContentBlockParam, + type TextDelta, + type TextDeltaBlock, + type MessageCreateParams, + type MessageUpdateParams, + type MessageListParams, } from './messages'; export { - AssistantResponseFormatOption, - AssistantToolChoice, - AssistantToolChoiceFunction, - AssistantToolChoiceOption, - Thread, - ThreadDeleted, - ThreadCreateParams, - ThreadUpdateParams, - ThreadCreateAndRunParams, - ThreadCreateAndRunParamsNonStreaming, - ThreadCreateAndRunParamsStreaming, - ThreadCreateAndRunPollParams, - ThreadCreateAndRunStreamParams, - Threads, -} from './threads'; -export { - RequiredActionFunctionToolCall, - Run, - RunStatus, - RunCreateParams, - RunCreateParamsNonStreaming, - RunCreateParamsStreaming, - RunUpdateParams, - RunListParams, - RunCreateAndPollParams, - RunCreateAndStreamParams, - RunStreamParams, - RunSubmitToolOutputsParams, - RunSubmitToolOutputsParamsNonStreaming, - RunSubmitToolOutputsParamsStreaming, - RunSubmitToolOutputsAndPollParams, - RunSubmitToolOutputsStreamParams, RunsPage, Runs, + type RequiredActionFunctionToolCall, + type Run, + type RunStatus, + type RunCreateParams, + type RunCreateParamsNonStreaming, + type RunCreateParamsStreaming, + type RunUpdateParams, + type RunListParams, + type RunSubmitToolOutputsParams, + type RunSubmitToolOutputsParamsNonStreaming, + type RunSubmitToolOutputsParamsStreaming, + type RunCreateAndPollParams, + type RunCreateAndStreamParams, + type RunStreamParams, + type RunSubmitToolOutputsAndPollParams, + type RunSubmitToolOutputsStreamParams, } from './runs/index'; +export { + Threads, + type AssistantResponseFormatOption, + type AssistantToolChoice, + type AssistantToolChoiceFunction, + type AssistantToolChoiceOption, + type Thread, + type ThreadDeleted, + type ThreadCreateParams, + type ThreadUpdateParams, + type ThreadCreateAndRunParams, + type ThreadCreateAndRunParamsNonStreaming, + type ThreadCreateAndRunParamsStreaming, + type ThreadCreateAndRunPollParams, + type ThreadCreateAndRunStreamParams, +} from './threads'; diff --git a/src/resources/beta/threads/messages.ts b/src/resources/beta/threads/messages.ts index 59c92675b..af7977667 100644 --- a/src/resources/beta/threads/messages.ts +++ b/src/resources/beta/threads/messages.ts @@ -3,7 +3,6 @@ import { APIResource } from '../../../resource'; import { isRequestOptions } from '../../../core'; import * as Core from '../../../core'; -import * as MessagesAPI from './messages'; import * as AssistantsAPI from '../assistants'; import { CursorPage, type CursorPageParams } from '../../../pagination'; @@ -722,37 +721,41 @@ export interface MessageListParams extends CursorPageParams { run_id?: string; } -export namespace Messages { - export import Annotation = MessagesAPI.Annotation; - export import AnnotationDelta = MessagesAPI.AnnotationDelta; - export import FileCitationAnnotation = MessagesAPI.FileCitationAnnotation; - export import FileCitationDeltaAnnotation = MessagesAPI.FileCitationDeltaAnnotation; - export import FilePathAnnotation = MessagesAPI.FilePathAnnotation; - export import FilePathDeltaAnnotation = MessagesAPI.FilePathDeltaAnnotation; - export import ImageFile = MessagesAPI.ImageFile; - export import ImageFileContentBlock = MessagesAPI.ImageFileContentBlock; - export import ImageFileDelta = MessagesAPI.ImageFileDelta; - export import ImageFileDeltaBlock = MessagesAPI.ImageFileDeltaBlock; - export import ImageURL = MessagesAPI.ImageURL; - export import ImageURLContentBlock = MessagesAPI.ImageURLContentBlock; - export import ImageURLDelta = MessagesAPI.ImageURLDelta; - export import ImageURLDeltaBlock = MessagesAPI.ImageURLDeltaBlock; - export import Message = MessagesAPI.Message; - export import MessageContent = MessagesAPI.MessageContent; - export import MessageContentDelta = MessagesAPI.MessageContentDelta; - export import MessageContentPartParam = MessagesAPI.MessageContentPartParam; - export import MessageDeleted = MessagesAPI.MessageDeleted; - export import MessageDelta = MessagesAPI.MessageDelta; - export import MessageDeltaEvent = MessagesAPI.MessageDeltaEvent; - export import RefusalContentBlock = MessagesAPI.RefusalContentBlock; - export import RefusalDeltaBlock = MessagesAPI.RefusalDeltaBlock; - export import Text = MessagesAPI.Text; - export import TextContentBlock = MessagesAPI.TextContentBlock; - export import TextContentBlockParam = MessagesAPI.TextContentBlockParam; - export import TextDelta = MessagesAPI.TextDelta; - export import TextDeltaBlock = MessagesAPI.TextDeltaBlock; - export import MessagesPage = MessagesAPI.MessagesPage; - export import MessageCreateParams = MessagesAPI.MessageCreateParams; - export import MessageUpdateParams = MessagesAPI.MessageUpdateParams; - export import MessageListParams = MessagesAPI.MessageListParams; +Messages.MessagesPage = MessagesPage; + +export declare namespace Messages { + export { + type Annotation as Annotation, + type AnnotationDelta as AnnotationDelta, + type FileCitationAnnotation as FileCitationAnnotation, + type FileCitationDeltaAnnotation as FileCitationDeltaAnnotation, + type FilePathAnnotation as FilePathAnnotation, + type FilePathDeltaAnnotation as FilePathDeltaAnnotation, + type ImageFile as ImageFile, + type ImageFileContentBlock as ImageFileContentBlock, + type ImageFileDelta as ImageFileDelta, + type ImageFileDeltaBlock as ImageFileDeltaBlock, + type ImageURL as ImageURL, + type ImageURLContentBlock as ImageURLContentBlock, + type ImageURLDelta as ImageURLDelta, + type ImageURLDeltaBlock as ImageURLDeltaBlock, + type Message as Message, + type MessageContent as MessageContent, + type MessageContentDelta as MessageContentDelta, + type MessageContentPartParam as MessageContentPartParam, + type MessageDeleted as MessageDeleted, + type MessageDelta as MessageDelta, + type MessageDeltaEvent as MessageDeltaEvent, + type RefusalContentBlock as RefusalContentBlock, + type RefusalDeltaBlock as RefusalDeltaBlock, + type Text as Text, + type TextContentBlock as TextContentBlock, + type TextContentBlockParam as TextContentBlockParam, + type TextDelta as TextDelta, + type TextDeltaBlock as TextDeltaBlock, + MessagesPage as MessagesPage, + type MessageCreateParams as MessageCreateParams, + type MessageUpdateParams as MessageUpdateParams, + type MessageListParams as MessageListParams, + }; } diff --git a/src/resources/beta/threads/runs/index.ts b/src/resources/beta/threads/runs/index.ts index 9496f59e1..9dbe575bc 100644 --- a/src/resources/beta/threads/runs/index.ts +++ b/src/resources/beta/threads/runs/index.ts @@ -1,46 +1,46 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. export { - CodeInterpreterLogs, - CodeInterpreterOutputImage, - CodeInterpreterToolCall, - CodeInterpreterToolCallDelta, - FileSearchToolCall, - FileSearchToolCallDelta, - FunctionToolCall, - FunctionToolCallDelta, - MessageCreationStepDetails, - RunStep, - RunStepDelta, - RunStepDeltaEvent, - RunStepDeltaMessageDelta, - RunStepInclude, - ToolCall, - ToolCallDelta, - ToolCallDeltaObject, - ToolCallsStepDetails, - StepRetrieveParams, - StepListParams, RunStepsPage, Steps, + type CodeInterpreterLogs, + type CodeInterpreterOutputImage, + type CodeInterpreterToolCall, + type CodeInterpreterToolCallDelta, + type FileSearchToolCall, + type FileSearchToolCallDelta, + type FunctionToolCall, + type FunctionToolCallDelta, + type MessageCreationStepDetails, + type RunStep, + type RunStepDelta, + type RunStepDeltaEvent, + type RunStepDeltaMessageDelta, + type RunStepInclude, + type ToolCall, + type ToolCallDelta, + type ToolCallDeltaObject, + type ToolCallsStepDetails, + type StepRetrieveParams, + type StepListParams, } from './steps'; export { - RequiredActionFunctionToolCall, - Run, - RunStatus, - RunCreateParams, - RunCreateParamsNonStreaming, - RunCreateParamsStreaming, - RunUpdateParams, - RunListParams, - RunCreateAndPollParams, - RunCreateAndStreamParams, - RunStreamParams, - RunSubmitToolOutputsParams, - RunSubmitToolOutputsParamsNonStreaming, - RunSubmitToolOutputsParamsStreaming, - RunSubmitToolOutputsAndPollParams, - RunSubmitToolOutputsStreamParams, RunsPage, Runs, + type RequiredActionFunctionToolCall, + type Run, + type RunStatus, + type RunCreateParams, + type RunCreateParamsNonStreaming, + type RunCreateParamsStreaming, + type RunUpdateParams, + type RunListParams, + type RunCreateAndPollParams, + type RunCreateAndStreamParams, + type RunStreamParams, + type RunSubmitToolOutputsParams, + type RunSubmitToolOutputsParamsNonStreaming, + type RunSubmitToolOutputsParamsStreaming, + type RunSubmitToolOutputsAndPollParams, + type RunSubmitToolOutputsStreamParams, } from './runs'; diff --git a/src/resources/beta/threads/runs/runs.ts b/src/resources/beta/threads/runs/runs.ts index b48edd5b1..83a447a91 100644 --- a/src/resources/beta/threads/runs/runs.ts +++ b/src/resources/beta/threads/runs/runs.ts @@ -13,6 +13,30 @@ import * as ChatAPI from '../../../chat/chat'; import * as MessagesAPI from '../messages'; import * as ThreadsAPI from '../threads'; import * as StepsAPI from './steps'; +import { + CodeInterpreterLogs, + CodeInterpreterOutputImage, + CodeInterpreterToolCall, + CodeInterpreterToolCallDelta, + FileSearchToolCall, + FileSearchToolCallDelta, + FunctionToolCall, + FunctionToolCallDelta, + MessageCreationStepDetails, + RunStep, + RunStepDelta, + RunStepDeltaEvent, + RunStepDeltaMessageDelta, + RunStepInclude, + RunStepsPage, + StepListParams, + StepRetrieveParams, + Steps, + ToolCall, + ToolCallDelta, + ToolCallDeltaObject, + ToolCallsStepDetails, +} from './steps'; import { CursorPage, type CursorPageParams } from '../../../../pagination'; import { Stream } from '../../../../streaming'; @@ -1619,44 +1643,53 @@ export namespace RunSubmitToolOutputsStreamParams { } } -export namespace Runs { - export import RequiredActionFunctionToolCall = RunsAPI.RequiredActionFunctionToolCall; - export import Run = RunsAPI.Run; - export import RunStatus = RunsAPI.RunStatus; - export import RunsPage = RunsAPI.RunsPage; - export import RunCreateParams = RunsAPI.RunCreateParams; - export import RunCreateParamsNonStreaming = RunsAPI.RunCreateParamsNonStreaming; - export import RunCreateParamsStreaming = RunsAPI.RunCreateParamsStreaming; - export import RunUpdateParams = RunsAPI.RunUpdateParams; - export import RunListParams = RunsAPI.RunListParams; - export import RunCreateAndPollParams = RunsAPI.RunCreateAndPollParams; - export import RunCreateAndStreamParams = RunsAPI.RunCreateAndStreamParams; - export import RunStreamParams = RunsAPI.RunStreamParams; - export import RunSubmitToolOutputsParams = RunsAPI.RunSubmitToolOutputsParams; - export import RunSubmitToolOutputsParamsNonStreaming = RunsAPI.RunSubmitToolOutputsParamsNonStreaming; - export import RunSubmitToolOutputsParamsStreaming = RunsAPI.RunSubmitToolOutputsParamsStreaming; - export import RunSubmitToolOutputsAndPollParams = RunsAPI.RunSubmitToolOutputsAndPollParams; - export import RunSubmitToolOutputsStreamParams = RunsAPI.RunSubmitToolOutputsStreamParams; - export import Steps = StepsAPI.Steps; - export import CodeInterpreterLogs = StepsAPI.CodeInterpreterLogs; - export import CodeInterpreterOutputImage = StepsAPI.CodeInterpreterOutputImage; - export import CodeInterpreterToolCall = StepsAPI.CodeInterpreterToolCall; - export import CodeInterpreterToolCallDelta = StepsAPI.CodeInterpreterToolCallDelta; - export import FileSearchToolCall = StepsAPI.FileSearchToolCall; - export import FileSearchToolCallDelta = StepsAPI.FileSearchToolCallDelta; - export import FunctionToolCall = StepsAPI.FunctionToolCall; - export import FunctionToolCallDelta = StepsAPI.FunctionToolCallDelta; - export import MessageCreationStepDetails = StepsAPI.MessageCreationStepDetails; - export import RunStep = StepsAPI.RunStep; - export import RunStepDelta = StepsAPI.RunStepDelta; - export import RunStepDeltaEvent = StepsAPI.RunStepDeltaEvent; - export import RunStepDeltaMessageDelta = StepsAPI.RunStepDeltaMessageDelta; - export import RunStepInclude = StepsAPI.RunStepInclude; - export import ToolCall = StepsAPI.ToolCall; - export import ToolCallDelta = StepsAPI.ToolCallDelta; - export import ToolCallDeltaObject = StepsAPI.ToolCallDeltaObject; - export import ToolCallsStepDetails = StepsAPI.ToolCallsStepDetails; - export import RunStepsPage = StepsAPI.RunStepsPage; - export import StepRetrieveParams = StepsAPI.StepRetrieveParams; - export import StepListParams = StepsAPI.StepListParams; +Runs.RunsPage = RunsPage; +Runs.Steps = Steps; +Runs.RunStepsPage = RunStepsPage; + +export declare namespace Runs { + export { + type RequiredActionFunctionToolCall as RequiredActionFunctionToolCall, + type Run as Run, + type RunStatus as RunStatus, + RunsPage as RunsPage, + type RunCreateParams as RunCreateParams, + type RunCreateParamsNonStreaming as RunCreateParamsNonStreaming, + type RunCreateParamsStreaming as RunCreateParamsStreaming, + type RunUpdateParams as RunUpdateParams, + type RunListParams as RunListParams, + type RunCreateAndPollParams, + type RunCreateAndStreamParams, + type RunStreamParams, + type RunSubmitToolOutputsParams as RunSubmitToolOutputsParams, + type RunSubmitToolOutputsParamsNonStreaming as RunSubmitToolOutputsParamsNonStreaming, + type RunSubmitToolOutputsParamsStreaming as RunSubmitToolOutputsParamsStreaming, + type RunSubmitToolOutputsAndPollParams, + type RunSubmitToolOutputsStreamParams, + }; + + export { + Steps as Steps, + type CodeInterpreterLogs as CodeInterpreterLogs, + type CodeInterpreterOutputImage as CodeInterpreterOutputImage, + type CodeInterpreterToolCall as CodeInterpreterToolCall, + type CodeInterpreterToolCallDelta as CodeInterpreterToolCallDelta, + type FileSearchToolCall as FileSearchToolCall, + type FileSearchToolCallDelta as FileSearchToolCallDelta, + type FunctionToolCall as FunctionToolCall, + type FunctionToolCallDelta as FunctionToolCallDelta, + type MessageCreationStepDetails as MessageCreationStepDetails, + type RunStep as RunStep, + type RunStepDelta as RunStepDelta, + type RunStepDeltaEvent as RunStepDeltaEvent, + type RunStepDeltaMessageDelta as RunStepDeltaMessageDelta, + type RunStepInclude as RunStepInclude, + type ToolCall as ToolCall, + type ToolCallDelta as ToolCallDelta, + type ToolCallDeltaObject as ToolCallDeltaObject, + type ToolCallsStepDetails as ToolCallsStepDetails, + RunStepsPage as RunStepsPage, + type StepRetrieveParams as StepRetrieveParams, + type StepListParams as StepListParams, + }; } diff --git a/src/resources/beta/threads/runs/steps.ts b/src/resources/beta/threads/runs/steps.ts index c076191a3..b10bcb868 100644 --- a/src/resources/beta/threads/runs/steps.ts +++ b/src/resources/beta/threads/runs/steps.ts @@ -738,26 +738,30 @@ export interface StepListParams extends CursorPageParams { order?: 'asc' | 'desc'; } -export namespace Steps { - export import CodeInterpreterLogs = StepsAPI.CodeInterpreterLogs; - export import CodeInterpreterOutputImage = StepsAPI.CodeInterpreterOutputImage; - export import CodeInterpreterToolCall = StepsAPI.CodeInterpreterToolCall; - export import CodeInterpreterToolCallDelta = StepsAPI.CodeInterpreterToolCallDelta; - export import FileSearchToolCall = StepsAPI.FileSearchToolCall; - export import FileSearchToolCallDelta = StepsAPI.FileSearchToolCallDelta; - export import FunctionToolCall = StepsAPI.FunctionToolCall; - export import FunctionToolCallDelta = StepsAPI.FunctionToolCallDelta; - export import MessageCreationStepDetails = StepsAPI.MessageCreationStepDetails; - export import RunStep = StepsAPI.RunStep; - export import RunStepDelta = StepsAPI.RunStepDelta; - export import RunStepDeltaEvent = StepsAPI.RunStepDeltaEvent; - export import RunStepDeltaMessageDelta = StepsAPI.RunStepDeltaMessageDelta; - export import RunStepInclude = StepsAPI.RunStepInclude; - export import ToolCall = StepsAPI.ToolCall; - export import ToolCallDelta = StepsAPI.ToolCallDelta; - export import ToolCallDeltaObject = StepsAPI.ToolCallDeltaObject; - export import ToolCallsStepDetails = StepsAPI.ToolCallsStepDetails; - export import RunStepsPage = StepsAPI.RunStepsPage; - export import StepRetrieveParams = StepsAPI.StepRetrieveParams; - export import StepListParams = StepsAPI.StepListParams; +Steps.RunStepsPage = RunStepsPage; + +export declare namespace Steps { + export { + type CodeInterpreterLogs as CodeInterpreterLogs, + type CodeInterpreterOutputImage as CodeInterpreterOutputImage, + type CodeInterpreterToolCall as CodeInterpreterToolCall, + type CodeInterpreterToolCallDelta as CodeInterpreterToolCallDelta, + type FileSearchToolCall as FileSearchToolCall, + type FileSearchToolCallDelta as FileSearchToolCallDelta, + type FunctionToolCall as FunctionToolCall, + type FunctionToolCallDelta as FunctionToolCallDelta, + type MessageCreationStepDetails as MessageCreationStepDetails, + type RunStep as RunStep, + type RunStepDelta as RunStepDelta, + type RunStepDeltaEvent as RunStepDeltaEvent, + type RunStepDeltaMessageDelta as RunStepDeltaMessageDelta, + type RunStepInclude as RunStepInclude, + type ToolCall as ToolCall, + type ToolCallDelta as ToolCallDelta, + type ToolCallDeltaObject as ToolCallDeltaObject, + type ToolCallsStepDetails as ToolCallsStepDetails, + RunStepsPage as RunStepsPage, + type StepRetrieveParams as StepRetrieveParams, + type StepListParams as StepListParams, + }; } diff --git a/src/resources/beta/threads/threads.ts b/src/resources/beta/threads/threads.ts index be959eb30..899645508 100644 --- a/src/resources/beta/threads/threads.ts +++ b/src/resources/beta/threads/threads.ts @@ -10,8 +10,63 @@ import * as Shared from '../../shared'; import * as AssistantsAPI from '../assistants'; import * as ChatAPI from '../../chat/chat'; import * as MessagesAPI from './messages'; +import { + Annotation, + AnnotationDelta, + FileCitationAnnotation, + FileCitationDeltaAnnotation, + FilePathAnnotation, + FilePathDeltaAnnotation, + ImageFile, + ImageFileContentBlock, + ImageFileDelta, + ImageFileDeltaBlock, + ImageURL, + ImageURLContentBlock, + ImageURLDelta, + ImageURLDeltaBlock, + Message as MessagesAPIMessage, + MessageContent, + MessageContentDelta, + MessageContentPartParam, + MessageCreateParams, + MessageDeleted, + MessageDelta, + MessageDeltaEvent, + MessageListParams, + MessageUpdateParams, + Messages, + MessagesPage, + RefusalContentBlock, + RefusalDeltaBlock, + Text, + TextContentBlock, + TextContentBlockParam, + TextDelta, + TextDeltaBlock, +} from './messages'; import * as VectorStoresAPI from '../vector-stores/vector-stores'; import * as RunsAPI from './runs/runs'; +import { + RequiredActionFunctionToolCall, + Run, + RunCreateAndPollParams, + RunCreateAndStreamParams, + RunCreateParams, + RunCreateParamsNonStreaming, + RunCreateParamsStreaming, + RunListParams, + RunStatus, + RunStreamParams, + RunSubmitToolOutputsAndPollParams, + RunSubmitToolOutputsParams, + RunSubmitToolOutputsParamsNonStreaming, + RunSubmitToolOutputsParamsStreaming, + RunSubmitToolOutputsStreamParams, + RunUpdateParams, + Runs, + RunsPage, +} from './runs/runs'; import { Stream } from '../../../streaming'; export class Threads extends APIResource { @@ -1489,69 +1544,82 @@ export namespace ThreadCreateAndRunStreamParams { } } -export namespace Threads { - export import AssistantResponseFormatOption = ThreadsAPI.AssistantResponseFormatOption; - export import AssistantToolChoice = ThreadsAPI.AssistantToolChoice; - export import AssistantToolChoiceFunction = ThreadsAPI.AssistantToolChoiceFunction; - export import AssistantToolChoiceOption = ThreadsAPI.AssistantToolChoiceOption; - export import Thread = ThreadsAPI.Thread; - export import ThreadDeleted = ThreadsAPI.ThreadDeleted; - export import ThreadCreateParams = ThreadsAPI.ThreadCreateParams; - export import ThreadUpdateParams = ThreadsAPI.ThreadUpdateParams; - export import ThreadCreateAndRunParams = ThreadsAPI.ThreadCreateAndRunParams; - export import ThreadCreateAndRunParamsNonStreaming = ThreadsAPI.ThreadCreateAndRunParamsNonStreaming; - export import ThreadCreateAndRunParamsStreaming = ThreadsAPI.ThreadCreateAndRunParamsStreaming; - export import ThreadCreateAndRunPollParams = ThreadsAPI.ThreadCreateAndRunPollParams; - export import ThreadCreateAndRunStreamParams = ThreadsAPI.ThreadCreateAndRunStreamParams; - export import Runs = RunsAPI.Runs; - export import RequiredActionFunctionToolCall = RunsAPI.RequiredActionFunctionToolCall; - export import Run = RunsAPI.Run; - export import RunStatus = RunsAPI.RunStatus; - export import RunsPage = RunsAPI.RunsPage; - export import RunCreateParams = RunsAPI.RunCreateParams; - export import RunCreateParamsNonStreaming = RunsAPI.RunCreateParamsNonStreaming; - export import RunCreateParamsStreaming = RunsAPI.RunCreateParamsStreaming; - export import RunUpdateParams = RunsAPI.RunUpdateParams; - export import RunListParams = RunsAPI.RunListParams; - export import RunCreateAndPollParams = RunsAPI.RunCreateAndPollParams; - export import RunCreateAndStreamParams = RunsAPI.RunCreateAndStreamParams; - export import RunStreamParams = RunsAPI.RunStreamParams; - export import RunSubmitToolOutputsParams = RunsAPI.RunSubmitToolOutputsParams; - export import RunSubmitToolOutputsParamsNonStreaming = RunsAPI.RunSubmitToolOutputsParamsNonStreaming; - export import RunSubmitToolOutputsParamsStreaming = RunsAPI.RunSubmitToolOutputsParamsStreaming; - export import RunSubmitToolOutputsAndPollParams = RunsAPI.RunSubmitToolOutputsAndPollParams; - export import RunSubmitToolOutputsStreamParams = RunsAPI.RunSubmitToolOutputsStreamParams; - export import Messages = MessagesAPI.Messages; - export import Annotation = MessagesAPI.Annotation; - export import AnnotationDelta = MessagesAPI.AnnotationDelta; - export import FileCitationAnnotation = MessagesAPI.FileCitationAnnotation; - export import FileCitationDeltaAnnotation = MessagesAPI.FileCitationDeltaAnnotation; - export import FilePathAnnotation = MessagesAPI.FilePathAnnotation; - export import FilePathDeltaAnnotation = MessagesAPI.FilePathDeltaAnnotation; - export import ImageFile = MessagesAPI.ImageFile; - export import ImageFileContentBlock = MessagesAPI.ImageFileContentBlock; - export import ImageFileDelta = MessagesAPI.ImageFileDelta; - export import ImageFileDeltaBlock = MessagesAPI.ImageFileDeltaBlock; - export import ImageURL = MessagesAPI.ImageURL; - export import ImageURLContentBlock = MessagesAPI.ImageURLContentBlock; - export import ImageURLDelta = MessagesAPI.ImageURLDelta; - export import ImageURLDeltaBlock = MessagesAPI.ImageURLDeltaBlock; - export import Message = MessagesAPI.Message; - export import MessageContent = MessagesAPI.MessageContent; - export import MessageContentDelta = MessagesAPI.MessageContentDelta; - export import MessageContentPartParam = MessagesAPI.MessageContentPartParam; - export import MessageDeleted = MessagesAPI.MessageDeleted; - export import MessageDelta = MessagesAPI.MessageDelta; - export import MessageDeltaEvent = MessagesAPI.MessageDeltaEvent; - export import RefusalContentBlock = MessagesAPI.RefusalContentBlock; - export import RefusalDeltaBlock = MessagesAPI.RefusalDeltaBlock; - export import Text = MessagesAPI.Text; - export import TextContentBlock = MessagesAPI.TextContentBlock; - export import TextContentBlockParam = MessagesAPI.TextContentBlockParam; - export import TextDelta = MessagesAPI.TextDelta; - export import TextDeltaBlock = MessagesAPI.TextDeltaBlock; - export import MessagesPage = MessagesAPI.MessagesPage; - export import MessageCreateParams = MessagesAPI.MessageCreateParams; - export import MessageUpdateParams = MessagesAPI.MessageUpdateParams; - export import MessageListParams = MessagesAPI.MessageListParams; +Threads.Runs = Runs; +Threads.RunsPage = RunsPage; +Threads.Messages = Messages; +Threads.MessagesPage = MessagesPage; + +export declare namespace Threads { + export { + type AssistantResponseFormatOption as AssistantResponseFormatOption, + type AssistantToolChoice as AssistantToolChoice, + type AssistantToolChoiceFunction as AssistantToolChoiceFunction, + type AssistantToolChoiceOption as AssistantToolChoiceOption, + type Thread as Thread, + type ThreadDeleted as ThreadDeleted, + type ThreadCreateParams as ThreadCreateParams, + type ThreadUpdateParams as ThreadUpdateParams, + type ThreadCreateAndRunParams as ThreadCreateAndRunParams, + type ThreadCreateAndRunParamsNonStreaming as ThreadCreateAndRunParamsNonStreaming, + type ThreadCreateAndRunParamsStreaming as ThreadCreateAndRunParamsStreaming, + type ThreadCreateAndRunPollParams, + type ThreadCreateAndRunStreamParams, + }; + + export { + Runs as Runs, + type RequiredActionFunctionToolCall as RequiredActionFunctionToolCall, + type Run as Run, + type RunStatus as RunStatus, + RunsPage as RunsPage, + type RunCreateParams as RunCreateParams, + type RunCreateParamsNonStreaming as RunCreateParamsNonStreaming, + type RunCreateParamsStreaming as RunCreateParamsStreaming, + type RunUpdateParams as RunUpdateParams, + type RunListParams as RunListParams, + type RunCreateAndPollParams, + type RunCreateAndStreamParams, + type RunStreamParams, + type RunSubmitToolOutputsParams as RunSubmitToolOutputsParams, + type RunSubmitToolOutputsParamsNonStreaming as RunSubmitToolOutputsParamsNonStreaming, + type RunSubmitToolOutputsParamsStreaming as RunSubmitToolOutputsParamsStreaming, + type RunSubmitToolOutputsAndPollParams, + type RunSubmitToolOutputsStreamParams, + }; + + export { + Messages as Messages, + type Annotation as Annotation, + type AnnotationDelta as AnnotationDelta, + type FileCitationAnnotation as FileCitationAnnotation, + type FileCitationDeltaAnnotation as FileCitationDeltaAnnotation, + type FilePathAnnotation as FilePathAnnotation, + type FilePathDeltaAnnotation as FilePathDeltaAnnotation, + type ImageFile as ImageFile, + type ImageFileContentBlock as ImageFileContentBlock, + type ImageFileDelta as ImageFileDelta, + type ImageFileDeltaBlock as ImageFileDeltaBlock, + type ImageURL as ImageURL, + type ImageURLContentBlock as ImageURLContentBlock, + type ImageURLDelta as ImageURLDelta, + type ImageURLDeltaBlock as ImageURLDeltaBlock, + type MessagesAPIMessage as Message, + type MessageContent as MessageContent, + type MessageContentDelta as MessageContentDelta, + type MessageContentPartParam as MessageContentPartParam, + type MessageDeleted as MessageDeleted, + type MessageDelta as MessageDelta, + type MessageDeltaEvent as MessageDeltaEvent, + type RefusalContentBlock as RefusalContentBlock, + type RefusalDeltaBlock as RefusalDeltaBlock, + type Text as Text, + type TextContentBlock as TextContentBlock, + type TextContentBlockParam as TextContentBlockParam, + type TextDelta as TextDelta, + type TextDeltaBlock as TextDeltaBlock, + MessagesPage as MessagesPage, + type MessageCreateParams as MessageCreateParams, + type MessageUpdateParams as MessageUpdateParams, + type MessageListParams as MessageListParams, + }; } diff --git a/src/resources/beta/vector-stores/file-batches.ts b/src/resources/beta/vector-stores/file-batches.ts index 3436d7575..533e6ce03 100644 --- a/src/resources/beta/vector-stores/file-batches.ts +++ b/src/resources/beta/vector-stores/file-batches.ts @@ -6,7 +6,6 @@ import { sleep } from '../../../core'; import { Uploadable } from '../../../core'; import { allSettledWithThrow } from '../../../lib/Util'; import * as Core from '../../../core'; -import * as FileBatchesAPI from './file-batches'; import * as FilesAPI from './files'; import { VectorStoreFilesPage } from './files'; import * as VectorStoresAPI from './vector-stores'; @@ -294,10 +293,12 @@ export interface FileBatchListFilesParams extends CursorPageParams { order?: 'asc' | 'desc'; } -export namespace FileBatches { - export import VectorStoreFileBatch = FileBatchesAPI.VectorStoreFileBatch; - export import FileBatchCreateParams = FileBatchesAPI.FileBatchCreateParams; - export import FileBatchListFilesParams = FileBatchesAPI.FileBatchListFilesParams; +export declare namespace FileBatches { + export { + type VectorStoreFileBatch as VectorStoreFileBatch, + type FileBatchCreateParams as FileBatchCreateParams, + type FileBatchListFilesParams as FileBatchListFilesParams, + }; } export { VectorStoreFilesPage }; diff --git a/src/resources/beta/vector-stores/files.ts b/src/resources/beta/vector-stores/files.ts index f82cd63df..a263a0491 100644 --- a/src/resources/beta/vector-stores/files.ts +++ b/src/resources/beta/vector-stores/files.ts @@ -3,7 +3,6 @@ import { APIResource } from '../../../resource'; import { sleep, Uploadable, isRequestOptions } from '../../../core'; import * as Core from '../../../core'; -import * as FilesAPI from './files'; import * as VectorStoresAPI from './vector-stores'; import { CursorPage, type CursorPageParams } from '../../../pagination'; @@ -286,10 +285,14 @@ export interface FileListParams extends CursorPageParams { order?: 'asc' | 'desc'; } -export namespace Files { - export import VectorStoreFile = FilesAPI.VectorStoreFile; - export import VectorStoreFileDeleted = FilesAPI.VectorStoreFileDeleted; - export import VectorStoreFilesPage = FilesAPI.VectorStoreFilesPage; - export import FileCreateParams = FilesAPI.FileCreateParams; - export import FileListParams = FilesAPI.FileListParams; +Files.VectorStoreFilesPage = VectorStoreFilesPage; + +export declare namespace Files { + export { + type VectorStoreFile as VectorStoreFile, + type VectorStoreFileDeleted as VectorStoreFileDeleted, + VectorStoreFilesPage as VectorStoreFilesPage, + type FileCreateParams as FileCreateParams, + type FileListParams as FileListParams, + }; } diff --git a/src/resources/beta/vector-stores/index.ts b/src/resources/beta/vector-stores/index.ts index f70215f8f..89fc0cde0 100644 --- a/src/resources/beta/vector-stores/index.ts +++ b/src/resources/beta/vector-stores/index.ts @@ -1,32 +1,32 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. export { - AutoFileChunkingStrategyParam, - FileChunkingStrategy, - FileChunkingStrategyParam, - OtherFileChunkingStrategyObject, - StaticFileChunkingStrategy, - StaticFileChunkingStrategyObject, - StaticFileChunkingStrategyParam, - VectorStore, - VectorStoreDeleted, - VectorStoreCreateParams, - VectorStoreUpdateParams, - VectorStoreListParams, - VectorStoresPage, - VectorStores, -} from './vector-stores'; + FileBatches, + type VectorStoreFileBatch, + type FileBatchCreateParams, + type FileBatchListFilesParams, +} from './file-batches'; export { - VectorStoreFile, - VectorStoreFileDeleted, - FileCreateParams, - FileListParams, VectorStoreFilesPage, Files, + type VectorStoreFile, + type VectorStoreFileDeleted, + type FileCreateParams, + type FileListParams, } from './files'; export { - VectorStoreFileBatch, - FileBatchCreateParams, - FileBatchListFilesParams, - FileBatches, -} from './file-batches'; + VectorStoresPage, + VectorStores, + type AutoFileChunkingStrategyParam, + type FileChunkingStrategy, + type FileChunkingStrategyParam, + type OtherFileChunkingStrategyObject, + type StaticFileChunkingStrategy, + type StaticFileChunkingStrategyObject, + type StaticFileChunkingStrategyParam, + type VectorStore, + type VectorStoreDeleted, + type VectorStoreCreateParams, + type VectorStoreUpdateParams, + type VectorStoreListParams, +} from './vector-stores'; diff --git a/src/resources/beta/vector-stores/vector-stores.ts b/src/resources/beta/vector-stores/vector-stores.ts index 3c9aa707d..4d1e83dce 100644 --- a/src/resources/beta/vector-stores/vector-stores.ts +++ b/src/resources/beta/vector-stores/vector-stores.ts @@ -3,9 +3,22 @@ import { APIResource } from '../../../resource'; import { isRequestOptions } from '../../../core'; import * as Core from '../../../core'; -import * as VectorStoresAPI from './vector-stores'; import * as FileBatchesAPI from './file-batches'; +import { + FileBatchCreateParams, + FileBatchListFilesParams, + FileBatches, + VectorStoreFileBatch, +} from './file-batches'; import * as FilesAPI from './files'; +import { + FileCreateParams, + FileListParams, + Files, + VectorStoreFile, + VectorStoreFileDeleted, + VectorStoreFilesPage, +} from './files'; import { CursorPage, type CursorPageParams } from '../../../pagination'; export class VectorStores extends APIResource { @@ -371,28 +384,41 @@ export interface VectorStoreListParams extends CursorPageParams { order?: 'asc' | 'desc'; } -export namespace VectorStores { - export import AutoFileChunkingStrategyParam = VectorStoresAPI.AutoFileChunkingStrategyParam; - export import FileChunkingStrategy = VectorStoresAPI.FileChunkingStrategy; - export import FileChunkingStrategyParam = VectorStoresAPI.FileChunkingStrategyParam; - export import OtherFileChunkingStrategyObject = VectorStoresAPI.OtherFileChunkingStrategyObject; - export import StaticFileChunkingStrategy = VectorStoresAPI.StaticFileChunkingStrategy; - export import StaticFileChunkingStrategyObject = VectorStoresAPI.StaticFileChunkingStrategyObject; - export import StaticFileChunkingStrategyParam = VectorStoresAPI.StaticFileChunkingStrategyParam; - export import VectorStore = VectorStoresAPI.VectorStore; - export import VectorStoreDeleted = VectorStoresAPI.VectorStoreDeleted; - export import VectorStoresPage = VectorStoresAPI.VectorStoresPage; - export import VectorStoreCreateParams = VectorStoresAPI.VectorStoreCreateParams; - export import VectorStoreUpdateParams = VectorStoresAPI.VectorStoreUpdateParams; - export import VectorStoreListParams = VectorStoresAPI.VectorStoreListParams; - export import Files = FilesAPI.Files; - export import VectorStoreFile = FilesAPI.VectorStoreFile; - export import VectorStoreFileDeleted = FilesAPI.VectorStoreFileDeleted; - export import VectorStoreFilesPage = FilesAPI.VectorStoreFilesPage; - export import FileCreateParams = FilesAPI.FileCreateParams; - export import FileListParams = FilesAPI.FileListParams; - export import FileBatches = FileBatchesAPI.FileBatches; - export import VectorStoreFileBatch = FileBatchesAPI.VectorStoreFileBatch; - export import FileBatchCreateParams = FileBatchesAPI.FileBatchCreateParams; - export import FileBatchListFilesParams = FileBatchesAPI.FileBatchListFilesParams; +VectorStores.VectorStoresPage = VectorStoresPage; +VectorStores.Files = Files; +VectorStores.VectorStoreFilesPage = VectorStoreFilesPage; +VectorStores.FileBatches = FileBatches; + +export declare namespace VectorStores { + export { + type AutoFileChunkingStrategyParam as AutoFileChunkingStrategyParam, + type FileChunkingStrategy as FileChunkingStrategy, + type FileChunkingStrategyParam as FileChunkingStrategyParam, + type OtherFileChunkingStrategyObject as OtherFileChunkingStrategyObject, + type StaticFileChunkingStrategy as StaticFileChunkingStrategy, + type StaticFileChunkingStrategyObject as StaticFileChunkingStrategyObject, + type StaticFileChunkingStrategyParam as StaticFileChunkingStrategyParam, + type VectorStore as VectorStore, + type VectorStoreDeleted as VectorStoreDeleted, + VectorStoresPage as VectorStoresPage, + type VectorStoreCreateParams as VectorStoreCreateParams, + type VectorStoreUpdateParams as VectorStoreUpdateParams, + type VectorStoreListParams as VectorStoreListParams, + }; + + export { + Files as Files, + type VectorStoreFile as VectorStoreFile, + type VectorStoreFileDeleted as VectorStoreFileDeleted, + VectorStoreFilesPage as VectorStoreFilesPage, + type FileCreateParams as FileCreateParams, + type FileListParams as FileListParams, + }; + + export { + FileBatches as FileBatches, + type VectorStoreFileBatch as VectorStoreFileBatch, + type FileBatchCreateParams as FileBatchCreateParams, + type FileBatchListFilesParams as FileBatchListFilesParams, + }; } diff --git a/src/resources/chat/chat.ts b/src/resources/chat/chat.ts index 43ef5662c..afe4dd08e 100644 --- a/src/resources/chat/chat.ts +++ b/src/resources/chat/chat.ts @@ -1,8 +1,42 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../../resource'; -import * as ChatAPI from './chat'; import * as CompletionsAPI from './completions'; +import { + ChatCompletion, + ChatCompletionAssistantMessageParam, + ChatCompletionAudio, + ChatCompletionAudioParam, + ChatCompletionChunk, + ChatCompletionContentPart, + ChatCompletionContentPartImage, + ChatCompletionContentPartInputAudio, + ChatCompletionContentPartRefusal, + ChatCompletionContentPartText, + ChatCompletionCreateParams, + ChatCompletionCreateParamsNonStreaming, + ChatCompletionCreateParamsStreaming, + ChatCompletionFunctionCallOption, + ChatCompletionFunctionMessageParam, + ChatCompletionMessage, + ChatCompletionMessageParam, + ChatCompletionMessageToolCall, + ChatCompletionModality, + ChatCompletionNamedToolChoice, + ChatCompletionRole, + ChatCompletionStreamOptions, + ChatCompletionSystemMessageParam, + ChatCompletionTokenLogprob, + ChatCompletionTool, + ChatCompletionToolChoiceOption, + ChatCompletionToolMessageParam, + ChatCompletionUserMessageParam, + CompletionCreateParams, + CompletionCreateParamsNonStreaming, + CompletionCreateParamsStreaming, + Completions, + CreateChatCompletionRequestMessage, +} from './completions'; export class Chat extends APIResource { completions: CompletionsAPI.Completions = new CompletionsAPI.Completions(this._client); @@ -43,42 +77,44 @@ export type ChatModel = | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo-16k-0613'; -export namespace Chat { - export import ChatModel = ChatAPI.ChatModel; - export import Completions = CompletionsAPI.Completions; - export import ChatCompletion = CompletionsAPI.ChatCompletion; - export import ChatCompletionAssistantMessageParam = CompletionsAPI.ChatCompletionAssistantMessageParam; - export import ChatCompletionAudio = CompletionsAPI.ChatCompletionAudio; - export import ChatCompletionAudioParam = CompletionsAPI.ChatCompletionAudioParam; - export import ChatCompletionChunk = CompletionsAPI.ChatCompletionChunk; - export import ChatCompletionContentPart = CompletionsAPI.ChatCompletionContentPart; - export import ChatCompletionContentPartImage = CompletionsAPI.ChatCompletionContentPartImage; - export import ChatCompletionContentPartInputAudio = CompletionsAPI.ChatCompletionContentPartInputAudio; - export import ChatCompletionContentPartRefusal = CompletionsAPI.ChatCompletionContentPartRefusal; - export import ChatCompletionContentPartText = CompletionsAPI.ChatCompletionContentPartText; - export import ChatCompletionFunctionCallOption = CompletionsAPI.ChatCompletionFunctionCallOption; - export import ChatCompletionFunctionMessageParam = CompletionsAPI.ChatCompletionFunctionMessageParam; - export import ChatCompletionMessage = CompletionsAPI.ChatCompletionMessage; - export import ChatCompletionMessageParam = CompletionsAPI.ChatCompletionMessageParam; - export import ChatCompletionMessageToolCall = CompletionsAPI.ChatCompletionMessageToolCall; - export import ChatCompletionModality = CompletionsAPI.ChatCompletionModality; - export import ChatCompletionNamedToolChoice = CompletionsAPI.ChatCompletionNamedToolChoice; - export import ChatCompletionRole = CompletionsAPI.ChatCompletionRole; - export import ChatCompletionStreamOptions = CompletionsAPI.ChatCompletionStreamOptions; - export import ChatCompletionSystemMessageParam = CompletionsAPI.ChatCompletionSystemMessageParam; - export import ChatCompletionTokenLogprob = CompletionsAPI.ChatCompletionTokenLogprob; - export import ChatCompletionTool = CompletionsAPI.ChatCompletionTool; - export import ChatCompletionToolChoiceOption = CompletionsAPI.ChatCompletionToolChoiceOption; - export import ChatCompletionToolMessageParam = CompletionsAPI.ChatCompletionToolMessageParam; - export import ChatCompletionUserMessageParam = CompletionsAPI.ChatCompletionUserMessageParam; - /** - * @deprecated ChatCompletionMessageParam should be used instead - */ - export import CreateChatCompletionRequestMessage = CompletionsAPI.CreateChatCompletionRequestMessage; - export import ChatCompletionCreateParams = CompletionsAPI.ChatCompletionCreateParams; - export import CompletionCreateParams = CompletionsAPI.CompletionCreateParams; - export import ChatCompletionCreateParamsNonStreaming = CompletionsAPI.ChatCompletionCreateParamsNonStreaming; - export import CompletionCreateParamsNonStreaming = CompletionsAPI.CompletionCreateParamsNonStreaming; - export import ChatCompletionCreateParamsStreaming = CompletionsAPI.ChatCompletionCreateParamsStreaming; - export import CompletionCreateParamsStreaming = CompletionsAPI.CompletionCreateParamsStreaming; +Chat.Completions = Completions; + +export declare namespace Chat { + export { type ChatModel as ChatModel }; + + export { + Completions as Completions, + type ChatCompletion as ChatCompletion, + type ChatCompletionAssistantMessageParam as ChatCompletionAssistantMessageParam, + type ChatCompletionAudio as ChatCompletionAudio, + type ChatCompletionAudioParam as ChatCompletionAudioParam, + type ChatCompletionChunk as ChatCompletionChunk, + type ChatCompletionContentPart as ChatCompletionContentPart, + type ChatCompletionContentPartImage as ChatCompletionContentPartImage, + type ChatCompletionContentPartInputAudio as ChatCompletionContentPartInputAudio, + type ChatCompletionContentPartRefusal as ChatCompletionContentPartRefusal, + type ChatCompletionContentPartText as ChatCompletionContentPartText, + type ChatCompletionFunctionCallOption as ChatCompletionFunctionCallOption, + type ChatCompletionFunctionMessageParam as ChatCompletionFunctionMessageParam, + type ChatCompletionMessage as ChatCompletionMessage, + type ChatCompletionMessageParam as ChatCompletionMessageParam, + type ChatCompletionMessageToolCall as ChatCompletionMessageToolCall, + type ChatCompletionModality as ChatCompletionModality, + type ChatCompletionNamedToolChoice as ChatCompletionNamedToolChoice, + type ChatCompletionRole as ChatCompletionRole, + type ChatCompletionStreamOptions as ChatCompletionStreamOptions, + type ChatCompletionSystemMessageParam as ChatCompletionSystemMessageParam, + type ChatCompletionTokenLogprob as ChatCompletionTokenLogprob, + type ChatCompletionTool as ChatCompletionTool, + type ChatCompletionToolChoiceOption as ChatCompletionToolChoiceOption, + type ChatCompletionToolMessageParam as ChatCompletionToolMessageParam, + type ChatCompletionUserMessageParam as ChatCompletionUserMessageParam, + type CreateChatCompletionRequestMessage as CreateChatCompletionRequestMessage, + type ChatCompletionCreateParams as ChatCompletionCreateParams, + type CompletionCreateParams as CompletionCreateParams, + type ChatCompletionCreateParamsNonStreaming as ChatCompletionCreateParamsNonStreaming, + type CompletionCreateParamsNonStreaming as CompletionCreateParamsNonStreaming, + type ChatCompletionCreateParamsStreaming as ChatCompletionCreateParamsStreaming, + type CompletionCreateParamsStreaming as CompletionCreateParamsStreaming, + }; } diff --git a/src/resources/chat/completions.ts b/src/resources/chat/completions.ts index d439e9a25..430e52bb2 100644 --- a/src/resources/chat/completions.ts +++ b/src/resources/chat/completions.ts @@ -1185,40 +1185,39 @@ export interface ChatCompletionCreateParamsStreaming extends ChatCompletionCreat */ export type CompletionCreateParamsStreaming = ChatCompletionCreateParamsStreaming; -export namespace Completions { - export import ChatCompletion = ChatCompletionsAPI.ChatCompletion; - export import ChatCompletionAssistantMessageParam = ChatCompletionsAPI.ChatCompletionAssistantMessageParam; - export import ChatCompletionAudio = ChatCompletionsAPI.ChatCompletionAudio; - export import ChatCompletionAudioParam = ChatCompletionsAPI.ChatCompletionAudioParam; - export import ChatCompletionChunk = ChatCompletionsAPI.ChatCompletionChunk; - export import ChatCompletionContentPart = ChatCompletionsAPI.ChatCompletionContentPart; - export import ChatCompletionContentPartImage = ChatCompletionsAPI.ChatCompletionContentPartImage; - export import ChatCompletionContentPartInputAudio = ChatCompletionsAPI.ChatCompletionContentPartInputAudio; - export import ChatCompletionContentPartRefusal = ChatCompletionsAPI.ChatCompletionContentPartRefusal; - export import ChatCompletionContentPartText = ChatCompletionsAPI.ChatCompletionContentPartText; - export import ChatCompletionFunctionCallOption = ChatCompletionsAPI.ChatCompletionFunctionCallOption; - export import ChatCompletionFunctionMessageParam = ChatCompletionsAPI.ChatCompletionFunctionMessageParam; - export import ChatCompletionMessage = ChatCompletionsAPI.ChatCompletionMessage; - export import ChatCompletionMessageParam = ChatCompletionsAPI.ChatCompletionMessageParam; - export import ChatCompletionMessageToolCall = ChatCompletionsAPI.ChatCompletionMessageToolCall; - export import ChatCompletionModality = ChatCompletionsAPI.ChatCompletionModality; - export import ChatCompletionNamedToolChoice = ChatCompletionsAPI.ChatCompletionNamedToolChoice; - export import ChatCompletionRole = ChatCompletionsAPI.ChatCompletionRole; - export import ChatCompletionStreamOptions = ChatCompletionsAPI.ChatCompletionStreamOptions; - export import ChatCompletionSystemMessageParam = ChatCompletionsAPI.ChatCompletionSystemMessageParam; - export import ChatCompletionTokenLogprob = ChatCompletionsAPI.ChatCompletionTokenLogprob; - export import ChatCompletionTool = ChatCompletionsAPI.ChatCompletionTool; - export import ChatCompletionToolChoiceOption = ChatCompletionsAPI.ChatCompletionToolChoiceOption; - export import ChatCompletionToolMessageParam = ChatCompletionsAPI.ChatCompletionToolMessageParam; - export import ChatCompletionUserMessageParam = ChatCompletionsAPI.ChatCompletionUserMessageParam; - /** - * @deprecated ChatCompletionMessageParam should be used instead - */ - export import CreateChatCompletionRequestMessage = ChatCompletionsAPI.CreateChatCompletionRequestMessage; - export import ChatCompletionCreateParams = ChatCompletionsAPI.ChatCompletionCreateParams; - export import CompletionCreateParams = ChatCompletionsAPI.CompletionCreateParams; - export import ChatCompletionCreateParamsNonStreaming = ChatCompletionsAPI.ChatCompletionCreateParamsNonStreaming; - export import CompletionCreateParamsNonStreaming = ChatCompletionsAPI.CompletionCreateParamsNonStreaming; - export import ChatCompletionCreateParamsStreaming = ChatCompletionsAPI.ChatCompletionCreateParamsStreaming; - export import CompletionCreateParamsStreaming = ChatCompletionsAPI.CompletionCreateParamsStreaming; +export declare namespace Completions { + export { + type ChatCompletion as ChatCompletion, + type ChatCompletionAssistantMessageParam as ChatCompletionAssistantMessageParam, + type ChatCompletionAudio as ChatCompletionAudio, + type ChatCompletionAudioParam as ChatCompletionAudioParam, + type ChatCompletionChunk as ChatCompletionChunk, + type ChatCompletionContentPart as ChatCompletionContentPart, + type ChatCompletionContentPartImage as ChatCompletionContentPartImage, + type ChatCompletionContentPartInputAudio as ChatCompletionContentPartInputAudio, + type ChatCompletionContentPartRefusal as ChatCompletionContentPartRefusal, + type ChatCompletionContentPartText as ChatCompletionContentPartText, + type ChatCompletionFunctionCallOption as ChatCompletionFunctionCallOption, + type ChatCompletionFunctionMessageParam as ChatCompletionFunctionMessageParam, + type ChatCompletionMessage as ChatCompletionMessage, + type ChatCompletionMessageParam as ChatCompletionMessageParam, + type ChatCompletionMessageToolCall as ChatCompletionMessageToolCall, + type ChatCompletionModality as ChatCompletionModality, + type ChatCompletionNamedToolChoice as ChatCompletionNamedToolChoice, + type ChatCompletionRole as ChatCompletionRole, + type ChatCompletionStreamOptions as ChatCompletionStreamOptions, + type ChatCompletionSystemMessageParam as ChatCompletionSystemMessageParam, + type ChatCompletionTokenLogprob as ChatCompletionTokenLogprob, + type ChatCompletionTool as ChatCompletionTool, + type ChatCompletionToolChoiceOption as ChatCompletionToolChoiceOption, + type ChatCompletionToolMessageParam as ChatCompletionToolMessageParam, + type ChatCompletionUserMessageParam as ChatCompletionUserMessageParam, + type CreateChatCompletionRequestMessage as CreateChatCompletionRequestMessage, + type ChatCompletionCreateParams as ChatCompletionCreateParams, + type CompletionCreateParams as CompletionCreateParams, + type ChatCompletionCreateParamsNonStreaming as ChatCompletionCreateParamsNonStreaming, + type CompletionCreateParamsNonStreaming as CompletionCreateParamsNonStreaming, + type ChatCompletionCreateParamsStreaming as ChatCompletionCreateParamsStreaming, + type CompletionCreateParamsStreaming as CompletionCreateParamsStreaming, + }; } diff --git a/src/resources/chat/index.ts b/src/resources/chat/index.ts index 22803e819..d9366bf74 100644 --- a/src/resources/chat/index.ts +++ b/src/resources/chat/index.ts @@ -1,38 +1,38 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +export { Chat, type ChatModel } from './chat'; export { - ChatCompletion, - ChatCompletionAssistantMessageParam, - ChatCompletionAudio, - ChatCompletionAudioParam, - ChatCompletionChunk, - ChatCompletionContentPart, - ChatCompletionContentPartImage, - ChatCompletionContentPartInputAudio, - ChatCompletionContentPartRefusal, - ChatCompletionContentPartText, - ChatCompletionFunctionCallOption, - ChatCompletionFunctionMessageParam, - ChatCompletionMessage, - ChatCompletionMessageParam, - ChatCompletionMessageToolCall, - ChatCompletionModality, - ChatCompletionNamedToolChoice, - ChatCompletionRole, - ChatCompletionStreamOptions, - ChatCompletionSystemMessageParam, - ChatCompletionTokenLogprob, - ChatCompletionTool, - ChatCompletionToolChoiceOption, - ChatCompletionToolMessageParam, - ChatCompletionUserMessageParam, - CreateChatCompletionRequestMessage, - ChatCompletionCreateParams, - CompletionCreateParams, - ChatCompletionCreateParamsNonStreaming, - CompletionCreateParamsNonStreaming, - ChatCompletionCreateParamsStreaming, - CompletionCreateParamsStreaming, Completions, + type ChatCompletion, + type ChatCompletionAssistantMessageParam, + type ChatCompletionAudio, + type ChatCompletionAudioParam, + type ChatCompletionChunk, + type ChatCompletionContentPart, + type ChatCompletionContentPartImage, + type ChatCompletionContentPartInputAudio, + type ChatCompletionContentPartRefusal, + type ChatCompletionContentPartText, + type ChatCompletionFunctionCallOption, + type ChatCompletionFunctionMessageParam, + type ChatCompletionMessage, + type ChatCompletionMessageParam, + type ChatCompletionMessageToolCall, + type ChatCompletionModality, + type ChatCompletionNamedToolChoice, + type ChatCompletionRole, + type ChatCompletionStreamOptions, + type ChatCompletionSystemMessageParam, + type ChatCompletionTokenLogprob, + type ChatCompletionTool, + type ChatCompletionToolChoiceOption, + type ChatCompletionToolMessageParam, + type ChatCompletionUserMessageParam, + type CreateChatCompletionRequestMessage, + type ChatCompletionCreateParams, + type CompletionCreateParams, + type ChatCompletionCreateParamsNonStreaming, + type CompletionCreateParamsNonStreaming, + type ChatCompletionCreateParamsStreaming, + type CompletionCreateParamsStreaming, } from './completions'; -export { ChatModel, Chat } from './chat'; diff --git a/src/resources/completions.ts b/src/resources/completions.ts index 7acd5d13f..94c4581a1 100644 --- a/src/resources/completions.ts +++ b/src/resources/completions.ts @@ -361,11 +361,13 @@ export interface CompletionCreateParamsStreaming extends CompletionCreateParamsB stream: true; } -export namespace Completions { - export import Completion = CompletionsAPI.Completion; - export import CompletionChoice = CompletionsAPI.CompletionChoice; - export import CompletionUsage = CompletionsAPI.CompletionUsage; - export import CompletionCreateParams = CompletionsAPI.CompletionCreateParams; - export import CompletionCreateParamsNonStreaming = CompletionsAPI.CompletionCreateParamsNonStreaming; - export import CompletionCreateParamsStreaming = CompletionsAPI.CompletionCreateParamsStreaming; +export declare namespace Completions { + export { + type Completion as Completion, + type CompletionChoice as CompletionChoice, + type CompletionUsage as CompletionUsage, + type CompletionCreateParams as CompletionCreateParams, + type CompletionCreateParamsNonStreaming as CompletionCreateParamsNonStreaming, + type CompletionCreateParamsStreaming as CompletionCreateParamsStreaming, + }; } diff --git a/src/resources/embeddings.ts b/src/resources/embeddings.ts index 6d8e670a7..e2b35f530 100644 --- a/src/resources/embeddings.ts +++ b/src/resources/embeddings.ts @@ -2,7 +2,6 @@ import { APIResource } from '../resource'; import * as Core from '../core'; -import * as EmbeddingsAPI from './embeddings'; export class Embeddings extends APIResource { /** @@ -120,9 +119,11 @@ export interface EmbeddingCreateParams { user?: string; } -export namespace Embeddings { - export import CreateEmbeddingResponse = EmbeddingsAPI.CreateEmbeddingResponse; - export import Embedding = EmbeddingsAPI.Embedding; - export import EmbeddingModel = EmbeddingsAPI.EmbeddingModel; - export import EmbeddingCreateParams = EmbeddingsAPI.EmbeddingCreateParams; +export declare namespace Embeddings { + export { + type CreateEmbeddingResponse as CreateEmbeddingResponse, + type Embedding as Embedding, + type EmbeddingModel as EmbeddingModel, + type EmbeddingCreateParams as EmbeddingCreateParams, + }; } diff --git a/src/resources/files.ts b/src/resources/files.ts index ba01a9041..dec815a28 100644 --- a/src/resources/files.ts +++ b/src/resources/files.ts @@ -5,7 +5,6 @@ import { isRequestOptions } from '../core'; import { sleep } from '../core'; import { APIConnectionTimeoutError } from '../error'; import * as Core from '../core'; -import * as FilesAPI from './files'; import { Page } from '../pagination'; import { type Response } from '../_shims/index'; @@ -221,12 +220,16 @@ export interface FileListParams { purpose?: string; } -export namespace Files { - export import FileContent = FilesAPI.FileContent; - export import FileDeleted = FilesAPI.FileDeleted; - export import FileObject = FilesAPI.FileObject; - export import FilePurpose = FilesAPI.FilePurpose; - export import FileObjectsPage = FilesAPI.FileObjectsPage; - export import FileCreateParams = FilesAPI.FileCreateParams; - export import FileListParams = FilesAPI.FileListParams; +Files.FileObjectsPage = FileObjectsPage; + +export declare namespace Files { + export { + type FileContent as FileContent, + type FileDeleted as FileDeleted, + type FileObject as FileObject, + type FilePurpose as FilePurpose, + FileObjectsPage as FileObjectsPage, + type FileCreateParams as FileCreateParams, + type FileListParams as FileListParams, + }; } diff --git a/src/resources/fine-tuning/fine-tuning.ts b/src/resources/fine-tuning/fine-tuning.ts index b1ba34ecf..df013c8ec 100644 --- a/src/resources/fine-tuning/fine-tuning.ts +++ b/src/resources/fine-tuning/fine-tuning.ts @@ -2,21 +2,40 @@ import { APIResource } from '../../resource'; import * as JobsAPI from './jobs/jobs'; +import { + FineTuningJob, + FineTuningJobEvent, + FineTuningJobEventsPage, + FineTuningJobIntegration, + FineTuningJobWandbIntegration, + FineTuningJobWandbIntegrationObject, + FineTuningJobsPage, + JobCreateParams, + JobListEventsParams, + JobListParams, + Jobs, +} from './jobs/jobs'; export class FineTuning extends APIResource { jobs: JobsAPI.Jobs = new JobsAPI.Jobs(this._client); } -export namespace FineTuning { - export import Jobs = JobsAPI.Jobs; - export import FineTuningJob = JobsAPI.FineTuningJob; - export import FineTuningJobEvent = JobsAPI.FineTuningJobEvent; - export import FineTuningJobIntegration = JobsAPI.FineTuningJobIntegration; - export import FineTuningJobWandbIntegration = JobsAPI.FineTuningJobWandbIntegration; - export import FineTuningJobWandbIntegrationObject = JobsAPI.FineTuningJobWandbIntegrationObject; - export import FineTuningJobsPage = JobsAPI.FineTuningJobsPage; - export import FineTuningJobEventsPage = JobsAPI.FineTuningJobEventsPage; - export import JobCreateParams = JobsAPI.JobCreateParams; - export import JobListParams = JobsAPI.JobListParams; - export import JobListEventsParams = JobsAPI.JobListEventsParams; +FineTuning.Jobs = Jobs; +FineTuning.FineTuningJobsPage = FineTuningJobsPage; +FineTuning.FineTuningJobEventsPage = FineTuningJobEventsPage; + +export declare namespace FineTuning { + export { + Jobs as Jobs, + type FineTuningJob as FineTuningJob, + type FineTuningJobEvent as FineTuningJobEvent, + type FineTuningJobIntegration as FineTuningJobIntegration, + type FineTuningJobWandbIntegration as FineTuningJobWandbIntegration, + type FineTuningJobWandbIntegrationObject as FineTuningJobWandbIntegrationObject, + FineTuningJobsPage as FineTuningJobsPage, + FineTuningJobEventsPage as FineTuningJobEventsPage, + type JobCreateParams as JobCreateParams, + type JobListParams as JobListParams, + type JobListEventsParams as JobListEventsParams, + }; } diff --git a/src/resources/fine-tuning/index.ts b/src/resources/fine-tuning/index.ts index 1d8739a0a..4954406b8 100644 --- a/src/resources/fine-tuning/index.ts +++ b/src/resources/fine-tuning/index.ts @@ -2,15 +2,15 @@ export { FineTuning } from './fine-tuning'; export { - FineTuningJob, - FineTuningJobEvent, - FineTuningJobIntegration, - FineTuningJobWandbIntegration, - FineTuningJobWandbIntegrationObject, - JobCreateParams, - JobListParams, - JobListEventsParams, FineTuningJobsPage, FineTuningJobEventsPage, Jobs, + type FineTuningJob, + type FineTuningJobEvent, + type FineTuningJobIntegration, + type FineTuningJobWandbIntegration, + type FineTuningJobWandbIntegrationObject, + type JobCreateParams, + type JobListParams, + type JobListEventsParams, } from './jobs/index'; diff --git a/src/resources/fine-tuning/jobs/checkpoints.ts b/src/resources/fine-tuning/jobs/checkpoints.ts index 02896b26d..b3018ac5f 100644 --- a/src/resources/fine-tuning/jobs/checkpoints.ts +++ b/src/resources/fine-tuning/jobs/checkpoints.ts @@ -3,7 +3,6 @@ import { APIResource } from '../../../resource'; import { isRequestOptions } from '../../../core'; import * as Core from '../../../core'; -import * as CheckpointsAPI from './checkpoints'; import { CursorPage, type CursorPageParams } from '../../../pagination'; export class Checkpoints extends APIResource { @@ -101,8 +100,12 @@ export namespace FineTuningJobCheckpoint { export interface CheckpointListParams extends CursorPageParams {} -export namespace Checkpoints { - export import FineTuningJobCheckpoint = CheckpointsAPI.FineTuningJobCheckpoint; - export import FineTuningJobCheckpointsPage = CheckpointsAPI.FineTuningJobCheckpointsPage; - export import CheckpointListParams = CheckpointsAPI.CheckpointListParams; +Checkpoints.FineTuningJobCheckpointsPage = FineTuningJobCheckpointsPage; + +export declare namespace Checkpoints { + export { + type FineTuningJobCheckpoint as FineTuningJobCheckpoint, + FineTuningJobCheckpointsPage as FineTuningJobCheckpointsPage, + type CheckpointListParams as CheckpointListParams, + }; } diff --git a/src/resources/fine-tuning/jobs/index.ts b/src/resources/fine-tuning/jobs/index.ts index 275c776e9..7a05b48b2 100644 --- a/src/resources/fine-tuning/jobs/index.ts +++ b/src/resources/fine-tuning/jobs/index.ts @@ -1,21 +1,21 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. export { - FineTuningJob, - FineTuningJobEvent, - FineTuningJobIntegration, - FineTuningJobWandbIntegration, - FineTuningJobWandbIntegrationObject, - JobCreateParams, - JobListParams, - JobListEventsParams, + FineTuningJobCheckpointsPage, + Checkpoints, + type FineTuningJobCheckpoint, + type CheckpointListParams, +} from './checkpoints'; +export { FineTuningJobsPage, FineTuningJobEventsPage, Jobs, + type FineTuningJob, + type FineTuningJobEvent, + type FineTuningJobIntegration, + type FineTuningJobWandbIntegration, + type FineTuningJobWandbIntegrationObject, + type JobCreateParams, + type JobListParams, + type JobListEventsParams, } from './jobs'; -export { - FineTuningJobCheckpoint, - CheckpointListParams, - FineTuningJobCheckpointsPage, - Checkpoints, -} from './checkpoints'; diff --git a/src/resources/fine-tuning/jobs/jobs.ts b/src/resources/fine-tuning/jobs/jobs.ts index 54b5c4e6a..275fad869 100644 --- a/src/resources/fine-tuning/jobs/jobs.ts +++ b/src/resources/fine-tuning/jobs/jobs.ts @@ -3,8 +3,13 @@ import { APIResource } from '../../../resource'; import { isRequestOptions } from '../../../core'; import * as Core from '../../../core'; -import * as JobsAPI from './jobs'; import * as CheckpointsAPI from './checkpoints'; +import { + CheckpointListParams, + Checkpoints, + FineTuningJobCheckpoint, + FineTuningJobCheckpointsPage, +} from './checkpoints'; import { CursorPage, type CursorPageParams } from '../../../pagination'; export class Jobs extends APIResource { @@ -445,19 +450,29 @@ export interface JobListParams extends CursorPageParams {} export interface JobListEventsParams extends CursorPageParams {} -export namespace Jobs { - export import FineTuningJob = JobsAPI.FineTuningJob; - export import FineTuningJobEvent = JobsAPI.FineTuningJobEvent; - export import FineTuningJobIntegration = JobsAPI.FineTuningJobIntegration; - export import FineTuningJobWandbIntegration = JobsAPI.FineTuningJobWandbIntegration; - export import FineTuningJobWandbIntegrationObject = JobsAPI.FineTuningJobWandbIntegrationObject; - export import FineTuningJobsPage = JobsAPI.FineTuningJobsPage; - export import FineTuningJobEventsPage = JobsAPI.FineTuningJobEventsPage; - export import JobCreateParams = JobsAPI.JobCreateParams; - export import JobListParams = JobsAPI.JobListParams; - export import JobListEventsParams = JobsAPI.JobListEventsParams; - export import Checkpoints = CheckpointsAPI.Checkpoints; - export import FineTuningJobCheckpoint = CheckpointsAPI.FineTuningJobCheckpoint; - export import FineTuningJobCheckpointsPage = CheckpointsAPI.FineTuningJobCheckpointsPage; - export import CheckpointListParams = CheckpointsAPI.CheckpointListParams; +Jobs.FineTuningJobsPage = FineTuningJobsPage; +Jobs.FineTuningJobEventsPage = FineTuningJobEventsPage; +Jobs.Checkpoints = Checkpoints; +Jobs.FineTuningJobCheckpointsPage = FineTuningJobCheckpointsPage; + +export declare namespace Jobs { + export { + type FineTuningJob as FineTuningJob, + type FineTuningJobEvent as FineTuningJobEvent, + type FineTuningJobIntegration as FineTuningJobIntegration, + type FineTuningJobWandbIntegration as FineTuningJobWandbIntegration, + type FineTuningJobWandbIntegrationObject as FineTuningJobWandbIntegrationObject, + FineTuningJobsPage as FineTuningJobsPage, + FineTuningJobEventsPage as FineTuningJobEventsPage, + type JobCreateParams as JobCreateParams, + type JobListParams as JobListParams, + type JobListEventsParams as JobListEventsParams, + }; + + export { + Checkpoints as Checkpoints, + type FineTuningJobCheckpoint as FineTuningJobCheckpoint, + FineTuningJobCheckpointsPage as FineTuningJobCheckpointsPage, + type CheckpointListParams as CheckpointListParams, + }; } diff --git a/src/resources/images.ts b/src/resources/images.ts index fdd0b8881..f4d59b941 100644 --- a/src/resources/images.ts +++ b/src/resources/images.ts @@ -2,7 +2,6 @@ import { APIResource } from '../resource'; import * as Core from '../core'; -import * as ImagesAPI from './images'; export class Images extends APIResource { /** @@ -207,11 +206,13 @@ export interface ImageGenerateParams { user?: string; } -export namespace Images { - export import Image = ImagesAPI.Image; - export import ImageModel = ImagesAPI.ImageModel; - export import ImagesResponse = ImagesAPI.ImagesResponse; - export import ImageCreateVariationParams = ImagesAPI.ImageCreateVariationParams; - export import ImageEditParams = ImagesAPI.ImageEditParams; - export import ImageGenerateParams = ImagesAPI.ImageGenerateParams; +export declare namespace Images { + export { + type Image as Image, + type ImageModel as ImageModel, + type ImagesResponse as ImagesResponse, + type ImageCreateVariationParams as ImageCreateVariationParams, + type ImageEditParams as ImageEditParams, + type ImageGenerateParams as ImageGenerateParams, + }; } diff --git a/src/resources/index.ts b/src/resources/index.ts index 15c5db77f..ad0302357 100644 --- a/src/resources/index.ts +++ b/src/resources/index.ts @@ -2,62 +2,62 @@ export * from './chat/index'; export * from './shared'; -export { AudioModel, AudioResponseFormat, Audio } from './audio/audio'; +export { Audio, type AudioModel, type AudioResponseFormat } from './audio/audio'; export { - Batch, - BatchError, - BatchRequestCounts, - BatchCreateParams, - BatchListParams, BatchesPage, Batches, + type Batch, + type BatchError, + type BatchRequestCounts, + type BatchCreateParams, + type BatchListParams, } from './batches'; export { Beta } from './beta/beta'; export { - Completion, - CompletionChoice, - CompletionUsage, - CompletionCreateParams, - CompletionCreateParamsNonStreaming, - CompletionCreateParamsStreaming, Completions, + type Completion, + type CompletionChoice, + type CompletionUsage, + type CompletionCreateParams, + type CompletionCreateParamsNonStreaming, + type CompletionCreateParamsStreaming, } from './completions'; export { - CreateEmbeddingResponse, - Embedding, - EmbeddingModel, - EmbeddingCreateParams, Embeddings, + type CreateEmbeddingResponse, + type Embedding, + type EmbeddingModel, + type EmbeddingCreateParams, } from './embeddings'; export { - FileContent, - FileDeleted, - FileObject, - FilePurpose, - FileCreateParams, - FileListParams, FileObjectsPage, Files, + type FileContent, + type FileDeleted, + type FileObject, + type FilePurpose, + type FileCreateParams, + type FileListParams, } from './files'; export { FineTuning } from './fine-tuning/fine-tuning'; export { - Image, - ImageModel, - ImagesResponse, - ImageCreateVariationParams, - ImageEditParams, - ImageGenerateParams, Images, + type Image, + type ImageModel, + type ImagesResponse, + type ImageCreateVariationParams, + type ImageEditParams, + type ImageGenerateParams, } from './images'; -export { Model, ModelDeleted, ModelsPage, Models } from './models'; +export { ModelsPage, Models, type Model, type ModelDeleted } from './models'; export { - Moderation, - ModerationImageURLInput, - ModerationModel, - ModerationMultiModalInput, - ModerationTextInput, - ModerationCreateResponse, - ModerationCreateParams, Moderations, + type Moderation, + type ModerationImageURLInput, + type ModerationModel, + type ModerationMultiModalInput, + type ModerationTextInput, + type ModerationCreateResponse, + type ModerationCreateParams, } from './moderations'; -export { Upload, UploadCreateParams, UploadCompleteParams, Uploads } from './uploads/uploads'; +export { Uploads, type Upload, type UploadCreateParams, type UploadCompleteParams } from './uploads/uploads'; diff --git a/src/resources/models.ts b/src/resources/models.ts index 178915747..6d8cd5296 100644 --- a/src/resources/models.ts +++ b/src/resources/models.ts @@ -2,7 +2,6 @@ import { APIResource } from '../resource'; import * as Core from '../core'; -import * as ModelsAPI from './models'; import { Page } from '../pagination'; export class Models extends APIResource { @@ -69,8 +68,8 @@ export interface ModelDeleted { object: string; } -export namespace Models { - export import Model = ModelsAPI.Model; - export import ModelDeleted = ModelsAPI.ModelDeleted; - export import ModelsPage = ModelsAPI.ModelsPage; +Models.ModelsPage = ModelsPage; + +export declare namespace Models { + export { type Model as Model, type ModelDeleted as ModelDeleted, ModelsPage as ModelsPage }; } diff --git a/src/resources/moderations.ts b/src/resources/moderations.ts index ba800509e..cdde12a62 100644 --- a/src/resources/moderations.ts +++ b/src/resources/moderations.ts @@ -2,7 +2,6 @@ import { APIResource } from '../resource'; import * as Core from '../core'; -import * as ModerationsAPI from './moderations'; export class Moderations extends APIResource { /** @@ -357,12 +356,14 @@ export interface ModerationCreateParams { model?: (string & {}) | ModerationModel; } -export namespace Moderations { - export import Moderation = ModerationsAPI.Moderation; - export import ModerationImageURLInput = ModerationsAPI.ModerationImageURLInput; - export import ModerationModel = ModerationsAPI.ModerationModel; - export import ModerationMultiModalInput = ModerationsAPI.ModerationMultiModalInput; - export import ModerationTextInput = ModerationsAPI.ModerationTextInput; - export import ModerationCreateResponse = ModerationsAPI.ModerationCreateResponse; - export import ModerationCreateParams = ModerationsAPI.ModerationCreateParams; +export declare namespace Moderations { + export { + type Moderation as Moderation, + type ModerationImageURLInput as ModerationImageURLInput, + type ModerationModel as ModerationModel, + type ModerationMultiModalInput as ModerationMultiModalInput, + type ModerationTextInput as ModerationTextInput, + type ModerationCreateResponse as ModerationCreateResponse, + type ModerationCreateParams as ModerationCreateParams, + }; } diff --git a/src/resources/uploads/index.ts b/src/resources/uploads/index.ts index 1a353d312..200d3567e 100644 --- a/src/resources/uploads/index.ts +++ b/src/resources/uploads/index.ts @@ -1,4 +1,4 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { Upload, UploadCreateParams, UploadCompleteParams, Uploads } from './uploads'; -export { UploadPart, PartCreateParams, Parts } from './parts'; +export { Parts, type UploadPart, type PartCreateParams } from './parts'; +export { Uploads, type Upload, type UploadCreateParams, type UploadCompleteParams } from './uploads'; diff --git a/src/resources/uploads/parts.ts b/src/resources/uploads/parts.ts index a4af5c606..9b54c99e6 100644 --- a/src/resources/uploads/parts.ts +++ b/src/resources/uploads/parts.ts @@ -2,7 +2,6 @@ import { APIResource } from '../../resource'; import * as Core from '../../core'; -import * as PartsAPI from './parts'; export class Parts extends APIResource { /** @@ -62,7 +61,6 @@ export interface PartCreateParams { data: Core.Uploadable; } -export namespace Parts { - export import UploadPart = PartsAPI.UploadPart; - export import PartCreateParams = PartsAPI.PartCreateParams; +export declare namespace Parts { + export { type UploadPart as UploadPart, type PartCreateParams as PartCreateParams }; } diff --git a/src/resources/uploads/uploads.ts b/src/resources/uploads/uploads.ts index 1c3ed708d..78fa3a7b5 100644 --- a/src/resources/uploads/uploads.ts +++ b/src/resources/uploads/uploads.ts @@ -2,9 +2,9 @@ import { APIResource } from '../../resource'; import * as Core from '../../core'; -import * as UploadsAPI from './uploads'; import * as FilesAPI from '../files'; import * as PartsAPI from './parts'; +import { PartCreateParams, Parts, UploadPart } from './parts'; export class Uploads extends APIResource { parts: PartsAPI.Parts = new PartsAPI.Parts(this._client); @@ -159,11 +159,14 @@ export interface UploadCompleteParams { md5?: string; } -export namespace Uploads { - export import Upload = UploadsAPI.Upload; - export import UploadCreateParams = UploadsAPI.UploadCreateParams; - export import UploadCompleteParams = UploadsAPI.UploadCompleteParams; - export import Parts = PartsAPI.Parts; - export import UploadPart = PartsAPI.UploadPart; - export import PartCreateParams = PartsAPI.PartCreateParams; +Uploads.Parts = Parts; + +export declare namespace Uploads { + export { + type Upload as Upload, + type UploadCreateParams as UploadCreateParams, + type UploadCompleteParams as UploadCompleteParams, + }; + + export { Parts as Parts, type UploadPart as UploadPart, type PartCreateParams as PartCreateParams }; } diff --git a/tsconfig.json b/tsconfig.json index 5f99085fc..09a702fca 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,7 +11,7 @@ "paths": { "openai/_shims/auto/*": ["src/_shims/auto/*-node"], "openai/*": ["src/*"], - "openai": ["src/index.ts"], + "openai": ["src/index.ts"] }, "noEmit": true,