From ac1d51aecaf3d6418a540fadd0f98a2353069803 Mon Sep 17 00:00:00 2001 From: Ehab Younes Date: Mon, 8 Dec 2025 23:02:36 +0300 Subject: [PATCH] fix: export site public API to be used in the VS Code extension (#21165) --- site/src/api/api.ts | 3 ++- site/src/api/errors.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/site/src/api/api.ts b/site/src/api/api.ts index c4fbce26ae..d2a3e2c91f 100644 --- a/site/src/api/api.ts +++ b/site/src/api/api.ts @@ -2827,7 +2827,8 @@ interface ClientApi extends ApiMethods { getAxiosInstance: () => AxiosInstance; } -class Api extends ApiMethods implements ClientApi { +/** @public Exported for use by external consumers (e.g., VS Code extension). */ +export class Api extends ApiMethods implements ClientApi { constructor() { const scopedAxiosInstance = getConfiguredAxiosInstance(); super(scopedAxiosInstance); diff --git a/site/src/api/errors.ts b/site/src/api/errors.ts index 9705a08ff0..5573b6de3f 100644 --- a/site/src/api/errors.ts +++ b/site/src/api/errors.ts @@ -31,7 +31,8 @@ export const isApiError = (err: unknown): err is ApiError => { ); }; -const isApiErrorResponse = (err: unknown): err is ApiErrorResponse => { +/** @public Exported for use by external consumers (e.g., VS Code extension). */ +export const isApiErrorResponse = (err: unknown): err is ApiErrorResponse => { return ( typeof err === "object" && err !== null &&