@salesforce/lds-adapters-service-network-data-category 1.262.4 → 1.264.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,5 +6,4 @@ export { getParentNetworkDataCategoryPathAdapterFactory } from '../adapters/getP
6
6
  export { getChildCategoriesAdapterFactory } from '../adapters/getChildCategories';
7
7
  export { getNetworkDataCategoriesAdapterFactory } from '../adapters/getNetworkDataCategories';
8
8
  export { updateNetworkDataCategoriesAdapterFactory } from '../adapters/updateNetworkDataCategories';
9
- export { notifyUpdateAvailableFactory as notifyNetworkDataCategoryRepresentationUpdateAvailableFactory } from '../types/NetworkDataCategoryRepresentation';
10
9
  export { notifyUpdateAvailableFactory as notifyNetworkDataCategoryTreeRepresentationUpdateAvailableFactory } from '../types/NetworkDataCategoryTreeRepresentation';
@@ -13,7 +13,6 @@ declare let getNetworkDataCategories_imperative: any;
13
13
  declare let getParentNetworkDataCategoryPath_imperative: any;
14
14
  declare let getServiceCatalogItems_imperative: any;
15
15
  declare let getServiceCatalogItemsForCommunity_imperative: any;
16
- declare let notifyNetworkDataCategoryRepresentationUpdateAvailable: any;
17
16
  declare let notifyNetworkDataCategoryTreeRepresentationUpdateAvailable: any;
18
17
  export { getArticlesForCategory, getChildCategories, getNetworkDataCategories, getNetworkDataCategoriesNotifyChange, getParentNetworkDataCategoryPath, getServiceCatalogItems, getServiceCatalogItemsForCommunity, updateNetworkDataCategories, updateNetworkDataCategory, getArticlesForCategory_imperative, getChildCategories_imperative, getNetworkDataCategories_imperative, getParentNetworkDataCategoryPath_imperative, getServiceCatalogItems_imperative, getServiceCatalogItemsForCommunity_imperative, };
19
- export { notifyNetworkDataCategoryRepresentationUpdateAvailable, notifyNetworkDataCategoryTreeRepresentationUpdateAvailable, };
18
+ export { notifyNetworkDataCategoryTreeRepresentationUpdateAvailable };
@@ -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,5 +1,5 @@
1
1
  import { KeyMetadata as $64$luvio_engine_KeyMetadata, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, Luvio as $64$luvio_engine_Luvio, IngestPath as $64$luvio_engine_IngestPath, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap } from '@luvio/engine';
2
- export declare const VERSION = "5eec70c95dc4131fe7e17046563b9235";
2
+ export declare const VERSION = "cddad6e33054c6b9860f0ea60265869e";
3
3
  export declare function validate(obj: any, path?: string): TypeError | null;
4
4
  export declare const RepresentationType: string;
