# Wyn Integration
Wyn Enterprise, is a seamless embedded business intelligence (BI) platform. Embedded BI enables you to access reports and real-time dashboards within the application you use daily. This not only saves you time, but also provides self-service capabilities for your end-users and allows you to leverage analytics as part of your standard workflow, ultimately enabling more data-driven decisions to be made.
 
Designed for embedded BI, Wyn’s versatile platform offers flexible deployment and integration, making installation smooth and straightforward.

## Installation

To install latest release version:
```cmd
npm install @wynenterprise/wyn-integration
```

## Import

* Using the package name:

```javascript
import { WynIntegration } from "@wynenterprise/wyn-integration";
```

* Use source code for this package
```javascript
import { WynIntegration } from "@wynenterprise/wyn-integration/index";
```

## Usage
* Add Dashboard Designer to `<div id="wyn-root">`

```javascript
import { WynIntegration } from "@wynenterprise/wyn-integration";
WynIntegration.createDashboardDesigner({
    baseUrl: 'http://sample.com/',
    token: 'd3ecc751b250f8129e87f6813c13ee7ec0bf1f01198160f3bdddb6771c20fab9',
    defaults: {
        dashboardId: 'e9ab2113-32bd-403e-9f0a-eb2b0438f864',
        lng: 'en',
    },
}, '#wyn-root').then(ins => {
});
```

* Add Dashboard Viewer to `<div id="wyn-root">`

```javascript
import { WynIntegration } from "@wynenterprise/wyn-integration";
WynIntegration.createDashboardViewer({
    baseUrl: 'http://sample.com',
    token: 'd3ecc751b250f8129e87f6813c13ee7ec0bf1f01198160f3bdddb6771c20fab9',
    defaults: {
        dashboardId: '0bead052-d56a-4fac-897b-a2984c0208e3',
        theme: 'red',
    },
}, '#wyn-root').then(ins => {
});
```

* Add Dashboard Lite Viewer to `<div id="wyn-root">`

```javascript
import { WynIntegration } from "@wynenterprise/wyn-integration";
WynIntegration.createViewerLite(
{
    baseUrl: 'http://sample.com',
    token: 'd3ecc751b250f8129e87f6813c13ee7ec0bf1f01198160f3bdddb6771c20fab9',
    defaults: {
        dashboardId: '0bead052-d56a-4fac-897b-a2984c0208e3',
    },
}, '#wyn-root').then(ins => {
});
```

* Add AI Chat Analysis to `<div id="wyn-root">`

```javascript
import { WynIntegration } from "@wynenterprise/wyn-integration";
WynIntegration.createAIChatAnalysis({
    baseUrl: 'http://sample.com',
    token: 'd3ecc751b250f8129e87f6813c13ee7ec0bf1f01198160f3bdddb6771c20fab9',
    dataset: '660488d8-8d86-4cb5-94f7-f49fa88f5946',
    availableDatasets: ['660488d8-8d86-4cb5-94f7-f49fa88f5946'],
    datasetSelection: 'manual',
    analysisMode: 'standard',
    showDataPanel: true,
}, '#wyn-root').then(ins => {
});
```

* Draw charts by APIs in Dashboard Viewer or Dashboard Lite Viewer

```javascript
import { WynIntegration } from "@wynenterprise/wyn-integration";

const chartBinding = {
    dataSourceType: 'embeddedData',
    dataBinding: {
        Category: ['Region'],
        Series: ['Carrier'],
        Values: [{ name: 'Sales', method: 'sum' }],
    },
    data: {
        Region: ['East', 'West', 'South'],
        Carrier: ['Express', 'Express', 'Parcel'],
        Sales: [120, 90, 70],
    },
};

WynIntegration.createDashboardViewer({
    baseUrl: 'http://sample.com',
    token: 'd3ecc751b250f8129e87f6813c13ee7ec0bf1f01198160f3bdddb6771c20fab9',
    defaults: {
        dashboardId: '0bead052-d56a-4fac-897b-a2984c0208e3',
    },
}, '#wyn-root').then(viewer => {
    viewer
        .addVisual('salesByRegion', 'column', 400, 300, 0, 0)
        .setDataBinding('salesByRegion', chartBinding)
        .update();
});
```

The same draw-by-API workflow is available on the lite viewer:

```javascript
import { WynIntegration } from "@wynenterprise/wyn-integration";

WynIntegration.createViewerLite({
    baseUrl: 'http://sample.com',
    token: 'd3ecc751b250f8129e87f6813c13ee7ec0bf1f01198160f3bdddb6771c20fab9',
    defaults: {
        dashboardId: '0bead052-d56a-4fac-897b-a2984c0208e3',
    },
}, '#wyn-root').then(liteViewer => {
    liteViewer
        .addVisual('salesByRegion', 'column', 400, 300, 0, 0)
        .setDataBinding('salesByRegion', {
            dataSourceType: 'serverData',
            dataId: '660488d8-8d86-4cb5-94f7-f49fa88f5946',
            dataBinding: {
                Category: ['Region'],
                Series: ['Carrier'],
                Values: [{ name: 'Sales', method: 'sum' }],
            },
        })
        .update();
});
```

Notes:

- `visualName` is the unique visual identifier used by `setDataBinding` and `removeDataBinding`.
- `visualType` can be a built-in visual type such as `'column'`, or a custom visual name provided by the visual author.
- `addVisual` also supports an optional `scenarioJson` argument when you want to initialize a visual from an existing scenario payload.
- `addVisual`, `setDataBinding`, and `removeDataBinding` are lazy operations. Call `update()` to apply the pending changes.
- `update()` returns a Promise, so you can `await viewer.update()` when you need to know the queued operations have finished.
- The coordinates and size are based on the dashboard designer coordinate system. The viewer scales the final layout to the mounted container.

* Add Scene Designer to `<div id="wyn-root">`

```javascript
import { WynIntegration } from "@wynenterprise/wyn-integration";
WynIntegration.createSceneDesigner({
    baseUrl: 'http://sample.com/',
    token: 'd3ecc751b250f8129e87f6813c13ee7ec0bf1f01198160f3bdddb6771c20fab9',
}, '#wyn-root').then(ins => {
});
```

* Add Scene Viewer to `<div id="wyn-root">`

```javascript
import { WynIntegration } from "@wynenterprise/wyn-integration";
WynIntegration.createSceneViewer({
    baseUrl: 'http://sample.com',
    token: 'd3ecc751b250f8129e87f6813c13ee7ec0bf1f01198160f3bdddb6771c20fab9',
    docId: 'ee799c0e-f4cf-4a13-a8c2-0330f9409841',
}, '#wyn-root').then(ins => {
});
```

* Add Report Designer(Wyn server >= 5.1) to `<div id="wyn-root">`:

```javascript
import { WynIntegration } from "@wynenterprise/wyn-integration";
WynIntegration.createReportDesigner({
    baseUrl: 'http://sample.com/',
    token: 'd3ecc751b250f8129e87f6813c13ee7ec0bf1f01198160f3bdddb6771c20fab9',
    reportId: '1a8bbca0-51a9-4eb3-b42e-ff1f7b0f4b75',
}, '#wyn-root').then((ins) => {
});
```

* Add Report Viewer(Wyn server >= 5.1) to `<div id="wyn-root">`:

```javascript
import { WynIntegration } from "@wynenterprise/wyn-integration";
WynIntegration.createReportViewer({
    baseUrl: 'http://sample.com',
    token: 'd3ecc751b250f8129e87f6813c13ee7ec0bf1f01198160f3bdddb6771c20fab9',
    reportId: '0ddb33e9-3211-4d96-9d25-ca34458dd8b9',
}, '#wyn-root').then(ins => {
});
```

* Add Notebook Designer(Wyn server >= 9.1) to `<div id="wyn-root">`:

```javascript
import { WynIntegration } from "@wynenterprise/wyn-integration";
WynIntegration.createNotebookDesigner({
    baseUrl: 'http://sample.com',
    token: 'd3ecc751b250f8129e87f6813c13ee7ec0bf1f01198160f3bdddb6771c20fab9',
    defaults: {
        docId: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
        theme: 'red',
        lng: 'en',
    },
    features: {
        toolbar: 'show',
        showInspector: true,
        showDataBindingPanel: true,
    },
    onLoaded: (docName) => {
        console.log('Notebook loaded:', docName);
    },
    onSave: (docName, docId) => {
        console.log('Notebook saved:', docName, docId);
    },
}, '#wyn-root').then(ins => {
    // Notebook designer instance methods
    ins.showInspector();
    ins.showDataBindingPanel();
    ins.togglePreview();
    ins.save({ name: 'New Notebook', comment: 'Description' });
});
```

