@salesforce/lds-adapters-uiapi 1.141.1 → 1.142.1

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.
@@ -7,7 +7,7 @@
7
7
  import { register } from '@salesforce/lds-default-luvio';
8
8
  import { serializeStructuredKey, StoreKeyMap, StoreKeySet, deepFreeze, coerceAdapterRequestContext, Wildcard } from '@luvio/engine';
9
9
  import { print, visit, parse as parse$1 } from '@luvio/graphql-parser';
10
- import { createFragmentMap, serializeFieldArguments, buildQueryTypeStringKey } from '@luvio/graphql';
10
+ import { createFragmentMap, serializeFieldArguments, buildQueryTypeStringKey, getOperationFromDocument } from '@luvio/graphql';
11
11
 
12
12
  /**
13
13
  * Defines configuration for the module with a default value which can be overridden by the runtime environment.
@@ -378,8 +378,8 @@ function assignMetadataLink(entry, metadataKey) {
378
378
  entry['__metadata'] = createLink$1(metadataKey);
379
379
  }
380
380
 
381
- const VERSION$2l = "275ae22194003d1e53f548b81219c5cb";
382
- function validate$1E(obj, path = 'ListColumnRepresentation') {
381
+ const VERSION$2o = "275ae22194003d1e53f548b81219c5cb";
382
+ function validate$1H(obj, path = 'ListColumnRepresentation') {
383
383
  const v_error = (() => {
384
384
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
385
385
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -428,10 +428,10 @@ function validate$1E(obj, path = 'ListColumnRepresentation') {
428
428
  })();
429
429
  return v_error === undefined ? null : v_error;
430
430
  }
431
- const select$2R = function ListColumnRepresentationSelect() {
431
+ const select$2U = function ListColumnRepresentationSelect() {
432
432
  return {
433
433
  kind: 'Fragment',
434
- version: VERSION$2l,
434
+ version: VERSION$2o,
435
435
  private: [],
436
436
  selections: [
437
437
  {
@@ -454,8 +454,8 @@ const select$2R = function ListColumnRepresentationSelect() {
454
454
  };
455
455
  };
456
456
 
457
- const VERSION$2k = "623aa9ce3a11031e35faf5671a41746e";
458
- function validate$1D(obj, path = 'ListFilterByInfoRepresentation') {
457
+ const VERSION$2n = "623aa9ce3a11031e35faf5671a41746e";
458
+ function validate$1G(obj, path = 'ListFilterByInfoRepresentation') {
459
459
  const v_error = (() => {
460
460
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
461
461
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -490,10 +490,10 @@ function validate$1D(obj, path = 'ListFilterByInfoRepresentation') {
490
490
  })();
491
491
  return v_error === undefined ? null : v_error;
492
492
  }
493
- const select$2Q = function ListFilterByInfoRepresentationSelect() {
493
+ const select$2T = function ListFilterByInfoRepresentationSelect() {
494
494
  return {
495
495
  kind: 'Fragment',
496
- version: VERSION$2k,
496
+ version: VERSION$2n,
497
497
  private: [],
498
498
  selections: [
499
499
  {
@@ -517,8 +517,8 @@ const select$2Q = function ListFilterByInfoRepresentationSelect() {
517
517
  };
518
518
  };
519
519
 
520
- const VERSION$2j = "76042ff4af603b2ac0ec69fa0bd12046";
521
- function validate$1C(obj, path = 'ListReferenceRepresentation') {
520
+ const VERSION$2m = "76042ff4af603b2ac0ec69fa0bd12046";
521
+ function validate$1F(obj, path = 'ListReferenceRepresentation') {
522
522
  const v_error = (() => {
523
523
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
524
524
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -588,10 +588,10 @@ function validate$1C(obj, path = 'ListReferenceRepresentation') {
588
588
  })();
589
589
  return v_error === undefined ? null : v_error;
590
590
  }
591
- const select$2P = function ListReferenceRepresentationSelect() {
591
+ const select$2S = function ListReferenceRepresentationSelect() {
592
592
  return {
593
593
  kind: 'Fragment',
594
- version: VERSION$2j,
594
+ version: VERSION$2m,
595
595
  private: [],
596
596
  selections: [
597
597
  {
@@ -637,8 +637,8 @@ function equals$$(existing, incoming) {
637
637
  return true;
638
638
  }
639
639
 
640
- const VERSION$2i = "32def9b631252c12b91a8209c1f49f5a";
641
- function validate$1B(obj, path = 'ListOrderByInfoRepresentation') {
640
+ const VERSION$2l = "32def9b631252c12b91a8209c1f49f5a";
641
+ function validate$1E(obj, path = 'ListOrderByInfoRepresentation') {
642
642
  const v_error = (() => {
643
643
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
644
644
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -682,10 +682,10 @@ function validate$1B(obj, path = 'ListOrderByInfoRepresentation') {
682
682
  })();
683
683
  return v_error === undefined ? null : v_error;
684
684
  }
685
- const select$2O = function ListOrderByInfoRepresentationSelect() {
685
+ const select$2R = function ListOrderByInfoRepresentationSelect() {
686
686
  return {
687
687
  kind: 'Fragment',
688
- version: VERSION$2i,
688
+ version: VERSION$2l,
689
689
  private: [],
690
690
  selections: [
691
691
  {
@@ -704,6 +704,154 @@ const select$2O = function ListOrderByInfoRepresentationSelect() {
704
704
  };
705
705
  };
706
706
 
707
+ const VERSION$2k = "2634258f216db34315c06d759a35676d";
708
+ function validate$1D(obj, path = 'ListScopeEntityRepresentation') {
709
+ const v_error = (() => {
710
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
711
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
712
+ }
713
+ const obj_id = obj.id;
714
+ const path_id = path + '.id';
715
+ if (typeof obj_id !== 'string') {
716
+ return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
717
+ }
718
+ const obj_label = obj.label;
719
+ const path_label = path + '.label';
720
+ if (typeof obj_label !== 'string') {
721
+ return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
722
+ }
723
+ })();
724
+ return v_error === undefined ? null : v_error;
725
+ }
726
+ const select$2Q = function ListScopeEntityRepresentationSelect() {
727
+ return {
728
+ kind: 'Fragment',
729
+ version: VERSION$2k,
730
+ private: [],
731
+ selections: [
732
+ {
733
+ name: 'id',
734
+ kind: 'Scalar'
735
+ },
736
+ {
737
+ name: 'label',
738
+ kind: 'Scalar'
739
+ }
740
+ ]
741
+ };
742
+ };
743
+
744
+ const VERSION$2j = "3b85c5a08d50ce328481b9f8ab56127b";
745
+ function validate$1C(obj, path = 'ListScopeRelatedEntityRepresentation') {
746
+ const v_error = (() => {
747
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
748
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
749
+ }
750
+ const obj_id = obj.id;
751
+ const path_id = path + '.id';
752
+ if (typeof obj_id !== 'string') {
753
+ return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
754
+ }
755
+ const obj_label = obj.label;
756
+ const path_label = path + '.label';
757
+ if (typeof obj_label !== 'string') {
758
+ return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
759
+ }
760
+ const obj_type = obj.type;
761
+ const path_type = path + '.type';
762
+ if (typeof obj_type !== 'string') {
763
+ return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
764
+ }
765
+ })();
766
+ return v_error === undefined ? null : v_error;
767
+ }
768
+ const select$2P = function ListScopeRelatedEntityRepresentationSelect() {
769
+ return {
770
+ kind: 'Fragment',
771
+ version: VERSION$2j,
772
+ private: [],
773
+ selections: [
774
+ {
775
+ name: 'id',
776
+ kind: 'Scalar'
777
+ },
778
+ {
779
+ name: 'label',
780
+ kind: 'Scalar'
781
+ },
782
+ {
783
+ name: 'type',
784
+ kind: 'Scalar'
785
+ }
786
+ ]
787
+ };
788
+ };
789
+
790
+ const VERSION$2i = "fce88f94b1244707458c795247592939";
791
+ function validate$1B(obj, path = 'ListScopeRepresentation') {
792
+ const v_error = (() => {
793
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
794
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
795
+ }
796
+ const obj_apiName = obj.apiName;
797
+ const path_apiName = path + '.apiName';
798
+ if (typeof obj_apiName !== 'string') {
799
+ return new TypeError('Expected "string" but received "' + typeof obj_apiName + '" (at "' + path_apiName + '")');
800
+ }
801
+ const obj_entity = obj.entity;
802
+ const path_entity = path + '.entity';
803
+ const referencepath_entityValidationError = validate$1D(obj_entity, path_entity);
804
+ if (referencepath_entityValidationError !== null) {
805
+ let message = 'Object doesn\'t match ListScopeEntityRepresentation (at "' + path_entity + '")\n';
806
+ message += referencepath_entityValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
807
+ return new TypeError(message);
808
+ }
809
+ const obj_label = obj.label;
810
+ const path_label = path + '.label';
811
+ if (typeof obj_label !== 'string') {
812
+ return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
813
+ }
814
+ const obj_relatedEntity = obj.relatedEntity;
815
+ const path_relatedEntity = path + '.relatedEntity';
816
+ const referencepath_relatedEntityValidationError = validate$1C(obj_relatedEntity, path_relatedEntity);
817
+ if (referencepath_relatedEntityValidationError !== null) {
818
+ let message = 'Object doesn\'t match ListScopeRelatedEntityRepresentation (at "' + path_relatedEntity + '")\n';
819
+ message += referencepath_relatedEntityValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
820
+ return new TypeError(message);
821
+ }
822
+ })();
823
+ return v_error === undefined ? null : v_error;
824
+ }
825
+ const select$2O = function ListScopeRepresentationSelect() {
826
+ const { selections: ListScopeEntityRepresentation__selections, opaque: ListScopeEntityRepresentation__opaque, } = select$2Q();
827
+ const { selections: ListScopeRelatedEntityRepresentation__selections, opaque: ListScopeRelatedEntityRepresentation__opaque, } = select$2P();
828
+ return {
829
+ kind: 'Fragment',
830
+ version: VERSION$2i,
831
+ private: [],
832
+ selections: [
833
+ {
834
+ name: 'apiName',
835
+ kind: 'Scalar'
836
+ },
837
+ {
838
+ name: 'entity',
839
+ kind: 'Object',
840
+ selections: ListScopeEntityRepresentation__selections
841
+ },
842
+ {
843
+ name: 'label',
844
+ kind: 'Scalar'
845
+ },
846
+ {
847
+ name: 'relatedEntity',
848
+ kind: 'Object',
849
+ selections: ListScopeRelatedEntityRepresentation__selections
850
+ }
851
+ ]
852
+ };
853
+ };
854
+
707
855
  const VERSION$2h = "6506134f4d72fdfa349fe60ef1af2413";
708
856
  function validate$1A(obj, path = 'ListUserPreferenceRepresentation') {
709
857
  const v_error = (() => {
@@ -762,7 +910,7 @@ const select$2N = function ListUserPreferenceRepresentationSelect() {
762
910
  };
763
911
 
764
912
  const TTL$C = 900000;
765
- const VERSION$2g = "8f469cbf563d2ed6b2d3a7b2ee422e1f";
913
+ const VERSION$2g = "8b55d621d80c84ec2e331abc4e12fc56";
766
914
  function validate$1z(obj, path = 'ListInfoRepresentation') {
767
915
  const v_error = (() => {
768
916
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
@@ -791,7 +939,7 @@ function validate$1z(obj, path = 'ListInfoRepresentation') {
791
939
  for (let i = 0; i < obj_displayColumns.length; i++) {
792
940
  const obj_displayColumns_item = obj_displayColumns[i];
793
941
  const path_displayColumns_item = path_displayColumns + '[' + i + ']';
794
- const referencepath_displayColumns_itemValidationError = validate$1E(obj_displayColumns_item, path_displayColumns_item);
942
+ const referencepath_displayColumns_itemValidationError = validate$1H(obj_displayColumns_item, path_displayColumns_item);
795
943
  if (referencepath_displayColumns_itemValidationError !== null) {
796
944
  let message = 'Object doesn\'t match ListColumnRepresentation (at "' + path_displayColumns_item + '")\n';
797
945
  message += referencepath_displayColumns_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -837,7 +985,7 @@ function validate$1z(obj, path = 'ListInfoRepresentation') {
837
985
  for (let i = 0; i < obj_filteredByInfo.length; i++) {
838
986
  const obj_filteredByInfo_item = obj_filteredByInfo[i];
839
987
  const path_filteredByInfo_item = path_filteredByInfo + '[' + i + ']';
840
- const referencepath_filteredByInfo_itemValidationError = validate$1D(obj_filteredByInfo_item, path_filteredByInfo_item);
988
+ const referencepath_filteredByInfo_itemValidationError = validate$1G(obj_filteredByInfo_item, path_filteredByInfo_item);
841
989
  if (referencepath_filteredByInfo_itemValidationError !== null) {
842
990
  let message = 'Object doesn\'t match ListFilterByInfoRepresentation (at "' + path_filteredByInfo_item + '")\n';
843
991
  message += referencepath_filteredByInfo_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -872,7 +1020,7 @@ function validate$1z(obj, path = 'ListInfoRepresentation') {
872
1020
  }
873
1021
  const obj_listReference = obj.listReference;
874
1022
  const path_listReference = path + '.listReference';
875
- const referencepath_listReferenceValidationError = validate$1C(obj_listReference, path_listReference);
1023
+ const referencepath_listReferenceValidationError = validate$1F(obj_listReference, path_listReference);
876
1024
  if (referencepath_listReferenceValidationError !== null) {
877
1025
  let message = 'Object doesn\'t match ListReferenceRepresentation (at "' + path_listReference + '")\n';
878
1026
  message += referencepath_listReferenceValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -900,13 +1048,44 @@ function validate$1z(obj, path = 'ListInfoRepresentation') {
900
1048
  for (let i = 0; i < obj_orderedByInfo.length; i++) {
901
1049
  const obj_orderedByInfo_item = obj_orderedByInfo[i];
902
1050
  const path_orderedByInfo_item = path_orderedByInfo + '[' + i + ']';
903
- const referencepath_orderedByInfo_itemValidationError = validate$1B(obj_orderedByInfo_item, path_orderedByInfo_item);
1051
+ const referencepath_orderedByInfo_itemValidationError = validate$1E(obj_orderedByInfo_item, path_orderedByInfo_item);
904
1052
  if (referencepath_orderedByInfo_itemValidationError !== null) {
905
1053
  let message = 'Object doesn\'t match ListOrderByInfoRepresentation (at "' + path_orderedByInfo_item + '")\n';
906
1054
  message += referencepath_orderedByInfo_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
907
1055
  return new TypeError(message);
908
1056
  }
909
1057
  }
1058
+ if (obj.scope !== undefined) {
1059
+ const obj_scope = obj.scope;
1060
+ const path_scope = path + '.scope';
1061
+ let obj_scope_union0 = null;
1062
+ const obj_scope_union0_error = (() => {
1063
+ const referencepath_scopeValidationError = validate$1B(obj_scope, path_scope);
1064
+ if (referencepath_scopeValidationError !== null) {
1065
+ let message = 'Object doesn\'t match ListScopeRepresentation (at "' + path_scope + '")\n';
1066
+ message += referencepath_scopeValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1067
+ return new TypeError(message);
1068
+ }
1069
+ })();
1070
+ if (obj_scope_union0_error != null) {
1071
+ obj_scope_union0 = obj_scope_union0_error.message;
1072
+ }
1073
+ let obj_scope_union1 = null;
1074
+ const obj_scope_union1_error = (() => {
1075
+ if (obj_scope !== null) {
1076
+ return new TypeError('Expected "null" but received "' + typeof obj_scope + '" (at "' + path_scope + '")');
1077
+ }
1078
+ })();
1079
+ if (obj_scope_union1_error != null) {
1080
+ obj_scope_union1 = obj_scope_union1_error.message;
1081
+ }
1082
+ if (obj_scope_union0 && obj_scope_union1) {
1083
+ let message = 'Object doesn\'t match union (at "' + path_scope + '")';
1084
+ message += '\n' + obj_scope_union0.split('\n').map((line) => '\t' + line).join('\n');
1085
+ message += '\n' + obj_scope_union1.split('\n').map((line) => '\t' + line).join('\n');
1086
+ return new TypeError(message);
1087
+ }
1088
+ }
910
1089
  const obj_updateable = obj.updateable;
911
1090
  const path_updateable = path + '.updateable';
912
1091
  if (typeof obj_updateable !== 'boolean') {
@@ -949,10 +1128,11 @@ function normalize$N(input, existing, path, luvio, store, timestamp) {
949
1128
  return input;
950
1129
  }
951
1130
  const select$2M = function ListInfoRepresentationSelect() {
952
- const { selections: ListColumnRepresentation__selections, opaque: ListColumnRepresentation__opaque, } = select$2R();
953
- const { selections: ListFilterByInfoRepresentation__selections, opaque: ListFilterByInfoRepresentation__opaque, } = select$2Q();
954
- const { selections: ListReferenceRepresentation__selections, opaque: ListReferenceRepresentation__opaque, } = select$2P();
955
- const { selections: ListOrderByInfoRepresentation__selections, opaque: ListOrderByInfoRepresentation__opaque, } = select$2O();
1131
+ const { selections: ListColumnRepresentation__selections, opaque: ListColumnRepresentation__opaque, } = select$2U();
1132
+ const { selections: ListFilterByInfoRepresentation__selections, opaque: ListFilterByInfoRepresentation__opaque, } = select$2T();
1133
+ const { selections: ListReferenceRepresentation__selections, opaque: ListReferenceRepresentation__opaque, } = select$2S();
1134
+ const { selections: ListOrderByInfoRepresentation__selections, opaque: ListOrderByInfoRepresentation__opaque, } = select$2R();
1135
+ const { selections: ListScopeRepresentation__selections, opaque: ListScopeRepresentation__opaque, } = select$2O();
956
1136
  const { selections: ListUserPreferenceRepresentation__selections, opaque: ListUserPreferenceRepresentation__opaque, } = select$2N();
957
1137
  return {
958
1138
  kind: 'Fragment',
@@ -1010,6 +1190,13 @@ const select$2M = function ListInfoRepresentationSelect() {
1010
1190
  plural: true,
1011
1191
  selections: ListOrderByInfoRepresentation__selections
1012
1192
  },
1193
+ {
1194
+ name: 'scope',
1195
+ kind: 'Object',
1196
+ nullable: true,
1197
+ selections: ListScopeRepresentation__selections,
1198
+ required: false
1199
+ },
1013
1200
  {
1014
1201
  name: 'updateable',
1015
1202
  kind: 'Scalar'
@@ -5919,7 +6106,7 @@ function validate$1u(obj, path = 'ListRecordCollectionRepresentation') {
5919
6106
  }
5920
6107
  const obj_listReference = obj.listReference;
5921
6108
  const path_listReference = path + '.listReference';
5922
- const referencepath_listReferenceValidationError = validate$1C(obj_listReference, path_listReference);
6109
+ const referencepath_listReferenceValidationError = validate$1F(obj_listReference, path_listReference);
5923
6110
  if (referencepath_listReferenceValidationError !== null) {
5924
6111
  let message = 'Object doesn\'t match ListReferenceRepresentation (at "' + path_listReference + '")\n';
5925
6112
  message += referencepath_listReferenceValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -6130,7 +6317,7 @@ function normalize$J(input, existing, path, luvio, store, timestamp) {
6130
6317
  return input;
6131
6318
  }
6132
6319
  const select$2H = function ListRecordCollectionRepresentationSelect(paginationParams) {
6133
- const { selections: ListReferenceRepresentation__selections, opaque: ListReferenceRepresentation__opaque, } = select$2P();
6320
+ const { selections: ListReferenceRepresentation__selections, opaque: ListReferenceRepresentation__opaque, } = select$2S();
6134
6321
  return {
6135
6322
  kind: 'Fragment',
6136
6323
  reader: true,
@@ -6244,7 +6431,7 @@ const dynamicSelect$7 = function dynamicListRecordCollectionRepresentationSelect
6244
6431
  kind: 'Link',
6245
6432
  fragment: select$2I()
6246
6433
  } : params.records;
6247
- const { selections: ListReferenceRepresentation__selections, opaque: ListReferenceRepresentation__opaque, } = select$2P();
6434
+ const { selections: ListReferenceRepresentation__selections, opaque: ListReferenceRepresentation__opaque, } = select$2S();
6248
6435
  return {
6249
6436
  kind: 'Fragment',
6250
6437
  reader: true,
@@ -25108,7 +25295,7 @@ function validate$A(obj, path = 'RelatedListInfoRepresentation') {
25108
25295
  for (let i = 0; i < obj_filteredByInfo.length; i++) {
25109
25296
  const obj_filteredByInfo_item = obj_filteredByInfo[i];
25110
25297
  const path_filteredByInfo_item = path_filteredByInfo + '[' + i + ']';
25111
- const referencepath_filteredByInfo_itemValidationError = validate$1D(obj_filteredByInfo_item, path_filteredByInfo_item);
25298
+ const referencepath_filteredByInfo_itemValidationError = validate$1G(obj_filteredByInfo_item, path_filteredByInfo_item);
25112
25299
  if (referencepath_filteredByInfo_itemValidationError !== null) {
25113
25300
  let message = 'Object doesn\'t match ListFilterByInfoRepresentation (at "' + path_filteredByInfo_item + '")\n';
25114
25301
  message += referencepath_filteredByInfo_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -25160,7 +25347,7 @@ function validate$A(obj, path = 'RelatedListInfoRepresentation') {
25160
25347
  for (let i = 0; i < obj_orderedByInfo.length; i++) {
25161
25348
  const obj_orderedByInfo_item = obj_orderedByInfo[i];
25162
25349
  const path_orderedByInfo_item = path_orderedByInfo + '[' + i + ']';
25163
- const referencepath_orderedByInfo_itemValidationError = validate$1B(obj_orderedByInfo_item, path_orderedByInfo_item);
25350
+ const referencepath_orderedByInfo_itemValidationError = validate$1E(obj_orderedByInfo_item, path_orderedByInfo_item);
25164
25351
  if (referencepath_orderedByInfo_itemValidationError !== null) {
25165
25352
  let message = 'Object doesn\'t match ListOrderByInfoRepresentation (at "' + path_orderedByInfo_item + '")\n';
25166
25353
  message += referencepath_orderedByInfo_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -26714,7 +26901,7 @@ function validate$v(obj, path = 'RelatedListUserPreferencesRepresentation') {
26714
26901
  for (let i = 0; i < obj_orderedBy.length; i++) {
26715
26902
  const obj_orderedBy_item = obj_orderedBy[i];
26716
26903
  const path_orderedBy_item = path_orderedBy + '[' + i + ']';
26717
- const referencepath_orderedBy_itemValidationError = validate$1B(obj_orderedBy_item, path_orderedBy_item);
26904
+ const referencepath_orderedBy_itemValidationError = validate$1E(obj_orderedBy_item, path_orderedBy_item);
26718
26905
  if (referencepath_orderedBy_itemValidationError !== null) {
26719
26906
  let message = 'Object doesn\'t match ListOrderByInfoRepresentation (at "' + path_orderedBy_item + '")\n';
26720
26907
  message += referencepath_orderedBy_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -30459,7 +30646,7 @@ function validate$h(obj, path = 'SearchResultCollectionRepresentation') {
30459
30646
  for (let i = 0; i < obj_orderBy.length; i++) {
30460
30647
  const obj_orderBy_item = obj_orderBy[i];
30461
30648
  const path_orderBy_item = path_orderBy + '[' + i + ']';
30462
- const referencepath_orderBy_itemValidationError = validate$1B(obj_orderBy_item, path_orderBy_item);
30649
+ const referencepath_orderBy_itemValidationError = validate$1E(obj_orderBy_item, path_orderBy_item);
30463
30650
  if (referencepath_orderBy_itemValidationError !== null) {
30464
30651
  let message = 'Object doesn\'t match ListOrderByInfoRepresentation (at "' + path_orderBy_item + '")\n';
30465
30652
  message += referencepath_orderBy_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -50322,43 +50509,38 @@ function getInContextFragmentType(fragment, fragmentMap) {
50322
50509
  const TTL$5 = 900000;
50323
50510
  const VERSION$b = "b440235e7e724631f92002fe50e3e096";
50324
50511
  const RepresentationType$c = 'GraphQLRepresentation';
50325
- function select$8(luvio, query, variables) {
50326
- const definitions = query.definitions === undefined ? [] : query.definitions;
50512
+ function select$8(luvio, document, variables, operationName) {
50513
+ const operationToExecute = getOperationFromDocument(document, operationName);
50327
50514
  return {
50328
50515
  kind: 'Fragment',
50329
50516
  synthetic: true,
50330
50517
  reader: true,
50331
50518
  read: (builder) => {
50332
50519
  builder.enterPath('data');
50333
- let sink = {};
50334
- const fragments = createFragmentMap(query);
50335
- for (let i = 0, len = definitions.length; i < len; i += 1) {
50336
- const def = definitions[i];
50337
- if (def.kind === 'OperationDefinition') {
50338
- const queryTypeRecordId = keyBuilder$e(luvio, def, variables, fragments);
50339
- const snapshot = builder.read({
50340
- recordId: queryTypeRecordId,
50341
- node: {
50342
- kind: 'Fragment',
50343
- private: [],
50344
- opaque: true,
50345
- version: VERSION$c
50346
- },
50347
- variables: {}
50348
- });
50349
- if (snapshot.data === undefined) {
50350
- builder.markMissingLink(queryTypeRecordId);
50351
- break;
50352
- }
50353
- const data = select$9(def, variables, fragments)(snapshot.data, builder, queryTypeRecordId);
50354
- sink = {
50355
- ...sink,
50356
- ...data,
50357
- };
50358
- }
50359
- }
50360
50520
  const gqlData = {};
50361
- builder.assignNonScalar(gqlData, 'data', sink);
50521
+ if (operationToExecute === undefined) {
50522
+ builder.markMissing(); // Never give a cache hit for an undefined operation
50523
+ return gqlData;
50524
+ }
50525
+ const fragments = createFragmentMap(document);
50526
+ const queryTypeRecordId = keyBuilder$e(luvio, operationToExecute, variables, fragments);
50527
+ const snapshot = builder.read({
50528
+ recordId: queryTypeRecordId,
50529
+ node: {
50530
+ kind: 'Fragment',
50531
+ private: [],
50532
+ opaque: true,
50533
+ version: VERSION$c
50534
+ },
50535
+ variables: {}
50536
+ });
50537
+ if (snapshot.data === undefined) {
50538
+ builder.markMissingLink(queryTypeRecordId);
50539
+ }
50540
+ else {
50541
+ const data = select$9(operationToExecute, variables, fragments)(snapshot.data, builder, queryTypeRecordId);
50542
+ builder.assignNonScalar(gqlData, 'data', data);
50543
+ }
50362
50544
  builder.exitPath();
50363
50545
  return gqlData;
50364
50546
  }
@@ -50378,10 +50560,10 @@ function ingestOperationNode(luvio, input, node, state) {
50378
50560
  });
50379
50561
  }
50380
50562
  }
50381
- const ingest$7 = function GraphQLRepresentationIngest(query, variables) {
50563
+ const ingest$7 = function GraphQLRepresentationIngest(document, variables, operationName) {
50382
50564
  return (input, path, luvio, store, timestamp) => {
50383
50565
  if (input.data) {
50384
- const fragments = createFragmentMap(query);
50566
+ const fragments = createFragmentMap(document);
50385
50567
  const state = {
50386
50568
  data: input.data,
50387
50569
  luvio,
@@ -50391,44 +50573,42 @@ const ingest$7 = function GraphQLRepresentationIngest(query, variables) {
50391
50573
  variables,
50392
50574
  fragments,
50393
50575
  };
50394
- query.definitions.forEach((node) => {
50395
- if (node.kind === 'OperationDefinition') {
50396
- ingestOperationNode(luvio, input, node, state);
50397
- }
50398
- });
50576
+ const operationToExecute = getOperationFromDocument(document, operationName);
50577
+ if (operationToExecute !== undefined) {
50578
+ ingestOperationNode(luvio, input, operationToExecute, state);
50579
+ }
50399
50580
  }
50400
50581
  return {
50401
50582
  __ref: undefined
50402
50583
  };
50403
50584
  };
50404
50585
  };
50405
- function getTypeCacheKeys$8(luvio, query, variables, data) {
50586
+ function getTypeCacheKeys$8(luvio, document, variables, data, operationName) {
50406
50587
  const sink = new StoreKeyMap();
50407
50588
  if (data.data) {
50408
- const fragments = createFragmentMap(query);
50409
- query.definitions.forEach((node) => {
50410
- if (node.kind === 'OperationDefinition') {
50411
- const state = {
50412
- luvio,
50413
- variables,
50414
- fragments,
50415
- data: data.data,
50416
- path: {
50417
- parent: null,
50418
- propertyName: null,
50419
- fullPath: '' // TODO: W-13079691 - Need to take another pass at what we want to do for structured keys
50420
- }
50421
- };
50422
- sink.merge(getTypeCacheKeys$9(node, state));
50423
- }
50424
- });
50589
+ const fragments = createFragmentMap(document);
50590
+ const operationToExecute = getOperationFromDocument(document, operationName);
50591
+ if (operationToExecute !== undefined) {
50592
+ const state = {
50593
+ luvio,
50594
+ variables,
50595
+ fragments,
50596
+ data: data.data,
50597
+ path: {
50598
+ parent: null,
50599
+ propertyName: null,
50600
+ fullPath: '' // TODO: W-13079691 - Need to take another pass at what we want to do for structured keys
50601
+ }
50602
+ };
50603
+ sink.merge(getTypeCacheKeys$9(operationToExecute, state));
50604
+ }
50425
50605
  }
50426
50606
  return sink;
50427
50607
  }
50428
50608
 
50429
50609
  function select$7(luvio, config) {
50430
- const { query, variables } = config;
50431
- return select$8(luvio, query, variables);
50610
+ const { query, variables, operationName } = config;
50611
+ return select$8(luvio, query, variables, operationName);
50432
50612
  }
50433
50613
  function keyBuilder$d(luvio, params) {
50434
50614
  return keyPrefix + '::' + 'GraphQLRepresentation';
@@ -50436,13 +50616,14 @@ function keyBuilder$d(luvio, params) {
50436
50616
  function getResponseCacheKeys$b(luvio, resourceParams, response) {
50437
50617
  const query = resourceParams.body.query;
50438
50618
  const variables = resourceParams.body.variables || {};
50439
- return getTypeCacheKeys$8(luvio, query, variables, response);
50619
+ const operationName = resourceParams.body.operationName;
50620
+ return getTypeCacheKeys$8(luvio, query, variables, response, operationName);
50440
50621
  }
50441
50622
  function ingestSuccess$5(luvio, config, resourceParams, response, snapshotRefresh) {
50442
50623
  const { body } = response;
50443
50624
  const key = keyBuilder$d();
50444
- const { query, variables } = resourceParams.body;
50445
- luvio.storeIngest(key, ingest$7(query, variables), body);
50625
+ const { query, variables, operationName } = resourceParams.body;
50626
+ luvio.storeIngest(key, ingest$7(query, variables, operationName), body);
50446
50627
  // revert the optimized pagination variables back to its original so that subsequent store lookup will include all records, not just the ones loaded by an optimized query
50447
50628
  // see optimizePagination for initial update to optimize the query
50448
50629
  revertPaginationOptimization(variables);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-adapters-uiapi",
3
- "version": "1.141.1",
3
+ "version": "1.142.1",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "Wire adapters for record related UI API endpoints",
6
6
  "main": "dist/es/es2018/uiapi-records-service.js",