5
5
  export interface KeyParams extends $64$luvio_engine_KeyMetadata {
@@ -27,6 +27,8 @@ export interface NetworkDataCategoryRepresentationNormalized {
27
27
  categoryGroupName?: string | null;
28
28
  /** Network Data Category Name */
29
29
  categoryName: string | null;
30
+ /** Label of the Data Category or Data Category Group */
31
+ categoryOrGroupLabel?: string | null;
30
32
  /** Children of Network Data Category */
31
33
  childCategories: Array<unknown>;
32
34
  /** Network Data Category Description */
@@ -49,6 +51,7 @@ export interface NetworkDataCategoryRepresentationNormalized {
49
51
  export interface NetworkDataCategoryRepresentation {
50
52
  categoryGroupName?: string | null;
51
53
  categoryName: string | null;
54
+ categoryOrGroupLabel?: string | null;
52
55
  childCategories: Array<unknown>;
53
56
  description?: string | null;
54
57
  id: string;
@@ -56,4 +59,3 @@ export interface NetworkDataCategoryRepresentation {
56
59
  label?: string | null;
57
60
  relativeUrl?: string | null;
58
61
  }
59
- export declare const notifyUpdateAvailableFactory: (luvio: $64$luvio_engine_Luvio) => (configs: Partial<KeyParams>[]) => Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-adapters-service-network-data-category",
3
- "version": "1.262.4",
3
+ "version": "1.264.0",
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",
@@ -42,11 +42,11 @@
42
42
  "test:unit": "jest --config=./jest.config.js"
43
43
  },
44
44
  "dependencies": {
45
- "@salesforce/lds-bindings": "^1.262.4"
45
+ "@salesforce/lds-bindings": "^1.264.0"
46
46
  },
47
47
  "devDependencies": {
48
- "@salesforce/lds-compiler-plugins": "^1.262.4",
49
- "@salesforce/lds-karma": "^1.262.4"
48
+ "@salesforce/lds-compiler-plugins": "^1.264.0",
49
+ "@salesforce/lds-karma": "^1.264.0"
50
50
  },
51
51
  "nx": {
52
52
  "targets": {
package/sfdc/index.js CHANGED
@@ -103,7 +103,7 @@ function createLink(ref) {
103
103
  };
104
104
  }
105
105
 
106
- const VERSION$8 = "f3960577caf41d925ed00b2cc2e508e8";
106
+ const VERSION$8 = "1579429bf94d94aa9fe7ba4906607811";
107
107
  function validate$9(obj, path = 'LightningKnowledgeArticleVersionRepresentation') {
108
108
  const v_error = (() => {
109
109
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
@@ -124,10 +124,33 @@ function validate$9(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$g = 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$8(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$8(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
 
@@ -472,7 +504,7 @@ const getArticlesForCategoryAdapterFactory = (luvio) => function NetworkDataCate
472
504
  buildCachedSnapshotCachePolicy$5, buildNetworkSnapshotCachePolicy$5);
473
505
  };
474
506
 
475
- const VERSION$6 = "5eec70c95dc4131fe7e17046563b9235";
507
+ const VERSION$6 = "cddad6e33054c6b9860f0ea60265869e";
476
508
  function validate$7(obj, path = 'NetworkDataCategoryRepresentation') {
477
509
  const v_error = (() => {
478
510
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
@@ -532,6 +564,34 @@ function validate$7(obj, path = 'NetworkDataCategoryRepresentation') {
532
564
  message += '\n' + obj_categoryName_union1.split('\n').map((line) => '\t' + line).join('\n');
533
565
  return new TypeError(message);
534
566
  }
567
+ if (obj.categoryOrGroupLabel !== undefined) {
568
+ const obj_categoryOrGroupLabel = obj.categoryOrGroupLabel;
569
+ const path_categoryOrGroupLabel = path + '.categoryOrGroupLabel';
570
+ let obj_categoryOrGroupLabel_union0 = null;
571
+ const obj_categoryOrGroupLabel_union0_error = (() => {
572
+ if (typeof obj_categoryOrGroupLabel !== 'string') {
573
+ return new TypeError('Expected "string" but received "' + typeof obj_categoryOrGroupLabel + '" (at "' + path_categoryOrGroupLabel + '")');
574
+ }
575
+ })();
576
+ if (obj_categoryOrGroupLabel_union0_error != null) {
577
+ obj_categoryOrGroupLabel_union0 = obj_categoryOrGroupLabel_union0_error.message;
578
+ }
579
+ let obj_categoryOrGroupLabel_union1 = null;
580
+ const obj_categoryOrGroupLabel_union1_error = (() => {
581
+ if (obj_categoryOrGroupLabel !== null) {
582
+ return new TypeError('Expected "null" but received "' + typeof obj_categoryOrGroupLabel + '" (at "' + path_categoryOrGroupLabel + '")');
583
+ }
584
+ })();
585
+ if (obj_categoryOrGroupLabel_union1_error != null) {
586
+ obj_categoryOrGroupLabel_union1 = obj_categoryOrGroupLabel_union1_error.message;
587
+ }
588
+ if (obj_categoryOrGroupLabel_union0 && obj_categoryOrGroupLabel_union1) {
589
+ let message = 'Object doesn\'t match union (at "' + path_categoryOrGroupLabel + '")';
590
+ message += '\n' + obj_categoryOrGroupLabel_union0.split('\n').map((line) => '\t' + line).join('\n');
591
+ message += '\n' + obj_categoryOrGroupLabel_union1.split('\n').map((line) => '\t' + line).join('\n');
592
+ return new TypeError(message);
593
+ }
594
+ }
535
595
  const obj_childCategories = obj.childCategories;
536
596
  const path_childCategories = path + '.childCategories';
537
597
  if (!ArrayIsArray(obj_childCategories)) {
@@ -692,6 +752,11 @@ const select$d = function NetworkDataCategoryRepresentationSelect() {
692
752
  name: 'categoryName',
693
753
  kind: 'Scalar'
694
754
  },
755
+ {
756
+ name: 'categoryOrGroupLabel',
757
+ kind: 'Scalar',
758
+ required: false
759
+ },
695
760
  {
696
761
  name: 'childCategories',
697
762
  kind: 'Object',
@@ -748,6 +813,19 @@ function equals$6(existing, incoming) {
748
813
  if (!(existing_categoryName === incoming_categoryName)) {
749
814
  return false;
750
815
  }
816
+ const existing_categoryOrGroupLabel = existing.categoryOrGroupLabel;
817
+ const incoming_categoryOrGroupLabel = incoming.categoryOrGroupLabel;
818
+ // if at least one of these optionals is defined
819
+ if (existing_categoryOrGroupLabel !== undefined || incoming_categoryOrGroupLabel !== undefined) {
820
+ // if one of these is not defined we know the other is defined and therefore
821
+ // not equal
822
+ if (existing_categoryOrGroupLabel === undefined || incoming_categoryOrGroupLabel === undefined) {
823
+ return false;
824
+ }
825
+ if (!(existing_categoryOrGroupLabel === incoming_categoryOrGroupLabel)) {
826
+ return false;
827
+ }
828
+ }
751
829
  const existing_childCategories = existing.childCategories;
752
830
  const incoming_childCategories = incoming.childCategories;
753
831
  const equals_childCategories_items = equalsArray(existing_childCategories, incoming_childCategories, (existing_childCategories_item, incoming_childCategories_item) => {
@@ -833,20 +911,6 @@ function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
833
911
  mergeable: false
834
912
  });
835
913
  }
836
- const notifyUpdateAvailableFactory$1 = (luvio) => {
837
- return function notifyNetworkDataCategoryRepresentationUpdateAvailable(configs) {
838
- if (process.env.NODE_ENV !== 'production') {
839
- const requiredKeyParams = ['id'];
840
- configs.forEach(config => {
841
- if (false === requiredKeyParams.every(req => req in config)) {
842
- throw new Error(`one of the configs did not contain all required parameters: ${JSONStringify(ObjectKeys(config))}`);
843
- }
844
- });
845
- }
846
- const keys = configs.map(c => keyBuilder$c(luvio, c));
847
- return luvio.notifyStoreUpdateAvailable(keys);
848
- };
849
- };
850
914
 
851
915
  const VERSION$5 = "55e759666b11e19f41045930d9ac0dd6";
852
916
  function validate$6(obj, path = 'NetworkDataCategoryCollectionRepresentation') {
@@ -2432,7 +2496,7 @@ function createResourceRequest(config) {
2432
2496
 
2433
2497
  function buildNetworkSnapshot$1(luvio, config) {
2434
2498
  return buildNetworkSnapshot(luvio, config).then((result) => {
2435
- notifyUpdateAvailableFactory$1(luvio)([{ id: config.networkDataCategoryId }]);
2499
+ notifyUpdateAvailableFactory(luvio)([{ communityId: config.communityId }]);
2436
2500
  return result;
2437
2501
  });
2438
2502
  }
@@ -2532,7 +2596,6 @@ const getServiceCatalogItemsForCommunityMetadata = {
2532
2596
  name: 'getServiceCatalogItemsForCommunity',
2533
2597
  };
2534
2598
  // Notify Update Available
2535
- let notifyNetworkDataCategoryRepresentationUpdateAvailable;
2536
2599
  let notifyNetworkDataCategoryTreeRepresentationUpdateAvailable;
2537
2600
  function bindExportsTo(luvio) {
2538
2601
  // LDS Adapters
@@ -2564,7 +2627,6 @@ function bindExportsTo(luvio) {
2564
2627
  getServiceCatalogItems_imperative: createImperativeAdapter(luvio, getServiceCatalogItems_ldsAdapter, getServiceCatalogItemsMetadata),
2565
2628
  getServiceCatalogItemsForCommunity_imperative: createImperativeAdapter(luvio, getServiceCatalogItemsForCommunity_ldsAdapter, getServiceCatalogItemsForCommunityMetadata),
2566
2629
  // Notify Update Availables
2567
- notifyNetworkDataCategoryRepresentationUpdateAvailable: createLDSAdapter(luvio, 'notifyNetworkDataCategoryRepresentationUpdateAvailable', notifyUpdateAvailableFactory$1),
2568
2630
  notifyNetworkDataCategoryTreeRepresentationUpdateAvailable: createLDSAdapter(luvio, 'notifyNetworkDataCategoryTreeRepresentationUpdateAvailable', notifyUpdateAvailableFactory),
2569
2631
  };
2570
2632
  }
@@ -2585,10 +2647,9 @@ withDefaultLuvio((luvio) => {
2585
2647
  getParentNetworkDataCategoryPath_imperative,
2586
2648
  getServiceCatalogItems_imperative,
2587
2649
  getServiceCatalogItemsForCommunity_imperative,
2588
- notifyNetworkDataCategoryRepresentationUpdateAvailable,
2589
2650
  notifyNetworkDataCategoryTreeRepresentationUpdateAvailable,
2590
2651
  } = bindExportsTo(luvio));
2591
2652
  });
2592
2653
 
2593
- export { getArticlesForCategory, getArticlesForCategory_imperative, getChildCategories, getChildCategories_imperative, getNetworkDataCategories, getNetworkDataCategoriesNotifyChange, getNetworkDataCategories_imperative, getParentNetworkDataCategoryPath, getParentNetworkDataCategoryPath_imperative, getServiceCatalogItems, getServiceCatalogItemsForCommunity, getServiceCatalogItemsForCommunity_imperative, getServiceCatalogItems_imperative, notifyNetworkDataCategoryRepresentationUpdateAvailable, notifyNetworkDataCategoryTreeRepresentationUpdateAvailable, updateNetworkDataCategories, updateNetworkDataCategory };
2594
- // version: 1.262.4-3fd8adfd3
2654
+ export { getArticlesForCategory, getArticlesForCategory_imperative, getChildCategories, getChildCategories_imperative, getNetworkDataCategories, getNetworkDataCategoriesNotifyChange, getNetworkDataCategories_imperative, getParentNetworkDataCategoryPath, getParentNetworkDataCategoryPath_imperative, getServiceCatalogItems, getServiceCatalogItemsForCommunity, getServiceCatalogItemsForCommunity_imperative, getServiceCatalogItems_imperative, notifyNetworkDataCategoryTreeRepresentationUpdateAvailable, updateNetworkDataCategories, updateNetworkDataCategory };
2655
+ // version: 1.264.0-76ebb1758
package/src/raml/api.raml CHANGED
@@ -64,6 +64,10 @@ types:
64
64
  description: Image Url of Network Data Category
65
65
  type: string | nil
66
66
  required: false
67
+ categoryOrGroupLabel:
68
+ description: Label of the Data Category or Data Category Group
69
+ type: string | nil
70
+ required: false
67
71
  label:
68
72
  description: Network Data Category Label
69
73
  type: string | nil
@@ -143,7 +147,8 @@ types:
143
147
  type: string
144
148
  summary:
145
149
  description: Summary of the articles contents.
146
- type: string
150
+ type: string | nil
151
+ required: false
147
152
  title:
148
153
  description: Title of the Article
149
154
  type: string
@@ -21,10 +21,6 @@ types:
21
21
  NetworkDataCategoryRepresentation:
22
22
  (luvio.key):
23
23
  id: id
24
- (luvio.updateAvailable):
25
- name: notifyNetworkDataCategoryRepresentationUpdateAvailable
26
- parameters:
27
- id: id
28
24
 
29
25
  /connect:
30
26
  /network-data-category/{networkDataCategoryId}/catalog-item: