@salesforce/lds-adapters-sales-eci 1.281.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.
@@ -4,7 +4,7 @@
4
4
  * For full license text, see the LICENSE.txt file
5
5
  */
6
6
 
7
- import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$3, typeCheckConfig as typeCheckConfig$3, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$2 } from '@luvio/engine';
7
+ import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$3, typeCheckConfig as typeCheckConfig$4, StoreKeyMap, createResourceParams as createResourceParams$4 } from '@luvio/engine';
8
8
 
9
9
  const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
10
10
  const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
@@ -111,6 +111,356 @@ function createLink(ref) {
111
111
  };
112
112
  }
113
113
 
114
+ const VERSION$4 = "c614c7bd04cb26f6e931c85a63d52c55";
115
+ function validate$4(obj, path = 'ConversationGenerativeInsightRepresentation') {
116
+ const v_error = (() => {
117
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
118
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
119
+ }
120
+ const obj_generatedText = obj.generatedText;
121
+ const path_generatedText = path + '.generatedText';
122
+ if (typeof obj_generatedText !== 'string') {
123
+ return new TypeError('Expected "string" but received "' + typeof obj_generatedText + '" (at "' + path_generatedText + '")');
124
+ }
125
+ const obj_insightName = obj.insightName;
126
+ const path_insightName = path + '.insightName';
127
+ if (typeof obj_insightName !== 'string') {
128
+ return new TypeError('Expected "string" but received "' + typeof obj_insightName + '" (at "' + path_insightName + '")');
129
+ }
130
+ const obj_insightTypeId = obj.insightTypeId;
131
+ const path_insightTypeId = path + '.insightTypeId';
132
+ if (typeof obj_insightTypeId !== 'string') {
133
+ return new TypeError('Expected "string" but received "' + typeof obj_insightTypeId + '" (at "' + path_insightTypeId + '")');
134
+ }
135
+ const obj_modifiedBy = obj.modifiedBy;
136
+ const path_modifiedBy = path + '.modifiedBy';
137
+ if (typeof obj_modifiedBy !== 'string') {
138
+ return new TypeError('Expected "string" but received "' + typeof obj_modifiedBy + '" (at "' + path_modifiedBy + '")');
139
+ }
140
+ })();
141
+ return v_error === undefined ? null : v_error;
142
+ }
143
+ const select$8 = function ConversationGenerativeInsightRepresentationSelect() {
144
+ return {
145
+ kind: 'Fragment',
146
+ version: VERSION$4,
147
+ private: [],
148
+ selections: [
149
+ {
150
+ name: 'generatedText',
151
+ kind: 'Scalar'
152
+ },
153
+ {
154
+ name: 'insightName',
155
+ kind: 'Scalar'
156
+ },
157
+ {
158
+ name: 'insightTypeId',
159
+ kind: 'Scalar'
160
+ },
161
+ {
162
+ name: 'modifiedBy',
163
+ kind: 'Scalar'
164
+ }
165
+ ]
166
+ };
167
+ };
168
+ function equals$4(existing, incoming) {
169
+ const existing_generatedText = existing.generatedText;
170
+ const incoming_generatedText = incoming.generatedText;
171
+ if (!(existing_generatedText === incoming_generatedText)) {
172
+ return false;
173
+ }
174
+ const existing_insightName = existing.insightName;
175
+ const incoming_insightName = incoming.insightName;
176
+ if (!(existing_insightName === incoming_insightName)) {
177
+ return false;
178
+ }
179
+ const existing_insightTypeId = existing.insightTypeId;
180
+ const incoming_insightTypeId = incoming.insightTypeId;
181
+ if (!(existing_insightTypeId === incoming_insightTypeId)) {
182
+ return false;
183
+ }
184
+ const existing_modifiedBy = existing.modifiedBy;
185
+ const incoming_modifiedBy = incoming.modifiedBy;
186
+ if (!(existing_modifiedBy === incoming_modifiedBy)) {
187
+ return false;
188
+ }
189
+ return true;
190
+ }
191
+
192
+ const TTL$3 = 60000;
193
+ const VERSION$3 = "1ddcdcaada7f739acdff16f101b69288";
194
+ function validate$3(obj, path = 'ConversationGenInsightListRepresentation') {
195
+ const v_error = (() => {
196
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
197
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
198
+ }
199
+ const obj_error = obj.error;
200
+ const path_error = path + '.error';
201
+ if (typeof obj_error !== 'object' || ArrayIsArray(obj_error) || obj_error === null) {
202
+ return new TypeError('Expected "object" but received "' + typeof obj_error + '" (at "' + path_error + '")');
203
+ }
204
+ const obj_error_keys = ObjectKeys(obj_error);
205
+ for (let i = 0; i < obj_error_keys.length; i++) {
206
+ const key = obj_error_keys[i];
207
+ const obj_error_prop = obj_error[key];
208
+ const path_error_prop = path_error + '["' + key + '"]';
209
+ if (typeof obj_error_prop !== 'string') {
210
+ return new TypeError('Expected "string" but received "' + typeof obj_error_prop + '" (at "' + path_error_prop + '")');
211
+ }
212
+ }
213
+ const obj_generativeInsights = obj.generativeInsights;
214
+ const path_generativeInsights = path + '.generativeInsights';
215
+ if (!ArrayIsArray(obj_generativeInsights)) {
216
+ return new TypeError('Expected "array" but received "' + typeof obj_generativeInsights + '" (at "' + path_generativeInsights + '")');
217
+ }
218
+ for (let i = 0; i < obj_generativeInsights.length; i++) {
219
+ const obj_generativeInsights_item = obj_generativeInsights[i];
220
+ const path_generativeInsights_item = path_generativeInsights + '[' + i + ']';
221
+ const referencepath_generativeInsights_itemValidationError = validate$4(obj_generativeInsights_item, path_generativeInsights_item);
222
+ if (referencepath_generativeInsights_itemValidationError !== null) {
223
+ let message = 'Object doesn\'t match ConversationGenerativeInsightRepresentation (at "' + path_generativeInsights_item + '")\n';
224
+ message += referencepath_generativeInsights_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
225
+ return new TypeError(message);
226
+ }
227
+ }
228
+ const obj_recordId = obj.recordId;
229
+ const path_recordId = path + '.recordId';
230
+ if (typeof obj_recordId !== 'string') {
231
+ return new TypeError('Expected "string" but received "' + typeof obj_recordId + '" (at "' + path_recordId + '")');
232
+ }
233
+ })();
234
+ return v_error === undefined ? null : v_error;
235
+ }
236
+ const RepresentationType$3 = 'ConversationGenInsightListRepresentation';
237
+ function keyBuilder$8(luvio, config) {
238
+ return keyPrefix + '::' + RepresentationType$3 + ':' + config.id;
239
+ }
240
+ function keyBuilderFromType$2(luvio, object) {
241
+ const keyParams = {
242
+ id: object.recordId
243
+ };
244
+ return keyBuilder$8(luvio, keyParams);
245
+ }
246
+ function normalize$3(input, existing, path, luvio, store, timestamp) {
247
+ return input;
248
+ }
249
+ const select$7 = function ConversationGenInsightListRepresentationSelect() {
250
+ const { selections: ConversationGenerativeInsightRepresentation__selections, opaque: ConversationGenerativeInsightRepresentation__opaque, } = select$8();
251
+ return {
252
+ kind: 'Fragment',
253
+ version: VERSION$3,
254
+ private: [],
255
+ selections: [
256
+ {
257
+ name: 'error',
258
+ kind: 'Scalar',
259
+ map: true
260
+ },
261
+ {
262
+ name: 'generativeInsights',
263
+ kind: 'Object',
264
+ plural: true,
265
+ selections: ConversationGenerativeInsightRepresentation__selections
266
+ },
267
+ {
268
+ name: 'recordId',
269
+ kind: 'Scalar'
270
+ }
271
+ ]
272
+ };
273
+ };
274
+ function equals$3(existing, incoming) {
275
+ const existing_recordId = existing.recordId;
276
+ const incoming_recordId = incoming.recordId;
277
+ if (!(existing_recordId === incoming_recordId)) {
278
+ return false;
279
+ }
280
+ const existing_error = existing.error;
281
+ const incoming_error = incoming.error;
282
+ const equals_error_props = equalsObject(existing_error, incoming_error, (existing_error_prop, incoming_error_prop) => {
283
+ if (!(existing_error_prop === incoming_error_prop)) {
284
+ return false;
285
+ }
286
+ });
287
+ if (equals_error_props === false) {
288
+ return false;
289
+ }
290
+ const existing_generativeInsights = existing.generativeInsights;
291
+ const incoming_generativeInsights = incoming.generativeInsights;
292
+ const equals_generativeInsights_items = equalsArray(existing_generativeInsights, incoming_generativeInsights, (existing_generativeInsights_item, incoming_generativeInsights_item) => {
293
+ if (!(equals$4(existing_generativeInsights_item, incoming_generativeInsights_item))) {
294
+ return false;
295
+ }
296
+ });
297
+ if (equals_generativeInsights_items === false) {
298
+ return false;
299
+ }
300
+ return true;
301
+ }
302
+ const ingest$3 = function ConversationGenInsightListRepresentationIngest(input, path, luvio, store, timestamp) {
303
+ if (process.env.NODE_ENV !== 'production') {
304
+ const validateError = validate$3(input);
305
+ if (validateError !== null) {
306
+ throw validateError;
307
+ }
308
+ }
309
+ const key = keyBuilderFromType$2(luvio, input);
310
+ const ttlToUse = TTL$3;
311
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "eci", VERSION$3, RepresentationType$3, equals$3);
312
+ return createLink(key);
313
+ };
314
+ function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
315
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
316
+ const rootKey = keyBuilderFromType$2(luvio, input);
317
+ rootKeySet.set(rootKey, {
318
+ namespace: keyPrefix,
319
+ representationName: RepresentationType$3,
320
+ mergeable: false
321
+ });
322
+ }
323
+
324
+ function select$6(luvio, params) {
325
+ return select$7();
326
+ }
327
+ function keyBuilder$7(luvio, params) {
328
+ return keyBuilder$8(luvio, {
329
+ id: params.urlParams.id
330
+ });
331
+ }
332
+ function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
333
+ getTypeCacheKeys$3(storeKeyMap, luvio, response);
334
+ }
335
+ function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
336
+ const { body } = response;
337
+ const key = keyBuilder$7(luvio, resourceParams);
338
+ luvio.storeIngest(key, ingest$3, body);
339
+ const snapshot = luvio.storeLookup({
340
+ recordId: key,
341
+ node: select$6(),
342
+ variables: {},
343
+ }, snapshotRefresh);
344
+ if (process.env.NODE_ENV !== 'production') {
345
+ if (snapshot.state !== 'Fulfilled') {
346
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
347
+ }
348
+ }
349
+ deepFreeze(snapshot.data);
350
+ return snapshot;
351
+ }
352
+ function ingestError$2(luvio, params, error, snapshotRefresh) {
353
+ const key = keyBuilder$7(luvio, params);
354
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
355
+ const storeMetadataParams = {
356
+ ttl: TTL$3,
357
+ namespace: keyPrefix,
358
+ version: VERSION$3,
359
+ representationName: RepresentationType$3
360
+ };
361
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
362
+ return errorSnapshot;
363
+ }
364
+ function createResourceRequest$3(config) {
365
+ const headers = {};
366
+ return {
367
+ baseUri: '/services/data/v61.0',
368
+ basePath: '/conversation/generative/insight/' + config.urlParams.id + '',
369
+ method: 'get',
370
+ body: null,
371
+ urlParams: config.urlParams,
372
+ queryParams: {},
373
+ headers,
374
+ priority: 'normal',
375
+ };
376
+ }
377
+
378
+ const adapterName$3 = 'getConversationGenerativeInsight';
379
+ const getConversationGenerativeInsight_ConfigPropertyMetadata = [
380
+ generateParamConfigMetadata('id', true, 0 /* UrlParameter */, 0 /* String */),
381
+ ];
382
+ const getConversationGenerativeInsight_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getConversationGenerativeInsight_ConfigPropertyMetadata);
383
+ const createResourceParams$3 = /*#__PURE__*/ createResourceParams$4(getConversationGenerativeInsight_ConfigPropertyMetadata);
384
+ function keyBuilder$6(luvio, config) {
385
+ const resourceParams = createResourceParams$3(config);
386
+ return keyBuilder$7(luvio, resourceParams);
387
+ }
388
+ function typeCheckConfig$3(untrustedConfig) {
389
+ const config = {};
390
+ typeCheckConfig$4(untrustedConfig, config, getConversationGenerativeInsight_ConfigPropertyMetadata);
391
+ return config;
392
+ }
393
+ function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
394
+ if (!untrustedIsObject(untrustedConfig)) {
395
+ return null;
396
+ }
397
+ if (process.env.NODE_ENV !== 'production') {
398
+ validateConfig(untrustedConfig, configPropertyNames);
399
+ }
400
+ const config = typeCheckConfig$3(untrustedConfig);
401
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
402
+ return null;
403
+ }
404
+ return config;
405
+ }
406
+ function adapterFragment$2(luvio, config) {
407
+ createResourceParams$3(config);
408
+ return select$6();
409
+ }
410
+ function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
411
+ const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
412
+ config,
413
+ resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
414
+ });
415
+ return luvio.storeBroadcast().then(() => snapshot);
416
+ }
417
+ function onFetchResponseError$2(luvio, config, resourceParams, response) {
418
+ const snapshot = ingestError$2(luvio, resourceParams, response, {
419
+ config,
420
+ resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
421
+ });
422
+ return luvio.storeBroadcast().then(() => snapshot);
423
+ }
424
+ function buildNetworkSnapshot$3(luvio, config, options) {
425
+ const resourceParams = createResourceParams$3(config);
426
+ const request = createResourceRequest$3(resourceParams);
427
+ return luvio.dispatchResourceRequest(request, options)
428
+ .then((response) => {
429
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
430
+ const cache = new StoreKeyMap();
431
+ getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
432
+ return cache;
433
+ });
434
+ }, (response) => {
435
+ return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
436
+ });
437
+ }
438
+ function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
439
+ return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
440
+ }
441
+ function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
442
+ const { luvio, config } = context;
443
+ const selector = {
444
+ recordId: keyBuilder$6(luvio, config),
445
+ node: adapterFragment$2(luvio, config),
446
+ variables: {},
447
+ };
448
+ const cacheSnapshot = storeLookup(selector, {
449
+ config,
450
+ resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
451
+ });
452
+ return cacheSnapshot;
453
+ }
454
+ const getConversationGenerativeInsightAdapterFactory = (luvio) => function eci__getConversationGenerativeInsight(untrustedConfig, requestContext) {
455
+ const config = validateAdapterConfig$3(untrustedConfig, getConversationGenerativeInsight_ConfigPropertyNames);
456
+ // Invalid or incomplete config
457
+ if (config === null) {
458
+ return null;
459
+ }
460
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
461
+ buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
462
+ };
463
+
114
464
  const TTL$2 = 60000;
