Skip to content

Commit de1c3c3

Browse files
authored
Merge pull request #7 from maxholman/qol20240720
hotfix: void -> never
2 parents 4091538 + fbbd2b8 commit de1c3c3

File tree

12 files changed

+112
-117
lines changed

12 files changed

+112
-117
lines changed

__tests__/fixtures/openai/commands.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* WARN: Do not edit directly.
55
*
6-
* Generated on 2024-07-20T04:09:19.082Z
6+
* Generated on 2024-07-20T05:47:37.293Z
77
*
88
*/
99
/** eslint-disable max-classes */
@@ -271,7 +271,7 @@ export class CreateImageCommand extends Command<
271271
* @summary Creates an edited or extended image given an original image and a prompt.
272272
*/
273273
export class CreateImageEditCommand extends Command<
274-
void,
274+
never,
275275
ImagesResponse,
276276
CreateImageEditCommandBody
277277
> {
@@ -289,7 +289,7 @@ export class CreateImageEditCommand extends Command<
289289
* @summary Creates a variation of a given image.
290290
*/
291291
export class CreateImageVariationCommand extends Command<
292-
void,
292+
never,
293293
ImagesResponse,
294294
CreateImageVariationCommandBody
295295
> {
@@ -326,7 +326,7 @@ export class CreateEmbeddingCommand extends Command<
326326
*/
327327
export class CreateSpeechCommand extends Command<
328328
CreateSpeechCommandInput,
329-
void,
329+
never,
330330
CreateSpeechCommandBody
331331
> {
332332
public override method = 'post' as const;
@@ -343,7 +343,7 @@ export class CreateSpeechCommand extends Command<
343343
* @summary Transcribes audio into the input language.
344344
*/
345345
export class CreateTranscriptionCommand extends Command<
346-
void,
346+
never,
347347
CreateTranscriptionResponse,
348348
CreateTranscriptionCommandBody
349349
> {
@@ -361,7 +361,7 @@ export class CreateTranscriptionCommand extends Command<
361361
* @summary Translates audio into English.
362362
*/
363363
export class CreateTranslationCommand extends Command<
364-
void,
364+
never,
365365
CreateTranslationResponse,
366366
CreateTranslationCommandBody
367367
> {
@@ -406,7 +406,7 @@ export class ListFilesCommand extends Command<
406406
* storage limits.
407407
*/
408408
export class CreateFileCommand extends Command<
409-
void,
409+
never,
410410
OpenAiFile,
411411
CreateFileCommandBody
412412
> {
@@ -461,7 +461,7 @@ export class RetrieveFileCommand extends Command<
461461
*/
462462
export class DownloadFileCommand extends Command<
463463
DownloadFileCommandInput,
464-
void,
464+
never,
465465
DownloadFileCommandBody
466466
> {
467467
public override method = 'get' as const;
@@ -605,7 +605,7 @@ export class CreateFineTuneCommand extends Command<
605605
* @deprecated
606606
*/
607607
export class ListFineTunesCommand extends Command<
608-
void,
608+
never,
609609
ListFineTunesResponse,
610610
ListFineTunesCommandBody
611611
> {
@@ -684,7 +684,7 @@ export class ListFineTuneEventsCommand extends Command<
684684
* each one such as the owner and availability.
685685
*/
686686
export class ListModelsCommand extends Command<
687-
void,
687+
never,
688688
ListModelsResponse,
689689
ListModelsCommandBody
690690
> {

__tests__/fixtures/openai/main.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* WARN: Do not edit directly.
55
*
6-
* Generated on 2024-07-20T04:09:19.082Z
6+
* Generated on 2024-07-20T05:47:37.293Z
77
*
88
*/
99
import {
@@ -198,11 +198,11 @@ type AllOutputs =
198198
| MessageFileObject
199199
| MessageObject
200200
| Model
201+
| never
201202
| OpenAiFile
202203
| RunObject
203204
| RunStepObject
204-
| ThreadObject
205-
| void;
205+
| ThreadObject;
206206

207207
export class OpenAiApiRestClient extends RestServiceClient<
208208
AllInputs,

__tests__/fixtures/openai/types.ts

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* WARN: Do not edit directly.
55
*
6-
* Generated on 2024-07-20T04:09:19.082Z
6+
* Generated on 2024-07-20T05:47:37.293Z
77
*
88
*/
99
import type { Jsonifiable, Jsonify } from 'type-fest';
@@ -1904,40 +1904,40 @@ export type CreateEditCommandInput = CreateEditRequest;
19041904
export type CreateEditCommandBody = CreateEditRequest;
19051905
export type CreateImageCommandInput = CreateImageRequest;
19061906
export type CreateImageCommandBody = CreateImageRequest;
1907-
export type CreateImageEditCommandInput = void;
1908-
export type CreateImageEditCommandBody = void;
1909-
export type CreateImageVariationCommandInput = void;
1910-
export type CreateImageVariationCommandBody = void;
1907+
export type CreateImageEditCommandInput = never;
1908+
export type CreateImageEditCommandBody = never;
1909+
export type CreateImageVariationCommandInput = never;
1910+
export type CreateImageVariationCommandBody = never;
19111911
export type CreateEmbeddingCommandInput = CreateEmbeddingRequest;
19121912
export type CreateEmbeddingCommandBody = CreateEmbeddingRequest;
19131913
export type CreateSpeechCommandInput = CreateSpeechRequest;
19141914
export type CreateSpeechCommandBody = CreateSpeechRequest;
1915-
export type CreateTranscriptionCommandInput = void;
1916-
export type CreateTranscriptionCommandBody = void;
1917-
export type CreateTranslationCommandInput = void;
1918-
export type CreateTranslationCommandBody = void;
1915+
export type CreateTranscriptionCommandInput = never;
1916+
export type CreateTranscriptionCommandBody = never;
1917+
export type CreateTranslationCommandInput = never;
1918+
export type CreateTranslationCommandBody = never;
19191919
export type ListFilesCommandQuery = {
19201920
purpose: string;
19211921
};
19221922
export type ListFilesCommandInput = ListFilesCommandQuery;
1923-
export type ListFilesCommandBody = void;
1924-
export type CreateFileCommandInput = void;
1925-
export type CreateFileCommandBody = void;
1923+
export type ListFilesCommandBody = never;
1924+
export type CreateFileCommandInput = never;
1925+
export type CreateFileCommandBody = never;
19261926
export type DeleteFileCommandParams = {
19271927
fileId: string;
19281928
};
19291929
export type DeleteFileCommandInput = DeleteFileCommandParams;
1930-
export type DeleteFileCommandBody = void;
1930+
export type DeleteFileCommandBody = never;
19311931
export type RetrieveFileCommandParams = {
19321932
fileId: string;
19331933
};
19341934
export type RetrieveFileCommandInput = RetrieveFileCommandParams;
1935-
export type RetrieveFileCommandBody = void;
1935+
export type RetrieveFileCommandBody = never;
19361936
export type DownloadFileCommandParams = {
19371937
fileId: string;
19381938
};
19391939
export type DownloadFileCommandInput = DownloadFileCommandParams;
1940-
export type DownloadFileCommandBody = void;
1940+
export type DownloadFileCommandBody = never;
19411941
export type CreateFineTuningJobCommandInput = CreateFineTuningJobRequest;
19421942
export type CreateFineTuningJobCommandBody = CreateFineTuningJobRequest;
19431943
export type ListPaginatedFineTuningJobsCommandQuery = {
@@ -1946,13 +1946,13 @@ export type ListPaginatedFineTuningJobsCommandQuery = {
19461946
};
19471947
export type ListPaginatedFineTuningJobsCommandInput =
19481948
ListPaginatedFineTuningJobsCommandQuery;
1949-
export type ListPaginatedFineTuningJobsCommandBody = void;
1949+
export type ListPaginatedFineTuningJobsCommandBody = never;
19501950
export type RetrieveFineTuningJobCommandParams = {
19511951
fineTuningJobId: string;
19521952
};
19531953
export type RetrieveFineTuningJobCommandInput =
19541954
RetrieveFineTuningJobCommandParams;
1955-
export type RetrieveFineTuningJobCommandBody = void;
1955+
export type RetrieveFineTuningJobCommandBody = never;
19561956
export type ListFineTuningEventsCommandQuery = {
19571957
after: string;
19581958
limit: `${number}`;
@@ -1962,26 +1962,26 @@ export type ListFineTuningEventsCommandParams = {
19621962
};
19631963
export type ListFineTuningEventsCommandInput =
19641964
ListFineTuningEventsCommandQuery & ListFineTuningEventsCommandParams;
1965-
export type ListFineTuningEventsCommandBody = void;
1965+
export type ListFineTuningEventsCommandBody = never;
19661966
export type CancelFineTuningJobCommandParams = {
19671967
fineTuningJobId: string;
19681968
};
19691969
export type CancelFineTuningJobCommandInput = CancelFineTuningJobCommandParams;
1970-
export type CancelFineTuningJobCommandBody = void;
1970+
export type CancelFineTuningJobCommandBody = never;
19711971
export type CreateFineTuneCommandInput = CreateFineTuneRequest;
19721972
export type CreateFineTuneCommandBody = CreateFineTuneRequest;
1973-
export type ListFineTunesCommandInput = void;
1974-
export type ListFineTunesCommandBody = void;
1973+
export type ListFineTunesCommandInput = never;
1974+
export type ListFineTunesCommandBody = never;
19751975
export type RetrieveFineTuneCommandParams = {
19761976
fineTuneId: string;
19771977
};
19781978
export type RetrieveFineTuneCommandInput = RetrieveFineTuneCommandParams;
1979-
export type RetrieveFineTuneCommandBody = void;
1979+
export type RetrieveFineTuneCommandBody = never;
19801980
export type CancelFineTuneCommandParams = {
19811981
fineTuneId: string;
19821982
};
19831983
export type CancelFineTuneCommandInput = CancelFineTuneCommandParams;
1984-
export type CancelFineTuneCommandBody = void;
1984+
export type CancelFineTuneCommandBody = never;
19851985
export type ListFineTuneEventsCommandQuery = {
19861986
stream: 'true' | 'false';
19871987
};
@@ -1990,19 +1990,19 @@ export type ListFineTuneEventsCommandParams = {
19901990
};
19911991
export type ListFineTuneEventsCommandInput = ListFineTuneEventsCommandQuery &
19921992
ListFineTuneEventsCommandParams;
1993-
export type ListFineTuneEventsCommandBody = void;
1994-
export type ListModelsCommandInput = void;
1995-
export type ListModelsCommandBody = void;
1993+
export type ListFineTuneEventsCommandBody = never;
1994+
export type ListModelsCommandInput = never;
1995+
export type ListModelsCommandBody = never;
19961996
export type RetrieveModelCommandParams = {
19971997
model: string;
19981998
};
19991999
export type RetrieveModelCommandInput = RetrieveModelCommandParams;
2000-
export type RetrieveModelCommandBody = void;
2000+
export type RetrieveModelCommandBody = never;
20012001
export type DeleteModelCommandParams = {
20022002
model: string;
20032003
};
20042004
export type DeleteModelCommandInput = DeleteModelCommandParams;
2005-
export type DeleteModelCommandBody = void;
2005+
export type DeleteModelCommandBody = never;
20062006
export type CreateModerationCommandInput = CreateModerationRequest;
20072007
export type CreateModerationCommandBody = CreateModerationRequest;
20082008
export type ListAssistantsCommandQuery = {
@@ -2012,14 +2012,14 @@ export type ListAssistantsCommandQuery = {
20122012
before: string;
20132013
};
20142014
export type ListAssistantsCommandInput = ListAssistantsCommandQuery;
2015-
export type ListAssistantsCommandBody = void;
2015+
export type ListAssistantsCommandBody = never;
20162016
export type CreateAssistantCommandInput = CreateAssistantRequest;
20172017
export type CreateAssistantCommandBody = CreateAssistantRequest;
20182018
export type GetAssistantCommandParams = {
20192019
assistantId: string;
20202020
};
20212021
export type GetAssistantCommandInput = GetAssistantCommandParams;
2022-
export type GetAssistantCommandBody = void;
2022+
export type GetAssistantCommandBody = never;
20232023
export type ModifyAssistantCommandParams = {
20242024
assistantId: string;
20252025
};
@@ -2030,14 +2030,14 @@ export type DeleteAssistantCommandParams = {
20302030
assistantId: string;
20312031
};
20322032
export type DeleteAssistantCommandInput = DeleteAssistantCommandParams;
2033-
export type DeleteAssistantCommandBody = void;
2033+
export type DeleteAssistantCommandBody = never;
20342034
export type CreateThreadCommandInput = CreateThreadRequest;
20352035
export type CreateThreadCommandBody = CreateThreadRequest;
20362036
export type GetThreadCommandParams = {
20372037
threadId: string;
20382038
};
20392039
export type GetThreadCommandInput = GetThreadCommandParams;
2040-
export type GetThreadCommandBody = void;
2040+
export type GetThreadCommandBody = never;
20412041
export type ModifyThreadCommandParams = {
20422042
threadId: string;
20432043
};
@@ -2048,7 +2048,7 @@ export type DeleteThreadCommandParams = {
20482048
threadId: string;
20492049
};
20502050
export type DeleteThreadCommandInput = DeleteThreadCommandParams;
2051-
export type DeleteThreadCommandBody = void;
2051+
export type DeleteThreadCommandBody = never;
20522052
export type ListMessagesCommandQuery = {
20532053
limit: `${number}`;
20542054
order: 'asc' | 'desc';
@@ -2060,7 +2060,7 @@ export type ListMessagesCommandParams = {
20602060
};
20612061
export type ListMessagesCommandInput = ListMessagesCommandQuery &
20622062
ListMessagesCommandParams;
2063-
export type ListMessagesCommandBody = void;
2063+
export type ListMessagesCommandBody = never;
20642064
export type CreateMessageCommandParams = {
20652065
threadId: string;
20662066
};
@@ -2072,7 +2072,7 @@ export type GetMessageCommandParams = {
20722072
messageId: string;
20732073
};
20742074
export type GetMessageCommandInput = GetMessageCommandParams;
2075-
export type GetMessageCommandBody = void;
2075+
export type GetMessageCommandBody = never;
20762076
export type ModifyMessageCommandParams = {
20772077
threadId: string;
20782078
messageId: string;
@@ -2092,7 +2092,7 @@ export type ListRunsCommandParams = {
20922092
threadId: string;
20932093
};
20942094
export type ListRunsCommandInput = ListRunsCommandQuery & ListRunsCommandParams;
2095-
export type ListRunsCommandBody = void;
2095+
export type ListRunsCommandBody = never;
20962096
export type CreateRunCommandParams = {
20972097
threadId: string;
20982098
};
@@ -2103,7 +2103,7 @@ export type GetRunCommandParams = {
21032103
runId: string;
21042104
};
21052105
export type GetRunCommandInput = GetRunCommandParams;
2106-
export type GetRunCommandBody = void;
2106+
export type GetRunCommandBody = never;
21072107
export type ModifyRunCommandParams = {
21082108
threadId: string;
21092109
runId: string;
@@ -2122,7 +2122,7 @@ export type CancelRunCommandParams = {
21222122
runId: string;
21232123
};
21242124
export type CancelRunCommandInput = CancelRunCommandParams;
2125-
export type CancelRunCommandBody = void;
2125+
export type CancelRunCommandBody = never;
21262126
export type ListRunStepsCommandQuery = {
21272127
limit: `${number}`;
21282128
order: 'asc' | 'desc';
@@ -2135,14 +2135,14 @@ export type ListRunStepsCommandParams = {
21352135
};
21362136
export type ListRunStepsCommandInput = ListRunStepsCommandQuery &
21372137
ListRunStepsCommandParams;
2138-
export type ListRunStepsCommandBody = void;
2138+
export type ListRunStepsCommandBody = never;
21392139
export type GetRunStepCommandParams = {
21402140
threadId: string;
21412141
runId: string;
21422142
stepId: string;
21432143
};
21442144
export type GetRunStepCommandInput = GetRunStepCommandParams;
2145-
export type GetRunStepCommandBody = void;
2145+
export type GetRunStepCommandBody = never;
21462146
export type ListAssistantFilesCommandQuery = {
21472147
limit: `${number}`;
21482148
order: 'asc' | 'desc';
@@ -2154,7 +2154,7 @@ export type ListAssistantFilesCommandParams = {
21542154
};
21552155
export type ListAssistantFilesCommandInput = ListAssistantFilesCommandQuery &
21562156
ListAssistantFilesCommandParams;
2157-
export type ListAssistantFilesCommandBody = void;
2157+
export type ListAssistantFilesCommandBody = never;
21582158
export type CreateAssistantFileCommandParams = {
21592159
assistantId: string;
21602160
};
@@ -2166,13 +2166,13 @@ export type GetAssistantFileCommandParams = {
21662166
fileId: string;
21672167
};
21682168
export type GetAssistantFileCommandInput = GetAssistantFileCommandParams;
2169-
export type GetAssistantFileCommandBody = void;
2169+
export type GetAssistantFileCommandBody = never;
21702170
export type DeleteAssistantFileCommandParams = {
21712171
assistantId: string;
21722172
fileId: string;
21732173
};
21742174
export type DeleteAssistantFileCommandInput = DeleteAssistantFileCommandParams;
2175-
export type DeleteAssistantFileCommandBody = void;
2175+
export type DeleteAssistantFileCommandBody = never;
21762176
export type ListMessageFilesCommandQuery = {
21772177
limit: `${number}`;
21782178
order: 'asc' | 'desc';
@@ -2185,11 +2185,11 @@ export type ListMessageFilesCommandParams = {
21852185
};
21862186
export type ListMessageFilesCommandInput = ListMessageFilesCommandQuery &
21872187
ListMessageFilesCommandParams;
2188-
export type ListMessageFilesCommandBody = void;
2188+
export type ListMessageFilesCommandBody = never;
21892189
export type GetMessageFileCommandParams = {
21902190
threadId: string;
21912191
messageId: string;
21922192
fileId: string;
21932193
};
21942194
export type GetMessageFileCommandInput = GetMessageFileCommandParams;
2195-
export type GetMessageFileCommandBody = void;
2195+
export type GetMessageFileCommandBody = never;

0 commit comments

Comments
 (0)