@salesforce/lds-adapters-platform-learning-content 1.251.0 → 1.252.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,7 +1854,7 @@ function getTypeCacheKeys$7(rootKeySet, luvio, input, fullPathFactory) {
1854
1854
  mergeable: false
1855
1855
  });
1856
1856
  }
1857
- const notifyUpdateAvailableFactory = (luvio) => {
1857
+ const notifyUpdateAvailableFactory$2 = (luvio) => {
1858
1858
  return function notifyLearningItemUpdateAvailable(configs) {
1859
1859
  if (process.env.NODE_ENV !== 'production') {
1860
1860
  const requiredKeyParams = ['learning_item_id'];
@@ -2250,6 +2250,20 @@ function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
2250
2250
  mergeable: false
2251
2251
  });
2252
2252
  }
2253
+ const notifyUpdateAvailableFactory$1 = (luvio) => {
2254
+ return function notifyLearningItemProgressUpdateAvailable(configs) {
2255
+ if (process.env.NODE_ENV !== 'production') {
2256
+ const requiredKeyParams = ['learning_item_id'];
2257
+ configs.forEach(config => {
2258
+ if (false === requiredKeyParams.every(req => req in config)) {
2259
+ throw new Error(`one of the configs did not contain all required parameters: ${JSONStringify(ObjectKeys(config))}`);
2260
+ }
2261
+ });
2262
+ }
2263
+ const keys = configs.map(c => keyBuilder$e(luvio, c));
2264
+ return luvio.notifyStoreUpdateAvailable(keys);
2265
+ };
2266
+ };
2253
2267
 
2254
2268
  const VERSION$7 = "1292f1a549c777c6586cca649e823737";
2255
2269
  function validate$8(obj, path = 'LearningItemProgressListRepresentation') {
@@ -4725,6 +4739,20 @@ function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
4725
4739
  mergeable: false
4726
4740
  });
4727
4741
  }
4742
+ const notifyUpdateAvailableFactory = (luvio) => {
4743
+ return function notifyLearningTextLessonUpdateAvailable(configs) {
4744
+ if (process.env.NODE_ENV !== 'production') {
4745
+ const requiredKeyParams = ['learning_item_id'];
4746
+ configs.forEach(config => {
4747
+ if (false === requiredKeyParams.every(req => req in config)) {
4748
+ throw new Error(`one of the configs did not contain all required parameters: ${JSONStringify(ObjectKeys(config))}`);
4749
+ }
4750
+ });
4751
+ }
4752
+ const keys = configs.map(c => keyBuilder$2(luvio, c));
4753
+ return luvio.notifyStoreUpdateAvailable(keys);
4754
+ };
4755
+ };
4728
4756
 
4729
4757
  function select(luvio, params) {
4730
4758
  return select$1();
@@ -4866,4 +4894,4 @@ const getTextLessonAdapterFactory = (luvio) => function LearningContentPlatform_
4866
4894
  buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
4867
4895
  };
4868
4896
 
4869
- export { evaluateLearningItemAdapterFactory, getFeaturedItemsRecommendedListAdapterFactory, getFeaturedItemsRelatedListAdapterFactory, getLearningConfigAdapterFactory, getLearningItemProgressAdapterFactory, getLearningItemsListAdapterFactory, getLearningModelAdapterFactory, getLearningPracticeAdapterFactory, getModuleAdapterFactory, getTextLessonAdapterFactory, notifyUpdateAvailableFactory as notifyLearningItemUpdateAvailableFactory };
4897
+ export { evaluateLearningItemAdapterFactory, getFeaturedItemsRecommendedListAdapterFactory, getFeaturedItemsRelatedListAdapterFactory, getLearningConfigAdapterFactory, getLearningItemProgressAdapterFactory, getLearningItemsListAdapterFactory, getLearningModelAdapterFactory, getLearningPracticeAdapterFactory, getModuleAdapterFactory, getTextLessonAdapterFactory, notifyUpdateAvailableFactory$1 as notifyLearningItemProgressUpdateAvailableFactory, notifyUpdateAvailableFactory$2 as notifyLearningItemUpdateAvailableFactory, notifyUpdateAvailableFactory as notifyLearningTextLessonUpdateAvailableFactory };
@@ -45,3 +45,4 @@ export interface LearningItemProgressRepresentation {
45
45
  isCompleted: boolean;
46
46
  learningItemId: string;
47
47
  }
