Skip to Content
🎉 New release with new features and improvements! V0.0.2 Release →

Configuration

The BshEngine constructor accepts the following options:

interface BshEngineOptions { host?: string; // Your BSH Engine instance URL apiKey?: string; // API key for authentication jwtToken?: string; // JWT access token refreshToken?: string; // Refresh token for JWT renewal clientFn?: BshClientFn; // Custom HTTP client function authFn?: BshAuthFn; // Custom authentication function refreshTokenFn?: BshRefreshTokenFn; // Custom refresh token function preInterceptors?: BshPreInterceptor[]; // Request interceptors postInterceptors?: BshPostInterceptor[]; // Response interceptors errorInterceptors?: BshErrorInterceptor[]; // Error interceptors } const bshEngine = new BshEngine(options);
OptionDescriptionReference
hostThe URL of the BSH Engine instance
apiKeyThe API key for authenticationAPI Key Authentication
jwtTokenThe JWT access tokenJWT Authentication
refreshTokenThe refresh token for JWT renewalAuto Refresh
clientFnThe custom HTTP client functionCustom HTTP Client
authFnThe custom authentication functionCustom Authentication
refreshTokenFnThe custom refresh token functionAuto Refresh
preInterceptorsThe request interceptorsPre-Interceptors
postInterceptorsThe response interceptorsPost-Interceptors
errorInterceptorsThe error interceptorsError Interceptors