@enplug/sdk-dashboard 5.4.4 → 5.4.5-3.2

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/dist/dashboard.js CHANGED
@@ -178,6 +178,53 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_
178
178
  name: internal_types_1.MessageNames.GetAssets,
179
179
  });
180
180
  };
181
+ /**
182
+ * Loads an array of assets for the current app instance.
183
+ *
184
+ * The list is also limited to the {@link setDisplaySelectorCallback|Display Group selector} dropdown's choice.
185
+ *
186
+ * @param T - Model of asset's value
187
+ * @param options - These options implement the new pagination
188
+ * @returns Array the assets and pagination object
189
+ */
190
+ Account.prototype.getAssetsPagination = function (options) {
191
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
192
+ return this.bridge.sendMessage({
193
+ namespace: internal_types_1.MessageNamespaces.App,
194
+ name: internal_types_1.MessageNames.GetAssetsPagination,
195
+ params: {
196
+ page: (_a = options === null || options === void 0 ? void 0 : options.page) !== null && _a !== void 0 ? _a : null,
197
+ enableNewPagination: (_b = options === null || options === void 0 ? void 0 : options.enableNewPagination) !== null && _b !== void 0 ? _b : false,
198
+ limit: (_c = options === null || options === void 0 ? void 0 : options.limit) !== null && _c !== void 0 ? _c : null,
199
+ name: (_d = options === null || options === void 0 ? void 0 : options.name) !== null && _d !== void 0 ? _d : null,
200
+ tags: (_e = options === null || options === void 0 ? void 0 : options.tags) !== null && _e !== void 0 ? _e : null,
201
+ isPriority: (_f = options === null || options === void 0 ? void 0 : options.isPriority) !== null && _f !== void 0 ? _f : false,
202
+ isInactive: (_g = options === null || options === void 0 ? void 0 : options.isInactive) !== null && _g !== void 0 ? _g : false,
203
+ startPeriod: (_h = options === null || options === void 0 ? void 0 : options.startPeriod) !== null && _h !== void 0 ? _h : null,
204
+ endPeriod: (_j = options === null || options === void 0 ? void 0 : options.endPeriod) !== null && _j !== void 0 ? _j : null,
205
+ },
206
+ });
207
+ };
208
+ /**
209
+ * Reorders an array of assets for the current app instance.
210
+ *
211
+ * @param data - Object containing view, viewId, appId, and assets order.
212
+ * @returns A promise resolving an array of reordered assets with `Id` and `Order`.
213
+ */
214
+ Account.prototype.reorderAssets = function (data) {
215
+ return this.bridge.sendMessage({
216
+ namespace: internal_types_1.MessageNamespaces.App,
217
+ name: internal_types_1.MessageNames.ReorderAssets,
218
+ params: {
219
+ ViewId: data.ViewId,
220
+ AppId: data.AppId,
221
+ Assets: data.Assets.map(function (asset) { return ({
222
+ Id: asset.Id,
223
+ Order: asset.Order,
224
+ }); }),
225
+ },
226
+ });
227
+ };
181
228
  /**
182
229
  * Loads an array of assets by Ids.
183
230
  *
@@ -640,6 +687,100 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_
640
687
  name: internal_types_1.MessageNames.LoadAccount,
641
688
  });
642
689
  };
690
+ /**
691
+ * Creates an asset history.
692
+ *
693
+ * @param T - Model of Asset's current version value
694
+ * @param asset - An asset to save.
695
+ *
696
+ * @returns Promise resolving with the saved asset version.
697
+ */
698
+ Account.prototype.createAssetVersion = function (asset) {
699
+ utils_1.validateObject(asset, 'You must provide an asset object to save.');
700
+ return this.bridge.sendMessage({
701
+ namespace: internal_types_1.MessageNamespaces.App,
702
+ name: internal_types_1.MessageNames.CreateAssetVersion,
703
+ params: {
704
+ asset: asset,
705
+ },
706
+ });
707
+ };
708
+ /**
709
+ * Loads an array of assetHistory records by Asset Ids.
710
+ *
711
+ * @param assetsIds - An array of ids of the assets which histories will be returned.
712
+ *
713
+ * @returns Resolves to an array of requested hitory assets per assetId.
714
+ */
715
+ Account.prototype.getAssetsHistoryByAssetId = function (assetsIds) {
716
+ utils_1.validateArray(assetsIds, 'You must provide assetIds array to getAssetsHistoryByAssetId call');
717
+ return this.bridge.sendMessage({
718
+ namespace: internal_types_1.MessageNamespaces.App,
719
+ name: internal_types_1.MessageNames.GetAssetsHistoryByAssetId,
720
+ params: {
721
+ assetsIds: assetsIds,
722
+ },
723
+ });
724
+ };
725
+ /**
726
+ * Loads an array of assetHistory records by Ids.
727
+ *
728
+ * @param historyIds - An array of ids of the asset histories that will be returned.
729
+ *
730
+ * @returns Resolves to an array of requested hitory assets.
731
+ */
732
+ Account.prototype.getAssetsHistoryById = function (historyIds) {
733
+ utils_1.validateArray(historyIds, 'You must provide assetIds array to getAssetsHistoryById call');
734
+ return this.bridge.sendMessage({
735
+ namespace: internal_types_1.MessageNamespaces.App,
736
+ name: internal_types_1.MessageNames.GetAssetsHistoryByAssetId,
737
+ params: {
738
+ historyIds: historyIds,
739
+ },
740
+ });
741
+ };
742
+ /**
743
+ * Deletes one or many assetHistory records under the current app instance.
744
+ *
745
+ * @param id - Id of an assetHistory to delete. To delete multiple assetsHistories, an array of ids can be passed.
746
+ *
747
+ * @returns Resolves after successfully deleting the assetHistory.
748
+ */
749
+ Account.prototype.deleteAssetHistory = function (id) {
750
+ if (!Array.isArray(id)) {
751
+ utils_1.validateString(id, 'You must provide the ID (string) of the assetHistory to delete.');
752
+ id = [id];
753
+ }
754
+ else {
755
+ utils_1.validateArray(id, 'You must pass a single ID (string) or Array of assetHistory IDs to be deleted.');
756
+ utils_1.validateString(id[0], 'You must provide at least one AssetHistory ID (string) to be deleted.');
757
+ }
758
+ return this.bridge.sendMessage({
759
+ namespace: internal_types_1.MessageNamespaces.App,
760
+ name: internal_types_1.MessageNames.DeleteAssetHistory,
761
+ params: {
762
+ ids: id,
763
+ },
764
+ });
765
+ };
766
+ /**
767
+ * Restores an asset version.
768
+ *
769
+ * @param T - Model of Asset's current version value
770
+ * @param asset - An asset to restore.
771
+ *
772
+ * @returns Promise resolving with the restored asset version.
773
+ */
774
+ Account.prototype.restoreVersion = function (asset) {
775
+ utils_1.validateObject(asset, 'You must provide an asset snapshot object to restore the version.');
776
+ return this.bridge.sendMessage({
777
+ namespace: internal_types_1.MessageNamespaces.App,
778
+ name: internal_types_1.MessageNames.RestoreVersion,
779
+ params: {
780
+ asset: asset,
781
+ },
782
+ });
783
+ };
643
784
  return Account;
