@salesforce/lds-adapters-service-network-data-category 1.228.1 → 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.
@@ -601,7 +601,7 @@ const getServiceCatalogItemsForCommunityAdapterFactory = (luvio) => function Net
601
601
  buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
602
602
  };
603
603
 
604
- const VERSION$5 = "f3960577caf41d925ed00b2cc2e508e8";
604
+ const VERSION$5 = "1579429bf94d94aa9fe7ba4906607811";
605
605
  function validate$6(obj, path = 'LightningKnowledgeArticleVersionRepresentation') {
606
606
  const v_error = (() => {
607
607
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
@@ -622,10 +622,33 @@ function validate$6(obj, path = 'LightningKnowledgeArticleVersionRepresentation'
622
622
  if (typeof obj_lastPublishedDate !== 'string') {
623
623
  return new TypeError('Expected "string" but received "' + typeof obj_lastPublishedDate + '" (at "' + path_lastPublishedDate + '")');
624
624
  }
625
- const obj_summary = obj.summary;
626
- const path_summary = path + '.summary';
627
- if (typeof obj_summary !== 'string') {
628
- 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
+ }
629
652
  }
630
653
  const obj_title = obj.title;
631
654
  const path_title = path + '.title';
@@ -660,7 +683,8 @@ const select$8 = function LightningKnowledgeArticleVersionRepresentationSelect()
660
683
  },
661
684
  {
662
685
  name: 'summary',
663
- kind: 'Scalar'
686
+ kind: 'Scalar',
687
+ required: false
664
688
  },
665
689
  {
666
690
  name: 'title',
@@ -689,11 +713,6 @@ function equals$5(existing, incoming) {
689
713
  if (!(existing_lastPublishedDate === incoming_lastPublishedDate)) {
690
714
  return false;
691
715
  }
692
- const existing_summary = existing.summary;
693
- const incoming_summary = incoming.summary;
694
- if (!(existing_summary === incoming_summary)) {
695
- return false;
696
- }
697
716
  const existing_title = existing.title;
698
717
  const incoming_title = incoming.title;
699
718
  if (!(existing_title === incoming_title)) {
@@ -704,6 +723,19 @@ function equals$5(existing, incoming) {
704
723
  if (!(existing_urlName === incoming_urlName)) {
705
724
  return false;
706
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
+ }
707
739
  return true;
708
740
  }
709
741
 
@@ -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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-adapters-service-network-data-category",
3
- "version": "1.228.1",
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
 
@@ -1769,4 +1801,4 @@ withDefaultLuvio((luvio) => {
1769
1801
  });
1770
1802
 
1771
1803
  export { getArticlesForCategory, getArticlesForCategory_imperative, getNetworkDataCategories, getNetworkDataCategoriesNotifyChange, getNetworkDataCategories_imperative, getServiceCatalogItems, getServiceCatalogItemsForCommunity, getServiceCatalogItemsForCommunity_imperative, getServiceCatalogItems_imperative, updateNetworkDataCategories };
1772
- // version: 1.228.1-0cb6f94f1
1804
+ // version: 1.229.0-dev1-5b6d3db67
package/src/raml/api.raml CHANGED
@@ -118,7 +118,8 @@ types:
118
118
  type: string
119
119
  summary:
120
120
  description: Summary of the articles contents.
121
- type: string
121
+ type: string | nil
122
+ required: false
122
123
  title:
123
124
  description: Title of the Article
124
125
  type: string