@enplug/sdk-dashboard 5.4.0 → 5.4.4

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/package.json CHANGED
@@ -1,89 +1,96 @@
1
- {
2
- "name": "@enplug/sdk-dashboard",
3
- "version": "5.4.0",
4
- "description": "Enplug Dashboard SDK",
5
- "types": "./index.d.ts",
6
- "scripts": {
7
- "clean": "rimraf dist/ && mkdirp dist",
8
- "lint": "tslint -c tslint.json './src/**/*.ts' -e './**/*.d.ts'",
9
- "test": "karma start test/karma.conf.js",
10
- "bundle": "npm run clean && webpack && npm run generateTypings",
11
- "bundle:prod": "npm-run-all lint test bundle",
12
- "start": "npm-run-all clean lint test",
13
- "publish-dev": "npm run bundle && npm publish --tag dev",
14
- "release": "npm run bundle && enplug-release-sdk",
15
- "release:prod": "npm run bundle:prod && enplug-release-sdk",
16
- "release:dev": "npm run bundle && enplug-release-sdk --dev",
17
- "generateTypings": "tsc -d ./src/sdk.ts --declarationDir ./types --emitDeclarationOnly --allowJs"
18
- },
19
- "repository": {
20
- "type": "git",
21
- "url": "git+https://github.com/Enplug/sdk.git"
22
- },
23
- "files": [
24
- "dist/",
25
- "types/",
26
- "index.d.ts"
27
- ],
28
- "config": {
29
- "destination": "sdk/v1",
30
- "destinationDev": "sdk/dev",
31
- "aws": {
32
- "buckets": [
33
- "dev-apps.enplug.in",
34
- "apps.enplug.in",
35
- "apps.enplug.com"
36
- ],
37
- "s3": {
38
- "cache": false,
39
- "overwrite": true,
40
- "region": "us-west-2",
41
- "sslEnabled": true,
42
- "apiVersion": "2016-05-01",
43
- "params": {
44
- "ACL": "public-read"
45
- }
46
- }
47
- }
48
- },
49
- "keywords": [
50
- "Enplug"
51
- ],
52
- "author": "Enplug",
53
- "license": "ISC",
54
- "bugs": {
55
- "url": "https://github.com/Enplug/sdk/issues"
56
- },
57
- "homepage": "https://github.com/Enplug/sdk#readme",
58
- "devDependencies": {
59
- "@enplug/scripts": "1.11.3",
60
- "@types/jasmine": "3.5.0",
61
- "@types/node": "8.10.59",
62
- "command-line-args": "4.0.7",
63
- "dts-gen": "^0.6.0",
64
- "es6-shim": "0.35.5",
65
- "fs": "0.0.1-security",
66
- "inquirer": "6.5.2",
67
- "jasmine": "3.5.0",
68
- "jasmine-core": "2.99.1",
69
- "karma": "4.4.1",
70
- "karma-chrome-launcher": "2.2.0",
71
- "karma-jasmine": "1.1.2",
72
- "karma-phantomjs-launcher": "1.0.4",
73
- "karma-phantomjs-shim": "1.5.0",
74
- "karma-spec-reporter": "0.0.31",
75
- "karma-typescript": "4.1.1",
76
- "mkdirp": "0.5.1",
77
- "npm-run-all": "4.1.5",
78
- "path": "0.12.7",
79
- "rimraf": "2.7.1",
80
- "s3": "4.4.0",
81
- "shelljs": "0.7.8",
82
- "ts-loader": "6.2.1",
83
- "tslint": "5.20.1",
84
- "typescript": "~4.0.0",
85
- "uglifyjs-webpack-plugin": "1.3.0",
86
- "webpack": "4.41.2",
87
- "webpack-cli": "3.3.10"
88
- }
89
- }
1
+ {
2
+ "name": "@enplug/sdk-dashboard",
3
+ "version": "5.4.4",
4
+ "description": "Enplug Dashboard SDK",
5
+ "typings": "./index.d.ts",
6
+ "scripts": {
7
+ "clean": "rimraf dist/ && mkdirp dist",
8
+ "lint": "eslint src/ --ext .ts --ignore-pattern *.d.ts --ignore-pattern *.spec.ts",
9
+ "test": "karma start test/karma.conf.js",
10
+ "bundle": "npm run clean && webpack && npm run generateTypings",
11
+ "bundle:prod": "npm-run-all lint test bundle",
12
+ "start": "npm-run-all clean lint test",
13
+ "publish-dev": "npm run bundle && npm publish --tag dev",
14
+ "release": "npm run bundle && enplug-release-sdk",
15
+ "release:prod": "npm run bundle:prod && enplug-release-sdk && npm run release:docs",
16
+ "release:dev": "npm run bundle && enplug-release-sdk --dev",
17
+ "generateTypings": "tsc -d ./src/sdk.ts --declarationDir ./types --emitDeclarationOnly --allowJs",
18
+ "release:docs": "echo Building Enplug SDK docs... && cd ../enplug-docs && npm run release:prod"
19
+ },
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "git+https://github.com/Enplug/sdk.git"
23
+ },
24
+ "files": [
25
+ "dist/",
26
+ "types/",
27
+ "index.d.ts"
28
+ ],
29
+ "config": {
30
+ "destination": "sdk/v1",
31
+ "destinationDev": "sdk/dev",
32
+ "aws": {
33
+ "buckets": [
34
+ "dev-apps.enplug.in",
35
+ "apps.enplug.in",
36
+ "apps.enplug.com"
37
+ ],
38
+ "s3": {
39
+ "cache": false,
40
+ "overwrite": true,
41
+ "region": "us-west-2",
42
+ "sslEnabled": true,
43
+ "apiVersion": "2016-05-01",
44
+ "params": {
45
+ "ACL": "public-read"
46
+ }
47
+ }
48
+ }
49
+ },
50
+ "keywords": [
51
+ "Enplug"
52
+ ],
53
+ "author": "Enplug",
54
+ "license": "ISC",
55
+ "bugs": {
56
+ "url": "https://github.com/Enplug/sdk/issues"
57
+ },
58
+ "homepage": "https://github.com/Enplug/sdk#readme",
59
+ "devDependencies": {
60
+ "@enplug/scripts": "1.11.3",
61
+ "@types/jasmine": "3.5.0",
62
+ "@types/node": "8.10.59",
63
+ "@typescript-eslint/eslint-plugin": "^4.28.4",
64
+ "@typescript-eslint/eslint-plugin-tslint": "^4.28.4",
65
+ "@typescript-eslint/parser": "^4.28.4",
66
+ "command-line-args": "4.0.7",
67
+ "dts-gen": "^0.6.0",
68
+ "es6-shim": "0.35.5",
69
+ "eslint": "^7.31.0",
70
+ "eslint-plugin-import": "^2.23.4",
71
+ "eslint-plugin-jsdoc": "^35.5.0",
72
+ "eslint-plugin-prefer-arrow": "^1.2.3",
73
+ "eslint-plugin-tsdoc": "^0.2.14",
74
+ "fs": "0.0.1-security",
75
+ "inquirer": "6.5.2",
76
+ "jasmine": "3.5.0",
77
+ "jasmine-core": "2.99.1",
78
+ "karma": "^6.3.4",
79
+ "karma-chrome-launcher": "^3.1.0",
80
+ "karma-jasmine": "^4.0.1",
81
+ "karma-mocha-reporter": "^2.2.5",
82
+ "karma-typescript": "^5.5.1",
83
+ "mkdirp": "0.5.1",
84
+ "npm-run-all": "4.1.5",
85
+ "path": "0.12.7",
86
+ "rimraf": "2.7.1",
87
+ "s3": "4.4.0",
88
+ "shelljs": "0.7.8",
89
+ "ts-loader": "6.2.1",
90
+ "tslint": "^6.1.3",
91
+ "typescript": "~4.0.0",
92
+ "uglifyjs-webpack-plugin": "1.3.0",
93
+ "webpack": "4.41.2",
94
+ "webpack-cli": "3.3.10"
95
+ }
96
+ }
@@ -1,159 +1,261 @@
1
- import { Asset, DefaultAssetLevel, DeployDialogOptions, DisplayGroup, EnplugAccount, EnplugUser, FeedData, Layout, ThemeDefinition, ThemeAsset, FontDefinition, FontsApiItem, DefaultAsset, ZoningAppsResponse, ZoningConfig, AccountCustomPropertiesResponse } from './external-types';
2
- import { BridgeBase } from './bridge/bridge-base';
3
- export declare class Account {
4
- private bridge;
5
- constructor(bridge: BridgeBase);
6
- /**
7
- * Loads all information for the current user. App instance ID,
8
- * account type, token, account ID, venue ID, and environment.
9
- *
10
- * Data is passed as the first param to the success callback.
11
- */
12
- getAccount(): Promise<EnplugAccount>;
13
- /**
14
- * Loads all information for the current user.
15
- */
16
- getUser(): Promise<EnplugUser>;
17
- getDisplayGroups(): Promise<DisplayGroup[]>;
18
- getSelectedDisplayId(): Promise<string>;
19
- /**
20
- * Loads an array of assets for the current app instance.
21
- */
22
- getAssets<T>(): Promise<Array<Asset<T>>>;
23
- /**
24
- * Loads an array of assets by Ids.
25
- * @param {string[]} assetsIds An array of ids of the assets that are to be returned.
26
- */
27
- getAssetsByIds<T>(assetsIds: string[]): Promise<Array<Asset<T>>>;
28
- /**
29
- * Loads an array of assets for a specifig app instance.
30
- * Data is passed as the first param to the success callback.
31
- * @param {string} appId An id of an app.
32
- */
33
- getAssetsForApp<T>(appId: string): Promise<Array<Asset<T>>>;
34
- /**
35
- * Loads an content-approval asset revision.
36
- * Data is passed as the first param to the success callback.
37
- * @param {string} assetId An id of an asset.
38
- * @param {string} version A version of an asset.
39
- */
40
- getAssetRevision<T>(assetId: string, version: string): Promise<Asset<T>>;
41
- /**
42
- * Creates an asset under the current app instance.
43
- * @param {Asset<T>[]} assets An array of asset object to create.
44
- * @param {DeployDialogOptions?} dialogOptions An object with details about displaying a deploy dialog
45
- * and its content after save.
46
- */
47
- bulkCreateAssets<T>(assets: Array<Asset<T>>, dialogOptions?: DeployDialogOptions): Promise<Array<Asset<T>>>;
48
- /**
49
- * Creates an asset under the current app instance.
50
- * @param {Asset<T>[]} assets An array of assets to deploy.
51
- * @param {DeployDialogOptions?} dialogOptions An object with details about displaying a deploy dialog
52
- * and its content after save.
53
- */
54
- bulkDeployAssets<T>(assets: Array<Asset<T>>, dialogOptions?: DeployDialogOptions): Promise<Array<Asset<T>>>;
55
- /**
56
- * Saves an asset without showing the deployment dialog.
57
- * @param {Asset<T>} asset An asset to save.
58
- * @param {DeployDialogOptions?} dialogOptions An object with details about displaying a deploy dialog
59
- * and its content after save.
60
- */
61
- saveAsset<T>(asset: Asset<T>, dialogOptions?: DeployDialogOptions): Promise<Asset<T>>;
62
- saveAssetForApp<T>(appId: string, asset: Asset<T>, dialogOptions?: DeployDialogOptions): Promise<any>;
63
- /**
64
- * This is for saving an order of assets if needed for the current app. An array of asset Ids
65
- * is all that is needed, but the implementation also accepts an array of asset objects with "Id" string properties.
66
- * @param {string[] | Asset<any>[]} assets An array of assetIds or assets in order which is to be saved.
67
- */
68
- updateAssetOrder(assets: string[] | Array<Asset<any>>): Promise<void>;
69
- /**
70
- * Deletes an asset for the current app instance.
71
- * @param {string|string[]} id Id of an asset to delete.
72
- */
73
- deleteAsset(id: string | string[]): Promise<void>;
74
- /**
75
- * Marks asset as recently viewed
76
- */
77
- touchAsset(id: string): Promise<any>;
78
- /**
79
- * Marks asset as recently viewed
80
- */
81
- getAssetNeedsApproval(id: string): Promise<any>;
82
- /**
83
- * Loads an array of default assets for the current instance's app definition.
84
- * Data is passed as the first param to the success callback.
85
- * @param {string} level 'Default', 'Network', 'Account'
86
- * @param {string} levelId NetworkId or AccountId
87
- */
88
- getDefaultAssets<T>(level?: DefaultAssetLevel, levelId?: string): Promise<Array<DefaultAsset<T>>>;
89
- /**
90
- * Loads list of banner/ticker widget apps
91
- */
92
- getZoningApps(): Promise<ZoningAppsResponse>;
93
- /**
94
- * Loads widget assets used in a given zoning asset layout
95
- */
96
- getZoningLayoutAssets(assetId: string): Promise<Array<Asset<any>>>;
97
- /**
98
- * Shows modal allowing to pick existing widget or create new
99
- */
100
- acquireZoningWidget(zoningAssetId: string, slotConfig: ZoningConfig, widgetAppId: string, usedAssetsIds: string[]): Promise<Asset<any>>;
101
- /**
102
- * Fetches zoning data available after adding/editing a widget
103
- */
104
- editZoningWidget(zoningAssetId: string, slotConfig: ZoningConfig, widgetAppId: string, widgetAssetId: string): Promise<any>;
105
- /**
106
- * Fetches zoning data available after adding/editing a widget
107
- */
108
- getZoningData(): Promise<any>;
109
- /**
110
- * Loads available fonts for the current app or for specified appId.
111
- * @param {string?} appId
112
- */
113
- getFonts(appId?: string): Promise<{
114
- fonts: FontsApiItem[];
115
- }>;
116
- /**
117
- * Loads available themes for the current app or for specified appId.
118
- * @param {string?} [appId]
119
- */
120
- getThemes<T>(appId?: string): Promise<Array<ThemeAsset<T>>>;
121
- /**
122
- * Loads theme by id.
123
- * @param {string} themeId An id of a theme
124
- */
125
- getTheme<T>(id: string): Promise<ThemeAsset<T>>;
126
- /**
127
- * Creates a new theme under the current app instance app definition.
128
- * The new theme will be available only under the current user's account.
129
- * @param {object} themeDefinition
130
- * @param {object} theme
131
- * @param {string} previewUrl
132
- * @param {Array} previewAsset
133
- * @param {object} layout
134
- * @param {Array} fonts
135
- * @param {object} feedData
136
- * @returns {number} callId
137
- */
138
- editTheme<AssetValue, FeedType>(themeDefinition: ThemeDefinition, theme: ThemeAsset<any>, previewUrl: string, previewAsset?: Array<Asset<AssetValue>>, layout?: Layout | ZoningConfig, fonts?: FontDefinition[], feedData?: FeedData<FeedType>): Promise<ThemeAsset<AssetValue>>;
139
- /**
140
- * Creates a new theme under the current app definition.
141
- * The new theme will be available to all users in the account.
142
- * @param {object} theme
143
- */
144
- saveTheme(theme: ThemeAsset<any>): Promise<any>;
145
- /**
146
- * Deletes a theme from the current user's account for
147
- * the current app definition. Cannot remove default themes.
148
- * @param {string} themeId
149
- */
150
- deleteTheme(themeId: string): Promise<any>;
151
- /**
152
- * Returns flag status on account
153
- */
154
- hasFeatureFlag(flagName: string): Promise<any>;
155
- /**
156
- * Retrieve all custom display group properties on an account
157
- */
158
- getDisplayGroupCustomProperties(): Promise<AccountCustomPropertiesResponse[]>;
159
- }
1
+ import { Asset, DefaultAssetLevel, DeployDialogOptions, EnplugAccount, EnplugUser, FeedData, Layout, ThemeDefinition, ThemeAsset, FontDefinition, FontsApiItem, DefaultAsset, ZoningAppsResponse, ZoningConfig, AccountCustomPropertiesResponse, AccountInfoResponse } from './external-types';
2
+ import { BridgeBase } from './bridge/bridge-base';
3
+ /**
4
+ * Account API is a part of the Dashboard SDK used for managing assets, and other app, user and account related data.
5
+ * Use global `enplug.account` object to access these methods.
6
+ *
7
+ * ```typescript title="Example usage of the Account API"
8
+ * const assets = await enplug.account.getAssets();
9
+ * ```
10
+ *
11
+ * Among others, this API allows you to fetch and manipulate the assets:
12
+ * - {@link getAssets|`enplug.account.getAssets()`} - fetch the asset list
13
+ * - {@link getAssetsByIds|`enplug.account.getAssetsByIds()`} - fetch provided assets
14
+ * - {@link saveAsset|`enplug.account.saveAsset()`} - creates/updates an asset, can display Deploy Dialog for editing
15
+ * - {@link deleteAsset|`enplug.account.deleteAsset()`} - removes an asset
16
+ * - {@link touchAsset|`enplug.account.touchAsset()`} - marks asset as recently viewed
17
+ *
18
+ * Other useful commands:
19
+ * - {@link getAccount|`enplug.account.getAccount()`} - fetch current account data
20
+ * - {@link getUser|`enplug.account.getUser()`} - fetch current user data
21
+ * - {@link getThemes|`enplug.account.getThemes()`} - fetches list of themes
22
+ * - {@link getTheme|`enplug.account.getTheme()`} - fetches theme
23
+ * - {@link editTheme|`enplug.account.editTheme()`} - edits the theme
24
+ * - {@link deleteTheme|`enplug.account.deleteTheme()`} - deletes the theme
25
+ */
26
+ export declare class Account {
27
+ private bridge;
28
+ /** @internal */
29
+ constructor(bridge: BridgeBase);
30
+ /**
31
+ * Loads all information for the current user. App instance ID,
32
+ * account type, token, account ID, venue ID, and environment.
33
+ */
34
+ getAccount(): Promise<EnplugAccount>;
35
+ /**
36
+ * Loads all information for the current user.
37
+ */
38
+ getUser(): Promise<EnplugUser>;
39
+ /**
40
+ * Loads information for the currently selected display group(s).
41
+ *
42
+ * @returns In the account context, it will return all Display Groups in the account;
43
+ * in the Display Group context, it will return only this group’s information.
44
+ */
45
+ getDisplayGroups(): Promise<any[]>;
46
+ getSelectedDisplayId(): Promise<string>;
47
+ /**
48
+ * Loads an array of assets for the current app instance.
49
+ *
50
+ * The list is also limited to the {@link setDisplaySelectorCallback|Display Group selector} dropdown's choice.
51
+ *
52
+ * @param T - Model of asset's value
53
+ *
54
+ * @returns Array of assets added by current app filtered by the {@link setDisplaySelectorCallback|Display Group selection} if it is set.
55
+ */
56
+ getAssets<T>(): Promise<Array<Asset<T>>>;
57
+ /**
58
+ * Loads an array of assets by Ids.
59
+ *
60
+ * @param T - Model of asset's value
61
+ * @param assetsIds - An array of ids of the assets that are to be returned.
62
+ *
63
+ * @returns Resolves to an array of requested assets.
64
+ */
65
+ getAssetsByIds<T>(assetsIds: string[]): Promise<Array<Asset<T>>>;
66
+ /**
67
+ * Loads an array of assets for a specifig app instance.
68
+ * Data is passed as the first param to the success callback.
69
+ *
70
+ * @param T - Model of asset's value
71
+ * @param appId - An id of an app.
72
+ */
73
+ getAssetsForApp<T>(appId: string): Promise<Array<Asset<T>>>;
74
+ /**
75
+ * Loads a content-approval asset revision.
76
+ *
77
+ * @param T - Model of asset's value
78
+ * @param assetId - ID of an asset
79
+ * @param version - Version of the asset
80
+ *
81
+ * @returns Resolves to the provided revision of the asset.
82
+ */
83
+ getAssetRevision<T>(assetId: string, version: string): Promise<Asset<T>>;
84
+ /**
85
+ * Creates an asset under the current app instance.
86
+ * @param assets - An array of assets to create.
87
+ * @param dialogOptions - An object with details about displaying the deploy dialog
88
+ * and its content after save.
89
+ *
90
+ * @returns Resolves to list of saved assets as they came from the server.
91
+ */
92
+ bulkCreateAssets<T>(assets: Array<Asset<T>>, dialogOptions?: DeployDialogOptions): Promise<Array<Asset<T>>>;
93
+ /**
94
+ * Creates an asset under the current app instance.
95
+ * @param assets - An array of assets to deploy.
96
+ * @param dialogOptions - An object with details about displaying the deploy dialog
97
+ * and its content after save.
98
+ *
99
+ * @returns Resolves to list of saved assets as they came from the server.
100
+ */
101
+ bulkDeployAssets<T>(assets: Array<Asset<T>>, dialogOptions?: DeployDialogOptions): Promise<Array<Asset<T>>>;
102
+ /**
103
+ * Creates or updates an asset. Can also be used to present the Deploy Dialog for changing asset's settings,
104
+ * such as assigning to Display Groups or changing the scheduling.
105
+ *
106
+ * When saving a new asset (`asset.Id` not defined) it will open the Deploy Dialog.
107
+ *
108
+ * ![Deploy Dialog](/img/dashboard-sdk/account/save-asset-deploy-dialog.png)<br />
109
+ * *Deploy Dialog*
110
+ *
111
+ * ```typescript title="Saving the asset"
112
+ * const dialogOptions: DeployDialogOptions = {
113
+ * showSchedule: true,
114
+ * scheduleOptions: {
115
+ * showDuration: true
116
+ * }
117
+ * };
118
+ *
119
+ * const savedAsset = await enplug.account.saveAsset(asset, dialogOptions);
120
+ * ```
121
+ *
122
+ * Saving an already existing asset will save it instantly without showing the Deploy Dialog.
123
+ *
124
+ * Another useful scenario is to allow the user to assign an existing asset to Display Groups or change the scheduling.
125
+ * To achieve this, you can force showing the Deploy Dialog for an already saved asset, by adjusting the `dialogOptions`.
126
+ * ```typescript title="Opening the Deploy Dialog to assign existing asset to Display Groups"
127
+ * const dialogOptions: DeployDialogOptions = {
128
+ * showDeployDialog: true, // this forces the Deploy Dialog to appear for an already saved asset
129
+ * showSchedule: true,
130
+ * scheduleOptions: {
131
+ * showDuration: true
132
+ * }
133
+ * };
134
+ *
135
+ * const savedAsset = await enplug.account.saveAsset(asset, dialogOptions);
136
+ * ```
137
+ * *See more: {@link DeployDialogOptions}*
138
+ *
139
+ * @param T - Model of Asset's value
140
+ * @param asset - An asset to save.
141
+ * @param dialogOptions - Used to configure the Deploy Dialog, which can be shown to
142
+ * assign the asset to Display Groups or modify the scheduling options.
143
+ *
144
+ * @returns Promise resolving with the saved asset.
145
+ */
146
+ saveAsset<T>(asset: Asset<T>, dialogOptions?: DeployDialogOptions): Promise<Asset<T>>;
147
+ saveAssetForApp<T>(appId: string, asset: Asset<T>, dialogOptions?: DeployDialogOptions): Promise<unknown>;
148
+ /**
149
+ * This is for saving an order of assets if needed for the current app. An array of asset IDs
150
+ * is all that is needed, but the implementation also accepts an array of asset objects with `Id` string properties.
151
+ *
152
+ * @param T - Model of asset's value
153
+ * @param assets - An array of assetIds or assets in order which is to be saved
154
+ *
155
+ * @returns Resolves if the order was successfully updated. Rejects otherwise.
156
+ */
157
+ updateAssetOrder<T>(assets: string[] | Array<Asset<T>>): Promise<void>;
158
+ /**
159
+ * Deletes one or many assets under the current app instance.
160
+ *
161
+ * @param id - Id of an asset to delete. To delete multiple assets, an array of ids can be passed.
162
+ *
163
+ * @returns Resolves after successfully deleting the assets.
164
+ */
165
+ deleteAsset(id: string | string[]): Promise<void>;
166
+ /**
167
+ * Marks asset as recently viewed.
168
+ */
169
+ touchAsset(id: string): Promise<any>;
170
+ /**
171
+ * Marks asset as needing approval.
172
+ */
173
+ getAssetNeedsApproval(id: string): Promise<any>;
174
+ /**
175
+ * Loads an array of default assets for the current instance's app definition.
176
+ *
177
+ * @param T - Model of asset's value
178
+ * @param level - 'Default', 'Network', 'Account'
179
+ * @param levelId - NetworkId or AccountId
180
+ *
181
+ * @returns Resolves to an array of default assets.
182
+ */
183
+ getDefaultAssets<T>(level?: DefaultAssetLevel, levelId?: string): Promise<Array<DefaultAsset<T>>>;
184
+ /**
185
+ * @internal
186
+ * Loads list of banner/ticker widget apps.
187
+ */
188
+ getZoningApps(): Promise<ZoningAppsResponse>;
189
+ /**
190
+ * @internal
191
+ * Loads widget assets used in a given zoning asset layout.
192
+ */
193
+ getZoningLayoutAssets(assetId: string): Promise<Array<Asset<any>>>;
194
+ /**
195
+ * @internal
196
+ * Shows modal allowing to pick existing widget or create new.
197
+ */
198
+ acquireZoningWidget(zoningAssetId: string, slotConfig: ZoningConfig, widgetAppId: string, usedAssetsIds: string[]): Promise<Asset<any>>;
199
+ /**
200
+ * @internal
201
+ * Fetches zoning data available after adding/editing a widget.
202
+ */
203
+ editZoningWidget(zoningAssetId: string, slotConfig: ZoningConfig, widgetAppId: string, widgetAssetId: string): Promise<any>;
204
+ /**
205
+ * @internal
206
+ * Fetches zoning data available after adding/editing a widget.
207
+ */
208
+ getZoningData(): Promise<any>;
209
+ /**
210
+ * Loads the list of available fonts for the current app or for specified appId.
211
+ *
212
+ * ```typescript title="Loading the list of fonts"
213
+ * const { fonts } = await enplug.account.getFonts();
214
+ * console.log('List of available fonts', fonts);
215
+ * ```
216
+ *
217
+ * @param appId - ID of app for which the font list should be fetched. If not provided, the fonts for current app will be loaded.
218
+ *
219
+ * @returns Resolves to an object: `{ fonts: FontsApiItem[] }`. See: {@link FontsApiItem}.
220
+ */
221
+ getFonts(appId?: string): Promise<{
222
+ fonts: FontsApiItem[];
223
+ }>;
224
+ /**
225
+ * Loads available themes for the current app or for specified appId.
226
+ */
227
+ getThemes<T>(appId?: string): Promise<Array<ThemeAsset<T>>>;
228
+ /**
229
+ * Loads theme by id.
230
+ * @param themeId - An id of a theme
231
+ */
232
+ getTheme<T>(id: string): Promise<ThemeAsset<T>>;
233
+ /**
234
+ * Creates a new theme under the current app instance app definition.
235
+ * The new theme will be available only under the current user's account.
236
+ * @returns callId
237
+ */
238
+ editTheme<AssetValue, FeedType>(themeDefinition: ThemeDefinition, theme: ThemeAsset<any>, previewUrl: string, previewAsset?: Array<Asset<AssetValue>>, layout?: Layout | ZoningConfig, fonts?: FontDefinition[], feedData?: FeedData<FeedType>): Promise<ThemeAsset<AssetValue>>;
239
+ /**
240
+ * Creates a new theme under the current app definition.
241
+ * The new theme will be available to all users in the account.
242
+ */
243
+ saveTheme(theme: ThemeAsset<any>): Promise<any>;
244
+ /**
245
+ * Deletes a theme from the current user's account for
246
+ * the current app definition. Cannot remove default themes.
247
+ */
248
+ deleteTheme(themeId: string): Promise<any>;
249
+ /**
250
+ * Returns flag status on account.
251
+ */
252
+ hasFeatureFlag(flagName: string): Promise<any>;
253
+ /**
254
+ * Retrieve all custom display group properties on an account.
255
+ */
256
+ getDisplayGroupCustomProperties(): Promise<AccountCustomPropertiesResponse[]>;
257
+ /**
258
+ * Returns account info such as network type and billing
259
+ */
260
+ loadAccount(): Promise<AccountInfoResponse>;
261
+ }