@salesforce/lds-adapters-sales-eci 1.280.0 → 1.282.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/sfdc/index.js CHANGED
@@ -14,7 +14,7 @@
14
14
  /* proxy-compat-disable */
15
15
  import { createInstrumentedAdapter, createLDSAdapter, createWireAdapterConstructor, createImperativeAdapter } from 'force/ldsBindings';
16
16
  import { withDefaultLuvio } from 'force/ldsEngine';
17
- import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$3, typeCheckConfig as typeCheckConfig$3, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$2 } from 'force/luvioEngine';
17
+ import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$4, typeCheckConfig as typeCheckConfig$4, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$3 } from 'force/luvioEngine';
18
18
 
19
19
  const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
20
20
  const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
@@ -121,9 +121,9 @@ function createLink(ref) {
121
121
  };
122
122
  }
123
123
 
124
- const TTL$2 = 60000;
125
- const VERSION$2 = "10bf968dbd562928dfa701c7f6a854b2";
126
- function validate$2(obj, path = 'ConversationSummaryRepresentation') {
124
+ const TTL$3 = 60000;
125
+ const VERSION$4 = "10bf968dbd562928dfa701c7f6a854b2";
126
+ function validate$4(obj, path = 'ConversationSummaryRepresentation') {
127
127
  const v_error = (() => {
128
128
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
129
129
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -224,23 +224,23 @@ function validate$2(obj, path = 'ConversationSummaryRepresentation') {
224
224
  })();
225
225
  return v_error === undefined ? null : v_error;
226
226
  }
227
- const RepresentationType$2 = 'ConversationSummaryRepresentation';
228
- function keyBuilder$5(luvio, config) {
229
- return keyPrefix + '::' + RepresentationType$2 + ':' + config.conversation_sumamry_id;
227
+ const RepresentationType$3 = 'ConversationSummaryRepresentation';
228
+ function keyBuilder$8(luvio, config) {
229
+ return keyPrefix + '::' + RepresentationType$3 + ':' + config.conversation_sumamry_id;
230
230
  }
231
- function keyBuilderFromType$1(luvio, object) {
231
+ function keyBuilderFromType$2(luvio, object) {
232
232
  const keyParams = {
233
233
  conversation_sumamry_id: object.id
234
234
  };
235
- return keyBuilder$5(luvio, keyParams);
235
+ return keyBuilder$8(luvio, keyParams);
236
236
  }
237
- function normalize$2(input, existing, path, luvio, store, timestamp) {
237
+ function normalize$3(input, existing, path, luvio, store, timestamp) {
238
238
  return input;
239
239
  }
240
- const select$5 = function ConversationSummaryRepresentationSelect() {
240
+ const select$8 = function ConversationSummaryRepresentationSelect() {
241
241
  return {
242
242
  kind: 'Fragment',
243
- version: VERSION$2,
243
+ version: VERSION$4,
244
244
  private: [],
245
245
  selections: [
246
246
  {
@@ -270,7 +270,7 @@ const select$5 = function ConversationSummaryRepresentationSelect() {
270
270
  ]
271
271
  };
272
272
  };
273
- function equals$2(existing, incoming) {
273
+ function equals$4(existing, incoming) {
274
274
  const existing_conversationRecordId = existing.conversationRecordId;
275
275
  const incoming_conversationRecordId = incoming.conversationRecordId;
276
276
  if (!(existing_conversationRecordId === incoming_conversationRecordId)) {
@@ -303,7 +303,307 @@ function equals$2(existing, incoming) {
303
303
  }
304
304
  return true;
305
305
  }
306
- const ingest$2 = function ConversationSummaryRepresentationIngest(input, path, luvio, store, timestamp) {
306
+ const ingest$3 = function ConversationSummaryRepresentationIngest(input, path, luvio, store, timestamp) {
307
+ if (process.env.NODE_ENV !== 'production') {
308
+ const validateError = validate$4(input);
309
+ if (validateError !== null) {
310
+ throw validateError;
311
+ }
312
+ }
313
+ const key = keyBuilderFromType$2(luvio, input);
314
+ const ttlToUse = TTL$3;
315
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "eci", VERSION$4, RepresentationType$3, equals$4);
316
+ return createLink(key);
317
+ };
318
+ function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
319
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
320
+ const rootKey = keyBuilderFromType$2(luvio, input);
321
+ rootKeySet.set(rootKey, {
322
+ namespace: keyPrefix,
323
+ representationName: RepresentationType$3,
324
+ mergeable: false
325
+ });
326
+ }
327
+
328
+ function select$7(luvio, params) {
329
+ return select$8();
330
+ }
331
+ function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
332
+ getTypeCacheKeys$3(storeKeyMap, luvio, response);
333
+ }
334
+ function ingestSuccess$3(luvio, resourceParams, response) {
335
+ const { body } = response;
336
+ const key = keyBuilderFromType$2(luvio, body);
337
+ luvio.storeIngest(key, ingest$3, body);
338
+ const snapshot = luvio.storeLookup({
339
+ recordId: key,
340
+ node: select$7(),
341
+ variables: {},
342
+ });
343
+ if (process.env.NODE_ENV !== 'production') {
344
+ if (snapshot.state !== 'Fulfilled') {
345
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
346
+ }
347
+ }
348
+ deepFreeze(snapshot.data);
349
+ return snapshot;
350
+ }
351
+ function createResourceRequest$3(config) {
352
+ const headers = {};
353
+ return {
354
+ baseUri: '/services/data/v61.0',
355
+ basePath: '/conversation/summary/ai/generate/' + config.urlParams.conversationId + '',
356
+ method: 'post',
357
+ body: null,
358
+ urlParams: config.urlParams,
359
+ queryParams: {},
360
+ headers,
361
+ priority: 'normal',
362
+ };
363
+ }
364
+
365
+ const adapterName$3 = 'generateConversationSummary';
366
+ const generateConversationSummary_ConfigPropertyMetadata = [
367
+ generateParamConfigMetadata('conversationId', true, 0 /* UrlParameter */, 0 /* String */),
368
+ ];
369
+ const generateConversationSummary_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, generateConversationSummary_ConfigPropertyMetadata);
370
+ const createResourceParams$3 = /*#__PURE__*/ createResourceParams$4(generateConversationSummary_ConfigPropertyMetadata);
371
+ function typeCheckConfig$3(untrustedConfig) {
372
+ const config = {};
373
+ typeCheckConfig$4(untrustedConfig, config, generateConversationSummary_ConfigPropertyMetadata);
374
+ return config;
375
+ }
376
+ function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
377
+ if (!untrustedIsObject(untrustedConfig)) {
378
+ return null;
379
+ }
380
+ if (process.env.NODE_ENV !== 'production') {
381
+ validateConfig(untrustedConfig, configPropertyNames);
382
+ }
383
+ const config = typeCheckConfig$3(untrustedConfig);
384
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
385
+ return null;
386
+ }
387
+ return config;
388
+ }
389
+ function buildNetworkSnapshot$3(luvio, config, options) {
390
+ const resourceParams = createResourceParams$3(config);
391
+ const request = createResourceRequest$3(resourceParams);
392
+ return luvio.dispatchResourceRequest(request, options)
393
+ .then((response) => {
394
+ return luvio.handleSuccessResponse(() => {
395
+ const snapshot = ingestSuccess$3(luvio, resourceParams, response);
396
+ return luvio.storeBroadcast().then(() => snapshot);
397
+ }, () => {
398
+ const cache = new StoreKeyMap();
399
+ getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
400
+ return cache;
401
+ });
402
+ }, (response) => {
403
+ deepFreeze(response);
404
+ throw response;
405
+ });
406
+ }
407
+ const generateConversationSummaryAdapterFactory = (luvio) => {
408
+ return function generateConversationSummary(untrustedConfig) {
409
+ const config = validateAdapterConfig$3(untrustedConfig, generateConversationSummary_ConfigPropertyNames);
410
+ // Invalid or incomplete config
411
+ if (config === null) {
412
+ throw new Error('Invalid config for "generateConversationSummary"');
413
+ }
414
+ return buildNetworkSnapshot$3(luvio, config);
415
+ };
416
+ };
417
+
418
+ const VERSION$3 = "c614c7bd04cb26f6e931c85a63d52c55";
419
+ function validate$3(obj, path = 'ConversationGenerativeInsightRepresentation') {
420
+ const v_error = (() => {
421
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
422
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
423
+ }
424
+ const obj_generatedText = obj.generatedText;
425
+ const path_generatedText = path + '.generatedText';
426
+ if (typeof obj_generatedText !== 'string') {
427
+ return new TypeError('Expected "string" but received "' + typeof obj_generatedText + '" (at "' + path_generatedText + '")');
428
+ }
429
+ const obj_insightName = obj.insightName;
430
+ const path_insightName = path + '.insightName';
431
+ if (typeof obj_insightName !== 'string') {
432
+ return new TypeError('Expected "string" but received "' + typeof obj_insightName + '" (at "' + path_insightName + '")');
433
+ }
434
+ const obj_insightTypeId = obj.insightTypeId;
435
+ const path_insightTypeId = path + '.insightTypeId';
436
+ if (typeof obj_insightTypeId !== 'string') {
437
+ return new TypeError('Expected "string" but received "' + typeof obj_insightTypeId + '" (at "' + path_insightTypeId + '")');
438
+ }
439
+ const obj_modifiedBy = obj.modifiedBy;
440
+ const path_modifiedBy = path + '.modifiedBy';
441
+ if (typeof obj_modifiedBy !== 'string') {
442
+ return new TypeError('Expected "string" but received "' + typeof obj_modifiedBy + '" (at "' + path_modifiedBy + '")');
443
+ }
444
+ })();
445
+ return v_error === undefined ? null : v_error;
446
+ }
447
+ const select$6 = function ConversationGenerativeInsightRepresentationSelect() {
448
+ return {
449
+ kind: 'Fragment',
450
+ version: VERSION$3,
451
+ private: [],
452
+ selections: [
453
+ {
454
+ name: 'generatedText',
455
+ kind: 'Scalar'
456
+ },
457
+ {
458
+ name: 'insightName',
459
+ kind: 'Scalar'
460
+ },
461
+ {
462
+ name: 'insightTypeId',
463
+ kind: 'Scalar'
464
+ },
465
+ {
466
+ name: 'modifiedBy',
467
+ kind: 'Scalar'
468
+ }
469
+ ]
470
+ };
471
+ };
472
+ function equals$3(existing, incoming) {
473
+ const existing_generatedText = existing.generatedText;
474
+ const incoming_generatedText = incoming.generatedText;
475
+ if (!(existing_generatedText === incoming_generatedText)) {
476
+ return false;
477
+ }
478
+ const existing_insightName = existing.insightName;
479
+ const incoming_insightName = incoming.insightName;
480
+ if (!(existing_insightName === incoming_insightName)) {
481
+ return false;
482
+ }
483
+ const existing_insightTypeId = existing.insightTypeId;
484
+ const incoming_insightTypeId = incoming.insightTypeId;
485
+ if (!(existing_insightTypeId === incoming_insightTypeId)) {
486
+ return false;
487
+ }
488
+ const existing_modifiedBy = existing.modifiedBy;
489
+ const incoming_modifiedBy = incoming.modifiedBy;
490
+ if (!(existing_modifiedBy === incoming_modifiedBy)) {
491
+ return false;
492
+ }
493
+ return true;
494
+ }
495
+
496
+ const TTL$2 = 60000;
497
+ const VERSION$2 = "1ddcdcaada7f739acdff16f101b69288";
498
+ function validate$2(obj, path = 'ConversationGenInsightListRepresentation') {
499
+ const v_error = (() => {
500
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
501
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
502
+ }
503
+ const obj_error = obj.error;
504
+ const path_error = path + '.error';
505
+ if (typeof obj_error !== 'object' || ArrayIsArray(obj_error) || obj_error === null) {
506
+ return new TypeError('Expected "object" but received "' + typeof obj_error + '" (at "' + path_error + '")');
507
+ }
508
+ const obj_error_keys = ObjectKeys(obj_error);
509
+ for (let i = 0; i < obj_error_keys.length; i++) {
510
+ const key = obj_error_keys[i];
511
+ const obj_error_prop = obj_error[key];
512
+ const path_error_prop = path_error + '["' + key + '"]';
513
+ if (typeof obj_error_prop !== 'string') {
514
+ return new TypeError('Expected "string" but received "' + typeof obj_error_prop + '" (at "' + path_error_prop + '")');
515
+ }
516
+ }
517
+ const obj_generativeInsights = obj.generativeInsights;
518
+ const path_generativeInsights = path + '.generativeInsights';
519
+ if (!ArrayIsArray(obj_generativeInsights)) {
520
+ return new TypeError('Expected "array" but received "' + typeof obj_generativeInsights + '" (at "' + path_generativeInsights + '")');
521
+ }
522
+ for (let i = 0; i < obj_generativeInsights.length; i++) {
523
+ const obj_generativeInsights_item = obj_generativeInsights[i];
524
+ const path_generativeInsights_item = path_generativeInsights + '[' + i + ']';
525
+ const referencepath_generativeInsights_itemValidationError = validate$3(obj_generativeInsights_item, path_generativeInsights_item);
526
+ if (referencepath_generativeInsights_itemValidationError !== null) {
527
+ let message = 'Object doesn\'t match ConversationGenerativeInsightRepresentation (at "' + path_generativeInsights_item + '")\n';
528
+ message += referencepath_generativeInsights_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
529
+ return new TypeError(message);
530
+ }
531
+ }
532
+ const obj_recordId = obj.recordId;
533
+ const path_recordId = path + '.recordId';
534
+ if (typeof obj_recordId !== 'string') {
535
+ return new TypeError('Expected "string" but received "' + typeof obj_recordId + '" (at "' + path_recordId + '")');
536
+ }
537
+ })();
538
+ return v_error === undefined ? null : v_error;
539
+ }
540
+ const RepresentationType$2 = 'ConversationGenInsightListRepresentation';
541
+ function keyBuilder$7(luvio, config) {
542
+ return keyPrefix + '::' + RepresentationType$2 + ':' + config.id;
543
+ }
544
+ function keyBuilderFromType$1(luvio, object) {
545
+ const keyParams = {
546
+ id: object.recordId
547
+ };
548
+ return keyBuilder$7(luvio, keyParams);
549
+ }
550
+ function normalize$2(input, existing, path, luvio, store, timestamp) {
551
+ return input;
552
+ }
553
+ const select$5 = function ConversationGenInsightListRepresentationSelect() {
554
+ const { selections: ConversationGenerativeInsightRepresentation__selections, opaque: ConversationGenerativeInsightRepresentation__opaque, } = select$6();
555
+ return {
556
+ kind: 'Fragment',
557
+ version: VERSION$2,
558
+ private: [],
559
+ selections: [
560
+ {
561
+ name: 'error',
562
+ kind: 'Scalar',
563
+ map: true
564
+ },
565
+ {
566
+ name: 'generativeInsights',
567
+ kind: 'Object',
568
+ plural: true,
569
+ selections: ConversationGenerativeInsightRepresentation__selections
570
+ },
571
+ {
572
+ name: 'recordId',
573
+ kind: 'Scalar'
574
+ }
575
+ ]
576
+ };
577
+ };
578
+ function equals$2(existing, incoming) {
579
+ const existing_recordId = existing.recordId;
580
+ const incoming_recordId = incoming.recordId;
581
+ if (!(existing_recordId === incoming_recordId)) {
582
+ return false;
583
+ }
584
+ const existing_error = existing.error;
585
+ const incoming_error = incoming.error;
586
+ const equals_error_props = equalsObject(existing_error, incoming_error, (existing_error_prop, incoming_error_prop) => {
587
+ if (!(existing_error_prop === incoming_error_prop)) {
588
+ return false;
589
+ }
590
+ });
591
+ if (equals_error_props === false) {
592
+ return false;
593
+ }
594
+ const existing_generativeInsights = existing.generativeInsights;
595
+ const incoming_generativeInsights = incoming.generativeInsights;
596
+ const equals_generativeInsights_items = equalsArray(existing_generativeInsights, incoming_generativeInsights, (existing_generativeInsights_item, incoming_generativeInsights_item) => {
597
+ if (!(equals$3(existing_generativeInsights_item, incoming_generativeInsights_item))) {
598
+ return false;
599
+ }
600
+ });
601
+ if (equals_generativeInsights_items === false) {
602
+ return false;
603
+ }
604
+ return true;
605
+ }
606
+ const ingest$2 = function ConversationGenInsightListRepresentationIngest(input, path, luvio, store, timestamp) {
307
607
  if (process.env.NODE_ENV !== 'production') {
308
608
  const validateError = validate$2(input);
309
609
  if (validateError !== null) {
@@ -328,18 +628,23 @@ function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
328
628
  function select$4(luvio, params) {
329
629
  return select$5();
330
630
  }
631
+ function keyBuilder$6(luvio, params) {
632
+ return keyBuilder$7(luvio, {
633
+ id: params.urlParams.id
634
+ });
635
+ }
331
636
  function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
332
637
  getTypeCacheKeys$2(storeKeyMap, luvio, response);
333
638
  }
334
- function ingestSuccess$2(luvio, resourceParams, response) {
639
+ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
335
640
  const { body } = response;
336
- const key = keyBuilderFromType$1(luvio, body);
641
+ const key = keyBuilder$6(luvio, resourceParams);
337
642
  luvio.storeIngest(key, ingest$2, body);
338
643
  const snapshot = luvio.storeLookup({
339
644
  recordId: key,
340
645
  node: select$4(),
341
646
  variables: {},
342
- });
647
+ }, snapshotRefresh);
343
648
  if (process.env.NODE_ENV !== 'production') {
344
649
  if (snapshot.state !== 'Fulfilled') {
345
650
  throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
@@ -348,12 +653,24 @@ function ingestSuccess$2(luvio, resourceParams, response) {
348
653
  deepFreeze(snapshot.data);
349
654
  return snapshot;
350
655
  }
656
+ function ingestError$2(luvio, params, error, snapshotRefresh) {
657
+ const key = keyBuilder$6(luvio, params);
658
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
659
+ const storeMetadataParams = {
660
+ ttl: TTL$2,
661
+ namespace: keyPrefix,
662
+ version: VERSION$2,
663
+ representationName: RepresentationType$2
664
+ };
665
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
666
+ return errorSnapshot;
667
+ }
351
668
  function createResourceRequest$2(config) {
352
669
  const headers = {};
353
670
  return {
354
671
  baseUri: '/services/data/v61.0',
355
- basePath: '/conversation/summary/ai/generate/' + config.urlParams.conversationId + '',
356
- method: 'post',
672
+ basePath: '/conversation/generative/insight/' + config.urlParams.id + '',
673
+ method: 'get',
357
674
  body: null,
358
675
  urlParams: config.urlParams,
359
676
  queryParams: {},
@@ -361,16 +678,27 @@ function createResourceRequest$2(config) {
361
678
  priority: 'normal',
362
679
  };
363
680
  }
681
+ function createResourceRequestFromRepresentation$1(representation) {
682
+ const config = {
683
+ urlParams: {},
684
+ };
685
+ config.urlParams.id = representation.recordId;
686
+ return createResourceRequest$2(config);
687
+ }
364
688
 
365
- const adapterName$2 = 'generateConversationSummary';
366
- const generateConversationSummary_ConfigPropertyMetadata = [
367
- generateParamConfigMetadata('conversationId', true, 0 /* UrlParameter */, 0 /* String */),
689
+ const adapterName$2 = 'getConversationGenerativeInsight';
690
+ const getConversationGenerativeInsight_ConfigPropertyMetadata = [
691
+ generateParamConfigMetadata('id', true, 0 /* UrlParameter */, 0 /* String */),
368
692
  ];
369
- const generateConversationSummary_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, generateConversationSummary_ConfigPropertyMetadata);
370
- const createResourceParams$2 = /*#__PURE__*/ createResourceParams$3(generateConversationSummary_ConfigPropertyMetadata);
693
+ const getConversationGenerativeInsight_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getConversationGenerativeInsight_ConfigPropertyMetadata);
694
+ const createResourceParams$2 = /*#__PURE__*/ createResourceParams$4(getConversationGenerativeInsight_ConfigPropertyMetadata);
695
+ function keyBuilder$5(luvio, config) {
696
+ const resourceParams = createResourceParams$2(config);
697
+ return keyBuilder$6(luvio, resourceParams);
698
+ }
371
699
  function typeCheckConfig$2(untrustedConfig) {
372
700
  const config = {};
373
- typeCheckConfig$3(untrustedConfig, config, generateConversationSummary_ConfigPropertyMetadata);
701
+ typeCheckConfig$4(untrustedConfig, config, getConversationGenerativeInsight_ConfigPropertyMetadata);
374
702
  return config;
375
703
  }
376
704
  function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
@@ -386,32 +714,95 @@ function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
386
714
  }
387
715
  return config;
388
716
  }
717
+ function adapterFragment$2(luvio, config) {
718
+ createResourceParams$2(config);
719
+ return select$4();
720
+ }
721
+ function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
722
+ const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
723
+ config,
724
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
725
+ });
726
+ return luvio.storeBroadcast().then(() => snapshot);
727
+ }
728
+ function onFetchResponseError$2(luvio, config, resourceParams, response) {
729
+ const snapshot = ingestError$2(luvio, resourceParams, response, {
730
+ config,
731
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
732
+ });
733
+ return luvio.storeBroadcast().then(() => snapshot);
734
+ }
389
735
  function buildNetworkSnapshot$2(luvio, config, options) {
390
736
  const resourceParams = createResourceParams$2(config);
391
737
  const request = createResourceRequest$2(resourceParams);
392
738
  return luvio.dispatchResourceRequest(request, options)
393
739
  .then((response) => {
394
- return luvio.handleSuccessResponse(() => {
395
- const snapshot = ingestSuccess$2(luvio, resourceParams, response);
396
- return luvio.storeBroadcast().then(() => snapshot);
397
- }, () => {
740
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
398
741
  const cache = new StoreKeyMap();
399
742
  getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
400
743
  return cache;
401
744
  });
402
745
  }, (response) => {
403
- deepFreeze(response);
404
- throw response;
746
+ return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
405
747
  });
406
748
  }
407
- const generateConversationSummaryAdapterFactory = (luvio) => {
408
- return function generateConversationSummary(untrustedConfig) {
409
- const config = validateAdapterConfig$2(untrustedConfig, generateConversationSummary_ConfigPropertyNames);
410
- // Invalid or incomplete config
411
- if (config === null) {
412
- throw new Error('Invalid config for "generateConversationSummary"');
413
- }
414
- return buildNetworkSnapshot$2(luvio, config);
749
+ function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
750
+ return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
751
+ }
752
+ function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
753
+ const { luvio, config } = context;
754
+ const selector = {
755
+ recordId: keyBuilder$5(luvio, config),
756
+ node: adapterFragment$2(luvio, config),
757
+ variables: {},
758
+ };
759
+ const cacheSnapshot = storeLookup(selector, {
760
+ config,
761
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
762
+ });
763
+ return cacheSnapshot;
764
+ }
765
+ const getConversationGenerativeInsightAdapterFactory = (luvio) => function eci__getConversationGenerativeInsight(untrustedConfig, requestContext) {
766
+ const config = validateAdapterConfig$2(untrustedConfig, getConversationGenerativeInsight_ConfigPropertyNames);
767
+ // Invalid or incomplete config
768
+ if (config === null) {
769
+ return null;
770
+ }
771
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
772
+ buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
773
+ };
774
+ const notifyChangeFactory$1 = (luvio, options) => {
775
+ return function getConversationGenerativeInsightByIdNotifyChange(configs) {
776
+ const keys = configs.map(c => keyBuilder$7(luvio, c));
777
+ luvio.getNotifyChangeStoreEntries(keys).then(entries => {
778
+ for (let i = 0, len = entries.length; i < len; i++) {
779
+ const { key, record: val } = entries[i];
780
+ const refreshRequest = createResourceRequestFromRepresentation$1(val);
781
+ luvio.dispatchResourceRequest(refreshRequest, options)
782
+ .then((response) => {
783
+ return luvio.handleSuccessResponse(() => {
784
+ const { body } = response;
785
+ luvio.storeIngest(key, ingest$2, body);
786
+ return luvio.storeBroadcast();
787
+ }, () => {
788
+ const cache = new StoreKeyMap();
789
+ getTypeCacheKeys$2(cache, luvio, response.body);
790
+ return cache;
791
+ });
792
+ }, (error) => {
793
+ return luvio.handleErrorResponse(() => {
794
+ const errorSnapshot = luvio.errorSnapshot(error);
795
+ luvio.storeIngestError(key, errorSnapshot, {
796
+ ttl: TTL$2,
797
+ namespace: keyPrefix,
798
+ version: VERSION$2,
799
+ representationName: RepresentationType$2
800
+ });
801
+ return luvio.storeBroadcast().then(() => errorSnapshot);
802
+ });
803
+ });
804
+ }
805
+ });
415
806
  };
416
807
  };
417
808
 
@@ -470,7 +861,7 @@ function normalize$1(input, existing, path, luvio, store, timestamp) {
470
861
  for (let i = 0; i < input_conversationSummaryList.length; i++) {
471
862
  const input_conversationSummaryList_item = input_conversationSummaryList[i];
472
863
  let input_conversationSummaryList_item_id = input_conversationSummaryList_id + '__' + i;
473
- input_conversationSummaryList[i] = ingest$2(input_conversationSummaryList_item, {
864
+ input_conversationSummaryList[i] = ingest$3(input_conversationSummaryList_item, {
474
865
  fullPath: input_conversationSummaryList_item_id,
475
866
  propertyName: i,
476
867
  parent: {
@@ -498,7 +889,7 @@ const select$3 = function ConversationSummaryListRepresentationSelect() {
498
889
  name: 'conversationSummaryList',
499
890
  kind: 'Link',
500
891
  plural: true,
501
- fragment: select$5()
892
+ fragment: select$8()
502
893
  },
503
894
  {
504
895
  name: 'id',
@@ -557,7 +948,7 @@ function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
557
948
  });
558
949
  const input_conversationSummaryList_length = input.conversationSummaryList.length;
559
950
  for (let i = 0; i < input_conversationSummaryList_length; i++) {
560
- getTypeCacheKeys$2(rootKeySet, luvio, input.conversationSummaryList[i]);
951
+ getTypeCacheKeys$3(rootKeySet, luvio, input.conversationSummaryList[i]);
561
952
  }
562
953
  }
563
954
 
@@ -627,14 +1018,14 @@ const getConversationSummaryRelatedList_ConfigPropertyMetadata = [
627
1018
  generateParamConfigMetadata('id', true, 0 /* UrlParameter */, 0 /* String */),
628
1019
  ];
629
1020
  const getConversationSummaryRelatedList_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getConversationSummaryRelatedList_ConfigPropertyMetadata);
630
- const createResourceParams$1 = /*#__PURE__*/ createResourceParams$3(getConversationSummaryRelatedList_ConfigPropertyMetadata);
1021
+ const createResourceParams$1 = /*#__PURE__*/ createResourceParams$4(getConversationSummaryRelatedList_ConfigPropertyMetadata);
631
1022
  function keyBuilder$2(luvio, config) {
632
1023
  const resourceParams = createResourceParams$1(config);
633
1024
  return keyBuilder$3(luvio, resourceParams);
634
1025
  }
635
1026
  function typeCheckConfig$1(untrustedConfig) {
636
1027
  const config = {};
637
- typeCheckConfig$3(untrustedConfig, config, getConversationSummaryRelatedList_ConfigPropertyMetadata);
1028
+ typeCheckConfig$4(untrustedConfig, config, getConversationSummaryRelatedList_ConfigPropertyMetadata);
638
1029
  return config;
639
1030
  }
640
1031
  function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
@@ -683,7 +1074,7 @@ function buildNetworkSnapshot$1(luvio, config, options) {
683
1074
  });
684
1075
  }
685
1076
  function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
686
- return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
1077
+ return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
687
1078
  }
688
1079
  function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
689
1080
  const { luvio, config } = context;
@@ -912,14 +1303,14 @@ const getTranscript_ConfigPropertyMetadata = [
912
1303
  generateParamConfigMetadata('includeData', false, 1 /* QueryParameter */, 1 /* Boolean */),
913
1304
  ];
914
1305
  const getTranscript_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getTranscript_ConfigPropertyMetadata);
915
- const createResourceParams = /*#__PURE__*/ createResourceParams$3(getTranscript_ConfigPropertyMetadata);
1306
+ const createResourceParams = /*#__PURE__*/ createResourceParams$4(getTranscript_ConfigPropertyMetadata);
916
1307
  function keyBuilder(luvio, config) {
917
1308
  const resourceParams = createResourceParams(config);
918
1309
  return keyBuilder$1(luvio, resourceParams);
919
1310
  }
920
1311
  function typeCheckConfig(untrustedConfig) {
921
1312
  const config = {};
922
- typeCheckConfig$3(untrustedConfig, config, getTranscript_ConfigPropertyMetadata);
1313
+ typeCheckConfig$4(untrustedConfig, config, getTranscript_ConfigPropertyMetadata);
923
1314
  return config;
924
1315
  }
925
1316
  function validateAdapterConfig(untrustedConfig, configPropertyNames) {
@@ -968,7 +1359,7 @@ function buildNetworkSnapshot(luvio, config, options) {
968
1359
  });
969
1360
  }