* Add Notebook Viewer(Wyn server >= 9.1) to `<div id="wyn-root">`:

```javascript
import { WynIntegration } from "@wynenterprise/wyn-integration";
WynIntegration.createNotebookViewer({
    baseUrl: 'http://sample.com',
    token: 'd3ecc751b250f8129e87f6813c13ee7ec0bf1f01198160f3bdddb6771c20fab9',
    defaults: {
        docId: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
        dp: { 'Parameter1': [['value1']] },
    },
    onLoaded: (docName) => {
        console.log('Notebook loaded:', docName);
    },
}, '#wyn-root').then(ins => {
    // Notebook viewer instance methods
    ins.getDatasets().then(datasets => console.log(datasets));
    ins.setParameterValue({ 'Parameter1': [['newValue']] });
    ins.requestFullScreen();
});
```

* Add Smart Documents Designer or Viewer to `<div id="wyn-root">`:

```javascript
import { WynIntegration } from "@wynenterprise/wyn-integration";

const designer = await WynIntegration.createSmartDocumentsDesigner({
    baseUrl: 'http://sample.com',
    token: 'd3ecc751b250f8129e87f6813c13ee7ec0bf1f01198160f3bdddb6771c20fab9',
});
designer.editDocument('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', document.querySelector('#wyn-root'));

// To embed a viewer instead:
const viewer = await WynIntegration.createSmartDocumentsViewer({
    baseUrl: 'http://sample.com',
    token: 'd3ecc751b250f8129e87f6813c13ee7ec0bf1f01198160f3bdddb6771c20fab9',
});
viewer.viewDocument('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', document.querySelector('#wyn-root'));
```

* Add Spreadsheet Designer or Viewer to `<div id="wyn-root">`:

```javascript
import { WynIntegration } from "@wynenterprise/wyn-integration";

const designer = await WynIntegration.createSpreadsheetDesigner({
    baseUrl: 'http://sample.com',
    token: 'd3ecc751b250f8129e87f6813c13ee7ec0bf1f01198160f3bdddb6771c20fab9',
});
designer.editDocument('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', document.querySelector('#wyn-root'));

// To embed a viewer instead:
const viewer = await WynIntegration.createSpreadsheetViewer({
    baseUrl: 'http://sample.com',
    token: 'd3ecc751b250f8129e87f6813c13ee7ec0bf1f01198160f3bdddb6771c20fab9',
});
viewer.viewDocument('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', document.querySelector('#wyn-root'));
```

* Add Dataset/DataSource/DataModel Designer/Viewer to `<div id="wyn-root">`:

```javascript
import { WynIntegration } from "@wynenterprise/wyn-integration";
WynIntegration.createDatasetDesigner({
    baseUrl: 'http://sample.com/',
    token: 'd3ecc751b250f8129e87f6813c13ee7ec0bf1f01198160f3bdddb6771c20fab9',
    theme: 'default',
    language: 'zh',
    siteTitle: 'sds',
    type: 'dashboard',
}, '#wyn-root').then(ins => {
});
WynIntegration.createDatasetViewer({
    baseUrl: 'http://sample.com/',
    token: 'd3ecc751b250f8129e87f6813c13ee7ec0bf1f01198160f3bdddb6771c20fab9',
    theme: 'default',
    language: 'zh',
    siteTitle: 'sds',
    documentId: '840fac96-abac-4276-8fb5-051eb07c95df',
}, '#wyn-root').then(ins => {
});
WynIntegration.createDatasourceDesigner({
    baseUrl: 'http://sample.com/',
    token: 'd3ecc751b250f8129e87f6813c13ee7ec0bf1f01198160f3bdddb6771c20fab9',
    theme: 'default',
    language: 'zh',
    siteTitle: 'sds',
}, '#wyn-root').then(ins => {
});
WynIntegration.createDatasourceViewer({
    baseUrl: 'http://sample.com',
    token: 'd3ecc751b250f8129e87f6813c13ee7ec0bf1f01198160f3bdddb6771c20fab9',
    theme: 'default',
    language: 'zh',
    siteTitle: 'sds',
    documentId: '8ce06a89-85f9-4756-b052-fb3d7c832899',
}, '#wyn-root').then(ins => {
});
WynIntegration.createSemanticDesigner({
    baseUrl: 'http://sample.com',
    token: 'd3ecc751b250f8129e87f6813c13ee7ec0bf1f01198160f3bdddb6771c20fab9',
    theme: 'default',
    language: 'zh',
    siteTitle: 'sds',
}, '#wyn-root').then(ins => {
});
WynIntegration.createDirectQueryModelDesigner({
    baseUrl: 'http://sample.com',
    token: 'd3ecc751b250f8129e87f6813c13ee7ec0bf1f01198160f3bdddb6771c20fab9',
    theme: 'default',
    language: 'zh',
    siteTitle: 'sds',
}, '#wyn-root').then(ins => {
});
WynIntegration.createCachedModelDesigner({
    baseUrl: 'http://sample.com',
    token: 'd3ecc751b250f8129e87f6813c13ee7ec0bf1f01198160f3bdddb6771c20fab9',
    theme: 'default',
    language: 'zh',
    siteTitle: 'sds',
}, '#wyn-root').then(ins => {
});
WynIntegration.createAnalysisViewer({
    baseUrl: 'http://sample.com',
    token: 'd3ecc751b250f8129e87f6813c13ee7ec0bf1f01198160f3bdddb6771c20fab9',
    theme: 'default',
    language: 'zh',
    siteTitle: 'sds',
    documentId: '8ce06a89-85f9-4756-b052-fb3d7c832899',
}, '#wyn-root').then(ins => {
});
```

* Add PushDataset/StreamDataset designer to `<div id="wyn-root">`:

```javascript
WynIntegration.createPushDatasetDesigner({
    baseUrl: 'http://sample.com/',
    token: 'd3ecc751b250f8129e87f6813c13ee7ec0bf1f01198160f3bdddb6771c20fab9',
    theme: 'default',
    language: 'zh',
    siteTitle: 'sds',
    type: 'dashboard',
}, '#wyn-root').then(ins => {
});

WynIntegration.createStreamingDatasetDesigner({
    baseUrl: 'http://sample.com/',
    token: 'd3ecc751b250f8129e87f6813c13ee7ec0bf1f01198160f3bdddb6771c20fab9',
    theme: 'default',
    language: 'zh',
    siteTitle: 'sds',
    type: 'dashboard',
}, '#wyn-root').then(ins => {
});
```

* Add NativeQueryDataset designer to `<div id="wyn-root">`:
```javascript
WynIntegration.createNativeQueryDatasetDesigner({
    baseUrl: 'http://sample.com/',
    token: 'd3ecc751b250f8129e87f6813c13ee7ec0bf1f01198160f3bdddb6771c20fab9',
    theme: 'default',
    language: 'zh',
    siteTitle: 'sds',
}, '#wyn-root').then(ins => {
});
```

* Add DirectQueryDataset designer to `<div id="wyn-root">`:
```javascript
WynIntegration.createDirectQueryDatasetDesigner({
    baseUrl: 'http://sample.com/',
    token: 'd3ecc751b250f8129e87f6813c13ee7ec0bf1f01198160f3bdddb6771c20fab9',
    theme: 'default',
    language: 'zh',
    siteTitle: 'sds',
}, '#wyn-root').then(ins => {
});
```
* Add Document Binder Designer to `<div id="wyn-root">`:
```javascript
WynIntegration.createDocumentBinderDesigner({
    baseUrl: 'http://sample.com/',
    token: 'd3ecc751b250f8129e87f6813c13ee7ec0bf1f01198160f3bdddb6771c20fab9',
    theme: 'default',
    language: 'zh',
    siteTitle: 'sds',
}, '#wyn-root').then(ins => {
});
```
* Add Document Binder Viewer to `<div id="wyn-root">`:
```javascript
WynIntegration.createDocumentBinderViewer({
    baseUrl: 'http://sample.com/',
    token: 'd3ecc751b250f8129e87f6813c13ee7ec0bf1f01198160f3bdddb6771c20fab9',
    theme: 'default',
    language: 'zh',
    siteTitle: 'sds',
    documentId: '8ce06a89-85f9-4756-b052-fb3d7c832899',
}, '#wyn-root').then(ins => {
});
```

