@salesforce/lds-adapters-cdp-document-processing 1.354.0-dev2 → 1.354.0-dev21

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.
Files changed (19) hide show
  1. package/dist/es/es2018/cdp-document-processing.js +645 -267
  2. package/dist/es/es2018/types/src/generated/adapters/createIdpConfiguration.d.ts +3 -0
  3. package/dist/es/es2018/types/src/generated/adapters/generateIdpConfigurationSchema.d.ts +17 -0
  4. package/dist/es/es2018/types/src/generated/adapters/updateIdpConfiguration.d.ts +18 -0
  5. package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +2 -0
  6. package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +3 -1
  7. package/dist/es/es2018/types/src/generated/resources/patchSsotDocumentProcessingConfigurationsByIdOrApiName.d.ts +17 -0
  8. package/dist/es/es2018/types/src/generated/resources/postSsotDocumentProcessingActionsGenerateSchema.d.ts +14 -0
  9. package/dist/es/es2018/types/src/generated/resources/postSsotDocumentProcessingConfigurations.d.ts +3 -0
  10. package/dist/es/es2018/types/src/generated/types/IdpConfigurationDetailsRepresentation.d.ts +36 -9
  11. package/dist/es/es2018/types/src/generated/types/IdpConfigurationInputRepresentation.d.ts +9 -1
  12. package/dist/es/es2018/types/src/generated/types/IdpConfigurationPatchInputRepresentation.d.ts +35 -0
  13. package/dist/es/es2018/types/src/generated/types/IdpGenerateSchemaFileInputRepresentation.d.ts +28 -0
  14. package/dist/es/es2018/types/src/generated/types/IdpGenerateSchemaInputRepresentation.d.ts +33 -0
  15. package/dist/es/es2018/types/src/generated/types/IdpGeneratedSchemaRepresentation.d.ts +41 -0
  16. package/package.json +3 -3
  17. package/sfdc/index.js +697 -313
  18. package/src/raml/api.raml +109 -2
  19. package/src/raml/luvio.raml +29 -3
@@ -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/v64.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,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$a = 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$9(luvio, params) {
767
+ return select$a();
718
768
  }
719
- function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
720
- getTypeCacheKeys$3(storeKeyMap, luvio, response);
769
+ function getResponseCacheKeys$6(storeKeyMap, luvio, resourceParams, response) {
770
+ getTypeCacheKeys$4(storeKeyMap, luvio, response);
721
771
  }
