@salesforce/lds-adapters-industries-explainability 1.299.0 → 1.301.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,7 +4,7 @@
4
4
  * For full license text, see the LICENSE.txt file
5
5
  */
6
6
 
7
- import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$1, typeCheckConfig as typeCheckConfig$2, StoreKeyMap, createResourceParams as createResourceParams$2 } from '@luvio/engine';
7
+ import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$2, typeCheckConfig as typeCheckConfig$3, StoreKeyMap, createResourceParams as createResourceParams$3 } from '@luvio/engine';
8
8
 
9
9
  const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
10
10
  const { keys: ObjectKeys, create: ObjectCreate } = Object;
@@ -79,7 +79,7 @@ function createLink(ref) {
79
79
  };
80
80
  }
81
81
 
82
- function validate$3(obj, path = 'ExplainabilityActionLogDetailRepresentation') {
82
+ function validate$4(obj, path = 'ExplainabilityActionLogDetailRepresentation') {
83
83
  const v_error = (() => {
84
84
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
85
85
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -103,6 +103,11 @@ function validate$3(obj, path = 'ExplainabilityActionLogDetailRepresentation') {
103
103
  return new TypeError('Expected "string" but received "' + typeof obj_additionalFilter + '" (at "' + path_additionalFilter + '")');
104
104
  }
105
105
  }
106
+ const obj_applicationLogCalenderDate = obj.applicationLogCalenderDate;
107
+ const path_applicationLogCalenderDate = path + '.applicationLogCalenderDate';
108
+ if (typeof obj_applicationLogCalenderDate !== 'string') {
109
+ return new TypeError('Expected "string" but received "' + typeof obj_applicationLogCalenderDate + '" (at "' + path_applicationLogCalenderDate + '")');
110
+ }
106
111
  const obj_applicationLogDate = obj.applicationLogDate;
107
112
  const path_applicationLogDate = path + '.applicationLogDate';
108
113
  if (typeof obj_applicationLogDate !== 'string') {
@@ -161,9 +166,9 @@ function validate$3(obj, path = 'ExplainabilityActionLogDetailRepresentation') {
161
166
  return v_error === undefined ? null : v_error;
162
167
  }
163
168
 
164
- const TTL$1 = 10000;
165
- const VERSION$1 = "d0452c2b6e53e2a843a03bf30a275e18";
166
- function validate$2(obj, path = 'ExplainabilityActionLogsRepresentation') {
169
+ const TTL$2 = 10000;
170
+ const VERSION$2 = "d0452c2b6e53e2a843a03bf30a275e18";
171
+ function validate$3(obj, path = 'ExplainabilityActionLogsRepresentation') {
167
172
  const v_error = (() => {
168
173
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
169
174
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -176,7 +181,7 @@ function validate$2(obj, path = 'ExplainabilityActionLogsRepresentation') {
176
181
  for (let i = 0; i < obj_actionLogs.length; i++) {
177
182
  const obj_actionLogs_item = obj_actionLogs[i];
178
183
  const path_actionLogs_item = path_actionLogs + '[' + i + ']';
179
- const referencepath_actionLogs_itemValidationError = validate$3(obj_actionLogs_item, path_actionLogs_item);
184
+ const referencepath_actionLogs_itemValidationError = validate$4(obj_actionLogs_item, path_actionLogs_item);
180
185
  if (referencepath_actionLogs_itemValidationError !== null) {
181
186
  let message = 'Object doesn\'t match ExplainabilityActionLogDetailRepresentation (at "' + path_actionLogs_item + '")\n';
182
187
  message += referencepath_actionLogs_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -193,62 +198,62 @@ function validate$2(obj, path = 'ExplainabilityActionLogsRepresentation') {
193
198
  })();
194
199
  return v_error === undefined ? null : v_error;
195
200
  }
196
- const RepresentationType$1 = 'ExplainabilityActionLogsRepresentation';
197
- function normalize$1(input, existing, path, luvio, store, timestamp) {
201
+ const RepresentationType$2 = 'ExplainabilityActionLogsRepresentation';
202
+ function normalize$2(input, existing, path, luvio, store, timestamp) {
198
203
  return input;
199
204
  }
200
- const select$3 = function ExplainabilityActionLogsRepresentationSelect() {
205
+ const select$5 = function ExplainabilityActionLogsRepresentationSelect() {
201
206
  return {
202
207
  kind: 'Fragment',
203
- version: VERSION$1,
208
+ version: VERSION$2,
204
209
  private: [],
205
210
  opaque: true
206
211
  };
207
212
  };
208
- function equals$1(existing, incoming) {
213
+ function equals$2(existing, incoming) {
209
214
  if (JSONStringify(incoming) !== JSONStringify(existing)) {
210
215
  return false;
211
216
  }
212
217
  return true;
213
218
  }
214
- const ingest$1 = function ExplainabilityActionLogsRepresentationIngest(input, path, luvio, store, timestamp) {
219
+ const ingest$2 = function ExplainabilityActionLogsRepresentationIngest(input, path, luvio, store, timestamp) {
215
220
  if (process.env.NODE_ENV !== 'production') {
216
- const validateError = validate$2(input);
221
+ const validateError = validate$3(input);
217
222
  if (validateError !== null) {
218
223
  throw validateError;
219
224
  }
220
225
  }
221
226
  const key = path.fullPath;
222
- const ttlToUse = TTL$1;
223
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "explainability", VERSION$1, RepresentationType$1, equals$1);
227
+ const ttlToUse = TTL$2;
228
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "explainability", VERSION$2, RepresentationType$2, equals$2);
224
229
  return createLink(key);
225
230
  };
226
- function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
231
+ function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
227
232
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
228
233
  const rootKey = fullPathFactory();
229
234
  rootKeySet.set(rootKey, {
230
235
  namespace: keyPrefix,
231
- representationName: RepresentationType$1,
236
+ representationName: RepresentationType$2,
232
237
  mergeable: false
233
238
  });
234
239
  }
235
240
 
236
- function select$2(luvio, params) {
237
- return select$3();
241
+ function select$4(luvio, params) {
242
+ return select$5();
238
243
  }
239
- function keyBuilder$2(luvio, params) {
244
+ function keyBuilder$4(luvio, params) {
240
245
  return keyPrefix + '::ExplainabilityActionLogsRepresentation:(' + 'actionContextCode:' + params.queryParams.actionContextCode + ',' + 'applicationSubType:' + params.queryParams.applicationSubType + ',' + 'applicationType:' + params.queryParams.applicationType + ',' + 'createdAfter:' + params.queryParams.createdAfter + ',' + 'createdBefore:' + params.queryParams.createdBefore + ',' + 'pageSize:' + params.queryParams.pageSize + ',' + 'processType:' + params.queryParams.processType + ',' + 'queryMore:' + params.queryParams.queryMore + ',' + 'primaryFilter:' + params.queryParams.primaryFilter + ',' + 'secondaryFilter:' + params.queryParams.secondaryFilter + ',' + 'additionalFilter:' + params.queryParams.additionalFilter + ',' + 'sortDirection:' + params.queryParams.sortDirection + ')';
241
246
  }
242
- function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
243
- getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$2(luvio, resourceParams));
247
+ function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
248
+ getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$4(luvio, resourceParams));
244
249
  }
245
- function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
250
+ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
246
251
  const { body } = response;
247
- const key = keyBuilder$2(luvio, resourceParams);
248
- luvio.storeIngest(key, ingest$1, body);
252
+ const key = keyBuilder$4(luvio, resourceParams);
253
+ luvio.storeIngest(key, ingest$2, body);
249
254
  const snapshot = luvio.storeLookup({
250
255
  recordId: key,
251
- node: select$2(),
256
+ node: select$4(),
252
257
  variables: {},
253
258
  }, snapshotRefresh);
254
259
  if (process.env.NODE_ENV !== 'production') {
@@ -259,19 +264,19 @@ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
259
264
  deepFreeze(snapshot.data);
260
265
  return snapshot;
261
266
  }
262
- function ingestError(luvio, params, error, snapshotRefresh) {
263
- const key = keyBuilder$2(luvio, params);
267
+ function ingestError$1(luvio, params, error, snapshotRefresh) {
268
+ const key = keyBuilder$4(luvio, params);
264
269
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
265
270
  const storeMetadataParams = {
266
- ttl: TTL$1,
271
+ ttl: TTL$2,
267
272
  namespace: keyPrefix,
268
- version: VERSION$1,
269
- representationName: RepresentationType$1
273
+ version: VERSION$2,
274
+ representationName: RepresentationType$2
270
275
  };
271
276
  luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
272
277
  return errorSnapshot;
273
278
  }
274
- function createResourceRequest$1(config) {
279
+ function createResourceRequest$2(config) {
275
280
  const headers = {};
276
281
  return {
277
282
  baseUri: '/services/data/v62.0',
@@ -285,7 +290,7 @@ function createResourceRequest$1(config) {
285
290
  };
286
291
  }
287
292
 
288
- const adapterName$1 = 'getExplainabilityActionLogs';
293
+ const adapterName$2 = 'getExplainabilityActionLogs';
289
294
  const getExplainabilityActionLogs_ConfigPropertyMetadata = [
290
295
  generateParamConfigMetadata('actionContextCode', false, 1 /* QueryParameter */, 0 /* String */),
291
296
  generateParamConfigMetadata('applicationSubType', false, 1 /* QueryParameter */, 0 /* String */),
@@ -300,89 +305,89 @@ const getExplainabilityActionLogs_ConfigPropertyMetadata = [
300
305
  generateParamConfigMetadata('additionalFilter', false, 1 /* QueryParameter */, 0 /* String */),
301
306
  generateParamConfigMetadata('sortDirection', false, 1 /* QueryParameter */, 0 /* String */),
302
307
  ];
303
- const getExplainabilityActionLogs_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getExplainabilityActionLogs_ConfigPropertyMetadata);
304
- const createResourceParams$1 = /*#__PURE__*/ createResourceParams$2(getExplainabilityActionLogs_ConfigPropertyMetadata);
305
- function keyBuilder$1(luvio, config) {
306
- const resourceParams = createResourceParams$1(config);
307
- return keyBuilder$2(luvio, resourceParams);
308
+ const getExplainabilityActionLogs_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getExplainabilityActionLogs_ConfigPropertyMetadata);
309
+ const createResourceParams$2 = /*#__PURE__*/ createResourceParams$3(getExplainabilityActionLogs_ConfigPropertyMetadata);
310
+ function keyBuilder$3(luvio, config) {
311
+ const resourceParams = createResourceParams$2(config);
312
+ return keyBuilder$4(luvio, resourceParams);
308
313
  }
309
- function typeCheckConfig$1(untrustedConfig) {
314
+ function typeCheckConfig$2(untrustedConfig) {
310
315
  const config = {};
311
- typeCheckConfig$2(untrustedConfig, config, getExplainabilityActionLogs_ConfigPropertyMetadata);
316
+ typeCheckConfig$3(untrustedConfig, config, getExplainabilityActionLogs_ConfigPropertyMetadata);
312
317
  return config;
313
318
  }
314
- function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
319
+ function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
315
320
  if (!untrustedIsObject(untrustedConfig)) {
316
321
  return null;
317
322
  }
318
323
  if (process.env.NODE_ENV !== 'production') {
319
324
  validateConfig(untrustedConfig, configPropertyNames);
320
325
  }
321
- const config = typeCheckConfig$1(untrustedConfig);
326
+ const config = typeCheckConfig$2(untrustedConfig);
322
327
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
323
328
  return null;
324
329
  }
325
330
  return config;
326
331
  }
327
- function adapterFragment(luvio, config) {
328
- createResourceParams$1(config);
329
- return select$2();
332
+ function adapterFragment$1(luvio, config) {
333
+ createResourceParams$2(config);
334
+ return select$4();
330
335
  }
331
- function onFetchResponseSuccess(luvio, config, resourceParams, response) {
332
- const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
336
+ function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
337
+ const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
333
338
  config,
334
- resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
339
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
335
340
  });
336
341
  return luvio.storeBroadcast().then(() => snapshot);
337
342
  }
338
- function onFetchResponseError(luvio, config, resourceParams, response) {
339
- const snapshot = ingestError(luvio, resourceParams, response, {
343
+ function onFetchResponseError$1(luvio, config, resourceParams, response) {
344
+ const snapshot = ingestError$1(luvio, resourceParams, response, {
340
345
  config,
341
- resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
346
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
342
347
  });
343
348
  return luvio.storeBroadcast().then(() => snapshot);
344
349
  }
345
- function buildNetworkSnapshot$1(luvio, config, options) {
346
- const resourceParams = createResourceParams$1(config);
347
- const request = createResourceRequest$1(resourceParams);
350
+ function buildNetworkSnapshot$2(luvio, config, options) {
351
+ const resourceParams = createResourceParams$2(config);
352
+ const request = createResourceRequest$2(resourceParams);
348
353
  return luvio.dispatchResourceRequest(request, options)
349
354
  .then((response) => {
350
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
355
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
351
356
  const cache = new StoreKeyMap();
352
- getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
357
+ getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
353
358
  return cache;
354
359
  });
355
360
  }, (response) => {
356
- return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
361
+ return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
357
362
  });
358
363
  }
359
- function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
360
- return buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
364
+ function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
365
+ return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
361
366
  }
362
- function buildCachedSnapshotCachePolicy(context, storeLookup) {
367
+ function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
363
368
  const { luvio, config } = context;
364
369
  const selector = {
365
- recordId: keyBuilder$1(luvio, config),
366
- node: adapterFragment(luvio, config),
370
+ recordId: keyBuilder$3(luvio, config),
371
+ node: adapterFragment$1(luvio, config),
367
372
  variables: {},
368
373
  };
369
374
  const cacheSnapshot = storeLookup(selector, {
370
375
  config,
371
- resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
376
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
372
377
  });
373
378
  return cacheSnapshot;
374
379
  }
375
380
  const getExplainabilityActionLogsAdapterFactory = (luvio) => function explainability__getExplainabilityActionLogs(untrustedConfig, requestContext) {
376
- const config = validateAdapterConfig$1(untrustedConfig, getExplainabilityActionLogs_ConfigPropertyNames);
381
+ const config = validateAdapterConfig$2(untrustedConfig, getExplainabilityActionLogs_ConfigPropertyNames);
377
382
  // Invalid or incomplete config
378
383
  if (config === null) {
379
384
  return null;
380
385
  }
381
386
  return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
382
- buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
387
+ buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
383
388
  };
384
389
 
385
- function validate$1(obj, path = 'ExplainabilityActionLogInputRepresentation') {
390
+ function validate$2(obj, path = 'ExplainabilityActionLogInputRepresentation') {
386
391
  const v_error = (() => {
387
392
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
388
393
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -446,9 +451,9 @@ function validate$1(obj, path = 'ExplainabilityActionLogInputRepresentation') {
446
451
  return v_error === undefined ? null : v_error;
447
452
  }
448
453
 
449
- const TTL = 10000;
450
- const VERSION = "0d45c6e4f0bafbddf9b0c6a50f5e1a25";
451
- function validate(obj, path = 'ExplainabilityActionLogCreateRepresentation') {
454
+ const TTL$1 = 10000;
455
+ const VERSION$1 = "0d45c6e4f0bafbddf9b0c6a50f5e1a25";
456
+ function validate$1(obj, path = 'ExplainabilityActionLogCreateRepresentation') {
452
457
  const v_error = (() => {
453
458
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
454
459
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -468,68 +473,68 @@ function validate(obj, path = 'ExplainabilityActionLogCreateRepresentation') {
468
473
  })();
469
474
  return v_error === undefined ? null : v_error;
470
475
  }
471
- const RepresentationType = 'ExplainabilityActionLogCreateRepresentation';
472
- function keyBuilder(luvio, config) {
473
- return keyPrefix + '::' + RepresentationType + ':' + config.id;
476
+ const RepresentationType$1 = 'ExplainabilityActionLogCreateRepresentation';
477
+ function keyBuilder$2(luvio, config) {
478
+ return keyPrefix + '::' + RepresentationType$1 + ':' + config.id;
474
479
  }
475
480
  function keyBuilderFromType(luvio, object) {
476
481
  const keyParams = {
477
482
  id: object.uniqueIdentifier
478
483
  };
479
- return keyBuilder(luvio, keyParams);
484
+ return keyBuilder$2(luvio, keyParams);
480
485
  }
481
- function normalize(input, existing, path, luvio, store, timestamp) {
486
+ function normalize$1(input, existing, path, luvio, store, timestamp) {
482
487
  return input;
483
488
  }
484
- const select$1 = function ExplainabilityActionLogCreateRepresentationSelect() {
489
+ const select$3 = function ExplainabilityActionLogCreateRepresentationSelect() {
485
490
  return {
486
491
  kind: 'Fragment',
487
- version: VERSION,
492
+ version: VERSION$1,
488
493
  private: [],
489
494
  opaque: true
490
495
  };
491
496
  };
492
- function equals(existing, incoming) {
497
+ function equals$1(existing, incoming) {
493
498
  if (JSONStringify(incoming) !== JSONStringify(existing)) {
494
499
  return false;
495
500
  }
496
501
  return true;
497
502
  }
498
- const ingest = function ExplainabilityActionLogCreateRepresentationIngest(input, path, luvio, store, timestamp) {
503
+ const ingest$1 = function ExplainabilityActionLogCreateRepresentationIngest(input, path, luvio, store, timestamp) {
499
504
  if (process.env.NODE_ENV !== 'production') {
500
- const validateError = validate(input);
505
+ const validateError = validate$1(input);
501
506
  if (validateError !== null) {
502
507
  throw validateError;
503
508
  }
504
509
  }
505
510
  const key = keyBuilderFromType(luvio, input);
506
- const ttlToUse = TTL;
507
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "explainability", VERSION, RepresentationType, equals);
511
+ const ttlToUse = TTL$1;
512
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "explainability", VERSION$1, RepresentationType$1, equals$1);
508
513
  return createLink(key);
509
514
  };
510
- function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
515
+ function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
511
516
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
512
517
  const rootKey = keyBuilderFromType(luvio, input);
513
518
  rootKeySet.set(rootKey, {
514
519
  namespace: keyPrefix,
515
- representationName: RepresentationType,
520
+ representationName: RepresentationType$1,
516
521
  mergeable: false
517
522
  });
518
523
  }
519
524
 
520
- function select(luvio, params) {
521
- return select$1();
525
+ function select$2(luvio, params) {
526
+ return select$3();
522
527
  }
523
- function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
524
- getTypeCacheKeys(storeKeyMap, luvio, response);
528
+ function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
529
+ getTypeCacheKeys$1(storeKeyMap, luvio, response);
525
530
  }
526
- function ingestSuccess(luvio, resourceParams, response) {
531
+ function ingestSuccess$1(luvio, resourceParams, response) {
527
532
  const { body } = response;
528
533
  const key = keyBuilderFromType(luvio, body);
529
- luvio.storeIngest(key, ingest, body);
534
+ luvio.storeIngest(key, ingest$1, body);
530
535
  const snapshot = luvio.storeLookup({
531
536
  recordId: key,
532
- node: select(),
537
+ node: select$2(),
533
538
  variables: {},
534
539
  });
535
540
  if (process.env.NODE_ENV !== 'production') {
@@ -540,7 +545,7 @@ function ingestSuccess(luvio, resourceParams, response) {
540
545
  deepFreeze(snapshot.data);
541
546
  return snapshot;
542
547
  }
543
- function createResourceRequest(config) {
548
+ function createResourceRequest$1(config) {
544
549
  const headers = {};
545
550
  return {
546
551
  baseUri: '/services/data/v62.0',
@@ -554,45 +559,45 @@ function createResourceRequest(config) {
554
559
  };
555
560
  }
556
561
 
557
- const adapterName = 'storeExplainabilityActionLog';
562
+ const adapterName$1 = 'storeExplainabilityActionLog';
558
563
  const storeExplainabilityActionLog_ConfigPropertyMetadata = [
559
564
  generateParamConfigMetadata('explainabilityActionLogDefinition', true, 2 /* Body */, 4 /* Unsupported */),
560
565
  ];
561
- const storeExplainabilityActionLog_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, storeExplainabilityActionLog_ConfigPropertyMetadata);
562
- const createResourceParams = /*#__PURE__*/ createResourceParams$2(storeExplainabilityActionLog_ConfigPropertyMetadata);
563
- function typeCheckConfig(untrustedConfig) {
566
+ const storeExplainabilityActionLog_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, storeExplainabilityActionLog_ConfigPropertyMetadata);
567
+ const createResourceParams$1 = /*#__PURE__*/ createResourceParams$3(storeExplainabilityActionLog_ConfigPropertyMetadata);
568
+ function typeCheckConfig$1(untrustedConfig) {
564
569
  const config = {};
565
570
  const untrustedConfig_explainabilityActionLogDefinition = untrustedConfig.explainabilityActionLogDefinition;
566
- const referenceExplainabilityActionLogInputRepresentationValidationError = validate$1(untrustedConfig_explainabilityActionLogDefinition);
571
+ const referenceExplainabilityActionLogInputRepresentationValidationError = validate$2(untrustedConfig_explainabilityActionLogDefinition);
567
572
  if (referenceExplainabilityActionLogInputRepresentationValidationError === null) {
568
573
  config.explainabilityActionLogDefinition = untrustedConfig_explainabilityActionLogDefinition;
569
574
  }
570
575
  return config;
571
576
  }
572
- function validateAdapterConfig(untrustedConfig, configPropertyNames) {
577
+ function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
573
578
  if (!untrustedIsObject(untrustedConfig)) {
574
579
  return null;
575
580
  }
576
581
  if (process.env.NODE_ENV !== 'production') {
577
582
  validateConfig(untrustedConfig, configPropertyNames);
578
583
  }
579
- const config = typeCheckConfig(untrustedConfig);
584
+ const config = typeCheckConfig$1(untrustedConfig);
580
585
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
581
586
  return null;
582
587
  }
583
588
  return config;
584
589
  }
585
- function buildNetworkSnapshot(luvio, config, options) {
586
- const resourceParams = createResourceParams(config);
587
- const request = createResourceRequest(resourceParams);
590
+ function buildNetworkSnapshot$1(luvio, config, options) {
591
+ const resourceParams = createResourceParams$1(config);
592
+ const request = createResourceRequest$1(resourceParams);
588
593
  return luvio.dispatchResourceRequest(request, options)
589
594
  .then((response) => {
590
595
  return luvio.handleSuccessResponse(() => {
591
- const snapshot = ingestSuccess(luvio, resourceParams, response);
596
+ const snapshot = ingestSuccess$1(luvio, resourceParams, response);
592
597
  return luvio.storeBroadcast().then(() => snapshot);
593
598
  }, () => {
594
599
  const cache = new StoreKeyMap();
595
- getResponseCacheKeys(cache, luvio, resourceParams, response.body);
600
+ getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
596
601
  return cache;
597
602
  });
598
603
  }, (response) => {
@@ -602,13 +607,272 @@ function buildNetworkSnapshot(luvio, config, options) {
602
607
  }
603
608
  const storeExplainabilityActionLogAdapterFactory = (luvio) => {
604
609
  return function storeExplainabilityActionLog(untrustedConfig) {
605
- const config = validateAdapterConfig(untrustedConfig, storeExplainabilityActionLog_ConfigPropertyNames);
610
+ const config = validateAdapterConfig$1(untrustedConfig, storeExplainabilityActionLog_ConfigPropertyNames);
606
611
  // Invalid or incomplete config
607
612
  if (config === null) {
608
613
  throw new Error('Invalid config for "storeExplainabilityActionLog"');
609
614
  }
610
- return buildNetworkSnapshot(luvio, config);
615
+ return buildNetworkSnapshot$1(luvio, config);
616
+ };
617
+ };
618
+
619
+ const TTL = 10000;
620
+ const VERSION = "2ead56c771f0c2cc2857826a85e490c8";
621
+ function validate(obj, path = 'ExplainabilityDetailedActionLogDetailRepresentation') {
622
+ const v_error = (() => {
623
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
624
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
625
+ }
626
+ const obj_actionContextCode = obj.actionContextCode;
627
+ const path_actionContextCode = path + '.actionContextCode';
628
+ if (typeof obj_actionContextCode !== 'string') {
629
+ return new TypeError('Expected "string" but received "' + typeof obj_actionContextCode + '" (at "' + path_actionContextCode + '")');
630
+ }
631
+ const obj_actionLog = obj.actionLog;
632
+ const path_actionLog = path + '.actionLog';
633
+ if (typeof obj_actionLog !== 'string') {
634
+ return new TypeError('Expected "string" but received "' + typeof obj_actionLog + '" (at "' + path_actionLog + '")');
635
+ }
636
+ if (obj.additionalFilter !== undefined) {
637
+ const obj_additionalFilter = obj.additionalFilter;
638
+ const path_additionalFilter = path + '.additionalFilter';
639
+ if (typeof obj_additionalFilter !== 'string') {
640
+ return new TypeError('Expected "string" but received "' + typeof obj_additionalFilter + '" (at "' + path_additionalFilter + '")');
641
+ }
642
+ }
643
+ const obj_applicationLogDate = obj.applicationLogDate;
644
+ const path_applicationLogDate = path + '.applicationLogDate';
645
+ if (typeof obj_applicationLogDate !== 'string') {
646
+ return new TypeError('Expected "string" but received "' + typeof obj_applicationLogDate + '" (at "' + path_applicationLogDate + '")');
647
+ }
648
+ const obj_applicationSubtype = obj.applicationSubtype;
649
+ const path_applicationSubtype = path + '.applicationSubtype';
650
+ if (typeof obj_applicationSubtype !== 'string') {
651
+ return new TypeError('Expected "string" but received "' + typeof obj_applicationSubtype + '" (at "' + path_applicationSubtype + '")');
652
+ }
653
+ const obj_applicationType = obj.applicationType;
654
+ const path_applicationType = path + '.applicationType';
655
+ if (typeof obj_applicationType !== 'string') {
656
+ return new TypeError('Expected "string" but received "' + typeof obj_applicationType + '" (at "' + path_applicationType + '")');
657
+ }
658
+ const obj_explainabilitySpecName = obj.explainabilitySpecName;
659
+ const path_explainabilitySpecName = path + '.explainabilitySpecName';
660
+ if (typeof obj_explainabilitySpecName !== 'string') {
661
+ return new TypeError('Expected "string" but received "' + typeof obj_explainabilitySpecName + '" (at "' + path_explainabilitySpecName + '")');
662
+ }
663
+ const obj_name = obj.name;
664
+ const path_name = path + '.name';
665
+ if (typeof obj_name !== 'string') {
666
+ return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
667
+ }
668
+ if (obj.primaryFilter !== undefined) {
669
+ const obj_primaryFilter = obj.primaryFilter;
670
+ const path_primaryFilter = path + '.primaryFilter';
671
+ if (typeof obj_primaryFilter !== 'string') {
672
+ return new TypeError('Expected "string" but received "' + typeof obj_primaryFilter + '" (at "' + path_primaryFilter + '")');
673
+ }
674
+ }
675
+ const obj_processType = obj.processType;
676
+ const path_processType = path + '.processType';
677
+ if (typeof obj_processType !== 'string') {
678
+ return new TypeError('Expected "string" but received "' + typeof obj_processType + '" (at "' + path_processType + '")');
679
+ }
680
+ if (obj.secondaryFilter !== undefined) {
681
+ const obj_secondaryFilter = obj.secondaryFilter;
682
+ const path_secondaryFilter = path + '.secondaryFilter';
683
+ if (typeof obj_secondaryFilter !== 'string') {
684
+ return new TypeError('Expected "string" but received "' + typeof obj_secondaryFilter + '" (at "' + path_secondaryFilter + '")');
685
+ }
686
+ }
687
+ const obj_uniqueIdentifier = obj.uniqueIdentifier;
688
+ const path_uniqueIdentifier = path + '.uniqueIdentifier';
689
+ if (typeof obj_uniqueIdentifier !== 'string') {
690
+ return new TypeError('Expected "string" but received "' + typeof obj_uniqueIdentifier + '" (at "' + path_uniqueIdentifier + '")');
691
+ }
692
+ })();
693
+ return v_error === undefined ? null : v_error;
694
+ }
695
+ const RepresentationType = 'ExplainabilityDetailedActionLogDetailRepresentation';
696
+ function normalize(input, existing, path, luvio, store, timestamp) {
697
+ return input;
698
+ }
699
+ const select$1 = function ExplainabilityDetailedActionLogDetailRepresentationSelect() {
700
+ return {
701
+ kind: 'Fragment',
702
+ version: VERSION,
703
+ private: [],
704
+ opaque: true
705
+ };
706
+ };
707
+ function equals(existing, incoming) {
708
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
709
+ return false;
710
+ }
711
+ return true;
712
+ }
713
+ const ingest = function ExplainabilityDetailedActionLogDetailRepresentationIngest(input, path, luvio, store, timestamp) {
714
+ if (process.env.NODE_ENV !== 'production') {
715
+ const validateError = validate(input);
716
+ if (validateError !== null) {
717
+ throw validateError;
718
+ }
719
+ }
720
+ const key = path.fullPath;
721
+ const ttlToUse = TTL;
722
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "explainability", VERSION, RepresentationType, equals);
723
+ return createLink(key);
724
+ };
725
+ function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
726
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
727
+ const rootKey = fullPathFactory();
728
+ rootKeySet.set(rootKey, {
729
+ namespace: keyPrefix,
730
+ representationName: RepresentationType,
731
+ mergeable: false
732
+ });
733
+ }
734
+
735
+ function select(luvio, params) {
736
+ return select$1();
737
+ }
738
+ function keyBuilder$1(luvio, params) {
739
+ return keyPrefix + '::ExplainabilityDetailedActionLogDetailRepresentation:(' + 'actionContextCode:' + params.queryParams.actionContextCode + ',' + 'applicationSubType:' + params.queryParams.applicationSubType + ',' + 'applicationType:' + params.queryParams.applicationType + ',' + 'actionLogDateTime:' + params.queryParams.actionLogDateTime + ',' + 'processType:' + params.queryParams.processType + ',' + 'uniqueIdentifier:' + params.queryParams.uniqueIdentifier + ')';
740
+ }
741
+ function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
742
+ getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
743
+ }
744
+ function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
745
+ const { body } = response;
746
+ const key = keyBuilder$1(luvio, resourceParams);
747
+ luvio.storeIngest(key, ingest, body);
748
+ const snapshot = luvio.storeLookup({
749
+ recordId: key,
750
+ node: select(),
751
+ variables: {},
752
+ }, snapshotRefresh);
753
+ if (process.env.NODE_ENV !== 'production') {
754
+ if (snapshot.state !== 'Fulfilled') {
755
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
756
+ }
757
+ }
758
+ deepFreeze(snapshot.data);
759
+ return snapshot;
760
+ }
761
+ function ingestError(luvio, params, error, snapshotRefresh) {
762
+ const key = keyBuilder$1(luvio, params);
763
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
764
+ const storeMetadataParams = {
765
+ ttl: TTL,
766
+ namespace: keyPrefix,
767
+ version: VERSION,
768
+ representationName: RepresentationType
611
769
  };
770
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
771
+ return errorSnapshot;
772
+ }
773
+ function createResourceRequest(config) {
774
+ const headers = {};
775
+ return {
776
+ baseUri: '/services/data/v62.0',
777
+ basePath: '/connect/decision-explainer/detailed-action-log',
778
+ method: 'get',
779
+ body: null,
780
+ urlParams: {},
781
+ queryParams: config.queryParams,
782
+ headers,
783
+ priority: 'normal',
784
+ };
785
+ }
786
+
787
+ const adapterName = 'getExplainabilityDetailedActionLog';
788
+ const getExplainabilityDetailedActionLog_ConfigPropertyMetadata = [
789
+ generateParamConfigMetadata('actionContextCode', true, 1 /* QueryParameter */, 0 /* String */),
790
+ generateParamConfigMetadata('applicationSubType', true, 1 /* QueryParameter */, 0 /* String */),
791
+ generateParamConfigMetadata('applicationType', true, 1 /* QueryParameter */, 0 /* String */),
792
+ generateParamConfigMetadata('actionLogDateTime', true, 1 /* QueryParameter */, 0 /* String */),
793
+ generateParamConfigMetadata('processType', true, 1 /* QueryParameter */, 0 /* String */),
794
+ generateParamConfigMetadata('uniqueIdentifier', true, 1 /* QueryParameter */, 0 /* String */),
795
+ ];
796
+ const getExplainabilityDetailedActionLog_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getExplainabilityDetailedActionLog_ConfigPropertyMetadata);
797
+ const createResourceParams = /*#__PURE__*/ createResourceParams$3(getExplainabilityDetailedActionLog_ConfigPropertyMetadata);
798
+ function keyBuilder(luvio, config) {
799
+ const resourceParams = createResourceParams(config);
800
+ return keyBuilder$1(luvio, resourceParams);
801
+ }
802
+ function typeCheckConfig(untrustedConfig) {
803
+ const config = {};
804
+ typeCheckConfig$3(untrustedConfig, config, getExplainabilityDetailedActionLog_ConfigPropertyMetadata);
805
+ return config;
806
+ }
807
+ function validateAdapterConfig(untrustedConfig, configPropertyNames) {
808
+ if (!untrustedIsObject(untrustedConfig)) {
809
+ return null;
810
+ }
811
+ if (process.env.NODE_ENV !== 'production') {
812
+ validateConfig(untrustedConfig, configPropertyNames);
813
+ }
814
+ const config = typeCheckConfig(untrustedConfig);
815
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
816
+ return null;
817
+ }
818
+ return config;
819
+ }
820
+ function adapterFragment(luvio, config) {
821
+ createResourceParams(config);
822
+ return select();
823
+ }
824
+ function onFetchResponseSuccess(luvio, config, resourceParams, response) {
825
+ const snapshot = ingestSuccess(luvio, resourceParams, response, {
826
+ config,
827
+ resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
828
+ });
829
+ return luvio.storeBroadcast().then(() => snapshot);
830
+ }
831
+ function onFetchResponseError(luvio, config, resourceParams, response) {
832
+ const snapshot = ingestError(luvio, resourceParams, response, {
833
+ config,
834
+ resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
835
+ });
836
+ return luvio.storeBroadcast().then(() => snapshot);
837
+ }
838
+ function buildNetworkSnapshot(luvio, config, options) {
839
+ const resourceParams = createResourceParams(config);
840
+ const request = createResourceRequest(resourceParams);
841
+ return luvio.dispatchResourceRequest(request, options)
842
+ .then((response) => {
843
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
844
+ const cache = new StoreKeyMap();
845
+ getResponseCacheKeys(cache, luvio, resourceParams, response.body);
846
+ return cache;
847
+ });
848
+ }, (response) => {
849
+ return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
850
+ });
851
+ }
852
+ function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
853
+ return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
854
+ }
855
+ function buildCachedSnapshotCachePolicy(context, storeLookup) {
856
+ const { luvio, config } = context;
857
+ const selector = {
858
+ recordId: keyBuilder(luvio, config),
859
+ node: adapterFragment(luvio, config),
860
+ variables: {},
861
+ };
862
+ const cacheSnapshot = storeLookup(selector, {
863
+ config,
864
+ resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
865
+ });
866
+ return cacheSnapshot;
867
+ }
868
+ const getExplainabilityDetailedActionLogAdapterFactory = (luvio) => function explainability__getExplainabilityDetailedActionLog(untrustedConfig, requestContext) {
869
+ const config = validateAdapterConfig(untrustedConfig, getExplainabilityDetailedActionLog_ConfigPropertyNames);
870
+ // Invalid or incomplete config
871
+ if (config === null) {
872
+ return null;
873
+ }
874
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
875
+ buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
612
876
  };
613
877
 
614
- export { getExplainabilityActionLogsAdapterFactory, storeExplainabilityActionLogAdapterFactory };
878
+ export { getExplainabilityActionLogsAdapterFactory, getExplainabilityDetailedActionLogAdapterFactory, storeExplainabilityActionLogAdapterFactory };