@adobe/exc-app 0.2.46 → 1.0.1

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.
Files changed (101) hide show
  1. package/RuntimeConfiguration.d.ts +4 -0
  2. package/appapi.d.ts +1 -1
  3. package/appapi.js +1 -1
  4. package/appapi.js.map +1 -1
  5. package/build/preBuild.js +14 -0
  6. package/capabilityapi.d.ts +4 -2
  7. package/capabilityapi.js +4 -2
  8. package/capabilityapi.js.map +1 -1
  9. package/docs/README.md +1 -0
  10. package/docs/enums/appapi.appids.md +21 -7
  11. package/docs/enums/capabilityapi.capabilityids.md +28 -0
  12. package/docs/enums/capabilityapi.capabilitynames.md +28 -0
  13. package/docs/enums/network.routing.md +21 -1
  14. package/docs/interfaces/ims.activeproductcontext.md +13 -0
  15. package/docs/interfaces/ims.imsprofile.md +130 -0
  16. package/docs/interfaces/ims.productcontext.md +141 -0
  17. package/docs/interfaces/ims.projectedproductcontext.md +21 -0
  18. package/docs/interfaces/network.queryrequest.md +20 -0
  19. package/docs/interfaces/root.poller.md +56 -0
  20. package/docs/interfaces/root.pollerhandle.md +21 -0
  21. package/docs/interfaces/root.pollingconfiguration.md +28 -0
  22. package/docs/interfaces/root.runtimeconfiguration.md +10 -1
  23. package/docs/interfaces/root.useractivityemitter.md +110 -0
  24. package/docs/interfaces/root.useractivitymonitor.md +151 -0
  25. package/docs/interfaces/user.userapi.md +1 -1
  26. package/docs/modules/ims.md +14 -0
  27. package/docs/modules/network.md +7 -0
  28. package/docs/modules/root.md +5 -0
  29. package/docs/modules/settings.md +8 -57
  30. package/docs/modules/user.md +14 -0
  31. package/index.js +7 -0
  32. package/index.js.map +1 -1
  33. package/internal.d.ts +9 -0
  34. package/internal.js +3 -0
  35. package/internal.js.map +1 -1
  36. package/network.d.ts +17 -1
  37. package/network.js +11 -0
  38. package/network.js.map +1 -1
  39. package/package.json +6 -7
  40. package/src/Global.d.ts +3 -1
  41. package/src/Global.js.map +1 -1
  42. package/tests/index.test.js +5 -0
  43. package/tests/index.test.js.map +1 -1
  44. package/tests/version.test.d.ts +1 -0
  45. package/tests/version.test.js +23 -0
  46. package/tests/version.test.js.map +1 -0
  47. package/{settings/SettingsLevel.ts → version.d.ts} +2 -20
  48. package/{metrics/Level.ts → version.js} +6 -20
  49. package/version.js.map +1 -0
  50. package/RuntimeConfiguration.ts +0 -272
  51. package/appapi.ts +0 -140
  52. package/capabilityapi.ts +0 -162
  53. package/coverage/lcov-report/block-navigation.js +0 -79
  54. package/coverage/lcov-report/prettify.js +0 -2
  55. package/coverage/lcov-report/sorter.js +0 -170
  56. package/helpcenter.ts +0 -253
  57. package/ims/ImsProfile.ts +0 -57
  58. package/index.ts +0 -76
  59. package/internal.ts +0 -102
  60. package/metrics/Analytics.ts +0 -55
  61. package/metrics/Application.ts +0 -24
  62. package/metrics/Configuration.ts +0 -33
  63. package/metrics/Events.ts +0 -28
  64. package/metrics/History.ts +0 -36
  65. package/metrics/Metric.ts +0 -52
  66. package/metrics/Metrics.ts +0 -129
  67. package/metrics/RecordType.ts +0 -139
  68. package/metrics/User.ts +0 -30
  69. package/metrics.ts +0 -94
  70. package/network.ts +0 -554
  71. package/nps.ts +0 -83
  72. package/orgswitcher.ts +0 -109
  73. package/page.ts +0 -497
  74. package/permissions.ts +0 -103
  75. package/pulse.ts +0 -198
  76. package/session.ts +0 -116
  77. package/settings.ts +0 -147
  78. package/shell.ts +0 -107
  79. package/sidebar.ts +0 -208
  80. package/sidenav.ts +0 -287
  81. package/src/EventEmitter.ts +0 -44
  82. package/src/Global.ts +0 -109
  83. package/src/Runtime.ts +0 -23
  84. package/tests/MockRuntime.ts +0 -28
  85. package/tests/appapi.test.ts +0 -78
  86. package/tests/capabilityapi.test.ts +0 -55
  87. package/tests/helpCenter.test.ts +0 -80
  88. package/tests/index.test.ts +0 -50
  89. package/tests/metrics.test.ts +0 -34
  90. package/tests/nps.test.ts +0 -37
  91. package/tests/page.test.ts +0 -110
  92. package/tests/permissions.test.ts +0 -96
  93. package/tests/pulse.test.ts +0 -37
  94. package/tests/shell.test.ts +0 -89
  95. package/tests/sidenav.test.ts +0 -91
  96. package/tests/topbar.test.ts +0 -85
  97. package/tests/user.test.ts +0 -129
  98. package/tests/userprofile.test.ts +0 -31
  99. package/topbar.ts +0 -288
  100. package/user.ts +0 -235
  101. package/userprofile.ts +0 -93