48
+ export declare const notifyUpdateAvailableFactory: (luvio: $64$luvio_engine_Luvio) => (configs: Partial<KeyParams>[]) => Promise<void>;
@@ -49,3 +49,4 @@ export interface LearningTextLessonRepresentation {
49
49
  title: string;
50
50
  totalTime: number;
51
51
  }
52
+ export declare const notifyUpdateAvailableFactory: (luvio: $64$luvio_engine_Luvio) => (configs: Partial<KeyParams>[]) => Promise<void>;
@@ -1,2 +1,4 @@
1
1
  export * from './generated/artifacts/main';
2
2
  export { notifyUpdateAvailableFactory as notifyLearningItemUpdateAvailableFactory } from './generated/types/LearningItemRepresentation';
3
+ export { notifyUpdateAvailableFactory as notifyLearningItemProgressUpdateAvailableFactory } from './generated/types/LearningItemProgressRepresentation';
4
+ export { notifyUpdateAvailableFactory as notifyLearningTextLessonUpdateAvailableFactory } from './generated/types/LearningTextLessonRepresentation';
@@ -1,3 +1,5 @@
1
1
  declare let notifyLearningItemUpdateAvailable: any;
2
- export { notifyLearningItemUpdateAvailable };
2
+ declare let notifyLearningItemProgressUpdateAvailable: any;
3
+ declare let notifyLearningTextLessonUpdateAvailable: any;
4
+ export { notifyLearningItemUpdateAvailable, notifyLearningItemProgressUpdateAvailable, notifyLearningTextLessonUpdateAvailable, };
3
5
  export * from './generated/artifacts/sfdc';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-adapters-platform-learning-content",
3
- "version": "1.251.0",
3
+ "version": "1.252.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",
package/sfdc/index.js CHANGED
@@ -1864,7 +1864,7 @@ function getTypeCacheKeys$7(rootKeySet, luvio, input, fullPathFactory) {
1864
1864
  mergeable: false
1865
1865
  });
1866
1866
  }
1867
- const notifyUpdateAvailableFactory = (luvio) => {
1867
+ const notifyUpdateAvailableFactory$2 = (luvio) => {
1868
1868
  return function notifyLearningItemUpdateAvailable(configs) {
1869
1869
  if (process.env.NODE_ENV !== 'production') {
1870
1870
  const requiredKeyParams = ['learning_item_id'];
@@ -2260,6 +2260,20 @@ function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
2260
2260
  mergeable: false
2261
2261
  });
2262
2262
  }
2263
+ const notifyUpdateAvailableFactory$1 = (luvio) => {
2264
+ return function notifyLearningItemProgressUpdateAvailable(configs) {
2265
+ if (process.env.NODE_ENV !== 'production') {
2266
+ const requiredKeyParams = ['learning_item_id'];
2267
+ configs.forEach(config => {
2268
+ if (false === requiredKeyParams.every(req => req in config)) {
2269
+ throw new Error(`one of the configs did not contain all required parameters: ${JSONStringify(ObjectKeys(config))}`);
2270
+ }
2271
+ });
2272
+ }
2273
+ const keys = configs.map(c => keyBuilder$e(luvio, c));
2274
+ return luvio.notifyStoreUpdateAvailable(keys);
2275
+ };
2276
+ };
2263
2277
 
2264
2278
  const VERSION$7 = "1292f1a549c777c6586cca649e823737";
2265
2279
  function validate$8(obj, path = 'LearningItemProgressListRepresentation') {
@@ -4817,6 +4831,20 @@ function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
4817
4831
  mergeable: false
4818
4832
  });
4819
4833
  }
4834
+ const notifyUpdateAvailableFactory = (luvio) => {
4835
+ return function notifyLearningTextLessonUpdateAvailable(configs) {
4836
+ if (process.env.NODE_ENV !== 'production') {
4837
+ const requiredKeyParams = ['learning_item_id'];
4838
+ configs.forEach(config => {
4839
+ if (false === requiredKeyParams.every(req => req in config)) {
4840
+ throw new Error(`one of the configs did not contain all required parameters: ${JSONStringify(ObjectKeys(config))}`);
4841
+ }
4842
+ });
4843
+ }
4844
+ const keys = configs.map(c => keyBuilder$2(luvio, c));
4845
+ return luvio.notifyStoreUpdateAvailable(keys);
4846
+ };
4847
+ };
4820
4848
 
