@salesforce/lds-adapters-service-einsteinllm 1.379.1 → 1.380.0-dev10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/es/es2018/service-einsteinllm.js +2775 -396
  2. package/dist/es/es2018/types/src/generated/adapters/createPromptTemplate.d.ts +22 -0
  3. package/dist/es/es2018/types/src/generated/adapters/createPromptTemplateVersion.d.ts +23 -0
  4. package/dist/es/es2018/types/src/generated/adapters/getDataProviderInstanceConfig.d.ts +31 -0
  5. package/dist/es/es2018/types/src/generated/adapters/getDataProviderTypeConfigs.d.ts +27 -0
  6. package/dist/es/es2018/types/src/generated/adapters/getDataProviders.d.ts +29 -0
  7. package/dist/es/es2018/types/src/generated/adapters/getInputMappedDataProviders.d.ts +30 -0
  8. package/dist/es/es2018/types/src/generated/adapters/getPromptTemplateVersion.d.ts +30 -0
  9. package/dist/es/es2018/types/src/generated/adapters/getPromptTemplateVersions.d.ts +29 -0
  10. package/dist/es/es2018/types/src/generated/adapters/putEinsteinPromptTemplateVersionStatus.d.ts +18 -0
  11. package/dist/es/es2018/types/src/generated/adapters/updatePromptTemplateVersion.d.ts +24 -0
  12. package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +10 -0
  13. package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +17 -1
  14. package/dist/es/es2018/types/src/generated/resources/getEinsteinPromptTemplatesDataProviderTypesByTemplateType.d.ts +15 -0
  15. package/dist/es/es2018/types/src/generated/resources/getEinsteinPromptTemplatesDataProvidersByTemplateType.d.ts +19 -0
  16. package/dist/es/es2018/types/src/generated/resources/getEinsteinPromptTemplatesVersionsByPromptTemplateDevName.d.ts +19 -0
  17. package/dist/es/es2018/types/src/generated/resources/getEinsteinPromptTemplatesVersionsByPromptTemplateDevNameAndVersionId.d.ts +20 -0
  18. package/dist/es/es2018/types/src/generated/resources/postEinsteinPromptTemplates.d.ts +19 -0
  19. package/dist/es/es2018/types/src/generated/resources/postEinsteinPromptTemplatesDataProviderDescribe.d.ts +19 -0
  20. package/dist/es/es2018/types/src/generated/resources/postEinsteinPromptTemplatesDataProvidersMapped.d.ts +18 -0
  21. package/dist/es/es2018/types/src/generated/resources/postEinsteinPromptTemplatesVersionsByPromptTemplateDevName.d.ts +22 -0
  22. package/dist/es/es2018/types/src/generated/resources/putEinsteinPromptTemplatesVersionsByPromptTemplateDevNameAndVersionId.d.ts +23 -0
  23. package/dist/es/es2018/types/src/generated/resources/putEinsteinPromptTemplatesVersionsStatusByPromptTemplateDevNameAndVersionId.d.ts +17 -0
  24. package/dist/es/es2018/types/src/generated/types/EinsteinLlmGenerationCitationRepresentation.d.ts +29 -0
  25. package/dist/es/es2018/types/src/generated/types/EinsteinLlmGenerationGenAiCitedReferenceRepresentation.d.ts +40 -0
  26. package/dist/es/es2018/types/src/generated/types/EinsteinPromptRecordInputRepresentation.d.ts +45 -0
  27. package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplateGenerationsRepresentation.d.ts +7 -1
  28. package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplateRepresentation.d.ts +62 -0
  29. package/dist/es/es2018/types/src/generated/types/PromptTemplateDataProviderDiscoveryInputRepresentation.d.ts +37 -0
  30. package/dist/es/es2018/types/src/generated/types/PromptTemplateDataProviderInputParamRepresentation.d.ts +37 -0
  31. package/dist/es/es2018/types/src/generated/types/PromptTemplateDataProviderInstanceConfigCollectionRepresentation.d.ts +30 -0
  32. package/dist/es/es2018/types/src/generated/types/PromptTemplateDataProviderInstanceConfigInputRepresentation.d.ts +38 -0
  33. package/dist/es/es2018/types/src/generated/types/PromptTemplateDataProviderInstanceConfigRepresentation.d.ts +77 -0
  34. package/dist/es/es2018/types/src/generated/types/PromptTemplateDataProviderOutputParamRepresentation.d.ts +31 -0
  35. package/dist/es/es2018/types/src/generated/types/PromptTemplateDataProviderTypeConfigCollectionRepresentation.d.ts +30 -0
  36. package/dist/es/es2018/types/src/generated/types/PromptTemplateDataProviderTypeConfigRepresentation.d.ts +46 -0
  37. package/dist/es/es2018/types/src/generated/types/WrappedMap.d.ts +3 -3
  38. package/package.json +4 -4
  39. package/sfdc/index.js +3038 -579
  40. package/src/raml/api.raml +470 -1
  41. package/src/raml/luvio.raml +61 -0
@@ -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$4, StoreKeyMap, createResourceParams as createResourceParams$7, typeCheckConfig as typeCheckConfig$7 } from '@luvio/engine';
7
+ import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$a, StoreKeyMap, createResourceParams as createResourceParams$h, typeCheckConfig as typeCheckConfig$h } from '@luvio/engine';
8
8
 
9
9
  const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
10
10
  const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
@@ -168,7 +168,7 @@ function createLink(ref) {
168
168
  };
169
169
  }
170
170
 
