@salesforce/lds-adapters-service-einstein-copilot-bot 1.316.0 → 1.317.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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, typeCheckConfig as typeCheckConfig$9, StoreKeyMap, createResourceParams as createResourceParams$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) {
316
- return keyPrefix + '::CopilotBotInfoRepresentation:(' + ')';
315
+ function keyBuilder$g(luvio, params) {
316
+ return keyPrefix + '::CopilotBotInfoRepresentation:(' + 'agentType:' + params.queryParams.agentType + ')';
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(luvio, resourceParams));
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(luvio, resourceParams);
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(luvio, params);
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/v63.0',
@@ -355,97 +355,100 @@ function createResourceRequest$6(config) {
355
355
  method: 'get',
356
356
  body: null,
357
357
  urlParams: {},
358
- queryParams: {},
358
+ queryParams: config.queryParams,
359
359
  headers,
360
360
  priority: 'normal',
361
361
  };
362
362
  }
363
363
 
364
- const adapterName$6 = 'getBotId';
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();
364
+ const adapterName$8 = 'getBotId';
365
+ const getBotId_ConfigPropertyMetadata = [
366
+ generateParamConfigMetadata('agentType', false, 1 /* QueryParameter */, 0 /* String */),
367
+ ];
368
+ const getBotId_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$8, getBotId_ConfigPropertyMetadata);
369
+ const createResourceParams$8 = /*#__PURE__*/ createResourceParams$9(getBotId_ConfigPropertyMetadata);
370
+ function keyBuilder$f(luvio, config) {
371
+ const resourceParams = createResourceParams$8(config);
372
+ return keyBuilder$g(luvio, resourceParams);
371
373
  }
372
- function typeCheckConfig$6(untrustedConfig) {
374
+ function typeCheckConfig$8(untrustedConfig) {
373
375
  const config = {};
376
+ typeCheckConfig$9(untrustedConfig, config, getBotId_ConfigPropertyMetadata);
374
377
  return config;
375
378
  }
376
- function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
379
+ function validateAdapterConfig$8(untrustedConfig, configPropertyNames) {
377
380
  if (!untrustedIsObject(untrustedConfig)) {
378
381
  return null;
379
382
  }
380
383
  if (process.env.NODE_ENV !== 'production') {
381
384
  validateConfig(untrustedConfig, configPropertyNames);
382
385
  }
383
- const config = typeCheckConfig$6();
386
+ const config = typeCheckConfig$8(untrustedConfig);
384
387
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
385
388
  return null;
386
389
  }
387
390
  return config;
388
391
  }