* Add ETL Query Designer to `<div id="wyn-root">`:
```javascript
WynIntegration.createETLQueryDesigner({
    baseUrl: 'http://sample.com/',
    token: 'd3ecc751b250f8129e87f6813c13ee7ec0bf1f01198160f3bdddb6771c20fab9',
    theme: 'default',
    language: 'zh',
    siteTitle: 'sds',
}, '#wyn-root').then(ins => {
});
```

* Add Data Flow Designer to `<div id="wyn-root">`:
```javascript
WynIntegration.createDataFlowDesigner({
    baseUrl: 'http://sample.com/',
    token: 'd3ecc751b250f8129e87f6813c13ee7ec0bf1f01198160f3bdddb6771c20fab9',
    theme: 'default',
    language: 'zh',
    siteTitle: 'sds',
}, '#wyn-root').then(ins => {
});
```

* Add Data File Viewer to `<div id="wyn-root">`:
```javascript
WynIntegration.createDataFileEntryViewer({
    baseUrl: 'http://sample.com/',
    token: 'd3ecc751b250f8129e87f6813c13ee7ec0bf1f01198160f3bdddb6771c20fab9',
    theme: 'default',
    language: 'zh',
    siteTitle: 'sds',
    documentId: '8ce06a89-85f9-4756-b052-fb3d7c832899',
}, '#wyn-root').then(ins => {
});
```

* Add Document/Resource/Admin Portal to `<div id="wyn-root">`:
```javascript
WynIntegration.createDocumentPortal({
    baseUrl: 'http://sample.com/',
    token: 'd3ecc751b250f8129e87f6813c13ee7ec0bf1f01198160f3bdddb6771c20fab9',
    theme: 'default',
    language: 'zh',
    siteTitle: 'sds',
}, '#wyn-root').then(ins => {
});

WynIntegration.createResourcePortal({
    baseUrl: 'http://sample.com/',
    token: 'd3ecc751b250f8129e87f6813c13ee7ec0bf1f01198160f3bdddb6771c20fab9',
    theme: 'default',
    language: 'zh',
    siteTitle: 'sds',
}, '#wyn-root').then(ins => {
});

WynIntegration.createAdminPortal({
    baseUrl: 'http://sample.com/',
    token: 'd3ecc751b250f8129e87f6813c13ee7ec0bf1f01198160f3bdddb6771c20fab9',
    theme: 'default',
    language: 'zh',
    siteTitle: 'sds',
}, '#wyn-root').then(ins => {
});
```

## API

### createDashboardDesigner(dashboardDesignerOptions)
+ `dashboardDesignerOptions`: the dashboardOptions specify the options/properties for the created dashboard designer or dashboard viewer, as described in the following sections. Extends common options：
    - `baseUrl`: string, required; The Wyn Enterprise server url. If your integration and wyn server are not on the same site, you should provide your wyn server host.
    - `token`: string, required; The access token. the token is generated from the Admin portal.
    - `version`: string, not required when Wyn server >= 5.1; The Wyn Enterprise server version.
    - `container`: DOM, required; A DOM element used to mount the dashboard.
    + `defaults`: not required; Default options of initializing a dashboard
        - `clickAction`: string, not required; The dashboard click actions. 
        - `containerFilterScope`: string, not required; The dashboard container filter scope.
        - `contextMenuActions`: string, not required; The dashboard context menu actions.
        - `dashboardId`: string, required; The dashboard document id.
        - `datasetId`: string, not required; The dashboard dataset id.
        - `documentThemeId`: string, not required; The dashboard document theme id.
        - `dp`: string, not required; The dashboard parameters.
        - `enableDeveloperMode`: boolean, not required; Enable developer mode for custom visual dev tools.
        - `lng`: string, not required; Set the language of the user interface, the acceptable Values:  'zh', 'en', 'en-gb', 'zh-tw', 'pl'.
        - `notificationTime`: number, not required; The setting of dashboard notification time.
        - `templateId`: string, not required; The templateId create dashboard with.
        - `theme`: string, not required; The dashboard theme. 
    + `features`: not required; The features properties of DashboardDesignerInitOption.
        - `actionbarItems`: string[], not required; Define the action bar action white list.
        - `componentCategories`: string[], not required; Control which component categories are available in the designer..
        - `disableAnimation`: boolean, not required; Control the animation enabled.
        - `disableChangeDataset`: boolean, not required; Control whether the user can change the binding dataset of the scenario.
        - `showCloseButton`: boolean, not required; Control the visibility of the close button.
        - `showDataBindingPanel`: boolean, not required; Control the visibility of the designer's data binding panel.
        - `showHelpButton`: boolean, not required; Control the visibility of the help button.
        - `showInspector`: boolean, not required; Control the visibility of the designer inspector.
        - `showInspectorWhenOpen`: boolean, not required; Control the visibility of the inspector when open.
        - `showMobileDesigner`: boolean, not required; Control the visibility of the mobile designer.
        - `showPanelWhenOpen`: boolean, not required; Control the visibility of the panel when open.
        - `showWizard`: boolean, not required; Control the visibility of the wizard.
        - `toolbar`: string, not required; Control the visibility of the viewer toolbar; that is, whether to show or hide the viewer toolbar. Default value is 'show', the acceptable Values: 'hide', 'show'.
    - `onMount`: () => void, not required; This is a callback function, it will be invoked after the designer mounted.
    - `onClose`: () => void, not required; This is a callback function, it will be invoked when users save a document.
    - `onSave`: (docName: string, id: string) => void, not required; This is a callback function, it will be invoked when users save a document.
    - `onLoaded`: (docName: string) => void, not required; This is a callback function, it will be invoked after the designer loaded.
    - `onError`: (errorInfo: object) => void, not required; This is a callback function, it will be invoked when the document has any error message.
### createDashboardViewer(dashboardViewerOptions)
+ `dashboardViewerOptions`: the dashboardOptions specify the options/properties for the created dashboard designer or dashboard viewer, as described in the following sections. Extends common options：
    - `baseUrl`: string, required; The Wyn Enterprise server url. If your integration and wyn server are not on the same site, you should provide your wyn server host.
    - `token`: string, required; The access token. the token is generated from the Admin portal.
    - `version`: string, not required when Wyn server >= 5.1; The Wyn Enterprise server version.
    - `container`: DOM, required; A DOM element used to mount the dashboard.
    + `defaults`: not required; Default options of initializing a dashboard
        - `dashboardId`: string, required; The dashboard document id.
        - `clickAction`: string, not required; The dashboard click actions. 
        - `containerFilterScope`: string, not required; The dashboard container filter scope.
        - `contextMenuActions`: string, not required; The dashboard context menu actions.
        - `documentThemeId`: string, not required; The dashboard document theme id.
        - `dp`: string, not required; The dashboard parameters.
        - `hideErrors`: boolean, not required; Hide all dashboard error notifications.
        - `lng`: string, not required; Set the language of the user interface, the acceptable Values:  'zh', 'en', 'en-gb', 'zh-tw', 'pl'.
        - `notificationTime`: number, not required; The setting of dashboard notification time.
        - `pageNumber`: number, not required; The viewer page number, starts from 1..
        - `scenario`: string, not required; The single scenario name.
        - `size`: string, not required; Set the display mode of the dashboard in the viewer, the acceptable Values: 'fitheight' , 'fittoheight' , 'fitwidth' , 'fittowidth' , 'fitscreen' , 'fittoscreen' , 'auto'.
        - `showScenarioTitle`: boolean, not required; Show scenario title only when do single scenario integration.
        - `theme`: string, not required; The dashboard theme. 
    + `features`: not required; The features properties of DashboardDesignerInitOption.
        - `actionbarItems`: string[], not required; Define the action bar action white list.
        - `disableAnimation`: boolean, not required; Control the animation enabled.
        - `disableAutoScroll`: boolean, not required; Control the autoscroll enabled.
        - `disableAutoSwitchPage`: boolean, not required; Control the auto switch page enabled.
        - `hideToolbarActions`: string[], not required; Control the hidden toolbar action items.	
    - `onMount`: () => void, not required; Invoked after the viewer mounted.
    - `onClose`: () => void, not required; Invoked when the viewer is closed.
    - `onRendered`: (docName: string) => void, not required; Invoked after the viewer rendered.
    - `onLoaded`: (docName: string) => void, not required; Invoked after the viewer loaded.
    - `onError`: (errorInfo: object) => void, not required; Invoked when the document has any error message.

