From a459c06aa9ad1c9a103038429abae3433d640461 Mon Sep 17 00:00:00 2001 From: Stainless Bot Date: Wed, 11 Oct 2023 20:28:40 +0000 Subject: [PATCH] fix: fix namespace exports regression --- src/index.ts | 80 ++++++++++++------------ src/resources/audio/audio.ts | 8 +-- src/resources/audio/transcriptions.ts | 4 +- src/resources/audio/translations.ts | 4 +- src/resources/chat/chat.ts | 24 +++---- src/resources/chat/completions.ts | 25 ++++---- src/resources/completions.ts | 12 ++-- src/resources/edits.ts | 4 +- src/resources/embeddings.ts | 6 +- src/resources/files.ts | 8 +-- src/resources/fine-tunes.ts | 14 ++--- src/resources/fine-tuning/fine-tuning.ts | 10 +-- src/resources/fine-tuning/jobs.ts | 10 +-- src/resources/images.ts | 10 +-- src/resources/models.ts | 4 +- src/resources/moderations.ts | 6 +- 16 files changed, 114 insertions(+), 115 deletions(-) diff --git a/src/index.ts b/src/index.ts index daa24ff51..05f41b882 100644 --- a/src/index.ts +++ b/src/index.ts @@ -213,69 +213,69 @@ export namespace OpenAI { export import CursorPageResponse = Pagination.CursorPageResponse; export import Completions = API.Completions; - export type Completion = API.Completion; - export type CompletionChoice = API.CompletionChoice; - export type CompletionUsage = API.CompletionUsage; - export type CompletionCreateParams = API.CompletionCreateParams; - export type CompletionCreateParamsNonStreaming = API.CompletionCreateParamsNonStreaming; - export type CompletionCreateParamsStreaming = API.CompletionCreateParamsStreaming; + 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 type ChatCompletion = API.ChatCompletion; - export type ChatCompletionChunk = API.ChatCompletionChunk; - export type ChatCompletionMessage = API.ChatCompletionMessage; - export type ChatCompletionMessageParam = API.ChatCompletionMessageParam; - export type ChatCompletionRole = API.ChatCompletionRole; - export type ChatCompletionCreateParams = API.ChatCompletionCreateParams; - export type ChatCompletionCreateParamsNonStreaming = API.ChatCompletionCreateParamsNonStreaming; - export type ChatCompletionCreateParamsStreaming = API.ChatCompletionCreateParamsStreaming; + export import ChatCompletion = API.ChatCompletion; + export import ChatCompletionChunk = API.ChatCompletionChunk; + export import ChatCompletionMessage = API.ChatCompletionMessage; + export import ChatCompletionMessageParam = API.ChatCompletionMessageParam; + export import ChatCompletionRole = API.ChatCompletionRole; + export import ChatCompletionCreateParams = API.ChatCompletionCreateParams; + export import ChatCompletionCreateParamsNonStreaming = API.ChatCompletionCreateParamsNonStreaming; + export import ChatCompletionCreateParamsStreaming = API.ChatCompletionCreateParamsStreaming; export import Edits = API.Edits; - export type Edit = API.Edit; - export type EditCreateParams = API.EditCreateParams; + export import Edit = API.Edit; + export import EditCreateParams = API.EditCreateParams; export import Embeddings = API.Embeddings; - export type CreateEmbeddingResponse = API.CreateEmbeddingResponse; - export type Embedding = API.Embedding; - export type EmbeddingCreateParams = API.EmbeddingCreateParams; + export import CreateEmbeddingResponse = API.CreateEmbeddingResponse; + export import Embedding = API.Embedding; + export import EmbeddingCreateParams = API.EmbeddingCreateParams; export import Files = API.Files; - export type FileContent = API.FileContent; - export type FileDeleted = API.FileDeleted; - export type FileObject = API.FileObject; + export import FileContent = API.FileContent; + export import FileDeleted = API.FileDeleted; + export import FileObject = API.FileObject; export import FileObjectsPage = API.FileObjectsPage; - export type FileCreateParams = API.FileCreateParams; + export import FileCreateParams = API.FileCreateParams; export import Images = API.Images; - export type Image = API.Image; - export type ImagesResponse = API.ImagesResponse; - export type ImageCreateVariationParams = API.ImageCreateVariationParams; - export type ImageEditParams = API.ImageEditParams; - export type ImageGenerateParams = API.ImageGenerateParams; + export import Image = API.Image; + 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 Moderations = API.Moderations; - export type Moderation = API.Moderation; - export type ModerationCreateResponse = API.ModerationCreateResponse; - export type ModerationCreateParams = API.ModerationCreateParams; + export import Moderation = API.Moderation; + export import ModerationCreateResponse = API.ModerationCreateResponse; + export import ModerationCreateParams = API.ModerationCreateParams; export import Models = API.Models; - export type Model = API.Model; - export type ModelDeleted = API.ModelDeleted; + export import Model = API.Model; + export import ModelDeleted = API.ModelDeleted; export import ModelsPage = API.ModelsPage; export import FineTuning = API.FineTuning; export import FineTunes = API.FineTunes; - export type FineTune = API.FineTune; - export type FineTuneEvent = API.FineTuneEvent; - export type FineTuneEventsListResponse = API.FineTuneEventsListResponse; + export import FineTune = API.FineTune; + export import FineTuneEvent = API.FineTuneEvent; + export import FineTuneEventsListResponse = API.FineTuneEventsListResponse; export import FineTunesPage = API.FineTunesPage; - export type FineTuneCreateParams = API.FineTuneCreateParams; - export type FineTuneListEventsParams = API.FineTuneListEventsParams; - export type FineTuneListEventsParamsNonStreaming = API.FineTuneListEventsParamsNonStreaming; - export type FineTuneListEventsParamsStreaming = API.FineTuneListEventsParamsStreaming; + export import FineTuneCreateParams = API.FineTuneCreateParams; + export import FineTuneListEventsParams = API.FineTuneListEventsParams; + export import FineTuneListEventsParamsNonStreaming = API.FineTuneListEventsParamsNonStreaming; + export import FineTuneListEventsParamsStreaming = API.FineTuneListEventsParamsStreaming; } export default OpenAI; diff --git a/src/resources/audio/audio.ts b/src/resources/audio/audio.ts index 0514c0d99..74b1c841c 100644 --- a/src/resources/audio/audio.ts +++ b/src/resources/audio/audio.ts @@ -11,9 +11,9 @@ export class Audio extends APIResource { export namespace Audio { export import Transcriptions = TranscriptionsAPI.Transcriptions; - export type Transcription = TranscriptionsAPI.Transcription; - export type TranscriptionCreateParams = TranscriptionsAPI.TranscriptionCreateParams; + export import Transcription = TranscriptionsAPI.Transcription; + export import TranscriptionCreateParams = TranscriptionsAPI.TranscriptionCreateParams; export import Translations = TranslationsAPI.Translations; - export type Translation = TranslationsAPI.Translation; - export type TranslationCreateParams = TranslationsAPI.TranslationCreateParams; + export import Translation = TranslationsAPI.Translation; + export import TranslationCreateParams = TranslationsAPI.TranslationCreateParams; } diff --git a/src/resources/audio/transcriptions.ts b/src/resources/audio/transcriptions.ts index d34663d24..253ae33d5 100644 --- a/src/resources/audio/transcriptions.ts +++ b/src/resources/audio/transcriptions.ts @@ -62,6 +62,6 @@ export interface TranscriptionCreateParams { } export namespace Transcriptions { - export type Transcription = TranscriptionsAPI.Transcription; - export type TranscriptionCreateParams = TranscriptionsAPI.TranscriptionCreateParams; + export import Transcription = TranscriptionsAPI.Transcription; + export import TranscriptionCreateParams = TranscriptionsAPI.TranscriptionCreateParams; } diff --git a/src/resources/audio/translations.ts b/src/resources/audio/translations.ts index 52e3cf3a5..5ac8d7d88 100644 --- a/src/resources/audio/translations.ts +++ b/src/resources/audio/translations.ts @@ -55,6 +55,6 @@ export interface TranslationCreateParams { } export namespace Translations { - export type Translation = TranslationsAPI.Translation; - export type TranslationCreateParams = TranslationsAPI.TranslationCreateParams; + export import Translation = TranslationsAPI.Translation; + export import TranslationCreateParams = TranslationsAPI.TranslationCreateParams; } diff --git a/src/resources/chat/chat.ts b/src/resources/chat/chat.ts index 4532dd3f0..ac510d7bd 100644 --- a/src/resources/chat/chat.ts +++ b/src/resources/chat/chat.ts @@ -9,16 +9,16 @@ export class Chat extends APIResource { export namespace Chat { export import Completions = CompletionsAPI.Completions; - export type ChatCompletion = CompletionsAPI.ChatCompletion; - export type ChatCompletionChunk = CompletionsAPI.ChatCompletionChunk; - export type ChatCompletionMessage = CompletionsAPI.ChatCompletionMessage; - export type ChatCompletionMessageParam = CompletionsAPI.ChatCompletionMessageParam; - export type ChatCompletionRole = CompletionsAPI.ChatCompletionRole; - export type CreateChatCompletionRequestMessage = CompletionsAPI.CreateChatCompletionRequestMessage; - export type ChatCompletionCreateParams = CompletionsAPI.ChatCompletionCreateParams; - export type CompletionCreateParams = CompletionsAPI.CompletionCreateParams; - export type ChatCompletionCreateParamsNonStreaming = CompletionsAPI.ChatCompletionCreateParamsNonStreaming; - export type CompletionCreateParamsNonStreaming = CompletionsAPI.CompletionCreateParamsNonStreaming; - export type ChatCompletionCreateParamsStreaming = CompletionsAPI.ChatCompletionCreateParamsStreaming; - export type CompletionCreateParamsStreaming = CompletionsAPI.CompletionCreateParamsStreaming; + export import ChatCompletion = CompletionsAPI.ChatCompletion; + export import ChatCompletionChunk = CompletionsAPI.ChatCompletionChunk; + export import ChatCompletionMessage = CompletionsAPI.ChatCompletionMessage; + export import ChatCompletionMessageParam = CompletionsAPI.ChatCompletionMessageParam; + export import ChatCompletionRole = CompletionsAPI.ChatCompletionRole; + 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; } diff --git a/src/resources/chat/completions.ts b/src/resources/chat/completions.ts index 3ea6e3c77..d513b0f20 100644 --- a/src/resources/chat/completions.ts +++ b/src/resources/chat/completions.ts @@ -504,17 +504,16 @@ export interface ChatCompletionCreateParamsStreaming extends ChatCompletionCreat export type CompletionCreateParamsStreaming = ChatCompletionCreateParamsStreaming; export namespace Completions { - export type ChatCompletion = ChatCompletionsAPI.ChatCompletion; - export type ChatCompletionChunk = ChatCompletionsAPI.ChatCompletionChunk; - export type ChatCompletionMessage = ChatCompletionsAPI.ChatCompletionMessage; - export type ChatCompletionMessageParam = ChatCompletionsAPI.ChatCompletionMessageParam; - export type ChatCompletionRole = ChatCompletionsAPI.ChatCompletionRole; - export type CreateChatCompletionRequestMessage = ChatCompletionsAPI.CreateChatCompletionRequestMessage; - export type ChatCompletionCreateParams = ChatCompletionsAPI.ChatCompletionCreateParams; - export type CompletionCreateParams = ChatCompletionsAPI.CompletionCreateParams; - export type ChatCompletionCreateParamsNonStreaming = - ChatCompletionsAPI.ChatCompletionCreateParamsNonStreaming; - export type CompletionCreateParamsNonStreaming = ChatCompletionsAPI.CompletionCreateParamsNonStreaming; - export type ChatCompletionCreateParamsStreaming = ChatCompletionsAPI.ChatCompletionCreateParamsStreaming; - export type CompletionCreateParamsStreaming = ChatCompletionsAPI.CompletionCreateParamsStreaming; + export import ChatCompletion = ChatCompletionsAPI.ChatCompletion; + export import ChatCompletionChunk = ChatCompletionsAPI.ChatCompletionChunk; + export import ChatCompletionMessage = ChatCompletionsAPI.ChatCompletionMessage; + export import ChatCompletionMessageParam = ChatCompletionsAPI.ChatCompletionMessageParam; + export import ChatCompletionRole = ChatCompletionsAPI.ChatCompletionRole; + 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; } diff --git a/src/resources/completions.ts b/src/resources/completions.ts index 014607b0f..9ec1469dd 100644 --- a/src/resources/completions.ts +++ b/src/resources/completions.ts @@ -305,10 +305,10 @@ export interface CompletionCreateParamsStreaming extends CompletionCreateParamsB } export namespace Completions { - export type Completion = CompletionsAPI.Completion; - export type CompletionChoice = CompletionsAPI.CompletionChoice; - export type CompletionUsage = CompletionsAPI.CompletionUsage; - export type CompletionCreateParams = CompletionsAPI.CompletionCreateParams; - export type CompletionCreateParamsNonStreaming = CompletionsAPI.CompletionCreateParamsNonStreaming; - export type CompletionCreateParamsStreaming = CompletionsAPI.CompletionCreateParamsStreaming; + 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; } diff --git a/src/resources/edits.ts b/src/resources/edits.ts index a53251c3c..300f7a7aa 100644 --- a/src/resources/edits.ts +++ b/src/resources/edits.ts @@ -104,6 +104,6 @@ export interface EditCreateParams { } export namespace Edits { - export type Edit = EditsAPI.Edit; - export type EditCreateParams = EditsAPI.EditCreateParams; + export import Edit = EditsAPI.Edit; + export import EditCreateParams = EditsAPI.EditCreateParams; } diff --git a/src/resources/embeddings.ts b/src/resources/embeddings.ts index 4ddaf1363..9be063552 100644 --- a/src/resources/embeddings.ts +++ b/src/resources/embeddings.ts @@ -106,7 +106,7 @@ export interface EmbeddingCreateParams { } export namespace Embeddings { - export type CreateEmbeddingResponse = EmbeddingsAPI.CreateEmbeddingResponse; - export type Embedding = EmbeddingsAPI.Embedding; - export type EmbeddingCreateParams = EmbeddingsAPI.EmbeddingCreateParams; + export import CreateEmbeddingResponse = EmbeddingsAPI.CreateEmbeddingResponse; + export import Embedding = EmbeddingsAPI.Embedding; + export import EmbeddingCreateParams = EmbeddingsAPI.EmbeddingCreateParams; } diff --git a/src/resources/files.ts b/src/resources/files.ts index 785151815..bd684179a 100644 --- a/src/resources/files.ts +++ b/src/resources/files.ts @@ -159,9 +159,9 @@ export interface FileCreateParams { } export namespace Files { - export type FileContent = FilesAPI.FileContent; - export type FileDeleted = FilesAPI.FileDeleted; - export type FileObject = FilesAPI.FileObject; + export import FileContent = FilesAPI.FileContent; + export import FileDeleted = FilesAPI.FileDeleted; + export import FileObject = FilesAPI.FileObject; export import FileObjectsPage = FilesAPI.FileObjectsPage; - export type FileCreateParams = FilesAPI.FileCreateParams; + export import FileCreateParams = FilesAPI.FileCreateParams; } diff --git a/src/resources/fine-tunes.ts b/src/resources/fine-tunes.ts index 34fbdc725..99f90d17f 100644 --- a/src/resources/fine-tunes.ts +++ b/src/resources/fine-tunes.ts @@ -412,12 +412,12 @@ export interface FineTuneListEventsParamsStreaming extends FineTuneListEventsPar } export namespace FineTunes { - export type FineTune = FineTunesAPI.FineTune; - export type FineTuneEvent = FineTunesAPI.FineTuneEvent; - export type FineTuneEventsListResponse = FineTunesAPI.FineTuneEventsListResponse; + export import FineTune = FineTunesAPI.FineTune; + export import FineTuneEvent = FineTunesAPI.FineTuneEvent; + export import FineTuneEventsListResponse = FineTunesAPI.FineTuneEventsListResponse; export import FineTunesPage = FineTunesAPI.FineTunesPage; - export type FineTuneCreateParams = FineTunesAPI.FineTuneCreateParams; - export type FineTuneListEventsParams = FineTunesAPI.FineTuneListEventsParams; - export type FineTuneListEventsParamsNonStreaming = FineTunesAPI.FineTuneListEventsParamsNonStreaming; - export type FineTuneListEventsParamsStreaming = FineTunesAPI.FineTuneListEventsParamsStreaming; + export import FineTuneCreateParams = FineTunesAPI.FineTuneCreateParams; + export import FineTuneListEventsParams = FineTunesAPI.FineTuneListEventsParams; + export import FineTuneListEventsParamsNonStreaming = FineTunesAPI.FineTuneListEventsParamsNonStreaming; + export import FineTuneListEventsParamsStreaming = FineTunesAPI.FineTuneListEventsParamsStreaming; } diff --git a/src/resources/fine-tuning/fine-tuning.ts b/src/resources/fine-tuning/fine-tuning.ts index 3ac498965..3c0a5a852 100644 --- a/src/resources/fine-tuning/fine-tuning.ts +++ b/src/resources/fine-tuning/fine-tuning.ts @@ -9,11 +9,11 @@ export class FineTuning extends APIResource { export namespace FineTuning { export import Jobs = JobsAPI.Jobs; - export type FineTuningJob = JobsAPI.FineTuningJob; - export type FineTuningJobEvent = JobsAPI.FineTuningJobEvent; + export import FineTuningJob = JobsAPI.FineTuningJob; + export import FineTuningJobEvent = JobsAPI.FineTuningJobEvent; export import FineTuningJobsPage = JobsAPI.FineTuningJobsPage; export import FineTuningJobEventsPage = JobsAPI.FineTuningJobEventsPage; - export type JobCreateParams = JobsAPI.JobCreateParams; - export type JobListParams = JobsAPI.JobListParams; - export type JobListEventsParams = JobsAPI.JobListEventsParams; + export import JobCreateParams = JobsAPI.JobCreateParams; + export import JobListParams = JobsAPI.JobListParams; + export import JobListEventsParams = JobsAPI.JobListEventsParams; } diff --git a/src/resources/fine-tuning/jobs.ts b/src/resources/fine-tuning/jobs.ts index 6230d7e5e..d616ce452 100644 --- a/src/resources/fine-tuning/jobs.ts +++ b/src/resources/fine-tuning/jobs.ts @@ -296,11 +296,11 @@ export interface JobListParams extends CursorPageParams {} export interface JobListEventsParams extends CursorPageParams {} export namespace Jobs { - export type FineTuningJob = JobsAPI.FineTuningJob; - export type FineTuningJobEvent = JobsAPI.FineTuningJobEvent; + export import FineTuningJob = JobsAPI.FineTuningJob; + export import FineTuningJobEvent = JobsAPI.FineTuningJobEvent; export import FineTuningJobsPage = JobsAPI.FineTuningJobsPage; export import FineTuningJobEventsPage = JobsAPI.FineTuningJobEventsPage; - export type JobCreateParams = JobsAPI.JobCreateParams; - export type JobListParams = JobsAPI.JobListParams; - export type JobListEventsParams = JobsAPI.JobListEventsParams; + export import JobCreateParams = JobsAPI.JobCreateParams; + export import JobListParams = JobsAPI.JobListParams; + export import JobListEventsParams = JobsAPI.JobListEventsParams; } diff --git a/src/resources/images.ts b/src/resources/images.ts index d4b346f81..019371b98 100644 --- a/src/resources/images.ts +++ b/src/resources/images.ts @@ -163,9 +163,9 @@ export interface ImageGenerateParams { } export namespace Images { - export type Image = ImagesAPI.Image; - export type ImagesResponse = ImagesAPI.ImagesResponse; - export type ImageCreateVariationParams = ImagesAPI.ImageCreateVariationParams; - export type ImageEditParams = ImagesAPI.ImageEditParams; - export type ImageGenerateParams = ImagesAPI.ImageGenerateParams; + export import Image = ImagesAPI.Image; + export import ImagesResponse = ImagesAPI.ImagesResponse; + export import ImageCreateVariationParams = ImagesAPI.ImageCreateVariationParams; + export import ImageEditParams = ImagesAPI.ImageEditParams; + export import ImageGenerateParams = ImagesAPI.ImageGenerateParams; } diff --git a/src/resources/models.ts b/src/resources/models.ts index dd01a5d0d..e1906db5d 100644 --- a/src/resources/models.ts +++ b/src/resources/models.ts @@ -70,7 +70,7 @@ export interface ModelDeleted { } export namespace Models { - export type Model = ModelsAPI.Model; - export type ModelDeleted = ModelsAPI.ModelDeleted; + export import Model = ModelsAPI.Model; + export import ModelDeleted = ModelsAPI.ModelDeleted; export import ModelsPage = ModelsAPI.ModelsPage; } diff --git a/src/resources/moderations.ts b/src/resources/moderations.ts index 7a3f372af..21603ceea 100644 --- a/src/resources/moderations.ts +++ b/src/resources/moderations.ts @@ -210,7 +210,7 @@ export interface ModerationCreateParams { } export namespace Moderations { - export type Moderation = ModerationsAPI.Moderation; - export type ModerationCreateResponse = ModerationsAPI.ModerationCreateResponse; - export type ModerationCreateParams = ModerationsAPI.ModerationCreateParams; + export import Moderation = ModerationsAPI.Moderation; + export import ModerationCreateResponse = ModerationsAPI.ModerationCreateResponse; + export import ModerationCreateParams = ModerationsAPI.ModerationCreateParams; }