@salesforce/lds-adapters-sales-eci 1.303.0 → 1.304.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, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$3, typeCheckConfig as typeCheckConfig$5, StoreKeyMap, createResourceParams as createResourceParams$5 } from '@luvio/engine';
7
+ import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$3, typeCheckConfig as typeCheckConfig$6, StoreKeyMap, createResourceParams as createResourceParams$6 } from '@luvio/engine';
8
8
 
9
9
  const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
10
10
  const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
@@ -111,8 +111,8 @@ function createLink(ref) {
111
111
  };
112
112
  }
113
113
 
114
- const VERSION$5 = "c614c7bd04cb26f6e931c85a63d52c55";
115
- function validate$5(obj, path = 'ConversationGenerativeInsightRepresentation') {
114
+ const VERSION$6 = "c614c7bd04cb26f6e931c85a63d52c55";
115
+ function validate$6(obj, path = 'ConversationGenerativeInsightRepresentation') {
116
116
  const v_error = (() => {
117
117
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
118
118
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -140,10 +140,10 @@ function validate$5(obj, path = 'ConversationGenerativeInsightRepresentation') {
140
140
  })();
141
141
  return v_error === undefined ? null : v_error;
142
142
  }
143
- const select$a = function ConversationGenerativeInsightRepresentationSelect() {
143
+ const select$c = function ConversationGenerativeInsightRepresentationSelect() {
144
144
  return {
145
145
  kind: 'Fragment',
146
- version: VERSION$5,
146
+ version: VERSION$6,
147
147
  private: [],
148
148
  selections: [
149
149
  {
@@ -165,7 +165,7 @@ const select$a = function ConversationGenerativeInsightRepresentationSelect() {
165
165
  ]
166
166
  };
167
167
  };
168
- function equals$5(existing, incoming) {
168
+ function equals$6(existing, incoming) {
169
169
  const existing_generatedText = existing.generatedText;
170
170
  const incoming_generatedText = incoming.generatedText;
171
171
  if (!(existing_generatedText === incoming_generatedText)) {
@@ -189,9 +189,9 @@ function equals$5(existing, incoming) {
189
189
  return true;
190
190
  }
191
191
 
192
- const TTL$4 = 60000;
193
- const VERSION$4 = "1ddcdcaada7f739acdff16f101b69288";
194
- function validate$4(obj, path = 'ConversationGenInsightListRepresentation') {
192
+ const TTL$5 = 60000;
193
+ const VERSION$5 = "1ddcdcaada7f739acdff16f101b69288";
194
+ function validate$5(obj, path = 'ConversationGenInsightListRepresentation') {
195
195
  const v_error = (() => {
196
196
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
197
197
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -218,7 +218,7 @@ function validate$4(obj, path = 'ConversationGenInsightListRepresentation') {
218
218
  for (let i = 0; i < obj_generativeInsights.length; i++) {
219
219
  const obj_generativeInsights_item = obj_generativeInsights[i];
220
220
  const path_generativeInsights_item = path_generativeInsights + '[' + i + ']';
221
- const referencepath_generativeInsights_itemValidationError = validate$5(obj_generativeInsights_item, path_generativeInsights_item);
221
+ const referencepath_generativeInsights_itemValidationError = validate$6(obj_generativeInsights_item, path_generativeInsights_item);
222
222
  if (referencepath_generativeInsights_itemValidationError !== null) {
223
223
  let message = 'Object doesn\'t match ConversationGenerativeInsightRepresentation (at "' + path_generativeInsights_item + '")\n';
224
224
  message += referencepath_generativeInsights_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -233,24 +233,24 @@ function validate$4(obj, path = 'ConversationGenInsightListRepresentation') {
233
233
  })();
234
234
  return v_error === undefined ? null : v_error;
235
235
  }
236
- const RepresentationType$4 = 'ConversationGenInsightListRepresentation';
237
- function keyBuilder$9(luvio, config) {
238
- return keyPrefix + '::' + RepresentationType$4 + ':' + config.id;
236
+ const RepresentationType$5 = 'ConversationGenInsightListRepresentation';
237
+ function keyBuilder$a(luvio, config) {
238
+ return keyPrefix + '::' + RepresentationType$5 + ':' + config.id;
239
239
  }
240
- function keyBuilderFromType$3(luvio, object) {
240
+ function keyBuilderFromType$4(luvio, object) {
241
241
  const keyParams = {
242
242
  id: object.recordId
243
243
  };
244
- return keyBuilder$9(luvio, keyParams);
244
+ return keyBuilder$a(luvio, keyParams);
245
245
  }
246
- function normalize$4(input, existing, path, luvio, store, timestamp) {
246
+ function normalize$5(input, existing, path, luvio, store, timestamp) {
247
247
  return input;
248
248
  }
249
- const select$9 = function ConversationGenInsightListRepresentationSelect() {
250
- const { selections: ConversationGenerativeInsightRepresentation__selections, opaque: ConversationGenerativeInsightRepresentation__opaque, } = select$a();
249
+ const select$b = function ConversationGenInsightListRepresentationSelect() {
250
+ const { selections: ConversationGenerativeInsightRepresentation__selections, opaque: ConversationGenerativeInsightRepresentation__opaque, } = select$c();
251
251
  return {
252
252
  kind: 'Fragment',
253
- version: VERSION$4,
253
+ version: VERSION$5,
254
254
  private: [],
255
255
  selections: [
256
256
  {
@@ -271,7 +271,7 @@ const select$9 = function ConversationGenInsightListRepresentationSelect() {
271
271
  ]
272
272
  };
273
273
  };
274
- function equals$4(existing, incoming) {
274
+ function equals$5(existing, incoming) {
275
275
  const existing_recordId = existing.recordId;
276
276
  const incoming_recordId = incoming.recordId;
277
277
  if (!(existing_recordId === incoming_recordId)) {
@@ -290,7 +290,7 @@ function equals$4(existing, incoming) {
290
290
  const existing_generativeInsights = existing.generativeInsights;
291
291
  const incoming_generativeInsights = incoming.generativeInsights;
292
292
  const equals_generativeInsights_items = equalsArray(existing_generativeInsights, incoming_generativeInsights, (existing_generativeInsights_item, incoming_generativeInsights_item) => {
293
- if (!(equals$5(existing_generativeInsights_item, incoming_generativeInsights_item))) {
293
+ if (!(equals$6(existing_generativeInsights_item, incoming_generativeInsights_item))) {
294
294
  return false;
295
295
  }
296
296
  });
@@ -299,46 +299,46 @@ function equals$4(existing, incoming) {
299
299
  }
300
300
  return true;
301
301
  }
302
- const ingest$4 = function ConversationGenInsightListRepresentationIngest(input, path, luvio, store, timestamp) {
302
+ const ingest$5 = function ConversationGenInsightListRepresentationIngest(input, path, luvio, store, timestamp) {
303
303
  if (process.env.NODE_ENV !== 'production') {
304
- const validateError = validate$4(input);
304
+ const validateError = validate$5(input);
305
305
  if (validateError !== null) {
306
306
  throw validateError;
307
307
  }
308
308
  }
309
- const key = keyBuilderFromType$3(luvio, input);
310
- const ttlToUse = TTL$4;
311
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "eci", VERSION$4, RepresentationType$4, equals$4);
309
+ const key = keyBuilderFromType$4(luvio, input);
310
+ const ttlToUse = TTL$5;
311
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$5, "eci", VERSION$5, RepresentationType$5, equals$5);
312
312
  return createLink(key);
313
313
  };
314
- function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
314
+ function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
315
315
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
316
- const rootKey = keyBuilderFromType$3(luvio, input);
316
+ const rootKey = keyBuilderFromType$4(luvio, input);
317
317
  rootKeySet.set(rootKey, {
318
318
  namespace: keyPrefix,
319
- representationName: RepresentationType$4,
319
+ representationName: RepresentationType$5,
320
320
  mergeable: false
321
321
  });
322
322
  }
323
323
 
324
- function select$8(luvio, params) {
325
- return select$9();
324
+ function select$a(luvio, params) {
325
+ return select$b();
326
326
  }
327
- function keyBuilder$8(luvio, params) {
328
- return keyBuilder$9(luvio, {
327
+ function keyBuilder$9(luvio, params) {
328
+ return keyBuilder$a(luvio, {
329
329
  id: params.urlParams.id
330
330
  });
331
331
  }
332
- function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
333
- getTypeCacheKeys$4(storeKeyMap, luvio, response);
332
+ function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
333
+ getTypeCacheKeys$5(storeKeyMap, luvio, response);
334
334
  }
335
- function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
335
+ function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
336
336
  const { body } = response;
337
- const key = keyBuilder$8(luvio, resourceParams);
338
- luvio.storeIngest(key, ingest$4, body);
337
+ const key = keyBuilder$9(luvio, resourceParams);
338
+ luvio.storeIngest(key, ingest$5, body);
339
339
  const snapshot = luvio.storeLookup({
340
340
  recordId: key,
341
- node: select$8(),
341
+ node: select$a(),
342
342
  variables: {},
343
343
  }, snapshotRefresh);
344
344
  if (process.env.NODE_ENV !== 'production') {
@@ -350,18 +350,18 @@ function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
350
350
  return snapshot;
351
351
  }
352
352
  function ingestError$2(luvio, params, error, snapshotRefresh) {
353
- const key = keyBuilder$8(luvio, params);
353
+ const key = keyBuilder$9(luvio, params);
354
354
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
355
355
  const storeMetadataParams = {
356
- ttl: TTL$4,
356
+ ttl: TTL$5,
357
357
  namespace: keyPrefix,
358
- version: VERSION$4,
359
- representationName: RepresentationType$4
358
+ version: VERSION$5,
359
+ representationName: RepresentationType$5
360
360
  };
361
361
  luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
362
362
  return errorSnapshot;
363
363
  }
364
- function createResourceRequest$4(config) {
364
+ function createResourceRequest$5(config) {
365
365
  const headers = {};
366
366
  return {
367
367
  baseUri: '/services/data/v62.0',
@@ -375,60 +375,60 @@ function createResourceRequest$4(config) {
375
375
  };
376
376
  }
377
377
 
378
- const adapterName$4 = 'getConversationGenerativeInsight';
378
+ const adapterName$5 = 'getConversationGenerativeInsight';
379
379
  const getConversationGenerativeInsight_ConfigPropertyMetadata = [
380
380
  generateParamConfigMetadata('id', true, 0 /* UrlParameter */, 0 /* String */),
381
381
  ];
382
- const getConversationGenerativeInsight_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getConversationGenerativeInsight_ConfigPropertyMetadata);
383
- const createResourceParams$4 = /*#__PURE__*/ createResourceParams$5(getConversationGenerativeInsight_ConfigPropertyMetadata);
384
- function keyBuilder$7(luvio, config) {
385
- const resourceParams = createResourceParams$4(config);
386
- return keyBuilder$8(luvio, resourceParams);
382
+ const getConversationGenerativeInsight_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, getConversationGenerativeInsight_ConfigPropertyMetadata);
383
+ const createResourceParams$5 = /*#__PURE__*/ createResourceParams$6(getConversationGenerativeInsight_ConfigPropertyMetadata);
384
+ function keyBuilder$8(luvio, config) {
385
+ const resourceParams = createResourceParams$5(config);
386
+ return keyBuilder$9(luvio, resourceParams);
387
387
  }
388
- function typeCheckConfig$4(untrustedConfig) {
388
+ function typeCheckConfig$5(untrustedConfig) {
389
389
  const config = {};
390
- typeCheckConfig$5(untrustedConfig, config, getConversationGenerativeInsight_ConfigPropertyMetadata);
390
+ typeCheckConfig$6(untrustedConfig, config, getConversationGenerativeInsight_ConfigPropertyMetadata);
391
391
  return config;
392
392
  }
393
- function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
393
+ function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
394
394
  if (!untrustedIsObject(untrustedConfig)) {
395
395
  return null;
396
396
  }
397
397
  if (process.env.NODE_ENV !== 'production') {
398
398
  validateConfig(untrustedConfig, configPropertyNames);
399
399
  }
400
- const config = typeCheckConfig$4(untrustedConfig);
400
+ const config = typeCheckConfig$5(untrustedConfig);
401
401
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
402
402
  return null;
403
403
  }
404
404
  return config;
405
405
  }
406
406
  function adapterFragment$2(luvio, config) {
407
- createResourceParams$4(config);
408
- return select$8();
407
+ createResourceParams$5(config);
408
+ return select$a();
409
409
  }
410
410
  function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
411
- const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
411
+ const snapshot = ingestSuccess$5(luvio, resourceParams, response, {
412
412
  config,
413
- resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
413
+ resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
414
414
  });
415
415
  return luvio.storeBroadcast().then(() => snapshot);
416
416
  }
417
417
  function onFetchResponseError$2(luvio, config, resourceParams, response) {
418
418
  const snapshot = ingestError$2(luvio, resourceParams, response, {
419
419
  config,
420
- resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
420
+ resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
421
421
  });
422
422
  return luvio.storeBroadcast().then(() => snapshot);
423
423
  }
424
- function buildNetworkSnapshot$4(luvio, config, options) {
425
- const resourceParams = createResourceParams$4(config);
426
- const request = createResourceRequest$4(resourceParams);
424
+ function buildNetworkSnapshot$5(luvio, config, options) {
425
+ const resourceParams = createResourceParams$5(config);
426
+ const request = createResourceRequest$5(resourceParams);
427
427
  return luvio.dispatchResourceRequest(request, options)
428
428
  .then((response) => {
429
429
  return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
430
430
  const cache = new StoreKeyMap();
431
- getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
431
+ getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
432
432
  return cache;
433
433
  });
434
434
  }, (response) => {
@@ -436,23 +436,23 @@ function buildNetworkSnapshot$4(luvio, config, options) {
436
436
  });
437
437
  }
438
438
  function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
439
- return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, undefined, false);
439
+ return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$5, undefined, false);
440
440
  }
441
441
  function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
442
442
  const { luvio, config } = context;
443
443
  const selector = {
444
- recordId: keyBuilder$7(luvio, config),
444
+ recordId: keyBuilder$8(luvio, config),
445
445
  node: adapterFragment$2(luvio, config),
446
446
  variables: {},
447
447
  };
448
448
  const cacheSnapshot = storeLookup(selector, {
449
449
  config,
450
- resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
450
+ resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
451
451
  });
452
452
  return cacheSnapshot;
453
453
  }
454
454
  const getConversationGenerativeInsightAdapterFactory = (luvio) => function eci__getConversationGenerativeInsight(untrustedConfig, requestContext) {
455
- const config = validateAdapterConfig$4(untrustedConfig, getConversationGenerativeInsight_ConfigPropertyNames);
455
+ const config = validateAdapterConfig$5(untrustedConfig, getConversationGenerativeInsight_ConfigPropertyNames);
456
456
  // Invalid or incomplete config
457
457
  if (config === null) {
458
458
  return null;
@@ -461,9 +461,9 @@ const getConversationGenerativeInsightAdapterFactory = (luvio) => function eci__
461
461
  buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
462
462
  };
463
463
 
464
- const TTL$3 = 60000;
465
- const VERSION$3 = "92b95a3b99090d0e464e4259ecac6bb4";
466
- function validate$3(obj, path = 'ConversationRealtimeMeetingInitiationResponseRepresentation') {
464
+ const TTL$4 = 60000;
465
+ const VERSION$4 = "92b95a3b99090d0e464e4259ecac6bb4";
466
+ function validate$4(obj, path = 'ConversationRealtimeMeetingInitiationResponseRepresentation') {
467
467
  const v_error = (() => {
468
468
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
469
469
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -500,23 +500,23 @@ function validate$3(obj, path = 'ConversationRealtimeMeetingInitiationResponseRe
500
500
  })();
501
501
  return v_error === undefined ? null : v_error;
502
502
  }
503
- const RepresentationType$3 = 'ConversationRealtimeMeetingInitiationResponseRepresentation';
504
- function keyBuilder$6(luvio, config) {
505
- return keyPrefix + '::' + RepresentationType$3 + ':' + config.id;
503
+ const RepresentationType$4 = 'ConversationRealtimeMeetingInitiationResponseRepresentation';
504
+ function keyBuilder$7(luvio, config) {
505
+ return keyPrefix + '::' + RepresentationType$4 + ':' + config.id;
506
506
  }
507
- function keyBuilderFromType$2(luvio, object) {
507
+ function keyBuilderFromType$3(luvio, object) {
508
508
  const keyParams = {
509
509
  id: object.botId
510
510
  };
511
- return keyBuilder$6(luvio, keyParams);
511
+ return keyBuilder$7(luvio, keyParams);
512
512
  }
513
- function normalize$3(input, existing, path, luvio, store, timestamp) {
513
+ function normalize$4(input, existing, path, luvio, store, timestamp) {
514
514
  return input;
515
515
  }
516
- const select$7 = function ConversationRealtimeMeetingInitiationResponseRepresentationSelect() {
516
+ const select$9 = function ConversationRealtimeMeetingInitiationResponseRepresentationSelect() {
517
517
  return {
518
518
  kind: 'Fragment',
519
- version: VERSION$3,
519
+ version: VERSION$4,
520
520
  private: [],
521
521
  selections: [
522
522
  {
@@ -539,7 +539,7 @@ const select$7 = function ConversationRealtimeMeetingInitiationResponseRepresent
539
539
  ]
540
540
  };
541
541
  };
542
- function equals$3(existing, incoming) {
542
+ function equals$4(existing, incoming) {
543
543
  const existing_botId = existing.botId;
544
544
  const incoming_botId = incoming.botId;
545
545
  if (!(existing_botId === incoming_botId)) {
@@ -567,7 +567,169 @@ function equals$3(existing, incoming) {
567
567
  }
568
568
  return true;
569
569
  }
570
- const ingest$3 = function ConversationRealtimeMeetingInitiationResponseRepresentationIngest(input, path, luvio, store, timestamp) {
570
+ const ingest$4 = function ConversationRealtimeMeetingInitiationResponseRepresentationIngest(input, path, luvio, store, timestamp) {
571
+ if (process.env.NODE_ENV !== 'production') {
572
+ const validateError = validate$4(input);
573
+ if (validateError !== null) {
574
+ throw validateError;
575
+ }
576
+ }
577
+ const key = keyBuilderFromType$3(luvio, input);
578
+ const ttlToUse = TTL$4;
579
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "eci", VERSION$4, RepresentationType$4, equals$4);
580
+ return createLink(key);
581
+ };
582
+ function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
583
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
584
+ const rootKey = keyBuilderFromType$3(luvio, input);
585
+ rootKeySet.set(rootKey, {
586
+ namespace: keyPrefix,
587
+ representationName: RepresentationType$4,
588
+ mergeable: false
589
+ });
590
+ }
591
+
592
+ function select$8(luvio, params) {
593
+ return select$9();
594
+ }
595
+ function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
596
+ getTypeCacheKeys$4(storeKeyMap, luvio, response);
597
+ }
598
+ function ingestSuccess$4(luvio, resourceParams, response) {
599
+ const { body } = response;
600
+ const key = keyBuilderFromType$3(luvio, body);
601
+ luvio.storeIngest(key, ingest$4, body);
602
+ const snapshot = luvio.storeLookup({
603
+ recordId: key,
604
+ node: select$8(),
605
+ variables: {},
606
+ });
607
+ if (process.env.NODE_ENV !== 'production') {
608
+ if (snapshot.state !== 'Fulfilled') {
609
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
610
+ }
611
+ }
612
+ deepFreeze(snapshot.data);
613
+ return snapshot;
614
+ }
615
+ function createResourceRequest$4(config) {
616
+ const headers = {};
617
+ return {
618
+ baseUri: '/services/data/v62.0',
619
+ basePath: '/conversation/realtime/insight/meeting/initiate',
620
+ method: 'post',
621
+ body: config.body,
622
+ urlParams: {},
623
+ queryParams: {},
624
+ headers,
625
+ priority: 'normal',
626
+ };
627
+ }
628
+
629
+ const adapterName$4 = 'initiateMeeting';
630
+ const initiateMeeting_ConfigPropertyMetadata = [
631
+ generateParamConfigMetadata('meetingUrl', true, 2 /* Body */, 0 /* String */),
632
+ generateParamConfigMetadata('vendorName', true, 2 /* Body */, 0 /* String */),
633
+ ];
634
+ const initiateMeeting_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, initiateMeeting_ConfigPropertyMetadata);
635
+ const createResourceParams$4 = /*#__PURE__*/ createResourceParams$6(initiateMeeting_ConfigPropertyMetadata);
636
+ function typeCheckConfig$4(untrustedConfig) {
637
+ const config = {};
638
+ typeCheckConfig$6(untrustedConfig, config, initiateMeeting_ConfigPropertyMetadata);
639
+ return config;
640
+ }
641
+ function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
642
+ if (!untrustedIsObject(untrustedConfig)) {
643
+ return null;
644
+ }
645
+ if (process.env.NODE_ENV !== 'production') {
646
+ validateConfig(untrustedConfig, configPropertyNames);
647
+ }
648
+ const config = typeCheckConfig$4(untrustedConfig);
649
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
650
+ return null;
651
+ }
652
+ return config;
653
+ }
654
+ function buildNetworkSnapshot$4(luvio, config, options) {
655
+ const resourceParams = createResourceParams$4(config);
656
+ const request = createResourceRequest$4(resourceParams);
657
+ return luvio.dispatchResourceRequest(request, options)
658
+ .then((response) => {
659
+ return luvio.handleSuccessResponse(() => {
660
+ const snapshot = ingestSuccess$4(luvio, resourceParams, response);
661
+ return luvio.storeBroadcast().then(() => snapshot);
662
+ }, () => {
663
+ const cache = new StoreKeyMap();
664
+ getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
665
+ return cache;
666
+ });
667
+ }, (response) => {
668
+ deepFreeze(response);
669
+ throw response;
670
+ });
671
+ }
672
+ const initiateMeetingAdapterFactory = (luvio) => {
673
+ return function initiateMeeting(untrustedConfig) {
674
+ const config = validateAdapterConfig$4(untrustedConfig, initiateMeeting_ConfigPropertyNames);
675
+ // Invalid or incomplete config
676
+ if (config === null) {
677
+ throw new Error('Invalid config for "initiateMeeting"');
678
+ }
679
+ return buildNetworkSnapshot$4(luvio, config);
680
+ };
681
+ };
682
+
683
+ const TTL$3 = 60000;
684
+ const VERSION$3 = "5b78cffe02ee49666328e048929ba644";
685
+ function validate$3(obj, path = 'ConversationRealtimeEndMeetingResponseRepresentation') {
686
+ const v_error = (() => {
687
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
688
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
689
+ }
690
+ const obj_fakeKey = obj.fakeKey;
691
+ const path_fakeKey = path + '.fakeKey';
692
+ if (typeof obj_fakeKey !== 'string') {
693
+ return new TypeError('Expected "string" but received "' + typeof obj_fakeKey + '" (at "' + path_fakeKey + '")');
694
+ }
695
+ })();
696
+ return v_error === undefined ? null : v_error;
697
+ }
698
+ const RepresentationType$3 = 'ConversationRealtimeEndMeetingResponseRepresentation';
699
+ function keyBuilder$6(luvio, config) {
700
+ return keyPrefix + '::' + RepresentationType$3 + ':' + config.fakeKey;
701
+ }
702
+ function keyBuilderFromType$2(luvio, object) {
703
+ const keyParams = {
704
+ fakeKey: object.fakeKey
705
+ };
706
+ return keyBuilder$6(luvio, keyParams);
707
+ }
708
+ function normalize$3(input, existing, path, luvio, store, timestamp) {
709
+ return input;
710
+ }
711
+ const select$7 = function ConversationRealtimeEndMeetingResponseRepresentationSelect() {
712
+ return {
713
+ kind: 'Fragment',
714
+ version: VERSION$3,
715
+ private: [],
716
+ selections: [
717
+ {
718
+ name: 'fakeKey',
719
+ kind: 'Scalar'
720
+ }
721
+ ]
722
+ };
723
+ };
724
+ function equals$3(existing, incoming) {
725
+ const existing_fakeKey = existing.fakeKey;
726
+ const incoming_fakeKey = incoming.fakeKey;
727
+ if (!(existing_fakeKey === incoming_fakeKey)) {
728
+ return false;
729
+ }
730
+ return true;
731
+ }
732
+ const ingest$3 = function ConversationRealtimeEndMeetingResponseRepresentationIngest(input, path, luvio, store, timestamp) {
571
733
  if (process.env.NODE_ENV !== 'production') {
572
734
  const validateError = validate$3(input);
573
735
  if (validateError !== null) {
@@ -616,7 +778,7 @@ function createResourceRequest$3(config) {
616
778
  const headers = {};
617
779
  return {
618
780
  baseUri: '/services/data/v62.0',
619
- basePath: '/conversation/realtime/insight/meeting/initiate',
781
+ basePath: '/conversation/realtime/insight/meeting/terminate',
620
782
  method: 'post',
621
783
  body: config.body,
622
784
  urlParams: {},
@@ -626,15 +788,15 @@ function createResourceRequest$3(config) {
626
788
  };
627
789
  }
628
790
 
629
- const adapterName$3 = 'initiateMeeting';
630
- const initiateMeeting_ConfigPropertyMetadata = [
631
- generateParamConfigMetadata('meetingUrl', true, 2 /* Body */, 0 /* String */),
791
+ const adapterName$3 = 'terminateMeeting';
792
+ const terminateMeeting_ConfigPropertyMetadata = [
793
+ generateParamConfigMetadata('botId', true, 2 /* Body */, 0 /* String */),
632
794
  ];
633
- const initiateMeeting_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, initiateMeeting_ConfigPropertyMetadata);
634
- const createResourceParams$3 = /*#__PURE__*/ createResourceParams$5(initiateMeeting_ConfigPropertyMetadata);
795
+ const terminateMeeting_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, terminateMeeting_ConfigPropertyMetadata);
796
+ const createResourceParams$3 = /*#__PURE__*/ createResourceParams$6(terminateMeeting_ConfigPropertyMetadata);
635
797
  function typeCheckConfig$3(untrustedConfig) {
636
798
  const config = {};
637
- typeCheckConfig$5(untrustedConfig, config, initiateMeeting_ConfigPropertyMetadata);
799
+ typeCheckConfig$6(untrustedConfig, config, terminateMeeting_ConfigPropertyMetadata);
638
800
  return config;
639
801
  }
640
802
  function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
@@ -668,12 +830,12 @@ function buildNetworkSnapshot$3(luvio, config, options) {
668
830
  throw response;
669
831
  });
670
832
  }
671
- const initiateMeetingAdapterFactory = (luvio) => {
672
- return function initiateMeeting(untrustedConfig) {
673
- const config = validateAdapterConfig$3(untrustedConfig, initiateMeeting_ConfigPropertyNames);
833
+ const terminateMeetingAdapterFactory = (luvio) => {
834
+ return function terminateMeeting(untrustedConfig) {
835
+ const config = validateAdapterConfig$3(untrustedConfig, terminateMeeting_ConfigPropertyNames);
674
836
  // Invalid or incomplete config
675
837
  if (config === null) {
676
- throw new Error('Invalid config for "initiateMeeting"');
838
+ throw new Error('Invalid config for "terminateMeeting"');
677
839
  }
678
840
  return buildNetworkSnapshot$3(luvio, config);
679
841
  };
@@ -925,10 +1087,10 @@ const generateConversationSummary_ConfigPropertyMetadata = [
925
1087
  generateParamConfigMetadata('conversationId', true, 0 /* UrlParameter */, 0 /* String */),
926
1088
  ];
927
1089
  const generateConversationSummary_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, generateConversationSummary_ConfigPropertyMetadata);
928
- const createResourceParams$2 = /*#__PURE__*/ createResourceParams$5(generateConversationSummary_ConfigPropertyMetadata);
1090
+ const createResourceParams$2 = /*#__PURE__*/ createResourceParams$6(generateConversationSummary_ConfigPropertyMetadata);
929
1091
  function typeCheckConfig$2(untrustedConfig) {
930
1092
  const config = {};
931
- typeCheckConfig$5(untrustedConfig, config, generateConversationSummary_ConfigPropertyMetadata);
1093
+ typeCheckConfig$6(untrustedConfig, config, generateConversationSummary_ConfigPropertyMetadata);
932
1094
  return config;
933
1095
  }
934
1096
  function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
@@ -1178,14 +1340,14 @@ const getConversationSummaryRelatedList_ConfigPropertyMetadata = [
1178
1340
  generateParamConfigMetadata('id', true, 0 /* UrlParameter */, 0 /* String */),
1179
1341
  ];
1180
1342
  const getConversationSummaryRelatedList_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getConversationSummaryRelatedList_ConfigPropertyMetadata);
1181
- const createResourceParams$1 = /*#__PURE__*/ createResourceParams$5(getConversationSummaryRelatedList_ConfigPropertyMetadata);
1343
+ const createResourceParams$1 = /*#__PURE__*/ createResourceParams$6(getConversationSummaryRelatedList_ConfigPropertyMetadata);
1182
1344
  function keyBuilder$2(luvio, config) {
1183
1345
  const resourceParams = createResourceParams$1(config);
1184
1346
  return keyBuilder$3(luvio, resourceParams);
1185
1347
  }
1186
1348
  function typeCheckConfig$1(untrustedConfig) {
1187
1349
  const config = {};
1188
- typeCheckConfig$5(untrustedConfig, config, getConversationSummaryRelatedList_ConfigPropertyMetadata);
1350
+ typeCheckConfig$6(untrustedConfig, config, getConversationSummaryRelatedList_ConfigPropertyMetadata);
1189
1351
  return config;
1190
1352
  }
1191
1353
  function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
@@ -1429,14 +1591,14 @@ const getTranscript_ConfigPropertyMetadata = [
1429
1591
  generateParamConfigMetadata('includeData', false, 1 /* QueryParameter */, 1 /* Boolean */),
1430
1592
  ];
1431
1593
  const getTranscript_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getTranscript_ConfigPropertyMetadata);
1432
- const createResourceParams = /*#__PURE__*/ createResourceParams$5(getTranscript_ConfigPropertyMetadata);
1594
+ const createResourceParams = /*#__PURE__*/ createResourceParams$6(getTranscript_ConfigPropertyMetadata);
1433
1595
  function keyBuilder(luvio, config) {
1434
1596
  const resourceParams = createResourceParams(config);
1435
1597
  return keyBuilder$1(luvio, resourceParams);
1436
1598
  }
1437
1599
  function typeCheckConfig(untrustedConfig) {
1438
1600
  const config = {};
1439
- typeCheckConfig$5(untrustedConfig, config, getTranscript_ConfigPropertyMetadata);
1601
+ typeCheckConfig$6(untrustedConfig, config, getTranscript_ConfigPropertyMetadata);
1440
1602
  return config;
1441
1603
  }
1442
1604
  function validateAdapterConfig(untrustedConfig, configPropertyNames) {
@@ -1510,4 +1672,4 @@ const getTranscriptAdapterFactory = (luvio) => function eci__getTranscript(untru
1510
1672
  buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
1511
1673
  };
1512
1674
 
1513
- export { generateConversationSummaryAdapterFactory, getConversationGenerativeInsightAdapterFactory, getConversationSummaryRelatedListAdapterFactory, getTranscriptAdapterFactory, initiateMeetingAdapterFactory };
1675
+ export { generateConversationSummaryAdapterFactory, getConversationGenerativeInsightAdapterFactory, getConversationSummaryRelatedListAdapterFactory, getTranscriptAdapterFactory, initiateMeetingAdapterFactory, terminateMeetingAdapterFactory };
@@ -7,6 +7,7 @@ export declare const initiateMeeting_ConfigPropertyMetadata: $64$luvio_engine_Ad
7
7
  export declare const initiateMeeting_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
8
8
  export interface InitiateMeetingConfig {
9
9
  meetingUrl: string;
10
+ vendorName: string;
10
11
  }
11
12
  export declare const createResourceParams: (config: InitiateMeetingConfig) => resources_postConversationRealtimeInsightMeetingInitiate_ResourceRequestConfig;
12
13
  export declare function typeCheckConfig(untrustedConfig: adapter$45$utils_Untrusted<InitiateMeetingConfig>): adapter$45$utils_Untrusted<InitiateMeetingConfig>;
@@ -0,0 +1,15 @@
1
+ import { AdapterConfigMetadata as $64$luvio_engine_AdapterConfigMetadata, Luvio as $64$luvio_engine_Luvio, DispatchResourceRequestContext as $64$luvio_engine_DispatchResourceRequestContext, AdapterFactory as $64$luvio_engine_AdapterFactory } from '@luvio/engine';
2
+ import { Untrusted as adapter$45$utils_Untrusted, AdapterValidationConfig as adapter$45$utils_AdapterValidationConfig } from './adapter-utils';
3
+ import { ResourceRequestConfig as resources_postConversationRealtimeInsightMeetingTerminate_ResourceRequestConfig } from '../resources/postConversationRealtimeInsightMeetingTerminate';
4
+ import { ConversationRealtimeEndMeetingResponseRepresentation as types_ConversationRealtimeEndMeetingResponseRepresentation_ConversationRealtimeEndMeetingResponseRepresentation } from '../types/ConversationRealtimeEndMeetingResponseRepresentation';
5
+ export declare const adapterName = "terminateMeeting";
6
+ export declare const terminateMeeting_ConfigPropertyMetadata: $64$luvio_engine_AdapterConfigMetadata[];
7
+ export declare const terminateMeeting_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
8
+ export interface TerminateMeetingConfig {
9
+ botId: string;
10
+ }
11
+ export declare const createResourceParams: (config: TerminateMeetingConfig) => resources_postConversationRealtimeInsightMeetingTerminate_ResourceRequestConfig;
12
+ export declare function typeCheckConfig(untrustedConfig: adapter$45$utils_Untrusted<TerminateMeetingConfig>): adapter$45$utils_Untrusted<TerminateMeetingConfig>;
13
+ export declare function validateAdapterConfig(untrustedConfig: unknown, configPropertyNames: adapter$45$utils_AdapterValidationConfig): TerminateMeetingConfig | null;
14
+ export declare function buildNetworkSnapshot(luvio: $64$luvio_engine_Luvio, config: TerminateMeetingConfig, options?: $64$luvio_engine_DispatchResourceRequestContext): Promise<import("@luvio/engine").FulfilledSnapshot<types_ConversationRealtimeEndMeetingResponseRepresentation_ConversationRealtimeEndMeetingResponseRepresentation, {}> | import("@luvio/engine").StaleSnapshot<types_ConversationRealtimeEndMeetingResponseRepresentation_ConversationRealtimeEndMeetingResponseRepresentation, {}> | import("@luvio/engine").PendingSnapshot<types_ConversationRealtimeEndMeetingResponseRepresentation_ConversationRealtimeEndMeetingResponseRepresentation, any>>;
15
+ export declare const terminateMeetingAdapterFactory: $64$luvio_engine_AdapterFactory<TerminateMeetingConfig, types_ConversationRealtimeEndMeetingResponseRepresentation_ConversationRealtimeEndMeetingResponseRepresentation>;