api-client: rename CobaltAPIResponse type to CobaltResponse
This commit is contained in:
parent
afe9917169
commit
a80c7b7a5a
2 changed files with 7 additions and 7 deletions
|
@ -1,6 +1,6 @@
|
||||||
import { CobaltResponseType, type CobaltAPIResponse } from "../types/response";
|
import { CobaltResponseType, type CobaltResponse } from "../types/response";
|
||||||
import type { CobaltRequest } from "../types/request";
|
|
||||||
import { CobaltReachabilityError } from "../types/errors";
|
import { CobaltReachabilityError } from "../types/errors";
|
||||||
|
import type { CobaltRequest } from "../types/request";
|
||||||
|
|
||||||
export default class BaseCobaltAPI {
|
export default class BaseCobaltAPI {
|
||||||
#baseURL: string;
|
#baseURL: string;
|
||||||
|
@ -22,7 +22,7 @@ export default class BaseCobaltAPI {
|
||||||
headers['user-agent'] = this.#userAgent;
|
headers['user-agent'] = this.#userAgent;
|
||||||
}
|
}
|
||||||
|
|
||||||
const response: CobaltAPIResponse = await fetch(this.#baseURL, {
|
const response: CobaltResponse = await fetch(this.#baseURL, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
redirect: 'manual',
|
redirect: 'manual',
|
||||||
signal: AbortSignal.timeout(10000),
|
signal: AbortSignal.timeout(10000),
|
||||||
|
|
|
@ -65,7 +65,7 @@ export type CobaltServerInfo = {
|
||||||
export type CobaltSessionResponse = CobaltSession | CobaltErrorResponse;
|
export type CobaltSessionResponse = CobaltSession | CobaltErrorResponse;
|
||||||
export type CobaltServerInfoResponse = CobaltServerInfo | CobaltErrorResponse;
|
export type CobaltServerInfoResponse = CobaltServerInfo | CobaltErrorResponse;
|
||||||
|
|
||||||
export type CobaltAPIResponse = CobaltErrorResponse
|
export type CobaltResponse = CobaltErrorResponse
|
||||||
| CobaltPickerResponse
|
| CobaltPickerResponse
|
||||||
| CobaltRedirectResponse
|
| CobaltRedirectResponse
|
||||||
| CobaltTunnelResponse;
|
| CobaltTunnelResponse;
|
||||||
|
|
Loading…
Reference in a new issue