@salesforce/lds-adapters-platform-learning-content 1.246.0 → 1.248.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.
@@ -1854,6 +1854,20 @@ function getTypeCacheKeys$7(rootKeySet, luvio, input, fullPathFactory) {
1854
1854
  mergeable: false
1855
1855
  });
1856
1856
  }
1857
+ const notifyUpdateAvailableFactory = (luvio) => {
1858
+ return function notifyLearningItemUpdateAvailable(configs) {
1859
+ if (process.env.NODE_ENV !== 'production') {
1860
+ const requiredKeyParams = ['learning_item_id'];
1861
+ configs.forEach(config => {
1862
+ if (false === requiredKeyParams.every(req => req in config)) {
1863
+ throw new Error(`one of the configs did not contain all required parameters: ${JSONStringify(ObjectKeys(config))}`);
1864
+ }
1865
+ });
1866
+ }
1867
+ const keys = configs.map(c => keyBuilder$h(luvio, c));
1868
+ return luvio.notifyStoreUpdateAvailable(keys);
1869
+ };
1870
+ };
1857
1871
 
1858
1872
  const VERSION$9 = "cd4c27f064c3139aef14a6ef22627c0f";
1859
1873
  function validate$a(obj, path = 'LearningItemListRepresentation') {
@@ -4852,4 +4866,4 @@ const getTextLessonAdapterFactory = (luvio) => function LearningContentPlatform_
4852
4866
  buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
4853
4867
  };
4854
4868
 
4855
- export { evaluateLearningItemAdapterFactory, getFeaturedItemsRecommendedListAdapterFactory, getFeaturedItemsRelatedListAdapterFactory, getLearningConfigAdapterFactory, getLearningItemProgressAdapterFactory, getLearningItemsListAdapterFactory, getLearningModelAdapterFactory, getLearningPracticeAdapterFactory, getModuleAdapterFactory, getTextLessonAdapterFactory };
4869
+ export { evaluateLearningItemAdapterFactory, getFeaturedItemsRecommendedListAdapterFactory, getFeaturedItemsRelatedListAdapterFactory, getLearningConfigAdapterFactory, getLearningItemProgressAdapterFactory, getLearningItemsListAdapterFactory, getLearningModelAdapterFactory, getLearningPracticeAdapterFactory, getModuleAdapterFactory, getTextLessonAdapterFactory, notifyUpdateAvailableFactory as notifyLearningItemUpdateAvailableFactory };
@@ -69,3 +69,4 @@ export interface LearningItemRepresentation {
69
69
  title: string | null;
70
70
  url: string | null;
71
71
  }
72
+ export declare const notifyUpdateAvailableFactory: (luvio: $64$luvio_engine_Luvio) => (configs: Partial<KeyParams>[]) => Promise<void>;
@@ -0,0 +1,2 @@
1
+ export * from './generated/artifacts/main';
2
+ export { notifyUpdateAvailableFactory as notifyLearningItemUpdateAvailableFactory } from './generated/types/LearningItemRepresentation';
@@ -0,0 +1,3 @@
1
+ declare let notifyLearningItemUpdateAvailable: any;
2
+ export { notifyLearningItemUpdateAvailable };
3
+ export * from './generated/artifacts/sfdc';
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@salesforce/lds-adapters-platform-learning-content",
3
- "version": "1.246.0",
3
+ "version": "1.248.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "Learning content platform",
6
6
  "main": "dist/es/es2018/platform-learning-content.js",
7
7
  "module": "dist/es/es2018/platform-learning-content.js",
8
- "types": "dist/es/es2018/types/src/generated/artifacts/main.d.ts",
8
+ "types": "dist/es/es2018/types/src/main.d.ts",
9
9
  "files": [
10
10
  "dist",
11
11
  "sfdc",
@@ -13,7 +13,7 @@
13
13
  ],
14
14
  "exports": {
15
15
  ".": {
16
- "types": "./dist/es/es2018/types/src/generated/artifacts/main.d.ts",
16
+ "types": "./dist/es/es2018/types/src/main.d.ts",
17
17
  "import": "./dist/es/es2018/platform-learning-content.js",
18
18
  "require": "./dist/es/es2018/platform-learning-content.js"
19
19
  },
@@ -27,16 +27,16 @@
27
27
  "a.dandekar@salesforce.com"
28
28
  ],
29
29
  "scripts": {
30
- "build": "yarn build:services && yarn build:karma",
30
+ "build": "yarn build:services",
31
31
  "build:karma": "rollup --bundleConfigAsCjs --config rollup.config.karma.js",
32
32
  "build:raml": "luvio generate src/raml/luvio.raml src/generated -p '../lds-compiler-plugins'",
33
33
  "build:services": "rollup --bundleConfigAsCjs --config rollup.config.js",
34
34
  "clean": "rm -rf dist sfdc src/generated karma/dist",
35
35
  "release:core": "../../scripts/release/core.js --adapter=lds-adapters-platform-learning-content",
36
36
  "release:corejar": "yarn build && packages/core-build/scripts/core.js --adapter=lds-adapters-platform-learning-content",
37
- "start": "karma start",
38
- "test": "karma start --single-run",
39
- "test:compat": "karma start --single-run --compat"
37
+ "start": "nx build:karma && karma start",
38
+ "test": "nx build:karma && karma start --single-run",
39
+ "test:compat": "nx build:karma && karma start --single-run --compat"
40
40
  },
41
41
  "dependencies": {
42
42
  "@salesforce/lds-bindings": "*"
@@ -50,7 +50,6 @@
50
50
  "build": {
51
51
  "outputs": [
52
52
  "{projectRoot}/dist",
53
- "{projectRoot}/karma/dist",
54
53
  "{projectRoot}/sfdc"
55
54
  ]
56
55
  },
@@ -58,6 +57,11 @@
58
57
  "outputs": [
59
58
  "{projectRoot}/src/generated"
60
59
  ]
60
+ },
61
+ "build:karma": {
62
+ "outputs": [
63
+ "{projectRoot}/karma/dist"
64
+ ]
61
65
  }
62
66
  }
63
67
  },
package/sfdc/index.d.ts CHANGED
@@ -1 +1 @@
1
- export * from '../dist/es/es2018/types/src/generated/artifacts/sfdc';
1
+ export * from '../dist/es/es2018/types/src/sfdc';