@adobe/exc-app 0.2.45 → 1.0.0

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 (98) hide show
  1. package/RuntimeConfiguration.d.ts +4 -0
  2. package/appapi.d.ts +0 -1
  3. package/appapi.js +0 -1
  4. package/appapi.js.map +1 -1
  5. package/build/preBuild.js +14 -0
  6. package/capabilityapi.d.ts +2 -2
  7. package/capabilityapi.js +2 -2
  8. package/capabilityapi.js.map +1 -1
  9. package/docs/README.md +1 -0
  10. package/docs/enums/appapi.appids.md +14 -7
  11. package/docs/enums/capabilityapi.capabilityids.md +21 -0
  12. package/docs/enums/capabilityapi.capabilitynames.md +21 -0
  13. package/docs/interfaces/ims.activeproductcontext.md +13 -0
  14. package/docs/interfaces/ims.imsprofile.md +130 -0
  15. package/docs/interfaces/ims.productcontext.md +141 -0
  16. package/docs/interfaces/ims.projectedproductcontext.md +21 -0
  17. package/docs/interfaces/network.queryrequest.md +11 -0
  18. package/docs/interfaces/root.poller.md +56 -0
  19. package/docs/interfaces/root.pollerhandle.md +21 -0
  20. package/docs/interfaces/root.pollingconfiguration.md +28 -0
  21. package/docs/interfaces/root.runtimeconfiguration.md +10 -1
  22. package/docs/interfaces/root.useractivityemitter.md +110 -0
  23. package/docs/interfaces/root.useractivitymonitor.md +151 -0
  24. package/docs/interfaces/user.userapi.md +1 -1
  25. package/docs/modules/ims.md +14 -0
  26. package/docs/modules/root.md +5 -0
  27. package/docs/modules/settings.md +8 -57
  28. package/docs/modules/user.md +14 -0
  29. package/index.js +7 -0
  30. package/index.js.map +1 -1
  31. package/internal.d.ts +9 -0
  32. package/internal.js +3 -0
  33. package/internal.js.map +1 -1
  34. package/network.d.ts +0 -11
  35. package/network.js +1 -10
  36. package/network.js.map +1 -1
  37. package/package.json +5 -6
  38. package/src/Global.d.ts +3 -1
  39. package/src/Global.js.map +1 -1
  40. package/tests/index.test.js +5 -0
  41. package/tests/index.test.js.map +1 -1
  42. package/tests/version.test.d.ts +1 -0
  43. package/tests/version.test.js +23 -0
  44. package/tests/version.test.js.map +1 -0
  45. package/user.d.ts +10 -1
  46. package/user.js.map +1 -1
  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/helpcenter.ts +0 -253
  54. package/ims/ImsProfile.ts +0 -57
  55. package/index.ts +0 -76
  56. package/internal.ts +0 -102
  57. package/metrics/Analytics.ts +0 -55
  58. package/metrics/Application.ts +0 -24
  59. package/metrics/Configuration.ts +0 -33
  60. package/metrics/Events.ts +0 -28
  61. package/metrics/History.ts +0 -36
  62. package/metrics/Metric.ts +0 -52
  63. package/metrics/Metrics.ts +0 -129
  64. package/metrics/RecordType.ts +0 -139
  65. package/metrics/User.ts +0 -30
  66. package/metrics.ts +0 -94
  67. package/network.ts +0 -568
  68. package/nps.ts +0 -83
  69. package/orgswitcher.ts +0 -109
  70. package/page.ts +0 -497
  71. package/permissions.ts +0 -103
  72. package/pulse.ts +0 -198
  73. package/session.ts +0 -116
  74. package/settings.ts +0 -147
  75. package/shell.ts +0 -107
  76. package/sidebar.ts +0 -208
  77. package/sidenav.ts +0 -287
  78. package/src/EventEmitter.ts +0 -44
  79. package/src/Global.ts +0 -109
  80. package/src/Runtime.ts +0 -23
  81. package/tests/MockRuntime.ts +0 -28
  82. package/tests/appapi.test.ts +0 -78
  83. package/tests/capabilityapi.test.ts +0 -55
  84. package/tests/helpCenter.test.ts +0 -80
  85. package/tests/index.test.ts +0 -50
  86. package/tests/metrics.test.ts +0 -34
  87. package/tests/nps.test.ts +0 -37
  88. package/tests/page.test.ts +0 -110
  89. package/tests/permissions.test.ts +0 -96
  90. package/tests/pulse.test.ts +0 -37
  91. package/tests/shell.test.ts +0 -89
  92. package/tests/sidenav.test.ts +0 -91
  93. package/tests/topbar.test.ts +0 -85
  94. package/tests/user.test.ts +0 -129
  95. package/tests/userprofile.test.ts +0 -31
  96. package/topbar.ts +0 -288
  97. package/user.ts +0 -228
  98. package/userprofile.ts +0 -93
