@enplug/sdk-dashboard 5.4.61 → 5.4.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -3
- package/dist/dashboard.js +2 -1
- package/dist/dashboard.js.map +1 -1
- package/package.json +1 -1
- package/types/account.d.ts +1 -1
- package/types/external-types.d.ts +16 -0
package/README.md
CHANGED
|
@@ -82,9 +82,7 @@ Use [`enplug.dashboard`](/docs/sdk-dashboard/classes/Dashboard) to use standardi
|
|
|
82
82
|
|
|
83
83
|
*See more: [`enplug.dashboard`](/docs/sdk-dashboard/classes/Dashboard)*
|
|
84
84
|
|
|
85
|
-
###
|
|
86
|
-
|
|
87
|
-
For a code-grounded example of `enplug.dashboard.upload()` crossing iframe, Dashboard, uploader, persistence, canvas, and runtime-player boundaries, see [Dashboard docs](../../../dashboard/docs/menu-board-upload-architecture.md).
|
|
85
|
+
### upload integration
|
|
88
86
|
|
|
89
87
|
Upload options include `UploaderOptions.enableCropping`, which Dashboard forwards to the shared uploader to control destructive pre-upload crop/edit behavior.
|
|
90
88
|
|
package/dist/dashboard.js
CHANGED
|
@@ -639,7 +639,7 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_
|
|
|
639
639
|
* Creates a new theme under the current app definition.
|
|
640
640
|
* The new theme will be available to all users in the account.
|
|
641
641
|
*/
|
|
642
|
-
Account.prototype.saveTheme = function (theme) {
|
|
642
|
+
Account.prototype.saveTheme = function (theme, appId) {
|
|
643
643
|
utils_1.validateObject(theme, 'You must provide the theme (object) to save.');
|
|
644
644
|
utils_1.validateObject(theme.Value, 'You must provide the theme.Value (object) to save.');
|
|
645
645
|
return this.bridge.sendMessage({
|
|
@@ -647,6 +647,7 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_
|
|
|
647
647
|
name: internal_types_1.MessageNames.SaveTheme,
|
|
648
648
|
params: {
|
|
649
649
|
theme: theme,
|
|
650
|
+
appId: appId,
|
|
650
651
|
},
|
|
651
652
|
});
|
|
652
653
|
};
|
package/dist/dashboard.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack://enplug/webpack/bootstrap","webpack://enplug/./src/account.ts","webpack://enplug/./src/bridge/bridge-base.ts","webpack://enplug/./src/bridge/bridge.ts","webpack://enplug/./src/dashboard.ts","webpack://enplug/./src/index.ts","webpack://enplug/./src/internal-types.ts","webpack://enplug/./src/social.ts","webpack://enplug/./src/utils.ts"],"names":[],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;;;;ICzDA;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH;QAEE,gBAAgB;QAChB,iBAAoB,MAAkB;YAAlB,WAAM,GAAN,MAAM,CAAY;QAAI,CAAC;QAE3C;;;WAGG;QACH,4BAAU,GAAV;YACE,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC;gBAC7B,SAAS,EAAE,kCAAiB,CAAC,GAAG;gBAChC,IAAI,EAAE,6BAAY,CAAC,UAAU;aAC9B,CAAC,CAA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AC;IAJD,4CAIC","file":"dashboard.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/index.ts\");\n","import {\n Asset,\n DefaultAssetLevel,\n DeployDialogOptions,\n EnplugAccount,\n EnplugUser,\n FeedData,\n Layout,\n ThemeDefinition,\n ThemeAsset,\n FontDefinition,\n FontsApiItem,\n DefaultAsset,\n ZoningAppsResponse,\n ZoningConfig,\n AccountCustomPropertiesResponse,\n AccountInfoResponse,\n PaginationConfig,\n PaginationResponse,\n ReorderAssets,\n} from './external-types';\nimport { BridgeBase } from './bridge/bridge-base';\nimport { validateArray, validateObject, validateString } from './utils';\nimport { MessageNamespaces, MessageNames } from './internal-types';\n\n/**\n * Account API is a part of the Dashboard SDK used for managing assets, and other app, user and account related data.\n * Use global `enplug.account` object to access these methods.\n *\n * ```typescript title=\"Example usage of the Account API\"\n * const assets = await enplug.account.getAssets();\n * ```\n *\n * Among others, this API allows you to fetch and manipulate the assets:\n * - {@link getAssets|`enplug.account.getAssets()`} - fetch the asset list\n * - {@link getAssetsByIds|`enplug.account.getAssetsByIds()`} - fetch provided assets\n * - {@link saveAsset|`enplug.account.saveAsset()`} - creates/updates an asset, can display Deploy Dialog for editing\n * - {@link deleteAsset|`enplug.account.deleteAsset()`} - removes an asset\n * - {@link touchAsset|`enplug.account.touchAsset()`} - marks asset as recently viewed\n *\n * Other useful commands:\n * - {@link getAccount|`enplug.account.getAccount()`} - fetch current account data\n * - {@link getUser|`enplug.account.getUser()`} - fetch current user data\n * - {@link getThemes|`enplug.account.getThemes()`} - fetches list of themes\n * - {@link getTheme|`enplug.account.getTheme()`} - fetches theme\n * - {@link editTheme|`enplug.account.editTheme()`} - edits the theme\n * - {@link deleteTheme|`enplug.account.deleteTheme()`} - deletes the theme\n */\nexport class Account {\n\n /** @internal */\n constructor(private bridge: BridgeBase) { }\n\n /**\n * Loads all information for the current user. App instance ID,\n * account type, token, account ID, venue ID, and environment.\n */\n getAccount(): Promise<EnplugAccount> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.GetAccount,\n });\n }\n\n /**\n * Loads all information for the current user.\n */\n getUser(): Promise<EnplugUser> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.GetUser,\n });\n }\n\n /**\n * Loads information for the currently selected display group(s).\n *\n * @returns In the account context, it will return all Display Groups in the account;\n * in the Display Group context, it will return only this group’s information.\n */\n getDisplayGroups(): Promise<any[]> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.GetDisplayGroups,\n });\n }\n\n getSelectedDisplayId(): Promise<string> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.GetSelectedDisplayId,\n });\n }\n\n /**\n * Loads an array of assets for the current app instance.\n *\n * The list is also limited to the {@link setDisplaySelectorCallback|Display Group selector} dropdown's choice.\n *\n * @param T - Model of asset's value\n *\n * @returns Array of assets added by current app filtered by the {@link setDisplaySelectorCallback|Display Group selection} if it is set.\n */\n getAssets<T>(): Promise<Array<Asset<T>>> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.GetAssets,\n });\n }\n\n /**\n * Loads an array of assets for the current app instance.\n *\n * The list is also limited to the {@link setDisplaySelectorCallback|Display Group selector} dropdown's choice.\n *\n * @param T - Model of asset's value\n * @param options - These options implement the new pagination\n * @returns Array the assets and pagination object\n */\n getAssetsPagination<T>(options: PaginationConfig): Promise<{ Assets: Array<Asset<T>>; Pagination: PaginationResponse }> {\n const params: any = {};\n const booleanDefaults: { [key: string]: boolean } = {\n enableNewPagination: true,\n isPriority: true,\n isInactive: true,\n };\n\n if (options) {\n for (const key in options) {\n if (options.hasOwnProperty(key)) {\n const value = options[key];\n if (value === undefined) {\n params[key] = booleanDefaults[key] ? false : null;\n } else {\n params[key] = value;\n }\n }\n }\n }\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.GetAssetsPagination,\n params,\n });\n }\n\n /**\n * Reorders an array of assets for the current app instance.\n *\n * @param data - Object containing view, viewId, appId, and assets order.\n * @returns A promise resolving an array of reordered assets with `Id` and `Order`.\n */\n reorderAssets(data: ReorderAssets): Promise<Array<{ Id: string; Order: number }>> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.ReorderAssets,\n params: {\n ViewId: data.ViewId,\n AppId: data.AppId,\n Assets: data.Assets.map((asset) => ({\n Id: asset.Id,\n Order: asset.Order,\n })),\n },\n });\n }\n\n /**\n * Loads an array of assets by Ids.\n *\n * @param T - Model of asset's value\n * @param assetsIds - An array of ids of the assets that are to be returned.\n *\n * @returns Resolves to an array of requested assets.\n */\n getAssetsByIds<T>(assetsIds: string[]): Promise<Array<Asset<T>>> {\n validateArray(assetsIds, 'You must provide assetIds array to getAssetsByIds call');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.GetAssetsByIds,\n params: {\n assetsIds,\n },\n });\n }\n\n /**\n * Loads an array of assets for a specifig app instance.\n * Data is passed as the first param to the success callback.\n *\n * @param T - Model of asset's value\n * @param appId - An id of an app.\n */\n getAssetsForApp<T>(appId: string): Promise<Array<Asset<T>>> {\n validateString(appId, 'You must provide appId string to getAssetsForApp call');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.GetAssetsForApp,\n appId,\n });\n }\n\n /**\n * Loads a content-approval asset revision.\n *\n * @param T - Model of asset's value\n * @param assetId - ID of an asset\n * @param version - Version of the asset\n *\n * @returns Resolves to the provided revision of the asset.\n */\n getAssetRevision<T>(assetId: string, version: string): Promise<Asset<T>> {\n validateString(assetId, 'You must provide assetId string to getAssetRevision call');\n validateString(version, 'You must provide version string to getAssetRevision call');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.GetAssetRevision,\n params: {\n assetId,\n version,\n },\n });\n }\n\n /**\n * Creates an asset under the current app instance.\n * @param assets - An array of assets to create.\n * @param dialogOptions - An object with details about displaying the deploy dialog\n * and its content after save.\n *\n * @returns Resolves to list of saved assets as they came from the server.\n */\n bulkCreateAssets<T>(\n assets: Array<Asset<T>>,\n dialogOptions: DeployDialogOptions = {},\n ): Promise<Array<Asset<T>>> {\n validateArray(assets, 'You must provide an array of assets when creating new assets.');\n validateObject(assets[0], 'You must provide an array of assets (objects) when creating new assets.');\n if (assets[0]) {\n validateObject(assets[0].Value, 'You must provide a Value (object) when creating an asset.');\n }\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.BulkCreateAssets,\n params: {\n assets,\n dialogOptions,\n },\n });\n }\n\n /**\n * Creates an asset under the current app instance.\n * @param assets - An array of assets to deploy.\n * @param dialogOptions - An object with details about displaying the deploy dialog\n * and its content after save.\n *\n * @returns Resolves to list of saved assets as they came from the server.\n */\n bulkDeployAssets<T>(assets: Array<Asset<T>>, dialogOptions: DeployDialogOptions = {}): Promise<Array<Asset<T>>> {\n validateArray(assets, 'You must provide an array of assets when deploying assets.');\n validateObject(assets[0], 'You must provide an array of assets (objects) when deploying assets.');\n if (assets[0]) {\n validateObject(assets[0].Value, 'You must provide a Value (object) when deploying an asset.');\n validateString(assets[0].Id, 'You must provide the ID (string) on the asset you want to update.');\n }\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.BulkDeployAssets,\n params: {\n assets,\n dialogOptions,\n },\n });\n }\n\n /**\n * Creates or updates an asset. Can also be used to present the Deploy Dialog for changing asset's settings,\n * such as assigning to Display Groups or changing the scheduling.\n *\n * When saving a new asset (`asset.Id` not defined) it will open the Deploy Dialog.\n *\n * <br />\n * *Deploy Dialog*\n *\n * ```typescript title=\"Saving the asset\"\n * const dialogOptions: DeployDialogOptions = {\n * showSchedule: true,\n * scheduleOptions: {\n * showDuration: true\n * }\n * };\n *\n * const savedAsset = await enplug.account.saveAsset(asset, dialogOptions);\n * ```\n *\n * Saving an already existing asset will save it instantly without showing the Deploy Dialog.\n *\n * Another useful scenario is to allow the user to assign an existing asset to Display Groups or change the scheduling.\n * To achieve this, you can force showing the Deploy Dialog for an already saved asset, by adjusting the `dialogOptions`.\n * ```typescript title=\"Opening the Deploy Dialog to assign existing asset to Display Groups\"\n * const dialogOptions: DeployDialogOptions = {\n * showDeployDialog: true, // this forces the Deploy Dialog to appear for an already saved asset\n * showSchedule: true,\n * scheduleOptions: {\n * showDuration: true\n * }\n * };\n *\n * const savedAsset = await enplug.account.saveAsset(asset, dialogOptions);\n * ```\n * *See more: {@link DeployDialogOptions}*\n *\n * @param T - Model of Asset's value\n * @param asset - An asset to save.\n * @param dialogOptions - Used to configure the Deploy Dialog, which can be shown to\n * assign the asset to Display Groups or modify the scheduling options.\n *\n * @returns Promise resolving with the saved asset.\n */\n saveAsset<T>(asset: Asset<T>, dialogOptions: DeployDialogOptions = {}): Promise<Asset<T>> {\n validateObject(asset, 'You must provide an asset object to save.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.SaveAsset,\n params: {\n asset,\n dialogOptions,\n },\n });\n }\n\n saveAssetForApp<T>(appId: string, asset: Asset<T>, dialogOptions: DeployDialogOptions = {}) {\n validateString(appId, 'You must provide appId');\n validateObject(asset, 'You must provide an asset to save');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.SaveAsset,\n params: {\n asset,\n appId,\n dialogOptions,\n },\n });\n }\n\n /**\n * This is for saving an order of assets if needed for the current app. An array of asset IDs\n * is all that is needed, but the implementation also accepts an array of asset objects with `Id` string properties.\n *\n * @param T - Model of asset's value\n * @param assets - An array of assetIds or assets in order which is to be saved\n *\n * @returns Resolves if the order was successfully updated. Rejects otherwise.\n */\n updateAssetOrder<T>(assets: string[] | Array<Asset<T>>): Promise<void> {\n validateArray(assets, 'You must provide an array of assets (or asset ids) in the new order.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.UpdateAssetOrder,\n params: {\n assets,\n },\n });\n }\n\n /**\n * Deletes one or many assets under the current app instance.\n *\n * @param id - Id of an asset to delete. To delete multiple assets, an array of ids can be passed.\n *\n * @returns Resolves after successfully deleting the assets.\n */\n deleteAsset(id: string | string[]): Promise<void> {\n if (!Array.isArray(id)) {\n validateString(id, 'You must provide the ID (string) of the asset to delete.');\n id = [id];\n } else {\n validateArray(id, 'You must pass a single ID (string) or Array of asset IDs to be deleted.');\n validateString(id[0], 'You must provide at least one Asset ID (string) to be deleted.');\n }\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.DeleteAsset,\n params: {\n ids: id,\n },\n });\n }\n\n /**\n * Marks asset as recently viewed.\n */\n touchAsset(id: string): Promise<any> {\n validateString(id, 'You must provide an id string to touchAsset call');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.TouchAsset,\n params: { id },\n });\n }\n\n /**\n * Marks asset as needing approval.\n */\n getAssetNeedsApproval(id: string): Promise<any> {\n validateString(id, 'You must provide an id string to getAssetNeedsApproval call');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.GetAssetNeedsApproval,\n params: { id },\n });\n }\n\n /**\n * Loads an array of default assets for the current instance's app definition.\n *\n * @param T - Model of asset's value\n * @param level - 'Default', 'Network', 'Account'\n * @param levelId - NetworkId or AccountId\n *\n * @returns Resolves to an array of default assets.\n */\n getDefaultAssets<T>(level: DefaultAssetLevel = 'Default',\n levelId?: string): Promise<Array<DefaultAsset<T>>> {\n validateString(level, 'You must provide a level parameter that is either \"Default\", \"Network\", or \"Account\"');\n if (level !== 'Account' && level !== 'Network' && level !== 'Default') {\n throw new Error('You must provide a level parameter that is either \"Default\", \"Network\", or \"Account\"');\n }\n if (level === 'Account' || level === 'Network') {\n validateString(levelId, 'You must provide relevant id for the \"Account\" or \"Network\" level default assets');\n }\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.GetDefaultAssets,\n params: {\n level,\n levelId,\n },\n });\n }\n\n /**\n * @internal\n * Loads list of banner/ticker widget apps.\n */\n getZoningApps(): Promise<ZoningAppsResponse> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.GetZoningApps,\n });\n }\n\n /**\n * @internal\n * Loads widget assets used in a given zoning asset layout.\n */\n getZoningLayoutAssets(assetId: string): Promise<Array<Asset<any>>> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.GetZoningLayoutAssets,\n params: {\n assetId,\n },\n });\n }\n\n /**\n * @internal\n * Shows modal allowing to pick existing widget or create new.\n */\n acquireZoningWidget(\n zoningAssetId: string, slotConfig: ZoningConfig,\n widgetAppId: string, usedAssetsIds: string[],\n ): Promise<Asset<any>> {\n validateString(widgetAppId, 'You must provide an widgetAppId parameter');\n validateObject(slotConfig, 'You must provide an slotConfig parameter');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.AcquireZoningWidget,\n params: {\n zoningAssetId,\n slotConfig,\n widgetAppId,\n usedAssetsIds,\n },\n });\n }\n\n /**\n * @internal\n * Fetches zoning data available after adding/editing a widget.\n */\n editZoningWidget(\n zoningAssetId: string, slotConfig: ZoningConfig,\n widgetAppId: string, widgetAssetId: string,\n ): Promise<any> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.EditZoningWidget,\n params: {\n zoningAssetId,\n slotConfig,\n widgetAppId,\n widgetAssetId,\n },\n });\n }\n\n /**\n * @internal\n * Fetches zoning data available after adding/editing a widget.\n */\n getZoningData(): Promise<any> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.GetZoningData,\n });\n }\n\n /**\n * Loads the list of available fonts for the current app or for specified appId.\n *\n * ```typescript title=\"Loading the list of fonts\"\n * const { fonts } = await enplug.account.getFonts();\n * console.log('List of available fonts', fonts);\n * ```\n *\n * @param appId - ID of app for which the font list should be fetched. If not provided, the fonts for current app will be loaded.\n *\n * @returns Resolves to an object: `{ fonts: FontsApiItem[] }`. See: {@link FontsApiItem}.\n */\n getFonts(appId?: string): Promise<{ fonts: FontsApiItem[] }> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.GetFonts,\n params: {\n appId,\n },\n });\n }\n\n /**\n * Loads available themes for the current app or for specified appId.\n */\n getThemes<T>(appId?: string): Promise<Array<ThemeAsset<T>>> {\n return this.bridge.sendMessage<{ themes: Array<ThemeAsset<T>> }>({\n namespace: MessageNamespaces.App,\n name: MessageNames.GetThemes,\n params: {\n appId,\n },\n }).then(({ themes }) => themes);\n }\n\n /**\n * Loads theme by id.\n * @param themeId - An id of a theme\n */\n getTheme<T>(id: string): Promise<ThemeAsset<T>> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.GetTheme,\n params: {\n id,\n },\n });\n }\n\n /**\n * Creates a new theme under the current app instance app definition.\n * The new theme will be available only under the current user's account.\n * @returns callId\n */\n editTheme<AssetValue, FeedType>(\n themeDefinition: ThemeDefinition,\n theme: ThemeAsset<any>,\n previewUrl: string,\n previewAsset?: Array<Asset<AssetValue>>,\n layout?: Layout | ZoningConfig,\n fonts?: FontDefinition[],\n feedData?: FeedData<FeedType>,\n ): Promise<ThemeAsset<AssetValue>> {\n validateObject(themeDefinition, 'You must provide the theme definition (object).');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.EditTheme,\n params: {\n themeDefinition,\n theme,\n previewUrl,\n previewAsset,\n layout,\n fonts,\n feedData,\n },\n });\n }\n\n /**\n * Creates a new theme under the current app definition.\n * The new theme will be available to all users in the account.\n */\n saveTheme(theme: ThemeAsset<any>): Promise<any> {\n validateObject(theme, 'You must provide the theme (object) to save.');\n validateObject(theme.Value, 'You must provide the theme.Value (object) to save.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.SaveTheme,\n params: {\n theme,\n },\n });\n }\n\n /**\n * Deletes a theme from the current user's account for\n * the current app definition. Cannot remove default themes.\n */\n deleteTheme(themeId: string): Promise<any> {\n validateString(themeId, 'You must provide the ID (string) of the theme to remove.');\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.DeleteTheme,\n params: {\n themeId,\n },\n });\n }\n\n /**\n * Returns flag status on account.\n */\n hasFeatureFlag(flagName: string): Promise<any> {\n validateString(flagName, 'You must provide the flag name (string).');\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.HasFeatureFlag,\n params: {\n flagName,\n },\n });\n }\n\n /**\n * Retrieve all custom display group properties on an account.\n */\n getDisplayGroupCustomProperties(): Promise<AccountCustomPropertiesResponse[]> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.GetDisplayGroupCustomProperties,\n });\n }\n\n /**\n * Returns account info such as network type and billing\n */\n loadAccount(): Promise<AccountInfoResponse> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.LoadAccount,\n });\n }\n\n /**\n * Creates an asset history.\n *\n * @param T - Model of Asset's current version value\n * @param asset - An asset to save.\n *\n * @returns Promise resolving with the saved asset version.\n */\n createAssetVersion<T>(asset: Asset<T>): Promise<Asset<T>> {\n validateObject(asset, 'You must provide an asset object to save.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.CreateAssetVersion,\n params: {\n asset,\n },\n });\n }\n\n /**\n * Loads an array of assetHistory records by Asset Ids.\n *\n * @param assetsIds - An array of ids of the assets which histories will be returned.\n *\n * @returns Resolves to an array of requested hitory assets per assetId.\n */\n getAssetsHistoryByAssetId<T>(assetsIds: string[]): Promise<Array<Asset<T>>> {\n validateArray(assetsIds, 'You must provide assetIds array to getAssetsHistoryByAssetId call');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.GetAssetsHistoryByAssetId,\n params: {\n assetsIds,\n },\n });\n }\n\n /**\n * Loads an array of assetHistory records by Ids.\n *\n * @param historyIds - An array of ids of the asset histories that will be returned.\n *\n * @returns Resolves to an array of requested hitory assets.\n */\n getAssetsHistoryById<T>(historyIds: string[]): Promise<Array<Asset<T>>> {\n validateArray(historyIds, 'You must provide assetIds array to getAssetsHistoryById call');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.GetAssetsHistoryByAssetId,\n params: {\n historyIds,\n },\n });\n }\n\n\n /**\n * Deletes one or many assetHistory records under the current app instance.\n *\n * @param id - Id of an assetHistory to delete. To delete multiple assetsHistories, an array of ids can be passed.\n *\n * @returns Resolves after successfully deleting the assetHistory.\n */\n deleteAssetHistory(id: string | string[]): Promise<void> {\n if (!Array.isArray(id)) {\n validateString(id, 'You must provide the ID (string) of the assetHistory to delete.');\n id = [id];\n } else {\n validateArray(id, 'You must pass a single ID (string) or Array of assetHistory IDs to be deleted.');\n validateString(id[0], 'You must provide at least one AssetHistory ID (string) to be deleted.');\n }\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.DeleteAssetHistory,\n params: {\n ids: id,\n },\n });\n }\n\n /**\n * Restores an asset version.\n *\n * @param T - Model of Asset's current version value\n * @param asset - An asset to restore.\n *\n * @returns Promise resolving with the restored asset version.\n */\n restoreVersion<T>(asset: Asset<T>): Promise<Asset<T>> {\n validateObject(asset, 'You must provide an asset snapshot object to restore the version.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.RestoreVersion,\n params: {\n asset,\n },\n });\n }\n\n duplicateAsset<T>(asset: Asset<T>, dialogOptions: DeployDialogOptions = {}): Promise<Asset<T>> {\n validateObject(asset, 'You must provide an asset object to duplicate.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.DuplicateAsset,\n params: {\n asset,\n dialogOptions,\n },\n });\n }\n}\n","import { InboundMessage, OutboundMessage, PendingCallInfo } from '../internal-types';\n\n/**\n * Facilitates communication between the dashboard and app's iframe.\n */\n\nconst TAG = '[Dashboard SDK|Bridge]';\n\nexport abstract class BridgeBase {\n\n protected postMessage: (msg: OutboundMessage) => void;\n private pendingCalls: Map<number, PendingCallInfo> = new Map();\n private callCount = 0;\n\n constructor(window: Window) { }\n\n sendMessage<T>(message: OutboundMessage, persistentCallback?: (...args) => void): Promise<T> {\n return new Promise<T>((resolve, reject) => {\n // Increment call count and assign call Id\n message.callId = ++this.callCount;\n\n // Transient requests do not expect a response. In this case we don't store pending call data.\n if (!message.transient) {\n // Persistent messages will resolve multiple times. Therefore they cannot use promises,\n // as promises are single-use. For persistent calls, we pass a callback.\n if (message.persistent) {\n this.pendingCalls.set(message.callId,\n { resolve: persistentCallback, reject: persistentCallback, persistent: message.persistent });\n } else {\n this.pendingCalls.set(message.callId, { resolve, reject, persistent: message.persistent });\n }\n }\n\n if (this.postMessage) {\n this.postMessage(message);\n }\n });\n }\n\n /**\n * Receives and parses a message from the dashboard.\n * @param event - An event coming from calling `postMessage` on the App's frame.\n * @returns Whether to allow the event to be handled by another event handler.\n */\n protected receiveMessage(event: MessageEvent): boolean {\n if (event && event.type === 'message' && typeof event.data === 'string') {\n try {\n const response = JSON.parse(event.data) as InboundMessage;\n return this.dispatchResponse(response);\n } catch (e) {\n // ignore\n }\n }\n }\n\n /**\n * Decides what to do with an incoming message.\n * @param response - A dashboard's response to App's call.\n * @returns Whether to allow the event to ne handled by another event handler.\n */\n protected dispatchResponse(response: InboundMessage): boolean {\n if (response.callId && typeof response.success === 'boolean') {\n const { resolve, reject, persistent } = this.pendingCalls.get(response.callId);\n if (resolve && reject) {\n\n // If the call is not persistent, delete the pending call info from the map.\n if (!persistent) {\n this.pendingCalls.delete(response.callId);\n }\n\n if (response.success) {\n resolve(response.data);\n } else {\n reject(response.data);\n }\n return false;\n }\n }\n }\n\n abstract setWindowEventHandler(eventName: string, handler: (event: Event) => void): void;\n}\n","import { BridgeBase } from './bridge-base';\nimport { OutboundMessage } from '../internal-types';\n\nconst TAG = '[Dashboard SDK]';\n\nexport class Bridge extends BridgeBase {\n\n protected postMessage: (msg: OutboundMessage) => void;\n\n constructor(private window: Window) {\n super(window);\n window.addEventListener('message', this.receiveMessage.bind(this), false);\n this.postMessage = (msg) => window.parent.postMessage(JSON.stringify(msg), '*');\n console.log(`${TAG} Creating Dashboard SDK`);\n }\n\n setWindowEventHandler(eventName: string, handler: (event: Event) => void): void {\n this.window.addEventListener(eventName, handler);\n }\n}\n","import {\n Asset,\n Button,\n DisplaySelectorCallback,\n FeedData,\n Layout,\n OpenConfirmOptions,\n ThemeAsset,\n EncodingStatusResult,\n UploaderOptions,\n UploadedFileResult,\n ApiDataConnectorOptions,\n DataConnectionConfig,\n AssetPreviewRequest,\n AssetPreviewData,\n} from './external-types';\nimport { BridgeBase } from './bridge/bridge-base';\nimport { validateArray, validateBool, validateFunction, validateObject, validateString } from './utils';\nimport { MessageNamespaces, MessageNames } from './internal-types';\n\n/**\n * Dashboard API is a part of the Dashboard SDK. It can be used to present standardized User Interface elements.\n * Use global `enplug.dashboard` object to access these methods.\n *\n * ```typescript title=\"Example usage of the Dashboard API\"\n * enplug.dashboard.pageLoading(false);\n * ```\n *\n * **Useful commands**\n *\n * Header section:\n * - {@link setHeaderTitle|`enplug.dashboard.setHeaderTitle()`} - sets header title\n * - {@link setHeaderButtons|`enplug.dashboard.setHeaderButtons()`} - sets header buttons\n * - {@link setDisplaySelectorCallback|`enplug.dashboard.setDisplaySelectorCallback()`} - sets Display Group selector callback\n * - {@link setDisplaySelectorVisibility|`enplug.dashboard.setDisplaySelectorVisibility()`} - sets Display Group selector visibility\n *\n * Progress indicator:\n * - {@link pageLoading|`enplug.dashboard.pageLoading()`} - sets the app's loader visibility\n * - {@link loadingIndicator|`enplug.dashboard.loadingIndicator()`} - shows **Loading** indicator\n * - {@link successIndicator|`enplug.dashboard.successIndicator()`} - shows **Success** indicator\n * - {@link errorIndicator|`enplug.dashboard.errorIndicator()`} - shows **Error** indicator\n *\n * Dialogs:\n * - {@link previewAsset|`enplug.dashboard.previewAsset()`} - shows asset preview\n * - {@link upload|`enplug.dashboard.upload()`} - shows upload dialog\n * - {@link openConfirm|`enplug.dashboard.openConfirm()`} - shows custom confirmation dialog\n * - {@link confirmUnsavedChanges|`enplug.dashboard.confirmUnsavedChanges()`} - shows unsaved changes dialog\n * - {@link setAppHasUnsavedChanges|`enplug.dashboard.setAppHasUnsavedChanges()`} - sets dashboard's navigation guard\n */\nexport class Dashboard {\n /**\n * The buttons most recently registered with the dashboard header.\n * Stored locally so that we can respond to click events\n */\n private currentButtons: { [key: string]: Button } = {};\n\n /**\n * Keeps track of whether the dashboard is loading mode so clients can check.\n */\n private isLoadingCache = true;\n\n /** @internal */\n constructor(private bridge: BridgeBase) {\n this.bridge.setWindowEventHandler('click', () => {\n this.click();\n return true;\n });\n }\n\n /**\n * @internal\n * Notifies the parent dashboard of a click in the child iframe. Used to close\n * dropdown windows, etc. which were opened in parent window and are unable to\n * respond to click events in child iframe.\n *\n * Event handler is automatically bound when the SDK is created.\n */\n click(): void {\n this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.Click,\n transient: true,\n });\n }\n\n /**\n * Opens a confirm window asking the user to confirm their unsaved changes.\n *\n * ```typescript title=\"Presenting Unsaved Changes dialog\"\n * try {\n * await enplug.dashboard.confirmUnsavedChanges();\n * // user confirmed - take action\n * } catch {\n * // user cancelled\n * }\n * ```\n *\n * <br />\n * *Unsaved Changes dialog*\n *\n * @returns Resolves if dialog was confirmed, rejects otherwise.\n */\n confirmUnsavedChanges(): Promise<any> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.ConfirmUnsavedChanges,\n });\n }\n\n /**\n * Shows the error indicator.\n *\n * ```typescript title=\"Presenting the error indicator\"\n * enplug.dashboard.errorIndicator('Asset could not be removed');\n * ```\n *\n * \n * *Error indicator*\n *\n * @param message - A message to show in the error toast.\n *\n * @returns Resolves after the error indicator shows up on screen.\n */\n errorIndicator(message: string): Promise<any> {\n validateString(message, 'Error indicator requires an error message (string)');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.ErrorIndicator,\n params: message,\n });\n }\n\n /**\n * Synchronously returns the current loading state.\n * Updated asynchronously when this sender receives an acknowledgement\n * of successful SDK call from the dashboard.\n *\n * @see {@link pageLoading} to update the page loading state.\n *\n * @returns Current page loading state.\n */\n isLoading(): boolean {\n return this.isLoadingCache;\n }\n\n /**\n * Turns on the progress indicator, typically used during asynchronous actions.\n *\n * :::note\n * Note that the progress indicator will continue until a call is made to the\n * {@link errorIndicator} or {@link successIndicator} APIs.\n * :::\n *\n * ```typescript title=\"Presenting the loading indicator\"\n * enplug.dashboard.loadingIndicator('Removing asset');\n * ```\n *\n * \n * *Loading indicator*\n *\n * @param message - A message to show in the loading toast.\n *\n * @returns Resolves after the loading indicator shows up on screen.\n */\n loadingIndicator(message: string): Promise<void> {\n validateString(message, 'Loading indicator requires a loading message (string)');\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.LoadingIndicator,\n params: message,\n });\n }\n\n /**\n * Navigate to given relative dashboard URL.\n */\n navigateToUrl(url: string): Promise<any> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.NavigateToUrl,\n params: { url },\n });\n }\n\n /**\n * Navigate back to zoning from widget.\n * @param assetId - optional, fallback parameter for v1-\\>v2 transition phase\n */\n navigateToZoning(assetId?: string): Promise<any> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.NavigateToZoning,\n params: { assetId },\n });\n }\n\n /**\n * Opens a confirm window with Yes/No buttons and configurable messages.\n *\n * ```typescript title=\"Presenting confirmation dialog\"\n * try {\n * await enplug.dashboard.openConfirm({\n * title: 'Delete asset?',\n * text: 'Are you sure you want to delete this asset? This action cannot be undone.',\n * cancelText: 'Cancel',\n * confirmText: 'Delete',\n * confirmClass: 'btn-danger'\n * });\n *\n * // remove the asset\n * } catch {\n * // user cancelled\n * }\n * ```\n *\n * <br />\n * *Confirm dialog*\n *\n * @param options - Confirm dialog options.\n *\n * @returns Resolves if Confirm button was clicked, rejects otherwise.\n */\n openConfirm(options: OpenConfirmOptions): Promise<any> {\n validateObject(options, 'Confirm box requires options to be set (object).');\n\n if (options) {\n validateString(options.title, 'Confirm box requires options.title to be set (string).');\n validateString(options.text, 'Confirm box requires options.text to be set (string).');\n }\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.OpenConfirm,\n params: options,\n });\n }\n\n /**\n * Puts the page into error state.\n *\n * <br />\n * *Page error*\n *\n * @returns Resolves after the Dashboard shows the page error.\n */\n pageError(): Promise<void> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.PageError,\n });\n }\n\n /**\n * Controls the loading state for the entire page. Every application starts off in\n * loading state, and must set `pageLoading(false)` to notify the dashboard that it\n * has successfully loaded.\n *\n * ```typescript title=\"Turning off the loading spinner after app has started\"\n * enplug.dashboard.pageLoading(false);\n * ```\n *\n * <br />\n * *Page Loading spinner*\n *\n * @param isLoading - Page loading state:<br />\n * `false` - hides the loader and shows the app,<br />\n * `true` - shows the loader and hides the app.\n *\n * @returns Resolves after the loading state has been updated by the Dashboard.\n */\n pageLoading(isLoading: boolean): Promise<boolean> {\n validateBool(isLoading, 'Page loading status must be a boolean.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.PageLoading,\n params: isLoading,\n }).then((loading: boolean) => {\n this.isLoadingCache = loading;\n return loading;\n });\n }\n\n /**\n * Puts the page into not found (404) state.\n *\n * <br />\n * *Page not available*\n *\n * @returns Resolves when after the Dashboard shows the page not found error.\n */\n pageNotFound(): Promise<void> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.PageNotFound,\n });\n }\n\n /**\n * @deprecated use {@link previewAsset}\n *\n * Opens app preview modal.\n */\n preview<AssetValue, ThemeValue, FeedType>(\n url: string,\n asset: Asset<AssetValue>,\n theme: ThemeAsset<ThemeValue>,\n layout?: Layout,\n feedData?: FeedData<FeedType>): Promise<any> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.Preview,\n params: {\n url,\n asset,\n theme,\n layout,\n feedData,\n },\n });\n }\n\n /**\n * Opens asset preview modal.\n *\n * <br />\n * *Asset preview modal*\n *\n * ```typescript title=\"Previewing an asset\"\n * function showPreview(asset: Asset<AssetModel>) {\n * enplug.dashboard.previewAsset({ asset });\n * }\n * ```\n *\n * The above code opens the preview dialog with provided data.\n * This method allows many preview customizations, see {@link AssetPreviewRequest}.\n *\n * :::note\n * The app inside of the preview modal is presented in an iframe and the app is provided with basic SDK functionalities\n * needed to display the asset only. The app's Player URL from app's definition will be used.\n * The app is not run in a WebPlayer environment, so the behavior might be different.\n * Most SDK calls will have no effect.\n * :::\n *\n * @param TAssetValue - Model of asset's value\n * @param TThemeValue - Model of theme's value (optional)\n * @param TFeedType - Model of the feed (used for social apps)\n *\n * @returns Resolves after the preview modal gets closed.\n */\n previewAsset<TAssetValue = any, TThemeValue = any, TFeedType = any>(\n request: AssetPreviewRequest<TAssetValue, TThemeValue, TFeedType>): Promise<void> {\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.PreviewAsset,\n params: { ...request },\n });\n }\n\n /**\n * @internal\n * Get preview parameters for an app asset for custom preview handling.\n * @param origin - (default: true) - custom origin url, when omitted or falsy, `window.location.origin` will be attached\n */\n getAssetPreviewData(appId: string, asset: Asset<any>, origin?: string | boolean): Promise<AssetPreviewData> {\n validateString(appId, 'appId must be a string.');\n validateObject(asset, 'asset must be an instance of Asset<any>.');\n validateString(origin, 'origin must be a string.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.GetAssetPreviewData,\n params: {\n appId,\n asset,\n origin,\n },\n });\n }\n\n /**\n * Sets the current callback for the title bar breadcrumb Display Group selector dropdown.\n * Attaching a callback enables the dropdown and resets the title.\n *\n * The callback is fired when a Display Group is selected from the dropdown, the callback will get the ID\n * value when a single display is fired, or null when the whole 'Library' selection.\n *\n * ```typescript title=\"Setting up the Display Group selector\"\n * enplug.dashboard.setDisplaySelectorCallback(async () => {\n * // update your asset list using enplug.account.getAssets() which will return\n * // the assets assigned to the selected Display Group only\n * yourAssetList = await enplug.account.getAssets();\n * });\n * ```\n *\n * <br />\n * *Display Group selector dropdown*\n *\n * @param callback - A function to be called every time a user changes current Display Group\n * with the dropdown selector. The callback should reload the asset list to get the filtered version.\n *\n * @returns Promise which resolves after the command gets executed by the Dashboard.\n */\n setDisplaySelectorCallback(callback: DisplaySelectorCallback): Promise<void> {\n validateFunction(callback, 'To enable the display selector in the page title you must supply a callback function.');\n\n this.currentDisplayCallback = callback;\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.SetDisplaySelectorCallback,\n params: callback,\n persistent: true,\n }, (display: string) => {\n if (typeof this.currentDisplayCallback === 'function' && display !== undefined) {\n this.currentDisplayCallback(display);\n }\n\n return display;\n });\n }\n\n /**\n * Hides or shows the Display Group dropdown selector in the page title breadcrumb bar.\n * Send true to show the selector, false to hide it.\n *\n * The Display Group selector dropdown can be used to filter assets currently deployed to a specific Display Group.\n * You can view all the saved assets by account for your app by selecting the 'Library' view from the dropdown on the upper left.\n *\n * \n * *Display Group selector dropdown*\n *\n * @returns Promise which resolves after the command gets executed by the Dashboard.\n */\n setDisplaySelectorVisibility(show: boolean): Promise<void> {\n validateBool(show, 'Setting the display selector visibility requires a boolean argument, true to show or false to hide.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.SetDisplaySelectorVisibility,\n params: show,\n });\n }\n\n /**\n * Sets the action buttons for a page in the titlebar.\n *\n * Accepts either a single button object, or an array of buttons.\n * Each button must have a button.action callback.\n *\n * ```typescript title=\"Updating the buttons\"\n * function updateButtons(hasUnsavedChanges: boolean) {\n * enplug.dashboard.setHeaderButtons([{\n * text: 'My Signs',\n * action: () => { \\/* your code to navigate back to the Asset list *\\/ },\n * class: 'btn-default'\n * }, {\n * text: 'Save',\n * action: () => { \\/* your code saving the asset *\\/ },\n * class: 'btn-primary',\n * disabled: !hasUnsavedChanges // this will disable the button if there are no unsaved changes\n * }]);\n * }\n * ```\n *\n * <br />\n * *Header buttons*\n *\n * @param buttons - A button (single or array) to set on a header.\n *\n * @returns Resolves after the buttons get updated.\n */\n setHeaderButtons(buttons: Button[] | Button): Promise<void> {\n if (typeof buttons !== 'object') {\n throw new Error('Header buttons must be an object (single) or array (multiple).');\n }\n\n // Reset current buttons.\n this.currentButtons = {};\n\n buttons = Array.isArray(buttons) ? buttons : [buttons];\n\n for (const button of buttons) {\n validateObject(button, 'Header buttons must be objects.');\n if (button) {\n validateFunction(button.action, 'Header button must have an action (function).');\n\n // The button ID is used to identify which button was clicked in this service\n button.id = 'button-' + (Math.round(Math.random() * (10000 - 1) + 1));\n this.currentButtons[button.id] = button;\n }\n }\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.SetHeaderButtons,\n params: buttons,\n persistent: true,\n }, (clicked: Button) => {\n if (clicked) {\n const button = this.currentButtons[clicked.id];\n if (button) {\n button.action();\n } else {\n console.warn('Unrecognized button click:', clicked);\n }\n }\n return clicked;\n });\n }\n\n /**\n * Sets the last part of the title bar breadcrumb.\n * Set an empty title '' to clear the title.\n * Re-setting this value wipes out the old one.\n *\n * The home/default page for an app should have no title set.\n *\n * ```typescript title=\"Updating header's title\"\n * enplug.dashboard.setHeaderTitle('Setup');\n * ```\n *\n * \n * *Header title section*\n *\n * @param title - A title to set.\n *\n * @returns Resolves after the title has been modified.\n */\n setHeaderTitle(title: string): Promise<void> {\n validateString(title, 'Header title must be a string.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.SetHeaderTitle,\n params: title,\n });\n }\n\n /**\n * Shows the success indicator.\n *\n * ```typescript title=\"Presenting the success indicator\"\n * enplug.dashboard.successIndicator('Asset removed');\n * ```\n *\n * \n * *Success indicator*\n *\n * @param message - A message to show in the success toast.\n *\n * @returns Resolves after the success indicator shows up on screen.\n */\n successIndicator(message: string): Promise<void> {\n validateString(message, 'Success indicator requires a success message (string)');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.SuccessIndicator,\n params: message,\n });\n }\n\n /**\n * Switches to account view \"Library\"/All selection of instance selector or Display Group view.\n */\n switchToView(displayGroupId: string, displayGroupName: string): Promise<any> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.SwitchToView,\n params: {\n displayGroupId,\n displayGroupName,\n },\n });\n }\n\n /**\n * Uses upload interface and Enplug encoding service, returns uploaded object\n * @param options - Filepicker options\n */\n upload(options: UploaderOptions): Promise<UploadedFileResult[]> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.Upload,\n params: options,\n });\n }\n\n /**\n * Uses connect data interface, returns connection configuration object.\n * @param options - API Data Connector configuration options.\n */\n connectData(options: ApiDataConnectorOptions | ApiDataConnectorOptions[]): Promise<DataConnectionConfig> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.ConnectData,\n params: options,\n });\n }\n\n\n /**\n * @internal\n * Returns current encoding status of an asset.\n * @deprecated legacy FileStack upload flow\n * @see resourcesEncodingStatus\n */\n encodeStatus(url: string): Promise<any> {\n validateString(url, 'You must provide the url (string).');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.EncodeStatus,\n params: url,\n });\n }\n\n /**\n * Returns current encoding statuses of resources or asset IDs.\n * @param byAssetId - If `true`, the provided IDs are interpreted as asset IDs, otherwise they are resource IDs.\n */\n resourcesEncodingStatus(ids: string[], byAssetId = false): Promise<EncodingStatusResult[]> {\n validateArray(ids, 'You must provide an array of ids (strings).');\n validateBool(byAssetId, 'You must provide the boolean byAssetId. True to interpret the ids as asset ids, when false as resource ids.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.ResourcesEncodingStatus,\n params: {\n ids,\n byAssetId,\n },\n });\n }\n\n /**\n * Opens content interval settings dialog for Ad Scheduler app.\n */\n openContentIntervalSettingsDialog(appName: string, level: string, levelId: string): Promise<any> {\n validateString(appName, 'You must provide the appName (string).');\n validateString(level, 'You must provide the level (string).');\n validateString(levelId, 'You must provide the levelId (string).');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.OpenContentIntervalSettingsDialog,\n params: {\n appName,\n level,\n levelId,\n },\n });\n }\n\n /**\n * Opens dialog to copy templates across different accounts\n */\n openCopyTemplatesDialog<T>(appId: string, assets: Array<Asset<T>>): Promise<any> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.OpenCopyTemplatesDialog,\n params: {\n appId,\n assets,\n },\n });\n }\n\n /**\n * Lets dashboard know that the state of user changes in the app changed.\n *\n * @param hasUnsavedChanges - Whether the app has unsaved changes.\n */\n setAppHasUnsavedChanges(hasUnsavedChanges: boolean): Promise<any> {\n validateBool(hasUnsavedChanges, 'To report changes to the dashboard you must supply a value.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.SetAppHasUnsavedChanges,\n transient: true,\n params: {\n hasUnsavedChanges,\n },\n });\n }\n\n /**\n * Creates new assets and begins encoding process\n */\n processAssetResource<T>(accountId: string, appId: string, assets: Array<Asset<T>>): Promise<any> {\n validateString(accountId, 'You must provide the accountId (string).');\n validateString(appId, 'You must provide the appId (string).');\n validateArray(assets, 'You must provide the assets (array).');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.ProcessAssetResource,\n params: {\n accountId,\n appId,\n assets,\n },\n });\n }\n\n /**\n * The last callback registered with the dashboard title bar.\n */\n private currentDisplayCallback: DisplaySelectorCallback = (displayId: string) => { };\n\n /**\n * Sends a boolean to know when to show or hide the Administrative Screen Breadcrumb\n */\n showAdministrativeBreadcrumb(showBreadcrumb: boolean): Promise<any> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.ShowAdministrativeBreadcrumb,\n params: {\n showBreadcrumb,\n },\n });\n }\n\n /**\n * Sends a string to know which type of breadcrumb we are going to display in the dashboard\n */\n breadCrumbType(breadCrumbType: string): Promise<any> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.BreadCrumbType,\n params: {\n breadCrumbType,\n },\n });\n }\n}\n","import { Account } from './account';\nimport { Bridge } from './bridge/bridge';\nimport { Dashboard } from './dashboard';\nimport { EnplugDashboardSDK } from './sdk';\nimport { Social } from './social';\n/**\n * This file is an entry point to the Enplug Dashboard SDK,\n * a piece of software required for Enplug Dashboard apps to communicate with Enplug.\n */\n\ndeclare global {\n interface Window {\n enplug: EnplugDashboardSDK;\n }\n}\n\nfunction createDashboardSDK(): EnplugDashboardSDK {\n const bridge = new Bridge(window);\n const sdk: EnplugDashboardSDK = {\n account: new Account(bridge),\n dashboard: new Dashboard(bridge),\n social: new Social(bridge),\n };\n window.enplug = sdk;\n return sdk;\n}\n\nexport default createDashboardSDK();\n","/**\n * Internal types, not to be re-exported.\n */\nexport interface InboundMessage {\n /**\n * Namespace of the event.\n */\n namespace: string;\n\n /**\n * Whether the request was a successful one.\n */\n success: boolean;\n\n /**\n * An id of the call.\n */\n callId: number;\n\n /**\n * Data returned by the dashboard. Type depends on the call type.\n */\n data?: string;\n}\n\nexport interface OutboundMessage {\n /**\n * An id of the call. Gets incremented with every sent message.\n * Used internally to match responses to their respective calls.\n */\n callId?: number;\n\n /**\n * The namespace that the event belongs to.\n */\n namespace: string;\n\n /**\n * Name of the event.\n */\n name: string;\n\n /**\n * Id of an app that the request concerns.\n */\n appId?: string;\n\n /**\n * Parameters of the call. Abitrary, depend on a call.\n */\n params?: any;\n\n /**\n * For the calls that expect multiple responses.\n */\n persistent?: boolean;\n\n /**\n * A callback that persistent messages will call every time their response comes.\n */\n callback?: (...args) => void;\n\n /**\n * For the calls that expect no responses.\n */\n transient?: boolean;\n}\n\nexport interface PendingCallInfo {\n /**\n * A method to resolve call's promise.\n */\n resolve: (...args) => any;\n\n /**\n * A method to reject call's promise.\n */\n reject: (...args) => any;\n\n /**\n * A flag indicating whether the SDK should stop listening for more responses after the first arrives.\n */\n persistent: boolean;\n}\n\nexport enum MessageNamespaces {\n App = 'app',\n Social = 'social',\n Dashboard = 'dashboard',\n}\n\nexport enum MessageNames {\n GetAccount = 'app.getAccount',\n GetUser = 'app.getUser',\n GetDisplayGroups = 'app.getDisplays',\n GetSelectedDisplayId = 'app.getSelectedDisplayId',\n GetAssets = 'app.getAssets',\n GetAssetsPagination = 'app.getAssetsPagination',\n ReorderAssets = 'app.reorderAssets',\n GetAssetsByIds = 'app.getAssetsByIds',\n GetAssetsForApp = 'app.getAssetsForApp',\n GetAssetRevision = 'app.getAssetRevision',\n BulkCreateAssets = 'app.bulkCreateAssets',\n BulkDeployAssets = 'app.bulkDeployAssets',\n SaveAsset = 'app.saveAsset',\n UpdateAssetOrder = 'app.updateAssetOrder',\n DeleteAsset = 'app.deleteAsset',\n TouchAsset = 'app.touchAsset',\n GetAssetNeedsApproval = 'app.getAssetNeedsApproval',\n GetDefaultAssets = 'app.getDefaultAssets',\n GetZoningApps = 'app.getZoningApps',\n AcquireZoningWidget = 'app.acquireZoningWidget',\n GetZoningData = 'app.getZoningData',\n EditZoningWidget = 'app.editZoningWidget',\n GetZoningLayoutAssets = 'app.getZoningLayoutAssets',\n GetFonts = 'app.getFonts',\n GetThemes = 'app.getThemes',\n GetTheme = 'app.getTheme',\n EditTheme = 'app.editTheme',\n SaveTheme = 'app.saveTheme',\n DeleteTheme = 'app.deleteTheme',\n HasFeatureFlag = 'app.hasFeatureFlag',\n GetDisplayGroupCustomProperties = 'app.getDisplayGroupCustomProperties',\n AppUrlChanged = 'app.appUrlChanged',\n LoadAccount = 'app.loadAccount',\n Click = 'dashboard.click',\n ConfirmUnsavedChanges = 'dashboard.unsavedChanges',\n ErrorIndicator = 'dashboard.indicator.error',\n LoadingIndicator = 'dashboard.indicator.loading',\n NavigateToZoning = 'dashboard.navigateToZoning',\n NavigateToUrl = 'dashboard.navigateToUrl',\n OpenConfirm = 'dashboard.confirm',\n PageError = 'dashboard.page.error',\n PageLoading = 'dashboard.page.loading',\n PageNotFound = 'dashboard.page.notFound',\n Preview = 'dashboard.preview',\n GetAssetPreviewData = 'dashboard.getAssetPreviewData',\n PreviewAsset = 'dashboard.previewAsset',\n SetDisplaySelectorCallback = 'dashboard.set.selectorCallback',\n SetDisplaySelectorVisibility = 'dashboard.set.selectorEnabled',\n SetHeaderButtons = 'dashboard.set.buttons',\n SetHeaderTitle = 'dashboard.set.title',\n ShowAdministrativeBreadcrumb = 'dashboard.showAdministrativeBreadcrumb',\n BreadCrumbType = 'dashboard.breadCrumbType',\n SuccessIndicator = 'dashboard.indicator.success',\n SwitchToView = 'dashboard.switchToView',\n Upload = 'dashboard.upload',\n ConnectData = 'dashboard.connectData',\n EditDataConnection = 'dashboard.editDataConnection',\n EncodeStatus = 'dashboard.encodeStatus',\n ResourcesEncodingStatus = 'dashboard.resourcesEncodingStatus',\n OpenContentIntervalSettingsDialog = 'dashboard.openContentIntervalSettingsDialog',\n OpenCopyTemplatesDialog = 'dashboard.openCopyTemplatesDialog',\n SetAppHasUnsavedChanges = 'dashboard.appHasUnsavedChanges',\n ClearQueryString = 'social.clearQueryString',\n AuthInstagram = 'social.authInstagram',\n AuthSlack = 'social.authSlack',\n AuthenticateSlack = 'social.authenticateSlack',\n AuthenticateTeamsUser = 'social.authenticateTeamsUser',\n AuthenticateTeamsAdmin = 'social.authenticateTeamsAdmin',\n GetInstagramAccounts = 'social.getInstagramAccounts',\n TwitterSubscriptionStatus = 'social.twitterSubscriptionStatus',\n LookupTwitterId = 'social.lookupTwitterId',\n GetSlackTeams = 'social.getSlackTeams',\n GetSlackChannels = 'social.getSlackChannels',\n GetTeamsChannels = 'social.getTeamsChannels',\n AddFacebookPage = 'social.addFacebookPage',\n GetFeeds = 'social.getFeeds',\n SaveFeed = 'social.saveFeed',\n DeleteFeed = 'social.deleteFeed',\n OpenPreapprovalDialog = 'social.openPreapprovalDialog',\n LoadAllItems = 'social.loadAllItems',\n ApproveItem = 'social.approveItem',\n RemoveItem = 'social.removeItem',\n FavoriteItem = 'social.favoriteItem',\n UnfavoriteItem = 'social.unfavoriteItem',\n BanItem = 'social.banItem',\n LoadBlacklist = 'social.loadBlacklist',\n UnbanUser = 'social.unbanUser',\n RefreshFeed = 'social.refreshFeed',\n CreateAssetVersion = 'app.createAssetVersion',\n GetAssetsHistoryById = 'app.getAssetsHistoryById',\n GetAssetsHistoryByAssetId = 'app.getAssetsHistoryByAssetId',\n DeleteAssetHistory = 'app.deleteAssetHistory',\n RestoreVersion = 'app.restoreVersion',\n RefreshTwitterFeed = 'social.refreshTwitterFeed',\n ProcessAssetResource = 'dashboard.processAssetResource',\n DuplicateAsset = 'app.duplicateAsset'\n}\n","import { BridgeBase } from './bridge/bridge-base';\nimport { MessageNames, MessageNamespaces } from './internal-types';\nimport { PreapprovalDialogOptions, SocialItemsResponse, TwitterSubscriptionStatusResponse } from './external-types';\nimport { validateObject, validateString } from './utils';\n\n/**\n * Social API is a part of the Dashboard SDK used to access social media related data.\n * Use global `enplug.social` object to access these methods.\n */\nexport class Social {\n /** @internal */\n constructor(private bridge: BridgeBase) { }\n\n clearQueryString(): Promise<any> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.ClearQueryString,\n });\n }\n\n authInstagram(accessToken: string): Promise<any> {\n validateString(accessToken, 'No authCode provided.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.AuthInstagram,\n params: {\n accessToken,\n },\n });\n }\n\n /* OBSOLETE. REMOVE AFTER 2020 */\n authSlack(verificationCode: string, redirectUrl: string): Promise<any> {\n validateString(verificationCode, 'No Slack auth token provided');\n validateString(redirectUrl, 'No redirect url provided');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.AuthSlack,\n params: {\n verificationCode,\n redirectUrl,\n },\n });\n }\n\n authenticateSlack(verificationCode: string, redirectUrl: string): Promise<any> {\n validateString(verificationCode, 'No Slack auth token provided');\n validateString(redirectUrl, 'No redirect url provided');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.AuthenticateSlack,\n params: {\n verificationCode,\n redirectUrl,\n },\n });\n }\n\n authenticateTeamsUser(verificationCode: string, redirectUrl: string): Promise<any> {\n validateString(verificationCode, 'No Teams User auth token provided');\n validateString(redirectUrl, 'No redirect url provided');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.AuthenticateTeamsUser,\n params: {\n verificationCode,\n redirectUrl,\n },\n });\n }\n\n /**\n * Saves Teams Admin token to backend.\n * @param tenantId - A user id returned from MS Teams after authenticating.\n */\n authenticateTeamsAdmin(tenantId: string): Promise<any> {\n validateString(tenantId, 'No Teams Admin auth token provided');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.AuthenticateTeamsAdmin,\n params: {\n tenantId,\n },\n });\n }\n\n getInstagramAccounts(userId: string): Promise<any> {\n validateString(userId, 'No Facebook User Id provided');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.GetInstagramAccounts,\n params: {\n userId,\n },\n });\n }\n\n lookupTwitterId(username: string): Promise<any> {\n validateString(username, 'No username provided');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.LookupTwitterId,\n params: username,\n });\n }\n\n twitterSubscriptionStatus(): Promise<TwitterSubscriptionStatusResponse> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.TwitterSubscriptionStatus,\n });\n }\n\n getSlackTeams(): Promise<any> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.GetSlackTeams,\n });\n }\n\n getSlackChannels(teamId: string): Promise<any> {\n validateString(teamId, 'No teamId provided');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.GetSlackChannels,\n params: teamId,\n });\n }\n\n /**\n * Returns Channels available for a given user ID.\n * @param tenantId - An ID returned after authenticating the user with MS Teams.\n */\n getTeamsChannels(tenantId: string): Promise<any> {\n validateString(tenantId, 'No tenantId provided');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.GetTeamsChannels,\n params: tenantId,\n });\n }\n\n addFacebookPage(feedId: string, pageId: string, accessToken: string): Promise<any> {\n validateString(feedId, 'No feedId provided');\n validateString(pageId, 'No pageId provided');\n validateString(accessToken, 'No accessToken provided');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.AddFacebookPage,\n params: {\n feedId,\n pageId,\n accessToken,\n },\n });\n }\n\n getFeeds(assetId: string): Promise<any> {\n validateString(assetId, 'No assetid provided.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.GetFeeds,\n params: assetId,\n });\n }\n\n saveFeed(feed: any): Promise<any> {\n validateObject(feed, 'No feed provided.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.SaveFeed,\n params: feed,\n });\n }\n\n deleteFeed(feedId: string): Promise<any> {\n validateString(feedId, 'No feedId provided.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.DeleteFeed,\n params: feedId,\n });\n }\n\n openPreapprovalDialog(feed: any, iconUrl: string, options?: PreapprovalDialogOptions): Promise<any> {\n validateObject(feed, 'No feed provided.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.OpenPreapprovalDialog,\n params: {\n feed,\n iconUrl,\n options,\n },\n });\n }\n\n loadAllItems(assetId: string): Promise<SocialItemsResponse> {\n validateString(assetId, 'No assetId provided.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.LoadAllItems,\n params: assetId,\n });\n }\n\n approveItem(itemId: string, assetId: string): Promise<any> {\n validateString(itemId, 'No itemId provided.');\n validateString(assetId, 'No assetId provided.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.ApproveItem,\n params: {\n itemId,\n assetId,\n },\n });\n }\n\n removeItem(itemId: string, assetId: string): Promise<any> {\n validateString(itemId, 'No itemId provided.');\n validateString(assetId, 'No assetId provided.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.RemoveItem,\n params: {\n itemId,\n assetId,\n },\n });\n }\n\n favoriteItem(itemId: string, assetId: string, network: string): Promise<void> {\n validateString(itemId, 'No itemId provided.');\n validateString(assetId, 'No assetId provided.');\n validateString(network, 'No network provided.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.FavoriteItem,\n params: {\n itemId,\n assetId,\n network,\n },\n });\n }\n\n unfavoriteItem(itemId: string, assetId: string, network: string): Promise<any> {\n validateString(itemId, 'No itemId provided.');\n validateString(assetId, 'No assetId provided.');\n validateString(network, 'No network provided.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.UnfavoriteItem,\n params: {\n itemId,\n assetId,\n network,\n },\n });\n }\n\n banItem(itemId: string, assetId: string): Promise<any> {\n validateString(itemId, 'No itemId provided.');\n validateString(assetId, 'No assetId provided.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.BanItem,\n params: {\n itemId,\n assetId,\n },\n });\n }\n\n loadBlacklist(accountId: string, socialNetwork: string): Promise<any> {\n validateString(accountId, 'No accountId provided.');\n validateString(socialNetwork, 'No socialNetwork provided.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.LoadBlacklist,\n params: {\n accountId,\n socialNetwork,\n },\n });\n }\n\n unbanUser(username: string, socialNetwork: string, accountId: string): Promise<any> {\n validateString(username, 'No username provided.');\n validateString(socialNetwork, 'No socialNetwork provided.');\n validateString(accountId, 'No accountId provided.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.UnbanUser,\n params: {\n username,\n socialNetwork,\n accountId,\n },\n });\n }\n\n /**\n * Gets new Facebook posts\n */\n refreshFeed(feedId: string): Promise<any> {\n validateString(feedId, 'No feedId provided.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.RefreshFeed,\n params: feedId,\n });\n }\n\n /**\n * Gets new Twitter posts\n */\n refreshTwitterFeed(assetId: string, feedId: string): Promise<any> {\n validateString(assetId, 'No assetId provided.');\n validateString(feedId, 'No feedId provided.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.RefreshTwitterFeed,\n params: {\n assetId,\n feedId,\n },\n });\n }\n}\n","const TAG = '[Dashboard SDK]';\n\nexport function validateArray(arg: any, message: string) {\n if (!Array.isArray(arg)) {\n throw new Error(`${TAG} ${message}`);\n }\n}\n\nexport function validateString(arg: any, message: string) {\n if (typeof arg !== 'string') {\n throw new Error(`${TAG} ${message}`);\n }\n}\n\nexport function validateObject(arg: any, message: string) {\n if (!(arg instanceof Object) || arg instanceof Array) {\n throw new Error(`${TAG} ${message}`);\n }\n}\n\nexport function validateBool(arg: any, message: string) {\n if (typeof arg !== 'boolean') {\n throw new Error(`${TAG} ${message}`);\n }\n}\n\nexport function validateFunction(arg: any, message) {\n if (typeof arg !== 'function') {\n throw new Error(`${TAG} ${message}`);\n }\n}\n"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["webpack://enplug/webpack/bootstrap","webpack://enplug/./src/account.ts","webpack://enplug/./src/bridge/bridge-base.ts","webpack://enplug/./src/bridge/bridge.ts","webpack://enplug/./src/dashboard.ts","webpack://enplug/./src/index.ts","webpack://enplug/./src/internal-types.ts","webpack://enplug/./src/social.ts","webpack://enplug/./src/utils.ts"],"names":[],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;;;;ICzDA;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH;QAEE,gBAAgB;QAChB,iBAAoB,MAAkB;YAAlB,WAAM,GAAN,MAAM,CAAY;QAAI,CAAC;QAE3C;;;WAGG;QACH,4BAAU,GAAV;YACE,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC;gBAC7B,SAAS,EAAE,kCAAiB,CAAC,GAAG;gBAChC,IAAI,EAAE,6BAAY,CAAC,UAAU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AAG,SAAI,OAAS,CAAC,CAAC;SACtC;IACH,CAAC;IAJD,4CAIC","file":"dashboard.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/index.ts\");\n","import {\n Asset,\n DefaultAssetLevel,\n DeployDialogOptions,\n EnplugAccount,\n EnplugUser,\n FeedData,\n Layout,\n ThemeDefinition,\n ThemeAsset,\n FontDefinition,\n FontsApiItem,\n DefaultAsset,\n ZoningAppsResponse,\n ZoningConfig,\n AccountCustomPropertiesResponse,\n AccountInfoResponse,\n PaginationConfig,\n PaginationResponse,\n ReorderAssets,\n} from './external-types';\nimport { BridgeBase } from './bridge/bridge-base';\nimport { validateArray, validateObject, validateString } from './utils';\nimport { MessageNamespaces, MessageNames } from './internal-types';\n\n/**\n * Account API is a part of the Dashboard SDK used for managing assets, and other app, user and account related data.\n * Use global `enplug.account` object to access these methods.\n *\n * ```typescript title=\"Example usage of the Account API\"\n * const assets = await enplug.account.getAssets();\n * ```\n *\n * Among others, this API allows you to fetch and manipulate the assets:\n * - {@link getAssets|`enplug.account.getAssets()`} - fetch the asset list\n * - {@link getAssetsByIds|`enplug.account.getAssetsByIds()`} - fetch provided assets\n * - {@link saveAsset|`enplug.account.saveAsset()`} - creates/updates an asset, can display Deploy Dialog for editing\n * - {@link deleteAsset|`enplug.account.deleteAsset()`} - removes an asset\n * - {@link touchAsset|`enplug.account.touchAsset()`} - marks asset as recently viewed\n *\n * Other useful commands:\n * - {@link getAccount|`enplug.account.getAccount()`} - fetch current account data\n * - {@link getUser|`enplug.account.getUser()`} - fetch current user data\n * - {@link getThemes|`enplug.account.getThemes()`} - fetches list of themes\n * - {@link getTheme|`enplug.account.getTheme()`} - fetches theme\n * - {@link editTheme|`enplug.account.editTheme()`} - edits the theme\n * - {@link deleteTheme|`enplug.account.deleteTheme()`} - deletes the theme\n */\nexport class Account {\n\n /** @internal */\n constructor(private bridge: BridgeBase) { }\n\n /**\n * Loads all information for the current user. App instance ID,\n * account type, token, account ID, venue ID, and environment.\n */\n getAccount(): Promise<EnplugAccount> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.GetAccount,\n });\n }\n\n /**\n * Loads all information for the current user.\n */\n getUser(): Promise<EnplugUser> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.GetUser,\n });\n }\n\n /**\n * Loads information for the currently selected display group(s).\n *\n * @returns In the account context, it will return all Display Groups in the account;\n * in the Display Group context, it will return only this group’s information.\n */\n getDisplayGroups(): Promise<any[]> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.GetDisplayGroups,\n });\n }\n\n getSelectedDisplayId(): Promise<string> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.GetSelectedDisplayId,\n });\n }\n\n /**\n * Loads an array of assets for the current app instance.\n *\n * The list is also limited to the {@link setDisplaySelectorCallback|Display Group selector} dropdown's choice.\n *\n * @param T - Model of asset's value\n *\n * @returns Array of assets added by current app filtered by the {@link setDisplaySelectorCallback|Display Group selection} if it is set.\n */\n getAssets<T>(): Promise<Array<Asset<T>>> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.GetAssets,\n });\n }\n\n /**\n * Loads an array of assets for the current app instance.\n *\n * The list is also limited to the {@link setDisplaySelectorCallback|Display Group selector} dropdown's choice.\n *\n * @param T - Model of asset's value\n * @param options - These options implement the new pagination\n * @returns Array the assets and pagination object\n */\n getAssetsPagination<T>(options: PaginationConfig): Promise<{ Assets: Array<Asset<T>>; Pagination: PaginationResponse }> {\n const params: any = {};\n const booleanDefaults: { [key: string]: boolean } = {\n enableNewPagination: true,\n isPriority: true,\n isInactive: true,\n };\n\n if (options) {\n for (const key in options) {\n if (options.hasOwnProperty(key)) {\n const value = options[key];\n if (value === undefined) {\n params[key] = booleanDefaults[key] ? false : null;\n } else {\n params[key] = value;\n }\n }\n }\n }\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.GetAssetsPagination,\n params,\n });\n }\n\n /**\n * Reorders an array of assets for the current app instance.\n *\n * @param data - Object containing view, viewId, appId, and assets order.\n * @returns A promise resolving an array of reordered assets with `Id` and `Order`.\n */\n reorderAssets(data: ReorderAssets): Promise<Array<{ Id: string; Order: number }>> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.ReorderAssets,\n params: {\n ViewId: data.ViewId,\n AppId: data.AppId,\n Assets: data.Assets.map((asset) => ({\n Id: asset.Id,\n Order: asset.Order,\n })),\n },\n });\n }\n\n /**\n * Loads an array of assets by Ids.\n *\n * @param T - Model of asset's value\n * @param assetsIds - An array of ids of the assets that are to be returned.\n *\n * @returns Resolves to an array of requested assets.\n */\n getAssetsByIds<T>(assetsIds: string[]): Promise<Array<Asset<T>>> {\n validateArray(assetsIds, 'You must provide assetIds array to getAssetsByIds call');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.GetAssetsByIds,\n params: {\n assetsIds,\n },\n });\n }\n\n /**\n * Loads an array of assets for a specifig app instance.\n * Data is passed as the first param to the success callback.\n *\n * @param T - Model of asset's value\n * @param appId - An id of an app.\n */\n getAssetsForApp<T>(appId: string): Promise<Array<Asset<T>>> {\n validateString(appId, 'You must provide appId string to getAssetsForApp call');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.GetAssetsForApp,\n appId,\n });\n }\n\n /**\n * Loads a content-approval asset revision.\n *\n * @param T - Model of asset's value\n * @param assetId - ID of an asset\n * @param version - Version of the asset\n *\n * @returns Resolves to the provided revision of the asset.\n */\n getAssetRevision<T>(assetId: string, version: string): Promise<Asset<T>> {\n validateString(assetId, 'You must provide assetId string to getAssetRevision call');\n validateString(version, 'You must provide version string to getAssetRevision call');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.GetAssetRevision,\n params: {\n assetId,\n version,\n },\n });\n }\n\n /**\n * Creates an asset under the current app instance.\n * @param assets - An array of assets to create.\n * @param dialogOptions - An object with details about displaying the deploy dialog\n * and its content after save.\n *\n * @returns Resolves to list of saved assets as they came from the server.\n */\n bulkCreateAssets<T>(\n assets: Array<Asset<T>>,\n dialogOptions: DeployDialogOptions = {},\n ): Promise<Array<Asset<T>>> {\n validateArray(assets, 'You must provide an array of assets when creating new assets.');\n validateObject(assets[0], 'You must provide an array of assets (objects) when creating new assets.');\n if (assets[0]) {\n validateObject(assets[0].Value, 'You must provide a Value (object) when creating an asset.');\n }\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.BulkCreateAssets,\n params: {\n assets,\n dialogOptions,\n },\n });\n }\n\n /**\n * Creates an asset under the current app instance.\n * @param assets - An array of assets to deploy.\n * @param dialogOptions - An object with details about displaying the deploy dialog\n * and its content after save.\n *\n * @returns Resolves to list of saved assets as they came from the server.\n */\n bulkDeployAssets<T>(assets: Array<Asset<T>>, dialogOptions: DeployDialogOptions = {}): Promise<Array<Asset<T>>> {\n validateArray(assets, 'You must provide an array of assets when deploying assets.');\n validateObject(assets[0], 'You must provide an array of assets (objects) when deploying assets.');\n if (assets[0]) {\n validateObject(assets[0].Value, 'You must provide a Value (object) when deploying an asset.');\n validateString(assets[0].Id, 'You must provide the ID (string) on the asset you want to update.');\n }\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.BulkDeployAssets,\n params: {\n assets,\n dialogOptions,\n },\n });\n }\n\n /**\n * Creates or updates an asset. Can also be used to present the Deploy Dialog for changing asset's settings,\n * such as assigning to Display Groups or changing the scheduling.\n *\n * When saving a new asset (`asset.Id` not defined) it will open the Deploy Dialog.\n *\n * <br />\n * *Deploy Dialog*\n *\n * ```typescript title=\"Saving the asset\"\n * const dialogOptions: DeployDialogOptions = {\n * showSchedule: true,\n * scheduleOptions: {\n * showDuration: true\n * }\n * };\n *\n * const savedAsset = await enplug.account.saveAsset(asset, dialogOptions);\n * ```\n *\n * Saving an already existing asset will save it instantly without showing the Deploy Dialog.\n *\n * Another useful scenario is to allow the user to assign an existing asset to Display Groups or change the scheduling.\n * To achieve this, you can force showing the Deploy Dialog for an already saved asset, by adjusting the `dialogOptions`.\n * ```typescript title=\"Opening the Deploy Dialog to assign existing asset to Display Groups\"\n * const dialogOptions: DeployDialogOptions = {\n * showDeployDialog: true, // this forces the Deploy Dialog to appear for an already saved asset\n * showSchedule: true,\n * scheduleOptions: {\n * showDuration: true\n * }\n * };\n *\n * const savedAsset = await enplug.account.saveAsset(asset, dialogOptions);\n * ```\n * *See more: {@link DeployDialogOptions}*\n *\n * @param T - Model of Asset's value\n * @param asset - An asset to save.\n * @param dialogOptions - Used to configure the Deploy Dialog, which can be shown to\n * assign the asset to Display Groups or modify the scheduling options.\n *\n * @returns Promise resolving with the saved asset.\n */\n saveAsset<T>(asset: Asset<T>, dialogOptions: DeployDialogOptions = {}): Promise<Asset<T>> {\n validateObject(asset, 'You must provide an asset object to save.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.SaveAsset,\n params: {\n asset,\n dialogOptions,\n },\n });\n }\n\n saveAssetForApp<T>(appId: string, asset: Asset<T>, dialogOptions: DeployDialogOptions = {}) {\n validateString(appId, 'You must provide appId');\n validateObject(asset, 'You must provide an asset to save');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.SaveAsset,\n params: {\n asset,\n appId,\n dialogOptions,\n },\n });\n }\n\n /**\n * This is for saving an order of assets if needed for the current app. An array of asset IDs\n * is all that is needed, but the implementation also accepts an array of asset objects with `Id` string properties.\n *\n * @param T - Model of asset's value\n * @param assets - An array of assetIds or assets in order which is to be saved\n *\n * @returns Resolves if the order was successfully updated. Rejects otherwise.\n */\n updateAssetOrder<T>(assets: string[] | Array<Asset<T>>): Promise<void> {\n validateArray(assets, 'You must provide an array of assets (or asset ids) in the new order.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.UpdateAssetOrder,\n params: {\n assets,\n },\n });\n }\n\n /**\n * Deletes one or many assets under the current app instance.\n *\n * @param id - Id of an asset to delete. To delete multiple assets, an array of ids can be passed.\n *\n * @returns Resolves after successfully deleting the assets.\n */\n deleteAsset(id: string | string[]): Promise<void> {\n if (!Array.isArray(id)) {\n validateString(id, 'You must provide the ID (string) of the asset to delete.');\n id = [id];\n } else {\n validateArray(id, 'You must pass a single ID (string) or Array of asset IDs to be deleted.');\n validateString(id[0], 'You must provide at least one Asset ID (string) to be deleted.');\n }\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.DeleteAsset,\n params: {\n ids: id,\n },\n });\n }\n\n /**\n * Marks asset as recently viewed.\n */\n touchAsset(id: string): Promise<any> {\n validateString(id, 'You must provide an id string to touchAsset call');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.TouchAsset,\n params: { id },\n });\n }\n\n /**\n * Marks asset as needing approval.\n */\n getAssetNeedsApproval(id: string): Promise<any> {\n validateString(id, 'You must provide an id string to getAssetNeedsApproval call');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.GetAssetNeedsApproval,\n params: { id },\n });\n }\n\n /**\n * Loads an array of default assets for the current instance's app definition.\n *\n * @param T - Model of asset's value\n * @param level - 'Default', 'Network', 'Account'\n * @param levelId - NetworkId or AccountId\n *\n * @returns Resolves to an array of default assets.\n */\n getDefaultAssets<T>(level: DefaultAssetLevel = 'Default',\n levelId?: string): Promise<Array<DefaultAsset<T>>> {\n validateString(level, 'You must provide a level parameter that is either \"Default\", \"Network\", or \"Account\"');\n if (level !== 'Account' && level !== 'Network' && level !== 'Default') {\n throw new Error('You must provide a level parameter that is either \"Default\", \"Network\", or \"Account\"');\n }\n if (level === 'Account' || level === 'Network') {\n validateString(levelId, 'You must provide relevant id for the \"Account\" or \"Network\" level default assets');\n }\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.GetDefaultAssets,\n params: {\n level,\n levelId,\n },\n });\n }\n\n /**\n * @internal\n * Loads list of banner/ticker widget apps.\n */\n getZoningApps(): Promise<ZoningAppsResponse> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.GetZoningApps,\n });\n }\n\n /**\n * @internal\n * Loads widget assets used in a given zoning asset layout.\n */\n getZoningLayoutAssets(assetId: string): Promise<Array<Asset<any>>> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.GetZoningLayoutAssets,\n params: {\n assetId,\n },\n });\n }\n\n /**\n * @internal\n * Shows modal allowing to pick existing widget or create new.\n */\n acquireZoningWidget(\n zoningAssetId: string, slotConfig: ZoningConfig,\n widgetAppId: string, usedAssetsIds: string[],\n ): Promise<Asset<any>> {\n validateString(widgetAppId, 'You must provide an widgetAppId parameter');\n validateObject(slotConfig, 'You must provide an slotConfig parameter');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.AcquireZoningWidget,\n params: {\n zoningAssetId,\n slotConfig,\n widgetAppId,\n usedAssetsIds,\n },\n });\n }\n\n /**\n * @internal\n * Fetches zoning data available after adding/editing a widget.\n */\n editZoningWidget(\n zoningAssetId: string, slotConfig: ZoningConfig,\n widgetAppId: string, widgetAssetId: string,\n ): Promise<any> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.EditZoningWidget,\n params: {\n zoningAssetId,\n slotConfig,\n widgetAppId,\n widgetAssetId,\n },\n });\n }\n\n /**\n * @internal\n * Fetches zoning data available after adding/editing a widget.\n */\n getZoningData(): Promise<any> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.GetZoningData,\n });\n }\n\n /**\n * Loads the list of available fonts for the current app or for specified appId.\n *\n * ```typescript title=\"Loading the list of fonts\"\n * const { fonts } = await enplug.account.getFonts();\n * console.log('List of available fonts', fonts);\n * ```\n *\n * @param appId - ID of app for which the font list should be fetched. If not provided, the fonts for current app will be loaded.\n *\n * @returns Resolves to an object: `{ fonts: FontsApiItem[] }`. See: {@link FontsApiItem}.\n */\n getFonts(appId?: string): Promise<{ fonts: FontsApiItem[] }> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.GetFonts,\n params: {\n appId,\n },\n });\n }\n\n /**\n * Loads available themes for the current app or for specified appId.\n */\n getThemes<T>(appId?: string): Promise<Array<ThemeAsset<T>>> {\n return this.bridge.sendMessage<{ themes: Array<ThemeAsset<T>> }>({\n namespace: MessageNamespaces.App,\n name: MessageNames.GetThemes,\n params: {\n appId,\n },\n }).then(({ themes }) => themes);\n }\n\n /**\n * Loads theme by id.\n * @param themeId - An id of a theme\n */\n getTheme<T>(id: string): Promise<ThemeAsset<T>> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.GetTheme,\n params: {\n id,\n },\n });\n }\n\n /**\n * Creates a new theme under the current app instance app definition.\n * The new theme will be available only under the current user's account.\n * @returns callId\n */\n editTheme<AssetValue, FeedType>(\n themeDefinition: ThemeDefinition,\n theme: ThemeAsset<any>,\n previewUrl: string,\n previewAsset?: Array<Asset<AssetValue>>,\n layout?: Layout | ZoningConfig,\n fonts?: FontDefinition[],\n feedData?: FeedData<FeedType>,\n ): Promise<ThemeAsset<AssetValue>> {\n validateObject(themeDefinition, 'You must provide the theme definition (object).');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.EditTheme,\n params: {\n themeDefinition,\n theme,\n previewUrl,\n previewAsset,\n layout,\n fonts,\n feedData,\n },\n });\n }\n\n /**\n * Creates a new theme under the current app definition.\n * The new theme will be available to all users in the account.\n */\n saveTheme(theme: ThemeAsset<any>, appId?: string): Promise<any> {\n validateObject(theme, 'You must provide the theme (object) to save.');\n validateObject(theme.Value, 'You must provide the theme.Value (object) to save.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.SaveTheme,\n params: {\n theme,\n appId, // optional: scope the theme to another app (e.g. Zoning duplicating a widget's custom theme). Undefined => current app, same as before.\n },\n });\n }\n\n /**\n * Deletes a theme from the current user's account for\n * the current app definition. Cannot remove default themes.\n */\n deleteTheme(themeId: string): Promise<any> {\n validateString(themeId, 'You must provide the ID (string) of the theme to remove.');\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.DeleteTheme,\n params: {\n themeId,\n },\n });\n }\n\n /**\n * Returns flag status on account.\n */\n hasFeatureFlag(flagName: string): Promise<any> {\n validateString(flagName, 'You must provide the flag name (string).');\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.HasFeatureFlag,\n params: {\n flagName,\n },\n });\n }\n\n /**\n * Retrieve all custom display group properties on an account.\n */\n getDisplayGroupCustomProperties(): Promise<AccountCustomPropertiesResponse[]> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.GetDisplayGroupCustomProperties,\n });\n }\n\n /**\n * Returns account info such as network type and billing\n */\n loadAccount(): Promise<AccountInfoResponse> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.LoadAccount,\n });\n }\n\n /**\n * Creates an asset history.\n *\n * @param T - Model of Asset's current version value\n * @param asset - An asset to save.\n *\n * @returns Promise resolving with the saved asset version.\n */\n createAssetVersion<T>(asset: Asset<T>): Promise<Asset<T>> {\n validateObject(asset, 'You must provide an asset object to save.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.CreateAssetVersion,\n params: {\n asset,\n },\n });\n }\n\n /**\n * Loads an array of assetHistory records by Asset Ids.\n *\n * @param assetsIds - An array of ids of the assets which histories will be returned.\n *\n * @returns Resolves to an array of requested hitory assets per assetId.\n */\n getAssetsHistoryByAssetId<T>(assetsIds: string[]): Promise<Array<Asset<T>>> {\n validateArray(assetsIds, 'You must provide assetIds array to getAssetsHistoryByAssetId call');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.GetAssetsHistoryByAssetId,\n params: {\n assetsIds,\n },\n });\n }\n\n /**\n * Loads an array of assetHistory records by Ids.\n *\n * @param historyIds - An array of ids of the asset histories that will be returned.\n *\n * @returns Resolves to an array of requested hitory assets.\n */\n getAssetsHistoryById<T>(historyIds: string[]): Promise<Array<Asset<T>>> {\n validateArray(historyIds, 'You must provide assetIds array to getAssetsHistoryById call');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.GetAssetsHistoryByAssetId,\n params: {\n historyIds,\n },\n });\n }\n\n\n /**\n * Deletes one or many assetHistory records under the current app instance.\n *\n * @param id - Id of an assetHistory to delete. To delete multiple assetsHistories, an array of ids can be passed.\n *\n * @returns Resolves after successfully deleting the assetHistory.\n */\n deleteAssetHistory(id: string | string[]): Promise<void> {\n if (!Array.isArray(id)) {\n validateString(id, 'You must provide the ID (string) of the assetHistory to delete.');\n id = [id];\n } else {\n validateArray(id, 'You must pass a single ID (string) or Array of assetHistory IDs to be deleted.');\n validateString(id[0], 'You must provide at least one AssetHistory ID (string) to be deleted.');\n }\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.DeleteAssetHistory,\n params: {\n ids: id,\n },\n });\n }\n\n /**\n * Restores an asset version.\n *\n * @param T - Model of Asset's current version value\n * @param asset - An asset to restore.\n *\n * @returns Promise resolving with the restored asset version.\n */\n restoreVersion<T>(asset: Asset<T>): Promise<Asset<T>> {\n validateObject(asset, 'You must provide an asset snapshot object to restore the version.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.RestoreVersion,\n params: {\n asset,\n },\n });\n }\n\n duplicateAsset<T>(asset: Asset<T>, dialogOptions: DeployDialogOptions = {}): Promise<Asset<T>> {\n validateObject(asset, 'You must provide an asset object to duplicate.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.DuplicateAsset,\n params: {\n asset,\n dialogOptions,\n },\n });\n }\n}\n","import { InboundMessage, OutboundMessage, PendingCallInfo } from '../internal-types';\n\n/**\n * Facilitates communication between the dashboard and app's iframe.\n */\n\nconst TAG = '[Dashboard SDK|Bridge]';\n\nexport abstract class BridgeBase {\n\n protected postMessage: (msg: OutboundMessage) => void;\n private pendingCalls: Map<number, PendingCallInfo> = new Map();\n private callCount = 0;\n\n constructor(window: Window) { }\n\n sendMessage<T>(message: OutboundMessage, persistentCallback?: (...args) => void): Promise<T> {\n return new Promise<T>((resolve, reject) => {\n // Increment call count and assign call Id\n message.callId = ++this.callCount;\n\n // Transient requests do not expect a response. In this case we don't store pending call data.\n if (!message.transient) {\n // Persistent messages will resolve multiple times. Therefore they cannot use promises,\n // as promises are single-use. For persistent calls, we pass a callback.\n if (message.persistent) {\n this.pendingCalls.set(message.callId,\n { resolve: persistentCallback, reject: persistentCallback, persistent: message.persistent });\n } else {\n this.pendingCalls.set(message.callId, { resolve, reject, persistent: message.persistent });\n }\n }\n\n if (this.postMessage) {\n this.postMessage(message);\n }\n });\n }\n\n /**\n * Receives and parses a message from the dashboard.\n * @param event - An event coming from calling `postMessage` on the App's frame.\n * @returns Whether to allow the event to be handled by another event handler.\n */\n protected receiveMessage(event: MessageEvent): boolean {\n if (event && event.type === 'message' && typeof event.data === 'string') {\n try {\n const response = JSON.parse(event.data) as InboundMessage;\n return this.dispatchResponse(response);\n } catch (e) {\n // ignore\n }\n }\n }\n\n /**\n * Decides what to do with an incoming message.\n * @param response - A dashboard's response to App's call.\n * @returns Whether to allow the event to ne handled by another event handler.\n */\n protected dispatchResponse(response: InboundMessage): boolean {\n if (response.callId && typeof response.success === 'boolean') {\n const { resolve, reject, persistent } = this.pendingCalls.get(response.callId);\n if (resolve && reject) {\n\n // If the call is not persistent, delete the pending call info from the map.\n if (!persistent) {\n this.pendingCalls.delete(response.callId);\n }\n\n if (response.success) {\n resolve(response.data);\n } else {\n reject(response.data);\n }\n return false;\n }\n }\n }\n\n abstract setWindowEventHandler(eventName: string, handler: (event: Event) => void): void;\n}\n","import { BridgeBase } from './bridge-base';\nimport { OutboundMessage } from '../internal-types';\n\nconst TAG = '[Dashboard SDK]';\n\nexport class Bridge extends BridgeBase {\n\n protected postMessage: (msg: OutboundMessage) => void;\n\n constructor(private window: Window) {\n super(window);\n window.addEventListener('message', this.receiveMessage.bind(this), false);\n this.postMessage = (msg) => window.parent.postMessage(JSON.stringify(msg), '*');\n console.log(`${TAG} Creating Dashboard SDK`);\n }\n\n setWindowEventHandler(eventName: string, handler: (event: Event) => void): void {\n this.window.addEventListener(eventName, handler);\n }\n}\n","import {\n Asset,\n Button,\n DisplaySelectorCallback,\n FeedData,\n Layout,\n OpenConfirmOptions,\n ThemeAsset,\n EncodingStatusResult,\n UploaderOptions,\n UploadedFileResult,\n ApiDataConnectorOptions,\n DataConnectionConfig,\n AssetPreviewRequest,\n AssetPreviewData,\n} from './external-types';\nimport { BridgeBase } from './bridge/bridge-base';\nimport { validateArray, validateBool, validateFunction, validateObject, validateString } from './utils';\nimport { MessageNamespaces, MessageNames } from './internal-types';\n\n/**\n * Dashboard API is a part of the Dashboard SDK. It can be used to present standardized User Interface elements.\n * Use global `enplug.dashboard` object to access these methods.\n *\n * ```typescript title=\"Example usage of the Dashboard API\"\n * enplug.dashboard.pageLoading(false);\n * ```\n *\n * **Useful commands**\n *\n * Header section:\n * - {@link setHeaderTitle|`enplug.dashboard.setHeaderTitle()`} - sets header title\n * - {@link setHeaderButtons|`enplug.dashboard.setHeaderButtons()`} - sets header buttons\n * - {@link setDisplaySelectorCallback|`enplug.dashboard.setDisplaySelectorCallback()`} - sets Display Group selector callback\n * - {@link setDisplaySelectorVisibility|`enplug.dashboard.setDisplaySelectorVisibility()`} - sets Display Group selector visibility\n *\n * Progress indicator:\n * - {@link pageLoading|`enplug.dashboard.pageLoading()`} - sets the app's loader visibility\n * - {@link loadingIndicator|`enplug.dashboard.loadingIndicator()`} - shows **Loading** indicator\n * - {@link successIndicator|`enplug.dashboard.successIndicator()`} - shows **Success** indicator\n * - {@link errorIndicator|`enplug.dashboard.errorIndicator()`} - shows **Error** indicator\n *\n * Dialogs:\n * - {@link previewAsset|`enplug.dashboard.previewAsset()`} - shows asset preview\n * - {@link upload|`enplug.dashboard.upload()`} - shows upload dialog\n * - {@link openConfirm|`enplug.dashboard.openConfirm()`} - shows custom confirmation dialog\n * - {@link confirmUnsavedChanges|`enplug.dashboard.confirmUnsavedChanges()`} - shows unsaved changes dialog\n * - {@link setAppHasUnsavedChanges|`enplug.dashboard.setAppHasUnsavedChanges()`} - sets dashboard's navigation guard\n */\nexport class Dashboard {\n /**\n * The buttons most recently registered with the dashboard header.\n * Stored locally so that we can respond to click events\n */\n private currentButtons: { [key: string]: Button } = {};\n\n /**\n * Keeps track of whether the dashboard is loading mode so clients can check.\n */\n private isLoadingCache = true;\n\n /** @internal */\n constructor(private bridge: BridgeBase) {\n this.bridge.setWindowEventHandler('click', () => {\n this.click();\n return true;\n });\n }\n\n /**\n * @internal\n * Notifies the parent dashboard of a click in the child iframe. Used to close\n * dropdown windows, etc. which were opened in parent window and are unable to\n * respond to click events in child iframe.\n *\n * Event handler is automatically bound when the SDK is created.\n */\n click(): void {\n this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.Click,\n transient: true,\n });\n }\n\n /**\n * Opens a confirm window asking the user to confirm their unsaved changes.\n *\n * ```typescript title=\"Presenting Unsaved Changes dialog\"\n * try {\n * await enplug.dashboard.confirmUnsavedChanges();\n * // user confirmed - take action\n * } catch {\n * // user cancelled\n * }\n * ```\n *\n * <br />\n * *Unsaved Changes dialog*\n *\n * @returns Resolves if dialog was confirmed, rejects otherwise.\n */\n confirmUnsavedChanges(): Promise<any> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.ConfirmUnsavedChanges,\n });\n }\n\n /**\n * Shows the error indicator.\n *\n * ```typescript title=\"Presenting the error indicator\"\n * enplug.dashboard.errorIndicator('Asset could not be removed');\n * ```\n *\n * \n * *Error indicator*\n *\n * @param message - A message to show in the error toast.\n *\n * @returns Resolves after the error indicator shows up on screen.\n */\n errorIndicator(message: string): Promise<any> {\n validateString(message, 'Error indicator requires an error message (string)');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.ErrorIndicator,\n params: message,\n });\n }\n\n /**\n * Synchronously returns the current loading state.\n * Updated asynchronously when this sender receives an acknowledgement\n * of successful SDK call from the dashboard.\n *\n * @see {@link pageLoading} to update the page loading state.\n *\n * @returns Current page loading state.\n */\n isLoading(): boolean {\n return this.isLoadingCache;\n }\n\n /**\n * Turns on the progress indicator, typically used during asynchronous actions.\n *\n * :::note\n * Note that the progress indicator will continue until a call is made to the\n * {@link errorIndicator} or {@link successIndicator} APIs.\n * :::\n *\n * ```typescript title=\"Presenting the loading indicator\"\n * enplug.dashboard.loadingIndicator('Removing asset');\n * ```\n *\n * \n * *Loading indicator*\n *\n * @param message - A message to show in the loading toast.\n *\n * @returns Resolves after the loading indicator shows up on screen.\n */\n loadingIndicator(message: string): Promise<void> {\n validateString(message, 'Loading indicator requires a loading message (string)');\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.LoadingIndicator,\n params: message,\n });\n }\n\n /**\n * Navigate to given relative dashboard URL.\n */\n navigateToUrl(url: string): Promise<any> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.NavigateToUrl,\n params: { url },\n });\n }\n\n /**\n * Navigate back to zoning from widget.\n * @param assetId - optional, fallback parameter for v1-\\>v2 transition phase\n */\n navigateToZoning(assetId?: string): Promise<any> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.NavigateToZoning,\n params: { assetId },\n });\n }\n\n /**\n * Opens a confirm window with Yes/No buttons and configurable messages.\n *\n * ```typescript title=\"Presenting confirmation dialog\"\n * try {\n * await enplug.dashboard.openConfirm({\n * title: 'Delete asset?',\n * text: 'Are you sure you want to delete this asset? This action cannot be undone.',\n * cancelText: 'Cancel',\n * confirmText: 'Delete',\n * confirmClass: 'btn-danger'\n * });\n *\n * // remove the asset\n * } catch {\n * // user cancelled\n * }\n * ```\n *\n * <br />\n * *Confirm dialog*\n *\n * @param options - Confirm dialog options.\n *\n * @returns Resolves if Confirm button was clicked, rejects otherwise.\n */\n openConfirm(options: OpenConfirmOptions): Promise<any> {\n validateObject(options, 'Confirm box requires options to be set (object).');\n\n if (options) {\n validateString(options.title, 'Confirm box requires options.title to be set (string).');\n validateString(options.text, 'Confirm box requires options.text to be set (string).');\n }\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.OpenConfirm,\n params: options,\n });\n }\n\n /**\n * Puts the page into error state.\n *\n * <br />\n * *Page error*\n *\n * @returns Resolves after the Dashboard shows the page error.\n */\n pageError(): Promise<void> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.PageError,\n });\n }\n\n /**\n * Controls the loading state for the entire page. Every application starts off in\n * loading state, and must set `pageLoading(false)` to notify the dashboard that it\n * has successfully loaded.\n *\n * ```typescript title=\"Turning off the loading spinner after app has started\"\n * enplug.dashboard.pageLoading(false);\n * ```\n *\n * <br />\n * *Page Loading spinner*\n *\n * @param isLoading - Page loading state:<br />\n * `false` - hides the loader and shows the app,<br />\n * `true` - shows the loader and hides the app.\n *\n * @returns Resolves after the loading state has been updated by the Dashboard.\n */\n pageLoading(isLoading: boolean): Promise<boolean> {\n validateBool(isLoading, 'Page loading status must be a boolean.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.PageLoading,\n params: isLoading,\n }).then((loading: boolean) => {\n this.isLoadingCache = loading;\n return loading;\n });\n }\n\n /**\n * Puts the page into not found (404) state.\n *\n * <br />\n * *Page not available*\n *\n * @returns Resolves when after the Dashboard shows the page not found error.\n */\n pageNotFound(): Promise<void> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.PageNotFound,\n });\n }\n\n /**\n * @deprecated use {@link previewAsset}\n *\n * Opens app preview modal.\n */\n preview<AssetValue, ThemeValue, FeedType>(\n url: string,\n asset: Asset<AssetValue>,\n theme: ThemeAsset<ThemeValue>,\n layout?: Layout,\n feedData?: FeedData<FeedType>): Promise<any> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.Preview,\n params: {\n url,\n asset,\n theme,\n layout,\n feedData,\n },\n });\n }\n\n /**\n * Opens asset preview modal.\n *\n * <br />\n * *Asset preview modal*\n *\n * ```typescript title=\"Previewing an asset\"\n * function showPreview(asset: Asset<AssetModel>) {\n * enplug.dashboard.previewAsset({ asset });\n * }\n * ```\n *\n * The above code opens the preview dialog with provided data.\n * This method allows many preview customizations, see {@link AssetPreviewRequest}.\n *\n * :::note\n * The app inside of the preview modal is presented in an iframe and the app is provided with basic SDK functionalities\n * needed to display the asset only. The app's Player URL from app's definition will be used.\n * The app is not run in a WebPlayer environment, so the behavior might be different.\n * Most SDK calls will have no effect.\n * :::\n *\n * @param TAssetValue - Model of asset's value\n * @param TThemeValue - Model of theme's value (optional)\n * @param TFeedType - Model of the feed (used for social apps)\n *\n * @returns Resolves after the preview modal gets closed.\n */\n previewAsset<TAssetValue = any, TThemeValue = any, TFeedType = any>(\n request: AssetPreviewRequest<TAssetValue, TThemeValue, TFeedType>): Promise<void> {\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.PreviewAsset,\n params: { ...request },\n });\n }\n\n /**\n * @internal\n * Get preview parameters for an app asset for custom preview handling.\n * @param origin - (default: true) - custom origin url, when omitted or falsy, `window.location.origin` will be attached\n */\n getAssetPreviewData(appId: string, asset: Asset<any>, origin?: string | boolean): Promise<AssetPreviewData> {\n validateString(appId, 'appId must be a string.');\n validateObject(asset, 'asset must be an instance of Asset<any>.');\n validateString(origin, 'origin must be a string.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.GetAssetPreviewData,\n params: {\n appId,\n asset,\n origin,\n },\n });\n }\n\n /**\n * Sets the current callback for the title bar breadcrumb Display Group selector dropdown.\n * Attaching a callback enables the dropdown and resets the title.\n *\n * The callback is fired when a Display Group is selected from the dropdown, the callback will get the ID\n * value when a single display is fired, or null when the whole 'Library' selection.\n *\n * ```typescript title=\"Setting up the Display Group selector\"\n * enplug.dashboard.setDisplaySelectorCallback(async () => {\n * // update your asset list using enplug.account.getAssets() which will return\n * // the assets assigned to the selected Display Group only\n * yourAssetList = await enplug.account.getAssets();\n * });\n * ```\n *\n * <br />\n * *Display Group selector dropdown*\n *\n * @param callback - A function to be called every time a user changes current Display Group\n * with the dropdown selector. The callback should reload the asset list to get the filtered version.\n *\n * @returns Promise which resolves after the command gets executed by the Dashboard.\n */\n setDisplaySelectorCallback(callback: DisplaySelectorCallback): Promise<void> {\n validateFunction(callback, 'To enable the display selector in the page title you must supply a callback function.');\n\n this.currentDisplayCallback = callback;\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.SetDisplaySelectorCallback,\n params: callback,\n persistent: true,\n }, (display: string) => {\n if (typeof this.currentDisplayCallback === 'function' && display !== undefined) {\n this.currentDisplayCallback(display);\n }\n\n return display;\n });\n }\n\n /**\n * Hides or shows the Display Group dropdown selector in the page title breadcrumb bar.\n * Send true to show the selector, false to hide it.\n *\n * The Display Group selector dropdown can be used to filter assets currently deployed to a specific Display Group.\n * You can view all the saved assets by account for your app by selecting the 'Library' view from the dropdown on the upper left.\n *\n * \n * *Display Group selector dropdown*\n *\n * @returns Promise which resolves after the command gets executed by the Dashboard.\n */\n setDisplaySelectorVisibility(show: boolean): Promise<void> {\n validateBool(show, 'Setting the display selector visibility requires a boolean argument, true to show or false to hide.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.SetDisplaySelectorVisibility,\n params: show,\n });\n }\n\n /**\n * Sets the action buttons for a page in the titlebar.\n *\n * Accepts either a single button object, or an array of buttons.\n * Each button must have a button.action callback.\n *\n * ```typescript title=\"Updating the buttons\"\n * function updateButtons(hasUnsavedChanges: boolean) {\n * enplug.dashboard.setHeaderButtons([{\n * text: 'My Signs',\n * action: () => { \\/* your code to navigate back to the Asset list *\\/ },\n * class: 'btn-default'\n * }, {\n * text: 'Save',\n * action: () => { \\/* your code saving the asset *\\/ },\n * class: 'btn-primary',\n * disabled: !hasUnsavedChanges // this will disable the button if there are no unsaved changes\n * }]);\n * }\n * ```\n *\n * <br />\n * *Header buttons*\n *\n * @param buttons - A button (single or array) to set on a header.\n *\n * @returns Resolves after the buttons get updated.\n */\n setHeaderButtons(buttons: Button[] | Button): Promise<void> {\n if (typeof buttons !== 'object') {\n throw new Error('Header buttons must be an object (single) or array (multiple).');\n }\n\n // Reset current buttons.\n this.currentButtons = {};\n\n buttons = Array.isArray(buttons) ? buttons : [buttons];\n\n for (const button of buttons) {\n validateObject(button, 'Header buttons must be objects.');\n if (button) {\n validateFunction(button.action, 'Header button must have an action (function).');\n\n // The button ID is used to identify which button was clicked in this service\n button.id = 'button-' + (Math.round(Math.random() * (10000 - 1) + 1));\n this.currentButtons[button.id] = button;\n }\n }\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.SetHeaderButtons,\n params: buttons,\n persistent: true,\n }, (clicked: Button) => {\n if (clicked) {\n const button = this.currentButtons[clicked.id];\n if (button) {\n button.action();\n } else {\n console.warn('Unrecognized button click:', clicked);\n }\n }\n return clicked;\n });\n }\n\n /**\n * Sets the last part of the title bar breadcrumb.\n * Set an empty title '' to clear the title.\n * Re-setting this value wipes out the old one.\n *\n * The home/default page for an app should have no title set.\n *\n * ```typescript title=\"Updating header's title\"\n * enplug.dashboard.setHeaderTitle('Setup');\n * ```\n *\n * \n * *Header title section*\n *\n * @param title - A title to set.\n *\n * @returns Resolves after the title has been modified.\n */\n setHeaderTitle(title: string): Promise<void> {\n validateString(title, 'Header title must be a string.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.SetHeaderTitle,\n params: title,\n });\n }\n\n /**\n * Shows the success indicator.\n *\n * ```typescript title=\"Presenting the success indicator\"\n * enplug.dashboard.successIndicator('Asset removed');\n * ```\n *\n * \n * *Success indicator*\n *\n * @param message - A message to show in the success toast.\n *\n * @returns Resolves after the success indicator shows up on screen.\n */\n successIndicator(message: string): Promise<void> {\n validateString(message, 'Success indicator requires a success message (string)');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.SuccessIndicator,\n params: message,\n });\n }\n\n /**\n * Switches to account view \"Library\"/All selection of instance selector or Display Group view.\n */\n switchToView(displayGroupId: string, displayGroupName: string): Promise<any> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.SwitchToView,\n params: {\n displayGroupId,\n displayGroupName,\n },\n });\n }\n\n /**\n * Uses upload interface and Enplug encoding service, returns uploaded object\n * @param options - Filepicker options\n */\n upload(options: UploaderOptions): Promise<UploadedFileResult[]> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.Upload,\n params: options,\n });\n }\n\n /**\n * Uses connect data interface, returns connection configuration object.\n * @param options - API Data Connector configuration options.\n */\n connectData(options: ApiDataConnectorOptions | ApiDataConnectorOptions[]): Promise<DataConnectionConfig> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.ConnectData,\n params: options,\n });\n }\n\n\n /**\n * @internal\n * Returns current encoding status of an asset.\n * @deprecated legacy FileStack upload flow\n * @see resourcesEncodingStatus\n */\n encodeStatus(url: string): Promise<any> {\n validateString(url, 'You must provide the url (string).');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.EncodeStatus,\n params: url,\n });\n }\n\n /**\n * Returns current encoding statuses of resources or asset IDs.\n * @param byAssetId - If `true`, the provided IDs are interpreted as asset IDs, otherwise they are resource IDs.\n */\n resourcesEncodingStatus(ids: string[], byAssetId = false): Promise<EncodingStatusResult[]> {\n validateArray(ids, 'You must provide an array of ids (strings).');\n validateBool(byAssetId, 'You must provide the boolean byAssetId. True to interpret the ids as asset ids, when false as resource ids.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.ResourcesEncodingStatus,\n params: {\n ids,\n byAssetId,\n },\n });\n }\n\n /**\n * Opens content interval settings dialog for Ad Scheduler app.\n */\n openContentIntervalSettingsDialog(appName: string, level: string, levelId: string): Promise<any> {\n validateString(appName, 'You must provide the appName (string).');\n validateString(level, 'You must provide the level (string).');\n validateString(levelId, 'You must provide the levelId (string).');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.OpenContentIntervalSettingsDialog,\n params: {\n appName,\n level,\n levelId,\n },\n });\n }\n\n /**\n * Opens dialog to copy templates across different accounts\n */\n openCopyTemplatesDialog<T>(appId: string, assets: Array<Asset<T>>): Promise<any> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.OpenCopyTemplatesDialog,\n params: {\n appId,\n assets,\n },\n });\n }\n\n /**\n * Lets dashboard know that the state of user changes in the app changed.\n *\n * @param hasUnsavedChanges - Whether the app has unsaved changes.\n */\n setAppHasUnsavedChanges(hasUnsavedChanges: boolean): Promise<any> {\n validateBool(hasUnsavedChanges, 'To report changes to the dashboard you must supply a value.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.SetAppHasUnsavedChanges,\n transient: true,\n params: {\n hasUnsavedChanges,\n },\n });\n }\n\n /**\n * Creates new assets and begins encoding process\n */\n processAssetResource<T>(accountId: string, appId: string, assets: Array<Asset<T>>): Promise<any> {\n validateString(accountId, 'You must provide the accountId (string).');\n validateString(appId, 'You must provide the appId (string).');\n validateArray(assets, 'You must provide the assets (array).');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.ProcessAssetResource,\n params: {\n accountId,\n appId,\n assets,\n },\n });\n }\n\n /**\n * The last callback registered with the dashboard title bar.\n */\n private currentDisplayCallback: DisplaySelectorCallback = (displayId: string) => { };\n\n /**\n * Sends a boolean to know when to show or hide the Administrative Screen Breadcrumb\n */\n showAdministrativeBreadcrumb(showBreadcrumb: boolean): Promise<any> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.ShowAdministrativeBreadcrumb,\n params: {\n showBreadcrumb,\n },\n });\n }\n\n /**\n * Sends a string to know which type of breadcrumb we are going to display in the dashboard\n */\n breadCrumbType(breadCrumbType: string): Promise<any> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Dashboard,\n name: MessageNames.BreadCrumbType,\n params: {\n breadCrumbType,\n },\n });\n }\n}\n","import { Account } from './account';\nimport { Bridge } from './bridge/bridge';\nimport { Dashboard } from './dashboard';\nimport { EnplugDashboardSDK } from './sdk';\nimport { Social } from './social';\n/**\n * This file is an entry point to the Enplug Dashboard SDK,\n * a piece of software required for Enplug Dashboard apps to communicate with Enplug.\n */\n\ndeclare global {\n interface Window {\n enplug: EnplugDashboardSDK;\n }\n}\n\nfunction createDashboardSDK(): EnplugDashboardSDK {\n const bridge = new Bridge(window);\n const sdk: EnplugDashboardSDK = {\n account: new Account(bridge),\n dashboard: new Dashboard(bridge),\n social: new Social(bridge),\n };\n window.enplug = sdk;\n return sdk;\n}\n\nexport default createDashboardSDK();\n","/**\n * Internal types, not to be re-exported.\n */\nexport interface InboundMessage {\n /**\n * Namespace of the event.\n */\n namespace: string;\n\n /**\n * Whether the request was a successful one.\n */\n success: boolean;\n\n /**\n * An id of the call.\n */\n callId: number;\n\n /**\n * Data returned by the dashboard. Type depends on the call type.\n */\n data?: string;\n}\n\nexport interface OutboundMessage {\n /**\n * An id of the call. Gets incremented with every sent message.\n * Used internally to match responses to their respective calls.\n */\n callId?: number;\n\n /**\n * The namespace that the event belongs to.\n */\n namespace: string;\n\n /**\n * Name of the event.\n */\n name: string;\n\n /**\n * Id of an app that the request concerns.\n */\n appId?: string;\n\n /**\n * Parameters of the call. Abitrary, depend on a call.\n */\n params?: any;\n\n /**\n * For the calls that expect multiple responses.\n */\n persistent?: boolean;\n\n /**\n * A callback that persistent messages will call every time their response comes.\n */\n callback?: (...args) => void;\n\n /**\n * For the calls that expect no responses.\n */\n transient?: boolean;\n}\n\nexport interface PendingCallInfo {\n /**\n * A method to resolve call's promise.\n */\n resolve: (...args) => any;\n\n /**\n * A method to reject call's promise.\n */\n reject: (...args) => any;\n\n /**\n * A flag indicating whether the SDK should stop listening for more responses after the first arrives.\n */\n persistent: boolean;\n}\n\nexport enum MessageNamespaces {\n App = 'app',\n Social = 'social',\n Dashboard = 'dashboard',\n}\n\nexport enum MessageNames {\n GetAccount = 'app.getAccount',\n GetUser = 'app.getUser',\n GetDisplayGroups = 'app.getDisplays',\n GetSelectedDisplayId = 'app.getSelectedDisplayId',\n GetAssets = 'app.getAssets',\n GetAssetsPagination = 'app.getAssetsPagination',\n ReorderAssets = 'app.reorderAssets',\n GetAssetsByIds = 'app.getAssetsByIds',\n GetAssetsForApp = 'app.getAssetsForApp',\n GetAssetRevision = 'app.getAssetRevision',\n BulkCreateAssets = 'app.bulkCreateAssets',\n BulkDeployAssets = 'app.bulkDeployAssets',\n SaveAsset = 'app.saveAsset',\n UpdateAssetOrder = 'app.updateAssetOrder',\n DeleteAsset = 'app.deleteAsset',\n TouchAsset = 'app.touchAsset',\n GetAssetNeedsApproval = 'app.getAssetNeedsApproval',\n GetDefaultAssets = 'app.getDefaultAssets',\n GetZoningApps = 'app.getZoningApps',\n AcquireZoningWidget = 'app.acquireZoningWidget',\n GetZoningData = 'app.getZoningData',\n EditZoningWidget = 'app.editZoningWidget',\n GetZoningLayoutAssets = 'app.getZoningLayoutAssets',\n GetFonts = 'app.getFonts',\n GetThemes = 'app.getThemes',\n GetTheme = 'app.getTheme',\n EditTheme = 'app.editTheme',\n SaveTheme = 'app.saveTheme',\n DeleteTheme = 'app.deleteTheme',\n HasFeatureFlag = 'app.hasFeatureFlag',\n GetDisplayGroupCustomProperties = 'app.getDisplayGroupCustomProperties',\n AppUrlChanged = 'app.appUrlChanged',\n LoadAccount = 'app.loadAccount',\n Click = 'dashboard.click',\n ConfirmUnsavedChanges = 'dashboard.unsavedChanges',\n ErrorIndicator = 'dashboard.indicator.error',\n LoadingIndicator = 'dashboard.indicator.loading',\n NavigateToZoning = 'dashboard.navigateToZoning',\n NavigateToUrl = 'dashboard.navigateToUrl',\n OpenConfirm = 'dashboard.confirm',\n PageError = 'dashboard.page.error',\n PageLoading = 'dashboard.page.loading',\n PageNotFound = 'dashboard.page.notFound',\n Preview = 'dashboard.preview',\n GetAssetPreviewData = 'dashboard.getAssetPreviewData',\n PreviewAsset = 'dashboard.previewAsset',\n SetDisplaySelectorCallback = 'dashboard.set.selectorCallback',\n SetDisplaySelectorVisibility = 'dashboard.set.selectorEnabled',\n SetHeaderButtons = 'dashboard.set.buttons',\n SetHeaderTitle = 'dashboard.set.title',\n ShowAdministrativeBreadcrumb = 'dashboard.showAdministrativeBreadcrumb',\n BreadCrumbType = 'dashboard.breadCrumbType',\n SuccessIndicator = 'dashboard.indicator.success',\n SwitchToView = 'dashboard.switchToView',\n Upload = 'dashboard.upload',\n ConnectData = 'dashboard.connectData',\n EditDataConnection = 'dashboard.editDataConnection',\n EncodeStatus = 'dashboard.encodeStatus',\n ResourcesEncodingStatus = 'dashboard.resourcesEncodingStatus',\n OpenContentIntervalSettingsDialog = 'dashboard.openContentIntervalSettingsDialog',\n OpenCopyTemplatesDialog = 'dashboard.openCopyTemplatesDialog',\n SetAppHasUnsavedChanges = 'dashboard.appHasUnsavedChanges',\n ClearQueryString = 'social.clearQueryString',\n AuthInstagram = 'social.authInstagram',\n AuthSlack = 'social.authSlack',\n AuthenticateSlack = 'social.authenticateSlack',\n AuthenticateTeamsUser = 'social.authenticateTeamsUser',\n AuthenticateTeamsAdmin = 'social.authenticateTeamsAdmin',\n GetInstagramAccounts = 'social.getInstagramAccounts',\n TwitterSubscriptionStatus = 'social.twitterSubscriptionStatus',\n LookupTwitterId = 'social.lookupTwitterId',\n GetSlackTeams = 'social.getSlackTeams',\n GetSlackChannels = 'social.getSlackChannels',\n GetTeamsChannels = 'social.getTeamsChannels',\n AddFacebookPage = 'social.addFacebookPage',\n GetFeeds = 'social.getFeeds',\n SaveFeed = 'social.saveFeed',\n DeleteFeed = 'social.deleteFeed',\n OpenPreapprovalDialog = 'social.openPreapprovalDialog',\n LoadAllItems = 'social.loadAllItems',\n ApproveItem = 'social.approveItem',\n RemoveItem = 'social.removeItem',\n FavoriteItem = 'social.favoriteItem',\n UnfavoriteItem = 'social.unfavoriteItem',\n BanItem = 'social.banItem',\n LoadBlacklist = 'social.loadBlacklist',\n UnbanUser = 'social.unbanUser',\n RefreshFeed = 'social.refreshFeed',\n CreateAssetVersion = 'app.createAssetVersion',\n GetAssetsHistoryById = 'app.getAssetsHistoryById',\n GetAssetsHistoryByAssetId = 'app.getAssetsHistoryByAssetId',\n DeleteAssetHistory = 'app.deleteAssetHistory',\n RestoreVersion = 'app.restoreVersion',\n RefreshTwitterFeed = 'social.refreshTwitterFeed',\n ProcessAssetResource = 'dashboard.processAssetResource',\n DuplicateAsset = 'app.duplicateAsset'\n}\n","import { BridgeBase } from './bridge/bridge-base';\nimport { MessageNames, MessageNamespaces } from './internal-types';\nimport { PreapprovalDialogOptions, SocialItemsResponse, TwitterSubscriptionStatusResponse } from './external-types';\nimport { validateObject, validateString } from './utils';\n\n/**\n * Social API is a part of the Dashboard SDK used to access social media related data.\n * Use global `enplug.social` object to access these methods.\n */\nexport class Social {\n /** @internal */\n constructor(private bridge: BridgeBase) { }\n\n clearQueryString(): Promise<any> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.ClearQueryString,\n });\n }\n\n authInstagram(accessToken: string): Promise<any> {\n validateString(accessToken, 'No authCode provided.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.AuthInstagram,\n params: {\n accessToken,\n },\n });\n }\n\n /* OBSOLETE. REMOVE AFTER 2020 */\n authSlack(verificationCode: string, redirectUrl: string): Promise<any> {\n validateString(verificationCode, 'No Slack auth token provided');\n validateString(redirectUrl, 'No redirect url provided');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.AuthSlack,\n params: {\n verificationCode,\n redirectUrl,\n },\n });\n }\n\n authenticateSlack(verificationCode: string, redirectUrl: string): Promise<any> {\n validateString(verificationCode, 'No Slack auth token provided');\n validateString(redirectUrl, 'No redirect url provided');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.AuthenticateSlack,\n params: {\n verificationCode,\n redirectUrl,\n },\n });\n }\n\n authenticateTeamsUser(verificationCode: string, redirectUrl: string): Promise<any> {\n validateString(verificationCode, 'No Teams User auth token provided');\n validateString(redirectUrl, 'No redirect url provided');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.AuthenticateTeamsUser,\n params: {\n verificationCode,\n redirectUrl,\n },\n });\n }\n\n /**\n * Saves Teams Admin token to backend.\n * @param tenantId - A user id returned from MS Teams after authenticating.\n */\n authenticateTeamsAdmin(tenantId: string): Promise<any> {\n validateString(tenantId, 'No Teams Admin auth token provided');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.AuthenticateTeamsAdmin,\n params: {\n tenantId,\n },\n });\n }\n\n getInstagramAccounts(userId: string): Promise<any> {\n validateString(userId, 'No Facebook User Id provided');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.GetInstagramAccounts,\n params: {\n userId,\n },\n });\n }\n\n lookupTwitterId(username: string): Promise<any> {\n validateString(username, 'No username provided');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.LookupTwitterId,\n params: username,\n });\n }\n\n twitterSubscriptionStatus(): Promise<TwitterSubscriptionStatusResponse> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.TwitterSubscriptionStatus,\n });\n }\n\n getSlackTeams(): Promise<any> {\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.GetSlackTeams,\n });\n }\n\n getSlackChannels(teamId: string): Promise<any> {\n validateString(teamId, 'No teamId provided');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.GetSlackChannels,\n params: teamId,\n });\n }\n\n /**\n * Returns Channels available for a given user ID.\n * @param tenantId - An ID returned after authenticating the user with MS Teams.\n */\n getTeamsChannels(tenantId: string): Promise<any> {\n validateString(tenantId, 'No tenantId provided');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.GetTeamsChannels,\n params: tenantId,\n });\n }\n\n addFacebookPage(feedId: string, pageId: string, accessToken: string): Promise<any> {\n validateString(feedId, 'No feedId provided');\n validateString(pageId, 'No pageId provided');\n validateString(accessToken, 'No accessToken provided');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.AddFacebookPage,\n params: {\n feedId,\n pageId,\n accessToken,\n },\n });\n }\n\n getFeeds(assetId: string): Promise<any> {\n validateString(assetId, 'No assetid provided.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.GetFeeds,\n params: assetId,\n });\n }\n\n saveFeed(feed: any): Promise<any> {\n validateObject(feed, 'No feed provided.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.SaveFeed,\n params: feed,\n });\n }\n\n deleteFeed(feedId: string): Promise<any> {\n validateString(feedId, 'No feedId provided.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.DeleteFeed,\n params: feedId,\n });\n }\n\n openPreapprovalDialog(feed: any, iconUrl: string, options?: PreapprovalDialogOptions): Promise<any> {\n validateObject(feed, 'No feed provided.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.OpenPreapprovalDialog,\n params: {\n feed,\n iconUrl,\n options,\n },\n });\n }\n\n loadAllItems(assetId: string): Promise<SocialItemsResponse> {\n validateString(assetId, 'No assetId provided.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.LoadAllItems,\n params: assetId,\n });\n }\n\n approveItem(itemId: string, assetId: string): Promise<any> {\n validateString(itemId, 'No itemId provided.');\n validateString(assetId, 'No assetId provided.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.ApproveItem,\n params: {\n itemId,\n assetId,\n },\n });\n }\n\n removeItem(itemId: string, assetId: string): Promise<any> {\n validateString(itemId, 'No itemId provided.');\n validateString(assetId, 'No assetId provided.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.RemoveItem,\n params: {\n itemId,\n assetId,\n },\n });\n }\n\n favoriteItem(itemId: string, assetId: string, network: string): Promise<void> {\n validateString(itemId, 'No itemId provided.');\n validateString(assetId, 'No assetId provided.');\n validateString(network, 'No network provided.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.FavoriteItem,\n params: {\n itemId,\n assetId,\n network,\n },\n });\n }\n\n unfavoriteItem(itemId: string, assetId: string, network: string): Promise<any> {\n validateString(itemId, 'No itemId provided.');\n validateString(assetId, 'No assetId provided.');\n validateString(network, 'No network provided.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.UnfavoriteItem,\n params: {\n itemId,\n assetId,\n network,\n },\n });\n }\n\n banItem(itemId: string, assetId: string): Promise<any> {\n validateString(itemId, 'No itemId provided.');\n validateString(assetId, 'No assetId provided.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.BanItem,\n params: {\n itemId,\n assetId,\n },\n });\n }\n\n loadBlacklist(accountId: string, socialNetwork: string): Promise<any> {\n validateString(accountId, 'No accountId provided.');\n validateString(socialNetwork, 'No socialNetwork provided.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.LoadBlacklist,\n params: {\n accountId,\n socialNetwork,\n },\n });\n }\n\n unbanUser(username: string, socialNetwork: string, accountId: string): Promise<any> {\n validateString(username, 'No username provided.');\n validateString(socialNetwork, 'No socialNetwork provided.');\n validateString(accountId, 'No accountId provided.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.UnbanUser,\n params: {\n username,\n socialNetwork,\n accountId,\n },\n });\n }\n\n /**\n * Gets new Facebook posts\n */\n refreshFeed(feedId: string): Promise<any> {\n validateString(feedId, 'No feedId provided.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.RefreshFeed,\n params: feedId,\n });\n }\n\n /**\n * Gets new Twitter posts\n */\n refreshTwitterFeed(assetId: string, feedId: string): Promise<any> {\n validateString(assetId, 'No assetId provided.');\n validateString(feedId, 'No feedId provided.');\n\n return this.bridge.sendMessage({\n namespace: MessageNamespaces.Social,\n name: MessageNames.RefreshTwitterFeed,\n params: {\n assetId,\n feedId,\n },\n });\n }\n}\n","const TAG = '[Dashboard SDK]';\n\nexport function validateArray(arg: any, message: string) {\n if (!Array.isArray(arg)) {\n throw new Error(`${TAG} ${message}`);\n }\n}\n\nexport function validateString(arg: any, message: string) {\n if (typeof arg !== 'string') {\n throw new Error(`${TAG} ${message}`);\n }\n}\n\nexport function validateObject(arg: any, message: string) {\n if (!(arg instanceof Object) || arg instanceof Array) {\n throw new Error(`${TAG} ${message}`);\n }\n}\n\nexport function validateBool(arg: any, message: string) {\n if (typeof arg !== 'boolean') {\n throw new Error(`${TAG} ${message}`);\n }\n}\n\nexport function validateFunction(arg: any, message) {\n if (typeof arg !== 'function') {\n throw new Error(`${TAG} ${message}`);\n }\n}\n"],"sourceRoot":""}
|
package/package.json
CHANGED
package/types/account.d.ts
CHANGED
|
@@ -263,7 +263,7 @@ export declare class Account {
|
|
|
263
263
|
* Creates a new theme under the current app definition.
|
|
264
264
|
* The new theme will be available to all users in the account.
|
|
265
265
|
*/
|
|
266
|
-
saveTheme(theme: ThemeAsset<any
|
|
266
|
+
saveTheme(theme: ThemeAsset<any>, appId?: string): Promise<any>;
|
|
267
267
|
/**
|
|
268
268
|
* Deletes a theme from the current user's account for
|
|
269
269
|
* the current app definition. Cannot remove default themes.
|
|
@@ -195,12 +195,27 @@ export interface Button {
|
|
|
195
195
|
disabled?: boolean;
|
|
196
196
|
icon?: string;
|
|
197
197
|
}
|
|
198
|
+
export interface ConfirmRadioOption {
|
|
199
|
+
value: string;
|
|
200
|
+
label: string;
|
|
201
|
+
description?: string;
|
|
202
|
+
}
|
|
198
203
|
export interface OpenConfirmOptions {
|
|
199
204
|
title: string;
|
|
200
205
|
text: string;
|
|
201
206
|
cancelText?: string;
|
|
202
207
|
confirmText?: string;
|
|
203
208
|
confirmClass?: string;
|
|
209
|
+
/** When true, shows an "x" close icon (top-right) that cancels the dialog. */
|
|
210
|
+
showCloseIcon?: boolean;
|
|
211
|
+
/**
|
|
212
|
+
* Radio-card selection mode. When set, the dialog renders selectable option cards and the
|
|
213
|
+
* confirm button resolves `openConfirm` with the selected option's `value` (string) instead
|
|
214
|
+
* of the default result. When omitted, the dialog behaves exactly as before.
|
|
215
|
+
*/
|
|
216
|
+
radioOptions?: ConfirmRadioOption[];
|
|
217
|
+
/** Pre-selected radio `value`. Defaults to the first option. */
|
|
218
|
+
radioDefault?: string;
|
|
204
219
|
}
|
|
205
220
|
export interface FilepickerOptions {
|
|
206
221
|
accept?: string | string[];
|
|
@@ -586,6 +601,7 @@ export interface PaginationConfig {
|
|
|
586
601
|
endPeriod?: string;
|
|
587
602
|
sortBy?: 'order' | 'name' | 'displaygroupcount';
|
|
588
603
|
sortDirection?: 'asc' | 'desc';
|
|
604
|
+
isTemplate?: boolean;
|
|
589
605
|
}
|
|
590
606
|
export interface ReorderAssets {
|
|
591
607
|
ViewId: string;
|