Configuration
Constructor Options
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);| Option | Description | Reference |
|---|---|---|
host | The URL of the BSH Engine instance | |
apiKey | The API key for authentication | API Key Authentication |
jwtToken | The JWT access token | JWT Authentication |
refreshToken | The refresh token for JWT renewal | Auto Refresh |
clientFn | The custom HTTP client function | Custom HTTP Client |
authFn | The custom authentication function | Custom Authentication |
refreshTokenFn | The custom refresh token function | Auto Refresh |
preInterceptors | The request interceptors | Pre-Interceptors |
postInterceptors | The response interceptors | Post-Interceptors |
errorInterceptors | The error interceptors | Error Interceptors |