@salesforce/lds-adapters-platform-learning-content 1.274.0 → 1.276.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 +520 -30
- package/dist/es/es2018/types/src/generated/adapters/getCoachingAIFeedback.d.ts +27 -0
- package/dist/es/es2018/types/src/generated/adapters/getFeaturedItemsRelatedList.d.ts +1 -0
- package/dist/es/es2018/types/src/generated/adapters/submitForCoachingAIFeedback.d.ts +16 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +2 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +4 -1
- package/dist/es/es2018/types/src/generated/resources/getLearningContentPlatformCoachingAiFeedbackByLearningItemSubmissionId.d.ts +15 -0
- package/dist/es/es2018/types/src/generated/resources/getLearningContentPlatformFeaturedItemListRelated.d.ts +1 -0
- package/dist/es/es2018/types/src/generated/resources/postLearningContentPlatformCoachingAiFeedback.d.ts +13 -0
- package/dist/es/es2018/types/src/generated/types/AbstractCoachingAIFeedbackSectionRepresentation.d.ts +34 -0
- package/dist/es/es2018/types/src/generated/types/CoachingAICallSubmissionInputRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/CoachingAICallSubmissionOutputRepresentation.d.ts +41 -0
- package/dist/es/es2018/types/src/generated/types/CoachingAICriteriaBasedFeedbackRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/CoachingAIFeedbackRepresentation.d.ts +38 -0
- package/dist/es/es2018/types/src/generated/types/CoachingAIFeedbackSectionStringCollectionRepresentation.d.ts +30 -0
- package/dist/es/es2018/types/src/generated/types/CoachingAIFeedbackSectionTextRepresentation.d.ts +30 -0
- package/package.json +6 -5
- package/sfdc/index.js +1113 -609
- package/src/raml/api.raml +115 -0
- package/src/raml/luvio.raml +13 -0
package/sfdc/index.js
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
/* proxy-compat-disable */
|
|
15
15
|
import { createInstrumentedAdapter, createLDSAdapter, createWireAdapterConstructor, createImperativeAdapter } from 'force/ldsBindings';
|
|
16
16
|
import { withDefaultLuvio } from 'force/ldsEngine';
|
|
17
|
-
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$
|
|
17
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$c, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$a, typeCheckConfig as typeCheckConfig$c } from 'force/luvioEngine';
|
|
18
18
|
|
|
19
19
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
20
20
|
const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
|
|
@@ -122,7 +122,7 @@ function createLink(ref) {
|
|
|
122
122
|
};
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
-
function validate$
|
|
125
|
+
function validate$i(obj, path = 'EvaluateLearningItemInputRepresentation') {
|
|
126
126
|
const v_error = (() => {
|
|
127
127
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
128
128
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -152,9 +152,9 @@ function validate$f(obj, path = 'EvaluateLearningItemInputRepresentation') {
|
|
|
152
152
|
return v_error === undefined ? null : v_error;
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
-
const TTL$
|
|
156
|
-
const VERSION$
|
|
157
|
-
function validate$
|
|
155
|
+
const TTL$7 = 15000;
|
|
156
|
+
const VERSION$h = "ef3b97b73983e10731031f11a195bba6";
|
|
157
|
+
function validate$h(obj, path = 'LearningItemProgressRepresentation') {
|
|
158
158
|
const v_error = (() => {
|
|
159
159
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
160
160
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -224,23 +224,23 @@ function validate$e(obj, path = 'LearningItemProgressRepresentation') {
|
|
|
224
224
|
})();
|
|
225
225
|
return v_error === undefined ? null : v_error;
|
|
226
226
|
}
|
|
227
|
-
const RepresentationType$
|
|
228
|
-
function keyBuilder$
|
|
229
|
-
return keyPrefix + '::' + RepresentationType$
|
|
227
|
+
const RepresentationType$d = 'LearningItemProgressRepresentation';
|
|
228
|
+
function keyBuilder$r(luvio, config) {
|
|
229
|
+
return keyPrefix + '::' + RepresentationType$d + ':' + config.learning_item_id;
|
|
230
230
|
}
|
|
231
|
-
function keyBuilderFromType$
|
|
231
|
+
function keyBuilderFromType$7(luvio, object) {
|
|
232
232
|
const keyParams = {
|
|
233
233
|
learning_item_id: object.learningItemId
|
|
234
234
|
};
|
|
235
|
-
return keyBuilder$
|
|
235
|
+
return keyBuilder$r(luvio, keyParams);
|
|
236
236
|
}
|
|
237
|
-
function normalize$
|
|
237
|
+
function normalize$d(input, existing, path, luvio, store, timestamp) {
|
|
238
238
|
return input;
|
|
239
239
|
}
|
|
240
|
-
const select$
|
|
240
|
+
const select$t = function LearningItemProgressRepresentationSelect() {
|
|
241
241
|
return {
|
|
242
242
|
kind: 'Fragment',
|
|
243
|
-
version: VERSION$
|
|
243
|
+
version: VERSION$h,
|
|
244
244
|
private: [],
|
|
245
245
|
selections: [
|
|
246
246
|
{
|
|
@@ -262,7 +262,7 @@ const select$o = function LearningItemProgressRepresentationSelect() {
|
|
|
262
262
|
]
|
|
263
263
|
};
|
|
264
264
|
};
|
|
265
|
-
function equals$
|
|
265
|
+
function equals$h(existing, incoming) {
|
|
266
266
|
const existing_isCompleted = existing.isCompleted;
|
|
267
267
|
const incoming_isCompleted = incoming.isCompleted;
|
|
268
268
|
if (!(existing_isCompleted === incoming_isCompleted)) {
|
|
@@ -285,24 +285,24 @@ function equals$e(existing, incoming) {
|
|
|
285
285
|
}
|
|
286
286
|
return true;
|
|
287
287
|
}
|
|
288
|
-
const ingest$
|
|
288
|
+
const ingest$d = function LearningItemProgressRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
289
289
|
if (process.env.NODE_ENV !== 'production') {
|
|
290
|
-
const validateError = validate$
|
|
290
|
+
const validateError = validate$h(input);
|
|
291
291
|
if (validateError !== null) {
|
|
292
292
|
throw validateError;
|
|
293
293
|
}
|
|
294
294
|
}
|
|
295
|
-
const key = keyBuilderFromType$
|
|
296
|
-
const ttlToUse = TTL$
|
|
297
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
295
|
+
const key = keyBuilderFromType$7(luvio, input);
|
|
296
|
+
const ttlToUse = TTL$7;
|
|
297
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$d, "LearningContentPlatform", VERSION$h, RepresentationType$d, equals$h);
|
|
298
298
|
return createLink(key);
|
|
299
299
|
};
|
|
300
|
-
function getTypeCacheKeys$
|
|
300
|
+
function getTypeCacheKeys$d(rootKeySet, luvio, input, fullPathFactory) {
|
|
301
301
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
302
|
-
const rootKey = keyBuilderFromType$
|
|
302
|
+
const rootKey = keyBuilderFromType$7(luvio, input);
|
|
303
303
|
rootKeySet.set(rootKey, {
|
|
304
304
|
namespace: keyPrefix,
|
|
305
|
-
representationName: RepresentationType$
|
|
305
|
+
representationName: RepresentationType$d,
|
|
306
306
|
mergeable: false
|
|
307
307
|
});
|
|
308
308
|
}
|
|
@@ -316,24 +316,24 @@ const notifyUpdateAvailableFactory$2 = (luvio) => {
|
|
|
316
316
|
}
|
|
317
317
|
});
|
|
318
318
|
}
|
|
319
|
-
const keys = configs.map(c => keyBuilder$
|
|
319
|
+
const keys = configs.map(c => keyBuilder$r(luvio, c));
|
|
320
320
|
return luvio.notifyStoreUpdateAvailable(keys);
|
|
321
321
|
};
|
|
322
322
|
};
|
|
323
323
|
|
|
324
|
-
function select$
|
|
325
|
-
return select$
|
|
324
|
+
function select$s(luvio, params) {
|
|
325
|
+
return select$t();
|
|
326
326
|
}
|
|
327
|
-
function getResponseCacheKeys$
|
|
328
|
-
getTypeCacheKeys$
|
|
327
|
+
function getResponseCacheKeys$b(storeKeyMap, luvio, resourceParams, response) {
|
|
328
|
+
getTypeCacheKeys$d(storeKeyMap, luvio, response);
|
|
329
329
|
}
|
|
330
|
-
function ingestSuccess$
|
|
330
|
+
function ingestSuccess$b(luvio, resourceParams, response) {
|
|
331
331
|
const { body } = response;
|
|
332
|
-
const key = keyBuilderFromType$
|
|
333
|
-
luvio.storeIngest(key, ingest$
|
|
332
|
+
const key = keyBuilderFromType$7(luvio, body);
|
|
333
|
+
luvio.storeIngest(key, ingest$d, body);
|
|
334
334
|
const snapshot = luvio.storeLookup({
|
|
335
335
|
recordId: key,
|
|
336
|
-
node: select$
|
|
336
|
+
node: select$s(),
|
|
337
337
|
variables: {},
|
|
338
338
|
});
|
|
339
339
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -344,7 +344,7 @@ function ingestSuccess$9(luvio, resourceParams, response) {
|
|
|
344
344
|
deepFreeze(snapshot.data);
|
|
345
345
|
return snapshot;
|
|
346
346
|
}
|
|
347
|
-
function createResourceRequest$
|
|
347
|
+
function createResourceRequest$b(config) {
|
|
348
348
|
const headers = {};
|
|
349
349
|
return {
|
|
350
350
|
baseUri: '/services/data/v61.0',
|
|
@@ -358,45 +358,45 @@ function createResourceRequest$9(config) {
|
|
|
358
358
|
};
|
|
359
359
|
}
|
|
360
360
|
|
|
361
|
-
const adapterName$
|
|
361
|
+
const adapterName$b = 'evaluateLearningItem';
|
|
362
362
|
const evaluateLearningItem_ConfigPropertyMetadata = [
|
|
363
363
|
generateParamConfigMetadata('payload', true, 2 /* Body */, 4 /* Unsupported */),
|
|
364
364
|
];
|
|
365
|
-
const evaluateLearningItem_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
366
|
-
const createResourceParams$
|
|
367
|
-
function typeCheckConfig$
|
|
365
|
+
const evaluateLearningItem_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$b, evaluateLearningItem_ConfigPropertyMetadata);
|
|
366
|
+
const createResourceParams$b = /*#__PURE__*/ createResourceParams$c(evaluateLearningItem_ConfigPropertyMetadata);
|
|
367
|
+
function typeCheckConfig$b(untrustedConfig) {
|
|
368
368
|
const config = {};
|
|
369
369
|
const untrustedConfig_payload = untrustedConfig.payload;
|
|
370
|
-
const referenceEvaluateLearningItemInputRepresentationValidationError = validate$
|
|
370
|
+
const referenceEvaluateLearningItemInputRepresentationValidationError = validate$i(untrustedConfig_payload);
|
|
371
371
|
if (referenceEvaluateLearningItemInputRepresentationValidationError === null) {
|
|
372
372
|
config.payload = untrustedConfig_payload;
|
|
373
373
|
}
|
|
374
374
|
return config;
|
|
375
375
|
}
|
|
376
|
-
function validateAdapterConfig$
|
|
376
|
+
function validateAdapterConfig$b(untrustedConfig, configPropertyNames) {
|
|
377
377
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
378
378
|
return null;
|
|
379
379
|
}
|
|
380
380
|
if (process.env.NODE_ENV !== 'production') {
|
|
381
381
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
382
382
|
}
|
|
383
|
-
const config = typeCheckConfig$
|
|
383
|
+
const config = typeCheckConfig$b(untrustedConfig);
|
|
384
384
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
385
385
|
return null;
|
|
386
386
|
}
|
|
387
387
|
return config;
|
|
388
388
|
}
|
|
389
|
-
function buildNetworkSnapshot$
|
|
390
|
-
const resourceParams = createResourceParams$
|
|
391
|
-
const request = createResourceRequest$
|
|
389
|
+
function buildNetworkSnapshot$b(luvio, config, options) {
|
|
390
|
+
const resourceParams = createResourceParams$b(config);
|
|
391
|
+
const request = createResourceRequest$b(resourceParams);
|
|
392
392
|
return luvio.dispatchResourceRequest(request, options)
|
|
393
393
|
.then((response) => {
|
|
394
394
|
return luvio.handleSuccessResponse(() => {
|
|
395
|
-
const snapshot = ingestSuccess$
|
|
395
|
+
const snapshot = ingestSuccess$b(luvio, resourceParams, response);
|
|
396
396
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
397
397
|
}, () => {
|
|
398
398
|
const cache = new StoreKeyMap();
|
|
399
|
-
getResponseCacheKeys$
|
|
399
|
+
getResponseCacheKeys$b(cache, luvio, resourceParams, response.body);
|
|
400
400
|
return cache;
|
|
401
401
|
});
|
|
402
402
|
}, (response) => {
|
|
@@ -406,18 +406,326 @@ function buildNetworkSnapshot$9(luvio, config, options) {
|
|
|
406
406
|
}
|
|
407
407
|
const evaluateLearningItemAdapterFactory = (luvio) => {
|
|
408
408
|
return function evaluateLearningItem(untrustedConfig) {
|
|
409
|
-
const config = validateAdapterConfig$
|
|
409
|
+
const config = validateAdapterConfig$b(untrustedConfig, evaluateLearningItem_ConfigPropertyNames);
|
|
410
410
|
// Invalid or incomplete config
|
|
411
411
|
if (config === null) {
|
|
412
412
|
throw new Error('Invalid config for "evaluateLearningItem"');
|
|
413
413
|
}
|
|
414
|
-
return buildNetworkSnapshot$
|
|
414
|
+
return buildNetworkSnapshot$b(luvio, config);
|
|
415
|
+
};
|
|
416
|
+
};
|
|
417
|
+
|
|
418
|
+
const VERSION$g = "7877f5d0382a35ed103b8a91ff54fa47";
|
|
419
|
+
function validate$g(obj, path = 'CoachingAICriteriaBasedFeedbackRepresentation') {
|
|
420
|
+
const v_error = (() => {
|
|
421
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
422
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
423
|
+
}
|
|
424
|
+
const obj_criteriaName = obj.criteriaName;
|
|
425
|
+
const path_criteriaName = path + '.criteriaName';
|
|
426
|
+
if (typeof obj_criteriaName !== 'string') {
|
|
427
|
+
return new TypeError('Expected "string" but received "' + typeof obj_criteriaName + '" (at "' + path_criteriaName + '")');
|
|
428
|
+
}
|
|
429
|
+
obj.criteriaScore;
|
|
430
|
+
})();
|
|
431
|
+
return v_error === undefined ? null : v_error;
|
|
432
|
+
}
|
|
433
|
+
const select$r = function CoachingAICriteriaBasedFeedbackRepresentationSelect() {
|
|
434
|
+
return {
|
|
435
|
+
kind: 'Fragment',
|
|
436
|
+
version: VERSION$g,
|
|
437
|
+
private: [],
|
|
438
|
+
selections: [
|
|
439
|
+
{
|
|
440
|
+
name: 'criteriaName',
|
|
441
|
+
kind: 'Scalar'
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
name: 'criteriaScore',
|
|
445
|
+
kind: 'Scalar'
|
|
446
|
+
}
|
|
447
|
+
]
|
|
448
|
+
};
|
|
449
|
+
};
|
|
450
|
+
function equals$g(existing, incoming) {
|
|
451
|
+
const existing_criteriaName = existing.criteriaName;
|
|
452
|
+
const incoming_criteriaName = incoming.criteriaName;
|
|
453
|
+
if (!(existing_criteriaName === incoming_criteriaName)) {
|
|
454
|
+
return false;
|
|
455
|
+
}
|
|
456
|
+
const existing_criteriaScore = existing.criteriaScore;
|
|
457
|
+
const incoming_criteriaScore = incoming.criteriaScore;
|
|
458
|
+
if (!(existing_criteriaScore === incoming_criteriaScore)) {
|
|
459
|
+
return false;
|
|
460
|
+
}
|
|
461
|
+
return true;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
const VERSION$f = "ce799f65b2acf684ff815d1c883d123e";
|
|
465
|
+
function validate$f(obj, path = 'CoachingAIFeedbackRepresentation') {
|
|
466
|
+
const v_error = (() => {
|
|
467
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
468
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
469
|
+
}
|
|
470
|
+
const obj_additionalFeedback = obj.additionalFeedback;
|
|
471
|
+
const path_additionalFeedback = path + '.additionalFeedback';
|
|
472
|
+
if (!ArrayIsArray(obj_additionalFeedback)) {
|
|
473
|
+
return new TypeError('Expected "array" but received "' + typeof obj_additionalFeedback + '" (at "' + path_additionalFeedback + '")');
|
|
474
|
+
}
|
|
475
|
+
for (let i = 0; i < obj_additionalFeedback.length; i++) {
|
|
476
|
+
const obj_additionalFeedback_item = obj_additionalFeedback[i];
|
|
477
|
+
const path_additionalFeedback_item = path_additionalFeedback + '[' + i + ']';
|
|
478
|
+
if (obj_additionalFeedback_item === undefined) {
|
|
479
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_additionalFeedback_item + '" (at "' + path_additionalFeedback_item + '")');
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
const obj_conversationSummaryId = obj.conversationSummaryId;
|
|
483
|
+
const path_conversationSummaryId = path + '.conversationSummaryId';
|
|
484
|
+
if (typeof obj_conversationSummaryId !== 'string') {
|
|
485
|
+
return new TypeError('Expected "string" but received "' + typeof obj_conversationSummaryId + '" (at "' + path_conversationSummaryId + '")');
|
|
486
|
+
}
|
|
487
|
+
const obj_criteriaBasedScores = obj.criteriaBasedScores;
|
|
488
|
+
const path_criteriaBasedScores = path + '.criteriaBasedScores';
|
|
489
|
+
if (!ArrayIsArray(obj_criteriaBasedScores)) {
|
|
490
|
+
return new TypeError('Expected "array" but received "' + typeof obj_criteriaBasedScores + '" (at "' + path_criteriaBasedScores + '")');
|
|
491
|
+
}
|
|
492
|
+
for (let i = 0; i < obj_criteriaBasedScores.length; i++) {
|
|
493
|
+
const obj_criteriaBasedScores_item = obj_criteriaBasedScores[i];
|
|
494
|
+
const path_criteriaBasedScores_item = path_criteriaBasedScores + '[' + i + ']';
|
|
495
|
+
const referencepath_criteriaBasedScores_itemValidationError = validate$g(obj_criteriaBasedScores_item, path_criteriaBasedScores_item);
|
|
496
|
+
if (referencepath_criteriaBasedScores_itemValidationError !== null) {
|
|
497
|
+
let message = 'Object doesn\'t match CoachingAICriteriaBasedFeedbackRepresentation (at "' + path_criteriaBasedScores_item + '")\n';
|
|
498
|
+
message += referencepath_criteriaBasedScores_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
499
|
+
return new TypeError(message);
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
obj.score;
|
|
503
|
+
})();
|
|
504
|
+
return v_error === undefined ? null : v_error;
|
|
505
|
+
}
|
|
506
|
+
const RepresentationType$c = 'CoachingAIFeedbackRepresentation';
|
|
507
|
+
function normalize$c(input, existing, path, luvio, store, timestamp) {
|
|
508
|
+
return input;
|
|
509
|
+
}
|
|
510
|
+
const select$q = function CoachingAIFeedbackRepresentationSelect() {
|
|
511
|
+
const { selections: CoachingAICriteriaBasedFeedbackRepresentation__selections, opaque: CoachingAICriteriaBasedFeedbackRepresentation__opaque, } = select$r();
|
|
512
|
+
return {
|
|
513
|
+
kind: 'Fragment',
|
|
514
|
+
version: VERSION$f,
|
|
515
|
+
private: [],
|
|
516
|
+
selections: [
|
|
517
|
+
{
|
|
518
|
+
name: 'additionalFeedback',
|
|
519
|
+
kind: 'Object',
|
|
520
|
+
// any
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
name: 'conversationSummaryId',
|
|
524
|
+
kind: 'Scalar'
|
|
525
|
+
},
|
|
526
|
+
{
|
|
527
|
+
name: 'criteriaBasedScores',
|
|
528
|
+
kind: 'Object',
|
|
529
|
+
plural: true,
|
|
530
|
+
selections: CoachingAICriteriaBasedFeedbackRepresentation__selections
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
name: 'score',
|
|
534
|
+
kind: 'Scalar'
|
|
535
|
+
}
|
|
536
|
+
]
|
|
537
|
+
};
|
|
538
|
+
};
|
|
539
|
+
function equals$f(existing, incoming) {
|
|
540
|
+
const existing_conversationSummaryId = existing.conversationSummaryId;
|
|
541
|
+
const incoming_conversationSummaryId = incoming.conversationSummaryId;
|
|
542
|
+
if (!(existing_conversationSummaryId === incoming_conversationSummaryId)) {
|
|
543
|
+
return false;
|
|
544
|
+
}
|
|
545
|
+
const existing_score = existing.score;
|
|
546
|
+
const incoming_score = incoming.score;
|
|
547
|
+
if (!(existing_score === incoming_score)) {
|
|
548
|
+
return false;
|
|
549
|
+
}
|
|
550
|
+
const existing_additionalFeedback = existing.additionalFeedback;
|
|
551
|
+
const incoming_additionalFeedback = incoming.additionalFeedback;
|
|
552
|
+
const equals_additionalFeedback_items = equalsArray(existing_additionalFeedback, incoming_additionalFeedback, (existing_additionalFeedback_item, incoming_additionalFeedback_item) => {
|
|
553
|
+
if (JSONStringify(incoming_additionalFeedback_item) !== JSONStringify(existing_additionalFeedback_item)) {
|
|
554
|
+
return false;
|
|
555
|
+
}
|
|
556
|
+
});
|
|
557
|
+
if (equals_additionalFeedback_items === false) {
|
|
558
|
+
return false;
|
|
559
|
+
}
|
|
560
|
+
const existing_criteriaBasedScores = existing.criteriaBasedScores;
|
|
561
|
+
const incoming_criteriaBasedScores = incoming.criteriaBasedScores;
|
|
562
|
+
const equals_criteriaBasedScores_items = equalsArray(existing_criteriaBasedScores, incoming_criteriaBasedScores, (existing_criteriaBasedScores_item, incoming_criteriaBasedScores_item) => {
|
|
563
|
+
if (!(equals$g(existing_criteriaBasedScores_item, incoming_criteriaBasedScores_item))) {
|
|
564
|
+
return false;
|
|
565
|
+
}
|
|
566
|
+
});
|
|
567
|
+
if (equals_criteriaBasedScores_items === false) {
|
|
568
|
+
return false;
|
|
569
|
+
}
|
|
570
|
+
return true;
|
|
571
|
+
}
|
|
572
|
+
const ingest$c = function CoachingAIFeedbackRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
573
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
574
|
+
const validateError = validate$f(input);
|
|
575
|
+
if (validateError !== null) {
|
|
576
|
+
throw validateError;
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
const key = path.fullPath;
|
|
580
|
+
const ttlToUse = path.ttl !== undefined ? path.ttl : 2592000000;
|
|
581
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$c, "LearningContentPlatform", VERSION$f, RepresentationType$c, equals$f);
|
|
582
|
+
return createLink(key);
|
|
583
|
+
};
|
|
584
|
+
function getTypeCacheKeys$c(rootKeySet, luvio, input, fullPathFactory) {
|
|
585
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
586
|
+
const rootKey = fullPathFactory();
|
|
587
|
+
rootKeySet.set(rootKey, {
|
|
588
|
+
namespace: keyPrefix,
|
|
589
|
+
representationName: RepresentationType$c,
|
|
590
|
+
mergeable: false
|
|
591
|
+
});
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
function select$p(luvio, params) {
|
|
595
|
+
return select$q();
|
|
596
|
+
}
|
|
597
|
+
function keyBuilder$q(luvio, params) {
|
|
598
|
+
return keyPrefix + '::CoachingAIFeedbackRepresentation:(' + 'learningItemSubmissionId:' + params.urlParams.learningItemSubmissionId + ')';
|
|
599
|
+
}
|
|
600
|
+
function getResponseCacheKeys$a(storeKeyMap, luvio, resourceParams, response) {
|
|
601
|
+
getTypeCacheKeys$c(storeKeyMap, luvio, response, () => keyBuilder$q(luvio, resourceParams));
|
|
602
|
+
}
|
|
603
|
+
function ingestSuccess$a(luvio, resourceParams, response, snapshotRefresh) {
|
|
604
|
+
const { body } = response;
|
|
605
|
+
const key = keyBuilder$q(luvio, resourceParams);
|
|
606
|
+
luvio.storeIngest(key, ingest$c, body);
|
|
607
|
+
const snapshot = luvio.storeLookup({
|
|
608
|
+
recordId: key,
|
|
609
|
+
node: select$p(),
|
|
610
|
+
variables: {},
|
|
611
|
+
}, snapshotRefresh);
|
|
612
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
613
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
614
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
deepFreeze(snapshot.data);
|
|
618
|
+
return snapshot;
|
|
619
|
+
}
|
|
620
|
+
function ingestError$9(luvio, params, error, snapshotRefresh) {
|
|
621
|
+
const key = keyBuilder$q(luvio, params);
|
|
622
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
623
|
+
luvio.storeIngestError(key, errorSnapshot);
|
|
624
|
+
return errorSnapshot;
|
|
625
|
+
}
|
|
626
|
+
function createResourceRequest$a(config) {
|
|
627
|
+
const headers = {};
|
|
628
|
+
return {
|
|
629
|
+
baseUri: '/services/data/v61.0',
|
|
630
|
+
basePath: '/learning-content-platform/coaching/' + config.urlParams.learningItemSubmissionId + '/ai-feedback',
|
|
631
|
+
method: 'get',
|
|
632
|
+
body: null,
|
|
633
|
+
urlParams: config.urlParams,
|
|
634
|
+
queryParams: {},
|
|
635
|
+
headers,
|
|
636
|
+
priority: 'normal',
|
|
637
|
+
};
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
const adapterName$a = 'getCoachingAIFeedback';
|
|
641
|
+
const getCoachingAIFeedback_ConfigPropertyMetadata = [
|
|
642
|
+
generateParamConfigMetadata('learningItemSubmissionId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
643
|
+
];
|
|
644
|
+
const getCoachingAIFeedback_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$a, getCoachingAIFeedback_ConfigPropertyMetadata);
|
|
645
|
+
const createResourceParams$a = /*#__PURE__*/ createResourceParams$c(getCoachingAIFeedback_ConfigPropertyMetadata);
|
|
646
|
+
function keyBuilder$p(luvio, config) {
|
|
647
|
+
const resourceParams = createResourceParams$a(config);
|
|
648
|
+
return keyBuilder$q(luvio, resourceParams);
|
|
649
|
+
}
|
|
650
|
+
function typeCheckConfig$a(untrustedConfig) {
|
|
651
|
+
const config = {};
|
|
652
|
+
typeCheckConfig$c(untrustedConfig, config, getCoachingAIFeedback_ConfigPropertyMetadata);
|
|
653
|
+
return config;
|
|
654
|
+
}
|
|
655
|
+
function validateAdapterConfig$a(untrustedConfig, configPropertyNames) {
|
|
656
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
657
|
+
return null;
|
|
658
|
+
}
|
|
659
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
660
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
661
|
+
}
|
|
662
|
+
const config = typeCheckConfig$a(untrustedConfig);
|
|
663
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
664
|
+
return null;
|
|
665
|
+
}
|
|
666
|
+
return config;
|
|
667
|
+
}
|
|
668
|
+
function adapterFragment$9(luvio, config) {
|
|
669
|
+
createResourceParams$a(config);
|
|
670
|
+
return select$p();
|
|
671
|
+
}
|
|
672
|
+
function onFetchResponseSuccess$9(luvio, config, resourceParams, response) {
|
|
673
|
+
const snapshot = ingestSuccess$a(luvio, resourceParams, response, {
|
|
674
|
+
config,
|
|
675
|
+
resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
|
|
676
|
+
});
|
|
677
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
678
|
+
}
|
|
679
|
+
function onFetchResponseError$9(luvio, config, resourceParams, response) {
|
|
680
|
+
const snapshot = ingestError$9(luvio, resourceParams, response, {
|
|
681
|
+
config,
|
|
682
|
+
resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
|
|
683
|
+
});
|
|
684
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
685
|
+
}
|
|
686
|
+
function buildNetworkSnapshot$a(luvio, config, options) {
|
|
687
|
+
const resourceParams = createResourceParams$a(config);
|
|
688
|
+
const request = createResourceRequest$a(resourceParams);
|
|
689
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
690
|
+
.then((response) => {
|
|
691
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$9(luvio, config, resourceParams, response), () => {
|
|
692
|
+
const cache = new StoreKeyMap();
|
|
693
|
+
getResponseCacheKeys$a(cache, luvio, resourceParams, response.body);
|
|
694
|
+
return cache;
|
|
695
|
+
});
|
|
696
|
+
}, (response) => {
|
|
697
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$9(luvio, config, resourceParams, response));
|
|
698
|
+
});
|
|
699
|
+
}
|
|
700
|
+
function buildNetworkSnapshotCachePolicy$9(context, coercedAdapterRequestContext) {
|
|
701
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$a, undefined, false);
|
|
702
|
+
}
|
|
703
|
+
function buildCachedSnapshotCachePolicy$9(context, storeLookup) {
|
|
704
|
+
const { luvio, config } = context;
|
|
705
|
+
const selector = {
|
|
706
|
+
recordId: keyBuilder$p(luvio, config),
|
|
707
|
+
node: adapterFragment$9(luvio, config),
|
|
708
|
+
variables: {},
|
|
415
709
|
};
|
|
710
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
711
|
+
config,
|
|
712
|
+
resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
|
|
713
|
+
});
|
|
714
|
+
return cacheSnapshot;
|
|
715
|
+
}
|
|
716
|
+
const getCoachingAIFeedbackAdapterFactory = (luvio) => function LearningContentPlatform__getCoachingAIFeedback(untrustedConfig, requestContext) {
|
|
717
|
+
const config = validateAdapterConfig$a(untrustedConfig, getCoachingAIFeedback_ConfigPropertyNames);
|
|
718
|
+
// Invalid or incomplete config
|
|
719
|
+
if (config === null) {
|
|
720
|
+
return null;
|
|
721
|
+
}
|
|
722
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
723
|
+
buildCachedSnapshotCachePolicy$9, buildNetworkSnapshotCachePolicy$9);
|
|
416
724
|
};
|
|
417
725
|
|
|
418
|
-
const TTL$
|
|
419
|
-
const VERSION$
|
|
420
|
-
function validate$
|
|
726
|
+
const TTL$6 = 15000;
|
|
727
|
+
const VERSION$e = "b489f9f2cbdc91a04dd15b4d467b6760";
|
|
728
|
+
function validate$e(obj, path = 'FeaturedItemRepresentation') {
|
|
421
729
|
const v_error = (() => {
|
|
422
730
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
423
731
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -814,23 +1122,23 @@ function validate$d(obj, path = 'FeaturedItemRepresentation') {
|
|
|
814
1122
|
})();
|
|
815
1123
|
return v_error === undefined ? null : v_error;
|
|
816
1124
|
}
|
|
817
|
-
const RepresentationType$
|
|
818
|
-
function keyBuilder$
|
|
819
|
-
return keyPrefix + '::' + RepresentationType$
|
|
1125
|
+
const RepresentationType$b = 'FeaturedItemRepresentation';
|
|
1126
|
+
function keyBuilder$o(luvio, config) {
|
|
1127
|
+
return keyPrefix + '::' + RepresentationType$b + ':' + config.id;
|
|
820
1128
|
}
|
|
821
|
-
function keyBuilderFromType$
|
|
1129
|
+
function keyBuilderFromType$6(luvio, object) {
|
|
822
1130
|
const keyParams = {
|
|
823
1131
|
id: object.id
|
|
824
1132
|
};
|
|
825
|
-
return keyBuilder$
|
|
1133
|
+
return keyBuilder$o(luvio, keyParams);
|
|
826
1134
|
}
|
|
827
|
-
function normalize$
|
|
1135
|
+
function normalize$b(input, existing, path, luvio, store, timestamp) {
|
|
828
1136
|
return input;
|
|
829
1137
|
}
|
|
830
|
-
const select$
|
|
1138
|
+
const select$o = function FeaturedItemRepresentationSelect() {
|
|
831
1139
|
return {
|
|
832
1140
|
kind: 'Fragment',
|
|
833
|
-
version: VERSION$
|
|
1141
|
+
version: VERSION$e,
|
|
834
1142
|
private: [],
|
|
835
1143
|
selections: [
|
|
836
1144
|
{
|
|
@@ -912,7 +1220,7 @@ const select$m = function FeaturedItemRepresentationSelect() {
|
|
|
912
1220
|
]
|
|
913
1221
|
};
|
|
914
1222
|
};
|
|
915
|
-
function equals$
|
|
1223
|
+
function equals$e(existing, incoming) {
|
|
916
1224
|
const existing_description = existing.description;
|
|
917
1225
|
const incoming_description = incoming.description;
|
|
918
1226
|
if (!(existing_description === incoming_description)) {
|
|
@@ -1010,30 +1318,30 @@ function equals$d(existing, incoming) {
|
|
|
1010
1318
|
}
|
|
1011
1319
|
return true;
|
|
1012
1320
|
}
|
|
1013
|
-
const ingest$
|
|
1321
|
+
const ingest$b = function FeaturedItemRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1014
1322
|
if (process.env.NODE_ENV !== 'production') {
|
|
1015
|
-
const validateError = validate$
|
|
1323
|
+
const validateError = validate$e(input);
|
|
1016
1324
|
if (validateError !== null) {
|
|
1017
1325
|
throw validateError;
|
|
1018
1326
|
}
|
|
1019
1327
|
}
|
|
1020
|
-
const key = keyBuilderFromType$
|
|
1021
|
-
const ttlToUse = TTL$
|
|
1022
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
1328
|
+
const key = keyBuilderFromType$6(luvio, input);
|
|
1329
|
+
const ttlToUse = TTL$6;
|
|
1330
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$b, "LearningContentPlatform", VERSION$e, RepresentationType$b, equals$e);
|
|
1023
1331
|
return createLink(key);
|
|
1024
1332
|
};
|
|
1025
|
-
function getTypeCacheKeys$
|
|
1333
|
+
function getTypeCacheKeys$b(rootKeySet, luvio, input, fullPathFactory) {
|
|
1026
1334
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1027
|
-
const rootKey = keyBuilderFromType$
|
|
1335
|
+
const rootKey = keyBuilderFromType$6(luvio, input);
|
|
1028
1336
|
rootKeySet.set(rootKey, {
|
|
1029
1337
|
namespace: keyPrefix,
|
|
1030
|
-
representationName: RepresentationType$
|
|
1338
|
+
representationName: RepresentationType$b,
|
|
1031
1339
|
mergeable: false
|
|
1032
1340
|
});
|
|
1033
1341
|
}
|
|
1034
1342
|
|
|
1035
|
-
const VERSION$
|
|
1036
|
-
function validate$
|
|
1343
|
+
const VERSION$d = "94c7194d9578589364c6efd021226634";
|
|
1344
|
+
function validate$d(obj, path = 'FeaturedItemRecommendedListRepresentation') {
|
|
1037
1345
|
const v_error = (() => {
|
|
1038
1346
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1039
1347
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1053,14 +1361,14 @@ function validate$c(obj, path = 'FeaturedItemRecommendedListRepresentation') {
|
|
|
1053
1361
|
})();
|
|
1054
1362
|
return v_error === undefined ? null : v_error;
|
|
1055
1363
|
}
|
|
1056
|
-
const RepresentationType$
|
|
1057
|
-
function normalize$
|
|
1364
|
+
const RepresentationType$a = 'FeaturedItemRecommendedListRepresentation';
|
|
1365
|
+
function normalize$a(input, existing, path, luvio, store, timestamp) {
|
|
1058
1366
|
const input_recommendedList = input.recommendedList;
|
|
1059
1367
|
const input_recommendedList_id = path.fullPath + '__recommendedList';
|
|
1060
1368
|
for (let i = 0; i < input_recommendedList.length; i++) {
|
|
1061
1369
|
const input_recommendedList_item = input_recommendedList[i];
|
|
1062
1370
|
let input_recommendedList_item_id = input_recommendedList_id + '__' + i;
|
|
1063
|
-
input_recommendedList[i] = ingest$
|
|
1371
|
+
input_recommendedList[i] = ingest$b(input_recommendedList_item, {
|
|
1064
1372
|
fullPath: input_recommendedList_item_id,
|
|
1065
1373
|
propertyName: i,
|
|
1066
1374
|
parent: {
|
|
@@ -1073,22 +1381,22 @@ function normalize$9(input, existing, path, luvio, store, timestamp) {
|
|
|
1073
1381
|
}
|
|
1074
1382
|
return input;
|
|
1075
1383
|
}
|
|
1076
|
-
const select$
|
|
1384
|
+
const select$n = function FeaturedItemRecommendedListRepresentationSelect() {
|
|
1077
1385
|
return {
|
|
1078
1386
|
kind: 'Fragment',
|
|
1079
|
-
version: VERSION$
|
|
1387
|
+
version: VERSION$d,
|
|
1080
1388
|
private: [],
|
|
1081
1389
|
selections: [
|
|
1082
1390
|
{
|
|
1083
1391
|
name: 'recommendedList',
|
|
1084
1392
|
kind: 'Link',
|
|
1085
1393
|
plural: true,
|
|
1086
|
-
fragment: select$
|
|
1394
|
+
fragment: select$o()
|
|
1087
1395
|
}
|
|
1088
1396
|
]
|
|
1089
1397
|
};
|
|
1090
1398
|
};
|
|
1091
|
-
function equals$
|
|
1399
|
+
function equals$d(existing, incoming) {
|
|
1092
1400
|
const existing_recommendedList = existing.recommendedList;
|
|
1093
1401
|
const incoming_recommendedList = incoming.recommendedList;
|
|
1094
1402
|
const equals_recommendedList_items = equalsArray(existing_recommendedList, incoming_recommendedList, (existing_recommendedList_item, incoming_recommendedList_item) => {
|
|
@@ -1101,48 +1409,48 @@ function equals$c(existing, incoming) {
|
|
|
1101
1409
|
}
|
|
1102
1410
|
return true;
|
|
1103
1411
|
}
|
|
1104
|
-
const ingest$
|
|
1412
|
+
const ingest$a = function FeaturedItemRecommendedListRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1105
1413
|
if (process.env.NODE_ENV !== 'production') {
|
|
1106
|
-
const validateError = validate$
|
|
1414
|
+
const validateError = validate$d(input);
|
|
1107
1415
|
if (validateError !== null) {
|
|
1108
1416
|
throw validateError;
|
|
1109
1417
|
}
|
|
1110
1418
|
}
|
|
1111
1419
|
const key = path.fullPath;
|
|
1112
1420
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 2592000000;
|
|
1113
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
1421
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$a, "LearningContentPlatform", VERSION$d, RepresentationType$a, equals$d);
|
|
1114
1422
|
return createLink(key);
|
|
1115
1423
|
};
|
|
1116
|
-
function getTypeCacheKeys$
|
|
1424
|
+
function getTypeCacheKeys$a(rootKeySet, luvio, input, fullPathFactory) {
|
|
1117
1425
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1118
1426
|
const rootKey = fullPathFactory();
|
|
1119
1427
|
rootKeySet.set(rootKey, {
|
|
1120
1428
|
namespace: keyPrefix,
|
|
1121
|
-
representationName: RepresentationType$
|
|
1429
|
+
representationName: RepresentationType$a,
|
|
1122
1430
|
mergeable: false
|
|
1123
1431
|
});
|
|
1124
1432
|
const input_recommendedList_length = input.recommendedList.length;
|
|
1125
1433
|
for (let i = 0; i < input_recommendedList_length; i++) {
|
|
1126
|
-
getTypeCacheKeys$
|
|
1434
|
+
getTypeCacheKeys$b(rootKeySet, luvio, input.recommendedList[i]);
|
|
1127
1435
|
}
|
|
1128
1436
|
}
|
|
1129
1437
|
|
|
1130
|
-
function select$
|
|
1131
|
-
return select$
|
|
1438
|
+
function select$m(luvio, params) {
|
|
1439
|
+
return select$n();
|
|
1132
1440
|
}
|
|
1133
|
-
function keyBuilder$
|
|
1441
|
+
function keyBuilder$n(luvio, params) {
|
|
1134
1442
|
return keyPrefix + '::FeaturedItemRecommendedListRepresentation:(' + 'appId:' + params.queryParams.appId + ',' + 'context:' + params.queryParams.context + ')';
|
|
1135
1443
|
}
|
|
1136
|
-
function getResponseCacheKeys$
|
|
1137
|
-
getTypeCacheKeys$
|
|
1444
|
+
function getResponseCacheKeys$9(storeKeyMap, luvio, resourceParams, response) {
|
|
1445
|
+
getTypeCacheKeys$a(storeKeyMap, luvio, response, () => keyBuilder$n(luvio, resourceParams));
|
|
1138
1446
|
}
|
|
1139
|
-
function ingestSuccess$
|
|
1447
|
+
function ingestSuccess$9(luvio, resourceParams, response, snapshotRefresh) {
|
|
1140
1448
|
const { body } = response;
|
|
1141
|
-
const key = keyBuilder$
|
|
1142
|
-
luvio.storeIngest(key, ingest$
|
|
1449
|
+
const key = keyBuilder$n(luvio, resourceParams);
|
|
1450
|
+
luvio.storeIngest(key, ingest$a, body);
|
|
1143
1451
|
const snapshot = luvio.storeLookup({
|
|
1144
1452
|
recordId: key,
|
|
1145
|
-
node: select$
|
|
1453
|
+
node: select$m(),
|
|
1146
1454
|
variables: {},
|
|
1147
1455
|
}, snapshotRefresh);
|
|
1148
1456
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1154,12 +1462,12 @@ function ingestSuccess$8(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1154
1462
|
return snapshot;
|
|
1155
1463
|
}
|
|
1156
1464
|
function ingestError$8(luvio, params, error, snapshotRefresh) {
|
|
1157
|
-
const key = keyBuilder$
|
|
1465
|
+
const key = keyBuilder$n(luvio, params);
|
|
1158
1466
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1159
1467
|
luvio.storeIngestError(key, errorSnapshot);
|
|
1160
1468
|
return errorSnapshot;
|
|
1161
1469
|
}
|
|
1162
|
-
function createResourceRequest$
|
|
1470
|
+
function createResourceRequest$9(config) {
|
|
1163
1471
|
const headers = {};
|
|
1164
1472
|
return {
|
|
1165
1473
|
baseUri: '/services/data/v61.0',
|
|
@@ -1173,61 +1481,61 @@ function createResourceRequest$8(config) {
|
|
|
1173
1481
|
};
|
|
1174
1482
|
}
|
|
1175
1483
|
|
|
1176
|
-
const adapterName$
|
|
1484
|
+
const adapterName$9 = 'getFeaturedItemsRecommendedList';
|
|
1177
1485
|
const getFeaturedItemsRecommendedList_ConfigPropertyMetadata = [
|
|
1178
1486
|
generateParamConfigMetadata('appId', true, 1 /* QueryParameter */, 0 /* String */),
|
|
1179
1487
|
generateParamConfigMetadata('context', true, 1 /* QueryParameter */, 0 /* String */),
|
|
1180
1488
|
];
|
|
1181
|
-
const getFeaturedItemsRecommendedList_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1182
|
-
const createResourceParams$
|
|
1183
|
-
function keyBuilder$
|
|
1184
|
-
const resourceParams = createResourceParams$
|
|
1185
|
-
return keyBuilder$
|
|
1489
|
+
const getFeaturedItemsRecommendedList_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$9, getFeaturedItemsRecommendedList_ConfigPropertyMetadata);
|
|
1490
|
+
const createResourceParams$9 = /*#__PURE__*/ createResourceParams$c(getFeaturedItemsRecommendedList_ConfigPropertyMetadata);
|
|
1491
|
+
function keyBuilder$m(luvio, config) {
|
|
1492
|
+
const resourceParams = createResourceParams$9(config);
|
|
1493
|
+
return keyBuilder$n(luvio, resourceParams);
|
|
1186
1494
|
}
|
|
1187
|
-
function typeCheckConfig$
|
|
1495
|
+
function typeCheckConfig$9(untrustedConfig) {
|
|
1188
1496
|
const config = {};
|
|
1189
|
-
typeCheckConfig$
|
|
1497
|
+
typeCheckConfig$c(untrustedConfig, config, getFeaturedItemsRecommendedList_ConfigPropertyMetadata);
|
|
1190
1498
|
return config;
|
|
1191
1499
|
}
|
|
1192
|
-
function validateAdapterConfig$
|
|
1500
|
+
function validateAdapterConfig$9(untrustedConfig, configPropertyNames) {
|
|
1193
1501
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1194
1502
|
return null;
|
|
1195
1503
|
}
|
|
1196
1504
|
if (process.env.NODE_ENV !== 'production') {
|
|
1197
1505
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1198
1506
|
}
|
|
1199
|
-
const config = typeCheckConfig$
|
|
1507
|
+
const config = typeCheckConfig$9(untrustedConfig);
|
|
1200
1508
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1201
1509
|
return null;
|
|
1202
1510
|
}
|
|
1203
1511
|
return config;
|
|
1204
1512
|
}
|
|
1205
1513
|
function adapterFragment$8(luvio, config) {
|
|
1206
|
-
createResourceParams$
|
|
1207
|
-
return select$
|
|
1514
|
+
createResourceParams$9(config);
|
|
1515
|
+
return select$m();
|
|
1208
1516
|
}
|
|
1209
1517
|
function onFetchResponseSuccess$8(luvio, config, resourceParams, response) {
|
|
1210
|
-
const snapshot = ingestSuccess$
|
|
1518
|
+
const snapshot = ingestSuccess$9(luvio, resourceParams, response, {
|
|
1211
1519
|
config,
|
|
1212
|
-
resolve: () => buildNetworkSnapshot$
|
|
1520
|
+
resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
|
|
1213
1521
|
});
|
|
1214
1522
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1215
1523
|
}
|
|
1216
1524
|
function onFetchResponseError$8(luvio, config, resourceParams, response) {
|
|
1217
1525
|
const snapshot = ingestError$8(luvio, resourceParams, response, {
|
|
1218
1526
|
config,
|
|
1219
|
-
resolve: () => buildNetworkSnapshot$
|
|
1527
|
+
resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
|
|
1220
1528
|
});
|
|
1221
1529
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1222
1530
|
}
|
|
1223
|
-
function buildNetworkSnapshot$
|
|
1224
|
-
const resourceParams = createResourceParams$
|
|
1225
|
-
const request = createResourceRequest$
|
|
1531
|
+
function buildNetworkSnapshot$9(luvio, config, options) {
|
|
1532
|
+
const resourceParams = createResourceParams$9(config);
|
|
1533
|
+
const request = createResourceRequest$9(resourceParams);
|
|
1226
1534
|
return luvio.dispatchResourceRequest(request, options)
|
|
1227
1535
|
.then((response) => {
|
|
1228
1536
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$8(luvio, config, resourceParams, response), () => {
|
|
1229
1537
|
const cache = new StoreKeyMap();
|
|
1230
|
-
getResponseCacheKeys$
|
|
1538
|
+
getResponseCacheKeys$9(cache, luvio, resourceParams, response.body);
|
|
1231
1539
|
return cache;
|
|
1232
1540
|
});
|
|
1233
1541
|
}, (response) => {
|
|
@@ -1235,23 +1543,23 @@ function buildNetworkSnapshot$8(luvio, config, options) {
|
|
|
1235
1543
|
});
|
|
1236
1544
|
}
|
|
1237
1545
|
function buildNetworkSnapshotCachePolicy$8(context, coercedAdapterRequestContext) {
|
|
1238
|
-
return buildNetworkSnapshotCachePolicy$
|
|
1546
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$9, undefined, false);
|
|
1239
1547
|
}
|
|
1240
1548
|
function buildCachedSnapshotCachePolicy$8(context, storeLookup) {
|
|
1241
1549
|
const { luvio, config } = context;
|
|
1242
1550
|
const selector = {
|
|
1243
|
-
recordId: keyBuilder$
|
|
1551
|
+
recordId: keyBuilder$m(luvio, config),
|
|
1244
1552
|
node: adapterFragment$8(luvio, config),
|
|
1245
1553
|
variables: {},
|
|
1246
1554
|
};
|
|
1247
1555
|
const cacheSnapshot = storeLookup(selector, {
|
|
1248
1556
|
config,
|
|
1249
|
-
resolve: () => buildNetworkSnapshot$
|
|
1557
|
+
resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
|
|
1250
1558
|
});
|
|
1251
1559
|
return cacheSnapshot;
|
|
1252
1560
|
}
|
|
1253
1561
|
const getFeaturedItemsRecommendedListAdapterFactory = (luvio) => function LearningContentPlatform__getFeaturedItemsRecommendedList(untrustedConfig, requestContext) {
|
|
1254
|
-
const config = validateAdapterConfig$
|
|
1562
|
+
const config = validateAdapterConfig$9(untrustedConfig, getFeaturedItemsRecommendedList_ConfigPropertyNames);
|
|
1255
1563
|
// Invalid or incomplete config
|
|
1256
1564
|
if (config === null) {
|
|
1257
1565
|
return null;
|
|
@@ -1260,8 +1568,8 @@ const getFeaturedItemsRecommendedListAdapterFactory = (luvio) => function Learni
|
|
|
1260
1568
|
buildCachedSnapshotCachePolicy$8, buildNetworkSnapshotCachePolicy$8);
|
|
1261
1569
|
};
|
|
1262
1570
|
|
|
1263
|
-
const VERSION$
|
|
1264
|
-
function validate$
|
|
1571
|
+
const VERSION$c = "5d7adb55f43466f61c4837ebf27eab61";
|
|
1572
|
+
function validate$c(obj, path = 'FeaturedItemRelatedListRepresentation') {
|
|
1265
1573
|
const v_error = (() => {
|
|
1266
1574
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1267
1575
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1281,14 +1589,14 @@ function validate$b(obj, path = 'FeaturedItemRelatedListRepresentation') {
|
|
|
1281
1589
|
})();
|
|
1282
1590
|
return v_error === undefined ? null : v_error;
|
|
1283
1591
|
}
|
|
1284
|
-
const RepresentationType$
|
|
1285
|
-
function normalize$
|
|
1592
|
+
const RepresentationType$9 = 'FeaturedItemRelatedListRepresentation';
|
|
1593
|
+
function normalize$9(input, existing, path, luvio, store, timestamp) {
|
|
1286
1594
|
const input_relatedList = input.relatedList;
|
|
1287
1595
|
const input_relatedList_id = path.fullPath + '__relatedList';
|
|
1288
1596
|
for (let i = 0; i < input_relatedList.length; i++) {
|
|
1289
1597
|
const input_relatedList_item = input_relatedList[i];
|
|
1290
1598
|
let input_relatedList_item_id = input_relatedList_id + '__' + i;
|
|
1291
|
-
input_relatedList[i] = ingest$
|
|
1599
|
+
input_relatedList[i] = ingest$b(input_relatedList_item, {
|
|
1292
1600
|
fullPath: input_relatedList_item_id,
|
|
1293
1601
|
propertyName: i,
|
|
1294
1602
|
parent: {
|
|
@@ -1301,22 +1609,22 @@ function normalize$8(input, existing, path, luvio, store, timestamp) {
|
|
|
1301
1609
|
}
|
|
1302
1610
|
return input;
|
|
1303
1611
|
}
|
|
1304
|
-
const select$
|
|
1612
|
+
const select$l = function FeaturedItemRelatedListRepresentationSelect() {
|
|
1305
1613
|
return {
|
|
1306
1614
|
kind: 'Fragment',
|
|
1307
|
-
version: VERSION$
|
|
1615
|
+
version: VERSION$c,
|
|
1308
1616
|
private: [],
|
|
1309
1617
|
selections: [
|
|
1310
1618
|
{
|
|
1311
1619
|
name: 'relatedList',
|
|
1312
1620
|
kind: 'Link',
|
|
1313
1621
|
plural: true,
|
|
1314
|
-
fragment: select$
|
|
1622
|
+
fragment: select$o()
|
|
1315
1623
|
}
|
|
1316
1624
|
]
|
|
1317
1625
|
};
|
|
1318
1626
|
};
|
|
1319
|
-
function equals$
|
|
1627
|
+
function equals$c(existing, incoming) {
|
|
1320
1628
|
const existing_relatedList = existing.relatedList;
|
|
1321
1629
|
const incoming_relatedList = incoming.relatedList;
|
|
1322
1630
|
const equals_relatedList_items = equalsArray(existing_relatedList, incoming_relatedList, (existing_relatedList_item, incoming_relatedList_item) => {
|
|
@@ -1329,48 +1637,48 @@ function equals$b(existing, incoming) {
|
|
|
1329
1637
|
}
|
|
1330
1638
|
return true;
|
|
1331
1639
|
}
|
|
1332
|
-
const ingest$
|
|
1640
|
+
const ingest$9 = function FeaturedItemRelatedListRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1333
1641
|
if (process.env.NODE_ENV !== 'production') {
|
|
1334
|
-
const validateError = validate$
|
|
1642
|
+
const validateError = validate$c(input);
|
|
1335
1643
|
if (validateError !== null) {
|
|
1336
1644
|
throw validateError;
|
|
1337
1645
|
}
|
|
1338
1646
|
}
|
|
1339
1647
|
const key = path.fullPath;
|
|
1340
1648
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 2592000000;
|
|
1341
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
1649
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$9, "LearningContentPlatform", VERSION$c, RepresentationType$9, equals$c);
|
|
1342
1650
|
return createLink(key);
|
|
1343
1651
|
};
|
|
1344
|
-
function getTypeCacheKeys$
|
|
1652
|
+
function getTypeCacheKeys$9(rootKeySet, luvio, input, fullPathFactory) {
|
|
1345
1653
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1346
1654
|
const rootKey = fullPathFactory();
|
|
1347
1655
|
rootKeySet.set(rootKey, {
|
|
1348
1656
|
namespace: keyPrefix,
|
|
1349
|
-
representationName: RepresentationType$
|
|
1657
|
+
representationName: RepresentationType$9,
|
|
1350
1658
|
mergeable: false
|
|
1351
1659
|
});
|
|
1352
1660
|
const input_relatedList_length = input.relatedList.length;
|
|
1353
1661
|
for (let i = 0; i < input_relatedList_length; i++) {
|
|
1354
|
-
getTypeCacheKeys$
|
|
1662
|
+
getTypeCacheKeys$b(rootKeySet, luvio, input.relatedList[i]);
|
|
1355
1663
|
}
|
|
1356
1664
|
}
|
|
1357
1665
|
|
|
1358
|
-
function select$
|
|
1359
|
-
return select$
|
|
1666
|
+
function select$k(luvio, params) {
|
|
1667
|
+
return select$l();
|
|
1360
1668
|
}
|
|
1361
|
-
function keyBuilder$
|
|
1362
|
-
return keyPrefix + '::FeaturedItemRelatedListRepresentation:(' + 'appId:' + params.queryParams.appId + ',' + 'pageRef:' + params.queryParams.pageRef + ')';
|
|
1669
|
+
function keyBuilder$l(luvio, params) {
|
|
1670
|
+
return keyPrefix + '::FeaturedItemRelatedListRepresentation:(' + 'appId:' + params.queryParams.appId + ',' + 'pageRef:' + params.queryParams.pageRef + ',' + 'returnMax:' + params.queryParams.returnMax + ')';
|
|
1363
1671
|
}
|
|
1364
|
-
function getResponseCacheKeys$
|
|
1365
|
-
getTypeCacheKeys$
|
|
1672
|
+
function getResponseCacheKeys$8(storeKeyMap, luvio, resourceParams, response) {
|
|
1673
|
+
getTypeCacheKeys$9(storeKeyMap, luvio, response, () => keyBuilder$l(luvio, resourceParams));
|
|
1366
1674
|
}
|
|
1367
|
-
function ingestSuccess$
|
|
1675
|
+
function ingestSuccess$8(luvio, resourceParams, response, snapshotRefresh) {
|
|
1368
1676
|
const { body } = response;
|
|
1369
|
-
const key = keyBuilder$
|
|
1370
|
-
luvio.storeIngest(key, ingest$
|
|
1677
|
+
const key = keyBuilder$l(luvio, resourceParams);
|
|
1678
|
+
luvio.storeIngest(key, ingest$9, body);
|
|
1371
1679
|
const snapshot = luvio.storeLookup({
|
|
1372
1680
|
recordId: key,
|
|
1373
|
-
node: select$
|
|
1681
|
+
node: select$k(),
|
|
1374
1682
|
variables: {},
|
|
1375
1683
|
}, snapshotRefresh);
|
|
1376
1684
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1382,12 +1690,12 @@ function ingestSuccess$7(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1382
1690
|
return snapshot;
|
|
1383
1691
|
}
|
|
1384
1692
|
function ingestError$7(luvio, params, error, snapshotRefresh) {
|
|
1385
|
-
const key = keyBuilder$
|
|
1693
|
+
const key = keyBuilder$l(luvio, params);
|
|
1386
1694
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1387
1695
|
luvio.storeIngestError(key, errorSnapshot);
|
|
1388
1696
|
return errorSnapshot;
|
|
1389
1697
|
}
|
|
1390
|
-
function createResourceRequest$
|
|
1698
|
+
function createResourceRequest$8(config) {
|
|
1391
1699
|
const headers = {};
|
|
1392
1700
|
return {
|
|
1393
1701
|
baseUri: '/services/data/v61.0',
|
|
@@ -1401,61 +1709,62 @@ function createResourceRequest$7(config) {
|
|
|
1401
1709
|
};
|
|
1402
1710
|
}
|
|
1403
1711
|
|
|
1404
|
-
const adapterName$
|
|
1712
|
+
const adapterName$8 = 'getFeaturedItemsRelatedList';
|
|
1405
1713
|
const getFeaturedItemsRelatedList_ConfigPropertyMetadata = [
|
|
1406
1714
|
generateParamConfigMetadata('appId', true, 1 /* QueryParameter */, 0 /* String */),
|
|
1407
1715
|
generateParamConfigMetadata('pageRef', true, 1 /* QueryParameter */, 0 /* String */),
|
|
1716
|
+
generateParamConfigMetadata('returnMax', false, 1 /* QueryParameter */, 1 /* Boolean */),
|
|
1408
1717
|
];
|
|
1409
|
-
const getFeaturedItemsRelatedList_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1410
|
-
const createResourceParams$
|
|
1411
|
-
function keyBuilder$
|
|
1412
|
-
const resourceParams = createResourceParams$
|
|
1413
|
-
return keyBuilder$
|
|
1718
|
+
const getFeaturedItemsRelatedList_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$8, getFeaturedItemsRelatedList_ConfigPropertyMetadata);
|
|
1719
|
+
const createResourceParams$8 = /*#__PURE__*/ createResourceParams$c(getFeaturedItemsRelatedList_ConfigPropertyMetadata);
|
|
1720
|
+
function keyBuilder$k(luvio, config) {
|
|
1721
|
+
const resourceParams = createResourceParams$8(config);
|
|
1722
|
+
return keyBuilder$l(luvio, resourceParams);
|
|
1414
1723
|
}
|
|
1415
|
-
function typeCheckConfig$
|
|
1724
|
+
function typeCheckConfig$8(untrustedConfig) {
|
|
1416
1725
|
const config = {};
|
|
1417
|
-
typeCheckConfig$
|
|
1726
|
+
typeCheckConfig$c(untrustedConfig, config, getFeaturedItemsRelatedList_ConfigPropertyMetadata);
|
|
1418
1727
|
return config;
|
|
1419
1728
|
}
|
|
1420
|
-
function validateAdapterConfig$
|
|
1729
|
+
function validateAdapterConfig$8(untrustedConfig, configPropertyNames) {
|
|
1421
1730
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1422
1731
|
return null;
|
|
1423
1732
|
}
|
|
1424
1733
|
if (process.env.NODE_ENV !== 'production') {
|
|
1425
1734
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1426
1735
|
}
|
|
1427
|
-
const config = typeCheckConfig$
|
|
1736
|
+
const config = typeCheckConfig$8(untrustedConfig);
|
|
1428
1737
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1429
1738
|
return null;
|
|
1430
1739
|
}
|
|
1431
1740
|
return config;
|
|
1432
1741
|
}
|
|
1433
1742
|
function adapterFragment$7(luvio, config) {
|
|
1434
|
-
createResourceParams$
|
|
1435
|
-
return select$
|
|
1743
|
+
createResourceParams$8(config);
|
|
1744
|
+
return select$k();
|
|
1436
1745
|
}
|
|
1437
1746
|
function onFetchResponseSuccess$7(luvio, config, resourceParams, response) {
|
|
1438
|
-
const snapshot = ingestSuccess$
|
|
1747
|
+
const snapshot = ingestSuccess$8(luvio, resourceParams, response, {
|
|
1439
1748
|
config,
|
|
1440
|
-
resolve: () => buildNetworkSnapshot$
|
|
1749
|
+
resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
|
|
1441
1750
|
});
|
|
1442
1751
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1443
1752
|
}
|
|
1444
1753
|
function onFetchResponseError$7(luvio, config, resourceParams, response) {
|
|
1445
1754
|
const snapshot = ingestError$7(luvio, resourceParams, response, {
|
|
1446
1755
|
config,
|
|
1447
|
-
resolve: () => buildNetworkSnapshot$
|
|
1756
|
+
resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
|
|
1448
1757
|
});
|
|
1449
1758
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1450
1759
|
}
|
|
1451
|
-
function buildNetworkSnapshot$
|
|
1452
|
-
const resourceParams = createResourceParams$
|
|
1453
|
-
const request = createResourceRequest$
|
|
1760
|
+
function buildNetworkSnapshot$8(luvio, config, options) {
|
|
1761
|
+
const resourceParams = createResourceParams$8(config);
|
|
1762
|
+
const request = createResourceRequest$8(resourceParams);
|
|
1454
1763
|
return luvio.dispatchResourceRequest(request, options)
|
|
1455
1764
|
.then((response) => {
|
|
1456
1765
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$7(luvio, config, resourceParams, response), () => {
|
|
1457
1766
|
const cache = new StoreKeyMap();
|
|
1458
|
-
getResponseCacheKeys$
|
|
1767
|
+
getResponseCacheKeys$8(cache, luvio, resourceParams, response.body);
|
|
1459
1768
|
return cache;
|
|
1460
1769
|
});
|
|
1461
1770
|
}, (response) => {
|
|
@@ -1463,23 +1772,23 @@ function buildNetworkSnapshot$7(luvio, config, options) {
|
|
|
1463
1772
|
});
|
|
1464
1773
|
}
|
|
1465
1774
|
function buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext) {
|
|
1466
|
-
return buildNetworkSnapshotCachePolicy$
|
|
1775
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$8, undefined, false);
|
|
1467
1776
|
}
|
|
1468
1777
|
function buildCachedSnapshotCachePolicy$7(context, storeLookup) {
|
|
1469
1778
|
const { luvio, config } = context;
|
|
1470
1779
|
const selector = {
|
|
1471
|
-
recordId: keyBuilder$
|
|
1780
|
+
recordId: keyBuilder$k(luvio, config),
|
|
1472
1781
|
node: adapterFragment$7(luvio, config),
|
|
1473
1782
|
variables: {},
|
|
1474
1783
|
};
|
|
1475
1784
|
const cacheSnapshot = storeLookup(selector, {
|
|
1476
1785
|
config,
|
|
1477
|
-
resolve: () => buildNetworkSnapshot$
|
|
1786
|
+
resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
|
|
1478
1787
|
});
|
|
1479
1788
|
return cacheSnapshot;
|
|
1480
1789
|
}
|
|
1481
1790
|
const getFeaturedItemsRelatedListAdapterFactory = (luvio) => function LearningContentPlatform__getFeaturedItemsRelatedList(untrustedConfig, requestContext) {
|
|
1482
|
-
const config = validateAdapterConfig$
|
|
1791
|
+
const config = validateAdapterConfig$8(untrustedConfig, getFeaturedItemsRelatedList_ConfigPropertyNames);
|
|
1483
1792
|
// Invalid or incomplete config
|
|
1484
1793
|
if (config === null) {
|
|
1485
1794
|
return null;
|
|
@@ -1488,8 +1797,8 @@ const getFeaturedItemsRelatedListAdapterFactory = (luvio) => function LearningCo
|
|
|
1488
1797
|
buildCachedSnapshotCachePolicy$7, buildNetworkSnapshotCachePolicy$7);
|
|
1489
1798
|
};
|
|
1490
1799
|
|
|
1491
|
-
const VERSION$
|
|
1492
|
-
function validate$
|
|
1800
|
+
const VERSION$b = "8471031fcff953c83f350a0f66b60ddb";
|
|
1801
|
+
function validate$b(obj, path = 'LearningConfigRepresentation') {
|
|
1493
1802
|
const v_error = (() => {
|
|
1494
1803
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1495
1804
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1512,14 +1821,14 @@ function validate$a(obj, path = 'LearningConfigRepresentation') {
|
|
|
1512
1821
|
})();
|
|
1513
1822
|
return v_error === undefined ? null : v_error;
|
|
1514
1823
|
}
|
|
1515
|
-
const RepresentationType$
|
|
1516
|
-
function normalize$
|
|
1824
|
+
const RepresentationType$8 = 'LearningConfigRepresentation';
|
|
1825
|
+
function normalize$8(input, existing, path, luvio, store, timestamp) {
|
|
1517
1826
|
return input;
|
|
1518
1827
|
}
|
|
1519
|
-
const select$
|
|
1828
|
+
const select$j = function LearningConfigRepresentationSelect() {
|
|
1520
1829
|
return {
|
|
1521
1830
|
kind: 'Fragment',
|
|
1522
|
-
version: VERSION$
|
|
1831
|
+
version: VERSION$b,
|
|
1523
1832
|
private: [],
|
|
1524
1833
|
selections: [
|
|
1525
1834
|
{
|
|
@@ -1537,7 +1846,7 @@ const select$h = function LearningConfigRepresentationSelect() {
|
|
|
1537
1846
|
]
|
|
1538
1847
|
};
|
|
1539
1848
|
};
|
|
1540
|
-
function equals$
|
|
1849
|
+
function equals$b(existing, incoming) {
|
|
1541
1850
|
const existing_hasElevatedLearningAccess = existing.hasElevatedLearningAccess;
|
|
1542
1851
|
const incoming_hasElevatedLearningAccess = incoming.hasElevatedLearningAccess;
|
|
1543
1852
|
if (!(existing_hasElevatedLearningAccess === incoming_hasElevatedLearningAccess)) {
|
|
@@ -1555,44 +1864,44 @@ function equals$a(existing, incoming) {
|
|
|
1555
1864
|
}
|
|
1556
1865
|
return true;
|
|
1557
1866
|
}
|
|
1558
|
-
const ingest$
|
|
1867
|
+
const ingest$8 = function LearningConfigRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1559
1868
|
if (process.env.NODE_ENV !== 'production') {
|
|
1560
|
-
const validateError = validate$
|
|
1869
|
+
const validateError = validate$b(input);
|
|
1561
1870
|
if (validateError !== null) {
|
|
1562
1871
|
throw validateError;
|
|
1563
1872
|
}
|
|
1564
1873
|
}
|
|
1565
1874
|
const key = path.fullPath;
|
|
1566
1875
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 2592000000;
|
|
1567
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
1876
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$8, "LearningContentPlatform", VERSION$b, RepresentationType$8, equals$b);
|
|
1568
1877
|
return createLink(key);
|
|
1569
1878
|
};
|
|
1570
|
-
function getTypeCacheKeys$
|
|
1879
|
+
function getTypeCacheKeys$8(rootKeySet, luvio, input, fullPathFactory) {
|
|
1571
1880
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1572
1881
|
const rootKey = fullPathFactory();
|
|
1573
1882
|
rootKeySet.set(rootKey, {
|
|
1574
1883
|
namespace: keyPrefix,
|
|
1575
|
-
representationName: RepresentationType$
|
|
1884
|
+
representationName: RepresentationType$8,
|
|
1576
1885
|
mergeable: false
|
|
1577
1886
|
});
|
|
1578
1887
|
}
|
|
1579
1888
|
|
|
1580
|
-
function select$
|
|
1581
|
-
return select$
|
|
1889
|
+
function select$i(luvio, params) {
|
|
1890
|
+
return select$j();
|
|
1582
1891
|
}
|
|
1583
|
-
function keyBuilder$
|
|
1892
|
+
function keyBuilder$j(luvio, params) {
|
|
1584
1893
|
return keyPrefix + '::LearningConfigRepresentation:(' + ')';
|
|
1585
1894
|
}
|
|
1586
|
-
function getResponseCacheKeys$
|
|
1587
|
-
getTypeCacheKeys$
|
|
1895
|
+
function getResponseCacheKeys$7(storeKeyMap, luvio, resourceParams, response) {
|
|
1896
|
+
getTypeCacheKeys$8(storeKeyMap, luvio, response, () => keyBuilder$j());
|
|
1588
1897
|
}
|
|
1589
|
-
function ingestSuccess$
|
|
1898
|
+
function ingestSuccess$7(luvio, resourceParams, response, snapshotRefresh) {
|
|
1590
1899
|
const { body } = response;
|
|
1591
|
-
const key = keyBuilder$
|
|
1592
|
-
luvio.storeIngest(key, ingest$
|
|
1900
|
+
const key = keyBuilder$j();
|
|
1901
|
+
luvio.storeIngest(key, ingest$8, body);
|
|
1593
1902
|
const snapshot = luvio.storeLookup({
|
|
1594
1903
|
recordId: key,
|
|
1595
|
-
node: select$
|
|
1904
|
+
node: select$i(),
|
|
1596
1905
|
variables: {},
|
|
1597
1906
|
}, snapshotRefresh);
|
|
1598
1907
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1604,12 +1913,12 @@ function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1604
1913
|
return snapshot;
|
|
1605
1914
|
}
|
|
1606
1915
|
function ingestError$6(luvio, params, error, snapshotRefresh) {
|
|
1607
|
-
const key = keyBuilder$
|
|
1916
|
+
const key = keyBuilder$j();
|
|
1608
1917
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1609
1918
|
luvio.storeIngestError(key, errorSnapshot);
|
|
1610
1919
|
return errorSnapshot;
|
|
1611
1920
|
}
|
|
1612
|
-
function createResourceRequest$
|
|
1921
|
+
function createResourceRequest$7(config) {
|
|
1613
1922
|
const headers = {};
|
|
1614
1923
|
return {
|
|
1615
1924
|
baseUri: '/services/data/v61.0',
|
|
@@ -1623,57 +1932,57 @@ function createResourceRequest$6(config) {
|
|
|
1623
1932
|
};
|
|
1624
1933
|
}
|
|
1625
1934
|
|
|
1626
|
-
const adapterName$
|
|
1935
|
+
const adapterName$7 = 'getLearningConfig';
|
|
1627
1936
|
const getLearningConfig_ConfigPropertyMetadata = [];
|
|
1628
|
-
const getLearningConfig_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1629
|
-
const createResourceParams$
|
|
1630
|
-
function keyBuilder$
|
|
1631
|
-
createResourceParams$
|
|
1632
|
-
return keyBuilder$
|
|
1937
|
+
const getLearningConfig_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$7, getLearningConfig_ConfigPropertyMetadata);
|
|
1938
|
+
const createResourceParams$7 = /*#__PURE__*/ createResourceParams$c(getLearningConfig_ConfigPropertyMetadata);
|
|
1939
|
+
function keyBuilder$i(luvio, config) {
|
|
1940
|
+
createResourceParams$7(config);
|
|
1941
|
+
return keyBuilder$j();
|
|
1633
1942
|
}
|
|
1634
|
-
function typeCheckConfig$
|
|
1943
|
+
function typeCheckConfig$7(untrustedConfig) {
|
|
1635
1944
|
const config = {};
|
|
1636
1945
|
return config;
|
|
1637
1946
|
}
|
|
1638
|
-
function validateAdapterConfig$
|
|
1947
|
+
function validateAdapterConfig$7(untrustedConfig, configPropertyNames) {
|
|
1639
1948
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1640
1949
|
return null;
|
|
1641
1950
|
}
|
|
1642
1951
|
if (process.env.NODE_ENV !== 'production') {
|
|
1643
1952
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1644
1953
|
}
|
|
1645
|
-
const config = typeCheckConfig$
|
|
1954
|
+
const config = typeCheckConfig$7();
|
|
1646
1955
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1647
1956
|
return null;
|
|
1648
1957
|
}
|
|
1649
1958
|
return config;
|
|
1650
1959
|
}
|
|
1651
1960
|
function adapterFragment$6(luvio, config) {
|
|
1652
|
-
createResourceParams$
|
|
1653
|
-
return select$
|
|
1961
|
+
createResourceParams$7(config);
|
|
1962
|
+
return select$i();
|
|
1654
1963
|
}
|
|
1655
1964
|
function onFetchResponseSuccess$6(luvio, config, resourceParams, response) {
|
|
1656
|
-
const snapshot = ingestSuccess$
|
|
1965
|
+
const snapshot = ingestSuccess$7(luvio, resourceParams, response, {
|
|
1657
1966
|
config,
|
|
1658
|
-
resolve: () => buildNetworkSnapshot$
|
|
1967
|
+
resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
|
|
1659
1968
|
});
|
|
1660
1969
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1661
1970
|
}
|
|
1662
1971
|
function onFetchResponseError$6(luvio, config, resourceParams, response) {
|
|
1663
1972
|
const snapshot = ingestError$6(luvio, resourceParams, response, {
|
|
1664
1973
|
config,
|
|
1665
|
-
resolve: () => buildNetworkSnapshot$
|
|
1974
|
+
resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
|
|
1666
1975
|
});
|
|
1667
1976
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1668
1977
|
}
|
|
1669
|
-
function buildNetworkSnapshot$
|
|
1670
|
-
const resourceParams = createResourceParams$
|
|
1671
|
-
const request = createResourceRequest$
|
|
1978
|
+
function buildNetworkSnapshot$7(luvio, config, options) {
|
|
1979
|
+
const resourceParams = createResourceParams$7(config);
|
|
1980
|
+
const request = createResourceRequest$7();
|
|
1672
1981
|
return luvio.dispatchResourceRequest(request, options)
|
|
1673
1982
|
.then((response) => {
|
|
1674
1983
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$6(luvio, config, resourceParams, response), () => {
|
|
1675
1984
|
const cache = new StoreKeyMap();
|
|
1676
|
-
getResponseCacheKeys$
|
|
1985
|
+
getResponseCacheKeys$7(cache, luvio, resourceParams, response.body);
|
|
1677
1986
|
return cache;
|
|
1678
1987
|
});
|
|
1679
1988
|
}, (response) => {
|
|
@@ -1681,23 +1990,23 @@ function buildNetworkSnapshot$6(luvio, config, options) {
|
|
|
1681
1990
|
});
|
|
1682
1991
|
}
|
|
1683
1992
|
function buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext) {
|
|
1684
|
-
return buildNetworkSnapshotCachePolicy$
|
|
1993
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$7, undefined, false);
|
|
1685
1994
|
}
|
|
1686
1995
|
function buildCachedSnapshotCachePolicy$6(context, storeLookup) {
|
|
1687
1996
|
const { luvio, config } = context;
|
|
1688
1997
|
const selector = {
|
|
1689
|
-
recordId: keyBuilder$
|
|
1998
|
+
recordId: keyBuilder$i(luvio, config),
|
|
1690
1999
|
node: adapterFragment$6(luvio, config),
|
|
1691
2000
|
variables: {},
|
|
1692
2001
|
};
|
|
1693
2002
|
const cacheSnapshot = storeLookup(selector, {
|
|
1694
2003
|
config,
|
|
1695
|
-
resolve: () => buildNetworkSnapshot$
|
|
2004
|
+
resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
|
|
1696
2005
|
});
|
|
1697
2006
|
return cacheSnapshot;
|
|
1698
2007
|
}
|
|
1699
2008
|
const getLearningConfigAdapterFactory = (luvio) => function LearningContentPlatform__getLearningConfig(untrustedConfig, requestContext) {
|
|
1700
|
-
const config = validateAdapterConfig$
|
|
2009
|
+
const config = validateAdapterConfig$7(untrustedConfig, getLearningConfig_ConfigPropertyNames);
|
|
1701
2010
|
// Invalid or incomplete config
|
|
1702
2011
|
if (config === null) {
|
|
1703
2012
|
return null;
|
|
@@ -1706,8 +2015,8 @@ const getLearningConfigAdapterFactory = (luvio) => function LearningContentPlatf
|
|
|
1706
2015
|
buildCachedSnapshotCachePolicy$6, buildNetworkSnapshotCachePolicy$6);
|
|
1707
2016
|
};
|
|
1708
2017
|
|
|
1709
|
-
const VERSION$
|
|
1710
|
-
function validate$
|
|
2018
|
+
const VERSION$a = "1292f1a549c777c6586cca649e823737";
|
|
2019
|
+
function validate$a(obj, path = 'LearningItemProgressListRepresentation') {
|
|
1711
2020
|
const v_error = (() => {
|
|
1712
2021
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1713
2022
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1727,14 +2036,14 @@ function validate$9(obj, path = 'LearningItemProgressListRepresentation') {
|
|
|
1727
2036
|
})();
|
|
1728
2037
|
return v_error === undefined ? null : v_error;
|
|
1729
2038
|
}
|
|
1730
|
-
const RepresentationType$
|
|
1731
|
-
function normalize$
|
|
2039
|
+
const RepresentationType$7 = 'LearningItemProgressListRepresentation';
|
|
2040
|
+
function normalize$7(input, existing, path, luvio, store, timestamp) {
|
|
1732
2041
|
const input_list = input.list;
|
|
1733
2042
|
const input_list_id = path.fullPath + '__list';
|
|
1734
2043
|
for (let i = 0; i < input_list.length; i++) {
|
|
1735
2044
|
const input_list_item = input_list[i];
|
|
1736
2045
|
let input_list_item_id = input_list_id + '__' + i;
|
|
1737
|
-
input_list[i] = ingest$
|
|
2046
|
+
input_list[i] = ingest$d(input_list_item, {
|
|
1738
2047
|
fullPath: input_list_item_id,
|
|
1739
2048
|
propertyName: i,
|
|
1740
2049
|
parent: {
|
|
@@ -1747,22 +2056,22 @@ function normalize$6(input, existing, path, luvio, store, timestamp) {
|
|
|
1747
2056
|
}
|
|
1748
2057
|
return input;
|
|
1749
2058
|
}
|
|
1750
|
-
const select$
|
|
2059
|
+
const select$h = function LearningItemProgressListRepresentationSelect() {
|
|
1751
2060
|
return {
|
|
1752
2061
|
kind: 'Fragment',
|
|
1753
|
-
version: VERSION$
|
|
2062
|
+
version: VERSION$a,
|
|
1754
2063
|
private: [],
|
|
1755
2064
|
selections: [
|
|
1756
2065
|
{
|
|
1757
2066
|
name: 'list',
|
|
1758
2067
|
kind: 'Link',
|
|
1759
2068
|
plural: true,
|
|
1760
|
-
fragment: select$
|
|
2069
|
+
fragment: select$t()
|
|
1761
2070
|
}
|
|
1762
2071
|
]
|
|
1763
2072
|
};
|
|
1764
2073
|
};
|
|
1765
|
-
function equals$
|
|
2074
|
+
function equals$a(existing, incoming) {
|
|
1766
2075
|
const existing_list = existing.list;
|
|
1767
2076
|
const incoming_list = incoming.list;
|
|
1768
2077
|
const equals_list_items = equalsArray(existing_list, incoming_list, (existing_list_item, incoming_list_item) => {
|
|
@@ -1775,48 +2084,48 @@ function equals$9(existing, incoming) {
|
|
|
1775
2084
|
}
|
|
1776
2085
|
return true;
|
|
1777
2086
|
}
|
|
1778
|
-
const ingest$
|
|
2087
|
+
const ingest$7 = function LearningItemProgressListRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1779
2088
|
if (process.env.NODE_ENV !== 'production') {
|
|
1780
|
-
const validateError = validate$
|
|
2089
|
+
const validateError = validate$a(input);
|
|
1781
2090
|
if (validateError !== null) {
|
|
1782
2091
|
throw validateError;
|
|
1783
2092
|
}
|
|
1784
2093
|
}
|
|
1785
2094
|
const key = path.fullPath;
|
|
1786
2095
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 2592000000;
|
|
1787
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
2096
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$7, "LearningContentPlatform", VERSION$a, RepresentationType$7, equals$a);
|
|
1788
2097
|
return createLink(key);
|
|
1789
2098
|
};
|
|
1790
|
-
function getTypeCacheKeys$
|
|
2099
|
+
function getTypeCacheKeys$7(rootKeySet, luvio, input, fullPathFactory) {
|
|
1791
2100
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1792
2101
|
const rootKey = fullPathFactory();
|
|
1793
2102
|
rootKeySet.set(rootKey, {
|
|
1794
2103
|
namespace: keyPrefix,
|
|
1795
|
-
representationName: RepresentationType$
|
|
2104
|
+
representationName: RepresentationType$7,
|
|
1796
2105
|
mergeable: false
|
|
1797
2106
|
});
|
|
1798
2107
|
const input_list_length = input.list.length;
|
|
1799
2108
|
for (let i = 0; i < input_list_length; i++) {
|
|
1800
|
-
getTypeCacheKeys$
|
|
2109
|
+
getTypeCacheKeys$d(rootKeySet, luvio, input.list[i]);
|
|
1801
2110
|
}
|
|
1802
2111
|
}
|
|
1803
2112
|
|
|
1804
|
-
function select$
|
|
1805
|
-
return select$
|
|
2113
|
+
function select$g(luvio, params) {
|
|
2114
|
+
return select$h();
|
|
1806
2115
|
}
|
|
1807
|
-
function keyBuilder$
|
|
2116
|
+
function keyBuilder$h(luvio, params) {
|
|
1808
2117
|
return keyPrefix + '::LearningItemProgressListRepresentation:(' + 'learningItemIds:' + params.queryParams.learningItemIds + ')';
|
|
1809
2118
|
}
|
|
1810
|
-
function getResponseCacheKeys$
|
|
1811
|
-
getTypeCacheKeys$
|
|
2119
|
+
function getResponseCacheKeys$6(storeKeyMap, luvio, resourceParams, response) {
|
|
2120
|
+
getTypeCacheKeys$7(storeKeyMap, luvio, response, () => keyBuilder$h(luvio, resourceParams));
|
|
1812
2121
|
}
|
|
1813
|
-
function ingestSuccess$
|
|
2122
|
+
function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
|
|
1814
2123
|
const { body } = response;
|
|
1815
|
-
const key = keyBuilder$
|
|
1816
|
-
luvio.storeIngest(key, ingest$
|
|
2124
|
+
const key = keyBuilder$h(luvio, resourceParams);
|
|
2125
|
+
luvio.storeIngest(key, ingest$7, body);
|
|
1817
2126
|
const snapshot = luvio.storeLookup({
|
|
1818
2127
|
recordId: key,
|
|
1819
|
-
node: select$
|
|
2128
|
+
node: select$g(),
|
|
1820
2129
|
variables: {},
|
|
1821
2130
|
}, snapshotRefresh);
|
|
1822
2131
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1828,12 +2137,12 @@ function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1828
2137
|
return snapshot;
|
|
1829
2138
|
}
|
|
1830
2139
|
function ingestError$5(luvio, params, error, snapshotRefresh) {
|
|
1831
|
-
const key = keyBuilder$
|
|
2140
|
+
const key = keyBuilder$h(luvio, params);
|
|
1832
2141
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1833
2142
|
luvio.storeIngestError(key, errorSnapshot);
|
|
1834
2143
|
return errorSnapshot;
|
|
1835
2144
|
}
|
|
1836
|
-
function createResourceRequest$
|
|
2145
|
+
function createResourceRequest$6(config) {
|
|
1837
2146
|
const headers = {};
|
|
1838
2147
|
return {
|
|
1839
2148
|
baseUri: '/services/data/v61.0',
|
|
@@ -1847,60 +2156,60 @@ function createResourceRequest$5(config) {
|
|
|
1847
2156
|
};
|
|
1848
2157
|
}
|
|
1849
2158
|
|
|
1850
|
-
const adapterName$
|
|
2159
|
+
const adapterName$6 = 'getLearningItemProgress';
|
|
1851
2160
|
const getLearningItemProgress_ConfigPropertyMetadata = [
|
|
1852
2161
|
generateParamConfigMetadata('learningItemIds', false, 1 /* QueryParameter */, 0 /* String */, true),
|
|
1853
2162
|
];
|
|
1854
|
-
const getLearningItemProgress_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1855
|
-
const createResourceParams$
|
|
1856
|
-
function keyBuilder$
|
|
1857
|
-
const resourceParams = createResourceParams$
|
|
1858
|
-
return keyBuilder$
|
|
2163
|
+
const getLearningItemProgress_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, getLearningItemProgress_ConfigPropertyMetadata);
|
|
2164
|
+
const createResourceParams$6 = /*#__PURE__*/ createResourceParams$c(getLearningItemProgress_ConfigPropertyMetadata);
|
|
2165
|
+
function keyBuilder$g(luvio, config) {
|
|
2166
|
+
const resourceParams = createResourceParams$6(config);
|
|
2167
|
+
return keyBuilder$h(luvio, resourceParams);
|
|
1859
2168
|
}
|
|
1860
|
-
function typeCheckConfig$
|
|
2169
|
+
function typeCheckConfig$6(untrustedConfig) {
|
|
1861
2170
|
const config = {};
|
|
1862
|
-
typeCheckConfig$
|
|
2171
|
+
typeCheckConfig$c(untrustedConfig, config, getLearningItemProgress_ConfigPropertyMetadata);
|
|
1863
2172
|
return config;
|
|
1864
2173
|
}
|
|
1865
|
-
function validateAdapterConfig$
|
|
2174
|
+
function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
|
|
1866
2175
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1867
2176
|
return null;
|
|
1868
2177
|
}
|
|
1869
2178
|
if (process.env.NODE_ENV !== 'production') {
|
|
1870
2179
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1871
2180
|
}
|
|
1872
|
-
const config = typeCheckConfig$
|
|
2181
|
+
const config = typeCheckConfig$6(untrustedConfig);
|
|
1873
2182
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1874
2183
|
return null;
|
|
1875
2184
|
}
|
|
1876
2185
|
return config;
|
|
1877
2186
|
}
|
|
1878
2187
|
function adapterFragment$5(luvio, config) {
|
|
1879
|
-
createResourceParams$
|
|
1880
|
-
return select$
|
|
2188
|
+
createResourceParams$6(config);
|
|
2189
|
+
return select$g();
|
|
1881
2190
|
}
|
|
1882
2191
|
function onFetchResponseSuccess$5(luvio, config, resourceParams, response) {
|
|
1883
|
-
const snapshot = ingestSuccess$
|
|
2192
|
+
const snapshot = ingestSuccess$6(luvio, resourceParams, response, {
|
|
1884
2193
|
config,
|
|
1885
|
-
resolve: () => buildNetworkSnapshot$
|
|
2194
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
1886
2195
|
});
|
|
1887
2196
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1888
2197
|
}
|
|
1889
2198
|
function onFetchResponseError$5(luvio, config, resourceParams, response) {
|
|
1890
2199
|
const snapshot = ingestError$5(luvio, resourceParams, response, {
|
|
1891
2200
|
config,
|
|
1892
|
-
resolve: () => buildNetworkSnapshot$
|
|
2201
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
1893
2202
|
});
|
|
1894
2203
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1895
2204
|
}
|
|
1896
|
-
function buildNetworkSnapshot$
|
|
1897
|
-
const resourceParams = createResourceParams$
|
|
1898
|
-
const request = createResourceRequest$
|
|
2205
|
+
function buildNetworkSnapshot$6(luvio, config, options) {
|
|
2206
|
+
const resourceParams = createResourceParams$6(config);
|
|
2207
|
+
const request = createResourceRequest$6(resourceParams);
|
|
1899
2208
|
return luvio.dispatchResourceRequest(request, options)
|
|
1900
2209
|
.then((response) => {
|
|
1901
2210
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$5(luvio, config, resourceParams, response), () => {
|
|
1902
2211
|
const cache = new StoreKeyMap();
|
|
1903
|
-
getResponseCacheKeys$
|
|
2212
|
+
getResponseCacheKeys$6(cache, luvio, resourceParams, response.body);
|
|
1904
2213
|
return cache;
|
|
1905
2214
|
});
|
|
1906
2215
|
}, (response) => {
|
|
@@ -1908,23 +2217,23 @@ function buildNetworkSnapshot$5(luvio, config, options) {
|
|
|
1908
2217
|
});
|
|
1909
2218
|
}
|
|
1910
2219
|
function buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext) {
|
|
1911
|
-
return buildNetworkSnapshotCachePolicy$
|
|
2220
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$6, undefined, false);
|
|
1912
2221
|
}
|
|
1913
2222
|
function buildCachedSnapshotCachePolicy$5(context, storeLookup) {
|
|
1914
2223
|
const { luvio, config } = context;
|
|
1915
2224
|
const selector = {
|
|
1916
|
-
recordId: keyBuilder$
|
|
2225
|
+
recordId: keyBuilder$g(luvio, config),
|
|
1917
2226
|
node: adapterFragment$5(luvio, config),
|
|
1918
2227
|
variables: {},
|
|
1919
2228
|
};
|
|
1920
2229
|
const cacheSnapshot = storeLookup(selector, {
|
|
1921
2230
|
config,
|
|
1922
|
-
resolve: () => buildNetworkSnapshot$
|
|
2231
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
1923
2232
|
});
|
|
1924
2233
|
return cacheSnapshot;
|
|
1925
2234
|
}
|
|
1926
2235
|
const getLearningItemProgressAdapterFactory = (luvio) => function LearningContentPlatform__getLearningItemProgress(untrustedConfig, requestContext) {
|
|
1927
|
-
const config = validateAdapterConfig$
|
|
2236
|
+
const config = validateAdapterConfig$6(untrustedConfig, getLearningItemProgress_ConfigPropertyNames);
|
|
1928
2237
|
// Invalid or incomplete config
|
|
1929
2238
|
if (config === null) {
|
|
1930
2239
|
return null;
|
|
@@ -1933,9 +2242,9 @@ const getLearningItemProgressAdapterFactory = (luvio) => function LearningConten
|
|
|
1933
2242
|
buildCachedSnapshotCachePolicy$5, buildNetworkSnapshotCachePolicy$5);
|
|
1934
2243
|
};
|
|
1935
2244
|
|
|
1936
|
-
const TTL$
|
|
1937
|
-
const VERSION$
|
|
1938
|
-
function validate$
|
|
2245
|
+
const TTL$5 = 60000;
|
|
2246
|
+
const VERSION$9 = "1832481a3fe10deeb9c5dddba933f3da";
|
|
2247
|
+
function validate$9(obj, path = 'LearningItemRepresentation') {
|
|
1939
2248
|
const v_error = (() => {
|
|
1940
2249
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1941
2250
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2230,23 +2539,23 @@ function validate$8(obj, path = 'LearningItemRepresentation') {
|
|
|
2230
2539
|
})();
|
|
2231
2540
|
return v_error === undefined ? null : v_error;
|
|
2232
2541
|
}
|
|
2233
|
-
const RepresentationType$
|
|
2234
|
-
function keyBuilder$
|
|
2235
|
-
return keyPrefix + '::' + RepresentationType$
|
|
2542
|
+
const RepresentationType$6 = 'LearningItemRepresentation';
|
|
2543
|
+
function keyBuilder$f(luvio, config) {
|
|
2544
|
+
return keyPrefix + '::' + RepresentationType$6 + ':' + (config.learning_item_id === null ? '' : config.learning_item_id);
|
|
2236
2545
|
}
|
|
2237
|
-
function keyBuilderFromType$
|
|
2546
|
+
function keyBuilderFromType$5(luvio, object) {
|
|
2238
2547
|
const keyParams = {
|
|
2239
2548
|
learning_item_id: object.id
|
|
2240
2549
|
};
|
|
2241
|
-
return keyBuilder$
|
|
2550
|
+
return keyBuilder$f(luvio, keyParams);
|
|
2242
2551
|
}
|
|
2243
|
-
function normalize$
|
|
2552
|
+
function normalize$6(input, existing, path, luvio, store, timestamp) {
|
|
2244
2553
|
return input;
|
|
2245
2554
|
}
|
|
2246
|
-
const select$
|
|
2555
|
+
const select$f = function LearningItemRepresentationSelect() {
|
|
2247
2556
|
return {
|
|
2248
2557
|
kind: 'Fragment',
|
|
2249
|
-
version: VERSION$
|
|
2558
|
+
version: VERSION$9,
|
|
2250
2559
|
private: [],
|
|
2251
2560
|
selections: [
|
|
2252
2561
|
{
|
|
@@ -2300,7 +2609,7 @@ const select$d = function LearningItemRepresentationSelect() {
|
|
|
2300
2609
|
]
|
|
2301
2610
|
};
|
|
2302
2611
|
};
|
|
2303
|
-
function equals$
|
|
2612
|
+
function equals$9(existing, incoming) {
|
|
2304
2613
|
const existing_completionRate = existing.completionRate;
|
|
2305
2614
|
const incoming_completionRate = incoming.completionRate;
|
|
2306
2615
|
if (!(existing_completionRate === incoming_completionRate)) {
|
|
@@ -2363,24 +2672,24 @@ function equals$8(existing, incoming) {
|
|
|
2363
2672
|
}
|
|
2364
2673
|
return true;
|
|
2365
2674
|
}
|
|
2366
|
-
const ingest$
|
|
2675
|
+
const ingest$6 = function LearningItemRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2367
2676
|
if (process.env.NODE_ENV !== 'production') {
|
|
2368
|
-
const validateError = validate$
|
|
2677
|
+
const validateError = validate$9(input);
|
|
2369
2678
|
if (validateError !== null) {
|
|
2370
2679
|
throw validateError;
|
|
2371
2680
|
}
|
|
2372
2681
|
}
|
|
2373
|
-
const key = keyBuilderFromType$
|
|
2374
|
-
const ttlToUse = TTL$
|
|
2375
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
2682
|
+
const key = keyBuilderFromType$5(luvio, input);
|
|
2683
|
+
const ttlToUse = TTL$5;
|
|
2684
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$6, "LearningContentPlatform", VERSION$9, RepresentationType$6, equals$9);
|
|
2376
2685
|
return createLink(key);
|
|
2377
2686
|
};
|
|
2378
|
-
function getTypeCacheKeys$
|
|
2687
|
+
function getTypeCacheKeys$6(rootKeySet, luvio, input, fullPathFactory) {
|
|
2379
2688
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2380
|
-
const rootKey = keyBuilderFromType$
|
|
2689
|
+
const rootKey = keyBuilderFromType$5(luvio, input);
|
|
2381
2690
|
rootKeySet.set(rootKey, {
|
|
2382
2691
|
namespace: keyPrefix,
|
|
2383
|
-
representationName: RepresentationType$
|
|
2692
|
+
representationName: RepresentationType$6,
|
|
2384
2693
|
mergeable: false
|
|
2385
2694
|
});
|
|
2386
2695
|
}
|
|
@@ -2394,13 +2703,13 @@ const notifyUpdateAvailableFactory$1 = (luvio) => {
|
|
|
2394
2703
|
}
|
|
2395
2704
|
});
|
|
2396
2705
|
}
|
|
2397
|
-
const keys = configs.map(c => keyBuilder$
|
|
2706
|
+
const keys = configs.map(c => keyBuilder$f(luvio, c));
|
|
2398
2707
|
return luvio.notifyStoreUpdateAvailable(keys);
|
|
2399
2708
|
};
|
|
2400
2709
|
};
|
|
2401
2710
|
|
|
2402
|
-
const VERSION$
|
|
2403
|
-
function validate$
|
|
2711
|
+
const VERSION$8 = "cd4c27f064c3139aef14a6ef22627c0f";
|
|
2712
|
+
function validate$8(obj, path = 'LearningItemListRepresentation') {
|
|
2404
2713
|
const v_error = (() => {
|
|
2405
2714
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2406
2715
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2420,14 +2729,14 @@ function validate$7(obj, path = 'LearningItemListRepresentation') {
|
|
|
2420
2729
|
})();
|
|
2421
2730
|
return v_error === undefined ? null : v_error;
|
|
2422
2731
|
}
|
|
2423
|
-
const RepresentationType$
|
|
2424
|
-
function normalize$
|
|
2732
|
+
const RepresentationType$5 = 'LearningItemListRepresentation';
|
|
2733
|
+
function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
2425
2734
|
const input_list = input.list;
|
|
2426
2735
|
const input_list_id = path.fullPath + '__list';
|
|
2427
2736
|
for (let i = 0; i < input_list.length; i++) {
|
|
2428
2737
|
const input_list_item = input_list[i];
|
|
2429
2738
|
let input_list_item_id = input_list_id + '__' + i;
|
|
2430
|
-
input_list[i] = ingest$
|
|
2739
|
+
input_list[i] = ingest$6(input_list_item, {
|
|
2431
2740
|
fullPath: input_list_item_id,
|
|
2432
2741
|
propertyName: i,
|
|
2433
2742
|
parent: {
|
|
@@ -2440,22 +2749,22 @@ function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
|
2440
2749
|
}
|
|
2441
2750
|
return input;
|
|
2442
2751
|
}
|
|
2443
|
-
const select$
|
|
2752
|
+
const select$e = function LearningItemListRepresentationSelect() {
|
|
2444
2753
|
return {
|
|
2445
2754
|
kind: 'Fragment',
|
|
2446
|
-
version: VERSION$
|
|
2755
|
+
version: VERSION$8,
|
|
2447
2756
|
private: [],
|
|
2448
2757
|
selections: [
|
|
2449
2758
|
{
|
|
2450
2759
|
name: 'list',
|
|
2451
2760
|
kind: 'Link',
|
|
2452
2761
|
plural: true,
|
|
2453
|
-
fragment: select$
|
|
2762
|
+
fragment: select$f()
|
|
2454
2763
|
}
|
|
2455
2764
|
]
|
|
2456
2765
|
};
|
|
2457
2766
|
};
|
|
2458
|
-
function equals$
|
|
2767
|
+
function equals$8(existing, incoming) {
|
|
2459
2768
|
const existing_list = existing.list;
|
|
2460
2769
|
const incoming_list = incoming.list;
|
|
2461
2770
|
const equals_list_items = equalsArray(existing_list, incoming_list, (existing_list_item, incoming_list_item) => {
|
|
@@ -2468,48 +2777,48 @@ function equals$7(existing, incoming) {
|
|
|
2468
2777
|
}
|
|
2469
2778
|
return true;
|
|
2470
2779
|
}
|
|
2471
|
-
const ingest$
|
|
2780
|
+
const ingest$5 = function LearningItemListRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2472
2781
|
if (process.env.NODE_ENV !== 'production') {
|
|
2473
|
-
const validateError = validate$
|
|
2782
|
+
const validateError = validate$8(input);
|
|
2474
2783
|
if (validateError !== null) {
|
|
2475
2784
|
throw validateError;
|
|
2476
2785
|
}
|
|
2477
2786
|
}
|
|
2478
2787
|
const key = path.fullPath;
|
|
2479
2788
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 2592000000;
|
|
2480
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
2789
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$5, "LearningContentPlatform", VERSION$8, RepresentationType$5, equals$8);
|
|
2481
2790
|
return createLink(key);
|
|
2482
2791
|
};
|
|
2483
|
-
function getTypeCacheKeys$
|
|
2792
|
+
function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
|
|
2484
2793
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2485
2794
|
const rootKey = fullPathFactory();
|
|
2486
2795
|
rootKeySet.set(rootKey, {
|
|
2487
2796
|
namespace: keyPrefix,
|
|
2488
|
-
representationName: RepresentationType$
|
|
2797
|
+
representationName: RepresentationType$5,
|
|
2489
2798
|
mergeable: false
|
|
2490
2799
|
});
|
|
2491
2800
|
const input_list_length = input.list.length;
|
|
2492
2801
|
for (let i = 0; i < input_list_length; i++) {
|
|
2493
|
-
getTypeCacheKeys$
|
|
2802
|
+
getTypeCacheKeys$6(rootKeySet, luvio, input.list[i]);
|
|
2494
2803
|
}
|
|
2495
2804
|
}
|
|
2496
2805
|
|
|
2497
|
-
function select$
|
|
2498
|
-
return select$
|
|
2806
|
+
function select$d(luvio, params) {
|
|
2807
|
+
return select$e();
|
|
2499
2808
|
}
|
|
2500
|
-
function keyBuilder$
|
|
2809
|
+
function keyBuilder$e(luvio, params) {
|
|
2501
2810
|
return keyPrefix + '::LearningItemListRepresentation:(' + 'learningItemIds:' + params.queryParams.learningItemIds + ')';
|
|
2502
2811
|
}
|
|
2503
|
-
function getResponseCacheKeys$
|
|
2504
|
-
getTypeCacheKeys$
|
|
2812
|
+
function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
|
|
2813
|
+
getTypeCacheKeys$5(storeKeyMap, luvio, response, () => keyBuilder$e(luvio, resourceParams));
|
|
2505
2814
|
}
|
|
2506
|
-
function ingestSuccess$
|
|
2815
|
+
function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
|
|
2507
2816
|
const { body } = response;
|
|
2508
|
-
const key = keyBuilder$
|
|
2509
|
-
luvio.storeIngest(key, ingest$
|
|
2817
|
+
const key = keyBuilder$e(luvio, resourceParams);
|
|
2818
|
+
luvio.storeIngest(key, ingest$5, body);
|
|
2510
2819
|
const snapshot = luvio.storeLookup({
|
|
2511
2820
|
recordId: key,
|
|
2512
|
-
node: select$
|
|
2821
|
+
node: select$d(),
|
|
2513
2822
|
variables: {},
|
|
2514
2823
|
}, snapshotRefresh);
|
|
2515
2824
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -2521,12 +2830,12 @@ function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
2521
2830
|
return snapshot;
|
|
2522
2831
|
}
|
|
2523
2832
|
function ingestError$4(luvio, params, error, snapshotRefresh) {
|
|
2524
|
-
const key = keyBuilder$
|
|
2833
|
+
const key = keyBuilder$e(luvio, params);
|
|
2525
2834
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
2526
2835
|
luvio.storeIngestError(key, errorSnapshot);
|
|
2527
2836
|
return errorSnapshot;
|
|
2528
2837
|
}
|
|
2529
|
-
function createResourceRequest$
|
|
2838
|
+
function createResourceRequest$5(config) {
|
|
2530
2839
|
const headers = {};
|
|
2531
2840
|
return {
|
|
2532
2841
|
baseUri: '/services/data/v61.0',
|
|
@@ -2540,60 +2849,60 @@ function createResourceRequest$4(config) {
|
|
|
2540
2849
|
};
|
|
2541
2850
|
}
|
|
2542
2851
|
|
|
2543
|
-
const adapterName$
|
|
2852
|
+
const adapterName$5 = 'getLearningItemsList';
|
|
2544
2853
|
const getLearningItemsList_ConfigPropertyMetadata = [
|
|
2545
2854
|
generateParamConfigMetadata('learningItemIds', false, 1 /* QueryParameter */, 0 /* String */, true),
|
|
2546
2855
|
];
|
|
2547
|
-
const getLearningItemsList_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
2548
|
-
const createResourceParams$
|
|
2549
|
-
function keyBuilder$
|
|
2550
|
-
const resourceParams = createResourceParams$
|
|
2551
|
-
return keyBuilder$
|
|
2856
|
+
const getLearningItemsList_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, getLearningItemsList_ConfigPropertyMetadata);
|
|
2857
|
+
const createResourceParams$5 = /*#__PURE__*/ createResourceParams$c(getLearningItemsList_ConfigPropertyMetadata);
|
|
2858
|
+
function keyBuilder$d(luvio, config) {
|
|
2859
|
+
const resourceParams = createResourceParams$5(config);
|
|
2860
|
+
return keyBuilder$e(luvio, resourceParams);
|
|
2552
2861
|
}
|
|
2553
|
-
function typeCheckConfig$
|
|
2862
|
+
function typeCheckConfig$5(untrustedConfig) {
|
|
2554
2863
|
const config = {};
|
|
2555
|
-
typeCheckConfig$
|
|
2864
|
+
typeCheckConfig$c(untrustedConfig, config, getLearningItemsList_ConfigPropertyMetadata);
|
|
2556
2865
|
return config;
|
|
2557
2866
|
}
|
|
2558
|
-
function validateAdapterConfig$
|
|
2867
|
+
function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
|
|
2559
2868
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
2560
2869
|
return null;
|
|
2561
2870
|
}
|
|
2562
2871
|
if (process.env.NODE_ENV !== 'production') {
|
|
2563
2872
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
2564
2873
|
}
|
|
2565
|
-
const config = typeCheckConfig$
|
|
2874
|
+
const config = typeCheckConfig$5(untrustedConfig);
|
|
2566
2875
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2567
2876
|
return null;
|
|
2568
2877
|
}
|
|
2569
2878
|
return config;
|
|
2570
2879
|
}
|
|
2571
2880
|
function adapterFragment$4(luvio, config) {
|
|
2572
|
-
createResourceParams$
|
|
2573
|
-
return select$
|
|
2881
|
+
createResourceParams$5(config);
|
|
2882
|
+
return select$d();
|
|
2574
2883
|
}
|
|
2575
2884
|
function onFetchResponseSuccess$4(luvio, config, resourceParams, response) {
|
|
2576
|
-
const snapshot = ingestSuccess$
|
|
2885
|
+
const snapshot = ingestSuccess$5(luvio, resourceParams, response, {
|
|
2577
2886
|
config,
|
|
2578
|
-
resolve: () => buildNetworkSnapshot$
|
|
2887
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
2579
2888
|
});
|
|
2580
2889
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2581
2890
|
}
|
|
2582
2891
|
function onFetchResponseError$4(luvio, config, resourceParams, response) {
|
|
2583
2892
|
const snapshot = ingestError$4(luvio, resourceParams, response, {
|
|
2584
2893
|
config,
|
|
2585
|
-
resolve: () => buildNetworkSnapshot$
|
|
2894
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
2586
2895
|
});
|
|
2587
2896
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2588
2897
|
}
|
|
2589
|
-
function buildNetworkSnapshot$
|
|
2590
|
-
const resourceParams = createResourceParams$
|
|
2591
|
-
const request = createResourceRequest$
|
|
2898
|
+
function buildNetworkSnapshot$5(luvio, config, options) {
|
|
2899
|
+
const resourceParams = createResourceParams$5(config);
|
|
2900
|
+
const request = createResourceRequest$5(resourceParams);
|
|
2592
2901
|
return luvio.dispatchResourceRequest(request, options)
|
|
2593
2902
|
.then((response) => {
|
|
2594
2903
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$4(luvio, config, resourceParams, response), () => {
|
|
2595
2904
|
const cache = new StoreKeyMap();
|
|
2596
|
-
getResponseCacheKeys$
|
|
2905
|
+
getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
|
|
2597
2906
|
return cache;
|
|
2598
2907
|
});
|
|
2599
2908
|
}, (response) => {
|
|
@@ -2601,23 +2910,23 @@ function buildNetworkSnapshot$4(luvio, config, options) {
|
|
|
2601
2910
|
});
|
|
2602
2911
|
}
|
|
2603
2912
|
function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
|
|
2604
|
-
return buildNetworkSnapshotCachePolicy$
|
|
2913
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$5, undefined, false);
|
|
2605
2914
|
}
|
|
2606
2915
|
function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
|
|
2607
2916
|
const { luvio, config } = context;
|
|
2608
2917
|
const selector = {
|
|
2609
|
-
recordId: keyBuilder$
|
|
2918
|
+
recordId: keyBuilder$d(luvio, config),
|
|
2610
2919
|
node: adapterFragment$4(luvio, config),
|
|
2611
2920
|
variables: {},
|
|
2612
2921
|
};
|
|
2613
2922
|
const cacheSnapshot = storeLookup(selector, {
|
|
2614
2923
|
config,
|
|
2615
|
-
resolve: () => buildNetworkSnapshot$
|
|
2924
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
2616
2925
|
});
|
|
2617
2926
|
return cacheSnapshot;
|
|
2618
2927
|
}
|
|
2619
2928
|
const getLearningItemsListAdapterFactory = (luvio) => function LearningContentPlatform__getLearningItemsList(untrustedConfig, requestContext) {
|
|
2620
|
-
const config = validateAdapterConfig$
|
|
2929
|
+
const config = validateAdapterConfig$5(untrustedConfig, getLearningItemsList_ConfigPropertyNames);
|
|
2621
2930
|
// Invalid or incomplete config
|
|
2622
2931
|
if (config === null) {
|
|
2623
2932
|
return null;
|
|
@@ -2626,8 +2935,8 @@ const getLearningItemsListAdapterFactory = (luvio) => function LearningContentPl
|
|
|
2626
2935
|
buildCachedSnapshotCachePolicy$4, buildNetworkSnapshotCachePolicy$4);
|
|
2627
2936
|
};
|
|
2628
2937
|
|
|
2629
|
-
const VERSION$
|
|
2630
|
-
function validate$
|
|
2938
|
+
const VERSION$7 = "5d4f9c65c714a3f1ef57de5a211599fb";
|
|
2939
|
+
function validate$7(obj, path = 'LearningAssignmentRepresentation') {
|
|
2631
2940
|
const v_error = (() => {
|
|
2632
2941
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2633
2942
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2879,10 +3188,10 @@ function validate$6(obj, path = 'LearningAssignmentRepresentation') {
|
|
|
2879
3188
|
})();
|
|
2880
3189
|
return v_error === undefined ? null : v_error;
|
|
2881
3190
|
}
|
|
2882
|
-
const select$
|
|
3191
|
+
const select$c = function LearningAssignmentRepresentationSelect() {
|
|
2883
3192
|
return {
|
|
2884
3193
|
kind: 'Fragment',
|
|
2885
|
-
version: VERSION$
|
|
3194
|
+
version: VERSION$7,
|
|
2886
3195
|
private: [],
|
|
2887
3196
|
selections: [
|
|
2888
3197
|
{
|
|
@@ -2932,7 +3241,7 @@ const select$a = function LearningAssignmentRepresentationSelect() {
|
|
|
2932
3241
|
]
|
|
2933
3242
|
};
|
|
2934
3243
|
};
|
|
2935
|
-
function equals$
|
|
3244
|
+
function equals$7(existing, incoming) {
|
|
2936
3245
|
const existing_id = existing.id;
|
|
2937
3246
|
const incoming_id = incoming.id;
|
|
2938
3247
|
if (!(existing_id === incoming_id)) {
|
|
@@ -2991,9 +3300,9 @@ function equals$6(existing, incoming) {
|
|
|
2991
3300
|
return true;
|
|
2992
3301
|
}
|
|
2993
3302
|
|
|
2994
|
-
const TTL$
|
|
2995
|
-
const VERSION$
|
|
2996
|
-
function validate$
|
|
3303
|
+
const TTL$4 = 15000;
|
|
3304
|
+
const VERSION$6 = "3ae4e1d57057645da8f2613fbdc5e245";
|
|
3305
|
+
function validate$6(obj, path = 'LearningModelOutputRepresentation') {
|
|
2997
3306
|
const v_error = (() => {
|
|
2998
3307
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2999
3308
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -3032,7 +3341,7 @@ function validate$5(obj, path = 'LearningModelOutputRepresentation') {
|
|
|
3032
3341
|
for (let i = 0; i < obj_assignments.length; i++) {
|
|
3033
3342
|
const obj_assignments_item = obj_assignments[i];
|
|
3034
3343
|
const path_assignments_item = path_assignments + '[' + i + ']';
|
|
3035
|
-
const referencepath_assignments_itemValidationError = validate$
|
|
3344
|
+
const referencepath_assignments_itemValidationError = validate$7(obj_assignments_item, path_assignments_item);
|
|
3036
3345
|
if (referencepath_assignments_itemValidationError !== null) {
|
|
3037
3346
|
let message = 'Object doesn\'t match LearningAssignmentRepresentation (at "' + path_assignments_item + '")\n';
|
|
3038
3347
|
message += referencepath_assignments_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -3255,24 +3564,24 @@ function validate$5(obj, path = 'LearningModelOutputRepresentation') {
|
|
|
3255
3564
|
})();
|
|
3256
3565
|
return v_error === undefined ? null : v_error;
|
|
3257
3566
|
}
|
|
3258
|
-
const RepresentationType$
|
|
3259
|
-
function keyBuilder$
|
|
3260
|
-
return keyPrefix + '::' + RepresentationType$
|
|
3567
|
+
const RepresentationType$4 = 'LearningModelOutputRepresentation';
|
|
3568
|
+
function keyBuilder$c(luvio, config) {
|
|
3569
|
+
return keyPrefix + '::' + RepresentationType$4 + ':' + (config.learning_item_id === null ? '' : config.learning_item_id);
|
|
3261
3570
|
}
|
|
3262
|
-
function keyBuilderFromType$
|
|
3571
|
+
function keyBuilderFromType$4(luvio, object) {
|
|
3263
3572
|
const keyParams = {
|
|
3264
3573
|
learning_item_id: object.id
|
|
3265
3574
|
};
|
|
3266
|
-
return keyBuilder$
|
|
3575
|
+
return keyBuilder$c(luvio, keyParams);
|
|
3267
3576
|
}
|
|
3268
|
-
function normalize$
|
|
3577
|
+
function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
3269
3578
|
return input;
|
|
3270
3579
|
}
|
|
3271
|
-
const select$
|
|
3272
|
-
const { selections: LearningAssignmentRepresentation__selections, opaque: LearningAssignmentRepresentation__opaque, } = select$
|
|
3580
|
+
const select$b = function LearningModelOutputRepresentationSelect() {
|
|
3581
|
+
const { selections: LearningAssignmentRepresentation__selections, opaque: LearningAssignmentRepresentation__opaque, } = select$c();
|
|
3273
3582
|
return {
|
|
3274
3583
|
kind: 'Fragment',
|
|
3275
|
-
version: VERSION$
|
|
3584
|
+
version: VERSION$6,
|
|
3276
3585
|
private: [],
|
|
3277
3586
|
selections: [
|
|
3278
3587
|
{
|
|
@@ -3329,7 +3638,7 @@ const select$9 = function LearningModelOutputRepresentationSelect() {
|
|
|
3329
3638
|
]
|
|
3330
3639
|
};
|
|
3331
3640
|
};
|
|
3332
|
-
function equals$
|
|
3641
|
+
function equals$6(existing, incoming) {
|
|
3333
3642
|
const existing_description = existing.description;
|
|
3334
3643
|
const incoming_description = incoming.description;
|
|
3335
3644
|
if (!(existing_description === incoming_description)) {
|
|
@@ -3348,7 +3657,7 @@ function equals$5(existing, incoming) {
|
|
|
3348
3657
|
const existing_assignments = existing.assignments;
|
|
3349
3658
|
const incoming_assignments = incoming.assignments;
|
|
3350
3659
|
const equals_assignments_items = equalsArray(existing_assignments, incoming_assignments, (existing_assignments_item, incoming_assignments_item) => {
|
|
3351
|
-
if (!(equals$
|
|
3660
|
+
if (!(equals$7(existing_assignments_item, incoming_assignments_item))) {
|
|
3352
3661
|
return false;
|
|
3353
3662
|
}
|
|
3354
3663
|
});
|
|
@@ -3407,46 +3716,46 @@ function equals$5(existing, incoming) {
|
|
|
3407
3716
|
}
|
|
3408
3717
|
return true;
|
|
3409
3718
|
}
|
|
3410
|
-
const ingest$
|
|
3719
|
+
const ingest$4 = function LearningModelOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
3411
3720
|
if (process.env.NODE_ENV !== 'production') {
|
|
3412
|
-
const validateError = validate$
|
|
3721
|
+
const validateError = validate$6(input);
|
|
3413
3722
|
if (validateError !== null) {
|
|
3414
3723
|
throw validateError;
|
|
3415
3724
|
}
|
|
3416
3725
|
}
|
|
3417
|
-
const key = keyBuilderFromType$
|
|
3418
|
-
const ttlToUse = TTL$
|
|
3419
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
3726
|
+
const key = keyBuilderFromType$4(luvio, input);
|
|
3727
|
+
const ttlToUse = TTL$4;
|
|
3728
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "LearningContentPlatform", VERSION$6, RepresentationType$4, equals$6);
|
|
3420
3729
|
return createLink(key);
|
|
3421
3730
|
};
|
|
3422
|
-
function getTypeCacheKeys$
|
|
3731
|
+
function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
|
|
3423
3732
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
3424
|
-
const rootKey = keyBuilderFromType$
|
|
3733
|
+
const rootKey = keyBuilderFromType$4(luvio, input);
|
|
3425
3734
|
rootKeySet.set(rootKey, {
|
|
3426
3735
|
namespace: keyPrefix,
|
|
3427
|
-
representationName: RepresentationType$
|
|
3736
|
+
representationName: RepresentationType$4,
|
|
3428
3737
|
mergeable: false
|
|
3429
3738
|
});
|
|
3430
3739
|
}
|
|
3431
3740
|
|
|
3432
|
-
function select$
|
|
3433
|
-
return select$
|
|
3741
|
+
function select$a(luvio, params) {
|
|
3742
|
+
return select$b();
|
|
3434
3743
|
}
|
|
3435
|
-
function keyBuilder$
|
|
3436
|
-
return keyBuilder$
|
|
3744
|
+
function keyBuilder$b(luvio, params) {
|
|
3745
|
+
return keyBuilder$c(luvio, {
|
|
3437
3746
|
learning_item_id: params.urlParams.learningItemId
|
|
3438
3747
|
});
|
|
3439
3748
|
}
|
|
3440
|
-
function getResponseCacheKeys$
|
|
3441
|
-
getTypeCacheKeys$
|
|
3749
|
+
function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
|
|
3750
|
+
getTypeCacheKeys$4(storeKeyMap, luvio, response);
|
|
3442
3751
|
}
|
|
3443
|
-
function ingestSuccess$
|
|
3752
|
+
function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
3444
3753
|
const { body } = response;
|
|
3445
|
-
const key = keyBuilder$
|
|
3446
|
-
luvio.storeIngest(key, ingest$
|
|
3754
|
+
const key = keyBuilder$b(luvio, resourceParams);
|
|
3755
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
3447
3756
|
const snapshot = luvio.storeLookup({
|
|
3448
3757
|
recordId: key,
|
|
3449
|
-
node: select$
|
|
3758
|
+
node: select$a(),
|
|
3450
3759
|
variables: {},
|
|
3451
3760
|
}, snapshotRefresh);
|
|
3452
3761
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3458,18 +3767,18 @@ function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
3458
3767
|
return snapshot;
|
|
3459
3768
|
}
|
|
3460
3769
|
function ingestError$3(luvio, params, error, snapshotRefresh) {
|
|
3461
|
-
const key = keyBuilder$
|
|
3770
|
+
const key = keyBuilder$b(luvio, params);
|
|
3462
3771
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
3463
3772
|
const storeMetadataParams = {
|
|
3464
|
-
ttl: TTL$
|
|
3773
|
+
ttl: TTL$4,
|
|
3465
3774
|
namespace: keyPrefix,
|
|
3466
|
-
version: VERSION$
|
|
3467
|
-
representationName: RepresentationType$
|
|
3775
|
+
version: VERSION$6,
|
|
3776
|
+
representationName: RepresentationType$4
|
|
3468
3777
|
};
|
|
3469
3778
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
3470
3779
|
return errorSnapshot;
|
|
3471
3780
|
}
|
|
3472
|
-
function createResourceRequest$
|
|
3781
|
+
function createResourceRequest$4(config) {
|
|
3473
3782
|
const headers = {};
|
|
3474
3783
|
return {
|
|
3475
3784
|
baseUri: '/services/data/v61.0',
|
|
@@ -3483,60 +3792,60 @@ function createResourceRequest$3(config) {
|
|
|
3483
3792
|
};
|
|
3484
3793
|
}
|
|
3485
3794
|
|
|
3486
|
-
const adapterName$
|
|
3795
|
+
const adapterName$4 = 'getLearningModel';
|
|
3487
3796
|
const getLearningModel_ConfigPropertyMetadata = [
|
|
3488
3797
|
generateParamConfigMetadata('learningItemId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
3489
3798
|
];
|
|
3490
|
-
const getLearningModel_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
3491
|
-
const createResourceParams$
|
|
3492
|
-
function keyBuilder$
|
|
3493
|
-
const resourceParams = createResourceParams$
|
|
3494
|
-
return keyBuilder$
|
|
3799
|
+
const getLearningModel_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getLearningModel_ConfigPropertyMetadata);
|
|
3800
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$c(getLearningModel_ConfigPropertyMetadata);
|
|
3801
|
+
function keyBuilder$a(luvio, config) {
|
|
3802
|
+
const resourceParams = createResourceParams$4(config);
|
|
3803
|
+
return keyBuilder$b(luvio, resourceParams);
|
|
3495
3804
|
}
|
|
3496
|
-
function typeCheckConfig$
|
|
3805
|
+
function typeCheckConfig$4(untrustedConfig) {
|
|
3497
3806
|
const config = {};
|
|
3498
|
-
typeCheckConfig$
|
|
3807
|
+
typeCheckConfig$c(untrustedConfig, config, getLearningModel_ConfigPropertyMetadata);
|
|
3499
3808
|
return config;
|
|
3500
3809
|
}
|
|
3501
|
-
function validateAdapterConfig$
|
|
3810
|
+
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
3502
3811
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
3503
3812
|
return null;
|
|
3504
3813
|
}
|
|
3505
3814
|
if (process.env.NODE_ENV !== 'production') {
|
|
3506
3815
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
3507
3816
|
}
|
|
3508
|
-
const config = typeCheckConfig$
|
|
3817
|
+
const config = typeCheckConfig$4(untrustedConfig);
|
|
3509
3818
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3510
3819
|
return null;
|
|
3511
3820
|
}
|
|
3512
3821
|
return config;
|
|
3513
3822
|
}
|
|
3514
3823
|
function adapterFragment$3(luvio, config) {
|
|
3515
|
-
createResourceParams$
|
|
3516
|
-
return select$
|
|
3824
|
+
createResourceParams$4(config);
|
|
3825
|
+
return select$a();
|
|
3517
3826
|
}
|
|
3518
3827
|
function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
|
|
3519
|
-
const snapshot = ingestSuccess$
|
|
3828
|
+
const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
|
|
3520
3829
|
config,
|
|
3521
|
-
resolve: () => buildNetworkSnapshot$
|
|
3830
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
3522
3831
|
});
|
|
3523
3832
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3524
3833
|
}
|
|
3525
3834
|
function onFetchResponseError$3(luvio, config, resourceParams, response) {
|
|
3526
3835
|
const snapshot = ingestError$3(luvio, resourceParams, response, {
|
|
3527
3836
|
config,
|
|
3528
|
-
resolve: () => buildNetworkSnapshot$
|
|
3837
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
3529
3838
|
});
|
|
3530
3839
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3531
3840
|
}
|
|
3532
|
-
function buildNetworkSnapshot$
|
|
3533
|
-
const resourceParams = createResourceParams$
|
|
3534
|
-
const request = createResourceRequest$
|
|
3841
|
+
function buildNetworkSnapshot$4(luvio, config, options) {
|
|
3842
|
+
const resourceParams = createResourceParams$4(config);
|
|
3843
|
+
const request = createResourceRequest$4(resourceParams);
|
|
3535
3844
|
return luvio.dispatchResourceRequest(request, options)
|
|
3536
3845
|
.then((response) => {
|
|
3537
3846
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
|
|
3538
3847
|
const cache = new StoreKeyMap();
|
|
3539
|
-
getResponseCacheKeys$
|
|
3848
|
+
getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
|
|
3540
3849
|
return cache;
|
|
3541
3850
|
});
|
|
3542
3851
|
}, (response) => {
|
|
@@ -3544,23 +3853,23 @@ function buildNetworkSnapshot$3(luvio, config, options) {
|
|
|
3544
3853
|
});
|
|
3545
3854
|
}
|
|
3546
3855
|
function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
|
|
3547
|
-
return buildNetworkSnapshotCachePolicy$
|
|
3856
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, undefined, false);
|
|
3548
3857
|
}
|
|
3549
3858
|
function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
|
|
3550
3859
|
const { luvio, config } = context;
|
|
3551
3860
|
const selector = {
|
|
3552
|
-
recordId: keyBuilder$
|
|
3861
|
+
recordId: keyBuilder$a(luvio, config),
|
|
3553
3862
|
node: adapterFragment$3(luvio, config),
|
|
3554
3863
|
variables: {},
|
|
3555
3864
|
};
|
|
3556
3865
|
const cacheSnapshot = storeLookup(selector, {
|
|
3557
3866
|
config,
|
|
3558
|
-
resolve: () => buildNetworkSnapshot$
|
|
3867
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
3559
3868
|
});
|
|
3560
3869
|
return cacheSnapshot;
|
|
3561
3870
|
}
|
|
3562
3871
|
const getLearningModelAdapterFactory = (luvio) => function LearningContentPlatform__getLearningModel(untrustedConfig, requestContext) {
|
|
3563
|
-
const config = validateAdapterConfig$
|
|
3872
|
+
const config = validateAdapterConfig$4(untrustedConfig, getLearningModel_ConfigPropertyNames);
|
|
3564
3873
|
// Invalid or incomplete config
|
|
3565
3874
|
if (config === null) {
|
|
3566
3875
|
return null;
|
|
@@ -3569,9 +3878,9 @@ const getLearningModelAdapterFactory = (luvio) => function LearningContentPlatfo
|
|
|
3569
3878
|
buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
|
|
3570
3879
|
};
|
|
3571
3880
|
|
|
3572
|
-
const TTL$
|
|
3573
|
-
const VERSION$
|
|
3574
|
-
function validate$
|
|
3881
|
+
const TTL$3 = 60000;
|
|
3882
|
+
const VERSION$5 = "44b044bb4e3eff4d2c834cdb80b9a043";
|
|
3883
|
+
function validate$5(obj, path = 'LearningPracticeRepresentation') {
|
|
3575
3884
|
const v_error = (() => {
|
|
3576
3885
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3577
3886
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -3604,23 +3913,23 @@ function validate$4(obj, path = 'LearningPracticeRepresentation') {
|
|
|
3604
3913
|
})();
|
|
3605
3914
|
return v_error === undefined ? null : v_error;
|
|
3606
3915
|
}
|
|
3607
|
-
const RepresentationType$
|
|
3608
|
-
function keyBuilder$
|
|
3609
|
-
return keyPrefix + '::' + RepresentationType$
|
|
3916
|
+
const RepresentationType$3 = 'LearningPracticeRepresentation';
|
|
3917
|
+
function keyBuilder$9(luvio, config) {
|
|
3918
|
+
return keyPrefix + '::' + RepresentationType$3 + ':' + config.learning_item_id;
|
|
3610
3919
|
}
|
|
3611
|
-
function keyBuilderFromType$
|
|
3920
|
+
function keyBuilderFromType$3(luvio, object) {
|
|
3612
3921
|
const keyParams = {
|
|
3613
3922
|
learning_item_id: object.learningItemId
|
|
3614
3923
|
};
|
|
3615
|
-
return keyBuilder$
|
|
3924
|
+
return keyBuilder$9(luvio, keyParams);
|
|
3616
3925
|
}
|
|
3617
|
-
function normalize$
|
|
3926
|
+
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
3618
3927
|
return input;
|
|
3619
3928
|
}
|
|
3620
|
-
const select$
|
|
3929
|
+
const select$9 = function LearningPracticeRepresentationSelect() {
|
|
3621
3930
|
return {
|
|
3622
3931
|
kind: 'Fragment',
|
|
3623
|
-
version: VERSION$
|
|
3932
|
+
version: VERSION$5,
|
|
3624
3933
|
private: [],
|
|
3625
3934
|
selections: [
|
|
3626
3935
|
{
|
|
@@ -3646,7 +3955,7 @@ const select$7 = function LearningPracticeRepresentationSelect() {
|
|
|
3646
3955
|
]
|
|
3647
3956
|
};
|
|
3648
3957
|
};
|
|
3649
|
-
function equals$
|
|
3958
|
+
function equals$5(existing, incoming) {
|
|
3650
3959
|
const existing_minimumInviteeQuantity = existing.minimumInviteeQuantity;
|
|
3651
3960
|
const incoming_minimumInviteeQuantity = incoming.minimumInviteeQuantity;
|
|
3652
3961
|
if (!(existing_minimumInviteeQuantity === incoming_minimumInviteeQuantity)) {
|
|
@@ -3674,46 +3983,46 @@ function equals$4(existing, incoming) {
|
|
|
3674
3983
|
}
|
|
3675
3984
|
return true;
|
|
3676
3985
|
}
|
|
3677
|
-
const ingest$
|
|
3986
|
+
const ingest$3 = function LearningPracticeRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
3678
3987
|
if (process.env.NODE_ENV !== 'production') {
|
|
3679
|
-
const validateError = validate$
|
|
3988
|
+
const validateError = validate$5(input);
|
|
3680
3989
|
if (validateError !== null) {
|
|
3681
3990
|
throw validateError;
|
|
3682
3991
|
}
|
|
3683
3992
|
}
|
|
3684
|
-
const key = keyBuilderFromType$
|
|
3685
|
-
const ttlToUse = TTL$
|
|
3686
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
3993
|
+
const key = keyBuilderFromType$3(luvio, input);
|
|
3994
|
+
const ttlToUse = TTL$3;
|
|
3995
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "LearningContentPlatform", VERSION$5, RepresentationType$3, equals$5);
|
|
3687
3996
|
return createLink(key);
|
|
3688
3997
|
};
|
|
3689
|
-
function getTypeCacheKeys$
|
|
3998
|
+
function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
3690
3999
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
3691
|
-
const rootKey = keyBuilderFromType$
|
|
4000
|
+
const rootKey = keyBuilderFromType$3(luvio, input);
|
|
3692
4001
|
rootKeySet.set(rootKey, {
|
|
3693
4002
|
namespace: keyPrefix,
|
|
3694
|
-
representationName: RepresentationType$
|
|
4003
|
+
representationName: RepresentationType$3,
|
|
3695
4004
|
mergeable: false
|
|
3696
4005
|
});
|
|
3697
4006
|
}
|
|
3698
4007
|
|
|
3699
|
-
function select$
|
|
3700
|
-
return select$
|
|
4008
|
+
function select$8(luvio, params) {
|
|
4009
|
+
return select$9();
|
|
3701
4010
|
}
|
|
3702
|
-
function keyBuilder$
|
|
3703
|
-
return keyBuilder$
|
|
4011
|
+
function keyBuilder$8(luvio, params) {
|
|
4012
|
+
return keyBuilder$9(luvio, {
|
|
3704
4013
|
learning_item_id: params.urlParams.learningItemId
|
|
3705
4014
|
});
|
|
3706
4015
|
}
|
|
3707
|
-
function getResponseCacheKeys$
|
|
3708
|
-
getTypeCacheKeys$
|
|
4016
|
+
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
4017
|
+
getTypeCacheKeys$3(storeKeyMap, luvio, response);
|
|
3709
4018
|
}
|
|
3710
|
-
function ingestSuccess$
|
|
4019
|
+
function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
3711
4020
|
const { body } = response;
|
|
3712
|
-
const key = keyBuilder$
|
|
3713
|
-
luvio.storeIngest(key, ingest$
|
|
4021
|
+
const key = keyBuilder$8(luvio, resourceParams);
|
|
4022
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
3714
4023
|
const snapshot = luvio.storeLookup({
|
|
3715
4024
|
recordId: key,
|
|
3716
|
-
node: select$
|
|
4025
|
+
node: select$8(),
|
|
3717
4026
|
variables: {},
|
|
3718
4027
|
}, snapshotRefresh);
|
|
3719
4028
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3725,18 +4034,18 @@ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
3725
4034
|
return snapshot;
|
|
3726
4035
|
}
|
|
3727
4036
|
function ingestError$2(luvio, params, error, snapshotRefresh) {
|
|
3728
|
-
const key = keyBuilder$
|
|
4037
|
+
const key = keyBuilder$8(luvio, params);
|
|
3729
4038
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
3730
4039
|
const storeMetadataParams = {
|
|
3731
|
-
ttl: TTL$
|
|
4040
|
+
ttl: TTL$3,
|
|
3732
4041
|
namespace: keyPrefix,
|
|
3733
|
-
version: VERSION$
|
|
3734
|
-
representationName: RepresentationType$
|
|
4042
|
+
version: VERSION$5,
|
|
4043
|
+
representationName: RepresentationType$3
|
|
3735
4044
|
};
|
|
3736
4045
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
3737
4046
|
return errorSnapshot;
|
|
3738
4047
|
}
|
|
3739
|
-
function createResourceRequest$
|
|
4048
|
+
function createResourceRequest$3(config) {
|
|
3740
4049
|
const headers = {};
|
|
3741
4050
|
return {
|
|
3742
4051
|
baseUri: '/services/data/v61.0',
|
|
@@ -3754,63 +4063,63 @@ function createResourceRequestFromRepresentation$2(representation) {
|
|
|
3754
4063
|
urlParams: {},
|
|
3755
4064
|
};
|
|
3756
4065
|
config.urlParams.learningItemId = representation.learningItemId;
|
|
3757
|
-
return createResourceRequest$
|
|
4066
|
+
return createResourceRequest$3(config);
|
|
3758
4067
|
}
|
|
3759
4068
|
|
|
3760
|
-
const adapterName$
|
|
4069
|
+
const adapterName$3 = 'getLearningPractice';
|
|
3761
4070
|
const getLearningPractice_ConfigPropertyMetadata = [
|
|
3762
4071
|
generateParamConfigMetadata('learningItemId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
3763
4072
|
];
|
|
3764
|
-
const getLearningPractice_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
3765
|
-
const createResourceParams$
|
|
3766
|
-
function keyBuilder$
|
|
3767
|
-
const resourceParams = createResourceParams$
|
|
3768
|
-
return keyBuilder$
|
|
4073
|
+
const getLearningPractice_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getLearningPractice_ConfigPropertyMetadata);
|
|
4074
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$c(getLearningPractice_ConfigPropertyMetadata);
|
|
4075
|
+
function keyBuilder$7(luvio, config) {
|
|
4076
|
+
const resourceParams = createResourceParams$3(config);
|
|
4077
|
+
return keyBuilder$8(luvio, resourceParams);
|
|
3769
4078
|
}
|
|
3770
|
-
function typeCheckConfig$
|
|
4079
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
3771
4080
|
const config = {};
|
|
3772
|
-
typeCheckConfig$
|
|
4081
|
+
typeCheckConfig$c(untrustedConfig, config, getLearningPractice_ConfigPropertyMetadata);
|
|
3773
4082
|
return config;
|
|
3774
4083
|
}
|
|
3775
|
-
function validateAdapterConfig$
|
|
4084
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
3776
4085
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
3777
4086
|
return null;
|
|
3778
4087
|
}
|
|
3779
4088
|
if (process.env.NODE_ENV !== 'production') {
|
|
3780
4089
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
3781
4090
|
}
|
|
3782
|
-
const config = typeCheckConfig$
|
|
4091
|
+
const config = typeCheckConfig$3(untrustedConfig);
|
|
3783
4092
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3784
4093
|
return null;
|
|
3785
4094
|
}
|
|
3786
4095
|
return config;
|
|
3787
4096
|
}
|
|
3788
4097
|
function adapterFragment$2(luvio, config) {
|
|
3789
|
-
createResourceParams$
|
|
3790
|
-
return select$
|
|
4098
|
+
createResourceParams$3(config);
|
|
4099
|
+
return select$8();
|
|
3791
4100
|
}
|
|
3792
4101
|
function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
|
|
3793
|
-
const snapshot = ingestSuccess$
|
|
4102
|
+
const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
|
|
3794
4103
|
config,
|
|
3795
|
-
resolve: () => buildNetworkSnapshot$
|
|
4104
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
3796
4105
|
});
|
|
3797
4106
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3798
4107
|
}
|
|
3799
4108
|
function onFetchResponseError$2(luvio, config, resourceParams, response) {
|
|
3800
4109
|
const snapshot = ingestError$2(luvio, resourceParams, response, {
|
|
3801
4110
|
config,
|
|
3802
|
-
resolve: () => buildNetworkSnapshot$
|
|
4111
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
3803
4112
|
});
|
|
3804
4113
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3805
4114
|
}
|
|
3806
|
-
function buildNetworkSnapshot$
|
|
3807
|
-
const resourceParams = createResourceParams$
|
|
3808
|
-
const request = createResourceRequest$
|
|
4115
|
+
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
4116
|
+
const resourceParams = createResourceParams$3(config);
|
|
4117
|
+
const request = createResourceRequest$3(resourceParams);
|
|
3809
4118
|
return luvio.dispatchResourceRequest(request, options)
|
|
3810
4119
|
.then((response) => {
|
|
3811
4120
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
|
|
3812
4121
|
const cache = new StoreKeyMap();
|
|
3813
|
-
getResponseCacheKeys$
|
|
4122
|
+
getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
|
|
3814
4123
|
return cache;
|
|
3815
4124
|
});
|
|
3816
4125
|
}, (response) => {
|
|
@@ -3818,23 +4127,23 @@ function buildNetworkSnapshot$2(luvio, config, options) {
|
|
|
3818
4127
|
});
|
|
3819
4128
|
}
|
|
3820
4129
|
function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
|
|
3821
|
-
return buildNetworkSnapshotCachePolicy$
|
|
4130
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
|
|
3822
4131
|
}
|
|
3823
4132
|
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
3824
4133
|
const { luvio, config } = context;
|
|
3825
4134
|
const selector = {
|
|
3826
|
-
recordId: keyBuilder$
|
|
4135
|
+
recordId: keyBuilder$7(luvio, config),
|
|
3827
4136
|
node: adapterFragment$2(luvio, config),
|
|
3828
4137
|
variables: {},
|
|
3829
4138
|
};
|
|
3830
4139
|
const cacheSnapshot = storeLookup(selector, {
|
|
3831
4140
|
config,
|
|
3832
|
-
resolve: () => buildNetworkSnapshot$
|
|
4141
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
3833
4142
|
});
|
|
3834
4143
|
return cacheSnapshot;
|
|
3835
4144
|
}
|
|
3836
4145
|
const getLearningPracticeAdapterFactory = (luvio) => function LearningContentPlatform__getLearningPractice(untrustedConfig, requestContext) {
|
|
3837
|
-
const config = validateAdapterConfig$
|
|
4146
|
+
const config = validateAdapterConfig$3(untrustedConfig, getLearningPractice_ConfigPropertyNames);
|
|
3838
4147
|
// Invalid or incomplete config
|
|
3839
4148
|
if (config === null) {
|
|
3840
4149
|
return null;
|
|
@@ -3844,7 +4153,7 @@ const getLearningPracticeAdapterFactory = (luvio) => function LearningContentPla
|
|
|
3844
4153
|
};
|
|
3845
4154
|
const notifyChangeFactory$2 = (luvio, options) => {
|
|
3846
4155
|
return function getLearningContentPlatformLearningPracticeByLearningItemIdNotifyChange(configs) {
|
|
3847
|
-
const keys = configs.map(c => keyBuilder$
|
|
4156
|
+
const keys = configs.map(c => keyBuilder$9(luvio, c));
|
|
3848
4157
|
luvio.getNotifyChangeStoreEntries(keys).then(entries => {
|
|
3849
4158
|
for (let i = 0, len = entries.length; i < len; i++) {
|
|
3850
4159
|
const { key, record: val } = entries[i];
|
|
@@ -3853,21 +4162,21 @@ const notifyChangeFactory$2 = (luvio, options) => {
|
|
|
3853
4162
|
.then((response) => {
|
|
3854
4163
|
return luvio.handleSuccessResponse(() => {
|
|
3855
4164
|
const { body } = response;
|
|
3856
|
-
luvio.storeIngest(key, ingest$
|
|
4165
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
3857
4166
|
return luvio.storeBroadcast();
|
|
3858
4167
|
}, () => {
|
|
3859
4168
|
const cache = new StoreKeyMap();
|
|
3860
|
-
getTypeCacheKeys$
|
|
4169
|
+
getTypeCacheKeys$3(cache, luvio, response.body);
|
|
3861
4170
|
return cache;
|
|
3862
4171
|
});
|
|
3863
4172
|
}, (error) => {
|
|
3864
4173
|
return luvio.handleErrorResponse(() => {
|
|
3865
4174
|
const errorSnapshot = luvio.errorSnapshot(error);
|
|
3866
4175
|
luvio.storeIngestError(key, errorSnapshot, {
|
|
3867
|
-
ttl: TTL$
|
|
4176
|
+
ttl: TTL$3,
|
|
3868
4177
|
namespace: keyPrefix,
|
|
3869
|
-
version: VERSION$
|
|
3870
|
-
representationName: RepresentationType$
|
|
4178
|
+
version: VERSION$5,
|
|
4179
|
+
representationName: RepresentationType$3
|
|
3871
4180
|
});
|
|
3872
4181
|
return luvio.storeBroadcast().then(() => errorSnapshot);
|
|
3873
4182
|
});
|
|
@@ -3877,8 +4186,8 @@ const notifyChangeFactory$2 = (luvio, options) => {
|
|
|
3877
4186
|
};
|
|
3878
4187
|
};
|
|
3879
4188
|
|
|
3880
|
-
const VERSION$
|
|
3881
|
-
function validate$
|
|
4189
|
+
const VERSION$4 = "19c9bcb401bf39a211caeff8b3cde304";
|
|
4190
|
+
function validate$4(obj, path = 'TrailheadModuleUnitRepresentation') {
|
|
3882
4191
|
const v_error = (() => {
|
|
3883
4192
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3884
4193
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -3963,10 +4272,10 @@ function validate$3(obj, path = 'TrailheadModuleUnitRepresentation') {
|
|
|
3963
4272
|
})();
|
|
3964
4273
|
return v_error === undefined ? null : v_error;
|
|
3965
4274
|
}
|
|
3966
|
-
const select$
|
|
4275
|
+
const select$7 = function TrailheadModuleUnitRepresentationSelect() {
|
|
3967
4276
|
return {
|
|
3968
4277
|
kind: 'Fragment',
|
|
3969
|
-
version: VERSION$
|
|
4278
|
+
version: VERSION$4,
|
|
3970
4279
|
private: [],
|
|
3971
4280
|
selections: [
|
|
3972
4281
|
{
|
|
@@ -4000,7 +4309,7 @@ const select$5 = function TrailheadModuleUnitRepresentationSelect() {
|
|
|
4000
4309
|
]
|
|
4001
4310
|
};
|
|
4002
4311
|
};
|
|
4003
|
-
function equals$
|
|
4312
|
+
function equals$4(existing, incoming) {
|
|
4004
4313
|
const existing_durationCount = existing.durationCount;
|
|
4005
4314
|
const incoming_durationCount = incoming.durationCount;
|
|
4006
4315
|
if (!(existing_durationCount === incoming_durationCount)) {
|
|
@@ -4039,9 +4348,9 @@ function equals$3(existing, incoming) {
|
|
|
4039
4348
|
return true;
|
|
4040
4349
|
}
|
|
4041
4350
|
|
|
4042
|
-
const TTL$
|
|
4043
|
-
const VERSION$
|
|
4044
|
-
function validate$
|
|
4351
|
+
const TTL$2 = 21600000;
|
|
4352
|
+
const VERSION$3 = "9bed4edb4c9f077a2f7ce902f94afa38";
|
|
4353
|
+
function validate$3(obj, path = 'TrailheadModuleRepresentation') {
|
|
4045
4354
|
const v_error = (() => {
|
|
4046
4355
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
4047
4356
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -4214,7 +4523,7 @@ function validate$2(obj, path = 'TrailheadModuleRepresentation') {
|
|
|
4214
4523
|
for (let i = 0; i < obj_moduleUnits.length; i++) {
|
|
4215
4524
|
const obj_moduleUnits_item = obj_moduleUnits[i];
|
|
4216
4525
|
const path_moduleUnits_item = path_moduleUnits + '[' + i + ']';
|
|
4217
|
-
const referencepath_moduleUnits_itemValidationError = validate$
|
|
4526
|
+
const referencepath_moduleUnits_itemValidationError = validate$4(obj_moduleUnits_item, path_moduleUnits_item);
|
|
4218
4527
|
if (referencepath_moduleUnits_itemValidationError !== null) {
|
|
4219
4528
|
let message = 'Object doesn\'t match TrailheadModuleUnitRepresentation (at "' + path_moduleUnits_item + '")\n';
|
|
4220
4529
|
message += referencepath_moduleUnits_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -4239,24 +4548,24 @@ function validate$2(obj, path = 'TrailheadModuleRepresentation') {
|
|
|
4239
4548
|
})();
|
|
4240
4549
|
return v_error === undefined ? null : v_error;
|
|
4241
4550
|
}
|
|
4242
|
-
const RepresentationType$
|
|
4243
|
-
function keyBuilder$
|
|
4244
|
-
return keyPrefix + '::' + RepresentationType$
|
|
4551
|
+
const RepresentationType$2 = 'TrailheadModuleRepresentation';
|
|
4552
|
+
function keyBuilder$6(luvio, config) {
|
|
4553
|
+
return keyPrefix + '::' + RepresentationType$2 + ':' + config.relatedId;
|
|
4245
4554
|
}
|
|
4246
|
-
function keyBuilderFromType$
|
|
4555
|
+
function keyBuilderFromType$2(luvio, object) {
|
|
4247
4556
|
const keyParams = {
|
|
4248
4557
|
relatedId: object.relatedId
|
|
4249
4558
|
};
|
|
4250
|
-
return keyBuilder$
|
|
4559
|
+
return keyBuilder$6(luvio, keyParams);
|
|
4251
4560
|
}
|
|
4252
|
-
function normalize$
|
|
4561
|
+
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
4253
4562
|
return input;
|
|
4254
4563
|
}
|
|
4255
|
-
const select$
|
|
4256
|
-
const { selections: TrailheadModuleUnitRepresentation__selections, opaque: TrailheadModuleUnitRepresentation__opaque, } = select$
|
|
4564
|
+
const select$6 = function TrailheadModuleRepresentationSelect() {
|
|
4565
|
+
const { selections: TrailheadModuleUnitRepresentation__selections, opaque: TrailheadModuleUnitRepresentation__opaque, } = select$7();
|
|
4257
4566
|
return {
|
|
4258
4567
|
kind: 'Fragment',
|
|
4259
|
-
version: VERSION$
|
|
4568
|
+
version: VERSION$3,
|
|
4260
4569
|
private: [],
|
|
4261
4570
|
selections: [
|
|
4262
4571
|
{
|
|
@@ -4324,7 +4633,7 @@ const select$4 = function TrailheadModuleRepresentationSelect() {
|
|
|
4324
4633
|
]
|
|
4325
4634
|
};
|
|
4326
4635
|
};
|
|
4327
|
-
function equals$
|
|
4636
|
+
function equals$3(existing, incoming) {
|
|
4328
4637
|
const existing_isCompleted = existing.isCompleted;
|
|
4329
4638
|
const incoming_isCompleted = incoming.isCompleted;
|
|
4330
4639
|
if (!(existing_isCompleted === incoming_isCompleted)) {
|
|
@@ -4398,7 +4707,7 @@ function equals$2(existing, incoming) {
|
|
|
4398
4707
|
const existing_moduleUnits = existing.moduleUnits;
|
|
4399
4708
|
const incoming_moduleUnits = incoming.moduleUnits;
|
|
4400
4709
|
const equals_moduleUnits_items = equalsArray(existing_moduleUnits, incoming_moduleUnits, (existing_moduleUnits_item, incoming_moduleUnits_item) => {
|
|
4401
|
-
if (!(equals$
|
|
4710
|
+
if (!(equals$4(existing_moduleUnits_item, incoming_moduleUnits_item))) {
|
|
4402
4711
|
return false;
|
|
4403
4712
|
}
|
|
4404
4713
|
});
|
|
@@ -4407,46 +4716,46 @@ function equals$2(existing, incoming) {
|
|
|
4407
4716
|
}
|
|
4408
4717
|
return true;
|
|
4409
4718
|
}
|
|
4410
|
-
const ingest$
|
|
4719
|
+
const ingest$2 = function TrailheadModuleRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
4411
4720
|
if (process.env.NODE_ENV !== 'production') {
|
|
4412
|
-
const validateError = validate$
|
|
4721
|
+
const validateError = validate$3(input);
|
|
4413
4722
|
if (validateError !== null) {
|
|
4414
4723
|
throw validateError;
|
|
4415
4724
|
}
|
|
4416
4725
|
}
|
|
4417
|
-
const key = keyBuilderFromType$
|
|
4418
|
-
const ttlToUse = TTL$
|
|
4419
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
4726
|
+
const key = keyBuilderFromType$2(luvio, input);
|
|
4727
|
+
const ttlToUse = TTL$2;
|
|
4728
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "LearningContentPlatform", VERSION$3, RepresentationType$2, equals$3);
|
|
4420
4729
|
return createLink(key);
|
|
4421
4730
|
};
|
|
4422
|
-
function getTypeCacheKeys$
|
|
4731
|
+
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
4423
4732
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
4424
|
-
const rootKey = keyBuilderFromType$
|
|
4733
|
+
const rootKey = keyBuilderFromType$2(luvio, input);
|
|
4425
4734
|
rootKeySet.set(rootKey, {
|
|
4426
4735
|
namespace: keyPrefix,
|
|
4427
|
-
representationName: RepresentationType$
|
|
4736
|
+
representationName: RepresentationType$2,
|
|
4428
4737
|
mergeable: false
|
|
4429
4738
|
});
|
|
4430
4739
|
}
|
|
4431
4740
|
|
|
4432
|
-
function select$
|
|
4433
|
-
return select$
|
|
4741
|
+
function select$5(luvio, params) {
|
|
4742
|
+
return select$6();
|
|
4434
4743
|
}
|
|
4435
|
-
function keyBuilder$
|
|
4436
|
-
return keyBuilder$
|
|
4744
|
+
function keyBuilder$5(luvio, params) {
|
|
4745
|
+
return keyBuilder$6(luvio, {
|
|
4437
4746
|
relatedId: params.urlParams.moduleId
|
|
4438
4747
|
});
|
|
4439
4748
|
}
|
|
4440
|
-
function getResponseCacheKeys$
|
|
4441
|
-
getTypeCacheKeys$
|
|
4749
|
+
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
4750
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response);
|
|
4442
4751
|
}
|
|
4443
|
-
function ingestSuccess$
|
|
4752
|
+
function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
4444
4753
|
const { body } = response;
|
|
4445
|
-
const key = keyBuilder$
|
|
4446
|
-
luvio.storeIngest(key, ingest$
|
|
4754
|
+
const key = keyBuilder$5(luvio, resourceParams);
|
|
4755
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
4447
4756
|
const snapshot = luvio.storeLookup({
|
|
4448
4757
|
recordId: key,
|
|
4449
|
-
node: select$
|
|
4758
|
+
node: select$5(),
|
|
4450
4759
|
variables: {},
|
|
4451
4760
|
}, snapshotRefresh);
|
|
4452
4761
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -4458,18 +4767,18 @@ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
4458
4767
|
return snapshot;
|
|
4459
4768
|
}
|
|
4460
4769
|
function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
4461
|
-
const key = keyBuilder$
|
|
4770
|
+
const key = keyBuilder$5(luvio, params);
|
|
4462
4771
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
4463
4772
|
const storeMetadataParams = {
|
|
4464
|
-
ttl: TTL$
|
|
4773
|
+
ttl: TTL$2,
|
|
4465
4774
|
namespace: keyPrefix,
|
|
4466
|
-
version: VERSION$
|
|
4467
|
-
representationName: RepresentationType$
|
|
4775
|
+
version: VERSION$3,
|
|
4776
|
+
representationName: RepresentationType$2
|
|
4468
4777
|
};
|
|
4469
4778
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
4470
4779
|
return errorSnapshot;
|
|
4471
4780
|
}
|
|
4472
|
-
function createResourceRequest$
|
|
4781
|
+
function createResourceRequest$2(config) {
|
|
4473
4782
|
const headers = {};
|
|
4474
4783
|
return {
|
|
4475
4784
|
baseUri: '/services/data/v61.0',
|
|
@@ -4487,63 +4796,63 @@ function createResourceRequestFromRepresentation$1(representation) {
|
|
|
4487
4796
|
urlParams: {},
|
|
4488
4797
|
};
|
|
4489
4798
|
config.urlParams.moduleId = representation.relatedId;
|
|
4490
|
-
return createResourceRequest$
|
|
4799
|
+
return createResourceRequest$2(config);
|
|
4491
4800
|
}
|
|
4492
4801
|
|
|
4493
|
-
const adapterName$
|
|
4802
|
+
const adapterName$2 = 'getModule';
|
|
4494
4803
|
const getModule_ConfigPropertyMetadata = [
|
|
4495
4804
|
generateParamConfigMetadata('moduleId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
4496
4805
|
];
|
|
4497
|
-
const getModule_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
4498
|
-
const createResourceParams$
|
|
4499
|
-
function keyBuilder$
|
|
4500
|
-
const resourceParams = createResourceParams$
|
|
4501
|
-
return keyBuilder$
|
|
4806
|
+
const getModule_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getModule_ConfigPropertyMetadata);
|
|
4807
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$c(getModule_ConfigPropertyMetadata);
|
|
4808
|
+
function keyBuilder$4(luvio, config) {
|
|
4809
|
+
const resourceParams = createResourceParams$2(config);
|
|
4810
|
+
return keyBuilder$5(luvio, resourceParams);
|
|
4502
4811
|
}
|
|
4503
|
-
function typeCheckConfig$
|
|
4812
|
+
function typeCheckConfig$2(untrustedConfig) {
|
|
4504
4813
|
const config = {};
|
|
4505
|
-
typeCheckConfig$
|
|
4814
|
+
typeCheckConfig$c(untrustedConfig, config, getModule_ConfigPropertyMetadata);
|
|
4506
4815
|
return config;
|
|
4507
4816
|
}
|
|
4508
|
-
function validateAdapterConfig$
|
|
4817
|
+
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
4509
4818
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
4510
4819
|
return null;
|
|
4511
4820
|
}
|
|
4512
4821
|
if (process.env.NODE_ENV !== 'production') {
|
|
4513
4822
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
4514
4823
|
}
|
|
4515
|
-
const config = typeCheckConfig$
|
|
4824
|
+
const config = typeCheckConfig$2(untrustedConfig);
|
|
4516
4825
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
4517
4826
|
return null;
|
|
4518
4827
|
}
|
|
4519
4828
|
return config;
|
|
4520
4829
|
}
|
|
4521
4830
|
function adapterFragment$1(luvio, config) {
|
|
4522
|
-
createResourceParams$
|
|
4523
|
-
return select$
|
|
4831
|
+
createResourceParams$2(config);
|
|
4832
|
+
return select$5();
|
|
4524
4833
|
}
|
|
4525
4834
|
function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
|
|
4526
|
-
const snapshot = ingestSuccess$
|
|
4835
|
+
const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
|
|
4527
4836
|
config,
|
|
4528
|
-
resolve: () => buildNetworkSnapshot$
|
|
4837
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
4529
4838
|
});
|
|
4530
4839
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4531
4840
|
}
|
|
4532
4841
|
function onFetchResponseError$1(luvio, config, resourceParams, response) {
|
|
4533
4842
|
const snapshot = ingestError$1(luvio, resourceParams, response, {
|
|
4534
4843
|
config,
|
|
4535
|
-
resolve: () => buildNetworkSnapshot$
|
|
4844
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
4536
4845
|
});
|
|
4537
4846
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4538
4847
|
}
|
|
4539
|
-
function buildNetworkSnapshot$
|
|
4540
|
-
const resourceParams = createResourceParams$
|
|
4541
|
-
const request = createResourceRequest$
|
|
4848
|
+
function buildNetworkSnapshot$2(luvio, config, options) {
|
|
4849
|
+
const resourceParams = createResourceParams$2(config);
|
|
4850
|
+
const request = createResourceRequest$2(resourceParams);
|
|
4542
4851
|
return luvio.dispatchResourceRequest(request, options)
|
|
4543
4852
|
.then((response) => {
|
|
4544
4853
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
|
|
4545
4854
|
const cache = new StoreKeyMap();
|
|
4546
|
-
getResponseCacheKeys$
|
|
4855
|
+
getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
|
|
4547
4856
|
return cache;
|
|
4548
4857
|
});
|
|
4549
4858
|
}, (response) => {
|
|
@@ -4551,23 +4860,23 @@ function buildNetworkSnapshot$1(luvio, config, options) {
|
|
|
4551
4860
|
});
|
|
4552
4861
|
}
|
|
4553
4862
|
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
4554
|
-
return buildNetworkSnapshotCachePolicy$
|
|
4863
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
|
|
4555
4864
|
}
|
|
4556
4865
|
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
4557
4866
|
const { luvio, config } = context;
|
|
4558
4867
|
const selector = {
|
|
4559
|
-
recordId: keyBuilder$
|
|
4868
|
+
recordId: keyBuilder$4(luvio, config),
|
|
4560
4869
|
node: adapterFragment$1(luvio, config),
|
|
4561
4870
|
variables: {},
|
|
4562
4871
|
};
|
|
4563
4872
|
const cacheSnapshot = storeLookup(selector, {
|
|
4564
4873
|
config,
|
|
4565
|
-
resolve: () => buildNetworkSnapshot$
|
|
4874
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
4566
4875
|
});
|
|
4567
4876
|
return cacheSnapshot;
|
|
4568
4877
|
}
|
|
4569
4878
|
const getModuleAdapterFactory = (luvio) => function LearningContentPlatform__getModule(untrustedConfig, requestContext) {
|
|
4570
|
-
const config = validateAdapterConfig$
|
|
4879
|
+
const config = validateAdapterConfig$2(untrustedConfig, getModule_ConfigPropertyNames);
|
|
4571
4880
|
// Invalid or incomplete config
|
|
4572
4881
|
if (config === null) {
|
|
4573
4882
|
return null;
|
|
@@ -4577,7 +4886,7 @@ const getModuleAdapterFactory = (luvio) => function LearningContentPlatform__get
|
|
|
4577
4886
|
};
|
|
4578
4887
|
const notifyChangeFactory$1 = (luvio, options) => {
|
|
4579
4888
|
return function getLearningContentPlatformLearningModuleByModuleIdNotifyChange(configs) {
|
|
4580
|
-
const keys = configs.map(c => keyBuilder$
|
|
4889
|
+
const keys = configs.map(c => keyBuilder$6(luvio, c));
|
|
4581
4890
|
luvio.getNotifyChangeStoreEntries(keys).then(entries => {
|
|
4582
4891
|
for (let i = 0, len = entries.length; i < len; i++) {
|
|
4583
4892
|
const { key, record: val } = entries[i];
|
|
@@ -4586,21 +4895,21 @@ const notifyChangeFactory$1 = (luvio, options) => {
|
|
|
4586
4895
|
.then((response) => {
|
|
4587
4896
|
return luvio.handleSuccessResponse(() => {
|
|
4588
4897
|
const { body } = response;
|
|
4589
|
-
luvio.storeIngest(key, ingest$
|
|
4898
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
4590
4899
|
return luvio.storeBroadcast();
|
|
4591
4900
|
}, () => {
|
|
4592
4901
|
const cache = new StoreKeyMap();
|
|
4593
|
-
getTypeCacheKeys$
|
|
4902
|
+
getTypeCacheKeys$2(cache, luvio, response.body);
|
|
4594
4903
|
return cache;
|
|
4595
4904
|
});
|
|
4596
4905
|
}, (error) => {
|
|
4597
4906
|
return luvio.handleErrorResponse(() => {
|
|
4598
4907
|
const errorSnapshot = luvio.errorSnapshot(error);
|
|
4599
4908
|
luvio.storeIngestError(key, errorSnapshot, {
|
|
4600
|
-
ttl: TTL$
|
|
4909
|
+
ttl: TTL$2,
|
|
4601
4910
|
namespace: keyPrefix,
|
|
4602
|
-
version: VERSION$
|
|
4603
|
-
representationName: RepresentationType$
|
|
4911
|
+
version: VERSION$3,
|
|
4912
|
+
representationName: RepresentationType$2
|
|
4604
4913
|
});
|
|
4605
4914
|
return luvio.storeBroadcast().then(() => errorSnapshot);
|
|
4606
4915
|
});
|
|
@@ -4610,8 +4919,8 @@ const notifyChangeFactory$1 = (luvio, options) => {
|
|
|
4610
4919
|
};
|
|
4611
4920
|
};
|
|
4612
4921
|
|
|
4613
|
-
const VERSION$
|
|
4614
|
-
function validate$
|
|
4922
|
+
const VERSION$2 = "1027d7eb6300967ad6dd208f73cbf68e";
|
|
4923
|
+
function validate$2(obj, path = 'LearningTextLessonSectionRepresentation') {
|
|
4615
4924
|
const v_error = (() => {
|
|
4616
4925
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
4617
4926
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -4651,10 +4960,10 @@ function validate$1(obj, path = 'LearningTextLessonSectionRepresentation') {
|
|
|
4651
4960
|
})();
|
|
4652
4961
|
return v_error === undefined ? null : v_error;
|
|
4653
4962
|
}
|
|
4654
|
-
const select$
|
|
4963
|
+
const select$4 = function LearningTextLessonSectionRepresentationSelect() {
|
|
4655
4964
|
return {
|
|
4656
4965
|
kind: 'Fragment',
|
|
4657
|
-
version: VERSION$
|
|
4966
|
+
version: VERSION$2,
|
|
4658
4967
|
private: [],
|
|
4659
4968
|
selections: [
|
|
4660
4969
|
{
|
|
@@ -4672,7 +4981,7 @@ const select$2 = function LearningTextLessonSectionRepresentationSelect() {
|
|
|
4672
4981
|
]
|
|
4673
4982
|
};
|
|
4674
4983
|
};
|
|
4675
|
-
function equals$
|
|
4984
|
+
function equals$2(existing, incoming) {
|
|
4676
4985
|
const existing_content = existing.content;
|
|
4677
4986
|
const incoming_content = incoming.content;
|
|
4678
4987
|
if (!(existing_content === incoming_content)) {
|
|
@@ -4691,9 +5000,9 @@ function equals$1(existing, incoming) {
|
|
|
4691
5000
|
return true;
|
|
4692
5001
|
}
|
|
4693
5002
|
|
|
4694
|
-
const TTL = 60000;
|
|
4695
|
-
const VERSION = "66ac3fbc8b5a61745a45ebd7944654e4";
|
|
4696
|
-
function validate(obj, path = 'LearningTextLessonRepresentation') {
|
|
5003
|
+
const TTL$1 = 60000;
|
|
5004
|
+
const VERSION$1 = "66ac3fbc8b5a61745a45ebd7944654e4";
|
|
5005
|
+
function validate$1(obj, path = 'LearningTextLessonRepresentation') {
|
|
4697
5006
|
const v_error = (() => {
|
|
4698
5007
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
4699
5008
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -4716,7 +5025,7 @@ function validate(obj, path = 'LearningTextLessonRepresentation') {
|
|
|
4716
5025
|
for (let i = 0; i < obj_sections.length; i++) {
|
|
4717
5026
|
const obj_sections_item = obj_sections[i];
|
|
4718
5027
|
const path_sections_item = path_sections + '[' + i + ']';
|
|
4719
|
-
const referencepath_sections_itemValidationError = validate$
|
|
5028
|
+
const referencepath_sections_itemValidationError = validate$2(obj_sections_item, path_sections_item);
|
|
4720
5029
|
if (referencepath_sections_itemValidationError !== null) {
|
|
4721
5030
|
let message = 'Object doesn\'t match LearningTextLessonSectionRepresentation (at "' + path_sections_item + '")\n';
|
|
4722
5031
|
message += referencepath_sections_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -4732,24 +5041,24 @@ function validate(obj, path = 'LearningTextLessonRepresentation') {
|
|
|
4732
5041
|
})();
|
|
4733
5042
|
return v_error === undefined ? null : v_error;
|
|
4734
5043
|
}
|
|
4735
|
-
const RepresentationType = 'LearningTextLessonRepresentation';
|
|
4736
|
-
function keyBuilder$
|
|
4737
|
-
return keyPrefix + '::' + RepresentationType + ':' + config.learning_item_id;
|
|
5044
|
+
const RepresentationType$1 = 'LearningTextLessonRepresentation';
|
|
5045
|
+
function keyBuilder$3(luvio, config) {
|
|
5046
|
+
return keyPrefix + '::' + RepresentationType$1 + ':' + config.learning_item_id;
|
|
4738
5047
|
}
|
|
4739
|
-
function keyBuilderFromType(luvio, object) {
|
|
5048
|
+
function keyBuilderFromType$1(luvio, object) {
|
|
4740
5049
|
const keyParams = {
|
|
4741
5050
|
learning_item_id: object.learningItemId
|
|
4742
5051
|
};
|
|
4743
|
-
return keyBuilder$
|
|
5052
|
+
return keyBuilder$3(luvio, keyParams);
|
|
4744
5053
|
}
|
|
4745
|
-
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
5054
|
+
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
4746
5055
|
return input;
|
|
4747
5056
|
}
|
|
4748
|
-
const select$
|
|
4749
|
-
const { selections: LearningTextLessonSectionRepresentation__selections, opaque: LearningTextLessonSectionRepresentation__opaque, } = select$
|
|
5057
|
+
const select$3 = function LearningTextLessonRepresentationSelect() {
|
|
5058
|
+
const { selections: LearningTextLessonSectionRepresentation__selections, opaque: LearningTextLessonSectionRepresentation__opaque, } = select$4();
|
|
4750
5059
|
return {
|
|
4751
5060
|
kind: 'Fragment',
|
|
4752
|
-
version: VERSION,
|
|
5061
|
+
version: VERSION$1,
|
|
4753
5062
|
private: [],
|
|
4754
5063
|
selections: [
|
|
4755
5064
|
{
|
|
@@ -4777,7 +5086,7 @@ const select$1 = function LearningTextLessonRepresentationSelect() {
|
|
|
4777
5086
|
]
|
|
4778
5087
|
};
|
|
4779
5088
|
};
|
|
4780
|
-
function equals(existing, incoming) {
|
|
5089
|
+
function equals$1(existing, incoming) {
|
|
4781
5090
|
const existing_description = existing.description;
|
|
4782
5091
|
const incoming_description = incoming.description;
|
|
4783
5092
|
if (!(existing_description === incoming_description)) {
|
|
@@ -4801,7 +5110,7 @@ function equals(existing, incoming) {
|
|
|
4801
5110
|
const existing_sections = existing.sections;
|
|
4802
5111
|
const incoming_sections = incoming.sections;
|
|
4803
5112
|
const equals_sections_items = equalsArray(existing_sections, incoming_sections, (existing_sections_item, incoming_sections_item) => {
|
|
4804
|
-
if (!(equals$
|
|
5113
|
+
if (!(equals$2(existing_sections_item, incoming_sections_item))) {
|
|
4805
5114
|
return false;
|
|
4806
5115
|
}
|
|
4807
5116
|
});
|
|
@@ -4810,24 +5119,24 @@ function equals(existing, incoming) {
|
|
|
4810
5119
|
}
|
|
4811
5120
|
return true;
|
|
4812
5121
|
}
|
|
4813
|
-
const ingest = function LearningTextLessonRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
5122
|
+
const ingest$1 = function LearningTextLessonRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
4814
5123
|
if (process.env.NODE_ENV !== 'production') {
|
|
4815
|
-
const validateError = validate(input);
|
|
5124
|
+
const validateError = validate$1(input);
|
|
4816
5125
|
if (validateError !== null) {
|
|
4817
5126
|
throw validateError;
|
|
4818
5127
|
}
|
|
4819
5128
|
}
|
|
4820
|
-
const key = keyBuilderFromType(luvio, input);
|
|
4821
|
-
const ttlToUse = TTL;
|
|
4822
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "LearningContentPlatform", VERSION, RepresentationType, equals);
|
|
5129
|
+
const key = keyBuilderFromType$1(luvio, input);
|
|
5130
|
+
const ttlToUse = TTL$1;
|
|
5131
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "LearningContentPlatform", VERSION$1, RepresentationType$1, equals$1);
|
|
4823
5132
|
return createLink(key);
|
|
4824
5133
|
};
|
|
4825
|
-
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
5134
|
+
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
4826
5135
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
4827
|
-
const rootKey = keyBuilderFromType(luvio, input);
|
|
5136
|
+
const rootKey = keyBuilderFromType$1(luvio, input);
|
|
4828
5137
|
rootKeySet.set(rootKey, {
|
|
4829
5138
|
namespace: keyPrefix,
|
|
4830
|
-
representationName: RepresentationType,
|
|
5139
|
+
representationName: RepresentationType$1,
|
|
4831
5140
|
mergeable: false
|
|
4832
5141
|
});
|
|
4833
5142
|
}
|
|
@@ -4841,29 +5150,29 @@ const notifyUpdateAvailableFactory = (luvio) => {
|
|
|
4841
5150
|
}
|
|
4842
5151
|
});
|
|
4843
5152
|
}
|
|
4844
|
-
const keys = configs.map(c => keyBuilder$
|
|
5153
|
+
const keys = configs.map(c => keyBuilder$3(luvio, c));
|
|
4845
5154
|
return luvio.notifyStoreUpdateAvailable(keys);
|
|
4846
5155
|
};
|
|
4847
5156
|
};
|
|
4848
5157
|
|
|
4849
|
-
function select(luvio, params) {
|
|
4850
|
-
return select$
|
|
5158
|
+
function select$2(luvio, params) {
|
|
5159
|
+
return select$3();
|
|
4851
5160
|
}
|
|
4852
|
-
function keyBuilder$
|
|
4853
|
-
return keyBuilder$
|
|
5161
|
+
function keyBuilder$2(luvio, params) {
|
|
5162
|
+
return keyBuilder$3(luvio, {
|
|
4854
5163
|
learning_item_id: params.urlParams.learningItemId
|
|
4855
5164
|
});
|
|
4856
5165
|
}
|
|
4857
|
-
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
4858
|
-
getTypeCacheKeys(storeKeyMap, luvio, response);
|
|
5166
|
+
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
5167
|
+
getTypeCacheKeys$1(storeKeyMap, luvio, response);
|
|
4859
5168
|
}
|
|
4860
|
-
function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
5169
|
+
function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
4861
5170
|
const { body } = response;
|
|
4862
|
-
const key = keyBuilder$
|
|
4863
|
-
luvio.storeIngest(key, ingest, body);
|
|
5171
|
+
const key = keyBuilder$2(luvio, resourceParams);
|
|
5172
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
4864
5173
|
const snapshot = luvio.storeLookup({
|
|
4865
5174
|
recordId: key,
|
|
4866
|
-
node: select(),
|
|
5175
|
+
node: select$2(),
|
|
4867
5176
|
variables: {},
|
|
4868
5177
|
}, snapshotRefresh);
|
|
4869
5178
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -4875,18 +5184,18 @@ function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
4875
5184
|
return snapshot;
|
|
4876
5185
|
}
|
|
4877
5186
|
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
4878
|
-
const key = keyBuilder$
|
|
5187
|
+
const key = keyBuilder$2(luvio, params);
|
|
4879
5188
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
4880
5189
|
const storeMetadataParams = {
|
|
4881
|
-
ttl: TTL,
|
|
5190
|
+
ttl: TTL$1,
|
|
4882
5191
|
namespace: keyPrefix,
|
|
4883
|
-
version: VERSION,
|
|
4884
|
-
representationName: RepresentationType
|
|
5192
|
+
version: VERSION$1,
|
|
5193
|
+
representationName: RepresentationType$1
|
|
4885
5194
|
};
|
|
4886
5195
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
4887
5196
|
return errorSnapshot;
|
|
4888
5197
|
}
|
|
4889
|
-
function createResourceRequest(config) {
|
|
5198
|
+
function createResourceRequest$1(config) {
|
|
4890
5199
|
const headers = {};
|
|
4891
5200
|
return {
|
|
4892
5201
|
baseUri: '/services/data/v61.0',
|
|
@@ -4904,63 +5213,63 @@ function createResourceRequestFromRepresentation(representation) {
|
|
|
4904
5213
|
urlParams: {},
|
|
4905
5214
|
};
|
|
4906
5215
|
config.urlParams.learningItemId = representation.learningItemId;
|
|
4907
|
-
return createResourceRequest(config);
|
|
5216
|
+
return createResourceRequest$1(config);
|
|
4908
5217
|
}
|
|
4909
5218
|
|
|
4910
|
-
const adapterName = 'getTextLesson';
|
|
5219
|
+
const adapterName$1 = 'getTextLesson';
|
|
4911
5220
|
const getTextLesson_ConfigPropertyMetadata = [
|
|
4912
5221
|
generateParamConfigMetadata('learningItemId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
4913
5222
|
];
|
|
4914
|
-
const getTextLesson_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getTextLesson_ConfigPropertyMetadata);
|
|
4915
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
4916
|
-
function keyBuilder(luvio, config) {
|
|
4917
|
-
const resourceParams = createResourceParams(config);
|
|
4918
|
-
return keyBuilder$
|
|
5223
|
+
const getTextLesson_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getTextLesson_ConfigPropertyMetadata);
|
|
5224
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$c(getTextLesson_ConfigPropertyMetadata);
|
|
5225
|
+
function keyBuilder$1(luvio, config) {
|
|
5226
|
+
const resourceParams = createResourceParams$1(config);
|
|
5227
|
+
return keyBuilder$2(luvio, resourceParams);
|
|
4919
5228
|
}
|
|
4920
|
-
function typeCheckConfig(untrustedConfig) {
|
|
5229
|
+
function typeCheckConfig$1(untrustedConfig) {
|
|
4921
5230
|
const config = {};
|
|
4922
|
-
typeCheckConfig$
|
|
5231
|
+
typeCheckConfig$c(untrustedConfig, config, getTextLesson_ConfigPropertyMetadata);
|
|
4923
5232
|
return config;
|
|
4924
5233
|
}
|
|
4925
|
-
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
5234
|
+
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
4926
5235
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
4927
5236
|
return null;
|
|
4928
5237
|
}
|
|
4929
5238
|
if (process.env.NODE_ENV !== 'production') {
|
|
4930
5239
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
4931
5240
|
}
|
|
4932
|
-
const config = typeCheckConfig(untrustedConfig);
|
|
5241
|
+
const config = typeCheckConfig$1(untrustedConfig);
|
|
4933
5242
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
4934
5243
|
return null;
|
|
4935
5244
|
}
|
|
4936
5245
|
return config;
|
|
4937
5246
|
}
|
|
4938
5247
|
function adapterFragment(luvio, config) {
|
|
4939
|
-
createResourceParams(config);
|
|
4940
|
-
return select();
|
|
5248
|
+
createResourceParams$1(config);
|
|
5249
|
+
return select$2();
|
|
4941
5250
|
}
|
|
4942
5251
|
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
4943
|
-
const snapshot = ingestSuccess(luvio, resourceParams, response, {
|
|
5252
|
+
const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
|
|
4944
5253
|
config,
|
|
4945
|
-
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
5254
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
4946
5255
|
});
|
|
4947
5256
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4948
5257
|
}
|
|
4949
5258
|
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
4950
5259
|
const snapshot = ingestError(luvio, resourceParams, response, {
|
|
4951
5260
|
config,
|
|
4952
|
-
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
5261
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
4953
5262
|
});
|
|
4954
5263
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4955
5264
|
}
|
|
4956
|
-
function buildNetworkSnapshot(luvio, config, options) {
|
|
4957
|
-
const resourceParams = createResourceParams(config);
|
|
4958
|
-
const request = createResourceRequest(resourceParams);
|
|
5265
|
+
function buildNetworkSnapshot$1(luvio, config, options) {
|
|
5266
|
+
const resourceParams = createResourceParams$1(config);
|
|
5267
|
+
const request = createResourceRequest$1(resourceParams);
|
|
4959
5268
|
return luvio.dispatchResourceRequest(request, options)
|
|
4960
5269
|
.then((response) => {
|
|
4961
5270
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
4962
5271
|
const cache = new StoreKeyMap();
|
|
4963
|
-
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
5272
|
+
getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
|
|
4964
5273
|
return cache;
|
|
4965
5274
|
});
|
|
4966
5275
|
}, (response) => {
|
|
@@ -4968,23 +5277,23 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
4968
5277
|
});
|
|
4969
5278
|
}
|
|
4970
5279
|
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
4971
|
-
return buildNetworkSnapshotCachePolicy$
|
|
5280
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
|
|
4972
5281
|
}
|
|
4973
5282
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
4974
5283
|
const { luvio, config } = context;
|
|
4975
5284
|
const selector = {
|
|
4976
|
-
recordId: keyBuilder(luvio, config),
|
|
5285
|
+
recordId: keyBuilder$1(luvio, config),
|
|
4977
5286
|
node: adapterFragment(luvio, config),
|
|
4978
5287
|
variables: {},
|
|
4979
5288
|
};
|
|
4980
5289
|
const cacheSnapshot = storeLookup(selector, {
|
|
4981
5290
|
config,
|
|
4982
|
-
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
5291
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
4983
5292
|
});
|
|
4984
5293
|
return cacheSnapshot;
|
|
4985
5294
|
}
|
|
4986
5295
|
const getTextLessonAdapterFactory = (luvio) => function LearningContentPlatform__getTextLesson(untrustedConfig, requestContext) {
|
|
4987
|
-
const config = validateAdapterConfig(untrustedConfig, getTextLesson_ConfigPropertyNames);
|
|
5296
|
+
const config = validateAdapterConfig$1(untrustedConfig, getTextLesson_ConfigPropertyNames);
|
|
4988
5297
|
// Invalid or incomplete config
|
|
4989
5298
|
if (config === null) {
|
|
4990
5299
|
return null;
|
|
@@ -4994,7 +5303,7 @@ const getTextLessonAdapterFactory = (luvio) => function LearningContentPlatform_
|
|
|
4994
5303
|
};
|
|
4995
5304
|
const notifyChangeFactory = (luvio, options) => {
|
|
4996
5305
|
return function getLearningContentPlatformLearningTextlessonByLearningItemIdNotifyChange(configs) {
|
|
4997
|
-
const keys = configs.map(c => keyBuilder$
|
|
5306
|
+
const keys = configs.map(c => keyBuilder$3(luvio, c));
|
|
4998
5307
|
luvio.getNotifyChangeStoreEntries(keys).then(entries => {
|
|
4999
5308
|
for (let i = 0, len = entries.length; i < len; i++) {
|
|
5000
5309
|
const { key, record: val } = entries[i];
|
|
@@ -5003,21 +5312,21 @@ const notifyChangeFactory = (luvio, options) => {
|
|
|
5003
5312
|
.then((response) => {
|
|
5004
5313
|
return luvio.handleSuccessResponse(() => {
|
|
5005
5314
|
const { body } = response;
|
|
5006
|
-
luvio.storeIngest(key, ingest, body);
|
|
5315
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
5007
5316
|
return luvio.storeBroadcast();
|
|
5008
5317
|
}, () => {
|
|
5009
5318
|
const cache = new StoreKeyMap();
|
|
5010
|
-
getTypeCacheKeys(cache, luvio, response.body);
|
|
5319
|
+
getTypeCacheKeys$1(cache, luvio, response.body);
|
|
5011
5320
|
return cache;
|
|
5012
5321
|
});
|
|
5013
5322
|
}, (error) => {
|
|
5014
5323
|
return luvio.handleErrorResponse(() => {
|
|
5015
5324
|
const errorSnapshot = luvio.errorSnapshot(error);
|
|
5016
5325
|
luvio.storeIngestError(key, errorSnapshot, {
|
|
5017
|
-
ttl: TTL,
|
|
5326
|
+
ttl: TTL$1,
|
|
5018
5327
|
namespace: keyPrefix,
|
|
5019
|
-
version: VERSION,
|
|
5020
|
-
representationName: RepresentationType
|
|
5328
|
+
version: VERSION$1,
|
|
5329
|
+
representationName: RepresentationType$1
|
|
5021
5330
|
});
|
|
5022
5331
|
return luvio.storeBroadcast().then(() => errorSnapshot);
|
|
5023
5332
|
});
|
|
@@ -5027,7 +5336,189 @@ const notifyChangeFactory = (luvio, options) => {
|
|
|
5027
5336
|
};
|
|
5028
5337
|
};
|
|
5029
5338
|
|
|
5339
|
+
const TTL = 15000;
|
|
5340
|
+
const VERSION = "d63f1d6a2345db84136a6263f8d81080";
|
|
5341
|
+
function validate(obj, path = 'CoachingAICallSubmissionOutputRepresentation') {
|
|
5342
|
+
const v_error = (() => {
|
|
5343
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
5344
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
5345
|
+
}
|
|
5346
|
+
const obj_coachingAIFeedback = obj.coachingAIFeedback;
|
|
5347
|
+
const path_coachingAIFeedback = path + '.coachingAIFeedback';
|
|
5348
|
+
const referencepath_coachingAIFeedbackValidationError = validate$f(obj_coachingAIFeedback, path_coachingAIFeedback);
|
|
5349
|
+
if (referencepath_coachingAIFeedbackValidationError !== null) {
|
|
5350
|
+
let message = 'Object doesn\'t match CoachingAIFeedbackRepresentation (at "' + path_coachingAIFeedback + '")\n';
|
|
5351
|
+
message += referencepath_coachingAIFeedbackValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
5352
|
+
return new TypeError(message);
|
|
5353
|
+
}
|
|
5354
|
+
const obj_generationId = obj.generationId;
|
|
5355
|
+
const path_generationId = path + '.generationId';
|
|
5356
|
+
if (typeof obj_generationId !== 'string') {
|
|
5357
|
+
return new TypeError('Expected "string" but received "' + typeof obj_generationId + '" (at "' + path_generationId + '")');
|
|
5358
|
+
}
|
|
5359
|
+
})();
|
|
5360
|
+
return v_error === undefined ? null : v_error;
|
|
5361
|
+
}
|
|
5362
|
+
const RepresentationType = 'CoachingAICallSubmissionOutputRepresentation';
|
|
5363
|
+
function keyBuilder(luvio, config) {
|
|
5364
|
+
return keyPrefix + '::' + RepresentationType + ':' + config.generation_id;
|
|
5365
|
+
}
|
|
5366
|
+
function keyBuilderFromType(luvio, object) {
|
|
5367
|
+
const keyParams = {
|
|
5368
|
+
generation_id: object.generationId
|
|
5369
|
+
};
|
|
5370
|
+
return keyBuilder(luvio, keyParams);
|
|
5371
|
+
}
|
|
5372
|
+
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
5373
|
+
return input;
|
|
5374
|
+
}
|
|
5375
|
+
const select$1 = function CoachingAICallSubmissionOutputRepresentationSelect() {
|
|
5376
|
+
const { selections: CoachingAIFeedbackRepresentation__selections, opaque: CoachingAIFeedbackRepresentation__opaque, } = select$q();
|
|
5377
|
+
return {
|
|
5378
|
+
kind: 'Fragment',
|
|
5379
|
+
version: VERSION,
|
|
5380
|
+
private: [],
|
|
5381
|
+
selections: [
|
|
5382
|
+
{
|
|
5383
|
+
name: 'coachingAIFeedback',
|
|
5384
|
+
kind: 'Object',
|
|
5385
|
+
selections: CoachingAIFeedbackRepresentation__selections
|
|
5386
|
+
},
|
|
5387
|
+
{
|
|
5388
|
+
name: 'generationId',
|
|
5389
|
+
kind: 'Scalar'
|
|
5390
|
+
}
|
|
5391
|
+
]
|
|
5392
|
+
};
|
|
5393
|
+
};
|
|
5394
|
+
function equals(existing, incoming) {
|
|
5395
|
+
const existing_generationId = existing.generationId;
|
|
5396
|
+
const incoming_generationId = incoming.generationId;
|
|
5397
|
+
if (!(existing_generationId === incoming_generationId)) {
|
|
5398
|
+
return false;
|
|
5399
|
+
}
|
|
5400
|
+
const existing_coachingAIFeedback = existing.coachingAIFeedback;
|
|
5401
|
+
const incoming_coachingAIFeedback = incoming.coachingAIFeedback;
|
|
5402
|
+
if (!(equals$f(existing_coachingAIFeedback, incoming_coachingAIFeedback))) {
|
|
5403
|
+
return false;
|
|
5404
|
+
}
|
|
5405
|
+
return true;
|
|
5406
|
+
}
|
|
5407
|
+
const ingest = function CoachingAICallSubmissionOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
5408
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
5409
|
+
const validateError = validate(input);
|
|
5410
|
+
if (validateError !== null) {
|
|
5411
|
+
throw validateError;
|
|
5412
|
+
}
|
|
5413
|
+
}
|
|
5414
|
+
const key = keyBuilderFromType(luvio, input);
|
|
5415
|
+
const ttlToUse = TTL;
|
|
5416
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "LearningContentPlatform", VERSION, RepresentationType, equals);
|
|
5417
|
+
return createLink(key);
|
|
5418
|
+
};
|
|
5419
|
+
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
5420
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
5421
|
+
const rootKey = keyBuilderFromType(luvio, input);
|
|
5422
|
+
rootKeySet.set(rootKey, {
|
|
5423
|
+
namespace: keyPrefix,
|
|
5424
|
+
representationName: RepresentationType,
|
|
5425
|
+
mergeable: false
|
|
5426
|
+
});
|
|
5427
|
+
}
|
|
5428
|
+
|
|
5429
|
+
function select(luvio, params) {
|
|
5430
|
+
return select$1();
|
|
5431
|
+
}
|
|
5432
|
+
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
5433
|
+
getTypeCacheKeys(storeKeyMap, luvio, response);
|
|
5434
|
+
}
|
|
5435
|
+
function ingestSuccess(luvio, resourceParams, response) {
|
|
5436
|
+
const { body } = response;
|
|
5437
|
+
const key = keyBuilderFromType(luvio, body);
|
|
5438
|
+
luvio.storeIngest(key, ingest, body);
|
|
5439
|
+
const snapshot = luvio.storeLookup({
|
|
5440
|
+
recordId: key,
|
|
5441
|
+
node: select(),
|
|
5442
|
+
variables: {},
|
|
5443
|
+
});
|
|
5444
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
5445
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
5446
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
5447
|
+
}
|
|
5448
|
+
}
|
|
5449
|
+
deepFreeze(snapshot.data);
|
|
5450
|
+
return snapshot;
|
|
5451
|
+
}
|
|
5452
|
+
function createResourceRequest(config) {
|
|
5453
|
+
const headers = {};
|
|
5454
|
+
return {
|
|
5455
|
+
baseUri: '/services/data/v61.0',
|
|
5456
|
+
basePath: '/learning-content-platform/coaching/ai-feedback',
|
|
5457
|
+
method: 'post',
|
|
5458
|
+
body: config.body,
|
|
5459
|
+
urlParams: {},
|
|
5460
|
+
queryParams: {},
|
|
5461
|
+
headers,
|
|
5462
|
+
priority: 'normal',
|
|
5463
|
+
};
|
|
5464
|
+
}
|
|
5465
|
+
|
|
5466
|
+
const adapterName = 'submitForCoachingAIFeedback';
|
|
5467
|
+
const submitForCoachingAIFeedback_ConfigPropertyMetadata = [
|
|
5468
|
+
generateParamConfigMetadata('callId', true, 2 /* Body */, 0 /* String */),
|
|
5469
|
+
generateParamConfigMetadata('learningItemId', true, 2 /* Body */, 0 /* String */),
|
|
5470
|
+
];
|
|
5471
|
+
const submitForCoachingAIFeedback_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, submitForCoachingAIFeedback_ConfigPropertyMetadata);
|
|
5472
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$c(submitForCoachingAIFeedback_ConfigPropertyMetadata);
|
|
5473
|
+
function typeCheckConfig(untrustedConfig) {
|
|
5474
|
+
const config = {};
|
|
5475
|
+
typeCheckConfig$c(untrustedConfig, config, submitForCoachingAIFeedback_ConfigPropertyMetadata);
|
|
5476
|
+
return config;
|
|
5477
|
+
}
|
|
5478
|
+
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
5479
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
5480
|
+
return null;
|
|
5481
|
+
}
|
|
5482
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
5483
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
5484
|
+
}
|
|
5485
|
+
const config = typeCheckConfig(untrustedConfig);
|
|
5486
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
5487
|
+
return null;
|
|
5488
|
+
}
|
|
5489
|
+
return config;
|
|
5490
|
+
}
|
|
5491
|
+
function buildNetworkSnapshot(luvio, config, options) {
|
|
5492
|
+
const resourceParams = createResourceParams(config);
|
|
5493
|
+
const request = createResourceRequest(resourceParams);
|
|
5494
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
5495
|
+
.then((response) => {
|
|
5496
|
+
return luvio.handleSuccessResponse(() => {
|
|
5497
|
+
const snapshot = ingestSuccess(luvio, resourceParams, response);
|
|
5498
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
5499
|
+
}, () => {
|
|
5500
|
+
const cache = new StoreKeyMap();
|
|
5501
|
+
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
5502
|
+
return cache;
|
|
5503
|
+
});
|
|
5504
|
+
}, (response) => {
|
|
5505
|
+
deepFreeze(response);
|
|
5506
|
+
throw response;
|
|
5507
|
+
});
|
|
5508
|
+
}
|
|
5509
|
+
const submitForCoachingAIFeedbackAdapterFactory = (luvio) => {
|
|
5510
|
+
return function submitForCoachingAIFeedback(untrustedConfig) {
|
|
5511
|
+
const config = validateAdapterConfig(untrustedConfig, submitForCoachingAIFeedback_ConfigPropertyNames);
|
|
5512
|
+
// Invalid or incomplete config
|
|
5513
|
+
if (config === null) {
|
|
5514
|
+
throw new Error('Invalid config for "submitForCoachingAIFeedback"');
|
|
5515
|
+
}
|
|
5516
|
+
return buildNetworkSnapshot(luvio, config);
|
|
5517
|
+
};
|
|
5518
|
+
};
|
|
5519
|
+
|
|
5030
5520
|
let evaluateLearningItem;
|
|
5521
|
+
let getCoachingAIFeedback;
|
|
5031
5522
|
let getFeaturedItemsRecommendedList;
|
|
5032
5523
|
let getFeaturedItemsRelatedList;
|
|
5033
5524
|
let getLearningConfig;
|
|
@@ -5040,7 +5531,9 @@ let getModule;
|
|
|
5040
5531
|
let getModuleNotifyChange;
|
|
5041
5532
|
let getTextLesson;
|
|
5042
5533
|
let getTextLessonNotifyChange;
|
|
5534
|
+
let submitForCoachingAIFeedback;
|
|
5043
5535
|
// Imperative GET Adapters
|
|
5536
|
+
let getCoachingAIFeedback_imperative;
|
|
5044
5537
|
let getFeaturedItemsRecommendedList_imperative;
|
|
5045
5538
|
let getFeaturedItemsRelatedList_imperative;
|
|
5046
5539
|
let getLearningConfig_imperative;
|
|
@@ -5050,6 +5543,10 @@ let getLearningModel_imperative;
|
|
|
5050
5543
|
let getLearningPractice_imperative;
|
|
5051
5544
|
let getModule_imperative;
|
|
5052
5545
|
let getTextLesson_imperative;
|
|
5546
|
+
const getCoachingAIFeedbackMetadata = {
|
|
5547
|
+
apiFamily: 'LearningContentPlatform',
|
|
5548
|
+
name: 'getCoachingAIFeedback',
|
|
5549
|
+
};
|
|
5053
5550
|
const getFeaturedItemsRecommendedListMetadata = {
|
|
5054
5551
|
apiFamily: 'LearningContentPlatform',
|
|
5055
5552
|
name: 'getFeaturedItemsRecommendedList',
|
|
@@ -5096,6 +5593,7 @@ let notifyLearningItemUpdateAvailable;
|
|
|
5096
5593
|
let notifyLearningTextLessonUpdateAvailable;
|
|
5097
5594
|
function bindExportsTo(luvio) {
|
|
5098
5595
|
// LDS Adapters
|
|
5596
|
+
const getCoachingAIFeedback_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getCoachingAIFeedback', getCoachingAIFeedbackAdapterFactory), getCoachingAIFeedbackMetadata);
|
|
5099
5597
|
const getFeaturedItemsRecommendedList_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getFeaturedItemsRecommendedList', getFeaturedItemsRecommendedListAdapterFactory), getFeaturedItemsRecommendedListMetadata);
|
|
5100
5598
|
const getFeaturedItemsRelatedList_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getFeaturedItemsRelatedList', getFeaturedItemsRelatedListAdapterFactory), getFeaturedItemsRelatedListMetadata);
|
|
5101
5599
|
const getLearningConfig_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getLearningConfig', getLearningConfigAdapterFactory), getLearningConfigMetadata);
|
|
@@ -5111,6 +5609,7 @@ function bindExportsTo(luvio) {
|
|
|
5111
5609
|
}
|
|
5112
5610
|
return {
|
|
5113
5611
|
evaluateLearningItem: unwrapSnapshotData(evaluateLearningItemAdapterFactory),
|
|
5612
|
+
getCoachingAIFeedback: createWireAdapterConstructor(luvio, getCoachingAIFeedback_ldsAdapter, getCoachingAIFeedbackMetadata),
|
|
5114
5613
|
getFeaturedItemsRecommendedList: createWireAdapterConstructor(luvio, getFeaturedItemsRecommendedList_ldsAdapter, getFeaturedItemsRecommendedListMetadata),
|
|
5115
5614
|
getFeaturedItemsRelatedList: createWireAdapterConstructor(luvio, getFeaturedItemsRelatedList_ldsAdapter, getFeaturedItemsRelatedListMetadata),
|
|
5116
5615
|
getLearningConfig: createWireAdapterConstructor(luvio, getLearningConfig_ldsAdapter, getLearningConfigMetadata),
|
|
@@ -5123,7 +5622,9 @@ function bindExportsTo(luvio) {
|
|
|
5123
5622
|
getModuleNotifyChange: createLDSAdapter(luvio, 'getModuleNotifyChange', notifyChangeFactory$1),
|
|
5124
5623
|
getTextLesson: createWireAdapterConstructor(luvio, getTextLesson_ldsAdapter, getTextLessonMetadata),
|
|
5125
5624
|
getTextLessonNotifyChange: createLDSAdapter(luvio, 'getTextLessonNotifyChange', notifyChangeFactory),
|
|
5625
|
+
submitForCoachingAIFeedback: unwrapSnapshotData(submitForCoachingAIFeedbackAdapterFactory),
|
|
5126
5626
|
// Imperative GET Adapters
|
|
5627
|
+
getCoachingAIFeedback_imperative: createImperativeAdapter(luvio, getCoachingAIFeedback_ldsAdapter, getCoachingAIFeedbackMetadata),
|
|
5127
5628
|
getFeaturedItemsRecommendedList_imperative: createImperativeAdapter(luvio, getFeaturedItemsRecommendedList_ldsAdapter, getFeaturedItemsRecommendedListMetadata),
|
|
5128
5629
|
getFeaturedItemsRelatedList_imperative: createImperativeAdapter(luvio, getFeaturedItemsRelatedList_ldsAdapter, getFeaturedItemsRelatedListMetadata),
|
|
5129
5630
|
getLearningConfig_imperative: createImperativeAdapter(luvio, getLearningConfig_ldsAdapter, getLearningConfigMetadata),
|
|
@@ -5142,6 +5643,7 @@ function bindExportsTo(luvio) {
|
|
|
5142
5643
|
withDefaultLuvio((luvio) => {
|
|
5143
5644
|
({
|
|
5144
5645
|
evaluateLearningItem,
|
|
5646
|
+
getCoachingAIFeedback,
|
|
5145
5647
|
getFeaturedItemsRecommendedList,
|
|
5146
5648
|
getFeaturedItemsRelatedList,
|
|
5147
5649
|
getLearningConfig,
|
|
@@ -5154,6 +5656,8 @@ withDefaultLuvio((luvio) => {
|
|
|
5154
5656
|
getModuleNotifyChange,
|
|
5155
5657
|
getTextLesson,
|
|
5156
5658
|
getTextLessonNotifyChange,
|
|
5659
|
+
submitForCoachingAIFeedback,
|
|
5660
|
+
getCoachingAIFeedback_imperative,
|
|
5157
5661
|
getFeaturedItemsRecommendedList_imperative,
|
|
5158
5662
|
getFeaturedItemsRelatedList_imperative,
|
|
5159
5663
|
getLearningConfig_imperative,
|
|
@@ -5169,5 +5673,5 @@ withDefaultLuvio((luvio) => {
|
|
|
5169
5673
|
} = bindExportsTo(luvio));
|
|
5170
5674
|
});
|
|
5171
5675
|
|
|
5172
|
-
export { evaluateLearningItem, getFeaturedItemsRecommendedList, getFeaturedItemsRecommendedList_imperative, getFeaturedItemsRelatedList, getFeaturedItemsRelatedList_imperative, getLearningConfig, getLearningConfig_imperative, getLearningItemProgress, getLearningItemProgress_imperative, getLearningItemsList, getLearningItemsList_imperative, getLearningModel, getLearningModel_imperative, getLearningPractice, getLearningPracticeNotifyChange, getLearningPractice_imperative, getModule, getModuleNotifyChange, getModule_imperative, getTextLesson, getTextLessonNotifyChange, getTextLesson_imperative, notifyLearningItemProgressUpdateAvailable, notifyLearningItemUpdateAvailable, notifyLearningTextLessonUpdateAvailable };
|
|
5173
|
-
// version: 1.
|
|
5676
|
+
export { evaluateLearningItem, getCoachingAIFeedback, getCoachingAIFeedback_imperative, getFeaturedItemsRecommendedList, getFeaturedItemsRecommendedList_imperative, getFeaturedItemsRelatedList, getFeaturedItemsRelatedList_imperative, getLearningConfig, getLearningConfig_imperative, getLearningItemProgress, getLearningItemProgress_imperative, getLearningItemsList, getLearningItemsList_imperative, getLearningModel, getLearningModel_imperative, getLearningPractice, getLearningPracticeNotifyChange, getLearningPractice_imperative, getModule, getModuleNotifyChange, getModule_imperative, getTextLesson, getTextLessonNotifyChange, getTextLesson_imperative, notifyLearningItemProgressUpdateAvailable, notifyLearningItemUpdateAvailable, notifyLearningTextLessonUpdateAvailable, submitForCoachingAIFeedback };
|
|
5677
|
+
// version: 1.276.0-58fd72593
|