115
465
  const VERSION$2 = "10bf968dbd562928dfa701c7f6a854b2";
116
466
  function validate$2(obj, path = 'ConversationSummaryRepresentation') {
@@ -357,10 +707,10 @@ const generateConversationSummary_ConfigPropertyMetadata = [
357
707
  generateParamConfigMetadata('conversationId', true, 0 /* UrlParameter */, 0 /* String */),
358
708
  ];
359
709
  const generateConversationSummary_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, generateConversationSummary_ConfigPropertyMetadata);
360
- const createResourceParams$2 = /*#__PURE__*/ createResourceParams$3(generateConversationSummary_ConfigPropertyMetadata);
710
+ const createResourceParams$2 = /*#__PURE__*/ createResourceParams$4(generateConversationSummary_ConfigPropertyMetadata);
361
711
  function typeCheckConfig$2(untrustedConfig) {
362
712
  const config = {};
363
- typeCheckConfig$3(untrustedConfig, config, generateConversationSummary_ConfigPropertyMetadata);
713
+ typeCheckConfig$4(untrustedConfig, config, generateConversationSummary_ConfigPropertyMetadata);
364
714
  return config;
365
715
  }
366
716
  function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
@@ -610,14 +960,14 @@ const getConversationSummaryRelatedList_ConfigPropertyMetadata = [
610
960
  generateParamConfigMetadata('id', true, 0 /* UrlParameter */, 0 /* String */),
611
961
  ];
