@salesforce/lds-adapters-industries-education 1.112.2 → 1.114.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.
Files changed (25) hide show
  1. package/dist/es/es2018/industries-education.js +944 -109
  2. package/dist/types/src/generated/adapters/createCarePlans.d.ts +15 -0
  3. package/dist/types/src/generated/artifacts/main.d.ts +1 -0
  4. package/dist/types/src/generated/artifacts/sfdc.d.ts +2 -1
  5. package/dist/types/src/generated/resources/postConnectEducationCareplanBulk.d.ts +13 -0
  6. package/dist/types/src/generated/types/BenefitAssignmentInputRepresentation.d.ts +72 -0
  7. package/dist/types/src/generated/types/BenefitAssignmentListInputRepresentation.d.ts +30 -0
  8. package/dist/types/src/generated/types/BenefitDisbursementForBenefitSessionInputRepresentation.d.ts +47 -0
  9. package/dist/types/src/generated/types/BenefitDisbursementListInputRepresentation.d.ts +30 -0
  10. package/dist/types/src/generated/types/CarePlanBulkInputRepresentation.d.ts +29 -0
  11. package/dist/types/src/generated/types/CarePlanBulkInputWrapperRepresentation.d.ts +29 -0
  12. package/dist/types/src/generated/types/CarePlanBulkOutputRepresentation.d.ts +45 -0
  13. package/dist/types/src/generated/types/CarePlanInputRepresentation.d.ts +68 -0
  14. package/dist/types/src/generated/types/CarePlanListInputRepresentation.d.ts +30 -0
  15. package/dist/types/src/generated/types/CarePlanTaskInputRepresentation.d.ts +50 -0
  16. package/dist/types/src/generated/types/CustomFieldInputRepresentation.d.ts +35 -0
  17. package/dist/types/src/generated/types/CustomFieldListInputRepresentation.d.ts +30 -0
  18. package/dist/types/src/generated/types/GoalAssignmentInputRepresentation.d.ts +68 -0
  19. package/dist/types/src/generated/types/GoalAssignmentListInputRepresentation.d.ts +30 -0
  20. package/dist/umd/es2018/industries-education.js +944 -108
  21. package/dist/umd/es5/industries-education.js +958 -109
  22. package/package.json +3 -3
  23. package/sfdc/index.js +844 -3
  24. package/src/raml/api.raml +363 -0
  25. package/src/raml/luvio.raml +11 -0
@@ -85,13 +85,31 @@ function equalsObject(a, b, equalsProp) {
85
85
  }
86
86
  return true;
87
87
  }
88
+ function deepFreeze$1(value) {
89
+ // No need to freeze primitives
90
+ if (typeof value !== 'object' || value === null) {
91
+ return;
92
+ }
93
+ if (ArrayIsArray(value)) {
94
+ for (let i = 0, len = value.length; i < len; i += 1) {
95
+ deepFreeze$1(value[i]);
96
+ }
97
+ }
98
+ else {
99
+ const keys = ObjectKeys(value);
100
+ for (let i = 0, len = keys.length; i < len; i += 1) {
101
+ deepFreeze$1(value[keys[i]]);
102
+ }
103
+ }
104
+ ObjectFreeze(value);
105
+ }
88
106
  function createLink(ref) {
89
107
  return {
90
108
  __ref: serializeStructuredKey(ref),
91
109
  };
92
110
  }
93
111
 
