@salesforce/lds-adapters-platform-learning-content 1.149.0 → 1.150.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.
- package/dist/es/es2018/platform-learning-content.js +141 -831
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +0 -2
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +1 -6
- package/package.json +1 -1
- package/sfdc/index.js +528 -1275
- package/src/raml/api.raml +0 -68
- package/src/raml/luvio.raml +0 -19
- package/dist/es/es2018/types/src/generated/adapters/getLearningSearchDescribe.d.ts +0 -25
- package/dist/es/es2018/types/src/generated/adapters/getLearningSearchResults.d.ts +0 -29
- package/dist/es/es2018/types/src/generated/resources/getLearningContentPlatformLearningSearchDescribe.d.ts +0 -12
- package/dist/es/es2018/types/src/generated/resources/getLearningContentPlatformLearningSearchTypeByContentType.d.ts +0 -20
- package/dist/es/es2018/types/src/generated/types/LearningSearchDescribeContentRepresentation.d.ts +0 -41
- package/dist/es/es2018/types/src/generated/types/LearningSearchDescribeRepresentation.d.ts +0 -38
- package/dist/es/es2018/types/src/generated/types/LearningSearchResultsRepresentation.d.ts +0 -54
package/sfdc/index.js
CHANGED
|
@@ -101,7 +101,7 @@ function createLink(ref) {
|
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
function validate$
|
|
104
|
+
function validate$f(obj, path = 'EvaluateLearningItemInputRepresentation') {
|
|
105
105
|
const v_error = (() => {
|
|
106
106
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
107
107
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -131,9 +131,9 @@ function validate$i(obj, path = 'EvaluateLearningItemInputRepresentation') {
|
|
|
131
131
|
return v_error === undefined ? null : v_error;
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
-
const TTL$
|
|
135
|
-
const VERSION$
|
|
136
|
-
function validate$
|
|
134
|
+
const TTL$6 = 15000;
|
|
135
|
+
const VERSION$e = "ef3b97b73983e10731031f11a195bba6";
|
|
136
|
+
function validate$e(obj, path = 'LearningItemProgressRepresentation') {
|
|
137
137
|
const v_error = (() => {
|
|
138
138
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
139
139
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -203,23 +203,23 @@ function validate$h(obj, path = 'LearningItemProgressRepresentation') {
|
|
|
203
203
|
})();
|
|
204
204
|
return v_error === undefined ? null : v_error;
|
|
205
205
|
}
|
|
206
|
-
const RepresentationType$
|
|
207
|
-
function keyBuilder$
|
|
208
|
-
return keyPrefix + '::' + RepresentationType$
|
|
206
|
+
const RepresentationType$b = 'LearningItemProgressRepresentation';
|
|
207
|
+
function keyBuilder$o(luvio, config) {
|
|
208
|
+
return keyPrefix + '::' + RepresentationType$b + ':' + config.learning_item_id;
|
|
209
209
|
}
|
|
210
|
-
function keyBuilderFromType$
|
|
210
|
+
function keyBuilderFromType$6(luvio, object) {
|
|
211
211
|
const keyParams = {
|
|
212
212
|
learning_item_id: object.learningItemId
|
|
213
213
|
};
|
|
214
|
-
return keyBuilder$
|
|
214
|
+
return keyBuilder$o(luvio, keyParams);
|
|
215
215
|
}
|
|
216
|
-
function normalize$
|
|
216
|
+
function normalize$b(input, existing, path, luvio, store, timestamp) {
|
|
217
217
|
return input;
|
|
218
218
|
}
|
|
219
|
-
const select$
|
|
219
|
+
const select$o = function LearningItemProgressRepresentationSelect() {
|
|
220
220
|
return {
|
|
221
221
|
kind: 'Fragment',
|
|
222
|
-
version: VERSION$
|
|
222
|
+
version: VERSION$e,
|
|
223
223
|
private: [],
|
|
224
224
|
selections: [
|
|
225
225
|
{
|
|
@@ -241,7 +241,7 @@ const select$t = function LearningItemProgressRepresentationSelect() {
|
|
|
241
241
|
]
|
|
242
242
|
};
|
|
243
243
|
};
|
|
244
|
-
function equals$
|
|
244
|
+
function equals$e(existing, incoming) {
|
|
245
245
|
const existing_isCompleted = existing.isCompleted;
|
|
246
246
|
const incoming_isCompleted = incoming.isCompleted;
|
|
247
247
|
if (!(existing_isCompleted === incoming_isCompleted)) {
|
|
@@ -264,61 +264,61 @@ function equals$h(existing, incoming) {
|
|
|
264
264
|
}
|
|
265
265
|
return true;
|
|
266
266
|
}
|
|
267
|
-
const ingest$
|
|
267
|
+
const ingest$b = function LearningItemProgressRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
268
268
|
if (process.env.NODE_ENV !== 'production') {
|
|
269
|
-
const validateError = validate$
|
|
269
|
+
const validateError = validate$e(input);
|
|
270
270
|
if (validateError !== null) {
|
|
271
271
|
throw validateError;
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
|
-
const key = keyBuilderFromType$
|
|
274
|
+
const key = keyBuilderFromType$6(luvio, input);
|
|
275
275
|
const existingRecord = store.readEntry(key);
|
|
276
|
-
const ttlToUse = TTL$
|
|
277
|
-
let incomingRecord = normalize$
|
|
276
|
+
const ttlToUse = TTL$6;
|
|
277
|
+
let incomingRecord = normalize$b(input, store.readEntry(key), {
|
|
278
278
|
fullPath: key,
|
|
279
279
|
parent: path.parent,
|
|
280
280
|
propertyName: path.propertyName,
|
|
281
281
|
ttl: ttlToUse
|
|
282
282
|
});
|
|
283
|
-
if (existingRecord === undefined || equals$
|
|
283
|
+
if (existingRecord === undefined || equals$e(existingRecord, incomingRecord) === false) {
|
|
284
284
|
luvio.storePublish(key, incomingRecord);
|
|
285
285
|
}
|
|
286
286
|
{
|
|
287
287
|
const storeMetadataParams = {
|
|
288
288
|
ttl: ttlToUse,
|
|
289
289
|
namespace: "LearningContentPlatform",
|
|
290
|
-
version: VERSION$
|
|
291
|
-
representationName: RepresentationType$
|
|
290
|
+
version: VERSION$e,
|
|
291
|
+
representationName: RepresentationType$b,
|
|
292
292
|
};
|
|
293
293
|
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
294
294
|
}
|
|
295
295
|
return createLink(key);
|
|
296
296
|
};
|
|
297
|
-
function getTypeCacheKeys$
|
|
297
|
+
function getTypeCacheKeys$b(luvio, input, fullPathFactory) {
|
|
298
298
|
const rootKeySet = new StoreKeyMap();
|
|
299
299
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
300
|
-
const rootKey = keyBuilderFromType$
|
|
300
|
+
const rootKey = keyBuilderFromType$6(luvio, input);
|
|
301
301
|
rootKeySet.set(rootKey, {
|
|
302
302
|
namespace: keyPrefix,
|
|
303
|
-
representationName: RepresentationType$
|
|
303
|
+
representationName: RepresentationType$b,
|
|
304
304
|
mergeable: false
|
|
305
305
|
});
|
|
306
306
|
return rootKeySet;
|
|
307
307
|
}
|
|
308
308
|
|
|
309
|
-
function select$
|
|
310
|
-
return select$
|
|
309
|
+
function select$n(luvio, params) {
|
|
310
|
+
return select$o();
|
|
311
311
|
}
|
|
312
|
-
function getResponseCacheKeys$
|
|
313
|
-
return getTypeCacheKeys$
|
|
312
|
+
function getResponseCacheKeys$9(luvio, resourceParams, response) {
|
|
313
|
+
return getTypeCacheKeys$b(luvio, response);
|
|
314
314
|
}
|
|
315
|
-
function ingestSuccess$
|
|
315
|
+
function ingestSuccess$9(luvio, resourceParams, response) {
|
|
316
316
|
const { body } = response;
|
|
317
|
-
const key = keyBuilderFromType$
|
|
318
|
-
luvio.storeIngest(key, ingest$
|
|
317
|
+
const key = keyBuilderFromType$6(luvio, body);
|
|
318
|
+
luvio.storeIngest(key, ingest$b, body);
|
|
319
319
|
const snapshot = luvio.storeLookup({
|
|
320
320
|
recordId: key,
|
|
321
|
-
node: select$
|
|
321
|
+
node: select$n(),
|
|
322
322
|
variables: {},
|
|
323
323
|
});
|
|
324
324
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -329,7 +329,7 @@ function ingestSuccess$b(luvio, resourceParams, response) {
|
|
|
329
329
|
deepFreeze(snapshot.data);
|
|
330
330
|
return snapshot;
|
|
331
331
|
}
|
|
332
|
-
function createResourceRequest$
|
|
332
|
+
function createResourceRequest$9(config) {
|
|
333
333
|
const headers = {};
|
|
334
334
|
return {
|
|
335
335
|
baseUri: '/services/data/v59.0',
|
|
@@ -350,7 +350,7 @@ const evaluateLearningItem_ConfigPropertyNames = {
|
|
|
350
350
|
optional: []
|
|
351
351
|
}
|
|
352
352
|
};
|
|
353
|
-
function createResourceParams$
|
|
353
|
+
function createResourceParams$9(config) {
|
|
354
354
|
const resourceParams = {
|
|
355
355
|
body: {
|
|
356
356
|
payload: config.payload
|
|
@@ -358,37 +358,37 @@ function createResourceParams$b(config) {
|
|
|
358
358
|
};
|
|
359
359
|
return resourceParams;
|
|
360
360
|
}
|
|
361
|
-
function typeCheckConfig$
|
|
361
|
+
function typeCheckConfig$9(untrustedConfig) {
|
|
362
362
|
const config = {};
|
|
363
363
|
const untrustedConfig_payload = untrustedConfig.payload;
|
|
364
|
-
const referenceEvaluateLearningItemInputRepresentationValidationError = validate$
|
|
364
|
+
const referenceEvaluateLearningItemInputRepresentationValidationError = validate$f(untrustedConfig_payload);
|
|
365
365
|
if (referenceEvaluateLearningItemInputRepresentationValidationError === null) {
|
|
366
366
|
config.payload = untrustedConfig_payload;
|
|
367
367
|
}
|
|
368
368
|
return config;
|
|
369
369
|
}
|
|
370
|
-
function validateAdapterConfig$
|
|
370
|
+
function validateAdapterConfig$9(untrustedConfig, configPropertyNames) {
|
|
371
371
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
372
372
|
return null;
|
|
373
373
|
}
|
|
374
374
|
if (process.env.NODE_ENV !== 'production') {
|
|
375
375
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
376
376
|
}
|
|
377
|
-
const config = typeCheckConfig$
|
|
377
|
+
const config = typeCheckConfig$9(untrustedConfig);
|
|
378
378
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
379
379
|
return null;
|
|
380
380
|
}
|
|
381
381
|
return config;
|
|
382
382
|
}
|
|
383
|
-
function buildNetworkSnapshot$
|
|
384
|
-
const resourceParams = createResourceParams$
|
|
385
|
-
const request = createResourceRequest$
|
|
383
|
+
function buildNetworkSnapshot$9(luvio, config, options) {
|
|
384
|
+
const resourceParams = createResourceParams$9(config);
|
|
385
|
+
const request = createResourceRequest$9(resourceParams);
|
|
386
386
|
return luvio.dispatchResourceRequest(request, options)
|
|
387
387
|
.then((response) => {
|
|
388
388
|
return luvio.handleSuccessResponse(() => {
|
|
389
|
-
const snapshot = ingestSuccess$
|
|
389
|
+
const snapshot = ingestSuccess$9(luvio, resourceParams, response);
|
|
390
390
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
391
|
-
}, () => getResponseCacheKeys$
|
|
391
|
+
}, () => getResponseCacheKeys$9(luvio, resourceParams, response.body));
|
|
392
392
|
}, (response) => {
|
|
393
393
|
deepFreeze(response);
|
|
394
394
|
throw response;
|
|
@@ -396,18 +396,18 @@ function buildNetworkSnapshot$b(luvio, config, options) {
|
|
|
396
396
|
}
|
|
397
397
|
const evaluateLearningItemAdapterFactory = (luvio) => {
|
|
398
398
|
return function evaluateLearningItem(untrustedConfig) {
|
|
399
|
-
const config = validateAdapterConfig$
|
|
399
|
+
const config = validateAdapterConfig$9(untrustedConfig, evaluateLearningItem_ConfigPropertyNames);
|
|
400
400
|
// Invalid or incomplete config
|
|
401
401
|
if (config === null) {
|
|
402
402
|
throw new Error('Invalid config for "evaluateLearningItem"');
|
|
403
403
|
}
|
|
404
|
-
return buildNetworkSnapshot$
|
|
404
|
+
return buildNetworkSnapshot$9(luvio, config);
|
|
405
405
|
};
|
|
406
406
|
};
|
|
407
407
|
|
|
408
|
-
const TTL$
|
|
409
|
-
const VERSION$
|
|
410
|
-
function validate$
|
|
408
|
+
const TTL$5 = 15000;
|
|
409
|
+
const VERSION$d = "b489f9f2cbdc91a04dd15b4d467b6760";
|
|
410
|
+
function validate$d(obj, path = 'FeaturedItemRepresentation') {
|
|
411
411
|
const v_error = (() => {
|
|
412
412
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
413
413
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -804,23 +804,23 @@ function validate$g(obj, path = 'FeaturedItemRepresentation') {
|
|
|
804
804
|
})();
|
|
805
805
|
return v_error === undefined ? null : v_error;
|
|
806
806
|
}
|
|
807
|
-
const RepresentationType$
|
|
808
|
-
function keyBuilder$
|
|
809
|
-
return keyPrefix + '::' + RepresentationType$
|
|
807
|
+
const RepresentationType$a = 'FeaturedItemRepresentation';
|
|
808
|
+
function keyBuilder$n(luvio, config) {
|
|
809
|
+
return keyPrefix + '::' + RepresentationType$a + ':' + config.id;
|
|
810
810
|
}
|
|
811
|
-
function keyBuilderFromType$
|
|
811
|
+
function keyBuilderFromType$5(luvio, object) {
|
|
812
812
|
const keyParams = {
|
|
813
813
|
id: object.id
|
|
814
814
|
};
|
|
815
|
-
return keyBuilder$
|
|
815
|
+
return keyBuilder$n(luvio, keyParams);
|
|
816
816
|
}
|
|
817
|
-
function normalize$
|
|
817
|
+
function normalize$a(input, existing, path, luvio, store, timestamp) {
|
|
818
818
|
return input;
|
|
819
819
|
}
|
|
820
|
-
const select$
|
|
820
|
+
const select$m = function FeaturedItemRepresentationSelect() {
|
|
821
821
|
return {
|
|
822
822
|
kind: 'Fragment',
|
|
823
|
-
version: VERSION$
|
|
823
|
+
version: VERSION$d,
|
|
824
824
|
private: [],
|
|
825
825
|
selections: [
|
|
826
826
|
{
|
|
@@ -902,7 +902,7 @@ const select$r = function FeaturedItemRepresentationSelect() {
|
|
|
902
902
|
]
|
|
903
903
|
};
|
|
904
904
|
};
|
|
905
|
-
function equals$
|
|
905
|
+
function equals$d(existing, incoming) {
|
|
906
906
|
const existing_description = existing.description;
|
|
907
907
|
const incoming_description = incoming.description;
|
|
908
908
|
if (!(existing_description === incoming_description)) {
|
|
@@ -1000,50 +1000,50 @@ function equals$g(existing, incoming) {
|
|
|
1000
1000
|
}
|
|
1001
1001
|
return true;
|
|
1002
1002
|
}
|
|
1003
|
-
const ingest$
|
|
1003
|
+
const ingest$a = function FeaturedItemRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1004
1004
|
if (process.env.NODE_ENV !== 'production') {
|
|
1005
|
-
const validateError = validate$
|
|
1005
|
+
const validateError = validate$d(input);
|
|
1006
1006
|
if (validateError !== null) {
|
|
1007
1007
|
throw validateError;
|
|
1008
1008
|
}
|
|
1009
1009
|
}
|
|
1010
|
-
const key = keyBuilderFromType$
|
|
1010
|
+
const key = keyBuilderFromType$5(luvio, input);
|
|
1011
1011
|
const existingRecord = store.readEntry(key);
|
|
1012
|
-
const ttlToUse = TTL$
|
|
1013
|
-
let incomingRecord = normalize$
|
|
1012
|
+
const ttlToUse = TTL$5;
|
|
1013
|
+
let incomingRecord = normalize$a(input, store.readEntry(key), {
|
|
1014
1014
|
fullPath: key,
|
|
1015
1015
|
parent: path.parent,
|
|
1016
1016
|
propertyName: path.propertyName,
|
|
1017
1017
|
ttl: ttlToUse
|
|
1018
1018
|
});
|
|
1019
|
-
if (existingRecord === undefined || equals$
|
|
1019
|
+
if (existingRecord === undefined || equals$d(existingRecord, incomingRecord) === false) {
|
|
1020
1020
|
luvio.storePublish(key, incomingRecord);
|
|
1021
1021
|
}
|
|
1022
1022
|
{
|
|
1023
1023
|
const storeMetadataParams = {
|
|
1024
1024
|
ttl: ttlToUse,
|
|
1025
1025
|
namespace: "LearningContentPlatform",
|
|
1026
|
-
version: VERSION$
|
|
1027
|
-
representationName: RepresentationType$
|
|
1026
|
+
version: VERSION$d,
|
|
1027
|
+
representationName: RepresentationType$a,
|
|
1028
1028
|
};
|
|
1029
1029
|
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
1030
1030
|
}
|
|
1031
1031
|
return createLink(key);
|
|
1032
1032
|
};
|
|
1033
|
-
function getTypeCacheKeys$
|
|
1033
|
+
function getTypeCacheKeys$a(luvio, input, fullPathFactory) {
|
|
1034
1034
|
const rootKeySet = new StoreKeyMap();
|
|
1035
1035
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1036
|
-
const rootKey = keyBuilderFromType$
|
|
1036
|
+
const rootKey = keyBuilderFromType$5(luvio, input);
|
|
1037
1037
|
rootKeySet.set(rootKey, {
|
|
1038
1038
|
namespace: keyPrefix,
|
|
1039
|
-
representationName: RepresentationType$
|
|
1039
|
+
representationName: RepresentationType$a,
|
|
1040
1040
|
mergeable: false
|
|
1041
1041
|
});
|
|
1042
1042
|
return rootKeySet;
|
|
1043
1043
|
}
|
|
1044
1044
|
|
|
1045
|
-
const VERSION$
|
|
1046
|
-
function validate$
|
|
1045
|
+
const VERSION$c = "94c7194d9578589364c6efd021226634";
|
|
1046
|
+
function validate$c(obj, path = 'FeaturedItemRecommendedListRepresentation') {
|
|
1047
1047
|
const v_error = (() => {
|
|
1048
1048
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1049
1049
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1063,14 +1063,14 @@ function validate$f(obj, path = 'FeaturedItemRecommendedListRepresentation') {
|
|
|
1063
1063
|
})();
|
|
1064
1064
|
return v_error === undefined ? null : v_error;
|
|
1065
1065
|
}
|
|
1066
|
-
const RepresentationType$
|
|
1067
|
-
function normalize$
|
|
1066
|
+
const RepresentationType$9 = 'FeaturedItemRecommendedListRepresentation';
|
|
1067
|
+
function normalize$9(input, existing, path, luvio, store, timestamp) {
|
|
1068
1068
|
const input_recommendedList = input.recommendedList;
|
|
1069
1069
|
const input_recommendedList_id = path.fullPath + '__recommendedList';
|
|
1070
1070
|
for (let i = 0; i < input_recommendedList.length; i++) {
|
|
1071
1071
|
const input_recommendedList_item = input_recommendedList[i];
|
|
1072
1072
|
let input_recommendedList_item_id = input_recommendedList_id + '__' + i;
|
|
1073
|
-
input_recommendedList[i] = ingest$
|
|
1073
|
+
input_recommendedList[i] = ingest$a(input_recommendedList_item, {
|
|
1074
1074
|
fullPath: input_recommendedList_item_id,
|
|
1075
1075
|
propertyName: i,
|
|
1076
1076
|
parent: {
|
|
@@ -1083,22 +1083,22 @@ function normalize$c(input, existing, path, luvio, store, timestamp) {
|
|
|
1083
1083
|
}
|
|
1084
1084
|
return input;
|
|
1085
1085
|
}
|
|
1086
|
-
const select$
|
|
1086
|
+
const select$l = function FeaturedItemRecommendedListRepresentationSelect() {
|
|
1087
1087
|
return {
|
|
1088
1088
|
kind: 'Fragment',
|
|
1089
|
-
version: VERSION$
|
|
1089
|
+
version: VERSION$c,
|
|
1090
1090
|
private: [],
|
|
1091
1091
|
selections: [
|
|
1092
1092
|
{
|
|
1093
1093
|
name: 'recommendedList',
|
|
1094
1094
|
kind: 'Link',
|
|
1095
1095
|
plural: true,
|
|
1096
|
-
fragment: select$
|
|
1096
|
+
fragment: select$m()
|
|
1097
1097
|
}
|
|
1098
1098
|
]
|
|
1099
1099
|
};
|
|
1100
1100
|
};
|
|
1101
|
-
function equals$
|
|
1101
|
+
function equals$c(existing, incoming) {
|
|
1102
1102
|
const existing_recommendedList = existing.recommendedList;
|
|
1103
1103
|
const incoming_recommendedList = incoming.recommendedList;
|
|
1104
1104
|
const equals_recommendedList_items = equalsArray(existing_recommendedList, incoming_recommendedList, (existing_recommendedList_item, incoming_recommendedList_item) => {
|
|
@@ -1111,9 +1111,9 @@ function equals$f(existing, incoming) {
|
|
|
1111
1111
|
}
|
|
1112
1112
|
return true;
|
|
1113
1113
|
}
|
|
1114
|
-
const ingest$
|
|
1114
|
+
const ingest$9 = function FeaturedItemRecommendedListRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1115
1115
|
if (process.env.NODE_ENV !== 'production') {
|
|
1116
|
-
const validateError = validate$
|
|
1116
|
+
const validateError = validate$c(input);
|
|
1117
1117
|
if (validateError !== null) {
|
|
1118
1118
|
throw validateError;
|
|
1119
1119
|
}
|
|
@@ -1121,58 +1121,58 @@ const ingest$c = function FeaturedItemRecommendedListRepresentationIngest(input,
|
|
|
1121
1121
|
const key = path.fullPath;
|
|
1122
1122
|
const existingRecord = store.readEntry(key);
|
|
1123
1123
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 2592000000;
|
|
1124
|
-
let incomingRecord = normalize$
|
|
1124
|
+
let incomingRecord = normalize$9(input, store.readEntry(key), {
|
|
1125
1125
|
fullPath: key,
|
|
1126
1126
|
parent: path.parent,
|
|
1127
1127
|
propertyName: path.propertyName,
|
|
1128
1128
|
ttl: ttlToUse
|
|
1129
1129
|
}, luvio, store);
|
|
1130
|
-
if (existingRecord === undefined || equals$
|
|
1130
|
+
if (existingRecord === undefined || equals$c(existingRecord, incomingRecord) === false) {
|
|
1131
1131
|
luvio.storePublish(key, incomingRecord);
|
|
1132
1132
|
}
|
|
1133
1133
|
if (ttlToUse !== undefined) {
|
|
1134
1134
|
const storeMetadataParams = {
|
|
1135
1135
|
ttl: ttlToUse,
|
|
1136
1136
|
namespace: "LearningContentPlatform",
|
|
1137
|
-
version: VERSION$
|
|
1138
|
-
representationName: RepresentationType$
|
|
1137
|
+
version: VERSION$c,
|
|
1138
|
+
representationName: RepresentationType$9,
|
|
1139
1139
|
};
|
|
1140
1140
|
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
1141
1141
|
}
|
|
1142
1142
|
return createLink(key);
|
|
1143
1143
|
};
|
|
1144
|
-
function getTypeCacheKeys$
|
|
1144
|
+
function getTypeCacheKeys$9(luvio, input, fullPathFactory) {
|
|
1145
1145
|
const rootKeySet = new StoreKeyMap();
|
|
1146
1146
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1147
1147
|
const rootKey = fullPathFactory();
|
|
1148
1148
|
rootKeySet.set(rootKey, {
|
|
1149
1149
|
namespace: keyPrefix,
|
|
1150
|
-
representationName: RepresentationType$
|
|
1150
|
+
representationName: RepresentationType$9,
|
|
1151
1151
|
mergeable: false
|
|
1152
1152
|
});
|
|
1153
1153
|
const input_recommendedList_length = input.recommendedList.length;
|
|
1154
1154
|
for (let i = 0; i < input_recommendedList_length; i++) {
|
|
1155
|
-
rootKeySet.merge(getTypeCacheKeys$
|
|
1155
|
+
rootKeySet.merge(getTypeCacheKeys$a(luvio, input.recommendedList[i]));
|
|
1156
1156
|
}
|
|
1157
1157
|
return rootKeySet;
|
|
1158
1158
|
}
|
|
1159
1159
|
|
|
1160
|
-
function select$
|
|
1161
|
-
return select$
|
|
1160
|
+
function select$k(luvio, params) {
|
|
1161
|
+
return select$l();
|
|
1162
1162
|
}
|
|
1163
|
-
function keyBuilder$
|
|
1163
|
+
function keyBuilder$m(luvio, params) {
|
|
1164
1164
|
return keyPrefix + '::FeaturedItemRecommendedListRepresentation:(' + 'appId:' + params.queryParams.appId + ',' + 'context:' + params.queryParams.context + ')';
|
|
1165
1165
|
}
|
|
1166
|
-
function getResponseCacheKeys$
|
|
1167
|
-
return getTypeCacheKeys$
|
|
1166
|
+
function getResponseCacheKeys$8(luvio, resourceParams, response) {
|
|
1167
|
+
return getTypeCacheKeys$9(luvio, response, () => keyBuilder$m(luvio, resourceParams));
|
|
1168
1168
|
}
|
|
1169
|
-
function ingestSuccess$
|
|
1169
|
+
function ingestSuccess$8(luvio, resourceParams, response, snapshotRefresh) {
|
|
1170
1170
|
const { body } = response;
|
|
1171
|
-
const key = keyBuilder$
|
|
1172
|
-
luvio.storeIngest(key, ingest$
|
|
1171
|
+
const key = keyBuilder$m(luvio, resourceParams);
|
|
1172
|
+
luvio.storeIngest(key, ingest$9, body);
|
|
1173
1173
|
const snapshot = luvio.storeLookup({
|
|
1174
1174
|
recordId: key,
|
|
1175
|
-
node: select$
|
|
1175
|
+
node: select$k(),
|
|
1176
1176
|
variables: {},
|
|
1177
1177
|
}, snapshotRefresh);
|
|
1178
1178
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1183,13 +1183,13 @@ function ingestSuccess$a(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1183
1183
|
deepFreeze(snapshot.data);
|
|
1184
1184
|
return snapshot;
|
|
1185
1185
|
}
|
|
1186
|
-
function ingestError$
|
|
1187
|
-
const key = keyBuilder$
|
|
1186
|
+
function ingestError$8(luvio, params, error, snapshotRefresh) {
|
|
1187
|
+
const key = keyBuilder$m(luvio, params);
|
|
1188
1188
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1189
1189
|
luvio.storeIngestError(key, errorSnapshot);
|
|
1190
1190
|
return errorSnapshot;
|
|
1191
1191
|
}
|
|
1192
|
-
function createResourceRequest$
|
|
1192
|
+
function createResourceRequest$8(config) {
|
|
1193
1193
|
const headers = {};
|
|
1194
1194
|
return {
|
|
1195
1195
|
baseUri: '/services/data/v59.0',
|
|
@@ -1210,7 +1210,7 @@ const getFeaturedItemsRecommendedList_ConfigPropertyNames = {
|
|
|
1210
1210
|
optional: []
|
|
1211
1211
|
}
|
|
1212
1212
|
};
|
|
1213
|
-
function createResourceParams$
|
|
1213
|
+
function createResourceParams$8(config) {
|
|
1214
1214
|
const resourceParams = {
|
|
1215
1215
|
queryParams: {
|
|
1216
1216
|
appId: config.appId, context: config.context
|
|
@@ -1218,11 +1218,11 @@ function createResourceParams$a(config) {
|
|
|
1218
1218
|
};
|
|
1219
1219
|
return resourceParams;
|
|
1220
1220
|
}
|
|
1221
|
-
function keyBuilder$
|
|
1222
|
-
const resourceParams = createResourceParams$
|
|
1223
|
-
return keyBuilder$
|
|
1221
|
+
function keyBuilder$l(luvio, config) {
|
|
1222
|
+
const resourceParams = createResourceParams$8(config);
|
|
1223
|
+
return keyBuilder$m(luvio, resourceParams);
|
|
1224
1224
|
}
|
|
1225
|
-
function typeCheckConfig$
|
|
1225
|
+
function typeCheckConfig$8(untrustedConfig) {
|
|
1226
1226
|
const config = {};
|
|
1227
1227
|
const untrustedConfig_appId = untrustedConfig.appId;
|
|
1228
1228
|
if (typeof untrustedConfig_appId === 'string') {
|
|
@@ -1234,48 +1234,48 @@ function typeCheckConfig$a(untrustedConfig) {
|
|
|
1234
1234
|
}
|
|
1235
1235
|
return config;
|
|
1236
1236
|
}
|
|
1237
|
-
function validateAdapterConfig$
|
|
1237
|
+
function validateAdapterConfig$8(untrustedConfig, configPropertyNames) {
|
|
1238
1238
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1239
1239
|
return null;
|
|
1240
1240
|
}
|
|
1241
1241
|
if (process.env.NODE_ENV !== 'production') {
|
|
1242
1242
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1243
1243
|
}
|
|
1244
|
-
const config = typeCheckConfig$
|
|
1244
|
+
const config = typeCheckConfig$8(untrustedConfig);
|
|
1245
1245
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1246
1246
|
return null;
|
|
1247
1247
|
}
|
|
1248
1248
|
return config;
|
|
1249
1249
|
}
|
|
1250
|
-
function adapterFragment$
|
|
1251
|
-
createResourceParams$
|
|
1252
|
-
return select$
|
|
1250
|
+
function adapterFragment$8(luvio, config) {
|
|
1251
|
+
createResourceParams$8(config);
|
|
1252
|
+
return select$k();
|
|
1253
1253
|
}
|
|
1254
|
-
function onFetchResponseSuccess$
|
|
1255
|
-
const snapshot = ingestSuccess$
|
|
1254
|
+
function onFetchResponseSuccess$8(luvio, config, resourceParams, response) {
|
|
1255
|
+
const snapshot = ingestSuccess$8(luvio, resourceParams, response, {
|
|
1256
1256
|
config,
|
|
1257
|
-
resolve: () => buildNetworkSnapshot$
|
|
1257
|
+
resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
|
|
1258
1258
|
});
|
|
1259
1259
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1260
1260
|
}
|
|
1261
|
-
function onFetchResponseError$
|
|
1262
|
-
const snapshot = ingestError$
|
|
1261
|
+
function onFetchResponseError$8(luvio, config, resourceParams, response) {
|
|
1262
|
+
const snapshot = ingestError$8(luvio, resourceParams, response, {
|
|
1263
1263
|
config,
|
|
1264
|
-
resolve: () => buildNetworkSnapshot$
|
|
1264
|
+
resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
|
|
1265
1265
|
});
|
|
1266
1266
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1267
1267
|
}
|
|
1268
|
-
function buildNetworkSnapshot$
|
|
1269
|
-
const resourceParams = createResourceParams$
|
|
1270
|
-
const request = createResourceRequest$
|
|
1268
|
+
function buildNetworkSnapshot$8(luvio, config, options) {
|
|
1269
|
+
const resourceParams = createResourceParams$8(config);
|
|
1270
|
+
const request = createResourceRequest$8(resourceParams);
|
|
1271
1271
|
return luvio.dispatchResourceRequest(request, options)
|
|
1272
1272
|
.then((response) => {
|
|
1273
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
1273
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$8(luvio, config, resourceParams, response), () => getResponseCacheKeys$8(luvio, resourceParams, response.body));
|
|
1274
1274
|
}, (response) => {
|
|
1275
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
1275
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$8(luvio, config, resourceParams, response));
|
|
1276
1276
|
});
|
|
1277
1277
|
}
|
|
1278
|
-
function buildNetworkSnapshotCachePolicy$
|
|
1278
|
+
function buildNetworkSnapshotCachePolicy$8(context, coercedAdapterRequestContext) {
|
|
1279
1279
|
const { luvio, config } = context;
|
|
1280
1280
|
const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
|
|
1281
1281
|
const dispatchOptions = {
|
|
@@ -1290,33 +1290,33 @@ function buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext
|
|
|
1290
1290
|
priority: networkPriority
|
|
1291
1291
|
};
|
|
1292
1292
|
}
|
|
1293
|
-
return buildNetworkSnapshot$
|
|
1293
|
+
return buildNetworkSnapshot$8(luvio, config, dispatchOptions);
|
|
1294
1294
|
}
|
|
1295
|
-
function buildCachedSnapshotCachePolicy$
|
|
1295
|
+
function buildCachedSnapshotCachePolicy$8(context, storeLookup) {
|
|
1296
1296
|
const { luvio, config } = context;
|
|
1297
1297
|
const selector = {
|
|
1298
|
-
recordId: keyBuilder$
|
|
1299
|
-
node: adapterFragment$
|
|
1298
|
+
recordId: keyBuilder$l(luvio, config),
|
|
1299
|
+
node: adapterFragment$8(luvio, config),
|
|
1300
1300
|
variables: {},
|
|
1301
1301
|
};
|
|
1302
1302
|
const cacheSnapshot = storeLookup(selector, {
|
|
1303
1303
|
config,
|
|
1304
|
-
resolve: () => buildNetworkSnapshot$
|
|
1304
|
+
resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
|
|
1305
1305
|
});
|
|
1306
1306
|
return cacheSnapshot;
|
|
1307
1307
|
}
|
|
1308
1308
|
const getFeaturedItemsRecommendedListAdapterFactory = (luvio) => function LearningContentPlatform__getFeaturedItemsRecommendedList(untrustedConfig, requestContext) {
|
|
1309
|
-
const config = validateAdapterConfig$
|
|
1309
|
+
const config = validateAdapterConfig$8(untrustedConfig, getFeaturedItemsRecommendedList_ConfigPropertyNames);
|
|
1310
1310
|
// Invalid or incomplete config
|
|
1311
1311
|
if (config === null) {
|
|
1312
1312
|
return null;
|
|
1313
1313
|
}
|
|
1314
1314
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1315
|
-
buildCachedSnapshotCachePolicy$
|
|
1315
|
+
buildCachedSnapshotCachePolicy$8, buildNetworkSnapshotCachePolicy$8);
|
|
1316
1316
|
};
|
|
1317
1317
|
|
|
1318
|
-
const VERSION$
|
|
1319
|
-
function validate$
|
|
1318
|
+
const VERSION$b = "5d7adb55f43466f61c4837ebf27eab61";
|
|
1319
|
+
function validate$b(obj, path = 'FeaturedItemRelatedListRepresentation') {
|
|
1320
1320
|
const v_error = (() => {
|
|
1321
1321
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1322
1322
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1336,14 +1336,14 @@ function validate$e(obj, path = 'FeaturedItemRelatedListRepresentation') {
|
|
|
1336
1336
|
})();
|
|
1337
1337
|
return v_error === undefined ? null : v_error;
|
|
1338
1338
|
}
|
|
1339
|
-
const RepresentationType$
|
|
1340
|
-
function normalize$
|
|
1339
|
+
const RepresentationType$8 = 'FeaturedItemRelatedListRepresentation';
|
|
1340
|
+
function normalize$8(input, existing, path, luvio, store, timestamp) {
|
|
1341
1341
|
const input_relatedList = input.relatedList;
|
|
1342
1342
|
const input_relatedList_id = path.fullPath + '__relatedList';
|
|
1343
1343
|
for (let i = 0; i < input_relatedList.length; i++) {
|
|
1344
1344
|
const input_relatedList_item = input_relatedList[i];
|
|
1345
1345
|
let input_relatedList_item_id = input_relatedList_id + '__' + i;
|
|
1346
|
-
input_relatedList[i] = ingest$
|
|
1346
|
+
input_relatedList[i] = ingest$a(input_relatedList_item, {
|
|
1347
1347
|
fullPath: input_relatedList_item_id,
|
|
1348
1348
|
propertyName: i,
|
|
1349
1349
|
parent: {
|
|
@@ -1356,22 +1356,22 @@ function normalize$b(input, existing, path, luvio, store, timestamp) {
|
|
|
1356
1356
|
}
|
|
1357
1357
|
return input;
|
|
1358
1358
|
}
|
|
1359
|
-
const select$
|
|
1359
|
+
const select$j = function FeaturedItemRelatedListRepresentationSelect() {
|
|
1360
1360
|
return {
|
|
1361
1361
|
kind: 'Fragment',
|
|
1362
|
-
version: VERSION$
|
|
1362
|
+
version: VERSION$b,
|
|
1363
1363
|
private: [],
|
|
1364
1364
|
selections: [
|
|
1365
1365
|
{
|
|
1366
1366
|
name: 'relatedList',
|
|
1367
1367
|
kind: 'Link',
|
|
1368
1368
|
plural: true,
|
|
1369
|
-
fragment: select$
|
|
1369
|
+
fragment: select$m()
|
|
1370
1370
|
}
|
|
1371
1371
|
]
|
|
1372
1372
|
};
|
|
1373
1373
|
};
|
|
1374
|
-
function equals$
|
|
1374
|
+
function equals$b(existing, incoming) {
|
|
1375
1375
|
const existing_relatedList = existing.relatedList;
|
|
1376
1376
|
const incoming_relatedList = incoming.relatedList;
|
|
1377
1377
|
const equals_relatedList_items = equalsArray(existing_relatedList, incoming_relatedList, (existing_relatedList_item, incoming_relatedList_item) => {
|
|
@@ -1384,9 +1384,9 @@ function equals$e(existing, incoming) {
|
|
|
1384
1384
|
}
|
|
1385
1385
|
return true;
|
|
1386
1386
|
}
|
|
1387
|
-
const ingest$
|
|
1387
|
+
const ingest$8 = function FeaturedItemRelatedListRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1388
1388
|
if (process.env.NODE_ENV !== 'production') {
|
|
1389
|
-
const validateError = validate$
|
|
1389
|
+
const validateError = validate$b(input);
|
|
1390
1390
|
if (validateError !== null) {
|
|
1391
1391
|
throw validateError;
|
|
1392
1392
|
}
|
|
@@ -1394,58 +1394,58 @@ const ingest$b = function FeaturedItemRelatedListRepresentationIngest(input, pat
|
|
|
1394
1394
|
const key = path.fullPath;
|
|
1395
1395
|
const existingRecord = store.readEntry(key);
|
|
1396
1396
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 2592000000;
|
|
1397
|
-
let incomingRecord = normalize$
|
|
1397
|
+
let incomingRecord = normalize$8(input, store.readEntry(key), {
|
|
1398
1398
|
fullPath: key,
|
|
1399
1399
|
parent: path.parent,
|
|
1400
1400
|
propertyName: path.propertyName,
|
|
1401
1401
|
ttl: ttlToUse
|
|
1402
1402
|
}, luvio, store);
|
|
1403
|
-
if (existingRecord === undefined || equals$
|
|
1403
|
+
if (existingRecord === undefined || equals$b(existingRecord, incomingRecord) === false) {
|
|
1404
1404
|
luvio.storePublish(key, incomingRecord);
|
|
1405
1405
|
}
|
|
1406
1406
|
if (ttlToUse !== undefined) {
|
|
1407
1407
|
const storeMetadataParams = {
|
|
1408
1408
|
ttl: ttlToUse,
|
|
1409
1409
|
namespace: "LearningContentPlatform",
|
|
1410
|
-
version: VERSION$
|
|
1411
|
-
representationName: RepresentationType$
|
|
1410
|
+
version: VERSION$b,
|
|
1411
|
+
representationName: RepresentationType$8,
|
|
1412
1412
|
};
|
|
1413
1413
|
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
1414
1414
|
}
|
|
1415
1415
|
return createLink(key);
|
|
1416
1416
|
};
|
|
1417
|
-
function getTypeCacheKeys$
|
|
1417
|
+
function getTypeCacheKeys$8(luvio, input, fullPathFactory) {
|
|
1418
1418
|
const rootKeySet = new StoreKeyMap();
|
|
1419
1419
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1420
1420
|
const rootKey = fullPathFactory();
|
|
1421
1421
|
rootKeySet.set(rootKey, {
|
|
1422
1422
|
namespace: keyPrefix,
|
|
1423
|
-
representationName: RepresentationType$
|
|
1423
|
+
representationName: RepresentationType$8,
|
|
1424
1424
|
mergeable: false
|
|
1425
1425
|
});
|
|
1426
1426
|
const input_relatedList_length = input.relatedList.length;
|
|
1427
1427
|
for (let i = 0; i < input_relatedList_length; i++) {
|
|
1428
|
-
rootKeySet.merge(getTypeCacheKeys$
|
|
1428
|
+
rootKeySet.merge(getTypeCacheKeys$a(luvio, input.relatedList[i]));
|
|
1429
1429
|
}
|
|
1430
1430
|
return rootKeySet;
|
|
1431
1431
|
}
|
|
1432
1432
|
|
|
1433
|
-
function select$
|
|
1434
|
-
return select$
|
|
1433
|
+
function select$i(luvio, params) {
|
|
1434
|
+
return select$j();
|
|
1435
1435
|
}
|
|
1436
|
-
function keyBuilder$
|
|
1436
|
+
function keyBuilder$k(luvio, params) {
|
|
1437
1437
|
return keyPrefix + '::FeaturedItemRelatedListRepresentation:(' + 'appId:' + params.queryParams.appId + ',' + 'pageRef:' + params.queryParams.pageRef + ')';
|
|
1438
1438
|
}
|
|
1439
|
-
function getResponseCacheKeys$
|
|
1440
|
-
return getTypeCacheKeys$
|
|
1439
|
+
function getResponseCacheKeys$7(luvio, resourceParams, response) {
|
|
1440
|
+
return getTypeCacheKeys$8(luvio, response, () => keyBuilder$k(luvio, resourceParams));
|
|
1441
1441
|
}
|
|
1442
|
-
function ingestSuccess$
|
|
1442
|
+
function ingestSuccess$7(luvio, resourceParams, response, snapshotRefresh) {
|
|
1443
1443
|
const { body } = response;
|
|
1444
|
-
const key = keyBuilder$
|
|
1445
|
-
luvio.storeIngest(key, ingest$
|
|
1444
|
+
const key = keyBuilder$k(luvio, resourceParams);
|
|
1445
|
+
luvio.storeIngest(key, ingest$8, body);
|
|
1446
1446
|
const snapshot = luvio.storeLookup({
|
|
1447
1447
|
recordId: key,
|
|
1448
|
-
node: select$
|
|
1448
|
+
node: select$i(),
|
|
1449
1449
|
variables: {},
|
|
1450
1450
|
}, snapshotRefresh);
|
|
1451
1451
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1456,13 +1456,13 @@ function ingestSuccess$9(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1456
1456
|
deepFreeze(snapshot.data);
|
|
1457
1457
|
return snapshot;
|
|
1458
1458
|
}
|
|
1459
|
-
function ingestError$
|
|
1460
|
-
const key = keyBuilder$
|
|
1459
|
+
function ingestError$7(luvio, params, error, snapshotRefresh) {
|
|
1460
|
+
const key = keyBuilder$k(luvio, params);
|
|
1461
1461
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1462
1462
|
luvio.storeIngestError(key, errorSnapshot);
|
|
1463
1463
|
return errorSnapshot;
|
|
1464
1464
|
}
|
|
1465
|
-
function createResourceRequest$
|
|
1465
|
+
function createResourceRequest$7(config) {
|
|
1466
1466
|
const headers = {};
|
|
1467
1467
|
return {
|
|
1468
1468
|
baseUri: '/services/data/v59.0',
|
|
@@ -1483,7 +1483,7 @@ const getFeaturedItemsRelatedList_ConfigPropertyNames = {
|
|
|
1483
1483
|
optional: []
|
|
1484
1484
|
}
|
|
1485
1485
|
};
|
|
1486
|
-
function createResourceParams$
|
|
1486
|
+
function createResourceParams$7(config) {
|
|
1487
1487
|
const resourceParams = {
|
|
1488
1488
|
queryParams: {
|
|
1489
1489
|
appId: config.appId, pageRef: config.pageRef
|
|
@@ -1491,11 +1491,11 @@ function createResourceParams$9(config) {
|
|
|
1491
1491
|
};
|
|
1492
1492
|
return resourceParams;
|
|
1493
1493
|
}
|
|
1494
|
-
function keyBuilder$
|
|
1495
|
-
const resourceParams = createResourceParams$
|
|
1496
|
-
return keyBuilder$
|
|
1494
|
+
function keyBuilder$j(luvio, config) {
|
|
1495
|
+
const resourceParams = createResourceParams$7(config);
|
|
1496
|
+
return keyBuilder$k(luvio, resourceParams);
|
|
1497
1497
|
}
|
|
1498
|
-
function typeCheckConfig$
|
|
1498
|
+
function typeCheckConfig$7(untrustedConfig) {
|
|
1499
1499
|
const config = {};
|
|
1500
1500
|
const untrustedConfig_appId = untrustedConfig.appId;
|
|
1501
1501
|
if (typeof untrustedConfig_appId === 'string') {
|
|
@@ -1507,48 +1507,48 @@ function typeCheckConfig$9(untrustedConfig) {
|
|
|
1507
1507
|
}
|
|
1508
1508
|
return config;
|
|
1509
1509
|
}
|
|
1510
|
-
function validateAdapterConfig$
|
|
1510
|
+
function validateAdapterConfig$7(untrustedConfig, configPropertyNames) {
|
|
1511
1511
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1512
1512
|
return null;
|
|
1513
1513
|
}
|
|
1514
1514
|
if (process.env.NODE_ENV !== 'production') {
|
|
1515
1515
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1516
1516
|
}
|
|
1517
|
-
const config = typeCheckConfig$
|
|
1517
|
+
const config = typeCheckConfig$7(untrustedConfig);
|
|
1518
1518
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1519
1519
|
return null;
|
|
1520
1520
|
}
|
|
1521
1521
|
return config;
|
|
1522
1522
|
}
|
|
1523
|
-
function adapterFragment$
|
|
1524
|
-
createResourceParams$
|
|
1525
|
-
return select$
|
|
1523
|
+
function adapterFragment$7(luvio, config) {
|
|
1524
|
+
createResourceParams$7(config);
|
|
1525
|
+
return select$i();
|
|
1526
1526
|
}
|
|
1527
|
-
function onFetchResponseSuccess$
|
|
1528
|
-
const snapshot = ingestSuccess$
|
|
1527
|
+
function onFetchResponseSuccess$7(luvio, config, resourceParams, response) {
|
|
1528
|
+
const snapshot = ingestSuccess$7(luvio, resourceParams, response, {
|
|
1529
1529
|
config,
|
|
1530
|
-
resolve: () => buildNetworkSnapshot$
|
|
1530
|
+
resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
|
|
1531
1531
|
});
|
|
1532
1532
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1533
1533
|
}
|
|
1534
|
-
function onFetchResponseError$
|
|
1535
|
-
const snapshot = ingestError$
|
|
1534
|
+
function onFetchResponseError$7(luvio, config, resourceParams, response) {
|
|
1535
|
+
const snapshot = ingestError$7(luvio, resourceParams, response, {
|
|
1536
1536
|
config,
|
|
1537
|
-
resolve: () => buildNetworkSnapshot$
|
|
1537
|
+
resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
|
|
1538
1538
|
});
|
|
1539
1539
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1540
1540
|
}
|
|
1541
|
-
function buildNetworkSnapshot$
|
|
1542
|
-
const resourceParams = createResourceParams$
|
|
1543
|
-
const request = createResourceRequest$
|
|
1541
|
+
function buildNetworkSnapshot$7(luvio, config, options) {
|
|
1542
|
+
const resourceParams = createResourceParams$7(config);
|
|
1543
|
+
const request = createResourceRequest$7(resourceParams);
|
|
1544
1544
|
return luvio.dispatchResourceRequest(request, options)
|
|
1545
1545
|
.then((response) => {
|
|
1546
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
1546
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$7(luvio, config, resourceParams, response), () => getResponseCacheKeys$7(luvio, resourceParams, response.body));
|
|
1547
1547
|
}, (response) => {
|
|
1548
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
1548
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$7(luvio, config, resourceParams, response));
|
|
1549
1549
|
});
|
|
1550
1550
|
}
|
|
1551
|
-
function buildNetworkSnapshotCachePolicy$
|
|
1551
|
+
function buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext) {
|
|
1552
1552
|
const { luvio, config } = context;
|
|
1553
1553
|
const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
|
|
1554
1554
|
const dispatchOptions = {
|
|
@@ -1563,33 +1563,33 @@ function buildNetworkSnapshotCachePolicy$9(context, coercedAdapterRequestContext
|
|
|
1563
1563
|
priority: networkPriority
|
|
1564
1564
|
};
|
|
1565
1565
|
}
|
|
1566
|
-
return buildNetworkSnapshot$
|
|
1566
|
+
return buildNetworkSnapshot$7(luvio, config, dispatchOptions);
|
|
1567
1567
|
}
|
|
1568
|
-
function buildCachedSnapshotCachePolicy$
|
|
1568
|
+
function buildCachedSnapshotCachePolicy$7(context, storeLookup) {
|
|
1569
1569
|
const { luvio, config } = context;
|
|
1570
1570
|
const selector = {
|
|
1571
|
-
recordId: keyBuilder$
|
|
1572
|
-
node: adapterFragment$
|
|
1571
|
+
recordId: keyBuilder$j(luvio, config),
|
|
1572
|
+
node: adapterFragment$7(luvio, config),
|
|
1573
1573
|
variables: {},
|
|
1574
1574
|
};
|
|
1575
1575
|
const cacheSnapshot = storeLookup(selector, {
|
|
1576
1576
|
config,
|
|
1577
|
-
resolve: () => buildNetworkSnapshot$
|
|
1577
|
+
resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
|
|
1578
1578
|
});
|
|
1579
1579
|
return cacheSnapshot;
|
|
1580
1580
|
}
|
|
1581
1581
|
const getFeaturedItemsRelatedListAdapterFactory = (luvio) => function LearningContentPlatform__getFeaturedItemsRelatedList(untrustedConfig, requestContext) {
|
|
1582
|
-
const config = validateAdapterConfig$
|
|
1582
|
+
const config = validateAdapterConfig$7(untrustedConfig, getFeaturedItemsRelatedList_ConfigPropertyNames);
|
|
1583
1583
|
// Invalid or incomplete config
|
|
1584
1584
|
if (config === null) {
|
|
1585
1585
|
return null;
|
|
1586
1586
|
}
|
|
1587
1587
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1588
|
-
buildCachedSnapshotCachePolicy$
|
|
1588
|
+
buildCachedSnapshotCachePolicy$7, buildNetworkSnapshotCachePolicy$7);
|
|
1589
1589
|
};
|
|
1590
1590
|
|
|
1591
|
-
const VERSION$
|
|
1592
|
-
function validate$
|
|
1591
|
+
const VERSION$a = "8471031fcff953c83f350a0f66b60ddb";
|
|
1592
|
+
function validate$a(obj, path = 'LearningConfigRepresentation') {
|
|
1593
1593
|
const v_error = (() => {
|
|
1594
1594
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1595
1595
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1612,14 +1612,14 @@ function validate$d(obj, path = 'LearningConfigRepresentation') {
|
|
|
1612
1612
|
})();
|
|
1613
1613
|
return v_error === undefined ? null : v_error;
|
|
1614
1614
|
}
|
|
1615
|
-
const RepresentationType$
|
|
1616
|
-
function normalize$
|
|
1615
|
+
const RepresentationType$7 = 'LearningConfigRepresentation';
|
|
1616
|
+
function normalize$7(input, existing, path, luvio, store, timestamp) {
|
|
1617
1617
|
return input;
|
|
1618
1618
|
}
|
|
1619
|
-
const select$
|
|
1619
|
+
const select$h = function LearningConfigRepresentationSelect() {
|
|
1620
1620
|
return {
|
|
1621
1621
|
kind: 'Fragment',
|
|
1622
|
-
version: VERSION$
|
|
1622
|
+
version: VERSION$a,
|
|
1623
1623
|
private: [],
|
|
1624
1624
|
selections: [
|
|
1625
1625
|
{
|
|
@@ -1637,7 +1637,7 @@ const select$m = function LearningConfigRepresentationSelect() {
|
|
|
1637
1637
|
]
|
|
1638
1638
|
};
|
|
1639
1639
|
};
|
|
1640
|
-
function equals$
|
|
1640
|
+
function equals$a(existing, incoming) {
|
|
1641
1641
|
const existing_hasElevatedLearningAccess = existing.hasElevatedLearningAccess;
|
|
1642
1642
|
const incoming_hasElevatedLearningAccess = incoming.hasElevatedLearningAccess;
|
|
1643
1643
|
if (!(existing_hasElevatedLearningAccess === incoming_hasElevatedLearningAccess)) {
|
|
@@ -1655,9 +1655,9 @@ function equals$d(existing, incoming) {
|
|
|
1655
1655
|
}
|
|
1656
1656
|
return true;
|
|
1657
1657
|
}
|
|
1658
|
-
const ingest$
|
|
1658
|
+
const ingest$7 = function LearningConfigRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1659
1659
|
if (process.env.NODE_ENV !== 'production') {
|
|
1660
|
-
const validateError = validate$
|
|
1660
|
+
const validateError = validate$a(input);
|
|
1661
1661
|
if (validateError !== null) {
|
|
1662
1662
|
throw validateError;
|
|
1663
1663
|
}
|
|
@@ -1665,54 +1665,54 @@ const ingest$a = function LearningConfigRepresentationIngest(input, path, luvio,
|
|
|
1665
1665
|
const key = path.fullPath;
|
|
1666
1666
|
const existingRecord = store.readEntry(key);
|
|
1667
1667
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 2592000000;
|
|
1668
|
-
let incomingRecord = normalize$
|
|
1668
|
+
let incomingRecord = normalize$7(input, store.readEntry(key), {
|
|
1669
1669
|
fullPath: key,
|
|
1670
1670
|
parent: path.parent,
|
|
1671
1671
|
propertyName: path.propertyName,
|
|
1672
1672
|
ttl: ttlToUse
|
|
1673
1673
|
});
|
|
1674
|
-
if (existingRecord === undefined || equals$
|
|
1674
|
+
if (existingRecord === undefined || equals$a(existingRecord, incomingRecord) === false) {
|
|
1675
1675
|
luvio.storePublish(key, incomingRecord);
|
|
1676
1676
|
}
|
|
1677
1677
|
if (ttlToUse !== undefined) {
|
|
1678
1678
|
const storeMetadataParams = {
|
|
1679
1679
|
ttl: ttlToUse,
|
|
1680
1680
|
namespace: "LearningContentPlatform",
|
|
1681
|
-
version: VERSION$
|
|
1682
|
-
representationName: RepresentationType$
|
|
1681
|
+
version: VERSION$a,
|
|
1682
|
+
representationName: RepresentationType$7,
|
|
1683
1683
|
};
|
|
1684
1684
|
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
1685
1685
|
}
|
|
1686
1686
|
return createLink(key);
|
|
1687
1687
|
};
|
|
1688
|
-
function getTypeCacheKeys$
|
|
1688
|
+
function getTypeCacheKeys$7(luvio, input, fullPathFactory) {
|
|
1689
1689
|
const rootKeySet = new StoreKeyMap();
|
|
1690
1690
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1691
1691
|
const rootKey = fullPathFactory();
|
|
1692
1692
|
rootKeySet.set(rootKey, {
|
|
1693
1693
|
namespace: keyPrefix,
|
|
1694
|
-
representationName: RepresentationType$
|
|
1694
|
+
representationName: RepresentationType$7,
|
|
1695
1695
|
mergeable: false
|
|
1696
1696
|
});
|
|
1697
1697
|
return rootKeySet;
|
|
1698
1698
|
}
|
|
1699
1699
|
|
|
1700
|
-
function select$
|
|
1701
|
-
return select$
|
|
1700
|
+
function select$g(luvio, params) {
|
|
1701
|
+
return select$h();
|
|
1702
1702
|
}
|
|
1703
|
-
function keyBuilder$
|
|
1703
|
+
function keyBuilder$i(luvio, params) {
|
|
1704
1704
|
return keyPrefix + '::LearningConfigRepresentation:(' + ')';
|
|
1705
1705
|
}
|
|
1706
|
-
function getResponseCacheKeys$
|
|
1707
|
-
return getTypeCacheKeys$
|
|
1706
|
+
function getResponseCacheKeys$6(luvio, resourceParams, response) {
|
|
1707
|
+
return getTypeCacheKeys$7(luvio, response, () => keyBuilder$i());
|
|
1708
1708
|
}
|
|
1709
|
-
function ingestSuccess$
|
|
1709
|
+
function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
|
|
1710
1710
|
const { body } = response;
|
|
1711
|
-
const key = keyBuilder$
|
|
1712
|
-
luvio.storeIngest(key, ingest$
|
|
1711
|
+
const key = keyBuilder$i();
|
|
1712
|
+
luvio.storeIngest(key, ingest$7, body);
|
|
1713
1713
|
const snapshot = luvio.storeLookup({
|
|
1714
1714
|
recordId: key,
|
|
1715
|
-
node: select$
|
|
1715
|
+
node: select$g(),
|
|
1716
1716
|
variables: {},
|
|
1717
1717
|
}, snapshotRefresh);
|
|
1718
1718
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1723,13 +1723,13 @@ function ingestSuccess$8(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1723
1723
|
deepFreeze(snapshot.data);
|
|
1724
1724
|
return snapshot;
|
|
1725
1725
|
}
|
|
1726
|
-
function ingestError$
|
|
1727
|
-
const key = keyBuilder$
|
|
1726
|
+
function ingestError$6(luvio, params, error, snapshotRefresh) {
|
|
1727
|
+
const key = keyBuilder$i();
|
|
1728
1728
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1729
1729
|
luvio.storeIngestError(key, errorSnapshot);
|
|
1730
1730
|
return errorSnapshot;
|
|
1731
1731
|
}
|
|
1732
|
-
function createResourceRequest$
|
|
1732
|
+
function createResourceRequest$6(config) {
|
|
1733
1733
|
const headers = {};
|
|
1734
1734
|
return {
|
|
1735
1735
|
baseUri: '/services/data/v59.0',
|
|
@@ -1750,58 +1750,58 @@ const getLearningConfig_ConfigPropertyNames = {
|
|
|
1750
1750
|
optional: []
|
|
1751
1751
|
}
|
|
1752
1752
|
};
|
|
1753
|
-
function createResourceParams$
|
|
1753
|
+
function createResourceParams$6(config) {
|
|
1754
1754
|
const resourceParams = {};
|
|
1755
1755
|
return resourceParams;
|
|
1756
1756
|
}
|
|
1757
|
-
function keyBuilder$
|
|
1758
|
-
return keyBuilder$
|
|
1757
|
+
function keyBuilder$h(luvio, config) {
|
|
1758
|
+
return keyBuilder$i();
|
|
1759
1759
|
}
|
|
1760
|
-
function typeCheckConfig$
|
|
1760
|
+
function typeCheckConfig$6(untrustedConfig) {
|
|
1761
1761
|
const config = {};
|
|
1762
1762
|
return config;
|
|
1763
1763
|
}
|
|
1764
|
-
function validateAdapterConfig$
|
|
1764
|
+
function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
|
|
1765
1765
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1766
1766
|
return null;
|
|
1767
1767
|
}
|
|
1768
1768
|
if (process.env.NODE_ENV !== 'production') {
|
|
1769
1769
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1770
1770
|
}
|
|
1771
|
-
const config = typeCheckConfig$
|
|
1771
|
+
const config = typeCheckConfig$6();
|
|
1772
1772
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1773
1773
|
return null;
|
|
1774
1774
|
}
|
|
1775
1775
|
return config;
|
|
1776
1776
|
}
|
|
1777
|
-
function adapterFragment$
|
|
1778
|
-
return select$
|
|
1777
|
+
function adapterFragment$6(luvio, config) {
|
|
1778
|
+
return select$g();
|
|
1779
1779
|
}
|
|
1780
|
-
function onFetchResponseSuccess$
|
|
1781
|
-
const snapshot = ingestSuccess$
|
|
1780
|
+
function onFetchResponseSuccess$6(luvio, config, resourceParams, response) {
|
|
1781
|
+
const snapshot = ingestSuccess$6(luvio, resourceParams, response, {
|
|
1782
1782
|
config,
|
|
1783
|
-
resolve: () => buildNetworkSnapshot$
|
|
1783
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
1784
1784
|
});
|
|
1785
1785
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1786
1786
|
}
|
|
1787
|
-
function onFetchResponseError$
|
|
1788
|
-
const snapshot = ingestError$
|
|
1787
|
+
function onFetchResponseError$6(luvio, config, resourceParams, response) {
|
|
1788
|
+
const snapshot = ingestError$6(luvio, resourceParams, response, {
|
|
1789
1789
|
config,
|
|
1790
|
-
resolve: () => buildNetworkSnapshot$
|
|
1790
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
1791
1791
|
});
|
|
1792
1792
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1793
1793
|
}
|
|
1794
|
-
function buildNetworkSnapshot$
|
|
1795
|
-
const resourceParams = createResourceParams$
|
|
1796
|
-
const request = createResourceRequest$
|
|
1794
|
+
function buildNetworkSnapshot$6(luvio, config, options) {
|
|
1795
|
+
const resourceParams = createResourceParams$6();
|
|
1796
|
+
const request = createResourceRequest$6();
|
|
1797
1797
|
return luvio.dispatchResourceRequest(request, options)
|
|
1798
1798
|
.then((response) => {
|
|
1799
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
1799
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$6(luvio, config, resourceParams, response), () => getResponseCacheKeys$6(luvio, resourceParams, response.body));
|
|
1800
1800
|
}, (response) => {
|
|
1801
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
1801
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$6(luvio, config, resourceParams, response));
|
|
1802
1802
|
});
|
|
1803
1803
|
}
|
|
1804
|
-
function buildNetworkSnapshotCachePolicy$
|
|
1804
|
+
function buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext) {
|
|
1805
1805
|
const { luvio, config } = context;
|
|
1806
1806
|
const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
|
|
1807
1807
|
const dispatchOptions = {
|
|
@@ -1816,33 +1816,33 @@ function buildNetworkSnapshotCachePolicy$8(context, coercedAdapterRequestContext
|
|
|
1816
1816
|
priority: networkPriority
|
|
1817
1817
|
};
|
|
1818
1818
|
}
|
|
1819
|
-
return buildNetworkSnapshot$
|
|
1819
|
+
return buildNetworkSnapshot$6(luvio, config, dispatchOptions);
|
|
1820
1820
|
}
|
|
1821
|
-
function buildCachedSnapshotCachePolicy$
|
|
1821
|
+
function buildCachedSnapshotCachePolicy$6(context, storeLookup) {
|
|
1822
1822
|
const { luvio, config } = context;
|
|
1823
1823
|
const selector = {
|
|
1824
|
-
recordId: keyBuilder$
|
|
1825
|
-
node: adapterFragment$
|
|
1824
|
+
recordId: keyBuilder$h(),
|
|
1825
|
+
node: adapterFragment$6(),
|
|
1826
1826
|
variables: {},
|
|
1827
1827
|
};
|
|
1828
1828
|
const cacheSnapshot = storeLookup(selector, {
|
|
1829
1829
|
config,
|
|
1830
|
-
resolve: () => buildNetworkSnapshot$
|
|
1830
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
1831
1831
|
});
|
|
1832
1832
|
return cacheSnapshot;
|
|
1833
1833
|
}
|
|
1834
1834
|
const getLearningConfigAdapterFactory = (luvio) => function LearningContentPlatform__getLearningConfig(untrustedConfig, requestContext) {
|
|
1835
|
-
const config = validateAdapterConfig$
|
|
1835
|
+
const config = validateAdapterConfig$6(untrustedConfig, getLearningConfig_ConfigPropertyNames);
|
|
1836
1836
|
// Invalid or incomplete config
|
|
1837
1837
|
if (config === null) {
|
|
1838
1838
|
return null;
|
|
1839
1839
|
}
|
|
1840
1840
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1841
|
-
buildCachedSnapshotCachePolicy$
|
|
1841
|
+
buildCachedSnapshotCachePolicy$6, buildNetworkSnapshotCachePolicy$6);
|
|
1842
1842
|
};
|
|
1843
1843
|
|
|
1844
|
-
const VERSION$
|
|
1845
|
-
function validate$
|
|
1844
|
+
const VERSION$9 = "1292f1a549c777c6586cca649e823737";
|
|
1845
|
+
function validate$9(obj, path = 'LearningItemProgressListRepresentation') {
|
|
1846
1846
|
const v_error = (() => {
|
|
1847
1847
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1848
1848
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1862,14 +1862,14 @@ function validate$c(obj, path = 'LearningItemProgressListRepresentation') {
|
|
|
1862
1862
|
})();
|
|
1863
1863
|
return v_error === undefined ? null : v_error;
|
|
1864
1864
|
}
|
|
1865
|
-
const RepresentationType$
|
|
1866
|
-
function normalize$
|
|
1865
|
+
const RepresentationType$6 = 'LearningItemProgressListRepresentation';
|
|
1866
|
+
function normalize$6(input, existing, path, luvio, store, timestamp) {
|
|
1867
1867
|
const input_list = input.list;
|
|
1868
1868
|
const input_list_id = path.fullPath + '__list';
|
|
1869
1869
|
for (let i = 0; i < input_list.length; i++) {
|
|
1870
1870
|
const input_list_item = input_list[i];
|
|
1871
1871
|
let input_list_item_id = input_list_id + '__' + i;
|
|
1872
|
-
input_list[i] = ingest$
|
|
1872
|
+
input_list[i] = ingest$b(input_list_item, {
|
|
1873
1873
|
fullPath: input_list_item_id,
|
|
1874
1874
|
propertyName: i,
|
|
1875
1875
|
parent: {
|
|
@@ -1882,22 +1882,22 @@ function normalize$9(input, existing, path, luvio, store, timestamp) {
|
|
|
1882
1882
|
}
|
|
1883
1883
|
return input;
|
|
1884
1884
|
}
|
|
1885
|
-
const select$
|
|
1885
|
+
const select$f = function LearningItemProgressListRepresentationSelect() {
|
|
1886
1886
|
return {
|
|
1887
1887
|
kind: 'Fragment',
|
|
1888
|
-
version: VERSION$
|
|
1888
|
+
version: VERSION$9,
|
|
1889
1889
|
private: [],
|
|
1890
1890
|
selections: [
|
|
1891
1891
|
{
|
|
1892
1892
|
name: 'list',
|
|
1893
1893
|
kind: 'Link',
|
|
1894
1894
|
plural: true,
|
|
1895
|
-
fragment: select$
|
|
1895
|
+
fragment: select$o()
|
|
1896
1896
|
}
|
|
1897
1897
|
]
|
|
1898
1898
|
};
|
|
1899
1899
|
};
|
|
1900
|
-
function equals$
|
|
1900
|
+
function equals$9(existing, incoming) {
|
|
1901
1901
|
const existing_list = existing.list;
|
|
1902
1902
|
const incoming_list = incoming.list;
|
|
1903
1903
|
const equals_list_items = equalsArray(existing_list, incoming_list, (existing_list_item, incoming_list_item) => {
|
|
@@ -1910,9 +1910,9 @@ function equals$c(existing, incoming) {
|
|
|
1910
1910
|
}
|
|
1911
1911
|
return true;
|
|
1912
1912
|
}
|
|
1913
|
-
const ingest$
|
|
1913
|
+
const ingest$6 = function LearningItemProgressListRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1914
1914
|
if (process.env.NODE_ENV !== 'production') {
|
|
1915
|
-
const validateError = validate$
|
|
1915
|
+
const validateError = validate$9(input);
|
|
1916
1916
|
if (validateError !== null) {
|
|
1917
1917
|
throw validateError;
|
|
1918
1918
|
}
|
|
@@ -1920,58 +1920,58 @@ const ingest$9 = function LearningItemProgressListRepresentationIngest(input, pa
|
|
|
1920
1920
|
const key = path.fullPath;
|
|
1921
1921
|
const existingRecord = store.readEntry(key);
|
|
1922
1922
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 2592000000;
|
|
1923
|
-
let incomingRecord = normalize$
|
|
1923
|
+
let incomingRecord = normalize$6(input, store.readEntry(key), {
|
|
1924
1924
|
fullPath: key,
|
|
1925
1925
|
parent: path.parent,
|
|
1926
1926
|
propertyName: path.propertyName,
|
|
1927
1927
|
ttl: ttlToUse
|
|
1928
1928
|
}, luvio, store);
|
|
1929
|
-
if (existingRecord === undefined || equals$
|
|
1929
|
+
if (existingRecord === undefined || equals$9(existingRecord, incomingRecord) === false) {
|
|
1930
1930
|
luvio.storePublish(key, incomingRecord);
|
|
1931
1931
|
}
|
|
1932
1932
|
if (ttlToUse !== undefined) {
|
|
1933
1933
|
const storeMetadataParams = {
|
|
1934
1934
|
ttl: ttlToUse,
|
|
1935
1935
|
namespace: "LearningContentPlatform",
|
|
1936
|
-
version: VERSION$
|
|
1937
|
-
representationName: RepresentationType$
|
|
1936
|
+
version: VERSION$9,
|
|
1937
|
+
representationName: RepresentationType$6,
|
|
1938
1938
|
};
|
|
1939
1939
|
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
1940
1940
|
}
|
|
1941
1941
|
return createLink(key);
|
|
1942
1942
|
};
|
|
1943
|
-
function getTypeCacheKeys$
|
|
1943
|
+
function getTypeCacheKeys$6(luvio, input, fullPathFactory) {
|
|
1944
1944
|
const rootKeySet = new StoreKeyMap();
|
|
1945
1945
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1946
1946
|
const rootKey = fullPathFactory();
|
|
1947
1947
|
rootKeySet.set(rootKey, {
|
|
1948
1948
|
namespace: keyPrefix,
|
|
1949
|
-
representationName: RepresentationType$
|
|
1949
|
+
representationName: RepresentationType$6,
|
|
1950
1950
|
mergeable: false
|
|
1951
1951
|
});
|
|
1952
1952
|
const input_list_length = input.list.length;
|
|
1953
1953
|
for (let i = 0; i < input_list_length; i++) {
|
|
1954
|
-
rootKeySet.merge(getTypeCacheKeys$
|
|
1954
|
+
rootKeySet.merge(getTypeCacheKeys$b(luvio, input.list[i]));
|
|
1955
1955
|
}
|
|
1956
1956
|
return rootKeySet;
|
|
1957
1957
|
}
|
|
1958
1958
|
|
|
1959
|
-
function select$
|
|
1960
|
-
return select$
|
|
1959
|
+
function select$e(luvio, params) {
|
|
1960
|
+
return select$f();
|
|
1961
1961
|
}
|
|
1962
|
-
function keyBuilder$
|
|
1962
|
+
function keyBuilder$g(luvio, params) {
|
|
1963
1963
|
return keyPrefix + '::LearningItemProgressListRepresentation:(' + 'learningItemIds:' + params.queryParams.learningItemIds + ')';
|
|
1964
1964
|
}
|
|
1965
|
-
function getResponseCacheKeys$
|
|
1966
|
-
return getTypeCacheKeys$
|
|
1965
|
+
function getResponseCacheKeys$5(luvio, resourceParams, response) {
|
|
1966
|
+
return getTypeCacheKeys$6(luvio, response, () => keyBuilder$g(luvio, resourceParams));
|
|
1967
1967
|
}
|
|
1968
|
-
function ingestSuccess$
|
|
1968
|
+
function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
|
|
1969
1969
|
const { body } = response;
|
|
1970
|
-
const key = keyBuilder$
|
|
1971
|
-
luvio.storeIngest(key, ingest$
|
|
1970
|
+
const key = keyBuilder$g(luvio, resourceParams);
|
|
1971
|
+
luvio.storeIngest(key, ingest$6, body);
|
|
1972
1972
|
const snapshot = luvio.storeLookup({
|
|
1973
1973
|
recordId: key,
|
|
1974
|
-
node: select$
|
|
1974
|
+
node: select$e(),
|
|
1975
1975
|
variables: {},
|
|
1976
1976
|
}, snapshotRefresh);
|
|
1977
1977
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1982,13 +1982,13 @@ function ingestSuccess$7(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1982
1982
|
deepFreeze(snapshot.data);
|
|
1983
1983
|
return snapshot;
|
|
1984
1984
|
}
|
|
1985
|
-
function ingestError$
|
|
1986
|
-
const key = keyBuilder$
|
|
1985
|
+
function ingestError$5(luvio, params, error, snapshotRefresh) {
|
|
1986
|
+
const key = keyBuilder$g(luvio, params);
|
|
1987
1987
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1988
1988
|
luvio.storeIngestError(key, errorSnapshot);
|
|
1989
1989
|
return errorSnapshot;
|
|
1990
1990
|
}
|
|
1991
|
-
function createResourceRequest$
|
|
1991
|
+
function createResourceRequest$5(config) {
|
|
1992
1992
|
const headers = {};
|
|
1993
1993
|
return {
|
|
1994
1994
|
baseUri: '/services/data/v59.0',
|
|
@@ -2009,7 +2009,7 @@ const getLearningItemProgress_ConfigPropertyNames = {
|
|
|
2009
2009
|
optional: ['learningItemIds']
|
|
2010
2010
|
}
|
|
2011
2011
|
};
|
|
2012
|
-
function createResourceParams$
|
|
2012
|
+
function createResourceParams$5(config) {
|
|
2013
2013
|
const resourceParams = {
|
|
2014
2014
|
queryParams: {
|
|
2015
2015
|
learningItemIds: config.learningItemIds
|
|
@@ -2017,11 +2017,11 @@ function createResourceParams$7(config) {
|
|
|
2017
2017
|
};
|
|
2018
2018
|
return resourceParams;
|
|
2019
2019
|
}
|
|
2020
|
-
function keyBuilder$
|
|
2021
|
-
const resourceParams = createResourceParams$
|
|
2022
|
-
return keyBuilder$
|
|
2020
|
+
function keyBuilder$f(luvio, config) {
|
|
2021
|
+
const resourceParams = createResourceParams$5(config);
|
|
2022
|
+
return keyBuilder$g(luvio, resourceParams);
|
|
2023
2023
|
}
|
|
2024
|
-
function typeCheckConfig$
|
|
2024
|
+
function typeCheckConfig$5(untrustedConfig) {
|
|
2025
2025
|
const config = {};
|
|
2026
2026
|
const untrustedConfig_learningItemIds = untrustedConfig.learningItemIds;
|
|
2027
2027
|
if (ArrayIsArray$1(untrustedConfig_learningItemIds)) {
|
|
@@ -2036,48 +2036,48 @@ function typeCheckConfig$7(untrustedConfig) {
|
|
|
2036
2036
|
}
|
|
2037
2037
|
return config;
|
|
2038
2038
|
}
|
|
2039
|
-
function validateAdapterConfig$
|
|
2039
|
+
function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
|
|
2040
2040
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
2041
2041
|
return null;
|
|
2042
2042
|
}
|
|
2043
2043
|
if (process.env.NODE_ENV !== 'production') {
|
|
2044
2044
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
2045
2045
|
}
|
|
2046
|
-
const config = typeCheckConfig$
|
|
2046
|
+
const config = typeCheckConfig$5(untrustedConfig);
|
|
2047
2047
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2048
2048
|
return null;
|
|
2049
2049
|
}
|
|
2050
2050
|
return config;
|
|
2051
2051
|
}
|
|
2052
|
-
function adapterFragment$
|
|
2053
|
-
createResourceParams$
|
|
2054
|
-
return select$
|
|
2052
|
+
function adapterFragment$5(luvio, config) {
|
|
2053
|
+
createResourceParams$5(config);
|
|
2054
|
+
return select$e();
|
|
2055
2055
|
}
|
|
2056
|
-
function onFetchResponseSuccess$
|
|
2057
|
-
const snapshot = ingestSuccess$
|
|
2056
|
+
function onFetchResponseSuccess$5(luvio, config, resourceParams, response) {
|
|
2057
|
+
const snapshot = ingestSuccess$5(luvio, resourceParams, response, {
|
|
2058
2058
|
config,
|
|
2059
|
-
resolve: () => buildNetworkSnapshot$
|
|
2059
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
2060
2060
|
});
|
|
2061
2061
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2062
2062
|
}
|
|
2063
|
-
function onFetchResponseError$
|
|
2064
|
-
const snapshot = ingestError$
|
|
2063
|
+
function onFetchResponseError$5(luvio, config, resourceParams, response) {
|
|
2064
|
+
const snapshot = ingestError$5(luvio, resourceParams, response, {
|
|
2065
2065
|
config,
|
|
2066
|
-
resolve: () => buildNetworkSnapshot$
|
|
2066
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
2067
2067
|
});
|
|
2068
2068
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2069
2069
|
}
|
|
2070
|
-
function buildNetworkSnapshot$
|
|
2071
|
-
const resourceParams = createResourceParams$
|
|
2072
|
-
const request = createResourceRequest$
|
|
2070
|
+
function buildNetworkSnapshot$5(luvio, config, options) {
|
|
2071
|
+
const resourceParams = createResourceParams$5(config);
|
|
2072
|
+
const request = createResourceRequest$5(resourceParams);
|
|
2073
2073
|
return luvio.dispatchResourceRequest(request, options)
|
|
2074
2074
|
.then((response) => {
|
|
2075
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
2075
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$5(luvio, config, resourceParams, response), () => getResponseCacheKeys$5(luvio, resourceParams, response.body));
|
|
2076
2076
|
}, (response) => {
|
|
2077
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
2077
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$5(luvio, config, resourceParams, response));
|
|
2078
2078
|
});
|
|
2079
2079
|
}
|
|
2080
|
-
function buildNetworkSnapshotCachePolicy$
|
|
2080
|
+
function buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext) {
|
|
2081
2081
|
const { luvio, config } = context;
|
|
2082
2082
|
const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
|
|
2083
2083
|
const dispatchOptions = {
|
|
@@ -2092,34 +2092,34 @@ function buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext
|
|
|
2092
2092
|
priority: networkPriority
|
|
2093
2093
|
};
|
|
2094
2094
|
}
|
|
2095
|
-
return buildNetworkSnapshot$
|
|
2095
|
+
return buildNetworkSnapshot$5(luvio, config, dispatchOptions);
|
|
2096
2096
|
}
|
|
2097
|
-
function buildCachedSnapshotCachePolicy$
|
|
2097
|
+
function buildCachedSnapshotCachePolicy$5(context, storeLookup) {
|
|
2098
2098
|
const { luvio, config } = context;
|
|
2099
2099
|
const selector = {
|
|
2100
|
-
recordId: keyBuilder$
|
|
2101
|
-
node: adapterFragment$
|
|
2100
|
+
recordId: keyBuilder$f(luvio, config),
|
|
2101
|
+
node: adapterFragment$5(luvio, config),
|
|
2102
2102
|
variables: {},
|
|
2103
2103
|
};
|
|
2104
2104
|
const cacheSnapshot = storeLookup(selector, {
|
|
2105
2105
|
config,
|
|
2106
|
-
resolve: () => buildNetworkSnapshot$
|
|
2106
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
2107
2107
|
});
|
|
2108
2108
|
return cacheSnapshot;
|
|
2109
2109
|
}
|
|
2110
2110
|
const getLearningItemProgressAdapterFactory = (luvio) => function LearningContentPlatform__getLearningItemProgress(untrustedConfig, requestContext) {
|
|
2111
|
-
const config = validateAdapterConfig$
|
|
2111
|
+
const config = validateAdapterConfig$5(untrustedConfig, getLearningItemProgress_ConfigPropertyNames);
|
|
2112
2112
|
// Invalid or incomplete config
|
|
2113
2113
|
if (config === null) {
|
|
2114
2114
|
return null;
|
|
2115
2115
|
}
|
|
2116
2116
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
2117
|
-
buildCachedSnapshotCachePolicy$
|
|
2117
|
+
buildCachedSnapshotCachePolicy$5, buildNetworkSnapshotCachePolicy$5);
|
|
2118
2118
|
};
|
|
2119
2119
|
|
|
2120
|
-
const TTL$
|
|
2121
|
-
const VERSION$
|
|
2122
|
-
function validate$
|
|
2120
|
+
const TTL$4 = 60000;
|
|
2121
|
+
const VERSION$8 = "1832481a3fe10deeb9c5dddba933f3da";
|
|
2122
|
+
function validate$8(obj, path = 'LearningItemRepresentation') {
|
|
2123
2123
|
const v_error = (() => {
|
|
2124
2124
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2125
2125
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2414,23 +2414,23 @@ function validate$b(obj, path = 'LearningItemRepresentation') {
|
|
|
2414
2414
|
})();
|
|
2415
2415
|
return v_error === undefined ? null : v_error;
|
|
2416
2416
|
}
|
|
2417
|
-
const RepresentationType$
|
|
2418
|
-
function keyBuilder$
|
|
2419
|
-
return keyPrefix + '::' + RepresentationType$
|
|
2417
|
+
const RepresentationType$5 = 'LearningItemRepresentation';
|
|
2418
|
+
function keyBuilder$e(luvio, config) {
|
|
2419
|
+
return keyPrefix + '::' + RepresentationType$5 + ':' + (config.learning_item_id === null ? '' : config.learning_item_id);
|
|
2420
2420
|
}
|
|
2421
|
-
function keyBuilderFromType$
|
|
2421
|
+
function keyBuilderFromType$4(luvio, object) {
|
|
2422
2422
|
const keyParams = {
|
|
2423
2423
|
learning_item_id: object.id
|
|
2424
2424
|
};
|
|
2425
|
-
return keyBuilder$
|
|
2425
|
+
return keyBuilder$e(luvio, keyParams);
|
|
2426
2426
|
}
|
|
2427
|
-
function normalize$
|
|
2427
|
+
function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
2428
2428
|
return input;
|
|
2429
2429
|
}
|
|
2430
|
-
const select$
|
|
2430
|
+
const select$d = function LearningItemRepresentationSelect() {
|
|
2431
2431
|
return {
|
|
2432
2432
|
kind: 'Fragment',
|
|
2433
|
-
version: VERSION$
|
|
2433
|
+
version: VERSION$8,
|
|
2434
2434
|
private: [],
|
|
2435
2435
|
selections: [
|
|
2436
2436
|
{
|
|
@@ -2484,7 +2484,7 @@ const select$i = function LearningItemRepresentationSelect() {
|
|
|
2484
2484
|
]
|
|
2485
2485
|
};
|
|
2486
2486
|
};
|
|
2487
|
-
function equals$
|
|
2487
|
+
function equals$8(existing, incoming) {
|
|
2488
2488
|
const existing_completionRate = existing.completionRate;
|
|
2489
2489
|
const incoming_completionRate = incoming.completionRate;
|
|
2490
2490
|
if (!(existing_completionRate === incoming_completionRate)) {
|
|
@@ -2547,50 +2547,50 @@ function equals$b(existing, incoming) {
|
|
|
2547
2547
|
}
|
|
2548
2548
|
return true;
|
|
2549
2549
|
}
|
|
2550
|
-
const ingest$
|
|
2550
|
+
const ingest$5 = function LearningItemRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2551
2551
|
if (process.env.NODE_ENV !== 'production') {
|
|
2552
|
-
const validateError = validate$
|
|
2552
|
+
const validateError = validate$8(input);
|
|
2553
2553
|
if (validateError !== null) {
|
|
2554
2554
|
throw validateError;
|
|
2555
2555
|
}
|
|
2556
2556
|
}
|
|
2557
|
-
const key = keyBuilderFromType$
|
|
2557
|
+
const key = keyBuilderFromType$4(luvio, input);
|
|
2558
2558
|
const existingRecord = store.readEntry(key);
|
|
2559
|
-
const ttlToUse = TTL$
|
|
2560
|
-
let incomingRecord = normalize$
|
|
2559
|
+
const ttlToUse = TTL$4;
|
|
2560
|
+
let incomingRecord = normalize$5(input, store.readEntry(key), {
|
|
2561
2561
|
fullPath: key,
|
|
2562
2562
|
parent: path.parent,
|
|
2563
2563
|
propertyName: path.propertyName,
|
|
2564
2564
|
ttl: ttlToUse
|
|
2565
2565
|
});
|
|
2566
|
-
if (existingRecord === undefined || equals$
|
|
2566
|
+
if (existingRecord === undefined || equals$8(existingRecord, incomingRecord) === false) {
|
|
2567
2567
|
luvio.storePublish(key, incomingRecord);
|
|
2568
2568
|
}
|
|
2569
2569
|
{
|
|
2570
2570
|
const storeMetadataParams = {
|
|
2571
2571
|
ttl: ttlToUse,
|
|
2572
2572
|
namespace: "LearningContentPlatform",
|
|
2573
|
-
version: VERSION$
|
|
2574
|
-
representationName: RepresentationType$
|
|
2573
|
+
version: VERSION$8,
|
|
2574
|
+
representationName: RepresentationType$5,
|
|
2575
2575
|
};
|
|
2576
2576
|
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
2577
2577
|
}
|
|
2578
2578
|
return createLink(key);
|
|
2579
2579
|
};
|
|
2580
|
-
function getTypeCacheKeys$
|
|
2580
|
+
function getTypeCacheKeys$5(luvio, input, fullPathFactory) {
|
|
2581
2581
|
const rootKeySet = new StoreKeyMap();
|
|
2582
2582
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2583
|
-
const rootKey = keyBuilderFromType$
|
|
2583
|
+
const rootKey = keyBuilderFromType$4(luvio, input);
|
|
2584
2584
|
rootKeySet.set(rootKey, {
|
|
2585
2585
|
namespace: keyPrefix,
|
|
2586
|
-
representationName: RepresentationType$
|
|
2586
|
+
representationName: RepresentationType$5,
|
|
2587
2587
|
mergeable: false
|
|
2588
2588
|
});
|
|
2589
2589
|
return rootKeySet;
|
|
2590
2590
|
}
|
|
2591
2591
|
|
|
2592
|
-
const VERSION$
|
|
2593
|
-
function validate$
|
|
2592
|
+
const VERSION$7 = "cd4c27f064c3139aef14a6ef22627c0f";
|
|
2593
|
+
function validate$7(obj, path = 'LearningItemListRepresentation') {
|
|
2594
2594
|
const v_error = (() => {
|
|
2595
2595
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2596
2596
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2610,14 +2610,14 @@ function validate$a(obj, path = 'LearningItemListRepresentation') {
|
|
|
2610
2610
|
})();
|
|
2611
2611
|
return v_error === undefined ? null : v_error;
|
|
2612
2612
|
}
|
|
2613
|
-
const RepresentationType$
|
|
2614
|
-
function normalize$
|
|
2613
|
+
const RepresentationType$4 = 'LearningItemListRepresentation';
|
|
2614
|
+
function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
2615
2615
|
const input_list = input.list;
|
|
2616
2616
|
const input_list_id = path.fullPath + '__list';
|
|
2617
2617
|
for (let i = 0; i < input_list.length; i++) {
|
|
2618
2618
|
const input_list_item = input_list[i];
|
|
2619
2619
|
let input_list_item_id = input_list_id + '__' + i;
|
|
2620
|
-
input_list[i] = ingest$
|
|
2620
|
+
input_list[i] = ingest$5(input_list_item, {
|
|
2621
2621
|
fullPath: input_list_item_id,
|
|
2622
2622
|
propertyName: i,
|
|
2623
2623
|
parent: {
|
|
@@ -2630,22 +2630,22 @@ function normalize$7(input, existing, path, luvio, store, timestamp) {
|
|
|
2630
2630
|
}
|
|
2631
2631
|
return input;
|
|
2632
2632
|
}
|
|
2633
|
-
const select$
|
|
2633
|
+
const select$c = function LearningItemListRepresentationSelect() {
|
|
2634
2634
|
return {
|
|
2635
2635
|
kind: 'Fragment',
|
|
2636
|
-
version: VERSION$
|
|
2636
|
+
version: VERSION$7,
|
|
2637
2637
|
private: [],
|
|
2638
2638
|
selections: [
|
|
2639
2639
|
{
|
|
2640
2640
|
name: 'list',
|
|
2641
2641
|
kind: 'Link',
|
|
2642
2642
|
plural: true,
|
|
2643
|
-
fragment: select$
|
|
2643
|
+
fragment: select$d()
|
|
2644
2644
|
}
|
|
2645
2645
|
]
|
|
2646
2646
|
};
|
|
2647
2647
|
};
|
|
2648
|
-
function equals$
|
|
2648
|
+
function equals$7(existing, incoming) {
|
|
2649
2649
|
const existing_list = existing.list;
|
|
2650
2650
|
const incoming_list = incoming.list;
|
|
2651
2651
|
const equals_list_items = equalsArray(existing_list, incoming_list, (existing_list_item, incoming_list_item) => {
|
|
@@ -2658,9 +2658,9 @@ function equals$a(existing, incoming) {
|
|
|
2658
2658
|
}
|
|
2659
2659
|
return true;
|
|
2660
2660
|
}
|
|
2661
|
-
const ingest$
|
|
2661
|
+
const ingest$4 = function LearningItemListRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2662
2662
|
if (process.env.NODE_ENV !== 'production') {
|
|
2663
|
-
const validateError = validate$
|
|
2663
|
+
const validateError = validate$7(input);
|
|
2664
2664
|
if (validateError !== null) {
|
|
2665
2665
|
throw validateError;
|
|
2666
2666
|
}
|
|
@@ -2668,58 +2668,58 @@ const ingest$7 = function LearningItemListRepresentationIngest(input, path, luvi
|
|
|
2668
2668
|
const key = path.fullPath;
|
|
2669
2669
|
const existingRecord = store.readEntry(key);
|
|
2670
2670
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 2592000000;
|
|
2671
|
-
let incomingRecord = normalize$
|
|
2671
|
+
let incomingRecord = normalize$4(input, store.readEntry(key), {
|
|
2672
2672
|
fullPath: key,
|
|
2673
2673
|
parent: path.parent,
|
|
2674
2674
|
propertyName: path.propertyName,
|
|
2675
2675
|
ttl: ttlToUse
|
|
2676
2676
|
}, luvio, store);
|
|
2677
|
-
if (existingRecord === undefined || equals$
|
|
2677
|
+
if (existingRecord === undefined || equals$7(existingRecord, incomingRecord) === false) {
|
|
2678
2678
|
luvio.storePublish(key, incomingRecord);
|
|
2679
2679
|
}
|
|
2680
2680
|
if (ttlToUse !== undefined) {
|
|
2681
2681
|
const storeMetadataParams = {
|
|
2682
2682
|
ttl: ttlToUse,
|
|
2683
2683
|
namespace: "LearningContentPlatform",
|
|
2684
|
-
version: VERSION$
|
|
2685
|
-
representationName: RepresentationType$
|
|
2684
|
+
version: VERSION$7,
|
|
2685
|
+
representationName: RepresentationType$4,
|
|
2686
2686
|
};
|
|
2687
2687
|
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
2688
2688
|
}
|
|
2689
2689
|
return createLink(key);
|
|
2690
2690
|
};
|
|
2691
|
-
function getTypeCacheKeys$
|
|
2691
|
+
function getTypeCacheKeys$4(luvio, input, fullPathFactory) {
|
|
2692
2692
|
const rootKeySet = new StoreKeyMap();
|
|
2693
2693
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2694
2694
|
const rootKey = fullPathFactory();
|
|
2695
2695
|
rootKeySet.set(rootKey, {
|
|
2696
2696
|
namespace: keyPrefix,
|
|
2697
|
-
representationName: RepresentationType$
|
|
2697
|
+
representationName: RepresentationType$4,
|
|
2698
2698
|
mergeable: false
|
|
2699
2699
|
});
|
|
2700
2700
|
const input_list_length = input.list.length;
|
|
2701
2701
|
for (let i = 0; i < input_list_length; i++) {
|
|
2702
|
-
rootKeySet.merge(getTypeCacheKeys$
|
|
2702
|
+
rootKeySet.merge(getTypeCacheKeys$5(luvio, input.list[i]));
|
|
2703
2703
|
}
|
|
2704
2704
|
return rootKeySet;
|
|
2705
2705
|
}
|
|
2706
2706
|
|
|
2707
|
-
function select$
|
|
2708
|
-
return select$
|
|
2707
|
+
function select$b(luvio, params) {
|
|
2708
|
+
return select$c();
|
|
2709
2709
|
}
|
|
2710
|
-
function keyBuilder$
|
|
2710
|
+
function keyBuilder$d(luvio, params) {
|
|
2711
2711
|
return keyPrefix + '::LearningItemListRepresentation:(' + 'learningItemIds:' + params.queryParams.learningItemIds + ')';
|
|
2712
2712
|
}
|
|
2713
|
-
function getResponseCacheKeys$
|
|
2714
|
-
return getTypeCacheKeys$
|
|
2713
|
+
function getResponseCacheKeys$4(luvio, resourceParams, response) {
|
|
2714
|
+
return getTypeCacheKeys$4(luvio, response, () => keyBuilder$d(luvio, resourceParams));
|
|
2715
2715
|
}
|
|
2716
|
-
function ingestSuccess$
|
|
2716
|
+
function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
2717
2717
|
const { body } = response;
|
|
2718
|
-
const key = keyBuilder$
|
|
2719
|
-
luvio.storeIngest(key, ingest$
|
|
2718
|
+
const key = keyBuilder$d(luvio, resourceParams);
|
|
2719
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
2720
2720
|
const snapshot = luvio.storeLookup({
|
|
2721
2721
|
recordId: key,
|
|
2722
|
-
node: select$
|
|
2722
|
+
node: select$b(),
|
|
2723
2723
|
variables: {},
|
|
2724
2724
|
}, snapshotRefresh);
|
|
2725
2725
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -2730,13 +2730,13 @@ function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
2730
2730
|
deepFreeze(snapshot.data);
|
|
2731
2731
|
return snapshot;
|
|
2732
2732
|
}
|
|
2733
|
-
function ingestError$
|
|
2734
|
-
const key = keyBuilder$
|
|
2733
|
+
function ingestError$4(luvio, params, error, snapshotRefresh) {
|
|
2734
|
+
const key = keyBuilder$d(luvio, params);
|
|
2735
2735
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
2736
2736
|
luvio.storeIngestError(key, errorSnapshot);
|
|
2737
2737
|
return errorSnapshot;
|
|
2738
2738
|
}
|
|
2739
|
-
function createResourceRequest$
|
|
2739
|
+
function createResourceRequest$4(config) {
|
|
2740
2740
|
const headers = {};
|
|
2741
2741
|
return {
|
|
2742
2742
|
baseUri: '/services/data/v59.0',
|
|
@@ -2757,7 +2757,7 @@ const getLearningItemsList_ConfigPropertyNames = {
|
|
|
2757
2757
|
optional: ['learningItemIds']
|
|
2758
2758
|
}
|
|
2759
2759
|
};
|
|
2760
|
-
function createResourceParams$
|
|
2760
|
+
function createResourceParams$4(config) {
|
|
2761
2761
|
const resourceParams = {
|
|
2762
2762
|
queryParams: {
|
|
2763
2763
|
learningItemIds: config.learningItemIds
|
|
@@ -2765,11 +2765,11 @@ function createResourceParams$6(config) {
|
|
|
2765
2765
|
};
|
|
2766
2766
|
return resourceParams;
|
|
2767
2767
|
}
|
|
2768
|
-
function keyBuilder$
|
|
2769
|
-
const resourceParams = createResourceParams$
|
|
2770
|
-
return keyBuilder$
|
|
2768
|
+
function keyBuilder$c(luvio, config) {
|
|
2769
|
+
const resourceParams = createResourceParams$4(config);
|
|
2770
|
+
return keyBuilder$d(luvio, resourceParams);
|
|
2771
2771
|
}
|
|
2772
|
-
function typeCheckConfig$
|
|
2772
|
+
function typeCheckConfig$4(untrustedConfig) {
|
|
2773
2773
|
const config = {};
|
|
2774
2774
|
const untrustedConfig_learningItemIds = untrustedConfig.learningItemIds;
|
|
2775
2775
|
if (ArrayIsArray$1(untrustedConfig_learningItemIds)) {
|
|
@@ -2784,48 +2784,48 @@ function typeCheckConfig$6(untrustedConfig) {
|
|
|
2784
2784
|
}
|
|
2785
2785
|
return config;
|
|
2786
2786
|
}
|
|
2787
|
-
function validateAdapterConfig$
|
|
2787
|
+
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
2788
2788
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
2789
2789
|
return null;
|
|
2790
2790
|
}
|
|
2791
2791
|
if (process.env.NODE_ENV !== 'production') {
|
|
2792
2792
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
2793
2793
|
}
|
|
2794
|
-
const config = typeCheckConfig$
|
|
2794
|
+
const config = typeCheckConfig$4(untrustedConfig);
|
|
2795
2795
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2796
2796
|
return null;
|
|
2797
2797
|
}
|
|
2798
2798
|
return config;
|
|
2799
2799
|
}
|
|
2800
|
-
function adapterFragment$
|
|
2801
|
-
createResourceParams$
|
|
2802
|
-
return select$
|
|
2800
|
+
function adapterFragment$4(luvio, config) {
|
|
2801
|
+
createResourceParams$4(config);
|
|
2802
|
+
return select$b();
|
|
2803
2803
|
}
|
|
2804
|
-
function onFetchResponseSuccess$
|
|
2805
|
-
const snapshot = ingestSuccess$
|
|
2804
|
+
function onFetchResponseSuccess$4(luvio, config, resourceParams, response) {
|
|
2805
|
+
const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
|
|
2806
2806
|
config,
|
|
2807
|
-
resolve: () => buildNetworkSnapshot$
|
|
2807
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
2808
2808
|
});
|
|
2809
2809
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2810
2810
|
}
|
|
2811
|
-
function onFetchResponseError$
|
|
2812
|
-
const snapshot = ingestError$
|
|
2811
|
+
function onFetchResponseError$4(luvio, config, resourceParams, response) {
|
|
2812
|
+
const snapshot = ingestError$4(luvio, resourceParams, response, {
|
|
2813
2813
|
config,
|
|
2814
|
-
resolve: () => buildNetworkSnapshot$
|
|
2814
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
2815
2815
|
});
|
|
2816
2816
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2817
2817
|
}
|
|
2818
|
-
function buildNetworkSnapshot$
|
|
2819
|
-
const resourceParams = createResourceParams$
|
|
2820
|
-
const request = createResourceRequest$
|
|
2818
|
+
function buildNetworkSnapshot$4(luvio, config, options) {
|
|
2819
|
+
const resourceParams = createResourceParams$4(config);
|
|
2820
|
+
const request = createResourceRequest$4(resourceParams);
|
|
2821
2821
|
return luvio.dispatchResourceRequest(request, options)
|
|
2822
2822
|
.then((response) => {
|
|
2823
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
2823
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$4(luvio, config, resourceParams, response), () => getResponseCacheKeys$4(luvio, resourceParams, response.body));
|
|
2824
2824
|
}, (response) => {
|
|
2825
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
2825
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$4(luvio, config, resourceParams, response));
|
|
2826
2826
|
});
|
|
2827
2827
|
}
|
|
2828
|
-
function buildNetworkSnapshotCachePolicy$
|
|
2828
|
+
function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
|
|
2829
2829
|
const { luvio, config } = context;
|
|
2830
2830
|
const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
|
|
2831
2831
|
const dispatchOptions = {
|
|
@@ -2840,33 +2840,33 @@ function buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext
|
|
|
2840
2840
|
priority: networkPriority
|
|
2841
2841
|
};
|
|
2842
2842
|
}
|
|
2843
|
-
return buildNetworkSnapshot$
|
|
2843
|
+
return buildNetworkSnapshot$4(luvio, config, dispatchOptions);
|
|
2844
2844
|
}
|
|
2845
|
-
function buildCachedSnapshotCachePolicy$
|
|
2845
|
+
function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
|
|
2846
2846
|
const { luvio, config } = context;
|
|
2847
2847
|
const selector = {
|
|
2848
|
-
recordId: keyBuilder$
|
|
2849
|
-
node: adapterFragment$
|
|
2848
|
+
recordId: keyBuilder$c(luvio, config),
|
|
2849
|
+
node: adapterFragment$4(luvio, config),
|
|
2850
2850
|
variables: {},
|
|
2851
2851
|
};
|
|
2852
2852
|
const cacheSnapshot = storeLookup(selector, {
|
|
2853
2853
|
config,
|
|
2854
|
-
resolve: () => buildNetworkSnapshot$
|
|
2854
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
2855
2855
|
});
|
|
2856
2856
|
return cacheSnapshot;
|
|
2857
2857
|
}
|
|
2858
2858
|
const getLearningItemsListAdapterFactory = (luvio) => function LearningContentPlatform__getLearningItemsList(untrustedConfig, requestContext) {
|
|
2859
|
-
const config = validateAdapterConfig$
|
|
2859
|
+
const config = validateAdapterConfig$4(untrustedConfig, getLearningItemsList_ConfigPropertyNames);
|
|
2860
2860
|
// Invalid or incomplete config
|
|
2861
2861
|
if (config === null) {
|
|
2862
2862
|
return null;
|
|
2863
2863
|
}
|
|
2864
2864
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
2865
|
-
buildCachedSnapshotCachePolicy$
|
|
2865
|
+
buildCachedSnapshotCachePolicy$4, buildNetworkSnapshotCachePolicy$4);
|
|
2866
2866
|
};
|
|
2867
2867
|
|
|
2868
|
-
const VERSION$
|
|
2869
|
-
function validate$
|
|
2868
|
+
const VERSION$6 = "5d4f9c65c714a3f1ef57de5a211599fb";
|
|
2869
|
+
function validate$6(obj, path = 'LearningAssignmentRepresentation') {
|
|
2870
2870
|
const v_error = (() => {
|
|
2871
2871
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2872
2872
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -3118,10 +3118,10 @@ function validate$9(obj, path = 'LearningAssignmentRepresentation') {
|
|
|
3118
3118
|
})();
|
|
3119
3119
|
return v_error === undefined ? null : v_error;
|
|
3120
3120
|
}
|
|
3121
|
-
const select$
|
|
3121
|
+
const select$a = function LearningAssignmentRepresentationSelect() {
|
|
3122
3122
|
return {
|
|
3123
3123
|
kind: 'Fragment',
|
|
3124
|
-
version: VERSION$
|
|
3124
|
+
version: VERSION$6,
|
|
3125
3125
|
private: [],
|
|
3126
3126
|
selections: [
|
|
3127
3127
|
{
|
|
@@ -3171,7 +3171,7 @@ const select$f = function LearningAssignmentRepresentationSelect() {
|
|
|
3171
3171
|
]
|
|
3172
3172
|
};
|
|
3173
3173
|
};
|
|
3174
|
-
function equals$
|
|
3174
|
+
function equals$6(existing, incoming) {
|
|
3175
3175
|
const existing_id = existing.id;
|
|
3176
3176
|
const incoming_id = incoming.id;
|
|
3177
3177
|
if (!(existing_id === incoming_id)) {
|
|
@@ -3230,9 +3230,9 @@ function equals$9(existing, incoming) {
|
|
|
3230
3230
|
return true;
|
|
3231
3231
|
}
|
|
3232
3232
|
|
|
3233
|
-
const TTL$
|
|
3234
|
-
const VERSION$
|
|
3235
|
-
function validate$
|
|
3233
|
+
const TTL$3 = 15000;
|
|
3234
|
+
const VERSION$5 = "3ae4e1d57057645da8f2613fbdc5e245";
|
|
3235
|
+
function validate$5(obj, path = 'LearningModelOutputRepresentation') {
|
|
3236
3236
|
const v_error = (() => {
|
|
3237
3237
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3238
3238
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -3271,7 +3271,7 @@ function validate$8(obj, path = 'LearningModelOutputRepresentation') {
|
|
|
3271
3271
|
for (let i = 0; i < obj_assignments.length; i++) {
|
|
3272
3272
|
const obj_assignments_item = obj_assignments[i];
|
|
3273
3273
|
const path_assignments_item = path_assignments + '[' + i + ']';
|
|
3274
|
-
const referencepath_assignments_itemValidationError = validate$
|
|
3274
|
+
const referencepath_assignments_itemValidationError = validate$6(obj_assignments_item, path_assignments_item);
|
|
3275
3275
|
if (referencepath_assignments_itemValidationError !== null) {
|
|
3276
3276
|
let message = 'Object doesn\'t match LearningAssignmentRepresentation (at "' + path_assignments_item + '")\n';
|
|
3277
3277
|
message += referencepath_assignments_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -3494,24 +3494,24 @@ function validate$8(obj, path = 'LearningModelOutputRepresentation') {
|
|
|
3494
3494
|
})();
|
|
3495
3495
|
return v_error === undefined ? null : v_error;
|
|
3496
3496
|
}
|
|
3497
|
-
const RepresentationType$
|
|
3498
|
-
function keyBuilder$
|
|
3499
|
-
return keyPrefix + '::' + RepresentationType$
|
|
3497
|
+
const RepresentationType$3 = 'LearningModelOutputRepresentation';
|
|
3498
|
+
function keyBuilder$b(luvio, config) {
|
|
3499
|
+
return keyPrefix + '::' + RepresentationType$3 + ':' + (config.learning_item_id === null ? '' : config.learning_item_id);
|
|
3500
3500
|
}
|
|
3501
|
-
function keyBuilderFromType$
|
|
3501
|
+
function keyBuilderFromType$3(luvio, object) {
|
|
3502
3502
|
const keyParams = {
|
|
3503
3503
|
learning_item_id: object.id
|
|
3504
3504
|
};
|
|
3505
|
-
return keyBuilder$
|
|
3505
|
+
return keyBuilder$b(luvio, keyParams);
|
|
3506
3506
|
}
|
|
3507
|
-
function normalize$
|
|
3507
|
+
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
3508
3508
|
return input;
|
|
3509
3509
|
}
|
|
3510
|
-
const select$
|
|
3511
|
-
const { selections: LearningAssignmentRepresentation__selections, opaque: LearningAssignmentRepresentation__opaque, } = select$
|
|
3510
|
+
const select$9 = function LearningModelOutputRepresentationSelect() {
|
|
3511
|
+
const { selections: LearningAssignmentRepresentation__selections, opaque: LearningAssignmentRepresentation__opaque, } = select$a();
|
|
3512
3512
|
return {
|
|
3513
3513
|
kind: 'Fragment',
|
|
3514
|
-
version: VERSION$
|
|
3514
|
+
version: VERSION$5,
|
|
3515
3515
|
private: [],
|
|
3516
3516
|
selections: [
|
|
3517
3517
|
{
|
|
@@ -3568,7 +3568,7 @@ const select$e = function LearningModelOutputRepresentationSelect() {
|
|
|
3568
3568
|
]
|
|
3569
3569
|
};
|
|
3570
3570
|
};
|
|
3571
|
-
function equals$
|
|
3571
|
+
function equals$5(existing, incoming) {
|
|
3572
3572
|
const existing_description = existing.description;
|
|
3573
3573
|
const incoming_description = incoming.description;
|
|
3574
3574
|
if (!(existing_description === incoming_description)) {
|
|
@@ -3587,7 +3587,7 @@ function equals$8(existing, incoming) {
|
|
|
3587
3587
|
const existing_assignments = existing.assignments;
|
|
3588
3588
|
const incoming_assignments = incoming.assignments;
|
|
3589
3589
|
const equals_assignments_items = equalsArray(existing_assignments, incoming_assignments, (existing_assignments_item, incoming_assignments_item) => {
|
|
3590
|
-
if (!(equals$
|
|
3590
|
+
if (!(equals$6(existing_assignments_item, incoming_assignments_item))) {
|
|
3591
3591
|
return false;
|
|
3592
3592
|
}
|
|
3593
3593
|
});
|
|
@@ -3646,66 +3646,66 @@ function equals$8(existing, incoming) {
|
|
|
3646
3646
|
}
|
|
3647
3647
|
return true;
|
|
3648
3648
|
}
|
|
3649
|
-
const ingest$
|
|
3649
|
+
const ingest$3 = function LearningModelOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
3650
3650
|
if (process.env.NODE_ENV !== 'production') {
|
|
3651
|
-
const validateError = validate$
|
|
3651
|
+
const validateError = validate$5(input);
|
|
3652
3652
|
if (validateError !== null) {
|
|
3653
3653
|
throw validateError;
|
|
3654
3654
|
}
|
|
3655
3655
|
}
|
|
3656
|
-
const key = keyBuilderFromType$
|
|
3656
|
+
const key = keyBuilderFromType$3(luvio, input);
|
|
3657
3657
|
const existingRecord = store.readEntry(key);
|
|
3658
|
-
const ttlToUse = TTL$
|
|
3659
|
-
let incomingRecord = normalize$
|
|
3658
|
+
const ttlToUse = TTL$3;
|
|
3659
|
+
let incomingRecord = normalize$3(input, store.readEntry(key), {
|
|
3660
3660
|
fullPath: key,
|
|
3661
3661
|
parent: path.parent,
|
|
3662
3662
|
propertyName: path.propertyName,
|
|
3663
3663
|
ttl: ttlToUse
|
|
3664
3664
|
});
|
|
3665
|
-
if (existingRecord === undefined || equals$
|
|
3665
|
+
if (existingRecord === undefined || equals$5(existingRecord, incomingRecord) === false) {
|
|
3666
3666
|
luvio.storePublish(key, incomingRecord);
|
|
3667
3667
|
}
|
|
3668
3668
|
{
|
|
3669
3669
|
const storeMetadataParams = {
|
|
3670
3670
|
ttl: ttlToUse,
|
|
3671
3671
|
namespace: "LearningContentPlatform",
|
|
3672
|
-
version: VERSION$
|
|
3673
|
-
representationName: RepresentationType$
|
|
3672
|
+
version: VERSION$5,
|
|
3673
|
+
representationName: RepresentationType$3,
|
|
3674
3674
|
};
|
|
3675
3675
|
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
3676
3676
|
}
|
|
3677
3677
|
return createLink(key);
|
|
3678
3678
|
};
|
|
3679
|
-
function getTypeCacheKeys$
|
|
3679
|
+
function getTypeCacheKeys$3(luvio, input, fullPathFactory) {
|
|
3680
3680
|
const rootKeySet = new StoreKeyMap();
|
|
3681
3681
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
3682
|
-
const rootKey = keyBuilderFromType$
|
|
3682
|
+
const rootKey = keyBuilderFromType$3(luvio, input);
|
|
3683
3683
|
rootKeySet.set(rootKey, {
|
|
3684
3684
|
namespace: keyPrefix,
|
|
3685
|
-
representationName: RepresentationType$
|
|
3685
|
+
representationName: RepresentationType$3,
|
|
3686
3686
|
mergeable: false
|
|
3687
3687
|
});
|
|
3688
3688
|
return rootKeySet;
|
|
3689
3689
|
}
|
|
3690
3690
|
|
|
3691
|
-
function select$
|
|
3692
|
-
return select$
|
|
3691
|
+
function select$8(luvio, params) {
|
|
3692
|
+
return select$9();
|
|
3693
3693
|
}
|
|
3694
|
-
function keyBuilder$
|
|
3695
|
-
return keyBuilder$
|
|
3694
|
+
function keyBuilder$a(luvio, params) {
|
|
3695
|
+
return keyBuilder$b(luvio, {
|
|
3696
3696
|
learning_item_id: params.urlParams.learningItemId
|
|
3697
3697
|
});
|
|
3698
3698
|
}
|
|
3699
|
-
function getResponseCacheKeys$
|
|
3700
|
-
return getTypeCacheKeys$
|
|
3699
|
+
function getResponseCacheKeys$3(luvio, resourceParams, response) {
|
|
3700
|
+
return getTypeCacheKeys$3(luvio, response);
|
|
3701
3701
|
}
|
|
3702
|
-
function ingestSuccess$
|
|
3702
|
+
function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
3703
3703
|
const { body } = response;
|
|
3704
|
-
const key = keyBuilder$
|
|
3705
|
-
luvio.storeIngest(key, ingest$
|
|
3704
|
+
const key = keyBuilder$a(luvio, resourceParams);
|
|
3705
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
3706
3706
|
const snapshot = luvio.storeLookup({
|
|
3707
3707
|
recordId: key,
|
|
3708
|
-
node: select$
|
|
3708
|
+
node: select$8(),
|
|
3709
3709
|
variables: {},
|
|
3710
3710
|
}, snapshotRefresh);
|
|
3711
3711
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3716,19 +3716,19 @@ function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
3716
3716
|
deepFreeze(snapshot.data);
|
|
3717
3717
|
return snapshot;
|
|
3718
3718
|
}
|
|
3719
|
-
function ingestError$
|
|
3720
|
-
const key = keyBuilder$
|
|
3719
|
+
function ingestError$3(luvio, params, error, snapshotRefresh) {
|
|
3720
|
+
const key = keyBuilder$a(luvio, params);
|
|
3721
3721
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
3722
3722
|
const storeMetadataParams = {
|
|
3723
|
-
ttl: TTL$
|
|
3723
|
+
ttl: TTL$3,
|
|
3724
3724
|
namespace: keyPrefix,
|
|
3725
|
-
version: VERSION$
|
|
3726
|
-
representationName: RepresentationType$
|
|
3725
|
+
version: VERSION$5,
|
|
3726
|
+
representationName: RepresentationType$3
|
|
3727
3727
|
};
|
|
3728
3728
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
3729
3729
|
return errorSnapshot;
|
|
3730
3730
|
}
|
|
3731
|
-
function createResourceRequest$
|
|
3731
|
+
function createResourceRequest$3(config) {
|
|
3732
3732
|
const headers = {};
|
|
3733
3733
|
return {
|
|
3734
3734
|
baseUri: '/services/data/v59.0',
|
|
@@ -3749,7 +3749,7 @@ const getLearningModel_ConfigPropertyNames = {
|
|
|
3749
3749
|
optional: []
|
|
3750
3750
|
}
|
|
3751
3751
|
};
|
|
3752
|
-
function createResourceParams$
|
|
3752
|
+
function createResourceParams$3(config) {
|
|
3753
3753
|
const resourceParams = {
|
|
3754
3754
|
urlParams: {
|
|
3755
3755
|
learningItemId: config.learningItemId
|
|
@@ -3757,11 +3757,11 @@ function createResourceParams$5(config) {
|
|
|
3757
3757
|
};
|
|
3758
3758
|
return resourceParams;
|
|
3759
3759
|
}
|
|
3760
|
-
function keyBuilder$
|
|
3761
|
-
const resourceParams = createResourceParams$
|
|
3762
|
-
return keyBuilder$
|
|
3760
|
+
function keyBuilder$9(luvio, config) {
|
|
3761
|
+
const resourceParams = createResourceParams$3(config);
|
|
3762
|
+
return keyBuilder$a(luvio, resourceParams);
|
|
3763
3763
|
}
|
|
3764
|
-
function typeCheckConfig$
|
|
3764
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
3765
3765
|
const config = {};
|
|
3766
3766
|
const untrustedConfig_learningItemId = untrustedConfig.learningItemId;
|
|
3767
3767
|
if (typeof untrustedConfig_learningItemId === 'string') {
|
|
@@ -3769,750 +3769,40 @@ function typeCheckConfig$5(untrustedConfig) {
|
|
|
3769
3769
|
}
|
|
3770
3770
|
return config;
|
|
3771
3771
|
}
|
|
3772
|
-
function validateAdapterConfig$
|
|
3772
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
3773
3773
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
3774
3774
|
return null;
|
|
3775
3775
|
}
|
|
3776
3776
|
if (process.env.NODE_ENV !== 'production') {
|
|
3777
3777
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
3778
3778
|
}
|
|
3779
|
-
const config = typeCheckConfig$
|
|
3779
|
+
const config = typeCheckConfig$3(untrustedConfig);
|
|
3780
3780
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3781
3781
|
return null;
|
|
3782
3782
|
}
|
|
3783
3783
|
return config;
|
|
3784
3784
|
}
|
|
3785
|
-
function adapterFragment$
|
|
3786
|
-
createResourceParams$
|
|
3787
|
-
return select$
|
|
3785
|
+
function adapterFragment$3(luvio, config) {
|
|
3786
|
+
createResourceParams$3(config);
|
|
3787
|
+
return select$8();
|
|
3788
3788
|
}
|
|
3789
|
-
function onFetchResponseSuccess$
|
|
3790
|
-
const snapshot = ingestSuccess$
|
|
3789
|
+
function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
|
|
3790
|
+
const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
|
|
3791
3791
|
config,
|
|
3792
|
-
resolve: () => buildNetworkSnapshot$
|
|
3792
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
3793
3793
|
});
|
|
3794
3794
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3795
3795
|
}
|
|
3796
|
-
function onFetchResponseError$
|
|
3797
|
-
const snapshot = ingestError$
|
|
3796
|
+
function onFetchResponseError$3(luvio, config, resourceParams, response) {
|
|
3797
|
+
const snapshot = ingestError$3(luvio, resourceParams, response, {
|
|
3798
3798
|
config,
|
|
3799
|
-
resolve: () => buildNetworkSnapshot$
|
|
3800
|
-
});
|
|
3801
|
-
return luvio.storeBroadcast().then(() => snapshot);
|
|
3802
|
-
}
|
|
3803
|
-
function buildNetworkSnapshot$5(luvio, config, options) {
|
|
3804
|
-
const resourceParams = createResourceParams$5(config);
|
|
3805
|
-
const request = createResourceRequest$5(resourceParams);
|
|
3806
|
-
return luvio.dispatchResourceRequest(request, options)
|
|
3807
|
-
.then((response) => {
|
|
3808
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$5(luvio, config, resourceParams, response), () => getResponseCacheKeys$5(luvio, resourceParams, response.body));
|
|
3809
|
-
}, (response) => {
|
|
3810
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$5(luvio, config, resourceParams, response));
|
|
3811
|
-
});
|
|
3812
|
-
}
|
|
3813
|
-
function buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext) {
|
|
3814
|
-
const { luvio, config } = context;
|
|
3815
|
-
const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
|
|
3816
|
-
const dispatchOptions = {
|
|
3817
|
-
resourceRequestContext: {
|
|
3818
|
-
requestCorrelator,
|
|
3819
|
-
luvioRequestMethod: undefined,
|
|
3820
|
-
},
|
|
3821
|
-
eventObservers
|
|
3822
|
-
};
|
|
3823
|
-
if (networkPriority !== 'normal') {
|
|
3824
|
-
dispatchOptions.overrides = {
|
|
3825
|
-
priority: networkPriority
|
|
3826
|
-
};
|
|
3827
|
-
}
|
|
3828
|
-
return buildNetworkSnapshot$5(luvio, config, dispatchOptions);
|
|
3829
|
-
}
|
|
3830
|
-
function buildCachedSnapshotCachePolicy$5(context, storeLookup) {
|
|
3831
|
-
const { luvio, config } = context;
|
|
3832
|
-
const selector = {
|
|
3833
|
-
recordId: keyBuilder$f(luvio, config),
|
|
3834
|
-
node: adapterFragment$5(luvio, config),
|
|
3835
|
-
variables: {},
|
|
3836
|
-
};
|
|
3837
|
-
const cacheSnapshot = storeLookup(selector, {
|
|
3838
|
-
config,
|
|
3839
|
-
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
3840
|
-
});
|
|
3841
|
-
return cacheSnapshot;
|
|
3842
|
-
}
|
|
3843
|
-
const getLearningModelAdapterFactory = (luvio) => function LearningContentPlatform__getLearningModel(untrustedConfig, requestContext) {
|
|
3844
|
-
const config = validateAdapterConfig$5(untrustedConfig, getLearningModel_ConfigPropertyNames);
|
|
3845
|
-
// Invalid or incomplete config
|
|
3846
|
-
if (config === null) {
|
|
3847
|
-
return null;
|
|
3848
|
-
}
|
|
3849
|
-
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
3850
|
-
buildCachedSnapshotCachePolicy$5, buildNetworkSnapshotCachePolicy$5);
|
|
3851
|
-
};
|
|
3852
|
-
|
|
3853
|
-
const TTL$4 = 60000;
|
|
3854
|
-
const VERSION$7 = "44b044bb4e3eff4d2c834cdb80b9a043";
|
|
3855
|
-
function validate$7(obj, path = 'LearningPracticeRepresentation') {
|
|
3856
|
-
const v_error = (() => {
|
|
3857
|
-
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3858
|
-
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
3859
|
-
}
|
|
3860
|
-
const obj_description = obj.description;
|
|
3861
|
-
const path_description = path + '.description';
|
|
3862
|
-
if (typeof obj_description !== 'string') {
|
|
3863
|
-
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
3864
|
-
}
|
|
3865
|
-
const obj_learningItemId = obj.learningItemId;
|
|
3866
|
-
const path_learningItemId = path + '.learningItemId';
|
|
3867
|
-
if (typeof obj_learningItemId !== 'string') {
|
|
3868
|
-
return new TypeError('Expected "string" but received "' + typeof obj_learningItemId + '" (at "' + path_learningItemId + '")');
|
|
3869
|
-
}
|
|
3870
|
-
const obj_minimumInviteeQuantity = obj.minimumInviteeQuantity;
|
|
3871
|
-
const path_minimumInviteeQuantity = path + '.minimumInviteeQuantity';
|
|
3872
|
-
if (typeof obj_minimumInviteeQuantity !== 'number' || (typeof obj_minimumInviteeQuantity === 'number' && Math.floor(obj_minimumInviteeQuantity) !== obj_minimumInviteeQuantity)) {
|
|
3873
|
-
return new TypeError('Expected "integer" but received "' + typeof obj_minimumInviteeQuantity + '" (at "' + path_minimumInviteeQuantity + '")');
|
|
3874
|
-
}
|
|
3875
|
-
const obj_surveyId = obj.surveyId;
|
|
3876
|
-
const path_surveyId = path + '.surveyId';
|
|
3877
|
-
if (typeof obj_surveyId !== 'string') {
|
|
3878
|
-
return new TypeError('Expected "string" but received "' + typeof obj_surveyId + '" (at "' + path_surveyId + '")');
|
|
3879
|
-
}
|
|
3880
|
-
const obj_title = obj.title;
|
|
3881
|
-
const path_title = path + '.title';
|
|
3882
|
-
if (typeof obj_title !== 'string') {
|
|
3883
|
-
return new TypeError('Expected "string" but received "' + typeof obj_title + '" (at "' + path_title + '")');
|
|
3884
|
-
}
|
|
3885
|
-
})();
|
|
3886
|
-
return v_error === undefined ? null : v_error;
|
|
3887
|
-
}
|
|
3888
|
-
const RepresentationType$5 = 'LearningPracticeRepresentation';
|
|
3889
|
-
function keyBuilder$e(luvio, config) {
|
|
3890
|
-
return keyPrefix + '::' + RepresentationType$5 + ':' + config.learning_item_id;
|
|
3891
|
-
}
|
|
3892
|
-
function keyBuilderFromType$4(luvio, object) {
|
|
3893
|
-
const keyParams = {
|
|
3894
|
-
learning_item_id: object.learningItemId
|
|
3895
|
-
};
|
|
3896
|
-
return keyBuilder$e(luvio, keyParams);
|
|
3897
|
-
}
|
|
3898
|
-
function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
3899
|
-
return input;
|
|
3900
|
-
}
|
|
3901
|
-
const select$c = function LearningPracticeRepresentationSelect() {
|
|
3902
|
-
return {
|
|
3903
|
-
kind: 'Fragment',
|
|
3904
|
-
version: VERSION$7,
|
|
3905
|
-
private: [],
|
|
3906
|
-
selections: [
|
|
3907
|
-
{
|
|
3908
|
-
name: 'description',
|
|
3909
|
-
kind: 'Scalar'
|
|
3910
|
-
},
|
|
3911
|
-
{
|
|
3912
|
-
name: 'learningItemId',
|
|
3913
|
-
kind: 'Scalar'
|
|
3914
|
-
},
|
|
3915
|
-
{
|
|
3916
|
-
name: 'minimumInviteeQuantity',
|
|
3917
|
-
kind: 'Scalar'
|
|
3918
|
-
},
|
|
3919
|
-
{
|
|
3920
|
-
name: 'surveyId',
|
|
3921
|
-
kind: 'Scalar'
|
|
3922
|
-
},
|
|
3923
|
-
{
|
|
3924
|
-
name: 'title',
|
|
3925
|
-
kind: 'Scalar'
|
|
3926
|
-
}
|
|
3927
|
-
]
|
|
3928
|
-
};
|
|
3929
|
-
};
|
|
3930
|
-
function equals$7(existing, incoming) {
|
|
3931
|
-
const existing_minimumInviteeQuantity = existing.minimumInviteeQuantity;
|
|
3932
|
-
const incoming_minimumInviteeQuantity = incoming.minimumInviteeQuantity;
|
|
3933
|
-
if (!(existing_minimumInviteeQuantity === incoming_minimumInviteeQuantity)) {
|
|
3934
|
-
return false;
|
|
3935
|
-
}
|
|
3936
|
-
const existing_description = existing.description;
|
|
3937
|
-
const incoming_description = incoming.description;
|
|
3938
|
-
if (!(existing_description === incoming_description)) {
|
|
3939
|
-
return false;
|
|
3940
|
-
}
|
|
3941
|
-
const existing_learningItemId = existing.learningItemId;
|
|
3942
|
-
const incoming_learningItemId = incoming.learningItemId;
|
|
3943
|
-
if (!(existing_learningItemId === incoming_learningItemId)) {
|
|
3944
|
-
return false;
|
|
3945
|
-
}
|
|
3946
|
-
const existing_surveyId = existing.surveyId;
|
|
3947
|
-
const incoming_surveyId = incoming.surveyId;
|
|
3948
|
-
if (!(existing_surveyId === incoming_surveyId)) {
|
|
3949
|
-
return false;
|
|
3950
|
-
}
|
|
3951
|
-
const existing_title = existing.title;
|
|
3952
|
-
const incoming_title = incoming.title;
|
|
3953
|
-
if (!(existing_title === incoming_title)) {
|
|
3954
|
-
return false;
|
|
3955
|
-
}
|
|
3956
|
-
return true;
|
|
3957
|
-
}
|
|
3958
|
-
const ingest$5 = function LearningPracticeRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
3959
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
3960
|
-
const validateError = validate$7(input);
|
|
3961
|
-
if (validateError !== null) {
|
|
3962
|
-
throw validateError;
|
|
3963
|
-
}
|
|
3964
|
-
}
|
|
3965
|
-
const key = keyBuilderFromType$4(luvio, input);
|
|
3966
|
-
const existingRecord = store.readEntry(key);
|
|
3967
|
-
const ttlToUse = TTL$4;
|
|
3968
|
-
let incomingRecord = normalize$5(input, store.readEntry(key), {
|
|
3969
|
-
fullPath: key,
|
|
3970
|
-
parent: path.parent,
|
|
3971
|
-
propertyName: path.propertyName,
|
|
3972
|
-
ttl: ttlToUse
|
|
3973
|
-
});
|
|
3974
|
-
if (existingRecord === undefined || equals$7(existingRecord, incomingRecord) === false) {
|
|
3975
|
-
luvio.storePublish(key, incomingRecord);
|
|
3976
|
-
}
|
|
3977
|
-
{
|
|
3978
|
-
const storeMetadataParams = {
|
|
3979
|
-
ttl: ttlToUse,
|
|
3980
|
-
namespace: "LearningContentPlatform",
|
|
3981
|
-
version: VERSION$7,
|
|
3982
|
-
representationName: RepresentationType$5,
|
|
3983
|
-
};
|
|
3984
|
-
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
3985
|
-
}
|
|
3986
|
-
return createLink(key);
|
|
3987
|
-
};
|
|
3988
|
-
function getTypeCacheKeys$5(luvio, input, fullPathFactory) {
|
|
3989
|
-
const rootKeySet = new StoreKeyMap();
|
|
3990
|
-
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
3991
|
-
const rootKey = keyBuilderFromType$4(luvio, input);
|
|
3992
|
-
rootKeySet.set(rootKey, {
|
|
3993
|
-
namespace: keyPrefix,
|
|
3994
|
-
representationName: RepresentationType$5,
|
|
3995
|
-
mergeable: false
|
|
3996
|
-
});
|
|
3997
|
-
return rootKeySet;
|
|
3998
|
-
}
|
|
3999
|
-
|
|
4000
|
-
function select$b(luvio, params) {
|
|
4001
|
-
return select$c();
|
|
4002
|
-
}
|
|
4003
|
-
function keyBuilder$d(luvio, params) {
|
|
4004
|
-
return keyBuilder$e(luvio, {
|
|
4005
|
-
learning_item_id: params.urlParams.learningItemId
|
|
4006
|
-
});
|
|
4007
|
-
}
|
|
4008
|
-
function getResponseCacheKeys$4(luvio, resourceParams, response) {
|
|
4009
|
-
return getTypeCacheKeys$5(luvio, response);
|
|
4010
|
-
}
|
|
4011
|
-
function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
4012
|
-
const { body } = response;
|
|
4013
|
-
const key = keyBuilder$d(luvio, resourceParams);
|
|
4014
|
-
luvio.storeIngest(key, ingest$5, body);
|
|
4015
|
-
const snapshot = luvio.storeLookup({
|
|
4016
|
-
recordId: key,
|
|
4017
|
-
node: select$b(),
|
|
4018
|
-
variables: {},
|
|
4019
|
-
}, snapshotRefresh);
|
|
4020
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
4021
|
-
if (snapshot.state !== 'Fulfilled') {
|
|
4022
|
-
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
4023
|
-
}
|
|
4024
|
-
}
|
|
4025
|
-
deepFreeze(snapshot.data);
|
|
4026
|
-
return snapshot;
|
|
4027
|
-
}
|
|
4028
|
-
function ingestError$4(luvio, params, error, snapshotRefresh) {
|
|
4029
|
-
const key = keyBuilder$d(luvio, params);
|
|
4030
|
-
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
4031
|
-
const storeMetadataParams = {
|
|
4032
|
-
ttl: TTL$4,
|
|
4033
|
-
namespace: keyPrefix,
|
|
4034
|
-
version: VERSION$7,
|
|
4035
|
-
representationName: RepresentationType$5
|
|
4036
|
-
};
|
|
4037
|
-
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
4038
|
-
return errorSnapshot;
|
|
4039
|
-
}
|
|
4040
|
-
function createResourceRequest$4(config) {
|
|
4041
|
-
const headers = {};
|
|
4042
|
-
return {
|
|
4043
|
-
baseUri: '/services/data/v59.0',
|
|
4044
|
-
basePath: '/learning-content-platform/learning/practice/' + config.urlParams.learningItemId + '',
|
|
4045
|
-
method: 'get',
|
|
4046
|
-
body: null,
|
|
4047
|
-
urlParams: config.urlParams,
|
|
4048
|
-
queryParams: {},
|
|
4049
|
-
headers,
|
|
4050
|
-
priority: 'normal',
|
|
4051
|
-
};
|
|
4052
|
-
}
|
|
4053
|
-
function createResourceRequestFromRepresentation$3(representation) {
|
|
4054
|
-
const config = {
|
|
4055
|
-
urlParams: {},
|
|
4056
|
-
};
|
|
4057
|
-
config.urlParams.learningItemId = representation.learningItemId;
|
|
4058
|
-
return createResourceRequest$4(config);
|
|
4059
|
-
}
|
|
4060
|
-
|
|
4061
|
-
const getLearningPractice_ConfigPropertyNames = {
|
|
4062
|
-
displayName: 'getLearningPractice',
|
|
4063
|
-
parameters: {
|
|
4064
|
-
required: ['learningItemId'],
|
|
4065
|
-
optional: []
|
|
4066
|
-
}
|
|
4067
|
-
};
|
|
4068
|
-
function createResourceParams$4(config) {
|
|
4069
|
-
const resourceParams = {
|
|
4070
|
-
urlParams: {
|
|
4071
|
-
learningItemId: config.learningItemId
|
|
4072
|
-
}
|
|
4073
|
-
};
|
|
4074
|
-
return resourceParams;
|
|
4075
|
-
}
|
|
4076
|
-
function keyBuilder$c(luvio, config) {
|
|
4077
|
-
const resourceParams = createResourceParams$4(config);
|
|
4078
|
-
return keyBuilder$d(luvio, resourceParams);
|
|
4079
|
-
}
|
|
4080
|
-
function typeCheckConfig$4(untrustedConfig) {
|
|
4081
|
-
const config = {};
|
|
4082
|
-
const untrustedConfig_learningItemId = untrustedConfig.learningItemId;
|
|
4083
|
-
if (typeof untrustedConfig_learningItemId === 'string') {
|
|
4084
|
-
config.learningItemId = untrustedConfig_learningItemId;
|
|
4085
|
-
}
|
|
4086
|
-
return config;
|
|
4087
|
-
}
|
|
4088
|
-
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
4089
|
-
if (!untrustedIsObject(untrustedConfig)) {
|
|
4090
|
-
return null;
|
|
4091
|
-
}
|
|
4092
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
4093
|
-
validateConfig(untrustedConfig, configPropertyNames);
|
|
4094
|
-
}
|
|
4095
|
-
const config = typeCheckConfig$4(untrustedConfig);
|
|
4096
|
-
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
4097
|
-
return null;
|
|
4098
|
-
}
|
|
4099
|
-
return config;
|
|
4100
|
-
}
|
|
4101
|
-
function adapterFragment$4(luvio, config) {
|
|
4102
|
-
createResourceParams$4(config);
|
|
4103
|
-
return select$b();
|
|
4104
|
-
}
|
|
4105
|
-
function onFetchResponseSuccess$4(luvio, config, resourceParams, response) {
|
|
4106
|
-
const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
|
|
4107
|
-
config,
|
|
4108
|
-
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
4109
|
-
});
|
|
4110
|
-
return luvio.storeBroadcast().then(() => snapshot);
|
|
4111
|
-
}
|
|
4112
|
-
function onFetchResponseError$4(luvio, config, resourceParams, response) {
|
|
4113
|
-
const snapshot = ingestError$4(luvio, resourceParams, response, {
|
|
4114
|
-
config,
|
|
4115
|
-
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
4116
|
-
});
|
|
4117
|
-
return luvio.storeBroadcast().then(() => snapshot);
|
|
4118
|
-
}
|
|
4119
|
-
function buildNetworkSnapshot$4(luvio, config, options) {
|
|
4120
|
-
const resourceParams = createResourceParams$4(config);
|
|
4121
|
-
const request = createResourceRequest$4(resourceParams);
|
|
4122
|
-
return luvio.dispatchResourceRequest(request, options)
|
|
4123
|
-
.then((response) => {
|
|
4124
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$4(luvio, config, resourceParams, response), () => getResponseCacheKeys$4(luvio, resourceParams, response.body));
|
|
4125
|
-
}, (response) => {
|
|
4126
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$4(luvio, config, resourceParams, response));
|
|
4127
|
-
});
|
|
4128
|
-
}
|
|
4129
|
-
function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
|
|
4130
|
-
const { luvio, config } = context;
|
|
4131
|
-
const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
|
|
4132
|
-
const dispatchOptions = {
|
|
4133
|
-
resourceRequestContext: {
|
|
4134
|
-
requestCorrelator,
|
|
4135
|
-
luvioRequestMethod: undefined,
|
|
4136
|
-
},
|
|
4137
|
-
eventObservers
|
|
4138
|
-
};
|
|
4139
|
-
if (networkPriority !== 'normal') {
|
|
4140
|
-
dispatchOptions.overrides = {
|
|
4141
|
-
priority: networkPriority
|
|
4142
|
-
};
|
|
4143
|
-
}
|
|
4144
|
-
return buildNetworkSnapshot$4(luvio, config, dispatchOptions);
|
|
4145
|
-
}
|
|
4146
|
-
function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
|
|
4147
|
-
const { luvio, config } = context;
|
|
4148
|
-
const selector = {
|
|
4149
|
-
recordId: keyBuilder$c(luvio, config),
|
|
4150
|
-
node: adapterFragment$4(luvio, config),
|
|
4151
|
-
variables: {},
|
|
4152
|
-
};
|
|
4153
|
-
const cacheSnapshot = storeLookup(selector, {
|
|
4154
|
-
config,
|
|
4155
|
-
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
4156
|
-
});
|
|
4157
|
-
return cacheSnapshot;
|
|
4158
|
-
}
|
|
4159
|
-
const getLearningPracticeAdapterFactory = (luvio) => function LearningContentPlatform__getLearningPractice(untrustedConfig, requestContext) {
|
|
4160
|
-
const config = validateAdapterConfig$4(untrustedConfig, getLearningPractice_ConfigPropertyNames);
|
|
4161
|
-
// Invalid or incomplete config
|
|
4162
|
-
if (config === null) {
|
|
4163
|
-
return null;
|
|
4164
|
-
}
|
|
4165
|
-
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
4166
|
-
buildCachedSnapshotCachePolicy$4, buildNetworkSnapshotCachePolicy$4);
|
|
4167
|
-
};
|
|
4168
|
-
const notifyChangeFactory$3 = (luvio, options) => {
|
|
4169
|
-
return function getLearningContentPlatformLearningPracticeByLearningItemIdNotifyChange(configs) {
|
|
4170
|
-
const keys = configs.map(c => keyBuilder$e(luvio, c));
|
|
4171
|
-
luvio.getNotifyChangeStoreEntries(keys).then(entries => {
|
|
4172
|
-
for (let i = 0, len = entries.length; i < len; i++) {
|
|
4173
|
-
const { key, record: val } = entries[i];
|
|
4174
|
-
const refreshRequest = createResourceRequestFromRepresentation$3(val);
|
|
4175
|
-
luvio.dispatchResourceRequest(refreshRequest, options)
|
|
4176
|
-
.then((response) => {
|
|
4177
|
-
return luvio.handleSuccessResponse(() => {
|
|
4178
|
-
const { body } = response;
|
|
4179
|
-
luvio.storeIngest(key, ingest$5, body);
|
|
4180
|
-
return luvio.storeBroadcast();
|
|
4181
|
-
}, () => getTypeCacheKeys$5(luvio, response.body));
|
|
4182
|
-
}, (error) => {
|
|
4183
|
-
return luvio.handleErrorResponse(() => {
|
|
4184
|
-
const errorSnapshot = luvio.errorSnapshot(error);
|
|
4185
|
-
luvio.storeIngestError(key, errorSnapshot, {
|
|
4186
|
-
ttl: TTL$4,
|
|
4187
|
-
namespace: keyPrefix,
|
|
4188
|
-
version: VERSION$7,
|
|
4189
|
-
representationName: RepresentationType$5
|
|
4190
|
-
});
|
|
4191
|
-
return luvio.storeBroadcast().then(() => errorSnapshot);
|
|
4192
|
-
});
|
|
4193
|
-
});
|
|
4194
|
-
}
|
|
4195
|
-
});
|
|
4196
|
-
};
|
|
4197
|
-
};
|
|
4198
|
-
|
|
4199
|
-
const TTL$3 = 21600000;
|
|
4200
|
-
const VERSION$6 = "c365cdb9357c26a64f8a92d93a07daea";
|
|
4201
|
-
function validate$6(obj, path = 'LearningSearchDescribeContentRepresentation') {
|
|
4202
|
-
const v_error = (() => {
|
|
4203
|
-
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
4204
|
-
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
4205
|
-
}
|
|
4206
|
-
const obj_title = obj.title;
|
|
4207
|
-
const path_title = path + '.title';
|
|
4208
|
-
if (typeof obj_title !== 'string') {
|
|
4209
|
-
return new TypeError('Expected "string" but received "' + typeof obj_title + '" (at "' + path_title + '")');
|
|
4210
|
-
}
|
|
4211
|
-
const obj_type = obj.type;
|
|
4212
|
-
const path_type = path + '.type';
|
|
4213
|
-
if (typeof obj_type !== 'string') {
|
|
4214
|
-
return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
|
|
4215
|
-
}
|
|
4216
|
-
})();
|
|
4217
|
-
return v_error === undefined ? null : v_error;
|
|
4218
|
-
}
|
|
4219
|
-
const RepresentationType$4 = 'LearningSearchDescribeContentRepresentation';
|
|
4220
|
-
function keyBuilder$b(luvio, config) {
|
|
4221
|
-
return keyPrefix + '::' + RepresentationType$4 + ':' + config.type;
|
|
4222
|
-
}
|
|
4223
|
-
function keyBuilderFromType$3(luvio, object) {
|
|
4224
|
-
const keyParams = {
|
|
4225
|
-
type: object.type
|
|
4226
|
-
};
|
|
4227
|
-
return keyBuilder$b(luvio, keyParams);
|
|
4228
|
-
}
|
|
4229
|
-
function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
4230
|
-
return input;
|
|
4231
|
-
}
|
|
4232
|
-
const select$a = function LearningSearchDescribeContentRepresentationSelect() {
|
|
4233
|
-
return {
|
|
4234
|
-
kind: 'Fragment',
|
|
4235
|
-
version: VERSION$6,
|
|
4236
|
-
private: [],
|
|
4237
|
-
selections: [
|
|
4238
|
-
{
|
|
4239
|
-
name: 'title',
|
|
4240
|
-
kind: 'Scalar'
|
|
4241
|
-
},
|
|
4242
|
-
{
|
|
4243
|
-
name: 'type',
|
|
4244
|
-
kind: 'Scalar'
|
|
4245
|
-
}
|
|
4246
|
-
]
|
|
4247
|
-
};
|
|
4248
|
-
};
|
|
4249
|
-
function equals$6(existing, incoming) {
|
|
4250
|
-
const existing_title = existing.title;
|
|
4251
|
-
const incoming_title = incoming.title;
|
|
4252
|
-
if (!(existing_title === incoming_title)) {
|
|
4253
|
-
return false;
|
|
4254
|
-
}
|
|
4255
|
-
const existing_type = existing.type;
|
|
4256
|
-
const incoming_type = incoming.type;
|
|
4257
|
-
if (!(existing_type === incoming_type)) {
|
|
4258
|
-
return false;
|
|
4259
|
-
}
|
|
4260
|
-
return true;
|
|
4261
|
-
}
|
|
4262
|
-
const ingest$4 = function LearningSearchDescribeContentRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
4263
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
4264
|
-
const validateError = validate$6(input);
|
|
4265
|
-
if (validateError !== null) {
|
|
4266
|
-
throw validateError;
|
|
4267
|
-
}
|
|
4268
|
-
}
|
|
4269
|
-
const key = keyBuilderFromType$3(luvio, input);
|
|
4270
|
-
const existingRecord = store.readEntry(key);
|
|
4271
|
-
const ttlToUse = TTL$3;
|
|
4272
|
-
let incomingRecord = normalize$4(input, store.readEntry(key), {
|
|
4273
|
-
fullPath: key,
|
|
4274
|
-
parent: path.parent,
|
|
4275
|
-
propertyName: path.propertyName,
|
|
4276
|
-
ttl: ttlToUse
|
|
4277
|
-
});
|
|
4278
|
-
if (existingRecord === undefined || equals$6(existingRecord, incomingRecord) === false) {
|
|
4279
|
-
luvio.storePublish(key, incomingRecord);
|
|
4280
|
-
}
|
|
4281
|
-
{
|
|
4282
|
-
const storeMetadataParams = {
|
|
4283
|
-
ttl: ttlToUse,
|
|
4284
|
-
namespace: "LearningContentPlatform",
|
|
4285
|
-
version: VERSION$6,
|
|
4286
|
-
representationName: RepresentationType$4,
|
|
4287
|
-
};
|
|
4288
|
-
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
4289
|
-
}
|
|
4290
|
-
return createLink(key);
|
|
4291
|
-
};
|
|
4292
|
-
function getTypeCacheKeys$4(luvio, input, fullPathFactory) {
|
|
4293
|
-
const rootKeySet = new StoreKeyMap();
|
|
4294
|
-
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
4295
|
-
const rootKey = keyBuilderFromType$3(luvio, input);
|
|
4296
|
-
rootKeySet.set(rootKey, {
|
|
4297
|
-
namespace: keyPrefix,
|
|
4298
|
-
representationName: RepresentationType$4,
|
|
4299
|
-
mergeable: false
|
|
4300
|
-
});
|
|
4301
|
-
return rootKeySet;
|
|
4302
|
-
}
|
|
4303
|
-
|
|
4304
|
-
const VERSION$5 = "efe7f2c47826ec8055be54360b646e19";
|
|
4305
|
-
function validate$5(obj, path = 'LearningSearchDescribeRepresentation') {
|
|
4306
|
-
const v_error = (() => {
|
|
4307
|
-
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
4308
|
-
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
4309
|
-
}
|
|
4310
|
-
const obj_contentTypes = obj.contentTypes;
|
|
4311
|
-
const path_contentTypes = path + '.contentTypes';
|
|
4312
|
-
if (!ArrayIsArray(obj_contentTypes)) {
|
|
4313
|
-
return new TypeError('Expected "array" but received "' + typeof obj_contentTypes + '" (at "' + path_contentTypes + '")');
|
|
4314
|
-
}
|
|
4315
|
-
for (let i = 0; i < obj_contentTypes.length; i++) {
|
|
4316
|
-
const obj_contentTypes_item = obj_contentTypes[i];
|
|
4317
|
-
const path_contentTypes_item = path_contentTypes + '[' + i + ']';
|
|
4318
|
-
if (typeof obj_contentTypes_item !== 'object') {
|
|
4319
|
-
return new TypeError('Expected "object" but received "' + typeof obj_contentTypes_item + '" (at "' + path_contentTypes_item + '")');
|
|
4320
|
-
}
|
|
4321
|
-
}
|
|
4322
|
-
})();
|
|
4323
|
-
return v_error === undefined ? null : v_error;
|
|
4324
|
-
}
|
|
4325
|
-
const RepresentationType$3 = 'LearningSearchDescribeRepresentation';
|
|
4326
|
-
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
4327
|
-
const input_contentTypes = input.contentTypes;
|
|
4328
|
-
const input_contentTypes_id = path.fullPath + '__contentTypes';
|
|
4329
|
-
for (let i = 0; i < input_contentTypes.length; i++) {
|
|
4330
|
-
const input_contentTypes_item = input_contentTypes[i];
|
|
4331
|
-
let input_contentTypes_item_id = input_contentTypes_id + '__' + i;
|
|
4332
|
-
input_contentTypes[i] = ingest$4(input_contentTypes_item, {
|
|
4333
|
-
fullPath: input_contentTypes_item_id,
|
|
4334
|
-
propertyName: i,
|
|
4335
|
-
parent: {
|
|
4336
|
-
data: input,
|
|
4337
|
-
key: path.fullPath,
|
|
4338
|
-
existing: existing,
|
|
4339
|
-
},
|
|
4340
|
-
ttl: path.ttl
|
|
4341
|
-
}, luvio, store);
|
|
4342
|
-
}
|
|
4343
|
-
return input;
|
|
4344
|
-
}
|
|
4345
|
-
const select$9 = function LearningSearchDescribeRepresentationSelect() {
|
|
4346
|
-
return {
|
|
4347
|
-
kind: 'Fragment',
|
|
4348
|
-
version: VERSION$5,
|
|
4349
|
-
private: [],
|
|
4350
|
-
selections: [
|
|
4351
|
-
{
|
|
4352
|
-
name: 'contentTypes',
|
|
4353
|
-
kind: 'Link',
|
|
4354
|
-
plural: true,
|
|
4355
|
-
fragment: select$a()
|
|
4356
|
-
}
|
|
4357
|
-
]
|
|
4358
|
-
};
|
|
4359
|
-
};
|
|
4360
|
-
function equals$5(existing, incoming) {
|
|
4361
|
-
const existing_contentTypes = existing.contentTypes;
|
|
4362
|
-
const incoming_contentTypes = incoming.contentTypes;
|
|
4363
|
-
const equals_contentTypes_items = equalsArray(existing_contentTypes, incoming_contentTypes, (existing_contentTypes_item, incoming_contentTypes_item) => {
|
|
4364
|
-
if (!(existing_contentTypes_item.__ref === incoming_contentTypes_item.__ref)) {
|
|
4365
|
-
return false;
|
|
4366
|
-
}
|
|
4367
|
-
});
|
|
4368
|
-
if (equals_contentTypes_items === false) {
|
|
4369
|
-
return false;
|
|
4370
|
-
}
|
|
4371
|
-
return true;
|
|
4372
|
-
}
|
|
4373
|
-
const ingest$3 = function LearningSearchDescribeRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
4374
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
4375
|
-
const validateError = validate$5(input);
|
|
4376
|
-
if (validateError !== null) {
|
|
4377
|
-
throw validateError;
|
|
4378
|
-
}
|
|
4379
|
-
}
|
|
4380
|
-
const key = path.fullPath;
|
|
4381
|
-
const existingRecord = store.readEntry(key);
|
|
4382
|
-
const ttlToUse = path.ttl !== undefined ? path.ttl : 2592000000;
|
|
4383
|
-
let incomingRecord = normalize$3(input, store.readEntry(key), {
|
|
4384
|
-
fullPath: key,
|
|
4385
|
-
parent: path.parent,
|
|
4386
|
-
propertyName: path.propertyName,
|
|
4387
|
-
ttl: ttlToUse
|
|
4388
|
-
}, luvio, store);
|
|
4389
|
-
if (existingRecord === undefined || equals$5(existingRecord, incomingRecord) === false) {
|
|
4390
|
-
luvio.storePublish(key, incomingRecord);
|
|
4391
|
-
}
|
|
4392
|
-
if (ttlToUse !== undefined) {
|
|
4393
|
-
const storeMetadataParams = {
|
|
4394
|
-
ttl: ttlToUse,
|
|
4395
|
-
namespace: "LearningContentPlatform",
|
|
4396
|
-
version: VERSION$5,
|
|
4397
|
-
representationName: RepresentationType$3,
|
|
4398
|
-
};
|
|
4399
|
-
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
4400
|
-
}
|
|
4401
|
-
return createLink(key);
|
|
4402
|
-
};
|
|
4403
|
-
function getTypeCacheKeys$3(luvio, input, fullPathFactory) {
|
|
4404
|
-
const rootKeySet = new StoreKeyMap();
|
|
4405
|
-
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
4406
|
-
const rootKey = fullPathFactory();
|
|
4407
|
-
rootKeySet.set(rootKey, {
|
|
4408
|
-
namespace: keyPrefix,
|
|
4409
|
-
representationName: RepresentationType$3,
|
|
4410
|
-
mergeable: false
|
|
4411
|
-
});
|
|
4412
|
-
const input_contentTypes_length = input.contentTypes.length;
|
|
4413
|
-
for (let i = 0; i < input_contentTypes_length; i++) {
|
|
4414
|
-
rootKeySet.merge(getTypeCacheKeys$4(luvio, input.contentTypes[i]));
|
|
4415
|
-
}
|
|
4416
|
-
return rootKeySet;
|
|
4417
|
-
}
|
|
4418
|
-
|
|
4419
|
-
function select$8(luvio, params) {
|
|
4420
|
-
return select$9();
|
|
4421
|
-
}
|
|
4422
|
-
function keyBuilder$a(luvio, params) {
|
|
4423
|
-
return keyPrefix + '::LearningSearchDescribeRepresentation:(' + ')';
|
|
4424
|
-
}
|
|
4425
|
-
function getResponseCacheKeys$3(luvio, resourceParams, response) {
|
|
4426
|
-
return getTypeCacheKeys$3(luvio, response, () => keyBuilder$a());
|
|
4427
|
-
}
|
|
4428
|
-
function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
4429
|
-
const { body } = response;
|
|
4430
|
-
const key = keyBuilder$a();
|
|
4431
|
-
luvio.storeIngest(key, ingest$3, body);
|
|
4432
|
-
const snapshot = luvio.storeLookup({
|
|
4433
|
-
recordId: key,
|
|
4434
|
-
node: select$8(),
|
|
4435
|
-
variables: {},
|
|
4436
|
-
}, snapshotRefresh);
|
|
4437
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
4438
|
-
if (snapshot.state !== 'Fulfilled') {
|
|
4439
|
-
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
4440
|
-
}
|
|
4441
|
-
}
|
|
4442
|
-
deepFreeze(snapshot.data);
|
|
4443
|
-
return snapshot;
|
|
4444
|
-
}
|
|
4445
|
-
function ingestError$3(luvio, params, error, snapshotRefresh) {
|
|
4446
|
-
const key = keyBuilder$a();
|
|
4447
|
-
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
4448
|
-
luvio.storeIngestError(key, errorSnapshot);
|
|
4449
|
-
return errorSnapshot;
|
|
4450
|
-
}
|
|
4451
|
-
function createResourceRequest$3(config) {
|
|
4452
|
-
const headers = {};
|
|
4453
|
-
return {
|
|
4454
|
-
baseUri: '/services/data/v59.0',
|
|
4455
|
-
basePath: '/learning-content-platform/learning/search/describe',
|
|
4456
|
-
method: 'get',
|
|
4457
|
-
body: null,
|
|
4458
|
-
urlParams: {},
|
|
4459
|
-
queryParams: {},
|
|
4460
|
-
headers,
|
|
4461
|
-
priority: 'normal',
|
|
4462
|
-
};
|
|
4463
|
-
}
|
|
4464
|
-
|
|
4465
|
-
const getLearningSearchDescribe_ConfigPropertyNames = {
|
|
4466
|
-
displayName: 'getLearningSearchDescribe',
|
|
4467
|
-
parameters: {
|
|
4468
|
-
required: [],
|
|
4469
|
-
optional: []
|
|
4470
|
-
}
|
|
4471
|
-
};
|
|
4472
|
-
function createResourceParams$3(config) {
|
|
4473
|
-
const resourceParams = {};
|
|
4474
|
-
return resourceParams;
|
|
4475
|
-
}
|
|
4476
|
-
function keyBuilder$9(luvio, config) {
|
|
4477
|
-
return keyBuilder$a();
|
|
4478
|
-
}
|
|
4479
|
-
function typeCheckConfig$3(untrustedConfig) {
|
|
4480
|
-
const config = {};
|
|
4481
|
-
return config;
|
|
4482
|
-
}
|
|
4483
|
-
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
4484
|
-
if (!untrustedIsObject(untrustedConfig)) {
|
|
4485
|
-
return null;
|
|
4486
|
-
}
|
|
4487
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
4488
|
-
validateConfig(untrustedConfig, configPropertyNames);
|
|
4489
|
-
}
|
|
4490
|
-
const config = typeCheckConfig$3();
|
|
4491
|
-
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
4492
|
-
return null;
|
|
4493
|
-
}
|
|
4494
|
-
return config;
|
|
4495
|
-
}
|
|
4496
|
-
function adapterFragment$3(luvio, config) {
|
|
4497
|
-
return select$8();
|
|
4498
|
-
}
|
|
4499
|
-
function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
|
|
4500
|
-
const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
|
|
4501
|
-
config,
|
|
4502
|
-
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
4503
|
-
});
|
|
4504
|
-
return luvio.storeBroadcast().then(() => snapshot);
|
|
4505
|
-
}
|
|
4506
|
-
function onFetchResponseError$3(luvio, config, resourceParams, response) {
|
|
4507
|
-
const snapshot = ingestError$3(luvio, resourceParams, response, {
|
|
4508
|
-
config,
|
|
4509
|
-
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
3799
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
4510
3800
|
});
|
|
4511
3801
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4512
3802
|
}
|
|
4513
3803
|
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
4514
|
-
const resourceParams = createResourceParams$3();
|
|
4515
|
-
const request = createResourceRequest$3();
|
|
3804
|
+
const resourceParams = createResourceParams$3(config);
|
|
3805
|
+
const request = createResourceRequest$3(resourceParams);
|
|
4516
3806
|
return luvio.dispatchResourceRequest(request, options)
|
|
4517
3807
|
.then((response) => {
|
|
4518
3808
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => getResponseCacheKeys$3(luvio, resourceParams, response.body));
|
|
@@ -4540,8 +3830,8 @@ function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext
|
|
|
4540
3830
|
function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
|
|
4541
3831
|
const { luvio, config } = context;
|
|
4542
3832
|
const selector = {
|
|
4543
|
-
recordId: keyBuilder$9(),
|
|
4544
|
-
node: adapterFragment$3(),
|
|
3833
|
+
recordId: keyBuilder$9(luvio, config),
|
|
3834
|
+
node: adapterFragment$3(luvio, config),
|
|
4545
3835
|
variables: {},
|
|
4546
3836
|
};
|
|
4547
3837
|
const cacheSnapshot = storeLookup(selector, {
|
|
@@ -4550,8 +3840,8 @@ function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
|
|
|
4550
3840
|
});
|
|
4551
3841
|
return cacheSnapshot;
|
|
4552
3842
|
}
|
|
4553
|
-
const
|
|
4554
|
-
const config = validateAdapterConfig$3(untrustedConfig,
|
|
3843
|
+
const getLearningModelAdapterFactory = (luvio) => function LearningContentPlatform__getLearningModel(untrustedConfig, requestContext) {
|
|
3844
|
+
const config = validateAdapterConfig$3(untrustedConfig, getLearningModel_ConfigPropertyNames);
|
|
4555
3845
|
// Invalid or incomplete config
|
|
4556
3846
|
if (config === null) {
|
|
4557
3847
|
return null;
|
|
@@ -4560,114 +3850,112 @@ const getLearningSearchDescribeAdapterFactory = (luvio) => function LearningCont
|
|
|
4560
3850
|
buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
|
|
4561
3851
|
};
|
|
4562
3852
|
|
|
4563
|
-
const TTL$2 =
|
|
4564
|
-
const VERSION$4 = "
|
|
4565
|
-
function validate$4(obj, path = '
|
|
3853
|
+
const TTL$2 = 60000;
|
|
3854
|
+
const VERSION$4 = "44b044bb4e3eff4d2c834cdb80b9a043";
|
|
3855
|
+
function validate$4(obj, path = 'LearningPracticeRepresentation') {
|
|
4566
3856
|
const v_error = (() => {
|
|
4567
3857
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
4568
3858
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
4569
3859
|
}
|
|
4570
|
-
const
|
|
4571
|
-
const
|
|
4572
|
-
if (
|
|
4573
|
-
return new TypeError('Expected "
|
|
3860
|
+
const obj_description = obj.description;
|
|
3861
|
+
const path_description = path + '.description';
|
|
3862
|
+
if (typeof obj_description !== 'string') {
|
|
3863
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
3864
|
+
}
|
|
3865
|
+
const obj_learningItemId = obj.learningItemId;
|
|
3866
|
+
const path_learningItemId = path + '.learningItemId';
|
|
3867
|
+
if (typeof obj_learningItemId !== 'string') {
|
|
3868
|
+
return new TypeError('Expected "string" but received "' + typeof obj_learningItemId + '" (at "' + path_learningItemId + '")');
|
|
4574
3869
|
}
|
|
4575
|
-
|
|
4576
|
-
|
|
4577
|
-
|
|
4578
|
-
|
|
4579
|
-
return new TypeError('Expected "object" but received "' + typeof obj_results_item + '" (at "' + path_results_item + '")');
|
|
4580
|
-
}
|
|
3870
|
+
const obj_minimumInviteeQuantity = obj.minimumInviteeQuantity;
|
|
3871
|
+
const path_minimumInviteeQuantity = path + '.minimumInviteeQuantity';
|
|
3872
|
+
if (typeof obj_minimumInviteeQuantity !== 'number' || (typeof obj_minimumInviteeQuantity === 'number' && Math.floor(obj_minimumInviteeQuantity) !== obj_minimumInviteeQuantity)) {
|
|
3873
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_minimumInviteeQuantity + '" (at "' + path_minimumInviteeQuantity + '")');
|
|
4581
3874
|
}
|
|
4582
|
-
const
|
|
4583
|
-
const
|
|
4584
|
-
if (typeof
|
|
4585
|
-
return new TypeError('Expected "
|
|
3875
|
+
const obj_surveyId = obj.surveyId;
|
|
3876
|
+
const path_surveyId = path + '.surveyId';
|
|
3877
|
+
if (typeof obj_surveyId !== 'string') {
|
|
3878
|
+
return new TypeError('Expected "string" but received "' + typeof obj_surveyId + '" (at "' + path_surveyId + '")');
|
|
4586
3879
|
}
|
|
4587
|
-
const
|
|
4588
|
-
const
|
|
4589
|
-
if (typeof
|
|
4590
|
-
return new TypeError('Expected "string" but received "' + typeof
|
|
3880
|
+
const obj_title = obj.title;
|
|
3881
|
+
const path_title = path + '.title';
|
|
3882
|
+
if (typeof obj_title !== 'string') {
|
|
3883
|
+
return new TypeError('Expected "string" but received "' + typeof obj_title + '" (at "' + path_title + '")');
|
|
4591
3884
|
}
|
|
4592
3885
|
})();
|
|
4593
3886
|
return v_error === undefined ? null : v_error;
|
|
4594
3887
|
}
|
|
4595
|
-
const RepresentationType$2 = '
|
|
3888
|
+
const RepresentationType$2 = 'LearningPracticeRepresentation';
|
|
4596
3889
|
function keyBuilder$8(luvio, config) {
|
|
4597
|
-
return keyPrefix + '::' + RepresentationType$2 + ':' + config.
|
|
3890
|
+
return keyPrefix + '::' + RepresentationType$2 + ':' + config.learning_item_id;
|
|
4598
3891
|
}
|
|
4599
3892
|
function keyBuilderFromType$2(luvio, object) {
|
|
4600
3893
|
const keyParams = {
|
|
4601
|
-
|
|
3894
|
+
learning_item_id: object.learningItemId
|
|
4602
3895
|
};
|
|
4603
3896
|
return keyBuilder$8(luvio, keyParams);
|
|
4604
3897
|
}
|
|
4605
3898
|
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
4606
|
-
const input_results = input.results;
|
|
4607
|
-
const input_results_id = path.fullPath + '__results';
|
|
4608
|
-
for (let i = 0; i < input_results.length; i++) {
|
|
4609
|
-
const input_results_item = input_results[i];
|
|
4610
|
-
let input_results_item_id = input_results_id + '__' + i;
|
|
4611
|
-
input_results[i] = ingest$d(input_results_item, {
|
|
4612
|
-
fullPath: input_results_item_id,
|
|
4613
|
-
propertyName: i,
|
|
4614
|
-
parent: {
|
|
4615
|
-
data: input,
|
|
4616
|
-
key: path.fullPath,
|
|
4617
|
-
existing: existing,
|
|
4618
|
-
},
|
|
4619
|
-
ttl: path.ttl
|
|
4620
|
-
}, luvio, store);
|
|
4621
|
-
}
|
|
4622
3899
|
return input;
|
|
4623
3900
|
}
|
|
4624
|
-
const select$7 = function
|
|
3901
|
+
const select$7 = function LearningPracticeRepresentationSelect() {
|
|
4625
3902
|
return {
|
|
4626
3903
|
kind: 'Fragment',
|
|
4627
3904
|
version: VERSION$4,
|
|
4628
3905
|
private: [],
|
|
4629
3906
|
selections: [
|
|
4630
3907
|
{
|
|
4631
|
-
name: '
|
|
4632
|
-
kind: '
|
|
4633
|
-
plural: true,
|
|
4634
|
-
fragment: select$r()
|
|
3908
|
+
name: 'description',
|
|
3909
|
+
kind: 'Scalar'
|
|
4635
3910
|
},
|
|
4636
3911
|
{
|
|
4637
|
-
name: '
|
|
3912
|
+
name: 'learningItemId',
|
|
4638
3913
|
kind: 'Scalar'
|
|
4639
3914
|
},
|
|
4640
3915
|
{
|
|
4641
|
-
name: '
|
|
3916
|
+
name: 'minimumInviteeQuantity',
|
|
3917
|
+
kind: 'Scalar'
|
|
3918
|
+
},
|
|
3919
|
+
{
|
|
3920
|
+
name: 'surveyId',
|
|
3921
|
+
kind: 'Scalar'
|
|
3922
|
+
},
|
|
3923
|
+
{
|
|
3924
|
+
name: 'title',
|
|
4642
3925
|
kind: 'Scalar'
|
|
4643
3926
|
}
|
|
4644
3927
|
]
|
|
4645
3928
|
};
|
|
4646
3929
|
};
|
|
4647
3930
|
function equals$4(existing, incoming) {
|
|
4648
|
-
const
|
|
4649
|
-
const
|
|
4650
|
-
if (!(
|
|
3931
|
+
const existing_minimumInviteeQuantity = existing.minimumInviteeQuantity;
|
|
3932
|
+
const incoming_minimumInviteeQuantity = incoming.minimumInviteeQuantity;
|
|
3933
|
+
if (!(existing_minimumInviteeQuantity === incoming_minimumInviteeQuantity)) {
|
|
4651
3934
|
return false;
|
|
4652
3935
|
}
|
|
4653
|
-
const
|
|
4654
|
-
const
|
|
4655
|
-
if (!(
|
|
3936
|
+
const existing_description = existing.description;
|
|
3937
|
+
const incoming_description = incoming.description;
|
|
3938
|
+
if (!(existing_description === incoming_description)) {
|
|
4656
3939
|
return false;
|
|
4657
3940
|
}
|
|
4658
|
-
const
|
|
4659
|
-
const
|
|
4660
|
-
|
|
4661
|
-
|
|
4662
|
-
|
|
4663
|
-
|
|
4664
|
-
|
|
4665
|
-
if (
|
|
3941
|
+
const existing_learningItemId = existing.learningItemId;
|
|
3942
|
+
const incoming_learningItemId = incoming.learningItemId;
|
|
3943
|
+
if (!(existing_learningItemId === incoming_learningItemId)) {
|
|
3944
|
+
return false;
|
|
3945
|
+
}
|
|
3946
|
+
const existing_surveyId = existing.surveyId;
|
|
3947
|
+
const incoming_surveyId = incoming.surveyId;
|
|
3948
|
+
if (!(existing_surveyId === incoming_surveyId)) {
|
|
3949
|
+
return false;
|
|
3950
|
+
}
|
|
3951
|
+
const existing_title = existing.title;
|
|
3952
|
+
const incoming_title = incoming.title;
|
|
3953
|
+
if (!(existing_title === incoming_title)) {
|
|
4666
3954
|
return false;
|
|
4667
3955
|
}
|
|
4668
3956
|
return true;
|
|
4669
3957
|
}
|
|
4670
|
-
const ingest$2 = function
|
|
3958
|
+
const ingest$2 = function LearningPracticeRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
4671
3959
|
if (process.env.NODE_ENV !== 'production') {
|
|
4672
3960
|
const validateError = validate$4(input);
|
|
4673
3961
|
if (validateError !== null) {
|
|
@@ -4682,7 +3970,7 @@ const ingest$2 = function LearningSearchResultsRepresentationIngest(input, path,
|
|
|
4682
3970
|
parent: path.parent,
|
|
4683
3971
|
propertyName: path.propertyName,
|
|
4684
3972
|
ttl: ttlToUse
|
|
4685
|
-
}
|
|
3973
|
+
});
|
|
4686
3974
|
if (existingRecord === undefined || equals$4(existingRecord, incomingRecord) === false) {
|
|
4687
3975
|
luvio.storePublish(key, incomingRecord);
|
|
4688
3976
|
}
|
|
@@ -4706,10 +3994,6 @@ function getTypeCacheKeys$2(luvio, input, fullPathFactory) {
|
|
|
4706
3994
|
representationName: RepresentationType$2,
|
|
4707
3995
|
mergeable: false
|
|
4708
3996
|
});
|
|
4709
|
-
const input_results_length = input.results.length;
|
|
4710
|
-
for (let i = 0; i < input_results_length; i++) {
|
|
4711
|
-
rootKeySet.merge(getTypeCacheKeys$d(luvio, input.results[i]));
|
|
4712
|
-
}
|
|
4713
3997
|
return rootKeySet;
|
|
4714
3998
|
}
|
|
4715
3999
|
|
|
@@ -4718,7 +4002,7 @@ function select$6(luvio, params) {
|
|
|
4718
4002
|
}
|
|
4719
4003
|
function keyBuilder$7(luvio, params) {
|
|
4720
4004
|
return keyBuilder$8(luvio, {
|
|
4721
|
-
|
|
4005
|
+
learning_item_id: params.urlParams.learningItemId
|
|
4722
4006
|
});
|
|
4723
4007
|
}
|
|
4724
4008
|
function getResponseCacheKeys$2(luvio, resourceParams, response) {
|
|
@@ -4757,11 +4041,11 @@ function createResourceRequest$2(config) {
|
|
|
4757
4041
|
const headers = {};
|
|
4758
4042
|
return {
|
|
4759
4043
|
baseUri: '/services/data/v59.0',
|
|
4760
|
-
basePath: '/learning-content-platform/learning/
|
|
4044
|
+
basePath: '/learning-content-platform/learning/practice/' + config.urlParams.learningItemId + '',
|
|
4761
4045
|
method: 'get',
|
|
4762
4046
|
body: null,
|
|
4763
4047
|
urlParams: config.urlParams,
|
|
4764
|
-
queryParams:
|
|
4048
|
+
queryParams: {},
|
|
4765
4049
|
headers,
|
|
4766
4050
|
priority: 'normal',
|
|
4767
4051
|
};
|
|
@@ -4769,26 +4053,22 @@ function createResourceRequest$2(config) {
|
|
|
4769
4053
|
function createResourceRequestFromRepresentation$2(representation) {
|
|
4770
4054
|
const config = {
|
|
4771
4055
|
urlParams: {},
|
|
4772
|
-
queryParams: {},
|
|
4773
4056
|
};
|
|
4774
|
-
config.urlParams.
|
|
4057
|
+
config.urlParams.learningItemId = representation.learningItemId;
|
|
4775
4058
|
return createResourceRequest$2(config);
|
|
4776
4059
|
}
|
|
4777
4060
|
|
|
4778
|
-
const
|
|
4779
|
-
displayName: '
|
|
4061
|
+
const getLearningPractice_ConfigPropertyNames = {
|
|
4062
|
+
displayName: 'getLearningPractice',
|
|
4780
4063
|
parameters: {
|
|
4781
|
-
required: ['
|
|
4064
|
+
required: ['learningItemId'],
|
|
4782
4065
|
optional: []
|
|
4783
4066
|
}
|
|
4784
4067
|
};
|
|
4785
4068
|
function createResourceParams$2(config) {
|
|
4786
4069
|
const resourceParams = {
|
|
4787
4070
|
urlParams: {
|
|
4788
|
-
|
|
4789
|
-
},
|
|
4790
|
-
queryParams: {
|
|
4791
|
-
limit: config.limit, q: config.q
|
|
4071
|
+
learningItemId: config.learningItemId
|
|
4792
4072
|
}
|
|
4793
4073
|
};
|
|
4794
4074
|
return resourceParams;
|
|
@@ -4799,17 +4079,9 @@ function keyBuilder$6(luvio, config) {
|
|
|
4799
4079
|
}
|
|
4800
4080
|
function typeCheckConfig$2(untrustedConfig) {
|
|
4801
4081
|
const config = {};
|
|
4802
|
-
const
|
|
4803
|
-
if (typeof
|
|
4804
|
-
config.
|
|
4805
|
-
}
|
|
4806
|
-
const untrustedConfig_limit = untrustedConfig.limit;
|
|
4807
|
-
if (typeof untrustedConfig_limit === 'number' && Math.floor(untrustedConfig_limit) === untrustedConfig_limit) {
|
|
4808
|
-
config.limit = untrustedConfig_limit;
|
|
4809
|
-
}
|
|
4810
|
-
const untrustedConfig_q = untrustedConfig.q;
|
|
4811
|
-
if (typeof untrustedConfig_q === 'string') {
|
|
4812
|
-
config.q = untrustedConfig_q;
|
|
4082
|
+
const untrustedConfig_learningItemId = untrustedConfig.learningItemId;
|
|
4083
|
+
if (typeof untrustedConfig_learningItemId === 'string') {
|
|
4084
|
+
config.learningItemId = untrustedConfig_learningItemId;
|
|
4813
4085
|
}
|
|
4814
4086
|
return config;
|
|
4815
4087
|
}
|
|
@@ -4884,8 +4156,8 @@ function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
|
4884
4156
|
});
|
|
4885
4157
|
return cacheSnapshot;
|
|
4886
4158
|
}
|
|
4887
|
-
const
|
|
4888
|
-
const config = validateAdapterConfig$2(untrustedConfig,
|
|
4159
|
+
const getLearningPracticeAdapterFactory = (luvio) => function LearningContentPlatform__getLearningPractice(untrustedConfig, requestContext) {
|
|
4160
|
+
const config = validateAdapterConfig$2(untrustedConfig, getLearningPractice_ConfigPropertyNames);
|
|
4889
4161
|
// Invalid or incomplete config
|
|
4890
4162
|
if (config === null) {
|
|
4891
4163
|
return null;
|
|
@@ -4894,7 +4166,7 @@ const getLearningSearchResultsAdapterFactory = (luvio) => function LearningConte
|
|
|
4894
4166
|
buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
|
|
4895
4167
|
};
|
|
4896
4168
|
const notifyChangeFactory$2 = (luvio, options) => {
|
|
4897
|
-
return function
|
|
4169
|
+
return function getLearningContentPlatformLearningPracticeByLearningItemIdNotifyChange(configs) {
|
|
4898
4170
|
const keys = configs.map(c => keyBuilder$8(luvio, c));
|
|
4899
4171
|
luvio.getNotifyChangeStoreEntries(keys).then(entries => {
|
|
4900
4172
|
for (let i = 0, len = entries.length; i < len; i++) {
|
|
@@ -6145,9 +5417,6 @@ let getLearningItemsList;
|
|
|
6145
5417
|
let getLearningModel;
|
|
6146
5418
|
let getLearningPractice;
|
|
6147
5419
|
let getLearningPracticeNotifyChange;
|
|
6148
|
-
let getLearningSearchDescribe;
|
|
6149
|
-
let getLearningSearchResults;
|
|
6150
|
-
let getLearningSearchResultsNotifyChange;
|
|
6151
5420
|
let getModule;
|
|
6152
5421
|
let getModuleNotifyChange;
|
|
6153
5422
|
let getTextLesson;
|
|
@@ -6160,8 +5429,6 @@ let getLearningItemProgress_imperative;
|
|
|
6160
5429
|
let getLearningItemsList_imperative;
|
|
6161
5430
|
let getLearningModel_imperative;
|
|
6162
5431
|
let getLearningPractice_imperative;
|
|
6163
|
-
let getLearningSearchDescribe_imperative;
|
|
6164
|
-
let getLearningSearchResults_imperative;
|
|
6165
5432
|
let getModule_imperative;
|
|
6166
5433
|
let getTextLesson_imperative;
|
|
6167
5434
|
const getFeaturedItemsRecommendedListMetadata = { apiFamily: 'LearningContentPlatform', name: 'getFeaturedItemsRecommendedList' };
|
|
@@ -6171,8 +5438,6 @@ const getLearningItemProgressMetadata = { apiFamily: 'LearningContentPlatform',
|
|
|
6171
5438
|
const getLearningItemsListMetadata = { apiFamily: 'LearningContentPlatform', name: 'getLearningItemsList' };
|
|
6172
5439
|
const getLearningModelMetadata = { apiFamily: 'LearningContentPlatform', name: 'getLearningModel', ttl: 15000 };
|
|
6173
5440
|
const getLearningPracticeMetadata = { apiFamily: 'LearningContentPlatform', name: 'getLearningPractice', ttl: 60000 };
|
|
6174
|
-
const getLearningSearchDescribeMetadata = { apiFamily: 'LearningContentPlatform', name: 'getLearningSearchDescribe' };
|
|
6175
|
-
const getLearningSearchResultsMetadata = { apiFamily: 'LearningContentPlatform', name: 'getLearningSearchResults', ttl: 21600000 };
|
|
6176
5441
|
const getModuleMetadata = { apiFamily: 'LearningContentPlatform', name: 'getModule', ttl: 21600000 };
|
|
6177
5442
|
const getTextLessonMetadata = { apiFamily: 'LearningContentPlatform', name: 'getTextLesson', ttl: 60000 };
|
|
6178
5443
|
function bindExportsTo(luvio) {
|
|
@@ -6184,8 +5449,6 @@ function bindExportsTo(luvio) {
|
|
|
6184
5449
|
const getLearningItemsList_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getLearningItemsList', getLearningItemsListAdapterFactory), getLearningItemsListMetadata);
|
|
6185
5450
|
const getLearningModel_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getLearningModel', getLearningModelAdapterFactory), getLearningModelMetadata);
|
|
6186
5451
|
const getLearningPractice_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getLearningPractice', getLearningPracticeAdapterFactory), getLearningPracticeMetadata);
|
|
6187
|
-
const getLearningSearchDescribe_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getLearningSearchDescribe', getLearningSearchDescribeAdapterFactory), getLearningSearchDescribeMetadata);
|
|
6188
|
-
const getLearningSearchResults_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getLearningSearchResults', getLearningSearchResultsAdapterFactory), getLearningSearchResultsMetadata);
|
|
6189
5452
|
const getModule_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getModule', getModuleAdapterFactory), getModuleMetadata);
|
|
6190
5453
|
const getTextLesson_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getTextLesson', getTextLessonAdapterFactory), getTextLessonMetadata);
|
|
6191
5454
|
function unwrapSnapshotData(factory) {
|
|
@@ -6201,10 +5464,7 @@ function bindExportsTo(luvio) {
|
|
|
6201
5464
|
getLearningItemsList: createWireAdapterConstructor(luvio, getLearningItemsList_ldsAdapter, getLearningItemsListMetadata),
|
|
6202
5465
|
getLearningModel: createWireAdapterConstructor(luvio, getLearningModel_ldsAdapter, getLearningModelMetadata),
|
|
6203
5466
|
getLearningPractice: createWireAdapterConstructor(luvio, getLearningPractice_ldsAdapter, getLearningPracticeMetadata),
|
|
6204
|
-
getLearningPracticeNotifyChange: createLDSAdapter(luvio, 'getLearningPracticeNotifyChange', notifyChangeFactory$
|
|
6205
|
-
getLearningSearchDescribe: createWireAdapterConstructor(luvio, getLearningSearchDescribe_ldsAdapter, getLearningSearchDescribeMetadata),
|
|
6206
|
-
getLearningSearchResults: createWireAdapterConstructor(luvio, getLearningSearchResults_ldsAdapter, getLearningSearchResultsMetadata),
|
|
6207
|
-
getLearningSearchResultsNotifyChange: createLDSAdapter(luvio, 'getLearningSearchResultsNotifyChange', notifyChangeFactory$2),
|
|
5467
|
+
getLearningPracticeNotifyChange: createLDSAdapter(luvio, 'getLearningPracticeNotifyChange', notifyChangeFactory$2),
|
|
6208
5468
|
getModule: createWireAdapterConstructor(luvio, getModule_ldsAdapter, getModuleMetadata),
|
|
6209
5469
|
getModuleNotifyChange: createLDSAdapter(luvio, 'getModuleNotifyChange', notifyChangeFactory$1),
|
|
6210
5470
|
getTextLesson: createWireAdapterConstructor(luvio, getTextLesson_ldsAdapter, getTextLessonMetadata),
|
|
@@ -6217,8 +5477,6 @@ function bindExportsTo(luvio) {
|
|
|
6217
5477
|
getLearningItemsList_imperative: createImperativeAdapter(luvio, getLearningItemsList_ldsAdapter, getLearningItemsListMetadata),
|
|
6218
5478
|
getLearningModel_imperative: createImperativeAdapter(luvio, getLearningModel_ldsAdapter, getLearningModelMetadata),
|
|
6219
5479
|
getLearningPractice_imperative: createImperativeAdapter(luvio, getLearningPractice_ldsAdapter, getLearningPracticeMetadata),
|
|
6220
|
-
getLearningSearchDescribe_imperative: createImperativeAdapter(luvio, getLearningSearchDescribe_ldsAdapter, getLearningSearchDescribeMetadata),
|
|
6221
|
-
getLearningSearchResults_imperative: createImperativeAdapter(luvio, getLearningSearchResults_ldsAdapter, getLearningSearchResultsMetadata),
|
|
6222
5480
|
getModule_imperative: createImperativeAdapter(luvio, getModule_ldsAdapter, getModuleMetadata),
|
|
6223
5481
|
getTextLesson_imperative: createImperativeAdapter(luvio, getTextLesson_ldsAdapter, getTextLessonMetadata)
|
|
6224
5482
|
};
|
|
@@ -6234,9 +5492,6 @@ withDefaultLuvio((luvio) => {
|
|
|
6234
5492
|
getLearningModel,
|
|
6235
5493
|
getLearningPractice,
|
|
6236
5494
|
getLearningPracticeNotifyChange,
|
|
6237
|
-
getLearningSearchDescribe,
|
|
6238
|
-
getLearningSearchResults,
|
|
6239
|
-
getLearningSearchResultsNotifyChange,
|
|
6240
5495
|
getModule,
|
|
6241
5496
|
getModuleNotifyChange,
|
|
6242
5497
|
getTextLesson,
|
|
@@ -6248,12 +5503,10 @@ withDefaultLuvio((luvio) => {
|
|
|
6248
5503
|
getLearningItemsList_imperative,
|
|
6249
5504
|
getLearningModel_imperative,
|
|
6250
5505
|
getLearningPractice_imperative,
|
|
6251
|
-
getLearningSearchDescribe_imperative,
|
|
6252
|
-
getLearningSearchResults_imperative,
|
|
6253
5506
|
getModule_imperative,
|
|
6254
5507
|
getTextLesson_imperative
|
|
6255
5508
|
} = bindExportsTo(luvio));
|
|
6256
5509
|
});
|
|
6257
5510
|
|
|
6258
|
-
export { evaluateLearningItem, getFeaturedItemsRecommendedList, getFeaturedItemsRecommendedList_imperative, getFeaturedItemsRelatedList, getFeaturedItemsRelatedList_imperative, getLearningConfig, getLearningConfig_imperative, getLearningItemProgress, getLearningItemProgress_imperative, getLearningItemsList, getLearningItemsList_imperative, getLearningModel, getLearningModel_imperative, getLearningPractice, getLearningPracticeNotifyChange, getLearningPractice_imperative,
|
|
6259
|
-
// version: 1.
|
|
5511
|
+
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 };
|
|
5512
|
+
// version: 1.150.0-d3d5689fc
|