@@ -1,170 +0,0 @@
1
- /* eslint-disable */
2
- var addSorting = (function() {
3
- 'use strict';
4
- var cols,
5
- currentSort = {
6
- index: 0,
7
- desc: false
8
- };
9
-
10
- // returns the summary table element
11
- function getTable() {
12
- return document.querySelector('.coverage-summary');
13
- }
14
- // returns the thead element of the summary table
15
- function getTableHeader() {
16
- return getTable().querySelector('thead tr');
17
- }
18
- // returns the tbody element of the summary table
19
- function getTableBody() {
20
- return getTable().querySelector('tbody');
21
- }
22
- // returns the th element for nth column
23
- function getNthColumn(n) {
24
- return getTableHeader().querySelectorAll('th')[n];
25
- }
26
-
27
- // loads all columns
28
- function loadColumns() {
29
- var colNodes = getTableHeader().querySelectorAll('th'),
30
- colNode,
31
- cols = [],
32
- col,
33
- i;
34
-
35
- for (i = 0; i < colNodes.length; i += 1) {
36
- colNode = colNodes[i];
37
- col = {
38
- key: colNode.getAttribute('data-col'),
39
- sortable: !colNode.getAttribute('data-nosort'),
40
- type: colNode.getAttribute('data-type') || 'string'
41
- };
42
- cols.push(col);
43
- if (col.sortable) {
44
- col.defaultDescSort = col.type === 'number';
45
- colNode.innerHTML =
46
- colNode.innerHTML + '<span class="sorter"></span>';
47
- }
48
- }
49
- return cols;
50
- }
51
- // attaches a data attribute to every tr element with an object
52
- // of data values keyed by column name
53
- function loadRowData(tableRow) {
54
- var tableCols = tableRow.querySelectorAll('td'),
55
- colNode,
56
- col,
57
- data = {},
58
- i,
59
- val;
60
- for (i = 0; i < tableCols.length; i += 1) {
61
- colNode = tableCols[i];
62
- col = cols[i];
63
- val = colNode.getAttribute('data-value');
64
- if (col.type === 'number') {
65
- val = Number(val);
66
- }
67
- data[col.key] = val;
68
- }
69
- return data;
70
- }
71
- // loads all row data
72
- function loadData() {
73
- var rows = getTableBody().querySelectorAll('tr'),
74
- i;
75
-
76
- for (i = 0; i < rows.length; i += 1) {
77
- rows[i].data = loadRowData(rows[i]);
78
- }
79
- }
80
- // sorts the table using the data for the ith column
81
- function sortByIndex(index, desc) {
82
- var key = cols[index].key,
83
- sorter = function(a, b) {
84
- a = a.data[key];
85
- b = b.data[key];
86
- return a < b ? -1 : a > b ? 1 : 0;
87
- },
88
- finalSorter = sorter,
89
- tableBody = document.querySelector('.coverage-summary tbody'),
90
- rowNodes = tableBody.querySelectorAll('tr'),
91
- rows = [],
92
- i;
93
-
94
- if (desc) {
95
- finalSorter = function(a, b) {
96
- return -1 * sorter(a, b);
97
- };
98
- }
99
-
100
- for (i = 0; i < rowNodes.length; i += 1) {
101
- rows.push(rowNodes[i]);
102
- tableBody.removeChild(rowNodes[i]);
103
- }
104
-
105
- rows.sort(finalSorter);
106
-
107
- for (i = 0; i < rows.length; i += 1) {
108
- tableBody.appendChild(rows[i]);
109
- }
110
- }
111
- // removes sort indicators for current column being sorted
112
- function removeSortIndicators() {
113
- var col = getNthColumn(currentSort.index),
114
- cls = col.className;
115
-
116
- cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, '');
117
- col.className = cls;
118
- }
119
- // adds sort indicators for current column being sorted
120
- function addSortIndicators() {
121
- getNthColumn(currentSort.index).className += currentSort.desc
122
- ? ' sorted-desc'
123
- : ' sorted';
124
- }
125
- // adds event listeners for all sorter widgets
126
- function enableUI() {
127
- var i,
128
- el,
129
- ithSorter = function ithSorter(i) {
130
- var col = cols[i];
131
-
132
- return function() {
133
- var desc = col.defaultDescSort;
134
-
135
- if (currentSort.index === i) {
136
- desc = !currentSort.desc;
137
- }
138
- sortByIndex(i, desc);
139
- removeSortIndicators();
140
- currentSort.index = i;
141
- currentSort.desc = desc;
142
- addSortIndicators();
143
- };
144
- };
145
- for (i = 0; i < cols.length; i += 1) {
146
- if (cols[i].sortable) {
147
- // add the click event handler on the th so users
148
- // dont have to click on those tiny arrows
149
- el = getNthColumn(i).querySelector('.sorter').parentElement;
150
- if (el.addEventListener) {
151
- el.addEventListener('click', ithSorter(i));
152
- } else {
153
- el.attachEvent('onclick', ithSorter(i));
154
- }
155
- }
156
- }
157
- }
158
- // adds sorting functionality to the UI
159
- return function() {
160
- if (!getTable()) {
161
- return;
162
- }
163
- cols = loadColumns();
164
- loadData();
165
- addSortIndicators();
166
- enableUI();
167
- };
168
- })();
169
-
170
- window.addEventListener('load', addSorting);
package/helpcenter.ts DELETED
@@ -1,253 +0,0 @@
1
- /*************************************************************************
2
- * Copyright 2020 Adobe
3
- * All Rights Reserved.
4
- *
5
- * NOTICE: Adobe permits you to use, modify, and distribute this file in
6
- * accordance with the terms of the Adobe license agreement accompanying
7
- * it. If you have received this file from a source other than Adobe,
8
- * then your use, modification, or distribution of it requires the prior
9
- * written permission of Adobe.
10
- **************************************************************************/
11
- /**
12
- * APIs that let solutions interact with Help Center.
13
- *
14
- * ***Import:***
15
- *
16
- * ```typescript
17
- * import helpCenter from '@adobe/exc-app/helpcenter';
18
- * ```
19
- *
20
- * ***Default export:***
21
- *
22
- * [HelpCenterApi](../interfaces/helpcenter.helpcenterapi.md#interface-helpcenterapi)
23
- *
24
- * ***Usage:***
25
- *
26
- * ```typescript
27
- * import helpCenter from '@adobe/exc-app/helpcenter';
28
- *
29
- * helpCenter.config = {
30
- * resources: [
31
- * {
32
- * href: 'https://marketing.adobe.com/resources/help/en_US/home/index.html',
33
- * label: 'Help Home'
34
- * }
35
- * ]
36
- * };
37
- * ```
38
- * @packageDocumentation
39
- * @module helpCenter
40
- */
41
- import {connect} from './src/Global';
42
-
43
- export interface HelpCenterConfig {
44
- /**
45
- * Adds help links to the *featured* section of the help center.
46
- */
47
- featured?: Array<{
48
- /**
49
- * URL for the link to go to.
50
- */
51
- href: string;
52
- /**
53
- * Title for the link.
54
- */
55
- label: string;
56
- /**
57
- * Pattern to define path(s) the link can navigate to. The value is not regex but a Path-to-RegExp form.
58
- */
59
- path: string | Array<string>;
60
- }>;
61
- /**
62
- * Customizes *for you* section of the help center.
63
- */
64
- recommendations?: {
65
- /**
66
- * Used to disable feature. It is enabled by default.
67
- */
68
- enabled: boolean;
69
- /**
70
- * Help center populates "For You" content by conducting a search against Experience League based on a list of terms supplied.
71
- */
72
- terms: Array<{
73
- /**
74
- * Pattern to define path(s) the link can navigate to. Please note that the most general ones should come last.
75
- */
76
- path: string;
77
- /**
78
- * Specific term used in searching.
79
- */
80
- term: string;
81
- }>;
82
- };
83
- /**
84
- * Overrides default links present in *resources* section. Product owners are advised to supply custom resources links to ensure greater relevance.
85
- */
86
- resources?: Array<{
87
- /**
88
- * URL of the link.
89
- */
90
- href: string;
91
- /**
92
- * Title for the link.
93
- */
94
- label: string;
95
- }>;
96
- /**
97
- * If the solution wants to simulate "Frequently asked questions", it can provide them as an array of strings. These appear as the user starts typing in the Search field.
98
- */
99
- questions?: Array<string>;
100
- }
101
-
102
- export interface HelpCenterOpenConfig {
103
- /**
104
- * Configuration for Help Center fields when opened.
105
- */
106
- config?: {
107
- /**
108
- * String that prepopulates the subject field in the Help center feedback section.
109
- */
110
- subject: string;
111
- /**
112
- * Type of feedback. Only CONTEXTUAL_FEEDBACK_SUBMISSION is supported, meaning that the Help Center feedback tab will be opened.
113
- */
114
- type: 'CONTEXTUAL_FEEDBACK_SUBMISSION';
115
- };
116
- /**
117
- * Selected Help Center Tab.
118
- */
119
- selectedTab: 'feedback' | 'support';
120
- }
121
-
122
- export interface HelpCenterButtonConfig {
123
- /**
124
- * Callback function to be automatically executed on click.
125
- */
126
- callback?: (value?: any) => void;
127
- /**
128
- * ID of the string to use for handling callback.
129
- */
130
- id?: string;
131
- /**
132
- * Text of the button.
133
- */
134
- label: string;
135
- /**
136
- * Scope of the button. Options are:
137
- * 1. helpCenter: Shows as a button in the support section.
138
- * 2. helpCenterResource: Shows at the bottom of the resources section.
139
- */
140
- scope?: string;
141
- }
142
-
143
- export interface HelpCenterApiProperties {
144
- /**
145
- * Gets or sets the configuration for Help Center.
146
- *
147
- * ```typescript
148
- * helpCenter.config = {
149
- * featured: [
150
- * {
151
- * href: 'https://helpx.adobe.com/support/experience-cloud.html',
152
- * label: 'Adobe Experience Cloud Learn & Support',
153
- * path: '/:orgId?/home'
154
- * },
155
- * {
156
- * href: 'https://helpx.adobe.com/support/target.html',
157
- * label: 'Adobe Target'
158
- * }
159
- * ],
160
- * recommendations: {
161
- * enabled: true,
162
- * terms: [
163
- * {
164
- * path: '/:orgId?/analytics/home/(.*)?',
165
- * term: 'get started'
166
- * },
167
- * {
168
- * path: '/:orgId?/analytics/create',
169
- * term: 'create new'
170
- * }
171
- * ]
172
- * },
173
- * resources: [
174
- * {
175
- * href: 'https://marketing.adobe.com/resources/help/en_US/home/index.html',
176
- * label: 'Help Home'
177
- * }
178
- * ]
179
- * };
180
- * ```
181
- */
182
- config: HelpCenterConfig;
183
- }
184
-
185
- /**
186
- * Defines helpCenter-level APIs available to solutions.
187
- */
188
- export interface HelpCenterApi extends HelpCenterApiProperties {
189
- /**
190
- * Method to open the help center from within the iframe.
191
- *
192
- * ```typescript
193
- * helpCenter.open({
194
- * config: {
195
- * subject: 'Analytics'
196
- * type: 'CONTEXTUAL_FEEDBACK_SUBMISSION'
197
- * },
198
- * selectedTab: 'feedback'
199
- * });
200
- * ```
201
- */
202
- open(config?: HelpCenterOpenConfig): void;
203
-
204
- /**
205
- * Method to close the help center from within the iframe.
206
- *
207
- * ```typescript
208
- * helpCenter.close();
209
- * ```
210
- */
211
- close(): void;
212
-
213
- /**
214
- * Adds a custom button to the help center and enacts a callback onclick.
215
- * The button will be present under the support tab in help center.
216
- * The help center button may be reset by entering a null parameter.
217
- *
218
- * ```typescript
219
- * helpCenter.setButton({
220
- * callback: () => {},
221
- * label: 'Create Support Ticket'
222
- * });
223
- * ```
224
- */
225
- setButton(config: HelpCenterButtonConfig | HelpCenterButtonConfig[] | null): void;
226
-
227
- /**
228
- * Adds 1-many custom buttons to the help center and enacts a callback onclick.
229
- * Depending on the scope (helpCenter or helpCenterResource), the buttons will
230
- * be present under the support tab (helpCenter) or at the button of the
231
- * resources section on the main tab (helpCenterResource) in help center.
232
- * The help center button may be reset by entering a null parameter.
233
- *
234
- * ```typescript
235
- * helpCenter.setButtons([{
236
- * callback: () => {},
237
- * id: 'support',
238
- * label: 'Create Support Ticket',
239
- * scope: 'helpCenter'
240
- * }]);
241
- * ```
242
- */
243
- setButtons(buttons: HelpCenterButtonConfig[] | null): void;
244
- }
245
-
246
- const helpCenter = connect('helpCenter', [
247
- ['setButton', true],
248
- ['setButtons', true],
249
- ['config'],
250
- ['open', true]
251
- ]);
252
-
253
- export default helpCenter;
package/ims/ImsProfile.ts DELETED
@@ -1,57 +0,0 @@
1
- /*************************************************************************
2
- * Copyright 2021 Adobe
3
- * All Rights Reserved.
4
- *
5
- * NOTICE: Adobe permits you to use, modify, and distribute this file in
6
- * accordance with the terms of the Adobe license agreement accompanying
7
- * it. If you have received this file from a source other than Adobe,
8
- * then your use, modification, or distribution of it requires the prior
9
- * written permission of Adobe.
10
- **************************************************************************/
11
-
12
- export interface ProductContext {
13
- createDts: number;
14
- geo?: string;
15
- global_company_id?: string; // dma_analytics
16
- groupid: string;
17
- ident: string;
18
- label: string;
19
- login_company?: string;
20
- migration_status?: string;
21
- modDts: number;
22
- offer_id?: string;
23
- owningEntity: string;
24
- serviceCode: string;
25
- serviceLevel: string;
26
- statusCode: string;
27
- tenant_id?: string; // dma_tartan
28
- [key: string]: any;
29
- }
30
-
31
- export interface ActiveProductContext {
32
- [serviceCode: string]: ProductContext;
33
- }
34
-
35
- export interface ProjectedProductContext {
36
- prodCtx: ProductContext
37
- }
38
-
39
- export interface ImsProfile {
40
- account_type: string;
41
- authId: string;
42
- avatar?: string;
43
- avatarSrc?: string;
44
- countryCode: string;
45
- displayName: string;
46
- email: string;
47
- emailVerified: boolean;
48
- first_name: string;
49
- job_function: string;
50
- last_name: string;
51
- name: string;
52
- preferred_languages: string[];
53
- projectedProductContext: ProjectedProductContext[];
54
- session: string;
55
- userId: string;
56
- [key: string]: any;
57
- }
package/index.ts DELETED
@@ -1,76 +0,0 @@
1
- /*************************************************************************
2
- * Copyright 2020 Adobe
3
- * All Rights Reserved.
4
- *
5
- * NOTICE: Adobe permits you to use, modify, and distribute this file in
6
- * accordance with the terms of the Adobe license agreement accompanying
7
- * it. If you have received this file from a source other than Adobe,
8
- * then your use, modification, or distribution of it requires the prior
9
- * written permission of Adobe.
10
- **************************************************************************/
11
-
12
- /**
13
- * API used to integrate as solution web application with the unified shell of the Adobe Experience
14
- * Cloud.
15
- * @packageDocumentation
16
- * @preferred
17
- */
18
- import Global, {getImpl} from './src/Global';
19
- import Runtime from './src/Runtime';
20
- export type {RuntimeConfiguration} from './RuntimeConfiguration';
21
-
22
- /**
23
- * Get the runtime object which contains all unified-shell APIs.
24
- *
25
- * ***Example:***
26
- *
27
- * ```typescript
28
- * import React from 'react';
29
- * import ReactDOM from 'react-dom';
30
- * import excApp from '@adobe/exc-app';
31
- *
32
- * export class MyComponent extends React.Component {
33
- * constructor(props) {
34
- * this.runtime = excApp();
35
- * }
36
- * }
37
- * ```
38
- * @returns The runtime object.
39
- */
40
- export default function runtime(): Runtime {
41
- // Pass through first argument for backwards compatibility
42
- return getImpl('default')(arguments[0]); // eslint-disable-line prefer-rest-params
43
- }
44
-
45
- /**
46
- * Initializes a solution web application by invoking the bootstrap callback
47
- * once the runtime is ready.
48
- * 1. if the module is already defined, start to bootstrap
49
- * 2. otherwise define the global callback that will be called when runtime is ready.
50
- *
51
- * ***Example:***
52
- *
53
- * ```typescript
54
- * import React from 'react';
55
- * import ReactDOM from 'react-dom';
56
- * import runtime, {init} from '@adobe/exc-app';
57
- *
58
- * init(() => {
59
- * ReactDOM.render(<MainComponent runtime={runtime()} />, document.querySelector('#main'));
60
- * });
61
- * ```
62
- * @param bootstrap Callback used to bootstrap a solution. The runtime object is passed in as a
63
- * parameter to this callback.
64
- */
65
- export function init(bootstrap: (runtime: Runtime) => void): void {
66
- const callback = (): void => {
67
- bootstrap(runtime());
68
- };
69
- if (Global['exc-module-runtime']) {
70
- callback();
71
- } else {
72
- Global.EXC_MR_READY = callback;
73
- }
74
- }
75
-
76
- export type {Runtime};
package/internal.ts DELETED
@@ -1,102 +0,0 @@
1
- /*************************************************************************
2
- * Copyright 2020 Adobe
3
- * All Rights Reserved.
4
- *
5
- * NOTICE: Adobe permits you to use, modify, and distribute this file in
6
- * accordance with the terms of the Adobe license agreement accompanying
7
- * it. If you have received this file from a source other than Adobe,
8
- * then your use, modification, or distribution of it requires the prior
9
- * written permission of Adobe.
10
- **************************************************************************/
11
-
12
- /**
13
- * Internal APIs, meant to be used by Unified Shell only.
14
- * @ignore
15
- */
16
- import {Application} from './metrics/Application';
17
- import EventEmitter from './src/EventEmitter';
18
- import {getImpl, Modules} from './src/Global';
19
- import MetricsConfiguration from './metrics/Configuration';
20
- import {Configuration as NetworkConfiguration} from './network';
21
- import User from './metrics/User';
22
-
23
- export type {Modules};
24
-
25
- export interface Poller {
26
- activeFrequency: number;
27
- hiddenFrequency?: number;
28
- name: string;
29
- inactiveFrequency: number;
30
- immediate: boolean;
31
- pollFn: () => Promise<void>;
32
- }
33
-
34
- export interface PollerHandle {
35
- handle: string;
36
- }
37
-
38
- export interface UserActivityEmitter extends EventEmitter {
39
- activityEvents: string[];
40
- }
41
-
42
- export interface PollingConfiguration {
43
- inactivityTimeoutSec?: number;
44
- pollWhileInactive?: boolean;
45
- }
46
-
47
- /**
48
- * @ignore
49
- */
50
- export interface InternalApi {
51
- addPoller(poller: Poller): Promise<PollerHandle>
52
- clearUser(version?: string): void
53
- configureMetrics(config?: MetricsConfiguration): Promise<MetricsConfiguration>;
54
- configureNetwork(config: NetworkConfiguration): void;
55
- configurePolling(config: PollingConfiguration): Promise<void>;
56
- flush(): Promise<number>;
57
- registerActivityEmitter(emitter: UserActivityEmitter): Promise<void>;
58
- removePoller(handle: PollerHandle): Promise<void>;
59
- setApplication(app: Application): void;
60
- setFilter(filterFunction: <T>(record: T) => Promise<T>): void;
61
- setUser(user: User, version?: string): void;
62
- }
63
-
64
- /**
65
- * @ignore
66
- */
67
- export class Internal {
68
- public static addPoller(poller: Poller): Promise<PollerHandle> {
69
- return getImpl('internal').addPoller(poller);
70
- }
71
- public static configureMetrics(config?: MetricsConfiguration): Promise<MetricsConfiguration> {
72
- return getImpl('internal').configureMetrics(config);
73
- }
74
- public static configureNetwork(config: NetworkConfiguration): void {
75
- return getImpl('internal').configureNetwork(config);
76
- }
77
- public static configurePolling(config: PollingConfiguration): Promise<void> {
78
- return getImpl('internal').configurePolling(config);
79
- }
80
- public static flush(): Promise<number> {
81
- return getImpl('internal').flush();
82
- }
83
- public static registerActivityEmitter(emitter: UserActivityEmitter): Promise<void> {
84
- return getImpl('internal').registerActivityEmitter(emitter);
85
- }
86
- public static removePoller(handle: PollerHandle): Promise<void> {
87
- return getImpl('internal').removePoller(handle);
88
- }
89
- public static setApplication(app: Application): void {
90
- return getImpl('internal').setApplication(app);
91
- }
92
- public static setFilter(filterFunction: <T>(record: T) => Promise<T>): void {
93
- return getImpl('internal').setFilter(filterFunction);
94
- }
95
- public static setUser(user: User, version?: string): void {
96
- return getImpl('internal').setUser(user, version);
97
- }
98
- public static clearUser(version?: string): void {
99
- return getImpl('internal').clearUser(version);
100
- }
101
- }
102
-