Skip to main content

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 up the SDK with your site ID, user authentication, and other required parameters.

Method Signature

configure(configParams: SDKConfigParams): void

Parameters

ParameterTypeDescription
configParamsSDKConfigParamsAn object containing configuration parameters

SDKConfigParams Interface

export type SDKConfigParams = {
/**
* The type of environment to use. Defaults to `production`. The available options are `development`, `staging`, and `production`.
*/
environment?: 'development' | 'staging' | 'production';
/**
* The frequency in seconds to poll for updates. Defaults to 5.0.
*/
pollFrequency?: number;
/**
* The frequency in seconds to update progress. Defaults to 0.1.
*/
progressUpdateFrequency?: number;
/**
* The site ID to use for the SDK.
*/
siteID?: string;
/**
* The JWT token to use for authentication.
*/
jwt?: string;
/**
* The user ID of the logged account.
*/
userID?: string;
};

Return Value

This method does not return a value.

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 siteID parameter is required and must match a valid Maestro site ID.