644
785
  }());
645
786
  exports.Account = Account;
@@ -1401,6 +1542,19 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;var __assign = (
1401
1542
  },
1402
1543
  });
1403
1544
  };
1545
+ /**
1546
+ * Opens dialog to copy templates across different accounts
1547
+ */
1548
+ Dashboard.prototype.openCopyTemplatesDialog = function (appId, assets) {
1549
+ return this.bridge.sendMessage({
1550
+ namespace: internal_types_1.MessageNamespaces.Dashboard,
1551
+ name: internal_types_1.MessageNames.OpenCopyTemplatesDialog,
1552
+ params: {
1553
+ appId: appId,
1554
+ assets: assets
1555
+ },
1556
+ });
1557
+ };
1404
1558
  /**
1405
1559
  * Lets dashboard know that the state of user changes in the app changed.
1406
1560
  *
@@ -1417,6 +1571,47 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;var __assign = (
1417
1571
  },
1418
1572
  });
1419
1573
  };
1574
+ /**
1575
+ * Creates new assets and begins encoding process
1576
+ */
1577
+ Dashboard.prototype.processAssetResource = function (accountId, appId, assets) {
1578
+ utils_1.validateString(accountId, 'You must provide the accountId (string).');
1579
+ utils_1.validateString(appId, 'You must provide the appId (string).');
1580
+ utils_1.validateArray(assets, 'You must provide the assets (array).');
1581
+ return this.bridge.sendMessage({
1582
+ namespace: internal_types_1.MessageNamespaces.Dashboard,
1583
+ name: internal_types_1.MessageNames.ProcessAssetResource,
1584
+ params: {
1585
+ accountId: accountId,
1586
+ appId: appId,
1587
+ assets: assets,
1588
+ },
1589
+ });
1590
+ };
1591
+ /**
1592
+ * Sends a boolean to know when to show or hide the Administrative Screen Breadcrumb
1593
+ */
1594
+ Dashboard.prototype.showAdministrativeBreadcrumb = function (showBreadcrumb) {
1595
+ return this.bridge.sendMessage({
1596
+ namespace: internal_types_1.MessageNamespaces.Dashboard,
1597
+ name: internal_types_1.MessageNames.ShowAdministrativeBreadcrumb,
1598
+ params: {
1599
+ showBreadcrumb: showBreadcrumb,
1600
+ }
1601
+ });
1602
+ };
1603
+ /**
1604
+ * Sends a string to know which type of breadcrumb we are going to display in the dashboard
1605
+ */
1606
+ Dashboard.prototype.breadCrumbType = function (breadCrumbType) {
1607
+ return this.bridge.sendMessage({
1608
+ namespace: internal_types_1.MessageNamespaces.Dashboard,
1609
+ name: internal_types_1.MessageNames.BreadCrumbType,
1610
+ params: {
1611
+ breadCrumbType: breadCrumbType,
1612
+ }
1613
+ });
1614
+ };
1420
1615
  return Dashboard;
