@salesforce/lds-adapters-platform-lightning-types 1.345.0 → 1.347.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.
@@ -4,10 +4,11 @@
4
4
  * For full license text, see the LICENSE.txt file
5
5
  */
6
6
 
7
- import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$3, typeCheckConfig as typeCheckConfig$3, StoreKeyMap, createResourceParams as createResourceParams$3 } from '@luvio/engine';
7
+ import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$4, typeCheckConfig as typeCheckConfig$4, StoreKeyMap, createResourceParams as createResourceParams$4 } from '@luvio/engine';
8
8
 
9
9
  const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
10
10
  const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
11
+ const { stringify: JSONStringify$1 } = JSON;
11
12
  const { isArray: ArrayIsArray$1 } = Array;
12
13
  /**
13
14
  * Validates an adapter config is well-formed.
@@ -48,6 +49,61 @@ const snapshotRefreshOptions = {
48
49
  },
49
50
  }
50
51
  };
52
+ /**
53
+ * A deterministic JSON stringify implementation. Heavily adapted from https://github.com/epoberezkin/fast-json-stable-stringify.
54
+ * This is needed because insertion order for JSON.stringify(object) affects output:
55
+ * JSON.stringify({a: 1, b: 2})
56
+ * "{"a":1,"b":2}"
57
+ * JSON.stringify({b: 2, a: 1})
58
+ * "{"b":2,"a":1}"
59
+ * @param data Data to be JSON-stringified.
60
+ * @returns JSON.stringified value with consistent ordering of keys.
61
+ */
62
+ function stableJSONStringify(node) {
63
+ // This is for Date values.
64
+ if (node && node.toJSON && typeof node.toJSON === 'function') {
65
+ // eslint-disable-next-line no-param-reassign
66
+ node = node.toJSON();
67
+ }
68
+ if (node === undefined) {
69
+ return;
70
+ }
71
+ if (typeof node === 'number') {
72
+ return isFinite(node) ? '' + node : 'null';
73
+ }
74
+ if (typeof node !== 'object') {
75
+ return JSONStringify$1(node);
76
+ }
77
+ let i;
78
+ let out;
79
+ if (ArrayIsArray$1(node)) {
80
+ out = '[';
81
+ for (i = 0; i < node.length; i++) {
82
+ if (i) {
83
+ out += ',';
84
+ }
85
+ out += stableJSONStringify(node[i]) || 'null';
86
+ }
87
+ return out + ']';
88
+ }
89
+ if (node === null) {
90
+ return 'null';
91
+ }
92
+ const keys = ObjectKeys$1(node).sort();
93
+ out = '';
94
+ for (i = 0; i < keys.length; i++) {
95
+ const key = keys[i];
96
+ const value = stableJSONStringify(node[key]);
97
+ if (!value) {
98
+ continue;
99
+ }
100
+ if (out) {
101
+ out += ',';
102
+ }
103
+ out += JSONStringify$1(key) + ':' + value;
104
+ }
105
+ return '{' + out + '}';
106
+ }
51
107
  function generateParamConfigMetadata(name, required, resourceType, typeCheckShape, isArrayShape = false, coerceFn) {
52
108
  return {
53
109
  name,
@@ -93,9 +149,9 @@ function createLink(ref) {
93
149
  };
94
150
  }
95
151
 
96
- const TTL$3 = 100;
97
- const VERSION$3 = "4895529fcf8796413981df590ff3c2e9";
98
- function validate$b(obj, path = 'LightningTypeSummaryRepresentation') {
152
+ const TTL$4 = 100;
153
+ const VERSION$4 = "4895529fcf8796413981df590ff3c2e9";
154
+ function validate$e(obj, path = 'LightningTypeSummaryRepresentation') {
99
155
  const v_error = (() => {
100
156
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
101
157
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -267,58 +323,58 @@ function validate$b(obj, path = 'LightningTypeSummaryRepresentation') {
267
323
  })();
268
324
  return v_error === undefined ? null : v_error;
269
325
  }
270
- const RepresentationType$3 = 'LightningTypeSummaryRepresentation';
271
- function keyBuilder$6(luvio, config) {
272
- return keyPrefix + '::' + RepresentationType$3 + ':' + (config.id === null ? '' : config.id);
326
+ const RepresentationType$4 = 'LightningTypeSummaryRepresentation';
327
+ function keyBuilder$8(luvio, config) {
328
+ return keyPrefix + '::' + RepresentationType$4 + ':' + (config.id === null ? '' : config.id);
273
329
  }
274
330
  function keyBuilderFromType(luvio, object) {
275
331
  const keyParams = {
276
332
  id: object.developerName
277
333
  };
278
- return keyBuilder$6(luvio, keyParams);
334
+ return keyBuilder$8(luvio, keyParams);
279
335
  }
280
- function normalize$3(input, existing, path, luvio, store, timestamp) {
336
+ function normalize$4(input, existing, path, luvio, store, timestamp) {
281
337
  return input;
282
338
  }
283
- const select$6 = function LightningTypeSummaryRepresentationSelect() {
339
+ const select$8 = function LightningTypeSummaryRepresentationSelect() {
284
340
  return {
285
341
  kind: 'Fragment',
286
- version: VERSION$3,
342
+ version: VERSION$4,
287
343
  private: [],
288
344
  opaque: true
289
345
  };
290
346
  };
291
- function equals$3(existing, incoming) {
347
+ function equals$4(existing, incoming) {
292
348
  if (JSONStringify(incoming) !== JSONStringify(existing)) {
293
349
  return false;
294
350
  }
295
351
  return true;
296
352
  }
297
- const ingest$3 = function LightningTypeSummaryRepresentationIngest(input, path, luvio, store, timestamp) {
353
+ const ingest$4 = function LightningTypeSummaryRepresentationIngest(input, path, luvio, store, timestamp) {
298
354
  if (process.env.NODE_ENV !== 'production') {
299
- const validateError = validate$b(input);
355
+ const validateError = validate$e(input);
300
356
  if (validateError !== null) {
301
357
  throw validateError;
302
358
  }
303
359
  }
304
360
  const key = keyBuilderFromType(luvio, input);
305
- const ttlToUse = TTL$3;
306
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "lightning-types", VERSION$3, RepresentationType$3, equals$3);
361
+ const ttlToUse = TTL$4;
362
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "lightning-types", VERSION$4, RepresentationType$4, equals$4);
307
363
  return createLink(key);
308
364
  };
309
- function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
365
+ function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
310
366
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
311
367
  const rootKey = keyBuilderFromType(luvio, input);
312
368
  rootKeySet.set(rootKey, {
313
369
  namespace: keyPrefix,
314
- representationName: RepresentationType$3,
370
+ representationName: RepresentationType$4,
315
371
  mergeable: false
316
372
  });
317
373
  }
318
374
 
319
- const TTL$2 = 100;
320
- const VERSION$2 = "c66a5dd98fb4b617c447b5ec059204fd";
321
- function validate$a(obj, path = 'LightningTypeCollectionRepresentation') {
375
+ const TTL$3 = 100;
376
+ const VERSION$3 = "c66a5dd98fb4b617c447b5ec059204fd";
377
+ function validate$d(obj, path = 'LightningTypeCollectionRepresentation') {
322
378
  const v_error = (() => {
323
379
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
324
380
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -425,14 +481,14 @@ function validate$a(obj, path = 'LightningTypeCollectionRepresentation') {
425
481
  })();
426
482
  return v_error === undefined ? null : v_error;
427
483
  }
428
- const RepresentationType$2 = 'LightningTypeCollectionRepresentation';
429
- function normalize$2(input, existing, path, luvio, store, timestamp) {
484
+ const RepresentationType$3 = 'LightningTypeCollectionRepresentation';
485
+ function normalize$3(input, existing, path, luvio, store, timestamp) {
430
486
  const input_lightningTypes = input.lightningTypes;
431
487
  const input_lightningTypes_id = path.fullPath + '__lightningTypes';
432
488
  for (let i = 0; i < input_lightningTypes.length; i++) {
433
489
  const input_lightningTypes_item = input_lightningTypes[i];
434
490
  let input_lightningTypes_item_id = input_lightningTypes_id + '__' + i;
435
- input_lightningTypes[i] = ingest$3(input_lightningTypes_item, {
491
+ input_lightningTypes[i] = ingest$4(input_lightningTypes_item, {
436
492
  fullPath: input_lightningTypes_item_id,
437
493
  propertyName: i,
438
494
  parent: {
@@ -445,10 +501,10 @@ function normalize$2(input, existing, path, luvio, store, timestamp) {
445
501
  }
446
502
  return input;
447
503
  }
448
- const select$5 = function LightningTypeCollectionRepresentationSelect() {
504
+ const select$7 = function LightningTypeCollectionRepresentationSelect() {
449
505
  return {
450
506
  kind: 'Fragment',
451
- version: VERSION$2,
507
+ version: VERSION$3,
452
508
  private: [],
453
509
  selections: [
454
510
  {
@@ -463,7 +519,7 @@ const select$5 = function LightningTypeCollectionRepresentationSelect() {
463
519
  name: 'lightningTypes',
464
520
  kind: 'Link',
465
521
  plural: true,
466
- fragment: select$6()
522
+ fragment: select$8()
467
523
  },
468
524
  {
469
525
  name: 'nextPageUrl',
@@ -478,7 +534,7 @@ const select$5 = function LightningTypeCollectionRepresentationSelect() {
478
534
  ]
479
535
  };
480
536
  };
481
- function equals$2(existing, incoming) {
537
+ function equals$3(existing, incoming) {
482
538
  const existing_count = existing.count;
483
539
  const incoming_count = incoming.count;
484
540
  if (!(existing_count === incoming_count)) {
@@ -527,48 +583,48 @@ function equals$2(existing, incoming) {
527
583
  }
528
584
  return true;
529
585
  }
530
- const ingest$2 = function LightningTypeCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
586
+ const ingest$3 = function LightningTypeCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
531
587
  if (process.env.NODE_ENV !== 'production') {
532
- const validateError = validate$a(input);
588
+ const validateError = validate$d(input);
533
589
  if (validateError !== null) {
534
590
  throw validateError;
535
591
  }
536
592
  }
537
593
  const key = path.fullPath;
538
- const ttlToUse = TTL$2;
539
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "lightning-types", VERSION$2, RepresentationType$2, equals$2);
594
+ const ttlToUse = TTL$3;
595
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "lightning-types", VERSION$3, RepresentationType$3, equals$3);
540
596
  return createLink(key);
541
597
  };
542
- function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
598
+ function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
543
599
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
544
600
  const rootKey = fullPathFactory();
545
601
  rootKeySet.set(rootKey, {
546
602
  namespace: keyPrefix,
547
- representationName: RepresentationType$2,
603
+ representationName: RepresentationType$3,
548
604
  mergeable: false
549
605
  });
550
606
  const input_lightningTypes_length = input.lightningTypes.length;
551
607
  for (let i = 0; i < input_lightningTypes_length; i++) {
552
- getTypeCacheKeys$3(rootKeySet, luvio, input.lightningTypes[i]);
608
+ getTypeCacheKeys$4(rootKeySet, luvio, input.lightningTypes[i]);
553
609
  }
554
610
  }
555
611
 
556
- function select$4(luvio, params) {
557
- return select$5();
612
+ function select$6(luvio, params) {
613
+ return select$7();
558
614
  }
559
- function keyBuilder$5(luvio, params) {
615
+ function keyBuilder$7(luvio, params) {
560
616
  return keyPrefix + '::LightningTypeCollectionRepresentation:(' + 'editorConfigTarget:' + params.queryParams.editorConfigTarget + ',' + 'fullyQualifiedNames:' + params.queryParams.fullyQualifiedNames + ',' + 'language:' + params.queryParams.language + ',' + 'page:' + params.queryParams.page + ',' + 'pageSize:' + params.queryParams.pageSize + ',' + 'rendererConfigTarget:' + params.queryParams.rendererConfigTarget + ')';
561
617
  }
562
- function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
563
- getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$5(luvio, resourceParams));
618
+ function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
619
+ getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$7(luvio, resourceParams));
564
620
  }
565
- function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
621
+ function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
566
622
  const { body } = response;
567
- const key = keyBuilder$5(luvio, resourceParams);
568
- luvio.storeIngest(key, ingest$2, body);
623
+ const key = keyBuilder$7(luvio, resourceParams);
624
+ luvio.storeIngest(key, ingest$3, body);
569
625
  const snapshot = luvio.storeLookup({
570
626
  recordId: key,
571
- node: select$4(),
627
+ node: select$6(),
572
628
  variables: {},
573
629
  }, snapshotRefresh);
574
630
  if (process.env.NODE_ENV !== 'production') {
@@ -579,19 +635,19 @@ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
579
635
  deepFreeze(snapshot.data);
580
636
  return snapshot;
581
637
  }
582
- function ingestError$2(luvio, params, error, snapshotRefresh) {
583
- const key = keyBuilder$5(luvio, params);
638
+ function ingestError$3(luvio, params, error, snapshotRefresh) {
639
+ const key = keyBuilder$7(luvio, params);
584
640
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
585
641
  const storeMetadataParams = {
586
- ttl: TTL$2,
642
+ ttl: TTL$3,
587
643
  namespace: keyPrefix,
588
- version: VERSION$2,
589
- representationName: RepresentationType$2
644
+ version: VERSION$3,
645
+ representationName: RepresentationType$3
590
646
  };
591
647
  luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
592
648
  return errorSnapshot;
593
649
  }
594
- function createResourceRequest$2(config) {
650
+ function createResourceRequest$3(config) {
595
651
  const headers = {};
596
652
  return {
597
653
  baseUri: '/services/data/v64.0',
@@ -605,7 +661,7 @@ function createResourceRequest$2(config) {
605
661
  };
606
662
  }
607
663
 
608
- const adapterName$2 = 'getLightningTypes';
664
+ const adapterName$3 = 'getLightningTypes';
609
665
  const getLightningTypes_ConfigPropertyMetadata = [
610
666
  generateParamConfigMetadata('editorConfigTarget', false, 1 /* QueryParameter */, 0 /* String */),
611
667
  generateParamConfigMetadata('fullyQualifiedNames', false, 1 /* QueryParameter */, 0 /* String */, true),
@@ -614,91 +670,91 @@ const getLightningTypes_ConfigPropertyMetadata = [
614
670
  generateParamConfigMetadata('pageSize', false, 1 /* QueryParameter */, 3 /* Integer */),
615
671
  generateParamConfigMetadata('rendererConfigTarget', false, 1 /* QueryParameter */, 0 /* String */),
616
672
  ];
617
- const getLightningTypes_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getLightningTypes_ConfigPropertyMetadata);
618
- const createResourceParams$2 = /*#__PURE__*/ createResourceParams$3(getLightningTypes_ConfigPropertyMetadata);
619
- function keyBuilder$4(luvio, config) {
620
- const resourceParams = createResourceParams$2(config);
621
- return keyBuilder$5(luvio, resourceParams);
673
+ const getLightningTypes_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getLightningTypes_ConfigPropertyMetadata);
674
+ const createResourceParams$3 = /*#__PURE__*/ createResourceParams$4(getLightningTypes_ConfigPropertyMetadata);
675
+ function keyBuilder$6(luvio, config) {
676
+ const resourceParams = createResourceParams$3(config);
677
+ return keyBuilder$7(luvio, resourceParams);
622
678
  }
623
- function typeCheckConfig$2(untrustedConfig) {
679
+ function typeCheckConfig$3(untrustedConfig) {
624
680
  const config = {};
625
- typeCheckConfig$3(untrustedConfig, config, getLightningTypes_ConfigPropertyMetadata);
681
+ typeCheckConfig$4(untrustedConfig, config, getLightningTypes_ConfigPropertyMetadata);
626
682
  return config;
627
683
  }
628
- function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
684
+ function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
629
685
  if (!untrustedIsObject(untrustedConfig)) {
630
686
  return null;
631
687
  }
632
688
  if (process.env.NODE_ENV !== 'production') {
633
689
  validateConfig(untrustedConfig, configPropertyNames);
634
690
  }
635
- const config = typeCheckConfig$2(untrustedConfig);
691
+ const config = typeCheckConfig$3(untrustedConfig);
636
692
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
637
693
  return null;
638
694
  }
639
695
  return config;
640
696
  }
641
- function adapterFragment$2(luvio, config) {
642
- createResourceParams$2(config);
643
- return select$4();
697
+ function adapterFragment$3(luvio, config) {
698
+ createResourceParams$3(config);
699
+ return select$6();
644
700
  }
645
- function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
646
- const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
701
+ function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
702
+ const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
647
703
  config,
648
- resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
704
+ resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
649
705
  });
650
706
  return luvio.storeBroadcast().then(() => snapshot);
651
707
  }
652
- function onFetchResponseError$2(luvio, config, resourceParams, response) {
653
- const snapshot = ingestError$2(luvio, resourceParams, response, {
708
+ function onFetchResponseError$3(luvio, config, resourceParams, response) {
709
+ const snapshot = ingestError$3(luvio, resourceParams, response, {
654
710
  config,
655
- resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
711
+ resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
656
712
  });
657
713
  return luvio.storeBroadcast().then(() => snapshot);
658
714
  }
659
- function buildNetworkSnapshot$2(luvio, config, options) {
660
- const resourceParams = createResourceParams$2(config);
661
- const request = createResourceRequest$2(resourceParams);
715
+ function buildNetworkSnapshot$3(luvio, config, options) {
716
+ const resourceParams = createResourceParams$3(config);
717
+ const request = createResourceRequest$3(resourceParams);
662
718
  return luvio.dispatchResourceRequest(request, options)
663
719
  .then((response) => {
664
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
720
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
665
721
  const cache = new StoreKeyMap();
666
- getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
722
+ getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
667
723
  return cache;
668
724
  });
669
725
  }, (response) => {
670
- return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
726
+ return luvio.handleErrorResponse(() => onFetchResponseError$3(luvio, config, resourceParams, response));
671
727
  });
672
728
  }
673
- function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
674
- return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
729
+ function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
730
+ return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
675
731
  }
676
- function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
732
+ function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
677
733
  const { luvio, config } = context;
678
734
  const selector = {
679
- recordId: keyBuilder$4(luvio, config),
680
- node: adapterFragment$2(luvio, config),
735
+ recordId: keyBuilder$6(luvio, config),
736
+ node: adapterFragment$3(luvio, config),
681
737
  variables: {},
682
738
  };
683
739
  const cacheSnapshot = storeLookup(selector, {
684
740
  config,
685
- resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
741
+ resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
686
742
  });
687
743
  return cacheSnapshot;
688
744
  }
689
745
  const getLightningTypesAdapterFactory = (luvio) => function lightningTypes__getLightningTypes(untrustedConfig, requestContext) {
690
- const config = validateAdapterConfig$2(untrustedConfig, getLightningTypes_ConfigPropertyNames);
746
+ const config = validateAdapterConfig$3(untrustedConfig, getLightningTypes_ConfigPropertyNames);
691
747
  // Invalid or incomplete config
692
748
  if (config === null) {
693
749
  return null;
694
750
  }
695
751
  return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
696
- buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
752
+ buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
697
753
  };
698
754
 
699
- const TTL$1 = 100;
700
- const VERSION$1 = "ec107620eea2293ec74a88bdcac66085";
701
- function validate$9(obj, path = 'LightningTypeDetailRepresentation') {
755
+ const TTL$2 = 100;
756
+ const VERSION$2 = "ec107620eea2293ec74a88bdcac66085";
757
+ function validate$c(obj, path = 'LightningTypeDetailRepresentation') {
702
758
  const v_error = (() => {
703
759
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
704
760
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -828,62 +884,62 @@ function validate$9(obj, path = 'LightningTypeDetailRepresentation') {
828
884
  })();
829
885
  return v_error === undefined ? null : v_error;
830
886
  }
831
- const RepresentationType$1 = 'LightningTypeDetailRepresentation';
832
- function normalize$1(input, existing, path, luvio, store, timestamp) {
887
+ const RepresentationType$2 = 'LightningTypeDetailRepresentation';
888
+ function normalize$2(input, existing, path, luvio, store, timestamp) {
833
889
  return input;
834
890
  }
835
- const select$3 = function LightningTypeDetailRepresentationSelect() {
891
+ const select$5 = function LightningTypeDetailRepresentationSelect() {
836
892
  return {
837
893
  kind: 'Fragment',
838
- version: VERSION$1,
894
+ version: VERSION$2,
839
895
  private: [],
840
896
  opaque: true
841
897
  };
842
898
  };
843
- function equals$1(existing, incoming) {
899
+ function equals$2(existing, incoming) {
844
900
  if (JSONStringify(incoming) !== JSONStringify(existing)) {
845
901
  return false;
846
902
  }
847
903
  return true;
848
904
  }
849
- const ingest$1 = function LightningTypeDetailRepresentationIngest(input, path, luvio, store, timestamp) {
905
+ const ingest$2 = function LightningTypeDetailRepresentationIngest(input, path, luvio, store, timestamp) {
850
906
  if (process.env.NODE_ENV !== 'production') {
851
- const validateError = validate$9(input);
907
+ const validateError = validate$c(input);
852
908
  if (validateError !== null) {
853
909
  throw validateError;
854
910
  }
855
911
  }
856
912
  const key = path.fullPath;
857
- const ttlToUse = TTL$1;
858
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "lightning-types", VERSION$1, RepresentationType$1, equals$1);
913
+ const ttlToUse = TTL$2;
914
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "lightning-types", VERSION$2, RepresentationType$2, equals$2);
859
915
  return createLink(key);
860
916
  };
861
- function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
917
+ function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
862
918
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
863
919
  const rootKey = fullPathFactory();
864
920
  rootKeySet.set(rootKey, {
865
921
  namespace: keyPrefix,
866
- representationName: RepresentationType$1,
922
+ representationName: RepresentationType$2,
867
923
  mergeable: false
868
924
  });
869
925
  }
870
926
 
871
- function select$2(luvio, params) {
872
- return select$3();
927
+ function select$4(luvio, params) {
928
+ return select$5();
873
929
  }
874
- function keyBuilder$3(luvio, params) {
930
+ function keyBuilder$5(luvio, params) {
875
931
  return keyPrefix + '::LightningTypeDetailRepresentation:(' + 'editorConfigTarget:' + params.queryParams.editorConfigTarget + ',' + 'includeSubSchemaDefinitions:' + params.queryParams.includeSubSchemaDefinitions + ',' + 'language:' + params.queryParams.language + ',' + 'rendererConfigTarget:' + params.queryParams.rendererConfigTarget + ',' + 'fullyQualifiedName:' + params.urlParams.fullyQualifiedName + ')';
876
932
  }
877
- function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
878
- getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$3(luvio, resourceParams));
933
+ function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
934
+ getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$5(luvio, resourceParams));
879
935
  }
880
- function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
936
+ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
881
937
  const { body } = response;
882
- const key = keyBuilder$3(luvio, resourceParams);
883
- luvio.storeIngest(key, ingest$1, body);
938
+ const key = keyBuilder$5(luvio, resourceParams);
939
+ luvio.storeIngest(key, ingest$2, body);
884
940
  const snapshot = luvio.storeLookup({
885
941
  recordId: key,
886
- node: select$2(),
942
+ node: select$4(),
887
943
  variables: {},
888
944
  }, snapshotRefresh);
889
945
  if (process.env.NODE_ENV !== 'production') {
@@ -894,19 +950,19 @@ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
894
950
  deepFreeze(snapshot.data);
895
951
  return snapshot;
896
952
  }
897
- function ingestError$1(luvio, params, error, snapshotRefresh) {
898
- const key = keyBuilder$3(luvio, params);
953
+ function ingestError$2(luvio, params, error, snapshotRefresh) {
954
+ const key = keyBuilder$5(luvio, params);
899
955
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
900
956
  const storeMetadataParams = {
901
- ttl: TTL$1,
957
+ ttl: TTL$2,
902
958
  namespace: keyPrefix,
903
- version: VERSION$1,
904
- representationName: RepresentationType$1
959
+ version: VERSION$2,
960
+ representationName: RepresentationType$2
905
961
  };
906
962
  luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
907
963
  return errorSnapshot;
908
964
  }
909
- function createResourceRequest$1(config) {
965
+ function createResourceRequest$2(config) {
910
966
  const headers = {};
911
967
  return {
912
968
  baseUri: '/services/data/v64.0',
@@ -920,7 +976,7 @@ function createResourceRequest$1(config) {
920
976
  };
921
977
  }
922
978
 
923
- const adapterName$1 = 'getLightningType';
979
+ const adapterName$2 = 'getLightningType';
924
980
  const getLightningType_ConfigPropertyMetadata = [
925
981
  generateParamConfigMetadata('fullyQualifiedName', true, 0 /* UrlParameter */, 0 /* String */),
926
982
  generateParamConfigMetadata('editorConfigTarget', false, 1 /* QueryParameter */, 0 /* String */),
@@ -928,89 +984,89 @@ const getLightningType_ConfigPropertyMetadata = [
928
984
  generateParamConfigMetadata('language', false, 1 /* QueryParameter */, 0 /* String */),
929
985
  generateParamConfigMetadata('rendererConfigTarget', false, 1 /* QueryParameter */, 0 /* String */),
930
986
  ];
931
- const getLightningType_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getLightningType_ConfigPropertyMetadata);
932
- const createResourceParams$1 = /*#__PURE__*/ createResourceParams$3(getLightningType_ConfigPropertyMetadata);
933
- function keyBuilder$2(luvio, config) {
934
- const resourceParams = createResourceParams$1(config);
935
- return keyBuilder$3(luvio, resourceParams);
987
+ const getLightningType_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getLightningType_ConfigPropertyMetadata);
988
+ const createResourceParams$2 = /*#__PURE__*/ createResourceParams$4(getLightningType_ConfigPropertyMetadata);
989
+ function keyBuilder$4(luvio, config) {
990
+ const resourceParams = createResourceParams$2(config);
991
+ return keyBuilder$5(luvio, resourceParams);
936
992
  }
937
- function typeCheckConfig$1(untrustedConfig) {
993
+ function typeCheckConfig$2(untrustedConfig) {
938
994
  const config = {};
939
- typeCheckConfig$3(untrustedConfig, config, getLightningType_ConfigPropertyMetadata);
995
+ typeCheckConfig$4(untrustedConfig, config, getLightningType_ConfigPropertyMetadata);
940
996
  return config;
941
997
  }
942
- function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
998
+ function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
943
999
  if (!untrustedIsObject(untrustedConfig)) {
944
1000
  return null;
945
1001
  }
946
1002
  if (process.env.NODE_ENV !== 'production') {
947
1003
  validateConfig(untrustedConfig, configPropertyNames);
948
1004
  }
949
- const config = typeCheckConfig$1(untrustedConfig);
1005
+ const config = typeCheckConfig$2(untrustedConfig);
950
1006
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
951
1007
  return null;
952
1008
  }
953
1009
  return config;
954
1010
  }
955
- function adapterFragment$1(luvio, config) {
956
- createResourceParams$1(config);
957
- return select$2();
1011
+ function adapterFragment$2(luvio, config) {
1012
+ createResourceParams$2(config);
1013
+ return select$4();
958
1014
  }
959
- function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
960
- const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
1015
+ function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
1016
+ const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
961
1017
  config,
962
- resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
1018
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
963
1019
  });
964
1020
  return luvio.storeBroadcast().then(() => snapshot);
965
1021
  }
966
- function onFetchResponseError$1(luvio, config, resourceParams, response) {
967
- const snapshot = ingestError$1(luvio, resourceParams, response, {
1022
+ function onFetchResponseError$2(luvio, config, resourceParams, response) {
1023
+ const snapshot = ingestError$2(luvio, resourceParams, response, {
968
1024
  config,
969
- resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
1025
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
970
1026
  });
971
1027
  return luvio.storeBroadcast().then(() => snapshot);
972
1028
  }
973
- function buildNetworkSnapshot$1(luvio, config, options) {
974
- const resourceParams = createResourceParams$1(config);
975
- const request = createResourceRequest$1(resourceParams);
1029
+ function buildNetworkSnapshot$2(luvio, config, options) {
1030
+ const resourceParams = createResourceParams$2(config);
1031
+ const request = createResourceRequest$2(resourceParams);
976
1032
  return luvio.dispatchResourceRequest(request, options)
977
1033
  .then((response) => {
978
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
1034
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
979
1035
  const cache = new StoreKeyMap();
980
- getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
1036
+ getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
981
1037
  return cache;
982
1038
  });
983
1039
  }, (response) => {
984
- return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
1040
+ return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
985
1041
  });
986
1042
  }
987
- function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
988
- return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
1043
+ function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
1044
+ return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
989
1045
  }
990
- function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
1046
+ function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
991
1047
  const { luvio, config } = context;
992
1048
  const selector = {
993
- recordId: keyBuilder$2(luvio, config),
994
- node: adapterFragment$1(luvio, config),
1049
+ recordId: keyBuilder$4(luvio, config),
1050
+ node: adapterFragment$2(luvio, config),
995
1051
  variables: {},
996
1052
  };
997
1053
  const cacheSnapshot = storeLookup(selector, {
998
1054
  config,
999
- resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
1055
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
1000
1056
  });
1001
1057
  return cacheSnapshot;
1002
1058
  }
1003
1059
  const getLightningTypeAdapterFactory = (luvio) => function lightningTypes__getLightningType(untrustedConfig, requestContext) {
1004
- const config = validateAdapterConfig$1(untrustedConfig, getLightningType_ConfigPropertyNames);
1060
+ const config = validateAdapterConfig$2(untrustedConfig, getLightningType_ConfigPropertyNames);
1005
1061
  // Invalid or incomplete config
1006
1062
  if (config === null) {
1007
1063
  return null;
1008
1064
  }
1009
1065
  return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
1010
- buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
1066
+ buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
1011
1067
  };
1012
1068
 
1013
- function validate$8(obj, path = 'LightningModelEditorConfigInputRepresentation') {
1069
+ function validate$b(obj, path = 'LightningModelEditorConfigInputRepresentation') {
1014
1070
  const v_error = (() => {
1015
1071
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1016
1072
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -1047,7 +1103,7 @@ function validate$8(obj, path = 'LightningModelEditorConfigInputRepresentation')
1047
1103
  return v_error === undefined ? null : v_error;
1048
1104
  }
1049
1105
 
1050
- function validate$7(obj, path = 'LightningModelRendererConfigInputRepresentation') {
1106
+ function validate$a(obj, path = 'LightningModelRendererConfigInputRepresentation') {
1051
1107
  const v_error = (() => {
1052
1108
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1053
1109
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -1084,7 +1140,7 @@ function validate$7(obj, path = 'LightningModelRendererConfigInputRepresentation
1084
1140
  return v_error === undefined ? null : v_error;
1085
1141
  }
1086
1142
 
1087
- function validate$6(obj, path = 'LightningModelFilterConfigInputRepresentation') {
1143
+ function validate$9(obj, path = 'LightningModelFilterConfigInputRepresentation') {
1088
1144
  const v_error = (() => {
1089
1145
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1090
1146
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -1105,7 +1161,7 @@ function validate$6(obj, path = 'LightningModelFilterConfigInputRepresentation')
1105
1161
  return v_error === undefined ? null : v_error;
1106
1162
  }
1107
1163
 
1108
- function validate$5(obj, path = 'LightningModelSchemaConfigInputRepresentation') {
1164
+ function validate$8(obj, path = 'LightningModelSchemaConfigInputRepresentation') {
1109
1165
  const v_error = (() => {
1110
1166
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1111
1167
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -1113,7 +1169,7 @@ function validate$5(obj, path = 'LightningModelSchemaConfigInputRepresentation')
1113
1169
  if (obj.filterConfig !== undefined) {
1114
1170
  const obj_filterConfig = obj.filterConfig;
1115
1171
  const path_filterConfig = path + '.filterConfig';
1116
- const referencepath_filterConfigValidationError = validate$6(obj_filterConfig, path_filterConfig);
1172
+ const referencepath_filterConfigValidationError = validate$9(obj_filterConfig, path_filterConfig);
1117
1173
  if (referencepath_filterConfigValidationError !== null) {
1118
1174
  let message = 'Object doesn\'t match LightningModelFilterConfigInputRepresentation (at "' + path_filterConfig + '")\n';
1119
1175
  message += referencepath_filterConfigValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -1131,7 +1187,7 @@ function validate$5(obj, path = 'LightningModelSchemaConfigInputRepresentation')
1131
1187
  return v_error === undefined ? null : v_error;
1132
1188
  }
1133
1189
 
1134
- function validate$4(obj, path = 'LightningModelSourceDescriptorInputRepresentation') {
1190
+ function validate$7(obj, path = 'LightningModelSourceDescriptorInputRepresentation') {
1135
1191
  const v_error = (() => {
1136
1192
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1137
1193
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -1154,7 +1210,7 @@ function validate$4(obj, path = 'LightningModelSourceDescriptorInputRepresentati
1154
1210
  return v_error === undefined ? null : v_error;
1155
1211
  }
1156
1212
 
1157
- function validate$3(obj, path = 'LightningModelTypesConfigInputRepresentation') {
1213
+ function validate$6(obj, path = 'LightningModelTypesConfigInputRepresentation') {
1158
1214
  const v_error = (() => {
1159
1215
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1160
1216
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -1167,7 +1223,7 @@ function validate$3(obj, path = 'LightningModelTypesConfigInputRepresentation')
1167
1223
  if (obj.editorConfig !== undefined) {
1168
1224
  const obj_editorConfig = obj.editorConfig;
1169
1225
  const path_editorConfig = path + '.editorConfig';
1170
- const referencepath_editorConfigValidationError = validate$8(obj_editorConfig, path_editorConfig);
1226
+ const referencepath_editorConfigValidationError = validate$b(obj_editorConfig, path_editorConfig);
1171
1227
  if (referencepath_editorConfigValidationError !== null) {
1172
1228
  let message = 'Object doesn\'t match LightningModelEditorConfigInputRepresentation (at "' + path_editorConfig + '")\n';
1173
1229
  message += referencepath_editorConfigValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -1177,7 +1233,7 @@ function validate$3(obj, path = 'LightningModelTypesConfigInputRepresentation')
1177
1233
  if (obj.rendererConfig !== undefined) {
1178
1234
  const obj_rendererConfig = obj.rendererConfig;
1179
1235
  const path_rendererConfig = path + '.rendererConfig';
1180
- const referencepath_rendererConfigValidationError = validate$7(obj_rendererConfig, path_rendererConfig);
1236
+ const referencepath_rendererConfigValidationError = validate$a(obj_rendererConfig, path_rendererConfig);
1181
1237
  if (referencepath_rendererConfigValidationError !== null) {
1182
1238
  let message = 'Object doesn\'t match LightningModelRendererConfigInputRepresentation (at "' + path_rendererConfig + '")\n';
1183
1239
  message += referencepath_rendererConfigValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -1187,7 +1243,7 @@ function validate$3(obj, path = 'LightningModelTypesConfigInputRepresentation')
1187
1243
  if (obj.schemaConfig !== undefined) {
1188
1244
  const obj_schemaConfig = obj.schemaConfig;
1189
1245
  const path_schemaConfig = path + '.schemaConfig';
1190
- const referencepath_schemaConfigValidationError = validate$5(obj_schemaConfig, path_schemaConfig);
1246
+ const referencepath_schemaConfigValidationError = validate$8(obj_schemaConfig, path_schemaConfig);
1191
1247
  if (referencepath_schemaConfigValidationError !== null) {
1192
1248
  let message = 'Object doesn\'t match LightningModelSchemaConfigInputRepresentation (at "' + path_schemaConfig + '")\n';
1193
1249
  message += referencepath_schemaConfigValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -1197,7 +1253,7 @@ function validate$3(obj, path = 'LightningModelTypesConfigInputRepresentation')
1197
1253
  if (obj.sourceDescriptor !== undefined) {
1198
1254
  const obj_sourceDescriptor = obj.sourceDescriptor;
1199
1255
  const path_sourceDescriptor = path + '.sourceDescriptor';
1200
- const referencepath_sourceDescriptorValidationError = validate$4(obj_sourceDescriptor, path_sourceDescriptor);
1256
+ const referencepath_sourceDescriptorValidationError = validate$7(obj_sourceDescriptor, path_sourceDescriptor);
1201
1257
  if (referencepath_sourceDescriptorValidationError !== null) {
1202
1258
  let message = 'Object doesn\'t match LightningModelSourceDescriptorInputRepresentation (at "' + path_sourceDescriptor + '")\n';
1203
1259
  message += referencepath_sourceDescriptorValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -1208,7 +1264,7 @@ function validate$3(obj, path = 'LightningModelTypesConfigInputRepresentation')
1208
1264
  return v_error === undefined ? null : v_error;
1209
1265
  }
1210
1266
 
1211
- function validate$2(obj, path = 'LightningModelTypesErrorRepresentation') {
1267
+ function validate$5(obj, path = 'LightningModelTypesErrorRepresentation') {
1212
1268
  const v_error = (() => {
1213
1269
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1214
1270
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -1227,7 +1283,7 @@ function validate$2(obj, path = 'LightningModelTypesErrorRepresentation') {
1227
1283
  return v_error === undefined ? null : v_error;
1228
1284
  }
1229
1285
 
1230
- function validate$1(obj, path = 'LightningModelTypesRepresentation') {
1286
+ function validate$4(obj, path = 'LightningModelTypesRepresentation') {
1231
1287
  const v_error = (() => {
1232
1288
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1233
1289
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -1264,7 +1320,7 @@ function validate$1(obj, path = 'LightningModelTypesRepresentation') {
1264
1320
  if (obj.errorDetails !== undefined) {
1265
1321
  const obj_errorDetails = obj.errorDetails;
1266
1322
  const path_errorDetails = path + '.errorDetails';
1267
- const referencepath_errorDetailsValidationError = validate$2(obj_errorDetails, path_errorDetails);
1323
+ const referencepath_errorDetailsValidationError = validate$5(obj_errorDetails, path_errorDetails);
1268
1324
  if (referencepath_errorDetailsValidationError !== null) {
1269
1325
  let message = 'Object doesn\'t match LightningModelTypesErrorRepresentation (at "' + path_errorDetails + '")\n';
1270
1326
  message += referencepath_errorDetailsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -1315,9 +1371,9 @@ function validate$1(obj, path = 'LightningModelTypesRepresentation') {
1315
1371
  return v_error === undefined ? null : v_error;
1316
1372
  }
1317
1373
 
1318
- const TTL = 3600000;
1319
- const VERSION = "51267fbdb7e8e374a286ee0bc35c6aee";
1320
- function validate(obj, path = 'LightningModelTypesCollectionRepresentation') {
1374
+ const TTL$1 = 3600000;
1375
+ const VERSION$1 = "51267fbdb7e8e374a286ee0bc35c6aee";
1376
+ function validate$3(obj, path = 'LightningModelTypesCollectionRepresentation') {
1321
1377
  const v_error = (() => {
1322
1378
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1323
1379
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -1330,7 +1386,7 @@ function validate(obj, path = 'LightningModelTypesCollectionRepresentation') {
1330
1386
  for (let i = 0; i < obj_types.length; i++) {
1331
1387
  const obj_types_item = obj_types[i];
1332
1388
  const path_types_item = path_types + '[' + i + ']';
1333
- const referencepath_types_itemValidationError = validate$1(obj_types_item, path_types_item);
1389
+ const referencepath_types_itemValidationError = validate$4(obj_types_item, path_types_item);
1334
1390
  if (referencepath_types_itemValidationError !== null) {
1335
1391
  let message = 'Object doesn\'t match LightningModelTypesRepresentation (at "' + path_types_item + '")\n';
1336
1392
  message += referencepath_types_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -1340,11 +1396,310 @@ function validate(obj, path = 'LightningModelTypesCollectionRepresentation') {
1340
1396
  })();
1341
1397
  return v_error === undefined ? null : v_error;
1342
1398
  }
1343
- const RepresentationType = 'LightningModelTypesCollectionRepresentation';
1399
+ const RepresentationType$1 = 'LightningModelTypesCollectionRepresentation';
1400
+ function normalize$1(input, existing, path, luvio, store, timestamp) {
1401
+ return input;
1402
+ }
1403
+ const select$3 = function LightningModelTypesCollectionRepresentationSelect() {
1404
+ return {
1405
+ kind: 'Fragment',
1406
+ version: VERSION$1,
1407
+ private: [],
1408
+ opaque: true
1409
+ };
1410
+ };
1411
+ function equals$1(existing, incoming) {
1412
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
1413
+ return false;
1414
+ }
1415
+ return true;
1416
+ }
1417
+ const ingest$1 = function LightningModelTypesCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
1418
+ if (process.env.NODE_ENV !== 'production') {
1419
+ const validateError = validate$3(input);
1420
+ if (validateError !== null) {
1421
+ throw validateError;
1422
+ }
1423
+ }
1424
+ const key = path.fullPath;
1425
+ const ttlToUse = TTL$1;
1426
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "lightning-types", VERSION$1, RepresentationType$1, equals$1);
1427
+ return createLink(key);
1428
+ };
1429
+ function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
1430
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1431
+ const rootKey = fullPathFactory();
1432
+ rootKeySet.set(rootKey, {
1433
+ namespace: keyPrefix,
1434
+ representationName: RepresentationType$1,
1435
+ mergeable: false
1436
+ });
1437
+ }
1438
+
1439
+ function select$2(luvio, params) {
1440
+ return select$3();
1441
+ }
1442
+ function keyBuilder$3(luvio, params) {
1443
+ return keyPrefix + '::LightningModelTypesCollectionRepresentation:(' + 'language:' + params.body.language + '::' + '[' + params.body.typeConfigs.map(element => { var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1; return 'typeConfigs.descriptor:' + element.descriptor + '::' + (((_a = element.editorConfig) === null || _a === void 0 ? void 0 : _a.target) === undefined ? 'typeConfigs.editorConfig.target' : 'typeConfigs.editorConfig.target:' + ((_b = element.editorConfig) === null || _b === void 0 ? void 0 : _b.target)) + '::' + (((_c = element.editorConfig) === null || _c === void 0 ? void 0 : _c.subViewDefinitions) === undefined ? 'typeConfigs.editorConfig.subViewDefinitions' : 'typeConfigs.editorConfig.subViewDefinitions:' + ((_d = element.editorConfig) === null || _d === void 0 ? void 0 : _d.subViewDefinitions)) + '::' + (((_e = element.editorConfig) === null || _e === void 0 ? void 0 : _e.maxViewDepth) === undefined ? 'typeConfigs.editorConfig.maxViewDepth' : 'typeConfigs.editorConfig.maxViewDepth:' + ((_f = element.editorConfig) === null || _f === void 0 ? void 0 : _f.maxViewDepth)) + '::' + (((_g = element.editorConfig) === null || _g === void 0 ? void 0 : _g.actionConfig) === undefined ? 'typeConfigs.editorConfig.actionConfig' : 'typeConfigs.editorConfig.actionConfig:' + ((_h = element.editorConfig) === null || _h === void 0 ? void 0 : _h.actionConfig)) + '::' + (((_j = element.rendererConfig) === null || _j === void 0 ? void 0 : _j.target) === undefined ? 'typeConfigs.rendererConfig.target' : 'typeConfigs.rendererConfig.target:' + ((_k = element.rendererConfig) === null || _k === void 0 ? void 0 : _k.target)) + '::' + (((_l = element.rendererConfig) === null || _l === void 0 ? void 0 : _l.subViewDefinitions) === undefined ? 'typeConfigs.rendererConfig.subViewDefinitions' : 'typeConfigs.rendererConfig.subViewDefinitions:' + ((_m = element.rendererConfig) === null || _m === void 0 ? void 0 : _m.subViewDefinitions)) + '::' + (((_o = element.rendererConfig) === null || _o === void 0 ? void 0 : _o.maxViewDepth) === undefined ? 'typeConfigs.rendererConfig.maxViewDepth' : 'typeConfigs.rendererConfig.maxViewDepth:' + ((_p = element.rendererConfig) === null || _p === void 0 ? void 0 : _p.maxViewDepth)) + '::' + (((_q = element.rendererConfig) === null || _q === void 0 ? void 0 : _q.actionConfig) === undefined ? 'typeConfigs.rendererConfig.actionConfig' : 'typeConfigs.rendererConfig.actionConfig:' + ((_r = element.rendererConfig) === null || _r === void 0 ? void 0 : _r.actionConfig)) + '::' + (((_t = (_s = element.schemaConfig) === null || _s === void 0 ? void 0 : _s.filterConfig) === null || _t === void 0 ? void 0 : _t.propertyNames) === undefined ? 'typeConfigs.schemaConfig.filterConfig.propertyNames' : 'typeConfigs.schemaConfig.filterConfig.propertyNames:' + ((_v = (_u = element.schemaConfig) === null || _u === void 0 ? void 0 : _u.filterConfig) === null || _v === void 0 ? void 0 : _v.propertyNames)) + '::' + (((_w = element.schemaConfig) === null || _w === void 0 ? void 0 : _w.subSchemaDefinitions) === undefined ? 'typeConfigs.schemaConfig.subSchemaDefinitions' : 'typeConfigs.schemaConfig.subSchemaDefinitions:' + ((_x = element.schemaConfig) === null || _x === void 0 ? void 0 : _x.subSchemaDefinitions)) + '::' + (((_y = element.sourceDescriptor) === null || _y === void 0 ? void 0 : _y.descriptor) === undefined ? 'typeConfigs.sourceDescriptor.descriptor' : 'typeConfigs.sourceDescriptor.descriptor:' + ((_z = element.sourceDescriptor) === null || _z === void 0 ? void 0 : _z.descriptor)) + '::' + (((_0 = element.sourceDescriptor) === null || _0 === void 0 ? void 0 : _0.propertyName) === undefined ? 'typeConfigs.sourceDescriptor.propertyName' : 'typeConfigs.sourceDescriptor.propertyName:' + ((_1 = element.sourceDescriptor) === null || _1 === void 0 ? void 0 : _1.propertyName)); }).join(',') + ']' + ')';
1444
+ }
1445
+ function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
1446
+ getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$3(luvio, resourceParams));
1447
+ }
1448
+ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
1449
+ const { body } = response;
1450
+ const key = keyBuilder$3(luvio, resourceParams);
1451
+ luvio.storeIngest(key, ingest$1, body);
1452
+ const snapshot = luvio.storeLookup({
1453
+ recordId: key,
1454
+ node: select$2(),
1455
+ variables: {},
1456
+ }, snapshotRefresh);
1457
+ if (process.env.NODE_ENV !== 'production') {
1458
+ if (snapshot.state !== 'Fulfilled') {
1459
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1460
+ }
1461
+ }
1462
+ deepFreeze(snapshot.data);
1463
+ return snapshot;
1464
+ }
1465
+ function ingestError$1(luvio, params, error, snapshotRefresh) {
1466
+ const key = keyBuilder$3(luvio, params);
1467
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1468
+ const storeMetadataParams = {
1469
+ ttl: TTL$1,
1470
+ namespace: keyPrefix,
1471
+ version: VERSION$1,
1472
+ representationName: RepresentationType$1
1473
+ };
1474
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
1475
+ return errorSnapshot;
1476
+ }
1477
+ function createResourceRequest$1(config) {
1478
+ const headers = {};
1479
+ return {
1480
+ baseUri: '/services/data/v64.0',
1481
+ basePath: '/connect/lightning-model/types',
1482
+ method: 'post',
1483
+ body: config.body,
1484
+ urlParams: {},
1485
+ queryParams: {},
1486
+ headers,
1487
+ priority: 'normal',
1488
+ };
1489
+ }
1490
+
1491
+ const adapterName$1 = 'getTypes';
1492
+ const getTypes_ConfigPropertyMetadata = [
1493
+ generateParamConfigMetadata('language', true, 2 /* Body */, 0 /* String */),
1494
+ generateParamConfigMetadata('typeConfigs', true, 2 /* Body */, 4 /* Unsupported */, true),
1495
+ ];
1496
+ const getTypes_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getTypes_ConfigPropertyMetadata);
1497
+ const createResourceParams$1 = /*#__PURE__*/ createResourceParams$4(getTypes_ConfigPropertyMetadata);
1498
+ function keyBuilder$2(luvio, config) {
1499
+ const resourceParams = createResourceParams$1(config);
1500
+ return keyBuilder$3(luvio, resourceParams);
1501
+ }
1502
+ function typeCheckConfig$1(untrustedConfig) {
1503
+ const config = {};
1504
+ typeCheckConfig$4(untrustedConfig, config, getTypes_ConfigPropertyMetadata);
1505
+ const untrustedConfig_typeConfigs = untrustedConfig.typeConfigs;
1506
+ if (ArrayIsArray$1(untrustedConfig_typeConfigs)) {
1507
+ const untrustedConfig_typeConfigs_array = [];
1508
+ for (let i = 0, arrayLength = untrustedConfig_typeConfigs.length; i < arrayLength; i++) {
1509
+ const untrustedConfig_typeConfigs_item = untrustedConfig_typeConfigs[i];
1510
+ const referenceLightningModelTypesConfigInputRepresentationValidationError = validate$6(untrustedConfig_typeConfigs_item);
1511
+ if (referenceLightningModelTypesConfigInputRepresentationValidationError === null) {
1512
+ untrustedConfig_typeConfigs_array.push(untrustedConfig_typeConfigs_item);
1513
+ }
1514
+ }
1515
+ config.typeConfigs = untrustedConfig_typeConfigs_array;
1516
+ }
1517
+ return config;
1518
+ }
1519
+ function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
1520
+ if (!untrustedIsObject(untrustedConfig)) {
1521
+ return null;
1522
+ }
1523
+ if (process.env.NODE_ENV !== 'production') {
1524
+ validateConfig(untrustedConfig, configPropertyNames);
1525
+ }
1526
+ const config = typeCheckConfig$1(untrustedConfig);
1527
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1528
+ return null;
1529
+ }
1530
+ return config;
1531
+ }
1532
+ function adapterFragment$1(luvio, config) {
1533
+ createResourceParams$1(config);
1534
+ return select$2();
1535
+ }
1536
+ function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
1537
+ const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
1538
+ config,
1539
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
1540
+ });
1541
+ return luvio.storeBroadcast().then(() => snapshot);
1542
+ }
1543
+ function onFetchResponseError$1(luvio, config, resourceParams, response) {
1544
+ const snapshot = ingestError$1(luvio, resourceParams, response, {
1545
+ config,
1546
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
1547
+ });
1548
+ return luvio.storeBroadcast().then(() => snapshot);
1549
+ }
1550
+ function buildNetworkSnapshot$1(luvio, config, options) {
1551
+ const resourceParams = createResourceParams$1(config);
1552
+ const request = createResourceRequest$1(resourceParams);
1553
+ return luvio.dispatchResourceRequest(request, options)
1554
+ .then((response) => {
1555
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
1556
+ const cache = new StoreKeyMap();
1557
+ getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
1558
+ return cache;
1559
+ });
1560
+ }, (response) => {
1561
+ return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
1562
+ });
1563
+ }
1564
+ function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
1565
+ return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, 'get', false);
1566
+ }
1567
+ function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
1568
+ const { luvio, config } = context;
1569
+ const selector = {
1570
+ recordId: keyBuilder$2(luvio, config),
1571
+ node: adapterFragment$1(luvio, config),
1572
+ variables: {},
1573
+ };
1574
+ const cacheSnapshot = storeLookup(selector, {
1575
+ config,
1576
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
1577
+ });
1578
+ return cacheSnapshot;
1579
+ }
1580
+ const getTypesAdapterFactory = (luvio) => function lightningTypes__getTypes(untrustedConfig, requestContext) {
1581
+ const config = validateAdapterConfig$1(untrustedConfig, getTypes_ConfigPropertyNames);
1582
+ // Invalid or incomplete config
1583
+ if (config === null) {
1584
+ return null;
1585
+ }
1586
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
1587
+ buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
1588
+ };
1589
+
1590
+ function validate$2(obj, path = 'LightningModelValidateFilterConfigInputRepresentation') {
1591
+ const v_error = (() => {
1592
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1593
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1594
+ }
1595
+ if (obj.localization !== undefined) {
1596
+ const obj_localization = obj.localization;
1597
+ const path_localization = path + '.localization';
1598
+ if (typeof obj_localization !== 'boolean') {
1599
+ return new TypeError('Expected "boolean" but received "' + typeof obj_localization + '" (at "' + path_localization + '")');
1600
+ }
1601
+ }
1602
+ if (obj.readOnly !== undefined) {
1603
+ const obj_readOnly = obj.readOnly;
1604
+ const path_readOnly = path + '.readOnly';
1605
+ if (typeof obj_readOnly !== 'boolean') {
1606
+ return new TypeError('Expected "boolean" but received "' + typeof obj_readOnly + '" (at "' + path_readOnly + '")');
1607
+ }
1608
+ }
1609
+ })();
1610
+ return v_error === undefined ? null : v_error;
1611
+ }
1612
+
1613
+ function validate$1(obj, path = 'LightningModelValidationErrorRepresentation') {
1614
+ const v_error = (() => {
1615
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1616
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1617
+ }
1618
+ const obj_arguments = obj.arguments;
1619
+ const path_arguments = path + '.arguments';
1620
+ if (!ArrayIsArray(obj_arguments)) {
1621
+ return new TypeError('Expected "array" but received "' + typeof obj_arguments + '" (at "' + path_arguments + '")');
1622
+ }
1623
+ for (let i = 0; i < obj_arguments.length; i++) {
1624
+ const obj_arguments_item = obj_arguments[i];
1625
+ const path_arguments_item = path_arguments + '[' + i + ']';
1626
+ if (obj_arguments_item === undefined) {
1627
+ return new TypeError('Expected "defined" but received "' + typeof obj_arguments_item + '" (at "' + path_arguments_item + '")');
1628
+ }
1629
+ }
1630
+ const obj_code = obj.code;
1631
+ const path_code = path + '.code';
1632
+ if (typeof obj_code !== 'string') {
1633
+ return new TypeError('Expected "string" but received "' + typeof obj_code + '" (at "' + path_code + '")');
1634
+ }
1635
+ const obj_details = obj.details;
1636
+ const path_details = path + '.details';
1637
+ if (typeof obj_details !== 'object' || ArrayIsArray(obj_details) || obj_details === null) {
1638
+ return new TypeError('Expected "object" but received "' + typeof obj_details + '" (at "' + path_details + '")');
1639
+ }
1640
+ const obj_details_keys = ObjectKeys(obj_details);
1641
+ for (let i = 0; i < obj_details_keys.length; i++) {
1642
+ const key = obj_details_keys[i];
1643
+ const obj_details_prop = obj_details[key];
1644
+ const path_details_prop = path_details + '["' + key + '"]';
1645
+ if (typeof obj_details_prop !== 'object' || ArrayIsArray(obj_details_prop) || obj_details_prop === null) {
1646
+ return new TypeError('Expected "object" but received "' + typeof obj_details_prop + '" (at "' + path_details_prop + '")');
1647
+ }
1648
+ }
1649
+ const obj_message = obj.message;
1650
+ const path_message = path + '.message';
1651
+ if (typeof obj_message !== 'string') {
1652
+ return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
1653
+ }
1654
+ const obj_path = obj.path;
1655
+ const path_path = path + '.path';
1656
+ if (typeof obj_path !== 'string') {
1657
+ return new TypeError('Expected "string" but received "' + typeof obj_path + '" (at "' + path_path + '")');
1658
+ }
1659
+ const obj_type = obj.type;
1660
+ const path_type = path + '.type';
1661
+ if (typeof obj_type !== 'string') {
1662
+ return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
1663
+ }
1664
+ })();
1665
+ return v_error === undefined ? null : v_error;
1666
+ }
1667
+
1668
+ const TTL = 1000;
1669
+ const VERSION = "f5f69ac25a1ed5895dbdb2d040fee2ba";
1670
+ function validate(obj, path = 'LightningModelValidationResultRepresentation') {
1671
+ const v_error = (() => {
1672
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1673
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1674
+ }
1675
+ const obj_errors = obj.errors;
1676
+ const path_errors = path + '.errors';
1677
+ if (!ArrayIsArray(obj_errors)) {
1678
+ return new TypeError('Expected "array" but received "' + typeof obj_errors + '" (at "' + path_errors + '")');
1679
+ }
1680
+ for (let i = 0; i < obj_errors.length; i++) {
1681
+ const obj_errors_item = obj_errors[i];
1682
+ const path_errors_item = path_errors + '[' + i + ']';
1683
+ const referencepath_errors_itemValidationError = validate$1(obj_errors_item, path_errors_item);
1684
+ if (referencepath_errors_itemValidationError !== null) {
1685
+ let message = 'Object doesn\'t match LightningModelValidationErrorRepresentation (at "' + path_errors_item + '")\n';
1686
+ message += referencepath_errors_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1687
+ return new TypeError(message);
1688
+ }
1689
+ }
1690
+ const obj_success = obj.success;
1691
+ const path_success = path + '.success';
1692
+ if (typeof obj_success !== 'boolean') {
1693
+ return new TypeError('Expected "boolean" but received "' + typeof obj_success + '" (at "' + path_success + '")');
1694
+ }
1695
+ })();
1696
+ return v_error === undefined ? null : v_error;
1697
+ }
1698
+ const RepresentationType = 'LightningModelValidationResultRepresentation';
1344
1699
  function normalize(input, existing, path, luvio, store, timestamp) {
1345
1700
  return input;
1346
1701
  }
1347
- const select$1 = function LightningModelTypesCollectionRepresentationSelect() {
1702
+ const select$1 = function LightningModelValidationResultRepresentationSelect() {
1348
1703
  return {
1349
1704
  kind: 'Fragment',
1350
1705
  version: VERSION,
@@ -1358,7 +1713,7 @@ function equals(existing, incoming) {
1358
1713
  }
1359
1714
  return true;
1360
1715
  }
1361
- const ingest = function LightningModelTypesCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
1716
+ const ingest = function LightningModelValidationResultRepresentationIngest(input, path, luvio, store, timestamp) {
1362
1717
  if (process.env.NODE_ENV !== 'production') {
1363
1718
  const validateError = validate(input);
1364
1719
  if (validateError !== null) {
@@ -1384,7 +1739,8 @@ function select(luvio, params) {
1384
1739
  return select$1();
1385
1740
  }
1386
1741
  function keyBuilder$1(luvio, params) {
1387
- return keyPrefix + '::LightningModelTypesCollectionRepresentation:(' + 'language:' + params.body.language + '::' + '[' + params.body.typeConfigs.map(element => { var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1; return 'typeConfigs.descriptor:' + element.descriptor + '::' + (((_a = element.editorConfig) === null || _a === void 0 ? void 0 : _a.target) === undefined ? 'typeConfigs.editorConfig.target' : 'typeConfigs.editorConfig.target:' + ((_b = element.editorConfig) === null || _b === void 0 ? void 0 : _b.target)) + '::' + (((_c = element.editorConfig) === null || _c === void 0 ? void 0 : _c.subViewDefinitions) === undefined ? 'typeConfigs.editorConfig.subViewDefinitions' : 'typeConfigs.editorConfig.subViewDefinitions:' + ((_d = element.editorConfig) === null || _d === void 0 ? void 0 : _d.subViewDefinitions)) + '::' + (((_e = element.editorConfig) === null || _e === void 0 ? void 0 : _e.maxViewDepth) === undefined ? 'typeConfigs.editorConfig.maxViewDepth' : 'typeConfigs.editorConfig.maxViewDepth:' + ((_f = element.editorConfig) === null || _f === void 0 ? void 0 : _f.maxViewDepth)) + '::' + (((_g = element.editorConfig) === null || _g === void 0 ? void 0 : _g.actionConfig) === undefined ? 'typeConfigs.editorConfig.actionConfig' : 'typeConfigs.editorConfig.actionConfig:' + ((_h = element.editorConfig) === null || _h === void 0 ? void 0 : _h.actionConfig)) + '::' + (((_j = element.rendererConfig) === null || _j === void 0 ? void 0 : _j.target) === undefined ? 'typeConfigs.rendererConfig.target' : 'typeConfigs.rendererConfig.target:' + ((_k = element.rendererConfig) === null || _k === void 0 ? void 0 : _k.target)) + '::' + (((_l = element.rendererConfig) === null || _l === void 0 ? void 0 : _l.subViewDefinitions) === undefined ? 'typeConfigs.rendererConfig.subViewDefinitions' : 'typeConfigs.rendererConfig.subViewDefinitions:' + ((_m = element.rendererConfig) === null || _m === void 0 ? void 0 : _m.subViewDefinitions)) + '::' + (((_o = element.rendererConfig) === null || _o === void 0 ? void 0 : _o.maxViewDepth) === undefined ? 'typeConfigs.rendererConfig.maxViewDepth' : 'typeConfigs.rendererConfig.maxViewDepth:' + ((_p = element.rendererConfig) === null || _p === void 0 ? void 0 : _p.maxViewDepth)) + '::' + (((_q = element.rendererConfig) === null || _q === void 0 ? void 0 : _q.actionConfig) === undefined ? 'typeConfigs.rendererConfig.actionConfig' : 'typeConfigs.rendererConfig.actionConfig:' + ((_r = element.rendererConfig) === null || _r === void 0 ? void 0 : _r.actionConfig)) + '::' + (((_t = (_s = element.schemaConfig) === null || _s === void 0 ? void 0 : _s.filterConfig) === null || _t === void 0 ? void 0 : _t.propertyNames) === undefined ? 'typeConfigs.schemaConfig.filterConfig.propertyNames' : 'typeConfigs.schemaConfig.filterConfig.propertyNames:' + ((_v = (_u = element.schemaConfig) === null || _u === void 0 ? void 0 : _u.filterConfig) === null || _v === void 0 ? void 0 : _v.propertyNames)) + '::' + (((_w = element.schemaConfig) === null || _w === void 0 ? void 0 : _w.subSchemaDefinitions) === undefined ? 'typeConfigs.schemaConfig.subSchemaDefinitions' : 'typeConfigs.schemaConfig.subSchemaDefinitions:' + ((_x = element.schemaConfig) === null || _x === void 0 ? void 0 : _x.subSchemaDefinitions)) + '::' + (((_y = element.sourceDescriptor) === null || _y === void 0 ? void 0 : _y.descriptor) === undefined ? 'typeConfigs.sourceDescriptor.descriptor' : 'typeConfigs.sourceDescriptor.descriptor:' + ((_z = element.sourceDescriptor) === null || _z === void 0 ? void 0 : _z.descriptor)) + '::' + (((_0 = element.sourceDescriptor) === null || _0 === void 0 ? void 0 : _0.propertyName) === undefined ? 'typeConfigs.sourceDescriptor.propertyName' : 'typeConfigs.sourceDescriptor.propertyName:' + ((_1 = element.sourceDescriptor) === null || _1 === void 0 ? void 0 : _1.propertyName)); }).join(',') + ']' + ')';
1742
+ var _a, _b, _c, _d;
1743
+ return keyPrefix + '::LightningModelValidationResultRepresentation:(' + 'descriptor:' + params.body.descriptor + '::' + (((_a = params.body.filterConfig) === null || _a === void 0 ? void 0 : _a.localization) === undefined ? 'filterConfig.localization' : 'filterConfig.localization:' + ((_b = params.body.filterConfig) === null || _b === void 0 ? void 0 : _b.localization)) + '::' + (((_c = params.body.filterConfig) === null || _c === void 0 ? void 0 : _c.readOnly) === undefined ? 'filterConfig.readOnly' : 'filterConfig.readOnly:' + ((_d = params.body.filterConfig) === null || _d === void 0 ? void 0 : _d.readOnly)) + '::' + stableJSONStringify(params.body.payload) + ')';
1388
1744
  }
1389
1745
  function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
1390
1746
  getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
@@ -1422,7 +1778,7 @@ function createResourceRequest(config) {
1422
1778
  const headers = {};
1423
1779
  return {
1424
1780
  baseUri: '/services/data/v64.0',
1425
- basePath: '/connect/lightning-model/types',
1781
+ basePath: '/connect/lightning-model/validate',
1426
1782
  method: 'post',
1427
1783
  body: config.body,
1428
1784
  urlParams: {},
@@ -1432,31 +1788,40 @@ function createResourceRequest(config) {
1432
1788
  };
1433
1789
  }
1434
1790
 
1435
- const adapterName = 'getTypes';
1436
- const getTypes_ConfigPropertyMetadata = [
1437
- generateParamConfigMetadata('language', true, 2 /* Body */, 0 /* String */),
1438
- generateParamConfigMetadata('typeConfigs', true, 2 /* Body */, 4 /* Unsupported */, true),
1791
+ const adapterName = 'validateLightningModel';
1792
+ const validateLightningModel_ConfigPropertyMetadata = [
1793
+ generateParamConfigMetadata('descriptor', true, 2 /* Body */, 0 /* String */),
1794
+ generateParamConfigMetadata('filterConfig', false, 2 /* Body */, 4 /* Unsupported */),
1795
+ generateParamConfigMetadata('payload', true, 2 /* Body */, 4 /* Unsupported */),
1439
1796
  ];
1440
- const getTypes_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getTypes_ConfigPropertyMetadata);
1441
- const createResourceParams = /*#__PURE__*/ createResourceParams$3(getTypes_ConfigPropertyMetadata);
1797
+ const validateLightningModel_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, validateLightningModel_ConfigPropertyMetadata);
1798
+ const createResourceParams = /*#__PURE__*/ createResourceParams$4(validateLightningModel_ConfigPropertyMetadata);
1442
1799
  function keyBuilder(luvio, config) {
1443
1800
  const resourceParams = createResourceParams(config);
1444
1801
  return keyBuilder$1(luvio, resourceParams);
1445
1802
  }
1446
1803
  function typeCheckConfig(untrustedConfig) {
1447
1804
  const config = {};
1448
- typeCheckConfig$3(untrustedConfig, config, getTypes_ConfigPropertyMetadata);
1449
- const untrustedConfig_typeConfigs = untrustedConfig.typeConfigs;
1450
- if (ArrayIsArray$1(untrustedConfig_typeConfigs)) {
1451
- const untrustedConfig_typeConfigs_array = [];
1452
- for (let i = 0, arrayLength = untrustedConfig_typeConfigs.length; i < arrayLength; i++) {
1453
- const untrustedConfig_typeConfigs_item = untrustedConfig_typeConfigs[i];
1454
- const referenceLightningModelTypesConfigInputRepresentationValidationError = validate$3(untrustedConfig_typeConfigs_item);
1455
- if (referenceLightningModelTypesConfigInputRepresentationValidationError === null) {
1456
- untrustedConfig_typeConfigs_array.push(untrustedConfig_typeConfigs_item);
1805
+ typeCheckConfig$4(untrustedConfig, config, validateLightningModel_ConfigPropertyMetadata);
1806
+ const untrustedConfig_filterConfig = untrustedConfig.filterConfig;
1807
+ const referenceLightningModelValidateFilterConfigInputRepresentationValidationError = validate$2(untrustedConfig_filterConfig);
1808
+ if (referenceLightningModelValidateFilterConfigInputRepresentationValidationError === null) {
1809
+ config.filterConfig = untrustedConfig_filterConfig;
1810
+ }
1811
+ const untrustedConfig_payload = untrustedConfig.payload;
1812
+ if (untrustedIsObject(untrustedConfig_payload)) {
1813
+ const untrustedConfig_payload_object = {};
1814
+ const untrustedConfig_payload_keys = Object.keys(untrustedConfig_payload);
1815
+ for (let i = 0, arrayLength = untrustedConfig_payload_keys.length; i < arrayLength; i++) {
1816
+ const key = untrustedConfig_payload_keys[i];
1817
+ const untrustedConfig_payload_prop = untrustedConfig_payload[key];
1818
+ if (untrustedConfig_payload_object !== undefined) {
1819
+ untrustedConfig_payload_object[key] = untrustedConfig_payload_prop;
1457
1820
  }
1458
1821
  }
1459
- config.typeConfigs = untrustedConfig_typeConfigs_array;
1822
+ if (untrustedConfig_payload_object !== undefined && Object.keys(untrustedConfig_payload_object).length >= 0) {
1823
+ config.payload = untrustedConfig_payload_object;
1824
+ }
1460
1825
  }
1461
1826
  return config;
1462
1827
  }
@@ -1506,7 +1871,7 @@ function buildNetworkSnapshot(luvio, config, options) {
1506
1871
  });
1507
1872
  }
1508
1873
  function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
1509
- return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot, 'get', false);
1874
+ return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot, 'get', false);
1510
1875
  }
1511
1876
  function buildCachedSnapshotCachePolicy(context, storeLookup) {
1512
1877
  const { luvio, config } = context;
@@ -1521,8 +1886,8 @@ function buildCachedSnapshotCachePolicy(context, storeLookup) {
1521
1886
  });
1522
1887
  return cacheSnapshot;
1523
1888
  }
1524
- const getTypesAdapterFactory = (luvio) => function lightningTypes__getTypes(untrustedConfig, requestContext) {
1525
- const config = validateAdapterConfig(untrustedConfig, getTypes_ConfigPropertyNames);
1889
+ const validateLightningModelAdapterFactory = (luvio) => function lightningTypes__validateLightningModel(untrustedConfig, requestContext) {
1890
+ const config = validateAdapterConfig(untrustedConfig, validateLightningModel_ConfigPropertyNames);
1526
1891
  // Invalid or incomplete config
1527
1892
  if (config === null) {
1528
1893
  return null;
@@ -1531,4 +1896,4 @@ const getTypesAdapterFactory = (luvio) => function lightningTypes__getTypes(untr
1531
1896
  buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
1532
1897
  };
1533
1898
 
1534
- export { getLightningTypeAdapterFactory, getLightningTypesAdapterFactory, getTypesAdapterFactory };
1899
+ export { getLightningTypeAdapterFactory, getLightningTypesAdapterFactory, getTypesAdapterFactory, validateLightningModelAdapterFactory };