#### Dashboard Viewer Instance Methods
The instance returned by `createDashboardViewer` provides the following methods:

- `destroy()`: Releases the resources of the viewer instance.
- `executeCommand(option)`: Executes dashboard commands such as drill, page switch, or scenario visibility changes.
- `requestFullScreen()`: Requests fullscreen mode for the viewer.
- `getDatasets()`: Returns a Promise that resolves to the datasets used by the current dashboard.
- `setParameterValue(parameters)`: Sets parameter values for the current dashboard.
- `addVisual(visualName, visualType, width, height, left, top, scenarioJson?)`: Queues a visual to be added by API.
- `setDataBinding(visualName, dataBindingInfo)`: Queues server data or embedded data binding for the visual.
- `removeDataBinding(visualName)`: Queues removal of the visual data binding.
- `update()`: Returns a Promise and applies the pending draw-by-API changes.

### createViewerLite(dashboardLiteViewerOptions) 

+ `dashboardLiteViewerOptions`: the dashboardOptions specify the options/properties for the created dashboard designer or dashboard viewer, as described in the following sections. Extends common options：
    - `baseUrl`: string, required; The Wyn Enterprise server url. If your integration and wyn server are not on the same site, you should provide your wyn server host.
    - `token`: string, required; The access token. the token is generated from the Admin portal.
    - `version`: string, not required when Wyn server >= 5.1; The Wyn Enterprise server version.
    - `container`: DOM, required; A DOM element used to mount the dashboard.
    + `defaults`: not required; Default options of initializing a dashboard
        - `dashboardId`: string, required; The dashboard document id.
        - `clickAction`: string, not required; The dashboard click actions. 
        - `containerFilterScope`: string, not required; The dashboard container filter scope.
        - `contextMenuActions`: string, not required; The dashboard context menu actions.
        - `documentThemeId`: string, not required; The dashboard document theme id.
        - `dp`: string, not required; The dashboard parameters.
        - `hideErrors`: boolean, not required; Hide all dashboard error notifications.
        - `lng`: string, not required; Set the language of the user interface, the acceptable Values:  'zh', 'en', 'en-gb', 'zh-tw', 'pl'.
        - `notificationTime`: number, not required; The setting of dashboard notification time.
        - `pageNumber`: number, not required; The viewer page number, starts from 1..
        - `scenario`: string, not required; The single scenario name.
        - `size`: string, not required; Set the display mode of the dashboard in the viewer, the acceptable Values: 'fitheight' , 'fittoheight' , 'fitwidth' , 'fittowidth' , 'fitscreen' , 'fittoscreen' , 'auto'.
        - `showScenarioTitle`: boolean, not required; Show scenario title only when do single scenario integration.
        - `theme`: string, not required; The dashboard theme. 
    + `features`: not required; The features properties of DashboardDesignerInitOption.
        - `actionbarItems`: string[], not required; Define the action bar action white list.
        - `disableAnimation`: boolean, not required; Control the animation enabled.
        - `disableAutoScroll`: boolean, not required; Control the autoscroll enabled.
        - `disableAutoSwitchPage`: boolean, not required; Control the auto switch page enabled.

#### Dashboard Lite Viewer Instance Methods
The instance returned by `createViewerLite` provides the following methods:

- `destroy()`: Releases the resources of the lite viewer instance.
- `executeCommand(option)`: Executes dashboard commands such as drill, page switch, or scenario visibility changes.
- `requestFullScreen()`: Requests fullscreen mode for the lite viewer.
- `getDatasets()`: Returns a Promise that resolves to the datasets used by the current dashboard.
- `setParameterValue(parameters)`: Sets parameter values for the current dashboard.
- `getUIDashboard()`: Returns the underlying `UIDashboard` instance.
- `addVisual(visualName, visualType, width, height, left, top, scenarioJson?)`: Queues a visual to be added by API.
- `setDataBinding(visualName, dataBindingInfo)`: Queues server data or embedded data binding for the visual.
- `removeDataBinding(visualName)`: Queues removal of the visual data binding.
- `update()`: Returns a Promise and applies the pending draw-by-API changes.

### createAIChatAnalysis(aiChatAnalysisOptions, selector)
+ `aiChatAnalysisOptions`: the options specify the properties for the created AI chat analysis instance, as described in the following sections. Extends common options:
    - `baseUrl`: string, required; The Wyn Enterprise server url. If your integration and wyn server are not on the same site, you should provide your wyn server host.
    - `token`: string, required; The access token. the token is generated from the Admin portal.
    - `version`: string, not required; The Wyn Enterprise server version. It is used as a fallback when the dashboard asset version cannot be resolved automatically.
    - `container`: DOM, not required; Fallback DOM element used to mount AI chat analysis. The `selector` argument is preferred.
    - `tokenKey`: string, not required; Set the key name used in query parameters. If `tokenKey` is not specified, the default value `'token'` is used.
    - `lng`: string, not required; Set the language of the user interface.
    - `theme`: string, not required; The theme of the user interface.
    - `dataset`: string, not required; The default dataset id.
    - `availableDatasets`: string[], not required; The available dataset ids for AI chat analysis.
    - `datasetSelection`: 'manual' | 'auto', not required; Controls whether users manually choose a dataset or allow AI to select one.
    - `insights`: boolean, not required; Controls whether insight-related UI and requests are enabled for this integration.
    - `advancedAnalysis`: boolean, not required; Controls whether advanced analysis is available.
    - `suggestedQuestions`: boolean, not required; Controls whether suggested questions are shown after a completed answer.
    - `analysisMode`: 'standard' | 'advanced', not required; Controls the default analysis mode for a new session.
    - `showDataPanel`: boolean, not required; Controls whether the data panel is shown.
    + `setupGuide`: not required; The setup guide shown when AI chat analysis setup is required.
        - `title`: string, not required; The main title.
        - `subtitle`: string, not required; The subtitle shown under the title.
        - `description`: string, not required; The descriptive text shown in the unavailable state.
        - `actionText`: string, not required; The action button text.
        - `actionUrl`: string, not required; The URL opened by the action button.
    - `onError`: (error: unknown) => void, not required; Invoked when creating or initializing AI chat analysis fails.
+ `selector`: the dom element selector.

#### AI Chat Analysis Instance Methods
The instance returned by `createAIChatAnalysis` provides the following methods:

- `destroy()`: Releases the resources of the AI chat analysis instance.

### createSceneDesigner(sceneDesignerOptions)
+ `sceneDesignerOptions`: the Options specify the options/properties for the created scene designer or scene viewer, as described in the following sections. Extends common options：
    - `baseUrl`: string, required; The Wyn Enterprise server url. If your integration and wyn server are not on the same site, you should provide your wyn server host.
    - `token`: string, required; The access token. the token is generated from the Admin portal.
    - `version`: string, not required when Wyn server >= 5.1; The Wyn Enterprise server version.
    - `container`: DOM, required; A DOM element used to mount the scene.
    - `onMount`: () => void, not required; This is a callback function, it will be invoked after the designer mounted.
    - `onClose`: () => void, not required; This is a callback function, it will be invoked when users save a document.
    - `onSave`: (docName: string, id: string) => void, not required; This is a callback function, it will be invoked when users save a document.
    - `onLoaded`: (docName: string) => void, not required; This is a callback function, it will be invoked after the designer loaded.
    - `onError`: (errorInfo: object) => void, not required; This is a callback function, it will be invoked when the document has any error message.
### createSceneViewer(sceneViewerOptions)
+ `sceneViewerOptions`: the dashboardOptions specify the options/properties for the created scene designer or scene viewer, as described in the following sections. Extends common options：
    - `baseUrl`: string, required; The Wyn Enterprise server url. If your integration and wyn server are not on the same site, you should provide your wyn server host.
    - `token`: string, required; The access token. the token is generated from the Admin portal.
    - `version`: string, not required when Wyn server >= 5.1; The Wyn Enterprise server version.
    - `container`: DOM, required; A DOM element used to mount the scene.
    - `onMount`: () => void, not required; Invoked after the viewer mounted.
    - `onClose`: () => void, not required; Invoked when the viewer is closed.
    - `onRendered`: (docName: string) => void, not required; Invoked after the viewer rendered.
    - `onLoaded`: (docName: string) => void, not required; Invoked after the viewer loaded.
    - `onError`: (errorInfo: object) => void, not required; Invoked when the document has any error message.