970
1361
  function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
971
- return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
1362
+ return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
972
1363
  }
973
1364
  function buildCachedSnapshotCachePolicy(context, storeLookup) {
974
1365
  const { luvio, config } = context;
@@ -994,12 +1385,20 @@ const getTranscriptAdapterFactory = (luvio) => function eci__getTranscript(untru
994
1385
  };
995
1386
 
996
1387
  let generateConversationSummary;
1388
+ let getConversationGenerativeInsight;
1389
+ let getConversationGenerativeInsightNotifyChange;
997
1390
  let getConversationSummaryRelatedList;
998
1391
  let getConversationSummaryRelatedListNotifyChange;
999
1392
  let getTranscript;
1000
1393
  // Imperative GET Adapters
1394
+ let getConversationGenerativeInsight_imperative;
1001
1395
  let getConversationSummaryRelatedList_imperative;
1002
1396
  let getTranscript_imperative;
1397
+ const getConversationGenerativeInsightMetadata = {
1398
+ apiFamily: 'eci',
1399
+ name: 'getConversationGenerativeInsight',
1400
+ ttl: 60000,
1401
+ };
1003
1402
  const getConversationSummaryRelatedListMetadata = {
1004
1403
  apiFamily: 'eci',
1005
1404
  name: 'getConversationSummaryRelatedList',
@@ -1009,6 +1408,7 @@ const getTranscriptMetadata = { apiFamily: 'eci', name: 'getTranscript', ttl: 25
1009
1408
  // Notify Update Available
1010
1409
  function bindExportsTo(luvio) {
1011
1410
  // LDS Adapters
1411
+ const getConversationGenerativeInsight_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getConversationGenerativeInsight', getConversationGenerativeInsightAdapterFactory), getConversationGenerativeInsightMetadata);
1012
1412
  const getConversationSummaryRelatedList_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getConversationSummaryRelatedList', getConversationSummaryRelatedListAdapterFactory), getConversationSummaryRelatedListMetadata);
1013
1413
  const getTranscript_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getTranscript', getTranscriptAdapterFactory), getTranscriptMetadata);
1014
1414
  function unwrapSnapshotData(factory) {
@@ -1017,10 +1417,13 @@ function bindExportsTo(luvio) {
1017
1417
  }
1018
1418
  return {
1019
1419
  generateConversationSummary: unwrapSnapshotData(generateConversationSummaryAdapterFactory),
1420
+ getConversationGenerativeInsight: createWireAdapterConstructor(luvio, getConversationGenerativeInsight_ldsAdapter, getConversationGenerativeInsightMetadata),
1421
+ getConversationGenerativeInsightNotifyChange: createLDSAdapter(luvio, 'getConversationGenerativeInsightNotifyChange', notifyChangeFactory$1),
1020
1422
  getConversationSummaryRelatedList: createWireAdapterConstructor(luvio, getConversationSummaryRelatedList_ldsAdapter, getConversationSummaryRelatedListMetadata),
1021
1423
  getConversationSummaryRelatedListNotifyChange: createLDSAdapter(luvio, 'getConversationSummaryRelatedListNotifyChange', notifyChangeFactory),
1022
1424
  getTranscript: createWireAdapterConstructor(luvio, getTranscript_ldsAdapter, getTranscriptMetadata),
1023
1425
  // Imperative GET Adapters
1426
+ getConversationGenerativeInsight_imperative: createImperativeAdapter(luvio, getConversationGenerativeInsight_ldsAdapter, getConversationGenerativeInsightMetadata),
1024
1427
  getConversationSummaryRelatedList_imperative: createImperativeAdapter(luvio, getConversationSummaryRelatedList_ldsAdapter, getConversationSummaryRelatedListMetadata),
1025
1428
  getTranscript_imperative: createImperativeAdapter(luvio, getTranscript_ldsAdapter, getTranscriptMetadata),
1026
1429
  // Notify Update Availables
@@ -1029,13 +1432,16 @@ function bindExportsTo(luvio) {
1029
1432
  withDefaultLuvio((luvio) => {
1030
1433
  ({
1031
1434
  generateConversationSummary,
1435
+ getConversationGenerativeInsight,
1436
+ getConversationGenerativeInsightNotifyChange,
1032
1437
  getConversationSummaryRelatedList,
1033
1438
  getConversationSummaryRelatedListNotifyChange,
1034
1439
  getTranscript,
1440
+ getConversationGenerativeInsight_imperative,
1035
1441
  getConversationSummaryRelatedList_imperative,
1036
1442
  getTranscript_imperative,
1037
1443
  } = bindExportsTo(luvio));
1038
1444
  });
1039
1445
 
1040
- export { generateConversationSummary, getConversationSummaryRelatedList, getConversationSummaryRelatedListNotifyChange, getConversationSummaryRelatedList_imperative, getTranscript, getTranscript_imperative };
1041
- // version: 1.280.0-09f980816
1446
+ export { generateConversationSummary, getConversationGenerativeInsight, getConversationGenerativeInsightNotifyChange, getConversationGenerativeInsight_imperative, getConversationSummaryRelatedList, getConversationSummaryRelatedListNotifyChange, getConversationSummaryRelatedList_imperative, getTranscript, getTranscript_imperative };
1447
+ // version: 1.282.0-dd2e9831c