Skip to content

Commit 27a8748

Browse files
committed
expose underlying axios client
1 parent d9e5b2a commit 27a8748

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

src/client.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ export function createClient(config: CreateClientConfig): Base44Client {
144144
);
145145

146146
const userModules = {
147+
axiosClient,
147148
entities: createEntitiesModule({
148149
axios: axiosClient,
149150
appId,
@@ -176,6 +177,7 @@ export function createClient(config: CreateClientConfig): Base44Client {
176177
};
177178

178179
const serviceRoleModules = {
180+
axiosClient: serviceRoleAxiosClient,
179181
entities: createEntitiesModule({
180182
axios: serviceRoleAxiosClient,
181183
appId,

src/client.types.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import type { AxiosInstance } from "axios";
12
import type { EntitiesModule } from "./modules/entities.types.js";
23
import type { IntegrationsModule } from "./modules/integrations.types.js";
34
import type { AuthModule } from "./modules/auth.types.js";
@@ -85,6 +86,8 @@ export interface Base44Client {
8586
appLogs: AppLogsModule;
8687
/** {@link AuthModule | Auth module} for user authentication and management. */
8788
auth: AuthModule;
89+
/** The underlying Axios instance used for API requests. Useful for making custom API calls with the same authentication and configuration as the SDK. */
90+
axiosClient: AxiosInstance;
8891
/** {@link EntitiesModule | Entities module} for CRUD operations on your data models. */
8992
entities: EntitiesModule;
9093
/** {@link FunctionsModule | Functions module} for invoking custom backend functions. */
@@ -119,6 +122,8 @@ export interface Base44Client {
119122
readonly asServiceRole: {
120123
/** {@link AgentsModule | Agents module} with elevated permissions. */
121124
agents: AgentsModule;
125+
/** The underlying Axios instance used for service role API requests. Useful for making custom API calls with service role authentication. */
126+
axiosClient: AxiosInstance;
122127
/** {@link AppLogsModule | App logs module} with elevated permissions. */
123128
appLogs: AppLogsModule;
124129
/** {@link ConnectorsModule | Connectors module} for OAuth token retrieval. */

0 commit comments

Comments
 (0)