612
962
  const getConversationSummaryRelatedList_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getConversationSummaryRelatedList_ConfigPropertyMetadata);
613
- const createResourceParams$1 = /*#__PURE__*/ createResourceParams$3(getConversationSummaryRelatedList_ConfigPropertyMetadata);
963
+ const createResourceParams$1 = /*#__PURE__*/ createResourceParams$4(getConversationSummaryRelatedList_ConfigPropertyMetadata);
614
964
  function keyBuilder$2(luvio, config) {
615
965
  const resourceParams = createResourceParams$1(config);
616
966
  return keyBuilder$3(luvio, resourceParams);
617
967
  }
618
968
  function typeCheckConfig$1(untrustedConfig) {
619
969
  const config = {};
620
- typeCheckConfig$3(untrustedConfig, config, getConversationSummaryRelatedList_ConfigPropertyMetadata);
970
+ typeCheckConfig$4(untrustedConfig, config, getConversationSummaryRelatedList_ConfigPropertyMetadata);
621
971
  return config;
622
972
  }
623
973
  function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
@@ -666,7 +1016,7 @@ function buildNetworkSnapshot$1(luvio, config, options) {
666
1016
  });
667
1017
  }
668
1018
  function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
669
- return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
1019
+ return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
670
1020
  }
671
1021
  function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