@@ -0,0 +1,56 @@
1
+ **[@adobe/exc-app](../README.md)**
2
+
3
+ > [Globals](../README.md) / [root](../modules/root.md) / Poller
4
+
5
+ # Interface: Poller
6
+
7
+ ## Hierarchy
8
+
9
+ * **Poller**
10
+
11
+ ## Index
12
+
13
+ ### Properties
14
+
15
+ * [activeFrequency](root.poller.md#activefrequency)
16
+ * [hiddenFrequency](root.poller.md#hiddenfrequency)
17
+ * [immediate](root.poller.md#immediate)
18
+ * [inactiveFrequency](root.poller.md#inactivefrequency)
19
+ * [name](root.poller.md#name)
20
+ * [pollFn](root.poller.md#pollfn)
21
+
22
+ ## Properties
23
+
24
+ ### activeFrequency
25
+
26
+ • **activeFrequency**: number
27
+
28
+ ___
29
+
30
+ ### hiddenFrequency
31
+
32
+ • `Optional` **hiddenFrequency**: undefined \| number
33
+
34
+ ___
35
+
36
+ ### immediate
37
+
38
+ • **immediate**: boolean
39
+
40
+ ___
41
+
42
+ ### inactiveFrequency
43
+
44
+ • **inactiveFrequency**: number
45
+
46
+ ___
47
+
48
+ ### name
49
+
50
+ • **name**: string
51
+
52
+ ___
53
+
54
+ ### pollFn
55
+
56
+ • **pollFn**: () => Promise<void\>
@@ -0,0 +1,21 @@
1
+ **[@adobe/exc-app](../README.md)**
2
+
3
+ > [Globals](../README.md) / [root](../modules/root.md) / PollerHandle
4
+
5
+ # Interface: PollerHandle
6
+
7
+ ## Hierarchy
8
+
9
+ * **PollerHandle**
10
+
11
+ ## Index
12
+
13
+ ### Properties
14
+
15
+ * [handle](root.pollerhandle.md#handle)
16
+
17
+ ## Properties
18
+
19
+ ### handle
20
+
21
+ • **handle**: string
@@ -0,0 +1,28 @@
1
+ **[@adobe/exc-app](../README.md)**
2
+
3
+ > [Globals](../README.md) / [root](../modules/root.md) / PollingConfiguration
4
+
5
+ # Interface: PollingConfiguration
6
+
7
+ ## Hierarchy
8
+
9
+ * **PollingConfiguration**
10
+
11
+ ## Index
12
+
13
+ ### Properties
14
+
15
+ * [inactivityTimeoutSec](root.pollingconfiguration.md#inactivitytimeoutsec)
16
+ * [pollWhileInactive](root.pollingconfiguration.md#pollwhileinactive)
17
+
18
+ ## Properties
19
+
20
+ ### inactivityTimeoutSec
21
+
22
+ • `Optional` **inactivityTimeoutSec**: undefined \| number
23
+
24
+ ___
25
+
26
+ ### pollWhileInactive
27
+
28
+ • `Optional` **pollWhileInactive**: undefined \| false \| true
@@ -50,6 +50,7 @@ External Runtime Configuration Interface
50
50
  * [shellSideNavCollapsed](root.runtimeconfiguration.md#shellsidenavcollapsed)
51
51
  * [shellSideNavPresent](root.runtimeconfiguration.md#shellsidenavpresent)
52
52
  * [shellSideNavWidth](root.runtimeconfiguration.md#shellsidenavwidth)
53
+ * [sourceEnvironment](root.runtimeconfiguration.md#sourceenvironment)
53
54
  * [spaAppId](root.runtimeconfiguration.md#spaappid)
54
55
  * [subOrg](root.runtimeconfiguration.md#suborg)
55
56
  * [tenant](root.runtimeconfiguration.md#tenant)
@@ -229,7 +230,7 @@ ___
229
230
 
230
231
  ### imsProfile
231
232
 
232
- • `Optional` **imsProfile**: undefined \| { authId: string ; displayName: string ; session: string ; userId: string }
233
+ • `Optional` **imsProfile**: [ImsProfile](ims.imsprofile.md)
233
234
 
234
235
  User IMS Profile
235
236
 
@@ -347,6 +348,14 @@ Side Nav width
347
348
 
348
349
  ___
349
350
 
351
+ ### sourceEnvironment
352
+
353
+ • **sourceEnvironment**: string
354
+
355
+ Source environment
356
+
357
+ ___
358
+
350
359
  ### spaAppId
351
360
 
352
361
  • `Optional` **spaAppId**: undefined \| string
@@ -0,0 +1,110 @@
1
+ **[@adobe/exc-app](../README.md)**
2
+
3
+ > [Globals](../README.md) / [root](../modules/root.md) / UserActivityEmitter
4
+
5
+ # Interface: UserActivityEmitter<T\>
6
+
7
+ ## Type parameters
8
+
9
+ Name | Default |
10
+ ------ | ------ |
11
+ `T` | Record<string, any\\> |
12
+
13
+ ## Hierarchy
14
+
15
+ * EventEmitter
16
+
17
+ ↳ **UserActivityEmitter**
18
+
19
+ ## Index
20
+
21
+ ### Properties
22
+
23
+ * [activityEvents](root.useractivityemitter.md#activityevents)
24
+
25
+ ### EventEmitter Methods
26
+
27
+ * [emit](root.useractivityemitter.md#emit)
28
+ * [off](root.useractivityemitter.md#off)
29
+ * [on](root.useractivityemitter.md#on)
30
+
31
+ ## Properties
32
+
33
+ ### activityEvents
34
+
35
+ • **activityEvents**: string[]
36
+
37
+ ## EventEmitter Methods
38
+
39
+ ### emit
40
+
41
+ ▸ **emit**<K\>(`type`: K, `event?`: T[K]): void
42
+
43
+ *Inherited from void*
44
+
45
+ Invoke all handlers for the given type.
46
+
47
+ #### Type parameters:
48
+
49
+ Name | Type |
50
+ ------ | ------ |
51
+ `K` | keyof T |
52
+
53
+ #### Parameters:
54
+
55
+ Name | Type | Description |
56
+ ------ | ------ | ------ |
57
+ `type` | K | The event type to invoke. |
58
+ `event?` | T[K] | Any value (object is recommended and powerful), passed to each handler. |
59
+
60
+ **Returns:** void
61
+
62
+ ___
63
+
64
+ ### off
65
+
66
+ ▸ **off**<K\>(`type`: K, `handler`: (event?: T[K]) => void): void
67
+
68
+ *Inherited from void*
69
+
70
+ Remove an event handler for the given type.
71
+
72
+ #### Type parameters:
73
+
74
+ Name | Type |
75
+ ------ | ------ |
76
+ `K` | keyof T |
77
+
78
+ #### Parameters:
79
+
80
+ Name | Type | Description |
81
+ ------ | ------ | ------ |
82
+ `type` | K | Type of event to unregister `handler` from. |
83
+ `handler` | (event?: T[K]) => void | Handler function to remove. |
84
+
85
+ **Returns:** void
86
+
87
+ ___
88
+
89
+ ### on
90
+
91
+ ▸ **on**<K\>(`type`: K, `handler`: (event?: T[K]) => void): void
92
+
93
+ *Inherited from void*
94
+
95
+ Register an event handler for the given type.
96
+
97
+ #### Type parameters:
98
+
99
+ Name | Type |
100
+ ------ | ------ |
101
+ `K` | keyof T |
102
+
103
+ #### Parameters:
104
+
105
+ Name | Type | Description |
106
+ ------ | ------ | ------ |
107
+ `type` | K | Type of event to listen for. |
108
+ `handler` | (event?: T[K]) => void | Function to call in response to given event. |
109
+
110
+ **Returns:** void
@@ -0,0 +1,151 @@
1
+ **[@adobe/exc-app](../README.md)**
2
+
3
+ > [Globals](../README.md) / [root](../modules/root.md) / UserActivityMonitor
4
+
5
+ # Interface: UserActivityMonitor<T\>
6
+
7
+ ## Type parameters
8
+
9
+ Name | Default |
10
+ ------ | ------ |
11
+ `T` | Record<string, any\\> |
12
+
13
+ ## Hierarchy
14
+
15
+ * EventEmitter
16
+
17
+ ↳ **UserActivityMonitor**
18
+
19
+ ## Index
20
+
21
+ ### Properties
22
+
23
+ * [active](root.useractivitymonitor.md#active)
24
+ * [configure](root.useractivitymonitor.md#configure)
25
+ * [hidden](root.useractivitymonitor.md#hidden)
26
+ * [lastActive](root.useractivitymonitor.md#lastactive)
27
+
28
+ ### EventEmitter Methods
29
+
30
+ * [emit](root.useractivitymonitor.md#emit)
31
+ * [off](root.useractivitymonitor.md#off)
32
+ * [on](root.useractivitymonitor.md#on)
33
+
34
+ ### Other Methods
35
+
36
+ * [registerActivityEmitter](root.useractivitymonitor.md#registeractivityemitter)
37
+
38
+ ## Properties
39
+
40
+ ### active
41
+
42
+ • **active**: boolean
43
+
44
+ ___
45
+
46
+ ### configure
47
+
48
+ • **configure**: (config: [PollingConfiguration](root.pollingconfiguration.md)) => void
49
+
50
+ ___
51
+
52
+ ### hidden
53
+
54
+ • **hidden**: boolean
55
+
56
+ ___
57
+
58
+ ### lastActive
59
+
60
+ • **lastActive**: number
61
+
62
+ ## EventEmitter Methods
63
+
64
+ ### emit
65
+
66
+ ▸ **emit**<K\>(`type`: K, `event?`: T[K]): void
67
+
68
+ *Inherited from void*
69
+
70
+ Invoke all handlers for the given type.
71
+
72
+ #### Type parameters:
73
+
74
+ Name | Type |
75
+ ------ | ------ |
76
+ `K` | keyof T |
77
+
78
+ #### Parameters:
79
+
80
+ Name | Type | Description |
81
+ ------ | ------ | ------ |
82
+ `type` | K | The event type to invoke. |
83
+ `event?` | T[K] | Any value (object is recommended and powerful), passed to each handler. |
84
+
85
+ **Returns:** void
86
+
87
+ ___
88
+
89
+ ### off
90
+
91
+ ▸ **off**<K\>(`type`: K, `handler`: (event?: T[K]) => void): void
92
+
93
+ *Inherited from void*
94
+
95
+ Remove an event handler for the given type.
96
+
97
+ #### Type parameters:
98
+
99
+ Name | Type |
100
+ ------ | ------ |
101
+ `K` | keyof T |
102
+
103
+ #### Parameters:
104
+
105
+ Name | Type | Description |
106
+ ------ | ------ | ------ |
107
+ `type` | K | Type of event to unregister `handler` from. |
108
+ `handler` | (event?: T[K]) => void | Handler function to remove. |
109
+
110
+ **Returns:** void
111
+
112
+ ___
113
+
114
+ ### on
115
+
116
+ ▸ **on**<K\>(`type`: K, `handler`: (event?: T[K]) => void): void
117
+
118
+ *Inherited from void*
119
+
120
+ Register an event handler for the given type.
121
+
122
+ #### Type parameters:
123
+
124
+ Name | Type |
125
+ ------ | ------ |
126
+ `K` | keyof T |
127
+
128
+ #### Parameters:
129
+
130
+ Name | Type | Description |
131
+ ------ | ------ | ------ |
132
+ `type` | K | Type of event to listen for. |
133
+ `handler` | (event?: T[K]) => void | Function to call in response to given event. |
134
+
135
+ **Returns:** void
136
+
137
+ ___
138
+
139
+ ## Other Methods
140
+
141
+ ### registerActivityEmitter
142
+
143
+ ▸ **registerActivityEmitter**(`emitter`: [UserActivityEmitter](root.useractivityemitter.md)): void
144
+
145
+ #### Parameters:
146
+
147
+ Name | Type |
148
+ ------ | ------ |
149
+ `emitter` | [UserActivityEmitter](root.useractivityemitter.md) |
150
+
151
+ **Returns:** void
@@ -32,7 +32,7 @@
32
32
 
33
33
  ### logoutUrl
34
34
 
35
- **logoutUrl**: string \| undefined
35
+ `Optional` **logoutUrl**: [LogoutUrl](../modules/user.md#logouturl)
36
36
 
37
37
  Optional. When specified this URL will be invoked upon user logging out. This is useful to
38
38
  reduce the number of lingering sessions for solutions who have their own sessions server
@@ -0,0 +1,14 @@
1
+ **[@adobe/exc-app](../README.md)**
2
+
3
+ > [Globals](../README.md) / ims
4
+
5
+ # Module: ims
6
+
7
+ ## Index
8
+
9
+ ### Interfaces
10
+
11
+ * [ActiveProductContext](../interfaces/ims.activeproductcontext.md)
12
+ * [ImsProfile](../interfaces/ims.imsprofile.md)
13
+ * [ProductContext](../interfaces/ims.productcontext.md)
14
+ * [ProjectedProductContext](../interfaces/ims.projectedproductcontext.md)
@@ -16,8 +16,13 @@ Cloud.
16
16
  ### Interfaces
17
17
 
18
18
  * [Modules](../interfaces/root.modules.md)
19
+ * [Poller](../interfaces/root.poller.md)
20
+ * [PollerHandle](../interfaces/root.pollerhandle.md)
21
+ * [PollingConfiguration](../interfaces/root.pollingconfiguration.md)
19
22
  * [Runtime](../interfaces/root.runtime.md)
20
23
  * [RuntimeConfiguration](../interfaces/root.runtimeconfiguration.md)
24
+ * [UserActivityEmitter](../interfaces/root.useractivityemitter.md)
25
+ * [UserActivityMonitor](../interfaces/root.useractivitymonitor.md)
21
26
 
22
27
  ### Functions
23
28
 
@@ -4,63 +4,14 @@
4
4
 
5
5
  # Module: settings
6
6
 
7
- APIs to get or set settings, preferences or configuration data that can be stored and retrieved
8
- at an IMS user and/or an IMS org level. An app in unified shell can consume Settings service.
9
-
10
- To consume this API, add the following import to your code.
11
-
12
- ```typescript
13
- import settings from '@adobe/exc-app/settings';
14
- ```
15
-
16
- The default export is an object of type [SettingsApi](../interfaces/_settings_.settingsapi.md)
17
-
18
- API reference: [scroll down](#index)
19
-
20
- ### Sample code
21
-
22
- ```typescript
23
- import settings, {SettingsLevel} from '@adobe/exc-app/settings';
24
-
25
- async function updateSettings(type: string, value: number) {
26
- const data = await settings.get({
27
- groupId: 'test-groupId',
28
- level: SettingsLevel.USER,
29
- settings: {key1: null}
30
- });
31
- data = data || {};
32
- data[type] = value;
33
- await settings.set({
34
- groupId: 'test-groupId',
35
- level: SettingsLevel.USER,
36
- settings: {key1: data}
37
- });
38
- }
39
- ```
40
-
41
- ### SettingsLevel
42
-
43
- Can be optionally specified to define the level at which settings are saved.
44
-
45
- * `SettingsLevel.USER` - use this level when you want to get/set settings per user.
46
- * `SettingsLevel.USERORG` - should be used when settings are for user + org combination.
47
- * `SettingsLevel.ORG` - use this level when you want to get/set settings per org.
48
-
49
- By default settings are saved at level `SettingsLevel.USERORG`. You can optionally override this
50
- in the get/set API calls using the `level` parameter.
51
-
52
- ### Groups
53
-
54
- Apps can group their settings into different groups by different group IDs and keep multiple
55
- settings in different groups. Apps are free to define their own groups for a particular selected
56
- settings level.
57
-
58
- You can specify this in the get/set API calls using the `groupId` parameter.
59
-
60
- ### Sharing settings
61
-
62
- Set settingsAppId in the solution specific route configuration in order to share settings with
63
- other applications.
7
+ Copyright 2021 Adobe
8
+ All Rights Reserved.
9
+
10
+ NOTICE: Adobe permits you to use, modify, and distribute this file in
11
+ accordance with the terms of the Adobe license agreement accompanying
12
+ it. If you have received this file from a source other than Adobe,
13
+ then your use, modification, or distribution of it requires the prior
14
+ written permission of Adobe.
64
15
 
65
16
  ## Index
66
17
 
@@ -91,3 +91,17 @@ type2e account will cause the imsProfile to change, while an org change within t
91
91
  * [Sandbox](../interfaces/user.sandbox.md)
92
92
  * [UserApi](../interfaces/user.userapi.md)
93
93
  * [UserInfo](../interfaces/user.userinfo.md)
94
+
95
+ ### Type aliases
96
+
97
+ * [LogoutUrl](user.md#logouturl)
98
+
99
+ ## Type aliases
100
+
101
+ ### LogoutUrl
102
+
103
+ Ƭ **LogoutUrl**: string \| { distinctDomain?: undefined \| false \| true ; url: string }
104
+
105
+ Logout URL can either be a string or an object. The object includes the URL
106
+ to be called on logout and whether this URL should be the only version of the
107
+ host in the logout list.
package/index.js CHANGED
@@ -28,6 +28,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
28
28
  __setModuleDefault(result, mod);
29
29
  return result;
30
30
  };
31
+ var __importDefault = (this && this.__importDefault) || function (mod) {
32
+ return (mod && mod.__esModule) ? mod : { "default": mod };
33
+ };
31
34
  Object.defineProperty(exports, "__esModule", { value: true });
32
35
  exports.init = void 0;
33
36
  /**
@@ -37,6 +40,7 @@ exports.init = void 0;
37
40
  * @preferred
38
41
  */
39
42
  const Global_1 = __importStar(require("./src/Global"));
43
+ const version_1 = __importDefault(require("./version"));
40
44
  /**
41
45
  * Get the runtime object which contains all unified-shell APIs.
42
46
  *
@@ -82,6 +86,9 @@ exports.default = runtime;
82
86
  */
83
87
  function init(bootstrap) {
84
88
  const callback = () => {
89
+ if (Global_1.default['exc-module-runtime']) {
90
+ Global_1.default['exc-module-runtime']['exc-app-version'] = version_1.default;
91
+ }
85
92
  bootstrap(runtime());
86
93
  };
87
94
  if (Global_1.default['exc-module-runtime']) {
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;4EAS4E;;;;;;;;;;;;;;;;;;;;;;AAE5E;;;;;GAKG;AACH,uDAA6C;AAI7C;;;;;;;;;;;;;;;;;GAiBG;AACH,SAAwB,OAAO;IAC7B,0DAA0D;IAC1D,OAAO,gBAAO,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,yCAAyC;AACpF,CAAC;AAHD,0BAGC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,SAAgB,IAAI,CAAC,SAAqC;IACxD,MAAM,QAAQ,GAAG,GAAS,EAAE;QAC1B,SAAS,CAAC,OAAO,EAAE,CAAC,CAAC;IACvB,CAAC,CAAC;IACF,IAAI,gBAAM,CAAC,oBAAoB,CAAC,EAAE;QAChC,QAAQ,EAAE,CAAC;KACZ;SAAM;QACL,gBAAM,CAAC,YAAY,GAAG,QAAQ,CAAC;KAChC;AACH,CAAC;AATD,oBASC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;4EAS4E;;;;;;;;;;;;;;;;;;;;;;;;;AAE5E;;;;;GAKG;AACH,uDAA6C;AAE7C,wDAAgC;AAIhC;;;;;;;;;;;;;;;;;GAiBG;AACH,SAAwB,OAAO;IAC7B,0DAA0D;IAC1D,OAAO,gBAAO,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,yCAAyC;AACpF,CAAC;AAHD,0BAGC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,SAAgB,IAAI,CAAC,SAAqC;IACxD,MAAM,QAAQ,GAAG,GAAS,EAAE;QAC1B,IAAI,gBAAM,CAAC,oBAAoB,CAAC,EAAE;YAChC,gBAAM,CAAC,oBAAoB,CAAC,CAAC,iBAAiB,CAAC,GAAG,iBAAO,CAAC;SAC3D;QACD,SAAS,CAAC,OAAO,EAAE,CAAC,CAAC;IACvB,CAAC,CAAC;IACF,IAAI,gBAAM,CAAC,oBAAoB,CAAC,EAAE;QAChC,QAAQ,EAAE,CAAC;KACZ;SAAM;QACL,gBAAM,CAAC,YAAY,GAAG,QAAQ,CAAC;KAChC;AACH,CAAC;AAZD,oBAYC"}
package/internal.d.ts CHANGED
@@ -33,6 +33,13 @@ export interface PollerHandle {
33
33
  export interface UserActivityEmitter extends EventEmitter {
34
34
  activityEvents: string[];
35
35
  }
36
+ export interface UserActivityMonitor extends EventEmitter {
37
+ active: boolean;
38
+ configure: (config: PollingConfiguration) => void;
39
+ hidden: boolean;
40
+ lastActive: number;
41
+ registerActivityEmitter(emitter: UserActivityEmitter): void;
42
+ }
36
43
  export interface PollingConfiguration {
37
44
  inactivityTimeoutSec?: number;
38
45
  pollWhileInactive?: boolean;
@@ -47,6 +54,7 @@ export interface InternalApi {
47
54
  configureNetwork(config: NetworkConfiguration): void;
48
55
  configurePolling(config: PollingConfiguration): Promise<void>;
49
56
  flush(): Promise<number>;
57
+ getActivityMonitor(): Promise<UserActivityMonitor>;
50
58
  registerActivityEmitter(emitter: UserActivityEmitter): Promise<void>;
51
59
  removePoller(handle: PollerHandle): Promise<void>;
52
60
  setApplication(app: Application): void;
@@ -62,6 +70,7 @@ export declare class Internal {
62
70
  static configureNetwork(config: NetworkConfiguration): void;
63
71
  static configurePolling(config: PollingConfiguration): Promise<void>;
64
72
  static flush(): Promise<number>;
73
+ static getActivityMonitor(): Promise<UserActivityMonitor>;
65
74
  static registerActivityEmitter(emitter: UserActivityEmitter): Promise<void>;
66
75
  static removePoller(handle: PollerHandle): Promise<void>;
67
76
  static setApplication(app: Application): void;
package/internal.js CHANGED
@@ -31,6 +31,9 @@ class Internal {
31
31
  static flush() {
32
32
  return Global_1.getImpl('internal').flush();
33
33
  }
34
+ static getActivityMonitor() {
35
+ return Global_1.getImpl('internal').getActivityMonitor();
36
+ }
34
37
  static registerActivityEmitter(emitter) {
35
38
  return Global_1.getImpl('internal').registerActivityEmitter(emitter);
36
39
  }
package/internal.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"","sources":["internal.ts"],"names":[],"mappings":";AAAA;;;;;;;;;4EAS4E;;;AAQ5E,yCAA8C;AA8C9C;;GAEG;AACH,MAAa,QAAQ;IACZ,MAAM,CAAC,SAAS,CAAC,MAAc;QACpC,OAAO,gBAAO,CAAC,UAAU,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAC/C,CAAC;IACM,MAAM,CAAC,gBAAgB,CAAC,MAA6B;QAC1D,OAAO,gBAAO,CAAC,UAAU,CAAC,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;IACtD,CAAC;IACM,MAAM,CAAC,gBAAgB,CAAC,MAA4B;QACzD,OAAO,gBAAO,CAAC,UAAU,CAAC,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;IACtD,CAAC;IACM,MAAM,CAAC,gBAAgB,CAAC,MAA4B;QACzD,OAAO,gBAAO,CAAC,UAAU,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gBAAO,CAAC,UAAU,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IAChD,CAAC;CACF;AArCD,4BAqCC"}
package/network.d.ts CHANGED
@@ -357,11 +357,6 @@ export interface ApolloClientOptions {
357
357
  cacheOptions?: InMemoryCacheConfig;
358
358
  }
359
359
  export interface NetworkApi {
360
- /**
361
- * @deprecated
362
- * @ignore
363
- */
364
- configure(config: Configuration): void;
365
360
  /**
366
361
  * Provides an interface for fetching resources powered by the global 'fetch' API.
367
362
  *
@@ -531,10 +526,4 @@ export declare function getApolloClient(options?: ApolloClientOptions): Promise<
531
526
  apolloClient: ApolloClient<InMemoryCache>;
532
527
  gql: typeof gql;
533
528
  }>;
534
- /**
535
- * @ignore
536
- */
537
- export declare class Internal {
538
- static configure(config: Configuration): void;
539
- }
540
529
  export {};
package/network.js CHANGED
@@ -10,7 +10,7 @@
10
10
  * written permission of Adobe.
11
11
  **************************************************************************/
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
- exports.Internal = exports.getApolloClient = exports.query = exports.fetch = exports.FetchScope = exports.ROUTING = exports.DEFAULT_STATUS_CODES_TO_RETRY = void 0;
13
+ exports.getApolloClient = exports.query = exports.fetch = exports.FetchScope = exports.ROUTING = exports.DEFAULT_STATUS_CODES_TO_RETRY = void 0;
14
14
  const Global_1 = require("./src/Global");
15
15
  /**
16
16
  * Default status codes which imply a transient error and can be retried.
@@ -151,13 +151,4 @@ function getApolloClient(options) {
151
151
  return Global_1.getImpl('network').getApolloClient(options);
152
152
  }
153
153
  exports.getApolloClient = getApolloClient;
154
- /**
155
- * @ignore
156
- */
157
- class Internal {
158
- static configure(config) {
159
- return Global_1.getImpl('network').configure(config);
160
- }
161
- }
162
- exports.Internal = Internal;
163
154
  //# sourceMappingURL=network.js.map
package/network.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"network.js","sourceRoot":"","sources":["network.ts"],"names":[],"mappings":";AAAA;;;;;;;;;4EAS4E;;;AA+C5E,yCAAq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