@salesforce/lds-adapters-industries-clm 1.164.1 → 1.165.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.
Files changed (24) hide show
  1. package/dist/es/es2018/industries-clm.js +1458 -741
  2. package/dist/es/es2018/types/src/generated/adapters/deleteContractDocumentVersionReview.d.ts +13 -0
  3. package/dist/es/es2018/types/src/generated/adapters/getContractDocumentVersionReview.d.ts +27 -0
  4. package/dist/es/es2018/types/src/generated/adapters/getTemplates.d.ts +2 -2
  5. package/dist/es/es2018/types/src/generated/adapters/patchContractDocumentVersionReview.d.ts +16 -0
  6. package/dist/es/es2018/types/src/generated/adapters/postContractDocumentVersionReview.d.ts +16 -0
  7. package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +5 -1
  8. package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +7 -1
  9. package/dist/es/es2018/types/src/generated/resources/deleteConnectClmContractDocumentVersionReviewByContractDocumentVersionId.d.ts +12 -0
  10. package/dist/es/es2018/types/src/generated/resources/getConnectClmContractDocumentVersionReviewByContractDocumentVersionId.d.ts +16 -0
  11. package/dist/es/es2018/types/src/generated/resources/getConnectClmDocumentTemplate.d.ts +2 -2
  12. package/dist/es/es2018/types/src/generated/resources/patchConnectClmContractDocumentVersionReviewByContractDocumentVersionId.d.ts +16 -0
  13. package/dist/es/es2018/types/src/generated/resources/postConnectClmContractDocumentVersionReviewByContractDocumentVersionId.d.ts +16 -0
  14. package/dist/es/es2018/types/src/generated/types/ContractActionInputRepresentation.d.ts +1 -1
  15. package/dist/es/es2018/types/src/generated/types/ContractDocumentVersionReviewInputRepresentation.d.ts +32 -0
  16. package/dist/es/es2018/types/src/generated/types/ContractDocumentVersionReviewOutputRepresentation.d.ts +44 -0
  17. package/dist/es/es2018/types/src/generated/types/ContractDocumentVersionReviewerInputRepresentation.d.ts +35 -0
  18. package/dist/es/es2018/types/src/generated/types/ContractDocumentVersionReviewerOutputRepresentation.d.ts +38 -0
  19. package/dist/es/es2018/types/src/generated/types/ContractDocumentVersionReviewersListOutputRepresentation.d.ts +42 -0
  20. package/dist/es/es2018/types/src/generated/types/ContractInputRepresentation.d.ts +4 -1
  21. package/package.json +1 -1
  22. package/sfdc/index.js +1557 -783
  23. package/src/raml/api.raml +189 -55
  24. package/src/raml/luvio.raml +38 -0
@@ -72,7 +72,243 @@ function createLink(ref) {
72
72
  };
73
73
  }
74
74
 
