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',
|
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
|
||||||
|
|
Loading…
Reference in a new issue