@salesforce/lds-adapters-cdp-document-processing 1.354.0-dev3 → 1.354.0-dev5

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$7, StoreKeyMap, createResourceParams as createResourceParams$7 } 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$b = 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$a(luvio, params) {
469
+ return select$b();
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$6(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$5(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$a(),
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$6(config) {
507
507
  const headers = {};
508
508
  return {
509
509
  baseUri: '/services/data/v64.0',
@@ -517,7 +517,7 @@ function createResourceRequest$5(config) {
517
517
  };
518
518
  }
519
519
 
520
- const adapterName$5 = 'getIdpConfigurations';
520
+ const adapterName$6 = '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$6, getIdpConfigurations_ConfigPropertyMetadata);
529
+ const createResourceParams$6 = /*#__PURE__*/ createResourceParams$7(getIdpConfigurations_ConfigPropertyMetadata);
530
+ function keyBuilder$9(luvio, config) {
531
+ const resourceParams = createResourceParams$6(config);
532
+ return keyBuilder$a(luvio, resourceParams);
533
533
  }
534
- function typeCheckConfig$5(untrustedConfig) {
534
+ function typeCheckConfig$6(untrustedConfig) {
535
535
  const config = {};
536
- typeCheckConfig$6(untrustedConfig, config, getIdpConfigurations_ConfigPropertyMetadata);
536
+ typeCheckConfig$7(untrustedConfig, config, getIdpConfigurations_ConfigPropertyMetadata);
537
537
  return config;
538
538
  }
539
- function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
539
+ function validateAdapterConfig$6(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$6(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$6(config);
554
+ return select$a();
555
555
  }
556
556
  function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
557
- const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
557
+ const snapshot = ingestSuccess$5(luvio, resourceParams, response, {
558
558
  config,
559
- resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
559
+ resolve: () => buildNetworkSnapshot$6(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$6(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$6(luvio, config, options) {
571
+ const resourceParams = createResourceParams$6(config);
572
+ const request = createResourceRequest$6(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$6(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$6, 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$6(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$6(untrustedConfig, getIdpConfigurations_ConfigPropertyNames);
602
602
  // Invalid or incomplete config
603
603
  if (config === null) {
604
604
  return null;
@@ -607,125 +607,175 @@ const getIdpConfigurationsAdapterFactory = (luvio) => function documentProcessin
607
607
  buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
608
608
  };
609
609
 
610
- const TTL$2 = 500;
611
- const VERSION$3 = "673ad526d1c602ea355962b1db5ce9d8";
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 + '")');
616
616
  }
617
+ const obj_createdBy = obj.createdBy;
618
+ const path_createdBy = path + '.createdBy';
619
+ if (obj_createdBy === undefined) {
620
+ return new TypeError('Expected "defined" but received "' + typeof obj_createdBy + '" (at "' + path_createdBy + '")');
621
+ }
622
+ const obj_createdDate = obj.createdDate;
623
+ const path_createdDate = path + '.createdDate';
624
+ if (typeof obj_createdDate !== 'string') {
625
+ return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
626
+ }
627
+ const obj_description = obj.description;
628
+ const path_description = path + '.description';
629
+ if (obj_description === undefined) {
630
+ return new TypeError('Expected "defined" but received "' + typeof obj_description + '" (at "' + path_description + '")');
631
+ }
632
+ const obj_id = obj.id;
633
+ const path_id = path + '.id';
634
+ if (typeof obj_id !== 'string') {
635
+ return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
636
+ }
637
+ const obj_label = obj.label;
638
+ const path_label = path + '.label';
639
+ if (typeof obj_label !== 'string') {
640
+ return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
641
+ }
642
+ const obj_lastModifiedBy = obj.lastModifiedBy;
643
+ const path_lastModifiedBy = path + '.lastModifiedBy';
644
+ if (obj_lastModifiedBy === undefined) {
645
+ return new TypeError('Expected "defined" but received "' + typeof obj_lastModifiedBy + '" (at "' + path_lastModifiedBy + '")');
646
+ }
647
+ const obj_lastModifiedDate = obj.lastModifiedDate;
648
+ const path_lastModifiedDate = path + '.lastModifiedDate';
649
+ if (typeof obj_lastModifiedDate !== 'string') {
650
+ return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
651
+ }
652
+ const obj_mlModel = obj.mlModel;
653
+ const path_mlModel = path + '.mlModel';
654
+ let obj_mlModel_union0 = null;
655
+ const obj_mlModel_union0_error = (() => {
656
+ if (typeof obj_mlModel !== 'string') {
657
+ return new TypeError('Expected "string" but received "' + typeof obj_mlModel + '" (at "' + path_mlModel + '")');
658
+ }
659
+ })();
660
+ if (obj_mlModel_union0_error != null) {
661
+ obj_mlModel_union0 = obj_mlModel_union0_error.message;
662
+ }
663
+ let obj_mlModel_union1 = null;
664
+ const obj_mlModel_union1_error = (() => {
665
+ if (obj_mlModel !== null) {
666
+ return new TypeError('Expected "null" but received "' + typeof obj_mlModel + '" (at "' + path_mlModel + '")');
667
+ }
668
+ })();
669
+ if (obj_mlModel_union1_error != null) {
670
+ obj_mlModel_union1 = obj_mlModel_union1_error.message;
671
+ }
672
+ if (obj_mlModel_union0 && obj_mlModel_union1) {
673
+ let message = 'Object doesn\'t match union (at "' + path_mlModel + '")';
674
+ message += '\n' + obj_mlModel_union0.split('\n').map((line) => '\t' + line).join('\n');
675
+ message += '\n' + obj_mlModel_union1.split('\n').map((line) => '\t' + line).join('\n');
676
+ return new TypeError(message);
677
+ }
617
678
  const obj_name = obj.name;
618
679
  const path_name = path + '.name';
619
680
  if (typeof obj_name !== 'string') {
620
681
  return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
621
682
  }
622
- const obj_schemaConfig = obj.schemaConfig;
623
- const path_schemaConfig = path + '.schemaConfig';
624
- let obj_schemaConfig_union0 = null;
625
- const obj_schemaConfig_union0_error = (() => {
626
- if (typeof obj_schemaConfig !== 'string') {
627
- return new TypeError('Expected "string" but received "' + typeof obj_schemaConfig + '" (at "' + path_schemaConfig + '")');
683
+ const obj_runtimeStatus = obj.runtimeStatus;
684
+ const path_runtimeStatus = path + '.runtimeStatus';
685
+ let obj_runtimeStatus_union0 = null;
686
+ const obj_runtimeStatus_union0_error = (() => {
687
+ if (typeof obj_runtimeStatus !== 'string') {
688
+ return new TypeError('Expected "string" but received "' + typeof obj_runtimeStatus + '" (at "' + path_runtimeStatus + '")');
628
689
  }
629
690
  })();
630
- if (obj_schemaConfig_union0_error != null) {
631
- obj_schemaConfig_union0 = obj_schemaConfig_union0_error.message;
691
+ if (obj_runtimeStatus_union0_error != null) {
692
+ obj_runtimeStatus_union0 = obj_runtimeStatus_union0_error.message;
632
693
  }
633
- let obj_schemaConfig_union1 = null;
634
- const obj_schemaConfig_union1_error = (() => {
635
- if (obj_schemaConfig !== null) {
636
- return new TypeError('Expected "null" but received "' + typeof obj_schemaConfig + '" (at "' + path_schemaConfig + '")');
694
+ let obj_runtimeStatus_union1 = null;
695
+ const obj_runtimeStatus_union1_error = (() => {
696
+ if (obj_runtimeStatus !== null) {
697
+ return new TypeError('Expected "null" but received "' + typeof obj_runtimeStatus + '" (at "' + path_runtimeStatus + '")');
637
698
  }
638
699
  })();
639
- if (obj_schemaConfig_union1_error != null) {
640
- obj_schemaConfig_union1 = obj_schemaConfig_union1_error.message;
700
+ if (obj_runtimeStatus_union1_error != null) {
701
+ obj_runtimeStatus_union1 = obj_runtimeStatus_union1_error.message;
641
702
  }
642
- if (obj_schemaConfig_union0 && obj_schemaConfig_union1) {
643
- let message = 'Object doesn\'t match union (at "' + path_schemaConfig + '")';
644
- message += '\n' + obj_schemaConfig_union0.split('\n').map((line) => '\t' + line).join('\n');
645
- message += '\n' + obj_schemaConfig_union1.split('\n').map((line) => '\t' + line).join('\n');
703
+ if (obj_runtimeStatus_union0 && obj_runtimeStatus_union1) {
704
+ let message = 'Object doesn\'t match union (at "' + path_runtimeStatus + '")';
705
+ message += '\n' + obj_runtimeStatus_union0.split('\n').map((line) => '\t' + line).join('\n');
706
+ message += '\n' + obj_runtimeStatus_union1.split('\n').map((line) => '\t' + line).join('\n');
646
707
  return new TypeError(message);
647
708
  }
709
+ const obj_schemaConfig = obj.schemaConfig;
710
+ const path_schemaConfig = path + '.schemaConfig';
711
+ if (typeof obj_schemaConfig !== 'string') {
712
+ return new TypeError('Expected "string" but received "' + typeof obj_schemaConfig + '" (at "' + path_schemaConfig + '")');
713
+ }
648
714
  })();
649
715
  return v_error === undefined ? null : v_error;
650
716
  }
651
- const RepresentationType$3 = 'IdpConfigurationDetailsRepresentation';
652
- function keyBuilder$7(luvio, config) {
653
- return keyPrefix + '::' + RepresentationType$3 + ':' + config.name;
717
+ const RepresentationType$4 = 'IdpConfigurationDetailsRepresentation';
718
+ function keyBuilder$8(luvio, config) {
719
+ return keyPrefix + '::' + RepresentationType$4 + ':' + config.id;
654
720
  }
655
- function keyBuilderFromType(luvio, object) {
721
+ function keyBuilderFromType$1(luvio, object) {
656
722
  const keyParams = {
657
- name: object.name
723
+ id: object.id
658
724
  };
659
- return keyBuilder$7(luvio, keyParams);
725
+ return keyBuilder$8(luvio, keyParams);
660
726
  }
661
- function normalize$3(input, existing, path, luvio, store, timestamp) {
727
+ function normalize$4(input, existing, path, luvio, store, timestamp) {
662
728
  return input;
663
729
  }
664
- const select$7 = function IdpConfigurationDetailsRepresentationSelect() {
730
+ const select$9 = function IdpConfigurationDetailsRepresentationSelect() {
665
731
  return {
666
732
  kind: 'Fragment',
667
- version: VERSION$3,
733
+ version: VERSION$4,
668
734
  private: [],
669
- selections: [
670
- {
671
- name: 'name',
672
- kind: 'Scalar'
673
- },
674
- {
675
- name: 'schemaConfig',
676
- kind: 'Scalar'
677
- }
678
- ]
735
+ opaque: true
679
736
  };
680
737
  };
681
- function equals$3(existing, incoming) {
682
- const existing_name = existing.name;
683
- const incoming_name = incoming.name;
684
- if (!(existing_name === incoming_name)) {
685
- return false;
686
- }
687
- const existing_schemaConfig = existing.schemaConfig;
688
- const incoming_schemaConfig = incoming.schemaConfig;
689
- if (!(existing_schemaConfig === incoming_schemaConfig)) {
738
+ function equals$4(existing, incoming) {
739
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
690
740
  return false;
691
741
  }
692
742
  return true;
693
743
  }
694
- const ingest$3 = function IdpConfigurationDetailsRepresentationIngest(input, path, luvio, store, timestamp) {
744
+ const ingest$4 = function IdpConfigurationDetailsRepresentationIngest(input, path, luvio, store, timestamp) {
695
745
  if (process.env.NODE_ENV !== 'production') {
696
- const validateError = validate$5(input);
746
+ const validateError = validate$7(input);
697
747
  if (validateError !== null) {
698
748
  throw validateError;
699
749
  }
700
750
  }
701
- const key = keyBuilderFromType(luvio, input);
702
- const ttlToUse = TTL$2;
703
- 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);
704
754
  return createLink(key);
705
755
  };
706
- function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
756
+ function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
707
757
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
708
- const rootKey = keyBuilderFromType(luvio, input);
758
+ const rootKey = keyBuilderFromType$1(luvio, input);
709
759
  rootKeySet.set(rootKey, {
710
760
  namespace: keyPrefix,
711
- representationName: RepresentationType$3,
761
+ representationName: RepresentationType$4,
712
762
  mergeable: false
713
763
  });
714
764
  }
715
765
 
716
- function select$6(luvio, params) {
717
- return select$7();
766
+ function select$8(luvio, params) {
767
+ return select$9();
718
768
  }
719
- function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
720
- getTypeCacheKeys$3(storeKeyMap, luvio, response);
769
+ function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
770
+ getTypeCacheKeys$4(storeKeyMap, luvio, response);
721
771
  }
722
- function ingestSuccess$3(luvio, resourceParams, response) {
772
+ function ingestSuccess$4(luvio, resourceParams, response) {
723
773
  const { body } = response;
724
- const key = keyBuilderFromType(luvio, body);
725
- luvio.storeIngest(key, ingest$3, body);
774
+ const key = keyBuilderFromType$1(luvio, body);
775
+ luvio.storeIngest(key, ingest$4, body);
726
776
  const snapshot = luvio.storeLookup({
727
777
  recordId: key,
728
- node: select$6(),
778
+ node: select$8(),
729
779
  variables: {},
730
780
  });
731
781
  if (process.env.NODE_ENV !== 'production') {
@@ -736,7 +786,7 @@ function ingestSuccess$3(luvio, resourceParams, response) {
736
786
  deepFreeze(snapshot.data);
737
787
  return snapshot;
738
788
  }
739
- function createResourceRequest$4(config) {
789
+ function createResourceRequest$5(config) {
740
790
  const headers = {};
741
791
  return {
742
792
  baseUri: '/services/data/v64.0',
@@ -750,7 +800,7 @@ function createResourceRequest$4(config) {
750
800
  };
751
801
  }
752
802
 
753
- const adapterName$4 = 'createIdpConfiguration';
803
+ const adapterName$5 = 'createIdpConfiguration';
754
804
  const createIdpConfiguration_ConfigPropertyMetadata = [
755
805
  generateParamConfigMetadata('activationStatus', true, 2 /* Body */, 0 /* String */),
756
806
  generateParamConfigMetadata('description', true, 2 /* Body */, 0 /* String */),
@@ -760,11 +810,11 @@ const createIdpConfiguration_ConfigPropertyMetadata = [
760
810
  generateParamConfigMetadata('name', true, 2 /* Body */, 0 /* String */),
761
811
  generateParamConfigMetadata('schemaConfig', true, 2 /* Body */, 0 /* String */),
762
812
  ];
763
- const createIdpConfiguration_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, createIdpConfiguration_ConfigPropertyMetadata);
764
- const createResourceParams$4 = /*#__PURE__*/ createResourceParams$6(createIdpConfiguration_ConfigPropertyMetadata);
765
- function typeCheckConfig$4(untrustedConfig) {
813
+ const createIdpConfiguration_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, createIdpConfiguration_ConfigPropertyMetadata);
814
+ const createResourceParams$5 = /*#__PURE__*/ createResourceParams$7(createIdpConfiguration_ConfigPropertyMetadata);
815
+ function typeCheckConfig$5(untrustedConfig) {
766
816
  const config = {};
767
- typeCheckConfig$6(untrustedConfig, config, createIdpConfiguration_ConfigPropertyMetadata);
817
+ typeCheckConfig$7(untrustedConfig, config, createIdpConfiguration_ConfigPropertyMetadata);
768
818
  const untrustedConfig_fileConfig = untrustedConfig.fileConfig;
769
819
  if (untrustedIsObject(untrustedConfig_fileConfig)) {
770
820
  const untrustedConfig_fileConfig_object = {};
@@ -785,30 +835,30 @@ function typeCheckConfig$4(untrustedConfig) {
785
835
  }
786
836
  return config;
787
837
  }
788
- function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
838
+ function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
789
839
  if (!untrustedIsObject(untrustedConfig)) {
790
840
  return null;
791
841
  }
792
842
  if (process.env.NODE_ENV !== 'production') {
793
843
  validateConfig(untrustedConfig, configPropertyNames);
794
844
  }
795
- const config = typeCheckConfig$4(untrustedConfig);
845
+ const config = typeCheckConfig$5(untrustedConfig);
796
846
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
797
847
  return null;
798
848
  }
799
849
  return config;
800
850
  }
801
- function buildNetworkSnapshot$4(luvio, config, options) {
802
- const resourceParams = createResourceParams$4(config);
803
- const request = createResourceRequest$4(resourceParams);
851
+ function buildNetworkSnapshot$5(luvio, config, options) {
852
+ const resourceParams = createResourceParams$5(config);
853
+ const request = createResourceRequest$5(resourceParams);
804
854
  return luvio.dispatchResourceRequest(request, options)
805
855
  .then((response) => {
806
856
  return luvio.handleSuccessResponse(() => {
807
- const snapshot = ingestSuccess$3(luvio, resourceParams, response);
857
+ const snapshot = ingestSuccess$4(luvio, resourceParams, response);
808
858
  return luvio.storeBroadcast().then(() => snapshot);
809
859
  }, () => {
810
860
  const cache = new StoreKeyMap();
811
- getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
861
+ getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
812
862
  return cache;
813
863
  });
814
864
  }, (response) => {
@@ -818,33 +868,33 @@ function buildNetworkSnapshot$4(luvio, config, options) {
818
868
  }
819
869
  const createIdpConfigurationAdapterFactory = (luvio) => {
820
870
  return function createIdpConfiguration(untrustedConfig) {
821
- const config = validateAdapterConfig$4(untrustedConfig, createIdpConfiguration_ConfigPropertyNames);
871
+ const config = validateAdapterConfig$5(untrustedConfig, createIdpConfiguration_ConfigPropertyNames);
822
872
  // Invalid or incomplete config
823
873
  if (config === null) {
824
874
  throw new Error('Invalid config for "createIdpConfiguration"');
825
875
  }
826
- return buildNetworkSnapshot$4(luvio, config);
876
+ return buildNetworkSnapshot$5(luvio, config);
827
877
  };
828
878
  };
829
879
 
830
- function keyBuilder$6(luvio, params) {
831
- return keyBuilder$7(luvio, {
832
- name: params.urlParams.idOrApiName
880
+ function keyBuilder$7(luvio, params) {
881
+ return keyBuilder$8(luvio, {
882
+ id: params.urlParams.idOrApiName
833
883
  });
834
884
  }
835
- function getResponseCacheKeys$3(cacheKeyMap, luvio, resourceParams) {
836
- const key = keyBuilder$6(luvio, resourceParams);
885
+ function getResponseCacheKeys$4(cacheKeyMap, luvio, resourceParams) {
886
+ const key = keyBuilder$7(luvio, resourceParams);
837
887
  cacheKeyMap.set(key, {
838
888
  namespace: keyPrefix,
839
- representationName: RepresentationType$3,
889
+ representationName: RepresentationType$4,
840
890
  mergeable: false
841
891
  });
842
892
  }
843
893
  function evictSuccess(luvio, resourceParams) {
844
- const key = keyBuilder$6(luvio, resourceParams);
894
+ const key = keyBuilder$7(luvio, resourceParams);
845
895
  luvio.storeEvict(key);
846
896
  }
847
- function createResourceRequest$3(config) {
897
+ function createResourceRequest$4(config) {
848
898
  const headers = {};
849
899
  return {
850
900
  baseUri: '/services/data/v64.0',
@@ -858,33 +908,33 @@ function createResourceRequest$3(config) {
858
908
  };
859
909
  }
860
910
 
861
- const adapterName$3 = 'deleteIdpConfiguration';
911
+ const adapterName$4 = 'deleteIdpConfiguration';
862
912
  const deleteIdpConfiguration_ConfigPropertyMetadata = [
863
913
  generateParamConfigMetadata('idOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
864
914
  ];
865
- const deleteIdpConfiguration_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, deleteIdpConfiguration_ConfigPropertyMetadata);
866
- const createResourceParams$3 = /*#__PURE__*/ createResourceParams$6(deleteIdpConfiguration_ConfigPropertyMetadata);
867
- function typeCheckConfig$3(untrustedConfig) {
915
+ const deleteIdpConfiguration_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, deleteIdpConfiguration_ConfigPropertyMetadata);
916
+ const createResourceParams$4 = /*#__PURE__*/ createResourceParams$7(deleteIdpConfiguration_ConfigPropertyMetadata);
917
+ function typeCheckConfig$4(untrustedConfig) {
868
918
  const config = {};
869
- typeCheckConfig$6(untrustedConfig, config, deleteIdpConfiguration_ConfigPropertyMetadata);
919
+ typeCheckConfig$7(untrustedConfig, config, deleteIdpConfiguration_ConfigPropertyMetadata);
870
920
  return config;
871
921
  }
872
- function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
922
+ function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
873
923
  if (!untrustedIsObject(untrustedConfig)) {
874
924
  return null;
875
925
  }
876
926
  if (process.env.NODE_ENV !== 'production') {
877
927
  validateConfig(untrustedConfig, configPropertyNames);
878
928
  }
879
- const config = typeCheckConfig$3(untrustedConfig);
929
+ const config = typeCheckConfig$4(untrustedConfig);
880
930
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
881
931
  return null;
882
932
  }
883
933
  return config;
884
934
  }
885
- function buildNetworkSnapshot$3(luvio, config, options) {
886
- const resourceParams = createResourceParams$3(config);
887
- const request = createResourceRequest$3(resourceParams);
935
+ function buildNetworkSnapshot$4(luvio, config, options) {
936
+ const resourceParams = createResourceParams$4(config);
937
+ const request = createResourceRequest$4(resourceParams);
888
938
  return luvio.dispatchResourceRequest(request, options)
889
939
  .then(() => {
890
940
  return luvio.handleSuccessResponse(() => {
@@ -892,7 +942,7 @@ function buildNetworkSnapshot$3(luvio, config, options) {
892
942
  return luvio.storeBroadcast();
893
943
  }, () => {
894
944
  const cache = new StoreKeyMap();
895
- getResponseCacheKeys$3(cache, luvio, resourceParams);
945
+ getResponseCacheKeys$4(cache, luvio, resourceParams);
896
946
  return cache;
897
947
  });
898
948
  }, (response) => {
@@ -902,33 +952,33 @@ function buildNetworkSnapshot$3(luvio, config, options) {
902
952
  }
903
953
  const deleteIdpConfigurationAdapterFactory = (luvio) => {
904
954
  return function documentProcessingdeleteIdpConfiguration(untrustedConfig) {
905
- const config = validateAdapterConfig$3(untrustedConfig, deleteIdpConfiguration_ConfigPropertyNames);
955
+ const config = validateAdapterConfig$4(untrustedConfig, deleteIdpConfiguration_ConfigPropertyNames);
906
956
  // Invalid or incomplete config
907
957
  if (config === null) {
908
- throw new Error(`Invalid config for "${adapterName$3}"`);
958
+ throw new Error(`Invalid config for "${adapterName$4}"`);
909
959
  }
910
- return buildNetworkSnapshot$3(luvio, config);
960
+ return buildNetworkSnapshot$4(luvio, config);
911
961
  };
912
962
  };
913
963
 
914
- function select$5(luvio, params) {
915
- return select$7();
964
+ function select$7(luvio, params) {
965
+ return select$9();
916
966
  }
917
- function keyBuilder$5(luvio, params) {
918
- return keyBuilder$7(luvio, {
919
- name: params.urlParams.idOrApiName
967
+ function keyBuilder$6(luvio, params) {
968
+ return keyBuilder$8(luvio, {
969
+ id: params.urlParams.idOrApiName
920
970
  });
921
971
  }
922
- function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
923
- getTypeCacheKeys$3(storeKeyMap, luvio, response);
972
+ function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
973
+ getTypeCacheKeys$4(storeKeyMap, luvio, response);
924
974
  }
925
- function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
975
+ function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
926
976
  const { body } = response;
927
- const key = keyBuilder$5(luvio, resourceParams);
928
- luvio.storeIngest(key, ingest$3, body);
977
+ const key = keyBuilder$6(luvio, resourceParams);
978
+ luvio.storeIngest(key, ingest$4, body);
929
979
  const snapshot = luvio.storeLookup({
930
980
  recordId: key,
931
- node: select$5(),
981
+ node: select$7(),
932
982
  variables: {},
933
983
  }, snapshotRefresh);
934
984
  if (process.env.NODE_ENV !== 'production') {
@@ -940,18 +990,18 @@ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
940
990
  return snapshot;
941
991
  }
942
992
  function ingestError$2(luvio, params, error, snapshotRefresh) {
943
- const key = keyBuilder$5(luvio, params);
993
+ const key = keyBuilder$6(luvio, params);
944
994
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
945
995
  const storeMetadataParams = {
946
- ttl: TTL$2,
996
+ ttl: TTL$3,
947
997
  namespace: keyPrefix,
948
- version: VERSION$3,
949
- representationName: RepresentationType$3
998
+ version: VERSION$4,
999
+ representationName: RepresentationType$4
950
1000
  };
951
1001
  luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
952
1002
  return errorSnapshot;
953
1003
  }
954
- function createResourceRequest$2(config) {
1004
+ function createResourceRequest$3(config) {
955
1005
  const headers = {};
956
1006
  return {
957
1007
  baseUri: '/services/data/v64.0',
@@ -965,60 +1015,60 @@ function createResourceRequest$2(config) {
965
1015
  };
966
1016
  }
967
1017
 
968
- const adapterName$2 = 'getIdpConfiguration';
1018
+ const adapterName$3 = 'getIdpConfiguration';
969
1019
  const getIdpConfiguration_ConfigPropertyMetadata = [
970
1020
  generateParamConfigMetadata('idOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
971
1021
  ];
972
- const getIdpConfiguration_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getIdpConfiguration_ConfigPropertyMetadata);
973
- const createResourceParams$2 = /*#__PURE__*/ createResourceParams$6(getIdpConfiguration_ConfigPropertyMetadata);
974
- function keyBuilder$4(luvio, config) {
975
- const resourceParams = createResourceParams$2(config);
976
- return keyBuilder$5(luvio, resourceParams);
1022
+ const getIdpConfiguration_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getIdpConfiguration_ConfigPropertyMetadata);
1023
+ const createResourceParams$3 = /*#__PURE__*/ createResourceParams$7(getIdpConfiguration_ConfigPropertyMetadata);
1024
+ function keyBuilder$5(luvio, config) {
1025
+ const resourceParams = createResourceParams$3(config);
1026
+ return keyBuilder$6(luvio, resourceParams);
977
1027
  }
978
- function typeCheckConfig$2(untrustedConfig) {
1028
+ function typeCheckConfig$3(untrustedConfig) {
979
1029
  const config = {};
980
- typeCheckConfig$6(untrustedConfig, config, getIdpConfiguration_ConfigPropertyMetadata);
1030
+ typeCheckConfig$7(untrustedConfig, config, getIdpConfiguration_ConfigPropertyMetadata);
981
1031
  return config;
982
1032
  }
983
- function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
1033
+ function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
984
1034
  if (!untrustedIsObject(untrustedConfig)) {
985
1035
  return null;
986
1036
  }
987
1037
  if (process.env.NODE_ENV !== 'production') {
988
1038
  validateConfig(untrustedConfig, configPropertyNames);
989
1039
  }
990
- const config = typeCheckConfig$2(untrustedConfig);
1040
+ const config = typeCheckConfig$3(untrustedConfig);
991
1041
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
992
1042
  return null;
993
1043
  }
994
1044
  return config;
995
1045
  }
996
1046
  function adapterFragment$2(luvio, config) {
997
- createResourceParams$2(config);
998
- return select$5();
1047
+ createResourceParams$3(config);
1048
+ return select$7();
999
1049
  }
1000
1050
  function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
1001
- const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
1051
+ const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
1002
1052
  config,
1003
- resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
1053
+ resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
1004
1054
  });
1005
1055
  return luvio.storeBroadcast().then(() => snapshot);
1006
1056
  }
1007
1057
  function onFetchResponseError$2(luvio, config, resourceParams, response) {
1008
1058
  const snapshot = ingestError$2(luvio, resourceParams, response, {
1009
1059
  config,
1010
- resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
1060
+ resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
1011
1061
  });
1012
1062
  return luvio.storeBroadcast().then(() => snapshot);
1013
1063
  }
1014
- function buildNetworkSnapshot$2(luvio, config, options) {
1015
- const resourceParams = createResourceParams$2(config);
1016
- const request = createResourceRequest$2(resourceParams);
1064
+ function buildNetworkSnapshot$3(luvio, config, options) {
1065
+ const resourceParams = createResourceParams$3(config);
1066
+ const request = createResourceRequest$3(resourceParams);
1017
1067
  return luvio.dispatchResourceRequest(request, options)
1018
1068
  .then((response) => {
1019
1069
  return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
1020
1070
  const cache = new StoreKeyMap();
1021
- getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
1071
+ getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
1022
1072
  return cache;
1023
1073
  });
1024
1074
  }, (response) => {
@@ -1026,23 +1076,23 @@ function buildNetworkSnapshot$2(luvio, config, options) {
1026
1076
  });
1027
1077
  }
1028
1078
  function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
1029
- return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
1079
+ return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
1030
1080
  }
1031
1081
  function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
1032
1082
  const { luvio, config } = context;
1033
1083
  const selector = {
1034
- recordId: keyBuilder$4(luvio, config),
1084
+ recordId: keyBuilder$5(luvio, config),
1035
1085
  node: adapterFragment$2(luvio, config),
1036
1086
  variables: {},
1037
1087
  };
1038
1088
  const cacheSnapshot = storeLookup(selector, {
1039
1089
  config,
1040
- resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
1090
+ resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
1041
1091
  });
1042
1092
  return cacheSnapshot;
1043
1093
  }
1044
1094
  const getIdpConfigurationAdapterFactory = (luvio) => function documentProcessing__getIdpConfiguration(untrustedConfig, requestContext) {
1045
- const config = validateAdapterConfig$2(untrustedConfig, getIdpConfiguration_ConfigPropertyNames);
1095
+ const config = validateAdapterConfig$3(untrustedConfig, getIdpConfiguration_ConfigPropertyNames);
1046
1096
  // Invalid or incomplete config
1047
1097
  if (config === null) {
1048
1098
  return null;
@@ -1051,7 +1101,7 @@ const getIdpConfigurationAdapterFactory = (luvio) => function documentProcessing
1051
1101
  buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
1052
1102
  };
1053
1103
 
1054
- function validate$4(obj, path = 'IdpContentTypeRepresentation') {
1104
+ function validate$6(obj, path = 'IdpContentTypeRepresentation') {
1055
1105
  const v_error = (() => {
1056
1106
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1057
1107
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -1080,7 +1130,7 @@ function validate$4(obj, path = 'IdpContentTypeRepresentation') {
1080
1130
  return v_error === undefined ? null : v_error;
1081
1131
  }
1082
1132
 
1083
- function validate$3(obj, path = 'IdpSupportedModelRepresentation') {
1133
+ function validate$5(obj, path = 'IdpSupportedModelRepresentation') {
1084
1134
  const v_error = (() => {
1085
1135
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1086
1136
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -1114,9 +1164,9 @@ function validate$3(obj, path = 'IdpSupportedModelRepresentation') {
1114
1164
  return v_error === undefined ? null : v_error;
1115
1165
  }
1116
1166
 
1117
- const TTL$1 = 500;
1118
- const VERSION$2 = "bdf0262770f9e912af6b77a807f4d804";
1119
- function validate$2(obj, path = 'IdpGlobalConfigRepresentation') {
1167
+ const TTL$2 = 500;
1168
+ const VERSION$3 = "bdf0262770f9e912af6b77a807f4d804";
1169
+ function validate$4(obj, path = 'IdpGlobalConfigRepresentation') {
1120
1170
  const v_error = (() => {
1121
1171
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1122
1172
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -1129,7 +1179,7 @@ function validate$2(obj, path = 'IdpGlobalConfigRepresentation') {
1129
1179
  for (let i = 0; i < obj_supportedContentTypes.length; i++) {
1130
1180
  const obj_supportedContentTypes_item = obj_supportedContentTypes[i];
1131
1181
  const path_supportedContentTypes_item = path_supportedContentTypes + '[' + i + ']';
1132
- const referencepath_supportedContentTypes_itemValidationError = validate$4(obj_supportedContentTypes_item, path_supportedContentTypes_item);
1182
+ const referencepath_supportedContentTypes_itemValidationError = validate$6(obj_supportedContentTypes_item, path_supportedContentTypes_item);
1133
1183
  if (referencepath_supportedContentTypes_itemValidationError !== null) {
1134
1184
  let message = 'Object doesn\'t match IdpContentTypeRepresentation (at "' + path_supportedContentTypes_item + '")\n';
1135
1185
  message += referencepath_supportedContentTypes_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -1144,7 +1194,7 @@ function validate$2(obj, path = 'IdpGlobalConfigRepresentation') {
1144
1194
  for (let i = 0; i < obj_supportedModels.length; i++) {
1145
1195
  const obj_supportedModels_item = obj_supportedModels[i];
1146
1196
  const path_supportedModels_item = path_supportedModels + '[' + i + ']';
1147
- const referencepath_supportedModels_itemValidationError = validate$3(obj_supportedModels_item, path_supportedModels_item);
1197
+ const referencepath_supportedModels_itemValidationError = validate$5(obj_supportedModels_item, path_supportedModels_item);
1148
1198
  if (referencepath_supportedModels_itemValidationError !== null) {
1149
1199
  let message = 'Object doesn\'t match IdpSupportedModelRepresentation (at "' + path_supportedModels_item + '")\n';
1150
1200
  message += referencepath_supportedModels_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -1159,62 +1209,62 @@ function validate$2(obj, path = 'IdpGlobalConfigRepresentation') {
1159
1209
  })();
1160
1210
  return v_error === undefined ? null : v_error;
1161
1211
  }
1162
- const RepresentationType$2 = 'IdpGlobalConfigRepresentation';
1163
- function normalize$2(input, existing, path, luvio, store, timestamp) {
1212
+ const RepresentationType$3 = 'IdpGlobalConfigRepresentation';
1213
+ function normalize$3(input, existing, path, luvio, store, timestamp) {
1164
1214
  return input;
1165
1215
  }
1166
- const select$4 = function IdpGlobalConfigRepresentationSelect() {
1216
+ const select$6 = function IdpGlobalConfigRepresentationSelect() {
1167
1217
  return {
1168
1218
  kind: 'Fragment',
1169
- version: VERSION$2,
1219
+ version: VERSION$3,
1170
1220
  private: [],
1171
1221
  opaque: true
1172
1222
  };
1173
1223
  };
1174
- function equals$2(existing, incoming) {
1224
+ function equals$3(existing, incoming) {
1175
1225
  if (JSONStringify(incoming) !== JSONStringify(existing)) {
1176
1226
  return false;
1177
1227
  }
1178
1228
  return true;
1179
1229
  }
1180
- const ingest$2 = function IdpGlobalConfigRepresentationIngest(input, path, luvio, store, timestamp) {
1230
+ const ingest$3 = function IdpGlobalConfigRepresentationIngest(input, path, luvio, store, timestamp) {
1181
1231
  if (process.env.NODE_ENV !== 'production') {
1182
- const validateError = validate$2(input);
1232
+ const validateError = validate$4(input);
1183
1233
  if (validateError !== null) {
1184
1234
  throw validateError;
1185
1235
  }
1186
1236
  }
1187
1237
  const key = path.fullPath;
1188
- const ttlToUse = TTL$1;
1189
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "document-processing", VERSION$2, RepresentationType$2, equals$2);
1238
+ const ttlToUse = TTL$2;
1239
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "document-processing", VERSION$3, RepresentationType$3, equals$3);
1190
1240
  return createLink(key);
1191
1241
  };
1192
- function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
1242
+ function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
1193
1243
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1194
1244
  const rootKey = fullPathFactory();
1195
1245
  rootKeySet.set(rootKey, {
1196
1246
  namespace: keyPrefix,
1197
- representationName: RepresentationType$2,
1247
+ representationName: RepresentationType$3,
1198
1248
  mergeable: false
1199
1249
  });
1200
1250
  }
1201
1251
 
1202
- function select$3(luvio, params) {
1203
- return select$4();
1252
+ function select$5(luvio, params) {
1253
+ return select$6();
1204
1254
  }
1205
- function keyBuilder$3(luvio, params) {
1255
+ function keyBuilder$4(luvio, params) {
1206
1256
  return keyPrefix + '::IdpGlobalConfigRepresentation:(' + ')';
1207
1257
  }
1208
- function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
1209
- getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$3());
1258
+ function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
1259
+ getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$4());
1210
1260
  }
1211
- function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
1261
+ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
1212
1262
  const { body } = response;
1213
- const key = keyBuilder$3();
1214
- luvio.storeIngest(key, ingest$2, body);
1263
+ const key = keyBuilder$4();
1264
+ luvio.storeIngest(key, ingest$3, body);
1215
1265
  const snapshot = luvio.storeLookup({
1216
1266
  recordId: key,
1217
- node: select$3(),
1267
+ node: select$5(),
1218
1268
  variables: {},
1219
1269
  }, snapshotRefresh);
1220
1270
  if (process.env.NODE_ENV !== 'production') {
@@ -1226,18 +1276,18 @@ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
1226
1276
  return snapshot;
1227
1277
  }
1228
1278
  function ingestError$1(luvio, params, error, snapshotRefresh) {
1229
- const key = keyBuilder$3();
1279
+ const key = keyBuilder$4();
1230
1280
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1231
1281
  const storeMetadataParams = {
1232
- ttl: TTL$1,
1282
+ ttl: TTL$2,
1233
1283
  namespace: keyPrefix,
1234
- version: VERSION$2,
1235
- representationName: RepresentationType$2
1284
+ version: VERSION$3,
1285
+ representationName: RepresentationType$3
1236
1286
  };
1237
1287
  luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
1238
1288
  return errorSnapshot;
1239
1289
  }
1240
- function createResourceRequest$1(config) {
1290
+ function createResourceRequest$2(config) {
1241
1291
  const headers = {};
1242
1292
  return {
1243
1293
  baseUri: '/services/data/v64.0',
@@ -1251,57 +1301,57 @@ function createResourceRequest$1(config) {
1251
1301
  };
1252
1302
  }
1253
1303
 
1254
- const adapterName$1 = 'getIdpGlobalConfig';
1304
+ const adapterName$2 = 'getIdpGlobalConfig';
1255
1305
  const getIdpGlobalConfig_ConfigPropertyMetadata = [];
1256
- const getIdpGlobalConfig_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getIdpGlobalConfig_ConfigPropertyMetadata);
1257
- const createResourceParams$1 = /*#__PURE__*/ createResourceParams$6(getIdpGlobalConfig_ConfigPropertyMetadata);
1258
- function keyBuilder$2(luvio, config) {
1259
- createResourceParams$1(config);
1260
- return keyBuilder$3();
1306
+ const getIdpGlobalConfig_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getIdpGlobalConfig_ConfigPropertyMetadata);
1307
+ const createResourceParams$2 = /*#__PURE__*/ createResourceParams$7(getIdpGlobalConfig_ConfigPropertyMetadata);
1308
+ function keyBuilder$3(luvio, config) {
1309
+ createResourceParams$2(config);
1310
+ return keyBuilder$4();
1261
1311
  }
1262
- function typeCheckConfig$1(untrustedConfig) {
1312
+ function typeCheckConfig$2(untrustedConfig) {
1263
1313
  const config = {};
1264
1314
  return config;
1265
1315
  }
1266
- function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
1316
+ function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
1267
1317
  if (!untrustedIsObject(untrustedConfig)) {
1268
1318
  return null;
1269
1319
  }
1270
1320
  if (process.env.NODE_ENV !== 'production') {
1271
1321
  validateConfig(untrustedConfig, configPropertyNames);
1272
1322
  }
1273
- const config = typeCheckConfig$1();
1323
+ const config = typeCheckConfig$2();
1274
1324
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
1275
1325
  return null;
1276
1326
  }
1277
1327
  return config;
1278
1328
  }
1279
1329
  function adapterFragment$1(luvio, config) {
1280
- createResourceParams$1(config);
1281
- return select$3();
1330
+ createResourceParams$2(config);
1331
+ return select$5();
1282
1332
  }
1283
1333
  function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
1284
- const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
1334
+ const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
1285
1335
  config,
1286
- resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
1336
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
1287
1337
  });
1288
1338
  return luvio.storeBroadcast().then(() => snapshot);
1289
1339
  }
1290
1340
  function onFetchResponseError$1(luvio, config, resourceParams, response) {
1291
1341
  const snapshot = ingestError$1(luvio, resourceParams, response, {
1292
1342
  config,
1293
- resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
1343
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
1294
1344
  });
1295
1345
  return luvio.storeBroadcast().then(() => snapshot);
1296
1346
  }
1297
- function buildNetworkSnapshot$1(luvio, config, options) {
1298
- const resourceParams = createResourceParams$1(config);
1299
- const request = createResourceRequest$1();
1347
+ function buildNetworkSnapshot$2(luvio, config, options) {
1348
+ const resourceParams = createResourceParams$2(config);
1349
+ const request = createResourceRequest$2();
1300
1350
  return luvio.dispatchResourceRequest(request, options)
1301
1351
  .then((response) => {
1302
1352
  return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
1303
1353
  const cache = new StoreKeyMap();
1304
- getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
1354
+ getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
1305
1355
  return cache;
1306
1356
  });
1307
1357
  }, (response) => {
@@ -1309,23 +1359,23 @@ function buildNetworkSnapshot$1(luvio, config, options) {
1309
1359
  });
1310
1360
  }
1311
1361
  function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
1312
- return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
1362
+ return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
1313
1363
  }
1314
1364
  function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
1315
1365
  const { luvio, config } = context;
1316
1366
  const selector = {
1317
- recordId: keyBuilder$2(luvio, config),
1367
+ recordId: keyBuilder$3(luvio, config),
1318
1368
  node: adapterFragment$1(luvio, config),
1319
1369
  variables: {},
1320
1370
  };
1321
1371
  const cacheSnapshot = storeLookup(selector, {
1322
1372
  config,
1323
- resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
1373
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
1324
1374
  });
1325
1375
  return cacheSnapshot;
1326
1376
  }
1327
1377
  const getIdpGlobalConfigAdapterFactory = (luvio) => function documentProcessing__getIdpGlobalConfig(untrustedConfig, requestContext) {
1328
- const config = validateAdapterConfig$1(untrustedConfig, getIdpGlobalConfig_ConfigPropertyNames);
1378
+ const config = validateAdapterConfig$2(untrustedConfig, getIdpGlobalConfig_ConfigPropertyNames);
1329
1379
  // Invalid or incomplete config
1330
1380
  if (config === null) {
1331
1381
  return null;
@@ -1334,6 +1384,229 @@ const getIdpGlobalConfigAdapterFactory = (luvio) => function documentProcessing_
1334
1384
  buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
1335
1385
  };
1336
1386
 
1387
+ function validate$3(obj, path = 'IdpGenerateSchemaFileInputRepresentation') {
1388
+ const v_error = (() => {
1389
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1390
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1391
+ }
1392
+ const obj_fileId = obj.fileId;
1393
+ const path_fileId = path + '.fileId';
1394
+ if (typeof obj_fileId !== 'string') {
1395
+ return new TypeError('Expected "string" but received "' + typeof obj_fileId + '" (at "' + path_fileId + '")');
1396
+ }
1397
+ })();
1398
+ return v_error === undefined ? null : v_error;
1399
+ }
1400
+
1401
+ const TTL$1 = 1200000;
1402
+ const VERSION$2 = "4d8b7735653266ae435f6f1fcca047ad";
1403
+ function validate$2(obj, path = 'IdpGeneratedSchemaRepresentation') {
1404
+ const v_error = (() => {
1405
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1406
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1407
+ }
1408
+ const obj_error = obj.error;
1409
+ const path_error = path + '.error';
1410
+ let obj_error_union0 = null;
1411
+ const obj_error_union0_error = (() => {
1412
+ if (typeof obj_error !== 'string') {
1413
+ return new TypeError('Expected "string" but received "' + typeof obj_error + '" (at "' + path_error + '")');
1414
+ }
1415
+ })();
1416
+ if (obj_error_union0_error != null) {
1417
+ obj_error_union0 = obj_error_union0_error.message;
1418
+ }
1419
+ let obj_error_union1 = null;
1420
+ const obj_error_union1_error = (() => {
1421
+ if (obj_error !== null) {
1422
+ return new TypeError('Expected "null" but received "' + typeof obj_error + '" (at "' + path_error + '")');
1423
+ }
1424
+ })();
1425
+ if (obj_error_union1_error != null) {
1426
+ obj_error_union1 = obj_error_union1_error.message;
1427
+ }
1428
+ if (obj_error_union0 && obj_error_union1) {
1429
+ let message = 'Object doesn\'t match union (at "' + path_error + '")';
1430
+ message += '\n' + obj_error_union0.split('\n').map((line) => '\t' + line).join('\n');
1431
+ message += '\n' + obj_error_union1.split('\n').map((line) => '\t' + line).join('\n');
1432
+ return new TypeError(message);
1433
+ }
1434
+ const obj_schema = obj.schema;
1435
+ const path_schema = path + '.schema';
1436
+ if (typeof obj_schema !== 'string') {
1437
+ return new TypeError('Expected "string" but received "' + typeof obj_schema + '" (at "' + path_schema + '")');
1438
+ }
1439
+ })();
1440
+ return v_error === undefined ? null : v_error;
1441
+ }
1442
+ const RepresentationType$2 = 'IdpGeneratedSchemaRepresentation';
1443
+ function keyBuilder$2(luvio, config) {
1444
+ return keyPrefix + '::' + RepresentationType$2 + ':' + config.schema;
1445
+ }
1446
+ function keyBuilderFromType(luvio, object) {
1447
+ const keyParams = {
1448
+ schema: object.schema
1449
+ };
1450
+ return keyBuilder$2(luvio, keyParams);
1451
+ }
1452
+ function normalize$2(input, existing, path, luvio, store, timestamp) {
1453
+ return input;
1454
+ }
1455
+ const select$4 = function IdpGeneratedSchemaRepresentationSelect() {
1456
+ return {
1457
+ kind: 'Fragment',
1458
+ version: VERSION$2,
1459
+ private: [],
1460
+ selections: [
1461
+ {
1462
+ name: 'error',
1463
+ kind: 'Scalar'
1464
+ },
1465
+ {
1466
+ name: 'schema',
1467
+ kind: 'Scalar'
1468
+ }
1469
+ ]
1470
+ };
1471
+ };
1472
+ function equals$2(existing, incoming) {
1473
+ const existing_schema = existing.schema;
1474
+ const incoming_schema = incoming.schema;
1475
+ if (!(existing_schema === incoming_schema)) {
1476
+ return false;
1477
+ }
1478
+ const existing_error = existing.error;
1479
+ const incoming_error = incoming.error;
1480
+ if (!(existing_error === incoming_error)) {
1481
+ return false;
1482
+ }
1483
+ return true;
1484
+ }
1485
+ const ingest$2 = function IdpGeneratedSchemaRepresentationIngest(input, path, luvio, store, timestamp) {
1486
+ if (process.env.NODE_ENV !== 'production') {
1487
+ const validateError = validate$2(input);
1488
+ if (validateError !== null) {
1489
+ throw validateError;
1490
+ }
1491
+ }
1492
+ const key = keyBuilderFromType(luvio, input);
1493
+ const ttlToUse = TTL$1;
1494
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "document-processing", VERSION$2, RepresentationType$2, equals$2);
1495
+ return createLink(key);
1496
+ };
1497
+ function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
1498
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1499
+ const rootKey = keyBuilderFromType(luvio, input);
1500
+ rootKeySet.set(rootKey, {
1501
+ namespace: keyPrefix,
1502
+ representationName: RepresentationType$2,
1503
+ mergeable: false
1504
+ });
1505
+ }
1506
+
1507
+ function select$3(luvio, params) {
1508
+ return select$4();
1509
+ }
1510
+ function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
1511
+ getTypeCacheKeys$2(storeKeyMap, luvio, response);
1512
+ }
1513
+ function ingestSuccess$1(luvio, resourceParams, response) {
1514
+ const { body } = response;
1515
+ const key = keyBuilderFromType(luvio, body);
1516
+ luvio.storeIngest(key, ingest$2, body);
1517
+ const snapshot = luvio.storeLookup({
1518
+ recordId: key,
1519
+ node: select$3(),
1520
+ variables: {},
1521
+ });
1522
+ if (process.env.NODE_ENV !== 'production') {
1523
+ if (snapshot.state !== 'Fulfilled') {
1524
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1525
+ }
1526
+ }
1527
+ deepFreeze(snapshot.data);
1528
+ return snapshot;
1529
+ }
1530
+ function createResourceRequest$1(config) {
1531
+ const headers = {};
1532
+ return {
1533
+ baseUri: '/services/data/v64.0',
1534
+ basePath: '/ssot/document-processing/actions/generate-schema',
1535
+ method: 'post',
1536
+ body: config.body,
1537
+ urlParams: {},
1538
+ queryParams: {},
1539
+ headers,
1540
+ priority: 'normal',
1541
+ };
1542
+ }
1543
+
1544
+ const adapterName$1 = 'generateIdpConfigurationSchema';
1545
+ const generateIdpConfigurationSchema_ConfigPropertyMetadata = [
1546
+ generateParamConfigMetadata('files', true, 2 /* Body */, 4 /* Unsupported */, true),
1547
+ generateParamConfigMetadata('mlModel', true, 2 /* Body */, 0 /* String */),
1548
+ ];
1549
+ const generateIdpConfigurationSchema_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, generateIdpConfigurationSchema_ConfigPropertyMetadata);
1550
+ const createResourceParams$1 = /*#__PURE__*/ createResourceParams$7(generateIdpConfigurationSchema_ConfigPropertyMetadata);
1551
+ function typeCheckConfig$1(untrustedConfig) {
1552
+ const config = {};
1553
+ typeCheckConfig$7(untrustedConfig, config, generateIdpConfigurationSchema_ConfigPropertyMetadata);
1554
+ const untrustedConfig_files = untrustedConfig.files;
1555
+ if (ArrayIsArray$1(untrustedConfig_files)) {
1556
+ const untrustedConfig_files_array = [];
1557
+ for (let i = 0, arrayLength = untrustedConfig_files.length; i < arrayLength; i++) {
1558
+ const untrustedConfig_files_item = untrustedConfig_files[i];
1559
+ const referenceIdpGenerateSchemaFileInputRepresentationValidationError = validate$3(untrustedConfig_files_item);
1560
+ if (referenceIdpGenerateSchemaFileInputRepresentationValidationError === null) {
1561
+ untrustedConfig_files_array.push(untrustedConfig_files_item);
1562
+ }
1563
+ }
1564
+ config.files = untrustedConfig_files_array;
1565
+ }
1566
+ return config;
1567
+ }
1568
+ function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
1569
+ if (!untrustedIsObject(untrustedConfig)) {
1570
+ return null;
1571
+ }
1572
+ if (process.env.NODE_ENV !== 'production') {
1573
+ validateConfig(untrustedConfig, configPropertyNames);
1574
+ }
1575
+ const config = typeCheckConfig$1(untrustedConfig);
1576
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1577
+ return null;
1578
+ }
1579
+ return config;
1580
+ }
1581
+ function buildNetworkSnapshot$1(luvio, config, options) {
1582
+ const resourceParams = createResourceParams$1(config);
1583
+ const request = createResourceRequest$1(resourceParams);
1584
+ return luvio.dispatchResourceRequest(request, options)
1585
+ .then((response) => {
1586
+ return luvio.handleSuccessResponse(() => {
1587
+ const snapshot = ingestSuccess$1(luvio, resourceParams, response);
1588
+ return luvio.storeBroadcast().then(() => snapshot);
1589
+ }, () => {
1590
+ const cache = new StoreKeyMap();
1591
+ getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
1592
+ return cache;
1593
+ });
1594
+ }, (response) => {
1595
+ deepFreeze(response);
1596
+ throw response;
1597
+ });
1598
+ }
1599
+ const generateIdpConfigurationSchemaAdapterFactory = (luvio) => {
1600
+ return function generateIdpConfigurationSchema(untrustedConfig) {
1601
+ const config = validateAdapterConfig$1(untrustedConfig, generateIdpConfigurationSchema_ConfigPropertyNames);
1602
+ // Invalid or incomplete config
1603
+ if (config === null) {
1604
+ throw new Error('Invalid config for "generateIdpConfigurationSchema"');
1605
+ }
1606
+ return buildNetworkSnapshot$1(luvio, config);
1607
+ };
1608
+ };
1609
+
1337
1610
  const VERSION$1 = "fd5a71c6b42febaf6ada5e5a2c32c8f6";
1338
1611
  function validate$1(obj, path = 'IdpExtractedFileDataRepresenation') {
1339
1612
  const v_error = (() => {
@@ -1569,14 +1842,14 @@ const extractDataUsingIdpConfiguration_ConfigPropertyMetadata = [
1569
1842
  generateParamConfigMetadata('schemaConfig', true, 2 /* Body */, 0 /* String */),
1570
1843
  ];
1571
1844
  const extractDataUsingIdpConfiguration_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, extractDataUsingIdpConfiguration_ConfigPropertyMetadata);
1572
- const createResourceParams = /*#__PURE__*/ createResourceParams$6(extractDataUsingIdpConfiguration_ConfigPropertyMetadata);
1845
+ const createResourceParams = /*#__PURE__*/ createResourceParams$7(extractDataUsingIdpConfiguration_ConfigPropertyMetadata);
1573
1846
  function keyBuilder(luvio, config) {
1574
1847
  const resourceParams = createResourceParams(config);
1575
1848
  return keyBuilder$1(luvio, resourceParams);
1576
1849
  }
1577
1850
  function typeCheckConfig(untrustedConfig) {
1578
1851
  const config = {};
1579
- typeCheckConfig$6(untrustedConfig, config, extractDataUsingIdpConfiguration_ConfigPropertyMetadata);
1852
+ typeCheckConfig$7(untrustedConfig, config, extractDataUsingIdpConfiguration_ConfigPropertyMetadata);
1580
1853
  const untrustedConfig_files = untrustedConfig.files;
1581
1854
  if (ArrayIsArray$1(untrustedConfig_files)) {
1582
1855
  const untrustedConfig_files_array = [];
@@ -1668,4 +1941,4 @@ const extractDataUsingIdpConfigurationAdapterFactory = (luvio) => function docum
1668
1941
  buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
1669
1942
  };
1670
1943
 
1671
- export { createIdpConfigurationAdapterFactory, deleteIdpConfigurationAdapterFactory, extractDataUsingIdpConfigurationAdapterFactory, getIdpConfigurationAdapterFactory, getIdpConfigurationsAdapterFactory, getIdpGlobalConfigAdapterFactory };
1944
+ export { createIdpConfigurationAdapterFactory, deleteIdpConfigurationAdapterFactory, extractDataUsingIdpConfigurationAdapterFactory, generateIdpConfigurationSchemaAdapterFactory, getIdpConfigurationAdapterFactory, getIdpConfigurationsAdapterFactory, getIdpGlobalConfigAdapterFactory };