### createNotebookDesigner(notebookDesignerOptions)
+ `notebookDesignerOptions`: the options specify the properties for the created notebook designer, as described in the following sections. Extends common options：
    - `baseUrl`: string, required; The Wyn Enterprise server url. If your integration and wyn server are not on the same site, you should provide your wyn server host.
    - `token`: string, required; The access token. the token is generated from the Admin portal.
    - `version`: string, not required when Wyn server >= 9.1; The Wyn Enterprise server version.
    - `container`: DOM, required; A DOM element used to mount the notebook.
    + `defaults`: not required; Default options of initializing a notebook designer
        - `docId`: string, not required; The notebook document id.
        - `dp`: object | string, not required; The notebook parameters.
        - `datasetId`: string, not required; The notebook dataset id.
        - `lng`: string, not required; Set the language of the user interface.
        - `theme`: string, not required; The notebook theme.
        - `notificationTime`: number, not required; The setting of notification time.
        - `hideErrors`: boolean, not required; Hide all error notifications.
    + `features`: not required; The features properties of NotebookDesignerInitOption.
        - `showCloseButton`: boolean, not required; Control the visibility of the close button.
        - `toolbar`: 'show' | 'hide', not required; Control the visibility of the toolbar.
        - `disableChangeDataset`: boolean, not required; Control whether the user can change the binding dataset.
        - `showDataBindingPanel`: boolean, not required; Control the visibility of the data binding panel.
        - `showHelpButton`: boolean, not required; Control the visibility of the help button.
        - `showInspector`: boolean, not required; Control the visibility of the inspector.
        - `showInspectorWhenOpen`: boolean, not required; Control the visibility of the inspector when open.
        - `saveAsDialog`: object, not required; **Save As** dialog settings.
            - `canSetCategories`: boolean, not required; Specifies whether it is possible to set categories. Default is true.
            - `canSetComment`: boolean, not required; Specifies whether it is possible to set comment. Default is true.
    - `onMount`: () => void, not required; This is a callback function, it will be invoked after the designer mounted.
    - `onClose`: () => void, not required; This is a callback function, it will be invoked when the designer is closed.
    - `onSave`: (docName: string, id: string) => void, not required; This is a callback function, it will be invoked when users save a document.
    - `onLoaded`: (docName: string) => void, not required; This is a callback function, it will be invoked after the designer loaded.
    - `onError`: (errorInfo: object) => void, not required; This is a callback function, it will be invoked when the document has any error message.

#### Notebook Designer Instance Methods
The instance returned by `createNotebookDesigner` provides the following methods:

- `destroy()`: Releases the resources of the notebook designer instance.
- `showInspector()`: Shows the inspector panel of the notebook designer.
- `hideInspector()`: Hides the inspector panel of the notebook designer.
- `showDataBindingPanel()`: Shows the data binding panel of the notebook designer.
- `hideDataBindingPanel()`: Hides the data binding panel of the notebook designer.
- `togglePreview(option?)`: Switches designer's view mode between Design and Preview.
- `save(option?)`: Saves the current document. Returns a Promise.
- `isDocumentDirty()`: Returns a boolean value whether the document state is dirty.
- `setDatasetId(datasetId)`: Sets the dataset ID for the notebook.
- `on(eventType, eventHandler)`: Subscribes to a notebook designer event.
- `off(eventType, eventHandler)`: Unsubscribes from a notebook designer event.

#### Notebook Designer Event Types
- `Close`: Notebook designer close event.
- `Loaded`: Notebook designer loading complete event.
- `Error`: Notebook designer error event.
- `Saved`: Notebook document save complete event.
- `PreviewEntered`: Enter the preview state event.
- `PreviewExited`: Exit preview state event.
- `InspectorShown`: Property panel display event.
- `InspectorHidden`: Property panel hidden event.
- `DatabindingPanelShown`: Data binding panel display event.
- `DatabindingPanelHidden`: Data binding panel hidden event.

### createNotebookViewer(notebookViewerOptions)
+ `notebookViewerOptions`: the options specify the properties for the created notebook viewer, as described in the following sections. Extends common options：
    - `baseUrl`: string, required; The Wyn Enterprise server url. If your integration and wyn server are not on the same site, you should provide your wyn server host.
    - `token`: string, required; The access token. the token is generated from the Admin portal.
    - `version`: string, not required when Wyn server >= 9.1; The Wyn Enterprise server version.
    - `container`: DOM, required; A DOM element used to mount the notebook.
    + `defaults`: not required; Default options of initializing a notebook viewer
        - `docId`: string, not required; The notebook document id.
        - `dp`: object | string, not required; The notebook parameters.
        - `datasetId`: string, not required; The notebook dataset id.
        - `lng`: string, not required; Set the language of the user interface.
        - `theme`: string, not required; The notebook theme.
        - `notificationTime`: number, not required; The setting of notification time.
        - `hideErrors`: boolean, not required; Hide all error notifications.
    - `onMount`: () => void, not required; Invoked after the viewer mounted.
    - `onLoaded`: (docName: string) => void, not required; Invoked after the viewer loaded.
    - `onError`: (errorInfo: object) => void, not required; Invoked when the document has any error message.

#### Notebook Viewer Instance Methods
The instance returned by `createNotebookViewer` provides the following methods:

- `destroy()`: Releases the resources of the notebook viewer instance.
- `getDatasets()`: Returns a Promise that resolves to an array of datasets used in the notebook.
- `setParameterValue(parameters)`: Sets parameter values for the notebook.
- `requestFullScreen()`: Requests fullscreen mode for the notebook viewer.

### createSmartDocumentsDesigner(configuration)
+ `configuration`: Smart Documents designer creation options.
    - `baseUrl`: string, required; The Wyn Enterprise server URL.
    - `token`: string, required; The access token generated from the Admin portal.
    - `tokenKey`: string, not required; The query parameter key used for the token. The default is `token`.

Returns a `Promise<SmartDocumentsDesigner>`.

#### Smart Documents Designer Instance Methods

- `editDocument(documentId: string, domElement: HTMLElement): void`: Opens the specified document in the designer and mounts it in the supplied element.
- `destroy(): void`: Releases the resources of the Smart Documents designer instance.

### createSmartDocumentsViewer(configuration)
+ `configuration`: Smart Documents viewer creation options. It supports the same `baseUrl`, `token`, and `tokenKey` properties as `createSmartDocumentsDesigner`.

Returns a `Promise<SmartDocumentsViewer>`.

#### Smart Documents Viewer Instance Methods

- `viewDocument(documentId: string, domElement: HTMLElement): void`: Opens the specified document in the viewer and mounts it in the supplied element.
- `destroy(): void`: Releases the resources of the Smart Documents viewer instance.

### createSpreadsheetDesigner(configuration)
+ `configuration`: Spreadsheet designer creation options.
    - `baseUrl`: string, required; The Wyn Enterprise server URL.
    - `token`: string, required; The access token generated from the Admin portal.
    - `tokenKey`: string, not required; The query parameter key used for the token. The default is `token`.

Returns a `Promise<SpreadsheetDesigner>`.

#### Spreadsheet Designer Instance Methods

- `editDocument(documentId: string, domElement: HTMLElement): void`: Opens the specified spreadsheet in the designer and mounts it in the supplied element.
- `destroy(): void`: Releases the resources of the spreadsheet designer instance.

### createSpreadsheetViewer(configuration)
+ `configuration`: Spreadsheet viewer creation options. It supports the same `baseUrl`, `token`, and `tokenKey` properties as `createSpreadsheetDesigner`.

Returns a `Promise<SpreadsheetViewer>`.

#### Spreadsheet Viewer Instance Methods

- `viewDocument(documentId: string, domElement: HTMLElement): void`: Opens the specified spreadsheet in the viewer and mounts it in the supplied element.
- `destroy(): void`: Releases the resources of the spreadsheet viewer instance.

***
### createDatasetDesigner(options, selector)