4821
4849
  function select(luvio, params) {
4822
4850
  return select$1();
@@ -5100,9 +5128,13 @@ withDefaultLuvio((luvio) => {
5100
5128
  });
5101
5129
 
5102
5130
  let notifyLearningItemUpdateAvailable;
5131
+ let notifyLearningItemProgressUpdateAvailable;
5132
+ let notifyLearningTextLessonUpdateAvailable;
5103
5133
  withDefaultLuvio((luvio) => {
5104
- notifyLearningItemUpdateAvailable = createLDSAdapter(luvio, 'notifyLearningItemUpdateAvailable', notifyUpdateAvailableFactory);
5134
+ notifyLearningItemUpdateAvailable = createLDSAdapter(luvio, 'notifyLearningItemUpdateAvailable', notifyUpdateAvailableFactory$2);
5135
+ notifyLearningItemProgressUpdateAvailable = createLDSAdapter(luvio, 'notifyLearningItemProgressUpdateAvailable', notifyUpdateAvailableFactory$1);
5136
+ notifyLearningTextLessonUpdateAvailable = createLDSAdapter(luvio, 'notifyLearningTextLessonUpdateAvailable', notifyUpdateAvailableFactory);
5105
5137
  });
5106
5138
 
5107
- export { evaluateLearningItem, getFeaturedItemsRecommendedList, getFeaturedItemsRecommendedList_imperative, getFeaturedItemsRelatedList, getFeaturedItemsRelatedList_imperative, getLearningConfig, getLearningConfig_imperative, getLearningItemProgress, getLearningItemProgress_imperative, getLearningItemsList, getLearningItemsList_imperative, getLearningModel, getLearningModel_imperative, getLearningPractice, getLearningPracticeNotifyChange, getLearningPractice_imperative, getModule, getModuleNotifyChange, getModule_imperative, getTextLesson, getTextLessonNotifyChange, getTextLesson_imperative, notifyLearningItemUpdateAvailable };
5108
- // version: 1.251.0-55b09aa76
5139
+ export { evaluateLearningItem, getFeaturedItemsRecommendedList, getFeaturedItemsRecommendedList_imperative, getFeaturedItemsRelatedList, getFeaturedItemsRelatedList_imperative, getLearningConfig, getLearningConfig_imperative, getLearningItemProgress, getLearningItemProgress_imperative, getLearningItemsList, getLearningItemsList_imperative, getLearningModel, getLearningModel_imperative, getLearningPractice, getLearningPracticeNotifyChange, getLearningPractice_imperative, getModule, getModuleNotifyChange, getModule_imperative, getTextLesson, getTextLessonNotifyChange, getTextLesson_imperative, notifyLearningItemProgressUpdateAvailable, notifyLearningItemUpdateAvailable, notifyLearningTextLessonUpdateAvailable };
5140
+ // version: 1.252.0-eca5ba0ae
@@ -27,6 +27,10 @@ types:
27
27
  (luvio.ttl): 15000 # 15 seconds
28
28
  (luvio.key):
29
29
  learning_item_id: learningItemId
30
+ (luvio.updateAvailable):
31
+ name: notifyLearningItemProgressUpdateAvailable
32
+ parameters:
33
+ learning_item_id: learningItemId
30
34
  LearningModelOutputRepresentation:
31
35
  (luvio.ttl): 15000 # 15 seconds
32
36
  (luvio.key):
@@ -39,6 +43,10 @@ types:
39
43
  (luvio.ttl): 60000 # 60 seconds
40
44
  (luvio.key):
41
45
  learning_item_id: learningItemId
46
+ (luvio.updateAvailable):
47
+ name: notifyLearningTextLessonUpdateAvailable
48
+ parameters:
49
+ learning_item_id: learningItemId
42
50
  TrailheadModuleRepresentation:
43
51
  (luvio.ttl): 21600000 # 15 seconds
44
52
  (luvio.key):