75
- function validate$e(obj, path = 'ContractDocumentVersionRepresentation') {
75
+ function validate$h(obj, path = 'ContractActionInputRepresentation') {
76
+ const v_error = (() => {
77
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
78
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
79
+ }
80
+ if (obj.actionApiName !== undefined) {
81
+ const obj_actionApiName = obj.actionApiName;
82
+ const path_actionApiName = path + '.actionApiName';
83
+ if (typeof obj_actionApiName !== 'string') {
84
+ return new TypeError('Expected "string" but received "' + typeof obj_actionApiName + '" (at "' + path_actionApiName + '")');
85
+ }
86
+ }
87
+ if (obj.actionData !== undefined) {
88
+ const obj_actionData = obj.actionData;
89
+ const path_actionData = path + '.actionData';
90
+ if (typeof obj_actionData !== 'object' || ArrayIsArray(obj_actionData) || obj_actionData === null) {
91
+ return new TypeError('Expected "object" but received "' + typeof obj_actionData + '" (at "' + path_actionData + '")');
92
+ }
93
+ const obj_actionData_keys = ObjectKeys(obj_actionData);
94
+ for (let i = 0; i < obj_actionData_keys.length; i++) {
95
+ const key = obj_actionData_keys[i];
96
+ const obj_actionData_prop = obj_actionData[key];
97
+ const path_actionData_prop = path_actionData + '["' + key + '"]';
98
+ if (typeof obj_actionData_prop !== 'string') {
99
+ return new TypeError('Expected "string" but received "' + typeof obj_actionData_prop + '" (at "' + path_actionData_prop + '")');
100
+ }
101
+ }
102
+ }
103
+ if (obj.actionId !== undefined) {
104
+ const obj_actionId = obj.actionId;
105
+ const path_actionId = path + '.actionId';
106
+ if (typeof obj_actionId !== 'string') {
107
+ return new TypeError('Expected "string" but received "' + typeof obj_actionId + '" (at "' + path_actionId + '")');
108
+ }
109
+ }
110
+ })();
111
+ return v_error === undefined ? null : v_error;
112
+ }
113
+
114
+ const TTL$8 = 60000;
115
+ const VERSION$a = "c8652b5c3ad8c532087704340d3cad55";
116
+ function validate$g(obj, path = 'GenericOutputRepresentation') {
117
+ const v_error = (() => {
118
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
119
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
120
+ }
121
+ const obj_id = obj.id;
122
+ const path_id = path + '.id';
123
+ if (typeof obj_id !== 'string') {
124
+ return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
125
+ }
126
+ if (obj.isSuccess !== undefined) {
127
+ const obj_isSuccess = obj.isSuccess;
128
+ const path_isSuccess = path + '.isSuccess';
129
+ if (typeof obj_isSuccess !== 'boolean') {
130
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isSuccess + '" (at "' + path_isSuccess + '")');
131
+ }
132
+ }
133
+ })();
134
+ return v_error === undefined ? null : v_error;
135
+ }
136
+ const RepresentationType$9 = 'GenericOutputRepresentation';
137
+ function keyBuilder$k(luvio, config) {
138
+ return keyPrefix + '::' + RepresentationType$9 + ':' + config.id;
139
+ }
140
+ function keyBuilderFromType$6(luvio, object) {
141
+ const keyParams = {
142
+ id: object.id
143
+ };
144
+ return keyBuilder$k(luvio, keyParams);
145
+ }
146
+ function normalize$9(input, existing, path, luvio, store, timestamp) {
147
+ return input;
148
+ }
149
+ const select$q = function GenericOutputRepresentationSelect() {
150
+ return {
151
+ kind: 'Fragment',
152
+ version: VERSION$a,
153
+ private: [],
154
+ opaque: true
155
+ };
156
+ };
157
+ function equals$a(existing, incoming) {
158
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
159
+ return false;
160
+ }
161
+ return true;
162
+ }
163
+ const ingest$9 = function GenericOutputRepresentationIngest(input, path, luvio, store, timestamp) {
164
+ if (process.env.NODE_ENV !== 'production') {
165
+ const validateError = validate$g(input);
166
+ if (validateError !== null) {
167
+ throw validateError;
168
+ }
169
+ }
170
+ const key = keyBuilderFromType$6(luvio, input);
171
+ const existingRecord = store.readEntry(key);
172
+ const ttlToUse = TTL$8;
173
+ let incomingRecord = normalize$9(input, store.readEntry(key), {
174
+ fullPath: key,
175
+ parent: path.parent,
176
+ propertyName: path.propertyName,
177
+ ttl: ttlToUse
178
+ });
179
+ if (existingRecord === undefined || equals$a(existingRecord, incomingRecord) === false) {
180
+ luvio.storePublish(key, incomingRecord);
181
+ }
182
+ {
183
+ const storeMetadataParams = {
184
+ ttl: ttlToUse,
185
+ namespace: "clm",
186
+ version: VERSION$a,
187
+ representationName: RepresentationType$9,
188
+ };
189
+ luvio.publishStoreMetadata(key, storeMetadataParams);
190
+ }
191
+ return createLink(key);
192
+ };
193
+ function getTypeCacheKeys$9(luvio, input, fullPathFactory) {
194
+ const rootKeySet = new StoreKeyMap();
195
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
196
+ const rootKey = keyBuilderFromType$6(luvio, input);
197
+ rootKeySet.set(rootKey, {
198
+ namespace: keyPrefix,
199
+ representationName: RepresentationType$9,
200
+ mergeable: false
201
+ });
202
+ return rootKeySet;
203
+ }
204
+
205
+ function select$p(luvio, params) {
206
+ return select$q();
207
+ }
208
+ function getResponseCacheKeys$h(luvio, resourceParams, response) {
209
+ return getTypeCacheKeys$9(luvio, response);
210
+ }
211
+ function ingestSuccess$f(luvio, resourceParams, response) {
212
+ const { body } = response;
213
+ const key = keyBuilderFromType$6(luvio, body);
214
+ luvio.storeIngest(key, ingest$9, body);
215
+ const snapshot = luvio.storeLookup({
216
+ recordId: key,
217
+ node: select$p(),
218
+ variables: {},
219
+ });
220
+ if (process.env.NODE_ENV !== 'production') {
221
+ if (snapshot.state !== 'Fulfilled') {
222
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
223
+ }
224
+ }
225
+ deepFreeze(snapshot.data);
226
+ return snapshot;
227
+ }
228
+ function createResourceRequest$h(config) {
229
+ const headers = {};
230
+ return {
231
+ baseUri: '/services/data/v59.0',
232
+ basePath: '/connect/clm/contract/' + config.urlParams.contractId + '',
233
+ method: 'patch',
234
+ body: config.body,
235
+ urlParams: config.urlParams,
236
+ queryParams: {},
237
+ headers,
238
+ priority: 'normal',
239
+ };
240
+ }
241
+
242
+ const executeContractAction_ConfigPropertyNames = {
243
+ displayName: 'executeContractAction',
244
+ parameters: {
245
+ required: ['contractId', 'actionInput'],
246
+ optional: []
247
+ }
248
+ };
249
+ function createResourceParams$h(config) {
250
+ const resourceParams = {
251
+ urlParams: {
252
+ contractId: config.contractId
253
+ },
254
+ body: {
255
+ actionInput: config.actionInput
256
+ }
257
+ };
258
+ return resourceParams;
259
+ }
260
+ function typeCheckConfig$h(untrustedConfig) {
261
+ const config = {};
262
+ const untrustedConfig_contractId = untrustedConfig.contractId;
263
+ if (typeof untrustedConfig_contractId === 'string') {
264
+ config.contractId = untrustedConfig_contractId;
265
+ }
266
+ const untrustedConfig_actionInput = untrustedConfig.actionInput;
267
+ const referenceContractActionInputRepresentationValidationError = validate$h(untrustedConfig_actionInput);
268
+ if (referenceContractActionInputRepresentationValidationError === null) {
269
+ config.actionInput = untrustedConfig_actionInput;
270
+ }
271
+ return config;
272
+ }
273
+ function validateAdapterConfig$h(untrustedConfig, configPropertyNames) {
274
+ if (!untrustedIsObject(untrustedConfig)) {
275
+ return null;
276
+ }
277
+ if (process.env.NODE_ENV !== 'production') {
278
+ validateConfig(untrustedConfig, configPropertyNames);
279
+ }
280
+ const config = typeCheckConfig$h(untrustedConfig);
281
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
282
+ return null;
283
+ }
284
+ return config;
285
+ }
286
+ function buildNetworkSnapshot$h(luvio, config, options) {
287
+ const resourceParams = createResourceParams$h(config);
288
+ const request = createResourceRequest$h(resourceParams);
289
+ return luvio.dispatchResourceRequest(request, options)
290
+ .then((response) => {
291
+ return luvio.handleSuccessResponse(() => {
292
+ const snapshot = ingestSuccess$f(luvio, resourceParams, response);
293
+ return luvio.storeBroadcast().then(() => snapshot);
294
+ }, () => getResponseCacheKeys$h(luvio, resourceParams, response.body));
295
+ }, (response) => {
296
+ deepFreeze(response);
297
+ throw response;
298
+ });
299
+ }
300
+ const executeContractActionAdapterFactory = (luvio) => {
301
+ return function executeContractAction(untrustedConfig) {
302
+ const config = validateAdapterConfig$h(untrustedConfig, executeContractAction_ConfigPropertyNames);
303
+ // Invalid or incomplete config
304
+ if (config === null) {
305
+ throw new Error('Invalid config for "executeContractAction"');
306
+ }
307
+ return buildNetworkSnapshot$h(luvio, config);
308
+ };
309
+ };
310
+
311
+ function validate$f(obj, path = 'ContractDocumentVersionRepresentation') {
76
312
  const v_error = (() => {
77
313
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
78
314
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -156,9 +392,9 @@ function validate$e(obj, path = 'ContractDocumentVersionRepresentation') {
156
392
  return v_error === undefined ? null : v_error;
157
393
  }
158
394
 
159
- const TTL$6 = 60000;
160
- const VERSION$8 = "a824de2ee1cbb2f1e15ea8114da78d95";
161
- function validate$d(obj, path = 'ContractDocumentVersionsListRepresentation') {
395
+ const TTL$7 = 60000;
396
+ const VERSION$9 = "a824de2ee1cbb2f1e15ea8114da78d95";
397
+ function validate$e(obj, path = 'ContractDocumentVersionsListRepresentation') {
162
398
  const v_error = (() => {
163
399
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
164
400
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -177,7 +413,7 @@ function validate$d(obj, path = 'ContractDocumentVersionsListRepresentation') {
177
413
  for (let i = 0; i < obj_data.length; i++) {
178
414
  const obj_data_item = obj_data[i];
179
415
  const path_data_item = path_data + '[' + i + ']';
180
- const referencepath_data_itemValidationError = validate$e(obj_data_item, path_data_item);
416
+ const referencepath_data_itemValidationError = validate$f(obj_data_item, path_data_item);
181
417
  if (referencepath_data_itemValidationError !== null) {
182
418
  let message = 'Object doesn\'t match ContractDocumentVersionRepresentation (at "' + path_data_item + '")\n';
183
419
  message += referencepath_data_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -188,82 +424,82 @@ function validate$d(obj, path = 'ContractDocumentVersionsListRepresentation') {
188
424
  })();
189
425
  return v_error === undefined ? null : v_error;
190
426
  }
191
- const RepresentationType$7 = 'ContractDocumentVersionsListRepresentation';
192
- function normalize$7(input, existing, path, luvio, store, timestamp) {
427
+ const RepresentationType$8 = 'ContractDocumentVersionsListRepresentation';
428
+ function normalize$8(input, existing, path, luvio, store, timestamp) {
193
429
  return input;
194
430
  }
195
- const select$l = function ContractDocumentVersionsListRepresentationSelect() {
431
+ const select$o = function ContractDocumentVersionsListRepresentationSelect() {
196
432
  return {
197
433
  kind: 'Fragment',
198
- version: VERSION$8,
434
+ version: VERSION$9,
199
435
  private: [],
200
436
  opaque: true
201
437
  };
202
438
  };
203
- function equals$8(existing, incoming) {
439
+ function equals$9(existing, incoming) {
204
440
  if (JSONStringify(incoming) !== JSONStringify(existing)) {
205
441
  return false;
206
442
  }
207
443
  return true;
208
444
  }
209
- const ingest$7 = function ContractDocumentVersionsListRepresentationIngest(input, path, luvio, store, timestamp) {
445
+ const ingest$8 = function ContractDocumentVersionsListRepresentationIngest(input, path, luvio, store, timestamp) {
210
446
  if (process.env.NODE_ENV !== 'production') {
211
- const validateError = validate$d(input);
447
+ const validateError = validate$e(input);
212
448
  if (validateError !== null) {
213
449
  throw validateError;
214
450
  }
215
451
  }
216
452
  const key = path.fullPath;
217
453
  const existingRecord = store.readEntry(key);
218
- const ttlToUse = TTL$6;
219
- let incomingRecord = normalize$7(input, store.readEntry(key), {
454
+ const ttlToUse = TTL$7;
455
+ let incomingRecord = normalize$8(input, store.readEntry(key), {
220
456
  fullPath: key,
221
457
  parent: path.parent,
222
458
  propertyName: path.propertyName,
223
459
  ttl: ttlToUse
224
460
  });
225
- if (existingRecord === undefined || equals$8(existingRecord, incomingRecord) === false) {
461
+ if (existingRecord === undefined || equals$9(existingRecord, incomingRecord) === false) {
226
462
  luvio.storePublish(key, incomingRecord);
227
463
  }
228
464
  {
229
465
  const storeMetadataParams = {
230
466
  ttl: ttlToUse,
231
467
  namespace: "clm",
232
- version: VERSION$8,
233
- representationName: RepresentationType$7,
468
+ version: VERSION$9,
469
+ representationName: RepresentationType$8,
234
470
  };
235
471
  luvio.publishStoreMetadata(key, storeMetadataParams);
236
472
  }
237
473
  return createLink(key);
238
474
  };
239
- function getTypeCacheKeys$7(luvio, input, fullPathFactory) {
475
+ function getTypeCacheKeys$8(luvio, input, fullPathFactory) {
240
476
  const rootKeySet = new StoreKeyMap();
241
477
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
242
478
  const rootKey = fullPathFactory();
243
479
  rootKeySet.set(rootKey, {
244
480
  namespace: keyPrefix,
245
- representationName: RepresentationType$7,
481
+ representationName: RepresentationType$8,
246
482
  mergeable: false
247
483
  });
248
484
  return rootKeySet;
249
485
  }
250
486
 
251
- function select$k(luvio, params) {
252
- return select$l();
487
+ function select$n(luvio, params) {
488
+ return select$o();
253
489
  }
254
- function keyBuilder$f(luvio, params) {
490
+ function keyBuilder$j(luvio, params) {
255
491
  return keyPrefix + '::ContractDocumentVersionsListRepresentation:(' + 'contractDocumentVersionId:' + params.queryParams.contractDocumentVersionId + ',' + 'contractId:' + params.urlParams.contractId + ')';
256
492
  }
257
- function getResponseCacheKeys$d(luvio, resourceParams, response) {
258
- return getTypeCacheKeys$7(luvio, response, () => keyBuilder$f(luvio, resourceParams));
493
+ function getResponseCacheKeys$g(luvio, resourceParams, response) {
494
+ return getTypeCacheKeys$8(luvio, response, () => keyBuilder$j(luvio, resourceParams));
259
495
  }
260
- function ingestSuccess$c(luvio, resourceParams, response, snapshotRefresh) {
496
+ function ingestSuccess$e(luvio, resourceParams, response, snapshotRefresh) {
261
497
  const { body } = response;
262
- const key = keyBuilder$f(luvio, resourceParams);
263
- luvio.storeIngest(key, ingest$7, body);
498
+ const key = keyBuilder$j(luvio, resourceParams);
499
+ luvio.storeIngest(key, ingest$8, body);
264
500
  const snapshot = luvio.storeLookup({
265
501
  recordId: key,
266
- node: select$k(),
502
+ node: select$n(),
267
503
  variables: {},
268
504
  }, snapshotRefresh);
269
505
  if (process.env.NODE_ENV !== 'production') {
@@ -274,19 +510,19 @@ function ingestSuccess$c(luvio, resourceParams, response, snapshotRefresh) {
274
510
  deepFreeze(snapshot.data);
275
511
  return snapshot;
276
512
  }
277
- function ingestError$4(luvio, params, error, snapshotRefresh) {
278
- const key = keyBuilder$f(luvio, params);
513
+ function ingestError$5(luvio, params, error, snapshotRefresh) {
514
+ const key = keyBuilder$j(luvio, params);
279
515
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
280
516
  const storeMetadataParams = {
281
- ttl: TTL$6,
517
+ ttl: TTL$7,
282
518
  namespace: keyPrefix,
283
- version: VERSION$8,
284
- representationName: RepresentationType$7
519
+ version: VERSION$9,
520
+ representationName: RepresentationType$8
285
521
  };
286
522
  luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
287
523
  return errorSnapshot;
288
524
  }
289
- function createResourceRequest$d(config) {
525
+ function createResourceRequest$g(config) {
290
526
  const headers = {};
291
527
  return {
292
528
  baseUri: '/services/data/v59.0',
@@ -307,7 +543,7 @@ const getContractDocumentVersion_ConfigPropertyNames = {
307
543
  optional: ['contractDocumentVersionId']
308
544
  }
309
545
  };
310
- function createResourceParams$d(config) {
546
+ function createResourceParams$g(config) {
311
547
  const resourceParams = {
312
548
  urlParams: {
313
549
  contractId: config.contractId
@@ -318,11 +554,11 @@ function createResourceParams$d(config) {
318
554
  };
319
555
  return resourceParams;
320
556
  }
321
- function keyBuilder$e(luvio, config) {
322
- const resourceParams = createResourceParams$d(config);
323
- return keyBuilder$f(luvio, resourceParams);
557
+ function keyBuilder$i(luvio, config) {
558
+ const resourceParams = createResourceParams$g(config);
559
+ return keyBuilder$j(luvio, resourceParams);
324
560
  }
325
- function typeCheckConfig$d(untrustedConfig) {
561
+ function typeCheckConfig$g(untrustedConfig) {
326
562
  const config = {};
327
563
  const untrustedConfig_contractId = untrustedConfig.contractId;
328
564
  if (typeof untrustedConfig_contractId === 'string') {
@@ -334,48 +570,48 @@ function typeCheckConfig$d(untrustedConfig) {
334
570
  }
335
571
  return config;
336
572
  }
337
- function validateAdapterConfig$d(untrustedConfig, configPropertyNames) {
573
+ function validateAdapterConfig$g(untrustedConfig, configPropertyNames) {
338
574
  if (!untrustedIsObject(untrustedConfig)) {
339
575
  return null;
340
576
  }
341
577
  if (process.env.NODE_ENV !== 'production') {
342
578
  validateConfig(untrustedConfig, configPropertyNames);
343
579
  }
344
- const config = typeCheckConfig$d(untrustedConfig);
580
+ const config = typeCheckConfig$g(untrustedConfig);
345
581
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
346
582
  return null;
347
583
  }
348
584
  return config;
349
585
  }
350
- function adapterFragment$4(luvio, config) {
351
- createResourceParams$d(config);
352
- return select$k();
586
+ function adapterFragment$5(luvio, config) {
587
+ createResourceParams$g(config);
588
+ return select$n();
353
589
  }
354
- function onFetchResponseSuccess$4(luvio, config, resourceParams, response) {
355
- const snapshot = ingestSuccess$c(luvio, resourceParams, response, {
590
+ function onFetchResponseSuccess$5(luvio, config, resourceParams, response) {
591
+ const snapshot = ingestSuccess$e(luvio, resourceParams, response, {
356
592
  config,
357
- resolve: () => buildNetworkSnapshot$d(luvio, config, snapshotRefreshOptions)
593
+ resolve: () => buildNetworkSnapshot$g(luvio, config, snapshotRefreshOptions)
358
594
  });
359
595
  return luvio.storeBroadcast().then(() => snapshot);
360
596
  }
361
- function onFetchResponseError$4(luvio, config, resourceParams, response) {
362
- const snapshot = ingestError$4(luvio, resourceParams, response, {
597
+ function onFetchResponseError$5(luvio, config, resourceParams, response) {
598
+ const snapshot = ingestError$5(luvio, resourceParams, response, {
363
599
  config,
364
- resolve: () => buildNetworkSnapshot$d(luvio, config, snapshotRefreshOptions)
600
+ resolve: () => buildNetworkSnapshot$g(luvio, config, snapshotRefreshOptions)
365
601
  });
366
602
  return luvio.storeBroadcast().then(() => snapshot);
367
603
  }
368
- function buildNetworkSnapshot$d(luvio, config, options) {
369
- const resourceParams = createResourceParams$d(config);
370
- const request = createResourceRequest$d(resourceParams);
604
+ function buildNetworkSnapshot$g(luvio, config, options) {
605
+ const resourceParams = createResourceParams$g(config);
606
+ const request = createResourceRequest$g(resourceParams);
371
607
  return luvio.dispatchResourceRequest(request, options)
372
608
  .then((response) => {
373
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$4(luvio, config, resourceParams, response), () => getResponseCacheKeys$d(luvio, resourceParams, response.body));
609
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$5(luvio, config, resourceParams, response), () => getResponseCacheKeys$g(luvio, resourceParams, response.body));
374
610
  }, (response) => {
375
- return luvio.handleErrorResponse(() => onFetchResponseError$4(luvio, config, resourceParams, response));
611
+ return luvio.handleErrorResponse(() => onFetchResponseError$5(luvio, config, resourceParams, response));
376
612
  });
377
613
  }
378
- function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
614
+ function buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext) {
379
615
  const { luvio, config } = context;
380
616
  const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
381
617
  const dispatchOptions = {
@@ -390,32 +626,32 @@ function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext
390
626
  priority: networkPriority
391
627
  };
392
628
  }
393
- return buildNetworkSnapshot$d(luvio, config, dispatchOptions);
629
+ return buildNetworkSnapshot$g(luvio, config, dispatchOptions);
394
630
  }
395
- function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
631
+ function buildCachedSnapshotCachePolicy$5(context, storeLookup) {
396
632
  const { luvio, config } = context;
397
633
  const selector = {
398
- recordId: keyBuilder$e(luvio, config),
399
- node: adapterFragment$4(luvio, config),
634
+ recordId: keyBuilder$i(luvio, config),
635
+ node: adapterFragment$5(luvio, config),
400
636
  variables: {},
401
637
  };
402
638
  const cacheSnapshot = storeLookup(selector, {
403
639
  config,
404
- resolve: () => buildNetworkSnapshot$d(luvio, config, snapshotRefreshOptions)
640
+ resolve: () => buildNetworkSnapshot$g(luvio, config, snapshotRefreshOptions)
405
641
  });
406
642
  return cacheSnapshot;
407
643
  }
408
644
  const getContractDocumentVersionAdapterFactory = (luvio) => function clm__getContractDocumentVersion(untrustedConfig, requestContext) {
409
- const config = validateAdapterConfig$d(untrustedConfig, getContractDocumentVersion_ConfigPropertyNames);
645
+ const config = validateAdapterConfig$g(untrustedConfig, getContractDocumentVersion_ConfigPropertyNames);
410
646
  // Invalid or incomplete config
411
647
  if (config === null) {
412
648
  return null;
413
649
  }
414
650
  return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
415
- buildCachedSnapshotCachePolicy$4, buildNetworkSnapshotCachePolicy$4);
651
+ buildCachedSnapshotCachePolicy$5, buildNetworkSnapshotCachePolicy$5);
416
652
  };
417
653
 
418
- function validate$c(obj, path = 'TemplateInputRepresentation') {
654
+ function validate$d(obj, path = 'TemplateInputRepresentation') {
419
655
  const v_error = (() => {
420
656
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
421
657
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -443,8 +679,8 @@ function validate$c(obj, path = 'TemplateInputRepresentation') {
443
679
  return v_error === undefined ? null : v_error;
444
680
  }
445
681
 
446
- const VERSION$7 = "f874339705636326163a82467da64b36";
447
- function validate$b(obj, path = 'ContentDocumentRepresentation') {
682
+ const VERSION$8 = "f874339705636326163a82467da64b36";
683
+ function validate$c(obj, path = 'ContentDocumentRepresentation') {
448
684
  const v_error = (() => {
449
685
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
450
686
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -491,10 +727,10 @@ function validate$b(obj, path = 'ContentDocumentRepresentation') {
491
727
  })();
492
728
  return v_error === undefined ? null : v_error;
493
729
  }
494
- const select$j = function ContentDocumentRepresentationSelect() {
730
+ const select$m = function ContentDocumentRepresentationSelect() {
495
731
  return {
496
732
  kind: 'Fragment',
497
- version: VERSION$7,
733
+ version: VERSION$8,
498
734
  private: [],
499
735
  selections: [
500
736
  {
@@ -530,7 +766,7 @@ const select$j = function ContentDocumentRepresentationSelect() {
530
766
  ]
531
767
  };
532
768
  };
533
- function equals$7(existing, incoming) {
769
+ function equals$8(existing, incoming) {
534
770
  const existing_contentDocumentId = existing.contentDocumentId;
535
771
  const incoming_contentDocumentId = incoming.contentDocumentId;
536
772
  if (!(existing_contentDocumentId === incoming_contentDocumentId)) {
@@ -585,9 +821,9 @@ function equals$7(existing, incoming) {
585
821
  return true;
586
822
  }
587
823
 
588
- const TTL$5 = 60000;
589
- const VERSION$6 = "520b4f1213b0e08b197d18564d0a2432";
590
- function validate$a(obj, path = 'DocumentGenerateRepresentation') {
824
+ const TTL$6 = 60000;
825
+ const VERSION$7 = "520b4f1213b0e08b197d18564d0a2432";
826
+ function validate$b(obj, path = 'DocumentGenerateRepresentation') {
591
827
  const v_error = (() => {
592
828
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
593
829
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -601,7 +837,7 @@ function validate$a(obj, path = 'DocumentGenerateRepresentation') {
601
837
  for (let i = 0; i < obj_contentDocuments.length; i++) {
602
838
  const obj_contentDocuments_item = obj_contentDocuments[i];
603
839
  const path_contentDocuments_item = path_contentDocuments + '[' + i + ']';
604
- const referencepath_contentDocuments_itemValidationError = validate$b(obj_contentDocuments_item, path_contentDocuments_item);
840
+ const referencepath_contentDocuments_itemValidationError = validate$c(obj_contentDocuments_item, path_contentDocuments_item);
605
841
  if (referencepath_contentDocuments_itemValidationError !== null) {
606
842
  let message = 'Object doesn\'t match ContentDocumentRepresentation (at "' + path_contentDocuments_item + '")\n';
607
843
  message += referencepath_contentDocuments_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -629,88 +865,88 @@ function validate$a(obj, path = 'DocumentGenerateRepresentation') {
629
865
  })();
630
866
  return v_error === undefined ? null : v_error;
631
867
  }
632
- const RepresentationType$6 = 'DocumentGenerateRepresentation';
633
- function keyBuilder$d(luvio, config) {
634
- return keyPrefix + '::' + RepresentationType$6 + ':' + config.contractId;
868
+ const RepresentationType$7 = 'DocumentGenerateRepresentation';
869
+ function keyBuilder$h(luvio, config) {
870
+ return keyPrefix + '::' + RepresentationType$7 + ':' + config.contractId;
635
871
  }
636
- function keyBuilderFromType$4(luvio, object) {
872
+ function keyBuilderFromType$5(luvio, object) {
637
873
  const keyParams = {
638
874
  contractId: object.contractId
639
875
  };
640
- return keyBuilder$d(luvio, keyParams);
876
+ return keyBuilder$h(luvio, keyParams);
641
877
  }
642
- function normalize$6(input, existing, path, luvio, store, timestamp) {
878
+ function normalize$7(input, existing, path, luvio, store, timestamp) {
643
879
  return input;
644
880
  }
645
- const select$i = function DocumentGenerateRepresentationSelect() {
881
+ const select$l = function DocumentGenerateRepresentationSelect() {
646
882
  return {
647
883
  kind: 'Fragment',
648
- version: VERSION$6,
884
+ version: VERSION$7,
649
885
  private: [],
650
886
  opaque: true
651
887
  };
652
888
  };
653
- function equals$6(existing, incoming) {
889
+ function equals$7(existing, incoming) {
654
890
  if (JSONStringify(incoming) !== JSONStringify(existing)) {
655
891
  return false;
656
892
  }
657
893
  return true;
658
894
  }
659
- const ingest$6 = function DocumentGenerateRepresentationIngest(input, path, luvio, store, timestamp) {
895
+ const ingest$7 = function DocumentGenerateRepresentationIngest(input, path, luvio, store, timestamp) {
660
896
  if (process.env.NODE_ENV !== 'production') {
661
- const validateError = validate$a(input);
897
+ const validateError = validate$b(input);
662
898
  if (validateError !== null) {
663
899
  throw validateError;
664
900
  }
665
901
  }
666
- const key = keyBuilderFromType$4(luvio, input);
902
+ const key = keyBuilderFromType$5(luvio, input);
667
903
  const existingRecord = store.readEntry(key);
668
- const ttlToUse = TTL$5;
669
- let incomingRecord = normalize$6(input, store.readEntry(key), {
904
+ const ttlToUse = TTL$6;
905
+ let incomingRecord = normalize$7(input, store.readEntry(key), {
670
906
  fullPath: key,
671
907
  parent: path.parent,
672
908
  propertyName: path.propertyName,
673
909
  ttl: ttlToUse
674
910
  });
675
- if (existingRecord === undefined || equals$6(existingRecord, incomingRecord) === false) {
911
+ if (existingRecord === undefined || equals$7(existingRecord, incomingRecord) === false) {
676
912
  luvio.storePublish(key, incomingRecord);
677
913
  }
678
914
  {
679
915
  const storeMetadataParams = {
680
916
  ttl: ttlToUse,
681
917
  namespace: "clm",
682
- version: VERSION$6,
683
- representationName: RepresentationType$6,
918
+ version: VERSION$7,
919
+ representationName: RepresentationType$7,
684
920
  };
685
921
  luvio.publishStoreMetadata(key, storeMetadataParams);
686
922
  }
687
923
  return createLink(key);
688
924
  };
689
- function getTypeCacheKeys$6(luvio, input, fullPathFactory) {
925
+ function getTypeCacheKeys$7(luvio, input, fullPathFactory) {
690
926
  const rootKeySet = new StoreKeyMap();
691
927
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
692
- const rootKey = keyBuilderFromType$4(luvio, input);
928
+ const rootKey = keyBuilderFromType$5(luvio, input);
693
929
  rootKeySet.set(rootKey, {
694
930
  namespace: keyPrefix,
695
- representationName: RepresentationType$6,
931
+ representationName: RepresentationType$7,
696
932
  mergeable: false
697
933
  });
698
934
  return rootKeySet;
699
935
  }
700
936
 
701
- function select$h(luvio, params) {
702
- return select$i();
937
+ function select$k(luvio, params) {
938
+ return select$l();
703
939
  }
704
- function getResponseCacheKeys$c(luvio, resourceParams, response) {
705
- return getTypeCacheKeys$6(luvio, response);
940
+ function getResponseCacheKeys$f(luvio, resourceParams, response) {
941
+ return getTypeCacheKeys$7(luvio, response);
706
942
  }
707
- function ingestSuccess$b(luvio, resourceParams, response) {
943
+ function ingestSuccess$d(luvio, resourceParams, response) {
708
944
  const { body } = response;
709
- const key = keyBuilderFromType$4(luvio, body);
710
- luvio.storeIngest(key, ingest$6, body);
945
+ const key = keyBuilderFromType$5(luvio, body);
946
+ luvio.storeIngest(key, ingest$7, body);
711
947
  const snapshot = luvio.storeLookup({
712
948
  recordId: key,
713
- node: select$h(),
949
+ node: select$k(),
714
950
  variables: {},
715
951
  });
716
952
  if (process.env.NODE_ENV !== 'production') {
@@ -721,7 +957,7 @@ function ingestSuccess$b(luvio, resourceParams, response) {
721
957
  deepFreeze(snapshot.data);
722
958
  return snapshot;
723
959
  }
724
- function createResourceRequest$c(config) {
960
+ function createResourceRequest$f(config) {
725
961
  const headers = {};
726
962
  return {
727
963
  baseUri: '/services/data/v59.0',
@@ -742,7 +978,7 @@ const createContractDocumentVersionAndInitializeGenerateDocumentProcess_ConfigPr
742
978
  optional: []
743
979
  }
744
980
  };
745
- function createResourceParams$c(config) {
981
+ function createResourceParams$f(config) {
746
982
  const resourceParams = {
747
983
  urlParams: {
748
984
  contractId: config.contractId
@@ -753,41 +989,41 @@ function createResourceParams$c(config) {
753
989
  };
754
990
  return resourceParams;
755
991
  }
756
- function typeCheckConfig$c(untrustedConfig) {
992
+ function typeCheckConfig$f(untrustedConfig) {
757
993
  const config = {};
758
994
  const untrustedConfig_contractId = untrustedConfig.contractId;
759
995
  if (typeof untrustedConfig_contractId === 'string') {
760
996
  config.contractId = untrustedConfig_contractId;
761
997
  }
762
998
  const untrustedConfig_templateInput = untrustedConfig.templateInput;
763
- const referenceTemplateInputRepresentationValidationError = validate$c(untrustedConfig_templateInput);
999
+ const referenceTemplateInputRepresentationValidationError = validate$d(untrustedConfig_templateInput);
764
1000
  if (referenceTemplateInputRepresentationValidationError === null) {
765
1001
  config.templateInput = untrustedConfig_templateInput;
766
1002
  }
767
1003
  return config;
768
1004
  }
769
- function validateAdapterConfig$c(untrustedConfig, configPropertyNames) {
1005
+ function validateAdapterConfig$f(untrustedConfig, configPropertyNames) {
770
1006
  if (!untrustedIsObject(untrustedConfig)) {
771
1007
  return null;
772
1008
  }
773
1009
  if (process.env.NODE_ENV !== 'production') {
774
1010
  validateConfig(untrustedConfig, configPropertyNames);
775
1011
  }
776
- const config = typeCheckConfig$c(untrustedConfig);
1012
+ const config = typeCheckConfig$f(untrustedConfig);
777
1013
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
778
1014
  return null;
779
1015
  }
780
1016
  return config;
781
1017
  }
782
- function buildNetworkSnapshot$c(luvio, config, options) {
783
- const resourceParams = createResourceParams$c(config);
784
- const request = createResourceRequest$c(resourceParams);
1018
+ function buildNetworkSnapshot$f(luvio, config, options) {
1019
+ const resourceParams = createResourceParams$f(config);
1020
+ const request = createResourceRequest$f(resourceParams);
785
1021
  return luvio.dispatchResourceRequest(request, options)
786
1022
  .then((response) => {
787
1023
  return luvio.handleSuccessResponse(() => {
788
- const snapshot = ingestSuccess$b(luvio, resourceParams, response);
1024
+ const snapshot = ingestSuccess$d(luvio, resourceParams, response);
789
1025
  return luvio.storeBroadcast().then(() => snapshot);
790
- }, () => getResponseCacheKeys$c(luvio, resourceParams, response.body));
1026
+ }, () => getResponseCacheKeys$f(luvio, resourceParams, response.body));
791
1027
  }, (response) => {
792
1028
  deepFreeze(response);
793
1029
  throw response;
@@ -795,160 +1031,193 @@ function buildNetworkSnapshot$c(luvio, config, options) {
795
1031
  }
796
1032
  const createContractDocumentVersionAndInitializeGenerateDocumentProcessAdapterFactory = (luvio) => {
797
1033
  return function createContractDocumentVersionAndInitializeGenerateDocumentProcess(untrustedConfig) {
798
- const config = validateAdapterConfig$c(untrustedConfig, createContractDocumentVersionAndInitializeGenerateDocumentProcess_ConfigPropertyNames);
1034
+ const config = validateAdapterConfig$f(untrustedConfig, createContractDocumentVersionAndInitializeGenerateDocumentProcess_ConfigPropertyNames);
799
1035
  // Invalid or incomplete config
800
1036
  if (config === null) {
801
1037
  throw new Error('Invalid config for "createContractDocumentVersionAndInitializeGenerateDocumentProcess"');
802
1038
  }
803
- return buildNetworkSnapshot$c(luvio, config);
1039
+ return buildNetworkSnapshot$f(luvio, config);
804
1040
  };
805
1041
  };
806
1042
 
807
- function validate$9(obj, path = 'ContractActionInputRepresentation') {
1043
+ function validate$a(obj, path = 'ContractActionRepresentation') {
808
1044
  const v_error = (() => {
809
1045
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
810
1046
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
811
1047
  }
812
- if (obj.actionApiName !== undefined) {
813
- const obj_actionApiName = obj.actionApiName;
814
- const path_actionApiName = path + '.actionApiName';
815
- if (typeof obj_actionApiName !== 'string') {
816
- return new TypeError('Expected "string" but received "' + typeof obj_actionApiName + '" (at "' + path_actionApiName + '")');
1048
+ const obj_actionId = obj.actionId;
1049
+ const path_actionId = path + '.actionId';
1050
+ if (typeof obj_actionId !== 'string') {
1051
+ return new TypeError('Expected "string" but received "' + typeof obj_actionId + '" (at "' + path_actionId + '")');
1052
+ }
1053
+ if (obj.actionType !== undefined) {
1054
+ const obj_actionType = obj.actionType;
1055
+ const path_actionType = path + '.actionType';
1056
+ if (typeof obj_actionType !== 'string') {
1057
+ return new TypeError('Expected "string" but received "' + typeof obj_actionType + '" (at "' + path_actionType + '")');
817
1058
  }
818
1059
  }
819
- if (obj.actionData !== undefined) {
820
- const obj_actionData = obj.actionData;
821
- const path_actionData = path + '.actionData';
822
- if (typeof obj_actionData !== 'object' || ArrayIsArray(obj_actionData) || obj_actionData === null) {
823
- return new TypeError('Expected "object" but received "' + typeof obj_actionData + '" (at "' + path_actionData + '")');
1060
+ const obj_apiName = obj.apiName;
1061
+ const path_apiName = path + '.apiName';
1062
+ if (typeof obj_apiName !== 'string') {
1063
+ return new TypeError('Expected "string" but received "' + typeof obj_apiName + '" (at "' + path_apiName + '")');
1064
+ }
1065
+ if (obj.invocableClassName !== undefined) {
1066
+ const obj_invocableClassName = obj.invocableClassName;
1067
+ const path_invocableClassName = path + '.invocableClassName';
1068
+ if (typeof obj_invocableClassName !== 'string') {
1069
+ return new TypeError('Expected "string" but received "' + typeof obj_invocableClassName + '" (at "' + path_invocableClassName + '")');
824
1070
  }
825
- const obj_actionData_keys = ObjectKeys(obj_actionData);
826
- for (let i = 0; i < obj_actionData_keys.length; i++) {
827
- const key = obj_actionData_keys[i];
828
- const obj_actionData_prop = obj_actionData[key];
829
- const path_actionData_prop = path_actionData + '["' + key + '"]';
830
- if (typeof obj_actionData_prop !== 'string') {
831
- return new TypeError('Expected "string" but received "' + typeof obj_actionData_prop + '" (at "' + path_actionData_prop + '")');
832
- }
1071
+ }
1072
+ if (obj.invocableMethodName !== undefined) {
1073
+ const obj_invocableMethodName = obj.invocableMethodName;
1074
+ const path_invocableMethodName = path + '.invocableMethodName';
1075
+ if (typeof obj_invocableMethodName !== 'string') {
1076
+ return new TypeError('Expected "string" but received "' + typeof obj_invocableMethodName + '" (at "' + path_invocableMethodName + '")');
833
1077
  }
834
1078
  }
835
- if (obj.actionId !== undefined) {
836
- const obj_actionId = obj.actionId;
837
- const path_actionId = path + '.actionId';
838
- if (typeof obj_actionId !== 'string') {
839
- return new TypeError('Expected "string" but received "' + typeof obj_actionId + '" (at "' + path_actionId + '")');
1079
+ if (obj.referenceObject !== undefined) {
1080
+ const obj_referenceObject = obj.referenceObject;
1081
+ const path_referenceObject = path + '.referenceObject';
1082
+ if (typeof obj_referenceObject !== 'string') {
1083
+ return new TypeError('Expected "string" but received "' + typeof obj_referenceObject + '" (at "' + path_referenceObject + '")');
1084
+ }
1085
+ }
1086
+ if (obj.referenceObjectId !== undefined) {
1087
+ const obj_referenceObjectId = obj.referenceObjectId;
1088
+ const path_referenceObjectId = path + '.referenceObjectId';
1089
+ if (typeof obj_referenceObjectId !== 'string') {
1090
+ return new TypeError('Expected "string" but received "' + typeof obj_referenceObjectId + '" (at "' + path_referenceObjectId + '")');
840
1091
  }
841
1092
  }
1093
+ const obj_uiText = obj.uiText;
1094
+ const path_uiText = path + '.uiText';
1095
+ if (typeof obj_uiText !== 'string') {
1096
+ return new TypeError('Expected "string" but received "' + typeof obj_uiText + '" (at "' + path_uiText + '")');
1097
+ }
842
1098
  })();
843
1099
  return v_error === undefined ? null : v_error;
844
1100
  }
845
1101
 
846
- const TTL$4 = 60000;
847
- const VERSION$5 = "c8652b5c3ad8c532087704340d3cad55";
848
- function validate$8(obj, path = 'GenericOutputRepresentation') {
1102
+ const TTL$5 = 60000;
1103
+ const VERSION$6 = "2caf5349dc6c6aa44ef471df00f65bbd";
1104
+ function validate$9(obj, path = 'ContractActionListRepresentation') {
849
1105
  const v_error = (() => {
850
1106
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
851
1107
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
852
1108
  }
853
- const obj_id = obj.id;
854
- const path_id = path + '.id';
855
- if (typeof obj_id !== 'string') {
856
- return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
1109
+ const obj_actions = obj.actions;
1110
+ const path_actions = path + '.actions';
1111
+ if (!ArrayIsArray(obj_actions)) {
1112
+ return new TypeError('Expected "array" but received "' + typeof obj_actions + '" (at "' + path_actions + '")');
857
1113
  }
858
- if (obj.isSuccess !== undefined) {
859
- const obj_isSuccess = obj.isSuccess;
860
- const path_isSuccess = path + '.isSuccess';
861
- if (typeof obj_isSuccess !== 'boolean') {
862
- return new TypeError('Expected "boolean" but received "' + typeof obj_isSuccess + '" (at "' + path_isSuccess + '")');
1114
+ for (let i = 0; i < obj_actions.length; i++) {
1115
+ const obj_actions_item = obj_actions[i];
1116
+ const path_actions_item = path_actions + '[' + i + ']';
1117
+ const referencepath_actions_itemValidationError = validate$a(obj_actions_item, path_actions_item);
1118
+ if (referencepath_actions_itemValidationError !== null) {
1119
+ let message = 'Object doesn\'t match ContractActionRepresentation (at "' + path_actions_item + '")\n';
1120
+ message += referencepath_actions_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1121
+ return new TypeError(message);
863
1122
  }
864
1123
  }
1124
+ const obj_contractId = obj.contractId;
1125
+ const path_contractId = path + '.contractId';
1126
+ if (typeof obj_contractId !== 'string') {
1127
+ return new TypeError('Expected "string" but received "' + typeof obj_contractId + '" (at "' + path_contractId + '")');
1128
+ }
865
1129
  })();
866
1130
  return v_error === undefined ? null : v_error;
867
1131
  }
868
- const RepresentationType$5 = 'GenericOutputRepresentation';
869
- function keyBuilder$c(luvio, config) {
870
- return keyPrefix + '::' + RepresentationType$5 + ':' + config.id;
1132
+ const RepresentationType$6 = 'ContractActionListRepresentation';
1133
+ function keyBuilder$g(luvio, config) {
1134
+ return keyPrefix + '::' + RepresentationType$6 + ':' + config.contractId;
871
1135
  }
872
- function keyBuilderFromType$3(luvio, object) {
1136
+ function keyBuilderFromType$4(luvio, object) {
873
1137
  const keyParams = {
874
- id: object.id
1138
+ contractId: object.contractId
875
1139
  };
876
- return keyBuilder$c(luvio, keyParams);
1140
+ return keyBuilder$g(luvio, keyParams);
877
1141
  }
878
- function normalize$5(input, existing, path, luvio, store, timestamp) {
1142
+ function normalize$6(input, existing, path, luvio, store, timestamp) {
879
1143
  return input;
880
1144
  }
881
- const select$g = function GenericOutputRepresentationSelect() {
1145
+ const select$j = function ContractActionListRepresentationSelect() {
882
1146
  return {
883
1147
  kind: 'Fragment',
884
- version: VERSION$5,
1148
+ version: VERSION$6,
885
1149
  private: [],
886
1150
  opaque: true
887
1151
  };
888
1152
  };
889
- function equals$5(existing, incoming) {
1153
+ function equals$6(existing, incoming) {
890
1154
  if (JSONStringify(incoming) !== JSONStringify(existing)) {
891
1155
  return false;
892
1156
  }
893
1157
  return true;
894
1158
  }
895
- const ingest$5 = function GenericOutputRepresentationIngest(input, path, luvio, store, timestamp) {
1159
+ const ingest$6 = function ContractActionListRepresentationIngest(input, path, luvio, store, timestamp) {
896
1160
  if (process.env.NODE_ENV !== 'production') {
897
- const validateError = validate$8(input);
1161
+ const validateError = validate$9(input);
898
1162
  if (validateError !== null) {
899
1163
  throw validateError;
900
1164
  }
901
1165
  }
902
- const key = keyBuilderFromType$3(luvio, input);
1166
+ const key = keyBuilderFromType$4(luvio, input);
903
1167
  const existingRecord = store.readEntry(key);
904
- const ttlToUse = TTL$4;
905
- let incomingRecord = normalize$5(input, store.readEntry(key), {
1168
+ const ttlToUse = TTL$5;
1169
+ let incomingRecord = normalize$6(input, store.readEntry(key), {
906
1170
  fullPath: key,
907
1171
  parent: path.parent,
908
1172
  propertyName: path.propertyName,
909
1173
  ttl: ttlToUse
910
1174
  });
911
- if (existingRecord === undefined || equals$5(existingRecord, incomingRecord) === false) {
1175
+ if (existingRecord === undefined || equals$6(existingRecord, incomingRecord) === false) {
912
1176
  luvio.storePublish(key, incomingRecord);
913
1177
  }
914
1178
  {
915
1179
  const storeMetadataParams = {
916
1180
  ttl: ttlToUse,
917
1181
  namespace: "clm",
918
- version: VERSION$5,
919
- representationName: RepresentationType$5,
1182
+ version: VERSION$6,
1183
+ representationName: RepresentationType$6,
920
1184
  };
921
1185
  luvio.publishStoreMetadata(key, storeMetadataParams);
922
1186
  }
923
1187
  return createLink(key);
924
1188
  };
925
- function getTypeCacheKeys$5(luvio, input, fullPathFactory) {
1189
+ function getTypeCacheKeys$6(luvio, input, fullPathFactory) {
926
1190
  const rootKeySet = new StoreKeyMap();
927
1191
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
928
- const rootKey = keyBuilderFromType$3(luvio, input);
1192
+ const rootKey = keyBuilderFromType$4(luvio, input);
929
1193
  rootKeySet.set(rootKey, {
930
1194
  namespace: keyPrefix,
931
- representationName: RepresentationType$5,
1195
+ representationName: RepresentationType$6,
932
1196
  mergeable: false
933
1197
  });
934
1198
  return rootKeySet;
935
1199
  }
936
1200
 
937
- function select$f(luvio, params) {
938
- return select$g();
1201
+ function select$i(luvio, params) {
1202
+ return select$j();
939
1203
  }
940
- function getResponseCacheKeys$b(luvio, resourceParams, response) {
941
- return getTypeCacheKeys$5(luvio, response);
1204
+ function keyBuilder$f(luvio, params) {
1205
+ return keyBuilder$g(luvio, {
1206
+ contractId: params.urlParams.contractId
1207
+ });
942
1208
  }
943
- function ingestSuccess$a(luvio, resourceParams, response) {
1209
+ function getResponseCacheKeys$e(luvio, resourceParams, response) {
1210
+ return getTypeCacheKeys$6(luvio, response);
1211
+ }
1212
+ function ingestSuccess$c(luvio, resourceParams, response, snapshotRefresh) {
944
1213
  const { body } = response;
945
- const key = keyBuilderFromType$3(luvio, body);
946
- luvio.storeIngest(key, ingest$5, body);
1214
+ const key = keyBuilder$f(luvio, resourceParams);
1215
+ luvio.storeIngest(key, ingest$6, body);
947
1216
  const snapshot = luvio.storeLookup({
948
1217
  recordId: key,
949
- node: select$f(),
1218
+ node: select$i(),
950
1219
  variables: {},
951
- });
1220
+ }, snapshotRefresh);
952
1221
  if (process.env.NODE_ENV !== 'production') {
953
1222
  if (snapshot.state !== 'Fulfilled') {
954
1223
  throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
@@ -957,13 +1226,25 @@ function ingestSuccess$a(luvio, resourceParams, response) {
957
1226
  deepFreeze(snapshot.data);
958
1227
  return snapshot;
959
1228
  }
960
- function createResourceRequest$b(config) {
1229
+ function ingestError$4(luvio, params, error, snapshotRefresh) {
1230
+ const key = keyBuilder$f(luvio, params);
1231
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1232
+ const storeMetadataParams = {
1233
+ ttl: TTL$5,
1234
+ namespace: keyPrefix,
1235
+ version: VERSION$6,
1236
+ representationName: RepresentationType$6
1237
+ };
1238
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
1239
+ return errorSnapshot;
1240
+ }
1241
+ function createResourceRequest$e(config) {
961
1242
  const headers = {};
962
1243
  return {
963
1244
  baseUri: '/services/data/v59.0',
964
- basePath: '/connect/clm/contract/' + config.urlParams.contractId + '',
965
- method: 'patch',
966
- body: config.body,
1245
+ basePath: '/connect/clm/contract/' + config.urlParams.contractId + '/contract-actions',
1246
+ method: 'get',
1247
+ body: null,
967
1248
  urlParams: config.urlParams,
968
1249
  queryParams: {},
969
1250
  headers,
@@ -971,248 +1252,642 @@ function createResourceRequest$b(config) {
971
1252
  };
972
1253
  }
973
1254
 
974
- const executeContractAction_ConfigPropertyNames = {
975
- displayName: 'executeContractAction',
1255
+ const getContractActions_ConfigPropertyNames = {
1256
+ displayName: 'getContractActions',
976
1257
  parameters: {
977
- required: ['contractId', 'actionInput'],
1258
+ required: ['contractId'],
978
1259
  optional: []
979
1260
  }
980
1261
  };
981
- function createResourceParams$b(config) {
1262
+ function createResourceParams$e(config) {
982
1263
  const resourceParams = {
983
1264
  urlParams: {
984
1265
  contractId: config.contractId
985
- },
986
- body: {
987
- actionInput: config.actionInput
988
1266
  }
989
1267
  };
990
1268
  return resourceParams;
991
1269
  }
992
- function typeCheckConfig$b(untrustedConfig) {
1270
+ function keyBuilder$e(luvio, config) {
1271
+ const resourceParams = createResourceParams$e(config);
1272
+ return keyBuilder$f(luvio, resourceParams);
1273
+ }
1274
+ function typeCheckConfig$e(untrustedConfig) {
993
1275
  const config = {};
994
1276
  const untrustedConfig_contractId = untrustedConfig.contractId;
995
1277
  if (typeof untrustedConfig_contractId === 'string') {
996
1278
  config.contractId = untrustedConfig_contractId;
997
1279
  }
998
- const untrustedConfig_actionInput = untrustedConfig.actionInput;
999
- const referenceContractActionInputRepresentationValidationError = validate$9(untrustedConfig_actionInput);
1000
- if (referenceContractActionInputRepresentationValidationError === null) {
1001
- config.actionInput = untrustedConfig_actionInput;
1002
- }
1003
1280
  return config;
1004
1281
  }
1005
- function validateAdapterConfig$b(untrustedConfig, configPropertyNames) {
1282
+ function validateAdapterConfig$e(untrustedConfig, configPropertyNames) {
1006
1283
  if (!untrustedIsObject(untrustedConfig)) {
1007
1284
  return null;
1008
1285
  }
1009
1286
  if (process.env.NODE_ENV !== 'production') {
1010
1287
  validateConfig(untrustedConfig, configPropertyNames);
1011
1288
  }
1012
- const config = typeCheckConfig$b(untrustedConfig);
1289
+ const config = typeCheckConfig$e(untrustedConfig);
1013
1290
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
1014
1291
  return null;
1015
1292
  }
1016
1293
  return config;
1017
1294
  }
1018
- function buildNetworkSnapshot$b(luvio, config, options) {
1019
- const resourceParams = createResourceParams$b(config);
1020
- const request = createResourceRequest$b(resourceParams);
1295
+ function adapterFragment$4(luvio, config) {
1296
+ createResourceParams$e(config);
1297
+ return select$i();
1298
+ }
1299
+ function onFetchResponseSuccess$4(luvio, config, resourceParams, response) {
1300
+ const snapshot = ingestSuccess$c(luvio, resourceParams, response, {
1301
+ config,
1302
+ resolve: () => buildNetworkSnapshot$e(luvio, config, snapshotRefreshOptions)
1303
+ });
1304
+ return luvio.storeBroadcast().then(() => snapshot);
1305
+ }
1306
+ function onFetchResponseError$4(luvio, config, resourceParams, response) {
1307
+ const snapshot = ingestError$4(luvio, resourceParams, response, {
1308
+ config,
1309
+ resolve: () => buildNetworkSnapshot$e(luvio, config, snapshotRefreshOptions)
1310
+ });
1311
+ return luvio.storeBroadcast().then(() => snapshot);
1312
+ }
1313
+ function buildNetworkSnapshot$e(luvio, config, options) {
1314
+ const resourceParams = createResourceParams$e(config);
1315
+ const request = createResourceRequest$e(resourceParams);
1021
1316
  return luvio.dispatchResourceRequest(request, options)
1022
1317
  .then((response) => {
1023
- return luvio.handleSuccessResponse(() => {
1024
- const snapshot = ingestSuccess$a(luvio, resourceParams, response);
1025
- return luvio.storeBroadcast().then(() => snapshot);
1026
- }, () => getResponseCacheKeys$b(luvio, resourceParams, response.body));
1318
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$4(luvio, config, resourceParams, response), () => getResponseCacheKeys$e(luvio, resourceParams, response.body));
1027
1319
  }, (response) => {
1028
- deepFreeze(response);
1029
- throw response;
1320
+ return luvio.handleErrorResponse(() => onFetchResponseError$4(luvio, config, resourceParams, response));
1030
1321
  });
1031
1322
  }
1032
- const executeContractActionAdapterFactory = (luvio) => {
1033
- return function executeContractAction(untrustedConfig) {
1034
- const config = validateAdapterConfig$b(untrustedConfig, executeContractAction_ConfigPropertyNames);
1035
- // Invalid or incomplete config
1036
- if (config === null) {
1037
- throw new Error('Invalid config for "executeContractAction"');
1038
- }
1039
- return buildNetworkSnapshot$b(luvio, config);
1323
+ function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
1324
+ const { luvio, config } = context;
1325
+ const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
1326
+ const dispatchOptions = {
1327
+ resourceRequestContext: {
1328
+ requestCorrelator,
1329
+ luvioRequestMethod: undefined,
1330
+ },
1331
+ eventObservers
1040
1332
  };
1041
- };
1042
-
1043
- function validate$7(obj, path = 'ContractActionRepresentation') {
1044
- const v_error = (() => {
1045
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1046
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1047
- }
1048
- const obj_actionId = obj.actionId;
1049
- const path_actionId = path + '.actionId';
1050
- if (typeof obj_actionId !== 'string') {
1051
- return new TypeError('Expected "string" but received "' + typeof obj_actionId + '" (at "' + path_actionId + '")');
1333
+ if (networkPriority !== 'normal') {
1334
+ dispatchOptions.overrides = {
1335
+ priority: networkPriority
1336
+ };
1337
+ }
1338
+ return buildNetworkSnapshot$e(luvio, config, dispatchOptions);
1339
+ }
1340
+ function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
1341
+ const { luvio, config } = context;
1342
+ const selector = {
1343
+ recordId: keyBuilder$e(luvio, config),
1344
+ node: adapterFragment$4(luvio, config),
1345
+ variables: {},
1346
+ };
1347
+ const cacheSnapshot = storeLookup(selector, {
1348
+ config,
1349
+ resolve: () => buildNetworkSnapshot$e(luvio, config, snapshotRefreshOptions)
1350
+ });
1351
+ return cacheSnapshot;
1352
+ }
1353
+ const getContractActionsAdapterFactory = (luvio) => function clm__getContractActions(untrustedConfig, requestContext) {
1354
+ const config = validateAdapterConfig$e(untrustedConfig, getContractActions_ConfigPropertyNames);
1355
+ // Invalid or incomplete config
1356
+ if (config === null) {
1357
+ return null;
1358
+ }
1359
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
1360
+ buildCachedSnapshotCachePolicy$4, buildNetworkSnapshotCachePolicy$4);
1361
+ };
1362
+
1363
+ function select$h(luvio, params) {
1364
+ return select$l();
1365
+ }
1366
+ function getResponseCacheKeys$d(luvio, resourceParams, response) {
1367
+ return getTypeCacheKeys$7(luvio, response);
1368
+ }
1369
+ function ingestSuccess$b(luvio, resourceParams, response) {
1370
+ const { body } = response;
1371
+ const key = keyBuilderFromType$5(luvio, body);
1372
+ luvio.storeIngest(key, ingest$7, body);
1373
+ const snapshot = luvio.storeLookup({
1374
+ recordId: key,
1375
+ node: select$h(),
1376
+ variables: {},
1377
+ });
1378
+ if (process.env.NODE_ENV !== 'production') {
1379
+ if (snapshot.state !== 'Fulfilled') {
1380
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1052
1381
  }
1053
- if (obj.actionType !== undefined) {
1054
- const obj_actionType = obj.actionType;
1055
- const path_actionType = path + '.actionType';
1056
- if (typeof obj_actionType !== 'string') {
1057
- return new TypeError('Expected "string" but received "' + typeof obj_actionType + '" (at "' + path_actionType + '")');
1058
- }
1382
+ }
1383
+ deepFreeze(snapshot.data);
1384
+ return snapshot;
1385
+ }
1386
+ function createResourceRequest$d(config) {
1387
+ const headers = {};
1388
+ return {
1389
+ baseUri: '/services/data/v59.0',
1390
+ basePath: '/connect/clm/contract-document-version/' + config.urlParams.contractDocumentVersionId + '',
1391
+ method: 'patch',
1392
+ body: config.body,
1393
+ urlParams: config.urlParams,
1394
+ queryParams: {},
1395
+ headers,
1396
+ priority: 'normal',
1397
+ };
1398
+ }
1399
+
1400
+ const updateContractDocumentVersionWithTemplate_ConfigPropertyNames = {
1401
+ displayName: 'updateContractDocumentVersionWithTemplate',
1402
+ parameters: {
1403
+ required: ['contractDocumentVersionId', 'templateInput'],
1404
+ optional: []
1405
+ }
1406
+ };
1407
+ function createResourceParams$d(config) {
1408
+ const resourceParams = {
1409
+ urlParams: {
1410
+ contractDocumentVersionId: config.contractDocumentVersionId
1411
+ },
1412
+ body: {
1413
+ templateInput: config.templateInput
1059
1414
  }
1060
- const obj_apiName = obj.apiName;
1061
- const path_apiName = path + '.apiName';
1062
- if (typeof obj_apiName !== 'string') {
1063
- return new TypeError('Expected "string" but received "' + typeof obj_apiName + '" (at "' + path_apiName + '")');
1415
+ };
1416
+ return resourceParams;
1417
+ }
1418
+ function typeCheckConfig$d(untrustedConfig) {
1419
+ const config = {};
1420
+ const untrustedConfig_contractDocumentVersionId = untrustedConfig.contractDocumentVersionId;
1421
+ if (typeof untrustedConfig_contractDocumentVersionId === 'string') {
1422
+ config.contractDocumentVersionId = untrustedConfig_contractDocumentVersionId;
1423
+ }
1424
+ const untrustedConfig_templateInput = untrustedConfig.templateInput;
1425
+ const referenceTemplateInputRepresentationValidationError = validate$d(untrustedConfig_templateInput);
1426
+ if (referenceTemplateInputRepresentationValidationError === null) {
1427
+ config.templateInput = untrustedConfig_templateInput;
1428
+ }
1429
+ return config;
1430
+ }
1431
+ function validateAdapterConfig$d(untrustedConfig, configPropertyNames) {
1432
+ if (!untrustedIsObject(untrustedConfig)) {
1433
+ return null;
1434
+ }
1435
+ if (process.env.NODE_ENV !== 'production') {
1436
+ validateConfig(untrustedConfig, configPropertyNames);
1437
+ }
1438
+ const config = typeCheckConfig$d(untrustedConfig);
1439
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1440
+ return null;
1441
+ }
1442
+ return config;
1443
+ }
1444
+ function buildNetworkSnapshot$d(luvio, config, options) {
1445
+ const resourceParams = createResourceParams$d(config);
1446
+ const request = createResourceRequest$d(resourceParams);
1447
+ return luvio.dispatchResourceRequest(request, options)
1448
+ .then((response) => {
1449
+ return luvio.handleSuccessResponse(() => {
1450
+ const snapshot = ingestSuccess$b(luvio, resourceParams, response);
1451
+ return luvio.storeBroadcast().then(() => snapshot);
1452
+ }, () => getResponseCacheKeys$d(luvio, resourceParams, response.body));
1453
+ }, (response) => {
1454
+ deepFreeze(response);
1455
+ throw response;
1456
+ });
1457
+ }
1458
+ const updateContractDocumentVersionWithTemplateAdapterFactory = (luvio) => {
1459
+ return function updateContractDocumentVersionWithTemplate(untrustedConfig) {
1460
+ const config = validateAdapterConfig$d(untrustedConfig, updateContractDocumentVersionWithTemplate_ConfigPropertyNames);
1461
+ // Invalid or incomplete config
1462
+ if (config === null) {
1463
+ throw new Error('Invalid config for "updateContractDocumentVersionWithTemplate"');
1064
1464
  }
1065
- if (obj.invocableClassName !== undefined) {
1066
- const obj_invocableClassName = obj.invocableClassName;
1067
- const path_invocableClassName = path + '.invocableClassName';
1068
- if (typeof obj_invocableClassName !== 'string') {
1069
- return new TypeError('Expected "string" but received "' + typeof obj_invocableClassName + '" (at "' + path_invocableClassName + '")');
1070
- }
1465
+ return buildNetworkSnapshot$d(luvio, config);
1466
+ };
1467
+ };
1468
+
1469
+ function select$g(luvio, params) {
1470
+ return select$q();
1471
+ }
1472
+ function getResponseCacheKeys$c(luvio, resourceParams, response) {
1473
+ return getTypeCacheKeys$9(luvio, response);
1474
+ }
1475
+ function ingestSuccess$a(luvio, resourceParams, response) {
1476
+ const { body } = response;
1477
+ const key = keyBuilderFromType$6(luvio, body);
1478
+ luvio.storeIngest(key, ingest$9, body);
1479
+ const snapshot = luvio.storeLookup({
1480
+ recordId: key,
1481
+ node: select$g(),
1482
+ variables: {},
1483
+ });
1484
+ if (process.env.NODE_ENV !== 'production') {
1485
+ if (snapshot.state !== 'Fulfilled') {
1486
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1071
1487
  }
1072
- if (obj.invocableMethodName !== undefined) {
1073
- const obj_invocableMethodName = obj.invocableMethodName;
1074
- const path_invocableMethodName = path + '.invocableMethodName';
1075
- if (typeof obj_invocableMethodName !== 'string') {
1076
- return new TypeError('Expected "string" but received "' + typeof obj_invocableMethodName + '" (at "' + path_invocableMethodName + '")');
1077
- }
1488
+ }
1489
+ deepFreeze(snapshot.data);
1490
+ return snapshot;
1491
+ }
1492
+ function createResourceRequest$c(config) {
1493
+ const headers = {};
1494
+ return {
1495
+ baseUri: '/services/data/v59.0',
1496
+ basePath: '/connect/clm/contract-document-version/' + config.urlParams.contractDocumentVersionId + '/checkIn',
1497
+ method: 'patch',
1498
+ body: null,
1499
+ urlParams: config.urlParams,
1500
+ queryParams: {},
1501
+ headers,
1502
+ priority: 'normal',
1503
+ };
1504
+ }
1505
+
1506
+ const checkIn_ConfigPropertyNames = {
1507
+ displayName: 'checkIn',
1508
+ parameters: {
1509
+ required: ['contractDocumentVersionId'],
1510
+ optional: []
1511
+ }
1512
+ };
1513
+ function createResourceParams$c(config) {
1514
+ const resourceParams = {
1515
+ urlParams: {
1516
+ contractDocumentVersionId: config.contractDocumentVersionId
1078
1517
  }
1079
- if (obj.referenceObject !== undefined) {
1080
- const obj_referenceObject = obj.referenceObject;
1081
- const path_referenceObject = path + '.referenceObject';
1082
- if (typeof obj_referenceObject !== 'string') {
1083
- return new TypeError('Expected "string" but received "' + typeof obj_referenceObject + '" (at "' + path_referenceObject + '")');
1084
- }
1518
+ };
1519
+ return resourceParams;
1520
+ }
1521
+ function typeCheckConfig$c(untrustedConfig) {
1522
+ const config = {};
1523
+ const untrustedConfig_contractDocumentVersionId = untrustedConfig.contractDocumentVersionId;
1524
+ if (typeof untrustedConfig_contractDocumentVersionId === 'string') {
1525
+ config.contractDocumentVersionId = untrustedConfig_contractDocumentVersionId;
1526
+ }
1527
+ return config;
1528
+ }
1529
+ function validateAdapterConfig$c(untrustedConfig, configPropertyNames) {
1530
+ if (!untrustedIsObject(untrustedConfig)) {
1531
+ return null;
1532
+ }
1533
+ if (process.env.NODE_ENV !== 'production') {
1534
+ validateConfig(untrustedConfig, configPropertyNames);
1535
+ }
1536
+ const config = typeCheckConfig$c(untrustedConfig);
1537
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1538
+ return null;
1539
+ }
1540
+ return config;
1541
+ }
1542
+ function buildNetworkSnapshot$c(luvio, config, options) {
1543
+ const resourceParams = createResourceParams$c(config);
1544
+ const request = createResourceRequest$c(resourceParams);
1545
+ return luvio.dispatchResourceRequest(request, options)
1546
+ .then((response) => {
1547
+ return luvio.handleSuccessResponse(() => {
1548
+ const snapshot = ingestSuccess$a(luvio, resourceParams, response);
1549
+ return luvio.storeBroadcast().then(() => snapshot);
1550
+ }, () => getResponseCacheKeys$c(luvio, resourceParams, response.body));
1551
+ }, (response) => {
1552
+ deepFreeze(response);
1553
+ throw response;
1554
+ });
1555
+ }
1556
+ const checkInAdapterFactory = (luvio) => {
1557
+ return function checkIn(untrustedConfig) {
1558
+ const config = validateAdapterConfig$c(untrustedConfig, checkIn_ConfigPropertyNames);
1559
+ // Invalid or incomplete config
1560
+ if (config === null) {
1561
+ throw new Error('Invalid config for "checkIn"');
1085
1562
  }
1086
- if (obj.referenceObjectId !== undefined) {
1087
- const obj_referenceObjectId = obj.referenceObjectId;
1088
- const path_referenceObjectId = path + '.referenceObjectId';
1089
- if (typeof obj_referenceObjectId !== 'string') {
1090
- return new TypeError('Expected "string" but received "' + typeof obj_referenceObjectId + '" (at "' + path_referenceObjectId + '")');
1091
- }
1563
+ return buildNetworkSnapshot$c(luvio, config);
1564
+ };
1565
+ };
1566
+
1567
+ function select$f(luvio, params) {
1568
+ return select$l();
1569
+ }
1570
+ function getResponseCacheKeys$b(luvio, resourceParams, response) {
1571
+ return getTypeCacheKeys$7(luvio, response);
1572
+ }
1573
+ function ingestSuccess$9(luvio, resourceParams, response) {
1574
+ const { body } = response;
1575
+ const key = keyBuilderFromType$5(luvio, body);
1576
+ luvio.storeIngest(key, ingest$7, body);
1577
+ const snapshot = luvio.storeLookup({
1578
+ recordId: key,
1579
+ node: select$f(),
1580
+ variables: {},
1581
+ });
1582
+ if (process.env.NODE_ENV !== 'production') {
1583
+ if (snapshot.state !== 'Fulfilled') {
1584
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1092
1585
  }
1093
- const obj_uiText = obj.uiText;
1094
- const path_uiText = path + '.uiText';
1095
- if (typeof obj_uiText !== 'string') {
1096
- return new TypeError('Expected "string" but received "' + typeof obj_uiText + '" (at "' + path_uiText + '")');
1586
+ }
1587
+ deepFreeze(snapshot.data);
1588
+ return snapshot;
1589
+ }
1590
+ function createResourceRequest$b(config) {
1591
+ const headers = {};
1592
+ return {
1593
+ baseUri: '/services/data/v59.0',
1594
+ basePath: '/connect/clm/contract-document-version/' + config.urlParams.contractDocumentVersionId + '/checkout',
1595
+ method: 'post',
1596
+ body: config.body,
1597
+ urlParams: config.urlParams,
1598
+ queryParams: {},
1599
+ headers,
1600
+ priority: 'normal',
1601
+ };
1602
+ }
1603
+
1604
+ const checkoutContractDocumentVersion_ConfigPropertyNames = {
1605
+ displayName: 'checkoutContractDocumentVersion',
1606
+ parameters: {
1607
+ required: ['contractDocumentVersionId', 'templateInput'],
1608
+ optional: []
1609
+ }
1610
+ };
1611
+ function createResourceParams$b(config) {
1612
+ const resourceParams = {
1613
+ urlParams: {
1614
+ contractDocumentVersionId: config.contractDocumentVersionId
1615
+ },
1616
+ body: {
1617
+ templateInput: config.templateInput
1097
1618
  }
1098
- })();
1099
- return v_error === undefined ? null : v_error;
1619
+ };
1620
+ return resourceParams;
1100
1621
  }
1622
+ function typeCheckConfig$b(untrustedConfig) {
1623
+ const config = {};
1624
+ const untrustedConfig_contractDocumentVersionId = untrustedConfig.contractDocumentVersionId;
1625
+ if (typeof untrustedConfig_contractDocumentVersionId === 'string') {
1626
+ config.contractDocumentVersionId = untrustedConfig_contractDocumentVersionId;
1627
+ }
1628
+ const untrustedConfig_templateInput = untrustedConfig.templateInput;
1629
+ const referenceTemplateInputRepresentationValidationError = validate$d(untrustedConfig_templateInput);
1630
+ if (referenceTemplateInputRepresentationValidationError === null) {
1631
+ config.templateInput = untrustedConfig_templateInput;
1632
+ }
1633
+ return config;
1634
+ }
1635
+ function validateAdapterConfig$b(untrustedConfig, configPropertyNames) {
1636
+ if (!untrustedIsObject(untrustedConfig)) {
1637
+ return null;
1638
+ }
1639
+ if (process.env.NODE_ENV !== 'production') {
1640
+ validateConfig(untrustedConfig, configPropertyNames);
1641
+ }
1642
+ const config = typeCheckConfig$b(untrustedConfig);
1643
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1644
+ return null;
1645
+ }
1646
+ return config;
1647
+ }
1648
+ function buildNetworkSnapshot$b(luvio, config, options) {
1649
+ const resourceParams = createResourceParams$b(config);
1650
+ const request = createResourceRequest$b(resourceParams);
1651
+ return luvio.dispatchResourceRequest(request, options)
1652
+ .then((response) => {
1653
+ return luvio.handleSuccessResponse(() => {
1654
+ const snapshot = ingestSuccess$9(luvio, resourceParams, response);
1655
+ return luvio.storeBroadcast().then(() => snapshot);
1656
+ }, () => getResponseCacheKeys$b(luvio, resourceParams, response.body));
1657
+ }, (response) => {
1658
+ deepFreeze(response);
1659
+ throw response;
1660
+ });
1661
+ }
1662
+ const checkoutContractDocumentVersionAdapterFactory = (luvio) => {
1663
+ return function checkoutContractDocumentVersion(untrustedConfig) {
1664
+ const config = validateAdapterConfig$b(untrustedConfig, checkoutContractDocumentVersion_ConfigPropertyNames);
1665
+ // Invalid or incomplete config
1666
+ if (config === null) {
1667
+ throw new Error('Invalid config for "checkoutContractDocumentVersion"');
1668
+ }
1669
+ return buildNetworkSnapshot$b(luvio, config);
1670
+ };
1671
+ };
1101
1672
 
1102
- const TTL$3 = 60000;
1103
- const VERSION$4 = "2caf5349dc6c6aa44ef471df00f65bbd";
1104
- function validate$6(obj, path = 'ContractActionListRepresentation') {
1673
+ const TTL$4 = 60000;
1674
+ const VERSION$5 = "dce4365dead9ca97204892d274fbf1b7";
1675
+ function validate$8(obj, path = 'ContentDocumentListRepresentation') {
1105
1676
  const v_error = (() => {
1106
1677
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1107
1678
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1108
1679
  }
1109
- const obj_actions = obj.actions;
1110
- const path_actions = path + '.actions';
1111
- if (!ArrayIsArray(obj_actions)) {
1112
- return new TypeError('Expected "array" but received "' + typeof obj_actions + '" (at "' + path_actions + '")');
1680
+ const obj_contractDocumentVersionId = obj.contractDocumentVersionId;
1681
+ const path_contractDocumentVersionId = path + '.contractDocumentVersionId';
1682
+ if (typeof obj_contractDocumentVersionId !== 'string') {
1683
+ return new TypeError('Expected "string" but received "' + typeof obj_contractDocumentVersionId + '" (at "' + path_contractDocumentVersionId + '")');
1113
1684
  }
1114
- for (let i = 0; i < obj_actions.length; i++) {
1115
- const obj_actions_item = obj_actions[i];
1116
- const path_actions_item = path_actions + '[' + i + ']';
1117
- const referencepath_actions_itemValidationError = validate$7(obj_actions_item, path_actions_item);
1118
- if (referencepath_actions_itemValidationError !== null) {
1119
- let message = 'Object doesn\'t match ContractActionRepresentation (at "' + path_actions_item + '")\n';
1120
- message += referencepath_actions_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1121
- return new TypeError(message);
1685
+ if (obj.data !== undefined) {
1686
+ const obj_data = obj.data;
1687
+ const path_data = path + '.data';
1688
+ if (!ArrayIsArray(obj_data)) {
1689
+ return new TypeError('Expected "array" but received "' + typeof obj_data + '" (at "' + path_data + '")');
1690
+ }
1691
+ for (let i = 0; i < obj_data.length; i++) {
1692
+ const obj_data_item = obj_data[i];
1693
+ const path_data_item = path_data + '[' + i + ']';
1694
+ const referencepath_data_itemValidationError = validate$c(obj_data_item, path_data_item);
1695
+ if (referencepath_data_itemValidationError !== null) {
1696
+ let message = 'Object doesn\'t match ContentDocumentRepresentation (at "' + path_data_item + '")\n';
1697
+ message += referencepath_data_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1698
+ return new TypeError(message);
1699
+ }
1122
1700
  }
1123
- }
1124
- const obj_contractId = obj.contractId;
1125
- const path_contractId = path + '.contractId';
1126
- if (typeof obj_contractId !== 'string') {
1127
- return new TypeError('Expected "string" but received "' + typeof obj_contractId + '" (at "' + path_contractId + '")');
1128
1701
  }
1129
1702
  })();
1130
1703
  return v_error === undefined ? null : v_error;
1131
1704
  }
1132
- const RepresentationType$4 = 'ContractActionListRepresentation';
1133
- function keyBuilder$b(luvio, config) {
1134
- return keyPrefix + '::' + RepresentationType$4 + ':' + config.contractId;
1705
+ const RepresentationType$5 = 'ContentDocumentListRepresentation';
1706
+ function keyBuilder$d(luvio, config) {
1707
+ return keyPrefix + '::' + RepresentationType$5 + ':' + config.contractDocumentVersionId;
1135
1708
  }
1136
- function keyBuilderFromType$2(luvio, object) {
1709
+ function keyBuilderFromType$3(luvio, object) {
1137
1710
  const keyParams = {
1138
- contractId: object.contractId
1711
+ contractDocumentVersionId: object.contractDocumentVersionId
1139
1712
  };
1140
- return keyBuilder$b(luvio, keyParams);
1713
+ return keyBuilder$d(luvio, keyParams);
1141
1714
  }
1142
- function normalize$4(input, existing, path, luvio, store, timestamp) {
1715
+ function normalize$5(input, existing, path, luvio, store, timestamp) {
1143
1716
  return input;
1144
1717
  }
1145
- const select$e = function ContractActionListRepresentationSelect() {
1718
+ const select$e = function ContentDocumentListRepresentationSelect() {
1146
1719
  return {
1147
1720
  kind: 'Fragment',
1148
- version: VERSION$4,
1721
+ version: VERSION$5,
1149
1722
  private: [],
1150
1723
  opaque: true
1151
1724
  };
1152
1725
  };
1153
- function equals$4(existing, incoming) {
1726
+ function equals$5(existing, incoming) {
1154
1727
  if (JSONStringify(incoming) !== JSONStringify(existing)) {
1155
1728
  return false;
1156
1729
  }
1157
1730
  return true;
1158
1731
  }
1159
- const ingest$4 = function ContractActionListRepresentationIngest(input, path, luvio, store, timestamp) {
1732
+ const ingest$5 = function ContentDocumentListRepresentationIngest(input, path, luvio, store, timestamp) {
1160
1733
  if (process.env.NODE_ENV !== 'production') {
1161
- const validateError = validate$6(input);
1734
+ const validateError = validate$8(input);
1162
1735
  if (validateError !== null) {
1163
1736
  throw validateError;
1164
1737
  }
1165
1738
  }
1166
- const key = keyBuilderFromType$2(luvio, input);
1739
+ const key = keyBuilderFromType$3(luvio, input);
1167
1740
  const existingRecord = store.readEntry(key);
1168
- const ttlToUse = TTL$3;
1169
- let incomingRecord = normalize$4(input, store.readEntry(key), {
1741
+ const ttlToUse = TTL$4;
1742
+ let incomingRecord = normalize$5(input, store.readEntry(key), {
1170
1743
  fullPath: key,
1171
1744
  parent: path.parent,
1172
1745
  propertyName: path.propertyName,
1173
1746
  ttl: ttlToUse
1174
1747
  });
1175
- if (existingRecord === undefined || equals$4(existingRecord, incomingRecord) === false) {
1748
+ if (existingRecord === undefined || equals$5(existingRecord, incomingRecord) === false) {
1176
1749
  luvio.storePublish(key, incomingRecord);
1177
1750
  }
1178
1751
  {
1179
1752
  const storeMetadataParams = {
1180
1753
  ttl: ttlToUse,
1181
1754
  namespace: "clm",
1182
- version: VERSION$4,
1183
- representationName: RepresentationType$4,
1755
+ version: VERSION$5,
1756
+ representationName: RepresentationType$5,
1184
1757
  };
1185
1758
  luvio.publishStoreMetadata(key, storeMetadataParams);
1186
1759
  }
1187
1760
  return createLink(key);
1188
1761
  };
1189
- function getTypeCacheKeys$4(luvio, input, fullPathFactory) {
1762
+ function getTypeCacheKeys$5(luvio, input, fullPathFactory) {
1190
1763
  const rootKeySet = new StoreKeyMap();
1191
1764
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1192
- const rootKey = keyBuilderFromType$2(luvio, input);
1765
+ const rootKey = keyBuilderFromType$3(luvio, input);
1193
1766
  rootKeySet.set(rootKey, {
1194
1767
  namespace: keyPrefix,
1195
- representationName: RepresentationType$4,
1768
+ representationName: RepresentationType$5,
1196
1769
  mergeable: false
1197
1770
  });
1198
1771
  return rootKeySet;
1199
1772
  }
1200
1773
 
1774
+ function keyBuilder$c(luvio, params) {
1775
+ return keyBuilder$d(luvio, {
1776
+ contractDocumentVersionId: params.urlParams.contractDocumentVersionId
1777
+ });
1778
+ }
1779
+ function getResponseCacheKeys$a(luvio, resourceParams) {
1780
+ const key = keyBuilder$c(luvio, resourceParams);
1781
+ const cacheKeyMap = new StoreKeyMap();
1782
+ cacheKeyMap.set(key, {
1783
+ namespace: keyPrefix,
1784
+ representationName: RepresentationType$5,
1785
+ mergeable: false
1786
+ });
1787
+ return cacheKeyMap;
1788
+ }
1789
+ function evictSuccess$1(luvio, resourceParams) {
1790
+ const key = keyBuilder$c(luvio, resourceParams);
1791
+ luvio.storeEvict(key);
1792
+ }
1793
+ function createResourceRequest$a(config) {
1794
+ const headers = {};
1795
+ return {
1796
+ baseUri: '/services/data/v59.0',
1797
+ basePath: '/connect/clm/contract-document-version/' + config.urlParams.contractDocumentVersionId + '/content-documents',
1798
+ method: 'delete',
1799
+ body: null,
1800
+ urlParams: config.urlParams,
1801
+ queryParams: config.queryParams,
1802
+ headers,
1803
+ priority: 'normal',
1804
+ };
1805
+ }
1806
+
1807
+ const adapterName$1 = 'deleteAttachment';
1808
+ const deleteAttachment_ConfigPropertyNames = {
1809
+ displayName: 'deleteAttachment',
1810
+ parameters: {
1811
+ required: ['contractDocumentVersionId'],
1812
+ optional: ['contentDocumentId']
1813
+ }
1814
+ };
1815
+ function createResourceParams$a(config) {
1816
+ const resourceParams = {
1817
+ urlParams: {
1818
+ contractDocumentVersionId: config.contractDocumentVersionId
1819
+ },
1820
+ queryParams: {
1821
+ contentDocumentId: config.contentDocumentId
1822
+ }
1823
+ };
1824
+ return resourceParams;
1825
+ }
1826
+ function typeCheckConfig$a(untrustedConfig) {
1827
+ const config = {};
1828
+ const untrustedConfig_contractDocumentVersionId = untrustedConfig.contractDocumentVersionId;
1829
+ if (typeof untrustedConfig_contractDocumentVersionId === 'string') {
1830
+ config.contractDocumentVersionId = untrustedConfig_contractDocumentVersionId;
1831
+ }
1832
+ const untrustedConfig_contentDocumentId = untrustedConfig.contentDocumentId;
1833
+ if (typeof untrustedConfig_contentDocumentId === 'string') {
1834
+ config.contentDocumentId = untrustedConfig_contentDocumentId;
1835
+ }
1836
+ return config;
1837
+ }
1838
+ function validateAdapterConfig$a(untrustedConfig, configPropertyNames) {
1839
+ if (!untrustedIsObject(untrustedConfig)) {
1840
+ return null;
1841
+ }
1842
+ if (process.env.NODE_ENV !== 'production') {
1843
+ validateConfig(untrustedConfig, configPropertyNames);
1844
+ }
1845
+ const config = typeCheckConfig$a(untrustedConfig);
1846
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1847
+ return null;
1848
+ }
1849
+ return config;
1850
+ }
1851
+ function buildNetworkSnapshot$a(luvio, config, options) {
1852
+ const resourceParams = createResourceParams$a(config);
1853
+ const request = createResourceRequest$a(resourceParams);
1854
+ return luvio.dispatchResourceRequest(request, options)
1855
+ .then(() => {
1856
+ return luvio.handleSuccessResponse(() => {
1857
+ evictSuccess$1(luvio, resourceParams);
1858
+ return luvio.storeBroadcast();
1859
+ }, () => getResponseCacheKeys$a(luvio, resourceParams));
1860
+ }, (response) => {
1861
+ deepFreeze(response);
1862
+ throw response;
1863
+ });
1864
+ }
1865
+ const deleteAttachmentAdapterFactory = (luvio) => {
1866
+ return function clmdeleteAttachment(untrustedConfig) {
1867
+ const config = validateAdapterConfig$a(untrustedConfig, deleteAttachment_ConfigPropertyNames);
1868
+ // Invalid or incomplete config
1869
+ if (config === null) {
1870
+ throw new Error(`Invalid config for "${adapterName$1}"`);
1871
+ }
1872
+ return buildNetworkSnapshot$a(luvio, config);
1873
+ };
1874
+ };
1875
+
1201
1876
  function select$d(luvio, params) {
1202
1877
  return select$e();
1203
1878
  }
1204
- function keyBuilder$a(luvio, params) {
1205
- return keyBuilder$b(luvio, {
1206
- contractId: params.urlParams.contractId
1879
+ function keyBuilder$b(luvio, params) {
1880
+ return keyBuilder$d(luvio, {
1881
+ contractDocumentVersionId: params.urlParams.contractDocumentVersionId
1207
1882
  });
1208
1883
  }
1209
- function getResponseCacheKeys$a(luvio, resourceParams, response) {
1210
- return getTypeCacheKeys$4(luvio, response);
1884
+ function getResponseCacheKeys$9(luvio, resourceParams, response) {
1885
+ return getTypeCacheKeys$5(luvio, response);
1211
1886
  }
1212
- function ingestSuccess$9(luvio, resourceParams, response, snapshotRefresh) {
1887
+ function ingestSuccess$8(luvio, resourceParams, response, snapshotRefresh) {
1213
1888
  const { body } = response;
1214
- const key = keyBuilder$a(luvio, resourceParams);
1215
- luvio.storeIngest(key, ingest$4, body);
1889
+ const key = keyBuilder$b(luvio, resourceParams);
1890
+ luvio.storeIngest(key, ingest$5, body);
1216
1891
  const snapshot = luvio.storeLookup({
1217
1892
  recordId: key,
1218
1893
  node: select$d(),
@@ -1227,22 +1902,22 @@ function ingestSuccess$9(luvio, resourceParams, response, snapshotRefresh) {
1227
1902
  return snapshot;
1228
1903
  }
1229
1904
  function ingestError$3(luvio, params, error, snapshotRefresh) {
1230
- const key = keyBuilder$a(luvio, params);
1905
+ const key = keyBuilder$b(luvio, params);
1231
1906
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1232
1907
  const storeMetadataParams = {
1233
- ttl: TTL$3,
1908
+ ttl: TTL$4,
1234
1909
  namespace: keyPrefix,
1235
- version: VERSION$4,
1236
- representationName: RepresentationType$4
1910
+ version: VERSION$5,
1911
+ representationName: RepresentationType$5
1237
1912
  };
1238
1913
  luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
1239
1914
  return errorSnapshot;
1240
1915
  }
1241
- function createResourceRequest$a(config) {
1916
+ function createResourceRequest$9(config) {
1242
1917
  const headers = {};
1243
1918
  return {
1244
1919
  baseUri: '/services/data/v59.0',
1245
- basePath: '/connect/clm/contract/' + config.urlParams.contractId + '/contract-actions',
1920
+ basePath: '/connect/clm/contract-document-version/' + config.urlParams.contractDocumentVersionId + '/content-documents',
1246
1921
  method: 'get',
1247
1922
  body: null,
1248
1923
  urlParams: config.urlParams,
@@ -1252,70 +1927,70 @@ function createResourceRequest$a(config) {
1252
1927
  };
1253
1928
  }
1254
1929
 
1255
- const getContractActions_ConfigPropertyNames = {
1256
- displayName: 'getContractActions',
1930
+ const getContentDocument_ConfigPropertyNames = {
1931
+ displayName: 'getContentDocument',
1257
1932
  parameters: {
1258
- required: ['contractId'],
1933
+ required: ['contractDocumentVersionId'],
1259
1934
  optional: []
1260
1935
  }
1261
1936
  };
1262
- function createResourceParams$a(config) {
1937
+ function createResourceParams$9(config) {
1263
1938
  const resourceParams = {
1264
1939
  urlParams: {
1265
- contractId: config.contractId
1940
+ contractDocumentVersionId: config.contractDocumentVersionId
1266
1941
  }
1267
1942
  };
1268
1943
  return resourceParams;
1269
1944
  }
1270
- function keyBuilder$9(luvio, config) {
1271
- const resourceParams = createResourceParams$a(config);
1272
- return keyBuilder$a(luvio, resourceParams);
1945
+ function keyBuilder$a(luvio, config) {
1946
+ const resourceParams = createResourceParams$9(config);
1947
+ return keyBuilder$b(luvio, resourceParams);
1273
1948
  }
1274
- function typeCheckConfig$a(untrustedConfig) {
1949
+ function typeCheckConfig$9(untrustedConfig) {
1275
1950
  const config = {};
1276
- const untrustedConfig_contractId = untrustedConfig.contractId;
1277
- if (typeof untrustedConfig_contractId === 'string') {
1278
- config.contractId = untrustedConfig_contractId;
1951
+ const untrustedConfig_contractDocumentVersionId = untrustedConfig.contractDocumentVersionId;
1952
+ if (typeof untrustedConfig_contractDocumentVersionId === 'string') {
1953
+ config.contractDocumentVersionId = untrustedConfig_contractDocumentVersionId;
1279
1954
  }
1280
1955
  return config;
1281
1956
  }
1282
- function validateAdapterConfig$a(untrustedConfig, configPropertyNames) {
1957
+ function validateAdapterConfig$9(untrustedConfig, configPropertyNames) {
1283
1958
  if (!untrustedIsObject(untrustedConfig)) {
1284
1959
  return null;
1285
1960
  }
1286
1961
  if (process.env.NODE_ENV !== 'production') {
1287
1962
  validateConfig(untrustedConfig, configPropertyNames);
1288
1963
  }
1289
- const config = typeCheckConfig$a(untrustedConfig);
1964
+ const config = typeCheckConfig$9(untrustedConfig);
1290
1965
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
1291
1966
  return null;
1292
1967
  }
1293
1968
  return config;
1294
1969
  }
1295
1970
  function adapterFragment$3(luvio, config) {
1296
- createResourceParams$a(config);
1971
+ createResourceParams$9(config);
1297
1972
  return select$d();
1298
1973
  }
1299
1974
  function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
1300
- const snapshot = ingestSuccess$9(luvio, resourceParams, response, {
1975
+ const snapshot = ingestSuccess$8(luvio, resourceParams, response, {
1301
1976
  config,
1302
- resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
1977
+ resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
1303
1978
  });
1304
1979
  return luvio.storeBroadcast().then(() => snapshot);
1305
1980
  }
1306
1981
  function onFetchResponseError$3(luvio, config, resourceParams, response) {
1307
1982
  const snapshot = ingestError$3(luvio, resourceParams, response, {
1308
1983
  config,
1309
- resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
1984
+ resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
1310
1985
  });
1311
1986
  return luvio.storeBroadcast().then(() => snapshot);
1312
1987
  }
1313
- function buildNetworkSnapshot$a(luvio, config, options) {
1314
- const resourceParams = createResourceParams$a(config);
1315
- const request = createResourceRequest$a(resourceParams);
1988
+ function buildNetworkSnapshot$9(luvio, config, options) {
1989
+ const resourceParams = createResourceParams$9(config);
1990
+ const request = createResourceRequest$9(resourceParams);
1316
1991
  return luvio.dispatchResourceRequest(request, options)
1317
1992
  .then((response) => {
1318
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => getResponseCacheKeys$a(luvio, resourceParams, response.body));
1993
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => getResponseCacheKeys$9(luvio, resourceParams, response.body));
1319
1994
  }, (response) => {
1320
1995
  return luvio.handleErrorResponse(() => onFetchResponseError$3(luvio, config, resourceParams, response));
1321
1996
  });
@@ -1335,23 +2010,23 @@ function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext
1335
2010
  priority: networkPriority
1336
2011
  };
1337
2012
  }
1338
- return buildNetworkSnapshot$a(luvio, config, dispatchOptions);
2013
+ return buildNetworkSnapshot$9(luvio, config, dispatchOptions);
1339
2014
  }
1340
2015
  function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
1341
2016
  const { luvio, config } = context;
1342
2017
  const selector = {
1343
- recordId: keyBuilder$9(luvio, config),
2018
+ recordId: keyBuilder$a(luvio, config),
1344
2019
  node: adapterFragment$3(luvio, config),
1345
2020
  variables: {},
1346
2021
  };
1347
2022
  const cacheSnapshot = storeLookup(selector, {
1348
2023
  config,
1349
- resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
2024
+ resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
1350
2025
  });
1351
2026
  return cacheSnapshot;
1352
2027
  }
1353
- const getContractActionsAdapterFactory = (luvio) => function clm__getContractActions(untrustedConfig, requestContext) {
1354
- const config = validateAdapterConfig$a(untrustedConfig, getContractActions_ConfigPropertyNames);
2028
+ const getContentDocumentAdapterFactory = (luvio) => function clm__getContentDocument(untrustedConfig, requestContext) {
2029
+ const config = validateAdapterConfig$9(untrustedConfig, getContentDocument_ConfigPropertyNames);
1355
2030
  // Invalid or incomplete config
1356
2031
  if (config === null) {
1357
2032
  return null;
@@ -1361,15 +2036,15 @@ const getContractActionsAdapterFactory = (luvio) => function clm__getContractAct
1361
2036
  };
1362
2037
 
1363
2038
  function select$c(luvio, params) {
1364
- return select$i();
2039
+ return select$q();
1365
2040
  }
1366
- function getResponseCacheKeys$9(luvio, resourceParams, response) {
1367
- return getTypeCacheKeys$6(luvio, response);
2041
+ function getResponseCacheKeys$8(luvio, resourceParams, response) {
2042
+ return getTypeCacheKeys$9(luvio, response);
1368
2043
  }
1369
- function ingestSuccess$8(luvio, resourceParams, response) {
2044
+ function ingestSuccess$7(luvio, resourceParams, response) {
1370
2045
  const { body } = response;
1371
- const key = keyBuilderFromType$4(luvio, body);
1372
- luvio.storeIngest(key, ingest$6, body);
2046
+ const key = keyBuilderFromType$6(luvio, body);
2047
+ luvio.storeIngest(key, ingest$9, body);
1373
2048
  const snapshot = luvio.storeLookup({
1374
2049
  recordId: key,
1375
2050
  node: select$c(),
@@ -1383,13 +2058,13 @@ function ingestSuccess$8(luvio, resourceParams, response) {
1383
2058
  deepFreeze(snapshot.data);
1384
2059
  return snapshot;
1385
2060
  }
1386
- function createResourceRequest$9(config) {
2061
+ function createResourceRequest$8(config) {
1387
2062
  const headers = {};
1388
2063
  return {
1389
2064
  baseUri: '/services/data/v59.0',
1390
- basePath: '/connect/clm/contract-document-version/' + config.urlParams.contractDocumentVersionId + '',
2065
+ basePath: '/connect/clm/contract-document-version/' + config.urlParams.contractDocumentVersionId + '/lock',
1391
2066
  method: 'patch',
1392
- body: config.body,
2067
+ body: null,
1393
2068
  urlParams: config.urlParams,
1394
2069
  queryParams: {},
1395
2070
  headers,
@@ -1397,104 +2072,220 @@ function createResourceRequest$9(config) {
1397
2072
  };
1398
2073
  }
1399
2074
 
1400
- const updateContractDocumentVersionWithTemplate_ConfigPropertyNames = {
1401
- displayName: 'updateContractDocumentVersionWithTemplate',
2075
+ const lockContractDocumentVersion_ConfigPropertyNames = {
2076
+ displayName: 'lockContractDocumentVersion',
1402
2077
  parameters: {
1403
- required: ['contractDocumentVersionId', 'templateInput'],
2078
+ required: ['contractDocumentVersionId'],
1404
2079
  optional: []
1405
2080
  }
1406
2081
  };
1407
- function createResourceParams$9(config) {
2082
+ function createResourceParams$8(config) {
1408
2083
  const resourceParams = {
1409
2084
  urlParams: {
1410
2085
  contractDocumentVersionId: config.contractDocumentVersionId
1411
- },
1412
- body: {
1413
- templateInput: config.templateInput
1414
2086
  }
1415
2087
  };
1416
2088
  return resourceParams;
1417
2089
  }
1418
- function typeCheckConfig$9(untrustedConfig) {
1419
- const config = {};
1420
- const untrustedConfig_contractDocumentVersionId = untrustedConfig.contractDocumentVersionId;
1421
- if (typeof untrustedConfig_contractDocumentVersionId === 'string') {
1422
- config.contractDocumentVersionId = untrustedConfig_contractDocumentVersionId;
1423
- }
1424
- const untrustedConfig_templateInput = untrustedConfig.templateInput;
1425
- const referenceTemplateInputRepresentationValidationError = validate$c(untrustedConfig_templateInput);
1426
- if (referenceTemplateInputRepresentationValidationError === null) {
1427
- config.templateInput = untrustedConfig_templateInput;
2090
+ function typeCheckConfig$8(untrustedConfig) {
2091
+ const config = {};
2092
+ const untrustedConfig_contractDocumentVersionId = untrustedConfig.contractDocumentVersionId;
2093
+ if (typeof untrustedConfig_contractDocumentVersionId === 'string') {
2094
+ config.contractDocumentVersionId = untrustedConfig_contractDocumentVersionId;
2095
+ }
2096
+ return config;
2097
+ }
2098
+ function validateAdapterConfig$8(untrustedConfig, configPropertyNames) {
2099
+ if (!untrustedIsObject(untrustedConfig)) {
2100
+ return null;
2101
+ }
2102
+ if (process.env.NODE_ENV !== 'production') {
2103
+ validateConfig(untrustedConfig, configPropertyNames);
2104
+ }
2105
+ const config = typeCheckConfig$8(untrustedConfig);
2106
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
2107
+ return null;
2108
+ }
2109
+ return config;
2110
+ }
2111
+ function buildNetworkSnapshot$8(luvio, config, options) {
2112
+ const resourceParams = createResourceParams$8(config);
2113
+ const request = createResourceRequest$8(resourceParams);
2114
+ return luvio.dispatchResourceRequest(request, options)
2115
+ .then((response) => {
2116
+ return luvio.handleSuccessResponse(() => {
2117
+ const snapshot = ingestSuccess$7(luvio, resourceParams, response);
2118
+ return luvio.storeBroadcast().then(() => snapshot);
2119
+ }, () => getResponseCacheKeys$8(luvio, resourceParams, response.body));
2120
+ }, (response) => {
2121
+ deepFreeze(response);
2122
+ throw response;
2123
+ });
2124
+ }
2125
+ const lockContractDocumentVersionAdapterFactory = (luvio) => {
2126
+ return function lockContractDocumentVersion(untrustedConfig) {
2127
+ const config = validateAdapterConfig$8(untrustedConfig, lockContractDocumentVersion_ConfigPropertyNames);
2128
+ // Invalid or incomplete config
2129
+ if (config === null) {
2130
+ throw new Error('Invalid config for "lockContractDocumentVersion"');
2131
+ }
2132
+ return buildNetworkSnapshot$8(luvio, config);
2133
+ };
2134
+ };
2135
+
2136
+ function validate$7(obj, path = 'ContractDocumentVersionReviewerOutputRepresentation') {
2137
+ const v_error = (() => {
2138
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
2139
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
2140
+ }
2141
+ const obj_accessType = obj.accessType;
2142
+ const path_accessType = path + '.accessType';
2143
+ if (typeof obj_accessType !== 'string') {
2144
+ return new TypeError('Expected "string" but received "' + typeof obj_accessType + '" (at "' + path_accessType + '")');
2145
+ }
2146
+ const obj_contractDocumentReviewRecordId = obj.contractDocumentReviewRecordId;
2147
+ const path_contractDocumentReviewRecordId = path + '.contractDocumentReviewRecordId';
2148
+ if (typeof obj_contractDocumentReviewRecordId !== 'string') {
2149
+ return new TypeError('Expected "string" but received "' + typeof obj_contractDocumentReviewRecordId + '" (at "' + path_contractDocumentReviewRecordId + '")');
2150
+ }
2151
+ const obj_displayName = obj.displayName;
2152
+ const path_displayName = path + '.displayName';
2153
+ if (typeof obj_displayName !== 'string') {
2154
+ return new TypeError('Expected "string" but received "' + typeof obj_displayName + '" (at "' + path_displayName + '")');
2155
+ }
2156
+ const obj_email = obj.email;
2157
+ const path_email = path + '.email';
2158
+ if (typeof obj_email !== 'string') {
2159
+ return new TypeError('Expected "string" but received "' + typeof obj_email + '" (at "' + path_email + '")');
2160
+ }
2161
+ })();
2162
+ return v_error === undefined ? null : v_error;
2163
+ }
2164
+
2165
+ const TTL$3 = 60000;
2166
+ const VERSION$4 = "0899abf561bfd47203236736c120b9da";
2167
+ function validate$6(obj, path = 'ContractDocumentVersionReviewersListOutputRepresentation') {
2168
+ const v_error = (() => {
2169
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
2170
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
2171
+ }
2172
+ const obj_contractDocumentVersionId = obj.contractDocumentVersionId;
2173
+ const path_contractDocumentVersionId = path + '.contractDocumentVersionId';
2174
+ if (typeof obj_contractDocumentVersionId !== 'string') {
2175
+ return new TypeError('Expected "string" but received "' + typeof obj_contractDocumentVersionId + '" (at "' + path_contractDocumentVersionId + '")');
2176
+ }
2177
+ const obj_reviewersData = obj.reviewersData;
2178
+ const path_reviewersData = path + '.reviewersData';
2179
+ if (!ArrayIsArray(obj_reviewersData)) {
2180
+ return new TypeError('Expected "array" but received "' + typeof obj_reviewersData + '" (at "' + path_reviewersData + '")');
2181
+ }
2182
+ for (let i = 0; i < obj_reviewersData.length; i++) {
2183
+ const obj_reviewersData_item = obj_reviewersData[i];
2184
+ const path_reviewersData_item = path_reviewersData + '[' + i + ']';
2185
+ const referencepath_reviewersData_itemValidationError = validate$7(obj_reviewersData_item, path_reviewersData_item);
2186
+ if (referencepath_reviewersData_itemValidationError !== null) {
2187
+ let message = 'Object doesn\'t match ContractDocumentVersionReviewerOutputRepresentation (at "' + path_reviewersData_item + '")\n';
2188
+ message += referencepath_reviewersData_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
2189
+ return new TypeError(message);
2190
+ }
2191
+ }
2192
+ })();
2193
+ return v_error === undefined ? null : v_error;
2194
+ }
2195
+ const RepresentationType$4 = 'ContractDocumentVersionReviewersListOutputRepresentation';
2196
+ function keyBuilder$9(luvio, config) {
2197
+ return keyPrefix + '::' + RepresentationType$4 + ':' + config.contractDocumentVersionId;
2198
+ }
2199
+ function keyBuilderFromType$2(luvio, object) {
2200
+ const keyParams = {
2201
+ contractDocumentVersionId: object.contractDocumentVersionId
2202
+ };
2203
+ return keyBuilder$9(luvio, keyParams);
2204
+ }
2205
+ function normalize$4(input, existing, path, luvio, store, timestamp) {
2206
+ return input;
2207
+ }
2208
+ const select$b = function ContractDocumentVersionReviewersListOutputRepresentationSelect() {
2209
+ return {
2210
+ kind: 'Fragment',
2211
+ version: VERSION$4,
2212
+ private: [],
2213
+ opaque: true
2214
+ };
2215
+ };
2216
+ function equals$4(existing, incoming) {
2217
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
2218
+ return false;
1428
2219
  }
1429
- return config;
2220
+ return true;
1430
2221
  }
1431
- function validateAdapterConfig$9(untrustedConfig, configPropertyNames) {
1432
- if (!untrustedIsObject(untrustedConfig)) {
1433
- return null;
1434
- }
2222
+ const ingest$4 = function ContractDocumentVersionReviewersListOutputRepresentationIngest(input, path, luvio, store, timestamp) {
1435
2223
  if (process.env.NODE_ENV !== 'production') {
1436
- validateConfig(untrustedConfig, configPropertyNames);
2224
+ const validateError = validate$6(input);
2225
+ if (validateError !== null) {
2226
+ throw validateError;
2227
+ }
1437
2228
  }
1438
- const config = typeCheckConfig$9(untrustedConfig);
1439
- if (!areRequiredParametersPresent(config, configPropertyNames)) {
1440
- return null;
2229
+ const key = keyBuilderFromType$2(luvio, input);
2230
+ const existingRecord = store.readEntry(key);
2231
+ const ttlToUse = TTL$3;
2232
+ let incomingRecord = normalize$4(input, store.readEntry(key), {
2233
+ fullPath: key,
2234
+ parent: path.parent,
2235
+ propertyName: path.propertyName,
2236
+ ttl: ttlToUse
2237
+ });
2238
+ if (existingRecord === undefined || equals$4(existingRecord, incomingRecord) === false) {
2239
+ luvio.storePublish(key, incomingRecord);
1441
2240
  }
1442
- return config;
1443
- }
1444
- function buildNetworkSnapshot$9(luvio, config, options) {
1445
- const resourceParams = createResourceParams$9(config);
1446
- const request = createResourceRequest$9(resourceParams);
1447
- return luvio.dispatchResourceRequest(request, options)
1448
- .then((response) => {
1449
- return luvio.handleSuccessResponse(() => {
1450
- const snapshot = ingestSuccess$8(luvio, resourceParams, response);
1451
- return luvio.storeBroadcast().then(() => snapshot);
1452
- }, () => getResponseCacheKeys$9(luvio, resourceParams, response.body));
1453
- }, (response) => {
1454
- deepFreeze(response);
1455
- throw response;
2241
+ {
2242
+ const storeMetadataParams = {
2243
+ ttl: ttlToUse,
2244
+ namespace: "clm",
2245
+ version: VERSION$4,
2246
+ representationName: RepresentationType$4,
2247
+ };
2248
+ luvio.publishStoreMetadata(key, storeMetadataParams);
2249
+ }
2250
+ return createLink(key);
2251
+ };
2252
+ function getTypeCacheKeys$4(luvio, input, fullPathFactory) {
2253
+ const rootKeySet = new StoreKeyMap();
2254
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
2255
+ const rootKey = keyBuilderFromType$2(luvio, input);
2256
+ rootKeySet.set(rootKey, {
2257
+ namespace: keyPrefix,
2258
+ representationName: RepresentationType$4,
2259
+ mergeable: false
1456
2260
  });
2261
+ return rootKeySet;
1457
2262
  }
1458
- const updateContractDocumentVersionWithTemplateAdapterFactory = (luvio) => {
1459
- return function updateContractDocumentVersionWithTemplate(untrustedConfig) {
1460
- const config = validateAdapterConfig$9(untrustedConfig, updateContractDocumentVersionWithTemplate_ConfigPropertyNames);
1461
- // Invalid or incomplete config
1462
- if (config === null) {
1463
- throw new Error('Invalid config for "updateContractDocumentVersionWithTemplate"');
1464
- }
1465
- return buildNetworkSnapshot$9(luvio, config);
1466
- };
1467
- };
1468
2263
 
1469
- function select$b(luvio, params) {
1470
- return select$g();
1471
- }
1472
- function getResponseCacheKeys$8(luvio, resourceParams, response) {
1473
- return getTypeCacheKeys$5(luvio, response);
2264
+ function keyBuilder$8(luvio, params) {
2265
+ return keyBuilder$9(luvio, {
2266
+ contractDocumentVersionId: params.urlParams.contractDocumentVersionId
2267
+ });
1474
2268
  }
1475
- function ingestSuccess$7(luvio, resourceParams, response) {
1476
- const { body } = response;
1477
- const key = keyBuilderFromType$3(luvio, body);
1478
- luvio.storeIngest(key, ingest$5, body);
1479
- const snapshot = luvio.storeLookup({
1480
- recordId: key,
1481
- node: select$b(),
1482
- variables: {},
2269
+ function getResponseCacheKeys$7(luvio, resourceParams) {
2270
+ const key = keyBuilder$8(luvio, resourceParams);
2271
+ const cacheKeyMap = new StoreKeyMap();
2272
+ cacheKeyMap.set(key, {
2273
+ namespace: keyPrefix,
2274
+ representationName: RepresentationType$4,
2275
+ mergeable: false
1483
2276
  });
1484
- if (process.env.NODE_ENV !== 'production') {
1485
- if (snapshot.state !== 'Fulfilled') {
1486
- throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1487
- }
1488
- }
1489
- deepFreeze(snapshot.data);
1490
- return snapshot;
2277
+ return cacheKeyMap;
1491
2278
  }
1492
- function createResourceRequest$8(config) {
2279
+ function evictSuccess(luvio, resourceParams) {
2280
+ const key = keyBuilder$8(luvio, resourceParams);
2281
+ luvio.storeEvict(key);
2282
+ }
2283
+ function createResourceRequest$7(config) {
1493
2284
  const headers = {};
1494
2285
  return {
1495
2286
  baseUri: '/services/data/v59.0',
1496
- basePath: '/connect/clm/contract-document-version/' + config.urlParams.contractDocumentVersionId + '/checkIn',
1497
- method: 'patch',
2287
+ basePath: '/connect/clm/contract-document-version/' + config.urlParams.contractDocumentVersionId + '/review',
2288
+ method: 'delete',
1498
2289
  body: null,
1499
2290
  urlParams: config.urlParams,
1500
2291
  queryParams: {},
@@ -1503,14 +2294,15 @@ function createResourceRequest$8(config) {
1503
2294
  };
1504
2295
  }
1505
2296
 
1506
- const checkIn_ConfigPropertyNames = {
1507
- displayName: 'checkIn',
2297
+ const adapterName = 'deleteContractDocumentVersionReview';
2298
+ const deleteContractDocumentVersionReview_ConfigPropertyNames = {
2299
+ displayName: 'deleteContractDocumentVersionReview',
1508
2300
  parameters: {
1509
2301
  required: ['contractDocumentVersionId'],
1510
2302
  optional: []
1511
2303
  }
1512
2304
  };
1513
- function createResourceParams$8(config) {
2305
+ function createResourceParams$7(config) {
1514
2306
  const resourceParams = {
1515
2307
  urlParams: {
1516
2308
  contractDocumentVersionId: config.contractDocumentVersionId
@@ -1518,7 +2310,7 @@ function createResourceParams$8(config) {
1518
2310
  };
1519
2311
  return resourceParams;
1520
2312
  }
1521
- function typeCheckConfig$8(untrustedConfig) {
2313
+ function typeCheckConfig$7(untrustedConfig) {
1522
2314
  const config = {};
1523
2315
  const untrustedConfig_contractDocumentVersionId = untrustedConfig.contractDocumentVersionId;
1524
2316
  if (typeof untrustedConfig_contractDocumentVersionId === 'string') {
@@ -1526,59 +2318,64 @@ function typeCheckConfig$8(untrustedConfig) {
1526
2318
  }
1527
2319
  return config;
1528
2320
  }
1529
- function validateAdapterConfig$8(untrustedConfig, configPropertyNames) {
2321
+ function validateAdapterConfig$7(untrustedConfig, configPropertyNames) {
1530
2322
  if (!untrustedIsObject(untrustedConfig)) {
1531
2323
  return null;
1532
2324
  }
1533
2325
  if (process.env.NODE_ENV !== 'production') {
1534
2326
  validateConfig(untrustedConfig, configPropertyNames);
1535
2327
  }
1536
- const config = typeCheckConfig$8(untrustedConfig);
2328
+ const config = typeCheckConfig$7(untrustedConfig);
1537
2329
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
1538
2330
  return null;
1539
2331
  }
1540
2332
  return config;
1541
2333
  }
1542
- function buildNetworkSnapshot$8(luvio, config, options) {
1543
- const resourceParams = createResourceParams$8(config);
1544
- const request = createResourceRequest$8(resourceParams);
2334
+ function buildNetworkSnapshot$7(luvio, config, options) {
2335
+ const resourceParams = createResourceParams$7(config);
2336
+ const request = createResourceRequest$7(resourceParams);
1545
2337
  return luvio.dispatchResourceRequest(request, options)
1546
- .then((response) => {
2338
+ .then(() => {
1547
2339
  return luvio.handleSuccessResponse(() => {
1548
- const snapshot = ingestSuccess$7(luvio, resourceParams, response);
1549
- return luvio.storeBroadcast().then(() => snapshot);
1550
- }, () => getResponseCacheKeys$8(luvio, resourceParams, response.body));
2340
+ evictSuccess(luvio, resourceParams);
2341
+ return luvio.storeBroadcast();
2342
+ }, () => getResponseCacheKeys$7(luvio, resourceParams));
1551
2343
  }, (response) => {
1552
2344
  deepFreeze(response);
1553
2345
  throw response;
1554
2346
  });
1555
2347
  }
1556
- const checkInAdapterFactory = (luvio) => {
1557
- return function checkIn(untrustedConfig) {
1558
- const config = validateAdapterConfig$8(untrustedConfig, checkIn_ConfigPropertyNames);
2348
+ const deleteContractDocumentVersionReviewAdapterFactory = (luvio) => {
2349
+ return function clmdeleteContractDocumentVersionReview(untrustedConfig) {
2350
+ const config = validateAdapterConfig$7(untrustedConfig, deleteContractDocumentVersionReview_ConfigPropertyNames);
1559
2351
  // Invalid or incomplete config
1560
2352
  if (config === null) {
1561
- throw new Error('Invalid config for "checkIn"');
2353
+ throw new Error(`Invalid config for "${adapterName}"`);
1562
2354
  }
1563
- return buildNetworkSnapshot$8(luvio, config);
2355
+ return buildNetworkSnapshot$7(luvio, config);
1564
2356
  };
1565
2357
  };
1566
2358
 
1567
2359
  function select$a(luvio, params) {
1568
- return select$i();
2360
+ return select$b();
1569
2361
  }
1570
- function getResponseCacheKeys$7(luvio, resourceParams, response) {
1571
- return getTypeCacheKeys$6(luvio, response);
2362
+ function keyBuilder$7(luvio, params) {
2363
+ return keyBuilder$9(luvio, {
2364
+ contractDocumentVersionId: params.urlParams.contractDocumentVersionId
2365
+ });
2366
+ }
2367
+ function getResponseCacheKeys$6(luvio, resourceParams, response) {
2368
+ return getTypeCacheKeys$4(luvio, response);
1572
2369
  }
1573
- function ingestSuccess$6(luvio, resourceParams, response) {
2370
+ function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
1574
2371
  const { body } = response;
1575
- const key = keyBuilderFromType$4(luvio, body);
1576
- luvio.storeIngest(key, ingest$6, body);
2372
+ const key = keyBuilder$7(luvio, resourceParams);
2373
+ luvio.storeIngest(key, ingest$4, body);
1577
2374
  const snapshot = luvio.storeLookup({
1578
2375
  recordId: key,
1579
2376
  node: select$a(),
1580
2377
  variables: {},
1581
- });
2378
+ }, snapshotRefresh);
1582
2379
  if (process.env.NODE_ENV !== 'production') {
1583
2380
  if (snapshot.state !== 'Fulfilled') {
1584
2381
  throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
@@ -1587,13 +2384,25 @@ function ingestSuccess$6(luvio, resourceParams, response) {
1587
2384
  deepFreeze(snapshot.data);
1588
2385
  return snapshot;
1589
2386
  }
1590
- function createResourceRequest$7(config) {
2387
+ function ingestError$2(luvio, params, error, snapshotRefresh) {
2388
+ const key = keyBuilder$7(luvio, params);
2389
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
2390
+ const storeMetadataParams = {
2391
+ ttl: TTL$3,
2392
+ namespace: keyPrefix,
2393
+ version: VERSION$4,
2394
+ representationName: RepresentationType$4
2395
+ };
2396
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
2397
+ return errorSnapshot;
2398
+ }
2399
+ function createResourceRequest$6(config) {
1591
2400
  const headers = {};
1592
2401
  return {
1593
2402
  baseUri: '/services/data/v59.0',
1594
- basePath: '/connect/clm/contract-document-version/' + config.urlParams.contractDocumentVersionId + '/checkout',
1595
- method: 'post',
1596
- body: config.body,
2403
+ basePath: '/connect/clm/contract-document-version/' + config.urlParams.contractDocumentVersionId + '/review',
2404
+ method: 'get',
2405
+ body: null,
1597
2406
  urlParams: config.urlParams,
1598
2407
  queryParams: {},
1599
2408
  headers,
@@ -1601,78 +2410,117 @@ function createResourceRequest$7(config) {
1601
2410
  };
1602
2411
  }
1603
2412
 
1604
- const checkoutContractDocumentVersion_ConfigPropertyNames = {
1605
- displayName: 'checkoutContractDocumentVersion',
2413
+ const getContractDocumentVersionReview_ConfigPropertyNames = {
2414
+ displayName: 'getContractDocumentVersionReview',
1606
2415
  parameters: {
1607
- required: ['contractDocumentVersionId', 'templateInput'],
2416
+ required: ['contractDocumentVersionId'],
1608
2417
  optional: []
1609
2418
  }
1610
2419
  };
1611
- function createResourceParams$7(config) {
2420
+ function createResourceParams$6(config) {
1612
2421
  const resourceParams = {
1613
2422
  urlParams: {
1614
2423
  contractDocumentVersionId: config.contractDocumentVersionId
1615
- },
1616
- body: {
1617
- templateInput: config.templateInput
1618
2424
  }
1619
2425
  };
1620
2426
  return resourceParams;
1621
2427
  }
1622
- function typeCheckConfig$7(untrustedConfig) {
2428
+ function keyBuilder$6(luvio, config) {
2429
+ const resourceParams = createResourceParams$6(config);
2430
+ return keyBuilder$7(luvio, resourceParams);
2431
+ }
2432
+ function typeCheckConfig$6(untrustedConfig) {
1623
2433
  const config = {};
1624
2434
  const untrustedConfig_contractDocumentVersionId = untrustedConfig.contractDocumentVersionId;
1625
2435
  if (typeof untrustedConfig_contractDocumentVersionId === 'string') {
1626
2436
  config.contractDocumentVersionId = untrustedConfig_contractDocumentVersionId;
1627
2437
  }
1628
- const untrustedConfig_templateInput = untrustedConfig.templateInput;
1629
- const referenceTemplateInputRepresentationValidationError = validate$c(untrustedConfig_templateInput);
1630
- if (referenceTemplateInputRepresentationValidationError === null) {
1631
- config.templateInput = untrustedConfig_templateInput;
1632
- }
1633
2438
  return config;
1634
2439
  }
1635
- function validateAdapterConfig$7(untrustedConfig, configPropertyNames) {
2440
+ function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
1636
2441
  if (!untrustedIsObject(untrustedConfig)) {
1637
2442
  return null;
1638
2443
  }
1639
2444
  if (process.env.NODE_ENV !== 'production') {
1640
2445
  validateConfig(untrustedConfig, configPropertyNames);
1641
2446
  }
1642
- const config = typeCheckConfig$7(untrustedConfig);
2447
+ const config = typeCheckConfig$6(untrustedConfig);
1643
2448
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
1644
2449
  return null;
1645
2450
  }
1646
2451
  return config;
1647
2452
  }
1648
- function buildNetworkSnapshot$7(luvio, config, options) {
1649
- const resourceParams = createResourceParams$7(config);
1650
- const request = createResourceRequest$7(resourceParams);
2453
+ function adapterFragment$2(luvio, config) {
2454
+ createResourceParams$6(config);
2455
+ return select$a();
2456
+ }
2457
+ function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
2458
+ const snapshot = ingestSuccess$6(luvio, resourceParams, response, {
2459
+ config,
2460
+ resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
2461
+ });
2462
+ return luvio.storeBroadcast().then(() => snapshot);
2463
+ }
2464
+ function onFetchResponseError$2(luvio, config, resourceParams, response) {
2465
+ const snapshot = ingestError$2(luvio, resourceParams, response, {
2466
+ config,
2467
+ resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
2468
+ });
2469
+ return luvio.storeBroadcast().then(() => snapshot);
2470
+ }
2471
+ function buildNetworkSnapshot$6(luvio, config, options) {
2472
+ const resourceParams = createResourceParams$6(config);
2473
+ const request = createResourceRequest$6(resourceParams);
1651
2474
  return luvio.dispatchResourceRequest(request, options)
1652
2475
  .then((response) => {
1653
- return luvio.handleSuccessResponse(() => {
1654
- const snapshot = ingestSuccess$6(luvio, resourceParams, response);
1655
- return luvio.storeBroadcast().then(() => snapshot);
1656
- }, () => getResponseCacheKeys$7(luvio, resourceParams, response.body));
2476
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => getResponseCacheKeys$6(luvio, resourceParams, response.body));
1657
2477
  }, (response) => {
1658
- deepFreeze(response);
1659
- throw response;
2478
+ return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
1660
2479
  });
1661
2480
  }
1662
- const checkoutContractDocumentVersionAdapterFactory = (luvio) => {
1663
- return function checkoutContractDocumentVersion(untrustedConfig) {
1664
- const config = validateAdapterConfig$7(untrustedConfig, checkoutContractDocumentVersion_ConfigPropertyNames);
1665
- // Invalid or incomplete config
1666
- if (config === null) {
1667
- throw new Error('Invalid config for "checkoutContractDocumentVersion"');
1668
- }
1669
- return buildNetworkSnapshot$7(luvio, config);
2481
+ function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
2482
+ const { luvio, config } = context;
2483
+ const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
2484
+ const dispatchOptions = {
2485
+ resourceRequestContext: {
2486
+ requestCorrelator,
2487
+ luvioRequestMethod: undefined,
2488
+ },
2489
+ eventObservers
2490
+ };
2491
+ if (networkPriority !== 'normal') {
2492
+ dispatchOptions.overrides = {
2493
+ priority: networkPriority
2494
+ };
2495
+ }
2496
+ return buildNetworkSnapshot$6(luvio, config, dispatchOptions);
2497
+ }
2498
+ function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
2499
+ const { luvio, config } = context;
2500
+ const selector = {
2501
+ recordId: keyBuilder$6(luvio, config),
2502
+ node: adapterFragment$2(luvio, config),
2503
+ variables: {},
1670
2504
  };
2505
+ const cacheSnapshot = storeLookup(selector, {
2506
+ config,
2507
+ resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
2508
+ });
2509
+ return cacheSnapshot;
2510
+ }
2511
+ const getContractDocumentVersionReviewAdapterFactory = (luvio) => function clm__getContractDocumentVersionReview(untrustedConfig, requestContext) {
2512
+ const config = validateAdapterConfig$6(untrustedConfig, getContractDocumentVersionReview_ConfigPropertyNames);
2513
+ // Invalid or incomplete config
2514
+ if (config === null) {
2515
+ return null;
2516
+ }
2517
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
2518
+ buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
1671
2519
  };
1672
2520
 
1673
2521
  const TTL$2 = 60000;
1674
- const VERSION$3 = "dce4365dead9ca97204892d274fbf1b7";
1675
- function validate$5(obj, path = 'ContentDocumentListRepresentation') {
2522
+ const VERSION$3 = "3fc04cc25ff88aa934ddc7949757f34d";
2523
+ function validate$5(obj, path = 'ContractDocumentVersionReviewOutputRepresentation') {
1676
2524
  const v_error = (() => {
1677
2525
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1678
2526
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -1682,40 +2530,33 @@ function validate$5(obj, path = 'ContentDocumentListRepresentation') {
1682
2530
  if (typeof obj_contractDocumentVersionId !== 'string') {
1683
2531
  return new TypeError('Expected "string" but received "' + typeof obj_contractDocumentVersionId + '" (at "' + path_contractDocumentVersionId + '")');
1684
2532
  }
1685
- if (obj.data !== undefined) {
1686
- const obj_data = obj.data;
1687
- const path_data = path + '.data';
1688
- if (!ArrayIsArray(obj_data)) {
1689
- return new TypeError('Expected "array" but received "' + typeof obj_data + '" (at "' + path_data + '")');
1690
- }
1691
- for (let i = 0; i < obj_data.length; i++) {
1692
- const obj_data_item = obj_data[i];
1693
- const path_data_item = path_data + '[' + i + ']';
1694
- const referencepath_data_itemValidationError = validate$b(obj_data_item, path_data_item);
1695
- if (referencepath_data_itemValidationError !== null) {
1696
- let message = 'Object doesn\'t match ContentDocumentRepresentation (at "' + path_data_item + '")\n';
1697
- message += referencepath_data_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1698
- return new TypeError(message);
1699
- }
1700
- }
2533
+ const obj_isSuccess = obj.isSuccess;
2534
+ const path_isSuccess = path + '.isSuccess';
2535
+ if (typeof obj_isSuccess !== 'boolean') {
2536
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isSuccess + '" (at "' + path_isSuccess + '")');
2537
+ }
2538
+ const obj_message = obj.message;
2539
+ const path_message = path + '.message';
2540
+ if (typeof obj_message !== 'string') {
2541
+ return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
1701
2542
  }
1702
2543
  })();
1703
2544
  return v_error === undefined ? null : v_error;
1704
2545
  }
1705
- const RepresentationType$3 = 'ContentDocumentListRepresentation';
1706
- function keyBuilder$8(luvio, config) {
2546
+ const RepresentationType$3 = 'ContractDocumentVersionReviewOutputRepresentation';
2547
+ function keyBuilder$5(luvio, config) {
1707
2548
  return keyPrefix + '::' + RepresentationType$3 + ':' + config.contractDocumentVersionId;
1708
2549
  }
1709
2550
  function keyBuilderFromType$1(luvio, object) {
1710
2551
  const keyParams = {
1711
2552
  contractDocumentVersionId: object.contractDocumentVersionId
1712
2553
  };
1713
- return keyBuilder$8(luvio, keyParams);
2554
+ return keyBuilder$5(luvio, keyParams);
1714
2555
  }
1715
2556
  function normalize$3(input, existing, path, luvio, store, timestamp) {
1716
2557
  return input;
1717
2558
  }
1718
- const select$9 = function ContentDocumentListRepresentationSelect() {
2559
+ const select$9 = function ContractDocumentVersionReviewOutputRepresentationSelect() {
1719
2560
  return {
1720
2561
  kind: 'Fragment',
1721
2562
  version: VERSION$3,
@@ -1729,7 +2570,7 @@ function equals$3(existing, incoming) {
1729
2570
  }
1730
2571
  return true;
1731
2572
  }
1732
- const ingest$3 = function ContentDocumentListRepresentationIngest(input, path, luvio, store, timestamp) {
2573
+ const ingest$3 = function ContractDocumentVersionReviewOutputRepresentationIngest(input, path, luvio, store, timestamp) {
1733
2574
  if (process.env.NODE_ENV !== 'production') {
1734
2575
  const validateError = validate$5(input);
1735
2576
  if (validateError !== null) {
@@ -1771,128 +2612,21 @@ function getTypeCacheKeys$3(luvio, input, fullPathFactory) {
1771
2612
  return rootKeySet;
1772
2613
  }
1773
2614
 
1774
- function keyBuilder$7(luvio, params) {
1775
- return keyBuilder$8(luvio, {
1776
- contractDocumentVersionId: params.urlParams.contractDocumentVersionId
1777
- });
1778
- }
1779
- function getResponseCacheKeys$6(luvio, resourceParams) {
1780
- const key = keyBuilder$7(luvio, resourceParams);
1781
- const cacheKeyMap = new StoreKeyMap();
1782
- cacheKeyMap.set(key, {
1783
- namespace: keyPrefix,
1784
- representationName: RepresentationType$3,
1785
- mergeable: false
1786
- });
1787
- return cacheKeyMap;
1788
- }
1789
- function evictSuccess(luvio, resourceParams) {
1790
- const key = keyBuilder$7(luvio, resourceParams);
1791
- luvio.storeEvict(key);
1792
- }
1793
- function createResourceRequest$6(config) {
1794
- const headers = {};
1795
- return {
1796
- baseUri: '/services/data/v59.0',
1797
- basePath: '/connect/clm/contract-document-version/' + config.urlParams.contractDocumentVersionId + '/content-documents',
1798
- method: 'delete',
1799
- body: null,
1800
- urlParams: config.urlParams,
1801
- queryParams: config.queryParams,
1802
- headers,
1803
- priority: 'normal',
1804
- };
1805
- }
1806
-
1807
- const adapterName = 'deleteAttachment';
1808
- const deleteAttachment_ConfigPropertyNames = {
1809
- displayName: 'deleteAttachment',
1810
- parameters: {
1811
- required: ['contractDocumentVersionId'],
1812
- optional: ['contentDocumentId']
1813
- }
1814
- };
1815
- function createResourceParams$6(config) {
1816
- const resourceParams = {
1817
- urlParams: {
1818
- contractDocumentVersionId: config.contractDocumentVersionId
1819
- },
1820
- queryParams: {
1821
- contentDocumentId: config.contentDocumentId
1822
- }
1823
- };
1824
- return resourceParams;
1825
- }
1826
- function typeCheckConfig$6(untrustedConfig) {
1827
- const config = {};
1828
- const untrustedConfig_contractDocumentVersionId = untrustedConfig.contractDocumentVersionId;
1829
- if (typeof untrustedConfig_contractDocumentVersionId === 'string') {
1830
- config.contractDocumentVersionId = untrustedConfig_contractDocumentVersionId;
1831
- }
1832
- const untrustedConfig_contentDocumentId = untrustedConfig.contentDocumentId;
1833
- if (typeof untrustedConfig_contentDocumentId === 'string') {
1834
- config.contentDocumentId = untrustedConfig_contentDocumentId;
1835
- }
1836
- return config;
1837
- }
1838
- function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
1839
- if (!untrustedIsObject(untrustedConfig)) {
1840
- return null;
1841
- }
1842
- if (process.env.NODE_ENV !== 'production') {
1843
- validateConfig(untrustedConfig, configPropertyNames);
1844
- }
1845
- const config = typeCheckConfig$6(untrustedConfig);
1846
- if (!areRequiredParametersPresent(config, configPropertyNames)) {
1847
- return null;
1848
- }
1849
- return config;
1850
- }
1851
- function buildNetworkSnapshot$6(luvio, config, options) {
1852
- const resourceParams = createResourceParams$6(config);
1853
- const request = createResourceRequest$6(resourceParams);
1854
- return luvio.dispatchResourceRequest(request, options)
1855
- .then(() => {
1856
- return luvio.handleSuccessResponse(() => {
1857
- evictSuccess(luvio, resourceParams);
1858
- return luvio.storeBroadcast();
1859
- }, () => getResponseCacheKeys$6(luvio, resourceParams));
1860
- }, (response) => {
1861
- deepFreeze(response);
1862
- throw response;
1863
- });
1864
- }
1865
- const deleteAttachmentAdapterFactory = (luvio) => {
1866
- return function clmdeleteAttachment(untrustedConfig) {
1867
- const config = validateAdapterConfig$6(untrustedConfig, deleteAttachment_ConfigPropertyNames);
1868
- // Invalid or incomplete config
1869
- if (config === null) {
1870
- throw new Error(`Invalid config for "${adapterName}"`);
1871
- }
1872
- return buildNetworkSnapshot$6(luvio, config);
1873
- };
1874
- };
1875
-
1876
2615
  function select$8(luvio, params) {
1877
2616
  return select$9();
1878
2617
  }
1879
- function keyBuilder$6(luvio, params) {
1880
- return keyBuilder$8(luvio, {
1881
- contractDocumentVersionId: params.urlParams.contractDocumentVersionId
1882
- });
1883
- }
1884
2618
  function getResponseCacheKeys$5(luvio, resourceParams, response) {
1885
2619
  return getTypeCacheKeys$3(luvio, response);
1886
2620
  }
1887
- function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
2621
+ function ingestSuccess$5(luvio, resourceParams, response) {
1888
2622
  const { body } = response;
1889
- const key = keyBuilder$6(luvio, resourceParams);
2623
+ const key = keyBuilderFromType$1(luvio, body);
1890
2624
  luvio.storeIngest(key, ingest$3, body);
1891
2625
  const snapshot = luvio.storeLookup({
1892
2626
  recordId: key,
1893
2627
  node: select$8(),
1894
2628
  variables: {},
1895
- }, snapshotRefresh);
2629
+ });
1896
2630
  if (process.env.NODE_ENV !== 'production') {
1897
2631
  if (snapshot.state !== 'Fulfilled') {
1898
2632
  throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
@@ -1901,25 +2635,13 @@ function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
1901
2635
  deepFreeze(snapshot.data);
1902
2636
  return snapshot;
1903
2637
  }
1904
- function ingestError$2(luvio, params, error, snapshotRefresh) {
1905
- const key = keyBuilder$6(luvio, params);
1906
- const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1907
- const storeMetadataParams = {
1908
- ttl: TTL$2,
1909
- namespace: keyPrefix,
1910
- version: VERSION$3,
1911
- representationName: RepresentationType$3
1912
- };
1913
- luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
1914
- return errorSnapshot;
1915
- }
1916
2638
  function createResourceRequest$5(config) {
1917
2639
  const headers = {};
1918
2640
  return {
1919
2641
  baseUri: '/services/data/v59.0',
1920
- basePath: '/connect/clm/contract-document-version/' + config.urlParams.contractDocumentVersionId + '/content-documents',
1921
- method: 'get',
1922
- body: null,
2642
+ basePath: '/connect/clm/contract-document-version/' + config.urlParams.contractDocumentVersionId + '/review',
2643
+ method: 'patch',
2644
+ body: config.body,
1923
2645
  urlParams: config.urlParams,
1924
2646
  queryParams: {},
1925
2647
  headers,
@@ -1927,10 +2649,10 @@ function createResourceRequest$5(config) {
1927
2649
  };
1928
2650
  }
1929
2651
 
1930
- const getContentDocument_ConfigPropertyNames = {
1931
- displayName: 'getContentDocument',
2652
+ const patchContractDocumentVersionReview_ConfigPropertyNames = {
2653
+ displayName: 'patchContractDocumentVersionReview',
1932
2654
  parameters: {
1933
- required: ['contractDocumentVersionId'],
2655
+ required: ['contractDocumentVersionId', 'reviewers', 'sendEmailNotification'],
1934
2656
  optional: []
1935
2657
  }
1936
2658
  };
@@ -1938,20 +2660,37 @@ function createResourceParams$5(config) {
1938
2660
  const resourceParams = {
1939
2661
  urlParams: {
1940
2662
  contractDocumentVersionId: config.contractDocumentVersionId
2663
+ },
2664
+ body: {
2665
+ reviewers: config.reviewers, sendEmailNotification: config.sendEmailNotification
1941
2666
  }
1942
2667
  };
1943
2668
  return resourceParams;
1944
2669
  }
1945
- function keyBuilder$5(luvio, config) {
1946
- const resourceParams = createResourceParams$5(config);
1947
- return keyBuilder$6(luvio, resourceParams);
1948
- }
1949
2670
  function typeCheckConfig$5(untrustedConfig) {
1950
2671
  const config = {};
1951
2672
  const untrustedConfig_contractDocumentVersionId = untrustedConfig.contractDocumentVersionId;
1952
2673
  if (typeof untrustedConfig_contractDocumentVersionId === 'string') {
1953
2674
  config.contractDocumentVersionId = untrustedConfig_contractDocumentVersionId;
1954
2675
  }
2676
+ const untrustedConfig_reviewers = untrustedConfig.reviewers;
2677
+ if (ArrayIsArray$1(untrustedConfig_reviewers)) {
2678
+ const untrustedConfig_reviewers_array = [];
2679
+ for (let i = 0, arrayLength = untrustedConfig_reviewers.length; i < arrayLength; i++) {
2680
+ const untrustedConfig_reviewers_item = untrustedConfig_reviewers[i];
2681
+ if (untrustedIsObject(untrustedConfig_reviewers_item)) {
2682
+ const untrustedConfig_reviewers_item_object = {};
2683
+ if (untrustedConfig_reviewers_item_object !== undefined && Object.keys(untrustedConfig_reviewers_item_object).length >= 0) {
2684
+ untrustedConfig_reviewers_array.push(untrustedConfig_reviewers_item_object);
2685
+ }
2686
+ }
2687
+ }
2688
+ config.reviewers = untrustedConfig_reviewers_array;
2689
+ }
2690
+ const untrustedConfig_sendEmailNotification = untrustedConfig.sendEmailNotification;
2691
+ if (typeof untrustedConfig_sendEmailNotification === 'boolean') {
2692
+ config.sendEmailNotification = untrustedConfig_sendEmailNotification;
2693
+ }
1955
2694
  return config;
1956
2695
  }
1957
2696
  function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
@@ -1967,84 +2706,41 @@ function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
1967
2706
  }
1968
2707
  return config;
1969
2708
  }
1970
- function adapterFragment$2(luvio, config) {
1971
- createResourceParams$5(config);
1972
- return select$8();
1973
- }
1974
- function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
1975
- const snapshot = ingestSuccess$5(luvio, resourceParams, response, {
1976
- config,
1977
- resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
1978
- });
1979
- return luvio.storeBroadcast().then(() => snapshot);
1980
- }
1981
- function onFetchResponseError$2(luvio, config, resourceParams, response) {
1982
- const snapshot = ingestError$2(luvio, resourceParams, response, {
1983
- config,
1984
- resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
1985
- });
1986
- return luvio.storeBroadcast().then(() => snapshot);
1987
- }
1988
2709
  function buildNetworkSnapshot$5(luvio, config, options) {
1989
2710
  const resourceParams = createResourceParams$5(config);
1990
2711
  const request = createResourceRequest$5(resourceParams);
1991
2712
  return luvio.dispatchResourceRequest(request, options)
1992
2713
  .then((response) => {
1993
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => getResponseCacheKeys$5(luvio, resourceParams, response.body));
2714
+ return luvio.handleSuccessResponse(() => {
2715
+ const snapshot = ingestSuccess$5(luvio, resourceParams, response);
2716
+ return luvio.storeBroadcast().then(() => snapshot);
2717
+ }, () => getResponseCacheKeys$5(luvio, resourceParams, response.body));
1994
2718
  }, (response) => {
1995
- return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
2719
+ deepFreeze(response);
2720
+ throw response;
1996
2721
  });
1997
2722
  }
1998
- function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
1999
- const { luvio, config } = context;
2000
- const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
2001
- const dispatchOptions = {
2002
- resourceRequestContext: {
2003
- requestCorrelator,
2004
- luvioRequestMethod: undefined,
2005
- },
2006
- eventObservers
2007
- };
2008
- if (networkPriority !== 'normal') {
2009
- dispatchOptions.overrides = {
2010
- priority: networkPriority
2011
- };
2012
- }
2013
- return buildNetworkSnapshot$5(luvio, config, dispatchOptions);
2014
- }
2015
- function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
2016
- const { luvio, config } = context;
2017
- const selector = {
2018
- recordId: keyBuilder$5(luvio, config),
2019
- node: adapterFragment$2(luvio, config),
2020
- variables: {},
2723
+ const patchContractDocumentVersionReviewAdapterFactory = (luvio) => {
2724
+ return function patchContractDocumentVersionReview(untrustedConfig) {
2725
+ const config = validateAdapterConfig$5(untrustedConfig, patchContractDocumentVersionReview_ConfigPropertyNames);
2726
+ // Invalid or incomplete config
2727
+ if (config === null) {
2728
+ throw new Error('Invalid config for "patchContractDocumentVersionReview"');
2729
+ }
2730
+ return buildNetworkSnapshot$5(luvio, config);
2021
2731
  };
2022
- const cacheSnapshot = storeLookup(selector, {
2023
- config,
2024
- resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
2025
- });
2026
- return cacheSnapshot;
2027
- }
2028
- const getContentDocumentAdapterFactory = (luvio) => function clm__getContentDocument(untrustedConfig, requestContext) {
2029
- const config = validateAdapterConfig$5(untrustedConfig, getContentDocument_ConfigPropertyNames);
2030
- // Invalid or incomplete config
2031
- if (config === null) {
2032
- return null;
2033
- }
2034
- return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
2035
- buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
2036
2732
  };
2037
2733
 
2038
2734
  function select$7(luvio, params) {
2039
- return select$g();
2735
+ return select$9();
2040
2736
  }
2041
2737
  function getResponseCacheKeys$4(luvio, resourceParams, response) {
2042
- return getTypeCacheKeys$5(luvio, response);
2738
+ return getTypeCacheKeys$3(luvio, response);
2043
2739
  }
2044
2740
  function ingestSuccess$4(luvio, resourceParams, response) {
2045
2741
  const { body } = response;
2046
- const key = keyBuilderFromType$3(luvio, body);
2047
- luvio.storeIngest(key, ingest$5, body);
2742
+ const key = keyBuilderFromType$1(luvio, body);
2743
+ luvio.storeIngest(key, ingest$3, body);
2048
2744
  const snapshot = luvio.storeLookup({
2049
2745
  recordId: key,
2050
2746
  node: select$7(),
@@ -2062,9 +2758,9 @@ function createResourceRequest$4(config) {
2062
2758
  const headers = {};
2063
2759
  return {
2064
2760
  baseUri: '/services/data/v59.0',
2065
- basePath: '/connect/clm/contract-document-version/' + config.urlParams.contractDocumentVersionId + '/lock',
2066
- method: 'patch',
2067
- body: null,
2761
+ basePath: '/connect/clm/contract-document-version/' + config.urlParams.contractDocumentVersionId + '/review',
2762
+ method: 'post',
2763
+ body: config.body,
2068
2764
  urlParams: config.urlParams,
2069
2765
  queryParams: {},
2070
2766
  headers,
@@ -2072,10 +2768,10 @@ function createResourceRequest$4(config) {
2072
2768
  };
2073
2769
  }
2074
2770
 
2075
- const lockContractDocumentVersion_ConfigPropertyNames = {
2076
- displayName: 'lockContractDocumentVersion',
2771
+ const postContractDocumentVersionReview_ConfigPropertyNames = {
2772
+ displayName: 'postContractDocumentVersionReview',
2077
2773
  parameters: {
2078
- required: ['contractDocumentVersionId'],
2774
+ required: ['contractDocumentVersionId', 'reviewers', 'sendEmailNotification'],
2079
2775
  optional: []
2080
2776
  }
2081
2777
  };
@@ -2083,6 +2779,9 @@ function createResourceParams$4(config) {
2083
2779
  const resourceParams = {
2084
2780
  urlParams: {
2085
2781
  contractDocumentVersionId: config.contractDocumentVersionId
2782
+ },
2783
+ body: {
2784
+ reviewers: config.reviewers, sendEmailNotification: config.sendEmailNotification
2086
2785
  }
2087
2786
  };
2088
2787
  return resourceParams;
@@ -2093,6 +2792,24 @@ function typeCheckConfig$4(untrustedConfig) {
2093
2792
  if (typeof untrustedConfig_contractDocumentVersionId === 'string') {
2094
2793
  config.contractDocumentVersionId = untrustedConfig_contractDocumentVersionId;
2095
2794
  }
2795
+ const untrustedConfig_reviewers = untrustedConfig.reviewers;
2796
+ if (ArrayIsArray$1(untrustedConfig_reviewers)) {
2797
+ const untrustedConfig_reviewers_array = [];
2798
+ for (let i = 0, arrayLength = untrustedConfig_reviewers.length; i < arrayLength; i++) {
2799
+ const untrustedConfig_reviewers_item = untrustedConfig_reviewers[i];
2800
+ if (untrustedIsObject(untrustedConfig_reviewers_item)) {
2801
+ const untrustedConfig_reviewers_item_object = {};
2802
+ if (untrustedConfig_reviewers_item_object !== undefined && Object.keys(untrustedConfig_reviewers_item_object).length >= 0) {
2803
+ untrustedConfig_reviewers_array.push(untrustedConfig_reviewers_item_object);
2804
+ }
2805
+ }
2806
+ }
2807
+ config.reviewers = untrustedConfig_reviewers_array;
2808
+ }
2809
+ const untrustedConfig_sendEmailNotification = untrustedConfig.sendEmailNotification;
2810
+ if (typeof untrustedConfig_sendEmailNotification === 'boolean') {
2811
+ config.sendEmailNotification = untrustedConfig_sendEmailNotification;
2812
+ }
2096
2813
  return config;
2097
2814
  }
2098
2815
  function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
@@ -2122,27 +2839,27 @@ function buildNetworkSnapshot$4(luvio, config, options) {
2122
2839
  throw response;
2123
2840
  });
2124
2841
  }
2125
- const lockContractDocumentVersionAdapterFactory = (luvio) => {
2126
- return function lockContractDocumentVersion(untrustedConfig) {
2127
- const config = validateAdapterConfig$4(untrustedConfig, lockContractDocumentVersion_ConfigPropertyNames);
2842
+ const postContractDocumentVersionReviewAdapterFactory = (luvio) => {
2843
+ return function postContractDocumentVersionReview(untrustedConfig) {
2844
+ const config = validateAdapterConfig$4(untrustedConfig, postContractDocumentVersionReview_ConfigPropertyNames);
2128
2845
  // Invalid or incomplete config
2129
2846
  if (config === null) {
2130
- throw new Error('Invalid config for "lockContractDocumentVersion"');
2847
+ throw new Error('Invalid config for "postContractDocumentVersionReview"');
2131
2848
  }
2132
2849
  return buildNetworkSnapshot$4(luvio, config);
2133
2850
  };
2134
2851
  };
2135
2852
 
2136
2853
  function select$6(luvio, params) {
2137
- return select$g();
2854
+ return select$q();
2138
2855
  }
2139
2856
  function getResponseCacheKeys$3(luvio, resourceParams, response) {
2140
- return getTypeCacheKeys$5(luvio, response);
2857
+ return getTypeCacheKeys$9(luvio, response);
2141
2858
  }
2142
2859
  function ingestSuccess$3(luvio, resourceParams, response) {
2143
2860
  const { body } = response;
2144
- const key = keyBuilderFromType$3(luvio, body);
2145
- luvio.storeIngest(key, ingest$5, body);
2861
+ const key = keyBuilderFromType$6(luvio, body);
2862
+ luvio.storeIngest(key, ingest$9, body);
2146
2863
  const snapshot = luvio.storeLookup({
2147
2864
  recordId: key,
2148
2865
  node: select$6(),
@@ -2246,7 +2963,7 @@ function validate$4(obj, path = 'DocumentGenerationProcessStatusRepresentation')
2246
2963
  for (let i = 0; i < obj_contentDocuments.length; i++) {
2247
2964
  const obj_contentDocuments_item = obj_contentDocuments[i];
2248
2965
  const path_contentDocuments_item = path_contentDocuments + '[' + i + ']';
2249
- const referencepath_contentDocuments_itemValidationError = validate$b(obj_contentDocuments_item, path_contentDocuments_item);
2966
+ const referencepath_contentDocuments_itemValidationError = validate$c(obj_contentDocuments_item, path_contentDocuments_item);
2250
2967
  if (referencepath_contentDocuments_itemValidationError !== null) {
2251
2968
  let message = 'Object doesn\'t match ContentDocumentRepresentation (at "' + path_contentDocuments_item + '")\n';
2252
2969
  message += referencepath_contentDocuments_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -2302,7 +3019,7 @@ function normalize$2(input, existing, path, luvio, store, timestamp) {
2302
3019
  return input;
2303
3020
  }
2304
3021
  const select$5 = function DocumentGenerationProcessStatusRepresentationSelect() {
2305
- const { selections: ContentDocumentRepresentation__selections, opaque: ContentDocumentRepresentation__opaque, } = select$j();
3022
+ const { selections: ContentDocumentRepresentation__selections, opaque: ContentDocumentRepresentation__opaque, } = select$m();
2306
3023
  return {
2307
3024
  kind: 'Fragment',
2308
3025
  version: VERSION$2,
@@ -2428,7 +3145,7 @@ function equals$2(existing, incoming) {
2428
3145
  return false;
2429
3146
  }
2430
3147
  const equals_contentDocuments_items = equalsArray(existing_contentDocuments, incoming_contentDocuments, (existing_contentDocuments_item, incoming_contentDocuments_item) => {
2431
- if (!(equals$7(existing_contentDocuments_item, incoming_contentDocuments_item))) {
3148
+ if (!(equals$8(existing_contentDocuments_item, incoming_contentDocuments_item))) {
2432
3149
  return false;
2433
3150
  }
2434
3151
  });
@@ -2771,7 +3488,7 @@ function select$2(luvio, params) {
2771
3488
  return select$3();
2772
3489
  }
2773
3490
  function keyBuilder$2(luvio, params) {
2774
- return keyPrefix + '::TemplateListRepresentation:(' + 'isActive:' + params.queryParams.isActive + ',' + 'type:' + params.queryParams.type + ',' + 'usageType:' + params.queryParams.usageType + ',' + 'contractId:' + params.queryParams.contractId + ',' + 'documentTemplateTypes:' + params.queryParams.documentTemplateTypes + ')';
3491
+ return keyPrefix + '::TemplateListRepresentation:(' + 'contractId:' + params.queryParams.contractId + ',' + 'documentTemplateTypes:' + params.queryParams.documentTemplateTypes + ',' + 'isActive:' + params.queryParams.isActive + ',' + 'type:' + params.queryParams.type + ',' + 'usageType:' + params.queryParams.usageType + ')';
2775
3492
  }
2776
3493
  function getResponseCacheKeys$1(luvio, resourceParams, response) {
2777
3494
  return getTypeCacheKeys$1(luvio, response, () => keyBuilder$2(luvio, resourceParams));
@@ -2823,13 +3540,13 @@ const getTemplates_ConfigPropertyNames = {
2823
3540
  displayName: 'getTemplates',
2824
3541
  parameters: {
2825
3542
  required: [],
2826
- optional: ['isActive', 'type', 'usageType', 'contractId', 'documentTemplateTypes']
3543
+ optional: ['contractId', 'documentTemplateTypes', 'isActive', 'type', 'usageType']
2827
3544
  }
2828
3545
  };
2829
3546
  function createResourceParams$1(config) {
2830
3547
  const resourceParams = {
2831
3548
  queryParams: {
2832
- isActive: config.isActive, type: config.type, usageType: config.usageType, contractId: config.contractId, documentTemplateTypes: config.documentTemplateTypes
3549
+ contractId: config.contractId, documentTemplateTypes: config.documentTemplateTypes, isActive: config.isActive, type: config.type, usageType: config.usageType
2833
3550
  }
2834
3551
  };
2835
3552
  return resourceParams;
@@ -2840,18 +3557,6 @@ function keyBuilder$1(luvio, config) {
2840
3557
  }
2841
3558
  function typeCheckConfig$1(untrustedConfig) {
2842
3559
  const config = {};
2843
- const untrustedConfig_isActive = untrustedConfig.isActive;
2844
- if (typeof untrustedConfig_isActive === 'boolean') {
2845
- config.isActive = untrustedConfig_isActive;
2846
- }
2847
- const untrustedConfig_type = untrustedConfig.type;
2848
- if (typeof untrustedConfig_type === 'string') {
2849
- config.type = untrustedConfig_type;
2850
- }
2851
- const untrustedConfig_usageType = untrustedConfig.usageType;
2852
- if (typeof untrustedConfig_usageType === 'string') {
2853
- config.usageType = untrustedConfig_usageType;
2854
- }
2855
3560
  const untrustedConfig_contractId = untrustedConfig.contractId;
2856
3561
  if (typeof untrustedConfig_contractId === 'string') {
2857
3562
  config.contractId = untrustedConfig_contractId;
@@ -2867,6 +3572,18 @@ function typeCheckConfig$1(untrustedConfig) {
2867
3572
  }
2868
3573
  config.documentTemplateTypes = untrustedConfig_documentTemplateTypes_array;
2869
3574
  }
3575
+ const untrustedConfig_isActive = untrustedConfig.isActive;
3576
+ if (typeof untrustedConfig_isActive === 'boolean') {
3577
+ config.isActive = untrustedConfig_isActive;
3578
+ }
3579
+ const untrustedConfig_type = untrustedConfig.type;
3580
+ if (typeof untrustedConfig_type === 'string') {
3581
+ config.type = untrustedConfig_type;
3582
+ }
3583
+ const untrustedConfig_usageType = untrustedConfig.usageType;
3584
+ if (typeof untrustedConfig_usageType === 'string') {
3585
+ config.usageType = untrustedConfig_usageType;
3586
+ }
2870
3587
  return config;
2871
3588
  }
2872
3589
  function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
@@ -3159,4 +3876,4 @@ const saveExternalDocumentAdapterFactory = (luvio) => {
3159
3876
  };
3160
3877
  };
3161
3878
 
3162
- export { checkInAdapterFactory, checkoutContractDocumentVersionAdapterFactory, createContractDocumentVersionAndInitializeGenerateDocumentProcessAdapterFactory, deleteAttachmentAdapterFactory, executeContractActionAdapterFactory, getContentDocumentAdapterFactory, getContractActionsAdapterFactory, getContractDocumentVersionAdapterFactory, getDocumentGenerationProcessDetailsAdapterFactory, getTemplatesAdapterFactory, lockContractDocumentVersionAdapterFactory, saveExternalDocumentAdapterFactory, unlockAdapterFactory, updateContractDocumentVersionWithTemplateAdapterFactory };
3879
+ export { checkInAdapterFactory, checkoutContractDocumentVersionAdapterFactory, createContractDocumentVersionAndInitializeGenerateDocumentProcessAdapterFactory, deleteAttachmentAdapterFactory, deleteContractDocumentVersionReviewAdapterFactory, executeContractActionAdapterFactory, getContentDocumentAdapterFactory, getContractActionsAdapterFactory, getContractDocumentVersionAdapterFactory, getContractDocumentVersionReviewAdapterFactory, getDocumentGenerationProcessDetailsAdapterFactory, getTemplatesAdapterFactory, lockContractDocumentVersionAdapterFactory, patchContractDocumentVersionReviewAdapterFactory, postContractDocumentVersionReviewAdapterFactory, saveExternalDocumentAdapterFactory, unlockAdapterFactory, updateContractDocumentVersionWithTemplateAdapterFactory };