@salesforce/lds-adapters-service-einstein-copilot-bot 1.309.0-dev14 → 1.309.0-dev16

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.
package/sfdc/index.js CHANGED
@@ -14,7 +14,7 @@
14
14
  /* proxy-compat-disable */
15
15
  import { createInstrumentedAdapter, createLDSAdapter, createWireAdapterConstructor, createImperativeAdapter } from 'force/ldsBindings';
16
16
  import { withDefaultLuvio } from 'force/ldsEngine';
17
- import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$5, StoreKeyMap, createResourceParams as createResourceParams$7, typeCheckConfig as typeCheckConfig$7 } from 'force/luvioEngine';
17
+ import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$7, StoreKeyMap, createResourceParams as createResourceParams$9, typeCheckConfig as typeCheckConfig$9 } from 'force/luvioEngine';
18
18
 
19
19
  const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
20
20
  const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
@@ -122,9 +122,9 @@ function createLink(ref) {
122
122
  };
123
123
  }
124
124
 
125
- const TTL$7 = 30000;
126
- const VERSION$e = "c27669d0d0ba84ade6d5a4c97336c0ef";
127
- function validate$l(obj, path = 'CopilotBotInfoRepresentation') {
125
+ const TTL$9 = 30000;
126
+ const VERSION$h = "c27669d0d0ba84ade6d5a4c97336c0ef";
127
+ function validate$o(obj, path = 'CopilotBotInfoRepresentation') {
128
128
  const v_error = (() => {
129
129
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
130
130
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -172,14 +172,14 @@ function validate$l(obj, path = 'CopilotBotInfoRepresentation') {
172
172
  })();
173
173
  return v_error === undefined ? null : v_error;
174
174
  }
175
- const RepresentationType$7 = 'CopilotBotInfoRepresentation';
176
- function normalize$7(input, existing, path, luvio, store, timestamp) {
175
+ const RepresentationType$9 = 'CopilotBotInfoRepresentation';
176
+ function normalize$9(input, existing, path, luvio, store, timestamp) {
177
177
  return input;
178
178
  }
179
- const select$l = function CopilotBotInfoRepresentationSelect() {
179
+ const select$q = function CopilotBotInfoRepresentationSelect() {
180
180
  return {
181
181
  kind: 'Fragment',
182
- version: VERSION$e,
182
+ version: VERSION$h,
183
183
  private: [],
184
184
  selections: [
185
185
  {
@@ -214,7 +214,7 @@ const select$l = function CopilotBotInfoRepresentationSelect() {
214
214
  ]
215
215
  };
216
216
  };
217
- function equals$e(existing, incoming) {
217
+ function equals$h(existing, incoming) {
218
218
  const existing_isSuccess = existing.isSuccess;
219
219
  const incoming_isSuccess = incoming.isSuccess;
220
220
  if (!(existing_isSuccess === incoming_isSuccess)) {
@@ -287,44 +287,44 @@ function equals$e(existing, incoming) {
287
287
  }
288
288
  return true;
289
289
  }
290
- const ingest$7 = function CopilotBotInfoRepresentationIngest(input, path, luvio, store, timestamp) {
290
+ const ingest$9 = function CopilotBotInfoRepresentationIngest(input, path, luvio, store, timestamp) {
291
291
  if (process.env.NODE_ENV !== 'production') {
292
- const validateError = validate$l(input);
292
+ const validateError = validate$o(input);
293
293
  if (validateError !== null) {
294
294
  throw validateError;
295
295
  }
296
296
  }
297
297
  const key = path.fullPath;
298
- const ttlToUse = TTL$7;
299
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$7, "einstein-copilot-bot", VERSION$e, RepresentationType$7, equals$e);
298
+ const ttlToUse = TTL$9;
299
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$9, "einstein-copilot-bot", VERSION$h, RepresentationType$9, equals$h);
300
300
  return createLink(key);
301
301
  };
302
- function getTypeCacheKeys$7(rootKeySet, luvio, input, fullPathFactory) {
302
+ function getTypeCacheKeys$9(rootKeySet, luvio, input, fullPathFactory) {
303
303
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
304
304
  const rootKey = fullPathFactory();
305
305
  rootKeySet.set(rootKey, {
306
306
  namespace: keyPrefix,
307
- representationName: RepresentationType$7,
307
+ representationName: RepresentationType$9,
308
308
  mergeable: false
309
309
  });
310
310
  }
311
311
 
312
- function select$k(luvio, params) {
313
- return select$l();
312
+ function select$p(luvio, params) {
313
+ return select$q();
314
314
  }
315
- function keyBuilder$c(luvio, params) {
315
+ function keyBuilder$g(luvio, params) {
316
316
  return keyPrefix + '::CopilotBotInfoRepresentation:(' + ')';
317
317
  }
318
- function getResponseCacheKeys$6(storeKeyMap, luvio, resourceParams, response) {
319
- getTypeCacheKeys$7(storeKeyMap, luvio, response, () => keyBuilder$c());
318
+ function getResponseCacheKeys$8(storeKeyMap, luvio, resourceParams, response) {
319
+ getTypeCacheKeys$9(storeKeyMap, luvio, response, () => keyBuilder$g());
320
320
  }
321
- function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
321
+ function ingestSuccess$8(luvio, resourceParams, response, snapshotRefresh) {
322
322
  const { body } = response;
323
- const key = keyBuilder$c();
324
- luvio.storeIngest(key, ingest$7, body);
323
+ const key = keyBuilder$g();
324
+ luvio.storeIngest(key, ingest$9, body);
325
325
  const snapshot = luvio.storeLookup({
326
326
  recordId: key,
327
- node: select$k(),
327
+ node: select$p(),
328
328
  variables: {},
329
329
  }, snapshotRefresh);
330
330
  if (process.env.NODE_ENV !== 'production') {
@@ -335,19 +335,19 @@ function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
335
335
  deepFreeze(snapshot.data);
336
336
  return snapshot;
337
337
  }
338
- function ingestError$4(luvio, params, error, snapshotRefresh) {
339
- const key = keyBuilder$c();
338
+ function ingestError$6(luvio, params, error, snapshotRefresh) {
339
+ const key = keyBuilder$g();
340
340
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
341
341
  const storeMetadataParams = {
342
- ttl: TTL$7,
342
+ ttl: TTL$9,
343
343
  namespace: keyPrefix,
344
- version: VERSION$e,
345
- representationName: RepresentationType$7
344
+ version: VERSION$h,
345
+ representationName: RepresentationType$9
346
346
  };
347
347
  luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
348
348
  return errorSnapshot;
349
349
  }
350
- function createResourceRequest$6(config) {
350
+ function createResourceRequest$8(config) {
351
351
  const headers = {};
352
352
  return {
353
353
  baseUri: '/services/data/v62.0',
@@ -361,91 +361,91 @@ function createResourceRequest$6(config) {
361
361
  };
362
362
  }
363
363
 
364
- const adapterName$6 = 'getBotId';
364
+ const adapterName$8 = 'getBotId';
365
365
  const getBotId_ConfigPropertyMetadata = [];
366
- const getBotId_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, getBotId_ConfigPropertyMetadata);
367
- const createResourceParams$6 = /*#__PURE__*/ createResourceParams$7(getBotId_ConfigPropertyMetadata);
368
- function keyBuilder$b(luvio, config) {
369
- createResourceParams$6(config);
370
- return keyBuilder$c();
366
+ const getBotId_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$8, getBotId_ConfigPropertyMetadata);
367
+ const createResourceParams$8 = /*#__PURE__*/ createResourceParams$9(getBotId_ConfigPropertyMetadata);
368
+ function keyBuilder$f(luvio, config) {
369
+ createResourceParams$8(config);
370
+ return keyBuilder$g();
371
371
  }
372
- function typeCheckConfig$6(untrustedConfig) {
372
+ function typeCheckConfig$8(untrustedConfig) {
373
373
  const config = {};
374
374
  return config;
375
375
  }
376
- function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
376
+ function validateAdapterConfig$8(untrustedConfig, configPropertyNames) {
377
377
  if (!untrustedIsObject(untrustedConfig)) {
378
378
  return null;
379
379
  }
380
380
  if (process.env.NODE_ENV !== 'production') {
381
381
  validateConfig(untrustedConfig, configPropertyNames);
382
382
  }
383
- const config = typeCheckConfig$6();
383
+ const config = typeCheckConfig$8();
384
384
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
385
385
  return null;
386
386
  }
387
387
  return config;
388
388
  }
389
- function adapterFragment$4(luvio, config) {
390
- createResourceParams$6(config);
391
- return select$k();
389
+ function adapterFragment$6(luvio, config) {
390
+ createResourceParams$8(config);
391
+ return select$p();
392
392
  }
393
- function onFetchResponseSuccess$4(luvio, config, resourceParams, response) {
394
- const snapshot = ingestSuccess$6(luvio, resourceParams, response, {
393
+ function onFetchResponseSuccess$6(luvio, config, resourceParams, response) {
394
+ const snapshot = ingestSuccess$8(luvio, resourceParams, response, {
395
395
  config,
396
- resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
396
+ resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
397
397
  });
398
398
  return luvio.storeBroadcast().then(() => snapshot);
399
399
  }
400
- function onFetchResponseError$4(luvio, config, resourceParams, response) {
401
- const snapshot = ingestError$4(luvio, resourceParams, response, {
400
+ function onFetchResponseError$6(luvio, config, resourceParams, response) {
401
+ const snapshot = ingestError$6(luvio, resourceParams, response, {
402
402
  config,
403
- resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
403
+ resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
404
404
  });
405
405
  return luvio.storeBroadcast().then(() => snapshot);
406
406
  }
407
- function buildNetworkSnapshot$6(luvio, config, options) {
408
- const resourceParams = createResourceParams$6(config);
409
- const request = createResourceRequest$6();
407
+ function buildNetworkSnapshot$8(luvio, config, options) {
408
+ const resourceParams = createResourceParams$8(config);
409
+ const request = createResourceRequest$8();
410
410
  return luvio.dispatchResourceRequest(request, options)
411
411
  .then((response) => {
412
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$4(luvio, config, resourceParams, response), () => {
412
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$6(luvio, config, resourceParams, response), () => {
413
413
  const cache = new StoreKeyMap();
414
- getResponseCacheKeys$6(cache, luvio, resourceParams, response.body);
414
+ getResponseCacheKeys$8(cache, luvio, resourceParams, response.body);
415
415
  return cache;
416
416
  });
417
417
  }, (response) => {
418
- return luvio.handleErrorResponse(() => onFetchResponseError$4(luvio, config, resourceParams, response));
418
+ return luvio.handleErrorResponse(() => onFetchResponseError$6(luvio, config, resourceParams, response));
419
419
  });
420
420
  }
421
- function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
422
- return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$6, undefined, false);
421
+ function buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext) {
422
+ return buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext, buildNetworkSnapshot$8, undefined, false);
423
423
  }
424
- function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
424
+ function buildCachedSnapshotCachePolicy$6(context, storeLookup) {
425
425
  const { luvio, config } = context;
426
426
  const selector = {
427
- recordId: keyBuilder$b(luvio, config),
428
- node: adapterFragment$4(luvio, config),
427
+ recordId: keyBuilder$f(luvio, config),
428
+ node: adapterFragment$6(luvio, config),
429
429
  variables: {},
430
430
  };
431
431
  const cacheSnapshot = storeLookup(selector, {
432
432
  config,
433
- resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
433
+ resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
434
434
  });
435
435
  return cacheSnapshot;
436
436
  }
437
437
  const getBotIdAdapterFactory = (luvio) => function einsteinCopilotBot__getBotId(untrustedConfig, requestContext) {
438
- const config = validateAdapterConfig$6(untrustedConfig, getBotId_ConfigPropertyNames);
438
+ const config = validateAdapterConfig$8(untrustedConfig, getBotId_ConfigPropertyNames);
439
439
  // Invalid or incomplete config
440
440
  if (config === null) {
441
441
  return null;
442
442
  }
443
443
  return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
444
- buildCachedSnapshotCachePolicy$4, buildNetworkSnapshotCachePolicy$4);
444
+ buildCachedSnapshotCachePolicy$6, buildNetworkSnapshotCachePolicy$6);
445
445
  };
446
446
 
447
- const VERSION$d = "24d61d5f37ff09155ee4a9d90eb4fcb5";
448
- function validate$k(obj, path = 'CopilotObjectInfoRepresentation') {
447
+ const VERSION$g = "24d61d5f37ff09155ee4a9d90eb4fcb5";
448
+ function validate$n(obj, path = 'CopilotObjectInfoRepresentation') {
449
449
  const v_error = (() => {
450
450
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
451
451
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -463,10 +463,10 @@ function validate$k(obj, path = 'CopilotObjectInfoRepresentation') {
463
463
  })();
464
464
  return v_error === undefined ? null : v_error;
465
465
  }
466
- const select$j = function CopilotObjectInfoRepresentationSelect() {
466
+ const select$o = function CopilotObjectInfoRepresentationSelect() {
467
467
  return {
468
468
  kind: 'Fragment',
469
- version: VERSION$d,
469
+ version: VERSION$g,
470
470
  private: [],
471
471
  selections: [
472
472
  {
@@ -480,7 +480,7 @@ const select$j = function CopilotObjectInfoRepresentationSelect() {
480
480
  ]
481
481
  };
482
482
  };
483
- function equals$d(existing, incoming) {
483
+ function equals$g(existing, incoming) {
484
484
  const existing_apiName = existing.apiName;
485
485
  const incoming_apiName = incoming.apiName;
486
486
  if (!(existing_apiName === incoming_apiName)) {
@@ -494,9 +494,9 @@ function equals$d(existing, incoming) {
494
494
  return true;
495
495
  }
496
496
 
497
- const TTL$6 = 900000;
498
- const VERSION$c = "ca1aedcbd4e34795fadf2dcaf66e5825";
499
- function validate$j(obj, path = 'CopilotObjectListRepresentation') {
497
+ const TTL$8 = 900000;
498
+ const VERSION$f = "ca1aedcbd4e34795fadf2dcaf66e5825";
499
+ function validate$m(obj, path = 'CopilotObjectListRepresentation') {
500
500
  const v_error = (() => {
501
501
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
502
502
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -509,7 +509,7 @@ function validate$j(obj, path = 'CopilotObjectListRepresentation') {
509
509
  for (let i = 0; i < obj_objects.length; i++) {
510
510
  const obj_objects_item = obj_objects[i];
511
511
  const path_objects_item = path_objects + '[' + i + ']';
512
- const referencepath_objects_itemValidationError = validate$k(obj_objects_item, path_objects_item);
512
+ const referencepath_objects_itemValidationError = validate$n(obj_objects_item, path_objects_item);
513
513
  if (referencepath_objects_itemValidationError !== null) {
514
514
  let message = 'Object doesn\'t match CopilotObjectInfoRepresentation (at "' + path_objects_item + '")\n';
515
515
  message += referencepath_objects_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -519,15 +519,15 @@ function validate$j(obj, path = 'CopilotObjectListRepresentation') {
519
519
  })();
520
520
  return v_error === undefined ? null : v_error;
521
521
  }
522
- const RepresentationType$6 = 'CopilotObjectListRepresentation';
523
- function normalize$6(input, existing, path, luvio, store, timestamp) {
522
+ const RepresentationType$8 = 'CopilotObjectListRepresentation';
523
+ function normalize$8(input, existing, path, luvio, store, timestamp) {
524
524
  return input;
525
525
  }
526
- const select$i = function CopilotObjectListRepresentationSelect() {
527
- const { selections: CopilotObjectInfoRepresentation__selections, opaque: CopilotObjectInfoRepresentation__opaque, } = select$j();
526
+ const select$n = function CopilotObjectListRepresentationSelect() {
527
+ const { selections: CopilotObjectInfoRepresentation__selections, opaque: CopilotObjectInfoRepresentation__opaque, } = select$o();
528
528
  return {
529
529
  kind: 'Fragment',
530
- version: VERSION$c,
530
+ version: VERSION$f,
531
531
  private: [],
532
532
  selections: [
533
533
  {
@@ -539,11 +539,11 @@ const select$i = function CopilotObjectListRepresentationSelect() {
539
539
  ]
540
540
  };
541
541
  };
542
- function equals$c(existing, incoming) {
542
+ function equals$f(existing, incoming) {
543
543
  const existing_objects = existing.objects;
544
544
  const incoming_objects = incoming.objects;
545
545
  const equals_objects_items = equalsArray(existing_objects, incoming_objects, (existing_objects_item, incoming_objects_item) => {
546
- if (!(equals$d(existing_objects_item, incoming_objects_item))) {
546
+ if (!(equals$g(existing_objects_item, incoming_objects_item))) {
547
547
  return false;
548
548
  }
549
549
  });
@@ -552,44 +552,44 @@ function equals$c(existing, incoming) {
552
552
  }
553
553
  return true;
554
554
  }
555
- const ingest$6 = function CopilotObjectListRepresentationIngest(input, path, luvio, store, timestamp) {
555
+ const ingest$8 = function CopilotObjectListRepresentationIngest(input, path, luvio, store, timestamp) {
556
556
  if (process.env.NODE_ENV !== 'production') {
557
- const validateError = validate$j(input);
557
+ const validateError = validate$m(input);
558
558
  if (validateError !== null) {
559
559
  throw validateError;
560
560
  }
561
561
  }
562
562
  const key = path.fullPath;
563
- const ttlToUse = TTL$6;
564
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$6, "einstein-copilot-bot", VERSION$c, RepresentationType$6, equals$c);
563
+ const ttlToUse = TTL$8;
564
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$8, "einstein-copilot-bot", VERSION$f, RepresentationType$8, equals$f);
565
565
  return createLink(key);
566
566
  };
567
- function getTypeCacheKeys$6(rootKeySet, luvio, input, fullPathFactory) {
567
+ function getTypeCacheKeys$8(rootKeySet, luvio, input, fullPathFactory) {
568
568
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
569
569
  const rootKey = fullPathFactory();
570
570
  rootKeySet.set(rootKey, {
571
571
  namespace: keyPrefix,
572
- representationName: RepresentationType$6,
572
+ representationName: RepresentationType$8,
573
573
  mergeable: false
574
574
  });
575
575
  }
576
576
 
577
- function select$h(luvio, params) {
578
- return select$i();
577
+ function select$m(luvio, params) {
578
+ return select$n();
579
579
  }
580
- function keyBuilder$a(luvio, params) {
580
+ function keyBuilder$e(luvio, params) {
581
581
  return keyPrefix + '::CopilotObjectListRepresentation:(' + 'limit:' + params.queryParams.limit + ',' + 'searchTerm:' + params.queryParams.searchTerm + ')';
582
582
  }
583
- function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
584
- getTypeCacheKeys$6(storeKeyMap, luvio, response, () => keyBuilder$a(luvio, resourceParams));
583
+ function getResponseCacheKeys$7(storeKeyMap, luvio, resourceParams, response) {
584
+ getTypeCacheKeys$8(storeKeyMap, luvio, response, () => keyBuilder$e(luvio, resourceParams));
585
585
  }
586
- function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
586
+ function ingestSuccess$7(luvio, resourceParams, response, snapshotRefresh) {
587
587
  const { body } = response;
588
- const key = keyBuilder$a(luvio, resourceParams);
589
- luvio.storeIngest(key, ingest$6, body);
588
+ const key = keyBuilder$e(luvio, resourceParams);
589
+ luvio.storeIngest(key, ingest$8, body);
590
590
  const snapshot = luvio.storeLookup({
591
591
  recordId: key,
592
- node: select$h(),
592
+ node: select$m(),
593
593
  variables: {},
594
594
  }, snapshotRefresh);
595
595
  if (process.env.NODE_ENV !== 'production') {
@@ -600,19 +600,19 @@ function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
600
600
  deepFreeze(snapshot.data);
601
601
  return snapshot;
602
602
  }
603
- function ingestError$3(luvio, params, error, snapshotRefresh) {
604
- const key = keyBuilder$a(luvio, params);
603
+ function ingestError$5(luvio, params, error, snapshotRefresh) {
604
+ const key = keyBuilder$e(luvio, params);
605
605
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
606
606
  const storeMetadataParams = {
607
- ttl: TTL$6,
607
+ ttl: TTL$8,
608
608
  namespace: keyPrefix,
609
- version: VERSION$c,
610
- representationName: RepresentationType$6
609
+ version: VERSION$f,
610
+ representationName: RepresentationType$8
611
611
  };
612
612
  luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
613
613
  return errorSnapshot;
614
614
  }
615
- function createResourceRequest$5(config) {
615
+ function createResourceRequest$7(config) {
616
616
  const headers = {};
617
617
  return {
618
618
  baseUri: '/services/data/v62.0',
@@ -626,94 +626,94 @@ function createResourceRequest$5(config) {
626
626
  };
627
627
  }
628
628
 
629
- const adapterName$5 = 'getCopilotObjects';
629
+ const adapterName$7 = 'getCopilotObjects';
630
630
  const getCopilotObjects_ConfigPropertyMetadata = [
631
631
  generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
632
632
  generateParamConfigMetadata('searchTerm', false, 1 /* QueryParameter */, 0 /* String */),
633
633
  ];
634
- const getCopilotObjects_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, getCopilotObjects_ConfigPropertyMetadata);
635
- const createResourceParams$5 = /*#__PURE__*/ createResourceParams$7(getCopilotObjects_ConfigPropertyMetadata);
636
- function keyBuilder$9(luvio, config) {
637
- const resourceParams = createResourceParams$5(config);
638
- return keyBuilder$a(luvio, resourceParams);
634
+ const getCopilotObjects_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$7, getCopilotObjects_ConfigPropertyMetadata);
635
+ const createResourceParams$7 = /*#__PURE__*/ createResourceParams$9(getCopilotObjects_ConfigPropertyMetadata);
636
+ function keyBuilder$d(luvio, config) {
637
+ const resourceParams = createResourceParams$7(config);
638
+ return keyBuilder$e(luvio, resourceParams);
639
639
  }
640
- function typeCheckConfig$5(untrustedConfig) {
640
+ function typeCheckConfig$7(untrustedConfig) {
641
641
  const config = {};
642
- typeCheckConfig$7(untrustedConfig, config, getCopilotObjects_ConfigPropertyMetadata);
642
+ typeCheckConfig$9(untrustedConfig, config, getCopilotObjects_ConfigPropertyMetadata);
643
643
  return config;
644
644
  }
645
- function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
645
+ function validateAdapterConfig$7(untrustedConfig, configPropertyNames) {
646
646
  if (!untrustedIsObject(untrustedConfig)) {
647
647
  return null;
648
648
  }
649
649
  if (process.env.NODE_ENV !== 'production') {
650
650
  validateConfig(untrustedConfig, configPropertyNames);
651
651
  }
652
- const config = typeCheckConfig$5(untrustedConfig);
652
+ const config = typeCheckConfig$7(untrustedConfig);
653
653
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
654
654
  return null;
655
655
  }
656
656
  return config;
657
657
  }
658
- function adapterFragment$3(luvio, config) {
659
- createResourceParams$5(config);
660
- return select$h();
658
+ function adapterFragment$5(luvio, config) {
659
+ createResourceParams$7(config);
660
+ return select$m();
661
661
  }
662
- function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
663
- const snapshot = ingestSuccess$5(luvio, resourceParams, response, {
662
+ function onFetchResponseSuccess$5(luvio, config, resourceParams, response) {
663
+ const snapshot = ingestSuccess$7(luvio, resourceParams, response, {
664
664
  config,
665
- resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
665
+ resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
666
666
  });
667
667
  return luvio.storeBroadcast().then(() => snapshot);
668
668
  }
669
- function onFetchResponseError$3(luvio, config, resourceParams, response) {
670
- const snapshot = ingestError$3(luvio, resourceParams, response, {
669
+ function onFetchResponseError$5(luvio, config, resourceParams, response) {
670
+ const snapshot = ingestError$5(luvio, resourceParams, response, {
671
671
  config,
672
- resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
672
+ resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
673
673
  });
674
674
  return luvio.storeBroadcast().then(() => snapshot);
675
675
  }
676
- function buildNetworkSnapshot$5(luvio, config, options) {
677
- const resourceParams = createResourceParams$5(config);
678
- const request = createResourceRequest$5(resourceParams);
676
+ function buildNetworkSnapshot$7(luvio, config, options) {
677
+ const resourceParams = createResourceParams$7(config);
678
+ const request = createResourceRequest$7(resourceParams);
679
679
  return luvio.dispatchResourceRequest(request, options)
680
680
  .then((response) => {
681
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
681
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$5(luvio, config, resourceParams, response), () => {
682
682
  const cache = new StoreKeyMap();
683
- getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
683
+ getResponseCacheKeys$7(cache, luvio, resourceParams, response.body);
684
684
  return cache;
685
685
  });
686
686
  }, (response) => {
687
- return luvio.handleErrorResponse(() => onFetchResponseError$3(luvio, config, resourceParams, response));
687
+ return luvio.handleErrorResponse(() => onFetchResponseError$5(luvio, config, resourceParams, response));
688
688
  });
689
689
  }
690
- function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
691
- return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$5, undefined, false);
690
+ function buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext) {
691
+ return buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext, buildNetworkSnapshot$7, undefined, false);
692
692
  }
693
- function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
693
+ function buildCachedSnapshotCachePolicy$5(context, storeLookup) {
694
694
  const { luvio, config } = context;
695
695
  const selector = {
696
- recordId: keyBuilder$9(luvio, config),
697
- node: adapterFragment$3(luvio, config),
696
+ recordId: keyBuilder$d(luvio, config),
697
+ node: adapterFragment$5(luvio, config),
698
698
  variables: {},
699
699
  };
700
700
  const cacheSnapshot = storeLookup(selector, {
701
701
  config,
702
- resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
702
+ resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
703
703
  });
704
704
  return cacheSnapshot;
705
705
  }
706
706
  const getCopilotObjectsAdapterFactory = (luvio) => function einsteinCopilotBot__getCopilotObjects(untrustedConfig, requestContext) {
707
- const config = validateAdapterConfig$5(untrustedConfig, getCopilotObjects_ConfigPropertyNames);
707
+ const config = validateAdapterConfig$7(untrustedConfig, getCopilotObjects_ConfigPropertyNames);
708
708
  // Invalid or incomplete config
709
709
  if (config === null) {
710
710
  return null;
711
711
  }
712
712
  return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
713
- buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
713
+ buildCachedSnapshotCachePolicy$5, buildNetworkSnapshotCachePolicy$5);
714
714
  };
715
715
 
716
- function validate$i(obj, path = 'FollowUpActionsDesignConfigRepresentation') {
716
+ function validate$l(obj, path = 'FollowUpActionsDesignConfigRepresentation') {
717
717
  const v_error = (() => {
718
718
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
719
719
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -736,7 +736,7 @@ function validate$i(obj, path = 'FollowUpActionsDesignConfigRepresentation') {
736
736
  return v_error === undefined ? null : v_error;
737
737
  }
738
738
 
739
- function validate$h(obj, path = 'FollowUpActionsRenditionConfigRepresentation') {
739
+ function validate$k(obj, path = 'FollowUpActionsRenditionConfigRepresentation') {
740
740
  const v_error = (() => {
741
741
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
742
742
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -759,7 +759,7 @@ function validate$h(obj, path = 'FollowUpActionsRenditionConfigRepresentation')
759
759
  return v_error === undefined ? null : v_error;
760
760
  }
761
761
 
762
- function validate$g(obj, path = 'FollowUpActionsFilterConfigRepresentation') {
762
+ function validate$j(obj, path = 'FollowUpActionsFilterConfigRepresentation') {
763
763
  const v_error = (() => {
764
764
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
765
765
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -782,7 +782,7 @@ function validate$g(obj, path = 'FollowUpActionsFilterConfigRepresentation') {
782
782
  return v_error === undefined ? null : v_error;
783
783
  }
784
784
 
785
- function validate$f(obj, path = 'FollowUpActionsSchemaConfigRepresentation') {
785
+ function validate$i(obj, path = 'FollowUpActionsSchemaConfigRepresentation') {
786
786
  const v_error = (() => {
787
787
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
788
788
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -790,7 +790,7 @@ function validate$f(obj, path = 'FollowUpActionsSchemaConfigRepresentation') {
790
790
  if (obj.filterConfig !== undefined) {
791
791
  const obj_filterConfig = obj.filterConfig;
792
792
  const path_filterConfig = path + '.filterConfig';
793
- const referencepath_filterConfigValidationError = validate$g(obj_filterConfig, path_filterConfig);
793
+ const referencepath_filterConfigValidationError = validate$j(obj_filterConfig, path_filterConfig);
794
794
  if (referencepath_filterConfigValidationError !== null) {
795
795
  let message = 'Object doesn\'t match FollowUpActionsFilterConfigRepresentation (at "' + path_filterConfig + '")\n';
796
796
  message += referencepath_filterConfigValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -808,7 +808,7 @@ function validate$f(obj, path = 'FollowUpActionsSchemaConfigRepresentation') {
808
808
  return v_error === undefined ? null : v_error;
809
809
  }
810
810
 
811
- function validate$e(obj, path = 'FollowUpActionsSourceDescriptorRepresentation') {
811
+ function validate$h(obj, path = 'FollowUpActionsSourceDescriptorRepresentation') {
812
812
  const v_error = (() => {
813
813
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
814
814
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -831,7 +831,7 @@ function validate$e(obj, path = 'FollowUpActionsSourceDescriptorRepresentation')
831
831
  return v_error === undefined ? null : v_error;
832
832
  }
833
833
 
834
- function validate$d(obj, path = 'FollowUpActionsInputRepresentation') {
834
+ function validate$g(obj, path = 'FollowUpActionsInputRepresentation') {
835
835
  const v_error = (() => {
836
836
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
837
837
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -844,7 +844,7 @@ function validate$d(obj, path = 'FollowUpActionsInputRepresentation') {
844
844
  if (obj.designConfig !== undefined) {
845
845
  const obj_designConfig = obj.designConfig;
846
846
  const path_designConfig = path + '.designConfig';
847
- const referencepath_designConfigValidationError = validate$i(obj_designConfig, path_designConfig);
847
+ const referencepath_designConfigValidationError = validate$l(obj_designConfig, path_designConfig);
848
848
  if (referencepath_designConfigValidationError !== null) {
849
849
  let message = 'Object doesn\'t match FollowUpActionsDesignConfigRepresentation (at "' + path_designConfig + '")\n';
850
850
  message += referencepath_designConfigValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -854,7 +854,7 @@ function validate$d(obj, path = 'FollowUpActionsInputRepresentation') {
854
854
  if (obj.renditionConfig !== undefined) {
855
855
  const obj_renditionConfig = obj.renditionConfig;
856
856
  const path_renditionConfig = path + '.renditionConfig';
857
- const referencepath_renditionConfigValidationError = validate$h(obj_renditionConfig, path_renditionConfig);
857
+ const referencepath_renditionConfigValidationError = validate$k(obj_renditionConfig, path_renditionConfig);
858
858
  if (referencepath_renditionConfigValidationError !== null) {
859
859
  let message = 'Object doesn\'t match FollowUpActionsRenditionConfigRepresentation (at "' + path_renditionConfig + '")\n';
860
860
  message += referencepath_renditionConfigValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -864,7 +864,7 @@ function validate$d(obj, path = 'FollowUpActionsInputRepresentation') {
864
864
  if (obj.schemaConfig !== undefined) {
865
865
  const obj_schemaConfig = obj.schemaConfig;
866
866
  const path_schemaConfig = path + '.schemaConfig';
867
- const referencepath_schemaConfigValidationError = validate$f(obj_schemaConfig, path_schemaConfig);
867
+ const referencepath_schemaConfigValidationError = validate$i(obj_schemaConfig, path_schemaConfig);
868
868
  if (referencepath_schemaConfigValidationError !== null) {
869
869
  let message = 'Object doesn\'t match FollowUpActionsSchemaConfigRepresentation (at "' + path_schemaConfig + '")\n';
870
870
  message += referencepath_schemaConfigValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -874,7 +874,7 @@ function validate$d(obj, path = 'FollowUpActionsInputRepresentation') {
874
874
  if (obj.sourceDescriptor !== undefined) {
875
875
  const obj_sourceDescriptor = obj.sourceDescriptor;
876
876
  const path_sourceDescriptor = path + '.sourceDescriptor';
877
- const referencepath_sourceDescriptorValidationError = validate$e(obj_sourceDescriptor, path_sourceDescriptor);
877
+ const referencepath_sourceDescriptorValidationError = validate$h(obj_sourceDescriptor, path_sourceDescriptor);
878
878
  if (referencepath_sourceDescriptorValidationError !== null) {
879
879
  let message = 'Object doesn\'t match FollowUpActionsSourceDescriptorRepresentation (at "' + path_sourceDescriptor + '")\n';
880
880
  message += referencepath_sourceDescriptorValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -885,8 +885,8 @@ function validate$d(obj, path = 'FollowUpActionsInputRepresentation') {
885
885
  return v_error === undefined ? null : v_error;
886
886
  }
887
887
 
888
- const VERSION$b = "f3b8da658dda1468e0357f1fad159c79";
889
- function validate$c(obj, path = 'FollowUpActionsRepresentation') {
888
+ const VERSION$e = "f3b8da658dda1468e0357f1fad159c79";
889
+ function validate$f(obj, path = 'FollowUpActionsRepresentation') {
890
890
  const v_error = (() => {
891
891
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
892
892
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -904,10 +904,10 @@ function validate$c(obj, path = 'FollowUpActionsRepresentation') {
904
904
  })();
905
905
  return v_error === undefined ? null : v_error;
906
906
  }
907
- const select$g = function FollowUpActionsRepresentationSelect() {
907
+ const select$l = function FollowUpActionsRepresentationSelect() {
908
908
  return {
909
909
  kind: 'Fragment',
910
- version: VERSION$b,
910
+ version: VERSION$e,
911
911
  private: [],
912
912
  selections: [
913
913
  {
@@ -923,7 +923,7 @@ const select$g = function FollowUpActionsRepresentationSelect() {
923
923
  ]
924
924
  };
925
925
  };
926
- function equals$b(existing, incoming) {
926
+ function equals$e(existing, incoming) {
927
927
  const existing_actions = existing.actions;
928
928
  const incoming_actions = incoming.actions;
929
929
  if (JSONStringify(incoming_actions) !== JSONStringify(existing_actions)) {
@@ -937,9 +937,9 @@ function equals$b(existing, incoming) {
937
937
  return true;
938
938
  }
939
939
 
940
- const TTL$5 = 900000;
941
- const VERSION$a = "280b43a12fefd5d1adb432fd664b7def";
942
- function validate$b(obj, path = 'CopilotFollowUpActionsRepresentation') {
940
+ const TTL$7 = 900000;
941
+ const VERSION$d = "280b43a12fefd5d1adb432fd664b7def";
942
+ function validate$e(obj, path = 'CopilotFollowUpActionsRepresentation') {
943
943
  const v_error = (() => {
944
944
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
945
945
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -952,7 +952,7 @@ function validate$b(obj, path = 'CopilotFollowUpActionsRepresentation') {
952
952
  for (let i = 0; i < obj_actions.length; i++) {
953
953
  const obj_actions_item = obj_actions[i];
954
954
  const path_actions_item = path_actions + '[' + i + ']';
955
- const referencepath_actions_itemValidationError = validate$c(obj_actions_item, path_actions_item);
955
+ const referencepath_actions_itemValidationError = validate$f(obj_actions_item, path_actions_item);
956
956
  if (referencepath_actions_itemValidationError !== null) {
957
957
  let message = 'Object doesn\'t match FollowUpActionsRepresentation (at "' + path_actions_item + '")\n';
958
958
  message += referencepath_actions_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -974,15 +974,15 @@ function validate$b(obj, path = 'CopilotFollowUpActionsRepresentation') {
974
974
  })();
975
975
  return v_error === undefined ? null : v_error;
976
976
  }
977
- const RepresentationType$5 = 'CopilotFollowUpActionsRepresentation';
978
- function normalize$5(input, existing, path, luvio, store, timestamp) {
977
+ const RepresentationType$7 = 'CopilotFollowUpActionsRepresentation';
978
+ function normalize$7(input, existing, path, luvio, store, timestamp) {
979
979
  return input;
980
980
  }
981
- const select$f = function CopilotFollowUpActionsRepresentationSelect() {
982
- const { selections: FollowUpActionsRepresentation__selections, opaque: FollowUpActionsRepresentation__opaque, } = select$g();
981
+ const select$k = function CopilotFollowUpActionsRepresentationSelect() {
982
+ const { selections: FollowUpActionsRepresentation__selections, opaque: FollowUpActionsRepresentation__opaque, } = select$l();
983
983
  return {
984
984
  kind: 'Fragment',
985
- version: VERSION$a,
985
+ version: VERSION$d,
986
986
  private: [],
987
987
  selections: [
988
988
  {
@@ -1003,7 +1003,7 @@ const select$f = function CopilotFollowUpActionsRepresentationSelect() {
1003
1003
  ]
1004
1004
  };
1005
1005
  };
1006
- function equals$a(existing, incoming) {
1006
+ function equals$d(existing, incoming) {
1007
1007
  const existing_isSuccess = existing.isSuccess;
1008
1008
  const incoming_isSuccess = incoming.isSuccess;
1009
1009
  if (!(existing_isSuccess === incoming_isSuccess)) {
@@ -1025,7 +1025,7 @@ function equals$a(existing, incoming) {
1025
1025
  const existing_actions = existing.actions;
1026
1026
  const incoming_actions = incoming.actions;
1027
1027
  const equals_actions_items = equalsArray(existing_actions, incoming_actions, (existing_actions_item, incoming_actions_item) => {
1028
- if (!(equals$b(existing_actions_item, incoming_actions_item))) {
1028
+ if (!(equals$e(existing_actions_item, incoming_actions_item))) {
1029
1029
  return false;
1030
1030
  }
1031
1031
  });
@@ -1034,44 +1034,44 @@ function equals$a(existing, incoming) {
1034
1034
  }
1035
1035
  return true;
1036
1036
  }
1037
- const ingest$5 = function CopilotFollowUpActionsRepresentationIngest(input, path, luvio, store, timestamp) {
1037
+ const ingest$7 = function CopilotFollowUpActionsRepresentationIngest(input, path, luvio, store, timestamp) {
1038
1038
  if (process.env.NODE_ENV !== 'production') {
1039
- const validateError = validate$b(input);
1039
+ const validateError = validate$e(input);
1040
1040
  if (validateError !== null) {
1041
1041
  throw validateError;
1042
1042
  }
1043
1043
  }
1044
1044
  const key = path.fullPath;
1045
- const ttlToUse = TTL$5;
1046
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$5, "einstein-copilot-bot", VERSION$a, RepresentationType$5, equals$a);
1045
+ const ttlToUse = TTL$7;
1046
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$7, "einstein-copilot-bot", VERSION$d, RepresentationType$7, equals$d);
1047
1047
  return createLink(key);
1048
1048
  };
1049
- function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
1049
+ function getTypeCacheKeys$7(rootKeySet, luvio, input, fullPathFactory) {
1050
1050
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1051
1051
  const rootKey = fullPathFactory();
1052
1052
  rootKeySet.set(rootKey, {
1053
1053
  namespace: keyPrefix,
1054
- representationName: RepresentationType$5,
1054
+ representationName: RepresentationType$7,
1055
1055
  mergeable: false
1056
1056
  });
1057
1057
  }
1058
1058
 
1059
- function select$e(luvio, params) {
1060
- return select$f();
1059
+ function select$j(luvio, params) {
1060
+ return select$k();
1061
1061
  }
1062
- function keyBuilder$8(luvio, params) {
1062
+ function keyBuilder$c(luvio, params) {
1063
1063
  return keyPrefix + '::CopilotFollowUpActionsRepresentation:(' + (params.body.language === undefined ? 'language' : 'language:' + params.body.language) + '::' + '[' + params.body.followUpActionsInputs.map(element => { var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t; return 'followUpActionsInputs.descriptor:' + element.descriptor + '::' + (((_a = element.sourceDescriptor) === null || _a === void 0 ? void 0 : _a.descriptor) === undefined ? 'followUpActionsInputs.sourceDescriptor.descriptor' : 'followUpActionsInputs.sourceDescriptor.descriptor:' + ((_b = element.sourceDescriptor) === null || _b === void 0 ? void 0 : _b.descriptor)) + '::' + (((_c = element.sourceDescriptor) === null || _c === void 0 ? void 0 : _c.propertyName) === undefined ? 'followUpActionsInputs.sourceDescriptor.propertyName' : 'followUpActionsInputs.sourceDescriptor.propertyName:' + ((_d = element.sourceDescriptor) === null || _d === void 0 ? void 0 : _d.propertyName)) + '::' + (((_e = element.schemaConfig) === null || _e === void 0 ? void 0 : _e.subSchemaDefinitions) === undefined ? 'followUpActionsInputs.schemaConfig.subSchemaDefinitions' : 'followUpActionsInputs.schemaConfig.subSchemaDefinitions:' + ((_f = element.schemaConfig) === null || _f === void 0 ? void 0 : _f.subSchemaDefinitions)) + '::' + (((_h = (_g = element.schemaConfig) === null || _g === void 0 ? void 0 : _g.filterConfig) === null || _h === void 0 ? void 0 : _h.propertyNames) === undefined ? 'followUpActionsInputs.schemaConfig.filterConfig.propertyNames' : 'followUpActionsInputs.schemaConfig.filterConfig.propertyNames:' + ((_k = (_j = element.schemaConfig) === null || _j === void 0 ? void 0 : _j.filterConfig) === null || _k === void 0 ? void 0 : _k.propertyNames)) + '::' + (((_l = element.designConfig) === null || _l === void 0 ? void 0 : _l.target) === undefined ? 'followUpActionsInputs.designConfig.target' : 'followUpActionsInputs.designConfig.target:' + ((_m = element.designConfig) === null || _m === void 0 ? void 0 : _m.target)) + '::' + (((_o = element.designConfig) === null || _o === void 0 ? void 0 : _o.subViewDefinitions) === undefined ? 'followUpActionsInputs.designConfig.subViewDefinitions' : 'followUpActionsInputs.designConfig.subViewDefinitions:' + ((_p = element.designConfig) === null || _p === void 0 ? void 0 : _p.subViewDefinitions)) + '::' + (((_q = element.renditionConfig) === null || _q === void 0 ? void 0 : _q.target) === undefined ? 'followUpActionsInputs.renditionConfig.target' : 'followUpActionsInputs.renditionConfig.target:' + ((_r = element.renditionConfig) === null || _r === void 0 ? void 0 : _r.target)) + '::' + (((_s = element.renditionConfig) === null || _s === void 0 ? void 0 : _s.subViewDefinitions) === undefined ? 'followUpActionsInputs.renditionConfig.subViewDefinitions' : 'followUpActionsInputs.renditionConfig.subViewDefinitions:' + ((_t = element.renditionConfig) === null || _t === void 0 ? void 0 : _t.subViewDefinitions)); }).join(',') + ']' + ')';
1064
1064
  }
1065
- function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
1066
- getTypeCacheKeys$5(storeKeyMap, luvio, response, () => keyBuilder$8(luvio, resourceParams));
1065
+ function getResponseCacheKeys$6(storeKeyMap, luvio, resourceParams, response) {
1066
+ getTypeCacheKeys$7(storeKeyMap, luvio, response, () => keyBuilder$c(luvio, resourceParams));
1067
1067
  }
1068
- function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
1068
+ function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
1069
1069
  const { body } = response;
1070
- const key = keyBuilder$8(luvio, resourceParams);
1071
- luvio.storeIngest(key, ingest$5, body);
1070
+ const key = keyBuilder$c(luvio, resourceParams);
1071
+ luvio.storeIngest(key, ingest$7, body);
1072
1072
  const snapshot = luvio.storeLookup({
1073
1073
  recordId: key,
1074
- node: select$e(),
1074
+ node: select$j(),
1075
1075
  variables: {},
1076
1076
  }, snapshotRefresh);
1077
1077
  if (process.env.NODE_ENV !== 'production') {
@@ -1082,19 +1082,19 @@ function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
1082
1082
  deepFreeze(snapshot.data);
1083
1083
  return snapshot;
1084
1084
  }
1085
- function ingestError$2(luvio, params, error, snapshotRefresh) {
1086
- const key = keyBuilder$8(luvio, params);
1085
+ function ingestError$4(luvio, params, error, snapshotRefresh) {
1086
+ const key = keyBuilder$c(luvio, params);
1087
1087
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1088
1088
  const storeMetadataParams = {
1089
- ttl: TTL$5,
1089
+ ttl: TTL$7,
1090
1090
  namespace: keyPrefix,
1091
- version: VERSION$a,
1092
- representationName: RepresentationType$5
1091
+ version: VERSION$d,
1092
+ representationName: RepresentationType$7
1093
1093
  };
1094
1094
  luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
1095
1095
  return errorSnapshot;
1096
1096
  }
1097
- function createResourceRequest$4(config) {
1097
+ function createResourceRequest$6(config) {
1098
1098
  const headers = {};
1099
1099
  return {
1100
1100
  baseUri: '/services/data/v62.0',
@@ -1108,26 +1108,26 @@ function createResourceRequest$4(config) {
1108
1108
  };
1109
1109
  }
1110
1110
 
1111
- const adapterName$4 = 'getFollowUpActions';
1111
+ const adapterName$6 = 'getFollowUpActions';
1112
1112
  const getFollowUpActions_ConfigPropertyMetadata = [
1113
1113
  generateParamConfigMetadata('language', false, 2 /* Body */, 0 /* String */),
1114
1114
  generateParamConfigMetadata('followUpActionsInputs', true, 2 /* Body */, 4 /* Unsupported */, true),
1115
1115
  ];
1116
- const getFollowUpActions_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getFollowUpActions_ConfigPropertyMetadata);
1117
- const createResourceParams$4 = /*#__PURE__*/ createResourceParams$7(getFollowUpActions_ConfigPropertyMetadata);
1118
- function keyBuilder$7(luvio, config) {
1119
- const resourceParams = createResourceParams$4(config);
1120
- return keyBuilder$8(luvio, resourceParams);
1116
+ const getFollowUpActions_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, getFollowUpActions_ConfigPropertyMetadata);
1117
+ const createResourceParams$6 = /*#__PURE__*/ createResourceParams$9(getFollowUpActions_ConfigPropertyMetadata);
1118
+ function keyBuilder$b(luvio, config) {
1119
+ const resourceParams = createResourceParams$6(config);
1120
+ return keyBuilder$c(luvio, resourceParams);
1121
1121
  }
1122
- function typeCheckConfig$4(untrustedConfig) {
1122
+ function typeCheckConfig$6(untrustedConfig) {
1123
1123
  const config = {};
1124
- typeCheckConfig$7(untrustedConfig, config, getFollowUpActions_ConfigPropertyMetadata);
1124
+ typeCheckConfig$9(untrustedConfig, config, getFollowUpActions_ConfigPropertyMetadata);
1125
1125
  const untrustedConfig_followUpActionsInputs = untrustedConfig.followUpActionsInputs;
1126
1126
  if (ArrayIsArray$1(untrustedConfig_followUpActionsInputs)) {
1127
1127
  const untrustedConfig_followUpActionsInputs_array = [];
1128
1128
  for (let i = 0, arrayLength = untrustedConfig_followUpActionsInputs.length; i < arrayLength; i++) {
1129
1129
  const untrustedConfig_followUpActionsInputs_item = untrustedConfig_followUpActionsInputs[i];
1130
- const referenceFollowUpActionsInputRepresentationValidationError = validate$d(untrustedConfig_followUpActionsInputs_item);
1130
+ const referenceFollowUpActionsInputRepresentationValidationError = validate$g(untrustedConfig_followUpActionsInputs_item);
1131
1131
  if (referenceFollowUpActionsInputRepresentationValidationError === null) {
1132
1132
  untrustedConfig_followUpActionsInputs_array.push(untrustedConfig_followUpActionsInputs_item);
1133
1133
  }
@@ -1136,79 +1136,79 @@ function typeCheckConfig$4(untrustedConfig) {
1136
1136
  }
1137
1137
  return config;
1138
1138
  }
1139
- function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
1139
+ function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
1140
1140
  if (!untrustedIsObject(untrustedConfig)) {
1141
1141
  return null;
1142
1142
  }
1143
1143
  if (process.env.NODE_ENV !== 'production') {
1144
1144
  validateConfig(untrustedConfig, configPropertyNames);
1145
1145
  }
1146
- const config = typeCheckConfig$4(untrustedConfig);
1146
+ const config = typeCheckConfig$6(untrustedConfig);
1147
1147
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
1148
1148
  return null;
1149
1149
  }
1150
1150
  return config;
1151
1151
  }
1152
- function adapterFragment$2(luvio, config) {
1153
- createResourceParams$4(config);
1154
- return select$e();
1152
+ function adapterFragment$4(luvio, config) {
1153
+ createResourceParams$6(config);
1154
+ return select$j();
1155
1155
  }
1156
- function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
1157
- const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
1156
+ function onFetchResponseSuccess$4(luvio, config, resourceParams, response) {
1157
+ const snapshot = ingestSuccess$6(luvio, resourceParams, response, {
1158
1158
  config,
1159
- resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
1159
+ resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
1160
1160
  });
1161
1161
  return luvio.storeBroadcast().then(() => snapshot);
1162
1162
  }
1163
- function onFetchResponseError$2(luvio, config, resourceParams, response) {
1164
- const snapshot = ingestError$2(luvio, resourceParams, response, {
1163
+ function onFetchResponseError$4(luvio, config, resourceParams, response) {
1164
+ const snapshot = ingestError$4(luvio, resourceParams, response, {
1165
1165
  config,
1166
- resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
1166
+ resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
1167
1167
  });
1168
1168
  return luvio.storeBroadcast().then(() => snapshot);
1169
1169
  }
1170
- function buildNetworkSnapshot$4(luvio, config, options) {
1171
- const resourceParams = createResourceParams$4(config);
1172
- const request = createResourceRequest$4(resourceParams);
1170
+ function buildNetworkSnapshot$6(luvio, config, options) {
1171
+ const resourceParams = createResourceParams$6(config);
1172
+ const request = createResourceRequest$6(resourceParams);
1173
1173
  return luvio.dispatchResourceRequest(request, options)
1174
1174
  .then((response) => {
1175
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
1175
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$4(luvio, config, resourceParams, response), () => {
1176
1176
  const cache = new StoreKeyMap();
1177
- getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
1177
+ getResponseCacheKeys$6(cache, luvio, resourceParams, response.body);
1178
1178
  return cache;
1179
1179
  });
1180
1180
  }, (response) => {
1181
- return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
1181
+ return luvio.handleErrorResponse(() => onFetchResponseError$4(luvio, config, resourceParams, response));
1182
1182
  });
1183
1183
  }
1184
- function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
1185
- return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, 'get', false);
1184
+ function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
1185
+ return buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext, buildNetworkSnapshot$6, 'get', false);
1186
1186
  }
1187
- function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
1187
+ function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
1188
1188
  const { luvio, config } = context;
1189
1189
  const selector = {
1190
- recordId: keyBuilder$7(luvio, config),
1191
- node: adapterFragment$2(luvio, config),
1190
+ recordId: keyBuilder$b(luvio, config),
1191
+ node: adapterFragment$4(luvio, config),
1192
1192
  variables: {},
1193
1193
  };
1194
1194
  const cacheSnapshot = storeLookup(selector, {
1195
1195
  config,
1196
- resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
1196
+ resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
1197
1197
  });
1198
1198
  return cacheSnapshot;
1199
1199
  }
1200
1200
  const getFollowUpActionsAdapterFactory = (luvio) => function einsteinCopilotBot__getFollowUpActions(untrustedConfig, requestContext) {
1201
- const config = validateAdapterConfig$4(untrustedConfig, getFollowUpActions_ConfigPropertyNames);
1201
+ const config = validateAdapterConfig$6(untrustedConfig, getFollowUpActions_ConfigPropertyNames);
1202
1202
  // Invalid or incomplete config
1203
1203
  if (config === null) {
1204
1204
  return null;
1205
1205
  }
1206
1206
  return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
1207
- buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
1207
+ buildCachedSnapshotCachePolicy$4, buildNetworkSnapshotCachePolicy$4);
1208
1208
  };
1209
1209
 
1210
- const VERSION$9 = "3d8b52828ddd11f23f898b0bba8db802";
1211
- function validate$a(obj, path = 'CopilotQuickActionRepresentation') {
1210
+ const VERSION$c = "3d8b52828ddd11f23f898b0bba8db802";
1211
+ function validate$d(obj, path = 'CopilotQuickActionRepresentation') {
1212
1212
  const v_error = (() => {
1213
1213
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1214
1214
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -1330,10 +1330,10 @@ function validate$a(obj, path = 'CopilotQuickActionRepresentation') {
1330
1330
  })();
1331
1331
  return v_error === undefined ? null : v_error;
1332
1332
  }
1333
- const select$d = function CopilotQuickActionRepresentationSelect() {
1333
+ const select$i = function CopilotQuickActionRepresentationSelect() {
1334
1334
  return {
1335
1335
  kind: 'Fragment',
1336
- version: VERSION$9,
1336
+ version: VERSION$c,
1337
1337
  private: [],
1338
1338
  selections: [
1339
1339
  {
@@ -1415,7 +1415,7 @@ const select$d = function CopilotQuickActionRepresentationSelect() {
1415
1415
  ]
1416
1416
  };
1417
1417
  };
1418
- function equals$9(existing, incoming) {
1418
+ function equals$c(existing, incoming) {
1419
1419
  const existing_isGlobal = existing.isGlobal;
1420
1420
  const incoming_isGlobal = incoming.isGlobal;
1421
1421
  // if at least one of these optionals is defined
@@ -1572,75 +1572,688 @@ function equals$9(existing, incoming) {
1572
1572
  return false;
1573
1573
  }
1574
1574
  }
1575
- const existing_type = existing.type;
1576
- const incoming_type = incoming.type;
1577
- // if at least one of these optionals is defined
1578
- if (existing_type !== undefined || incoming_type !== undefined) {
1579
- // if one of these is not defined we know the other is defined and therefore
1580
- // not equal
1581
- if (existing_type === undefined || incoming_type === undefined) {
1582
- return false;
1583
- }
1584
- if (!(existing_type === incoming_type)) {
1585
- return false;
1586
- }
1575
+ const existing_type = existing.type;
1576
+ const incoming_type = incoming.type;
1577
+ // if at least one of these optionals is defined
1578
+ if (existing_type !== undefined || incoming_type !== undefined) {
1579
+ // if one of these is not defined we know the other is defined and therefore
1580
+ // not equal
1581
+ if (existing_type === undefined || incoming_type === undefined) {
1582
+ return false;
1583
+ }
1584
+ if (!(existing_type === incoming_type)) {
1585
+ return false;
1586
+ }
1587
+ }
1588
+ const existing_userUtterance = existing.userUtterance;
1589
+ const incoming_userUtterance = incoming.userUtterance;
1590
+ // if at least one of these optionals is defined
1591
+ if (existing_userUtterance !== undefined || incoming_userUtterance !== undefined) {
1592
+ // if one of these is not defined we know the other is defined and therefore
1593
+ // not equal
1594
+ if (existing_userUtterance === undefined || incoming_userUtterance === undefined) {
1595
+ return false;
1596
+ }
1597
+ if (!(existing_userUtterance === incoming_userUtterance)) {
1598
+ return false;
1599
+ }
1600
+ }
1601
+ const existing_planTemplateInput = existing.planTemplateInput;
1602
+ const incoming_planTemplateInput = incoming.planTemplateInput;
1603
+ // if at least one of these optionals is defined
1604
+ if (existing_planTemplateInput !== undefined || incoming_planTemplateInput !== undefined) {
1605
+ // if one of these is not defined we know the other is defined and therefore
1606
+ // not equal
1607
+ if (existing_planTemplateInput === undefined || incoming_planTemplateInput === undefined) {
1608
+ return false;
1609
+ }
1610
+ const equals_planTemplateInput_props = equalsObject(existing_planTemplateInput, incoming_planTemplateInput, (existing_planTemplateInput_prop, incoming_planTemplateInput_prop) => {
1611
+ if (!(existing_planTemplateInput_prop === incoming_planTemplateInput_prop)) {
1612
+ return false;
1613
+ }
1614
+ });
1615
+ if (equals_planTemplateInput_props === false) {
1616
+ return false;
1617
+ }
1618
+ }
1619
+ return true;
1620
+ }
1621
+
1622
+ const TTL$6 = 900000;
1623
+ const VERSION$b = "122e61b0db6dc38d244a87570efc5522";
1624
+ function validate$c(obj, path = 'RecommendedActionsRepresentation') {
1625
+ const v_error = (() => {
1626
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1627
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1628
+ }
1629
+ const obj_copilotQuickActions = obj.copilotQuickActions;
1630
+ const path_copilotQuickActions = path + '.copilotQuickActions';
1631
+ if (!ArrayIsArray(obj_copilotQuickActions)) {
1632
+ return new TypeError('Expected "array" but received "' + typeof obj_copilotQuickActions + '" (at "' + path_copilotQuickActions + '")');
1633
+ }
1634
+ for (let i = 0; i < obj_copilotQuickActions.length; i++) {
1635
+ const obj_copilotQuickActions_item = obj_copilotQuickActions[i];
1636
+ const path_copilotQuickActions_item = path_copilotQuickActions + '[' + i + ']';
1637
+ const referencepath_copilotQuickActions_itemValidationError = validate$d(obj_copilotQuickActions_item, path_copilotQuickActions_item);
1638
+ if (referencepath_copilotQuickActions_itemValidationError !== null) {
1639
+ let message = 'Object doesn\'t match CopilotQuickActionRepresentation (at "' + path_copilotQuickActions_item + '")\n';
1640
+ message += referencepath_copilotQuickActions_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1641
+ return new TypeError(message);
1642
+ }
1643
+ }
1644
+ if (obj.errorMessage !== undefined) {
1645
+ const obj_errorMessage = obj.errorMessage;
1646
+ const path_errorMessage = path + '.errorMessage';
1647
+ if (typeof obj_errorMessage !== 'string') {
1648
+ return new TypeError('Expected "string" but received "' + typeof obj_errorMessage + '" (at "' + path_errorMessage + '")');
1649
+ }
1650
+ }
1651
+ const obj_isSuccess = obj.isSuccess;
1652
+ const path_isSuccess = path + '.isSuccess';
1653
+ if (typeof obj_isSuccess !== 'boolean') {
1654
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isSuccess + '" (at "' + path_isSuccess + '")');
1655
+ }
1656
+ })();
1657
+ return v_error === undefined ? null : v_error;
1658
+ }
1659
+ const RepresentationType$6 = 'RecommendedActionsRepresentation';
1660
+ function normalize$6(input, existing, path, luvio, store, timestamp) {
1661
+ return input;
1662
+ }
1663
+ const select$h = function RecommendedActionsRepresentationSelect() {
1664
+ const { selections: CopilotQuickActionRepresentation__selections, opaque: CopilotQuickActionRepresentation__opaque, } = select$i();
1665
+ return {
1666
+ kind: 'Fragment',
1667
+ version: VERSION$b,
1668
+ private: [],
1669
+ selections: [
1670
+ {
1671
+ name: 'copilotQuickActions',
1672
+ kind: 'Object',
1673
+ plural: true,
1674
+ selections: CopilotQuickActionRepresentation__selections
1675
+ },
1676
+ {
1677
+ name: 'errorMessage',
1678
+ kind: 'Scalar',
1679
+ required: false
1680
+ },
1681
+ {
1682
+ name: 'isSuccess',
1683
+ kind: 'Scalar'
1684
+ }
1685
+ ]
1686
+ };
1687
+ };
1688
+ function equals$b(existing, incoming) {
1689
+ const existing_isSuccess = existing.isSuccess;
1690
+ const incoming_isSuccess = incoming.isSuccess;
1691
+ if (!(existing_isSuccess === incoming_isSuccess)) {
1692
+ return false;
1693
+ }
1694
+ const existing_errorMessage = existing.errorMessage;
1695
+ const incoming_errorMessage = incoming.errorMessage;
1696
+ // if at least one of these optionals is defined
1697
+ if (existing_errorMessage !== undefined || incoming_errorMessage !== undefined) {
1698
+ // if one of these is not defined we know the other is defined and therefore
1699
+ // not equal
1700
+ if (existing_errorMessage === undefined || incoming_errorMessage === undefined) {
1701
+ return false;
1702
+ }
1703
+ if (!(existing_errorMessage === incoming_errorMessage)) {
1704
+ return false;
1705
+ }
1706
+ }
1707
+ const existing_copilotQuickActions = existing.copilotQuickActions;
1708
+ const incoming_copilotQuickActions = incoming.copilotQuickActions;
1709
+ const equals_copilotQuickActions_items = equalsArray(existing_copilotQuickActions, incoming_copilotQuickActions, (existing_copilotQuickActions_item, incoming_copilotQuickActions_item) => {
1710
+ if (!(equals$c(existing_copilotQuickActions_item, incoming_copilotQuickActions_item))) {
1711
+ return false;
1712
+ }
1713
+ });
1714
+ if (equals_copilotQuickActions_items === false) {
1715
+ return false;
1716
+ }
1717
+ return true;
1718
+ }
1719
+ const ingest$6 = function RecommendedActionsRepresentationIngest(input, path, luvio, store, timestamp) {
1720
+ if (process.env.NODE_ENV !== 'production') {
1721
+ const validateError = validate$c(input);
1722
+ if (validateError !== null) {
1723
+ throw validateError;
1724
+ }
1725
+ }
1726
+ const key = path.fullPath;
1727
+ const ttlToUse = TTL$6;
1728
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$6, "einstein-copilot-bot", VERSION$b, RepresentationType$6, equals$b);
1729
+ return createLink(key);
1730
+ };
1731
+ function getTypeCacheKeys$6(rootKeySet, luvio, input, fullPathFactory) {
1732
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1733
+ const rootKey = fullPathFactory();
1734
+ rootKeySet.set(rootKey, {
1735
+ namespace: keyPrefix,
1736
+ representationName: RepresentationType$6,
1737
+ mergeable: false
1738
+ });
1739
+ }
1740
+
1741
+ function select$g(luvio, params) {
1742
+ return select$h();
1743
+ }
1744
+ function keyBuilder$a(luvio, params) {
1745
+ return keyPrefix + '::RecommendedActionsRepresentation:(' + 'pageName:' + params.queryParams.pageName + ',' + 'pageType:' + params.queryParams.pageType + ',' + 'actionName:' + params.queryParams.actionName + ',' + 'objectApiName:' + params.queryParams.objectApiName + ',' + 'customApplicationName:' + params.queryParams.customApplicationName + ',' + 'sessionId:' + params.queryParams.sessionId + ',' + 'formFactor:' + params.queryParams.formFactor + ')';
1746
+ }
1747
+ function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
1748
+ getTypeCacheKeys$6(storeKeyMap, luvio, response, () => keyBuilder$a(luvio, resourceParams));
1749
+ }
1750
+ function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
1751
+ const { body } = response;
1752
+ const key = keyBuilder$a(luvio, resourceParams);
1753
+ luvio.storeIngest(key, ingest$6, body);
1754
+ const snapshot = luvio.storeLookup({
1755
+ recordId: key,
1756
+ node: select$g(),
1757
+ variables: {},
1758
+ }, snapshotRefresh);
1759
+ if (process.env.NODE_ENV !== 'production') {
1760
+ if (snapshot.state !== 'Fulfilled') {
1761
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1762
+ }
1763
+ }
1764
+ deepFreeze(snapshot.data);
1765
+ return snapshot;
1766
+ }
1767
+ function ingestError$3(luvio, params, error, snapshotRefresh) {
1768
+ const key = keyBuilder$a(luvio, params);
1769
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1770
+ const storeMetadataParams = {
1771
+ ttl: TTL$6,
1772
+ namespace: keyPrefix,
1773
+ version: VERSION$b,
1774
+ representationName: RepresentationType$6
1775
+ };
1776
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
1777
+ return errorSnapshot;
1778
+ }
1779
+ function createResourceRequest$5(config) {
1780
+ const headers = {};
1781
+ return {
1782
+ baseUri: '/services/data/v62.0',
1783
+ basePath: '/connect/recommended-actions',
1784
+ method: 'get',
1785
+ body: null,
1786
+ urlParams: {},
1787
+ queryParams: config.queryParams,
1788
+ headers,
1789
+ priority: 'normal',
1790
+ };
1791
+ }
1792
+
1793
+ const adapterName$5 = 'getRecommendedActions';
1794
+ const getRecommendedActions_ConfigPropertyMetadata = [
1795
+ generateParamConfigMetadata('pageName', false, 1 /* QueryParameter */, 0 /* String */),
1796
+ generateParamConfigMetadata('pageType', true, 1 /* QueryParameter */, 0 /* String */),
1797
+ generateParamConfigMetadata('actionName', false, 1 /* QueryParameter */, 0 /* String */),
1798
+ generateParamConfigMetadata('objectApiName', false, 1 /* QueryParameter */, 0 /* String */),
1799
+ generateParamConfigMetadata('customApplicationName', true, 1 /* QueryParameter */, 0 /* String */),
1800
+ generateParamConfigMetadata('sessionId', true, 1 /* QueryParameter */, 0 /* String */),
1801
+ generateParamConfigMetadata('formFactor', true, 1 /* QueryParameter */, 0 /* String */),
1802
+ ];
1803
+ const getRecommendedActions_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, getRecommendedActions_ConfigPropertyMetadata);
1804
+ const createResourceParams$5 = /*#__PURE__*/ createResourceParams$9(getRecommendedActions_ConfigPropertyMetadata);
1805
+ function keyBuilder$9(luvio, config) {
1806
+ const resourceParams = createResourceParams$5(config);
1807
+ return keyBuilder$a(luvio, resourceParams);
1808
+ }
1809
+ function typeCheckConfig$5(untrustedConfig) {
1810
+ const config = {};
1811
+ typeCheckConfig$9(untrustedConfig, config, getRecommendedActions_ConfigPropertyMetadata);
1812
+ return config;
1813
+ }
1814
+ function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
1815
+ if (!untrustedIsObject(untrustedConfig)) {
1816
+ return null;
1817
+ }
1818
+ if (process.env.NODE_ENV !== 'production') {
1819
+ validateConfig(untrustedConfig, configPropertyNames);
1820
+ }
1821
+ const config = typeCheckConfig$5(untrustedConfig);
1822
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1823
+ return null;
1824
+ }
1825
+ return config;
1826
+ }
1827
+ function adapterFragment$3(luvio, config) {
1828
+ createResourceParams$5(config);
1829
+ return select$g();
1830
+ }
1831
+ function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
1832
+ const snapshot = ingestSuccess$5(luvio, resourceParams, response, {
1833
+ config,
1834
+ resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
1835
+ });
1836
+ return luvio.storeBroadcast().then(() => snapshot);
1837
+ }
1838
+ function onFetchResponseError$3(luvio, config, resourceParams, response) {
1839
+ const snapshot = ingestError$3(luvio, resourceParams, response, {
1840
+ config,
1841
+ resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
1842
+ });
1843
+ return luvio.storeBroadcast().then(() => snapshot);
1844
+ }
1845
+ function buildNetworkSnapshot$5(luvio, config, options) {
1846
+ const resourceParams = createResourceParams$5(config);
1847
+ const request = createResourceRequest$5(resourceParams);
1848
+ return luvio.dispatchResourceRequest(request, options)
1849
+ .then((response) => {
1850
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
1851
+ const cache = new StoreKeyMap();
1852
+ getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
1853
+ return cache;
1854
+ });
1855
+ }, (response) => {
1856
+ return luvio.handleErrorResponse(() => onFetchResponseError$3(luvio, config, resourceParams, response));
1857
+ });
1858
+ }
1859
+ function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
1860
+ return buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext, buildNetworkSnapshot$5, undefined, false);
1861
+ }
1862
+ function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
1863
+ const { luvio, config } = context;
1864
+ const selector = {
1865
+ recordId: keyBuilder$9(luvio, config),
1866
+ node: adapterFragment$3(luvio, config),
1867
+ variables: {},
1868
+ };
1869
+ const cacheSnapshot = storeLookup(selector, {
1870
+ config,
1871
+ resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
1872
+ });
1873
+ return cacheSnapshot;
1874
+ }
1875
+ const getRecommendedActionsAdapterFactory = (luvio) => function einsteinCopilotBot__getRecommendedActions(untrustedConfig, requestContext) {
1876
+ const config = validateAdapterConfig$5(untrustedConfig, getRecommendedActions_ConfigPropertyNames);
1877
+ // Invalid or incomplete config
1878
+ if (config === null) {
1879
+ return null;
1880
+ }
1881
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
1882
+ buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
1883
+ };
1884
+
1885
+ const VERSION$a = "504437088c2317480c651ac05a7565b5";
1886
+ function validate$b(obj, path = 'PlanTemplateRepresentation') {
1887
+ const v_error = (() => {
1888
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1889
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1890
+ }
1891
+ const obj_intent = obj.intent;
1892
+ const path_intent = path + '.intent';
1893
+ if (typeof obj_intent !== 'string') {
1894
+ return new TypeError('Expected "string" but received "' + typeof obj_intent + '" (at "' + path_intent + '")');
1895
+ }
1896
+ const obj_label = obj.label;
1897
+ const path_label = path + '.label';
1898
+ if (typeof obj_label !== 'string') {
1899
+ return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
1900
+ }
1901
+ const obj_planTemplateId = obj.planTemplateId;
1902
+ const path_planTemplateId = path + '.planTemplateId';
1903
+ if (typeof obj_planTemplateId !== 'string') {
1904
+ return new TypeError('Expected "string" but received "' + typeof obj_planTemplateId + '" (at "' + path_planTemplateId + '")');
1905
+ }
1906
+ const obj_userUtterance = obj.userUtterance;
1907
+ const path_userUtterance = path + '.userUtterance';
1908
+ if (typeof obj_userUtterance !== 'string') {
1909
+ return new TypeError('Expected "string" but received "' + typeof obj_userUtterance + '" (at "' + path_userUtterance + '")');
1910
+ }
1911
+ const obj_variables = obj.variables;
1912
+ const path_variables = path + '.variables';
1913
+ if (typeof obj_variables !== 'object' || ArrayIsArray(obj_variables) || obj_variables === null) {
1914
+ return new TypeError('Expected "object" but received "' + typeof obj_variables + '" (at "' + path_variables + '")');
1915
+ }
1916
+ const obj_variables_keys = ObjectKeys(obj_variables);
1917
+ for (let i = 0; i < obj_variables_keys.length; i++) {
1918
+ const key = obj_variables_keys[i];
1919
+ const obj_variables_prop = obj_variables[key];
1920
+ const path_variables_prop = path_variables + '["' + key + '"]';
1921
+ if (typeof obj_variables_prop !== 'string') {
1922
+ return new TypeError('Expected "string" but received "' + typeof obj_variables_prop + '" (at "' + path_variables_prop + '")');
1923
+ }
1924
+ }
1925
+ })();
1926
+ return v_error === undefined ? null : v_error;
1927
+ }
1928
+ const select$f = function PlanTemplateRepresentationSelect() {
1929
+ return {
1930
+ kind: 'Fragment',
1931
+ version: VERSION$a,
1932
+ private: [],
1933
+ selections: [
1934
+ {
1935
+ name: 'intent',
1936
+ kind: 'Scalar'
1937
+ },
1938
+ {
1939
+ name: 'label',
1940
+ kind: 'Scalar'
1941
+ },
1942
+ {
1943
+ name: 'planTemplateId',
1944
+ kind: 'Scalar'
1945
+ },
1946
+ {
1947
+ name: 'userUtterance',
1948
+ kind: 'Scalar'
1949
+ },
1950
+ {
1951
+ name: 'variables',
1952
+ kind: 'Scalar',
1953
+ map: true
1954
+ }
1955
+ ]
1956
+ };
1957
+ };
1958
+ function equals$a(existing, incoming) {
1959
+ const existing_intent = existing.intent;
1960
+ const incoming_intent = incoming.intent;
1961
+ if (!(existing_intent === incoming_intent)) {
1962
+ return false;
1963
+ }
1964
+ const existing_label = existing.label;
1965
+ const incoming_label = incoming.label;
1966
+ if (!(existing_label === incoming_label)) {
1967
+ return false;
1968
+ }
1969
+ const existing_planTemplateId = existing.planTemplateId;
1970
+ const incoming_planTemplateId = incoming.planTemplateId;
1971
+ if (!(existing_planTemplateId === incoming_planTemplateId)) {
1972
+ return false;
1973
+ }
1974
+ const existing_userUtterance = existing.userUtterance;
1975
+ const incoming_userUtterance = incoming.userUtterance;
1976
+ if (!(existing_userUtterance === incoming_userUtterance)) {
1977
+ return false;
1978
+ }
1979
+ const existing_variables = existing.variables;
1980
+ const incoming_variables = incoming.variables;
1981
+ const equals_variables_props = equalsObject(existing_variables, incoming_variables, (existing_variables_prop, incoming_variables_prop) => {
1982
+ if (!(existing_variables_prop === incoming_variables_prop)) {
1983
+ return false;
1984
+ }
1985
+ });
1986
+ if (equals_variables_props === false) {
1987
+ return false;
1988
+ }
1989
+ return true;
1990
+ }
1991
+
1992
+ const TTL$5 = 900000;
1993
+ const VERSION$9 = "0503b0c5ce250e7f5fbf16f2d3f2fec4";
1994
+ function validate$a(obj, path = 'RecommendedPlanTemplatesRepresentation') {
1995
+ const v_error = (() => {
1996
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1997
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1998
+ }
1999
+ if (obj.errorMessage !== undefined) {
2000
+ const obj_errorMessage = obj.errorMessage;
2001
+ const path_errorMessage = path + '.errorMessage';
2002
+ if (typeof obj_errorMessage !== 'string') {
2003
+ return new TypeError('Expected "string" but received "' + typeof obj_errorMessage + '" (at "' + path_errorMessage + '")');
2004
+ }
2005
+ }
2006
+ const obj_isSuccess = obj.isSuccess;
2007
+ const path_isSuccess = path + '.isSuccess';
2008
+ if (typeof obj_isSuccess !== 'boolean') {
2009
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isSuccess + '" (at "' + path_isSuccess + '")');
2010
+ }
2011
+ const obj_planTemplates = obj.planTemplates;
2012
+ const path_planTemplates = path + '.planTemplates';
2013
+ if (!ArrayIsArray(obj_planTemplates)) {
2014
+ return new TypeError('Expected "array" but received "' + typeof obj_planTemplates + '" (at "' + path_planTemplates + '")');
2015
+ }
2016
+ for (let i = 0; i < obj_planTemplates.length; i++) {
2017
+ const obj_planTemplates_item = obj_planTemplates[i];
2018
+ const path_planTemplates_item = path_planTemplates + '[' + i + ']';
2019
+ const referencepath_planTemplates_itemValidationError = validate$b(obj_planTemplates_item, path_planTemplates_item);
2020
+ if (referencepath_planTemplates_itemValidationError !== null) {
2021
+ let message = 'Object doesn\'t match PlanTemplateRepresentation (at "' + path_planTemplates_item + '")\n';
2022
+ message += referencepath_planTemplates_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
2023
+ return new TypeError(message);
2024
+ }
2025
+ }
2026
+ })();
2027
+ return v_error === undefined ? null : v_error;
2028
+ }
2029
+ const RepresentationType$5 = 'RecommendedPlanTemplatesRepresentation';
2030
+ function normalize$5(input, existing, path, luvio, store, timestamp) {
2031
+ return input;
2032
+ }
2033
+ const select$e = function RecommendedPlanTemplatesRepresentationSelect() {
2034
+ const { selections: PlanTemplateRepresentation__selections, opaque: PlanTemplateRepresentation__opaque, } = select$f();
2035
+ return {
2036
+ kind: 'Fragment',
2037
+ version: VERSION$9,
2038
+ private: [],
2039
+ selections: [
2040
+ {
2041
+ name: 'errorMessage',
2042
+ kind: 'Scalar',
2043
+ required: false
2044
+ },
2045
+ {
2046
+ name: 'isSuccess',
2047
+ kind: 'Scalar'
2048
+ },
2049
+ {
2050
+ name: 'planTemplates',
2051
+ kind: 'Object',
2052
+ plural: true,
2053
+ selections: PlanTemplateRepresentation__selections
2054
+ }
2055
+ ]
2056
+ };
2057
+ };
2058
+ function equals$9(existing, incoming) {
2059
+ const existing_isSuccess = existing.isSuccess;
2060
+ const incoming_isSuccess = incoming.isSuccess;
2061
+ if (!(existing_isSuccess === incoming_isSuccess)) {
2062
+ return false;
2063
+ }
2064
+ const existing_errorMessage = existing.errorMessage;
2065
+ const incoming_errorMessage = incoming.errorMessage;
2066
+ // if at least one of these optionals is defined
2067
+ if (existing_errorMessage !== undefined || incoming_errorMessage !== undefined) {
2068
+ // if one of these is not defined we know the other is defined and therefore
2069
+ // not equal
2070
+ if (existing_errorMessage === undefined || incoming_errorMessage === undefined) {
2071
+ return false;
2072
+ }
2073
+ if (!(existing_errorMessage === incoming_errorMessage)) {
2074
+ return false;
2075
+ }
2076
+ }
2077
+ const existing_planTemplates = existing.planTemplates;
2078
+ const incoming_planTemplates = incoming.planTemplates;
2079
+ const equals_planTemplates_items = equalsArray(existing_planTemplates, incoming_planTemplates, (existing_planTemplates_item, incoming_planTemplates_item) => {
2080
+ if (!(equals$a(existing_planTemplates_item, incoming_planTemplates_item))) {
2081
+ return false;
2082
+ }
2083
+ });
2084
+ if (equals_planTemplates_items === false) {
2085
+ return false;
2086
+ }
2087
+ return true;
2088
+ }
2089
+ const ingest$5 = function RecommendedPlanTemplatesRepresentationIngest(input, path, luvio, store, timestamp) {
2090
+ if (process.env.NODE_ENV !== 'production') {
2091
+ const validateError = validate$a(input);
2092
+ if (validateError !== null) {
2093
+ throw validateError;
2094
+ }
2095
+ }
2096
+ const key = path.fullPath;
2097
+ const ttlToUse = TTL$5;
2098
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$5, "einstein-copilot-bot", VERSION$9, RepresentationType$5, equals$9);
2099
+ return createLink(key);
2100
+ };
2101
+ function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
2102
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
2103
+ const rootKey = fullPathFactory();
2104
+ rootKeySet.set(rootKey, {
2105
+ namespace: keyPrefix,
2106
+ representationName: RepresentationType$5,
2107
+ mergeable: false
2108
+ });
2109
+ }
2110
+
2111
+ function select$d(luvio, params) {
2112
+ return select$e();
2113
+ }
2114
+ function keyBuilder$8(luvio, params) {
2115
+ return keyPrefix + '::RecommendedPlanTemplatesRepresentation:(' + 'pageType:' + params.urlParams.pageType + ',' + 'objectType:' + params.urlParams.objectType + ')';
2116
+ }
2117
+ function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
2118
+ getTypeCacheKeys$5(storeKeyMap, luvio, response, () => keyBuilder$8(luvio, resourceParams));
2119
+ }
2120
+ function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
2121
+ const { body } = response;
2122
+ const key = keyBuilder$8(luvio, resourceParams);
2123
+ luvio.storeIngest(key, ingest$5, body);
2124
+ const snapshot = luvio.storeLookup({
2125
+ recordId: key,
2126
+ node: select$d(),
2127
+ variables: {},
2128
+ }, snapshotRefresh);
2129
+ if (process.env.NODE_ENV !== 'production') {
2130
+ if (snapshot.state !== 'Fulfilled') {
2131
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
2132
+ }
2133
+ }
2134
+ deepFreeze(snapshot.data);
2135
+ return snapshot;
2136
+ }
2137
+ function ingestError$2(luvio, params, error, snapshotRefresh) {
2138
+ const key = keyBuilder$8(luvio, params);
2139
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
2140
+ const storeMetadataParams = {
2141
+ ttl: TTL$5,
2142
+ namespace: keyPrefix,
2143
+ version: VERSION$9,
2144
+ representationName: RepresentationType$5
2145
+ };
2146
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
2147
+ return errorSnapshot;
2148
+ }
2149
+ function createResourceRequest$4(config) {
2150
+ const headers = {};
2151
+ return {
2152
+ baseUri: '/services/data/v62.0',
2153
+ basePath: '/connect/recommended-plan-templates/' + config.urlParams.pageType + '/' + config.urlParams.objectType + '',
2154
+ method: 'get',
2155
+ body: null,
2156
+ urlParams: config.urlParams,
2157
+ queryParams: {},
2158
+ headers,
2159
+ priority: 'normal',
2160
+ };
2161
+ }
2162
+
2163
+ const adapterName$4 = 'getRecommendedPlanTemplates';
2164
+ const getRecommendedPlanTemplates_ConfigPropertyMetadata = [
2165
+ generateParamConfigMetadata('pageType', true, 0 /* UrlParameter */, 0 /* String */),
2166
+ generateParamConfigMetadata('objectType', true, 0 /* UrlParameter */, 0 /* String */),
2167
+ ];
2168
+ const getRecommendedPlanTemplates_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getRecommendedPlanTemplates_ConfigPropertyMetadata);
2169
+ const createResourceParams$4 = /*#__PURE__*/ createResourceParams$9(getRecommendedPlanTemplates_ConfigPropertyMetadata);
2170
+ function keyBuilder$7(luvio, config) {
2171
+ const resourceParams = createResourceParams$4(config);
2172
+ return keyBuilder$8(luvio, resourceParams);
2173
+ }
2174
+ function typeCheckConfig$4(untrustedConfig) {
2175
+ const config = {};
2176
+ typeCheckConfig$9(untrustedConfig, config, getRecommendedPlanTemplates_ConfigPropertyMetadata);
2177
+ return config;
2178
+ }
2179
+ function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
2180
+ if (!untrustedIsObject(untrustedConfig)) {
2181
+ return null;
2182
+ }
2183
+ if (process.env.NODE_ENV !== 'production') {
2184
+ validateConfig(untrustedConfig, configPropertyNames);
1587
2185
  }
1588
- const existing_userUtterance = existing.userUtterance;
1589
- const incoming_userUtterance = incoming.userUtterance;
1590
- // if at least one of these optionals is defined
1591
- if (existing_userUtterance !== undefined || incoming_userUtterance !== undefined) {
1592
- // if one of these is not defined we know the other is defined and therefore
1593
- // not equal
1594
- if (existing_userUtterance === undefined || incoming_userUtterance === undefined) {
1595
- return false;
1596
- }
1597
- if (!(existing_userUtterance === incoming_userUtterance)) {
1598
- return false;
1599
- }
2186
+ const config = typeCheckConfig$4(untrustedConfig);
2187
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
2188
+ return null;
1600
2189
  }
1601
- const existing_planTemplateInput = existing.planTemplateInput;
1602
- const incoming_planTemplateInput = incoming.planTemplateInput;
1603
- // if at least one of these optionals is defined
1604
- if (existing_planTemplateInput !== undefined || incoming_planTemplateInput !== undefined) {
1605
- // if one of these is not defined we know the other is defined and therefore
1606
- // not equal
1607
- if (existing_planTemplateInput === undefined || incoming_planTemplateInput === undefined) {
1608
- return false;
1609
- }
1610
- const equals_planTemplateInput_props = equalsObject(existing_planTemplateInput, incoming_planTemplateInput, (existing_planTemplateInput_prop, incoming_planTemplateInput_prop) => {
1611
- if (!(existing_planTemplateInput_prop === incoming_planTemplateInput_prop)) {
1612
- return false;
1613
- }
2190
+ return config;
2191
+ }
2192
+ function adapterFragment$2(luvio, config) {
2193
+ createResourceParams$4(config);
2194
+ return select$d();
2195
+ }
2196
+ function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
2197
+ const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
2198
+ config,
2199
+ resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
2200
+ });
2201
+ return luvio.storeBroadcast().then(() => snapshot);
2202
+ }
2203
+ function onFetchResponseError$2(luvio, config, resourceParams, response) {
2204
+ const snapshot = ingestError$2(luvio, resourceParams, response, {
2205
+ config,
2206
+ resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
2207
+ });
2208
+ return luvio.storeBroadcast().then(() => snapshot);
2209
+ }
2210
+ function buildNetworkSnapshot$4(luvio, config, options) {
2211
+ const resourceParams = createResourceParams$4(config);
2212
+ const request = createResourceRequest$4(resourceParams);
2213
+ return luvio.dispatchResourceRequest(request, options)
2214
+ .then((response) => {
2215
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
2216
+ const cache = new StoreKeyMap();
2217
+ getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
2218
+ return cache;
1614
2219
  });
1615
- if (equals_planTemplateInput_props === false) {
1616
- return false;
1617
- }
1618
- }
1619
- return true;
2220
+ }, (response) => {
2221
+ return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
2222
+ });
2223
+ }
2224
+ function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
2225
+ return buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, undefined, false);
2226
+ }
2227
+ function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
2228
+ const { luvio, config } = context;
2229
+ const selector = {
2230
+ recordId: keyBuilder$7(luvio, config),
2231
+ node: adapterFragment$2(luvio, config),
2232
+ variables: {},
2233
+ };
2234
+ const cacheSnapshot = storeLookup(selector, {
2235
+ config,
2236
+ resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
2237
+ });
2238
+ return cacheSnapshot;
1620
2239
  }
2240
+ const getRecommendedPlanTemplatesAdapterFactory = (luvio) => function einsteinCopilotBot__getRecommendedPlanTemplates(untrustedConfig, requestContext) {
2241
+ const config = validateAdapterConfig$4(untrustedConfig, getRecommendedPlanTemplates_ConfigPropertyNames);
2242
+ // Invalid or incomplete config
2243
+ if (config === null) {
2244
+ return null;
2245
+ }
2246
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
2247
+ buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
2248
+ };
1621
2249
 
1622
- const TTL$4 = 900000;
1623
- const VERSION$8 = "122e61b0db6dc38d244a87570efc5522";
1624
- function validate$9(obj, path = 'RecommendedActionsRepresentation') {
2250
+ const TTL$4 = 100;
2251
+ const VERSION$8 = "240cfec5fc3a3d994da444a2dfa1eca4";
2252
+ function validate$9(obj, path = 'RecommendedUtterancesRepresentation') {
1625
2253
  const v_error = (() => {
1626
2254
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1627
2255
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1628
2256
  }
1629
- const obj_copilotQuickActions = obj.copilotQuickActions;
1630
- const path_copilotQuickActions = path + '.copilotQuickActions';
1631
- if (!ArrayIsArray(obj_copilotQuickActions)) {
1632
- return new TypeError('Expected "array" but received "' + typeof obj_copilotQuickActions + '" (at "' + path_copilotQuickActions + '")');
1633
- }
1634
- for (let i = 0; i < obj_copilotQuickActions.length; i++) {
1635
- const obj_copilotQuickActions_item = obj_copilotQuickActions[i];
1636
- const path_copilotQuickActions_item = path_copilotQuickActions + '[' + i + ']';
1637
- const referencepath_copilotQuickActions_itemValidationError = validate$a(obj_copilotQuickActions_item, path_copilotQuickActions_item);
1638
- if (referencepath_copilotQuickActions_itemValidationError !== null) {
1639
- let message = 'Object doesn\'t match CopilotQuickActionRepresentation (at "' + path_copilotQuickActions_item + '")\n';
1640
- message += referencepath_copilotQuickActions_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1641
- return new TypeError(message);
1642
- }
1643
- }
1644
2257
  if (obj.errorMessage !== undefined) {
1645
2258
  const obj_errorMessage = obj.errorMessage;
1646
2259
  const path_errorMessage = path + '.errorMessage';
@@ -1653,26 +2266,31 @@ function validate$9(obj, path = 'RecommendedActionsRepresentation') {
1653
2266
  if (typeof obj_isSuccess !== 'boolean') {
1654
2267
  return new TypeError('Expected "boolean" but received "' + typeof obj_isSuccess + '" (at "' + path_isSuccess + '")');
1655
2268
  }
2269
+ const obj_utterances = obj.utterances;
2270
+ const path_utterances = path + '.utterances';
2271
+ if (!ArrayIsArray(obj_utterances)) {
2272
+ return new TypeError('Expected "array" but received "' + typeof obj_utterances + '" (at "' + path_utterances + '")');
2273
+ }
2274
+ for (let i = 0; i < obj_utterances.length; i++) {
2275
+ const obj_utterances_item = obj_utterances[i];
2276
+ const path_utterances_item = path_utterances + '[' + i + ']';
2277
+ if (typeof obj_utterances_item !== 'string') {
2278
+ return new TypeError('Expected "string" but received "' + typeof obj_utterances_item + '" (at "' + path_utterances_item + '")');
2279
+ }
2280
+ }
1656
2281
  })();
1657
2282
  return v_error === undefined ? null : v_error;
1658
2283
  }
1659
- const RepresentationType$4 = 'RecommendedActionsRepresentation';
2284
+ const RepresentationType$4 = 'RecommendedUtterancesRepresentation';
1660
2285
  function normalize$4(input, existing, path, luvio, store, timestamp) {
1661
2286
  return input;
1662
2287
  }
1663
- const select$c = function RecommendedActionsRepresentationSelect() {
1664
- const { selections: CopilotQuickActionRepresentation__selections, opaque: CopilotQuickActionRepresentation__opaque, } = select$d();
2288
+ const select$c = function RecommendedUtterancesRepresentationSelect() {
1665
2289
  return {
1666
2290
  kind: 'Fragment',
1667
2291
  version: VERSION$8,
1668
2292
  private: [],
1669
2293
  selections: [
1670
- {
1671
- name: 'copilotQuickActions',
1672
- kind: 'Object',
1673
- plural: true,
1674
- selections: CopilotQuickActionRepresentation__selections
1675
- },
1676
2294
  {
1677
2295
  name: 'errorMessage',
1678
2296
  kind: 'Scalar',
@@ -1681,6 +2299,11 @@ const select$c = function RecommendedActionsRepresentationSelect() {
1681
2299
  {
1682
2300
  name: 'isSuccess',
1683
2301
  kind: 'Scalar'
2302
+ },
2303
+ {
2304
+ name: 'utterances',
2305
+ kind: 'Scalar',
2306
+ plural: true
1684
2307
  }
1685
2308
  ]
1686
2309
  };
@@ -1704,19 +2327,19 @@ function equals$8(existing, incoming) {
1704
2327
  return false;
1705
2328
  }
1706
2329
  }
1707
- const existing_copilotQuickActions = existing.copilotQuickActions;
1708
- const incoming_copilotQuickActions = incoming.copilotQuickActions;
1709
- const equals_copilotQuickActions_items = equalsArray(existing_copilotQuickActions, incoming_copilotQuickActions, (existing_copilotQuickActions_item, incoming_copilotQuickActions_item) => {
1710
- if (!(equals$9(existing_copilotQuickActions_item, incoming_copilotQuickActions_item))) {
2330
+ const existing_utterances = existing.utterances;
2331
+ const incoming_utterances = incoming.utterances;
2332
+ const equals_utterances_items = equalsArray(existing_utterances, incoming_utterances, (existing_utterances_item, incoming_utterances_item) => {
2333
+ if (!(existing_utterances_item === incoming_utterances_item)) {
1711
2334
  return false;
1712
2335
  }
1713
2336
  });
1714
- if (equals_copilotQuickActions_items === false) {
2337
+ if (equals_utterances_items === false) {
1715
2338
  return false;
1716
2339
  }
1717
2340
  return true;
1718
2341
  }
1719
- const ingest$4 = function RecommendedActionsRepresentationIngest(input, path, luvio, store, timestamp) {
2342
+ const ingest$4 = function RecommendedUtterancesRepresentationIngest(input, path, luvio, store, timestamp) {
1720
2343
  if (process.env.NODE_ENV !== 'production') {
1721
2344
  const validateError = validate$9(input);
1722
2345
  if (validateError !== null) {
@@ -1742,7 +2365,7 @@ function select$b(luvio, params) {
1742
2365
  return select$c();
1743
2366
  }
1744
2367
  function keyBuilder$6(luvio, params) {
1745
- return keyPrefix + '::RecommendedActionsRepresentation:(' + 'pageName:' + params.queryParams.pageName + ',' + 'pageType:' + params.queryParams.pageType + ',' + 'actionName:' + params.queryParams.actionName + ',' + 'objectApiName:' + params.queryParams.objectApiName + ',' + 'customApplicationName:' + params.queryParams.customApplicationName + ',' + 'sessionId:' + params.queryParams.sessionId + ',' + 'formFactor:' + params.queryParams.formFactor + ')';
2368
+ return keyPrefix + '::RecommendedUtterancesRepresentation:(' + 'sessionId:' + params.queryParams.sessionId + ')';
1746
2369
  }
1747
2370
  function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
1748
2371
  getTypeCacheKeys$4(storeKeyMap, luvio, response, () => keyBuilder$6(luvio, resourceParams));
@@ -1780,7 +2403,7 @@ function createResourceRequest$3(config) {
1780
2403
  const headers = {};
1781
2404
  return {
1782
2405
  baseUri: '/services/data/v62.0',
1783
- basePath: '/connect/recommended-actions',
2406
+ basePath: '/connect/recommended-utterances',
1784
2407
  method: 'get',
1785
2408
  body: null,
1786
2409
  urlParams: {},
@@ -1790,25 +2413,19 @@ function createResourceRequest$3(config) {
1790
2413
  };
1791
2414
  }
1792
2415
 
1793
- const adapterName$3 = 'getRecommendedActions';
1794
- const getRecommendedActions_ConfigPropertyMetadata = [
1795
- generateParamConfigMetadata('pageName', false, 1 /* QueryParameter */, 0 /* String */),
1796
- generateParamConfigMetadata('pageType', true, 1 /* QueryParameter */, 0 /* String */),
1797
- generateParamConfigMetadata('actionName', false, 1 /* QueryParameter */, 0 /* String */),
1798
- generateParamConfigMetadata('objectApiName', false, 1 /* QueryParameter */, 0 /* String */),
1799
- generateParamConfigMetadata('customApplicationName', true, 1 /* QueryParameter */, 0 /* String */),
2416
+ const adapterName$3 = 'getRecommendedUtterances';
2417
+ const getRecommendedUtterances_ConfigPropertyMetadata = [
1800
2418
  generateParamConfigMetadata('sessionId', true, 1 /* QueryParameter */, 0 /* String */),
1801
- generateParamConfigMetadata('formFactor', true, 1 /* QueryParameter */, 0 /* String */),
1802
2419
  ];
1803
- const getRecommendedActions_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getRecommendedActions_ConfigPropertyMetadata);
1804
- const createResourceParams$3 = /*#__PURE__*/ createResourceParams$7(getRecommendedActions_ConfigPropertyMetadata);
2420
+ const getRecommendedUtterances_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getRecommendedUtterances_ConfigPropertyMetadata);
2421
+ const createResourceParams$3 = /*#__PURE__*/ createResourceParams$9(getRecommendedUtterances_ConfigPropertyMetadata);
1805
2422
  function keyBuilder$5(luvio, config) {
1806
2423
  const resourceParams = createResourceParams$3(config);
1807
2424
  return keyBuilder$6(luvio, resourceParams);
1808
2425
  }
1809
2426
  function typeCheckConfig$3(untrustedConfig) {
1810
2427
  const config = {};
1811
- typeCheckConfig$7(untrustedConfig, config, getRecommendedActions_ConfigPropertyMetadata);
2428
+ typeCheckConfig$9(untrustedConfig, config, getRecommendedUtterances_ConfigPropertyMetadata);
1812
2429
  return config;
1813
2430
  }
1814
2431
  function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
@@ -1857,7 +2474,7 @@ function buildNetworkSnapshot$3(luvio, config, options) {
1857
2474
  });
1858
2475
  }
1859
2476
  function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
1860
- return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
2477
+ return buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
1861
2478
  }
1862
2479
  function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
1863
2480
  const { luvio, config } = context;
@@ -1872,8 +2489,8 @@ function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
1872
2489
  });
1873
2490
  return cacheSnapshot;
1874
2491
  }
1875
- const getRecommendedActionsAdapterFactory = (luvio) => function einsteinCopilotBot__getRecommendedActions(untrustedConfig, requestContext) {
1876
- const config = validateAdapterConfig$3(untrustedConfig, getRecommendedActions_ConfigPropertyNames);
2492
+ const getRecommendedUtterancesAdapterFactory = (luvio) => function einsteinCopilotBot__getRecommendedUtterances(untrustedConfig, requestContext) {
2493
+ const config = validateAdapterConfig$3(untrustedConfig, getRecommendedUtterances_ConfigPropertyNames);
1877
2494
  // Invalid or incomplete config
1878
2495
  if (config === null) {
1879
2496
  return null;
@@ -1882,116 +2499,72 @@ const getRecommendedActionsAdapterFactory = (luvio) => function einsteinCopilotB
1882
2499
  buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
1883
2500
  };
1884
2501
 
1885
- const VERSION$7 = "504437088c2317480c651ac05a7565b5";
1886
- function validate$8(obj, path = 'PlanTemplateRepresentation') {
2502
+ const VERSION$7 = "7b8f676098deb92fdb92955fba2e6805";
2503
+ function validate$8(obj, path = 'WelcomeTopicSuggestedUtterancesRepresentation') {
1887
2504
  const v_error = (() => {
1888
2505
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1889
2506
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1890
2507
  }
1891
- const obj_intent = obj.intent;
1892
- const path_intent = path + '.intent';
1893
- if (typeof obj_intent !== 'string') {
1894
- return new TypeError('Expected "string" but received "' + typeof obj_intent + '" (at "' + path_intent + '")');
1895
- }
1896
- const obj_label = obj.label;
1897
- const path_label = path + '.label';
1898
- if (typeof obj_label !== 'string') {
1899
- return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
1900
- }
1901
- const obj_planTemplateId = obj.planTemplateId;
1902
- const path_planTemplateId = path + '.planTemplateId';
1903
- if (typeof obj_planTemplateId !== 'string') {
1904
- return new TypeError('Expected "string" but received "' + typeof obj_planTemplateId + '" (at "' + path_planTemplateId + '")');
1905
- }
1906
- const obj_userUtterance = obj.userUtterance;
1907
- const path_userUtterance = path + '.userUtterance';
1908
- if (typeof obj_userUtterance !== 'string') {
1909
- return new TypeError('Expected "string" but received "' + typeof obj_userUtterance + '" (at "' + path_userUtterance + '")');
1910
- }
1911
- const obj_variables = obj.variables;
1912
- const path_variables = path + '.variables';
1913
- if (typeof obj_variables !== 'object' || ArrayIsArray(obj_variables) || obj_variables === null) {
1914
- return new TypeError('Expected "object" but received "' + typeof obj_variables + '" (at "' + path_variables + '")');
1915
- }
1916
- const obj_variables_keys = ObjectKeys(obj_variables);
1917
- for (let i = 0; i < obj_variables_keys.length; i++) {
1918
- const key = obj_variables_keys[i];
1919
- const obj_variables_prop = obj_variables[key];
1920
- const path_variables_prop = path_variables + '["' + key + '"]';
1921
- if (typeof obj_variables_prop !== 'string') {
1922
- return new TypeError('Expected "string" but received "' + typeof obj_variables_prop + '" (at "' + path_variables_prop + '")');
2508
+ const obj_topicApiName = obj.topicApiName;
2509
+ const path_topicApiName = path + '.topicApiName';
2510
+ if (typeof obj_topicApiName !== 'string') {
2511
+ return new TypeError('Expected "string" but received "' + typeof obj_topicApiName + '" (at "' + path_topicApiName + '")');
2512
+ }
2513
+ const obj_utterances = obj.utterances;
2514
+ const path_utterances = path + '.utterances';
2515
+ if (!ArrayIsArray(obj_utterances)) {
2516
+ return new TypeError('Expected "array" but received "' + typeof obj_utterances + '" (at "' + path_utterances + '")');
2517
+ }
2518
+ for (let i = 0; i < obj_utterances.length; i++) {
2519
+ const obj_utterances_item = obj_utterances[i];
2520
+ const path_utterances_item = path_utterances + '[' + i + ']';
2521
+ if (typeof obj_utterances_item !== 'string') {
2522
+ return new TypeError('Expected "string" but received "' + typeof obj_utterances_item + '" (at "' + path_utterances_item + '")');
1923
2523
  }
1924
2524
  }
1925
2525
  })();
1926
2526
  return v_error === undefined ? null : v_error;
1927
2527
  }
1928
- const select$a = function PlanTemplateRepresentationSelect() {
2528
+ const select$a = function WelcomeTopicSuggestedUtterancesRepresentationSelect() {
1929
2529
  return {
1930
2530
  kind: 'Fragment',
1931
2531
  version: VERSION$7,
1932
2532
  private: [],
1933
2533
  selections: [
1934
2534
  {
1935
- name: 'intent',
1936
- kind: 'Scalar'
1937
- },
1938
- {
1939
- name: 'label',
1940
- kind: 'Scalar'
1941
- },
1942
- {
1943
- name: 'planTemplateId',
1944
- kind: 'Scalar'
1945
- },
1946
- {
1947
- name: 'userUtterance',
2535
+ name: 'topicApiName',
1948
2536
  kind: 'Scalar'
1949
2537
  },
1950
2538
  {
1951
- name: 'variables',
2539
+ name: 'utterances',
1952
2540
  kind: 'Scalar',
1953
- map: true
2541
+ plural: true
1954
2542
  }
1955
2543
  ]
1956
2544
  };
1957
2545
  };
1958
2546
  function equals$7(existing, incoming) {
1959
- const existing_intent = existing.intent;
1960
- const incoming_intent = incoming.intent;
1961
- if (!(existing_intent === incoming_intent)) {
1962
- return false;
1963
- }
1964
- const existing_label = existing.label;
1965
- const incoming_label = incoming.label;
1966
- if (!(existing_label === incoming_label)) {
1967
- return false;
1968
- }
1969
- const existing_planTemplateId = existing.planTemplateId;
1970
- const incoming_planTemplateId = incoming.planTemplateId;
1971
- if (!(existing_planTemplateId === incoming_planTemplateId)) {
1972
- return false;
1973
- }
1974
- const existing_userUtterance = existing.userUtterance;
1975
- const incoming_userUtterance = incoming.userUtterance;
1976
- if (!(existing_userUtterance === incoming_userUtterance)) {
2547
+ const existing_topicApiName = existing.topicApiName;
2548
+ const incoming_topicApiName = incoming.topicApiName;
2549
+ if (!(existing_topicApiName === incoming_topicApiName)) {
1977
2550
  return false;
1978
2551
  }
1979
- const existing_variables = existing.variables;
1980
- const incoming_variables = incoming.variables;
1981
- const equals_variables_props = equalsObject(existing_variables, incoming_variables, (existing_variables_prop, incoming_variables_prop) => {
1982
- if (!(existing_variables_prop === incoming_variables_prop)) {
2552
+ const existing_utterances = existing.utterances;
2553
+ const incoming_utterances = incoming.utterances;
2554
+ const equals_utterances_items = equalsArray(existing_utterances, incoming_utterances, (existing_utterances_item, incoming_utterances_item) => {
2555
+ if (!(existing_utterances_item === incoming_utterances_item)) {
1983
2556
  return false;
1984
2557
  }
1985
2558
  });
1986
- if (equals_variables_props === false) {
2559
+ if (equals_utterances_items === false) {
1987
2560
  return false;
1988
2561
  }
1989
2562
  return true;
1990
2563
  }
1991
2564
 
1992
- const TTL$3 = 900000;
1993
- const VERSION$6 = "0503b0c5ce250e7f5fbf16f2d3f2fec4";
1994
- function validate$7(obj, path = 'RecommendedPlanTemplatesRepresentation') {
2565
+ const TTL$3 = 30000;
2566
+ const VERSION$6 = "5563352486e852506e175069aef4b290";
2567
+ function validate$7(obj, path = 'WelcomeUtterancesRepresentation') {
1995
2568
  const v_error = (() => {
1996
2569
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1997
2570
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -2008,30 +2581,30 @@ function validate$7(obj, path = 'RecommendedPlanTemplatesRepresentation') {
2008
2581
  if (typeof obj_isSuccess !== 'boolean') {
2009
2582
  return new TypeError('Expected "boolean" but received "' + typeof obj_isSuccess + '" (at "' + path_isSuccess + '")');
2010
2583
  }
2011
- const obj_planTemplates = obj.planTemplates;
2012
- const path_planTemplates = path + '.planTemplates';
2013
- if (!ArrayIsArray(obj_planTemplates)) {
2014
- return new TypeError('Expected "array" but received "' + typeof obj_planTemplates + '" (at "' + path_planTemplates + '")');
2015
- }
2016
- for (let i = 0; i < obj_planTemplates.length; i++) {
2017
- const obj_planTemplates_item = obj_planTemplates[i];
2018
- const path_planTemplates_item = path_planTemplates + '[' + i + ']';
2019
- const referencepath_planTemplates_itemValidationError = validate$8(obj_planTemplates_item, path_planTemplates_item);
2020
- if (referencepath_planTemplates_itemValidationError !== null) {
2021
- let message = 'Object doesn\'t match PlanTemplateRepresentation (at "' + path_planTemplates_item + '")\n';
2022
- message += referencepath_planTemplates_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
2584
+ const obj_topicsAndSuggestedUtterances = obj.topicsAndSuggestedUtterances;
2585
+ const path_topicsAndSuggestedUtterances = path + '.topicsAndSuggestedUtterances';
2586
+ if (!ArrayIsArray(obj_topicsAndSuggestedUtterances)) {
2587
+ return new TypeError('Expected "array" but received "' + typeof obj_topicsAndSuggestedUtterances + '" (at "' + path_topicsAndSuggestedUtterances + '")');
2588
+ }
2589
+ for (let i = 0; i < obj_topicsAndSuggestedUtterances.length; i++) {
2590
+ const obj_topicsAndSuggestedUtterances_item = obj_topicsAndSuggestedUtterances[i];
2591
+ const path_topicsAndSuggestedUtterances_item = path_topicsAndSuggestedUtterances + '[' + i + ']';
2592
+ const referencepath_topicsAndSuggestedUtterances_itemValidationError = validate$8(obj_topicsAndSuggestedUtterances_item, path_topicsAndSuggestedUtterances_item);
2593
+ if (referencepath_topicsAndSuggestedUtterances_itemValidationError !== null) {
2594
+ let message = 'Object doesn\'t match WelcomeTopicSuggestedUtterancesRepresentation (at "' + path_topicsAndSuggestedUtterances_item + '")\n';
2595
+ message += referencepath_topicsAndSuggestedUtterances_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
2023
2596
  return new TypeError(message);
2024
2597
  }
2025
2598
  }
2026
2599
  })();
2027
2600
  return v_error === undefined ? null : v_error;
2028
2601
  }
2029
- const RepresentationType$3 = 'RecommendedPlanTemplatesRepresentation';
2602
+ const RepresentationType$3 = 'WelcomeUtterancesRepresentation';
2030
2603
  function normalize$3(input, existing, path, luvio, store, timestamp) {
2031
2604
  return input;
2032
2605
  }
2033
- const select$9 = function RecommendedPlanTemplatesRepresentationSelect() {
2034
- const { selections: PlanTemplateRepresentation__selections, opaque: PlanTemplateRepresentation__opaque, } = select$a();
2606
+ const select$9 = function WelcomeUtterancesRepresentationSelect() {
2607
+ const { selections: WelcomeTopicSuggestedUtterancesRepresentation__selections, opaque: WelcomeTopicSuggestedUtterancesRepresentation__opaque, } = select$a();
2035
2608
  return {
2036
2609
  kind: 'Fragment',
2037
2610
  version: VERSION$6,
@@ -2047,10 +2620,10 @@ const select$9 = function RecommendedPlanTemplatesRepresentationSelect() {
2047
2620
  kind: 'Scalar'
2048
2621
  },
2049
2622
  {
2050
- name: 'planTemplates',
2623
+ name: 'topicsAndSuggestedUtterances',
2051
2624
  kind: 'Object',
2052
2625
  plural: true,
2053
- selections: PlanTemplateRepresentation__selections
2626
+ selections: WelcomeTopicSuggestedUtterancesRepresentation__selections
2054
2627
  }
2055
2628
  ]
2056
2629
  };
@@ -2074,19 +2647,19 @@ function equals$6(existing, incoming) {
2074
2647
  return false;
2075
2648
  }
2076
2649
  }
2077
- const existing_planTemplates = existing.planTemplates;
2078
- const incoming_planTemplates = incoming.planTemplates;
2079
- const equals_planTemplates_items = equalsArray(existing_planTemplates, incoming_planTemplates, (existing_planTemplates_item, incoming_planTemplates_item) => {
2080
- if (!(equals$7(existing_planTemplates_item, incoming_planTemplates_item))) {
2650
+ const existing_topicsAndSuggestedUtterances = existing.topicsAndSuggestedUtterances;
2651
+ const incoming_topicsAndSuggestedUtterances = incoming.topicsAndSuggestedUtterances;
2652
+ const equals_topicsAndSuggestedUtterances_items = equalsArray(existing_topicsAndSuggestedUtterances, incoming_topicsAndSuggestedUtterances, (existing_topicsAndSuggestedUtterances_item, incoming_topicsAndSuggestedUtterances_item) => {
2653
+ if (!(equals$7(existing_topicsAndSuggestedUtterances_item, incoming_topicsAndSuggestedUtterances_item))) {
2081
2654
  return false;
2082
2655
  }
2083
2656
  });
2084
- if (equals_planTemplates_items === false) {
2657
+ if (equals_topicsAndSuggestedUtterances_items === false) {
2085
2658
  return false;
2086
2659
  }
2087
2660
  return true;
2088
2661
  }
2089
- const ingest$3 = function RecommendedPlanTemplatesRepresentationIngest(input, path, luvio, store, timestamp) {
2662
+ const ingest$3 = function WelcomeUtterancesRepresentationIngest(input, path, luvio, store, timestamp) {
2090
2663
  if (process.env.NODE_ENV !== 'production') {
2091
2664
  const validateError = validate$7(input);
2092
2665
  if (validateError !== null) {
@@ -2112,7 +2685,7 @@ function select$8(luvio, params) {
2112
2685
  return select$9();
2113
2686
  }
2114
2687
  function keyBuilder$4(luvio, params) {
2115
- return keyPrefix + '::RecommendedPlanTemplatesRepresentation:(' + 'pageType:' + params.urlParams.pageType + ',' + 'objectType:' + params.urlParams.objectType + ')';
2688
+ return keyPrefix + '::WelcomeUtterancesRepresentation:(' + 'sessionId:' + params.queryParams.sessionId + ')';
2116
2689
  }
2117
2690
  function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
2118
2691
  getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$4(luvio, resourceParams));
@@ -2150,30 +2723,29 @@ function createResourceRequest$2(config) {
2150
2723
  const headers = {};
2151
2724
  return {
2152
2725
  baseUri: '/services/data/v62.0',
2153
- basePath: '/connect/recommended-plan-templates/' + config.urlParams.pageType + '/' + config.urlParams.objectType + '',
2726
+ basePath: '/connect/welcome-utterances',
2154
2727
  method: 'get',
2155
2728
  body: null,
2156
- urlParams: config.urlParams,
2157
- queryParams: {},
2729
+ urlParams: {},
2730
+ queryParams: config.queryParams,
2158
2731
  headers,
2159
2732
  priority: 'normal',
2160
2733
  };
2161
2734
  }
2162
2735
 
2163
- const adapterName$2 = 'getRecommendedPlanTemplates';
2164
- const getRecommendedPlanTemplates_ConfigPropertyMetadata = [
2165
- generateParamConfigMetadata('pageType', true, 0 /* UrlParameter */, 0 /* String */),
2166
- generateParamConfigMetadata('objectType', true, 0 /* UrlParameter */, 0 /* String */),
2736
+ const adapterName$2 = 'getWelcomeUtterances';
2737
+ const getWelcomeUtterances_ConfigPropertyMetadata = [
2738
+ generateParamConfigMetadata('sessionId', false, 1 /* QueryParameter */, 0 /* String */),
2167
2739
  ];
2168
- const getRecommendedPlanTemplates_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getRecommendedPlanTemplates_ConfigPropertyMetadata);
2169
- const createResourceParams$2 = /*#__PURE__*/ createResourceParams$7(getRecommendedPlanTemplates_ConfigPropertyMetadata);
2740
+ const getWelcomeUtterances_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getWelcomeUtterances_ConfigPropertyMetadata);
2741
+ const createResourceParams$2 = /*#__PURE__*/ createResourceParams$9(getWelcomeUtterances_ConfigPropertyMetadata);
2170
2742
  function keyBuilder$3(luvio, config) {
2171
2743
  const resourceParams = createResourceParams$2(config);
2172
2744
  return keyBuilder$4(luvio, resourceParams);
2173
2745
  }
2174
2746
  function typeCheckConfig$2(untrustedConfig) {
2175
2747
  const config = {};
2176
- typeCheckConfig$7(untrustedConfig, config, getRecommendedPlanTemplates_ConfigPropertyMetadata);
2748
+ typeCheckConfig$9(untrustedConfig, config, getWelcomeUtterances_ConfigPropertyMetadata);
2177
2749
  return config;
2178
2750
  }
2179
2751
  function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
@@ -2222,7 +2794,7 @@ function buildNetworkSnapshot$2(luvio, config, options) {
2222
2794
  });
2223
2795
  }
2224
2796
  function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
2225
- return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
2797
+ return buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
2226
2798
  }
2227
2799
  function buildCachedSnapshotCachePolicy(context, storeLookup) {
2228
2800
  const { luvio, config } = context;
@@ -2237,8 +2809,8 @@ function buildCachedSnapshotCachePolicy(context, storeLookup) {
2237
2809
  });
2238
2810
  return cacheSnapshot;
2239
2811
  }
2240
- const getRecommendedPlanTemplatesAdapterFactory = (luvio) => function einsteinCopilotBot__getRecommendedPlanTemplates(untrustedConfig, requestContext) {
2241
- const config = validateAdapterConfig$2(untrustedConfig, getRecommendedPlanTemplates_ConfigPropertyNames);
2812
+ const getWelcomeUtterancesAdapterFactory = (luvio) => function einsteinCopilotBot__getWelcomeUtterances(untrustedConfig, requestContext) {
2813
+ const config = validateAdapterConfig$2(untrustedConfig, getWelcomeUtterances_ConfigPropertyNames);
2242
2814
  // Invalid or incomplete config
2243
2815
  if (config === null) {
2244
2816
  return null;
@@ -3427,10 +3999,10 @@ const sendMessage_ConfigPropertyMetadata = [
3427
3999
  generateParamConfigMetadata('userUtterance', false, 2 /* Body */, 0 /* String */),
3428
4000
  ];
3429
4001
  const sendMessage_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, sendMessage_ConfigPropertyMetadata);
3430
- const createResourceParams$1 = /*#__PURE__*/ createResourceParams$7(sendMessage_ConfigPropertyMetadata);
4002
+ const createResourceParams$1 = /*#__PURE__*/ createResourceParams$9(sendMessage_ConfigPropertyMetadata);
3431
4003
  function typeCheckConfig$1(untrustedConfig) {
3432
4004
  const config = {};
3433
- typeCheckConfig$7(untrustedConfig, config, sendMessage_ConfigPropertyMetadata);
4005
+ typeCheckConfig$9(untrustedConfig, config, sendMessage_ConfigPropertyMetadata);
3434
4006
  const untrustedConfig_planTemplateVariables = untrustedConfig.planTemplateVariables;
3435
4007
  config.planTemplateVariables = untrustedConfig_planTemplateVariables;
3436
4008
  const untrustedConfig_reply = untrustedConfig.reply;
@@ -3618,10 +4190,10 @@ const submitFeedback_ConfigPropertyMetadata = [
3618
4190
  generateParamConfigMetadata('text', true, 2 /* Body */, 0 /* String */),
3619
4191
  ];
3620
4192
  const submitFeedback_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, submitFeedback_ConfigPropertyMetadata);
3621
- const createResourceParams = /*#__PURE__*/ createResourceParams$7(submitFeedback_ConfigPropertyMetadata);
4193
+ const createResourceParams = /*#__PURE__*/ createResourceParams$9(submitFeedback_ConfigPropertyMetadata);
3622
4194
  function typeCheckConfig(untrustedConfig) {
3623
4195
  const config = {};
3624
- typeCheckConfig$7(untrustedConfig, config, submitFeedback_ConfigPropertyMetadata);
4196
+ typeCheckConfig$9(untrustedConfig, config, submitFeedback_ConfigPropertyMetadata);
3625
4197
  const untrustedConfig_details = untrustedConfig.details;
3626
4198
  if (untrustedIsObject(untrustedConfig_details)) {
3627
4199
  const untrustedConfig_details_object = {};
@@ -3686,6 +4258,8 @@ let getCopilotObjects;
3686
4258
  let getFollowUpActions;
3687
4259
  let getRecommendedActions;
3688
4260
  let getRecommendedPlanTemplates;
4261
+ let getRecommendedUtterances;
4262
+ let getWelcomeUtterances;
3689
4263
  let sendMessage;
3690
4264
  let submitFeedback;
3691
4265
  // Imperative GET Adapters
@@ -3694,6 +4268,8 @@ let getCopilotObjects_imperative;
3694
4268
  let getFollowUpActions_imperative;
3695
4269
  let getRecommendedActions_imperative;
3696
4270
  let getRecommendedPlanTemplates_imperative;
4271
+ let getRecommendedUtterances_imperative;
4272
+ let getWelcomeUtterances_imperative;
3697
4273
  // Adapter Metadata
3698
4274
  const getBotIdMetadata = { apiFamily: 'einsteincopilot-bot', name: 'getBotId', ttl: 30000 };
3699
4275
  const getCopilotObjectsMetadata = {
@@ -3716,6 +4292,16 @@ const getRecommendedPlanTemplatesMetadata = {
3716
4292
  name: 'getRecommendedPlanTemplates',
3717
4293
  ttl: 900000,
3718
4294
  };
4295
+ const getRecommendedUtterancesMetadata = {
4296
+ apiFamily: 'einsteincopilot-bot',
4297
+ name: 'getRecommendedUtterances',
4298
+ ttl: 100,
4299
+ };
4300
+ const getWelcomeUtterancesMetadata = {
4301
+ apiFamily: 'einsteincopilot-bot',
4302
+ name: 'getWelcomeUtterances',
4303
+ ttl: 30000,
4304
+ };
3719
4305
  // Notify Update Available
3720
4306
  function bindExportsTo(luvio) {
3721
4307
  // LDS Adapters
@@ -3724,6 +4310,8 @@ function bindExportsTo(luvio) {
3724
4310
  const getFollowUpActions_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getFollowUpActions', getFollowUpActionsAdapterFactory), getFollowUpActionsMetadata);
3725
4311
  const getRecommendedActions_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getRecommendedActions', getRecommendedActionsAdapterFactory), getRecommendedActionsMetadata);
3726
4312
  const getRecommendedPlanTemplates_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getRecommendedPlanTemplates', getRecommendedPlanTemplatesAdapterFactory), getRecommendedPlanTemplatesMetadata);
4313
+ const getRecommendedUtterances_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getRecommendedUtterances', getRecommendedUtterancesAdapterFactory), getRecommendedUtterancesMetadata);
4314
+ const getWelcomeUtterances_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getWelcomeUtterances', getWelcomeUtterancesAdapterFactory), getWelcomeUtterancesMetadata);
3727
4315
  function unwrapSnapshotData(factory) {
3728
4316
  const adapter = factory(luvio);
3729
4317
  return (config) => adapter(config).then((snapshot) => snapshot.data);
@@ -3734,6 +4322,8 @@ function bindExportsTo(luvio) {
3734
4322
  getFollowUpActions: createWireAdapterConstructor(luvio, getFollowUpActions_ldsAdapter, getFollowUpActionsMetadata),
3735
4323
  getRecommendedActions: createWireAdapterConstructor(luvio, getRecommendedActions_ldsAdapter, getRecommendedActionsMetadata),
3736
4324
  getRecommendedPlanTemplates: createWireAdapterConstructor(luvio, getRecommendedPlanTemplates_ldsAdapter, getRecommendedPlanTemplatesMetadata),
4325
+ getRecommendedUtterances: createWireAdapterConstructor(luvio, getRecommendedUtterances_ldsAdapter, getRecommendedUtterancesMetadata),
4326
+ getWelcomeUtterances: createWireAdapterConstructor(luvio, getWelcomeUtterances_ldsAdapter, getWelcomeUtterancesMetadata),
3737
4327
  sendMessage: unwrapSnapshotData(sendMessageAdapterFactory),
3738
4328
  submitFeedback: unwrapSnapshotData(submitFeedbackAdapterFactory),
3739
4329
  // Imperative GET Adapters
@@ -3742,6 +4332,8 @@ function bindExportsTo(luvio) {
3742
4332
  getFollowUpActions_imperative: createImperativeAdapter(luvio, getFollowUpActions_ldsAdapter, getFollowUpActionsMetadata),
3743
4333
  getRecommendedActions_imperative: createImperativeAdapter(luvio, getRecommendedActions_ldsAdapter, getRecommendedActionsMetadata),
3744
4334
  getRecommendedPlanTemplates_imperative: createImperativeAdapter(luvio, getRecommendedPlanTemplates_ldsAdapter, getRecommendedPlanTemplatesMetadata),
4335
+ getRecommendedUtterances_imperative: createImperativeAdapter(luvio, getRecommendedUtterances_ldsAdapter, getRecommendedUtterancesMetadata),
4336
+ getWelcomeUtterances_imperative: createImperativeAdapter(luvio, getWelcomeUtterances_ldsAdapter, getWelcomeUtterancesMetadata),
3745
4337
  // Notify Update Availables
3746
4338
  };
3747
4339
  }
@@ -3752,6 +4344,8 @@ withDefaultLuvio((luvio) => {
3752
4344
  getFollowUpActions,
3753
4345
  getRecommendedActions,
3754
4346
  getRecommendedPlanTemplates,
4347
+ getRecommendedUtterances,
4348
+ getWelcomeUtterances,
3755
4349
  sendMessage,
3756
4350
  submitFeedback,
3757
4351
  getBotId_imperative,
@@ -3759,8 +4353,10 @@ withDefaultLuvio((luvio) => {
3759
4353
  getFollowUpActions_imperative,
3760
4354
  getRecommendedActions_imperative,
3761
4355
  getRecommendedPlanTemplates_imperative,
4356
+ getRecommendedUtterances_imperative,
4357
+ getWelcomeUtterances_imperative,
3762
4358
  } = bindExportsTo(luvio));
3763
4359
  });
3764
4360
 
3765
- export { getBotId, getBotId_imperative, getCopilotObjects, getCopilotObjects_imperative, getFollowUpActions, getFollowUpActions_imperative, getRecommendedActions, getRecommendedActions_imperative, getRecommendedPlanTemplates, getRecommendedPlanTemplates_imperative, sendMessage, submitFeedback };
3766
- // version: 1.309.0-dev14-d0a3778177
4361
+ export { getBotId, getBotId_imperative, getCopilotObjects, getCopilotObjects_imperative, getFollowUpActions, getFollowUpActions_imperative, getRecommendedActions, getRecommendedActions_imperative, getRecommendedPlanTemplates, getRecommendedPlanTemplates_imperative, getRecommendedUtterances, getRecommendedUtterances_imperative, getWelcomeUtterances, getWelcomeUtterances_imperative, sendMessage, submitFeedback };
4362
+ // version: 1.309.0-dev16-189d0681ed