@salesforce/lds-adapters-service-einstein-copilot-bot 1.286.0 → 1.287.0-dev10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,7 +4,7 @@
4
4
  * For full license text, see the LICENSE.txt file
5
5
  */
6
6
 
7
- import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$2, StoreKeyMap, createResourceParams as createResourceParams$3, typeCheckConfig as typeCheckConfig$3 } from '@luvio/engine';
7
+ import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$3, StoreKeyMap, createResourceParams as createResourceParams$5, typeCheckConfig as typeCheckConfig$5 } from '@luvio/engine';
8
8
 
9
9
  const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
10
10
  const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
@@ -112,9 +112,9 @@ function createLink(ref) {
112
112
  };
113
113
  }
114
114
 
115
- const TTL$3 = 30000;
116
- const VERSION$7 = "ab85410a28124cfed3d8eae7b8236853";
117
- function validate$8(obj, path = 'CopilotBotInfoRepresentation') {
115
+ const TTL$5 = 30000;
116
+ const VERSION$a = "ab85410a28124cfed3d8eae7b8236853";
117
+ function validate$b(obj, path = 'CopilotBotInfoRepresentation') {
118
118
  const v_error = (() => {
119
119
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
120
120
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -141,14 +141,14 @@ function validate$8(obj, path = 'CopilotBotInfoRepresentation') {
141
141
  })();
142
142
  return v_error === undefined ? null : v_error;
143
143
  }
144
- const RepresentationType$3 = 'CopilotBotInfoRepresentation';
145
- function normalize$3(input, existing, path, luvio, store, timestamp) {
144
+ const RepresentationType$5 = 'CopilotBotInfoRepresentation';
145
+ function normalize$5(input, existing, path, luvio, store, timestamp) {
146
146
  return input;
147
147
  }
148
- const select$a = function CopilotBotInfoRepresentationSelect() {
148
+ const select$f = function CopilotBotInfoRepresentationSelect() {
149
149
  return {
150
150
  kind: 'Fragment',
151
- version: VERSION$7,
151
+ version: VERSION$a,
152
152
  private: [],
153
153
  selections: [
154
154
  {
@@ -168,7 +168,7 @@ const select$a = function CopilotBotInfoRepresentationSelect() {
168
168
  ]
169
169
  };
170
170
  };
171
- function equals$7(existing, incoming) {
171
+ function equals$a(existing, incoming) {
172
172
  const existing_isSuccess = existing.isSuccess;
173
173
  const incoming_isSuccess = incoming.isSuccess;
174
174
  if (!(existing_isSuccess === incoming_isSuccess)) {
@@ -202,44 +202,44 @@ function equals$7(existing, incoming) {
202
202
  }
203
203
  return true;
204
204
  }
205
- const ingest$3 = function CopilotBotInfoRepresentationIngest(input, path, luvio, store, timestamp) {
205
+ const ingest$5 = function CopilotBotInfoRepresentationIngest(input, path, luvio, store, timestamp) {
206
206
  if (process.env.NODE_ENV !== 'production') {
207
- const validateError = validate$8(input);
207
+ const validateError = validate$b(input);
208
208
  if (validateError !== null) {
209
209
  throw validateError;
210
210
  }
211
211
  }
212
212
  const key = path.fullPath;
213
- const ttlToUse = TTL$3;
214
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "einstein-copilot-bot", VERSION$7, RepresentationType$3, equals$7);
213
+ const ttlToUse = TTL$5;
214
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$5, "einstein-copilot-bot", VERSION$a, RepresentationType$5, equals$a);
215
215
  return createLink(key);
216
216
  };
217
- function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
217
+ function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
218
218
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
219
219
  const rootKey = fullPathFactory();
220
220
  rootKeySet.set(rootKey, {
221
221
  namespace: keyPrefix,
222
- representationName: RepresentationType$3,
222
+ representationName: RepresentationType$5,
223
223
  mergeable: false
224
224
  });
225
225
  }
226
226
 
227
- function select$9(luvio, params) {
228
- return select$a();
227
+ function select$e(luvio, params) {
228
+ return select$f();
229
229
  }
230
- function keyBuilder$5(luvio, params) {
230
+ function keyBuilder$8(luvio, params) {
231
231
  return keyPrefix + '::CopilotBotInfoRepresentation:(' + ')';
232
232
  }
233
- function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
234
- getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$5());
233
+ function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
234
+ getTypeCacheKeys$5(storeKeyMap, luvio, response, () => keyBuilder$8());
235
235
  }
236
- function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
236
+ function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
237
237
  const { body } = response;
238
- const key = keyBuilder$5();
239
- luvio.storeIngest(key, ingest$3, body);
238
+ const key = keyBuilder$8();
239
+ luvio.storeIngest(key, ingest$5, body);
240
240
  const snapshot = luvio.storeLookup({
241
241
  recordId: key,
242
- node: select$9(),
242
+ node: select$e(),
243
243
  variables: {},
244
244
  }, snapshotRefresh);
245
245
  if (process.env.NODE_ENV !== 'production') {
@@ -250,19 +250,19 @@ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
250
250
  deepFreeze(snapshot.data);
251
251
  return snapshot;
252
252
  }
253
- function ingestError$1(luvio, params, error, snapshotRefresh) {
254
- const key = keyBuilder$5();
253
+ function ingestError$2(luvio, params, error, snapshotRefresh) {
254
+ const key = keyBuilder$8();
255
255
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
256
256
  const storeMetadataParams = {
257
- ttl: TTL$3,
257
+ ttl: TTL$5,
258
258
  namespace: keyPrefix,
259
- version: VERSION$7,
260
- representationName: RepresentationType$3
259
+ version: VERSION$a,
260
+ representationName: RepresentationType$5
261
261
  };
262
262
  luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
263
263
  return errorSnapshot;
264
264
  }
265
- function createResourceRequest$2(config) {
265
+ function createResourceRequest$4(config) {
266
266
  const headers = {};
267
267
  return {
268
268
  baseUri: '/services/data/v61.0',
@@ -276,91 +276,91 @@ function createResourceRequest$2(config) {
276
276
  };
277
277
  }
278
278
 
279
- const adapterName$2 = 'getBotId';
279
+ const adapterName$4 = 'getBotId';
280
280
  const getBotId_ConfigPropertyMetadata = [];
281
- const getBotId_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getBotId_ConfigPropertyMetadata);
282
- const createResourceParams$2 = /*#__PURE__*/ createResourceParams$3(getBotId_ConfigPropertyMetadata);
283
- function keyBuilder$4(luvio, config) {
284
- createResourceParams$2(config);
285
- return keyBuilder$5();
281
+ const getBotId_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getBotId_ConfigPropertyMetadata);
282
+ const createResourceParams$4 = /*#__PURE__*/ createResourceParams$5(getBotId_ConfigPropertyMetadata);
283
+ function keyBuilder$7(luvio, config) {
284
+ createResourceParams$4(config);
285
+ return keyBuilder$8();
286
286
  }
287
- function typeCheckConfig$2(untrustedConfig) {
287
+ function typeCheckConfig$4(untrustedConfig) {
288
288
  const config = {};
289
289
  return config;
290
290
  }
291
- function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
291
+ function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
292
292
  if (!untrustedIsObject(untrustedConfig)) {
293
293
  return null;
294
294
  }
295
295
  if (process.env.NODE_ENV !== 'production') {
296
296
  validateConfig(untrustedConfig, configPropertyNames);
297
297
  }
298
- const config = typeCheckConfig$2();
298
+ const config = typeCheckConfig$4();
299
299
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
300
300
  return null;
301
301
  }
302
302
  return config;
303
303
  }
304
- function adapterFragment$1(luvio, config) {
305
- createResourceParams$2(config);
306
- return select$9();
304
+ function adapterFragment$2(luvio, config) {
305
+ createResourceParams$4(config);
306
+ return select$e();
307
307
  }
308
- function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
309
- const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
308
+ function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
309
+ const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
310
310
  config,
311
- resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
311
+ resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
312
312
  });
313
313
  return luvio.storeBroadcast().then(() => snapshot);
314
314
  }
315
- function onFetchResponseError$1(luvio, config, resourceParams, response) {
316
- const snapshot = ingestError$1(luvio, resourceParams, response, {
315
+ function onFetchResponseError$2(luvio, config, resourceParams, response) {
316
+ const snapshot = ingestError$2(luvio, resourceParams, response, {
317
317
  config,
318
- resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
318
+ resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
319
319
  });
320
320
  return luvio.storeBroadcast().then(() => snapshot);
321
321
  }
322
- function buildNetworkSnapshot$2(luvio, config, options) {
323
- const resourceParams = createResourceParams$2(config);
324
- const request = createResourceRequest$2();
322
+ function buildNetworkSnapshot$4(luvio, config, options) {
323
+ const resourceParams = createResourceParams$4(config);
324
+ const request = createResourceRequest$4();
325
325
  return luvio.dispatchResourceRequest(request, options)
326
326
  .then((response) => {
327
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
327
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
328
328
  const cache = new StoreKeyMap();
329
- getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
329
+ getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
330
330
  return cache;
331
331
  });
332
332
  }, (response) => {
333
- return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
333
+ return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
334
334
  });
335
335
  }
336
- function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
337
- return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
336
+ function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
337
+ return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, undefined, false);
338
338
  }
339
- function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
339
+ function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
340
340
  const { luvio, config } = context;
341
341
  const selector = {
342
- recordId: keyBuilder$4(luvio, config),
343
- node: adapterFragment$1(luvio, config),
342
+ recordId: keyBuilder$7(luvio, config),
343
+ node: adapterFragment$2(luvio, config),
344
344
  variables: {},
345
345
  };
346
346
  const cacheSnapshot = storeLookup(selector, {
347
347
  config,
348
- resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
348
+ resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
349
349
  });
350
350
  return cacheSnapshot;
351
351
  }
352
352
  const getBotIdAdapterFactory = (luvio) => function einsteinCopilotBot__getBotId(untrustedConfig, requestContext) {
353
- const config = validateAdapterConfig$2(untrustedConfig, getBotId_ConfigPropertyNames);
353
+ const config = validateAdapterConfig$4(untrustedConfig, getBotId_ConfigPropertyNames);
354
354
  // Invalid or incomplete config
355
355
  if (config === null) {
356
356
  return null;
357
357
  }
358
358
  return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
359
- buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
359
+ buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
360
360
  };
361
361
 
362
- const VERSION$6 = "e8cb7e20392935088ea2f98edb927e8a";
363
- function validate$7(obj, path = 'EsTypeMessageRepresentation') {
362
+ const VERSION$9 = "e8cb7e20392935088ea2f98edb927e8a";
363
+ function validate$a(obj, path = 'EsTypeMessageRepresentation') {
364
364
  const v_error = (() => {
365
365
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
366
366
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -406,10 +406,10 @@ function validate$7(obj, path = 'EsTypeMessageRepresentation') {
406
406
  })();
407
407
  return v_error === undefined ? null : v_error;
408
408
  }
409
- const select$8 = function EsTypeMessageRepresentationSelect() {
409
+ const select$d = function EsTypeMessageRepresentationSelect() {
410
410
  return {
411
411
  kind: 'Fragment',
412
- version: VERSION$6,
412
+ version: VERSION$9,
413
413
  private: [],
414
414
  selections: [
415
415
  {
@@ -429,7 +429,7 @@ const select$8 = function EsTypeMessageRepresentationSelect() {
429
429
  ]
430
430
  };
431
431
  };
432
- function equals$6(existing, incoming) {
432
+ function equals$9(existing, incoming) {
433
433
  const existing_type = existing.type;
434
434
  const incoming_type = incoming.type;
435
435
  if (!(existing_type === incoming_type)) {
@@ -456,7 +456,7 @@ function equals$6(existing, incoming) {
456
456
  return true;
457
457
  }
458
458
 
459
- function validate$6(obj, path = 'VariableRepresentation') {
459
+ function validate$9(obj, path = 'VariableRepresentation') {
460
460
  const v_error = (() => {
461
461
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
462
462
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -466,19 +466,24 @@ function validate$6(obj, path = 'VariableRepresentation') {
466
466
  if (typeof obj_name !== 'string') {
467
467
  return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
468
468
  }
469
+ const obj_type = obj.type;
470
+ const path_type = path + '.type';
471
+ if (typeof obj_type !== 'string') {
472
+ return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
473
+ }
469
474
  if (obj.value !== undefined) {
470
475
  const obj_value = obj.value;
471
476
  const path_value = path + '.value';
472
- if (typeof obj_value !== 'string') {
473
- return new TypeError('Expected "string" but received "' + typeof obj_value + '" (at "' + path_value + '")');
477
+ if (obj_value === undefined) {
478
+ return new TypeError('Expected "defined" but received "' + typeof obj_value + '" (at "' + path_value + '")');
474
479
  }
475
480
  }
476
481
  })();
477
482
  return v_error === undefined ? null : v_error;
478
483
  }
479
484
 
480
- const VERSION$5 = "4e28b61c3ea362f1c68b28897784111e";
481
- function validate$5(obj, path = 'ConversationRuntimeProxyChoiceRepresentation') {
485
+ const VERSION$8 = "4e28b61c3ea362f1c68b28897784111e";
486
+ function validate$8(obj, path = 'ConversationRuntimeProxyChoiceRepresentation') {
482
487
  const v_error = (() => {
483
488
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
484
489
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -496,10 +501,10 @@ function validate$5(obj, path = 'ConversationRuntimeProxyChoiceRepresentation')
496
501
  })();
497
502
  return v_error === undefined ? null : v_error;
498
503
  }
499
- const select$7 = function ConversationRuntimeProxyChoiceRepresentationSelect() {
504
+ const select$c = function ConversationRuntimeProxyChoiceRepresentationSelect() {
500
505
  return {
501
506
  kind: 'Fragment',
502
- version: VERSION$5,
507
+ version: VERSION$8,
503
508
  private: [],
504
509
  selections: [
505
510
  {
@@ -513,7 +518,7 @@ const select$7 = function ConversationRuntimeProxyChoiceRepresentationSelect() {
513
518
  ]
514
519
  };
515
520
  };
516
- function equals$5(existing, incoming) {
521
+ function equals$8(existing, incoming) {
517
522
  const existing_alias = existing.alias;
518
523
  const incoming_alias = incoming.alias;
519
524
  if (!(existing_alias === incoming_alias)) {
@@ -527,8 +532,8 @@ function equals$5(existing, incoming) {
527
532
  return true;
528
533
  }
529
534
 
530
- const VERSION$4 = "477724425d0742c030025796c88ebf5d";
531
- function validate$4(obj, path = 'CollectMessageRepresentation') {
535
+ const VERSION$7 = "477724425d0742c030025796c88ebf5d";
536
+ function validate$7(obj, path = 'CollectMessageRepresentation') {
532
537
  const v_error = (() => {
533
538
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
534
539
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -536,7 +541,7 @@ function validate$4(obj, path = 'CollectMessageRepresentation') {
536
541
  if (obj.data !== undefined) {
537
542
  const obj_data = obj.data;
538
543
  const path_data = path + '.data';
539
- const referencepath_dataValidationError = validate$7(obj_data, path_data);
544
+ const referencepath_dataValidationError = validate$a(obj_data, path_data);
540
545
  if (referencepath_dataValidationError !== null) {
541
546
  let message = 'Object doesn\'t match EsTypeMessageRepresentation (at "' + path_data + '")\n';
542
547
  message += referencepath_dataValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -579,11 +584,11 @@ function validate$4(obj, path = 'CollectMessageRepresentation') {
579
584
  })();
580
585
  return v_error === undefined ? null : v_error;
581
586
  }
582
- const select$6 = function CollectMessageRepresentationSelect() {
583
- const { selections: EsTypeMessageRepresentation__selections, opaque: EsTypeMessageRepresentation__opaque, } = select$8();
587
+ const select$b = function CollectMessageRepresentationSelect() {
588
+ const { selections: EsTypeMessageRepresentation__selections, opaque: EsTypeMessageRepresentation__opaque, } = select$d();
584
589
  return {
585
590
  kind: 'Fragment',
586
- version: VERSION$4,
591
+ version: VERSION$7,
587
592
  private: [],
588
593
  selections: [
589
594
  {
@@ -604,7 +609,7 @@ const select$6 = function CollectMessageRepresentationSelect() {
604
609
  ]
605
610
  };
606
611
  };
607
- function equals$4(existing, incoming) {
612
+ function equals$7(existing, incoming) {
608
613
  const existing_targetType = existing.targetType;
609
614
  const incoming_targetType = incoming.targetType;
610
615
  if (!(existing_targetType === incoming_targetType)) {
@@ -619,7 +624,7 @@ function equals$4(existing, incoming) {
619
624
  if (existing_data === undefined || incoming_data === undefined) {
620
625
  return false;
621
626
  }
622
- if (!(equals$6(existing_data, incoming_data))) {
627
+ if (!(equals$9(existing_data, incoming_data))) {
623
628
  return false;
624
629
  }
625
630
  }
@@ -639,9 +644,9 @@ function equals$4(existing, incoming) {
639
644
  return true;
640
645
  }
641
646
 
642
- const TTL$2 = 30000;
643
- const VERSION$3 = "55ac02bd055f57a2a12aa0fa4844d1a2";
644
- function validate$3(obj, path = 'ConversationRuntimeProxyMessageRepresentation') {
647
+ const TTL$4 = 30000;
648
+ const VERSION$6 = "55ac02bd055f57a2a12aa0fa4844d1a2";
649
+ function validate$6(obj, path = 'ConversationRuntimeProxyMessageRepresentation') {
645
650
  const v_error = (() => {
646
651
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
647
652
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -655,7 +660,7 @@ function validate$3(obj, path = 'ConversationRuntimeProxyMessageRepresentation')
655
660
  for (let i = 0; i < obj_choices.length; i++) {
656
661
  const obj_choices_item = obj_choices[i];
657
662
  const path_choices_item = path_choices + '[' + i + ']';
658
- const referencepath_choices_itemValidationError = validate$5(obj_choices_item, path_choices_item);
663
+ const referencepath_choices_itemValidationError = validate$8(obj_choices_item, path_choices_item);
659
664
  if (referencepath_choices_itemValidationError !== null) {
660
665
  let message = 'Object doesn\'t match ConversationRuntimeProxyChoiceRepresentation (at "' + path_choices_item + '")\n';
661
666
  message += referencepath_choices_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -672,7 +677,7 @@ function validate$3(obj, path = 'ConversationRuntimeProxyMessageRepresentation')
672
677
  for (let i = 0; i < obj_collect.length; i++) {
673
678
  const obj_collect_item = obj_collect[i];
674
679
  const path_collect_item = path_collect + '[' + i + ']';
675
- const referencepath_collect_itemValidationError = validate$4(obj_collect_item, path_collect_item);
680
+ const referencepath_collect_itemValidationError = validate$7(obj_collect_item, path_collect_item);
676
681
  if (referencepath_collect_itemValidationError !== null) {
677
682
  let message = 'Object doesn\'t match CollectMessageRepresentation (at "' + path_collect_item + '")\n';
678
683
  message += referencepath_collect_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -689,7 +694,7 @@ function validate$3(obj, path = 'ConversationRuntimeProxyMessageRepresentation')
689
694
  for (let i = 0; i < obj_confirm.length; i++) {
690
695
  const obj_confirm_item = obj_confirm[i];
691
696
  const path_confirm_item = path_confirm + '[' + i + ']';
692
- const referencepath_confirm_itemValidationError = validate$7(obj_confirm_item, path_confirm_item);
697
+ const referencepath_confirm_itemValidationError = validate$a(obj_confirm_item, path_confirm_item);
693
698
  if (referencepath_confirm_itemValidationError !== null) {
694
699
  let message = 'Object doesn\'t match EsTypeMessageRepresentation (at "' + path_confirm_item + '")\n';
695
700
  message += referencepath_confirm_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -865,7 +870,7 @@ function validate$3(obj, path = 'ConversationRuntimeProxyMessageRepresentation')
865
870
  for (let i = 0; i < obj_result.length; i++) {
866
871
  const obj_result_item = obj_result[i];
867
872
  const path_result_item = path_result + '[' + i + ']';
868
- const referencepath_result_itemValidationError = validate$7(obj_result_item, path_result_item);
873
+ const referencepath_result_itemValidationError = validate$a(obj_result_item, path_result_item);
869
874
  if (referencepath_result_itemValidationError !== null) {
870
875
  let message = 'Object doesn\'t match EsTypeMessageRepresentation (at "' + path_result_item + '")\n';
871
876
  message += referencepath_result_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -939,26 +944,26 @@ function validate$3(obj, path = 'ConversationRuntimeProxyMessageRepresentation')
939
944
  })();
940
945
  return v_error === undefined ? null : v_error;
941
946
  }
942
- const RepresentationType$2 = 'ConversationRuntimeProxyMessageRepresentation';
943
- function keyBuilder$3(luvio, config) {
944
- return keyPrefix + '::' + RepresentationType$2 + ':' + config.id;
947
+ const RepresentationType$4 = 'ConversationRuntimeProxyMessageRepresentation';
948
+ function keyBuilder$6(luvio, config) {
949
+ return keyPrefix + '::' + RepresentationType$4 + ':' + config.id;
945
950
  }
946
- function keyBuilderFromType$1(luvio, object) {
951
+ function keyBuilderFromType$2(luvio, object) {
947
952
  const keyParams = {
948
953
  id: object.id
949
954
  };
950
- return keyBuilder$3(luvio, keyParams);
955
+ return keyBuilder$6(luvio, keyParams);
951
956
  }
952
- function normalize$2(input, existing, path, luvio, store, timestamp) {
957
+ function normalize$4(input, existing, path, luvio, store, timestamp) {
953
958
  return input;
954
959
  }
955
- const select$5 = function ConversationRuntimeProxyMessageRepresentationSelect() {
956
- const { selections: ConversationRuntimeProxyChoiceRepresentation__selections, opaque: ConversationRuntimeProxyChoiceRepresentation__opaque, } = select$7();
957
- const { selections: CollectMessageRepresentation__selections, opaque: CollectMessageRepresentation__opaque, } = select$6();
958
- const { selections: EsTypeMessageRepresentation__selections, opaque: EsTypeMessageRepresentation__opaque, } = select$8();
960
+ const select$a = function ConversationRuntimeProxyMessageRepresentationSelect() {
961
+ const { selections: ConversationRuntimeProxyChoiceRepresentation__selections, opaque: ConversationRuntimeProxyChoiceRepresentation__opaque, } = select$c();
962
+ const { selections: CollectMessageRepresentation__selections, opaque: CollectMessageRepresentation__opaque, } = select$b();
963
+ const { selections: EsTypeMessageRepresentation__selections, opaque: EsTypeMessageRepresentation__opaque, } = select$d();
959
964
  return {
960
965
  kind: 'Fragment',
961
- version: VERSION$3,
966
+ version: VERSION$6,
962
967
  private: [],
963
968
  selections: [
964
969
  {
@@ -1042,7 +1047,7 @@ const select$5 = function ConversationRuntimeProxyMessageRepresentationSelect()
1042
1047
  ]
1043
1048
  };
1044
1049
  };
1045
- function equals$3(existing, incoming) {
1050
+ function equals$6(existing, incoming) {
1046
1051
  const existing_id = existing.id;
1047
1052
  const incoming_id = incoming.id;
1048
1053
  if (!(existing_id === incoming_id)) {
@@ -1071,7 +1076,7 @@ function equals$3(existing, incoming) {
1071
1076
  return false;
1072
1077
  }
1073
1078
  const equals_choices_items = equalsArray(existing_choices, incoming_choices, (existing_choices_item, incoming_choices_item) => {
1074
- if (!(equals$5(existing_choices_item, incoming_choices_item))) {
1079
+ if (!(equals$8(existing_choices_item, incoming_choices_item))) {
1075
1080
  return false;
1076
1081
  }
1077
1082
  });
@@ -1089,7 +1094,7 @@ function equals$3(existing, incoming) {
1089
1094
  return false;
1090
1095
  }
1091
1096
  const equals_collect_items = equalsArray(existing_collect, incoming_collect, (existing_collect_item, incoming_collect_item) => {
1092
- if (!(equals$4(existing_collect_item, incoming_collect_item))) {
1097
+ if (!(equals$7(existing_collect_item, incoming_collect_item))) {
1093
1098
  return false;
1094
1099
  }
1095
1100
  });
@@ -1107,7 +1112,7 @@ function equals$3(existing, incoming) {
1107
1112
  return false;
1108
1113
  }
1109
1114
  const equals_confirm_items = equalsArray(existing_confirm, incoming_confirm, (existing_confirm_item, incoming_confirm_item) => {
1110
- if (!(equals$6(existing_confirm_item, incoming_confirm_item))) {
1115
+ if (!(equals$9(existing_confirm_item, incoming_confirm_item))) {
1111
1116
  return false;
1112
1117
  }
1113
1118
  });
@@ -1208,7 +1213,7 @@ function equals$3(existing, incoming) {
1208
1213
  return false;
1209
1214
  }
1210
1215
  const equals_result_items = equalsArray(existing_result, incoming_result, (existing_result_item, incoming_result_item) => {
1211
- if (!(equals$6(existing_result_item, incoming_result_item))) {
1216
+ if (!(equals$9(existing_result_item, incoming_result_item))) {
1212
1217
  return false;
1213
1218
  }
1214
1219
  });
@@ -1244,31 +1249,31 @@ function equals$3(existing, incoming) {
1244
1249
  }
1245
1250
  return true;
1246
1251
  }
1247
- const ingest$2 = function ConversationRuntimeProxyMessageRepresentationIngest(input, path, luvio, store, timestamp) {
1252
+ const ingest$4 = function ConversationRuntimeProxyMessageRepresentationIngest(input, path, luvio, store, timestamp) {
1248
1253
  if (process.env.NODE_ENV !== 'production') {
1249
- const validateError = validate$3(input);
1254
+ const validateError = validate$6(input);
1250
1255
  if (validateError !== null) {
1251
1256
  throw validateError;
1252
1257
  }
1253
1258
  }
1254
- const key = keyBuilderFromType$1(luvio, input);
1255
- const ttlToUse = TTL$2;
1256
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "einstein-copilot-bot", VERSION$3, RepresentationType$2, equals$3);
1259
+ const key = keyBuilderFromType$2(luvio, input);
1260
+ const ttlToUse = TTL$4;
1261
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "einstein-copilot-bot", VERSION$6, RepresentationType$4, equals$6);
1257
1262
  return createLink(key);
1258
1263
  };
1259
- function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
1264
+ function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
1260
1265
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1261
- const rootKey = keyBuilderFromType$1(luvio, input);
1266
+ const rootKey = keyBuilderFromType$2(luvio, input);
1262
1267
  rootKeySet.set(rootKey, {
1263
1268
  namespace: keyPrefix,
1264
- representationName: RepresentationType$2,
1269
+ representationName: RepresentationType$4,
1265
1270
  mergeable: false
1266
1271
  });
1267
1272
  }
1268
1273
 
1269
- const TTL$1 = 30000;
1270
- const VERSION$2 = "fe7024fb1132250f97d9616482f09f99";
1271
- function validate$2(obj, path = 'ConversationRuntimeProxyRepresentation') {
1274
+ const TTL$3 = 30000;
1275
+ const VERSION$5 = "fe7024fb1132250f97d9616482f09f99";
1276
+ function validate$5(obj, path = 'ConversationRuntimeProxyRepresentation') {
1272
1277
  const v_error = (() => {
1273
1278
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1274
1279
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -1320,23 +1325,23 @@ function validate$2(obj, path = 'ConversationRuntimeProxyRepresentation') {
1320
1325
  })();
1321
1326
  return v_error === undefined ? null : v_error;
1322
1327
  }
1323
- const RepresentationType$1 = 'ConversationRuntimeProxyRepresentation';
1324
- function keyBuilder$2(luvio, config) {
1325
- return keyPrefix + '::' + RepresentationType$1 + ':' + config.id;
1328
+ const RepresentationType$3 = 'ConversationRuntimeProxyRepresentation';
1329
+ function keyBuilder$5(luvio, config) {
1330
+ return keyPrefix + '::' + RepresentationType$3 + ':' + config.id;
1326
1331
  }
1327
- function keyBuilderFromType(luvio, object) {
1332
+ function keyBuilderFromType$1(luvio, object) {
1328
1333
  const keyParams = {
1329
1334
  id: object.requestId
1330
1335
  };
1331
- return keyBuilder$2(luvio, keyParams);
1336
+ return keyBuilder$5(luvio, keyParams);
1332
1337
  }
1333
- function normalize$1(input, existing, path, luvio, store, timestamp) {
1338
+ function normalize$3(input, existing, path, luvio, store, timestamp) {
1334
1339
  const input_messages = input.messages;
1335
1340
  const input_messages_id = path.fullPath + '__messages';
1336
1341
  for (let i = 0; i < input_messages.length; i++) {
1337
1342
  const input_messages_item = input_messages[i];
1338
1343
  let input_messages_item_id = input_messages_id + '__' + i;
1339
- input_messages[i] = ingest$2(input_messages_item, {
1344
+ input_messages[i] = ingest$4(input_messages_item, {
1340
1345
  fullPath: input_messages_item_id,
1341
1346
  propertyName: i,
1342
1347
  parent: {
@@ -1349,10 +1354,10 @@ function normalize$1(input, existing, path, luvio, store, timestamp) {
1349
1354
  }
1350
1355
  return input;
1351
1356
  }
1352
- const select$4 = function ConversationRuntimeProxyRepresentationSelect() {
1357
+ const select$9 = function ConversationRuntimeProxyRepresentationSelect() {
1353
1358
  return {
1354
1359
  kind: 'Fragment',
1355
- version: VERSION$2,
1360
+ version: VERSION$5,
1356
1361
  private: [],
1357
1362
  selections: [
1358
1363
  {
@@ -1367,7 +1372,7 @@ const select$4 = function ConversationRuntimeProxyRepresentationSelect() {
1367
1372
  name: 'messages',
1368
1373
  kind: 'Link',
1369
1374
  plural: true,
1370
- fragment: select$5()
1375
+ fragment: select$a()
1371
1376
  },
1372
1377
  {
1373
1378
  name: 'processedSequenceIds',
@@ -1385,7 +1390,7 @@ const select$4 = function ConversationRuntimeProxyRepresentationSelect() {
1385
1390
  ]
1386
1391
  };
1387
1392
  };
1388
- function equals$2(existing, incoming) {
1393
+ function equals$5(existing, incoming) {
1389
1394
  const existing_botId = existing.botId;
1390
1395
  const incoming_botId = incoming.botId;
1391
1396
  if (!(existing_botId === incoming_botId)) {
@@ -1428,45 +1433,45 @@ function equals$2(existing, incoming) {
1428
1433
  }
1429
1434
  return true;
1430
1435
  }
1431
- const ingest$1 = function ConversationRuntimeProxyRepresentationIngest(input, path, luvio, store, timestamp) {
1436
+ const ingest$3 = function ConversationRuntimeProxyRepresentationIngest(input, path, luvio, store, timestamp) {
1432
1437
  if (process.env.NODE_ENV !== 'production') {
1433
- const validateError = validate$2(input);
1438
+ const validateError = validate$5(input);
1434
1439
  if (validateError !== null) {
1435
1440
  throw validateError;
1436
1441
  }
1437
1442
  }
1438
- const key = keyBuilderFromType(luvio, input);
1439
- const ttlToUse = TTL$1;
1440
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "einstein-copilot-bot", VERSION$2, RepresentationType$1, equals$2);
1443
+ const key = keyBuilderFromType$1(luvio, input);
1444
+ const ttlToUse = TTL$3;
1445
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "einstein-copilot-bot", VERSION$5, RepresentationType$3, equals$5);
1441
1446
  return createLink(key);
1442
1447
  };
1443
- function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
1448
+ function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
1444
1449
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1445
- const rootKey = keyBuilderFromType(luvio, input);
1450
+ const rootKey = keyBuilderFromType$1(luvio, input);
1446
1451
  rootKeySet.set(rootKey, {
1447
1452
  namespace: keyPrefix,
1448
- representationName: RepresentationType$1,
1453
+ representationName: RepresentationType$3,
1449
1454
  mergeable: false
1450
1455
  });
1451
1456
  const input_messages_length = input.messages.length;
1452
1457
  for (let i = 0; i < input_messages_length; i++) {
1453
- getTypeCacheKeys$2(rootKeySet, luvio, input.messages[i]);
1458
+ getTypeCacheKeys$4(rootKeySet, luvio, input.messages[i]);
1454
1459
  }
1455
1460
  }
1456
1461
 
1457
- function select$3(luvio, params) {
1458
- return select$4();
1462
+ function select$8(luvio, params) {
1463
+ return select$9();
1459
1464
  }
1460
- function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
1461
- getTypeCacheKeys$1(storeKeyMap, luvio, response);
1465
+ function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
1466
+ getTypeCacheKeys$3(storeKeyMap, luvio, response);
1462
1467
  }
1463
- function ingestSuccess$1(luvio, resourceParams, response) {
1468
+ function ingestSuccess$3(luvio, resourceParams, response) {
1464
1469
  const { body } = response;
1465
- const key = keyBuilderFromType(luvio, body);
1466
- luvio.storeIngest(key, ingest$1, body);
1470
+ const key = keyBuilderFromType$1(luvio, body);
1471
+ luvio.storeIngest(key, ingest$3, body);
1467
1472
  const snapshot = luvio.storeLookup({
1468
1473
  recordId: key,
1469
- node: select$3(),
1474
+ node: select$8(),
1470
1475
  variables: {},
1471
1476
  });
1472
1477
  if (process.env.NODE_ENV !== 'production') {
@@ -1477,7 +1482,7 @@ function ingestSuccess$1(luvio, resourceParams, response) {
1477
1482
  deepFreeze(snapshot.data);
1478
1483
  return snapshot;
1479
1484
  }
1480
- function createResourceRequest$1(config) {
1485
+ function createResourceRequest$3(config) {
1481
1486
  const headers = {};
1482
1487
  return {
1483
1488
  baseUri: '/services/data/v61.0',
@@ -1491,7 +1496,7 @@ function createResourceRequest$1(config) {
1491
1496
  };
1492
1497
  }
1493
1498
 
1494
- const adapterName$1 = 'sendMessage';
1499
+ const adapterName$3 = 'sendMessage';
1495
1500
  const sendMessage_ConfigPropertyMetadata = [
1496
1501
  generateParamConfigMetadata('botId', false, 1 /* QueryParameter */, 0 /* String */),
1497
1502
  generateParamConfigMetadata('botVersionId', false, 1 /* QueryParameter */, 0 /* String */),
@@ -1508,11 +1513,11 @@ const sendMessage_ConfigPropertyMetadata = [
1508
1513
  generateParamConfigMetadata('variables', false, 2 /* Body */, 4 /* Unsupported */, true),
1509
1514
  generateParamConfigMetadata('userUtterance', false, 2 /* Body */, 0 /* String */),
1510
1515
  ];
1511
- const sendMessage_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, sendMessage_ConfigPropertyMetadata);
1512
- const createResourceParams$1 = /*#__PURE__*/ createResourceParams$3(sendMessage_ConfigPropertyMetadata);
1513
- function typeCheckConfig$1(untrustedConfig) {
1516
+ const sendMessage_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, sendMessage_ConfigPropertyMetadata);
1517
+ const createResourceParams$3 = /*#__PURE__*/ createResourceParams$5(sendMessage_ConfigPropertyMetadata);
1518
+ function typeCheckConfig$3(untrustedConfig) {
1514
1519
  const config = {};
1515
- typeCheckConfig$3(untrustedConfig, config, sendMessage_ConfigPropertyMetadata);
1520
+ typeCheckConfig$5(untrustedConfig, config, sendMessage_ConfigPropertyMetadata);
1516
1521
  const untrustedConfig_planTemplateVariables = untrustedConfig.planTemplateVariables;
1517
1522
  config.planTemplateVariables = untrustedConfig_planTemplateVariables;
1518
1523
  const untrustedConfig_reply = untrustedConfig.reply;
@@ -1520,7 +1525,7 @@ function typeCheckConfig$1(untrustedConfig) {
1520
1525
  const untrustedConfig_reply_array = [];
1521
1526
  for (let i = 0, arrayLength = untrustedConfig_reply.length; i < arrayLength; i++) {
1522
1527
  const untrustedConfig_reply_item = untrustedConfig_reply[i];
1523
- const referenceEsTypeMessageRepresentationValidationError = validate$7(untrustedConfig_reply_item);
1528
+ const referenceEsTypeMessageRepresentationValidationError = validate$a(untrustedConfig_reply_item);
1524
1529
  if (referenceEsTypeMessageRepresentationValidationError === null) {
1525
1530
  untrustedConfig_reply_array.push(untrustedConfig_reply_item);
1526
1531
  }
@@ -1532,7 +1537,7 @@ function typeCheckConfig$1(untrustedConfig) {
1532
1537
  const untrustedConfig_variables_array = [];
1533
1538
  for (let i = 0, arrayLength = untrustedConfig_variables.length; i < arrayLength; i++) {
1534
1539
  const untrustedConfig_variables_item = untrustedConfig_variables[i];
1535
- const referenceVariableRepresentationValidationError = validate$6(untrustedConfig_variables_item);
1540
+ const referenceVariableRepresentationValidationError = validate$9(untrustedConfig_variables_item);
1536
1541
  if (referenceVariableRepresentationValidationError === null) {
1537
1542
  untrustedConfig_variables_array.push(untrustedConfig_variables_item);
1538
1543
  }
@@ -1541,30 +1546,30 @@ function typeCheckConfig$1(untrustedConfig) {
1541
1546
  }
1542
1547
  return config;
1543
1548
  }
1544
- function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
1549
+ function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
1545
1550
  if (!untrustedIsObject(untrustedConfig)) {
1546
1551
  return null;
1547
1552
  }
1548
1553
  if (process.env.NODE_ENV !== 'production') {
1549
1554
  validateConfig(untrustedConfig, configPropertyNames);
1550
1555
  }
1551
- const config = typeCheckConfig$1(untrustedConfig);
1556
+ const config = typeCheckConfig$3(untrustedConfig);
1552
1557
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
1553
1558
  return null;
1554
1559
  }
1555
1560
  return config;
1556
1561
  }
1557
- function buildNetworkSnapshot$1(luvio, config, options) {
1558
- const resourceParams = createResourceParams$1(config);
1559
- const request = createResourceRequest$1(resourceParams);
1562
+ function buildNetworkSnapshot$3(luvio, config, options) {
1563
+ const resourceParams = createResourceParams$3(config);
1564
+ const request = createResourceRequest$3(resourceParams);
1560
1565
  return luvio.dispatchResourceRequest(request, options)
1561
1566
  .then((response) => {
1562
1567
  return luvio.handleSuccessResponse(() => {
1563
- const snapshot = ingestSuccess$1(luvio, resourceParams, response);
1568
+ const snapshot = ingestSuccess$3(luvio, resourceParams, response);
1564
1569
  return luvio.storeBroadcast().then(() => snapshot);
1565
1570
  }, () => {
1566
1571
  const cache = new StoreKeyMap();
1567
- getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
1572
+ getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
1568
1573
  return cache;
1569
1574
  });
1570
1575
  }, (response) => {
@@ -1574,17 +1579,17 @@ function buildNetworkSnapshot$1(luvio, config, options) {
1574
1579
  }
1575
1580
  const sendMessageAdapterFactory = (luvio) => {
1576
1581
  return function sendMessage(untrustedConfig) {
1577
- const config = validateAdapterConfig$1(untrustedConfig, sendMessage_ConfigPropertyNames);
1582
+ const config = validateAdapterConfig$3(untrustedConfig, sendMessage_ConfigPropertyNames);
1578
1583
  // Invalid or incomplete config
1579
1584
  if (config === null) {
1580
1585
  throw new Error('Invalid config for "sendMessage"');
1581
1586
  }
1582
- return buildNetworkSnapshot$1(luvio, config);
1587
+ return buildNetworkSnapshot$3(luvio, config);
1583
1588
  };
1584
1589
  };
1585
1590
 
1586
- const VERSION$1 = "504437088c2317480c651ac05a7565b5";
1587
- function validate$1(obj, path = 'PlanTemplateRepresentation') {
1591
+ const VERSION$4 = "504437088c2317480c651ac05a7565b5";
1592
+ function validate$4(obj, path = 'PlanTemplateRepresentation') {
1588
1593
  const v_error = (() => {
1589
1594
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1590
1595
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -1626,10 +1631,10 @@ function validate$1(obj, path = 'PlanTemplateRepresentation') {
1626
1631
  })();
1627
1632
  return v_error === undefined ? null : v_error;
1628
1633
  }
1629
- const select$2 = function PlanTemplateRepresentationSelect() {
1634
+ const select$7 = function PlanTemplateRepresentationSelect() {
1630
1635
  return {
1631
1636
  kind: 'Fragment',
1632
- version: VERSION$1,
1637
+ version: VERSION$4,
1633
1638
  private: [],
1634
1639
  selections: [
1635
1640
  {
@@ -1656,7 +1661,7 @@ const select$2 = function PlanTemplateRepresentationSelect() {
1656
1661
  ]
1657
1662
  };
1658
1663
  };
1659
- function equals$1(existing, incoming) {
1664
+ function equals$4(existing, incoming) {
1660
1665
  const existing_intent = existing.intent;
1661
1666
  const incoming_intent = incoming.intent;
1662
1667
  if (!(existing_intent === incoming_intent)) {
@@ -1690,9 +1695,9 @@ function equals$1(existing, incoming) {
1690
1695
  return true;
1691
1696
  }
1692
1697
 
1693
- const TTL = 900000;
1694
- const VERSION = "0503b0c5ce250e7f5fbf16f2d3f2fec4";
1695
- function validate(obj, path = 'RecommendedPlanTemplatesRepresentation') {
1698
+ const TTL$2 = 900000;
1699
+ const VERSION$3 = "0503b0c5ce250e7f5fbf16f2d3f2fec4";
1700
+ function validate$3(obj, path = 'RecommendedPlanTemplatesRepresentation') {
1696
1701
  const v_error = (() => {
1697
1702
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1698
1703
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -1717,7 +1722,7 @@ function validate(obj, path = 'RecommendedPlanTemplatesRepresentation') {
1717
1722
  for (let i = 0; i < obj_planTemplates.length; i++) {
1718
1723
  const obj_planTemplates_item = obj_planTemplates[i];
1719
1724
  const path_planTemplates_item = path_planTemplates + '[' + i + ']';
1720
- const referencepath_planTemplates_itemValidationError = validate$1(obj_planTemplates_item, path_planTemplates_item);
1725
+ const referencepath_planTemplates_itemValidationError = validate$4(obj_planTemplates_item, path_planTemplates_item);
1721
1726
  if (referencepath_planTemplates_itemValidationError !== null) {
1722
1727
  let message = 'Object doesn\'t match PlanTemplateRepresentation (at "' + path_planTemplates_item + '")\n';
1723
1728
  message += referencepath_planTemplates_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -1727,15 +1732,15 @@ function validate(obj, path = 'RecommendedPlanTemplatesRepresentation') {
1727
1732
  })();
1728
1733
  return v_error === undefined ? null : v_error;
1729
1734
  }
1730
- const RepresentationType = 'RecommendedPlanTemplatesRepresentation';
1731
- function normalize(input, existing, path, luvio, store, timestamp) {
1735
+ const RepresentationType$2 = 'RecommendedPlanTemplatesRepresentation';
1736
+ function normalize$2(input, existing, path, luvio, store, timestamp) {
1732
1737
  return input;
1733
1738
  }
1734
- const select$1 = function RecommendedPlanTemplatesRepresentationSelect() {
1735
- const { selections: PlanTemplateRepresentation__selections, opaque: PlanTemplateRepresentation__opaque, } = select$2();
1739
+ const select$6 = function RecommendedPlanTemplatesRepresentationSelect() {
1740
+ const { selections: PlanTemplateRepresentation__selections, opaque: PlanTemplateRepresentation__opaque, } = select$7();
1736
1741
  return {
1737
1742
  kind: 'Fragment',
1738
- version: VERSION,
1743
+ version: VERSION$3,
1739
1744
  private: [],
1740
1745
  selections: [
1741
1746
  {
@@ -1756,7 +1761,7 @@ const select$1 = function RecommendedPlanTemplatesRepresentationSelect() {
1756
1761
  ]
1757
1762
  };
1758
1763
  };
1759
- function equals(existing, incoming) {
1764
+ function equals$3(existing, incoming) {
1760
1765
  const existing_isSuccess = existing.isSuccess;
1761
1766
  const incoming_isSuccess = incoming.isSuccess;
1762
1767
  if (!(existing_isSuccess === incoming_isSuccess)) {
@@ -1778,7 +1783,7 @@ function equals(existing, incoming) {
1778
1783
  const existing_planTemplates = existing.planTemplates;
1779
1784
  const incoming_planTemplates = incoming.planTemplates;
1780
1785
  const equals_planTemplates_items = equalsArray(existing_planTemplates, incoming_planTemplates, (existing_planTemplates_item, incoming_planTemplates_item) => {
1781
- if (!(equals$1(existing_planTemplates_item, incoming_planTemplates_item))) {
1786
+ if (!(equals$4(existing_planTemplates_item, incoming_planTemplates_item))) {
1782
1787
  return false;
1783
1788
  }
1784
1789
  });
@@ -1787,44 +1792,44 @@ function equals(existing, incoming) {
1787
1792
  }
1788
1793
  return true;
1789
1794
  }
1790
- const ingest = function RecommendedPlanTemplatesRepresentationIngest(input, path, luvio, store, timestamp) {
1795
+ const ingest$2 = function RecommendedPlanTemplatesRepresentationIngest(input, path, luvio, store, timestamp) {
1791
1796
  if (process.env.NODE_ENV !== 'production') {
1792
- const validateError = validate(input);
1797
+ const validateError = validate$3(input);
1793
1798
  if (validateError !== null) {
1794
1799
  throw validateError;
1795
1800
  }
1796
1801
  }
1797
1802
  const key = path.fullPath;
1798
- const ttlToUse = TTL;
1799
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "einstein-copilot-bot", VERSION, RepresentationType, equals);
1803
+ const ttlToUse = TTL$2;
1804
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "einstein-copilot-bot", VERSION$3, RepresentationType$2, equals$3);
1800
1805
  return createLink(key);
1801
1806
  };
1802
- function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
1807
+ function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
1803
1808
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1804
1809
  const rootKey = fullPathFactory();
1805
1810
  rootKeySet.set(rootKey, {
1806
1811
  namespace: keyPrefix,
1807
- representationName: RepresentationType,
1812
+ representationName: RepresentationType$2,
1808
1813
  mergeable: false
1809
1814
  });
1810
1815
  }
1811
1816
 
1812
- function select(luvio, params) {
1813
- return select$1();
1817
+ function select$5(luvio, params) {
1818
+ return select$6();
1814
1819
  }
1815
- function keyBuilder$1(luvio, params) {
1820
+ function keyBuilder$4(luvio, params) {
1816
1821
  return keyPrefix + '::RecommendedPlanTemplatesRepresentation:(' + 'pageType:' + params.urlParams.pageType + ',' + 'objectType:' + params.urlParams.objectType + ')';
1817
1822
  }
1818
- function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
1819
- getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
1823
+ function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
1824
+ getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$4(luvio, resourceParams));
1820
1825
  }
1821
- function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
1826
+ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
1822
1827
  const { body } = response;
1823
- const key = keyBuilder$1(luvio, resourceParams);
1824
- luvio.storeIngest(key, ingest, body);
1828
+ const key = keyBuilder$4(luvio, resourceParams);
1829
+ luvio.storeIngest(key, ingest$2, body);
1825
1830
  const snapshot = luvio.storeLookup({
1826
1831
  recordId: key,
1827
- node: select(),
1832
+ node: select$5(),
1828
1833
  variables: {},
1829
1834
  }, snapshotRefresh);
1830
1835
  if (process.env.NODE_ENV !== 'production') {
@@ -1835,19 +1840,19 @@ function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
1835
1840
  deepFreeze(snapshot.data);
1836
1841
  return snapshot;
1837
1842
  }
1838
- function ingestError(luvio, params, error, snapshotRefresh) {
1839
- const key = keyBuilder$1(luvio, params);
1843
+ function ingestError$1(luvio, params, error, snapshotRefresh) {
1844
+ const key = keyBuilder$4(luvio, params);
1840
1845
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1841
1846
  const storeMetadataParams = {
1842
- ttl: TTL,
1847
+ ttl: TTL$2,
1843
1848
  namespace: keyPrefix,
1844
- version: VERSION,
1845
- representationName: RepresentationType
1849
+ version: VERSION$3,
1850
+ representationName: RepresentationType$2
1846
1851
  };
1847
1852
  luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
1848
1853
  return errorSnapshot;
1849
1854
  }
1850
- function createResourceRequest(config) {
1855
+ function createResourceRequest$2(config) {
1851
1856
  const headers = {};
1852
1857
  return {
1853
1858
  baseUri: '/services/data/v61.0',
@@ -1861,85 +1866,940 @@ function createResourceRequest(config) {
1861
1866
  };
1862
1867
  }
1863
1868
 
1864
- const adapterName = 'getRecommendedPlanTemplates';
1869
+ const adapterName$2 = 'getRecommendedPlanTemplates';
1865
1870
  const getRecommendedPlanTemplates_ConfigPropertyMetadata = [
1866
1871
  generateParamConfigMetadata('pageType', true, 0 /* UrlParameter */, 0 /* String */),
1867
1872
  generateParamConfigMetadata('objectType', true, 0 /* UrlParameter */, 0 /* String */),
1868
1873
  ];
1869
- const getRecommendedPlanTemplates_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getRecommendedPlanTemplates_ConfigPropertyMetadata);
1870
- const createResourceParams = /*#__PURE__*/ createResourceParams$3(getRecommendedPlanTemplates_ConfigPropertyMetadata);
1871
- function keyBuilder(luvio, config) {
1872
- const resourceParams = createResourceParams(config);
1873
- return keyBuilder$1(luvio, resourceParams);
1874
+ const getRecommendedPlanTemplates_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getRecommendedPlanTemplates_ConfigPropertyMetadata);
1875
+ const createResourceParams$2 = /*#__PURE__*/ createResourceParams$5(getRecommendedPlanTemplates_ConfigPropertyMetadata);
1876
+ function keyBuilder$3(luvio, config) {
1877
+ const resourceParams = createResourceParams$2(config);
1878
+ return keyBuilder$4(luvio, resourceParams);
1874
1879
  }
1875
- function typeCheckConfig(untrustedConfig) {
1880
+ function typeCheckConfig$2(untrustedConfig) {
1876
1881
  const config = {};
1877
- typeCheckConfig$3(untrustedConfig, config, getRecommendedPlanTemplates_ConfigPropertyMetadata);
1882
+ typeCheckConfig$5(untrustedConfig, config, getRecommendedPlanTemplates_ConfigPropertyMetadata);
1878
1883
  return config;
1879
1884
  }
1880
- function validateAdapterConfig(untrustedConfig, configPropertyNames) {
1885
+ function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
1881
1886
  if (!untrustedIsObject(untrustedConfig)) {
1882
1887
  return null;
1883
1888
  }
1884
1889
  if (process.env.NODE_ENV !== 'production') {
1885
1890
  validateConfig(untrustedConfig, configPropertyNames);
1886
1891
  }
1887
- const config = typeCheckConfig(untrustedConfig);
1892
+ const config = typeCheckConfig$2(untrustedConfig);
1888
1893
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
1889
1894
  return null;
1890
1895
  }
1891
1896
  return config;
1892
1897
  }
1893
- function adapterFragment(luvio, config) {
1894
- createResourceParams(config);
1895
- return select();
1898
+ function adapterFragment$1(luvio, config) {
1899
+ createResourceParams$2(config);
1900
+ return select$5();
1896
1901
  }
1897
- function onFetchResponseSuccess(luvio, config, resourceParams, response) {
1898
- const snapshot = ingestSuccess(luvio, resourceParams, response, {
1902
+ function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
1903
+ const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
1899
1904
  config,
1900
- resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
1905
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
1901
1906
  });
1902
1907
  return luvio.storeBroadcast().then(() => snapshot);
1903
1908
  }
1904
- function onFetchResponseError(luvio, config, resourceParams, response) {
1905
- const snapshot = ingestError(luvio, resourceParams, response, {
1909
+ function onFetchResponseError$1(luvio, config, resourceParams, response) {
1910
+ const snapshot = ingestError$1(luvio, resourceParams, response, {
1906
1911
  config,
1907
- resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
1912
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
1908
1913
  });
1909
1914
  return luvio.storeBroadcast().then(() => snapshot);
1910
1915
  }
1911
- function buildNetworkSnapshot(luvio, config, options) {
1912
- const resourceParams = createResourceParams(config);
1913
- const request = createResourceRequest(resourceParams);
1916
+ function buildNetworkSnapshot$2(luvio, config, options) {
1917
+ const resourceParams = createResourceParams$2(config);
1918
+ const request = createResourceRequest$2(resourceParams);
1914
1919
  return luvio.dispatchResourceRequest(request, options)
1915
1920
  .then((response) => {
1916
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
1921
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
1917
1922
  const cache = new StoreKeyMap();
1918
- getResponseCacheKeys(cache, luvio, resourceParams, response.body);
1923
+ getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
1919
1924
  return cache;
1920
1925
  });
1921
1926
  }, (response) => {
1922
- return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
1927
+ return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
1923
1928
  });
1924
1929
  }
1925
- function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
1926
- return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
1930
+ function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
1931
+ return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
1927
1932
  }
1928
- function buildCachedSnapshotCachePolicy(context, storeLookup) {
1933
+ function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
1929
1934
  const { luvio, config } = context;
1930
1935
  const selector = {
1931
- recordId: keyBuilder(luvio, config),
1932
- node: adapterFragment(luvio, config),
1936
+ recordId: keyBuilder$3(luvio, config),
1937
+ node: adapterFragment$1(luvio, config),
1933
1938
  variables: {},
1934
1939
  };
1935
1940
  const cacheSnapshot = storeLookup(selector, {
1936
1941
  config,
1937
- resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
1942
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
1938
1943
  });
1939
1944
  return cacheSnapshot;
1940
1945
  }
1941
1946
  const getRecommendedPlanTemplatesAdapterFactory = (luvio) => function einsteinCopilotBot__getRecommendedPlanTemplates(untrustedConfig, requestContext) {
1942
- const config = validateAdapterConfig(untrustedConfig, getRecommendedPlanTemplates_ConfigPropertyNames);
1947
+ const config = validateAdapterConfig$2(untrustedConfig, getRecommendedPlanTemplates_ConfigPropertyNames);
1948
+ // Invalid or incomplete config
1949
+ if (config === null) {
1950
+ return null;
1951
+ }
1952
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
1953
+ buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
1954
+ };
1955
+
1956
+ const TTL$1 = 100;
1957
+ const VERSION$2 = "7454bdd46af1622eb677a9bb9eac3a8b";
1958
+ function validate$2(obj, path = 'CopilotLLMFeedbackOutputRepresentation') {
1959
+ const v_error = (() => {
1960
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1961
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1962
+ }
1963
+ const obj_submitFeedbackStatus = obj.submitFeedbackStatus;
1964
+ const path_submitFeedbackStatus = path + '.submitFeedbackStatus';
1965
+ if (typeof obj_submitFeedbackStatus !== 'string') {
1966
+ return new TypeError('Expected "string" but received "' + typeof obj_submitFeedbackStatus + '" (at "' + path_submitFeedbackStatus + '")');
1967
+ }
1968
+ })();
1969
+ return v_error === undefined ? null : v_error;
1970
+ }
1971
+ const RepresentationType$1 = 'CopilotLLMFeedbackOutputRepresentation';
1972
+ function keyBuilder$2(luvio, config) {
1973
+ return keyPrefix + '::' + RepresentationType$1 + ':' + config.id;
1974
+ }
1975
+ function keyBuilderFromType(luvio, object) {
1976
+ const keyParams = {
1977
+ id: object.submitFeedbackStatus
1978
+ };
1979
+ return keyBuilder$2(luvio, keyParams);
1980
+ }
1981
+ function normalize$1(input, existing, path, luvio, store, timestamp) {
1982
+ return input;
1983
+ }
1984
+ const select$4 = function CopilotLLMFeedbackOutputRepresentationSelect() {
1985
+ return {
1986
+ kind: 'Fragment',
1987
+ version: VERSION$2,
1988
+ private: [],
1989
+ selections: [
1990
+ {
1991
+ name: 'submitFeedbackStatus',
1992
+ kind: 'Scalar'
1993
+ }
1994
+ ]
1995
+ };
1996
+ };
1997
+ function equals$2(existing, incoming) {
1998
+ const existing_submitFeedbackStatus = existing.submitFeedbackStatus;
1999
+ const incoming_submitFeedbackStatus = incoming.submitFeedbackStatus;
2000
+ if (!(existing_submitFeedbackStatus === incoming_submitFeedbackStatus)) {
2001
+ return false;
2002
+ }
2003
+ return true;
2004
+ }
2005
+ const ingest$1 = function CopilotLLMFeedbackOutputRepresentationIngest(input, path, luvio, store, timestamp) {
2006
+ if (process.env.NODE_ENV !== 'production') {
2007
+ const validateError = validate$2(input);
2008
+ if (validateError !== null) {
2009
+ throw validateError;
2010
+ }
2011
+ }
2012
+ const key = keyBuilderFromType(luvio, input);
2013
+ const ttlToUse = TTL$1;
2014
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "einstein-copilot-bot", VERSION$2, RepresentationType$1, equals$2);
2015
+ return createLink(key);
2016
+ };
2017
+ function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
2018
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
2019
+ const rootKey = keyBuilderFromType(luvio, input);
2020
+ rootKeySet.set(rootKey, {
2021
+ namespace: keyPrefix,
2022
+ representationName: RepresentationType$1,
2023
+ mergeable: false
2024
+ });
2025
+ }
2026
+
2027
+ function select$3(luvio, params) {
2028
+ return select$4();
2029
+ }
2030
+ function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
2031
+ getTypeCacheKeys$1(storeKeyMap, luvio, response);
2032
+ }
2033
+ function ingestSuccess$1(luvio, resourceParams, response) {
2034
+ const { body } = response;
2035
+ const key = keyBuilderFromType(luvio, body);
2036
+ luvio.storeIngest(key, ingest$1, body);
2037
+ const snapshot = luvio.storeLookup({
2038
+ recordId: key,
2039
+ node: select$3(),
2040
+ variables: {},
2041
+ });
2042
+ if (process.env.NODE_ENV !== 'production') {
2043
+ if (snapshot.state !== 'Fulfilled') {
2044
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
2045
+ }
2046
+ }
2047
+ deepFreeze(snapshot.data);
2048
+ return snapshot;
2049
+ }
2050
+ function createResourceRequest$1(config) {
2051
+ const headers = {};
2052
+ return {
2053
+ baseUri: '/services/data/v61.0',
2054
+ basePath: '/connect/copilot/feedback',
2055
+ method: 'post',
2056
+ body: config.body,
2057
+ urlParams: {},
2058
+ queryParams: {},
2059
+ headers,
2060
+ priority: 'normal',
2061
+ };
2062
+ }
2063
+
2064
+ const adapterName$1 = 'submitFeedback';
2065
+ const submitFeedback_ConfigPropertyMetadata = [
2066
+ generateParamConfigMetadata('details', true, 2 /* Body */, 4 /* Unsupported */),
2067
+ generateParamConfigMetadata('feedback', true, 2 /* Body */, 0 /* String */),
2068
+ generateParamConfigMetadata('feedbackId', true, 2 /* Body */, 0 /* String */),
2069
+ generateParamConfigMetadata('sessionId', true, 2 /* Body */, 0 /* String */),
2070
+ generateParamConfigMetadata('text', true, 2 /* Body */, 0 /* String */),
2071
+ ];
2072
+ const submitFeedback_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, submitFeedback_ConfigPropertyMetadata);
2073
+ const createResourceParams$1 = /*#__PURE__*/ createResourceParams$5(submitFeedback_ConfigPropertyMetadata);
2074
+ function typeCheckConfig$1(untrustedConfig) {
2075
+ const config = {};
2076
+ typeCheckConfig$5(untrustedConfig, config, submitFeedback_ConfigPropertyMetadata);
2077
+ const untrustedConfig_details = untrustedConfig.details;
2078
+ if (untrustedIsObject(untrustedConfig_details)) {
2079
+ const untrustedConfig_details_object = {};
2080
+ const untrustedConfig_details_keys = Object.keys(untrustedConfig_details);
2081
+ for (let i = 0, arrayLength = untrustedConfig_details_keys.length; i < arrayLength; i++) {
2082
+ const key = untrustedConfig_details_keys[i];
2083
+ const untrustedConfig_details_prop = untrustedConfig_details[key];
2084
+ if (untrustedConfig_details_object !== undefined) {
2085
+ untrustedConfig_details_object[key] = untrustedConfig_details_prop;
2086
+ }
2087
+ }
2088
+ if (untrustedConfig_details_object !== undefined && Object.keys(untrustedConfig_details_object).length >= 0) {
2089
+ config.details = untrustedConfig_details_object;
2090
+ }
2091
+ }
2092
+ return config;
2093
+ }
2094
+ function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
2095
+ if (!untrustedIsObject(untrustedConfig)) {
2096
+ return null;
2097
+ }
2098
+ if (process.env.NODE_ENV !== 'production') {
2099
+ validateConfig(untrustedConfig, configPropertyNames);
2100
+ }
2101
+ const config = typeCheckConfig$1(untrustedConfig);
2102
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
2103
+ return null;
2104
+ }
2105
+ return config;
2106
+ }
2107
+ function buildNetworkSnapshot$1(luvio, config, options) {
2108
+ const resourceParams = createResourceParams$1(config);
2109
+ const request = createResourceRequest$1(resourceParams);
2110
+ return luvio.dispatchResourceRequest(request, options)
2111
+ .then((response) => {
2112
+ return luvio.handleSuccessResponse(() => {
2113
+ const snapshot = ingestSuccess$1(luvio, resourceParams, response);
2114
+ return luvio.storeBroadcast().then(() => snapshot);
2115
+ }, () => {
2116
+ const cache = new StoreKeyMap();
2117
+ getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
2118
+ return cache;
2119
+ });
2120
+ }, (response) => {
2121
+ deepFreeze(response);
2122
+ throw response;
2123
+ });
2124
+ }
2125
+ const submitFeedbackAdapterFactory = (luvio) => {
2126
+ return function submitFeedback(untrustedConfig) {
2127
+ const config = validateAdapterConfig$1(untrustedConfig, submitFeedback_ConfigPropertyNames);
2128
+ // Invalid or incomplete config
2129
+ if (config === null) {
2130
+ throw new Error('Invalid config for "submitFeedback"');
2131
+ }
2132
+ return buildNetworkSnapshot$1(luvio, config);
2133
+ };
2134
+ };
2135
+
2136
+ const VERSION$1 = "3d8b52828ddd11f23f898b0bba8db802";
2137
+ function validate$1(obj, path = 'CopilotQuickActionRepresentation') {
2138
+ const v_error = (() => {
2139
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
2140
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
2141
+ }
2142
+ if (obj.actionApiName !== undefined) {
2143
+ const obj_actionApiName = obj.actionApiName;
2144
+ const path_actionApiName = path + '.actionApiName';
2145
+ if (typeof obj_actionApiName !== 'string') {
2146
+ return new TypeError('Expected "string" but received "' + typeof obj_actionApiName + '" (at "' + path_actionApiName + '")');
2147
+ }
2148
+ }
2149
+ if (obj.createdDate !== undefined) {
2150
+ const obj_createdDate = obj.createdDate;
2151
+ const path_createdDate = path + '.createdDate';
2152
+ if (typeof obj_createdDate !== 'string') {
2153
+ return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
2154
+ }
2155
+ }
2156
+ if (obj.description !== undefined) {
2157
+ const obj_description = obj.description;
2158
+ const path_description = path + '.description';
2159
+ if (typeof obj_description !== 'string') {
2160
+ return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
2161
+ }
2162
+ }
2163
+ if (obj.icon !== undefined) {
2164
+ const obj_icon = obj.icon;
2165
+ const path_icon = path + '.icon';
2166
+ if (typeof obj_icon !== 'string') {
2167
+ return new TypeError('Expected "string" but received "' + typeof obj_icon + '" (at "' + path_icon + '")');
2168
+ }
2169
+ }
2170
+ if (obj.intent !== undefined) {
2171
+ const obj_intent = obj.intent;
2172
+ const path_intent = path + '.intent';
2173
+ if (typeof obj_intent !== 'string') {
2174
+ return new TypeError('Expected "string" but received "' + typeof obj_intent + '" (at "' + path_intent + '")');
2175
+ }
2176
+ }
2177
+ if (obj.isGlobal !== undefined) {
2178
+ const obj_isGlobal = obj.isGlobal;
2179
+ const path_isGlobal = path + '.isGlobal';
2180
+ if (typeof obj_isGlobal !== 'boolean') {
2181
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isGlobal + '" (at "' + path_isGlobal + '")');
2182
+ }
2183
+ }
2184
+ if (obj.isStandard !== undefined) {
2185
+ const obj_isStandard = obj.isStandard;
2186
+ const path_isStandard = path + '.isStandard';
2187
+ if (typeof obj_isStandard !== 'boolean') {
2188
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isStandard + '" (at "' + path_isStandard + '")');
2189
+ }
2190
+ }
2191
+ if (obj.label !== undefined) {
2192
+ const obj_label = obj.label;
2193
+ const path_label = path + '.label';
2194
+ if (typeof obj_label !== 'string') {
2195
+ return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
2196
+ }
2197
+ }
2198
+ if (obj.lastModifiedDate !== undefined) {
2199
+ const obj_lastModifiedDate = obj.lastModifiedDate;
2200
+ const path_lastModifiedDate = path + '.lastModifiedDate';
2201
+ if (typeof obj_lastModifiedDate !== 'string') {
2202
+ return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
2203
+ }
2204
+ }
2205
+ if (obj.namespace !== undefined) {
2206
+ const obj_namespace = obj.namespace;
2207
+ const path_namespace = path + '.namespace';
2208
+ if (typeof obj_namespace !== 'string') {
2209
+ return new TypeError('Expected "string" but received "' + typeof obj_namespace + '" (at "' + path_namespace + '")');
2210
+ }
2211
+ }
2212
+ if (obj.orgAccess !== undefined) {
2213
+ const obj_orgAccess = obj.orgAccess;
2214
+ const path_orgAccess = path + '.orgAccess';
2215
+ if (typeof obj_orgAccess !== 'string') {
2216
+ return new TypeError('Expected "string" but received "' + typeof obj_orgAccess + '" (at "' + path_orgAccess + '")');
2217
+ }
2218
+ }
2219
+ if (obj.planTemplateId !== undefined) {
2220
+ const obj_planTemplateId = obj.planTemplateId;
2221
+ const path_planTemplateId = path + '.planTemplateId';
2222
+ if (typeof obj_planTemplateId !== 'string') {
2223
+ return new TypeError('Expected "string" but received "' + typeof obj_planTemplateId + '" (at "' + path_planTemplateId + '")');
2224
+ }
2225
+ }
2226
+ if (obj.planTemplateInput !== undefined) {
2227
+ const obj_planTemplateInput = obj.planTemplateInput;
2228
+ const path_planTemplateInput = path + '.planTemplateInput';
2229
+ if (typeof obj_planTemplateInput !== 'object' || ArrayIsArray(obj_planTemplateInput) || obj_planTemplateInput === null) {
2230
+ return new TypeError('Expected "object" but received "' + typeof obj_planTemplateInput + '" (at "' + path_planTemplateInput + '")');
2231
+ }
2232
+ const obj_planTemplateInput_keys = ObjectKeys(obj_planTemplateInput);
2233
+ for (let i = 0; i < obj_planTemplateInput_keys.length; i++) {
2234
+ const key = obj_planTemplateInput_keys[i];
2235
+ const obj_planTemplateInput_prop = obj_planTemplateInput[key];
2236
+ const path_planTemplateInput_prop = path_planTemplateInput + '["' + key + '"]';
2237
+ if (typeof obj_planTemplateInput_prop !== 'string') {
2238
+ return new TypeError('Expected "string" but received "' + typeof obj_planTemplateInput_prop + '" (at "' + path_planTemplateInput_prop + '")');
2239
+ }
2240
+ }
2241
+ }
2242
+ if (obj.type !== undefined) {
2243
+ const obj_type = obj.type;
2244
+ const path_type = path + '.type';
2245
+ if (typeof obj_type !== 'string') {
2246
+ return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
2247
+ }
2248
+ }
2249
+ if (obj.userUtterance !== undefined) {
2250
+ const obj_userUtterance = obj.userUtterance;
2251
+ const path_userUtterance = path + '.userUtterance';
2252
+ if (typeof obj_userUtterance !== 'string') {
2253
+ return new TypeError('Expected "string" but received "' + typeof obj_userUtterance + '" (at "' + path_userUtterance + '")');
2254
+ }
2255
+ }
2256
+ })();
2257
+ return v_error === undefined ? null : v_error;
2258
+ }
2259
+ const select$2 = function CopilotQuickActionRepresentationSelect() {
2260
+ return {
2261
+ kind: 'Fragment',
2262
+ version: VERSION$1,
2263
+ private: [],
2264
+ selections: [
2265
+ {
2266
+ name: 'actionApiName',
2267
+ kind: 'Scalar',
2268
+ required: false
2269
+ },
2270
+ {
2271
+ name: 'createdDate',
2272
+ kind: 'Scalar',
2273
+ required: false
2274
+ },
2275
+ {
2276
+ name: 'description',
2277
+ kind: 'Scalar',
2278
+ required: false
2279
+ },
2280
+ {
2281
+ name: 'icon',
2282
+ kind: 'Scalar',
2283
+ required: false
2284
+ },
2285
+ {
2286
+ name: 'intent',
2287
+ kind: 'Scalar',
2288
+ required: false
2289
+ },
2290
+ {
2291
+ name: 'isGlobal',
2292
+ kind: 'Scalar',
2293
+ required: false
2294
+ },
2295
+ {
2296
+ name: 'isStandard',
2297
+ kind: 'Scalar',
2298
+ required: false
2299
+ },
2300
+ {
2301
+ name: 'label',
2302
+ kind: 'Scalar',
2303
+ required: false
2304
+ },
2305
+ {
2306
+ name: 'lastModifiedDate',
2307
+ kind: 'Scalar',
2308
+ required: false
2309
+ },
2310
+ {
2311
+ name: 'namespace',
2312
+ kind: 'Scalar',
2313
+ required: false
2314
+ },
2315
+ {
2316
+ name: 'orgAccess',
2317
+ kind: 'Scalar',
2318
+ required: false
2319
+ },
2320
+ {
2321
+ name: 'planTemplateId',
2322
+ kind: 'Scalar',
2323
+ required: false
2324
+ },
2325
+ {
2326
+ name: 'planTemplateInput',
2327
+ kind: 'Scalar',
2328
+ map: true,
2329
+ required: false
2330
+ },
2331
+ {
2332
+ name: 'type',
2333
+ kind: 'Scalar',
2334
+ required: false
2335
+ },
2336
+ {
2337
+ name: 'userUtterance',
2338
+ kind: 'Scalar',
2339
+ required: false
2340
+ }
2341
+ ]
2342
+ };
2343
+ };
2344
+ function equals$1(existing, incoming) {
2345
+ const existing_isGlobal = existing.isGlobal;
2346
+ const incoming_isGlobal = incoming.isGlobal;
2347
+ // if at least one of these optionals is defined
2348
+ if (existing_isGlobal !== undefined || incoming_isGlobal !== undefined) {
2349
+ // if one of these is not defined we know the other is defined and therefore
2350
+ // not equal
2351
+ if (existing_isGlobal === undefined || incoming_isGlobal === undefined) {
2352
+ return false;
2353
+ }
2354
+ if (!(existing_isGlobal === incoming_isGlobal)) {
2355
+ return false;
2356
+ }
2357
+ }
2358
+ const existing_isStandard = existing.isStandard;
2359
+ const incoming_isStandard = incoming.isStandard;
2360
+ // if at least one of these optionals is defined
2361
+ if (existing_isStandard !== undefined || incoming_isStandard !== undefined) {
2362
+ // if one of these is not defined we know the other is defined and therefore
2363
+ // not equal
2364
+ if (existing_isStandard === undefined || incoming_isStandard === undefined) {
2365
+ return false;
2366
+ }
2367
+ if (!(existing_isStandard === incoming_isStandard)) {
2368
+ return false;
2369
+ }
2370
+ }
2371
+ const existing_actionApiName = existing.actionApiName;
2372
+ const incoming_actionApiName = incoming.actionApiName;
2373
+ // if at least one of these optionals is defined
2374
+ if (existing_actionApiName !== undefined || incoming_actionApiName !== undefined) {
2375
+ // if one of these is not defined we know the other is defined and therefore
2376
+ // not equal
2377
+ if (existing_actionApiName === undefined || incoming_actionApiName === undefined) {
2378
+ return false;
2379
+ }
2380
+ if (!(existing_actionApiName === incoming_actionApiName)) {
2381
+ return false;
2382
+ }
2383
+ }
2384
+ const existing_createdDate = existing.createdDate;
2385
+ const incoming_createdDate = incoming.createdDate;
2386
+ // if at least one of these optionals is defined
2387
+ if (existing_createdDate !== undefined || incoming_createdDate !== undefined) {
2388
+ // if one of these is not defined we know the other is defined and therefore
2389
+ // not equal
2390
+ if (existing_createdDate === undefined || incoming_createdDate === undefined) {
2391
+ return false;
2392
+ }
2393
+ if (!(existing_createdDate === incoming_createdDate)) {
2394
+ return false;
2395
+ }
2396
+ }
2397
+ const existing_description = existing.description;
2398
+ const incoming_description = incoming.description;
2399
+ // if at least one of these optionals is defined
2400
+ if (existing_description !== undefined || incoming_description !== undefined) {
2401
+ // if one of these is not defined we know the other is defined and therefore
2402
+ // not equal
2403
+ if (existing_description === undefined || incoming_description === undefined) {
2404
+ return false;
2405
+ }
2406
+ if (!(existing_description === incoming_description)) {
2407
+ return false;
2408
+ }
2409
+ }
2410
+ const existing_icon = existing.icon;
2411
+ const incoming_icon = incoming.icon;
2412
+ // if at least one of these optionals is defined
2413
+ if (existing_icon !== undefined || incoming_icon !== undefined) {
2414
+ // if one of these is not defined we know the other is defined and therefore
2415
+ // not equal
2416
+ if (existing_icon === undefined || incoming_icon === undefined) {
2417
+ return false;
2418
+ }
2419
+ if (!(existing_icon === incoming_icon)) {
2420
+ return false;
2421
+ }
2422
+ }
2423
+ const existing_intent = existing.intent;
2424
+ const incoming_intent = incoming.intent;
2425
+ // if at least one of these optionals is defined
2426
+ if (existing_intent !== undefined || incoming_intent !== undefined) {
2427
+ // if one of these is not defined we know the other is defined and therefore
2428
+ // not equal
2429
+ if (existing_intent === undefined || incoming_intent === undefined) {
2430
+ return false;
2431
+ }
2432
+ if (!(existing_intent === incoming_intent)) {
2433
+ return false;
2434
+ }
2435
+ }
2436
+ const existing_label = existing.label;
2437
+ const incoming_label = incoming.label;
2438
+ // if at least one of these optionals is defined
2439
+ if (existing_label !== undefined || incoming_label !== undefined) {
2440
+ // if one of these is not defined we know the other is defined and therefore
2441
+ // not equal
2442
+ if (existing_label === undefined || incoming_label === undefined) {
2443
+ return false;
2444
+ }
2445
+ if (!(existing_label === incoming_label)) {
2446
+ return false;
2447
+ }
2448
+ }
2449
+ const existing_lastModifiedDate = existing.lastModifiedDate;
2450
+ const incoming_lastModifiedDate = incoming.lastModifiedDate;
2451
+ // if at least one of these optionals is defined
2452
+ if (existing_lastModifiedDate !== undefined || incoming_lastModifiedDate !== undefined) {
2453
+ // if one of these is not defined we know the other is defined and therefore
2454
+ // not equal
2455
+ if (existing_lastModifiedDate === undefined || incoming_lastModifiedDate === undefined) {
2456
+ return false;
2457
+ }
2458
+ if (!(existing_lastModifiedDate === incoming_lastModifiedDate)) {
2459
+ return false;
2460
+ }
2461
+ }
2462
+ const existing_namespace = existing.namespace;
2463
+ const incoming_namespace = incoming.namespace;
2464
+ // if at least one of these optionals is defined
2465
+ if (existing_namespace !== undefined || incoming_namespace !== undefined) {
2466
+ // if one of these is not defined we know the other is defined and therefore
2467
+ // not equal
2468
+ if (existing_namespace === undefined || incoming_namespace === undefined) {
2469
+ return false;
2470
+ }
2471
+ if (!(existing_namespace === incoming_namespace)) {
2472
+ return false;
2473
+ }
2474
+ }
2475
+ const existing_orgAccess = existing.orgAccess;
2476
+ const incoming_orgAccess = incoming.orgAccess;
2477
+ // if at least one of these optionals is defined
2478
+ if (existing_orgAccess !== undefined || incoming_orgAccess !== undefined) {
2479
+ // if one of these is not defined we know the other is defined and therefore
2480
+ // not equal
2481
+ if (existing_orgAccess === undefined || incoming_orgAccess === undefined) {
2482
+ return false;
2483
+ }
2484
+ if (!(existing_orgAccess === incoming_orgAccess)) {
2485
+ return false;
2486
+ }
2487
+ }
2488
+ const existing_planTemplateId = existing.planTemplateId;
2489
+ const incoming_planTemplateId = incoming.planTemplateId;
2490
+ // if at least one of these optionals is defined
2491
+ if (existing_planTemplateId !== undefined || incoming_planTemplateId !== undefined) {
2492
+ // if one of these is not defined we know the other is defined and therefore
2493
+ // not equal
2494
+ if (existing_planTemplateId === undefined || incoming_planTemplateId === undefined) {
2495
+ return false;
2496
+ }
2497
+ if (!(existing_planTemplateId === incoming_planTemplateId)) {
2498
+ return false;
2499
+ }
2500
+ }
2501
+ const existing_type = existing.type;
2502
+ const incoming_type = incoming.type;
2503
+ // if at least one of these optionals is defined
2504
+ if (existing_type !== undefined || incoming_type !== undefined) {
2505
+ // if one of these is not defined we know the other is defined and therefore
2506
+ // not equal
2507
+ if (existing_type === undefined || incoming_type === undefined) {
2508
+ return false;
2509
+ }
2510
+ if (!(existing_type === incoming_type)) {
2511
+ return false;
2512
+ }
2513
+ }
2514
+ const existing_userUtterance = existing.userUtterance;
2515
+ const incoming_userUtterance = incoming.userUtterance;
2516
+ // if at least one of these optionals is defined
2517
+ if (existing_userUtterance !== undefined || incoming_userUtterance !== undefined) {
2518
+ // if one of these is not defined we know the other is defined and therefore
2519
+ // not equal
2520
+ if (existing_userUtterance === undefined || incoming_userUtterance === undefined) {
2521
+ return false;
2522
+ }
2523
+ if (!(existing_userUtterance === incoming_userUtterance)) {
2524
+ return false;
2525
+ }
2526
+ }
2527
+ const existing_planTemplateInput = existing.planTemplateInput;
2528
+ const incoming_planTemplateInput = incoming.planTemplateInput;
2529
+ // if at least one of these optionals is defined
2530
+ if (existing_planTemplateInput !== undefined || incoming_planTemplateInput !== undefined) {
2531
+ // if one of these is not defined we know the other is defined and therefore
2532
+ // not equal
2533
+ if (existing_planTemplateInput === undefined || incoming_planTemplateInput === undefined) {
2534
+ return false;
2535
+ }
2536
+ const equals_planTemplateInput_props = equalsObject(existing_planTemplateInput, incoming_planTemplateInput, (existing_planTemplateInput_prop, incoming_planTemplateInput_prop) => {
2537
+ if (!(existing_planTemplateInput_prop === incoming_planTemplateInput_prop)) {
2538
+ return false;
2539
+ }
2540
+ });
2541
+ if (equals_planTemplateInput_props === false) {
2542
+ return false;
2543
+ }
2544
+ }
2545
+ return true;
2546
+ }
2547
+
2548
+ const TTL = 900000;
2549
+ const VERSION = "122e61b0db6dc38d244a87570efc5522";
2550
+ function validate(obj, path = 'RecommendedActionsRepresentation') {
2551
+ const v_error = (() => {
2552
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
2553
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
2554
+ }
2555
+ const obj_copilotQuickActions = obj.copilotQuickActions;
2556
+ const path_copilotQuickActions = path + '.copilotQuickActions';
2557
+ if (!ArrayIsArray(obj_copilotQuickActions)) {
2558
+ return new TypeError('Expected "array" but received "' + typeof obj_copilotQuickActions + '" (at "' + path_copilotQuickActions + '")');
2559
+ }
2560
+ for (let i = 0; i < obj_copilotQuickActions.length; i++) {
2561
+ const obj_copilotQuickActions_item = obj_copilotQuickActions[i];
2562
+ const path_copilotQuickActions_item = path_copilotQuickActions + '[' + i + ']';
2563
+ const referencepath_copilotQuickActions_itemValidationError = validate$1(obj_copilotQuickActions_item, path_copilotQuickActions_item);
2564
+ if (referencepath_copilotQuickActions_itemValidationError !== null) {
2565
+ let message = 'Object doesn\'t match CopilotQuickActionRepresentation (at "' + path_copilotQuickActions_item + '")\n';
2566
+ message += referencepath_copilotQuickActions_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
2567
+ return new TypeError(message);
2568
+ }
2569
+ }
2570
+ if (obj.errorMessage !== undefined) {
2571
+ const obj_errorMessage = obj.errorMessage;
2572
+ const path_errorMessage = path + '.errorMessage';
2573
+ if (typeof obj_errorMessage !== 'string') {
2574
+ return new TypeError('Expected "string" but received "' + typeof obj_errorMessage + '" (at "' + path_errorMessage + '")');
2575
+ }
2576
+ }
2577
+ const obj_isSuccess = obj.isSuccess;
2578
+ const path_isSuccess = path + '.isSuccess';
2579
+ if (typeof obj_isSuccess !== 'boolean') {
2580
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isSuccess + '" (at "' + path_isSuccess + '")');
2581
+ }
2582
+ })();
2583
+ return v_error === undefined ? null : v_error;
2584
+ }
2585
+ const RepresentationType = 'RecommendedActionsRepresentation';
2586
+ function normalize(input, existing, path, luvio, store, timestamp) {
2587
+ return input;
2588
+ }
2589
+ const select$1 = function RecommendedActionsRepresentationSelect() {
2590
+ const { selections: CopilotQuickActionRepresentation__selections, opaque: CopilotQuickActionRepresentation__opaque, } = select$2();
2591
+ return {
2592
+ kind: 'Fragment',
2593
+ version: VERSION,
2594
+ private: [],
2595
+ selections: [
2596
+ {
2597
+ name: 'copilotQuickActions',
2598
+ kind: 'Object',
2599
+ plural: true,
2600
+ selections: CopilotQuickActionRepresentation__selections
2601
+ },
2602
+ {
2603
+ name: 'errorMessage',
2604
+ kind: 'Scalar',
2605
+ required: false
2606
+ },
2607
+ {
2608
+ name: 'isSuccess',
2609
+ kind: 'Scalar'
2610
+ }
2611
+ ]
2612
+ };
2613
+ };
2614
+ function equals(existing, incoming) {
2615
+ const existing_isSuccess = existing.isSuccess;
2616
+ const incoming_isSuccess = incoming.isSuccess;
2617
+ if (!(existing_isSuccess === incoming_isSuccess)) {
2618
+ return false;
2619
+ }
2620
+ const existing_errorMessage = existing.errorMessage;
2621
+ const incoming_errorMessage = incoming.errorMessage;
2622
+ // if at least one of these optionals is defined
2623
+ if (existing_errorMessage !== undefined || incoming_errorMessage !== undefined) {
2624
+ // if one of these is not defined we know the other is defined and therefore
2625
+ // not equal
2626
+ if (existing_errorMessage === undefined || incoming_errorMessage === undefined) {
2627
+ return false;
2628
+ }
2629
+ if (!(existing_errorMessage === incoming_errorMessage)) {
2630
+ return false;
2631
+ }
2632
+ }
2633
+ const existing_copilotQuickActions = existing.copilotQuickActions;
2634
+ const incoming_copilotQuickActions = incoming.copilotQuickActions;
2635
+ const equals_copilotQuickActions_items = equalsArray(existing_copilotQuickActions, incoming_copilotQuickActions, (existing_copilotQuickActions_item, incoming_copilotQuickActions_item) => {
2636
+ if (!(equals$1(existing_copilotQuickActions_item, incoming_copilotQuickActions_item))) {
2637
+ return false;
2638
+ }
2639
+ });
2640
+ if (equals_copilotQuickActions_items === false) {
2641
+ return false;
2642
+ }
2643
+ return true;
2644
+ }
2645
+ const ingest = function RecommendedActionsRepresentationIngest(input, path, luvio, store, timestamp) {
2646
+ if (process.env.NODE_ENV !== 'production') {
2647
+ const validateError = validate(input);
2648
+ if (validateError !== null) {
2649
+ throw validateError;
2650
+ }
2651
+ }
2652
+ const key = path.fullPath;
2653
+ const ttlToUse = TTL;
2654
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "einstein-copilot-bot", VERSION, RepresentationType, equals);
2655
+ return createLink(key);
2656
+ };
2657
+ function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
2658
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
2659
+ const rootKey = fullPathFactory();
2660
+ rootKeySet.set(rootKey, {
2661
+ namespace: keyPrefix,
2662
+ representationName: RepresentationType,
2663
+ mergeable: false
2664
+ });
2665
+ }
2666
+
2667
+ function select(luvio, params) {
2668
+ return select$1();
2669
+ }
2670
+ function keyBuilder$1(luvio, params) {
2671
+ 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 + ')';
2672
+ }
2673
+ function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
2674
+ getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
2675
+ }
2676
+ function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
2677
+ const { body } = response;
2678
+ const key = keyBuilder$1(luvio, resourceParams);
2679
+ luvio.storeIngest(key, ingest, body);
2680
+ const snapshot = luvio.storeLookup({
2681
+ recordId: key,
2682
+ node: select(),
2683
+ variables: {},
2684
+ }, snapshotRefresh);
2685
+ if (process.env.NODE_ENV !== 'production') {
2686
+ if (snapshot.state !== 'Fulfilled') {
2687
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
2688
+ }
2689
+ }
2690
+ deepFreeze(snapshot.data);
2691
+ return snapshot;
2692
+ }
2693
+ function ingestError(luvio, params, error, snapshotRefresh) {
2694
+ const key = keyBuilder$1(luvio, params);
2695
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
2696
+ const storeMetadataParams = {
2697
+ ttl: TTL,
2698
+ namespace: keyPrefix,
2699
+ version: VERSION,
2700
+ representationName: RepresentationType
2701
+ };
2702
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
2703
+ return errorSnapshot;
2704
+ }
2705
+ function createResourceRequest(config) {
2706
+ const headers = {};
2707
+ return {
2708
+ baseUri: '/services/data/v61.0',
2709
+ basePath: '/connect/recommended-actions',
2710
+ method: 'get',
2711
+ body: null,
2712
+ urlParams: {},
2713
+ queryParams: config.queryParams,
2714
+ headers,
2715
+ priority: 'normal',
2716
+ };
2717
+ }
2718
+
2719
+ const adapterName = 'getRecommendedActions';
2720
+ const getRecommendedActions_ConfigPropertyMetadata = [
2721
+ generateParamConfigMetadata('pageName', false, 1 /* QueryParameter */, 0 /* String */),
2722
+ generateParamConfigMetadata('pageType', false, 1 /* QueryParameter */, 0 /* String */),
2723
+ generateParamConfigMetadata('actionName', false, 1 /* QueryParameter */, 0 /* String */),
2724
+ generateParamConfigMetadata('objectApiName', false, 1 /* QueryParameter */, 0 /* String */),
2725
+ generateParamConfigMetadata('customApplicationName', false, 1 /* QueryParameter */, 0 /* String */),
2726
+ generateParamConfigMetadata('sessionId', false, 1 /* QueryParameter */, 0 /* String */),
2727
+ generateParamConfigMetadata('formFactor', false, 1 /* QueryParameter */, 0 /* String */),
2728
+ ];
2729
+ const getRecommendedActions_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getRecommendedActions_ConfigPropertyMetadata);
2730
+ const createResourceParams = /*#__PURE__*/ createResourceParams$5(getRecommendedActions_ConfigPropertyMetadata);
2731
+ function keyBuilder(luvio, config) {
2732
+ const resourceParams = createResourceParams(config);
2733
+ return keyBuilder$1(luvio, resourceParams);
2734
+ }
2735
+ function typeCheckConfig(untrustedConfig) {
2736
+ const config = {};
2737
+ typeCheckConfig$5(untrustedConfig, config, getRecommendedActions_ConfigPropertyMetadata);
2738
+ return config;
2739
+ }
2740
+ function validateAdapterConfig(untrustedConfig, configPropertyNames) {
2741
+ if (!untrustedIsObject(untrustedConfig)) {
2742
+ return null;
2743
+ }
2744
+ if (process.env.NODE_ENV !== 'production') {
2745
+ validateConfig(untrustedConfig, configPropertyNames);
2746
+ }
2747
+ const config = typeCheckConfig(untrustedConfig);
2748
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
2749
+ return null;
2750
+ }
2751
+ return config;
2752
+ }
2753
+ function adapterFragment(luvio, config) {
2754
+ createResourceParams(config);
2755
+ return select();
2756
+ }
2757
+ function onFetchResponseSuccess(luvio, config, resourceParams, response) {
2758
+ const snapshot = ingestSuccess(luvio, resourceParams, response, {
2759
+ config,
2760
+ resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
2761
+ });
2762
+ return luvio.storeBroadcast().then(() => snapshot);
2763
+ }
2764
+ function onFetchResponseError(luvio, config, resourceParams, response) {
2765
+ const snapshot = ingestError(luvio, resourceParams, response, {
2766
+ config,
2767
+ resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
2768
+ });
2769
+ return luvio.storeBroadcast().then(() => snapshot);
2770
+ }
2771
+ function buildNetworkSnapshot(luvio, config, options) {
2772
+ const resourceParams = createResourceParams(config);
2773
+ const request = createResourceRequest(resourceParams);
2774
+ return luvio.dispatchResourceRequest(request, options)
2775
+ .then((response) => {
2776
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
2777
+ const cache = new StoreKeyMap();
2778
+ getResponseCacheKeys(cache, luvio, resourceParams, response.body);
2779
+ return cache;
2780
+ });
2781
+ }, (response) => {
2782
+ return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
2783
+ });
2784
+ }
2785
+ function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
2786
+ return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
2787
+ }
2788
+ function buildCachedSnapshotCachePolicy(context, storeLookup) {
2789
+ const { luvio, config } = context;
2790
+ const selector = {
2791
+ recordId: keyBuilder(luvio, config),
2792
+ node: adapterFragment(luvio, config),
2793
+ variables: {},
2794
+ };
2795
+ const cacheSnapshot = storeLookup(selector, {
2796
+ config,
2797
+ resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
2798
+ });
2799
+ return cacheSnapshot;
2800
+ }
2801
+ const getRecommendedActionsAdapterFactory = (luvio) => function einsteinCopilotBot__getRecommendedActions(untrustedConfig, requestContext) {
2802
+ const config = validateAdapterConfig(untrustedConfig, getRecommendedActions_ConfigPropertyNames);
1943
2803
  // Invalid or incomplete config
1944
2804
  if (config === null) {
1945
2805
  return null;
@@ -1948,4 +2808,4 @@ const getRecommendedPlanTemplatesAdapterFactory = (luvio) => function einsteinCo
1948
2808
  buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
1949
2809
  };
1950
2810
 
1951
- export { getBotIdAdapterFactory, getRecommendedPlanTemplatesAdapterFactory, sendMessageAdapterFactory };
2811
+ export { getBotIdAdapterFactory, getRecommendedActionsAdapterFactory, getRecommendedPlanTemplatesAdapterFactory, sendMessageAdapterFactory, submitFeedbackAdapterFactory };