@salesforce/lds-adapters-industries-education 1.152.4 → 1.154.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/industries-education.js +649 -109
- package/dist/es/es2018/types/src/generated/adapters/postCreateLearning.d.ts +15 -0
- package/dist/es/es2018/types/src/generated/adapters/postPublishLearningProgramPlan.d.ts +15 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +2 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +3 -1
- package/dist/es/es2018/types/src/generated/resources/postConnectEducationCampusSetupLearning.d.ts +13 -0
- package/dist/es/es2018/types/src/generated/resources/postConnectEducationCampusSetupLearningProgramPlanPublish.d.ts +13 -0
- package/dist/es/es2018/types/src/generated/types/AbstractAchievementMapping.d.ts +37 -0
- package/dist/es/es2018/types/src/generated/types/AdditionalFields.d.ts +32 -0
- package/dist/es/es2018/types/src/generated/types/ConcreteAchievementMapping.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/types/CreateLearningInputRepresentation.d.ts +40 -0
- package/dist/es/es2018/types/src/generated/types/CreateLearningInputRepresentationData.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/types/CreateLearningOutputRepresentation.d.ts +53 -0
- package/dist/es/es2018/types/src/generated/types/ElectiveCourseRequirement.d.ts +32 -0
- package/dist/es/es2018/types/src/generated/types/Learning.d.ts +58 -0
- package/dist/es/es2018/types/src/generated/types/LearningAchievement.d.ts +53 -0
- package/dist/es/es2018/types/src/generated/types/LearningCourse.d.ts +38 -0
- package/dist/es/es2018/types/src/generated/types/LearningProgram.d.ts +26 -0
- package/dist/es/es2018/types/src/generated/types/LearningProgramPlan.d.ts +62 -0
- package/dist/es/es2018/types/src/generated/types/LearningProgramPlanInputRepresentation.d.ts +32 -0
- package/dist/es/es2018/types/src/generated/types/LearningProgramPlanInputRepresentationData.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/types/LearningProgramPlanOutputRepresentation.d.ts +38 -0
- package/dist/es/es2018/types/src/generated/types/LearningProgramPlanRequirement.d.ts +44 -0
- package/dist/es/es2018/types/src/generated/types/RequiredCourseRequirement.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/types/Requirement.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/SharedAchievementMapping.d.ts +29 -0
- package/package.json +1 -1
- package/sfdc/index.js +849 -303
- package/src/raml/api.raml +422 -0
- package/src/raml/luvio.raml +18 -0
|
@@ -91,7 +91,7 @@ function createLink(ref) {
|
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
function validate$
|
|
94
|
+
function validate$v(obj, path = 'AvailableTimeSlotsInputRepresentation') {
|
|
95
95
|
const v_error = (() => {
|
|
96
96
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
97
97
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -155,8 +155,8 @@ function validate$q(obj, path = 'AvailableTimeSlotsInputRepresentation') {
|
|
|
155
155
|
return v_error === undefined ? null : v_error;
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
-
const VERSION$
|
|
159
|
-
function validate$
|
|
158
|
+
const VERSION$a = "cfd94fbef61f52ffe43428e23e7a68c8";
|
|
159
|
+
function validate$u(obj, path = 'TimeSlot') {
|
|
160
160
|
const v_error = (() => {
|
|
161
161
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
162
162
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -192,10 +192,10 @@ function validate$p(obj, path = 'TimeSlot') {
|
|
|
192
192
|
})();
|
|
193
193
|
return v_error === undefined ? null : v_error;
|
|
194
194
|
}
|
|
195
|
-
const select$
|
|
195
|
+
const select$h = function TimeSlotSelect() {
|
|
196
196
|
return {
|
|
197
197
|
kind: 'Fragment',
|
|
198
|
-
version: VERSION$
|
|
198
|
+
version: VERSION$a,
|
|
199
199
|
private: [],
|
|
200
200
|
selections: [
|
|
201
201
|
{
|
|
@@ -221,7 +221,7 @@ const select$d = function TimeSlotSelect() {
|
|
|
221
221
|
]
|
|
222
222
|
};
|
|
223
223
|
};
|
|
224
|
-
function equals$
|
|
224
|
+
function equals$a(existing, incoming) {
|
|
225
225
|
const existing_endTime = existing.endTime;
|
|
226
226
|
const incoming_endTime = incoming.endTime;
|
|
227
227
|
// if at least one of these optionals is defined
|
|
@@ -277,8 +277,8 @@ function equals$8(existing, incoming) {
|
|
|
277
277
|
return true;
|
|
278
278
|
}
|
|
279
279
|
|
|
280
|
-
const VERSION$
|
|
281
|
-
function validate$
|
|
280
|
+
const VERSION$9 = "9c2ef94b89ee532c50c8423528617441";
|
|
281
|
+
function validate$t(obj, path = 'AvailableTimeSlotsOuputRepresentation') {
|
|
282
282
|
const v_error = (() => {
|
|
283
283
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
284
284
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -291,7 +291,7 @@ function validate$o(obj, path = 'AvailableTimeSlotsOuputRepresentation') {
|
|
|
291
291
|
for (let i = 0; i < obj_timeSlots.length; i++) {
|
|
292
292
|
const obj_timeSlots_item = obj_timeSlots[i];
|
|
293
293
|
const path_timeSlots_item = path_timeSlots + '[' + i + ']';
|
|
294
|
-
const referencepath_timeSlots_itemValidationError = validate$
|
|
294
|
+
const referencepath_timeSlots_itemValidationError = validate$u(obj_timeSlots_item, path_timeSlots_item);
|
|
295
295
|
if (referencepath_timeSlots_itemValidationError !== null) {
|
|
296
296
|
let message = 'Object doesn\'t match TimeSlot (at "' + path_timeSlots_item + '")\n';
|
|
297
297
|
message += referencepath_timeSlots_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -301,15 +301,15 @@ function validate$o(obj, path = 'AvailableTimeSlotsOuputRepresentation') {
|
|
|
301
301
|
})();
|
|
302
302
|
return v_error === undefined ? null : v_error;
|
|
303
303
|
}
|
|
304
|
-
const RepresentationType$
|
|
305
|
-
function normalize$
|
|
304
|
+
const RepresentationType$6 = 'AvailableTimeSlotsOuputRepresentation';
|
|
305
|
+
function normalize$6(input, existing, path, luvio, store, timestamp) {
|
|
306
306
|
return input;
|
|
307
307
|
}
|
|
308
|
-
const select$
|
|
309
|
-
const { selections: TimeSlot__selections, opaque: TimeSlot__opaque, } = select$
|
|
308
|
+
const select$g = function AvailableTimeSlotsOuputRepresentationSelect() {
|
|
309
|
+
const { selections: TimeSlot__selections, opaque: TimeSlot__opaque, } = select$h();
|
|
310
310
|
return {
|
|
311
311
|
kind: 'Fragment',
|
|
312
|
-
version: VERSION$
|
|
312
|
+
version: VERSION$9,
|
|
313
313
|
private: [],
|
|
314
314
|
selections: [
|
|
315
315
|
{
|
|
@@ -321,11 +321,11 @@ const select$c = function AvailableTimeSlotsOuputRepresentationSelect() {
|
|
|
321
321
|
]
|
|
322
322
|
};
|
|
323
323
|
};
|
|
324
|
-
function equals$
|
|
324
|
+
function equals$9(existing, incoming) {
|
|
325
325
|
const existing_timeSlots = existing.timeSlots;
|
|
326
326
|
const incoming_timeSlots = incoming.timeSlots;
|
|
327
327
|
const equals_timeSlots_items = equalsArray(existing_timeSlots, incoming_timeSlots, (existing_timeSlots_item, incoming_timeSlots_item) => {
|
|
328
|
-
if (!(equals$
|
|
328
|
+
if (!(equals$a(existing_timeSlots_item, incoming_timeSlots_item))) {
|
|
329
329
|
return false;
|
|
330
330
|
}
|
|
331
331
|
});
|
|
@@ -334,9 +334,9 @@ function equals$7(existing, incoming) {
|
|
|
334
334
|
}
|
|
335
335
|
return true;
|
|
336
336
|
}
|
|
337
|
-
const ingest$
|
|
337
|
+
const ingest$6 = function AvailableTimeSlotsOuputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
338
338
|
if (process.env.NODE_ENV !== 'production') {
|
|
339
|
-
const validateError = validate$
|
|
339
|
+
const validateError = validate$t(input);
|
|
340
340
|
if (validateError !== null) {
|
|
341
341
|
throw validateError;
|
|
342
342
|
}
|
|
@@ -344,54 +344,54 @@ const ingest$4 = function AvailableTimeSlotsOuputRepresentationIngest(input, pat
|
|
|
344
344
|
const key = path.fullPath;
|
|
345
345
|
const existingRecord = store.readEntry(key);
|
|
346
346
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 360000;
|
|
347
|
-
let incomingRecord = normalize$
|
|
347
|
+
let incomingRecord = normalize$6(input, store.readEntry(key), {
|
|
348
348
|
fullPath: key,
|
|
349
349
|
parent: path.parent,
|
|
350
350
|
propertyName: path.propertyName,
|
|
351
351
|
ttl: ttlToUse
|
|
352
352
|
});
|
|
353
|
-
if (existingRecord === undefined || equals$
|
|
353
|
+
if (existingRecord === undefined || equals$9(existingRecord, incomingRecord) === false) {
|
|
354
354
|
luvio.storePublish(key, incomingRecord);
|
|
355
355
|
}
|
|
356
356
|
if (ttlToUse !== undefined) {
|
|
357
357
|
const storeMetadataParams = {
|
|
358
358
|
ttl: ttlToUse,
|
|
359
359
|
namespace: "education",
|
|
360
|
-
version: VERSION$
|
|
361
|
-
representationName: RepresentationType$
|
|
360
|
+
version: VERSION$9,
|
|
361
|
+
representationName: RepresentationType$6,
|
|
362
362
|
};
|
|
363
363
|
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
364
364
|
}
|
|
365
365
|
return createLink(key);
|
|
366
366
|
};
|
|
367
|
-
function getTypeCacheKeys$
|
|
367
|
+
function getTypeCacheKeys$6(luvio, input, fullPathFactory) {
|
|
368
368
|
const rootKeySet = new StoreKeyMap();
|
|
369
369
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
370
370
|
const rootKey = fullPathFactory();
|
|
371
371
|
rootKeySet.set(rootKey, {
|
|
372
372
|
namespace: keyPrefix,
|
|
373
|
-
representationName: RepresentationType$
|
|
373
|
+
representationName: RepresentationType$6,
|
|
374
374
|
mergeable: false
|
|
375
375
|
});
|
|
376
376
|
return rootKeySet;
|
|
377
377
|
}
|
|
378
378
|
|
|
379
|
-
function select$
|
|
380
|
-
return select$
|
|
379
|
+
function select$f(luvio, params) {
|
|
380
|
+
return select$g();
|
|
381
381
|
}
|
|
382
|
-
function keyBuilder$
|
|
382
|
+
function keyBuilder$a(luvio, params) {
|
|
383
383
|
return keyPrefix + '::AvailableTimeSlotsOuputRepresentation:(' + (params.body.availableTimeSlotsInput.endTime === undefined ? 'availableTimeSlotsInput.endTime' : 'availableTimeSlotsInput.endTime:' + params.body.availableTimeSlotsInput.endTime) + '::' + 'availableTimeSlotsInput.engagementChannelTypeIds:' + params.body.availableTimeSlotsInput.engagementChannelTypeIds + '::' + 'availableTimeSlotsInput.serviceResourceIds:' + params.body.availableTimeSlotsInput.serviceResourceIds + '::' + 'availableTimeSlotsInput.serviceTerritoryIds:' + params.body.availableTimeSlotsInput.serviceTerritoryIds + '::' + (params.body.availableTimeSlotsInput.startTime === undefined ? 'availableTimeSlotsInput.startTime' : 'availableTimeSlotsInput.startTime:' + params.body.availableTimeSlotsInput.startTime) + '::' + 'availableTimeSlotsInput.workTypeGroupId:' + params.body.availableTimeSlotsInput.workTypeGroupId + ')';
|
|
384
384
|
}
|
|
385
|
-
function getResponseCacheKeys$
|
|
386
|
-
return getTypeCacheKeys$
|
|
385
|
+
function getResponseCacheKeys$6(luvio, resourceParams, response) {
|
|
386
|
+
return getTypeCacheKeys$6(luvio, response, () => keyBuilder$a(luvio, resourceParams));
|
|
387
387
|
}
|
|
388
|
-
function ingestSuccess$
|
|
388
|
+
function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
|
|
389
389
|
const { body } = response;
|
|
390
|
-
const key = keyBuilder$
|
|
391
|
-
luvio.storeIngest(key, ingest$
|
|
390
|
+
const key = keyBuilder$a(luvio, resourceParams);
|
|
391
|
+
luvio.storeIngest(key, ingest$6, body);
|
|
392
392
|
const snapshot = luvio.storeLookup({
|
|
393
393
|
recordId: key,
|
|
394
|
-
node: select$
|
|
394
|
+
node: select$f(),
|
|
395
395
|
variables: {},
|
|
396
396
|
}, snapshotRefresh);
|
|
397
397
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -403,12 +403,12 @@ function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
403
403
|
return snapshot;
|
|
404
404
|
}
|
|
405
405
|
function ingestError$3(luvio, params, error, snapshotRefresh) {
|
|
406
|
-
const key = keyBuilder$
|
|
406
|
+
const key = keyBuilder$a(luvio, params);
|
|
407
407
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
408
408
|
luvio.storeIngestError(key, errorSnapshot);
|
|
409
409
|
return errorSnapshot;
|
|
410
410
|
}
|
|
411
|
-
function createResourceRequest$
|
|
411
|
+
function createResourceRequest$6(config) {
|
|
412
412
|
const headers = {};
|
|
413
413
|
return {
|
|
414
414
|
baseUri: '/services/data/v59.0',
|
|
@@ -429,7 +429,7 @@ const getAvailableTimeSlots_ConfigPropertyNames = {
|
|
|
429
429
|
optional: []
|
|
430
430
|
}
|
|
431
431
|
};
|
|
432
|
-
function createResourceParams$
|
|
432
|
+
function createResourceParams$6(config) {
|
|
433
433
|
const resourceParams = {
|
|
434
434
|
body: {
|
|
435
435
|
availableTimeSlotsInput: config.availableTimeSlotsInput
|
|
@@ -437,56 +437,56 @@ function createResourceParams$4(config) {
|
|
|
437
437
|
};
|
|
438
438
|
return resourceParams;
|
|
439
439
|
}
|
|
440
|
-
function keyBuilder$
|
|
441
|
-
const resourceParams = createResourceParams$
|
|
442
|
-
return keyBuilder$
|
|
440
|
+
function keyBuilder$9(luvio, config) {
|
|
441
|
+
const resourceParams = createResourceParams$6(config);
|
|
442
|
+
return keyBuilder$a(luvio, resourceParams);
|
|
443
443
|
}
|
|
444
|
-
function typeCheckConfig$
|
|
444
|
+
function typeCheckConfig$6(untrustedConfig) {
|
|
445
445
|
const config = {};
|
|
446
446
|
const untrustedConfig_availableTimeSlotsInput = untrustedConfig.availableTimeSlotsInput;
|
|
447
|
-
const referenceAvailableTimeSlotsInputRepresentationValidationError = validate$
|
|
447
|
+
const referenceAvailableTimeSlotsInputRepresentationValidationError = validate$v(untrustedConfig_availableTimeSlotsInput);
|
|
448
448
|
if (referenceAvailableTimeSlotsInputRepresentationValidationError === null) {
|
|
449
449
|
config.availableTimeSlotsInput = untrustedConfig_availableTimeSlotsInput;
|
|
450
450
|
}
|
|
451
451
|
return config;
|
|
452
452
|
}
|
|
453
|
-
function validateAdapterConfig$
|
|
453
|
+
function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
|
|
454
454
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
455
455
|
return null;
|
|
456
456
|
}
|
|
457
457
|
if (process.env.NODE_ENV !== 'production') {
|
|
458
458
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
459
459
|
}
|
|
460
|
-
const config = typeCheckConfig$
|
|
460
|
+
const config = typeCheckConfig$6(untrustedConfig);
|
|
461
461
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
462
462
|
return null;
|
|
463
463
|
}
|
|
464
464
|
return config;
|
|
465
465
|
}
|
|
466
466
|
function adapterFragment$3(luvio, config) {
|
|
467
|
-
createResourceParams$
|
|
468
|
-
return select$
|
|
467
|
+
createResourceParams$6(config);
|
|
468
|
+
return select$f();
|
|
469
469
|
}
|
|
470
470
|
function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
|
|
471
|
-
const snapshot = ingestSuccess$
|
|
471
|
+
const snapshot = ingestSuccess$6(luvio, resourceParams, response, {
|
|
472
472
|
config,
|
|
473
|
-
resolve: () => buildNetworkSnapshot$
|
|
473
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
474
474
|
});
|
|
475
475
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
476
476
|
}
|
|
477
477
|
function onFetchResponseError$3(luvio, config, resourceParams, response) {
|
|
478
478
|
const snapshot = ingestError$3(luvio, resourceParams, response, {
|
|
479
479
|
config,
|
|
480
|
-
resolve: () => buildNetworkSnapshot$
|
|
480
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
481
481
|
});
|
|
482
482
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
483
483
|
}
|
|
484
|
-
function buildNetworkSnapshot$
|
|
485
|
-
const resourceParams = createResourceParams$
|
|
486
|
-
const request = createResourceRequest$
|
|
484
|
+
function buildNetworkSnapshot$6(luvio, config, options) {
|
|
485
|
+
const resourceParams = createResourceParams$6(config);
|
|
486
|
+
const request = createResourceRequest$6(resourceParams);
|
|
487
487
|
return luvio.dispatchResourceRequest(request, options)
|
|
488
488
|
.then((response) => {
|
|
489
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => getResponseCacheKeys$
|
|
489
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => getResponseCacheKeys$6(luvio, resourceParams, response.body));
|
|
490
490
|
}, (response) => {
|
|
491
491
|
return luvio.handleErrorResponse(() => onFetchResponseError$3(luvio, config, resourceParams, response));
|
|
492
492
|
});
|
|
@@ -506,23 +506,23 @@ function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext
|
|
|
506
506
|
priority: networkPriority
|
|
507
507
|
};
|
|
508
508
|
}
|
|
509
|
-
return buildNetworkSnapshot$
|
|
509
|
+
return buildNetworkSnapshot$6(luvio, config, dispatchOptions);
|
|
510
510
|
}
|
|
511
511
|
function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
|
|
512
512
|
const { luvio, config } = context;
|
|
513
513
|
const selector = {
|
|
514
|
-
recordId: keyBuilder$
|
|
514
|
+
recordId: keyBuilder$9(luvio, config),
|
|
515
515
|
node: adapterFragment$3(luvio, config),
|
|
516
516
|
variables: {},
|
|
517
517
|
};
|
|
518
518
|
const cacheSnapshot = storeLookup(selector, {
|
|
519
519
|
config,
|
|
520
|
-
resolve: () => buildNetworkSnapshot$
|
|
520
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
521
521
|
});
|
|
522
522
|
return cacheSnapshot;
|
|
523
523
|
}
|
|
524
524
|
const getAvailableTimeSlotsAdapterFactory = (luvio) => function education__getAvailableTimeSlots(untrustedConfig, requestContext) {
|
|
525
|
-
const config = validateAdapterConfig$
|
|
525
|
+
const config = validateAdapterConfig$6(untrustedConfig, getAvailableTimeSlots_ConfigPropertyNames);
|
|
526
526
|
// Invalid or incomplete config
|
|
527
527
|
if (config === null) {
|
|
528
528
|
return null;
|
|
@@ -531,8 +531,8 @@ const getAvailableTimeSlotsAdapterFactory = (luvio) => function education__getAv
|
|
|
531
531
|
buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
|
|
532
532
|
};
|
|
533
533
|
|
|
534
|
-
const VERSION$
|
|
535
|
-
function validate$
|
|
534
|
+
const VERSION$8 = "c470aba735607497dd11c1fcd34489d1";
|
|
535
|
+
function validate$s(obj, path = 'AvailableTopic') {
|
|
536
536
|
const v_error = (() => {
|
|
537
537
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
538
538
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -577,10 +577,10 @@ function validate$n(obj, path = 'AvailableTopic') {
|
|
|
577
577
|
})();
|
|
578
578
|
return v_error === undefined ? null : v_error;
|
|
579
579
|
}
|
|
580
|
-
const select$
|
|
580
|
+
const select$e = function AvailableTopicSelect() {
|
|
581
581
|
return {
|
|
582
582
|
kind: 'Fragment',
|
|
583
|
-
version: VERSION$
|
|
583
|
+
version: VERSION$8,
|
|
584
584
|
private: [],
|
|
585
585
|
selections: [
|
|
586
586
|
{
|
|
@@ -606,7 +606,7 @@ const select$a = function AvailableTopicSelect() {
|
|
|
606
606
|
]
|
|
607
607
|
};
|
|
608
608
|
};
|
|
609
|
-
function equals$
|
|
609
|
+
function equals$8(existing, incoming) {
|
|
610
610
|
const existing_parentWorkTypeGroupName = existing.parentWorkTypeGroupName;
|
|
611
611
|
const incoming_parentWorkTypeGroupName = incoming.parentWorkTypeGroupName;
|
|
612
612
|
// if at least one of these optionals is defined
|
|
@@ -667,8 +667,8 @@ function equals$6(existing, incoming) {
|
|
|
667
667
|
return true;
|
|
668
668
|
}
|
|
669
669
|
|
|
670
|
-
const VERSION$
|
|
671
|
-
function validate$
|
|
670
|
+
const VERSION$7 = "3cb0110faf688dc57056aa83be527181";
|
|
671
|
+
function validate$r(obj, path = 'AvailableTopicsOutputRepresentation') {
|
|
672
672
|
const v_error = (() => {
|
|
673
673
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
674
674
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -681,7 +681,7 @@ function validate$m(obj, path = 'AvailableTopicsOutputRepresentation') {
|
|
|
681
681
|
for (let i = 0; i < obj_topics.length; i++) {
|
|
682
682
|
const obj_topics_item = obj_topics[i];
|
|
683
683
|
const path_topics_item = path_topics + '[' + i + ']';
|
|
684
|
-
const referencepath_topics_itemValidationError = validate$
|
|
684
|
+
const referencepath_topics_itemValidationError = validate$s(obj_topics_item, path_topics_item);
|
|
685
685
|
if (referencepath_topics_itemValidationError !== null) {
|
|
686
686
|
let message = 'Object doesn\'t match AvailableTopic (at "' + path_topics_item + '")\n';
|
|
687
687
|
message += referencepath_topics_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -691,15 +691,15 @@ function validate$m(obj, path = 'AvailableTopicsOutputRepresentation') {
|
|
|
691
691
|
})();
|
|
692
692
|
return v_error === undefined ? null : v_error;
|
|
693
693
|
}
|
|
694
|
-
const RepresentationType$
|
|
695
|
-
function normalize$
|
|
694
|
+
const RepresentationType$5 = 'AvailableTopicsOutputRepresentation';
|
|
695
|
+
function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
696
696
|
return input;
|
|
697
697
|
}
|
|
698
|
-
const select$
|
|
699
|
-
const { selections: AvailableTopic__selections, opaque: AvailableTopic__opaque, } = select$
|
|
698
|
+
const select$d = function AvailableTopicsOutputRepresentationSelect() {
|
|
699
|
+
const { selections: AvailableTopic__selections, opaque: AvailableTopic__opaque, } = select$e();
|
|
700
700
|
return {
|
|
701
701
|
kind: 'Fragment',
|
|
702
|
-
version: VERSION$
|
|
702
|
+
version: VERSION$7,
|
|
703
703
|
private: [],
|
|
704
704
|
selections: [
|
|
705
705
|
{
|
|
@@ -711,11 +711,11 @@ const select$9 = function AvailableTopicsOutputRepresentationSelect() {
|
|
|
711
711
|
]
|
|
712
712
|
};
|
|
713
713
|
};
|
|
714
|
-
function equals$
|
|
714
|
+
function equals$7(existing, incoming) {
|
|
715
715
|
const existing_topics = existing.topics;
|
|
716
716
|
const incoming_topics = incoming.topics;
|
|
717
717
|
const equals_topics_items = equalsArray(existing_topics, incoming_topics, (existing_topics_item, incoming_topics_item) => {
|
|
718
|
-
if (!(equals$
|
|
718
|
+
if (!(equals$8(existing_topics_item, incoming_topics_item))) {
|
|
719
719
|
return false;
|
|
720
720
|
}
|
|
721
721
|
});
|
|
@@ -724,9 +724,9 @@ function equals$5(existing, incoming) {
|
|
|
724
724
|
}
|
|
725
725
|
return true;
|
|
726
726
|
}
|
|
727
|
-
const ingest$
|
|
727
|
+
const ingest$5 = function AvailableTopicsOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
728
728
|
if (process.env.NODE_ENV !== 'production') {
|
|
729
|
-
const validateError = validate$
|
|
729
|
+
const validateError = validate$r(input);
|
|
730
730
|
if (validateError !== null) {
|
|
731
731
|
throw validateError;
|
|
732
732
|
}
|
|
@@ -734,54 +734,54 @@ const ingest$3 = function AvailableTopicsOutputRepresentationIngest(input, path,
|
|
|
734
734
|
const key = path.fullPath;
|
|
735
735
|
const existingRecord = store.readEntry(key);
|
|
736
736
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 360000;
|
|
737
|
-
let incomingRecord = normalize$
|
|
737
|
+
let incomingRecord = normalize$5(input, store.readEntry(key), {
|
|
738
738
|
fullPath: key,
|
|
739
739
|
parent: path.parent,
|
|
740
740
|
propertyName: path.propertyName,
|
|
741
741
|
ttl: ttlToUse
|
|
742
742
|
});
|
|
743
|
-
if (existingRecord === undefined || equals$
|
|
743
|
+
if (existingRecord === undefined || equals$7(existingRecord, incomingRecord) === false) {
|
|
744
744
|
luvio.storePublish(key, incomingRecord);
|
|
745
745
|
}
|
|
746
746
|
if (ttlToUse !== undefined) {
|
|
747
747
|
const storeMetadataParams = {
|
|
748
748
|
ttl: ttlToUse,
|
|
749
749
|
namespace: "education",
|
|
750
|
-
version: VERSION$
|
|
751
|
-
representationName: RepresentationType$
|
|
750
|
+
version: VERSION$7,
|
|
751
|
+
representationName: RepresentationType$5,
|
|
752
752
|
};
|
|
753
753
|
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
754
754
|
}
|
|
755
755
|
return createLink(key);
|
|
756
756
|
};
|
|
757
|
-
function getTypeCacheKeys$
|
|
757
|
+
function getTypeCacheKeys$5(luvio, input, fullPathFactory) {
|
|
758
758
|
const rootKeySet = new StoreKeyMap();
|
|
759
759
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
760
760
|
const rootKey = fullPathFactory();
|
|
761
761
|
rootKeySet.set(rootKey, {
|
|
762
762
|
namespace: keyPrefix,
|
|
763
|
-
representationName: RepresentationType$
|
|
763
|
+
representationName: RepresentationType$5,
|
|
764
764
|
mergeable: false
|
|
765
765
|
});
|
|
766
766
|
return rootKeySet;
|
|
767
767
|
}
|
|
768
768
|
|
|
769
|
-
function select$
|
|
770
|
-
return select$
|
|
769
|
+
function select$c(luvio, params) {
|
|
770
|
+
return select$d();
|
|
771
771
|
}
|
|
772
|
-
function keyBuilder$
|
|
772
|
+
function keyBuilder$8(luvio, params) {
|
|
773
773
|
return keyPrefix + '::AvailableTopicsOutputRepresentation:(' + ')';
|
|
774
774
|
}
|
|
775
|
-
function getResponseCacheKeys$
|
|
776
|
-
return getTypeCacheKeys$
|
|
775
|
+
function getResponseCacheKeys$5(luvio, resourceParams, response) {
|
|
776
|
+
return getTypeCacheKeys$5(luvio, response, () => keyBuilder$8());
|
|
777
777
|
}
|
|
778
|
-
function ingestSuccess$
|
|
778
|
+
function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
|
|
779
779
|
const { body } = response;
|
|
780
|
-
const key = keyBuilder$
|
|
781
|
-
luvio.storeIngest(key, ingest$
|
|
780
|
+
const key = keyBuilder$8();
|
|
781
|
+
luvio.storeIngest(key, ingest$5, body);
|
|
782
782
|
const snapshot = luvio.storeLookup({
|
|
783
783
|
recordId: key,
|
|
784
|
-
node: select$
|
|
784
|
+
node: select$c(),
|
|
785
785
|
variables: {},
|
|
786
786
|
}, snapshotRefresh);
|
|
787
787
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -793,12 +793,12 @@ function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
793
793
|
return snapshot;
|
|
794
794
|
}
|
|
795
795
|
function ingestError$2(luvio, params, error, snapshotRefresh) {
|
|
796
|
-
const key = keyBuilder$
|
|
796
|
+
const key = keyBuilder$8();
|
|
797
797
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
798
798
|
luvio.storeIngestError(key, errorSnapshot);
|
|
799
799
|
return errorSnapshot;
|
|
800
800
|
}
|
|
801
|
-
function createResourceRequest$
|
|
801
|
+
function createResourceRequest$5(config) {
|
|
802
802
|
const headers = {};
|
|
803
803
|
return {
|
|
804
804
|
baseUri: '/services/data/v59.0',
|
|
@@ -819,53 +819,53 @@ const getAvailableTopics_ConfigPropertyNames = {
|
|
|
819
819
|
optional: []
|
|
820
820
|
}
|
|
821
821
|
};
|
|
822
|
-
function createResourceParams$
|
|
822
|
+
function createResourceParams$5(config) {
|
|
823
823
|
const resourceParams = {};
|
|
824
824
|
return resourceParams;
|
|
825
825
|
}
|
|
826
|
-
function keyBuilder$
|
|
827
|
-
return keyBuilder$
|
|
826
|
+
function keyBuilder$7(luvio, config) {
|
|
827
|
+
return keyBuilder$8();
|
|
828
828
|
}
|
|
829
|
-
function typeCheckConfig$
|
|
829
|
+
function typeCheckConfig$5(untrustedConfig) {
|
|
830
830
|
const config = {};
|
|
831
831
|
return config;
|
|
832
832
|
}
|
|
833
|
-
function validateAdapterConfig$
|
|
833
|
+
function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
|
|
834
834
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
835
835
|
return null;
|
|
836
836
|
}
|
|
837
837
|
if (process.env.NODE_ENV !== 'production') {
|
|
838
838
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
839
839
|
}
|
|
840
|
-
const config = typeCheckConfig$
|
|
840
|
+
const config = typeCheckConfig$5();
|
|
841
841
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
842
842
|
return null;
|
|
843
843
|
}
|
|
844
844
|
return config;
|
|
845
845
|
}
|
|
846
846
|
function adapterFragment$2(luvio, config) {
|
|
847
|
-
return select$
|
|
847
|
+
return select$c();
|
|
848
848
|
}
|
|
849
849
|
function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
|
|
850
|
-
const snapshot = ingestSuccess$
|
|
850
|
+
const snapshot = ingestSuccess$5(luvio, resourceParams, response, {
|
|
851
851
|
config,
|
|
852
|
-
resolve: () => buildNetworkSnapshot$
|
|
852
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
853
853
|
});
|
|
854
854
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
855
855
|
}
|
|
856
856
|
function onFetchResponseError$2(luvio, config, resourceParams, response) {
|
|
857
857
|
const snapshot = ingestError$2(luvio, resourceParams, response, {
|
|
858
858
|
config,
|
|
859
|
-
resolve: () => buildNetworkSnapshot$
|
|
859
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
860
860
|
});
|
|
861
861
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
862
862
|
}
|
|
863
|
-
function buildNetworkSnapshot$
|
|
864
|
-
const resourceParams = createResourceParams$
|
|
865
|
-
const request = createResourceRequest$
|
|
863
|
+
function buildNetworkSnapshot$5(luvio, config, options) {
|
|
864
|
+
const resourceParams = createResourceParams$5();
|
|
865
|
+
const request = createResourceRequest$5();
|
|
866
866
|
return luvio.dispatchResourceRequest(request, options)
|
|
867
867
|
.then((response) => {
|
|
868
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => getResponseCacheKeys$
|
|
868
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => getResponseCacheKeys$5(luvio, resourceParams, response.body));
|
|
869
869
|
}, (response) => {
|
|
870
870
|
return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
|
|
871
871
|
});
|
|
@@ -885,23 +885,23 @@ function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext
|
|
|
885
885
|
priority: networkPriority
|
|
886
886
|
};
|
|
887
887
|
}
|
|
888
|
-
return buildNetworkSnapshot$
|
|
888
|
+
return buildNetworkSnapshot$5(luvio, config, dispatchOptions);
|
|
889
889
|
}
|
|
890
890
|
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
891
891
|
const { luvio, config } = context;
|
|
892
892
|
const selector = {
|
|
893
|
-
recordId: keyBuilder$
|
|
893
|
+
recordId: keyBuilder$7(),
|
|
894
894
|
node: adapterFragment$2(),
|
|
895
895
|
variables: {},
|
|
896
896
|
};
|
|
897
897
|
const cacheSnapshot = storeLookup(selector, {
|
|
898
898
|
config,
|
|
899
|
-
resolve: () => buildNetworkSnapshot$
|
|
899
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
900
900
|
});
|
|
901
901
|
return cacheSnapshot;
|
|
902
902
|
}
|
|
903
903
|
const getAvailableTopicsAdapterFactory = (luvio) => function education__getAvailableTopics(untrustedConfig, requestContext) {
|
|
904
|
-
const config = validateAdapterConfig$
|
|
904
|
+
const config = validateAdapterConfig$5(untrustedConfig, getAvailableTopics_ConfigPropertyNames);
|
|
905
905
|
// Invalid or incomplete config
|
|
906
906
|
if (config === null) {
|
|
907
907
|
return null;
|
|
@@ -910,6 +910,546 @@ const getAvailableTopicsAdapterFactory = (luvio) => function education__getAvail
|
|
|
910
910
|
buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
|
|
911
911
|
};
|
|
912
912
|
|
|
913
|
+
function validate$q(obj, path = 'CreateLearningInputRepresentation') {
|
|
914
|
+
const v_error = (() => {
|
|
915
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
916
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
917
|
+
}
|
|
918
|
+
if (obj.corequisites !== undefined) {
|
|
919
|
+
const obj_corequisites = obj.corequisites;
|
|
920
|
+
const path_corequisites = path + '.corequisites';
|
|
921
|
+
if (!ArrayIsArray(obj_corequisites)) {
|
|
922
|
+
return new TypeError('Expected "array" but received "' + typeof obj_corequisites + '" (at "' + path_corequisites + '")');
|
|
923
|
+
}
|
|
924
|
+
for (let i = 0; i < obj_corequisites.length; i++) {
|
|
925
|
+
const obj_corequisites_item = obj_corequisites[i];
|
|
926
|
+
const path_corequisites_item = path_corequisites + '[' + i + ']';
|
|
927
|
+
if (typeof obj_corequisites_item !== 'object' || ArrayIsArray(obj_corequisites_item) || obj_corequisites_item === null) {
|
|
928
|
+
return new TypeError('Expected "object" but received "' + typeof obj_corequisites_item + '" (at "' + path_corequisites_item + '")');
|
|
929
|
+
}
|
|
930
|
+
}
|
|
931
|
+
}
|
|
932
|
+
const obj_learning = obj.learning;
|
|
933
|
+
const path_learning = path + '.learning';
|
|
934
|
+
if (typeof obj_learning !== 'object' || ArrayIsArray(obj_learning) || obj_learning === null) {
|
|
935
|
+
return new TypeError('Expected "object" but received "' + typeof obj_learning + '" (at "' + path_learning + '")');
|
|
936
|
+
}
|
|
937
|
+
if (obj.outcomes !== undefined) {
|
|
938
|
+
const obj_outcomes = obj.outcomes;
|
|
939
|
+
const path_outcomes = path + '.outcomes';
|
|
940
|
+
if (!ArrayIsArray(obj_outcomes)) {
|
|
941
|
+
return new TypeError('Expected "array" but received "' + typeof obj_outcomes + '" (at "' + path_outcomes + '")');
|
|
942
|
+
}
|
|
943
|
+
for (let i = 0; i < obj_outcomes.length; i++) {
|
|
944
|
+
const obj_outcomes_item = obj_outcomes[i];
|
|
945
|
+
const path_outcomes_item = path_outcomes + '[' + i + ']';
|
|
946
|
+
if (typeof obj_outcomes_item !== 'object' || ArrayIsArray(obj_outcomes_item) || obj_outcomes_item === null) {
|
|
947
|
+
return new TypeError('Expected "object" but received "' + typeof obj_outcomes_item + '" (at "' + path_outcomes_item + '")');
|
|
948
|
+
}
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
if (obj.prerequisites !== undefined) {
|
|
952
|
+
const obj_prerequisites = obj.prerequisites;
|
|
953
|
+
const path_prerequisites = path + '.prerequisites';
|
|
954
|
+
if (!ArrayIsArray(obj_prerequisites)) {
|
|
955
|
+
return new TypeError('Expected "array" but received "' + typeof obj_prerequisites + '" (at "' + path_prerequisites + '")');
|
|
956
|
+
}
|
|
957
|
+
for (let i = 0; i < obj_prerequisites.length; i++) {
|
|
958
|
+
const obj_prerequisites_item = obj_prerequisites[i];
|
|
959
|
+
const path_prerequisites_item = path_prerequisites + '[' + i + ']';
|
|
960
|
+
if (typeof obj_prerequisites_item !== 'object' || ArrayIsArray(obj_prerequisites_item) || obj_prerequisites_item === null) {
|
|
961
|
+
return new TypeError('Expected "object" but received "' + typeof obj_prerequisites_item + '" (at "' + path_prerequisites_item + '")');
|
|
962
|
+
}
|
|
963
|
+
}
|
|
964
|
+
}
|
|
965
|
+
if (obj.recommended !== undefined) {
|
|
966
|
+
const obj_recommended = obj.recommended;
|
|
967
|
+
const path_recommended = path + '.recommended';
|
|
968
|
+
if (!ArrayIsArray(obj_recommended)) {
|
|
969
|
+
return new TypeError('Expected "array" but received "' + typeof obj_recommended + '" (at "' + path_recommended + '")');
|
|
970
|
+
}
|
|
971
|
+
for (let i = 0; i < obj_recommended.length; i++) {
|
|
972
|
+
const obj_recommended_item = obj_recommended[i];
|
|
973
|
+
const path_recommended_item = path_recommended + '[' + i + ']';
|
|
974
|
+
if (typeof obj_recommended_item !== 'object' || ArrayIsArray(obj_recommended_item) || obj_recommended_item === null) {
|
|
975
|
+
return new TypeError('Expected "object" but received "' + typeof obj_recommended_item + '" (at "' + path_recommended_item + '")');
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
}
|
|
979
|
+
})();
|
|
980
|
+
return v_error === undefined ? null : v_error;
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
const TTL$2 = 100;
|
|
984
|
+
const VERSION$6 = "007261ab77a4c0e4b59ae9c1245e9305";
|
|
985
|
+
function validate$p(obj, path = 'CreateLearningOutputRepresentation') {
|
|
986
|
+
const v_error = (() => {
|
|
987
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
988
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
989
|
+
}
|
|
990
|
+
if (obj.learningAchievementIds !== undefined) {
|
|
991
|
+
const obj_learningAchievementIds = obj.learningAchievementIds;
|
|
992
|
+
const path_learningAchievementIds = path + '.learningAchievementIds';
|
|
993
|
+
if (!ArrayIsArray(obj_learningAchievementIds)) {
|
|
994
|
+
return new TypeError('Expected "array" but received "' + typeof obj_learningAchievementIds + '" (at "' + path_learningAchievementIds + '")');
|
|
995
|
+
}
|
|
996
|
+
for (let i = 0; i < obj_learningAchievementIds.length; i++) {
|
|
997
|
+
const obj_learningAchievementIds_item = obj_learningAchievementIds[i];
|
|
998
|
+
const path_learningAchievementIds_item = path_learningAchievementIds + '[' + i + ']';
|
|
999
|
+
if (typeof obj_learningAchievementIds_item !== 'string') {
|
|
1000
|
+
return new TypeError('Expected "string" but received "' + typeof obj_learningAchievementIds_item + '" (at "' + path_learningAchievementIds_item + '")');
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
if (obj.learningCourseId !== undefined) {
|
|
1005
|
+
const obj_learningCourseId = obj.learningCourseId;
|
|
1006
|
+
const path_learningCourseId = path + '.learningCourseId';
|
|
1007
|
+
if (typeof obj_learningCourseId !== 'string') {
|
|
1008
|
+
return new TypeError('Expected "string" but received "' + typeof obj_learningCourseId + '" (at "' + path_learningCourseId + '")');
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
1011
|
+
if (obj.learningFoundationItemIds !== undefined) {
|
|
1012
|
+
const obj_learningFoundationItemIds = obj.learningFoundationItemIds;
|
|
1013
|
+
const path_learningFoundationItemIds = path + '.learningFoundationItemIds';
|
|
1014
|
+
if (!ArrayIsArray(obj_learningFoundationItemIds)) {
|
|
1015
|
+
return new TypeError('Expected "array" but received "' + typeof obj_learningFoundationItemIds + '" (at "' + path_learningFoundationItemIds + '")');
|
|
1016
|
+
}
|
|
1017
|
+
for (let i = 0; i < obj_learningFoundationItemIds.length; i++) {
|
|
1018
|
+
const obj_learningFoundationItemIds_item = obj_learningFoundationItemIds[i];
|
|
1019
|
+
const path_learningFoundationItemIds_item = path_learningFoundationItemIds + '[' + i + ']';
|
|
1020
|
+
if (typeof obj_learningFoundationItemIds_item !== 'string') {
|
|
1021
|
+
return new TypeError('Expected "string" but received "' + typeof obj_learningFoundationItemIds_item + '" (at "' + path_learningFoundationItemIds_item + '")');
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
1025
|
+
const obj_learningId = obj.learningId;
|
|
1026
|
+
const path_learningId = path + '.learningId';
|
|
1027
|
+
if (typeof obj_learningId !== 'string') {
|
|
1028
|
+
return new TypeError('Expected "string" but received "' + typeof obj_learningId + '" (at "' + path_learningId + '")');
|
|
1029
|
+
}
|
|
1030
|
+
if (obj.learningOutcomeItemIds !== undefined) {
|
|
1031
|
+
const obj_learningOutcomeItemIds = obj.learningOutcomeItemIds;
|
|
1032
|
+
const path_learningOutcomeItemIds = path + '.learningOutcomeItemIds';
|
|
1033
|
+
if (!ArrayIsArray(obj_learningOutcomeItemIds)) {
|
|
1034
|
+
return new TypeError('Expected "array" but received "' + typeof obj_learningOutcomeItemIds + '" (at "' + path_learningOutcomeItemIds + '")');
|
|
1035
|
+
}
|
|
1036
|
+
for (let i = 0; i < obj_learningOutcomeItemIds.length; i++) {
|
|
1037
|
+
const obj_learningOutcomeItemIds_item = obj_learningOutcomeItemIds[i];
|
|
1038
|
+
const path_learningOutcomeItemIds_item = path_learningOutcomeItemIds + '[' + i + ']';
|
|
1039
|
+
if (typeof obj_learningOutcomeItemIds_item !== 'string') {
|
|
1040
|
+
return new TypeError('Expected "string" but received "' + typeof obj_learningOutcomeItemIds_item + '" (at "' + path_learningOutcomeItemIds_item + '")');
|
|
1041
|
+
}
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
if (obj.learningProgramId !== undefined) {
|
|
1045
|
+
const obj_learningProgramId = obj.learningProgramId;
|
|
1046
|
+
const path_learningProgramId = path + '.learningProgramId';
|
|
1047
|
+
if (typeof obj_learningProgramId !== 'string') {
|
|
1048
|
+
return new TypeError('Expected "string" but received "' + typeof obj_learningProgramId + '" (at "' + path_learningProgramId + '")');
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
})();
|
|
1052
|
+
return v_error === undefined ? null : v_error;
|
|
1053
|
+
}
|
|
1054
|
+
const RepresentationType$4 = 'CreateLearningOutputRepresentation';
|
|
1055
|
+
function keyBuilder$6(luvio, config) {
|
|
1056
|
+
return keyPrefix + '::' + RepresentationType$4 + ':' + config.id;
|
|
1057
|
+
}
|
|
1058
|
+
function keyBuilderFromType$2(luvio, object) {
|
|
1059
|
+
const keyParams = {
|
|
1060
|
+
id: object.learningId
|
|
1061
|
+
};
|
|
1062
|
+
return keyBuilder$6(luvio, keyParams);
|
|
1063
|
+
}
|
|
1064
|
+
function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
1065
|
+
return input;
|
|
1066
|
+
}
|
|
1067
|
+
const select$b = function CreateLearningOutputRepresentationSelect() {
|
|
1068
|
+
return {
|
|
1069
|
+
kind: 'Fragment',
|
|
1070
|
+
version: VERSION$6,
|
|
1071
|
+
private: [],
|
|
1072
|
+
opaque: true
|
|
1073
|
+
};
|
|
1074
|
+
};
|
|
1075
|
+
function equals$6(existing, incoming) {
|
|
1076
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
1077
|
+
return false;
|
|
1078
|
+
}
|
|
1079
|
+
return true;
|
|
1080
|
+
}
|
|
1081
|
+
const ingest$4 = function CreateLearningOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1082
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1083
|
+
const validateError = validate$p(input);
|
|
1084
|
+
if (validateError !== null) {
|
|
1085
|
+
throw validateError;
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
const key = keyBuilderFromType$2(luvio, input);
|
|
1089
|
+
const existingRecord = store.readEntry(key);
|
|
1090
|
+
const ttlToUse = TTL$2;
|
|
1091
|
+
let incomingRecord = normalize$4(input, store.readEntry(key), {
|
|
1092
|
+
fullPath: key,
|
|
1093
|
+
parent: path.parent,
|
|
1094
|
+
propertyName: path.propertyName,
|
|
1095
|
+
ttl: ttlToUse
|
|
1096
|
+
});
|
|
1097
|
+
if (existingRecord === undefined || equals$6(existingRecord, incomingRecord) === false) {
|
|
1098
|
+
luvio.storePublish(key, incomingRecord);
|
|
1099
|
+
}
|
|
1100
|
+
{
|
|
1101
|
+
const storeMetadataParams = {
|
|
1102
|
+
ttl: ttlToUse,
|
|
1103
|
+
namespace: "education",
|
|
1104
|
+
version: VERSION$6,
|
|
1105
|
+
representationName: RepresentationType$4,
|
|
1106
|
+
};
|
|
1107
|
+
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
1108
|
+
}
|
|
1109
|
+
return createLink(key);
|
|
1110
|
+
};
|
|
1111
|
+
function getTypeCacheKeys$4(luvio, input, fullPathFactory) {
|
|
1112
|
+
const rootKeySet = new StoreKeyMap();
|
|
1113
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1114
|
+
const rootKey = keyBuilderFromType$2(luvio, input);
|
|
1115
|
+
rootKeySet.set(rootKey, {
|
|
1116
|
+
namespace: keyPrefix,
|
|
1117
|
+
representationName: RepresentationType$4,
|
|
1118
|
+
mergeable: false
|
|
1119
|
+
});
|
|
1120
|
+
return rootKeySet;
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
function select$a(luvio, params) {
|
|
1124
|
+
return select$b();
|
|
1125
|
+
}
|
|
1126
|
+
function getResponseCacheKeys$4(luvio, resourceParams, response) {
|
|
1127
|
+
return getTypeCacheKeys$4(luvio, response);
|
|
1128
|
+
}
|
|
1129
|
+
function ingestSuccess$4(luvio, resourceParams, response) {
|
|
1130
|
+
const { body } = response;
|
|
1131
|
+
const key = keyBuilderFromType$2(luvio, body);
|
|
1132
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
1133
|
+
const snapshot = luvio.storeLookup({
|
|
1134
|
+
recordId: key,
|
|
1135
|
+
node: select$a(),
|
|
1136
|
+
variables: {},
|
|
1137
|
+
});
|
|
1138
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1139
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1140
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1141
|
+
}
|
|
1142
|
+
}
|
|
1143
|
+
deepFreeze(snapshot.data);
|
|
1144
|
+
return snapshot;
|
|
1145
|
+
}
|
|
1146
|
+
function createResourceRequest$4(config) {
|
|
1147
|
+
const headers = {};
|
|
1148
|
+
return {
|
|
1149
|
+
baseUri: '/services/data/v59.0',
|
|
1150
|
+
basePath: '/connect/education/campus-setup/learning',
|
|
1151
|
+
method: 'post',
|
|
1152
|
+
body: config.body,
|
|
1153
|
+
urlParams: {},
|
|
1154
|
+
queryParams: {},
|
|
1155
|
+
headers,
|
|
1156
|
+
priority: 'normal',
|
|
1157
|
+
};
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1160
|
+
const postCreateLearning_ConfigPropertyNames = {
|
|
1161
|
+
displayName: 'postCreateLearning',
|
|
1162
|
+
parameters: {
|
|
1163
|
+
required: ['createLearningRecord'],
|
|
1164
|
+
optional: []
|
|
1165
|
+
}
|
|
1166
|
+
};
|
|
1167
|
+
function createResourceParams$4(config) {
|
|
1168
|
+
const resourceParams = {
|
|
1169
|
+
body: {
|
|
1170
|
+
createLearningRecord: config.createLearningRecord
|
|
1171
|
+
}
|
|
1172
|
+
};
|
|
1173
|
+
return resourceParams;
|
|
1174
|
+
}
|
|
1175
|
+
function typeCheckConfig$4(untrustedConfig) {
|
|
1176
|
+
const config = {};
|
|
1177
|
+
const untrustedConfig_createLearningRecord = untrustedConfig.createLearningRecord;
|
|
1178
|
+
const referenceCreateLearningInputRepresentationValidationError = validate$q(untrustedConfig_createLearningRecord);
|
|
1179
|
+
if (referenceCreateLearningInputRepresentationValidationError === null) {
|
|
1180
|
+
config.createLearningRecord = untrustedConfig_createLearningRecord;
|
|
1181
|
+
}
|
|
1182
|
+
return config;
|
|
1183
|
+
}
|
|
1184
|
+
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
1185
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1186
|
+
return null;
|
|
1187
|
+
}
|
|
1188
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1189
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1190
|
+
}
|
|
1191
|
+
const config = typeCheckConfig$4(untrustedConfig);
|
|
1192
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1193
|
+
return null;
|
|
1194
|
+
}
|
|
1195
|
+
return config;
|
|
1196
|
+
}
|
|
1197
|
+
function buildNetworkSnapshot$4(luvio, config, options) {
|
|
1198
|
+
const resourceParams = createResourceParams$4(config);
|
|
1199
|
+
const request = createResourceRequest$4(resourceParams);
|
|
1200
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1201
|
+
.then((response) => {
|
|
1202
|
+
return luvio.handleSuccessResponse(() => {
|
|
1203
|
+
const snapshot = ingestSuccess$4(luvio, resourceParams, response);
|
|
1204
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1205
|
+
}, () => getResponseCacheKeys$4(luvio, resourceParams, response.body));
|
|
1206
|
+
}, (response) => {
|
|
1207
|
+
deepFreeze(response);
|
|
1208
|
+
throw response;
|
|
1209
|
+
});
|
|
1210
|
+
}
|
|
1211
|
+
const postCreateLearningAdapterFactory = (luvio) => {
|
|
1212
|
+
return function postCreateLearning(untrustedConfig) {
|
|
1213
|
+
const config = validateAdapterConfig$4(untrustedConfig, postCreateLearning_ConfigPropertyNames);
|
|
1214
|
+
// Invalid or incomplete config
|
|
1215
|
+
if (config === null) {
|
|
1216
|
+
throw new Error('Invalid config for "postCreateLearning"');
|
|
1217
|
+
}
|
|
1218
|
+
return buildNetworkSnapshot$4(luvio, config);
|
|
1219
|
+
};
|
|
1220
|
+
};
|
|
1221
|
+
|
|
1222
|
+
function validate$o(obj, path = 'Requirement') {
|
|
1223
|
+
const v_error = (() => {
|
|
1224
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1225
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1226
|
+
}
|
|
1227
|
+
const obj_learningProgramPlanRequirement = obj.learningProgramPlanRequirement;
|
|
1228
|
+
const path_learningProgramPlanRequirement = path + '.learningProgramPlanRequirement';
|
|
1229
|
+
if (typeof obj_learningProgramPlanRequirement !== 'object' || ArrayIsArray(obj_learningProgramPlanRequirement) || obj_learningProgramPlanRequirement === null) {
|
|
1230
|
+
return new TypeError('Expected "object" but received "' + typeof obj_learningProgramPlanRequirement + '" (at "' + path_learningProgramPlanRequirement + '")');
|
|
1231
|
+
}
|
|
1232
|
+
const obj_type = obj.type;
|
|
1233
|
+
const path_type = path + '.type';
|
|
1234
|
+
if (typeof obj_type !== 'string') {
|
|
1235
|
+
return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
|
|
1236
|
+
}
|
|
1237
|
+
})();
|
|
1238
|
+
return v_error === undefined ? null : v_error;
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1241
|
+
function validate$n(obj, path = 'LearningProgramPlanInputRepresentation') {
|
|
1242
|
+
const v_error = (() => {
|
|
1243
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1244
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1245
|
+
}
|
|
1246
|
+
const obj_learningProgramPlan = obj.learningProgramPlan;
|
|
1247
|
+
const path_learningProgramPlan = path + '.learningProgramPlan';
|
|
1248
|
+
if (typeof obj_learningProgramPlan !== 'object' || ArrayIsArray(obj_learningProgramPlan) || obj_learningProgramPlan === null) {
|
|
1249
|
+
return new TypeError('Expected "object" but received "' + typeof obj_learningProgramPlan + '" (at "' + path_learningProgramPlan + '")');
|
|
1250
|
+
}
|
|
1251
|
+
const obj_requirement = obj.requirement;
|
|
1252
|
+
const path_requirement = path + '.requirement';
|
|
1253
|
+
if (!ArrayIsArray(obj_requirement)) {
|
|
1254
|
+
return new TypeError('Expected "array" but received "' + typeof obj_requirement + '" (at "' + path_requirement + '")');
|
|
1255
|
+
}
|
|
1256
|
+
for (let i = 0; i < obj_requirement.length; i++) {
|
|
1257
|
+
const obj_requirement_item = obj_requirement[i];
|
|
1258
|
+
const path_requirement_item = path_requirement + '[' + i + ']';
|
|
1259
|
+
const referencepath_requirement_itemValidationError = validate$o(obj_requirement_item, path_requirement_item);
|
|
1260
|
+
if (referencepath_requirement_itemValidationError !== null) {
|
|
1261
|
+
let message = 'Object doesn\'t match Requirement (at "' + path_requirement_item + '")\n';
|
|
1262
|
+
message += referencepath_requirement_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1263
|
+
return new TypeError(message);
|
|
1264
|
+
}
|
|
1265
|
+
}
|
|
1266
|
+
})();
|
|
1267
|
+
return v_error === undefined ? null : v_error;
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1270
|
+
const TTL$1 = 100;
|
|
1271
|
+
const VERSION$5 = "0218a0ed0a2278eb0405096372ffa5de";
|
|
1272
|
+
function validate$m(obj, path = 'LearningProgramPlanOutputRepresentation') {
|
|
1273
|
+
const v_error = (() => {
|
|
1274
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1275
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1276
|
+
}
|
|
1277
|
+
const obj_learningProgramPlanId = obj.learningProgramPlanId;
|
|
1278
|
+
const path_learningProgramPlanId = path + '.learningProgramPlanId';
|
|
1279
|
+
if (typeof obj_learningProgramPlanId !== 'string') {
|
|
1280
|
+
return new TypeError('Expected "string" but received "' + typeof obj_learningProgramPlanId + '" (at "' + path_learningProgramPlanId + '")');
|
|
1281
|
+
}
|
|
1282
|
+
})();
|
|
1283
|
+
return v_error === undefined ? null : v_error;
|
|
1284
|
+
}
|
|
1285
|
+
const RepresentationType$3 = 'LearningProgramPlanOutputRepresentation';
|
|
1286
|
+
function keyBuilder$5(luvio, config) {
|
|
1287
|
+
return keyPrefix + '::' + RepresentationType$3 + ':' + config.id;
|
|
1288
|
+
}
|
|
1289
|
+
function keyBuilderFromType$1(luvio, object) {
|
|
1290
|
+
const keyParams = {
|
|
1291
|
+
id: object.learningProgramPlanId
|
|
1292
|
+
};
|
|
1293
|
+
return keyBuilder$5(luvio, keyParams);
|
|
1294
|
+
}
|
|
1295
|
+
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
1296
|
+
return input;
|
|
1297
|
+
}
|
|
1298
|
+
const select$9 = function LearningProgramPlanOutputRepresentationSelect() {
|
|
1299
|
+
return {
|
|
1300
|
+
kind: 'Fragment',
|
|
1301
|
+
version: VERSION$5,
|
|
1302
|
+
private: [],
|
|
1303
|
+
opaque: true
|
|
1304
|
+
};
|
|
1305
|
+
};
|
|
1306
|
+
function equals$5(existing, incoming) {
|
|
1307
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
1308
|
+
return false;
|
|
1309
|
+
}
|
|
1310
|
+
return true;
|
|
1311
|
+
}
|
|
1312
|
+
const ingest$3 = function LearningProgramPlanOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1313
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1314
|
+
const validateError = validate$m(input);
|
|
1315
|
+
if (validateError !== null) {
|
|
1316
|
+
throw validateError;
|
|
1317
|
+
}
|
|
1318
|
+
}
|
|
1319
|
+
const key = keyBuilderFromType$1(luvio, input);
|
|
1320
|
+
const existingRecord = store.readEntry(key);
|
|
1321
|
+
const ttlToUse = TTL$1;
|
|
1322
|
+
let incomingRecord = normalize$3(input, store.readEntry(key), {
|
|
1323
|
+
fullPath: key,
|
|
1324
|
+
parent: path.parent,
|
|
1325
|
+
propertyName: path.propertyName,
|
|
1326
|
+
ttl: ttlToUse
|
|
1327
|
+
});
|
|
1328
|
+
if (existingRecord === undefined || equals$5(existingRecord, incomingRecord) === false) {
|
|
1329
|
+
luvio.storePublish(key, incomingRecord);
|
|
1330
|
+
}
|
|
1331
|
+
{
|
|
1332
|
+
const storeMetadataParams = {
|
|
1333
|
+
ttl: ttlToUse,
|
|
1334
|
+
namespace: "education",
|
|
1335
|
+
version: VERSION$5,
|
|
1336
|
+
representationName: RepresentationType$3,
|
|
1337
|
+
};
|
|
1338
|
+
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
1339
|
+
}
|
|
1340
|
+
return createLink(key);
|
|
1341
|
+
};
|
|
1342
|
+
function getTypeCacheKeys$3(luvio, input, fullPathFactory) {
|
|
1343
|
+
const rootKeySet = new StoreKeyMap();
|
|
1344
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1345
|
+
const rootKey = keyBuilderFromType$1(luvio, input);
|
|
1346
|
+
rootKeySet.set(rootKey, {
|
|
1347
|
+
namespace: keyPrefix,
|
|
1348
|
+
representationName: RepresentationType$3,
|
|
1349
|
+
mergeable: false
|
|
1350
|
+
});
|
|
1351
|
+
return rootKeySet;
|
|
1352
|
+
}
|
|
1353
|
+
|
|
1354
|
+
function select$8(luvio, params) {
|
|
1355
|
+
return select$9();
|
|
1356
|
+
}
|
|
1357
|
+
function getResponseCacheKeys$3(luvio, resourceParams, response) {
|
|
1358
|
+
return getTypeCacheKeys$3(luvio, response);
|
|
1359
|
+
}
|
|
1360
|
+
function ingestSuccess$3(luvio, resourceParams, response) {
|
|
1361
|
+
const { body } = response;
|
|
1362
|
+
const key = keyBuilderFromType$1(luvio, body);
|
|
1363
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
1364
|
+
const snapshot = luvio.storeLookup({
|
|
1365
|
+
recordId: key,
|
|
1366
|
+
node: select$8(),
|
|
1367
|
+
variables: {},
|
|
1368
|
+
});
|
|
1369
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1370
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1371
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1372
|
+
}
|
|
1373
|
+
}
|
|
1374
|
+
deepFreeze(snapshot.data);
|
|
1375
|
+
return snapshot;
|
|
1376
|
+
}
|
|
1377
|
+
function createResourceRequest$3(config) {
|
|
1378
|
+
const headers = {};
|
|
1379
|
+
return {
|
|
1380
|
+
baseUri: '/services/data/v59.0',
|
|
1381
|
+
basePath: '/connect/education/campus-setup/learning-program-plan/publish',
|
|
1382
|
+
method: 'post',
|
|
1383
|
+
body: config.body,
|
|
1384
|
+
urlParams: {},
|
|
1385
|
+
queryParams: {},
|
|
1386
|
+
headers,
|
|
1387
|
+
priority: 'normal',
|
|
1388
|
+
};
|
|
1389
|
+
}
|
|
1390
|
+
|
|
1391
|
+
const postPublishLearningProgramPlan_ConfigPropertyNames = {
|
|
1392
|
+
displayName: 'postPublishLearningProgramPlan',
|
|
1393
|
+
parameters: {
|
|
1394
|
+
required: ['publishLearningProgramPlan'],
|
|
1395
|
+
optional: []
|
|
1396
|
+
}
|
|
1397
|
+
};
|
|
1398
|
+
function createResourceParams$3(config) {
|
|
1399
|
+
const resourceParams = {
|
|
1400
|
+
body: {
|
|
1401
|
+
publishLearningProgramPlan: config.publishLearningProgramPlan
|
|
1402
|
+
}
|
|
1403
|
+
};
|
|
1404
|
+
return resourceParams;
|
|
1405
|
+
}
|
|
1406
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
1407
|
+
const config = {};
|
|
1408
|
+
const untrustedConfig_publishLearningProgramPlan = untrustedConfig.publishLearningProgramPlan;
|
|
1409
|
+
const referenceLearningProgramPlanInputRepresentationValidationError = validate$n(untrustedConfig_publishLearningProgramPlan);
|
|
1410
|
+
if (referenceLearningProgramPlanInputRepresentationValidationError === null) {
|
|
1411
|
+
config.publishLearningProgramPlan = untrustedConfig_publishLearningProgramPlan;
|
|
1412
|
+
}
|
|
1413
|
+
return config;
|
|
1414
|
+
}
|
|
1415
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
1416
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1417
|
+
return null;
|
|
1418
|
+
}
|
|
1419
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1420
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1421
|
+
}
|
|
1422
|
+
const config = typeCheckConfig$3(untrustedConfig);
|
|
1423
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1424
|
+
return null;
|
|
1425
|
+
}
|
|
1426
|
+
return config;
|
|
1427
|
+
}
|
|
1428
|
+
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
1429
|
+
const resourceParams = createResourceParams$3(config);
|
|
1430
|
+
const request = createResourceRequest$3(resourceParams);
|
|
1431
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1432
|
+
.then((response) => {
|
|
1433
|
+
return luvio.handleSuccessResponse(() => {
|
|
1434
|
+
const snapshot = ingestSuccess$3(luvio, resourceParams, response);
|
|
1435
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1436
|
+
}, () => getResponseCacheKeys$3(luvio, resourceParams, response.body));
|
|
1437
|
+
}, (response) => {
|
|
1438
|
+
deepFreeze(response);
|
|
1439
|
+
throw response;
|
|
1440
|
+
});
|
|
1441
|
+
}
|
|
1442
|
+
const postPublishLearningProgramPlanAdapterFactory = (luvio) => {
|
|
1443
|
+
return function postPublishLearningProgramPlan(untrustedConfig) {
|
|
1444
|
+
const config = validateAdapterConfig$3(untrustedConfig, postPublishLearningProgramPlan_ConfigPropertyNames);
|
|
1445
|
+
// Invalid or incomplete config
|
|
1446
|
+
if (config === null) {
|
|
1447
|
+
throw new Error('Invalid config for "postPublishLearningProgramPlan"');
|
|
1448
|
+
}
|
|
1449
|
+
return buildNetworkSnapshot$3(luvio, config);
|
|
1450
|
+
};
|
|
1451
|
+
};
|
|
1452
|
+
|
|
913
1453
|
function validate$l(obj, path = 'CarePlanTaskInputRepresentation') {
|
|
914
1454
|
const v_error = (() => {
|
|
915
1455
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -2782,4 +3322,4 @@ const getSuccessTeamAdapterFactory = (luvio) => function education__getSuccessTe
|
|
|
2782
3322
|
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
2783
3323
|
};
|
|
2784
3324
|
|
|
2785
|
-
export { createCarePlansAdapterFactory, getAvailableTimeSlotsAdapterFactory, getAvailableTopicsAdapterFactory, getPersonPublicProfileAdapterFactory, getSuccessTeamAdapterFactory };
|
|
3325
|
+
export { createCarePlansAdapterFactory, getAvailableTimeSlotsAdapterFactory, getAvailableTopicsAdapterFactory, getPersonPublicProfileAdapterFactory, getSuccessTeamAdapterFactory, postCreateLearningAdapterFactory, postPublishLearningProgramPlanAdapterFactory };
|