@salesforce/lds-adapters-commerce-extensions 1.209.0 → 1.211.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.
@@ -108,19 +108,19 @@ function validate$7(obj, path = 'ExtensionOutputRepresentation') {
108
108
  return v_error === undefined ? null : v_error;
109
109
  }
110
110
  const RepresentationType$5 = 'ExtensionOutputRepresentation';
111
- function keyBuilder$b(luvio, config) {
111
+ function keyBuilder$d(luvio, config) {
112
112
  return keyPrefix + '::' + RepresentationType$5 + ':' + config.epn;
113
113
  }
114
114
  function keyBuilderFromType$2(luvio, object) {
115
115
  const keyParams = {
116
116
  epn: object.epn
117
117
  };
118
- return keyBuilder$b(luvio, keyParams);
118
+ return keyBuilder$d(luvio, keyParams);
119
119
  }
120
120
  function normalize$5(input, existing, path, luvio, store, timestamp) {
121
121
  return input;
122
122
  }
123
- const select$d = function ExtensionOutputRepresentationSelect() {
123
+ const select$e = function ExtensionOutputRepresentationSelect() {
124
124
  return {
125
125
  kind: 'Fragment',
126
126
  version: VERSION$7,
@@ -264,7 +264,7 @@ function normalize$4(input, existing, path, luvio, store, timestamp) {
264
264
  }
265
265
  return input;
266
266
  }
267
- const select$c = function ExtensionOutputCollectionRepresentationSelect() {
267
+ const select$d = function ExtensionOutputCollectionRepresentationSelect() {
268
268
  return {
269
269
  kind: 'Fragment',
270
270
  version: VERSION$6,
@@ -278,7 +278,7 @@ const select$c = function ExtensionOutputCollectionRepresentationSelect() {
278
278
  name: 'items',
279
279
  kind: 'Link',
280
280
  plural: true,
281
- fragment: select$d()
281
+ fragment: select$e()
282
282
  }
283
283
  ]
284
284
  };
@@ -345,22 +345,22 @@ function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
345
345
  }
346
346
  }
347
347
 
348
- function select$b(luvio, params) {
349
- return select$c();
348
+ function select$c(luvio, params) {
349
+ return select$d();
350
350
  }
351
- function keyBuilder$a(luvio, params) {
351
+ function keyBuilder$c(luvio, params) {
352
352
  return keyPrefix + '::ExtensionOutputCollectionRepresentation:(' + ')';
353
353
  }
354
- function getResponseCacheKeys$6(storeKeyMap, luvio, resourceParams, response) {
355
- getTypeCacheKeys$4(storeKeyMap, luvio, response, () => keyBuilder$a());
354
+ function getResponseCacheKeys$7(storeKeyMap, luvio, resourceParams, response) {
355
+ getTypeCacheKeys$4(storeKeyMap, luvio, response, () => keyBuilder$c());
356
356
  }
357
- function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
357
+ function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
358
358
  const { body } = response;
359
- const key = keyBuilder$a();
359
+ const key = keyBuilder$c();
360
360
  luvio.storeIngest(key, ingest$4, body);
361
361
  const snapshot = luvio.storeLookup({
362
362
  recordId: key,
363
- node: select$b(),
363
+ node: select$c(),
364
364
  variables: {},
365
365
  }, snapshotRefresh);
366
366
  if (process.env.NODE_ENV !== 'production') {
@@ -371,8 +371,8 @@ function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
371
371
  deepFreeze(snapshot.data);
372
372
  return snapshot;
373
373
  }
374
- function ingestError$3(luvio, params, error, snapshotRefresh) {
375
- const key = keyBuilder$a();
374
+ function ingestError$4(luvio, params, error, snapshotRefresh) {
375
+ const key = keyBuilder$c();
376
376
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
377
377
  const storeMetadataParams = {
378
378
  ttl: TTL$4,
@@ -383,7 +383,7 @@ function ingestError$3(luvio, params, error, snapshotRefresh) {
383
383
  luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
384
384
  return errorSnapshot;
385
385
  }
386
- function createResourceRequest$6(config) {
386
+ function createResourceRequest$7(config) {
387
387
  const headers = {};
388
388
  return {
389
389
  baseUri: '/services/data/v59.0',
@@ -404,62 +404,62 @@ const getExtensions_ConfigPropertyNames = {
404
404
  optional: []
405
405
  }
406
406
  };
407
- function createResourceParams$6(config) {
407
+ function createResourceParams$7(config) {
408
408
  const resourceParams = {};
409
409
  return resourceParams;
410
410
  }
411
- function keyBuilder$9(luvio, config) {
412
- return keyBuilder$a();
411
+ function keyBuilder$b(luvio, config) {
412
+ return keyBuilder$c();
413
413
  }
414
- function typeCheckConfig$6(untrustedConfig) {
414
+ function typeCheckConfig$7(untrustedConfig) {
415
415
  const config = {};
416
416
  return config;
417
417
  }
418
- function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
418
+ function validateAdapterConfig$7(untrustedConfig, configPropertyNames) {
419
419
  if (!untrustedIsObject(untrustedConfig)) {
420
420
  return null;
421
421
  }
422
422
  if (process.env.NODE_ENV !== 'production') {
423
423
  validateConfig(untrustedConfig, configPropertyNames);
424
424
  }
425
- const config = typeCheckConfig$6();
425
+ const config = typeCheckConfig$7();
426
426
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
427
427
  return null;
428
428
  }
429
429
  return config;
430
430
  }
431
- function adapterFragment$3(luvio, config) {
432
- return select$b();
431
+ function adapterFragment$4(luvio, config) {
432
+ return select$c();
433
433
  }
434
- function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
435
- const snapshot = ingestSuccess$5(luvio, resourceParams, response, {
434
+ function onFetchResponseSuccess$4(luvio, config, resourceParams, response) {
435
+ const snapshot = ingestSuccess$6(luvio, resourceParams, response, {
436
436
  config,
437
- resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
437
+ resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
438
438
  });
439
439
  return luvio.storeBroadcast().then(() => snapshot);
440
440
  }
441
- function onFetchResponseError$3(luvio, config, resourceParams, response) {
442
- const snapshot = ingestError$3(luvio, resourceParams, response, {
441
+ function onFetchResponseError$4(luvio, config, resourceParams, response) {
442
+ const snapshot = ingestError$4(luvio, resourceParams, response, {
443
443
  config,
444
- resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
444
+ resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
445
445
  });
446
446
  return luvio.storeBroadcast().then(() => snapshot);
447
447
  }
448
- function buildNetworkSnapshot$6(luvio, config, options) {
449
- const resourceParams = createResourceParams$6();
450
- const request = createResourceRequest$6();
448
+ function buildNetworkSnapshot$7(luvio, config, options) {
449
+ const resourceParams = createResourceParams$7();
450
+ const request = createResourceRequest$7();
451
451
  return luvio.dispatchResourceRequest(request, options)
452
452
  .then((response) => {
453
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
453
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$4(luvio, config, resourceParams, response), () => {
454
454
  const cache = new StoreKeyMap();
455
- getResponseCacheKeys$6(cache, luvio, resourceParams, response.body);
455
+ getResponseCacheKeys$7(cache, luvio, resourceParams, response.body);
456
456
  return cache;
457
457
  });
458
458
  }, (response) => {
459
- return luvio.handleErrorResponse(() => onFetchResponseError$3(luvio, config, resourceParams, response));
459
+ return luvio.handleErrorResponse(() => onFetchResponseError$4(luvio, config, resourceParams, response));
460
460
  });
461
461
  }
462
- function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
462
+ function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
463
463
  const { luvio, config } = context;
464
464
  const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
465
465
  const dispatchOptions = {
@@ -474,29 +474,29 @@ function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext
474
474
  priority: networkPriority
475
475
  };
476
476
  }
477
- return buildNetworkSnapshot$6(luvio, config, dispatchOptions);
477
+ return buildNetworkSnapshot$7(luvio, config, dispatchOptions);
478
478
  }
479
- function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
479
+ function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
480
480
  const { luvio, config } = context;
481
481
  const selector = {
482
- recordId: keyBuilder$9(),
483
- node: adapterFragment$3(),
482
+ recordId: keyBuilder$b(),
483
+ node: adapterFragment$4(),
484
484
  variables: {},
485
485
  };
486
486
  const cacheSnapshot = storeLookup(selector, {
487
487
  config,
488
- resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
488
+ resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
489
489
  });
490
490
  return cacheSnapshot;
491
491
  }
492
492
  const getExtensionsAdapterFactory = (luvio) => function extensions__getExtensions(untrustedConfig, requestContext) {
493
- const config = validateAdapterConfig$6(untrustedConfig, getExtensions_ConfigPropertyNames);
493
+ const config = validateAdapterConfig$7(untrustedConfig, getExtensions_ConfigPropertyNames);
494
494
  // Invalid or incomplete config
495
495
  if (config === null) {
496
496
  return null;
497
497
  }
498
498
  return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
499
- buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
499
+ buildCachedSnapshotCachePolicy$4, buildNetworkSnapshotCachePolicy$4);
500
500
  };
501
501
 
502
502
  const TTL$3 = 60000;
@@ -530,19 +530,19 @@ function validate$5(obj, path = 'MappingOutputRepresentation') {
530
530
  return v_error === undefined ? null : v_error;
531
531
  }
532
532
  const RepresentationType$3 = 'MappingOutputRepresentation';
533
- function keyBuilder$8(luvio, config) {
533
+ function keyBuilder$a(luvio, config) {
534
534
  return keyPrefix + '::' + RepresentationType$3 + ':' + config.id;
535
535
  }
536
536
  function keyBuilderFromType$1(luvio, object) {
537
537
  const keyParams = {
538
538
  id: object.id
539
539
  };
540
- return keyBuilder$8(luvio, keyParams);
540
+ return keyBuilder$a(luvio, keyParams);
541
541
  }
542
542
  function normalize$3(input, existing, path, luvio, store, timestamp) {
543
543
  return input;
544
544
  }
545
- const select$a = function MappingOutputRepresentationSelect() {
545
+ const select$b = function MappingOutputRepresentationSelect() {
546
546
  return {
547
547
  kind: 'Fragment',
548
548
  version: VERSION$5,
@@ -639,7 +639,7 @@ const notifyUpdateAvailableFactory = (luvio) => {
639
639
  }
640
640
  });
641
641
  }
642
- const keys = configs.map(c => keyBuilder$8(luvio, c));
642
+ const keys = configs.map(c => keyBuilder$a(luvio, c));
643
643
  return luvio.notifyStoreUpdateAvailable(keys);
644
644
  };
645
645
  };
@@ -691,7 +691,7 @@ function normalize$2(input, existing, path, luvio, store, timestamp) {
691
691
  }
692
692
  return input;
693
693
  }
694
- const select$9 = function MappingOutputCollectionRepresentationSelect() {
694
+ const select$a = function MappingOutputCollectionRepresentationSelect() {
695
695
  return {
696
696
  kind: 'Fragment',
697
697
  version: VERSION$4,
@@ -705,7 +705,7 @@ const select$9 = function MappingOutputCollectionRepresentationSelect() {
705
705
  name: 'items',
706
706
  kind: 'Link',
707
707
  plural: true,
708
- fragment: select$a()
708
+ fragment: select$b()
709
709
  }
710
710
  ]
711
711
  };
@@ -772,22 +772,22 @@ function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
772
772
  }
773
773
  }
774
774
 
775
- function select$8(luvio, params) {
776
- return select$9();
775
+ function select$9(luvio, params) {
776
+ return select$a();
777
777
  }
778
- function keyBuilder$7(luvio, params) {
778
+ function keyBuilder$9(luvio, params) {
779
779
  return keyPrefix + '::MappingOutputCollectionRepresentation:(' + 'epn:' + params.queryParams.epn + ',' + 'webstoreId:' + params.queryParams.webstoreId + ')';
780
780
  }
781
- function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
782
- getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$7(luvio, resourceParams));
781
+ function getResponseCacheKeys$6(storeKeyMap, luvio, resourceParams, response) {
782
+ getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$9(luvio, resourceParams));
783
783
  }
784
- function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
784
+ function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
785
785
  const { body } = response;
786
- const key = keyBuilder$7(luvio, resourceParams);
786
+ const key = keyBuilder$9(luvio, resourceParams);
787
787
  luvio.storeIngest(key, ingest$2, body);
788
788
  const snapshot = luvio.storeLookup({
789
789
  recordId: key,
790
- node: select$8(),
790
+ node: select$9(),
791
791
  variables: {},
792
792
  }, snapshotRefresh);
793
793
  if (process.env.NODE_ENV !== 'production') {
@@ -798,8 +798,8 @@ function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
798
798
  deepFreeze(snapshot.data);
799
799
  return snapshot;
800
800
  }
801
- function ingestError$2(luvio, params, error, snapshotRefresh) {
802
- const key = keyBuilder$7(luvio, params);
801
+ function ingestError$3(luvio, params, error, snapshotRefresh) {
802
+ const key = keyBuilder$9(luvio, params);
803
803
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
804
804
  const storeMetadataParams = {
805
805
  ttl: TTL$2,
@@ -810,7 +810,7 @@ function ingestError$2(luvio, params, error, snapshotRefresh) {
810
810
  luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
811
811
  return errorSnapshot;
812
812
  }
813
- function createResourceRequest$5(config) {
813
+ function createResourceRequest$6(config) {
814
814
  const headers = {};
815
815
  return {
816
816
  baseUri: '/services/data/v59.0',
@@ -831,7 +831,7 @@ const getMappings_ConfigPropertyNames = {
831
831
  optional: ['epn', 'webstoreId']
832
832
  }
833
833
  };
834
- function createResourceParams$5(config) {
834
+ function createResourceParams$6(config) {
835
835
  const resourceParams = {
836
836
  queryParams: {
837
837
  epn: config.epn, webstoreId: config.webstoreId
@@ -839,11 +839,11 @@ function createResourceParams$5(config) {
839
839
  };
840
840
  return resourceParams;
841
841
  }
842
- function keyBuilder$6(luvio, config) {
843
- const resourceParams = createResourceParams$5(config);
844
- return keyBuilder$7(luvio, resourceParams);
842
+ function keyBuilder$8(luvio, config) {
843
+ const resourceParams = createResourceParams$6(config);
844
+ return keyBuilder$9(luvio, resourceParams);
845
845
  }
846
- function typeCheckConfig$5(untrustedConfig) {
846
+ function typeCheckConfig$6(untrustedConfig) {
847
847
  const config = {};
848
848
  typeCheckScalars(untrustedConfig, config, {
849
849
  epn: 0 /* String */,
@@ -851,52 +851,52 @@ function typeCheckConfig$5(untrustedConfig) {
851
851
  });
852
852
  return config;
853
853
  }
854
- function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
854
+ function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
855
855
  if (!untrustedIsObject(untrustedConfig)) {
856
856
  return null;
857
857
  }
858
858
  if (process.env.NODE_ENV !== 'production') {
859
859
  validateConfig(untrustedConfig, configPropertyNames);
860
860
  }
861
- const config = typeCheckConfig$5(untrustedConfig);
861
+ const config = typeCheckConfig$6(untrustedConfig);
862
862
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
863
863
  return null;
864
864
  }
865
865
  return config;
866
866
  }
867
- function adapterFragment$2(luvio, config) {
868
- createResourceParams$5(config);
869
- return select$8();
867
+ function adapterFragment$3(luvio, config) {
868
+ createResourceParams$6(config);
869
+ return select$9();
870
870
  }
871
- function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
872
- const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
871
+ function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
872
+ const snapshot = ingestSuccess$5(luvio, resourceParams, response, {
873
873
  config,
874
- resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
874
+ resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
875
875
  });
876
876
  return luvio.storeBroadcast().then(() => snapshot);
877
877
  }
878
- function onFetchResponseError$2(luvio, config, resourceParams, response) {
879
- const snapshot = ingestError$2(luvio, resourceParams, response, {
878
+ function onFetchResponseError$3(luvio, config, resourceParams, response) {
879
+ const snapshot = ingestError$3(luvio, resourceParams, response, {
880
880
  config,
881
- resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
881
+ resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
882
882
  });
883
883
  return luvio.storeBroadcast().then(() => snapshot);
884
884
  }
885
- function buildNetworkSnapshot$5(luvio, config, options) {
886
- const resourceParams = createResourceParams$5(config);
887
- const request = createResourceRequest$5(resourceParams);
885
+ function buildNetworkSnapshot$6(luvio, config, options) {
886
+ const resourceParams = createResourceParams$6(config);
887
+ const request = createResourceRequest$6(resourceParams);
888
888
  return luvio.dispatchResourceRequest(request, options)
889
889
  .then((response) => {
890
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
890
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
891
891
  const cache = new StoreKeyMap();
892
- getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
892
+ getResponseCacheKeys$6(cache, luvio, resourceParams, response.body);
893
893
  return cache;
894
894
  });
895
895
  }, (response) => {
896
- return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
896
+ return luvio.handleErrorResponse(() => onFetchResponseError$3(luvio, config, resourceParams, response));
897
897
  });
898
898
  }
899
- function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
899
+ function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
900
900
  const { luvio, config } = context;
901
901
  const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
902
902
  const dispatchOptions = {
@@ -911,44 +911,44 @@ function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext
911
911
  priority: networkPriority
912
912
  };
913
913
  }
914
- return buildNetworkSnapshot$5(luvio, config, dispatchOptions);
914
+ return buildNetworkSnapshot$6(luvio, config, dispatchOptions);
915
915
  }
916
- function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
916
+ function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
917
917
  const { luvio, config } = context;
918
918
  const selector = {
919
- recordId: keyBuilder$6(luvio, config),
920
- node: adapterFragment$2(luvio, config),
919
+ recordId: keyBuilder$8(luvio, config),
920
+ node: adapterFragment$3(luvio, config),
921
921
  variables: {},
922
922
  };
923
923
  const cacheSnapshot = storeLookup(selector, {
924
924
  config,
925
- resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
925
+ resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
926
926
  });
927
927
  return cacheSnapshot;
928
928
  }
929
929
  const getMappingsAdapterFactory = (luvio) => function extensions__getMappings(untrustedConfig, requestContext) {
930
- const config = validateAdapterConfig$5(untrustedConfig, getMappings_ConfigPropertyNames);
930
+ const config = validateAdapterConfig$6(untrustedConfig, getMappings_ConfigPropertyNames);
931
931
  // Invalid or incomplete config
932
932
  if (config === null) {
933
933
  return null;
934
934
  }
935
935
  return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
936
- buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
936
+ buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
937
937
  };
938
938
 
939
- function select$7(luvio, params) {
940
- return select$a();
939
+ function select$8(luvio, params) {
940
+ return select$b();
941
941
  }
942
- function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
942
+ function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
943
943
  getTypeCacheKeys$3(storeKeyMap, luvio, response);
944
944
  }
945
- function ingestSuccess$3(luvio, resourceParams, response) {
945
+ function ingestSuccess$4(luvio, resourceParams, response) {
946
946
  const { body } = response;
947
947
  const key = keyBuilderFromType$1(luvio, body);
948
948
  luvio.storeIngest(key, ingest$3, body);
949
949
  const snapshot = luvio.storeLookup({
950
950
  recordId: key,
951
- node: select$7(),
951
+ node: select$8(),
952
952
  variables: {},
953
953
  });
954
954
  if (process.env.NODE_ENV !== 'production') {
@@ -959,7 +959,7 @@ function ingestSuccess$3(luvio, resourceParams, response) {
959
959
  deepFreeze(snapshot.data);
960
960
  return snapshot;
961
961
  }
962
- function createResourceRequest$4(config) {
962
+ function createResourceRequest$5(config) {
963
963
  const headers = {};
964
964
  return {
965
965
  baseUri: '/services/data/v59.0',
@@ -976,22 +976,19 @@ function createResourceRequest$4(config) {
976
976
  const createMapping_ConfigPropertyNames = {
977
977
  displayName: 'createMapping',
978
978
  parameters: {
979
- required: ['epn', 'providerName', 'webstoreId'],
980
- optional: ['id']
979
+ required: ['epn', 'id', 'providerName', 'webstoreId'],
980
+ optional: []
981
981
  }
982
982
  };
983
- function createResourceParams$4(config) {
983
+ function createResourceParams$5(config) {
984
984
  const resourceParams = {
985
985
  body: {
986
- epn: config.epn, providerName: config.providerName, webstoreId: config.webstoreId
986
+ epn: config.epn, id: config.id, providerName: config.providerName, webstoreId: config.webstoreId
987
987
  }
988
988
  };
989
- if (config['id'] !== undefined) {
990
- resourceParams.body['id'] = config['id'];
991
- }
992
989
  return resourceParams;
993
990
  }
994
- function typeCheckConfig$4(untrustedConfig) {
991
+ function typeCheckConfig$5(untrustedConfig) {
995
992
  const config = {};
996
993
  typeCheckScalars(untrustedConfig, config, {
997
994
  epn: 0 /* String */,
@@ -1001,30 +998,30 @@ function typeCheckConfig$4(untrustedConfig) {
1001
998
  });
1002
999
  return config;
1003
1000
  }
1004
- function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
1001
+ function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
1005
1002
  if (!untrustedIsObject(untrustedConfig)) {
1006
1003
  return null;
1007
1004
  }
1008
1005
  if (process.env.NODE_ENV !== 'production') {
1009
1006
  validateConfig(untrustedConfig, configPropertyNames);
1010
1007
  }
1011
- const config = typeCheckConfig$4(untrustedConfig);
1008
+ const config = typeCheckConfig$5(untrustedConfig);
1012
1009
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
1013
1010
  return null;
1014
1011
  }
1015
1012
  return config;
1016
1013
  }
1017
- function buildNetworkSnapshot$4(luvio, config, options) {
1018
- const resourceParams = createResourceParams$4(config);
1019
- const request = createResourceRequest$4(resourceParams);
1014
+ function buildNetworkSnapshot$5(luvio, config, options) {
1015
+ const resourceParams = createResourceParams$5(config);
1016
+ const request = createResourceRequest$5(resourceParams);
1020
1017
  return luvio.dispatchResourceRequest(request, options)
1021
1018
  .then((response) => {
1022
1019
  return luvio.handleSuccessResponse(() => {
1023
- const snapshot = ingestSuccess$3(luvio, resourceParams, response);
1020
+ const snapshot = ingestSuccess$4(luvio, resourceParams, response);
1024
1021
  return luvio.storeBroadcast().then(() => snapshot);
1025
1022
  }, () => {
1026
1023
  const cache = new StoreKeyMap();
1027
- getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
1024
+ getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
1028
1025
  return cache;
1029
1026
  });
1030
1027
  }, (response) => {
@@ -1034,22 +1031,22 @@ function buildNetworkSnapshot$4(luvio, config, options) {
1034
1031
  }
1035
1032
  const createMappingAdapterFactory = (luvio) => {
1036
1033
  return function createMapping(untrustedConfig) {
1037
- const config = validateAdapterConfig$4(untrustedConfig, createMapping_ConfigPropertyNames);
1034
+ const config = validateAdapterConfig$5(untrustedConfig, createMapping_ConfigPropertyNames);
1038
1035
  // Invalid or incomplete config
1039
1036
  if (config === null) {
1040
1037
  throw new Error('Invalid config for "createMapping"');
1041
1038
  }
1042
- return buildNetworkSnapshot$4(luvio, config);
1039
+ return buildNetworkSnapshot$5(luvio, config);
1043
1040
  };
1044
1041
  };
1045
1042
 
1046
- function keyBuilder$5(luvio, params) {
1047
- return keyBuilder$8(luvio, {
1043
+ function keyBuilder$7(luvio, params) {
1044
+ return keyBuilder$a(luvio, {
1048
1045
  id: params.urlParams.mappingId
1049
1046
  });
1050
1047
  }
1051
- function getResponseCacheKeys$3(cacheKeyMap, luvio, resourceParams) {
1052
- const key = keyBuilder$5(luvio, resourceParams);
1048
+ function getResponseCacheKeys$4(cacheKeyMap, luvio, resourceParams) {
1049
+ const key = keyBuilder$7(luvio, resourceParams);
1053
1050
  cacheKeyMap.set(key, {
1054
1051
  namespace: keyPrefix,
1055
1052
  representationName: RepresentationType$3,
@@ -1057,10 +1054,10 @@ function getResponseCacheKeys$3(cacheKeyMap, luvio, resourceParams) {
1057
1054
  });
1058
1055
  }
1059
1056
  function evictSuccess(luvio, resourceParams) {
1060
- const key = keyBuilder$5(luvio, resourceParams);
1057
+ const key = keyBuilder$7(luvio, resourceParams);
1061
1058
  luvio.storeEvict(key);
1062
1059
  }
1063
- function createResourceRequest$3(config) {
1060
+ function createResourceRequest$4(config) {
1064
1061
  const headers = {};
1065
1062
  return {
1066
1063
  baseUri: '/services/data/v59.0',
@@ -1082,7 +1079,7 @@ const deleteMapping_ConfigPropertyNames = {
1082
1079
  optional: []
1083
1080
  }
1084
1081
  };
1085
- function createResourceParams$3(config) {
1082
+ function createResourceParams$4(config) {
1086
1083
  const resourceParams = {
1087
1084
  urlParams: {
1088
1085
  mappingId: config.mappingId
@@ -1090,29 +1087,29 @@ function createResourceParams$3(config) {
1090
1087
  };
1091
1088
  return resourceParams;
1092
1089
  }
1093
- function typeCheckConfig$3(untrustedConfig) {
1090
+ function typeCheckConfig$4(untrustedConfig) {
1094
1091
  const config = {};
1095
1092
  typeCheckScalars(untrustedConfig, config, {
1096
1093
  mappingId: 0 /* String */,
1097
1094
  });
1098
1095
  return config;
1099
1096
  }
1100
- function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
1097
+ function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
1101
1098
  if (!untrustedIsObject(untrustedConfig)) {
1102
1099
  return null;
1103
1100
  }
1104
1101
  if (process.env.NODE_ENV !== 'production') {
1105
1102
  validateConfig(untrustedConfig, configPropertyNames);
1106
1103
  }
1107
- const config = typeCheckConfig$3(untrustedConfig);
1104
+ const config = typeCheckConfig$4(untrustedConfig);
1108
1105
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
1109
1106
  return null;
1110
1107
  }
1111
1108
  return config;
1112
1109
  }
1113
- function buildNetworkSnapshot$3(luvio, config, options) {
1114
- const resourceParams = createResourceParams$3(config);
1115
- const request = createResourceRequest$3(resourceParams);
1110
+ function buildNetworkSnapshot$4(luvio, config, options) {
1111
+ const resourceParams = createResourceParams$4(config);
1112
+ const request = createResourceRequest$4(resourceParams);
1116
1113
  return luvio.dispatchResourceRequest(request, options)
1117
1114
  .then(() => {
1118
1115
  return luvio.handleSuccessResponse(() => {
@@ -1120,7 +1117,7 @@ function buildNetworkSnapshot$3(luvio, config, options) {
1120
1117
  return luvio.storeBroadcast();
1121
1118
  }, () => {
1122
1119
  const cache = new StoreKeyMap();
1123
- getResponseCacheKeys$3(cache, luvio, resourceParams);
1120
+ getResponseCacheKeys$4(cache, luvio, resourceParams);
1124
1121
  return cache;
1125
1122
  });
1126
1123
  }, (response) => {
@@ -1130,33 +1127,33 @@ function buildNetworkSnapshot$3(luvio, config, options) {
1130
1127
  }
1131
1128
  const deleteMappingAdapterFactory = (luvio) => {
1132
1129
  return function extensionsdeleteMapping(untrustedConfig) {
1133
- const config = validateAdapterConfig$3(untrustedConfig, deleteMapping_ConfigPropertyNames);
1130
+ const config = validateAdapterConfig$4(untrustedConfig, deleteMapping_ConfigPropertyNames);
1134
1131
  // Invalid or incomplete config
1135
1132
  if (config === null) {
1136
1133
  throw new Error(`Invalid config for "${adapterName}"`);
1137
1134
  }
1138
- return buildNetworkSnapshot$3(luvio, config);
1135
+ return buildNetworkSnapshot$4(luvio, config);
1139
1136
  };
1140
1137
  };
1141
1138
 
1142
- function select$6(luvio, params) {
1143
- return select$a();
1139
+ function select$7(luvio, params) {
1140
+ return select$b();
1144
1141
  }
1145
- function keyBuilder$4(luvio, params) {
1146
- return keyBuilder$8(luvio, {
1142
+ function keyBuilder$6(luvio, params) {
1143
+ return keyBuilder$a(luvio, {
1147
1144
  id: params.urlParams.mappingId
1148
1145
  });
1149
1146
  }
1150
- function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
1147
+ function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
1151
1148
  getTypeCacheKeys$3(storeKeyMap, luvio, response);
1152
1149
  }
1153
- function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
1150
+ function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
1154
1151
  const { body } = response;
1155
- const key = keyBuilder$4(luvio, resourceParams);
1152
+ const key = keyBuilder$6(luvio, resourceParams);
1156
1153
  luvio.storeIngest(key, ingest$3, body);
1157
1154
  const snapshot = luvio.storeLookup({
1158
1155
  recordId: key,
1159
- node: select$6(),
1156
+ node: select$7(),
1160
1157
  variables: {},
1161
1158
  }, snapshotRefresh);
1162
1159
  if (process.env.NODE_ENV !== 'production') {
@@ -1167,8 +1164,8 @@ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
1167
1164
  deepFreeze(snapshot.data);
1168
1165
  return snapshot;
1169
1166
  }
1170
- function ingestError$1(luvio, params, error, snapshotRefresh) {
1171
- const key = keyBuilder$4(luvio, params);
1167
+ function ingestError$2(luvio, params, error, snapshotRefresh) {
1168
+ const key = keyBuilder$6(luvio, params);
1172
1169
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1173
1170
  const storeMetadataParams = {
1174
1171
  ttl: TTL$3,
@@ -1179,7 +1176,7 @@ function ingestError$1(luvio, params, error, snapshotRefresh) {
1179
1176
  luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
1180
1177
  return errorSnapshot;
1181
1178
  }
1182
- function createResourceRequest$2(config) {
1179
+ function createResourceRequest$3(config) {
1183
1180
  const headers = {};
1184
1181
  return {
1185
1182
  baseUri: '/services/data/v59.0',
@@ -1200,7 +1197,7 @@ const getMapping_ConfigPropertyNames = {
1200
1197
  optional: []
1201
1198
  }
1202
1199
  };
1203
- function createResourceParams$2(config) {
1200
+ function createResourceParams$3(config) {
1204
1201
  const resourceParams = {
1205
1202
  urlParams: {
1206
1203
  mappingId: config.mappingId
@@ -1208,63 +1205,63 @@ function createResourceParams$2(config) {
1208
1205
  };
1209
1206
  return resourceParams;
1210
1207
  }
1211
- function keyBuilder$3(luvio, config) {
1212
- const resourceParams = createResourceParams$2(config);
1213
- return keyBuilder$4(luvio, resourceParams);
1208
+ function keyBuilder$5(luvio, config) {
1209
+ const resourceParams = createResourceParams$3(config);
1210
+ return keyBuilder$6(luvio, resourceParams);
1214
1211
  }
1215
- function typeCheckConfig$2(untrustedConfig) {
1212
+ function typeCheckConfig$3(untrustedConfig) {
1216
1213
  const config = {};
1217
1214
  typeCheckScalars(untrustedConfig, config, {
1218
1215
  mappingId: 0 /* String */,
1219
1216
  });
1220
1217
  return config;
1221
1218
  }
1222
- function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
1219
+ function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
1223
1220
  if (!untrustedIsObject(untrustedConfig)) {
1224
1221
  return null;
1225
1222
  }
1226
1223
  if (process.env.NODE_ENV !== 'production') {
1227
1224
  validateConfig(untrustedConfig, configPropertyNames);
1228
1225
  }
1229
- const config = typeCheckConfig$2(untrustedConfig);
1226
+ const config = typeCheckConfig$3(untrustedConfig);
1230
1227
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
1231
1228
  return null;
1232
1229
  }
1233
1230
  return config;
1234
1231
  }
1235
- function adapterFragment$1(luvio, config) {
1236
- createResourceParams$2(config);
1237
- return select$6();
1232
+ function adapterFragment$2(luvio, config) {
1233
+ createResourceParams$3(config);
1234
+ return select$7();
1238
1235
  }
1239
- function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
1240
- const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
1236
+ function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
1237
+ const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
1241
1238
  config,
1242
- resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
1239
+ resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
1243
1240
  });
1244
1241
  return luvio.storeBroadcast().then(() => snapshot);
1245
1242
  }
1246
- function onFetchResponseError$1(luvio, config, resourceParams, response) {
1247
- const snapshot = ingestError$1(luvio, resourceParams, response, {
1243
+ function onFetchResponseError$2(luvio, config, resourceParams, response) {
1244
+ const snapshot = ingestError$2(luvio, resourceParams, response, {
1248
1245
  config,
1249
- resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
1246
+ resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
1250
1247
  });
1251
1248
  return luvio.storeBroadcast().then(() => snapshot);
1252
1249
  }
1253
- function buildNetworkSnapshot$2(luvio, config, options) {
1254
- const resourceParams = createResourceParams$2(config);
1255
- const request = createResourceRequest$2(resourceParams);
1250
+ function buildNetworkSnapshot$3(luvio, config, options) {
1251
+ const resourceParams = createResourceParams$3(config);
1252
+ const request = createResourceRequest$3(resourceParams);
1256
1253
  return luvio.dispatchResourceRequest(request, options)
1257
1254
  .then((response) => {
1258
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
1255
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
1259
1256
  const cache = new StoreKeyMap();
1260
- getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
1257
+ getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
1261
1258
  return cache;
1262
1259
  });
1263
1260
  }, (response) => {
1264
- return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
1261
+ return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
1265
1262
  });
1266
1263
  }
1267
- function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
1264
+ function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
1268
1265
  const { luvio, config } = context;
1269
1266
  const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
1270
1267
  const dispatchOptions = {
@@ -1279,44 +1276,44 @@ function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext
1279
1276
  priority: networkPriority
1280
1277
  };
1281
1278
  }
1282
- return buildNetworkSnapshot$2(luvio, config, dispatchOptions);
1279
+ return buildNetworkSnapshot$3(luvio, config, dispatchOptions);
1283
1280
  }
1284
- function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
1281
+ function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
1285
1282
  const { luvio, config } = context;
1286
1283
  const selector = {
1287
- recordId: keyBuilder$3(luvio, config),
1288
- node: adapterFragment$1(luvio, config),
1284
+ recordId: keyBuilder$5(luvio, config),
1285
+ node: adapterFragment$2(luvio, config),
1289
1286
  variables: {},
1290
1287
  };
1291
1288
  const cacheSnapshot = storeLookup(selector, {
1292
1289
  config,
1293
- resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
1290
+ resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
1294
1291
  });
1295
1292
  return cacheSnapshot;
1296
1293
  }
1297
1294
  const getMappingAdapterFactory = (luvio) => function extensions__getMapping(untrustedConfig, requestContext) {
1298
- const config = validateAdapterConfig$2(untrustedConfig, getMapping_ConfigPropertyNames);
1295
+ const config = validateAdapterConfig$3(untrustedConfig, getMapping_ConfigPropertyNames);
1299
1296
  // Invalid or incomplete config
1300
1297
  if (config === null) {
1301
1298
  return null;
1302
1299
  }
1303
1300
  return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
1304
- buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
1301
+ buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
1305
1302
  };
1306
1303
 
1307
- function select$5(luvio, params) {
1308
- return select$a();
1304
+ function select$6(luvio, params) {
1305
+ return select$b();
1309
1306
  }
1310
- function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
1307
+ function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
1311
1308
  getTypeCacheKeys$3(storeKeyMap, luvio, response);
1312
1309
  }
1313
- function ingestSuccess$1(luvio, resourceParams, response) {
1310
+ function ingestSuccess$2(luvio, resourceParams, response) {
1314
1311
  const { body } = response;
1315
1312
  const key = keyBuilderFromType$1(luvio, body);
1316
1313
  luvio.storeIngest(key, ingest$3, body);
1317
1314
  const snapshot = luvio.storeLookup({
1318
1315
  recordId: key,
1319
- node: select$5(),
1316
+ node: select$6(),
1320
1317
  variables: {},
1321
1318
  });
1322
1319
  if (process.env.NODE_ENV !== 'production') {
@@ -1327,7 +1324,7 @@ function ingestSuccess$1(luvio, resourceParams, response) {
1327
1324
  deepFreeze(snapshot.data);
1328
1325
  return snapshot;
1329
1326
  }
1330
- function createResourceRequest$1(config) {
1327
+ function createResourceRequest$2(config) {
1331
1328
  const headers = {};
1332
1329
  return {
1333
1330
  baseUri: '/services/data/v59.0',
@@ -1344,25 +1341,22 @@ function createResourceRequest$1(config) {
1344
1341
  const updateMapping_ConfigPropertyNames = {
1345
1342
  displayName: 'updateMapping',
1346
1343
  parameters: {
1347
- required: ['mappingId', 'epn', 'providerName', 'webstoreId'],
1348
- optional: ['id']
1344
+ required: ['mappingId', 'epn', 'id', 'providerName', 'webstoreId'],
1345
+ optional: []
1349
1346
  }
1350
1347
  };
1351
- function createResourceParams$1(config) {
1348
+ function createResourceParams$2(config) {
1352
1349
  const resourceParams = {
1353
1350
  urlParams: {
1354
1351
  mappingId: config.mappingId
1355
1352
  },
1356
1353
  body: {
1357
- epn: config.epn, providerName: config.providerName, webstoreId: config.webstoreId
1354
+ epn: config.epn, id: config.id, providerName: config.providerName, webstoreId: config.webstoreId
1358
1355
  }
1359
1356
  };
1360
- if (config['id'] !== undefined) {
1361
- resourceParams.body['id'] = config['id'];
1362
- }
1363
1357
  return resourceParams;
1364
1358
  }
1365
- function typeCheckConfig$1(untrustedConfig) {
1359
+ function typeCheckConfig$2(untrustedConfig) {
1366
1360
  const config = {};
1367
1361
  typeCheckScalars(untrustedConfig, config, {
1368
1362
  mappingId: 0 /* String */,
@@ -1373,30 +1367,30 @@ function typeCheckConfig$1(untrustedConfig) {
1373
1367
  });
1374
1368
  return config;
1375
1369
  }
1376
- function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
1370
+ function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
1377
1371
  if (!untrustedIsObject(untrustedConfig)) {
1378
1372
  return null;
1379
1373
  }
1380
1374
  if (process.env.NODE_ENV !== 'production') {
1381
1375
  validateConfig(untrustedConfig, configPropertyNames);
1382
1376
  }
1383
- const config = typeCheckConfig$1(untrustedConfig);
1377
+ const config = typeCheckConfig$2(untrustedConfig);
1384
1378
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
1385
1379
  return null;
1386
1380
  }
1387
1381
  return config;
1388
1382
  }
1389
- function buildNetworkSnapshot$1(luvio, config, options) {
1390
- const resourceParams = createResourceParams$1(config);
1391
- const request = createResourceRequest$1(resourceParams);
1383
+ function buildNetworkSnapshot$2(luvio, config, options) {
1384
+ const resourceParams = createResourceParams$2(config);
1385
+ const request = createResourceRequest$2(resourceParams);
1392
1386
  return luvio.dispatchResourceRequest(request, options)
1393
1387
  .then((response) => {
1394
1388
  return luvio.handleSuccessResponse(() => {
1395
- const snapshot = ingestSuccess$1(luvio, resourceParams, response);
1389
+ const snapshot = ingestSuccess$2(luvio, resourceParams, response);
1396
1390
  return luvio.storeBroadcast().then(() => snapshot);
1397
1391
  }, () => {
1398
1392
  const cache = new StoreKeyMap();
1399
- getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
1393
+ getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
1400
1394
  return cache;
1401
1395
  });
1402
1396
  }, (response) => {
@@ -1406,12 +1400,12 @@ function buildNetworkSnapshot$1(luvio, config, options) {
1406
1400
  }
1407
1401
  const updateMappingAdapterFactory = (luvio) => {
1408
1402
  return function updateMapping(untrustedConfig) {
1409
- const config = validateAdapterConfig$1(untrustedConfig, updateMapping_ConfigPropertyNames);
1403
+ const config = validateAdapterConfig$2(untrustedConfig, updateMapping_ConfigPropertyNames);
1410
1404
  // Invalid or incomplete config
1411
1405
  if (config === null) {
1412
1406
  throw new Error('Invalid config for "updateMapping"');
1413
1407
  }
1414
- return buildNetworkSnapshot$1(luvio, config);
1408
+ return buildNetworkSnapshot$2(luvio, config);
1415
1409
  };
1416
1410
  };
1417
1411
 
@@ -1444,7 +1438,7 @@ function validate$3(obj, path = 'ApexClassOutputRepresentation') {
1444
1438
  })();
1445
1439
  return v_error === undefined ? null : v_error;
1446
1440
  }
1447
- const select$4 = function ApexClassOutputRepresentationSelect() {
1441
+ const select$5 = function ApexClassOutputRepresentationSelect() {
1448
1442
  return {
1449
1443
  kind: 'Fragment',
1450
1444
  version: VERSION$3,
@@ -1507,7 +1501,7 @@ function validate$2(obj, path = 'EffectiveMappingRepresentation') {
1507
1501
  })();
1508
1502
  return v_error === undefined ? null : v_error;
1509
1503
  }
1510
- const select$3 = function EffectiveMappingRepresentationSelect() {
1504
+ const select$4 = function EffectiveMappingRepresentationSelect() {
1511
1505
  return {
1512
1506
  kind: 'Fragment',
1513
1507
  version: VERSION$2,
@@ -1530,7 +1524,7 @@ function equals$2(existing, incoming) {
1530
1524
  }
1531
1525
 
1532
1526
  const TTL$1 = 60000;
1533
- const VERSION$1 = "9e92dd6efb0ca494bcd06a4ad326b6a0";
1527
+ const VERSION$1 = "13fc665c9ed137c0ed2ffe53eccfb051";
1534
1528
  function validate$1(obj, path = 'ProviderOutputRepresentation') {
1535
1529
  const v_error = (() => {
1536
1530
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
@@ -1544,6 +1538,16 @@ function validate$1(obj, path = 'ProviderOutputRepresentation') {
1544
1538
  message += referencepath_apexClassValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1545
1539
  return new TypeError(message);
1546
1540
  }
1541
+ const obj_configUrl = obj.configUrl;
1542
+ const path_configUrl = path + '.configUrl';
1543
+ if (typeof obj_configUrl !== 'string') {
1544
+ return new TypeError('Expected "string" but received "' + typeof obj_configUrl + '" (at "' + path_configUrl + '")');
1545
+ }
1546
+ const obj_description = obj.description;
1547
+ const path_description = path + '.description';
1548
+ if (typeof obj_description !== 'string') {
1549
+ return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
1550
+ }
1547
1551
  const obj_effectiveMappings = obj.effectiveMappings;
1548
1552
  const path_effectiveMappings = path + '.effectiveMappings';
1549
1553
  if (!ArrayIsArray(obj_effectiveMappings)) {
@@ -1564,6 +1568,21 @@ function validate$1(obj, path = 'ProviderOutputRepresentation') {
1564
1568
  if (typeof obj_epn !== 'string') {
1565
1569
  return new TypeError('Expected "string" but received "' + typeof obj_epn + '" (at "' + path_epn + '")');
1566
1570
  }
1571
+ const obj_iconUri = obj.iconUri;
1572
+ const path_iconUri = path + '.iconUri';
1573
+ if (typeof obj_iconUri !== 'string') {
1574
+ return new TypeError('Expected "string" but received "' + typeof obj_iconUri + '" (at "' + path_iconUri + '")');
1575
+ }
1576
+ const obj_id = obj.id;
1577
+ const path_id = path + '.id';
1578
+ if (typeof obj_id !== 'string') {
1579
+ return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
1580
+ }
1581
+ const obj_isApplication = obj.isApplication;
1582
+ const path_isApplication = path + '.isApplication';
1583
+ if (typeof obj_isApplication !== 'boolean') {
1584
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isApplication + '" (at "' + path_isApplication + '")');
1585
+ }
1567
1586
  const obj_name = obj.name;
1568
1587
  const path_name = path + '.name';
1569
1588
  if (typeof obj_name !== 'string') {
@@ -1578,21 +1597,21 @@ function validate$1(obj, path = 'ProviderOutputRepresentation') {
1578
1597
  return v_error === undefined ? null : v_error;
1579
1598
  }
1580
1599
  const RepresentationType$1 = 'ProviderOutputRepresentation';
1581
- function keyBuilder$2(luvio, config) {
1582
- return keyPrefix + '::' + RepresentationType$1 + ':' + config.name;
1600
+ function keyBuilder$4(luvio, config) {
1601
+ return keyPrefix + '::' + RepresentationType$1 + ':' + config.id;
1583
1602
  }
1584
1603
  function keyBuilderFromType(luvio, object) {
1585
1604
  const keyParams = {
1586
- name: object.name
1605
+ id: object.id
1587
1606
  };
1588
- return keyBuilder$2(luvio, keyParams);
1607
+ return keyBuilder$4(luvio, keyParams);
1589
1608
  }
1590
1609
  function normalize$1(input, existing, path, luvio, store, timestamp) {
1591
1610
  return input;
1592
1611
  }
1593
- const select$2 = function ProviderOutputRepresentationSelect() {
1594
- const { selections: ApexClassOutputRepresentation__selections, opaque: ApexClassOutputRepresentation__opaque, } = select$4();
1595
- const { selections: EffectiveMappingRepresentation__selections, opaque: EffectiveMappingRepresentation__opaque, } = select$3();
1612
+ const select$3 = function ProviderOutputRepresentationSelect() {
1613
+ const { selections: ApexClassOutputRepresentation__selections, opaque: ApexClassOutputRepresentation__opaque, } = select$5();
1614
+ const { selections: EffectiveMappingRepresentation__selections, opaque: EffectiveMappingRepresentation__opaque, } = select$4();
1596
1615
  return {
1597
1616
  kind: 'Fragment',
1598
1617
  version: VERSION$1,
@@ -1603,6 +1622,14 @@ const select$2 = function ProviderOutputRepresentationSelect() {
1603
1622
  kind: 'Object',
1604
1623
  selections: ApexClassOutputRepresentation__selections
1605
1624
  },
1625
+ {
1626
+ name: 'configUrl',
1627
+ kind: 'Scalar'
1628
+ },
1629
+ {
1630
+ name: 'description',
1631
+ kind: 'Scalar'
1632
+ },
1606
1633
  {
1607
1634
  name: 'effectiveMappings',
1608
1635
  kind: 'Object',
@@ -1613,6 +1640,18 @@ const select$2 = function ProviderOutputRepresentationSelect() {
1613
1640
  name: 'epn',
1614
1641
  kind: 'Scalar'
1615
1642
  },
1643
+ {
1644
+ name: 'iconUri',
1645
+ kind: 'Scalar'
1646
+ },
1647
+ {
1648
+ name: 'id',
1649
+ kind: 'Scalar'
1650
+ },
1651
+ {
1652
+ name: 'isApplication',
1653
+ kind: 'Scalar'
1654
+ },
1616
1655
  {
1617
1656
  name: 'name',
1618
1657
  kind: 'Scalar'
@@ -1625,11 +1664,36 @@ const select$2 = function ProviderOutputRepresentationSelect() {
1625
1664
  };
1626
1665
  };
1627
1666
  function equals$1(existing, incoming) {
1667
+ const existing_isApplication = existing.isApplication;
1668
+ const incoming_isApplication = incoming.isApplication;
1669
+ if (!(existing_isApplication === incoming_isApplication)) {
1670
+ return false;
1671
+ }
1672
+ const existing_configUrl = existing.configUrl;
1673
+ const incoming_configUrl = incoming.configUrl;
1674
+ if (!(existing_configUrl === incoming_configUrl)) {
1675
+ return false;
1676
+ }
1677
+ const existing_description = existing.description;
1678
+ const incoming_description = incoming.description;
1679
+ if (!(existing_description === incoming_description)) {
1680
+ return false;
1681
+ }
1628
1682
  const existing_epn = existing.epn;
1629
1683
  const incoming_epn = incoming.epn;
1630
1684
  if (!(existing_epn === incoming_epn)) {
1631
1685
  return false;
1632
1686
  }
1687
+ const existing_iconUri = existing.iconUri;
1688
+ const incoming_iconUri = incoming.iconUri;
1689
+ if (!(existing_iconUri === incoming_iconUri)) {
1690
+ return false;
1691
+ }
1692
+ const existing_id = existing.id;
1693
+ const incoming_id = incoming.id;
1694
+ if (!(existing_id === incoming_id)) {
1695
+ return false;
1696
+ }
1633
1697
  const existing_name = existing.name;
1634
1698
  const incoming_name = incoming.name;
1635
1699
  if (!(existing_name === incoming_name)) {
@@ -1744,7 +1808,7 @@ function normalize(input, existing, path, luvio, store, timestamp) {
1744
1808
  }
1745
1809
  return input;
1746
1810
  }
1747
- const select$1 = function ProviderOutputCollectionRepresentationSelect() {
1811
+ const select$2 = function ProviderOutputCollectionRepresentationSelect() {
1748
1812
  return {
1749
1813
  kind: 'Fragment',
1750
1814
  version: VERSION,
@@ -1758,7 +1822,7 @@ const select$1 = function ProviderOutputCollectionRepresentationSelect() {
1758
1822
  name: 'items',
1759
1823
  kind: 'Link',
1760
1824
  plural: true,
1761
- fragment: select$2()
1825
+ fragment: select$3()
1762
1826
  }
1763
1827
  ]
1764
1828
  };
@@ -1825,22 +1889,22 @@ function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
1825
1889
  }
1826
1890
  }
1827
1891
 
1828
- function select(luvio, params) {
1829
- return select$1();
1892
+ function select$1(luvio, params) {
1893
+ return select$2();
1830
1894
  }
1831
- function keyBuilder$1(luvio, params) {
1895
+ function keyBuilder$3(luvio, params) {
1832
1896
  return keyPrefix + '::ProviderOutputCollectionRepresentation:(' + 'effectiveMappingsWebstoreId:' + params.queryParams.effectiveMappingsWebstoreId + ',' + 'epn:' + params.queryParams.epn + ')';
1833
1897
  }
1834
- function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
1835
- getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
1898
+ function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
1899
+ getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$3(luvio, resourceParams));
1836
1900
  }
1837
- function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
1901
+ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
1838
1902
  const { body } = response;
1839
- const key = keyBuilder$1(luvio, resourceParams);
1903
+ const key = keyBuilder$3(luvio, resourceParams);
1840
1904
  luvio.storeIngest(key, ingest, body);
1841
1905
  const snapshot = luvio.storeLookup({
1842
1906
  recordId: key,
1843
- node: select(),
1907
+ node: select$1(),
1844
1908
  variables: {},
1845
1909
  }, snapshotRefresh);
1846
1910
  if (process.env.NODE_ENV !== 'production') {
@@ -1851,8 +1915,8 @@ function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
1851
1915
  deepFreeze(snapshot.data);
1852
1916
  return snapshot;
1853
1917
  }
1854
- function ingestError(luvio, params, error, snapshotRefresh) {
1855
- const key = keyBuilder$1(luvio, params);
1918
+ function ingestError$1(luvio, params, error, snapshotRefresh) {
1919
+ const key = keyBuilder$3(luvio, params);
1856
1920
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1857
1921
  const storeMetadataParams = {
1858
1922
  ttl: TTL,
@@ -1863,7 +1927,7 @@ function ingestError(luvio, params, error, snapshotRefresh) {
1863
1927
  luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
1864
1928
  return errorSnapshot;
1865
1929
  }
1866
- function createResourceRequest(config) {
1930
+ function createResourceRequest$1(config) {
1867
1931
  const headers = {};
1868
1932
  return {
1869
1933
  baseUri: '/services/data/v59.0',
@@ -1884,7 +1948,7 @@ const getProviders_ConfigPropertyNames = {
1884
1948
  optional: ['effectiveMappingsWebstoreId', 'epn']
1885
1949
  }
1886
1950
  };
1887
- function createResourceParams(config) {
1951
+ function createResourceParams$1(config) {
1888
1952
  const resourceParams = {
1889
1953
  queryParams: {
1890
1954
  effectiveMappingsWebstoreId: config.effectiveMappingsWebstoreId, epn: config.epn
@@ -1892,6 +1956,172 @@ function createResourceParams(config) {
1892
1956
  };
1893
1957
  return resourceParams;
1894
1958
  }
1959
+ function keyBuilder$2(luvio, config) {
1960
+ const resourceParams = createResourceParams$1(config);
1961
+ return keyBuilder$3(luvio, resourceParams);
1962
+ }
1963
+ function typeCheckConfig$1(untrustedConfig) {
1964
+ const config = {};
1965
+ typeCheckScalars(untrustedConfig, config, {
1966
+ effectiveMappingsWebstoreId: 0 /* String */,
1967
+ epn: 0 /* String */,
1968
+ });
1969
+ return config;
1970
+ }
1971
+ function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
1972
+ if (!untrustedIsObject(untrustedConfig)) {
1973
+ return null;
1974
+ }
1975
+ if (process.env.NODE_ENV !== 'production') {
1976
+ validateConfig(untrustedConfig, configPropertyNames);
1977
+ }
1978
+ const config = typeCheckConfig$1(untrustedConfig);
1979
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1980
+ return null;
1981
+ }
1982
+ return config;
1983
+ }
1984
+ function adapterFragment$1(luvio, config) {
1985
+ createResourceParams$1(config);
1986
+ return select$1();
1987
+ }
1988
+ function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
1989
+ const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
1990
+ config,
1991
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
1992
+ });
1993
+ return luvio.storeBroadcast().then(() => snapshot);
1994
+ }
1995
+ function onFetchResponseError$1(luvio, config, resourceParams, response) {
1996
+ const snapshot = ingestError$1(luvio, resourceParams, response, {
1997
+ config,
1998
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
1999
+ });
2000
+ return luvio.storeBroadcast().then(() => snapshot);
2001
+ }
2002
+ function buildNetworkSnapshot$1(luvio, config, options) {
2003
+ const resourceParams = createResourceParams$1(config);
2004
+ const request = createResourceRequest$1(resourceParams);
2005
+ return luvio.dispatchResourceRequest(request, options)
2006
+ .then((response) => {
2007
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
2008
+ const cache = new StoreKeyMap();
2009
+ getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
2010
+ return cache;
2011
+ });
2012
+ }, (response) => {
2013
+ return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
2014
+ });
2015
+ }
2016
+ function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
2017
+ const { luvio, config } = context;
2018
+ const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
2019
+ const dispatchOptions = {
2020
+ resourceRequestContext: {
2021
+ requestCorrelator,
2022
+ luvioRequestMethod: undefined,
2023
+ },
2024
+ eventObservers
2025
+ };
2026
+ if (networkPriority !== 'normal') {
2027
+ dispatchOptions.overrides = {
2028
+ priority: networkPriority
2029
+ };
2030
+ }
2031
+ return buildNetworkSnapshot$1(luvio, config, dispatchOptions);
2032
+ }
2033
+ function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
2034
+ const { luvio, config } = context;
2035
+ const selector = {
2036
+ recordId: keyBuilder$2(luvio, config),
2037
+ node: adapterFragment$1(luvio, config),
2038
+ variables: {},
2039
+ };
2040
+ const cacheSnapshot = storeLookup(selector, {
2041
+ config,
2042
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
2043
+ });
2044
+ return cacheSnapshot;
2045
+ }
2046
+ const getProvidersAdapterFactory = (luvio) => function extensions__getProviders(untrustedConfig, requestContext) {
2047
+ const config = validateAdapterConfig$1(untrustedConfig, getProviders_ConfigPropertyNames);
2048
+ // Invalid or incomplete config
2049
+ if (config === null) {
2050
+ return null;
2051
+ }
2052
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
2053
+ buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
2054
+ };
2055
+
2056
+ function select(luvio, params) {
2057
+ return select$3();
2058
+ }
2059
+ function keyBuilder$1(luvio, params) {
2060
+ return keyBuilder$4(luvio, {
2061
+ id: params.urlParams.providerId
2062
+ });
2063
+ }
2064
+ function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
2065
+ getTypeCacheKeys$1(storeKeyMap, luvio, response);
2066
+ }
2067
+ function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
2068
+ const { body } = response;
2069
+ const key = keyBuilder$1(luvio, resourceParams);
2070
+ luvio.storeIngest(key, ingest$1, body);
2071
+ const snapshot = luvio.storeLookup({
2072
+ recordId: key,
2073
+ node: select(),
2074
+ variables: {},
2075
+ }, snapshotRefresh);
2076
+ if (process.env.NODE_ENV !== 'production') {
2077
+ if (snapshot.state !== 'Fulfilled') {
2078
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
2079
+ }
2080
+ }
2081
+ deepFreeze(snapshot.data);
2082
+ return snapshot;
2083
+ }
2084
+ function ingestError(luvio, params, error, snapshotRefresh) {
2085
+ const key = keyBuilder$1(luvio, params);
2086
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
2087
+ const storeMetadataParams = {
2088
+ ttl: TTL$1,
2089
+ namespace: keyPrefix,
2090
+ version: VERSION$1,
2091
+ representationName: RepresentationType$1
2092
+ };
2093
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
2094
+ return errorSnapshot;
2095
+ }
2096
+ function createResourceRequest(config) {
2097
+ const headers = {};
2098
+ return {
2099
+ baseUri: '/services/data/v59.0',
2100
+ basePath: '/commerce/extension/providers/' + config.urlParams.providerId + '',
2101
+ method: 'get',
2102
+ body: null,
2103
+ urlParams: config.urlParams,
2104
+ queryParams: {},
2105
+ headers,
2106
+ priority: 'normal',
2107
+ };
2108
+ }
2109
+
2110
+ const getProvider_ConfigPropertyNames = {
2111
+ displayName: 'getProvider',
2112
+ parameters: {
2113
+ required: ['providerId'],
2114
+ optional: []
2115
+ }
2116
+ };
2117
+ function createResourceParams(config) {
2118
+ const resourceParams = {
2119
+ urlParams: {
2120
+ providerId: config.providerId
2121
+ }
2122
+ };
2123
+ return resourceParams;
2124
+ }
1895
2125
  function keyBuilder(luvio, config) {
1896
2126
  const resourceParams = createResourceParams(config);
1897
2127
  return keyBuilder$1(luvio, resourceParams);
@@ -1899,8 +2129,7 @@ function keyBuilder(luvio, config) {
1899
2129
  function typeCheckConfig(untrustedConfig) {
1900
2130
  const config = {};
1901
2131
  typeCheckScalars(untrustedConfig, config, {
1902
- effectiveMappingsWebstoreId: 0 /* String */,
1903
- epn: 0 /* String */,
2132
+ providerId: 0 /* String */,
1904
2133
  });
1905
2134
  return config;
1906
2135
  }
@@ -1979,8 +2208,8 @@ function buildCachedSnapshotCachePolicy(context, storeLookup) {
1979
2208
  });
1980
2209
  return cacheSnapshot;
1981
2210
  }
1982
- const getProvidersAdapterFactory = (luvio) => function extensions__getProviders(untrustedConfig, requestContext) {
1983
- const config = validateAdapterConfig(untrustedConfig, getProviders_ConfigPropertyNames);
2211
+ const getProviderAdapterFactory = (luvio) => function extensions__getProvider(untrustedConfig, requestContext) {
2212
+ const config = validateAdapterConfig(untrustedConfig, getProvider_ConfigPropertyNames);
1984
2213
  // Invalid or incomplete config
1985
2214
  if (config === null) {
1986
2215
  return null;
@@ -1989,4 +2218,4 @@ const getProvidersAdapterFactory = (luvio) => function extensions__getProviders(
1989
2218
  buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
1990
2219
  };
1991
2220
 
1992
- export { createMappingAdapterFactory, deleteMappingAdapterFactory, getExtensionsAdapterFactory, getMappingAdapterFactory, getMappingsAdapterFactory, getProvidersAdapterFactory, notifyUpdateAvailableFactory as notifyMappingUpdateAvailableFactory, updateMappingAdapterFactory };
2221
+ export { createMappingAdapterFactory, deleteMappingAdapterFactory, getExtensionsAdapterFactory, getMappingAdapterFactory, getMappingsAdapterFactory, getProviderAdapterFactory, getProvidersAdapterFactory, notifyUpdateAvailableFactory as notifyMappingUpdateAvailableFactory, updateMappingAdapterFactory };