@salesforce/lds-adapters-industries-sales-excellence 1.166.0 → 1.167.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.
@@ -71,7 +71,8 @@ function createLink(ref) {
71
71
  };
72
72
  }
73
73
 
74
- function validate$o(obj, path = 'FilterRepresentation') {
74
+ const VERSION$h = "82e376ee45c9c942c84772c0d8d37493";
75
+ function validate$t(obj, path = 'FilterRepresentation') {
75
76
  const v_error = (() => {
76
77
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
77
78
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -94,8 +95,47 @@ function validate$o(obj, path = 'FilterRepresentation') {
94
95
  })();
95
96
  return v_error === undefined ? null : v_error;
96
97
  }
98
+ const select$p = function FilterRepresentationSelect() {
99
+ return {
100
+ kind: 'Fragment',
101
+ version: VERSION$h,
102
+ private: [],
103
+ selections: [
104
+ {
105
+ name: 'fieldName',
106
+ kind: 'Scalar'
107
+ },
108
+ {
109
+ name: 'operator',
110
+ kind: 'Scalar'
111
+ },
112
+ {
113
+ name: 'value',
114
+ kind: 'Scalar'
115
+ }
116
+ ]
117
+ };
118
+ };
119
+ function equals$h(existing, incoming) {
120
+ const existing_fieldName = existing.fieldName;
121
+ const incoming_fieldName = incoming.fieldName;
122
+ if (!(existing_fieldName === incoming_fieldName)) {
123
+ return false;
124
+ }
125
+ const existing_operator = existing.operator;
126
+ const incoming_operator = incoming.operator;
127
+ if (!(existing_operator === incoming_operator)) {
128
+ return false;
129
+ }
130
+ const existing_value = existing.value;
131
+ const incoming_value = incoming.value;
132
+ if (!(existing_value === incoming_value)) {
133
+ return false;
134
+ }
135
+ return true;
136
+ }
97
137
 
98
- function validate$n(obj, path = 'FilterRepresentationList') {
138
+ function validate$s(obj, path = 'FilterRepresentationList') {
99
139
  const v_error = (() => {
100
140
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
101
141
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -108,7 +148,7 @@ function validate$n(obj, path = 'FilterRepresentationList') {
108
148
  for (let i = 0; i < obj_filterList.length; i++) {
109
149
  const obj_filterList_item = obj_filterList[i];
110
150
  const path_filterList_item = path_filterList + '[' + i + ']';
111
- const referencepath_filterList_itemValidationError = validate$o(obj_filterList_item, path_filterList_item);
151
+ const referencepath_filterList_itemValidationError = validate$t(obj_filterList_item, path_filterList_item);
112
152
  if (referencepath_filterList_itemValidationError !== null) {
113
153
  let message = 'Object doesn\'t match FilterRepresentation (at "' + path_filterList_item + '")\n';
114
154
  message += referencepath_filterList_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -119,7 +159,7 @@ function validate$n(obj, path = 'FilterRepresentationList') {
119
159
  return v_error === undefined ? null : v_error;
120
160
  }
121
161
 
122
- function validate$m(obj, path = 'OrderByRepresentation') {
162
+ function validate$r(obj, path = 'OrderByRepresentation') {
123
163
  const v_error = (() => {
124
164
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
125
165
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -143,7 +183,7 @@ function validate$m(obj, path = 'OrderByRepresentation') {
143
183
  return v_error === undefined ? null : v_error;
144
184
  }
145
185
 
146
- function validate$l(obj, path = 'OrderByRepresentationList') {
186
+ function validate$q(obj, path = 'OrderByRepresentationList') {
147
187
  const v_error = (() => {
148
188
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
149
189
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -156,7 +196,7 @@ function validate$l(obj, path = 'OrderByRepresentationList') {
156
196
  for (let i = 0; i < obj_orderByList.length; i++) {
157
197
  const obj_orderByList_item = obj_orderByList[i];
158
198
  const path_orderByList_item = path_orderByList + '[' + i + ']';
159
- const referencepath_orderByList_itemValidationError = validate$m(obj_orderByList_item, path_orderByList_item);
199
+ const referencepath_orderByList_itemValidationError = validate$r(obj_orderByList_item, path_orderByList_item);
160
200
  if (referencepath_orderByList_itemValidationError !== null) {
161
201
  let message = 'Object doesn\'t match OrderByRepresentation (at "' + path_orderByList_item + '")\n';
162
202
  message += referencepath_orderByList_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -167,7 +207,7 @@ function validate$l(obj, path = 'OrderByRepresentationList') {
167
207
  return v_error === undefined ? null : v_error;
168
208
  }
169
209
 
170
- function validate$k(obj, path = 'SearchActionableListMemberInputRepresentation') {
210
+ function validate$p(obj, path = 'SearchActionableListMemberInputRepresentation') {
171
211
  const v_error = (() => {
172
212
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
173
213
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -182,7 +222,7 @@ function validate$k(obj, path = 'SearchActionableListMemberInputRepresentation')
182
222
  if (obj.filters !== undefined) {
183
223
  const obj_filters = obj.filters;
184
224
  const path_filters = path + '.filters';
185
- const referencepath_filtersValidationError = validate$n(obj_filters, path_filters);
225
+ const referencepath_filtersValidationError = validate$s(obj_filters, path_filters);
186
226
  if (referencepath_filtersValidationError !== null) {
187
227
  let message = 'Object doesn\'t match FilterRepresentationList (at "' + path_filters + '")\n';
188
228
  message += referencepath_filtersValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -192,7 +232,7 @@ function validate$k(obj, path = 'SearchActionableListMemberInputRepresentation')
192
232
  if (obj.orderBy !== undefined) {
193
233
  const obj_orderBy = obj.orderBy;
194
234
  const path_orderBy = path + '.orderBy';
195
- const referencepath_orderByValidationError = validate$l(obj_orderBy, path_orderBy);
235
+ const referencepath_orderByValidationError = validate$q(obj_orderBy, path_orderBy);
196
236
  if (referencepath_orderByValidationError !== null) {
197
237
  let message = 'Object doesn\'t match OrderByRepresentationList (at "' + path_orderBy + '")\n';
198
238
  message += referencepath_orderByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -222,8 +262,8 @@ function validate$k(obj, path = 'SearchActionableListMemberInputRepresentation')
222
262
  return v_error === undefined ? null : v_error;
223
263
  }
224
264
 
225
- const VERSION$c = "8bbb1e612594aee03c6db706d33ed5d0";
226
- function validate$j(obj, path = 'ActionRepresentation') {
265
+ const VERSION$g = "8bbb1e612594aee03c6db706d33ed5d0";
266
+ function validate$o(obj, path = 'ActionRepresentation') {
227
267
  const v_error = (() => {
228
268
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
229
269
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -259,10 +299,10 @@ function validate$j(obj, path = 'ActionRepresentation') {
259
299
  })();
260
300
  return v_error === undefined ? null : v_error;
261
301
  }
262
- const select$j = function ActionRepresentationSelect() {
302
+ const select$o = function ActionRepresentationSelect() {
263
303
  return {
264
304
  kind: 'Fragment',
265
- version: VERSION$c,
305
+ version: VERSION$g,
266
306
  private: [],
267
307
  selections: [
268
308
  {
@@ -288,7 +328,7 @@ const select$j = function ActionRepresentationSelect() {
288
328
  ]
289
329
  };
290
330
  };
291
- function equals$c(existing, incoming) {
331
+ function equals$g(existing, incoming) {
292
332
  const existing_isAlmAction = existing.isAlmAction;
293
333
  const incoming_isAlmAction = incoming.isAlmAction;
294
334
  // if at least one of these optionals is defined
@@ -344,9 +384,9 @@ function equals$c(existing, incoming) {
344
384
  return true;
345
385
  }
346
386
 
347
- const TTL$5 = 300;
348
- const VERSION$b = "0abc226dbd330381cd88712969af8417";
349
- function validate$i(obj, path = 'SearchActionableListMemberRepresentation') {
387
+ const TTL$6 = 300;
388
+ const VERSION$f = "0abc226dbd330381cd88712969af8417";
389
+ function validate$n(obj, path = 'SearchActionableListMemberRepresentation') {
350
390
  const v_error = (() => {
351
391
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
352
392
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -360,7 +400,7 @@ function validate$i(obj, path = 'SearchActionableListMemberRepresentation') {
360
400
  for (let i = 0; i < obj_actions.length; i++) {
361
401
  const obj_actions_item = obj_actions[i];
362
402
  const path_actions_item = path_actions + '[' + i + ']';
363
- const referencepath_actions_itemValidationError = validate$j(obj_actions_item, path_actions_item);
403
+ const referencepath_actions_itemValidationError = validate$o(obj_actions_item, path_actions_item);
364
404
  if (referencepath_actions_itemValidationError !== null) {
365
405
  let message = 'Object doesn\'t match ActionRepresentation (at "' + path_actions_item + '")\n';
366
406
  message += referencepath_actions_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -400,24 +440,24 @@ function validate$i(obj, path = 'SearchActionableListMemberRepresentation') {
400
440
  })();
401
441
  return v_error === undefined ? null : v_error;
402
442
  }
403
- const RepresentationType$5 = 'SearchActionableListMemberRepresentation';
404
- function keyBuilder$8(luvio, config) {
405
- return keyPrefix + '::' + RepresentationType$5 + ':' + config.nextPageToken;
443
+ const RepresentationType$6 = 'SearchActionableListMemberRepresentation';
444
+ function keyBuilder$9(luvio, config) {
445
+ return keyPrefix + '::' + RepresentationType$6 + ':' + config.nextPageToken;
406
446
  }
407
- function keyBuilderFromType$2(luvio, object) {
447
+ function keyBuilderFromType$3(luvio, object) {
408
448
  const keyParams = {
409
449
  nextPageToken: object.nextPageToken
410
450
  };
411
- return keyBuilder$8(luvio, keyParams);
451
+ return keyBuilder$9(luvio, keyParams);
412
452
  }
413
- function normalize$5(input, existing, path, luvio, store, timestamp) {
453
+ function normalize$6(input, existing, path, luvio, store, timestamp) {
414
454
  return input;
415
455
  }
416
- const select$i = function SearchActionableListMemberRepresentationSelect() {
417
- const { selections: ActionRepresentation__selections, opaque: ActionRepresentation__opaque, } = select$j();
456
+ const select$n = function SearchActionableListMemberRepresentationSelect() {
457
+ const { selections: ActionRepresentation__selections, opaque: ActionRepresentation__opaque, } = select$o();
418
458
  return {
419
459
  kind: 'Fragment',
420
- version: VERSION$b,
460
+ version: VERSION$f,
421
461
  private: [],
422
462
  selections: [
423
463
  {
@@ -444,7 +484,7 @@ const select$i = function SearchActionableListMemberRepresentationSelect() {
444
484
  ]
445
485
  };
446
486
  };
447
- function equals$b(existing, incoming) {
487
+ function equals$f(existing, incoming) {
448
488
  const existing_nextPageToken = existing.nextPageToken;
449
489
  const incoming_nextPageToken = incoming.nextPageToken;
450
490
  if (!(existing_nextPageToken === incoming_nextPageToken)) {
@@ -460,7 +500,7 @@ function equals$b(existing, incoming) {
460
500
  return false;
461
501
  }
462
502
  const equals_actions_items = equalsArray(existing_actions, incoming_actions, (existing_actions_item, incoming_actions_item) => {
463
- if (!(equals$c(existing_actions_item, incoming_actions_item))) {
503
+ if (!(equals$g(existing_actions_item, incoming_actions_item))) {
464
504
  return false;
465
505
  }
466
506
  });
@@ -490,61 +530,61 @@ function equals$b(existing, incoming) {
490
530
  }
491
531
  return true;
492
532
  }
493
- const ingest$5 = function SearchActionableListMemberRepresentationIngest(input, path, luvio, store, timestamp) {
533
+ const ingest$6 = function SearchActionableListMemberRepresentationIngest(input, path, luvio, store, timestamp) {
494
534
  if (process.env.NODE_ENV !== 'production') {
495
- const validateError = validate$i(input);
535
+ const validateError = validate$n(input);
496
536
  if (validateError !== null) {
497
537
  throw validateError;
498
538
  }
499
539
  }
500
- const key = keyBuilderFromType$2(luvio, input);
540
+ const key = keyBuilderFromType$3(luvio, input);
501
541
  const existingRecord = store.readEntry(key);
502
- const ttlToUse = TTL$5;
503
- let incomingRecord = normalize$5(input, store.readEntry(key), {
542
+ const ttlToUse = TTL$6;
543
+ let incomingRecord = normalize$6(input, store.readEntry(key), {
504
544
  fullPath: key,
505
545
  parent: path.parent,
506
546
  propertyName: path.propertyName,
507
547
  ttl: ttlToUse
508
548
  });
509
- if (existingRecord === undefined || equals$b(existingRecord, incomingRecord) === false) {
549
+ if (existingRecord === undefined || equals$f(existingRecord, incomingRecord) === false) {
510
550
  luvio.storePublish(key, incomingRecord);
511
551
  }
512
552
  {
513
553
  const storeMetadataParams = {
514
554
  ttl: ttlToUse,
515
555
  namespace: "sales-excellence",
516
- version: VERSION$b,
517
- representationName: RepresentationType$5,
556
+ version: VERSION$f,
557
+ representationName: RepresentationType$6,
518
558
  };
519
559
  luvio.publishStoreMetadata(key, storeMetadataParams);
520
560
  }
521
561
  return createLink(key);
522
562
  };
523
- function getTypeCacheKeys$5(luvio, input, fullPathFactory) {
563
+ function getTypeCacheKeys$6(luvio, input, fullPathFactory) {
524
564
  const rootKeySet = new StoreKeyMap();
525
565
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
526
- const rootKey = keyBuilderFromType$2(luvio, input);
566
+ const rootKey = keyBuilderFromType$3(luvio, input);
527
567
  rootKeySet.set(rootKey, {
528
568
  namespace: keyPrefix,
529
- representationName: RepresentationType$5,
569
+ representationName: RepresentationType$6,
530
570
  mergeable: false
531
571
  });
532
572
  return rootKeySet;
533
573
  }
534
574
 
535
- function select$h(luvio, params) {
536
- return select$i();
575
+ function select$m(luvio, params) {
576
+ return select$n();
537
577
  }
538
- function getResponseCacheKeys$6(luvio, resourceParams, response) {
539
- return getTypeCacheKeys$5(luvio, response);
578
+ function getResponseCacheKeys$7(luvio, resourceParams, response) {
579
+ return getTypeCacheKeys$6(luvio, response);
540
580
  }
541
- function ingestSuccess$6(luvio, resourceParams, response) {
581
+ function ingestSuccess$7(luvio, resourceParams, response) {
542
582
  const { body } = response;
543
- const key = keyBuilderFromType$2(luvio, body);
544
- luvio.storeIngest(key, ingest$5, body);
583
+ const key = keyBuilderFromType$3(luvio, body);
584
+ luvio.storeIngest(key, ingest$6, body);
545
585
  const snapshot = luvio.storeLookup({
546
586
  recordId: key,
547
- node: select$h(),
587
+ node: select$m(),
548
588
  variables: {},
549
589
  });
550
590
  if (process.env.NODE_ENV !== 'production') {
@@ -555,7 +595,7 @@ function ingestSuccess$6(luvio, resourceParams, response) {
555
595
  deepFreeze(snapshot.data);
556
596
  return snapshot;
557
597
  }
558
- function createResourceRequest$6(config) {
598
+ function createResourceRequest$7(config) {
559
599
  const headers = {};
560
600
  return {
561
601
  baseUri: '/services/data/v59.0',
@@ -576,7 +616,7 @@ const actionableListMemberSearch_ConfigPropertyNames = {
576
616
  optional: []
577
617
  }
578
618
  };
579
- function createResourceParams$6(config) {
619
+ function createResourceParams$7(config) {
580
620
  const resourceParams = {
581
621
  body: {
582
622
  actionableListMemberSearchInput: config.actionableListMemberSearchInput
@@ -584,37 +624,37 @@ function createResourceParams$6(config) {
584
624
  };
585
625
  return resourceParams;
586
626
  }
587
- function typeCheckConfig$6(untrustedConfig) {
627
+ function typeCheckConfig$7(untrustedConfig) {
588
628
  const config = {};
589
629
  const untrustedConfig_actionableListMemberSearchInput = untrustedConfig.actionableListMemberSearchInput;
590
- const referenceSearchActionableListMemberInputRepresentationValidationError = validate$k(untrustedConfig_actionableListMemberSearchInput);
630
+ const referenceSearchActionableListMemberInputRepresentationValidationError = validate$p(untrustedConfig_actionableListMemberSearchInput);
591
631
  if (referenceSearchActionableListMemberInputRepresentationValidationError === null) {
592
632
  config.actionableListMemberSearchInput = untrustedConfig_actionableListMemberSearchInput;
593
633
  }
594
634
  return config;
595
635
  }
596
- function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
636
+ function validateAdapterConfig$7(untrustedConfig, configPropertyNames) {
597
637
  if (!untrustedIsObject(untrustedConfig)) {
598
638
  return null;
599
639
  }
600
640
  if (process.env.NODE_ENV !== 'production') {
601
641
  validateConfig(untrustedConfig, configPropertyNames);
602
642
  }
603
- const config = typeCheckConfig$6(untrustedConfig);
643
+ const config = typeCheckConfig$7(untrustedConfig);
604
644
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
605
645
  return null;
606
646
  }
607
647
  return config;
608
648
  }
609
- function buildNetworkSnapshot$6(luvio, config, options) {
610
- const resourceParams = createResourceParams$6(config);
611
- const request = createResourceRequest$6(resourceParams);
649
+ function buildNetworkSnapshot$7(luvio, config, options) {
650
+ const resourceParams = createResourceParams$7(config);
651
+ const request = createResourceRequest$7(resourceParams);
612
652
  return luvio.dispatchResourceRequest(request, options)
613
653
  .then((response) => {
614
654
  return luvio.handleSuccessResponse(() => {
615
- const snapshot = ingestSuccess$6(luvio, resourceParams, response);
655
+ const snapshot = ingestSuccess$7(luvio, resourceParams, response);
616
656
  return luvio.storeBroadcast().then(() => snapshot);
617
- }, () => getResponseCacheKeys$6(luvio, resourceParams, response.body));
657
+ }, () => getResponseCacheKeys$7(luvio, resourceParams, response.body));
618
658
  }, (response) => {
619
659
  deepFreeze(response);
620
660
  throw response;
@@ -622,28 +662,28 @@ function buildNetworkSnapshot$6(luvio, config, options) {
622
662
  }
623
663
  const actionableListMemberSearchAdapterFactory = (luvio) => {
624
664
  return function actionableListMemberSearch(untrustedConfig) {
625
- const config = validateAdapterConfig$6(untrustedConfig, actionableListMemberSearch_ConfigPropertyNames);
665
+ const config = validateAdapterConfig$7(untrustedConfig, actionableListMemberSearch_ConfigPropertyNames);
626
666
  // Invalid or incomplete config
627
667
  if (config === null) {
628
668
  throw new Error('Invalid config for "actionableListMemberSearch"');
629
669
  }
630
- return buildNetworkSnapshot$6(luvio, config);
670
+ return buildNetworkSnapshot$7(luvio, config);
631
671
  };
632
672
  };
633
673
 
634
- function select$g(luvio, params) {
635
- return select$i();
674
+ function select$l(luvio, params) {
675
+ return select$n();
636
676
  }
637
- function getResponseCacheKeys$5(luvio, resourceParams, response) {
638
- return getTypeCacheKeys$5(luvio, response);
677
+ function getResponseCacheKeys$6(luvio, resourceParams, response) {
678
+ return getTypeCacheKeys$6(luvio, response);
639
679
  }
640
- function ingestSuccess$5(luvio, resourceParams, response) {
680
+ function ingestSuccess$6(luvio, resourceParams, response) {
641
681
  const { body } = response;
642
- const key = keyBuilderFromType$2(luvio, body);
643
- luvio.storeIngest(key, ingest$5, body);
682
+ const key = keyBuilderFromType$3(luvio, body);
683
+ luvio.storeIngest(key, ingest$6, body);
644
684
  const snapshot = luvio.storeLookup({
645
685
  recordId: key,
646
- node: select$g(),
686
+ node: select$l(),
647
687
  variables: {},
648
688
  });
649
689
  if (process.env.NODE_ENV !== 'production') {
@@ -654,7 +694,7 @@ function ingestSuccess$5(luvio, resourceParams, response) {
654
694
  deepFreeze(snapshot.data);
655
695
  return snapshot;
656
696
  }
657
- function createResourceRequest$5(config) {
697
+ function createResourceRequest$6(config) {
658
698
  const headers = {};
659
699
  return {
660
700
  baseUri: '/services/data/v59.0',
@@ -675,7 +715,7 @@ const actionableListMemberSearchById_ConfigPropertyNames = {
675
715
  optional: []
676
716
  }
677
717
  };
678
- function createResourceParams$5(config) {
718
+ function createResourceParams$6(config) {
679
719
  const resourceParams = {
680
720
  urlParams: {
681
721
  actionableListId: config.actionableListId
@@ -686,41 +726,41 @@ function createResourceParams$5(config) {
686
726
  };
687
727
  return resourceParams;
688
728
  }
689
- function typeCheckConfig$5(untrustedConfig) {
729
+ function typeCheckConfig$6(untrustedConfig) {
690
730
  const config = {};
691
731
  const untrustedConfig_actionableListId = untrustedConfig.actionableListId;
692
732
  if (typeof untrustedConfig_actionableListId === 'string') {
693
733
  config.actionableListId = untrustedConfig_actionableListId;
694
734
  }
695
735
  const untrustedConfig_actionableListMemberSearchInput = untrustedConfig.actionableListMemberSearchInput;
696
- const referenceSearchActionableListMemberInputRepresentationValidationError = validate$k(untrustedConfig_actionableListMemberSearchInput);
736
+ const referenceSearchActionableListMemberInputRepresentationValidationError = validate$p(untrustedConfig_actionableListMemberSearchInput);
697
737
  if (referenceSearchActionableListMemberInputRepresentationValidationError === null) {
698
738
  config.actionableListMemberSearchInput = untrustedConfig_actionableListMemberSearchInput;
699
739
  }
700
740
  return config;
701
741
  }
702
- function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
742
+ function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
703
743
  if (!untrustedIsObject(untrustedConfig)) {
704
744
  return null;
705
745
  }
706
746
  if (process.env.NODE_ENV !== 'production') {
707
747
  validateConfig(untrustedConfig, configPropertyNames);
708
748
  }
709
- const config = typeCheckConfig$5(untrustedConfig);
749
+ const config = typeCheckConfig$6(untrustedConfig);
710
750
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
711
751
  return null;
712
752
  }
713
753
  return config;
714
754
  }
715
- function buildNetworkSnapshot$5(luvio, config, options) {
716
- const resourceParams = createResourceParams$5(config);
717
- const request = createResourceRequest$5(resourceParams);
755
+ function buildNetworkSnapshot$6(luvio, config, options) {
756
+ const resourceParams = createResourceParams$6(config);
757
+ const request = createResourceRequest$6(resourceParams);
718
758
  return luvio.dispatchResourceRequest(request, options)
719
759
  .then((response) => {
720
760
  return luvio.handleSuccessResponse(() => {
721
- const snapshot = ingestSuccess$5(luvio, resourceParams, response);
761
+ const snapshot = ingestSuccess$6(luvio, resourceParams, response);
722
762
  return luvio.storeBroadcast().then(() => snapshot);
723
- }, () => getResponseCacheKeys$5(luvio, resourceParams, response.body));
763
+ }, () => getResponseCacheKeys$6(luvio, resourceParams, response.body));
724
764
  }, (response) => {
725
765
  deepFreeze(response);
726
766
  throw response;
@@ -728,16 +768,16 @@ function buildNetworkSnapshot$5(luvio, config, options) {
728
768
  }
729
769
  const actionableListMemberSearchByIdAdapterFactory = (luvio) => {
730
770
  return function actionableListMemberSearchById(untrustedConfig) {
731
- const config = validateAdapterConfig$5(untrustedConfig, actionableListMemberSearchById_ConfigPropertyNames);
771
+ const config = validateAdapterConfig$6(untrustedConfig, actionableListMemberSearchById_ConfigPropertyNames);
732
772
  // Invalid or incomplete config
733
773
  if (config === null) {
734
774
  throw new Error('Invalid config for "actionableListMemberSearchById"');
735
775
  }
736
- return buildNetworkSnapshot$5(luvio, config);
776
+ return buildNetworkSnapshot$6(luvio, config);
737
777
  };
738
778
  };
739
779
 
740
- function validate$h(obj, path = 'ActionableListFieldsInputRepresentation') {
780
+ function validate$m(obj, path = 'ActionableListFieldsInputRepresentation') {
741
781
  const v_error = (() => {
742
782
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
743
783
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -779,7 +819,7 @@ function validate$h(obj, path = 'ActionableListFieldsInputRepresentation') {
779
819
  return v_error === undefined ? null : v_error;
780
820
  }
781
821
 
782
- function validate$g(obj, path = 'AssigneeInputRepresentation') {
822
+ function validate$l(obj, path = 'AssigneeInputRepresentation') {
783
823
  const v_error = (() => {
784
824
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
785
825
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -798,14 +838,14 @@ function validate$g(obj, path = 'AssigneeInputRepresentation') {
798
838
  return v_error === undefined ? null : v_error;
799
839
  }
800
840
 
801
- function validate$f(obj, path = 'ActionableListMemberFieldsInputRepresentation') {
841
+ function validate$k(obj, path = 'ActionableListMemberFieldsInputRepresentation') {
802
842
  const v_error = (() => {
803
843
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
804
844
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
805
845
  }
806
846
  const obj_assignee = obj.assignee;
807
847
  const path_assignee = path + '.assignee';
808
- const referencepath_assigneeValidationError = validate$g(obj_assignee, path_assignee);
848
+ const referencepath_assigneeValidationError = validate$l(obj_assignee, path_assignee);
809
849
  if (referencepath_assigneeValidationError !== null) {
810
850
  let message = 'Object doesn\'t match AssigneeInputRepresentation (at "' + path_assignee + '")\n';
811
851
  message += referencepath_assigneeValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -815,14 +855,14 @@ function validate$f(obj, path = 'ActionableListMemberFieldsInputRepresentation')
815
855
  return v_error === undefined ? null : v_error;
816
856
  }
817
857
 
818
- function validate$e(obj, path = 'AssignActionableListInputRepresentation') {
858
+ function validate$j(obj, path = 'AssignActionableListInputRepresentation') {
819
859
  const v_error = (() => {
820
860
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
821
861
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
822
862
  }
823
863
  const obj_actionableListFields = obj.actionableListFields;
824
864
  const path_actionableListFields = path + '.actionableListFields';
825
- const referencepath_actionableListFieldsValidationError = validate$h(obj_actionableListFields, path_actionableListFields);
865
+ const referencepath_actionableListFieldsValidationError = validate$m(obj_actionableListFields, path_actionableListFields);
826
866
  if (referencepath_actionableListFieldsValidationError !== null) {
827
867
  let message = 'Object doesn\'t match ActionableListFieldsInputRepresentation (at "' + path_actionableListFields + '")\n';
828
868
  message += referencepath_actionableListFieldsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -830,7 +870,7 @@ function validate$e(obj, path = 'AssignActionableListInputRepresentation') {
830
870
  }
831
871
  const obj_actionableListMemberFields = obj.actionableListMemberFields;
832
872
  const path_actionableListMemberFields = path + '.actionableListMemberFields';
833
- const referencepath_actionableListMemberFieldsValidationError = validate$f(obj_actionableListMemberFields, path_actionableListMemberFields);
873
+ const referencepath_actionableListMemberFieldsValidationError = validate$k(obj_actionableListMemberFields, path_actionableListMemberFields);
834
874
  if (referencepath_actionableListMemberFieldsValidationError !== null) {
835
875
  let message = 'Object doesn\'t match ActionableListMemberFieldsInputRepresentation (at "' + path_actionableListMemberFields + '")\n';
836
876
  message += referencepath_actionableListMemberFieldsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -854,8 +894,8 @@ function validate$e(obj, path = 'AssignActionableListInputRepresentation') {
854
894
  return v_error === undefined ? null : v_error;
855
895
  }
856
896
 
857
- const VERSION$a = "c9b9be79dac59b38a528222283da782d";
858
- function validate$d(obj, path = 'SalesExcellenceStatusRepresentation') {
897
+ const VERSION$e = "c9b9be79dac59b38a528222283da782d";
898
+ function validate$i(obj, path = 'SalesExcellenceStatusRepresentation') {
859
899
  const v_error = (() => {
860
900
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
861
901
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -873,10 +913,10 @@ function validate$d(obj, path = 'SalesExcellenceStatusRepresentation') {
873
913
  })();
874
914
  return v_error === undefined ? null : v_error;
875
915
  }
876
- const select$f = function SalesExcellenceStatusRepresentationSelect() {
916
+ const select$k = function SalesExcellenceStatusRepresentationSelect() {
877
917
  return {
878
918
  kind: 'Fragment',
879
- version: VERSION$a,
919
+ version: VERSION$e,
880
920
  private: [],
881
921
  selections: [
882
922
  {
@@ -890,7 +930,7 @@ const select$f = function SalesExcellenceStatusRepresentationSelect() {
890
930
  ]
891
931
  };
892
932
  };
893
- function equals$a(existing, incoming) {
933
+ function equals$e(existing, incoming) {
894
934
  const existing_code = existing.code;
895
935
  const incoming_code = incoming.code;
896
936
  if (!(existing_code === incoming_code)) {
@@ -904,9 +944,9 @@ function equals$a(existing, incoming) {
904
944
  return true;
905
945
  }
906
946
 
907
- const TTL$4 = 300;
908
- const VERSION$9 = "15d1cf786c4441e62012f571d16954c0";
909
- function validate$c(obj, path = 'AssignActionableListRepresentation') {
947
+ const TTL$5 = 300;
948
+ const VERSION$d = "15d1cf786c4441e62012f571d16954c0";
949
+ function validate$h(obj, path = 'AssignActionableListRepresentation') {
910
950
  const v_error = (() => {
911
951
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
912
952
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -918,7 +958,7 @@ function validate$c(obj, path = 'AssignActionableListRepresentation') {
918
958
  }
919
959
  const obj_status = obj.status;
920
960
  const path_status = path + '.status';
921
- const referencepath_statusValidationError = validate$d(obj_status, path_status);
961
+ const referencepath_statusValidationError = validate$i(obj_status, path_status);
922
962
  if (referencepath_statusValidationError !== null) {
923
963
  let message = 'Object doesn\'t match SalesExcellenceStatusRepresentation (at "' + path_status + '")\n';
924
964
  message += referencepath_statusValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -927,24 +967,24 @@ function validate$c(obj, path = 'AssignActionableListRepresentation') {
927
967
  })();
928
968
  return v_error === undefined ? null : v_error;
929
969
  }
930
- const RepresentationType$4 = 'AssignActionableListRepresentation';
931
- function keyBuilder$7(luvio, config) {
932
- return keyPrefix + '::' + RepresentationType$4 + ':' + config.actionableListId;
970
+ const RepresentationType$5 = 'AssignActionableListRepresentation';
971
+ function keyBuilder$8(luvio, config) {
972
+ return keyPrefix + '::' + RepresentationType$5 + ':' + config.actionableListId;
933
973
  }
934
- function keyBuilderFromType$1(luvio, object) {
974
+ function keyBuilderFromType$2(luvio, object) {
935
975
  const keyParams = {
936
976
  actionableListId: object.actionableListId
937
977
  };
938
- return keyBuilder$7(luvio, keyParams);
978
+ return keyBuilder$8(luvio, keyParams);
939
979
  }
940
- function normalize$4(input, existing, path, luvio, store, timestamp) {
980
+ function normalize$5(input, existing, path, luvio, store, timestamp) {
941
981
  return input;
942
982
  }
943
- const select$e = function AssignActionableListRepresentationSelect() {
944
- const { selections: SalesExcellenceStatusRepresentation__selections, opaque: SalesExcellenceStatusRepresentation__opaque, } = select$f();
983
+ const select$j = function AssignActionableListRepresentationSelect() {
984
+ const { selections: SalesExcellenceStatusRepresentation__selections, opaque: SalesExcellenceStatusRepresentation__opaque, } = select$k();
945
985
  return {
946
986
  kind: 'Fragment',
947
- version: VERSION$9,
987
+ version: VERSION$d,
948
988
  private: [],
949
989
  selections: [
950
990
  {
@@ -959,7 +999,7 @@ const select$e = function AssignActionableListRepresentationSelect() {
959
999
  ]
960
1000
  };
961
1001
  };
962
- function equals$9(existing, incoming) {
1002
+ function equals$d(existing, incoming) {
963
1003
  const existing_actionableListId = existing.actionableListId;
964
1004
  const incoming_actionableListId = incoming.actionableListId;
965
1005
  if (!(existing_actionableListId === incoming_actionableListId)) {
@@ -967,12 +1007,502 @@ function equals$9(existing, incoming) {
967
1007
  }
968
1008
  const existing_status = existing.status;
969
1009
  const incoming_status = incoming.status;
1010
+ if (!(equals$e(existing_status, incoming_status))) {
1011
+ return false;
1012
+ }
1013
+ return true;
1014
+ }
1015
+ const ingest$5 = function AssignActionableListRepresentationIngest(input, path, luvio, store, timestamp) {
1016
+ if (process.env.NODE_ENV !== 'production') {
1017
+ const validateError = validate$h(input);
1018
+ if (validateError !== null) {
1019
+ throw validateError;
1020
+ }
1021
+ }
1022
+ const key = keyBuilderFromType$2(luvio, input);
1023
+ const existingRecord = store.readEntry(key);
1024
+ const ttlToUse = TTL$5;
1025
+ let incomingRecord = normalize$5(input, store.readEntry(key), {
1026
+ fullPath: key,
1027
+ parent: path.parent,
1028
+ propertyName: path.propertyName,
1029
+ ttl: ttlToUse
1030
+ });
1031
+ if (existingRecord === undefined || equals$d(existingRecord, incomingRecord) === false) {
1032
+ luvio.storePublish(key, incomingRecord);
1033
+ }
1034
+ {
1035
+ const storeMetadataParams = {
1036
+ ttl: ttlToUse,
1037
+ namespace: "sales-excellence",
1038
+ version: VERSION$d,
1039
+ representationName: RepresentationType$5,
1040
+ };
1041
+ luvio.publishStoreMetadata(key, storeMetadataParams);
1042
+ }
1043
+ return createLink(key);
1044
+ };
1045
+ function getTypeCacheKeys$5(luvio, input, fullPathFactory) {
1046
+ const rootKeySet = new StoreKeyMap();
1047
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1048
+ const rootKey = keyBuilderFromType$2(luvio, input);
1049
+ rootKeySet.set(rootKey, {
1050
+ namespace: keyPrefix,
1051
+ representationName: RepresentationType$5,
1052
+ mergeable: false
1053
+ });
1054
+ return rootKeySet;
1055
+ }
1056
+
1057
+ function select$i(luvio, params) {
1058
+ return select$j();
1059
+ }
1060
+ function getResponseCacheKeys$5(luvio, resourceParams, response) {
1061
+ return getTypeCacheKeys$5(luvio, response);
1062
+ }
1063
+ function ingestSuccess$5(luvio, resourceParams, response) {
1064
+ const { body } = response;
1065
+ const key = keyBuilderFromType$2(luvio, body);
1066
+ luvio.storeIngest(key, ingest$5, body);
1067
+ const snapshot = luvio.storeLookup({
1068
+ recordId: key,
1069
+ node: select$i(),
1070
+ variables: {},
1071
+ });
1072
+ if (process.env.NODE_ENV !== 'production') {
1073
+ if (snapshot.state !== 'Fulfilled') {
1074
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1075
+ }
1076
+ }
1077
+ deepFreeze(snapshot.data);
1078
+ return snapshot;
1079
+ }
1080
+ function createResourceRequest$5(config) {
1081
+ const headers = {};
1082
+ return {
1083
+ baseUri: '/services/data/v59.0',
1084
+ basePath: '/connect/sales-excellence/actionable-list/assignment/' + config.urlParams.actionableListId + '',
1085
+ method: 'post',
1086
+ body: config.body,
1087
+ urlParams: config.urlParams,
1088
+ queryParams: {},
1089
+ headers,
1090
+ priority: 'normal',
1091
+ };
1092
+ }
1093
+
1094
+ const actionableListAssignment_ConfigPropertyNames = {
1095
+ displayName: 'actionableListAssignment',
1096
+ parameters: {
1097
+ required: ['actionableListId', 'assignActionableList'],
1098
+ optional: []
1099
+ }
1100
+ };
1101
+ function createResourceParams$5(config) {
1102
+ const resourceParams = {
1103
+ urlParams: {
1104
+ actionableListId: config.actionableListId
1105
+ },
1106
+ body: {
1107
+ assignActionableList: config.assignActionableList
1108
+ }
1109
+ };
1110
+ return resourceParams;
1111
+ }
1112
+ function typeCheckConfig$5(untrustedConfig) {
1113
+ const config = {};
1114
+ const untrustedConfig_actionableListId = untrustedConfig.actionableListId;
1115
+ if (typeof untrustedConfig_actionableListId === 'string') {
1116
+ config.actionableListId = untrustedConfig_actionableListId;
1117
+ }
1118
+ const untrustedConfig_assignActionableList = untrustedConfig.assignActionableList;
1119
+ const referenceAssignActionableListInputRepresentationValidationError = validate$j(untrustedConfig_assignActionableList);
1120
+ if (referenceAssignActionableListInputRepresentationValidationError === null) {
1121
+ config.assignActionableList = untrustedConfig_assignActionableList;
1122
+ }
1123
+ return config;
1124
+ }
1125
+ function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
1126
+ if (!untrustedIsObject(untrustedConfig)) {
1127
+ return null;
1128
+ }
1129
+ if (process.env.NODE_ENV !== 'production') {
1130
+ validateConfig(untrustedConfig, configPropertyNames);
1131
+ }
1132
+ const config = typeCheckConfig$5(untrustedConfig);
1133
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1134
+ return null;
1135
+ }
1136
+ return config;
1137
+ }
1138
+ function buildNetworkSnapshot$5(luvio, config, options) {
1139
+ const resourceParams = createResourceParams$5(config);
1140
+ const request = createResourceRequest$5(resourceParams);
1141
+ return luvio.dispatchResourceRequest(request, options)
1142
+ .then((response) => {
1143
+ return luvio.handleSuccessResponse(() => {
1144
+ const snapshot = ingestSuccess$5(luvio, resourceParams, response);
1145
+ return luvio.storeBroadcast().then(() => snapshot);
1146
+ }, () => getResponseCacheKeys$5(luvio, resourceParams, response.body));
1147
+ }, (response) => {
1148
+ deepFreeze(response);
1149
+ throw response;
1150
+ });
1151
+ }
1152
+ const actionableListAssignmentAdapterFactory = (luvio) => {
1153
+ return function actionableListAssignment(untrustedConfig) {
1154
+ const config = validateAdapterConfig$5(untrustedConfig, actionableListAssignment_ConfigPropertyNames);
1155
+ // Invalid or incomplete config
1156
+ if (config === null) {
1157
+ throw new Error('Invalid config for "actionableListAssignment"');
1158
+ }
1159
+ return buildNetworkSnapshot$5(luvio, config);
1160
+ };
1161
+ };
1162
+
1163
+ function validate$g(obj, path = 'ActionableListSelectedKpiRepresentation') {
1164
+ const v_error = (() => {
1165
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1166
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1167
+ }
1168
+ const obj_developerName = obj.developerName;
1169
+ const path_developerName = path + '.developerName';
1170
+ if (typeof obj_developerName !== 'string') {
1171
+ return new TypeError('Expected "string" but received "' + typeof obj_developerName + '" (at "' + path_developerName + '")');
1172
+ }
1173
+ })();
1174
+ return v_error === undefined ? null : v_error;
1175
+ }
1176
+
1177
+ const VERSION$c = "cf3607ddbc6a3c35213d1a9125f290aa";
1178
+ function validate$f(obj, path = 'ActionableListAvailableKpiRepresentation') {
1179
+ const v_error = (() => {
1180
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1181
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1182
+ }
1183
+ const obj_description = obj.description;
1184
+ const path_description = path + '.description';
1185
+ if (typeof obj_description !== 'string') {
1186
+ return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
1187
+ }
1188
+ const obj_developerName = obj.developerName;
1189
+ const path_developerName = path + '.developerName';
1190
+ if (typeof obj_developerName !== 'string') {
1191
+ return new TypeError('Expected "string" but received "' + typeof obj_developerName + '" (at "' + path_developerName + '")');
1192
+ }
1193
+ const obj_label = obj.label;
1194
+ const path_label = path + '.label';
1195
+ if (typeof obj_label !== 'string') {
1196
+ return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
1197
+ }
1198
+ })();
1199
+ return v_error === undefined ? null : v_error;
1200
+ }
1201
+ const select$h = function ActionableListAvailableKpiRepresentationSelect() {
1202
+ return {
1203
+ kind: 'Fragment',
1204
+ version: VERSION$c,
1205
+ private: [],
1206
+ selections: [
1207
+ {
1208
+ name: 'description',
1209
+ kind: 'Scalar'
1210
+ },
1211
+ {
1212
+ name: 'developerName',
1213
+ kind: 'Scalar'
1214
+ },
1215
+ {
1216
+ name: 'label',
1217
+ kind: 'Scalar'
1218
+ }
1219
+ ]
1220
+ };
1221
+ };
1222
+ function equals$c(existing, incoming) {
1223
+ const existing_description = existing.description;
1224
+ const incoming_description = incoming.description;
1225
+ if (!(existing_description === incoming_description)) {
1226
+ return false;
1227
+ }
1228
+ const existing_developerName = existing.developerName;
1229
+ const incoming_developerName = incoming.developerName;
1230
+ if (!(existing_developerName === incoming_developerName)) {
1231
+ return false;
1232
+ }
1233
+ const existing_label = existing.label;
1234
+ const incoming_label = incoming.label;
1235
+ if (!(existing_label === incoming_label)) {
1236
+ return false;
1237
+ }
1238
+ return true;
1239
+ }
1240
+
1241
+ const VERSION$b = "82fcf4352c1594b96768118bc48a5b54";
1242
+ function validate$e(obj, path = 'KpiBarMetricRepresentation') {
1243
+ const v_error = (() => {
1244
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1245
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1246
+ }
1247
+ const obj_developerName = obj.developerName;
1248
+ const path_developerName = path + '.developerName';
1249
+ if (typeof obj_developerName !== 'string') {
1250
+ return new TypeError('Expected "string" but received "' + typeof obj_developerName + '" (at "' + path_developerName + '")');
1251
+ }
1252
+ const obj_filters = obj.filters;
1253
+ const path_filters = path + '.filters';
1254
+ if (!ArrayIsArray(obj_filters)) {
1255
+ return new TypeError('Expected "array" but received "' + typeof obj_filters + '" (at "' + path_filters + '")');
1256
+ }
1257
+ for (let i = 0; i < obj_filters.length; i++) {
1258
+ const obj_filters_item = obj_filters[i];
1259
+ const path_filters_item = path_filters + '[' + i + ']';
1260
+ const referencepath_filters_itemValidationError = validate$t(obj_filters_item, path_filters_item);
1261
+ if (referencepath_filters_itemValidationError !== null) {
1262
+ let message = 'Object doesn\'t match FilterRepresentation (at "' + path_filters_item + '")\n';
1263
+ message += referencepath_filters_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1264
+ return new TypeError(message);
1265
+ }
1266
+ }
1267
+ const obj_label = obj.label;
1268
+ const path_label = path + '.label';
1269
+ if (typeof obj_label !== 'string') {
1270
+ return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
1271
+ }
1272
+ const obj_value = obj.value;
1273
+ const path_value = path + '.value';
1274
+ if (typeof obj_value !== 'number' || (typeof obj_value === 'number' && Math.floor(obj_value) !== obj_value)) {
1275
+ return new TypeError('Expected "integer" but received "' + typeof obj_value + '" (at "' + path_value + '")');
1276
+ }
1277
+ })();
1278
+ return v_error === undefined ? null : v_error;
1279
+ }
1280
+ const select$g = function KpiBarMetricRepresentationSelect() {
1281
+ const { selections: FilterRepresentation__selections, opaque: FilterRepresentation__opaque, } = select$p();
1282
+ return {
1283
+ kind: 'Fragment',
1284
+ version: VERSION$b,
1285
+ private: [],
1286
+ selections: [
1287
+ {
1288
+ name: 'developerName',
1289
+ kind: 'Scalar'
1290
+ },
1291
+ {
1292
+ name: 'filters',
1293
+ kind: 'Object',
1294
+ plural: true,
1295
+ selections: FilterRepresentation__selections
1296
+ },
1297
+ {
1298
+ name: 'label',
1299
+ kind: 'Scalar'
1300
+ },
1301
+ {
1302
+ name: 'value',
1303
+ kind: 'Scalar'
1304
+ }
1305
+ ]
1306
+ };
1307
+ };
1308
+ function equals$b(existing, incoming) {
1309
+ const existing_value = existing.value;
1310
+ const incoming_value = incoming.value;
1311
+ if (!(existing_value === incoming_value)) {
1312
+ return false;
1313
+ }
1314
+ const existing_developerName = existing.developerName;
1315
+ const incoming_developerName = incoming.developerName;
1316
+ if (!(existing_developerName === incoming_developerName)) {
1317
+ return false;
1318
+ }
1319
+ const existing_label = existing.label;
1320
+ const incoming_label = incoming.label;
1321
+ if (!(existing_label === incoming_label)) {
1322
+ return false;
1323
+ }
1324
+ const existing_filters = existing.filters;
1325
+ const incoming_filters = incoming.filters;
1326
+ const equals_filters_items = equalsArray(existing_filters, incoming_filters, (existing_filters_item, incoming_filters_item) => {
1327
+ if (!(equals$h(existing_filters_item, incoming_filters_item))) {
1328
+ return false;
1329
+ }
1330
+ });
1331
+ if (equals_filters_items === false) {
1332
+ return false;
1333
+ }
1334
+ return true;
1335
+ }
1336
+
1337
+ const VERSION$a = "664447b62c7867c12fe645c53773d8cd";
1338
+ function validate$d(obj, path = 'StatusResponseRepresentation') {
1339
+ const v_error = (() => {
1340
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1341
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1342
+ }
1343
+ const obj_code = obj.code;
1344
+ const path_code = path + '.code';
1345
+ if (typeof obj_code !== 'string') {
1346
+ return new TypeError('Expected "string" but received "' + typeof obj_code + '" (at "' + path_code + '")');
1347
+ }
1348
+ const obj_message = obj.message;
1349
+ const path_message = path + '.message';
1350
+ if (typeof obj_message !== 'string') {
1351
+ return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
1352
+ }
1353
+ })();
1354
+ return v_error === undefined ? null : v_error;
1355
+ }
1356
+ const select$f = function StatusResponseRepresentationSelect() {
1357
+ return {
1358
+ kind: 'Fragment',
1359
+ version: VERSION$a,
1360
+ private: [],
1361
+ selections: [
1362
+ {
1363
+ name: 'code',
1364
+ kind: 'Scalar'
1365
+ },
1366
+ {
1367
+ name: 'message',
1368
+ kind: 'Scalar'
1369
+ }
1370
+ ]
1371
+ };
1372
+ };
1373
+ function equals$a(existing, incoming) {
1374
+ const existing_code = existing.code;
1375
+ const incoming_code = incoming.code;
1376
+ if (!(existing_code === incoming_code)) {
1377
+ return false;
1378
+ }
1379
+ const existing_message = existing.message;
1380
+ const incoming_message = incoming.message;
1381
+ if (!(existing_message === incoming_message)) {
1382
+ return false;
1383
+ }
1384
+ return true;
1385
+ }
1386
+
1387
+ const TTL$4 = 1000;
1388
+ const VERSION$9 = "8763325398cb02cc77ed1ce0926cb490";
1389
+ function validate$c(obj, path = 'KpiBarOutputRepresentation') {
1390
+ const v_error = (() => {
1391
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1392
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1393
+ }
1394
+ const obj_availableKpis = obj.availableKpis;
1395
+ const path_availableKpis = path + '.availableKpis';
1396
+ if (!ArrayIsArray(obj_availableKpis)) {
1397
+ return new TypeError('Expected "array" but received "' + typeof obj_availableKpis + '" (at "' + path_availableKpis + '")');
1398
+ }
1399
+ for (let i = 0; i < obj_availableKpis.length; i++) {
1400
+ const obj_availableKpis_item = obj_availableKpis[i];
1401
+ const path_availableKpis_item = path_availableKpis + '[' + i + ']';
1402
+ const referencepath_availableKpis_itemValidationError = validate$f(obj_availableKpis_item, path_availableKpis_item);
1403
+ if (referencepath_availableKpis_itemValidationError !== null) {
1404
+ let message = 'Object doesn\'t match ActionableListAvailableKpiRepresentation (at "' + path_availableKpis_item + '")\n';
1405
+ message += referencepath_availableKpis_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1406
+ return new TypeError(message);
1407
+ }
1408
+ }
1409
+ const obj_kpiMetrics = obj.kpiMetrics;
1410
+ const path_kpiMetrics = path + '.kpiMetrics';
1411
+ if (!ArrayIsArray(obj_kpiMetrics)) {
1412
+ return new TypeError('Expected "array" but received "' + typeof obj_kpiMetrics + '" (at "' + path_kpiMetrics + '")');
1413
+ }
1414
+ for (let i = 0; i < obj_kpiMetrics.length; i++) {
1415
+ const obj_kpiMetrics_item = obj_kpiMetrics[i];
1416
+ const path_kpiMetrics_item = path_kpiMetrics + '[' + i + ']';
1417
+ const referencepath_kpiMetrics_itemValidationError = validate$e(obj_kpiMetrics_item, path_kpiMetrics_item);
1418
+ if (referencepath_kpiMetrics_itemValidationError !== null) {
1419
+ let message = 'Object doesn\'t match KpiBarMetricRepresentation (at "' + path_kpiMetrics_item + '")\n';
1420
+ message += referencepath_kpiMetrics_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1421
+ return new TypeError(message);
1422
+ }
1423
+ }
1424
+ const obj_status = obj.status;
1425
+ const path_status = path + '.status';
1426
+ const referencepath_statusValidationError = validate$d(obj_status, path_status);
1427
+ if (referencepath_statusValidationError !== null) {
1428
+ let message = 'Object doesn\'t match StatusResponseRepresentation (at "' + path_status + '")\n';
1429
+ message += referencepath_statusValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1430
+ return new TypeError(message);
1431
+ }
1432
+ })();
1433
+ return v_error === undefined ? null : v_error;
1434
+ }
1435
+ const RepresentationType$4 = 'KpiBarOutputRepresentation';
1436
+ function keyBuilder$7(luvio, config) {
1437
+ return keyPrefix + '::' + RepresentationType$4 + ':' + config.message;
1438
+ }
1439
+ function keyBuilderFromType$1(luvio, object) {
1440
+ const keyParams = {
1441
+ message: object.status.message
1442
+ };
1443
+ return keyBuilder$7(luvio, keyParams);
1444
+ }
1445
+ function normalize$4(input, existing, path, luvio, store, timestamp) {
1446
+ return input;
1447
+ }
1448
+ const select$e = function KpiBarOutputRepresentationSelect() {
1449
+ const { selections: ActionableListAvailableKpiRepresentation__selections, opaque: ActionableListAvailableKpiRepresentation__opaque, } = select$h();
1450
+ const { selections: KpiBarMetricRepresentation__selections, opaque: KpiBarMetricRepresentation__opaque, } = select$g();
1451
+ const { selections: StatusResponseRepresentation__selections, opaque: StatusResponseRepresentation__opaque, } = select$f();
1452
+ return {
1453
+ kind: 'Fragment',
1454
+ version: VERSION$9,
1455
+ private: [],
1456
+ selections: [
1457
+ {
1458
+ name: 'availableKpis',
1459
+ kind: 'Object',
1460
+ plural: true,
1461
+ selections: ActionableListAvailableKpiRepresentation__selections
1462
+ },
1463
+ {
1464
+ name: 'kpiMetrics',
1465
+ kind: 'Object',
1466
+ plural: true,
1467
+ selections: KpiBarMetricRepresentation__selections
1468
+ },
1469
+ {
1470
+ name: 'status',
1471
+ kind: 'Object',
1472
+ selections: StatusResponseRepresentation__selections
1473
+ }
1474
+ ]
1475
+ };
1476
+ };
1477
+ function equals$9(existing, incoming) {
1478
+ const existing_availableKpis = existing.availableKpis;
1479
+ const incoming_availableKpis = incoming.availableKpis;
1480
+ const equals_availableKpis_items = equalsArray(existing_availableKpis, incoming_availableKpis, (existing_availableKpis_item, incoming_availableKpis_item) => {
1481
+ if (!(equals$c(existing_availableKpis_item, incoming_availableKpis_item))) {
1482
+ return false;
1483
+ }
1484
+ });
1485
+ if (equals_availableKpis_items === false) {
1486
+ return false;
1487
+ }
1488
+ const existing_kpiMetrics = existing.kpiMetrics;
1489
+ const incoming_kpiMetrics = incoming.kpiMetrics;
1490
+ const equals_kpiMetrics_items = equalsArray(existing_kpiMetrics, incoming_kpiMetrics, (existing_kpiMetrics_item, incoming_kpiMetrics_item) => {
1491
+ if (!(equals$b(existing_kpiMetrics_item, incoming_kpiMetrics_item))) {
1492
+ return false;
1493
+ }
1494
+ });
1495
+ if (equals_kpiMetrics_items === false) {
1496
+ return false;
1497
+ }
1498
+ const existing_status = existing.status;
1499
+ const incoming_status = incoming.status;
970
1500
  if (!(equals$a(existing_status, incoming_status))) {
971
1501
  return false;
972
1502
  }
973
1503
  return true;
974
1504
  }
975
- const ingest$4 = function AssignActionableListRepresentationIngest(input, path, luvio, store, timestamp) {
1505
+ const ingest$4 = function KpiBarOutputRepresentationIngest(input, path, luvio, store, timestamp) {
976
1506
  if (process.env.NODE_ENV !== 'production') {
977
1507
  const validateError = validate$c(input);
978
1508
  if (validateError !== null) {
@@ -1041,32 +1571,38 @@ function createResourceRequest$4(config) {
1041
1571
  const headers = {};
1042
1572
  return {
1043
1573
  baseUri: '/services/data/v59.0',
1044
- basePath: '/connect/sales-excellence/actionable-list/assignment/' + config.urlParams.actionableListId + '',
1574
+ basePath: '/connect/sales-excellence/actionable-list/kpi',
1045
1575
  method: 'post',
1046
1576
  body: config.body,
1047
- urlParams: config.urlParams,
1577
+ urlParams: {},
1048
1578
  queryParams: {},
1049
1579
  headers,
1050
1580
  priority: 'normal',
1051
1581
  };
1052
1582
  }
1053
1583
 
1054
- const actionableListAssignment_ConfigPropertyNames = {
1055
- displayName: 'actionableListAssignment',
1584
+ const generateActionableListKpiBar_ConfigPropertyNames = {
1585
+ displayName: 'generateActionableListKpiBar',
1056
1586
  parameters: {
1057
- required: ['actionableListId', 'assignActionableList'],
1058
- optional: []
1587
+ required: ['actionableListId'],
1588
+ optional: ['filters', 'selectedKpis', 'slotSize']
1059
1589
  }
1060
1590
  };
1061
1591
  function createResourceParams$4(config) {
1062
1592
  const resourceParams = {
1063
- urlParams: {
1064
- actionableListId: config.actionableListId
1065
- },
1066
1593
  body: {
1067
- assignActionableList: config.assignActionableList
1594
+ actionableListId: config.actionableListId
1068
1595
  }
1069
1596
  };
1597
+ if (config['filters'] !== undefined) {
1598
+ resourceParams.body['filters'] = config['filters'];
1599
+ }
1600
+ if (config['selectedKpis'] !== undefined) {
1601
+ resourceParams.body['selectedKpis'] = config['selectedKpis'];
1602
+ }
1603
+ if (config['slotSize'] !== undefined) {
1604
+ resourceParams.body['slotSize'] = config['slotSize'];
1605
+ }
1070
1606
  return resourceParams;
1071
1607
  }
1072
1608
  function typeCheckConfig$4(untrustedConfig) {
@@ -1075,10 +1611,33 @@ function typeCheckConfig$4(untrustedConfig) {
1075
1611
  if (typeof untrustedConfig_actionableListId === 'string') {
1076
1612
  config.actionableListId = untrustedConfig_actionableListId;
1077
1613
  }
1078
- const untrustedConfig_assignActionableList = untrustedConfig.assignActionableList;
1079
- const referenceAssignActionableListInputRepresentationValidationError = validate$e(untrustedConfig_assignActionableList);
1080
- if (referenceAssignActionableListInputRepresentationValidationError === null) {
1081
- config.assignActionableList = untrustedConfig_assignActionableList;
1614
+ const untrustedConfig_filters = untrustedConfig.filters;
1615
+ if (ArrayIsArray$1(untrustedConfig_filters)) {
1616
+ const untrustedConfig_filters_array = [];
1617
+ for (let i = 0, arrayLength = untrustedConfig_filters.length; i < arrayLength; i++) {
1618
+ const untrustedConfig_filters_item = untrustedConfig_filters[i];
1619
+ const referenceFilterRepresentationValidationError = validate$t(untrustedConfig_filters_item);
1620
+ if (referenceFilterRepresentationValidationError === null) {
1621
+ untrustedConfig_filters_array.push(untrustedConfig_filters_item);
1622
+ }
1623
+ }
1624
+ config.filters = untrustedConfig_filters_array;
1625
+ }
1626
+ const untrustedConfig_selectedKpis = untrustedConfig.selectedKpis;
1627
+ if (ArrayIsArray$1(untrustedConfig_selectedKpis)) {
1628
+ const untrustedConfig_selectedKpis_array = [];
1629
+ for (let i = 0, arrayLength = untrustedConfig_selectedKpis.length; i < arrayLength; i++) {
1630
+ const untrustedConfig_selectedKpis_item = untrustedConfig_selectedKpis[i];
1631
+ const referenceActionableListSelectedKpiRepresentationValidationError = validate$g(untrustedConfig_selectedKpis_item);
1632
+ if (referenceActionableListSelectedKpiRepresentationValidationError === null) {
1633
+ untrustedConfig_selectedKpis_array.push(untrustedConfig_selectedKpis_item);
1634
+ }
1635
+ }
1636
+ config.selectedKpis = untrustedConfig_selectedKpis_array;
1637
+ }
1638
+ const untrustedConfig_slotSize = untrustedConfig.slotSize;
1639
+ if (typeof untrustedConfig_slotSize === 'number' && Math.floor(untrustedConfig_slotSize) === untrustedConfig_slotSize) {
1640
+ config.slotSize = untrustedConfig_slotSize;
1082
1641
  }
1083
1642
  return config;
1084
1643
  }
@@ -1109,12 +1668,12 @@ function buildNetworkSnapshot$4(luvio, config, options) {
1109
1668
  throw response;
1110
1669
  });
1111
1670
  }
1112
- const actionableListAssignmentAdapterFactory = (luvio) => {
1113
- return function actionableListAssignment(untrustedConfig) {
1114
- const config = validateAdapterConfig$4(untrustedConfig, actionableListAssignment_ConfigPropertyNames);
1671
+ const generateActionableListKpiBarAdapterFactory = (luvio) => {
1672
+ return function generateActionableListKpiBar(untrustedConfig) {
1673
+ const config = validateAdapterConfig$4(untrustedConfig, generateActionableListKpiBar_ConfigPropertyNames);
1115
1674
  // Invalid or incomplete config
1116
1675
  if (config === null) {
1117
- throw new Error('Invalid config for "actionableListAssignment"');
1676
+ throw new Error('Invalid config for "generateActionableListKpiBar"');
1118
1677
  }
1119
1678
  return buildNetworkSnapshot$4(luvio, config);
1120
1679
  };
@@ -2854,4 +3413,4 @@ const createObjectsDataFromSelectedSegmentAdapterFactory = (luvio) => {
2854
3413
  };
2855
3414
  };
2856
3415
 
2857
- export { actionableListAssignmentAdapterFactory, actionableListMemberSearchAdapterFactory, actionableListMemberSearchByIdAdapterFactory, createObjectsDataFromSelectedSegmentAdapterFactory, getALMQueuesAdapterFactory, getActionableListMetadataAdapterFactory, getAssignedActionableListsAdapterFactory };
3416
+ export { actionableListAssignmentAdapterFactory, actionableListMemberSearchAdapterFactory, actionableListMemberSearchByIdAdapterFactory, createObjectsDataFromSelectedSegmentAdapterFactory, generateActionableListKpiBarAdapterFactory, getALMQueuesAdapterFactory, getActionableListMetadataAdapterFactory, getAssignedActionableListsAdapterFactory };