94
- function validate$7(obj, path = 'AvailableTimeSlotsInputRepresentation') {
112
+ function validate$k(obj, path = 'AvailableTimeSlotsInputRepresentation') {
95
113
  const v_error = (() => {
96
114
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
97
115
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -155,8 +173,8 @@ function validate$7(obj, path = 'AvailableTimeSlotsInputRepresentation') {
155
173
  return v_error === undefined ? null : v_error;
156
174
  }
157
175
 
158
- const VERSION$6 = "cfd94fbef61f52ffe43428e23e7a68c8";
159
- function validate$6(obj, path = 'TimeSlot') {
176
+ const VERSION$7 = "cfd94fbef61f52ffe43428e23e7a68c8";
177
+ function validate$j(obj, path = 'TimeSlot') {
160
178
  const v_error = (() => {
161
179
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
162
180
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -192,10 +210,10 @@ function validate$6(obj, path = 'TimeSlot') {
192
210
  })();
193
211
  return v_error === undefined ? null : v_error;
194
212
  }
195
- const select$9 = function TimeSlotSelect() {
213
+ const select$b = function TimeSlotSelect() {
196
214
  return {
197
215
  kind: 'Fragment',
198
- version: VERSION$6,
216
+ version: VERSION$7,
199
217
  private: [],
200
218
  selections: [
201
219
  {
@@ -221,7 +239,7 @@ const select$9 = function TimeSlotSelect() {
221
239
  ]
222
240
  };
223
241
  };
224
- function equals$6(existing, incoming) {
242
+ function equals$7(existing, incoming) {
225
243
  const existing_endTime = existing.endTime;
226
244
  const incoming_endTime = incoming.endTime;
227
245
  // if at least one of these optionals is defined
@@ -277,8 +295,8 @@ function equals$6(existing, incoming) {
277
295
  return true;
278
296
  }
279
297
 
280
- const VERSION$5 = "9c2ef94b89ee532c50c8423528617441";
281
- function validate$5(obj, path = 'AvailableTimeSlotsOuputRepresentation') {
298
+ const VERSION$6 = "9c2ef94b89ee532c50c8423528617441";
299
+ function validate$i(obj, path = 'AvailableTimeSlotsOuputRepresentation') {
282
300
  const v_error = (() => {
283
301
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
284
302
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -291,7 +309,7 @@ function validate$5(obj, path = 'AvailableTimeSlotsOuputRepresentation') {
291
309
  for (let i = 0; i < obj_timeSlots.length; i++) {
292
310
  const obj_timeSlots_item = obj_timeSlots[i];
293
311
  const path_timeSlots_item = path_timeSlots + '[' + i + ']';
294
- const referencepath_timeSlots_itemValidationError = validate$6(obj_timeSlots_item, path_timeSlots_item);
312
+ const referencepath_timeSlots_itemValidationError = validate$j(obj_timeSlots_item, path_timeSlots_item);
295
313
  if (referencepath_timeSlots_itemValidationError !== null) {
296
314
  let message = 'Object doesn\'t match TimeSlot (at "' + path_timeSlots_item + '")\n';
297
315
  message += referencepath_timeSlots_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -301,15 +319,15 @@ function validate$5(obj, path = 'AvailableTimeSlotsOuputRepresentation') {
301
319
  })();
302
320
  return v_error === undefined ? null : v_error;
303
321
  }
304
- const RepresentationType$2 = 'AvailableTimeSlotsOuputRepresentation';
305
- function normalize$2(input, existing, path, luvio, store, timestamp) {
322
+ const RepresentationType$3 = 'AvailableTimeSlotsOuputRepresentation';
323
+ function normalize$3(input, existing, path, luvio, store, timestamp) {
306
324
  return input;
307
325
  }
308
- const select$8 = function AvailableTimeSlotsOuputRepresentationSelect() {
309
- const { selections: TimeSlot__selections, opaque: TimeSlot__opaque, } = select$9();
326
+ const select$a = function AvailableTimeSlotsOuputRepresentationSelect() {
327
+ const { selections: TimeSlot__selections, opaque: TimeSlot__opaque, } = select$b();
310
328
  return {
311
329
  kind: 'Fragment',
312
- version: VERSION$5,
330
+ version: VERSION$6,
313
331
  private: [],
314
332
  selections: [
315
333
  {
@@ -321,11 +339,11 @@ const select$8 = function AvailableTimeSlotsOuputRepresentationSelect() {
321
339
  ]
322
340
  };
323
341
  };
324
- function equals$5(existing, incoming) {
342
+ function equals$6(existing, incoming) {
325
343
  const existing_timeSlots = existing.timeSlots;
326
344
  const incoming_timeSlots = incoming.timeSlots;
327
345
  const equals_timeSlots_items = equalsArray(existing_timeSlots, incoming_timeSlots, (existing_timeSlots_item, incoming_timeSlots_item) => {
328
- if (!(equals$6(existing_timeSlots_item, incoming_timeSlots_item))) {
346
+ if (!(equals$7(existing_timeSlots_item, incoming_timeSlots_item))) {
329
347
  return false;
330
348
  }
331
349
  });
@@ -334,9 +352,9 @@ function equals$5(existing, incoming) {
334
352
  }
335
353
  return true;
336
354
  }
337
- const ingest$2 = function AvailableTimeSlotsOuputRepresentationIngest(input, path, luvio, store, timestamp) {
355
+ const ingest$3 = function AvailableTimeSlotsOuputRepresentationIngest(input, path, luvio, store, timestamp) {
338
356
  if (process.env.NODE_ENV !== 'production') {
339
- const validateError = validate$5(input);
357
+ const validateError = validate$i(input);
340
358
  if (validateError !== null) {
341
359
  throw validateError;
342
360
  }
@@ -344,54 +362,54 @@ const ingest$2 = function AvailableTimeSlotsOuputRepresentationIngest(input, pat
344
362
  const key = path.fullPath;
345
363
  const existingRecord = store.readEntry(key);
346
364
  const ttlToUse = path.ttl !== undefined ? path.ttl : 360000;
347
- let incomingRecord = normalize$2(input, store.readEntry(key), {
365
+ let incomingRecord = normalize$3(input, store.readEntry(key), {
348
366
  fullPath: key,
349
367
  parent: path.parent,
350
368
  propertyName: path.propertyName,
351
369
  ttl: ttlToUse
352
370
  });
353
- if (existingRecord === undefined || equals$5(existingRecord, incomingRecord) === false) {
371
+ if (existingRecord === undefined || equals$6(existingRecord, incomingRecord) === false) {
354
372
  luvio.storePublish(key, incomingRecord);
355
373
  }
356
374
  if (ttlToUse !== undefined) {
357
375
  const storeMetadataParams = {
358
376
  ttl: ttlToUse,
359
377
  namespace: "education",
360
- version: VERSION$5,
361
- representationName: RepresentationType$2,
378
+ version: VERSION$6,
379
+ representationName: RepresentationType$3,
362
380
  };
363
381
  luvio.publishStoreMetadata(key, storeMetadataParams);
364
382
  }
365
383
  return createLink(key);
366
384
  };
367
- function getTypeCacheKeys$2(luvio, input, fullPathFactory) {
385
+ function getTypeCacheKeys$3(luvio, input, fullPathFactory) {
368
386
  const rootKeySet = new StoreKeyMap();
369
387
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
370
388
  const rootKey = fullPathFactory();
371
389
  rootKeySet.set(rootKey, {
372
390
  namespace: keyPrefix,
373
- representationName: RepresentationType$2,
391
+ representationName: RepresentationType$3,
374
392
  mergeable: false
375
393
  });
376
394
  return rootKeySet;
377
395
  }
378
396
 
379
- function select$7(luvio, params) {
380
- return select$8();
397
+ function select$9(luvio, params) {
398
+ return select$a();
381
399
  }
382
- function keyBuilder$5(luvio, params) {
400
+ function keyBuilder$6(luvio, params) {
383
401
  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
402
  }
385
- function getResponseCacheKeys$2(luvio, resourceParams, response) {
386
- return getTypeCacheKeys$2(luvio, response, () => keyBuilder$5(luvio, resourceParams));
403
+ function getResponseCacheKeys$3(luvio, resourceParams, response) {
404
+ return getTypeCacheKeys$3(luvio, response, () => keyBuilder$6(luvio, resourceParams));
387
405
  }
388
- function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
406
+ function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
389
407
  const { body } = response;
390
- const key = keyBuilder$5(luvio, resourceParams);
391
- luvio.storeIngest(key, ingest$2, body);
408
+ const key = keyBuilder$6(luvio, resourceParams);
409
+ luvio.storeIngest(key, ingest$3, body);
392
410
  const snapshot = luvio.storeLookup({
393
411
  recordId: key,
394
- node: select$7(),
412
+ node: select$9(),
395
413
  variables: {},
396
414
  }, snapshotRefresh);
397
415
  if (process.env.NODE_ENV !== 'production') {
@@ -402,12 +420,12 @@ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
402
420
  return snapshot;
403
421
  }
404
422
  function ingestError$2(luvio, params, error, snapshotRefresh) {
405
- const key = keyBuilder$5(luvio, params);
423
+ const key = keyBuilder$6(luvio, params);
406
424
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
407
425
  luvio.storeIngestError(key, errorSnapshot);
408
426
  return errorSnapshot;
409
427
  }
410
- function createResourceRequest$2(config) {
428
+ function createResourceRequest$3(config) {
411
429
  const headers = {};
412
430
  return {
413
431
  baseUri: '/services/data/v58.0',
@@ -428,7 +446,7 @@ const getAvailableTimeSlots_ConfigPropertyNames = {
428
446
  optional: []
429
447
  }
430
448
  };
431
- function createResourceParams$2(config) {
449
+ function createResourceParams$3(config) {
432
450
  const resourceParams = {
433
451
  body: {
434
452
  availableTimeSlotsInput: config.availableTimeSlotsInput
@@ -436,56 +454,56 @@ function createResourceParams$2(config) {
436
454
  };
437
455
  return resourceParams;
438
456
  }
439
- function keyBuilder$4(luvio, config) {
440
- const resourceParams = createResourceParams$2(config);
441
- return keyBuilder$5(luvio, resourceParams);
457
+ function keyBuilder$5(luvio, config) {
458
+ const resourceParams = createResourceParams$3(config);
459
+ return keyBuilder$6(luvio, resourceParams);
442
460
  }
443
- function typeCheckConfig$2(untrustedConfig) {
461
+ function typeCheckConfig$3(untrustedConfig) {
444
462
  const config = {};
445
463
  const untrustedConfig_availableTimeSlotsInput = untrustedConfig.availableTimeSlotsInput;
446
- const referenceAvailableTimeSlotsInputRepresentationValidationError = validate$7(untrustedConfig_availableTimeSlotsInput);
464
+ const referenceAvailableTimeSlotsInputRepresentationValidationError = validate$k(untrustedConfig_availableTimeSlotsInput);
447
465
  if (referenceAvailableTimeSlotsInputRepresentationValidationError === null) {
448
466
  config.availableTimeSlotsInput = untrustedConfig_availableTimeSlotsInput;
449
467
  }
450
468
  return config;
451
469
  }
452
- function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
470
+ function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
453
471
  if (!untrustedIsObject(untrustedConfig)) {
454
472
  return null;
455
473
  }
456
474
  if (process.env.NODE_ENV !== 'production') {
457
475
  validateConfig(untrustedConfig, configPropertyNames);
458
476
  }
459
- const config = typeCheckConfig$2(untrustedConfig);
477
+ const config = typeCheckConfig$3(untrustedConfig);
460
478
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
461
479
  return null;
462
480
  }
463
481
  return config;
464
482
  }
465
483
  function adapterFragment$2(luvio, config) {
466
- createResourceParams$2(config);
467
- return select$7();
484
+ createResourceParams$3(config);
485
+ return select$9();
468
486
  }
469
487
  function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
470
- const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
488
+ const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
471
489
  config,
472
- resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
490
+ resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
473
491
  });
474
492
  return luvio.storeBroadcast().then(() => snapshot);
475
493
  }
476
494
  function onFetchResponseError$2(luvio, config, resourceParams, response) {
477
495
  const snapshot = ingestError$2(luvio, resourceParams, response, {
478
496
  config,
479
- resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
497
+ resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
480
498
  });
481
499
  return luvio.storeBroadcast().then(() => snapshot);
482
500
  }
483
- function buildNetworkSnapshot$2(luvio, config, options) {
484
- const resourceParams = createResourceParams$2(config);
485
- const request = createResourceRequest$2(resourceParams);
501
+ function buildNetworkSnapshot$3(luvio, config, options) {
502
+ const resourceParams = createResourceParams$3(config);
503
+ const request = createResourceRequest$3(resourceParams);
486
504
  return luvio.dispatchResourceRequest(request, options)
487
505
  .then((response) => {
488
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => getResponseCacheKeys$2(luvio, resourceParams, response.body));
506
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => getResponseCacheKeys$3(luvio, resourceParams, response.body));
489
507
  }, (response) => {
490
508
  return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
491
509
  });
@@ -505,23 +523,23 @@ function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext
505
523
  priority: networkPriority
506
524
  };
507
525
  }
508
- return buildNetworkSnapshot$2(luvio, config, dispatchOptions);
526
+ return buildNetworkSnapshot$3(luvio, config, dispatchOptions);
509
527
  }
510
528
  function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
511
529
  const { luvio, config } = context;
512
530
  const selector = {
513
- recordId: keyBuilder$4(luvio, config),
531
+ recordId: keyBuilder$5(luvio, config),
514
532
  node: adapterFragment$2(luvio, config),
515
533
  variables: {},
516
534
  };
517
535
  const cacheSnapshot = storeLookup(selector, {
518
536
  config,
519
- resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
537
+ resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
520
538
  });
521
539
  return cacheSnapshot;
522
540
  }
523
541
  const getAvailableTimeSlotsAdapterFactory = (luvio) => function education__getAvailableTimeSlots(untrustedConfig, requestContext) {
524
- const config = validateAdapterConfig$2(untrustedConfig, getAvailableTimeSlots_ConfigPropertyNames);
542
+ const config = validateAdapterConfig$3(untrustedConfig, getAvailableTimeSlots_ConfigPropertyNames);
525
543
  // Invalid or incomplete config
526
544
  if (config === null) {
527
545
  return null;
@@ -530,8 +548,8 @@ const getAvailableTimeSlotsAdapterFactory = (luvio) => function education__getAv
530
548
  buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
531
549
  };
532
550
 
533
- const VERSION$4 = "c470aba735607497dd11c1fcd34489d1";
534
- function validate$4(obj, path = 'AvailableTopic') {
551
+ const VERSION$5 = "c470aba735607497dd11c1fcd34489d1";
552
+ function validate$h(obj, path = 'AvailableTopic') {
535
553
  const v_error = (() => {
536
554
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
537
555
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -576,10 +594,10 @@ function validate$4(obj, path = 'AvailableTopic') {
576
594
  })();
577
595
  return v_error === undefined ? null : v_error;
578
596
  }
579
- const select$6 = function AvailableTopicSelect() {
597
+ const select$8 = function AvailableTopicSelect() {
580
598
  return {
581
599
  kind: 'Fragment',
582
- version: VERSION$4,
600
+ version: VERSION$5,
583
601
  private: [],
584
602
  selections: [
585
603
  {
@@ -605,7 +623,7 @@ const select$6 = function AvailableTopicSelect() {
605
623
  ]
606
624
  };
607
625
  };
608
- function equals$4(existing, incoming) {
626
+ function equals$5(existing, incoming) {
609
627
  const existing_parentWorkTypeGroupName = existing.parentWorkTypeGroupName;
610
628
  const incoming_parentWorkTypeGroupName = incoming.parentWorkTypeGroupName;
611
629
  // if at least one of these optionals is defined
@@ -666,8 +684,8 @@ function equals$4(existing, incoming) {
666
684
  return true;
667
685
  }
668
686
 
669
- const VERSION$3 = "3cb0110faf688dc57056aa83be527181";
670
- function validate$3(obj, path = 'AvailableTopicsOutputRepresentation') {
687
+ const VERSION$4 = "3cb0110faf688dc57056aa83be527181";
688
+ function validate$g(obj, path = 'AvailableTopicsOutputRepresentation') {
671
689
  const v_error = (() => {
672
690
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
673
691
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -680,7 +698,7 @@ function validate$3(obj, path = 'AvailableTopicsOutputRepresentation') {
680
698
  for (let i = 0; i < obj_topics.length; i++) {
681
699
  const obj_topics_item = obj_topics[i];
682
700
  const path_topics_item = path_topics + '[' + i + ']';
683
- const referencepath_topics_itemValidationError = validate$4(obj_topics_item, path_topics_item);
701
+ const referencepath_topics_itemValidationError = validate$h(obj_topics_item, path_topics_item);
684
702
  if (referencepath_topics_itemValidationError !== null) {
685
703
  let message = 'Object doesn\'t match AvailableTopic (at "' + path_topics_item + '")\n';
686
704
  message += referencepath_topics_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -690,15 +708,15 @@ function validate$3(obj, path = 'AvailableTopicsOutputRepresentation') {
690
708
  })();
691
709
  return v_error === undefined ? null : v_error;
692
710
  }
693
- const RepresentationType$1 = 'AvailableTopicsOutputRepresentation';
694
- function normalize$1(input, existing, path, luvio, store, timestamp) {
711
+ const RepresentationType$2 = 'AvailableTopicsOutputRepresentation';
712
+ function normalize$2(input, existing, path, luvio, store, timestamp) {
695
713
  return input;
696
714
  }
697
- const select$5 = function AvailableTopicsOutputRepresentationSelect() {
698
- const { selections: AvailableTopic__selections, opaque: AvailableTopic__opaque, } = select$6();
715
+ const select$7 = function AvailableTopicsOutputRepresentationSelect() {
716
+ const { selections: AvailableTopic__selections, opaque: AvailableTopic__opaque, } = select$8();
699
717
  return {
700
718
  kind: 'Fragment',
701
- version: VERSION$3,
719
+ version: VERSION$4,
702
720
  private: [],
703
721
  selections: [
704
722
  {
@@ -710,11 +728,11 @@ const select$5 = function AvailableTopicsOutputRepresentationSelect() {
710
728
  ]
711
729
  };
712
730
  };
713
- function equals$3(existing, incoming) {
731
+ function equals$4(existing, incoming) {
714
732
  const existing_topics = existing.topics;
715
733
  const incoming_topics = incoming.topics;
716
734
  const equals_topics_items = equalsArray(existing_topics, incoming_topics, (existing_topics_item, incoming_topics_item) => {
717
- if (!(equals$4(existing_topics_item, incoming_topics_item))) {
735
+ if (!(equals$5(existing_topics_item, incoming_topics_item))) {
718
736
  return false;
719
737
  }
720
738
  });
@@ -723,9 +741,9 @@ function equals$3(existing, incoming) {
723
741
  }
724
742
  return true;
725
743
  }
726
- const ingest$1 = function AvailableTopicsOutputRepresentationIngest(input, path, luvio, store, timestamp) {
744
+ const ingest$2 = function AvailableTopicsOutputRepresentationIngest(input, path, luvio, store, timestamp) {
727
745
  if (process.env.NODE_ENV !== 'production') {
728
- const validateError = validate$3(input);
746
+ const validateError = validate$g(input);
729
747
  if (validateError !== null) {
730
748
  throw validateError;
731
749
  }
@@ -733,54 +751,54 @@ const ingest$1 = function AvailableTopicsOutputRepresentationIngest(input, path,
733
751
  const key = path.fullPath;
734
752
  const existingRecord = store.readEntry(key);
735
753
  const ttlToUse = path.ttl !== undefined ? path.ttl : 360000;
736
- let incomingRecord = normalize$1(input, store.readEntry(key), {
754
+ let incomingRecord = normalize$2(input, store.readEntry(key), {
737
755
  fullPath: key,
738
756
  parent: path.parent,
739
757
  propertyName: path.propertyName,
740
758
  ttl: ttlToUse
741
759
  });
742
- if (existingRecord === undefined || equals$3(existingRecord, incomingRecord) === false) {
760
+ if (existingRecord === undefined || equals$4(existingRecord, incomingRecord) === false) {
743
761
  luvio.storePublish(key, incomingRecord);
744
762
  }
745
763
  if (ttlToUse !== undefined) {
746
764
  const storeMetadataParams = {
747
765
  ttl: ttlToUse,
748
766
  namespace: "education",
749
- version: VERSION$3,
750
- representationName: RepresentationType$1,
767
+ version: VERSION$4,
768
+ representationName: RepresentationType$2,
751
769
  };
752
770
  luvio.publishStoreMetadata(key, storeMetadataParams);
753
771
  }
754
772
  return createLink(key);
755
773
  };
756
- function getTypeCacheKeys$1(luvio, input, fullPathFactory) {
774
+ function getTypeCacheKeys$2(luvio, input, fullPathFactory) {
757
775
  const rootKeySet = new StoreKeyMap();
758
776
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
759
777
  const rootKey = fullPathFactory();
760
778
  rootKeySet.set(rootKey, {
761
779
  namespace: keyPrefix,
762
- representationName: RepresentationType$1,
780
+ representationName: RepresentationType$2,
763
781
  mergeable: false
764
782
  });
765
783
  return rootKeySet;
766
784
  }
767
785
 
768
- function select$4(luvio, params) {
769
- return select$5();
786
+ function select$6(luvio, params) {
787
+ return select$7();
770
788
  }
771
- function keyBuilder$3(luvio, params) {
789
+ function keyBuilder$4(luvio, params) {
772
790
  return keyPrefix + '::AvailableTopicsOutputRepresentation:(' + ')';
773
791
  }
774
- function getResponseCacheKeys$1(luvio, resourceParams, response) {
775
- return getTypeCacheKeys$1(luvio, response, () => keyBuilder$3());
792
+ function getResponseCacheKeys$2(luvio, resourceParams, response) {
793
+ return getTypeCacheKeys$2(luvio, response, () => keyBuilder$4());
776
794
  }
777
- function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
795
+ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
778
796
  const { body } = response;
779
- const key = keyBuilder$3();
780
- luvio.storeIngest(key, ingest$1, body);
797
+ const key = keyBuilder$4();
798
+ luvio.storeIngest(key, ingest$2, body);
781
799
  const snapshot = luvio.storeLookup({
782
800
  recordId: key,
783
- node: select$4(),
801
+ node: select$6(),
784
802
  variables: {},
785
803
  }, snapshotRefresh);
786
804
  if (process.env.NODE_ENV !== 'production') {
@@ -791,12 +809,12 @@ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
791
809
  return snapshot;
792
810
  }
793
811
  function ingestError$1(luvio, params, error, snapshotRefresh) {
794
- const key = keyBuilder$3();
812
+ const key = keyBuilder$4();
795
813
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
796
814
  luvio.storeIngestError(key, errorSnapshot);
797
815
  return errorSnapshot;
798
816
  }
799
- function createResourceRequest$1(config) {
817
+ function createResourceRequest$2(config) {
800
818
  const headers = {};
801
819
  return {
802
820
  baseUri: '/services/data/v58.0',
@@ -817,53 +835,53 @@ const getAvailableTopics_ConfigPropertyNames = {
817
835
  optional: []
818
836
  }
819
837
  };
820
- function createResourceParams$1(config) {
838
+ function createResourceParams$2(config) {
821
839
  const resourceParams = {};
822
840
  return resourceParams;
823
841
  }
824
- function keyBuilder$2(luvio, config) {
825
- return keyBuilder$3();
842
+ function keyBuilder$3(luvio, config) {
843
+ return keyBuilder$4();
826
844
  }
827
- function typeCheckConfig$1(untrustedConfig) {
845
+ function typeCheckConfig$2(untrustedConfig) {
828
846
  const config = {};
829
847
  return config;
830
848
  }
831
- function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
849
+ function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
832
850
  if (!untrustedIsObject(untrustedConfig)) {
833
851
  return null;
834
852
  }
835
853
  if (process.env.NODE_ENV !== 'production') {
836
854
  validateConfig(untrustedConfig, configPropertyNames);
837
855
  }
838
- const config = typeCheckConfig$1();
856
+ const config = typeCheckConfig$2();
839
857
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
840
858
  return null;
841
859
  }
842
860
  return config;
843
861
  }
844
862
  function adapterFragment$1(luvio, config) {
845
- return select$4();
863
+ return select$6();
846
864
  }
847
865
  function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
848
- const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
866
+ const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
849
867
  config,
850
- resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
868
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
851
869
  });
852
870
  return luvio.storeBroadcast().then(() => snapshot);
853
871
  }
854
872
  function onFetchResponseError$1(luvio, config, resourceParams, response) {
855
873
  const snapshot = ingestError$1(luvio, resourceParams, response, {
856
874
  config,
857
- resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
875
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
858
876
  });
859
877
  return luvio.storeBroadcast().then(() => snapshot);
860
878
  }
861
- function buildNetworkSnapshot$1(luvio, config, options) {
862
- const resourceParams = createResourceParams$1();
863
- const request = createResourceRequest$1();
879
+ function buildNetworkSnapshot$2(luvio, config, options) {
880
+ const resourceParams = createResourceParams$2();
881
+ const request = createResourceRequest$2();
864
882
  return luvio.dispatchResourceRequest(request, options)
865
883
  .then((response) => {
866
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => getResponseCacheKeys$1(luvio, resourceParams, response.body));
884
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => getResponseCacheKeys$2(luvio, resourceParams, response.body));
867
885
  }, (response) => {
868
886
  return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
869
887
  });
@@ -883,23 +901,23 @@ function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext
883
901
  priority: networkPriority
884
902
  };
885
903
  }
886
- return buildNetworkSnapshot$1(luvio, config, dispatchOptions);
904
+ return buildNetworkSnapshot$2(luvio, config, dispatchOptions);
887
905
  }
888
906
  function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
889
907
  const { luvio, config } = context;
890
908
  const selector = {
891
- recordId: keyBuilder$2(),
909
+ recordId: keyBuilder$3(),
892
910
  node: adapterFragment$1(),
893
911
  variables: {},
894
912
  };
895
913
  const cacheSnapshot = storeLookup(selector, {
896
914
  config,
897
- resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
915
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
898
916
  });
899
917
  return cacheSnapshot;
900
918
  }
901
919
  const getAvailableTopicsAdapterFactory = (luvio) => function education__getAvailableTopics(untrustedConfig, requestContext) {
902
- const config = validateAdapterConfig$1(untrustedConfig, getAvailableTopics_ConfigPropertyNames);
920
+ const config = validateAdapterConfig$2(untrustedConfig, getAvailableTopics_ConfigPropertyNames);
903
921
  // Invalid or incomplete config
904
922
  if (config === null) {
905
923
  return null;
@@ -908,6 +926,823 @@ const getAvailableTopicsAdapterFactory = (luvio) => function education__getAvail
908
926
  buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
909
927
  };
910
928
 
929
+ function validate$f(obj, path = 'CarePlanTaskInputRepresentation') {
930
+ const v_error = (() => {
931
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
932
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
933
+ }
934
+ if (obj.assignedTo !== undefined) {
935
+ const obj_assignedTo = obj.assignedTo;
936
+ const path_assignedTo = path + '.assignedTo';
937
+ if (typeof obj_assignedTo !== 'string') {
938
+ return new TypeError('Expected "string" but received "' + typeof obj_assignedTo + '" (at "' + path_assignedTo + '")');
939
+ }
940
+ }
941
+ if (obj.comment !== undefined) {
942
+ const obj_comment = obj.comment;
943
+ const path_comment = path + '.comment';
944
+ if (typeof obj_comment !== 'string') {
945
+ return new TypeError('Expected "string" but received "' + typeof obj_comment + '" (at "' + path_comment + '")');
946
+ }
947
+ }
948
+ if (obj.dueDate !== undefined) {
949
+ const obj_dueDate = obj.dueDate;
950
+ const path_dueDate = path + '.dueDate';
951
+ if (typeof obj_dueDate !== 'string') {
952
+ return new TypeError('Expected "string" but received "' + typeof obj_dueDate + '" (at "' + path_dueDate + '")');
953
+ }
954
+ }
955
+ if (obj.id !== undefined) {
956
+ const obj_id = obj.id;
957
+ const path_id = path + '.id';
958
+ if (typeof obj_id !== 'string') {
959
+ return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
960
+ }
961
+ }
962
+ if (obj.isRequired !== undefined) {
963
+ const obj_isRequired = obj.isRequired;
964
+ const path_isRequired = path + '.isRequired';
965
+ if (typeof obj_isRequired !== 'boolean') {
966
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isRequired + '" (at "' + path_isRequired + '")');
967
+ }
968
+ }
969
+ if (obj.priority !== undefined) {
970
+ const obj_priority = obj.priority;
971
+ const path_priority = path + '.priority';
972
+ if (typeof obj_priority !== 'string') {
973
+ return new TypeError('Expected "string" but received "' + typeof obj_priority + '" (at "' + path_priority + '")');
974
+ }
975
+ }
976
+ if (obj.status !== undefined) {
977
+ const obj_status = obj.status;
978
+ const path_status = path + '.status';
979
+ if (typeof obj_status !== 'string') {
980
+ return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
981
+ }
982
+ }
983
+ if (obj.subject !== undefined) {
984
+ const obj_subject = obj.subject;
985
+ const path_subject = path + '.subject';
986
+ if (typeof obj_subject !== 'string') {
987
+ return new TypeError('Expected "string" but received "' + typeof obj_subject + '" (at "' + path_subject + '")');
988
+ }
989
+ }
990
+ })();
991
+ return v_error === undefined ? null : v_error;
992
+ }
993
+
994
+ function validate$e(obj, path = 'BenefitDisbursementForBenefitSessionInputRepresentation') {
995
+ const v_error = (() => {
996
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
997
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
998
+ }
999
+ const obj_actualCompletionDate = obj.actualCompletionDate;
1000
+ const path_actualCompletionDate = path + '.actualCompletionDate';
1001
+ if (typeof obj_actualCompletionDate !== 'string') {
1002
+ return new TypeError('Expected "string" but received "' + typeof obj_actualCompletionDate + '" (at "' + path_actualCompletionDate + '")');
1003
+ }
1004
+ if (obj.benefitCategory !== undefined) {
1005
+ const obj_benefitCategory = obj.benefitCategory;
1006
+ const path_benefitCategory = path + '.benefitCategory';
1007
+ if (typeof obj_benefitCategory !== 'string') {
1008
+ return new TypeError('Expected "string" but received "' + typeof obj_benefitCategory + '" (at "' + path_benefitCategory + '")');
1009
+ }
1010
+ }
1011
+ const obj_benefitSessionId = obj.benefitSessionId;
1012
+ const path_benefitSessionId = path + '.benefitSessionId';
1013
+ if (typeof obj_benefitSessionId !== 'string') {
1014
+ return new TypeError('Expected "string" but received "' + typeof obj_benefitSessionId + '" (at "' + path_benefitSessionId + '")');
1015
+ }
1016
+ if (obj.description !== undefined) {
1017
+ const obj_description = obj.description;
1018
+ const path_description = path + '.description';
1019
+ if (typeof obj_description !== 'string') {
1020
+ return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
1021
+ }
1022
+ }
1023
+ if (obj.disbursementStatus !== undefined) {
1024
+ const obj_disbursementStatus = obj.disbursementStatus;
1025
+ const path_disbursementStatus = path + '.disbursementStatus';
1026
+ if (typeof obj_disbursementStatus !== 'string') {
1027
+ return new TypeError('Expected "string" but received "' + typeof obj_disbursementStatus + '" (at "' + path_disbursementStatus + '")');
1028
+ }
1029
+ }
1030
+ if (obj.endDate !== undefined) {
1031
+ const obj_endDate = obj.endDate;
1032
+ const path_endDate = path + '.endDate';
1033
+ if (typeof obj_endDate !== 'string') {
1034
+ return new TypeError('Expected "string" but received "' + typeof obj_endDate + '" (at "' + path_endDate + '")');
1035
+ }
1036
+ }
1037
+ if (obj.startDate !== undefined) {
1038
+ const obj_startDate = obj.startDate;
1039
+ const path_startDate = path + '.startDate';
1040
+ if (typeof obj_startDate !== 'string') {
1041
+ return new TypeError('Expected "string" but received "' + typeof obj_startDate + '" (at "' + path_startDate + '")');
1042
+ }
1043
+ }
1044
+ })();
1045
+ return v_error === undefined ? null : v_error;
1046
+ }
1047
+
1048
+ function validate$d(obj, path = 'BenefitDisbursementListInputRepresentation') {
1049
+ const v_error = (() => {
1050
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1051
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1052
+ }
1053
+ const obj_records = obj.records;
1054
+ const path_records = path + '.records';
1055
+ if (!ArrayIsArray(obj_records)) {
1056
+ return new TypeError('Expected "array" but received "' + typeof obj_records + '" (at "' + path_records + '")');
1057
+ }
1058
+ for (let i = 0; i < obj_records.length; i++) {
1059
+ const obj_records_item = obj_records[i];
1060
+ const path_records_item = path_records + '[' + i + ']';
1061
+ const referencepath_records_itemValidationError = validate$e(obj_records_item, path_records_item);
1062
+ if (referencepath_records_itemValidationError !== null) {
1063
+ let message = 'Object doesn\'t match BenefitDisbursementForBenefitSessionInputRepresentation (at "' + path_records_item + '")\n';
1064
+ message += referencepath_records_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1065
+ return new TypeError(message);
1066
+ }
1067
+ }
1068
+ })();
1069
+ return v_error === undefined ? null : v_error;
1070
+ }
1071
+
1072
+ function validate$c(obj, path = 'CustomFieldInputRepresentation') {
1073
+ const v_error = (() => {
1074
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1075
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1076
+ }
1077
+ if (obj.dataType !== undefined) {
1078
+ const obj_dataType = obj.dataType;
1079
+ const path_dataType = path + '.dataType';
1080
+ if (typeof obj_dataType !== 'string') {
1081
+ return new TypeError('Expected "string" but received "' + typeof obj_dataType + '" (at "' + path_dataType + '")');
1082
+ }
1083
+ }
1084
+ const obj_fieldName = obj.fieldName;
1085
+ const path_fieldName = path + '.fieldName';
1086
+ if (typeof obj_fieldName !== 'string') {
1087
+ return new TypeError('Expected "string" but received "' + typeof obj_fieldName + '" (at "' + path_fieldName + '")');
1088
+ }
1089
+ const obj_fieldValue = obj.fieldValue;
1090
+ const path_fieldValue = path + '.fieldValue';
1091
+ if (obj_fieldValue === undefined) {
1092
+ return new TypeError('Expected "defined" but received "' + typeof obj_fieldValue + '" (at "' + path_fieldValue + '")');
1093
+ }
1094
+ })();
1095
+ return v_error === undefined ? null : v_error;
1096
+ }
1097
+
1098
+ function validate$b(obj, path = 'CustomFieldListInputRepresentation') {
1099
+ const v_error = (() => {
1100
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1101
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1102
+ }
1103
+ const obj_records = obj.records;
1104
+ const path_records = path + '.records';
1105
+ if (!ArrayIsArray(obj_records)) {
1106
+ return new TypeError('Expected "array" but received "' + typeof obj_records + '" (at "' + path_records + '")');
1107
+ }
1108
+ for (let i = 0; i < obj_records.length; i++) {
1109
+ const obj_records_item = obj_records[i];
1110
+ const path_records_item = path_records + '[' + i + ']';
1111
+ const referencepath_records_itemValidationError = validate$c(obj_records_item, path_records_item);
1112
+ if (referencepath_records_itemValidationError !== null) {
1113
+ let message = 'Object doesn\'t match CustomFieldInputRepresentation (at "' + path_records_item + '")\n';
1114
+ message += referencepath_records_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1115
+ return new TypeError(message);
1116
+ }
1117
+ }
1118
+ })();
1119
+ return v_error === undefined ? null : v_error;
1120
+ }
1121
+
1122
+ function validate$a(obj, path = 'BenefitAssignmentInputRepresentation') {
1123
+ const v_error = (() => {
1124
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1125
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1126
+ }
1127
+ if (obj.benefitAssignmentTasks !== undefined) {
1128
+ const obj_benefitAssignmentTasks = obj.benefitAssignmentTasks;
1129
+ const path_benefitAssignmentTasks = path + '.benefitAssignmentTasks';
1130
+ const referencepath_benefitAssignmentTasksValidationError = validate$f(obj_benefitAssignmentTasks, path_benefitAssignmentTasks);
1131
+ if (referencepath_benefitAssignmentTasksValidationError !== null) {
1132
+ let message = 'Object doesn\'t match CarePlanTaskInputRepresentation (at "' + path_benefitAssignmentTasks + '")\n';
1133
+ message += referencepath_benefitAssignmentTasksValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1134
+ return new TypeError(message);
1135
+ }
1136
+ }
1137
+ if (obj.benefitDisbursements !== undefined) {
1138
+ const obj_benefitDisbursements = obj.benefitDisbursements;
1139
+ const path_benefitDisbursements = path + '.benefitDisbursements';
1140
+ const referencepath_benefitDisbursementsValidationError = validate$d(obj_benefitDisbursements, path_benefitDisbursements);
1141
+ if (referencepath_benefitDisbursementsValidationError !== null) {
1142
+ let message = 'Object doesn\'t match BenefitDisbursementListInputRepresentation (at "' + path_benefitDisbursements + '")\n';
1143
+ message += referencepath_benefitDisbursementsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1144
+ return new TypeError(message);
1145
+ }
1146
+ }
1147
+ if (obj.benefitFrequency !== undefined) {
1148
+ const obj_benefitFrequency = obj.benefitFrequency;
1149
+ const path_benefitFrequency = path + '.benefitFrequency';
1150
+ if (typeof obj_benefitFrequency !== 'string') {
1151
+ return new TypeError('Expected "string" but received "' + typeof obj_benefitFrequency + '" (at "' + path_benefitFrequency + '")');
1152
+ }
1153
+ }
1154
+ const obj_benefitId = obj.benefitId;
1155
+ const path_benefitId = path + '.benefitId';
1156
+ if (typeof obj_benefitId !== 'string') {
1157
+ return new TypeError('Expected "string" but received "' + typeof obj_benefitId + '" (at "' + path_benefitId + '")');
1158
+ }
1159
+ if (obj.customFields !== undefined) {
1160
+ const obj_customFields = obj.customFields;
1161
+ const path_customFields = path + '.customFields';
1162
+ const referencepath_customFieldsValidationError = validate$b(obj_customFields, path_customFields);
1163
+ if (referencepath_customFieldsValidationError !== null) {
1164
+ let message = 'Object doesn\'t match CustomFieldListInputRepresentation (at "' + path_customFields + '")\n';
1165
+ message += referencepath_customFieldsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1166
+ return new TypeError(message);
1167
+ }
1168
+ }
1169
+ if (obj.endDate !== undefined) {
1170
+ const obj_endDate = obj.endDate;
1171
+ const path_endDate = path + '.endDate';
1172
+ if (typeof obj_endDate !== 'string') {
1173
+ return new TypeError('Expected "string" but received "' + typeof obj_endDate + '" (at "' + path_endDate + '")');
1174
+ }
1175
+ }
1176
+ if (obj.enrollmentCount !== undefined) {
1177
+ const obj_enrollmentCount = obj.enrollmentCount;
1178
+ const path_enrollmentCount = path + '.enrollmentCount';
1179
+ if (typeof obj_enrollmentCount !== 'number' || (typeof obj_enrollmentCount === 'number' && Math.floor(obj_enrollmentCount) !== obj_enrollmentCount)) {
1180
+ return new TypeError('Expected "integer" but received "' + typeof obj_enrollmentCount + '" (at "' + path_enrollmentCount + '")');
1181
+ }
1182
+ }
1183
+ if (obj.entitlementAmount !== undefined) {
1184
+ obj.entitlementAmount;
1185
+ }
1186
+ if (obj.id !== undefined) {
1187
+ const obj_id = obj.id;
1188
+ const path_id = path + '.id';
1189
+ if (typeof obj_id !== 'string') {
1190
+ return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
1191
+ }
1192
+ }
1193
+ if (obj.maximumAmount !== undefined) {
1194
+ obj.maximumAmount;
1195
+ }
1196
+ const obj_participantId = obj.participantId;
1197
+ const path_participantId = path + '.participantId';
1198
+ if (typeof obj_participantId !== 'string') {
1199
+ return new TypeError('Expected "string" but received "' + typeof obj_participantId + '" (at "' + path_participantId + '")');
1200
+ }
1201
+ if (obj.payoutFrequency !== undefined) {
1202
+ const obj_payoutFrequency = obj.payoutFrequency;
1203
+ const path_payoutFrequency = path + '.payoutFrequency';
1204
+ if (typeof obj_payoutFrequency !== 'string') {
1205
+ return new TypeError('Expected "string" but received "' + typeof obj_payoutFrequency + '" (at "' + path_payoutFrequency + '")');
1206
+ }
1207
+ }
1208
+ if (obj.priority !== undefined) {
1209
+ const obj_priority = obj.priority;
1210
+ const path_priority = path + '.priority';
1211
+ if (typeof obj_priority !== 'string') {
1212
+ return new TypeError('Expected "string" but received "' + typeof obj_priority + '" (at "' + path_priority + '")');
1213
+ }
1214
+ }
1215
+ if (obj.startDate !== undefined) {
1216
+ const obj_startDate = obj.startDate;
1217
+ const path_startDate = path + '.startDate';
1218
+ if (typeof obj_startDate !== 'string') {
1219
+ return new TypeError('Expected "string" but received "' + typeof obj_startDate + '" (at "' + path_startDate + '")');
1220
+ }
1221
+ }
1222
+ if (obj.status !== undefined) {
1223
+ const obj_status = obj.status;
1224
+ const path_status = path + '.status';
1225
+ if (typeof obj_status !== 'string') {
1226
+ return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
1227
+ }
1228
+ }
1229
+ })();
1230
+ return v_error === undefined ? null : v_error;
1231
+ }
1232
+
1233
+ function validate$9(obj, path = 'BenefitAssignmentListInputRepresentation') {
1234
+ const v_error = (() => {
1235
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1236
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1237
+ }
1238
+ const obj_records = obj.records;
1239
+ const path_records = path + '.records';
1240
+ if (!ArrayIsArray(obj_records)) {
1241
+ return new TypeError('Expected "array" but received "' + typeof obj_records + '" (at "' + path_records + '")');
1242
+ }
1243
+ for (let i = 0; i < obj_records.length; i++) {
1244
+ const obj_records_item = obj_records[i];
1245
+ const path_records_item = path_records + '[' + i + ']';
1246
+ const referencepath_records_itemValidationError = validate$a(obj_records_item, path_records_item);
1247
+ if (referencepath_records_itemValidationError !== null) {
1248
+ let message = 'Object doesn\'t match BenefitAssignmentInputRepresentation (at "' + path_records_item + '")\n';
1249
+ message += referencepath_records_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1250
+ return new TypeError(message);
1251
+ }
1252
+ }
1253
+ })();
1254
+ return v_error === undefined ? null : v_error;
1255
+ }
1256
+
1257
+ function validate$8(obj, path = 'GoalAssignmentInputRepresentation') {
1258
+ const v_error = (() => {
1259
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1260
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1261
+ }
1262
+ if (obj.associatedBenefitAssignments !== undefined) {
1263
+ const obj_associatedBenefitAssignments = obj.associatedBenefitAssignments;
1264
+ const path_associatedBenefitAssignments = path + '.associatedBenefitAssignments';
1265
+ const referencepath_associatedBenefitAssignmentsValidationError = validate$9(obj_associatedBenefitAssignments, path_associatedBenefitAssignments);
1266
+ if (referencepath_associatedBenefitAssignmentsValidationError !== null) {
1267
+ let message = 'Object doesn\'t match BenefitAssignmentListInputRepresentation (at "' + path_associatedBenefitAssignments + '")\n';
1268
+ message += referencepath_associatedBenefitAssignmentsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1269
+ return new TypeError(message);
1270
+ }
1271
+ }
1272
+ if (obj.associatedSubGoalAssignments !== undefined) {
1273
+ const obj_associatedSubGoalAssignments = obj.associatedSubGoalAssignments;
1274
+ const path_associatedSubGoalAssignments = path + '.associatedSubGoalAssignments';
1275
+ const referencepath_associatedSubGoalAssignmentsValidationError = validate$7(obj_associatedSubGoalAssignments, path_associatedSubGoalAssignments);
1276
+ if (referencepath_associatedSubGoalAssignmentsValidationError !== null) {
1277
+ let message = 'Object doesn\'t match GoalAssignmentListInputRepresentation (at "' + path_associatedSubGoalAssignments + '")\n';
1278
+ message += referencepath_associatedSubGoalAssignmentsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1279
+ return new TypeError(message);
1280
+ }
1281
+ }
1282
+ if (obj.completionDate !== undefined) {
1283
+ const obj_completionDate = obj.completionDate;
1284
+ const path_completionDate = path + '.completionDate';
1285
+ if (typeof obj_completionDate !== 'string') {
1286
+ return new TypeError('Expected "string" but received "' + typeof obj_completionDate + '" (at "' + path_completionDate + '")');
1287
+ }
1288
+ }
1289
+ if (obj.completionPercentage !== undefined) {
1290
+ obj.completionPercentage;
1291
+ }
1292
+ if (obj.customFields !== undefined) {
1293
+ const obj_customFields = obj.customFields;
1294
+ const path_customFields = path + '.customFields';
1295
+ const referencepath_customFieldsValidationError = validate$b(obj_customFields, path_customFields);
1296
+ if (referencepath_customFieldsValidationError !== null) {
1297
+ let message = 'Object doesn\'t match CustomFieldListInputRepresentation (at "' + path_customFields + '")\n';
1298
+ message += referencepath_customFieldsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1299
+ return new TypeError(message);
1300
+ }
1301
+ }
1302
+ if (obj.description !== undefined) {
1303
+ const obj_description = obj.description;
1304
+ const path_description = path + '.description';
1305
+ if (typeof obj_description !== 'string') {
1306
+ return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
1307
+ }
1308
+ }
1309
+ if (obj.goalAssigneeId !== undefined) {
1310
+ const obj_goalAssigneeId = obj.goalAssigneeId;
1311
+ const path_goalAssigneeId = path + '.goalAssigneeId';
1312
+ if (typeof obj_goalAssigneeId !== 'string') {
1313
+ return new TypeError('Expected "string" but received "' + typeof obj_goalAssigneeId + '" (at "' + path_goalAssigneeId + '")');
1314
+ }
1315
+ }
1316
+ if (obj.goalAssignmentTasks !== undefined) {
1317
+ const obj_goalAssignmentTasks = obj.goalAssignmentTasks;
1318
+ const path_goalAssignmentTasks = path + '.goalAssignmentTasks';
1319
+ const referencepath_goalAssignmentTasksValidationError = validate$f(obj_goalAssignmentTasks, path_goalAssignmentTasks);
1320
+ if (referencepath_goalAssignmentTasksValidationError !== null) {
1321
+ let message = 'Object doesn\'t match CarePlanTaskInputRepresentation (at "' + path_goalAssignmentTasks + '")\n';
1322
+ message += referencepath_goalAssignmentTasksValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1323
+ return new TypeError(message);
1324
+ }
1325
+ }
1326
+ const obj_goalDefinitionId = obj.goalDefinitionId;
1327
+ const path_goalDefinitionId = path + '.goalDefinitionId';
1328
+ if (typeof obj_goalDefinitionId !== 'string') {
1329
+ return new TypeError('Expected "string" but received "' + typeof obj_goalDefinitionId + '" (at "' + path_goalDefinitionId + '")');
1330
+ }
1331
+ if (obj.id !== undefined) {
1332
+ const obj_id = obj.id;
1333
+ const path_id = path + '.id';
1334
+ if (typeof obj_id !== 'string') {
1335
+ return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
1336
+ }
1337
+ }
1338
+ if (obj.priority !== undefined) {
1339
+ const obj_priority = obj.priority;
1340
+ const path_priority = path + '.priority';
1341
+ if (typeof obj_priority !== 'string') {
1342
+ return new TypeError('Expected "string" but received "' + typeof obj_priority + '" (at "' + path_priority + '")');
1343
+ }
1344
+ }
1345
+ if (obj.startDate !== undefined) {
1346
+ const obj_startDate = obj.startDate;
1347
+ const path_startDate = path + '.startDate';
1348
+ if (typeof obj_startDate !== 'string') {
1349
+ return new TypeError('Expected "string" but received "' + typeof obj_startDate + '" (at "' + path_startDate + '")');
1350
+ }
1351
+ }
1352
+ if (obj.status !== undefined) {
1353
+ const obj_status = obj.status;
1354
+ const path_status = path + '.status';
1355
+ if (typeof obj_status !== 'string') {
1356
+ return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
1357
+ }
1358
+ }
1359
+ if (obj.targetCompletionDate !== undefined) {
1360
+ const obj_targetCompletionDate = obj.targetCompletionDate;
1361
+ const path_targetCompletionDate = path + '.targetCompletionDate';
1362
+ if (typeof obj_targetCompletionDate !== 'string') {
1363
+ return new TypeError('Expected "string" but received "' + typeof obj_targetCompletionDate + '" (at "' + path_targetCompletionDate + '")');
1364
+ }
1365
+ }
1366
+ })();
1367
+ return v_error === undefined ? null : v_error;
1368
+ }
1369
+
1370
+ function validate$7(obj, path = 'GoalAssignmentListInputRepresentation') {
1371
+ const v_error = (() => {
1372
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1373
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1374
+ }
1375
+ const obj_records = obj.records;
1376
+ const path_records = path + '.records';
1377
+ if (!ArrayIsArray(obj_records)) {
1378
+ return new TypeError('Expected "array" but received "' + typeof obj_records + '" (at "' + path_records + '")');
1379
+ }
1380
+ for (let i = 0; i < obj_records.length; i++) {
1381
+ const obj_records_item = obj_records[i];
1382
+ const path_records_item = path_records + '[' + i + ']';
1383
+ const referencepath_records_itemValidationError = validate$8(obj_records_item, path_records_item);
1384
+ if (referencepath_records_itemValidationError !== null) {
1385
+ let message = 'Object doesn\'t match GoalAssignmentInputRepresentation (at "' + path_records_item + '")\n';
1386
+ message += referencepath_records_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1387
+ return new TypeError(message);
1388
+ }
1389
+ }
1390
+ })();
1391
+ return v_error === undefined ? null : v_error;
1392
+ }
1393
+
1394
+ function validate$6(obj, path = 'CarePlanInputRepresentation') {
1395
+ const v_error = (() => {
1396
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1397
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1398
+ }
1399
+ if (obj.benefitAssignments !== undefined) {
1400
+ const obj_benefitAssignments = obj.benefitAssignments;
1401
+ const path_benefitAssignments = path + '.benefitAssignments';
1402
+ const referencepath_benefitAssignmentsValidationError = validate$9(obj_benefitAssignments, path_benefitAssignments);
1403
+ if (referencepath_benefitAssignmentsValidationError !== null) {
1404
+ let message = 'Object doesn\'t match BenefitAssignmentListInputRepresentation (at "' + path_benefitAssignments + '")\n';
1405
+ message += referencepath_benefitAssignmentsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1406
+ return new TypeError(message);
1407
+ }
1408
+ }
1409
+ if (obj.carePlanTasks !== undefined) {
1410
+ const obj_carePlanTasks = obj.carePlanTasks;
1411
+ const path_carePlanTasks = path + '.carePlanTasks';
1412
+ const referencepath_carePlanTasksValidationError = validate$f(obj_carePlanTasks, path_carePlanTasks);
1413
+ if (referencepath_carePlanTasksValidationError !== null) {
1414
+ let message = 'Object doesn\'t match CarePlanTaskInputRepresentation (at "' + path_carePlanTasks + '")\n';
1415
+ message += referencepath_carePlanTasksValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1416
+ return new TypeError(message);
1417
+ }
1418
+ }
1419
+ if (obj.carePlanTemplateId !== undefined) {
1420
+ const obj_carePlanTemplateId = obj.carePlanTemplateId;
1421
+ const path_carePlanTemplateId = path + '.carePlanTemplateId';
1422
+ if (typeof obj_carePlanTemplateId !== 'string') {
1423
+ return new TypeError('Expected "string" but received "' + typeof obj_carePlanTemplateId + '" (at "' + path_carePlanTemplateId + '")');
1424
+ }
1425
+ }
1426
+ const obj_caseId = obj.caseId;
1427
+ const path_caseId = path + '.caseId';
1428
+ if (typeof obj_caseId !== 'string') {
1429
+ return new TypeError('Expected "string" but received "' + typeof obj_caseId + '" (at "' + path_caseId + '")');
1430
+ }
1431
+ if (obj.customFields !== undefined) {
1432
+ const obj_customFields = obj.customFields;
1433
+ const path_customFields = path + '.customFields';
1434
+ const referencepath_customFieldsValidationError = validate$b(obj_customFields, path_customFields);
1435
+ if (referencepath_customFieldsValidationError !== null) {
1436
+ let message = 'Object doesn\'t match CustomFieldListInputRepresentation (at "' + path_customFields + '")\n';
1437
+ message += referencepath_customFieldsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1438
+ return new TypeError(message);
1439
+ }
1440
+ }
1441
+ if (obj.description !== undefined) {
1442
+ const obj_description = obj.description;
1443
+ const path_description = path + '.description';
1444
+ if (typeof obj_description !== 'string') {
1445
+ return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
1446
+ }
1447
+ }
1448
+ if (obj.endDate !== undefined) {
1449
+ const obj_endDate = obj.endDate;
1450
+ const path_endDate = path + '.endDate';
1451
+ if (typeof obj_endDate !== 'string') {
1452
+ return new TypeError('Expected "string" but received "' + typeof obj_endDate + '" (at "' + path_endDate + '")');
1453
+ }
1454
+ }
1455
+ if (obj.goalAssignments !== undefined) {
1456
+ const obj_goalAssignments = obj.goalAssignments;
1457
+ const path_goalAssignments = path + '.goalAssignments';
1458
+ const referencepath_goalAssignmentsValidationError = validate$7(obj_goalAssignments, path_goalAssignments);
1459
+ if (referencepath_goalAssignmentsValidationError !== null) {
1460
+ let message = 'Object doesn\'t match GoalAssignmentListInputRepresentation (at "' + path_goalAssignments + '")\n';
1461
+ message += referencepath_goalAssignmentsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1462
+ return new TypeError(message);
1463
+ }
1464
+ }
1465
+ if (obj.id !== undefined) {
1466
+ const obj_id = obj.id;
1467
+ const path_id = path + '.id';
1468
+ if (typeof obj_id !== 'string') {
1469
+ return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
1470
+ }
1471
+ }
1472
+ if (obj.medicationTherapyReview !== undefined) {
1473
+ const obj_medicationTherapyReview = obj.medicationTherapyReview;
1474
+ const path_medicationTherapyReview = path + '.medicationTherapyReview';
1475
+ if (typeof obj_medicationTherapyReview !== 'string') {
1476
+ return new TypeError('Expected "string" but received "' + typeof obj_medicationTherapyReview + '" (at "' + path_medicationTherapyReview + '")');
1477
+ }
1478
+ }
1479
+ const obj_name = obj.name;
1480
+ const path_name = path + '.name';
1481
+ if (typeof obj_name !== 'string') {
1482
+ return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
1483
+ }
1484
+ const obj_participantId = obj.participantId;
1485
+ const path_participantId = path + '.participantId';
1486
+ if (typeof obj_participantId !== 'string') {
1487
+ return new TypeError('Expected "string" but received "' + typeof obj_participantId + '" (at "' + path_participantId + '")');
1488
+ }
1489
+ if (obj.startDate !== undefined) {
1490
+ const obj_startDate = obj.startDate;
1491
+ const path_startDate = path + '.startDate';
1492
+ if (typeof obj_startDate !== 'string') {
1493
+ return new TypeError('Expected "string" but received "' + typeof obj_startDate + '" (at "' + path_startDate + '")');
1494
+ }
1495
+ }
1496
+ const obj_status = obj.status;
1497
+ const path_status = path + '.status';
1498
+ if (typeof obj_status !== 'string') {
1499
+ return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
1500
+ }
1501
+ })();
1502
+ return v_error === undefined ? null : v_error;
1503
+ }
1504
+
1505
+ function validate$5(obj, path = 'CarePlanListInputRepresentation') {
1506
+ const v_error = (() => {
1507
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1508
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1509
+ }
1510
+ const obj_records = obj.records;
1511
+ const path_records = path + '.records';
1512
+ if (!ArrayIsArray(obj_records)) {
1513
+ return new TypeError('Expected "array" but received "' + typeof obj_records + '" (at "' + path_records + '")');
1514
+ }
1515
+ for (let i = 0; i < obj_records.length; i++) {
1516
+ const obj_records_item = obj_records[i];
1517
+ const path_records_item = path_records + '[' + i + ']';
1518
+ const referencepath_records_itemValidationError = validate$6(obj_records_item, path_records_item);
1519
+ if (referencepath_records_itemValidationError !== null) {
1520
+ let message = 'Object doesn\'t match CarePlanInputRepresentation (at "' + path_records_item + '")\n';
1521
+ message += referencepath_records_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1522
+ return new TypeError(message);
1523
+ }
1524
+ }
1525
+ })();
1526
+ return v_error === undefined ? null : v_error;
1527
+ }
1528
+
1529
+ function validate$4(obj, path = 'CarePlanBulkInputRepresentation') {
1530
+ const v_error = (() => {
1531
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1532
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1533
+ }
1534
+ const obj_carePlans = obj.carePlans;
1535
+ const path_carePlans = path + '.carePlans';
1536
+ const referencepath_carePlansValidationError = validate$5(obj_carePlans, path_carePlans);
1537
+ if (referencepath_carePlansValidationError !== null) {
1538
+ let message = 'Object doesn\'t match CarePlanListInputRepresentation (at "' + path_carePlans + '")\n';
1539
+ message += referencepath_carePlansValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1540
+ return new TypeError(message);
1541
+ }
1542
+ })();
1543
+ return v_error === undefined ? null : v_error;
1544
+ }
1545
+
1546
+ const TTL = 100;
1547
+ const VERSION$3 = "83a45266096a71720e9049cb0f0477d6";
1548
+ function validate$3(obj, path = 'CarePlanBulkOutputRepresentation') {
1549
+ const v_error = (() => {
1550
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1551
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1552
+ }
1553
+ if (obj.errorMessage !== undefined) {
1554
+ const obj_errorMessage = obj.errorMessage;
1555
+ const path_errorMessage = path + '.errorMessage';
1556
+ if (typeof obj_errorMessage !== 'string') {
1557
+ return new TypeError('Expected "string" but received "' + typeof obj_errorMessage + '" (at "' + path_errorMessage + '")');
1558
+ }
1559
+ }
1560
+ if (obj.numberOfCarePlans !== undefined) {
1561
+ const obj_numberOfCarePlans = obj.numberOfCarePlans;
1562
+ const path_numberOfCarePlans = path + '.numberOfCarePlans';
1563
+ if (typeof obj_numberOfCarePlans !== 'number' || (typeof obj_numberOfCarePlans === 'number' && Math.floor(obj_numberOfCarePlans) !== obj_numberOfCarePlans)) {
1564
+ return new TypeError('Expected "integer" but received "' + typeof obj_numberOfCarePlans + '" (at "' + path_numberOfCarePlans + '")');
1565
+ }
1566
+ }
1567
+ const obj_statusCode = obj.statusCode;
1568
+ const path_statusCode = path + '.statusCode';
1569
+ if (typeof obj_statusCode !== 'string') {
1570
+ return new TypeError('Expected "string" but received "' + typeof obj_statusCode + '" (at "' + path_statusCode + '")');
1571
+ }
1572
+ })();
1573
+ return v_error === undefined ? null : v_error;
1574
+ }
1575
+ const RepresentationType$1 = 'CarePlanBulkOutputRepresentation';
1576
+ function keyBuilder$2(luvio, config) {
1577
+ return keyPrefix + '::' + RepresentationType$1 + ':' + config.id;
1578
+ }
1579
+ function keyBuilderFromType(luvio, object) {
1580
+ const keyParams = {
1581
+ id: object.statusCode
1582
+ };
1583
+ return keyBuilder$2(luvio, keyParams);
1584
+ }
1585
+ function normalize$1(input, existing, path, luvio, store, timestamp) {
1586
+ return input;
1587
+ }
1588
+ const select$5 = function CarePlanBulkOutputRepresentationSelect() {
1589
+ return {
1590
+ kind: 'Fragment',
1591
+ version: VERSION$3,
1592
+ private: [],
1593
+ opaque: true
1594
+ };
1595
+ };
1596
+ function equals$3(existing, incoming) {
1597
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
1598
+ return false;
1599
+ }
1600
+ return true;
1601
+ }
1602
+ function deepFreeze(input) {
1603
+ ObjectFreeze(input);
1604
+ }
1605
+ const ingest$1 = function CarePlanBulkOutputRepresentationIngest(input, path, luvio, store, timestamp) {
1606
+ if (process.env.NODE_ENV !== 'production') {
1607
+ const validateError = validate$3(input);
1608
+ if (validateError !== null) {
1609
+ throw validateError;
1610
+ }
1611
+ }
1612
+ const key = keyBuilderFromType(luvio, input);
1613
+ const existingRecord = store.readEntry(key);
1614
+ const ttlToUse = TTL;
1615
+ let incomingRecord = normalize$1(input, store.readEntry(key), {
1616
+ fullPath: key,
1617
+ parent: path.parent,
1618
+ propertyName: path.propertyName,
1619
+ ttl: ttlToUse
1620
+ });
1621
+ deepFreeze(input);
1622
+ if (existingRecord === undefined || equals$3(existingRecord, incomingRecord) === false) {
1623
+ luvio.storePublish(key, incomingRecord);
1624
+ }
1625
+ {
1626
+ const storeMetadataParams = {
1627
+ ttl: ttlToUse,
1628
+ namespace: "education",
1629
+ version: VERSION$3,
1630
+ representationName: RepresentationType$1,
1631
+ };
1632
+ luvio.publishStoreMetadata(key, storeMetadataParams);
1633
+ }
1634
+ return createLink(key);
1635
+ };
1636
+ function getTypeCacheKeys$1(luvio, input, fullPathFactory) {
1637
+ const rootKeySet = new StoreKeyMap();
1638
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1639
+ const rootKey = keyBuilderFromType(luvio, input);
1640
+ rootKeySet.set(rootKey, {
1641
+ namespace: keyPrefix,
1642
+ representationName: RepresentationType$1,
1643
+ mergeable: false
1644
+ });
1645
+ return rootKeySet;
1646
+ }
1647
+
1648
+ function select$4(luvio, params) {
1649
+ return select$5();
1650
+ }
1651
+ function getResponseCacheKeys$1(luvio, resourceParams, response) {
1652
+ return getTypeCacheKeys$1(luvio, response);
1653
+ }
1654
+ function ingestSuccess$1(luvio, resourceParams, response) {
1655
+ const { body } = response;
1656
+ const key = keyBuilderFromType(luvio, body);
1657
+ luvio.storeIngest(key, ingest$1, body);
1658
+ const snapshot = luvio.storeLookup({
1659
+ recordId: key,
1660
+ node: select$4(),
1661
+ variables: {},
1662
+ });
1663
+ if (process.env.NODE_ENV !== 'production') {
1664
+ if (snapshot.state !== 'Fulfilled') {
1665
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1666
+ }
1667
+ }
1668
+ return snapshot;
1669
+ }
1670
+ function createResourceRequest$1(config) {
1671
+ const headers = {};
1672
+ return {
1673
+ baseUri: '/services/data/v58.0',
1674
+ basePath: '/connect/education/careplan/bulk',
1675
+ method: 'post',
1676
+ body: config.body,
1677
+ urlParams: {},
1678
+ queryParams: {},
1679
+ headers,
1680
+ priority: 'normal',
1681
+ };
1682
+ }
1683
+
1684
+ const createCarePlans_ConfigPropertyNames = {
1685
+ displayName: 'createCarePlans',
1686
+ parameters: {
1687
+ required: ['carePlanBulkRecord'],
1688
+ optional: []
1689
+ }
1690
+ };
1691
+ function createResourceParams$1(config) {
1692
+ const resourceParams = {
1693
+ body: {
1694
+ carePlanBulkRecord: config.carePlanBulkRecord
1695
+ }
1696
+ };
1697
+ return resourceParams;
1698
+ }
1699
+ function typeCheckConfig$1(untrustedConfig) {
1700
+ const config = {};
1701
+ const untrustedConfig_carePlanBulkRecord = untrustedConfig.carePlanBulkRecord;
1702
+ const referenceCarePlanBulkInputRepresentationValidationError = validate$4(untrustedConfig_carePlanBulkRecord);
1703
+ if (referenceCarePlanBulkInputRepresentationValidationError === null) {
1704
+ config.carePlanBulkRecord = untrustedConfig_carePlanBulkRecord;
1705
+ }
1706
+ return config;
1707
+ }
1708
+ function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
1709
+ if (!untrustedIsObject(untrustedConfig)) {
1710
+ return null;
1711
+ }
1712
+ if (process.env.NODE_ENV !== 'production') {
1713
+ validateConfig(untrustedConfig, configPropertyNames);
1714
+ }
1715
+ const config = typeCheckConfig$1(untrustedConfig);
1716
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1717
+ return null;
1718
+ }
1719
+ return config;
1720
+ }
1721
+ function buildNetworkSnapshot$1(luvio, config, options) {
1722
+ const resourceParams = createResourceParams$1(config);
1723
+ const request = createResourceRequest$1(resourceParams);
1724
+ return luvio.dispatchResourceRequest(request, options)
1725
+ .then((response) => {
1726
+ return luvio.handleSuccessResponse(() => {
1727
+ const snapshot = ingestSuccess$1(luvio, resourceParams, response);
1728
+ return luvio.storeBroadcast().then(() => snapshot);
1729
+ }, () => getResponseCacheKeys$1(luvio, resourceParams, response.body));
1730
+ }, (response) => {
1731
+ deepFreeze$1(response);
1732
+ throw response;
1733
+ });
1734
+ }
1735
+ const createCarePlansAdapterFactory = (luvio) => {
1736
+ return function createCarePlans(untrustedConfig) {
1737
+ const config = validateAdapterConfig$1(untrustedConfig, createCarePlans_ConfigPropertyNames);
1738
+ // Invalid or incomplete config
1739
+ if (config === null) {
1740
+ throw new Error('Invalid config for "createCarePlans"');
1741
+ }
1742
+ return buildNetworkSnapshot$1(luvio, config);
1743
+ };
1744
+ };
1745
+
911
1746
  const VERSION$2 = "256a3344cb09454a859ca2f0645eb0bc";
912
1747
  function validate$2(obj, path = 'AvailableTeam') {
913
1748
  const v_error = (() => {
@@ -1447,4 +2282,4 @@ const getSuccessTeamAdapterFactory = (luvio) => function education__getSuccessTe
1447
2282
  buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
1448
2283
  };
1449
2284
 
1450
- export { getAvailableTimeSlotsAdapterFactory, getAvailableTopicsAdapterFactory, getSuccessTeamAdapterFactory };
2285
+ export { createCarePlansAdapterFactory, getAvailableTimeSlotsAdapterFactory, getAvailableTopicsAdapterFactory, getSuccessTeamAdapterFactory };