@salesforce/lds-adapters-service-network-data-category 1.228.0 → 1.229.0-dev1

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.
@@ -93,16 +93,39 @@ function createLink(ref) {
93
93
  };
94
94
  }
95
95
 
96
- const VERSION$7 = "b291e2065704f3a4b4af70eb48fc8131";
96
+ const VERSION$7 = "e09f2c8e969b05cce02145ff503c5764";
97
97
  function validate$8(obj, path = 'ServiceCatalogItemRepresentation') {
98
98
  const v_error = (() => {
99
99
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
100
100
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
101
101
  }
102
- const obj_description = obj.description;
103
- const path_description = path + '.description';
104
- if (typeof obj_description !== 'string') {
105
- return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
102
+ if (obj.description !== undefined) {
103
+ const obj_description = obj.description;
104
+ const path_description = path + '.description';
105
+ let obj_description_union0 = null;
106
+ const obj_description_union0_error = (() => {
107
+ if (typeof obj_description !== 'string') {
108
+ return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
109
+ }
110
+ })();
111
+ if (obj_description_union0_error != null) {
112
+ obj_description_union0 = obj_description_union0_error.message;
113
+ }
114
+ let obj_description_union1 = null;
115
+ const obj_description_union1_error = (() => {
116
+ if (obj_description !== null) {
117
+ return new TypeError('Expected "null" but received "' + typeof obj_description + '" (at "' + path_description + '")');
118
+ }
119
+ })();
120
+ if (obj_description_union1_error != null) {
121
+ obj_description_union1 = obj_description_union1_error.message;
122
+ }
123
+ if (obj_description_union0 && obj_description_union1) {
124
+ let message = 'Object doesn\'t match union (at "' + path_description + '")';
125
+ message += '\n' + obj_description_union0.split('\n').map((line) => '\t' + line).join('\n');
126
+ message += '\n' + obj_description_union1.split('\n').map((line) => '\t' + line).join('\n');
127
+ return new TypeError(message);
128
+ }
106
129
  }
107
130
  const obj_developerName = obj.developerName;
108
131
  const path_developerName = path + '.developerName';
@@ -114,10 +137,33 @@ function validate$8(obj, path = 'ServiceCatalogItemRepresentation') {
114
137
  if (typeof obj_id !== 'string') {
115
138
  return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
116
139
  }
117
- const obj_imageUrl = obj.imageUrl;
118
- const path_imageUrl = path + '.imageUrl';
119
- if (typeof obj_imageUrl !== 'string') {
120
- return new TypeError('Expected "string" but received "' + typeof obj_imageUrl + '" (at "' + path_imageUrl + '")');
140
+ if (obj.imageUrl !== undefined) {
141
+ const obj_imageUrl = obj.imageUrl;
142
+ const path_imageUrl = path + '.imageUrl';
143
+ let obj_imageUrl_union0 = null;
144
+ const obj_imageUrl_union0_error = (() => {
145
+ if (typeof obj_imageUrl !== 'string') {
146
+ return new TypeError('Expected "string" but received "' + typeof obj_imageUrl + '" (at "' + path_imageUrl + '")');
147
+ }
148
+ })();
149
+ if (obj_imageUrl_union0_error != null) {
150
+ obj_imageUrl_union0 = obj_imageUrl_union0_error.message;
151
+ }
152
+ let obj_imageUrl_union1 = null;
153
+ const obj_imageUrl_union1_error = (() => {
154
+ if (obj_imageUrl !== null) {
155
+ return new TypeError('Expected "null" but received "' + typeof obj_imageUrl + '" (at "' + path_imageUrl + '")');
156
+ }
157
+ })();
158
+ if (obj_imageUrl_union1_error != null) {
159
+ obj_imageUrl_union1 = obj_imageUrl_union1_error.message;
160
+ }
161
+ if (obj_imageUrl_union0 && obj_imageUrl_union1) {
162
+ let message = 'Object doesn\'t match union (at "' + path_imageUrl + '")';
163
+ message += '\n' + obj_imageUrl_union0.split('\n').map((line) => '\t' + line).join('\n');
164
+ message += '\n' + obj_imageUrl_union1.split('\n').map((line) => '\t' + line).join('\n');
165
+ return new TypeError(message);
166
+ }
121
167
  }
122
168
  const obj_label = obj.label;
123
169
  const path_label = path + '.label';
@@ -135,7 +181,8 @@ const select$c = function ServiceCatalogItemRepresentationSelect() {
135
181
  selections: [
136
182
  {
137
183
  name: 'description',
138
- kind: 'Scalar'
184
+ kind: 'Scalar',
185
+ required: false
139
186
  },
140
187
  {
141
188
  name: 'developerName',
@@ -147,7 +194,8 @@ const select$c = function ServiceCatalogItemRepresentationSelect() {
147
194
  },
148
195
  {
149
196
  name: 'imageUrl',
150
- kind: 'Scalar'
197
+ kind: 'Scalar',
198
+ required: false
151
199
  },
152
200
  {
153
201
  name: 'label',
@@ -157,11 +205,6 @@ const select$c = function ServiceCatalogItemRepresentationSelect() {
157
205
  };
158
206
  };
159
207
  function equals$7(existing, incoming) {
160
- const existing_description = existing.description;
161
- const incoming_description = incoming.description;
162
- if (!(existing_description === incoming_description)) {
163
- return false;
164
- }
165
208
  const existing_developerName = existing.developerName;
166
209
  const incoming_developerName = incoming.developerName;
167
210
  if (!(existing_developerName === incoming_developerName)) {
@@ -172,16 +215,37 @@ function equals$7(existing, incoming) {
172
215
  if (!(existing_id === incoming_id)) {
173
216
  return false;
174
217
  }
175
- const existing_imageUrl = existing.imageUrl;
176
- const incoming_imageUrl = incoming.imageUrl;
177
- if (!(existing_imageUrl === incoming_imageUrl)) {
178
- return false;
179
- }
180
218
  const existing_label = existing.label;
181
219
  const incoming_label = incoming.label;
182
220
  if (!(existing_label === incoming_label)) {
183
221
  return false;
184
222
  }
223
+ const existing_description = existing.description;
224
+ const incoming_description = incoming.description;
225
+ // if at least one of these optionals is defined
226
+ if (existing_description !== undefined || incoming_description !== undefined) {
227
+ // if one of these is not defined we know the other is defined and therefore
228
+ // not equal
229
+ if (existing_description === undefined || incoming_description === undefined) {
230
+ return false;
231
+ }
232
+ if (!(existing_description === incoming_description)) {
233
+ return false;
234
+ }
235
+ }
236
+ const existing_imageUrl = existing.imageUrl;
237
+ const incoming_imageUrl = incoming.imageUrl;
238
+ // if at least one of these optionals is defined
239
+ if (existing_imageUrl !== undefined || incoming_imageUrl !== undefined) {
240
+ // if one of these is not defined we know the other is defined and therefore
241
+ // not equal
242
+ if (existing_imageUrl === undefined || incoming_imageUrl === undefined) {
243
+ return false;
244
+ }
245
+ if (!(existing_imageUrl === incoming_imageUrl)) {
246
+ return false;
247
+ }
248
+ }
185
249
  return true;
186
250
  }
187
251
 
@@ -537,7 +601,7 @@ const getServiceCatalogItemsForCommunityAdapterFactory = (luvio) => function Net
537
601
  buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
538
602
  };
539
603
 
540
- const VERSION$5 = "f3960577caf41d925ed00b2cc2e508e8";
604
+ const VERSION$5 = "1579429bf94d94aa9fe7ba4906607811";
541
605
  function validate$6(obj, path = 'LightningKnowledgeArticleVersionRepresentation') {
542
606
  const v_error = (() => {
543
607
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
@@ -558,10 +622,33 @@ function validate$6(obj, path = 'LightningKnowledgeArticleVersionRepresentation'
558
622
  if (typeof obj_lastPublishedDate !== 'string') {
559
623
  return new TypeError('Expected "string" but received "' + typeof obj_lastPublishedDate + '" (at "' + path_lastPublishedDate + '")');
560
624
  }
561
- const obj_summary = obj.summary;
562
- const path_summary = path + '.summary';
563
- if (typeof obj_summary !== 'string') {
564
- return new TypeError('Expected "string" but received "' + typeof obj_summary + '" (at "' + path_summary + '")');
625
+ if (obj.summary !== undefined) {
626
+ const obj_summary = obj.summary;
627
+ const path_summary = path + '.summary';
628
+ let obj_summary_union0 = null;
629
+ const obj_summary_union0_error = (() => {
630
+ if (typeof obj_summary !== 'string') {
631
+ return new TypeError('Expected "string" but received "' + typeof obj_summary + '" (at "' + path_summary + '")');
632
+ }
633
+ })();
634
+ if (obj_summary_union0_error != null) {
635
+ obj_summary_union0 = obj_summary_union0_error.message;
636
+ }
637
+ let obj_summary_union1 = null;
638
+ const obj_summary_union1_error = (() => {
639
+ if (obj_summary !== null) {
640
+ return new TypeError('Expected "null" but received "' + typeof obj_summary + '" (at "' + path_summary + '")');
641
+ }
642
+ })();
643
+ if (obj_summary_union1_error != null) {
644
+ obj_summary_union1 = obj_summary_union1_error.message;
645
+ }
646
+ if (obj_summary_union0 && obj_summary_union1) {
647
+ let message = 'Object doesn\'t match union (at "' + path_summary + '")';
648
+ message += '\n' + obj_summary_union0.split('\n').map((line) => '\t' + line).join('\n');
649
+ message += '\n' + obj_summary_union1.split('\n').map((line) => '\t' + line).join('\n');
650
+ return new TypeError(message);
651
+ }
565
652
  }
566
653
  const obj_title = obj.title;
567
654
  const path_title = path + '.title';
@@ -596,7 +683,8 @@ const select$8 = function LightningKnowledgeArticleVersionRepresentationSelect()
596
683
  },
597
684
  {
598
685
  name: 'summary',
599
- kind: 'Scalar'
686
+ kind: 'Scalar',
687
+ required: false
600
688
  },
601
689
  {
602
690
  name: 'title',
@@ -625,11 +713,6 @@ function equals$5(existing, incoming) {
625
713
  if (!(existing_lastPublishedDate === incoming_lastPublishedDate)) {
626
714
  return false;
627
715
  }
628
- const existing_summary = existing.summary;
629
- const incoming_summary = incoming.summary;
630
- if (!(existing_summary === incoming_summary)) {
631
- return false;
632
- }
633
716
  const existing_title = existing.title;
634
717
  const incoming_title = incoming.title;
635
718
  if (!(existing_title === incoming_title)) {
@@ -640,6 +723,19 @@ function equals$5(existing, incoming) {
640
723
  if (!(existing_urlName === incoming_urlName)) {
641
724
  return false;
642
725
  }
726
+ const existing_summary = existing.summary;
727
+ const incoming_summary = incoming.summary;
728
+ // if at least one of these optionals is defined
729
+ if (existing_summary !== undefined || incoming_summary !== undefined) {
730
+ // if one of these is not defined we know the other is defined and therefore
731
+ // not equal
732
+ if (existing_summary === undefined || incoming_summary === undefined) {
733
+ return false;
734
+ }
735
+ if (!(existing_summary === incoming_summary)) {
736
+ return false;
737
+ }
738
+ }
643
739
  return true;
644
740
  }
645
741
 
@@ -860,7 +956,7 @@ const getArticlesForCategoryAdapterFactory = (luvio) => function NetworkDataCate
860
956
  buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
861
957
  };
862
958
 
863
- const VERSION$3 = "521a1b755b3490ccc211d6fa08f467db";
959
+ const VERSION$3 = "0d501a366f70d5f5cdd9a7d7af934c58";
864
960
  function validate$4(obj, path = 'NetworkDataCategoryRepresentation') {
865
961
  const v_error = (() => {
866
962
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
@@ -883,25 +979,94 @@ function validate$4(obj, path = 'NetworkDataCategoryRepresentation') {
883
979
  return new TypeError('Expected "defined" but received "' + typeof obj_childCategories_item + '" (at "' + path_childCategories_item + '")');
884
980
  }
885
981
  }
886
- const obj_description = obj.description;
887
- const path_description = path + '.description';
888
- if (typeof obj_description !== 'string') {
889
- return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
982
+ if (obj.description !== undefined) {
983
+ const obj_description = obj.description;
984
+ const path_description = path + '.description';
985
+ let obj_description_union0 = null;
986
+ const obj_description_union0_error = (() => {
987
+ if (typeof obj_description !== 'string') {
988
+ return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
989
+ }
990
+ })();
991
+ if (obj_description_union0_error != null) {
992
+ obj_description_union0 = obj_description_union0_error.message;
993
+ }
994
+ let obj_description_union1 = null;
995
+ const obj_description_union1_error = (() => {
996
+ if (obj_description !== null) {
997
+ return new TypeError('Expected "null" but received "' + typeof obj_description + '" (at "' + path_description + '")');
998
+ }
999
+ })();
1000
+ if (obj_description_union1_error != null) {
1001
+ obj_description_union1 = obj_description_union1_error.message;
1002
+ }
1003
+ if (obj_description_union0 && obj_description_union1) {
1004
+ let message = 'Object doesn\'t match union (at "' + path_description + '")';
1005
+ message += '\n' + obj_description_union0.split('\n').map((line) => '\t' + line).join('\n');
1006
+ message += '\n' + obj_description_union1.split('\n').map((line) => '\t' + line).join('\n');
1007
+ return new TypeError(message);
1008
+ }
890
1009
  }
891
1010
  const obj_id = obj.id;
892
1011
  const path_id = path + '.id';
893
1012
  if (typeof obj_id !== 'string') {
894
1013
  return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
895
1014
  }
896
- const obj_imageUrl = obj.imageUrl;
897
- const path_imageUrl = path + '.imageUrl';
898
- if (typeof obj_imageUrl !== 'string') {
899
- return new TypeError('Expected "string" but received "' + typeof obj_imageUrl + '" (at "' + path_imageUrl + '")');
1015
+ if (obj.imageUrl !== undefined) {
1016
+ const obj_imageUrl = obj.imageUrl;
1017
+ const path_imageUrl = path + '.imageUrl';
1018
+ let obj_imageUrl_union0 = null;
1019
+ const obj_imageUrl_union0_error = (() => {
1020
+ if (typeof obj_imageUrl !== 'string') {
1021
+ return new TypeError('Expected "string" but received "' + typeof obj_imageUrl + '" (at "' + path_imageUrl + '")');
1022
+ }
1023
+ })();
1024
+ if (obj_imageUrl_union0_error != null) {
1025
+ obj_imageUrl_union0 = obj_imageUrl_union0_error.message;
1026
+ }
1027
+ let obj_imageUrl_union1 = null;
1028
+ const obj_imageUrl_union1_error = (() => {
1029
+ if (obj_imageUrl !== null) {
1030
+ return new TypeError('Expected "null" but received "' + typeof obj_imageUrl + '" (at "' + path_imageUrl + '")');
1031
+ }
1032
+ })();
1033
+ if (obj_imageUrl_union1_error != null) {
1034
+ obj_imageUrl_union1 = obj_imageUrl_union1_error.message;
1035
+ }
1036
+ if (obj_imageUrl_union0 && obj_imageUrl_union1) {
1037
+ let message = 'Object doesn\'t match union (at "' + path_imageUrl + '")';
1038
+ message += '\n' + obj_imageUrl_union0.split('\n').map((line) => '\t' + line).join('\n');
1039
+ message += '\n' + obj_imageUrl_union1.split('\n').map((line) => '\t' + line).join('\n');
1040
+ return new TypeError(message);
1041
+ }
900
1042
  }
901
- const obj_label = obj.label;
902
- const path_label = path + '.label';
903
- if (typeof obj_label !== 'string') {
904
- return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
1043
+ if (obj.label !== undefined) {
1044
+ const obj_label = obj.label;
1045
+ const path_label = path + '.label';
1046
+ let obj_label_union0 = null;
1047
+ const obj_label_union0_error = (() => {
1048
+ if (typeof obj_label !== 'string') {
1049
+ return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
1050
+ }
1051
+ })();
1052
+ if (obj_label_union0_error != null) {
1053
+ obj_label_union0 = obj_label_union0_error.message;
1054
+ }
1055
+ let obj_label_union1 = null;
1056
+ const obj_label_union1_error = (() => {
1057
+ if (obj_label !== null) {
1058
+ return new TypeError('Expected "null" but received "' + typeof obj_label + '" (at "' + path_label + '")');
1059
+ }
1060
+ })();
1061
+ if (obj_label_union1_error != null) {
1062
+ obj_label_union1 = obj_label_union1_error.message;
1063
+ }
1064
+ if (obj_label_union0 && obj_label_union1) {
1065
+ let message = 'Object doesn\'t match union (at "' + path_label + '")';
1066
+ message += '\n' + obj_label_union0.split('\n').map((line) => '\t' + line).join('\n');
1067
+ message += '\n' + obj_label_union1.split('\n').map((line) => '\t' + line).join('\n');
1068
+ return new TypeError(message);
1069
+ }
905
1070
  }
906
1071
  })();
907
1072
  return v_error === undefined ? null : v_error;
@@ -923,7 +1088,8 @@ const select$5 = function NetworkDataCategoryRepresentationSelect() {
923
1088
  },
924
1089
  {
925
1090
  name: 'description',
926
- kind: 'Scalar'
1091
+ kind: 'Scalar',
1092
+ required: false
927
1093
  },
928
1094
  {
929
1095
  name: 'id',
@@ -931,11 +1097,13 @@ const select$5 = function NetworkDataCategoryRepresentationSelect() {
931
1097
  },
932
1098
  {
933
1099
  name: 'imageUrl',
934
- kind: 'Scalar'
1100
+ kind: 'Scalar',
1101
+ required: false
935
1102
  },
936
1103
  {
937
1104
  name: 'label',
938
- kind: 'Scalar'
1105
+ kind: 'Scalar',
1106
+ required: false
939
1107
  }
940
1108
  ]
941
1109
  };
@@ -946,26 +1114,11 @@ function equals$3(existing, incoming) {
946
1114
  if (!(existing_categoryName === incoming_categoryName)) {
947
1115
  return false;
948
1116
  }
949
- const existing_description = existing.description;
950
- const incoming_description = incoming.description;
951
- if (!(existing_description === incoming_description)) {
952
- return false;
953
- }
954
1117
  const existing_id = existing.id;
955
1118
  const incoming_id = incoming.id;
956
1119
  if (!(existing_id === incoming_id)) {
957
1120
  return false;
958
1121
  }
959
- const existing_imageUrl = existing.imageUrl;
960
- const incoming_imageUrl = incoming.imageUrl;
961
- if (!(existing_imageUrl === incoming_imageUrl)) {
962
- return false;
963
- }
964
- const existing_label = existing.label;
965
- const incoming_label = incoming.label;
966
- if (!(existing_label === incoming_label)) {
967
- return false;
968
- }
969
1122
  const existing_childCategories = existing.childCategories;
970
1123
  const incoming_childCategories = incoming.childCategories;
971
1124
  const equals_childCategories_items = equalsArray(existing_childCategories, incoming_childCategories, (existing_childCategories_item, incoming_childCategories_item) => {
@@ -976,10 +1129,49 @@ function equals$3(existing, incoming) {
976
1129
  if (equals_childCategories_items === false) {
977
1130
  return false;
978
1131
  }
1132
+ const existing_description = existing.description;
1133
+ const incoming_description = incoming.description;
1134
+ // if at least one of these optionals is defined
1135
+ if (existing_description !== undefined || incoming_description !== undefined) {
1136
+ // if one of these is not defined we know the other is defined and therefore
1137
+ // not equal
1138
+ if (existing_description === undefined || incoming_description === undefined) {
1139
+ return false;
1140
+ }
1141
+ if (!(existing_description === incoming_description)) {
1142
+ return false;
1143
+ }
1144
+ }
1145
+ const existing_imageUrl = existing.imageUrl;
1146
+ const incoming_imageUrl = incoming.imageUrl;
1147
+ // if at least one of these optionals is defined
1148
+ if (existing_imageUrl !== undefined || incoming_imageUrl !== undefined) {
1149
+ // if one of these is not defined we know the other is defined and therefore
1150
+ // not equal
1151
+ if (existing_imageUrl === undefined || incoming_imageUrl === undefined) {
1152
+ return false;
1153
+ }
1154
+ if (!(existing_imageUrl === incoming_imageUrl)) {
1155
+ return false;
1156
+ }
1157
+ }
1158
+ const existing_label = existing.label;
1159
+ const incoming_label = incoming.label;
1160
+ // if at least one of these optionals is defined
1161
+ if (existing_label !== undefined || incoming_label !== undefined) {
1162
+ // if one of these is not defined we know the other is defined and therefore
1163
+ // not equal
1164
+ if (existing_label === undefined || incoming_label === undefined) {
1165
+ return false;
1166
+ }
1167
+ if (!(existing_label === incoming_label)) {
1168
+ return false;
1169
+ }
1170
+ }
979
1171
  return true;
980
1172
  }
981
1173
 
982
- const VERSION$2 = "a29dadac27eea99c256eaf7a756db8ea";
1174
+ const VERSION$2 = "971192bd937efc9d89177c7289adf241";
983
1175
  function validate$3(obj, path = 'NetworkDataCategoryGroupRepresentation') {
984
1176
  const v_error = (() => {
985
1177
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
@@ -990,13 +1182,36 @@ function validate$3(obj, path = 'NetworkDataCategoryGroupRepresentation') {
990
1182
  if (typeof obj_categoryGroupName !== 'string') {
991
1183
  return new TypeError('Expected "string" but received "' + typeof obj_categoryGroupName + '" (at "' + path_categoryGroupName + '")');
992
1184
  }
993
- const obj_rootCategory = obj.rootCategory;
994
- const path_rootCategory = path + '.rootCategory';
995
- const referencepath_rootCategoryValidationError = validate$4(obj_rootCategory, path_rootCategory);
996
- if (referencepath_rootCategoryValidationError !== null) {
997
- let message = 'Object doesn\'t match NetworkDataCategoryRepresentation (at "' + path_rootCategory + '")\n';
998
- message += referencepath_rootCategoryValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
999
- return new TypeError(message);
1185
+ if (obj.rootCategory !== undefined) {
1186
+ const obj_rootCategory = obj.rootCategory;
1187
+ const path_rootCategory = path + '.rootCategory';
1188
+ let obj_rootCategory_union0 = null;
1189
+ const obj_rootCategory_union0_error = (() => {
1190
+ const referencepath_rootCategoryValidationError = validate$4(obj_rootCategory, path_rootCategory);
1191
+ if (referencepath_rootCategoryValidationError !== null) {
1192
+ let message = 'Object doesn\'t match NetworkDataCategoryRepresentation (at "' + path_rootCategory + '")\n';
1193
+ message += referencepath_rootCategoryValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1194
+ return new TypeError(message);
1195
+ }
1196
+ })();
1197
+ if (obj_rootCategory_union0_error != null) {
1198
+ obj_rootCategory_union0 = obj_rootCategory_union0_error.message;
1199
+ }
1200
+ let obj_rootCategory_union1 = null;
1201
+ const obj_rootCategory_union1_error = (() => {
1202
+ if (obj_rootCategory !== null) {
1203
+ return new TypeError('Expected "null" but received "' + typeof obj_rootCategory + '" (at "' + path_rootCategory + '")');
1204
+ }
1205
+ })();
1206
+ if (obj_rootCategory_union1_error != null) {
1207
+ obj_rootCategory_union1 = obj_rootCategory_union1_error.message;
1208
+ }
1209
+ if (obj_rootCategory_union0 && obj_rootCategory_union1) {
1210
+ let message = 'Object doesn\'t match union (at "' + path_rootCategory + '")';
1211
+ message += '\n' + obj_rootCategory_union0.split('\n').map((line) => '\t' + line).join('\n');
1212
+ message += '\n' + obj_rootCategory_union1.split('\n').map((line) => '\t' + line).join('\n');
1213
+ return new TypeError(message);
1214
+ }
1000
1215
  }
1001
1216
  })();
1002
1217
  return v_error === undefined ? null : v_error;
@@ -1015,7 +1230,9 @@ const select$4 = function NetworkDataCategoryGroupRepresentationSelect() {
1015
1230
  {
1016
1231
  name: 'rootCategory',
1017
1232
  kind: 'Object',
1018
- selections: NetworkDataCategoryRepresentation__selections
1233
+ nullable: true,
1234
+ selections: NetworkDataCategoryRepresentation__selections,
1235
+ required: false
1019
1236
  }
1020
1237
  ]
1021
1238
  };
@@ -1028,8 +1245,19 @@ function equals$2(existing, incoming) {
1028
1245
  }
1029
1246
  const existing_rootCategory = existing.rootCategory;
1030
1247
  const incoming_rootCategory = incoming.rootCategory;
1031
- if (!(equals$3(existing_rootCategory, incoming_rootCategory))) {
1032
- return false;
1248
+ // if at least one of these optionals is defined
1249
+ if (existing_rootCategory !== undefined || incoming_rootCategory !== undefined) {
1250
+ // if one of these is not defined we know the other is defined and therefore
1251
+ // not equal
1252
+ if (existing_rootCategory === undefined || incoming_rootCategory === undefined) {
1253
+ return false;
1254
+ }
1255
+ if (!(existing_rootCategory === incoming_rootCategory
1256
+ || (existing_rootCategory != null &&
1257
+ incoming_rootCategory != null &&
1258
+ equals$3(existing_rootCategory, incoming_rootCategory)))) {
1259
+ return false;
1260
+ }
1033
1261
  }
1034
1262
  return true;
1035
1263
  }
@@ -1,5 +1,5 @@
1
1
  import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
2
- export declare const VERSION = "f3960577caf41d925ed00b2cc2e508e8";
2
+ export declare const VERSION = "1579429bf94d94aa9fe7ba4906607811";
3
3
  export declare function validate(obj: any, path?: string): TypeError | null;
4
4
  export declare const RepresentationType: string;
5
5
  export declare function normalize(input: LightningKnowledgeArticleVersionRepresentation, existing: LightningKnowledgeArticleVersionRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): LightningKnowledgeArticleVersionRepresentationNormalized;
@@ -21,7 +21,7 @@ export interface LightningKnowledgeArticleVersionRepresentationNormalized {
21
21
  /** Last published date of the article. */
22
22
  lastPublishedDate: string;
23
23
  /** Summary of the articles contents. */
24
- summary: string;
24
+ summary?: string | null;
25
25
  /** Title of the Article */
26
26
  title: string;
27
27
  /** URL_NAME of the Article */
@@ -37,7 +37,7 @@ export interface LightningKnowledgeArticleVersionRepresentation {
37
37
  id: string;
38
38
  knowledgeArticleId: string;
39
39
  lastPublishedDate: string;
40
- summary: string;
40
+ summary?: string | null;
41
41
  title: string;
42
42
  urlName: string;
43
43
  }
@@ -1,6 +1,6 @@
1
1
  import { NetworkDataCategoryRepresentation as NetworkDataCategoryRepresentation_NetworkDataCategoryRepresentation } from './NetworkDataCategoryRepresentation';
2
2
  import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
3
- export declare const VERSION = "a29dadac27eea99c256eaf7a756db8ea";
3
+ export declare const VERSION = "971192bd937efc9d89177c7289adf241";
4
4
  export declare function validate(obj: any, path?: string): TypeError | null;
5
5
  export declare const RepresentationType: string;
6
6
  export declare function normalize(input: NetworkDataCategoryGroupRepresentation, existing: NetworkDataCategoryGroupRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): NetworkDataCategoryGroupRepresentationNormalized;
@@ -17,7 +17,8 @@ export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableSto
17
17
  export interface NetworkDataCategoryGroupRepresentationNormalized {
18
18
  /** Network Data Category Group Name */
19
19
  categoryGroupName: string;
20
- rootCategory: NetworkDataCategoryRepresentation_NetworkDataCategoryRepresentation;
20
+ /** Root Category Representation */
21
+ rootCategory?: NetworkDataCategoryRepresentation_NetworkDataCategoryRepresentation | null;
21
22
  }
22
23
  /**
23
24
  * Describes a network data category group
@@ -27,5 +28,5 @@ export interface NetworkDataCategoryGroupRepresentationNormalized {
27
28
  */
28
29
  export interface NetworkDataCategoryGroupRepresentation {
29
30
  categoryGroupName: string;
30
- rootCategory: NetworkDataCategoryRepresentation_NetworkDataCategoryRepresentation;
31
+ rootCategory?: NetworkDataCategoryRepresentation_NetworkDataCategoryRepresentation | null;
31
32
  }
@@ -1,5 +1,5 @@
1
1
  import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
2
- export declare const VERSION = "521a1b755b3490ccc211d6fa08f467db";
2
+ export declare const VERSION = "0d501a366f70d5f5cdd9a7d7af934c58";
3
3
  export declare function validate(obj: any, path?: string): TypeError | null;
4
4
  export declare const RepresentationType: string;
5
5
  export declare function normalize(input: NetworkDataCategoryRepresentation, existing: NetworkDataCategoryRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): NetworkDataCategoryRepresentationNormalized;
@@ -19,13 +19,13 @@ export interface NetworkDataCategoryRepresentationNormalized {
19
19
  /** Children of Network Data Category */
20
20
  childCategories: Array<unknown>;
21
21
  /** Network Data Category Description */
22
- description: string;
22
+ description?: string | null;
23
23
  /** Network Data Category id */
24
24
  id: string;
25
25
  /** Image Url of Network Data Category */
26
- imageUrl: string;
26
+ imageUrl?: string | null;
27
27
  /** Network Data Category Label */
28
- label: string;
28
+ label?: string | null;
29
29
  }
30
30
  /**
31
31
  * Describes a network data category
@@ -36,8 +36,8 @@ export interface NetworkDataCategoryRepresentationNormalized {
36
36
  export interface NetworkDataCategoryRepresentation {
37
37
  categoryName: string;
38
38
  childCategories: Array<unknown>;
39
- description: string;
39
+ description?: string | null;
40
40
  id: string;
41
- imageUrl: string;
42
- label: string;
41
+ imageUrl?: string | null;
42
+ label?: string | null;
43
43
  }
@@ -1,5 +1,5 @@
1
1
  import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
2
- export declare const VERSION = "b291e2065704f3a4b4af70eb48fc8131";
2
+ export declare const VERSION = "e09f2c8e969b05cce02145ff503c5764";
3
3
  export declare function validate(obj: any, path?: string): TypeError | null;
4
4
  export declare const RepresentationType: string;
5
5
  export declare function normalize(input: ServiceCatalogItemRepresentation, existing: ServiceCatalogItemRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): ServiceCatalogItemRepresentationNormalized;
@@ -15,13 +15,13 @@ export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableSto
15
15
  */
16
16
  export interface ServiceCatalogItemRepresentationNormalized {
17
17
  /** Short Description of Service Catalog Item */
18
- description: string;
18
+ description?: string | null;
19
19
  /** Dev name of Service Catalog Item */
20
20
  developerName: string;
21
21
  /** Service Catalog Item Id */
22
22
  id: string;
23
23
  /** Image url of Service Catalog Item */
24
- imageUrl: string;
24
+ imageUrl?: string | null;
25
25
  /** Label of Service Catalog Item */
26
26
  label: string;
27
27
  }
@@ -32,9 +32,9 @@ export interface ServiceCatalogItemRepresentationNormalized {
32
32
  * (none)
33
33
  */
34
34
  export interface ServiceCatalogItemRepresentation {
35
- description: string;
35
+ description?: string | null;
36
36
  developerName: string;
37
37
  id: string;
38
- imageUrl: string;
38
+ imageUrl?: string | null;
39
39
  label: string;
40
40
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-adapters-service-network-data-category",
3
- "version": "1.228.0",
3
+ "version": "1.229.0-dev1",
4
4
  "description": "Family that contains APIs pertaining to the NetworkDataCategory object",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "dist/es/es2018/service-network-data-category.js",
@@ -44,11 +44,11 @@
44
44
  "test:unit": "jest"
45
45
  },
46
46
  "dependencies": {
47
- "@salesforce/lds-bindings": "*"
47
+ "@salesforce/lds-bindings": "1.229.0-dev1"
48
48
  },
49
49
  "devDependencies": {
50
- "@salesforce/lds-compiler-plugins": "*",
51
- "@salesforce/lds-karma": "*"
50
+ "@salesforce/lds-compiler-plugins": "1.229.0-dev1",
51
+ "@salesforce/lds-karma": "1.229.0-dev1"
52
52
  },
53
53
  "nx": {
54
54
  "targets": {
package/sfdc/index.js CHANGED
@@ -103,7 +103,7 @@ function createLink(ref) {
103
103
  };
104
104
  }
105
105
 
106
- const VERSION$7 = "f3960577caf41d925ed00b2cc2e508e8";
106
+ const VERSION$7 = "1579429bf94d94aa9fe7ba4906607811";
107
107
  function validate$8(obj, path = 'LightningKnowledgeArticleVersionRepresentation') {
108
108
  const v_error = (() => {
109
109
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
@@ -124,10 +124,33 @@ function validate$8(obj, path = 'LightningKnowledgeArticleVersionRepresentation'
124
124
  if (typeof obj_lastPublishedDate !== 'string') {
125
125
  return new TypeError('Expected "string" but received "' + typeof obj_lastPublishedDate + '" (at "' + path_lastPublishedDate + '")');
126
126
  }
127
- const obj_summary = obj.summary;
128
- const path_summary = path + '.summary';
129
- if (typeof obj_summary !== 'string') {
130
- return new TypeError('Expected "string" but received "' + typeof obj_summary + '" (at "' + path_summary + '")');
127
+ if (obj.summary !== undefined) {
128
+ const obj_summary = obj.summary;
129
+ const path_summary = path + '.summary';
130
+ let obj_summary_union0 = null;
131
+ const obj_summary_union0_error = (() => {
132
+ if (typeof obj_summary !== 'string') {
133
+ return new TypeError('Expected "string" but received "' + typeof obj_summary + '" (at "' + path_summary + '")');
134
+ }
135
+ })();
136
+ if (obj_summary_union0_error != null) {
137
+ obj_summary_union0 = obj_summary_union0_error.message;
138
+ }
139
+ let obj_summary_union1 = null;
140
+ const obj_summary_union1_error = (() => {
141
+ if (obj_summary !== null) {
142
+ return new TypeError('Expected "null" but received "' + typeof obj_summary + '" (at "' + path_summary + '")');
143
+ }
144
+ })();
145
+ if (obj_summary_union1_error != null) {
146
+ obj_summary_union1 = obj_summary_union1_error.message;
147
+ }
148
+ if (obj_summary_union0 && obj_summary_union1) {
149
+ let message = 'Object doesn\'t match union (at "' + path_summary + '")';
150
+ message += '\n' + obj_summary_union0.split('\n').map((line) => '\t' + line).join('\n');
151
+ message += '\n' + obj_summary_union1.split('\n').map((line) => '\t' + line).join('\n');
152
+ return new TypeError(message);
153
+ }
131
154
  }
132
155
  const obj_title = obj.title;
133
156
  const path_title = path + '.title';
@@ -162,7 +185,8 @@ const select$c = function LightningKnowledgeArticleVersionRepresentationSelect()
162
185
  },
163
186
  {
164
187
  name: 'summary',
165
- kind: 'Scalar'
188
+ kind: 'Scalar',
189
+ required: false
166
190
  },
167
191
  {
168
192
  name: 'title',
@@ -191,11 +215,6 @@ function equals$7(existing, incoming) {
191
215
  if (!(existing_lastPublishedDate === incoming_lastPublishedDate)) {
192
216
  return false;
193
217
  }
194
- const existing_summary = existing.summary;
195
- const incoming_summary = incoming.summary;
196
- if (!(existing_summary === incoming_summary)) {
197
- return false;
198
- }
199
218
  const existing_title = existing.title;
200
219
  const incoming_title = incoming.title;
201
220
  if (!(existing_title === incoming_title)) {
@@ -206,6 +225,19 @@ function equals$7(existing, incoming) {
206
225
  if (!(existing_urlName === incoming_urlName)) {
207
226
  return false;
208
227
  }
228
+ const existing_summary = existing.summary;
229
+ const incoming_summary = incoming.summary;
230
+ // if at least one of these optionals is defined
231
+ if (existing_summary !== undefined || incoming_summary !== undefined) {
232
+ // if one of these is not defined we know the other is defined and therefore
233
+ // not equal
234
+ if (existing_summary === undefined || incoming_summary === undefined) {
235
+ return false;
236
+ }
237
+ if (!(existing_summary === incoming_summary)) {
238
+ return false;
239
+ }
240
+ }
209
241
  return true;
210
242
  }
211
243
 
@@ -426,7 +458,7 @@ const getArticlesForCategoryAdapterFactory = (luvio) => function NetworkDataCate
426
458
  buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
427
459
  };
428
460
 
429
- const VERSION$5 = "521a1b755b3490ccc211d6fa08f467db";
461
+ const VERSION$5 = "0d501a366f70d5f5cdd9a7d7af934c58";
430
462
  function validate$6(obj, path = 'NetworkDataCategoryRepresentation') {
431
463
  const v_error = (() => {
432
464
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
@@ -449,25 +481,94 @@ function validate$6(obj, path = 'NetworkDataCategoryRepresentation') {
449
481
  return new TypeError('Expected "defined" but received "' + typeof obj_childCategories_item + '" (at "' + path_childCategories_item + '")');
450
482
  }
451
483
  }
452
- const obj_description = obj.description;
453
- const path_description = path + '.description';
454
- if (typeof obj_description !== 'string') {
455
- return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
484
+ if (obj.description !== undefined) {
485
+ const obj_description = obj.description;
486
+ const path_description = path + '.description';
487
+ let obj_description_union0 = null;
488
+ const obj_description_union0_error = (() => {
489
+ if (typeof obj_description !== 'string') {
490
+ return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
491
+ }
492
+ })();
493
+ if (obj_description_union0_error != null) {
494
+ obj_description_union0 = obj_description_union0_error.message;
495
+ }
496
+ let obj_description_union1 = null;
497
+ const obj_description_union1_error = (() => {
498
+ if (obj_description !== null) {
499
+ return new TypeError('Expected "null" but received "' + typeof obj_description + '" (at "' + path_description + '")');
500
+ }
501
+ })();
502
+ if (obj_description_union1_error != null) {
503
+ obj_description_union1 = obj_description_union1_error.message;
504
+ }
505
+ if (obj_description_union0 && obj_description_union1) {
506
+ let message = 'Object doesn\'t match union (at "' + path_description + '")';
507
+ message += '\n' + obj_description_union0.split('\n').map((line) => '\t' + line).join('\n');
508
+ message += '\n' + obj_description_union1.split('\n').map((line) => '\t' + line).join('\n');
509
+ return new TypeError(message);
510
+ }
456
511
  }
457
512
  const obj_id = obj.id;
458
513
  const path_id = path + '.id';
459
514
  if (typeof obj_id !== 'string') {
460
515
  return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
461
516
  }
462
- const obj_imageUrl = obj.imageUrl;
463
- const path_imageUrl = path + '.imageUrl';
464
- if (typeof obj_imageUrl !== 'string') {
465
- return new TypeError('Expected "string" but received "' + typeof obj_imageUrl + '" (at "' + path_imageUrl + '")');
517
+ if (obj.imageUrl !== undefined) {
518
+ const obj_imageUrl = obj.imageUrl;
519
+ const path_imageUrl = path + '.imageUrl';
520
+ let obj_imageUrl_union0 = null;
521
+ const obj_imageUrl_union0_error = (() => {
522
+ if (typeof obj_imageUrl !== 'string') {
523
+ return new TypeError('Expected "string" but received "' + typeof obj_imageUrl + '" (at "' + path_imageUrl + '")');
524
+ }
525
+ })();
526
+ if (obj_imageUrl_union0_error != null) {
527
+ obj_imageUrl_union0 = obj_imageUrl_union0_error.message;
528
+ }
529
+ let obj_imageUrl_union1 = null;
530
+ const obj_imageUrl_union1_error = (() => {
531
+ if (obj_imageUrl !== null) {
532
+ return new TypeError('Expected "null" but received "' + typeof obj_imageUrl + '" (at "' + path_imageUrl + '")');
533
+ }
534
+ })();
535
+ if (obj_imageUrl_union1_error != null) {
536
+ obj_imageUrl_union1 = obj_imageUrl_union1_error.message;
537
+ }
538
+ if (obj_imageUrl_union0 && obj_imageUrl_union1) {
539
+ let message = 'Object doesn\'t match union (at "' + path_imageUrl + '")';
540
+ message += '\n' + obj_imageUrl_union0.split('\n').map((line) => '\t' + line).join('\n');
541
+ message += '\n' + obj_imageUrl_union1.split('\n').map((line) => '\t' + line).join('\n');
542
+ return new TypeError(message);
543
+ }
466
544
  }
467
- const obj_label = obj.label;
468
- const path_label = path + '.label';
469
- if (typeof obj_label !== 'string') {
470
- return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
545
+ if (obj.label !== undefined) {
546
+ const obj_label = obj.label;
547
+ const path_label = path + '.label';
548
+ let obj_label_union0 = null;
549
+ const obj_label_union0_error = (() => {
550
+ if (typeof obj_label !== 'string') {
551
+ return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
552
+ }
553
+ })();
554
+ if (obj_label_union0_error != null) {
555
+ obj_label_union0 = obj_label_union0_error.message;
556
+ }
557
+ let obj_label_union1 = null;
558
+ const obj_label_union1_error = (() => {
559
+ if (obj_label !== null) {
560
+ return new TypeError('Expected "null" but received "' + typeof obj_label + '" (at "' + path_label + '")');
561
+ }
562
+ })();
563
+ if (obj_label_union1_error != null) {
564
+ obj_label_union1 = obj_label_union1_error.message;
565
+ }
566
+ if (obj_label_union0 && obj_label_union1) {
567
+ let message = 'Object doesn\'t match union (at "' + path_label + '")';
568
+ message += '\n' + obj_label_union0.split('\n').map((line) => '\t' + line).join('\n');
569
+ message += '\n' + obj_label_union1.split('\n').map((line) => '\t' + line).join('\n');
570
+ return new TypeError(message);
571
+ }
471
572
  }
472
573
  })();
473
574
  return v_error === undefined ? null : v_error;
@@ -489,7 +590,8 @@ const select$9 = function NetworkDataCategoryRepresentationSelect() {
489
590
  },
490
591
  {
491
592
  name: 'description',
492
- kind: 'Scalar'
593
+ kind: 'Scalar',
594
+ required: false
493
595
  },
494
596
  {
495
597
  name: 'id',
@@ -497,11 +599,13 @@ const select$9 = function NetworkDataCategoryRepresentationSelect() {
497
599
  },
498
600
  {
499
601
  name: 'imageUrl',
500
- kind: 'Scalar'
602
+ kind: 'Scalar',
603
+ required: false
501
604
  },
502
605
  {
503
606
  name: 'label',
504
- kind: 'Scalar'
607
+ kind: 'Scalar',
608
+ required: false
505
609
  }
506
610
  ]
507
611
  };
@@ -512,26 +616,11 @@ function equals$5(existing, incoming) {
512
616
  if (!(existing_categoryName === incoming_categoryName)) {
513
617
  return false;
514
618
  }
515
- const existing_description = existing.description;
516
- const incoming_description = incoming.description;
517
- if (!(existing_description === incoming_description)) {
518
- return false;
519
- }
520
619
  const existing_id = existing.id;
521
620
  const incoming_id = incoming.id;
522
621
  if (!(existing_id === incoming_id)) {
523
622
  return false;
524
623
  }
525
- const existing_imageUrl = existing.imageUrl;
526
- const incoming_imageUrl = incoming.imageUrl;
527
- if (!(existing_imageUrl === incoming_imageUrl)) {
528
- return false;
529
- }
530
- const existing_label = existing.label;
531
- const incoming_label = incoming.label;
532
- if (!(existing_label === incoming_label)) {
533
- return false;
534
- }
535
624
  const existing_childCategories = existing.childCategories;
536
625
  const incoming_childCategories = incoming.childCategories;
537
626
  const equals_childCategories_items = equalsArray(existing_childCategories, incoming_childCategories, (existing_childCategories_item, incoming_childCategories_item) => {
@@ -542,10 +631,49 @@ function equals$5(existing, incoming) {
542
631
  if (equals_childCategories_items === false) {
543
632
  return false;
544
633
  }
634
+ const existing_description = existing.description;
635
+ const incoming_description = incoming.description;
636
+ // if at least one of these optionals is defined
637
+ if (existing_description !== undefined || incoming_description !== undefined) {
638
+ // if one of these is not defined we know the other is defined and therefore
639
+ // not equal
640
+ if (existing_description === undefined || incoming_description === undefined) {
641
+ return false;
642
+ }
643
+ if (!(existing_description === incoming_description)) {
644
+ return false;
645
+ }
646
+ }
647
+ const existing_imageUrl = existing.imageUrl;
648
+ const incoming_imageUrl = incoming.imageUrl;
649
+ // if at least one of these optionals is defined
650
+ if (existing_imageUrl !== undefined || incoming_imageUrl !== undefined) {
651
+ // if one of these is not defined we know the other is defined and therefore
652
+ // not equal
653
+ if (existing_imageUrl === undefined || incoming_imageUrl === undefined) {
654
+ return false;
655
+ }
656
+ if (!(existing_imageUrl === incoming_imageUrl)) {
657
+ return false;
658
+ }
659
+ }
660
+ const existing_label = existing.label;
661
+ const incoming_label = incoming.label;
662
+ // if at least one of these optionals is defined
663
+ if (existing_label !== undefined || incoming_label !== undefined) {
664
+ // if one of these is not defined we know the other is defined and therefore
665
+ // not equal
666
+ if (existing_label === undefined || incoming_label === undefined) {
667
+ return false;
668
+ }
669
+ if (!(existing_label === incoming_label)) {
670
+ return false;
671
+ }
672
+ }
545
673
  return true;
546
674
  }
547
675
 
548
- const VERSION$4 = "a29dadac27eea99c256eaf7a756db8ea";
676
+ const VERSION$4 = "971192bd937efc9d89177c7289adf241";
549
677
  function validate$5(obj, path = 'NetworkDataCategoryGroupRepresentation') {
550
678
  const v_error = (() => {
551
679
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
@@ -556,13 +684,36 @@ function validate$5(obj, path = 'NetworkDataCategoryGroupRepresentation') {
556
684
  if (typeof obj_categoryGroupName !== 'string') {
557
685
  return new TypeError('Expected "string" but received "' + typeof obj_categoryGroupName + '" (at "' + path_categoryGroupName + '")');
558
686
  }
559
- const obj_rootCategory = obj.rootCategory;
560
- const path_rootCategory = path + '.rootCategory';
561
- const referencepath_rootCategoryValidationError = validate$6(obj_rootCategory, path_rootCategory);
562
- if (referencepath_rootCategoryValidationError !== null) {
563
- let message = 'Object doesn\'t match NetworkDataCategoryRepresentation (at "' + path_rootCategory + '")\n';
564
- message += referencepath_rootCategoryValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
565
- return new TypeError(message);
687
+ if (obj.rootCategory !== undefined) {
688
+ const obj_rootCategory = obj.rootCategory;
689
+ const path_rootCategory = path + '.rootCategory';
690
+ let obj_rootCategory_union0 = null;
691
+ const obj_rootCategory_union0_error = (() => {
692
+ const referencepath_rootCategoryValidationError = validate$6(obj_rootCategory, path_rootCategory);
693
+ if (referencepath_rootCategoryValidationError !== null) {
694
+ let message = 'Object doesn\'t match NetworkDataCategoryRepresentation (at "' + path_rootCategory + '")\n';
695
+ message += referencepath_rootCategoryValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
696
+ return new TypeError(message);
697
+ }
698
+ })();
699
+ if (obj_rootCategory_union0_error != null) {
700
+ obj_rootCategory_union0 = obj_rootCategory_union0_error.message;
701
+ }
702
+ let obj_rootCategory_union1 = null;
703
+ const obj_rootCategory_union1_error = (() => {
704
+ if (obj_rootCategory !== null) {
705
+ return new TypeError('Expected "null" but received "' + typeof obj_rootCategory + '" (at "' + path_rootCategory + '")');
706
+ }
707
+ })();
708
+ if (obj_rootCategory_union1_error != null) {
709
+ obj_rootCategory_union1 = obj_rootCategory_union1_error.message;
710
+ }
711
+ if (obj_rootCategory_union0 && obj_rootCategory_union1) {
712
+ let message = 'Object doesn\'t match union (at "' + path_rootCategory + '")';
713
+ message += '\n' + obj_rootCategory_union0.split('\n').map((line) => '\t' + line).join('\n');
714
+ message += '\n' + obj_rootCategory_union1.split('\n').map((line) => '\t' + line).join('\n');
715
+ return new TypeError(message);
716
+ }
566
717
  }
567
718
  })();
568
719
  return v_error === undefined ? null : v_error;
@@ -581,7 +732,9 @@ const select$8 = function NetworkDataCategoryGroupRepresentationSelect() {
581
732
  {
582
733
  name: 'rootCategory',
583
734
  kind: 'Object',
584
- selections: NetworkDataCategoryRepresentation__selections
735
+ nullable: true,
736
+ selections: NetworkDataCategoryRepresentation__selections,
737
+ required: false
585
738
  }
586
739
  ]
587
740
  };
@@ -594,8 +747,19 @@ function equals$4(existing, incoming) {
594
747
  }
595
748
  const existing_rootCategory = existing.rootCategory;
596
749
  const incoming_rootCategory = incoming.rootCategory;
597
- if (!(equals$5(existing_rootCategory, incoming_rootCategory))) {
598
- return false;
750
+ // if at least one of these optionals is defined
751
+ if (existing_rootCategory !== undefined || incoming_rootCategory !== undefined) {
752
+ // if one of these is not defined we know the other is defined and therefore
753
+ // not equal
754
+ if (existing_rootCategory === undefined || incoming_rootCategory === undefined) {
755
+ return false;
756
+ }
757
+ if (!(existing_rootCategory === incoming_rootCategory
758
+ || (existing_rootCategory != null &&
759
+ incoming_rootCategory != null &&
760
+ equals$5(existing_rootCategory, incoming_rootCategory)))) {
761
+ return false;
762
+ }
599
763
  }
600
764
  return true;
601
765
  }
@@ -886,16 +1050,39 @@ const notifyChangeFactory = (luvio, options) => {
886
1050
  };
887
1051
  };
888
1052
 
889
- const VERSION$2 = "b291e2065704f3a4b4af70eb48fc8131";
1053
+ const VERSION$2 = "e09f2c8e969b05cce02145ff503c5764";
890
1054
  function validate$3(obj, path = 'ServiceCatalogItemRepresentation') {
891
1055
  const v_error = (() => {
892
1056
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
893
1057
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
894
1058
  }
895
- const obj_description = obj.description;
896
- const path_description = path + '.description';
897
- if (typeof obj_description !== 'string') {
898
- return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
1059
+ if (obj.description !== undefined) {
1060
+ const obj_description = obj.description;
1061
+ const path_description = path + '.description';
1062
+ let obj_description_union0 = null;
1063
+ const obj_description_union0_error = (() => {
1064
+ if (typeof obj_description !== 'string') {
1065
+ return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
1066
+ }
1067
+ })();
1068
+ if (obj_description_union0_error != null) {
1069
+ obj_description_union0 = obj_description_union0_error.message;
1070
+ }
1071
+ let obj_description_union1 = null;
1072
+ const obj_description_union1_error = (() => {
1073
+ if (obj_description !== null) {
1074
+ return new TypeError('Expected "null" but received "' + typeof obj_description + '" (at "' + path_description + '")');
1075
+ }
1076
+ })();
1077
+ if (obj_description_union1_error != null) {
1078
+ obj_description_union1 = obj_description_union1_error.message;
1079
+ }
1080
+ if (obj_description_union0 && obj_description_union1) {
1081
+ let message = 'Object doesn\'t match union (at "' + path_description + '")';
1082
+ message += '\n' + obj_description_union0.split('\n').map((line) => '\t' + line).join('\n');
1083
+ message += '\n' + obj_description_union1.split('\n').map((line) => '\t' + line).join('\n');
1084
+ return new TypeError(message);
1085
+ }
899
1086
  }
900
1087
  const obj_developerName = obj.developerName;
901
1088
  const path_developerName = path + '.developerName';
@@ -907,10 +1094,33 @@ function validate$3(obj, path = 'ServiceCatalogItemRepresentation') {
907
1094
  if (typeof obj_id !== 'string') {
908
1095
  return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
909
1096
  }
910
- const obj_imageUrl = obj.imageUrl;
911
- const path_imageUrl = path + '.imageUrl';
912
- if (typeof obj_imageUrl !== 'string') {
913
- return new TypeError('Expected "string" but received "' + typeof obj_imageUrl + '" (at "' + path_imageUrl + '")');
1097
+ if (obj.imageUrl !== undefined) {
1098
+ const obj_imageUrl = obj.imageUrl;
1099
+ const path_imageUrl = path + '.imageUrl';
1100
+ let obj_imageUrl_union0 = null;
1101
+ const obj_imageUrl_union0_error = (() => {
1102
+ if (typeof obj_imageUrl !== 'string') {
1103
+ return new TypeError('Expected "string" but received "' + typeof obj_imageUrl + '" (at "' + path_imageUrl + '")');
1104
+ }
1105
+ })();
1106
+ if (obj_imageUrl_union0_error != null) {
1107
+ obj_imageUrl_union0 = obj_imageUrl_union0_error.message;
1108
+ }
1109
+ let obj_imageUrl_union1 = null;
1110
+ const obj_imageUrl_union1_error = (() => {
1111
+ if (obj_imageUrl !== null) {
1112
+ return new TypeError('Expected "null" but received "' + typeof obj_imageUrl + '" (at "' + path_imageUrl + '")');
1113
+ }
1114
+ })();
1115
+ if (obj_imageUrl_union1_error != null) {
1116
+ obj_imageUrl_union1 = obj_imageUrl_union1_error.message;
1117
+ }
1118
+ if (obj_imageUrl_union0 && obj_imageUrl_union1) {
1119
+ let message = 'Object doesn\'t match union (at "' + path_imageUrl + '")';
1120
+ message += '\n' + obj_imageUrl_union0.split('\n').map((line) => '\t' + line).join('\n');
1121
+ message += '\n' + obj_imageUrl_union1.split('\n').map((line) => '\t' + line).join('\n');
1122
+ return new TypeError(message);
1123
+ }
914
1124
  }
915
1125
  const obj_label = obj.label;
916
1126
  const path_label = path + '.label';
@@ -928,7 +1138,8 @@ const select$5 = function ServiceCatalogItemRepresentationSelect() {
928
1138
  selections: [
929
1139
  {
930
1140
  name: 'description',
931
- kind: 'Scalar'
1141
+ kind: 'Scalar',
1142
+ required: false
932
1143
  },
933
1144
  {
934
1145
  name: 'developerName',
@@ -940,7 +1151,8 @@ const select$5 = function ServiceCatalogItemRepresentationSelect() {
940
1151
  },
941
1152
  {
942
1153
  name: 'imageUrl',
943
- kind: 'Scalar'
1154
+ kind: 'Scalar',
1155
+ required: false
944
1156
  },
945
1157
  {
946
1158
  name: 'label',
@@ -950,11 +1162,6 @@ const select$5 = function ServiceCatalogItemRepresentationSelect() {
950
1162
  };
951
1163
  };
952
1164
  function equals$2(existing, incoming) {
953
- const existing_description = existing.description;
954
- const incoming_description = incoming.description;
955
- if (!(existing_description === incoming_description)) {
956
- return false;
957
- }
958
1165
  const existing_developerName = existing.developerName;
959
1166
  const incoming_developerName = incoming.developerName;
960
1167
  if (!(existing_developerName === incoming_developerName)) {
@@ -965,16 +1172,37 @@ function equals$2(existing, incoming) {
965
1172
  if (!(existing_id === incoming_id)) {
966
1173
  return false;
967
1174
  }
968
- const existing_imageUrl = existing.imageUrl;
969
- const incoming_imageUrl = incoming.imageUrl;
970
- if (!(existing_imageUrl === incoming_imageUrl)) {
971
- return false;
972
- }
973
1175
  const existing_label = existing.label;
974
1176
  const incoming_label = incoming.label;
975
1177
  if (!(existing_label === incoming_label)) {
976
1178
  return false;
977
1179
  }
1180
+ const existing_description = existing.description;
1181
+ const incoming_description = incoming.description;
1182
+ // if at least one of these optionals is defined
1183
+ if (existing_description !== undefined || incoming_description !== undefined) {
1184
+ // if one of these is not defined we know the other is defined and therefore
1185
+ // not equal
1186
+ if (existing_description === undefined || incoming_description === undefined) {
1187
+ return false;
1188
+ }
1189
+ if (!(existing_description === incoming_description)) {
1190
+ return false;
1191
+ }
1192
+ }
1193
+ const existing_imageUrl = existing.imageUrl;
1194
+ const incoming_imageUrl = incoming.imageUrl;
1195
+ // if at least one of these optionals is defined
1196
+ if (existing_imageUrl !== undefined || incoming_imageUrl !== undefined) {
1197
+ // if one of these is not defined we know the other is defined and therefore
1198
+ // not equal
1199
+ if (existing_imageUrl === undefined || incoming_imageUrl === undefined) {
1200
+ return false;
1201
+ }
1202
+ if (!(existing_imageUrl === incoming_imageUrl)) {
1203
+ return false;
1204
+ }
1205
+ }
978
1206
  return true;
979
1207
  }
980
1208
 
@@ -1573,4 +1801,4 @@ withDefaultLuvio((luvio) => {
1573
1801
  });
1574
1802
 
1575
1803
  export { getArticlesForCategory, getArticlesForCategory_imperative, getNetworkDataCategories, getNetworkDataCategoriesNotifyChange, getNetworkDataCategories_imperative, getServiceCatalogItems, getServiceCatalogItemsForCommunity, getServiceCatalogItemsForCommunity_imperative, getServiceCatalogItems_imperative, updateNetworkDataCategories };
1576
- // version: 1.228.0-946298e9a
1804
+ // version: 1.229.0-dev1-5b6d3db67
package/src/raml/api.raml CHANGED
@@ -39,7 +39,8 @@ types:
39
39
  type: string
40
40
  rootCategory:
41
41
  description: Root Category Representation
42
- type: NetworkDataCategoryRepresentation
42
+ type: NetworkDataCategoryRepresentation | nil
43
+ required: false
43
44
  NetworkDataCategoryRepresentation:
44
45
  description: Describes a network data category
45
46
  type: object
@@ -54,16 +55,19 @@ types:
54
55
  type: any # This is a workaround because recursive (tree) representations aren't supported in Luvio, even though they're supported in Connect API
55
56
  description:
56
57
  description: Network Data Category Description
57
- type: string
58
+ type: string | nil
59
+ required: false
58
60
  id:
59
61
  description: Network Data Category id
60
62
  type: string
61
63
  imageUrl:
62
64
  description: Image Url of Network Data Category
63
- type: string
65
+ type: string | nil
66
+ required: false
64
67
  label:
65
68
  description: Network Data Category Label
66
- type: string
69
+ type: string | nil
70
+ required: false
67
71
  NetworkDataCategoryTreeRepresentation:
68
72
  description: Represents a network data category tree
69
73
  type: object
@@ -114,7 +118,8 @@ types:
114
118
  type: string
115
119
  summary:
116
120
  description: Summary of the articles contents.
117
- type: string
121
+ type: string | nil
122
+ required: false
118
123
  title:
119
124
  description: Title of the Article
120
125
  type: string
@@ -136,7 +141,8 @@ types:
136
141
  properties:
137
142
  description:
138
143
  description: Short Description of Service Catalog Item
139
- type: string
144
+ type: string | nil
145
+ required: false
140
146
  developerName:
141
147
  description: Dev name of Service Catalog Item
142
148
  type: string
@@ -145,7 +151,8 @@ types:
145
151
  type: string
146
152
  imageUrl:
147
153
  description: Image url of Service Catalog Item
148
- type: string
154
+ type: string | nil
155
+ required: false
149
156
  label:
150
157
  description: Label of Service Catalog Item
151
158
  type: string