Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

fix: fix namespace exports regression #366

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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 40 additions & 40 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
8 changes: 4 additions & 4 deletions src/resources/audio/audio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
4 changes: 2 additions & 2 deletions src/resources/audio/transcriptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
4 changes: 2 additions & 2 deletions src/resources/audio/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
24 changes: 12 additions & 12 deletions src/resources/chat/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
25 changes: 12 additions & 13 deletions src/resources/chat/completions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
12 changes: 6 additions & 6 deletions src/resources/completions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
4 changes: 2 additions & 2 deletions src/resources/edits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
6 changes: 3 additions & 3 deletions src/resources/embeddings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
8 changes: 4 additions & 4 deletions src/resources/files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
14 changes: 7 additions & 7 deletions src/resources/fine-tunes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
10 changes: 5 additions & 5 deletions src/resources/fine-tuning/fine-tuning.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
10 changes: 5 additions & 5 deletions src/resources/fine-tuning/jobs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
10 changes: 5 additions & 5 deletions src/resources/images.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
4 changes: 2 additions & 2 deletions src/resources/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
6 changes: 3 additions & 3 deletions src/resources/moderations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}