672
1022
  const { luvio, config } = context;
@@ -861,14 +1211,14 @@ const getTranscript_ConfigPropertyMetadata = [
861
1211
  generateParamConfigMetadata('includeData', false, 1 /* QueryParameter */, 1 /* Boolean */),
862
1212
  ];
863
1213
  const getTranscript_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getTranscript_ConfigPropertyMetadata);
864
- const createResourceParams = /*#__PURE__*/ createResourceParams$3(getTranscript_ConfigPropertyMetadata);
1214
+ const createResourceParams = /*#__PURE__*/ createResourceParams$4(getTranscript_ConfigPropertyMetadata);
865
1215
  function keyBuilder(luvio, config) {
866
1216
  const resourceParams = createResourceParams(config);
867
1217
  return keyBuilder$1(luvio, resourceParams);
868
1218
  }
869
1219
  function typeCheckConfig(untrustedConfig) {
870
1220
  const config = {};
871
- typeCheckConfig$3(untrustedConfig, config, getTranscript_ConfigPropertyMetadata);
1221
+ typeCheckConfig$4(untrustedConfig, config, getTranscript_ConfigPropertyMetadata);
872
1222
  return config;
873
1223
  }
874
1224
  function validateAdapterConfig(untrustedConfig, configPropertyNames) {
@@ -917,7 +1267,7 @@ function buildNetworkSnapshot(luvio, config, options) {
917
1267
  });