722
- function ingestSuccess$3(luvio, resourceParams, response) {
772
+ function ingestSuccess$5(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$9(),
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$6(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$6 = 'createIdpConfiguration';
754
804
  const createIdpConfiguration_ConfigPropertyMetadata = [
755
805
  generateParamConfigMetadata('activationStatus', true, 2 /* Body */, 0 /* String */),
756
806
  generateParamConfigMetadata('description', true, 2 /* Body */, 0 /* String */),
@@ -758,13 +808,14 @@ const createIdpConfiguration_ConfigPropertyMetadata = [
758
808
  generateParamConfigMetadata('label', true, 2 /* Body */, 0 /* String */),
759
809
  generateParamConfigMetadata('mlModel', true, 2 /* Body */, 0 /* String */),
760
810
  generateParamConfigMetadata('name', true, 2 /* Body */, 0 /* String */),
811
+ generateParamConfigMetadata('configMetadata', true, 2 /* Body */, 4 /* Unsupported */),
761
812
  generateParamConfigMetadata('schemaConfig', true, 2 /* Body */, 0 /* String */),
762
813
  ];
763
- const createIdpConfiguration_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, createIdpConfiguration_ConfigPropertyMetadata);
764
- const createResourceParams$4 = /*#__PURE__*/ createResourceParams$6(createIdpConfiguration_ConfigPropertyMetadata);
765
- function typeCheckConfig$4(untrustedConfig) {
814
+ const createIdpConfiguration_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, createIdpConfiguration_ConfigPropertyMetadata);
815
+ const createResourceParams$6 = /*#__PURE__*/ createResourceParams$8(createIdpConfiguration_ConfigPropertyMetadata);
816
+ function typeCheckConfig$6(untrustedConfig) {
766
817
  const config = {};
767
- typeCheckConfig$6(untrustedConfig, config, createIdpConfiguration_ConfigPropertyMetadata);
818
+ typeCheckConfig$8(untrustedConfig, config, createIdpConfiguration_ConfigPropertyMetadata);
768
819
  const untrustedConfig_fileConfig = untrustedConfig.fileConfig;
769
820
  if (untrustedIsObject(untrustedConfig_fileConfig)) {
770
821
  const untrustedConfig_fileConfig_object = {};
@@ -783,32 +834,43 @@ function typeCheckConfig$4(untrustedConfig) {
783
834
  config.fileConfig = untrustedConfig_fileConfig_object;
784
835
  }
785
836
  }
837
+ const untrustedConfig_configMetadata = untrustedConfig.configMetadata;
838
+ if (untrustedIsObject(untrustedConfig_configMetadata)) {
839
+ const untrustedConfig_configMetadata_object = {};
840
+ const untrustedConfig_configMetadata_builderType = untrustedConfig_configMetadata.builderType;
841
+ if (typeof untrustedConfig_configMetadata_builderType === 'string') {
842
+ untrustedConfig_configMetadata_object.builderType = untrustedConfig_configMetadata_builderType;
843
+ }
844
+ if (untrustedConfig_configMetadata_object !== undefined && Object.keys(untrustedConfig_configMetadata_object).length >= 0) {
845
+ config.configMetadata = untrustedConfig_configMetadata_object;
846
+ }
847
+ }
786
848
  return config;
787
849
  }
788
- function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
850
+ function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
789
851
  if (!untrustedIsObject(untrustedConfig)) {
790
852
  return null;
791
853
  }
792
854
  if (process.env.NODE_ENV !== 'production') {
793
855
  validateConfig(untrustedConfig, configPropertyNames);
794
856
  }
795
- const config = typeCheckConfig$4(untrustedConfig);
857
+ const config = typeCheckConfig$6(untrustedConfig);
796
858
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
797
859
  return null;
798
860
  }
799
861
  return config;
800
862
  }
801
- function buildNetworkSnapshot$4(luvio, config, options) {
802
- const resourceParams = createResourceParams$4(config);
803
- const request = createResourceRequest$4(resourceParams);
863
+ function buildNetworkSnapshot$6(luvio, config, options) {
864
+ const resourceParams = createResourceParams$6(config);
865
+ const request = createResourceRequest$6(resourceParams);
804
866
  return luvio.dispatchResourceRequest(request, options)
805
867
  .then((response) => {
806
868
  return luvio.handleSuccessResponse(() => {
807
- const snapshot = ingestSuccess$3(luvio, resourceParams, response);
869
+ const snapshot = ingestSuccess$5(luvio, resourceParams, response);
808
870
  return luvio.storeBroadcast().then(() => snapshot);
809
871
  }, () => {
810
872
  const cache = new StoreKeyMap();
811
- getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
873
+ getResponseCacheKeys$6(cache, luvio, resourceParams, response.body);
812
874
  return cache;
813
875
  });
814
876
  }, (response) => {
@@ -818,33 +880,33 @@ function buildNetworkSnapshot$4(luvio, config, options) {
818
880
  }
819
881
  const createIdpConfigurationAdapterFactory = (luvio) => {
820
882
  return function createIdpConfiguration(untrustedConfig) {
821
- const config = validateAdapterConfig$4(untrustedConfig, createIdpConfiguration_ConfigPropertyNames);
883
+ const config = validateAdapterConfig$6(untrustedConfig, createIdpConfiguration_ConfigPropertyNames);
822
884
  // Invalid or incomplete config
823
885
  if (config === null) {
824
886
  throw new Error('Invalid config for "createIdpConfiguration"');
825
887
  }
826
- return buildNetworkSnapshot$4(luvio, config);
888
+ return buildNetworkSnapshot$6(luvio, config);
827
889
  };
828
890
  };
829
891
 
830
- function keyBuilder$6(luvio, params) {
831
- return keyBuilder$7(luvio, {
832
- name: params.urlParams.idOrApiName
892
+ function keyBuilder$7(luvio, params) {
893
+ return keyBuilder$8(luvio, {
894
+ id: params.urlParams.idOrApiName
833
895
  });
834
896
  }
835
- function getResponseCacheKeys$3(cacheKeyMap, luvio, resourceParams) {
836
- const key = keyBuilder$6(luvio, resourceParams);
897
+ function getResponseCacheKeys$5(cacheKeyMap, luvio, resourceParams) {
898
+ const key = keyBuilder$7(luvio, resourceParams);
837
899
  cacheKeyMap.set(key, {
838
900
  namespace: keyPrefix,
839
- representationName: RepresentationType$3,
901
+ representationName: RepresentationType$4,
840
902
  mergeable: false
841
903
  });
842
904
  }
843
905
  function evictSuccess(luvio, resourceParams) {
844
- const key = keyBuilder$6(luvio, resourceParams);
906
+ const key = keyBuilder$7(luvio, resourceParams);
845
907
  luvio.storeEvict(key);
846
908
  }
847
- function createResourceRequest$3(config) {
909
+ function createResourceRequest$5(config) {
848
910
  const headers = {};
849
911
  return {
850
912
  baseUri: '/services/data/v64.0',
@@ -858,33 +920,33 @@ function createResourceRequest$3(config) {
858
920
  };
859
921
  }
860
922
 
861
- const adapterName$3 = 'deleteIdpConfiguration';
923
+ const adapterName$5 = 'deleteIdpConfiguration';
862
924
  const deleteIdpConfiguration_ConfigPropertyMetadata = [
863
925
  generateParamConfigMetadata('idOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
864
926
  ];
865
- const deleteIdpConfiguration_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, deleteIdpConfiguration_ConfigPropertyMetadata);
866
- const createResourceParams$3 = /*#__PURE__*/ createResourceParams$6(deleteIdpConfiguration_ConfigPropertyMetadata);
867
- function typeCheckConfig$3(untrustedConfig) {
927
+ const deleteIdpConfiguration_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, deleteIdpConfiguration_ConfigPropertyMetadata);
928
+ const createResourceParams$5 = /*#__PURE__*/ createResourceParams$8(deleteIdpConfiguration_ConfigPropertyMetadata);
929
+ function typeCheckConfig$5(untrustedConfig) {
868
930
  const config = {};
869
- typeCheckConfig$6(untrustedConfig, config, deleteIdpConfiguration_ConfigPropertyMetadata);
931
+ typeCheckConfig$8(untrustedConfig, config, deleteIdpConfiguration_ConfigPropertyMetadata);
870
932
  return config;
871
933
  }
872
- function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
934
+ function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
873
935
  if (!untrustedIsObject(untrustedConfig)) {
874
936
  return null;
875
937
  }
876
938
  if (process.env.NODE_ENV !== 'production') {
877
939
  validateConfig(untrustedConfig, configPropertyNames);
878
940
  }
879
- const config = typeCheckConfig$3(untrustedConfig);
941
+ const config = typeCheckConfig$5(untrustedConfig);
880
942
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
881
943
  return null;
882
944
  }
883
945
  return config;
884
946
  }
885
- function buildNetworkSnapshot$3(luvio, config, options) {
886
- const resourceParams = createResourceParams$3(config);
887
- const request = createResourceRequest$3(resourceParams);
947
+ function buildNetworkSnapshot$5(luvio, config, options) {
948
+ const resourceParams = createResourceParams$5(config);
949
+ const request = createResourceRequest$5(resourceParams);
888
950
  return luvio.dispatchResourceRequest(request, options)
889
951
  .then(() => {
890
952
  return luvio.handleSuccessResponse(() => {
@@ -892,7 +954,7 @@ function buildNetworkSnapshot$3(luvio, config, options) {
892
954
  return luvio.storeBroadcast();
893
955
  }, () => {
894
956
  const cache = new StoreKeyMap();
895
- getResponseCacheKeys$3(cache, luvio, resourceParams);
957
+ getResponseCacheKeys$5(cache, luvio, resourceParams);
896
958
  return cache;
897
959
  });
898
960
  }, (response) => {
@@ -902,33 +964,33 @@ function buildNetworkSnapshot$3(luvio, config, options) {
902
964
  }
903
965
  const deleteIdpConfigurationAdapterFactory = (luvio) => {
904
966
  return function documentProcessingdeleteIdpConfiguration(untrustedConfig) {
905
- const config = validateAdapterConfig$3(untrustedConfig, deleteIdpConfiguration_ConfigPropertyNames);
967
+ const config = validateAdapterConfig$5(untrustedConfig, deleteIdpConfiguration_ConfigPropertyNames);
906
968
  // Invalid or incomplete config
907
969
  if (config === null) {
908
- throw new Error(`Invalid config for "${adapterName$3}"`);
970
+ throw new Error(`Invalid config for "${adapterName$5}"`);
909
971
  }
910
- return buildNetworkSnapshot$3(luvio, config);
972
+ return buildNetworkSnapshot$5(luvio, config);
911
973
  };
912
974
  };
913
975
 
914
- function select$5(luvio, params) {
915
- return select$7();
976
+ function select$8(luvio, params) {
977
+ return select$a();
916
978
  }
917
- function keyBuilder$5(luvio, params) {
918
- return keyBuilder$7(luvio, {
919
- name: params.urlParams.idOrApiName
979
+ function keyBuilder$6(luvio, params) {
980
+ return keyBuilder$8(luvio, {
981
+ id: params.urlParams.idOrApiName
920
982
  });
921
983
  }
922
- function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
923
- getTypeCacheKeys$3(storeKeyMap, luvio, response);
984
+ function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
985
+ getTypeCacheKeys$4(storeKeyMap, luvio, response);
924
986
  }
925
- function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
987
+ function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
926
988
  const { body } = response;
927
- const key = keyBuilder$5(luvio, resourceParams);
928
- luvio.storeIngest(key, ingest$3, body);
989
+ const key = keyBuilder$6(luvio, resourceParams);
990
+ luvio.storeIngest(key, ingest$4, body);
929
991
  const snapshot = luvio.storeLookup({
930
992
  recordId: key,
931
- node: select$5(),
993
+ node: select$8(),
932
994
  variables: {},
933
995
  }, snapshotRefresh);
934
996
  if (process.env.NODE_ENV !== 'production') {
@@ -940,18 +1002,18 @@ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
940
1002
  return snapshot;
941
1003
  }
942
1004
  function ingestError$2(luvio, params, error, snapshotRefresh) {
943
- const key = keyBuilder$5(luvio, params);
1005
+ const key = keyBuilder$6(luvio, params);
944
1006
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
945
1007
  const storeMetadataParams = {
946
- ttl: TTL$2,
1008
+ ttl: TTL$3,
947
1009
  namespace: keyPrefix,
948
- version: VERSION$3,
949
- representationName: RepresentationType$3
1010
+ version: VERSION$4,
1011
+ representationName: RepresentationType$4
950
1012
  };
951
1013
  luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
952
1014
  return errorSnapshot;
953
1015
  }
954
- function createResourceRequest$2(config) {
1016
+ function createResourceRequest$4(config) {
955
1017
  const headers = {};
956
1018
  return {
957
1019
  baseUri: '/services/data/v64.0',
@@ -965,60 +1027,60 @@ function createResourceRequest$2(config) {
965
1027
  };
966
1028
  }
967
1029
 
968
- const adapterName$2 = 'getIdpConfiguration';
1030
+ const adapterName$4 = 'getIdpConfiguration';
969
1031
  const getIdpConfiguration_ConfigPropertyMetadata = [
970
1032
  generateParamConfigMetadata('idOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
971
1033
  ];
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);
1034
+ const getIdpConfiguration_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getIdpConfiguration_ConfigPropertyMetadata);
1035
+ const createResourceParams$4 = /*#__PURE__*/ createResourceParams$8(getIdpConfiguration_ConfigPropertyMetadata);
1036
+ function keyBuilder$5(luvio, config) {
1037
+ const resourceParams = createResourceParams$4(config);
1038
+ return keyBuilder$6(luvio, resourceParams);
977
1039
  }
978
- function typeCheckConfig$2(untrustedConfig) {
1040
+ function typeCheckConfig$4(untrustedConfig) {
979
1041
  const config = {};
980
- typeCheckConfig$6(untrustedConfig, config, getIdpConfiguration_ConfigPropertyMetadata);
1042
+ typeCheckConfig$8(untrustedConfig, config, getIdpConfiguration_ConfigPropertyMetadata);
981
1043
  return config;
982
1044
  }
983
- function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
1045
+ function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
984
1046
  if (!untrustedIsObject(untrustedConfig)) {
985
1047
  return null;
986
1048
  }
987
1049
  if (process.env.NODE_ENV !== 'production') {
988
1050
  validateConfig(untrustedConfig, configPropertyNames);
989
1051
  }
990
- const config = typeCheckConfig$2(untrustedConfig);
1052
+ const config = typeCheckConfig$4(untrustedConfig);
991
1053
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
992
1054
  return null;
993
1055
  }
994
1056
  return config;
995
1057
  }
996
1058
  function adapterFragment$2(luvio, config) {
997
- createResourceParams$2(config);
998
- return select$5();
1059
+ createResourceParams$4(config);
1060
+ return select$8();
999
1061
  }
1000
1062
  function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
1001
- const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
1063
+ const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
1002
1064
  config,
1003
- resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
1065
+ resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
1004
1066
  });
1005
1067
  return luvio.storeBroadcast().then(() => snapshot);
1006
1068
  }
1007
1069
  function onFetchResponseError$2(luvio, config, resourceParams, response) {
1008
1070
  const snapshot = ingestError$2(luvio, resourceParams, response, {
1009
1071
  config,
1010
- resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
1072
+ resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
1011
1073
  });
1012
1074
  return luvio.storeBroadcast().then(() => snapshot);
1013
1075
  }
1014
- function buildNetworkSnapshot$2(luvio, config, options) {
1015
- const resourceParams = createResourceParams$2(config);
1016
- const request = createResourceRequest$2(resourceParams);
1076
+ function buildNetworkSnapshot$4(luvio, config, options) {
1077
+ const resourceParams = createResourceParams$4(config);
1078
+ const request = createResourceRequest$4(resourceParams);
1017
1079
  return luvio.dispatchResourceRequest(request, options)
1018
1080
  .then((response) => {
1019
1081
  return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
1020
1082
  const cache = new StoreKeyMap();
1021
- getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
1083
+ getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
1022
1084
  return cache;
1023
1085
  });
1024
1086
  }, (response) => {
@@ -1026,23 +1088,23 @@ function buildNetworkSnapshot$2(luvio, config, options) {
1026
1088
  });
1027
1089
  }
1028
1090
  function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
1029
- return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
1091
+ return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, undefined, false);
1030
1092
  }
1031
1093
  function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
1032
1094
  const { luvio, config } = context;
1033
1095
  const selector = {
1034
- recordId: keyBuilder$4(luvio, config),
1096
+ recordId: keyBuilder$5(luvio, config),
1035
1097
  node: adapterFragment$2(luvio, config),
1036
1098
  variables: {},
1037
1099
  };
1038
1100
  const cacheSnapshot = storeLookup(selector, {
1039
1101
  config,
1040
- resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
1102
+ resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
1041
1103
  });
1042
1104
  return cacheSnapshot;
1043
1105
  }
1044
1106
  const getIdpConfigurationAdapterFactory = (luvio) => function documentProcessing__getIdpConfiguration(untrustedConfig, requestContext) {
1045
- const config = validateAdapterConfig$2(untrustedConfig, getIdpConfiguration_ConfigPropertyNames);
1107
+ const config = validateAdapterConfig$4(untrustedConfig, getIdpConfiguration_ConfigPropertyNames);
1046
1108
  // Invalid or incomplete config
1047
1109
  if (config === null) {
1048
1110
  return null;
@@ -1051,7 +1113,100 @@ const getIdpConfigurationAdapterFactory = (luvio) => function documentProcessing
1051
1113
  buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
1052
1114
  };
1053
1115
 
1054
- function validate$4(obj, path = 'IdpContentTypeRepresentation') {
1116
+ function select$7(luvio, params) {
1117
+ return select$a();
1118
+ }
1119
+ function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
1120
+ getTypeCacheKeys$4(storeKeyMap, luvio, response);
1121
+ }
1122
+ function ingestSuccess$3(luvio, resourceParams, response) {
1123
+ const { body } = response;
1124
+ const key = keyBuilderFromType$1(luvio, body);
1125
+ luvio.storeIngest(key, ingest$4, body);
1126
+ const snapshot = luvio.storeLookup({
1127
+ recordId: key,
1128
+ node: select$7(),
1129
+ variables: {},
1130
+ });
1131
+ if (process.env.NODE_ENV !== 'production') {
1132
+ if (snapshot.state !== 'Fulfilled') {
1133
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1134
+ }
1135
+ }
1136
+ deepFreeze(snapshot.data);
1137
+ return snapshot;
1138
+ }
1139
+ function createResourceRequest$3(config) {
1140
+ const headers = {};
1141
+ return {
1142
+ baseUri: '/services/data/v64.0',
1143
+ basePath: '/ssot/document-processing/configurations/' + config.urlParams.idOrApiName + '',
1144
+ method: 'patch',
1145
+ body: config.body,
1146
+ urlParams: config.urlParams,
1147
+ queryParams: {},
1148
+ headers,
1149
+ priority: 'normal',
1150
+ };
1151
+ }
1152
+
1153
+ const adapterName$3 = 'updateIdpConfiguration';
1154
+ const updateIdpConfiguration_ConfigPropertyMetadata = [
1155
+ generateParamConfigMetadata('idOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
1156
+ generateParamConfigMetadata('activationStatus', true, 2 /* Body */, 0 /* String */),
1157
+ generateParamConfigMetadata('description', true, 2 /* Body */, 0 /* String */),
1158
+ generateParamConfigMetadata('label', true, 2 /* Body */, 0 /* String */),
1159
+ ];
1160
+ const updateIdpConfiguration_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, updateIdpConfiguration_ConfigPropertyMetadata);
1161
+ const createResourceParams$3 = /*#__PURE__*/ createResourceParams$8(updateIdpConfiguration_ConfigPropertyMetadata);
1162
+ function typeCheckConfig$3(untrustedConfig) {
1163
+ const config = {};
1164
+ typeCheckConfig$8(untrustedConfig, config, updateIdpConfiguration_ConfigPropertyMetadata);
1165
+ return config;
1166
+ }
1167
+ function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
1168
+ if (!untrustedIsObject(untrustedConfig)) {
1169
+ return null;
1170
+ }
1171
+ if (process.env.NODE_ENV !== 'production') {
1172
+ validateConfig(untrustedConfig, configPropertyNames);
1173
+ }
1174
+ const config = typeCheckConfig$3(untrustedConfig);
1175
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1176
+ return null;
1177
+ }
1178
+ return config;
1179
+ }
1180
+ function buildNetworkSnapshot$3(luvio, config, options) {
1181
+ const resourceParams = createResourceParams$3(config);
1182
+ const request = createResourceRequest$3(resourceParams);
1183
+ return luvio.dispatchResourceRequest(request, options)
1184
+ .then((response) => {
1185
+ return luvio.handleSuccessResponse(() => {
1186
+ const snapshot = ingestSuccess$3(luvio, resourceParams, response);
1187
+ return luvio.storeBroadcast().then(() => snapshot);
1188
+ }, () => {
1189
+ const cache = new StoreKeyMap();
1190
+ getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
1191
+ return cache;
1192
+ });
1193
+ }, (response) => {
1194
+ deepFreeze(response);
1195
+ throw response;
1196
+ });
1197
+ }
1198
+ const updateIdpConfigurationAdapterFactory = (luvio) => {
1199
+ return function updateIdpConfiguration(untrustedConfig) {
1200
+ const config = validateAdapterConfig$3(untrustedConfig, updateIdpConfiguration_ConfigPropertyNames);
1201
+ // Invalid or incomplete config
1202
+ if (config === null) {
1203
+ throw new Error('Invalid config for "updateIdpConfiguration"');
1204
+ }
1205
+ return buildNetworkSnapshot$3(luvio, config);
1206
+ };
1207
+ };
1208
+
1209
+ function validate$6(obj, path = 'IdpContentTypeRepresentation') {
1055
1210
  const v_error = (() => {
1056
1211
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1057
1212
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -1080,7 +1235,7 @@ function validate$4(obj, path = 'IdpContentTypeRepresentation') {
1080
1235
  return v_error === undefined ? null : v_error;
1081
1236
  }
1082
1237
 
1083
- function validate$3(obj, path = 'IdpSupportedModelRepresentation') {
1238
+ function validate$5(obj, path = 'IdpSupportedModelRepresentation') {
1084
1239
  const v_error = (() => {
1085
1240
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1086
1241
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -1114,9 +1269,9 @@ function validate$3(obj, path = 'IdpSupportedModelRepresentation') {
1114
1269
  return v_error === undefined ? null : v_error;
1115
1270
  }
1116
1271
 
1117
- const TTL$1 = 500;
1118
- const VERSION$2 = "bdf0262770f9e912af6b77a807f4d804";
1119
- function validate$2(obj, path = 'IdpGlobalConfigRepresentation') {
1272
+ const TTL$2 = 500;
1273
+ const VERSION$3 = "bdf0262770f9e912af6b77a807f4d804";
1274
+ function validate$4(obj, path = 'IdpGlobalConfigRepresentation') {
1120
1275
  const v_error = (() => {
1121
1276
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1122
1277
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -1129,7 +1284,7 @@ function validate$2(obj, path = 'IdpGlobalConfigRepresentation') {
1129
1284
  for (let i = 0; i < obj_supportedContentTypes.length; i++) {
1130
1285
  const obj_supportedContentTypes_item = obj_supportedContentTypes[i];
1131
1286
  const path_supportedContentTypes_item = path_supportedContentTypes + '[' + i + ']';
1132
- const referencepath_supportedContentTypes_itemValidationError = validate$4(obj_supportedContentTypes_item, path_supportedContentTypes_item);
1287
+ const referencepath_supportedContentTypes_itemValidationError = validate$6(obj_supportedContentTypes_item, path_supportedContentTypes_item);
1133
1288
  if (referencepath_supportedContentTypes_itemValidationError !== null) {
1134
1289
  let message = 'Object doesn\'t match IdpContentTypeRepresentation (at "' + path_supportedContentTypes_item + '")\n';
1135
1290
  message += referencepath_supportedContentTypes_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -1144,7 +1299,7 @@ function validate$2(obj, path = 'IdpGlobalConfigRepresentation') {
1144
1299
  for (let i = 0; i < obj_supportedModels.length; i++) {
1145
1300
  const obj_supportedModels_item = obj_supportedModels[i];
1146
1301
  const path_supportedModels_item = path_supportedModels + '[' + i + ']';
1147
- const referencepath_supportedModels_itemValidationError = validate$3(obj_supportedModels_item, path_supportedModels_item);
1302
+ const referencepath_supportedModels_itemValidationError = validate$5(obj_supportedModels_item, path_supportedModels_item);
1148
1303
  if (referencepath_supportedModels_itemValidationError !== null) {
1149
1304
  let message = 'Object doesn\'t match IdpSupportedModelRepresentation (at "' + path_supportedModels_item + '")\n';
1150
1305
  message += referencepath_supportedModels_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -1159,62 +1314,62 @@ function validate$2(obj, path = 'IdpGlobalConfigRepresentation') {
1159
1314
  })();
1160
1315
  return v_error === undefined ? null : v_error;
1161
1316
  }
1162
- const RepresentationType$2 = 'IdpGlobalConfigRepresentation';
1163
- function normalize$2(input, existing, path, luvio, store, timestamp) {
1317
+ const RepresentationType$3 = 'IdpGlobalConfigRepresentation';
1318
+ function normalize$3(input, existing, path, luvio, store, timestamp) {
1164
1319
  return input;
1165
1320
  }
1166
- const select$4 = function IdpGlobalConfigRepresentationSelect() {
1321
+ const select$6 = function IdpGlobalConfigRepresentationSelect() {
1167
1322
  return {
1168
1323
  kind: 'Fragment',
1169
- version: VERSION$2,
1324
+ version: VERSION$3,
1170
1325
  private: [],
1171
1326
  opaque: true
1172
1327
  };
1173
1328
  };
1174
- function equals$2(existing, incoming) {
1329
+ function equals$3(existing, incoming) {
1175
1330
  if (JSONStringify(incoming) !== JSONStringify(existing)) {
1176
1331
  return false;
1177
1332
  }
1178
1333
  return true;
1179
1334
  }
1180
- const ingest$2 = function IdpGlobalConfigRepresentationIngest(input, path, luvio, store, timestamp) {
1335
+ const ingest$3 = function IdpGlobalConfigRepresentationIngest(input, path, luvio, store, timestamp) {
1181
1336
  if (process.env.NODE_ENV !== 'production') {
1182
- const validateError = validate$2(input);
1337
+ const validateError = validate$4(input);
1183
1338
  if (validateError !== null) {
1184
1339
  throw validateError;
1185
1340
  }
1186
1341
  }
1187
1342
  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);
1343
+ const ttlToUse = TTL$2;
1344
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "document-processing", VERSION$3, RepresentationType$3, equals$3);
1190
1345
  return createLink(key);
1191
1346
  };
1192
- function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
1347
+ function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
1193
1348
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1194
1349
  const rootKey = fullPathFactory();
1195
1350
  rootKeySet.set(rootKey, {
1196
1351
  namespace: keyPrefix,
1197
- representationName: RepresentationType$2,
1352
+ representationName: RepresentationType$3,
1198
1353
  mergeable: false
1199
1354
  });
1200
1355
  }
1201
1356
 
1202
- function select$3(luvio, params) {
1203
- return select$4();
1357
+ function select$5(luvio, params) {
1358
+ return select$6();
1204
1359
  }
1205
- function keyBuilder$3(luvio, params) {
1360
+ function keyBuilder$4(luvio, params) {
1206
1361
  return keyPrefix + '::IdpGlobalConfigRepresentation:(' + ')';
1207
1362
  }
1208
- function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
1209
- getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$3());
1363
+ function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
1364
+ getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$4());
1210
1365
  }
1211
- function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
1366
+ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
1212
1367
  const { body } = response;
1213
- const key = keyBuilder$3();
1214
- luvio.storeIngest(key, ingest$2, body);
1368
+ const key = keyBuilder$4();
1369
+ luvio.storeIngest(key, ingest$3, body);
1215
1370
  const snapshot = luvio.storeLookup({
1216
1371
  recordId: key,
1217
- node: select$3(),
1372
+ node: select$5(),
1218
1373
  variables: {},
1219
1374
  }, snapshotRefresh);
1220
1375
  if (process.env.NODE_ENV !== 'production') {
@@ -1226,18 +1381,18 @@ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
1226
1381
  return snapshot;
1227
1382
  }
1228
1383
  function ingestError$1(luvio, params, error, snapshotRefresh) {
1229
- const key = keyBuilder$3();
1384
+ const key = keyBuilder$4();
1230
1385
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1231
1386
  const storeMetadataParams = {
1232
- ttl: TTL$1,
1387
+ ttl: TTL$2,
1233
1388
  namespace: keyPrefix,
1234
- version: VERSION$2,
1235
- representationName: RepresentationType$2
1389
+ version: VERSION$3,
1390
+ representationName: RepresentationType$3
1236
1391
  };
1237
1392
  luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
1238
1393
  return errorSnapshot;
1239
1394
  }
1240
- function createResourceRequest$1(config) {
1395
+ function createResourceRequest$2(config) {
1241
1396
  const headers = {};
1242
1397
  return {
1243
1398
  baseUri: '/services/data/v64.0',
@@ -1251,57 +1406,57 @@ function createResourceRequest$1(config) {
1251
1406
  };
1252
1407
  }
1253
1408
 
1254
- const adapterName$1 = 'getIdpGlobalConfig';
1409
+ const adapterName$2 = 'getIdpGlobalConfig';
1255
1410
  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();
1411
+ const getIdpGlobalConfig_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getIdpGlobalConfig_ConfigPropertyMetadata);
1412
+ const createResourceParams$2 = /*#__PURE__*/ createResourceParams$8(getIdpGlobalConfig_ConfigPropertyMetadata);
1413
+ function keyBuilder$3(luvio, config) {
1414
+ createResourceParams$2(config);
1415
+ return keyBuilder$4();
1261
1416
  }
1262
- function typeCheckConfig$1(untrustedConfig) {
1417
+ function typeCheckConfig$2(untrustedConfig) {
1263
1418
  const config = {};
1264
1419
  return config;
1265
1420
  }
1266
- function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
1421
+ function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
1267
1422
  if (!untrustedIsObject(untrustedConfig)) {
1268
1423
  return null;
1269
1424
  }
1270
1425
  if (process.env.NODE_ENV !== 'production') {
1271
1426
  validateConfig(untrustedConfig, configPropertyNames);
1272
1427
  }
1273
- const config = typeCheckConfig$1();
1428
+ const config = typeCheckConfig$2();
1274
1429
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
1275
1430
  return null;
1276
1431
  }
1277
1432
  return config;
1278
1433
  }
1279
1434
  function adapterFragment$1(luvio, config) {
1280
- createResourceParams$1(config);
1281
- return select$3();
1435
+ createResourceParams$2(config);
1436
+ return select$5();
1282
1437
  }
1283
1438
  function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
1284
- const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
1439
+ const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
1285
1440
  config,
1286
- resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
1441
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
1287
1442
  });
1288
1443
  return luvio.storeBroadcast().then(() => snapshot);
1289
1444
  }
1290
1445
  function onFetchResponseError$1(luvio, config, resourceParams, response) {
1291
1446
  const snapshot = ingestError$1(luvio, resourceParams, response, {
1292
1447
  config,
1293
- resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
1448
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
1294
1449
  });
1295
1450
  return luvio.storeBroadcast().then(() => snapshot);
1296
1451
  }
1297
- function buildNetworkSnapshot$1(luvio, config, options) {
1298
- const resourceParams = createResourceParams$1(config);
1299
- const request = createResourceRequest$1();
1452
+ function buildNetworkSnapshot$2(luvio, config, options) {
1453
+ const resourceParams = createResourceParams$2(config);
1454
+ const request = createResourceRequest$2();
1300
1455
  return luvio.dispatchResourceRequest(request, options)
1301
1456
  .then((response) => {
1302
1457
  return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
1303
1458
  const cache = new StoreKeyMap();
1304
- getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
1459
+ getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
1305
1460
  return cache;
1306
1461
  });
1307
1462
  }, (response) => {
@@ -1309,23 +1464,23 @@ function buildNetworkSnapshot$1(luvio, config, options) {
1309
1464
  });
1310
1465
  }
1311
1466
  function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
1312
- return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
1467
+ return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
1313
1468
  }
1314
1469
  function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
1315
1470
  const { luvio, config } = context;
1316
1471
  const selector = {
1317
- recordId: keyBuilder$2(luvio, config),
1472
+ recordId: keyBuilder$3(luvio, config),
1318
1473
  node: adapterFragment$1(luvio, config),
1319
1474
  variables: {},
1320
1475
  };
1321
1476
  const cacheSnapshot = storeLookup(selector, {
1322
1477
  config,
1323
- resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
1478
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
1324
1479
  });
1325
1480
  return cacheSnapshot;
1326
1481
  }
1327
1482
  const getIdpGlobalConfigAdapterFactory = (luvio) => function documentProcessing__getIdpGlobalConfig(untrustedConfig, requestContext) {
1328
- const config = validateAdapterConfig$1(untrustedConfig, getIdpGlobalConfig_ConfigPropertyNames);
1483
+ const config = validateAdapterConfig$2(untrustedConfig, getIdpGlobalConfig_ConfigPropertyNames);
1329
1484
  // Invalid or incomplete config
1330
1485
  if (config === null) {
1331
1486
  return null;
@@ -1334,6 +1489,229 @@ const getIdpGlobalConfigAdapterFactory = (luvio) => function documentProcessing_
1334
1489
  buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
1335
1490
  };
1336
1491
 
1492
+ function validate$3(obj, path = 'IdpGenerateSchemaFileInputRepresentation') {
1493
+ const v_error = (() => {
1494
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1495
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1496
+ }
1497
+ const obj_fileId = obj.fileId;
1498
+ const path_fileId = path + '.fileId';
1499
+ if (typeof obj_fileId !== 'string') {
1500
+ return new TypeError('Expected "string" but received "' + typeof obj_fileId + '" (at "' + path_fileId + '")');
1501
+ }
1502
+ })();
1503
+ return v_error === undefined ? null : v_error;
1504
+ }
1505
+
1506
+ const TTL$1 = 1200000;
1507
+ const VERSION$2 = "4d8b7735653266ae435f6f1fcca047ad";
1508
+ function validate$2(obj, path = 'IdpGeneratedSchemaRepresentation') {
1509
+ const v_error = (() => {
1510
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1511
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1512
+ }
1513
+ const obj_error = obj.error;
1514
+ const path_error = path + '.error';
1515
+ let obj_error_union0 = null;
1516
+ const obj_error_union0_error = (() => {
1517
+ if (typeof obj_error !== 'string') {
1518
+ return new TypeError('Expected "string" but received "' + typeof obj_error + '" (at "' + path_error + '")');
1519
+ }
1520
+ })();
1521
+ if (obj_error_union0_error != null) {
1522
+ obj_error_union0 = obj_error_union0_error.message;
1523
+ }
1524
+ let obj_error_union1 = null;
1525
+ const obj_error_union1_error = (() => {
1526
+ if (obj_error !== null) {
1527
+ return new TypeError('Expected "null" but received "' + typeof obj_error + '" (at "' + path_error + '")');
1528
+ }
1529
+ })();
1530
+ if (obj_error_union1_error != null) {
1531
+ obj_error_union1 = obj_error_union1_error.message;
1532
+ }
1533
+ if (obj_error_union0 && obj_error_union1) {
1534
+ let message = 'Object doesn\'t match union (at "' + path_error + '")';
1535
+ message += '\n' + obj_error_union0.split('\n').map((line) => '\t' + line).join('\n');
1536
+ message += '\n' + obj_error_union1.split('\n').map((line) => '\t' + line).join('\n');
1537
+ return new TypeError(message);
1538
+ }
1539
+ const obj_schema = obj.schema;
1540
+ const path_schema = path + '.schema';
1541
+ if (typeof obj_schema !== 'string') {
1542
+ return new TypeError('Expected "string" but received "' + typeof obj_schema + '" (at "' + path_schema + '")');
1543
+ }
1544
+ })();
1545
+ return v_error === undefined ? null : v_error;
1546
+ }
1547
+ const RepresentationType$2 = 'IdpGeneratedSchemaRepresentation';
1548
+ function keyBuilder$2(luvio, config) {
1549
+ return keyPrefix + '::' + RepresentationType$2 + ':' + config.schema;
1550
+ }
1551
+ function keyBuilderFromType(luvio, object) {
1552
+ const keyParams = {
1553
+ schema: object.schema
1554
+ };
1555
+ return keyBuilder$2(luvio, keyParams);
1556
+ }
1557
+ function normalize$2(input, existing, path, luvio, store, timestamp) {
1558
+ return input;
1559
+ }
1560
+ const select$4 = function IdpGeneratedSchemaRepresentationSelect() {
1561
+ return {
1562
+ kind: 'Fragment',
1563
+ version: VERSION$2,
1564
+ private: [],
1565
+ selections: [
1566
+ {
1567
+ name: 'error',
1568
+ kind: 'Scalar'
1569
+ },
1570
+ {
1571
+ name: 'schema',
1572
+ kind: 'Scalar'
1573
+ }
1574
+ ]
1575
+ };
1576
+ };
1577
+ function equals$2(existing, incoming) {
1578
+ const existing_schema = existing.schema;
1579
+ const incoming_schema = incoming.schema;
1580
+ if (!(existing_schema === incoming_schema)) {
1581
+ return false;
1582
+ }
1583
+ const existing_error = existing.error;
1584
+ const incoming_error = incoming.error;
1585
+ if (!(existing_error === incoming_error)) {
1586
+ return false;
1587
+ }
1588
+ return true;
1589
+ }
1590
+ const ingest$2 = function IdpGeneratedSchemaRepresentationIngest(input, path, luvio, store, timestamp) {
1591
+ if (process.env.NODE_ENV !== 'production') {
1592
+ const validateError = validate$2(input);
1593
+ if (validateError !== null) {
1594
+ throw validateError;
1595
+ }
1596
+ }
1597
+ const key = keyBuilderFromType(luvio, input);
1598
+ const ttlToUse = TTL$1;
1599
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "document-processing", VERSION$2, RepresentationType$2, equals$2);
1600
+ return createLink(key);
1601
+ };
1602
+ function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
1603
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1604
+ const rootKey = keyBuilderFromType(luvio, input);
1605
+ rootKeySet.set(rootKey, {
1606
+ namespace: keyPrefix,
1607
+ representationName: RepresentationType$2,
1608
+ mergeable: false
1609
+ });
1610
+ }
1611
+
1612
+ function select$3(luvio, params) {
1613
+ return select$4();
1614
+ }
1615
+ function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
1616
+ getTypeCacheKeys$2(storeKeyMap, luvio, response);
1617
+ }
1618
+ function ingestSuccess$1(luvio, resourceParams, response) {
1619
+ const { body } = response;
1620
+ const key = keyBuilderFromType(luvio, body);
1621
+ luvio.storeIngest(key, ingest$2, body);
1622
+ const snapshot = luvio.storeLookup({
1623
+ recordId: key,
1624
+ node: select$3(),
1625
+ variables: {},
1626
+ });
1627
+ if (process.env.NODE_ENV !== 'production') {
1628
+ if (snapshot.state !== 'Fulfilled') {
1629
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1630
+ }
1631
+ }
1632
+ deepFreeze(snapshot.data);
1633
+ return snapshot;
1634
+ }
1635
+ function createResourceRequest$1(config) {
1636
+ const headers = {};
1637
+ return {
1638
+ baseUri: '/services/data/v64.0',
1639
+ basePath: '/ssot/document-processing/actions/generate-schema',
1640
+ method: 'post',
1641
+ body: config.body,
1642
+ urlParams: {},
1643
+ queryParams: {},
1644
+ headers,
1645
+ priority: 'normal',
1646
+ };
1647
+ }
1648
+
1649
+ const adapterName$1 = 'generateIdpConfigurationSchema';
1650
+ const generateIdpConfigurationSchema_ConfigPropertyMetadata = [
1651
+ generateParamConfigMetadata('files', true, 2 /* Body */, 4 /* Unsupported */, true),
1652
+ generateParamConfigMetadata('mlModel', true, 2 /* Body */, 0 /* String */),
1653
+ ];
1654
+ const generateIdpConfigurationSchema_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, generateIdpConfigurationSchema_ConfigPropertyMetadata);
1655
+ const createResourceParams$1 = /*#__PURE__*/ createResourceParams$8(generateIdpConfigurationSchema_ConfigPropertyMetadata);
1656
+ function typeCheckConfig$1(untrustedConfig) {
1657
+ const config = {};
1658
+ typeCheckConfig$8(untrustedConfig, config, generateIdpConfigurationSchema_ConfigPropertyMetadata);
1659
+ const untrustedConfig_files = untrustedConfig.files;
1660
+ if (ArrayIsArray$1(untrustedConfig_files)) {
1661
+ const untrustedConfig_files_array = [];
1662
+ for (let i = 0, arrayLength = untrustedConfig_files.length; i < arrayLength; i++) {
1663
+ const untrustedConfig_files_item = untrustedConfig_files[i];
1664
+ const referenceIdpGenerateSchemaFileInputRepresentationValidationError = validate$3(untrustedConfig_files_item);
1665
+ if (referenceIdpGenerateSchemaFileInputRepresentationValidationError === null) {
1666
+ untrustedConfig_files_array.push(untrustedConfig_files_item);
1667
+ }
1668
+ }
1669
+ config.files = untrustedConfig_files_array;
1670
+ }
1671
+ return config;
1672
+ }
1673
+ function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
1674
+ if (!untrustedIsObject(untrustedConfig)) {
1675
+ return null;
1676
+ }
1677
+ if (process.env.NODE_ENV !== 'production') {
1678
+ validateConfig(untrustedConfig, configPropertyNames);
1679
+ }
1680
+ const config = typeCheckConfig$1(untrustedConfig);
1681
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1682
+ return null;
1683
+ }
1684
+ return config;
1685
+ }
1686
+ function buildNetworkSnapshot$1(luvio, config, options) {
1687
+ const resourceParams = createResourceParams$1(config);
1688
+ const request = createResourceRequest$1(resourceParams);
1689
+ return luvio.dispatchResourceRequest(request, options)
1690
+ .then((response) => {
1691
+ return luvio.handleSuccessResponse(() => {
1692
+ const snapshot = ingestSuccess$1(luvio, resourceParams, response);
1693
+ return luvio.storeBroadcast().then(() => snapshot);
1694
+ }, () => {
1695
+ const cache = new StoreKeyMap();
1696
+ getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
1697
+ return cache;
1698
+ });
1699
+ }, (response) => {
1700
+ deepFreeze(response);
1701
+ throw response;
1702
+ });
1703
+ }
1704
+ const generateIdpConfigurationSchemaAdapterFactory = (luvio) => {
1705
+ return function generateIdpConfigurationSchema(untrustedConfig) {
1706
+ const config = validateAdapterConfig$1(untrustedConfig, generateIdpConfigurationSchema_ConfigPropertyNames);
1707
+ // Invalid or incomplete config
1708
+ if (config === null) {
1709
+ throw new Error('Invalid config for "generateIdpConfigurationSchema"');
1710
+ }
1711
+ return buildNetworkSnapshot$1(luvio, config);
1712
+ };
1713
+ };
1714
+
1337
1715
  const VERSION$1 = "fd5a71c6b42febaf6ada5e5a2c32c8f6";
1338
1716
  function validate$1(obj, path = 'IdpExtractedFileDataRepresenation') {
1339
1717
  const v_error = (() => {
@@ -1569,14 +1947,14 @@ const extractDataUsingIdpConfiguration_ConfigPropertyMetadata = [
1569
1947
  generateParamConfigMetadata('schemaConfig', true, 2 /* Body */, 0 /* String */),
1570
1948
  ];
1571
1949
  const extractDataUsingIdpConfiguration_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, extractDataUsingIdpConfiguration_ConfigPropertyMetadata);
1572
- const createResourceParams = /*#__PURE__*/ createResourceParams$6(extractDataUsingIdpConfiguration_ConfigPropertyMetadata);
1950
+ const createResourceParams = /*#__PURE__*/ createResourceParams$8(extractDataUsingIdpConfiguration_ConfigPropertyMetadata);
1573
1951
  function keyBuilder(luvio, config) {
1574
1952
  const resourceParams = createResourceParams(config);
1575
1953
  return keyBuilder$1(luvio, resourceParams);
1576
1954
  }
1577
1955
  function typeCheckConfig(untrustedConfig) {
1578
1956
  const config = {};
1579
- typeCheckConfig$6(untrustedConfig, config, extractDataUsingIdpConfiguration_ConfigPropertyMetadata);
1957
+ typeCheckConfig$8(untrustedConfig, config, extractDataUsingIdpConfiguration_ConfigPropertyMetadata);
1580
1958
  const untrustedConfig_files = untrustedConfig.files;
1581
1959
  if (ArrayIsArray$1(untrustedConfig_files)) {
1582
1960
  const untrustedConfig_files_array = [];
@@ -1668,4 +2046,4 @@ const extractDataUsingIdpConfigurationAdapterFactory = (luvio) => function docum
1668
2046
  buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
1669
2047
  };
1670
2048
 
1671
- export { createIdpConfigurationAdapterFactory, deleteIdpConfigurationAdapterFactory, extractDataUsingIdpConfigurationAdapterFactory, getIdpConfigurationAdapterFactory, getIdpConfigurationsAdapterFactory, getIdpGlobalConfigAdapterFactory };
2049
+ export { createIdpConfigurationAdapterFactory, deleteIdpConfigurationAdapterFactory, extractDataUsingIdpConfigurationAdapterFactory, generateIdpConfigurationSchemaAdapterFactory, getIdpConfigurationAdapterFactory, getIdpConfigurationsAdapterFactory, getIdpGlobalConfigAdapterFactory, updateIdpConfigurationAdapterFactory };