1421
1616
  }());
1422
1617
  exports.Dashboard = Dashboard;
@@ -1477,6 +1672,8 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_
1477
1672
  MessageNames["GetDisplayGroups"] = "app.getDisplays";
1478
1673
  MessageNames["GetSelectedDisplayId"] = "app.getSelectedDisplayId";
1479
1674
  MessageNames["GetAssets"] = "app.getAssets";
1675
+ MessageNames["GetAssetsPagination"] = "app.getAssetsPagination";
1676
+ MessageNames["ReorderAssets"] = "app.reorderAssets";
1480
1677
  MessageNames["GetAssetsByIds"] = "app.getAssetsByIds";
1481
1678
  MessageNames["GetAssetsForApp"] = "app.getAssetsForApp";
1482
1679
  MessageNames["GetAssetRevision"] = "app.getAssetRevision";
@@ -1520,6 +1717,8 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_
1520
1717
  MessageNames["SetDisplaySelectorVisibility"] = "dashboard.set.selectorEnabled";
1521
1718
  MessageNames["SetHeaderButtons"] = "dashboard.set.buttons";
1522
1719
  MessageNames["SetHeaderTitle"] = "dashboard.set.title";
1720
+ MessageNames["ShowAdministrativeBreadcrumb"] = "dashboard.showAdministrativeBreadcrumb";
1721
+ MessageNames["BreadCrumbType"] = "dashboard.breadCrumbType";
1523
1722
  MessageNames["SuccessIndicator"] = "dashboard.indicator.success";
1524
1723
  MessageNames["SwitchToView"] = "dashboard.switchToView";
1525
1724
  MessageNames["Upload"] = "dashboard.upload";
@@ -1528,6 +1727,7 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_
1528
1727
  MessageNames["EncodeStatus"] = "dashboard.encodeStatus";
1529
1728
  MessageNames["ResourcesEncodingStatus"] = "dashboard.resourcesEncodingStatus";
1530
1729
  MessageNames["OpenContentIntervalSettingsDialog"] = "dashboard.openContentIntervalSettingsDialog";
1730
+ MessageNames["OpenCopyTemplatesDialog"] = "dashboard.openCopyTemplatesDialog";
1531
1731
  MessageNames["SetAppHasUnsavedChanges"] = "dashboard.appHasUnsavedChanges";
1532
1732
  MessageNames["ClearQueryString"] = "social.clearQueryString";
1533
1733
  MessageNames["AuthInstagram"] = "social.authInstagram";
@@ -1555,6 +1755,13 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_
1555
1755
  MessageNames["LoadBlacklist"] = "social.loadBlacklist";
1556
1756
  MessageNames["UnbanUser"] = "social.unbanUser";
1557
1757
  MessageNames["RefreshFeed"] = "social.refreshFeed";
1758
+ MessageNames["CreateAssetVersion"] = "app.createAssetVersion";
1759
+ MessageNames["GetAssetsHistoryById"] = "app.getAssetsHistoryById";
1760
+ MessageNames["GetAssetsHistoryByAssetId"] = "app.getAssetsHistoryByAssetId";
1761
+ MessageNames["DeleteAssetHistory"] = "app.deleteAssetHistory";
1762
+ MessageNames["RestoreVersion"] = "app.restoreVersion";
1763
+ MessageNames["RefreshTwitterFeed"] = "social.refreshTwitterFeed";
1764
+ MessageNames["ProcessAssetResource"] = "dashboard.processAssetResource";
1558
1765
  })(MessageNames = exports.MessageNames || (exports.MessageNames = {}));
1559
1766
  }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
1560
1767
  __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
@@ -1858,6 +2065,21 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_
1858
2065
  params: feedId,
1859
2066
  });
1860
2067
  };
2068
+ /**
2069
+ * Gets new Twitter posts
2070
+ */
2071
+ Social.prototype.refreshTwitterFeed = function (assetId, feedId) {
2072
+ utils_1.validateString(assetId, 'No assetId provided.');
2073
+ utils_1.validateString(feedId, 'No feedId provided.');
2074
+ return this.bridge.sendMessage({
2075
+ namespace: internal_types_1.MessageNamespaces.Social,
2076
+ name: internal_types_1.MessageNames.RefreshTwitterFeed,
2077
+ params: {
2078
+ assetId: assetId,
2079
+ feedId: feedId,
2080
+ },
2081
+ });
2082
+ };
1861
2083
  return Social;
1862
2084
  }());
1863
2085
  exports.Social = Social;