918
1268
  }
919
1269
  function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
920
- return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
1270
+ return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
921
1271
  }
922
1272
  function buildCachedSnapshotCachePolicy(context, storeLookup) {
923
1273
  const { luvio, config } = context;
@@ -942,4 +1292,4 @@ const getTranscriptAdapterFactory = (luvio) => function eci__getTranscript(untru
942
1292
  buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
943
1293
  };
944
1294
 
945
- export { generateConversationSummaryAdapterFactory, getConversationSummaryRelatedListAdapterFactory, getTranscriptAdapterFactory };
1295
+ export { generateConversationSummaryAdapterFactory, getConversationGenerativeInsightAdapterFactory, getConversationSummaryRelatedListAdapterFactory, getTranscriptAdapterFactory };
@@ -0,0 +1,28 @@
1
+ import { AdapterConfigMetadata as $64$luvio_engine_AdapterConfigMetadata, Luvio as $64$luvio_engine_Luvio, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, Fragment as $64$luvio_engine_Fragment, Snapshot as $64$luvio_engine_Snapshot, FetchResponse as $64$luvio_engine_FetchResponse, ErrorResponse as $64$luvio_engine_ErrorResponse, DispatchResourceRequestContext as $64$luvio_engine_DispatchResourceRequestContext, CoercedAdapterRequestContext as $64$luvio_engine_CoercedAdapterRequestContext, StoreLookup as $64$luvio_engine_StoreLookup, AdapterFactory as $64$luvio_engine_AdapterFactory } from '@luvio/engine';
2
+ import { Untrusted as adapter$45$utils_Untrusted, AdapterValidationConfig as adapter$45$utils_AdapterValidationConfig, UncoercedConfiguration as adapter$45$utils_UncoercedConfiguration } from './adapter-utils';
3
+ import { ResourceRequestConfig as resources_getConversationGenerativeInsightById_ResourceRequestConfig } from '../resources/getConversationGenerativeInsightById';
4
+ import { ConversationGenInsightListRepresentation as types_ConversationGenInsightListRepresentation_ConversationGenInsightListRepresentation, KeyParams as types_ConversationGenInsightListRepresentation_KeyParams } from '../types/ConversationGenInsightListRepresentation';
5
+ export declare const adapterName = "getConversationGenerativeInsight";
6
+ export declare const getConversationGenerativeInsight_ConfigPropertyMetadata: $64$luvio_engine_AdapterConfigMetadata[];
7
+ export declare const getConversationGenerativeInsight_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
8
+ export interface GetConversationGenerativeInsightConfig {
9
+ id: string;
10
+ }
11
+ export declare const createResourceParams: (config: GetConversationGenerativeInsightConfig) => resources_getConversationGenerativeInsightById_ResourceRequestConfig;
12
+ export declare function keyBuilder(luvio: $64$luvio_engine_Luvio, config: GetConversationGenerativeInsightConfig): string;
13
+ export declare function keyBuilder_StructuredKey(luvio: $64$luvio_engine_Luvio, config: GetConversationGenerativeInsightConfig): $64$luvio_engine_NormalizedKeyMetadata;
14
+ export declare function typeCheckConfig(untrustedConfig: adapter$45$utils_Untrusted<GetConversationGenerativeInsightConfig>): adapter$45$utils_Untrusted<GetConversationGenerativeInsightConfig>;
15
+ export declare function validateAdapterConfig(untrustedConfig: unknown, configPropertyNames: adapter$45$utils_AdapterValidationConfig): GetConversationGenerativeInsightConfig | null;
16
+ export declare function adapterFragment(luvio: $64$luvio_engine_Luvio, config: GetConversationGenerativeInsightConfig): $64$luvio_engine_Fragment;
17
+ export declare function buildCachedSnapshot(luvio: $64$luvio_engine_Luvio, config: GetConversationGenerativeInsightConfig): $64$luvio_engine_Snapshot<types_ConversationGenInsightListRepresentation_ConversationGenInsightListRepresentation, any>;
18
+ export declare function onFetchResponseSuccess(luvio: $64$luvio_engine_Luvio, config: GetConversationGenerativeInsightConfig, resourceParams: resources_getConversationGenerativeInsightById_ResourceRequestConfig, response: $64$luvio_engine_FetchResponse<types_ConversationGenInsightListRepresentation_ConversationGenInsightListRepresentation>): Promise<import("@luvio/engine").FulfilledSnapshot<types_ConversationGenInsightListRepresentation_ConversationGenInsightListRepresentation, {}> | import("@luvio/engine").StaleSnapshot<types_ConversationGenInsightListRepresentation_ConversationGenInsightListRepresentation, {}> | import("@luvio/engine").PendingSnapshot<types_ConversationGenInsightListRepresentation_ConversationGenInsightListRepresentation, any>>;
19
+ export declare function onFetchResponseError(luvio: $64$luvio_engine_Luvio, config: GetConversationGenerativeInsightConfig, resourceParams: resources_getConversationGenerativeInsightById_ResourceRequestConfig, response: $64$luvio_engine_ErrorResponse): Promise<import("@luvio/engine").ErrorSnapshot>;
20
+ export declare function buildNetworkSnapshot(luvio: $64$luvio_engine_Luvio, config: GetConversationGenerativeInsightConfig, options?: $64$luvio_engine_DispatchResourceRequestContext): Promise<$64$luvio_engine_Snapshot<types_ConversationGenInsightListRepresentation_ConversationGenInsightListRepresentation, any>>;
21
+ export type BuildSnapshotContext = {
22
+ luvio: $64$luvio_engine_Luvio;
23
+ config: GetConversationGenerativeInsightConfig;
24
+ };
25
+ export declare function buildNetworkSnapshotCachePolicy(context: BuildSnapshotContext, coercedAdapterRequestContext: $64$luvio_engine_CoercedAdapterRequestContext): Promise<$64$luvio_engine_Snapshot<types_ConversationGenInsightListRepresentation_ConversationGenInsightListRepresentation, any>>;
26
+ export declare function buildCachedSnapshotCachePolicy(context: BuildSnapshotContext, storeLookup: $64$luvio_engine_StoreLookup<types_ConversationGenInsightListRepresentation_ConversationGenInsightListRepresentation>): $64$luvio_engine_Snapshot<types_ConversationGenInsightListRepresentation_ConversationGenInsightListRepresentation, any>;
27
+ export declare const getConversationGenerativeInsightAdapterFactory: $64$luvio_engine_AdapterFactory<GetConversationGenerativeInsightConfig, types_ConversationGenInsightListRepresentation_ConversationGenInsightListRepresentation>;
28
+ export declare const notifyChangeFactory: (luvio: $64$luvio_engine_Luvio, options?: $64$luvio_engine_DispatchResourceRequestContext) => (configs: adapter$45$utils_UncoercedConfiguration<types_ConversationGenInsightListRepresentation_KeyParams, any>[]) => void;
@@ -1,3 +1,4 @@
1
+ export { getConversationGenerativeInsightAdapterFactory } from '../adapters/getConversationGenerativeInsight';
1
2
  export { generateConversationSummaryAdapterFactory } from '../adapters/generateConversationSummary';
2
3
  export { getConversationSummaryRelatedListAdapterFactory } from '../adapters/getConversationSummaryRelatedList';
3
4
  export { getTranscriptAdapterFactory } from '../adapters/getTranscript';
@@ -1,7 +1,10 @@
1
1
  declare let generateConversationSummary: any;
2
+ declare let getConversationGenerativeInsight: any;
3
+ declare let getConversationGenerativeInsightNotifyChange: any;
2
4
  declare let getConversationSummaryRelatedList: any;
3
5
  declare let getConversationSummaryRelatedListNotifyChange: any;
4
6
  declare let getTranscript: any;
7
+ declare let getConversationGenerativeInsight_imperative: any;
5
8
  declare let getConversationSummaryRelatedList_imperative: any;
6
9
  declare let getTranscript_imperative: any;
7
- export { generateConversationSummary, getConversationSummaryRelatedList, getConversationSummaryRelatedListNotifyChange, getTranscript, getConversationSummaryRelatedList_imperative, getTranscript_imperative, };
10
+ export { generateConversationSummary, getConversationGenerativeInsight, getConversationGenerativeInsightNotifyChange, getConversationSummaryRelatedList, getConversationSummaryRelatedListNotifyChange, getTranscript, getConversationGenerativeInsight_imperative, getConversationSummaryRelatedList_imperative, getTranscript_imperative, };
@@ -0,0 +1,16 @@
1
+ import { Luvio as $64$luvio_engine_Luvio, Fragment as $64$luvio_engine_Fragment, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, FetchResponse as $64$luvio_engine_FetchResponse, SnapshotRefresh as $64$luvio_engine_SnapshotRefresh, FulfilledSnapshot as $64$luvio_engine_FulfilledSnapshot, StaleSnapshot as $64$luvio_engine_StaleSnapshot, PendingSnapshot as $64$luvio_engine_PendingSnapshot, ErrorResponse as $64$luvio_engine_ErrorResponse, ErrorSnapshot as $64$luvio_engine_ErrorSnapshot, ResourceRequest as $64$luvio_engine_ResourceRequest } from '@luvio/engine';
2
+ import { ConversationGenInsightListRepresentation as types_ConversationGenInsightListRepresentation_ConversationGenInsightListRepresentation } from '../types/ConversationGenInsightListRepresentation';
3
+ export interface ResourceRequestConfig {
4
+ urlParams: {
5
+ id: string;
6
+ };
7
+ }
8
+ export declare function select(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): $64$luvio_engine_Fragment;
9
+ export declare function keyBuilder(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): string;
10
+ export declare function keyBuilder_StructuredKey(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): $64$luvio_engine_NormalizedKeyMetadata;
11
+ export declare function getResponseCacheKeys(storeKeyMap: any, luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: types_ConversationGenInsightListRepresentation_ConversationGenInsightListRepresentation): void;
12
+ export declare function ingestSuccess(luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: $64$luvio_engine_FetchResponse<types_ConversationGenInsightListRepresentation_ConversationGenInsightListRepresentation>, snapshotRefresh?: $64$luvio_engine_SnapshotRefresh<types_ConversationGenInsightListRepresentation_ConversationGenInsightListRepresentation>): $64$luvio_engine_FulfilledSnapshot<types_ConversationGenInsightListRepresentation_ConversationGenInsightListRepresentation, {}> | $64$luvio_engine_StaleSnapshot<types_ConversationGenInsightListRepresentation_ConversationGenInsightListRepresentation, {}> | $64$luvio_engine_PendingSnapshot<types_ConversationGenInsightListRepresentation_ConversationGenInsightListRepresentation, any>;
13
+ export declare function ingestError(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig, error: $64$luvio_engine_ErrorResponse, snapshotRefresh?: $64$luvio_engine_SnapshotRefresh<types_ConversationGenInsightListRepresentation_ConversationGenInsightListRepresentation>): $64$luvio_engine_ErrorSnapshot;
14
+ export declare function createResourceRequest(config: ResourceRequestConfig): $64$luvio_engine_ResourceRequest;
15
+ export default createResourceRequest;
16
+ export declare function createResourceRequestFromRepresentation(representation: types_ConversationGenInsightListRepresentation_ConversationGenInsightListRepresentation): $64$luvio_engine_ResourceRequest;
@@ -0,0 +1,49 @@
1
+ import { ConversationGenerativeInsightRepresentation as ConversationGenerativeInsightRepresentation_ConversationGenerativeInsightRepresentation } from './ConversationGenerativeInsightRepresentation';
2
+ import { KeyMetadata as $64$luvio_engine_KeyMetadata, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, Luvio as $64$luvio_engine_Luvio, IngestPath as $64$luvio_engine_IngestPath, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap } from '@luvio/engine';
3
+ export declare const TTL = 60000;
4
+ export declare const VERSION = "1ddcdcaada7f739acdff16f101b69288";
5
+ export declare function validate(obj: any, path?: string): TypeError | null;
6
+ export declare const RepresentationType: string;
7
+ export interface KeyParams extends $64$luvio_engine_KeyMetadata {
8
+ id: string;
9
+ }
10
+ export type ConversationGenInsightListRepresentationNormalizedKeyMetadata = KeyParams & $64$luvio_engine_NormalizedKeyMetadata;
11
+ export type PartialConversationGenInsightListRepresentationNormalizedKeyMetadata = Partial<KeyParams> & $64$luvio_engine_NormalizedKeyMetadata;
12
+ export declare function keyBuilder(luvio: $64$luvio_engine_Luvio, config: KeyParams): string;
13
+ export declare function keyBuilder_StructuredKey(luvio: $64$luvio_engine_Luvio, config: KeyParams): ConversationGenInsightListRepresentationNormalizedKeyMetadata;
14
+ export declare function keyBuilderFromType(luvio: $64$luvio_engine_Luvio, object: ConversationGenInsightListRepresentation): string;
15
+ export declare function keyBuilderFromType_StructuredKey(luvio: $64$luvio_engine_Luvio, object: ConversationGenInsightListRepresentation): $64$luvio_engine_NormalizedKeyMetadata;
16
+ export declare function normalize(input: ConversationGenInsightListRepresentation, existing: ConversationGenInsightListRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): ConversationGenInsightListRepresentationNormalized;
17
+ export declare const select: () => $64$luvio_engine_FragmentSelection;
18
+ export declare function equals(existing: ConversationGenInsightListRepresentationNormalized, incoming: ConversationGenInsightListRepresentationNormalized): boolean;
19
+ export declare const ingest: $64$luvio_engine_ResourceIngest;
20
+ export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: ConversationGenInsightListRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
21
+ /**
22
+ * List of GenerativeInsightRepresentation records
23
+ *
24
+ * Keys:
25
+ * id (string): recordId
26
+ */
27
+ export interface ConversationGenInsightListRepresentationNormalized {
28
+ /** Generative Insight Error */
29
+ error: {
30
+ [key: string]: string;
31
+ };
32
+ /** List of Generative Insight records */
33
+ generativeInsights: Array<ConversationGenerativeInsightRepresentation_ConversationGenerativeInsightRepresentation>;
34
+ /** ID for the VoiceCall or VideoCall */
35
+ recordId: string;
36
+ }
37
+ /**
38
+ * List of GenerativeInsightRepresentation records
39
+ *
40
+ * Keys:
41
+ * id (string): recordId
42
+ */
43
+ export interface ConversationGenInsightListRepresentation {
44
+ error: {
45
+ [key: string]: string;
46
+ };
47
+ generativeInsights: Array<ConversationGenerativeInsightRepresentation_ConversationGenerativeInsightRepresentation>;
48
+ recordId: string;
49
+ }
@@ -0,0 +1,38 @@
1
+ import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
2
+ export declare const TTL = 60000;
3
+ export declare const VERSION = "c614c7bd04cb26f6e931c85a63d52c55";
4
+ export declare function validate(obj: any, path?: string): TypeError | null;
5
+ export declare const RepresentationType: string;
6
+ export declare function normalize(input: ConversationGenerativeInsightRepresentation, existing: ConversationGenerativeInsightRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): ConversationGenerativeInsightRepresentationNormalized;
7
+ export declare const select: () => $64$luvio_engine_FragmentSelection;
8
+ export declare function equals(existing: ConversationGenerativeInsightRepresentationNormalized, incoming: ConversationGenerativeInsightRepresentationNormalized): boolean;
9
+ export declare const ingest: $64$luvio_engine_ResourceIngest;
10
+ export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: ConversationGenerativeInsightRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
11
+ /**
12
+ * Represents a generative insight for a voice/video call
13
+ *
14
+ * Keys:
15
+ * (none)
16
+ */
17
+ export interface ConversationGenerativeInsightRepresentationNormalized {
18
+ /** Generative insight generated text */
19
+ generatedText: string;
20
+ /** Insight Type Name */
21
+ insightName: string;
22
+ /** Insight Type Id */
23
+ insightTypeId: string;
24
+ /** Generative insight created/modified by */
25
+ modifiedBy: string;
26
+ }
27
+ /**
28
+ * Represents a generative insight for a voice/video call
29
+ *
30
+ * Keys:
31
+ * (none)
32
+ */
33
+ export interface ConversationGenerativeInsightRepresentation {
34
+ generatedText: string;
35
+ insightName: string;
36
+ insightTypeId: string;
37
+ modifiedBy: string;
38
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-adapters-sales-eci",
3
- "version": "1.281.0",
3
+ "version": "1.282.0",
4
4
  "description": "Einstein Conversation Insights",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "dist/es/es2018/sales-eci.js",
@@ -41,14 +41,15 @@
41
41
  "release:corejar": "yarn build && ../core-build/scripts/core.js --adapter=lds-adapters-sales-eci",
42
42
  "start": "nx build:karma && karma start",
43
43
  "test": "nx build:karma && karma start --single-run",
44
+ "test:debug": "nx build:karma && karma start --single-run=false",
44
45
  "test:unit": "jest"
45
46
  },
46
47
  "dependencies": {
47
- "@salesforce/lds-bindings": "^1.281.0"
48
+ "@salesforce/lds-bindings": "^1.282.0"
48
49
  },
49
50
  "devDependencies": {
50
- "@salesforce/lds-compiler-plugins": "^1.281.0",
51
- "@salesforce/lds-karma": "^1.281.0"
51
+ "@salesforce/lds-compiler-plugins": "^1.282.0",
52
+ "@salesforce/lds-karma": "^1.282.0"
52
53
  },
53
54
  "nx": {
54
55
  "targets": {