@salesforce/lds-adapters-cdp-document-processing 1.358.0 → 1.360.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.
@@ -4,7 +4,7 @@
4
4
  * For full license text, see the LICENSE.txt file
5
5
  */
6
6
 
7
- import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$4, typeCheckConfig as typeCheckConfig$6, StoreKeyMap, createResourceParams as createResourceParams$6 } from '@luvio/engine';
7
+ import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$4, typeCheckConfig as typeCheckConfig$8, StoreKeyMap, createResourceParams as createResourceParams$8 } from '@luvio/engine';
8
8
 
9
9
  const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
10
10
  const { keys: ObjectKeys, create: ObjectCreate } = Object;
@@ -92,8 +92,8 @@ function createLink(ref) {
92
92
  };
93
93
  }
94
94
 
95
- const TTL$4 = 500;
96
- function validate$a(obj, path = 'CdpPaginatedResponseBaseRepresentation') {
95
+ const TTL$5 = 500;
96
+ function validate$c(obj, path = 'CdpPaginatedResponseBaseRepresentation') {
97
97
  const v_error = (() => {
98
98
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
99
99
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -158,14 +158,14 @@ function validate$a(obj, path = 'CdpPaginatedResponseBaseRepresentation') {
158
158
  })();
159
159
  return v_error === undefined ? null : v_error;
160
160
  }
161
- function equals$8(existing, incoming) {
161
+ function equals$9(existing, incoming) {
162
162
  if (JSONStringify(incoming) !== JSONStringify(existing)) {
163
163
  return false;
164
164
  }
165
165
  return true;
166
166
  }
167
167
 
168
- function validate$9(obj, path = 'CdpAssetBaseRepresentation') {
168
+ function validate$b(obj, path = 'CdpAssetBaseRepresentation') {
169
169
  const v_error = (() => {
170
170
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
171
171
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -213,7 +213,7 @@ function validate$9(obj, path = 'CdpAssetBaseRepresentation') {
213
213
  })();
214
214
  return v_error === undefined ? null : v_error;
215
215
  }
216
- function equals$7(existing, incoming) {
216
+ function equals$8(existing, incoming) {
217
217
  const existing_createdDate = existing.createdDate;
218
218
  const incoming_createdDate = incoming.createdDate;
219
219
  if (!(existing_createdDate === incoming_createdDate)) {
@@ -257,8 +257,8 @@ function equals$7(existing, incoming) {
257
257
  return true;
258
258
  }
259
259
 
260
- function validate$8(obj, path = 'IdpConfigurationBaseRepresentation') {
261
- const validateCdpAssetBaseRepresentation_validateError = validate$9(obj, path);
260
+ function validate$a(obj, path = 'IdpConfigurationBaseRepresentation') {
261
+ const validateCdpAssetBaseRepresentation_validateError = validate$b(obj, path);
262
262
  if (validateCdpAssetBaseRepresentation_validateError !== null) {
263
263
  return validateCdpAssetBaseRepresentation_validateError;
264
264
  }
@@ -325,8 +325,8 @@ function validate$8(obj, path = 'IdpConfigurationBaseRepresentation') {
325
325
  })();
326
326
  return v_error === undefined ? null : v_error;
327
327
  }
328
- function equals$6(existing, incoming) {
329
- if (equals$7(existing, incoming) === false) {
328
+ function equals$7(existing, incoming) {
329
+ if (equals$8(existing, incoming) === false) {
330
330
  return false;
331
331
  }
332
332
  const existing_activationStatus = existing.activationStatus;
@@ -367,8 +367,8 @@ function equals$6(existing, incoming) {
367
367
  return true;
368
368
  }
369
369
 
370
- function validate$7(obj, path = 'IdpConfigurationRepresentation') {
371
- const validateIdpConfigurationBaseRepresentation_validateError = validate$8(obj, path);
370
+ function validate$9(obj, path = 'IdpConfigurationRepresentation') {
371
+ const validateIdpConfigurationBaseRepresentation_validateError = validate$a(obj, path);
372
372
  if (validateIdpConfigurationBaseRepresentation_validateError !== null) {
373
373
  return validateIdpConfigurationBaseRepresentation_validateError;
374
374
  }
@@ -379,17 +379,17 @@ function validate$7(obj, path = 'IdpConfigurationRepresentation') {
379
379
  })();
380
380
  return v_error === undefined ? null : v_error;
381
381
  }
382
- function equals$5(existing, incoming) {
383
- if (equals$6(existing, incoming) === false) {
382
+ function equals$6(existing, incoming) {
383
+ if (equals$7(existing, incoming) === false) {
384
384
  return false;
385
385
  }
386
386
  return true;
387
387
  }
388
388
 
389
- const TTL$3 = 500;
390
- const VERSION$4 = "def7e7ee61e636c86d017097ba5ad643";
391
- function validate$6(obj, path = 'IdpConfigurationsCollectionRepresentation') {
392
- const validateCdpPaginatedResponseBaseRepresentation_validateError = validate$a(obj, path);
389
+ const TTL$4 = 500;
390
+ const VERSION$5 = "def7e7ee61e636c86d017097ba5ad643";
391
+ function validate$8(obj, path = 'IdpConfigurationsCollectionRepresentation') {
392
+ const validateCdpPaginatedResponseBaseRepresentation_validateError = validate$c(obj, path);
393
393
  if (validateCdpPaginatedResponseBaseRepresentation_validateError !== null) {
394
394
  return validateCdpPaginatedResponseBaseRepresentation_validateError;
395
395
  }
@@ -405,7 +405,7 @@ function validate$6(obj, path = 'IdpConfigurationsCollectionRepresentation') {
405
405
  for (let i = 0; i < obj_configurations.length; i++) {
406
406
  const obj_configurations_item = obj_configurations[i];
407
407
  const path_configurations_item = path_configurations + '[' + i + ']';
408
- const referencepath_configurations_itemValidationError = validate$7(obj_configurations_item, path_configurations_item);
408
+ const referencepath_configurations_itemValidationError = validate$9(obj_configurations_item, path_configurations_item);
409
409
  if (referencepath_configurations_itemValidationError !== null) {
410
410
  let message = 'Object doesn\'t match IdpConfigurationRepresentation (at "' + path_configurations_item + '")\n';
411
411
  message += referencepath_configurations_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -415,26 +415,26 @@ function validate$6(obj, path = 'IdpConfigurationsCollectionRepresentation') {
415
415
  })();
416
416
  return v_error === undefined ? null : v_error;
417
417
  }
418
- const RepresentationType$4 = 'IdpConfigurationsCollectionRepresentation';
419
- function normalize$4(input, existing, path, luvio, store, timestamp) {
418
+ const RepresentationType$5 = 'IdpConfigurationsCollectionRepresentation';
419
+ function normalize$5(input, existing, path, luvio, store, timestamp) {
420
420
  return input;
421
421
  }
422
- const select$9 = function IdpConfigurationsCollectionRepresentationSelect() {
422
+ const select$c = function IdpConfigurationsCollectionRepresentationSelect() {
423
423
  return {
424
424
  kind: 'Fragment',
425
- version: VERSION$4,
425
+ version: VERSION$5,
426
426
  private: [],
427
427
  opaque: true
428
428
  };
429
429
  };
430
- function equals$4(existing, incoming) {
431
- if (equals$8(existing, incoming) === false) {
430
+ function equals$5(existing, incoming) {
431
+ if (equals$9(existing, incoming) === false) {
432
432
  return false;
433
433
  }
434
434
  const existing_configurations = existing.configurations;
435
435
  const incoming_configurations = incoming.configurations;
436
436
  const equals_configurations_items = equalsArray(existing_configurations, incoming_configurations, (existing_configurations_item, incoming_configurations_item) => {
437
- if (!(equals$5(existing_configurations_item, incoming_configurations_item))) {
437
+ if (!(equals$6(existing_configurations_item, incoming_configurations_item))) {
438
438
  return false;
439
439
  }
440
440
  });
@@ -443,44 +443,44 @@ function equals$4(existing, incoming) {
443
443
  }
444
444
  return true;
445
445
  }
446
- const ingest$4 = function IdpConfigurationsCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
446
+ const ingest$5 = function IdpConfigurationsCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
447
447
  if (process.env.NODE_ENV !== 'production') {
448
- const validateError = validate$6(input);
448
+ const validateError = validate$8(input);
449
449
  if (validateError !== null) {
450
450
  throw validateError;
451
451
  }
452
452
  }
453
453
  const key = path.fullPath;
454
- const ttlToUse = TTL$4;
455
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "document-processing", VERSION$4, RepresentationType$4, equals$4);
454
+ const ttlToUse = TTL$5;
455
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$5, "document-processing", VERSION$5, RepresentationType$5, equals$5);
456
456
  return createLink(key);
457
457
  };
458
- function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
458
+ function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
459
459
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
460
460
  const rootKey = fullPathFactory();
461
461
  rootKeySet.set(rootKey, {
462
462
  namespace: keyPrefix,
463
- representationName: RepresentationType$4,
463
+ representationName: RepresentationType$5,
464
464
  mergeable: false
465
465
  });
466
466
  }
467
467
 
468
- function select$8(luvio, params) {
469
- return select$9();
468
+ function select$b(luvio, params) {
469
+ return select$c();
470
470
  }
471
- function keyBuilder$9(luvio, params) {
471
+ function keyBuilder$a(luvio, params) {
472
472
  return keyPrefix + '::IdpConfigurationsCollectionRepresentation:(' + 'activationStatus:' + params.queryParams.activationStatus + ',' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ',' + 'orderBy:' + params.queryParams.orderBy + ',' + 'search:' + params.queryParams.search + ')';
473
473
  }
474
- function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
475
- getTypeCacheKeys$4(storeKeyMap, luvio, response, () => keyBuilder$9(luvio, resourceParams));
474
+ function getResponseCacheKeys$7(storeKeyMap, luvio, resourceParams, response) {
475
+ getTypeCacheKeys$5(storeKeyMap, luvio, response, () => keyBuilder$a(luvio, resourceParams));
476
476
  }
477
- function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
477
+ function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
478
478
  const { body } = response;
479
- const key = keyBuilder$9(luvio, resourceParams);
480
- luvio.storeIngest(key, ingest$4, body);
479
+ const key = keyBuilder$a(luvio, resourceParams);
480
+ luvio.storeIngest(key, ingest$5, body);
481
481
  const snapshot = luvio.storeLookup({
482
482
  recordId: key,
483
- node: select$8(),
483
+ node: select$b(),
484
484
  variables: {},
485
485
  }, snapshotRefresh);
486
486
  if (process.env.NODE_ENV !== 'production') {
@@ -492,18 +492,18 @@ function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
492
492
  return snapshot;
493
493
  }
494
494
  function ingestError$3(luvio, params, error, snapshotRefresh) {
495
- const key = keyBuilder$9(luvio, params);
495
+ const key = keyBuilder$a(luvio, params);
496
496
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
497
497
  const storeMetadataParams = {
498
- ttl: TTL$3,
498
+ ttl: TTL$4,
499
499
  namespace: keyPrefix,
500
- version: VERSION$4,
501
- representationName: RepresentationType$4
500
+ version: VERSION$5,
501
+ representationName: RepresentationType$5
502
502
  };
503
503
  luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
504
504
  return errorSnapshot;
505
505
  }
506
- function createResourceRequest$5(config) {
506
+ function createResourceRequest$7(config) {
507
507
  const headers = {};
508
508
  return {
509
509
  baseUri: '/services/data/v65.0',
@@ -517,7 +517,7 @@ function createResourceRequest$5(config) {
517
517
  };
518
518
  }
519
519
 
520
- const adapterName$5 = 'getIdpConfigurations';
520
+ const adapterName$7 = 'getIdpConfigurations';
521
521
  const getIdpConfigurations_ConfigPropertyMetadata = [
522
522
  generateParamConfigMetadata('activationStatus', false, 1 /* QueryParameter */, 0 /* String */),
523
523
  generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
@@ -525,56 +525,56 @@ const getIdpConfigurations_ConfigPropertyMetadata = [
525
525
  generateParamConfigMetadata('orderBy', false, 1 /* QueryParameter */, 0 /* String */),
526
526
  generateParamConfigMetadata('search', false, 1 /* QueryParameter */, 0 /* String */),
527
527
  ];
528
- const getIdpConfigurations_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, getIdpConfigurations_ConfigPropertyMetadata);
529
- const createResourceParams$5 = /*#__PURE__*/ createResourceParams$6(getIdpConfigurations_ConfigPropertyMetadata);
530
- function keyBuilder$8(luvio, config) {
531
- const resourceParams = createResourceParams$5(config);
532
- return keyBuilder$9(luvio, resourceParams);
528
+ const getIdpConfigurations_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$7, getIdpConfigurations_ConfigPropertyMetadata);
529
+ const createResourceParams$7 = /*#__PURE__*/ createResourceParams$8(getIdpConfigurations_ConfigPropertyMetadata);
530
+ function keyBuilder$9(luvio, config) {
531
+ const resourceParams = createResourceParams$7(config);
532
+ return keyBuilder$a(luvio, resourceParams);
533
533
  }
534
- function typeCheckConfig$5(untrustedConfig) {
534
+ function typeCheckConfig$7(untrustedConfig) {
535
535
  const config = {};
536
- typeCheckConfig$6(untrustedConfig, config, getIdpConfigurations_ConfigPropertyMetadata);
536
+ typeCheckConfig$8(untrustedConfig, config, getIdpConfigurations_ConfigPropertyMetadata);
537
537
  return config;
538
538
  }
539
- function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
539
+ function validateAdapterConfig$7(untrustedConfig, configPropertyNames) {
540
540
  if (!untrustedIsObject(untrustedConfig)) {
541
541
  return null;
542
542
  }
543
543
  if (process.env.NODE_ENV !== 'production') {
544
544
  validateConfig(untrustedConfig, configPropertyNames);
545
545
  }
546
- const config = typeCheckConfig$5(untrustedConfig);
546
+ const config = typeCheckConfig$7(untrustedConfig);
547
547
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
548
548
  return null;
549
549
  }
550
550
  return config;
551
551
  }
552
552
  function adapterFragment$3(luvio, config) {
553
- createResourceParams$5(config);
554
- return select$8();
553
+ createResourceParams$7(config);
554
+ return select$b();
555
555
  }
556
556
  function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
557
- const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
557
+ const snapshot = ingestSuccess$6(luvio, resourceParams, response, {
558
558
  config,
559
- resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
559
+ resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
560
560
  });
561
561
  return luvio.storeBroadcast().then(() => snapshot);
562
562
  }
563
563
  function onFetchResponseError$3(luvio, config, resourceParams, response) {
564
564
  const snapshot = ingestError$3(luvio, resourceParams, response, {
565
565
  config,
566
- resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
566
+ resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
567
567
  });
568
568
  return luvio.storeBroadcast().then(() => snapshot);
569
569
  }
570
- function buildNetworkSnapshot$5(luvio, config, options) {
571
- const resourceParams = createResourceParams$5(config);
572
- const request = createResourceRequest$5(resourceParams);
570
+ function buildNetworkSnapshot$7(luvio, config, options) {
571
+ const resourceParams = createResourceParams$7(config);
572
+ const request = createResourceRequest$7(resourceParams);
573
573
  return luvio.dispatchResourceRequest(request, options)
574
574
  .then((response) => {
575
575
  return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
576
576
  const cache = new StoreKeyMap();
577
- getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
577
+ getResponseCacheKeys$7(cache, luvio, resourceParams, response.body);
578
578
  return cache;
579
579
  });
580
580
  }, (response) => {
@@ -582,23 +582,23 @@ function buildNetworkSnapshot$5(luvio, config, options) {
582
582
  });
583
583
  }
584
584
  function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
585
- return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$5, undefined, false);
585
+ return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$7, undefined, false);
586
586
  }
587
587
  function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
588
588
  const { luvio, config } = context;
589
589
  const selector = {
590
- recordId: keyBuilder$8(luvio, config),
590
+ recordId: keyBuilder$9(luvio, config),
591
591
  node: adapterFragment$3(luvio, config),
592
592
  variables: {},
593
593
  };
594
594
  const cacheSnapshot = storeLookup(selector, {
595
595
  config,
596
- resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
596
+ resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
597
597
  });
598
598
  return cacheSnapshot;
599
599
  }
600
600
  const getIdpConfigurationsAdapterFactory = (luvio) => function documentProcessing__getIdpConfigurations(untrustedConfig, requestContext) {
601
- const config = validateAdapterConfig$5(untrustedConfig, getIdpConfigurations_ConfigPropertyNames);
601
+ const config = validateAdapterConfig$7(untrustedConfig, getIdpConfigurations_ConfigPropertyNames);
602
602
  // Invalid or incomplete config
603
603
  if (config === null) {
604
604
  return null;
@@ -607,9 +607,9 @@ const getIdpConfigurationsAdapterFactory = (luvio) => function documentProcessin
607
607
  buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
608
608
  };
609
609
 
610
- const TTL$2 = 500;
611
- const VERSION$3 = "8bf201cc7509ac5c7e3db70eba261ab8";
612
- function validate$5(obj, path = 'IdpConfigurationDetailsRepresentation') {
610
+ const TTL$3 = 500;
611
+ const VERSION$4 = "8bf201cc7509ac5c7e3db70eba261ab8";
612
+ function validate$7(obj, path = 'IdpConfigurationDetailsRepresentation') {
613
613
  const v_error = (() => {
614
614
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
615
615
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -714,68 +714,68 @@ function validate$5(obj, path = 'IdpConfigurationDetailsRepresentation') {
714
714
  })();
715
715
  return v_error === undefined ? null : v_error;
716
716
  }
717
- const RepresentationType$3 = 'IdpConfigurationDetailsRepresentation';
718
- function keyBuilder$7(luvio, config) {
719
- return keyPrefix + '::' + RepresentationType$3 + ':' + config.id;
717
+ const RepresentationType$4 = 'IdpConfigurationDetailsRepresentation';
718
+ function keyBuilder$8(luvio, config) {
719
+ return keyPrefix + '::' + RepresentationType$4 + ':' + config.id;
720
720
  }
721
- function keyBuilderFromType(luvio, object) {
721
+ function keyBuilderFromType$1(luvio, object) {
722
722
  const keyParams = {
723
723
  id: object.id
724
724
  };
725
- return keyBuilder$7(luvio, keyParams);
725
+ return keyBuilder$8(luvio, keyParams);
726
726
  }
727
- function normalize$3(input, existing, path, luvio, store, timestamp) {
727
+ function normalize$4(input, existing, path, luvio, store, timestamp) {
728
728
  return input;
729
729
  }
730
- const select$7 = function IdpConfigurationDetailsRepresentationSelect() {
730
+ const select$a = function IdpConfigurationDetailsRepresentationSelect() {
731
731
  return {
732
732
  kind: 'Fragment',
733
- version: VERSION$3,
733
+ version: VERSION$4,
734
734
  private: [],
735
735
  opaque: true
736
736
  };
737
737
  };
738
- function equals$3(existing, incoming) {
738
+ function equals$4(existing, incoming) {
739
739
  if (JSONStringify(incoming) !== JSONStringify(existing)) {
740
740
  return false;
741
741
  }
742
742
  return true;
743
743
  }
744
- const ingest$3 = function IdpConfigurationDetailsRepresentationIngest(input, path, luvio, store, timestamp) {
744
+ const ingest$4 = function IdpConfigurationDetailsRepresentationIngest(input, path, luvio, store, timestamp) {
745
745
  if (process.env.NODE_ENV !== 'production') {
746
- const validateError = validate$5(input);
746
+ const validateError = validate$7(input);
747
747
  if (validateError !== null) {
748
748
  throw validateError;
749
749
  }
750
750
  }
751
- const key = keyBuilderFromType(luvio, input);
752
- const ttlToUse = TTL$2;
753
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "document-processing", VERSION$3, RepresentationType$3, equals$3);
751
+ const key = keyBuilderFromType$1(luvio, input);
752
+ const ttlToUse = TTL$3;
753
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "document-processing", VERSION$4, RepresentationType$4, equals$4);
754
754
  return createLink(key);
755
755
  };
756
- function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
756
+ function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
757
757
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
758
- const rootKey = keyBuilderFromType(luvio, input);
758
+ const rootKey = keyBuilderFromType$1(luvio, input);
759
759
  rootKeySet.set(rootKey, {
760
760
  namespace: keyPrefix,
761
- representationName: RepresentationType$3,
761
+ representationName: RepresentationType$4,
762
762
  mergeable: false
763
763
  });
764
764
  }
765
765
 
766
- function select$6(luvio, params) {
767
- return select$7();
766
+ function select$9(luvio, params) {
767
+ return select$a();
768
768
  }
769
- function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
770
- getTypeCacheKeys$3(storeKeyMap, luvio, response);
769
+ function getResponseCacheKeys$6(storeKeyMap, luvio, resourceParams, response) {
770
+ getTypeCacheKeys$4(storeKeyMap, luvio, response);
771
771
  }
772
- function ingestSuccess$3(luvio, resourceParams, response) {
772
+ function ingestSuccess$5(luvio, resourceParams, response) {
773
773
  const { body } = response;
774
- const key = keyBuilderFromType(luvio, body);
775
- luvio.storeIngest(key, ingest$3, body);
774
+ const key = keyBuilderFromType$1(luvio, body);
775
+ luvio.storeIngest(key, ingest$4, body);
776
776
  const snapshot = luvio.storeLookup({
777
777
  recordId: key,
778
- node: select$6(),
778
+ node: select$9(),
779
779
  variables: {},
780
780
  });
781
781
  if (process.env.NODE_ENV !== 'production') {
@@ -786,7 +786,7 @@ function ingestSuccess$3(luvio, resourceParams, response) {
786
786
  deepFreeze(snapshot.data);
787
787
  return snapshot;
788
788
  }
789
- function createResourceRequest$4(config) {
789
+ function createResourceRequest$6(config) {
790
790
  const headers = {};
791
791
  return {
792
792
  baseUri: '/services/data/v65.0',
@@ -800,7 +800,7 @@ function createResourceRequest$4(config) {
800
800
  };
801
801
  }
802
802
 
803
- const adapterName$4 = 'createIdpConfiguration';
803
+ const adapterName$6 = 'createIdpConfiguration';
804
804
  const createIdpConfiguration_ConfigPropertyMetadata = [
805
805
  generateParamConfigMetadata('activationStatus', true, 2 /* Body */, 0 /* String */),
806
806
  generateParamConfigMetadata('description', true, 2 /* Body */, 0 /* String */),
@@ -810,11 +810,11 @@ const createIdpConfiguration_ConfigPropertyMetadata = [
810
810
  generateParamConfigMetadata('name', true, 2 /* Body */, 0 /* String */),
811
811
  generateParamConfigMetadata('schemaConfig', true, 2 /* Body */, 0 /* String */),
812
812
  ];
813
- const createIdpConfiguration_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, createIdpConfiguration_ConfigPropertyMetadata);
814
- const createResourceParams$4 = /*#__PURE__*/ createResourceParams$6(createIdpConfiguration_ConfigPropertyMetadata);
815
- function typeCheckConfig$4(untrustedConfig) {
813
+ const createIdpConfiguration_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, createIdpConfiguration_ConfigPropertyMetadata);
814
+ const createResourceParams$6 = /*#__PURE__*/ createResourceParams$8(createIdpConfiguration_ConfigPropertyMetadata);
815
+ function typeCheckConfig$6(untrustedConfig) {
816
816
  const config = {};
817
- typeCheckConfig$6(untrustedConfig, config, createIdpConfiguration_ConfigPropertyMetadata);
817
+ typeCheckConfig$8(untrustedConfig, config, createIdpConfiguration_ConfigPropertyMetadata);
818
818
  const untrustedConfig_fileConfig = untrustedConfig.fileConfig;
819
819
  if (untrustedIsObject(untrustedConfig_fileConfig)) {
820
820
  const untrustedConfig_fileConfig_object = {};
@@ -835,30 +835,30 @@ function typeCheckConfig$4(untrustedConfig) {
835
835
  }
836
836
  return config;
837
837
  }
838
- function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
838
+ function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
839
839
  if (!untrustedIsObject(untrustedConfig)) {
840
840
  return null;
841
841
  }
842
842
  if (process.env.NODE_ENV !== 'production') {
843
843
  validateConfig(untrustedConfig, configPropertyNames);
844
844
  }
845
- const config = typeCheckConfig$4(untrustedConfig);
845
+ const config = typeCheckConfig$6(untrustedConfig);
846
846
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
847
847
  return null;
848
848
  }
849
849
  return config;
850
850
  }
851
- function buildNetworkSnapshot$4(luvio, config, options) {
852
- const resourceParams = createResourceParams$4(config);
853
- const request = createResourceRequest$4(resourceParams);
851
+ function buildNetworkSnapshot$6(luvio, config, options) {
852
+ const resourceParams = createResourceParams$6(config);
853
+ const request = createResourceRequest$6(resourceParams);
854
854
  return luvio.dispatchResourceRequest(request, options)
855
855
  .then((response) => {
856
856
  return luvio.handleSuccessResponse(() => {
857
- const snapshot = ingestSuccess$3(luvio, resourceParams, response);
857
+ const snapshot = ingestSuccess$5(luvio, resourceParams, response);
858
858
  return luvio.storeBroadcast().then(() => snapshot);
859
859
  }, () => {
860
860
  const cache = new StoreKeyMap();
861
- getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
861
+ getResponseCacheKeys$6(cache, luvio, resourceParams, response.body);
862
862
  return cache;
863
863
  });
864
864
  }, (response) => {
@@ -868,33 +868,33 @@ function buildNetworkSnapshot$4(luvio, config, options) {
868
868
  }
869
869
  const createIdpConfigurationAdapterFactory = (luvio) => {
870
870
  return function createIdpConfiguration(untrustedConfig) {
871
- const config = validateAdapterConfig$4(untrustedConfig, createIdpConfiguration_ConfigPropertyNames);
871
+ const config = validateAdapterConfig$6(untrustedConfig, createIdpConfiguration_ConfigPropertyNames);
872
872
  // Invalid or incomplete config
873
873
  if (config === null) {
874
874
  throw new Error('Invalid config for "createIdpConfiguration"');
875
875
  }
876
- return buildNetworkSnapshot$4(luvio, config);
876
+ return buildNetworkSnapshot$6(luvio, config);
877
877
  };
878
878
  };
879
879
 
880
- function keyBuilder$6(luvio, params) {
881
- return keyBuilder$7(luvio, {
880
+ function keyBuilder$7(luvio, params) {
881
+ return keyBuilder$8(luvio, {
882
882
  id: params.urlParams.idOrApiName
883
883
  });
884
884
  }
885
- function getResponseCacheKeys$3(cacheKeyMap, luvio, resourceParams) {
886
- const key = keyBuilder$6(luvio, resourceParams);
885
+ function getResponseCacheKeys$5(cacheKeyMap, luvio, resourceParams) {
886
+ const key = keyBuilder$7(luvio, resourceParams);
887
887
  cacheKeyMap.set(key, {
888
888
  namespace: keyPrefix,
889
- representationName: RepresentationType$3,
889
+ representationName: RepresentationType$4,
890
890
  mergeable: false
891
891
  });
892
892
  }
893
893
  function evictSuccess(luvio, resourceParams) {
894
- const key = keyBuilder$6(luvio, resourceParams);
894
+ const key = keyBuilder$7(luvio, resourceParams);
895
895
  luvio.storeEvict(key);
896
896
  }
897
- function createResourceRequest$3(config) {
897
+ function createResourceRequest$5(config) {
898
898
  const headers = {};
899
899
  return {
900
900
  baseUri: '/services/data/v65.0',
@@ -908,33 +908,33 @@ function createResourceRequest$3(config) {
908
908
  };
909
909
  }
910
910
 
911
- const adapterName$3 = 'deleteIdpConfiguration';
911
+ const adapterName$5 = 'deleteIdpConfiguration';
912
912
  const deleteIdpConfiguration_ConfigPropertyMetadata = [
913
913
  generateParamConfigMetadata('idOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
914
914
  ];
915
- const deleteIdpConfiguration_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, deleteIdpConfiguration_ConfigPropertyMetadata);
916
- const createResourceParams$3 = /*#__PURE__*/ createResourceParams$6(deleteIdpConfiguration_ConfigPropertyMetadata);
917
- function typeCheckConfig$3(untrustedConfig) {
915
+ const deleteIdpConfiguration_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, deleteIdpConfiguration_ConfigPropertyMetadata);
916
+ const createResourceParams$5 = /*#__PURE__*/ createResourceParams$8(deleteIdpConfiguration_ConfigPropertyMetadata);
917
+ function typeCheckConfig$5(untrustedConfig) {
918
918
  const config = {};
919
- typeCheckConfig$6(untrustedConfig, config, deleteIdpConfiguration_ConfigPropertyMetadata);
919
+ typeCheckConfig$8(untrustedConfig, config, deleteIdpConfiguration_ConfigPropertyMetadata);
920
920
  return config;
921
921
  }
922
- function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
922
+ function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
923
923
  if (!untrustedIsObject(untrustedConfig)) {
924
924
  return null;
925
925
  }
926
926
  if (process.env.NODE_ENV !== 'production') {
927
927
  validateConfig(untrustedConfig, configPropertyNames);
928
928
  }
929
- const config = typeCheckConfig$3(untrustedConfig);
929
+ const config = typeCheckConfig$5(untrustedConfig);
930
930
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
931
931
  return null;
932
932
  }
933
933
  return config;
934
934
  }
935
- function buildNetworkSnapshot$3(luvio, config, options) {
936
- const resourceParams = createResourceParams$3(config);
937
- const request = createResourceRequest$3(resourceParams);
935
+ function buildNetworkSnapshot$5(luvio, config, options) {
936
+ const resourceParams = createResourceParams$5(config);
937
+ const request = createResourceRequest$5(resourceParams);
938
938
  return luvio.dispatchResourceRequest(request, options)
939
939
  .then(() => {
940
940
  return luvio.handleSuccessResponse(() => {
@@ -942,7 +942,7 @@ function buildNetworkSnapshot$3(luvio, config, options) {
942
942
  return luvio.storeBroadcast();
943
943
  }, () => {
944
944
  const cache = new StoreKeyMap();
945
- getResponseCacheKeys$3(cache, luvio, resourceParams);
945
+ getResponseCacheKeys$5(cache, luvio, resourceParams);
946
946
  return cache;
947
947
  });
948
948
  }, (response) => {
@@ -952,33 +952,33 @@ function buildNetworkSnapshot$3(luvio, config, options) {
952
952
  }
953
953
  const deleteIdpConfigurationAdapterFactory = (luvio) => {
954
954
  return function documentProcessingdeleteIdpConfiguration(untrustedConfig) {
955
- const config = validateAdapterConfig$3(untrustedConfig, deleteIdpConfiguration_ConfigPropertyNames);
955
+ const config = validateAdapterConfig$5(untrustedConfig, deleteIdpConfiguration_ConfigPropertyNames);
956
956
  // Invalid or incomplete config
957
957
  if (config === null) {
958
- throw new Error(`Invalid config for "${adapterName$3}"`);
958
+ throw new Error(`Invalid config for "${adapterName$5}"`);
959
959
  }
960
- return buildNetworkSnapshot$3(luvio, config);
960
+ return buildNetworkSnapshot$5(luvio, config);
961
961
  };
962
962
  };
963
963
 
964
- function select$5(luvio, params) {
965
- return select$7();
964
+ function select$8(luvio, params) {
965
+ return select$a();
966
966
  }
967
- function keyBuilder$5(luvio, params) {
968
- return keyBuilder$7(luvio, {
967
+ function keyBuilder$6(luvio, params) {
968
+ return keyBuilder$8(luvio, {
969
969
  id: params.urlParams.idOrApiName
970
970
  });
971
971
  }
972
- function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
973
- getTypeCacheKeys$3(storeKeyMap, luvio, response);
972
+ function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
973
+ getTypeCacheKeys$4(storeKeyMap, luvio, response);
974
974
  }
975
- function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
975
+ function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
976
976
  const { body } = response;
977
- const key = keyBuilder$5(luvio, resourceParams);
978
- luvio.storeIngest(key, ingest$3, body);
977
+ const key = keyBuilder$6(luvio, resourceParams);
978
+ luvio.storeIngest(key, ingest$4, body);
979
979
  const snapshot = luvio.storeLookup({
980
980
  recordId: key,
981
- node: select$5(),
981
+ node: select$8(),
982
982
  variables: {},
983
983
  }, snapshotRefresh);
984
984
  if (process.env.NODE_ENV !== 'production') {
@@ -990,18 +990,18 @@ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
990
990
  return snapshot;
991
991
  }
992
992
  function ingestError$2(luvio, params, error, snapshotRefresh) {
993
- const key = keyBuilder$5(luvio, params);
993
+ const key = keyBuilder$6(luvio, params);
994
994
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
995
995
  const storeMetadataParams = {
996
- ttl: TTL$2,
996
+ ttl: TTL$3,
997
997
  namespace: keyPrefix,
998
- version: VERSION$3,
999
- representationName: RepresentationType$3
998
+ version: VERSION$4,
999
+ representationName: RepresentationType$4
1000
1000
  };
1001
1001
  luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
1002
1002
  return errorSnapshot;
1003
1003
  }
1004
- function createResourceRequest$2(config) {
1004
+ function createResourceRequest$4(config) {
1005
1005
  const headers = {};
1006
1006
  return {
1007
1007
  baseUri: '/services/data/v65.0',
@@ -1015,60 +1015,60 @@ function createResourceRequest$2(config) {
1015
1015
  };
1016
1016
  }
1017
1017
 
1018
- const adapterName$2 = 'getIdpConfiguration';
1018
+ const adapterName$4 = 'getIdpConfiguration';
1019
1019
  const getIdpConfiguration_ConfigPropertyMetadata = [
1020
1020
  generateParamConfigMetadata('idOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
1021
1021
  ];
1022
- const getIdpConfiguration_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getIdpConfiguration_ConfigPropertyMetadata);
1023
- const createResourceParams$2 = /*#__PURE__*/ createResourceParams$6(getIdpConfiguration_ConfigPropertyMetadata);
1024
- function keyBuilder$4(luvio, config) {
1025
- const resourceParams = createResourceParams$2(config);
1026
- return keyBuilder$5(luvio, resourceParams);
1022
+ const getIdpConfiguration_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getIdpConfiguration_ConfigPropertyMetadata);
1023
+ const createResourceParams$4 = /*#__PURE__*/ createResourceParams$8(getIdpConfiguration_ConfigPropertyMetadata);
1024
+ function keyBuilder$5(luvio, config) {
1025
+ const resourceParams = createResourceParams$4(config);
1026
+ return keyBuilder$6(luvio, resourceParams);
1027
1027
  }
1028
- function typeCheckConfig$2(untrustedConfig) {
1028
+ function typeCheckConfig$4(untrustedConfig) {
1029
1029
  const config = {};
1030
- typeCheckConfig$6(untrustedConfig, config, getIdpConfiguration_ConfigPropertyMetadata);
1030
+ typeCheckConfig$8(untrustedConfig, config, getIdpConfiguration_ConfigPropertyMetadata);
1031
1031
  return config;
1032
1032
  }
1033
- function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
1033
+ function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
1034
1034
  if (!untrustedIsObject(untrustedConfig)) {
1035
1035
  return null;
1036
1036
  }
1037
1037
  if (process.env.NODE_ENV !== 'production') {
1038
1038
  validateConfig(untrustedConfig, configPropertyNames);
1039
1039
  }
1040
- const config = typeCheckConfig$2(untrustedConfig);
1040
+ const config = typeCheckConfig$4(untrustedConfig);
1041
1041
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
1042
1042
  return null;
1043
1043
  }
1044
1044
  return config;
1045
1045
  }
1046
1046
  function adapterFragment$2(luvio, config) {
1047
- createResourceParams$2(config);
1048
- return select$5();
1047
+ createResourceParams$4(config);
1048
+ return select$8();
1049
1049
  }
1050
1050
  function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
1051
- const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
1051
+ const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
1052
1052
  config,
1053
- resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
1053
+ resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
1054
1054
  });
1055
1055
  return luvio.storeBroadcast().then(() => snapshot);
1056
1056
  }
1057
1057
  function onFetchResponseError$2(luvio, config, resourceParams, response) {
1058
1058
  const snapshot = ingestError$2(luvio, resourceParams, response, {
1059
1059
  config,
1060
- resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
1060
+ resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
1061
1061
  });
1062
1062
  return luvio.storeBroadcast().then(() => snapshot);
1063
1063
  }
1064
- function buildNetworkSnapshot$2(luvio, config, options) {
1065
- const resourceParams = createResourceParams$2(config);
1066
- const request = createResourceRequest$2(resourceParams);
1064
+ function buildNetworkSnapshot$4(luvio, config, options) {
1065
+ const resourceParams = createResourceParams$4(config);
1066
+ const request = createResourceRequest$4(resourceParams);
1067
1067
  return luvio.dispatchResourceRequest(request, options)
1068
1068
  .then((response) => {
1069
1069
  return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
1070
1070
  const cache = new StoreKeyMap();
1071
- getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
1071
+ getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
1072
1072
  return cache;
1073
1073
  });
1074
1074
  }, (response) => {
@@ -1076,23 +1076,23 @@ function buildNetworkSnapshot$2(luvio, config, options) {
1076
1076
  });
1077
1077
  }
1078
1078
  function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
1079
- return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
1079
+ return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, undefined, false);
1080
1080
  }
1081
1081
  function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
1082
1082
  const { luvio, config } = context;
1083
1083
  const selector = {
1084
- recordId: keyBuilder$4(luvio, config),
1084
+ recordId: keyBuilder$5(luvio, config),
1085
1085
  node: adapterFragment$2(luvio, config),
1086
1086
  variables: {},
1087
1087
  };
1088
1088
  const cacheSnapshot = storeLookup(selector, {
1089
1089
  config,
1090
- resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
1090
+ resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
1091
1091
  });
1092
1092
  return cacheSnapshot;
1093
1093
  }
1094
1094
  const getIdpConfigurationAdapterFactory = (luvio) => function documentProcessing__getIdpConfiguration(untrustedConfig, requestContext) {
1095
- const config = validateAdapterConfig$2(untrustedConfig, getIdpConfiguration_ConfigPropertyNames);
1095
+ const config = validateAdapterConfig$4(untrustedConfig, getIdpConfiguration_ConfigPropertyNames);
1096
1096
  // Invalid or incomplete config
1097
1097
  if (config === null) {
1098
1098
  return null;
@@ -1101,7 +1101,100 @@ const getIdpConfigurationAdapterFactory = (luvio) => function documentProcessing
1101
1101
  buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
1102
1102
  };
1103
1103
 
1104
- function validate$4(obj, path = 'IdpContentTypeRepresentation') {
1104
+ function select$7(luvio, params) {
1105
+ return select$a();
1106
+ }
1107
+ function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
1108
+ getTypeCacheKeys$4(storeKeyMap, luvio, response);
1109
+ }
1110
+ function ingestSuccess$3(luvio, resourceParams, response) {
1111
+ const { body } = response;
1112
+ const key = keyBuilderFromType$1(luvio, body);
1113
+ luvio.storeIngest(key, ingest$4, body);
1114
+ const snapshot = luvio.storeLookup({
1115
+ recordId: key,
1116
+ node: select$7(),
1117
+ variables: {},
1118
+ });
1119
+ if (process.env.NODE_ENV !== 'production') {
1120
+ if (snapshot.state !== 'Fulfilled') {
1121
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1122
+ }
1123
+ }
1124
+ deepFreeze(snapshot.data);
1125
+ return snapshot;
1126
+ }
1127
+ function createResourceRequest$3(config) {
1128
+ const headers = {};
1129
+ return {
1130
+ baseUri: '/services/data/v65.0',
1131
+ basePath: '/ssot/document-processing/configurations/' + config.urlParams.idOrApiName + '',
1132
+ method: 'patch',
1133
+ body: config.body,
1134
+ urlParams: config.urlParams,
1135
+ queryParams: {},
1136
+ headers,
1137
+ priority: 'normal',
1138
+ };
1139
+ }
1140
+
1141
+ const adapterName$3 = 'updateIdpConfiguration';
1142
+ const updateIdpConfiguration_ConfigPropertyMetadata = [
1143
+ generateParamConfigMetadata('idOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
1144
+ generateParamConfigMetadata('activationStatus', true, 2 /* Body */, 0 /* String */),
1145
+ generateParamConfigMetadata('description', true, 2 /* Body */, 0 /* String */),
1146
+ generateParamConfigMetadata('label', true, 2 /* Body */, 0 /* String */),
1147
+ ];
1148
+ const updateIdpConfiguration_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, updateIdpConfiguration_ConfigPropertyMetadata);
1149
+ const createResourceParams$3 = /*#__PURE__*/ createResourceParams$8(updateIdpConfiguration_ConfigPropertyMetadata);
1150
+ function typeCheckConfig$3(untrustedConfig) {
1151
+ const config = {};
1152
+ typeCheckConfig$8(untrustedConfig, config, updateIdpConfiguration_ConfigPropertyMetadata);
1153
+ return config;
1154
+ }
1155
+ function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
1156
+ if (!untrustedIsObject(untrustedConfig)) {
1157
+ return null;
1158
+ }
1159
+ if (process.env.NODE_ENV !== 'production') {
1160
+ validateConfig(untrustedConfig, configPropertyNames);
1161
+ }
1162
+ const config = typeCheckConfig$3(untrustedConfig);
1163
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1164
+ return null;
1165
+ }
1166
+ return config;
1167
+ }
1168
+ function buildNetworkSnapshot$3(luvio, config, options) {
1169
+ const resourceParams = createResourceParams$3(config);
1170
+ const request = createResourceRequest$3(resourceParams);
1171
+ return luvio.dispatchResourceRequest(request, options)
1172
+ .then((response) => {
1173
+ return luvio.handleSuccessResponse(() => {
1174
+ const snapshot = ingestSuccess$3(luvio, resourceParams, response);
1175
+ return luvio.storeBroadcast().then(() => snapshot);
1176
+ }, () => {
1177
+ const cache = new StoreKeyMap();
1178
+ getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
1179
+ return cache;
1180
+ });
1181
+ }, (response) => {
1182
+ deepFreeze(response);
1183
+ throw response;
1184
+ });
1185
+ }
1186
+ const updateIdpConfigurationAdapterFactory = (luvio) => {
1187
+ return function updateIdpConfiguration(untrustedConfig) {
1188
+ const config = validateAdapterConfig$3(untrustedConfig, updateIdpConfiguration_ConfigPropertyNames);
1189
+ // Invalid or incomplete config
1190
+ if (config === null) {
1191
+ throw new Error('Invalid config for "updateIdpConfiguration"');
1192
+ }
1193
+ return buildNetworkSnapshot$3(luvio, config);
1194
+ };
1195
+ };
1196
+
1197
+ function validate$6(obj, path = 'IdpContentTypeRepresentation') {
1105
1198
  const v_error = (() => {
1106
1199
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1107
1200
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -1130,7 +1223,7 @@ function validate$4(obj, path = 'IdpContentTypeRepresentation') {
1130
1223
  return v_error === undefined ? null : v_error;
1131
1224
  }
1132
1225
 
1133
- function validate$3(obj, path = 'IdpSupportedModelRepresentation') {
1226
+ function validate$5(obj, path = 'IdpSupportedModelRepresentation') {
1134
1227
  const v_error = (() => {
1135
1228
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1136
1229
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -1164,9 +1257,9 @@ function validate$3(obj, path = 'IdpSupportedModelRepresentation') {
1164
1257
  return v_error === undefined ? null : v_error;
1165
1258
  }
1166
1259
 
1167
- const TTL$1 = 500;
1168
- const VERSION$2 = "bdf0262770f9e912af6b77a807f4d804";
1169
- function validate$2(obj, path = 'IdpGlobalConfigRepresentation') {
1260
+ const TTL$2 = 500;
1261
+ const VERSION$3 = "bdf0262770f9e912af6b77a807f4d804";
1262
+ function validate$4(obj, path = 'IdpGlobalConfigRepresentation') {
1170
1263
  const v_error = (() => {
1171
1264
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1172
1265
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -1179,7 +1272,7 @@ function validate$2(obj, path = 'IdpGlobalConfigRepresentation') {
1179
1272
  for (let i = 0; i < obj_supportedContentTypes.length; i++) {
1180
1273
  const obj_supportedContentTypes_item = obj_supportedContentTypes[i];
1181
1274
  const path_supportedContentTypes_item = path_supportedContentTypes + '[' + i + ']';
1182
- const referencepath_supportedContentTypes_itemValidationError = validate$4(obj_supportedContentTypes_item, path_supportedContentTypes_item);
1275
+ const referencepath_supportedContentTypes_itemValidationError = validate$6(obj_supportedContentTypes_item, path_supportedContentTypes_item);
1183
1276
  if (referencepath_supportedContentTypes_itemValidationError !== null) {
1184
1277
  let message = 'Object doesn\'t match IdpContentTypeRepresentation (at "' + path_supportedContentTypes_item + '")\n';
1185
1278
  message += referencepath_supportedContentTypes_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -1194,7 +1287,7 @@ function validate$2(obj, path = 'IdpGlobalConfigRepresentation') {
1194
1287
  for (let i = 0; i < obj_supportedModels.length; i++) {
1195
1288
  const obj_supportedModels_item = obj_supportedModels[i];
1196
1289
  const path_supportedModels_item = path_supportedModels + '[' + i + ']';
1197
- const referencepath_supportedModels_itemValidationError = validate$3(obj_supportedModels_item, path_supportedModels_item);
1290
+ const referencepath_supportedModels_itemValidationError = validate$5(obj_supportedModels_item, path_supportedModels_item);
1198
1291
  if (referencepath_supportedModels_itemValidationError !== null) {
1199
1292
  let message = 'Object doesn\'t match IdpSupportedModelRepresentation (at "' + path_supportedModels_item + '")\n';
1200
1293
  message += referencepath_supportedModels_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -1209,62 +1302,62 @@ function validate$2(obj, path = 'IdpGlobalConfigRepresentation') {
1209
1302
  })();
1210
1303
  return v_error === undefined ? null : v_error;
1211
1304
  }
1212
- const RepresentationType$2 = 'IdpGlobalConfigRepresentation';
1213
- function normalize$2(input, existing, path, luvio, store, timestamp) {
1305
+ const RepresentationType$3 = 'IdpGlobalConfigRepresentation';
1306
+ function normalize$3(input, existing, path, luvio, store, timestamp) {
1214
1307
  return input;
1215
1308
  }
1216
- const select$4 = function IdpGlobalConfigRepresentationSelect() {
1309
+ const select$6 = function IdpGlobalConfigRepresentationSelect() {
1217
1310
  return {
1218
1311
  kind: 'Fragment',
1219
- version: VERSION$2,
1312
+ version: VERSION$3,
1220
1313
  private: [],
1221
1314
  opaque: true
1222
1315
  };
1223
1316
  };
1224
- function equals$2(existing, incoming) {
1317
+ function equals$3(existing, incoming) {
1225
1318
  if (JSONStringify(incoming) !== JSONStringify(existing)) {
1226
1319
  return false;
1227
1320
  }
1228
1321
  return true;
1229
1322
  }
1230
- const ingest$2 = function IdpGlobalConfigRepresentationIngest(input, path, luvio, store, timestamp) {
1323
+ const ingest$3 = function IdpGlobalConfigRepresentationIngest(input, path, luvio, store, timestamp) {
1231
1324
  if (process.env.NODE_ENV !== 'production') {
1232
- const validateError = validate$2(input);
1325
+ const validateError = validate$4(input);
1233
1326
  if (validateError !== null) {
1234
1327
  throw validateError;
1235
1328
  }
1236
1329
  }
1237
1330
  const key = path.fullPath;
1238
- const ttlToUse = TTL$1;
1239
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "document-processing", VERSION$2, RepresentationType$2, equals$2);
1331
+ const ttlToUse = TTL$2;
1332
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "document-processing", VERSION$3, RepresentationType$3, equals$3);
1240
1333
  return createLink(key);
1241
1334
  };
1242
- function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
1335
+ function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
1243
1336
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1244
1337
  const rootKey = fullPathFactory();
1245
1338
  rootKeySet.set(rootKey, {
1246
1339
  namespace: keyPrefix,
1247
- representationName: RepresentationType$2,
1340
+ representationName: RepresentationType$3,
1248
1341
  mergeable: false
1249
1342
  });
1250
1343
  }
1251
1344
 
1252
- function select$3(luvio, params) {
1253
- return select$4();
1345
+ function select$5(luvio, params) {
1346
+ return select$6();
1254
1347
  }
1255
- function keyBuilder$3(luvio, params) {
1348
+ function keyBuilder$4(luvio, params) {
1256
1349
  return keyPrefix + '::IdpGlobalConfigRepresentation:(' + ')';
1257
1350
  }
1258
- function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
1259
- getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$3());
1351
+ function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
1352
+ getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$4());
1260
1353
  }
1261
- function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
1354
+ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
1262
1355
  const { body } = response;
1263
- const key = keyBuilder$3();
1264
- luvio.storeIngest(key, ingest$2, body);
1356
+ const key = keyBuilder$4();
1357
+ luvio.storeIngest(key, ingest$3, body);
1265
1358
  const snapshot = luvio.storeLookup({
1266
1359
  recordId: key,
1267
- node: select$3(),
1360
+ node: select$5(),
1268
1361
  variables: {},
1269
1362
  }, snapshotRefresh);
1270
1363
  if (process.env.NODE_ENV !== 'production') {
@@ -1276,18 +1369,18 @@ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
1276
1369
  return snapshot;
1277
1370
  }
1278
1371
  function ingestError$1(luvio, params, error, snapshotRefresh) {
1279
- const key = keyBuilder$3();
1372
+ const key = keyBuilder$4();
1280
1373
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1281
1374
  const storeMetadataParams = {
1282
- ttl: TTL$1,
1375
+ ttl: TTL$2,
1283
1376
  namespace: keyPrefix,
1284
- version: VERSION$2,
1285
- representationName: RepresentationType$2
1377
+ version: VERSION$3,
1378
+ representationName: RepresentationType$3
1286
1379
  };
1287
1380
  luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
1288
1381
  return errorSnapshot;
1289
1382
  }
1290
- function createResourceRequest$1(config) {
1383
+ function createResourceRequest$2(config) {
1291
1384
  const headers = {};
1292
1385
  return {
1293
1386
  baseUri: '/services/data/v65.0',
@@ -1301,57 +1394,57 @@ function createResourceRequest$1(config) {
1301
1394
  };
1302
1395
  }
1303
1396
 
1304
- const adapterName$1 = 'getIdpGlobalConfig';
1397
+ const adapterName$2 = 'getIdpGlobalConfig';
1305
1398
  const getIdpGlobalConfig_ConfigPropertyMetadata = [];
1306
- const getIdpGlobalConfig_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getIdpGlobalConfig_ConfigPropertyMetadata);
1307
- const createResourceParams$1 = /*#__PURE__*/ createResourceParams$6(getIdpGlobalConfig_ConfigPropertyMetadata);
1308
- function keyBuilder$2(luvio, config) {
1309
- createResourceParams$1(config);
1310
- return keyBuilder$3();
1399
+ const getIdpGlobalConfig_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getIdpGlobalConfig_ConfigPropertyMetadata);
1400
+ const createResourceParams$2 = /*#__PURE__*/ createResourceParams$8(getIdpGlobalConfig_ConfigPropertyMetadata);
1401
+ function keyBuilder$3(luvio, config) {
1402
+ createResourceParams$2(config);
1403
+ return keyBuilder$4();
1311
1404
  }
1312
- function typeCheckConfig$1(untrustedConfig) {
1405
+ function typeCheckConfig$2(untrustedConfig) {
1313
1406
  const config = {};
1314
1407
  return config;
1315
1408
  }
1316
- function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
1409
+ function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
1317
1410
  if (!untrustedIsObject(untrustedConfig)) {
1318
1411
  return null;
1319
1412
  }
1320
1413
  if (process.env.NODE_ENV !== 'production') {
1321
1414
  validateConfig(untrustedConfig, configPropertyNames);
1322
1415
  }
1323
- const config = typeCheckConfig$1();
1416
+ const config = typeCheckConfig$2();
1324
1417
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
1325
1418
  return null;
1326
1419
  }
1327
1420
  return config;
1328
1421
  }
1329
1422
  function adapterFragment$1(luvio, config) {
1330
- createResourceParams$1(config);
1331
- return select$3();
1423
+ createResourceParams$2(config);
1424
+ return select$5();
1332
1425
  }
1333
1426
  function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
1334
- const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
1427
+ const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
1335
1428
  config,
1336
- resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
1429
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
1337
1430
  });
1338
1431
  return luvio.storeBroadcast().then(() => snapshot);
1339
1432
  }
1340
1433
  function onFetchResponseError$1(luvio, config, resourceParams, response) {
1341
1434
  const snapshot = ingestError$1(luvio, resourceParams, response, {
1342
1435
  config,
1343
- resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
1436
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
1344
1437
  });
1345
1438
  return luvio.storeBroadcast().then(() => snapshot);
1346
1439
  }
1347
- function buildNetworkSnapshot$1(luvio, config, options) {
1348
- const resourceParams = createResourceParams$1(config);
1349
- const request = createResourceRequest$1();
1440
+ function buildNetworkSnapshot$2(luvio, config, options) {
1441
+ const resourceParams = createResourceParams$2(config);
1442
+ const request = createResourceRequest$2();
1350
1443
  return luvio.dispatchResourceRequest(request, options)
1351
1444
  .then((response) => {
1352
1445
  return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
1353
1446
  const cache = new StoreKeyMap();
1354
- getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
1447
+ getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
1355
1448
  return cache;
1356
1449
  });
1357
1450
  }, (response) => {
@@ -1359,23 +1452,23 @@ function buildNetworkSnapshot$1(luvio, config, options) {
1359
1452
  });
1360
1453
  }
1361
1454
  function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
1362
- return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
1455
+ return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
1363
1456
  }
1364
1457
  function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
1365
1458
  const { luvio, config } = context;
1366
1459
  const selector = {
1367
- recordId: keyBuilder$2(luvio, config),
1460
+ recordId: keyBuilder$3(luvio, config),
1368
1461
  node: adapterFragment$1(luvio, config),
1369
1462
  variables: {},
1370
1463
  };
1371
1464
  const cacheSnapshot = storeLookup(selector, {
1372
1465
  config,
1373
- resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
1466
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
1374
1467
  });
1375
1468
  return cacheSnapshot;
1376
1469
  }
1377
1470
  const getIdpGlobalConfigAdapterFactory = (luvio) => function documentProcessing__getIdpGlobalConfig(untrustedConfig, requestContext) {
1378
- const config = validateAdapterConfig$1(untrustedConfig, getIdpGlobalConfig_ConfigPropertyNames);
1471
+ const config = validateAdapterConfig$2(untrustedConfig, getIdpGlobalConfig_ConfigPropertyNames);
1379
1472
  // Invalid or incomplete config
1380
1473
  if (config === null) {
1381
1474
  return null;
@@ -1384,6 +1477,229 @@ const getIdpGlobalConfigAdapterFactory = (luvio) => function documentProcessing_
1384
1477
  buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
1385
1478
  };
1386
1479
 
1480
+ function validate$3(obj, path = 'IdpGenerateSchemaFileInputRepresentation') {
1481
+ const v_error = (() => {
1482
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1483
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1484
+ }
1485
+ const obj_fileId = obj.fileId;
1486
+ const path_fileId = path + '.fileId';
1487
+ if (typeof obj_fileId !== 'string') {
1488
+ return new TypeError('Expected "string" but received "' + typeof obj_fileId + '" (at "' + path_fileId + '")');
1489
+ }
1490
+ })();
1491
+ return v_error === undefined ? null : v_error;
1492
+ }
1493
+
1494
+ const TTL$1 = 1200000;
1495
+ const VERSION$2 = "4d8b7735653266ae435f6f1fcca047ad";
1496
+ function validate$2(obj, path = 'IdpGeneratedSchemaRepresentation') {
1497
+ const v_error = (() => {
1498
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1499
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1500
+ }
1501
+ const obj_error = obj.error;
1502
+ const path_error = path + '.error';
1503
+ let obj_error_union0 = null;
1504
+ const obj_error_union0_error = (() => {
1505
+ if (typeof obj_error !== 'string') {
1506
+ return new TypeError('Expected "string" but received "' + typeof obj_error + '" (at "' + path_error + '")');
1507
+ }
1508
+ })();
1509
+ if (obj_error_union0_error != null) {
1510
+ obj_error_union0 = obj_error_union0_error.message;
1511
+ }
1512
+ let obj_error_union1 = null;
1513
+ const obj_error_union1_error = (() => {
1514
+ if (obj_error !== null) {
1515
+ return new TypeError('Expected "null" but received "' + typeof obj_error + '" (at "' + path_error + '")');
1516
+ }
1517
+ })();
1518
+ if (obj_error_union1_error != null) {
1519
+ obj_error_union1 = obj_error_union1_error.message;
1520
+ }
1521
+ if (obj_error_union0 && obj_error_union1) {
1522
+ let message = 'Object doesn\'t match union (at "' + path_error + '")';
1523
+ message += '\n' + obj_error_union0.split('\n').map((line) => '\t' + line).join('\n');
1524
+ message += '\n' + obj_error_union1.split('\n').map((line) => '\t' + line).join('\n');
1525
+ return new TypeError(message);
1526
+ }
1527
+ const obj_schema = obj.schema;
1528
+ const path_schema = path + '.schema';
1529
+ if (typeof obj_schema !== 'string') {
1530
+ return new TypeError('Expected "string" but received "' + typeof obj_schema + '" (at "' + path_schema + '")');
1531
+ }
1532
+ })();
1533
+ return v_error === undefined ? null : v_error;
1534
+ }
1535
+ const RepresentationType$2 = 'IdpGeneratedSchemaRepresentation';
1536
+ function keyBuilder$2(luvio, config) {
1537
+ return keyPrefix + '::' + RepresentationType$2 + ':' + config.schema;
1538
+ }
1539
+ function keyBuilderFromType(luvio, object) {
1540
+ const keyParams = {
1541
+ schema: object.schema
1542
+ };
1543
+ return keyBuilder$2(luvio, keyParams);
1544
+ }
1545
+ function normalize$2(input, existing, path, luvio, store, timestamp) {
1546
+ return input;
1547
+ }
1548
+ const select$4 = function IdpGeneratedSchemaRepresentationSelect() {
1549
+ return {
1550
+ kind: 'Fragment',
1551
+ version: VERSION$2,
1552
+ private: [],
1553
+ selections: [
1554
+ {
1555
+ name: 'error',
1556
+ kind: 'Scalar'
1557
+ },
1558
+ {
1559
+ name: 'schema',
1560
+ kind: 'Scalar'
1561
+ }
1562
+ ]
1563
+ };
1564
+ };
1565
+ function equals$2(existing, incoming) {
1566
+ const existing_schema = existing.schema;
1567
+ const incoming_schema = incoming.schema;
1568
+ if (!(existing_schema === incoming_schema)) {
1569
+ return false;
1570
+ }
1571
+ const existing_error = existing.error;
1572
+ const incoming_error = incoming.error;
1573
+ if (!(existing_error === incoming_error)) {
1574
+ return false;
1575
+ }
1576
+ return true;
1577
+ }
1578
+ const ingest$2 = function IdpGeneratedSchemaRepresentationIngest(input, path, luvio, store, timestamp) {
1579
+ if (process.env.NODE_ENV !== 'production') {
1580
+ const validateError = validate$2(input);
1581
+ if (validateError !== null) {
1582
+ throw validateError;
1583
+ }
1584
+ }
1585
+ const key = keyBuilderFromType(luvio, input);
1586
+ const ttlToUse = TTL$1;
1587
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "document-processing", VERSION$2, RepresentationType$2, equals$2);
1588
+ return createLink(key);
1589
+ };
1590
+ function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
1591
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1592
+ const rootKey = keyBuilderFromType(luvio, input);
1593
+ rootKeySet.set(rootKey, {
1594
+ namespace: keyPrefix,
1595
+ representationName: RepresentationType$2,
1596
+ mergeable: false
1597
+ });
1598
+ }
1599
+
1600
+ function select$3(luvio, params) {
1601
+ return select$4();
1602
+ }
1603
+ function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
1604
+ getTypeCacheKeys$2(storeKeyMap, luvio, response);
1605
+ }
1606
+ function ingestSuccess$1(luvio, resourceParams, response) {
1607
+ const { body } = response;
1608
+ const key = keyBuilderFromType(luvio, body);
1609
+ luvio.storeIngest(key, ingest$2, body);
1610
+ const snapshot = luvio.storeLookup({
1611
+ recordId: key,
1612
+ node: select$3(),
1613
+ variables: {},
1614
+ });
1615
+ if (process.env.NODE_ENV !== 'production') {
1616
+ if (snapshot.state !== 'Fulfilled') {
1617
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1618
+ }
1619
+ }
1620
+ deepFreeze(snapshot.data);
1621
+ return snapshot;
1622
+ }
1623
+ function createResourceRequest$1(config) {
1624
+ const headers = {};
1625
+ return {
1626
+ baseUri: '/services/data/v65.0',
1627
+ basePath: '/ssot/document-processing/actions/generate-schema',
1628
+ method: 'post',
1629
+ body: config.body,
1630
+ urlParams: {},
1631
+ queryParams: {},
1632
+ headers,
1633
+ priority: 'normal',
1634
+ };
1635
+ }
1636
+
1637
+ const adapterName$1 = 'generateIdpConfigurationSchema';
1638
+ const generateIdpConfigurationSchema_ConfigPropertyMetadata = [
1639
+ generateParamConfigMetadata('files', true, 2 /* Body */, 4 /* Unsupported */, true),
1640
+ generateParamConfigMetadata('mlModel', true, 2 /* Body */, 0 /* String */),
1641
+ ];
1642
+ const generateIdpConfigurationSchema_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, generateIdpConfigurationSchema_ConfigPropertyMetadata);
1643
+ const createResourceParams$1 = /*#__PURE__*/ createResourceParams$8(generateIdpConfigurationSchema_ConfigPropertyMetadata);
1644
+ function typeCheckConfig$1(untrustedConfig) {
1645
+ const config = {};
1646
+ typeCheckConfig$8(untrustedConfig, config, generateIdpConfigurationSchema_ConfigPropertyMetadata);
1647
+ const untrustedConfig_files = untrustedConfig.files;
1648
+ if (ArrayIsArray$1(untrustedConfig_files)) {
1649
+ const untrustedConfig_files_array = [];
1650
+ for (let i = 0, arrayLength = untrustedConfig_files.length; i < arrayLength; i++) {
1651
+ const untrustedConfig_files_item = untrustedConfig_files[i];
1652
+ const referenceIdpGenerateSchemaFileInputRepresentationValidationError = validate$3(untrustedConfig_files_item);
1653
+ if (referenceIdpGenerateSchemaFileInputRepresentationValidationError === null) {
1654
+ untrustedConfig_files_array.push(untrustedConfig_files_item);
1655
+ }
1656
+ }
1657
+ config.files = untrustedConfig_files_array;
1658
+ }
1659
+ return config;
1660
+ }
1661
+ function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
1662
+ if (!untrustedIsObject(untrustedConfig)) {
1663
+ return null;
1664
+ }
1665
+ if (process.env.NODE_ENV !== 'production') {
1666
+ validateConfig(untrustedConfig, configPropertyNames);
1667
+ }
1668
+ const config = typeCheckConfig$1(untrustedConfig);
1669
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1670
+ return null;
1671
+ }
1672
+ return config;
1673
+ }
1674
+ function buildNetworkSnapshot$1(luvio, config, options) {
1675
+ const resourceParams = createResourceParams$1(config);
1676
+ const request = createResourceRequest$1(resourceParams);
1677
+ return luvio.dispatchResourceRequest(request, options)
1678
+ .then((response) => {
1679
+ return luvio.handleSuccessResponse(() => {
1680
+ const snapshot = ingestSuccess$1(luvio, resourceParams, response);
1681
+ return luvio.storeBroadcast().then(() => snapshot);
1682
+ }, () => {
1683
+ const cache = new StoreKeyMap();
1684
+ getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
1685
+ return cache;
1686
+ });
1687
+ }, (response) => {
1688
+ deepFreeze(response);
1689
+ throw response;
1690
+ });
1691
+ }
1692
+ const generateIdpConfigurationSchemaAdapterFactory = (luvio) => {
1693
+ return function generateIdpConfigurationSchema(untrustedConfig) {
1694
+ const config = validateAdapterConfig$1(untrustedConfig, generateIdpConfigurationSchema_ConfigPropertyNames);
1695
+ // Invalid or incomplete config
1696
+ if (config === null) {
1697
+ throw new Error('Invalid config for "generateIdpConfigurationSchema"');
1698
+ }
1699
+ return buildNetworkSnapshot$1(luvio, config);
1700
+ };
1701
+ };
1702
+
1387
1703
  const VERSION$1 = "fd5a71c6b42febaf6ada5e5a2c32c8f6";
1388
1704
  function validate$1(obj, path = 'IdpExtractedFileDataRepresenation') {
1389
1705
  const v_error = (() => {
@@ -1619,14 +1935,14 @@ const extractDataUsingIdpConfiguration_ConfigPropertyMetadata = [
1619
1935
  generateParamConfigMetadata('schemaConfig', true, 2 /* Body */, 0 /* String */),
1620
1936
  ];
1621
1937
  const extractDataUsingIdpConfiguration_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, extractDataUsingIdpConfiguration_ConfigPropertyMetadata);
1622
- const createResourceParams = /*#__PURE__*/ createResourceParams$6(extractDataUsingIdpConfiguration_ConfigPropertyMetadata);
1938
+ const createResourceParams = /*#__PURE__*/ createResourceParams$8(extractDataUsingIdpConfiguration_ConfigPropertyMetadata);
1623
1939
  function keyBuilder(luvio, config) {
1624
1940
  const resourceParams = createResourceParams(config);
1625
1941
  return keyBuilder$1(luvio, resourceParams);
1626
1942
  }
1627
1943
  function typeCheckConfig(untrustedConfig) {
1628
1944
  const config = {};
1629
- typeCheckConfig$6(untrustedConfig, config, extractDataUsingIdpConfiguration_ConfigPropertyMetadata);
1945
+ typeCheckConfig$8(untrustedConfig, config, extractDataUsingIdpConfiguration_ConfigPropertyMetadata);
1630
1946
  const untrustedConfig_files = untrustedConfig.files;
1631
1947
  if (ArrayIsArray$1(untrustedConfig_files)) {
1632
1948
  const untrustedConfig_files_array = [];
@@ -1718,4 +2034,4 @@ const extractDataUsingIdpConfigurationAdapterFactory = (luvio) => function docum
1718
2034
  buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
1719
2035
  };
1720
2036
 
1721
- export { createIdpConfigurationAdapterFactory, deleteIdpConfigurationAdapterFactory, extractDataUsingIdpConfigurationAdapterFactory, getIdpConfigurationAdapterFactory, getIdpConfigurationsAdapterFactory, getIdpGlobalConfigAdapterFactory };
2037
+ export { createIdpConfigurationAdapterFactory, deleteIdpConfigurationAdapterFactory, extractDataUsingIdpConfigurationAdapterFactory, generateIdpConfigurationSchemaAdapterFactory, getIdpConfigurationAdapterFactory, getIdpConfigurationsAdapterFactory, getIdpGlobalConfigAdapterFactory, updateIdpConfigurationAdapterFactory };