configure
Initializes the Maestro Web SDK with required configuration parameters.
Overview
The configure method is the first method you should call when integrating the SDK. It sets the SDK's siteID and, optionally, initial user settings.
Method Signature
configure(configParams: SDKConfigParams): void
Parameters
| Parameter | Type | Description |
|---|---|---|
configParams | SDKConfigParams | An object containing configuration parameters |
SDKConfigParams Interface
export type SDKConfigParams = {
/**
* The site ID to use for the SDK.
*/
siteID: string;
/**
* User settings for customizing SDK behavior (panel visibility, feature toggles, etc.)
*/
userSettings?: IUserSettings;
};
Return Value
This method does not return a value.
Throws
Error("Site ID must be provided")— ifsiteIDis missing, empty, or only whitespace.
Example
import SDK from "@maestro_io/maestro-web-sdk";
// Initialize the SDK with required configuration
SDK.configure({
siteID: "<your-site-id>",
});
Notes
- This method should be called before any other SDK methods.
- The
siteIDparameter is required and must match a valid Maestro site ID.