@salesforce/lds-adapters-industries-einstein-aiaccelerator 1.308.0-dev3 → 1.308.0-dev5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/sfdc/index.js CHANGED
@@ -13,7 +13,7 @@
13
13
  */
14
14
  /* proxy-compat-disable */
15
15
  import { withDefaultLuvio } from 'force/ldsEngine';
16
- import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$2 } from 'force/luvioEngine';
16
+ import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$3, typeCheckConfig as typeCheckConfig$3 } from 'force/luvioEngine';
17
17
 
18
18
  const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
19
19
  const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
@@ -82,7 +82,7 @@ function createLink(ref) {
82
82
  };
83
83
  }
84
84
 
85
- function validate$q(obj, path = 'RecommendationInputRepresentation') {
85
+ function validate$z(obj, path = 'RecommendationInputRepresentation') {
86
86
  const v_error = (() => {
87
87
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
88
88
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -308,7 +308,7 @@ function validate$q(obj, path = 'RecommendationInputRepresentation') {
308
308
  return v_error === undefined ? null : v_error;
309
309
  }
310
310
 
311
- function validate$p(obj, path = 'Error') {
311
+ function validate$y(obj, path = 'Error') {
312
312
  const v_error = (() => {
313
313
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
314
314
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -373,7 +373,7 @@ function validate$p(obj, path = 'Error') {
373
373
  return v_error === undefined ? null : v_error;
374
374
  }
375
375
 
376
- function validate$o(obj, path = 'RecommendationActionParam') {
376
+ function validate$x(obj, path = 'RecommendationActionParam') {
377
377
  const v_error = (() => {
378
378
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
379
379
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -445,7 +445,7 @@ function validate$o(obj, path = 'RecommendationActionParam') {
445
445
  return v_error === undefined ? null : v_error;
446
446
  }
447
447
 
448
- function validate$n(obj, path = 'Recommendation') {
448
+ function validate$w(obj, path = 'Recommendation') {
449
449
  const v_error = (() => {
450
450
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
451
451
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -573,7 +573,7 @@ function validate$n(obj, path = 'Recommendation') {
573
573
  const path_actionStrategyParameters_item = path_actionStrategyParameters + '[' + i + ']';
574
574
  let obj_actionStrategyParameters_item_union0 = null;
575
575
  const obj_actionStrategyParameters_item_union0_error = (() => {
576
- const referencepath_actionStrategyParameters_itemValidationError = validate$o(obj_actionStrategyParameters_item, path_actionStrategyParameters_item);
576
+ const referencepath_actionStrategyParameters_itemValidationError = validate$x(obj_actionStrategyParameters_item, path_actionStrategyParameters_item);
577
577
  if (referencepath_actionStrategyParameters_itemValidationError !== null) {
578
578
  let message = 'Object doesn\'t match RecommendationActionParam (at "' + path_actionStrategyParameters_item + '")\n';
579
579
  message += referencepath_actionStrategyParameters_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -772,7 +772,7 @@ function validate$n(obj, path = 'Recommendation') {
772
772
  return v_error === undefined ? null : v_error;
773
773
  }
774
774
 
775
- function validate$m(obj, path = 'RcmdStrategyResult') {
775
+ function validate$v(obj, path = 'RcmdStrategyResult') {
776
776
  const v_error = (() => {
777
777
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
778
778
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -788,7 +788,7 @@ function validate$m(obj, path = 'RcmdStrategyResult') {
788
788
  const path_errors_item = path_errors + '[' + i + ']';
789
789
  let obj_errors_item_union0 = null;
790
790
  const obj_errors_item_union0_error = (() => {
791
- const referencepath_errors_itemValidationError = validate$p(obj_errors_item, path_errors_item);
791
+ const referencepath_errors_itemValidationError = validate$y(obj_errors_item, path_errors_item);
792
792
  if (referencepath_errors_itemValidationError !== null) {
793
793
  let message = 'Object doesn\'t match Error (at "' + path_errors_item + '")\n';
794
794
  message += referencepath_errors_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -883,7 +883,7 @@ function validate$m(obj, path = 'RcmdStrategyResult') {
883
883
  const path_recommendations_item = path_recommendations + '[' + i + ']';
884
884
  let obj_recommendations_item_union0 = null;
885
885
  const obj_recommendations_item_union0_error = (() => {
886
- const referencepath_recommendations_itemValidationError = validate$n(obj_recommendations_item, path_recommendations_item);
886
+ const referencepath_recommendations_itemValidationError = validate$w(obj_recommendations_item, path_recommendations_item);
887
887
  if (referencepath_recommendations_itemValidationError !== null) {
888
888
  let message = 'Object doesn\'t match Recommendation (at "' + path_recommendations_item + '")\n';
889
889
  message += referencepath_recommendations_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -942,7 +942,7 @@ function validate$m(obj, path = 'RcmdStrategyResult') {
942
942
  return v_error === undefined ? null : v_error;
943
943
  }
944
944
 
945
- function validate$l(obj, path = 'Status') {
945
+ function validate$u(obj, path = 'Status') {
946
946
  const v_error = (() => {
947
947
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
948
948
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -961,9 +961,9 @@ function validate$l(obj, path = 'Status') {
961
961
  return v_error === undefined ? null : v_error;
962
962
  }
963
963
 
964
- const TTL$1 = 1000;
965
- const VERSION$1 = "aaf9d28bb6dd45e46359c8fa29159989";
966
- function validate$k(obj, path = 'RecommendationOutputRepresentation') {
964
+ const TTL$2 = 1000;
965
+ const VERSION$2 = "aaf9d28bb6dd45e46359c8fa29159989";
966
+ function validate$t(obj, path = 'RecommendationOutputRepresentation') {
967
967
  const v_error = (() => {
968
968
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
969
969
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -1070,7 +1070,7 @@ function validate$k(obj, path = 'RecommendationOutputRepresentation') {
1070
1070
  const path_recommendationStrategyResult_item = path_recommendationStrategyResult + '[' + i + ']';
1071
1071
  let obj_recommendationStrategyResult_item_union0 = null;
1072
1072
  const obj_recommendationStrategyResult_item_union0_error = (() => {
1073
- const referencepath_recommendationStrategyResult_itemValidationError = validate$m(obj_recommendationStrategyResult_item, path_recommendationStrategyResult_item);
1073
+ const referencepath_recommendationStrategyResult_itemValidationError = validate$v(obj_recommendationStrategyResult_item, path_recommendationStrategyResult_item);
1074
1074
  if (referencepath_recommendationStrategyResult_itemValidationError !== null) {
1075
1075
  let message = 'Object doesn\'t match RcmdStrategyResult (at "' + path_recommendationStrategyResult_item + '")\n';
1076
1076
  message += referencepath_recommendationStrategyResult_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -1127,7 +1127,7 @@ function validate$k(obj, path = 'RecommendationOutputRepresentation') {
1127
1127
  }
1128
1128
  const obj_status = obj.status;
1129
1129
  const path_status = path + '.status';
1130
- const referencepath_statusValidationError = validate$l(obj_status, path_status);
1130
+ const referencepath_statusValidationError = validate$u(obj_status, path_status);
1131
1131
  if (referencepath_statusValidationError !== null) {
1132
1132
  let message = 'Object doesn\'t match Status (at "' + path_status + '")\n';
1133
1133
  message += referencepath_statusValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -1192,68 +1192,68 @@ function validate$k(obj, path = 'RecommendationOutputRepresentation') {
1192
1192
  })();
1193
1193
  return v_error === undefined ? null : v_error;
1194
1194
  }
1195
- const RepresentationType$1 = 'RecommendationOutputRepresentation';
1196
- function keyBuilder$1(luvio, config) {
1197
- return keyPrefix + '::' + RepresentationType$1 + ':' + config.status;
1195
+ const RepresentationType$2 = 'RecommendationOutputRepresentation';
1196
+ function keyBuilder$2(luvio, config) {
1197
+ return keyPrefix + '::' + RepresentationType$2 + ':' + config.status;
1198
1198
  }
1199
- function keyBuilderFromType$1(luvio, object) {
1199
+ function keyBuilderFromType$2(luvio, object) {
1200
1200
  const keyParams = {
1201
1201
  status: object.status.message
1202
1202
  };
1203
- return keyBuilder$1(luvio, keyParams);
1203
+ return keyBuilder$2(luvio, keyParams);
1204
1204
  }
1205
- function normalize$1(input, existing, path, luvio, store, timestamp) {
1205
+ function normalize$2(input, existing, path, luvio, store, timestamp) {
1206
1206
  return input;
1207
1207
  }
1208
- const select$3 = function RecommendationOutputRepresentationSelect() {
1208
+ const select$5 = function RecommendationOutputRepresentationSelect() {
1209
1209
  return {
1210
1210
  kind: 'Fragment',
1211
- version: VERSION$1,
1211
+ version: VERSION$2,
1212
1212
  private: [],
1213
1213
  opaque: true
1214
1214
  };
1215
1215
  };
1216
- function equals$1(existing, incoming) {
1216
+ function equals$2(existing, incoming) {
1217
1217
  if (JSONStringify(incoming) !== JSONStringify(existing)) {
1218
1218
  return false;
1219
1219
  }
1220
1220
  return true;
1221
1221
  }
1222
- const ingest$1 = function RecommendationOutputRepresentationIngest(input, path, luvio, store, timestamp) {
1222
+ const ingest$2 = function RecommendationOutputRepresentationIngest(input, path, luvio, store, timestamp) {
1223
1223
  if (process.env.NODE_ENV !== 'production') {
1224
- const validateError = validate$k(input);
1224
+ const validateError = validate$t(input);
1225
1225
  if (validateError !== null) {
1226
1226
  throw validateError;
1227
1227
  }
1228
1228
  }
1229
- const key = keyBuilderFromType$1(luvio, input);
1230
- const ttlToUse = TTL$1;
1231
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "Einstein-AIAccelerator", VERSION$1, RepresentationType$1, equals$1);
1229
+ const key = keyBuilderFromType$2(luvio, input);
1230
+ const ttlToUse = TTL$2;
1231
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "Einstein-AIAccelerator", VERSION$2, RepresentationType$2, equals$2);
1232
1232
  return createLink(key);
1233
1233
  };
1234
- function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
1234
+ function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
1235
1235
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1236
- const rootKey = keyBuilderFromType$1(luvio, input);
1236
+ const rootKey = keyBuilderFromType$2(luvio, input);
1237
1237
  rootKeySet.set(rootKey, {
1238
1238
  namespace: keyPrefix,
1239
- representationName: RepresentationType$1,
1239
+ representationName: RepresentationType$2,
1240
1240
  mergeable: false
1241
1241
  });
1242
1242
  }
1243
1243
 
1244
- function select$2(luvio, params) {
1245
- return select$3();
1244
+ function select$4(luvio, params) {
1245
+ return select$5();
1246
1246
  }
1247
- function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
1248
- getTypeCacheKeys$1(storeKeyMap, luvio, response);
1247
+ function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
1248
+ getTypeCacheKeys$2(storeKeyMap, luvio, response);
1249
1249
  }
1250
- function ingestSuccess$1(luvio, resourceParams, response) {
1250
+ function ingestSuccess$2(luvio, resourceParams, response) {
1251
1251
  const { body } = response;
1252
- const key = keyBuilderFromType$1(luvio, body);
1253
- luvio.storeIngest(key, ingest$1, body);
1252
+ const key = keyBuilderFromType$2(luvio, body);
1253
+ luvio.storeIngest(key, ingest$2, body);
1254
1254
  const snapshot = luvio.storeLookup({
1255
1255
  recordId: key,
1256
- node: select$2(),
1256
+ node: select$4(),
1257
1257
  variables: {},
1258
1258
  });
1259
1259
  if (process.env.NODE_ENV !== 'production') {
@@ -1264,7 +1264,7 @@ function ingestSuccess$1(luvio, resourceParams, response) {
1264
1264
  deepFreeze(snapshot.data);
1265
1265
  return snapshot;
1266
1266
  }
1267
- function createResourceRequest$1(config) {
1267
+ function createResourceRequest$2(config) {
1268
1268
  const headers = {};
1269
1269
  return {
1270
1270
  baseUri: '/services/data/v62.0',
@@ -1278,45 +1278,45 @@ function createResourceRequest$1(config) {
1278
1278
  };
1279
1279
  }
1280
1280
 
1281
- const adapterName$1 = 'fetchRecommendations';
1281
+ const adapterName$2 = 'fetchRecommendations';
1282
1282
  const fetchRecommendations_ConfigPropertyMetadata = [
1283
1283
  generateParamConfigMetadata('recommendationInput', true, 2 /* Body */, 4 /* Unsupported */),
1284
1284
  ];
1285
- const fetchRecommendations_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, fetchRecommendations_ConfigPropertyMetadata);
1286
- const createResourceParams$1 = /*#__PURE__*/ createResourceParams$2(fetchRecommendations_ConfigPropertyMetadata);
1287
- function typeCheckConfig$1(untrustedConfig) {
1285
+ const fetchRecommendations_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, fetchRecommendations_ConfigPropertyMetadata);
1286
+ const createResourceParams$2 = /*#__PURE__*/ createResourceParams$3(fetchRecommendations_ConfigPropertyMetadata);
1287
+ function typeCheckConfig$2(untrustedConfig) {
1288
1288
  const config = {};
1289
1289
  const untrustedConfig_recommendationInput = untrustedConfig.recommendationInput;
1290
- const referenceRecommendationInputRepresentationValidationError = validate$q(untrustedConfig_recommendationInput);
1290
+ const referenceRecommendationInputRepresentationValidationError = validate$z(untrustedConfig_recommendationInput);
1291
1291
  if (referenceRecommendationInputRepresentationValidationError === null) {
1292
1292
  config.recommendationInput = untrustedConfig_recommendationInput;
1293
1293
  }
1294
1294
  return config;
1295
1295
  }
1296
- function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
1296
+ function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
1297
1297
  if (!untrustedIsObject(untrustedConfig)) {
1298
1298
  return null;
1299
1299
  }
1300
1300
  if (process.env.NODE_ENV !== 'production') {
1301
1301
  validateConfig(untrustedConfig, configPropertyNames);
1302
1302
  }
1303
- const config = typeCheckConfig$1(untrustedConfig);
1303
+ const config = typeCheckConfig$2(untrustedConfig);
1304
1304
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
1305
1305
  return null;
1306
1306
  }
1307
1307
  return config;
1308
1308
  }
1309
- function buildNetworkSnapshot$1(luvio, config, options) {
1310
- const resourceParams = createResourceParams$1(config);
1311
- const request = createResourceRequest$1(resourceParams);
1309
+ function buildNetworkSnapshot$2(luvio, config, options) {
1310
+ const resourceParams = createResourceParams$2(config);
1311
+ const request = createResourceRequest$2(resourceParams);
1312
1312
  return luvio.dispatchResourceRequest(request, options)
1313
1313
  .then((response) => {
1314
1314
  return luvio.handleSuccessResponse(() => {
1315
- const snapshot = ingestSuccess$1(luvio, resourceParams, response);
1315
+ const snapshot = ingestSuccess$2(luvio, resourceParams, response);
1316
1316
  return luvio.storeBroadcast().then(() => snapshot);
1317
1317
  }, () => {
1318
1318
  const cache = new StoreKeyMap();
1319
- getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
1319
+ getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
1320
1320
  return cache;
1321
1321
  });
1322
1322
  }, (response) => {
@@ -1326,16 +1326,16 @@ function buildNetworkSnapshot$1(luvio, config, options) {
1326
1326
  }
1327
1327
  const fetchRecommendationsAdapterFactory = (luvio) => {
1328
1328
  return function fetchRecommendations(untrustedConfig) {
1329
- const config = validateAdapterConfig$1(untrustedConfig, fetchRecommendations_ConfigPropertyNames);
1329
+ const config = validateAdapterConfig$2(untrustedConfig, fetchRecommendations_ConfigPropertyNames);
1330
1330
  // Invalid or incomplete config
1331
1331
  if (config === null) {
1332
1332
  throw new Error('Invalid config for "fetchRecommendations"');
1333
1333
  }
1334
- return buildNetworkSnapshot$1(luvio, config);
1334
+ return buildNetworkSnapshot$2(luvio, config);
1335
1335
  };
1336
1336
  };
1337
1337
 
1338
- function validate$j(obj, path = 'WrappedList') {
1338
+ function validate$s(obj, path = 'WrappedList') {
1339
1339
  const v_error = (() => {
1340
1340
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1341
1341
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -1377,6 +1377,595 @@ function validate$j(obj, path = 'WrappedList') {
1377
1377
  return v_error === undefined ? null : v_error;
1378
1378
  }
1379
1379
 
1380
+ function validate$r(obj, path = 'NullableCustomAttributesMap') {
1381
+ const v_error = (() => {
1382
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1383
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1384
+ }
1385
+ const obj_keys = ObjectKeys(obj);
1386
+ for (let i = 0; i < obj_keys.length; i++) {
1387
+ const key = obj_keys[i];
1388
+ const obj_prop = obj[key];
1389
+ const path_prop = path + '["' + key + '"]';
1390
+ let obj_prop_union0 = null;
1391
+ const obj_prop_union0_error = (() => {
1392
+ if (typeof obj_prop !== 'string') {
1393
+ return new TypeError('Expected "string" but received "' + typeof obj_prop + '" (at "' + path_prop + '")');
1394
+ }
1395
+ })();
1396
+ if (obj_prop_union0_error != null) {
1397
+ obj_prop_union0 = obj_prop_union0_error.message;
1398
+ }
1399
+ let obj_prop_union1 = null;
1400
+ const obj_prop_union1_error = (() => {
1401
+ if (obj_prop !== null) {
1402
+ return new TypeError('Expected "null" but received "' + typeof obj_prop + '" (at "' + path_prop + '")');
1403
+ }
1404
+ })();
1405
+ if (obj_prop_union1_error != null) {
1406
+ obj_prop_union1 = obj_prop_union1_error.message;
1407
+ }
1408
+ if (obj_prop_union0 && obj_prop_union1) {
1409
+ let message = 'Object doesn\'t match union (at "' + path_prop + '")';
1410
+ message += '\n' + obj_prop_union0.split('\n').map((line) => '\t' + line).join('\n');
1411
+ message += '\n' + obj_prop_union1.split('\n').map((line) => '\t' + line).join('\n');
1412
+ return new TypeError(message);
1413
+ }
1414
+ }
1415
+ })();
1416
+ return v_error === undefined ? null : v_error;
1417
+ }
1418
+
1419
+ function validate$q(obj, path = 'CustomAttributesMap') {
1420
+ const v_error = (() => {
1421
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1422
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1423
+ }
1424
+ if (obj.customAttributes !== undefined) {
1425
+ const obj_customAttributes = obj.customAttributes;
1426
+ const path_customAttributes = path + '.customAttributes';
1427
+ let obj_customAttributes_union0 = null;
1428
+ const obj_customAttributes_union0_error = (() => {
1429
+ const referencepath_customAttributesValidationError = validate$r(obj_customAttributes, path_customAttributes);
1430
+ if (referencepath_customAttributesValidationError !== null) {
1431
+ let message = 'Object doesn\'t match NullableCustomAttributesMap (at "' + path_customAttributes + '")\n';
1432
+ message += referencepath_customAttributesValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1433
+ return new TypeError(message);
1434
+ }
1435
+ })();
1436
+ if (obj_customAttributes_union0_error != null) {
1437
+ obj_customAttributes_union0 = obj_customAttributes_union0_error.message;
1438
+ }
1439
+ let obj_customAttributes_union1 = null;
1440
+ const obj_customAttributes_union1_error = (() => {
1441
+ if (obj_customAttributes !== null) {
1442
+ return new TypeError('Expected "null" but received "' + typeof obj_customAttributes + '" (at "' + path_customAttributes + '")');
1443
+ }
1444
+ })();
1445
+ if (obj_customAttributes_union1_error != null) {
1446
+ obj_customAttributes_union1 = obj_customAttributes_union1_error.message;
1447
+ }
1448
+ if (obj_customAttributes_union0 && obj_customAttributes_union1) {
1449
+ let message = 'Object doesn\'t match union (at "' + path_customAttributes + '")';
1450
+ message += '\n' + obj_customAttributes_union0.split('\n').map((line) => '\t' + line).join('\n');
1451
+ message += '\n' + obj_customAttributes_union1.split('\n').map((line) => '\t' + line).join('\n');
1452
+ return new TypeError(message);
1453
+ }
1454
+ }
1455
+ })();
1456
+ return v_error === undefined ? null : v_error;
1457
+ }
1458
+
1459
+ function validate$p(obj, path = 'PredictorField') {
1460
+ const v_error = (() => {
1461
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1462
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1463
+ }
1464
+ if (obj.customText !== undefined) {
1465
+ const obj_customText = obj.customText;
1466
+ const path_customText = path + '.customText';
1467
+ if (typeof obj_customText !== 'string') {
1468
+ return new TypeError('Expected "string" but received "' + typeof obj_customText + '" (at "' + path_customText + '")');
1469
+ }
1470
+ }
1471
+ if (obj.label !== undefined) {
1472
+ const obj_label = obj.label;
1473
+ const path_label = path + '.label';
1474
+ if (typeof obj_label !== 'string') {
1475
+ return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
1476
+ }
1477
+ }
1478
+ if (obj.name !== undefined) {
1479
+ const obj_name = obj.name;
1480
+ const path_name = path + '.name';
1481
+ if (typeof obj_name !== 'string') {
1482
+ return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
1483
+ }
1484
+ }
1485
+ if (obj.prescribedValue !== undefined) {
1486
+ const obj_prescribedValue = obj.prescribedValue;
1487
+ const path_prescribedValue = path + '.prescribedValue';
1488
+ if (typeof obj_prescribedValue !== 'string') {
1489
+ return new TypeError('Expected "string" but received "' + typeof obj_prescribedValue + '" (at "' + path_prescribedValue + '")');
1490
+ }
1491
+ }
1492
+ if (obj.value !== undefined) {
1493
+ const obj_value = obj.value;
1494
+ const path_value = path + '.value';
1495
+ if (typeof obj_value !== 'string') {
1496
+ return new TypeError('Expected "string" but received "' + typeof obj_value + '" (at "' + path_value + '")');
1497
+ }
1498
+ }
1499
+ })();
1500
+ return v_error === undefined ? null : v_error;
1501
+ }
1502
+
1503
+ function validate$o(obj, path = 'Predictor') {
1504
+ const v_error = (() => {
1505
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1506
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1507
+ }
1508
+ if (obj.contributionValue !== undefined) {
1509
+ const obj_contributionValue = obj.contributionValue;
1510
+ const path_contributionValue = path + '.contributionValue';
1511
+ if (typeof obj_contributionValue !== 'number') {
1512
+ return new TypeError('Expected "number" but received "' + typeof obj_contributionValue + '" (at "' + path_contributionValue + '")');
1513
+ }
1514
+ }
1515
+ if (obj.predictorFields !== undefined) {
1516
+ const obj_predictorFields = obj.predictorFields;
1517
+ const path_predictorFields = path + '.predictorFields';
1518
+ if (!ArrayIsArray(obj_predictorFields)) {
1519
+ return new TypeError('Expected "array" but received "' + typeof obj_predictorFields + '" (at "' + path_predictorFields + '")');
1520
+ }
1521
+ for (let i = 0; i < obj_predictorFields.length; i++) {
1522
+ const obj_predictorFields_item = obj_predictorFields[i];
1523
+ const path_predictorFields_item = path_predictorFields + '[' + i + ']';
1524
+ const referencepath_predictorFields_itemValidationError = validate$p(obj_predictorFields_item, path_predictorFields_item);
1525
+ if (referencepath_predictorFields_itemValidationError !== null) {
1526
+ let message = 'Object doesn\'t match PredictorField (at "' + path_predictorFields_item + '")\n';
1527
+ message += referencepath_predictorFields_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1528
+ return new TypeError(message);
1529
+ }
1530
+ }
1531
+ }
1532
+ })();
1533
+ return v_error === undefined ? null : v_error;
1534
+ }
1535
+
1536
+ function validate$n(obj, path = 'PredictionOutput') {
1537
+ const v_error = (() => {
1538
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1539
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1540
+ }
1541
+ if (obj.customAttributes !== undefined) {
1542
+ const obj_customAttributes = obj.customAttributes;
1543
+ const path_customAttributes = path + '.customAttributes';
1544
+ let obj_customAttributes_union0 = null;
1545
+ const obj_customAttributes_union0_error = (() => {
1546
+ const referencepath_customAttributesValidationError = validate$q(obj_customAttributes, path_customAttributes);
1547
+ if (referencepath_customAttributesValidationError !== null) {
1548
+ let message = 'Object doesn\'t match CustomAttributesMap (at "' + path_customAttributes + '")\n';
1549
+ message += referencepath_customAttributesValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1550
+ return new TypeError(message);
1551
+ }
1552
+ })();
1553
+ if (obj_customAttributes_union0_error != null) {
1554
+ obj_customAttributes_union0 = obj_customAttributes_union0_error.message;
1555
+ }
1556
+ let obj_customAttributes_union1 = null;
1557
+ const obj_customAttributes_union1_error = (() => {
1558
+ if (obj_customAttributes !== null) {
1559
+ return new TypeError('Expected "null" but received "' + typeof obj_customAttributes + '" (at "' + path_customAttributes + '")');
1560
+ }
1561
+ })();
1562
+ if (obj_customAttributes_union1_error != null) {
1563
+ obj_customAttributes_union1 = obj_customAttributes_union1_error.message;
1564
+ }
1565
+ if (obj_customAttributes_union0 && obj_customAttributes_union1) {
1566
+ let message = 'Object doesn\'t match union (at "' + path_customAttributes + '")';
1567
+ message += '\n' + obj_customAttributes_union0.split('\n').map((line) => '\t' + line).join('\n');
1568
+ message += '\n' + obj_customAttributes_union1.split('\n').map((line) => '\t' + line).join('\n');
1569
+ return new TypeError(message);
1570
+ }
1571
+ }
1572
+ if (obj.customPredictionLabel !== undefined) {
1573
+ const obj_customPredictionLabel = obj.customPredictionLabel;
1574
+ const path_customPredictionLabel = path + '.customPredictionLabel';
1575
+ if (typeof obj_customPredictionLabel !== 'string') {
1576
+ return new TypeError('Expected "string" but received "' + typeof obj_customPredictionLabel + '" (at "' + path_customPredictionLabel + '")');
1577
+ }
1578
+ }
1579
+ if (obj.predictionScore !== undefined) {
1580
+ const obj_predictionScore = obj.predictionScore;
1581
+ const path_predictionScore = path + '.predictionScore';
1582
+ if (typeof obj_predictionScore !== 'number') {
1583
+ return new TypeError('Expected "number" but received "' + typeof obj_predictionScore + '" (at "' + path_predictionScore + '")');
1584
+ }
1585
+ }
1586
+ if (obj.topPredictors !== undefined) {
1587
+ const obj_topPredictors = obj.topPredictors;
1588
+ const path_topPredictors = path + '.topPredictors';
1589
+ if (!ArrayIsArray(obj_topPredictors)) {
1590
+ return new TypeError('Expected "array" but received "' + typeof obj_topPredictors + '" (at "' + path_topPredictors + '")');
1591
+ }
1592
+ for (let i = 0; i < obj_topPredictors.length; i++) {
1593
+ const obj_topPredictors_item = obj_topPredictors[i];
1594
+ const path_topPredictors_item = path_topPredictors + '[' + i + ']';
1595
+ const referencepath_topPredictors_itemValidationError = validate$o(obj_topPredictors_item, path_topPredictors_item);
1596
+ if (referencepath_topPredictors_itemValidationError !== null) {
1597
+ let message = 'Object doesn\'t match Predictor (at "' + path_topPredictors_item + '")\n';
1598
+ message += referencepath_topPredictors_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1599
+ return new TypeError(message);
1600
+ }
1601
+ }
1602
+ }
1603
+ })();
1604
+ return v_error === undefined ? null : v_error;
1605
+ }
1606
+
1607
+ function validate$m(obj, path = 'FieldCount') {
1608
+ const v_error = (() => {
1609
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1610
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1611
+ }
1612
+ if (obj.count !== undefined) {
1613
+ const obj_count = obj.count;
1614
+ const path_count = path + '.count';
1615
+ if (typeof obj_count !== 'number' || (typeof obj_count === 'number' && Math.floor(obj_count) !== obj_count)) {
1616
+ return new TypeError('Expected "integer" but received "' + typeof obj_count + '" (at "' + path_count + '")');
1617
+ }
1618
+ }
1619
+ if (obj.fieldValue !== undefined) {
1620
+ const obj_fieldValue = obj.fieldValue;
1621
+ const path_fieldValue = path + '.fieldValue';
1622
+ if (typeof obj_fieldValue !== 'string') {
1623
+ return new TypeError('Expected "string" but received "' + typeof obj_fieldValue + '" (at "' + path_fieldValue + '")');
1624
+ }
1625
+ }
1626
+ })();
1627
+ return v_error === undefined ? null : v_error;
1628
+ }
1629
+
1630
+ function validate$l(obj, path = 'PredictionWarning') {
1631
+ const v_error = (() => {
1632
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1633
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1634
+ }
1635
+ if (obj.missingFieldNames !== undefined) {
1636
+ const obj_missingFieldNames = obj.missingFieldNames;
1637
+ const path_missingFieldNames = path + '.missingFieldNames';
1638
+ if (!ArrayIsArray(obj_missingFieldNames)) {
1639
+ return new TypeError('Expected "array" but received "' + typeof obj_missingFieldNames + '" (at "' + path_missingFieldNames + '")');
1640
+ }
1641
+ for (let i = 0; i < obj_missingFieldNames.length; i++) {
1642
+ const obj_missingFieldNames_item = obj_missingFieldNames[i];
1643
+ const path_missingFieldNames_item = path_missingFieldNames + '[' + i + ']';
1644
+ if (typeof obj_missingFieldNames_item !== 'string') {
1645
+ return new TypeError('Expected "string" but received "' + typeof obj_missingFieldNames_item + '" (at "' + path_missingFieldNames_item + '")');
1646
+ }
1647
+ }
1648
+ }
1649
+ if (obj.outOfBoundFields !== undefined) {
1650
+ const obj_outOfBoundFields = obj.outOfBoundFields;
1651
+ const path_outOfBoundFields = path + '.outOfBoundFields';
1652
+ if (!ArrayIsArray(obj_outOfBoundFields)) {
1653
+ return new TypeError('Expected "array" but received "' + typeof obj_outOfBoundFields + '" (at "' + path_outOfBoundFields + '")');
1654
+ }
1655
+ for (let i = 0; i < obj_outOfBoundFields.length; i++) {
1656
+ const obj_outOfBoundFields_item = obj_outOfBoundFields[i];
1657
+ const path_outOfBoundFields_item = path_outOfBoundFields + '[' + i + ']';
1658
+ const referencepath_outOfBoundFields_itemValidationError = validate$m(obj_outOfBoundFields_item, path_outOfBoundFields_item);
1659
+ if (referencepath_outOfBoundFields_itemValidationError !== null) {
1660
+ let message = 'Object doesn\'t match FieldCount (at "' + path_outOfBoundFields_item + '")\n';
1661
+ message += referencepath_outOfBoundFields_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1662
+ return new TypeError(message);
1663
+ }
1664
+ }
1665
+ }
1666
+ })();
1667
+ return v_error === undefined ? null : v_error;
1668
+ }
1669
+
1670
+ function validate$k(obj, path = 'PredictionOutputObject') {
1671
+ const v_error = (() => {
1672
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1673
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1674
+ }
1675
+ if (obj.errors !== undefined) {
1676
+ const obj_errors = obj.errors;
1677
+ const path_errors = path + '.errors';
1678
+ if (!ArrayIsArray(obj_errors)) {
1679
+ return new TypeError('Expected "array" but received "' + typeof obj_errors + '" (at "' + path_errors + '")');
1680
+ }
1681
+ for (let i = 0; i < obj_errors.length; i++) {
1682
+ const obj_errors_item = obj_errors[i];
1683
+ const path_errors_item = path_errors + '[' + i + ']';
1684
+ const referencepath_errors_itemValidationError = validate$y(obj_errors_item, path_errors_item);
1685
+ if (referencepath_errors_itemValidationError !== null) {
1686
+ let message = 'Object doesn\'t match Error (at "' + path_errors_item + '")\n';
1687
+ message += referencepath_errors_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1688
+ return new TypeError(message);
1689
+ }
1690
+ }
1691
+ }
1692
+ const obj_isSuccess = obj.isSuccess;
1693
+ const path_isSuccess = path + '.isSuccess';
1694
+ let obj_isSuccess_union0 = null;
1695
+ const obj_isSuccess_union0_error = (() => {
1696
+ if (typeof obj_isSuccess !== 'boolean') {
1697
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isSuccess + '" (at "' + path_isSuccess + '")');
1698
+ }
1699
+ })();
1700
+ if (obj_isSuccess_union0_error != null) {
1701
+ obj_isSuccess_union0 = obj_isSuccess_union0_error.message;
1702
+ }
1703
+ let obj_isSuccess_union1 = null;
1704
+ const obj_isSuccess_union1_error = (() => {
1705
+ if (obj_isSuccess !== null) {
1706
+ return new TypeError('Expected "null" but received "' + typeof obj_isSuccess + '" (at "' + path_isSuccess + '")');
1707
+ }
1708
+ })();
1709
+ if (obj_isSuccess_union1_error != null) {
1710
+ obj_isSuccess_union1 = obj_isSuccess_union1_error.message;
1711
+ }
1712
+ if (obj_isSuccess_union0 && obj_isSuccess_union1) {
1713
+ let message = 'Object doesn\'t match union (at "' + path_isSuccess + '")';
1714
+ message += '\n' + obj_isSuccess_union0.split('\n').map((line) => '\t' + line).join('\n');
1715
+ message += '\n' + obj_isSuccess_union1.split('\n').map((line) => '\t' + line).join('\n');
1716
+ return new TypeError(message);
1717
+ }
1718
+ if (obj.predictionOutput !== undefined) {
1719
+ const obj_predictionOutput = obj.predictionOutput;
1720
+ const path_predictionOutput = path + '.predictionOutput';
1721
+ if (!ArrayIsArray(obj_predictionOutput)) {
1722
+ return new TypeError('Expected "array" but received "' + typeof obj_predictionOutput + '" (at "' + path_predictionOutput + '")');
1723
+ }
1724
+ for (let i = 0; i < obj_predictionOutput.length; i++) {
1725
+ const obj_predictionOutput_item = obj_predictionOutput[i];
1726
+ const path_predictionOutput_item = path_predictionOutput + '[' + i + ']';
1727
+ const referencepath_predictionOutput_itemValidationError = validate$n(obj_predictionOutput_item, path_predictionOutput_item);
1728
+ if (referencepath_predictionOutput_itemValidationError !== null) {
1729
+ let message = 'Object doesn\'t match PredictionOutput (at "' + path_predictionOutput_item + '")\n';
1730
+ message += referencepath_predictionOutput_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1731
+ return new TypeError(message);
1732
+ }
1733
+ }
1734
+ }
1735
+ if (obj.predictionWarning !== undefined) {
1736
+ const obj_predictionWarning = obj.predictionWarning;
1737
+ const path_predictionWarning = path + '.predictionWarning';
1738
+ const referencepath_predictionWarningValidationError = validate$l(obj_predictionWarning, path_predictionWarning);
1739
+ if (referencepath_predictionWarningValidationError !== null) {
1740
+ let message = 'Object doesn\'t match PredictionWarning (at "' + path_predictionWarning + '")\n';
1741
+ message += referencepath_predictionWarningValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1742
+ return new TypeError(message);
1743
+ }
1744
+ }
1745
+ const obj_recordId = obj.recordId;
1746
+ const path_recordId = path + '.recordId';
1747
+ if (typeof obj_recordId !== 'string') {
1748
+ return new TypeError('Expected "string" but received "' + typeof obj_recordId + '" (at "' + path_recordId + '")');
1749
+ }
1750
+ })();
1751
+ return v_error === undefined ? null : v_error;
1752
+ }
1753
+
1754
+ const TTL$1 = 1000;
1755
+ const VERSION$1 = "c1431b6652fb0e211a1e2149b42f10f4";
1756
+ function validate$j(obj, path = 'PredictionResponseRepresentation') {
1757
+ const v_error = (() => {
1758
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1759
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1760
+ }
1761
+ if (obj.predictionModel !== undefined) {
1762
+ const obj_predictionModel = obj.predictionModel;
1763
+ const path_predictionModel = path + '.predictionModel';
1764
+ if (typeof obj_predictionModel !== 'string') {
1765
+ return new TypeError('Expected "string" but received "' + typeof obj_predictionModel + '" (at "' + path_predictionModel + '")');
1766
+ }
1767
+ }
1768
+ if (obj.predictionOutputObjects !== undefined) {
1769
+ const obj_predictionOutputObjects = obj.predictionOutputObjects;
1770
+ const path_predictionOutputObjects = path + '.predictionOutputObjects';
1771
+ if (!ArrayIsArray(obj_predictionOutputObjects)) {
1772
+ return new TypeError('Expected "array" but received "' + typeof obj_predictionOutputObjects + '" (at "' + path_predictionOutputObjects + '")');
1773
+ }
1774
+ for (let i = 0; i < obj_predictionOutputObjects.length; i++) {
1775
+ const obj_predictionOutputObjects_item = obj_predictionOutputObjects[i];
1776
+ const path_predictionOutputObjects_item = path_predictionOutputObjects + '[' + i + ']';
1777
+ const referencepath_predictionOutputObjects_itemValidationError = validate$k(obj_predictionOutputObjects_item, path_predictionOutputObjects_item);
1778
+ if (referencepath_predictionOutputObjects_itemValidationError !== null) {
1779
+ let message = 'Object doesn\'t match PredictionOutputObject (at "' + path_predictionOutputObjects_item + '")\n';
1780
+ message += referencepath_predictionOutputObjects_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1781
+ return new TypeError(message);
1782
+ }
1783
+ }
1784
+ }
1785
+ if (obj.predictionPlatform !== undefined) {
1786
+ const obj_predictionPlatform = obj.predictionPlatform;
1787
+ const path_predictionPlatform = path + '.predictionPlatform';
1788
+ if (typeof obj_predictionPlatform !== 'string') {
1789
+ return new TypeError('Expected "string" but received "' + typeof obj_predictionPlatform + '" (at "' + path_predictionPlatform + '")');
1790
+ }
1791
+ }
1792
+ if (obj.predictionType !== undefined) {
1793
+ const obj_predictionType = obj.predictionType;
1794
+ const path_predictionType = path + '.predictionType';
1795
+ if (typeof obj_predictionType !== 'string') {
1796
+ return new TypeError('Expected "string" but received "' + typeof obj_predictionType + '" (at "' + path_predictionType + '")');
1797
+ }
1798
+ }
1799
+ const obj_status = obj.status;
1800
+ const path_status = path + '.status';
1801
+ const referencepath_statusValidationError = validate$u(obj_status, path_status);
1802
+ if (referencepath_statusValidationError !== null) {
1803
+ let message = 'Object doesn\'t match Status (at "' + path_status + '")\n';
1804
+ message += referencepath_statusValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1805
+ return new TypeError(message);
1806
+ }
1807
+ const obj_usecaseName = obj.usecaseName;
1808
+ const path_usecaseName = path + '.usecaseName';
1809
+ if (typeof obj_usecaseName !== 'string') {
1810
+ return new TypeError('Expected "string" but received "' + typeof obj_usecaseName + '" (at "' + path_usecaseName + '")');
1811
+ }
1812
+ })();
1813
+ return v_error === undefined ? null : v_error;
1814
+ }
1815
+ const RepresentationType$1 = 'PredictionResponseRepresentation';
1816
+ function keyBuilder$1(luvio, config) {
1817
+ return keyPrefix + '::' + RepresentationType$1 + ':' + config.status;
1818
+ }
1819
+ function keyBuilderFromType$1(luvio, object) {
1820
+ const keyParams = {
1821
+ status: object.status.message
1822
+ };
1823
+ return keyBuilder$1(luvio, keyParams);
1824
+ }
1825
+ function normalize$1(input, existing, path, luvio, store, timestamp) {
1826
+ return input;
1827
+ }
1828
+ const select$3 = function PredictionResponseRepresentationSelect() {
1829
+ return {
1830
+ kind: 'Fragment',
1831
+ version: VERSION$1,
1832
+ private: [],
1833
+ opaque: true
1834
+ };
1835
+ };
1836
+ function equals$1(existing, incoming) {
1837
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
1838
+ return false;
1839
+ }
1840
+ return true;
1841
+ }
1842
+ const ingest$1 = function PredictionResponseRepresentationIngest(input, path, luvio, store, timestamp) {
1843
+ if (process.env.NODE_ENV !== 'production') {
1844
+ const validateError = validate$j(input);
1845
+ if (validateError !== null) {
1846
+ throw validateError;
1847
+ }
1848
+ }
1849
+ const key = keyBuilderFromType$1(luvio, input);
1850
+ const ttlToUse = TTL$1;
1851
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "Einstein-AIAccelerator", VERSION$1, RepresentationType$1, equals$1);
1852
+ return createLink(key);
1853
+ };
1854
+ function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
1855
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1856
+ const rootKey = keyBuilderFromType$1(luvio, input);
1857
+ rootKeySet.set(rootKey, {
1858
+ namespace: keyPrefix,
1859
+ representationName: RepresentationType$1,
1860
+ mergeable: false
1861
+ });
1862
+ }
1863
+
1864
+ function select$2(luvio, params) {
1865
+ return select$3();
1866
+ }
1867
+ function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
1868
+ getTypeCacheKeys$1(storeKeyMap, luvio, response);
1869
+ }
1870
+ function ingestSuccess$1(luvio, resourceParams, response) {
1871
+ const { body } = response;
1872
+ const key = keyBuilderFromType$1(luvio, body);
1873
+ luvio.storeIngest(key, ingest$1, body);
1874
+ const snapshot = luvio.storeLookup({
1875
+ recordId: key,
1876
+ node: select$2(),
1877
+ variables: {},
1878
+ });
1879
+ if (process.env.NODE_ENV !== 'production') {
1880
+ if (snapshot.state !== 'Fulfilled') {
1881
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1882
+ }
1883
+ }
1884
+ deepFreeze(snapshot.data);
1885
+ return snapshot;
1886
+ }
1887
+ function createResourceRequest$1(config) {
1888
+ const headers = {};
1889
+ return {
1890
+ baseUri: '/services/data/v62.0',
1891
+ basePath: '/connect/aiaccelerator/v2/predictions',
1892
+ method: 'post',
1893
+ body: config.body,
1894
+ urlParams: {},
1895
+ queryParams: {},
1896
+ headers,
1897
+ priority: 'normal',
1898
+ };
1899
+ }
1900
+
1901
+ const adapterName$1 = 'getPredictions';
1902
+ const getPredictions_ConfigPropertyMetadata = [
1903
+ generateParamConfigMetadata('maxInsights', false, 2 /* Body */, 3 /* Integer */),
1904
+ generateParamConfigMetadata('predictionModel', true, 2 /* Body */, 0 /* String */),
1905
+ generateParamConfigMetadata('predictionPlatform', false, 2 /* Body */, 0 /* String */),
1906
+ generateParamConfigMetadata('records', false, 2 /* Body */, 4 /* Unsupported */),
1907
+ generateParamConfigMetadata('scoreFilterCriteria', false, 2 /* Body */, 0 /* String */),
1908
+ generateParamConfigMetadata('scoringThreshold', false, 2 /* Body */, 2 /* Number */),
1909
+ generateParamConfigMetadata('sortingOrder', false, 2 /* Body */, 0 /* String */),
1910
+ generateParamConfigMetadata('usecaseName', true, 2 /* Body */, 0 /* String */),
1911
+ ];
1912
+ const getPredictions_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getPredictions_ConfigPropertyMetadata);
1913
+ const createResourceParams$1 = /*#__PURE__*/ createResourceParams$3(getPredictions_ConfigPropertyMetadata);
1914
+ function typeCheckConfig$1(untrustedConfig) {
1915
+ const config = {};
1916
+ typeCheckConfig$3(untrustedConfig, config, getPredictions_ConfigPropertyMetadata);
1917
+ const untrustedConfig_records = untrustedConfig.records;
1918
+ const referenceWrappedListValidationError = validate$s(untrustedConfig_records);
1919
+ if (referenceWrappedListValidationError === null) {
1920
+ config.records = untrustedConfig_records;
1921
+ }
1922
+ if (untrustedConfig_records === null) {
1923
+ config.records = untrustedConfig_records;
1924
+ }
1925
+ return config;
1926
+ }
1927
+ function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
1928
+ if (!untrustedIsObject(untrustedConfig)) {
1929
+ return null;
1930
+ }
1931
+ if (process.env.NODE_ENV !== 'production') {
1932
+ validateConfig(untrustedConfig, configPropertyNames);
1933
+ }
1934
+ const config = typeCheckConfig$1(untrustedConfig);
1935
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1936
+ return null;
1937
+ }
1938
+ return config;
1939
+ }
1940
+ function buildNetworkSnapshot$1(luvio, config, options) {
1941
+ const resourceParams = createResourceParams$1(config);
1942
+ const request = createResourceRequest$1(resourceParams);
1943
+ return luvio.dispatchResourceRequest(request, options)
1944
+ .then((response) => {
1945
+ return luvio.handleSuccessResponse(() => {
1946
+ const snapshot = ingestSuccess$1(luvio, resourceParams, response);
1947
+ return luvio.storeBroadcast().then(() => snapshot);
1948
+ }, () => {
1949
+ const cache = new StoreKeyMap();
1950
+ getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
1951
+ return cache;
1952
+ });
1953
+ }, (response) => {
1954
+ deepFreeze(response);
1955
+ throw response;
1956
+ });
1957
+ }
1958
+ const getPredictionsAdapterFactory = (luvio) => {
1959
+ return function getPredictions(untrustedConfig) {
1960
+ const config = validateAdapterConfig$1(untrustedConfig, getPredictions_ConfigPropertyNames);
1961
+ // Invalid or incomplete config
1962
+ if (config === null) {
1963
+ throw new Error('Invalid config for "getPredictions"');
1964
+ }
1965
+ return buildNetworkSnapshot$1(luvio, config);
1966
+ };
1967
+ };
1968
+
1380
1969
  function validate$i(obj, path = 'NullableColumnMap') {
1381
1970
  const v_error = (() => {
1382
1971
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
@@ -1792,7 +2381,7 @@ function validate$8(obj, path = 'PredictionInputRepresentation') {
1792
2381
  const path_columnNames = path + '.columnNames';
1793
2382
  let obj_columnNames_union0 = null;
1794
2383
  const obj_columnNames_union0_error = (() => {
1795
- const referencepath_columnNamesValidationError = validate$j(obj_columnNames, path_columnNames);
2384
+ const referencepath_columnNamesValidationError = validate$s(obj_columnNames, path_columnNames);
1796
2385
  if (referencepath_columnNamesValidationError !== null) {
1797
2386
  let message = 'Object doesn\'t match WrappedList (at "' + path_columnNames + '")\n';
1798
2387
  message += referencepath_columnNamesValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -2247,7 +2836,7 @@ function validate$8(obj, path = 'PredictionInputRepresentation') {
2247
2836
  const path_records = path + '.records';
2248
2837
  let obj_records_union0 = null;
2249
2838
  const obj_records_union0_error = (() => {
2250
- const referencepath_recordsValidationError = validate$j(obj_records, path_records);
2839
+ const referencepath_recordsValidationError = validate$s(obj_records, path_records);
2251
2840
  if (referencepath_recordsValidationError !== null) {
2252
2841
  let message = 'Object doesn\'t match WrappedList (at "' + path_records + '")\n';
2253
2842
  message += referencepath_recordsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -3502,7 +4091,7 @@ function validate(obj, path = 'PredictionOutputRepresentation') {
3502
4091
  }
3503
4092
  const obj_status = obj.status;
3504
4093
  const path_status = path + '.status';
3505
- const referencepath_statusValidationError = validate$l(obj_status, path_status);
4094
+ const referencepath_statusValidationError = validate$u(obj_status, path_status);
3506
4095
  if (referencepath_statusValidationError !== null) {
3507
4096
  let message = 'Object doesn\'t match Status (at "' + path_status + '")\n';
3508
4097
  message += referencepath_statusValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -3602,7 +4191,7 @@ const predictions_ConfigPropertyMetadata = [
3602
4191
  generateParamConfigMetadata('predictionInput', true, 2 /* Body */, 4 /* Unsupported */),
3603
4192
  ];
3604
4193
  const predictions_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, predictions_ConfigPropertyMetadata);
3605
- const createResourceParams = /*#__PURE__*/ createResourceParams$2(predictions_ConfigPropertyMetadata);
4194
+ const createResourceParams = /*#__PURE__*/ createResourceParams$3(predictions_ConfigPropertyMetadata);
3606
4195
  function typeCheckConfig(untrustedConfig) {
3607
4196
  const config = {};
3608
4197
  const untrustedConfig_predictionInput = untrustedConfig.predictionInput;
@@ -3655,6 +4244,7 @@ const predictionsAdapterFactory = (luvio) => {
3655
4244
  };
3656
4245
 
3657
4246
  let fetchRecommendations;
4247
+ let getPredictions;
3658
4248
  let predictions;
3659
4249
  // Notify Update Available
3660
4250
  function bindExportsTo(luvio) {
@@ -3665,14 +4255,15 @@ function bindExportsTo(luvio) {
3665
4255
  }
3666
4256
  return {
3667
4257
  fetchRecommendations: unwrapSnapshotData(fetchRecommendationsAdapterFactory),
4258
+ getPredictions: unwrapSnapshotData(getPredictionsAdapterFactory),
3668
4259
  predictions: unwrapSnapshotData(predictionsAdapterFactory),
3669
4260
  // Imperative GET Adapters
3670
4261
  // Notify Update Availables
3671
4262
  };
3672
4263
  }
3673
4264
  withDefaultLuvio((luvio) => {
3674
- ({ fetchRecommendations, predictions } = bindExportsTo(luvio));
4265
+ ({ fetchRecommendations, getPredictions, predictions } = bindExportsTo(luvio));
3675
4266
  });
3676
4267
 
3677
- export { fetchRecommendations, predictions };
3678
- // version: 1.308.0-dev3-5eb971dcf6
4268
+ export { fetchRecommendations, getPredictions, predictions };
4269
+ // version: 1.308.0-dev5-7e965f814e