@salesforce/lds-adapters-industries-docgen 1.245.0 → 1.247.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,7 +4,7 @@
4
4
  * For full license text, see the LICENSE.txt file
5
5
  */
6
6
 
7
- import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$7, typeCheckConfig as typeCheckConfig$b, StoreKeyMap, createResourceParams as createResourceParams$b } from '@luvio/engine';
7
+ import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$8, typeCheckConfig as typeCheckConfig$e, StoreKeyMap, createResourceParams as createResourceParams$e } from '@luvio/engine';
8
8
 
9
9
  const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
10
10
  const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
@@ -112,8 +112,8 @@ function createLink(ref) {
112
112
  };
113
113
  }
114
114
 
115
- const VERSION$h = "c0cdffc7d0ce780dd3dbd6844cb94df8";
116
- function validate$j(obj, path = 'ClauseCategoryResponse') {
115
+ const VERSION$l = "c0cdffc7d0ce780dd3dbd6844cb94df8";
116
+ function validate$n(obj, path = 'ClauseCategoryResponse') {
117
117
  const v_error = (() => {
118
118
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
119
119
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -138,10 +138,10 @@ function validate$j(obj, path = 'ClauseCategoryResponse') {
138
138
  })();
139
139
  return v_error === undefined ? null : v_error;
140
140
  }
141
- const select$s = function ClauseCategoryResponseSelect() {
141
+ const select$z = function ClauseCategoryResponseSelect() {
142
142
  return {
143
143
  kind: 'Fragment',
144
- version: VERSION$h,
144
+ version: VERSION$l,
145
145
  private: [],
146
146
  selections: [
147
147
  {
@@ -160,7 +160,7 @@ const select$s = function ClauseCategoryResponseSelect() {
160
160
  ]
161
161
  };
162
162
  };
163
- function equals$h(existing, incoming) {
163
+ function equals$l(existing, incoming) {
164
164
  const existing_id = existing.id;
165
165
  const incoming_id = incoming.id;
166
166
  // if at least one of these optionals is defined
@@ -188,8 +188,8 @@ function equals$h(existing, incoming) {
188
188
  }
189
189
 
190
190
  const TTL$6 = 30000;
191
- const VERSION$g = "6f04ab6a782443d237ece40b87b8d756";
192
- function validate$i(obj, path = 'ClauseCategoriesResponse') {
191
+ const VERSION$k = "6f04ab6a782443d237ece40b87b8d756";
192
+ function validate$m(obj, path = 'ClauseCategoriesResponse') {
193
193
  const v_error = (() => {
194
194
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
195
195
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -202,7 +202,7 @@ function validate$i(obj, path = 'ClauseCategoriesResponse') {
202
202
  for (let i = 0; i < obj_clauseCategories.length; i++) {
203
203
  const obj_clauseCategories_item = obj_clauseCategories[i];
204
204
  const path_clauseCategories_item = path_clauseCategories + '[' + i + ']';
205
- const referencepath_clauseCategories_itemValidationError = validate$j(obj_clauseCategories_item, path_clauseCategories_item);
205
+ const referencepath_clauseCategories_itemValidationError = validate$n(obj_clauseCategories_item, path_clauseCategories_item);
206
206
  if (referencepath_clauseCategories_itemValidationError !== null) {
207
207
  let message = 'Object doesn\'t match ClauseCategoryResponse (at "' + path_clauseCategories_item + '")\n';
208
208
  message += referencepath_clauseCategories_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -212,15 +212,15 @@ function validate$i(obj, path = 'ClauseCategoriesResponse') {
212
212
  })();
213
213
  return v_error === undefined ? null : v_error;
214
214
  }
215
- const RepresentationType$a = 'ClauseCategoriesResponse';
216
- function normalize$a(input, existing, path, luvio, store, timestamp) {
215
+ const RepresentationType$c = 'ClauseCategoriesResponse';
216
+ function normalize$c(input, existing, path, luvio, store, timestamp) {
217
217
  return input;
218
218
  }
219
- const select$r = function ClauseCategoriesResponseSelect() {
220
- const { selections: ClauseCategoryResponse__selections, opaque: ClauseCategoryResponse__opaque, } = select$s();
219
+ const select$y = function ClauseCategoriesResponseSelect() {
220
+ const { selections: ClauseCategoryResponse__selections, opaque: ClauseCategoryResponse__opaque, } = select$z();
221
221
  return {
222
222
  kind: 'Fragment',
223
- version: VERSION$g,
223
+ version: VERSION$k,
224
224
  private: [],
225
225
  selections: [
226
226
  {
@@ -232,11 +232,11 @@ const select$r = function ClauseCategoriesResponseSelect() {
232
232
  ]
233
233
  };
234
234
  };
235
- function equals$g(existing, incoming) {
235
+ function equals$k(existing, incoming) {
236
236
  const existing_clauseCategories = existing.clauseCategories;
237
237
  const incoming_clauseCategories = incoming.clauseCategories;
238
238
  const equals_clauseCategories_items = equalsArray(existing_clauseCategories, incoming_clauseCategories, (existing_clauseCategories_item, incoming_clauseCategories_item) => {
239
- if (!(equals$h(existing_clauseCategories_item, incoming_clauseCategories_item))) {
239
+ if (!(equals$l(existing_clauseCategories_item, incoming_clauseCategories_item))) {
240
240
  return false;
241
241
  }
242
242
  });
@@ -245,44 +245,44 @@ function equals$g(existing, incoming) {
245
245
  }
246
246
  return true;
247
247
  }
248
- const ingest$a = function ClauseCategoriesResponseIngest(input, path, luvio, store, timestamp) {
248
+ const ingest$c = function ClauseCategoriesResponseIngest(input, path, luvio, store, timestamp) {
249
249
  if (process.env.NODE_ENV !== 'production') {
250
- const validateError = validate$i(input);
250
+ const validateError = validate$m(input);
251
251
  if (validateError !== null) {
252
252
  throw validateError;
253
253
  }
254
254
  }
255
255
  const key = path.fullPath;
256
256
  const ttlToUse = TTL$6;
257
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$a, "docgen", VERSION$g, RepresentationType$a, equals$g);
257
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$c, "docgen", VERSION$k, RepresentationType$c, equals$k);
258
258
  return createLink(key);
259
259
  };
260
- function getTypeCacheKeys$a(rootKeySet, luvio, input, fullPathFactory) {
260
+ function getTypeCacheKeys$c(rootKeySet, luvio, input, fullPathFactory) {
261
261
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
262
262
  const rootKey = fullPathFactory();
263
263
  rootKeySet.set(rootKey, {
264
264
  namespace: keyPrefix,
265
- representationName: RepresentationType$a,
265
+ representationName: RepresentationType$c,
266
266
  mergeable: false
267
267
  });
268
268
  }
269
269
 
270
- function select$q(luvio, params) {
271
- return select$r();
270
+ function select$x(luvio, params) {
271
+ return select$y();
272
272
  }
273
- function keyBuilder$h(luvio, params) {
273
+ function keyBuilder$k(luvio, params) {
274
274
  return keyPrefix + '::ClauseCategoriesResponse:(' + 'id:' + params.queryParams.id + ',' + 'name:' + params.queryParams.name + ',' + 'usageType:' + params.queryParams.usageType + ')';
275
275
  }
276
- function getResponseCacheKeys$a(storeKeyMap, luvio, resourceParams, response) {
277
- getTypeCacheKeys$a(storeKeyMap, luvio, response, () => keyBuilder$h(luvio, resourceParams));
276
+ function getResponseCacheKeys$d(storeKeyMap, luvio, resourceParams, response) {
277
+ getTypeCacheKeys$c(storeKeyMap, luvio, response, () => keyBuilder$k(luvio, resourceParams));
278
278
  }
279
- function ingestSuccess$a(luvio, resourceParams, response, snapshotRefresh) {
279
+ function ingestSuccess$d(luvio, resourceParams, response, snapshotRefresh) {
280
280
  const { body } = response;
281
- const key = keyBuilder$h(luvio, resourceParams);
282
- luvio.storeIngest(key, ingest$a, body);
281
+ const key = keyBuilder$k(luvio, resourceParams);
282
+ luvio.storeIngest(key, ingest$c, body);
283
283
  const snapshot = luvio.storeLookup({
284
284
  recordId: key,
285
- node: select$q(),
285
+ node: select$x(),
286
286
  variables: {},
287
287
  }, snapshotRefresh);
288
288
  if (process.env.NODE_ENV !== 'production') {
@@ -293,19 +293,19 @@ function ingestSuccess$a(luvio, resourceParams, response, snapshotRefresh) {
293
293
  deepFreeze(snapshot.data);
294
294
  return snapshot;
295
295
  }
296
- function ingestError$6(luvio, params, error, snapshotRefresh) {
297
- const key = keyBuilder$h(luvio, params);
296
+ function ingestError$7(luvio, params, error, snapshotRefresh) {
297
+ const key = keyBuilder$k(luvio, params);
298
298
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
299
299
  const storeMetadataParams = {
300
300
  ttl: TTL$6,
301
301
  namespace: keyPrefix,
302
- version: VERSION$g,
303
- representationName: RepresentationType$a
302
+ version: VERSION$k,
303
+ representationName: RepresentationType$c
304
304
  };
305
305
  luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
306
306
  return errorSnapshot;
307
307
  }
308
- function createResourceRequest$a(config) {
308
+ function createResourceRequest$d(config) {
309
309
  const headers = {};
310
310
  return {
311
311
  baseUri: '/services/data/v60.0',
@@ -319,96 +319,96 @@ function createResourceRequest$a(config) {
319
319
  };
320
320
  }
321
321
 
322
- const adapterName$a = 'getDocumentClauseSetCategories';
322
+ const adapterName$d = 'getDocumentClauseSetCategories';
323
323
  const getDocumentClauseSetCategories_ConfigPropertyMetadata = [
324
324
  generateParamConfigMetadata('id', false, 1 /* QueryParameter */, 0 /* String */),
325
325
  generateParamConfigMetadata('name', false, 1 /* QueryParameter */, 0 /* String */),
326
326
  generateParamConfigMetadata('usageType', false, 1 /* QueryParameter */, 0 /* String */),
327
327
  ];
328
- const getDocumentClauseSetCategories_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$a, getDocumentClauseSetCategories_ConfigPropertyMetadata);
329
- const createResourceParams$a = /*#__PURE__*/ createResourceParams$b(getDocumentClauseSetCategories_ConfigPropertyMetadata);
330
- function keyBuilder$g(luvio, config) {
331
- const resourceParams = createResourceParams$a(config);
332
- return keyBuilder$h(luvio, resourceParams);
328
+ const getDocumentClauseSetCategories_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$d, getDocumentClauseSetCategories_ConfigPropertyMetadata);
329
+ const createResourceParams$d = /*#__PURE__*/ createResourceParams$e(getDocumentClauseSetCategories_ConfigPropertyMetadata);
330
+ function keyBuilder$j(luvio, config) {
331
+ const resourceParams = createResourceParams$d(config);
332
+ return keyBuilder$k(luvio, resourceParams);
333
333
  }
334
- function typeCheckConfig$a(untrustedConfig) {
334
+ function typeCheckConfig$d(untrustedConfig) {
335
335
  const config = {};
336
- typeCheckConfig$b(untrustedConfig, config, getDocumentClauseSetCategories_ConfigPropertyMetadata);
336
+ typeCheckConfig$e(untrustedConfig, config, getDocumentClauseSetCategories_ConfigPropertyMetadata);
337
337
  return config;
338
338
  }
339
- function validateAdapterConfig$a(untrustedConfig, configPropertyNames) {
339
+ function validateAdapterConfig$d(untrustedConfig, configPropertyNames) {
340
340
  if (!untrustedIsObject(untrustedConfig)) {
341
341
  return null;
342
342
  }
343
343
  if (process.env.NODE_ENV !== 'production') {
344
344
  validateConfig(untrustedConfig, configPropertyNames);
345
345
  }
346
- const config = typeCheckConfig$a(untrustedConfig);
346
+ const config = typeCheckConfig$d(untrustedConfig);
347
347
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
348
348
  return null;
349
349
  }
350
350
  return config;
351
351
  }
352
- function adapterFragment$6(luvio, config) {
353
- createResourceParams$a(config);
354
- return select$q();
352
+ function adapterFragment$7(luvio, config) {
353
+ createResourceParams$d(config);
354
+ return select$x();
355
355
  }
356
- function onFetchResponseSuccess$6(luvio, config, resourceParams, response) {
357
- const snapshot = ingestSuccess$a(luvio, resourceParams, response, {
356
+ function onFetchResponseSuccess$7(luvio, config, resourceParams, response) {
357
+ const snapshot = ingestSuccess$d(luvio, resourceParams, response, {
358
358
  config,
359
- resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
359
+ resolve: () => buildNetworkSnapshot$d(luvio, config, snapshotRefreshOptions)
360
360
  });
361
361
  return luvio.storeBroadcast().then(() => snapshot);
362
362
  }
363
- function onFetchResponseError$6(luvio, config, resourceParams, response) {
364
- const snapshot = ingestError$6(luvio, resourceParams, response, {
363
+ function onFetchResponseError$7(luvio, config, resourceParams, response) {
364
+ const snapshot = ingestError$7(luvio, resourceParams, response, {
365
365
  config,
366
- resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
366
+ resolve: () => buildNetworkSnapshot$d(luvio, config, snapshotRefreshOptions)
367
367
  });
368
368
  return luvio.storeBroadcast().then(() => snapshot);
369
369
  }
370
- function buildNetworkSnapshot$a(luvio, config, options) {
371
- const resourceParams = createResourceParams$a(config);
372
- const request = createResourceRequest$a(resourceParams);
370
+ function buildNetworkSnapshot$d(luvio, config, options) {
371
+ const resourceParams = createResourceParams$d(config);
372
+ const request = createResourceRequest$d(resourceParams);
373
373
  return luvio.dispatchResourceRequest(request, options)
374
374
  .then((response) => {
375
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$6(luvio, config, resourceParams, response), () => {
375
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$7(luvio, config, resourceParams, response), () => {
376
376
  const cache = new StoreKeyMap();
377
- getResponseCacheKeys$a(cache, luvio, resourceParams, response.body);
377
+ getResponseCacheKeys$d(cache, luvio, resourceParams, response.body);
378
378
  return cache;
379
379
  });
380
380
  }, (response) => {
381
- return luvio.handleErrorResponse(() => onFetchResponseError$6(luvio, config, resourceParams, response));
381
+ return luvio.handleErrorResponse(() => onFetchResponseError$7(luvio, config, resourceParams, response));
382
382
  });
383
383
  }
384
- function buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext) {
385
- return buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext, buildNetworkSnapshot$a, undefined, false);
384
+ function buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext) {
385
+ return buildNetworkSnapshotCachePolicy$8(context, coercedAdapterRequestContext, buildNetworkSnapshot$d, undefined, false);
386
386
  }
387
- function buildCachedSnapshotCachePolicy$6(context, storeLookup) {
387
+ function buildCachedSnapshotCachePolicy$7(context, storeLookup) {
388
388
  const { luvio, config } = context;
389
389
  const selector = {
390
- recordId: keyBuilder$g(luvio, config),
391
- node: adapterFragment$6(luvio, config),
390
+ recordId: keyBuilder$j(luvio, config),
391
+ node: adapterFragment$7(luvio, config),
392
392
  variables: {},
393
393
  };
394
394
  const cacheSnapshot = storeLookup(selector, {
395
395
  config,
396
- resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
396
+ resolve: () => buildNetworkSnapshot$d(luvio, config, snapshotRefreshOptions)
397
397
  });
398
398
  return cacheSnapshot;
399
399
  }
400
400
  const getDocumentClauseSetCategoriesAdapterFactory = (luvio) => function docgen__getDocumentClauseSetCategories(untrustedConfig, requestContext) {
401
- const config = validateAdapterConfig$a(untrustedConfig, getDocumentClauseSetCategories_ConfigPropertyNames);
401
+ const config = validateAdapterConfig$d(untrustedConfig, getDocumentClauseSetCategories_ConfigPropertyNames);
402
402
  // Invalid or incomplete config
403
403
  if (config === null) {
404
404
  return null;
405
405
  }
406
406
  return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
407
- buildCachedSnapshotCachePolicy$6, buildNetworkSnapshotCachePolicy$6);
407
+ buildCachedSnapshotCachePolicy$7, buildNetworkSnapshotCachePolicy$7);
408
408
  };
409
409
 
410
- const VERSION$f = "29a9e61a0952cff8f7e98cc7d8857c62";
411
- function validate$h(obj, path = 'DocumentClauseSetResponse') {
410
+ const VERSION$j = "29a9e61a0952cff8f7e98cc7d8857c62";
411
+ function validate$l(obj, path = 'DocumentClauseSetResponse') {
412
412
  const v_error = (() => {
413
413
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
414
414
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -446,10 +446,10 @@ function validate$h(obj, path = 'DocumentClauseSetResponse') {
446
446
  })();
447
447
  return v_error === undefined ? null : v_error;
448
448
  }
449
- const select$p = function DocumentClauseSetResponseSelect() {
449
+ const select$w = function DocumentClauseSetResponseSelect() {
450
450
  return {
451
451
  kind: 'Fragment',
452
- version: VERSION$f,
452
+ version: VERSION$j,
453
453
  private: [],
454
454
  selections: [
455
455
  {
@@ -479,7 +479,7 @@ const select$p = function DocumentClauseSetResponseSelect() {
479
479
  ]
480
480
  };
481
481
  };
482
- function equals$f(existing, incoming) {
482
+ function equals$j(existing, incoming) {
483
483
  const existing_category = existing.category;
484
484
  const incoming_category = incoming.category;
485
485
  if (!(existing_category === incoming_category)) {
@@ -514,8 +514,8 @@ function equals$f(existing, incoming) {
514
514
  }
515
515
 
516
516
  const TTL$5 = 100;
517
- const VERSION$e = "c6ad1fbdbd4d8cd718a8a62c63216687";
518
- function validate$g(obj, path = 'DocumentClauseSetListResponse') {
517
+ const VERSION$i = "c6ad1fbdbd4d8cd718a8a62c63216687";
518
+ function validate$k(obj, path = 'DocumentClauseSetListResponse') {
519
519
  const v_error = (() => {
520
520
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
521
521
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -528,7 +528,7 @@ function validate$g(obj, path = 'DocumentClauseSetListResponse') {
528
528
  for (let i = 0; i < obj_documentClauseSets.length; i++) {
529
529
  const obj_documentClauseSets_item = obj_documentClauseSets[i];
530
530
  const path_documentClauseSets_item = path_documentClauseSets + '[' + i + ']';
531
- const referencepath_documentClauseSets_itemValidationError = validate$h(obj_documentClauseSets_item, path_documentClauseSets_item);
531
+ const referencepath_documentClauseSets_itemValidationError = validate$l(obj_documentClauseSets_item, path_documentClauseSets_item);
532
532
  if (referencepath_documentClauseSets_itemValidationError !== null) {
533
533
  let message = 'Object doesn\'t match DocumentClauseSetResponse (at "' + path_documentClauseSets_item + '")\n';
534
534
  message += referencepath_documentClauseSets_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -538,15 +538,15 @@ function validate$g(obj, path = 'DocumentClauseSetListResponse') {
538
538
  })();
539
539
  return v_error === undefined ? null : v_error;
540
540
  }
541
- const RepresentationType$9 = 'DocumentClauseSetListResponse';
542
- function normalize$9(input, existing, path, luvio, store, timestamp) {
541
+ const RepresentationType$b = 'DocumentClauseSetListResponse';
542
+ function normalize$b(input, existing, path, luvio, store, timestamp) {
543
543
  return input;
544
544
  }
545
- const select$o = function DocumentClauseSetListResponseSelect() {
546
- const { selections: DocumentClauseSetResponse__selections, opaque: DocumentClauseSetResponse__opaque, } = select$p();
545
+ const select$v = function DocumentClauseSetListResponseSelect() {
546
+ const { selections: DocumentClauseSetResponse__selections, opaque: DocumentClauseSetResponse__opaque, } = select$w();
547
547
  return {
548
548
  kind: 'Fragment',
549
- version: VERSION$e,
549
+ version: VERSION$i,
550
550
  private: [],
551
551
  selections: [
552
552
  {
@@ -558,11 +558,11 @@ const select$o = function DocumentClauseSetListResponseSelect() {
558
558
  ]
559
559
  };
560
560
  };
561
- function equals$e(existing, incoming) {
561
+ function equals$i(existing, incoming) {
562
562
  const existing_documentClauseSets = existing.documentClauseSets;
563
563
  const incoming_documentClauseSets = incoming.documentClauseSets;
564
564
  const equals_documentClauseSets_items = equalsArray(existing_documentClauseSets, incoming_documentClauseSets, (existing_documentClauseSets_item, incoming_documentClauseSets_item) => {
565
- if (!(equals$f(existing_documentClauseSets_item, incoming_documentClauseSets_item))) {
565
+ if (!(equals$j(existing_documentClauseSets_item, incoming_documentClauseSets_item))) {
566
566
  return false;
567
567
  }
568
568
  });
@@ -571,44 +571,44 @@ function equals$e(existing, incoming) {
571
571
  }
572
572
  return true;
573
573
  }
574
- const ingest$9 = function DocumentClauseSetListResponseIngest(input, path, luvio, store, timestamp) {
574
+ const ingest$b = function DocumentClauseSetListResponseIngest(input, path, luvio, store, timestamp) {
575
575
  if (process.env.NODE_ENV !== 'production') {
576
- const validateError = validate$g(input);
576
+ const validateError = validate$k(input);
577
577
  if (validateError !== null) {
578
578
  throw validateError;
579
579
  }
580
580
  }
581
581
  const key = path.fullPath;
582
582
  const ttlToUse = TTL$5;
583
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$9, "docgen", VERSION$e, RepresentationType$9, equals$e);
583
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$b, "docgen", VERSION$i, RepresentationType$b, equals$i);
584
584
  return createLink(key);
585
585
  };
586
- function getTypeCacheKeys$9(rootKeySet, luvio, input, fullPathFactory) {
586
+ function getTypeCacheKeys$b(rootKeySet, luvio, input, fullPathFactory) {
587
587
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
588
588
  const rootKey = fullPathFactory();
589
589
  rootKeySet.set(rootKey, {
590
590
  namespace: keyPrefix,
591
- representationName: RepresentationType$9,
591
+ representationName: RepresentationType$b,
592
592
  mergeable: false
593
593
  });
594
594
  }
595
595
 
596
- function select$n(luvio, params) {
597
- return select$o();
596
+ function select$u(luvio, params) {
597
+ return select$v();
598
598
  }
599
- function keyBuilder$f(luvio, params) {
599
+ function keyBuilder$i(luvio, params) {
600
600
  return keyPrefix + '::DocumentClauseSetListResponse:(' + 'category:' + params.queryParams.category + ',' + 'defaultLanguage:' + params.queryParams.defaultLanguage + ',' + 'limit:' + params.queryParams.limit + ',' + 'name:' + params.queryParams.name + ',' + 'offset:' + params.queryParams.offset + ',' + 'status:' + params.queryParams.status + ')';
601
601
  }
602
- function getResponseCacheKeys$9(storeKeyMap, luvio, resourceParams, response) {
603
- getTypeCacheKeys$9(storeKeyMap, luvio, response, () => keyBuilder$f(luvio, resourceParams));
602
+ function getResponseCacheKeys$c(storeKeyMap, luvio, resourceParams, response) {
603
+ getTypeCacheKeys$b(storeKeyMap, luvio, response, () => keyBuilder$i(luvio, resourceParams));
604
604
  }
605
- function ingestSuccess$9(luvio, resourceParams, response, snapshotRefresh) {
605
+ function ingestSuccess$c(luvio, resourceParams, response, snapshotRefresh) {
606
606
  const { body } = response;
607
- const key = keyBuilder$f(luvio, resourceParams);
608
- luvio.storeIngest(key, ingest$9, body);
607
+ const key = keyBuilder$i(luvio, resourceParams);
608
+ luvio.storeIngest(key, ingest$b, body);
609
609
  const snapshot = luvio.storeLookup({
610
610
  recordId: key,
611
- node: select$n(),
611
+ node: select$u(),
612
612
  variables: {},
613
613
  }, snapshotRefresh);
614
614
  if (process.env.NODE_ENV !== 'production') {
@@ -619,19 +619,19 @@ function ingestSuccess$9(luvio, resourceParams, response, snapshotRefresh) {
619
619
  deepFreeze(snapshot.data);
620
620
  return snapshot;
621
621
  }
622
- function ingestError$5(luvio, params, error, snapshotRefresh) {
623
- const key = keyBuilder$f(luvio, params);
622
+ function ingestError$6(luvio, params, error, snapshotRefresh) {
623
+ const key = keyBuilder$i(luvio, params);
624
624
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
625
625
  const storeMetadataParams = {
626
626
  ttl: TTL$5,
627
627
  namespace: keyPrefix,
628
- version: VERSION$e,
629
- representationName: RepresentationType$9
628
+ version: VERSION$i,
629
+ representationName: RepresentationType$b
630
630
  };
631
631
  luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
632
632
  return errorSnapshot;
633
633
  }
634
- function createResourceRequest$9(config) {
634
+ function createResourceRequest$c(config) {
635
635
  const headers = {};
636
636
  return {
637
637
  baseUri: '/services/data/v60.0',
@@ -645,7 +645,7 @@ function createResourceRequest$9(config) {
645
645
  };
646
646
  }
647
647
 
648
- const adapterName$9 = 'getDocumentClauseSets';
648
+ const adapterName$c = 'getDocumentClauseSets';
649
649
  const getDocumentClauseSets_ConfigPropertyMetadata = [
650
650
  generateParamConfigMetadata('category', false, 1 /* QueryParameter */, 0 /* String */),
651
651
  generateParamConfigMetadata('defaultLanguage', false, 1 /* QueryParameter */, 0 /* String */),
@@ -654,91 +654,91 @@ const getDocumentClauseSets_ConfigPropertyMetadata = [
654
654
  generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
655
655
  generateParamConfigMetadata('status', false, 1 /* QueryParameter */, 0 /* String */),
656
656
  ];
657
- const getDocumentClauseSets_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$9, getDocumentClauseSets_ConfigPropertyMetadata);
658
- const createResourceParams$9 = /*#__PURE__*/ createResourceParams$b(getDocumentClauseSets_ConfigPropertyMetadata);
659
- function keyBuilder$e(luvio, config) {
660
- const resourceParams = createResourceParams$9(config);
661
- return keyBuilder$f(luvio, resourceParams);
657
+ const getDocumentClauseSets_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$c, getDocumentClauseSets_ConfigPropertyMetadata);
658
+ const createResourceParams$c = /*#__PURE__*/ createResourceParams$e(getDocumentClauseSets_ConfigPropertyMetadata);
659
+ function keyBuilder$h(luvio, config) {
660
+ const resourceParams = createResourceParams$c(config);
661
+ return keyBuilder$i(luvio, resourceParams);
662
662
  }
663
- function typeCheckConfig$9(untrustedConfig) {
663
+ function typeCheckConfig$c(untrustedConfig) {
664
664
  const config = {};
665
- typeCheckConfig$b(untrustedConfig, config, getDocumentClauseSets_ConfigPropertyMetadata);
665
+ typeCheckConfig$e(untrustedConfig, config, getDocumentClauseSets_ConfigPropertyMetadata);
666
666
  return config;
667
667
  }
668
- function validateAdapterConfig$9(untrustedConfig, configPropertyNames) {
668
+ function validateAdapterConfig$c(untrustedConfig, configPropertyNames) {
669
669
  if (!untrustedIsObject(untrustedConfig)) {
670
670
  return null;
671
671
  }
672
672
  if (process.env.NODE_ENV !== 'production') {
673
673
  validateConfig(untrustedConfig, configPropertyNames);
674
674
  }
675
- const config = typeCheckConfig$9(untrustedConfig);
675
+ const config = typeCheckConfig$c(untrustedConfig);
676
676
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
677
677
  return null;
678
678
  }
679
679
  return config;
680
680
  }
681
- function adapterFragment$5(luvio, config) {
682
- createResourceParams$9(config);
683
- return select$n();
681
+ function adapterFragment$6(luvio, config) {
682
+ createResourceParams$c(config);
683
+ return select$u();
684
684
  }
685
- function onFetchResponseSuccess$5(luvio, config, resourceParams, response) {
686
- const snapshot = ingestSuccess$9(luvio, resourceParams, response, {
685
+ function onFetchResponseSuccess$6(luvio, config, resourceParams, response) {
686
+ const snapshot = ingestSuccess$c(luvio, resourceParams, response, {
687
687
  config,
688
- resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
688
+ resolve: () => buildNetworkSnapshot$c(luvio, config, snapshotRefreshOptions)
689
689
  });
690
690
  return luvio.storeBroadcast().then(() => snapshot);
691
691
  }
692
- function onFetchResponseError$5(luvio, config, resourceParams, response) {
693
- const snapshot = ingestError$5(luvio, resourceParams, response, {
692
+ function onFetchResponseError$6(luvio, config, resourceParams, response) {
693
+ const snapshot = ingestError$6(luvio, resourceParams, response, {
694
694
  config,
695
- resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
695
+ resolve: () => buildNetworkSnapshot$c(luvio, config, snapshotRefreshOptions)
696
696
  });
697
697
  return luvio.storeBroadcast().then(() => snapshot);
698
698
  }
699
- function buildNetworkSnapshot$9(luvio, config, options) {
700
- const resourceParams = createResourceParams$9(config);
701
- const request = createResourceRequest$9(resourceParams);
699
+ function buildNetworkSnapshot$c(luvio, config, options) {
700
+ const resourceParams = createResourceParams$c(config);
701
+ const request = createResourceRequest$c(resourceParams);
702
702
  return luvio.dispatchResourceRequest(request, options)
703
703
  .then((response) => {
704
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$5(luvio, config, resourceParams, response), () => {
704
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$6(luvio, config, resourceParams, response), () => {
705
705
  const cache = new StoreKeyMap();
706
- getResponseCacheKeys$9(cache, luvio, resourceParams, response.body);
706
+ getResponseCacheKeys$c(cache, luvio, resourceParams, response.body);
707
707
  return cache;
708
708
  });
709
709
  }, (response) => {
710
- return luvio.handleErrorResponse(() => onFetchResponseError$5(luvio, config, resourceParams, response));
710
+ return luvio.handleErrorResponse(() => onFetchResponseError$6(luvio, config, resourceParams, response));
711
711
  });
712
712
  }
713
- function buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext) {
714
- return buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext, buildNetworkSnapshot$9, undefined, false);
713
+ function buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext) {
714
+ return buildNetworkSnapshotCachePolicy$8(context, coercedAdapterRequestContext, buildNetworkSnapshot$c, undefined, false);
715
715
  }
716
- function buildCachedSnapshotCachePolicy$5(context, storeLookup) {
716
+ function buildCachedSnapshotCachePolicy$6(context, storeLookup) {
717
717
  const { luvio, config } = context;
718
718
  const selector = {
719
- recordId: keyBuilder$e(luvio, config),
720
- node: adapterFragment$5(luvio, config),
719
+ recordId: keyBuilder$h(luvio, config),
720
+ node: adapterFragment$6(luvio, config),
721
721
  variables: {},
722
722
  };
723
723
  const cacheSnapshot = storeLookup(selector, {
724
724
  config,
725
- resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
725
+ resolve: () => buildNetworkSnapshot$c(luvio, config, snapshotRefreshOptions)
726
726
  });
727
727
  return cacheSnapshot;
728
728
  }
729
729
  const getDocumentClauseSetsAdapterFactory = (luvio) => function docgen__getDocumentClauseSets(untrustedConfig, requestContext) {
730
- const config = validateAdapterConfig$9(untrustedConfig, getDocumentClauseSets_ConfigPropertyNames);
730
+ const config = validateAdapterConfig$c(untrustedConfig, getDocumentClauseSets_ConfigPropertyNames);
731
731
  // Invalid or incomplete config
732
732
  if (config === null) {
733
733
  return null;
734
734
  }
735
735
  return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
736
- buildCachedSnapshotCachePolicy$5, buildNetworkSnapshotCachePolicy$5);
736
+ buildCachedSnapshotCachePolicy$6, buildNetworkSnapshotCachePolicy$6);
737
737
  };
738
738
 
739
739
  const TTL$4 = 100;
740
- const VERSION$d = "a3afe2a67715551a49f0d59eafb639aa";
741
- function validate$f(obj, path = 'DocumentClauseFieldsResponse') {
740
+ const VERSION$h = "a3afe2a67715551a49f0d59eafb639aa";
741
+ function validate$j(obj, path = 'DocumentClauseFieldsResponse') {
742
742
  const v_error = (() => {
743
743
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
744
744
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -763,14 +763,14 @@ function validate$f(obj, path = 'DocumentClauseFieldsResponse') {
763
763
  })();
764
764
  return v_error === undefined ? null : v_error;
765
765
  }
766
- const RepresentationType$8 = 'DocumentClauseFieldsResponse';
767
- function normalize$8(input, existing, path, luvio, store, timestamp) {
766
+ const RepresentationType$a = 'DocumentClauseFieldsResponse';
767
+ function normalize$a(input, existing, path, luvio, store, timestamp) {
768
768
  return input;
769
769
  }
770
- const select$m = function DocumentClauseFieldsResponseSelect() {
770
+ const select$t = function DocumentClauseFieldsResponseSelect() {
771
771
  return {
772
772
  kind: 'Fragment',
773
- version: VERSION$d,
773
+ version: VERSION$h,
774
774
  private: [],
775
775
  selections: [
776
776
  {
@@ -786,7 +786,7 @@ const select$m = function DocumentClauseFieldsResponseSelect() {
786
786
  ]
787
787
  };
788
788
  };
789
- function equals$d(existing, incoming) {
789
+ function equals$h(existing, incoming) {
790
790
  const existing_extendedFields = existing.extendedFields;
791
791
  const incoming_extendedFields = incoming.extendedFields;
792
792
  if (JSONStringify(incoming_extendedFields) !== JSONStringify(existing_extendedFields)) {
@@ -804,44 +804,44 @@ function equals$d(existing, incoming) {
804
804
  }
805
805
  return true;
806
806
  }
807
- const ingest$8 = function DocumentClauseFieldsResponseIngest(input, path, luvio, store, timestamp) {
807
+ const ingest$a = function DocumentClauseFieldsResponseIngest(input, path, luvio, store, timestamp) {
808
808
  if (process.env.NODE_ENV !== 'production') {
809
- const validateError = validate$f(input);
809
+ const validateError = validate$j(input);
810
810
  if (validateError !== null) {
811
811
  throw validateError;
812
812
  }
813
813
  }
814
814
  const key = path.fullPath;
815
815
  const ttlToUse = TTL$4;
816
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$8, "docgen", VERSION$d, RepresentationType$8, equals$d);
816
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$a, "docgen", VERSION$h, RepresentationType$a, equals$h);
817
817
  return createLink(key);
818
818
  };
819
- function getTypeCacheKeys$8(rootKeySet, luvio, input, fullPathFactory) {
819
+ function getTypeCacheKeys$a(rootKeySet, luvio, input, fullPathFactory) {
820
820
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
821
821
  const rootKey = fullPathFactory();
822
822
  rootKeySet.set(rootKey, {
823
823
  namespace: keyPrefix,
824
- representationName: RepresentationType$8,
824
+ representationName: RepresentationType$a,
825
825
  mergeable: false
826
826
  });
827
827
  }
828
828
 
829
- function select$l(luvio, params) {
830
- return select$m();
829
+ function select$s(luvio, params) {
830
+ return select$t();
831
831
  }
832
- function keyBuilder$d(luvio, params) {
832
+ function keyBuilder$g(luvio, params) {
833
833
  return keyPrefix + '::DocumentClauseFieldsResponse:(' + 'clauseSetId:' + params.queryParams.clauseSetId + ',' + 'extendedFields:' + params.queryParams.extendedFields + ',' + 'fieldName:' + params.queryParams.fieldName + ',' + 'language:' + params.queryParams.language + ',' + 'name:' + params.queryParams.name + ',' + 'status:' + params.queryParams.status + ')';
834
834
  }
835
- function getResponseCacheKeys$8(storeKeyMap, luvio, resourceParams, response) {
836
- getTypeCacheKeys$8(storeKeyMap, luvio, response, () => keyBuilder$d(luvio, resourceParams));
835
+ function getResponseCacheKeys$b(storeKeyMap, luvio, resourceParams, response) {
836
+ getTypeCacheKeys$a(storeKeyMap, luvio, response, () => keyBuilder$g(luvio, resourceParams));
837
837
  }
838
- function ingestSuccess$8(luvio, resourceParams, response, snapshotRefresh) {
838
+ function ingestSuccess$b(luvio, resourceParams, response, snapshotRefresh) {
839
839
  const { body } = response;
840
- const key = keyBuilder$d(luvio, resourceParams);
841
- luvio.storeIngest(key, ingest$8, body);
840
+ const key = keyBuilder$g(luvio, resourceParams);
841
+ luvio.storeIngest(key, ingest$a, body);
842
842
  const snapshot = luvio.storeLookup({
843
843
  recordId: key,
844
- node: select$l(),
844
+ node: select$s(),
845
845
  variables: {},
846
846
  }, snapshotRefresh);
847
847
  if (process.env.NODE_ENV !== 'production') {
@@ -852,19 +852,19 @@ function ingestSuccess$8(luvio, resourceParams, response, snapshotRefresh) {
852
852
  deepFreeze(snapshot.data);
853
853
  return snapshot;
854
854
  }
855
- function ingestError$4(luvio, params, error, snapshotRefresh) {
856
- const key = keyBuilder$d(luvio, params);
855
+ function ingestError$5(luvio, params, error, snapshotRefresh) {
856
+ const key = keyBuilder$g(luvio, params);
857
857
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
858
858
  const storeMetadataParams = {
859
859
  ttl: TTL$4,
860
860
  namespace: keyPrefix,
861
- version: VERSION$d,
862
- representationName: RepresentationType$8
861
+ version: VERSION$h,
862
+ representationName: RepresentationType$a
863
863
  };
864
864
  luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
865
865
  return errorSnapshot;
866
866
  }
867
- function createResourceRequest$8(config) {
867
+ function createResourceRequest$b(config) {
868
868
  const headers = {};
869
869
  return {
870
870
  baseUri: '/services/data/v60.0',
@@ -878,7 +878,7 @@ function createResourceRequest$8(config) {
878
878
  };
879
879
  }
880
880
 
881
- const adapterName$8 = 'getDocumentClauseFields';
881
+ const adapterName$b = 'getDocumentClauseFields';
882
882
  const getDocumentClauseFields_ConfigPropertyMetadata = [
883
883
  generateParamConfigMetadata('clauseSetId', false, 1 /* QueryParameter */, 0 /* String */),
884
884
  generateParamConfigMetadata('extendedFields', false, 1 /* QueryParameter */, 0 /* String */),
@@ -887,90 +887,90 @@ const getDocumentClauseFields_ConfigPropertyMetadata = [
887
887
  generateParamConfigMetadata('name', false, 1 /* QueryParameter */, 0 /* String */),
888
888
  generateParamConfigMetadata('status', false, 1 /* QueryParameter */, 0 /* String */),
889
889
  ];
890
- const getDocumentClauseFields_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$8, getDocumentClauseFields_ConfigPropertyMetadata);
891
- const createResourceParams$8 = /*#__PURE__*/ createResourceParams$b(getDocumentClauseFields_ConfigPropertyMetadata);
892
- function keyBuilder$c(luvio, config) {
893
- const resourceParams = createResourceParams$8(config);
894
- return keyBuilder$d(luvio, resourceParams);
890
+ const getDocumentClauseFields_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$b, getDocumentClauseFields_ConfigPropertyMetadata);
891
+ const createResourceParams$b = /*#__PURE__*/ createResourceParams$e(getDocumentClauseFields_ConfigPropertyMetadata);
892
+ function keyBuilder$f(luvio, config) {
893
+ const resourceParams = createResourceParams$b(config);
894
+ return keyBuilder$g(luvio, resourceParams);
895
895
  }
896
- function typeCheckConfig$8(untrustedConfig) {
896
+ function typeCheckConfig$b(untrustedConfig) {
897
897
  const config = {};
898
- typeCheckConfig$b(untrustedConfig, config, getDocumentClauseFields_ConfigPropertyMetadata);
898
+ typeCheckConfig$e(untrustedConfig, config, getDocumentClauseFields_ConfigPropertyMetadata);
899
899
  return config;
900
900
  }
901
- function validateAdapterConfig$8(untrustedConfig, configPropertyNames) {
901
+ function validateAdapterConfig$b(untrustedConfig, configPropertyNames) {
902
902
  if (!untrustedIsObject(untrustedConfig)) {
903
903
  return null;
904
904
  }
905
905
  if (process.env.NODE_ENV !== 'production') {
906
906
  validateConfig(untrustedConfig, configPropertyNames);
907
907
  }
908
- const config = typeCheckConfig$8(untrustedConfig);
908
+ const config = typeCheckConfig$b(untrustedConfig);
909
909
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
910
910
  return null;
911
911
  }
912
912
  return config;
913
913
  }
914
- function adapterFragment$4(luvio, config) {
915
- createResourceParams$8(config);
916
- return select$l();
914
+ function adapterFragment$5(luvio, config) {
915
+ createResourceParams$b(config);
916
+ return select$s();
917
917
  }
918
- function onFetchResponseSuccess$4(luvio, config, resourceParams, response) {
919
- const snapshot = ingestSuccess$8(luvio, resourceParams, response, {
918
+ function onFetchResponseSuccess$5(luvio, config, resourceParams, response) {
919
+ const snapshot = ingestSuccess$b(luvio, resourceParams, response, {
920
920
  config,
921
- resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
921
+ resolve: () => buildNetworkSnapshot$b(luvio, config, snapshotRefreshOptions)
922
922
  });
923
923
  return luvio.storeBroadcast().then(() => snapshot);
924
924
  }
925
- function onFetchResponseError$4(luvio, config, resourceParams, response) {
926
- const snapshot = ingestError$4(luvio, resourceParams, response, {
925
+ function onFetchResponseError$5(luvio, config, resourceParams, response) {
926
+ const snapshot = ingestError$5(luvio, resourceParams, response, {
927
927
  config,
928
- resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
928
+ resolve: () => buildNetworkSnapshot$b(luvio, config, snapshotRefreshOptions)
929
929
  });
930
930
  return luvio.storeBroadcast().then(() => snapshot);
931
931
  }
932
- function buildNetworkSnapshot$8(luvio, config, options) {
933
- const resourceParams = createResourceParams$8(config);
934
- const request = createResourceRequest$8(resourceParams);
932
+ function buildNetworkSnapshot$b(luvio, config, options) {
933
+ const resourceParams = createResourceParams$b(config);
934
+ const request = createResourceRequest$b(resourceParams);
935
935
  return luvio.dispatchResourceRequest(request, options)
936
936
  .then((response) => {
937
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$4(luvio, config, resourceParams, response), () => {
937
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$5(luvio, config, resourceParams, response), () => {
938
938
  const cache = new StoreKeyMap();
939
- getResponseCacheKeys$8(cache, luvio, resourceParams, response.body);
939
+ getResponseCacheKeys$b(cache, luvio, resourceParams, response.body);
940
940
  return cache;
941
941
  });
942
942
  }, (response) => {
943
- return luvio.handleErrorResponse(() => onFetchResponseError$4(luvio, config, resourceParams, response));
943
+ return luvio.handleErrorResponse(() => onFetchResponseError$5(luvio, config, resourceParams, response));
944
944
  });
945
945
  }
946
- function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
947
- return buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext, buildNetworkSnapshot$8, undefined, false);
946
+ function buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext) {
947
+ return buildNetworkSnapshotCachePolicy$8(context, coercedAdapterRequestContext, buildNetworkSnapshot$b, undefined, false);
948
948
  }
949
- function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
949
+ function buildCachedSnapshotCachePolicy$5(context, storeLookup) {
950
950
  const { luvio, config } = context;
951
951
  const selector = {
952
- recordId: keyBuilder$c(luvio, config),
953
- node: adapterFragment$4(luvio, config),
952
+ recordId: keyBuilder$f(luvio, config),
953
+ node: adapterFragment$5(luvio, config),
954
954
  variables: {},
955
955
  };
956
956
  const cacheSnapshot = storeLookup(selector, {
957
957
  config,
958
- resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
958
+ resolve: () => buildNetworkSnapshot$b(luvio, config, snapshotRefreshOptions)
959
959
  });
960
960
  return cacheSnapshot;
961
961
  }
962
962
  const getDocumentClauseFieldsAdapterFactory = (luvio) => function docgen__getDocumentClauseFields(untrustedConfig, requestContext) {
963
- const config = validateAdapterConfig$8(untrustedConfig, getDocumentClauseFields_ConfigPropertyNames);
963
+ const config = validateAdapterConfig$b(untrustedConfig, getDocumentClauseFields_ConfigPropertyNames);
964
964
  // Invalid or incomplete config
965
965
  if (config === null) {
966
966
  return null;
967
967
  }
968
968
  return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
969
- buildCachedSnapshotCachePolicy$4, buildNetworkSnapshotCachePolicy$4);
969
+ buildCachedSnapshotCachePolicy$5, buildNetworkSnapshotCachePolicy$5);
970
970
  };
971
971
 
972
- const VERSION$c = "c8652b5c3ad8c532087704340d3cad55";
973
- function validate$e(obj, path = 'GenericOutputRepresentation') {
972
+ const VERSION$g = "c8652b5c3ad8c532087704340d3cad55";
973
+ function validate$i(obj, path = 'GenericOutputRepresentation') {
974
974
  const v_error = (() => {
975
975
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
976
976
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -990,23 +990,23 @@ function validate$e(obj, path = 'GenericOutputRepresentation') {
990
990
  })();
991
991
  return v_error === undefined ? null : v_error;
992
992
  }
993
- const RepresentationType$7 = 'GenericOutputRepresentation';
994
- function keyBuilder$b(luvio, config) {
995
- return keyPrefix + '::' + RepresentationType$7 + ':' + config.id;
993
+ const RepresentationType$9 = 'GenericOutputRepresentation';
994
+ function keyBuilder$e(luvio, config) {
995
+ return keyPrefix + '::' + RepresentationType$9 + ':' + config.id;
996
996
  }
997
- function keyBuilderFromType$3(luvio, object) {
997
+ function keyBuilderFromType$4(luvio, object) {
998
998
  const keyParams = {
999
999
  id: object.id
1000
1000
  };
1001
- return keyBuilder$b(luvio, keyParams);
1001
+ return keyBuilder$e(luvio, keyParams);
1002
1002
  }
1003
- function normalize$7(input, existing, path, luvio, store, timestamp) {
1003
+ function normalize$9(input, existing, path, luvio, store, timestamp) {
1004
1004
  return input;
1005
1005
  }
1006
- const select$k = function GenericOutputRepresentationSelect() {
1006
+ const select$r = function GenericOutputRepresentationSelect() {
1007
1007
  return {
1008
1008
  kind: 'Fragment',
1009
- version: VERSION$c,
1009
+ version: VERSION$g,
1010
1010
  private: [],
1011
1011
  selections: [
1012
1012
  {
@@ -1021,7 +1021,7 @@ const select$k = function GenericOutputRepresentationSelect() {
1021
1021
  ]
1022
1022
  };
1023
1023
  };
1024
- function equals$c(existing, incoming) {
1024
+ function equals$g(existing, incoming) {
1025
1025
  const existing_isSuccess = existing.isSuccess;
1026
1026
  const incoming_isSuccess = incoming.isSuccess;
1027
1027
  // if at least one of these optionals is defined
@@ -1042,41 +1042,41 @@ function equals$c(existing, incoming) {
1042
1042
  }
1043
1043
  return true;
1044
1044
  }
1045
- const ingest$7 = function GenericOutputRepresentationIngest(input, path, luvio, store, timestamp) {
1045
+ const ingest$9 = function GenericOutputRepresentationIngest(input, path, luvio, store, timestamp) {
1046
1046
  if (process.env.NODE_ENV !== 'production') {
1047
- const validateError = validate$e(input);
1047
+ const validateError = validate$i(input);
1048
1048
  if (validateError !== null) {
1049
1049
  throw validateError;
1050
1050
  }
1051
1051
  }
1052
- const key = keyBuilderFromType$3(luvio, input);
1052
+ const key = keyBuilderFromType$4(luvio, input);
1053
1053
  const ttlToUse = path.ttl !== undefined ? path.ttl : 360000;
1054
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$7, "docgen", VERSION$c, RepresentationType$7, equals$c);
1054
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$9, "docgen", VERSION$g, RepresentationType$9, equals$g);
1055
1055
  return createLink(key);
1056
1056
  };
1057
- function getTypeCacheKeys$7(rootKeySet, luvio, input, fullPathFactory) {
1057
+ function getTypeCacheKeys$9(rootKeySet, luvio, input, fullPathFactory) {
1058
1058
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1059
- const rootKey = keyBuilderFromType$3(luvio, input);
1059
+ const rootKey = keyBuilderFromType$4(luvio, input);
1060
1060
  rootKeySet.set(rootKey, {
1061
1061
  namespace: keyPrefix,
1062
- representationName: RepresentationType$7,
1062
+ representationName: RepresentationType$9,
1063
1063
  mergeable: false
1064
1064
  });
1065
1065
  }
1066
1066
 
1067
- function select$j(luvio, params) {
1068
- return select$k();
1067
+ function select$q(luvio, params) {
1068
+ return select$r();
1069
1069
  }
1070
- function getResponseCacheKeys$7(storeKeyMap, luvio, resourceParams, response) {
1071
- getTypeCacheKeys$7(storeKeyMap, luvio, response);
1070
+ function getResponseCacheKeys$a(storeKeyMap, luvio, resourceParams, response) {
1071
+ getTypeCacheKeys$9(storeKeyMap, luvio, response);
1072
1072
  }
1073
- function ingestSuccess$7(luvio, resourceParams, response) {
1073
+ function ingestSuccess$a(luvio, resourceParams, response) {
1074
1074
  const { body } = response;
1075
- const key = keyBuilderFromType$3(luvio, body);
1076
- luvio.storeIngest(key, ingest$7, body);
1075
+ const key = keyBuilderFromType$4(luvio, body);
1076
+ luvio.storeIngest(key, ingest$9, body);
1077
1077
  const snapshot = luvio.storeLookup({
1078
1078
  recordId: key,
1079
- node: select$j(),
1079
+ node: select$q(),
1080
1080
  variables: {},
1081
1081
  });
1082
1082
  if (process.env.NODE_ENV !== 'production') {
@@ -1087,7 +1087,7 @@ function ingestSuccess$7(luvio, resourceParams, response) {
1087
1087
  deepFreeze(snapshot.data);
1088
1088
  return snapshot;
1089
1089
  }
1090
- function createResourceRequest$7(config) {
1090
+ function createResourceRequest$a(config) {
1091
1091
  const headers = {};
1092
1092
  return {
1093
1093
  baseUri: '/services/data/v60.0',
@@ -1101,42 +1101,42 @@ function createResourceRequest$7(config) {
1101
1101
  };
1102
1102
  }
1103
1103
 
1104
- const adapterName$7 = 'performDocGenerationBatchProcessAction';
1104
+ const adapterName$a = 'performDocGenerationBatchProcessAction';
1105
1105
  const performDocGenerationBatchProcessAction_ConfigPropertyMetadata = [
1106
1106
  generateParamConfigMetadata('actionName', true, 0 /* UrlParameter */, 0 /* String */),
1107
1107
  generateParamConfigMetadata('docGenerationBatchProcessId', true, 0 /* UrlParameter */, 0 /* String */),
1108
1108
  ];
1109
- const performDocGenerationBatchProcessAction_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$7, performDocGenerationBatchProcessAction_ConfigPropertyMetadata);
1110
- const createResourceParams$7 = /*#__PURE__*/ createResourceParams$b(performDocGenerationBatchProcessAction_ConfigPropertyMetadata);
1111
- function typeCheckConfig$7(untrustedConfig) {
1109
+ const performDocGenerationBatchProcessAction_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$a, performDocGenerationBatchProcessAction_ConfigPropertyMetadata);
1110
+ const createResourceParams$a = /*#__PURE__*/ createResourceParams$e(performDocGenerationBatchProcessAction_ConfigPropertyMetadata);
1111
+ function typeCheckConfig$a(untrustedConfig) {
1112
1112
  const config = {};
1113
- typeCheckConfig$b(untrustedConfig, config, performDocGenerationBatchProcessAction_ConfigPropertyMetadata);
1113
+ typeCheckConfig$e(untrustedConfig, config, performDocGenerationBatchProcessAction_ConfigPropertyMetadata);
1114
1114
  return config;
1115
1115
  }
1116
- function validateAdapterConfig$7(untrustedConfig, configPropertyNames) {
1116
+ function validateAdapterConfig$a(untrustedConfig, configPropertyNames) {
1117
1117
  if (!untrustedIsObject(untrustedConfig)) {
1118
1118
  return null;
1119
1119
  }
1120
1120
  if (process.env.NODE_ENV !== 'production') {
1121
1121
  validateConfig(untrustedConfig, configPropertyNames);
1122
1122
  }
1123
- const config = typeCheckConfig$7(untrustedConfig);
1123
+ const config = typeCheckConfig$a(untrustedConfig);
1124
1124
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
1125
1125
  return null;
1126
1126
  }
1127
1127
  return config;
1128
1128
  }
1129
- function buildNetworkSnapshot$7(luvio, config, options) {
1130
- const resourceParams = createResourceParams$7(config);
1131
- const request = createResourceRequest$7(resourceParams);
1129
+ function buildNetworkSnapshot$a(luvio, config, options) {
1130
+ const resourceParams = createResourceParams$a(config);
1131
+ const request = createResourceRequest$a(resourceParams);
1132
1132
  return luvio.dispatchResourceRequest(request, options)
1133
1133
  .then((response) => {
1134
1134
  return luvio.handleSuccessResponse(() => {
1135
- const snapshot = ingestSuccess$7(luvio, resourceParams, response);
1135
+ const snapshot = ingestSuccess$a(luvio, resourceParams, response);
1136
1136
  return luvio.storeBroadcast().then(() => snapshot);
1137
1137
  }, () => {
1138
1138
  const cache = new StoreKeyMap();
1139
- getResponseCacheKeys$7(cache, luvio, resourceParams, response.body);
1139
+ getResponseCacheKeys$a(cache, luvio, resourceParams, response.body);
1140
1140
  return cache;
1141
1141
  });
1142
1142
  }, (response) => {
@@ -1146,11 +1146,823 @@ function buildNetworkSnapshot$7(luvio, config, options) {
1146
1146
  }
1147
1147
  const performDocGenerationBatchProcessActionAdapterFactory = (luvio) => {
1148
1148
  return function performDocGenerationBatchProcessAction(untrustedConfig) {
1149
- const config = validateAdapterConfig$7(untrustedConfig, performDocGenerationBatchProcessAction_ConfigPropertyNames);
1149
+ const config = validateAdapterConfig$a(untrustedConfig, performDocGenerationBatchProcessAction_ConfigPropertyNames);
1150
1150
  // Invalid or incomplete config
1151
1151
  if (config === null) {
1152
1152
  throw new Error('Invalid config for "performDocGenerationBatchProcessAction"');
1153
1153
  }
1154
+ return buildNetworkSnapshot$a(luvio, config);
1155
+ };
1156
+ };
1157
+
1158
+ const VERSION$f = "22c47baf9ebfb5ceb4acd1d28c231ced";
1159
+ function validate$h(obj, path = 'DocumentTemplateChildRepresentation') {
1160
+ const v_error = (() => {
1161
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1162
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1163
+ }
1164
+ const obj_id = obj.id;
1165
+ const path_id = path + '.id';
1166
+ if (typeof obj_id !== 'string') {
1167
+ return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
1168
+ }
1169
+ const obj_lastModified = obj.lastModified;
1170
+ const path_lastModified = path + '.lastModified';
1171
+ if (typeof obj_lastModified !== 'string') {
1172
+ return new TypeError('Expected "string" but received "' + typeof obj_lastModified + '" (at "' + path_lastModified + '")');
1173
+ }
1174
+ const obj_name = obj.name;
1175
+ const path_name = path + '.name';
1176
+ if (typeof obj_name !== 'string') {
1177
+ return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
1178
+ }
1179
+ const obj_status = obj.status;
1180
+ const path_status = path + '.status';
1181
+ if (typeof obj_status !== 'string') {
1182
+ return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
1183
+ }
1184
+ })();
1185
+ return v_error === undefined ? null : v_error;
1186
+ }
1187
+ const select$p = function DocumentTemplateChildRepresentationSelect() {
1188
+ return {
1189
+ kind: 'Fragment',
1190
+ version: VERSION$f,
1191
+ private: [],
1192
+ selections: [
1193
+ {
1194
+ name: 'id',
1195
+ kind: 'Scalar'
1196
+ },
1197
+ {
1198
+ name: 'lastModified',
1199
+ kind: 'Scalar'
1200
+ },
1201
+ {
1202
+ name: 'name',
1203
+ kind: 'Scalar'
1204
+ },
1205
+ {
1206
+ name: 'status',
1207
+ kind: 'Scalar'
1208
+ }
1209
+ ]
1210
+ };
1211
+ };
1212
+ function equals$f(existing, incoming) {
1213
+ const existing_id = existing.id;
1214
+ const incoming_id = incoming.id;
1215
+ if (!(existing_id === incoming_id)) {
1216
+ return false;
1217
+ }
1218
+ const existing_lastModified = existing.lastModified;
1219
+ const incoming_lastModified = incoming.lastModified;
1220
+ if (!(existing_lastModified === incoming_lastModified)) {
1221
+ return false;
1222
+ }
1223
+ const existing_name = existing.name;
1224
+ const incoming_name = incoming.name;
1225
+ if (!(existing_name === incoming_name)) {
1226
+ return false;
1227
+ }
1228
+ const existing_status = existing.status;
1229
+ const incoming_status = incoming.status;
1230
+ if (!(existing_status === incoming_status)) {
1231
+ return false;
1232
+ }
1233
+ return true;
1234
+ }
1235
+
1236
+ const VERSION$e = "bcca69b0fc93d727f32d8348cda781c7";
1237
+ function validate$g(obj, path = 'DocumentTemplateParentRepresentation') {
1238
+ const v_error = (() => {
1239
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1240
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1241
+ }
1242
+ if (obj.hasMoreVersions !== undefined) {
1243
+ const obj_hasMoreVersions = obj.hasMoreVersions;
1244
+ const path_hasMoreVersions = path + '.hasMoreVersions';
1245
+ if (typeof obj_hasMoreVersions !== 'boolean') {
1246
+ return new TypeError('Expected "boolean" but received "' + typeof obj_hasMoreVersions + '" (at "' + path_hasMoreVersions + '")');
1247
+ }
1248
+ }
1249
+ const obj_isActive = obj.isActive;
1250
+ const path_isActive = path + '.isActive';
1251
+ if (typeof obj_isActive !== 'boolean') {
1252
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isActive + '" (at "' + path_isActive + '")');
1253
+ }
1254
+ const obj_lastModifiedDate = obj.lastModifiedDate;
1255
+ const path_lastModifiedDate = path + '.lastModifiedDate';
1256
+ if (typeof obj_lastModifiedDate !== 'string') {
1257
+ return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
1258
+ }
1259
+ const obj_name = obj.name;
1260
+ const path_name = path + '.name';
1261
+ if (typeof obj_name !== 'string') {
1262
+ return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
1263
+ }
1264
+ if (obj.namespace !== undefined) {
1265
+ const obj_namespace = obj.namespace;
1266
+ const path_namespace = path + '.namespace';
1267
+ if (typeof obj_namespace !== 'string') {
1268
+ return new TypeError('Expected "string" but received "' + typeof obj_namespace + '" (at "' + path_namespace + '")');
1269
+ }
1270
+ }
1271
+ const obj_type = obj.type;
1272
+ const path_type = path + '.type';
1273
+ if (typeof obj_type !== 'string') {
1274
+ return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
1275
+ }
1276
+ if (obj.usageType !== undefined) {
1277
+ const obj_usageType = obj.usageType;
1278
+ const path_usageType = path + '.usageType';
1279
+ if (typeof obj_usageType !== 'string') {
1280
+ return new TypeError('Expected "string" but received "' + typeof obj_usageType + '" (at "' + path_usageType + '")');
1281
+ }
1282
+ }
1283
+ const obj_versions = obj.versions;
1284
+ const path_versions = path + '.versions';
1285
+ if (!ArrayIsArray(obj_versions)) {
1286
+ return new TypeError('Expected "array" but received "' + typeof obj_versions + '" (at "' + path_versions + '")');
1287
+ }
1288
+ for (let i = 0; i < obj_versions.length; i++) {
1289
+ const obj_versions_item = obj_versions[i];
1290
+ const path_versions_item = path_versions + '[' + i + ']';
1291
+ const referencepath_versions_itemValidationError = validate$h(obj_versions_item, path_versions_item);
1292
+ if (referencepath_versions_itemValidationError !== null) {
1293
+ let message = 'Object doesn\'t match DocumentTemplateChildRepresentation (at "' + path_versions_item + '")\n';
1294
+ message += referencepath_versions_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1295
+ return new TypeError(message);
1296
+ }
1297
+ }
1298
+ })();
1299
+ return v_error === undefined ? null : v_error;
1300
+ }
1301
+ const select$o = function DocumentTemplateParentRepresentationSelect() {
1302
+ const { selections: DocumentTemplateChildRepresentation__selections, opaque: DocumentTemplateChildRepresentation__opaque, } = select$p();
1303
+ return {
1304
+ kind: 'Fragment',
1305
+ version: VERSION$e,
1306
+ private: [],
1307
+ selections: [
1308
+ {
1309
+ name: 'hasMoreVersions',
1310
+ kind: 'Scalar',
1311
+ required: false
1312
+ },
1313
+ {
1314
+ name: 'isActive',
1315
+ kind: 'Scalar'
1316
+ },
1317
+ {
1318
+ name: 'lastModifiedDate',
1319
+ kind: 'Scalar'
1320
+ },
1321
+ {
1322
+ name: 'name',
1323
+ kind: 'Scalar'
1324
+ },
1325
+ {
1326
+ name: 'namespace',
1327
+ kind: 'Scalar',
1328
+ required: false
1329
+ },
1330
+ {
1331
+ name: 'type',
1332
+ kind: 'Scalar'
1333
+ },
1334
+ {
1335
+ name: 'usageType',
1336
+ kind: 'Scalar',
1337
+ required: false
1338
+ },
1339
+ {
1340
+ name: 'versions',
1341
+ kind: 'Object',
1342
+ plural: true,
1343
+ selections: DocumentTemplateChildRepresentation__selections
1344
+ }
1345
+ ]
1346
+ };
1347
+ };
1348
+ function equals$e(existing, incoming) {
1349
+ const existing_hasMoreVersions = existing.hasMoreVersions;
1350
+ const incoming_hasMoreVersions = incoming.hasMoreVersions;
1351
+ // if at least one of these optionals is defined
1352
+ if (existing_hasMoreVersions !== undefined || incoming_hasMoreVersions !== undefined) {
1353
+ // if one of these is not defined we know the other is defined and therefore
1354
+ // not equal
1355
+ if (existing_hasMoreVersions === undefined || incoming_hasMoreVersions === undefined) {
1356
+ return false;
1357
+ }
1358
+ if (!(existing_hasMoreVersions === incoming_hasMoreVersions)) {
1359
+ return false;
1360
+ }
1361
+ }
1362
+ const existing_isActive = existing.isActive;
1363
+ const incoming_isActive = incoming.isActive;
1364
+ if (!(existing_isActive === incoming_isActive)) {
1365
+ return false;
1366
+ }
1367
+ const existing_lastModifiedDate = existing.lastModifiedDate;
1368
+ const incoming_lastModifiedDate = incoming.lastModifiedDate;
1369
+ if (!(existing_lastModifiedDate === incoming_lastModifiedDate)) {
1370
+ return false;
1371
+ }
1372
+ const existing_name = existing.name;
1373
+ const incoming_name = incoming.name;
1374
+ if (!(existing_name === incoming_name)) {
1375
+ return false;
1376
+ }
1377
+ const existing_namespace = existing.namespace;
1378
+ const incoming_namespace = incoming.namespace;
1379
+ // if at least one of these optionals is defined
1380
+ if (existing_namespace !== undefined || incoming_namespace !== undefined) {
1381
+ // if one of these is not defined we know the other is defined and therefore
1382
+ // not equal
1383
+ if (existing_namespace === undefined || incoming_namespace === undefined) {
1384
+ return false;
1385
+ }
1386
+ if (!(existing_namespace === incoming_namespace)) {
1387
+ return false;
1388
+ }
1389
+ }
1390
+ const existing_type = existing.type;
1391
+ const incoming_type = incoming.type;
1392
+ if (!(existing_type === incoming_type)) {
1393
+ return false;
1394
+ }
1395
+ const existing_usageType = existing.usageType;
1396
+ const incoming_usageType = incoming.usageType;
1397
+ // if at least one of these optionals is defined
1398
+ if (existing_usageType !== undefined || incoming_usageType !== undefined) {
1399
+ // if one of these is not defined we know the other is defined and therefore
1400
+ // not equal
1401
+ if (existing_usageType === undefined || incoming_usageType === undefined) {
1402
+ return false;
1403
+ }
1404
+ if (!(existing_usageType === incoming_usageType)) {
1405
+ return false;
1406
+ }
1407
+ }
1408
+ const existing_versions = existing.versions;
1409
+ const incoming_versions = incoming.versions;
1410
+ const equals_versions_items = equalsArray(existing_versions, incoming_versions, (existing_versions_item, incoming_versions_item) => {
1411
+ if (!(equals$f(existing_versions_item, incoming_versions_item))) {
1412
+ return false;
1413
+ }
1414
+ });
1415
+ if (equals_versions_items === false) {
1416
+ return false;
1417
+ }
1418
+ return true;
1419
+ }
1420
+
1421
+ const VERSION$d = "9233b507a0a143b5890d45f8d1e61202";
1422
+ function validate$f(obj, path = 'DocumentTemplateListRepresentation') {
1423
+ const v_error = (() => {
1424
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1425
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1426
+ }
1427
+ if (obj.data !== undefined) {
1428
+ const obj_data = obj.data;
1429
+ const path_data = path + '.data';
1430
+ if (!ArrayIsArray(obj_data)) {
1431
+ return new TypeError('Expected "array" but received "' + typeof obj_data + '" (at "' + path_data + '")');
1432
+ }
1433
+ for (let i = 0; i < obj_data.length; i++) {
1434
+ const obj_data_item = obj_data[i];
1435
+ const path_data_item = path_data + '[' + i + ']';
1436
+ const referencepath_data_itemValidationError = validate$g(obj_data_item, path_data_item);
1437
+ if (referencepath_data_itemValidationError !== null) {
1438
+ let message = 'Object doesn\'t match DocumentTemplateParentRepresentation (at "' + path_data_item + '")\n';
1439
+ message += referencepath_data_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1440
+ return new TypeError(message);
1441
+ }
1442
+ }
1443
+ }
1444
+ if (obj.next !== undefined) {
1445
+ const obj_next = obj.next;
1446
+ const path_next = path + '.next';
1447
+ if (typeof obj_next !== 'string') {
1448
+ return new TypeError('Expected "string" but received "' + typeof obj_next + '" (at "' + path_next + '")');
1449
+ }
1450
+ }
1451
+ if (obj.totalRecord !== undefined) {
1452
+ const obj_totalRecord = obj.totalRecord;
1453
+ const path_totalRecord = path + '.totalRecord';
1454
+ if (typeof obj_totalRecord !== 'number' || (typeof obj_totalRecord === 'number' && Math.floor(obj_totalRecord) !== obj_totalRecord)) {
1455
+ return new TypeError('Expected "integer" but received "' + typeof obj_totalRecord + '" (at "' + path_totalRecord + '")');
1456
+ }
1457
+ }
1458
+ })();
1459
+ return v_error === undefined ? null : v_error;
1460
+ }
1461
+ const RepresentationType$8 = 'DocumentTemplateListRepresentation';
1462
+ function normalize$8(input, existing, path, luvio, store, timestamp) {
1463
+ return input;
1464
+ }
1465
+ const select$n = function DocumentTemplateListRepresentationSelect() {
1466
+ const { selections: DocumentTemplateParentRepresentation__selections, opaque: DocumentTemplateParentRepresentation__opaque, } = select$o();
1467
+ return {
1468
+ kind: 'Fragment',
1469
+ version: VERSION$d,
1470
+ private: [],
1471
+ selections: [
1472
+ {
1473
+ name: 'data',
1474
+ kind: 'Object',
1475
+ plural: true,
1476
+ selections: DocumentTemplateParentRepresentation__selections,
1477
+ required: false
1478
+ },
1479
+ {
1480
+ name: 'next',
1481
+ kind: 'Scalar',
1482
+ required: false
1483
+ },
1484
+ {
1485
+ name: 'totalRecord',
1486
+ kind: 'Scalar',
1487
+ required: false
1488
+ }
1489
+ ]
1490
+ };
1491
+ };
1492
+ function equals$d(existing, incoming) {
1493
+ const existing_totalRecord = existing.totalRecord;
1494
+ const incoming_totalRecord = incoming.totalRecord;
1495
+ // if at least one of these optionals is defined
1496
+ if (existing_totalRecord !== undefined || incoming_totalRecord !== undefined) {
1497
+ // if one of these is not defined we know the other is defined and therefore
1498
+ // not equal
1499
+ if (existing_totalRecord === undefined || incoming_totalRecord === undefined) {
1500
+ return false;
1501
+ }
1502
+ if (!(existing_totalRecord === incoming_totalRecord)) {
1503
+ return false;
1504
+ }
1505
+ }
1506
+ const existing_next = existing.next;
1507
+ const incoming_next = incoming.next;
1508
+ // if at least one of these optionals is defined
1509
+ if (existing_next !== undefined || incoming_next !== undefined) {
1510
+ // if one of these is not defined we know the other is defined and therefore
1511
+ // not equal
1512
+ if (existing_next === undefined || incoming_next === undefined) {
1513
+ return false;
1514
+ }
1515
+ if (!(existing_next === incoming_next)) {
1516
+ return false;
1517
+ }
1518
+ }
1519
+ const existing_data = existing.data;
1520
+ const incoming_data = incoming.data;
1521
+ // if at least one of these optionals is defined
1522
+ if (existing_data !== undefined || incoming_data !== undefined) {
1523
+ // if one of these is not defined we know the other is defined and therefore
1524
+ // not equal
1525
+ if (existing_data === undefined || incoming_data === undefined) {
1526
+ return false;
1527
+ }
1528
+ const equals_data_items = equalsArray(existing_data, incoming_data, (existing_data_item, incoming_data_item) => {
1529
+ if (!(equals$e(existing_data_item, incoming_data_item))) {
1530
+ return false;
1531
+ }
1532
+ });
1533
+ if (equals_data_items === false) {
1534
+ return false;
1535
+ }
1536
+ }
1537
+ return true;
1538
+ }
1539
+ const ingest$8 = function DocumentTemplateListRepresentationIngest(input, path, luvio, store, timestamp) {
1540
+ if (process.env.NODE_ENV !== 'production') {
1541
+ const validateError = validate$f(input);
1542
+ if (validateError !== null) {
1543
+ throw validateError;
1544
+ }
1545
+ }
1546
+ const key = path.fullPath;
1547
+ const ttlToUse = path.ttl !== undefined ? path.ttl : 360000;
1548
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$8, "docgen", VERSION$d, RepresentationType$8, equals$d);
1549
+ return createLink(key);
1550
+ };
1551
+ function getTypeCacheKeys$8(rootKeySet, luvio, input, fullPathFactory) {
1552
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1553
+ const rootKey = fullPathFactory();
1554
+ rootKeySet.set(rootKey, {
1555
+ namespace: keyPrefix,
1556
+ representationName: RepresentationType$8,
1557
+ mergeable: false
1558
+ });
1559
+ }
1560
+
1561
+ function select$m(luvio, params) {
1562
+ return select$n();
1563
+ }
1564
+ function keyBuilder$d(luvio, params) {
1565
+ return keyPrefix + '::DocumentTemplateListRepresentation:(' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ',' + 'searchString:' + params.queryParams.searchString + ')';
1566
+ }
1567
+ function getResponseCacheKeys$9(storeKeyMap, luvio, resourceParams, response) {
1568
+ getTypeCacheKeys$8(storeKeyMap, luvio, response, () => keyBuilder$d(luvio, resourceParams));
1569
+ }
1570
+ function ingestSuccess$9(luvio, resourceParams, response, snapshotRefresh) {
1571
+ const { body } = response;
1572
+ const key = keyBuilder$d(luvio, resourceParams);
1573
+ luvio.storeIngest(key, ingest$8, body);
1574
+ const snapshot = luvio.storeLookup({
1575
+ recordId: key,
1576
+ node: select$m(),
1577
+ variables: {},
1578
+ }, snapshotRefresh);
1579
+ if (process.env.NODE_ENV !== 'production') {
1580
+ if (snapshot.state !== 'Fulfilled') {
1581
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1582
+ }
1583
+ }
1584
+ deepFreeze(snapshot.data);
1585
+ return snapshot;
1586
+ }
1587
+ function ingestError$4(luvio, params, error, snapshotRefresh) {
1588
+ const key = keyBuilder$d(luvio, params);
1589
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1590
+ luvio.storeIngestError(key, errorSnapshot);
1591
+ return errorSnapshot;
1592
+ }
1593
+ function createResourceRequest$9(config) {
1594
+ const headers = {};
1595
+ return {
1596
+ baseUri: '/services/data/v60.0',
1597
+ basePath: '/connect/docgen/document-templates',
1598
+ method: 'get',
1599
+ body: null,
1600
+ urlParams: {},
1601
+ queryParams: config.queryParams,
1602
+ headers,
1603
+ priority: 'normal',
1604
+ };
1605
+ }
1606
+
1607
+ const adapterName$9 = 'getDocumentTemplates';
1608
+ const getDocumentTemplates_ConfigPropertyMetadata = [
1609
+ generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 0 /* String */),
1610
+ generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 0 /* String */),
1611
+ generateParamConfigMetadata('searchString', false, 1 /* QueryParameter */, 0 /* String */),
1612
+ ];
1613
+ const getDocumentTemplates_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$9, getDocumentTemplates_ConfigPropertyMetadata);
1614
+ const createResourceParams$9 = /*#__PURE__*/ createResourceParams$e(getDocumentTemplates_ConfigPropertyMetadata);
1615
+ function keyBuilder$c(luvio, config) {
1616
+ const resourceParams = createResourceParams$9(config);
1617
+ return keyBuilder$d(luvio, resourceParams);
1618
+ }
1619
+ function typeCheckConfig$9(untrustedConfig) {
1620
+ const config = {};
1621
+ typeCheckConfig$e(untrustedConfig, config, getDocumentTemplates_ConfigPropertyMetadata);
1622
+ return config;
1623
+ }
1624
+ function validateAdapterConfig$9(untrustedConfig, configPropertyNames) {
1625
+ if (!untrustedIsObject(untrustedConfig)) {
1626
+ return null;
1627
+ }
1628
+ if (process.env.NODE_ENV !== 'production') {
1629
+ validateConfig(untrustedConfig, configPropertyNames);
1630
+ }
1631
+ const config = typeCheckConfig$9(untrustedConfig);
1632
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1633
+ return null;
1634
+ }
1635
+ return config;
1636
+ }
1637
+ function adapterFragment$4(luvio, config) {
1638
+ createResourceParams$9(config);
1639
+ return select$m();
1640
+ }
1641
+ function onFetchResponseSuccess$4(luvio, config, resourceParams, response) {
1642
+ const snapshot = ingestSuccess$9(luvio, resourceParams, response, {
1643
+ config,
1644
+ resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
1645
+ });
1646
+ return luvio.storeBroadcast().then(() => snapshot);
1647
+ }
1648
+ function onFetchResponseError$4(luvio, config, resourceParams, response) {
1649
+ const snapshot = ingestError$4(luvio, resourceParams, response, {
1650
+ config,
1651
+ resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
1652
+ });
1653
+ return luvio.storeBroadcast().then(() => snapshot);
1654
+ }
1655
+ function buildNetworkSnapshot$9(luvio, config, options) {
1656
+ const resourceParams = createResourceParams$9(config);
1657
+ const request = createResourceRequest$9(resourceParams);
1658
+ return luvio.dispatchResourceRequest(request, options)
1659
+ .then((response) => {
1660
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$4(luvio, config, resourceParams, response), () => {
1661
+ const cache = new StoreKeyMap();
1662
+ getResponseCacheKeys$9(cache, luvio, resourceParams, response.body);
1663
+ return cache;
1664
+ });
1665
+ }, (response) => {
1666
+ return luvio.handleErrorResponse(() => onFetchResponseError$4(luvio, config, resourceParams, response));
1667
+ });
1668
+ }
1669
+ function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
1670
+ return buildNetworkSnapshotCachePolicy$8(context, coercedAdapterRequestContext, buildNetworkSnapshot$9, undefined, false);
1671
+ }
1672
+ function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
1673
+ const { luvio, config } = context;
1674
+ const selector = {
1675
+ recordId: keyBuilder$c(luvio, config),
1676
+ node: adapterFragment$4(luvio, config),
1677
+ variables: {},
1678
+ };
1679
+ const cacheSnapshot = storeLookup(selector, {
1680
+ config,
1681
+ resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
1682
+ });
1683
+ return cacheSnapshot;
1684
+ }
1685
+ const getDocumentTemplatesAdapterFactory = (luvio) => function docgen__getDocumentTemplates(untrustedConfig, requestContext) {
1686
+ const config = validateAdapterConfig$9(untrustedConfig, getDocumentTemplates_ConfigPropertyNames);
1687
+ // Invalid or incomplete config
1688
+ if (config === null) {
1689
+ return null;
1690
+ }
1691
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
1692
+ buildCachedSnapshotCachePolicy$4, buildNetworkSnapshotCachePolicy$4);
1693
+ };
1694
+
1695
+ const VERSION$c = "a76e3b017946dd2b8a364cca245fda4d";
1696
+ function validate$e(obj, path = 'DocumentTemplateRepresentation') {
1697
+ const v_error = (() => {
1698
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1699
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1700
+ }
1701
+ const obj_documentTemplateId = obj.documentTemplateId;
1702
+ const path_documentTemplateId = path + '.documentTemplateId';
1703
+ if (typeof obj_documentTemplateId !== 'string') {
1704
+ return new TypeError('Expected "string" but received "' + typeof obj_documentTemplateId + '" (at "' + path_documentTemplateId + '")');
1705
+ }
1706
+ })();
1707
+ return v_error === undefined ? null : v_error;
1708
+ }
1709
+ const RepresentationType$7 = 'DocumentTemplateRepresentation';
1710
+ function keyBuilder$b(luvio, config) {
1711
+ return keyPrefix + '::' + RepresentationType$7 + ':' + config.documentTemplateId;
1712
+ }
1713
+ function keyBuilderFromType$3(luvio, object) {
1714
+ const keyParams = {
1715
+ documentTemplateId: object.documentTemplateId
1716
+ };
1717
+ return keyBuilder$b(luvio, keyParams);
1718
+ }
1719
+ function normalize$7(input, existing, path, luvio, store, timestamp) {
1720
+ return input;
1721
+ }
1722
+ const select$l = function DocumentTemplateRepresentationSelect() {
1723
+ return {
1724
+ kind: 'Fragment',
1725
+ version: VERSION$c,
1726
+ private: [],
1727
+ selections: [
1728
+ {
1729
+ name: 'documentTemplateId',
1730
+ kind: 'Scalar'
1731
+ }
1732
+ ]
1733
+ };
1734
+ };
1735
+ function equals$c(existing, incoming) {
1736
+ const existing_documentTemplateId = existing.documentTemplateId;
1737
+ const incoming_documentTemplateId = incoming.documentTemplateId;
1738
+ if (!(existing_documentTemplateId === incoming_documentTemplateId)) {
1739
+ return false;
1740
+ }
1741
+ return true;
1742
+ }
1743
+ const ingest$7 = function DocumentTemplateRepresentationIngest(input, path, luvio, store, timestamp) {
1744
+ if (process.env.NODE_ENV !== 'production') {
1745
+ const validateError = validate$e(input);
1746
+ if (validateError !== null) {
1747
+ throw validateError;
1748
+ }
1749
+ }
1750
+ const key = keyBuilderFromType$3(luvio, input);
1751
+ const ttlToUse = path.ttl !== undefined ? path.ttl : 360000;
1752
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$7, "docgen", VERSION$c, RepresentationType$7, equals$c);
1753
+ return createLink(key);
1754
+ };
1755
+ function getTypeCacheKeys$7(rootKeySet, luvio, input, fullPathFactory) {
1756
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1757
+ const rootKey = keyBuilderFromType$3(luvio, input);
1758
+ rootKeySet.set(rootKey, {
1759
+ namespace: keyPrefix,
1760
+ representationName: RepresentationType$7,
1761
+ mergeable: false
1762
+ });
1763
+ }
1764
+
1765
+ function select$k(luvio, params) {
1766
+ return select$l();
1767
+ }
1768
+ function getResponseCacheKeys$8(storeKeyMap, luvio, resourceParams, response) {
1769
+ getTypeCacheKeys$7(storeKeyMap, luvio, response);
1770
+ }
1771
+ function ingestSuccess$8(luvio, resourceParams, response) {
1772
+ const { body } = response;
1773
+ const key = keyBuilderFromType$3(luvio, body);
1774
+ luvio.storeIngest(key, ingest$7, body);
1775
+ const snapshot = luvio.storeLookup({
1776
+ recordId: key,
1777
+ node: select$k(),
1778
+ variables: {},
1779
+ });
1780
+ if (process.env.NODE_ENV !== 'production') {
1781
+ if (snapshot.state !== 'Fulfilled') {
1782
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1783
+ }
1784
+ }
1785
+ deepFreeze(snapshot.data);
1786
+ return snapshot;
1787
+ }
1788
+ function createResourceRequest$8(config) {
1789
+ const headers = {};
1790
+ return {
1791
+ baseUri: '/services/data/v60.0',
1792
+ basePath: '/connect/docgen/document-templates',
1793
+ method: 'patch',
1794
+ body: config.body,
1795
+ urlParams: {},
1796
+ queryParams: config.queryParams,
1797
+ headers,
1798
+ priority: 'normal',
1799
+ };
1800
+ }
1801
+
1802
+ const adapterName$8 = 'updateDocumentTemplate';
1803
+ const updateDocumentTemplate_ConfigPropertyMetadata = [
1804
+ generateParamConfigMetadata('documentTemplateId', false, 1 /* QueryParameter */, 0 /* String */),
1805
+ generateParamConfigMetadata('contentDocumentId', false, 2 /* Body */, 0 /* String */),
1806
+ generateParamConfigMetadata('documentGenerationMechanism', false, 2 /* Body */, 0 /* String */),
1807
+ generateParamConfigMetadata('extractOmniDataTransformName', false, 2 /* Body */, 0 /* String */),
1808
+ generateParamConfigMetadata('isActive', false, 2 /* Body */, 1 /* Boolean */),
1809
+ generateParamConfigMetadata('mapperOmniDataTransformName', false, 2 /* Body */, 0 /* String */),
1810
+ generateParamConfigMetadata('status', false, 2 /* Body */, 0 /* String */),
1811
+ generateParamConfigMetadata('tokenList', false, 2 /* Body */, 0 /* String */),
1812
+ generateParamConfigMetadata('tokenMappingMethodType', false, 2 /* Body */, 0 /* String */),
1813
+ generateParamConfigMetadata('usageType', false, 2 /* Body */, 0 /* String */),
1814
+ generateParamConfigMetadata('shouldDisplayUnmappedToken', false, 2 /* Body */, 1 /* Boolean */),
1815
+ ];
1816
+ const updateDocumentTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$8, updateDocumentTemplate_ConfigPropertyMetadata);
1817
+ const createResourceParams$8 = /*#__PURE__*/ createResourceParams$e(updateDocumentTemplate_ConfigPropertyMetadata);
1818
+ function typeCheckConfig$8(untrustedConfig) {
1819
+ const config = {};
1820
+ typeCheckConfig$e(untrustedConfig, config, updateDocumentTemplate_ConfigPropertyMetadata);
1821
+ return config;
1822
+ }
1823
+ function validateAdapterConfig$8(untrustedConfig, configPropertyNames) {
1824
+ if (!untrustedIsObject(untrustedConfig)) {
1825
+ return null;
1826
+ }
1827
+ if (process.env.NODE_ENV !== 'production') {
1828
+ validateConfig(untrustedConfig, configPropertyNames);
1829
+ }
1830
+ const config = typeCheckConfig$8(untrustedConfig);
1831
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1832
+ return null;
1833
+ }
1834
+ return config;
1835
+ }
1836
+ function buildNetworkSnapshot$8(luvio, config, options) {
1837
+ const resourceParams = createResourceParams$8(config);
1838
+ const request = createResourceRequest$8(resourceParams);
1839
+ return luvio.dispatchResourceRequest(request, options)
1840
+ .then((response) => {
1841
+ return luvio.handleSuccessResponse(() => {
1842
+ const snapshot = ingestSuccess$8(luvio, resourceParams, response);
1843
+ return luvio.storeBroadcast().then(() => snapshot);
1844
+ }, () => {
1845
+ const cache = new StoreKeyMap();
1846
+ getResponseCacheKeys$8(cache, luvio, resourceParams, response.body);
1847
+ return cache;
1848
+ });
1849
+ }, (response) => {
1850
+ deepFreeze(response);
1851
+ throw response;
1852
+ });
1853
+ }
1854
+ const updateDocumentTemplateAdapterFactory = (luvio) => {
1855
+ return function updateDocumentTemplate(untrustedConfig) {
1856
+ const config = validateAdapterConfig$8(untrustedConfig, updateDocumentTemplate_ConfigPropertyNames);
1857
+ // Invalid or incomplete config
1858
+ if (config === null) {
1859
+ throw new Error('Invalid config for "updateDocumentTemplate"');
1860
+ }
1861
+ return buildNetworkSnapshot$8(luvio, config);
1862
+ };
1863
+ };
1864
+
1865
+ function select$j(luvio, params) {
1866
+ return select$l();
1867
+ }
1868
+ function getResponseCacheKeys$7(storeKeyMap, luvio, resourceParams, response) {
1869
+ getTypeCacheKeys$7(storeKeyMap, luvio, response);
1870
+ }
1871
+ function ingestSuccess$7(luvio, resourceParams, response) {
1872
+ const { body } = response;
1873
+ const key = keyBuilderFromType$3(luvio, body);
1874
+ luvio.storeIngest(key, ingest$7, body);
1875
+ const snapshot = luvio.storeLookup({
1876
+ recordId: key,
1877
+ node: select$j(),
1878
+ variables: {},
1879
+ });
1880
+ if (process.env.NODE_ENV !== 'production') {
1881
+ if (snapshot.state !== 'Fulfilled') {
1882
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1883
+ }
1884
+ }
1885
+ deepFreeze(snapshot.data);
1886
+ return snapshot;
1887
+ }
1888
+ function createResourceRequest$7(config) {
1889
+ const headers = {};
1890
+ return {
1891
+ baseUri: '/services/data/v60.0',
1892
+ basePath: '/connect/docgen/document-templates',
1893
+ method: 'post',
1894
+ body: config.body,
1895
+ urlParams: {},
1896
+ queryParams: config.queryParams,
1897
+ headers,
1898
+ priority: 'normal',
1899
+ };
1900
+ }
1901
+
1902
+ const adapterName$7 = 'createDocumentTemplate';
1903
+ const createDocumentTemplate_ConfigPropertyMetadata = [
1904
+ generateParamConfigMetadata('action', false, 1 /* QueryParameter */, 0 /* String */),
1905
+ generateParamConfigMetadata('documentTemplateId', false, 1 /* QueryParameter */, 0 /* String */),
1906
+ generateParamConfigMetadata('contentDocumentId', false, 2 /* Body */, 0 /* String */),
1907
+ generateParamConfigMetadata('documentGenerationMechanism', false, 2 /* Body */, 0 /* String */),
1908
+ generateParamConfigMetadata('extractOmniDataTransformName', false, 2 /* Body */, 0 /* String */),
1909
+ generateParamConfigMetadata('mapperOmniDataTransformName', false, 2 /* Body */, 0 /* String */),
1910
+ generateParamConfigMetadata('name', false, 2 /* Body */, 0 /* String */),
1911
+ generateParamConfigMetadata('shouldExtractEmbeddedTmplToken', false, 2 /* Body */, 1 /* Boolean */),
1912
+ generateParamConfigMetadata('status', false, 2 /* Body */, 0 /* String */),
1913
+ generateParamConfigMetadata('tokenList', false, 2 /* Body */, 0 /* String */),
1914
+ generateParamConfigMetadata('tokenMappingMethodType', false, 2 /* Body */, 0 /* String */),
1915
+ generateParamConfigMetadata('tokenMappingType', false, 2 /* Body */, 0 /* String */),
1916
+ generateParamConfigMetadata('type', false, 2 /* Body */, 0 /* String */),
1917
+ generateParamConfigMetadata('usageType', false, 2 /* Body */, 0 /* String */),
1918
+ generateParamConfigMetadata('versionNumber', false, 2 /* Body */, 0 /* String */),
1919
+ generateParamConfigMetadata('xmlRelationshipMetadata', false, 2 /* Body */, 0 /* String */),
1920
+ ];
1921
+ const createDocumentTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$7, createDocumentTemplate_ConfigPropertyMetadata);
1922
+ const createResourceParams$7 = /*#__PURE__*/ createResourceParams$e(createDocumentTemplate_ConfigPropertyMetadata);
1923
+ function typeCheckConfig$7(untrustedConfig) {
1924
+ const config = {};
1925
+ typeCheckConfig$e(untrustedConfig, config, createDocumentTemplate_ConfigPropertyMetadata);
1926
+ return config;
1927
+ }
1928
+ function validateAdapterConfig$7(untrustedConfig, configPropertyNames) {
1929
+ if (!untrustedIsObject(untrustedConfig)) {
1930
+ return null;
1931
+ }
1932
+ if (process.env.NODE_ENV !== 'production') {
1933
+ validateConfig(untrustedConfig, configPropertyNames);
1934
+ }
1935
+ const config = typeCheckConfig$7(untrustedConfig);
1936
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1937
+ return null;
1938
+ }
1939
+ return config;
1940
+ }
1941
+ function buildNetworkSnapshot$7(luvio, config, options) {
1942
+ const resourceParams = createResourceParams$7(config);
1943
+ const request = createResourceRequest$7(resourceParams);
1944
+ return luvio.dispatchResourceRequest(request, options)
1945
+ .then((response) => {
1946
+ return luvio.handleSuccessResponse(() => {
1947
+ const snapshot = ingestSuccess$7(luvio, resourceParams, response);
1948
+ return luvio.storeBroadcast().then(() => snapshot);
1949
+ }, () => {
1950
+ const cache = new StoreKeyMap();
1951
+ getResponseCacheKeys$7(cache, luvio, resourceParams, response.body);
1952
+ return cache;
1953
+ });
1954
+ }, (response) => {
1955
+ deepFreeze(response);
1956
+ throw response;
1957
+ });
1958
+ }
1959
+ const createDocumentTemplateAdapterFactory = (luvio) => {
1960
+ return function createDocumentTemplate(untrustedConfig) {
1961
+ const config = validateAdapterConfig$7(untrustedConfig, createDocumentTemplate_ConfigPropertyNames);
1962
+ // Invalid or incomplete config
1963
+ if (config === null) {
1964
+ throw new Error('Invalid config for "createDocumentTemplate"');
1965
+ }
1154
1966
  return buildNetworkSnapshot$7(luvio, config);
1155
1967
  };
1156
1968
  };
@@ -1466,14 +2278,14 @@ const getDocuments_ConfigPropertyMetadata = [
1466
2278
  generateParamConfigMetadata('sourceObjectId', false, 1 /* QueryParameter */, 0 /* String */),
1467
2279
  ];
1468
2280
  const getDocuments_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, getDocuments_ConfigPropertyMetadata);
1469
- const createResourceParams$6 = /*#__PURE__*/ createResourceParams$b(getDocuments_ConfigPropertyMetadata);
2281
+ const createResourceParams$6 = /*#__PURE__*/ createResourceParams$e(getDocuments_ConfigPropertyMetadata);
1470
2282
  function keyBuilder$9(luvio, config) {
1471
2283
  const resourceParams = createResourceParams$6(config);
1472
2284
  return keyBuilder$a(luvio, resourceParams);
1473
2285
  }
1474
2286
  function typeCheckConfig$6(untrustedConfig) {
1475
2287
  const config = {};
1476
- typeCheckConfig$b(untrustedConfig, config, getDocuments_ConfigPropertyMetadata);
2288
+ typeCheckConfig$e(untrustedConfig, config, getDocuments_ConfigPropertyMetadata);
1477
2289
  return config;
1478
2290
  }
1479
2291
  function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
@@ -1522,7 +2334,7 @@ function buildNetworkSnapshot$6(luvio, config, options) {
1522
2334
  });
1523
2335
  }
1524
2336
  function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
1525
- return buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext, buildNetworkSnapshot$6, undefined, false);
2337
+ return buildNetworkSnapshotCachePolicy$8(context, coercedAdapterRequestContext, buildNetworkSnapshot$6, undefined, false);
1526
2338
  }
1527
2339
  function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
1528
2340
  const { luvio, config } = context;
@@ -1931,14 +2743,14 @@ const getESignNotificationSettings_ConfigPropertyMetadata = [
1931
2743
  generateParamConfigMetadata('sourceObjectId', false, 1 /* QueryParameter */, 0 /* String */),
1932
2744
  ];
1933
2745
  const getESignNotificationSettings_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, getESignNotificationSettings_ConfigPropertyMetadata);
1934
- const createResourceParams$5 = /*#__PURE__*/ createResourceParams$b(getESignNotificationSettings_ConfigPropertyMetadata);
2746
+ const createResourceParams$5 = /*#__PURE__*/ createResourceParams$e(getESignNotificationSettings_ConfigPropertyMetadata);
1935
2747
  function keyBuilder$7(luvio, config) {
1936
2748
  const resourceParams = createResourceParams$5(config);
1937
2749
  return keyBuilder$8(luvio, resourceParams);
1938
2750
  }
1939
2751
  function typeCheckConfig$5(untrustedConfig) {
1940
2752
  const config = {};
1941
- typeCheckConfig$b(untrustedConfig, config, getESignNotificationSettings_ConfigPropertyMetadata);
2753
+ typeCheckConfig$e(untrustedConfig, config, getESignNotificationSettings_ConfigPropertyMetadata);
1942
2754
  return config;
1943
2755
  }
1944
2756
  function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
@@ -1987,7 +2799,7 @@ function buildNetworkSnapshot$5(luvio, config, options) {
1987
2799
  });
1988
2800
  }
1989
2801
  function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
1990
- return buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext, buildNetworkSnapshot$5, undefined, false);
2802
+ return buildNetworkSnapshotCachePolicy$8(context, coercedAdapterRequestContext, buildNetworkSnapshot$5, undefined, false);
1991
2803
  }
1992
2804
  function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
1993
2805
  const { luvio, config } = context;
@@ -2298,14 +3110,14 @@ const getRecipients_ConfigPropertyMetadata = [
2298
3110
  generateParamConfigMetadata('sourceObjectId', false, 1 /* QueryParameter */, 0 /* String */),
2299
3111
  ];
2300
3112
  const getRecipients_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getRecipients_ConfigPropertyMetadata);
2301
- const createResourceParams$4 = /*#__PURE__*/ createResourceParams$b(getRecipients_ConfigPropertyMetadata);
3113
+ const createResourceParams$4 = /*#__PURE__*/ createResourceParams$e(getRecipients_ConfigPropertyMetadata);
2302
3114
  function keyBuilder$5(luvio, config) {
2303
3115
  const resourceParams = createResourceParams$4(config);
2304
3116
  return keyBuilder$6(luvio, resourceParams);
2305
3117
  }
2306
3118
  function typeCheckConfig$4(untrustedConfig) {
2307
3119
  const config = {};
2308
- typeCheckConfig$b(untrustedConfig, config, getRecipients_ConfigPropertyMetadata);
3120
+ typeCheckConfig$e(untrustedConfig, config, getRecipients_ConfigPropertyMetadata);
2309
3121
  return config;
2310
3122
  }
2311
3123
  function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
@@ -2354,7 +3166,7 @@ function buildNetworkSnapshot$4(luvio, config, options) {
2354
3166
  });
2355
3167
  }
2356
3168
  function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
2357
- return buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, undefined, false);
3169
+ return buildNetworkSnapshotCachePolicy$8(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, undefined, false);
2358
3170
  }
2359
3171
  function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
2360
3172
  const { luvio, config } = context;
@@ -2565,10 +3377,10 @@ const createDocumentEnvelopeForEsign_ConfigPropertyMetadata = [
2565
3377
  generateParamConfigMetadata('envelope', true, 2 /* Body */, 4 /* Unsupported */),
2566
3378
  ];
2567
3379
  const createDocumentEnvelopeForEsign_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, createDocumentEnvelopeForEsign_ConfigPropertyMetadata);
2568
- const createResourceParams$3 = /*#__PURE__*/ createResourceParams$b(createDocumentEnvelopeForEsign_ConfigPropertyMetadata);
3380
+ const createResourceParams$3 = /*#__PURE__*/ createResourceParams$e(createDocumentEnvelopeForEsign_ConfigPropertyMetadata);
2569
3381
  function typeCheckConfig$3(untrustedConfig) {
2570
3382
  const config = {};
2571
- typeCheckConfig$b(untrustedConfig, config, createDocumentEnvelopeForEsign_ConfigPropertyMetadata);
3383
+ typeCheckConfig$e(untrustedConfig, config, createDocumentEnvelopeForEsign_ConfigPropertyMetadata);
2572
3384
  const untrustedConfig_envelope = untrustedConfig.envelope;
2573
3385
  const referenceEnvelopeSendRequestValidationError = validate$6(untrustedConfig_envelope);
2574
3386
  if (referenceEnvelopeSendRequestValidationError === null) {
@@ -2904,10 +3716,10 @@ const updateEnvelope_ConfigPropertyMetadata = [
2904
3716
  generateParamConfigMetadata('sourceObjectId', true, 0 /* UrlParameter */, 0 /* String */),
2905
3717
  ];
2906
3718
  const updateEnvelope_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, updateEnvelope_ConfigPropertyMetadata);
2907
- const createResourceParams$2 = /*#__PURE__*/ createResourceParams$b(updateEnvelope_ConfigPropertyMetadata);
3719
+ const createResourceParams$2 = /*#__PURE__*/ createResourceParams$e(updateEnvelope_ConfigPropertyMetadata);
2908
3720
  function typeCheckConfig$2(untrustedConfig) {
2909
3721
  const config = {};
2910
- typeCheckConfig$b(untrustedConfig, config, updateEnvelope_ConfigPropertyMetadata);
3722
+ typeCheckConfig$e(untrustedConfig, config, updateEnvelope_ConfigPropertyMetadata);
2911
3723
  return config;
2912
3724
  }
2913
3725
  function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
@@ -3171,10 +3983,10 @@ const updateVoidedEnvelope_ConfigPropertyMetadata = [
3171
3983
  generateParamConfigMetadata('voidParam', true, 2 /* Body */, 4 /* Unsupported */),
3172
3984
  ];
3173
3985
  const updateVoidedEnvelope_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, updateVoidedEnvelope_ConfigPropertyMetadata);
3174
- const createResourceParams$1 = /*#__PURE__*/ createResourceParams$b(updateVoidedEnvelope_ConfigPropertyMetadata);
3986
+ const createResourceParams$1 = /*#__PURE__*/ createResourceParams$e(updateVoidedEnvelope_ConfigPropertyMetadata);
3175
3987
  function typeCheckConfig$1(untrustedConfig) {
3176
3988
  const config = {};
3177
- typeCheckConfig$b(untrustedConfig, config, updateVoidedEnvelope_ConfigPropertyMetadata);
3989
+ typeCheckConfig$e(untrustedConfig, config, updateVoidedEnvelope_ConfigPropertyMetadata);
3178
3990
  const untrustedConfig_voidParam = untrustedConfig.voidParam;
3179
3991
  const referenceEnvelopeVoidRequestValidationError = validate$2(untrustedConfig_voidParam);
3180
3992
  if (referenceEnvelopeVoidRequestValidationError === null) {
@@ -3365,7 +4177,7 @@ function createResourceRequest(config) {
3365
4177
  const adapterName = 'getSignerRoles';
3366
4178
  const getSignerRoles_ConfigPropertyMetadata = [];
3367
4179
  const getSignerRoles_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getSignerRoles_ConfigPropertyMetadata);
3368
- const createResourceParams = /*#__PURE__*/ createResourceParams$b(getSignerRoles_ConfigPropertyMetadata);
4180
+ const createResourceParams = /*#__PURE__*/ createResourceParams$e(getSignerRoles_ConfigPropertyMetadata);
3369
4181
  function keyBuilder(luvio, config) {
3370
4182
  createResourceParams(config);
3371
4183
  return keyBuilder$1();
@@ -3420,7 +4232,7 @@ function buildNetworkSnapshot(luvio, config, options) {
3420
4232
  });
3421
4233
  }
3422
4234
  function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
3423
- return buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
4235
+ return buildNetworkSnapshotCachePolicy$8(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
3424
4236
  }
3425
4237
  function buildCachedSnapshotCachePolicy(context, storeLookup) {
3426
4238
  const { luvio, config } = context;
@@ -3445,4 +4257,4 @@ const getSignerRolesAdapterFactory = (luvio) => function docgen__getSignerRoles(
3445
4257
  buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
3446
4258
  };
3447
4259
 
3448
- export { createDocumentEnvelopeForEsignAdapterFactory, getDocumentClauseFieldsAdapterFactory, getDocumentClauseSetCategoriesAdapterFactory, getDocumentClauseSetsAdapterFactory, getDocumentsAdapterFactory, getESignNotificationSettingsAdapterFactory, getRecipientsAdapterFactory, getSignerRolesAdapterFactory, performDocGenerationBatchProcessActionAdapterFactory, updateEnvelopeAdapterFactory, updateVoidedEnvelopeAdapterFactory };
4260
+ export { createDocumentEnvelopeForEsignAdapterFactory, createDocumentTemplateAdapterFactory, getDocumentClauseFieldsAdapterFactory, getDocumentClauseSetCategoriesAdapterFactory, getDocumentClauseSetsAdapterFactory, getDocumentTemplatesAdapterFactory, getDocumentsAdapterFactory, getESignNotificationSettingsAdapterFactory, getRecipientsAdapterFactory, getSignerRolesAdapterFactory, performDocGenerationBatchProcessActionAdapterFactory, updateDocumentTemplateAdapterFactory, updateEnvelopeAdapterFactory, updateVoidedEnvelopeAdapterFactory };