@salesforce/lds-adapters-industries-einstein-aiaccelerator 1.308.0 → 1.309.0-dev9
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 +705 -202
- 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/FieldCount.d.ts +5 -5
- package/dist/es/es2018/types/src/generated/types/NullableCustomAttributesMap.d.ts +27 -0
- package/dist/es/es2018/types/src/generated/types/PredictionOutput.d.ts +10 -3
- package/dist/es/es2018/types/src/generated/types/PredictionOutputObject.d.ts +12 -11
- package/dist/es/es2018/types/src/generated/types/PredictionRequestRepresentation.d.ts +13 -13
- package/dist/es/es2018/types/src/generated/types/PredictionResponseRepresentation.d.ts +11 -14
- package/dist/es/es2018/types/src/generated/types/PredictionWarning.d.ts +5 -5
- package/dist/es/es2018/types/src/generated/types/Predictor.d.ts +3 -3
- package/dist/es/es2018/types/src/generated/types/PredictorField.d.ts +11 -11
- package/package.json +6 -5
- package/sfdc/index.js +664 -161
- package/src/raml/api.raml +50 -32
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
|
-
|
|
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;
|
|
1390
1398
|
}
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
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;
|
|
1397
1407
|
}
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
if (typeof obj_predictionPlatform !== 'string') {
|
|
1403
|
-
return new TypeError('Expected "string" but received "' + typeof obj_predictionPlatform + '" (at "' + path_predictionPlatform + '")');
|
|
1404
|
-
}
|
|
1405
|
-
}
|
|
1406
|
-
const obj_records = obj.records;
|
|
1407
|
-
const path_records = path + '.records';
|
|
1408
|
-
let obj_records_union0 = null;
|
|
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
1414
|
}
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
if (
|
|
1427
|
-
|
|
1428
|
-
}
|
|
1429
|
-
if (obj_records_union0 && obj_records_union1) {
|
|
1430
|
-
let message = 'Object doesn\'t match union (at "' + path_records + '")';
|
|
1431
|
-
message += '\n' + obj_records_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1432
|
-
message += '\n' + obj_records_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1433
|
-
return new TypeError(message);
|
|
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
|
}
|
|
@@ -1470,36 +1464,141 @@ function validate$p(obj, path = 'PredictorField') {
|
|
|
1470
1464
|
if (obj.customText !== undefined) {
|
|
1471
1465
|
const obj_customText = obj.customText;
|
|
1472
1466
|
const path_customText = path + '.customText';
|
|
1473
|
-
|
|
1474
|
-
|
|
1467
|
+
let obj_customText_union0 = null;
|
|
1468
|
+
const obj_customText_union0_error = (() => {
|
|
1469
|
+
if (typeof obj_customText !== 'string') {
|
|
1470
|
+
return new TypeError('Expected "string" but received "' + typeof obj_customText + '" (at "' + path_customText + '")');
|
|
1471
|
+
}
|
|
1472
|
+
})();
|
|
1473
|
+
if (obj_customText_union0_error != null) {
|
|
1474
|
+
obj_customText_union0 = obj_customText_union0_error.message;
|
|
1475
|
+
}
|
|
1476
|
+
let obj_customText_union1 = null;
|
|
1477
|
+
const obj_customText_union1_error = (() => {
|
|
1478
|
+
if (obj_customText !== null) {
|
|
1479
|
+
return new TypeError('Expected "null" but received "' + typeof obj_customText + '" (at "' + path_customText + '")');
|
|
1480
|
+
}
|
|
1481
|
+
})();
|
|
1482
|
+
if (obj_customText_union1_error != null) {
|
|
1483
|
+
obj_customText_union1 = obj_customText_union1_error.message;
|
|
1484
|
+
}
|
|
1485
|
+
if (obj_customText_union0 && obj_customText_union1) {
|
|
1486
|
+
let message = 'Object doesn\'t match union (at "' + path_customText + '")';
|
|
1487
|
+
message += '\n' + obj_customText_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1488
|
+
message += '\n' + obj_customText_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1489
|
+
return new TypeError(message);
|
|
1475
1490
|
}
|
|
1476
1491
|
}
|
|
1477
1492
|
if (obj.label !== undefined) {
|
|
1478
1493
|
const obj_label = obj.label;
|
|
1479
1494
|
const path_label = path + '.label';
|
|
1480
|
-
|
|
1481
|
-
|
|
1495
|
+
let obj_label_union0 = null;
|
|
1496
|
+
const obj_label_union0_error = (() => {
|
|
1497
|
+
if (typeof obj_label !== 'string') {
|
|
1498
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
1499
|
+
}
|
|
1500
|
+
})();
|
|
1501
|
+
if (obj_label_union0_error != null) {
|
|
1502
|
+
obj_label_union0 = obj_label_union0_error.message;
|
|
1503
|
+
}
|
|
1504
|
+
let obj_label_union1 = null;
|
|
1505
|
+
const obj_label_union1_error = (() => {
|
|
1506
|
+
if (obj_label !== null) {
|
|
1507
|
+
return new TypeError('Expected "null" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
1508
|
+
}
|
|
1509
|
+
})();
|
|
1510
|
+
if (obj_label_union1_error != null) {
|
|
1511
|
+
obj_label_union1 = obj_label_union1_error.message;
|
|
1512
|
+
}
|
|
1513
|
+
if (obj_label_union0 && obj_label_union1) {
|
|
1514
|
+
let message = 'Object doesn\'t match union (at "' + path_label + '")';
|
|
1515
|
+
message += '\n' + obj_label_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1516
|
+
message += '\n' + obj_label_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1517
|
+
return new TypeError(message);
|
|
1482
1518
|
}
|
|
1483
1519
|
}
|
|
1484
1520
|
if (obj.name !== undefined) {
|
|
1485
1521
|
const obj_name = obj.name;
|
|
1486
1522
|
const path_name = path + '.name';
|
|
1487
|
-
|
|
1488
|
-
|
|
1523
|
+
let obj_name_union0 = null;
|
|
1524
|
+
const obj_name_union0_error = (() => {
|
|
1525
|
+
if (typeof obj_name !== 'string') {
|
|
1526
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
1527
|
+
}
|
|
1528
|
+
})();
|
|
1529
|
+
if (obj_name_union0_error != null) {
|
|
1530
|
+
obj_name_union0 = obj_name_union0_error.message;
|
|
1531
|
+
}
|
|
1532
|
+
let obj_name_union1 = null;
|
|
1533
|
+
const obj_name_union1_error = (() => {
|
|
1534
|
+
if (obj_name !== null) {
|
|
1535
|
+
return new TypeError('Expected "null" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
1536
|
+
}
|
|
1537
|
+
})();
|
|
1538
|
+
if (obj_name_union1_error != null) {
|
|
1539
|
+
obj_name_union1 = obj_name_union1_error.message;
|
|
1540
|
+
}
|
|
1541
|
+
if (obj_name_union0 && obj_name_union1) {
|
|
1542
|
+
let message = 'Object doesn\'t match union (at "' + path_name + '")';
|
|
1543
|
+
message += '\n' + obj_name_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1544
|
+
message += '\n' + obj_name_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1545
|
+
return new TypeError(message);
|
|
1489
1546
|
}
|
|
1490
1547
|
}
|
|
1491
1548
|
if (obj.prescribedValue !== undefined) {
|
|
1492
1549
|
const obj_prescribedValue = obj.prescribedValue;
|
|
1493
1550
|
const path_prescribedValue = path + '.prescribedValue';
|
|
1494
|
-
|
|
1495
|
-
|
|
1551
|
+
let obj_prescribedValue_union0 = null;
|
|
1552
|
+
const obj_prescribedValue_union0_error = (() => {
|
|
1553
|
+
if (typeof obj_prescribedValue !== 'string') {
|
|
1554
|
+
return new TypeError('Expected "string" but received "' + typeof obj_prescribedValue + '" (at "' + path_prescribedValue + '")');
|
|
1555
|
+
}
|
|
1556
|
+
})();
|
|
1557
|
+
if (obj_prescribedValue_union0_error != null) {
|
|
1558
|
+
obj_prescribedValue_union0 = obj_prescribedValue_union0_error.message;
|
|
1559
|
+
}
|
|
1560
|
+
let obj_prescribedValue_union1 = null;
|
|
1561
|
+
const obj_prescribedValue_union1_error = (() => {
|
|
1562
|
+
if (obj_prescribedValue !== null) {
|
|
1563
|
+
return new TypeError('Expected "null" but received "' + typeof obj_prescribedValue + '" (at "' + path_prescribedValue + '")');
|
|
1564
|
+
}
|
|
1565
|
+
})();
|
|
1566
|
+
if (obj_prescribedValue_union1_error != null) {
|
|
1567
|
+
obj_prescribedValue_union1 = obj_prescribedValue_union1_error.message;
|
|
1568
|
+
}
|
|
1569
|
+
if (obj_prescribedValue_union0 && obj_prescribedValue_union1) {
|
|
1570
|
+
let message = 'Object doesn\'t match union (at "' + path_prescribedValue + '")';
|
|
1571
|
+
message += '\n' + obj_prescribedValue_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1572
|
+
message += '\n' + obj_prescribedValue_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1573
|
+
return new TypeError(message);
|
|
1496
1574
|
}
|
|
1497
1575
|
}
|
|
1498
1576
|
if (obj.value !== undefined) {
|
|
1499
1577
|
const obj_value = obj.value;
|
|
1500
1578
|
const path_value = path + '.value';
|
|
1501
|
-
|
|
1502
|
-
|
|
1579
|
+
let obj_value_union0 = null;
|
|
1580
|
+
const obj_value_union0_error = (() => {
|
|
1581
|
+
if (typeof obj_value !== 'string') {
|
|
1582
|
+
return new TypeError('Expected "string" but received "' + typeof obj_value + '" (at "' + path_value + '")');
|
|
1583
|
+
}
|
|
1584
|
+
})();
|
|
1585
|
+
if (obj_value_union0_error != null) {
|
|
1586
|
+
obj_value_union0 = obj_value_union0_error.message;
|
|
1587
|
+
}
|
|
1588
|
+
let obj_value_union1 = null;
|
|
1589
|
+
const obj_value_union1_error = (() => {
|
|
1590
|
+
if (obj_value !== null) {
|
|
1591
|
+
return new TypeError('Expected "null" but received "' + typeof obj_value + '" (at "' + path_value + '")');
|
|
1592
|
+
}
|
|
1593
|
+
})();
|
|
1594
|
+
if (obj_value_union1_error != null) {
|
|
1595
|
+
obj_value_union1 = obj_value_union1_error.message;
|
|
1596
|
+
}
|
|
1597
|
+
if (obj_value_union0 && obj_value_union1) {
|
|
1598
|
+
let message = 'Object doesn\'t match union (at "' + path_value + '")';
|
|
1599
|
+
message += '\n' + obj_value_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1600
|
+
message += '\n' + obj_value_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1601
|
+
return new TypeError(message);
|
|
1503
1602
|
}
|
|
1504
1603
|
}
|
|
1505
1604
|
})();
|
|
@@ -1527,10 +1626,31 @@ function validate$o(obj, path = 'Predictor') {
|
|
|
1527
1626
|
for (let i = 0; i < obj_predictorFields.length; i++) {
|
|
1528
1627
|
const obj_predictorFields_item = obj_predictorFields[i];
|
|
1529
1628
|
const path_predictorFields_item = path_predictorFields + '[' + i + ']';
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1629
|
+
let obj_predictorFields_item_union0 = null;
|
|
1630
|
+
const obj_predictorFields_item_union0_error = (() => {
|
|
1631
|
+
const referencepath_predictorFields_itemValidationError = validate$p(obj_predictorFields_item, path_predictorFields_item);
|
|
1632
|
+
if (referencepath_predictorFields_itemValidationError !== null) {
|
|
1633
|
+
let message = 'Object doesn\'t match PredictorField (at "' + path_predictorFields_item + '")\n';
|
|
1634
|
+
message += referencepath_predictorFields_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1635
|
+
return new TypeError(message);
|
|
1636
|
+
}
|
|
1637
|
+
})();
|
|
1638
|
+
if (obj_predictorFields_item_union0_error != null) {
|
|
1639
|
+
obj_predictorFields_item_union0 = obj_predictorFields_item_union0_error.message;
|
|
1640
|
+
}
|
|
1641
|
+
let obj_predictorFields_item_union1 = null;
|
|
1642
|
+
const obj_predictorFields_item_union1_error = (() => {
|
|
1643
|
+
if (obj_predictorFields_item !== null) {
|
|
1644
|
+
return new TypeError('Expected "null" but received "' + typeof obj_predictorFields_item + '" (at "' + path_predictorFields_item + '")');
|
|
1645
|
+
}
|
|
1646
|
+
})();
|
|
1647
|
+
if (obj_predictorFields_item_union1_error != null) {
|
|
1648
|
+
obj_predictorFields_item_union1 = obj_predictorFields_item_union1_error.message;
|
|
1649
|
+
}
|
|
1650
|
+
if (obj_predictorFields_item_union0 && obj_predictorFields_item_union1) {
|
|
1651
|
+
let message = 'Object doesn\'t match union (at "' + path_predictorFields_item + '")';
|
|
1652
|
+
message += '\n' + obj_predictorFields_item_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1653
|
+
message += '\n' + obj_predictorFields_item_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1534
1654
|
return new TypeError(message);
|
|
1535
1655
|
}
|
|
1536
1656
|
}
|
|
@@ -1544,6 +1664,65 @@ function validate$n(obj, path = 'PredictionOutput') {
|
|
|
1544
1664
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1545
1665
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1546
1666
|
}
|
|
1667
|
+
if (obj.customAttributes !== undefined) {
|
|
1668
|
+
const obj_customAttributes = obj.customAttributes;
|
|
1669
|
+
const path_customAttributes = path + '.customAttributes';
|
|
1670
|
+
let obj_customAttributes_union0 = null;
|
|
1671
|
+
const obj_customAttributes_union0_error = (() => {
|
|
1672
|
+
const referencepath_customAttributesValidationError = validate$q(obj_customAttributes, path_customAttributes);
|
|
1673
|
+
if (referencepath_customAttributesValidationError !== null) {
|
|
1674
|
+
let message = 'Object doesn\'t match CustomAttributesMap (at "' + path_customAttributes + '")\n';
|
|
1675
|
+
message += referencepath_customAttributesValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1676
|
+
return new TypeError(message);
|
|
1677
|
+
}
|
|
1678
|
+
})();
|
|
1679
|
+
if (obj_customAttributes_union0_error != null) {
|
|
1680
|
+
obj_customAttributes_union0 = obj_customAttributes_union0_error.message;
|
|
1681
|
+
}
|
|
1682
|
+
let obj_customAttributes_union1 = null;
|
|
1683
|
+
const obj_customAttributes_union1_error = (() => {
|
|
1684
|
+
if (obj_customAttributes !== null) {
|
|
1685
|
+
return new TypeError('Expected "null" but received "' + typeof obj_customAttributes + '" (at "' + path_customAttributes + '")');
|
|
1686
|
+
}
|
|
1687
|
+
})();
|
|
1688
|
+
if (obj_customAttributes_union1_error != null) {
|
|
1689
|
+
obj_customAttributes_union1 = obj_customAttributes_union1_error.message;
|
|
1690
|
+
}
|
|
1691
|
+
if (obj_customAttributes_union0 && obj_customAttributes_union1) {
|
|
1692
|
+
let message = 'Object doesn\'t match union (at "' + path_customAttributes + '")';
|
|
1693
|
+
message += '\n' + obj_customAttributes_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1694
|
+
message += '\n' + obj_customAttributes_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1695
|
+
return new TypeError(message);
|
|
1696
|
+
}
|
|
1697
|
+
}
|
|
1698
|
+
if (obj.customPredictionLabel !== undefined) {
|
|
1699
|
+
const obj_customPredictionLabel = obj.customPredictionLabel;
|
|
1700
|
+
const path_customPredictionLabel = path + '.customPredictionLabel';
|
|
1701
|
+
let obj_customPredictionLabel_union0 = null;
|
|
1702
|
+
const obj_customPredictionLabel_union0_error = (() => {
|
|
1703
|
+
if (typeof obj_customPredictionLabel !== 'string') {
|
|
1704
|
+
return new TypeError('Expected "string" but received "' + typeof obj_customPredictionLabel + '" (at "' + path_customPredictionLabel + '")');
|
|
1705
|
+
}
|
|
1706
|
+
})();
|
|
1707
|
+
if (obj_customPredictionLabel_union0_error != null) {
|
|
1708
|
+
obj_customPredictionLabel_union0 = obj_customPredictionLabel_union0_error.message;
|
|
1709
|
+
}
|
|
1710
|
+
let obj_customPredictionLabel_union1 = null;
|
|
1711
|
+
const obj_customPredictionLabel_union1_error = (() => {
|
|
1712
|
+
if (obj_customPredictionLabel !== null) {
|
|
1713
|
+
return new TypeError('Expected "null" but received "' + typeof obj_customPredictionLabel + '" (at "' + path_customPredictionLabel + '")');
|
|
1714
|
+
}
|
|
1715
|
+
})();
|
|
1716
|
+
if (obj_customPredictionLabel_union1_error != null) {
|
|
1717
|
+
obj_customPredictionLabel_union1 = obj_customPredictionLabel_union1_error.message;
|
|
1718
|
+
}
|
|
1719
|
+
if (obj_customPredictionLabel_union0 && obj_customPredictionLabel_union1) {
|
|
1720
|
+
let message = 'Object doesn\'t match union (at "' + path_customPredictionLabel + '")';
|
|
1721
|
+
message += '\n' + obj_customPredictionLabel_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1722
|
+
message += '\n' + obj_customPredictionLabel_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1723
|
+
return new TypeError(message);
|
|
1724
|
+
}
|
|
1725
|
+
}
|
|
1547
1726
|
if (obj.predictionScore !== undefined) {
|
|
1548
1727
|
const obj_predictionScore = obj.predictionScore;
|
|
1549
1728
|
const path_predictionScore = path + '.predictionScore';
|
|
@@ -1560,10 +1739,31 @@ function validate$n(obj, path = 'PredictionOutput') {
|
|
|
1560
1739
|
for (let i = 0; i < obj_topPredictors.length; i++) {
|
|
1561
1740
|
const obj_topPredictors_item = obj_topPredictors[i];
|
|
1562
1741
|
const path_topPredictors_item = path_topPredictors + '[' + i + ']';
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1742
|
+
let obj_topPredictors_item_union0 = null;
|
|
1743
|
+
const obj_topPredictors_item_union0_error = (() => {
|
|
1744
|
+
const referencepath_topPredictors_itemValidationError = validate$o(obj_topPredictors_item, path_topPredictors_item);
|
|
1745
|
+
if (referencepath_topPredictors_itemValidationError !== null) {
|
|
1746
|
+
let message = 'Object doesn\'t match Predictor (at "' + path_topPredictors_item + '")\n';
|
|
1747
|
+
message += referencepath_topPredictors_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1748
|
+
return new TypeError(message);
|
|
1749
|
+
}
|
|
1750
|
+
})();
|
|
1751
|
+
if (obj_topPredictors_item_union0_error != null) {
|
|
1752
|
+
obj_topPredictors_item_union0 = obj_topPredictors_item_union0_error.message;
|
|
1753
|
+
}
|
|
1754
|
+
let obj_topPredictors_item_union1 = null;
|
|
1755
|
+
const obj_topPredictors_item_union1_error = (() => {
|
|
1756
|
+
if (obj_topPredictors_item !== null) {
|
|
1757
|
+
return new TypeError('Expected "null" but received "' + typeof obj_topPredictors_item + '" (at "' + path_topPredictors_item + '")');
|
|
1758
|
+
}
|
|
1759
|
+
})();
|
|
1760
|
+
if (obj_topPredictors_item_union1_error != null) {
|
|
1761
|
+
obj_topPredictors_item_union1 = obj_topPredictors_item_union1_error.message;
|
|
1762
|
+
}
|
|
1763
|
+
if (obj_topPredictors_item_union0 && obj_topPredictors_item_union1) {
|
|
1764
|
+
let message = 'Object doesn\'t match union (at "' + path_topPredictors_item + '")';
|
|
1765
|
+
message += '\n' + obj_topPredictors_item_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1766
|
+
message += '\n' + obj_topPredictors_item_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1567
1767
|
return new TypeError(message);
|
|
1568
1768
|
}
|
|
1569
1769
|
}
|
|
@@ -1580,15 +1780,57 @@ function validate$m(obj, path = 'FieldCount') {
|
|
|
1580
1780
|
if (obj.count !== undefined) {
|
|
1581
1781
|
const obj_count = obj.count;
|
|
1582
1782
|
const path_count = path + '.count';
|
|
1583
|
-
|
|
1584
|
-
|
|
1783
|
+
let obj_count_union0 = null;
|
|
1784
|
+
const obj_count_union0_error = (() => {
|
|
1785
|
+
if (typeof obj_count !== 'number' || (typeof obj_count === 'number' && Math.floor(obj_count) !== obj_count)) {
|
|
1786
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_count + '" (at "' + path_count + '")');
|
|
1787
|
+
}
|
|
1788
|
+
})();
|
|
1789
|
+
if (obj_count_union0_error != null) {
|
|
1790
|
+
obj_count_union0 = obj_count_union0_error.message;
|
|
1791
|
+
}
|
|
1792
|
+
let obj_count_union1 = null;
|
|
1793
|
+
const obj_count_union1_error = (() => {
|
|
1794
|
+
if (obj_count !== null) {
|
|
1795
|
+
return new TypeError('Expected "null" but received "' + typeof obj_count + '" (at "' + path_count + '")');
|
|
1796
|
+
}
|
|
1797
|
+
})();
|
|
1798
|
+
if (obj_count_union1_error != null) {
|
|
1799
|
+
obj_count_union1 = obj_count_union1_error.message;
|
|
1800
|
+
}
|
|
1801
|
+
if (obj_count_union0 && obj_count_union1) {
|
|
1802
|
+
let message = 'Object doesn\'t match union (at "' + path_count + '")';
|
|
1803
|
+
message += '\n' + obj_count_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1804
|
+
message += '\n' + obj_count_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1805
|
+
return new TypeError(message);
|
|
1585
1806
|
}
|
|
1586
1807
|
}
|
|
1587
1808
|
if (obj.fieldValue !== undefined) {
|
|
1588
1809
|
const obj_fieldValue = obj.fieldValue;
|
|
1589
1810
|
const path_fieldValue = path + '.fieldValue';
|
|
1590
|
-
|
|
1591
|
-
|
|
1811
|
+
let obj_fieldValue_union0 = null;
|
|
1812
|
+
const obj_fieldValue_union0_error = (() => {
|
|
1813
|
+
if (typeof obj_fieldValue !== 'string') {
|
|
1814
|
+
return new TypeError('Expected "string" but received "' + typeof obj_fieldValue + '" (at "' + path_fieldValue + '")');
|
|
1815
|
+
}
|
|
1816
|
+
})();
|
|
1817
|
+
if (obj_fieldValue_union0_error != null) {
|
|
1818
|
+
obj_fieldValue_union0 = obj_fieldValue_union0_error.message;
|
|
1819
|
+
}
|
|
1820
|
+
let obj_fieldValue_union1 = null;
|
|
1821
|
+
const obj_fieldValue_union1_error = (() => {
|
|
1822
|
+
if (obj_fieldValue !== null) {
|
|
1823
|
+
return new TypeError('Expected "null" but received "' + typeof obj_fieldValue + '" (at "' + path_fieldValue + '")');
|
|
1824
|
+
}
|
|
1825
|
+
})();
|
|
1826
|
+
if (obj_fieldValue_union1_error != null) {
|
|
1827
|
+
obj_fieldValue_union1 = obj_fieldValue_union1_error.message;
|
|
1828
|
+
}
|
|
1829
|
+
if (obj_fieldValue_union0 && obj_fieldValue_union1) {
|
|
1830
|
+
let message = 'Object doesn\'t match union (at "' + path_fieldValue + '")';
|
|
1831
|
+
message += '\n' + obj_fieldValue_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1832
|
+
message += '\n' + obj_fieldValue_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1833
|
+
return new TypeError(message);
|
|
1592
1834
|
}
|
|
1593
1835
|
}
|
|
1594
1836
|
})();
|
|
@@ -1609,8 +1851,29 @@ function validate$l(obj, path = 'PredictionWarning') {
|
|
|
1609
1851
|
for (let i = 0; i < obj_missingFieldNames.length; i++) {
|
|
1610
1852
|
const obj_missingFieldNames_item = obj_missingFieldNames[i];
|
|
1611
1853
|
const path_missingFieldNames_item = path_missingFieldNames + '[' + i + ']';
|
|
1612
|
-
|
|
1613
|
-
|
|
1854
|
+
let obj_missingFieldNames_item_union0 = null;
|
|
1855
|
+
const obj_missingFieldNames_item_union0_error = (() => {
|
|
1856
|
+
if (typeof obj_missingFieldNames_item !== 'string') {
|
|
1857
|
+
return new TypeError('Expected "string" but received "' + typeof obj_missingFieldNames_item + '" (at "' + path_missingFieldNames_item + '")');
|
|
1858
|
+
}
|
|
1859
|
+
})();
|
|
1860
|
+
if (obj_missingFieldNames_item_union0_error != null) {
|
|
1861
|
+
obj_missingFieldNames_item_union0 = obj_missingFieldNames_item_union0_error.message;
|
|
1862
|
+
}
|
|
1863
|
+
let obj_missingFieldNames_item_union1 = null;
|
|
1864
|
+
const obj_missingFieldNames_item_union1_error = (() => {
|
|
1865
|
+
if (obj_missingFieldNames_item !== null) {
|
|
1866
|
+
return new TypeError('Expected "null" but received "' + typeof obj_missingFieldNames_item + '" (at "' + path_missingFieldNames_item + '")');
|
|
1867
|
+
}
|
|
1868
|
+
})();
|
|
1869
|
+
if (obj_missingFieldNames_item_union1_error != null) {
|
|
1870
|
+
obj_missingFieldNames_item_union1 = obj_missingFieldNames_item_union1_error.message;
|
|
1871
|
+
}
|
|
1872
|
+
if (obj_missingFieldNames_item_union0 && obj_missingFieldNames_item_union1) {
|
|
1873
|
+
let message = 'Object doesn\'t match union (at "' + path_missingFieldNames_item + '")';
|
|
1874
|
+
message += '\n' + obj_missingFieldNames_item_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1875
|
+
message += '\n' + obj_missingFieldNames_item_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1876
|
+
return new TypeError(message);
|
|
1614
1877
|
}
|
|
1615
1878
|
}
|
|
1616
1879
|
}
|
|
@@ -1623,10 +1886,31 @@ function validate$l(obj, path = 'PredictionWarning') {
|
|
|
1623
1886
|
for (let i = 0; i < obj_outOfBoundFields.length; i++) {
|
|
1624
1887
|
const obj_outOfBoundFields_item = obj_outOfBoundFields[i];
|
|
1625
1888
|
const path_outOfBoundFields_item = path_outOfBoundFields + '[' + i + ']';
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1889
|
+
let obj_outOfBoundFields_item_union0 = null;
|
|
1890
|
+
const obj_outOfBoundFields_item_union0_error = (() => {
|
|
1891
|
+
const referencepath_outOfBoundFields_itemValidationError = validate$m(obj_outOfBoundFields_item, path_outOfBoundFields_item);
|
|
1892
|
+
if (referencepath_outOfBoundFields_itemValidationError !== null) {
|
|
1893
|
+
let message = 'Object doesn\'t match FieldCount (at "' + path_outOfBoundFields_item + '")\n';
|
|
1894
|
+
message += referencepath_outOfBoundFields_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1895
|
+
return new TypeError(message);
|
|
1896
|
+
}
|
|
1897
|
+
})();
|
|
1898
|
+
if (obj_outOfBoundFields_item_union0_error != null) {
|
|
1899
|
+
obj_outOfBoundFields_item_union0 = obj_outOfBoundFields_item_union0_error.message;
|
|
1900
|
+
}
|
|
1901
|
+
let obj_outOfBoundFields_item_union1 = null;
|
|
1902
|
+
const obj_outOfBoundFields_item_union1_error = (() => {
|
|
1903
|
+
if (obj_outOfBoundFields_item !== null) {
|
|
1904
|
+
return new TypeError('Expected "null" but received "' + typeof obj_outOfBoundFields_item + '" (at "' + path_outOfBoundFields_item + '")');
|
|
1905
|
+
}
|
|
1906
|
+
})();
|
|
1907
|
+
if (obj_outOfBoundFields_item_union1_error != null) {
|
|
1908
|
+
obj_outOfBoundFields_item_union1 = obj_outOfBoundFields_item_union1_error.message;
|
|
1909
|
+
}
|
|
1910
|
+
if (obj_outOfBoundFields_item_union0 && obj_outOfBoundFields_item_union1) {
|
|
1911
|
+
let message = 'Object doesn\'t match union (at "' + path_outOfBoundFields_item + '")';
|
|
1912
|
+
message += '\n' + obj_outOfBoundFields_item_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1913
|
+
message += '\n' + obj_outOfBoundFields_item_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1630
1914
|
return new TypeError(message);
|
|
1631
1915
|
}
|
|
1632
1916
|
}
|
|
@@ -1649,18 +1933,60 @@ function validate$k(obj, path = 'PredictionOutputObject') {
|
|
|
1649
1933
|
for (let i = 0; i < obj_errors.length; i++) {
|
|
1650
1934
|
const obj_errors_item = obj_errors[i];
|
|
1651
1935
|
const path_errors_item = path_errors + '[' + i + ']';
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1936
|
+
let obj_errors_item_union0 = null;
|
|
1937
|
+
const obj_errors_item_union0_error = (() => {
|
|
1938
|
+
const referencepath_errors_itemValidationError = validate$y(obj_errors_item, path_errors_item);
|
|
1939
|
+
if (referencepath_errors_itemValidationError !== null) {
|
|
1940
|
+
let message = 'Object doesn\'t match Error (at "' + path_errors_item + '")\n';
|
|
1941
|
+
message += referencepath_errors_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1942
|
+
return new TypeError(message);
|
|
1943
|
+
}
|
|
1944
|
+
})();
|
|
1945
|
+
if (obj_errors_item_union0_error != null) {
|
|
1946
|
+
obj_errors_item_union0 = obj_errors_item_union0_error.message;
|
|
1947
|
+
}
|
|
1948
|
+
let obj_errors_item_union1 = null;
|
|
1949
|
+
const obj_errors_item_union1_error = (() => {
|
|
1950
|
+
if (obj_errors_item !== null) {
|
|
1951
|
+
return new TypeError('Expected "null" but received "' + typeof obj_errors_item + '" (at "' + path_errors_item + '")');
|
|
1952
|
+
}
|
|
1953
|
+
})();
|
|
1954
|
+
if (obj_errors_item_union1_error != null) {
|
|
1955
|
+
obj_errors_item_union1 = obj_errors_item_union1_error.message;
|
|
1956
|
+
}
|
|
1957
|
+
if (obj_errors_item_union0 && obj_errors_item_union1) {
|
|
1958
|
+
let message = 'Object doesn\'t match union (at "' + path_errors_item + '")';
|
|
1959
|
+
message += '\n' + obj_errors_item_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1960
|
+
message += '\n' + obj_errors_item_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1656
1961
|
return new TypeError(message);
|
|
1657
1962
|
}
|
|
1658
1963
|
}
|
|
1659
1964
|
}
|
|
1660
1965
|
const obj_isSuccess = obj.isSuccess;
|
|
1661
1966
|
const path_isSuccess = path + '.isSuccess';
|
|
1662
|
-
|
|
1663
|
-
|
|
1967
|
+
let obj_isSuccess_union0 = null;
|
|
1968
|
+
const obj_isSuccess_union0_error = (() => {
|
|
1969
|
+
if (typeof obj_isSuccess !== 'boolean') {
|
|
1970
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isSuccess + '" (at "' + path_isSuccess + '")');
|
|
1971
|
+
}
|
|
1972
|
+
})();
|
|
1973
|
+
if (obj_isSuccess_union0_error != null) {
|
|
1974
|
+
obj_isSuccess_union0 = obj_isSuccess_union0_error.message;
|
|
1975
|
+
}
|
|
1976
|
+
let obj_isSuccess_union1 = null;
|
|
1977
|
+
const obj_isSuccess_union1_error = (() => {
|
|
1978
|
+
if (obj_isSuccess !== null) {
|
|
1979
|
+
return new TypeError('Expected "null" but received "' + typeof obj_isSuccess + '" (at "' + path_isSuccess + '")');
|
|
1980
|
+
}
|
|
1981
|
+
})();
|
|
1982
|
+
if (obj_isSuccess_union1_error != null) {
|
|
1983
|
+
obj_isSuccess_union1 = obj_isSuccess_union1_error.message;
|
|
1984
|
+
}
|
|
1985
|
+
if (obj_isSuccess_union0 && obj_isSuccess_union1) {
|
|
1986
|
+
let message = 'Object doesn\'t match union (at "' + path_isSuccess + '")';
|
|
1987
|
+
message += '\n' + obj_isSuccess_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1988
|
+
message += '\n' + obj_isSuccess_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1989
|
+
return new TypeError(message);
|
|
1664
1990
|
}
|
|
1665
1991
|
if (obj.predictionOutput !== undefined) {
|
|
1666
1992
|
const obj_predictionOutput = obj.predictionOutput;
|
|
@@ -1671,10 +1997,31 @@ function validate$k(obj, path = 'PredictionOutputObject') {
|
|
|
1671
1997
|
for (let i = 0; i < obj_predictionOutput.length; i++) {
|
|
1672
1998
|
const obj_predictionOutput_item = obj_predictionOutput[i];
|
|
1673
1999
|
const path_predictionOutput_item = path_predictionOutput + '[' + i + ']';
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
2000
|
+
let obj_predictionOutput_item_union0 = null;
|
|
2001
|
+
const obj_predictionOutput_item_union0_error = (() => {
|
|
2002
|
+
const referencepath_predictionOutput_itemValidationError = validate$n(obj_predictionOutput_item, path_predictionOutput_item);
|
|
2003
|
+
if (referencepath_predictionOutput_itemValidationError !== null) {
|
|
2004
|
+
let message = 'Object doesn\'t match PredictionOutput (at "' + path_predictionOutput_item + '")\n';
|
|
2005
|
+
message += referencepath_predictionOutput_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2006
|
+
return new TypeError(message);
|
|
2007
|
+
}
|
|
2008
|
+
})();
|
|
2009
|
+
if (obj_predictionOutput_item_union0_error != null) {
|
|
2010
|
+
obj_predictionOutput_item_union0 = obj_predictionOutput_item_union0_error.message;
|
|
2011
|
+
}
|
|
2012
|
+
let obj_predictionOutput_item_union1 = null;
|
|
2013
|
+
const obj_predictionOutput_item_union1_error = (() => {
|
|
2014
|
+
if (obj_predictionOutput_item !== null) {
|
|
2015
|
+
return new TypeError('Expected "null" but received "' + typeof obj_predictionOutput_item + '" (at "' + path_predictionOutput_item + '")');
|
|
2016
|
+
}
|
|
2017
|
+
})();
|
|
2018
|
+
if (obj_predictionOutput_item_union1_error != null) {
|
|
2019
|
+
obj_predictionOutput_item_union1 = obj_predictionOutput_item_union1_error.message;
|
|
2020
|
+
}
|
|
2021
|
+
if (obj_predictionOutput_item_union0 && obj_predictionOutput_item_union1) {
|
|
2022
|
+
let message = 'Object doesn\'t match union (at "' + path_predictionOutput_item + '")';
|
|
2023
|
+
message += '\n' + obj_predictionOutput_item_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2024
|
+
message += '\n' + obj_predictionOutput_item_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1678
2025
|
return new TypeError(message);
|
|
1679
2026
|
}
|
|
1680
2027
|
}
|
|
@@ -1682,42 +2029,75 @@ function validate$k(obj, path = 'PredictionOutputObject') {
|
|
|
1682
2029
|
if (obj.predictionWarning !== undefined) {
|
|
1683
2030
|
const obj_predictionWarning = obj.predictionWarning;
|
|
1684
2031
|
const path_predictionWarning = path + '.predictionWarning';
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
2032
|
+
let obj_predictionWarning_union0 = null;
|
|
2033
|
+
const obj_predictionWarning_union0_error = (() => {
|
|
2034
|
+
const referencepath_predictionWarningValidationError = validate$l(obj_predictionWarning, path_predictionWarning);
|
|
2035
|
+
if (referencepath_predictionWarningValidationError !== null) {
|
|
2036
|
+
let message = 'Object doesn\'t match PredictionWarning (at "' + path_predictionWarning + '")\n';
|
|
2037
|
+
message += referencepath_predictionWarningValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2038
|
+
return new TypeError(message);
|
|
2039
|
+
}
|
|
2040
|
+
})();
|
|
2041
|
+
if (obj_predictionWarning_union0_error != null) {
|
|
2042
|
+
obj_predictionWarning_union0 = obj_predictionWarning_union0_error.message;
|
|
2043
|
+
}
|
|
2044
|
+
let obj_predictionWarning_union1 = null;
|
|
2045
|
+
const obj_predictionWarning_union1_error = (() => {
|
|
2046
|
+
if (obj_predictionWarning !== null) {
|
|
2047
|
+
return new TypeError('Expected "null" but received "' + typeof obj_predictionWarning + '" (at "' + path_predictionWarning + '")');
|
|
2048
|
+
}
|
|
2049
|
+
})();
|
|
2050
|
+
if (obj_predictionWarning_union1_error != null) {
|
|
2051
|
+
obj_predictionWarning_union1 = obj_predictionWarning_union1_error.message;
|
|
2052
|
+
}
|
|
2053
|
+
if (obj_predictionWarning_union0 && obj_predictionWarning_union1) {
|
|
2054
|
+
let message = 'Object doesn\'t match union (at "' + path_predictionWarning + '")';
|
|
2055
|
+
message += '\n' + obj_predictionWarning_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2056
|
+
message += '\n' + obj_predictionWarning_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1689
2057
|
return new TypeError(message);
|
|
1690
2058
|
}
|
|
1691
2059
|
}
|
|
1692
2060
|
const obj_recordId = obj.recordId;
|
|
1693
2061
|
const path_recordId = path + '.recordId';
|
|
1694
|
-
|
|
1695
|
-
|
|
2062
|
+
let obj_recordId_union0 = null;
|
|
2063
|
+
const obj_recordId_union0_error = (() => {
|
|
2064
|
+
if (typeof obj_recordId !== 'string') {
|
|
2065
|
+
return new TypeError('Expected "string" but received "' + typeof obj_recordId + '" (at "' + path_recordId + '")');
|
|
2066
|
+
}
|
|
2067
|
+
})();
|
|
2068
|
+
if (obj_recordId_union0_error != null) {
|
|
2069
|
+
obj_recordId_union0 = obj_recordId_union0_error.message;
|
|
2070
|
+
}
|
|
2071
|
+
let obj_recordId_union1 = null;
|
|
2072
|
+
const obj_recordId_union1_error = (() => {
|
|
2073
|
+
if (obj_recordId !== null) {
|
|
2074
|
+
return new TypeError('Expected "null" but received "' + typeof obj_recordId + '" (at "' + path_recordId + '")');
|
|
2075
|
+
}
|
|
2076
|
+
})();
|
|
2077
|
+
if (obj_recordId_union1_error != null) {
|
|
2078
|
+
obj_recordId_union1 = obj_recordId_union1_error.message;
|
|
2079
|
+
}
|
|
2080
|
+
if (obj_recordId_union0 && obj_recordId_union1) {
|
|
2081
|
+
let message = 'Object doesn\'t match union (at "' + path_recordId + '")';
|
|
2082
|
+
message += '\n' + obj_recordId_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2083
|
+
message += '\n' + obj_recordId_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2084
|
+
return new TypeError(message);
|
|
1696
2085
|
}
|
|
1697
2086
|
})();
|
|
1698
2087
|
return v_error === undefined ? null : v_error;
|
|
1699
2088
|
}
|
|
1700
2089
|
|
|
1701
2090
|
const TTL$1 = 1000;
|
|
1702
|
-
const VERSION$1 = "
|
|
2091
|
+
const VERSION$1 = "b41e19933ddff4d62138587673e7d951";
|
|
1703
2092
|
function validate$j(obj, path = 'PredictionResponseRepresentation') {
|
|
1704
2093
|
const v_error = (() => {
|
|
1705
2094
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1706
2095
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1707
2096
|
}
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
return new TypeError('Expected "string" but received "' + typeof obj_customPredictionLabel + '" (at "' + path_customPredictionLabel + '")');
|
|
1713
|
-
}
|
|
1714
|
-
}
|
|
1715
|
-
if (obj.predictionModel !== undefined) {
|
|
1716
|
-
const obj_predictionModel = obj.predictionModel;
|
|
1717
|
-
const path_predictionModel = path + '.predictionModel';
|
|
1718
|
-
if (typeof obj_predictionModel !== 'string') {
|
|
1719
|
-
return new TypeError('Expected "string" but received "' + typeof obj_predictionModel + '" (at "' + path_predictionModel + '")');
|
|
1720
|
-
}
|
|
2097
|
+
const obj_predictionModel = obj.predictionModel;
|
|
2098
|
+
const path_predictionModel = path + '.predictionModel';
|
|
2099
|
+
if (typeof obj_predictionModel !== 'string') {
|
|
2100
|
+
return new TypeError('Expected "string" but received "' + typeof obj_predictionModel + '" (at "' + path_predictionModel + '")');
|
|
1721
2101
|
}
|
|
1722
2102
|
if (obj.predictionOutputObjects !== undefined) {
|
|
1723
2103
|
const obj_predictionOutputObjects = obj.predictionOutputObjects;
|
|
@@ -1728,10 +2108,31 @@ function validate$j(obj, path = 'PredictionResponseRepresentation') {
|
|
|
1728
2108
|
for (let i = 0; i < obj_predictionOutputObjects.length; i++) {
|
|
1729
2109
|
const obj_predictionOutputObjects_item = obj_predictionOutputObjects[i];
|
|
1730
2110
|
const path_predictionOutputObjects_item = path_predictionOutputObjects + '[' + i + ']';
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
2111
|
+
let obj_predictionOutputObjects_item_union0 = null;
|
|
2112
|
+
const obj_predictionOutputObjects_item_union0_error = (() => {
|
|
2113
|
+
const referencepath_predictionOutputObjects_itemValidationError = validate$k(obj_predictionOutputObjects_item, path_predictionOutputObjects_item);
|
|
2114
|
+
if (referencepath_predictionOutputObjects_itemValidationError !== null) {
|
|
2115
|
+
let message = 'Object doesn\'t match PredictionOutputObject (at "' + path_predictionOutputObjects_item + '")\n';
|
|
2116
|
+
message += referencepath_predictionOutputObjects_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2117
|
+
return new TypeError(message);
|
|
2118
|
+
}
|
|
2119
|
+
})();
|
|
2120
|
+
if (obj_predictionOutputObjects_item_union0_error != null) {
|
|
2121
|
+
obj_predictionOutputObjects_item_union0 = obj_predictionOutputObjects_item_union0_error.message;
|
|
2122
|
+
}
|
|
2123
|
+
let obj_predictionOutputObjects_item_union1 = null;
|
|
2124
|
+
const obj_predictionOutputObjects_item_union1_error = (() => {
|
|
2125
|
+
if (obj_predictionOutputObjects_item !== null) {
|
|
2126
|
+
return new TypeError('Expected "null" but received "' + typeof obj_predictionOutputObjects_item + '" (at "' + path_predictionOutputObjects_item + '")');
|
|
2127
|
+
}
|
|
2128
|
+
})();
|
|
2129
|
+
if (obj_predictionOutputObjects_item_union1_error != null) {
|
|
2130
|
+
obj_predictionOutputObjects_item_union1 = obj_predictionOutputObjects_item_union1_error.message;
|
|
2131
|
+
}
|
|
2132
|
+
if (obj_predictionOutputObjects_item_union0 && obj_predictionOutputObjects_item_union1) {
|
|
2133
|
+
let message = 'Object doesn\'t match union (at "' + path_predictionOutputObjects_item + '")';
|
|
2134
|
+
message += '\n' + obj_predictionOutputObjects_item_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2135
|
+
message += '\n' + obj_predictionOutputObjects_item_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1735
2136
|
return new TypeError(message);
|
|
1736
2137
|
}
|
|
1737
2138
|
}
|
|
@@ -1739,20 +2140,62 @@ function validate$j(obj, path = 'PredictionResponseRepresentation') {
|
|
|
1739
2140
|
if (obj.predictionPlatform !== undefined) {
|
|
1740
2141
|
const obj_predictionPlatform = obj.predictionPlatform;
|
|
1741
2142
|
const path_predictionPlatform = path + '.predictionPlatform';
|
|
1742
|
-
|
|
1743
|
-
|
|
2143
|
+
let obj_predictionPlatform_union0 = null;
|
|
2144
|
+
const obj_predictionPlatform_union0_error = (() => {
|
|
2145
|
+
if (typeof obj_predictionPlatform !== 'string') {
|
|
2146
|
+
return new TypeError('Expected "string" but received "' + typeof obj_predictionPlatform + '" (at "' + path_predictionPlatform + '")');
|
|
2147
|
+
}
|
|
2148
|
+
})();
|
|
2149
|
+
if (obj_predictionPlatform_union0_error != null) {
|
|
2150
|
+
obj_predictionPlatform_union0 = obj_predictionPlatform_union0_error.message;
|
|
2151
|
+
}
|
|
2152
|
+
let obj_predictionPlatform_union1 = null;
|
|
2153
|
+
const obj_predictionPlatform_union1_error = (() => {
|
|
2154
|
+
if (obj_predictionPlatform !== null) {
|
|
2155
|
+
return new TypeError('Expected "null" but received "' + typeof obj_predictionPlatform + '" (at "' + path_predictionPlatform + '")');
|
|
2156
|
+
}
|
|
2157
|
+
})();
|
|
2158
|
+
if (obj_predictionPlatform_union1_error != null) {
|
|
2159
|
+
obj_predictionPlatform_union1 = obj_predictionPlatform_union1_error.message;
|
|
2160
|
+
}
|
|
2161
|
+
if (obj_predictionPlatform_union0 && obj_predictionPlatform_union1) {
|
|
2162
|
+
let message = 'Object doesn\'t match union (at "' + path_predictionPlatform + '")';
|
|
2163
|
+
message += '\n' + obj_predictionPlatform_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2164
|
+
message += '\n' + obj_predictionPlatform_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2165
|
+
return new TypeError(message);
|
|
1744
2166
|
}
|
|
1745
2167
|
}
|
|
1746
2168
|
if (obj.predictionType !== undefined) {
|
|
1747
2169
|
const obj_predictionType = obj.predictionType;
|
|
1748
2170
|
const path_predictionType = path + '.predictionType';
|
|
1749
|
-
|
|
1750
|
-
|
|
2171
|
+
let obj_predictionType_union0 = null;
|
|
2172
|
+
const obj_predictionType_union0_error = (() => {
|
|
2173
|
+
if (typeof obj_predictionType !== 'string') {
|
|
2174
|
+
return new TypeError('Expected "string" but received "' + typeof obj_predictionType + '" (at "' + path_predictionType + '")');
|
|
2175
|
+
}
|
|
2176
|
+
})();
|
|
2177
|
+
if (obj_predictionType_union0_error != null) {
|
|
2178
|
+
obj_predictionType_union0 = obj_predictionType_union0_error.message;
|
|
2179
|
+
}
|
|
2180
|
+
let obj_predictionType_union1 = null;
|
|
2181
|
+
const obj_predictionType_union1_error = (() => {
|
|
2182
|
+
if (obj_predictionType !== null) {
|
|
2183
|
+
return new TypeError('Expected "null" but received "' + typeof obj_predictionType + '" (at "' + path_predictionType + '")');
|
|
2184
|
+
}
|
|
2185
|
+
})();
|
|
2186
|
+
if (obj_predictionType_union1_error != null) {
|
|
2187
|
+
obj_predictionType_union1 = obj_predictionType_union1_error.message;
|
|
2188
|
+
}
|
|
2189
|
+
if (obj_predictionType_union0 && obj_predictionType_union1) {
|
|
2190
|
+
let message = 'Object doesn\'t match union (at "' + path_predictionType + '")';
|
|
2191
|
+
message += '\n' + obj_predictionType_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2192
|
+
message += '\n' + obj_predictionType_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2193
|
+
return new TypeError(message);
|
|
1751
2194
|
}
|
|
1752
2195
|
}
|
|
1753
2196
|
const obj_status = obj.status;
|
|
1754
2197
|
const path_status = path + '.status';
|
|
1755
|
-
const referencepath_statusValidationError = validate$
|
|
2198
|
+
const referencepath_statusValidationError = validate$u(obj_status, path_status);
|
|
1756
2199
|
if (referencepath_statusValidationError !== null) {
|
|
1757
2200
|
let message = 'Object doesn\'t match Status (at "' + path_status + '")\n';
|
|
1758
2201
|
message += referencepath_statusValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1760,8 +2203,29 @@ function validate$j(obj, path = 'PredictionResponseRepresentation') {
|
|
|
1760
2203
|
}
|
|
1761
2204
|
const obj_usecaseName = obj.usecaseName;
|
|
1762
2205
|
const path_usecaseName = path + '.usecaseName';
|
|
1763
|
-
|
|
1764
|
-
|
|
2206
|
+
let obj_usecaseName_union0 = null;
|
|
2207
|
+
const obj_usecaseName_union0_error = (() => {
|
|
2208
|
+
if (typeof obj_usecaseName !== 'string') {
|
|
2209
|
+
return new TypeError('Expected "string" but received "' + typeof obj_usecaseName + '" (at "' + path_usecaseName + '")');
|
|
2210
|
+
}
|
|
2211
|
+
})();
|
|
2212
|
+
if (obj_usecaseName_union0_error != null) {
|
|
2213
|
+
obj_usecaseName_union0 = obj_usecaseName_union0_error.message;
|
|
2214
|
+
}
|
|
2215
|
+
let obj_usecaseName_union1 = null;
|
|
2216
|
+
const obj_usecaseName_union1_error = (() => {
|
|
2217
|
+
if (obj_usecaseName !== null) {
|
|
2218
|
+
return new TypeError('Expected "null" but received "' + typeof obj_usecaseName + '" (at "' + path_usecaseName + '")');
|
|
2219
|
+
}
|
|
2220
|
+
})();
|
|
2221
|
+
if (obj_usecaseName_union1_error != null) {
|
|
2222
|
+
obj_usecaseName_union1 = obj_usecaseName_union1_error.message;
|
|
2223
|
+
}
|
|
2224
|
+
if (obj_usecaseName_union0 && obj_usecaseName_union1) {
|
|
2225
|
+
let message = 'Object doesn\'t match union (at "' + path_usecaseName + '")';
|
|
2226
|
+
message += '\n' + obj_usecaseName_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2227
|
+
message += '\n' + obj_usecaseName_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2228
|
+
return new TypeError(message);
|
|
1765
2229
|
}
|
|
1766
2230
|
})();
|
|
1767
2231
|
return v_error === undefined ? null : v_error;
|
|
@@ -1854,16 +2318,55 @@ function createResourceRequest$1(config) {
|
|
|
1854
2318
|
|
|
1855
2319
|
const adapterName$1 = 'getPredictions';
|
|
1856
2320
|
const getPredictions_ConfigPropertyMetadata = [
|
|
1857
|
-
generateParamConfigMetadata('
|
|
2321
|
+
generateParamConfigMetadata('maxInsights', false, 2 /* Body */, 4 /* Unsupported */),
|
|
2322
|
+
generateParamConfigMetadata('predictionModel', true, 2 /* Body */, 0 /* String */),
|
|
2323
|
+
generateParamConfigMetadata('predictionPlatform', false, 2 /* Body */, 4 /* Unsupported */),
|
|
2324
|
+
generateParamConfigMetadata('records', false, 2 /* Body */, 4 /* Unsupported */),
|
|
2325
|
+
generateParamConfigMetadata('scoreFilterCriteria', false, 2 /* Body */, 4 /* Unsupported */),
|
|
2326
|
+
generateParamConfigMetadata('scoringThreshold', false, 2 /* Body */, 2 /* Number */),
|
|
2327
|
+
generateParamConfigMetadata('sortingOrder', false, 2 /* Body */, 4 /* Unsupported */),
|
|
2328
|
+
generateParamConfigMetadata('usecaseName', true, 2 /* Body */, 0 /* String */),
|
|
1858
2329
|
];
|
|
1859
2330
|
const getPredictions_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getPredictions_ConfigPropertyMetadata);
|
|
1860
2331
|
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$3(getPredictions_ConfigPropertyMetadata);
|
|
1861
2332
|
function typeCheckConfig$1(untrustedConfig) {
|
|
1862
2333
|
const config = {};
|
|
1863
|
-
|
|
1864
|
-
const
|
|
1865
|
-
if (
|
|
1866
|
-
config.
|
|
2334
|
+
typeCheckConfig$3(untrustedConfig, config, getPredictions_ConfigPropertyMetadata);
|
|
2335
|
+
const untrustedConfig_maxInsights = untrustedConfig.maxInsights;
|
|
2336
|
+
if (typeof untrustedConfig_maxInsights === 'number' && Math.floor(untrustedConfig_maxInsights) === untrustedConfig_maxInsights) {
|
|
2337
|
+
config.maxInsights = untrustedConfig_maxInsights;
|
|
2338
|
+
}
|
|
2339
|
+
if (untrustedConfig_maxInsights === null) {
|
|
2340
|
+
config.maxInsights = untrustedConfig_maxInsights;
|
|
2341
|
+
}
|
|
2342
|
+
const untrustedConfig_predictionPlatform = untrustedConfig.predictionPlatform;
|
|
2343
|
+
if (typeof untrustedConfig_predictionPlatform === 'string') {
|
|
2344
|
+
config.predictionPlatform = untrustedConfig_predictionPlatform;
|
|
2345
|
+
}
|
|
2346
|
+
if (untrustedConfig_predictionPlatform === null) {
|
|
2347
|
+
config.predictionPlatform = untrustedConfig_predictionPlatform;
|
|
2348
|
+
}
|
|
2349
|
+
const untrustedConfig_records = untrustedConfig.records;
|
|
2350
|
+
const referenceWrappedListValidationError = validate$s(untrustedConfig_records);
|
|
2351
|
+
if (referenceWrappedListValidationError === null) {
|
|
2352
|
+
config.records = untrustedConfig_records;
|
|
2353
|
+
}
|
|
2354
|
+
if (untrustedConfig_records === null) {
|
|
2355
|
+
config.records = untrustedConfig_records;
|
|
2356
|
+
}
|
|
2357
|
+
const untrustedConfig_scoreFilterCriteria = untrustedConfig.scoreFilterCriteria;
|
|
2358
|
+
if (typeof untrustedConfig_scoreFilterCriteria === 'string') {
|
|
2359
|
+
config.scoreFilterCriteria = untrustedConfig_scoreFilterCriteria;
|
|
2360
|
+
}
|
|
2361
|
+
if (untrustedConfig_scoreFilterCriteria === null) {
|
|
2362
|
+
config.scoreFilterCriteria = untrustedConfig_scoreFilterCriteria;
|
|
2363
|
+
}
|
|
2364
|
+
const untrustedConfig_sortingOrder = untrustedConfig.sortingOrder;
|
|
2365
|
+
if (typeof untrustedConfig_sortingOrder === 'string') {
|
|
2366
|
+
config.sortingOrder = untrustedConfig_sortingOrder;
|
|
2367
|
+
}
|
|
2368
|
+
if (untrustedConfig_sortingOrder === null) {
|
|
2369
|
+
config.sortingOrder = untrustedConfig_sortingOrder;
|
|
1867
2370
|
}
|
|
1868
2371
|
return config;
|
|
1869
2372
|
}
|
|
@@ -2324,7 +2827,7 @@ function validate$8(obj, path = 'PredictionInputRepresentation') {
|
|
|
2324
2827
|
const path_columnNames = path + '.columnNames';
|
|
2325
2828
|
let obj_columnNames_union0 = null;
|
|
2326
2829
|
const obj_columnNames_union0_error = (() => {
|
|
2327
|
-
const referencepath_columnNamesValidationError = validate$
|
|
2830
|
+
const referencepath_columnNamesValidationError = validate$s(obj_columnNames, path_columnNames);
|
|
2328
2831
|
if (referencepath_columnNamesValidationError !== null) {
|
|
2329
2832
|
let message = 'Object doesn\'t match WrappedList (at "' + path_columnNames + '")\n';
|
|
2330
2833
|
message += referencepath_columnNamesValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2779,7 +3282,7 @@ function validate$8(obj, path = 'PredictionInputRepresentation') {
|
|
|
2779
3282
|
const path_records = path + '.records';
|
|
2780
3283
|
let obj_records_union0 = null;
|
|
2781
3284
|
const obj_records_union0_error = (() => {
|
|
2782
|
-
const referencepath_recordsValidationError = validate$
|
|
3285
|
+
const referencepath_recordsValidationError = validate$s(obj_records, path_records);
|
|
2783
3286
|
if (referencepath_recordsValidationError !== null) {
|
|
2784
3287
|
let message = 'Object doesn\'t match WrappedList (at "' + path_records + '")\n';
|
|
2785
3288
|
message += referencepath_recordsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -4034,7 +4537,7 @@ function validate(obj, path = 'PredictionOutputRepresentation') {
|
|
|
4034
4537
|
}
|
|
4035
4538
|
const obj_status = obj.status;
|
|
4036
4539
|
const path_status = path + '.status';
|
|
4037
|
-
const referencepath_statusValidationError = validate$
|
|
4540
|
+
const referencepath_statusValidationError = validate$u(obj_status, path_status);
|
|
4038
4541
|
if (referencepath_statusValidationError !== null) {
|
|
4039
4542
|
let message = 'Object doesn\'t match Status (at "' + path_status + '")\n';
|
|
4040
4543
|
message += referencepath_statusValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -4209,4 +4712,4 @@ withDefaultLuvio((luvio) => {
|
|
|
4209
4712
|
});
|
|
4210
4713
|
|
|
4211
4714
|
export { fetchRecommendations, getPredictions, predictions };
|
|
4212
|
-
// version: 1.
|
|
4715
|
+
// version: 1.309.0-dev9-7ca613f4d0
|