mirror of
https://github.com/wukko/cobalt.git
synced 2024-11-15 12:50:01 +00:00
web/types/api: add trailing commas
This commit is contained in:
parent
8ec4a528ef
commit
068af6a965
1 changed files with 9 additions and 7 deletions
|
@ -3,19 +3,21 @@ enum CobaltResponseType {
|
|||
RateLimit = 'rate-limit',
|
||||
Picker = 'picker',
|
||||
Redirect = 'redirect',
|
||||
Stream = 'stream'
|
||||
Stream = 'stream',
|
||||
}
|
||||
|
||||
type CobaltErrorResponse = {
|
||||
status: CobaltResponseType.Error | CobaltResponseType.RateLimit,
|
||||
text: string
|
||||
text: string,
|
||||
};
|
||||
|
||||
type CobaltPartialURLResponse = { url: string }
|
||||
type CobaltPartialURLResponse = {
|
||||
url: string,
|
||||
}
|
||||
|
||||
type CobaltPartialImagesPickerResponse = {
|
||||
pickerType: 'images',
|
||||
picker: CobaltPartialURLResponse[]
|
||||
picker: CobaltPartialURLResponse[],
|
||||
}
|
||||
|
||||
type CobaltPartialVariousPickerResponse = {
|
||||
|
@ -23,7 +25,7 @@ type CobaltPartialVariousPickerResponse = {
|
|||
picker: {
|
||||
type: 'photo' | 'video',
|
||||
url: string,
|
||||
thumb: string
|
||||
thumb: string,
|
||||
}[];
|
||||
}
|
||||
|
||||
|
@ -33,11 +35,11 @@ type CobaltPickerResponse = {
|
|||
} & (CobaltPartialImagesPickerResponse | CobaltPartialVariousPickerResponse);
|
||||
|
||||
type CobaltRedirectResponse = {
|
||||
status: CobaltResponseType.Redirect
|
||||
status: CobaltResponseType.Redirect,
|
||||
} & CobaltPartialURLResponse;
|
||||
|
||||
type CobaltStreamResponse = {
|
||||
status: CobaltResponseType.Stream
|
||||
status: CobaltResponseType.Stream,
|
||||
} & CobaltPartialURLResponse;
|
||||
|
||||
export type CobaltAPIResponse = CobaltErrorResponse
|
||||
|
|
Loading…
Reference in a new issue