+ `options`: dataset designer creation options.
    + `backendServer`: object, **required**; the Wyn Enterprise server information, If your integration and wyn server are not on the same site, you should provide your wyn server information.
        - `url`: string, **required**; The Wyn Enterprise server url. If your integration and wyn server are not on the same site, you should provide your wyn server host.
        - `token`: string, **required**; The access token. the token is generated from the Admin portal.
    - `siteTitle`: string, not required; the dataset designer site title.
    - `parentSelector`: HTMLElement, not required; The dataset designer parent html element selector.
    - `theme`: string, not required; The dataset designer theme.
    - `language`: string, not required; Set the language of the user interface, the acceptable values: 'zh', 'en', 'en-gb', 'zh-tw', 'pl'.
    - `showCloseButton`: string, not required; Show close dataset designer button.
    - `documentId`: string | null, not required; Set the dataset id to be opened.
    - `type`: string | null, not required; Set the dataset is direct or cached.
    + `events`: object | null, not required; Set the event about dataset creation.
        + `afterDocumentSave`: void function | null, not required; Set function after save the dataset document.
            - `success`: boolean, input parameter. Add dataset success.
            - `documentId`: string | null. input parameter; The dataset document id.
+ `selector`: the dom element selector.

### createDatasetViewer(options, selector)

+ `options`: dataset designer creation options.
    + `backendServer`: object, **required**; the Wyn Enterprise server information, If your integration and wyn server are not on the same site, you should provide your wyn server information.
        - `url`: string, **required**; The Wyn Enterprise server url. If your integration and wyn server are not on the same site, you should provide your wyn server host.
        - `token`: string, **required**; The access token. the token is generated from the Admin portal.
    - `siteTitle`: string, not required; the dataset designer site title.
    - `parentSelector`: HTMLElement, not required; The dataset designer parent html element selector.
    - `theme`: string, not required; The dataset designer theme.
    - `language`: string, not required; Set the language of the user interface, the acceptable values: 'zh', 'en', 'en-gb', 'zh-tw', 'pl'.
    - `documentId`: string, **required**; The preview dataset document id.
+ `selector`: the dom element selector.

### createDatasourceDesigner(options, selector)

+ `options`: datasource designer creation options.
    + `backendServer`: object, **required**; the Wyn Enterprise server information, If your integration and wyn server are not on the same site, you should provide your wyn server information.
        - `url`: string, **required**; The Wyn Enterprise server url. If your integration and wyn server are not on the same site, you should provide your wyn server host.
        - `token`: string, **required**; The access token. the token is generated from the Admin portal.
    - `siteTitle`: string, not required; the datasource designer site title.
    - `parentSelector`: HTMLElement, not required; The datasource designer parent html element selector.
    - `theme`: string, not required; The dataset datasource theme.
    - `language`: string, not required; Set the language of the user interface, the acceptable values: 'zh', 'en', 'en-gb', 'zh-tw', 'pl'.
    - `showCloseButton`: string, not required; Show close datasource designer button.
    - `documentId`: string | null, not required; Set the datasource id to be opened.
    - `inDataset`: boolean | null, not required; Create datasource in the dataset designer.
    + `afterClose`: void function | null, not required; Set function after close the datasource designer.
    + `events`: object | null, not required; Set the event about datasource creation.
        + `afterDocumentSave`: void function | null, not required; Set function after save the datasource document.
            - `success`: boolean, input parameter. Add datasource success.
            - `documentId`: string | null. input parameter; The datasource document Id.
+ `selector`: the dom element selector.

### createDatasourceViewer(options, selector)

+ `options`: datasource viewer creation options.
    + `backendServer`: object, **required**; the Wyn Enterprise server information, If your integration and wyn server are not on the same site, you should provide your wyn server information.
        - `url`: string, **required**; The Wyn Enterprise server url. If your integration and wyn server are not on the same site, you should provide your wyn server host.
        - `token`: string, **required**; The access token. the token is generated from the Admin portal.
    - `siteTitle`: string, not required; The datasource viewer site title.
    - `parentSelector`: HTMLElement, not required; The dataset viewer parent html element selector.
    - `theme`: string, not required; The datasource viewer theme.
    - `language`: string, not required; Set the language of the user interface, the acceptable values: 'zh', 'en', 'en-gb', 'zh-tw', 'pl'.
    - `documentId`: string, **required**; The preview datasource document id.
+ `selector`: the dom element selector.

### createSemanticDesigner(options, selector)

+ `options`: semantic designer creation options.
    + `backendServer`: object, **required**; the Wyn Enterprise server information, If your integration and wyn server are not on the same site, you should provide your wyn server information.
        - `url`: string, **required**; The Wyn Enterprise server url. If your integration and wyn server are not on the same site, you should provide your wyn server host.
        - `token`: string, **required**; The access token. the token is generated from the Admin portal.
    - `siteTitle`: string, not required; the semantic designer site title.
    - `parentSelector`: HTMLElement, not required; The semantic designer parent html element selector.
    - `theme`: string, not required; The semantic datasource theme.
    - `language`: string, not required; Set the language of the user interface, the acceptable values: 'zh', 'en', 'en-gb', 'zh-tw', 'pl'.
    - `showCloseButton`: string, not required; Show close semantic designer button.
    - `documentId`: string | null, not required; Set the semantic id to be opened.
    + `events`: object | null, not required; Set the event about semantic creation.
        + `afterDocumentSave`: void function | null, not required; Set function after save the semantic document.
            - `success`: boolean, input parameter. Add semantic success.
            - `documentId`: string | null. input parameter; The semantic document Id.
+ `selector`: the dom element selector.

### createDirectQueryModelDesigner(options, selector)

+ `options`: directQuery model designer creation options.
    + `backendServer`: object, **required**; the Wyn Enterprise server information, If your integration and wyn server are not on the same site, you should provide your wyn server information.
        - `url`: string, **required**; The Wyn Enterprise server url. If your integration and wyn server are not on the same site, you should provide your wyn server host.
        - `token`: string, **required**; The access token. the token is generated from the Admin portal.
    - `siteTitle`: string, not required; the directQuery model designer site title.
    - `parentSelector`: HTMLElement, not required; The directQuery model designer parent html element selector.
    - `theme`: string, not required; The directQuery model datasource theme.
    - `language`: string, not required; Set the language of the user interface, the acceptable values: 'zh', 'en', 'en-gb', 'zh-tw', 'pl'.
    - `showCloseButton`: string, not required; Show close directQuery model designer button.
    - `documentId`: string | null, not required; Set the directQuery model id to be opened.
    + `events`: object | null, not required; Set the event about directQuery model creation.
        + `afterDocumentSave`: void function | null, not required; Set function after save the directQuery model document.
            - `success`: boolean, input parameter. Add directQuery model success.
            - `documentId`: string | null. input parameter; The directQuery model document Id.
+ `selector`: the dom element selector.

### createCachedModelDesigner(options, selector)

+ `options`: cached Model designer creation options.
    + `backendServer`: object, **required**; the Wyn Enterprise server information, If your integration and wyn server are not on the same site, you should provide your wyn server information.
        - `url`: string, **required**; The Wyn Enterprise server url. If your integration and wyn server are not on the same site, you should provide your wyn server host.
        - `token`: string, **required**; The access token. the token is generated from the Admin portal.
    - `siteTitle`: string, not required; the cached Model designer site title.
    - `parentSelector`: HTMLElement, not required; The cached Model designer parent html element selector.
    - `theme`: string, not required; The cached Model datasource theme.
    - `language`: string, not required; Set the language of the user interface, the acceptable values: 'zh', 'en', 'en-gb', 'zh-tw', 'pl'.
    - `showCloseButton`: string, not required; Show close cached Model designer button.
    - `documentId`: string | null, not required; Set the cached Model id to be opened.
    + `events`: object | null, not required; Set the event about cached Model creation.
        + `afterDocumentSave`: void function | null, not required; Set function after save the cached Model document.
            - `success`: boolean, input parameter. Add cached Model success.
            - `documentId`: string | null. input parameter; The cached Model document Id.
+ `selector`: the dom element selector.

### createAnalysisViewer(options, selector)

+ `options`: analysis viewer creation options.
    + `backendServer`: object, **required**; the Wyn Enterprise server information, If your integration and wyn server are not on the same site, you should provide your wyn server information.
        - `url`: string, **required**; The Wyn Enterprise server url. If your integration and wyn server are not on the same site, you should provide your wyn server host.
        - `token`: string, **required**; The access token. the token is generated from the Admin portal.
    - `siteTitle`: string, not required; The datasource viewer site title.
    - `parentSelector`: HTMLElement, not required; The dataset viewer parent html element selector.
    - `theme`: string, not required; The datasource viewer theme.
    - `language`: string, not required; Set the language of the user interface, the acceptable values: 'zh', 'en', 'en-gb', 'zh-tw', 'pl'.
    - `documentId`: string, **required**; The preview direct query model or cached model document id.
