@salesforce/lds-adapters-service-einstein-copilot-bot 1.266.0-dev22 → 1.266.0-dev23

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$4, typeCheckConfig as typeCheckConfig$4 } 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$4 = 30000;
116
+ const VERSION$9 = "ab85410a28124cfed3d8eae7b8236853";
117
+ function validate$a(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$4 = 'CopilotBotInfoRepresentation';
145
+ function normalize$4(input, existing, path, luvio, store, timestamp) {
146
146
  return input;
147
147
  }
148
- const select$a = function CopilotBotInfoRepresentationSelect() {
148
+ const select$d = function CopilotBotInfoRepresentationSelect() {
149
149
  return {
150
150
  kind: 'Fragment',
151
- version: VERSION$7,
151
+ version: VERSION$9,
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$9(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$4 = 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$a(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$4;
214
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "einstein-copilot-bot", VERSION$9, RepresentationType$4, equals$9);
215
215
  return createLink(key);
216
216
  };
217
- function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
217
+ function getTypeCacheKeys$4(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$4,
223
223
  mergeable: false
224
224
  });
225
225
  }
226
226
 
227
- function select$9(luvio, params) {
228
- return select$a();
227
+ function select$c(luvio, params) {
228
+ return select$d();
229
229
  }
230
- function keyBuilder$5(luvio, params) {
230
+ function keyBuilder$7(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$3(storeKeyMap, luvio, resourceParams, response) {
234
+ getTypeCacheKeys$4(storeKeyMap, luvio, response, () => keyBuilder$7());
235
235
  }
236
- function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
236
+ function ingestSuccess$3(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$7();
239
+ luvio.storeIngest(key, ingest$4, body);
240
240
  const snapshot = luvio.storeLookup({
241
241
  recordId: key,
242
- node: select$9(),
242
+ node: select$c(),
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$7();
255
255
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
256
256
  const storeMetadataParams = {
257
- ttl: TTL$3,
257
+ ttl: TTL$4,
258
258
  namespace: keyPrefix,
259
- version: VERSION$7,
260
- representationName: RepresentationType$3
259
+ version: VERSION$9,
260
+ representationName: RepresentationType$4
261
261
  };
262
262
  luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
263
263
  return errorSnapshot;
264
264
  }
265
- function createResourceRequest$2(config) {
265
+ function createResourceRequest$3(config) {
266
266
  const headers = {};
267
267
  return {
268
268
  baseUri: '/services/data/v60.0',
@@ -276,91 +276,91 @@ function createResourceRequest$2(config) {
276
276
  };
277
277
  }
278
278
 
279
- const adapterName$2 = 'getBotId';
279
+ const adapterName$3 = '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$3, getBotId_ConfigPropertyMetadata);
282
+ const createResourceParams$3 = /*#__PURE__*/ createResourceParams$4(getBotId_ConfigPropertyMetadata);
283
+ function keyBuilder$6(luvio, config) {
284
+ createResourceParams$3(config);
285
+ return keyBuilder$7();
286
286
  }
287
- function typeCheckConfig$2(untrustedConfig) {
287
+ function typeCheckConfig$3(untrustedConfig) {
288
288
  const config = {};
289
289
  return config;
290
290
  }
291
- function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
291
+ function validateAdapterConfig$3(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$3();
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$3(config);
306
+ return select$c();
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$3(luvio, resourceParams, response, {
310
310
  config,
311
- resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
311
+ resolve: () => buildNetworkSnapshot$3(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$3(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$3(luvio, config, options) {
323
+ const resourceParams = createResourceParams$3(config);
324
+ const request = createResourceRequest$3();
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$3(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$3, 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$6(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$3(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$3(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$8 = "e8cb7e20392935088ea2f98edb927e8a";
363
+ function validate$9(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$b = function EsTypeMessageRepresentationSelect() {
410
410
  return {
411
411
  kind: 'Fragment',
412
- version: VERSION$6,
412
+ version: VERSION$8,
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$8(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$8(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 + '")');
@@ -477,8 +477,8 @@ function validate$6(obj, path = 'VariableRepresentation') {
477
477
  return v_error === undefined ? null : v_error;
478
478
  }
479
479
 
480
- const VERSION$5 = "4e28b61c3ea362f1c68b28897784111e";
481
- function validate$5(obj, path = 'ConversationRuntimeProxyChoiceRepresentation') {
480
+ const VERSION$7 = "4e28b61c3ea362f1c68b28897784111e";
481
+ function validate$7(obj, path = 'ConversationRuntimeProxyChoiceRepresentation') {
482
482
  const v_error = (() => {
483
483
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
484
484
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -496,10 +496,10 @@ function validate$5(obj, path = 'ConversationRuntimeProxyChoiceRepresentation')
496
496
  })();
497
497
  return v_error === undefined ? null : v_error;
498
498
  }
499
- const select$7 = function ConversationRuntimeProxyChoiceRepresentationSelect() {
499
+ const select$a = function ConversationRuntimeProxyChoiceRepresentationSelect() {
500
500
  return {
501
501
  kind: 'Fragment',
502
- version: VERSION$5,
502
+ version: VERSION$7,
503
503
  private: [],
504
504
  selections: [
505
505
  {
@@ -513,7 +513,7 @@ const select$7 = function ConversationRuntimeProxyChoiceRepresentationSelect() {
513
513
  ]
514
514
  };
515
515
  };
516
- function equals$5(existing, incoming) {
516
+ function equals$7(existing, incoming) {
517
517
  const existing_alias = existing.alias;
518
518
  const incoming_alias = incoming.alias;
519
519
  if (!(existing_alias === incoming_alias)) {
@@ -527,8 +527,8 @@ function equals$5(existing, incoming) {
527
527
  return true;
528
528
  }
529
529
 
530
- const VERSION$4 = "477724425d0742c030025796c88ebf5d";
531
- function validate$4(obj, path = 'CollectMessageRepresentation') {
530
+ const VERSION$6 = "477724425d0742c030025796c88ebf5d";
531
+ function validate$6(obj, path = 'CollectMessageRepresentation') {
532
532
  const v_error = (() => {
533
533
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
534
534
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -536,7 +536,7 @@ function validate$4(obj, path = 'CollectMessageRepresentation') {
536
536
  if (obj.data !== undefined) {
537
537
  const obj_data = obj.data;
538
538
  const path_data = path + '.data';
539
- const referencepath_dataValidationError = validate$7(obj_data, path_data);
539
+ const referencepath_dataValidationError = validate$9(obj_data, path_data);
540
540
  if (referencepath_dataValidationError !== null) {
541
541
  let message = 'Object doesn\'t match EsTypeMessageRepresentation (at "' + path_data + '")\n';
542
542
  message += referencepath_dataValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -579,11 +579,11 @@ function validate$4(obj, path = 'CollectMessageRepresentation') {
579
579
  })();
580
580
  return v_error === undefined ? null : v_error;
581
581
  }
582
- const select$6 = function CollectMessageRepresentationSelect() {
583
- const { selections: EsTypeMessageRepresentation__selections, opaque: EsTypeMessageRepresentation__opaque, } = select$8();
582
+ const select$9 = function CollectMessageRepresentationSelect() {
583
+ const { selections: EsTypeMessageRepresentation__selections, opaque: EsTypeMessageRepresentation__opaque, } = select$b();
584
584
  return {
585
585
  kind: 'Fragment',
586
- version: VERSION$4,
586
+ version: VERSION$6,
587
587
  private: [],
588
588
  selections: [
589
589
  {
@@ -604,7 +604,7 @@ const select$6 = function CollectMessageRepresentationSelect() {
604
604
  ]
605
605
  };
606
606
  };
607
- function equals$4(existing, incoming) {
607
+ function equals$6(existing, incoming) {
608
608
  const existing_targetType = existing.targetType;
609
609
  const incoming_targetType = incoming.targetType;
610
610
  if (!(existing_targetType === incoming_targetType)) {
@@ -619,7 +619,7 @@ function equals$4(existing, incoming) {
619
619
  if (existing_data === undefined || incoming_data === undefined) {
620
620
  return false;
621
621
  }
622
- if (!(equals$6(existing_data, incoming_data))) {
622
+ if (!(equals$8(existing_data, incoming_data))) {
623
623
  return false;
624
624
  }
625
625
  }
@@ -639,9 +639,9 @@ function equals$4(existing, incoming) {
639
639
  return true;
640
640
  }
641
641
 
642
- const TTL$2 = 30000;
643
- const VERSION$3 = "205b55ee28d637afd2916e42363d735f";
644
- function validate$3(obj, path = 'ConversationRuntimeProxyMessageRepresentation') {
642
+ const TTL$3 = 30000;
643
+ const VERSION$5 = "205b55ee28d637afd2916e42363d735f";
644
+ function validate$5(obj, path = 'ConversationRuntimeProxyMessageRepresentation') {
645
645
  const v_error = (() => {
646
646
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
647
647
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -655,7 +655,7 @@ function validate$3(obj, path = 'ConversationRuntimeProxyMessageRepresentation')
655
655
  for (let i = 0; i < obj_choices.length; i++) {
656
656
  const obj_choices_item = obj_choices[i];
657
657
  const path_choices_item = path_choices + '[' + i + ']';
658
- const referencepath_choices_itemValidationError = validate$5(obj_choices_item, path_choices_item);
658
+ const referencepath_choices_itemValidationError = validate$7(obj_choices_item, path_choices_item);
659
659
  if (referencepath_choices_itemValidationError !== null) {
660
660
  let message = 'Object doesn\'t match ConversationRuntimeProxyChoiceRepresentation (at "' + path_choices_item + '")\n';
661
661
  message += referencepath_choices_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -672,7 +672,7 @@ function validate$3(obj, path = 'ConversationRuntimeProxyMessageRepresentation')
672
672
  for (let i = 0; i < obj_collect.length; i++) {
673
673
  const obj_collect_item = obj_collect[i];
674
674
  const path_collect_item = path_collect + '[' + i + ']';
675
- const referencepath_collect_itemValidationError = validate$4(obj_collect_item, path_collect_item);
675
+ const referencepath_collect_itemValidationError = validate$6(obj_collect_item, path_collect_item);
676
676
  if (referencepath_collect_itemValidationError !== null) {
677
677
  let message = 'Object doesn\'t match CollectMessageRepresentation (at "' + path_collect_item + '")\n';
678
678
  message += referencepath_collect_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -689,7 +689,7 @@ function validate$3(obj, path = 'ConversationRuntimeProxyMessageRepresentation')
689
689
  for (let i = 0; i < obj_confirm.length; i++) {
690
690
  const obj_confirm_item = obj_confirm[i];
691
691
  const path_confirm_item = path_confirm + '[' + i + ']';
692
- const referencepath_confirm_itemValidationError = validate$7(obj_confirm_item, path_confirm_item);
692
+ const referencepath_confirm_itemValidationError = validate$9(obj_confirm_item, path_confirm_item);
693
693
  if (referencepath_confirm_itemValidationError !== null) {
694
694
  let message = 'Object doesn\'t match EsTypeMessageRepresentation (at "' + path_confirm_item + '")\n';
695
695
  message += referencepath_confirm_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -893,7 +893,7 @@ function validate$3(obj, path = 'ConversationRuntimeProxyMessageRepresentation')
893
893
  for (let i = 0; i < obj_result.length; i++) {
894
894
  const obj_result_item = obj_result[i];
895
895
  const path_result_item = path_result + '[' + i + ']';
896
- const referencepath_result_itemValidationError = validate$7(obj_result_item, path_result_item);
896
+ const referencepath_result_itemValidationError = validate$9(obj_result_item, path_result_item);
897
897
  if (referencepath_result_itemValidationError !== null) {
898
898
  let message = 'Object doesn\'t match EsTypeMessageRepresentation (at "' + path_result_item + '")\n';
899
899
  message += referencepath_result_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -967,26 +967,26 @@ function validate$3(obj, path = 'ConversationRuntimeProxyMessageRepresentation')
967
967
  })();
968
968
  return v_error === undefined ? null : v_error;
969
969
  }
970
- const RepresentationType$2 = 'ConversationRuntimeProxyMessageRepresentation';
971
- function keyBuilder$3(luvio, config) {
972
- return keyPrefix + '::' + RepresentationType$2 + ':' + config.id;
970
+ const RepresentationType$3 = 'ConversationRuntimeProxyMessageRepresentation';
971
+ function keyBuilder$5(luvio, config) {
972
+ return keyPrefix + '::' + RepresentationType$3 + ':' + config.id;
973
973
  }
974
974
  function keyBuilderFromType$1(luvio, object) {
975
975
  const keyParams = {
976
976
  id: object.id
977
977
  };
978
- return keyBuilder$3(luvio, keyParams);
978
+ return keyBuilder$5(luvio, keyParams);
979
979
  }
980
- function normalize$2(input, existing, path, luvio, store, timestamp) {
980
+ function normalize$3(input, existing, path, luvio, store, timestamp) {
981
981
  return input;
982
982
  }
983
- const select$5 = function ConversationRuntimeProxyMessageRepresentationSelect() {
984
- const { selections: ConversationRuntimeProxyChoiceRepresentation__selections, opaque: ConversationRuntimeProxyChoiceRepresentation__opaque, } = select$7();
985
- const { selections: CollectMessageRepresentation__selections, opaque: CollectMessageRepresentation__opaque, } = select$6();
986
- const { selections: EsTypeMessageRepresentation__selections, opaque: EsTypeMessageRepresentation__opaque, } = select$8();
983
+ const select$8 = function ConversationRuntimeProxyMessageRepresentationSelect() {
984
+ const { selections: ConversationRuntimeProxyChoiceRepresentation__selections, opaque: ConversationRuntimeProxyChoiceRepresentation__opaque, } = select$a();
985
+ const { selections: CollectMessageRepresentation__selections, opaque: CollectMessageRepresentation__opaque, } = select$9();
986
+ const { selections: EsTypeMessageRepresentation__selections, opaque: EsTypeMessageRepresentation__opaque, } = select$b();
987
987
  return {
988
988
  kind: 'Fragment',
989
- version: VERSION$3,
989
+ version: VERSION$5,
990
990
  private: [],
991
991
  selections: [
992
992
  {
@@ -1075,7 +1075,7 @@ const select$5 = function ConversationRuntimeProxyMessageRepresentationSelect()
1075
1075
  ]
1076
1076
  };
1077
1077
  };
1078
- function equals$3(existing, incoming) {
1078
+ function equals$5(existing, incoming) {
1079
1079
  const existing_id = existing.id;
1080
1080
  const incoming_id = incoming.id;
1081
1081
  if (!(existing_id === incoming_id)) {
@@ -1104,7 +1104,7 @@ function equals$3(existing, incoming) {
1104
1104
  return false;
1105
1105
  }
1106
1106
  const equals_choices_items = equalsArray(existing_choices, incoming_choices, (existing_choices_item, incoming_choices_item) => {
1107
- if (!(equals$5(existing_choices_item, incoming_choices_item))) {
1107
+ if (!(equals$7(existing_choices_item, incoming_choices_item))) {
1108
1108
  return false;
1109
1109
  }
1110
1110
  });
@@ -1122,7 +1122,7 @@ function equals$3(existing, incoming) {
1122
1122
  return false;
1123
1123
  }
1124
1124
  const equals_collect_items = equalsArray(existing_collect, incoming_collect, (existing_collect_item, incoming_collect_item) => {
1125
- if (!(equals$4(existing_collect_item, incoming_collect_item))) {
1125
+ if (!(equals$6(existing_collect_item, incoming_collect_item))) {
1126
1126
  return false;
1127
1127
  }
1128
1128
  });
@@ -1140,7 +1140,7 @@ function equals$3(existing, incoming) {
1140
1140
  return false;
1141
1141
  }
1142
1142
  const equals_confirm_items = equalsArray(existing_confirm, incoming_confirm, (existing_confirm_item, incoming_confirm_item) => {
1143
- if (!(equals$6(existing_confirm_item, incoming_confirm_item))) {
1143
+ if (!(equals$8(existing_confirm_item, incoming_confirm_item))) {
1144
1144
  return false;
1145
1145
  }
1146
1146
  });
@@ -1254,7 +1254,7 @@ function equals$3(existing, incoming) {
1254
1254
  return false;
1255
1255
  }
1256
1256
  const equals_result_items = equalsArray(existing_result, incoming_result, (existing_result_item, incoming_result_item) => {
1257
- if (!(equals$6(existing_result_item, incoming_result_item))) {
1257
+ if (!(equals$8(existing_result_item, incoming_result_item))) {
1258
1258
  return false;
1259
1259
  }
1260
1260
  });
@@ -1290,31 +1290,31 @@ function equals$3(existing, incoming) {
1290
1290
  }
1291
1291
  return true;
1292
1292
  }
1293
- const ingest$2 = function ConversationRuntimeProxyMessageRepresentationIngest(input, path, luvio, store, timestamp) {
1293
+ const ingest$3 = function ConversationRuntimeProxyMessageRepresentationIngest(input, path, luvio, store, timestamp) {
1294
1294
  if (process.env.NODE_ENV !== 'production') {
1295
- const validateError = validate$3(input);
1295
+ const validateError = validate$5(input);
1296
1296
  if (validateError !== null) {
1297
1297
  throw validateError;
1298
1298
  }
1299
1299
  }
1300
1300
  const key = keyBuilderFromType$1(luvio, input);
1301
- const ttlToUse = TTL$2;
1302
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "einstein-copilot-bot", VERSION$3, RepresentationType$2, equals$3);
1301
+ const ttlToUse = TTL$3;
1302
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "einstein-copilot-bot", VERSION$5, RepresentationType$3, equals$5);
1303
1303
  return createLink(key);
1304
1304
  };
1305
- function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
1305
+ function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
1306
1306
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1307
1307
  const rootKey = keyBuilderFromType$1(luvio, input);
1308
1308
  rootKeySet.set(rootKey, {
1309
1309
  namespace: keyPrefix,
1310
- representationName: RepresentationType$2,
1310
+ representationName: RepresentationType$3,
1311
1311
  mergeable: false
1312
1312
  });
1313
1313
  }
1314
1314
 
1315
- const TTL$1 = 30000;
1316
- const VERSION$2 = "fe7024fb1132250f97d9616482f09f99";
1317
- function validate$2(obj, path = 'ConversationRuntimeProxyRepresentation') {
1315
+ const TTL$2 = 30000;
1316
+ const VERSION$4 = "fe7024fb1132250f97d9616482f09f99";
1317
+ function validate$4(obj, path = 'ConversationRuntimeProxyRepresentation') {
1318
1318
  const v_error = (() => {
1319
1319
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1320
1320
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -1366,23 +1366,23 @@ function validate$2(obj, path = 'ConversationRuntimeProxyRepresentation') {
1366
1366
  })();
1367
1367
  return v_error === undefined ? null : v_error;
1368
1368
  }
1369
- const RepresentationType$1 = 'ConversationRuntimeProxyRepresentation';
1370
- function keyBuilder$2(luvio, config) {
1371
- return keyPrefix + '::' + RepresentationType$1 + ':' + config.id;
1369
+ const RepresentationType$2 = 'ConversationRuntimeProxyRepresentation';
1370
+ function keyBuilder$4(luvio, config) {
1371
+ return keyPrefix + '::' + RepresentationType$2 + ':' + config.id;
1372
1372
  }
1373
1373
  function keyBuilderFromType(luvio, object) {
1374
1374
  const keyParams = {
1375
1375
  id: object.requestId
1376
1376
  };
1377
- return keyBuilder$2(luvio, keyParams);
1377
+ return keyBuilder$4(luvio, keyParams);
1378
1378
  }
1379
- function normalize$1(input, existing, path, luvio, store, timestamp) {
1379
+ function normalize$2(input, existing, path, luvio, store, timestamp) {
1380
1380
  const input_messages = input.messages;
1381
1381
  const input_messages_id = path.fullPath + '__messages';
1382
1382
  for (let i = 0; i < input_messages.length; i++) {
1383
1383
  const input_messages_item = input_messages[i];
1384
1384
  let input_messages_item_id = input_messages_id + '__' + i;
1385
- input_messages[i] = ingest$2(input_messages_item, {
1385
+ input_messages[i] = ingest$3(input_messages_item, {
1386
1386
  fullPath: input_messages_item_id,
1387
1387
  propertyName: i,
1388
1388
  parent: {
@@ -1395,10 +1395,10 @@ function normalize$1(input, existing, path, luvio, store, timestamp) {
1395
1395
  }
1396
1396
  return input;
1397
1397
  }
1398
- const select$4 = function ConversationRuntimeProxyRepresentationSelect() {
1398
+ const select$7 = function ConversationRuntimeProxyRepresentationSelect() {
1399
1399
  return {
1400
1400
  kind: 'Fragment',
1401
- version: VERSION$2,
1401
+ version: VERSION$4,
1402
1402
  private: [],
1403
1403
  selections: [
1404
1404
  {
@@ -1413,7 +1413,7 @@ const select$4 = function ConversationRuntimeProxyRepresentationSelect() {
1413
1413
  name: 'messages',
1414
1414
  kind: 'Link',
1415
1415
  plural: true,
1416
- fragment: select$5()
1416
+ fragment: select$8()
1417
1417
  },
1418
1418
  {
1419
1419
  name: 'processedSequenceIds',
@@ -1431,7 +1431,7 @@ const select$4 = function ConversationRuntimeProxyRepresentationSelect() {
1431
1431
  ]
1432
1432
  };
1433
1433
  };
1434
- function equals$2(existing, incoming) {
1434
+ function equals$4(existing, incoming) {
1435
1435
  const existing_botId = existing.botId;
1436
1436
  const incoming_botId = incoming.botId;
1437
1437
  if (!(existing_botId === incoming_botId)) {
@@ -1474,45 +1474,45 @@ function equals$2(existing, incoming) {
1474
1474
  }
1475
1475
  return true;
1476
1476
  }
1477
- const ingest$1 = function ConversationRuntimeProxyRepresentationIngest(input, path, luvio, store, timestamp) {
1477
+ const ingest$2 = function ConversationRuntimeProxyRepresentationIngest(input, path, luvio, store, timestamp) {
1478
1478
  if (process.env.NODE_ENV !== 'production') {
1479
- const validateError = validate$2(input);
1479
+ const validateError = validate$4(input);
1480
1480
  if (validateError !== null) {
1481
1481
  throw validateError;
1482
1482
  }
1483
1483
  }
1484
1484
  const key = keyBuilderFromType(luvio, input);
1485
- const ttlToUse = TTL$1;
1486
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "einstein-copilot-bot", VERSION$2, RepresentationType$1, equals$2);
1485
+ const ttlToUse = TTL$2;
1486
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "einstein-copilot-bot", VERSION$4, RepresentationType$2, equals$4);
1487
1487
  return createLink(key);
1488
1488
  };
1489
- function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
1489
+ function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
1490
1490
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1491
1491
  const rootKey = keyBuilderFromType(luvio, input);
1492
1492
  rootKeySet.set(rootKey, {
1493
1493
  namespace: keyPrefix,
1494
- representationName: RepresentationType$1,
1494
+ representationName: RepresentationType$2,
1495
1495
  mergeable: false
1496
1496
  });
1497
1497
  const input_messages_length = input.messages.length;
1498
1498
  for (let i = 0; i < input_messages_length; i++) {
1499
- getTypeCacheKeys$2(rootKeySet, luvio, input.messages[i]);
1499
+ getTypeCacheKeys$3(rootKeySet, luvio, input.messages[i]);
1500
1500
  }
1501
1501
  }
1502
1502
 
1503
- function select$3(luvio, params) {
1504
- return select$4();
1503
+ function select$6(luvio, params) {
1504
+ return select$7();
1505
1505
  }
1506
- function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
1507
- getTypeCacheKeys$1(storeKeyMap, luvio, response);
1506
+ function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
1507
+ getTypeCacheKeys$2(storeKeyMap, luvio, response);
1508
1508
  }
1509
- function ingestSuccess$1(luvio, resourceParams, response) {
1509
+ function ingestSuccess$2(luvio, resourceParams, response) {
1510
1510
  const { body } = response;
1511
1511
  const key = keyBuilderFromType(luvio, body);
1512
- luvio.storeIngest(key, ingest$1, body);
1512
+ luvio.storeIngest(key, ingest$2, body);
1513
1513
  const snapshot = luvio.storeLookup({
1514
1514
  recordId: key,
1515
- node: select$3(),
1515
+ node: select$6(),
1516
1516
  variables: {},
1517
1517
  });
1518
1518
  if (process.env.NODE_ENV !== 'production') {
@@ -1523,7 +1523,7 @@ function ingestSuccess$1(luvio, resourceParams, response) {
1523
1523
  deepFreeze(snapshot.data);
1524
1524
  return snapshot;
1525
1525
  }
1526
- function createResourceRequest$1(config) {
1526
+ function createResourceRequest$2(config) {
1527
1527
  const headers = {};
1528
1528
  return {
1529
1529
  baseUri: '/services/data/v60.0',
@@ -1537,7 +1537,7 @@ function createResourceRequest$1(config) {
1537
1537
  };
1538
1538
  }
1539
1539
 
1540
- const adapterName$1 = 'sendMessage';
1540
+ const adapterName$2 = 'sendMessage';
1541
1541
  const sendMessage_ConfigPropertyMetadata = [
1542
1542
  generateParamConfigMetadata('botId', false, 1 /* QueryParameter */, 0 /* String */),
1543
1543
  generateParamConfigMetadata('botVersionId', false, 1 /* QueryParameter */, 0 /* String */),
@@ -1554,11 +1554,11 @@ const sendMessage_ConfigPropertyMetadata = [
1554
1554
  generateParamConfigMetadata('userUtterance', false, 2 /* Body */, 0 /* String */),
1555
1555
  generateParamConfigMetadata('variables', false, 2 /* Body */, 4 /* Unsupported */, true),
1556
1556
  ];
1557
- const sendMessage_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, sendMessage_ConfigPropertyMetadata);
1558
- const createResourceParams$1 = /*#__PURE__*/ createResourceParams$3(sendMessage_ConfigPropertyMetadata);
1559
- function typeCheckConfig$1(untrustedConfig) {
1557
+ const sendMessage_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, sendMessage_ConfigPropertyMetadata);
1558
+ const createResourceParams$2 = /*#__PURE__*/ createResourceParams$4(sendMessage_ConfigPropertyMetadata);
1559
+ function typeCheckConfig$2(untrustedConfig) {
1560
1560
  const config = {};
1561
- typeCheckConfig$3(untrustedConfig, config, sendMessage_ConfigPropertyMetadata);
1561
+ typeCheckConfig$4(untrustedConfig, config, sendMessage_ConfigPropertyMetadata);
1562
1562
  const untrustedConfig_planTemplateVariables = untrustedConfig.planTemplateVariables;
1563
1563
  config.planTemplateVariables = untrustedConfig_planTemplateVariables;
1564
1564
  const untrustedConfig_reply = untrustedConfig.reply;
@@ -1566,7 +1566,7 @@ function typeCheckConfig$1(untrustedConfig) {
1566
1566
  const untrustedConfig_reply_array = [];
1567
1567
  for (let i = 0, arrayLength = untrustedConfig_reply.length; i < arrayLength; i++) {
1568
1568
  const untrustedConfig_reply_item = untrustedConfig_reply[i];
1569
- const referenceEsTypeMessageRepresentationValidationError = validate$7(untrustedConfig_reply_item);
1569
+ const referenceEsTypeMessageRepresentationValidationError = validate$9(untrustedConfig_reply_item);
1570
1570
  if (referenceEsTypeMessageRepresentationValidationError === null) {
1571
1571
  untrustedConfig_reply_array.push(untrustedConfig_reply_item);
1572
1572
  }
@@ -1578,7 +1578,7 @@ function typeCheckConfig$1(untrustedConfig) {
1578
1578
  const untrustedConfig_variables_array = [];
1579
1579
  for (let i = 0, arrayLength = untrustedConfig_variables.length; i < arrayLength; i++) {
1580
1580
  const untrustedConfig_variables_item = untrustedConfig_variables[i];
1581
- const referenceVariableRepresentationValidationError = validate$6(untrustedConfig_variables_item);
1581
+ const referenceVariableRepresentationValidationError = validate$8(untrustedConfig_variables_item);
1582
1582
  if (referenceVariableRepresentationValidationError === null) {
1583
1583
  untrustedConfig_variables_array.push(untrustedConfig_variables_item);
1584
1584
  }
@@ -1587,30 +1587,30 @@ function typeCheckConfig$1(untrustedConfig) {
1587
1587
  }
1588
1588
  return config;
1589
1589
  }
1590
- function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
1590
+ function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
1591
1591
  if (!untrustedIsObject(untrustedConfig)) {
1592
1592
  return null;
1593
1593
  }
1594
1594
  if (process.env.NODE_ENV !== 'production') {
1595
1595
  validateConfig(untrustedConfig, configPropertyNames);
1596
1596
  }
1597
- const config = typeCheckConfig$1(untrustedConfig);
1597
+ const config = typeCheckConfig$2(untrustedConfig);
1598
1598
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
1599
1599
  return null;
1600
1600
  }
1601
1601
  return config;
1602
1602
  }
1603
- function buildNetworkSnapshot$1(luvio, config, options) {
1604
- const resourceParams = createResourceParams$1(config);
1605
- const request = createResourceRequest$1(resourceParams);
1603
+ function buildNetworkSnapshot$2(luvio, config, options) {
1604
+ const resourceParams = createResourceParams$2(config);
1605
+ const request = createResourceRequest$2(resourceParams);
1606
1606
  return luvio.dispatchResourceRequest(request, options)
1607
1607
  .then((response) => {
1608
1608
  return luvio.handleSuccessResponse(() => {
1609
- const snapshot = ingestSuccess$1(luvio, resourceParams, response);
1609
+ const snapshot = ingestSuccess$2(luvio, resourceParams, response);
1610
1610
  return luvio.storeBroadcast().then(() => snapshot);
1611
1611
  }, () => {
1612
1612
  const cache = new StoreKeyMap();
1613
- getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
1613
+ getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
1614
1614
  return cache;
1615
1615
  });
1616
1616
  }, (response) => {
@@ -1620,17 +1620,17 @@ function buildNetworkSnapshot$1(luvio, config, options) {
1620
1620
  }
1621
1621
  const sendMessageAdapterFactory = (luvio) => {
1622
1622
  return function sendMessage(untrustedConfig) {
1623
- const config = validateAdapterConfig$1(untrustedConfig, sendMessage_ConfigPropertyNames);
1623
+ const config = validateAdapterConfig$2(untrustedConfig, sendMessage_ConfigPropertyNames);
1624
1624
  // Invalid or incomplete config
1625
1625
  if (config === null) {
1626
1626
  throw new Error('Invalid config for "sendMessage"');
1627
1627
  }
1628
- return buildNetworkSnapshot$1(luvio, config);
1628
+ return buildNetworkSnapshot$2(luvio, config);
1629
1629
  };
1630
1630
  };
1631
1631
 
1632
- const VERSION$1 = "504437088c2317480c651ac05a7565b5";
1633
- function validate$1(obj, path = 'PlanTemplateRepresentation') {
1632
+ const VERSION$3 = "504437088c2317480c651ac05a7565b5";
1633
+ function validate$3(obj, path = 'PlanTemplateRepresentation') {
1634
1634
  const v_error = (() => {
1635
1635
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1636
1636
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -1672,10 +1672,10 @@ function validate$1(obj, path = 'PlanTemplateRepresentation') {
1672
1672
  })();
1673
1673
  return v_error === undefined ? null : v_error;
1674
1674
  }
1675
- const select$2 = function PlanTemplateRepresentationSelect() {
1675
+ const select$5 = function PlanTemplateRepresentationSelect() {
1676
1676
  return {
1677
1677
  kind: 'Fragment',
1678
- version: VERSION$1,
1678
+ version: VERSION$3,
1679
1679
  private: [],
1680
1680
  selections: [
1681
1681
  {
@@ -1702,7 +1702,7 @@ const select$2 = function PlanTemplateRepresentationSelect() {
1702
1702
  ]
1703
1703
  };
1704
1704
  };
1705
- function equals$1(existing, incoming) {
1705
+ function equals$3(existing, incoming) {
1706
1706
  const existing_intent = existing.intent;
1707
1707
  const incoming_intent = incoming.intent;
1708
1708
  if (!(existing_intent === incoming_intent)) {
@@ -1736,9 +1736,9 @@ function equals$1(existing, incoming) {
1736
1736
  return true;
1737
1737
  }
1738
1738
 
1739
- const TTL = 900000;
1740
- const VERSION = "0503b0c5ce250e7f5fbf16f2d3f2fec4";
1741
- function validate(obj, path = 'RecommendedPlanTemplatesRepresentation') {
1739
+ const TTL$1 = 900000;
1740
+ const VERSION$2 = "0503b0c5ce250e7f5fbf16f2d3f2fec4";
1741
+ function validate$2(obj, path = 'RecommendedPlanTemplatesRepresentation') {
1742
1742
  const v_error = (() => {
1743
1743
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1744
1744
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -1763,7 +1763,7 @@ function validate(obj, path = 'RecommendedPlanTemplatesRepresentation') {
1763
1763
  for (let i = 0; i < obj_planTemplates.length; i++) {
1764
1764
  const obj_planTemplates_item = obj_planTemplates[i];
1765
1765
  const path_planTemplates_item = path_planTemplates + '[' + i + ']';
1766
- const referencepath_planTemplates_itemValidationError = validate$1(obj_planTemplates_item, path_planTemplates_item);
1766
+ const referencepath_planTemplates_itemValidationError = validate$3(obj_planTemplates_item, path_planTemplates_item);
1767
1767
  if (referencepath_planTemplates_itemValidationError !== null) {
1768
1768
  let message = 'Object doesn\'t match PlanTemplateRepresentation (at "' + path_planTemplates_item + '")\n';
1769
1769
  message += referencepath_planTemplates_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -1773,15 +1773,15 @@ function validate(obj, path = 'RecommendedPlanTemplatesRepresentation') {
1773
1773
  })();
1774
1774
  return v_error === undefined ? null : v_error;
1775
1775
  }
1776
- const RepresentationType = 'RecommendedPlanTemplatesRepresentation';
1777
- function normalize(input, existing, path, luvio, store, timestamp) {
1776
+ const RepresentationType$1 = 'RecommendedPlanTemplatesRepresentation';
1777
+ function normalize$1(input, existing, path, luvio, store, timestamp) {
1778
1778
  return input;
1779
1779
  }
1780
- const select$1 = function RecommendedPlanTemplatesRepresentationSelect() {
1781
- const { selections: PlanTemplateRepresentation__selections, opaque: PlanTemplateRepresentation__opaque, } = select$2();
1780
+ const select$4 = function RecommendedPlanTemplatesRepresentationSelect() {
1781
+ const { selections: PlanTemplateRepresentation__selections, opaque: PlanTemplateRepresentation__opaque, } = select$5();
1782
1782
  return {
1783
1783
  kind: 'Fragment',
1784
- version: VERSION,
1784
+ version: VERSION$2,
1785
1785
  private: [],
1786
1786
  selections: [
1787
1787
  {
@@ -1802,7 +1802,7 @@ const select$1 = function RecommendedPlanTemplatesRepresentationSelect() {
1802
1802
  ]
1803
1803
  };
1804
1804
  };
1805
- function equals(existing, incoming) {
1805
+ function equals$2(existing, incoming) {
1806
1806
  const existing_isSuccess = existing.isSuccess;
1807
1807
  const incoming_isSuccess = incoming.isSuccess;
1808
1808
  if (!(existing_isSuccess === incoming_isSuccess)) {
@@ -1824,7 +1824,7 @@ function equals(existing, incoming) {
1824
1824
  const existing_planTemplates = existing.planTemplates;
1825
1825
  const incoming_planTemplates = incoming.planTemplates;
1826
1826
  const equals_planTemplates_items = equalsArray(existing_planTemplates, incoming_planTemplates, (existing_planTemplates_item, incoming_planTemplates_item) => {
1827
- if (!(equals$1(existing_planTemplates_item, incoming_planTemplates_item))) {
1827
+ if (!(equals$3(existing_planTemplates_item, incoming_planTemplates_item))) {
1828
1828
  return false;
1829
1829
  }
1830
1830
  });
@@ -1833,44 +1833,44 @@ function equals(existing, incoming) {
1833
1833
  }
1834
1834
  return true;
1835
1835
  }
1836
- const ingest = function RecommendedPlanTemplatesRepresentationIngest(input, path, luvio, store, timestamp) {
1836
+ const ingest$1 = function RecommendedPlanTemplatesRepresentationIngest(input, path, luvio, store, timestamp) {
1837
1837
  if (process.env.NODE_ENV !== 'production') {
1838
- const validateError = validate(input);
1838
+ const validateError = validate$2(input);
1839
1839
  if (validateError !== null) {
1840
1840
  throw validateError;
1841
1841
  }
1842
1842
  }
1843
1843
  const key = path.fullPath;
1844
- const ttlToUse = TTL;
1845
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "einstein-copilot-bot", VERSION, RepresentationType, equals);
1844
+ const ttlToUse = TTL$1;
1845
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "einstein-copilot-bot", VERSION$2, RepresentationType$1, equals$2);
1846
1846
  return createLink(key);
1847
1847
  };
1848
- function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
1848
+ function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
1849
1849
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1850
1850
  const rootKey = fullPathFactory();
1851
1851
  rootKeySet.set(rootKey, {
1852
1852
  namespace: keyPrefix,
1853
- representationName: RepresentationType,
1853
+ representationName: RepresentationType$1,
1854
1854
  mergeable: false
1855
1855
  });
1856
1856
  }
1857
1857
 
1858
- function select(luvio, params) {
1859
- return select$1();
1858
+ function select$3(luvio, params) {
1859
+ return select$4();
1860
1860
  }
1861
- function keyBuilder$1(luvio, params) {
1861
+ function keyBuilder$3(luvio, params) {
1862
1862
  return keyPrefix + '::RecommendedPlanTemplatesRepresentation:(' + 'pageType:' + params.urlParams.pageType + ',' + 'objectType:' + params.urlParams.objectType + ')';
1863
1863
  }
1864
- function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
1865
- getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
1864
+ function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
1865
+ getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$3(luvio, resourceParams));
1866
1866
  }
1867
- function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
1867
+ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
1868
1868
  const { body } = response;
1869
- const key = keyBuilder$1(luvio, resourceParams);
1870
- luvio.storeIngest(key, ingest, body);
1869
+ const key = keyBuilder$3(luvio, resourceParams);
1870
+ luvio.storeIngest(key, ingest$1, body);
1871
1871
  const snapshot = luvio.storeLookup({
1872
1872
  recordId: key,
1873
- node: select(),
1873
+ node: select$3(),
1874
1874
  variables: {},
1875
1875
  }, snapshotRefresh);
1876
1876
  if (process.env.NODE_ENV !== 'production') {
@@ -1881,19 +1881,19 @@ function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
1881
1881
  deepFreeze(snapshot.data);
1882
1882
  return snapshot;
1883
1883
  }
1884
- function ingestError(luvio, params, error, snapshotRefresh) {
1885
- const key = keyBuilder$1(luvio, params);
1884
+ function ingestError$1(luvio, params, error, snapshotRefresh) {
1885
+ const key = keyBuilder$3(luvio, params);
1886
1886
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1887
1887
  const storeMetadataParams = {
1888
- ttl: TTL,
1888
+ ttl: TTL$1,
1889
1889
  namespace: keyPrefix,
1890
- version: VERSION,
1891
- representationName: RepresentationType
1890
+ version: VERSION$2,
1891
+ representationName: RepresentationType$1
1892
1892
  };
1893
1893
  luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
1894
1894
  return errorSnapshot;
1895
1895
  }
1896
- function createResourceRequest(config) {
1896
+ function createResourceRequest$1(config) {
1897
1897
  const headers = {};
1898
1898
  return {
1899
1899
  baseUri: '/services/data/v60.0',
@@ -1907,85 +1907,760 @@ function createResourceRequest(config) {
1907
1907
  };
1908
1908
  }
1909
1909
 
1910
- const adapterName = 'getRecommendedPlanTemplates';
1910
+ const adapterName$1 = 'getRecommendedPlanTemplates';
1911
1911
  const getRecommendedPlanTemplates_ConfigPropertyMetadata = [
1912
1912
  generateParamConfigMetadata('pageType', true, 0 /* UrlParameter */, 0 /* String */),
1913
1913
  generateParamConfigMetadata('objectType', true, 0 /* UrlParameter */, 0 /* String */),
1914
1914
  ];
1915
- const getRecommendedPlanTemplates_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getRecommendedPlanTemplates_ConfigPropertyMetadata);
1916
- const createResourceParams = /*#__PURE__*/ createResourceParams$3(getRecommendedPlanTemplates_ConfigPropertyMetadata);
1917
- function keyBuilder(luvio, config) {
1918
- const resourceParams = createResourceParams(config);
1919
- return keyBuilder$1(luvio, resourceParams);
1915
+ const getRecommendedPlanTemplates_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getRecommendedPlanTemplates_ConfigPropertyMetadata);
1916
+ const createResourceParams$1 = /*#__PURE__*/ createResourceParams$4(getRecommendedPlanTemplates_ConfigPropertyMetadata);
1917
+ function keyBuilder$2(luvio, config) {
1918
+ const resourceParams = createResourceParams$1(config);
1919
+ return keyBuilder$3(luvio, resourceParams);
1920
1920
  }
1921
- function typeCheckConfig(untrustedConfig) {
1921
+ function typeCheckConfig$1(untrustedConfig) {
1922
1922
  const config = {};
1923
- typeCheckConfig$3(untrustedConfig, config, getRecommendedPlanTemplates_ConfigPropertyMetadata);
1923
+ typeCheckConfig$4(untrustedConfig, config, getRecommendedPlanTemplates_ConfigPropertyMetadata);
1924
1924
  return config;
1925
1925
  }
1926
- function validateAdapterConfig(untrustedConfig, configPropertyNames) {
1926
+ function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
1927
1927
  if (!untrustedIsObject(untrustedConfig)) {
1928
1928
  return null;
1929
1929
  }
1930
1930
  if (process.env.NODE_ENV !== 'production') {
1931
1931
  validateConfig(untrustedConfig, configPropertyNames);
1932
1932
  }
1933
- const config = typeCheckConfig(untrustedConfig);
1933
+ const config = typeCheckConfig$1(untrustedConfig);
1934
1934
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
1935
1935
  return null;
1936
1936
  }
1937
1937
  return config;
1938
1938
  }
1939
- function adapterFragment(luvio, config) {
1940
- createResourceParams(config);
1941
- return select();
1939
+ function adapterFragment$1(luvio, config) {
1940
+ createResourceParams$1(config);
1941
+ return select$3();
1942
1942
  }
1943
- function onFetchResponseSuccess(luvio, config, resourceParams, response) {
1944
- const snapshot = ingestSuccess(luvio, resourceParams, response, {
1943
+ function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
1944
+ const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
1945
1945
  config,
1946
- resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
1946
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
1947
1947
  });
1948
1948
  return luvio.storeBroadcast().then(() => snapshot);
1949
1949
  }
1950
- function onFetchResponseError(luvio, config, resourceParams, response) {
1951
- const snapshot = ingestError(luvio, resourceParams, response, {
1950
+ function onFetchResponseError$1(luvio, config, resourceParams, response) {
1951
+ const snapshot = ingestError$1(luvio, resourceParams, response, {
1952
1952
  config,
1953
- resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
1953
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
1954
1954
  });
1955
1955
  return luvio.storeBroadcast().then(() => snapshot);
1956
1956
  }
1957
- function buildNetworkSnapshot(luvio, config, options) {
1958
- const resourceParams = createResourceParams(config);
1959
- const request = createResourceRequest(resourceParams);
1957
+ function buildNetworkSnapshot$1(luvio, config, options) {
1958
+ const resourceParams = createResourceParams$1(config);
1959
+ const request = createResourceRequest$1(resourceParams);
1960
1960
  return luvio.dispatchResourceRequest(request, options)
1961
1961
  .then((response) => {
1962
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
1962
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
1963
1963
  const cache = new StoreKeyMap();
1964
- getResponseCacheKeys(cache, luvio, resourceParams, response.body);
1964
+ getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
1965
1965
  return cache;
1966
1966
  });
1967
1967
  }, (response) => {
1968
- return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
1968
+ return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
1969
1969
  });
1970
1970
  }
1971
- function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
1972
- return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
1971
+ function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
1972
+ return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
1973
1973
  }
1974
- function buildCachedSnapshotCachePolicy(context, storeLookup) {
1974
+ function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
1975
1975
  const { luvio, config } = context;
1976
1976
  const selector = {
1977
- recordId: keyBuilder(luvio, config),
1978
- node: adapterFragment(luvio, config),
1977
+ recordId: keyBuilder$2(luvio, config),
1978
+ node: adapterFragment$1(luvio, config),
1979
1979
  variables: {},
1980
1980
  };
1981
1981
  const cacheSnapshot = storeLookup(selector, {
1982
1982
  config,
1983
- resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
1983
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
1984
1984
  });
1985
1985
  return cacheSnapshot;
1986
1986
  }
1987
1987
  const getRecommendedPlanTemplatesAdapterFactory = (luvio) => function einsteinCopilotBot__getRecommendedPlanTemplates(untrustedConfig, requestContext) {
1988
- const config = validateAdapterConfig(untrustedConfig, getRecommendedPlanTemplates_ConfigPropertyNames);
1988
+ const config = validateAdapterConfig$1(untrustedConfig, getRecommendedPlanTemplates_ConfigPropertyNames);
1989
+ // Invalid or incomplete config
1990
+ if (config === null) {
1991
+ return null;
1992
+ }
1993
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
1994
+ buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
1995
+ };
1996
+
1997
+ const VERSION$1 = "3d8b52828ddd11f23f898b0bba8db802";
1998
+ function validate$1(obj, path = 'CopilotQuickActionRepresentation') {
1999
+ const v_error = (() => {
2000
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
2001
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
2002
+ }
2003
+ if (obj.actionApiName !== undefined) {
2004
+ const obj_actionApiName = obj.actionApiName;
2005
+ const path_actionApiName = path + '.actionApiName';
2006
+ if (typeof obj_actionApiName !== 'string') {
2007
+ return new TypeError('Expected "string" but received "' + typeof obj_actionApiName + '" (at "' + path_actionApiName + '")');
2008
+ }
2009
+ }
2010
+ if (obj.createdDate !== undefined) {
2011
+ const obj_createdDate = obj.createdDate;
2012
+ const path_createdDate = path + '.createdDate';
2013
+ if (typeof obj_createdDate !== 'string') {
2014
+ return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
2015
+ }
2016
+ }
2017
+ if (obj.description !== undefined) {
2018
+ const obj_description = obj.description;
2019
+ const path_description = path + '.description';
2020
+ if (typeof obj_description !== 'string') {
2021
+ return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
2022
+ }
2023
+ }
2024
+ if (obj.icon !== undefined) {
2025
+ const obj_icon = obj.icon;
2026
+ const path_icon = path + '.icon';
2027
+ if (typeof obj_icon !== 'string') {
2028
+ return new TypeError('Expected "string" but received "' + typeof obj_icon + '" (at "' + path_icon + '")');
2029
+ }
2030
+ }
2031
+ if (obj.intent !== undefined) {
2032
+ const obj_intent = obj.intent;
2033
+ const path_intent = path + '.intent';
2034
+ if (typeof obj_intent !== 'string') {
2035
+ return new TypeError('Expected "string" but received "' + typeof obj_intent + '" (at "' + path_intent + '")');
2036
+ }
2037
+ }
2038
+ if (obj.isGlobal !== undefined) {
2039
+ const obj_isGlobal = obj.isGlobal;
2040
+ const path_isGlobal = path + '.isGlobal';
2041
+ if (typeof obj_isGlobal !== 'boolean') {
2042
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isGlobal + '" (at "' + path_isGlobal + '")');
2043
+ }
2044
+ }
2045
+ if (obj.isStandard !== undefined) {
2046
+ const obj_isStandard = obj.isStandard;
2047
+ const path_isStandard = path + '.isStandard';
2048
+ if (typeof obj_isStandard !== 'boolean') {
2049
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isStandard + '" (at "' + path_isStandard + '")');
2050
+ }
2051
+ }
2052
+ if (obj.label !== undefined) {
2053
+ const obj_label = obj.label;
2054
+ const path_label = path + '.label';
2055
+ if (typeof obj_label !== 'string') {
2056
+ return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
2057
+ }
2058
+ }
2059
+ if (obj.lastModifiedDate !== undefined) {
2060
+ const obj_lastModifiedDate = obj.lastModifiedDate;
2061
+ const path_lastModifiedDate = path + '.lastModifiedDate';
2062
+ if (typeof obj_lastModifiedDate !== 'string') {
2063
+ return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
2064
+ }
2065
+ }
2066
+ if (obj.namespace !== undefined) {
2067
+ const obj_namespace = obj.namespace;
2068
+ const path_namespace = path + '.namespace';
2069
+ if (typeof obj_namespace !== 'string') {
2070
+ return new TypeError('Expected "string" but received "' + typeof obj_namespace + '" (at "' + path_namespace + '")');
2071
+ }
2072
+ }
2073
+ if (obj.orgAccess !== undefined) {
2074
+ const obj_orgAccess = obj.orgAccess;
2075
+ const path_orgAccess = path + '.orgAccess';
2076
+ if (typeof obj_orgAccess !== 'string') {
2077
+ return new TypeError('Expected "string" but received "' + typeof obj_orgAccess + '" (at "' + path_orgAccess + '")');
2078
+ }
2079
+ }
2080
+ if (obj.planTemplateId !== undefined) {
2081
+ const obj_planTemplateId = obj.planTemplateId;
2082
+ const path_planTemplateId = path + '.planTemplateId';
2083
+ if (typeof obj_planTemplateId !== 'string') {
2084
+ return new TypeError('Expected "string" but received "' + typeof obj_planTemplateId + '" (at "' + path_planTemplateId + '")');
2085
+ }
2086
+ }
2087
+ if (obj.planTemplateInput !== undefined) {
2088
+ const obj_planTemplateInput = obj.planTemplateInput;
2089
+ const path_planTemplateInput = path + '.planTemplateInput';
2090
+ if (typeof obj_planTemplateInput !== 'object' || ArrayIsArray(obj_planTemplateInput) || obj_planTemplateInput === null) {
2091
+ return new TypeError('Expected "object" but received "' + typeof obj_planTemplateInput + '" (at "' + path_planTemplateInput + '")');
2092
+ }
2093
+ const obj_planTemplateInput_keys = ObjectKeys(obj_planTemplateInput);
2094
+ for (let i = 0; i < obj_planTemplateInput_keys.length; i++) {
2095
+ const key = obj_planTemplateInput_keys[i];
2096
+ const obj_planTemplateInput_prop = obj_planTemplateInput[key];
2097
+ const path_planTemplateInput_prop = path_planTemplateInput + '["' + key + '"]';
2098
+ if (typeof obj_planTemplateInput_prop !== 'string') {
2099
+ return new TypeError('Expected "string" but received "' + typeof obj_planTemplateInput_prop + '" (at "' + path_planTemplateInput_prop + '")');
2100
+ }
2101
+ }
2102
+ }
2103
+ if (obj.type !== undefined) {
2104
+ const obj_type = obj.type;
2105
+ const path_type = path + '.type';
2106
+ if (typeof obj_type !== 'string') {
2107
+ return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
2108
+ }
2109
+ }
2110
+ if (obj.userUtterance !== undefined) {
2111
+ const obj_userUtterance = obj.userUtterance;
2112
+ const path_userUtterance = path + '.userUtterance';
2113
+ if (typeof obj_userUtterance !== 'string') {
2114
+ return new TypeError('Expected "string" but received "' + typeof obj_userUtterance + '" (at "' + path_userUtterance + '")');
2115
+ }
2116
+ }
2117
+ })();
2118
+ return v_error === undefined ? null : v_error;
2119
+ }
2120
+ const select$2 = function CopilotQuickActionRepresentationSelect() {
2121
+ return {
2122
+ kind: 'Fragment',
2123
+ version: VERSION$1,
2124
+ private: [],
2125
+ selections: [
2126
+ {
2127
+ name: 'actionApiName',
2128
+ kind: 'Scalar',
2129
+ required: false
2130
+ },
2131
+ {
2132
+ name: 'createdDate',
2133
+ kind: 'Scalar',
2134
+ required: false
2135
+ },
2136
+ {
2137
+ name: 'description',
2138
+ kind: 'Scalar',
2139
+ required: false
2140
+ },
2141
+ {
2142
+ name: 'icon',
2143
+ kind: 'Scalar',
2144
+ required: false
2145
+ },
2146
+ {
2147
+ name: 'intent',
2148
+ kind: 'Scalar',
2149
+ required: false
2150
+ },
2151
+ {
2152
+ name: 'isGlobal',
2153
+ kind: 'Scalar',
2154
+ required: false
2155
+ },
2156
+ {
2157
+ name: 'isStandard',
2158
+ kind: 'Scalar',
2159
+ required: false
2160
+ },
2161
+ {
2162
+ name: 'label',
2163
+ kind: 'Scalar',
2164
+ required: false
2165
+ },
2166
+ {
2167
+ name: 'lastModifiedDate',
2168
+ kind: 'Scalar',
2169
+ required: false
2170
+ },
2171
+ {
2172
+ name: 'namespace',
2173
+ kind: 'Scalar',
2174
+ required: false
2175
+ },
2176
+ {
2177
+ name: 'orgAccess',
2178
+ kind: 'Scalar',
2179
+ required: false
2180
+ },
2181
+ {
2182
+ name: 'planTemplateId',
2183
+ kind: 'Scalar',
2184
+ required: false
2185
+ },
2186
+ {
2187
+ name: 'planTemplateInput',
2188
+ kind: 'Scalar',
2189
+ map: true,
2190
+ required: false
2191
+ },
2192
+ {
2193
+ name: 'type',
2194
+ kind: 'Scalar',
2195
+ required: false
2196
+ },
2197
+ {
2198
+ name: 'userUtterance',
2199
+ kind: 'Scalar',
2200
+ required: false
2201
+ }
2202
+ ]
2203
+ };
2204
+ };
2205
+ function equals$1(existing, incoming) {
2206
+ const existing_isGlobal = existing.isGlobal;
2207
+ const incoming_isGlobal = incoming.isGlobal;
2208
+ // if at least one of these optionals is defined
2209
+ if (existing_isGlobal !== undefined || incoming_isGlobal !== undefined) {
2210
+ // if one of these is not defined we know the other is defined and therefore
2211
+ // not equal
2212
+ if (existing_isGlobal === undefined || incoming_isGlobal === undefined) {
2213
+ return false;
2214
+ }
2215
+ if (!(existing_isGlobal === incoming_isGlobal)) {
2216
+ return false;
2217
+ }
2218
+ }
2219
+ const existing_isStandard = existing.isStandard;
2220
+ const incoming_isStandard = incoming.isStandard;
2221
+ // if at least one of these optionals is defined
2222
+ if (existing_isStandard !== undefined || incoming_isStandard !== undefined) {
2223
+ // if one of these is not defined we know the other is defined and therefore
2224
+ // not equal
2225
+ if (existing_isStandard === undefined || incoming_isStandard === undefined) {
2226
+ return false;
2227
+ }
2228
+ if (!(existing_isStandard === incoming_isStandard)) {
2229
+ return false;
2230
+ }
2231
+ }
2232
+ const existing_actionApiName = existing.actionApiName;
2233
+ const incoming_actionApiName = incoming.actionApiName;
2234
+ // if at least one of these optionals is defined
2235
+ if (existing_actionApiName !== undefined || incoming_actionApiName !== undefined) {
2236
+ // if one of these is not defined we know the other is defined and therefore
2237
+ // not equal
2238
+ if (existing_actionApiName === undefined || incoming_actionApiName === undefined) {
2239
+ return false;
2240
+ }
2241
+ if (!(existing_actionApiName === incoming_actionApiName)) {
2242
+ return false;
2243
+ }
2244
+ }
2245
+ const existing_createdDate = existing.createdDate;
2246
+ const incoming_createdDate = incoming.createdDate;
2247
+ // if at least one of these optionals is defined
2248
+ if (existing_createdDate !== undefined || incoming_createdDate !== undefined) {
2249
+ // if one of these is not defined we know the other is defined and therefore
2250
+ // not equal
2251
+ if (existing_createdDate === undefined || incoming_createdDate === undefined) {
2252
+ return false;
2253
+ }
2254
+ if (!(existing_createdDate === incoming_createdDate)) {
2255
+ return false;
2256
+ }
2257
+ }
2258
+ const existing_description = existing.description;
2259
+ const incoming_description = incoming.description;
2260
+ // if at least one of these optionals is defined
2261
+ if (existing_description !== undefined || incoming_description !== undefined) {
2262
+ // if one of these is not defined we know the other is defined and therefore
2263
+ // not equal
2264
+ if (existing_description === undefined || incoming_description === undefined) {
2265
+ return false;
2266
+ }
2267
+ if (!(existing_description === incoming_description)) {
2268
+ return false;
2269
+ }
2270
+ }
2271
+ const existing_icon = existing.icon;
2272
+ const incoming_icon = incoming.icon;
2273
+ // if at least one of these optionals is defined
2274
+ if (existing_icon !== undefined || incoming_icon !== undefined) {
2275
+ // if one of these is not defined we know the other is defined and therefore
2276
+ // not equal
2277
+ if (existing_icon === undefined || incoming_icon === undefined) {
2278
+ return false;
2279
+ }
2280
+ if (!(existing_icon === incoming_icon)) {
2281
+ return false;
2282
+ }
2283
+ }
2284
+ const existing_intent = existing.intent;
2285
+ const incoming_intent = incoming.intent;
2286
+ // if at least one of these optionals is defined
2287
+ if (existing_intent !== undefined || incoming_intent !== undefined) {
2288
+ // if one of these is not defined we know the other is defined and therefore
2289
+ // not equal
2290
+ if (existing_intent === undefined || incoming_intent === undefined) {
2291
+ return false;
2292
+ }
2293
+ if (!(existing_intent === incoming_intent)) {
2294
+ return false;
2295
+ }
2296
+ }
2297
+ const existing_label = existing.label;
2298
+ const incoming_label = incoming.label;
2299
+ // if at least one of these optionals is defined
2300
+ if (existing_label !== undefined || incoming_label !== undefined) {
2301
+ // if one of these is not defined we know the other is defined and therefore
2302
+ // not equal
2303
+ if (existing_label === undefined || incoming_label === undefined) {
2304
+ return false;
2305
+ }
2306
+ if (!(existing_label === incoming_label)) {
2307
+ return false;
2308
+ }
2309
+ }
2310
+ const existing_lastModifiedDate = existing.lastModifiedDate;
2311
+ const incoming_lastModifiedDate = incoming.lastModifiedDate;
2312
+ // if at least one of these optionals is defined
2313
+ if (existing_lastModifiedDate !== undefined || incoming_lastModifiedDate !== undefined) {
2314
+ // if one of these is not defined we know the other is defined and therefore
2315
+ // not equal
2316
+ if (existing_lastModifiedDate === undefined || incoming_lastModifiedDate === undefined) {
2317
+ return false;
2318
+ }
2319
+ if (!(existing_lastModifiedDate === incoming_lastModifiedDate)) {
2320
+ return false;
2321
+ }
2322
+ }
2323
+ const existing_namespace = existing.namespace;
2324
+ const incoming_namespace = incoming.namespace;
2325
+ // if at least one of these optionals is defined
2326
+ if (existing_namespace !== undefined || incoming_namespace !== undefined) {
2327
+ // if one of these is not defined we know the other is defined and therefore
2328
+ // not equal
2329
+ if (existing_namespace === undefined || incoming_namespace === undefined) {
2330
+ return false;
2331
+ }
2332
+ if (!(existing_namespace === incoming_namespace)) {
2333
+ return false;
2334
+ }
2335
+ }
2336
+ const existing_orgAccess = existing.orgAccess;
2337
+ const incoming_orgAccess = incoming.orgAccess;
2338
+ // if at least one of these optionals is defined
2339
+ if (existing_orgAccess !== undefined || incoming_orgAccess !== undefined) {
2340
+ // if one of these is not defined we know the other is defined and therefore
2341
+ // not equal
2342
+ if (existing_orgAccess === undefined || incoming_orgAccess === undefined) {
2343
+ return false;
2344
+ }
2345
+ if (!(existing_orgAccess === incoming_orgAccess)) {
2346
+ return false;
2347
+ }
2348
+ }
2349
+ const existing_planTemplateId = existing.planTemplateId;
2350
+ const incoming_planTemplateId = incoming.planTemplateId;
2351
+ // if at least one of these optionals is defined
2352
+ if (existing_planTemplateId !== undefined || incoming_planTemplateId !== undefined) {
2353
+ // if one of these is not defined we know the other is defined and therefore
2354
+ // not equal
2355
+ if (existing_planTemplateId === undefined || incoming_planTemplateId === undefined) {
2356
+ return false;
2357
+ }
2358
+ if (!(existing_planTemplateId === incoming_planTemplateId)) {
2359
+ return false;
2360
+ }
2361
+ }
2362
+ const existing_type = existing.type;
2363
+ const incoming_type = incoming.type;
2364
+ // if at least one of these optionals is defined
2365
+ if (existing_type !== undefined || incoming_type !== undefined) {
2366
+ // if one of these is not defined we know the other is defined and therefore
2367
+ // not equal
2368
+ if (existing_type === undefined || incoming_type === undefined) {
2369
+ return false;
2370
+ }
2371
+ if (!(existing_type === incoming_type)) {
2372
+ return false;
2373
+ }
2374
+ }
2375
+ const existing_userUtterance = existing.userUtterance;
2376
+ const incoming_userUtterance = incoming.userUtterance;
2377
+ // if at least one of these optionals is defined
2378
+ if (existing_userUtterance !== undefined || incoming_userUtterance !== undefined) {
2379
+ // if one of these is not defined we know the other is defined and therefore
2380
+ // not equal
2381
+ if (existing_userUtterance === undefined || incoming_userUtterance === undefined) {
2382
+ return false;
2383
+ }
2384
+ if (!(existing_userUtterance === incoming_userUtterance)) {
2385
+ return false;
2386
+ }
2387
+ }
2388
+ const existing_planTemplateInput = existing.planTemplateInput;
2389
+ const incoming_planTemplateInput = incoming.planTemplateInput;
2390
+ // if at least one of these optionals is defined
2391
+ if (existing_planTemplateInput !== undefined || incoming_planTemplateInput !== undefined) {
2392
+ // if one of these is not defined we know the other is defined and therefore
2393
+ // not equal
2394
+ if (existing_planTemplateInput === undefined || incoming_planTemplateInput === undefined) {
2395
+ return false;
2396
+ }
2397
+ const equals_planTemplateInput_props = equalsObject(existing_planTemplateInput, incoming_planTemplateInput, (existing_planTemplateInput_prop, incoming_planTemplateInput_prop) => {
2398
+ if (!(existing_planTemplateInput_prop === incoming_planTemplateInput_prop)) {
2399
+ return false;
2400
+ }
2401
+ });
2402
+ if (equals_planTemplateInput_props === false) {
2403
+ return false;
2404
+ }
2405
+ }
2406
+ return true;
2407
+ }
2408
+
2409
+ const TTL = 900000;
2410
+ const VERSION = "122e61b0db6dc38d244a87570efc5522";
2411
+ function validate(obj, path = 'RecommendedActionsRepresentation') {
2412
+ const v_error = (() => {
2413
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
2414
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
2415
+ }
2416
+ const obj_copilotQuickActions = obj.copilotQuickActions;
2417
+ const path_copilotQuickActions = path + '.copilotQuickActions';
2418
+ if (!ArrayIsArray(obj_copilotQuickActions)) {
2419
+ return new TypeError('Expected "array" but received "' + typeof obj_copilotQuickActions + '" (at "' + path_copilotQuickActions + '")');
2420
+ }
2421
+ for (let i = 0; i < obj_copilotQuickActions.length; i++) {
2422
+ const obj_copilotQuickActions_item = obj_copilotQuickActions[i];
2423
+ const path_copilotQuickActions_item = path_copilotQuickActions + '[' + i + ']';
2424
+ const referencepath_copilotQuickActions_itemValidationError = validate$1(obj_copilotQuickActions_item, path_copilotQuickActions_item);
2425
+ if (referencepath_copilotQuickActions_itemValidationError !== null) {
2426
+ let message = 'Object doesn\'t match CopilotQuickActionRepresentation (at "' + path_copilotQuickActions_item + '")\n';
2427
+ message += referencepath_copilotQuickActions_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
2428
+ return new TypeError(message);
2429
+ }
2430
+ }
2431
+ if (obj.errorMessage !== undefined) {
2432
+ const obj_errorMessage = obj.errorMessage;
2433
+ const path_errorMessage = path + '.errorMessage';
2434
+ if (typeof obj_errorMessage !== 'string') {
2435
+ return new TypeError('Expected "string" but received "' + typeof obj_errorMessage + '" (at "' + path_errorMessage + '")');
2436
+ }
2437
+ }
2438
+ const obj_isSuccess = obj.isSuccess;
2439
+ const path_isSuccess = path + '.isSuccess';
2440
+ if (typeof obj_isSuccess !== 'boolean') {
2441
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isSuccess + '" (at "' + path_isSuccess + '")');
2442
+ }
2443
+ })();
2444
+ return v_error === undefined ? null : v_error;
2445
+ }
2446
+ const RepresentationType = 'RecommendedActionsRepresentation';
2447
+ function normalize(input, existing, path, luvio, store, timestamp) {
2448
+ return input;
2449
+ }
2450
+ const select$1 = function RecommendedActionsRepresentationSelect() {
2451
+ const { selections: CopilotQuickActionRepresentation__selections, opaque: CopilotQuickActionRepresentation__opaque, } = select$2();
2452
+ return {
2453
+ kind: 'Fragment',
2454
+ version: VERSION,
2455
+ private: [],
2456
+ selections: [
2457
+ {
2458
+ name: 'copilotQuickActions',
2459
+ kind: 'Object',
2460
+ plural: true,
2461
+ selections: CopilotQuickActionRepresentation__selections
2462
+ },
2463
+ {
2464
+ name: 'errorMessage',
2465
+ kind: 'Scalar',
2466
+ required: false
2467
+ },
2468
+ {
2469
+ name: 'isSuccess',
2470
+ kind: 'Scalar'
2471
+ }
2472
+ ]
2473
+ };
2474
+ };
2475
+ function equals(existing, incoming) {
2476
+ const existing_isSuccess = existing.isSuccess;
2477
+ const incoming_isSuccess = incoming.isSuccess;
2478
+ if (!(existing_isSuccess === incoming_isSuccess)) {
2479
+ return false;
2480
+ }
2481
+ const existing_errorMessage = existing.errorMessage;
2482
+ const incoming_errorMessage = incoming.errorMessage;
2483
+ // if at least one of these optionals is defined
2484
+ if (existing_errorMessage !== undefined || incoming_errorMessage !== undefined) {
2485
+ // if one of these is not defined we know the other is defined and therefore
2486
+ // not equal
2487
+ if (existing_errorMessage === undefined || incoming_errorMessage === undefined) {
2488
+ return false;
2489
+ }
2490
+ if (!(existing_errorMessage === incoming_errorMessage)) {
2491
+ return false;
2492
+ }
2493
+ }
2494
+ const existing_copilotQuickActions = existing.copilotQuickActions;
2495
+ const incoming_copilotQuickActions = incoming.copilotQuickActions;
2496
+ const equals_copilotQuickActions_items = equalsArray(existing_copilotQuickActions, incoming_copilotQuickActions, (existing_copilotQuickActions_item, incoming_copilotQuickActions_item) => {
2497
+ if (!(equals$1(existing_copilotQuickActions_item, incoming_copilotQuickActions_item))) {
2498
+ return false;
2499
+ }
2500
+ });
2501
+ if (equals_copilotQuickActions_items === false) {
2502
+ return false;
2503
+ }
2504
+ return true;
2505
+ }
2506
+ const ingest = function RecommendedActionsRepresentationIngest(input, path, luvio, store, timestamp) {
2507
+ if (process.env.NODE_ENV !== 'production') {
2508
+ const validateError = validate(input);
2509
+ if (validateError !== null) {
2510
+ throw validateError;
2511
+ }
2512
+ }
2513
+ const key = path.fullPath;
2514
+ const ttlToUse = TTL;
2515
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "einstein-copilot-bot", VERSION, RepresentationType, equals);
2516
+ return createLink(key);
2517
+ };
2518
+ function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
2519
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
2520
+ const rootKey = fullPathFactory();
2521
+ rootKeySet.set(rootKey, {
2522
+ namespace: keyPrefix,
2523
+ representationName: RepresentationType,
2524
+ mergeable: false
2525
+ });
2526
+ }
2527
+
2528
+ function select(luvio, params) {
2529
+ return select$1();
2530
+ }
2531
+ function keyBuilder$1(luvio, params) {
2532
+ 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 + ')';
2533
+ }
2534
+ function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
2535
+ getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
2536
+ }
2537
+ function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
2538
+ const { body } = response;
2539
+ const key = keyBuilder$1(luvio, resourceParams);
2540
+ luvio.storeIngest(key, ingest, body);
2541
+ const snapshot = luvio.storeLookup({
2542
+ recordId: key,
2543
+ node: select(),
2544
+ variables: {},
2545
+ }, snapshotRefresh);
2546
+ if (process.env.NODE_ENV !== 'production') {
2547
+ if (snapshot.state !== 'Fulfilled') {
2548
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
2549
+ }
2550
+ }
2551
+ deepFreeze(snapshot.data);
2552
+ return snapshot;
2553
+ }
2554
+ function ingestError(luvio, params, error, snapshotRefresh) {
2555
+ const key = keyBuilder$1(luvio, params);
2556
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
2557
+ const storeMetadataParams = {
2558
+ ttl: TTL,
2559
+ namespace: keyPrefix,
2560
+ version: VERSION,
2561
+ representationName: RepresentationType
2562
+ };
2563
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
2564
+ return errorSnapshot;
2565
+ }
2566
+ function createResourceRequest(config) {
2567
+ const headers = {};
2568
+ return {
2569
+ baseUri: '/services/data/v60.0',
2570
+ basePath: '/connect/recommended-actions',
2571
+ method: 'get',
2572
+ body: null,
2573
+ urlParams: {},
2574
+ queryParams: config.queryParams,
2575
+ headers,
2576
+ priority: 'normal',
2577
+ };
2578
+ }
2579
+
2580
+ const adapterName = 'getRecommendedActions';
2581
+ const getRecommendedActions_ConfigPropertyMetadata = [
2582
+ generateParamConfigMetadata('pageName', false, 1 /* QueryParameter */, 0 /* String */),
2583
+ generateParamConfigMetadata('pageType', false, 1 /* QueryParameter */, 0 /* String */),
2584
+ generateParamConfigMetadata('actionName', false, 1 /* QueryParameter */, 0 /* String */),
2585
+ generateParamConfigMetadata('objectApiName', false, 1 /* QueryParameter */, 0 /* String */),
2586
+ generateParamConfigMetadata('customApplicationName', false, 1 /* QueryParameter */, 0 /* String */),
2587
+ generateParamConfigMetadata('sessionId', false, 1 /* QueryParameter */, 0 /* String */),
2588
+ generateParamConfigMetadata('formFactor', false, 1 /* QueryParameter */, 0 /* String */),
2589
+ ];
2590
+ const getRecommendedActions_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getRecommendedActions_ConfigPropertyMetadata);
2591
+ const createResourceParams = /*#__PURE__*/ createResourceParams$4(getRecommendedActions_ConfigPropertyMetadata);
2592
+ function keyBuilder(luvio, config) {
2593
+ const resourceParams = createResourceParams(config);
2594
+ return keyBuilder$1(luvio, resourceParams);
2595
+ }
2596
+ function typeCheckConfig(untrustedConfig) {
2597
+ const config = {};
2598
+ typeCheckConfig$4(untrustedConfig, config, getRecommendedActions_ConfigPropertyMetadata);
2599
+ return config;
2600
+ }
2601
+ function validateAdapterConfig(untrustedConfig, configPropertyNames) {
2602
+ if (!untrustedIsObject(untrustedConfig)) {
2603
+ return null;
2604
+ }
2605
+ if (process.env.NODE_ENV !== 'production') {
2606
+ validateConfig(untrustedConfig, configPropertyNames);
2607
+ }
2608
+ const config = typeCheckConfig(untrustedConfig);
2609
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
2610
+ return null;
2611
+ }
2612
+ return config;
2613
+ }
2614
+ function adapterFragment(luvio, config) {
2615
+ createResourceParams(config);
2616
+ return select();
2617
+ }
2618
+ function onFetchResponseSuccess(luvio, config, resourceParams, response) {
2619
+ const snapshot = ingestSuccess(luvio, resourceParams, response, {
2620
+ config,
2621
+ resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
2622
+ });
2623
+ return luvio.storeBroadcast().then(() => snapshot);
2624
+ }
2625
+ function onFetchResponseError(luvio, config, resourceParams, response) {
2626
+ const snapshot = ingestError(luvio, resourceParams, response, {
2627
+ config,
2628
+ resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
2629
+ });
2630
+ return luvio.storeBroadcast().then(() => snapshot);
2631
+ }
2632
+ function buildNetworkSnapshot(luvio, config, options) {
2633
+ const resourceParams = createResourceParams(config);
2634
+ const request = createResourceRequest(resourceParams);
2635
+ return luvio.dispatchResourceRequest(request, options)
2636
+ .then((response) => {
2637
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
2638
+ const cache = new StoreKeyMap();
2639
+ getResponseCacheKeys(cache, luvio, resourceParams, response.body);
2640
+ return cache;
2641
+ });
2642
+ }, (response) => {
2643
+ return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
2644
+ });
2645
+ }
2646
+ function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
2647
+ return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
2648
+ }
2649
+ function buildCachedSnapshotCachePolicy(context, storeLookup) {
2650
+ const { luvio, config } = context;
2651
+ const selector = {
2652
+ recordId: keyBuilder(luvio, config),
2653
+ node: adapterFragment(luvio, config),
2654
+ variables: {},
2655
+ };
2656
+ const cacheSnapshot = storeLookup(selector, {
2657
+ config,
2658
+ resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
2659
+ });
2660
+ return cacheSnapshot;
2661
+ }
2662
+ const getRecommendedActionsAdapterFactory = (luvio) => function einsteinCopilotBot__getRecommendedActions(untrustedConfig, requestContext) {
2663
+ const config = validateAdapterConfig(untrustedConfig, getRecommendedActions_ConfigPropertyNames);
1989
2664
  // Invalid or incomplete config
1990
2665
  if (config === null) {
1991
2666
  return null;
@@ -1994,4 +2669,4 @@ const getRecommendedPlanTemplatesAdapterFactory = (luvio) => function einsteinCo
1994
2669
  buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
1995
2670
  };
1996
2671
 
1997
- export { getBotIdAdapterFactory, getRecommendedPlanTemplatesAdapterFactory, sendMessageAdapterFactory };
2672
+ export { getBotIdAdapterFactory, getRecommendedActionsAdapterFactory, getRecommendedPlanTemplatesAdapterFactory, sendMessageAdapterFactory };