From a80c7b7a5a738af34079a2b2854423f249de7471 Mon Sep 17 00:00:00 2001 From: dumbmoron Date: Wed, 11 Sep 2024 21:02:50 +0000 Subject: [PATCH] api-client: rename CobaltAPIResponse type to CobaltResponse --- packages/api-client/src/internal/base-api.ts | 6 +++--- packages/api-client/src/types/response.ts | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/api-client/src/internal/base-api.ts b/packages/api-client/src/internal/base-api.ts index 321f5487..ef2c8960 100644 --- a/packages/api-client/src/internal/base-api.ts +++ b/packages/api-client/src/internal/base-api.ts @@ -1,6 +1,6 @@ -import { CobaltResponseType, type CobaltAPIResponse } from "../types/response"; -import type { CobaltRequest } from "../types/request"; +import { CobaltResponseType, type CobaltResponse } from "../types/response"; import { CobaltReachabilityError } from "../types/errors"; +import type { CobaltRequest } from "../types/request"; export default class BaseCobaltAPI { #baseURL: string; @@ -22,7 +22,7 @@ export default class BaseCobaltAPI { headers['user-agent'] = this.#userAgent; } - const response: CobaltAPIResponse = await fetch(this.#baseURL, { + const response: CobaltResponse = await fetch(this.#baseURL, { method: 'POST', redirect: 'manual', signal: AbortSignal.timeout(10000), diff --git a/packages/api-client/src/types/response.ts b/packages/api-client/src/types/response.ts index cebf0060..8bf23d2c 100644 --- a/packages/api-client/src/types/response.ts +++ b/packages/api-client/src/types/response.ts @@ -65,7 +65,7 @@ export type CobaltServerInfo = { export type CobaltSessionResponse = CobaltSession | CobaltErrorResponse; export type CobaltServerInfoResponse = CobaltServerInfo | CobaltErrorResponse; -export type CobaltAPIResponse = CobaltErrorResponse - | CobaltPickerResponse - | CobaltRedirectResponse - | CobaltTunnelResponse; +export type CobaltResponse = CobaltErrorResponse + | CobaltPickerResponse + | CobaltRedirectResponse + | CobaltTunnelResponse;