+ `selector`: the dom element selector.

### createPushDatasetDesigner(options, selector)

+ `options`: pushDataset designer creation options.
    + `backendServer`: object, **required**; the Wyn Enterprise server information, If your integration and wyn server are not on the same site, you should provide your wyn server information.
        - `url`: string, **required**; The Wyn Enterprise server url. If your integration and wyn server are not on the same site, you should provide your wyn server host.
        - `token`: string, **required**; The access token. the token is generated from the Admin portal.
    - `siteTitle`: string, not required; the pushDataset designer site title.
    - `parentSelector`: HTMLElement, not required; The pushDataset designer parent html element selector.
    - `theme`: string, not required; The pushDataset designer theme.
    - `language`: string, not required; Set the language of the user interface, the acceptable values: 'zh', 'en', 'en-gb', 'zh-tw', 'pl'.
    - `showCloseButton`: string, not required; Show close pushDataset designer button.
    - `documentId`: string | null, not required; Set the pushDataset id to be opened.
    - `type`: string | null, not required; Set the pushDataset is direct or cached.
    + `events`: object | null, not required; Set the event about pushDataset creation.
        + `afterDocumentSave`: void function | null, not required; Set function after save the pushDataset document.
            - `success`: boolean, input parameter. Add pushDataset success.
            - `documentId`: string | null. input parameter; The pushDataset document id.
+ `selector`: the dom element selector.

### createNativeQueryDatasetDesigner(options, selector)

+ `options`: nativeQueryDataset designer creation options.
    + `backendServer`: object, **required**; the Wyn Enterprise server information, If your integration and wyn server are not on the same site, you should provide your wyn server information.
        - `url`: string, **required**; The Wyn Enterprise server url. If your integration and wyn server are not on the same site, you should provide your wyn server host.
        - `token`: string, **required**; The access token. the token is generated from the Admin portal.
    - `siteTitle`: string, not required; the nativeQueryDataset designer site title.
    - `parentSelector`: HTMLElement, not required; The nativeQueryDataset designer parent html element selector.
    - `theme`: string, not required; The nativeQueryDataset designer theme.
    - `language`: string, not required; Set the language of the user interface, the acceptable values: 'zh', 'en', 'en-gb', 'zh-tw', 'pl'.
    - `showCloseButton`: string, not required; Show close nativeQueryDataset designer button.
    - `documentId`: string | null, not required; Set the nativeQueryDataset id to be opened.
    - `type`: string | null, not required; Set the nativeQueryDataset is direct or cached.
    + `events`: object | null, not required; Set the event about nativeQueryDataset creation.
        + `afterDocumentSave`: void function | null, not required; Set function after save the nativeQueryDataset document.
            - `success`: boolean, input parameter. Add nativeQueryDataset success.
            - `documentId`: string | null. input parameter; The nativeQueryDataset document id.
+ `selector`: the dom element selector.

### createDirectQueryDatasetDesigner(options, selector)

+ `options`: directQueryDataset designer creation options.
    + `backendServer`: object, **required**; the Wyn Enterprise server information, If your integration and wyn server are not on the same site, you should provide your wyn server information.
        - `url`: string, **required**; The Wyn Enterprise server url. If your integration and wyn server are not on the same site, you should provide your wyn server host.
        - `token`: string, **required**; The access token. the token is generated from the Admin portal.
    - `siteTitle`: string, not required; the directQueryDataset designer site title.
    - `parentSelector`: HTMLElement, not required; The directQueryDataset designer parent html element selector.
    - `theme`: string, not required; The directQueryDataset designer theme.
    - `language`: string, not required; Set the language of the user interface, the acceptable values: 'zh', 'en', 'en-gb', 'zh-tw', 'pl'.
    - `showCloseButton`: string, not required; Show close directQueryDataset designer button.
    - `documentId`: string | null, not required; Set the directQueryDataset id to be opened.
    - `type`: string | null, not required; Set the directQueryDataset is direct or cached.
    + `events`: object | null, not required; Set the event about directQueryDataset creation.
        + `afterDocumentSave`: void function | null, not required; Set function after save the directQueryDataset document.
            - `success`: boolean, input parameter. Add directQueryDataset success.
            - `documentId`: string | null. input parameter; The directQueryDataset document id.
+ `selector`: the dom element selector.

### createStreamingDatasetDesigner(options, selector)

+ `options`: streamingDataset designer creation options.
    + `backendServer`: object, **required**; the Wyn Enterprise server information, If your integration and wyn server are not on the same site, you should provide your wyn server information.
        - `url`: string, **required**; The Wyn Enterprise server url. If your integration and wyn server are not on the same site, you should provide your wyn server host.
        - `token`: string, **required**; The access token. the token is generated from the Admin portal.
    - `siteTitle`: string, not required; the streamingDataset designer site title.
    - `parentSelector`: HTMLElement, not required; The streamingDataset designer parent html element selector.
    - `theme`: string, not required; The streamingDataset designer theme.
    - `language`: string, not required; Set the language of the user interface, the acceptable values: 'zh', 'en', 'en-gb', 'zh-tw', 'pl'.
    - `showCloseButton`: string, not required; Show close streamingDataset designer button.
    - `documentId`: string | null, not required; Set the streamingDataset id to be opened.
    - `type`: string | null, not required; Set the streamingDataset is direct or cached.
    + `events`: object | null, not required; Set the event about streamingDataset creation.
        + `afterDocumentSave`: void function | null, not required; Set function after save the streamingDataset document.
            - `success`: boolean, input parameter. Add streamingDataset success.
            - `documentId`: string | null. input parameter; The dataset document id.
+ `selector`: the dom element selector.
### createDocumentBinderDesigner(options, selector)

+ `options`: documentBinder designer creation options.
    + `backendServer`: object, **required**; the Wyn Enterprise server information, If your integration and wyn server are not on the same site, you should provide your wyn server information.
        - `url`: string, **required**; The Wyn Enterprise server url. If your integration and wyn server are not on the same site, you should provide your wyn server host.
        - `token`: string, **required**; The access token. the token is generated from the Admin portal.
    - `siteTitle`: string, not required; the documentBinder designer site title.
    - `parentSelector`: HTMLElement, not required; The documentBinder designer parent html element selector.
    - `theme`: string, not required; The documentBinder designer theme.
    - `language`: string, not required; Set the language of the user interface, the acceptable values: 'zh', 'en', 'en-gb', 'zh-tw', 'pl'.
    - `showCloseButton`: string, not required; Show close documentBinder designer button.
    - `documentId`: string | null, not required; Set the documentBinder id to be opened.
+ `selector`: the dom element selector.

### createDocumentBinderViewer(options, selector)

+ `options`: documentBinder viewer creation options.
    + `backendServer`: object, **required**; the Wyn Enterprise server information, If your integration and wyn server are not on the same site, you should provide your wyn server information.
        - `url`: string, **required**; The Wyn Enterprise server url. If your integration and wyn server are not on the same site, you should provide your wyn server host.
        - `token`: string, **required**; The access token. the token is generated from the Admin portal.
    - `siteTitle`: string, not required; the documentBinder viewer site title.
    - `parentSelector`: HTMLElement, not required; The documentBinder viewer parent html element selector.
    - `theme`: string, not required; The documentBinder viewer theme.
    - `language`: string, not required; Set the language of the user interface, the acceptable values: 'zh', 'en', 'en-gb', 'zh-tw', 'pl'.
    - `showCloseButton`: string, not required; Show close documentBinder viewer button.
    - `documentId`: string; Set the documentBinder id to be opened.
+ `selector`: the dom element selector.

### createETLQueryDesigner(options, selector)

+ `options`: ETL Query designer creation options.
    + `backendServer`: object, **required**; the Wyn Enterprise server information, If your integration and wyn server are not on the same site, you should provide your wyn server information.
        - `url`: string, **required**; The Wyn Enterprise server url. If your integration and wyn server are not on the same site, you should provide your wyn server host.
        - `token`: string, **required**; The access token. the token is generated from the Admin portal.
    - `siteTitle`: string, not required; the ETL Query designer site title.
    - `parentSelector`: HTMLElement, not required; The ETL Query designer parent html element selector.
    - `theme`: string, not required; The ETL Query designer theme.
    - `language`: string, not required; Set the language of the user interface, the acceptable values: 'zh', 'en', 'en-gb', 'zh-tw', 'pl'.
    - `showCloseButton`: string, not required; Show close ETL Query designer button.
    - `documentId`: string | null, not required; Set the ETL Query id to be opened.
