UNPKG

@base44/sdk

Version:

JavaScript SDK for Base44 API

33 lines (32 loc) 1.28 kB
export declare class Base44Error extends Error { status: number; code: string; data: any; originalError: unknown; constructor(message: string, status: number, code: string, data: any, originalError: unknown); toJSON(): { name: string; message: string; status: number; code: string; data: any; }; } /** * Creates an axios client with default configuration and interceptors * @param {Object} options - Client configuration options * @param {string} options.baseURL - Base URL for all requests * @param {Object} options.headers - Additional headers * @param {string} options.token - Auth token * @param {boolean} options.requiresAuth - Whether the application requires authentication * @param {string|number} options.appId - Application ID (needed for login redirect) * @param {string} options.serverUrl - Server URL (needed for login redirect) * @returns {import('axios').AxiosInstance} Configured axios instance */ export declare function createAxiosClient({ baseURL, headers, token, interceptResponses, onError, }: { baseURL: string; headers?: Record<string, string>; token?: string; interceptResponses?: boolean; onError?: (error: Error) => void; }): import("axios").AxiosInstance;