@adobe/exc-app 0.2.43 → 0.2.44-beta

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/appapi.d.ts CHANGED
@@ -55,6 +55,7 @@ export declare enum AppIds {
55
55
  CUSTOMER_JOURNEY_ANALYTICS = "platformAnalytics",
56
56
  CUSTOMER_JOURNEY_MANAGEMENT = "cjm-home",
57
57
  DATA_COLLECTION = "launchDataCollection",
58
+ DYNAMIC_CHAT = "hummingbird",
58
59
  EXCHANGE = "exchange",
59
60
  EXPERIENCE_CLOUD = "landing",
60
61
  EXPERIENCE_MANAGER = "experienceManagerUI",
package/appapi.js CHANGED
@@ -61,6 +61,7 @@ var AppIds;
61
61
  AppIds["CUSTOMER_JOURNEY_ANALYTICS"] = "platformAnalytics";
62
62
  AppIds["CUSTOMER_JOURNEY_MANAGEMENT"] = "cjm-home";
63
63
  AppIds["DATA_COLLECTION"] = "launchDataCollection";
64
+ AppIds["DYNAMIC_CHAT"] = "hummingbird";
64
65
  AppIds["EXCHANGE"] = "exchange";
65
66
  AppIds["EXPERIENCE_CLOUD"] = "landing";
66
67
  AppIds["EXPERIENCE_MANAGER"] = "experienceManagerUI";
package/appapi.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"appapi.js","sourceRoot":"","sources":["appapi.ts"],"names":[],"mappings":";AAAA;;;;;;;;;4EAS4E;;;AAE5E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,yCAAqC;AAiCrC,0DAA0D;AAC1D,IAAY,MA4CX;AA5CD,WAAY,MAAM;IAChB,yBAAe,CAAA;IACf,wCAA8B,CAAA;IAC9B,oDAA0C,CAAA;IAC1C,uCAA6B,CAAA;IAC7B,iCAAuB,CAAA;IACvB,2BAAiB,CAAA;IACjB,oCAA0B,CAAA;IAC1B,8CAAoC,CAAA;IACpC,6BAAmB,CAAA;IACnB,0BAAgB,CAAA;IAChB,yCAA+B,CAAA;IAC/B,0CAA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CAAA;IACjB,oCAA0B,CAAA;IAC1B,8CAAoC,CAAA;IACpC,6BAAmB,CAAA;IACnB,0BAAgB,CAAA;IAChB,yCAA+B,CAAA;IAC/B,0CAAgC,CAAA;IAChC,gEAAsD,CAAA;IACtD,0DAAgD,CAAA;IAChD,kDAAwC,CAAA;IACxC,kDAAwC,CAAA;IACxC,sCAA4B,CAAA;IAC5B,+BAAqB,CAAA;IACrB,sCAA4B,CAAA;IAC5B,oDAA0C,CAAA;IAC1C,4DAAkD,CAAA;IAClD,gDAAsC,CAAA;IACtC,sDAA4C,CAAA;IAC5C,+BAAqB,CAAA;IACrB,wCAA8B,CAAA;IAC9B,4CAAkC,CAAA;IAClC,8CAAoC,CAAA;IACpC,wCAA8B,CAAA;IAC9B,kCAAwB,CAAA;IACxB,sCAA4B,CAAA;IAC5B,oCAA0B,CAAA;IAC1B,2BAAiB,CAAA;IACjB,2BAAiB,CAAA;IACjB,mCAAyB,CAAA;IACzB,iCAAuB,CAAA;IACvB,kCAAwB,CAAA;IACxB,0CAAgC,CAAA;IAChC,6CAAmC,CAAA;IACnC,qCAA2B,CAAA;IAC3B,qDAA2C,CAAA;IAC3C,wDAA8C,CAAA;IAC9C,wCAA8B,CAAA;IAC9B,2BAAiB,CAAA;IACjB,+BAAqB,CAAA;AACvB,CAAC,EA7CW,MAAM,GAAN,cAAM,KAAN,cAAM,QA6CjB;AAWD,MAAM,MAAM,GAAW;IACrB,GAAG,EAAE,MAAM,CAAC,EAAE;QACZ,OAAO,gBAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACzC,CAAC;CACF,CAAC;AAEF,kBAAe,MAAM,CAAC"}
package/appapi.ts CHANGED
@@ -91,6 +91,7 @@ export enum AppIds {
91
91
  CUSTOMER_JOURNEY_ANALYTICS = 'platformAnalytics',
92
92
  CUSTOMER_JOURNEY_MANAGEMENT = 'cjm-home',
93
93
  DATA_COLLECTION = 'launchDataCollection',
94
+ DYNAMIC_CHAT = 'hummingbird',
94
95
  EXCHANGE = 'exchange',
95
96
  EXPERIENCE_CLOUD = 'landing',
96
97
  EXPERIENCE_MANAGER = 'experienceManagerUI',
package/build/preBuild.js CHANGED
@@ -22,6 +22,7 @@ const capabilities = require('../../core/src/services/CapabilityConstants/capabi
22
22
  const DEFAULT_APP_IDS = {
23
23
  CUSTOMER_JOURNEY_MANAGEMENT: 'cjm-home',
24
24
  LAUNCH_IMPLEMENT: 'implement',
25
+ PROJECT_HUMMINGBIRD: 'hummingbird',
25
26
  PROJECT_SIERRA: 'cjm-home'
26
27
  };
27
28
 
@@ -4,14 +4,63 @@
4
4
 
5
5
  # Module: settings
6
6
 
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.
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.
15
64
 
16
65
  ## Index
17
66
 
package/internal.d.ts CHANGED
@@ -18,14 +18,35 @@ import MetricsConfiguration from './metrics/Configuration';
18
18
  import { Configuration as NetworkConfiguration } from './network';
19
19
  import User from './metrics/User';
20
20
  export type { Modules };
21
+ export declare enum PollingStrategy {
22
+ VISIBILITY = "VISIBILITY",
23
+ IDLENESS = "IDLENESS"
24
+ }
25
+ export interface Poller {
26
+ activeFrequency: number;
27
+ name: string;
28
+ inactiveFrequency: number;
29
+ immediate: boolean;
30
+ pollFn: () => Promise<void>;
31
+ strategy: PollingStrategy;
32
+ }
33
+ export interface PollerHandle {
34
+ handle: string;
35
+ }
36
+ export interface PollingConfiguration {
37
+ strategy: PollingStrategy;
38
+ }
21
39
  /**
22
40
  * @ignore
23
41
  */
24
42
  export interface InternalApi {
43
+ addPoller(poller: Poller): Promise<PollerHandle>;
25
44
  clearUser(version?: string): void;
26
45
  configureMetrics(config?: MetricsConfiguration): Promise<MetricsConfiguration>;
27
46
  configureNetwork(config: NetworkConfiguration): void;
47
+ configurePolling(config: PollingConfiguration): Promise<void>;
28
48
  flush(): Promise<number>;
49
+ removePoller(handle: PollerHandle): Promise<void>;
29
50
  setApplication(app: Application): void;
30
51
  setFilter(filterFunction: <T>(record: T) => Promise<T>): void;
31
52
  setUser(user: User, version?: string): void;
@@ -34,9 +55,12 @@ export interface InternalApi {
34
55
  * @ignore
35
56
  */
36
57
  export declare class Internal {
58
+ static addPoller(poller: Poller): Promise<PollerHandle>;
37
59
  static configureMetrics(config?: MetricsConfiguration): Promise<MetricsConfiguration>;
38
60
  static configureNetwork(config: NetworkConfiguration): void;
61
+ static configurePolling(config: PollingConfiguration): Promise<void>;
39
62
  static flush(): Promise<number>;
63
+ static removePoller(handle: PollerHandle): Promise<void>;
40
64
  static setApplication(app: Application): void;
41
65
  static setFilter(filterFunction: <T>(record: T) => Promise<T>): void;
42
66
  static setUser(user: User, version?: string): void;
package/internal.js CHANGED
@@ -10,21 +10,35 @@
10
10
  * written permission of Adobe.
11
11
  **************************************************************************/
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
- exports.Internal = void 0;
13
+ exports.Internal = exports.PollingStrategy = void 0;
14
14
  const Global_1 = require("./src/Global");
15
+ var PollingStrategy;
16
+ (function (PollingStrategy) {
17
+ PollingStrategy["VISIBILITY"] = "VISIBILITY";
18
+ PollingStrategy["IDLENESS"] = "IDLENESS";
19
+ })(PollingStrategy = exports.PollingStrategy || (exports.PollingStrategy = {}));
15
20
  /**
16
21
  * @ignore
17
22
  */
18
23
  class Internal {
24
+ static addPoller(poller) {
25
+ return Global_1.getImpl('internal').addPoller(poller);
26
+ }
19
27
  static configureMetrics(config) {
20
28
  return Global_1.getImpl('internal').configureMetrics(config);
21
29
  }
22
30
  static configureNetwork(config) {
23
31
  return Global_1.getImpl('internal').configureNetwork(config);
24
32
  }
33
+ static configurePolling(config) {
34
+ return Global_1.getImpl('internal').configurePolling(config);
35
+ }
25
36
  static flush() {
26
37
  return Global_1.getImpl('internal').flush();
27
38
  }
39
+ static removePoller(handle) {
40
+ return Global_1.getImpl('internal').removePoller(handle);
41
+ }
28
42
  static setApplication(app) {
29
43
  return Global_1.getImpl('internal').setApplication(app);
30
44
  }
package/internal.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"","sources":["internal.ts"],"names":[],"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,CAAC;CACF;AA/BD,4BA+BC"}
package/internal.ts CHANGED
@@ -21,14 +21,39 @@ import User from './metrics/User';
21
21
 
22
22
  export type {Modules};
23
23
 
24
+ export enum PollingStrategy {
25
+ VISIBILITY = 'VISIBILITY',
26
+ IDLENESS = 'IDLENESS'
27
+ }
28
+
29
+ export interface Poller {
30
+ activeFrequency: number;
31
+ name: string;
32
+ inactiveFrequency: number;
33
+ immediate: boolean;
34
+ pollFn: () => Promise<void>;
35
+ strategy: PollingStrategy;
36
+ }
37
+
38
+ export interface PollerHandle {
39
+ handle: string;
40
+ }
41
+
42
+ export interface PollingConfiguration {
43
+ strategy: PollingStrategy;
44
+ }
45
+
24
46
  /**
25
47
  * @ignore
26
48
  */
27
49
  export interface InternalApi {
50
+ addPoller(poller: Poller): Promise<PollerHandle>
28
51
  clearUser(version?: string): void
29
52
  configureMetrics(config?: MetricsConfiguration): Promise<MetricsConfiguration>;
30
53
  configureNetwork(config: NetworkConfiguration): void;
54
+ configurePolling(config: PollingConfiguration): Promise<void>;
31
55
  flush(): Promise<number>;
56
+ removePoller(handle: PollerHandle): Promise<void>;
32
57
  setApplication(app: Application): void;
33
58
  setFilter(filterFunction: <T>(record: T) => Promise<T>): void;
34
59
  setUser(user: User, version?: string): void;
@@ -38,15 +63,24 @@ export interface InternalApi {
38
63
  * @ignore
39
64
  */
40
65
  export class Internal {
66
+ public static addPoller(poller: Poller): Promise<PollerHandle> {
67
+ return getImpl('internal').addPoller(poller);
68
+ }
41
69
  public static configureMetrics(config?: MetricsConfiguration): Promise<MetricsConfiguration> {
42
70
  return getImpl('internal').configureMetrics(config);
43
71
  }
44
72
  public static configureNetwork(config: NetworkConfiguration): void {
45
73
  return getImpl('internal').configureNetwork(config);
46
74
  }
75
+ public static configurePolling(config: PollingConfiguration): Promise<void> {
76
+ return getImpl('internal').configurePolling(config);
77
+ }
47
78
  public static flush(): Promise<number> {
48
79
  return getImpl('internal').flush();
49
80
  }
81
+ public static removePoller(handle: PollerHandle): Promise<void> {
82
+ return getImpl('internal').removePoller(handle);
83
+ }
50
84
  public static setApplication(app: Application): void {
51
85
  return getImpl('internal').setApplication(app);
52
86
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/exc-app",
3
- "version": "0.2.43",
3
+ "version": "0.2.44-beta",
4
4
  "main": "index.js",
5
5
  "source": "index.ts",
6
6
  "scripts": {
@@ -26,7 +26,7 @@
26
26
  "registry": "https://registry.npmjs.com/"
27
27
  },
28
28
  "dependencies": {
29
- "@apollo/client": "3.4.14",
29
+ "@apollo/client": "3.4.16",
30
30
  "graphql": "^15.0.0",
31
31
  "graphql-tag": "2.12.5"
32
32
  },