@salesforce/lds-adapters-platform-learning-content 1.296.1 → 1.298.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 +247 -64
- package/dist/es/es2018/types/src/generated/adapters/submitForCoachingMomentsProductPitchFeedback.d.ts +16 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +1 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +2 -1
- package/dist/es/es2018/types/src/generated/resources/postLearningContentPlatformCoachingMomentsAiProductPitchFeedback.d.ts +13 -0
- package/dist/es/es2018/types/src/generated/types/CoachingAIFeedbackSummaryOutputRepresentation.d.ts +41 -0
- package/dist/es/es2018/types/src/generated/types/CoachingAIProductPitchFeedbackInputRepresentation.d.ts +31 -0
- package/package.json +4 -4
- package/sfdc/index.js +867 -681
- package/src/raml/api.raml +37 -1
- package/src/raml/luvio.raml +8 -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$d, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$a, typeCheckConfig as typeCheckConfig$d } 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$h(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$8 = 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$g(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$e = 'LearningItemProgressRepresentation';
|
|
228
|
+
function keyBuilder$s(luvio, config) {
|
|
229
|
+
return keyPrefix + '::' + RepresentationType$e + ':' + config.learning_item_id;
|
|
230
230
|
}
|
|
231
|
-
function keyBuilderFromType$
|
|
231
|
+
function keyBuilderFromType$8(luvio, object) {
|
|
232
232
|
const keyParams = {
|
|
233
233
|
learning_item_id: object.learningItemId
|
|
234
234
|
};
|
|
235
|
-
return keyBuilder$
|
|
235
|
+
return keyBuilder$s(luvio, keyParams);
|
|
236
236
|
}
|
|
237
|
-
function normalize$
|
|
237
|
+
function normalize$e(input, existing, path, luvio, store, timestamp) {
|
|
238
238
|
return input;
|
|
239
239
|
}
|
|
240
|
-
const select$
|
|
240
|
+
const select$u = 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$s = 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$g(existing, incoming) {
|
|
|
285
285
|
}
|
|
286
286
|
return true;
|
|
287
287
|
}
|
|
288
|
-
const ingest$
|
|
288
|
+
const ingest$e = 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$8(luvio, input);
|
|
296
|
+
const ttlToUse = TTL$8;
|
|
297
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$e, "LearningContentPlatform", VERSION$h, RepresentationType$e, equals$h);
|
|
298
298
|
return createLink(key);
|
|
299
299
|
};
|
|
300
|
-
function getTypeCacheKeys$
|
|
300
|
+
function getTypeCacheKeys$e(rootKeySet, luvio, input, fullPathFactory) {
|
|
301
301
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
302
|
-
const rootKey = keyBuilderFromType$
|
|
302
|
+
const rootKey = keyBuilderFromType$8(luvio, input);
|
|
303
303
|
rootKeySet.set(rootKey, {
|
|
304
304
|
namespace: keyPrefix,
|
|
305
|
-
representationName: RepresentationType$
|
|
305
|
+
representationName: RepresentationType$e,
|
|
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$s(luvio, c));
|
|
320
320
|
return luvio.notifyStoreUpdateAvailable(keys);
|
|
321
321
|
};
|
|
322
322
|
};
|
|
323
323
|
|
|
324
|
-
function select$
|
|
325
|
-
return select$
|
|
324
|
+
function select$t(luvio, params) {
|
|
325
|
+
return select$u();
|
|
326
326
|
}
|
|
327
|
-
function getResponseCacheKeys$
|
|
328
|
-
getTypeCacheKeys$
|
|
327
|
+
function getResponseCacheKeys$c(storeKeyMap, luvio, resourceParams, response) {
|
|
328
|
+
getTypeCacheKeys$e(storeKeyMap, luvio, response);
|
|
329
329
|
}
|
|
330
|
-
function ingestSuccess$
|
|
330
|
+
function ingestSuccess$c(luvio, resourceParams, response) {
|
|
331
331
|
const { body } = response;
|
|
332
|
-
const key = keyBuilderFromType$
|
|
333
|
-
luvio.storeIngest(key, ingest$
|
|
332
|
+
const key = keyBuilderFromType$8(luvio, body);
|
|
333
|
+
luvio.storeIngest(key, ingest$e, body);
|
|
334
334
|
const snapshot = luvio.storeLookup({
|
|
335
335
|
recordId: key,
|
|
336
|
-
node: select$
|
|
336
|
+
node: select$t(),
|
|
337
337
|
variables: {},
|
|
338
338
|
});
|
|
339
339
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -344,7 +344,7 @@ function ingestSuccess$b(luvio, resourceParams, response) {
|
|
|
344
344
|
deepFreeze(snapshot.data);
|
|
345
345
|
return snapshot;
|
|
346
346
|
}
|
|
347
|
-
function createResourceRequest$
|
|
347
|
+
function createResourceRequest$c(config) {
|
|
348
348
|
const headers = {};
|
|
349
349
|
return {
|
|
350
350
|
baseUri: '/services/data/v62.0',
|
|
@@ -358,45 +358,45 @@ function createResourceRequest$b(config) {
|
|
|
358
358
|
};
|
|
359
359
|
}
|
|
360
360
|
|
|
361
|
-
const adapterName$
|
|
361
|
+
const adapterName$c = '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$c, evaluateLearningItem_ConfigPropertyMetadata);
|
|
366
|
+
const createResourceParams$c = /*#__PURE__*/ createResourceParams$d(evaluateLearningItem_ConfigPropertyMetadata);
|
|
367
|
+
function typeCheckConfig$c(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$c(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$c(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$c(luvio, config, options) {
|
|
390
|
+
const resourceParams = createResourceParams$c(config);
|
|
391
|
+
const request = createResourceRequest$c(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$c(luvio, resourceParams, response);
|
|
396
396
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
397
397
|
}, () => {
|
|
398
398
|
const cache = new StoreKeyMap();
|
|
399
|
-
getResponseCacheKeys$
|
|
399
|
+
getResponseCacheKeys$c(cache, luvio, resourceParams, response.body);
|
|
400
400
|
return cache;
|
|
401
401
|
});
|
|
402
402
|
}, (response) => {
|
|
@@ -406,17 +406,17 @@ function buildNetworkSnapshot$b(luvio, config, options) {
|
|
|
406
406
|
}
|
|
407
407
|
const evaluateLearningItemAdapterFactory = (luvio) => {
|
|
408
408
|
return function evaluateLearningItem(untrustedConfig) {
|
|
409
|
-
const config = validateAdapterConfig$
|
|
409
|
+
const config = validateAdapterConfig$c(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$c(luvio, config);
|
|
415
415
|
};
|
|
416
416
|
};
|
|
417
417
|
|
|
418
|
-
const VERSION$
|
|
419
|
-
function validate$
|
|
418
|
+
const VERSION$g = "1d9120ef9f750e06b6b3bd3301a1970a";
|
|
419
|
+
function validate$g(obj, path = 'CoachingAIFeedbackRepresentation') {
|
|
420
420
|
const v_error = (() => {
|
|
421
421
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
422
422
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -434,14 +434,14 @@ function validate$f(obj, path = 'CoachingAIFeedbackRepresentation') {
|
|
|
434
434
|
})();
|
|
435
435
|
return v_error === undefined ? null : v_error;
|
|
436
436
|
}
|
|
437
|
-
const RepresentationType$
|
|
438
|
-
function normalize$
|
|
437
|
+
const RepresentationType$d = 'CoachingAIFeedbackRepresentation';
|
|
438
|
+
function normalize$d(input, existing, path, luvio, store, timestamp) {
|
|
439
439
|
return input;
|
|
440
440
|
}
|
|
441
|
-
const select$
|
|
441
|
+
const select$s = function CoachingAIFeedbackRepresentationSelect() {
|
|
442
442
|
return {
|
|
443
443
|
kind: 'Fragment',
|
|
444
|
-
version: VERSION$
|
|
444
|
+
version: VERSION$g,
|
|
445
445
|
private: [],
|
|
446
446
|
selections: [
|
|
447
447
|
{
|
|
@@ -455,7 +455,7 @@ const select$q = function CoachingAIFeedbackRepresentationSelect() {
|
|
|
455
455
|
]
|
|
456
456
|
};
|
|
457
457
|
};
|
|
458
|
-
function equals$
|
|
458
|
+
function equals$g(existing, incoming) {
|
|
459
459
|
const existing_conversationSummaryId = existing.conversationSummaryId;
|
|
460
460
|
const incoming_conversationSummaryId = incoming.conversationSummaryId;
|
|
461
461
|
if (!(existing_conversationSummaryId === incoming_conversationSummaryId)) {
|
|
@@ -468,44 +468,44 @@ function equals$f(existing, incoming) {
|
|
|
468
468
|
}
|
|
469
469
|
return true;
|
|
470
470
|
}
|
|
471
|
-
const ingest$
|
|
471
|
+
const ingest$d = function CoachingAIFeedbackRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
472
472
|
if (process.env.NODE_ENV !== 'production') {
|
|
473
|
-
const validateError = validate$
|
|
473
|
+
const validateError = validate$g(input);
|
|
474
474
|
if (validateError !== null) {
|
|
475
475
|
throw validateError;
|
|
476
476
|
}
|
|
477
477
|
}
|
|
478
478
|
const key = path.fullPath;
|
|
479
479
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 2592000000;
|
|
480
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
480
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$d, "LearningContentPlatform", VERSION$g, RepresentationType$d, equals$g);
|
|
481
481
|
return createLink(key);
|
|
482
482
|
};
|
|
483
|
-
function getTypeCacheKeys$
|
|
483
|
+
function getTypeCacheKeys$d(rootKeySet, luvio, input, fullPathFactory) {
|
|
484
484
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
485
485
|
const rootKey = fullPathFactory();
|
|
486
486
|
rootKeySet.set(rootKey, {
|
|
487
487
|
namespace: keyPrefix,
|
|
488
|
-
representationName: RepresentationType$
|
|
488
|
+
representationName: RepresentationType$d,
|
|
489
489
|
mergeable: false
|
|
490
490
|
});
|
|
491
491
|
}
|
|
492
492
|
|
|
493
|
-
function select$
|
|
494
|
-
return select$
|
|
493
|
+
function select$r(luvio, params) {
|
|
494
|
+
return select$s();
|
|
495
495
|
}
|
|
496
|
-
function keyBuilder$
|
|
496
|
+
function keyBuilder$r(luvio, params) {
|
|
497
497
|
return keyPrefix + '::CoachingAIFeedbackRepresentation:(' + 'learningItemSubmissionId:' + params.urlParams.learningItemSubmissionId + ')';
|
|
498
498
|
}
|
|
499
|
-
function getResponseCacheKeys$
|
|
500
|
-
getTypeCacheKeys$
|
|
499
|
+
function getResponseCacheKeys$b(storeKeyMap, luvio, resourceParams, response) {
|
|
500
|
+
getTypeCacheKeys$d(storeKeyMap, luvio, response, () => keyBuilder$r(luvio, resourceParams));
|
|
501
501
|
}
|
|
502
|
-
function ingestSuccess$
|
|
502
|
+
function ingestSuccess$b(luvio, resourceParams, response, snapshotRefresh) {
|
|
503
503
|
const { body } = response;
|
|
504
|
-
const key = keyBuilder$
|
|
505
|
-
luvio.storeIngest(key, ingest$
|
|
504
|
+
const key = keyBuilder$r(luvio, resourceParams);
|
|
505
|
+
luvio.storeIngest(key, ingest$d, body);
|
|
506
506
|
const snapshot = luvio.storeLookup({
|
|
507
507
|
recordId: key,
|
|
508
|
-
node: select$
|
|
508
|
+
node: select$r(),
|
|
509
509
|
variables: {},
|
|
510
510
|
}, snapshotRefresh);
|
|
511
511
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -517,12 +517,12 @@ function ingestSuccess$a(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
517
517
|
return snapshot;
|
|
518
518
|
}
|
|
519
519
|
function ingestError$9(luvio, params, error, snapshotRefresh) {
|
|
520
|
-
const key = keyBuilder$
|
|
520
|
+
const key = keyBuilder$r(luvio, params);
|
|
521
521
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
522
522
|
luvio.storeIngestError(key, errorSnapshot);
|
|
523
523
|
return errorSnapshot;
|
|
524
524
|
}
|
|
525
|
-
function createResourceRequest$
|
|
525
|
+
function createResourceRequest$b(config) {
|
|
526
526
|
const headers = {};
|
|
527
527
|
return {
|
|
528
528
|
baseUri: '/services/data/v62.0',
|
|
@@ -536,60 +536,60 @@ function createResourceRequest$a(config) {
|
|
|
536
536
|
};
|
|
537
537
|
}
|
|
538
538
|
|
|
539
|
-
const adapterName$
|
|
539
|
+
const adapterName$b = 'getCoachingAIFeedback';
|
|
540
540
|
const getCoachingAIFeedback_ConfigPropertyMetadata = [
|
|
541
541
|
generateParamConfigMetadata('learningItemSubmissionId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
542
542
|
];
|
|
543
|
-
const getCoachingAIFeedback_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
544
|
-
const createResourceParams$
|
|
545
|
-
function keyBuilder$
|
|
546
|
-
const resourceParams = createResourceParams$
|
|
547
|
-
return keyBuilder$
|
|
543
|
+
const getCoachingAIFeedback_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$b, getCoachingAIFeedback_ConfigPropertyMetadata);
|
|
544
|
+
const createResourceParams$b = /*#__PURE__*/ createResourceParams$d(getCoachingAIFeedback_ConfigPropertyMetadata);
|
|
545
|
+
function keyBuilder$q(luvio, config) {
|
|
546
|
+
const resourceParams = createResourceParams$b(config);
|
|
547
|
+
return keyBuilder$r(luvio, resourceParams);
|
|
548
548
|
}
|
|
549
|
-
function typeCheckConfig$
|
|
549
|
+
function typeCheckConfig$b(untrustedConfig) {
|
|
550
550
|
const config = {};
|
|
551
|
-
typeCheckConfig$
|
|
551
|
+
typeCheckConfig$d(untrustedConfig, config, getCoachingAIFeedback_ConfigPropertyMetadata);
|
|
552
552
|
return config;
|
|
553
553
|
}
|
|
554
|
-
function validateAdapterConfig$
|
|
554
|
+
function validateAdapterConfig$b(untrustedConfig, configPropertyNames) {
|
|
555
555
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
556
556
|
return null;
|
|
557
557
|
}
|
|
558
558
|
if (process.env.NODE_ENV !== 'production') {
|
|
559
559
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
560
560
|
}
|
|
561
|
-
const config = typeCheckConfig$
|
|
561
|
+
const config = typeCheckConfig$b(untrustedConfig);
|
|
562
562
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
563
563
|
return null;
|
|
564
564
|
}
|
|
565
565
|
return config;
|
|
566
566
|
}
|
|
567
567
|
function adapterFragment$9(luvio, config) {
|
|
568
|
-
createResourceParams$
|
|
569
|
-
return select$
|
|
568
|
+
createResourceParams$b(config);
|
|
569
|
+
return select$r();
|
|
570
570
|
}
|
|
571
571
|
function onFetchResponseSuccess$9(luvio, config, resourceParams, response) {
|
|
572
|
-
const snapshot = ingestSuccess$
|
|
572
|
+
const snapshot = ingestSuccess$b(luvio, resourceParams, response, {
|
|
573
573
|
config,
|
|
574
|
-
resolve: () => buildNetworkSnapshot$
|
|
574
|
+
resolve: () => buildNetworkSnapshot$b(luvio, config, snapshotRefreshOptions)
|
|
575
575
|
});
|
|
576
576
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
577
577
|
}
|
|
578
578
|
function onFetchResponseError$9(luvio, config, resourceParams, response) {
|
|
579
579
|
const snapshot = ingestError$9(luvio, resourceParams, response, {
|
|
580
580
|
config,
|
|
581
|
-
resolve: () => buildNetworkSnapshot$
|
|
581
|
+
resolve: () => buildNetworkSnapshot$b(luvio, config, snapshotRefreshOptions)
|
|
582
582
|
});
|
|
583
583
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
584
584
|
}
|
|
585
|
-
function buildNetworkSnapshot$
|
|
586
|
-
const resourceParams = createResourceParams$
|
|
587
|
-
const request = createResourceRequest$
|
|
585
|
+
function buildNetworkSnapshot$b(luvio, config, options) {
|
|
586
|
+
const resourceParams = createResourceParams$b(config);
|
|
587
|
+
const request = createResourceRequest$b(resourceParams);
|
|
588
588
|
return luvio.dispatchResourceRequest(request, options)
|
|
589
589
|
.then((response) => {
|
|
590
590
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$9(luvio, config, resourceParams, response), () => {
|
|
591
591
|
const cache = new StoreKeyMap();
|
|
592
|
-
getResponseCacheKeys$
|
|
592
|
+
getResponseCacheKeys$b(cache, luvio, resourceParams, response.body);
|
|
593
593
|
return cache;
|
|
594
594
|
});
|
|
595
595
|
}, (response) => {
|
|
@@ -597,23 +597,23 @@ function buildNetworkSnapshot$a(luvio, config, options) {
|
|
|
597
597
|
});
|
|
598
598
|
}
|
|
599
599
|
function buildNetworkSnapshotCachePolicy$9(context, coercedAdapterRequestContext) {
|
|
600
|
-
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
600
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$b, undefined, false);
|
|
601
601
|
}
|
|
602
602
|
function buildCachedSnapshotCachePolicy$9(context, storeLookup) {
|
|
603
603
|
const { luvio, config } = context;
|
|
604
604
|
const selector = {
|
|
605
|
-
recordId: keyBuilder$
|
|
605
|
+
recordId: keyBuilder$q(luvio, config),
|
|
606
606
|
node: adapterFragment$9(luvio, config),
|
|
607
607
|
variables: {},
|
|
608
608
|
};
|
|
609
609
|
const cacheSnapshot = storeLookup(selector, {
|
|
610
610
|
config,
|
|
611
|
-
resolve: () => buildNetworkSnapshot$
|
|
611
|
+
resolve: () => buildNetworkSnapshot$b(luvio, config, snapshotRefreshOptions)
|
|
612
612
|
});
|
|
613
613
|
return cacheSnapshot;
|
|
614
614
|
}
|
|
615
615
|
const getCoachingAIFeedbackAdapterFactory = (luvio) => function LearningContentPlatform__getCoachingAIFeedback(untrustedConfig, requestContext) {
|
|
616
|
-
const config = validateAdapterConfig$
|
|
616
|
+
const config = validateAdapterConfig$b(untrustedConfig, getCoachingAIFeedback_ConfigPropertyNames);
|
|
617
617
|
// Invalid or incomplete config
|
|
618
618
|
if (config === null) {
|
|
619
619
|
return null;
|
|
@@ -622,9 +622,9 @@ const getCoachingAIFeedbackAdapterFactory = (luvio) => function LearningContentP
|
|
|
622
622
|
buildCachedSnapshotCachePolicy$9, buildNetworkSnapshotCachePolicy$9);
|
|
623
623
|
};
|
|
624
624
|
|
|
625
|
-
const TTL$
|
|
626
|
-
const VERSION$
|
|
627
|
-
function validate$
|
|
625
|
+
const TTL$7 = 15000;
|
|
626
|
+
const VERSION$f = "b489f9f2cbdc91a04dd15b4d467b6760";
|
|
627
|
+
function validate$f(obj, path = 'FeaturedItemRepresentation') {
|
|
628
628
|
const v_error = (() => {
|
|
629
629
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
630
630
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1021,23 +1021,23 @@ function validate$e(obj, path = 'FeaturedItemRepresentation') {
|
|
|
1021
1021
|
})();
|
|
1022
1022
|
return v_error === undefined ? null : v_error;
|
|
1023
1023
|
}
|
|
1024
|
-
const RepresentationType$
|
|
1025
|
-
function keyBuilder$
|
|
1026
|
-
return keyPrefix + '::' + RepresentationType$
|
|
1024
|
+
const RepresentationType$c = 'FeaturedItemRepresentation';
|
|
1025
|
+
function keyBuilder$p(luvio, config) {
|
|
1026
|
+
return keyPrefix + '::' + RepresentationType$c + ':' + config.id;
|
|
1027
1027
|
}
|
|
1028
|
-
function keyBuilderFromType$
|
|
1028
|
+
function keyBuilderFromType$7(luvio, object) {
|
|
1029
1029
|
const keyParams = {
|
|
1030
1030
|
id: object.id
|
|
1031
1031
|
};
|
|
1032
|
-
return keyBuilder$
|
|
1032
|
+
return keyBuilder$p(luvio, keyParams);
|
|
1033
1033
|
}
|
|
1034
|
-
function normalize$
|
|
1034
|
+
function normalize$c(input, existing, path, luvio, store, timestamp) {
|
|
1035
1035
|
return input;
|
|
1036
1036
|
}
|
|
1037
|
-
const select$
|
|
1037
|
+
const select$q = function FeaturedItemRepresentationSelect() {
|
|
1038
1038
|
return {
|
|
1039
1039
|
kind: 'Fragment',
|
|
1040
|
-
version: VERSION$
|
|
1040
|
+
version: VERSION$f,
|
|
1041
1041
|
private: [],
|
|
1042
1042
|
selections: [
|
|
1043
1043
|
{
|
|
@@ -1119,7 +1119,7 @@ const select$o = function FeaturedItemRepresentationSelect() {
|
|
|
1119
1119
|
]
|
|
1120
1120
|
};
|
|
1121
1121
|
};
|
|
1122
|
-
function equals$
|
|
1122
|
+
function equals$f(existing, incoming) {
|
|
1123
1123
|
const existing_description = existing.description;
|
|
1124
1124
|
const incoming_description = incoming.description;
|
|
1125
1125
|
if (!(existing_description === incoming_description)) {
|
|
@@ -1217,30 +1217,30 @@ function equals$e(existing, incoming) {
|
|
|
1217
1217
|
}
|
|
1218
1218
|
return true;
|
|
1219
1219
|
}
|
|
1220
|
-
const ingest$
|
|
1220
|
+
const ingest$c = function FeaturedItemRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1221
1221
|
if (process.env.NODE_ENV !== 'production') {
|
|
1222
|
-
const validateError = validate$
|
|
1222
|
+
const validateError = validate$f(input);
|
|
1223
1223
|
if (validateError !== null) {
|
|
1224
1224
|
throw validateError;
|
|
1225
1225
|
}
|
|
1226
1226
|
}
|
|
1227
|
-
const key = keyBuilderFromType$
|
|
1228
|
-
const ttlToUse = TTL$
|
|
1229
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
1227
|
+
const key = keyBuilderFromType$7(luvio, input);
|
|
1228
|
+
const ttlToUse = TTL$7;
|
|
1229
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$c, "LearningContentPlatform", VERSION$f, RepresentationType$c, equals$f);
|
|
1230
1230
|
return createLink(key);
|
|
1231
1231
|
};
|
|
1232
|
-
function getTypeCacheKeys$
|
|
1232
|
+
function getTypeCacheKeys$c(rootKeySet, luvio, input, fullPathFactory) {
|
|
1233
1233
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1234
|
-
const rootKey = keyBuilderFromType$
|
|
1234
|
+
const rootKey = keyBuilderFromType$7(luvio, input);
|
|
1235
1235
|
rootKeySet.set(rootKey, {
|
|
1236
1236
|
namespace: keyPrefix,
|
|
1237
|
-
representationName: RepresentationType$
|
|
1237
|
+
representationName: RepresentationType$c,
|
|
1238
1238
|
mergeable: false
|
|
1239
1239
|
});
|
|
1240
1240
|
}
|
|
1241
1241
|
|
|
1242
|
-
const VERSION$
|
|
1243
|
-
function validate$
|
|
1242
|
+
const VERSION$e = "94c7194d9578589364c6efd021226634";
|
|
1243
|
+
function validate$e(obj, path = 'FeaturedItemRecommendedListRepresentation') {
|
|
1244
1244
|
const v_error = (() => {
|
|
1245
1245
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1246
1246
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1260,14 +1260,14 @@ function validate$d(obj, path = 'FeaturedItemRecommendedListRepresentation') {
|
|
|
1260
1260
|
})();
|
|
1261
1261
|
return v_error === undefined ? null : v_error;
|
|
1262
1262
|
}
|
|
1263
|
-
const RepresentationType$
|
|
1264
|
-
function normalize$
|
|
1263
|
+
const RepresentationType$b = 'FeaturedItemRecommendedListRepresentation';
|
|
1264
|
+
function normalize$b(input, existing, path, luvio, store, timestamp) {
|
|
1265
1265
|
const input_recommendedList = input.recommendedList;
|
|
1266
1266
|
const input_recommendedList_id = path.fullPath + '__recommendedList';
|
|
1267
1267
|
for (let i = 0; i < input_recommendedList.length; i++) {
|
|
1268
1268
|
const input_recommendedList_item = input_recommendedList[i];
|
|
1269
1269
|
let input_recommendedList_item_id = input_recommendedList_id + '__' + i;
|
|
1270
|
-
input_recommendedList[i] = ingest$
|
|
1270
|
+
input_recommendedList[i] = ingest$c(input_recommendedList_item, {
|
|
1271
1271
|
fullPath: input_recommendedList_item_id,
|
|
1272
1272
|
propertyName: i,
|
|
1273
1273
|
parent: {
|
|
@@ -1280,22 +1280,22 @@ function normalize$a(input, existing, path, luvio, store, timestamp) {
|
|
|
1280
1280
|
}
|
|
1281
1281
|
return input;
|
|
1282
1282
|
}
|
|
1283
|
-
const select$
|
|
1283
|
+
const select$p = function FeaturedItemRecommendedListRepresentationSelect() {
|
|
1284
1284
|
return {
|
|
1285
1285
|
kind: 'Fragment',
|
|
1286
|
-
version: VERSION$
|
|
1286
|
+
version: VERSION$e,
|
|
1287
1287
|
private: [],
|
|
1288
1288
|
selections: [
|
|
1289
1289
|
{
|
|
1290
1290
|
name: 'recommendedList',
|
|
1291
1291
|
kind: 'Link',
|
|
1292
1292
|
plural: true,
|
|
1293
|
-
fragment: select$
|
|
1293
|
+
fragment: select$q()
|
|
1294
1294
|
}
|
|
1295
1295
|
]
|
|
1296
1296
|
};
|
|
1297
1297
|
};
|
|
1298
|
-
function equals$
|
|
1298
|
+
function equals$e(existing, incoming) {
|
|
1299
1299
|
const existing_recommendedList = existing.recommendedList;
|
|
1300
1300
|
const incoming_recommendedList = incoming.recommendedList;
|
|
1301
1301
|
const equals_recommendedList_items = equalsArray(existing_recommendedList, incoming_recommendedList, (existing_recommendedList_item, incoming_recommendedList_item) => {
|
|
@@ -1308,48 +1308,48 @@ function equals$d(existing, incoming) {
|
|
|
1308
1308
|
}
|
|
1309
1309
|
return true;
|
|
1310
1310
|
}
|
|
1311
|
-
const ingest$
|
|
1311
|
+
const ingest$b = function FeaturedItemRecommendedListRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1312
1312
|
if (process.env.NODE_ENV !== 'production') {
|
|
1313
|
-
const validateError = validate$
|
|
1313
|
+
const validateError = validate$e(input);
|
|
1314
1314
|
if (validateError !== null) {
|
|
1315
1315
|
throw validateError;
|
|
1316
1316
|
}
|
|
1317
1317
|
}
|
|
1318
1318
|
const key = path.fullPath;
|
|
1319
1319
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 2592000000;
|
|
1320
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
1320
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$b, "LearningContentPlatform", VERSION$e, RepresentationType$b, equals$e);
|
|
1321
1321
|
return createLink(key);
|
|
1322
1322
|
};
|
|
1323
|
-
function getTypeCacheKeys$
|
|
1323
|
+
function getTypeCacheKeys$b(rootKeySet, luvio, input, fullPathFactory) {
|
|
1324
1324
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1325
1325
|
const rootKey = fullPathFactory();
|
|
1326
1326
|
rootKeySet.set(rootKey, {
|
|
1327
1327
|
namespace: keyPrefix,
|
|
1328
|
-
representationName: RepresentationType$
|
|
1328
|
+
representationName: RepresentationType$b,
|
|
1329
1329
|
mergeable: false
|
|
1330
1330
|
});
|
|
1331
1331
|
const input_recommendedList_length = input.recommendedList.length;
|
|
1332
1332
|
for (let i = 0; i < input_recommendedList_length; i++) {
|
|
1333
|
-
getTypeCacheKeys$
|
|
1333
|
+
getTypeCacheKeys$c(rootKeySet, luvio, input.recommendedList[i]);
|
|
1334
1334
|
}
|
|
1335
1335
|
}
|
|
1336
1336
|
|
|
1337
|
-
function select$
|
|
1338
|
-
return select$
|
|
1337
|
+
function select$o(luvio, params) {
|
|
1338
|
+
return select$p();
|
|
1339
1339
|
}
|
|
1340
|
-
function keyBuilder$
|
|
1340
|
+
function keyBuilder$o(luvio, params) {
|
|
1341
1341
|
return keyPrefix + '::FeaturedItemRecommendedListRepresentation:(' + 'appId:' + params.queryParams.appId + ',' + 'context:' + params.queryParams.context + ')';
|
|
1342
1342
|
}
|
|
1343
|
-
function getResponseCacheKeys$
|
|
1344
|
-
getTypeCacheKeys$
|
|
1343
|
+
function getResponseCacheKeys$a(storeKeyMap, luvio, resourceParams, response) {
|
|
1344
|
+
getTypeCacheKeys$b(storeKeyMap, luvio, response, () => keyBuilder$o(luvio, resourceParams));
|
|
1345
1345
|
}
|
|
1346
|
-
function ingestSuccess$
|
|
1346
|
+
function ingestSuccess$a(luvio, resourceParams, response, snapshotRefresh) {
|
|
1347
1347
|
const { body } = response;
|
|
1348
|
-
const key = keyBuilder$
|
|
1349
|
-
luvio.storeIngest(key, ingest$
|
|
1348
|
+
const key = keyBuilder$o(luvio, resourceParams);
|
|
1349
|
+
luvio.storeIngest(key, ingest$b, body);
|
|
1350
1350
|
const snapshot = luvio.storeLookup({
|
|
1351
1351
|
recordId: key,
|
|
1352
|
-
node: select$
|
|
1352
|
+
node: select$o(),
|
|
1353
1353
|
variables: {},
|
|
1354
1354
|
}, snapshotRefresh);
|
|
1355
1355
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1361,12 +1361,12 @@ function ingestSuccess$9(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1361
1361
|
return snapshot;
|
|
1362
1362
|
}
|
|
1363
1363
|
function ingestError$8(luvio, params, error, snapshotRefresh) {
|
|
1364
|
-
const key = keyBuilder$
|
|
1364
|
+
const key = keyBuilder$o(luvio, params);
|
|
1365
1365
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1366
1366
|
luvio.storeIngestError(key, errorSnapshot);
|
|
1367
1367
|
return errorSnapshot;
|
|
1368
1368
|
}
|
|
1369
|
-
function createResourceRequest$
|
|
1369
|
+
function createResourceRequest$a(config) {
|
|
1370
1370
|
const headers = {};
|
|
1371
1371
|
return {
|
|
1372
1372
|
baseUri: '/services/data/v62.0',
|
|
@@ -1380,61 +1380,61 @@ function createResourceRequest$9(config) {
|
|
|
1380
1380
|
};
|
|
1381
1381
|
}
|
|
1382
1382
|
|
|
1383
|
-
const adapterName$
|
|
1383
|
+
const adapterName$a = 'getFeaturedItemsRecommendedList';
|
|
1384
1384
|
const getFeaturedItemsRecommendedList_ConfigPropertyMetadata = [
|
|
1385
1385
|
generateParamConfigMetadata('appId', true, 1 /* QueryParameter */, 0 /* String */),
|
|
1386
1386
|
generateParamConfigMetadata('context', true, 1 /* QueryParameter */, 0 /* String */),
|
|
1387
1387
|
];
|
|
1388
|
-
const getFeaturedItemsRecommendedList_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1389
|
-
const createResourceParams$
|
|
1390
|
-
function keyBuilder$
|
|
1391
|
-
const resourceParams = createResourceParams$
|
|
1392
|
-
return keyBuilder$
|
|
1388
|
+
const getFeaturedItemsRecommendedList_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$a, getFeaturedItemsRecommendedList_ConfigPropertyMetadata);
|
|
1389
|
+
const createResourceParams$a = /*#__PURE__*/ createResourceParams$d(getFeaturedItemsRecommendedList_ConfigPropertyMetadata);
|
|
1390
|
+
function keyBuilder$n(luvio, config) {
|
|
1391
|
+
const resourceParams = createResourceParams$a(config);
|
|
1392
|
+
return keyBuilder$o(luvio, resourceParams);
|
|
1393
1393
|
}
|
|
1394
|
-
function typeCheckConfig$
|
|
1394
|
+
function typeCheckConfig$a(untrustedConfig) {
|
|
1395
1395
|
const config = {};
|
|
1396
|
-
typeCheckConfig$
|
|
1396
|
+
typeCheckConfig$d(untrustedConfig, config, getFeaturedItemsRecommendedList_ConfigPropertyMetadata);
|
|
1397
1397
|
return config;
|
|
1398
1398
|
}
|
|
1399
|
-
function validateAdapterConfig$
|
|
1399
|
+
function validateAdapterConfig$a(untrustedConfig, configPropertyNames) {
|
|
1400
1400
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1401
1401
|
return null;
|
|
1402
1402
|
}
|
|
1403
1403
|
if (process.env.NODE_ENV !== 'production') {
|
|
1404
1404
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1405
1405
|
}
|
|
1406
|
-
const config = typeCheckConfig$
|
|
1406
|
+
const config = typeCheckConfig$a(untrustedConfig);
|
|
1407
1407
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1408
1408
|
return null;
|
|
1409
1409
|
}
|
|
1410
1410
|
return config;
|
|
1411
1411
|
}
|
|
1412
1412
|
function adapterFragment$8(luvio, config) {
|
|
1413
|
-
createResourceParams$
|
|
1414
|
-
return select$
|
|
1413
|
+
createResourceParams$a(config);
|
|
1414
|
+
return select$o();
|
|
1415
1415
|
}
|
|
1416
1416
|
function onFetchResponseSuccess$8(luvio, config, resourceParams, response) {
|
|
1417
|
-
const snapshot = ingestSuccess$
|
|
1417
|
+
const snapshot = ingestSuccess$a(luvio, resourceParams, response, {
|
|
1418
1418
|
config,
|
|
1419
|
-
resolve: () => buildNetworkSnapshot$
|
|
1419
|
+
resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
|
|
1420
1420
|
});
|
|
1421
1421
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1422
1422
|
}
|
|
1423
1423
|
function onFetchResponseError$8(luvio, config, resourceParams, response) {
|
|
1424
1424
|
const snapshot = ingestError$8(luvio, resourceParams, response, {
|
|
1425
1425
|
config,
|
|
1426
|
-
resolve: () => buildNetworkSnapshot$
|
|
1426
|
+
resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
|
|
1427
1427
|
});
|
|
1428
1428
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1429
1429
|
}
|
|
1430
|
-
function buildNetworkSnapshot$
|
|
1431
|
-
const resourceParams = createResourceParams$
|
|
1432
|
-
const request = createResourceRequest$
|
|
1430
|
+
function buildNetworkSnapshot$a(luvio, config, options) {
|
|
1431
|
+
const resourceParams = createResourceParams$a(config);
|
|
1432
|
+
const request = createResourceRequest$a(resourceParams);
|
|
1433
1433
|
return luvio.dispatchResourceRequest(request, options)
|
|
1434
1434
|
.then((response) => {
|
|
1435
1435
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$8(luvio, config, resourceParams, response), () => {
|
|
1436
1436
|
const cache = new StoreKeyMap();
|
|
1437
|
-
getResponseCacheKeys$
|
|
1437
|
+
getResponseCacheKeys$a(cache, luvio, resourceParams, response.body);
|
|
1438
1438
|
return cache;
|
|
1439
1439
|
});
|
|
1440
1440
|
}, (response) => {
|
|
@@ -1442,23 +1442,23 @@ function buildNetworkSnapshot$9(luvio, config, options) {
|
|
|
1442
1442
|
});
|
|
1443
1443
|
}
|
|
1444
1444
|
function buildNetworkSnapshotCachePolicy$8(context, coercedAdapterRequestContext) {
|
|
1445
|
-
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
1445
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$a, undefined, false);
|
|
1446
1446
|
}
|
|
1447
1447
|
function buildCachedSnapshotCachePolicy$8(context, storeLookup) {
|
|
1448
1448
|
const { luvio, config } = context;
|
|
1449
1449
|
const selector = {
|
|
1450
|
-
recordId: keyBuilder$
|
|
1450
|
+
recordId: keyBuilder$n(luvio, config),
|
|
1451
1451
|
node: adapterFragment$8(luvio, config),
|
|
1452
1452
|
variables: {},
|
|
1453
1453
|
};
|
|
1454
1454
|
const cacheSnapshot = storeLookup(selector, {
|
|
1455
1455
|
config,
|
|
1456
|
-
resolve: () => buildNetworkSnapshot$
|
|
1456
|
+
resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
|
|
1457
1457
|
});
|
|
1458
1458
|
return cacheSnapshot;
|
|
1459
1459
|
}
|
|
1460
1460
|
const getFeaturedItemsRecommendedListAdapterFactory = (luvio) => function LearningContentPlatform__getFeaturedItemsRecommendedList(untrustedConfig, requestContext) {
|
|
1461
|
-
const config = validateAdapterConfig$
|
|
1461
|
+
const config = validateAdapterConfig$a(untrustedConfig, getFeaturedItemsRecommendedList_ConfigPropertyNames);
|
|
1462
1462
|
// Invalid or incomplete config
|
|
1463
1463
|
if (config === null) {
|
|
1464
1464
|
return null;
|
|
@@ -1467,8 +1467,8 @@ const getFeaturedItemsRecommendedListAdapterFactory = (luvio) => function Learni
|
|
|
1467
1467
|
buildCachedSnapshotCachePolicy$8, buildNetworkSnapshotCachePolicy$8);
|
|
1468
1468
|
};
|
|
1469
1469
|
|
|
1470
|
-
const VERSION$
|
|
1471
|
-
function validate$
|
|
1470
|
+
const VERSION$d = "5d7adb55f43466f61c4837ebf27eab61";
|
|
1471
|
+
function validate$d(obj, path = 'FeaturedItemRelatedListRepresentation') {
|
|
1472
1472
|
const v_error = (() => {
|
|
1473
1473
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1474
1474
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1488,14 +1488,14 @@ function validate$c(obj, path = 'FeaturedItemRelatedListRepresentation') {
|
|
|
1488
1488
|
})();
|
|
1489
1489
|
return v_error === undefined ? null : v_error;
|
|
1490
1490
|
}
|
|
1491
|
-
const RepresentationType$
|
|
1492
|
-
function normalize$
|
|
1491
|
+
const RepresentationType$a = 'FeaturedItemRelatedListRepresentation';
|
|
1492
|
+
function normalize$a(input, existing, path, luvio, store, timestamp) {
|
|
1493
1493
|
const input_relatedList = input.relatedList;
|
|
1494
1494
|
const input_relatedList_id = path.fullPath + '__relatedList';
|
|
1495
1495
|
for (let i = 0; i < input_relatedList.length; i++) {
|
|
1496
1496
|
const input_relatedList_item = input_relatedList[i];
|
|
1497
1497
|
let input_relatedList_item_id = input_relatedList_id + '__' + i;
|
|
1498
|
-
input_relatedList[i] = ingest$
|
|
1498
|
+
input_relatedList[i] = ingest$c(input_relatedList_item, {
|
|
1499
1499
|
fullPath: input_relatedList_item_id,
|
|
1500
1500
|
propertyName: i,
|
|
1501
1501
|
parent: {
|
|
@@ -1508,22 +1508,22 @@ function normalize$9(input, existing, path, luvio, store, timestamp) {
|
|
|
1508
1508
|
}
|
|
1509
1509
|
return input;
|
|
1510
1510
|
}
|
|
1511
|
-
const select$
|
|
1511
|
+
const select$n = function FeaturedItemRelatedListRepresentationSelect() {
|
|
1512
1512
|
return {
|
|
1513
1513
|
kind: 'Fragment',
|
|
1514
|
-
version: VERSION$
|
|
1514
|
+
version: VERSION$d,
|
|
1515
1515
|
private: [],
|
|
1516
1516
|
selections: [
|
|
1517
1517
|
{
|
|
1518
1518
|
name: 'relatedList',
|
|
1519
1519
|
kind: 'Link',
|
|
1520
1520
|
plural: true,
|
|
1521
|
-
fragment: select$
|
|
1521
|
+
fragment: select$q()
|
|
1522
1522
|
}
|
|
1523
1523
|
]
|
|
1524
1524
|
};
|
|
1525
1525
|
};
|
|
1526
|
-
function equals$
|
|
1526
|
+
function equals$d(existing, incoming) {
|
|
1527
1527
|
const existing_relatedList = existing.relatedList;
|
|
1528
1528
|
const incoming_relatedList = incoming.relatedList;
|
|
1529
1529
|
const equals_relatedList_items = equalsArray(existing_relatedList, incoming_relatedList, (existing_relatedList_item, incoming_relatedList_item) => {
|
|
@@ -1536,48 +1536,48 @@ function equals$c(existing, incoming) {
|
|
|
1536
1536
|
}
|
|
1537
1537
|
return true;
|
|
1538
1538
|
}
|
|
1539
|
-
const ingest$
|
|
1539
|
+
const ingest$a = function FeaturedItemRelatedListRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1540
1540
|
if (process.env.NODE_ENV !== 'production') {
|
|
1541
|
-
const validateError = validate$
|
|
1541
|
+
const validateError = validate$d(input);
|
|
1542
1542
|
if (validateError !== null) {
|
|
1543
1543
|
throw validateError;
|
|
1544
1544
|
}
|
|
1545
1545
|
}
|
|
1546
1546
|
const key = path.fullPath;
|
|
1547
1547
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 2592000000;
|
|
1548
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
1548
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$a, "LearningContentPlatform", VERSION$d, RepresentationType$a, equals$d);
|
|
1549
1549
|
return createLink(key);
|
|
1550
1550
|
};
|
|
1551
|
-
function getTypeCacheKeys$
|
|
1551
|
+
function getTypeCacheKeys$a(rootKeySet, luvio, input, fullPathFactory) {
|
|
1552
1552
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1553
1553
|
const rootKey = fullPathFactory();
|
|
1554
1554
|
rootKeySet.set(rootKey, {
|
|
1555
1555
|
namespace: keyPrefix,
|
|
1556
|
-
representationName: RepresentationType$
|
|
1556
|
+
representationName: RepresentationType$a,
|
|
1557
1557
|
mergeable: false
|
|
1558
1558
|
});
|
|
1559
1559
|
const input_relatedList_length = input.relatedList.length;
|
|
1560
1560
|
for (let i = 0; i < input_relatedList_length; i++) {
|
|
1561
|
-
getTypeCacheKeys$
|
|
1561
|
+
getTypeCacheKeys$c(rootKeySet, luvio, input.relatedList[i]);
|
|
1562
1562
|
}
|
|
1563
1563
|
}
|
|
1564
1564
|
|
|
1565
|
-
function select$
|
|
1566
|
-
return select$
|
|
1565
|
+
function select$m(luvio, params) {
|
|
1566
|
+
return select$n();
|
|
1567
1567
|
}
|
|
1568
|
-
function keyBuilder$
|
|
1568
|
+
function keyBuilder$m(luvio, params) {
|
|
1569
1569
|
return keyPrefix + '::FeaturedItemRelatedListRepresentation:(' + 'appId:' + params.queryParams.appId + ',' + 'pageRef:' + params.queryParams.pageRef + ',' + 'returnMax:' + params.queryParams.returnMax + ')';
|
|
1570
1570
|
}
|
|
1571
|
-
function getResponseCacheKeys$
|
|
1572
|
-
getTypeCacheKeys$
|
|
1571
|
+
function getResponseCacheKeys$9(storeKeyMap, luvio, resourceParams, response) {
|
|
1572
|
+
getTypeCacheKeys$a(storeKeyMap, luvio, response, () => keyBuilder$m(luvio, resourceParams));
|
|
1573
1573
|
}
|
|
1574
|
-
function ingestSuccess$
|
|
1574
|
+
function ingestSuccess$9(luvio, resourceParams, response, snapshotRefresh) {
|
|
1575
1575
|
const { body } = response;
|
|
1576
|
-
const key = keyBuilder$
|
|
1577
|
-
luvio.storeIngest(key, ingest$
|
|
1576
|
+
const key = keyBuilder$m(luvio, resourceParams);
|
|
1577
|
+
luvio.storeIngest(key, ingest$a, body);
|
|
1578
1578
|
const snapshot = luvio.storeLookup({
|
|
1579
1579
|
recordId: key,
|
|
1580
|
-
node: select$
|
|
1580
|
+
node: select$m(),
|
|
1581
1581
|
variables: {},
|
|
1582
1582
|
}, snapshotRefresh);
|
|
1583
1583
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1589,12 +1589,12 @@ function ingestSuccess$8(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1589
1589
|
return snapshot;
|
|
1590
1590
|
}
|
|
1591
1591
|
function ingestError$7(luvio, params, error, snapshotRefresh) {
|
|
1592
|
-
const key = keyBuilder$
|
|
1592
|
+
const key = keyBuilder$m(luvio, params);
|
|
1593
1593
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1594
1594
|
luvio.storeIngestError(key, errorSnapshot);
|
|
1595
1595
|
return errorSnapshot;
|
|
1596
1596
|
}
|
|
1597
|
-
function createResourceRequest$
|
|
1597
|
+
function createResourceRequest$9(config) {
|
|
1598
1598
|
const headers = {};
|
|
1599
1599
|
return {
|
|
1600
1600
|
baseUri: '/services/data/v62.0',
|
|
@@ -1608,62 +1608,62 @@ function createResourceRequest$8(config) {
|
|
|
1608
1608
|
};
|
|
1609
1609
|
}
|
|
1610
1610
|
|
|
1611
|
-
const adapterName$
|
|
1611
|
+
const adapterName$9 = 'getFeaturedItemsRelatedList';
|
|
1612
1612
|
const getFeaturedItemsRelatedList_ConfigPropertyMetadata = [
|
|
1613
1613
|
generateParamConfigMetadata('appId', true, 1 /* QueryParameter */, 0 /* String */),
|
|
1614
1614
|
generateParamConfigMetadata('pageRef', true, 1 /* QueryParameter */, 0 /* String */),
|
|
1615
1615
|
generateParamConfigMetadata('returnMax', false, 1 /* QueryParameter */, 1 /* Boolean */),
|
|
1616
1616
|
];
|
|
1617
|
-
const getFeaturedItemsRelatedList_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1618
|
-
const createResourceParams$
|
|
1619
|
-
function keyBuilder$
|
|
1620
|
-
const resourceParams = createResourceParams$
|
|
1621
|
-
return keyBuilder$
|
|
1617
|
+
const getFeaturedItemsRelatedList_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$9, getFeaturedItemsRelatedList_ConfigPropertyMetadata);
|
|
1618
|
+
const createResourceParams$9 = /*#__PURE__*/ createResourceParams$d(getFeaturedItemsRelatedList_ConfigPropertyMetadata);
|
|
1619
|
+
function keyBuilder$l(luvio, config) {
|
|
1620
|
+
const resourceParams = createResourceParams$9(config);
|
|
1621
|
+
return keyBuilder$m(luvio, resourceParams);
|
|
1622
1622
|
}
|
|
1623
|
-
function typeCheckConfig$
|
|
1623
|
+
function typeCheckConfig$9(untrustedConfig) {
|
|
1624
1624
|
const config = {};
|
|
1625
|
-
typeCheckConfig$
|
|
1625
|
+
typeCheckConfig$d(untrustedConfig, config, getFeaturedItemsRelatedList_ConfigPropertyMetadata);
|
|
1626
1626
|
return config;
|
|
1627
1627
|
}
|
|
1628
|
-
function validateAdapterConfig$
|
|
1628
|
+
function validateAdapterConfig$9(untrustedConfig, configPropertyNames) {
|
|
1629
1629
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1630
1630
|
return null;
|
|
1631
1631
|
}
|
|
1632
1632
|
if (process.env.NODE_ENV !== 'production') {
|
|
1633
1633
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1634
1634
|
}
|
|
1635
|
-
const config = typeCheckConfig$
|
|
1635
|
+
const config = typeCheckConfig$9(untrustedConfig);
|
|
1636
1636
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1637
1637
|
return null;
|
|
1638
1638
|
}
|
|
1639
1639
|
return config;
|
|
1640
1640
|
}
|
|
1641
1641
|
function adapterFragment$7(luvio, config) {
|
|
1642
|
-
createResourceParams$
|
|
1643
|
-
return select$
|
|
1642
|
+
createResourceParams$9(config);
|
|
1643
|
+
return select$m();
|
|
1644
1644
|
}
|
|
1645
1645
|
function onFetchResponseSuccess$7(luvio, config, resourceParams, response) {
|
|
1646
|
-
const snapshot = ingestSuccess$
|
|
1646
|
+
const snapshot = ingestSuccess$9(luvio, resourceParams, response, {
|
|
1647
1647
|
config,
|
|
1648
|
-
resolve: () => buildNetworkSnapshot$
|
|
1648
|
+
resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
|
|
1649
1649
|
});
|
|
1650
1650
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1651
1651
|
}
|
|
1652
1652
|
function onFetchResponseError$7(luvio, config, resourceParams, response) {
|
|
1653
1653
|
const snapshot = ingestError$7(luvio, resourceParams, response, {
|
|
1654
1654
|
config,
|
|
1655
|
-
resolve: () => buildNetworkSnapshot$
|
|
1655
|
+
resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
|
|
1656
1656
|
});
|
|
1657
1657
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1658
1658
|
}
|
|
1659
|
-
function buildNetworkSnapshot$
|
|
1660
|
-
const resourceParams = createResourceParams$
|
|
1661
|
-
const request = createResourceRequest$
|
|
1659
|
+
function buildNetworkSnapshot$9(luvio, config, options) {
|
|
1660
|
+
const resourceParams = createResourceParams$9(config);
|
|
1661
|
+
const request = createResourceRequest$9(resourceParams);
|
|
1662
1662
|
return luvio.dispatchResourceRequest(request, options)
|
|
1663
1663
|
.then((response) => {
|
|
1664
1664
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$7(luvio, config, resourceParams, response), () => {
|
|
1665
1665
|
const cache = new StoreKeyMap();
|
|
1666
|
-
getResponseCacheKeys$
|
|
1666
|
+
getResponseCacheKeys$9(cache, luvio, resourceParams, response.body);
|
|
1667
1667
|
return cache;
|
|
1668
1668
|
});
|
|
1669
1669
|
}, (response) => {
|
|
@@ -1671,23 +1671,23 @@ function buildNetworkSnapshot$8(luvio, config, options) {
|
|
|
1671
1671
|
});
|
|
1672
1672
|
}
|
|
1673
1673
|
function buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext) {
|
|
1674
|
-
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
1674
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$9, undefined, false);
|
|
1675
1675
|
}
|
|
1676
1676
|
function buildCachedSnapshotCachePolicy$7(context, storeLookup) {
|
|
1677
1677
|
const { luvio, config } = context;
|
|
1678
1678
|
const selector = {
|
|
1679
|
-
recordId: keyBuilder$
|
|
1679
|
+
recordId: keyBuilder$l(luvio, config),
|
|
1680
1680
|
node: adapterFragment$7(luvio, config),
|
|
1681
1681
|
variables: {},
|
|
1682
1682
|
};
|
|
1683
1683
|
const cacheSnapshot = storeLookup(selector, {
|
|
1684
1684
|
config,
|
|
1685
|
-
resolve: () => buildNetworkSnapshot$
|
|
1685
|
+
resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
|
|
1686
1686
|
});
|
|
1687
1687
|
return cacheSnapshot;
|
|
1688
1688
|
}
|
|
1689
1689
|
const getFeaturedItemsRelatedListAdapterFactory = (luvio) => function LearningContentPlatform__getFeaturedItemsRelatedList(untrustedConfig, requestContext) {
|
|
1690
|
-
const config = validateAdapterConfig$
|
|
1690
|
+
const config = validateAdapterConfig$9(untrustedConfig, getFeaturedItemsRelatedList_ConfigPropertyNames);
|
|
1691
1691
|
// Invalid or incomplete config
|
|
1692
1692
|
if (config === null) {
|
|
1693
1693
|
return null;
|
|
@@ -1696,8 +1696,8 @@ const getFeaturedItemsRelatedListAdapterFactory = (luvio) => function LearningCo
|
|
|
1696
1696
|
buildCachedSnapshotCachePolicy$7, buildNetworkSnapshotCachePolicy$7);
|
|
1697
1697
|
};
|
|
1698
1698
|
|
|
1699
|
-
const VERSION$
|
|
1700
|
-
function validate$
|
|
1699
|
+
const VERSION$c = "8471031fcff953c83f350a0f66b60ddb";
|
|
1700
|
+
function validate$c(obj, path = 'LearningConfigRepresentation') {
|
|
1701
1701
|
const v_error = (() => {
|
|
1702
1702
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1703
1703
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1720,14 +1720,14 @@ function validate$b(obj, path = 'LearningConfigRepresentation') {
|
|
|
1720
1720
|
})();
|
|
1721
1721
|
return v_error === undefined ? null : v_error;
|
|
1722
1722
|
}
|
|
1723
|
-
const RepresentationType$
|
|
1724
|
-
function normalize$
|
|
1723
|
+
const RepresentationType$9 = 'LearningConfigRepresentation';
|
|
1724
|
+
function normalize$9(input, existing, path, luvio, store, timestamp) {
|
|
1725
1725
|
return input;
|
|
1726
1726
|
}
|
|
1727
|
-
const select$
|
|
1727
|
+
const select$l = function LearningConfigRepresentationSelect() {
|
|
1728
1728
|
return {
|
|
1729
1729
|
kind: 'Fragment',
|
|
1730
|
-
version: VERSION$
|
|
1730
|
+
version: VERSION$c,
|
|
1731
1731
|
private: [],
|
|
1732
1732
|
selections: [
|
|
1733
1733
|
{
|
|
@@ -1745,7 +1745,7 @@ const select$j = function LearningConfigRepresentationSelect() {
|
|
|
1745
1745
|
]
|
|
1746
1746
|
};
|
|
1747
1747
|
};
|
|
1748
|
-
function equals$
|
|
1748
|
+
function equals$c(existing, incoming) {
|
|
1749
1749
|
const existing_hasElevatedLearningAccess = existing.hasElevatedLearningAccess;
|
|
1750
1750
|
const incoming_hasElevatedLearningAccess = incoming.hasElevatedLearningAccess;
|
|
1751
1751
|
if (!(existing_hasElevatedLearningAccess === incoming_hasElevatedLearningAccess)) {
|
|
@@ -1763,44 +1763,44 @@ function equals$b(existing, incoming) {
|
|
|
1763
1763
|
}
|
|
1764
1764
|
return true;
|
|
1765
1765
|
}
|
|
1766
|
-
const ingest$
|
|
1766
|
+
const ingest$9 = function LearningConfigRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1767
1767
|
if (process.env.NODE_ENV !== 'production') {
|
|
1768
|
-
const validateError = validate$
|
|
1768
|
+
const validateError = validate$c(input);
|
|
1769
1769
|
if (validateError !== null) {
|
|
1770
1770
|
throw validateError;
|
|
1771
1771
|
}
|
|
1772
1772
|
}
|
|
1773
1773
|
const key = path.fullPath;
|
|
1774
1774
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 2592000000;
|
|
1775
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
1775
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$9, "LearningContentPlatform", VERSION$c, RepresentationType$9, equals$c);
|
|
1776
1776
|
return createLink(key);
|
|
1777
1777
|
};
|
|
1778
|
-
function getTypeCacheKeys$
|
|
1778
|
+
function getTypeCacheKeys$9(rootKeySet, luvio, input, fullPathFactory) {
|
|
1779
1779
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1780
1780
|
const rootKey = fullPathFactory();
|
|
1781
1781
|
rootKeySet.set(rootKey, {
|
|
1782
1782
|
namespace: keyPrefix,
|
|
1783
|
-
representationName: RepresentationType$
|
|
1783
|
+
representationName: RepresentationType$9,
|
|
1784
1784
|
mergeable: false
|
|
1785
1785
|
});
|
|
1786
1786
|
}
|
|
1787
1787
|
|
|
1788
|
-
function select$
|
|
1789
|
-
return select$
|
|
1788
|
+
function select$k(luvio, params) {
|
|
1789
|
+
return select$l();
|
|
1790
1790
|
}
|
|
1791
|
-
function keyBuilder$
|
|
1791
|
+
function keyBuilder$k(luvio, params) {
|
|
1792
1792
|
return keyPrefix + '::LearningConfigRepresentation:(' + ')';
|
|
1793
1793
|
}
|
|
1794
|
-
function getResponseCacheKeys$
|
|
1795
|
-
getTypeCacheKeys$
|
|
1794
|
+
function getResponseCacheKeys$8(storeKeyMap, luvio, resourceParams, response) {
|
|
1795
|
+
getTypeCacheKeys$9(storeKeyMap, luvio, response, () => keyBuilder$k());
|
|
1796
1796
|
}
|
|
1797
|
-
function ingestSuccess$
|
|
1797
|
+
function ingestSuccess$8(luvio, resourceParams, response, snapshotRefresh) {
|
|
1798
1798
|
const { body } = response;
|
|
1799
|
-
const key = keyBuilder$
|
|
1800
|
-
luvio.storeIngest(key, ingest$
|
|
1799
|
+
const key = keyBuilder$k();
|
|
1800
|
+
luvio.storeIngest(key, ingest$9, body);
|
|
1801
1801
|
const snapshot = luvio.storeLookup({
|
|
1802
1802
|
recordId: key,
|
|
1803
|
-
node: select$
|
|
1803
|
+
node: select$k(),
|
|
1804
1804
|
variables: {},
|
|
1805
1805
|
}, snapshotRefresh);
|
|
1806
1806
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1812,12 +1812,12 @@ function ingestSuccess$7(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1812
1812
|
return snapshot;
|
|
1813
1813
|
}
|
|
1814
1814
|
function ingestError$6(luvio, params, error, snapshotRefresh) {
|
|
1815
|
-
const key = keyBuilder$
|
|
1815
|
+
const key = keyBuilder$k();
|
|
1816
1816
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1817
1817
|
luvio.storeIngestError(key, errorSnapshot);
|
|
1818
1818
|
return errorSnapshot;
|
|
1819
1819
|
}
|
|
1820
|
-
function createResourceRequest$
|
|
1820
|
+
function createResourceRequest$8(config) {
|
|
1821
1821
|
const headers = {};
|
|
1822
1822
|
return {
|
|
1823
1823
|
baseUri: '/services/data/v62.0',
|
|
@@ -1831,57 +1831,57 @@ function createResourceRequest$7(config) {
|
|
|
1831
1831
|
};
|
|
1832
1832
|
}
|
|
1833
1833
|
|
|
1834
|
-
const adapterName$
|
|
1834
|
+
const adapterName$8 = 'getLearningConfig';
|
|
1835
1835
|
const getLearningConfig_ConfigPropertyMetadata = [];
|
|
1836
|
-
const getLearningConfig_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1837
|
-
const createResourceParams$
|
|
1838
|
-
function keyBuilder$
|
|
1839
|
-
createResourceParams$
|
|
1840
|
-
return keyBuilder$
|
|
1836
|
+
const getLearningConfig_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$8, getLearningConfig_ConfigPropertyMetadata);
|
|
1837
|
+
const createResourceParams$8 = /*#__PURE__*/ createResourceParams$d(getLearningConfig_ConfigPropertyMetadata);
|
|
1838
|
+
function keyBuilder$j(luvio, config) {
|
|
1839
|
+
createResourceParams$8(config);
|
|
1840
|
+
return keyBuilder$k();
|
|
1841
1841
|
}
|
|
1842
|
-
function typeCheckConfig$
|
|
1842
|
+
function typeCheckConfig$8(untrustedConfig) {
|
|
1843
1843
|
const config = {};
|
|
1844
1844
|
return config;
|
|
1845
1845
|
}
|
|
1846
|
-
function validateAdapterConfig$
|
|
1846
|
+
function validateAdapterConfig$8(untrustedConfig, configPropertyNames) {
|
|
1847
1847
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1848
1848
|
return null;
|
|
1849
1849
|
}
|
|
1850
1850
|
if (process.env.NODE_ENV !== 'production') {
|
|
1851
1851
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1852
1852
|
}
|
|
1853
|
-
const config = typeCheckConfig$
|
|
1853
|
+
const config = typeCheckConfig$8();
|
|
1854
1854
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1855
1855
|
return null;
|
|
1856
1856
|
}
|
|
1857
1857
|
return config;
|
|
1858
1858
|
}
|
|
1859
1859
|
function adapterFragment$6(luvio, config) {
|
|
1860
|
-
createResourceParams$
|
|
1861
|
-
return select$
|
|
1860
|
+
createResourceParams$8(config);
|
|
1861
|
+
return select$k();
|
|
1862
1862
|
}
|
|
1863
1863
|
function onFetchResponseSuccess$6(luvio, config, resourceParams, response) {
|
|
1864
|
-
const snapshot = ingestSuccess$
|
|
1864
|
+
const snapshot = ingestSuccess$8(luvio, resourceParams, response, {
|
|
1865
1865
|
config,
|
|
1866
|
-
resolve: () => buildNetworkSnapshot$
|
|
1866
|
+
resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
|
|
1867
1867
|
});
|
|
1868
1868
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1869
1869
|
}
|
|
1870
1870
|
function onFetchResponseError$6(luvio, config, resourceParams, response) {
|
|
1871
1871
|
const snapshot = ingestError$6(luvio, resourceParams, response, {
|
|
1872
1872
|
config,
|
|
1873
|
-
resolve: () => buildNetworkSnapshot$
|
|
1873
|
+
resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
|
|
1874
1874
|
});
|
|
1875
1875
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1876
1876
|
}
|
|
1877
|
-
function buildNetworkSnapshot$
|
|
1878
|
-
const resourceParams = createResourceParams$
|
|
1879
|
-
const request = createResourceRequest$
|
|
1877
|
+
function buildNetworkSnapshot$8(luvio, config, options) {
|
|
1878
|
+
const resourceParams = createResourceParams$8(config);
|
|
1879
|
+
const request = createResourceRequest$8();
|
|
1880
1880
|
return luvio.dispatchResourceRequest(request, options)
|
|
1881
1881
|
.then((response) => {
|
|
1882
1882
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$6(luvio, config, resourceParams, response), () => {
|
|
1883
1883
|
const cache = new StoreKeyMap();
|
|
1884
|
-
getResponseCacheKeys$
|
|
1884
|
+
getResponseCacheKeys$8(cache, luvio, resourceParams, response.body);
|
|
1885
1885
|
return cache;
|
|
1886
1886
|
});
|
|
1887
1887
|
}, (response) => {
|
|
@@ -1889,23 +1889,23 @@ function buildNetworkSnapshot$7(luvio, config, options) {
|
|
|
1889
1889
|
});
|
|
1890
1890
|
}
|
|
1891
1891
|
function buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext) {
|
|
1892
|
-
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
1892
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$8, undefined, false);
|
|
1893
1893
|
}
|
|
1894
1894
|
function buildCachedSnapshotCachePolicy$6(context, storeLookup) {
|
|
1895
1895
|
const { luvio, config } = context;
|
|
1896
1896
|
const selector = {
|
|
1897
|
-
recordId: keyBuilder$
|
|
1897
|
+
recordId: keyBuilder$j(luvio, config),
|
|
1898
1898
|
node: adapterFragment$6(luvio, config),
|
|
1899
1899
|
variables: {},
|
|
1900
1900
|
};
|
|
1901
1901
|
const cacheSnapshot = storeLookup(selector, {
|
|
1902
1902
|
config,
|
|
1903
|
-
resolve: () => buildNetworkSnapshot$
|
|
1903
|
+
resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
|
|
1904
1904
|
});
|
|
1905
1905
|
return cacheSnapshot;
|
|
1906
1906
|
}
|
|
1907
1907
|
const getLearningConfigAdapterFactory = (luvio) => function LearningContentPlatform__getLearningConfig(untrustedConfig, requestContext) {
|
|
1908
|
-
const config = validateAdapterConfig$
|
|
1908
|
+
const config = validateAdapterConfig$8(untrustedConfig, getLearningConfig_ConfigPropertyNames);
|
|
1909
1909
|
// Invalid or incomplete config
|
|
1910
1910
|
if (config === null) {
|
|
1911
1911
|
return null;
|
|
@@ -1914,8 +1914,8 @@ const getLearningConfigAdapterFactory = (luvio) => function LearningContentPlatf
|
|
|
1914
1914
|
buildCachedSnapshotCachePolicy$6, buildNetworkSnapshotCachePolicy$6);
|
|
1915
1915
|
};
|
|
1916
1916
|
|
|
1917
|
-
const VERSION$
|
|
1918
|
-
function validate$
|
|
1917
|
+
const VERSION$b = "1292f1a549c777c6586cca649e823737";
|
|
1918
|
+
function validate$b(obj, path = 'LearningItemProgressListRepresentation') {
|
|
1919
1919
|
const v_error = (() => {
|
|
1920
1920
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1921
1921
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1935,14 +1935,14 @@ function validate$a(obj, path = 'LearningItemProgressListRepresentation') {
|
|
|
1935
1935
|
})();
|
|
1936
1936
|
return v_error === undefined ? null : v_error;
|
|
1937
1937
|
}
|
|
1938
|
-
const RepresentationType$
|
|
1939
|
-
function normalize$
|
|
1938
|
+
const RepresentationType$8 = 'LearningItemProgressListRepresentation';
|
|
1939
|
+
function normalize$8(input, existing, path, luvio, store, timestamp) {
|
|
1940
1940
|
const input_list = input.list;
|
|
1941
1941
|
const input_list_id = path.fullPath + '__list';
|
|
1942
1942
|
for (let i = 0; i < input_list.length; i++) {
|
|
1943
1943
|
const input_list_item = input_list[i];
|
|
1944
1944
|
let input_list_item_id = input_list_id + '__' + i;
|
|
1945
|
-
input_list[i] = ingest$
|
|
1945
|
+
input_list[i] = ingest$e(input_list_item, {
|
|
1946
1946
|
fullPath: input_list_item_id,
|
|
1947
1947
|
propertyName: i,
|
|
1948
1948
|
parent: {
|
|
@@ -1955,22 +1955,22 @@ function normalize$7(input, existing, path, luvio, store, timestamp) {
|
|
|
1955
1955
|
}
|
|
1956
1956
|
return input;
|
|
1957
1957
|
}
|
|
1958
|
-
const select$
|
|
1958
|
+
const select$j = function LearningItemProgressListRepresentationSelect() {
|
|
1959
1959
|
return {
|
|
1960
1960
|
kind: 'Fragment',
|
|
1961
|
-
version: VERSION$
|
|
1961
|
+
version: VERSION$b,
|
|
1962
1962
|
private: [],
|
|
1963
1963
|
selections: [
|
|
1964
1964
|
{
|
|
1965
1965
|
name: 'list',
|
|
1966
1966
|
kind: 'Link',
|
|
1967
1967
|
plural: true,
|
|
1968
|
-
fragment: select$
|
|
1968
|
+
fragment: select$u()
|
|
1969
1969
|
}
|
|
1970
1970
|
]
|
|
1971
1971
|
};
|
|
1972
1972
|
};
|
|
1973
|
-
function equals$
|
|
1973
|
+
function equals$b(existing, incoming) {
|
|
1974
1974
|
const existing_list = existing.list;
|
|
1975
1975
|
const incoming_list = incoming.list;
|
|
1976
1976
|
const equals_list_items = equalsArray(existing_list, incoming_list, (existing_list_item, incoming_list_item) => {
|
|
@@ -1983,48 +1983,48 @@ function equals$a(existing, incoming) {
|
|
|
1983
1983
|
}
|
|
1984
1984
|
return true;
|
|
1985
1985
|
}
|
|
1986
|
-
const ingest$
|
|
1986
|
+
const ingest$8 = function LearningItemProgressListRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1987
1987
|
if (process.env.NODE_ENV !== 'production') {
|
|
1988
|
-
const validateError = validate$
|
|
1988
|
+
const validateError = validate$b(input);
|
|
1989
1989
|
if (validateError !== null) {
|
|
1990
1990
|
throw validateError;
|
|
1991
1991
|
}
|
|
1992
1992
|
}
|
|
1993
1993
|
const key = path.fullPath;
|
|
1994
1994
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 2592000000;
|
|
1995
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
1995
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$8, "LearningContentPlatform", VERSION$b, RepresentationType$8, equals$b);
|
|
1996
1996
|
return createLink(key);
|
|
1997
1997
|
};
|
|
1998
|
-
function getTypeCacheKeys$
|
|
1998
|
+
function getTypeCacheKeys$8(rootKeySet, luvio, input, fullPathFactory) {
|
|
1999
1999
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2000
2000
|
const rootKey = fullPathFactory();
|
|
2001
2001
|
rootKeySet.set(rootKey, {
|
|
2002
2002
|
namespace: keyPrefix,
|
|
2003
|
-
representationName: RepresentationType$
|
|
2003
|
+
representationName: RepresentationType$8,
|
|
2004
2004
|
mergeable: false
|
|
2005
2005
|
});
|
|
2006
2006
|
const input_list_length = input.list.length;
|
|
2007
2007
|
for (let i = 0; i < input_list_length; i++) {
|
|
2008
|
-
getTypeCacheKeys$
|
|
2008
|
+
getTypeCacheKeys$e(rootKeySet, luvio, input.list[i]);
|
|
2009
2009
|
}
|
|
2010
2010
|
}
|
|
2011
2011
|
|
|
2012
|
-
function select$
|
|
2013
|
-
return select$
|
|
2012
|
+
function select$i(luvio, params) {
|
|
2013
|
+
return select$j();
|
|
2014
2014
|
}
|
|
2015
|
-
function keyBuilder$
|
|
2015
|
+
function keyBuilder$i(luvio, params) {
|
|
2016
2016
|
return keyPrefix + '::LearningItemProgressListRepresentation:(' + 'learningItemIds:' + params.queryParams.learningItemIds + ')';
|
|
2017
2017
|
}
|
|
2018
|
-
function getResponseCacheKeys$
|
|
2019
|
-
getTypeCacheKeys$
|
|
2018
|
+
function getResponseCacheKeys$7(storeKeyMap, luvio, resourceParams, response) {
|
|
2019
|
+
getTypeCacheKeys$8(storeKeyMap, luvio, response, () => keyBuilder$i(luvio, resourceParams));
|
|
2020
2020
|
}
|
|
2021
|
-
function ingestSuccess$
|
|
2021
|
+
function ingestSuccess$7(luvio, resourceParams, response, snapshotRefresh) {
|
|
2022
2022
|
const { body } = response;
|
|
2023
|
-
const key = keyBuilder$
|
|
2024
|
-
luvio.storeIngest(key, ingest$
|
|
2023
|
+
const key = keyBuilder$i(luvio, resourceParams);
|
|
2024
|
+
luvio.storeIngest(key, ingest$8, body);
|
|
2025
2025
|
const snapshot = luvio.storeLookup({
|
|
2026
2026
|
recordId: key,
|
|
2027
|
-
node: select$
|
|
2027
|
+
node: select$i(),
|
|
2028
2028
|
variables: {},
|
|
2029
2029
|
}, snapshotRefresh);
|
|
2030
2030
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -2036,12 +2036,12 @@ function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
2036
2036
|
return snapshot;
|
|
2037
2037
|
}
|
|
2038
2038
|
function ingestError$5(luvio, params, error, snapshotRefresh) {
|
|
2039
|
-
const key = keyBuilder$
|
|
2039
|
+
const key = keyBuilder$i(luvio, params);
|
|
2040
2040
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
2041
2041
|
luvio.storeIngestError(key, errorSnapshot);
|
|
2042
2042
|
return errorSnapshot;
|
|
2043
2043
|
}
|
|
2044
|
-
function createResourceRequest$
|
|
2044
|
+
function createResourceRequest$7(config) {
|
|
2045
2045
|
const headers = {};
|
|
2046
2046
|
return {
|
|
2047
2047
|
baseUri: '/services/data/v62.0',
|
|
@@ -2055,60 +2055,60 @@ function createResourceRequest$6(config) {
|
|
|
2055
2055
|
};
|
|
2056
2056
|
}
|
|
2057
2057
|
|
|
2058
|
-
const adapterName$
|
|
2058
|
+
const adapterName$7 = 'getLearningItemProgress';
|
|
2059
2059
|
const getLearningItemProgress_ConfigPropertyMetadata = [
|
|
2060
2060
|
generateParamConfigMetadata('learningItemIds', false, 1 /* QueryParameter */, 0 /* String */, true),
|
|
2061
2061
|
];
|
|
2062
|
-
const getLearningItemProgress_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
2063
|
-
const createResourceParams$
|
|
2064
|
-
function keyBuilder$
|
|
2065
|
-
const resourceParams = createResourceParams$
|
|
2066
|
-
return keyBuilder$
|
|
2062
|
+
const getLearningItemProgress_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$7, getLearningItemProgress_ConfigPropertyMetadata);
|
|
2063
|
+
const createResourceParams$7 = /*#__PURE__*/ createResourceParams$d(getLearningItemProgress_ConfigPropertyMetadata);
|
|
2064
|
+
function keyBuilder$h(luvio, config) {
|
|
2065
|
+
const resourceParams = createResourceParams$7(config);
|
|
2066
|
+
return keyBuilder$i(luvio, resourceParams);
|
|
2067
2067
|
}
|
|
2068
|
-
function typeCheckConfig$
|
|
2068
|
+
function typeCheckConfig$7(untrustedConfig) {
|
|
2069
2069
|
const config = {};
|
|
2070
|
-
typeCheckConfig$
|
|
2070
|
+
typeCheckConfig$d(untrustedConfig, config, getLearningItemProgress_ConfigPropertyMetadata);
|
|
2071
2071
|
return config;
|
|
2072
2072
|
}
|
|
2073
|
-
function validateAdapterConfig$
|
|
2073
|
+
function validateAdapterConfig$7(untrustedConfig, configPropertyNames) {
|
|
2074
2074
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
2075
2075
|
return null;
|
|
2076
2076
|
}
|
|
2077
2077
|
if (process.env.NODE_ENV !== 'production') {
|
|
2078
2078
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
2079
2079
|
}
|
|
2080
|
-
const config = typeCheckConfig$
|
|
2080
|
+
const config = typeCheckConfig$7(untrustedConfig);
|
|
2081
2081
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2082
2082
|
return null;
|
|
2083
2083
|
}
|
|
2084
2084
|
return config;
|
|
2085
2085
|
}
|
|
2086
2086
|
function adapterFragment$5(luvio, config) {
|
|
2087
|
-
createResourceParams$
|
|
2088
|
-
return select$
|
|
2087
|
+
createResourceParams$7(config);
|
|
2088
|
+
return select$i();
|
|
2089
2089
|
}
|
|
2090
2090
|
function onFetchResponseSuccess$5(luvio, config, resourceParams, response) {
|
|
2091
|
-
const snapshot = ingestSuccess$
|
|
2091
|
+
const snapshot = ingestSuccess$7(luvio, resourceParams, response, {
|
|
2092
2092
|
config,
|
|
2093
|
-
resolve: () => buildNetworkSnapshot$
|
|
2093
|
+
resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
|
|
2094
2094
|
});
|
|
2095
2095
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2096
2096
|
}
|
|
2097
2097
|
function onFetchResponseError$5(luvio, config, resourceParams, response) {
|
|
2098
2098
|
const snapshot = ingestError$5(luvio, resourceParams, response, {
|
|
2099
2099
|
config,
|
|
2100
|
-
resolve: () => buildNetworkSnapshot$
|
|
2100
|
+
resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
|
|
2101
2101
|
});
|
|
2102
2102
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2103
2103
|
}
|
|
2104
|
-
function buildNetworkSnapshot$
|
|
2105
|
-
const resourceParams = createResourceParams$
|
|
2106
|
-
const request = createResourceRequest$
|
|
2104
|
+
function buildNetworkSnapshot$7(luvio, config, options) {
|
|
2105
|
+
const resourceParams = createResourceParams$7(config);
|
|
2106
|
+
const request = createResourceRequest$7(resourceParams);
|
|
2107
2107
|
return luvio.dispatchResourceRequest(request, options)
|
|
2108
2108
|
.then((response) => {
|
|
2109
2109
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$5(luvio, config, resourceParams, response), () => {
|
|
2110
2110
|
const cache = new StoreKeyMap();
|
|
2111
|
-
getResponseCacheKeys$
|
|
2111
|
+
getResponseCacheKeys$7(cache, luvio, resourceParams, response.body);
|
|
2112
2112
|
return cache;
|
|
2113
2113
|
});
|
|
2114
2114
|
}, (response) => {
|
|
@@ -2116,23 +2116,23 @@ function buildNetworkSnapshot$6(luvio, config, options) {
|
|
|
2116
2116
|
});
|
|
2117
2117
|
}
|
|
2118
2118
|
function buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext) {
|
|
2119
|
-
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
2119
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$7, undefined, false);
|
|
2120
2120
|
}
|
|
2121
2121
|
function buildCachedSnapshotCachePolicy$5(context, storeLookup) {
|
|
2122
2122
|
const { luvio, config } = context;
|
|
2123
2123
|
const selector = {
|
|
2124
|
-
recordId: keyBuilder$
|
|
2124
|
+
recordId: keyBuilder$h(luvio, config),
|
|
2125
2125
|
node: adapterFragment$5(luvio, config),
|
|
2126
2126
|
variables: {},
|
|
2127
2127
|
};
|
|
2128
2128
|
const cacheSnapshot = storeLookup(selector, {
|
|
2129
2129
|
config,
|
|
2130
|
-
resolve: () => buildNetworkSnapshot$
|
|
2130
|
+
resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
|
|
2131
2131
|
});
|
|
2132
2132
|
return cacheSnapshot;
|
|
2133
2133
|
}
|
|
2134
2134
|
const getLearningItemProgressAdapterFactory = (luvio) => function LearningContentPlatform__getLearningItemProgress(untrustedConfig, requestContext) {
|
|
2135
|
-
const config = validateAdapterConfig$
|
|
2135
|
+
const config = validateAdapterConfig$7(untrustedConfig, getLearningItemProgress_ConfigPropertyNames);
|
|
2136
2136
|
// Invalid or incomplete config
|
|
2137
2137
|
if (config === null) {
|
|
2138
2138
|
return null;
|
|
@@ -2141,9 +2141,9 @@ const getLearningItemProgressAdapterFactory = (luvio) => function LearningConten
|
|
|
2141
2141
|
buildCachedSnapshotCachePolicy$5, buildNetworkSnapshotCachePolicy$5);
|
|
2142
2142
|
};
|
|
2143
2143
|
|
|
2144
|
-
const TTL$
|
|
2145
|
-
const VERSION$
|
|
2146
|
-
function validate$
|
|
2144
|
+
const TTL$6 = 60000;
|
|
2145
|
+
const VERSION$a = "1832481a3fe10deeb9c5dddba933f3da";
|
|
2146
|
+
function validate$a(obj, path = 'LearningItemRepresentation') {
|
|
2147
2147
|
const v_error = (() => {
|
|
2148
2148
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2149
2149
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2438,23 +2438,23 @@ function validate$9(obj, path = 'LearningItemRepresentation') {
|
|
|
2438
2438
|
})();
|
|
2439
2439
|
return v_error === undefined ? null : v_error;
|
|
2440
2440
|
}
|
|
2441
|
-
const RepresentationType$
|
|
2442
|
-
function keyBuilder$
|
|
2443
|
-
return keyPrefix + '::' + RepresentationType$
|
|
2441
|
+
const RepresentationType$7 = 'LearningItemRepresentation';
|
|
2442
|
+
function keyBuilder$g(luvio, config) {
|
|
2443
|
+
return keyPrefix + '::' + RepresentationType$7 + ':' + (config.learning_item_id === null ? '' : config.learning_item_id);
|
|
2444
2444
|
}
|
|
2445
|
-
function keyBuilderFromType$
|
|
2445
|
+
function keyBuilderFromType$6(luvio, object) {
|
|
2446
2446
|
const keyParams = {
|
|
2447
2447
|
learning_item_id: object.id
|
|
2448
2448
|
};
|
|
2449
|
-
return keyBuilder$
|
|
2449
|
+
return keyBuilder$g(luvio, keyParams);
|
|
2450
2450
|
}
|
|
2451
|
-
function normalize$
|
|
2451
|
+
function normalize$7(input, existing, path, luvio, store, timestamp) {
|
|
2452
2452
|
return input;
|
|
2453
2453
|
}
|
|
2454
|
-
const select$
|
|
2454
|
+
const select$h = function LearningItemRepresentationSelect() {
|
|
2455
2455
|
return {
|
|
2456
2456
|
kind: 'Fragment',
|
|
2457
|
-
version: VERSION$
|
|
2457
|
+
version: VERSION$a,
|
|
2458
2458
|
private: [],
|
|
2459
2459
|
selections: [
|
|
2460
2460
|
{
|
|
@@ -2508,7 +2508,7 @@ const select$f = function LearningItemRepresentationSelect() {
|
|
|
2508
2508
|
]
|
|
2509
2509
|
};
|
|
2510
2510
|
};
|
|
2511
|
-
function equals$
|
|
2511
|
+
function equals$a(existing, incoming) {
|
|
2512
2512
|
const existing_completionRate = existing.completionRate;
|
|
2513
2513
|
const incoming_completionRate = incoming.completionRate;
|
|
2514
2514
|
if (!(existing_completionRate === incoming_completionRate)) {
|
|
@@ -2571,24 +2571,24 @@ function equals$9(existing, incoming) {
|
|
|
2571
2571
|
}
|
|
2572
2572
|
return true;
|
|
2573
2573
|
}
|
|
2574
|
-
const ingest$
|
|
2574
|
+
const ingest$7 = function LearningItemRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2575
2575
|
if (process.env.NODE_ENV !== 'production') {
|
|
2576
|
-
const validateError = validate$
|
|
2576
|
+
const validateError = validate$a(input);
|
|
2577
2577
|
if (validateError !== null) {
|
|
2578
2578
|
throw validateError;
|
|
2579
2579
|
}
|
|
2580
2580
|
}
|
|
2581
|
-
const key = keyBuilderFromType$
|
|
2582
|
-
const ttlToUse = TTL$
|
|
2583
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
2581
|
+
const key = keyBuilderFromType$6(luvio, input);
|
|
2582
|
+
const ttlToUse = TTL$6;
|
|
2583
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$7, "LearningContentPlatform", VERSION$a, RepresentationType$7, equals$a);
|
|
2584
2584
|
return createLink(key);
|
|
2585
2585
|
};
|
|
2586
|
-
function getTypeCacheKeys$
|
|
2586
|
+
function getTypeCacheKeys$7(rootKeySet, luvio, input, fullPathFactory) {
|
|
2587
2587
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2588
|
-
const rootKey = keyBuilderFromType$
|
|
2588
|
+
const rootKey = keyBuilderFromType$6(luvio, input);
|
|
2589
2589
|
rootKeySet.set(rootKey, {
|
|
2590
2590
|
namespace: keyPrefix,
|
|
2591
|
-
representationName: RepresentationType$
|
|
2591
|
+
representationName: RepresentationType$7,
|
|
2592
2592
|
mergeable: false
|
|
2593
2593
|
});
|
|
2594
2594
|
}
|
|
@@ -2602,13 +2602,13 @@ const notifyUpdateAvailableFactory$1 = (luvio) => {
|
|
|
2602
2602
|
}
|
|
2603
2603
|
});
|
|
2604
2604
|
}
|
|
2605
|
-
const keys = configs.map(c => keyBuilder$
|
|
2605
|
+
const keys = configs.map(c => keyBuilder$g(luvio, c));
|
|
2606
2606
|
return luvio.notifyStoreUpdateAvailable(keys);
|
|
2607
2607
|
};
|
|
2608
2608
|
};
|
|
2609
2609
|
|
|
2610
|
-
const VERSION$
|
|
2611
|
-
function validate$
|
|
2610
|
+
const VERSION$9 = "cd4c27f064c3139aef14a6ef22627c0f";
|
|
2611
|
+
function validate$9(obj, path = 'LearningItemListRepresentation') {
|
|
2612
2612
|
const v_error = (() => {
|
|
2613
2613
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2614
2614
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2628,14 +2628,14 @@ function validate$8(obj, path = 'LearningItemListRepresentation') {
|
|
|
2628
2628
|
})();
|
|
2629
2629
|
return v_error === undefined ? null : v_error;
|
|
2630
2630
|
}
|
|
2631
|
-
const RepresentationType$
|
|
2632
|
-
function normalize$
|
|
2631
|
+
const RepresentationType$6 = 'LearningItemListRepresentation';
|
|
2632
|
+
function normalize$6(input, existing, path, luvio, store, timestamp) {
|
|
2633
2633
|
const input_list = input.list;
|
|
2634
2634
|
const input_list_id = path.fullPath + '__list';
|
|
2635
2635
|
for (let i = 0; i < input_list.length; i++) {
|
|
2636
2636
|
const input_list_item = input_list[i];
|
|
2637
2637
|
let input_list_item_id = input_list_id + '__' + i;
|
|
2638
|
-
input_list[i] = ingest$
|
|
2638
|
+
input_list[i] = ingest$7(input_list_item, {
|
|
2639
2639
|
fullPath: input_list_item_id,
|
|
2640
2640
|
propertyName: i,
|
|
2641
2641
|
parent: {
|
|
@@ -2648,22 +2648,22 @@ function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
|
2648
2648
|
}
|
|
2649
2649
|
return input;
|
|
2650
2650
|
}
|
|
2651
|
-
const select$
|
|
2651
|
+
const select$g = function LearningItemListRepresentationSelect() {
|
|
2652
2652
|
return {
|
|
2653
2653
|
kind: 'Fragment',
|
|
2654
|
-
version: VERSION$
|
|
2654
|
+
version: VERSION$9,
|
|
2655
2655
|
private: [],
|
|
2656
2656
|
selections: [
|
|
2657
2657
|
{
|
|
2658
2658
|
name: 'list',
|
|
2659
2659
|
kind: 'Link',
|
|
2660
2660
|
plural: true,
|
|
2661
|
-
fragment: select$
|
|
2661
|
+
fragment: select$h()
|
|
2662
2662
|
}
|
|
2663
2663
|
]
|
|
2664
2664
|
};
|
|
2665
2665
|
};
|
|
2666
|
-
function equals$
|
|
2666
|
+
function equals$9(existing, incoming) {
|
|
2667
2667
|
const existing_list = existing.list;
|
|
2668
2668
|
const incoming_list = incoming.list;
|
|
2669
2669
|
const equals_list_items = equalsArray(existing_list, incoming_list, (existing_list_item, incoming_list_item) => {
|
|
@@ -2676,48 +2676,48 @@ function equals$8(existing, incoming) {
|
|
|
2676
2676
|
}
|
|
2677
2677
|
return true;
|
|
2678
2678
|
}
|
|
2679
|
-
const ingest$
|
|
2679
|
+
const ingest$6 = function LearningItemListRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2680
2680
|
if (process.env.NODE_ENV !== 'production') {
|
|
2681
|
-
const validateError = validate$
|
|
2681
|
+
const validateError = validate$9(input);
|
|
2682
2682
|
if (validateError !== null) {
|
|
2683
2683
|
throw validateError;
|
|
2684
2684
|
}
|
|
2685
2685
|
}
|
|
2686
2686
|
const key = path.fullPath;
|
|
2687
2687
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 2592000000;
|
|
2688
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
2688
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$6, "LearningContentPlatform", VERSION$9, RepresentationType$6, equals$9);
|
|
2689
2689
|
return createLink(key);
|
|
2690
2690
|
};
|
|
2691
|
-
function getTypeCacheKeys$
|
|
2691
|
+
function getTypeCacheKeys$6(rootKeySet, luvio, input, fullPathFactory) {
|
|
2692
2692
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2693
2693
|
const rootKey = fullPathFactory();
|
|
2694
2694
|
rootKeySet.set(rootKey, {
|
|
2695
2695
|
namespace: keyPrefix,
|
|
2696
|
-
representationName: RepresentationType$
|
|
2696
|
+
representationName: RepresentationType$6,
|
|
2697
2697
|
mergeable: false
|
|
2698
2698
|
});
|
|
2699
2699
|
const input_list_length = input.list.length;
|
|
2700
2700
|
for (let i = 0; i < input_list_length; i++) {
|
|
2701
|
-
getTypeCacheKeys$
|
|
2701
|
+
getTypeCacheKeys$7(rootKeySet, luvio, input.list[i]);
|
|
2702
2702
|
}
|
|
2703
2703
|
}
|
|
2704
2704
|
|
|
2705
|
-
function select$
|
|
2706
|
-
return select$
|
|
2705
|
+
function select$f(luvio, params) {
|
|
2706
|
+
return select$g();
|
|
2707
2707
|
}
|
|
2708
|
-
function keyBuilder$
|
|
2708
|
+
function keyBuilder$f(luvio, params) {
|
|
2709
2709
|
return keyPrefix + '::LearningItemListRepresentation:(' + 'learningItemIds:' + params.queryParams.learningItemIds + ')';
|
|
2710
2710
|
}
|
|
2711
|
-
function getResponseCacheKeys$
|
|
2712
|
-
getTypeCacheKeys$
|
|
2711
|
+
function getResponseCacheKeys$6(storeKeyMap, luvio, resourceParams, response) {
|
|
2712
|
+
getTypeCacheKeys$6(storeKeyMap, luvio, response, () => keyBuilder$f(luvio, resourceParams));
|
|
2713
2713
|
}
|
|
2714
|
-
function ingestSuccess$
|
|
2714
|
+
function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
|
|
2715
2715
|
const { body } = response;
|
|
2716
|
-
const key = keyBuilder$
|
|
2717
|
-
luvio.storeIngest(key, ingest$
|
|
2716
|
+
const key = keyBuilder$f(luvio, resourceParams);
|
|
2717
|
+
luvio.storeIngest(key, ingest$6, body);
|
|
2718
2718
|
const snapshot = luvio.storeLookup({
|
|
2719
2719
|
recordId: key,
|
|
2720
|
-
node: select$
|
|
2720
|
+
node: select$f(),
|
|
2721
2721
|
variables: {},
|
|
2722
2722
|
}, snapshotRefresh);
|
|
2723
2723
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -2729,12 +2729,12 @@ function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
2729
2729
|
return snapshot;
|
|
2730
2730
|
}
|
|
2731
2731
|
function ingestError$4(luvio, params, error, snapshotRefresh) {
|
|
2732
|
-
const key = keyBuilder$
|
|
2732
|
+
const key = keyBuilder$f(luvio, params);
|
|
2733
2733
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
2734
2734
|
luvio.storeIngestError(key, errorSnapshot);
|
|
2735
2735
|
return errorSnapshot;
|
|
2736
2736
|
}
|
|
2737
|
-
function createResourceRequest$
|
|
2737
|
+
function createResourceRequest$6(config) {
|
|
2738
2738
|
const headers = {};
|
|
2739
2739
|
return {
|
|
2740
2740
|
baseUri: '/services/data/v62.0',
|
|
@@ -2748,60 +2748,60 @@ function createResourceRequest$5(config) {
|
|
|
2748
2748
|
};
|
|
2749
2749
|
}
|
|
2750
2750
|
|
|
2751
|
-
const adapterName$
|
|
2751
|
+
const adapterName$6 = 'getLearningItemsList';
|
|
2752
2752
|
const getLearningItemsList_ConfigPropertyMetadata = [
|
|
2753
2753
|
generateParamConfigMetadata('learningItemIds', false, 1 /* QueryParameter */, 0 /* String */, true),
|
|
2754
2754
|
];
|
|
2755
|
-
const getLearningItemsList_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
2756
|
-
const createResourceParams$
|
|
2757
|
-
function keyBuilder$
|
|
2758
|
-
const resourceParams = createResourceParams$
|
|
2759
|
-
return keyBuilder$
|
|
2755
|
+
const getLearningItemsList_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, getLearningItemsList_ConfigPropertyMetadata);
|
|
2756
|
+
const createResourceParams$6 = /*#__PURE__*/ createResourceParams$d(getLearningItemsList_ConfigPropertyMetadata);
|
|
2757
|
+
function keyBuilder$e(luvio, config) {
|
|
2758
|
+
const resourceParams = createResourceParams$6(config);
|
|
2759
|
+
return keyBuilder$f(luvio, resourceParams);
|
|
2760
2760
|
}
|
|
2761
|
-
function typeCheckConfig$
|
|
2761
|
+
function typeCheckConfig$6(untrustedConfig) {
|
|
2762
2762
|
const config = {};
|
|
2763
|
-
typeCheckConfig$
|
|
2763
|
+
typeCheckConfig$d(untrustedConfig, config, getLearningItemsList_ConfigPropertyMetadata);
|
|
2764
2764
|
return config;
|
|
2765
2765
|
}
|
|
2766
|
-
function validateAdapterConfig$
|
|
2766
|
+
function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
|
|
2767
2767
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
2768
2768
|
return null;
|
|
2769
2769
|
}
|
|
2770
2770
|
if (process.env.NODE_ENV !== 'production') {
|
|
2771
2771
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
2772
2772
|
}
|
|
2773
|
-
const config = typeCheckConfig$
|
|
2773
|
+
const config = typeCheckConfig$6(untrustedConfig);
|
|
2774
2774
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2775
2775
|
return null;
|
|
2776
2776
|
}
|
|
2777
2777
|
return config;
|
|
2778
2778
|
}
|
|
2779
2779
|
function adapterFragment$4(luvio, config) {
|
|
2780
|
-
createResourceParams$
|
|
2781
|
-
return select$
|
|
2780
|
+
createResourceParams$6(config);
|
|
2781
|
+
return select$f();
|
|
2782
2782
|
}
|
|
2783
2783
|
function onFetchResponseSuccess$4(luvio, config, resourceParams, response) {
|
|
2784
|
-
const snapshot = ingestSuccess$
|
|
2784
|
+
const snapshot = ingestSuccess$6(luvio, resourceParams, response, {
|
|
2785
2785
|
config,
|
|
2786
|
-
resolve: () => buildNetworkSnapshot$
|
|
2786
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
2787
2787
|
});
|
|
2788
2788
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2789
2789
|
}
|
|
2790
2790
|
function onFetchResponseError$4(luvio, config, resourceParams, response) {
|
|
2791
2791
|
const snapshot = ingestError$4(luvio, resourceParams, response, {
|
|
2792
2792
|
config,
|
|
2793
|
-
resolve: () => buildNetworkSnapshot$
|
|
2793
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
2794
2794
|
});
|
|
2795
2795
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2796
2796
|
}
|
|
2797
|
-
function buildNetworkSnapshot$
|
|
2798
|
-
const resourceParams = createResourceParams$
|
|
2799
|
-
const request = createResourceRequest$
|
|
2797
|
+
function buildNetworkSnapshot$6(luvio, config, options) {
|
|
2798
|
+
const resourceParams = createResourceParams$6(config);
|
|
2799
|
+
const request = createResourceRequest$6(resourceParams);
|
|
2800
2800
|
return luvio.dispatchResourceRequest(request, options)
|
|
2801
2801
|
.then((response) => {
|
|
2802
2802
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$4(luvio, config, resourceParams, response), () => {
|
|
2803
2803
|
const cache = new StoreKeyMap();
|
|
2804
|
-
getResponseCacheKeys$
|
|
2804
|
+
getResponseCacheKeys$6(cache, luvio, resourceParams, response.body);
|
|
2805
2805
|
return cache;
|
|
2806
2806
|
});
|
|
2807
2807
|
}, (response) => {
|
|
@@ -2809,23 +2809,23 @@ function buildNetworkSnapshot$5(luvio, config, options) {
|
|
|
2809
2809
|
});
|
|
2810
2810
|
}
|
|
2811
2811
|
function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
|
|
2812
|
-
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
2812
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$6, undefined, false);
|
|
2813
2813
|
}
|
|
2814
2814
|
function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
|
|
2815
2815
|
const { luvio, config } = context;
|
|
2816
2816
|
const selector = {
|
|
2817
|
-
recordId: keyBuilder$
|
|
2817
|
+
recordId: keyBuilder$e(luvio, config),
|
|
2818
2818
|
node: adapterFragment$4(luvio, config),
|
|
2819
2819
|
variables: {},
|
|
2820
2820
|
};
|
|
2821
2821
|
const cacheSnapshot = storeLookup(selector, {
|
|
2822
2822
|
config,
|
|
2823
|
-
resolve: () => buildNetworkSnapshot$
|
|
2823
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
2824
2824
|
});
|
|
2825
2825
|
return cacheSnapshot;
|
|
2826
2826
|
}
|
|
2827
2827
|
const getLearningItemsListAdapterFactory = (luvio) => function LearningContentPlatform__getLearningItemsList(untrustedConfig, requestContext) {
|
|
2828
|
-
const config = validateAdapterConfig$
|
|
2828
|
+
const config = validateAdapterConfig$6(untrustedConfig, getLearningItemsList_ConfigPropertyNames);
|
|
2829
2829
|
// Invalid or incomplete config
|
|
2830
2830
|
if (config === null) {
|
|
2831
2831
|
return null;
|
|
@@ -2834,8 +2834,8 @@ const getLearningItemsListAdapterFactory = (luvio) => function LearningContentPl
|
|
|
2834
2834
|
buildCachedSnapshotCachePolicy$4, buildNetworkSnapshotCachePolicy$4);
|
|
2835
2835
|
};
|
|
2836
2836
|
|
|
2837
|
-
const VERSION$
|
|
2838
|
-
function validate$
|
|
2837
|
+
const VERSION$8 = "5d4f9c65c714a3f1ef57de5a211599fb";
|
|
2838
|
+
function validate$8(obj, path = 'LearningAssignmentRepresentation') {
|
|
2839
2839
|
const v_error = (() => {
|
|
2840
2840
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2841
2841
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -3087,10 +3087,10 @@ function validate$7(obj, path = 'LearningAssignmentRepresentation') {
|
|
|
3087
3087
|
})();
|
|
3088
3088
|
return v_error === undefined ? null : v_error;
|
|
3089
3089
|
}
|
|
3090
|
-
const select$
|
|
3090
|
+
const select$e = function LearningAssignmentRepresentationSelect() {
|
|
3091
3091
|
return {
|
|
3092
3092
|
kind: 'Fragment',
|
|
3093
|
-
version: VERSION$
|
|
3093
|
+
version: VERSION$8,
|
|
3094
3094
|
private: [],
|
|
3095
3095
|
selections: [
|
|
3096
3096
|
{
|
|
@@ -3140,7 +3140,7 @@ const select$c = function LearningAssignmentRepresentationSelect() {
|
|
|
3140
3140
|
]
|
|
3141
3141
|
};
|
|
3142
3142
|
};
|
|
3143
|
-
function equals$
|
|
3143
|
+
function equals$8(existing, incoming) {
|
|
3144
3144
|
const existing_id = existing.id;
|
|
3145
3145
|
const incoming_id = incoming.id;
|
|
3146
3146
|
if (!(existing_id === incoming_id)) {
|
|
@@ -3199,9 +3199,9 @@ function equals$7(existing, incoming) {
|
|
|
3199
3199
|
return true;
|
|
3200
3200
|
}
|
|
3201
3201
|
|
|
3202
|
-
const TTL$
|
|
3203
|
-
const VERSION$
|
|
3204
|
-
function validate$
|
|
3202
|
+
const TTL$5 = 15000;
|
|
3203
|
+
const VERSION$7 = "3ae4e1d57057645da8f2613fbdc5e245";
|
|
3204
|
+
function validate$7(obj, path = 'LearningModelOutputRepresentation') {
|
|
3205
3205
|
const v_error = (() => {
|
|
3206
3206
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3207
3207
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -3240,7 +3240,7 @@ function validate$6(obj, path = 'LearningModelOutputRepresentation') {
|
|
|
3240
3240
|
for (let i = 0; i < obj_assignments.length; i++) {
|
|
3241
3241
|
const obj_assignments_item = obj_assignments[i];
|
|
3242
3242
|
const path_assignments_item = path_assignments + '[' + i + ']';
|
|
3243
|
-
const referencepath_assignments_itemValidationError = validate$
|
|
3243
|
+
const referencepath_assignments_itemValidationError = validate$8(obj_assignments_item, path_assignments_item);
|
|
3244
3244
|
if (referencepath_assignments_itemValidationError !== null) {
|
|
3245
3245
|
let message = 'Object doesn\'t match LearningAssignmentRepresentation (at "' + path_assignments_item + '")\n';
|
|
3246
3246
|
message += referencepath_assignments_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -3463,24 +3463,24 @@ function validate$6(obj, path = 'LearningModelOutputRepresentation') {
|
|
|
3463
3463
|
})();
|
|
3464
3464
|
return v_error === undefined ? null : v_error;
|
|
3465
3465
|
}
|
|
3466
|
-
const RepresentationType$
|
|
3467
|
-
function keyBuilder$
|
|
3468
|
-
return keyPrefix + '::' + RepresentationType$
|
|
3466
|
+
const RepresentationType$5 = 'LearningModelOutputRepresentation';
|
|
3467
|
+
function keyBuilder$d(luvio, config) {
|
|
3468
|
+
return keyPrefix + '::' + RepresentationType$5 + ':' + (config.learning_item_id === null ? '' : config.learning_item_id);
|
|
3469
3469
|
}
|
|
3470
|
-
function keyBuilderFromType$
|
|
3470
|
+
function keyBuilderFromType$5(luvio, object) {
|
|
3471
3471
|
const keyParams = {
|
|
3472
3472
|
learning_item_id: object.id
|
|
3473
3473
|
};
|
|
3474
|
-
return keyBuilder$
|
|
3474
|
+
return keyBuilder$d(luvio, keyParams);
|
|
3475
3475
|
}
|
|
3476
|
-
function normalize$
|
|
3476
|
+
function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
3477
3477
|
return input;
|
|
3478
3478
|
}
|
|
3479
|
-
const select$
|
|
3480
|
-
const { selections: LearningAssignmentRepresentation__selections, opaque: LearningAssignmentRepresentation__opaque, } = select$
|
|
3479
|
+
const select$d = function LearningModelOutputRepresentationSelect() {
|
|
3480
|
+
const { selections: LearningAssignmentRepresentation__selections, opaque: LearningAssignmentRepresentation__opaque, } = select$e();
|
|
3481
3481
|
return {
|
|
3482
3482
|
kind: 'Fragment',
|
|
3483
|
-
version: VERSION$
|
|
3483
|
+
version: VERSION$7,
|
|
3484
3484
|
private: [],
|
|
3485
3485
|
selections: [
|
|
3486
3486
|
{
|
|
@@ -3537,7 +3537,7 @@ const select$b = function LearningModelOutputRepresentationSelect() {
|
|
|
3537
3537
|
]
|
|
3538
3538
|
};
|
|
3539
3539
|
};
|
|
3540
|
-
function equals$
|
|
3540
|
+
function equals$7(existing, incoming) {
|
|
3541
3541
|
const existing_description = existing.description;
|
|
3542
3542
|
const incoming_description = incoming.description;
|
|
3543
3543
|
if (!(existing_description === incoming_description)) {
|
|
@@ -3556,7 +3556,7 @@ function equals$6(existing, incoming) {
|
|
|
3556
3556
|
const existing_assignments = existing.assignments;
|
|
3557
3557
|
const incoming_assignments = incoming.assignments;
|
|
3558
3558
|
const equals_assignments_items = equalsArray(existing_assignments, incoming_assignments, (existing_assignments_item, incoming_assignments_item) => {
|
|
3559
|
-
if (!(equals$
|
|
3559
|
+
if (!(equals$8(existing_assignments_item, incoming_assignments_item))) {
|
|
3560
3560
|
return false;
|
|
3561
3561
|
}
|
|
3562
3562
|
});
|
|
@@ -3615,46 +3615,46 @@ function equals$6(existing, incoming) {
|
|
|
3615
3615
|
}
|
|
3616
3616
|
return true;
|
|
3617
3617
|
}
|
|
3618
|
-
const ingest$
|
|
3618
|
+
const ingest$5 = function LearningModelOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
3619
3619
|
if (process.env.NODE_ENV !== 'production') {
|
|
3620
|
-
const validateError = validate$
|
|
3620
|
+
const validateError = validate$7(input);
|
|
3621
3621
|
if (validateError !== null) {
|
|
3622
3622
|
throw validateError;
|
|
3623
3623
|
}
|
|
3624
3624
|
}
|
|
3625
|
-
const key = keyBuilderFromType$
|
|
3626
|
-
const ttlToUse = TTL$
|
|
3627
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
3625
|
+
const key = keyBuilderFromType$5(luvio, input);
|
|
3626
|
+
const ttlToUse = TTL$5;
|
|
3627
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$5, "LearningContentPlatform", VERSION$7, RepresentationType$5, equals$7);
|
|
3628
3628
|
return createLink(key);
|
|
3629
3629
|
};
|
|
3630
|
-
function getTypeCacheKeys$
|
|
3630
|
+
function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
|
|
3631
3631
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
3632
|
-
const rootKey = keyBuilderFromType$
|
|
3632
|
+
const rootKey = keyBuilderFromType$5(luvio, input);
|
|
3633
3633
|
rootKeySet.set(rootKey, {
|
|
3634
3634
|
namespace: keyPrefix,
|
|
3635
|
-
representationName: RepresentationType$
|
|
3635
|
+
representationName: RepresentationType$5,
|
|
3636
3636
|
mergeable: false
|
|
3637
3637
|
});
|
|
3638
3638
|
}
|
|
3639
3639
|
|
|
3640
|
-
function select$
|
|
3641
|
-
return select$
|
|
3640
|
+
function select$c(luvio, params) {
|
|
3641
|
+
return select$d();
|
|
3642
3642
|
}
|
|
3643
|
-
function keyBuilder$
|
|
3644
|
-
return keyBuilder$
|
|
3643
|
+
function keyBuilder$c(luvio, params) {
|
|
3644
|
+
return keyBuilder$d(luvio, {
|
|
3645
3645
|
learning_item_id: params.urlParams.learningItemId
|
|
3646
3646
|
});
|
|
3647
3647
|
}
|
|
3648
|
-
function getResponseCacheKeys$
|
|
3649
|
-
getTypeCacheKeys$
|
|
3648
|
+
function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
|
|
3649
|
+
getTypeCacheKeys$5(storeKeyMap, luvio, response);
|
|
3650
3650
|
}
|
|
3651
|
-
function ingestSuccess$
|
|
3651
|
+
function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
|
|
3652
3652
|
const { body } = response;
|
|
3653
|
-
const key = keyBuilder$
|
|
3654
|
-
luvio.storeIngest(key, ingest$
|
|
3653
|
+
const key = keyBuilder$c(luvio, resourceParams);
|
|
3654
|
+
luvio.storeIngest(key, ingest$5, body);
|
|
3655
3655
|
const snapshot = luvio.storeLookup({
|
|
3656
3656
|
recordId: key,
|
|
3657
|
-
node: select$
|
|
3657
|
+
node: select$c(),
|
|
3658
3658
|
variables: {},
|
|
3659
3659
|
}, snapshotRefresh);
|
|
3660
3660
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3666,18 +3666,18 @@ function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
3666
3666
|
return snapshot;
|
|
3667
3667
|
}
|
|
3668
3668
|
function ingestError$3(luvio, params, error, snapshotRefresh) {
|
|
3669
|
-
const key = keyBuilder$
|
|
3669
|
+
const key = keyBuilder$c(luvio, params);
|
|
3670
3670
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
3671
3671
|
const storeMetadataParams = {
|
|
3672
|
-
ttl: TTL$
|
|
3672
|
+
ttl: TTL$5,
|
|
3673
3673
|
namespace: keyPrefix,
|
|
3674
|
-
version: VERSION$
|
|
3675
|
-
representationName: RepresentationType$
|
|
3674
|
+
version: VERSION$7,
|
|
3675
|
+
representationName: RepresentationType$5
|
|
3676
3676
|
};
|
|
3677
3677
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
3678
3678
|
return errorSnapshot;
|
|
3679
3679
|
}
|
|
3680
|
-
function createResourceRequest$
|
|
3680
|
+
function createResourceRequest$5(config) {
|
|
3681
3681
|
const headers = {};
|
|
3682
3682
|
return {
|
|
3683
3683
|
baseUri: '/services/data/v62.0',
|
|
@@ -3691,60 +3691,60 @@ function createResourceRequest$4(config) {
|
|
|
3691
3691
|
};
|
|
3692
3692
|
}
|
|
3693
3693
|
|
|
3694
|
-
const adapterName$
|
|
3694
|
+
const adapterName$5 = 'getLearningModel';
|
|
3695
3695
|
const getLearningModel_ConfigPropertyMetadata = [
|
|
3696
3696
|
generateParamConfigMetadata('learningItemId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
3697
3697
|
];
|
|
3698
|
-
const getLearningModel_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
3699
|
-
const createResourceParams$
|
|
3700
|
-
function keyBuilder$
|
|
3701
|
-
const resourceParams = createResourceParams$
|
|
3702
|
-
return keyBuilder$
|
|
3698
|
+
const getLearningModel_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, getLearningModel_ConfigPropertyMetadata);
|
|
3699
|
+
const createResourceParams$5 = /*#__PURE__*/ createResourceParams$d(getLearningModel_ConfigPropertyMetadata);
|
|
3700
|
+
function keyBuilder$b(luvio, config) {
|
|
3701
|
+
const resourceParams = createResourceParams$5(config);
|
|
3702
|
+
return keyBuilder$c(luvio, resourceParams);
|
|
3703
3703
|
}
|
|
3704
|
-
function typeCheckConfig$
|
|
3704
|
+
function typeCheckConfig$5(untrustedConfig) {
|
|
3705
3705
|
const config = {};
|
|
3706
|
-
typeCheckConfig$
|
|
3706
|
+
typeCheckConfig$d(untrustedConfig, config, getLearningModel_ConfigPropertyMetadata);
|
|
3707
3707
|
return config;
|
|
3708
3708
|
}
|
|
3709
|
-
function validateAdapterConfig$
|
|
3709
|
+
function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
|
|
3710
3710
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
3711
3711
|
return null;
|
|
3712
3712
|
}
|
|
3713
3713
|
if (process.env.NODE_ENV !== 'production') {
|
|
3714
3714
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
3715
3715
|
}
|
|
3716
|
-
const config = typeCheckConfig$
|
|
3716
|
+
const config = typeCheckConfig$5(untrustedConfig);
|
|
3717
3717
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3718
3718
|
return null;
|
|
3719
3719
|
}
|
|
3720
3720
|
return config;
|
|
3721
3721
|
}
|
|
3722
3722
|
function adapterFragment$3(luvio, config) {
|
|
3723
|
-
createResourceParams$
|
|
3724
|
-
return select$
|
|
3723
|
+
createResourceParams$5(config);
|
|
3724
|
+
return select$c();
|
|
3725
3725
|
}
|
|
3726
3726
|
function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
|
|
3727
|
-
const snapshot = ingestSuccess$
|
|
3727
|
+
const snapshot = ingestSuccess$5(luvio, resourceParams, response, {
|
|
3728
3728
|
config,
|
|
3729
|
-
resolve: () => buildNetworkSnapshot$
|
|
3729
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
3730
3730
|
});
|
|
3731
3731
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3732
3732
|
}
|
|
3733
3733
|
function onFetchResponseError$3(luvio, config, resourceParams, response) {
|
|
3734
3734
|
const snapshot = ingestError$3(luvio, resourceParams, response, {
|
|
3735
3735
|
config,
|
|
3736
|
-
resolve: () => buildNetworkSnapshot$
|
|
3736
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
3737
3737
|
});
|
|
3738
3738
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3739
3739
|
}
|
|
3740
|
-
function buildNetworkSnapshot$
|
|
3741
|
-
const resourceParams = createResourceParams$
|
|
3742
|
-
const request = createResourceRequest$
|
|
3740
|
+
function buildNetworkSnapshot$5(luvio, config, options) {
|
|
3741
|
+
const resourceParams = createResourceParams$5(config);
|
|
3742
|
+
const request = createResourceRequest$5(resourceParams);
|
|
3743
3743
|
return luvio.dispatchResourceRequest(request, options)
|
|
3744
3744
|
.then((response) => {
|
|
3745
3745
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
|
|
3746
3746
|
const cache = new StoreKeyMap();
|
|
3747
|
-
getResponseCacheKeys$
|
|
3747
|
+
getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
|
|
3748
3748
|
return cache;
|
|
3749
3749
|
});
|
|
3750
3750
|
}, (response) => {
|
|
@@ -3752,23 +3752,23 @@ function buildNetworkSnapshot$4(luvio, config, options) {
|
|
|
3752
3752
|
});
|
|
3753
3753
|
}
|
|
3754
3754
|
function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
|
|
3755
|
-
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
3755
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$5, undefined, false);
|
|
3756
3756
|
}
|
|
3757
3757
|
function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
|
|
3758
3758
|
const { luvio, config } = context;
|
|
3759
3759
|
const selector = {
|
|
3760
|
-
recordId: keyBuilder$
|
|
3760
|
+
recordId: keyBuilder$b(luvio, config),
|
|
3761
3761
|
node: adapterFragment$3(luvio, config),
|
|
3762
3762
|
variables: {},
|
|
3763
3763
|
};
|
|
3764
3764
|
const cacheSnapshot = storeLookup(selector, {
|
|
3765
3765
|
config,
|
|
3766
|
-
resolve: () => buildNetworkSnapshot$
|
|
3766
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
3767
3767
|
});
|
|
3768
3768
|
return cacheSnapshot;
|
|
3769
3769
|
}
|
|
3770
3770
|
const getLearningModelAdapterFactory = (luvio) => function LearningContentPlatform__getLearningModel(untrustedConfig, requestContext) {
|
|
3771
|
-
const config = validateAdapterConfig$
|
|
3771
|
+
const config = validateAdapterConfig$5(untrustedConfig, getLearningModel_ConfigPropertyNames);
|
|
3772
3772
|
// Invalid or incomplete config
|
|
3773
3773
|
if (config === null) {
|
|
3774
3774
|
return null;
|
|
@@ -3777,9 +3777,9 @@ const getLearningModelAdapterFactory = (luvio) => function LearningContentPlatfo
|
|
|
3777
3777
|
buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
|
|
3778
3778
|
};
|
|
3779
3779
|
|
|
3780
|
-
const TTL$
|
|
3781
|
-
const VERSION$
|
|
3782
|
-
function validate$
|
|
3780
|
+
const TTL$4 = 60000;
|
|
3781
|
+
const VERSION$6 = "2925211e5284d3a12b358a5bda082646";
|
|
3782
|
+
function validate$6(obj, path = 'LearningPracticeRepresentation') {
|
|
3783
3783
|
const v_error = (() => {
|
|
3784
3784
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3785
3785
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -3854,23 +3854,23 @@ function validate$5(obj, path = 'LearningPracticeRepresentation') {
|
|
|
3854
3854
|
})();
|
|
3855
3855
|
return v_error === undefined ? null : v_error;
|
|
3856
3856
|
}
|
|
3857
|
-
const RepresentationType$
|
|
3858
|
-
function keyBuilder$
|
|
3859
|
-
return keyPrefix + '::' + RepresentationType$
|
|
3857
|
+
const RepresentationType$4 = 'LearningPracticeRepresentation';
|
|
3858
|
+
function keyBuilder$a(luvio, config) {
|
|
3859
|
+
return keyPrefix + '::' + RepresentationType$4 + ':' + config.learning_item_id;
|
|
3860
3860
|
}
|
|
3861
|
-
function keyBuilderFromType$
|
|
3861
|
+
function keyBuilderFromType$4(luvio, object) {
|
|
3862
3862
|
const keyParams = {
|
|
3863
3863
|
learning_item_id: object.learningItemId
|
|
3864
3864
|
};
|
|
3865
|
-
return keyBuilder$
|
|
3865
|
+
return keyBuilder$a(luvio, keyParams);
|
|
3866
3866
|
}
|
|
3867
|
-
function normalize$
|
|
3867
|
+
function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
3868
3868
|
return input;
|
|
3869
3869
|
}
|
|
3870
|
-
const select$
|
|
3870
|
+
const select$b = function LearningPracticeRepresentationSelect() {
|
|
3871
3871
|
return {
|
|
3872
3872
|
kind: 'Fragment',
|
|
3873
|
-
version: VERSION$
|
|
3873
|
+
version: VERSION$6,
|
|
3874
3874
|
private: [],
|
|
3875
3875
|
selections: [
|
|
3876
3876
|
{
|
|
@@ -3896,7 +3896,7 @@ const select$9 = function LearningPracticeRepresentationSelect() {
|
|
|
3896
3896
|
]
|
|
3897
3897
|
};
|
|
3898
3898
|
};
|
|
3899
|
-
function equals$
|
|
3899
|
+
function equals$6(existing, incoming) {
|
|
3900
3900
|
const existing_description = existing.description;
|
|
3901
3901
|
const incoming_description = incoming.description;
|
|
3902
3902
|
if (!(existing_description === incoming_description)) {
|
|
@@ -3924,46 +3924,46 @@ function equals$5(existing, incoming) {
|
|
|
3924
3924
|
}
|
|
3925
3925
|
return true;
|
|
3926
3926
|
}
|
|
3927
|
-
const ingest$
|
|
3927
|
+
const ingest$4 = function LearningPracticeRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
3928
3928
|
if (process.env.NODE_ENV !== 'production') {
|
|
3929
|
-
const validateError = validate$
|
|
3929
|
+
const validateError = validate$6(input);
|
|
3930
3930
|
if (validateError !== null) {
|
|
3931
3931
|
throw validateError;
|
|
3932
3932
|
}
|
|
3933
3933
|
}
|
|
3934
|
-
const key = keyBuilderFromType$
|
|
3935
|
-
const ttlToUse = TTL$
|
|
3936
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
3934
|
+
const key = keyBuilderFromType$4(luvio, input);
|
|
3935
|
+
const ttlToUse = TTL$4;
|
|
3936
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "LearningContentPlatform", VERSION$6, RepresentationType$4, equals$6);
|
|
3937
3937
|
return createLink(key);
|
|
3938
3938
|
};
|
|
3939
|
-
function getTypeCacheKeys$
|
|
3939
|
+
function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
|
|
3940
3940
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
3941
|
-
const rootKey = keyBuilderFromType$
|
|
3941
|
+
const rootKey = keyBuilderFromType$4(luvio, input);
|
|
3942
3942
|
rootKeySet.set(rootKey, {
|
|
3943
3943
|
namespace: keyPrefix,
|
|
3944
|
-
representationName: RepresentationType$
|
|
3944
|
+
representationName: RepresentationType$4,
|
|
3945
3945
|
mergeable: false
|
|
3946
3946
|
});
|
|
3947
3947
|
}
|
|
3948
3948
|
|
|
3949
|
-
function select$
|
|
3950
|
-
return select$
|
|
3949
|
+
function select$a(luvio, params) {
|
|
3950
|
+
return select$b();
|
|
3951
3951
|
}
|
|
3952
|
-
function keyBuilder$
|
|
3953
|
-
return keyBuilder$
|
|
3952
|
+
function keyBuilder$9(luvio, params) {
|
|
3953
|
+
return keyBuilder$a(luvio, {
|
|
3954
3954
|
learning_item_id: params.urlParams.learningItemId
|
|
3955
3955
|
});
|
|
3956
3956
|
}
|
|
3957
|
-
function getResponseCacheKeys$
|
|
3958
|
-
getTypeCacheKeys$
|
|
3957
|
+
function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
|
|
3958
|
+
getTypeCacheKeys$4(storeKeyMap, luvio, response);
|
|
3959
3959
|
}
|
|
3960
|
-
function ingestSuccess$
|
|
3960
|
+
function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
3961
3961
|
const { body } = response;
|
|
3962
|
-
const key = keyBuilder$
|
|
3963
|
-
luvio.storeIngest(key, ingest$
|
|
3962
|
+
const key = keyBuilder$9(luvio, resourceParams);
|
|
3963
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
3964
3964
|
const snapshot = luvio.storeLookup({
|
|
3965
3965
|
recordId: key,
|
|
3966
|
-
node: select$
|
|
3966
|
+
node: select$a(),
|
|
3967
3967
|
variables: {},
|
|
3968
3968
|
}, snapshotRefresh);
|
|
3969
3969
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3975,18 +3975,18 @@ function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
3975
3975
|
return snapshot;
|
|
3976
3976
|
}
|
|
3977
3977
|
function ingestError$2(luvio, params, error, snapshotRefresh) {
|
|
3978
|
-
const key = keyBuilder$
|
|
3978
|
+
const key = keyBuilder$9(luvio, params);
|
|
3979
3979
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
3980
3980
|
const storeMetadataParams = {
|
|
3981
|
-
ttl: TTL$
|
|
3981
|
+
ttl: TTL$4,
|
|
3982
3982
|
namespace: keyPrefix,
|
|
3983
|
-
version: VERSION$
|
|
3984
|
-
representationName: RepresentationType$
|
|
3983
|
+
version: VERSION$6,
|
|
3984
|
+
representationName: RepresentationType$4
|
|
3985
3985
|
};
|
|
3986
3986
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
3987
3987
|
return errorSnapshot;
|
|
3988
3988
|
}
|
|
3989
|
-
function createResourceRequest$
|
|
3989
|
+
function createResourceRequest$4(config) {
|
|
3990
3990
|
const headers = {};
|
|
3991
3991
|
return {
|
|
3992
3992
|
baseUri: '/services/data/v62.0',
|
|
@@ -4004,63 +4004,63 @@ function createResourceRequestFromRepresentation$2(representation) {
|
|
|
4004
4004
|
urlParams: {},
|
|
4005
4005
|
};
|
|
4006
4006
|
config.urlParams.learningItemId = representation.learningItemId;
|
|
4007
|
-
return createResourceRequest$
|
|
4007
|
+
return createResourceRequest$4(config);
|
|
4008
4008
|
}
|
|
4009
4009
|
|
|
4010
|
-
const adapterName$
|
|
4010
|
+
const adapterName$4 = 'getLearningPractice';
|
|
4011
4011
|
const getLearningPractice_ConfigPropertyMetadata = [
|
|
4012
4012
|
generateParamConfigMetadata('learningItemId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
4013
4013
|
];
|
|
4014
|
-
const getLearningPractice_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
4015
|
-
const createResourceParams$
|
|
4016
|
-
function keyBuilder$
|
|
4017
|
-
const resourceParams = createResourceParams$
|
|
4018
|
-
return keyBuilder$
|
|
4014
|
+
const getLearningPractice_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getLearningPractice_ConfigPropertyMetadata);
|
|
4015
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$d(getLearningPractice_ConfigPropertyMetadata);
|
|
4016
|
+
function keyBuilder$8(luvio, config) {
|
|
4017
|
+
const resourceParams = createResourceParams$4(config);
|
|
4018
|
+
return keyBuilder$9(luvio, resourceParams);
|
|
4019
4019
|
}
|
|
4020
|
-
function typeCheckConfig$
|
|
4020
|
+
function typeCheckConfig$4(untrustedConfig) {
|
|
4021
4021
|
const config = {};
|
|
4022
|
-
typeCheckConfig$
|
|
4022
|
+
typeCheckConfig$d(untrustedConfig, config, getLearningPractice_ConfigPropertyMetadata);
|
|
4023
4023
|
return config;
|
|
4024
4024
|
}
|
|
4025
|
-
function validateAdapterConfig$
|
|
4025
|
+
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
4026
4026
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
4027
4027
|
return null;
|
|
4028
4028
|
}
|
|
4029
4029
|
if (process.env.NODE_ENV !== 'production') {
|
|
4030
4030
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
4031
4031
|
}
|
|
4032
|
-
const config = typeCheckConfig$
|
|
4032
|
+
const config = typeCheckConfig$4(untrustedConfig);
|
|
4033
4033
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
4034
4034
|
return null;
|
|
4035
4035
|
}
|
|
4036
4036
|
return config;
|
|
4037
4037
|
}
|
|
4038
4038
|
function adapterFragment$2(luvio, config) {
|
|
4039
|
-
createResourceParams$
|
|
4040
|
-
return select$
|
|
4039
|
+
createResourceParams$4(config);
|
|
4040
|
+
return select$a();
|
|
4041
4041
|
}
|
|
4042
4042
|
function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
|
|
4043
|
-
const snapshot = ingestSuccess$
|
|
4043
|
+
const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
|
|
4044
4044
|
config,
|
|
4045
|
-
resolve: () => buildNetworkSnapshot$
|
|
4045
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
4046
4046
|
});
|
|
4047
4047
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4048
4048
|
}
|
|
4049
4049
|
function onFetchResponseError$2(luvio, config, resourceParams, response) {
|
|
4050
4050
|
const snapshot = ingestError$2(luvio, resourceParams, response, {
|
|
4051
4051
|
config,
|
|
4052
|
-
resolve: () => buildNetworkSnapshot$
|
|
4052
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
4053
4053
|
});
|
|
4054
4054
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4055
4055
|
}
|
|
4056
|
-
function buildNetworkSnapshot$
|
|
4057
|
-
const resourceParams = createResourceParams$
|
|
4058
|
-
const request = createResourceRequest$
|
|
4056
|
+
function buildNetworkSnapshot$4(luvio, config, options) {
|
|
4057
|
+
const resourceParams = createResourceParams$4(config);
|
|
4058
|
+
const request = createResourceRequest$4(resourceParams);
|
|
4059
4059
|
return luvio.dispatchResourceRequest(request, options)
|
|
4060
4060
|
.then((response) => {
|
|
4061
4061
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
|
|
4062
4062
|
const cache = new StoreKeyMap();
|
|
4063
|
-
getResponseCacheKeys$
|
|
4063
|
+
getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
|
|
4064
4064
|
return cache;
|
|
4065
4065
|
});
|
|
4066
4066
|
}, (response) => {
|
|
@@ -4068,23 +4068,23 @@ function buildNetworkSnapshot$3(luvio, config, options) {
|
|
|
4068
4068
|
});
|
|
4069
4069
|
}
|
|
4070
4070
|
function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
|
|
4071
|
-
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
4071
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, undefined, false);
|
|
4072
4072
|
}
|
|
4073
4073
|
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
4074
4074
|
const { luvio, config } = context;
|
|
4075
4075
|
const selector = {
|
|
4076
|
-
recordId: keyBuilder$
|
|
4076
|
+
recordId: keyBuilder$8(luvio, config),
|
|
4077
4077
|
node: adapterFragment$2(luvio, config),
|
|
4078
4078
|
variables: {},
|
|
4079
4079
|
};
|
|
4080
4080
|
const cacheSnapshot = storeLookup(selector, {
|
|
4081
4081
|
config,
|
|
4082
|
-
resolve: () => buildNetworkSnapshot$
|
|
4082
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
4083
4083
|
});
|
|
4084
4084
|
return cacheSnapshot;
|
|
4085
4085
|
}
|
|
4086
4086
|
const getLearningPracticeAdapterFactory = (luvio) => function LearningContentPlatform__getLearningPractice(untrustedConfig, requestContext) {
|
|
4087
|
-
const config = validateAdapterConfig$
|
|
4087
|
+
const config = validateAdapterConfig$4(untrustedConfig, getLearningPractice_ConfigPropertyNames);
|
|
4088
4088
|
// Invalid or incomplete config
|
|
4089
4089
|
if (config === null) {
|
|
4090
4090
|
return null;
|
|
@@ -4094,7 +4094,7 @@ const getLearningPracticeAdapterFactory = (luvio) => function LearningContentPla
|
|
|
4094
4094
|
};
|
|
4095
4095
|
const notifyChangeFactory$2 = (luvio, options) => {
|
|
4096
4096
|
return function getLearningContentPlatformLearningPracticeByLearningItemIdNotifyChange(configs) {
|
|
4097
|
-
const keys = configs.map(c => keyBuilder$
|
|
4097
|
+
const keys = configs.map(c => keyBuilder$a(luvio, c));
|
|
4098
4098
|
luvio.getNotifyChangeStoreEntries(keys).then(entries => {
|
|
4099
4099
|
for (let i = 0, len = entries.length; i < len; i++) {
|
|
4100
4100
|
const { key, record: val } = entries[i];
|
|
@@ -4103,21 +4103,21 @@ const notifyChangeFactory$2 = (luvio, options) => {
|
|
|
4103
4103
|
.then((response) => {
|
|
4104
4104
|
return luvio.handleSuccessResponse(() => {
|
|
4105
4105
|
const { body } = response;
|
|
4106
|
-
luvio.storeIngest(key, ingest$
|
|
4106
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
4107
4107
|
return luvio.storeBroadcast();
|
|
4108
4108
|
}, () => {
|
|
4109
4109
|
const cache = new StoreKeyMap();
|
|
4110
|
-
getTypeCacheKeys$
|
|
4110
|
+
getTypeCacheKeys$4(cache, luvio, response.body);
|
|
4111
4111
|
return cache;
|
|
4112
4112
|
});
|
|
4113
4113
|
}, (error) => {
|
|
4114
4114
|
return luvio.handleErrorResponse(() => {
|
|
4115
4115
|
const errorSnapshot = luvio.errorSnapshot(error);
|
|
4116
4116
|
luvio.storeIngestError(key, errorSnapshot, {
|
|
4117
|
-
ttl: TTL$
|
|
4117
|
+
ttl: TTL$4,
|
|
4118
4118
|
namespace: keyPrefix,
|
|
4119
|
-
version: VERSION$
|
|
4120
|
-
representationName: RepresentationType$
|
|
4119
|
+
version: VERSION$6,
|
|
4120
|
+
representationName: RepresentationType$4
|
|
4121
4121
|
});
|
|
4122
4122
|
return luvio.storeBroadcast().then(() => errorSnapshot);
|
|
4123
4123
|
});
|
|
@@ -4127,8 +4127,8 @@ const notifyChangeFactory$2 = (luvio, options) => {
|
|
|
4127
4127
|
};
|
|
4128
4128
|
};
|
|
4129
4129
|
|
|
4130
|
-
const VERSION$
|
|
4131
|
-
function validate$
|
|
4130
|
+
const VERSION$5 = "19c9bcb401bf39a211caeff8b3cde304";
|
|
4131
|
+
function validate$5(obj, path = 'TrailheadModuleUnitRepresentation') {
|
|
4132
4132
|
const v_error = (() => {
|
|
4133
4133
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
4134
4134
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -4213,10 +4213,10 @@ function validate$4(obj, path = 'TrailheadModuleUnitRepresentation') {
|
|
|
4213
4213
|
})();
|
|
4214
4214
|
return v_error === undefined ? null : v_error;
|
|
4215
4215
|
}
|
|
4216
|
-
const select$
|
|
4216
|
+
const select$9 = function TrailheadModuleUnitRepresentationSelect() {
|
|
4217
4217
|
return {
|
|
4218
4218
|
kind: 'Fragment',
|
|
4219
|
-
version: VERSION$
|
|
4219
|
+
version: VERSION$5,
|
|
4220
4220
|
private: [],
|
|
4221
4221
|
selections: [
|
|
4222
4222
|
{
|
|
@@ -4250,7 +4250,7 @@ const select$7 = function TrailheadModuleUnitRepresentationSelect() {
|
|
|
4250
4250
|
]
|
|
4251
4251
|
};
|
|
4252
4252
|
};
|
|
4253
|
-
function equals$
|
|
4253
|
+
function equals$5(existing, incoming) {
|
|
4254
4254
|
const existing_durationCount = existing.durationCount;
|
|
4255
4255
|
const incoming_durationCount = incoming.durationCount;
|
|
4256
4256
|
if (!(existing_durationCount === incoming_durationCount)) {
|
|
@@ -4289,9 +4289,9 @@ function equals$4(existing, incoming) {
|
|
|
4289
4289
|
return true;
|
|
4290
4290
|
}
|
|
4291
4291
|
|
|
4292
|
-
const TTL$
|
|
4293
|
-
const VERSION$
|
|
4294
|
-
function validate$
|
|
4292
|
+
const TTL$3 = 21600000;
|
|
4293
|
+
const VERSION$4 = "9bed4edb4c9f077a2f7ce902f94afa38";
|
|
4294
|
+
function validate$4(obj, path = 'TrailheadModuleRepresentation') {
|
|
4295
4295
|
const v_error = (() => {
|
|
4296
4296
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
4297
4297
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -4464,7 +4464,7 @@ function validate$3(obj, path = 'TrailheadModuleRepresentation') {
|
|
|
4464
4464
|
for (let i = 0; i < obj_moduleUnits.length; i++) {
|
|
4465
4465
|
const obj_moduleUnits_item = obj_moduleUnits[i];
|
|
4466
4466
|
const path_moduleUnits_item = path_moduleUnits + '[' + i + ']';
|
|
4467
|
-
const referencepath_moduleUnits_itemValidationError = validate$
|
|
4467
|
+
const referencepath_moduleUnits_itemValidationError = validate$5(obj_moduleUnits_item, path_moduleUnits_item);
|
|
4468
4468
|
if (referencepath_moduleUnits_itemValidationError !== null) {
|
|
4469
4469
|
let message = 'Object doesn\'t match TrailheadModuleUnitRepresentation (at "' + path_moduleUnits_item + '")\n';
|
|
4470
4470
|
message += referencepath_moduleUnits_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -4489,24 +4489,24 @@ function validate$3(obj, path = 'TrailheadModuleRepresentation') {
|
|
|
4489
4489
|
})();
|
|
4490
4490
|
return v_error === undefined ? null : v_error;
|
|
4491
4491
|
}
|
|
4492
|
-
const RepresentationType$
|
|
4493
|
-
function keyBuilder$
|
|
4494
|
-
return keyPrefix + '::' + RepresentationType$
|
|
4492
|
+
const RepresentationType$3 = 'TrailheadModuleRepresentation';
|
|
4493
|
+
function keyBuilder$7(luvio, config) {
|
|
4494
|
+
return keyPrefix + '::' + RepresentationType$3 + ':' + config.relatedId;
|
|
4495
4495
|
}
|
|
4496
|
-
function keyBuilderFromType$
|
|
4496
|
+
function keyBuilderFromType$3(luvio, object) {
|
|
4497
4497
|
const keyParams = {
|
|
4498
4498
|
relatedId: object.relatedId
|
|
4499
4499
|
};
|
|
4500
|
-
return keyBuilder$
|
|
4500
|
+
return keyBuilder$7(luvio, keyParams);
|
|
4501
4501
|
}
|
|
4502
|
-
function normalize$
|
|
4502
|
+
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
4503
4503
|
return input;
|
|
4504
4504
|
}
|
|
4505
|
-
const select$
|
|
4506
|
-
const { selections: TrailheadModuleUnitRepresentation__selections, opaque: TrailheadModuleUnitRepresentation__opaque, } = select$
|
|
4505
|
+
const select$8 = function TrailheadModuleRepresentationSelect() {
|
|
4506
|
+
const { selections: TrailheadModuleUnitRepresentation__selections, opaque: TrailheadModuleUnitRepresentation__opaque, } = select$9();
|
|
4507
4507
|
return {
|
|
4508
4508
|
kind: 'Fragment',
|
|
4509
|
-
version: VERSION$
|
|
4509
|
+
version: VERSION$4,
|
|
4510
4510
|
private: [],
|
|
4511
4511
|
selections: [
|
|
4512
4512
|
{
|
|
@@ -4574,7 +4574,7 @@ const select$6 = function TrailheadModuleRepresentationSelect() {
|
|
|
4574
4574
|
]
|
|
4575
4575
|
};
|
|
4576
4576
|
};
|
|
4577
|
-
function equals$
|
|
4577
|
+
function equals$4(existing, incoming) {
|
|
4578
4578
|
const existing_isCompleted = existing.isCompleted;
|
|
4579
4579
|
const incoming_isCompleted = incoming.isCompleted;
|
|
4580
4580
|
if (!(existing_isCompleted === incoming_isCompleted)) {
|
|
@@ -4648,7 +4648,7 @@ function equals$3(existing, incoming) {
|
|
|
4648
4648
|
const existing_moduleUnits = existing.moduleUnits;
|
|
4649
4649
|
const incoming_moduleUnits = incoming.moduleUnits;
|
|
4650
4650
|
const equals_moduleUnits_items = equalsArray(existing_moduleUnits, incoming_moduleUnits, (existing_moduleUnits_item, incoming_moduleUnits_item) => {
|
|
4651
|
-
if (!(equals$
|
|
4651
|
+
if (!(equals$5(existing_moduleUnits_item, incoming_moduleUnits_item))) {
|
|
4652
4652
|
return false;
|
|
4653
4653
|
}
|
|
4654
4654
|
});
|
|
@@ -4657,46 +4657,46 @@ function equals$3(existing, incoming) {
|
|
|
4657
4657
|
}
|
|
4658
4658
|
return true;
|
|
4659
4659
|
}
|
|
4660
|
-
const ingest$
|
|
4660
|
+
const ingest$3 = function TrailheadModuleRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
4661
4661
|
if (process.env.NODE_ENV !== 'production') {
|
|
4662
|
-
const validateError = validate$
|
|
4662
|
+
const validateError = validate$4(input);
|
|
4663
4663
|
if (validateError !== null) {
|
|
4664
4664
|
throw validateError;
|
|
4665
4665
|
}
|
|
4666
4666
|
}
|
|
4667
|
-
const key = keyBuilderFromType$
|
|
4668
|
-
const ttlToUse = TTL$
|
|
4669
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
4667
|
+
const key = keyBuilderFromType$3(luvio, input);
|
|
4668
|
+
const ttlToUse = TTL$3;
|
|
4669
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "LearningContentPlatform", VERSION$4, RepresentationType$3, equals$4);
|
|
4670
4670
|
return createLink(key);
|
|
4671
4671
|
};
|
|
4672
|
-
function getTypeCacheKeys$
|
|
4672
|
+
function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
4673
4673
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
4674
|
-
const rootKey = keyBuilderFromType$
|
|
4674
|
+
const rootKey = keyBuilderFromType$3(luvio, input);
|
|
4675
4675
|
rootKeySet.set(rootKey, {
|
|
4676
4676
|
namespace: keyPrefix,
|
|
4677
|
-
representationName: RepresentationType$
|
|
4677
|
+
representationName: RepresentationType$3,
|
|
4678
4678
|
mergeable: false
|
|
4679
4679
|
});
|
|
4680
4680
|
}
|
|
4681
4681
|
|
|
4682
|
-
function select$
|
|
4683
|
-
return select$
|
|
4682
|
+
function select$7(luvio, params) {
|
|
4683
|
+
return select$8();
|
|
4684
4684
|
}
|
|
4685
|
-
function keyBuilder$
|
|
4686
|
-
return keyBuilder$
|
|
4685
|
+
function keyBuilder$6(luvio, params) {
|
|
4686
|
+
return keyBuilder$7(luvio, {
|
|
4687
4687
|
relatedId: params.urlParams.moduleId
|
|
4688
4688
|
});
|
|
4689
4689
|
}
|
|
4690
|
-
function getResponseCacheKeys$
|
|
4691
|
-
getTypeCacheKeys$
|
|
4690
|
+
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
4691
|
+
getTypeCacheKeys$3(storeKeyMap, luvio, response);
|
|
4692
4692
|
}
|
|
4693
|
-
function ingestSuccess$
|
|
4693
|
+
function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
4694
4694
|
const { body } = response;
|
|
4695
|
-
const key = keyBuilder$
|
|
4696
|
-
luvio.storeIngest(key, ingest$
|
|
4695
|
+
const key = keyBuilder$6(luvio, resourceParams);
|
|
4696
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
4697
4697
|
const snapshot = luvio.storeLookup({
|
|
4698
4698
|
recordId: key,
|
|
4699
|
-
node: select$
|
|
4699
|
+
node: select$7(),
|
|
4700
4700
|
variables: {},
|
|
4701
4701
|
}, snapshotRefresh);
|
|
4702
4702
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -4708,18 +4708,18 @@ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
4708
4708
|
return snapshot;
|
|
4709
4709
|
}
|
|
4710
4710
|
function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
4711
|
-
const key = keyBuilder$
|
|
4711
|
+
const key = keyBuilder$6(luvio, params);
|
|
4712
4712
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
4713
4713
|
const storeMetadataParams = {
|
|
4714
|
-
ttl: TTL$
|
|
4714
|
+
ttl: TTL$3,
|
|
4715
4715
|
namespace: keyPrefix,
|
|
4716
|
-
version: VERSION$
|
|
4717
|
-
representationName: RepresentationType$
|
|
4716
|
+
version: VERSION$4,
|
|
4717
|
+
representationName: RepresentationType$3
|
|
4718
4718
|
};
|
|
4719
4719
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
4720
4720
|
return errorSnapshot;
|
|
4721
4721
|
}
|
|
4722
|
-
function createResourceRequest$
|
|
4722
|
+
function createResourceRequest$3(config) {
|
|
4723
4723
|
const headers = {};
|
|
4724
4724
|
return {
|
|
4725
4725
|
baseUri: '/services/data/v62.0',
|
|
@@ -4737,63 +4737,63 @@ function createResourceRequestFromRepresentation$1(representation) {
|
|
|
4737
4737
|
urlParams: {},
|
|
4738
4738
|
};
|
|
4739
4739
|
config.urlParams.moduleId = representation.relatedId;
|
|
4740
|
-
return createResourceRequest$
|
|
4740
|
+
return createResourceRequest$3(config);
|
|
4741
4741
|
}
|
|
4742
4742
|
|
|
4743
|
-
const adapterName$
|
|
4743
|
+
const adapterName$3 = 'getModule';
|
|
4744
4744
|
const getModule_ConfigPropertyMetadata = [
|
|
4745
4745
|
generateParamConfigMetadata('moduleId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
4746
4746
|
];
|
|
4747
|
-
const getModule_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
4748
|
-
const createResourceParams$
|
|
4749
|
-
function keyBuilder$
|
|
4750
|
-
const resourceParams = createResourceParams$
|
|
4751
|
-
return keyBuilder$
|
|
4747
|
+
const getModule_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getModule_ConfigPropertyMetadata);
|
|
4748
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$d(getModule_ConfigPropertyMetadata);
|
|
4749
|
+
function keyBuilder$5(luvio, config) {
|
|
4750
|
+
const resourceParams = createResourceParams$3(config);
|
|
4751
|
+
return keyBuilder$6(luvio, resourceParams);
|
|
4752
4752
|
}
|
|
4753
|
-
function typeCheckConfig$
|
|
4753
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
4754
4754
|
const config = {};
|
|
4755
|
-
typeCheckConfig$
|
|
4755
|
+
typeCheckConfig$d(untrustedConfig, config, getModule_ConfigPropertyMetadata);
|
|
4756
4756
|
return config;
|
|
4757
4757
|
}
|
|
4758
|
-
function validateAdapterConfig$
|
|
4758
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
4759
4759
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
4760
4760
|
return null;
|
|
4761
4761
|
}
|
|
4762
4762
|
if (process.env.NODE_ENV !== 'production') {
|
|
4763
4763
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
4764
4764
|
}
|
|
4765
|
-
const config = typeCheckConfig$
|
|
4765
|
+
const config = typeCheckConfig$3(untrustedConfig);
|
|
4766
4766
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
4767
4767
|
return null;
|
|
4768
4768
|
}
|
|
4769
4769
|
return config;
|
|
4770
4770
|
}
|
|
4771
4771
|
function adapterFragment$1(luvio, config) {
|
|
4772
|
-
createResourceParams$
|
|
4773
|
-
return select$
|
|
4772
|
+
createResourceParams$3(config);
|
|
4773
|
+
return select$7();
|
|
4774
4774
|
}
|
|
4775
4775
|
function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
|
|
4776
|
-
const snapshot = ingestSuccess$
|
|
4776
|
+
const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
|
|
4777
4777
|
config,
|
|
4778
|
-
resolve: () => buildNetworkSnapshot$
|
|
4778
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
4779
4779
|
});
|
|
4780
4780
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4781
4781
|
}
|
|
4782
4782
|
function onFetchResponseError$1(luvio, config, resourceParams, response) {
|
|
4783
4783
|
const snapshot = ingestError$1(luvio, resourceParams, response, {
|
|
4784
4784
|
config,
|
|
4785
|
-
resolve: () => buildNetworkSnapshot$
|
|
4785
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
4786
4786
|
});
|
|
4787
4787
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4788
4788
|
}
|
|
4789
|
-
function buildNetworkSnapshot$
|
|
4790
|
-
const resourceParams = createResourceParams$
|
|
4791
|
-
const request = createResourceRequest$
|
|
4789
|
+
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
4790
|
+
const resourceParams = createResourceParams$3(config);
|
|
4791
|
+
const request = createResourceRequest$3(resourceParams);
|
|
4792
4792
|
return luvio.dispatchResourceRequest(request, options)
|
|
4793
4793
|
.then((response) => {
|
|
4794
4794
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
|
|
4795
4795
|
const cache = new StoreKeyMap();
|
|
4796
|
-
getResponseCacheKeys$
|
|
4796
|
+
getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
|
|
4797
4797
|
return cache;
|
|
4798
4798
|
});
|
|
4799
4799
|
}, (response) => {
|
|
@@ -4801,23 +4801,23 @@ function buildNetworkSnapshot$2(luvio, config, options) {
|
|
|
4801
4801
|
});
|
|
4802
4802
|
}
|
|
4803
4803
|
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
4804
|
-
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
4804
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
|
|
4805
4805
|
}
|
|
4806
4806
|
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
4807
4807
|
const { luvio, config } = context;
|
|
4808
4808
|
const selector = {
|
|
4809
|
-
recordId: keyBuilder$
|
|
4809
|
+
recordId: keyBuilder$5(luvio, config),
|
|
4810
4810
|
node: adapterFragment$1(luvio, config),
|
|
4811
4811
|
variables: {},
|
|
4812
4812
|
};
|
|
4813
4813
|
const cacheSnapshot = storeLookup(selector, {
|
|
4814
4814
|
config,
|
|
4815
|
-
resolve: () => buildNetworkSnapshot$
|
|
4815
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
4816
4816
|
});
|
|
4817
4817
|
return cacheSnapshot;
|
|
4818
4818
|
}
|
|
4819
4819
|
const getModuleAdapterFactory = (luvio) => function LearningContentPlatform__getModule(untrustedConfig, requestContext) {
|
|
4820
|
-
const config = validateAdapterConfig$
|
|
4820
|
+
const config = validateAdapterConfig$3(untrustedConfig, getModule_ConfigPropertyNames);
|
|
4821
4821
|
// Invalid or incomplete config
|
|
4822
4822
|
if (config === null) {
|
|
4823
4823
|
return null;
|
|
@@ -4827,7 +4827,7 @@ const getModuleAdapterFactory = (luvio) => function LearningContentPlatform__get
|
|
|
4827
4827
|
};
|
|
4828
4828
|
const notifyChangeFactory$1 = (luvio, options) => {
|
|
4829
4829
|
return function getLearningContentPlatformLearningModuleByModuleIdNotifyChange(configs) {
|
|
4830
|
-
const keys = configs.map(c => keyBuilder$
|
|
4830
|
+
const keys = configs.map(c => keyBuilder$7(luvio, c));
|
|
4831
4831
|
luvio.getNotifyChangeStoreEntries(keys).then(entries => {
|
|
4832
4832
|
for (let i = 0, len = entries.length; i < len; i++) {
|
|
4833
4833
|
const { key, record: val } = entries[i];
|
|
@@ -4836,21 +4836,21 @@ const notifyChangeFactory$1 = (luvio, options) => {
|
|
|
4836
4836
|
.then((response) => {
|
|
4837
4837
|
return luvio.handleSuccessResponse(() => {
|
|
4838
4838
|
const { body } = response;
|
|
4839
|
-
luvio.storeIngest(key, ingest$
|
|
4839
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
4840
4840
|
return luvio.storeBroadcast();
|
|
4841
4841
|
}, () => {
|
|
4842
4842
|
const cache = new StoreKeyMap();
|
|
4843
|
-
getTypeCacheKeys$
|
|
4843
|
+
getTypeCacheKeys$3(cache, luvio, response.body);
|
|
4844
4844
|
return cache;
|
|
4845
4845
|
});
|
|
4846
4846
|
}, (error) => {
|
|
4847
4847
|
return luvio.handleErrorResponse(() => {
|
|
4848
4848
|
const errorSnapshot = luvio.errorSnapshot(error);
|
|
4849
4849
|
luvio.storeIngestError(key, errorSnapshot, {
|
|
4850
|
-
ttl: TTL$
|
|
4850
|
+
ttl: TTL$3,
|
|
4851
4851
|
namespace: keyPrefix,
|
|
4852
|
-
version: VERSION$
|
|
4853
|
-
representationName: RepresentationType$
|
|
4852
|
+
version: VERSION$4,
|
|
4853
|
+
representationName: RepresentationType$3
|
|
4854
4854
|
});
|
|
4855
4855
|
return luvio.storeBroadcast().then(() => errorSnapshot);
|
|
4856
4856
|
});
|
|
@@ -4860,8 +4860,8 @@ const notifyChangeFactory$1 = (luvio, options) => {
|
|
|
4860
4860
|
};
|
|
4861
4861
|
};
|
|
4862
4862
|
|
|
4863
|
-
const VERSION$
|
|
4864
|
-
function validate$
|
|
4863
|
+
const VERSION$3 = "1027d7eb6300967ad6dd208f73cbf68e";
|
|
4864
|
+
function validate$3(obj, path = 'LearningTextLessonSectionRepresentation') {
|
|
4865
4865
|
const v_error = (() => {
|
|
4866
4866
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
4867
4867
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -4901,10 +4901,10 @@ function validate$2(obj, path = 'LearningTextLessonSectionRepresentation') {
|
|
|
4901
4901
|
})();
|
|
4902
4902
|
return v_error === undefined ? null : v_error;
|
|
4903
4903
|
}
|
|
4904
|
-
const select$
|
|
4904
|
+
const select$6 = function LearningTextLessonSectionRepresentationSelect() {
|
|
4905
4905
|
return {
|
|
4906
4906
|
kind: 'Fragment',
|
|
4907
|
-
version: VERSION$
|
|
4907
|
+
version: VERSION$3,
|
|
4908
4908
|
private: [],
|
|
4909
4909
|
selections: [
|
|
4910
4910
|
{
|
|
@@ -4922,7 +4922,7 @@ const select$4 = function LearningTextLessonSectionRepresentationSelect() {
|
|
|
4922
4922
|
]
|
|
4923
4923
|
};
|
|
4924
4924
|
};
|
|
4925
|
-
function equals$
|
|
4925
|
+
function equals$3(existing, incoming) {
|
|
4926
4926
|
const existing_content = existing.content;
|
|
4927
4927
|
const incoming_content = incoming.content;
|
|
4928
4928
|
if (!(existing_content === incoming_content)) {
|
|
@@ -4941,9 +4941,9 @@ function equals$2(existing, incoming) {
|
|
|
4941
4941
|
return true;
|
|
4942
4942
|
}
|
|
4943
4943
|
|
|
4944
|
-
const TTL$
|
|
4945
|
-
const VERSION$
|
|
4946
|
-
function validate$
|
|
4944
|
+
const TTL$2 = 60000;
|
|
4945
|
+
const VERSION$2 = "66ac3fbc8b5a61745a45ebd7944654e4";
|
|
4946
|
+
function validate$2(obj, path = 'LearningTextLessonRepresentation') {
|
|
4947
4947
|
const v_error = (() => {
|
|
4948
4948
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
4949
4949
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -4966,7 +4966,7 @@ function validate$1(obj, path = 'LearningTextLessonRepresentation') {
|
|
|
4966
4966
|
for (let i = 0; i < obj_sections.length; i++) {
|
|
4967
4967
|
const obj_sections_item = obj_sections[i];
|
|
4968
4968
|
const path_sections_item = path_sections + '[' + i + ']';
|
|
4969
|
-
const referencepath_sections_itemValidationError = validate$
|
|
4969
|
+
const referencepath_sections_itemValidationError = validate$3(obj_sections_item, path_sections_item);
|
|
4970
4970
|
if (referencepath_sections_itemValidationError !== null) {
|
|
4971
4971
|
let message = 'Object doesn\'t match LearningTextLessonSectionRepresentation (at "' + path_sections_item + '")\n';
|
|
4972
4972
|
message += referencepath_sections_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -4982,24 +4982,24 @@ function validate$1(obj, path = 'LearningTextLessonRepresentation') {
|
|
|
4982
4982
|
})();
|
|
4983
4983
|
return v_error === undefined ? null : v_error;
|
|
4984
4984
|
}
|
|
4985
|
-
const RepresentationType$
|
|
4986
|
-
function keyBuilder$
|
|
4987
|
-
return keyPrefix + '::' + RepresentationType$
|
|
4985
|
+
const RepresentationType$2 = 'LearningTextLessonRepresentation';
|
|
4986
|
+
function keyBuilder$4(luvio, config) {
|
|
4987
|
+
return keyPrefix + '::' + RepresentationType$2 + ':' + config.learning_item_id;
|
|
4988
4988
|
}
|
|
4989
|
-
function keyBuilderFromType$
|
|
4989
|
+
function keyBuilderFromType$2(luvio, object) {
|
|
4990
4990
|
const keyParams = {
|
|
4991
4991
|
learning_item_id: object.learningItemId
|
|
4992
4992
|
};
|
|
4993
|
-
return keyBuilder$
|
|
4993
|
+
return keyBuilder$4(luvio, keyParams);
|
|
4994
4994
|
}
|
|
4995
|
-
function normalize$
|
|
4995
|
+
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
4996
4996
|
return input;
|
|
4997
4997
|
}
|
|
4998
|
-
const select$
|
|
4999
|
-
const { selections: LearningTextLessonSectionRepresentation__selections, opaque: LearningTextLessonSectionRepresentation__opaque, } = select$
|
|
4998
|
+
const select$5 = function LearningTextLessonRepresentationSelect() {
|
|
4999
|
+
const { selections: LearningTextLessonSectionRepresentation__selections, opaque: LearningTextLessonSectionRepresentation__opaque, } = select$6();
|
|
5000
5000
|
return {
|
|
5001
5001
|
kind: 'Fragment',
|
|
5002
|
-
version: VERSION$
|
|
5002
|
+
version: VERSION$2,
|
|
5003
5003
|
private: [],
|
|
5004
5004
|
selections: [
|
|
5005
5005
|
{
|
|
@@ -5027,7 +5027,7 @@ const select$3 = function LearningTextLessonRepresentationSelect() {
|
|
|
5027
5027
|
]
|
|
5028
5028
|
};
|
|
5029
5029
|
};
|
|
5030
|
-
function equals$
|
|
5030
|
+
function equals$2(existing, incoming) {
|
|
5031
5031
|
const existing_description = existing.description;
|
|
5032
5032
|
const incoming_description = incoming.description;
|
|
5033
5033
|
if (!(existing_description === incoming_description)) {
|
|
@@ -5051,7 +5051,7 @@ function equals$1(existing, incoming) {
|
|
|
5051
5051
|
const existing_sections = existing.sections;
|
|
5052
5052
|
const incoming_sections = incoming.sections;
|
|
5053
5053
|
const equals_sections_items = equalsArray(existing_sections, incoming_sections, (existing_sections_item, incoming_sections_item) => {
|
|
5054
|
-
if (!(equals$
|
|
5054
|
+
if (!(equals$3(existing_sections_item, incoming_sections_item))) {
|
|
5055
5055
|
return false;
|
|
5056
5056
|
}
|
|
5057
5057
|
});
|
|
@@ -5060,24 +5060,24 @@ function equals$1(existing, incoming) {
|
|
|
5060
5060
|
}
|
|
5061
5061
|
return true;
|
|
5062
5062
|
}
|
|
5063
|
-
const ingest$
|
|
5063
|
+
const ingest$2 = function LearningTextLessonRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
5064
5064
|
if (process.env.NODE_ENV !== 'production') {
|
|
5065
|
-
const validateError = validate$
|
|
5065
|
+
const validateError = validate$2(input);
|
|
5066
5066
|
if (validateError !== null) {
|
|
5067
5067
|
throw validateError;
|
|
5068
5068
|
}
|
|
5069
5069
|
}
|
|
5070
|
-
const key = keyBuilderFromType$
|
|
5071
|
-
const ttlToUse = TTL$
|
|
5072
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
5070
|
+
const key = keyBuilderFromType$2(luvio, input);
|
|
5071
|
+
const ttlToUse = TTL$2;
|
|
5072
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "LearningContentPlatform", VERSION$2, RepresentationType$2, equals$2);
|
|
5073
5073
|
return createLink(key);
|
|
5074
5074
|
};
|
|
5075
|
-
function getTypeCacheKeys$
|
|
5075
|
+
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
5076
5076
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
5077
|
-
const rootKey = keyBuilderFromType$
|
|
5077
|
+
const rootKey = keyBuilderFromType$2(luvio, input);
|
|
5078
5078
|
rootKeySet.set(rootKey, {
|
|
5079
5079
|
namespace: keyPrefix,
|
|
5080
|
-
representationName: RepresentationType$
|
|
5080
|
+
representationName: RepresentationType$2,
|
|
5081
5081
|
mergeable: false
|
|
5082
5082
|
});
|
|
5083
5083
|
}
|
|
@@ -5091,29 +5091,29 @@ const notifyUpdateAvailableFactory = (luvio) => {
|
|
|
5091
5091
|
}
|
|
5092
5092
|
});
|
|
5093
5093
|
}
|
|
5094
|
-
const keys = configs.map(c => keyBuilder$
|
|
5094
|
+
const keys = configs.map(c => keyBuilder$4(luvio, c));
|
|
5095
5095
|
return luvio.notifyStoreUpdateAvailable(keys);
|
|
5096
5096
|
};
|
|
5097
5097
|
};
|
|
5098
5098
|
|
|
5099
|
-
function select$
|
|
5100
|
-
return select$
|
|
5099
|
+
function select$4(luvio, params) {
|
|
5100
|
+
return select$5();
|
|
5101
5101
|
}
|
|
5102
|
-
function keyBuilder$
|
|
5103
|
-
return keyBuilder$
|
|
5102
|
+
function keyBuilder$3(luvio, params) {
|
|
5103
|
+
return keyBuilder$4(luvio, {
|
|
5104
5104
|
learning_item_id: params.urlParams.learningItemId
|
|
5105
5105
|
});
|
|
5106
5106
|
}
|
|
5107
|
-
function getResponseCacheKeys$
|
|
5108
|
-
getTypeCacheKeys$
|
|
5107
|
+
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
5108
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response);
|
|
5109
5109
|
}
|
|
5110
|
-
function ingestSuccess$
|
|
5110
|
+
function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
5111
5111
|
const { body } = response;
|
|
5112
|
-
const key = keyBuilder$
|
|
5113
|
-
luvio.storeIngest(key, ingest$
|
|
5112
|
+
const key = keyBuilder$3(luvio, resourceParams);
|
|
5113
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
5114
5114
|
const snapshot = luvio.storeLookup({
|
|
5115
5115
|
recordId: key,
|
|
5116
|
-
node: select$
|
|
5116
|
+
node: select$4(),
|
|
5117
5117
|
variables: {},
|
|
5118
5118
|
}, snapshotRefresh);
|
|
5119
5119
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -5125,18 +5125,18 @@ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
5125
5125
|
return snapshot;
|
|
5126
5126
|
}
|
|
5127
5127
|
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
5128
|
-
const key = keyBuilder$
|
|
5128
|
+
const key = keyBuilder$3(luvio, params);
|
|
5129
5129
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
5130
5130
|
const storeMetadataParams = {
|
|
5131
|
-
ttl: TTL$
|
|
5131
|
+
ttl: TTL$2,
|
|
5132
5132
|
namespace: keyPrefix,
|
|
5133
|
-
version: VERSION$
|
|
5134
|
-
representationName: RepresentationType$
|
|
5133
|
+
version: VERSION$2,
|
|
5134
|
+
representationName: RepresentationType$2
|
|
5135
5135
|
};
|
|
5136
5136
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
5137
5137
|
return errorSnapshot;
|
|
5138
5138
|
}
|
|
5139
|
-
function createResourceRequest$
|
|
5139
|
+
function createResourceRequest$2(config) {
|
|
5140
5140
|
const headers = {};
|
|
5141
5141
|
return {
|
|
5142
5142
|
baseUri: '/services/data/v62.0',
|
|
@@ -5154,63 +5154,63 @@ function createResourceRequestFromRepresentation(representation) {
|
|
|
5154
5154
|
urlParams: {},
|
|
5155
5155
|
};
|
|
5156
5156
|
config.urlParams.learningItemId = representation.learningItemId;
|
|
5157
|
-
return createResourceRequest$
|
|
5157
|
+
return createResourceRequest$2(config);
|
|
5158
5158
|
}
|
|
5159
5159
|
|
|
5160
|
-
const adapterName$
|
|
5160
|
+
const adapterName$2 = 'getTextLesson';
|
|
5161
5161
|
const getTextLesson_ConfigPropertyMetadata = [
|
|
5162
5162
|
generateParamConfigMetadata('learningItemId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
5163
5163
|
];
|
|
5164
|
-
const getTextLesson_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
5165
|
-
const createResourceParams$
|
|
5166
|
-
function keyBuilder$
|
|
5167
|
-
const resourceParams = createResourceParams$
|
|
5168
|
-
return keyBuilder$
|
|
5164
|
+
const getTextLesson_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getTextLesson_ConfigPropertyMetadata);
|
|
5165
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$d(getTextLesson_ConfigPropertyMetadata);
|
|
5166
|
+
function keyBuilder$2(luvio, config) {
|
|
5167
|
+
const resourceParams = createResourceParams$2(config);
|
|
5168
|
+
return keyBuilder$3(luvio, resourceParams);
|
|
5169
5169
|
}
|
|
5170
|
-
function typeCheckConfig$
|
|
5170
|
+
function typeCheckConfig$2(untrustedConfig) {
|
|
5171
5171
|
const config = {};
|
|
5172
|
-
typeCheckConfig$
|
|
5172
|
+
typeCheckConfig$d(untrustedConfig, config, getTextLesson_ConfigPropertyMetadata);
|
|
5173
5173
|
return config;
|
|
5174
5174
|
}
|
|
5175
|
-
function validateAdapterConfig$
|
|
5175
|
+
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
5176
5176
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
5177
5177
|
return null;
|
|
5178
5178
|
}
|
|
5179
5179
|
if (process.env.NODE_ENV !== 'production') {
|
|
5180
5180
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
5181
5181
|
}
|
|
5182
|
-
const config = typeCheckConfig$
|
|
5182
|
+
const config = typeCheckConfig$2(untrustedConfig);
|
|
5183
5183
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
5184
5184
|
return null;
|
|
5185
5185
|
}
|
|
5186
5186
|
return config;
|
|
5187
5187
|
}
|
|
5188
5188
|
function adapterFragment(luvio, config) {
|
|
5189
|
-
createResourceParams$
|
|
5190
|
-
return select$
|
|
5189
|
+
createResourceParams$2(config);
|
|
5190
|
+
return select$4();
|
|
5191
5191
|
}
|
|
5192
5192
|
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
5193
|
-
const snapshot = ingestSuccess$
|
|
5193
|
+
const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
|
|
5194
5194
|
config,
|
|
5195
|
-
resolve: () => buildNetworkSnapshot$
|
|
5195
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
5196
5196
|
});
|
|
5197
5197
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
5198
5198
|
}
|
|
5199
5199
|
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
5200
5200
|
const snapshot = ingestError(luvio, resourceParams, response, {
|
|
5201
5201
|
config,
|
|
5202
|
-
resolve: () => buildNetworkSnapshot$
|
|
5202
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
5203
5203
|
});
|
|
5204
5204
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
5205
5205
|
}
|
|
5206
|
-
function buildNetworkSnapshot$
|
|
5207
|
-
const resourceParams = createResourceParams$
|
|
5208
|
-
const request = createResourceRequest$
|
|
5206
|
+
function buildNetworkSnapshot$2(luvio, config, options) {
|
|
5207
|
+
const resourceParams = createResourceParams$2(config);
|
|
5208
|
+
const request = createResourceRequest$2(resourceParams);
|
|
5209
5209
|
return luvio.dispatchResourceRequest(request, options)
|
|
5210
5210
|
.then((response) => {
|
|
5211
5211
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
5212
5212
|
const cache = new StoreKeyMap();
|
|
5213
|
-
getResponseCacheKeys$
|
|
5213
|
+
getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
|
|
5214
5214
|
return cache;
|
|
5215
5215
|
});
|
|
5216
5216
|
}, (response) => {
|
|
@@ -5218,23 +5218,23 @@ function buildNetworkSnapshot$1(luvio, config, options) {
|
|
|
5218
5218
|
});
|
|
5219
5219
|
}
|
|
5220
5220
|
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
5221
|
-
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
5221
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
|
|
5222
5222
|
}
|
|
5223
5223
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
5224
5224
|
const { luvio, config } = context;
|
|
5225
5225
|
const selector = {
|
|
5226
|
-
recordId: keyBuilder$
|
|
5226
|
+
recordId: keyBuilder$2(luvio, config),
|
|
5227
5227
|
node: adapterFragment(luvio, config),
|
|
5228
5228
|
variables: {},
|
|
5229
5229
|
};
|
|
5230
5230
|
const cacheSnapshot = storeLookup(selector, {
|
|
5231
5231
|
config,
|
|
5232
|
-
resolve: () => buildNetworkSnapshot$
|
|
5232
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
5233
5233
|
});
|
|
5234
5234
|
return cacheSnapshot;
|
|
5235
5235
|
}
|
|
5236
5236
|
const getTextLessonAdapterFactory = (luvio) => function LearningContentPlatform__getTextLesson(untrustedConfig, requestContext) {
|
|
5237
|
-
const config = validateAdapterConfig$
|
|
5237
|
+
const config = validateAdapterConfig$2(untrustedConfig, getTextLesson_ConfigPropertyNames);
|
|
5238
5238
|
// Invalid or incomplete config
|
|
5239
5239
|
if (config === null) {
|
|
5240
5240
|
return null;
|
|
@@ -5244,7 +5244,7 @@ const getTextLessonAdapterFactory = (luvio) => function LearningContentPlatform_
|
|
|
5244
5244
|
};
|
|
5245
5245
|
const notifyChangeFactory = (luvio, options) => {
|
|
5246
5246
|
return function getLearningContentPlatformLearningTextlessonByLearningItemIdNotifyChange(configs) {
|
|
5247
|
-
const keys = configs.map(c => keyBuilder$
|
|
5247
|
+
const keys = configs.map(c => keyBuilder$4(luvio, c));
|
|
5248
5248
|
luvio.getNotifyChangeStoreEntries(keys).then(entries => {
|
|
5249
5249
|
for (let i = 0, len = entries.length; i < len; i++) {
|
|
5250
5250
|
const { key, record: val } = entries[i];
|
|
@@ -5253,21 +5253,21 @@ const notifyChangeFactory = (luvio, options) => {
|
|
|
5253
5253
|
.then((response) => {
|
|
5254
5254
|
return luvio.handleSuccessResponse(() => {
|
|
5255
5255
|
const { body } = response;
|
|
5256
|
-
luvio.storeIngest(key, ingest$
|
|
5256
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
5257
5257
|
return luvio.storeBroadcast();
|
|
5258
5258
|
}, () => {
|
|
5259
5259
|
const cache = new StoreKeyMap();
|
|
5260
|
-
getTypeCacheKeys$
|
|
5260
|
+
getTypeCacheKeys$2(cache, luvio, response.body);
|
|
5261
5261
|
return cache;
|
|
5262
5262
|
});
|
|
5263
5263
|
}, (error) => {
|
|
5264
5264
|
return luvio.handleErrorResponse(() => {
|
|
5265
5265
|
const errorSnapshot = luvio.errorSnapshot(error);
|
|
5266
5266
|
luvio.storeIngestError(key, errorSnapshot, {
|
|
5267
|
-
ttl: TTL$
|
|
5267
|
+
ttl: TTL$2,
|
|
5268
5268
|
namespace: keyPrefix,
|
|
5269
|
-
version: VERSION$
|
|
5270
|
-
representationName: RepresentationType$
|
|
5269
|
+
version: VERSION$2,
|
|
5270
|
+
representationName: RepresentationType$2
|
|
5271
5271
|
});
|
|
5272
5272
|
return luvio.storeBroadcast().then(() => errorSnapshot);
|
|
5273
5273
|
});
|
|
@@ -5277,16 +5277,16 @@ const notifyChangeFactory = (luvio, options) => {
|
|
|
5277
5277
|
};
|
|
5278
5278
|
};
|
|
5279
5279
|
|
|
5280
|
-
const TTL = 15000;
|
|
5281
|
-
const VERSION = "d63f1d6a2345db84136a6263f8d81080";
|
|
5282
|
-
function validate(obj, path = 'CoachingAICallSubmissionOutputRepresentation') {
|
|
5280
|
+
const TTL$1 = 15000;
|
|
5281
|
+
const VERSION$1 = "d63f1d6a2345db84136a6263f8d81080";
|
|
5282
|
+
function validate$1(obj, path = 'CoachingAICallSubmissionOutputRepresentation') {
|
|
5283
5283
|
const v_error = (() => {
|
|
5284
5284
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
5285
5285
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
5286
5286
|
}
|
|
5287
5287
|
const obj_coachingAIFeedback = obj.coachingAIFeedback;
|
|
5288
5288
|
const path_coachingAIFeedback = path + '.coachingAIFeedback';
|
|
5289
|
-
const referencepath_coachingAIFeedbackValidationError = validate$
|
|
5289
|
+
const referencepath_coachingAIFeedbackValidationError = validate$g(obj_coachingAIFeedback, path_coachingAIFeedback);
|
|
5290
5290
|
if (referencepath_coachingAIFeedbackValidationError !== null) {
|
|
5291
5291
|
let message = 'Object doesn\'t match CoachingAIFeedbackRepresentation (at "' + path_coachingAIFeedback + '")\n';
|
|
5292
5292
|
message += referencepath_coachingAIFeedbackValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -5300,24 +5300,24 @@ function validate(obj, path = 'CoachingAICallSubmissionOutputRepresentation') {
|
|
|
5300
5300
|
})();
|
|
5301
5301
|
return v_error === undefined ? null : v_error;
|
|
5302
5302
|
}
|
|
5303
|
-
const RepresentationType = 'CoachingAICallSubmissionOutputRepresentation';
|
|
5304
|
-
function keyBuilder(luvio, config) {
|
|
5305
|
-
return keyPrefix + '::' + RepresentationType + ':' + config.generation_id;
|
|
5303
|
+
const RepresentationType$1 = 'CoachingAICallSubmissionOutputRepresentation';
|
|
5304
|
+
function keyBuilder$1(luvio, config) {
|
|
5305
|
+
return keyPrefix + '::' + RepresentationType$1 + ':' + config.generation_id;
|
|
5306
5306
|
}
|
|
5307
|
-
function keyBuilderFromType(luvio, object) {
|
|
5307
|
+
function keyBuilderFromType$1(luvio, object) {
|
|
5308
5308
|
const keyParams = {
|
|
5309
5309
|
generation_id: object.generationId
|
|
5310
5310
|
};
|
|
5311
|
-
return keyBuilder(luvio, keyParams);
|
|
5311
|
+
return keyBuilder$1(luvio, keyParams);
|
|
5312
5312
|
}
|
|
5313
|
-
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
5313
|
+
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
5314
5314
|
return input;
|
|
5315
5315
|
}
|
|
5316
|
-
const select$
|
|
5317
|
-
const { selections: CoachingAIFeedbackRepresentation__selections, opaque: CoachingAIFeedbackRepresentation__opaque, } = select$
|
|
5316
|
+
const select$3 = function CoachingAICallSubmissionOutputRepresentationSelect() {
|
|
5317
|
+
const { selections: CoachingAIFeedbackRepresentation__selections, opaque: CoachingAIFeedbackRepresentation__opaque, } = select$s();
|
|
5318
5318
|
return {
|
|
5319
5319
|
kind: 'Fragment',
|
|
5320
|
-
version: VERSION,
|
|
5320
|
+
version: VERSION$1,
|
|
5321
5321
|
private: [],
|
|
5322
5322
|
selections: [
|
|
5323
5323
|
{
|
|
@@ -5332,7 +5332,7 @@ const select$1 = function CoachingAICallSubmissionOutputRepresentationSelect() {
|
|
|
5332
5332
|
]
|
|
5333
5333
|
};
|
|
5334
5334
|
};
|
|
5335
|
-
function equals(existing, incoming) {
|
|
5335
|
+
function equals$1(existing, incoming) {
|
|
5336
5336
|
const existing_generationId = existing.generationId;
|
|
5337
5337
|
const incoming_generationId = incoming.generationId;
|
|
5338
5338
|
if (!(existing_generationId === incoming_generationId)) {
|
|
@@ -5340,12 +5340,188 @@ function equals(existing, incoming) {
|
|
|
5340
5340
|
}
|
|
5341
5341
|
const existing_coachingAIFeedback = existing.coachingAIFeedback;
|
|
5342
5342
|
const incoming_coachingAIFeedback = incoming.coachingAIFeedback;
|
|
5343
|
-
if (!(equals$
|
|
5343
|
+
if (!(equals$g(existing_coachingAIFeedback, incoming_coachingAIFeedback))) {
|
|
5344
5344
|
return false;
|
|
5345
5345
|
}
|
|
5346
5346
|
return true;
|
|
5347
5347
|
}
|
|
5348
|
-
const ingest = function CoachingAICallSubmissionOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
5348
|
+
const ingest$1 = function CoachingAICallSubmissionOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
5349
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
5350
|
+
const validateError = validate$1(input);
|
|
5351
|
+
if (validateError !== null) {
|
|
5352
|
+
throw validateError;
|
|
5353
|
+
}
|
|
5354
|
+
}
|
|
5355
|
+
const key = keyBuilderFromType$1(luvio, input);
|
|
5356
|
+
const ttlToUse = TTL$1;
|
|
5357
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "LearningContentPlatform", VERSION$1, RepresentationType$1, equals$1);
|
|
5358
|
+
return createLink(key);
|
|
5359
|
+
};
|
|
5360
|
+
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
5361
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
5362
|
+
const rootKey = keyBuilderFromType$1(luvio, input);
|
|
5363
|
+
rootKeySet.set(rootKey, {
|
|
5364
|
+
namespace: keyPrefix,
|
|
5365
|
+
representationName: RepresentationType$1,
|
|
5366
|
+
mergeable: false
|
|
5367
|
+
});
|
|
5368
|
+
}
|
|
5369
|
+
|
|
5370
|
+
function select$2(luvio, params) {
|
|
5371
|
+
return select$3();
|
|
5372
|
+
}
|
|
5373
|
+
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
5374
|
+
getTypeCacheKeys$1(storeKeyMap, luvio, response);
|
|
5375
|
+
}
|
|
5376
|
+
function ingestSuccess$1(luvio, resourceParams, response) {
|
|
5377
|
+
const { body } = response;
|
|
5378
|
+
const key = keyBuilderFromType$1(luvio, body);
|
|
5379
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
5380
|
+
const snapshot = luvio.storeLookup({
|
|
5381
|
+
recordId: key,
|
|
5382
|
+
node: select$2(),
|
|
5383
|
+
variables: {},
|
|
5384
|
+
});
|
|
5385
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
5386
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
5387
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
5388
|
+
}
|
|
5389
|
+
}
|
|
5390
|
+
deepFreeze(snapshot.data);
|
|
5391
|
+
return snapshot;
|
|
5392
|
+
}
|
|
5393
|
+
function createResourceRequest$1(config) {
|
|
5394
|
+
const headers = {};
|
|
5395
|
+
return {
|
|
5396
|
+
baseUri: '/services/data/v62.0',
|
|
5397
|
+
basePath: '/learning-content-platform/coaching/ai-feedback',
|
|
5398
|
+
method: 'post',
|
|
5399
|
+
body: config.body,
|
|
5400
|
+
urlParams: {},
|
|
5401
|
+
queryParams: {},
|
|
5402
|
+
headers,
|
|
5403
|
+
priority: 'normal',
|
|
5404
|
+
};
|
|
5405
|
+
}
|
|
5406
|
+
|
|
5407
|
+
const adapterName$1 = 'submitForCoachingAIFeedback';
|
|
5408
|
+
const submitForCoachingAIFeedback_ConfigPropertyMetadata = [
|
|
5409
|
+
generateParamConfigMetadata('callId', true, 2 /* Body */, 0 /* String */),
|
|
5410
|
+
generateParamConfigMetadata('learningItemId', true, 2 /* Body */, 0 /* String */),
|
|
5411
|
+
];
|
|
5412
|
+
const submitForCoachingAIFeedback_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, submitForCoachingAIFeedback_ConfigPropertyMetadata);
|
|
5413
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$d(submitForCoachingAIFeedback_ConfigPropertyMetadata);
|
|
5414
|
+
function typeCheckConfig$1(untrustedConfig) {
|
|
5415
|
+
const config = {};
|
|
5416
|
+
typeCheckConfig$d(untrustedConfig, config, submitForCoachingAIFeedback_ConfigPropertyMetadata);
|
|
5417
|
+
return config;
|
|
5418
|
+
}
|
|
5419
|
+
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
5420
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
5421
|
+
return null;
|
|
5422
|
+
}
|
|
5423
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
5424
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
5425
|
+
}
|
|
5426
|
+
const config = typeCheckConfig$1(untrustedConfig);
|
|
5427
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
5428
|
+
return null;
|
|
5429
|
+
}
|
|
5430
|
+
return config;
|
|
5431
|
+
}
|
|
5432
|
+
function buildNetworkSnapshot$1(luvio, config, options) {
|
|
5433
|
+
const resourceParams = createResourceParams$1(config);
|
|
5434
|
+
const request = createResourceRequest$1(resourceParams);
|
|
5435
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
5436
|
+
.then((response) => {
|
|
5437
|
+
return luvio.handleSuccessResponse(() => {
|
|
5438
|
+
const snapshot = ingestSuccess$1(luvio, resourceParams, response);
|
|
5439
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
5440
|
+
}, () => {
|
|
5441
|
+
const cache = new StoreKeyMap();
|
|
5442
|
+
getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
|
|
5443
|
+
return cache;
|
|
5444
|
+
});
|
|
5445
|
+
}, (response) => {
|
|
5446
|
+
deepFreeze(response);
|
|
5447
|
+
throw response;
|
|
5448
|
+
});
|
|
5449
|
+
}
|
|
5450
|
+
const submitForCoachingAIFeedbackAdapterFactory = (luvio) => {
|
|
5451
|
+
return function submitForCoachingAIFeedback(untrustedConfig) {
|
|
5452
|
+
const config = validateAdapterConfig$1(untrustedConfig, submitForCoachingAIFeedback_ConfigPropertyNames);
|
|
5453
|
+
// Invalid or incomplete config
|
|
5454
|
+
if (config === null) {
|
|
5455
|
+
throw new Error('Invalid config for "submitForCoachingAIFeedback"');
|
|
5456
|
+
}
|
|
5457
|
+
return buildNetworkSnapshot$1(luvio, config);
|
|
5458
|
+
};
|
|
5459
|
+
};
|
|
5460
|
+
|
|
5461
|
+
const TTL = 15000;
|
|
5462
|
+
const VERSION = "9d7483cd116cf47821138a231d5d5836";
|
|
5463
|
+
function validate(obj, path = 'CoachingAIFeedbackSummaryOutputRepresentation') {
|
|
5464
|
+
const v_error = (() => {
|
|
5465
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
5466
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
5467
|
+
}
|
|
5468
|
+
const obj_feedback = obj.feedback;
|
|
5469
|
+
const path_feedback = path + '.feedback';
|
|
5470
|
+
if (typeof obj_feedback !== 'string') {
|
|
5471
|
+
return new TypeError('Expected "string" but received "' + typeof obj_feedback + '" (at "' + path_feedback + '")');
|
|
5472
|
+
}
|
|
5473
|
+
const obj_generationId = obj.generationId;
|
|
5474
|
+
const path_generationId = path + '.generationId';
|
|
5475
|
+
if (typeof obj_generationId !== 'string') {
|
|
5476
|
+
return new TypeError('Expected "string" but received "' + typeof obj_generationId + '" (at "' + path_generationId + '")');
|
|
5477
|
+
}
|
|
5478
|
+
})();
|
|
5479
|
+
return v_error === undefined ? null : v_error;
|
|
5480
|
+
}
|
|
5481
|
+
const RepresentationType = 'CoachingAIFeedbackSummaryOutputRepresentation';
|
|
5482
|
+
function keyBuilder(luvio, config) {
|
|
5483
|
+
return keyPrefix + '::' + RepresentationType + ':' + config.generation_id;
|
|
5484
|
+
}
|
|
5485
|
+
function keyBuilderFromType(luvio, object) {
|
|
5486
|
+
const keyParams = {
|
|
5487
|
+
generation_id: object.generationId
|
|
5488
|
+
};
|
|
5489
|
+
return keyBuilder(luvio, keyParams);
|
|
5490
|
+
}
|
|
5491
|
+
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
5492
|
+
return input;
|
|
5493
|
+
}
|
|
5494
|
+
const select$1 = function CoachingAIFeedbackSummaryOutputRepresentationSelect() {
|
|
5495
|
+
return {
|
|
5496
|
+
kind: 'Fragment',
|
|
5497
|
+
version: VERSION,
|
|
5498
|
+
private: [],
|
|
5499
|
+
selections: [
|
|
5500
|
+
{
|
|
5501
|
+
name: 'feedback',
|
|
5502
|
+
kind: 'Scalar'
|
|
5503
|
+
},
|
|
5504
|
+
{
|
|
5505
|
+
name: 'generationId',
|
|
5506
|
+
kind: 'Scalar'
|
|
5507
|
+
}
|
|
5508
|
+
]
|
|
5509
|
+
};
|
|
5510
|
+
};
|
|
5511
|
+
function equals(existing, incoming) {
|
|
5512
|
+
const existing_feedback = existing.feedback;
|
|
5513
|
+
const incoming_feedback = incoming.feedback;
|
|
5514
|
+
if (!(existing_feedback === incoming_feedback)) {
|
|
5515
|
+
return false;
|
|
5516
|
+
}
|
|
5517
|
+
const existing_generationId = existing.generationId;
|
|
5518
|
+
const incoming_generationId = incoming.generationId;
|
|
5519
|
+
if (!(existing_generationId === incoming_generationId)) {
|
|
5520
|
+
return false;
|
|
5521
|
+
}
|
|
5522
|
+
return true;
|
|
5523
|
+
}
|
|
5524
|
+
const ingest = function CoachingAIFeedbackSummaryOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
5349
5525
|
if (process.env.NODE_ENV !== 'production') {
|
|
5350
5526
|
const validateError = validate(input);
|
|
5351
5527
|
if (validateError !== null) {
|
|
@@ -5394,7 +5570,7 @@ function createResourceRequest(config) {
|
|
|
5394
5570
|
const headers = {};
|
|
5395
5571
|
return {
|
|
5396
5572
|
baseUri: '/services/data/v62.0',
|
|
5397
|
-
basePath: '/learning-content-platform/coaching/ai-feedback',
|
|
5573
|
+
basePath: '/learning-content-platform/coaching/moments/ai-product-pitch-feedback',
|
|
5398
5574
|
method: 'post',
|
|
5399
5575
|
body: config.body,
|
|
5400
5576
|
urlParams: {},
|
|
@@ -5404,16 +5580,23 @@ function createResourceRequest(config) {
|
|
|
5404
5580
|
};
|
|
5405
5581
|
}
|
|
5406
5582
|
|
|
5407
|
-
const adapterName = '
|
|
5408
|
-
const
|
|
5583
|
+
const adapterName = 'submitForCoachingMomentsProductPitchFeedback';
|
|
5584
|
+
const submitForCoachingMomentsProductPitchFeedback_ConfigPropertyMetadata = [
|
|
5409
5585
|
generateParamConfigMetadata('callId', true, 2 /* Body */, 0 /* String */),
|
|
5410
|
-
generateParamConfigMetadata('
|
|
5586
|
+
generateParamConfigMetadata('productId', true, 2 /* Body */, 4 /* Unsupported */),
|
|
5411
5587
|
];
|
|
5412
|
-
const
|
|
5413
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
5588
|
+
const submitForCoachingMomentsProductPitchFeedback_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, submitForCoachingMomentsProductPitchFeedback_ConfigPropertyMetadata);
|
|
5589
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$d(submitForCoachingMomentsProductPitchFeedback_ConfigPropertyMetadata);
|
|
5414
5590
|
function typeCheckConfig(untrustedConfig) {
|
|
5415
5591
|
const config = {};
|
|
5416
|
-
typeCheckConfig$
|
|
5592
|
+
typeCheckConfig$d(untrustedConfig, config, submitForCoachingMomentsProductPitchFeedback_ConfigPropertyMetadata);
|
|
5593
|
+
const untrustedConfig_productId = untrustedConfig.productId;
|
|
5594
|
+
if (typeof untrustedConfig_productId === 'string') {
|
|
5595
|
+
config.productId = untrustedConfig_productId;
|
|
5596
|
+
}
|
|
5597
|
+
if (untrustedConfig_productId === null) {
|
|
5598
|
+
config.productId = untrustedConfig_productId;
|
|
5599
|
+
}
|
|
5417
5600
|
return config;
|
|
5418
5601
|
}
|
|
5419
5602
|
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
@@ -5447,12 +5630,12 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
5447
5630
|
throw response;
|
|
5448
5631
|
});
|
|
5449
5632
|
}
|
|
5450
|
-
const
|
|
5451
|
-
return function
|
|
5452
|
-
const config = validateAdapterConfig(untrustedConfig,
|
|
5633
|
+
const submitForCoachingMomentsProductPitchFeedbackAdapterFactory = (luvio) => {
|
|
5634
|
+
return function submitForCoachingMomentsProductPitchFeedback(untrustedConfig) {
|
|
5635
|
+
const config = validateAdapterConfig(untrustedConfig, submitForCoachingMomentsProductPitchFeedback_ConfigPropertyNames);
|
|
5453
5636
|
// Invalid or incomplete config
|
|
5454
5637
|
if (config === null) {
|
|
5455
|
-
throw new Error('Invalid config for "
|
|
5638
|
+
throw new Error('Invalid config for "submitForCoachingMomentsProductPitchFeedback"');
|
|
5456
5639
|
}
|
|
5457
5640
|
return buildNetworkSnapshot(luvio, config);
|
|
5458
5641
|
};
|
|
@@ -5473,6 +5656,7 @@ let getModuleNotifyChange;
|
|
|
5473
5656
|
let getTextLesson;
|
|
5474
5657
|
let getTextLessonNotifyChange;
|
|
5475
5658
|
let submitForCoachingAIFeedback;
|
|
5659
|
+
let submitForCoachingMomentsProductPitchFeedback;
|
|
5476
5660
|
// Imperative GET Adapters
|
|
5477
5661
|
let getCoachingAIFeedback_imperative;
|
|
5478
5662
|
let getFeaturedItemsRecommendedList_imperative;
|
|
@@ -5564,6 +5748,7 @@ function bindExportsTo(luvio) {
|
|
|
5564
5748
|
getTextLesson: createWireAdapterConstructor(luvio, getTextLesson_ldsAdapter, getTextLessonMetadata),
|
|
5565
5749
|
getTextLessonNotifyChange: createLDSAdapter(luvio, 'getTextLessonNotifyChange', notifyChangeFactory),
|
|
5566
5750
|
submitForCoachingAIFeedback: unwrapSnapshotData(submitForCoachingAIFeedbackAdapterFactory),
|
|
5751
|
+
submitForCoachingMomentsProductPitchFeedback: unwrapSnapshotData(submitForCoachingMomentsProductPitchFeedbackAdapterFactory),
|
|
5567
5752
|
// Imperative GET Adapters
|
|
5568
5753
|
getCoachingAIFeedback_imperative: createImperativeAdapter(luvio, getCoachingAIFeedback_ldsAdapter, getCoachingAIFeedbackMetadata),
|
|
5569
5754
|
getFeaturedItemsRecommendedList_imperative: createImperativeAdapter(luvio, getFeaturedItemsRecommendedList_ldsAdapter, getFeaturedItemsRecommendedListMetadata),
|
|
@@ -5598,6 +5783,7 @@ withDefaultLuvio((luvio) => {
|
|
|
5598
5783
|
getTextLesson,
|
|
5599
5784
|
getTextLessonNotifyChange,
|
|
5600
5785
|
submitForCoachingAIFeedback,
|
|
5786
|
+
submitForCoachingMomentsProductPitchFeedback,
|
|
5601
5787
|
getCoachingAIFeedback_imperative,
|
|
5602
5788
|
getFeaturedItemsRecommendedList_imperative,
|
|
5603
5789
|
getFeaturedItemsRelatedList_imperative,
|
|
@@ -5614,5 +5800,5 @@ withDefaultLuvio((luvio) => {
|
|
|
5614
5800
|
} = bindExportsTo(luvio));
|
|
5615
5801
|
});
|
|
5616
5802
|
|
|
5617
|
-
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 };
|
|
5618
|
-
// version: 1.
|
|
5803
|
+
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, submitForCoachingMomentsProductPitchFeedback };
|
|
5804
|
+
// version: 1.298.0-6f15dc1ec
|