web/types/api: add trailing commas

This commit is contained in:
wukko 2024-06-19 15:28:36 +06:00
parent 8ec4a528ef
commit 068af6a965
No known key found for this signature in database
GPG key ID: 3E30B3F26C7B4AA2

View file

@ -3,19 +3,21 @@ enum CobaltResponseType {
RateLimit = 'rate-limit', RateLimit = 'rate-limit',
Picker = 'picker', Picker = 'picker',
Redirect = 'redirect', Redirect = 'redirect',
Stream = 'stream' Stream = 'stream',
} }
type CobaltErrorResponse = { type CobaltErrorResponse = {
status: CobaltResponseType.Error | CobaltResponseType.RateLimit, status: CobaltResponseType.Error | CobaltResponseType.RateLimit,
text: string text: string,
}; };
type CobaltPartialURLResponse = { url: string } type CobaltPartialURLResponse = {
url: string,
}
type CobaltPartialImagesPickerResponse = { type CobaltPartialImagesPickerResponse = {
pickerType: 'images', pickerType: 'images',
picker: CobaltPartialURLResponse[] picker: CobaltPartialURLResponse[],
} }
type CobaltPartialVariousPickerResponse = { type CobaltPartialVariousPickerResponse = {
@ -23,7 +25,7 @@ type CobaltPartialVariousPickerResponse = {
picker: { picker: {
type: 'photo' | 'video', type: 'photo' | 'video',
url: string, url: string,
thumb: string thumb: string,
}[]; }[];
} }
@ -33,11 +35,11 @@ type CobaltPickerResponse = {
} & (CobaltPartialImagesPickerResponse | CobaltPartialVariousPickerResponse); } & (CobaltPartialImagesPickerResponse | CobaltPartialVariousPickerResponse);
type CobaltRedirectResponse = { type CobaltRedirectResponse = {
status: CobaltResponseType.Redirect status: CobaltResponseType.Redirect,
} & CobaltPartialURLResponse; } & CobaltPartialURLResponse;
type CobaltStreamResponse = { type CobaltStreamResponse = {
status: CobaltResponseType.Stream status: CobaltResponseType.Stream,
} & CobaltPartialURLResponse; } & CobaltPartialURLResponse;
export type CobaltAPIResponse = CobaltErrorResponse export type CobaltAPIResponse = CobaltErrorResponse