@salesforce/lds-adapters-industries-education 1.150.8 → 1.151.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 +714 -196
- package/dist/es/es2018/types/src/generated/adapters/getPersonPublicProfile.d.ts +27 -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 +3 -1
- package/dist/es/es2018/types/src/generated/resources/getConnectEducationPersonPublicProfileByContactIdAndUsageType.d.ts +16 -0
- package/dist/es/es2018/types/src/generated/types/AcademicCredential.d.ts +34 -0
- package/dist/es/es2018/types/src/generated/types/AdditionalEducation.d.ts +37 -0
- package/dist/es/es2018/types/src/generated/types/ContactInformation.d.ts +34 -0
- package/dist/es/es2018/types/src/generated/types/PersonPublicProfileInformation.d.ts +46 -0
- package/dist/es/es2018/types/src/generated/types/PersonPublicProfileOutputRepresentation.d.ts +48 -0
- package/dist/es/es2018/types/src/generated/types/ProfessionalExperience.d.ts +46 -0
- package/package.json +1 -1
- package/sfdc/index.js +695 -169
- package/src/raml/api.raml +176 -1
- package/src/raml/luvio.raml +6 -0
|
@@ -91,7 +91,7 @@ function createLink(ref) {
|
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
function validate$
|
|
94
|
+
function validate$q(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$k(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$8 = "cfd94fbef61f52ffe43428e23e7a68c8";
|
|
159
|
+
function validate$p(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$j(obj, path = 'TimeSlot') {
|
|
|
192
192
|
})();
|
|
193
193
|
return v_error === undefined ? null : v_error;
|
|
194
194
|
}
|
|
195
|
-
const select$
|
|
195
|
+
const select$d = function TimeSlotSelect() {
|
|
196
196
|
return {
|
|
197
197
|
kind: 'Fragment',
|
|
198
|
-
version: VERSION$
|
|
198
|
+
version: VERSION$8,
|
|
199
199
|
private: [],
|
|
200
200
|
selections: [
|
|
201
201
|
{
|
|
@@ -221,7 +221,7 @@ const select$b = function TimeSlotSelect() {
|
|
|
221
221
|
]
|
|
222
222
|
};
|
|
223
223
|
};
|
|
224
|
-
function equals$
|
|
224
|
+
function equals$8(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$7(existing, incoming) {
|
|
|
277
277
|
return true;
|
|
278
278
|
}
|
|
279
279
|
|
|
280
|
-
const VERSION$
|
|
281
|
-
function validate$
|
|
280
|
+
const VERSION$7 = "9c2ef94b89ee532c50c8423528617441";
|
|
281
|
+
function validate$o(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$i(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$p(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$i(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$4 = 'AvailableTimeSlotsOuputRepresentation';
|
|
305
|
+
function normalize$4(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$c = function AvailableTimeSlotsOuputRepresentationSelect() {
|
|
309
|
+
const { selections: TimeSlot__selections, opaque: TimeSlot__opaque, } = select$d();
|
|
310
310
|
return {
|
|
311
311
|
kind: 'Fragment',
|
|
312
|
-
version: VERSION$
|
|
312
|
+
version: VERSION$7,
|
|
313
313
|
private: [],
|
|
314
314
|
selections: [
|
|
315
315
|
{
|
|
@@ -321,11 +321,11 @@ const select$a = function AvailableTimeSlotsOuputRepresentationSelect() {
|
|
|
321
321
|
]
|
|
322
322
|
};
|
|
323
323
|
};
|
|
324
|
-
function equals$
|
|
324
|
+
function equals$7(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$8(existing_timeSlots_item, incoming_timeSlots_item))) {
|
|
329
329
|
return false;
|
|
330
330
|
}
|
|
331
331
|
});
|
|
@@ -334,9 +334,9 @@ function equals$6(existing, incoming) {
|
|
|
334
334
|
}
|
|
335
335
|
return true;
|
|
336
336
|
}
|
|
337
|
-
const ingest$
|
|
337
|
+
const ingest$4 = function AvailableTimeSlotsOuputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
338
338
|
if (process.env.NODE_ENV !== 'production') {
|
|
339
|
-
const validateError = validate$
|
|
339
|
+
const validateError = validate$o(input);
|
|
340
340
|
if (validateError !== null) {
|
|
341
341
|
throw validateError;
|
|
342
342
|
}
|
|
@@ -344,54 +344,54 @@ const ingest$3 = 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$4(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$7(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$7,
|
|
361
|
+
representationName: RepresentationType$4,
|
|
362
362
|
};
|
|
363
363
|
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
364
364
|
}
|
|
365
365
|
return createLink(key);
|
|
366
366
|
};
|
|
367
|
-
function getTypeCacheKeys$
|
|
367
|
+
function getTypeCacheKeys$4(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$4,
|
|
374
374
|
mergeable: false
|
|
375
375
|
});
|
|
376
376
|
return rootKeySet;
|
|
377
377
|
}
|
|
378
378
|
|
|
379
|
-
function select$
|
|
380
|
-
return select$
|
|
379
|
+
function select$b(luvio, params) {
|
|
380
|
+
return select$c();
|
|
381
381
|
}
|
|
382
|
-
function keyBuilder$
|
|
382
|
+
function keyBuilder$8(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$4(luvio, resourceParams, response) {
|
|
386
|
+
return getTypeCacheKeys$4(luvio, response, () => keyBuilder$8(luvio, resourceParams));
|
|
387
387
|
}
|
|
388
|
-
function ingestSuccess$
|
|
388
|
+
function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
389
389
|
const { body } = response;
|
|
390
|
-
const key = keyBuilder$
|
|
391
|
-
luvio.storeIngest(key, ingest$
|
|
390
|
+
const key = keyBuilder$8(luvio, resourceParams);
|
|
391
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
392
392
|
const snapshot = luvio.storeLookup({
|
|
393
393
|
recordId: key,
|
|
394
|
-
node: select$
|
|
394
|
+
node: select$b(),
|
|
395
395
|
variables: {},
|
|
396
396
|
}, snapshotRefresh);
|
|
397
397
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -402,13 +402,13 @@ function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
402
402
|
deepFreeze(snapshot.data);
|
|
403
403
|
return snapshot;
|
|
404
404
|
}
|
|
405
|
-
function ingestError$
|
|
406
|
-
const key = keyBuilder$
|
|
405
|
+
function ingestError$3(luvio, params, error, snapshotRefresh) {
|
|
406
|
+
const key = keyBuilder$8(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$4(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$4(config) {
|
|
433
433
|
const resourceParams = {
|
|
434
434
|
body: {
|
|
435
435
|
availableTimeSlotsInput: config.availableTimeSlotsInput
|
|
@@ -437,61 +437,61 @@ function createResourceParams$3(config) {
|
|
|
437
437
|
};
|
|
438
438
|
return resourceParams;
|
|
439
439
|
}
|
|
440
|
-
function keyBuilder$
|
|
441
|
-
const resourceParams = createResourceParams$
|
|
442
|
-
return keyBuilder$
|
|
440
|
+
function keyBuilder$7(luvio, config) {
|
|
441
|
+
const resourceParams = createResourceParams$4(config);
|
|
442
|
+
return keyBuilder$8(luvio, resourceParams);
|
|
443
443
|
}
|
|
444
|
-
function typeCheckConfig$
|
|
444
|
+
function typeCheckConfig$4(untrustedConfig) {
|
|
445
445
|
const config = {};
|
|
446
446
|
const untrustedConfig_availableTimeSlotsInput = untrustedConfig.availableTimeSlotsInput;
|
|
447
|
-
const referenceAvailableTimeSlotsInputRepresentationValidationError = validate$
|
|
447
|
+
const referenceAvailableTimeSlotsInputRepresentationValidationError = validate$q(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$4(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$4(untrustedConfig);
|
|
461
461
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
462
462
|
return null;
|
|
463
463
|
}
|
|
464
464
|
return config;
|
|
465
465
|
}
|
|
466
|
-
function adapterFragment$
|
|
467
|
-
createResourceParams$
|
|
468
|
-
return select$
|
|
466
|
+
function adapterFragment$3(luvio, config) {
|
|
467
|
+
createResourceParams$4(config);
|
|
468
|
+
return select$b();
|
|
469
469
|
}
|
|
470
|
-
function onFetchResponseSuccess$
|
|
471
|
-
const snapshot = ingestSuccess$
|
|
470
|
+
function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
|
|
471
|
+
const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
|
|
472
472
|
config,
|
|
473
|
-
resolve: () => buildNetworkSnapshot$
|
|
473
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
474
474
|
});
|
|
475
475
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
476
476
|
}
|
|
477
|
-
function onFetchResponseError$
|
|
478
|
-
const snapshot = ingestError$
|
|
477
|
+
function onFetchResponseError$3(luvio, config, resourceParams, response) {
|
|
478
|
+
const snapshot = ingestError$3(luvio, resourceParams, response, {
|
|
479
479
|
config,
|
|
480
|
-
resolve: () => buildNetworkSnapshot$
|
|
480
|
+
resolve: () => buildNetworkSnapshot$4(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$4(luvio, config, options) {
|
|
485
|
+
const resourceParams = createResourceParams$4(config);
|
|
486
|
+
const request = createResourceRequest$4(resourceParams);
|
|
487
487
|
return luvio.dispatchResourceRequest(request, options)
|
|
488
488
|
.then((response) => {
|
|
489
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
489
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => getResponseCacheKeys$4(luvio, resourceParams, response.body));
|
|
490
490
|
}, (response) => {
|
|
491
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
491
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$3(luvio, config, resourceParams, response));
|
|
492
492
|
});
|
|
493
493
|
}
|
|
494
|
-
function buildNetworkSnapshotCachePolicy$
|
|
494
|
+
function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
|
|
495
495
|
const { luvio, config } = context;
|
|
496
496
|
const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
|
|
497
497
|
const dispatchOptions = {
|
|
@@ -506,33 +506,33 @@ function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext
|
|
|
506
506
|
priority: networkPriority
|
|
507
507
|
};
|
|
508
508
|
}
|
|
509
|
-
return buildNetworkSnapshot$
|
|
509
|
+
return buildNetworkSnapshot$4(luvio, config, dispatchOptions);
|
|
510
510
|
}
|
|
511
|
-
function buildCachedSnapshotCachePolicy$
|
|
511
|
+
function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
|
|
512
512
|
const { luvio, config } = context;
|
|
513
513
|
const selector = {
|
|
514
|
-
recordId: keyBuilder$
|
|
515
|
-
node: adapterFragment$
|
|
514
|
+
recordId: keyBuilder$7(luvio, config),
|
|
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$4(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$4(untrustedConfig, getAvailableTimeSlots_ConfigPropertyNames);
|
|
526
526
|
// Invalid or incomplete config
|
|
527
527
|
if (config === null) {
|
|
528
528
|
return null;
|
|
529
529
|
}
|
|
530
530
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
531
|
-
buildCachedSnapshotCachePolicy$
|
|
531
|
+
buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
|
|
532
532
|
};
|
|
533
533
|
|
|
534
|
-
const VERSION$
|
|
535
|
-
function validate$
|
|
534
|
+
const VERSION$6 = "c470aba735607497dd11c1fcd34489d1";
|
|
535
|
+
function validate$n(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$h(obj, path = 'AvailableTopic') {
|
|
|
577
577
|
})();
|
|
578
578
|
return v_error === undefined ? null : v_error;
|
|
579
579
|
}
|
|
580
|
-
const select$
|
|
580
|
+
const select$a = function AvailableTopicSelect() {
|
|
581
581
|
return {
|
|
582
582
|
kind: 'Fragment',
|
|
583
|
-
version: VERSION$
|
|
583
|
+
version: VERSION$6,
|
|
584
584
|
private: [],
|
|
585
585
|
selections: [
|
|
586
586
|
{
|
|
@@ -606,7 +606,7 @@ const select$8 = function AvailableTopicSelect() {
|
|
|
606
606
|
]
|
|
607
607
|
};
|
|
608
608
|
};
|
|
609
|
-
function equals$
|
|
609
|
+
function equals$6(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$5(existing, incoming) {
|
|
|
667
667
|
return true;
|
|
668
668
|
}
|
|
669
669
|
|
|
670
|
-
const VERSION$
|
|
671
|
-
function validate$
|
|
670
|
+
const VERSION$5 = "3cb0110faf688dc57056aa83be527181";
|
|
671
|
+
function validate$m(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$g(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$n(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$g(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$3 = 'AvailableTopicsOutputRepresentation';
|
|
695
|
+
function normalize$3(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$9 = function AvailableTopicsOutputRepresentationSelect() {
|
|
699
|
+
const { selections: AvailableTopic__selections, opaque: AvailableTopic__opaque, } = select$a();
|
|
700
700
|
return {
|
|
701
701
|
kind: 'Fragment',
|
|
702
|
-
version: VERSION$
|
|
702
|
+
version: VERSION$5,
|
|
703
703
|
private: [],
|
|
704
704
|
selections: [
|
|
705
705
|
{
|
|
@@ -711,11 +711,11 @@ const select$7 = function AvailableTopicsOutputRepresentationSelect() {
|
|
|
711
711
|
]
|
|
712
712
|
};
|
|
713
713
|
};
|
|
714
|
-
function equals$
|
|
714
|
+
function equals$5(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$6(existing_topics_item, incoming_topics_item))) {
|
|
719
719
|
return false;
|
|
720
720
|
}
|
|
721
721
|
});
|
|
@@ -724,9 +724,9 @@ function equals$4(existing, incoming) {
|
|
|
724
724
|
}
|
|
725
725
|
return true;
|
|
726
726
|
}
|
|
727
|
-
const ingest$
|
|
727
|
+
const ingest$3 = function AvailableTopicsOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
728
728
|
if (process.env.NODE_ENV !== 'production') {
|
|
729
|
-
const validateError = validate$
|
|
729
|
+
const validateError = validate$m(input);
|
|
730
730
|
if (validateError !== null) {
|
|
731
731
|
throw validateError;
|
|
732
732
|
}
|
|
@@ -734,54 +734,54 @@ const ingest$2 = 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$3(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$5(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$5,
|
|
751
|
+
representationName: RepresentationType$3,
|
|
752
752
|
};
|
|
753
753
|
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
754
754
|
}
|
|
755
755
|
return createLink(key);
|
|
756
756
|
};
|
|
757
|
-
function getTypeCacheKeys$
|
|
757
|
+
function getTypeCacheKeys$3(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$3,
|
|
764
764
|
mergeable: false
|
|
765
765
|
});
|
|
766
766
|
return rootKeySet;
|
|
767
767
|
}
|
|
768
768
|
|
|
769
|
-
function select$
|
|
770
|
-
return select$
|
|
769
|
+
function select$8(luvio, params) {
|
|
770
|
+
return select$9();
|
|
771
771
|
}
|
|
772
|
-
function keyBuilder$
|
|
772
|
+
function keyBuilder$6(luvio, params) {
|
|
773
773
|
return keyPrefix + '::AvailableTopicsOutputRepresentation:(' + ')';
|
|
774
774
|
}
|
|
775
|
-
function getResponseCacheKeys$
|
|
776
|
-
return getTypeCacheKeys$
|
|
775
|
+
function getResponseCacheKeys$3(luvio, resourceParams, response) {
|
|
776
|
+
return getTypeCacheKeys$3(luvio, response, () => keyBuilder$6());
|
|
777
777
|
}
|
|
778
|
-
function ingestSuccess$
|
|
778
|
+
function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
779
779
|
const { body } = response;
|
|
780
|
-
const key = keyBuilder$
|
|
781
|
-
luvio.storeIngest(key, ingest$
|
|
780
|
+
const key = keyBuilder$6();
|
|
781
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
782
782
|
const snapshot = luvio.storeLookup({
|
|
783
783
|
recordId: key,
|
|
784
|
-
node: select$
|
|
784
|
+
node: select$8(),
|
|
785
785
|
variables: {},
|
|
786
786
|
}, snapshotRefresh);
|
|
787
787
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -792,13 +792,13 @@ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
792
792
|
deepFreeze(snapshot.data);
|
|
793
793
|
return snapshot;
|
|
794
794
|
}
|
|
795
|
-
function ingestError$
|
|
796
|
-
const key = keyBuilder$
|
|
795
|
+
function ingestError$2(luvio, params, error, snapshotRefresh) {
|
|
796
|
+
const key = keyBuilder$6();
|
|
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$3(config) {
|
|
802
802
|
const headers = {};
|
|
803
803
|
return {
|
|
804
804
|
baseUri: '/services/data/v59.0',
|
|
@@ -819,58 +819,58 @@ const getAvailableTopics_ConfigPropertyNames = {
|
|
|
819
819
|
optional: []
|
|
820
820
|
}
|
|
821
821
|
};
|
|
822
|
-
function createResourceParams$
|
|
822
|
+
function createResourceParams$3(config) {
|
|
823
823
|
const resourceParams = {};
|
|
824
824
|
return resourceParams;
|
|
825
825
|
}
|
|
826
|
-
function keyBuilder$
|
|
827
|
-
return keyBuilder$
|
|
826
|
+
function keyBuilder$5(luvio, config) {
|
|
827
|
+
return keyBuilder$6();
|
|
828
828
|
}
|
|
829
|
-
function typeCheckConfig$
|
|
829
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
830
830
|
const config = {};
|
|
831
831
|
return config;
|
|
832
832
|
}
|
|
833
|
-
function validateAdapterConfig$
|
|
833
|
+
function validateAdapterConfig$3(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$3();
|
|
841
841
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
842
842
|
return null;
|
|
843
843
|
}
|
|
844
844
|
return config;
|
|
845
845
|
}
|
|
846
|
-
function adapterFragment$
|
|
847
|
-
return select$
|
|
846
|
+
function adapterFragment$2(luvio, config) {
|
|
847
|
+
return select$8();
|
|
848
848
|
}
|
|
849
|
-
function onFetchResponseSuccess$
|
|
850
|
-
const snapshot = ingestSuccess$
|
|
849
|
+
function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
|
|
850
|
+
const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
|
|
851
851
|
config,
|
|
852
|
-
resolve: () => buildNetworkSnapshot$
|
|
852
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
853
853
|
});
|
|
854
854
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
855
855
|
}
|
|
856
|
-
function onFetchResponseError$
|
|
857
|
-
const snapshot = ingestError$
|
|
856
|
+
function onFetchResponseError$2(luvio, config, resourceParams, response) {
|
|
857
|
+
const snapshot = ingestError$2(luvio, resourceParams, response, {
|
|
858
858
|
config,
|
|
859
|
-
resolve: () => buildNetworkSnapshot$
|
|
859
|
+
resolve: () => buildNetworkSnapshot$3(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$3(luvio, config, options) {
|
|
864
|
+
const resourceParams = createResourceParams$3();
|
|
865
|
+
const request = createResourceRequest$3();
|
|
866
866
|
return luvio.dispatchResourceRequest(request, options)
|
|
867
867
|
.then((response) => {
|
|
868
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
868
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => getResponseCacheKeys$3(luvio, resourceParams, response.body));
|
|
869
869
|
}, (response) => {
|
|
870
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
870
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
|
|
871
871
|
});
|
|
872
872
|
}
|
|
873
|
-
function buildNetworkSnapshotCachePolicy$
|
|
873
|
+
function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
|
|
874
874
|
const { luvio, config } = context;
|
|
875
875
|
const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
|
|
876
876
|
const dispatchOptions = {
|
|
@@ -885,32 +885,32 @@ function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext
|
|
|
885
885
|
priority: networkPriority
|
|
886
886
|
};
|
|
887
887
|
}
|
|
888
|
-
return buildNetworkSnapshot$
|
|
888
|
+
return buildNetworkSnapshot$3(luvio, config, dispatchOptions);
|
|
889
889
|
}
|
|
890
|
-
function buildCachedSnapshotCachePolicy$
|
|
890
|
+
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
891
891
|
const { luvio, config } = context;
|
|
892
892
|
const selector = {
|
|
893
|
-
recordId: keyBuilder$
|
|
894
|
-
node: adapterFragment$
|
|
893
|
+
recordId: keyBuilder$5(),
|
|
894
|
+
node: adapterFragment$2(),
|
|
895
895
|
variables: {},
|
|
896
896
|
};
|
|
897
897
|
const cacheSnapshot = storeLookup(selector, {
|
|
898
898
|
config,
|
|
899
|
-
resolve: () => buildNetworkSnapshot$
|
|
899
|
+
resolve: () => buildNetworkSnapshot$3(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$3(untrustedConfig, getAvailableTopics_ConfigPropertyNames);
|
|
905
905
|
// Invalid or incomplete config
|
|
906
906
|
if (config === null) {
|
|
907
907
|
return null;
|
|
908
908
|
}
|
|
909
909
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
910
|
-
buildCachedSnapshotCachePolicy$
|
|
910
|
+
buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
|
|
911
911
|
};
|
|
912
912
|
|
|
913
|
-
function validate$
|
|
913
|
+
function validate$l(obj, path = 'CarePlanTaskInputRepresentation') {
|
|
914
914
|
const v_error = (() => {
|
|
915
915
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
916
916
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -975,7 +975,7 @@ function validate$f(obj, path = 'CarePlanTaskInputRepresentation') {
|
|
|
975
975
|
return v_error === undefined ? null : v_error;
|
|
976
976
|
}
|
|
977
977
|
|
|
978
|
-
function validate$
|
|
978
|
+
function validate$k(obj, path = 'BenefitDisbursementForBenefitSessionInputRepresentation') {
|
|
979
979
|
const v_error = (() => {
|
|
980
980
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
981
981
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1029,7 +1029,7 @@ function validate$e(obj, path = 'BenefitDisbursementForBenefitSessionInputRepres
|
|
|
1029
1029
|
return v_error === undefined ? null : v_error;
|
|
1030
1030
|
}
|
|
1031
1031
|
|
|
1032
|
-
function validate$
|
|
1032
|
+
function validate$j(obj, path = 'BenefitDisbursementListInputRepresentation') {
|
|
1033
1033
|
const v_error = (() => {
|
|
1034
1034
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1035
1035
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1042,7 +1042,7 @@ function validate$d(obj, path = 'BenefitDisbursementListInputRepresentation') {
|
|
|
1042
1042
|
for (let i = 0; i < obj_records.length; i++) {
|
|
1043
1043
|
const obj_records_item = obj_records[i];
|
|
1044
1044
|
const path_records_item = path_records + '[' + i + ']';
|
|
1045
|
-
const referencepath_records_itemValidationError = validate$
|
|
1045
|
+
const referencepath_records_itemValidationError = validate$k(obj_records_item, path_records_item);
|
|
1046
1046
|
if (referencepath_records_itemValidationError !== null) {
|
|
1047
1047
|
let message = 'Object doesn\'t match BenefitDisbursementForBenefitSessionInputRepresentation (at "' + path_records_item + '")\n';
|
|
1048
1048
|
message += referencepath_records_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1053,7 +1053,7 @@ function validate$d(obj, path = 'BenefitDisbursementListInputRepresentation') {
|
|
|
1053
1053
|
return v_error === undefined ? null : v_error;
|
|
1054
1054
|
}
|
|
1055
1055
|
|
|
1056
|
-
function validate$
|
|
1056
|
+
function validate$i(obj, path = 'CustomFieldInputRepresentation') {
|
|
1057
1057
|
const v_error = (() => {
|
|
1058
1058
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1059
1059
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1079,7 +1079,7 @@ function validate$c(obj, path = 'CustomFieldInputRepresentation') {
|
|
|
1079
1079
|
return v_error === undefined ? null : v_error;
|
|
1080
1080
|
}
|
|
1081
1081
|
|
|
1082
|
-
function validate$
|
|
1082
|
+
function validate$h(obj, path = 'CustomFieldListInputRepresentation') {
|
|
1083
1083
|
const v_error = (() => {
|
|
1084
1084
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1085
1085
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1092,7 +1092,7 @@ function validate$b(obj, path = 'CustomFieldListInputRepresentation') {
|
|
|
1092
1092
|
for (let i = 0; i < obj_records.length; i++) {
|
|
1093
1093
|
const obj_records_item = obj_records[i];
|
|
1094
1094
|
const path_records_item = path_records + '[' + i + ']';
|
|
1095
|
-
const referencepath_records_itemValidationError = validate$
|
|
1095
|
+
const referencepath_records_itemValidationError = validate$i(obj_records_item, path_records_item);
|
|
1096
1096
|
if (referencepath_records_itemValidationError !== null) {
|
|
1097
1097
|
let message = 'Object doesn\'t match CustomFieldInputRepresentation (at "' + path_records_item + '")\n';
|
|
1098
1098
|
message += referencepath_records_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1103,7 +1103,7 @@ function validate$b(obj, path = 'CustomFieldListInputRepresentation') {
|
|
|
1103
1103
|
return v_error === undefined ? null : v_error;
|
|
1104
1104
|
}
|
|
1105
1105
|
|
|
1106
|
-
function validate$
|
|
1106
|
+
function validate$g(obj, path = 'BenefitAssignmentInputRepresentation') {
|
|
1107
1107
|
const v_error = (() => {
|
|
1108
1108
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1109
1109
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1111,7 +1111,7 @@ function validate$a(obj, path = 'BenefitAssignmentInputRepresentation') {
|
|
|
1111
1111
|
if (obj.benefitAssignmentTasks !== undefined) {
|
|
1112
1112
|
const obj_benefitAssignmentTasks = obj.benefitAssignmentTasks;
|
|
1113
1113
|
const path_benefitAssignmentTasks = path + '.benefitAssignmentTasks';
|
|
1114
|
-
const referencepath_benefitAssignmentTasksValidationError = validate$
|
|
1114
|
+
const referencepath_benefitAssignmentTasksValidationError = validate$l(obj_benefitAssignmentTasks, path_benefitAssignmentTasks);
|
|
1115
1115
|
if (referencepath_benefitAssignmentTasksValidationError !== null) {
|
|
1116
1116
|
let message = 'Object doesn\'t match CarePlanTaskInputRepresentation (at "' + path_benefitAssignmentTasks + '")\n';
|
|
1117
1117
|
message += referencepath_benefitAssignmentTasksValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1121,7 +1121,7 @@ function validate$a(obj, path = 'BenefitAssignmentInputRepresentation') {
|
|
|
1121
1121
|
if (obj.benefitDisbursements !== undefined) {
|
|
1122
1122
|
const obj_benefitDisbursements = obj.benefitDisbursements;
|
|
1123
1123
|
const path_benefitDisbursements = path + '.benefitDisbursements';
|
|
1124
|
-
const referencepath_benefitDisbursementsValidationError = validate$
|
|
1124
|
+
const referencepath_benefitDisbursementsValidationError = validate$j(obj_benefitDisbursements, path_benefitDisbursements);
|
|
1125
1125
|
if (referencepath_benefitDisbursementsValidationError !== null) {
|
|
1126
1126
|
let message = 'Object doesn\'t match BenefitDisbursementListInputRepresentation (at "' + path_benefitDisbursements + '")\n';
|
|
1127
1127
|
message += referencepath_benefitDisbursementsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1143,7 +1143,7 @@ function validate$a(obj, path = 'BenefitAssignmentInputRepresentation') {
|
|
|
1143
1143
|
if (obj.customFields !== undefined) {
|
|
1144
1144
|
const obj_customFields = obj.customFields;
|
|
1145
1145
|
const path_customFields = path + '.customFields';
|
|
1146
|
-
const referencepath_customFieldsValidationError = validate$
|
|
1146
|
+
const referencepath_customFieldsValidationError = validate$h(obj_customFields, path_customFields);
|
|
1147
1147
|
if (referencepath_customFieldsValidationError !== null) {
|
|
1148
1148
|
let message = 'Object doesn\'t match CustomFieldListInputRepresentation (at "' + path_customFields + '")\n';
|
|
1149
1149
|
message += referencepath_customFieldsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1214,7 +1214,7 @@ function validate$a(obj, path = 'BenefitAssignmentInputRepresentation') {
|
|
|
1214
1214
|
return v_error === undefined ? null : v_error;
|
|
1215
1215
|
}
|
|
1216
1216
|
|
|
1217
|
-
function validate$
|
|
1217
|
+
function validate$f(obj, path = 'BenefitAssignmentListInputRepresentation') {
|
|
1218
1218
|
const v_error = (() => {
|
|
1219
1219
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1220
1220
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1227,7 +1227,7 @@ function validate$9(obj, path = 'BenefitAssignmentListInputRepresentation') {
|
|
|
1227
1227
|
for (let i = 0; i < obj_records.length; i++) {
|
|
1228
1228
|
const obj_records_item = obj_records[i];
|
|
1229
1229
|
const path_records_item = path_records + '[' + i + ']';
|
|
1230
|
-
const referencepath_records_itemValidationError = validate$
|
|
1230
|
+
const referencepath_records_itemValidationError = validate$g(obj_records_item, path_records_item);
|
|
1231
1231
|
if (referencepath_records_itemValidationError !== null) {
|
|
1232
1232
|
let message = 'Object doesn\'t match BenefitAssignmentInputRepresentation (at "' + path_records_item + '")\n';
|
|
1233
1233
|
message += referencepath_records_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1238,7 +1238,7 @@ function validate$9(obj, path = 'BenefitAssignmentListInputRepresentation') {
|
|
|
1238
1238
|
return v_error === undefined ? null : v_error;
|
|
1239
1239
|
}
|
|
1240
1240
|
|
|
1241
|
-
function validate$
|
|
1241
|
+
function validate$e(obj, path = 'GoalAssignmentInputRepresentation') {
|
|
1242
1242
|
const v_error = (() => {
|
|
1243
1243
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1244
1244
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1246,7 +1246,7 @@ function validate$8(obj, path = 'GoalAssignmentInputRepresentation') {
|
|
|
1246
1246
|
if (obj.associatedBenefitAssignments !== undefined) {
|
|
1247
1247
|
const obj_associatedBenefitAssignments = obj.associatedBenefitAssignments;
|
|
1248
1248
|
const path_associatedBenefitAssignments = path + '.associatedBenefitAssignments';
|
|
1249
|
-
const referencepath_associatedBenefitAssignmentsValidationError = validate$
|
|
1249
|
+
const referencepath_associatedBenefitAssignmentsValidationError = validate$f(obj_associatedBenefitAssignments, path_associatedBenefitAssignments);
|
|
1250
1250
|
if (referencepath_associatedBenefitAssignmentsValidationError !== null) {
|
|
1251
1251
|
let message = 'Object doesn\'t match BenefitAssignmentListInputRepresentation (at "' + path_associatedBenefitAssignments + '")\n';
|
|
1252
1252
|
message += referencepath_associatedBenefitAssignmentsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1256,7 +1256,7 @@ function validate$8(obj, path = 'GoalAssignmentInputRepresentation') {
|
|
|
1256
1256
|
if (obj.associatedSubGoalAssignments !== undefined) {
|
|
1257
1257
|
const obj_associatedSubGoalAssignments = obj.associatedSubGoalAssignments;
|
|
1258
1258
|
const path_associatedSubGoalAssignments = path + '.associatedSubGoalAssignments';
|
|
1259
|
-
const referencepath_associatedSubGoalAssignmentsValidationError = validate$
|
|
1259
|
+
const referencepath_associatedSubGoalAssignmentsValidationError = validate$d(obj_associatedSubGoalAssignments, path_associatedSubGoalAssignments);
|
|
1260
1260
|
if (referencepath_associatedSubGoalAssignmentsValidationError !== null) {
|
|
1261
1261
|
let message = 'Object doesn\'t match GoalAssignmentListInputRepresentation (at "' + path_associatedSubGoalAssignments + '")\n';
|
|
1262
1262
|
message += referencepath_associatedSubGoalAssignmentsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1276,7 +1276,7 @@ function validate$8(obj, path = 'GoalAssignmentInputRepresentation') {
|
|
|
1276
1276
|
if (obj.customFields !== undefined) {
|
|
1277
1277
|
const obj_customFields = obj.customFields;
|
|
1278
1278
|
const path_customFields = path + '.customFields';
|
|
1279
|
-
const referencepath_customFieldsValidationError = validate$
|
|
1279
|
+
const referencepath_customFieldsValidationError = validate$h(obj_customFields, path_customFields);
|
|
1280
1280
|
if (referencepath_customFieldsValidationError !== null) {
|
|
1281
1281
|
let message = 'Object doesn\'t match CustomFieldListInputRepresentation (at "' + path_customFields + '")\n';
|
|
1282
1282
|
message += referencepath_customFieldsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1300,7 +1300,7 @@ function validate$8(obj, path = 'GoalAssignmentInputRepresentation') {
|
|
|
1300
1300
|
if (obj.goalAssignmentTasks !== undefined) {
|
|
1301
1301
|
const obj_goalAssignmentTasks = obj.goalAssignmentTasks;
|
|
1302
1302
|
const path_goalAssignmentTasks = path + '.goalAssignmentTasks';
|
|
1303
|
-
const referencepath_goalAssignmentTasksValidationError = validate$
|
|
1303
|
+
const referencepath_goalAssignmentTasksValidationError = validate$l(obj_goalAssignmentTasks, path_goalAssignmentTasks);
|
|
1304
1304
|
if (referencepath_goalAssignmentTasksValidationError !== null) {
|
|
1305
1305
|
let message = 'Object doesn\'t match CarePlanTaskInputRepresentation (at "' + path_goalAssignmentTasks + '")\n';
|
|
1306
1306
|
message += referencepath_goalAssignmentTasksValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1351,7 +1351,7 @@ function validate$8(obj, path = 'GoalAssignmentInputRepresentation') {
|
|
|
1351
1351
|
return v_error === undefined ? null : v_error;
|
|
1352
1352
|
}
|
|
1353
1353
|
|
|
1354
|
-
function validate$
|
|
1354
|
+
function validate$d(obj, path = 'GoalAssignmentListInputRepresentation') {
|
|
1355
1355
|
const v_error = (() => {
|
|
1356
1356
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1357
1357
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1364,7 +1364,7 @@ function validate$7(obj, path = 'GoalAssignmentListInputRepresentation') {
|
|
|
1364
1364
|
for (let i = 0; i < obj_records.length; i++) {
|
|
1365
1365
|
const obj_records_item = obj_records[i];
|
|
1366
1366
|
const path_records_item = path_records + '[' + i + ']';
|
|
1367
|
-
const referencepath_records_itemValidationError = validate$
|
|
1367
|
+
const referencepath_records_itemValidationError = validate$e(obj_records_item, path_records_item);
|
|
1368
1368
|
if (referencepath_records_itemValidationError !== null) {
|
|
1369
1369
|
let message = 'Object doesn\'t match GoalAssignmentInputRepresentation (at "' + path_records_item + '")\n';
|
|
1370
1370
|
message += referencepath_records_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1375,7 +1375,7 @@ function validate$7(obj, path = 'GoalAssignmentListInputRepresentation') {
|
|
|
1375
1375
|
return v_error === undefined ? null : v_error;
|
|
1376
1376
|
}
|
|
1377
1377
|
|
|
1378
|
-
function validate$
|
|
1378
|
+
function validate$c(obj, path = 'CarePlanInputRepresentation') {
|
|
1379
1379
|
const v_error = (() => {
|
|
1380
1380
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1381
1381
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1383,7 +1383,7 @@ function validate$6(obj, path = 'CarePlanInputRepresentation') {
|
|
|
1383
1383
|
if (obj.benefitAssignments !== undefined) {
|
|
1384
1384
|
const obj_benefitAssignments = obj.benefitAssignments;
|
|
1385
1385
|
const path_benefitAssignments = path + '.benefitAssignments';
|
|
1386
|
-
const referencepath_benefitAssignmentsValidationError = validate$
|
|
1386
|
+
const referencepath_benefitAssignmentsValidationError = validate$f(obj_benefitAssignments, path_benefitAssignments);
|
|
1387
1387
|
if (referencepath_benefitAssignmentsValidationError !== null) {
|
|
1388
1388
|
let message = 'Object doesn\'t match BenefitAssignmentListInputRepresentation (at "' + path_benefitAssignments + '")\n';
|
|
1389
1389
|
message += referencepath_benefitAssignmentsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1393,7 +1393,7 @@ function validate$6(obj, path = 'CarePlanInputRepresentation') {
|
|
|
1393
1393
|
if (obj.carePlanTasks !== undefined) {
|
|
1394
1394
|
const obj_carePlanTasks = obj.carePlanTasks;
|
|
1395
1395
|
const path_carePlanTasks = path + '.carePlanTasks';
|
|
1396
|
-
const referencepath_carePlanTasksValidationError = validate$
|
|
1396
|
+
const referencepath_carePlanTasksValidationError = validate$l(obj_carePlanTasks, path_carePlanTasks);
|
|
1397
1397
|
if (referencepath_carePlanTasksValidationError !== null) {
|
|
1398
1398
|
let message = 'Object doesn\'t match CarePlanTaskInputRepresentation (at "' + path_carePlanTasks + '")\n';
|
|
1399
1399
|
message += referencepath_carePlanTasksValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1415,7 +1415,7 @@ function validate$6(obj, path = 'CarePlanInputRepresentation') {
|
|
|
1415
1415
|
if (obj.customFields !== undefined) {
|
|
1416
1416
|
const obj_customFields = obj.customFields;
|
|
1417
1417
|
const path_customFields = path + '.customFields';
|
|
1418
|
-
const referencepath_customFieldsValidationError = validate$
|
|
1418
|
+
const referencepath_customFieldsValidationError = validate$h(obj_customFields, path_customFields);
|
|
1419
1419
|
if (referencepath_customFieldsValidationError !== null) {
|
|
1420
1420
|
let message = 'Object doesn\'t match CustomFieldListInputRepresentation (at "' + path_customFields + '")\n';
|
|
1421
1421
|
message += referencepath_customFieldsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1439,7 +1439,7 @@ function validate$6(obj, path = 'CarePlanInputRepresentation') {
|
|
|
1439
1439
|
if (obj.goalAssignments !== undefined) {
|
|
1440
1440
|
const obj_goalAssignments = obj.goalAssignments;
|
|
1441
1441
|
const path_goalAssignments = path + '.goalAssignments';
|
|
1442
|
-
const referencepath_goalAssignmentsValidationError = validate$
|
|
1442
|
+
const referencepath_goalAssignmentsValidationError = validate$d(obj_goalAssignments, path_goalAssignments);
|
|
1443
1443
|
if (referencepath_goalAssignmentsValidationError !== null) {
|
|
1444
1444
|
let message = 'Object doesn\'t match GoalAssignmentListInputRepresentation (at "' + path_goalAssignments + '")\n';
|
|
1445
1445
|
message += referencepath_goalAssignmentsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1486,7 +1486,7 @@ function validate$6(obj, path = 'CarePlanInputRepresentation') {
|
|
|
1486
1486
|
return v_error === undefined ? null : v_error;
|
|
1487
1487
|
}
|
|
1488
1488
|
|
|
1489
|
-
function validate$
|
|
1489
|
+
function validate$b(obj, path = 'CarePlanListInputRepresentation') {
|
|
1490
1490
|
const v_error = (() => {
|
|
1491
1491
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1492
1492
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1499,7 +1499,7 @@ function validate$5(obj, path = 'CarePlanListInputRepresentation') {
|
|
|
1499
1499
|
for (let i = 0; i < obj_records.length; i++) {
|
|
1500
1500
|
const obj_records_item = obj_records[i];
|
|
1501
1501
|
const path_records_item = path_records + '[' + i + ']';
|
|
1502
|
-
const referencepath_records_itemValidationError = validate$
|
|
1502
|
+
const referencepath_records_itemValidationError = validate$c(obj_records_item, path_records_item);
|
|
1503
1503
|
if (referencepath_records_itemValidationError !== null) {
|
|
1504
1504
|
let message = 'Object doesn\'t match CarePlanInputRepresentation (at "' + path_records_item + '")\n';
|
|
1505
1505
|
message += referencepath_records_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1510,14 +1510,14 @@ function validate$5(obj, path = 'CarePlanListInputRepresentation') {
|
|
|
1510
1510
|
return v_error === undefined ? null : v_error;
|
|
1511
1511
|
}
|
|
1512
1512
|
|
|
1513
|
-
function validate$
|
|
1513
|
+
function validate$a(obj, path = 'CarePlanBulkInputRepresentation') {
|
|
1514
1514
|
const v_error = (() => {
|
|
1515
1515
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1516
1516
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1517
1517
|
}
|
|
1518
1518
|
const obj_carePlans = obj.carePlans;
|
|
1519
1519
|
const path_carePlans = path + '.carePlans';
|
|
1520
|
-
const referencepath_carePlansValidationError = validate$
|
|
1520
|
+
const referencepath_carePlansValidationError = validate$b(obj_carePlans, path_carePlans);
|
|
1521
1521
|
if (referencepath_carePlansValidationError !== null) {
|
|
1522
1522
|
let message = 'Object doesn\'t match CarePlanListInputRepresentation (at "' + path_carePlans + '")\n';
|
|
1523
1523
|
message += referencepath_carePlansValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1528,8 +1528,8 @@ function validate$4(obj, path = 'CarePlanBulkInputRepresentation') {
|
|
|
1528
1528
|
}
|
|
1529
1529
|
|
|
1530
1530
|
const TTL = 100;
|
|
1531
|
-
const VERSION$
|
|
1532
|
-
function validate$
|
|
1531
|
+
const VERSION$4 = "83a45266096a71720e9049cb0f0477d6";
|
|
1532
|
+
function validate$9(obj, path = 'CarePlanBulkOutputRepresentation') {
|
|
1533
1533
|
const v_error = (() => {
|
|
1534
1534
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1535
1535
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1556,36 +1556,36 @@ function validate$3(obj, path = 'CarePlanBulkOutputRepresentation') {
|
|
|
1556
1556
|
})();
|
|
1557
1557
|
return v_error === undefined ? null : v_error;
|
|
1558
1558
|
}
|
|
1559
|
-
const RepresentationType$
|
|
1560
|
-
function keyBuilder$
|
|
1561
|
-
return keyPrefix + '::' + RepresentationType$
|
|
1559
|
+
const RepresentationType$2 = 'CarePlanBulkOutputRepresentation';
|
|
1560
|
+
function keyBuilder$4(luvio, config) {
|
|
1561
|
+
return keyPrefix + '::' + RepresentationType$2 + ':' + config.id;
|
|
1562
1562
|
}
|
|
1563
1563
|
function keyBuilderFromType(luvio, object) {
|
|
1564
1564
|
const keyParams = {
|
|
1565
1565
|
id: object.statusCode
|
|
1566
1566
|
};
|
|
1567
|
-
return keyBuilder$
|
|
1567
|
+
return keyBuilder$4(luvio, keyParams);
|
|
1568
1568
|
}
|
|
1569
|
-
function normalize$
|
|
1569
|
+
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
1570
1570
|
return input;
|
|
1571
1571
|
}
|
|
1572
|
-
const select$
|
|
1572
|
+
const select$7 = function CarePlanBulkOutputRepresentationSelect() {
|
|
1573
1573
|
return {
|
|
1574
1574
|
kind: 'Fragment',
|
|
1575
|
-
version: VERSION$
|
|
1575
|
+
version: VERSION$4,
|
|
1576
1576
|
private: [],
|
|
1577
1577
|
opaque: true
|
|
1578
1578
|
};
|
|
1579
1579
|
};
|
|
1580
|
-
function equals$
|
|
1580
|
+
function equals$4(existing, incoming) {
|
|
1581
1581
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
1582
1582
|
return false;
|
|
1583
1583
|
}
|
|
1584
1584
|
return true;
|
|
1585
1585
|
}
|
|
1586
|
-
const ingest$
|
|
1586
|
+
const ingest$2 = function CarePlanBulkOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1587
1587
|
if (process.env.NODE_ENV !== 'production') {
|
|
1588
|
-
const validateError = validate$
|
|
1588
|
+
const validateError = validate$9(input);
|
|
1589
1589
|
if (validateError !== null) {
|
|
1590
1590
|
throw validateError;
|
|
1591
1591
|
}
|
|
@@ -1593,51 +1593,51 @@ const ingest$1 = function CarePlanBulkOutputRepresentationIngest(input, path, lu
|
|
|
1593
1593
|
const key = keyBuilderFromType(luvio, input);
|
|
1594
1594
|
const existingRecord = store.readEntry(key);
|
|
1595
1595
|
const ttlToUse = TTL;
|
|
1596
|
-
let incomingRecord = normalize$
|
|
1596
|
+
let incomingRecord = normalize$2(input, store.readEntry(key), {
|
|
1597
1597
|
fullPath: key,
|
|
1598
1598
|
parent: path.parent,
|
|
1599
1599
|
propertyName: path.propertyName,
|
|
1600
1600
|
ttl: ttlToUse
|
|
1601
1601
|
});
|
|
1602
|
-
if (existingRecord === undefined || equals$
|
|
1602
|
+
if (existingRecord === undefined || equals$4(existingRecord, incomingRecord) === false) {
|
|
1603
1603
|
luvio.storePublish(key, incomingRecord);
|
|
1604
1604
|
}
|
|
1605
1605
|
{
|
|
1606
1606
|
const storeMetadataParams = {
|
|
1607
1607
|
ttl: ttlToUse,
|
|
1608
1608
|
namespace: "education",
|
|
1609
|
-
version: VERSION$
|
|
1610
|
-
representationName: RepresentationType$
|
|
1609
|
+
version: VERSION$4,
|
|
1610
|
+
representationName: RepresentationType$2,
|
|
1611
1611
|
};
|
|
1612
1612
|
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
1613
1613
|
}
|
|
1614
1614
|
return createLink(key);
|
|
1615
1615
|
};
|
|
1616
|
-
function getTypeCacheKeys$
|
|
1616
|
+
function getTypeCacheKeys$2(luvio, input, fullPathFactory) {
|
|
1617
1617
|
const rootKeySet = new StoreKeyMap();
|
|
1618
1618
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1619
1619
|
const rootKey = keyBuilderFromType(luvio, input);
|
|
1620
1620
|
rootKeySet.set(rootKey, {
|
|
1621
1621
|
namespace: keyPrefix,
|
|
1622
|
-
representationName: RepresentationType$
|
|
1622
|
+
representationName: RepresentationType$2,
|
|
1623
1623
|
mergeable: false
|
|
1624
1624
|
});
|
|
1625
1625
|
return rootKeySet;
|
|
1626
1626
|
}
|
|
1627
1627
|
|
|
1628
|
-
function select$
|
|
1629
|
-
return select$
|
|
1628
|
+
function select$6(luvio, params) {
|
|
1629
|
+
return select$7();
|
|
1630
1630
|
}
|
|
1631
|
-
function getResponseCacheKeys$
|
|
1632
|
-
return getTypeCacheKeys$
|
|
1631
|
+
function getResponseCacheKeys$2(luvio, resourceParams, response) {
|
|
1632
|
+
return getTypeCacheKeys$2(luvio, response);
|
|
1633
1633
|
}
|
|
1634
|
-
function ingestSuccess$
|
|
1634
|
+
function ingestSuccess$2(luvio, resourceParams, response) {
|
|
1635
1635
|
const { body } = response;
|
|
1636
1636
|
const key = keyBuilderFromType(luvio, body);
|
|
1637
|
-
luvio.storeIngest(key, ingest$
|
|
1637
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
1638
1638
|
const snapshot = luvio.storeLookup({
|
|
1639
1639
|
recordId: key,
|
|
1640
|
-
node: select$
|
|
1640
|
+
node: select$6(),
|
|
1641
1641
|
variables: {},
|
|
1642
1642
|
});
|
|
1643
1643
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1648,7 +1648,7 @@ function ingestSuccess$1(luvio, resourceParams, response) {
|
|
|
1648
1648
|
deepFreeze(snapshot.data);
|
|
1649
1649
|
return snapshot;
|
|
1650
1650
|
}
|
|
1651
|
-
function createResourceRequest$
|
|
1651
|
+
function createResourceRequest$2(config) {
|
|
1652
1652
|
const headers = {};
|
|
1653
1653
|
return {
|
|
1654
1654
|
baseUri: '/services/data/v59.0',
|
|
@@ -1669,7 +1669,7 @@ const createCarePlans_ConfigPropertyNames = {
|
|
|
1669
1669
|
optional: []
|
|
1670
1670
|
}
|
|
1671
1671
|
};
|
|
1672
|
-
function createResourceParams$
|
|
1672
|
+
function createResourceParams$2(config) {
|
|
1673
1673
|
const resourceParams = {
|
|
1674
1674
|
body: {
|
|
1675
1675
|
carePlanBulkRecord: config.carePlanBulkRecord
|
|
@@ -1677,37 +1677,37 @@ function createResourceParams$1(config) {
|
|
|
1677
1677
|
};
|
|
1678
1678
|
return resourceParams;
|
|
1679
1679
|
}
|
|
1680
|
-
function typeCheckConfig$
|
|
1680
|
+
function typeCheckConfig$2(untrustedConfig) {
|
|
1681
1681
|
const config = {};
|
|
1682
1682
|
const untrustedConfig_carePlanBulkRecord = untrustedConfig.carePlanBulkRecord;
|
|
1683
|
-
const referenceCarePlanBulkInputRepresentationValidationError = validate$
|
|
1683
|
+
const referenceCarePlanBulkInputRepresentationValidationError = validate$a(untrustedConfig_carePlanBulkRecord);
|
|
1684
1684
|
if (referenceCarePlanBulkInputRepresentationValidationError === null) {
|
|
1685
1685
|
config.carePlanBulkRecord = untrustedConfig_carePlanBulkRecord;
|
|
1686
1686
|
}
|
|
1687
1687
|
return config;
|
|
1688
1688
|
}
|
|
1689
|
-
function validateAdapterConfig$
|
|
1689
|
+
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
1690
1690
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1691
1691
|
return null;
|
|
1692
1692
|
}
|
|
1693
1693
|
if (process.env.NODE_ENV !== 'production') {
|
|
1694
1694
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1695
1695
|
}
|
|
1696
|
-
const config = typeCheckConfig$
|
|
1696
|
+
const config = typeCheckConfig$2(untrustedConfig);
|
|
1697
1697
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1698
1698
|
return null;
|
|
1699
1699
|
}
|
|
1700
1700
|
return config;
|
|
1701
1701
|
}
|
|
1702
|
-
function buildNetworkSnapshot$
|
|
1703
|
-
const resourceParams = createResourceParams$
|
|
1704
|
-
const request = createResourceRequest$
|
|
1702
|
+
function buildNetworkSnapshot$2(luvio, config, options) {
|
|
1703
|
+
const resourceParams = createResourceParams$2(config);
|
|
1704
|
+
const request = createResourceRequest$2(resourceParams);
|
|
1705
1705
|
return luvio.dispatchResourceRequest(request, options)
|
|
1706
1706
|
.then((response) => {
|
|
1707
1707
|
return luvio.handleSuccessResponse(() => {
|
|
1708
|
-
const snapshot = ingestSuccess$
|
|
1708
|
+
const snapshot = ingestSuccess$2(luvio, resourceParams, response);
|
|
1709
1709
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1710
|
-
}, () => getResponseCacheKeys$
|
|
1710
|
+
}, () => getResponseCacheKeys$2(luvio, resourceParams, response.body));
|
|
1711
1711
|
}, (response) => {
|
|
1712
1712
|
deepFreeze(response);
|
|
1713
1713
|
throw response;
|
|
@@ -1715,14 +1715,532 @@ function buildNetworkSnapshot$1(luvio, config, options) {
|
|
|
1715
1715
|
}
|
|
1716
1716
|
const createCarePlansAdapterFactory = (luvio) => {
|
|
1717
1717
|
return function createCarePlans(untrustedConfig) {
|
|
1718
|
-
const config = validateAdapterConfig$
|
|
1718
|
+
const config = validateAdapterConfig$2(untrustedConfig, createCarePlans_ConfigPropertyNames);
|
|
1719
1719
|
// Invalid or incomplete config
|
|
1720
1720
|
if (config === null) {
|
|
1721
1721
|
throw new Error('Invalid config for "createCarePlans"');
|
|
1722
1722
|
}
|
|
1723
|
-
return buildNetworkSnapshot$
|
|
1723
|
+
return buildNetworkSnapshot$2(luvio, config);
|
|
1724
|
+
};
|
|
1725
|
+
};
|
|
1726
|
+
|
|
1727
|
+
function validate$8(obj, path = 'AcademicCredential') {
|
|
1728
|
+
const v_error = (() => {
|
|
1729
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1730
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1731
|
+
}
|
|
1732
|
+
if (obj.credentialName !== undefined) {
|
|
1733
|
+
const obj_credentialName = obj.credentialName;
|
|
1734
|
+
const path_credentialName = path + '.credentialName';
|
|
1735
|
+
if (typeof obj_credentialName !== 'string') {
|
|
1736
|
+
return new TypeError('Expected "string" but received "' + typeof obj_credentialName + '" (at "' + path_credentialName + '")');
|
|
1737
|
+
}
|
|
1738
|
+
}
|
|
1739
|
+
if (obj.credentialType !== undefined) {
|
|
1740
|
+
const obj_credentialType = obj.credentialType;
|
|
1741
|
+
const path_credentialType = path + '.credentialType';
|
|
1742
|
+
if (typeof obj_credentialType !== 'string') {
|
|
1743
|
+
return new TypeError('Expected "string" but received "' + typeof obj_credentialType + '" (at "' + path_credentialType + '")');
|
|
1744
|
+
}
|
|
1745
|
+
}
|
|
1746
|
+
if (obj.yearAchieved !== undefined) {
|
|
1747
|
+
const obj_yearAchieved = obj.yearAchieved;
|
|
1748
|
+
const path_yearAchieved = path + '.yearAchieved';
|
|
1749
|
+
if (typeof obj_yearAchieved !== 'string') {
|
|
1750
|
+
return new TypeError('Expected "string" but received "' + typeof obj_yearAchieved + '" (at "' + path_yearAchieved + '")');
|
|
1751
|
+
}
|
|
1752
|
+
}
|
|
1753
|
+
})();
|
|
1754
|
+
return v_error === undefined ? null : v_error;
|
|
1755
|
+
}
|
|
1756
|
+
|
|
1757
|
+
function validate$7(obj, path = 'AdditionalEducation') {
|
|
1758
|
+
const v_error = (() => {
|
|
1759
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1760
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1761
|
+
}
|
|
1762
|
+
if (obj.educationLevel !== undefined) {
|
|
1763
|
+
const obj_educationLevel = obj.educationLevel;
|
|
1764
|
+
const path_educationLevel = path + '.educationLevel';
|
|
1765
|
+
if (typeof obj_educationLevel !== 'string') {
|
|
1766
|
+
return new TypeError('Expected "string" but received "' + typeof obj_educationLevel + '" (at "' + path_educationLevel + '")');
|
|
1767
|
+
}
|
|
1768
|
+
}
|
|
1769
|
+
if (obj.endYear !== undefined) {
|
|
1770
|
+
const obj_endYear = obj.endYear;
|
|
1771
|
+
const path_endYear = path + '.endYear';
|
|
1772
|
+
if (typeof obj_endYear !== 'string') {
|
|
1773
|
+
return new TypeError('Expected "string" but received "' + typeof obj_endYear + '" (at "' + path_endYear + '")');
|
|
1774
|
+
}
|
|
1775
|
+
}
|
|
1776
|
+
if (obj.institution !== undefined) {
|
|
1777
|
+
const obj_institution = obj.institution;
|
|
1778
|
+
const path_institution = path + '.institution';
|
|
1779
|
+
if (typeof obj_institution !== 'string') {
|
|
1780
|
+
return new TypeError('Expected "string" but received "' + typeof obj_institution + '" (at "' + path_institution + '")');
|
|
1781
|
+
}
|
|
1782
|
+
}
|
|
1783
|
+
if (obj.name !== undefined) {
|
|
1784
|
+
const obj_name = obj.name;
|
|
1785
|
+
const path_name = path + '.name';
|
|
1786
|
+
if (typeof obj_name !== 'string') {
|
|
1787
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
1788
|
+
}
|
|
1789
|
+
}
|
|
1790
|
+
})();
|
|
1791
|
+
return v_error === undefined ? null : v_error;
|
|
1792
|
+
}
|
|
1793
|
+
|
|
1794
|
+
function validate$6(obj, path = 'ContactInformation') {
|
|
1795
|
+
const v_error = (() => {
|
|
1796
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1797
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1798
|
+
}
|
|
1799
|
+
if (obj.email !== undefined) {
|
|
1800
|
+
const obj_email = obj.email;
|
|
1801
|
+
const path_email = path + '.email';
|
|
1802
|
+
if (typeof obj_email !== 'string') {
|
|
1803
|
+
return new TypeError('Expected "string" but received "' + typeof obj_email + '" (at "' + path_email + '")');
|
|
1804
|
+
}
|
|
1805
|
+
}
|
|
1806
|
+
if (obj.phone !== undefined) {
|
|
1807
|
+
const obj_phone = obj.phone;
|
|
1808
|
+
const path_phone = path + '.phone';
|
|
1809
|
+
if (typeof obj_phone !== 'string') {
|
|
1810
|
+
return new TypeError('Expected "string" but received "' + typeof obj_phone + '" (at "' + path_phone + '")');
|
|
1811
|
+
}
|
|
1812
|
+
}
|
|
1813
|
+
if (obj.website !== undefined) {
|
|
1814
|
+
const obj_website = obj.website;
|
|
1815
|
+
const path_website = path + '.website';
|
|
1816
|
+
if (typeof obj_website !== 'string') {
|
|
1817
|
+
return new TypeError('Expected "string" but received "' + typeof obj_website + '" (at "' + path_website + '")');
|
|
1818
|
+
}
|
|
1819
|
+
}
|
|
1820
|
+
})();
|
|
1821
|
+
return v_error === undefined ? null : v_error;
|
|
1822
|
+
}
|
|
1823
|
+
|
|
1824
|
+
function validate$5(obj, path = 'PersonPublicProfileInformation') {
|
|
1825
|
+
const v_error = (() => {
|
|
1826
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1827
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1828
|
+
}
|
|
1829
|
+
if (obj.credentialName !== undefined) {
|
|
1830
|
+
const obj_credentialName = obj.credentialName;
|
|
1831
|
+
const path_credentialName = path + '.credentialName';
|
|
1832
|
+
if (typeof obj_credentialName !== 'string') {
|
|
1833
|
+
return new TypeError('Expected "string" but received "' + typeof obj_credentialName + '" (at "' + path_credentialName + '")');
|
|
1834
|
+
}
|
|
1835
|
+
}
|
|
1836
|
+
if (obj.credentialType !== undefined) {
|
|
1837
|
+
const obj_credentialType = obj.credentialType;
|
|
1838
|
+
const path_credentialType = path + '.credentialType';
|
|
1839
|
+
if (typeof obj_credentialType !== 'string') {
|
|
1840
|
+
return new TypeError('Expected "string" but received "' + typeof obj_credentialType + '" (at "' + path_credentialType + '")');
|
|
1841
|
+
}
|
|
1842
|
+
}
|
|
1843
|
+
if (obj.currentLocation !== undefined) {
|
|
1844
|
+
const obj_currentLocation = obj.currentLocation;
|
|
1845
|
+
const path_currentLocation = path + '.currentLocation';
|
|
1846
|
+
if (typeof obj_currentLocation !== 'string') {
|
|
1847
|
+
return new TypeError('Expected "string" but received "' + typeof obj_currentLocation + '" (at "' + path_currentLocation + '")');
|
|
1848
|
+
}
|
|
1849
|
+
}
|
|
1850
|
+
if (obj.name !== undefined) {
|
|
1851
|
+
const obj_name = obj.name;
|
|
1852
|
+
const path_name = path + '.name';
|
|
1853
|
+
if (typeof obj_name !== 'string') {
|
|
1854
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
1855
|
+
}
|
|
1856
|
+
}
|
|
1857
|
+
if (obj.photoUrl !== undefined) {
|
|
1858
|
+
const obj_photoUrl = obj.photoUrl;
|
|
1859
|
+
const path_photoUrl = path + '.photoUrl';
|
|
1860
|
+
if (typeof obj_photoUrl !== 'string') {
|
|
1861
|
+
return new TypeError('Expected "string" but received "' + typeof obj_photoUrl + '" (at "' + path_photoUrl + '")');
|
|
1862
|
+
}
|
|
1863
|
+
}
|
|
1864
|
+
if (obj.pronouns !== undefined) {
|
|
1865
|
+
const obj_pronouns = obj.pronouns;
|
|
1866
|
+
const path_pronouns = path + '.pronouns';
|
|
1867
|
+
if (typeof obj_pronouns !== 'string') {
|
|
1868
|
+
return new TypeError('Expected "string" but received "' + typeof obj_pronouns + '" (at "' + path_pronouns + '")');
|
|
1869
|
+
}
|
|
1870
|
+
}
|
|
1871
|
+
if (obj.yearAchieved !== undefined) {
|
|
1872
|
+
const obj_yearAchieved = obj.yearAchieved;
|
|
1873
|
+
const path_yearAchieved = path + '.yearAchieved';
|
|
1874
|
+
if (typeof obj_yearAchieved !== 'string') {
|
|
1875
|
+
return new TypeError('Expected "string" but received "' + typeof obj_yearAchieved + '" (at "' + path_yearAchieved + '")');
|
|
1876
|
+
}
|
|
1877
|
+
}
|
|
1878
|
+
})();
|
|
1879
|
+
return v_error === undefined ? null : v_error;
|
|
1880
|
+
}
|
|
1881
|
+
|
|
1882
|
+
function validate$4(obj, path = 'ProfessionalExperience') {
|
|
1883
|
+
const v_error = (() => {
|
|
1884
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1885
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1886
|
+
}
|
|
1887
|
+
if (obj.city !== undefined) {
|
|
1888
|
+
const obj_city = obj.city;
|
|
1889
|
+
const path_city = path + '.city';
|
|
1890
|
+
if (typeof obj_city !== 'string') {
|
|
1891
|
+
return new TypeError('Expected "string" but received "' + typeof obj_city + '" (at "' + path_city + '")');
|
|
1892
|
+
}
|
|
1893
|
+
}
|
|
1894
|
+
if (obj.country !== undefined) {
|
|
1895
|
+
const obj_country = obj.country;
|
|
1896
|
+
const path_country = path + '.country';
|
|
1897
|
+
if (typeof obj_country !== 'string') {
|
|
1898
|
+
return new TypeError('Expected "string" but received "' + typeof obj_country + '" (at "' + path_country + '")');
|
|
1899
|
+
}
|
|
1900
|
+
}
|
|
1901
|
+
if (obj.employer !== undefined) {
|
|
1902
|
+
const obj_employer = obj.employer;
|
|
1903
|
+
const path_employer = path + '.employer';
|
|
1904
|
+
if (typeof obj_employer !== 'string') {
|
|
1905
|
+
return new TypeError('Expected "string" but received "' + typeof obj_employer + '" (at "' + path_employer + '")');
|
|
1906
|
+
}
|
|
1907
|
+
}
|
|
1908
|
+
if (obj.endDate !== undefined) {
|
|
1909
|
+
const obj_endDate = obj.endDate;
|
|
1910
|
+
const path_endDate = path + '.endDate';
|
|
1911
|
+
if (typeof obj_endDate !== 'string') {
|
|
1912
|
+
return new TypeError('Expected "string" but received "' + typeof obj_endDate + '" (at "' + path_endDate + '")');
|
|
1913
|
+
}
|
|
1914
|
+
}
|
|
1915
|
+
if (obj.position !== undefined) {
|
|
1916
|
+
const obj_position = obj.position;
|
|
1917
|
+
const path_position = path + '.position';
|
|
1918
|
+
if (typeof obj_position !== 'string') {
|
|
1919
|
+
return new TypeError('Expected "string" but received "' + typeof obj_position + '" (at "' + path_position + '")');
|
|
1920
|
+
}
|
|
1921
|
+
}
|
|
1922
|
+
if (obj.startDate !== undefined) {
|
|
1923
|
+
const obj_startDate = obj.startDate;
|
|
1924
|
+
const path_startDate = path + '.startDate';
|
|
1925
|
+
if (typeof obj_startDate !== 'string') {
|
|
1926
|
+
return new TypeError('Expected "string" but received "' + typeof obj_startDate + '" (at "' + path_startDate + '")');
|
|
1927
|
+
}
|
|
1928
|
+
}
|
|
1929
|
+
if (obj.state !== undefined) {
|
|
1930
|
+
const obj_state = obj.state;
|
|
1931
|
+
const path_state = path + '.state';
|
|
1932
|
+
if (typeof obj_state !== 'string') {
|
|
1933
|
+
return new TypeError('Expected "string" but received "' + typeof obj_state + '" (at "' + path_state + '")');
|
|
1934
|
+
}
|
|
1935
|
+
}
|
|
1936
|
+
})();
|
|
1937
|
+
return v_error === undefined ? null : v_error;
|
|
1938
|
+
}
|
|
1939
|
+
|
|
1940
|
+
const VERSION$3 = "67609700830249d14361e45381429200";
|
|
1941
|
+
function validate$3(obj, path = 'PersonPublicProfileOutputRepresentation') {
|
|
1942
|
+
const v_error = (() => {
|
|
1943
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1944
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1945
|
+
}
|
|
1946
|
+
if (obj.academicCredential !== undefined) {
|
|
1947
|
+
const obj_academicCredential = obj.academicCredential;
|
|
1948
|
+
const path_academicCredential = path + '.academicCredential';
|
|
1949
|
+
if (!ArrayIsArray(obj_academicCredential)) {
|
|
1950
|
+
return new TypeError('Expected "array" but received "' + typeof obj_academicCredential + '" (at "' + path_academicCredential + '")');
|
|
1951
|
+
}
|
|
1952
|
+
for (let i = 0; i < obj_academicCredential.length; i++) {
|
|
1953
|
+
const obj_academicCredential_item = obj_academicCredential[i];
|
|
1954
|
+
const path_academicCredential_item = path_academicCredential + '[' + i + ']';
|
|
1955
|
+
const referencepath_academicCredential_itemValidationError = validate$8(obj_academicCredential_item, path_academicCredential_item);
|
|
1956
|
+
if (referencepath_academicCredential_itemValidationError !== null) {
|
|
1957
|
+
let message = 'Object doesn\'t match AcademicCredential (at "' + path_academicCredential_item + '")\n';
|
|
1958
|
+
message += referencepath_academicCredential_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1959
|
+
return new TypeError(message);
|
|
1960
|
+
}
|
|
1961
|
+
}
|
|
1962
|
+
}
|
|
1963
|
+
if (obj.additionalEducation !== undefined) {
|
|
1964
|
+
const obj_additionalEducation = obj.additionalEducation;
|
|
1965
|
+
const path_additionalEducation = path + '.additionalEducation';
|
|
1966
|
+
if (!ArrayIsArray(obj_additionalEducation)) {
|
|
1967
|
+
return new TypeError('Expected "array" but received "' + typeof obj_additionalEducation + '" (at "' + path_additionalEducation + '")');
|
|
1968
|
+
}
|
|
1969
|
+
for (let i = 0; i < obj_additionalEducation.length; i++) {
|
|
1970
|
+
const obj_additionalEducation_item = obj_additionalEducation[i];
|
|
1971
|
+
const path_additionalEducation_item = path_additionalEducation + '[' + i + ']';
|
|
1972
|
+
const referencepath_additionalEducation_itemValidationError = validate$7(obj_additionalEducation_item, path_additionalEducation_item);
|
|
1973
|
+
if (referencepath_additionalEducation_itemValidationError !== null) {
|
|
1974
|
+
let message = 'Object doesn\'t match AdditionalEducation (at "' + path_additionalEducation_item + '")\n';
|
|
1975
|
+
message += referencepath_additionalEducation_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1976
|
+
return new TypeError(message);
|
|
1977
|
+
}
|
|
1978
|
+
}
|
|
1979
|
+
}
|
|
1980
|
+
if (obj.contactInformation !== undefined) {
|
|
1981
|
+
const obj_contactInformation = obj.contactInformation;
|
|
1982
|
+
const path_contactInformation = path + '.contactInformation';
|
|
1983
|
+
const referencepath_contactInformationValidationError = validate$6(obj_contactInformation, path_contactInformation);
|
|
1984
|
+
if (referencepath_contactInformationValidationError !== null) {
|
|
1985
|
+
let message = 'Object doesn\'t match ContactInformation (at "' + path_contactInformation + '")\n';
|
|
1986
|
+
message += referencepath_contactInformationValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1987
|
+
return new TypeError(message);
|
|
1988
|
+
}
|
|
1989
|
+
}
|
|
1990
|
+
if (obj.personPublicProfileInformation !== undefined) {
|
|
1991
|
+
const obj_personPublicProfileInformation = obj.personPublicProfileInformation;
|
|
1992
|
+
const path_personPublicProfileInformation = path + '.personPublicProfileInformation';
|
|
1993
|
+
const referencepath_personPublicProfileInformationValidationError = validate$5(obj_personPublicProfileInformation, path_personPublicProfileInformation);
|
|
1994
|
+
if (referencepath_personPublicProfileInformationValidationError !== null) {
|
|
1995
|
+
let message = 'Object doesn\'t match PersonPublicProfileInformation (at "' + path_personPublicProfileInformation + '")\n';
|
|
1996
|
+
message += referencepath_personPublicProfileInformationValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1997
|
+
return new TypeError(message);
|
|
1998
|
+
}
|
|
1999
|
+
}
|
|
2000
|
+
if (obj.professionalExperience !== undefined) {
|
|
2001
|
+
const obj_professionalExperience = obj.professionalExperience;
|
|
2002
|
+
const path_professionalExperience = path + '.professionalExperience';
|
|
2003
|
+
if (!ArrayIsArray(obj_professionalExperience)) {
|
|
2004
|
+
return new TypeError('Expected "array" but received "' + typeof obj_professionalExperience + '" (at "' + path_professionalExperience + '")');
|
|
2005
|
+
}
|
|
2006
|
+
for (let i = 0; i < obj_professionalExperience.length; i++) {
|
|
2007
|
+
const obj_professionalExperience_item = obj_professionalExperience[i];
|
|
2008
|
+
const path_professionalExperience_item = path_professionalExperience + '[' + i + ']';
|
|
2009
|
+
const referencepath_professionalExperience_itemValidationError = validate$4(obj_professionalExperience_item, path_professionalExperience_item);
|
|
2010
|
+
if (referencepath_professionalExperience_itemValidationError !== null) {
|
|
2011
|
+
let message = 'Object doesn\'t match ProfessionalExperience (at "' + path_professionalExperience_item + '")\n';
|
|
2012
|
+
message += referencepath_professionalExperience_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2013
|
+
return new TypeError(message);
|
|
2014
|
+
}
|
|
2015
|
+
}
|
|
2016
|
+
}
|
|
2017
|
+
if (obj.summary !== undefined) {
|
|
2018
|
+
const obj_summary = obj.summary;
|
|
2019
|
+
const path_summary = path + '.summary';
|
|
2020
|
+
if (typeof obj_summary !== 'string') {
|
|
2021
|
+
return new TypeError('Expected "string" but received "' + typeof obj_summary + '" (at "' + path_summary + '")');
|
|
2022
|
+
}
|
|
2023
|
+
}
|
|
2024
|
+
})();
|
|
2025
|
+
return v_error === undefined ? null : v_error;
|
|
2026
|
+
}
|
|
2027
|
+
const RepresentationType$1 = 'PersonPublicProfileOutputRepresentation';
|
|
2028
|
+
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
2029
|
+
return input;
|
|
2030
|
+
}
|
|
2031
|
+
const select$5 = function PersonPublicProfileOutputRepresentationSelect() {
|
|
2032
|
+
return {
|
|
2033
|
+
kind: 'Fragment',
|
|
2034
|
+
version: VERSION$3,
|
|
2035
|
+
private: [],
|
|
2036
|
+
opaque: true
|
|
1724
2037
|
};
|
|
1725
2038
|
};
|
|
2039
|
+
function equals$3(existing, incoming) {
|
|
2040
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
2041
|
+
return false;
|
|
2042
|
+
}
|
|
2043
|
+
return true;
|
|
2044
|
+
}
|
|
2045
|
+
const ingest$1 = function PersonPublicProfileOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2046
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2047
|
+
const validateError = validate$3(input);
|
|
2048
|
+
if (validateError !== null) {
|
|
2049
|
+
throw validateError;
|
|
2050
|
+
}
|
|
2051
|
+
}
|
|
2052
|
+
const key = path.fullPath;
|
|
2053
|
+
const existingRecord = store.readEntry(key);
|
|
2054
|
+
const ttlToUse = path.ttl !== undefined ? path.ttl : 360000;
|
|
2055
|
+
let incomingRecord = normalize$1(input, store.readEntry(key), {
|
|
2056
|
+
fullPath: key,
|
|
2057
|
+
parent: path.parent,
|
|
2058
|
+
propertyName: path.propertyName,
|
|
2059
|
+
ttl: ttlToUse
|
|
2060
|
+
});
|
|
2061
|
+
if (existingRecord === undefined || equals$3(existingRecord, incomingRecord) === false) {
|
|
2062
|
+
luvio.storePublish(key, incomingRecord);
|
|
2063
|
+
}
|
|
2064
|
+
if (ttlToUse !== undefined) {
|
|
2065
|
+
const storeMetadataParams = {
|
|
2066
|
+
ttl: ttlToUse,
|
|
2067
|
+
namespace: "education",
|
|
2068
|
+
version: VERSION$3,
|
|
2069
|
+
representationName: RepresentationType$1,
|
|
2070
|
+
};
|
|
2071
|
+
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
2072
|
+
}
|
|
2073
|
+
return createLink(key);
|
|
2074
|
+
};
|
|
2075
|
+
function getTypeCacheKeys$1(luvio, input, fullPathFactory) {
|
|
2076
|
+
const rootKeySet = new StoreKeyMap();
|
|
2077
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2078
|
+
const rootKey = fullPathFactory();
|
|
2079
|
+
rootKeySet.set(rootKey, {
|
|
2080
|
+
namespace: keyPrefix,
|
|
2081
|
+
representationName: RepresentationType$1,
|
|
2082
|
+
mergeable: false
|
|
2083
|
+
});
|
|
2084
|
+
return rootKeySet;
|
|
2085
|
+
}
|
|
2086
|
+
|
|
2087
|
+
function select$4(luvio, params) {
|
|
2088
|
+
return select$5();
|
|
2089
|
+
}
|
|
2090
|
+
function keyBuilder$3(luvio, params) {
|
|
2091
|
+
return keyPrefix + '::PersonPublicProfileOutputRepresentation:(' + 'contactId:' + params.urlParams.contactId + ',' + 'usageType:' + params.urlParams.usageType + ')';
|
|
2092
|
+
}
|
|
2093
|
+
function getResponseCacheKeys$1(luvio, resourceParams, response) {
|
|
2094
|
+
return getTypeCacheKeys$1(luvio, response, () => keyBuilder$3(luvio, resourceParams));
|
|
2095
|
+
}
|
|
2096
|
+
function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
2097
|
+
const { body } = response;
|
|
2098
|
+
const key = keyBuilder$3(luvio, resourceParams);
|
|
2099
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
2100
|
+
const snapshot = luvio.storeLookup({
|
|
2101
|
+
recordId: key,
|
|
2102
|
+
node: select$4(),
|
|
2103
|
+
variables: {},
|
|
2104
|
+
}, snapshotRefresh);
|
|
2105
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2106
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
2107
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
2108
|
+
}
|
|
2109
|
+
}
|
|
2110
|
+
deepFreeze(snapshot.data);
|
|
2111
|
+
return snapshot;
|
|
2112
|
+
}
|
|
2113
|
+
function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
2114
|
+
const key = keyBuilder$3(luvio, params);
|
|
2115
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
2116
|
+
luvio.storeIngestError(key, errorSnapshot);
|
|
2117
|
+
return errorSnapshot;
|
|
2118
|
+
}
|
|
2119
|
+
function createResourceRequest$1(config) {
|
|
2120
|
+
const headers = {};
|
|
2121
|
+
return {
|
|
2122
|
+
baseUri: '/services/data/v59.0',
|
|
2123
|
+
basePath: '/connect/education/person-public-profile/' + config.urlParams.usageType + '/' + config.urlParams.contactId + '',
|
|
2124
|
+
method: 'get',
|
|
2125
|
+
body: null,
|
|
2126
|
+
urlParams: config.urlParams,
|
|
2127
|
+
queryParams: {},
|
|
2128
|
+
headers,
|
|
2129
|
+
priority: 'normal',
|
|
2130
|
+
};
|
|
2131
|
+
}
|
|
2132
|
+
|
|
2133
|
+
const getPersonPublicProfile_ConfigPropertyNames = {
|
|
2134
|
+
displayName: 'getPersonPublicProfile',
|
|
2135
|
+
parameters: {
|
|
2136
|
+
required: ['contactId', 'usageType'],
|
|
2137
|
+
optional: []
|
|
2138
|
+
}
|
|
2139
|
+
};
|
|
2140
|
+
function createResourceParams$1(config) {
|
|
2141
|
+
const resourceParams = {
|
|
2142
|
+
urlParams: {
|
|
2143
|
+
contactId: config.contactId, usageType: config.usageType
|
|
2144
|
+
}
|
|
2145
|
+
};
|
|
2146
|
+
return resourceParams;
|
|
2147
|
+
}
|
|
2148
|
+
function keyBuilder$2(luvio, config) {
|
|
2149
|
+
const resourceParams = createResourceParams$1(config);
|
|
2150
|
+
return keyBuilder$3(luvio, resourceParams);
|
|
2151
|
+
}
|
|
2152
|
+
function typeCheckConfig$1(untrustedConfig) {
|
|
2153
|
+
const config = {};
|
|
2154
|
+
const untrustedConfig_contactId = untrustedConfig.contactId;
|
|
2155
|
+
if (typeof untrustedConfig_contactId === 'string') {
|
|
2156
|
+
config.contactId = untrustedConfig_contactId;
|
|
2157
|
+
}
|
|
2158
|
+
const untrustedConfig_usageType = untrustedConfig.usageType;
|
|
2159
|
+
if (typeof untrustedConfig_usageType === 'string') {
|
|
2160
|
+
config.usageType = untrustedConfig_usageType;
|
|
2161
|
+
}
|
|
2162
|
+
return config;
|
|
2163
|
+
}
|
|
2164
|
+
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
2165
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
2166
|
+
return null;
|
|
2167
|
+
}
|
|
2168
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2169
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
2170
|
+
}
|
|
2171
|
+
const config = typeCheckConfig$1(untrustedConfig);
|
|
2172
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2173
|
+
return null;
|
|
2174
|
+
}
|
|
2175
|
+
return config;
|
|
2176
|
+
}
|
|
2177
|
+
function adapterFragment$1(luvio, config) {
|
|
2178
|
+
createResourceParams$1(config);
|
|
2179
|
+
return select$4();
|
|
2180
|
+
}
|
|
2181
|
+
function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
|
|
2182
|
+
const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
|
|
2183
|
+
config,
|
|
2184
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
2185
|
+
});
|
|
2186
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
2187
|
+
}
|
|
2188
|
+
function onFetchResponseError$1(luvio, config, resourceParams, response) {
|
|
2189
|
+
const snapshot = ingestError$1(luvio, resourceParams, response, {
|
|
2190
|
+
config,
|
|
2191
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
2192
|
+
});
|
|
2193
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
2194
|
+
}
|
|
2195
|
+
function buildNetworkSnapshot$1(luvio, config, options) {
|
|
2196
|
+
const resourceParams = createResourceParams$1(config);
|
|
2197
|
+
const request = createResourceRequest$1(resourceParams);
|
|
2198
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
2199
|
+
.then((response) => {
|
|
2200
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => getResponseCacheKeys$1(luvio, resourceParams, response.body));
|
|
2201
|
+
}, (response) => {
|
|
2202
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
|
|
2203
|
+
});
|
|
2204
|
+
}
|
|
2205
|
+
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
2206
|
+
const { luvio, config } = context;
|
|
2207
|
+
const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
|
|
2208
|
+
const dispatchOptions = {
|
|
2209
|
+
resourceRequestContext: {
|
|
2210
|
+
requestCorrelator,
|
|
2211
|
+
luvioRequestMethod: undefined,
|
|
2212
|
+
},
|
|
2213
|
+
eventObservers
|
|
2214
|
+
};
|
|
2215
|
+
if (networkPriority !== 'normal') {
|
|
2216
|
+
dispatchOptions.overrides = {
|
|
2217
|
+
priority: networkPriority
|
|
2218
|
+
};
|
|
2219
|
+
}
|
|
2220
|
+
return buildNetworkSnapshot$1(luvio, config, dispatchOptions);
|
|
2221
|
+
}
|
|
2222
|
+
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
2223
|
+
const { luvio, config } = context;
|
|
2224
|
+
const selector = {
|
|
2225
|
+
recordId: keyBuilder$2(luvio, config),
|
|
2226
|
+
node: adapterFragment$1(luvio, config),
|
|
2227
|
+
variables: {},
|
|
2228
|
+
};
|
|
2229
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
2230
|
+
config,
|
|
2231
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
2232
|
+
});
|
|
2233
|
+
return cacheSnapshot;
|
|
2234
|
+
}
|
|
2235
|
+
const getPersonPublicProfileAdapterFactory = (luvio) => function education__getPersonPublicProfile(untrustedConfig, requestContext) {
|
|
2236
|
+
const config = validateAdapterConfig$1(untrustedConfig, getPersonPublicProfile_ConfigPropertyNames);
|
|
2237
|
+
// Invalid or incomplete config
|
|
2238
|
+
if (config === null) {
|
|
2239
|
+
return null;
|
|
2240
|
+
}
|
|
2241
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
2242
|
+
buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
|
|
2243
|
+
};
|
|
1726
2244
|
|
|
1727
2245
|
const VERSION$2 = "256a3344cb09454a859ca2f0645eb0bc";
|
|
1728
2246
|
function validate$2(obj, path = 'AvailableTeam') {
|
|
@@ -2264,4 +2782,4 @@ const getSuccessTeamAdapterFactory = (luvio) => function education__getSuccessTe
|
|
|
2264
2782
|
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
2265
2783
|
};
|
|
2266
2784
|
|
|
2267
|
-
export { createCarePlansAdapterFactory, getAvailableTimeSlotsAdapterFactory, getAvailableTopicsAdapterFactory, getSuccessTeamAdapterFactory };
|
|
2785
|
+
export { createCarePlansAdapterFactory, getAvailableTimeSlotsAdapterFactory, getAvailableTopicsAdapterFactory, getPersonPublicProfileAdapterFactory, getSuccessTeamAdapterFactory };
|