+ `selector`: the dom element selector.

### createDataFlowDesigner(options, selector)

+ `options`: Data flow designer creation options.
    + `backendServer`: object, **required**; the Wyn Enterprise server information, If your integration and wyn server are not on the same site, you should provide your wyn server information.
        - `url`: string, **required**; The Wyn Enterprise server url. If your integration and wyn server are not on the same site, you should provide your wyn server host.
        - `token`: string, **required**; The access token. the token is generated from the Admin portal.
    - `siteTitle`: string, not required; the Data Flow designer site title.
    - `parentSelector`: HTMLElement, not required; The Data Flow designer parent html element selector.
    - `theme`: string, not required; The Data Flow designer theme.
    - `language`: string, not required; Set the language of the user interface, the acceptable values: 'zh', 'en', 'en-gb', 'zh-tw', 'pl'.
    - `showCloseButton`: string, not required; Show close Data Flow designer button.
    - `documentId`: string | null, not required; Set the Data Flow id to be opened.
+ `selector`: the dom element selector.

### createDataFileEntryViewer(options, selector)

+ `options`: data file viewer creation options.
    + `backendServer`: object, **required**; the Wyn Enterprise server information, If your integration and wyn server are not on the same site, you should provide your wyn server information.
        - `url`: string, **required**; The Wyn Enterprise server url. If your integration and wyn server are not on the same site, you should provide your wyn server host.
        - `token`: string, **required**; The access token. the token is generated from the Admin portal.
    - `siteTitle`: string, not required; the data file viewer site title.
    - `parentSelector`: HTMLElement, not required; The data file viewer parent html element selector.
    - `theme`: string, not required; The data file viewer theme.
    - `language`: string, not required; Set the language of the user interface, the acceptable values: 'zh', 'en', 'en-gb', 'zh-tw', 'pl'.
    - `documentId`: string, **required**; The preview data file document id.
+ `selector`: the dom element selector.

***
### createReportDesigner(options, selector)

The return type of this function is `Promise<DesignerApi>`. See https://learn.wynenterprise.com/docs/dev-docs/API-Documentation/wyn-enterprise-integration-api/Report-Designer-API#designer-api for available `DesignerApi` functionality.

+ `options`: report designer creation options.
    - `baseUrl`：string, **required**; The Wyn Enterprise server url. If your integration and wyn server are not on the same site, you should provide your wyn server host.
    - `token`: string, **required**; The access token. the token is generated from the Admin portal.
    - `language`: string, not required; Set the language of the user interface, the acceptable values: 'zh', 'en', 'en-gb', 'zh-tw', 'pl'.
    - `reportId`: string | null, not required; Set the report id to be opened.
    - `reportVersion`: number | null, not required; Set the report version to be opened. If not specified, the latest version is opened. Relevant only when `reportId` is defined.
    - `isReportTemplate`: boolean, not required; Set whether a report or a template is opened. Relevant only when `reportId` is defined.
    - `productTitle`: string, not required; Set your custom product title to be displayed in About dialog.
    - `productVersion`: string, not required; Set your custom product version to be displayed in About dialog. Relevant only when `productTitle` is defined.
    - `applicationTitle`: string, not required; Set your custom application title to be displayed in designer UI instead of the predefined title.
    - `reportViewer`: object, not required; Pass `{ disabled?: boolean; options?: object }` object where `options` include all properties from https://learn.wynenterprise.com/docs/dev-docs/API-Documentation/wyn-enterprise-integration-api/Report-Viewer-API#initvieweroptions except `element`, `portalUrl`, `referenceToken`, `locale`. If `disabled` is `true`, report cannot be previewed from designer.
    - other supported optional properties can be found at https://learn.wynenterprise.com/docs/dev-docs/API-Documentation/wyn-enterprise-integration-api/Report-Designer-API#designer-options (except `portalUrl`, `referenceToken`, `locale`, `openViewer`, `reportInfo`, `aboutInfo`).

+ `selector`: the dom element selector.

### createReportViewer(options, selector)

The return type of this function is `Promise<Viewer>`. See https://learn.wynenterprise.com/docs/dev-docs/API-Documentation/wyn-enterprise-integration-api/Report-Viewer-API#viewer for available `Viewer` functionality.

+ `options`: report viewer creation options.
    - `baseUrl`：string, **required**; The Wyn Enterprise server url. If your integration and wyn server are not on the same site, you should provide your wyn server host.
    - `token`: string, **required**; The access token. the token is generated from the Admin portal.
    - `language`: string, not required; Set the language of the user interface, the acceptable values: 'zh', 'en', 'en-gb', 'zh-tw', 'pl'.
    - `reportId`: string | null, not required; Set the report id to be opened.
    - `reportParameters`: array, not required; Pass the report parameters values as an array of `{ name: string; values: any[] }` pairs.
    - other supported optional properties can be found at https://learn.wynenterprise.com/docs/dev-docs/API-Documentation/wyn-enterprise-integration-api/Report-Viewer-API#initvieweroptions (except `element`, `portalUrl`, `referenceToken`, `locale`).

+ `selector`: the dom element selector.

***
### createDocumentPortal(options, selector)

+ `options`: document portal creation options.
    + `backendServer`: object, **required**; Wyn server information.
        - `url`: string, **required**; Wyn portal address.
        - `token`: string, **required**; Wyn Api authorization token.
    - `siteTitle`: string, optional; Browser tab page title.
    - `theme`: string, optional; Portal theme.
    - `language`: string, optional; Portal language, acceptable values: 'zh', 'en', 'en-gb', 'zh-tw', 'pl'.
    - `hideAvatarMenu`: boolean, optional; Whether to hide the avatar menu.
    - `hideWelcomeScreen`: boolean, optional; Whether to hide the welcome screen.
    - `hideNav`: boolean, optional; Whether to hide the navigation bar.
    - `hideNavDetail`: boolean, optional; Whether to hide the navigation bar details.
    - `hideNavLogo`: boolean, optional; Whether to hide the navigation bar logo.
    - `hidePrimaryNav`: boolean, optional; Whether to hide the primary navigation.
    - `entry`: string, optional; Portal entry, acceptable values: 'home', 'create', 'favorites', 'categories', 'monitoring', 'recycleBin', 'drafts', 'personalCategories'。
+ `selector`: the dom element selector.

### createResourcePortal(options, selector)

+ `options`: resource portal creation options.
    + `backendServer`: object, **required**; Wyn server information.
        - `url`: string, **required**; Wyn portal address.
        - `token`: string, **required**; Wyn Api authorization token.
    - `siteTitle`: string, optional; Browser tab page title.
    - `theme`: string, optional; Portal theme.
    - `language`: string, optional; Portal language, acceptable values: 'zh', 'en', 'en-gb', 'zh-tw', 'pl'.
    - `hideWelcomeScreen`: boolean, optional; Whether to hide the welcome screen.
    - `entry`: string, optional; Portal entry, acceptable values: 'categories', 'drafts', 'create', 'monitoring', 'recycleBin'. Also can be specific document type, acceptable values: 'datasource', 'dataModel', 'dataset', 'iot', 'dashboard', 'report', 'documentBinder', 'webpage', 'dashboardTemplate', 'vizTemplate', '3dScene', '3dModel', 'reportTemplate', 'reportMasterReport', 'languageResource'。
+ `selector`: the dom element selector.

### createAdminPortal(options, selector)

+ `options`: admin portal creation options.
    + `backendServer`: object, **required**; Wyn server information.
        - `url`: string, **required**; Wyn portal address.
        - `token`: string, **required**; Wyn Api authorization token.
    - `siteTitle`: string, optional; Browser tab page title.
    - `theme`: string, optional; Portal theme.
    - `language`: string, optional; Portal language, acceptable values: 'zh', 'en', 'en-gb', 'zh-tw', 'pl'.
    - `hideNavLogo`: boolean, optional; Whether to hide the navigation bar logo.
    - `entry`: string, optional; Portal entry, acceptable values: 'configuration', 'account', 'security', 'systemManagement', 'documents', 'search'.
+ `selector`: the dom element selector.