@@ -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,2B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AI,KAAK,CAAI,GAAG,SAAI,OAAS,CAAC,CAAC;SACtC;IACH,CAAC;IAJD,oCAIC;IAED,SAAgB,gBAAgB,CAAC,GAAQ,EAAE,OAAO;QAChD,IAAI,OAAO,GAAG,KAAK,UAAU,EAAE;YAC7B,MAAM,IAAI,KAAK,CAAI,GAAG,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} 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 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 * ![Deploy Dialog](/img/dashboard-sdk/account/save-asset-deploy-dialog.png)<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","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 * ![Unsaved Changes dialog](/img/dashboard-sdk/dashboard/dialog-hasunsavedchanges.png)<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 * ![Error indicator](/img/dashboard-sdk/dashboard/progress-error.png)\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 * ![Loading indicator](/img/dashboard-sdk/dashboard/progress-loading.png)\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 * ![Confirm dialog](/img/dashboard-sdk/dashboard/dialog-confirm.png)<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 * ![Page error](/img/dashboard-sdk/dashboard/page-error.png)<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 * ![Page Loading spinner](/img/dashboard-sdk/dashboard/pageloading-spinner.png)<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 * ![Page not available](/img/dashboard-sdk/dashboard/page-404.png)<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 * ![Asset preview modal](/img/dashboard-sdk/dashboard/previewAsset.png)<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 * ![Display Group selector dropdown](/img/dashboard-sdk/dashboard/display-group-selector-dropdown.png)<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 * ![Display Group selector dropdown](/img/dashboard-sdk/dashboard/display-group-selector-dropdown.png)\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 * ![Header buttons](/img/dashboard-sdk/dashboard/header-buttons.png)<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 * ![Header title](/img/dashboard-sdk/dashboard/header-title.png)\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 * ![Success indicator](/img/dashboard-sdk/dashboard/progress-success.png)\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): 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 * 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 * The last callback registered with the dashboard title bar.\n */\n private currentDisplayCallback: DisplaySelectorCallback = (displayId: string) => { };\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 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 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 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}\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","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;QAC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S,EAAE;YAC5B,MAAM,IAAI,KAAK,CAAI,GAAG,SAAI,OAAS,CAAC,CAAC;SACtC;IACH,CAAC;IAJD,oCAIC;IAED,SAAgB,gBAAgB,CAAC,GAAQ,EAAE,OAAO;QAChD,IAAI,OAAO,GAAG,KAAK,UAAU,EAAE;YAC7B,MAAM,IAAI,KAAK,CAAI,GAAG,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 return this.bridge.sendMessage({\n namespace: MessageNamespaces.App,\n name: MessageNames.GetAssetsPagination,\n params: {\n page: options?.page ?? null,\n enableNewPagination: options?.enableNewPagination ?? false,\n limit: options?.limit ?? null,\n name: options?.name ?? null,\n tags: options?.tags ?? null,\n isPriority : options?.isPriority ?? false,\n isInactive : options?.isInactive ?? false,\n startPeriod : options?.startPeriod ?? null,\n endPeriod : options?.endPeriod ?? null,\n },\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 * ![Deploy Dialog](/img/dashboard-sdk/account/save-asset-deploy-dialog.png)<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","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 * ![Unsaved Changes dialog](/img/dashboard-sdk/dashboard/dialog-hasunsavedchanges.png)<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 * ![Error indicator](/img/dashboard-sdk/dashboard/progress-error.png)\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 * ![Loading indicator](/img/dashboard-sdk/dashboard/progress-loading.png)\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 * ![Confirm dialog](/img/dashboard-sdk/dashboard/dialog-confirm.png)<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 * ![Page error](/img/dashboard-sdk/dashboard/page-error.png)<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 * ![Page Loading spinner](/img/dashboard-sdk/dashboard/pageloading-spinner.png)<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 * ![Page not available](/img/dashboard-sdk/dashboard/page-404.png)<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 * ![Asset preview modal](/img/dashboard-sdk/dashboard/previewAsset.png)<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 * ![Display Group selector dropdown](/img/dashboard-sdk/dashboard/display-group-selector-dropdown.png)<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 * ![Display Group selector dropdown](/img/dashboard-sdk/dashboard/display-group-selector-dropdown.png)\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 * ![Header buttons](/img/dashboard-sdk/dashboard/header-buttons.png)<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 * ![Header title](/img/dashboard-sdk/dashboard/header-title.png)\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 * ![Success indicator](/img/dashboard-sdk/dashboard/progress-success.png)\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}\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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enplug/sdk-dashboard",
3
- "version": "5.4.4",
3
+ "version": "5.4.53.2",
4
4
  "description": "Enplug Dashboard SDK",
5
5
  "typings": "./index.d.ts",
6
6
  "scripts": {
@@ -11,6 +11,7 @@
11
11
  "bundle:prod": "npm-run-all lint test bundle",
12
12
  "start": "npm-run-all clean lint test",
13
13
  "publish-dev": "npm run bundle && npm publish --tag dev",
14
+ "publish-latest": "npm run bundle && npm publish --tag latest",
14
15
  "release": "npm run bundle && enplug-release-sdk",
15
16
  "release:prod": "npm run bundle:prod && enplug-release-sdk && npm run release:docs",
16
17
  "release:dev": "npm run bundle && enplug-release-sdk --dev",
@@ -35,6 +36,7 @@
35
36
  "apps.enplug.in",
36
37
  "apps.enplug.com"
37
38
  ],
39
+ "profile": "enplug-s3-deployer",
38
40
  "s3": {
39
41
  "cache": false,
40
42
  "overwrite": true,
@@ -57,7 +59,7 @@
57
59
  },
58
60
  "homepage": "https://github.com/Enplug/sdk#readme",
59
61
  "devDependencies": {
60
- "@enplug/scripts": "1.11.3",
62
+ "@enplug/scripts": "1.11.8",
61
63
  "@types/jasmine": "3.5.0",
62
64
  "@types/node": "8.10.59",
63
65
  "@typescript-eslint/eslint-plugin": "^4.28.4",
@@ -1,4 +1,4 @@
1
- import { Asset, DefaultAssetLevel, DeployDialogOptions, EnplugAccount, EnplugUser, FeedData, Layout, ThemeDefinition, ThemeAsset, FontDefinition, FontsApiItem, DefaultAsset, ZoningAppsResponse, ZoningConfig, AccountCustomPropertiesResponse, AccountInfoResponse } from './external-types';
1
+ import { Asset, DefaultAssetLevel, DeployDialogOptions, EnplugAccount, EnplugUser, FeedData, Layout, ThemeDefinition, ThemeAsset, FontDefinition, FontsApiItem, DefaultAsset, ZoningAppsResponse, ZoningConfig, AccountCustomPropertiesResponse, AccountInfoResponse, PaginationConfig, PaginationResponse, ReorderAssets } from './external-types';
2
2
  import { BridgeBase } from './bridge/bridge-base';
3
3
  /**
4
4
  * Account API is a part of the Dashboard SDK used for managing assets, and other app, user and account related data.
@@ -54,6 +54,29 @@ export declare class Account {
54
54
  * @returns Array of assets added by current app filtered by the {@link setDisplaySelectorCallback|Display Group selection} if it is set.
55
55
  */
56
56
  getAssets<T>(): Promise<Array<Asset<T>>>;
57
+ /**
58
+ * Loads an array of assets for the current app instance.
59
+ *
60
+ * The list is also limited to the {@link setDisplaySelectorCallback|Display Group selector} dropdown's choice.
61
+ *
62
+ * @param T - Model of asset's value
63
+ * @param options - These options implement the new pagination
64
+ * @returns Array the assets and pagination object
65
+ */
66
+ getAssetsPagination<T>(options: PaginationConfig): Promise<{
67
+ Assets: Array<Asset<T>>;
68
+ Pagination: PaginationResponse;
69
+ }>;
70
+ /**
71
+ * Reorders an array of assets for the current app instance.
72
+ *
73
+ * @param data - Object containing view, viewId, appId, and assets order.
74
+ * @returns A promise resolving an array of reordered assets with `Id` and `Order`.
75
+ */
76
+ reorderAssets(data: ReorderAssets): Promise<Array<{
77
+ Id: string;
78
+ Order: number;
79
+ }>>;
57
80
  /**
58
81
  * Loads an array of assets by Ids.
59
82
  *
@@ -258,4 +281,46 @@ export declare class Account {
258
281
  * Returns account info such as network type and billing
259
282
  */
260
283
  loadAccount(): Promise<AccountInfoResponse>;
284
+ /**
285
+ * Creates an asset history.
286
+ *
287
+ * @param T - Model of Asset's current version value
288
+ * @param asset - An asset to save.
289
+ *
290
+ * @returns Promise resolving with the saved asset version.
291
+ */
292
+ createAssetVersion<T>(asset: Asset<T>): Promise<Asset<T>>;
293
+ /**
294
+ * Loads an array of assetHistory records by Asset Ids.
295
+ *
296
+ * @param assetsIds - An array of ids of the assets which histories will be returned.
297
+ *
298
+ * @returns Resolves to an array of requested hitory assets per assetId.
299
+ */
300
+ getAssetsHistoryByAssetId<T>(assetsIds: string[]): Promise<Array<Asset<T>>>;
301
+ /**
302
+ * Loads an array of assetHistory records by Ids.
303
+ *
304
+ * @param historyIds - An array of ids of the asset histories that will be returned.
305
+ *
306
+ * @returns Resolves to an array of requested hitory assets.
307
+ */
308
+ getAssetsHistoryById<T>(historyIds: string[]): Promise<Array<Asset<T>>>;
309
+ /**
310
+ * Deletes one or many assetHistory records under the current app instance.
311
+ *
312
+ * @param id - Id of an assetHistory to delete. To delete multiple assetsHistories, an array of ids can be passed.
313
+ *
314
+ * @returns Resolves after successfully deleting the assetHistory.
315
+ */
316
+ deleteAssetHistory(id: string | string[]): Promise<void>;
317
+ /**
318
+ * Restores an asset version.
319
+ *
320
+ * @param T - Model of Asset's current version value
321
+ * @param asset - An asset to restore.
322
+ *
323
+ * @returns Promise resolving with the restored asset version.
324
+ */
325
+ restoreVersion<T>(asset: Asset<T>): Promise<Asset<T>>;
261
326
  }
@@ -341,7 +341,7 @@ export declare class Dashboard {
341
341
  * Uses connect data interface, returns connection configuration object.
342
342
  * @param options - API Data Connector configuration options.
343
343
  */
344
- connectData(options: ApiDataConnectorOptions): Promise<DataConnectionConfig>;
344
+ connectData(options: ApiDataConnectorOptions | ApiDataConnectorOptions[]): Promise<DataConnectionConfig>;
345
345
  /**
346
346
  * @internal
347
347
  * Returns current encoding status of an asset.
@@ -358,14 +358,30 @@ export declare class Dashboard {
358
358
  * Opens content interval settings dialog for Ad Scheduler app.
359
359
  */
360
360
  openContentIntervalSettingsDialog(appName: string, level: string, levelId: string): Promise<any>;
361
+ /**
362
+ * Opens dialog to copy templates across different accounts
363
+ */
364
+ openCopyTemplatesDialog<T>(appId: string, assets: Array<Asset<T>>): Promise<any>;
361
365
  /**
362
366
  * Lets dashboard know that the state of user changes in the app changed.
363
367
  *
364
368
  * @param hasUnsavedChanges - Whether the app has unsaved changes.
365
369
  */
366
370
  setAppHasUnsavedChanges(hasUnsavedChanges: boolean): Promise<any>;
371
+ /**
372
+ * Creates new assets and begins encoding process
373
+ */
374
+ processAssetResource<T>(accountId: string, appId: string, assets: Array<Asset<T>>): Promise<any>;
367
375
  /**
368
376
  * The last callback registered with the dashboard title bar.
369
377
  */
370
378
  private currentDisplayCallback;
379
+ /**
380
+ * Sends a boolean to know when to show or hide the Administrative Screen Breadcrumb
381
+ */
382
+ showAdministrativeBreadcrumb(showBreadcrumb: boolean): Promise<any>;
383
+ /**
384
+ * Sends a string to know which type of breadcrumb we are going to display in the dashboard
385
+ */
386
+ breadCrumbType(breadCrumbType: string): Promise<any>;
371
387
  }
@@ -15,6 +15,8 @@ export interface BaseAsset<T> {
15
15
  AssetData?: AssetDataBackendValue;
16
16
  PushDataBindingConfig?: PushDataBindingConfig;
17
17
  PullDataBindingConfig?: PullDataBindingConfig;
18
+ MultipleAssetData?: AssetDataBackendValue[];
19
+ MultiplePullDataBindingConfig?: PullDataBindingConfig[];
18
20
  /** Optional Theme Id if set */
19
21
  ThemeId?: string;
20
22
  /** Optional, used when user is in the content approval flow */
@@ -33,6 +35,7 @@ export interface Asset<T> extends BaseAsset<T> {
33
35
  /** Currently \@ Value.Zone - subject to change. Zoning widget asset slot type */
34
36
  /** List of zoning assets on which the obj - a widget asset is placed */
35
37
  ZoningAssetIds?: string[];
38
+ Tags?: string[];
36
39
  }
37
40
  export interface DefaultAsset<T> extends BaseAsset<T> {
38
41
  Level: DefaultAssetLevel;
@@ -44,6 +47,7 @@ export interface AssetDataBackendValue {
44
47
  Data: DataCollectionBackend;
45
48
  TriggerColumnId: string;
46
49
  DataBoundSchedule: DataBoundScheduleBackend;
50
+ Id?: string;
47
51
  }
48
52
  export interface DataCollectionBackend {
49
53
  Columns: Array<{
@@ -63,7 +67,7 @@ export interface DataBoundScheduleBackend {
63
67
  EndAfter: string;
64
68
  Yearly: boolean;
65
69
  }
66
- export declare type DataType = 'date' | 'text' | 'image';
70
+ export declare type DataType = 'date' | 'text' | 'image' | 'percentage';
67
71
  export interface DataItems {
68
72
  [columnId: string]: DataItem;
69
73
  }
@@ -87,13 +91,23 @@ export interface PushDataBindingConfig {
87
91
  HasError: boolean;
88
92
  }
89
93
  export interface PullDataBindingConfig {
94
+ Profile?: string;
95
+ ConnectionName?: string;
90
96
  Url: string;
97
+ Filter?: string;
98
+ FilterValue?: string;
99
+ Start?: number;
100
+ Limit?: number;
91
101
  DataPath: string;
92
102
  QueryParameters: ApiQueryParameter[];
93
103
  Headers: ApiQueryParameter[];
94
104
  ApiFrequency: string;
95
105
  JsonMappings: JsonMapping[];
96
106
  HasError: boolean;
107
+ Id?: string;
108
+ AssetId?: string;
109
+ AssetDataId?: string;
110
+ ConnectionOrder?: number;
97
111
  }
98
112
  export interface Schedule {
99
113
  /** "2019-03-27T00:00:00" */
@@ -114,6 +128,8 @@ export interface Schedule {
114
128
  LastSaved: string;
115
129
  PlayTimes: TimeRange[];
116
130
  Recurrence: number;
131
+ /** Content Library feature */
132
+ RepeatYearly?: boolean;
117
133
  }
118
134
  export interface TimeRange {
119
135
  /** "09:00:00" */
@@ -150,8 +166,10 @@ export interface ThemeSectionProperties {
150
166
  label: string;
151
167
  type: ThemePropertyType;
152
168
  name: string;
169
+ adjustPosition?: boolean;
170
+ backgroundFont?: boolean;
153
171
  }
154
- export declare type ThemePropertyType = 'color' | 'font' | 'backgroundSelector' | 'backgroundColor';
172
+ export declare type ThemePropertyType = 'color' | 'font' | 'backgroundSelector' | 'backgroundColor' | 'fontSize' | 'subSection';
155
173
  export declare type Orientation = 'landscape' | 'portrait';
156
174
  export declare type WidgetType = 'main' | 'banner' | 'ticker';
157
175
  export interface Layout {
@@ -247,6 +265,12 @@ export interface UploaderOptions extends FilepickerOptions {
247
265
  cropForceAspectRatio?: number;
248
266
  cropMaximumImageWidth?: number;
249
267
  zoningConfig?: ZoningConfig;
268
+ /** Use waitForUploadFinished = true together with createAssets = true to get uploaded videos duration */
269
+ waitForUploadFinished?: boolean;
270
+ replaceAsset?: boolean;
271
+ assetIdToReplace?: string;
272
+ showRatioNotification?: boolean;
273
+ isHighQuality?: boolean;
250
274
  }
251
275
  export interface UploadedFileResult extends FilepickerUploadedFile {
252
276
  assetId?: string;
@@ -294,6 +318,7 @@ export interface EnplugUser {
294
318
  has: {
295
319
  rootAccess: boolean;
296
320
  limitedAccess: boolean;
321
+ hasVodPermission: boolean;
297
322
  };
298
323
  }
299
324
  export interface DeployDialogOptions {
@@ -349,6 +374,8 @@ export interface DeployDialogOptions {
349
374
  detailsType?: 'graphic' | 'art';
350
375
  /** Graphics and Arts app only use this one */
351
376
  showReporting?: boolean;
377
+ /** Yalatech app only use this one */
378
+ showDisplayGroups?: boolean;
352
379
  }
353
380
  export interface FacebookAuthParams {
354
381
  FeedId: string;
@@ -400,6 +427,7 @@ export interface EnplugAccount {
400
427
  showHelpdeskContent: boolean;
401
428
  type: string;
402
429
  useInAppMessaging: boolean;
430
+ appInstanceId: string;
403
431
  }
404
432
  export interface FontDefinition {
405
433
  name: string;
@@ -417,18 +445,35 @@ export interface BindingPair {
417
445
  value: string;
418
446
  type: BindingDataType;
419
447
  }
420
- export declare type BindingDataType = 'image' | 'date' | 'text';
448
+ export declare type BindingDataType = 'image' | 'date' | 'text' | 'percentage';
421
449
  export interface PushConnectionConfig {
450
+ connectionName?: string;
422
451
  webURL: string;
452
+ filter?: string;
453
+ filterValue?: string;
454
+ start?: number;
455
+ limit?: number;
423
456
  webhookToken: string;
424
457
  hasError: boolean;
458
+ profile?: string;
459
+ id?: string;
425
460
  }
426
461
  export interface PullConnectionConfig {
462
+ profile?: string;
463
+ connectionName?: string;
427
464
  webURL: string;
465
+ filter?: string;
466
+ filterValue?: string;
467
+ start?: number;
468
+ limit?: number;
428
469
  params: ConnectionQueryParams[];
429
470
  headers: ConnectionHttpHeaders[];
430
471
  refreshFrequency: RefreshFrequency;
431
472
  hasError: boolean;
473
+ id?: string;
474
+ assetId?: string;
475
+ assetDataId?: string;
476
+ connectionOrder?: number;
432
477
  }
433
478
  export interface ConnectionParams {
434
479
  name: string;
@@ -441,7 +486,7 @@ export interface ConnectionQueryParams extends ConnectionParams {
441
486
  }
442
487
  export interface ConnectionHttpHeaders extends ConnectionParams {
443
488
  }
444
- export declare type RefreshFrequency = 1 | 5 | 10 | 30;
489
+ export declare type RefreshFrequency = 1 | 5 | 10 | 30 | 1440;
445
490
  export interface ApiDataItem {
446
491
  name: string;
447
492
  type: BindingDataType;
@@ -523,8 +568,39 @@ export interface ZoningConfig {
523
568
  width: number;
524
569
  height: number;
525
570
  tickerSpeed?: number;
571
+ tickerScrollDirection?: string;
526
572
  orientation: Orientation;
527
573
  }
574
+ export interface PaginationConfig {
575
+ page?: number;
576
+ enableNewPagination?: boolean;
577
+ limit?: number;
578
+ name?: string;
579
+ tags?: string;
580
+ isPriority?: boolean;
581
+ isInactive?: boolean;
582
+ startPeriod?: string;
583
+ endPeriod?: string;
584
+ }
585
+ export interface ReorderAssets {
586
+ ViewId: string;
587
+ AppId: string;
588
+ Assets: Array<{
589
+ Id: string;
590
+ Order: number;
591
+ }>;
592
+ }
593
+ export interface PaginationResponse {
594
+ Limit: number;
595
+ CurrentPage: number;
596
+ TotalPages: number;
597
+ TotalItems: number;
598
+ }
599
+ export interface AssetsPaginationResponse<T> {
600
+ Assets: Array<Asset<T>>;
601
+ Pagination: PaginationResponse;
602
+ Tags: string[];
603
+ }
528
604
  export interface ZoningAppsResponse {
529
605
  BannerApps: ZoningApp[];
530
606
  TickerApps: ZoningApp[];
@@ -569,6 +645,7 @@ export interface AccountInfo extends DataItemInfo {
569
645
  AppPackageId?: string;
570
646
  NetworkId?: string;
571
647
  ExcludeWidgetIds?: string[];
648
+ PricebookPackageId?: string;
572
649
  }
573
650
  export interface DataItemInfo {
574
651
  Id: string;
@@ -621,3 +698,14 @@ export interface FeatureFlag {
621
698
  export declare type ItemLevel = 'Account' | 'Default' | 'Network';
622
699
  export declare type PlanType = 'Custom' | 'Enplug' | 'FixedPricePerLicense' | 'Free' | 'None';
623
700
  export declare type DashboardLogicVariant = null | 'kone' | 'arts';
701
+ export interface FindAppResponse {
702
+ Data: Data;
703
+ }
704
+ export interface Data {
705
+ Name: string;
706
+ Visibility: string;
707
+ AppIds: string[];
708
+ FeatureFlags: FeatureFlag[];
709
+ Id: string;
710
+ Created: Date;
711
+ }
@@ -79,6 +79,8 @@ export declare enum MessageNames {
79
79
  GetDisplayGroups = "app.getDisplays",
80
80
  GetSelectedDisplayId = "app.getSelectedDisplayId",
81
81
  GetAssets = "app.getAssets",
82
+ GetAssetsPagination = "app.getAssetsPagination",
83
+ ReorderAssets = "app.reorderAssets",
82
84
  GetAssetsByIds = "app.getAssetsByIds",
83
85
  GetAssetsForApp = "app.getAssetsForApp",
84
86
  GetAssetRevision = "app.getAssetRevision",
@@ -122,6 +124,8 @@ export declare enum MessageNames {
122
124
  SetDisplaySelectorVisibility = "dashboard.set.selectorEnabled",
123
125
  SetHeaderButtons = "dashboard.set.buttons",
124
126
  SetHeaderTitle = "dashboard.set.title",
127
+ ShowAdministrativeBreadcrumb = "dashboard.showAdministrativeBreadcrumb",
128
+ BreadCrumbType = "dashboard.breadCrumbType",
125
129
  SuccessIndicator = "dashboard.indicator.success",
126
130
  SwitchToView = "dashboard.switchToView",
127
131
  Upload = "dashboard.upload",
@@ -130,6 +134,7 @@ export declare enum MessageNames {
130
134
  EncodeStatus = "dashboard.encodeStatus",
131
135
  ResourcesEncodingStatus = "dashboard.resourcesEncodingStatus",
132
136
  OpenContentIntervalSettingsDialog = "dashboard.openContentIntervalSettingsDialog",
137
+ OpenCopyTemplatesDialog = "dashboard.openCopyTemplatesDialog",
133
138
  SetAppHasUnsavedChanges = "dashboard.appHasUnsavedChanges",
134
139
  ClearQueryString = "social.clearQueryString",
135
140
  AuthInstagram = "social.authInstagram",
@@ -156,5 +161,12 @@ export declare enum MessageNames {
156
161
  BanItem = "social.banItem",
157
162
  LoadBlacklist = "social.loadBlacklist",
158
163
  UnbanUser = "social.unbanUser",
159
- RefreshFeed = "social.refreshFeed"
164
+ RefreshFeed = "social.refreshFeed",
165
+ CreateAssetVersion = "app.createAssetVersion",
166
+ GetAssetsHistoryById = "app.getAssetsHistoryById",
167
+ GetAssetsHistoryByAssetId = "app.getAssetsHistoryByAssetId",
168
+ DeleteAssetHistory = "app.deleteAssetHistory",
169
+ RestoreVersion = "app.restoreVersion",
170
+ RefreshTwitterFeed = "social.refreshTwitterFeed",
171
+ ProcessAssetResource = "dashboard.processAssetResource"
160
172
  }
package/types/social.d.ts CHANGED
@@ -45,4 +45,8 @@ export declare class Social {
45
45
  * Gets new Facebook posts
46
46
  */
47
47
  refreshFeed(feedId: string): Promise<any>;
48
+ /**
49
+ * Gets new Twitter posts
50
+ */
51
+ refreshTwitterFeed(assetId: string, feedId: string): Promise<any>;
48
52
  }