171
- function validate$s(obj, path = 'EinsteinLlmEmbeddingsAdditionalConfigInputRepresentation') {
171
+ function validate$B(obj, path = 'EinsteinLlmEmbeddingsAdditionalConfigInputRepresentation') {
172
172
  const v_error = (() => {
173
173
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
174
174
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -212,7 +212,7 @@ function validate$s(obj, path = 'EinsteinLlmEmbeddingsAdditionalConfigInputRepre
212
212
  return v_error === undefined ? null : v_error;
213
213
  }
214
214
 
215
- function validate$r(obj, path = 'WrappedListString') {
215
+ function validate$A(obj, path = 'WrappedListString') {
216
216
  const v_error = (() => {
217
217
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
218
218
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -233,14 +233,14 @@ function validate$r(obj, path = 'WrappedListString') {
233
233
  return v_error === undefined ? null : v_error;
234
234
  }
235
235
 
236
- function validate$q(obj, path = 'EinsteinLlmEmbeddingsInputRepresentation') {
236
+ function validate$z(obj, path = 'EinsteinLlmEmbeddingsInputRepresentation') {
237
237
  const v_error = (() => {
238
238
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
239
239
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
240
240
  }
241
241
  const obj_additionalConfig = obj.additionalConfig;
242
242
  const path_additionalConfig = path + '.additionalConfig';
243
- const referencepath_additionalConfigValidationError = validate$s(obj_additionalConfig, path_additionalConfig);
243
+ const referencepath_additionalConfigValidationError = validate$B(obj_additionalConfig, path_additionalConfig);
244
244
  if (referencepath_additionalConfigValidationError !== null) {
245
245
  let message = 'Object doesn\'t match EinsteinLlmEmbeddingsAdditionalConfigInputRepresentation (at "' + path_additionalConfig + '")\n';
246
246
  message += referencepath_additionalConfigValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -248,7 +248,7 @@ function validate$q(obj, path = 'EinsteinLlmEmbeddingsInputRepresentation') {
248
248
  }
249
249
  const obj_prompts = obj.prompts;
250
250
  const path_prompts = path + '.prompts';
251
- const referencepath_promptsValidationError = validate$r(obj_prompts, path_prompts);
251
+ const referencepath_promptsValidationError = validate$A(obj_prompts, path_prompts);
252
252
  if (referencepath_promptsValidationError !== null) {
253
253
  let message = 'Object doesn\'t match WrappedListString (at "' + path_prompts + '")\n';
254
254
  message += referencepath_promptsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -265,8 +265,8 @@ function validate$q(obj, path = 'EinsteinLlmEmbeddingsInputRepresentation') {
265
265
  return v_error === undefined ? null : v_error;
266
266
  }
267
267
 
268
- const VERSION$j = "5ed5ccc6fa6f15691ec0fc1080e41fe6";
269
- function validate$p(obj, path = 'EinsteinLlmEmbeddingItemRepresentation') {
268
+ const VERSION$p = "5ed5ccc6fa6f15691ec0fc1080e41fe6";
269
+ function validate$y(obj, path = 'EinsteinLlmEmbeddingItemRepresentation') {
270
270
  const v_error = (() => {
271
271
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
272
272
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -287,10 +287,10 @@ function validate$p(obj, path = 'EinsteinLlmEmbeddingItemRepresentation') {
287
287
  })();
288
288
  return v_error === undefined ? null : v_error;
289
289
  }
290
- const select$q = function EinsteinLlmEmbeddingItemRepresentationSelect() {
290
+ const select$G = function EinsteinLlmEmbeddingItemRepresentationSelect() {
291
291
  return {
292
292
  kind: 'Fragment',
293
- version: VERSION$j,
293
+ version: VERSION$p,
294
294
  private: [],
295
295
  selections: [
296
296
  {
@@ -305,7 +305,7 @@ const select$q = function EinsteinLlmEmbeddingItemRepresentationSelect() {
305
305
  ]
306
306
  };
307
307
  };
308
- function equals$j(existing, incoming) {
308
+ function equals$p(existing, incoming) {
309
309
  const existing_index = existing.index;
310
310
  const incoming_index = incoming.index;
311
311
  if (!(existing_index === incoming_index)) {
@@ -324,9 +324,9 @@ function equals$j(existing, incoming) {
324
324
  return true;
325
325
  }
326
326
 
327
- const TTL$6 = 100;
328
- const VERSION$i = "d9873651f09d29764ef4d4231eb653d7";
329
- function validate$o(obj, path = 'EinsteinLlmEmbeddingsRepresentation') {
327
+ const TTL$a = 100;
328
+ const VERSION$o = "d9873651f09d29764ef4d4231eb653d7";
329
+ function validate$x(obj, path = 'EinsteinLlmEmbeddingsRepresentation') {
330
330
  const v_error = (() => {
331
331
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
332
332
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -339,7 +339,7 @@ function validate$o(obj, path = 'EinsteinLlmEmbeddingsRepresentation') {
339
339
  for (let i = 0; i < obj_embeddings.length; i++) {
340
340
  const obj_embeddings_item = obj_embeddings[i];
341
341
  const path_embeddings_item = path_embeddings + '[' + i + ']';
342
- const referencepath_embeddings_itemValidationError = validate$p(obj_embeddings_item, path_embeddings_item);
342
+ const referencepath_embeddings_itemValidationError = validate$y(obj_embeddings_item, path_embeddings_item);
343
343
  if (referencepath_embeddings_itemValidationError !== null) {
344
344
  let message = 'Object doesn\'t match EinsteinLlmEmbeddingItemRepresentation (at "' + path_embeddings_item + '")\n';
345
345
  message += referencepath_embeddings_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -363,15 +363,15 @@ function validate$o(obj, path = 'EinsteinLlmEmbeddingsRepresentation') {
363
363
  })();
364
364
  return v_error === undefined ? null : v_error;
365
365
  }
366
- const RepresentationType$6 = 'EinsteinLlmEmbeddingsRepresentation';
367
- function normalize$6(input, existing, path, luvio, store, timestamp) {
366
+ const RepresentationType$a = 'EinsteinLlmEmbeddingsRepresentation';
367
+ function normalize$a(input, existing, path, luvio, store, timestamp) {
368
368
  return input;
369
369
  }
370
- const select$p = function EinsteinLlmEmbeddingsRepresentationSelect() {
371
- const { selections: EinsteinLlmEmbeddingItemRepresentation__selections, opaque: EinsteinLlmEmbeddingItemRepresentation__opaque, } = select$q();
370
+ const select$F = function EinsteinLlmEmbeddingsRepresentationSelect() {
371
+ const { selections: EinsteinLlmEmbeddingItemRepresentation__selections, opaque: EinsteinLlmEmbeddingItemRepresentation__opaque, } = select$G();
372
372
  return {
373
373
  kind: 'Fragment',
374
- version: VERSION$i,
374
+ version: VERSION$o,
375
375
  private: [],
376
376
  selections: [
377
377
  {
@@ -388,11 +388,11 @@ const select$p = function EinsteinLlmEmbeddingsRepresentationSelect() {
388
388
  ]
389
389
  };
390
390
  };
391
- function equals$i(existing, incoming) {
391
+ function equals$o(existing, incoming) {
392
392
  const existing_embeddings = existing.embeddings;
393
393
  const incoming_embeddings = incoming.embeddings;
394
394
  const equals_embeddings_items = equalsArray(existing_embeddings, incoming_embeddings, (existing_embeddings_item, incoming_embeddings_item) => {
395
- if (!(equals$j(existing_embeddings_item, incoming_embeddings_item))) {
395
+ if (!(equals$p(existing_embeddings_item, incoming_embeddings_item))) {
396
396
  return false;
397
397
  }
398
398
  });
@@ -411,44 +411,44 @@ function equals$i(existing, incoming) {
411
411
  }
412
412
  return true;
413
413
  }
414
- const ingest$6 = function EinsteinLlmEmbeddingsRepresentationIngest(input, path, luvio, store, timestamp) {
414
+ const ingest$a = function EinsteinLlmEmbeddingsRepresentationIngest(input, path, luvio, store, timestamp) {
415
415
  if (process.env.NODE_ENV !== 'production') {
416
- const validateError = validate$o(input);
416
+ const validateError = validate$x(input);
417
417
  if (validateError !== null) {
418
418
  throw validateError;
419
419
  }
420
420
  }
421
421
  const key = path.fullPath;
422
- const ttlToUse = TTL$6;
423
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$6, "EinsteinLLM", VERSION$i, RepresentationType$6, equals$i);
422
+ const ttlToUse = TTL$a;
423
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$a, "EinsteinLLM", VERSION$o, RepresentationType$a, equals$o);
424
424
  return createLink(key);
425
425
  };
426
- function getTypeCacheKeys$6(rootKeySet, luvio, input, fullPathFactory) {
426
+ function getTypeCacheKeys$a(rootKeySet, luvio, input, fullPathFactory) {
427
427
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
428
428
  const rootKey = fullPathFactory();
429
429
  rootKeySet.set(rootKey, {
430
430
  namespace: keyPrefix,
431
- representationName: RepresentationType$6,
431
+ representationName: RepresentationType$a,
432
432
  mergeable: false
433
433
  });
434
434
  }
435
435
 
436
- function select$o(luvio, params) {
437
- return select$p();
436
+ function select$E(luvio, params) {
437
+ return select$F();
438
438
  }
439
- function keyBuilder$a(luvio, params) {
439
+ function keyBuilder$n(luvio, params) {
440
440
  return keyPrefix + '::EinsteinLlmEmbeddingsRepresentation:(' + stableJSONStringify(params.body.embeddingsInput.additionalConfig.additionalParameters) + '::' + 'embeddingsInput.additionalConfig.applicationName:' + params.body.embeddingsInput.additionalConfig.applicationName + '::' + (params.body.embeddingsInput.additionalConfig.enablePiiMasking === undefined ? 'embeddingsInput.additionalConfig.enablePiiMasking' : 'embeddingsInput.additionalConfig.enablePiiMasking:' + params.body.embeddingsInput.additionalConfig.enablePiiMasking) + '::' + (params.body.embeddingsInput.additionalConfig.model === undefined ? 'embeddingsInput.additionalConfig.model' : 'embeddingsInput.additionalConfig.model:' + params.body.embeddingsInput.additionalConfig.model) + '::' + 'embeddingsInput.prompts.wrappedListString:' + params.body.embeddingsInput.prompts.wrappedListString + '::' + (params.body.embeddingsInput.provider === undefined ? 'embeddingsInput.provider' : 'embeddingsInput.provider:' + params.body.embeddingsInput.provider) + ')';
441
441
  }
442
- function getResponseCacheKeys$6(storeKeyMap, luvio, resourceParams, response) {
443
- getTypeCacheKeys$6(storeKeyMap, luvio, response, () => keyBuilder$a(luvio, resourceParams));
442
+ function getResponseCacheKeys$g(storeKeyMap, luvio, resourceParams, response) {
443
+ getTypeCacheKeys$a(storeKeyMap, luvio, response, () => keyBuilder$n(luvio, resourceParams));
444
444
  }
445
- function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
445
+ function ingestSuccess$g(luvio, resourceParams, response, snapshotRefresh) {
446
446
  const { body } = response;
447
- const key = keyBuilder$a(luvio, resourceParams);
448
- luvio.storeIngest(key, ingest$6, body);
447
+ const key = keyBuilder$n(luvio, resourceParams);
448
+ luvio.storeIngest(key, ingest$a, body);
449
449
  const snapshot = luvio.storeLookup({
450
450
  recordId: key,
451
- node: select$o(),
451
+ node: select$E(),
452
452
  variables: {},
453
453
  }, snapshotRefresh);
454
454
  if (process.env.NODE_ENV !== 'production') {
@@ -459,19 +459,19 @@ function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
459
459
  deepFreeze(snapshot.data);
460
460
  return snapshot;
461
461
  }
462
- function ingestError$3(luvio, params, error, snapshotRefresh) {
463
- const key = keyBuilder$a(luvio, params);
462
+ function ingestError$9(luvio, params, error, snapshotRefresh) {
463
+ const key = keyBuilder$n(luvio, params);
464
464
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
465
465
  const storeMetadataParams = {
466
- ttl: TTL$6,
466
+ ttl: TTL$a,
467
467
  namespace: keyPrefix,
468
- version: VERSION$i,
469
- representationName: RepresentationType$6
468
+ version: VERSION$o,
469
+ representationName: RepresentationType$a
470
470
  };
471
471
  luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
472
472
  return errorSnapshot;
473
473
  }
474
- function createResourceRequest$6(config) {
474
+ function createResourceRequest$g(config) {
475
475
  const headers = {};
476
476
  return {
477
477
  baseUri: '/services/data/v65.0',
@@ -485,97 +485,97 @@ function createResourceRequest$6(config) {
485
485
  };
486
486
  }
487
487
 
488
- const adapterName$6 = 'createEmbeddings';
488
+ const adapterName$g = 'createEmbeddings';
489
489
  const createEmbeddings_ConfigPropertyMetadata = [
490
490
  generateParamConfigMetadata('embeddingsInput', true, 2 /* Body */, 4 /* Unsupported */),
491
491
  ];
492
- const createEmbeddings_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, createEmbeddings_ConfigPropertyMetadata);
493
- const createResourceParams$6 = /*#__PURE__*/ createResourceParams$7(createEmbeddings_ConfigPropertyMetadata);
494
- function keyBuilder$9(luvio, config) {
495
- const resourceParams = createResourceParams$6(config);
496
- return keyBuilder$a(luvio, resourceParams);
492
+ const createEmbeddings_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$g, createEmbeddings_ConfigPropertyMetadata);
493
+ const createResourceParams$g = /*#__PURE__*/ createResourceParams$h(createEmbeddings_ConfigPropertyMetadata);
494
+ function keyBuilder$m(luvio, config) {
495
+ const resourceParams = createResourceParams$g(config);
496
+ return keyBuilder$n(luvio, resourceParams);
497
497
  }
498
- function typeCheckConfig$6(untrustedConfig) {
498
+ function typeCheckConfig$g(untrustedConfig) {
499
499
  const config = {};
500
500
  const untrustedConfig_embeddingsInput = untrustedConfig.embeddingsInput;
501
- const referenceEinsteinLlmEmbeddingsInputRepresentationValidationError = validate$q(untrustedConfig_embeddingsInput);
501
+ const referenceEinsteinLlmEmbeddingsInputRepresentationValidationError = validate$z(untrustedConfig_embeddingsInput);
502
502
  if (referenceEinsteinLlmEmbeddingsInputRepresentationValidationError === null) {
503
503
  config.embeddingsInput = untrustedConfig_embeddingsInput;
504
504
  }
505
505
  return config;
506
506
  }
507
- function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
507
+ function validateAdapterConfig$g(untrustedConfig, configPropertyNames) {
508
508
  if (!untrustedIsObject(untrustedConfig)) {
509
509
  return null;
510
510
  }
511
511
  if (process.env.NODE_ENV !== 'production') {
512
512
  validateConfig(untrustedConfig, configPropertyNames);
513
513
  }
514
- const config = typeCheckConfig$6(untrustedConfig);
514
+ const config = typeCheckConfig$g(untrustedConfig);
515
515
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
516
516
  return null;
517
517
  }
518
518
  return config;
519
519
  }
520
- function adapterFragment$3(luvio, config) {
521
- createResourceParams$6(config);
522
- return select$o();
520
+ function adapterFragment$9(luvio, config) {
521
+ createResourceParams$g(config);
522
+ return select$E();
523
523
  }
524
- function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
525
- const snapshot = ingestSuccess$6(luvio, resourceParams, response, {
524
+ function onFetchResponseSuccess$9(luvio, config, resourceParams, response) {
525
+ const snapshot = ingestSuccess$g(luvio, resourceParams, response, {
526
526
  config,
527
- resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
527
+ resolve: () => buildNetworkSnapshot$g(luvio, config, snapshotRefreshOptions)
528
528
  });
529
529
  return luvio.storeBroadcast().then(() => snapshot);
530
530
  }
531
- function onFetchResponseError$3(luvio, config, resourceParams, response) {
532
- const snapshot = ingestError$3(luvio, resourceParams, response, {
531
+ function onFetchResponseError$9(luvio, config, resourceParams, response) {
532
+ const snapshot = ingestError$9(luvio, resourceParams, response, {
533
533
  config,
534
- resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
534
+ resolve: () => buildNetworkSnapshot$g(luvio, config, snapshotRefreshOptions)
535
535
  });
536
536
  return luvio.storeBroadcast().then(() => snapshot);
537
537
  }
538
- function buildNetworkSnapshot$6(luvio, config, options) {
539
- const resourceParams = createResourceParams$6(config);
540
- const request = createResourceRequest$6(resourceParams);
538
+ function buildNetworkSnapshot$g(luvio, config, options) {
539
+ const resourceParams = createResourceParams$g(config);
540
+ const request = createResourceRequest$g(resourceParams);
541
541
  return luvio.dispatchResourceRequest(request, options)
542
542
  .then((response) => {
543
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
543
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$9(luvio, config, resourceParams, response), () => {
544
544
  const cache = new StoreKeyMap();
545
- getResponseCacheKeys$6(cache, luvio, resourceParams, response.body);
545
+ getResponseCacheKeys$g(cache, luvio, resourceParams, response.body);
546
546
  return cache;
547
547
  });
548
548
  }, (response) => {
549
- return luvio.handleErrorResponse(() => onFetchResponseError$3(luvio, config, resourceParams, response));
549
+ return luvio.handleErrorResponse(() => onFetchResponseError$9(luvio, config, resourceParams, response));
550
550
  });
551
551
  }
552
- function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
553
- return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$6, 'get', false);
552
+ function buildNetworkSnapshotCachePolicy$9(context, coercedAdapterRequestContext) {
553
+ return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$g, 'get', false);
554
554
  }
555
- function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
555
+ function buildCachedSnapshotCachePolicy$9(context, storeLookup) {
556
556
  const { luvio, config } = context;
557
557
  const selector = {
558
- recordId: keyBuilder$9(luvio, config),
559
- node: adapterFragment$3(luvio, config),
558
+ recordId: keyBuilder$m(luvio, config),
559
+ node: adapterFragment$9(luvio, config),
560
560
  variables: {},
561
561
  };
562
562
  const cacheSnapshot = storeLookup(selector, {
563
563
  config,
564
- resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
564
+ resolve: () => buildNetworkSnapshot$g(luvio, config, snapshotRefreshOptions)
565
565
  });
566
566
  return cacheSnapshot;
567
567
  }
568
568
  const createEmbeddingsAdapterFactory = (luvio) => function EinsteinLLM__createEmbeddings(untrustedConfig, requestContext) {
569
- const config = validateAdapterConfig$6(untrustedConfig, createEmbeddings_ConfigPropertyNames);
569
+ const config = validateAdapterConfig$g(untrustedConfig, createEmbeddings_ConfigPropertyNames);
570
570
  // Invalid or incomplete config
571
571
  if (config === null) {
572
572
  return null;
573
573
  }
574
574
  return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
575
- buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
575
+ buildCachedSnapshotCachePolicy$9, buildNetworkSnapshotCachePolicy$9);
576
576
  };
577
577
 
578
- function validate$n(obj, path = 'EinsteinLlmFeedbackInputRepresentation') {
578
+ function validate$w(obj, path = 'EinsteinLlmFeedbackInputRepresentation') {
579
579
  const v_error = (() => {
580
580
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
581
581
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -622,9 +622,9 @@ function validate$n(obj, path = 'EinsteinLlmFeedbackInputRepresentation') {
622
622
  return v_error === undefined ? null : v_error;
623
623
  }
624
624
 
625
- const TTL$5 = 100;
626
- const VERSION$h = "4033328f65865dd5d80c68a7573a4522";
627
- function validate$m(obj, path = 'EinsteinLlmFeedbackRepresentation') {
625
+ const TTL$9 = 100;
626
+ const VERSION$n = "4033328f65865dd5d80c68a7573a4522";
627
+ function validate$v(obj, path = 'EinsteinLlmFeedbackRepresentation') {
628
628
  const v_error = (() => {
629
629
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
630
630
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -637,23 +637,23 @@ function validate$m(obj, path = 'EinsteinLlmFeedbackRepresentation') {
637
637
  })();
638
638
  return v_error === undefined ? null : v_error;
639
639
  }
640
- const RepresentationType$5 = 'EinsteinLlmFeedbackRepresentation';
641
- function keyBuilder$8(luvio, config) {
642
- return keyPrefix + '::' + RepresentationType$5 + ':' + config.message;
640
+ const RepresentationType$9 = 'EinsteinLlmFeedbackRepresentation';
641
+ function keyBuilder$l(luvio, config) {
642
+ return keyPrefix + '::' + RepresentationType$9 + ':' + config.message;
643
643
  }
644
- function keyBuilderFromType$2(luvio, object) {
644
+ function keyBuilderFromType$3(luvio, object) {
645
645
  const keyParams = {
646
646
  message: object.message
647
647
  };
648
- return keyBuilder$8(luvio, keyParams);
648
+ return keyBuilder$l(luvio, keyParams);
649
649
  }
650
- function normalize$5(input, existing, path, luvio, store, timestamp) {
650
+ function normalize$9(input, existing, path, luvio, store, timestamp) {
651
651
  return input;
652
652
  }
653
- const select$n = function EinsteinLlmFeedbackRepresentationSelect() {
653
+ const select$D = function EinsteinLlmFeedbackRepresentationSelect() {
654
654
  return {
655
655
  kind: 'Fragment',
656
- version: VERSION$h,
656
+ version: VERSION$n,
657
657
  private: [],
658
658
  selections: [
659
659
  {
@@ -663,7 +663,7 @@ const select$n = function EinsteinLlmFeedbackRepresentationSelect() {
663
663
  ]
664
664
  };
665
665
  };
666
- function equals$h(existing, incoming) {
666
+ function equals$n(existing, incoming) {
667
667
  const existing_message = existing.message;
668
668
  const incoming_message = incoming.message;
669
669
  if (!(existing_message === incoming_message)) {
@@ -671,41 +671,41 @@ function equals$h(existing, incoming) {
671
671
  }
672
672
  return true;
673
673
  }
674
- const ingest$5 = function EinsteinLlmFeedbackRepresentationIngest(input, path, luvio, store, timestamp) {
674
+ const ingest$9 = function EinsteinLlmFeedbackRepresentationIngest(input, path, luvio, store, timestamp) {
675
675
  if (process.env.NODE_ENV !== 'production') {
676
- const validateError = validate$m(input);
676
+ const validateError = validate$v(input);
677
677
  if (validateError !== null) {
678
678
  throw validateError;
679
679
  }
680
680
  }
681
- const key = keyBuilderFromType$2(luvio, input);
682
- const ttlToUse = TTL$5;
683
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$5, "EinsteinLLM", VERSION$h, RepresentationType$5, equals$h);
681
+ const key = keyBuilderFromType$3(luvio, input);
682
+ const ttlToUse = TTL$9;
683
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$9, "EinsteinLLM", VERSION$n, RepresentationType$9, equals$n);
684
684
  return createLink(key);
685
685
  };
686
- function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
686
+ function getTypeCacheKeys$9(rootKeySet, luvio, input, fullPathFactory) {
687
687
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
688
- const rootKey = keyBuilderFromType$2(luvio, input);
688
+ const rootKey = keyBuilderFromType$3(luvio, input);
689
689
  rootKeySet.set(rootKey, {
690
690
  namespace: keyPrefix,
691
- representationName: RepresentationType$5,
691
+ representationName: RepresentationType$9,
692
692
  mergeable: false
693
693
  });
694
694
  }
695
695
 
696
- function select$m(luvio, params) {
697
- return select$n();
696
+ function select$C(luvio, params) {
697
+ return select$D();
698
698
  }
699
- function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
700
- getTypeCacheKeys$5(storeKeyMap, luvio, response);
699
+ function getResponseCacheKeys$f(storeKeyMap, luvio, resourceParams, response) {
700
+ getTypeCacheKeys$9(storeKeyMap, luvio, response);
701
701
  }
702
- function ingestSuccess$5(luvio, resourceParams, response) {
702
+ function ingestSuccess$f(luvio, resourceParams, response) {
703
703
  const { body } = response;
704
- const key = keyBuilderFromType$2(luvio, body);
705
- luvio.storeIngest(key, ingest$5, body);
704
+ const key = keyBuilderFromType$3(luvio, body);
705
+ luvio.storeIngest(key, ingest$9, body);
706
706
  const snapshot = luvio.storeLookup({
707
707
  recordId: key,
708
- node: select$m(),
708
+ node: select$C(),
709
709
  variables: {},
710
710
  });
711
711
  if (process.env.NODE_ENV !== 'production') {
@@ -716,7 +716,7 @@ function ingestSuccess$5(luvio, resourceParams, response) {
716
716
  deepFreeze(snapshot.data);
717
717
  return snapshot;
718
718
  }
719
- function createResourceRequest$5(config) {
719
+ function createResourceRequest$f(config) {
720
720
  const headers = {};
721
721
  return {
722
722
  baseUri: '/services/data/v65.0',
@@ -730,45 +730,45 @@ function createResourceRequest$5(config) {
730
730
  };
731
731
  }
732
732
 
733
- const adapterName$5 = 'createFeedback';
733
+ const adapterName$f = 'createFeedback';
734
734
  const createFeedback_ConfigPropertyMetadata = [
735
735
  generateParamConfigMetadata('feedbackInput', true, 2 /* Body */, 4 /* Unsupported */),
736
736
  ];
737
- const createFeedback_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, createFeedback_ConfigPropertyMetadata);
738
- const createResourceParams$5 = /*#__PURE__*/ createResourceParams$7(createFeedback_ConfigPropertyMetadata);
739
- function typeCheckConfig$5(untrustedConfig) {
737
+ const createFeedback_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$f, createFeedback_ConfigPropertyMetadata);
738
+ const createResourceParams$f = /*#__PURE__*/ createResourceParams$h(createFeedback_ConfigPropertyMetadata);
739
+ function typeCheckConfig$f(untrustedConfig) {
740
740
  const config = {};
741
741
  const untrustedConfig_feedbackInput = untrustedConfig.feedbackInput;
742
- const referenceEinsteinLlmFeedbackInputRepresentationValidationError = validate$n(untrustedConfig_feedbackInput);
742
+ const referenceEinsteinLlmFeedbackInputRepresentationValidationError = validate$w(untrustedConfig_feedbackInput);
743
743
  if (referenceEinsteinLlmFeedbackInputRepresentationValidationError === null) {
744
744
  config.feedbackInput = untrustedConfig_feedbackInput;
745
745
  }
746
746
  return config;
747
747
  }
748
- function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
748
+ function validateAdapterConfig$f(untrustedConfig, configPropertyNames) {
749
749
  if (!untrustedIsObject(untrustedConfig)) {
750
750
  return null;
751
751
  }
752
752
  if (process.env.NODE_ENV !== 'production') {
753
753
  validateConfig(untrustedConfig, configPropertyNames);
754
754
  }
755
- const config = typeCheckConfig$5(untrustedConfig);
755
+ const config = typeCheckConfig$f(untrustedConfig);
756
756
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
757
757
  return null;
758
758
  }
759
759
  return config;
760
760
  }
761
- function buildNetworkSnapshot$5(luvio, config, options) {
762
- const resourceParams = createResourceParams$5(config);
763
- const request = createResourceRequest$5(resourceParams);
761
+ function buildNetworkSnapshot$f(luvio, config, options) {
762
+ const resourceParams = createResourceParams$f(config);
763
+ const request = createResourceRequest$f(resourceParams);
764
764
  return luvio.dispatchResourceRequest(request, options)
765
765
  .then((response) => {
766
766
  return luvio.handleSuccessResponse(() => {
767
- const snapshot = ingestSuccess$5(luvio, resourceParams, response);
767
+ const snapshot = ingestSuccess$f(luvio, resourceParams, response);
768
768
  return luvio.storeBroadcast().then(() => snapshot);
769
769
  }, () => {
770
770
  const cache = new StoreKeyMap();
771
- getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
771
+ getResponseCacheKeys$f(cache, luvio, resourceParams, response.body);
772
772
  return cache;
773
773
  });
774
774
  }, (response) => {
@@ -778,16 +778,16 @@ function buildNetworkSnapshot$5(luvio, config, options) {
778
778
  }
779
779
  const createFeedbackAdapterFactory = (luvio) => {
780
780
  return function createFeedback(untrustedConfig) {
781
- const config = validateAdapterConfig$5(untrustedConfig, createFeedback_ConfigPropertyNames);
781
+ const config = validateAdapterConfig$f(untrustedConfig, createFeedback_ConfigPropertyNames);
782
782
  // Invalid or incomplete config
783
783
  if (config === null) {
784
784
  throw new Error('Invalid config for "createFeedback"');
785
785
  }
786
- return buildNetworkSnapshot$5(luvio, config);
786
+ return buildNetworkSnapshot$f(luvio, config);
787
787
  };
788
788
  };
789
789
 
790
- function validate$l(obj, path = 'EinsteinLlmAdditionalConfigInputRepresentation') {
790
+ function validate$u(obj, path = 'EinsteinLlmAdditionalConfigInputRepresentation') {
791
791
  const v_error = (() => {
792
792
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
793
793
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -870,7 +870,7 @@ function validate$l(obj, path = 'EinsteinLlmAdditionalConfigInputRepresentation'
870
870
  return v_error === undefined ? null : v_error;
871
871
  }
872
872
 
873
- function validate$k(obj, path = 'EinsteinLlmGenerationsInputRepresentation') {
873
+ function validate$t(obj, path = 'EinsteinLlmGenerationsInputRepresentation') {
874
874
  const v_error = (() => {
875
875
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
876
876
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -878,7 +878,7 @@ function validate$k(obj, path = 'EinsteinLlmGenerationsInputRepresentation') {
878
878
  if (obj.additionalConfig !== undefined) {
879
879
  const obj_additionalConfig = obj.additionalConfig;
880
880
  const path_additionalConfig = path + '.additionalConfig';
881
- const referencepath_additionalConfigValidationError = validate$l(obj_additionalConfig, path_additionalConfig);
881
+ const referencepath_additionalConfigValidationError = validate$u(obj_additionalConfig, path_additionalConfig);
882
882
  if (referencepath_additionalConfigValidationError !== null) {
883
883
  let message = 'Object doesn\'t match EinsteinLlmAdditionalConfigInputRepresentation (at "' + path_additionalConfig + '")\n';
884
884
  message += referencepath_additionalConfigValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -901,8 +901,8 @@ function validate$k(obj, path = 'EinsteinLlmGenerationsInputRepresentation') {
901
901
  return v_error === undefined ? null : v_error;
902
902
  }
903
903
 
904
- const VERSION$g = "9ebac74e6f964c363d5fd1913df363af";
905
- function validate$j(obj, path = 'EinsteinLlmGenerationsContentQualityRepresentation') {
904
+ const VERSION$m = "9ebac74e6f964c363d5fd1913df363af";
905
+ function validate$s(obj, path = 'EinsteinLlmGenerationsContentQualityRepresentation') {
906
906
  const v_error = (() => {
907
907
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
908
908
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -938,10 +938,10 @@ function validate$j(obj, path = 'EinsteinLlmGenerationsContentQualityRepresentat
938
938
  })();
939
939
  return v_error === undefined ? null : v_error;
940
940
  }
941
- const select$l = function EinsteinLlmGenerationsContentQualityRepresentationSelect() {
941
+ const select$B = function EinsteinLlmGenerationsContentQualityRepresentationSelect() {
942
942
  return {
943
943
  kind: 'Fragment',
944
- version: VERSION$g,
944
+ version: VERSION$m,
945
945
  private: [],
946
946
  selections: [
947
947
  {
@@ -952,7 +952,7 @@ const select$l = function EinsteinLlmGenerationsContentQualityRepresentationSele
952
952
  ]
953
953
  };
954
954
  };
955
- function equals$g(existing, incoming) {
955
+ function equals$m(existing, incoming) {
956
956
  const existing_isToxicityDetected = existing.isToxicityDetected;
957
957
  const incoming_isToxicityDetected = incoming.isToxicityDetected;
958
958
  // if at least one of these optionals is defined
@@ -969,8 +969,8 @@ function equals$g(existing, incoming) {
969
969
  return true;
970
970
  }
971
971
 
972
- const VERSION$f = "77af44a252cb5b45b4d9a8101368d2aa";
973
- function validate$i(obj, path = 'EinsteinLlmGenerationsSafetyScoreRepresentation') {
972
+ const VERSION$l = "77af44a252cb5b45b4d9a8101368d2aa";
973
+ function validate$r(obj, path = 'EinsteinLlmGenerationsSafetyScoreRepresentation') {
974
974
  const v_error = (() => {
975
975
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
976
976
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -1174,10 +1174,10 @@ function validate$i(obj, path = 'EinsteinLlmGenerationsSafetyScoreRepresentation
1174
1174
  })();
1175
1175
  return v_error === undefined ? null : v_error;
1176
1176
  }
1177
- const select$k = function EinsteinLlmGenerationsSafetyScoreRepresentationSelect() {
1177
+ const select$A = function EinsteinLlmGenerationsSafetyScoreRepresentationSelect() {
1178
1178
  return {
1179
1179
  kind: 'Fragment',
1180
- version: VERSION$f,
1180
+ version: VERSION$l,
1181
1181
  private: [],
1182
1182
  selections: [
1183
1183
  {
@@ -1218,7 +1218,7 @@ const select$k = function EinsteinLlmGenerationsSafetyScoreRepresentationSelect(
1218
1218
  ]
1219
1219
  };
1220
1220
  };
1221
- function equals$f(existing, incoming) {
1221
+ function equals$l(existing, incoming) {
1222
1222
  const existing_hateScore = existing.hateScore;
1223
1223
  const incoming_hateScore = incoming.hateScore;
1224
1224
  // if at least one of these optionals is defined
@@ -1313,8 +1313,8 @@ function equals$f(existing, incoming) {
1313
1313
  return true;
1314
1314
  }
1315
1315
 
1316
- const VERSION$e = "4a07778ff6c595d91c575188146647a1";
1317
- function validate$h(obj, path = 'EinsteinLlmGenerationItemRepresentation') {
1316
+ const VERSION$k = "4a07778ff6c595d91c575188146647a1";
1317
+ function validate$q(obj, path = 'EinsteinLlmGenerationItemRepresentation') {
1318
1318
  const v_error = (() => {
1319
1319
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1320
1320
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -1324,7 +1324,7 @@ function validate$h(obj, path = 'EinsteinLlmGenerationItemRepresentation') {
1324
1324
  const path_contentQualityRepresentation = path + '.contentQualityRepresentation';
1325
1325
  let obj_contentQualityRepresentation_union0 = null;
1326
1326
  const obj_contentQualityRepresentation_union0_error = (() => {
1327
- const referencepath_contentQualityRepresentationValidationError = validate$j(obj_contentQualityRepresentation, path_contentQualityRepresentation);
1327
+ const referencepath_contentQualityRepresentationValidationError = validate$s(obj_contentQualityRepresentation, path_contentQualityRepresentation);
1328
1328
  if (referencepath_contentQualityRepresentationValidationError !== null) {
1329
1329
  let message = 'Object doesn\'t match EinsteinLlmGenerationsContentQualityRepresentation (at "' + path_contentQualityRepresentation + '")\n';
1330
1330
  message += referencepath_contentQualityRepresentationValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -1372,7 +1372,7 @@ function validate$h(obj, path = 'EinsteinLlmGenerationItemRepresentation') {
1372
1372
  const path_safetyScoreRepresentation = path + '.safetyScoreRepresentation';
1373
1373
  let obj_safetyScoreRepresentation_union0 = null;
1374
1374
  const obj_safetyScoreRepresentation_union0_error = (() => {
1375
- const referencepath_safetyScoreRepresentationValidationError = validate$i(obj_safetyScoreRepresentation, path_safetyScoreRepresentation);
1375
+ const referencepath_safetyScoreRepresentationValidationError = validate$r(obj_safetyScoreRepresentation, path_safetyScoreRepresentation);
1376
1376
  if (referencepath_safetyScoreRepresentationValidationError !== null) {
1377
1377
  let message = 'Object doesn\'t match EinsteinLlmGenerationsSafetyScoreRepresentation (at "' + path_safetyScoreRepresentation + '")\n';
1378
1378
  message += referencepath_safetyScoreRepresentationValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -1406,12 +1406,12 @@ function validate$h(obj, path = 'EinsteinLlmGenerationItemRepresentation') {
1406
1406
  })();
1407
1407
  return v_error === undefined ? null : v_error;
1408
1408
  }
1409
- const select$j = function EinsteinLlmGenerationItemRepresentationSelect() {
1410
- const { selections: EinsteinLlmGenerationsContentQualityRepresentation__selections, opaque: EinsteinLlmGenerationsContentQualityRepresentation__opaque, } = select$l();
1411
- const { selections: EinsteinLlmGenerationsSafetyScoreRepresentation__selections, opaque: EinsteinLlmGenerationsSafetyScoreRepresentation__opaque, } = select$k();
1409
+ const select$z = function EinsteinLlmGenerationItemRepresentationSelect() {
1410
+ const { selections: EinsteinLlmGenerationsContentQualityRepresentation__selections, opaque: EinsteinLlmGenerationsContentQualityRepresentation__opaque, } = select$B();
1411
+ const { selections: EinsteinLlmGenerationsSafetyScoreRepresentation__selections, opaque: EinsteinLlmGenerationsSafetyScoreRepresentation__opaque, } = select$A();
1412
1412
  return {
1413
1413
  kind: 'Fragment',
1414
- version: VERSION$e,
1414
+ version: VERSION$k,
1415
1415
  private: [],
1416
1416
  selections: [
1417
1417
  {
@@ -1448,7 +1448,7 @@ const select$j = function EinsteinLlmGenerationItemRepresentationSelect() {
1448
1448
  ]
1449
1449
  };
1450
1450
  };
1451
- function equals$e(existing, incoming) {
1451
+ function equals$k(existing, incoming) {
1452
1452
  const existing_isSummarized = existing.isSummarized;
1453
1453
  const incoming_isSummarized = incoming.isSummarized;
1454
1454
  // if at least one of these optionals is defined
@@ -1489,7 +1489,7 @@ function equals$e(existing, incoming) {
1489
1489
  if (!(existing_contentQualityRepresentation === incoming_contentQualityRepresentation
1490
1490
  || (existing_contentQualityRepresentation != null &&
1491
1491
  incoming_contentQualityRepresentation != null &&
1492
- equals$g(existing_contentQualityRepresentation, incoming_contentQualityRepresentation)))) {
1492
+ equals$m(existing_contentQualityRepresentation, incoming_contentQualityRepresentation)))) {
1493
1493
  return false;
1494
1494
  }
1495
1495
  }
@@ -1505,15 +1505,15 @@ function equals$e(existing, incoming) {
1505
1505
  if (!(existing_safetyScoreRepresentation === incoming_safetyScoreRepresentation
1506
1506
  || (existing_safetyScoreRepresentation != null &&
1507
1507
  incoming_safetyScoreRepresentation != null &&
1508
- equals$f(existing_safetyScoreRepresentation, incoming_safetyScoreRepresentation)))) {
1508
+ equals$l(existing_safetyScoreRepresentation, incoming_safetyScoreRepresentation)))) {
1509
1509
  return false;
1510
1510
  }
1511
1511
  }
1512
1512
  return true;
1513
1513
  }
1514
1514
 
1515
- const VERSION$d = "4656c961c9d093a9e206c1db7d4de0b0";
1516
- function validate$g(obj, path = 'WrappedMap') {
1515
+ const VERSION$j = "379fd960d1a0118f506f458ab2c8dd7e";
1516
+ function validate$p(obj, path = 'WrappedMap') {
1517
1517
  const v_error = (() => {
1518
1518
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1519
1519
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -1528,25 +1528,34 @@ function validate$g(obj, path = 'WrappedMap') {
1528
1528
  const key = obj_wrappedMap_keys[i];
1529
1529
  const obj_wrappedMap_prop = obj_wrappedMap[key];
1530
1530
  const path_wrappedMap_prop = path_wrappedMap + '["' + key + '"]';
1531
- if (typeof obj_wrappedMap_prop !== 'object' || ArrayIsArray(obj_wrappedMap_prop) || obj_wrappedMap_prop === null) {
1532
- return new TypeError('Expected "object" but received "' + typeof obj_wrappedMap_prop + '" (at "' + path_wrappedMap_prop + '")');
1531
+ if (obj_wrappedMap_prop === undefined) {
1532
+ return new TypeError('Expected "defined" but received "' + typeof obj_wrappedMap_prop + '" (at "' + path_wrappedMap_prop + '")');
1533
1533
  }
1534
1534
  }
1535
1535
  })();
1536
1536
  return v_error === undefined ? null : v_error;
1537
1537
  }
1538
- const select$i = function WrappedMapSelect() {
1538
+ const select$y = function WrappedMapSelect() {
1539
1539
  return {
1540
1540
  kind: 'Fragment',
1541
- version: VERSION$d,
1541
+ version: VERSION$j,
1542
1542
  private: [],
1543
- selections: []
1543
+ selections: [
1544
+ {
1545
+ name: 'wrappedMap',
1546
+ kind: 'Object',
1547
+ // any
1548
+ }
1549
+ ]
1544
1550
  };
1545
1551
  };
1546
- function equals$d(existing, incoming) {
1552
+ function equals$j(existing, incoming) {
1547
1553
  const existing_wrappedMap = existing.wrappedMap;
1548
1554
  const incoming_wrappedMap = incoming.wrappedMap;
1549
1555
  const equals_wrappedMap_props = equalsObject(existing_wrappedMap, incoming_wrappedMap, (existing_wrappedMap_prop, incoming_wrappedMap_prop) => {
1556
+ if (JSONStringify(incoming_wrappedMap_prop) !== JSONStringify(existing_wrappedMap_prop)) {
1557
+ return false;
1558
+ }
1550
1559
  });
1551
1560
  if (equals_wrappedMap_props === false) {
1552
1561
  return false;
@@ -1554,9 +1563,9 @@ function equals$d(existing, incoming) {
1554
1563
  return true;
1555
1564
  }
1556
1565
 
1557
- const TTL$4 = 100;
1558
- const VERSION$c = "d8abd72a42e842b253da1c38954dafbc";
1559
- function validate$f(obj, path = 'EinsteinLlmGenerationsRepresentation') {
1566
+ const TTL$8 = 100;
1567
+ const VERSION$i = "d8abd72a42e842b253da1c38954dafbc";
1568
+ function validate$o(obj, path = 'EinsteinLlmGenerationsRepresentation') {
1560
1569
  const v_error = (() => {
1561
1570
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1562
1571
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -1569,7 +1578,7 @@ function validate$f(obj, path = 'EinsteinLlmGenerationsRepresentation') {
1569
1578
  for (let i = 0; i < obj_generations.length; i++) {
1570
1579
  const obj_generations_item = obj_generations[i];
1571
1580
  const path_generations_item = path_generations + '[' + i + ']';
1572
- const referencepath_generations_itemValidationError = validate$h(obj_generations_item, path_generations_item);
1581
+ const referencepath_generations_itemValidationError = validate$q(obj_generations_item, path_generations_item);
1573
1582
  if (referencepath_generations_itemValidationError !== null) {
1574
1583
  let message = 'Object doesn\'t match EinsteinLlmGenerationItemRepresentation (at "' + path_generations_item + '")\n';
1575
1584
  message += referencepath_generations_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -1580,7 +1589,7 @@ function validate$f(obj, path = 'EinsteinLlmGenerationsRepresentation') {
1580
1589
  const path_parameters = path + '.parameters';
1581
1590
  let obj_parameters_union0 = null;
1582
1591
  const obj_parameters_union0_error = (() => {
1583
- const referencepath_parametersValidationError = validate$g(obj_parameters, path_parameters);
1592
+ const referencepath_parametersValidationError = validate$p(obj_parameters, path_parameters);
1584
1593
  if (referencepath_parametersValidationError !== null) {
1585
1594
  let message = 'Object doesn\'t match WrappedMap (at "' + path_parameters + '")\n';
1586
1595
  message += referencepath_parametersValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -1639,25 +1648,25 @@ function validate$f(obj, path = 'EinsteinLlmGenerationsRepresentation') {
1639
1648
  })();
1640
1649
  return v_error === undefined ? null : v_error;
1641
1650
  }
1642
- const RepresentationType$4 = 'EinsteinLlmGenerationsRepresentation';
1643
- function keyBuilder$7(luvio, config) {
1644
- return keyPrefix + '::' + RepresentationType$4 + ':' + config.requestId;
1651
+ const RepresentationType$8 = 'EinsteinLlmGenerationsRepresentation';
1652
+ function keyBuilder$k(luvio, config) {
1653
+ return keyPrefix + '::' + RepresentationType$8 + ':' + config.requestId;
1645
1654
  }
1646
- function keyBuilderFromType$1(luvio, object) {
1655
+ function keyBuilderFromType$2(luvio, object) {
1647
1656
  const keyParams = {
1648
1657
  requestId: object.requestId
1649
1658
  };
1650
- return keyBuilder$7(luvio, keyParams);
1659
+ return keyBuilder$k(luvio, keyParams);
1651
1660
  }
1652
- function normalize$4(input, existing, path, luvio, store, timestamp) {
1661
+ function normalize$8(input, existing, path, luvio, store, timestamp) {
1653
1662
  return input;
1654
1663
  }
1655
- const select$h = function EinsteinLlmGenerationsRepresentationSelect() {
1656
- const { selections: EinsteinLlmGenerationItemRepresentation__selections, opaque: EinsteinLlmGenerationItemRepresentation__opaque, } = select$j();
1657
- const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$i();
1664
+ const select$x = function EinsteinLlmGenerationsRepresentationSelect() {
1665
+ const { selections: EinsteinLlmGenerationItemRepresentation__selections, opaque: EinsteinLlmGenerationItemRepresentation__opaque, } = select$z();
1666
+ const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$y();
1658
1667
  return {
1659
1668
  kind: 'Fragment',
1660
- version: VERSION$c,
1669
+ version: VERSION$i,
1661
1670
  private: [],
1662
1671
  selections: [
1663
1672
  {
@@ -1683,7 +1692,7 @@ const select$h = function EinsteinLlmGenerationsRepresentationSelect() {
1683
1692
  ]
1684
1693
  };
1685
1694
  };
1686
- function equals$c(existing, incoming) {
1695
+ function equals$i(existing, incoming) {
1687
1696
  const existing_requestId = existing.requestId;
1688
1697
  const incoming_requestId = incoming.requestId;
1689
1698
  if (!(existing_requestId === incoming_requestId)) {
@@ -1692,7 +1701,7 @@ function equals$c(existing, incoming) {
1692
1701
  const existing_generations = existing.generations;
1693
1702
  const incoming_generations = incoming.generations;
1694
1703
  const equals_generations_items = equalsArray(existing_generations, incoming_generations, (existing_generations_item, incoming_generations_item) => {
1695
- if (!(equals$e(existing_generations_item, incoming_generations_item))) {
1704
+ if (!(equals$k(existing_generations_item, incoming_generations_item))) {
1696
1705
  return false;
1697
1706
  }
1698
1707
  });
@@ -1704,7 +1713,7 @@ function equals$c(existing, incoming) {
1704
1713
  if (!(existing_parameters === incoming_parameters
1705
1714
  || (existing_parameters != null &&
1706
1715
  incoming_parameters != null &&
1707
- equals$d(existing_parameters, incoming_parameters)))) {
1716
+ equals$j(existing_parameters, incoming_parameters)))) {
1708
1717
  return false;
1709
1718
  }
1710
1719
  const existing_prompt = existing.prompt;
@@ -1714,41 +1723,41 @@ function equals$c(existing, incoming) {
1714
1723
  }
1715
1724
  return true;
1716
1725
  }
1717
- const ingest$4 = function EinsteinLlmGenerationsRepresentationIngest(input, path, luvio, store, timestamp) {
1726
+ const ingest$8 = function EinsteinLlmGenerationsRepresentationIngest(input, path, luvio, store, timestamp) {
1718
1727
  if (process.env.NODE_ENV !== 'production') {
1719
- const validateError = validate$f(input);
1728
+ const validateError = validate$o(input);
1720
1729
  if (validateError !== null) {
1721
1730
  throw validateError;
1722
1731
  }
1723
1732
  }
1724
- const key = keyBuilderFromType$1(luvio, input);
1725
- const ttlToUse = TTL$4;
1726
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "EinsteinLLM", VERSION$c, RepresentationType$4, equals$c);
1733
+ const key = keyBuilderFromType$2(luvio, input);
1734
+ const ttlToUse = TTL$8;
1735
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$8, "EinsteinLLM", VERSION$i, RepresentationType$8, equals$i);
1727
1736
  return createLink(key);
1728
1737
  };
1729
- function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
1738
+ function getTypeCacheKeys$8(rootKeySet, luvio, input, fullPathFactory) {
1730
1739
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1731
- const rootKey = keyBuilderFromType$1(luvio, input);
1740
+ const rootKey = keyBuilderFromType$2(luvio, input);
1732
1741
  rootKeySet.set(rootKey, {
1733
1742
  namespace: keyPrefix,
1734
- representationName: RepresentationType$4,
1743
+ representationName: RepresentationType$8,
1735
1744
  mergeable: false
1736
1745
  });
1737
1746
  }
1738
1747
 
1739
- function select$g(luvio, params) {
1740
- return select$h();
1748
+ function select$w(luvio, params) {
1749
+ return select$x();
1741
1750
  }
1742
- function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
1743
- getTypeCacheKeys$4(storeKeyMap, luvio, response);
1751
+ function getResponseCacheKeys$e(storeKeyMap, luvio, resourceParams, response) {
1752
+ getTypeCacheKeys$8(storeKeyMap, luvio, response);
1744
1753
  }
1745
- function ingestSuccess$4(luvio, resourceParams, response) {
1754
+ function ingestSuccess$e(luvio, resourceParams, response) {
1746
1755
  const { body } = response;
1747
- const key = keyBuilderFromType$1(luvio, body);
1748
- luvio.storeIngest(key, ingest$4, body);
1756
+ const key = keyBuilderFromType$2(luvio, body);
1757
+ luvio.storeIngest(key, ingest$8, body);
1749
1758
  const snapshot = luvio.storeLookup({
1750
1759
  recordId: key,
1751
- node: select$g(),
1760
+ node: select$w(),
1752
1761
  variables: {},
1753
1762
  });
1754
1763
  if (process.env.NODE_ENV !== 'production') {
@@ -1759,7 +1768,7 @@ function ingestSuccess$4(luvio, resourceParams, response) {
1759
1768
  deepFreeze(snapshot.data);
1760
1769
  return snapshot;
1761
1770
  }
1762
- function createResourceRequest$4(config) {
1771
+ function createResourceRequest$e(config) {
1763
1772
  const headers = {};
1764
1773
  return {
1765
1774
  baseUri: '/services/data/v65.0',
@@ -1773,45 +1782,45 @@ function createResourceRequest$4(config) {
1773
1782
  };
1774
1783
  }
1775
1784
 
1776
- const adapterName$4 = 'createGenerations';
1785
+ const adapterName$e = 'createGenerations';
1777
1786
  const createGenerations_ConfigPropertyMetadata = [
1778
1787
  generateParamConfigMetadata('generationsInput', true, 2 /* Body */, 4 /* Unsupported */),
1779
1788
  ];
1780
- const createGenerations_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, createGenerations_ConfigPropertyMetadata);
1781
- const createResourceParams$4 = /*#__PURE__*/ createResourceParams$7(createGenerations_ConfigPropertyMetadata);
1782
- function typeCheckConfig$4(untrustedConfig) {
1789
+ const createGenerations_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$e, createGenerations_ConfigPropertyMetadata);
1790
+ const createResourceParams$e = /*#__PURE__*/ createResourceParams$h(createGenerations_ConfigPropertyMetadata);
1791
+ function typeCheckConfig$e(untrustedConfig) {
1783
1792
  const config = {};
1784
1793
  const untrustedConfig_generationsInput = untrustedConfig.generationsInput;
1785
- const referenceEinsteinLlmGenerationsInputRepresentationValidationError = validate$k(untrustedConfig_generationsInput);
1794
+ const referenceEinsteinLlmGenerationsInputRepresentationValidationError = validate$t(untrustedConfig_generationsInput);
1786
1795
  if (referenceEinsteinLlmGenerationsInputRepresentationValidationError === null) {
1787
1796
  config.generationsInput = untrustedConfig_generationsInput;
1788
1797
  }
1789
1798
  return config;
1790
1799
  }
1791
- function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
1800
+ function validateAdapterConfig$e(untrustedConfig, configPropertyNames) {
1792
1801
  if (!untrustedIsObject(untrustedConfig)) {
1793
1802
  return null;
1794
1803
  }
1795
1804
  if (process.env.NODE_ENV !== 'production') {
1796
1805
  validateConfig(untrustedConfig, configPropertyNames);
1797
1806
  }
1798
- const config = typeCheckConfig$4(untrustedConfig);
1807
+ const config = typeCheckConfig$e(untrustedConfig);
1799
1808
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
1800
1809
  return null;
1801
1810
  }
1802
1811
  return config;
1803
1812
  }
1804
- function buildNetworkSnapshot$4(luvio, config, options) {
1805
- const resourceParams = createResourceParams$4(config);
1806
- const request = createResourceRequest$4(resourceParams);
1813
+ function buildNetworkSnapshot$e(luvio, config, options) {
1814
+ const resourceParams = createResourceParams$e(config);
1815
+ const request = createResourceRequest$e(resourceParams);
1807
1816
  return luvio.dispatchResourceRequest(request, options)
1808
1817
  .then((response) => {
1809
1818
  return luvio.handleSuccessResponse(() => {
1810
- const snapshot = ingestSuccess$4(luvio, resourceParams, response);
1819
+ const snapshot = ingestSuccess$e(luvio, resourceParams, response);
1811
1820
  return luvio.storeBroadcast().then(() => snapshot);
1812
1821
  }, () => {
1813
1822
  const cache = new StoreKeyMap();
1814
- getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
1823
+ getResponseCacheKeys$e(cache, luvio, resourceParams, response.body);
1815
1824
  return cache;
1816
1825
  });
1817
1826
  }, (response) => {
@@ -1821,16 +1830,16 @@ function buildNetworkSnapshot$4(luvio, config, options) {
1821
1830
  }
1822
1831
  const createGenerationsAdapterFactory = (luvio) => {
1823
1832
  return function createGenerations(untrustedConfig) {
1824
- const config = validateAdapterConfig$4(untrustedConfig, createGenerations_ConfigPropertyNames);
1833
+ const config = validateAdapterConfig$e(untrustedConfig, createGenerations_ConfigPropertyNames);
1825
1834
  // Invalid or incomplete config
1826
1835
  if (config === null) {
1827
1836
  throw new Error('Invalid config for "createGenerations"');
1828
1837
  }
1829
- return buildNetworkSnapshot$4(luvio, config);
1838
+ return buildNetworkSnapshot$e(luvio, config);
1830
1839
  };
1831
1840
  };
1832
1841
 
1833
- function validate$e(obj, path = 'EinsteinPromptRecordFieldRepresentation') {
1842
+ function validate$n(obj, path = 'EinsteinPromptRecordFieldRepresentation') {
1834
1843
  const v_error = (() => {
1835
1844
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1836
1845
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -1890,9 +1899,9 @@ function validate$e(obj, path = 'EinsteinPromptRecordFieldRepresentation') {
1890
1899
  return v_error === undefined ? null : v_error;
1891
1900
  }
1892
1901
 
1893
- const TTL$3 = 100;
1894
- const VERSION$b = "2d1628544b54fc1701aa9b4eff05127b";
1895
- function validate$d(obj, path = 'EinsteinPromptRecordRepresentation') {
1902
+ const TTL$7 = 100;
1903
+ const VERSION$h = "2d1628544b54fc1701aa9b4eff05127b";
1904
+ function validate$m(obj, path = 'EinsteinPromptRecordRepresentation') {
1896
1905
  const v_error = (() => {
1897
1906
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1898
1907
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -1921,7 +1930,7 @@ function validate$d(obj, path = 'EinsteinPromptRecordRepresentation') {
1921
1930
  for (let i = 0; i < obj_childRelationships_prop.length; i++) {
1922
1931
  const obj_childRelationships_prop_item = obj_childRelationships_prop[i];
1923
1932
  const path_childRelationships_prop_item = path_childRelationships_prop + '[' + i + ']';
1924
- const referencepath_childRelationships_prop_itemValidationError = validate$d(obj_childRelationships_prop_item, path_childRelationships_prop_item);
1933
+ const referencepath_childRelationships_prop_itemValidationError = validate$m(obj_childRelationships_prop_item, path_childRelationships_prop_item);
1925
1934
  if (referencepath_childRelationships_prop_itemValidationError !== null) {
1926
1935
  let message = 'Object doesn\'t match EinsteinPromptRecordRepresentation (at "' + path_childRelationships_prop_item + '")\n';
1927
1936
  message += referencepath_childRelationships_prop_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -1941,7 +1950,7 @@ function validate$d(obj, path = 'EinsteinPromptRecordRepresentation') {
1941
1950
  const key = obj_fields_keys[i];
1942
1951
  const obj_fields_prop = obj_fields[key];
1943
1952
  const path_fields_prop = path_fields + '["' + key + '"]';
1944
- const referencepath_fields_propValidationError = validate$e(obj_fields_prop, path_fields_prop);
1953
+ const referencepath_fields_propValidationError = validate$n(obj_fields_prop, path_fields_prop);
1945
1954
  if (referencepath_fields_propValidationError !== null) {
1946
1955
  let message = 'Object doesn\'t match EinsteinPromptRecordFieldRepresentation (at "' + path_fields_prop + '")\n';
1947
1956
  message += referencepath_fields_propValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -1959,49 +1968,49 @@ function validate$d(obj, path = 'EinsteinPromptRecordRepresentation') {
1959
1968
  })();
1960
1969
  return v_error === undefined ? null : v_error;
1961
1970
  }
1962
- const RepresentationType$3 = 'EinsteinPromptRecordRepresentation';
1963
- function normalize$3(input, existing, path, luvio, store, timestamp) {
1971
+ const RepresentationType$7 = 'EinsteinPromptRecordRepresentation';
1972
+ function normalize$7(input, existing, path, luvio, store, timestamp) {
1964
1973
  return input;
1965
1974
  }
1966
- const select$f = function EinsteinPromptRecordRepresentationSelect() {
1975
+ const select$v = function EinsteinPromptRecordRepresentationSelect() {
1967
1976
  return {
1968
1977
  kind: 'Fragment',
1969
- version: VERSION$b,
1978
+ version: VERSION$h,
1970
1979
  private: [],
1971
1980
  opaque: true
1972
1981
  };
1973
1982
  };
1974
- function equals$b(existing, incoming) {
1983
+ function equals$h(existing, incoming) {
1975
1984
  if (JSONStringify(incoming) !== JSONStringify(existing)) {
1976
1985
  return false;
1977
1986
  }
1978
1987
  return true;
1979
1988
  }
1980
- const ingest$3 = function EinsteinPromptRecordRepresentationIngest(input, path, luvio, store, timestamp) {
1989
+ const ingest$7 = function EinsteinPromptRecordRepresentationIngest(input, path, luvio, store, timestamp) {
1981
1990
  if (process.env.NODE_ENV !== 'production') {
1982
- const validateError = validate$d(input);
1991
+ const validateError = validate$m(input);
1983
1992
  if (validateError !== null) {
1984
1993
  throw validateError;
1985
1994
  }
1986
1995
  }
1987
1996
  const key = path.fullPath;
1988
- const ttlToUse = TTL$3;
1989
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "EinsteinLLM", VERSION$b, RepresentationType$3, equals$b);
1997
+ const ttlToUse = TTL$7;
1998
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$7, "EinsteinLLM", VERSION$h, RepresentationType$7, equals$h);
1990
1999
  return createLink(key);
1991
2000
  };
1992
- function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
2001
+ function getTypeCacheKeys$7(rootKeySet, luvio, input, fullPathFactory) {
1993
2002
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1994
2003
  const rootKey = fullPathFactory();
1995
2004
  rootKeySet.set(rootKey, {
1996
2005
  namespace: keyPrefix,
1997
- representationName: RepresentationType$3,
2006
+ representationName: RepresentationType$7,
1998
2007
  mergeable: false
1999
2008
  });
2000
2009
  }
2001
2010
 
2002
- const TTL$2 = 100;
2003
- const VERSION$a = "5fd7b8a03d155ba601bcb4ee725e0893";
2004
- function validate$c(obj, path = 'EinsteinPromptRecordCollectionOutputRepresentation') {
2011
+ const TTL$6 = 100;
2012
+ const VERSION$g = "5fd7b8a03d155ba601bcb4ee725e0893";
2013
+ function validate$l(obj, path = 'EinsteinPromptRecordCollectionOutputRepresentation') {
2005
2014
  const v_error = (() => {
2006
2015
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
2007
2016
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -2020,7 +2029,7 @@ function validate$c(obj, path = 'EinsteinPromptRecordCollectionOutputRepresentat
2020
2029
  for (let i = 0; i < obj_promptRecords.length; i++) {
2021
2030
  const obj_promptRecords_item = obj_promptRecords[i];
2022
2031
  const path_promptRecords_item = path_promptRecords + '[' + i + ']';
2023
- const referencepath_promptRecords_itemValidationError = validate$d(obj_promptRecords_item, path_promptRecords_item);
2032
+ const referencepath_promptRecords_itemValidationError = validate$m(obj_promptRecords_item, path_promptRecords_item);
2024
2033
  if (referencepath_promptRecords_itemValidationError !== null) {
2025
2034
  let message = 'Object doesn\'t match EinsteinPromptRecordRepresentation (at "' + path_promptRecords_item + '")\n';
2026
2035
  message += referencepath_promptRecords_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -2036,62 +2045,62 @@ function validate$c(obj, path = 'EinsteinPromptRecordCollectionOutputRepresentat
2036
2045
  })();
2037
2046
  return v_error === undefined ? null : v_error;
2038
2047
  }
2039
- const RepresentationType$2 = 'EinsteinPromptRecordCollectionOutputRepresentation';
2040
- function normalize$2(input, existing, path, luvio, store, timestamp) {
2048
+ const RepresentationType$6 = 'EinsteinPromptRecordCollectionOutputRepresentation';
2049
+ function normalize$6(input, existing, path, luvio, store, timestamp) {
2041
2050
  return input;
2042
2051
  }
2043
- const select$e = function EinsteinPromptRecordCollectionOutputRepresentationSelect() {
2052
+ const select$u = function EinsteinPromptRecordCollectionOutputRepresentationSelect() {
2044
2053
  return {
2045
2054
  kind: 'Fragment',
2046
- version: VERSION$a,
2055
+ version: VERSION$g,
2047
2056
  private: [],
2048
2057
  opaque: true
2049
2058
  };
2050
2059
  };
2051
- function equals$a(existing, incoming) {
2060
+ function equals$g(existing, incoming) {
2052
2061
  if (JSONStringify(incoming) !== JSONStringify(existing)) {
2053
2062
  return false;
2054
2063
  }
2055
2064
  return true;
2056
2065
  }
2057
- const ingest$2 = function EinsteinPromptRecordCollectionOutputRepresentationIngest(input, path, luvio, store, timestamp) {
2066
+ const ingest$6 = function EinsteinPromptRecordCollectionOutputRepresentationIngest(input, path, luvio, store, timestamp) {
2058
2067
  if (process.env.NODE_ENV !== 'production') {
2059
- const validateError = validate$c(input);
2068
+ const validateError = validate$l(input);
2060
2069
  if (validateError !== null) {
2061
2070
  throw validateError;
2062
2071
  }
2063
2072
  }
2064
2073
  const key = path.fullPath;
2065
- const ttlToUse = TTL$2;
2066
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "EinsteinLLM", VERSION$a, RepresentationType$2, equals$a);
2074
+ const ttlToUse = TTL$6;
2075
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$6, "EinsteinLLM", VERSION$g, RepresentationType$6, equals$g);
2067
2076
  return createLink(key);
2068
2077
  };
2069
- function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
2078
+ function getTypeCacheKeys$6(rootKeySet, luvio, input, fullPathFactory) {
2070
2079
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
2071
2080
  const rootKey = fullPathFactory();
2072
2081
  rootKeySet.set(rootKey, {
2073
2082
  namespace: keyPrefix,
2074
- representationName: RepresentationType$2,
2083
+ representationName: RepresentationType$6,
2075
2084
  mergeable: false
2076
2085
  });
2077
2086
  }
2078
2087
 
2079
- function select$d(luvio, params) {
2080
- return select$e();
2088
+ function select$t(luvio, params) {
2089
+ return select$u();
2081
2090
  }
2082
- function keyBuilder$6(luvio, params) {
2091
+ function keyBuilder$j(luvio, params) {
2083
2092
  return keyPrefix + '::EinsteinPromptRecordCollectionOutputRepresentation:(' + 'isActive:' + params.queryParams.isActive + ',' + 'fields:' + params.queryParams.fields + ',' + 'relatedEntity:' + params.queryParams.relatedEntity + ',' + 'offset:' + params.queryParams.offset + ',' + 'pageLimit:' + params.queryParams.pageLimit + ',' + 'type:' + params.queryParams.type + ',' + 'query:' + params.queryParams.query + ',' + 'sortBy:' + params.queryParams.sortBy + ')';
2084
2093
  }
2085
- function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
2086
- getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$6(luvio, resourceParams));
2094
+ function getResponseCacheKeys$d(storeKeyMap, luvio, resourceParams, response) {
2095
+ getTypeCacheKeys$6(storeKeyMap, luvio, response, () => keyBuilder$j(luvio, resourceParams));
2087
2096
  }
2088
- function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
2097
+ function ingestSuccess$d(luvio, resourceParams, response, snapshotRefresh) {
2089
2098
  const { body } = response;
2090
- const key = keyBuilder$6(luvio, resourceParams);
2091
- luvio.storeIngest(key, ingest$2, body);
2099
+ const key = keyBuilder$j(luvio, resourceParams);
2100
+ luvio.storeIngest(key, ingest$6, body);
2092
2101
  const snapshot = luvio.storeLookup({
2093
2102
  recordId: key,
2094
- node: select$d(),
2103
+ node: select$t(),
2095
2104
  variables: {},
2096
2105
  }, snapshotRefresh);
2097
2106
  if (process.env.NODE_ENV !== 'production') {
@@ -2102,19 +2111,19 @@ function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
2102
2111
  deepFreeze(snapshot.data);
2103
2112
  return snapshot;
2104
2113
  }
2105
- function ingestError$2(luvio, params, error, snapshotRefresh) {
2106
- const key = keyBuilder$6(luvio, params);
2114
+ function ingestError$8(luvio, params, error, snapshotRefresh) {
2115
+ const key = keyBuilder$j(luvio, params);
2107
2116
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
2108
2117
  const storeMetadataParams = {
2109
- ttl: TTL$2,
2118
+ ttl: TTL$6,
2110
2119
  namespace: keyPrefix,
2111
- version: VERSION$a,
2112
- representationName: RepresentationType$2
2120
+ version: VERSION$g,
2121
+ representationName: RepresentationType$6
2113
2122
  };
2114
2123
  luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
2115
2124
  return errorSnapshot;
2116
2125
  }
2117
- function createResourceRequest$3(config) {
2126
+ function createResourceRequest$d(config) {
2118
2127
  const headers = {};
2119
2128
  return {
2120
2129
  baseUri: '/services/data/v65.0',
@@ -2128,7 +2137,7 @@ function createResourceRequest$3(config) {
2128
2137
  };
2129
2138
  }
2130
2139
 
2131
- const adapterName$3 = 'getPromptTemplates';
2140
+ const adapterName$d = 'getPromptTemplates';
2132
2141
  const getPromptTemplates_ConfigPropertyMetadata = [
2133
2142
  generateParamConfigMetadata('isActive', false, 1 /* QueryParameter */, 1 /* Boolean */),
2134
2143
  generateParamConfigMetadata('fields', false, 1 /* QueryParameter */, 0 /* String */, true),
@@ -2139,154 +2148,2250 @@ const getPromptTemplates_ConfigPropertyMetadata = [
2139
2148
  generateParamConfigMetadata('query', false, 1 /* QueryParameter */, 0 /* String */),
2140
2149
  generateParamConfigMetadata('sortBy', false, 1 /* QueryParameter */, 0 /* String */),
2141
2150
  ];
2142
- const getPromptTemplates_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getPromptTemplates_ConfigPropertyMetadata);
2143
- const createResourceParams$3 = /*#__PURE__*/ createResourceParams$7(getPromptTemplates_ConfigPropertyMetadata);
2144
- function keyBuilder$5(luvio, config) {
2145
- const resourceParams = createResourceParams$3(config);
2146
- return keyBuilder$6(luvio, resourceParams);
2151
+ const getPromptTemplates_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$d, getPromptTemplates_ConfigPropertyMetadata);
2152
+ const createResourceParams$d = /*#__PURE__*/ createResourceParams$h(getPromptTemplates_ConfigPropertyMetadata);
2153
+ function keyBuilder$i(luvio, config) {
2154
+ const resourceParams = createResourceParams$d(config);
2155
+ return keyBuilder$j(luvio, resourceParams);
2147
2156
  }
2148
- function typeCheckConfig$3(untrustedConfig) {
2157
+ function typeCheckConfig$d(untrustedConfig) {
2149
2158
  const config = {};
2150
- typeCheckConfig$7(untrustedConfig, config, getPromptTemplates_ConfigPropertyMetadata);
2159
+ typeCheckConfig$h(untrustedConfig, config, getPromptTemplates_ConfigPropertyMetadata);
2151
2160
  return config;
2152
2161
  }
2153
- function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
2162
+ function validateAdapterConfig$d(untrustedConfig, configPropertyNames) {
2154
2163
  if (!untrustedIsObject(untrustedConfig)) {
2155
2164
  return null;
2156
2165
  }
2157
2166
  if (process.env.NODE_ENV !== 'production') {
2158
2167
  validateConfig(untrustedConfig, configPropertyNames);
2159
2168
  }
2160
- const config = typeCheckConfig$3(untrustedConfig);
2169
+ const config = typeCheckConfig$d(untrustedConfig);
2161
2170
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
2162
2171
  return null;
2163
2172
  }
2164
2173
  return config;
2165
2174
  }
2166
- function adapterFragment$2(luvio, config) {
2167
- createResourceParams$3(config);
2168
- return select$d();
2175
+ function adapterFragment$8(luvio, config) {
2176
+ createResourceParams$d(config);
2177
+ return select$t();
2169
2178
  }
2170
- function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
2171
- const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
2179
+ function onFetchResponseSuccess$8(luvio, config, resourceParams, response) {
2180
+ const snapshot = ingestSuccess$d(luvio, resourceParams, response, {
2172
2181
  config,
2173
- resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
2182
+ resolve: () => buildNetworkSnapshot$d(luvio, config, snapshotRefreshOptions)
2174
2183
  });
2175
2184
  return luvio.storeBroadcast().then(() => snapshot);
2176
2185
  }
2177
- function onFetchResponseError$2(luvio, config, resourceParams, response) {
2178
- const snapshot = ingestError$2(luvio, resourceParams, response, {
2186
+ function onFetchResponseError$8(luvio, config, resourceParams, response) {
2187
+ const snapshot = ingestError$8(luvio, resourceParams, response, {
2179
2188
  config,
2180
- resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
2189
+ resolve: () => buildNetworkSnapshot$d(luvio, config, snapshotRefreshOptions)
2181
2190
  });
2182
2191
  return luvio.storeBroadcast().then(() => snapshot);
2183
2192
  }
2184
- function buildNetworkSnapshot$3(luvio, config, options) {
2185
- const resourceParams = createResourceParams$3(config);
2186
- const request = createResourceRequest$3(resourceParams);
2193
+ function buildNetworkSnapshot$d(luvio, config, options) {
2194
+ const resourceParams = createResourceParams$d(config);
2195
+ const request = createResourceRequest$d(resourceParams);
2187
2196
  return luvio.dispatchResourceRequest(request, options)
2188
2197
  .then((response) => {
2189
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
2198
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$8(luvio, config, resourceParams, response), () => {
2190
2199
  const cache = new StoreKeyMap();
2191
- getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
2200
+ getResponseCacheKeys$d(cache, luvio, resourceParams, response.body);
2192
2201
  return cache;
2193
2202
  });
2194
2203
  }, (response) => {
2195
- return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
2204
+ return luvio.handleErrorResponse(() => onFetchResponseError$8(luvio, config, resourceParams, response));
2196
2205
  });
2197
2206
  }
2198
- function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
2199
- return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
2207
+ function buildNetworkSnapshotCachePolicy$8(context, coercedAdapterRequestContext) {
2208
+ return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$d, undefined, false);
2200
2209
  }
2201
- function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
2210
+ function buildCachedSnapshotCachePolicy$8(context, storeLookup) {
2202
2211
  const { luvio, config } = context;
2203
2212
  const selector = {
2204
- recordId: keyBuilder$5(luvio, config),
2205
- node: adapterFragment$2(luvio, config),
2213
+ recordId: keyBuilder$i(luvio, config),
2214
+ node: adapterFragment$8(luvio, config),
2206
2215
  variables: {},
2207
2216
  };
2208
2217
  const cacheSnapshot = storeLookup(selector, {
2209
2218
  config,
2210
- resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
2219
+ resolve: () => buildNetworkSnapshot$d(luvio, config, snapshotRefreshOptions)
2211
2220
  });
2212
2221
  return cacheSnapshot;
2213
2222
  }
2214
2223
  const getPromptTemplatesAdapterFactory = (luvio) => function EinsteinLLM__getPromptTemplates(untrustedConfig, requestContext) {
2215
- const config = validateAdapterConfig$3(untrustedConfig, getPromptTemplates_ConfigPropertyNames);
2224
+ const config = validateAdapterConfig$d(untrustedConfig, getPromptTemplates_ConfigPropertyNames);
2216
2225
  // Invalid or incomplete config
2217
2226
  if (config === null) {
2218
2227
  return null;
2219
2228
  }
2220
2229
  return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
2221
- buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
2230
+ buildCachedSnapshotCachePolicy$8, buildNetworkSnapshotCachePolicy$8);
2222
2231
  };
2223
2232
 
2224
- function select$c(luvio, params) {
2225
- return select$f();
2226
- }
2227
- function keyBuilder$4(luvio, params) {
2228
- return keyPrefix + '::EinsteinPromptRecordRepresentation:(' + 'versionId:' + params.queryParams.versionId + ',' + 'promptTemplateDevName:' + params.urlParams.promptTemplateDevName + ')';
2229
- }
2230
- function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
2231
- getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$4(luvio, resourceParams));
2232
- }
2233
- function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
2234
- const { body } = response;
2235
- const key = keyBuilder$4(luvio, resourceParams);
2236
- luvio.storeIngest(key, ingest$3, body);
2237
- const snapshot = luvio.storeLookup({
2238
- recordId: key,
2239
- node: select$c(),
2240
- variables: {},
2241
- }, snapshotRefresh);
2242
- if (process.env.NODE_ENV !== 'production') {
2243
- if (snapshot.state !== 'Fulfilled') {
2244
- throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
2233
+ const TTL$5 = 100;
2234
+ const VERSION$f = "a90a51578e2fdd7a9741d310bed22b1d";
2235
+ function validate$k(obj, path = 'EinsteinPromptTemplateRepresentation') {
2236
+ const v_error = (() => {
2237
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
2238
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
2245
2239
  }
2246
- }
2247
- deepFreeze(snapshot.data);
2248
- return snapshot;
2240
+ if (obj.additionalData !== undefined) {
2241
+ const obj_additionalData = obj.additionalData;
2242
+ const path_additionalData = path + '.additionalData';
2243
+ const referencepath_additionalDataValidationError = validate$p(obj_additionalData, path_additionalData);
2244
+ if (referencepath_additionalDataValidationError !== null) {
2245
+ let message = 'Object doesn\'t match WrappedMap (at "' + path_additionalData + '")\n';
2246
+ message += referencepath_additionalDataValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
2247
+ return new TypeError(message);
2248
+ }
2249
+ }
2250
+ const obj_errorMessages = obj.errorMessages;
2251
+ const path_errorMessages = path + '.errorMessages';
2252
+ if (!ArrayIsArray(obj_errorMessages)) {
2253
+ return new TypeError('Expected "array" but received "' + typeof obj_errorMessages + '" (at "' + path_errorMessages + '")');
2254
+ }
2255
+ for (let i = 0; i < obj_errorMessages.length; i++) {
2256
+ const obj_errorMessages_item = obj_errorMessages[i];
2257
+ const path_errorMessages_item = path_errorMessages + '[' + i + ']';
2258
+ if (typeof obj_errorMessages_item !== 'string') {
2259
+ return new TypeError('Expected "string" but received "' + typeof obj_errorMessages_item + '" (at "' + path_errorMessages_item + '")');
2260
+ }
2261
+ }
2262
+ const obj_hasWarning = obj.hasWarning;
2263
+ const path_hasWarning = path + '.hasWarning';
2264
+ if (typeof obj_hasWarning !== 'boolean') {
2265
+ return new TypeError('Expected "boolean" but received "' + typeof obj_hasWarning + '" (at "' + path_hasWarning + '")');
2266
+ }
2267
+ const obj_isSuccessful = obj.isSuccessful;
2268
+ const path_isSuccessful = path + '.isSuccessful';
2269
+ if (typeof obj_isSuccessful !== 'boolean') {
2270
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isSuccessful + '" (at "' + path_isSuccessful + '")');
2271
+ }
2272
+ if (obj.statusCode !== undefined) {
2273
+ const obj_statusCode = obj.statusCode;
2274
+ const path_statusCode = path + '.statusCode';
2275
+ if (typeof obj_statusCode !== 'string') {
2276
+ return new TypeError('Expected "string" but received "' + typeof obj_statusCode + '" (at "' + path_statusCode + '")');
2277
+ }
2278
+ }
2279
+ const obj_templateId = obj.templateId;
2280
+ const path_templateId = path + '.templateId';
2281
+ if (typeof obj_templateId !== 'string') {
2282
+ return new TypeError('Expected "string" but received "' + typeof obj_templateId + '" (at "' + path_templateId + '")');
2283
+ }
2284
+ if (obj.templateType !== undefined) {
2285
+ const obj_templateType = obj.templateType;
2286
+ const path_templateType = path + '.templateType';
2287
+ if (typeof obj_templateType !== 'string') {
2288
+ return new TypeError('Expected "string" but received "' + typeof obj_templateType + '" (at "' + path_templateType + '")');
2289
+ }
2290
+ }
2291
+ const obj_versionId = obj.versionId;
2292
+ const path_versionId = path + '.versionId';
2293
+ if (typeof obj_versionId !== 'string') {
2294
+ return new TypeError('Expected "string" but received "' + typeof obj_versionId + '" (at "' + path_versionId + '")');
2295
+ }
2296
+ const obj_warningMessages = obj.warningMessages;
2297
+ const path_warningMessages = path + '.warningMessages';
2298
+ if (!ArrayIsArray(obj_warningMessages)) {
2299
+ return new TypeError('Expected "array" but received "' + typeof obj_warningMessages + '" (at "' + path_warningMessages + '")');
2300
+ }
2301
+ for (let i = 0; i < obj_warningMessages.length; i++) {
2302
+ const obj_warningMessages_item = obj_warningMessages[i];
2303
+ const path_warningMessages_item = path_warningMessages + '[' + i + ']';
2304
+ if (typeof obj_warningMessages_item !== 'string') {
2305
+ return new TypeError('Expected "string" but received "' + typeof obj_warningMessages_item + '" (at "' + path_warningMessages_item + '")');
2306
+ }
2307
+ }
2308
+ })();
2309
+ return v_error === undefined ? null : v_error;
2249
2310
  }
2250
- function ingestError$1(luvio, params, error, snapshotRefresh) {
2251
- const key = keyBuilder$4(luvio, params);
2252
- const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
2253
- const storeMetadataParams = {
2254
- ttl: TTL$3,
2255
- namespace: keyPrefix,
2256
- version: VERSION$b,
2257
- representationName: RepresentationType$3
2258
- };
2259
- luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
2260
- return errorSnapshot;
2311
+ const RepresentationType$5 = 'EinsteinPromptTemplateRepresentation';
2312
+ function keyBuilder$h(luvio, config) {
2313
+ return keyPrefix + '::' + RepresentationType$5 + ':' + config.versionId;
2261
2314
  }
2262
- function createResourceRequest$2(config) {
2263
- const headers = {};
2264
- return {
2265
- baseUri: '/services/data/v65.0',
2266
- basePath: '/einstein/prompt-templates/' + config.urlParams.promptTemplateDevName + '',
2267
- method: 'get',
2268
- body: null,
2269
- urlParams: config.urlParams,
2270
- queryParams: config.queryParams,
2271
- headers,
2272
- priority: 'normal',
2315
+ function keyBuilderFromType$1(luvio, object) {
2316
+ const keyParams = {
2317
+ versionId: object.versionId
2273
2318
  };
2319
+ return keyBuilder$h(luvio, keyParams);
2274
2320
  }
2275
-
2276
- const adapterName$2 = 'getPromptTemplate';
2277
- const getPromptTemplate_ConfigPropertyMetadata = [
2278
- generateParamConfigMetadata('promptTemplateDevName', true, 0 /* UrlParameter */, 0 /* String */),
2321
+ function normalize$5(input, existing, path, luvio, store, timestamp) {
2322
+ return input;
2323
+ }
2324
+ const select$s = function EinsteinPromptTemplateRepresentationSelect() {
2325
+ const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$y();
2326
+ return {
2327
+ kind: 'Fragment',
2328
+ version: VERSION$f,
2329
+ private: [],
2330
+ selections: [
2331
+ {
2332
+ name: 'additionalData',
2333
+ kind: 'Object',
2334
+ selections: WrappedMap__selections,
2335
+ required: false
2336
+ },
2337
+ {
2338
+ name: 'errorMessages',
2339
+ kind: 'Scalar',
2340
+ plural: true
2341
+ },
2342
+ {
2343
+ name: 'hasWarning',
2344
+ kind: 'Scalar'
2345
+ },
2346
+ {
2347
+ name: 'isSuccessful',
2348
+ kind: 'Scalar'
2349
+ },
2350
+ {
2351
+ name: 'statusCode',
2352
+ kind: 'Scalar',
2353
+ required: false
2354
+ },
2355
+ {
2356
+ name: 'templateId',
2357
+ kind: 'Scalar'
2358
+ },
2359
+ {
2360
+ name: 'templateType',
2361
+ kind: 'Scalar',
2362
+ required: false
2363
+ },
2364
+ {
2365
+ name: 'versionId',
2366
+ kind: 'Scalar'
2367
+ },
2368
+ {
2369
+ name: 'warningMessages',
2370
+ kind: 'Scalar',
2371
+ plural: true
2372
+ }
2373
+ ]
2374
+ };
2375
+ };
2376
+ function equals$f(existing, incoming) {
2377
+ const existing_hasWarning = existing.hasWarning;
2378
+ const incoming_hasWarning = incoming.hasWarning;
2379
+ if (!(existing_hasWarning === incoming_hasWarning)) {
2380
+ return false;
2381
+ }
2382
+ const existing_isSuccessful = existing.isSuccessful;
2383
+ const incoming_isSuccessful = incoming.isSuccessful;
2384
+ if (!(existing_isSuccessful === incoming_isSuccessful)) {
2385
+ return false;
2386
+ }
2387
+ const existing_statusCode = existing.statusCode;
2388
+ const incoming_statusCode = incoming.statusCode;
2389
+ // if at least one of these optionals is defined
2390
+ if (existing_statusCode !== undefined || incoming_statusCode !== undefined) {
2391
+ // if one of these is not defined we know the other is defined and therefore
2392
+ // not equal
2393
+ if (existing_statusCode === undefined || incoming_statusCode === undefined) {
2394
+ return false;
2395
+ }
2396
+ if (!(existing_statusCode === incoming_statusCode)) {
2397
+ return false;
2398
+ }
2399
+ }
2400
+ const existing_templateId = existing.templateId;
2401
+ const incoming_templateId = incoming.templateId;
2402
+ if (!(existing_templateId === incoming_templateId)) {
2403
+ return false;
2404
+ }
2405
+ const existing_templateType = existing.templateType;
2406
+ const incoming_templateType = incoming.templateType;
2407
+ // if at least one of these optionals is defined
2408
+ if (existing_templateType !== undefined || incoming_templateType !== undefined) {
2409
+ // if one of these is not defined we know the other is defined and therefore
2410
+ // not equal
2411
+ if (existing_templateType === undefined || incoming_templateType === undefined) {
2412
+ return false;
2413
+ }
2414
+ if (!(existing_templateType === incoming_templateType)) {
2415
+ return false;
2416
+ }
2417
+ }
2418
+ const existing_versionId = existing.versionId;
2419
+ const incoming_versionId = incoming.versionId;
2420
+ if (!(existing_versionId === incoming_versionId)) {
2421
+ return false;
2422
+ }
2423
+ const existing_additionalData = existing.additionalData;
2424
+ const incoming_additionalData = incoming.additionalData;
2425
+ // if at least one of these optionals is defined
2426
+ if (existing_additionalData !== undefined || incoming_additionalData !== undefined) {
2427
+ // if one of these is not defined we know the other is defined and therefore
2428
+ // not equal
2429
+ if (existing_additionalData === undefined || incoming_additionalData === undefined) {
2430
+ return false;
2431
+ }
2432
+ if (!(equals$j(existing_additionalData, incoming_additionalData))) {
2433
+ return false;
2434
+ }
2435
+ }
2436
+ const existing_errorMessages = existing.errorMessages;
2437
+ const incoming_errorMessages = incoming.errorMessages;
2438
+ const equals_errorMessages_items = equalsArray(existing_errorMessages, incoming_errorMessages, (existing_errorMessages_item, incoming_errorMessages_item) => {
2439
+ if (!(existing_errorMessages_item === incoming_errorMessages_item)) {
2440
+ return false;
2441
+ }
2442
+ });
2443
+ if (equals_errorMessages_items === false) {
2444
+ return false;
2445
+ }
2446
+ const existing_warningMessages = existing.warningMessages;
2447
+ const incoming_warningMessages = incoming.warningMessages;
2448
+ const equals_warningMessages_items = equalsArray(existing_warningMessages, incoming_warningMessages, (existing_warningMessages_item, incoming_warningMessages_item) => {
2449
+ if (!(existing_warningMessages_item === incoming_warningMessages_item)) {
2450
+ return false;
2451
+ }
2452
+ });
2453
+ if (equals_warningMessages_items === false) {
2454
+ return false;
2455
+ }
2456
+ return true;
2457
+ }
2458
+ const ingest$5 = function EinsteinPromptTemplateRepresentationIngest(input, path, luvio, store, timestamp) {
2459
+ if (process.env.NODE_ENV !== 'production') {
2460
+ const validateError = validate$k(input);
2461
+ if (validateError !== null) {
2462
+ throw validateError;
2463
+ }
2464
+ }
2465
+ const key = keyBuilderFromType$1(luvio, input);
2466
+ const ttlToUse = TTL$5;
2467
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$5, "EinsteinLLM", VERSION$f, RepresentationType$5, equals$f);
2468
+ return createLink(key);
2469
+ };
2470
+ function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
2471
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
2472
+ const rootKey = keyBuilderFromType$1(luvio, input);
2473
+ rootKeySet.set(rootKey, {
2474
+ namespace: keyPrefix,
2475
+ representationName: RepresentationType$5,
2476
+ mergeable: false
2477
+ });
2478
+ }
2479
+
2480
+ function select$r(luvio, params) {
2481
+ return select$s();
2482
+ }
2483
+ function getResponseCacheKeys$c(storeKeyMap, luvio, resourceParams, response) {
2484
+ getTypeCacheKeys$5(storeKeyMap, luvio, response);
2485
+ }
2486
+ function ingestSuccess$c(luvio, resourceParams, response) {
2487
+ const { body } = response;
2488
+ const key = keyBuilderFromType$1(luvio, body);
2489
+ luvio.storeIngest(key, ingest$5, body);
2490
+ const snapshot = luvio.storeLookup({
2491
+ recordId: key,
2492
+ node: select$r(),
2493
+ variables: {},
2494
+ });
2495
+ if (process.env.NODE_ENV !== 'production') {
2496
+ if (snapshot.state !== 'Fulfilled') {
2497
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
2498
+ }
2499
+ }
2500
+ deepFreeze(snapshot.data);
2501
+ return snapshot;
2502
+ }
2503
+ function createResourceRequest$c(config) {
2504
+ const headers = {};
2505
+ return {
2506
+ baseUri: '/services/data/v65.0',
2507
+ basePath: '/einstein/prompt-templates',
2508
+ method: 'post',
2509
+ body: config.body,
2510
+ urlParams: {},
2511
+ queryParams: {},
2512
+ headers,
2513
+ priority: 'normal',
2514
+ };
2515
+ }
2516
+
2517
+ const adapterName$c = 'createPromptTemplate';
2518
+ const createPromptTemplate_ConfigPropertyMetadata = [
2519
+ generateParamConfigMetadata('apiName', true, 2 /* Body */, 0 /* String */),
2520
+ generateParamConfigMetadata('childRelationships', true, 2 /* Body */, 4 /* Unsupported */),
2521
+ generateParamConfigMetadata('fields', true, 2 /* Body */, 4 /* Unsupported */),
2522
+ generateParamConfigMetadata('id', false, 2 /* Body */, 0 /* String */),
2523
+ ];
2524
+ const createPromptTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$c, createPromptTemplate_ConfigPropertyMetadata);
2525
+ const createResourceParams$c = /*#__PURE__*/ createResourceParams$h(createPromptTemplate_ConfigPropertyMetadata);
2526
+ function typeCheckConfig$c(untrustedConfig) {
2527
+ const config = {};
2528
+ typeCheckConfig$h(untrustedConfig, config, createPromptTemplate_ConfigPropertyMetadata);
2529
+ const untrustedConfig_childRelationships = untrustedConfig.childRelationships;
2530
+ if (untrustedIsObject(untrustedConfig_childRelationships)) {
2531
+ const untrustedConfig_childRelationships_object = {};
2532
+ const untrustedConfig_childRelationships_keys = Object.keys(untrustedConfig_childRelationships);
2533
+ for (let i = 0, arrayLength = untrustedConfig_childRelationships_keys.length; i < arrayLength; i++) {
2534
+ const key = untrustedConfig_childRelationships_keys[i];
2535
+ const untrustedConfig_childRelationships_prop = untrustedConfig_childRelationships[key];
2536
+ if (untrustedConfig_childRelationships_object !== undefined) {
2537
+ untrustedConfig_childRelationships_object[key] = untrustedConfig_childRelationships_prop;
2538
+ }
2539
+ }
2540
+ if (untrustedConfig_childRelationships_object !== undefined && Object.keys(untrustedConfig_childRelationships_object).length >= 0) {
2541
+ config.childRelationships = untrustedConfig_childRelationships_object;
2542
+ }
2543
+ }
2544
+ const untrustedConfig_fields = untrustedConfig.fields;
2545
+ if (untrustedIsObject(untrustedConfig_fields)) {
2546
+ const untrustedConfig_fields_object = {};
2547
+ const untrustedConfig_fields_keys = Object.keys(untrustedConfig_fields);
2548
+ for (let i = 0, arrayLength = untrustedConfig_fields_keys.length; i < arrayLength; i++) {
2549
+ const key = untrustedConfig_fields_keys[i];
2550
+ const untrustedConfig_fields_prop = untrustedConfig_fields[key];
2551
+ if (untrustedConfig_fields_object !== undefined) {
2552
+ untrustedConfig_fields_object[key] = untrustedConfig_fields_prop;
2553
+ }
2554
+ }
2555
+ if (untrustedConfig_fields_object !== undefined && Object.keys(untrustedConfig_fields_object).length >= 0) {
2556
+ config.fields = untrustedConfig_fields_object;
2557
+ }
2558
+ }
2559
+ return config;
2560
+ }
2561
+ function validateAdapterConfig$c(untrustedConfig, configPropertyNames) {
2562
+ if (!untrustedIsObject(untrustedConfig)) {
2563
+ return null;
2564
+ }
2565
+ if (process.env.NODE_ENV !== 'production') {
2566
+ validateConfig(untrustedConfig, configPropertyNames);
2567
+ }
2568
+ const config = typeCheckConfig$c(untrustedConfig);
2569
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
2570
+ return null;
2571
+ }
2572
+ return config;
2573
+ }
2574
+ function buildNetworkSnapshot$c(luvio, config, options) {
2575
+ const resourceParams = createResourceParams$c(config);
2576
+ const request = createResourceRequest$c(resourceParams);
2577
+ return luvio.dispatchResourceRequest(request, options)
2578
+ .then((response) => {
2579
+ return luvio.handleSuccessResponse(() => {
2580
+ const snapshot = ingestSuccess$c(luvio, resourceParams, response);
2581
+ return luvio.storeBroadcast().then(() => snapshot);
2582
+ }, () => {
2583
+ const cache = new StoreKeyMap();
2584
+ getResponseCacheKeys$c(cache, luvio, resourceParams, response.body);
2585
+ return cache;
2586
+ });
2587
+ }, (response) => {
2588
+ deepFreeze(response);
2589
+ throw response;
2590
+ });
2591
+ }
2592
+ const createPromptTemplateAdapterFactory = (luvio) => {
2593
+ return function createPromptTemplate(untrustedConfig) {
2594
+ const config = validateAdapterConfig$c(untrustedConfig, createPromptTemplate_ConfigPropertyNames);
2595
+ // Invalid or incomplete config
2596
+ if (config === null) {
2597
+ throw new Error('Invalid config for "createPromptTemplate"');
2598
+ }
2599
+ return buildNetworkSnapshot$c(luvio, config);
2600
+ };
2601
+ };
2602
+
2603
+ function validate$j(obj, path = 'PromptTemplateDataProviderOutputParamRepresentation') {
2604
+ const v_error = (() => {
2605
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
2606
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
2607
+ }
2608
+ const obj_apiName = obj.apiName;
2609
+ const path_apiName = path + '.apiName';
2610
+ if (typeof obj_apiName !== 'string') {
2611
+ return new TypeError('Expected "string" but received "' + typeof obj_apiName + '" (at "' + path_apiName + '")');
2612
+ }
2613
+ const obj_label = obj.label;
2614
+ const path_label = path + '.label';
2615
+ if (typeof obj_label !== 'string') {
2616
+ return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
2617
+ }
2618
+ })();
2619
+ return v_error === undefined ? null : v_error;
2620
+ }
2621
+
2622
+ function validate$i(obj, path = 'PromptTemplateDataProviderInputParamRepresentation') {
2623
+ const v_error = (() => {
2624
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
2625
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
2626
+ }
2627
+ const obj_apiName = obj.apiName;
2628
+ const path_apiName = path + '.apiName';
2629
+ if (typeof obj_apiName !== 'string') {
2630
+ return new TypeError('Expected "string" but received "' + typeof obj_apiName + '" (at "' + path_apiName + '")');
2631
+ }
2632
+ const obj_label = obj.label;
2633
+ const path_label = path + '.label';
2634
+ if (typeof obj_label !== 'string') {
2635
+ return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
2636
+ }
2637
+ const obj_required = obj.required;
2638
+ const path_required = path + '.required';
2639
+ if (typeof obj_required !== 'boolean') {
2640
+ return new TypeError('Expected "boolean" but received "' + typeof obj_required + '" (at "' + path_required + '")');
2641
+ }
2642
+ const obj_type = obj.type;
2643
+ const path_type = path + '.type';
2644
+ if (typeof obj_type !== 'string') {
2645
+ return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
2646
+ }
2647
+ })();
2648
+ return v_error === undefined ? null : v_error;
2649
+ }
2650
+
2651
+ const TTL$4 = 300;
2652
+ const VERSION$e = "d4824d8c6e7848df0de89295e6d9d434";
2653
+ function validate$h(obj, path = 'PromptTemplateDataProviderInstanceConfigRepresentation') {
2654
+ const v_error = (() => {
2655
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
2656
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
2657
+ }
2658
+ const obj_apiName = obj.apiName;
2659
+ const path_apiName = path + '.apiName';
2660
+ if (typeof obj_apiName !== 'string') {
2661
+ return new TypeError('Expected "string" but received "' + typeof obj_apiName + '" (at "' + path_apiName + '")');
2662
+ }
2663
+ if (obj.dataProviderBundle !== undefined) {
2664
+ const obj_dataProviderBundle = obj.dataProviderBundle;
2665
+ const path_dataProviderBundle = path + '.dataProviderBundle';
2666
+ if (typeof obj_dataProviderBundle !== 'object' || ArrayIsArray(obj_dataProviderBundle) || obj_dataProviderBundle === null) {
2667
+ return new TypeError('Expected "object" but received "' + typeof obj_dataProviderBundle + '" (at "' + path_dataProviderBundle + '")');
2668
+ }
2669
+ const obj_dataProviderBundle_keys = ObjectKeys(obj_dataProviderBundle);
2670
+ for (let i = 0; i < obj_dataProviderBundle_keys.length; i++) {
2671
+ const key = obj_dataProviderBundle_keys[i];
2672
+ const obj_dataProviderBundle_prop = obj_dataProviderBundle[key];
2673
+ const path_dataProviderBundle_prop = path_dataProviderBundle + '["' + key + '"]';
2674
+ if (obj_dataProviderBundle_prop === undefined) {
2675
+ return new TypeError('Expected "defined" but received "' + typeof obj_dataProviderBundle_prop + '" (at "' + path_dataProviderBundle_prop + '")');
2676
+ }
2677
+ }
2678
+ }
2679
+ if (obj.defaultOutputParam !== undefined) {
2680
+ const obj_defaultOutputParam = obj.defaultOutputParam;
2681
+ const path_defaultOutputParam = path + '.defaultOutputParam';
2682
+ const referencepath_defaultOutputParamValidationError = validate$j(obj_defaultOutputParam, path_defaultOutputParam);
2683
+ if (referencepath_defaultOutputParamValidationError !== null) {
2684
+ let message = 'Object doesn\'t match PromptTemplateDataProviderOutputParamRepresentation (at "' + path_defaultOutputParam + '")\n';
2685
+ message += referencepath_defaultOutputParamValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
2686
+ return new TypeError(message);
2687
+ }
2688
+ }
2689
+ const obj_definition = obj.definition;
2690
+ const path_definition = path + '.definition';
2691
+ if (typeof obj_definition !== 'string') {
2692
+ return new TypeError('Expected "string" but received "' + typeof obj_definition + '" (at "' + path_definition + '")');
2693
+ }
2694
+ if (obj.description !== undefined) {
2695
+ const obj_description = obj.description;
2696
+ const path_description = path + '.description';
2697
+ let obj_description_union0 = null;
2698
+ const obj_description_union0_error = (() => {
2699
+ if (typeof obj_description !== 'string') {
2700
+ return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
2701
+ }
2702
+ })();
2703
+ if (obj_description_union0_error != null) {
2704
+ obj_description_union0 = obj_description_union0_error.message;
2705
+ }
2706
+ let obj_description_union1 = null;
2707
+ const obj_description_union1_error = (() => {
2708
+ if (obj_description !== null) {
2709
+ return new TypeError('Expected "null" but received "' + typeof obj_description + '" (at "' + path_description + '")');
2710
+ }
2711
+ })();
2712
+ if (obj_description_union1_error != null) {
2713
+ obj_description_union1 = obj_description_union1_error.message;
2714
+ }
2715
+ if (obj_description_union0 && obj_description_union1) {
2716
+ let message = 'Object doesn\'t match union (at "' + path_description + '")';
2717
+ message += '\n' + obj_description_union0.split('\n').map((line) => '\t' + line).join('\n');
2718
+ message += '\n' + obj_description_union1.split('\n').map((line) => '\t' + line).join('\n');
2719
+ return new TypeError(message);
2720
+ }
2721
+ }
2722
+ const obj_groupName = obj.groupName;
2723
+ const path_groupName = path + '.groupName';
2724
+ if (typeof obj_groupName !== 'string') {
2725
+ return new TypeError('Expected "string" but received "' + typeof obj_groupName + '" (at "' + path_groupName + '")');
2726
+ }
2727
+ if (obj.inputParams !== undefined) {
2728
+ const obj_inputParams = obj.inputParams;
2729
+ const path_inputParams = path + '.inputParams';
2730
+ if (!ArrayIsArray(obj_inputParams)) {
2731
+ return new TypeError('Expected "array" but received "' + typeof obj_inputParams + '" (at "' + path_inputParams + '")');
2732
+ }
2733
+ for (let i = 0; i < obj_inputParams.length; i++) {
2734
+ const obj_inputParams_item = obj_inputParams[i];
2735
+ const path_inputParams_item = path_inputParams + '[' + i + ']';
2736
+ const referencepath_inputParams_itemValidationError = validate$i(obj_inputParams_item, path_inputParams_item);
2737
+ if (referencepath_inputParams_itemValidationError !== null) {
2738
+ let message = 'Object doesn\'t match PromptTemplateDataProviderInputParamRepresentation (at "' + path_inputParams_item + '")\n';
2739
+ message += referencepath_inputParams_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
2740
+ return new TypeError(message);
2741
+ }
2742
+ }
2743
+ }
2744
+ const obj_label = obj.label;
2745
+ const path_label = path + '.label';
2746
+ if (typeof obj_label !== 'string') {
2747
+ return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
2748
+ }
2749
+ if (obj.mappedInputs !== undefined) {
2750
+ const obj_mappedInputs = obj.mappedInputs;
2751
+ const path_mappedInputs = path + '.mappedInputs';
2752
+ if (typeof obj_mappedInputs !== 'object' || ArrayIsArray(obj_mappedInputs) || obj_mappedInputs === null) {
2753
+ return new TypeError('Expected "object" but received "' + typeof obj_mappedInputs + '" (at "' + path_mappedInputs + '")');
2754
+ }
2755
+ const obj_mappedInputs_keys = ObjectKeys(obj_mappedInputs);
2756
+ for (let i = 0; i < obj_mappedInputs_keys.length; i++) {
2757
+ const key = obj_mappedInputs_keys[i];
2758
+ const obj_mappedInputs_prop = obj_mappedInputs[key];
2759
+ const path_mappedInputs_prop = path_mappedInputs + '["' + key + '"]';
2760
+ if (obj_mappedInputs_prop === undefined) {
2761
+ return new TypeError('Expected "defined" but received "' + typeof obj_mappedInputs_prop + '" (at "' + path_mappedInputs_prop + '")');
2762
+ }
2763
+ }
2764
+ }
2765
+ if (obj.nodeIcon !== undefined) {
2766
+ const obj_nodeIcon = obj.nodeIcon;
2767
+ const path_nodeIcon = path + '.nodeIcon';
2768
+ let obj_nodeIcon_union0 = null;
2769
+ const obj_nodeIcon_union0_error = (() => {
2770
+ if (typeof obj_nodeIcon !== 'string') {
2771
+ return new TypeError('Expected "string" but received "' + typeof obj_nodeIcon + '" (at "' + path_nodeIcon + '")');
2772
+ }
2773
+ })();
2774
+ if (obj_nodeIcon_union0_error != null) {
2775
+ obj_nodeIcon_union0 = obj_nodeIcon_union0_error.message;
2776
+ }
2777
+ let obj_nodeIcon_union1 = null;
2778
+ const obj_nodeIcon_union1_error = (() => {
2779
+ if (obj_nodeIcon !== null) {
2780
+ return new TypeError('Expected "null" but received "' + typeof obj_nodeIcon + '" (at "' + path_nodeIcon + '")');
2781
+ }
2782
+ })();
2783
+ if (obj_nodeIcon_union1_error != null) {
2784
+ obj_nodeIcon_union1 = obj_nodeIcon_union1_error.message;
2785
+ }
2786
+ if (obj_nodeIcon_union0 && obj_nodeIcon_union1) {
2787
+ let message = 'Object doesn\'t match union (at "' + path_nodeIcon + '")';
2788
+ message += '\n' + obj_nodeIcon_union0.split('\n').map((line) => '\t' + line).join('\n');
2789
+ message += '\n' + obj_nodeIcon_union1.split('\n').map((line) => '\t' + line).join('\n');
2790
+ return new TypeError(message);
2791
+ }
2792
+ }
2793
+ if (obj.outputParams !== undefined) {
2794
+ const obj_outputParams = obj.outputParams;
2795
+ const path_outputParams = path + '.outputParams';
2796
+ if (!ArrayIsArray(obj_outputParams)) {
2797
+ return new TypeError('Expected "array" but received "' + typeof obj_outputParams + '" (at "' + path_outputParams + '")');
2798
+ }
2799
+ for (let i = 0; i < obj_outputParams.length; i++) {
2800
+ const obj_outputParams_item = obj_outputParams[i];
2801
+ const path_outputParams_item = path_outputParams + '[' + i + ']';
2802
+ const referencepath_outputParams_itemValidationError = validate$j(obj_outputParams_item, path_outputParams_item);
2803
+ if (referencepath_outputParams_itemValidationError !== null) {
2804
+ let message = 'Object doesn\'t match PromptTemplateDataProviderOutputParamRepresentation (at "' + path_outputParams_item + '")\n';
2805
+ message += referencepath_outputParams_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
2806
+ return new TypeError(message);
2807
+ }
2808
+ }
2809
+ }
2810
+ const obj_referenceName = obj.referenceName;
2811
+ const path_referenceName = path + '.referenceName';
2812
+ if (typeof obj_referenceName !== 'string') {
2813
+ return new TypeError('Expected "string" but received "' + typeof obj_referenceName + '" (at "' + path_referenceName + '")');
2814
+ }
2815
+ if (obj.scopedToTarget !== undefined) {
2816
+ const obj_scopedToTarget = obj.scopedToTarget;
2817
+ const path_scopedToTarget = path + '.scopedToTarget';
2818
+ let obj_scopedToTarget_union0 = null;
2819
+ const obj_scopedToTarget_union0_error = (() => {
2820
+ if (typeof obj_scopedToTarget !== 'string') {
2821
+ return new TypeError('Expected "string" but received "' + typeof obj_scopedToTarget + '" (at "' + path_scopedToTarget + '")');
2822
+ }
2823
+ })();
2824
+ if (obj_scopedToTarget_union0_error != null) {
2825
+ obj_scopedToTarget_union0 = obj_scopedToTarget_union0_error.message;
2826
+ }
2827
+ let obj_scopedToTarget_union1 = null;
2828
+ const obj_scopedToTarget_union1_error = (() => {
2829
+ if (obj_scopedToTarget !== null) {
2830
+ return new TypeError('Expected "null" but received "' + typeof obj_scopedToTarget + '" (at "' + path_scopedToTarget + '")');
2831
+ }
2832
+ })();
2833
+ if (obj_scopedToTarget_union1_error != null) {
2834
+ obj_scopedToTarget_union1 = obj_scopedToTarget_union1_error.message;
2835
+ }
2836
+ if (obj_scopedToTarget_union0 && obj_scopedToTarget_union1) {
2837
+ let message = 'Object doesn\'t match union (at "' + path_scopedToTarget + '")';
2838
+ message += '\n' + obj_scopedToTarget_union0.split('\n').map((line) => '\t' + line).join('\n');
2839
+ message += '\n' + obj_scopedToTarget_union1.split('\n').map((line) => '\t' + line).join('\n');
2840
+ return new TypeError(message);
2841
+ }
2842
+ }
2843
+ if (obj.subGroup !== undefined) {
2844
+ const obj_subGroup = obj.subGroup;
2845
+ const path_subGroup = path + '.subGroup';
2846
+ let obj_subGroup_union0 = null;
2847
+ const obj_subGroup_union0_error = (() => {
2848
+ if (typeof obj_subGroup !== 'string') {
2849
+ return new TypeError('Expected "string" but received "' + typeof obj_subGroup + '" (at "' + path_subGroup + '")');
2850
+ }
2851
+ })();
2852
+ if (obj_subGroup_union0_error != null) {
2853
+ obj_subGroup_union0 = obj_subGroup_union0_error.message;
2854
+ }
2855
+ let obj_subGroup_union1 = null;
2856
+ const obj_subGroup_union1_error = (() => {
2857
+ if (obj_subGroup !== null) {
2858
+ return new TypeError('Expected "null" but received "' + typeof obj_subGroup + '" (at "' + path_subGroup + '")');
2859
+ }
2860
+ })();
2861
+ if (obj_subGroup_union1_error != null) {
2862
+ obj_subGroup_union1 = obj_subGroup_union1_error.message;
2863
+ }
2864
+ if (obj_subGroup_union0 && obj_subGroup_union1) {
2865
+ let message = 'Object doesn\'t match union (at "' + path_subGroup + '")';
2866
+ message += '\n' + obj_subGroup_union0.split('\n').map((line) => '\t' + line).join('\n');
2867
+ message += '\n' + obj_subGroup_union1.split('\n').map((line) => '\t' + line).join('\n');
2868
+ return new TypeError(message);
2869
+ }
2870
+ }
2871
+ })();
2872
+ return v_error === undefined ? null : v_error;
2873
+ }
2874
+ const RepresentationType$4 = 'PromptTemplateDataProviderInstanceConfigRepresentation';
2875
+ function normalize$4(input, existing, path, luvio, store, timestamp) {
2876
+ return input;
2877
+ }
2878
+ const select$q = function PromptTemplateDataProviderInstanceConfigRepresentationSelect() {
2879
+ return {
2880
+ kind: 'Fragment',
2881
+ version: VERSION$e,
2882
+ private: [],
2883
+ opaque: true
2884
+ };
2885
+ };
2886
+ function equals$e(existing, incoming) {
2887
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
2888
+ return false;
2889
+ }
2890
+ return true;
2891
+ }
2892
+ const ingest$4 = function PromptTemplateDataProviderInstanceConfigRepresentationIngest(input, path, luvio, store, timestamp) {
2893
+ if (process.env.NODE_ENV !== 'production') {
2894
+ const validateError = validate$h(input);
2895
+ if (validateError !== null) {
2896
+ throw validateError;
2897
+ }
2898
+ }
2899
+ const key = path.fullPath;
2900
+ const ttlToUse = TTL$4;
2901
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "EinsteinLLM", VERSION$e, RepresentationType$4, equals$e);
2902
+ return createLink(key);
2903
+ };
2904
+ function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
2905
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
2906
+ const rootKey = fullPathFactory();
2907
+ rootKeySet.set(rootKey, {
2908
+ namespace: keyPrefix,
2909
+ representationName: RepresentationType$4,
2910
+ mergeable: false
2911
+ });
2912
+ }
2913
+
2914
+ const TTL$3 = 300;
2915
+ const VERSION$d = "3a6ecdfe18eb2af8f8f6aaa1a30b194c";
2916
+ function validate$g(obj, path = 'PromptTemplateDataProviderInstanceConfigCollectionRepresentation') {
2917
+ const v_error = (() => {
2918
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
2919
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
2920
+ }
2921
+ const obj_dataProviderInstanceConfigs = obj.dataProviderInstanceConfigs;
2922
+ const path_dataProviderInstanceConfigs = path + '.dataProviderInstanceConfigs';
2923
+ if (!ArrayIsArray(obj_dataProviderInstanceConfigs)) {
2924
+ return new TypeError('Expected "array" but received "' + typeof obj_dataProviderInstanceConfigs + '" (at "' + path_dataProviderInstanceConfigs + '")');
2925
+ }
2926
+ for (let i = 0; i < obj_dataProviderInstanceConfigs.length; i++) {
2927
+ const obj_dataProviderInstanceConfigs_item = obj_dataProviderInstanceConfigs[i];
2928
+ const path_dataProviderInstanceConfigs_item = path_dataProviderInstanceConfigs + '[' + i + ']';
2929
+ const referencepath_dataProviderInstanceConfigs_itemValidationError = validate$h(obj_dataProviderInstanceConfigs_item, path_dataProviderInstanceConfigs_item);
2930
+ if (referencepath_dataProviderInstanceConfigs_itemValidationError !== null) {
2931
+ let message = 'Object doesn\'t match PromptTemplateDataProviderInstanceConfigRepresentation (at "' + path_dataProviderInstanceConfigs_item + '")\n';
2932
+ message += referencepath_dataProviderInstanceConfigs_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
2933
+ return new TypeError(message);
2934
+ }
2935
+ }
2936
+ })();
2937
+ return v_error === undefined ? null : v_error;
2938
+ }
2939
+ const RepresentationType$3 = 'PromptTemplateDataProviderInstanceConfigCollectionRepresentation';
2940
+ function normalize$3(input, existing, path, luvio, store, timestamp) {
2941
+ return input;
2942
+ }
2943
+ const select$p = function PromptTemplateDataProviderInstanceConfigCollectionRepresentationSelect() {
2944
+ return {
2945
+ kind: 'Fragment',
2946
+ version: VERSION$d,
2947
+ private: [],
2948
+ opaque: true
2949
+ };
2950
+ };
2951
+ function equals$d(existing, incoming) {
2952
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
2953
+ return false;
2954
+ }
2955
+ return true;
2956
+ }
2957
+ const ingest$3 = function PromptTemplateDataProviderInstanceConfigCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
2958
+ if (process.env.NODE_ENV !== 'production') {
2959
+ const validateError = validate$g(input);
2960
+ if (validateError !== null) {
2961
+ throw validateError;
2962
+ }
2963
+ }
2964
+ const key = path.fullPath;
2965
+ const ttlToUse = TTL$3;
2966
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "EinsteinLLM", VERSION$d, RepresentationType$3, equals$d);
2967
+ return createLink(key);
2968
+ };
2969
+ function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
2970
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
2971
+ const rootKey = fullPathFactory();
2972
+ rootKeySet.set(rootKey, {
2973
+ namespace: keyPrefix,
2974
+ representationName: RepresentationType$3,
2975
+ mergeable: false
2976
+ });
2977
+ }
2978
+
2979
+ function select$o(luvio, params) {
2980
+ return select$p();
2981
+ }
2982
+ function keyBuilder$g(luvio, params) {
2983
+ return keyPrefix + '::PromptTemplateDataProviderInstanceConfigCollectionRepresentation:(' + (params.body.groupName === undefined ? 'groupName' : 'groupName:' + params.body.groupName) + '::' + (params.body.target === undefined ? 'target' : 'target:' + params.body.target) + '::' + 'templateInputs:' + params.body.templateInputs + '::' + 'templateTypeName:' + params.body.templateTypeName + ')';
2984
+ }
2985
+ function getResponseCacheKeys$b(storeKeyMap, luvio, resourceParams, response) {
2986
+ getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$g(luvio, resourceParams));
2987
+ }
2988
+ function ingestSuccess$b(luvio, resourceParams, response, snapshotRefresh) {
2989
+ const { body } = response;
2990
+ const key = keyBuilder$g(luvio, resourceParams);
2991
+ luvio.storeIngest(key, ingest$3, body);
2992
+ const snapshot = luvio.storeLookup({
2993
+ recordId: key,
2994
+ node: select$o(),
2995
+ variables: {},
2996
+ }, snapshotRefresh);
2997
+ if (process.env.NODE_ENV !== 'production') {
2998
+ if (snapshot.state !== 'Fulfilled') {
2999
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
3000
+ }
3001
+ }
3002
+ deepFreeze(snapshot.data);
3003
+ return snapshot;
3004
+ }
3005
+ function ingestError$7(luvio, params, error, snapshotRefresh) {
3006
+ const key = keyBuilder$g(luvio, params);
3007
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
3008
+ const storeMetadataParams = {
3009
+ ttl: TTL$3,
3010
+ namespace: keyPrefix,
3011
+ version: VERSION$d,
3012
+ representationName: RepresentationType$3
3013
+ };
3014
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
3015
+ return errorSnapshot;
3016
+ }
3017
+ function createResourceRequest$b(config) {
3018
+ const headers = {};
3019
+ return {
3020
+ baseUri: '/services/data/v65.0',
3021
+ basePath: '/einstein/prompt-templates/data-providers/mapped',
3022
+ method: 'post',
3023
+ body: config.body,
3024
+ urlParams: {},
3025
+ queryParams: {},
3026
+ headers,
3027
+ priority: 'normal',
3028
+ };
3029
+ }
3030
+
3031
+ const adapterName$b = 'getInputMappedDataProviders';
3032
+ const getInputMappedDataProviders_ConfigPropertyMetadata = [
3033
+ generateParamConfigMetadata('groupName', false, 2 /* Body */, 0 /* String */),
3034
+ generateParamConfigMetadata('target', false, 2 /* Body */, 0 /* String */),
3035
+ generateParamConfigMetadata('templateInputs', true, 2 /* Body */, 4 /* Unsupported */, true),
3036
+ generateParamConfigMetadata('templateTypeName', true, 2 /* Body */, 0 /* String */),
3037
+ ];
3038
+ const getInputMappedDataProviders_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$b, getInputMappedDataProviders_ConfigPropertyMetadata);
3039
+ const createResourceParams$b = /*#__PURE__*/ createResourceParams$h(getInputMappedDataProviders_ConfigPropertyMetadata);
3040
+ function keyBuilder$f(luvio, config) {
3041
+ const resourceParams = createResourceParams$b(config);
3042
+ return keyBuilder$g(luvio, resourceParams);
3043
+ }
3044
+ function typeCheckConfig$b(untrustedConfig) {
3045
+ const config = {};
3046
+ typeCheckConfig$h(untrustedConfig, config, getInputMappedDataProviders_ConfigPropertyMetadata);
3047
+ const untrustedConfig_templateInputs = untrustedConfig.templateInputs;
3048
+ if (ArrayIsArray$1(untrustedConfig_templateInputs)) {
3049
+ const untrustedConfig_templateInputs_array = [];
3050
+ for (let i = 0, arrayLength = untrustedConfig_templateInputs.length; i < arrayLength; i++) {
3051
+ const untrustedConfig_templateInputs_item = untrustedConfig_templateInputs[i];
3052
+ untrustedConfig_templateInputs_array.push(untrustedConfig_templateInputs_item);
3053
+ }
3054
+ config.templateInputs = untrustedConfig_templateInputs_array;
3055
+ }
3056
+ return config;
3057
+ }
3058
+ function validateAdapterConfig$b(untrustedConfig, configPropertyNames) {
3059
+ if (!untrustedIsObject(untrustedConfig)) {
3060
+ return null;
3061
+ }
3062
+ if (process.env.NODE_ENV !== 'production') {
3063
+ validateConfig(untrustedConfig, configPropertyNames);
3064
+ }
3065
+ const config = typeCheckConfig$b(untrustedConfig);
3066
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
3067
+ return null;
3068
+ }
3069
+ return config;
3070
+ }
3071
+ function adapterFragment$7(luvio, config) {
3072
+ createResourceParams$b(config);
3073
+ return select$o();
3074
+ }
3075
+ function onFetchResponseSuccess$7(luvio, config, resourceParams, response) {
3076
+ const snapshot = ingestSuccess$b(luvio, resourceParams, response, {
3077
+ config,
3078
+ resolve: () => buildNetworkSnapshot$b(luvio, config, snapshotRefreshOptions)
3079
+ });
3080
+ return luvio.storeBroadcast().then(() => snapshot);
3081
+ }
3082
+ function onFetchResponseError$7(luvio, config, resourceParams, response) {
3083
+ const snapshot = ingestError$7(luvio, resourceParams, response, {
3084
+ config,
3085
+ resolve: () => buildNetworkSnapshot$b(luvio, config, snapshotRefreshOptions)
3086
+ });
3087
+ return luvio.storeBroadcast().then(() => snapshot);
3088
+ }
3089
+ function buildNetworkSnapshot$b(luvio, config, options) {
3090
+ const resourceParams = createResourceParams$b(config);
3091
+ const request = createResourceRequest$b(resourceParams);
3092
+ return luvio.dispatchResourceRequest(request, options)
3093
+ .then((response) => {
3094
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$7(luvio, config, resourceParams, response), () => {
3095
+ const cache = new StoreKeyMap();
3096
+ getResponseCacheKeys$b(cache, luvio, resourceParams, response.body);
3097
+ return cache;
3098
+ });
3099
+ }, (response) => {
3100
+ return luvio.handleErrorResponse(() => onFetchResponseError$7(luvio, config, resourceParams, response));
3101
+ });
3102
+ }
3103
+ function buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext) {
3104
+ return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$b, 'get', false);
3105
+ }
3106
+ function buildCachedSnapshotCachePolicy$7(context, storeLookup) {
3107
+ const { luvio, config } = context;
3108
+ const selector = {
3109
+ recordId: keyBuilder$f(luvio, config),
3110
+ node: adapterFragment$7(luvio, config),
3111
+ variables: {},
3112
+ };
3113
+ const cacheSnapshot = storeLookup(selector, {
3114
+ config,
3115
+ resolve: () => buildNetworkSnapshot$b(luvio, config, snapshotRefreshOptions)
3116
+ });
3117
+ return cacheSnapshot;
3118
+ }
3119
+ const getInputMappedDataProvidersAdapterFactory = (luvio) => function EinsteinLLM__getInputMappedDataProviders(untrustedConfig, requestContext) {
3120
+ const config = validateAdapterConfig$b(untrustedConfig, getInputMappedDataProviders_ConfigPropertyNames);
3121
+ // Invalid or incomplete config
3122
+ if (config === null) {
3123
+ return null;
3124
+ }
3125
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
3126
+ buildCachedSnapshotCachePolicy$7, buildNetworkSnapshotCachePolicy$7);
3127
+ };
3128
+
3129
+ function select$n(luvio, params) {
3130
+ return select$p();
3131
+ }
3132
+ function keyBuilder$e(luvio, params) {
3133
+ return keyPrefix + '::PromptTemplateDataProviderInstanceConfigCollectionRepresentation:(' + 'groupNames:' + params.queryParams.groupNames + ',' + 'targets:' + params.queryParams.targets + ',' + 'templateType:' + params.urlParams.templateType + ')';
3134
+ }
3135
+ function getResponseCacheKeys$a(storeKeyMap, luvio, resourceParams, response) {
3136
+ getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$e(luvio, resourceParams));
3137
+ }
3138
+ function ingestSuccess$a(luvio, resourceParams, response, snapshotRefresh) {
3139
+ const { body } = response;
3140
+ const key = keyBuilder$e(luvio, resourceParams);
3141
+ luvio.storeIngest(key, ingest$3, body);
3142
+ const snapshot = luvio.storeLookup({
3143
+ recordId: key,
3144
+ node: select$n(),
3145
+ variables: {},
3146
+ }, snapshotRefresh);
3147
+ if (process.env.NODE_ENV !== 'production') {
3148
+ if (snapshot.state !== 'Fulfilled') {
3149
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
3150
+ }
3151
+ }
3152
+ deepFreeze(snapshot.data);
3153
+ return snapshot;
3154
+ }
3155
+ function ingestError$6(luvio, params, error, snapshotRefresh) {
3156
+ const key = keyBuilder$e(luvio, params);
3157
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
3158
+ const storeMetadataParams = {
3159
+ ttl: TTL$3,
3160
+ namespace: keyPrefix,
3161
+ version: VERSION$d,
3162
+ representationName: RepresentationType$3
3163
+ };
3164
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
3165
+ return errorSnapshot;
3166
+ }
3167
+ function createResourceRequest$a(config) {
3168
+ const headers = {};
3169
+ return {
3170
+ baseUri: '/services/data/v65.0',
3171
+ basePath: '/einstein/prompt-templates/data-providers/' + config.urlParams.templateType + '',
3172
+ method: 'get',
3173
+ body: null,
3174
+ urlParams: config.urlParams,
3175
+ queryParams: config.queryParams,
3176
+ headers,
3177
+ priority: 'normal',
3178
+ };
3179
+ }
3180
+
3181
+ const adapterName$a = 'getDataProviders';
3182
+ const getDataProviders_ConfigPropertyMetadata = [
3183
+ generateParamConfigMetadata('templateType', true, 0 /* UrlParameter */, 0 /* String */),
3184
+ generateParamConfigMetadata('groupNames', false, 1 /* QueryParameter */, 0 /* String */, true),
3185
+ generateParamConfigMetadata('targets', false, 1 /* QueryParameter */, 0 /* String */, true),
3186
+ ];
3187
+ const getDataProviders_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$a, getDataProviders_ConfigPropertyMetadata);
3188
+ const createResourceParams$a = /*#__PURE__*/ createResourceParams$h(getDataProviders_ConfigPropertyMetadata);
3189
+ function keyBuilder$d(luvio, config) {
3190
+ const resourceParams = createResourceParams$a(config);
3191
+ return keyBuilder$e(luvio, resourceParams);
3192
+ }
3193
+ function typeCheckConfig$a(untrustedConfig) {
3194
+ const config = {};
3195
+ typeCheckConfig$h(untrustedConfig, config, getDataProviders_ConfigPropertyMetadata);
3196
+ return config;
3197
+ }
3198
+ function validateAdapterConfig$a(untrustedConfig, configPropertyNames) {
3199
+ if (!untrustedIsObject(untrustedConfig)) {
3200
+ return null;
3201
+ }
3202
+ if (process.env.NODE_ENV !== 'production') {
3203
+ validateConfig(untrustedConfig, configPropertyNames);
3204
+ }
3205
+ const config = typeCheckConfig$a(untrustedConfig);
3206
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
3207
+ return null;
3208
+ }
3209
+ return config;
3210
+ }
3211
+ function adapterFragment$6(luvio, config) {
3212
+ createResourceParams$a(config);
3213
+ return select$n();
3214
+ }
3215
+ function onFetchResponseSuccess$6(luvio, config, resourceParams, response) {
3216
+ const snapshot = ingestSuccess$a(luvio, resourceParams, response, {
3217
+ config,
3218
+ resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
3219
+ });
3220
+ return luvio.storeBroadcast().then(() => snapshot);
3221
+ }
3222
+ function onFetchResponseError$6(luvio, config, resourceParams, response) {
3223
+ const snapshot = ingestError$6(luvio, resourceParams, response, {
3224
+ config,
3225
+ resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
3226
+ });
3227
+ return luvio.storeBroadcast().then(() => snapshot);
3228
+ }
3229
+ function buildNetworkSnapshot$a(luvio, config, options) {
3230
+ const resourceParams = createResourceParams$a(config);
3231
+ const request = createResourceRequest$a(resourceParams);
3232
+ return luvio.dispatchResourceRequest(request, options)
3233
+ .then((response) => {
3234
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$6(luvio, config, resourceParams, response), () => {
3235
+ const cache = new StoreKeyMap();
3236
+ getResponseCacheKeys$a(cache, luvio, resourceParams, response.body);
3237
+ return cache;
3238
+ });
3239
+ }, (response) => {
3240
+ return luvio.handleErrorResponse(() => onFetchResponseError$6(luvio, config, resourceParams, response));
3241
+ });
3242
+ }
3243
+ function buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext) {
3244
+ return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$a, undefined, false);
3245
+ }
3246
+ function buildCachedSnapshotCachePolicy$6(context, storeLookup) {
3247
+ const { luvio, config } = context;
3248
+ const selector = {
3249
+ recordId: keyBuilder$d(luvio, config),
3250
+ node: adapterFragment$6(luvio, config),
3251
+ variables: {},
3252
+ };
3253
+ const cacheSnapshot = storeLookup(selector, {
3254
+ config,
3255
+ resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
3256
+ });
3257
+ return cacheSnapshot;
3258
+ }
3259
+ const getDataProvidersAdapterFactory = (luvio) => function EinsteinLLM__getDataProviders(untrustedConfig, requestContext) {
3260
+ const config = validateAdapterConfig$a(untrustedConfig, getDataProviders_ConfigPropertyNames);
3261
+ // Invalid or incomplete config
3262
+ if (config === null) {
3263
+ return null;
3264
+ }
3265
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
3266
+ buildCachedSnapshotCachePolicy$6, buildNetworkSnapshotCachePolicy$6);
3267
+ };
3268
+
3269
+ function select$m(luvio, params) {
3270
+ return select$q();
3271
+ }
3272
+ function keyBuilder$c(luvio, params) {
3273
+ return keyPrefix + '::PromptTemplateDataProviderInstanceConfigRepresentation:(' + stableJSONStringify(params.body.additionalParam) + '::' + 'definition:' + params.body.definition + '::' + 'groupName:' + params.body.groupName + ')';
3274
+ }
3275
+ function getResponseCacheKeys$9(storeKeyMap, luvio, resourceParams, response) {
3276
+ getTypeCacheKeys$4(storeKeyMap, luvio, response, () => keyBuilder$c(luvio, resourceParams));
3277
+ }
3278
+ function ingestSuccess$9(luvio, resourceParams, response, snapshotRefresh) {
3279
+ const { body } = response;
3280
+ const key = keyBuilder$c(luvio, resourceParams);
3281
+ luvio.storeIngest(key, ingest$4, body);
3282
+ const snapshot = luvio.storeLookup({
3283
+ recordId: key,
3284
+ node: select$m(),
3285
+ variables: {},
3286
+ }, snapshotRefresh);
3287
+ if (process.env.NODE_ENV !== 'production') {
3288
+ if (snapshot.state !== 'Fulfilled') {
3289
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
3290
+ }
3291
+ }
3292
+ deepFreeze(snapshot.data);
3293
+ return snapshot;
3294
+ }
3295
+ function ingestError$5(luvio, params, error, snapshotRefresh) {
3296
+ const key = keyBuilder$c(luvio, params);
3297
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
3298
+ const storeMetadataParams = {
3299
+ ttl: TTL$4,
3300
+ namespace: keyPrefix,
3301
+ version: VERSION$e,
3302
+ representationName: RepresentationType$4
3303
+ };
3304
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
3305
+ return errorSnapshot;
3306
+ }
3307
+ function createResourceRequest$9(config) {
3308
+ const headers = {};
3309
+ return {
3310
+ baseUri: '/services/data/v65.0',
3311
+ basePath: '/einstein/prompt-templates/data-provider/describe',
3312
+ method: 'post',
3313
+ body: config.body,
3314
+ urlParams: {},
3315
+ queryParams: {},
3316
+ headers,
3317
+ priority: 'normal',
3318
+ };
3319
+ }
3320
+
3321
+ const adapterName$9 = 'getDataProviderInstanceConfig';
3322
+ const getDataProviderInstanceConfig_ConfigPropertyMetadata = [
3323
+ generateParamConfigMetadata('additionalParam', false, 2 /* Body */, 4 /* Unsupported */),
3324
+ generateParamConfigMetadata('definition', true, 2 /* Body */, 0 /* String */),
3325
+ generateParamConfigMetadata('groupName', true, 2 /* Body */, 0 /* String */),
3326
+ ];
3327
+ const getDataProviderInstanceConfig_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$9, getDataProviderInstanceConfig_ConfigPropertyMetadata);
3328
+ const createResourceParams$9 = /*#__PURE__*/ createResourceParams$h(getDataProviderInstanceConfig_ConfigPropertyMetadata);
3329
+ function keyBuilder$b(luvio, config) {
3330
+ const resourceParams = createResourceParams$9(config);
3331
+ return keyBuilder$c(luvio, resourceParams);
3332
+ }
3333
+ function typeCheckConfig$9(untrustedConfig) {
3334
+ const config = {};
3335
+ typeCheckConfig$h(untrustedConfig, config, getDataProviderInstanceConfig_ConfigPropertyMetadata);
3336
+ const untrustedConfig_additionalParam = untrustedConfig.additionalParam;
3337
+ if (untrustedIsObject(untrustedConfig_additionalParam)) {
3338
+ const untrustedConfig_additionalParam_object = {};
3339
+ const untrustedConfig_additionalParam_keys = Object.keys(untrustedConfig_additionalParam);
3340
+ for (let i = 0, arrayLength = untrustedConfig_additionalParam_keys.length; i < arrayLength; i++) {
3341
+ const key = untrustedConfig_additionalParam_keys[i];
3342
+ const untrustedConfig_additionalParam_prop = untrustedConfig_additionalParam[key];
3343
+ if (untrustedConfig_additionalParam_object !== undefined) {
3344
+ untrustedConfig_additionalParam_object[key] = untrustedConfig_additionalParam_prop;
3345
+ }
3346
+ }
3347
+ if (untrustedConfig_additionalParam_object !== undefined && Object.keys(untrustedConfig_additionalParam_object).length >= 0) {
3348
+ config.additionalParam = untrustedConfig_additionalParam_object;
3349
+ }
3350
+ }
3351
+ return config;
3352
+ }
3353
+ function validateAdapterConfig$9(untrustedConfig, configPropertyNames) {
3354
+ if (!untrustedIsObject(untrustedConfig)) {
3355
+ return null;
3356
+ }
3357
+ if (process.env.NODE_ENV !== 'production') {
3358
+ validateConfig(untrustedConfig, configPropertyNames);
3359
+ }
3360
+ const config = typeCheckConfig$9(untrustedConfig);
3361
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
3362
+ return null;
3363
+ }
3364
+ return config;
3365
+ }
3366
+ function adapterFragment$5(luvio, config) {
3367
+ createResourceParams$9(config);
3368
+ return select$m();
3369
+ }
3370
+ function onFetchResponseSuccess$5(luvio, config, resourceParams, response) {
3371
+ const snapshot = ingestSuccess$9(luvio, resourceParams, response, {
3372
+ config,
3373
+ resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
3374
+ });
3375
+ return luvio.storeBroadcast().then(() => snapshot);
3376
+ }
3377
+ function onFetchResponseError$5(luvio, config, resourceParams, response) {
3378
+ const snapshot = ingestError$5(luvio, resourceParams, response, {
3379
+ config,
3380
+ resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
3381
+ });
3382
+ return luvio.storeBroadcast().then(() => snapshot);
3383
+ }
3384
+ function buildNetworkSnapshot$9(luvio, config, options) {
3385
+ const resourceParams = createResourceParams$9(config);
3386
+ const request = createResourceRequest$9(resourceParams);
3387
+ return luvio.dispatchResourceRequest(request, options)
3388
+ .then((response) => {
3389
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$5(luvio, config, resourceParams, response), () => {
3390
+ const cache = new StoreKeyMap();
3391
+ getResponseCacheKeys$9(cache, luvio, resourceParams, response.body);
3392
+ return cache;
3393
+ });
3394
+ }, (response) => {
3395
+ return luvio.handleErrorResponse(() => onFetchResponseError$5(luvio, config, resourceParams, response));
3396
+ });
3397
+ }
3398
+ function buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext) {
3399
+ return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$9, 'get', false);
3400
+ }
3401
+ function buildCachedSnapshotCachePolicy$5(context, storeLookup) {
3402
+ const { luvio, config } = context;
3403
+ const selector = {
3404
+ recordId: keyBuilder$b(luvio, config),
3405
+ node: adapterFragment$5(luvio, config),
3406
+ variables: {},
3407
+ };
3408
+ const cacheSnapshot = storeLookup(selector, {
3409
+ config,
3410
+ resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
3411
+ });
3412
+ return cacheSnapshot;
3413
+ }
3414
+ const getDataProviderInstanceConfigAdapterFactory = (luvio) => function EinsteinLLM__getDataProviderInstanceConfig(untrustedConfig, requestContext) {
3415
+ const config = validateAdapterConfig$9(untrustedConfig, getDataProviderInstanceConfig_ConfigPropertyNames);
3416
+ // Invalid or incomplete config
3417
+ if (config === null) {
3418
+ return null;
3419
+ }
3420
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
3421
+ buildCachedSnapshotCachePolicy$5, buildNetworkSnapshotCachePolicy$5);
3422
+ };
3423
+
3424
+ function validate$f(obj, path = 'PromptTemplateDataProviderTypeConfigRepresentation') {
3425
+ const v_error = (() => {
3426
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
3427
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
3428
+ }
3429
+ if (obj.description !== undefined) {
3430
+ const obj_description = obj.description;
3431
+ const path_description = path + '.description';
3432
+ if (typeof obj_description !== 'string') {
3433
+ return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
3434
+ }
3435
+ }
3436
+ const obj_groupName = obj.groupName;
3437
+ const path_groupName = path + '.groupName';
3438
+ if (typeof obj_groupName !== 'string') {
3439
+ return new TypeError('Expected "string" but received "' + typeof obj_groupName + '" (at "' + path_groupName + '")');
3440
+ }
3441
+ const obj_icon = obj.icon;
3442
+ const path_icon = path + '.icon';
3443
+ if (typeof obj_icon !== 'string') {
3444
+ return new TypeError('Expected "string" but received "' + typeof obj_icon + '" (at "' + path_icon + '")');
3445
+ }
3446
+ const obj_isTopLevel = obj.isTopLevel;
3447
+ const path_isTopLevel = path + '.isTopLevel';
3448
+ if (typeof obj_isTopLevel !== 'boolean') {
3449
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isTopLevel + '" (at "' + path_isTopLevel + '")');
3450
+ }
3451
+ const obj_label = obj.label;
3452
+ const path_label = path + '.label';
3453
+ if (typeof obj_label !== 'string') {
3454
+ return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
3455
+ }
3456
+ if (obj.parentNode !== undefined) {
3457
+ const obj_parentNode = obj.parentNode;
3458
+ const path_parentNode = path + '.parentNode';
3459
+ if (typeof obj_parentNode !== 'string') {
3460
+ return new TypeError('Expected "string" but received "' + typeof obj_parentNode + '" (at "' + path_parentNode + '")');
3461
+ }
3462
+ }
3463
+ if (obj.scope !== undefined) {
3464
+ const obj_scope = obj.scope;
3465
+ const path_scope = path + '.scope';
3466
+ if (obj_scope === undefined) {
3467
+ return new TypeError('Expected "defined" but received "' + typeof obj_scope + '" (at "' + path_scope + '")');
3468
+ }
3469
+ }
3470
+ })();
3471
+ return v_error === undefined ? null : v_error;
3472
+ }
3473
+
3474
+ const TTL$2 = 300;
3475
+ const VERSION$c = "212332dac1decc071b476742df3440fb";
3476
+ function validate$e(obj, path = 'PromptTemplateDataProviderTypeConfigCollectionRepresentation') {
3477
+ const v_error = (() => {
3478
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
3479
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
3480
+ }
3481
+ const obj_dataProviderTypeConfigs = obj.dataProviderTypeConfigs;
3482
+ const path_dataProviderTypeConfigs = path + '.dataProviderTypeConfigs';
3483
+ if (!ArrayIsArray(obj_dataProviderTypeConfigs)) {
3484
+ return new TypeError('Expected "array" but received "' + typeof obj_dataProviderTypeConfigs + '" (at "' + path_dataProviderTypeConfigs + '")');
3485
+ }
3486
+ for (let i = 0; i < obj_dataProviderTypeConfigs.length; i++) {
3487
+ const obj_dataProviderTypeConfigs_item = obj_dataProviderTypeConfigs[i];
3488
+ const path_dataProviderTypeConfigs_item = path_dataProviderTypeConfigs + '[' + i + ']';
3489
+ const referencepath_dataProviderTypeConfigs_itemValidationError = validate$f(obj_dataProviderTypeConfigs_item, path_dataProviderTypeConfigs_item);
3490
+ if (referencepath_dataProviderTypeConfigs_itemValidationError !== null) {
3491
+ let message = 'Object doesn\'t match PromptTemplateDataProviderTypeConfigRepresentation (at "' + path_dataProviderTypeConfigs_item + '")\n';
3492
+ message += referencepath_dataProviderTypeConfigs_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
3493
+ return new TypeError(message);
3494
+ }
3495
+ }
3496
+ })();
3497
+ return v_error === undefined ? null : v_error;
3498
+ }
3499
+ const RepresentationType$2 = 'PromptTemplateDataProviderTypeConfigCollectionRepresentation';
3500
+ function normalize$2(input, existing, path, luvio, store, timestamp) {
3501
+ return input;
3502
+ }
3503
+ const select$l = function PromptTemplateDataProviderTypeConfigCollectionRepresentationSelect() {
3504
+ return {
3505
+ kind: 'Fragment',
3506
+ version: VERSION$c,
3507
+ private: [],
3508
+ opaque: true
3509
+ };
3510
+ };
3511
+ function equals$c(existing, incoming) {
3512
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
3513
+ return false;
3514
+ }
3515
+ return true;
3516
+ }
3517
+ const ingest$2 = function PromptTemplateDataProviderTypeConfigCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
3518
+ if (process.env.NODE_ENV !== 'production') {
3519
+ const validateError = validate$e(input);
3520
+ if (validateError !== null) {
3521
+ throw validateError;
3522
+ }
3523
+ }
3524
+ const key = path.fullPath;
3525
+ const ttlToUse = TTL$2;
3526
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "EinsteinLLM", VERSION$c, RepresentationType$2, equals$c);
3527
+ return createLink(key);
3528
+ };
3529
+ function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
3530
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
3531
+ const rootKey = fullPathFactory();
3532
+ rootKeySet.set(rootKey, {
3533
+ namespace: keyPrefix,
3534
+ representationName: RepresentationType$2,
3535
+ mergeable: false
3536
+ });
3537
+ }
3538
+
3539
+ function select$k(luvio, params) {
3540
+ return select$l();
3541
+ }
3542
+ function keyBuilder$a(luvio, params) {
3543
+ return keyPrefix + '::PromptTemplateDataProviderTypeConfigCollectionRepresentation:(' + 'templateType:' + params.urlParams.templateType + ')';
3544
+ }
3545
+ function getResponseCacheKeys$8(storeKeyMap, luvio, resourceParams, response) {
3546
+ getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$a(luvio, resourceParams));
3547
+ }
3548
+ function ingestSuccess$8(luvio, resourceParams, response, snapshotRefresh) {
3549
+ const { body } = response;
3550
+ const key = keyBuilder$a(luvio, resourceParams);
3551
+ luvio.storeIngest(key, ingest$2, body);
3552
+ const snapshot = luvio.storeLookup({
3553
+ recordId: key,
3554
+ node: select$k(),
3555
+ variables: {},
3556
+ }, snapshotRefresh);
3557
+ if (process.env.NODE_ENV !== 'production') {
3558
+ if (snapshot.state !== 'Fulfilled') {
3559
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
3560
+ }
3561
+ }
3562
+ deepFreeze(snapshot.data);
3563
+ return snapshot;
3564
+ }
3565
+ function ingestError$4(luvio, params, error, snapshotRefresh) {
3566
+ const key = keyBuilder$a(luvio, params);
3567
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
3568
+ const storeMetadataParams = {
3569
+ ttl: TTL$2,
3570
+ namespace: keyPrefix,
3571
+ version: VERSION$c,
3572
+ representationName: RepresentationType$2
3573
+ };
3574
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
3575
+ return errorSnapshot;
3576
+ }
3577
+ function createResourceRequest$8(config) {
3578
+ const headers = {};
3579
+ return {
3580
+ baseUri: '/services/data/v65.0',
3581
+ basePath: '/einstein/prompt-templates/data-provider-types/' + config.urlParams.templateType + '',
3582
+ method: 'get',
3583
+ body: null,
3584
+ urlParams: config.urlParams,
3585
+ queryParams: {},
3586
+ headers,
3587
+ priority: 'normal',
3588
+ };
3589
+ }
3590
+
3591
+ const adapterName$8 = 'getDataProviderTypeConfigs';
3592
+ const getDataProviderTypeConfigs_ConfigPropertyMetadata = [
3593
+ generateParamConfigMetadata('templateType', true, 0 /* UrlParameter */, 0 /* String */),
3594
+ ];
3595
+ const getDataProviderTypeConfigs_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$8, getDataProviderTypeConfigs_ConfigPropertyMetadata);
3596
+ const createResourceParams$8 = /*#__PURE__*/ createResourceParams$h(getDataProviderTypeConfigs_ConfigPropertyMetadata);
3597
+ function keyBuilder$9(luvio, config) {
3598
+ const resourceParams = createResourceParams$8(config);
3599
+ return keyBuilder$a(luvio, resourceParams);
3600
+ }
3601
+ function typeCheckConfig$8(untrustedConfig) {
3602
+ const config = {};
3603
+ typeCheckConfig$h(untrustedConfig, config, getDataProviderTypeConfigs_ConfigPropertyMetadata);
3604
+ return config;
3605
+ }
3606
+ function validateAdapterConfig$8(untrustedConfig, configPropertyNames) {
3607
+ if (!untrustedIsObject(untrustedConfig)) {
3608
+ return null;
3609
+ }
3610
+ if (process.env.NODE_ENV !== 'production') {
3611
+ validateConfig(untrustedConfig, configPropertyNames);
3612
+ }
3613
+ const config = typeCheckConfig$8(untrustedConfig);
3614
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
3615
+ return null;
3616
+ }
3617
+ return config;
3618
+ }
3619
+ function adapterFragment$4(luvio, config) {
3620
+ createResourceParams$8(config);
3621
+ return select$k();
3622
+ }
3623
+ function onFetchResponseSuccess$4(luvio, config, resourceParams, response) {
3624
+ const snapshot = ingestSuccess$8(luvio, resourceParams, response, {
3625
+ config,
3626
+ resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
3627
+ });
3628
+ return luvio.storeBroadcast().then(() => snapshot);
3629
+ }
3630
+ function onFetchResponseError$4(luvio, config, resourceParams, response) {
3631
+ const snapshot = ingestError$4(luvio, resourceParams, response, {
3632
+ config,
3633
+ resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
3634
+ });
3635
+ return luvio.storeBroadcast().then(() => snapshot);
3636
+ }
3637
+ function buildNetworkSnapshot$8(luvio, config, options) {
3638
+ const resourceParams = createResourceParams$8(config);
3639
+ const request = createResourceRequest$8(resourceParams);
3640
+ return luvio.dispatchResourceRequest(request, options)
3641
+ .then((response) => {
3642
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$4(luvio, config, resourceParams, response), () => {
3643
+ const cache = new StoreKeyMap();
3644
+ getResponseCacheKeys$8(cache, luvio, resourceParams, response.body);
3645
+ return cache;
3646
+ });
3647
+ }, (response) => {
3648
+ return luvio.handleErrorResponse(() => onFetchResponseError$4(luvio, config, resourceParams, response));
3649
+ });
3650
+ }
3651
+ function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
3652
+ return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$8, undefined, false);
3653
+ }
3654
+ function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
3655
+ const { luvio, config } = context;
3656
+ const selector = {
3657
+ recordId: keyBuilder$9(luvio, config),
3658
+ node: adapterFragment$4(luvio, config),
3659
+ variables: {},
3660
+ };
3661
+ const cacheSnapshot = storeLookup(selector, {
3662
+ config,
3663
+ resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
3664
+ });
3665
+ return cacheSnapshot;
3666
+ }
3667
+ const getDataProviderTypeConfigsAdapterFactory = (luvio) => function EinsteinLLM__getDataProviderTypeConfigs(untrustedConfig, requestContext) {
3668
+ const config = validateAdapterConfig$8(untrustedConfig, getDataProviderTypeConfigs_ConfigPropertyNames);
3669
+ // Invalid or incomplete config
3670
+ if (config === null) {
3671
+ return null;
3672
+ }
3673
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
3674
+ buildCachedSnapshotCachePolicy$4, buildNetworkSnapshotCachePolicy$4);
3675
+ };
3676
+
3677
+ function select$j(luvio, params) {
3678
+ return select$v();
3679
+ }
3680
+ function keyBuilder$8(luvio, params) {
3681
+ return keyPrefix + '::EinsteinPromptRecordRepresentation:(' + 'versionId:' + params.queryParams.versionId + ',' + 'promptTemplateDevName:' + params.urlParams.promptTemplateDevName + ')';
3682
+ }
3683
+ function getResponseCacheKeys$7(storeKeyMap, luvio, resourceParams, response) {
3684
+ getTypeCacheKeys$7(storeKeyMap, luvio, response, () => keyBuilder$8(luvio, resourceParams));
3685
+ }
3686
+ function ingestSuccess$7(luvio, resourceParams, response, snapshotRefresh) {
3687
+ const { body } = response;
3688
+ const key = keyBuilder$8(luvio, resourceParams);
3689
+ luvio.storeIngest(key, ingest$7, body);
3690
+ const snapshot = luvio.storeLookup({
3691
+ recordId: key,
3692
+ node: select$j(),
3693
+ variables: {},
3694
+ }, snapshotRefresh);
3695
+ if (process.env.NODE_ENV !== 'production') {
3696
+ if (snapshot.state !== 'Fulfilled') {
3697
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
3698
+ }
3699
+ }
3700
+ deepFreeze(snapshot.data);
3701
+ return snapshot;
3702
+ }
3703
+ function ingestError$3(luvio, params, error, snapshotRefresh) {
3704
+ const key = keyBuilder$8(luvio, params);
3705
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
3706
+ const storeMetadataParams = {
3707
+ ttl: TTL$7,
3708
+ namespace: keyPrefix,
3709
+ version: VERSION$h,
3710
+ representationName: RepresentationType$7
3711
+ };
3712
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
3713
+ return errorSnapshot;
3714
+ }
3715
+ function createResourceRequest$7(config) {
3716
+ const headers = {};
3717
+ return {
3718
+ baseUri: '/services/data/v65.0',
3719
+ basePath: '/einstein/prompt-templates/' + config.urlParams.promptTemplateDevName + '',
3720
+ method: 'get',
3721
+ body: null,
3722
+ urlParams: config.urlParams,
3723
+ queryParams: config.queryParams,
3724
+ headers,
3725
+ priority: 'normal',
3726
+ };
3727
+ }
3728
+
3729
+ const adapterName$7 = 'getPromptTemplate';
3730
+ const getPromptTemplate_ConfigPropertyMetadata = [
3731
+ generateParamConfigMetadata('promptTemplateDevName', true, 0 /* UrlParameter */, 0 /* String */),
2279
3732
  generateParamConfigMetadata('versionId', false, 1 /* QueryParameter */, 0 /* String */),
2280
3733
  ];
2281
- const getPromptTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getPromptTemplate_ConfigPropertyMetadata);
2282
- const createResourceParams$2 = /*#__PURE__*/ createResourceParams$7(getPromptTemplate_ConfigPropertyMetadata);
3734
+ const getPromptTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$7, getPromptTemplate_ConfigPropertyMetadata);
3735
+ const createResourceParams$7 = /*#__PURE__*/ createResourceParams$h(getPromptTemplate_ConfigPropertyMetadata);
3736
+ function keyBuilder$7(luvio, config) {
3737
+ const resourceParams = createResourceParams$7(config);
3738
+ return keyBuilder$8(luvio, resourceParams);
3739
+ }
3740
+ function typeCheckConfig$7(untrustedConfig) {
3741
+ const config = {};
3742
+ typeCheckConfig$h(untrustedConfig, config, getPromptTemplate_ConfigPropertyMetadata);
3743
+ return config;
3744
+ }
3745
+ function validateAdapterConfig$7(untrustedConfig, configPropertyNames) {
3746
+ if (!untrustedIsObject(untrustedConfig)) {
3747
+ return null;
3748
+ }
3749
+ if (process.env.NODE_ENV !== 'production') {
3750
+ validateConfig(untrustedConfig, configPropertyNames);
3751
+ }
3752
+ const config = typeCheckConfig$7(untrustedConfig);
3753
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
3754
+ return null;
3755
+ }
3756
+ return config;
3757
+ }
3758
+ function adapterFragment$3(luvio, config) {
3759
+ createResourceParams$7(config);
3760
+ return select$j();
3761
+ }
3762
+ function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
3763
+ const snapshot = ingestSuccess$7(luvio, resourceParams, response, {
3764
+ config,
3765
+ resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
3766
+ });
3767
+ return luvio.storeBroadcast().then(() => snapshot);
3768
+ }
3769
+ function onFetchResponseError$3(luvio, config, resourceParams, response) {
3770
+ const snapshot = ingestError$3(luvio, resourceParams, response, {
3771
+ config,
3772
+ resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
3773
+ });
3774
+ return luvio.storeBroadcast().then(() => snapshot);
3775
+ }
3776
+ function buildNetworkSnapshot$7(luvio, config, options) {
3777
+ const resourceParams = createResourceParams$7(config);
3778
+ const request = createResourceRequest$7(resourceParams);
3779
+ return luvio.dispatchResourceRequest(request, options)
3780
+ .then((response) => {
3781
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
3782
+ const cache = new StoreKeyMap();
3783
+ getResponseCacheKeys$7(cache, luvio, resourceParams, response.body);
3784
+ return cache;
3785
+ });
3786
+ }, (response) => {
3787
+ return luvio.handleErrorResponse(() => onFetchResponseError$3(luvio, config, resourceParams, response));
3788
+ });
3789
+ }
3790
+ function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
3791
+ return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$7, undefined, false);
3792
+ }
3793
+ function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
3794
+ const { luvio, config } = context;
3795
+ const selector = {
3796
+ recordId: keyBuilder$7(luvio, config),
3797
+ node: adapterFragment$3(luvio, config),
3798
+ variables: {},
3799
+ };
3800
+ const cacheSnapshot = storeLookup(selector, {
3801
+ config,
3802
+ resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
3803
+ });
3804
+ return cacheSnapshot;
3805
+ }
3806
+ const getPromptTemplateAdapterFactory = (luvio) => function EinsteinLLM__getPromptTemplate(untrustedConfig, requestContext) {
3807
+ const config = validateAdapterConfig$7(untrustedConfig, getPromptTemplate_ConfigPropertyNames);
3808
+ // Invalid or incomplete config
3809
+ if (config === null) {
3810
+ return null;
3811
+ }
3812
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
3813
+ buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
3814
+ };
3815
+
3816
+ function select$i(luvio, params) {
3817
+ return select$v();
3818
+ }
3819
+ function keyBuilder$6(luvio, params) {
3820
+ return keyPrefix + '::EinsteinPromptRecordRepresentation:(' + 'includingContent:' + params.queryParams.includingContent + ',' + 'includingVersionDetail:' + params.queryParams.includingVersionDetail + ',' + 'promptTemplateDevName:' + params.urlParams.promptTemplateDevName + ')';
3821
+ }
3822
+ function getResponseCacheKeys$6(storeKeyMap, luvio, resourceParams, response) {
3823
+ getTypeCacheKeys$7(storeKeyMap, luvio, response, () => keyBuilder$6(luvio, resourceParams));
3824
+ }
3825
+ function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
3826
+ const { body } = response;
3827
+ const key = keyBuilder$6(luvio, resourceParams);
3828
+ luvio.storeIngest(key, ingest$7, body);
3829
+ const snapshot = luvio.storeLookup({
3830
+ recordId: key,
3831
+ node: select$i(),
3832
+ variables: {},
3833
+ }, snapshotRefresh);
3834
+ if (process.env.NODE_ENV !== 'production') {
3835
+ if (snapshot.state !== 'Fulfilled') {
3836
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
3837
+ }
3838
+ }
3839
+ deepFreeze(snapshot.data);
3840
+ return snapshot;
3841
+ }
3842
+ function ingestError$2(luvio, params, error, snapshotRefresh) {
3843
+ const key = keyBuilder$6(luvio, params);
3844
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
3845
+ const storeMetadataParams = {
3846
+ ttl: TTL$7,
3847
+ namespace: keyPrefix,
3848
+ version: VERSION$h,
3849
+ representationName: RepresentationType$7
3850
+ };
3851
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
3852
+ return errorSnapshot;
3853
+ }
3854
+ function createResourceRequest$6(config) {
3855
+ const headers = {};
3856
+ return {
3857
+ baseUri: '/services/data/v65.0',
3858
+ basePath: '/einstein/prompt-templates/' + config.urlParams.promptTemplateDevName + '/versions',
3859
+ method: 'get',
3860
+ body: null,
3861
+ urlParams: config.urlParams,
3862
+ queryParams: config.queryParams,
3863
+ headers,
3864
+ priority: 'normal',
3865
+ };
3866
+ }
3867
+
3868
+ const adapterName$6 = 'getPromptTemplateVersions';
3869
+ const getPromptTemplateVersions_ConfigPropertyMetadata = [
3870
+ generateParamConfigMetadata('promptTemplateDevName', true, 0 /* UrlParameter */, 0 /* String */),
3871
+ generateParamConfigMetadata('includingContent', false, 1 /* QueryParameter */, 1 /* Boolean */),
3872
+ generateParamConfigMetadata('includingVersionDetail', false, 1 /* QueryParameter */, 1 /* Boolean */),
3873
+ ];
3874
+ const getPromptTemplateVersions_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, getPromptTemplateVersions_ConfigPropertyMetadata);
3875
+ const createResourceParams$6 = /*#__PURE__*/ createResourceParams$h(getPromptTemplateVersions_ConfigPropertyMetadata);
3876
+ function keyBuilder$5(luvio, config) {
3877
+ const resourceParams = createResourceParams$6(config);
3878
+ return keyBuilder$6(luvio, resourceParams);
3879
+ }
3880
+ function typeCheckConfig$6(untrustedConfig) {
3881
+ const config = {};
3882
+ typeCheckConfig$h(untrustedConfig, config, getPromptTemplateVersions_ConfigPropertyMetadata);
3883
+ return config;
3884
+ }
3885
+ function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
3886
+ if (!untrustedIsObject(untrustedConfig)) {
3887
+ return null;
3888
+ }
3889
+ if (process.env.NODE_ENV !== 'production') {
3890
+ validateConfig(untrustedConfig, configPropertyNames);
3891
+ }
3892
+ const config = typeCheckConfig$6(untrustedConfig);
3893
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
3894
+ return null;
3895
+ }
3896
+ return config;
3897
+ }
3898
+ function adapterFragment$2(luvio, config) {
3899
+ createResourceParams$6(config);
3900
+ return select$i();
3901
+ }
3902
+ function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
3903
+ const snapshot = ingestSuccess$6(luvio, resourceParams, response, {
3904
+ config,
3905
+ resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
3906
+ });
3907
+ return luvio.storeBroadcast().then(() => snapshot);
3908
+ }
3909
+ function onFetchResponseError$2(luvio, config, resourceParams, response) {
3910
+ const snapshot = ingestError$2(luvio, resourceParams, response, {
3911
+ config,
3912
+ resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
3913
+ });
3914
+ return luvio.storeBroadcast().then(() => snapshot);
3915
+ }
3916
+ function buildNetworkSnapshot$6(luvio, config, options) {
3917
+ const resourceParams = createResourceParams$6(config);
3918
+ const request = createResourceRequest$6(resourceParams);
3919
+ return luvio.dispatchResourceRequest(request, options)
3920
+ .then((response) => {
3921
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
3922
+ const cache = new StoreKeyMap();
3923
+ getResponseCacheKeys$6(cache, luvio, resourceParams, response.body);
3924
+ return cache;
3925
+ });
3926
+ }, (response) => {
3927
+ return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
3928
+ });
3929
+ }
3930
+ function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
3931
+ return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$6, undefined, false);
3932
+ }
3933
+ function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
3934
+ const { luvio, config } = context;
3935
+ const selector = {
3936
+ recordId: keyBuilder$5(luvio, config),
3937
+ node: adapterFragment$2(luvio, config),
3938
+ variables: {},
3939
+ };
3940
+ const cacheSnapshot = storeLookup(selector, {
3941
+ config,
3942
+ resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
3943
+ });
3944
+ return cacheSnapshot;
3945
+ }
3946
+ const getPromptTemplateVersionsAdapterFactory = (luvio) => function EinsteinLLM__getPromptTemplateVersions(untrustedConfig, requestContext) {
3947
+ const config = validateAdapterConfig$6(untrustedConfig, getPromptTemplateVersions_ConfigPropertyNames);
3948
+ // Invalid or incomplete config
3949
+ if (config === null) {
3950
+ return null;
3951
+ }
3952
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
3953
+ buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
3954
+ };
3955
+
3956
+ function select$h(luvio, params) {
3957
+ return select$s();
3958
+ }
3959
+ function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
3960
+ getTypeCacheKeys$5(storeKeyMap, luvio, response);
3961
+ }
3962
+ function ingestSuccess$5(luvio, resourceParams, response) {
3963
+ const { body } = response;
3964
+ const key = keyBuilderFromType$1(luvio, body);
3965
+ luvio.storeIngest(key, ingest$5, body);
3966
+ const snapshot = luvio.storeLookup({
3967
+ recordId: key,
3968
+ node: select$h(),
3969
+ variables: {},
3970
+ });
3971
+ if (process.env.NODE_ENV !== 'production') {
3972
+ if (snapshot.state !== 'Fulfilled') {
3973
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
3974
+ }
3975
+ }
3976
+ deepFreeze(snapshot.data);
3977
+ return snapshot;
3978
+ }
3979
+ function createResourceRequest$5(config) {
3980
+ const headers = {};
3981
+ return {
3982
+ baseUri: '/services/data/v65.0',
3983
+ basePath: '/einstein/prompt-templates/' + config.urlParams.promptTemplateDevName + '/versions',
3984
+ method: 'post',
3985
+ body: config.body,
3986
+ urlParams: config.urlParams,
3987
+ queryParams: {},
3988
+ headers,
3989
+ priority: 'normal',
3990
+ };
3991
+ }
3992
+
3993
+ const adapterName$5 = 'createPromptTemplateVersion';
3994
+ const createPromptTemplateVersion_ConfigPropertyMetadata = [
3995
+ generateParamConfigMetadata('promptTemplateDevName', true, 0 /* UrlParameter */, 0 /* String */),
3996
+ generateParamConfigMetadata('apiName', true, 2 /* Body */, 0 /* String */),
3997
+ generateParamConfigMetadata('childRelationships', true, 2 /* Body */, 4 /* Unsupported */),
3998
+ generateParamConfigMetadata('fields', true, 2 /* Body */, 4 /* Unsupported */),
3999
+ generateParamConfigMetadata('id', false, 2 /* Body */, 0 /* String */),
4000
+ ];
4001
+ const createPromptTemplateVersion_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, createPromptTemplateVersion_ConfigPropertyMetadata);
4002
+ const createResourceParams$5 = /*#__PURE__*/ createResourceParams$h(createPromptTemplateVersion_ConfigPropertyMetadata);
4003
+ function typeCheckConfig$5(untrustedConfig) {
4004
+ const config = {};
4005
+ typeCheckConfig$h(untrustedConfig, config, createPromptTemplateVersion_ConfigPropertyMetadata);
4006
+ const untrustedConfig_childRelationships = untrustedConfig.childRelationships;
4007
+ if (untrustedIsObject(untrustedConfig_childRelationships)) {
4008
+ const untrustedConfig_childRelationships_object = {};
4009
+ const untrustedConfig_childRelationships_keys = Object.keys(untrustedConfig_childRelationships);
4010
+ for (let i = 0, arrayLength = untrustedConfig_childRelationships_keys.length; i < arrayLength; i++) {
4011
+ const key = untrustedConfig_childRelationships_keys[i];
4012
+ const untrustedConfig_childRelationships_prop = untrustedConfig_childRelationships[key];
4013
+ if (untrustedConfig_childRelationships_object !== undefined) {
4014
+ untrustedConfig_childRelationships_object[key] = untrustedConfig_childRelationships_prop;
4015
+ }
4016
+ }
4017
+ if (untrustedConfig_childRelationships_object !== undefined && Object.keys(untrustedConfig_childRelationships_object).length >= 0) {
4018
+ config.childRelationships = untrustedConfig_childRelationships_object;
4019
+ }
4020
+ }
4021
+ const untrustedConfig_fields = untrustedConfig.fields;
4022
+ if (untrustedIsObject(untrustedConfig_fields)) {
4023
+ const untrustedConfig_fields_object = {};
4024
+ const untrustedConfig_fields_keys = Object.keys(untrustedConfig_fields);
4025
+ for (let i = 0, arrayLength = untrustedConfig_fields_keys.length; i < arrayLength; i++) {
4026
+ const key = untrustedConfig_fields_keys[i];
4027
+ const untrustedConfig_fields_prop = untrustedConfig_fields[key];
4028
+ if (untrustedConfig_fields_object !== undefined) {
4029
+ untrustedConfig_fields_object[key] = untrustedConfig_fields_prop;
4030
+ }
4031
+ }
4032
+ if (untrustedConfig_fields_object !== undefined && Object.keys(untrustedConfig_fields_object).length >= 0) {
4033
+ config.fields = untrustedConfig_fields_object;
4034
+ }
4035
+ }
4036
+ return config;
4037
+ }
4038
+ function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
4039
+ if (!untrustedIsObject(untrustedConfig)) {
4040
+ return null;
4041
+ }
4042
+ if (process.env.NODE_ENV !== 'production') {
4043
+ validateConfig(untrustedConfig, configPropertyNames);
4044
+ }
4045
+ const config = typeCheckConfig$5(untrustedConfig);
4046
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
4047
+ return null;
4048
+ }
4049
+ return config;
4050
+ }
4051
+ function buildNetworkSnapshot$5(luvio, config, options) {
4052
+ const resourceParams = createResourceParams$5(config);
4053
+ const request = createResourceRequest$5(resourceParams);
4054
+ return luvio.dispatchResourceRequest(request, options)
4055
+ .then((response) => {
4056
+ return luvio.handleSuccessResponse(() => {
4057
+ const snapshot = ingestSuccess$5(luvio, resourceParams, response);
4058
+ return luvio.storeBroadcast().then(() => snapshot);
4059
+ }, () => {
4060
+ const cache = new StoreKeyMap();
4061
+ getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
4062
+ return cache;
4063
+ });
4064
+ }, (response) => {
4065
+ deepFreeze(response);
4066
+ throw response;
4067
+ });
4068
+ }
4069
+ const createPromptTemplateVersionAdapterFactory = (luvio) => {
4070
+ return function createPromptTemplateVersion(untrustedConfig) {
4071
+ const config = validateAdapterConfig$5(untrustedConfig, createPromptTemplateVersion_ConfigPropertyNames);
4072
+ // Invalid or incomplete config
4073
+ if (config === null) {
4074
+ throw new Error('Invalid config for "createPromptTemplateVersion"');
4075
+ }
4076
+ return buildNetworkSnapshot$5(luvio, config);
4077
+ };
4078
+ };
4079
+
4080
+ function select$g(luvio, params) {
4081
+ return select$v();
4082
+ }
4083
+ function keyBuilder$4(luvio, params) {
4084
+ return keyPrefix + '::EinsteinPromptRecordRepresentation:(' + 'includingContent:' + params.queryParams.includingContent + ',' + 'includingVersionDetail:' + params.queryParams.includingVersionDetail + ',' + 'promptTemplateDevName:' + params.urlParams.promptTemplateDevName + ',' + 'versionId:' + params.urlParams.versionId + ')';
4085
+ }
4086
+ function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
4087
+ getTypeCacheKeys$7(storeKeyMap, luvio, response, () => keyBuilder$4(luvio, resourceParams));
4088
+ }
4089
+ function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
4090
+ const { body } = response;
4091
+ const key = keyBuilder$4(luvio, resourceParams);
4092
+ luvio.storeIngest(key, ingest$7, body);
4093
+ const snapshot = luvio.storeLookup({
4094
+ recordId: key,
4095
+ node: select$g(),
4096
+ variables: {},
4097
+ }, snapshotRefresh);
4098
+ if (process.env.NODE_ENV !== 'production') {
4099
+ if (snapshot.state !== 'Fulfilled') {
4100
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
4101
+ }
4102
+ }
4103
+ deepFreeze(snapshot.data);
4104
+ return snapshot;
4105
+ }
4106
+ function ingestError$1(luvio, params, error, snapshotRefresh) {
4107
+ const key = keyBuilder$4(luvio, params);
4108
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
4109
+ const storeMetadataParams = {
4110
+ ttl: TTL$7,
4111
+ namespace: keyPrefix,
4112
+ version: VERSION$h,
4113
+ representationName: RepresentationType$7
4114
+ };
4115
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
4116
+ return errorSnapshot;
4117
+ }
4118
+ function createResourceRequest$4(config) {
4119
+ const headers = {};
4120
+ return {
4121
+ baseUri: '/services/data/v65.0',
4122
+ basePath: '/einstein/prompt-templates/' + config.urlParams.promptTemplateDevName + '/versions/' + config.urlParams.versionId + '',
4123
+ method: 'get',
4124
+ body: null,
4125
+ urlParams: config.urlParams,
4126
+ queryParams: config.queryParams,
4127
+ headers,
4128
+ priority: 'normal',
4129
+ };
4130
+ }
4131
+
4132
+ const adapterName$4 = 'getPromptTemplateVersion';
4133
+ const getPromptTemplateVersion_ConfigPropertyMetadata = [
4134
+ generateParamConfigMetadata('promptTemplateDevName', true, 0 /* UrlParameter */, 0 /* String */),
4135
+ generateParamConfigMetadata('versionId', true, 0 /* UrlParameter */, 0 /* String */),
4136
+ generateParamConfigMetadata('includingContent', false, 1 /* QueryParameter */, 1 /* Boolean */),
4137
+ generateParamConfigMetadata('includingVersionDetail', false, 1 /* QueryParameter */, 1 /* Boolean */),
4138
+ ];
4139
+ const getPromptTemplateVersion_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getPromptTemplateVersion_ConfigPropertyMetadata);
4140
+ const createResourceParams$4 = /*#__PURE__*/ createResourceParams$h(getPromptTemplateVersion_ConfigPropertyMetadata);
2283
4141
  function keyBuilder$3(luvio, config) {
2284
- const resourceParams = createResourceParams$2(config);
4142
+ const resourceParams = createResourceParams$4(config);
2285
4143
  return keyBuilder$4(luvio, resourceParams);
2286
4144
  }
4145
+ function typeCheckConfig$4(untrustedConfig) {
4146
+ const config = {};
4147
+ typeCheckConfig$h(untrustedConfig, config, getPromptTemplateVersion_ConfigPropertyMetadata);
4148
+ return config;
4149
+ }
4150
+ function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
4151
+ if (!untrustedIsObject(untrustedConfig)) {
4152
+ return null;
4153
+ }
4154
+ if (process.env.NODE_ENV !== 'production') {
4155
+ validateConfig(untrustedConfig, configPropertyNames);
4156
+ }
4157
+ const config = typeCheckConfig$4(untrustedConfig);
4158
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
4159
+ return null;
4160
+ }
4161
+ return config;
4162
+ }
4163
+ function adapterFragment$1(luvio, config) {
4164
+ createResourceParams$4(config);
4165
+ return select$g();
4166
+ }
4167
+ function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
4168
+ const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
4169
+ config,
4170
+ resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
4171
+ });
4172
+ return luvio.storeBroadcast().then(() => snapshot);
4173
+ }
4174
+ function onFetchResponseError$1(luvio, config, resourceParams, response) {
4175
+ const snapshot = ingestError$1(luvio, resourceParams, response, {
4176
+ config,
4177
+ resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
4178
+ });
4179
+ return luvio.storeBroadcast().then(() => snapshot);
4180
+ }
4181
+ function buildNetworkSnapshot$4(luvio, config, options) {
4182
+ const resourceParams = createResourceParams$4(config);
4183
+ const request = createResourceRequest$4(resourceParams);
4184
+ return luvio.dispatchResourceRequest(request, options)
4185
+ .then((response) => {
4186
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
4187
+ const cache = new StoreKeyMap();
4188
+ getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
4189
+ return cache;
4190
+ });
4191
+ }, (response) => {
4192
+ return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
4193
+ });
4194
+ }
4195
+ function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
4196
+ return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, undefined, false);
4197
+ }
4198
+ function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
4199
+ const { luvio, config } = context;
4200
+ const selector = {
4201
+ recordId: keyBuilder$3(luvio, config),
4202
+ node: adapterFragment$1(luvio, config),
4203
+ variables: {},
4204
+ };
4205
+ const cacheSnapshot = storeLookup(selector, {
4206
+ config,
4207
+ resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
4208
+ });
4209
+ return cacheSnapshot;
4210
+ }
4211
+ const getPromptTemplateVersionAdapterFactory = (luvio) => function EinsteinLLM__getPromptTemplateVersion(untrustedConfig, requestContext) {
4212
+ const config = validateAdapterConfig$4(untrustedConfig, getPromptTemplateVersion_ConfigPropertyNames);
4213
+ // Invalid or incomplete config
4214
+ if (config === null) {
4215
+ return null;
4216
+ }
4217
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
4218
+ buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
4219
+ };
4220
+
4221
+ function select$f(luvio, params) {
4222
+ return select$s();
4223
+ }
4224
+ function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
4225
+ getTypeCacheKeys$5(storeKeyMap, luvio, response);
4226
+ }
4227
+ function ingestSuccess$3(luvio, resourceParams, response) {
4228
+ const { body } = response;
4229
+ const key = keyBuilderFromType$1(luvio, body);
4230
+ luvio.storeIngest(key, ingest$5, body);
4231
+ const snapshot = luvio.storeLookup({
4232
+ recordId: key,
4233
+ node: select$f(),
4234
+ variables: {},
4235
+ });
4236
+ if (process.env.NODE_ENV !== 'production') {
4237
+ if (snapshot.state !== 'Fulfilled') {
4238
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
4239
+ }
4240
+ }
4241
+ deepFreeze(snapshot.data);
4242
+ return snapshot;
4243
+ }
4244
+ function createResourceRequest$3(config) {
4245
+ const headers = {};
4246
+ return {
4247
+ baseUri: '/services/data/v65.0',
4248
+ basePath: '/einstein/prompt-templates/' + config.urlParams.promptTemplateDevName + '/versions/' + config.urlParams.versionId + '',
4249
+ method: 'put',
4250
+ body: config.body,
4251
+ urlParams: config.urlParams,
4252
+ queryParams: {},
4253
+ headers,
4254
+ priority: 'normal',
4255
+ };
4256
+ }
4257
+
4258
+ const adapterName$3 = 'updatePromptTemplateVersion';
4259
+ const updatePromptTemplateVersion_ConfigPropertyMetadata = [
4260
+ generateParamConfigMetadata('promptTemplateDevName', true, 0 /* UrlParameter */, 0 /* String */),
4261
+ generateParamConfigMetadata('versionId', true, 0 /* UrlParameter */, 0 /* String */),
4262
+ generateParamConfigMetadata('apiName', true, 2 /* Body */, 0 /* String */),
4263
+ generateParamConfigMetadata('childRelationships', true, 2 /* Body */, 4 /* Unsupported */),
4264
+ generateParamConfigMetadata('fields', true, 2 /* Body */, 4 /* Unsupported */),
4265
+ generateParamConfigMetadata('id', false, 2 /* Body */, 0 /* String */),
4266
+ ];
4267
+ const updatePromptTemplateVersion_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, updatePromptTemplateVersion_ConfigPropertyMetadata);
4268
+ const createResourceParams$3 = /*#__PURE__*/ createResourceParams$h(updatePromptTemplateVersion_ConfigPropertyMetadata);
4269
+ function typeCheckConfig$3(untrustedConfig) {
4270
+ const config = {};
4271
+ typeCheckConfig$h(untrustedConfig, config, updatePromptTemplateVersion_ConfigPropertyMetadata);
4272
+ const untrustedConfig_childRelationships = untrustedConfig.childRelationships;
4273
+ if (untrustedIsObject(untrustedConfig_childRelationships)) {
4274
+ const untrustedConfig_childRelationships_object = {};
4275
+ const untrustedConfig_childRelationships_keys = Object.keys(untrustedConfig_childRelationships);
4276
+ for (let i = 0, arrayLength = untrustedConfig_childRelationships_keys.length; i < arrayLength; i++) {
4277
+ const key = untrustedConfig_childRelationships_keys[i];
4278
+ const untrustedConfig_childRelationships_prop = untrustedConfig_childRelationships[key];
4279
+ if (untrustedConfig_childRelationships_object !== undefined) {
4280
+ untrustedConfig_childRelationships_object[key] = untrustedConfig_childRelationships_prop;
4281
+ }
4282
+ }
4283
+ if (untrustedConfig_childRelationships_object !== undefined && Object.keys(untrustedConfig_childRelationships_object).length >= 0) {
4284
+ config.childRelationships = untrustedConfig_childRelationships_object;
4285
+ }
4286
+ }
4287
+ const untrustedConfig_fields = untrustedConfig.fields;
4288
+ if (untrustedIsObject(untrustedConfig_fields)) {
4289
+ const untrustedConfig_fields_object = {};
4290
+ const untrustedConfig_fields_keys = Object.keys(untrustedConfig_fields);
4291
+ for (let i = 0, arrayLength = untrustedConfig_fields_keys.length; i < arrayLength; i++) {
4292
+ const key = untrustedConfig_fields_keys[i];
4293
+ const untrustedConfig_fields_prop = untrustedConfig_fields[key];
4294
+ if (untrustedConfig_fields_object !== undefined) {
4295
+ untrustedConfig_fields_object[key] = untrustedConfig_fields_prop;
4296
+ }
4297
+ }
4298
+ if (untrustedConfig_fields_object !== undefined && Object.keys(untrustedConfig_fields_object).length >= 0) {
4299
+ config.fields = untrustedConfig_fields_object;
4300
+ }
4301
+ }
4302
+ return config;
4303
+ }
4304
+ function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
4305
+ if (!untrustedIsObject(untrustedConfig)) {
4306
+ return null;
4307
+ }
4308
+ if (process.env.NODE_ENV !== 'production') {
4309
+ validateConfig(untrustedConfig, configPropertyNames);
4310
+ }
4311
+ const config = typeCheckConfig$3(untrustedConfig);
4312
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
4313
+ return null;
4314
+ }
4315
+ return config;
4316
+ }
4317
+ function buildNetworkSnapshot$3(luvio, config, options) {
4318
+ const resourceParams = createResourceParams$3(config);
4319
+ const request = createResourceRequest$3(resourceParams);
4320
+ return luvio.dispatchResourceRequest(request, options)
4321
+ .then((response) => {
4322
+ return luvio.handleSuccessResponse(() => {
4323
+ const snapshot = ingestSuccess$3(luvio, resourceParams, response);
4324
+ return luvio.storeBroadcast().then(() => snapshot);
4325
+ }, () => {
4326
+ const cache = new StoreKeyMap();
4327
+ getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
4328
+ return cache;
4329
+ });
4330
+ }, (response) => {
4331
+ deepFreeze(response);
4332
+ throw response;
4333
+ });
4334
+ }
4335
+ const updatePromptTemplateVersionAdapterFactory = (luvio) => {
4336
+ return function updatePromptTemplateVersion(untrustedConfig) {
4337
+ const config = validateAdapterConfig$3(untrustedConfig, updatePromptTemplateVersion_ConfigPropertyNames);
4338
+ // Invalid or incomplete config
4339
+ if (config === null) {
4340
+ throw new Error('Invalid config for "updatePromptTemplateVersion"');
4341
+ }
4342
+ return buildNetworkSnapshot$3(luvio, config);
4343
+ };
4344
+ };
4345
+
4346
+ function select$e(luvio, params) {
4347
+ return select$s();
4348
+ }
4349
+ function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
4350
+ getTypeCacheKeys$5(storeKeyMap, luvio, response);
4351
+ }
4352
+ function ingestSuccess$2(luvio, resourceParams, response) {
4353
+ const { body } = response;
4354
+ const key = keyBuilderFromType$1(luvio, body);
4355
+ luvio.storeIngest(key, ingest$5, body);
4356
+ const snapshot = luvio.storeLookup({
4357
+ recordId: key,
4358
+ node: select$e(),
4359
+ variables: {},
4360
+ });
4361
+ if (process.env.NODE_ENV !== 'production') {
4362
+ if (snapshot.state !== 'Fulfilled') {
4363
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
4364
+ }
4365
+ }
4366
+ deepFreeze(snapshot.data);
4367
+ return snapshot;
4368
+ }
4369
+ function createResourceRequest$2(config) {
4370
+ const headers = {};
4371
+ return {
4372
+ baseUri: '/services/data/v65.0',
4373
+ basePath: '/einstein/prompt-templates/' + config.urlParams.promptTemplateDevName + '/versions/' + config.urlParams.versionId + '/status',
4374
+ method: 'put',
4375
+ body: null,
4376
+ urlParams: config.urlParams,
4377
+ queryParams: config.queryParams,
4378
+ headers,
4379
+ priority: 'normal',
4380
+ };
4381
+ }
4382
+
4383
+ const adapterName$2 = 'putEinsteinPromptTemplateVersionStatus';
4384
+ const putEinsteinPromptTemplateVersionStatus_ConfigPropertyMetadata = [
4385
+ generateParamConfigMetadata('promptTemplateDevName', true, 0 /* UrlParameter */, 0 /* String */),
4386
+ generateParamConfigMetadata('versionId', true, 0 /* UrlParameter */, 0 /* String */),
4387
+ generateParamConfigMetadata('action', false, 1 /* QueryParameter */, 0 /* String */),
4388
+ generateParamConfigMetadata('ignoreWarnings', false, 1 /* QueryParameter */, 1 /* Boolean */),
4389
+ ];
4390
+ const putEinsteinPromptTemplateVersionStatus_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, putEinsteinPromptTemplateVersionStatus_ConfigPropertyMetadata);
4391
+ const createResourceParams$2 = /*#__PURE__*/ createResourceParams$h(putEinsteinPromptTemplateVersionStatus_ConfigPropertyMetadata);
2287
4392
  function typeCheckConfig$2(untrustedConfig) {
2288
4393
  const config = {};
2289
- typeCheckConfig$7(untrustedConfig, config, getPromptTemplate_ConfigPropertyMetadata);
4394
+ typeCheckConfig$h(untrustedConfig, config, putEinsteinPromptTemplateVersionStatus_ConfigPropertyMetadata);
2290
4395
  return config;
2291
4396
  }
2292
4397
  function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
@@ -2302,65 +4407,36 @@ function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
2302
4407
  }
2303
4408
  return config;
2304
4409
  }
2305
- function adapterFragment$1(luvio, config) {
2306
- createResourceParams$2(config);
2307
- return select$c();
2308
- }
2309
- function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
2310
- const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
2311
- config,
2312
- resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
2313
- });
2314
- return luvio.storeBroadcast().then(() => snapshot);
2315
- }
2316
- function onFetchResponseError$1(luvio, config, resourceParams, response) {
2317
- const snapshot = ingestError$1(luvio, resourceParams, response, {
2318
- config,
2319
- resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
2320
- });
2321
- return luvio.storeBroadcast().then(() => snapshot);
2322
- }
2323
4410
  function buildNetworkSnapshot$2(luvio, config, options) {
2324
4411
  const resourceParams = createResourceParams$2(config);
2325
4412
  const request = createResourceRequest$2(resourceParams);
2326
4413
  return luvio.dispatchResourceRequest(request, options)
2327
4414
  .then((response) => {
2328
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
4415
+ return luvio.handleSuccessResponse(() => {
4416
+ const snapshot = ingestSuccess$2(luvio, resourceParams, response);
4417
+ return luvio.storeBroadcast().then(() => snapshot);
4418
+ }, () => {
2329
4419
  const cache = new StoreKeyMap();
2330
4420
  getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
2331
4421
  return cache;
2332
4422
  });
2333
4423
  }, (response) => {
2334
- return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
4424
+ deepFreeze(response);
4425
+ throw response;
2335
4426
  });
2336
4427
  }
2337
- function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
2338
- return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
2339
- }
2340
- function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
2341
- const { luvio, config } = context;
2342
- const selector = {
2343
- recordId: keyBuilder$3(luvio, config),
2344
- node: adapterFragment$1(luvio, config),
2345
- variables: {},
4428
+ const putEinsteinPromptTemplateVersionStatusAdapterFactory = (luvio) => {
4429
+ return function putEinsteinPromptTemplateVersionStatus(untrustedConfig) {
4430
+ const config = validateAdapterConfig$2(untrustedConfig, putEinsteinPromptTemplateVersionStatus_ConfigPropertyNames);
4431
+ // Invalid or incomplete config
4432
+ if (config === null) {
4433
+ throw new Error('Invalid config for "putEinsteinPromptTemplateVersionStatus"');
4434
+ }
4435
+ return buildNetworkSnapshot$2(luvio, config);
2346
4436
  };
2347
- const cacheSnapshot = storeLookup(selector, {
2348
- config,
2349
- resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
2350
- });
2351
- return cacheSnapshot;
2352
- }
2353
- const getPromptTemplateAdapterFactory = (luvio) => function EinsteinLLM__getPromptTemplate(untrustedConfig, requestContext) {
2354
- const config = validateAdapterConfig$2(untrustedConfig, getPromptTemplate_ConfigPropertyNames);
2355
- // Invalid or incomplete config
2356
- if (config === null) {
2357
- return null;
2358
- }
2359
- return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
2360
- buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
2361
4437
  };
2362
4438
 
2363
- function validate$b(obj, path = 'WrappedValueMap') {
4439
+ function validate$d(obj, path = 'WrappedValueMap') {
2364
4440
  const v_error = (() => {
2365
4441
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
2366
4442
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -2383,7 +4459,7 @@ function validate$b(obj, path = 'WrappedValueMap') {
2383
4459
  return v_error === undefined ? null : v_error;
2384
4460
  }
2385
4461
 
2386
- function validate$a(obj, path = 'EinsteinPromptTemplateGenerationsInputRepresentation') {
4462
+ function validate$c(obj, path = 'EinsteinPromptTemplateGenerationsInputRepresentation') {
2387
4463
  const v_error = (() => {
2388
4464
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
2389
4465
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -2391,7 +4467,7 @@ function validate$a(obj, path = 'EinsteinPromptTemplateGenerationsInputRepresent
2391
4467
  if (obj.additionalConfig !== undefined) {
2392
4468
  const obj_additionalConfig = obj.additionalConfig;
2393
4469
  const path_additionalConfig = path + '.additionalConfig';
2394
- const referencepath_additionalConfigValidationError = validate$l(obj_additionalConfig, path_additionalConfig);
4470
+ const referencepath_additionalConfigValidationError = validate$u(obj_additionalConfig, path_additionalConfig);
2395
4471
  if (referencepath_additionalConfigValidationError !== null) {
2396
4472
  let message = 'Object doesn\'t match EinsteinLlmAdditionalConfigInputRepresentation (at "' + path_additionalConfig + '")\n';
2397
4473
  message += referencepath_additionalConfigValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -2400,7 +4476,7 @@ function validate$a(obj, path = 'EinsteinPromptTemplateGenerationsInputRepresent
2400
4476
  }
2401
4477
  const obj_inputParams = obj.inputParams;
2402
4478
  const path_inputParams = path + '.inputParams';
2403
- const referencepath_inputParamsValidationError = validate$b(obj_inputParams, path_inputParams);
4479
+ const referencepath_inputParamsValidationError = validate$d(obj_inputParams, path_inputParams);
2404
4480
  if (referencepath_inputParamsValidationError !== null) {
2405
4481
  let message = 'Object doesn\'t match WrappedValueMap (at "' + path_inputParams + '")\n';
2406
4482
  message += referencepath_inputParamsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -2436,6 +4512,244 @@ function validate$a(obj, path = 'EinsteinPromptTemplateGenerationsInputRepresent
2436
4512
  return v_error === undefined ? null : v_error;
2437
4513
  }
2438
4514
 
4515
+ const VERSION$b = "63584d83290e21bdff26b1bef3db119c";
4516
+ function validate$b(obj, path = 'EinsteinLlmGenerationGenAiCitedReferenceRepresentation') {
4517
+ const v_error = (() => {
4518
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
4519
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
4520
+ }
4521
+ if (obj.citationLocations !== undefined) {
4522
+ const obj_citationLocations = obj.citationLocations;
4523
+ const path_citationLocations = path + '.citationLocations';
4524
+ if (!ArrayIsArray(obj_citationLocations)) {
4525
+ return new TypeError('Expected "array" but received "' + typeof obj_citationLocations + '" (at "' + path_citationLocations + '")');
4526
+ }
4527
+ for (let i = 0; i < obj_citationLocations.length; i++) {
4528
+ const obj_citationLocations_item = obj_citationLocations[i];
4529
+ const path_citationLocations_item = path_citationLocations + '[' + i + ']';
4530
+ if (typeof obj_citationLocations_item !== 'number' || (typeof obj_citationLocations_item === 'number' && Math.floor(obj_citationLocations_item) !== obj_citationLocations_item)) {
4531
+ return new TypeError('Expected "integer" but received "' + typeof obj_citationLocations_item + '" (at "' + path_citationLocations_item + '")');
4532
+ }
4533
+ }
4534
+ }
4535
+ if (obj.claims !== undefined) {
4536
+ const obj_claims = obj.claims;
4537
+ const path_claims = path + '.claims';
4538
+ if (!ArrayIsArray(obj_claims)) {
4539
+ return new TypeError('Expected "array" but received "' + typeof obj_claims + '" (at "' + path_claims + '")');
4540
+ }
4541
+ for (let i = 0; i < obj_claims.length; i++) {
4542
+ const obj_claims_item = obj_claims[i];
4543
+ const path_claims_item = path_claims + '[' + i + ']';
4544
+ if (typeof obj_claims_item !== 'string') {
4545
+ return new TypeError('Expected "string" but received "' + typeof obj_claims_item + '" (at "' + path_claims_item + '")');
4546
+ }
4547
+ }
4548
+ }
4549
+ if (obj.link !== undefined) {
4550
+ const obj_link = obj.link;
4551
+ const path_link = path + '.link';
4552
+ if (typeof obj_link !== 'string') {
4553
+ return new TypeError('Expected "string" but received "' + typeof obj_link + '" (at "' + path_link + '")');
4554
+ }
4555
+ }
4556
+ if (obj.sourceObjectApiName !== undefined) {
4557
+ const obj_sourceObjectApiName = obj.sourceObjectApiName;
4558
+ const path_sourceObjectApiName = path + '.sourceObjectApiName';
4559
+ if (typeof obj_sourceObjectApiName !== 'string') {
4560
+ return new TypeError('Expected "string" but received "' + typeof obj_sourceObjectApiName + '" (at "' + path_sourceObjectApiName + '")');
4561
+ }
4562
+ }
4563
+ if (obj.sourceObjectRecordId !== undefined) {
4564
+ const obj_sourceObjectRecordId = obj.sourceObjectRecordId;
4565
+ const path_sourceObjectRecordId = path + '.sourceObjectRecordId';
4566
+ if (typeof obj_sourceObjectRecordId !== 'string') {
4567
+ return new TypeError('Expected "string" but received "' + typeof obj_sourceObjectRecordId + '" (at "' + path_sourceObjectRecordId + '")');
4568
+ }
4569
+ }
4570
+ })();
4571
+ return v_error === undefined ? null : v_error;
4572
+ }
4573
+ const select$d = function EinsteinLlmGenerationGenAiCitedReferenceRepresentationSelect() {
4574
+ return {
4575
+ kind: 'Fragment',
4576
+ version: VERSION$b,
4577
+ private: [],
4578
+ selections: [
4579
+ {
4580
+ name: 'citationLocations',
4581
+ kind: 'Scalar',
4582
+ plural: true,
4583
+ required: false
4584
+ },
4585
+ {
4586
+ name: 'claims',
4587
+ kind: 'Scalar',
4588
+ plural: true,
4589
+ required: false
4590
+ },
4591
+ {
4592
+ name: 'link',
4593
+ kind: 'Scalar',
4594
+ required: false
4595
+ },
4596
+ {
4597
+ name: 'sourceObjectApiName',
4598
+ kind: 'Scalar',
4599
+ required: false
4600
+ },
4601
+ {
4602
+ name: 'sourceObjectRecordId',
4603
+ kind: 'Scalar',
4604
+ required: false
4605
+ }
4606
+ ]
4607
+ };
4608
+ };
4609
+ function equals$b(existing, incoming) {
4610
+ const existing_link = existing.link;
4611
+ const incoming_link = incoming.link;
4612
+ // if at least one of these optionals is defined
4613
+ if (existing_link !== undefined || incoming_link !== undefined) {
4614
+ // if one of these is not defined we know the other is defined and therefore
4615
+ // not equal
4616
+ if (existing_link === undefined || incoming_link === undefined) {
4617
+ return false;
4618
+ }
4619
+ if (!(existing_link === incoming_link)) {
4620
+ return false;
4621
+ }
4622
+ }
4623
+ const existing_sourceObjectApiName = existing.sourceObjectApiName;
4624
+ const incoming_sourceObjectApiName = incoming.sourceObjectApiName;
4625
+ // if at least one of these optionals is defined
4626
+ if (existing_sourceObjectApiName !== undefined || incoming_sourceObjectApiName !== undefined) {
4627
+ // if one of these is not defined we know the other is defined and therefore
4628
+ // not equal
4629
+ if (existing_sourceObjectApiName === undefined || incoming_sourceObjectApiName === undefined) {
4630
+ return false;
4631
+ }
4632
+ if (!(existing_sourceObjectApiName === incoming_sourceObjectApiName)) {
4633
+ return false;
4634
+ }
4635
+ }
4636
+ const existing_sourceObjectRecordId = existing.sourceObjectRecordId;
4637
+ const incoming_sourceObjectRecordId = incoming.sourceObjectRecordId;
4638
+ // if at least one of these optionals is defined
4639
+ if (existing_sourceObjectRecordId !== undefined || incoming_sourceObjectRecordId !== undefined) {
4640
+ // if one of these is not defined we know the other is defined and therefore
4641
+ // not equal
4642
+ if (existing_sourceObjectRecordId === undefined || incoming_sourceObjectRecordId === undefined) {
4643
+ return false;
4644
+ }
4645
+ if (!(existing_sourceObjectRecordId === incoming_sourceObjectRecordId)) {
4646
+ return false;
4647
+ }
4648
+ }
4649
+ const existing_citationLocations = existing.citationLocations;
4650
+ const incoming_citationLocations = incoming.citationLocations;
4651
+ // if at least one of these optionals is defined
4652
+ if (existing_citationLocations !== undefined || incoming_citationLocations !== undefined) {
4653
+ // if one of these is not defined we know the other is defined and therefore
4654
+ // not equal
4655
+ if (existing_citationLocations === undefined || incoming_citationLocations === undefined) {
4656
+ return false;
4657
+ }
4658
+ const equals_citationLocations_items = equalsArray(existing_citationLocations, incoming_citationLocations, (existing_citationLocations_item, incoming_citationLocations_item) => {
4659
+ if (!(existing_citationLocations_item === incoming_citationLocations_item)) {
4660
+ return false;
4661
+ }
4662
+ });
4663
+ if (equals_citationLocations_items === false) {
4664
+ return false;
4665
+ }
4666
+ }
4667
+ const existing_claims = existing.claims;
4668
+ const incoming_claims = incoming.claims;
4669
+ // if at least one of these optionals is defined
4670
+ if (existing_claims !== undefined || incoming_claims !== undefined) {
4671
+ // if one of these is not defined we know the other is defined and therefore
4672
+ // not equal
4673
+ if (existing_claims === undefined || incoming_claims === undefined) {
4674
+ return false;
4675
+ }
4676
+ const equals_claims_items = equalsArray(existing_claims, incoming_claims, (existing_claims_item, incoming_claims_item) => {
4677
+ if (!(existing_claims_item === incoming_claims_item)) {
4678
+ return false;
4679
+ }
4680
+ });
4681
+ if (equals_claims_items === false) {
4682
+ return false;
4683
+ }
4684
+ }
4685
+ return true;
4686
+ }
4687
+
4688
+ const VERSION$a = "bcc0ea08323732f4187dd2b9f70fea6c";
4689
+ function validate$a(obj, path = 'EinsteinLlmGenerationCitationRepresentation') {
4690
+ const v_error = (() => {
4691
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
4692
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
4693
+ }
4694
+ if (obj.citedReferences !== undefined) {
4695
+ const obj_citedReferences = obj.citedReferences;
4696
+ const path_citedReferences = path + '.citedReferences';
4697
+ if (!ArrayIsArray(obj_citedReferences)) {
4698
+ return new TypeError('Expected "array" but received "' + typeof obj_citedReferences + '" (at "' + path_citedReferences + '")');
4699
+ }
4700
+ for (let i = 0; i < obj_citedReferences.length; i++) {
4701
+ const obj_citedReferences_item = obj_citedReferences[i];
4702
+ const path_citedReferences_item = path_citedReferences + '[' + i + ']';
4703
+ const referencepath_citedReferences_itemValidationError = validate$b(obj_citedReferences_item, path_citedReferences_item);
4704
+ if (referencepath_citedReferences_itemValidationError !== null) {
4705
+ let message = 'Object doesn\'t match EinsteinLlmGenerationGenAiCitedReferenceRepresentation (at "' + path_citedReferences_item + '")\n';
4706
+ message += referencepath_citedReferences_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
4707
+ return new TypeError(message);
4708
+ }
4709
+ }
4710
+ }
4711
+ })();
4712
+ return v_error === undefined ? null : v_error;
4713
+ }
4714
+ const select$c = function EinsteinLlmGenerationCitationRepresentationSelect() {
4715
+ const { selections: EinsteinLlmGenerationGenAiCitedReferenceRepresentation__selections, opaque: EinsteinLlmGenerationGenAiCitedReferenceRepresentation__opaque, } = select$d();
4716
+ return {
4717
+ kind: 'Fragment',
4718
+ version: VERSION$a,
4719
+ private: [],
4720
+ selections: [
4721
+ {
4722
+ name: 'citedReferences',
4723
+ kind: 'Object',
4724
+ plural: true,
4725
+ selections: EinsteinLlmGenerationGenAiCitedReferenceRepresentation__selections,
4726
+ required: false
4727
+ }
4728
+ ]
4729
+ };
4730
+ };
4731
+ function equals$a(existing, incoming) {
4732
+ const existing_citedReferences = existing.citedReferences;
4733
+ const incoming_citedReferences = incoming.citedReferences;
4734
+ // if at least one of these optionals is defined
4735
+ if (existing_citedReferences !== undefined || incoming_citedReferences !== undefined) {
4736
+ // if one of these is not defined we know the other is defined and therefore
4737
+ // not equal
4738
+ if (existing_citedReferences === undefined || incoming_citedReferences === undefined) {
4739
+ return false;
4740
+ }
4741
+ const equals_citedReferences_items = equalsArray(existing_citedReferences, incoming_citedReferences, (existing_citedReferences_item, incoming_citedReferences_item) => {
4742
+ if (!(equals$b(existing_citedReferences_item, incoming_citedReferences_item))) {
4743
+ return false;
4744
+ }
4745
+ });
4746
+ if (equals_citedReferences_items === false) {
4747
+ return false;
4748
+ }
4749
+ }
4750
+ return true;
4751
+ }
4752
+
2439
4753
  const VERSION$9 = "f62ac44b024b123f079b57f349e05230";
2440
4754
  function validate$9(obj, path = 'EinsteinPromptTemplateAttachmentExclusionInfoRepresentation') {
2441
4755
  const v_error = (() => {
@@ -2938,12 +5252,22 @@ function equals$4(existing, incoming) {
2938
5252
  }
2939
5253
 
2940
5254
  const TTL$1 = 100;
2941
- const VERSION$3 = "492c5045545dfbf96d7f660532a30499";
5255
+ const VERSION$3 = "4f8799314eebcd45e3fca72dcdf7722d";
2942
5256
  function validate$3(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation') {
2943
5257
  const v_error = (() => {
2944
5258
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
2945
5259
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
2946
5260
  }
5261
+ if (obj.citations !== undefined) {
5262
+ const obj_citations = obj.citations;
5263
+ const path_citations = path + '.citations';
5264
+ const referencepath_citationsValidationError = validate$a(obj_citations, path_citations);
5265
+ if (referencepath_citationsValidationError !== null) {
5266
+ let message = 'Object doesn\'t match EinsteinLlmGenerationCitationRepresentation (at "' + path_citations + '")\n';
5267
+ message += referencepath_citationsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
5268
+ return new TypeError(message);
5269
+ }
5270
+ }
2947
5271
  if (obj.fileData !== undefined) {
2948
5272
  const obj_fileData = obj.fileData;
2949
5273
  const path_fileData = path + '.fileData';
@@ -2986,7 +5310,7 @@ function validate$3(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation
2986
5310
  for (let i = 0; i < obj_generations.length; i++) {
2987
5311
  const obj_generations_item = obj_generations[i];
2988
5312
  const path_generations_item = path_generations + '[' + i + ']';
2989
- const referencepath_generations_itemValidationError = validate$h(obj_generations_item, path_generations_item);
5313
+ const referencepath_generations_itemValidationError = validate$q(obj_generations_item, path_generations_item);
2990
5314
  if (referencepath_generations_itemValidationError !== null) {
2991
5315
  let message = 'Object doesn\'t match EinsteinLlmGenerationItemRepresentation (at "' + path_generations_item + '")\n';
2992
5316
  message += referencepath_generations_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -3013,7 +5337,7 @@ function validate$3(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation
3013
5337
  const path_parameters = path + '.parameters';
3014
5338
  let obj_parameters_union0 = null;
3015
5339
  const obj_parameters_union0_error = (() => {
3016
- const referencepath_parametersValidationError = validate$g(obj_parameters, path_parameters);
5340
+ const referencepath_parametersValidationError = validate$p(obj_parameters, path_parameters);
3017
5341
  if (referencepath_parametersValidationError !== null) {
3018
5342
  let message = 'Object doesn\'t match WrappedMap (at "' + path_parameters + '")\n';
3019
5343
  message += referencepath_parametersValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -3069,6 +5393,32 @@ function validate$3(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation
3069
5393
  if (typeof obj_promptTemplateDevName !== 'string') {
3070
5394
  return new TypeError('Expected "string" but received "' + typeof obj_promptTemplateDevName + '" (at "' + path_promptTemplateDevName + '")');
3071
5395
  }
5396
+ const obj_rawPrompt = obj.rawPrompt;
5397
+ const path_rawPrompt = path + '.rawPrompt';
5398
+ let obj_rawPrompt_union0 = null;
5399
+ const obj_rawPrompt_union0_error = (() => {
5400
+ if (typeof obj_rawPrompt !== 'string') {
5401
+ return new TypeError('Expected "string" but received "' + typeof obj_rawPrompt + '" (at "' + path_rawPrompt + '")');
5402
+ }
5403
+ })();
5404
+ if (obj_rawPrompt_union0_error != null) {
5405
+ obj_rawPrompt_union0 = obj_rawPrompt_union0_error.message;
5406
+ }
5407
+ let obj_rawPrompt_union1 = null;
5408
+ const obj_rawPrompt_union1_error = (() => {
5409
+ if (obj_rawPrompt !== null) {
5410
+ return new TypeError('Expected "null" but received "' + typeof obj_rawPrompt + '" (at "' + path_rawPrompt + '")');
5411
+ }
5412
+ })();
5413
+ if (obj_rawPrompt_union1_error != null) {
5414
+ obj_rawPrompt_union1 = obj_rawPrompt_union1_error.message;
5415
+ }
5416
+ if (obj_rawPrompt_union0 && obj_rawPrompt_union1) {
5417
+ let message = 'Object doesn\'t match union (at "' + path_rawPrompt + '")';
5418
+ message += '\n' + obj_rawPrompt_union0.split('\n').map((line) => '\t' + line).join('\n');
5419
+ message += '\n' + obj_rawPrompt_union1.split('\n').map((line) => '\t' + line).join('\n');
5420
+ return new TypeError(message);
5421
+ }
3072
5422
  const obj_requestId = obj.requestId;
3073
5423
  const path_requestId = path + '.requestId';
3074
5424
  if (typeof obj_requestId !== 'string') {
@@ -3142,10 +5492,11 @@ function normalize$1(input, existing, path, luvio, store, timestamp) {
3142
5492
  return input;
3143
5493
  }
3144
5494
  const select$5 = function EinsteinPromptTemplateGenerationsRepresentationSelect() {
5495
+ const { selections: EinsteinLlmGenerationCitationRepresentation__selections, opaque: EinsteinLlmGenerationCitationRepresentation__opaque, } = select$c();
3145
5496
  const { selections: EinsteinPromptTemplateAttachmentRepresentation__selections, opaque: EinsteinPromptTemplateAttachmentRepresentation__opaque, } = select$a();
3146
5497
  const { selections: EinsteinPromptTemplateGenerationsErrorRepresentation__selections, opaque: EinsteinPromptTemplateGenerationsErrorRepresentation__opaque, } = select$9();
3147
- const { selections: EinsteinLlmGenerationItemRepresentation__selections, opaque: EinsteinLlmGenerationItemRepresentation__opaque, } = select$j();
3148
- const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$i();
5498
+ const { selections: EinsteinLlmGenerationItemRepresentation__selections, opaque: EinsteinLlmGenerationItemRepresentation__opaque, } = select$z();
5499
+ const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$y();
3149
5500
  const { selections: EinsteinPromptTemplateMaskContentRepresentation__selections, opaque: EinsteinPromptTemplateMaskContentRepresentation__opaque, } = select$7();
3150
5501
  const { selections: EinsteinPromptTemplateMaskDataRepresentation__selections, opaque: EinsteinPromptTemplateMaskDataRepresentation__opaque, } = select$6();
3151
5502
  return {
@@ -3153,6 +5504,12 @@ const select$5 = function EinsteinPromptTemplateGenerationsRepresentationSelect(
3153
5504
  version: VERSION$3,
3154
5505
  private: [],
3155
5506
  selections: [
5507
+ {
5508
+ name: 'citations',
5509
+ kind: 'Object',
5510
+ selections: EinsteinLlmGenerationCitationRepresentation__selections,
5511
+ required: false
5512
+ },
3156
5513
  {
3157
5514
  name: 'fileData',
3158
5515
  kind: 'Object',
@@ -3192,6 +5549,10 @@ const select$5 = function EinsteinPromptTemplateGenerationsRepresentationSelect(
3192
5549
  name: 'promptTemplateDevName',
3193
5550
  kind: 'Scalar'
3194
5551
  },
5552
+ {
5553
+ name: 'rawPrompt',
5554
+ kind: 'Scalar'
5555
+ },
3195
5556
  {
3196
5557
  name: 'requestId',
3197
5558
  kind: 'Scalar'
@@ -3231,6 +5592,19 @@ function equals$3(existing, incoming) {
3231
5592
  if (!(existing_requestId === incoming_requestId)) {
3232
5593
  return false;
3233
5594
  }
5595
+ const existing_citations = existing.citations;
5596
+ const incoming_citations = incoming.citations;
5597
+ // if at least one of these optionals is defined
5598
+ if (existing_citations !== undefined || incoming_citations !== undefined) {
5599
+ // if one of these is not defined we know the other is defined and therefore
5600
+ // not equal
5601
+ if (existing_citations === undefined || incoming_citations === undefined) {
5602
+ return false;
5603
+ }
5604
+ if (!(equals$a(existing_citations, incoming_citations))) {
5605
+ return false;
5606
+ }
5607
+ }
3234
5608
  const existing_fileData = existing.fileData;
3235
5609
  const incoming_fileData = incoming.fileData;
3236
5610
  // if at least one of these optionals is defined
@@ -3270,7 +5644,7 @@ function equals$3(existing, incoming) {
3270
5644
  const existing_generations = existing.generations;
3271
5645
  const incoming_generations = incoming.generations;
3272
5646
  const equals_generations_items = equalsArray(existing_generations, incoming_generations, (existing_generations_item, incoming_generations_item) => {
3273
- if (!(equals$e(existing_generations_item, incoming_generations_item))) {
5647
+ if (!(equals$k(existing_generations_item, incoming_generations_item))) {
3274
5648
  return false;
3275
5649
  }
3276
5650
  });
@@ -3300,7 +5674,7 @@ function equals$3(existing, incoming) {
3300
5674
  if (!(existing_parameters === incoming_parameters
3301
5675
  || (existing_parameters != null &&
3302
5676
  incoming_parameters != null &&
3303
- equals$d(existing_parameters, incoming_parameters)))) {
5677
+ equals$j(existing_parameters, incoming_parameters)))) {
3304
5678
  return false;
3305
5679
  }
3306
5680
  const existing_prompt = existing.prompt;
@@ -3308,6 +5682,11 @@ function equals$3(existing, incoming) {
3308
5682
  if (!(existing_prompt === incoming_prompt)) {
3309
5683
  return false;
3310
5684
  }
5685
+ const existing_rawPrompt = existing.rawPrompt;
5686
+ const incoming_rawPrompt = incoming.rawPrompt;
5687
+ if (!(existing_rawPrompt === incoming_rawPrompt)) {
5688
+ return false;
5689
+ }
3311
5690
  const existing_requestMessages = existing.requestMessages;
3312
5691
  const incoming_requestMessages = incoming.requestMessages;
3313
5692
  // if at least one of these optionals is defined
@@ -3430,12 +5809,12 @@ const createGenerationsForPromptTemplate_ConfigPropertyMetadata = [
3430
5809
  generateParamConfigMetadata('promptTemplateGenerationsInput', true, 2 /* Body */, 4 /* Unsupported */),
3431
5810
  ];
3432
5811
  const createGenerationsForPromptTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, createGenerationsForPromptTemplate_ConfigPropertyMetadata);
3433
- const createResourceParams$1 = /*#__PURE__*/ createResourceParams$7(createGenerationsForPromptTemplate_ConfigPropertyMetadata);
5812
+ const createResourceParams$1 = /*#__PURE__*/ createResourceParams$h(createGenerationsForPromptTemplate_ConfigPropertyMetadata);
3434
5813
  function typeCheckConfig$1(untrustedConfig) {
3435
5814
  const config = {};
3436
- typeCheckConfig$7(untrustedConfig, config, createGenerationsForPromptTemplate_ConfigPropertyMetadata);
5815
+ typeCheckConfig$h(untrustedConfig, config, createGenerationsForPromptTemplate_ConfigPropertyMetadata);
3437
5816
  const untrustedConfig_promptTemplateGenerationsInput = untrustedConfig.promptTemplateGenerationsInput;
3438
- const referenceEinsteinPromptTemplateGenerationsInputRepresentationValidationError = validate$a(untrustedConfig_promptTemplateGenerationsInput);
5817
+ const referenceEinsteinPromptTemplateGenerationsInputRepresentationValidationError = validate$c(untrustedConfig_promptTemplateGenerationsInput);
3439
5818
  if (referenceEinsteinPromptTemplateGenerationsInputRepresentationValidationError === null) {
3440
5819
  config.promptTemplateGenerationsInput = untrustedConfig_promptTemplateGenerationsInput;
3441
5820
  }
@@ -3796,14 +6175,14 @@ const getOutputLanguages_ConfigPropertyMetadata = [
3796
6175
  generateParamConfigMetadata('versionId', false, 1 /* QueryParameter */, 0 /* String */),
3797
6176
  ];
3798
6177
  const getOutputLanguages_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getOutputLanguages_ConfigPropertyMetadata);
3799
- const createResourceParams = /*#__PURE__*/ createResourceParams$7(getOutputLanguages_ConfigPropertyMetadata);
6178
+ const createResourceParams = /*#__PURE__*/ createResourceParams$h(getOutputLanguages_ConfigPropertyMetadata);
3800
6179
  function keyBuilder(luvio, config) {
3801
6180
  const resourceParams = createResourceParams(config);
3802
6181
  return keyBuilder$1(luvio, resourceParams);
3803
6182
  }
3804
6183
  function typeCheckConfig(untrustedConfig) {
3805
6184
  const config = {};
3806
- typeCheckConfig$7(untrustedConfig, config, getOutputLanguages_ConfigPropertyMetadata);
6185
+ typeCheckConfig$h(untrustedConfig, config, getOutputLanguages_ConfigPropertyMetadata);
3807
6186
  return config;
3808
6187
  }
3809
6188
  function validateAdapterConfig(untrustedConfig, configPropertyNames) {
@@ -3852,7 +6231,7 @@ function buildNetworkSnapshot(luvio, config, options) {
3852
6231
  });
3853
6232
  }
3854
6233
  function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
3855
- return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
6234
+ return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
3856
6235
  }
3857
6236
  function buildCachedSnapshotCachePolicy(context, storeLookup) {
3858
6237
  const { luvio, config } = context;
@@ -3877,4 +6256,4 @@ const getOutputLanguagesAdapterFactory = (luvio) => function EinsteinLLM__getOut
3877
6256
  buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
3878
6257
  };
3879
6258
 
3880
- export { createEmbeddingsAdapterFactory, createFeedbackAdapterFactory, createGenerationsAdapterFactory, createGenerationsForPromptTemplateAdapterFactory, getOutputLanguagesAdapterFactory, getPromptTemplateAdapterFactory, getPromptTemplatesAdapterFactory };
6259
+ export { createEmbeddingsAdapterFactory, createFeedbackAdapterFactory, createGenerationsAdapterFactory, createGenerationsForPromptTemplateAdapterFactory, createPromptTemplateAdapterFactory, createPromptTemplateVersionAdapterFactory, getDataProviderInstanceConfigAdapterFactory, getDataProviderTypeConfigsAdapterFactory, getDataProvidersAdapterFactory, getInputMappedDataProvidersAdapterFactory, getOutputLanguagesAdapterFactory, getPromptTemplateAdapterFactory, getPromptTemplateVersionAdapterFactory, getPromptTemplateVersionsAdapterFactory, getPromptTemplatesAdapterFactory, putEinsteinPromptTemplateVersionStatusAdapterFactory, updatePromptTemplateVersionAdapterFactory };