389
- function adapterFragment$4(luvio, config) {
390
- createResourceParams$6(config);
391
- return select$k();
392
+ function adapterFragment$6(luvio, config) {
393
+ createResourceParams$8(config);
394
+ return select$p();
392
395
  }
393
- function onFetchResponseSuccess$4(luvio, config, resourceParams, response) {
394
- const snapshot = ingestSuccess$6(luvio, resourceParams, response, {
396
+ function onFetchResponseSuccess$6(luvio, config, resourceParams, response) {
397
+ const snapshot = ingestSuccess$8(luvio, resourceParams, response, {
395
398
  config,
396
- resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
399
+ resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
397
400
  });
398
401
  return luvio.storeBroadcast().then(() => snapshot);
399
402
  }
400
- function onFetchResponseError$4(luvio, config, resourceParams, response) {
401
- const snapshot = ingestError$4(luvio, resourceParams, response, {
403
+ function onFetchResponseError$6(luvio, config, resourceParams, response) {
404
+ const snapshot = ingestError$6(luvio, resourceParams, response, {
402
405
  config,
403
- resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
406
+ resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
404
407
  });
405
408
  return luvio.storeBroadcast().then(() => snapshot);
406
409
  }
407
- function buildNetworkSnapshot$6(luvio, config, options) {
408
- const resourceParams = createResourceParams$6(config);
409
- const request = createResourceRequest$6();
410
+ function buildNetworkSnapshot$8(luvio, config, options) {
411
+ const resourceParams = createResourceParams$8(config);
412
+ const request = createResourceRequest$8(resourceParams);
410
413
  return luvio.dispatchResourceRequest(request, options)
411
414
  .then((response) => {
412
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$4(luvio, config, resourceParams, response), () => {
415
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$6(luvio, config, resourceParams, response), () => {
413
416
  const cache = new StoreKeyMap();
414
- getResponseCacheKeys$6(cache, luvio, resourceParams, response.body);
417
+ getResponseCacheKeys$8(cache, luvio, resourceParams, response.body);
415
418
  return cache;
416
419
  });
417
420
  }, (response) => {
418
- return luvio.handleErrorResponse(() => onFetchResponseError$4(luvio, config, resourceParams, response));
421
+ return luvio.handleErrorResponse(() => onFetchResponseError$6(luvio, config, resourceParams, response));
419
422
  });
420
423
  }
421
- function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
422
- return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$6, undefined, false);
424
+ function buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext) {
425
+ return buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext, buildNetworkSnapshot$8, undefined, false);
423
426
  }
424
- function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
427
+ function buildCachedSnapshotCachePolicy$6(context, storeLookup) {
425
428
  const { luvio, config } = context;
426
429
  const selector = {
427
- recordId: keyBuilder$b(luvio, config),
428
- node: adapterFragment$4(luvio, config),
430
+ recordId: keyBuilder$f(luvio, config),
431
+ node: adapterFragment$6(luvio, config),
429
432
  variables: {},
430
433
  };
431
434
  const cacheSnapshot = storeLookup(selector, {
432
435
  config,
433
- resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
436
+ resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
434
437
  });
435
438
  return cacheSnapshot;
436
439
  }
437
440
  const getBotIdAdapterFactory = (luvio) => function einsteinCopilotBot__getBotId(untrustedConfig, requestContext) {
438
- const config = validateAdapterConfig$6(untrustedConfig, getBotId_ConfigPropertyNames);
441
+ const config = validateAdapterConfig$8(untrustedConfig, getBotId_ConfigPropertyNames);
439
442
  // Invalid or incomplete config
440
443
  if (config === null) {
441
444
  return null;
442
445
  }
443
446
  return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
444
- buildCachedSnapshotCachePolicy$4, buildNetworkSnapshotCachePolicy$4);
447
+ buildCachedSnapshotCachePolicy$6, buildNetworkSnapshotCachePolicy$6);
445
448
  };
446
449
 
447
- const VERSION$d = "24d61d5f37ff09155ee4a9d90eb4fcb5";
448
- function validate$k(obj, path = 'CopilotObjectInfoRepresentation') {
450
+ const VERSION$g = "24d61d5f37ff09155ee4a9d90eb4fcb5";
451
+ function validate$n(obj, path = 'CopilotObjectInfoRepresentation') {
449
452
  const v_error = (() => {
450
453
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
451
454
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -463,10 +466,10 @@ function validate$k(obj, path = 'CopilotObjectInfoRepresentation') {
463
466
  })();
464
467
  return v_error === undefined ? null : v_error;
465
468
  }
466
- const select$j = function CopilotObjectInfoRepresentationSelect() {
469
+ const select$o = function CopilotObjectInfoRepresentationSelect() {
467
470
  return {
468
471
  kind: 'Fragment',
469
- version: VERSION$d,
472
+ version: VERSION$g,
470
473
  private: [],
471
474
  selections: [
472
475
  {
@@ -480,7 +483,7 @@ const select$j = function CopilotObjectInfoRepresentationSelect() {
480
483
  ]
481
484
  };
482
485
  };
483
- function equals$d(existing, incoming) {
486
+ function equals$g(existing, incoming) {
484
487
  const existing_apiName = existing.apiName;
485
488
  const incoming_apiName = incoming.apiName;
486
489
  if (!(existing_apiName === incoming_apiName)) {
@@ -494,9 +497,9 @@ function equals$d(existing, incoming) {
494
497
  return true;
495
498
  }
496
499
 
497
- const TTL$6 = 900000;
498
- const VERSION$c = "ca1aedcbd4e34795fadf2dcaf66e5825";
499
- function validate$j(obj, path = 'CopilotObjectListRepresentation') {
500
+ const TTL$8 = 900000;
501
+ const VERSION$f = "ca1aedcbd4e34795fadf2dcaf66e5825";
502
+ function validate$m(obj, path = 'CopilotObjectListRepresentation') {
500
503
  const v_error = (() => {
501
504
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
502
505
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -509,7 +512,7 @@ function validate$j(obj, path = 'CopilotObjectListRepresentation') {
509
512
  for (let i = 0; i < obj_objects.length; i++) {
510
513
  const obj_objects_item = obj_objects[i];
511
514
  const path_objects_item = path_objects + '[' + i + ']';
512
- const referencepath_objects_itemValidationError = validate$k(obj_objects_item, path_objects_item);
515
+ const referencepath_objects_itemValidationError = validate$n(obj_objects_item, path_objects_item);
513
516
  if (referencepath_objects_itemValidationError !== null) {
514
517
  let message = 'Object doesn\'t match CopilotObjectInfoRepresentation (at "' + path_objects_item + '")\n';
515
518
  message += referencepath_objects_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -519,15 +522,15 @@ function validate$j(obj, path = 'CopilotObjectListRepresentation') {
519
522
  })();
520
523
  return v_error === undefined ? null : v_error;
521
524
  }
522
- const RepresentationType$6 = 'CopilotObjectListRepresentation';
523
- function normalize$6(input, existing, path, luvio, store, timestamp) {
525
+ const RepresentationType$8 = 'CopilotObjectListRepresentation';
526
+ function normalize$8(input, existing, path, luvio, store, timestamp) {
524
527
  return input;
525
528
  }
526
- const select$i = function CopilotObjectListRepresentationSelect() {
527
- const { selections: CopilotObjectInfoRepresentation__selections, opaque: CopilotObjectInfoRepresentation__opaque, } = select$j();
529
+ const select$n = function CopilotObjectListRepresentationSelect() {
530
+ const { selections: CopilotObjectInfoRepresentation__selections, opaque: CopilotObjectInfoRepresentation__opaque, } = select$o();
528
531
  return {
529
532
  kind: 'Fragment',
530
- version: VERSION$c,
533
+ version: VERSION$f,
531
534
  private: [],
532
535
  selections: [
533
536
  {
@@ -539,11 +542,11 @@ const select$i = function CopilotObjectListRepresentationSelect() {
539
542
  ]
540
543
  };
541
544
  };
542
- function equals$c(existing, incoming) {
545
+ function equals$f(existing, incoming) {
543
546
  const existing_objects = existing.objects;
544
547
  const incoming_objects = incoming.objects;
545
548
  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))) {
549
+ if (!(equals$g(existing_objects_item, incoming_objects_item))) {
547
550
  return false;
548
551
  }
549
552
  });
@@ -552,44 +555,44 @@ function equals$c(existing, incoming) {
552
555
  }
553
556
  return true;
554
557
  }
555
- const ingest$6 = function CopilotObjectListRepresentationIngest(input, path, luvio, store, timestamp) {
558
+ const ingest$8 = function CopilotObjectListRepresentationIngest(input, path, luvio, store, timestamp) {
556
559
  if (process.env.NODE_ENV !== 'production') {
557
- const validateError = validate$j(input);
560
+ const validateError = validate$m(input);
558
561
  if (validateError !== null) {
559
562
  throw validateError;
560
563
  }
561
564
  }
562
565
  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);
566
+ const ttlToUse = TTL$8;
567
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$8, "einstein-copilot-bot", VERSION$f, RepresentationType$8, equals$f);
565
568
  return createLink(key);
566
569
  };
567
- function getTypeCacheKeys$6(rootKeySet, luvio, input, fullPathFactory) {
570
+ function getTypeCacheKeys$8(rootKeySet, luvio, input, fullPathFactory) {
568
571
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
569
572
  const rootKey = fullPathFactory();
570
573
  rootKeySet.set(rootKey, {
571
574
  namespace: keyPrefix,
572
- representationName: RepresentationType$6,
575
+ representationName: RepresentationType$8,
573
576
  mergeable: false
574
577
  });
575
578
  }
576
579
 
577
- function select$h(luvio, params) {
578
- return select$i();
580
+ function select$m(luvio, params) {
581
+ return select$n();
579
582
  }
580
- function keyBuilder$a(luvio, params) {
583
+ function keyBuilder$e(luvio, params) {
581
584
  return keyPrefix + '::CopilotObjectListRepresentation:(' + 'limit:' + params.queryParams.limit + ',' + 'searchTerm:' + params.queryParams.searchTerm + ')';
582
585
  }
583
- function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
584
- getTypeCacheKeys$6(storeKeyMap, luvio, response, () => keyBuilder$a(luvio, resourceParams));
586
+ function getResponseCacheKeys$7(storeKeyMap, luvio, resourceParams, response) {
587
+ getTypeCacheKeys$8(storeKeyMap, luvio, response, () => keyBuilder$e(luvio, resourceParams));
585
588
  }
586
- function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
589
+ function ingestSuccess$7(luvio, resourceParams, response, snapshotRefresh) {
587
590
  const { body } = response;
588
- const key = keyBuilder$a(luvio, resourceParams);
589
- luvio.storeIngest(key, ingest$6, body);
591
+ const key = keyBuilder$e(luvio, resourceParams);
592
+ luvio.storeIngest(key, ingest$8, body);
590
593
  const snapshot = luvio.storeLookup({
591
594
  recordId: key,
592
- node: select$h(),
595
+ node: select$m(),
593
596
  variables: {},
594
597
  }, snapshotRefresh);
595
598
  if (process.env.NODE_ENV !== 'production') {
@@ -600,19 +603,19 @@ function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
600
603
  deepFreeze(snapshot.data);
601
604
  return snapshot;
602
605
  }
603
- function ingestError$3(luvio, params, error, snapshotRefresh) {
604
- const key = keyBuilder$a(luvio, params);
606
+ function ingestError$5(luvio, params, error, snapshotRefresh) {
607
+ const key = keyBuilder$e(luvio, params);
605
608
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
606
609
  const storeMetadataParams = {
607
- ttl: TTL$6,
610
+ ttl: TTL$8,
608
611
  namespace: keyPrefix,
609
- version: VERSION$c,
610
- representationName: RepresentationType$6
612
+ version: VERSION$f,
613
+ representationName: RepresentationType$8
611
614
  };
612
615
  luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
613
616
  return errorSnapshot;
614
617
  }
615
- function createResourceRequest$5(config) {
618
+ function createResourceRequest$7(config) {
616
619
  const headers = {};
617
620
  return {
618
621
  baseUri: '/services/data/v63.0',
@@ -626,94 +629,94 @@ function createResourceRequest$5(config) {
626
629
  };
627
630
  }
628
631
 
629
- const adapterName$5 = 'getCopilotObjects';
632
+ const adapterName$7 = 'getCopilotObjects';
630
633
  const getCopilotObjects_ConfigPropertyMetadata = [
631
634
  generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
632
635
  generateParamConfigMetadata('searchTerm', false, 1 /* QueryParameter */, 0 /* String */),
633
636
  ];
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);
637
+ const getCopilotObjects_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$7, getCopilotObjects_ConfigPropertyMetadata);
638
+ const createResourceParams$7 = /*#__PURE__*/ createResourceParams$9(getCopilotObjects_ConfigPropertyMetadata);
639
+ function keyBuilder$d(luvio, config) {
640
+ const resourceParams = createResourceParams$7(config);
641
+ return keyBuilder$e(luvio, resourceParams);
639
642
  }
640
- function typeCheckConfig$5(untrustedConfig) {
643
+ function typeCheckConfig$7(untrustedConfig) {
641
644
  const config = {};
642
- typeCheckConfig$7(untrustedConfig, config, getCopilotObjects_ConfigPropertyMetadata);
645
+ typeCheckConfig$9(untrustedConfig, config, getCopilotObjects_ConfigPropertyMetadata);
643
646
  return config;
644
647
  }
645
- function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
648
+ function validateAdapterConfig$7(untrustedConfig, configPropertyNames) {
646
649
  if (!untrustedIsObject(untrustedConfig)) {
647
650
  return null;
648
651
  }
649
652
  if (process.env.NODE_ENV !== 'production') {
650
653
  validateConfig(untrustedConfig, configPropertyNames);
651
654
  }
652
- const config = typeCheckConfig$5(untrustedConfig);
655
+ const config = typeCheckConfig$7(untrustedConfig);
653
656
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
654
657
  return null;
655
658
  }
656
659
  return config;
657
660
  }
658
- function adapterFragment$3(luvio, config) {
659
- createResourceParams$5(config);
660
- return select$h();
661
+ function adapterFragment$5(luvio, config) {
662
+ createResourceParams$7(config);
663
+ return select$m();
661
664
  }
662
- function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
663
- const snapshot = ingestSuccess$5(luvio, resourceParams, response, {
665
+ function onFetchResponseSuccess$5(luvio, config, resourceParams, response) {
666
+ const snapshot = ingestSuccess$7(luvio, resourceParams, response, {
664
667
  config,
665
- resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
668
+ resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
666
669
  });
667
670
  return luvio.storeBroadcast().then(() => snapshot);
668
671
  }
669
- function onFetchResponseError$3(luvio, config, resourceParams, response) {
670
- const snapshot = ingestError$3(luvio, resourceParams, response, {
672
+ function onFetchResponseError$5(luvio, config, resourceParams, response) {
673
+ const snapshot = ingestError$5(luvio, resourceParams, response, {
671
674
  config,
672
- resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
675
+ resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
673
676
  });
674
677
  return luvio.storeBroadcast().then(() => snapshot);
675
678
  }
676
- function buildNetworkSnapshot$5(luvio, config, options) {
677
- const resourceParams = createResourceParams$5(config);
678
- const request = createResourceRequest$5(resourceParams);
679
+ function buildNetworkSnapshot$7(luvio, config, options) {
680
+ const resourceParams = createResourceParams$7(config);
681
+ const request = createResourceRequest$7(resourceParams);
679
682
  return luvio.dispatchResourceRequest(request, options)
680
683
  .then((response) => {
681
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
684
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$5(luvio, config, resourceParams, response), () => {
682
685
  const cache = new StoreKeyMap();
683
- getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
686
+ getResponseCacheKeys$7(cache, luvio, resourceParams, response.body);
684
687
  return cache;
685
688
  });
686
689
  }, (response) => {
687
- return luvio.handleErrorResponse(() => onFetchResponseError$3(luvio, config, resourceParams, response));
690
+ return luvio.handleErrorResponse(() => onFetchResponseError$5(luvio, config, resourceParams, response));
688
691
  });
689
692
  }
690
- function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
691
- return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$5, undefined, false);
693
+ function buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext) {
694
+ return buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext, buildNetworkSnapshot$7, undefined, false);
692
695
  }
693
- function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
696
+ function buildCachedSnapshotCachePolicy$5(context, storeLookup) {
694
697
  const { luvio, config } = context;
695
698
  const selector = {
696
- recordId: keyBuilder$9(luvio, config),
697
- node: adapterFragment$3(luvio, config),
699
+ recordId: keyBuilder$d(luvio, config),
700
+ node: adapterFragment$5(luvio, config),
698
701
  variables: {},
699
702
  };
700
703
  const cacheSnapshot = storeLookup(selector, {
701
704
  config,
702
- resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
705
+ resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
703
706
  });
704
707
  return cacheSnapshot;
705
708
  }
706
709
  const getCopilotObjectsAdapterFactory = (luvio) => function einsteinCopilotBot__getCopilotObjects(untrustedConfig, requestContext) {
707
- const config = validateAdapterConfig$5(untrustedConfig, getCopilotObjects_ConfigPropertyNames);
710
+ const config = validateAdapterConfig$7(untrustedConfig, getCopilotObjects_ConfigPropertyNames);
708
711
  // Invalid or incomplete config
709
712
  if (config === null) {
710
713
  return null;
711
714
  }
712
715
  return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
713
- buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
716
+ buildCachedSnapshotCachePolicy$5, buildNetworkSnapshotCachePolicy$5);
714
717
  };
715
718
 
716
- function validate$i(obj, path = 'FollowUpActionsDesignConfigRepresentation') {
719
+ function validate$l(obj, path = 'FollowUpActionsDesignConfigRepresentation') {
717
720
  const v_error = (() => {
718
721
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
719
722
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -736,7 +739,7 @@ function validate$i(obj, path = 'FollowUpActionsDesignConfigRepresentation') {
736
739
  return v_error === undefined ? null : v_error;
737
740
  }
738
741
 
739
- function validate$h(obj, path = 'FollowUpActionsRenditionConfigRepresentation') {
742
+ function validate$k(obj, path = 'FollowUpActionsRenditionConfigRepresentation') {
740
743
  const v_error = (() => {
741
744
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
742
745
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -759,7 +762,7 @@ function validate$h(obj, path = 'FollowUpActionsRenditionConfigRepresentation')
759
762
  return v_error === undefined ? null : v_error;
760
763
  }
761
764
 
762
- function validate$g(obj, path = 'FollowUpActionsFilterConfigRepresentation') {
765
+ function validate$j(obj, path = 'FollowUpActionsFilterConfigRepresentation') {
763
766
  const v_error = (() => {
764
767
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
765
768
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -782,7 +785,7 @@ function validate$g(obj, path = 'FollowUpActionsFilterConfigRepresentation') {
782
785
  return v_error === undefined ? null : v_error;
783
786
  }
784
787
 
785
- function validate$f(obj, path = 'FollowUpActionsSchemaConfigRepresentation') {
788
+ function validate$i(obj, path = 'FollowUpActionsSchemaConfigRepresentation') {
786
789
  const v_error = (() => {
787
790
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
788
791
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -790,7 +793,7 @@ function validate$f(obj, path = 'FollowUpActionsSchemaConfigRepresentation') {
790
793
  if (obj.filterConfig !== undefined) {
791
794
  const obj_filterConfig = obj.filterConfig;
792
795
  const path_filterConfig = path + '.filterConfig';
793
- const referencepath_filterConfigValidationError = validate$g(obj_filterConfig, path_filterConfig);
796
+ const referencepath_filterConfigValidationError = validate$j(obj_filterConfig, path_filterConfig);
794
797
  if (referencepath_filterConfigValidationError !== null) {
795
798
  let message = 'Object doesn\'t match FollowUpActionsFilterConfigRepresentation (at "' + path_filterConfig + '")\n';
796
799
  message += referencepath_filterConfigValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -808,7 +811,7 @@ function validate$f(obj, path = 'FollowUpActionsSchemaConfigRepresentation') {
808
811
  return v_error === undefined ? null : v_error;
809
812
  }
810
813
 
811
- function validate$e(obj, path = 'FollowUpActionsSourceDescriptorRepresentation') {
814
+ function validate$h(obj, path = 'FollowUpActionsSourceDescriptorRepresentation') {
812
815
  const v_error = (() => {
813
816
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
814
817
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -831,7 +834,7 @@ function validate$e(obj, path = 'FollowUpActionsSourceDescriptorRepresentation')
831
834
  return v_error === undefined ? null : v_error;
832
835
  }
833
836
 
834
- function validate$d(obj, path = 'FollowUpActionsInputRepresentation') {
837
+ function validate$g(obj, path = 'FollowUpActionsInputRepresentation') {
835
838
  const v_error = (() => {
836
839
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
837
840
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -844,7 +847,7 @@ function validate$d(obj, path = 'FollowUpActionsInputRepresentation') {
844
847
  if (obj.designConfig !== undefined) {
845
848
  const obj_designConfig = obj.designConfig;
846
849
  const path_designConfig = path + '.designConfig';
847
- const referencepath_designConfigValidationError = validate$i(obj_designConfig, path_designConfig);
850
+ const referencepath_designConfigValidationError = validate$l(obj_designConfig, path_designConfig);
848
851
  if (referencepath_designConfigValidationError !== null) {
849
852
  let message = 'Object doesn\'t match FollowUpActionsDesignConfigRepresentation (at "' + path_designConfig + '")\n';
850
853
  message += referencepath_designConfigValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -854,7 +857,7 @@ function validate$d(obj, path = 'FollowUpActionsInputRepresentation') {
854
857
  if (obj.renditionConfig !== undefined) {
855
858
  const obj_renditionConfig = obj.renditionConfig;
856
859
  const path_renditionConfig = path + '.renditionConfig';
857
- const referencepath_renditionConfigValidationError = validate$h(obj_renditionConfig, path_renditionConfig);
860
+ const referencepath_renditionConfigValidationError = validate$k(obj_renditionConfig, path_renditionConfig);
858
861
  if (referencepath_renditionConfigValidationError !== null) {
859
862
  let message = 'Object doesn\'t match FollowUpActionsRenditionConfigRepresentation (at "' + path_renditionConfig + '")\n';
860
863
  message += referencepath_renditionConfigValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -864,7 +867,7 @@ function validate$d(obj, path = 'FollowUpActionsInputRepresentation') {
864
867
  if (obj.schemaConfig !== undefined) {
865
868
  const obj_schemaConfig = obj.schemaConfig;
866
869
  const path_schemaConfig = path + '.schemaConfig';
867
- const referencepath_schemaConfigValidationError = validate$f(obj_schemaConfig, path_schemaConfig);
870
+ const referencepath_schemaConfigValidationError = validate$i(obj_schemaConfig, path_schemaConfig);
868
871
  if (referencepath_schemaConfigValidationError !== null) {
869
872
  let message = 'Object doesn\'t match FollowUpActionsSchemaConfigRepresentation (at "' + path_schemaConfig + '")\n';
870
873
  message += referencepath_schemaConfigValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -874,7 +877,7 @@ function validate$d(obj, path = 'FollowUpActionsInputRepresentation') {
874
877
  if (obj.sourceDescriptor !== undefined) {
875
878
  const obj_sourceDescriptor = obj.sourceDescriptor;
876
879
  const path_sourceDescriptor = path + '.sourceDescriptor';
877
- const referencepath_sourceDescriptorValidationError = validate$e(obj_sourceDescriptor, path_sourceDescriptor);
880
+ const referencepath_sourceDescriptorValidationError = validate$h(obj_sourceDescriptor, path_sourceDescriptor);
878
881
  if (referencepath_sourceDescriptorValidationError !== null) {
879
882
  let message = 'Object doesn\'t match FollowUpActionsSourceDescriptorRepresentation (at "' + path_sourceDescriptor + '")\n';
880
883
  message += referencepath_sourceDescriptorValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -885,8 +888,8 @@ function validate$d(obj, path = 'FollowUpActionsInputRepresentation') {
885
888
  return v_error === undefined ? null : v_error;
886
889
  }
887
890
 
888
- const VERSION$b = "38e904794d03177700e02a0dbd234d01";
889
- function validate$c(obj, path = 'FollowUpActionsRepresentation') {
891
+ const VERSION$e = "38e904794d03177700e02a0dbd234d01";
892
+ function validate$f(obj, path = 'FollowUpActionsRepresentation') {
890
893
  const v_error = (() => {
891
894
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
892
895
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -911,10 +914,10 @@ function validate$c(obj, path = 'FollowUpActionsRepresentation') {
911
914
  })();
912
915
  return v_error === undefined ? null : v_error;
913
916
  }
914
- const select$g = function FollowUpActionsRepresentationSelect() {
917
+ const select$l = function FollowUpActionsRepresentationSelect() {
915
918
  return {
916
919
  kind: 'Fragment',
917
- version: VERSION$b,
920
+ version: VERSION$e,
918
921
  private: [],
919
922
  selections: [
920
923
  {
@@ -935,7 +938,7 @@ const select$g = function FollowUpActionsRepresentationSelect() {
935
938
  ]
936
939
  };
937
940
  };
938
- function equals$b(existing, incoming) {
941
+ function equals$e(existing, incoming) {
939
942
  const existing_descriptor = existing.descriptor;
940
943
  const incoming_descriptor = incoming.descriptor;
941
944
  // if at least one of these optionals is defined
@@ -962,9 +965,9 @@ function equals$b(existing, incoming) {
962
965
  return true;
963
966
  }
964
967
 
965
- const TTL$5 = 900000;
966
- const VERSION$a = "280b43a12fefd5d1adb432fd664b7def";
967
- function validate$b(obj, path = 'CopilotFollowUpActionsRepresentation') {
968
+ const TTL$7 = 900000;
969
+ const VERSION$d = "280b43a12fefd5d1adb432fd664b7def";
970
+ function validate$e(obj, path = 'CopilotFollowUpActionsRepresentation') {
968
971
  const v_error = (() => {
969
972
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
970
973
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -977,7 +980,7 @@ function validate$b(obj, path = 'CopilotFollowUpActionsRepresentation') {
977
980
  for (let i = 0; i < obj_actions.length; i++) {
978
981
  const obj_actions_item = obj_actions[i];
979
982
  const path_actions_item = path_actions + '[' + i + ']';
980
- const referencepath_actions_itemValidationError = validate$c(obj_actions_item, path_actions_item);
983
+ const referencepath_actions_itemValidationError = validate$f(obj_actions_item, path_actions_item);
981
984
  if (referencepath_actions_itemValidationError !== null) {
982
985
  let message = 'Object doesn\'t match FollowUpActionsRepresentation (at "' + path_actions_item + '")\n';
983
986
  message += referencepath_actions_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -999,15 +1002,15 @@ function validate$b(obj, path = 'CopilotFollowUpActionsRepresentation') {
999
1002
  })();
1000
1003
  return v_error === undefined ? null : v_error;
1001
1004
  }
1002
- const RepresentationType$5 = 'CopilotFollowUpActionsRepresentation';
1003
- function normalize$5(input, existing, path, luvio, store, timestamp) {
1005
+ const RepresentationType$7 = 'CopilotFollowUpActionsRepresentation';
1006
+ function normalize$7(input, existing, path, luvio, store, timestamp) {
1004
1007
  return input;
1005
1008
  }
1006
- const select$f = function CopilotFollowUpActionsRepresentationSelect() {
1007
- const { selections: FollowUpActionsRepresentation__selections, opaque: FollowUpActionsRepresentation__opaque, } = select$g();
1009
+ const select$k = function CopilotFollowUpActionsRepresentationSelect() {
1010
+ const { selections: FollowUpActionsRepresentation__selections, opaque: FollowUpActionsRepresentation__opaque, } = select$l();
1008
1011
  return {
1009
1012
  kind: 'Fragment',
1010
- version: VERSION$a,
1013
+ version: VERSION$d,
1011
1014
  private: [],
1012
1015
  selections: [
1013
1016
  {
@@ -1028,7 +1031,7 @@ const select$f = function CopilotFollowUpActionsRepresentationSelect() {
1028
1031
  ]
1029
1032
  };
1030
1033
  };
1031
- function equals$a(existing, incoming) {
1034
+ function equals$d(existing, incoming) {
1032
1035
  const existing_isSuccess = existing.isSuccess;
1033
1036
  const incoming_isSuccess = incoming.isSuccess;
1034
1037
  if (!(existing_isSuccess === incoming_isSuccess)) {
@@ -1050,7 +1053,7 @@ function equals$a(existing, incoming) {
1050
1053
  const existing_actions = existing.actions;
1051
1054
  const incoming_actions = incoming.actions;
1052
1055
  const equals_actions_items = equalsArray(existing_actions, incoming_actions, (existing_actions_item, incoming_actions_item) => {
1053
- if (!(equals$b(existing_actions_item, incoming_actions_item))) {
1056
+ if (!(equals$e(existing_actions_item, incoming_actions_item))) {
1054
1057
  return false;
1055
1058
  }
1056
1059
  });
@@ -1059,44 +1062,44 @@ function equals$a(existing, incoming) {
1059
1062
  }
1060
1063
  return true;
1061
1064
  }
1062
- const ingest$5 = function CopilotFollowUpActionsRepresentationIngest(input, path, luvio, store, timestamp) {
1065
+ const ingest$7 = function CopilotFollowUpActionsRepresentationIngest(input, path, luvio, store, timestamp) {
1063
1066
  if (process.env.NODE_ENV !== 'production') {
1064
- const validateError = validate$b(input);
1067
+ const validateError = validate$e(input);
1065
1068
  if (validateError !== null) {
1066
1069
  throw validateError;
1067
1070
  }
1068
1071
  }
1069
1072
  const key = path.fullPath;
1070
- const ttlToUse = TTL$5;
1071
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$5, "einstein-copilot-bot", VERSION$a, RepresentationType$5, equals$a);
1073
+ const ttlToUse = TTL$7;
1074
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$7, "einstein-copilot-bot", VERSION$d, RepresentationType$7, equals$d);
1072
1075
  return createLink(key);
1073
1076
  };
1074
- function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
1077
+ function getTypeCacheKeys$7(rootKeySet, luvio, input, fullPathFactory) {
1075
1078
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1076
1079
  const rootKey = fullPathFactory();
1077
1080
  rootKeySet.set(rootKey, {
1078
1081
  namespace: keyPrefix,
1079
- representationName: RepresentationType$5,
1082
+ representationName: RepresentationType$7,
1080
1083
  mergeable: false
1081
1084
  });
1082
1085
  }
1083
1086
 
1084
- function select$e(luvio, params) {
1085
- return select$f();
1087
+ function select$j(luvio, params) {
1088
+ return select$k();
1086
1089
  }
1087
- function keyBuilder$8(luvio, params) {
1090
+ function keyBuilder$c(luvio, params) {
1088
1091
  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(',') + ']' + ')';
1089
1092
  }
1090
- function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
1091
- getTypeCacheKeys$5(storeKeyMap, luvio, response, () => keyBuilder$8(luvio, resourceParams));
1093
+ function getResponseCacheKeys$6(storeKeyMap, luvio, resourceParams, response) {
1094
+ getTypeCacheKeys$7(storeKeyMap, luvio, response, () => keyBuilder$c(luvio, resourceParams));
1092
1095
  }
1093
- function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
1096
+ function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
1094
1097
  const { body } = response;
1095
- const key = keyBuilder$8(luvio, resourceParams);
1096
- luvio.storeIngest(key, ingest$5, body);
1098
+ const key = keyBuilder$c(luvio, resourceParams);
1099
+ luvio.storeIngest(key, ingest$7, body);
1097
1100
  const snapshot = luvio.storeLookup({
1098
1101
  recordId: key,
1099
- node: select$e(),
1102
+ node: select$j(),
1100
1103
  variables: {},
1101
1104
  }, snapshotRefresh);
1102
1105
  if (process.env.NODE_ENV !== 'production') {
@@ -1107,19 +1110,19 @@ function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
1107
1110
  deepFreeze(snapshot.data);
1108
1111
  return snapshot;
1109
1112
  }
1110
- function ingestError$2(luvio, params, error, snapshotRefresh) {
1111
- const key = keyBuilder$8(luvio, params);
1113
+ function ingestError$4(luvio, params, error, snapshotRefresh) {
1114
+ const key = keyBuilder$c(luvio, params);
1112
1115
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1113
1116
  const storeMetadataParams = {
1114
- ttl: TTL$5,
1117
+ ttl: TTL$7,
1115
1118
  namespace: keyPrefix,
1116
- version: VERSION$a,
1117
- representationName: RepresentationType$5
1119
+ version: VERSION$d,
1120
+ representationName: RepresentationType$7
1118
1121
  };
1119
1122
  luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
1120
1123
  return errorSnapshot;
1121
1124
  }
1122
- function createResourceRequest$4(config) {
1125
+ function createResourceRequest$6(config) {
1123
1126
  const headers = {};
1124
1127
  return {
1125
1128
  baseUri: '/services/data/v63.0',
@@ -1133,26 +1136,26 @@ function createResourceRequest$4(config) {
1133
1136
  };
1134
1137
  }
1135
1138
 
1136
- const adapterName$4 = 'getFollowUpActions';
1139
+ const adapterName$6 = 'getFollowUpActions';
1137
1140
  const getFollowUpActions_ConfigPropertyMetadata = [
1138
1141
  generateParamConfigMetadata('language', false, 2 /* Body */, 0 /* String */),
1139
1142
  generateParamConfigMetadata('followUpActionsInputs', true, 2 /* Body */, 4 /* Unsupported */, true),
1140
1143
  ];
1141
- const getFollowUpActions_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getFollowUpActions_ConfigPropertyMetadata);
1142
- const createResourceParams$4 = /*#__PURE__*/ createResourceParams$7(getFollowUpActions_ConfigPropertyMetadata);
1143
- function keyBuilder$7(luvio, config) {
1144
- const resourceParams = createResourceParams$4(config);
1145
- return keyBuilder$8(luvio, resourceParams);
1144
+ const getFollowUpActions_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, getFollowUpActions_ConfigPropertyMetadata);
1145
+ const createResourceParams$6 = /*#__PURE__*/ createResourceParams$9(getFollowUpActions_ConfigPropertyMetadata);
1146
+ function keyBuilder$b(luvio, config) {
1147
+ const resourceParams = createResourceParams$6(config);
1148
+ return keyBuilder$c(luvio, resourceParams);
1146
1149
  }
1147
- function typeCheckConfig$4(untrustedConfig) {
1150
+ function typeCheckConfig$6(untrustedConfig) {
1148
1151
  const config = {};
1149
- typeCheckConfig$7(untrustedConfig, config, getFollowUpActions_ConfigPropertyMetadata);
1152
+ typeCheckConfig$9(untrustedConfig, config, getFollowUpActions_ConfigPropertyMetadata);
1150
1153
  const untrustedConfig_followUpActionsInputs = untrustedConfig.followUpActionsInputs;
1151
1154
  if (ArrayIsArray$1(untrustedConfig_followUpActionsInputs)) {
1152
1155
  const untrustedConfig_followUpActionsInputs_array = [];
1153
1156
  for (let i = 0, arrayLength = untrustedConfig_followUpActionsInputs.length; i < arrayLength; i++) {
1154
1157
  const untrustedConfig_followUpActionsInputs_item = untrustedConfig_followUpActionsInputs[i];
1155
- const referenceFollowUpActionsInputRepresentationValidationError = validate$d(untrustedConfig_followUpActionsInputs_item);
1158
+ const referenceFollowUpActionsInputRepresentationValidationError = validate$g(untrustedConfig_followUpActionsInputs_item);
1156
1159
  if (referenceFollowUpActionsInputRepresentationValidationError === null) {
1157
1160
  untrustedConfig_followUpActionsInputs_array.push(untrustedConfig_followUpActionsInputs_item);
1158
1161
  }
@@ -1161,79 +1164,79 @@ function typeCheckConfig$4(untrustedConfig) {
1161
1164
  }
1162
1165
  return config;
1163
1166
  }
1164
- function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
1167
+ function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
1165
1168
  if (!untrustedIsObject(untrustedConfig)) {
1166
1169
  return null;
1167
1170
  }
1168
1171
  if (process.env.NODE_ENV !== 'production') {
1169
1172
  validateConfig(untrustedConfig, configPropertyNames);
1170
1173
  }
1171
- const config = typeCheckConfig$4(untrustedConfig);
1174
+ const config = typeCheckConfig$6(untrustedConfig);
1172
1175
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
1173
1176
  return null;
1174
1177
  }
1175
1178
  return config;
1176
1179
  }
1177
- function adapterFragment$2(luvio, config) {
1178
- createResourceParams$4(config);
1179
- return select$e();
1180
+ function adapterFragment$4(luvio, config) {
1181
+ createResourceParams$6(config);
1182
+ return select$j();
1180
1183
  }
1181
- function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
1182
- const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
1184
+ function onFetchResponseSuccess$4(luvio, config, resourceParams, response) {
1185
+ const snapshot = ingestSuccess$6(luvio, resourceParams, response, {
1183
1186
  config,
1184
- resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
1187
+ resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
1185
1188
  });
1186
1189
  return luvio.storeBroadcast().then(() => snapshot);
1187
1190
  }
1188
- function onFetchResponseError$2(luvio, config, resourceParams, response) {
1189
- const snapshot = ingestError$2(luvio, resourceParams, response, {
1191
+ function onFetchResponseError$4(luvio, config, resourceParams, response) {
1192
+ const snapshot = ingestError$4(luvio, resourceParams, response, {
1190
1193
  config,
1191
- resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
1194
+ resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
1192
1195
  });
1193
1196
  return luvio.storeBroadcast().then(() => snapshot);
1194
1197
  }
1195
- function buildNetworkSnapshot$4(luvio, config, options) {
1196
- const resourceParams = createResourceParams$4(config);
1197
- const request = createResourceRequest$4(resourceParams);
1198
+ function buildNetworkSnapshot$6(luvio, config, options) {
1199
+ const resourceParams = createResourceParams$6(config);
1200
+ const request = createResourceRequest$6(resourceParams);
1198
1201
  return luvio.dispatchResourceRequest(request, options)
1199
1202
  .then((response) => {
1200
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
1203
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$4(luvio, config, resourceParams, response), () => {
1201
1204
  const cache = new StoreKeyMap();
1202
- getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
1205
+ getResponseCacheKeys$6(cache, luvio, resourceParams, response.body);
1203
1206
  return cache;
1204
1207
  });
1205
1208
  }, (response) => {
1206
- return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
1209
+ return luvio.handleErrorResponse(() => onFetchResponseError$4(luvio, config, resourceParams, response));
1207
1210
  });
1208
1211
  }
1209
- function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
1210
- return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, 'get', false);
1212
+ function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
1213
+ return buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext, buildNetworkSnapshot$6, 'get', false);
1211
1214
  }
1212
- function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
1215
+ function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
1213
1216
  const { luvio, config } = context;
1214
1217
  const selector = {
1215
- recordId: keyBuilder$7(luvio, config),
1216
- node: adapterFragment$2(luvio, config),
1218
+ recordId: keyBuilder$b(luvio, config),
1219
+ node: adapterFragment$4(luvio, config),
1217
1220
  variables: {},
1218
1221
  };
1219
1222
  const cacheSnapshot = storeLookup(selector, {
1220
1223
  config,
1221
- resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
1224
+ resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
1222
1225
  });
1223
1226
  return cacheSnapshot;
1224
1227
  }
1225
1228
  const getFollowUpActionsAdapterFactory = (luvio) => function einsteinCopilotBot__getFollowUpActions(untrustedConfig, requestContext) {
1226
- const config = validateAdapterConfig$4(untrustedConfig, getFollowUpActions_ConfigPropertyNames);
1229
+ const config = validateAdapterConfig$6(untrustedConfig, getFollowUpActions_ConfigPropertyNames);
1227
1230
  // Invalid or incomplete config
1228
1231
  if (config === null) {
1229
1232
  return null;
1230
1233
  }
1231
1234
  return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
1232
- buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
1235
+ buildCachedSnapshotCachePolicy$4, buildNetworkSnapshotCachePolicy$4);
1233
1236
  };
1234
1237
 
1235
- const VERSION$9 = "3d8b52828ddd11f23f898b0bba8db802";
1236
- function validate$a(obj, path = 'CopilotQuickActionRepresentation') {
1238
+ const VERSION$c = "3d8b52828ddd11f23f898b0bba8db802";
1239
+ function validate$d(obj, path = 'CopilotQuickActionRepresentation') {
1237
1240
  const v_error = (() => {
1238
1241
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1239
1242
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -1355,10 +1358,10 @@ function validate$a(obj, path = 'CopilotQuickActionRepresentation') {
1355
1358
  })();
1356
1359
  return v_error === undefined ? null : v_error;
1357
1360
  }
1358
- const select$d = function CopilotQuickActionRepresentationSelect() {
1361
+ const select$i = function CopilotQuickActionRepresentationSelect() {
1359
1362
  return {
1360
1363
  kind: 'Fragment',
1361
- version: VERSION$9,
1364
+ version: VERSION$c,
1362
1365
  private: [],
1363
1366
  selections: [
1364
1367
  {
@@ -1440,7 +1443,7 @@ const select$d = function CopilotQuickActionRepresentationSelect() {
1440
1443
  ]
1441
1444
  };
1442
1445
  };
1443
- function equals$9(existing, incoming) {
1446
+ function equals$c(existing, incoming) {
1444
1447
  const existing_isGlobal = existing.isGlobal;
1445
1448
  const incoming_isGlobal = incoming.isGlobal;
1446
1449
  // if at least one of these optionals is defined
@@ -1597,75 +1600,688 @@ function equals$9(existing, incoming) {
1597
1600
  return false;
1598
1601
  }
1599
1602
  }
1600
- const existing_type = existing.type;
1601
- const incoming_type = incoming.type;
1602
- // if at least one of these optionals is defined
1603
- if (existing_type !== undefined || incoming_type !== undefined) {
1604
- // if one of these is not defined we know the other is defined and therefore
1605
- // not equal
1606
- if (existing_type === undefined || incoming_type === undefined) {
1607
- return false;
1608
- }
1609
- if (!(existing_type === incoming_type)) {
1610
- return false;
1611
- }
1603
+ const existing_type = existing.type;
1604
+ const incoming_type = incoming.type;
1605
+ // if at least one of these optionals is defined
1606
+ if (existing_type !== undefined || incoming_type !== undefined) {
1607
+ // if one of these is not defined we know the other is defined and therefore
1608
+ // not equal
1609
+ if (existing_type === undefined || incoming_type === undefined) {
1610
+ return false;
1611
+ }
1612
+ if (!(existing_type === incoming_type)) {
1613
+ return false;
1614
+ }
1615
+ }
1616
+ const existing_userUtterance = existing.userUtterance;
1617
+ const incoming_userUtterance = incoming.userUtterance;
1618
+ // if at least one of these optionals is defined
1619
+ if (existing_userUtterance !== undefined || incoming_userUtterance !== undefined) {
1620
+ // if one of these is not defined we know the other is defined and therefore
1621
+ // not equal
1622
+ if (existing_userUtterance === undefined || incoming_userUtterance === undefined) {
1623
+ return false;
1624
+ }
1625
+ if (!(existing_userUtterance === incoming_userUtterance)) {
1626
+ return false;
1627
+ }
1628
+ }
1629
+ const existing_planTemplateInput = existing.planTemplateInput;
1630
+ const incoming_planTemplateInput = incoming.planTemplateInput;
1631
+ // if at least one of these optionals is defined
1632
+ if (existing_planTemplateInput !== undefined || incoming_planTemplateInput !== undefined) {
1633
+ // if one of these is not defined we know the other is defined and therefore
1634
+ // not equal
1635
+ if (existing_planTemplateInput === undefined || incoming_planTemplateInput === undefined) {
1636
+ return false;
1637
+ }
1638
+ const equals_planTemplateInput_props = equalsObject(existing_planTemplateInput, incoming_planTemplateInput, (existing_planTemplateInput_prop, incoming_planTemplateInput_prop) => {
1639
+ if (!(existing_planTemplateInput_prop === incoming_planTemplateInput_prop)) {
1640
+ return false;
1641
+ }
1642
+ });
1643
+ if (equals_planTemplateInput_props === false) {
1644
+ return false;
1645
+ }
1646
+ }
1647
+ return true;
1648
+ }
1649
+
1650
+ const TTL$6 = 900000;
1651
+ const VERSION$b = "122e61b0db6dc38d244a87570efc5522";
1652
+ function validate$c(obj, path = 'RecommendedActionsRepresentation') {
1653
+ const v_error = (() => {
1654
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1655
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1656
+ }
1657
+ const obj_copilotQuickActions = obj.copilotQuickActions;
1658
+ const path_copilotQuickActions = path + '.copilotQuickActions';
1659
+ if (!ArrayIsArray(obj_copilotQuickActions)) {
1660
+ return new TypeError('Expected "array" but received "' + typeof obj_copilotQuickActions + '" (at "' + path_copilotQuickActions + '")');
1661
+ }
1662
+ for (let i = 0; i < obj_copilotQuickActions.length; i++) {
1663
+ const obj_copilotQuickActions_item = obj_copilotQuickActions[i];
1664
+ const path_copilotQuickActions_item = path_copilotQuickActions + '[' + i + ']';
1665
+ const referencepath_copilotQuickActions_itemValidationError = validate$d(obj_copilotQuickActions_item, path_copilotQuickActions_item);
1666
+ if (referencepath_copilotQuickActions_itemValidationError !== null) {
1667
+ let message = 'Object doesn\'t match CopilotQuickActionRepresentation (at "' + path_copilotQuickActions_item + '")\n';
1668
+ message += referencepath_copilotQuickActions_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1669
+ return new TypeError(message);
1670
+ }
1671
+ }
1672
+ if (obj.errorMessage !== undefined) {
1673
+ const obj_errorMessage = obj.errorMessage;
1674
+ const path_errorMessage = path + '.errorMessage';
1675
+ if (typeof obj_errorMessage !== 'string') {
1676
+ return new TypeError('Expected "string" but received "' + typeof obj_errorMessage + '" (at "' + path_errorMessage + '")');
1677
+ }
1678
+ }
1679
+ const obj_isSuccess = obj.isSuccess;
1680
+ const path_isSuccess = path + '.isSuccess';
1681
+ if (typeof obj_isSuccess !== 'boolean') {
1682
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isSuccess + '" (at "' + path_isSuccess + '")');
1683
+ }
1684
+ })();
1685
+ return v_error === undefined ? null : v_error;
1686
+ }
1687
+ const RepresentationType$6 = 'RecommendedActionsRepresentation';
1688
+ function normalize$6(input, existing, path, luvio, store, timestamp) {
1689
+ return input;
1690
+ }
1691
+ const select$h = function RecommendedActionsRepresentationSelect() {
1692
+ const { selections: CopilotQuickActionRepresentation__selections, opaque: CopilotQuickActionRepresentation__opaque, } = select$i();
1693
+ return {
1694
+ kind: 'Fragment',
1695
+ version: VERSION$b,
1696
+ private: [],
1697
+ selections: [
1698
+ {
1699
+ name: 'copilotQuickActions',
1700
+ kind: 'Object',
1701
+ plural: true,
1702
+ selections: CopilotQuickActionRepresentation__selections
1703
+ },
1704
+ {
1705
+ name: 'errorMessage',
1706
+ kind: 'Scalar',
1707
+ required: false
1708
+ },
1709
+ {
1710
+ name: 'isSuccess',
1711
+ kind: 'Scalar'
1712
+ }
1713
+ ]
1714
+ };
1715
+ };
1716
+ function equals$b(existing, incoming) {
1717
+ const existing_isSuccess = existing.isSuccess;
1718
+ const incoming_isSuccess = incoming.isSuccess;
1719
+ if (!(existing_isSuccess === incoming_isSuccess)) {
1720
+ return false;
1721
+ }
1722
+ const existing_errorMessage = existing.errorMessage;
1723
+ const incoming_errorMessage = incoming.errorMessage;
1724
+ // if at least one of these optionals is defined
1725
+ if (existing_errorMessage !== undefined || incoming_errorMessage !== undefined) {
1726
+ // if one of these is not defined we know the other is defined and therefore
1727
+ // not equal
1728
+ if (existing_errorMessage === undefined || incoming_errorMessage === undefined) {
1729
+ return false;
1730
+ }
1731
+ if (!(existing_errorMessage === incoming_errorMessage)) {
1732
+ return false;
1733
+ }
1734
+ }
1735
+ const existing_copilotQuickActions = existing.copilotQuickActions;
1736
+ const incoming_copilotQuickActions = incoming.copilotQuickActions;
1737
+ const equals_copilotQuickActions_items = equalsArray(existing_copilotQuickActions, incoming_copilotQuickActions, (existing_copilotQuickActions_item, incoming_copilotQuickActions_item) => {
1738
+ if (!(equals$c(existing_copilotQuickActions_item, incoming_copilotQuickActions_item))) {
1739
+ return false;
1740
+ }
1741
+ });
1742
+ if (equals_copilotQuickActions_items === false) {
1743
+ return false;
1744
+ }
1745
+ return true;
1746
+ }
1747
+ const ingest$6 = function RecommendedActionsRepresentationIngest(input, path, luvio, store, timestamp) {
1748
+ if (process.env.NODE_ENV !== 'production') {
1749
+ const validateError = validate$c(input);
1750
+ if (validateError !== null) {
1751
+ throw validateError;
1752
+ }
1753
+ }
1754
+ const key = path.fullPath;
1755
+ const ttlToUse = TTL$6;
1756
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$6, "einstein-copilot-bot", VERSION$b, RepresentationType$6, equals$b);
1757
+ return createLink(key);
1758
+ };
1759
+ function getTypeCacheKeys$6(rootKeySet, luvio, input, fullPathFactory) {
1760
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1761
+ const rootKey = fullPathFactory();
1762
+ rootKeySet.set(rootKey, {
1763
+ namespace: keyPrefix,
1764
+ representationName: RepresentationType$6,
1765
+ mergeable: false
1766
+ });
1767
+ }
1768
+
1769
+ function select$g(luvio, params) {
1770
+ return select$h();
1771
+ }
1772
+ function keyBuilder$a(luvio, params) {
1773
+ 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 + ')';
1774
+ }
1775
+ function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
1776
+ getTypeCacheKeys$6(storeKeyMap, luvio, response, () => keyBuilder$a(luvio, resourceParams));
1777
+ }
1778
+ function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
1779
+ const { body } = response;
1780
+ const key = keyBuilder$a(luvio, resourceParams);
1781
+ luvio.storeIngest(key, ingest$6, body);
1782
+ const snapshot = luvio.storeLookup({
1783
+ recordId: key,
1784
+ node: select$g(),
1785
+ variables: {},
1786
+ }, snapshotRefresh);
1787
+ if (process.env.NODE_ENV !== 'production') {
1788
+ if (snapshot.state !== 'Fulfilled') {
1789
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1790
+ }
1791
+ }
1792
+ deepFreeze(snapshot.data);
1793
+ return snapshot;
1794
+ }
1795
+ function ingestError$3(luvio, params, error, snapshotRefresh) {
1796
+ const key = keyBuilder$a(luvio, params);
1797
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1798
+ const storeMetadataParams = {
1799
+ ttl: TTL$6,
1800
+ namespace: keyPrefix,
1801
+ version: VERSION$b,
1802
+ representationName: RepresentationType$6
1803
+ };
1804
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
1805
+ return errorSnapshot;
1806
+ }
1807
+ function createResourceRequest$5(config) {
1808
+ const headers = {};
1809
+ return {
1810
+ baseUri: '/services/data/v63.0',
1811
+ basePath: '/connect/recommended-actions',
1812
+ method: 'get',
1813
+ body: null,
1814
+ urlParams: {},
1815
+ queryParams: config.queryParams,
1816
+ headers,
1817
+ priority: 'normal',
1818
+ };
1819
+ }
1820
+
1821
+ const adapterName$5 = 'getRecommendedActions';
1822
+ const getRecommendedActions_ConfigPropertyMetadata = [
1823
+ generateParamConfigMetadata('pageName', false, 1 /* QueryParameter */, 0 /* String */),
1824
+ generateParamConfigMetadata('pageType', true, 1 /* QueryParameter */, 0 /* String */),
1825
+ generateParamConfigMetadata('actionName', false, 1 /* QueryParameter */, 0 /* String */),
1826
+ generateParamConfigMetadata('objectApiName', false, 1 /* QueryParameter */, 0 /* String */),
1827
+ generateParamConfigMetadata('customApplicationName', true, 1 /* QueryParameter */, 0 /* String */),
1828
+ generateParamConfigMetadata('sessionId', true, 1 /* QueryParameter */, 0 /* String */),
1829
+ generateParamConfigMetadata('formFactor', true, 1 /* QueryParameter */, 0 /* String */),
1830
+ ];
1831
+ const getRecommendedActions_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, getRecommendedActions_ConfigPropertyMetadata);
1832
+ const createResourceParams$5 = /*#__PURE__*/ createResourceParams$9(getRecommendedActions_ConfigPropertyMetadata);
1833
+ function keyBuilder$9(luvio, config) {
1834
+ const resourceParams = createResourceParams$5(config);
1835
+ return keyBuilder$a(luvio, resourceParams);
1836
+ }
1837
+ function typeCheckConfig$5(untrustedConfig) {
1838
+ const config = {};
1839
+ typeCheckConfig$9(untrustedConfig, config, getRecommendedActions_ConfigPropertyMetadata);
1840
+ return config;
1841
+ }
1842
+ function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
1843
+ if (!untrustedIsObject(untrustedConfig)) {
1844
+ return null;
1845
+ }
1846
+ if (process.env.NODE_ENV !== 'production') {
1847
+ validateConfig(untrustedConfig, configPropertyNames);
1848
+ }
1849
+ const config = typeCheckConfig$5(untrustedConfig);
1850
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1851
+ return null;
1852
+ }
1853
+ return config;
1854
+ }
1855
+ function adapterFragment$3(luvio, config) {
1856
+ createResourceParams$5(config);
1857
+ return select$g();
1858
+ }
1859
+ function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
1860
+ const snapshot = ingestSuccess$5(luvio, resourceParams, response, {
1861
+ config,
1862
+ resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
1863
+ });
1864
+ return luvio.storeBroadcast().then(() => snapshot);
1865
+ }
1866
+ function onFetchResponseError$3(luvio, config, resourceParams, response) {
1867
+ const snapshot = ingestError$3(luvio, resourceParams, response, {
1868
+ config,
1869
+ resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
1870
+ });
1871
+ return luvio.storeBroadcast().then(() => snapshot);
1872
+ }
1873
+ function buildNetworkSnapshot$5(luvio, config, options) {
1874
+ const resourceParams = createResourceParams$5(config);
1875
+ const request = createResourceRequest$5(resourceParams);
1876
+ return luvio.dispatchResourceRequest(request, options)
1877
+ .then((response) => {
1878
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
1879
+ const cache = new StoreKeyMap();
1880
+ getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
1881
+ return cache;
1882
+ });
1883
+ }, (response) => {
1884
+ return luvio.handleErrorResponse(() => onFetchResponseError$3(luvio, config, resourceParams, response));
1885
+ });
1886
+ }
1887
+ function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
1888
+ return buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext, buildNetworkSnapshot$5, undefined, false);
1889
+ }
1890
+ function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
1891
+ const { luvio, config } = context;
1892
+ const selector = {
1893
+ recordId: keyBuilder$9(luvio, config),
1894
+ node: adapterFragment$3(luvio, config),
1895
+ variables: {},
1896
+ };
1897
+ const cacheSnapshot = storeLookup(selector, {
1898
+ config,
1899
+ resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
1900
+ });
1901
+ return cacheSnapshot;
1902
+ }
1903
+ const getRecommendedActionsAdapterFactory = (luvio) => function einsteinCopilotBot__getRecommendedActions(untrustedConfig, requestContext) {
1904
+ const config = validateAdapterConfig$5(untrustedConfig, getRecommendedActions_ConfigPropertyNames);
1905
+ // Invalid or incomplete config
1906
+ if (config === null) {
1907
+ return null;
1908
+ }
1909
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
1910
+ buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
1911
+ };
1912
+
1913
+ const VERSION$a = "504437088c2317480c651ac05a7565b5";
1914
+ function validate$b(obj, path = 'PlanTemplateRepresentation') {
1915
+ const v_error = (() => {
1916
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1917
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1918
+ }
1919
+ const obj_intent = obj.intent;
1920
+ const path_intent = path + '.intent';
1921
+ if (typeof obj_intent !== 'string') {
1922
+ return new TypeError('Expected "string" but received "' + typeof obj_intent + '" (at "' + path_intent + '")');
1923
+ }
1924
+ const obj_label = obj.label;
1925
+ const path_label = path + '.label';
1926
+ if (typeof obj_label !== 'string') {
1927
+ return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
1928
+ }
1929
+ const obj_planTemplateId = obj.planTemplateId;
1930
+ const path_planTemplateId = path + '.planTemplateId';
1931
+ if (typeof obj_planTemplateId !== 'string') {
1932
+ return new TypeError('Expected "string" but received "' + typeof obj_planTemplateId + '" (at "' + path_planTemplateId + '")');
1933
+ }
1934
+ const obj_userUtterance = obj.userUtterance;
1935
+ const path_userUtterance = path + '.userUtterance';
1936
+ if (typeof obj_userUtterance !== 'string') {
1937
+ return new TypeError('Expected "string" but received "' + typeof obj_userUtterance + '" (at "' + path_userUtterance + '")');
1938
+ }
1939
+ const obj_variables = obj.variables;
1940
+ const path_variables = path + '.variables';
1941
+ if (typeof obj_variables !== 'object' || ArrayIsArray(obj_variables) || obj_variables === null) {
1942
+ return new TypeError('Expected "object" but received "' + typeof obj_variables + '" (at "' + path_variables + '")');
1943
+ }
1944
+ const obj_variables_keys = ObjectKeys(obj_variables);
1945
+ for (let i = 0; i < obj_variables_keys.length; i++) {
1946
+ const key = obj_variables_keys[i];
1947
+ const obj_variables_prop = obj_variables[key];
1948
+ const path_variables_prop = path_variables + '["' + key + '"]';
1949
+ if (typeof obj_variables_prop !== 'string') {
1950
+ return new TypeError('Expected "string" but received "' + typeof obj_variables_prop + '" (at "' + path_variables_prop + '")');
1951
+ }
1952
+ }
1953
+ })();
1954
+ return v_error === undefined ? null : v_error;
1955
+ }
1956
+ const select$f = function PlanTemplateRepresentationSelect() {
1957
+ return {
1958
+ kind: 'Fragment',
1959
+ version: VERSION$a,
1960
+ private: [],
1961
+ selections: [
1962
+ {
1963
+ name: 'intent',
1964
+ kind: 'Scalar'
1965
+ },
1966
+ {
1967
+ name: 'label',
1968
+ kind: 'Scalar'
1969
+ },
1970
+ {
1971
+ name: 'planTemplateId',
1972
+ kind: 'Scalar'
1973
+ },
1974
+ {
1975
+ name: 'userUtterance',
1976
+ kind: 'Scalar'
1977
+ },
1978
+ {
1979
+ name: 'variables',
1980
+ kind: 'Scalar',
1981
+ map: true
1982
+ }
1983
+ ]
1984
+ };
1985
+ };
1986
+ function equals$a(existing, incoming) {
1987
+ const existing_intent = existing.intent;
1988
+ const incoming_intent = incoming.intent;
1989
+ if (!(existing_intent === incoming_intent)) {
1990
+ return false;
1991
+ }
1992
+ const existing_label = existing.label;
1993
+ const incoming_label = incoming.label;
1994
+ if (!(existing_label === incoming_label)) {
1995
+ return false;
1996
+ }
1997
+ const existing_planTemplateId = existing.planTemplateId;
1998
+ const incoming_planTemplateId = incoming.planTemplateId;
1999
+ if (!(existing_planTemplateId === incoming_planTemplateId)) {
2000
+ return false;
2001
+ }
2002
+ const existing_userUtterance = existing.userUtterance;
2003
+ const incoming_userUtterance = incoming.userUtterance;
2004
+ if (!(existing_userUtterance === incoming_userUtterance)) {
2005
+ return false;
2006
+ }
2007
+ const existing_variables = existing.variables;
2008
+ const incoming_variables = incoming.variables;
2009
+ const equals_variables_props = equalsObject(existing_variables, incoming_variables, (existing_variables_prop, incoming_variables_prop) => {
2010
+ if (!(existing_variables_prop === incoming_variables_prop)) {
2011
+ return false;
2012
+ }
2013
+ });
2014
+ if (equals_variables_props === false) {
2015
+ return false;
2016
+ }
2017
+ return true;
2018
+ }
2019
+
2020
+ const TTL$5 = 900000;
2021
+ const VERSION$9 = "0503b0c5ce250e7f5fbf16f2d3f2fec4";
2022
+ function validate$a(obj, path = 'RecommendedPlanTemplatesRepresentation') {
2023
+ const v_error = (() => {
2024
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
2025
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
2026
+ }
2027
+ if (obj.errorMessage !== undefined) {
2028
+ const obj_errorMessage = obj.errorMessage;
2029
+ const path_errorMessage = path + '.errorMessage';
2030
+ if (typeof obj_errorMessage !== 'string') {
2031
+ return new TypeError('Expected "string" but received "' + typeof obj_errorMessage + '" (at "' + path_errorMessage + '")');
2032
+ }
2033
+ }
2034
+ const obj_isSuccess = obj.isSuccess;
2035
+ const path_isSuccess = path + '.isSuccess';
2036
+ if (typeof obj_isSuccess !== 'boolean') {
2037
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isSuccess + '" (at "' + path_isSuccess + '")');
2038
+ }
2039
+ const obj_planTemplates = obj.planTemplates;
2040
+ const path_planTemplates = path + '.planTemplates';
2041
+ if (!ArrayIsArray(obj_planTemplates)) {
2042
+ return new TypeError('Expected "array" but received "' + typeof obj_planTemplates + '" (at "' + path_planTemplates + '")');
2043
+ }
2044
+ for (let i = 0; i < obj_planTemplates.length; i++) {
2045
+ const obj_planTemplates_item = obj_planTemplates[i];
2046
+ const path_planTemplates_item = path_planTemplates + '[' + i + ']';
2047
+ const referencepath_planTemplates_itemValidationError = validate$b(obj_planTemplates_item, path_planTemplates_item);
2048
+ if (referencepath_planTemplates_itemValidationError !== null) {
2049
+ let message = 'Object doesn\'t match PlanTemplateRepresentation (at "' + path_planTemplates_item + '")\n';
2050
+ message += referencepath_planTemplates_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
2051
+ return new TypeError(message);
2052
+ }
2053
+ }
2054
+ })();
2055
+ return v_error === undefined ? null : v_error;
2056
+ }
2057
+ const RepresentationType$5 = 'RecommendedPlanTemplatesRepresentation';
2058
+ function normalize$5(input, existing, path, luvio, store, timestamp) {
2059
+ return input;
2060
+ }
2061
+ const select$e = function RecommendedPlanTemplatesRepresentationSelect() {
2062
+ const { selections: PlanTemplateRepresentation__selections, opaque: PlanTemplateRepresentation__opaque, } = select$f();
2063
+ return {
2064
+ kind: 'Fragment',
2065
+ version: VERSION$9,
2066
+ private: [],
2067
+ selections: [
2068
+ {
2069
+ name: 'errorMessage',
2070
+ kind: 'Scalar',
2071
+ required: false
2072
+ },
2073
+ {
2074
+ name: 'isSuccess',
2075
+ kind: 'Scalar'
2076
+ },
2077
+ {
2078
+ name: 'planTemplates',
2079
+ kind: 'Object',
2080
+ plural: true,
2081
+ selections: PlanTemplateRepresentation__selections
2082
+ }
2083
+ ]
2084
+ };
2085
+ };
2086
+ function equals$9(existing, incoming) {
2087
+ const existing_isSuccess = existing.isSuccess;
2088
+ const incoming_isSuccess = incoming.isSuccess;
2089
+ if (!(existing_isSuccess === incoming_isSuccess)) {
2090
+ return false;
2091
+ }
2092
+ const existing_errorMessage = existing.errorMessage;
2093
+ const incoming_errorMessage = incoming.errorMessage;
2094
+ // if at least one of these optionals is defined
2095
+ if (existing_errorMessage !== undefined || incoming_errorMessage !== undefined) {
2096
+ // if one of these is not defined we know the other is defined and therefore
2097
+ // not equal
2098
+ if (existing_errorMessage === undefined || incoming_errorMessage === undefined) {
2099
+ return false;
2100
+ }
2101
+ if (!(existing_errorMessage === incoming_errorMessage)) {
2102
+ return false;
2103
+ }
2104
+ }
2105
+ const existing_planTemplates = existing.planTemplates;
2106
+ const incoming_planTemplates = incoming.planTemplates;
2107
+ const equals_planTemplates_items = equalsArray(existing_planTemplates, incoming_planTemplates, (existing_planTemplates_item, incoming_planTemplates_item) => {
2108
+ if (!(equals$a(existing_planTemplates_item, incoming_planTemplates_item))) {
2109
+ return false;
2110
+ }
2111
+ });
2112
+ if (equals_planTemplates_items === false) {
2113
+ return false;
2114
+ }
2115
+ return true;
2116
+ }
2117
+ const ingest$5 = function RecommendedPlanTemplatesRepresentationIngest(input, path, luvio, store, timestamp) {
2118
+ if (process.env.NODE_ENV !== 'production') {
2119
+ const validateError = validate$a(input);
2120
+ if (validateError !== null) {
2121
+ throw validateError;
2122
+ }
2123
+ }
2124
+ const key = path.fullPath;
2125
+ const ttlToUse = TTL$5;
2126
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$5, "einstein-copilot-bot", VERSION$9, RepresentationType$5, equals$9);
2127
+ return createLink(key);
2128
+ };
2129
+ function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
2130
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
2131
+ const rootKey = fullPathFactory();
2132
+ rootKeySet.set(rootKey, {
2133
+ namespace: keyPrefix,
2134
+ representationName: RepresentationType$5,
2135
+ mergeable: false
2136
+ });
2137
+ }
2138
+
2139
+ function select$d(luvio, params) {
2140
+ return select$e();
2141
+ }
2142
+ function keyBuilder$8(luvio, params) {
2143
+ return keyPrefix + '::RecommendedPlanTemplatesRepresentation:(' + 'pageType:' + params.urlParams.pageType + ',' + 'objectType:' + params.urlParams.objectType + ')';
2144
+ }
2145
+ function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
2146
+ getTypeCacheKeys$5(storeKeyMap, luvio, response, () => keyBuilder$8(luvio, resourceParams));
2147
+ }
2148
+ function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
2149
+ const { body } = response;
2150
+ const key = keyBuilder$8(luvio, resourceParams);
2151
+ luvio.storeIngest(key, ingest$5, body);
2152
+ const snapshot = luvio.storeLookup({
2153
+ recordId: key,
2154
+ node: select$d(),
2155
+ variables: {},
2156
+ }, snapshotRefresh);
2157
+ if (process.env.NODE_ENV !== 'production') {
2158
+ if (snapshot.state !== 'Fulfilled') {
2159
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
2160
+ }
2161
+ }
2162
+ deepFreeze(snapshot.data);
2163
+ return snapshot;
2164
+ }
2165
+ function ingestError$2(luvio, params, error, snapshotRefresh) {
2166
+ const key = keyBuilder$8(luvio, params);
2167
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
2168
+ const storeMetadataParams = {
2169
+ ttl: TTL$5,
2170
+ namespace: keyPrefix,
2171
+ version: VERSION$9,
2172
+ representationName: RepresentationType$5
2173
+ };
2174
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
2175
+ return errorSnapshot;
2176
+ }
2177
+ function createResourceRequest$4(config) {
2178
+ const headers = {};
2179
+ return {
2180
+ baseUri: '/services/data/v63.0',
2181
+ basePath: '/connect/recommended-plan-templates/' + config.urlParams.pageType + '/' + config.urlParams.objectType + '',
2182
+ method: 'get',
2183
+ body: null,
2184
+ urlParams: config.urlParams,
2185
+ queryParams: {},
2186
+ headers,
2187
+ priority: 'normal',
2188
+ };
2189
+ }
2190
+
2191
+ const adapterName$4 = 'getRecommendedPlanTemplates';
2192
+ const getRecommendedPlanTemplates_ConfigPropertyMetadata = [
2193
+ generateParamConfigMetadata('pageType', true, 0 /* UrlParameter */, 0 /* String */),
2194
+ generateParamConfigMetadata('objectType', true, 0 /* UrlParameter */, 0 /* String */),
2195
+ ];
2196
+ const getRecommendedPlanTemplates_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getRecommendedPlanTemplates_ConfigPropertyMetadata);
2197
+ const createResourceParams$4 = /*#__PURE__*/ createResourceParams$9(getRecommendedPlanTemplates_ConfigPropertyMetadata);
2198
+ function keyBuilder$7(luvio, config) {
2199
+ const resourceParams = createResourceParams$4(config);
2200
+ return keyBuilder$8(luvio, resourceParams);
2201
+ }
2202
+ function typeCheckConfig$4(untrustedConfig) {
2203
+ const config = {};
2204
+ typeCheckConfig$9(untrustedConfig, config, getRecommendedPlanTemplates_ConfigPropertyMetadata);
2205
+ return config;
2206
+ }
2207
+ function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
2208
+ if (!untrustedIsObject(untrustedConfig)) {
2209
+ return null;
2210
+ }
2211
+ if (process.env.NODE_ENV !== 'production') {
2212
+ validateConfig(untrustedConfig, configPropertyNames);
1612
2213
  }
1613
- const existing_userUtterance = existing.userUtterance;
1614
- const incoming_userUtterance = incoming.userUtterance;
1615
- // if at least one of these optionals is defined
1616
- if (existing_userUtterance !== undefined || incoming_userUtterance !== undefined) {
1617
- // if one of these is not defined we know the other is defined and therefore
1618
- // not equal
1619
- if (existing_userUtterance === undefined || incoming_userUtterance === undefined) {
1620
- return false;
1621
- }
1622
- if (!(existing_userUtterance === incoming_userUtterance)) {
1623
- return false;
1624
- }
2214
+ const config = typeCheckConfig$4(untrustedConfig);
2215
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
2216
+ return null;
1625
2217
  }
1626
- const existing_planTemplateInput = existing.planTemplateInput;
1627
- const incoming_planTemplateInput = incoming.planTemplateInput;
1628
- // if at least one of these optionals is defined
1629
- if (existing_planTemplateInput !== undefined || incoming_planTemplateInput !== undefined) {
1630
- // if one of these is not defined we know the other is defined and therefore
1631
- // not equal
1632
- if (existing_planTemplateInput === undefined || incoming_planTemplateInput === undefined) {
1633
- return false;
1634
- }
1635
- const equals_planTemplateInput_props = equalsObject(existing_planTemplateInput, incoming_planTemplateInput, (existing_planTemplateInput_prop, incoming_planTemplateInput_prop) => {
1636
- if (!(existing_planTemplateInput_prop === incoming_planTemplateInput_prop)) {
1637
- return false;
1638
- }
2218
+ return config;
2219
+ }
2220
+ function adapterFragment$2(luvio, config) {
2221
+ createResourceParams$4(config);
2222
+ return select$d();
2223
+ }
2224
+ function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
2225
+ const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
2226
+ config,
2227
+ resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
2228
+ });
2229
+ return luvio.storeBroadcast().then(() => snapshot);
2230
+ }
2231
+ function onFetchResponseError$2(luvio, config, resourceParams, response) {
2232
+ const snapshot = ingestError$2(luvio, resourceParams, response, {
2233
+ config,
2234
+ resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
2235
+ });
2236
+ return luvio.storeBroadcast().then(() => snapshot);
2237
+ }
2238
+ function buildNetworkSnapshot$4(luvio, config, options) {
2239
+ const resourceParams = createResourceParams$4(config);
2240
+ const request = createResourceRequest$4(resourceParams);
2241
+ return luvio.dispatchResourceRequest(request, options)
2242
+ .then((response) => {
2243
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
2244
+ const cache = new StoreKeyMap();
2245
+ getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
2246
+ return cache;
1639
2247
  });
1640
- if (equals_planTemplateInput_props === false) {
1641
- return false;
1642
- }
1643
- }
1644
- return true;
2248
+ }, (response) => {
2249
+ return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
2250
+ });
2251
+ }
2252
+ function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
2253
+ return buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, undefined, false);
2254
+ }
2255
+ function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
2256
+ const { luvio, config } = context;
2257
+ const selector = {
2258
+ recordId: keyBuilder$7(luvio, config),
2259
+ node: adapterFragment$2(luvio, config),
2260
+ variables: {},
2261
+ };
2262
+ const cacheSnapshot = storeLookup(selector, {
2263
+ config,
2264
+ resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
2265
+ });
2266
+ return cacheSnapshot;
1645
2267
  }
2268
+ const getRecommendedPlanTemplatesAdapterFactory = (luvio) => function einsteinCopilotBot__getRecommendedPlanTemplates(untrustedConfig, requestContext) {
2269
+ const config = validateAdapterConfig$4(untrustedConfig, getRecommendedPlanTemplates_ConfigPropertyNames);
2270
+ // Invalid or incomplete config
2271
+ if (config === null) {
2272
+ return null;
2273
+ }
2274
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
2275
+ buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
2276
+ };
1646
2277
 
1647
2278
  const TTL$4 = 900000;
1648
- const VERSION$8 = "122e61b0db6dc38d244a87570efc5522";
1649
- function validate$9(obj, path = 'RecommendedActionsRepresentation') {
2279
+ const VERSION$8 = "240cfec5fc3a3d994da444a2dfa1eca4";
2280
+ function validate$9(obj, path = 'RecommendedUtterancesRepresentation') {
1650
2281
  const v_error = (() => {
1651
2282
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1652
2283
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1653
2284
  }
1654
- const obj_copilotQuickActions = obj.copilotQuickActions;
1655
- const path_copilotQuickActions = path + '.copilotQuickActions';
1656
- if (!ArrayIsArray(obj_copilotQuickActions)) {
1657
- return new TypeError('Expected "array" but received "' + typeof obj_copilotQuickActions + '" (at "' + path_copilotQuickActions + '")');
1658
- }
1659
- for (let i = 0; i < obj_copilotQuickActions.length; i++) {
1660
- const obj_copilotQuickActions_item = obj_copilotQuickActions[i];
1661
- const path_copilotQuickActions_item = path_copilotQuickActions + '[' + i + ']';
1662
- const referencepath_copilotQuickActions_itemValidationError = validate$a(obj_copilotQuickActions_item, path_copilotQuickActions_item);
1663
- if (referencepath_copilotQuickActions_itemValidationError !== null) {
1664
- let message = 'Object doesn\'t match CopilotQuickActionRepresentation (at "' + path_copilotQuickActions_item + '")\n';
1665
- message += referencepath_copilotQuickActions_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1666
- return new TypeError(message);
1667
- }
1668
- }
1669
2285
  if (obj.errorMessage !== undefined) {
1670
2286
  const obj_errorMessage = obj.errorMessage;
1671
2287
  const path_errorMessage = path + '.errorMessage';
@@ -1678,26 +2294,31 @@ function validate$9(obj, path = 'RecommendedActionsRepresentation') {
1678
2294
  if (typeof obj_isSuccess !== 'boolean') {
1679
2295
  return new TypeError('Expected "boolean" but received "' + typeof obj_isSuccess + '" (at "' + path_isSuccess + '")');
1680
2296
  }
2297
+ const obj_utterances = obj.utterances;
2298
+ const path_utterances = path + '.utterances';
2299
+ if (!ArrayIsArray(obj_utterances)) {
2300
+ return new TypeError('Expected "array" but received "' + typeof obj_utterances + '" (at "' + path_utterances + '")');
2301
+ }
2302
+ for (let i = 0; i < obj_utterances.length; i++) {
2303
+ const obj_utterances_item = obj_utterances[i];
2304
+ const path_utterances_item = path_utterances + '[' + i + ']';
2305
+ if (typeof obj_utterances_item !== 'string') {
2306
+ return new TypeError('Expected "string" but received "' + typeof obj_utterances_item + '" (at "' + path_utterances_item + '")');
2307
+ }
2308
+ }
1681
2309
  })();
1682
2310
  return v_error === undefined ? null : v_error;
1683
2311
  }
1684
- const RepresentationType$4 = 'RecommendedActionsRepresentation';
2312
+ const RepresentationType$4 = 'RecommendedUtterancesRepresentation';
1685
2313
  function normalize$4(input, existing, path, luvio, store, timestamp) {
1686
2314
  return input;
1687
2315
  }
1688
- const select$c = function RecommendedActionsRepresentationSelect() {
1689
- const { selections: CopilotQuickActionRepresentation__selections, opaque: CopilotQuickActionRepresentation__opaque, } = select$d();
2316
+ const select$c = function RecommendedUtterancesRepresentationSelect() {
1690
2317
  return {
1691
2318
  kind: 'Fragment',
1692
2319
  version: VERSION$8,
1693
2320
  private: [],
1694
2321
  selections: [
1695
- {
1696
- name: 'copilotQuickActions',
1697
- kind: 'Object',
1698
- plural: true,
1699
- selections: CopilotQuickActionRepresentation__selections
1700
- },
1701
2322
  {
1702
2323
  name: 'errorMessage',
1703
2324
  kind: 'Scalar',
@@ -1706,6 +2327,11 @@ const select$c = function RecommendedActionsRepresentationSelect() {
1706
2327
  {
1707
2328
  name: 'isSuccess',
1708
2329
  kind: 'Scalar'
2330
+ },
2331
+ {
2332
+ name: 'utterances',
2333
+ kind: 'Scalar',
2334
+ plural: true
1709
2335
  }
1710
2336
  ]
1711
2337
  };
@@ -1729,19 +2355,19 @@ function equals$8(existing, incoming) {
1729
2355
  return false;
1730
2356
  }
1731
2357
  }
1732
- const existing_copilotQuickActions = existing.copilotQuickActions;
1733
- const incoming_copilotQuickActions = incoming.copilotQuickActions;
1734
- const equals_copilotQuickActions_items = equalsArray(existing_copilotQuickActions, incoming_copilotQuickActions, (existing_copilotQuickActions_item, incoming_copilotQuickActions_item) => {
1735
- if (!(equals$9(existing_copilotQuickActions_item, incoming_copilotQuickActions_item))) {
2358
+ const existing_utterances = existing.utterances;
2359
+ const incoming_utterances = incoming.utterances;
2360
+ const equals_utterances_items = equalsArray(existing_utterances, incoming_utterances, (existing_utterances_item, incoming_utterances_item) => {
2361
+ if (!(existing_utterances_item === incoming_utterances_item)) {
1736
2362
  return false;
1737
2363
  }
1738
2364
  });
1739
- if (equals_copilotQuickActions_items === false) {
2365
+ if (equals_utterances_items === false) {
1740
2366
  return false;
1741
2367
  }
1742
2368
  return true;
1743
2369
  }
1744
- const ingest$4 = function RecommendedActionsRepresentationIngest(input, path, luvio, store, timestamp) {
2370
+ const ingest$4 = function RecommendedUtterancesRepresentationIngest(input, path, luvio, store, timestamp) {
1745
2371
  if (process.env.NODE_ENV !== 'production') {
1746
2372
  const validateError = validate$9(input);
1747
2373
  if (validateError !== null) {
@@ -1767,7 +2393,7 @@ function select$b(luvio, params) {
1767
2393
  return select$c();
1768
2394
  }
1769
2395
  function keyBuilder$6(luvio, params) {
1770
- 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 + ')';
2396
+ return keyPrefix + '::RecommendedUtterancesRepresentation:(' + 'sessionId:' + params.queryParams.sessionId + ')';
1771
2397
  }
1772
2398
  function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
1773
2399
  getTypeCacheKeys$4(storeKeyMap, luvio, response, () => keyBuilder$6(luvio, resourceParams));
@@ -1805,7 +2431,7 @@ function createResourceRequest$3(config) {
1805
2431
  const headers = {};
1806
2432
  return {
1807
2433
  baseUri: '/services/data/v63.0',
1808
- basePath: '/connect/recommended-actions',
2434
+ basePath: '/connect/recommended-utterances',
1809
2435
  method: 'get',
1810
2436
  body: null,
1811
2437
  urlParams: {},
@@ -1815,25 +2441,19 @@ function createResourceRequest$3(config) {
1815
2441
  };
1816
2442
  }
1817
2443
 
1818
- const adapterName$3 = 'getRecommendedActions';
1819
- const getRecommendedActions_ConfigPropertyMetadata = [
1820
- generateParamConfigMetadata('pageName', false, 1 /* QueryParameter */, 0 /* String */),
1821
- generateParamConfigMetadata('pageType', true, 1 /* QueryParameter */, 0 /* String */),
1822
- generateParamConfigMetadata('actionName', false, 1 /* QueryParameter */, 0 /* String */),
1823
- generateParamConfigMetadata('objectApiName', false, 1 /* QueryParameter */, 0 /* String */),
1824
- generateParamConfigMetadata('customApplicationName', true, 1 /* QueryParameter */, 0 /* String */),
2444
+ const adapterName$3 = 'getRecommendedUtterances';
2445
+ const getRecommendedUtterances_ConfigPropertyMetadata = [
1825
2446
  generateParamConfigMetadata('sessionId', true, 1 /* QueryParameter */, 0 /* String */),
1826
- generateParamConfigMetadata('formFactor', true, 1 /* QueryParameter */, 0 /* String */),
1827
2447
  ];
1828
- const getRecommendedActions_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getRecommendedActions_ConfigPropertyMetadata);
1829
- const createResourceParams$3 = /*#__PURE__*/ createResourceParams$7(getRecommendedActions_ConfigPropertyMetadata);
2448
+ const getRecommendedUtterances_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getRecommendedUtterances_ConfigPropertyMetadata);
2449
+ const createResourceParams$3 = /*#__PURE__*/ createResourceParams$9(getRecommendedUtterances_ConfigPropertyMetadata);
1830
2450
  function keyBuilder$5(luvio, config) {
1831
2451
  const resourceParams = createResourceParams$3(config);
1832
2452
  return keyBuilder$6(luvio, resourceParams);
1833
2453
  }
1834
2454
  function typeCheckConfig$3(untrustedConfig) {
1835
2455
  const config = {};
1836
- typeCheckConfig$7(untrustedConfig, config, getRecommendedActions_ConfigPropertyMetadata);
2456
+ typeCheckConfig$9(untrustedConfig, config, getRecommendedUtterances_ConfigPropertyMetadata);
1837
2457
  return config;
1838
2458
  }
1839
2459
  function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
@@ -1882,7 +2502,7 @@ function buildNetworkSnapshot$3(luvio, config, options) {
1882
2502
  });
1883
2503
  }
1884
2504
  function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
1885
- return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
2505
+ return buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
1886
2506
  }
1887
2507
  function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
1888
2508
  const { luvio, config } = context;
@@ -1897,8 +2517,8 @@ function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
1897
2517
  });
1898
2518
  return cacheSnapshot;
1899
2519
  }
1900
- const getRecommendedActionsAdapterFactory = (luvio) => function einsteinCopilotBot__getRecommendedActions(untrustedConfig, requestContext) {
1901
- const config = validateAdapterConfig$3(untrustedConfig, getRecommendedActions_ConfigPropertyNames);
2520
+ const getRecommendedUtterancesAdapterFactory = (luvio) => function einsteinCopilotBot__getRecommendedUtterances(untrustedConfig, requestContext) {
2521
+ const config = validateAdapterConfig$3(untrustedConfig, getRecommendedUtterances_ConfigPropertyNames);
1902
2522
  // Invalid or incomplete config
1903
2523
  if (config === null) {
1904
2524
  return null;
@@ -1907,116 +2527,72 @@ const getRecommendedActionsAdapterFactory = (luvio) => function einsteinCopilotB
1907
2527
  buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
1908
2528
  };
1909
2529
 
1910
- const VERSION$7 = "504437088c2317480c651ac05a7565b5";
1911
- function validate$8(obj, path = 'PlanTemplateRepresentation') {
2530
+ const VERSION$7 = "7b8f676098deb92fdb92955fba2e6805";
2531
+ function validate$8(obj, path = 'WelcomeTopicSuggestedUtterancesRepresentation') {
1912
2532
  const v_error = (() => {
1913
2533
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1914
2534
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1915
2535
  }
1916
- const obj_intent = obj.intent;
1917
- const path_intent = path + '.intent';
1918
- if (typeof obj_intent !== 'string') {
1919
- return new TypeError('Expected "string" but received "' + typeof obj_intent + '" (at "' + path_intent + '")');
1920
- }
1921
- const obj_label = obj.label;
1922
- const path_label = path + '.label';
1923
- if (typeof obj_label !== 'string') {
1924
- return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
1925
- }
1926
- const obj_planTemplateId = obj.planTemplateId;
1927
- const path_planTemplateId = path + '.planTemplateId';
1928
- if (typeof obj_planTemplateId !== 'string') {
1929
- return new TypeError('Expected "string" but received "' + typeof obj_planTemplateId + '" (at "' + path_planTemplateId + '")');
1930
- }
1931
- const obj_userUtterance = obj.userUtterance;
1932
- const path_userUtterance = path + '.userUtterance';
1933
- if (typeof obj_userUtterance !== 'string') {
1934
- return new TypeError('Expected "string" but received "' + typeof obj_userUtterance + '" (at "' + path_userUtterance + '")');
1935
- }
1936
- const obj_variables = obj.variables;
1937
- const path_variables = path + '.variables';
1938
- if (typeof obj_variables !== 'object' || ArrayIsArray(obj_variables) || obj_variables === null) {
1939
- return new TypeError('Expected "object" but received "' + typeof obj_variables + '" (at "' + path_variables + '")');
1940
- }
1941
- const obj_variables_keys = ObjectKeys(obj_variables);
1942
- for (let i = 0; i < obj_variables_keys.length; i++) {
1943
- const key = obj_variables_keys[i];
1944
- const obj_variables_prop = obj_variables[key];
1945
- const path_variables_prop = path_variables + '["' + key + '"]';
1946
- if (typeof obj_variables_prop !== 'string') {
1947
- return new TypeError('Expected "string" but received "' + typeof obj_variables_prop + '" (at "' + path_variables_prop + '")');
2536
+ const obj_topicApiName = obj.topicApiName;
2537
+ const path_topicApiName = path + '.topicApiName';
2538
+ if (typeof obj_topicApiName !== 'string') {
2539
+ return new TypeError('Expected "string" but received "' + typeof obj_topicApiName + '" (at "' + path_topicApiName + '")');
2540
+ }
2541
+ const obj_utterances = obj.utterances;
2542
+ const path_utterances = path + '.utterances';
2543
+ if (!ArrayIsArray(obj_utterances)) {
2544
+ return new TypeError('Expected "array" but received "' + typeof obj_utterances + '" (at "' + path_utterances + '")');
2545
+ }
2546
+ for (let i = 0; i < obj_utterances.length; i++) {
2547
+ const obj_utterances_item = obj_utterances[i];
2548
+ const path_utterances_item = path_utterances + '[' + i + ']';
2549
+ if (typeof obj_utterances_item !== 'string') {
2550
+ return new TypeError('Expected "string" but received "' + typeof obj_utterances_item + '" (at "' + path_utterances_item + '")');
1948
2551
  }
1949
2552
  }
1950
2553
  })();
1951
2554
  return v_error === undefined ? null : v_error;
1952
2555
  }
1953
- const select$a = function PlanTemplateRepresentationSelect() {
2556
+ const select$a = function WelcomeTopicSuggestedUtterancesRepresentationSelect() {
1954
2557
  return {
1955
2558
  kind: 'Fragment',
1956
2559
  version: VERSION$7,
1957
2560
  private: [],
1958
2561
  selections: [
1959
2562
  {
1960
- name: 'intent',
1961
- kind: 'Scalar'
1962
- },
1963
- {
1964
- name: 'label',
1965
- kind: 'Scalar'
1966
- },
1967
- {
1968
- name: 'planTemplateId',
1969
- kind: 'Scalar'
1970
- },
1971
- {
1972
- name: 'userUtterance',
2563
+ name: 'topicApiName',
1973
2564
  kind: 'Scalar'
1974
2565
  },
1975
2566
  {
1976
- name: 'variables',
2567
+ name: 'utterances',
1977
2568
  kind: 'Scalar',
1978
- map: true
2569
+ plural: true
1979
2570
  }
1980
2571
  ]
1981
2572
  };
1982
2573
  };
1983
2574
  function equals$7(existing, incoming) {
1984
- const existing_intent = existing.intent;
1985
- const incoming_intent = incoming.intent;
1986
- if (!(existing_intent === incoming_intent)) {
1987
- return false;
1988
- }
1989
- const existing_label = existing.label;
1990
- const incoming_label = incoming.label;
1991
- if (!(existing_label === incoming_label)) {
2575
+ const existing_topicApiName = existing.topicApiName;
2576
+ const incoming_topicApiName = incoming.topicApiName;
2577
+ if (!(existing_topicApiName === incoming_topicApiName)) {
1992
2578
  return false;
1993
2579
  }
1994
- const existing_planTemplateId = existing.planTemplateId;
1995
- const incoming_planTemplateId = incoming.planTemplateId;
1996
- if (!(existing_planTemplateId === incoming_planTemplateId)) {
1997
- return false;
1998
- }
1999
- const existing_userUtterance = existing.userUtterance;
2000
- const incoming_userUtterance = incoming.userUtterance;
2001
- if (!(existing_userUtterance === incoming_userUtterance)) {
2002
- return false;
2003
- }
2004
- const existing_variables = existing.variables;
2005
- const incoming_variables = incoming.variables;
2006
- const equals_variables_props = equalsObject(existing_variables, incoming_variables, (existing_variables_prop, incoming_variables_prop) => {
2007
- if (!(existing_variables_prop === incoming_variables_prop)) {
2580
+ const existing_utterances = existing.utterances;
2581
+ const incoming_utterances = incoming.utterances;
2582
+ const equals_utterances_items = equalsArray(existing_utterances, incoming_utterances, (existing_utterances_item, incoming_utterances_item) => {
2583
+ if (!(existing_utterances_item === incoming_utterances_item)) {
2008
2584
  return false;
2009
2585
  }
2010
2586
  });
2011
- if (equals_variables_props === false) {
2587
+ if (equals_utterances_items === false) {
2012
2588
  return false;
2013
2589
  }
2014
2590
  return true;
2015
2591
  }
2016
2592
 
2017
- const TTL$3 = 900000;
2018
- const VERSION$6 = "0503b0c5ce250e7f5fbf16f2d3f2fec4";
2019
- function validate$7(obj, path = 'RecommendedPlanTemplatesRepresentation') {
2593
+ const TTL$3 = 30000;
2594
+ const VERSION$6 = "5563352486e852506e175069aef4b290";
2595
+ function validate$7(obj, path = 'WelcomeUtterancesRepresentation') {
2020
2596
  const v_error = (() => {
2021
2597
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
2022
2598
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -2033,30 +2609,30 @@ function validate$7(obj, path = 'RecommendedPlanTemplatesRepresentation') {
2033
2609
  if (typeof obj_isSuccess !== 'boolean') {
2034
2610
  return new TypeError('Expected "boolean" but received "' + typeof obj_isSuccess + '" (at "' + path_isSuccess + '")');
2035
2611
  }
2036
- const obj_planTemplates = obj.planTemplates;
2037
- const path_planTemplates = path + '.planTemplates';
2038
- if (!ArrayIsArray(obj_planTemplates)) {
2039
- return new TypeError('Expected "array" but received "' + typeof obj_planTemplates + '" (at "' + path_planTemplates + '")');
2040
- }
2041
- for (let i = 0; i < obj_planTemplates.length; i++) {
2042
- const obj_planTemplates_item = obj_planTemplates[i];
2043
- const path_planTemplates_item = path_planTemplates + '[' + i + ']';
2044
- const referencepath_planTemplates_itemValidationError = validate$8(obj_planTemplates_item, path_planTemplates_item);
2045
- if (referencepath_planTemplates_itemValidationError !== null) {
2046
- let message = 'Object doesn\'t match PlanTemplateRepresentation (at "' + path_planTemplates_item + '")\n';
2047
- message += referencepath_planTemplates_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
2612
+ const obj_topicsAndSuggestedUtterances = obj.topicsAndSuggestedUtterances;
2613
+ const path_topicsAndSuggestedUtterances = path + '.topicsAndSuggestedUtterances';
2614
+ if (!ArrayIsArray(obj_topicsAndSuggestedUtterances)) {
2615
+ return new TypeError('Expected "array" but received "' + typeof obj_topicsAndSuggestedUtterances + '" (at "' + path_topicsAndSuggestedUtterances + '")');
2616
+ }
2617
+ for (let i = 0; i < obj_topicsAndSuggestedUtterances.length; i++) {
2618
+ const obj_topicsAndSuggestedUtterances_item = obj_topicsAndSuggestedUtterances[i];
2619
+ const path_topicsAndSuggestedUtterances_item = path_topicsAndSuggestedUtterances + '[' + i + ']';
2620
+ const referencepath_topicsAndSuggestedUtterances_itemValidationError = validate$8(obj_topicsAndSuggestedUtterances_item, path_topicsAndSuggestedUtterances_item);
2621
+ if (referencepath_topicsAndSuggestedUtterances_itemValidationError !== null) {
2622
+ let message = 'Object doesn\'t match WelcomeTopicSuggestedUtterancesRepresentation (at "' + path_topicsAndSuggestedUtterances_item + '")\n';
2623
+ message += referencepath_topicsAndSuggestedUtterances_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
2048
2624
  return new TypeError(message);
2049
2625
  }
2050
2626
  }
2051
2627
  })();
2052
2628
  return v_error === undefined ? null : v_error;
2053
2629
  }
2054
- const RepresentationType$3 = 'RecommendedPlanTemplatesRepresentation';
2630
+ const RepresentationType$3 = 'WelcomeUtterancesRepresentation';
2055
2631
  function normalize$3(input, existing, path, luvio, store, timestamp) {
2056
2632
  return input;
2057
2633
  }
2058
- const select$9 = function RecommendedPlanTemplatesRepresentationSelect() {
2059
- const { selections: PlanTemplateRepresentation__selections, opaque: PlanTemplateRepresentation__opaque, } = select$a();
2634
+ const select$9 = function WelcomeUtterancesRepresentationSelect() {
2635
+ const { selections: WelcomeTopicSuggestedUtterancesRepresentation__selections, opaque: WelcomeTopicSuggestedUtterancesRepresentation__opaque, } = select$a();
2060
2636
  return {
2061
2637
  kind: 'Fragment',
2062
2638
  version: VERSION$6,
@@ -2072,10 +2648,10 @@ const select$9 = function RecommendedPlanTemplatesRepresentationSelect() {
2072
2648
  kind: 'Scalar'
2073
2649
  },
2074
2650
  {
2075
- name: 'planTemplates',
2651
+ name: 'topicsAndSuggestedUtterances',
2076
2652
  kind: 'Object',
2077
2653
  plural: true,
2078
- selections: PlanTemplateRepresentation__selections
2654
+ selections: WelcomeTopicSuggestedUtterancesRepresentation__selections
2079
2655
  }
2080
2656
  ]
2081
2657
  };
@@ -2099,19 +2675,19 @@ function equals$6(existing, incoming) {
2099
2675
  return false;
2100
2676
  }
2101
2677
  }
2102
- const existing_planTemplates = existing.planTemplates;
2103
- const incoming_planTemplates = incoming.planTemplates;
2104
- const equals_planTemplates_items = equalsArray(existing_planTemplates, incoming_planTemplates, (existing_planTemplates_item, incoming_planTemplates_item) => {
2105
- if (!(equals$7(existing_planTemplates_item, incoming_planTemplates_item))) {
2678
+ const existing_topicsAndSuggestedUtterances = existing.topicsAndSuggestedUtterances;
2679
+ const incoming_topicsAndSuggestedUtterances = incoming.topicsAndSuggestedUtterances;
2680
+ const equals_topicsAndSuggestedUtterances_items = equalsArray(existing_topicsAndSuggestedUtterances, incoming_topicsAndSuggestedUtterances, (existing_topicsAndSuggestedUtterances_item, incoming_topicsAndSuggestedUtterances_item) => {
2681
+ if (!(equals$7(existing_topicsAndSuggestedUtterances_item, incoming_topicsAndSuggestedUtterances_item))) {
2106
2682
  return false;
2107
2683
  }
2108
2684
  });
2109
- if (equals_planTemplates_items === false) {
2685
+ if (equals_topicsAndSuggestedUtterances_items === false) {
2110
2686
  return false;
2111
2687
  }
2112
2688
  return true;
2113
2689
  }
2114
- const ingest$3 = function RecommendedPlanTemplatesRepresentationIngest(input, path, luvio, store, timestamp) {
2690
+ const ingest$3 = function WelcomeUtterancesRepresentationIngest(input, path, luvio, store, timestamp) {
2115
2691
  if (process.env.NODE_ENV !== 'production') {
2116
2692
  const validateError = validate$7(input);
2117
2693
  if (validateError !== null) {
@@ -2137,7 +2713,7 @@ function select$8(luvio, params) {
2137
2713
  return select$9();
2138
2714
  }
2139
2715
  function keyBuilder$4(luvio, params) {
2140
- return keyPrefix + '::RecommendedPlanTemplatesRepresentation:(' + 'pageType:' + params.urlParams.pageType + ',' + 'objectType:' + params.urlParams.objectType + ')';
2716
+ return keyPrefix + '::WelcomeUtterancesRepresentation:(' + 'sessionId:' + params.queryParams.sessionId + ')';
2141
2717
  }
2142
2718
  function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
2143
2719
  getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$4(luvio, resourceParams));
@@ -2175,30 +2751,29 @@ function createResourceRequest$2(config) {
2175
2751
  const headers = {};
2176
2752
  return {
2177
2753
  baseUri: '/services/data/v63.0',
2178
- basePath: '/connect/recommended-plan-templates/' + config.urlParams.pageType + '/' + config.urlParams.objectType + '',
2754
+ basePath: '/connect/welcome-utterances',
2179
2755
  method: 'get',
2180
2756
  body: null,
2181
- urlParams: config.urlParams,
2182
- queryParams: {},
2757
+ urlParams: {},
2758
+ queryParams: config.queryParams,
2183
2759
  headers,
2184
2760
  priority: 'normal',
2185
2761
  };
2186
2762
  }
2187
2763
 
2188
- const adapterName$2 = 'getRecommendedPlanTemplates';
2189
- const getRecommendedPlanTemplates_ConfigPropertyMetadata = [
2190
- generateParamConfigMetadata('pageType', true, 0 /* UrlParameter */, 0 /* String */),
2191
- generateParamConfigMetadata('objectType', true, 0 /* UrlParameter */, 0 /* String */),
2764
+ const adapterName$2 = 'getWelcomeUtterances';
2765
+ const getWelcomeUtterances_ConfigPropertyMetadata = [
2766
+ generateParamConfigMetadata('sessionId', false, 1 /* QueryParameter */, 0 /* String */),
2192
2767
  ];
2193
- const getRecommendedPlanTemplates_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getRecommendedPlanTemplates_ConfigPropertyMetadata);
2194
- const createResourceParams$2 = /*#__PURE__*/ createResourceParams$7(getRecommendedPlanTemplates_ConfigPropertyMetadata);
2768
+ const getWelcomeUtterances_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getWelcomeUtterances_ConfigPropertyMetadata);
2769
+ const createResourceParams$2 = /*#__PURE__*/ createResourceParams$9(getWelcomeUtterances_ConfigPropertyMetadata);
2195
2770
  function keyBuilder$3(luvio, config) {
2196
2771
  const resourceParams = createResourceParams$2(config);
2197
2772
  return keyBuilder$4(luvio, resourceParams);
2198
2773
  }
2199
2774
  function typeCheckConfig$2(untrustedConfig) {
2200
2775
  const config = {};
2201
- typeCheckConfig$7(untrustedConfig, config, getRecommendedPlanTemplates_ConfigPropertyMetadata);
2776
+ typeCheckConfig$9(untrustedConfig, config, getWelcomeUtterances_ConfigPropertyMetadata);
2202
2777
  return config;
2203
2778
  }
2204
2779
  function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
@@ -2247,7 +2822,7 @@ function buildNetworkSnapshot$2(luvio, config, options) {
2247
2822
  });
2248
2823
  }
2249
2824
  function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
2250
- return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
2825
+ return buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
2251
2826
  }
2252
2827
  function buildCachedSnapshotCachePolicy(context, storeLookup) {
2253
2828
  const { luvio, config } = context;
@@ -2262,8 +2837,8 @@ function buildCachedSnapshotCachePolicy(context, storeLookup) {
2262
2837
  });
2263
2838
  return cacheSnapshot;
2264
2839
  }
2265
- const getRecommendedPlanTemplatesAdapterFactory = (luvio) => function einsteinCopilotBot__getRecommendedPlanTemplates(untrustedConfig, requestContext) {
2266
- const config = validateAdapterConfig$2(untrustedConfig, getRecommendedPlanTemplates_ConfigPropertyNames);
2840
+ const getWelcomeUtterancesAdapterFactory = (luvio) => function einsteinCopilotBot__getWelcomeUtterances(untrustedConfig, requestContext) {
2841
+ const config = validateAdapterConfig$2(untrustedConfig, getWelcomeUtterances_ConfigPropertyNames);
2267
2842
  // Invalid or incomplete config
2268
2843
  if (config === null) {
2269
2844
  return null;
@@ -3452,10 +4027,10 @@ const sendMessage_ConfigPropertyMetadata = [
3452
4027
  generateParamConfigMetadata('userUtterance', false, 2 /* Body */, 0 /* String */),
3453
4028
  ];
3454
4029
  const sendMessage_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, sendMessage_ConfigPropertyMetadata);
3455
- const createResourceParams$1 = /*#__PURE__*/ createResourceParams$7(sendMessage_ConfigPropertyMetadata);
4030
+ const createResourceParams$1 = /*#__PURE__*/ createResourceParams$9(sendMessage_ConfigPropertyMetadata);
3456
4031
  function typeCheckConfig$1(untrustedConfig) {
3457
4032
  const config = {};
3458
- typeCheckConfig$7(untrustedConfig, config, sendMessage_ConfigPropertyMetadata);
4033
+ typeCheckConfig$9(untrustedConfig, config, sendMessage_ConfigPropertyMetadata);
3459
4034
  const untrustedConfig_planTemplateVariables = untrustedConfig.planTemplateVariables;
3460
4035
  config.planTemplateVariables = untrustedConfig_planTemplateVariables;
3461
4036
  const untrustedConfig_reply = untrustedConfig.reply;
@@ -3643,10 +4218,10 @@ const submitFeedback_ConfigPropertyMetadata = [
3643
4218
  generateParamConfigMetadata('text', true, 2 /* Body */, 0 /* String */),
3644
4219
  ];
3645
4220
  const submitFeedback_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, submitFeedback_ConfigPropertyMetadata);
3646
- const createResourceParams = /*#__PURE__*/ createResourceParams$7(submitFeedback_ConfigPropertyMetadata);
4221
+ const createResourceParams = /*#__PURE__*/ createResourceParams$9(submitFeedback_ConfigPropertyMetadata);
3647
4222
  function typeCheckConfig(untrustedConfig) {
3648
4223
  const config = {};
3649
- typeCheckConfig$7(untrustedConfig, config, submitFeedback_ConfigPropertyMetadata);
4224
+ typeCheckConfig$9(untrustedConfig, config, submitFeedback_ConfigPropertyMetadata);
3650
4225
  const untrustedConfig_details = untrustedConfig.details;
3651
4226
  if (untrustedIsObject(untrustedConfig_details)) {
3652
4227
  const untrustedConfig_details_object = {};
@@ -3711,6 +4286,8 @@ let getCopilotObjects;
3711
4286
  let getFollowUpActions;
3712
4287
  let getRecommendedActions;
3713
4288
  let getRecommendedPlanTemplates;
4289
+ let getRecommendedUtterances;
4290
+ let getWelcomeUtterances;
3714
4291
  let sendMessage;
3715
4292
  let submitFeedback;
3716
4293
  // Imperative GET Adapters
@@ -3719,6 +4296,8 @@ let getCopilotObjects_imperative;
3719
4296
  let getFollowUpActions_imperative;
3720
4297
  let getRecommendedActions_imperative;
3721
4298
  let getRecommendedPlanTemplates_imperative;
4299
+ let getRecommendedUtterances_imperative;
4300
+ let getWelcomeUtterances_imperative;
3722
4301
  // Adapter Metadata
3723
4302
  const getBotIdMetadata = { apiFamily: 'einsteincopilot-bot', name: 'getBotId', ttl: 30000 };
3724
4303
  const getCopilotObjectsMetadata = {
@@ -3741,6 +4320,16 @@ const getRecommendedPlanTemplatesMetadata = {
3741
4320
  name: 'getRecommendedPlanTemplates',
3742
4321
  ttl: 900000,
3743
4322
  };
4323
+ const getRecommendedUtterancesMetadata = {
4324
+ apiFamily: 'einsteincopilot-bot',
4325
+ name: 'getRecommendedUtterances',
4326
+ ttl: 900000,
4327
+ };
4328
+ const getWelcomeUtterancesMetadata = {
4329
+ apiFamily: 'einsteincopilot-bot',
4330
+ name: 'getWelcomeUtterances',
4331
+ ttl: 30000,
4332
+ };
3744
4333
  // Notify Update Available
3745
4334
  function bindExportsTo(luvio) {
3746
4335
  // LDS Adapters
@@ -3749,6 +4338,8 @@ function bindExportsTo(luvio) {
3749
4338
  const getFollowUpActions_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getFollowUpActions', getFollowUpActionsAdapterFactory), getFollowUpActionsMetadata);
3750
4339
  const getRecommendedActions_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getRecommendedActions', getRecommendedActionsAdapterFactory), getRecommendedActionsMetadata);
3751
4340
  const getRecommendedPlanTemplates_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getRecommendedPlanTemplates', getRecommendedPlanTemplatesAdapterFactory), getRecommendedPlanTemplatesMetadata);
4341
+ const getRecommendedUtterances_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getRecommendedUtterances', getRecommendedUtterancesAdapterFactory), getRecommendedUtterancesMetadata);
4342
+ const getWelcomeUtterances_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getWelcomeUtterances', getWelcomeUtterancesAdapterFactory), getWelcomeUtterancesMetadata);
3752
4343
  function unwrapSnapshotData(factory) {
3753
4344
  const adapter = factory(luvio);
3754
4345
  return (config) => adapter(config).then((snapshot) => snapshot.data);
@@ -3759,6 +4350,8 @@ function bindExportsTo(luvio) {
3759
4350
  getFollowUpActions: createWireAdapterConstructor(luvio, getFollowUpActions_ldsAdapter, getFollowUpActionsMetadata),
3760
4351
  getRecommendedActions: createWireAdapterConstructor(luvio, getRecommendedActions_ldsAdapter, getRecommendedActionsMetadata),
3761
4352
  getRecommendedPlanTemplates: createWireAdapterConstructor(luvio, getRecommendedPlanTemplates_ldsAdapter, getRecommendedPlanTemplatesMetadata),
4353
+ getRecommendedUtterances: createWireAdapterConstructor(luvio, getRecommendedUtterances_ldsAdapter, getRecommendedUtterancesMetadata),
4354
+ getWelcomeUtterances: createWireAdapterConstructor(luvio, getWelcomeUtterances_ldsAdapter, getWelcomeUtterancesMetadata),
3762
4355
  sendMessage: unwrapSnapshotData(sendMessageAdapterFactory),
3763
4356
  submitFeedback: unwrapSnapshotData(submitFeedbackAdapterFactory),
3764
4357
  // Imperative GET Adapters
@@ -3767,6 +4360,8 @@ function bindExportsTo(luvio) {
3767
4360
  getFollowUpActions_imperative: createImperativeAdapter(luvio, getFollowUpActions_ldsAdapter, getFollowUpActionsMetadata),
3768
4361
  getRecommendedActions_imperative: createImperativeAdapter(luvio, getRecommendedActions_ldsAdapter, getRecommendedActionsMetadata),
3769
4362
  getRecommendedPlanTemplates_imperative: createImperativeAdapter(luvio, getRecommendedPlanTemplates_ldsAdapter, getRecommendedPlanTemplatesMetadata),
4363
+ getRecommendedUtterances_imperative: createImperativeAdapter(luvio, getRecommendedUtterances_ldsAdapter, getRecommendedUtterancesMetadata),
4364
+ getWelcomeUtterances_imperative: createImperativeAdapter(luvio, getWelcomeUtterances_ldsAdapter, getWelcomeUtterancesMetadata),
3770
4365
  // Notify Update Availables
3771
4366
  };
3772
4367
  }
@@ -3777,6 +4372,8 @@ withDefaultLuvio((luvio) => {
3777
4372
  getFollowUpActions,
3778
4373
  getRecommendedActions,
3779
4374
  getRecommendedPlanTemplates,
4375
+ getRecommendedUtterances,
4376
+ getWelcomeUtterances,
3780
4377
  sendMessage,
3781
4378
  submitFeedback,
3782
4379
  getBotId_imperative,
@@ -3784,8 +4381,10 @@ withDefaultLuvio((luvio) => {
3784
4381
  getFollowUpActions_imperative,
3785
4382
  getRecommendedActions_imperative,
3786
4383
  getRecommendedPlanTemplates_imperative,
4384
+ getRecommendedUtterances_imperative,
4385
+ getWelcomeUtterances_imperative,
3787
4386
  } = bindExportsTo(luvio));
3788
4387
  });
3789
4388
 
3790
- export { getBotId, getBotId_imperative, getCopilotObjects, getCopilotObjects_imperative, getFollowUpActions, getFollowUpActions_imperative, getRecommendedActions, getRecommendedActions_imperative, getRecommendedPlanTemplates, getRecommendedPlanTemplates_imperative, sendMessage, submitFeedback };
3791
- // version: 1.316.0-4453f1e2b6
4389
+ export { getBotId, getBotId_imperative, getCopilotObjects, getCopilotObjects_imperative, getFollowUpActions, getFollowUpActions_imperative, getRecommendedActions, getRecommendedActions_imperative, getRecommendedPlanTemplates, getRecommendedPlanTemplates_imperative, getRecommendedUtterances, getRecommendedUtterances_imperative, getWelcomeUtterances, getWelcomeUtterances_imperative, sendMessage, submitFeedback };
4390
+ // version: 1.317.0-81aed84d4b