@salesforce/lds-adapters-industries-einstein-aiaccelerator 1.308.0 → 1.309.0-dev8
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/dist/es/es2018/industries-einstein-aiaccelerator.js +202 -145
- package/dist/es/es2018/types/src/generated/adapters/getPredictions.d.ts +9 -2
- package/dist/es/es2018/types/src/generated/resources/postConnectAiacceleratorV2Predictions.d.ts +9 -2
- package/dist/es/es2018/types/src/generated/types/CustomAttributesMap.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/types/NullableCustomAttributesMap.d.ts +27 -0
- package/dist/es/es2018/types/src/generated/types/PredictionOutput.d.ts +8 -1
- package/dist/es/es2018/types/src/generated/types/PredictionOutputObject.d.ts +3 -3
- package/dist/es/es2018/types/src/generated/types/PredictionRequestRepresentation.d.ts +5 -5
- package/dist/es/es2018/types/src/generated/types/PredictionResponseRepresentation.d.ts +1 -4
- package/package.json +6 -5
- package/sfdc/index.js +161 -104
- package/src/raml/api.raml +26 -8
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$3 } 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$
|
|
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$y(obj, path = 'RecommendationInputRepresentation') {
|
|
|
308
308
|
return v_error === undefined ? null : v_error;
|
|
309
309
|
}
|
|
310
310
|
|
|
311
|
-
function validate$
|
|
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$x(obj, path = 'Error') {
|
|
|
373
373
|
return v_error === undefined ? null : v_error;
|
|
374
374
|
}
|
|
375
375
|
|
|
376
|
-
function validate$
|
|
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$w(obj, path = 'RecommendationActionParam') {
|
|
|
445
445
|
return v_error === undefined ? null : v_error;
|
|
446
446
|
}
|
|
447
447
|
|
|
448
|
-
function validate$
|
|
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$v(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$
|
|
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$v(obj, path = 'Recommendation') {
|
|
|
772
772
|
return v_error === undefined ? null : v_error;
|
|
773
773
|
}
|
|
774
774
|
|
|
775
|
-
function validate$
|
|
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$u(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$
|
|
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$u(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$
|
|
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$u(obj, path = 'RcmdStrategyResult') {
|
|
|
942
942
|
return v_error === undefined ? null : v_error;
|
|
943
943
|
}
|
|
944
944
|
|
|
945
|
-
function validate$
|
|
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 + '")');
|
|
@@ -963,7 +963,7 @@ function validate$t(obj, path = 'Status') {
|
|
|
963
963
|
|
|
964
964
|
const TTL$2 = 1000;
|
|
965
965
|
const VERSION$2 = "aaf9d28bb6dd45e46359c8fa29159989";
|
|
966
|
-
function validate$
|
|
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$s(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$
|
|
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$s(obj, path = 'RecommendationOutputRepresentation') {
|
|
|
1127
1127
|
}
|
|
1128
1128
|
const obj_status = obj.status;
|
|
1129
1129
|
const path_status = path + '.status';
|
|
1130
|
-
const referencepath_statusValidationError = validate$
|
|
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');
|
|
@@ -1221,7 +1221,7 @@ function equals$2(existing, incoming) {
|
|
|
1221
1221
|
}
|
|
1222
1222
|
const ingest$2 = function RecommendationOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1223
1223
|
if (process.env.NODE_ENV !== 'production') {
|
|
1224
|
-
const validateError = validate$
|
|
1224
|
+
const validateError = validate$t(input);
|
|
1225
1225
|
if (validateError !== null) {
|
|
1226
1226
|
throw validateError;
|
|
1227
1227
|
}
|
|
@@ -1287,7 +1287,7 @@ const createResourceParams$2 = /*#__PURE__*/ createResourceParams$3(fetchRecomme
|
|
|
1287
1287
|
function typeCheckConfig$2(untrustedConfig) {
|
|
1288
1288
|
const config = {};
|
|
1289
1289
|
const untrustedConfig_recommendationInput = untrustedConfig.recommendationInput;
|
|
1290
|
-
const referenceRecommendationInputRepresentationValidationError = validate$
|
|
1290
|
+
const referenceRecommendationInputRepresentationValidationError = validate$z(untrustedConfig_recommendationInput);
|
|
1291
1291
|
if (referenceRecommendationInputRepresentationValidationError === null) {
|
|
1292
1292
|
config.recommendationInput = untrustedConfig_recommendationInput;
|
|
1293
1293
|
}
|
|
@@ -1335,7 +1335,7 @@ const fetchRecommendationsAdapterFactory = (luvio) => {
|
|
|
1335
1335
|
};
|
|
1336
1336
|
};
|
|
1337
1337
|
|
|
1338
|
-
function validate$
|
|
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,87 +1377,81 @@ function validate$r(obj, path = 'WrappedList') {
|
|
|
1377
1377
|
return v_error === undefined ? null : v_error;
|
|
1378
1378
|
}
|
|
1379
1379
|
|
|
1380
|
-
function validate$
|
|
1380
|
+
function validate$r(obj, path = 'NullableCustomAttributesMap') {
|
|
1381
1381
|
const v_error = (() => {
|
|
1382
1382
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1383
1383
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1384
1384
|
}
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
const
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
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;
|
|
1397
1398
|
}
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
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;
|
|
1404
1407
|
}
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
const obj_records_union0_error = (() => {
|
|
1410
|
-
const referencepath_recordsValidationError = validate$r(obj_records, path_records);
|
|
1411
|
-
if (referencepath_recordsValidationError !== null) {
|
|
1412
|
-
let message = 'Object doesn\'t match WrappedList (at "' + path_records + '")\n';
|
|
1413
|
-
message += referencepath_recordsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
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');
|
|
1414
1412
|
return new TypeError(message);
|
|
1415
1413
|
}
|
|
1416
|
-
})();
|
|
1417
|
-
if (obj_records_union0_error != null) {
|
|
1418
|
-
obj_records_union0 = obj_records_union0_error.message;
|
|
1419
|
-
}
|
|
1420
|
-
let obj_records_union1 = null;
|
|
1421
|
-
const obj_records_union1_error = (() => {
|
|
1422
|
-
if (obj_records !== null) {
|
|
1423
|
-
return new TypeError('Expected "null" but received "' + typeof obj_records + '" (at "' + path_records + '")');
|
|
1424
|
-
}
|
|
1425
|
-
})();
|
|
1426
|
-
if (obj_records_union1_error != null) {
|
|
1427
|
-
obj_records_union1 = obj_records_union1_error.message;
|
|
1428
1414
|
}
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
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 + '")');
|
|
1434
1423
|
}
|
|
1435
|
-
if (obj.
|
|
1436
|
-
const
|
|
1437
|
-
const
|
|
1438
|
-
|
|
1439
|
-
|
|
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;
|
|
1440
1438
|
}
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
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
1447
|
}
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
return new TypeError('Expected "string" but received "' + typeof obj_sortingOrder + '" (at "' + path_sortingOrder + '")');
|
|
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);
|
|
1454
1453
|
}
|
|
1455
1454
|
}
|
|
1456
|
-
const obj_usecaseName = obj.usecaseName;
|
|
1457
|
-
const path_usecaseName = path + '.usecaseName';
|
|
1458
|
-
if (typeof obj_usecaseName !== 'string') {
|
|
1459
|
-
return new TypeError('Expected "string" but received "' + typeof obj_usecaseName + '" (at "' + path_usecaseName + '")');
|
|
1460
|
-
}
|
|
1461
1455
|
})();
|
|
1462
1456
|
return v_error === undefined ? null : v_error;
|
|
1463
1457
|
}
|
|
@@ -1544,6 +1538,44 @@ function validate$n(obj, path = 'PredictionOutput') {
|
|
|
1544
1538
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1545
1539
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1546
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
|
+
}
|
|
1547
1579
|
if (obj.predictionScore !== undefined) {
|
|
1548
1580
|
const obj_predictionScore = obj.predictionScore;
|
|
1549
1581
|
const path_predictionScore = path + '.predictionScore';
|
|
@@ -1649,7 +1681,7 @@ function validate$k(obj, path = 'PredictionOutputObject') {
|
|
|
1649
1681
|
for (let i = 0; i < obj_errors.length; i++) {
|
|
1650
1682
|
const obj_errors_item = obj_errors[i];
|
|
1651
1683
|
const path_errors_item = path_errors + '[' + i + ']';
|
|
1652
|
-
const referencepath_errors_itemValidationError = validate$
|
|
1684
|
+
const referencepath_errors_itemValidationError = validate$y(obj_errors_item, path_errors_item);
|
|
1653
1685
|
if (referencepath_errors_itemValidationError !== null) {
|
|
1654
1686
|
let message = 'Object doesn\'t match Error (at "' + path_errors_item + '")\n';
|
|
1655
1687
|
message += referencepath_errors_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1659,8 +1691,29 @@ function validate$k(obj, path = 'PredictionOutputObject') {
|
|
|
1659
1691
|
}
|
|
1660
1692
|
const obj_isSuccess = obj.isSuccess;
|
|
1661
1693
|
const path_isSuccess = path + '.isSuccess';
|
|
1662
|
-
|
|
1663
|
-
|
|
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);
|
|
1664
1717
|
}
|
|
1665
1718
|
if (obj.predictionOutput !== undefined) {
|
|
1666
1719
|
const obj_predictionOutput = obj.predictionOutput;
|
|
@@ -1699,19 +1752,12 @@ function validate$k(obj, path = 'PredictionOutputObject') {
|
|
|
1699
1752
|
}
|
|
1700
1753
|
|
|
1701
1754
|
const TTL$1 = 1000;
|
|
1702
|
-
const VERSION$1 = "
|
|
1755
|
+
const VERSION$1 = "c1431b6652fb0e211a1e2149b42f10f4";
|
|
1703
1756
|
function validate$j(obj, path = 'PredictionResponseRepresentation') {
|
|
1704
1757
|
const v_error = (() => {
|
|
1705
1758
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1706
1759
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1707
1760
|
}
|
|
1708
|
-
if (obj.customPredictionLabel !== undefined) {
|
|
1709
|
-
const obj_customPredictionLabel = obj.customPredictionLabel;
|
|
1710
|
-
const path_customPredictionLabel = path + '.customPredictionLabel';
|
|
1711
|
-
if (typeof obj_customPredictionLabel !== 'string') {
|
|
1712
|
-
return new TypeError('Expected "string" but received "' + typeof obj_customPredictionLabel + '" (at "' + path_customPredictionLabel + '")');
|
|
1713
|
-
}
|
|
1714
|
-
}
|
|
1715
1761
|
if (obj.predictionModel !== undefined) {
|
|
1716
1762
|
const obj_predictionModel = obj.predictionModel;
|
|
1717
1763
|
const path_predictionModel = path + '.predictionModel';
|
|
@@ -1752,7 +1798,7 @@ function validate$j(obj, path = 'PredictionResponseRepresentation') {
|
|
|
1752
1798
|
}
|
|
1753
1799
|
const obj_status = obj.status;
|
|
1754
1800
|
const path_status = path + '.status';
|
|
1755
|
-
const referencepath_statusValidationError = validate$
|
|
1801
|
+
const referencepath_statusValidationError = validate$u(obj_status, path_status);
|
|
1756
1802
|
if (referencepath_statusValidationError !== null) {
|
|
1757
1803
|
let message = 'Object doesn\'t match Status (at "' + path_status + '")\n';
|
|
1758
1804
|
message += referencepath_statusValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1854,16 +1900,27 @@ function createResourceRequest$1(config) {
|
|
|
1854
1900
|
|
|
1855
1901
|
const adapterName$1 = 'getPredictions';
|
|
1856
1902
|
const getPredictions_ConfigPropertyMetadata = [
|
|
1857
|
-
generateParamConfigMetadata('
|
|
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 */),
|
|
1858
1911
|
];
|
|
1859
1912
|
const getPredictions_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getPredictions_ConfigPropertyMetadata);
|
|
1860
1913
|
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$3(getPredictions_ConfigPropertyMetadata);
|
|
1861
1914
|
function typeCheckConfig$1(untrustedConfig) {
|
|
1862
1915
|
const config = {};
|
|
1863
|
-
|
|
1864
|
-
const
|
|
1865
|
-
|
|
1866
|
-
|
|
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;
|
|
1867
1924
|
}
|
|
1868
1925
|
return config;
|
|
1869
1926
|
}
|
|
@@ -2324,7 +2381,7 @@ function validate$8(obj, path = 'PredictionInputRepresentation') {
|
|
|
2324
2381
|
const path_columnNames = path + '.columnNames';
|
|
2325
2382
|
let obj_columnNames_union0 = null;
|
|
2326
2383
|
const obj_columnNames_union0_error = (() => {
|
|
2327
|
-
const referencepath_columnNamesValidationError = validate$
|
|
2384
|
+
const referencepath_columnNamesValidationError = validate$s(obj_columnNames, path_columnNames);
|
|
2328
2385
|
if (referencepath_columnNamesValidationError !== null) {
|
|
2329
2386
|
let message = 'Object doesn\'t match WrappedList (at "' + path_columnNames + '")\n';
|
|
2330
2387
|
message += referencepath_columnNamesValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2779,7 +2836,7 @@ function validate$8(obj, path = 'PredictionInputRepresentation') {
|
|
|
2779
2836
|
const path_records = path + '.records';
|
|
2780
2837
|
let obj_records_union0 = null;
|
|
2781
2838
|
const obj_records_union0_error = (() => {
|
|
2782
|
-
const referencepath_recordsValidationError = validate$
|
|
2839
|
+
const referencepath_recordsValidationError = validate$s(obj_records, path_records);
|
|
2783
2840
|
if (referencepath_recordsValidationError !== null) {
|
|
2784
2841
|
let message = 'Object doesn\'t match WrappedList (at "' + path_records + '")\n';
|
|
2785
2842
|
message += referencepath_recordsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -4034,7 +4091,7 @@ function validate(obj, path = 'PredictionOutputRepresentation') {
|
|
|
4034
4091
|
}
|
|
4035
4092
|
const obj_status = obj.status;
|
|
4036
4093
|
const path_status = path + '.status';
|
|
4037
|
-
const referencepath_statusValidationError = validate$
|
|
4094
|
+
const referencepath_statusValidationError = validate$u(obj_status, path_status);
|
|
4038
4095
|
if (referencepath_statusValidationError !== null) {
|
|
4039
4096
|
let message = 'Object doesn\'t match Status (at "' + path_status + '")\n';
|
|
4040
4097
|
message += referencepath_statusValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -4209,4 +4266,4 @@ withDefaultLuvio((luvio) => {
|
|
|
4209
4266
|
});
|
|
4210
4267
|
|
|
4211
4268
|
export { fetchRecommendations, getPredictions, predictions };
|
|
4212
|
-
// version: 1.
|
|
4269
|
+
// version: 1.309.0-dev8-411e383cef
|
package/src/raml/api.raml
CHANGED
|
@@ -124,6 +124,20 @@ types:
|
|
|
124
124
|
description: insightsSettings
|
|
125
125
|
type: NullableInsightsSettingsMap | nil
|
|
126
126
|
required: false
|
|
127
|
+
NullableCustomAttributesMap:
|
|
128
|
+
description: Wrapper for Nullable Map Object.
|
|
129
|
+
type: object
|
|
130
|
+
properties:
|
|
131
|
+
//:
|
|
132
|
+
type: string | nil
|
|
133
|
+
CustomAttributesMap:
|
|
134
|
+
description: CustomAttributesMap wrapper object for use in PredictionInputRepresentation.
|
|
135
|
+
type: object
|
|
136
|
+
properties:
|
|
137
|
+
customAttributes:
|
|
138
|
+
description: customAttributes
|
|
139
|
+
type: NullableCustomAttributesMap | nil
|
|
140
|
+
required: false
|
|
127
141
|
ModelFeature:
|
|
128
142
|
description: .
|
|
129
143
|
type: object
|
|
@@ -316,6 +330,14 @@ types:
|
|
|
316
330
|
description: Predicted object representation for prediction.
|
|
317
331
|
type: object
|
|
318
332
|
properties:
|
|
333
|
+
customAttributes:
|
|
334
|
+
description: .
|
|
335
|
+
type: CustomAttributesMap | nil
|
|
336
|
+
required: false # TODO Hand-rolled W-9314597
|
|
337
|
+
customPredictionLabel:
|
|
338
|
+
description: .
|
|
339
|
+
type: string
|
|
340
|
+
required: false # TODO Hand-rolled W-9314597
|
|
319
341
|
predictionScore:
|
|
320
342
|
description: .
|
|
321
343
|
format: float
|
|
@@ -339,7 +361,7 @@ types:
|
|
|
339
361
|
required: false # TODO Hand-rolled W-16235747
|
|
340
362
|
isSuccess:
|
|
341
363
|
description: .
|
|
342
|
-
type:
|
|
364
|
+
type: boolean | nil
|
|
343
365
|
required: true # TODO Hand-rolled W-16235747
|
|
344
366
|
predictionOutput:
|
|
345
367
|
description: .
|
|
@@ -464,14 +486,14 @@ types:
|
|
|
464
486
|
predictionModel:
|
|
465
487
|
description: .
|
|
466
488
|
type: string
|
|
467
|
-
required:
|
|
489
|
+
required: true # TODO Hand-rolled W-16235747
|
|
468
490
|
predictionPlatform:
|
|
469
491
|
description: .
|
|
470
492
|
type: string
|
|
471
493
|
required: false # TODO Hand-rolled W-16235747
|
|
472
494
|
records:
|
|
473
495
|
type: WrappedList | nil
|
|
474
|
-
required:
|
|
496
|
+
required: false # TODO Hand-rolled W-9314597
|
|
475
497
|
scoreFilterCriteria:
|
|
476
498
|
description: .
|
|
477
499
|
type: string
|
|
@@ -526,10 +548,6 @@ types:
|
|
|
526
548
|
description: .
|
|
527
549
|
type: string
|
|
528
550
|
required: true # TODO Hand-rolled W-9314597
|
|
529
|
-
customPredictionLabel:
|
|
530
|
-
description: .
|
|
531
|
-
type: string
|
|
532
|
-
required: false # TODO Hand-rolled W-9314597
|
|
533
551
|
# TODO Hand-rolled W-16235747
|
|
534
552
|
PredictionRequestWrapperRepresentation:
|
|
535
553
|
description: Wrapper for PredictionRequestRepresentation.
|
|
@@ -915,5 +933,5 @@ types:
|
|
|
915
933
|
body:
|
|
916
934
|
application/json:
|
|
917
935
|
# TODO Hand-rolled W-10128739. Original type: PredictionRequestRepresentation
|
|
918
|
-
type:
|
|
936
|
+
type: PredictionRequestRepresentation
|
|
919
937
|
(oas-body-name): predictionRequest
|