@salesforce/lds-adapters-industries-einstein-aiaccelerator 1.320.0 → 1.321.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/es2018/industries-einstein-aiaccelerator.js +677 -195
- 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 +9 -5
- package/dist/es/es2018/types/src/generated/types/PredictionOutputObject.d.ts +10 -9
- 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 -11
- 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 +636 -154
- package/src/raml/api.raml +47 -29
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* For full license text, see the LICENSE.txt file
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$3 } from '@luvio/engine';
|
|
7
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$3, typeCheckConfig as typeCheckConfig$3 } from '@luvio/engine';
|
|
8
8
|
|
|
9
9
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
10
|
const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
|
|
@@ -73,7 +73,7 @@ function createLink(ref) {
|
|
|
73
73
|
};
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
function validate$
|
|
76
|
+
function validate$z(obj, path = 'WrappedList') {
|
|
77
77
|
const v_error = (() => {
|
|
78
78
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
79
79
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -115,7 +115,7 @@ function validate$y(obj, path = 'WrappedList') {
|
|
|
115
115
|
return v_error === undefined ? null : v_error;
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
-
function validate$
|
|
118
|
+
function validate$y(obj, path = 'NullableColumnMap') {
|
|
119
119
|
const v_error = (() => {
|
|
120
120
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
121
121
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -154,7 +154,7 @@ function validate$x(obj, path = 'NullableColumnMap') {
|
|
|
154
154
|
return v_error === undefined ? null : v_error;
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
function validate$
|
|
157
|
+
function validate$x(obj, path = 'ColumnMapWrap') {
|
|
158
158
|
const v_error = (() => {
|
|
159
159
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
160
160
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -163,7 +163,7 @@ function validate$w(obj, path = 'ColumnMapWrap') {
|
|
|
163
163
|
const path_columnMap = path + '.columnMap';
|
|
164
164
|
let obj_columnMap_union0 = null;
|
|
165
165
|
const obj_columnMap_union0_error = (() => {
|
|
166
|
-
const referencepath_columnMapValidationError = validate$
|
|
166
|
+
const referencepath_columnMapValidationError = validate$y(obj_columnMap, path_columnMap);
|
|
167
167
|
if (referencepath_columnMapValidationError !== null) {
|
|
168
168
|
let message = 'Object doesn\'t match NullableColumnMap (at "' + path_columnMap + '")\n';
|
|
169
169
|
message += referencepath_columnMapValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -192,7 +192,7 @@ function validate$w(obj, path = 'ColumnMapWrap') {
|
|
|
192
192
|
return v_error === undefined ? null : v_error;
|
|
193
193
|
}
|
|
194
194
|
|
|
195
|
-
function validate$
|
|
195
|
+
function validate$w(obj, path = 'NullableFeatureExtractionParametersMapValue') {
|
|
196
196
|
const v_error = (() => {
|
|
197
197
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
198
198
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -201,7 +201,7 @@ function validate$v(obj, path = 'NullableFeatureExtractionParametersMapValue') {
|
|
|
201
201
|
return v_error === undefined ? null : v_error;
|
|
202
202
|
}
|
|
203
203
|
|
|
204
|
-
function validate$
|
|
204
|
+
function validate$v(obj, path = 'FeatureExtractionParametersMapValue') {
|
|
205
205
|
const v_error = (() => {
|
|
206
206
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
207
207
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -211,7 +211,7 @@ function validate$u(obj, path = 'FeatureExtractionParametersMapValue') {
|
|
|
211
211
|
const path_featureExtractionParametersMapValue = path + '.featureExtractionParametersMapValue';
|
|
212
212
|
let obj_featureExtractionParametersMapValue_union0 = null;
|
|
213
213
|
const obj_featureExtractionParametersMapValue_union0_error = (() => {
|
|
214
|
-
const referencepath_featureExtractionParametersMapValueValidationError = validate$
|
|
214
|
+
const referencepath_featureExtractionParametersMapValueValidationError = validate$w(obj_featureExtractionParametersMapValue, path_featureExtractionParametersMapValue);
|
|
215
215
|
if (referencepath_featureExtractionParametersMapValueValidationError !== null) {
|
|
216
216
|
let message = 'Object doesn\'t match NullableFeatureExtractionParametersMapValue (at "' + path_featureExtractionParametersMapValue + '")\n';
|
|
217
217
|
message += referencepath_featureExtractionParametersMapValueValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -241,7 +241,7 @@ function validate$u(obj, path = 'FeatureExtractionParametersMapValue') {
|
|
|
241
241
|
return v_error === undefined ? null : v_error;
|
|
242
242
|
}
|
|
243
243
|
|
|
244
|
-
function validate$
|
|
244
|
+
function validate$u(obj, path = 'FeatureExtractionParametersList') {
|
|
245
245
|
const v_error = (() => {
|
|
246
246
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
247
247
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -257,7 +257,7 @@ function validate$t(obj, path = 'FeatureExtractionParametersList') {
|
|
|
257
257
|
const path_featureExtractionParameters_item = path_featureExtractionParameters + '[' + i + ']';
|
|
258
258
|
let obj_featureExtractionParameters_item_union0 = null;
|
|
259
259
|
const obj_featureExtractionParameters_item_union0_error = (() => {
|
|
260
|
-
const referencepath_featureExtractionParameters_itemValidationError = validate$
|
|
260
|
+
const referencepath_featureExtractionParameters_itemValidationError = validate$v(obj_featureExtractionParameters_item, path_featureExtractionParameters_item);
|
|
261
261
|
if (referencepath_featureExtractionParameters_itemValidationError !== null) {
|
|
262
262
|
let message = 'Object doesn\'t match FeatureExtractionParametersMapValue (at "' + path_featureExtractionParameters_item + '")\n';
|
|
263
263
|
message += referencepath_featureExtractionParameters_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -288,7 +288,7 @@ function validate$t(obj, path = 'FeatureExtractionParametersList') {
|
|
|
288
288
|
return v_error === undefined ? null : v_error;
|
|
289
289
|
}
|
|
290
290
|
|
|
291
|
-
function validate$
|
|
291
|
+
function validate$t(obj, path = 'NullableInsightsSettingsMap') {
|
|
292
292
|
const v_error = (() => {
|
|
293
293
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
294
294
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -327,7 +327,7 @@ function validate$s(obj, path = 'NullableInsightsSettingsMap') {
|
|
|
327
327
|
return v_error === undefined ? null : v_error;
|
|
328
328
|
}
|
|
329
329
|
|
|
330
|
-
function validate$
|
|
330
|
+
function validate$s(obj, path = 'InsightsSettingsMap') {
|
|
331
331
|
const v_error = (() => {
|
|
332
332
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
333
333
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -337,7 +337,7 @@ function validate$r(obj, path = 'InsightsSettingsMap') {
|
|
|
337
337
|
const path_insightsSettings = path + '.insightsSettings';
|
|
338
338
|
let obj_insightsSettings_union0 = null;
|
|
339
339
|
const obj_insightsSettings_union0_error = (() => {
|
|
340
|
-
const referencepath_insightsSettingsValidationError = validate$
|
|
340
|
+
const referencepath_insightsSettingsValidationError = validate$t(obj_insightsSettings, path_insightsSettings);
|
|
341
341
|
if (referencepath_insightsSettingsValidationError !== null) {
|
|
342
342
|
let message = 'Object doesn\'t match NullableInsightsSettingsMap (at "' + path_insightsSettings + '")\n';
|
|
343
343
|
message += referencepath_insightsSettingsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -367,7 +367,7 @@ function validate$r(obj, path = 'InsightsSettingsMap') {
|
|
|
367
367
|
return v_error === undefined ? null : v_error;
|
|
368
368
|
}
|
|
369
369
|
|
|
370
|
-
function validate$
|
|
370
|
+
function validate$r(obj, path = 'RawDataInputRepresentation') {
|
|
371
371
|
const v_error = (() => {
|
|
372
372
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
373
373
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -409,7 +409,7 @@ function validate$q(obj, path = 'RawDataInputRepresentation') {
|
|
|
409
409
|
return v_error === undefined ? null : v_error;
|
|
410
410
|
}
|
|
411
411
|
|
|
412
|
-
function validate$
|
|
412
|
+
function validate$q(obj, path = 'RawDataInputWrap') {
|
|
413
413
|
const v_error = (() => {
|
|
414
414
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
415
415
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -418,7 +418,7 @@ function validate$p(obj, path = 'RawDataInputWrap') {
|
|
|
418
418
|
const path_rawDataInputWrap = path + '.rawDataInputWrap';
|
|
419
419
|
let obj_rawDataInputWrap_union0 = null;
|
|
420
420
|
const obj_rawDataInputWrap_union0_error = (() => {
|
|
421
|
-
const referencepath_rawDataInputWrapValidationError = validate$
|
|
421
|
+
const referencepath_rawDataInputWrapValidationError = validate$r(obj_rawDataInputWrap, path_rawDataInputWrap);
|
|
422
422
|
if (referencepath_rawDataInputWrapValidationError !== null) {
|
|
423
423
|
let message = 'Object doesn\'t match RawDataInputRepresentation (at "' + path_rawDataInputWrap + '")\n';
|
|
424
424
|
message += referencepath_rawDataInputWrapValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -447,7 +447,7 @@ function validate$p(obj, path = 'RawDataInputWrap') {
|
|
|
447
447
|
return v_error === undefined ? null : v_error;
|
|
448
448
|
}
|
|
449
449
|
|
|
450
|
-
function validate$
|
|
450
|
+
function validate$p(obj, path = 'RawDataList') {
|
|
451
451
|
const v_error = (() => {
|
|
452
452
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
453
453
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -462,7 +462,7 @@ function validate$o(obj, path = 'RawDataList') {
|
|
|
462
462
|
const path_rawData_item = path_rawData + '[' + i + ']';
|
|
463
463
|
let obj_rawData_item_union0 = null;
|
|
464
464
|
const obj_rawData_item_union0_error = (() => {
|
|
465
|
-
const referencepath_rawData_itemValidationError = validate$
|
|
465
|
+
const referencepath_rawData_itemValidationError = validate$q(obj_rawData_item, path_rawData_item);
|
|
466
466
|
if (referencepath_rawData_itemValidationError !== null) {
|
|
467
467
|
let message = 'Object doesn\'t match RawDataInputWrap (at "' + path_rawData_item + '")\n';
|
|
468
468
|
message += referencepath_rawData_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -492,7 +492,7 @@ function validate$o(obj, path = 'RawDataList') {
|
|
|
492
492
|
return v_error === undefined ? null : v_error;
|
|
493
493
|
}
|
|
494
494
|
|
|
495
|
-
function validate$
|
|
495
|
+
function validate$o(obj, path = 'PredictionInputRepresentation') {
|
|
496
496
|
const v_error = (() => {
|
|
497
497
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
498
498
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -530,7 +530,7 @@ function validate$n(obj, path = 'PredictionInputRepresentation') {
|
|
|
530
530
|
const path_columnNames = path + '.columnNames';
|
|
531
531
|
let obj_columnNames_union0 = null;
|
|
532
532
|
const obj_columnNames_union0_error = (() => {
|
|
533
|
-
const referencepath_columnNamesValidationError = validate$
|
|
533
|
+
const referencepath_columnNamesValidationError = validate$z(obj_columnNames, path_columnNames);
|
|
534
534
|
if (referencepath_columnNamesValidationError !== null) {
|
|
535
535
|
let message = 'Object doesn\'t match WrappedList (at "' + path_columnNames + '")\n';
|
|
536
536
|
message += referencepath_columnNamesValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -757,7 +757,7 @@ function validate$n(obj, path = 'PredictionInputRepresentation') {
|
|
|
757
757
|
const path_featureColumnMap = path + '.featureColumnMap';
|
|
758
758
|
let obj_featureColumnMap_union0 = null;
|
|
759
759
|
const obj_featureColumnMap_union0_error = (() => {
|
|
760
|
-
const referencepath_featureColumnMapValidationError = validate$
|
|
760
|
+
const referencepath_featureColumnMapValidationError = validate$x(obj_featureColumnMap, path_featureColumnMap);
|
|
761
761
|
if (referencepath_featureColumnMapValidationError !== null) {
|
|
762
762
|
let message = 'Object doesn\'t match ColumnMapWrap (at "' + path_featureColumnMap + '")\n';
|
|
763
763
|
message += referencepath_featureColumnMapValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -788,7 +788,7 @@ function validate$n(obj, path = 'PredictionInputRepresentation') {
|
|
|
788
788
|
const path_featureExtractionParameters = path + '.featureExtractionParameters';
|
|
789
789
|
let obj_featureExtractionParameters_union0 = null;
|
|
790
790
|
const obj_featureExtractionParameters_union0_error = (() => {
|
|
791
|
-
const referencepath_featureExtractionParametersValidationError = validate$
|
|
791
|
+
const referencepath_featureExtractionParametersValidationError = validate$u(obj_featureExtractionParameters, path_featureExtractionParameters);
|
|
792
792
|
if (referencepath_featureExtractionParametersValidationError !== null) {
|
|
793
793
|
let message = 'Object doesn\'t match FeatureExtractionParametersList (at "' + path_featureExtractionParameters + '")\n';
|
|
794
794
|
message += referencepath_featureExtractionParametersValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -887,7 +887,7 @@ function validate$n(obj, path = 'PredictionInputRepresentation') {
|
|
|
887
887
|
const path_insightColumnMap = path + '.insightColumnMap';
|
|
888
888
|
let obj_insightColumnMap_union0 = null;
|
|
889
889
|
const obj_insightColumnMap_union0_error = (() => {
|
|
890
|
-
const referencepath_insightColumnMapValidationError = validate$
|
|
890
|
+
const referencepath_insightColumnMapValidationError = validate$x(obj_insightColumnMap, path_insightColumnMap);
|
|
891
891
|
if (referencepath_insightColumnMapValidationError !== null) {
|
|
892
892
|
let message = 'Object doesn\'t match ColumnMapWrap (at "' + path_insightColumnMap + '")\n';
|
|
893
893
|
message += referencepath_insightColumnMapValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -918,7 +918,7 @@ function validate$n(obj, path = 'PredictionInputRepresentation') {
|
|
|
918
918
|
const path_insightsSettings = path + '.insightsSettings';
|
|
919
919
|
let obj_insightsSettings_union0 = null;
|
|
920
920
|
const obj_insightsSettings_union0_error = (() => {
|
|
921
|
-
const referencepath_insightsSettingsValidationError = validate$
|
|
921
|
+
const referencepath_insightsSettingsValidationError = validate$s(obj_insightsSettings, path_insightsSettings);
|
|
922
922
|
if (referencepath_insightsSettingsValidationError !== null) {
|
|
923
923
|
let message = 'Object doesn\'t match InsightsSettingsMap (at "' + path_insightsSettings + '")\n';
|
|
924
924
|
message += referencepath_insightsSettingsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -954,7 +954,7 @@ function validate$n(obj, path = 'PredictionInputRepresentation') {
|
|
|
954
954
|
const path_rawData = path + '.rawData';
|
|
955
955
|
let obj_rawData_union0 = null;
|
|
956
956
|
const obj_rawData_union0_error = (() => {
|
|
957
|
-
const referencepath_rawDataValidationError = validate$
|
|
957
|
+
const referencepath_rawDataValidationError = validate$p(obj_rawData, path_rawData);
|
|
958
958
|
if (referencepath_rawDataValidationError !== null) {
|
|
959
959
|
let message = 'Object doesn\'t match RawDataList (at "' + path_rawData + '")\n';
|
|
960
960
|
message += referencepath_rawDataValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -985,7 +985,7 @@ function validate$n(obj, path = 'PredictionInputRepresentation') {
|
|
|
985
985
|
const path_records = path + '.records';
|
|
986
986
|
let obj_records_union0 = null;
|
|
987
987
|
const obj_records_union0_error = (() => {
|
|
988
|
-
const referencepath_recordsValidationError = validate$
|
|
988
|
+
const referencepath_recordsValidationError = validate$z(obj_records, path_records);
|
|
989
989
|
if (referencepath_recordsValidationError !== null) {
|
|
990
990
|
let message = 'Object doesn\'t match WrappedList (at "' + path_records + '")\n';
|
|
991
991
|
message += referencepath_recordsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1072,7 +1072,7 @@ function validate$n(obj, path = 'PredictionInputRepresentation') {
|
|
|
1072
1072
|
const path_suggestionColumnMap = path + '.suggestionColumnMap';
|
|
1073
1073
|
let obj_suggestionColumnMap_union0 = null;
|
|
1074
1074
|
const obj_suggestionColumnMap_union0_error = (() => {
|
|
1075
|
-
const referencepath_suggestionColumnMapValidationError = validate$
|
|
1075
|
+
const referencepath_suggestionColumnMapValidationError = validate$x(obj_suggestionColumnMap, path_suggestionColumnMap);
|
|
1076
1076
|
if (referencepath_suggestionColumnMapValidationError !== null) {
|
|
1077
1077
|
let message = 'Object doesn\'t match ColumnMapWrap (at "' + path_suggestionColumnMap + '")\n';
|
|
1078
1078
|
message += referencepath_suggestionColumnMapValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1116,7 +1116,7 @@ function validate$n(obj, path = 'PredictionInputRepresentation') {
|
|
|
1116
1116
|
return v_error === undefined ? null : v_error;
|
|
1117
1117
|
}
|
|
1118
1118
|
|
|
1119
|
-
function validate$
|
|
1119
|
+
function validate$n(obj, path = 'ModelFeature') {
|
|
1120
1120
|
const v_error = (() => {
|
|
1121
1121
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1122
1122
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1209,7 +1209,7 @@ function validate$m(obj, path = 'ModelFeature') {
|
|
|
1209
1209
|
return v_error === undefined ? null : v_error;
|
|
1210
1210
|
}
|
|
1211
1211
|
|
|
1212
|
-
function validate$
|
|
1212
|
+
function validate$m(obj, path = 'NullableModel') {
|
|
1213
1213
|
const v_error = (() => {
|
|
1214
1214
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1215
1215
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1248,7 +1248,7 @@ function validate$l(obj, path = 'NullableModel') {
|
|
|
1248
1248
|
return v_error === undefined ? null : v_error;
|
|
1249
1249
|
}
|
|
1250
1250
|
|
|
1251
|
-
function validate$
|
|
1251
|
+
function validate$l(obj, path = 'Column') {
|
|
1252
1252
|
const v_error = (() => {
|
|
1253
1253
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1254
1254
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1369,7 +1369,7 @@ function validate$k(obj, path = 'Column') {
|
|
|
1369
1369
|
return v_error === undefined ? null : v_error;
|
|
1370
1370
|
}
|
|
1371
1371
|
|
|
1372
|
-
function validate$
|
|
1372
|
+
function validate$k(obj, path = 'Insight') {
|
|
1373
1373
|
const v_error = (() => {
|
|
1374
1374
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1375
1375
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1385,7 +1385,7 @@ function validate$j(obj, path = 'Insight') {
|
|
|
1385
1385
|
const path_columns_item = path_columns + '[' + i + ']';
|
|
1386
1386
|
let obj_columns_item_union0 = null;
|
|
1387
1387
|
const obj_columns_item_union0_error = (() => {
|
|
1388
|
-
const referencepath_columns_itemValidationError = validate$
|
|
1388
|
+
const referencepath_columns_itemValidationError = validate$l(obj_columns_item, path_columns_item);
|
|
1389
1389
|
if (referencepath_columns_itemValidationError !== null) {
|
|
1390
1390
|
let message = 'Object doesn\'t match Column (at "' + path_columns_item + '")\n';
|
|
1391
1391
|
message += referencepath_columns_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1419,7 +1419,7 @@ function validate$j(obj, path = 'Insight') {
|
|
|
1419
1419
|
return v_error === undefined ? null : v_error;
|
|
1420
1420
|
}
|
|
1421
1421
|
|
|
1422
|
-
function validate$
|
|
1422
|
+
function validate$j(obj, path = 'Prediction') {
|
|
1423
1423
|
const v_error = (() => {
|
|
1424
1424
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1425
1425
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1438,7 +1438,7 @@ function validate$i(obj, path = 'Prediction') {
|
|
|
1438
1438
|
const path_insights_item = path_insights + '[' + i + ']';
|
|
1439
1439
|
let obj_insights_item_union0 = null;
|
|
1440
1440
|
const obj_insights_item_union0_error = (() => {
|
|
1441
|
-
const referencepath_insights_itemValidationError = validate$
|
|
1441
|
+
const referencepath_insights_itemValidationError = validate$k(obj_insights_item, path_insights_item);
|
|
1442
1442
|
if (referencepath_insights_itemValidationError !== null) {
|
|
1443
1443
|
let message = 'Object doesn\'t match Insight (at "' + path_insights_item + '")\n';
|
|
1444
1444
|
message += referencepath_insights_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1511,7 +1511,7 @@ function validate$i(obj, path = 'Prediction') {
|
|
|
1511
1511
|
const path_outOfBoundsColumns_item = path_outOfBoundsColumns + '[' + i + ']';
|
|
1512
1512
|
let obj_outOfBoundsColumns_item_union0 = null;
|
|
1513
1513
|
const obj_outOfBoundsColumns_item_union0_error = (() => {
|
|
1514
|
-
const referencepath_outOfBoundsColumns_itemValidationError = validate$
|
|
1514
|
+
const referencepath_outOfBoundsColumns_itemValidationError = validate$l(obj_outOfBoundsColumns_item, path_outOfBoundsColumns_item);
|
|
1515
1515
|
if (referencepath_outOfBoundsColumns_itemValidationError !== null) {
|
|
1516
1516
|
let message = 'Object doesn\'t match Column (at "' + path_outOfBoundsColumns_item + '")\n';
|
|
1517
1517
|
message += referencepath_outOfBoundsColumns_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1545,7 +1545,7 @@ function validate$i(obj, path = 'Prediction') {
|
|
|
1545
1545
|
return v_error === undefined ? null : v_error;
|
|
1546
1546
|
}
|
|
1547
1547
|
|
|
1548
|
-
function validate$
|
|
1548
|
+
function validate$i(obj, path = 'Suggestion') {
|
|
1549
1549
|
const v_error = (() => {
|
|
1550
1550
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1551
1551
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1561,7 +1561,7 @@ function validate$h(obj, path = 'Suggestion') {
|
|
|
1561
1561
|
const path_columns_item = path_columns + '[' + i + ']';
|
|
1562
1562
|
let obj_columns_item_union0 = null;
|
|
1563
1563
|
const obj_columns_item_union0_error = (() => {
|
|
1564
|
-
const referencepath_columns_itemValidationError = validate$
|
|
1564
|
+
const referencepath_columns_itemValidationError = validate$l(obj_columns_item, path_columns_item);
|
|
1565
1565
|
if (referencepath_columns_itemValidationError !== null) {
|
|
1566
1566
|
let message = 'Object doesn\'t match Column (at "' + path_columns_item + '")\n';
|
|
1567
1567
|
message += referencepath_columns_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1595,7 +1595,7 @@ function validate$h(obj, path = 'Suggestion') {
|
|
|
1595
1595
|
return v_error === undefined ? null : v_error;
|
|
1596
1596
|
}
|
|
1597
1597
|
|
|
1598
|
-
function validate$
|
|
1598
|
+
function validate$h(obj, path = 'PredictionObject') {
|
|
1599
1599
|
const v_error = (() => {
|
|
1600
1600
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1601
1601
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1605,7 +1605,7 @@ function validate$g(obj, path = 'PredictionObject') {
|
|
|
1605
1605
|
const path_model = path + '.model';
|
|
1606
1606
|
let obj_model_union0 = null;
|
|
1607
1607
|
const obj_model_union0_error = (() => {
|
|
1608
|
-
const referencepath_modelValidationError = validate$
|
|
1608
|
+
const referencepath_modelValidationError = validate$m(obj_model, path_model);
|
|
1609
1609
|
if (referencepath_modelValidationError !== null) {
|
|
1610
1610
|
let message = 'Object doesn\'t match NullableModel (at "' + path_model + '")\n';
|
|
1611
1611
|
message += referencepath_modelValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1636,7 +1636,7 @@ function validate$g(obj, path = 'PredictionObject') {
|
|
|
1636
1636
|
const path_prediction = path + '.prediction';
|
|
1637
1637
|
let obj_prediction_union0 = null;
|
|
1638
1638
|
const obj_prediction_union0_error = (() => {
|
|
1639
|
-
const referencepath_predictionValidationError = validate$
|
|
1639
|
+
const referencepath_predictionValidationError = validate$j(obj_prediction, path_prediction);
|
|
1640
1640
|
if (referencepath_predictionValidationError !== null) {
|
|
1641
1641
|
let message = 'Object doesn\'t match Prediction (at "' + path_prediction + '")\n';
|
|
1642
1642
|
message += referencepath_predictionValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1699,7 +1699,7 @@ function validate$g(obj, path = 'PredictionObject') {
|
|
|
1699
1699
|
const path_suggestions_item = path_suggestions + '[' + i + ']';
|
|
1700
1700
|
let obj_suggestions_item_union0 = null;
|
|
1701
1701
|
const obj_suggestions_item_union0_error = (() => {
|
|
1702
|
-
const referencepath_suggestions_itemValidationError = validate$
|
|
1702
|
+
const referencepath_suggestions_itemValidationError = validate$i(obj_suggestions_item, path_suggestions_item);
|
|
1703
1703
|
if (referencepath_suggestions_itemValidationError !== null) {
|
|
1704
1704
|
let message = 'Object doesn\'t match Suggestion (at "' + path_suggestions_item + '")\n';
|
|
1705
1705
|
message += referencepath_suggestions_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1730,7 +1730,7 @@ function validate$g(obj, path = 'PredictionObject') {
|
|
|
1730
1730
|
return v_error === undefined ? null : v_error;
|
|
1731
1731
|
}
|
|
1732
1732
|
|
|
1733
|
-
function validate$
|
|
1733
|
+
function validate$g(obj, path = 'Status') {
|
|
1734
1734
|
const v_error = (() => {
|
|
1735
1735
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1736
1736
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1751,7 +1751,7 @@ function validate$f(obj, path = 'Status') {
|
|
|
1751
1751
|
|
|
1752
1752
|
const TTL$2 = 1000;
|
|
1753
1753
|
const VERSION$2 = "f32ecc98b5cd30fb5680de162a64308a";
|
|
1754
|
-
function validate$
|
|
1754
|
+
function validate$f(obj, path = 'PredictionOutputRepresentation') {
|
|
1755
1755
|
const v_error = (() => {
|
|
1756
1756
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1757
1757
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1926,7 +1926,7 @@ function validate$e(obj, path = 'PredictionOutputRepresentation') {
|
|
|
1926
1926
|
const path_modelFeatures_item = path_modelFeatures + '[' + i + ']';
|
|
1927
1927
|
let obj_modelFeatures_item_union0 = null;
|
|
1928
1928
|
const obj_modelFeatures_item_union0_error = (() => {
|
|
1929
|
-
const referencepath_modelFeatures_itemValidationError = validate$
|
|
1929
|
+
const referencepath_modelFeatures_itemValidationError = validate$n(obj_modelFeatures_item, path_modelFeatures_item);
|
|
1930
1930
|
if (referencepath_modelFeatures_itemValidationError !== null) {
|
|
1931
1931
|
let message = 'Object doesn\'t match ModelFeature (at "' + path_modelFeatures_item + '")\n';
|
|
1932
1932
|
message += referencepath_modelFeatures_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2132,7 +2132,7 @@ function validate$e(obj, path = 'PredictionOutputRepresentation') {
|
|
|
2132
2132
|
const path_predictions_item = path_predictions + '[' + i + ']';
|
|
2133
2133
|
let obj_predictions_item_union0 = null;
|
|
2134
2134
|
const obj_predictions_item_union0_error = (() => {
|
|
2135
|
-
const referencepath_predictions_itemValidationError = validate$
|
|
2135
|
+
const referencepath_predictions_itemValidationError = validate$h(obj_predictions_item, path_predictions_item);
|
|
2136
2136
|
if (referencepath_predictions_itemValidationError !== null) {
|
|
2137
2137
|
let message = 'Object doesn\'t match PredictionObject (at "' + path_predictions_item + '")\n';
|
|
2138
2138
|
message += referencepath_predictions_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2259,7 +2259,7 @@ function validate$e(obj, path = 'PredictionOutputRepresentation') {
|
|
|
2259
2259
|
}
|
|
2260
2260
|
const obj_status = obj.status;
|
|
2261
2261
|
const path_status = path + '.status';
|
|
2262
|
-
const referencepath_statusValidationError = validate$
|
|
2262
|
+
const referencepath_statusValidationError = validate$g(obj_status, path_status);
|
|
2263
2263
|
if (referencepath_statusValidationError !== null) {
|
|
2264
2264
|
let message = 'Object doesn\'t match Status (at "' + path_status + '")\n';
|
|
2265
2265
|
message += referencepath_statusValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2297,7 +2297,7 @@ function equals$2(existing, incoming) {
|
|
|
2297
2297
|
}
|
|
2298
2298
|
const ingest$2 = function PredictionOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2299
2299
|
if (process.env.NODE_ENV !== 'production') {
|
|
2300
|
-
const validateError = validate$
|
|
2300
|
+
const validateError = validate$f(input);
|
|
2301
2301
|
if (validateError !== null) {
|
|
2302
2302
|
throw validateError;
|
|
2303
2303
|
}
|
|
@@ -2363,7 +2363,7 @@ const createResourceParams$2 = /*#__PURE__*/ createResourceParams$3(predictions_
|
|
|
2363
2363
|
function typeCheckConfig$2(untrustedConfig) {
|
|
2364
2364
|
const config = {};
|
|
2365
2365
|
const untrustedConfig_predictionInput = untrustedConfig.predictionInput;
|
|
2366
|
-
const referencePredictionInputRepresentationValidationError = validate$
|
|
2366
|
+
const referencePredictionInputRepresentationValidationError = validate$o(untrustedConfig_predictionInput);
|
|
2367
2367
|
if (referencePredictionInputRepresentationValidationError === null) {
|
|
2368
2368
|
config.predictionInput = untrustedConfig_predictionInput;
|
|
2369
2369
|
}
|
|
@@ -2411,7 +2411,7 @@ const predictionsAdapterFactory = (luvio) => {
|
|
|
2411
2411
|
};
|
|
2412
2412
|
};
|
|
2413
2413
|
|
|
2414
|
-
function validate$
|
|
2414
|
+
function validate$e(obj, path = 'RecommendationInputRepresentation') {
|
|
2415
2415
|
const v_error = (() => {
|
|
2416
2416
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2417
2417
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2637,7 +2637,7 @@ function validate$d(obj, path = 'RecommendationInputRepresentation') {
|
|
|
2637
2637
|
return v_error === undefined ? null : v_error;
|
|
2638
2638
|
}
|
|
2639
2639
|
|
|
2640
|
-
function validate$
|
|
2640
|
+
function validate$d(obj, path = 'Error') {
|
|
2641
2641
|
const v_error = (() => {
|
|
2642
2642
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2643
2643
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2702,7 +2702,7 @@ function validate$c(obj, path = 'Error') {
|
|
|
2702
2702
|
return v_error === undefined ? null : v_error;
|
|
2703
2703
|
}
|
|
2704
2704
|
|
|
2705
|
-
function validate$
|
|
2705
|
+
function validate$c(obj, path = 'RecommendationActionParam') {
|
|
2706
2706
|
const v_error = (() => {
|
|
2707
2707
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2708
2708
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2774,7 +2774,7 @@ function validate$b(obj, path = 'RecommendationActionParam') {
|
|
|
2774
2774
|
return v_error === undefined ? null : v_error;
|
|
2775
2775
|
}
|
|
2776
2776
|
|
|
2777
|
-
function validate$
|
|
2777
|
+
function validate$b(obj, path = 'Recommendation') {
|
|
2778
2778
|
const v_error = (() => {
|
|
2779
2779
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2780
2780
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2902,7 +2902,7 @@ function validate$a(obj, path = 'Recommendation') {
|
|
|
2902
2902
|
const path_actionStrategyParameters_item = path_actionStrategyParameters + '[' + i + ']';
|
|
2903
2903
|
let obj_actionStrategyParameters_item_union0 = null;
|
|
2904
2904
|
const obj_actionStrategyParameters_item_union0_error = (() => {
|
|
2905
|
-
const referencepath_actionStrategyParameters_itemValidationError = validate$
|
|
2905
|
+
const referencepath_actionStrategyParameters_itemValidationError = validate$c(obj_actionStrategyParameters_item, path_actionStrategyParameters_item);
|
|
2906
2906
|
if (referencepath_actionStrategyParameters_itemValidationError !== null) {
|
|
2907
2907
|
let message = 'Object doesn\'t match RecommendationActionParam (at "' + path_actionStrategyParameters_item + '")\n';
|
|
2908
2908
|
message += referencepath_actionStrategyParameters_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -3101,7 +3101,7 @@ function validate$a(obj, path = 'Recommendation') {
|
|
|
3101
3101
|
return v_error === undefined ? null : v_error;
|
|
3102
3102
|
}
|
|
3103
3103
|
|
|
3104
|
-
function validate$
|
|
3104
|
+
function validate$a(obj, path = 'RcmdStrategyResult') {
|
|
3105
3105
|
const v_error = (() => {
|
|
3106
3106
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3107
3107
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -3117,7 +3117,7 @@ function validate$9(obj, path = 'RcmdStrategyResult') {
|
|
|
3117
3117
|
const path_errors_item = path_errors + '[' + i + ']';
|
|
3118
3118
|
let obj_errors_item_union0 = null;
|
|
3119
3119
|
const obj_errors_item_union0_error = (() => {
|
|
3120
|
-
const referencepath_errors_itemValidationError = validate$
|
|
3120
|
+
const referencepath_errors_itemValidationError = validate$d(obj_errors_item, path_errors_item);
|
|
3121
3121
|
if (referencepath_errors_itemValidationError !== null) {
|
|
3122
3122
|
let message = 'Object doesn\'t match Error (at "' + path_errors_item + '")\n';
|
|
3123
3123
|
message += referencepath_errors_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -3212,7 +3212,7 @@ function validate$9(obj, path = 'RcmdStrategyResult') {
|
|
|
3212
3212
|
const path_recommendations_item = path_recommendations + '[' + i + ']';
|
|
3213
3213
|
let obj_recommendations_item_union0 = null;
|
|
3214
3214
|
const obj_recommendations_item_union0_error = (() => {
|
|
3215
|
-
const referencepath_recommendations_itemValidationError = validate$
|
|
3215
|
+
const referencepath_recommendations_itemValidationError = validate$b(obj_recommendations_item, path_recommendations_item);
|
|
3216
3216
|
if (referencepath_recommendations_itemValidationError !== null) {
|
|
3217
3217
|
let message = 'Object doesn\'t match Recommendation (at "' + path_recommendations_item + '")\n';
|
|
3218
3218
|
message += referencepath_recommendations_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -3273,7 +3273,7 @@ function validate$9(obj, path = 'RcmdStrategyResult') {
|
|
|
3273
3273
|
|
|
3274
3274
|
const TTL$1 = 1000;
|
|
3275
3275
|
const VERSION$1 = "aaf9d28bb6dd45e46359c8fa29159989";
|
|
3276
|
-
function validate$
|
|
3276
|
+
function validate$9(obj, path = 'RecommendationOutputRepresentation') {
|
|
3277
3277
|
const v_error = (() => {
|
|
3278
3278
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3279
3279
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -3380,7 +3380,7 @@ function validate$8(obj, path = 'RecommendationOutputRepresentation') {
|
|
|
3380
3380
|
const path_recommendationStrategyResult_item = path_recommendationStrategyResult + '[' + i + ']';
|
|
3381
3381
|
let obj_recommendationStrategyResult_item_union0 = null;
|
|
3382
3382
|
const obj_recommendationStrategyResult_item_union0_error = (() => {
|
|
3383
|
-
const referencepath_recommendationStrategyResult_itemValidationError = validate$
|
|
3383
|
+
const referencepath_recommendationStrategyResult_itemValidationError = validate$a(obj_recommendationStrategyResult_item, path_recommendationStrategyResult_item);
|
|
3384
3384
|
if (referencepath_recommendationStrategyResult_itemValidationError !== null) {
|
|
3385
3385
|
let message = 'Object doesn\'t match RcmdStrategyResult (at "' + path_recommendationStrategyResult_item + '")\n';
|
|
3386
3386
|
message += referencepath_recommendationStrategyResult_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -3437,7 +3437,7 @@ function validate$8(obj, path = 'RecommendationOutputRepresentation') {
|
|
|
3437
3437
|
}
|
|
3438
3438
|
const obj_status = obj.status;
|
|
3439
3439
|
const path_status = path + '.status';
|
|
3440
|
-
const referencepath_statusValidationError = validate$
|
|
3440
|
+
const referencepath_statusValidationError = validate$g(obj_status, path_status);
|
|
3441
3441
|
if (referencepath_statusValidationError !== null) {
|
|
3442
3442
|
let message = 'Object doesn\'t match Status (at "' + path_status + '")\n';
|
|
3443
3443
|
message += referencepath_statusValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -3531,7 +3531,7 @@ function equals$1(existing, incoming) {
|
|
|
3531
3531
|
}
|
|
3532
3532
|
const ingest$1 = function RecommendationOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
3533
3533
|
if (process.env.NODE_ENV !== 'production') {
|
|
3534
|
-
const validateError = validate$
|
|
3534
|
+
const validateError = validate$9(input);
|
|
3535
3535
|
if (validateError !== null) {
|
|
3536
3536
|
throw validateError;
|
|
3537
3537
|
}
|
|
@@ -3597,7 +3597,7 @@ const createResourceParams$1 = /*#__PURE__*/ createResourceParams$3(fetchRecomme
|
|
|
3597
3597
|
function typeCheckConfig$1(untrustedConfig) {
|
|
3598
3598
|
const config = {};
|
|
3599
3599
|
const untrustedConfig_recommendationInput = untrustedConfig.recommendationInput;
|
|
3600
|
-
const referenceRecommendationInputRepresentationValidationError = validate$
|
|
3600
|
+
const referenceRecommendationInputRepresentationValidationError = validate$e(untrustedConfig_recommendationInput);
|
|
3601
3601
|
if (referenceRecommendationInputRepresentationValidationError === null) {
|
|
3602
3602
|
config.recommendationInput = untrustedConfig_recommendationInput;
|
|
3603
3603
|
}
|
|
@@ -3645,87 +3645,81 @@ const fetchRecommendationsAdapterFactory = (luvio) => {
|
|
|
3645
3645
|
};
|
|
3646
3646
|
};
|
|
3647
3647
|
|
|
3648
|
-
function validate$
|
|
3648
|
+
function validate$8(obj, path = 'NullableCustomAttributesMap') {
|
|
3649
3649
|
const v_error = (() => {
|
|
3650
3650
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3651
3651
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
3652
3652
|
}
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
const
|
|
3656
|
-
|
|
3657
|
-
|
|
3653
|
+
const obj_keys = ObjectKeys(obj);
|
|
3654
|
+
for (let i = 0; i < obj_keys.length; i++) {
|
|
3655
|
+
const key = obj_keys[i];
|
|
3656
|
+
const obj_prop = obj[key];
|
|
3657
|
+
const path_prop = path + '["' + key + '"]';
|
|
3658
|
+
let obj_prop_union0 = null;
|
|
3659
|
+
const obj_prop_union0_error = (() => {
|
|
3660
|
+
if (typeof obj_prop !== 'string') {
|
|
3661
|
+
return new TypeError('Expected "string" but received "' + typeof obj_prop + '" (at "' + path_prop + '")');
|
|
3662
|
+
}
|
|
3663
|
+
})();
|
|
3664
|
+
if (obj_prop_union0_error != null) {
|
|
3665
|
+
obj_prop_union0 = obj_prop_union0_error.message;
|
|
3658
3666
|
}
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3667
|
+
let obj_prop_union1 = null;
|
|
3668
|
+
const obj_prop_union1_error = (() => {
|
|
3669
|
+
if (obj_prop !== null) {
|
|
3670
|
+
return new TypeError('Expected "null" but received "' + typeof obj_prop + '" (at "' + path_prop + '")');
|
|
3671
|
+
}
|
|
3672
|
+
})();
|
|
3673
|
+
if (obj_prop_union1_error != null) {
|
|
3674
|
+
obj_prop_union1 = obj_prop_union1_error.message;
|
|
3665
3675
|
}
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
if (typeof obj_predictionPlatform !== 'string') {
|
|
3671
|
-
return new TypeError('Expected "string" but received "' + typeof obj_predictionPlatform + '" (at "' + path_predictionPlatform + '")');
|
|
3672
|
-
}
|
|
3673
|
-
}
|
|
3674
|
-
const obj_records = obj.records;
|
|
3675
|
-
const path_records = path + '.records';
|
|
3676
|
-
let obj_records_union0 = null;
|
|
3677
|
-
const obj_records_union0_error = (() => {
|
|
3678
|
-
const referencepath_recordsValidationError = validate$y(obj_records, path_records);
|
|
3679
|
-
if (referencepath_recordsValidationError !== null) {
|
|
3680
|
-
let message = 'Object doesn\'t match WrappedList (at "' + path_records + '")\n';
|
|
3681
|
-
message += referencepath_recordsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
3676
|
+
if (obj_prop_union0 && obj_prop_union1) {
|
|
3677
|
+
let message = 'Object doesn\'t match union (at "' + path_prop + '")';
|
|
3678
|
+
message += '\n' + obj_prop_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3679
|
+
message += '\n' + obj_prop_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3682
3680
|
return new TypeError(message);
|
|
3683
3681
|
}
|
|
3684
|
-
})();
|
|
3685
|
-
if (obj_records_union0_error != null) {
|
|
3686
|
-
obj_records_union0 = obj_records_union0_error.message;
|
|
3687
|
-
}
|
|
3688
|
-
let obj_records_union1 = null;
|
|
3689
|
-
const obj_records_union1_error = (() => {
|
|
3690
|
-
if (obj_records !== null) {
|
|
3691
|
-
return new TypeError('Expected "null" but received "' + typeof obj_records + '" (at "' + path_records + '")');
|
|
3692
|
-
}
|
|
3693
|
-
})();
|
|
3694
|
-
if (obj_records_union1_error != null) {
|
|
3695
|
-
obj_records_union1 = obj_records_union1_error.message;
|
|
3696
3682
|
}
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3683
|
+
})();
|
|
3684
|
+
return v_error === undefined ? null : v_error;
|
|
3685
|
+
}
|
|
3686
|
+
|
|
3687
|
+
function validate$7(obj, path = 'CustomAttributesMap') {
|
|
3688
|
+
const v_error = (() => {
|
|
3689
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3690
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
3702
3691
|
}
|
|
3703
|
-
if (obj.
|
|
3704
|
-
const
|
|
3705
|
-
const
|
|
3706
|
-
|
|
3707
|
-
|
|
3692
|
+
if (obj.customAttributes !== undefined) {
|
|
3693
|
+
const obj_customAttributes = obj.customAttributes;
|
|
3694
|
+
const path_customAttributes = path + '.customAttributes';
|
|
3695
|
+
let obj_customAttributes_union0 = null;
|
|
3696
|
+
const obj_customAttributes_union0_error = (() => {
|
|
3697
|
+
const referencepath_customAttributesValidationError = validate$8(obj_customAttributes, path_customAttributes);
|
|
3698
|
+
if (referencepath_customAttributesValidationError !== null) {
|
|
3699
|
+
let message = 'Object doesn\'t match NullableCustomAttributesMap (at "' + path_customAttributes + '")\n';
|
|
3700
|
+
message += referencepath_customAttributesValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
3701
|
+
return new TypeError(message);
|
|
3702
|
+
}
|
|
3703
|
+
})();
|
|
3704
|
+
if (obj_customAttributes_union0_error != null) {
|
|
3705
|
+
obj_customAttributes_union0 = obj_customAttributes_union0_error.message;
|
|
3708
3706
|
}
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3707
|
+
let obj_customAttributes_union1 = null;
|
|
3708
|
+
const obj_customAttributes_union1_error = (() => {
|
|
3709
|
+
if (obj_customAttributes !== null) {
|
|
3710
|
+
return new TypeError('Expected "null" but received "' + typeof obj_customAttributes + '" (at "' + path_customAttributes + '")');
|
|
3711
|
+
}
|
|
3712
|
+
})();
|
|
3713
|
+
if (obj_customAttributes_union1_error != null) {
|
|
3714
|
+
obj_customAttributes_union1 = obj_customAttributes_union1_error.message;
|
|
3715
3715
|
}
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
return new TypeError('Expected "string" but received "' + typeof obj_sortingOrder + '" (at "' + path_sortingOrder + '")');
|
|
3716
|
+
if (obj_customAttributes_union0 && obj_customAttributes_union1) {
|
|
3717
|
+
let message = 'Object doesn\'t match union (at "' + path_customAttributes + '")';
|
|
3718
|
+
message += '\n' + obj_customAttributes_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3719
|
+
message += '\n' + obj_customAttributes_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3720
|
+
return new TypeError(message);
|
|
3722
3721
|
}
|
|
3723
3722
|
}
|
|
3724
|
-
const obj_usecaseName = obj.usecaseName;
|
|
3725
|
-
const path_usecaseName = path + '.usecaseName';
|
|
3726
|
-
if (typeof obj_usecaseName !== 'string') {
|
|
3727
|
-
return new TypeError('Expected "string" but received "' + typeof obj_usecaseName + '" (at "' + path_usecaseName + '")');
|
|
3728
|
-
}
|
|
3729
3723
|
})();
|
|
3730
3724
|
return v_error === undefined ? null : v_error;
|
|
3731
3725
|
}
|
|
@@ -3738,36 +3732,141 @@ function validate$6(obj, path = 'PredictorField') {
|
|
|
3738
3732
|
if (obj.customText !== undefined) {
|
|
3739
3733
|
const obj_customText = obj.customText;
|
|
3740
3734
|
const path_customText = path + '.customText';
|
|
3741
|
-
|
|
3742
|
-
|
|
3735
|
+
let obj_customText_union0 = null;
|
|
3736
|
+
const obj_customText_union0_error = (() => {
|
|
3737
|
+
if (typeof obj_customText !== 'string') {
|
|
3738
|
+
return new TypeError('Expected "string" but received "' + typeof obj_customText + '" (at "' + path_customText + '")');
|
|
3739
|
+
}
|
|
3740
|
+
})();
|
|
3741
|
+
if (obj_customText_union0_error != null) {
|
|
3742
|
+
obj_customText_union0 = obj_customText_union0_error.message;
|
|
3743
|
+
}
|
|
3744
|
+
let obj_customText_union1 = null;
|
|
3745
|
+
const obj_customText_union1_error = (() => {
|
|
3746
|
+
if (obj_customText !== null) {
|
|
3747
|
+
return new TypeError('Expected "null" but received "' + typeof obj_customText + '" (at "' + path_customText + '")');
|
|
3748
|
+
}
|
|
3749
|
+
})();
|
|
3750
|
+
if (obj_customText_union1_error != null) {
|
|
3751
|
+
obj_customText_union1 = obj_customText_union1_error.message;
|
|
3752
|
+
}
|
|
3753
|
+
if (obj_customText_union0 && obj_customText_union1) {
|
|
3754
|
+
let message = 'Object doesn\'t match union (at "' + path_customText + '")';
|
|
3755
|
+
message += '\n' + obj_customText_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3756
|
+
message += '\n' + obj_customText_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3757
|
+
return new TypeError(message);
|
|
3743
3758
|
}
|
|
3744
3759
|
}
|
|
3745
3760
|
if (obj.label !== undefined) {
|
|
3746
3761
|
const obj_label = obj.label;
|
|
3747
3762
|
const path_label = path + '.label';
|
|
3748
|
-
|
|
3749
|
-
|
|
3763
|
+
let obj_label_union0 = null;
|
|
3764
|
+
const obj_label_union0_error = (() => {
|
|
3765
|
+
if (typeof obj_label !== 'string') {
|
|
3766
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
3767
|
+
}
|
|
3768
|
+
})();
|
|
3769
|
+
if (obj_label_union0_error != null) {
|
|
3770
|
+
obj_label_union0 = obj_label_union0_error.message;
|
|
3771
|
+
}
|
|
3772
|
+
let obj_label_union1 = null;
|
|
3773
|
+
const obj_label_union1_error = (() => {
|
|
3774
|
+
if (obj_label !== null) {
|
|
3775
|
+
return new TypeError('Expected "null" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
3776
|
+
}
|
|
3777
|
+
})();
|
|
3778
|
+
if (obj_label_union1_error != null) {
|
|
3779
|
+
obj_label_union1 = obj_label_union1_error.message;
|
|
3780
|
+
}
|
|
3781
|
+
if (obj_label_union0 && obj_label_union1) {
|
|
3782
|
+
let message = 'Object doesn\'t match union (at "' + path_label + '")';
|
|
3783
|
+
message += '\n' + obj_label_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3784
|
+
message += '\n' + obj_label_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3785
|
+
return new TypeError(message);
|
|
3750
3786
|
}
|
|
3751
3787
|
}
|
|
3752
3788
|
if (obj.name !== undefined) {
|
|
3753
3789
|
const obj_name = obj.name;
|
|
3754
3790
|
const path_name = path + '.name';
|
|
3755
|
-
|
|
3756
|
-
|
|
3791
|
+
let obj_name_union0 = null;
|
|
3792
|
+
const obj_name_union0_error = (() => {
|
|
3793
|
+
if (typeof obj_name !== 'string') {
|
|
3794
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
3795
|
+
}
|
|
3796
|
+
})();
|
|
3797
|
+
if (obj_name_union0_error != null) {
|
|
3798
|
+
obj_name_union0 = obj_name_union0_error.message;
|
|
3799
|
+
}
|
|
3800
|
+
let obj_name_union1 = null;
|
|
3801
|
+
const obj_name_union1_error = (() => {
|
|
3802
|
+
if (obj_name !== null) {
|
|
3803
|
+
return new TypeError('Expected "null" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
3804
|
+
}
|
|
3805
|
+
})();
|
|
3806
|
+
if (obj_name_union1_error != null) {
|
|
3807
|
+
obj_name_union1 = obj_name_union1_error.message;
|
|
3808
|
+
}
|
|
3809
|
+
if (obj_name_union0 && obj_name_union1) {
|
|
3810
|
+
let message = 'Object doesn\'t match union (at "' + path_name + '")';
|
|
3811
|
+
message += '\n' + obj_name_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3812
|
+
message += '\n' + obj_name_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3813
|
+
return new TypeError(message);
|
|
3757
3814
|
}
|
|
3758
3815
|
}
|
|
3759
3816
|
if (obj.prescribedValue !== undefined) {
|
|
3760
3817
|
const obj_prescribedValue = obj.prescribedValue;
|
|
3761
3818
|
const path_prescribedValue = path + '.prescribedValue';
|
|
3762
|
-
|
|
3763
|
-
|
|
3819
|
+
let obj_prescribedValue_union0 = null;
|
|
3820
|
+
const obj_prescribedValue_union0_error = (() => {
|
|
3821
|
+
if (typeof obj_prescribedValue !== 'string') {
|
|
3822
|
+
return new TypeError('Expected "string" but received "' + typeof obj_prescribedValue + '" (at "' + path_prescribedValue + '")');
|
|
3823
|
+
}
|
|
3824
|
+
})();
|
|
3825
|
+
if (obj_prescribedValue_union0_error != null) {
|
|
3826
|
+
obj_prescribedValue_union0 = obj_prescribedValue_union0_error.message;
|
|
3827
|
+
}
|
|
3828
|
+
let obj_prescribedValue_union1 = null;
|
|
3829
|
+
const obj_prescribedValue_union1_error = (() => {
|
|
3830
|
+
if (obj_prescribedValue !== null) {
|
|
3831
|
+
return new TypeError('Expected "null" but received "' + typeof obj_prescribedValue + '" (at "' + path_prescribedValue + '")');
|
|
3832
|
+
}
|
|
3833
|
+
})();
|
|
3834
|
+
if (obj_prescribedValue_union1_error != null) {
|
|
3835
|
+
obj_prescribedValue_union1 = obj_prescribedValue_union1_error.message;
|
|
3836
|
+
}
|
|
3837
|
+
if (obj_prescribedValue_union0 && obj_prescribedValue_union1) {
|
|
3838
|
+
let message = 'Object doesn\'t match union (at "' + path_prescribedValue + '")';
|
|
3839
|
+
message += '\n' + obj_prescribedValue_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3840
|
+
message += '\n' + obj_prescribedValue_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3841
|
+
return new TypeError(message);
|
|
3764
3842
|
}
|
|
3765
3843
|
}
|
|
3766
3844
|
if (obj.value !== undefined) {
|
|
3767
3845
|
const obj_value = obj.value;
|
|
3768
3846
|
const path_value = path + '.value';
|
|
3769
|
-
|
|
3770
|
-
|
|
3847
|
+
let obj_value_union0 = null;
|
|
3848
|
+
const obj_value_union0_error = (() => {
|
|
3849
|
+
if (typeof obj_value !== 'string') {
|
|
3850
|
+
return new TypeError('Expected "string" but received "' + typeof obj_value + '" (at "' + path_value + '")');
|
|
3851
|
+
}
|
|
3852
|
+
})();
|
|
3853
|
+
if (obj_value_union0_error != null) {
|
|
3854
|
+
obj_value_union0 = obj_value_union0_error.message;
|
|
3855
|
+
}
|
|
3856
|
+
let obj_value_union1 = null;
|
|
3857
|
+
const obj_value_union1_error = (() => {
|
|
3858
|
+
if (obj_value !== null) {
|
|
3859
|
+
return new TypeError('Expected "null" but received "' + typeof obj_value + '" (at "' + path_value + '")');
|
|
3860
|
+
}
|
|
3861
|
+
})();
|
|
3862
|
+
if (obj_value_union1_error != null) {
|
|
3863
|
+
obj_value_union1 = obj_value_union1_error.message;
|
|
3864
|
+
}
|
|
3865
|
+
if (obj_value_union0 && obj_value_union1) {
|
|
3866
|
+
let message = 'Object doesn\'t match union (at "' + path_value + '")';
|
|
3867
|
+
message += '\n' + obj_value_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3868
|
+
message += '\n' + obj_value_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3869
|
+
return new TypeError(message);
|
|
3771
3870
|
}
|
|
3772
3871
|
}
|
|
3773
3872
|
})();
|
|
@@ -3795,10 +3894,31 @@ function validate$5(obj, path = 'Predictor') {
|
|
|
3795
3894
|
for (let i = 0; i < obj_predictorFields.length; i++) {
|
|
3796
3895
|
const obj_predictorFields_item = obj_predictorFields[i];
|
|
3797
3896
|
const path_predictorFields_item = path_predictorFields + '[' + i + ']';
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3897
|
+
let obj_predictorFields_item_union0 = null;
|
|
3898
|
+
const obj_predictorFields_item_union0_error = (() => {
|
|
3899
|
+
const referencepath_predictorFields_itemValidationError = validate$6(obj_predictorFields_item, path_predictorFields_item);
|
|
3900
|
+
if (referencepath_predictorFields_itemValidationError !== null) {
|
|
3901
|
+
let message = 'Object doesn\'t match PredictorField (at "' + path_predictorFields_item + '")\n';
|
|
3902
|
+
message += referencepath_predictorFields_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
3903
|
+
return new TypeError(message);
|
|
3904
|
+
}
|
|
3905
|
+
})();
|
|
3906
|
+
if (obj_predictorFields_item_union0_error != null) {
|
|
3907
|
+
obj_predictorFields_item_union0 = obj_predictorFields_item_union0_error.message;
|
|
3908
|
+
}
|
|
3909
|
+
let obj_predictorFields_item_union1 = null;
|
|
3910
|
+
const obj_predictorFields_item_union1_error = (() => {
|
|
3911
|
+
if (obj_predictorFields_item !== null) {
|
|
3912
|
+
return new TypeError('Expected "null" but received "' + typeof obj_predictorFields_item + '" (at "' + path_predictorFields_item + '")');
|
|
3913
|
+
}
|
|
3914
|
+
})();
|
|
3915
|
+
if (obj_predictorFields_item_union1_error != null) {
|
|
3916
|
+
obj_predictorFields_item_union1 = obj_predictorFields_item_union1_error.message;
|
|
3917
|
+
}
|
|
3918
|
+
if (obj_predictorFields_item_union0 && obj_predictorFields_item_union1) {
|
|
3919
|
+
let message = 'Object doesn\'t match union (at "' + path_predictorFields_item + '")';
|
|
3920
|
+
message += '\n' + obj_predictorFields_item_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3921
|
+
message += '\n' + obj_predictorFields_item_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3802
3922
|
return new TypeError(message);
|
|
3803
3923
|
}
|
|
3804
3924
|
}
|
|
@@ -3812,11 +3932,63 @@ function validate$4(obj, path = 'PredictionOutput') {
|
|
|
3812
3932
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3813
3933
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
3814
3934
|
}
|
|
3935
|
+
if (obj.customAttributes !== undefined) {
|
|
3936
|
+
const obj_customAttributes = obj.customAttributes;
|
|
3937
|
+
const path_customAttributes = path + '.customAttributes';
|
|
3938
|
+
let obj_customAttributes_union0 = null;
|
|
3939
|
+
const obj_customAttributes_union0_error = (() => {
|
|
3940
|
+
const referencepath_customAttributesValidationError = validate$7(obj_customAttributes, path_customAttributes);
|
|
3941
|
+
if (referencepath_customAttributesValidationError !== null) {
|
|
3942
|
+
let message = 'Object doesn\'t match CustomAttributesMap (at "' + path_customAttributes + '")\n';
|
|
3943
|
+
message += referencepath_customAttributesValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
3944
|
+
return new TypeError(message);
|
|
3945
|
+
}
|
|
3946
|
+
})();
|
|
3947
|
+
if (obj_customAttributes_union0_error != null) {
|
|
3948
|
+
obj_customAttributes_union0 = obj_customAttributes_union0_error.message;
|
|
3949
|
+
}
|
|
3950
|
+
let obj_customAttributes_union1 = null;
|
|
3951
|
+
const obj_customAttributes_union1_error = (() => {
|
|
3952
|
+
if (obj_customAttributes !== null) {
|
|
3953
|
+
return new TypeError('Expected "null" but received "' + typeof obj_customAttributes + '" (at "' + path_customAttributes + '")');
|
|
3954
|
+
}
|
|
3955
|
+
})();
|
|
3956
|
+
if (obj_customAttributes_union1_error != null) {
|
|
3957
|
+
obj_customAttributes_union1 = obj_customAttributes_union1_error.message;
|
|
3958
|
+
}
|
|
3959
|
+
if (obj_customAttributes_union0 && obj_customAttributes_union1) {
|
|
3960
|
+
let message = 'Object doesn\'t match union (at "' + path_customAttributes + '")';
|
|
3961
|
+
message += '\n' + obj_customAttributes_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3962
|
+
message += '\n' + obj_customAttributes_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3963
|
+
return new TypeError(message);
|
|
3964
|
+
}
|
|
3965
|
+
}
|
|
3815
3966
|
if (obj.customPredictionLabel !== undefined) {
|
|
3816
3967
|
const obj_customPredictionLabel = obj.customPredictionLabel;
|
|
3817
3968
|
const path_customPredictionLabel = path + '.customPredictionLabel';
|
|
3818
|
-
|
|
3819
|
-
|
|
3969
|
+
let obj_customPredictionLabel_union0 = null;
|
|
3970
|
+
const obj_customPredictionLabel_union0_error = (() => {
|
|
3971
|
+
if (typeof obj_customPredictionLabel !== 'string') {
|
|
3972
|
+
return new TypeError('Expected "string" but received "' + typeof obj_customPredictionLabel + '" (at "' + path_customPredictionLabel + '")');
|
|
3973
|
+
}
|
|
3974
|
+
})();
|
|
3975
|
+
if (obj_customPredictionLabel_union0_error != null) {
|
|
3976
|
+
obj_customPredictionLabel_union0 = obj_customPredictionLabel_union0_error.message;
|
|
3977
|
+
}
|
|
3978
|
+
let obj_customPredictionLabel_union1 = null;
|
|
3979
|
+
const obj_customPredictionLabel_union1_error = (() => {
|
|
3980
|
+
if (obj_customPredictionLabel !== null) {
|
|
3981
|
+
return new TypeError('Expected "null" but received "' + typeof obj_customPredictionLabel + '" (at "' + path_customPredictionLabel + '")');
|
|
3982
|
+
}
|
|
3983
|
+
})();
|
|
3984
|
+
if (obj_customPredictionLabel_union1_error != null) {
|
|
3985
|
+
obj_customPredictionLabel_union1 = obj_customPredictionLabel_union1_error.message;
|
|
3986
|
+
}
|
|
3987
|
+
if (obj_customPredictionLabel_union0 && obj_customPredictionLabel_union1) {
|
|
3988
|
+
let message = 'Object doesn\'t match union (at "' + path_customPredictionLabel + '")';
|
|
3989
|
+
message += '\n' + obj_customPredictionLabel_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3990
|
+
message += '\n' + obj_customPredictionLabel_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3991
|
+
return new TypeError(message);
|
|
3820
3992
|
}
|
|
3821
3993
|
}
|
|
3822
3994
|
if (obj.predictionScore !== undefined) {
|
|
@@ -3835,10 +4007,31 @@ function validate$4(obj, path = 'PredictionOutput') {
|
|
|
3835
4007
|
for (let i = 0; i < obj_topPredictors.length; i++) {
|
|
3836
4008
|
const obj_topPredictors_item = obj_topPredictors[i];
|
|
3837
4009
|
const path_topPredictors_item = path_topPredictors + '[' + i + ']';
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
4010
|
+
let obj_topPredictors_item_union0 = null;
|
|
4011
|
+
const obj_topPredictors_item_union0_error = (() => {
|
|
4012
|
+
const referencepath_topPredictors_itemValidationError = validate$5(obj_topPredictors_item, path_topPredictors_item);
|
|
4013
|
+
if (referencepath_topPredictors_itemValidationError !== null) {
|
|
4014
|
+
let message = 'Object doesn\'t match Predictor (at "' + path_topPredictors_item + '")\n';
|
|
4015
|
+
message += referencepath_topPredictors_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
4016
|
+
return new TypeError(message);
|
|
4017
|
+
}
|
|
4018
|
+
})();
|
|
4019
|
+
if (obj_topPredictors_item_union0_error != null) {
|
|
4020
|
+
obj_topPredictors_item_union0 = obj_topPredictors_item_union0_error.message;
|
|
4021
|
+
}
|
|
4022
|
+
let obj_topPredictors_item_union1 = null;
|
|
4023
|
+
const obj_topPredictors_item_union1_error = (() => {
|
|
4024
|
+
if (obj_topPredictors_item !== null) {
|
|
4025
|
+
return new TypeError('Expected "null" but received "' + typeof obj_topPredictors_item + '" (at "' + path_topPredictors_item + '")');
|
|
4026
|
+
}
|
|
4027
|
+
})();
|
|
4028
|
+
if (obj_topPredictors_item_union1_error != null) {
|
|
4029
|
+
obj_topPredictors_item_union1 = obj_topPredictors_item_union1_error.message;
|
|
4030
|
+
}
|
|
4031
|
+
if (obj_topPredictors_item_union0 && obj_topPredictors_item_union1) {
|
|
4032
|
+
let message = 'Object doesn\'t match union (at "' + path_topPredictors_item + '")';
|
|
4033
|
+
message += '\n' + obj_topPredictors_item_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
4034
|
+
message += '\n' + obj_topPredictors_item_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3842
4035
|
return new TypeError(message);
|
|
3843
4036
|
}
|
|
3844
4037
|
}
|
|
@@ -3855,15 +4048,57 @@ function validate$3(obj, path = 'FieldCount') {
|
|
|
3855
4048
|
if (obj.count !== undefined) {
|
|
3856
4049
|
const obj_count = obj.count;
|
|
3857
4050
|
const path_count = path + '.count';
|
|
3858
|
-
|
|
3859
|
-
|
|
4051
|
+
let obj_count_union0 = null;
|
|
4052
|
+
const obj_count_union0_error = (() => {
|
|
4053
|
+
if (typeof obj_count !== 'number' || (typeof obj_count === 'number' && Math.floor(obj_count) !== obj_count)) {
|
|
4054
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_count + '" (at "' + path_count + '")');
|
|
4055
|
+
}
|
|
4056
|
+
})();
|
|
4057
|
+
if (obj_count_union0_error != null) {
|
|
4058
|
+
obj_count_union0 = obj_count_union0_error.message;
|
|
4059
|
+
}
|
|
4060
|
+
let obj_count_union1 = null;
|
|
4061
|
+
const obj_count_union1_error = (() => {
|
|
4062
|
+
if (obj_count !== null) {
|
|
4063
|
+
return new TypeError('Expected "null" but received "' + typeof obj_count + '" (at "' + path_count + '")');
|
|
4064
|
+
}
|
|
4065
|
+
})();
|
|
4066
|
+
if (obj_count_union1_error != null) {
|
|
4067
|
+
obj_count_union1 = obj_count_union1_error.message;
|
|
4068
|
+
}
|
|
4069
|
+
if (obj_count_union0 && obj_count_union1) {
|
|
4070
|
+
let message = 'Object doesn\'t match union (at "' + path_count + '")';
|
|
4071
|
+
message += '\n' + obj_count_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
4072
|
+
message += '\n' + obj_count_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
4073
|
+
return new TypeError(message);
|
|
3860
4074
|
}
|
|
3861
4075
|
}
|
|
3862
4076
|
if (obj.fieldValue !== undefined) {
|
|
3863
4077
|
const obj_fieldValue = obj.fieldValue;
|
|
3864
4078
|
const path_fieldValue = path + '.fieldValue';
|
|
3865
|
-
|
|
3866
|
-
|
|
4079
|
+
let obj_fieldValue_union0 = null;
|
|
4080
|
+
const obj_fieldValue_union0_error = (() => {
|
|
4081
|
+
if (typeof obj_fieldValue !== 'string') {
|
|
4082
|
+
return new TypeError('Expected "string" but received "' + typeof obj_fieldValue + '" (at "' + path_fieldValue + '")');
|
|
4083
|
+
}
|
|
4084
|
+
})();
|
|
4085
|
+
if (obj_fieldValue_union0_error != null) {
|
|
4086
|
+
obj_fieldValue_union0 = obj_fieldValue_union0_error.message;
|
|
4087
|
+
}
|
|
4088
|
+
let obj_fieldValue_union1 = null;
|
|
4089
|
+
const obj_fieldValue_union1_error = (() => {
|
|
4090
|
+
if (obj_fieldValue !== null) {
|
|
4091
|
+
return new TypeError('Expected "null" but received "' + typeof obj_fieldValue + '" (at "' + path_fieldValue + '")');
|
|
4092
|
+
}
|
|
4093
|
+
})();
|
|
4094
|
+
if (obj_fieldValue_union1_error != null) {
|
|
4095
|
+
obj_fieldValue_union1 = obj_fieldValue_union1_error.message;
|
|
4096
|
+
}
|
|
4097
|
+
if (obj_fieldValue_union0 && obj_fieldValue_union1) {
|
|
4098
|
+
let message = 'Object doesn\'t match union (at "' + path_fieldValue + '")';
|
|
4099
|
+
message += '\n' + obj_fieldValue_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
4100
|
+
message += '\n' + obj_fieldValue_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
4101
|
+
return new TypeError(message);
|
|
3867
4102
|
}
|
|
3868
4103
|
}
|
|
3869
4104
|
})();
|
|
@@ -3884,8 +4119,29 @@ function validate$2(obj, path = 'PredictionWarning') {
|
|
|
3884
4119
|
for (let i = 0; i < obj_missingFieldNames.length; i++) {
|
|
3885
4120
|
const obj_missingFieldNames_item = obj_missingFieldNames[i];
|
|
3886
4121
|
const path_missingFieldNames_item = path_missingFieldNames + '[' + i + ']';
|
|
3887
|
-
|
|
3888
|
-
|
|
4122
|
+
let obj_missingFieldNames_item_union0 = null;
|
|
4123
|
+
const obj_missingFieldNames_item_union0_error = (() => {
|
|
4124
|
+
if (typeof obj_missingFieldNames_item !== 'string') {
|
|
4125
|
+
return new TypeError('Expected "string" but received "' + typeof obj_missingFieldNames_item + '" (at "' + path_missingFieldNames_item + '")');
|
|
4126
|
+
}
|
|
4127
|
+
})();
|
|
4128
|
+
if (obj_missingFieldNames_item_union0_error != null) {
|
|
4129
|
+
obj_missingFieldNames_item_union0 = obj_missingFieldNames_item_union0_error.message;
|
|
4130
|
+
}
|
|
4131
|
+
let obj_missingFieldNames_item_union1 = null;
|
|
4132
|
+
const obj_missingFieldNames_item_union1_error = (() => {
|
|
4133
|
+
if (obj_missingFieldNames_item !== null) {
|
|
4134
|
+
return new TypeError('Expected "null" but received "' + typeof obj_missingFieldNames_item + '" (at "' + path_missingFieldNames_item + '")');
|
|
4135
|
+
}
|
|
4136
|
+
})();
|
|
4137
|
+
if (obj_missingFieldNames_item_union1_error != null) {
|
|
4138
|
+
obj_missingFieldNames_item_union1 = obj_missingFieldNames_item_union1_error.message;
|
|
4139
|
+
}
|
|
4140
|
+
if (obj_missingFieldNames_item_union0 && obj_missingFieldNames_item_union1) {
|
|
4141
|
+
let message = 'Object doesn\'t match union (at "' + path_missingFieldNames_item + '")';
|
|
4142
|
+
message += '\n' + obj_missingFieldNames_item_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
4143
|
+
message += '\n' + obj_missingFieldNames_item_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
4144
|
+
return new TypeError(message);
|
|
3889
4145
|
}
|
|
3890
4146
|
}
|
|
3891
4147
|
}
|
|
@@ -3898,10 +4154,31 @@ function validate$2(obj, path = 'PredictionWarning') {
|
|
|
3898
4154
|
for (let i = 0; i < obj_outOfBoundFields.length; i++) {
|
|
3899
4155
|
const obj_outOfBoundFields_item = obj_outOfBoundFields[i];
|
|
3900
4156
|
const path_outOfBoundFields_item = path_outOfBoundFields + '[' + i + ']';
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
4157
|
+
let obj_outOfBoundFields_item_union0 = null;
|
|
4158
|
+
const obj_outOfBoundFields_item_union0_error = (() => {
|
|
4159
|
+
const referencepath_outOfBoundFields_itemValidationError = validate$3(obj_outOfBoundFields_item, path_outOfBoundFields_item);
|
|
4160
|
+
if (referencepath_outOfBoundFields_itemValidationError !== null) {
|
|
4161
|
+
let message = 'Object doesn\'t match FieldCount (at "' + path_outOfBoundFields_item + '")\n';
|
|
4162
|
+
message += referencepath_outOfBoundFields_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
4163
|
+
return new TypeError(message);
|
|
4164
|
+
}
|
|
4165
|
+
})();
|
|
4166
|
+
if (obj_outOfBoundFields_item_union0_error != null) {
|
|
4167
|
+
obj_outOfBoundFields_item_union0 = obj_outOfBoundFields_item_union0_error.message;
|
|
4168
|
+
}
|
|
4169
|
+
let obj_outOfBoundFields_item_union1 = null;
|
|
4170
|
+
const obj_outOfBoundFields_item_union1_error = (() => {
|
|
4171
|
+
if (obj_outOfBoundFields_item !== null) {
|
|
4172
|
+
return new TypeError('Expected "null" but received "' + typeof obj_outOfBoundFields_item + '" (at "' + path_outOfBoundFields_item + '")');
|
|
4173
|
+
}
|
|
4174
|
+
})();
|
|
4175
|
+
if (obj_outOfBoundFields_item_union1_error != null) {
|
|
4176
|
+
obj_outOfBoundFields_item_union1 = obj_outOfBoundFields_item_union1_error.message;
|
|
4177
|
+
}
|
|
4178
|
+
if (obj_outOfBoundFields_item_union0 && obj_outOfBoundFields_item_union1) {
|
|
4179
|
+
let message = 'Object doesn\'t match union (at "' + path_outOfBoundFields_item + '")';
|
|
4180
|
+
message += '\n' + obj_outOfBoundFields_item_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
4181
|
+
message += '\n' + obj_outOfBoundFields_item_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3905
4182
|
return new TypeError(message);
|
|
3906
4183
|
}
|
|
3907
4184
|
}
|
|
@@ -3924,10 +4201,31 @@ function validate$1(obj, path = 'PredictionOutputObject') {
|
|
|
3924
4201
|
for (let i = 0; i < obj_errors.length; i++) {
|
|
3925
4202
|
const obj_errors_item = obj_errors[i];
|
|
3926
4203
|
const path_errors_item = path_errors + '[' + i + ']';
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
4204
|
+
let obj_errors_item_union0 = null;
|
|
4205
|
+
const obj_errors_item_union0_error = (() => {
|
|
4206
|
+
const referencepath_errors_itemValidationError = validate$d(obj_errors_item, path_errors_item);
|
|
4207
|
+
if (referencepath_errors_itemValidationError !== null) {
|
|
4208
|
+
let message = 'Object doesn\'t match Error (at "' + path_errors_item + '")\n';
|
|
4209
|
+
message += referencepath_errors_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
4210
|
+
return new TypeError(message);
|
|
4211
|
+
}
|
|
4212
|
+
})();
|
|
4213
|
+
if (obj_errors_item_union0_error != null) {
|
|
4214
|
+
obj_errors_item_union0 = obj_errors_item_union0_error.message;
|
|
4215
|
+
}
|
|
4216
|
+
let obj_errors_item_union1 = null;
|
|
4217
|
+
const obj_errors_item_union1_error = (() => {
|
|
4218
|
+
if (obj_errors_item !== null) {
|
|
4219
|
+
return new TypeError('Expected "null" but received "' + typeof obj_errors_item + '" (at "' + path_errors_item + '")');
|
|
4220
|
+
}
|
|
4221
|
+
})();
|
|
4222
|
+
if (obj_errors_item_union1_error != null) {
|
|
4223
|
+
obj_errors_item_union1 = obj_errors_item_union1_error.message;
|
|
4224
|
+
}
|
|
4225
|
+
if (obj_errors_item_union0 && obj_errors_item_union1) {
|
|
4226
|
+
let message = 'Object doesn\'t match union (at "' + path_errors_item + '")';
|
|
4227
|
+
message += '\n' + obj_errors_item_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
4228
|
+
message += '\n' + obj_errors_item_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3931
4229
|
return new TypeError(message);
|
|
3932
4230
|
}
|
|
3933
4231
|
}
|
|
@@ -3967,10 +4265,31 @@ function validate$1(obj, path = 'PredictionOutputObject') {
|
|
|
3967
4265
|
for (let i = 0; i < obj_predictionOutput.length; i++) {
|
|
3968
4266
|
const obj_predictionOutput_item = obj_predictionOutput[i];
|
|
3969
4267
|
const path_predictionOutput_item = path_predictionOutput + '[' + i + ']';
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
4268
|
+
let obj_predictionOutput_item_union0 = null;
|
|
4269
|
+
const obj_predictionOutput_item_union0_error = (() => {
|
|
4270
|
+
const referencepath_predictionOutput_itemValidationError = validate$4(obj_predictionOutput_item, path_predictionOutput_item);
|
|
4271
|
+
if (referencepath_predictionOutput_itemValidationError !== null) {
|
|
4272
|
+
let message = 'Object doesn\'t match PredictionOutput (at "' + path_predictionOutput_item + '")\n';
|
|
4273
|
+
message += referencepath_predictionOutput_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
4274
|
+
return new TypeError(message);
|
|
4275
|
+
}
|
|
4276
|
+
})();
|
|
4277
|
+
if (obj_predictionOutput_item_union0_error != null) {
|
|
4278
|
+
obj_predictionOutput_item_union0 = obj_predictionOutput_item_union0_error.message;
|
|
4279
|
+
}
|
|
4280
|
+
let obj_predictionOutput_item_union1 = null;
|
|
4281
|
+
const obj_predictionOutput_item_union1_error = (() => {
|
|
4282
|
+
if (obj_predictionOutput_item !== null) {
|
|
4283
|
+
return new TypeError('Expected "null" but received "' + typeof obj_predictionOutput_item + '" (at "' + path_predictionOutput_item + '")');
|
|
4284
|
+
}
|
|
4285
|
+
})();
|
|
4286
|
+
if (obj_predictionOutput_item_union1_error != null) {
|
|
4287
|
+
obj_predictionOutput_item_union1 = obj_predictionOutput_item_union1_error.message;
|
|
4288
|
+
}
|
|
4289
|
+
if (obj_predictionOutput_item_union0 && obj_predictionOutput_item_union1) {
|
|
4290
|
+
let message = 'Object doesn\'t match union (at "' + path_predictionOutput_item + '")';
|
|
4291
|
+
message += '\n' + obj_predictionOutput_item_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
4292
|
+
message += '\n' + obj_predictionOutput_item_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3974
4293
|
return new TypeError(message);
|
|
3975
4294
|
}
|
|
3976
4295
|
}
|
|
@@ -3978,35 +4297,75 @@ function validate$1(obj, path = 'PredictionOutputObject') {
|
|
|
3978
4297
|
if (obj.predictionWarning !== undefined) {
|
|
3979
4298
|
const obj_predictionWarning = obj.predictionWarning;
|
|
3980
4299
|
const path_predictionWarning = path + '.predictionWarning';
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
4300
|
+
let obj_predictionWarning_union0 = null;
|
|
4301
|
+
const obj_predictionWarning_union0_error = (() => {
|
|
4302
|
+
const referencepath_predictionWarningValidationError = validate$2(obj_predictionWarning, path_predictionWarning);
|
|
4303
|
+
if (referencepath_predictionWarningValidationError !== null) {
|
|
4304
|
+
let message = 'Object doesn\'t match PredictionWarning (at "' + path_predictionWarning + '")\n';
|
|
4305
|
+
message += referencepath_predictionWarningValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
4306
|
+
return new TypeError(message);
|
|
4307
|
+
}
|
|
4308
|
+
})();
|
|
4309
|
+
if (obj_predictionWarning_union0_error != null) {
|
|
4310
|
+
obj_predictionWarning_union0 = obj_predictionWarning_union0_error.message;
|
|
4311
|
+
}
|
|
4312
|
+
let obj_predictionWarning_union1 = null;
|
|
4313
|
+
const obj_predictionWarning_union1_error = (() => {
|
|
4314
|
+
if (obj_predictionWarning !== null) {
|
|
4315
|
+
return new TypeError('Expected "null" but received "' + typeof obj_predictionWarning + '" (at "' + path_predictionWarning + '")');
|
|
4316
|
+
}
|
|
4317
|
+
})();
|
|
4318
|
+
if (obj_predictionWarning_union1_error != null) {
|
|
4319
|
+
obj_predictionWarning_union1 = obj_predictionWarning_union1_error.message;
|
|
4320
|
+
}
|
|
4321
|
+
if (obj_predictionWarning_union0 && obj_predictionWarning_union1) {
|
|
4322
|
+
let message = 'Object doesn\'t match union (at "' + path_predictionWarning + '")';
|
|
4323
|
+
message += '\n' + obj_predictionWarning_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
4324
|
+
message += '\n' + obj_predictionWarning_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3985
4325
|
return new TypeError(message);
|
|
3986
4326
|
}
|
|
3987
4327
|
}
|
|
3988
4328
|
const obj_recordId = obj.recordId;
|
|
3989
4329
|
const path_recordId = path + '.recordId';
|
|
3990
|
-
|
|
3991
|
-
|
|
4330
|
+
let obj_recordId_union0 = null;
|
|
4331
|
+
const obj_recordId_union0_error = (() => {
|
|
4332
|
+
if (typeof obj_recordId !== 'string') {
|
|
4333
|
+
return new TypeError('Expected "string" but received "' + typeof obj_recordId + '" (at "' + path_recordId + '")');
|
|
4334
|
+
}
|
|
4335
|
+
})();
|
|
4336
|
+
if (obj_recordId_union0_error != null) {
|
|
4337
|
+
obj_recordId_union0 = obj_recordId_union0_error.message;
|
|
4338
|
+
}
|
|
4339
|
+
let obj_recordId_union1 = null;
|
|
4340
|
+
const obj_recordId_union1_error = (() => {
|
|
4341
|
+
if (obj_recordId !== null) {
|
|
4342
|
+
return new TypeError('Expected "null" but received "' + typeof obj_recordId + '" (at "' + path_recordId + '")');
|
|
4343
|
+
}
|
|
4344
|
+
})();
|
|
4345
|
+
if (obj_recordId_union1_error != null) {
|
|
4346
|
+
obj_recordId_union1 = obj_recordId_union1_error.message;
|
|
4347
|
+
}
|
|
4348
|
+
if (obj_recordId_union0 && obj_recordId_union1) {
|
|
4349
|
+
let message = 'Object doesn\'t match union (at "' + path_recordId + '")';
|
|
4350
|
+
message += '\n' + obj_recordId_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
4351
|
+
message += '\n' + obj_recordId_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
4352
|
+
return new TypeError(message);
|
|
3992
4353
|
}
|
|
3993
4354
|
})();
|
|
3994
4355
|
return v_error === undefined ? null : v_error;
|
|
3995
4356
|
}
|
|
3996
4357
|
|
|
3997
4358
|
const TTL = 1000;
|
|
3998
|
-
const VERSION = "
|
|
4359
|
+
const VERSION = "b41e19933ddff4d62138587673e7d951";
|
|
3999
4360
|
function validate(obj, path = 'PredictionResponseRepresentation') {
|
|
4000
4361
|
const v_error = (() => {
|
|
4001
4362
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
4002
4363
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
4003
4364
|
}
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
return new TypeError('Expected "string" but received "' + typeof obj_predictionModel + '" (at "' + path_predictionModel + '")');
|
|
4009
|
-
}
|
|
4365
|
+
const obj_predictionModel = obj.predictionModel;
|
|
4366
|
+
const path_predictionModel = path + '.predictionModel';
|
|
4367
|
+
if (typeof obj_predictionModel !== 'string') {
|
|
4368
|
+
return new TypeError('Expected "string" but received "' + typeof obj_predictionModel + '" (at "' + path_predictionModel + '")');
|
|
4010
4369
|
}
|
|
4011
4370
|
if (obj.predictionOutputObjects !== undefined) {
|
|
4012
4371
|
const obj_predictionOutputObjects = obj.predictionOutputObjects;
|
|
@@ -4017,10 +4376,31 @@ function validate(obj, path = 'PredictionResponseRepresentation') {
|
|
|
4017
4376
|
for (let i = 0; i < obj_predictionOutputObjects.length; i++) {
|
|
4018
4377
|
const obj_predictionOutputObjects_item = obj_predictionOutputObjects[i];
|
|
4019
4378
|
const path_predictionOutputObjects_item = path_predictionOutputObjects + '[' + i + ']';
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4379
|
+
let obj_predictionOutputObjects_item_union0 = null;
|
|
4380
|
+
const obj_predictionOutputObjects_item_union0_error = (() => {
|
|
4381
|
+
const referencepath_predictionOutputObjects_itemValidationError = validate$1(obj_predictionOutputObjects_item, path_predictionOutputObjects_item);
|
|
4382
|
+
if (referencepath_predictionOutputObjects_itemValidationError !== null) {
|
|
4383
|
+
let message = 'Object doesn\'t match PredictionOutputObject (at "' + path_predictionOutputObjects_item + '")\n';
|
|
4384
|
+
message += referencepath_predictionOutputObjects_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
4385
|
+
return new TypeError(message);
|
|
4386
|
+
}
|
|
4387
|
+
})();
|
|
4388
|
+
if (obj_predictionOutputObjects_item_union0_error != null) {
|
|
4389
|
+
obj_predictionOutputObjects_item_union0 = obj_predictionOutputObjects_item_union0_error.message;
|
|
4390
|
+
}
|
|
4391
|
+
let obj_predictionOutputObjects_item_union1 = null;
|
|
4392
|
+
const obj_predictionOutputObjects_item_union1_error = (() => {
|
|
4393
|
+
if (obj_predictionOutputObjects_item !== null) {
|
|
4394
|
+
return new TypeError('Expected "null" but received "' + typeof obj_predictionOutputObjects_item + '" (at "' + path_predictionOutputObjects_item + '")');
|
|
4395
|
+
}
|
|
4396
|
+
})();
|
|
4397
|
+
if (obj_predictionOutputObjects_item_union1_error != null) {
|
|
4398
|
+
obj_predictionOutputObjects_item_union1 = obj_predictionOutputObjects_item_union1_error.message;
|
|
4399
|
+
}
|
|
4400
|
+
if (obj_predictionOutputObjects_item_union0 && obj_predictionOutputObjects_item_union1) {
|
|
4401
|
+
let message = 'Object doesn\'t match union (at "' + path_predictionOutputObjects_item + '")';
|
|
4402
|
+
message += '\n' + obj_predictionOutputObjects_item_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
4403
|
+
message += '\n' + obj_predictionOutputObjects_item_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
4024
4404
|
return new TypeError(message);
|
|
4025
4405
|
}
|
|
4026
4406
|
}
|
|
@@ -4028,20 +4408,62 @@ function validate(obj, path = 'PredictionResponseRepresentation') {
|
|
|
4028
4408
|
if (obj.predictionPlatform !== undefined) {
|
|
4029
4409
|
const obj_predictionPlatform = obj.predictionPlatform;
|
|
4030
4410
|
const path_predictionPlatform = path + '.predictionPlatform';
|
|
4031
|
-
|
|
4032
|
-
|
|
4411
|
+
let obj_predictionPlatform_union0 = null;
|
|
4412
|
+
const obj_predictionPlatform_union0_error = (() => {
|
|
4413
|
+
if (typeof obj_predictionPlatform !== 'string') {
|
|
4414
|
+
return new TypeError('Expected "string" but received "' + typeof obj_predictionPlatform + '" (at "' + path_predictionPlatform + '")');
|
|
4415
|
+
}
|
|
4416
|
+
})();
|
|
4417
|
+
if (obj_predictionPlatform_union0_error != null) {
|
|
4418
|
+
obj_predictionPlatform_union0 = obj_predictionPlatform_union0_error.message;
|
|
4419
|
+
}
|
|
4420
|
+
let obj_predictionPlatform_union1 = null;
|
|
4421
|
+
const obj_predictionPlatform_union1_error = (() => {
|
|
4422
|
+
if (obj_predictionPlatform !== null) {
|
|
4423
|
+
return new TypeError('Expected "null" but received "' + typeof obj_predictionPlatform + '" (at "' + path_predictionPlatform + '")');
|
|
4424
|
+
}
|
|
4425
|
+
})();
|
|
4426
|
+
if (obj_predictionPlatform_union1_error != null) {
|
|
4427
|
+
obj_predictionPlatform_union1 = obj_predictionPlatform_union1_error.message;
|
|
4428
|
+
}
|
|
4429
|
+
if (obj_predictionPlatform_union0 && obj_predictionPlatform_union1) {
|
|
4430
|
+
let message = 'Object doesn\'t match union (at "' + path_predictionPlatform + '")';
|
|
4431
|
+
message += '\n' + obj_predictionPlatform_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
4432
|
+
message += '\n' + obj_predictionPlatform_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
4433
|
+
return new TypeError(message);
|
|
4033
4434
|
}
|
|
4034
4435
|
}
|
|
4035
4436
|
if (obj.predictionType !== undefined) {
|
|
4036
4437
|
const obj_predictionType = obj.predictionType;
|
|
4037
4438
|
const path_predictionType = path + '.predictionType';
|
|
4038
|
-
|
|
4039
|
-
|
|
4439
|
+
let obj_predictionType_union0 = null;
|
|
4440
|
+
const obj_predictionType_union0_error = (() => {
|
|
4441
|
+
if (typeof obj_predictionType !== 'string') {
|
|
4442
|
+
return new TypeError('Expected "string" but received "' + typeof obj_predictionType + '" (at "' + path_predictionType + '")');
|
|
4443
|
+
}
|
|
4444
|
+
})();
|
|
4445
|
+
if (obj_predictionType_union0_error != null) {
|
|
4446
|
+
obj_predictionType_union0 = obj_predictionType_union0_error.message;
|
|
4447
|
+
}
|
|
4448
|
+
let obj_predictionType_union1 = null;
|
|
4449
|
+
const obj_predictionType_union1_error = (() => {
|
|
4450
|
+
if (obj_predictionType !== null) {
|
|
4451
|
+
return new TypeError('Expected "null" but received "' + typeof obj_predictionType + '" (at "' + path_predictionType + '")');
|
|
4452
|
+
}
|
|
4453
|
+
})();
|
|
4454
|
+
if (obj_predictionType_union1_error != null) {
|
|
4455
|
+
obj_predictionType_union1 = obj_predictionType_union1_error.message;
|
|
4456
|
+
}
|
|
4457
|
+
if (obj_predictionType_union0 && obj_predictionType_union1) {
|
|
4458
|
+
let message = 'Object doesn\'t match union (at "' + path_predictionType + '")';
|
|
4459
|
+
message += '\n' + obj_predictionType_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
4460
|
+
message += '\n' + obj_predictionType_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
4461
|
+
return new TypeError(message);
|
|
4040
4462
|
}
|
|
4041
4463
|
}
|
|
4042
4464
|
const obj_status = obj.status;
|
|
4043
4465
|
const path_status = path + '.status';
|
|
4044
|
-
const referencepath_statusValidationError = validate$
|
|
4466
|
+
const referencepath_statusValidationError = validate$g(obj_status, path_status);
|
|
4045
4467
|
if (referencepath_statusValidationError !== null) {
|
|
4046
4468
|
let message = 'Object doesn\'t match Status (at "' + path_status + '")\n';
|
|
4047
4469
|
message += referencepath_statusValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -4049,8 +4471,29 @@ function validate(obj, path = 'PredictionResponseRepresentation') {
|
|
|
4049
4471
|
}
|
|
4050
4472
|
const obj_usecaseName = obj.usecaseName;
|
|
4051
4473
|
const path_usecaseName = path + '.usecaseName';
|
|
4052
|
-
|
|
4053
|
-
|
|
4474
|
+
let obj_usecaseName_union0 = null;
|
|
4475
|
+
const obj_usecaseName_union0_error = (() => {
|
|
4476
|
+
if (typeof obj_usecaseName !== 'string') {
|
|
4477
|
+
return new TypeError('Expected "string" but received "' + typeof obj_usecaseName + '" (at "' + path_usecaseName + '")');
|
|
4478
|
+
}
|
|
4479
|
+
})();
|
|
4480
|
+
if (obj_usecaseName_union0_error != null) {
|
|
4481
|
+
obj_usecaseName_union0 = obj_usecaseName_union0_error.message;
|
|
4482
|
+
}
|
|
4483
|
+
let obj_usecaseName_union1 = null;
|
|
4484
|
+
const obj_usecaseName_union1_error = (() => {
|
|
4485
|
+
if (obj_usecaseName !== null) {
|
|
4486
|
+
return new TypeError('Expected "null" but received "' + typeof obj_usecaseName + '" (at "' + path_usecaseName + '")');
|
|
4487
|
+
}
|
|
4488
|
+
})();
|
|
4489
|
+
if (obj_usecaseName_union1_error != null) {
|
|
4490
|
+
obj_usecaseName_union1 = obj_usecaseName_union1_error.message;
|
|
4491
|
+
}
|
|
4492
|
+
if (obj_usecaseName_union0 && obj_usecaseName_union1) {
|
|
4493
|
+
let message = 'Object doesn\'t match union (at "' + path_usecaseName + '")';
|
|
4494
|
+
message += '\n' + obj_usecaseName_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
4495
|
+
message += '\n' + obj_usecaseName_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
4496
|
+
return new TypeError(message);
|
|
4054
4497
|
}
|
|
4055
4498
|
})();
|
|
4056
4499
|
return v_error === undefined ? null : v_error;
|
|
@@ -4143,16 +4586,55 @@ function createResourceRequest(config) {
|
|
|
4143
4586
|
|
|
4144
4587
|
const adapterName = 'getPredictions';
|
|
4145
4588
|
const getPredictions_ConfigPropertyMetadata = [
|
|
4146
|
-
generateParamConfigMetadata('
|
|
4589
|
+
generateParamConfigMetadata('maxInsights', false, 2 /* Body */, 4 /* Unsupported */),
|
|
4590
|
+
generateParamConfigMetadata('predictionModel', true, 2 /* Body */, 0 /* String */),
|
|
4591
|
+
generateParamConfigMetadata('predictionPlatform', false, 2 /* Body */, 4 /* Unsupported */),
|
|
4592
|
+
generateParamConfigMetadata('records', false, 2 /* Body */, 4 /* Unsupported */),
|
|
4593
|
+
generateParamConfigMetadata('scoreFilterCriteria', false, 2 /* Body */, 4 /* Unsupported */),
|
|
4594
|
+
generateParamConfigMetadata('scoringThreshold', false, 2 /* Body */, 2 /* Number */),
|
|
4595
|
+
generateParamConfigMetadata('sortingOrder', false, 2 /* Body */, 4 /* Unsupported */),
|
|
4596
|
+
generateParamConfigMetadata('usecaseName', true, 2 /* Body */, 0 /* String */),
|
|
4147
4597
|
];
|
|
4148
4598
|
const getPredictions_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getPredictions_ConfigPropertyMetadata);
|
|
4149
4599
|
const createResourceParams = /*#__PURE__*/ createResourceParams$3(getPredictions_ConfigPropertyMetadata);
|
|
4150
4600
|
function typeCheckConfig(untrustedConfig) {
|
|
4151
4601
|
const config = {};
|
|
4152
|
-
|
|
4153
|
-
const
|
|
4154
|
-
if (
|
|
4155
|
-
config.
|
|
4602
|
+
typeCheckConfig$3(untrustedConfig, config, getPredictions_ConfigPropertyMetadata);
|
|
4603
|
+
const untrustedConfig_maxInsights = untrustedConfig.maxInsights;
|
|
4604
|
+
if (typeof untrustedConfig_maxInsights === 'number' && Math.floor(untrustedConfig_maxInsights) === untrustedConfig_maxInsights) {
|
|
4605
|
+
config.maxInsights = untrustedConfig_maxInsights;
|
|
4606
|
+
}
|
|
4607
|
+
if (untrustedConfig_maxInsights === null) {
|
|
4608
|
+
config.maxInsights = untrustedConfig_maxInsights;
|
|
4609
|
+
}
|
|
4610
|
+
const untrustedConfig_predictionPlatform = untrustedConfig.predictionPlatform;
|
|
4611
|
+
if (typeof untrustedConfig_predictionPlatform === 'string') {
|
|
4612
|
+
config.predictionPlatform = untrustedConfig_predictionPlatform;
|
|
4613
|
+
}
|
|
4614
|
+
if (untrustedConfig_predictionPlatform === null) {
|
|
4615
|
+
config.predictionPlatform = untrustedConfig_predictionPlatform;
|
|
4616
|
+
}
|
|
4617
|
+
const untrustedConfig_records = untrustedConfig.records;
|
|
4618
|
+
const referenceWrappedListValidationError = validate$z(untrustedConfig_records);
|
|
4619
|
+
if (referenceWrappedListValidationError === null) {
|
|
4620
|
+
config.records = untrustedConfig_records;
|
|
4621
|
+
}
|
|
4622
|
+
if (untrustedConfig_records === null) {
|
|
4623
|
+
config.records = untrustedConfig_records;
|
|
4624
|
+
}
|
|
4625
|
+
const untrustedConfig_scoreFilterCriteria = untrustedConfig.scoreFilterCriteria;
|
|
4626
|
+
if (typeof untrustedConfig_scoreFilterCriteria === 'string') {
|
|
4627
|
+
config.scoreFilterCriteria = untrustedConfig_scoreFilterCriteria;
|
|
4628
|
+
}
|
|
4629
|
+
if (untrustedConfig_scoreFilterCriteria === null) {
|
|
4630
|
+
config.scoreFilterCriteria = untrustedConfig_scoreFilterCriteria;
|
|
4631
|
+
}
|
|
4632
|
+
const untrustedConfig_sortingOrder = untrustedConfig.sortingOrder;
|
|
4633
|
+
if (typeof untrustedConfig_sortingOrder === 'string') {
|
|
4634
|
+
config.sortingOrder = untrustedConfig_sortingOrder;
|
|
4635
|
+
}
|
|
4636
|
+
if (untrustedConfig_sortingOrder === null) {
|
|
4637
|
+
config.sortingOrder = untrustedConfig_sortingOrder;
|
|
4156
4638
|
}
|
|
4157
4639
|
return config;
|
|
4158
4640
|
}
|