@salesforce/lds-adapters-industries-einstein-aiaccelerator 1.100.2
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/LICENSE.txt +82 -0
- package/dist/es/es2018/industries-einstein-aiaccelerator.js +3905 -0
- package/dist/types/src/generated/adapters/adapter-utils.d.ts +66 -0
- package/dist/types/src/generated/adapters/fetchRecommendations.d.ts +15 -0
- package/dist/types/src/generated/adapters/predictions.d.ts +15 -0
- package/dist/types/src/generated/artifacts/main.d.ts +2 -0
- package/dist/types/src/generated/artifacts/sfdc.d.ts +3 -0
- package/dist/types/src/generated/resources/postConnectAiacceleratorPredictions.d.ts +13 -0
- package/dist/types/src/generated/resources/postConnectAiacceleratorRecommendations.d.ts +13 -0
- package/dist/types/src/generated/types/Column.d.ts +38 -0
- package/dist/types/src/generated/types/ColumnMapWrap.d.ts +30 -0
- package/dist/types/src/generated/types/Error.d.ts +32 -0
- package/dist/types/src/generated/types/FeatureExtractionParametersList.d.ts +30 -0
- package/dist/types/src/generated/types/FeatureExtractionParametersMapValue.d.ts +30 -0
- package/dist/types/src/generated/types/Insight.d.ts +33 -0
- package/dist/types/src/generated/types/InsightsSettingsMap.d.ts +30 -0
- package/dist/types/src/generated/types/ModelFeature.d.ts +35 -0
- package/dist/types/src/generated/types/NullableColumnMap.d.ts +28 -0
- package/dist/types/src/generated/types/NullableFeatureExtractionParametersMapValue.d.ts +26 -0
- package/dist/types/src/generated/types/NullableInsightsSettingsMap.d.ts +28 -0
- package/dist/types/src/generated/types/NullableModel.d.ts +28 -0
- package/dist/types/src/generated/types/Prediction.d.ts +43 -0
- package/dist/types/src/generated/types/PredictionInputRepresentation.d.ts +106 -0
- package/dist/types/src/generated/types/PredictionInputWrapperRepresentation.d.ts +29 -0
- package/dist/types/src/generated/types/PredictionObject.d.ts +41 -0
- package/dist/types/src/generated/types/PredictionOutputRepresentation.d.ts +99 -0
- package/dist/types/src/generated/types/Prescription.d.ts +33 -0
- package/dist/types/src/generated/types/RawDataInputRepresentation.d.ts +29 -0
- package/dist/types/src/generated/types/RawDataInputWrap.d.ts +29 -0
- package/dist/types/src/generated/types/RawDataList.d.ts +30 -0
- package/dist/types/src/generated/types/RcmdStrategyResult.d.ts +46 -0
- package/dist/types/src/generated/types/Recommendation.d.ts +60 -0
- package/dist/types/src/generated/types/RecommendationActionParam.d.ts +35 -0
- package/dist/types/src/generated/types/RecommendationInputRepresentation.d.ts +54 -0
- package/dist/types/src/generated/types/RecommendationInputWrapperRepresentation.d.ts +29 -0
- package/dist/types/src/generated/types/RecommendationOutputRepresentation.d.ts +62 -0
- package/dist/types/src/generated/types/Status.d.ts +32 -0
- package/dist/types/src/generated/types/Suggestion.d.ts +33 -0
- package/dist/types/src/generated/types/WrappedList.d.ts +29 -0
- package/dist/types/src/generated/types/type-utils.d.ts +39 -0
- package/dist/umd/es2018/industries-einstein-aiaccelerator.js +3914 -0
- package/dist/umd/es5/industries-einstein-aiaccelerator.js +4056 -0
- package/package.json +66 -0
- package/sfdc/index.d.ts +1 -0
- package/sfdc/index.js +3935 -0
- package/src/raml/api.raml +705 -0
- package/src/raml/luvio.raml +31 -0
|
@@ -0,0 +1,4056 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2022, Salesforce, Inc.,
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* For full license text, see the LICENSE.txt file
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
(function (global, factory) {
|
|
8
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@luvio/engine')) :
|
|
9
|
+
typeof define === 'function' && define.amd ? define(['exports', '@luvio/engine'], factory) :
|
|
10
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["industriesEinstein-aiaccelerator"] = {}, global.engine));
|
|
11
|
+
})(this, (function (exports, engine) { 'use strict';
|
|
12
|
+
|
|
13
|
+
var ObjectPrototypeHasOwnProperty = Object.prototype.hasOwnProperty;
|
|
14
|
+
var ObjectKeys$1 = Object.keys;
|
|
15
|
+
var ArrayIsArray$1 = Array.isArray;
|
|
16
|
+
/**
|
|
17
|
+
* Validates an adapter config is well-formed.
|
|
18
|
+
* @param config The config to validate.
|
|
19
|
+
* @param adapter The adapter validation configuration.
|
|
20
|
+
* @param oneOf The keys the config must contain at least one of.
|
|
21
|
+
* @throws A TypeError if config doesn't satisfy the adapter's config validation.
|
|
22
|
+
*/
|
|
23
|
+
function validateConfig(config, adapter, oneOf) {
|
|
24
|
+
var displayName = adapter.displayName;
|
|
25
|
+
var _a = adapter.parameters, required = _a.required, optional = _a.optional, unsupported = _a.unsupported;
|
|
26
|
+
if (config === undefined ||
|
|
27
|
+
required.every(function (req) { return ObjectPrototypeHasOwnProperty.call(config, req); }) === false) {
|
|
28
|
+
throw new TypeError("adapter ".concat(displayName, " configuration must specify ").concat(required.sort().join(', ')));
|
|
29
|
+
}
|
|
30
|
+
if (oneOf && oneOf.some(function (req) { return ObjectPrototypeHasOwnProperty.call(config, req); }) === false) {
|
|
31
|
+
throw new TypeError("adapter ".concat(displayName, " configuration must specify one of ").concat(oneOf.sort().join(', ')));
|
|
32
|
+
}
|
|
33
|
+
if (unsupported !== undefined &&
|
|
34
|
+
unsupported.some(function (req) { return ObjectPrototypeHasOwnProperty.call(config, req); })) {
|
|
35
|
+
throw new TypeError("adapter ".concat(displayName, " does not yet support ").concat(unsupported.sort().join(', ')));
|
|
36
|
+
}
|
|
37
|
+
var supported = required.concat(optional);
|
|
38
|
+
if (ObjectKeys$1(config).some(function (key) { return !supported.includes(key); })) {
|
|
39
|
+
throw new TypeError("adapter ".concat(displayName, " configuration supports only ").concat(supported.sort().join(', ')));
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function untrustedIsObject(untrusted) {
|
|
43
|
+
return typeof untrusted === 'object' && untrusted !== null && ArrayIsArray$1(untrusted) === false;
|
|
44
|
+
}
|
|
45
|
+
function areRequiredParametersPresent(config, configPropertyNames) {
|
|
46
|
+
return configPropertyNames.parameters.required.every(function (req) { return req in config; });
|
|
47
|
+
}
|
|
48
|
+
var keyPrefix = 'Einstein-AIAccelerator';
|
|
49
|
+
|
|
50
|
+
var ObjectFreeze = Object.freeze, ObjectKeys = Object.keys;
|
|
51
|
+
var ArrayIsArray = Array.isArray;
|
|
52
|
+
var JSONStringify = JSON.stringify;
|
|
53
|
+
function deepFreeze$e(value) {
|
|
54
|
+
// No need to freeze primitives
|
|
55
|
+
if (typeof value !== 'object' || value === null) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
if (ArrayIsArray(value)) {
|
|
59
|
+
for (var i = 0, len = value.length; i < len; i += 1) {
|
|
60
|
+
deepFreeze$e(value[i]);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
var keys = ObjectKeys(value);
|
|
65
|
+
for (var i = 0, len = keys.length; i < len; i += 1) {
|
|
66
|
+
deepFreeze$e(value[keys[i]]);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
ObjectFreeze(value);
|
|
70
|
+
}
|
|
71
|
+
function createLink(ref) {
|
|
72
|
+
return {
|
|
73
|
+
__ref: engine.serializeStructuredKey(ref),
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function validate$q(obj, path) {
|
|
78
|
+
if (path === void 0) { path = 'WrappedList'; }
|
|
79
|
+
var v_error = (function () {
|
|
80
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
81
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
82
|
+
}
|
|
83
|
+
var obj_wrappedList = obj.wrappedList;
|
|
84
|
+
var path_wrappedList = path + '.wrappedList';
|
|
85
|
+
if (!ArrayIsArray(obj_wrappedList)) {
|
|
86
|
+
return new TypeError('Expected "array" but received "' + typeof obj_wrappedList + '" (at "' + path_wrappedList + '")');
|
|
87
|
+
}
|
|
88
|
+
var _loop_1 = function (i) {
|
|
89
|
+
var obj_wrappedList_item = obj_wrappedList[i];
|
|
90
|
+
var path_wrappedList_item = path_wrappedList + '[' + i + ']';
|
|
91
|
+
var obj_wrappedList_item_union0 = null;
|
|
92
|
+
var obj_wrappedList_item_union0_error = (function () {
|
|
93
|
+
if (typeof obj_wrappedList_item !== 'string') {
|
|
94
|
+
return new TypeError('Expected "string" but received "' + typeof obj_wrappedList_item + '" (at "' + path_wrappedList_item + '")');
|
|
95
|
+
}
|
|
96
|
+
})();
|
|
97
|
+
if (obj_wrappedList_item_union0_error != null) {
|
|
98
|
+
obj_wrappedList_item_union0 = obj_wrappedList_item_union0_error.message;
|
|
99
|
+
}
|
|
100
|
+
var obj_wrappedList_item_union1 = null;
|
|
101
|
+
var obj_wrappedList_item_union1_error = (function () {
|
|
102
|
+
if (obj_wrappedList_item !== null) {
|
|
103
|
+
return new TypeError('Expected "null" but received "' + typeof obj_wrappedList_item + '" (at "' + path_wrappedList_item + '")');
|
|
104
|
+
}
|
|
105
|
+
})();
|
|
106
|
+
if (obj_wrappedList_item_union1_error != null) {
|
|
107
|
+
obj_wrappedList_item_union1 = obj_wrappedList_item_union1_error.message;
|
|
108
|
+
}
|
|
109
|
+
if (obj_wrappedList_item_union0 && obj_wrappedList_item_union1) {
|
|
110
|
+
var message = 'Object doesn\'t match union (at "' + path_wrappedList_item + '")';
|
|
111
|
+
message += '\n' + obj_wrappedList_item_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
112
|
+
message += '\n' + obj_wrappedList_item_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
113
|
+
return { value: new TypeError(message) };
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
for (var i = 0; i < obj_wrappedList.length; i++) {
|
|
117
|
+
var state_1 = _loop_1(i);
|
|
118
|
+
if (typeof state_1 === "object")
|
|
119
|
+
return state_1.value;
|
|
120
|
+
}
|
|
121
|
+
})();
|
|
122
|
+
return v_error === undefined ? null : v_error;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
function validate$p(obj, path) {
|
|
126
|
+
if (path === void 0) { path = 'NullableColumnMap'; }
|
|
127
|
+
var v_error = (function () {
|
|
128
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
129
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
130
|
+
}
|
|
131
|
+
var obj_keys = ObjectKeys(obj);
|
|
132
|
+
var _loop_1 = function (i) {
|
|
133
|
+
var key = obj_keys[i];
|
|
134
|
+
var obj_prop = obj[key];
|
|
135
|
+
var path_prop = path + '["' + key + '"]';
|
|
136
|
+
var obj_prop_union0 = null;
|
|
137
|
+
var obj_prop_union0_error = (function () {
|
|
138
|
+
if (typeof obj_prop !== 'string') {
|
|
139
|
+
return new TypeError('Expected "string" but received "' + typeof obj_prop + '" (at "' + path_prop + '")');
|
|
140
|
+
}
|
|
141
|
+
})();
|
|
142
|
+
if (obj_prop_union0_error != null) {
|
|
143
|
+
obj_prop_union0 = obj_prop_union0_error.message;
|
|
144
|
+
}
|
|
145
|
+
var obj_prop_union1 = null;
|
|
146
|
+
var obj_prop_union1_error = (function () {
|
|
147
|
+
if (obj_prop !== null) {
|
|
148
|
+
return new TypeError('Expected "null" but received "' + typeof obj_prop + '" (at "' + path_prop + '")');
|
|
149
|
+
}
|
|
150
|
+
})();
|
|
151
|
+
if (obj_prop_union1_error != null) {
|
|
152
|
+
obj_prop_union1 = obj_prop_union1_error.message;
|
|
153
|
+
}
|
|
154
|
+
if (obj_prop_union0 && obj_prop_union1) {
|
|
155
|
+
var message = 'Object doesn\'t match union (at "' + path_prop + '")';
|
|
156
|
+
message += '\n' + obj_prop_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
157
|
+
message += '\n' + obj_prop_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
158
|
+
return { value: new TypeError(message) };
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
for (var i = 0; i < obj_keys.length; i++) {
|
|
162
|
+
var state_1 = _loop_1(i);
|
|
163
|
+
if (typeof state_1 === "object")
|
|
164
|
+
return state_1.value;
|
|
165
|
+
}
|
|
166
|
+
})();
|
|
167
|
+
return v_error === undefined ? null : v_error;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
function validate$o(obj, path) {
|
|
171
|
+
if (path === void 0) { path = 'ColumnMapWrap'; }
|
|
172
|
+
var v_error = (function () {
|
|
173
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
174
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
175
|
+
}
|
|
176
|
+
var obj_columnMap = obj.columnMap;
|
|
177
|
+
var path_columnMap = path + '.columnMap';
|
|
178
|
+
var obj_columnMap_union0 = null;
|
|
179
|
+
var obj_columnMap_union0_error = (function () {
|
|
180
|
+
var referencepath_columnMapValidationError = validate$p(obj_columnMap, path_columnMap);
|
|
181
|
+
if (referencepath_columnMapValidationError !== null) {
|
|
182
|
+
var message = 'Object doesn\'t match NullableColumnMap (at "' + path_columnMap + '")\n';
|
|
183
|
+
message += referencepath_columnMapValidationError.message.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
184
|
+
return new TypeError(message);
|
|
185
|
+
}
|
|
186
|
+
})();
|
|
187
|
+
if (obj_columnMap_union0_error != null) {
|
|
188
|
+
obj_columnMap_union0 = obj_columnMap_union0_error.message;
|
|
189
|
+
}
|
|
190
|
+
var obj_columnMap_union1 = null;
|
|
191
|
+
var obj_columnMap_union1_error = (function () {
|
|
192
|
+
if (obj_columnMap !== null) {
|
|
193
|
+
return new TypeError('Expected "null" but received "' + typeof obj_columnMap + '" (at "' + path_columnMap + '")');
|
|
194
|
+
}
|
|
195
|
+
})();
|
|
196
|
+
if (obj_columnMap_union1_error != null) {
|
|
197
|
+
obj_columnMap_union1 = obj_columnMap_union1_error.message;
|
|
198
|
+
}
|
|
199
|
+
if (obj_columnMap_union0 && obj_columnMap_union1) {
|
|
200
|
+
var message = 'Object doesn\'t match union (at "' + path_columnMap + '")';
|
|
201
|
+
message += '\n' + obj_columnMap_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
202
|
+
message += '\n' + obj_columnMap_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
203
|
+
return new TypeError(message);
|
|
204
|
+
}
|
|
205
|
+
})();
|
|
206
|
+
return v_error === undefined ? null : v_error;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
function validate$n(obj, path) {
|
|
210
|
+
if (path === void 0) { path = 'NullableFeatureExtractionParametersMapValue'; }
|
|
211
|
+
var v_error = (function () {
|
|
212
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
213
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
214
|
+
}
|
|
215
|
+
})();
|
|
216
|
+
return v_error === undefined ? null : v_error;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
function validate$m(obj, path) {
|
|
220
|
+
if (path === void 0) { path = 'FeatureExtractionParametersMapValue'; }
|
|
221
|
+
var v_error = (function () {
|
|
222
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
223
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
224
|
+
}
|
|
225
|
+
if (obj.featureExtractionParametersMapValue !== undefined) {
|
|
226
|
+
var obj_featureExtractionParametersMapValue_1 = obj.featureExtractionParametersMapValue;
|
|
227
|
+
var path_featureExtractionParametersMapValue_1 = path + '.featureExtractionParametersMapValue';
|
|
228
|
+
var obj_featureExtractionParametersMapValue_union0 = null;
|
|
229
|
+
var obj_featureExtractionParametersMapValue_union0_error = (function () {
|
|
230
|
+
var referencepath_featureExtractionParametersMapValueValidationError = validate$n(obj_featureExtractionParametersMapValue_1, path_featureExtractionParametersMapValue_1);
|
|
231
|
+
if (referencepath_featureExtractionParametersMapValueValidationError !== null) {
|
|
232
|
+
var message = 'Object doesn\'t match NullableFeatureExtractionParametersMapValue (at "' + path_featureExtractionParametersMapValue_1 + '")\n';
|
|
233
|
+
message += referencepath_featureExtractionParametersMapValueValidationError.message.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
234
|
+
return new TypeError(message);
|
|
235
|
+
}
|
|
236
|
+
})();
|
|
237
|
+
if (obj_featureExtractionParametersMapValue_union0_error != null) {
|
|
238
|
+
obj_featureExtractionParametersMapValue_union0 = obj_featureExtractionParametersMapValue_union0_error.message;
|
|
239
|
+
}
|
|
240
|
+
var obj_featureExtractionParametersMapValue_union1 = null;
|
|
241
|
+
var obj_featureExtractionParametersMapValue_union1_error = (function () {
|
|
242
|
+
if (obj_featureExtractionParametersMapValue_1 !== null) {
|
|
243
|
+
return new TypeError('Expected "null" but received "' + typeof obj_featureExtractionParametersMapValue_1 + '" (at "' + path_featureExtractionParametersMapValue_1 + '")');
|
|
244
|
+
}
|
|
245
|
+
})();
|
|
246
|
+
if (obj_featureExtractionParametersMapValue_union1_error != null) {
|
|
247
|
+
obj_featureExtractionParametersMapValue_union1 = obj_featureExtractionParametersMapValue_union1_error.message;
|
|
248
|
+
}
|
|
249
|
+
if (obj_featureExtractionParametersMapValue_union0 && obj_featureExtractionParametersMapValue_union1) {
|
|
250
|
+
var message = 'Object doesn\'t match union (at "' + path_featureExtractionParametersMapValue_1 + '")';
|
|
251
|
+
message += '\n' + obj_featureExtractionParametersMapValue_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
252
|
+
message += '\n' + obj_featureExtractionParametersMapValue_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
253
|
+
return new TypeError(message);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
})();
|
|
257
|
+
return v_error === undefined ? null : v_error;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
function validate$l(obj, path) {
|
|
261
|
+
if (path === void 0) { path = 'FeatureExtractionParametersList'; }
|
|
262
|
+
var v_error = (function () {
|
|
263
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
264
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
265
|
+
}
|
|
266
|
+
if (obj.featureExtractionParameters !== undefined) {
|
|
267
|
+
var obj_featureExtractionParameters = obj.featureExtractionParameters;
|
|
268
|
+
var path_featureExtractionParameters = path + '.featureExtractionParameters';
|
|
269
|
+
if (!ArrayIsArray(obj_featureExtractionParameters)) {
|
|
270
|
+
return new TypeError('Expected "array" but received "' + typeof obj_featureExtractionParameters + '" (at "' + path_featureExtractionParameters + '")');
|
|
271
|
+
}
|
|
272
|
+
var _loop_1 = function (i) {
|
|
273
|
+
var obj_featureExtractionParameters_item = obj_featureExtractionParameters[i];
|
|
274
|
+
var path_featureExtractionParameters_item = path_featureExtractionParameters + '[' + i + ']';
|
|
275
|
+
var obj_featureExtractionParameters_item_union0 = null;
|
|
276
|
+
var obj_featureExtractionParameters_item_union0_error = (function () {
|
|
277
|
+
var referencepath_featureExtractionParameters_itemValidationError = validate$m(obj_featureExtractionParameters_item, path_featureExtractionParameters_item);
|
|
278
|
+
if (referencepath_featureExtractionParameters_itemValidationError !== null) {
|
|
279
|
+
var message = 'Object doesn\'t match FeatureExtractionParametersMapValue (at "' + path_featureExtractionParameters_item + '")\n';
|
|
280
|
+
message += referencepath_featureExtractionParameters_itemValidationError.message.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
281
|
+
return new TypeError(message);
|
|
282
|
+
}
|
|
283
|
+
})();
|
|
284
|
+
if (obj_featureExtractionParameters_item_union0_error != null) {
|
|
285
|
+
obj_featureExtractionParameters_item_union0 = obj_featureExtractionParameters_item_union0_error.message;
|
|
286
|
+
}
|
|
287
|
+
var obj_featureExtractionParameters_item_union1 = null;
|
|
288
|
+
var obj_featureExtractionParameters_item_union1_error = (function () {
|
|
289
|
+
if (obj_featureExtractionParameters_item !== null) {
|
|
290
|
+
return new TypeError('Expected "null" but received "' + typeof obj_featureExtractionParameters_item + '" (at "' + path_featureExtractionParameters_item + '")');
|
|
291
|
+
}
|
|
292
|
+
})();
|
|
293
|
+
if (obj_featureExtractionParameters_item_union1_error != null) {
|
|
294
|
+
obj_featureExtractionParameters_item_union1 = obj_featureExtractionParameters_item_union1_error.message;
|
|
295
|
+
}
|
|
296
|
+
if (obj_featureExtractionParameters_item_union0 && obj_featureExtractionParameters_item_union1) {
|
|
297
|
+
var message = 'Object doesn\'t match union (at "' + path_featureExtractionParameters_item + '")';
|
|
298
|
+
message += '\n' + obj_featureExtractionParameters_item_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
299
|
+
message += '\n' + obj_featureExtractionParameters_item_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
300
|
+
return { value: new TypeError(message) };
|
|
301
|
+
}
|
|
302
|
+
};
|
|
303
|
+
for (var i = 0; i < obj_featureExtractionParameters.length; i++) {
|
|
304
|
+
var state_1 = _loop_1(i);
|
|
305
|
+
if (typeof state_1 === "object")
|
|
306
|
+
return state_1.value;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
})();
|
|
310
|
+
return v_error === undefined ? null : v_error;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
function validate$k(obj, path) {
|
|
314
|
+
if (path === void 0) { path = 'NullableInsightsSettingsMap'; }
|
|
315
|
+
var v_error = (function () {
|
|
316
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
317
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
318
|
+
}
|
|
319
|
+
var obj_keys = ObjectKeys(obj);
|
|
320
|
+
var _loop_1 = function (i) {
|
|
321
|
+
var key = obj_keys[i];
|
|
322
|
+
var obj_prop = obj[key];
|
|
323
|
+
var path_prop = path + '["' + key + '"]';
|
|
324
|
+
var obj_prop_union0 = null;
|
|
325
|
+
var obj_prop_union0_error = (function () {
|
|
326
|
+
if (typeof obj_prop !== 'number' || (typeof obj_prop === 'number' && Math.floor(obj_prop) !== obj_prop)) {
|
|
327
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_prop + '" (at "' + path_prop + '")');
|
|
328
|
+
}
|
|
329
|
+
})();
|
|
330
|
+
if (obj_prop_union0_error != null) {
|
|
331
|
+
obj_prop_union0 = obj_prop_union0_error.message;
|
|
332
|
+
}
|
|
333
|
+
var obj_prop_union1 = null;
|
|
334
|
+
var obj_prop_union1_error = (function () {
|
|
335
|
+
if (obj_prop !== null) {
|
|
336
|
+
return new TypeError('Expected "null" but received "' + typeof obj_prop + '" (at "' + path_prop + '")');
|
|
337
|
+
}
|
|
338
|
+
})();
|
|
339
|
+
if (obj_prop_union1_error != null) {
|
|
340
|
+
obj_prop_union1 = obj_prop_union1_error.message;
|
|
341
|
+
}
|
|
342
|
+
if (obj_prop_union0 && obj_prop_union1) {
|
|
343
|
+
var message = 'Object doesn\'t match union (at "' + path_prop + '")';
|
|
344
|
+
message += '\n' + obj_prop_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
345
|
+
message += '\n' + obj_prop_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
346
|
+
return { value: new TypeError(message) };
|
|
347
|
+
}
|
|
348
|
+
};
|
|
349
|
+
for (var i = 0; i < obj_keys.length; i++) {
|
|
350
|
+
var state_1 = _loop_1(i);
|
|
351
|
+
if (typeof state_1 === "object")
|
|
352
|
+
return state_1.value;
|
|
353
|
+
}
|
|
354
|
+
})();
|
|
355
|
+
return v_error === undefined ? null : v_error;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
function validate$j(obj, path) {
|
|
359
|
+
if (path === void 0) { path = 'InsightsSettingsMap'; }
|
|
360
|
+
var v_error = (function () {
|
|
361
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
362
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
363
|
+
}
|
|
364
|
+
if (obj.insightsSettings !== undefined) {
|
|
365
|
+
var obj_insightsSettings_1 = obj.insightsSettings;
|
|
366
|
+
var path_insightsSettings_1 = path + '.insightsSettings';
|
|
367
|
+
var obj_insightsSettings_union0 = null;
|
|
368
|
+
var obj_insightsSettings_union0_error = (function () {
|
|
369
|
+
var referencepath_insightsSettingsValidationError = validate$k(obj_insightsSettings_1, path_insightsSettings_1);
|
|
370
|
+
if (referencepath_insightsSettingsValidationError !== null) {
|
|
371
|
+
var message = 'Object doesn\'t match NullableInsightsSettingsMap (at "' + path_insightsSettings_1 + '")\n';
|
|
372
|
+
message += referencepath_insightsSettingsValidationError.message.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
373
|
+
return new TypeError(message);
|
|
374
|
+
}
|
|
375
|
+
})();
|
|
376
|
+
if (obj_insightsSettings_union0_error != null) {
|
|
377
|
+
obj_insightsSettings_union0 = obj_insightsSettings_union0_error.message;
|
|
378
|
+
}
|
|
379
|
+
var obj_insightsSettings_union1 = null;
|
|
380
|
+
var obj_insightsSettings_union1_error = (function () {
|
|
381
|
+
if (obj_insightsSettings_1 !== null) {
|
|
382
|
+
return new TypeError('Expected "null" but received "' + typeof obj_insightsSettings_1 + '" (at "' + path_insightsSettings_1 + '")');
|
|
383
|
+
}
|
|
384
|
+
})();
|
|
385
|
+
if (obj_insightsSettings_union1_error != null) {
|
|
386
|
+
obj_insightsSettings_union1 = obj_insightsSettings_union1_error.message;
|
|
387
|
+
}
|
|
388
|
+
if (obj_insightsSettings_union0 && obj_insightsSettings_union1) {
|
|
389
|
+
var message = 'Object doesn\'t match union (at "' + path_insightsSettings_1 + '")';
|
|
390
|
+
message += '\n' + obj_insightsSettings_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
391
|
+
message += '\n' + obj_insightsSettings_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
392
|
+
return new TypeError(message);
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
})();
|
|
396
|
+
return v_error === undefined ? null : v_error;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
function validate$i(obj, path) {
|
|
400
|
+
if (path === void 0) { path = 'RawDataInputRepresentation'; }
|
|
401
|
+
var v_error = (function () {
|
|
402
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
403
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
404
|
+
}
|
|
405
|
+
var obj_rawDataInput = obj.rawDataInput;
|
|
406
|
+
var path_rawDataInput = path + '.rawDataInput';
|
|
407
|
+
if (!ArrayIsArray(obj_rawDataInput)) {
|
|
408
|
+
return new TypeError('Expected "array" but received "' + typeof obj_rawDataInput + '" (at "' + path_rawDataInput + '")');
|
|
409
|
+
}
|
|
410
|
+
var _loop_1 = function (i) {
|
|
411
|
+
var obj_rawDataInput_item = obj_rawDataInput[i];
|
|
412
|
+
var path_rawDataInput_item = path_rawDataInput + '[' + i + ']';
|
|
413
|
+
var obj_rawDataInput_item_union0 = null;
|
|
414
|
+
var obj_rawDataInput_item_union0_error = (function () {
|
|
415
|
+
if (typeof obj_rawDataInput_item !== 'string') {
|
|
416
|
+
return new TypeError('Expected "string" but received "' + typeof obj_rawDataInput_item + '" (at "' + path_rawDataInput_item + '")');
|
|
417
|
+
}
|
|
418
|
+
})();
|
|
419
|
+
if (obj_rawDataInput_item_union0_error != null) {
|
|
420
|
+
obj_rawDataInput_item_union0 = obj_rawDataInput_item_union0_error.message;
|
|
421
|
+
}
|
|
422
|
+
var obj_rawDataInput_item_union1 = null;
|
|
423
|
+
var obj_rawDataInput_item_union1_error = (function () {
|
|
424
|
+
if (obj_rawDataInput_item !== null) {
|
|
425
|
+
return new TypeError('Expected "null" but received "' + typeof obj_rawDataInput_item + '" (at "' + path_rawDataInput_item + '")');
|
|
426
|
+
}
|
|
427
|
+
})();
|
|
428
|
+
if (obj_rawDataInput_item_union1_error != null) {
|
|
429
|
+
obj_rawDataInput_item_union1 = obj_rawDataInput_item_union1_error.message;
|
|
430
|
+
}
|
|
431
|
+
if (obj_rawDataInput_item_union0 && obj_rawDataInput_item_union1) {
|
|
432
|
+
var message = 'Object doesn\'t match union (at "' + path_rawDataInput_item + '")';
|
|
433
|
+
message += '\n' + obj_rawDataInput_item_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
434
|
+
message += '\n' + obj_rawDataInput_item_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
435
|
+
return { value: new TypeError(message) };
|
|
436
|
+
}
|
|
437
|
+
};
|
|
438
|
+
for (var i = 0; i < obj_rawDataInput.length; i++) {
|
|
439
|
+
var state_1 = _loop_1(i);
|
|
440
|
+
if (typeof state_1 === "object")
|
|
441
|
+
return state_1.value;
|
|
442
|
+
}
|
|
443
|
+
})();
|
|
444
|
+
return v_error === undefined ? null : v_error;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
function validate$h(obj, path) {
|
|
448
|
+
if (path === void 0) { path = 'RawDataInputWrap'; }
|
|
449
|
+
var v_error = (function () {
|
|
450
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
451
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
452
|
+
}
|
|
453
|
+
var obj_rawDataInputWrap = obj.rawDataInputWrap;
|
|
454
|
+
var path_rawDataInputWrap = path + '.rawDataInputWrap';
|
|
455
|
+
var obj_rawDataInputWrap_union0 = null;
|
|
456
|
+
var obj_rawDataInputWrap_union0_error = (function () {
|
|
457
|
+
var referencepath_rawDataInputWrapValidationError = validate$i(obj_rawDataInputWrap, path_rawDataInputWrap);
|
|
458
|
+
if (referencepath_rawDataInputWrapValidationError !== null) {
|
|
459
|
+
var message = 'Object doesn\'t match RawDataInputRepresentation (at "' + path_rawDataInputWrap + '")\n';
|
|
460
|
+
message += referencepath_rawDataInputWrapValidationError.message.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
461
|
+
return new TypeError(message);
|
|
462
|
+
}
|
|
463
|
+
})();
|
|
464
|
+
if (obj_rawDataInputWrap_union0_error != null) {
|
|
465
|
+
obj_rawDataInputWrap_union0 = obj_rawDataInputWrap_union0_error.message;
|
|
466
|
+
}
|
|
467
|
+
var obj_rawDataInputWrap_union1 = null;
|
|
468
|
+
var obj_rawDataInputWrap_union1_error = (function () {
|
|
469
|
+
if (obj_rawDataInputWrap !== null) {
|
|
470
|
+
return new TypeError('Expected "null" but received "' + typeof obj_rawDataInputWrap + '" (at "' + path_rawDataInputWrap + '")');
|
|
471
|
+
}
|
|
472
|
+
})();
|
|
473
|
+
if (obj_rawDataInputWrap_union1_error != null) {
|
|
474
|
+
obj_rawDataInputWrap_union1 = obj_rawDataInputWrap_union1_error.message;
|
|
475
|
+
}
|
|
476
|
+
if (obj_rawDataInputWrap_union0 && obj_rawDataInputWrap_union1) {
|
|
477
|
+
var message = 'Object doesn\'t match union (at "' + path_rawDataInputWrap + '")';
|
|
478
|
+
message += '\n' + obj_rawDataInputWrap_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
479
|
+
message += '\n' + obj_rawDataInputWrap_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
480
|
+
return new TypeError(message);
|
|
481
|
+
}
|
|
482
|
+
})();
|
|
483
|
+
return v_error === undefined ? null : v_error;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
function validate$g(obj, path) {
|
|
487
|
+
if (path === void 0) { path = 'RawDataList'; }
|
|
488
|
+
var v_error = (function () {
|
|
489
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
490
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
491
|
+
}
|
|
492
|
+
var obj_rawData = obj.rawData;
|
|
493
|
+
var path_rawData = path + '.rawData';
|
|
494
|
+
if (!ArrayIsArray(obj_rawData)) {
|
|
495
|
+
return new TypeError('Expected "array" but received "' + typeof obj_rawData + '" (at "' + path_rawData + '")');
|
|
496
|
+
}
|
|
497
|
+
var _loop_1 = function (i) {
|
|
498
|
+
var obj_rawData_item = obj_rawData[i];
|
|
499
|
+
var path_rawData_item = path_rawData + '[' + i + ']';
|
|
500
|
+
var obj_rawData_item_union0 = null;
|
|
501
|
+
var obj_rawData_item_union0_error = (function () {
|
|
502
|
+
var referencepath_rawData_itemValidationError = validate$h(obj_rawData_item, path_rawData_item);
|
|
503
|
+
if (referencepath_rawData_itemValidationError !== null) {
|
|
504
|
+
var message = 'Object doesn\'t match RawDataInputWrap (at "' + path_rawData_item + '")\n';
|
|
505
|
+
message += referencepath_rawData_itemValidationError.message.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
506
|
+
return new TypeError(message);
|
|
507
|
+
}
|
|
508
|
+
})();
|
|
509
|
+
if (obj_rawData_item_union0_error != null) {
|
|
510
|
+
obj_rawData_item_union0 = obj_rawData_item_union0_error.message;
|
|
511
|
+
}
|
|
512
|
+
var obj_rawData_item_union1 = null;
|
|
513
|
+
var obj_rawData_item_union1_error = (function () {
|
|
514
|
+
if (obj_rawData_item !== null) {
|
|
515
|
+
return new TypeError('Expected "null" but received "' + typeof obj_rawData_item + '" (at "' + path_rawData_item + '")');
|
|
516
|
+
}
|
|
517
|
+
})();
|
|
518
|
+
if (obj_rawData_item_union1_error != null) {
|
|
519
|
+
obj_rawData_item_union1 = obj_rawData_item_union1_error.message;
|
|
520
|
+
}
|
|
521
|
+
if (obj_rawData_item_union0 && obj_rawData_item_union1) {
|
|
522
|
+
var message = 'Object doesn\'t match union (at "' + path_rawData_item + '")';
|
|
523
|
+
message += '\n' + obj_rawData_item_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
524
|
+
message += '\n' + obj_rawData_item_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
525
|
+
return { value: new TypeError(message) };
|
|
526
|
+
}
|
|
527
|
+
};
|
|
528
|
+
for (var i = 0; i < obj_rawData.length; i++) {
|
|
529
|
+
var state_1 = _loop_1(i);
|
|
530
|
+
if (typeof state_1 === "object")
|
|
531
|
+
return state_1.value;
|
|
532
|
+
}
|
|
533
|
+
})();
|
|
534
|
+
return v_error === undefined ? null : v_error;
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
function validate$f(obj, path) {
|
|
538
|
+
if (path === void 0) { path = 'PredictionInputRepresentation'; }
|
|
539
|
+
var v_error = (function () {
|
|
540
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
541
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
542
|
+
}
|
|
543
|
+
if (obj.async !== undefined) {
|
|
544
|
+
var obj_async_1 = obj.async;
|
|
545
|
+
var path_async_1 = path + '.async';
|
|
546
|
+
var obj_async_union0 = null;
|
|
547
|
+
var obj_async_union0_error = (function () {
|
|
548
|
+
if (typeof obj_async_1 !== 'boolean') {
|
|
549
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_async_1 + '" (at "' + path_async_1 + '")');
|
|
550
|
+
}
|
|
551
|
+
})();
|
|
552
|
+
if (obj_async_union0_error != null) {
|
|
553
|
+
obj_async_union0 = obj_async_union0_error.message;
|
|
554
|
+
}
|
|
555
|
+
var obj_async_union1 = null;
|
|
556
|
+
var obj_async_union1_error = (function () {
|
|
557
|
+
if (obj_async_1 !== null) {
|
|
558
|
+
return new TypeError('Expected "null" but received "' + typeof obj_async_1 + '" (at "' + path_async_1 + '")');
|
|
559
|
+
}
|
|
560
|
+
})();
|
|
561
|
+
if (obj_async_union1_error != null) {
|
|
562
|
+
obj_async_union1 = obj_async_union1_error.message;
|
|
563
|
+
}
|
|
564
|
+
if (obj_async_union0 && obj_async_union1) {
|
|
565
|
+
var message = 'Object doesn\'t match union (at "' + path_async_1 + '")';
|
|
566
|
+
message += '\n' + obj_async_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
567
|
+
message += '\n' + obj_async_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
568
|
+
return new TypeError(message);
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
if (obj.columnNames !== undefined) {
|
|
572
|
+
var obj_columnNames_1 = obj.columnNames;
|
|
573
|
+
var path_columnNames_1 = path + '.columnNames';
|
|
574
|
+
var obj_columnNames_union0 = null;
|
|
575
|
+
var obj_columnNames_union0_error = (function () {
|
|
576
|
+
var referencepath_columnNamesValidationError = validate$q(obj_columnNames_1, path_columnNames_1);
|
|
577
|
+
if (referencepath_columnNamesValidationError !== null) {
|
|
578
|
+
var message = 'Object doesn\'t match WrappedList (at "' + path_columnNames_1 + '")\n';
|
|
579
|
+
message += referencepath_columnNamesValidationError.message.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
580
|
+
return new TypeError(message);
|
|
581
|
+
}
|
|
582
|
+
})();
|
|
583
|
+
if (obj_columnNames_union0_error != null) {
|
|
584
|
+
obj_columnNames_union0 = obj_columnNames_union0_error.message;
|
|
585
|
+
}
|
|
586
|
+
var obj_columnNames_union1 = null;
|
|
587
|
+
var obj_columnNames_union1_error = (function () {
|
|
588
|
+
if (obj_columnNames_1 !== null) {
|
|
589
|
+
return new TypeError('Expected "null" but received "' + typeof obj_columnNames_1 + '" (at "' + path_columnNames_1 + '")');
|
|
590
|
+
}
|
|
591
|
+
})();
|
|
592
|
+
if (obj_columnNames_union1_error != null) {
|
|
593
|
+
obj_columnNames_union1 = obj_columnNames_union1_error.message;
|
|
594
|
+
}
|
|
595
|
+
if (obj_columnNames_union0 && obj_columnNames_union1) {
|
|
596
|
+
var message = 'Object doesn\'t match union (at "' + path_columnNames_1 + '")';
|
|
597
|
+
message += '\n' + obj_columnNames_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
598
|
+
message += '\n' + obj_columnNames_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
599
|
+
return new TypeError(message);
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
if (obj.enableFeaturePersistence !== undefined) {
|
|
603
|
+
var obj_enableFeaturePersistence_1 = obj.enableFeaturePersistence;
|
|
604
|
+
var path_enableFeaturePersistence_1 = path + '.enableFeaturePersistence';
|
|
605
|
+
var obj_enableFeaturePersistence_union0 = null;
|
|
606
|
+
var obj_enableFeaturePersistence_union0_error = (function () {
|
|
607
|
+
if (typeof obj_enableFeaturePersistence_1 !== 'boolean') {
|
|
608
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_enableFeaturePersistence_1 + '" (at "' + path_enableFeaturePersistence_1 + '")');
|
|
609
|
+
}
|
|
610
|
+
})();
|
|
611
|
+
if (obj_enableFeaturePersistence_union0_error != null) {
|
|
612
|
+
obj_enableFeaturePersistence_union0 = obj_enableFeaturePersistence_union0_error.message;
|
|
613
|
+
}
|
|
614
|
+
var obj_enableFeaturePersistence_union1 = null;
|
|
615
|
+
var obj_enableFeaturePersistence_union1_error = (function () {
|
|
616
|
+
if (obj_enableFeaturePersistence_1 !== null) {
|
|
617
|
+
return new TypeError('Expected "null" but received "' + typeof obj_enableFeaturePersistence_1 + '" (at "' + path_enableFeaturePersistence_1 + '")');
|
|
618
|
+
}
|
|
619
|
+
})();
|
|
620
|
+
if (obj_enableFeaturePersistence_union1_error != null) {
|
|
621
|
+
obj_enableFeaturePersistence_union1 = obj_enableFeaturePersistence_union1_error.message;
|
|
622
|
+
}
|
|
623
|
+
if (obj_enableFeaturePersistence_union0 && obj_enableFeaturePersistence_union1) {
|
|
624
|
+
var message = 'Object doesn\'t match union (at "' + path_enableFeaturePersistence_1 + '")';
|
|
625
|
+
message += '\n' + obj_enableFeaturePersistence_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
626
|
+
message += '\n' + obj_enableFeaturePersistence_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
627
|
+
return new TypeError(message);
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
if (obj.enableInsightPersistence !== undefined) {
|
|
631
|
+
var obj_enableInsightPersistence_1 = obj.enableInsightPersistence;
|
|
632
|
+
var path_enableInsightPersistence_1 = path + '.enableInsightPersistence';
|
|
633
|
+
var obj_enableInsightPersistence_union0 = null;
|
|
634
|
+
var obj_enableInsightPersistence_union0_error = (function () {
|
|
635
|
+
if (typeof obj_enableInsightPersistence_1 !== 'boolean') {
|
|
636
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_enableInsightPersistence_1 + '" (at "' + path_enableInsightPersistence_1 + '")');
|
|
637
|
+
}
|
|
638
|
+
})();
|
|
639
|
+
if (obj_enableInsightPersistence_union0_error != null) {
|
|
640
|
+
obj_enableInsightPersistence_union0 = obj_enableInsightPersistence_union0_error.message;
|
|
641
|
+
}
|
|
642
|
+
var obj_enableInsightPersistence_union1 = null;
|
|
643
|
+
var obj_enableInsightPersistence_union1_error = (function () {
|
|
644
|
+
if (obj_enableInsightPersistence_1 !== null) {
|
|
645
|
+
return new TypeError('Expected "null" but received "' + typeof obj_enableInsightPersistence_1 + '" (at "' + path_enableInsightPersistence_1 + '")');
|
|
646
|
+
}
|
|
647
|
+
})();
|
|
648
|
+
if (obj_enableInsightPersistence_union1_error != null) {
|
|
649
|
+
obj_enableInsightPersistence_union1 = obj_enableInsightPersistence_union1_error.message;
|
|
650
|
+
}
|
|
651
|
+
if (obj_enableInsightPersistence_union0 && obj_enableInsightPersistence_union1) {
|
|
652
|
+
var message = 'Object doesn\'t match union (at "' + path_enableInsightPersistence_1 + '")';
|
|
653
|
+
message += '\n' + obj_enableInsightPersistence_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
654
|
+
message += '\n' + obj_enableInsightPersistence_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
655
|
+
return new TypeError(message);
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
if (obj.enableScorePersistence !== undefined) {
|
|
659
|
+
var obj_enableScorePersistence_1 = obj.enableScorePersistence;
|
|
660
|
+
var path_enableScorePersistence_1 = path + '.enableScorePersistence';
|
|
661
|
+
var obj_enableScorePersistence_union0 = null;
|
|
662
|
+
var obj_enableScorePersistence_union0_error = (function () {
|
|
663
|
+
if (typeof obj_enableScorePersistence_1 !== 'boolean') {
|
|
664
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_enableScorePersistence_1 + '" (at "' + path_enableScorePersistence_1 + '")');
|
|
665
|
+
}
|
|
666
|
+
})();
|
|
667
|
+
if (obj_enableScorePersistence_union0_error != null) {
|
|
668
|
+
obj_enableScorePersistence_union0 = obj_enableScorePersistence_union0_error.message;
|
|
669
|
+
}
|
|
670
|
+
var obj_enableScorePersistence_union1 = null;
|
|
671
|
+
var obj_enableScorePersistence_union1_error = (function () {
|
|
672
|
+
if (obj_enableScorePersistence_1 !== null) {
|
|
673
|
+
return new TypeError('Expected "null" but received "' + typeof obj_enableScorePersistence_1 + '" (at "' + path_enableScorePersistence_1 + '")');
|
|
674
|
+
}
|
|
675
|
+
})();
|
|
676
|
+
if (obj_enableScorePersistence_union1_error != null) {
|
|
677
|
+
obj_enableScorePersistence_union1 = obj_enableScorePersistence_union1_error.message;
|
|
678
|
+
}
|
|
679
|
+
if (obj_enableScorePersistence_union0 && obj_enableScorePersistence_union1) {
|
|
680
|
+
var message = 'Object doesn\'t match union (at "' + path_enableScorePersistence_1 + '")';
|
|
681
|
+
message += '\n' + obj_enableScorePersistence_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
682
|
+
message += '\n' + obj_enableScorePersistence_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
683
|
+
return new TypeError(message);
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
if (obj.enableSuggestionPersistence !== undefined) {
|
|
687
|
+
var obj_enableSuggestionPersistence_1 = obj.enableSuggestionPersistence;
|
|
688
|
+
var path_enableSuggestionPersistence_1 = path + '.enableSuggestionPersistence';
|
|
689
|
+
var obj_enableSuggestionPersistence_union0 = null;
|
|
690
|
+
var obj_enableSuggestionPersistence_union0_error = (function () {
|
|
691
|
+
if (typeof obj_enableSuggestionPersistence_1 !== 'boolean') {
|
|
692
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_enableSuggestionPersistence_1 + '" (at "' + path_enableSuggestionPersistence_1 + '")');
|
|
693
|
+
}
|
|
694
|
+
})();
|
|
695
|
+
if (obj_enableSuggestionPersistence_union0_error != null) {
|
|
696
|
+
obj_enableSuggestionPersistence_union0 = obj_enableSuggestionPersistence_union0_error.message;
|
|
697
|
+
}
|
|
698
|
+
var obj_enableSuggestionPersistence_union1 = null;
|
|
699
|
+
var obj_enableSuggestionPersistence_union1_error = (function () {
|
|
700
|
+
if (obj_enableSuggestionPersistence_1 !== null) {
|
|
701
|
+
return new TypeError('Expected "null" but received "' + typeof obj_enableSuggestionPersistence_1 + '" (at "' + path_enableSuggestionPersistence_1 + '")');
|
|
702
|
+
}
|
|
703
|
+
})();
|
|
704
|
+
if (obj_enableSuggestionPersistence_union1_error != null) {
|
|
705
|
+
obj_enableSuggestionPersistence_union1 = obj_enableSuggestionPersistence_union1_error.message;
|
|
706
|
+
}
|
|
707
|
+
if (obj_enableSuggestionPersistence_union0 && obj_enableSuggestionPersistence_union1) {
|
|
708
|
+
var message = 'Object doesn\'t match union (at "' + path_enableSuggestionPersistence_1 + '")';
|
|
709
|
+
message += '\n' + obj_enableSuggestionPersistence_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
710
|
+
message += '\n' + obj_enableSuggestionPersistence_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
711
|
+
return new TypeError(message);
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
if (obj.enrichModelClassification !== undefined) {
|
|
715
|
+
var obj_enrichModelClassification_1 = obj.enrichModelClassification;
|
|
716
|
+
var path_enrichModelClassification_1 = path + '.enrichModelClassification';
|
|
717
|
+
var obj_enrichModelClassification_union0 = null;
|
|
718
|
+
var obj_enrichModelClassification_union0_error = (function () {
|
|
719
|
+
if (typeof obj_enrichModelClassification_1 !== 'boolean') {
|
|
720
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_enrichModelClassification_1 + '" (at "' + path_enrichModelClassification_1 + '")');
|
|
721
|
+
}
|
|
722
|
+
})();
|
|
723
|
+
if (obj_enrichModelClassification_union0_error != null) {
|
|
724
|
+
obj_enrichModelClassification_union0 = obj_enrichModelClassification_union0_error.message;
|
|
725
|
+
}
|
|
726
|
+
var obj_enrichModelClassification_union1 = null;
|
|
727
|
+
var obj_enrichModelClassification_union1_error = (function () {
|
|
728
|
+
if (obj_enrichModelClassification_1 !== null) {
|
|
729
|
+
return new TypeError('Expected "null" but received "' + typeof obj_enrichModelClassification_1 + '" (at "' + path_enrichModelClassification_1 + '")');
|
|
730
|
+
}
|
|
731
|
+
})();
|
|
732
|
+
if (obj_enrichModelClassification_union1_error != null) {
|
|
733
|
+
obj_enrichModelClassification_union1 = obj_enrichModelClassification_union1_error.message;
|
|
734
|
+
}
|
|
735
|
+
if (obj_enrichModelClassification_union0 && obj_enrichModelClassification_union1) {
|
|
736
|
+
var message = 'Object doesn\'t match union (at "' + path_enrichModelClassification_1 + '")';
|
|
737
|
+
message += '\n' + obj_enrichModelClassification_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
738
|
+
message += '\n' + obj_enrichModelClassification_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
739
|
+
return new TypeError(message);
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
if (obj.enrichModelFeatures !== undefined) {
|
|
743
|
+
var obj_enrichModelFeatures_1 = obj.enrichModelFeatures;
|
|
744
|
+
var path_enrichModelFeatures_1 = path + '.enrichModelFeatures';
|
|
745
|
+
var obj_enrichModelFeatures_union0 = null;
|
|
746
|
+
var obj_enrichModelFeatures_union0_error = (function () {
|
|
747
|
+
if (typeof obj_enrichModelFeatures_1 !== 'boolean') {
|
|
748
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_enrichModelFeatures_1 + '" (at "' + path_enrichModelFeatures_1 + '")');
|
|
749
|
+
}
|
|
750
|
+
})();
|
|
751
|
+
if (obj_enrichModelFeatures_union0_error != null) {
|
|
752
|
+
obj_enrichModelFeatures_union0 = obj_enrichModelFeatures_union0_error.message;
|
|
753
|
+
}
|
|
754
|
+
var obj_enrichModelFeatures_union1 = null;
|
|
755
|
+
var obj_enrichModelFeatures_union1_error = (function () {
|
|
756
|
+
if (obj_enrichModelFeatures_1 !== null) {
|
|
757
|
+
return new TypeError('Expected "null" but received "' + typeof obj_enrichModelFeatures_1 + '" (at "' + path_enrichModelFeatures_1 + '")');
|
|
758
|
+
}
|
|
759
|
+
})();
|
|
760
|
+
if (obj_enrichModelFeatures_union1_error != null) {
|
|
761
|
+
obj_enrichModelFeatures_union1 = obj_enrichModelFeatures_union1_error.message;
|
|
762
|
+
}
|
|
763
|
+
if (obj_enrichModelFeatures_union0 && obj_enrichModelFeatures_union1) {
|
|
764
|
+
var message = 'Object doesn\'t match union (at "' + path_enrichModelFeatures_1 + '")';
|
|
765
|
+
message += '\n' + obj_enrichModelFeatures_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
766
|
+
message += '\n' + obj_enrichModelFeatures_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
767
|
+
return new TypeError(message);
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
if (obj.enrichPredictionDefinition !== undefined) {
|
|
771
|
+
var obj_enrichPredictionDefinition_1 = obj.enrichPredictionDefinition;
|
|
772
|
+
var path_enrichPredictionDefinition_1 = path + '.enrichPredictionDefinition';
|
|
773
|
+
var obj_enrichPredictionDefinition_union0 = null;
|
|
774
|
+
var obj_enrichPredictionDefinition_union0_error = (function () {
|
|
775
|
+
if (typeof obj_enrichPredictionDefinition_1 !== 'boolean') {
|
|
776
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_enrichPredictionDefinition_1 + '" (at "' + path_enrichPredictionDefinition_1 + '")');
|
|
777
|
+
}
|
|
778
|
+
})();
|
|
779
|
+
if (obj_enrichPredictionDefinition_union0_error != null) {
|
|
780
|
+
obj_enrichPredictionDefinition_union0 = obj_enrichPredictionDefinition_union0_error.message;
|
|
781
|
+
}
|
|
782
|
+
var obj_enrichPredictionDefinition_union1 = null;
|
|
783
|
+
var obj_enrichPredictionDefinition_union1_error = (function () {
|
|
784
|
+
if (obj_enrichPredictionDefinition_1 !== null) {
|
|
785
|
+
return new TypeError('Expected "null" but received "' + typeof obj_enrichPredictionDefinition_1 + '" (at "' + path_enrichPredictionDefinition_1 + '")');
|
|
786
|
+
}
|
|
787
|
+
})();
|
|
788
|
+
if (obj_enrichPredictionDefinition_union1_error != null) {
|
|
789
|
+
obj_enrichPredictionDefinition_union1 = obj_enrichPredictionDefinition_union1_error.message;
|
|
790
|
+
}
|
|
791
|
+
if (obj_enrichPredictionDefinition_union0 && obj_enrichPredictionDefinition_union1) {
|
|
792
|
+
var message = 'Object doesn\'t match union (at "' + path_enrichPredictionDefinition_1 + '")';
|
|
793
|
+
message += '\n' + obj_enrichPredictionDefinition_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
794
|
+
message += '\n' + obj_enrichPredictionDefinition_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
795
|
+
return new TypeError(message);
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
if (obj.featureColumnMap !== undefined) {
|
|
799
|
+
var obj_featureColumnMap_1 = obj.featureColumnMap;
|
|
800
|
+
var path_featureColumnMap_1 = path + '.featureColumnMap';
|
|
801
|
+
var obj_featureColumnMap_union0 = null;
|
|
802
|
+
var obj_featureColumnMap_union0_error = (function () {
|
|
803
|
+
var referencepath_featureColumnMapValidationError = validate$o(obj_featureColumnMap_1, path_featureColumnMap_1);
|
|
804
|
+
if (referencepath_featureColumnMapValidationError !== null) {
|
|
805
|
+
var message = 'Object doesn\'t match ColumnMapWrap (at "' + path_featureColumnMap_1 + '")\n';
|
|
806
|
+
message += referencepath_featureColumnMapValidationError.message.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
807
|
+
return new TypeError(message);
|
|
808
|
+
}
|
|
809
|
+
})();
|
|
810
|
+
if (obj_featureColumnMap_union0_error != null) {
|
|
811
|
+
obj_featureColumnMap_union0 = obj_featureColumnMap_union0_error.message;
|
|
812
|
+
}
|
|
813
|
+
var obj_featureColumnMap_union1 = null;
|
|
814
|
+
var obj_featureColumnMap_union1_error = (function () {
|
|
815
|
+
if (obj_featureColumnMap_1 !== null) {
|
|
816
|
+
return new TypeError('Expected "null" but received "' + typeof obj_featureColumnMap_1 + '" (at "' + path_featureColumnMap_1 + '")');
|
|
817
|
+
}
|
|
818
|
+
})();
|
|
819
|
+
if (obj_featureColumnMap_union1_error != null) {
|
|
820
|
+
obj_featureColumnMap_union1 = obj_featureColumnMap_union1_error.message;
|
|
821
|
+
}
|
|
822
|
+
if (obj_featureColumnMap_union0 && obj_featureColumnMap_union1) {
|
|
823
|
+
var message = 'Object doesn\'t match union (at "' + path_featureColumnMap_1 + '")';
|
|
824
|
+
message += '\n' + obj_featureColumnMap_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
825
|
+
message += '\n' + obj_featureColumnMap_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
826
|
+
return new TypeError(message);
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
if (obj.featureExtractionParameters !== undefined) {
|
|
830
|
+
var obj_featureExtractionParameters_1 = obj.featureExtractionParameters;
|
|
831
|
+
var path_featureExtractionParameters_1 = path + '.featureExtractionParameters';
|
|
832
|
+
var obj_featureExtractionParameters_union0 = null;
|
|
833
|
+
var obj_featureExtractionParameters_union0_error = (function () {
|
|
834
|
+
var referencepath_featureExtractionParametersValidationError = validate$l(obj_featureExtractionParameters_1, path_featureExtractionParameters_1);
|
|
835
|
+
if (referencepath_featureExtractionParametersValidationError !== null) {
|
|
836
|
+
var message = 'Object doesn\'t match FeatureExtractionParametersList (at "' + path_featureExtractionParameters_1 + '")\n';
|
|
837
|
+
message += referencepath_featureExtractionParametersValidationError.message.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
838
|
+
return new TypeError(message);
|
|
839
|
+
}
|
|
840
|
+
})();
|
|
841
|
+
if (obj_featureExtractionParameters_union0_error != null) {
|
|
842
|
+
obj_featureExtractionParameters_union0 = obj_featureExtractionParameters_union0_error.message;
|
|
843
|
+
}
|
|
844
|
+
var obj_featureExtractionParameters_union1 = null;
|
|
845
|
+
var obj_featureExtractionParameters_union1_error = (function () {
|
|
846
|
+
if (obj_featureExtractionParameters_1 !== null) {
|
|
847
|
+
return new TypeError('Expected "null" but received "' + typeof obj_featureExtractionParameters_1 + '" (at "' + path_featureExtractionParameters_1 + '")');
|
|
848
|
+
}
|
|
849
|
+
})();
|
|
850
|
+
if (obj_featureExtractionParameters_union1_error != null) {
|
|
851
|
+
obj_featureExtractionParameters_union1 = obj_featureExtractionParameters_union1_error.message;
|
|
852
|
+
}
|
|
853
|
+
if (obj_featureExtractionParameters_union0 && obj_featureExtractionParameters_union1) {
|
|
854
|
+
var message = 'Object doesn\'t match union (at "' + path_featureExtractionParameters_1 + '")';
|
|
855
|
+
message += '\n' + obj_featureExtractionParameters_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
856
|
+
message += '\n' + obj_featureExtractionParameters_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
857
|
+
return new TypeError(message);
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
if (obj.featureExtractorDevName !== undefined) {
|
|
861
|
+
var obj_featureExtractorDevName = obj.featureExtractorDevName;
|
|
862
|
+
var path_featureExtractorDevName = path + '.featureExtractorDevName';
|
|
863
|
+
if (typeof obj_featureExtractorDevName !== 'string') {
|
|
864
|
+
return new TypeError('Expected "string" but received "' + typeof obj_featureExtractorDevName + '" (at "' + path_featureExtractorDevName + '")');
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
if (obj.featureExtractorId !== undefined) {
|
|
868
|
+
var obj_featureExtractorId_1 = obj.featureExtractorId;
|
|
869
|
+
var path_featureExtractorId_1 = path + '.featureExtractorId';
|
|
870
|
+
var obj_featureExtractorId_union0 = null;
|
|
871
|
+
var obj_featureExtractorId_union0_error = (function () {
|
|
872
|
+
if (typeof obj_featureExtractorId_1 !== 'string') {
|
|
873
|
+
return new TypeError('Expected "string" but received "' + typeof obj_featureExtractorId_1 + '" (at "' + path_featureExtractorId_1 + '")');
|
|
874
|
+
}
|
|
875
|
+
})();
|
|
876
|
+
if (obj_featureExtractorId_union0_error != null) {
|
|
877
|
+
obj_featureExtractorId_union0 = obj_featureExtractorId_union0_error.message;
|
|
878
|
+
}
|
|
879
|
+
var obj_featureExtractorId_union1 = null;
|
|
880
|
+
var obj_featureExtractorId_union1_error = (function () {
|
|
881
|
+
if (obj_featureExtractorId_1 !== null) {
|
|
882
|
+
return new TypeError('Expected "null" but received "' + typeof obj_featureExtractorId_1 + '" (at "' + path_featureExtractorId_1 + '")');
|
|
883
|
+
}
|
|
884
|
+
})();
|
|
885
|
+
if (obj_featureExtractorId_union1_error != null) {
|
|
886
|
+
obj_featureExtractorId_union1 = obj_featureExtractorId_union1_error.message;
|
|
887
|
+
}
|
|
888
|
+
if (obj_featureExtractorId_union0 && obj_featureExtractorId_union1) {
|
|
889
|
+
var message = 'Object doesn\'t match union (at "' + path_featureExtractorId_1 + '")';
|
|
890
|
+
message += '\n' + obj_featureExtractorId_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
891
|
+
message += '\n' + obj_featureExtractorId_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
892
|
+
return new TypeError(message);
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
if (obj.historyReferencePoint !== undefined) {
|
|
896
|
+
var obj_historyReferencePoint_1 = obj.historyReferencePoint;
|
|
897
|
+
var path_historyReferencePoint_1 = path + '.historyReferencePoint';
|
|
898
|
+
var obj_historyReferencePoint_union0 = null;
|
|
899
|
+
var obj_historyReferencePoint_union0_error = (function () {
|
|
900
|
+
if (typeof obj_historyReferencePoint_1 !== 'string') {
|
|
901
|
+
return new TypeError('Expected "string" but received "' + typeof obj_historyReferencePoint_1 + '" (at "' + path_historyReferencePoint_1 + '")');
|
|
902
|
+
}
|
|
903
|
+
})();
|
|
904
|
+
if (obj_historyReferencePoint_union0_error != null) {
|
|
905
|
+
obj_historyReferencePoint_union0 = obj_historyReferencePoint_union0_error.message;
|
|
906
|
+
}
|
|
907
|
+
var obj_historyReferencePoint_union1 = null;
|
|
908
|
+
var obj_historyReferencePoint_union1_error = (function () {
|
|
909
|
+
if (obj_historyReferencePoint_1 !== null) {
|
|
910
|
+
return new TypeError('Expected "null" but received "' + typeof obj_historyReferencePoint_1 + '" (at "' + path_historyReferencePoint_1 + '")');
|
|
911
|
+
}
|
|
912
|
+
})();
|
|
913
|
+
if (obj_historyReferencePoint_union1_error != null) {
|
|
914
|
+
obj_historyReferencePoint_union1 = obj_historyReferencePoint_union1_error.message;
|
|
915
|
+
}
|
|
916
|
+
if (obj_historyReferencePoint_union0 && obj_historyReferencePoint_union1) {
|
|
917
|
+
var message = 'Object doesn\'t match union (at "' + path_historyReferencePoint_1 + '")';
|
|
918
|
+
message += '\n' + obj_historyReferencePoint_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
919
|
+
message += '\n' + obj_historyReferencePoint_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
920
|
+
return new TypeError(message);
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
var obj_inputType = obj.inputType;
|
|
924
|
+
var path_inputType = path + '.inputType';
|
|
925
|
+
if (typeof obj_inputType !== 'string') {
|
|
926
|
+
return new TypeError('Expected "string" but received "' + typeof obj_inputType + '" (at "' + path_inputType + '")');
|
|
927
|
+
}
|
|
928
|
+
if (obj.insightColumnMap !== undefined) {
|
|
929
|
+
var obj_insightColumnMap_1 = obj.insightColumnMap;
|
|
930
|
+
var path_insightColumnMap_1 = path + '.insightColumnMap';
|
|
931
|
+
var obj_insightColumnMap_union0 = null;
|
|
932
|
+
var obj_insightColumnMap_union0_error = (function () {
|
|
933
|
+
var referencepath_insightColumnMapValidationError = validate$o(obj_insightColumnMap_1, path_insightColumnMap_1);
|
|
934
|
+
if (referencepath_insightColumnMapValidationError !== null) {
|
|
935
|
+
var message = 'Object doesn\'t match ColumnMapWrap (at "' + path_insightColumnMap_1 + '")\n';
|
|
936
|
+
message += referencepath_insightColumnMapValidationError.message.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
937
|
+
return new TypeError(message);
|
|
938
|
+
}
|
|
939
|
+
})();
|
|
940
|
+
if (obj_insightColumnMap_union0_error != null) {
|
|
941
|
+
obj_insightColumnMap_union0 = obj_insightColumnMap_union0_error.message;
|
|
942
|
+
}
|
|
943
|
+
var obj_insightColumnMap_union1 = null;
|
|
944
|
+
var obj_insightColumnMap_union1_error = (function () {
|
|
945
|
+
if (obj_insightColumnMap_1 !== null) {
|
|
946
|
+
return new TypeError('Expected "null" but received "' + typeof obj_insightColumnMap_1 + '" (at "' + path_insightColumnMap_1 + '")');
|
|
947
|
+
}
|
|
948
|
+
})();
|
|
949
|
+
if (obj_insightColumnMap_union1_error != null) {
|
|
950
|
+
obj_insightColumnMap_union1 = obj_insightColumnMap_union1_error.message;
|
|
951
|
+
}
|
|
952
|
+
if (obj_insightColumnMap_union0 && obj_insightColumnMap_union1) {
|
|
953
|
+
var message = 'Object doesn\'t match union (at "' + path_insightColumnMap_1 + '")';
|
|
954
|
+
message += '\n' + obj_insightColumnMap_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
955
|
+
message += '\n' + obj_insightColumnMap_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
956
|
+
return new TypeError(message);
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
if (obj.insightsSettings !== undefined) {
|
|
960
|
+
var obj_insightsSettings_1 = obj.insightsSettings;
|
|
961
|
+
var path_insightsSettings_1 = path + '.insightsSettings';
|
|
962
|
+
var obj_insightsSettings_union0 = null;
|
|
963
|
+
var obj_insightsSettings_union0_error = (function () {
|
|
964
|
+
var referencepath_insightsSettingsValidationError = validate$j(obj_insightsSettings_1, path_insightsSettings_1);
|
|
965
|
+
if (referencepath_insightsSettingsValidationError !== null) {
|
|
966
|
+
var message = 'Object doesn\'t match InsightsSettingsMap (at "' + path_insightsSettings_1 + '")\n';
|
|
967
|
+
message += referencepath_insightsSettingsValidationError.message.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
968
|
+
return new TypeError(message);
|
|
969
|
+
}
|
|
970
|
+
})();
|
|
971
|
+
if (obj_insightsSettings_union0_error != null) {
|
|
972
|
+
obj_insightsSettings_union0 = obj_insightsSettings_union0_error.message;
|
|
973
|
+
}
|
|
974
|
+
var obj_insightsSettings_union1 = null;
|
|
975
|
+
var obj_insightsSettings_union1_error = (function () {
|
|
976
|
+
if (obj_insightsSettings_1 !== null) {
|
|
977
|
+
return new TypeError('Expected "null" but received "' + typeof obj_insightsSettings_1 + '" (at "' + path_insightsSettings_1 + '")');
|
|
978
|
+
}
|
|
979
|
+
})();
|
|
980
|
+
if (obj_insightsSettings_union1_error != null) {
|
|
981
|
+
obj_insightsSettings_union1 = obj_insightsSettings_union1_error.message;
|
|
982
|
+
}
|
|
983
|
+
if (obj_insightsSettings_union0 && obj_insightsSettings_union1) {
|
|
984
|
+
var message = 'Object doesn\'t match union (at "' + path_insightsSettings_1 + '")';
|
|
985
|
+
message += '\n' + obj_insightsSettings_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
986
|
+
message += '\n' + obj_insightsSettings_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
987
|
+
return new TypeError(message);
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
var obj_predictionDefinition = obj.predictionDefinition;
|
|
991
|
+
var path_predictionDefinition = path + '.predictionDefinition';
|
|
992
|
+
if (typeof obj_predictionDefinition !== 'string') {
|
|
993
|
+
return new TypeError('Expected "string" but received "' + typeof obj_predictionDefinition + '" (at "' + path_predictionDefinition + '")');
|
|
994
|
+
}
|
|
995
|
+
if (obj.rawData !== undefined) {
|
|
996
|
+
var obj_rawData_1 = obj.rawData;
|
|
997
|
+
var path_rawData_1 = path + '.rawData';
|
|
998
|
+
var obj_rawData_union0 = null;
|
|
999
|
+
var obj_rawData_union0_error = (function () {
|
|
1000
|
+
var referencepath_rawDataValidationError = validate$g(obj_rawData_1, path_rawData_1);
|
|
1001
|
+
if (referencepath_rawDataValidationError !== null) {
|
|
1002
|
+
var message = 'Object doesn\'t match RawDataList (at "' + path_rawData_1 + '")\n';
|
|
1003
|
+
message += referencepath_rawDataValidationError.message.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1004
|
+
return new TypeError(message);
|
|
1005
|
+
}
|
|
1006
|
+
})();
|
|
1007
|
+
if (obj_rawData_union0_error != null) {
|
|
1008
|
+
obj_rawData_union0 = obj_rawData_union0_error.message;
|
|
1009
|
+
}
|
|
1010
|
+
var obj_rawData_union1 = null;
|
|
1011
|
+
var obj_rawData_union1_error = (function () {
|
|
1012
|
+
if (obj_rawData_1 !== null) {
|
|
1013
|
+
return new TypeError('Expected "null" but received "' + typeof obj_rawData_1 + '" (at "' + path_rawData_1 + '")');
|
|
1014
|
+
}
|
|
1015
|
+
})();
|
|
1016
|
+
if (obj_rawData_union1_error != null) {
|
|
1017
|
+
obj_rawData_union1 = obj_rawData_union1_error.message;
|
|
1018
|
+
}
|
|
1019
|
+
if (obj_rawData_union0 && obj_rawData_union1) {
|
|
1020
|
+
var message = 'Object doesn\'t match union (at "' + path_rawData_1 + '")';
|
|
1021
|
+
message += '\n' + obj_rawData_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1022
|
+
message += '\n' + obj_rawData_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1023
|
+
return new TypeError(message);
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1026
|
+
if (obj.records !== undefined) {
|
|
1027
|
+
var obj_records_1 = obj.records;
|
|
1028
|
+
var path_records_1 = path + '.records';
|
|
1029
|
+
var obj_records_union0 = null;
|
|
1030
|
+
var obj_records_union0_error = (function () {
|
|
1031
|
+
var referencepath_recordsValidationError = validate$q(obj_records_1, path_records_1);
|
|
1032
|
+
if (referencepath_recordsValidationError !== null) {
|
|
1033
|
+
var message = 'Object doesn\'t match WrappedList (at "' + path_records_1 + '")\n';
|
|
1034
|
+
message += referencepath_recordsValidationError.message.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1035
|
+
return new TypeError(message);
|
|
1036
|
+
}
|
|
1037
|
+
})();
|
|
1038
|
+
if (obj_records_union0_error != null) {
|
|
1039
|
+
obj_records_union0 = obj_records_union0_error.message;
|
|
1040
|
+
}
|
|
1041
|
+
var obj_records_union1 = null;
|
|
1042
|
+
var obj_records_union1_error = (function () {
|
|
1043
|
+
if (obj_records_1 !== null) {
|
|
1044
|
+
return new TypeError('Expected "null" but received "' + typeof obj_records_1 + '" (at "' + path_records_1 + '")');
|
|
1045
|
+
}
|
|
1046
|
+
})();
|
|
1047
|
+
if (obj_records_union1_error != null) {
|
|
1048
|
+
obj_records_union1 = obj_records_union1_error.message;
|
|
1049
|
+
}
|
|
1050
|
+
if (obj_records_union0 && obj_records_union1) {
|
|
1051
|
+
var message = 'Object doesn\'t match union (at "' + path_records_1 + '")';
|
|
1052
|
+
message += '\n' + obj_records_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1053
|
+
message += '\n' + obj_records_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1054
|
+
return new TypeError(message);
|
|
1055
|
+
}
|
|
1056
|
+
}
|
|
1057
|
+
if (obj.scorePersistenceColumn !== undefined) {
|
|
1058
|
+
var obj_scorePersistenceColumn_1 = obj.scorePersistenceColumn;
|
|
1059
|
+
var path_scorePersistenceColumn_1 = path + '.scorePersistenceColumn';
|
|
1060
|
+
var obj_scorePersistenceColumn_union0 = null;
|
|
1061
|
+
var obj_scorePersistenceColumn_union0_error = (function () {
|
|
1062
|
+
if (typeof obj_scorePersistenceColumn_1 !== 'string') {
|
|
1063
|
+
return new TypeError('Expected "string" but received "' + typeof obj_scorePersistenceColumn_1 + '" (at "' + path_scorePersistenceColumn_1 + '")');
|
|
1064
|
+
}
|
|
1065
|
+
})();
|
|
1066
|
+
if (obj_scorePersistenceColumn_union0_error != null) {
|
|
1067
|
+
obj_scorePersistenceColumn_union0 = obj_scorePersistenceColumn_union0_error.message;
|
|
1068
|
+
}
|
|
1069
|
+
var obj_scorePersistenceColumn_union1 = null;
|
|
1070
|
+
var obj_scorePersistenceColumn_union1_error = (function () {
|
|
1071
|
+
if (obj_scorePersistenceColumn_1 !== null) {
|
|
1072
|
+
return new TypeError('Expected "null" but received "' + typeof obj_scorePersistenceColumn_1 + '" (at "' + path_scorePersistenceColumn_1 + '")');
|
|
1073
|
+
}
|
|
1074
|
+
})();
|
|
1075
|
+
if (obj_scorePersistenceColumn_union1_error != null) {
|
|
1076
|
+
obj_scorePersistenceColumn_union1 = obj_scorePersistenceColumn_union1_error.message;
|
|
1077
|
+
}
|
|
1078
|
+
if (obj_scorePersistenceColumn_union0 && obj_scorePersistenceColumn_union1) {
|
|
1079
|
+
var message = 'Object doesn\'t match union (at "' + path_scorePersistenceColumn_1 + '")';
|
|
1080
|
+
message += '\n' + obj_scorePersistenceColumn_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1081
|
+
message += '\n' + obj_scorePersistenceColumn_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1082
|
+
return new TypeError(message);
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
if (obj.secondaryRecordIdPersistenceField !== undefined) {
|
|
1086
|
+
var obj_secondaryRecordIdPersistenceField_1 = obj.secondaryRecordIdPersistenceField;
|
|
1087
|
+
var path_secondaryRecordIdPersistenceField_1 = path + '.secondaryRecordIdPersistenceField';
|
|
1088
|
+
var obj_secondaryRecordIdPersistenceField_union0 = null;
|
|
1089
|
+
var obj_secondaryRecordIdPersistenceField_union0_error = (function () {
|
|
1090
|
+
if (typeof obj_secondaryRecordIdPersistenceField_1 !== 'string') {
|
|
1091
|
+
return new TypeError('Expected "string" but received "' + typeof obj_secondaryRecordIdPersistenceField_1 + '" (at "' + path_secondaryRecordIdPersistenceField_1 + '")');
|
|
1092
|
+
}
|
|
1093
|
+
})();
|
|
1094
|
+
if (obj_secondaryRecordIdPersistenceField_union0_error != null) {
|
|
1095
|
+
obj_secondaryRecordIdPersistenceField_union0 = obj_secondaryRecordIdPersistenceField_union0_error.message;
|
|
1096
|
+
}
|
|
1097
|
+
var obj_secondaryRecordIdPersistenceField_union1 = null;
|
|
1098
|
+
var obj_secondaryRecordIdPersistenceField_union1_error = (function () {
|
|
1099
|
+
if (obj_secondaryRecordIdPersistenceField_1 !== null) {
|
|
1100
|
+
return new TypeError('Expected "null" but received "' + typeof obj_secondaryRecordIdPersistenceField_1 + '" (at "' + path_secondaryRecordIdPersistenceField_1 + '")');
|
|
1101
|
+
}
|
|
1102
|
+
})();
|
|
1103
|
+
if (obj_secondaryRecordIdPersistenceField_union1_error != null) {
|
|
1104
|
+
obj_secondaryRecordIdPersistenceField_union1 = obj_secondaryRecordIdPersistenceField_union1_error.message;
|
|
1105
|
+
}
|
|
1106
|
+
if (obj_secondaryRecordIdPersistenceField_union0 && obj_secondaryRecordIdPersistenceField_union1) {
|
|
1107
|
+
var message = 'Object doesn\'t match union (at "' + path_secondaryRecordIdPersistenceField_1 + '")';
|
|
1108
|
+
message += '\n' + obj_secondaryRecordIdPersistenceField_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1109
|
+
message += '\n' + obj_secondaryRecordIdPersistenceField_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1110
|
+
return new TypeError(message);
|
|
1111
|
+
}
|
|
1112
|
+
}
|
|
1113
|
+
if (obj.suggestionColumnMap !== undefined) {
|
|
1114
|
+
var obj_suggestionColumnMap_1 = obj.suggestionColumnMap;
|
|
1115
|
+
var path_suggestionColumnMap_1 = path + '.suggestionColumnMap';
|
|
1116
|
+
var obj_suggestionColumnMap_union0 = null;
|
|
1117
|
+
var obj_suggestionColumnMap_union0_error = (function () {
|
|
1118
|
+
var referencepath_suggestionColumnMapValidationError = validate$o(obj_suggestionColumnMap_1, path_suggestionColumnMap_1);
|
|
1119
|
+
if (referencepath_suggestionColumnMapValidationError !== null) {
|
|
1120
|
+
var message = 'Object doesn\'t match ColumnMapWrap (at "' + path_suggestionColumnMap_1 + '")\n';
|
|
1121
|
+
message += referencepath_suggestionColumnMapValidationError.message.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1122
|
+
return new TypeError(message);
|
|
1123
|
+
}
|
|
1124
|
+
})();
|
|
1125
|
+
if (obj_suggestionColumnMap_union0_error != null) {
|
|
1126
|
+
obj_suggestionColumnMap_union0 = obj_suggestionColumnMap_union0_error.message;
|
|
1127
|
+
}
|
|
1128
|
+
var obj_suggestionColumnMap_union1 = null;
|
|
1129
|
+
var obj_suggestionColumnMap_union1_error = (function () {
|
|
1130
|
+
if (obj_suggestionColumnMap_1 !== null) {
|
|
1131
|
+
return new TypeError('Expected "null" but received "' + typeof obj_suggestionColumnMap_1 + '" (at "' + path_suggestionColumnMap_1 + '")');
|
|
1132
|
+
}
|
|
1133
|
+
})();
|
|
1134
|
+
if (obj_suggestionColumnMap_union1_error != null) {
|
|
1135
|
+
obj_suggestionColumnMap_union1 = obj_suggestionColumnMap_union1_error.message;
|
|
1136
|
+
}
|
|
1137
|
+
if (obj_suggestionColumnMap_union0 && obj_suggestionColumnMap_union1) {
|
|
1138
|
+
var message = 'Object doesn\'t match union (at "' + path_suggestionColumnMap_1 + '")';
|
|
1139
|
+
message += '\n' + obj_suggestionColumnMap_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1140
|
+
message += '\n' + obj_suggestionColumnMap_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1141
|
+
return new TypeError(message);
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
if (obj.usecaseDefinition !== undefined) {
|
|
1145
|
+
var obj_usecaseDefinition = obj.usecaseDefinition;
|
|
1146
|
+
var path_usecaseDefinition = path + '.usecaseDefinition';
|
|
1147
|
+
if (typeof obj_usecaseDefinition !== 'string') {
|
|
1148
|
+
return new TypeError('Expected "string" but received "' + typeof obj_usecaseDefinition + '" (at "' + path_usecaseDefinition + '")');
|
|
1149
|
+
}
|
|
1150
|
+
}
|
|
1151
|
+
if (obj.usecaseDevName !== undefined) {
|
|
1152
|
+
var obj_usecaseDevName = obj.usecaseDevName;
|
|
1153
|
+
var path_usecaseDevName = path + '.usecaseDevName';
|
|
1154
|
+
if (typeof obj_usecaseDevName !== 'string') {
|
|
1155
|
+
return new TypeError('Expected "string" but received "' + typeof obj_usecaseDevName + '" (at "' + path_usecaseDevName + '")');
|
|
1156
|
+
}
|
|
1157
|
+
}
|
|
1158
|
+
})();
|
|
1159
|
+
return v_error === undefined ? null : v_error;
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1162
|
+
function validate$e(obj, path) {
|
|
1163
|
+
if (path === void 0) { path = 'ModelFeature'; }
|
|
1164
|
+
var v_error = (function () {
|
|
1165
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1166
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1167
|
+
}
|
|
1168
|
+
if (obj.label !== undefined) {
|
|
1169
|
+
var obj_label_1 = obj.label;
|
|
1170
|
+
var path_label_1 = path + '.label';
|
|
1171
|
+
var obj_label_union0 = null;
|
|
1172
|
+
var obj_label_union0_error = (function () {
|
|
1173
|
+
if (typeof obj_label_1 !== 'string') {
|
|
1174
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label_1 + '" (at "' + path_label_1 + '")');
|
|
1175
|
+
}
|
|
1176
|
+
})();
|
|
1177
|
+
if (obj_label_union0_error != null) {
|
|
1178
|
+
obj_label_union0 = obj_label_union0_error.message;
|
|
1179
|
+
}
|
|
1180
|
+
var obj_label_union1 = null;
|
|
1181
|
+
var obj_label_union1_error = (function () {
|
|
1182
|
+
if (obj_label_1 !== null) {
|
|
1183
|
+
return new TypeError('Expected "null" but received "' + typeof obj_label_1 + '" (at "' + path_label_1 + '")');
|
|
1184
|
+
}
|
|
1185
|
+
})();
|
|
1186
|
+
if (obj_label_union1_error != null) {
|
|
1187
|
+
obj_label_union1 = obj_label_union1_error.message;
|
|
1188
|
+
}
|
|
1189
|
+
if (obj_label_union0 && obj_label_union1) {
|
|
1190
|
+
var message = 'Object doesn\'t match union (at "' + path_label_1 + '")';
|
|
1191
|
+
message += '\n' + obj_label_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1192
|
+
message += '\n' + obj_label_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1193
|
+
return new TypeError(message);
|
|
1194
|
+
}
|
|
1195
|
+
}
|
|
1196
|
+
if (obj.name !== undefined) {
|
|
1197
|
+
var obj_name_1 = obj.name;
|
|
1198
|
+
var path_name_1 = path + '.name';
|
|
1199
|
+
var obj_name_union0 = null;
|
|
1200
|
+
var obj_name_union0_error = (function () {
|
|
1201
|
+
if (typeof obj_name_1 !== 'string') {
|
|
1202
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name_1 + '" (at "' + path_name_1 + '")');
|
|
1203
|
+
}
|
|
1204
|
+
})();
|
|
1205
|
+
if (obj_name_union0_error != null) {
|
|
1206
|
+
obj_name_union0 = obj_name_union0_error.message;
|
|
1207
|
+
}
|
|
1208
|
+
var obj_name_union1 = null;
|
|
1209
|
+
var obj_name_union1_error = (function () {
|
|
1210
|
+
if (obj_name_1 !== null) {
|
|
1211
|
+
return new TypeError('Expected "null" but received "' + typeof obj_name_1 + '" (at "' + path_name_1 + '")');
|
|
1212
|
+
}
|
|
1213
|
+
})();
|
|
1214
|
+
if (obj_name_union1_error != null) {
|
|
1215
|
+
obj_name_union1 = obj_name_union1_error.message;
|
|
1216
|
+
}
|
|
1217
|
+
if (obj_name_union0 && obj_name_union1) {
|
|
1218
|
+
var message = 'Object doesn\'t match union (at "' + path_name_1 + '")';
|
|
1219
|
+
message += '\n' + obj_name_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1220
|
+
message += '\n' + obj_name_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1221
|
+
return new TypeError(message);
|
|
1222
|
+
}
|
|
1223
|
+
}
|
|
1224
|
+
if (obj.type !== undefined) {
|
|
1225
|
+
var obj_type_1 = obj.type;
|
|
1226
|
+
var path_type_1 = path + '.type';
|
|
1227
|
+
var obj_type_union0 = null;
|
|
1228
|
+
var obj_type_union0_error = (function () {
|
|
1229
|
+
if (typeof obj_type_1 !== 'string') {
|
|
1230
|
+
return new TypeError('Expected "string" but received "' + typeof obj_type_1 + '" (at "' + path_type_1 + '")');
|
|
1231
|
+
}
|
|
1232
|
+
})();
|
|
1233
|
+
if (obj_type_union0_error != null) {
|
|
1234
|
+
obj_type_union0 = obj_type_union0_error.message;
|
|
1235
|
+
}
|
|
1236
|
+
var obj_type_union1 = null;
|
|
1237
|
+
var obj_type_union1_error = (function () {
|
|
1238
|
+
if (obj_type_1 !== null) {
|
|
1239
|
+
return new TypeError('Expected "null" but received "' + typeof obj_type_1 + '" (at "' + path_type_1 + '")');
|
|
1240
|
+
}
|
|
1241
|
+
})();
|
|
1242
|
+
if (obj_type_union1_error != null) {
|
|
1243
|
+
obj_type_union1 = obj_type_union1_error.message;
|
|
1244
|
+
}
|
|
1245
|
+
if (obj_type_union0 && obj_type_union1) {
|
|
1246
|
+
var message = 'Object doesn\'t match union (at "' + path_type_1 + '")';
|
|
1247
|
+
message += '\n' + obj_type_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1248
|
+
message += '\n' + obj_type_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1249
|
+
return new TypeError(message);
|
|
1250
|
+
}
|
|
1251
|
+
}
|
|
1252
|
+
})();
|
|
1253
|
+
return v_error === undefined ? null : v_error;
|
|
1254
|
+
}
|
|
1255
|
+
function deepFreeze$d(input) {
|
|
1256
|
+
ObjectFreeze(input);
|
|
1257
|
+
}
|
|
1258
|
+
|
|
1259
|
+
function validate$d(obj, path) {
|
|
1260
|
+
if (path === void 0) { path = 'NullableModel'; }
|
|
1261
|
+
var v_error = (function () {
|
|
1262
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1263
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1264
|
+
}
|
|
1265
|
+
var obj_keys = ObjectKeys(obj);
|
|
1266
|
+
var _loop_1 = function (i) {
|
|
1267
|
+
var key = obj_keys[i];
|
|
1268
|
+
var obj_prop = obj[key];
|
|
1269
|
+
var path_prop = path + '["' + key + '"]';
|
|
1270
|
+
var obj_prop_union0 = null;
|
|
1271
|
+
var obj_prop_union0_error = (function () {
|
|
1272
|
+
if (typeof obj_prop !== 'string') {
|
|
1273
|
+
return new TypeError('Expected "string" but received "' + typeof obj_prop + '" (at "' + path_prop + '")');
|
|
1274
|
+
}
|
|
1275
|
+
})();
|
|
1276
|
+
if (obj_prop_union0_error != null) {
|
|
1277
|
+
obj_prop_union0 = obj_prop_union0_error.message;
|
|
1278
|
+
}
|
|
1279
|
+
var obj_prop_union1 = null;
|
|
1280
|
+
var obj_prop_union1_error = (function () {
|
|
1281
|
+
if (obj_prop !== null) {
|
|
1282
|
+
return new TypeError('Expected "null" but received "' + typeof obj_prop + '" (at "' + path_prop + '")');
|
|
1283
|
+
}
|
|
1284
|
+
})();
|
|
1285
|
+
if (obj_prop_union1_error != null) {
|
|
1286
|
+
obj_prop_union1 = obj_prop_union1_error.message;
|
|
1287
|
+
}
|
|
1288
|
+
if (obj_prop_union0 && obj_prop_union1) {
|
|
1289
|
+
var message = 'Object doesn\'t match union (at "' + path_prop + '")';
|
|
1290
|
+
message += '\n' + obj_prop_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1291
|
+
message += '\n' + obj_prop_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1292
|
+
return { value: new TypeError(message) };
|
|
1293
|
+
}
|
|
1294
|
+
};
|
|
1295
|
+
for (var i = 0; i < obj_keys.length; i++) {
|
|
1296
|
+
var state_1 = _loop_1(i);
|
|
1297
|
+
if (typeof state_1 === "object")
|
|
1298
|
+
return state_1.value;
|
|
1299
|
+
}
|
|
1300
|
+
})();
|
|
1301
|
+
return v_error === undefined ? null : v_error;
|
|
1302
|
+
}
|
|
1303
|
+
function deepFreeze$c(input) {
|
|
1304
|
+
var input_keys = Object.keys(input);
|
|
1305
|
+
var input_length = input_keys.length;
|
|
1306
|
+
for (var i = 0; i < input_length; i++) {
|
|
1307
|
+
input_keys[i];
|
|
1308
|
+
}
|
|
1309
|
+
ObjectFreeze(input);
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
function validate$c(obj, path) {
|
|
1313
|
+
if (path === void 0) { path = 'Column'; }
|
|
1314
|
+
var v_error = (function () {
|
|
1315
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1316
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1317
|
+
}
|
|
1318
|
+
if (obj.columnLabel !== undefined) {
|
|
1319
|
+
var obj_columnLabel_1 = obj.columnLabel;
|
|
1320
|
+
var path_columnLabel_1 = path + '.columnLabel';
|
|
1321
|
+
var obj_columnLabel_union0 = null;
|
|
1322
|
+
var obj_columnLabel_union0_error = (function () {
|
|
1323
|
+
if (typeof obj_columnLabel_1 !== 'string') {
|
|
1324
|
+
return new TypeError('Expected "string" but received "' + typeof obj_columnLabel_1 + '" (at "' + path_columnLabel_1 + '")');
|
|
1325
|
+
}
|
|
1326
|
+
})();
|
|
1327
|
+
if (obj_columnLabel_union0_error != null) {
|
|
1328
|
+
obj_columnLabel_union0 = obj_columnLabel_union0_error.message;
|
|
1329
|
+
}
|
|
1330
|
+
var obj_columnLabel_union1 = null;
|
|
1331
|
+
var obj_columnLabel_union1_error = (function () {
|
|
1332
|
+
if (obj_columnLabel_1 !== null) {
|
|
1333
|
+
return new TypeError('Expected "null" but received "' + typeof obj_columnLabel_1 + '" (at "' + path_columnLabel_1 + '")');
|
|
1334
|
+
}
|
|
1335
|
+
})();
|
|
1336
|
+
if (obj_columnLabel_union1_error != null) {
|
|
1337
|
+
obj_columnLabel_union1 = obj_columnLabel_union1_error.message;
|
|
1338
|
+
}
|
|
1339
|
+
if (obj_columnLabel_union0 && obj_columnLabel_union1) {
|
|
1340
|
+
var message = 'Object doesn\'t match union (at "' + path_columnLabel_1 + '")';
|
|
1341
|
+
message += '\n' + obj_columnLabel_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1342
|
+
message += '\n' + obj_columnLabel_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1343
|
+
return new TypeError(message);
|
|
1344
|
+
}
|
|
1345
|
+
}
|
|
1346
|
+
if (obj.columnName !== undefined) {
|
|
1347
|
+
var obj_columnName_1 = obj.columnName;
|
|
1348
|
+
var path_columnName_1 = path + '.columnName';
|
|
1349
|
+
var obj_columnName_union0 = null;
|
|
1350
|
+
var obj_columnName_union0_error = (function () {
|
|
1351
|
+
if (typeof obj_columnName_1 !== 'string') {
|
|
1352
|
+
return new TypeError('Expected "string" but received "' + typeof obj_columnName_1 + '" (at "' + path_columnName_1 + '")');
|
|
1353
|
+
}
|
|
1354
|
+
})();
|
|
1355
|
+
if (obj_columnName_union0_error != null) {
|
|
1356
|
+
obj_columnName_union0 = obj_columnName_union0_error.message;
|
|
1357
|
+
}
|
|
1358
|
+
var obj_columnName_union1 = null;
|
|
1359
|
+
var obj_columnName_union1_error = (function () {
|
|
1360
|
+
if (obj_columnName_1 !== null) {
|
|
1361
|
+
return new TypeError('Expected "null" but received "' + typeof obj_columnName_1 + '" (at "' + path_columnName_1 + '")');
|
|
1362
|
+
}
|
|
1363
|
+
})();
|
|
1364
|
+
if (obj_columnName_union1_error != null) {
|
|
1365
|
+
obj_columnName_union1 = obj_columnName_union1_error.message;
|
|
1366
|
+
}
|
|
1367
|
+
if (obj_columnName_union0 && obj_columnName_union1) {
|
|
1368
|
+
var message = 'Object doesn\'t match union (at "' + path_columnName_1 + '")';
|
|
1369
|
+
message += '\n' + obj_columnName_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1370
|
+
message += '\n' + obj_columnName_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1371
|
+
return new TypeError(message);
|
|
1372
|
+
}
|
|
1373
|
+
}
|
|
1374
|
+
if (obj.columnValue !== undefined) {
|
|
1375
|
+
var obj_columnValue_1 = obj.columnValue;
|
|
1376
|
+
var path_columnValue_1 = path + '.columnValue';
|
|
1377
|
+
var obj_columnValue_union0 = null;
|
|
1378
|
+
var obj_columnValue_union0_error = (function () {
|
|
1379
|
+
if (typeof obj_columnValue_1 !== 'string') {
|
|
1380
|
+
return new TypeError('Expected "string" but received "' + typeof obj_columnValue_1 + '" (at "' + path_columnValue_1 + '")');
|
|
1381
|
+
}
|
|
1382
|
+
})();
|
|
1383
|
+
if (obj_columnValue_union0_error != null) {
|
|
1384
|
+
obj_columnValue_union0 = obj_columnValue_union0_error.message;
|
|
1385
|
+
}
|
|
1386
|
+
var obj_columnValue_union1 = null;
|
|
1387
|
+
var obj_columnValue_union1_error = (function () {
|
|
1388
|
+
if (obj_columnValue_1 !== null) {
|
|
1389
|
+
return new TypeError('Expected "null" but received "' + typeof obj_columnValue_1 + '" (at "' + path_columnValue_1 + '")');
|
|
1390
|
+
}
|
|
1391
|
+
})();
|
|
1392
|
+
if (obj_columnValue_union1_error != null) {
|
|
1393
|
+
obj_columnValue_union1 = obj_columnValue_union1_error.message;
|
|
1394
|
+
}
|
|
1395
|
+
if (obj_columnValue_union0 && obj_columnValue_union1) {
|
|
1396
|
+
var message = 'Object doesn\'t match union (at "' + path_columnValue_1 + '")';
|
|
1397
|
+
message += '\n' + obj_columnValue_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1398
|
+
message += '\n' + obj_columnValue_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1399
|
+
return new TypeError(message);
|
|
1400
|
+
}
|
|
1401
|
+
}
|
|
1402
|
+
if (obj.initialValue !== undefined) {
|
|
1403
|
+
var obj_initialValue_1 = obj.initialValue;
|
|
1404
|
+
var path_initialValue_1 = path + '.initialValue';
|
|
1405
|
+
var obj_initialValue_union0 = null;
|
|
1406
|
+
var obj_initialValue_union0_error = (function () {
|
|
1407
|
+
if (typeof obj_initialValue_1 !== 'string') {
|
|
1408
|
+
return new TypeError('Expected "string" but received "' + typeof obj_initialValue_1 + '" (at "' + path_initialValue_1 + '")');
|
|
1409
|
+
}
|
|
1410
|
+
})();
|
|
1411
|
+
if (obj_initialValue_union0_error != null) {
|
|
1412
|
+
obj_initialValue_union0 = obj_initialValue_union0_error.message;
|
|
1413
|
+
}
|
|
1414
|
+
var obj_initialValue_union1 = null;
|
|
1415
|
+
var obj_initialValue_union1_error = (function () {
|
|
1416
|
+
if (obj_initialValue_1 !== null) {
|
|
1417
|
+
return new TypeError('Expected "null" but received "' + typeof obj_initialValue_1 + '" (at "' + path_initialValue_1 + '")');
|
|
1418
|
+
}
|
|
1419
|
+
})();
|
|
1420
|
+
if (obj_initialValue_union1_error != null) {
|
|
1421
|
+
obj_initialValue_union1 = obj_initialValue_union1_error.message;
|
|
1422
|
+
}
|
|
1423
|
+
if (obj_initialValue_union0 && obj_initialValue_union1) {
|
|
1424
|
+
var message = 'Object doesn\'t match union (at "' + path_initialValue_1 + '")';
|
|
1425
|
+
message += '\n' + obj_initialValue_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1426
|
+
message += '\n' + obj_initialValue_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1427
|
+
return new TypeError(message);
|
|
1428
|
+
}
|
|
1429
|
+
}
|
|
1430
|
+
})();
|
|
1431
|
+
return v_error === undefined ? null : v_error;
|
|
1432
|
+
}
|
|
1433
|
+
function deepFreeze$b(input) {
|
|
1434
|
+
ObjectFreeze(input);
|
|
1435
|
+
}
|
|
1436
|
+
|
|
1437
|
+
function validate$b(obj, path) {
|
|
1438
|
+
if (path === void 0) { path = 'Insight'; }
|
|
1439
|
+
var v_error = (function () {
|
|
1440
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1441
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1442
|
+
}
|
|
1443
|
+
if (obj.columns !== undefined) {
|
|
1444
|
+
var obj_columns = obj.columns;
|
|
1445
|
+
var path_columns = path + '.columns';
|
|
1446
|
+
if (!ArrayIsArray(obj_columns)) {
|
|
1447
|
+
return new TypeError('Expected "array" but received "' + typeof obj_columns + '" (at "' + path_columns + '")');
|
|
1448
|
+
}
|
|
1449
|
+
var _loop_1 = function (i) {
|
|
1450
|
+
var obj_columns_item = obj_columns[i];
|
|
1451
|
+
var path_columns_item = path_columns + '[' + i + ']';
|
|
1452
|
+
var obj_columns_item_union0 = null;
|
|
1453
|
+
var obj_columns_item_union0_error = (function () {
|
|
1454
|
+
var referencepath_columns_itemValidationError = validate$c(obj_columns_item, path_columns_item);
|
|
1455
|
+
if (referencepath_columns_itemValidationError !== null) {
|
|
1456
|
+
var message = 'Object doesn\'t match Column (at "' + path_columns_item + '")\n';
|
|
1457
|
+
message += referencepath_columns_itemValidationError.message.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1458
|
+
return new TypeError(message);
|
|
1459
|
+
}
|
|
1460
|
+
})();
|
|
1461
|
+
if (obj_columns_item_union0_error != null) {
|
|
1462
|
+
obj_columns_item_union0 = obj_columns_item_union0_error.message;
|
|
1463
|
+
}
|
|
1464
|
+
var obj_columns_item_union1 = null;
|
|
1465
|
+
var obj_columns_item_union1_error = (function () {
|
|
1466
|
+
if (obj_columns_item !== null) {
|
|
1467
|
+
return new TypeError('Expected "null" but received "' + typeof obj_columns_item + '" (at "' + path_columns_item + '")');
|
|
1468
|
+
}
|
|
1469
|
+
})();
|
|
1470
|
+
if (obj_columns_item_union1_error != null) {
|
|
1471
|
+
obj_columns_item_union1 = obj_columns_item_union1_error.message;
|
|
1472
|
+
}
|
|
1473
|
+
if (obj_columns_item_union0 && obj_columns_item_union1) {
|
|
1474
|
+
var message = 'Object doesn\'t match union (at "' + path_columns_item + '")';
|
|
1475
|
+
message += '\n' + obj_columns_item_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1476
|
+
message += '\n' + obj_columns_item_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1477
|
+
return { value: new TypeError(message) };
|
|
1478
|
+
}
|
|
1479
|
+
};
|
|
1480
|
+
for (var i = 0; i < obj_columns.length; i++) {
|
|
1481
|
+
var state_1 = _loop_1(i);
|
|
1482
|
+
if (typeof state_1 === "object")
|
|
1483
|
+
return state_1.value;
|
|
1484
|
+
}
|
|
1485
|
+
}
|
|
1486
|
+
if (obj.value !== undefined) {
|
|
1487
|
+
obj.value;
|
|
1488
|
+
}
|
|
1489
|
+
})();
|
|
1490
|
+
return v_error === undefined ? null : v_error;
|
|
1491
|
+
}
|
|
1492
|
+
function deepFreeze$a(input) {
|
|
1493
|
+
var input_columns = input.columns;
|
|
1494
|
+
if (input_columns !== undefined) {
|
|
1495
|
+
for (var i = 0; i < input_columns.length; i++) {
|
|
1496
|
+
var input_columns_item = input_columns[i];
|
|
1497
|
+
if (input_columns_item !== null && typeof input_columns_item === 'object') {
|
|
1498
|
+
deepFreeze$b(input_columns_item);
|
|
1499
|
+
}
|
|
1500
|
+
}
|
|
1501
|
+
ObjectFreeze(input_columns);
|
|
1502
|
+
}
|
|
1503
|
+
ObjectFreeze(input);
|
|
1504
|
+
}
|
|
1505
|
+
|
|
1506
|
+
function validate$a(obj, path) {
|
|
1507
|
+
if (path === void 0) { path = 'Prediction'; }
|
|
1508
|
+
var v_error = (function () {
|
|
1509
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1510
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1511
|
+
}
|
|
1512
|
+
if (obj.historyRefPointScore !== undefined) {
|
|
1513
|
+
obj.historyRefPointScore;
|
|
1514
|
+
}
|
|
1515
|
+
if (obj.insights !== undefined) {
|
|
1516
|
+
var obj_insights = obj.insights;
|
|
1517
|
+
var path_insights = path + '.insights';
|
|
1518
|
+
if (!ArrayIsArray(obj_insights)) {
|
|
1519
|
+
return new TypeError('Expected "array" but received "' + typeof obj_insights + '" (at "' + path_insights + '")');
|
|
1520
|
+
}
|
|
1521
|
+
var _loop_1 = function (i) {
|
|
1522
|
+
var obj_insights_item = obj_insights[i];
|
|
1523
|
+
var path_insights_item = path_insights + '[' + i + ']';
|
|
1524
|
+
var obj_insights_item_union0 = null;
|
|
1525
|
+
var obj_insights_item_union0_error = (function () {
|
|
1526
|
+
var referencepath_insights_itemValidationError = validate$b(obj_insights_item, path_insights_item);
|
|
1527
|
+
if (referencepath_insights_itemValidationError !== null) {
|
|
1528
|
+
var message = 'Object doesn\'t match Insight (at "' + path_insights_item + '")\n';
|
|
1529
|
+
message += referencepath_insights_itemValidationError.message.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1530
|
+
return new TypeError(message);
|
|
1531
|
+
}
|
|
1532
|
+
})();
|
|
1533
|
+
if (obj_insights_item_union0_error != null) {
|
|
1534
|
+
obj_insights_item_union0 = obj_insights_item_union0_error.message;
|
|
1535
|
+
}
|
|
1536
|
+
var obj_insights_item_union1 = null;
|
|
1537
|
+
var obj_insights_item_union1_error = (function () {
|
|
1538
|
+
if (obj_insights_item !== null) {
|
|
1539
|
+
return new TypeError('Expected "null" but received "' + typeof obj_insights_item + '" (at "' + path_insights_item + '")');
|
|
1540
|
+
}
|
|
1541
|
+
})();
|
|
1542
|
+
if (obj_insights_item_union1_error != null) {
|
|
1543
|
+
obj_insights_item_union1 = obj_insights_item_union1_error.message;
|
|
1544
|
+
}
|
|
1545
|
+
if (obj_insights_item_union0 && obj_insights_item_union1) {
|
|
1546
|
+
var message = 'Object doesn\'t match union (at "' + path_insights_item + '")';
|
|
1547
|
+
message += '\n' + obj_insights_item_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1548
|
+
message += '\n' + obj_insights_item_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1549
|
+
return { value: new TypeError(message) };
|
|
1550
|
+
}
|
|
1551
|
+
};
|
|
1552
|
+
for (var i = 0; i < obj_insights.length; i++) {
|
|
1553
|
+
var state_1 = _loop_1(i);
|
|
1554
|
+
if (typeof state_1 === "object")
|
|
1555
|
+
return state_1.value;
|
|
1556
|
+
}
|
|
1557
|
+
}
|
|
1558
|
+
if (obj.missingColumns !== undefined) {
|
|
1559
|
+
var obj_missingColumns = obj.missingColumns;
|
|
1560
|
+
var path_missingColumns = path + '.missingColumns';
|
|
1561
|
+
if (!ArrayIsArray(obj_missingColumns)) {
|
|
1562
|
+
return new TypeError('Expected "array" but received "' + typeof obj_missingColumns + '" (at "' + path_missingColumns + '")');
|
|
1563
|
+
}
|
|
1564
|
+
var _loop_2 = function (i) {
|
|
1565
|
+
var obj_missingColumns_item = obj_missingColumns[i];
|
|
1566
|
+
var path_missingColumns_item = path_missingColumns + '[' + i + ']';
|
|
1567
|
+
var obj_missingColumns_item_union0 = null;
|
|
1568
|
+
var obj_missingColumns_item_union0_error = (function () {
|
|
1569
|
+
if (typeof obj_missingColumns_item !== 'string') {
|
|
1570
|
+
return new TypeError('Expected "string" but received "' + typeof obj_missingColumns_item + '" (at "' + path_missingColumns_item + '")');
|
|
1571
|
+
}
|
|
1572
|
+
})();
|
|
1573
|
+
if (obj_missingColumns_item_union0_error != null) {
|
|
1574
|
+
obj_missingColumns_item_union0 = obj_missingColumns_item_union0_error.message;
|
|
1575
|
+
}
|
|
1576
|
+
var obj_missingColumns_item_union1 = null;
|
|
1577
|
+
var obj_missingColumns_item_union1_error = (function () {
|
|
1578
|
+
if (obj_missingColumns_item !== null) {
|
|
1579
|
+
return new TypeError('Expected "null" but received "' + typeof obj_missingColumns_item + '" (at "' + path_missingColumns_item + '")');
|
|
1580
|
+
}
|
|
1581
|
+
})();
|
|
1582
|
+
if (obj_missingColumns_item_union1_error != null) {
|
|
1583
|
+
obj_missingColumns_item_union1 = obj_missingColumns_item_union1_error.message;
|
|
1584
|
+
}
|
|
1585
|
+
if (obj_missingColumns_item_union0 && obj_missingColumns_item_union1) {
|
|
1586
|
+
var message = 'Object doesn\'t match union (at "' + path_missingColumns_item + '")';
|
|
1587
|
+
message += '\n' + obj_missingColumns_item_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1588
|
+
message += '\n' + obj_missingColumns_item_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1589
|
+
return { value: new TypeError(message) };
|
|
1590
|
+
}
|
|
1591
|
+
};
|
|
1592
|
+
for (var i = 0; i < obj_missingColumns.length; i++) {
|
|
1593
|
+
var state_2 = _loop_2(i);
|
|
1594
|
+
if (typeof state_2 === "object")
|
|
1595
|
+
return state_2.value;
|
|
1596
|
+
}
|
|
1597
|
+
}
|
|
1598
|
+
if (obj.outOfBoundsColumns !== undefined) {
|
|
1599
|
+
var obj_outOfBoundsColumns = obj.outOfBoundsColumns;
|
|
1600
|
+
var path_outOfBoundsColumns = path + '.outOfBoundsColumns';
|
|
1601
|
+
if (!ArrayIsArray(obj_outOfBoundsColumns)) {
|
|
1602
|
+
return new TypeError('Expected "array" but received "' + typeof obj_outOfBoundsColumns + '" (at "' + path_outOfBoundsColumns + '")');
|
|
1603
|
+
}
|
|
1604
|
+
var _loop_3 = function (i) {
|
|
1605
|
+
var obj_outOfBoundsColumns_item = obj_outOfBoundsColumns[i];
|
|
1606
|
+
var path_outOfBoundsColumns_item = path_outOfBoundsColumns + '[' + i + ']';
|
|
1607
|
+
var obj_outOfBoundsColumns_item_union0 = null;
|
|
1608
|
+
var obj_outOfBoundsColumns_item_union0_error = (function () {
|
|
1609
|
+
var referencepath_outOfBoundsColumns_itemValidationError = validate$c(obj_outOfBoundsColumns_item, path_outOfBoundsColumns_item);
|
|
1610
|
+
if (referencepath_outOfBoundsColumns_itemValidationError !== null) {
|
|
1611
|
+
var message = 'Object doesn\'t match Column (at "' + path_outOfBoundsColumns_item + '")\n';
|
|
1612
|
+
message += referencepath_outOfBoundsColumns_itemValidationError.message.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1613
|
+
return new TypeError(message);
|
|
1614
|
+
}
|
|
1615
|
+
})();
|
|
1616
|
+
if (obj_outOfBoundsColumns_item_union0_error != null) {
|
|
1617
|
+
obj_outOfBoundsColumns_item_union0 = obj_outOfBoundsColumns_item_union0_error.message;
|
|
1618
|
+
}
|
|
1619
|
+
var obj_outOfBoundsColumns_item_union1 = null;
|
|
1620
|
+
var obj_outOfBoundsColumns_item_union1_error = (function () {
|
|
1621
|
+
if (obj_outOfBoundsColumns_item !== null) {
|
|
1622
|
+
return new TypeError('Expected "null" but received "' + typeof obj_outOfBoundsColumns_item + '" (at "' + path_outOfBoundsColumns_item + '")');
|
|
1623
|
+
}
|
|
1624
|
+
})();
|
|
1625
|
+
if (obj_outOfBoundsColumns_item_union1_error != null) {
|
|
1626
|
+
obj_outOfBoundsColumns_item_union1 = obj_outOfBoundsColumns_item_union1_error.message;
|
|
1627
|
+
}
|
|
1628
|
+
if (obj_outOfBoundsColumns_item_union0 && obj_outOfBoundsColumns_item_union1) {
|
|
1629
|
+
var message = 'Object doesn\'t match union (at "' + path_outOfBoundsColumns_item + '")';
|
|
1630
|
+
message += '\n' + obj_outOfBoundsColumns_item_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1631
|
+
message += '\n' + obj_outOfBoundsColumns_item_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1632
|
+
return { value: new TypeError(message) };
|
|
1633
|
+
}
|
|
1634
|
+
};
|
|
1635
|
+
for (var i = 0; i < obj_outOfBoundsColumns.length; i++) {
|
|
1636
|
+
var state_3 = _loop_3(i);
|
|
1637
|
+
if (typeof state_3 === "object")
|
|
1638
|
+
return state_3.value;
|
|
1639
|
+
}
|
|
1640
|
+
}
|
|
1641
|
+
if (obj.score !== undefined) {
|
|
1642
|
+
obj.score;
|
|
1643
|
+
}
|
|
1644
|
+
})();
|
|
1645
|
+
return v_error === undefined ? null : v_error;
|
|
1646
|
+
}
|
|
1647
|
+
function deepFreeze$9(input) {
|
|
1648
|
+
var input_insights = input.insights;
|
|
1649
|
+
if (input_insights !== undefined) {
|
|
1650
|
+
for (var i = 0; i < input_insights.length; i++) {
|
|
1651
|
+
var input_insights_item = input_insights[i];
|
|
1652
|
+
if (input_insights_item !== null && typeof input_insights_item === 'object') {
|
|
1653
|
+
deepFreeze$a(input_insights_item);
|
|
1654
|
+
}
|
|
1655
|
+
}
|
|
1656
|
+
ObjectFreeze(input_insights);
|
|
1657
|
+
}
|
|
1658
|
+
var input_missingColumns = input.missingColumns;
|
|
1659
|
+
if (input_missingColumns !== undefined) {
|
|
1660
|
+
for (var i = 0; i < input_missingColumns.length; i++) {
|
|
1661
|
+
}
|
|
1662
|
+
ObjectFreeze(input_missingColumns);
|
|
1663
|
+
}
|
|
1664
|
+
var input_outOfBoundsColumns = input.outOfBoundsColumns;
|
|
1665
|
+
if (input_outOfBoundsColumns !== undefined) {
|
|
1666
|
+
for (var i = 0; i < input_outOfBoundsColumns.length; i++) {
|
|
1667
|
+
var input_outOfBoundsColumns_item = input_outOfBoundsColumns[i];
|
|
1668
|
+
if (input_outOfBoundsColumns_item !== null && typeof input_outOfBoundsColumns_item === 'object') {
|
|
1669
|
+
deepFreeze$b(input_outOfBoundsColumns_item);
|
|
1670
|
+
}
|
|
1671
|
+
}
|
|
1672
|
+
ObjectFreeze(input_outOfBoundsColumns);
|
|
1673
|
+
}
|
|
1674
|
+
ObjectFreeze(input);
|
|
1675
|
+
}
|
|
1676
|
+
|
|
1677
|
+
function validate$9(obj, path) {
|
|
1678
|
+
if (path === void 0) { path = 'Suggestion'; }
|
|
1679
|
+
var v_error = (function () {
|
|
1680
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1681
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1682
|
+
}
|
|
1683
|
+
if (obj.columns !== undefined) {
|
|
1684
|
+
var obj_columns = obj.columns;
|
|
1685
|
+
var path_columns = path + '.columns';
|
|
1686
|
+
if (!ArrayIsArray(obj_columns)) {
|
|
1687
|
+
return new TypeError('Expected "array" but received "' + typeof obj_columns + '" (at "' + path_columns + '")');
|
|
1688
|
+
}
|
|
1689
|
+
var _loop_1 = function (i) {
|
|
1690
|
+
var obj_columns_item = obj_columns[i];
|
|
1691
|
+
var path_columns_item = path_columns + '[' + i + ']';
|
|
1692
|
+
var obj_columns_item_union0 = null;
|
|
1693
|
+
var obj_columns_item_union0_error = (function () {
|
|
1694
|
+
var referencepath_columns_itemValidationError = validate$c(obj_columns_item, path_columns_item);
|
|
1695
|
+
if (referencepath_columns_itemValidationError !== null) {
|
|
1696
|
+
var message = 'Object doesn\'t match Column (at "' + path_columns_item + '")\n';
|
|
1697
|
+
message += referencepath_columns_itemValidationError.message.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1698
|
+
return new TypeError(message);
|
|
1699
|
+
}
|
|
1700
|
+
})();
|
|
1701
|
+
if (obj_columns_item_union0_error != null) {
|
|
1702
|
+
obj_columns_item_union0 = obj_columns_item_union0_error.message;
|
|
1703
|
+
}
|
|
1704
|
+
var obj_columns_item_union1 = null;
|
|
1705
|
+
var obj_columns_item_union1_error = (function () {
|
|
1706
|
+
if (obj_columns_item !== null) {
|
|
1707
|
+
return new TypeError('Expected "null" but received "' + typeof obj_columns_item + '" (at "' + path_columns_item + '")');
|
|
1708
|
+
}
|
|
1709
|
+
})();
|
|
1710
|
+
if (obj_columns_item_union1_error != null) {
|
|
1711
|
+
obj_columns_item_union1 = obj_columns_item_union1_error.message;
|
|
1712
|
+
}
|
|
1713
|
+
if (obj_columns_item_union0 && obj_columns_item_union1) {
|
|
1714
|
+
var message = 'Object doesn\'t match union (at "' + path_columns_item + '")';
|
|
1715
|
+
message += '\n' + obj_columns_item_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1716
|
+
message += '\n' + obj_columns_item_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1717
|
+
return { value: new TypeError(message) };
|
|
1718
|
+
}
|
|
1719
|
+
};
|
|
1720
|
+
for (var i = 0; i < obj_columns.length; i++) {
|
|
1721
|
+
var state_1 = _loop_1(i);
|
|
1722
|
+
if (typeof state_1 === "object")
|
|
1723
|
+
return state_1.value;
|
|
1724
|
+
}
|
|
1725
|
+
}
|
|
1726
|
+
if (obj.value !== undefined) {
|
|
1727
|
+
obj.value;
|
|
1728
|
+
}
|
|
1729
|
+
})();
|
|
1730
|
+
return v_error === undefined ? null : v_error;
|
|
1731
|
+
}
|
|
1732
|
+
function deepFreeze$8(input) {
|
|
1733
|
+
var input_columns = input.columns;
|
|
1734
|
+
if (input_columns !== undefined) {
|
|
1735
|
+
for (var i = 0; i < input_columns.length; i++) {
|
|
1736
|
+
var input_columns_item = input_columns[i];
|
|
1737
|
+
if (input_columns_item !== null && typeof input_columns_item === 'object') {
|
|
1738
|
+
deepFreeze$b(input_columns_item);
|
|
1739
|
+
}
|
|
1740
|
+
}
|
|
1741
|
+
ObjectFreeze(input_columns);
|
|
1742
|
+
}
|
|
1743
|
+
ObjectFreeze(input);
|
|
1744
|
+
}
|
|
1745
|
+
|
|
1746
|
+
function validate$8(obj, path) {
|
|
1747
|
+
if (path === void 0) { path = 'PredictionObject'; }
|
|
1748
|
+
var v_error = (function () {
|
|
1749
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1750
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1751
|
+
}
|
|
1752
|
+
if (obj.model !== undefined) {
|
|
1753
|
+
var obj_model_1 = obj.model;
|
|
1754
|
+
var path_model_1 = path + '.model';
|
|
1755
|
+
var obj_model_union0 = null;
|
|
1756
|
+
var obj_model_union0_error = (function () {
|
|
1757
|
+
var referencepath_modelValidationError = validate$d(obj_model_1, path_model_1);
|
|
1758
|
+
if (referencepath_modelValidationError !== null) {
|
|
1759
|
+
var message = 'Object doesn\'t match NullableModel (at "' + path_model_1 + '")\n';
|
|
1760
|
+
message += referencepath_modelValidationError.message.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1761
|
+
return new TypeError(message);
|
|
1762
|
+
}
|
|
1763
|
+
})();
|
|
1764
|
+
if (obj_model_union0_error != null) {
|
|
1765
|
+
obj_model_union0 = obj_model_union0_error.message;
|
|
1766
|
+
}
|
|
1767
|
+
var obj_model_union1 = null;
|
|
1768
|
+
var obj_model_union1_error = (function () {
|
|
1769
|
+
if (obj_model_1 !== null) {
|
|
1770
|
+
return new TypeError('Expected "null" but received "' + typeof obj_model_1 + '" (at "' + path_model_1 + '")');
|
|
1771
|
+
}
|
|
1772
|
+
})();
|
|
1773
|
+
if (obj_model_union1_error != null) {
|
|
1774
|
+
obj_model_union1 = obj_model_union1_error.message;
|
|
1775
|
+
}
|
|
1776
|
+
if (obj_model_union0 && obj_model_union1) {
|
|
1777
|
+
var message = 'Object doesn\'t match union (at "' + path_model_1 + '")';
|
|
1778
|
+
message += '\n' + obj_model_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1779
|
+
message += '\n' + obj_model_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1780
|
+
return new TypeError(message);
|
|
1781
|
+
}
|
|
1782
|
+
}
|
|
1783
|
+
if (obj.prediction !== undefined) {
|
|
1784
|
+
var obj_prediction_1 = obj.prediction;
|
|
1785
|
+
var path_prediction_1 = path + '.prediction';
|
|
1786
|
+
var obj_prediction_union0 = null;
|
|
1787
|
+
var obj_prediction_union0_error = (function () {
|
|
1788
|
+
var referencepath_predictionValidationError = validate$a(obj_prediction_1, path_prediction_1);
|
|
1789
|
+
if (referencepath_predictionValidationError !== null) {
|
|
1790
|
+
var message = 'Object doesn\'t match Prediction (at "' + path_prediction_1 + '")\n';
|
|
1791
|
+
message += referencepath_predictionValidationError.message.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1792
|
+
return new TypeError(message);
|
|
1793
|
+
}
|
|
1794
|
+
})();
|
|
1795
|
+
if (obj_prediction_union0_error != null) {
|
|
1796
|
+
obj_prediction_union0 = obj_prediction_union0_error.message;
|
|
1797
|
+
}
|
|
1798
|
+
var obj_prediction_union1 = null;
|
|
1799
|
+
var obj_prediction_union1_error = (function () {
|
|
1800
|
+
if (obj_prediction_1 !== null) {
|
|
1801
|
+
return new TypeError('Expected "null" but received "' + typeof obj_prediction_1 + '" (at "' + path_prediction_1 + '")');
|
|
1802
|
+
}
|
|
1803
|
+
})();
|
|
1804
|
+
if (obj_prediction_union1_error != null) {
|
|
1805
|
+
obj_prediction_union1 = obj_prediction_union1_error.message;
|
|
1806
|
+
}
|
|
1807
|
+
if (obj_prediction_union0 && obj_prediction_union1) {
|
|
1808
|
+
var message = 'Object doesn\'t match union (at "' + path_prediction_1 + '")';
|
|
1809
|
+
message += '\n' + obj_prediction_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1810
|
+
message += '\n' + obj_prediction_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1811
|
+
return new TypeError(message);
|
|
1812
|
+
}
|
|
1813
|
+
}
|
|
1814
|
+
var obj_status = obj.status;
|
|
1815
|
+
var path_status = path + '.status';
|
|
1816
|
+
var obj_status_union0 = null;
|
|
1817
|
+
var obj_status_union0_error = (function () {
|
|
1818
|
+
if (typeof obj_status !== 'string') {
|
|
1819
|
+
return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
|
|
1820
|
+
}
|
|
1821
|
+
})();
|
|
1822
|
+
if (obj_status_union0_error != null) {
|
|
1823
|
+
obj_status_union0 = obj_status_union0_error.message;
|
|
1824
|
+
}
|
|
1825
|
+
var obj_status_union1 = null;
|
|
1826
|
+
var obj_status_union1_error = (function () {
|
|
1827
|
+
if (obj_status !== null) {
|
|
1828
|
+
return new TypeError('Expected "null" but received "' + typeof obj_status + '" (at "' + path_status + '")');
|
|
1829
|
+
}
|
|
1830
|
+
})();
|
|
1831
|
+
if (obj_status_union1_error != null) {
|
|
1832
|
+
obj_status_union1 = obj_status_union1_error.message;
|
|
1833
|
+
}
|
|
1834
|
+
if (obj_status_union0 && obj_status_union1) {
|
|
1835
|
+
var message = 'Object doesn\'t match union (at "' + path_status + '")';
|
|
1836
|
+
message += '\n' + obj_status_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1837
|
+
message += '\n' + obj_status_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1838
|
+
return new TypeError(message);
|
|
1839
|
+
}
|
|
1840
|
+
if (obj.suggestions !== undefined) {
|
|
1841
|
+
var obj_suggestions = obj.suggestions;
|
|
1842
|
+
var path_suggestions = path + '.suggestions';
|
|
1843
|
+
if (!ArrayIsArray(obj_suggestions)) {
|
|
1844
|
+
return new TypeError('Expected "array" but received "' + typeof obj_suggestions + '" (at "' + path_suggestions + '")');
|
|
1845
|
+
}
|
|
1846
|
+
var _loop_1 = function (i) {
|
|
1847
|
+
var obj_suggestions_item = obj_suggestions[i];
|
|
1848
|
+
var path_suggestions_item = path_suggestions + '[' + i + ']';
|
|
1849
|
+
var obj_suggestions_item_union0 = null;
|
|
1850
|
+
var obj_suggestions_item_union0_error = (function () {
|
|
1851
|
+
var referencepath_suggestions_itemValidationError = validate$9(obj_suggestions_item, path_suggestions_item);
|
|
1852
|
+
if (referencepath_suggestions_itemValidationError !== null) {
|
|
1853
|
+
var message = 'Object doesn\'t match Suggestion (at "' + path_suggestions_item + '")\n';
|
|
1854
|
+
message += referencepath_suggestions_itemValidationError.message.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1855
|
+
return new TypeError(message);
|
|
1856
|
+
}
|
|
1857
|
+
})();
|
|
1858
|
+
if (obj_suggestions_item_union0_error != null) {
|
|
1859
|
+
obj_suggestions_item_union0 = obj_suggestions_item_union0_error.message;
|
|
1860
|
+
}
|
|
1861
|
+
var obj_suggestions_item_union1 = null;
|
|
1862
|
+
var obj_suggestions_item_union1_error = (function () {
|
|
1863
|
+
if (obj_suggestions_item !== null) {
|
|
1864
|
+
return new TypeError('Expected "null" but received "' + typeof obj_suggestions_item + '" (at "' + path_suggestions_item + '")');
|
|
1865
|
+
}
|
|
1866
|
+
})();
|
|
1867
|
+
if (obj_suggestions_item_union1_error != null) {
|
|
1868
|
+
obj_suggestions_item_union1 = obj_suggestions_item_union1_error.message;
|
|
1869
|
+
}
|
|
1870
|
+
if (obj_suggestions_item_union0 && obj_suggestions_item_union1) {
|
|
1871
|
+
var message = 'Object doesn\'t match union (at "' + path_suggestions_item + '")';
|
|
1872
|
+
message += '\n' + obj_suggestions_item_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1873
|
+
message += '\n' + obj_suggestions_item_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1874
|
+
return { value: new TypeError(message) };
|
|
1875
|
+
}
|
|
1876
|
+
};
|
|
1877
|
+
for (var i = 0; i < obj_suggestions.length; i++) {
|
|
1878
|
+
var state_1 = _loop_1(i);
|
|
1879
|
+
if (typeof state_1 === "object")
|
|
1880
|
+
return state_1.value;
|
|
1881
|
+
}
|
|
1882
|
+
}
|
|
1883
|
+
})();
|
|
1884
|
+
return v_error === undefined ? null : v_error;
|
|
1885
|
+
}
|
|
1886
|
+
function deepFreeze$7(input) {
|
|
1887
|
+
var input_model = input.model;
|
|
1888
|
+
if (input_model !== undefined) {
|
|
1889
|
+
if (input_model !== null && typeof input_model === 'object') {
|
|
1890
|
+
deepFreeze$c(input_model);
|
|
1891
|
+
}
|
|
1892
|
+
}
|
|
1893
|
+
var input_prediction = input.prediction;
|
|
1894
|
+
if (input_prediction !== undefined) {
|
|
1895
|
+
if (input_prediction !== null && typeof input_prediction === 'object') {
|
|
1896
|
+
deepFreeze$9(input_prediction);
|
|
1897
|
+
}
|
|
1898
|
+
}
|
|
1899
|
+
var input_suggestions = input.suggestions;
|
|
1900
|
+
if (input_suggestions !== undefined) {
|
|
1901
|
+
for (var i = 0; i < input_suggestions.length; i++) {
|
|
1902
|
+
var input_suggestions_item = input_suggestions[i];
|
|
1903
|
+
if (input_suggestions_item !== null && typeof input_suggestions_item === 'object') {
|
|
1904
|
+
deepFreeze$8(input_suggestions_item);
|
|
1905
|
+
}
|
|
1906
|
+
}
|
|
1907
|
+
ObjectFreeze(input_suggestions);
|
|
1908
|
+
}
|
|
1909
|
+
ObjectFreeze(input);
|
|
1910
|
+
}
|
|
1911
|
+
|
|
1912
|
+
function validate$7(obj, path) {
|
|
1913
|
+
if (path === void 0) { path = 'Status'; }
|
|
1914
|
+
var v_error = (function () {
|
|
1915
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1916
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1917
|
+
}
|
|
1918
|
+
var obj_code = obj.code;
|
|
1919
|
+
var path_code = path + '.code';
|
|
1920
|
+
if (typeof obj_code !== 'number' || (typeof obj_code === 'number' && Math.floor(obj_code) !== obj_code)) {
|
|
1921
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_code + '" (at "' + path_code + '")');
|
|
1922
|
+
}
|
|
1923
|
+
var obj_message = obj.message;
|
|
1924
|
+
var path_message = path + '.message';
|
|
1925
|
+
if (typeof obj_message !== 'string') {
|
|
1926
|
+
return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
|
|
1927
|
+
}
|
|
1928
|
+
})();
|
|
1929
|
+
return v_error === undefined ? null : v_error;
|
|
1930
|
+
}
|
|
1931
|
+
function deepFreeze$6(input) {
|
|
1932
|
+
ObjectFreeze(input);
|
|
1933
|
+
}
|
|
1934
|
+
|
|
1935
|
+
var TTL$1 = 1000;
|
|
1936
|
+
var VERSION$1 = "f32ecc98b5cd30fb5680de162a64308a";
|
|
1937
|
+
function validate$6(obj, path) {
|
|
1938
|
+
if (path === void 0) { path = 'PredictionOutputRepresentation'; }
|
|
1939
|
+
var v_error = (function () {
|
|
1940
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1941
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1942
|
+
}
|
|
1943
|
+
if (obj.classificationThreshold !== undefined) {
|
|
1944
|
+
obj.classificationThreshold;
|
|
1945
|
+
}
|
|
1946
|
+
if (obj.classificationType !== undefined) {
|
|
1947
|
+
var obj_classificationType_1 = obj.classificationType;
|
|
1948
|
+
var path_classificationType_1 = path + '.classificationType';
|
|
1949
|
+
var obj_classificationType_union0 = null;
|
|
1950
|
+
var obj_classificationType_union0_error = (function () {
|
|
1951
|
+
if (typeof obj_classificationType_1 !== 'string') {
|
|
1952
|
+
return new TypeError('Expected "string" but received "' + typeof obj_classificationType_1 + '" (at "' + path_classificationType_1 + '")');
|
|
1953
|
+
}
|
|
1954
|
+
})();
|
|
1955
|
+
if (obj_classificationType_union0_error != null) {
|
|
1956
|
+
obj_classificationType_union0 = obj_classificationType_union0_error.message;
|
|
1957
|
+
}
|
|
1958
|
+
var obj_classificationType_union1 = null;
|
|
1959
|
+
var obj_classificationType_union1_error = (function () {
|
|
1960
|
+
if (obj_classificationType_1 !== null) {
|
|
1961
|
+
return new TypeError('Expected "null" but received "' + typeof obj_classificationType_1 + '" (at "' + path_classificationType_1 + '")');
|
|
1962
|
+
}
|
|
1963
|
+
})();
|
|
1964
|
+
if (obj_classificationType_union1_error != null) {
|
|
1965
|
+
obj_classificationType_union1 = obj_classificationType_union1_error.message;
|
|
1966
|
+
}
|
|
1967
|
+
if (obj_classificationType_union0 && obj_classificationType_union1) {
|
|
1968
|
+
var message = 'Object doesn\'t match union (at "' + path_classificationType_1 + '")';
|
|
1969
|
+
message += '\n' + obj_classificationType_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1970
|
+
message += '\n' + obj_classificationType_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1971
|
+
return new TypeError(message);
|
|
1972
|
+
}
|
|
1973
|
+
}
|
|
1974
|
+
if (obj.executionModeWarning !== undefined) {
|
|
1975
|
+
var obj_executionModeWarning_1 = obj.executionModeWarning;
|
|
1976
|
+
var path_executionModeWarning_1 = path + '.executionModeWarning';
|
|
1977
|
+
var obj_executionModeWarning_union0 = null;
|
|
1978
|
+
var obj_executionModeWarning_union0_error = (function () {
|
|
1979
|
+
if (typeof obj_executionModeWarning_1 !== 'string') {
|
|
1980
|
+
return new TypeError('Expected "string" but received "' + typeof obj_executionModeWarning_1 + '" (at "' + path_executionModeWarning_1 + '")');
|
|
1981
|
+
}
|
|
1982
|
+
})();
|
|
1983
|
+
if (obj_executionModeWarning_union0_error != null) {
|
|
1984
|
+
obj_executionModeWarning_union0 = obj_executionModeWarning_union0_error.message;
|
|
1985
|
+
}
|
|
1986
|
+
var obj_executionModeWarning_union1 = null;
|
|
1987
|
+
var obj_executionModeWarning_union1_error = (function () {
|
|
1988
|
+
if (obj_executionModeWarning_1 !== null) {
|
|
1989
|
+
return new TypeError('Expected "null" but received "' + typeof obj_executionModeWarning_1 + '" (at "' + path_executionModeWarning_1 + '")');
|
|
1990
|
+
}
|
|
1991
|
+
})();
|
|
1992
|
+
if (obj_executionModeWarning_union1_error != null) {
|
|
1993
|
+
obj_executionModeWarning_union1 = obj_executionModeWarning_union1_error.message;
|
|
1994
|
+
}
|
|
1995
|
+
if (obj_executionModeWarning_union0 && obj_executionModeWarning_union1) {
|
|
1996
|
+
var message = 'Object doesn\'t match union (at "' + path_executionModeWarning_1 + '")';
|
|
1997
|
+
message += '\n' + obj_executionModeWarning_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1998
|
+
message += '\n' + obj_executionModeWarning_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1999
|
+
return new TypeError(message);
|
|
2000
|
+
}
|
|
2001
|
+
}
|
|
2002
|
+
if (obj.featureExtractor !== undefined) {
|
|
2003
|
+
var obj_featureExtractor_1 = obj.featureExtractor;
|
|
2004
|
+
var path_featureExtractor_1 = path + '.featureExtractor';
|
|
2005
|
+
var obj_featureExtractor_union0 = null;
|
|
2006
|
+
var obj_featureExtractor_union0_error = (function () {
|
|
2007
|
+
if (typeof obj_featureExtractor_1 !== 'string') {
|
|
2008
|
+
return new TypeError('Expected "string" but received "' + typeof obj_featureExtractor_1 + '" (at "' + path_featureExtractor_1 + '")');
|
|
2009
|
+
}
|
|
2010
|
+
})();
|
|
2011
|
+
if (obj_featureExtractor_union0_error != null) {
|
|
2012
|
+
obj_featureExtractor_union0 = obj_featureExtractor_union0_error.message;
|
|
2013
|
+
}
|
|
2014
|
+
var obj_featureExtractor_union1 = null;
|
|
2015
|
+
var obj_featureExtractor_union1_error = (function () {
|
|
2016
|
+
if (obj_featureExtractor_1 !== null) {
|
|
2017
|
+
return new TypeError('Expected "null" but received "' + typeof obj_featureExtractor_1 + '" (at "' + path_featureExtractor_1 + '")');
|
|
2018
|
+
}
|
|
2019
|
+
})();
|
|
2020
|
+
if (obj_featureExtractor_union1_error != null) {
|
|
2021
|
+
obj_featureExtractor_union1 = obj_featureExtractor_union1_error.message;
|
|
2022
|
+
}
|
|
2023
|
+
if (obj_featureExtractor_union0 && obj_featureExtractor_union1) {
|
|
2024
|
+
var message = 'Object doesn\'t match union (at "' + path_featureExtractor_1 + '")';
|
|
2025
|
+
message += '\n' + obj_featureExtractor_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
2026
|
+
message += '\n' + obj_featureExtractor_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
2027
|
+
return new TypeError(message);
|
|
2028
|
+
}
|
|
2029
|
+
}
|
|
2030
|
+
if (obj.featureExtractorType !== undefined) {
|
|
2031
|
+
var obj_featureExtractorType_1 = obj.featureExtractorType;
|
|
2032
|
+
var path_featureExtractorType_1 = path + '.featureExtractorType';
|
|
2033
|
+
var obj_featureExtractorType_union0 = null;
|
|
2034
|
+
var obj_featureExtractorType_union0_error = (function () {
|
|
2035
|
+
if (typeof obj_featureExtractorType_1 !== 'string') {
|
|
2036
|
+
return new TypeError('Expected "string" but received "' + typeof obj_featureExtractorType_1 + '" (at "' + path_featureExtractorType_1 + '")');
|
|
2037
|
+
}
|
|
2038
|
+
})();
|
|
2039
|
+
if (obj_featureExtractorType_union0_error != null) {
|
|
2040
|
+
obj_featureExtractorType_union0 = obj_featureExtractorType_union0_error.message;
|
|
2041
|
+
}
|
|
2042
|
+
var obj_featureExtractorType_union1 = null;
|
|
2043
|
+
var obj_featureExtractorType_union1_error = (function () {
|
|
2044
|
+
if (obj_featureExtractorType_1 !== null) {
|
|
2045
|
+
return new TypeError('Expected "null" but received "' + typeof obj_featureExtractorType_1 + '" (at "' + path_featureExtractorType_1 + '")');
|
|
2046
|
+
}
|
|
2047
|
+
})();
|
|
2048
|
+
if (obj_featureExtractorType_union1_error != null) {
|
|
2049
|
+
obj_featureExtractorType_union1 = obj_featureExtractorType_union1_error.message;
|
|
2050
|
+
}
|
|
2051
|
+
if (obj_featureExtractorType_union0 && obj_featureExtractorType_union1) {
|
|
2052
|
+
var message = 'Object doesn\'t match union (at "' + path_featureExtractorType_1 + '")';
|
|
2053
|
+
message += '\n' + obj_featureExtractorType_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
2054
|
+
message += '\n' + obj_featureExtractorType_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
2055
|
+
return new TypeError(message);
|
|
2056
|
+
}
|
|
2057
|
+
}
|
|
2058
|
+
if (obj.inputType !== undefined) {
|
|
2059
|
+
var obj_inputType_1 = obj.inputType;
|
|
2060
|
+
var path_inputType_1 = path + '.inputType';
|
|
2061
|
+
var obj_inputType_union0 = null;
|
|
2062
|
+
var obj_inputType_union0_error = (function () {
|
|
2063
|
+
if (typeof obj_inputType_1 !== 'string') {
|
|
2064
|
+
return new TypeError('Expected "string" but received "' + typeof obj_inputType_1 + '" (at "' + path_inputType_1 + '")');
|
|
2065
|
+
}
|
|
2066
|
+
})();
|
|
2067
|
+
if (obj_inputType_union0_error != null) {
|
|
2068
|
+
obj_inputType_union0 = obj_inputType_union0_error.message;
|
|
2069
|
+
}
|
|
2070
|
+
var obj_inputType_union1 = null;
|
|
2071
|
+
var obj_inputType_union1_error = (function () {
|
|
2072
|
+
if (obj_inputType_1 !== null) {
|
|
2073
|
+
return new TypeError('Expected "null" but received "' + typeof obj_inputType_1 + '" (at "' + path_inputType_1 + '")');
|
|
2074
|
+
}
|
|
2075
|
+
})();
|
|
2076
|
+
if (obj_inputType_union1_error != null) {
|
|
2077
|
+
obj_inputType_union1 = obj_inputType_union1_error.message;
|
|
2078
|
+
}
|
|
2079
|
+
if (obj_inputType_union0 && obj_inputType_union1) {
|
|
2080
|
+
var message = 'Object doesn\'t match union (at "' + path_inputType_1 + '")';
|
|
2081
|
+
message += '\n' + obj_inputType_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
2082
|
+
message += '\n' + obj_inputType_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
2083
|
+
return new TypeError(message);
|
|
2084
|
+
}
|
|
2085
|
+
}
|
|
2086
|
+
if (obj.insightsSettings !== undefined) {
|
|
2087
|
+
var obj_insightsSettings = obj.insightsSettings;
|
|
2088
|
+
var path_insightsSettings = path + '.insightsSettings';
|
|
2089
|
+
if (typeof obj_insightsSettings !== 'object' || ArrayIsArray(obj_insightsSettings) || obj_insightsSettings === null) {
|
|
2090
|
+
return new TypeError('Expected "object" but received "' + typeof obj_insightsSettings + '" (at "' + path_insightsSettings + '")');
|
|
2091
|
+
}
|
|
2092
|
+
var obj_insightsSettings_keys = ObjectKeys(obj_insightsSettings);
|
|
2093
|
+
for (var i = 0; i < obj_insightsSettings_keys.length; i++) {
|
|
2094
|
+
var key = obj_insightsSettings_keys[i];
|
|
2095
|
+
var obj_insightsSettings_prop = obj_insightsSettings[key];
|
|
2096
|
+
var path_insightsSettings_prop = path_insightsSettings + '["' + key + '"]';
|
|
2097
|
+
if (typeof obj_insightsSettings_prop !== 'number' || (typeof obj_insightsSettings_prop === 'number' && Math.floor(obj_insightsSettings_prop) !== obj_insightsSettings_prop)) {
|
|
2098
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_insightsSettings_prop + '" (at "' + path_insightsSettings_prop + '")');
|
|
2099
|
+
}
|
|
2100
|
+
}
|
|
2101
|
+
}
|
|
2102
|
+
if (obj.modelFeatures !== undefined) {
|
|
2103
|
+
var obj_modelFeatures = obj.modelFeatures;
|
|
2104
|
+
var path_modelFeatures = path + '.modelFeatures';
|
|
2105
|
+
if (!ArrayIsArray(obj_modelFeatures)) {
|
|
2106
|
+
return new TypeError('Expected "array" but received "' + typeof obj_modelFeatures + '" (at "' + path_modelFeatures + '")');
|
|
2107
|
+
}
|
|
2108
|
+
var _loop_1 = function (i) {
|
|
2109
|
+
var obj_modelFeatures_item = obj_modelFeatures[i];
|
|
2110
|
+
var path_modelFeatures_item = path_modelFeatures + '[' + i + ']';
|
|
2111
|
+
var obj_modelFeatures_item_union0 = null;
|
|
2112
|
+
var obj_modelFeatures_item_union0_error = (function () {
|
|
2113
|
+
var referencepath_modelFeatures_itemValidationError = validate$e(obj_modelFeatures_item, path_modelFeatures_item);
|
|
2114
|
+
if (referencepath_modelFeatures_itemValidationError !== null) {
|
|
2115
|
+
var message = 'Object doesn\'t match ModelFeature (at "' + path_modelFeatures_item + '")\n';
|
|
2116
|
+
message += referencepath_modelFeatures_itemValidationError.message.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
2117
|
+
return new TypeError(message);
|
|
2118
|
+
}
|
|
2119
|
+
})();
|
|
2120
|
+
if (obj_modelFeatures_item_union0_error != null) {
|
|
2121
|
+
obj_modelFeatures_item_union0 = obj_modelFeatures_item_union0_error.message;
|
|
2122
|
+
}
|
|
2123
|
+
var obj_modelFeatures_item_union1 = null;
|
|
2124
|
+
var obj_modelFeatures_item_union1_error = (function () {
|
|
2125
|
+
if (obj_modelFeatures_item !== null) {
|
|
2126
|
+
return new TypeError('Expected "null" but received "' + typeof obj_modelFeatures_item + '" (at "' + path_modelFeatures_item + '")');
|
|
2127
|
+
}
|
|
2128
|
+
})();
|
|
2129
|
+
if (obj_modelFeatures_item_union1_error != null) {
|
|
2130
|
+
obj_modelFeatures_item_union1 = obj_modelFeatures_item_union1_error.message;
|
|
2131
|
+
}
|
|
2132
|
+
if (obj_modelFeatures_item_union0 && obj_modelFeatures_item_union1) {
|
|
2133
|
+
var message = 'Object doesn\'t match union (at "' + path_modelFeatures_item + '")';
|
|
2134
|
+
message += '\n' + obj_modelFeatures_item_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
2135
|
+
message += '\n' + obj_modelFeatures_item_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
2136
|
+
return { value: new TypeError(message) };
|
|
2137
|
+
}
|
|
2138
|
+
};
|
|
2139
|
+
for (var i = 0; i < obj_modelFeatures.length; i++) {
|
|
2140
|
+
var state_1 = _loop_1(i);
|
|
2141
|
+
if (typeof state_1 === "object")
|
|
2142
|
+
return state_1.value;
|
|
2143
|
+
}
|
|
2144
|
+
}
|
|
2145
|
+
if (obj.outcomeGoal !== undefined) {
|
|
2146
|
+
var obj_outcomeGoal_1 = obj.outcomeGoal;
|
|
2147
|
+
var path_outcomeGoal_1 = path + '.outcomeGoal';
|
|
2148
|
+
var obj_outcomeGoal_union0 = null;
|
|
2149
|
+
var obj_outcomeGoal_union0_error = (function () {
|
|
2150
|
+
if (typeof obj_outcomeGoal_1 !== 'string') {
|
|
2151
|
+
return new TypeError('Expected "string" but received "' + typeof obj_outcomeGoal_1 + '" (at "' + path_outcomeGoal_1 + '")');
|
|
2152
|
+
}
|
|
2153
|
+
})();
|
|
2154
|
+
if (obj_outcomeGoal_union0_error != null) {
|
|
2155
|
+
obj_outcomeGoal_union0 = obj_outcomeGoal_union0_error.message;
|
|
2156
|
+
}
|
|
2157
|
+
var obj_outcomeGoal_union1 = null;
|
|
2158
|
+
var obj_outcomeGoal_union1_error = (function () {
|
|
2159
|
+
if (obj_outcomeGoal_1 !== null) {
|
|
2160
|
+
return new TypeError('Expected "null" but received "' + typeof obj_outcomeGoal_1 + '" (at "' + path_outcomeGoal_1 + '")');
|
|
2161
|
+
}
|
|
2162
|
+
})();
|
|
2163
|
+
if (obj_outcomeGoal_union1_error != null) {
|
|
2164
|
+
obj_outcomeGoal_union1 = obj_outcomeGoal_union1_error.message;
|
|
2165
|
+
}
|
|
2166
|
+
if (obj_outcomeGoal_union0 && obj_outcomeGoal_union1) {
|
|
2167
|
+
var message = 'Object doesn\'t match union (at "' + path_outcomeGoal_1 + '")';
|
|
2168
|
+
message += '\n' + obj_outcomeGoal_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
2169
|
+
message += '\n' + obj_outcomeGoal_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
2170
|
+
return new TypeError(message);
|
|
2171
|
+
}
|
|
2172
|
+
}
|
|
2173
|
+
if (obj.predictionDefinition !== undefined) {
|
|
2174
|
+
var obj_predictionDefinition_1 = obj.predictionDefinition;
|
|
2175
|
+
var path_predictionDefinition_1 = path + '.predictionDefinition';
|
|
2176
|
+
var obj_predictionDefinition_union0 = null;
|
|
2177
|
+
var obj_predictionDefinition_union0_error = (function () {
|
|
2178
|
+
if (typeof obj_predictionDefinition_1 !== 'string') {
|
|
2179
|
+
return new TypeError('Expected "string" but received "' + typeof obj_predictionDefinition_1 + '" (at "' + path_predictionDefinition_1 + '")');
|
|
2180
|
+
}
|
|
2181
|
+
})();
|
|
2182
|
+
if (obj_predictionDefinition_union0_error != null) {
|
|
2183
|
+
obj_predictionDefinition_union0 = obj_predictionDefinition_union0_error.message;
|
|
2184
|
+
}
|
|
2185
|
+
var obj_predictionDefinition_union1 = null;
|
|
2186
|
+
var obj_predictionDefinition_union1_error = (function () {
|
|
2187
|
+
if (obj_predictionDefinition_1 !== null) {
|
|
2188
|
+
return new TypeError('Expected "null" but received "' + typeof obj_predictionDefinition_1 + '" (at "' + path_predictionDefinition_1 + '")');
|
|
2189
|
+
}
|
|
2190
|
+
})();
|
|
2191
|
+
if (obj_predictionDefinition_union1_error != null) {
|
|
2192
|
+
obj_predictionDefinition_union1 = obj_predictionDefinition_union1_error.message;
|
|
2193
|
+
}
|
|
2194
|
+
if (obj_predictionDefinition_union0 && obj_predictionDefinition_union1) {
|
|
2195
|
+
var message = 'Object doesn\'t match union (at "' + path_predictionDefinition_1 + '")';
|
|
2196
|
+
message += '\n' + obj_predictionDefinition_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
2197
|
+
message += '\n' + obj_predictionDefinition_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
2198
|
+
return new TypeError(message);
|
|
2199
|
+
}
|
|
2200
|
+
}
|
|
2201
|
+
if (obj.predictionDefinitionLabel !== undefined) {
|
|
2202
|
+
var obj_predictionDefinitionLabel_1 = obj.predictionDefinitionLabel;
|
|
2203
|
+
var path_predictionDefinitionLabel_1 = path + '.predictionDefinitionLabel';
|
|
2204
|
+
var obj_predictionDefinitionLabel_union0 = null;
|
|
2205
|
+
var obj_predictionDefinitionLabel_union0_error = (function () {
|
|
2206
|
+
if (typeof obj_predictionDefinitionLabel_1 !== 'string') {
|
|
2207
|
+
return new TypeError('Expected "string" but received "' + typeof obj_predictionDefinitionLabel_1 + '" (at "' + path_predictionDefinitionLabel_1 + '")');
|
|
2208
|
+
}
|
|
2209
|
+
})();
|
|
2210
|
+
if (obj_predictionDefinitionLabel_union0_error != null) {
|
|
2211
|
+
obj_predictionDefinitionLabel_union0 = obj_predictionDefinitionLabel_union0_error.message;
|
|
2212
|
+
}
|
|
2213
|
+
var obj_predictionDefinitionLabel_union1 = null;
|
|
2214
|
+
var obj_predictionDefinitionLabel_union1_error = (function () {
|
|
2215
|
+
if (obj_predictionDefinitionLabel_1 !== null) {
|
|
2216
|
+
return new TypeError('Expected "null" but received "' + typeof obj_predictionDefinitionLabel_1 + '" (at "' + path_predictionDefinitionLabel_1 + '")');
|
|
2217
|
+
}
|
|
2218
|
+
})();
|
|
2219
|
+
if (obj_predictionDefinitionLabel_union1_error != null) {
|
|
2220
|
+
obj_predictionDefinitionLabel_union1 = obj_predictionDefinitionLabel_union1_error.message;
|
|
2221
|
+
}
|
|
2222
|
+
if (obj_predictionDefinitionLabel_union0 && obj_predictionDefinitionLabel_union1) {
|
|
2223
|
+
var message = 'Object doesn\'t match union (at "' + path_predictionDefinitionLabel_1 + '")';
|
|
2224
|
+
message += '\n' + obj_predictionDefinitionLabel_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
2225
|
+
message += '\n' + obj_predictionDefinitionLabel_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
2226
|
+
return new TypeError(message);
|
|
2227
|
+
}
|
|
2228
|
+
}
|
|
2229
|
+
if (obj.predictionPersistenceErrorMessage !== undefined) {
|
|
2230
|
+
var obj_predictionPersistenceErrorMessage_1 = obj.predictionPersistenceErrorMessage;
|
|
2231
|
+
var path_predictionPersistenceErrorMessage_1 = path + '.predictionPersistenceErrorMessage';
|
|
2232
|
+
var obj_predictionPersistenceErrorMessage_union0 = null;
|
|
2233
|
+
var obj_predictionPersistenceErrorMessage_union0_error = (function () {
|
|
2234
|
+
if (typeof obj_predictionPersistenceErrorMessage_1 !== 'string') {
|
|
2235
|
+
return new TypeError('Expected "string" but received "' + typeof obj_predictionPersistenceErrorMessage_1 + '" (at "' + path_predictionPersistenceErrorMessage_1 + '")');
|
|
2236
|
+
}
|
|
2237
|
+
})();
|
|
2238
|
+
if (obj_predictionPersistenceErrorMessage_union0_error != null) {
|
|
2239
|
+
obj_predictionPersistenceErrorMessage_union0 = obj_predictionPersistenceErrorMessage_union0_error.message;
|
|
2240
|
+
}
|
|
2241
|
+
var obj_predictionPersistenceErrorMessage_union1 = null;
|
|
2242
|
+
var obj_predictionPersistenceErrorMessage_union1_error = (function () {
|
|
2243
|
+
if (obj_predictionPersistenceErrorMessage_1 !== null) {
|
|
2244
|
+
return new TypeError('Expected "null" but received "' + typeof obj_predictionPersistenceErrorMessage_1 + '" (at "' + path_predictionPersistenceErrorMessage_1 + '")');
|
|
2245
|
+
}
|
|
2246
|
+
})();
|
|
2247
|
+
if (obj_predictionPersistenceErrorMessage_union1_error != null) {
|
|
2248
|
+
obj_predictionPersistenceErrorMessage_union1 = obj_predictionPersistenceErrorMessage_union1_error.message;
|
|
2249
|
+
}
|
|
2250
|
+
if (obj_predictionPersistenceErrorMessage_union0 && obj_predictionPersistenceErrorMessage_union1) {
|
|
2251
|
+
var message = 'Object doesn\'t match union (at "' + path_predictionPersistenceErrorMessage_1 + '")';
|
|
2252
|
+
message += '\n' + obj_predictionPersistenceErrorMessage_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
2253
|
+
message += '\n' + obj_predictionPersistenceErrorMessage_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
2254
|
+
return new TypeError(message);
|
|
2255
|
+
}
|
|
2256
|
+
}
|
|
2257
|
+
if (obj.predictionPlatform !== undefined) {
|
|
2258
|
+
var obj_predictionPlatform_1 = obj.predictionPlatform;
|
|
2259
|
+
var path_predictionPlatform_1 = path + '.predictionPlatform';
|
|
2260
|
+
var obj_predictionPlatform_union0 = null;
|
|
2261
|
+
var obj_predictionPlatform_union0_error = (function () {
|
|
2262
|
+
if (typeof obj_predictionPlatform_1 !== 'string') {
|
|
2263
|
+
return new TypeError('Expected "string" but received "' + typeof obj_predictionPlatform_1 + '" (at "' + path_predictionPlatform_1 + '")');
|
|
2264
|
+
}
|
|
2265
|
+
})();
|
|
2266
|
+
if (obj_predictionPlatform_union0_error != null) {
|
|
2267
|
+
obj_predictionPlatform_union0 = obj_predictionPlatform_union0_error.message;
|
|
2268
|
+
}
|
|
2269
|
+
var obj_predictionPlatform_union1 = null;
|
|
2270
|
+
var obj_predictionPlatform_union1_error = (function () {
|
|
2271
|
+
if (obj_predictionPlatform_1 !== null) {
|
|
2272
|
+
return new TypeError('Expected "null" but received "' + typeof obj_predictionPlatform_1 + '" (at "' + path_predictionPlatform_1 + '")');
|
|
2273
|
+
}
|
|
2274
|
+
})();
|
|
2275
|
+
if (obj_predictionPlatform_union1_error != null) {
|
|
2276
|
+
obj_predictionPlatform_union1 = obj_predictionPlatform_union1_error.message;
|
|
2277
|
+
}
|
|
2278
|
+
if (obj_predictionPlatform_union0 && obj_predictionPlatform_union1) {
|
|
2279
|
+
var message = 'Object doesn\'t match union (at "' + path_predictionPlatform_1 + '")';
|
|
2280
|
+
message += '\n' + obj_predictionPlatform_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
2281
|
+
message += '\n' + obj_predictionPlatform_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
2282
|
+
return new TypeError(message);
|
|
2283
|
+
}
|
|
2284
|
+
}
|
|
2285
|
+
if (obj.predictionPurpose !== undefined) {
|
|
2286
|
+
var obj_predictionPurpose_1 = obj.predictionPurpose;
|
|
2287
|
+
var path_predictionPurpose_1 = path + '.predictionPurpose';
|
|
2288
|
+
var obj_predictionPurpose_union0 = null;
|
|
2289
|
+
var obj_predictionPurpose_union0_error = (function () {
|
|
2290
|
+
if (typeof obj_predictionPurpose_1 !== 'string') {
|
|
2291
|
+
return new TypeError('Expected "string" but received "' + typeof obj_predictionPurpose_1 + '" (at "' + path_predictionPurpose_1 + '")');
|
|
2292
|
+
}
|
|
2293
|
+
})();
|
|
2294
|
+
if (obj_predictionPurpose_union0_error != null) {
|
|
2295
|
+
obj_predictionPurpose_union0 = obj_predictionPurpose_union0_error.message;
|
|
2296
|
+
}
|
|
2297
|
+
var obj_predictionPurpose_union1 = null;
|
|
2298
|
+
var obj_predictionPurpose_union1_error = (function () {
|
|
2299
|
+
if (obj_predictionPurpose_1 !== null) {
|
|
2300
|
+
return new TypeError('Expected "null" but received "' + typeof obj_predictionPurpose_1 + '" (at "' + path_predictionPurpose_1 + '")');
|
|
2301
|
+
}
|
|
2302
|
+
})();
|
|
2303
|
+
if (obj_predictionPurpose_union1_error != null) {
|
|
2304
|
+
obj_predictionPurpose_union1 = obj_predictionPurpose_union1_error.message;
|
|
2305
|
+
}
|
|
2306
|
+
if (obj_predictionPurpose_union0 && obj_predictionPurpose_union1) {
|
|
2307
|
+
var message = 'Object doesn\'t match union (at "' + path_predictionPurpose_1 + '")';
|
|
2308
|
+
message += '\n' + obj_predictionPurpose_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
2309
|
+
message += '\n' + obj_predictionPurpose_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
2310
|
+
return new TypeError(message);
|
|
2311
|
+
}
|
|
2312
|
+
}
|
|
2313
|
+
if (obj.predictions !== undefined) {
|
|
2314
|
+
var obj_predictions = obj.predictions;
|
|
2315
|
+
var path_predictions = path + '.predictions';
|
|
2316
|
+
if (!ArrayIsArray(obj_predictions)) {
|
|
2317
|
+
return new TypeError('Expected "array" but received "' + typeof obj_predictions + '" (at "' + path_predictions + '")');
|
|
2318
|
+
}
|
|
2319
|
+
var _loop_2 = function (i) {
|
|
2320
|
+
var obj_predictions_item = obj_predictions[i];
|
|
2321
|
+
var path_predictions_item = path_predictions + '[' + i + ']';
|
|
2322
|
+
var obj_predictions_item_union0 = null;
|
|
2323
|
+
var obj_predictions_item_union0_error = (function () {
|
|
2324
|
+
var referencepath_predictions_itemValidationError = validate$8(obj_predictions_item, path_predictions_item);
|
|
2325
|
+
if (referencepath_predictions_itemValidationError !== null) {
|
|
2326
|
+
var message = 'Object doesn\'t match PredictionObject (at "' + path_predictions_item + '")\n';
|
|
2327
|
+
message += referencepath_predictions_itemValidationError.message.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
2328
|
+
return new TypeError(message);
|
|
2329
|
+
}
|
|
2330
|
+
})();
|
|
2331
|
+
if (obj_predictions_item_union0_error != null) {
|
|
2332
|
+
obj_predictions_item_union0 = obj_predictions_item_union0_error.message;
|
|
2333
|
+
}
|
|
2334
|
+
var obj_predictions_item_union1 = null;
|
|
2335
|
+
var obj_predictions_item_union1_error = (function () {
|
|
2336
|
+
if (obj_predictions_item !== null) {
|
|
2337
|
+
return new TypeError('Expected "null" but received "' + typeof obj_predictions_item + '" (at "' + path_predictions_item + '")');
|
|
2338
|
+
}
|
|
2339
|
+
})();
|
|
2340
|
+
if (obj_predictions_item_union1_error != null) {
|
|
2341
|
+
obj_predictions_item_union1 = obj_predictions_item_union1_error.message;
|
|
2342
|
+
}
|
|
2343
|
+
if (obj_predictions_item_union0 && obj_predictions_item_union1) {
|
|
2344
|
+
var message = 'Object doesn\'t match union (at "' + path_predictions_item + '")';
|
|
2345
|
+
message += '\n' + obj_predictions_item_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
2346
|
+
message += '\n' + obj_predictions_item_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
2347
|
+
return { value: new TypeError(message) };
|
|
2348
|
+
}
|
|
2349
|
+
};
|
|
2350
|
+
for (var i = 0; i < obj_predictions.length; i++) {
|
|
2351
|
+
var state_2 = _loop_2(i);
|
|
2352
|
+
if (typeof state_2 === "object")
|
|
2353
|
+
return state_2.value;
|
|
2354
|
+
}
|
|
2355
|
+
}
|
|
2356
|
+
if (obj.primaryResponseObjRecordIds !== undefined) {
|
|
2357
|
+
var obj_primaryResponseObjRecordIds = obj.primaryResponseObjRecordIds;
|
|
2358
|
+
var path_primaryResponseObjRecordIds = path + '.primaryResponseObjRecordIds';
|
|
2359
|
+
if (!ArrayIsArray(obj_primaryResponseObjRecordIds)) {
|
|
2360
|
+
return new TypeError('Expected "array" but received "' + typeof obj_primaryResponseObjRecordIds + '" (at "' + path_primaryResponseObjRecordIds + '")');
|
|
2361
|
+
}
|
|
2362
|
+
var _loop_3 = function (i) {
|
|
2363
|
+
var obj_primaryResponseObjRecordIds_item = obj_primaryResponseObjRecordIds[i];
|
|
2364
|
+
var path_primaryResponseObjRecordIds_item = path_primaryResponseObjRecordIds + '[' + i + ']';
|
|
2365
|
+
var obj_primaryResponseObjRecordIds_item_union0 = null;
|
|
2366
|
+
var obj_primaryResponseObjRecordIds_item_union0_error = (function () {
|
|
2367
|
+
if (typeof obj_primaryResponseObjRecordIds_item !== 'string') {
|
|
2368
|
+
return new TypeError('Expected "string" but received "' + typeof obj_primaryResponseObjRecordIds_item + '" (at "' + path_primaryResponseObjRecordIds_item + '")');
|
|
2369
|
+
}
|
|
2370
|
+
})();
|
|
2371
|
+
if (obj_primaryResponseObjRecordIds_item_union0_error != null) {
|
|
2372
|
+
obj_primaryResponseObjRecordIds_item_union0 = obj_primaryResponseObjRecordIds_item_union0_error.message;
|
|
2373
|
+
}
|
|
2374
|
+
var obj_primaryResponseObjRecordIds_item_union1 = null;
|
|
2375
|
+
var obj_primaryResponseObjRecordIds_item_union1_error = (function () {
|
|
2376
|
+
if (obj_primaryResponseObjRecordIds_item !== null) {
|
|
2377
|
+
return new TypeError('Expected "null" but received "' + typeof obj_primaryResponseObjRecordIds_item + '" (at "' + path_primaryResponseObjRecordIds_item + '")');
|
|
2378
|
+
}
|
|
2379
|
+
})();
|
|
2380
|
+
if (obj_primaryResponseObjRecordIds_item_union1_error != null) {
|
|
2381
|
+
obj_primaryResponseObjRecordIds_item_union1 = obj_primaryResponseObjRecordIds_item_union1_error.message;
|
|
2382
|
+
}
|
|
2383
|
+
if (obj_primaryResponseObjRecordIds_item_union0 && obj_primaryResponseObjRecordIds_item_union1) {
|
|
2384
|
+
var message = 'Object doesn\'t match union (at "' + path_primaryResponseObjRecordIds_item + '")';
|
|
2385
|
+
message += '\n' + obj_primaryResponseObjRecordIds_item_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
2386
|
+
message += '\n' + obj_primaryResponseObjRecordIds_item_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
2387
|
+
return { value: new TypeError(message) };
|
|
2388
|
+
}
|
|
2389
|
+
};
|
|
2390
|
+
for (var i = 0; i < obj_primaryResponseObjRecordIds.length; i++) {
|
|
2391
|
+
var state_3 = _loop_3(i);
|
|
2392
|
+
if (typeof state_3 === "object")
|
|
2393
|
+
return state_3.value;
|
|
2394
|
+
}
|
|
2395
|
+
}
|
|
2396
|
+
if (obj.requestId !== undefined) {
|
|
2397
|
+
var obj_requestId_1 = obj.requestId;
|
|
2398
|
+
var path_requestId_1 = path + '.requestId';
|
|
2399
|
+
var obj_requestId_union0 = null;
|
|
2400
|
+
var obj_requestId_union0_error = (function () {
|
|
2401
|
+
if (typeof obj_requestId_1 !== 'string') {
|
|
2402
|
+
return new TypeError('Expected "string" but received "' + typeof obj_requestId_1 + '" (at "' + path_requestId_1 + '")');
|
|
2403
|
+
}
|
|
2404
|
+
})();
|
|
2405
|
+
if (obj_requestId_union0_error != null) {
|
|
2406
|
+
obj_requestId_union0 = obj_requestId_union0_error.message;
|
|
2407
|
+
}
|
|
2408
|
+
var obj_requestId_union1 = null;
|
|
2409
|
+
var obj_requestId_union1_error = (function () {
|
|
2410
|
+
if (obj_requestId_1 !== null) {
|
|
2411
|
+
return new TypeError('Expected "null" but received "' + typeof obj_requestId_1 + '" (at "' + path_requestId_1 + '")');
|
|
2412
|
+
}
|
|
2413
|
+
})();
|
|
2414
|
+
if (obj_requestId_union1_error != null) {
|
|
2415
|
+
obj_requestId_union1 = obj_requestId_union1_error.message;
|
|
2416
|
+
}
|
|
2417
|
+
if (obj_requestId_union0 && obj_requestId_union1) {
|
|
2418
|
+
var message = 'Object doesn\'t match union (at "' + path_requestId_1 + '")';
|
|
2419
|
+
message += '\n' + obj_requestId_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
2420
|
+
message += '\n' + obj_requestId_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
2421
|
+
return new TypeError(message);
|
|
2422
|
+
}
|
|
2423
|
+
}
|
|
2424
|
+
if (obj.secondaryResponseObjRecordIds !== undefined) {
|
|
2425
|
+
var obj_secondaryResponseObjRecordIds = obj.secondaryResponseObjRecordIds;
|
|
2426
|
+
var path_secondaryResponseObjRecordIds = path + '.secondaryResponseObjRecordIds';
|
|
2427
|
+
if (!ArrayIsArray(obj_secondaryResponseObjRecordIds)) {
|
|
2428
|
+
return new TypeError('Expected "array" but received "' + typeof obj_secondaryResponseObjRecordIds + '" (at "' + path_secondaryResponseObjRecordIds + '")');
|
|
2429
|
+
}
|
|
2430
|
+
var _loop_4 = function (i) {
|
|
2431
|
+
var obj_secondaryResponseObjRecordIds_item = obj_secondaryResponseObjRecordIds[i];
|
|
2432
|
+
var path_secondaryResponseObjRecordIds_item = path_secondaryResponseObjRecordIds + '[' + i + ']';
|
|
2433
|
+
var obj_secondaryResponseObjRecordIds_item_union0 = null;
|
|
2434
|
+
var obj_secondaryResponseObjRecordIds_item_union0_error = (function () {
|
|
2435
|
+
if (typeof obj_secondaryResponseObjRecordIds_item !== 'string') {
|
|
2436
|
+
return new TypeError('Expected "string" but received "' + typeof obj_secondaryResponseObjRecordIds_item + '" (at "' + path_secondaryResponseObjRecordIds_item + '")');
|
|
2437
|
+
}
|
|
2438
|
+
})();
|
|
2439
|
+
if (obj_secondaryResponseObjRecordIds_item_union0_error != null) {
|
|
2440
|
+
obj_secondaryResponseObjRecordIds_item_union0 = obj_secondaryResponseObjRecordIds_item_union0_error.message;
|
|
2441
|
+
}
|
|
2442
|
+
var obj_secondaryResponseObjRecordIds_item_union1 = null;
|
|
2443
|
+
var obj_secondaryResponseObjRecordIds_item_union1_error = (function () {
|
|
2444
|
+
if (obj_secondaryResponseObjRecordIds_item !== null) {
|
|
2445
|
+
return new TypeError('Expected "null" but received "' + typeof obj_secondaryResponseObjRecordIds_item + '" (at "' + path_secondaryResponseObjRecordIds_item + '")');
|
|
2446
|
+
}
|
|
2447
|
+
})();
|
|
2448
|
+
if (obj_secondaryResponseObjRecordIds_item_union1_error != null) {
|
|
2449
|
+
obj_secondaryResponseObjRecordIds_item_union1 = obj_secondaryResponseObjRecordIds_item_union1_error.message;
|
|
2450
|
+
}
|
|
2451
|
+
if (obj_secondaryResponseObjRecordIds_item_union0 && obj_secondaryResponseObjRecordIds_item_union1) {
|
|
2452
|
+
var message = 'Object doesn\'t match union (at "' + path_secondaryResponseObjRecordIds_item + '")';
|
|
2453
|
+
message += '\n' + obj_secondaryResponseObjRecordIds_item_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
2454
|
+
message += '\n' + obj_secondaryResponseObjRecordIds_item_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
2455
|
+
return { value: new TypeError(message) };
|
|
2456
|
+
}
|
|
2457
|
+
};
|
|
2458
|
+
for (var i = 0; i < obj_secondaryResponseObjRecordIds.length; i++) {
|
|
2459
|
+
var state_4 = _loop_4(i);
|
|
2460
|
+
if (typeof state_4 === "object")
|
|
2461
|
+
return state_4.value;
|
|
2462
|
+
}
|
|
2463
|
+
}
|
|
2464
|
+
var obj_status = obj.status;
|
|
2465
|
+
var path_status = path + '.status';
|
|
2466
|
+
var referencepath_statusValidationError = validate$7(obj_status, path_status);
|
|
2467
|
+
if (referencepath_statusValidationError !== null) {
|
|
2468
|
+
var message = 'Object doesn\'t match Status (at "' + path_status + '")\n';
|
|
2469
|
+
message += referencepath_statusValidationError.message.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
2470
|
+
return new TypeError(message);
|
|
2471
|
+
}
|
|
2472
|
+
})();
|
|
2473
|
+
return v_error === undefined ? null : v_error;
|
|
2474
|
+
}
|
|
2475
|
+
var RepresentationType$1 = 'PredictionOutputRepresentation';
|
|
2476
|
+
function keyBuilder$1(luvio, config) {
|
|
2477
|
+
return keyPrefix + '::' + RepresentationType$1 + ':' + config.status;
|
|
2478
|
+
}
|
|
2479
|
+
function keyBuilderFromType$1(luvio, object) {
|
|
2480
|
+
var keyParams = {
|
|
2481
|
+
status: object.status.message
|
|
2482
|
+
};
|
|
2483
|
+
return keyBuilder$1(luvio, keyParams);
|
|
2484
|
+
}
|
|
2485
|
+
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
2486
|
+
return input;
|
|
2487
|
+
}
|
|
2488
|
+
var select$3 = function PredictionOutputRepresentationSelect() {
|
|
2489
|
+
return {
|
|
2490
|
+
kind: 'Fragment',
|
|
2491
|
+
version: VERSION$1,
|
|
2492
|
+
private: [],
|
|
2493
|
+
opaque: true
|
|
2494
|
+
};
|
|
2495
|
+
};
|
|
2496
|
+
function equals$1(existing, incoming) {
|
|
2497
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
2498
|
+
return false;
|
|
2499
|
+
}
|
|
2500
|
+
return true;
|
|
2501
|
+
}
|
|
2502
|
+
function deepFreeze$5(input) {
|
|
2503
|
+
var input_insightsSettings = input.insightsSettings;
|
|
2504
|
+
if (input_insightsSettings !== undefined) {
|
|
2505
|
+
var input_insightsSettings_keys = Object.keys(input_insightsSettings);
|
|
2506
|
+
var input_insightsSettings_length = input_insightsSettings_keys.length;
|
|
2507
|
+
for (var i = 0; i < input_insightsSettings_length; i++) {
|
|
2508
|
+
input_insightsSettings_keys[i];
|
|
2509
|
+
}
|
|
2510
|
+
ObjectFreeze(input_insightsSettings);
|
|
2511
|
+
}
|
|
2512
|
+
var input_modelFeatures = input.modelFeatures;
|
|
2513
|
+
if (input_modelFeatures !== undefined) {
|
|
2514
|
+
for (var i = 0; i < input_modelFeatures.length; i++) {
|
|
2515
|
+
var input_modelFeatures_item = input_modelFeatures[i];
|
|
2516
|
+
if (input_modelFeatures_item !== null && typeof input_modelFeatures_item === 'object') {
|
|
2517
|
+
deepFreeze$d(input_modelFeatures_item);
|
|
2518
|
+
}
|
|
2519
|
+
}
|
|
2520
|
+
ObjectFreeze(input_modelFeatures);
|
|
2521
|
+
}
|
|
2522
|
+
var input_predictions = input.predictions;
|
|
2523
|
+
if (input_predictions !== undefined) {
|
|
2524
|
+
for (var i = 0; i < input_predictions.length; i++) {
|
|
2525
|
+
var input_predictions_item = input_predictions[i];
|
|
2526
|
+
if (input_predictions_item !== null && typeof input_predictions_item === 'object') {
|
|
2527
|
+
deepFreeze$7(input_predictions_item);
|
|
2528
|
+
}
|
|
2529
|
+
}
|
|
2530
|
+
ObjectFreeze(input_predictions);
|
|
2531
|
+
}
|
|
2532
|
+
var input_primaryResponseObjRecordIds = input.primaryResponseObjRecordIds;
|
|
2533
|
+
if (input_primaryResponseObjRecordIds !== undefined) {
|
|
2534
|
+
for (var i = 0; i < input_primaryResponseObjRecordIds.length; i++) {
|
|
2535
|
+
}
|
|
2536
|
+
ObjectFreeze(input_primaryResponseObjRecordIds);
|
|
2537
|
+
}
|
|
2538
|
+
var input_secondaryResponseObjRecordIds = input.secondaryResponseObjRecordIds;
|
|
2539
|
+
if (input_secondaryResponseObjRecordIds !== undefined) {
|
|
2540
|
+
for (var i = 0; i < input_secondaryResponseObjRecordIds.length; i++) {
|
|
2541
|
+
}
|
|
2542
|
+
ObjectFreeze(input_secondaryResponseObjRecordIds);
|
|
2543
|
+
}
|
|
2544
|
+
var input_status = input.status;
|
|
2545
|
+
deepFreeze$6(input_status);
|
|
2546
|
+
ObjectFreeze(input);
|
|
2547
|
+
}
|
|
2548
|
+
var ingest$1 = function PredictionOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2549
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2550
|
+
var validateError = validate$6(input);
|
|
2551
|
+
if (validateError !== null) {
|
|
2552
|
+
throw validateError;
|
|
2553
|
+
}
|
|
2554
|
+
}
|
|
2555
|
+
var key = keyBuilderFromType$1(luvio, input);
|
|
2556
|
+
var existingRecord = store.readEntry(key);
|
|
2557
|
+
var ttlToUse = TTL$1;
|
|
2558
|
+
var incomingRecord = normalize$1(input, store.readEntry(key), {
|
|
2559
|
+
fullPath: key,
|
|
2560
|
+
parent: path.parent,
|
|
2561
|
+
propertyName: path.propertyName,
|
|
2562
|
+
ttl: ttlToUse
|
|
2563
|
+
});
|
|
2564
|
+
deepFreeze$5(input);
|
|
2565
|
+
if (existingRecord === undefined || equals$1(existingRecord, incomingRecord) === false) {
|
|
2566
|
+
luvio.storePublish(key, incomingRecord);
|
|
2567
|
+
}
|
|
2568
|
+
{
|
|
2569
|
+
var storeMetadataParams = {
|
|
2570
|
+
ttl: ttlToUse,
|
|
2571
|
+
namespace: "Einstein-AIAccelerator",
|
|
2572
|
+
version: VERSION$1,
|
|
2573
|
+
representationName: RepresentationType$1,
|
|
2574
|
+
};
|
|
2575
|
+
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
2576
|
+
}
|
|
2577
|
+
return createLink(key);
|
|
2578
|
+
};
|
|
2579
|
+
function getTypeCacheKeys$1(luvio, input, fullPathFactory) {
|
|
2580
|
+
var rootKeySet = new engine.StoreKeyMap();
|
|
2581
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2582
|
+
var rootKey = keyBuilderFromType$1(luvio, input);
|
|
2583
|
+
rootKeySet.set(rootKey, {
|
|
2584
|
+
namespace: keyPrefix,
|
|
2585
|
+
representationName: RepresentationType$1,
|
|
2586
|
+
mergeable: false
|
|
2587
|
+
});
|
|
2588
|
+
return rootKeySet;
|
|
2589
|
+
}
|
|
2590
|
+
|
|
2591
|
+
function select$2(luvio, params) {
|
|
2592
|
+
return select$3();
|
|
2593
|
+
}
|
|
2594
|
+
function getResponseCacheKeys$1(luvio, resourceParams, response) {
|
|
2595
|
+
return getTypeCacheKeys$1(luvio, response);
|
|
2596
|
+
}
|
|
2597
|
+
function ingestSuccess$1(luvio, resourceParams, response) {
|
|
2598
|
+
var body = response.body;
|
|
2599
|
+
var key = keyBuilderFromType$1(luvio, body);
|
|
2600
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
2601
|
+
var snapshot = luvio.storeLookup({
|
|
2602
|
+
recordId: key,
|
|
2603
|
+
node: select$2(),
|
|
2604
|
+
variables: {},
|
|
2605
|
+
});
|
|
2606
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2607
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
2608
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
2609
|
+
}
|
|
2610
|
+
}
|
|
2611
|
+
return snapshot;
|
|
2612
|
+
}
|
|
2613
|
+
function createResourceRequest$1(config) {
|
|
2614
|
+
var headers = {};
|
|
2615
|
+
return {
|
|
2616
|
+
baseUri: '/services/data/v58.0',
|
|
2617
|
+
basePath: '/connect/aiaccelerator/predictions',
|
|
2618
|
+
method: 'post',
|
|
2619
|
+
body: config.body,
|
|
2620
|
+
urlParams: {},
|
|
2621
|
+
queryParams: {},
|
|
2622
|
+
headers: headers,
|
|
2623
|
+
priority: 'normal',
|
|
2624
|
+
};
|
|
2625
|
+
}
|
|
2626
|
+
|
|
2627
|
+
var predictions_ConfigPropertyNames = {
|
|
2628
|
+
displayName: 'predictions',
|
|
2629
|
+
parameters: {
|
|
2630
|
+
required: ['predictionInput'],
|
|
2631
|
+
optional: []
|
|
2632
|
+
}
|
|
2633
|
+
};
|
|
2634
|
+
function createResourceParams$1(config) {
|
|
2635
|
+
var resourceParams = {
|
|
2636
|
+
body: {
|
|
2637
|
+
predictionInput: config.predictionInput
|
|
2638
|
+
}
|
|
2639
|
+
};
|
|
2640
|
+
return resourceParams;
|
|
2641
|
+
}
|
|
2642
|
+
function typeCheckConfig$1(untrustedConfig) {
|
|
2643
|
+
var config = {};
|
|
2644
|
+
var untrustedConfig_predictionInput = untrustedConfig.predictionInput;
|
|
2645
|
+
var referencePredictionInputRepresentationValidationError = validate$f(untrustedConfig_predictionInput);
|
|
2646
|
+
if (referencePredictionInputRepresentationValidationError === null) {
|
|
2647
|
+
config.predictionInput = untrustedConfig_predictionInput;
|
|
2648
|
+
}
|
|
2649
|
+
return config;
|
|
2650
|
+
}
|
|
2651
|
+
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
2652
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
2653
|
+
return null;
|
|
2654
|
+
}
|
|
2655
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2656
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
2657
|
+
}
|
|
2658
|
+
var config = typeCheckConfig$1(untrustedConfig);
|
|
2659
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2660
|
+
return null;
|
|
2661
|
+
}
|
|
2662
|
+
return config;
|
|
2663
|
+
}
|
|
2664
|
+
function buildNetworkSnapshot$1(luvio, config, options) {
|
|
2665
|
+
var resourceParams = createResourceParams$1(config);
|
|
2666
|
+
var request = createResourceRequest$1(resourceParams);
|
|
2667
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
2668
|
+
.then(function (response) {
|
|
2669
|
+
return luvio.handleSuccessResponse(function () {
|
|
2670
|
+
var snapshot = ingestSuccess$1(luvio, resourceParams, response);
|
|
2671
|
+
return luvio.storeBroadcast().then(function () { return snapshot; });
|
|
2672
|
+
}, function () { return getResponseCacheKeys$1(luvio, resourceParams, response.body); });
|
|
2673
|
+
}, function (response) {
|
|
2674
|
+
deepFreeze$e(response);
|
|
2675
|
+
throw response;
|
|
2676
|
+
});
|
|
2677
|
+
}
|
|
2678
|
+
var predictionsAdapterFactory = function (luvio) {
|
|
2679
|
+
return function predictions(untrustedConfig) {
|
|
2680
|
+
var config = validateAdapterConfig$1(untrustedConfig, predictions_ConfigPropertyNames);
|
|
2681
|
+
// Invalid or incomplete config
|
|
2682
|
+
if (config === null) {
|
|
2683
|
+
throw new Error('Invalid config for "predictions"');
|
|
2684
|
+
}
|
|
2685
|
+
return buildNetworkSnapshot$1(luvio, config);
|
|
2686
|
+
};
|
|
2687
|
+
};
|
|
2688
|
+
|
|
2689
|
+
function validate$5(obj, path) {
|
|
2690
|
+
if (path === void 0) { path = 'RecommendationInputRepresentation'; }
|
|
2691
|
+
var v_error = (function () {
|
|
2692
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2693
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2694
|
+
}
|
|
2695
|
+
if (obj.canPersistRecommendations !== undefined) {
|
|
2696
|
+
var obj_canPersistRecommendations_1 = obj.canPersistRecommendations;
|
|
2697
|
+
var path_canPersistRecommendations_1 = path + '.canPersistRecommendations';
|
|
2698
|
+
var obj_canPersistRecommendations_union0 = null;
|
|
2699
|
+
var obj_canPersistRecommendations_union0_error = (function () {
|
|
2700
|
+
if (typeof obj_canPersistRecommendations_1 !== 'boolean') {
|
|
2701
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_canPersistRecommendations_1 + '" (at "' + path_canPersistRecommendations_1 + '")');
|
|
2702
|
+
}
|
|
2703
|
+
})();
|
|
2704
|
+
if (obj_canPersistRecommendations_union0_error != null) {
|
|
2705
|
+
obj_canPersistRecommendations_union0 = obj_canPersistRecommendations_union0_error.message;
|
|
2706
|
+
}
|
|
2707
|
+
var obj_canPersistRecommendations_union1 = null;
|
|
2708
|
+
var obj_canPersistRecommendations_union1_error = (function () {
|
|
2709
|
+
if (obj_canPersistRecommendations_1 !== null) {
|
|
2710
|
+
return new TypeError('Expected "null" but received "' + typeof obj_canPersistRecommendations_1 + '" (at "' + path_canPersistRecommendations_1 + '")');
|
|
2711
|
+
}
|
|
2712
|
+
})();
|
|
2713
|
+
if (obj_canPersistRecommendations_union1_error != null) {
|
|
2714
|
+
obj_canPersistRecommendations_union1 = obj_canPersistRecommendations_union1_error.message;
|
|
2715
|
+
}
|
|
2716
|
+
if (obj_canPersistRecommendations_union0 && obj_canPersistRecommendations_union1) {
|
|
2717
|
+
var message = 'Object doesn\'t match union (at "' + path_canPersistRecommendations_1 + '")';
|
|
2718
|
+
message += '\n' + obj_canPersistRecommendations_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
2719
|
+
message += '\n' + obj_canPersistRecommendations_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
2720
|
+
return new TypeError(message);
|
|
2721
|
+
}
|
|
2722
|
+
}
|
|
2723
|
+
if (obj.isAsync !== undefined) {
|
|
2724
|
+
var obj_isAsync_1 = obj.isAsync;
|
|
2725
|
+
var path_isAsync_1 = path + '.isAsync';
|
|
2726
|
+
var obj_isAsync_union0 = null;
|
|
2727
|
+
var obj_isAsync_union0_error = (function () {
|
|
2728
|
+
if (typeof obj_isAsync_1 !== 'boolean') {
|
|
2729
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isAsync_1 + '" (at "' + path_isAsync_1 + '")');
|
|
2730
|
+
}
|
|
2731
|
+
})();
|
|
2732
|
+
if (obj_isAsync_union0_error != null) {
|
|
2733
|
+
obj_isAsync_union0 = obj_isAsync_union0_error.message;
|
|
2734
|
+
}
|
|
2735
|
+
var obj_isAsync_union1 = null;
|
|
2736
|
+
var obj_isAsync_union1_error = (function () {
|
|
2737
|
+
if (obj_isAsync_1 !== null) {
|
|
2738
|
+
return new TypeError('Expected "null" but received "' + typeof obj_isAsync_1 + '" (at "' + path_isAsync_1 + '")');
|
|
2739
|
+
}
|
|
2740
|
+
})();
|
|
2741
|
+
if (obj_isAsync_union1_error != null) {
|
|
2742
|
+
obj_isAsync_union1 = obj_isAsync_union1_error.message;
|
|
2743
|
+
}
|
|
2744
|
+
if (obj_isAsync_union0 && obj_isAsync_union1) {
|
|
2745
|
+
var message = 'Object doesn\'t match union (at "' + path_isAsync_1 + '")';
|
|
2746
|
+
message += '\n' + obj_isAsync_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
2747
|
+
message += '\n' + obj_isAsync_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
2748
|
+
return new TypeError(message);
|
|
2749
|
+
}
|
|
2750
|
+
}
|
|
2751
|
+
if (obj.maxRecommendationsCount !== undefined) {
|
|
2752
|
+
var obj_maxRecommendationsCount_1 = obj.maxRecommendationsCount;
|
|
2753
|
+
var path_maxRecommendationsCount_1 = path + '.maxRecommendationsCount';
|
|
2754
|
+
var obj_maxRecommendationsCount_union0 = null;
|
|
2755
|
+
var obj_maxRecommendationsCount_union0_error = (function () {
|
|
2756
|
+
if (typeof obj_maxRecommendationsCount_1 !== 'number' || (typeof obj_maxRecommendationsCount_1 === 'number' && Math.floor(obj_maxRecommendationsCount_1) !== obj_maxRecommendationsCount_1)) {
|
|
2757
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_maxRecommendationsCount_1 + '" (at "' + path_maxRecommendationsCount_1 + '")');
|
|
2758
|
+
}
|
|
2759
|
+
})();
|
|
2760
|
+
if (obj_maxRecommendationsCount_union0_error != null) {
|
|
2761
|
+
obj_maxRecommendationsCount_union0 = obj_maxRecommendationsCount_union0_error.message;
|
|
2762
|
+
}
|
|
2763
|
+
var obj_maxRecommendationsCount_union1 = null;
|
|
2764
|
+
var obj_maxRecommendationsCount_union1_error = (function () {
|
|
2765
|
+
if (obj_maxRecommendationsCount_1 !== null) {
|
|
2766
|
+
return new TypeError('Expected "null" but received "' + typeof obj_maxRecommendationsCount_1 + '" (at "' + path_maxRecommendationsCount_1 + '")');
|
|
2767
|
+
}
|
|
2768
|
+
})();
|
|
2769
|
+
if (obj_maxRecommendationsCount_union1_error != null) {
|
|
2770
|
+
obj_maxRecommendationsCount_union1 = obj_maxRecommendationsCount_union1_error.message;
|
|
2771
|
+
}
|
|
2772
|
+
if (obj_maxRecommendationsCount_union0 && obj_maxRecommendationsCount_union1) {
|
|
2773
|
+
var message = 'Object doesn\'t match union (at "' + path_maxRecommendationsCount_1 + '")';
|
|
2774
|
+
message += '\n' + obj_maxRecommendationsCount_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
2775
|
+
message += '\n' + obj_maxRecommendationsCount_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
2776
|
+
return new TypeError(message);
|
|
2777
|
+
}
|
|
2778
|
+
}
|
|
2779
|
+
if (obj.rcmdRecordIdPersistenceColumn !== undefined) {
|
|
2780
|
+
var obj_rcmdRecordIdPersistenceColumn_1 = obj.rcmdRecordIdPersistenceColumn;
|
|
2781
|
+
var path_rcmdRecordIdPersistenceColumn_1 = path + '.rcmdRecordIdPersistenceColumn';
|
|
2782
|
+
var obj_rcmdRecordIdPersistenceColumn_union0 = null;
|
|
2783
|
+
var obj_rcmdRecordIdPersistenceColumn_union0_error = (function () {
|
|
2784
|
+
if (typeof obj_rcmdRecordIdPersistenceColumn_1 !== 'string') {
|
|
2785
|
+
return new TypeError('Expected "string" but received "' + typeof obj_rcmdRecordIdPersistenceColumn_1 + '" (at "' + path_rcmdRecordIdPersistenceColumn_1 + '")');
|
|
2786
|
+
}
|
|
2787
|
+
})();
|
|
2788
|
+
if (obj_rcmdRecordIdPersistenceColumn_union0_error != null) {
|
|
2789
|
+
obj_rcmdRecordIdPersistenceColumn_union0 = obj_rcmdRecordIdPersistenceColumn_union0_error.message;
|
|
2790
|
+
}
|
|
2791
|
+
var obj_rcmdRecordIdPersistenceColumn_union1 = null;
|
|
2792
|
+
var obj_rcmdRecordIdPersistenceColumn_union1_error = (function () {
|
|
2793
|
+
if (obj_rcmdRecordIdPersistenceColumn_1 !== null) {
|
|
2794
|
+
return new TypeError('Expected "null" but received "' + typeof obj_rcmdRecordIdPersistenceColumn_1 + '" (at "' + path_rcmdRecordIdPersistenceColumn_1 + '")');
|
|
2795
|
+
}
|
|
2796
|
+
})();
|
|
2797
|
+
if (obj_rcmdRecordIdPersistenceColumn_union1_error != null) {
|
|
2798
|
+
obj_rcmdRecordIdPersistenceColumn_union1 = obj_rcmdRecordIdPersistenceColumn_union1_error.message;
|
|
2799
|
+
}
|
|
2800
|
+
if (obj_rcmdRecordIdPersistenceColumn_union0 && obj_rcmdRecordIdPersistenceColumn_union1) {
|
|
2801
|
+
var message = 'Object doesn\'t match union (at "' + path_rcmdRecordIdPersistenceColumn_1 + '")';
|
|
2802
|
+
message += '\n' + obj_rcmdRecordIdPersistenceColumn_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
2803
|
+
message += '\n' + obj_rcmdRecordIdPersistenceColumn_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
2804
|
+
return new TypeError(message);
|
|
2805
|
+
}
|
|
2806
|
+
}
|
|
2807
|
+
if (obj.rcmdStrategyParameters !== undefined) {
|
|
2808
|
+
var obj_rcmdStrategyParameters = obj.rcmdStrategyParameters;
|
|
2809
|
+
var path_rcmdStrategyParameters = path + '.rcmdStrategyParameters';
|
|
2810
|
+
if (!ArrayIsArray(obj_rcmdStrategyParameters)) {
|
|
2811
|
+
return new TypeError('Expected "array" but received "' + typeof obj_rcmdStrategyParameters + '" (at "' + path_rcmdStrategyParameters + '")');
|
|
2812
|
+
}
|
|
2813
|
+
for (var i = 0; i < obj_rcmdStrategyParameters.length; i++) {
|
|
2814
|
+
var obj_rcmdStrategyParameters_item = obj_rcmdStrategyParameters[i];
|
|
2815
|
+
var path_rcmdStrategyParameters_item = path_rcmdStrategyParameters + '[' + i + ']';
|
|
2816
|
+
if (obj_rcmdStrategyParameters_item === undefined) {
|
|
2817
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_rcmdStrategyParameters_item + '" (at "' + path_rcmdStrategyParameters_item + '")');
|
|
2818
|
+
}
|
|
2819
|
+
}
|
|
2820
|
+
}
|
|
2821
|
+
var obj_recommendationFieldMapping = obj.recommendationFieldMapping;
|
|
2822
|
+
var path_recommendationFieldMapping = path + '.recommendationFieldMapping';
|
|
2823
|
+
if (typeof obj_recommendationFieldMapping !== 'object' || ArrayIsArray(obj_recommendationFieldMapping) || obj_recommendationFieldMapping === null) {
|
|
2824
|
+
return new TypeError('Expected "object" but received "' + typeof obj_recommendationFieldMapping + '" (at "' + path_recommendationFieldMapping + '")');
|
|
2825
|
+
}
|
|
2826
|
+
var obj_recommendationFieldMapping_keys = ObjectKeys(obj_recommendationFieldMapping);
|
|
2827
|
+
var _loop_1 = function (i) {
|
|
2828
|
+
var key = obj_recommendationFieldMapping_keys[i];
|
|
2829
|
+
var obj_recommendationFieldMapping_prop = obj_recommendationFieldMapping[key];
|
|
2830
|
+
var path_recommendationFieldMapping_prop = path_recommendationFieldMapping + '["' + key + '"]';
|
|
2831
|
+
var obj_recommendationFieldMapping_prop_union0 = null;
|
|
2832
|
+
var obj_recommendationFieldMapping_prop_union0_error = (function () {
|
|
2833
|
+
if (typeof obj_recommendationFieldMapping_prop !== 'string') {
|
|
2834
|
+
return new TypeError('Expected "string" but received "' + typeof obj_recommendationFieldMapping_prop + '" (at "' + path_recommendationFieldMapping_prop + '")');
|
|
2835
|
+
}
|
|
2836
|
+
})();
|
|
2837
|
+
if (obj_recommendationFieldMapping_prop_union0_error != null) {
|
|
2838
|
+
obj_recommendationFieldMapping_prop_union0 = obj_recommendationFieldMapping_prop_union0_error.message;
|
|
2839
|
+
}
|
|
2840
|
+
var obj_recommendationFieldMapping_prop_union1 = null;
|
|
2841
|
+
var obj_recommendationFieldMapping_prop_union1_error = (function () {
|
|
2842
|
+
if (obj_recommendationFieldMapping_prop !== null) {
|
|
2843
|
+
return new TypeError('Expected "null" but received "' + typeof obj_recommendationFieldMapping_prop + '" (at "' + path_recommendationFieldMapping_prop + '")');
|
|
2844
|
+
}
|
|
2845
|
+
})();
|
|
2846
|
+
if (obj_recommendationFieldMapping_prop_union1_error != null) {
|
|
2847
|
+
obj_recommendationFieldMapping_prop_union1 = obj_recommendationFieldMapping_prop_union1_error.message;
|
|
2848
|
+
}
|
|
2849
|
+
if (obj_recommendationFieldMapping_prop_union0 && obj_recommendationFieldMapping_prop_union1) {
|
|
2850
|
+
var message = 'Object doesn\'t match union (at "' + path_recommendationFieldMapping_prop + '")';
|
|
2851
|
+
message += '\n' + obj_recommendationFieldMapping_prop_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
2852
|
+
message += '\n' + obj_recommendationFieldMapping_prop_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
2853
|
+
return { value: new TypeError(message) };
|
|
2854
|
+
}
|
|
2855
|
+
};
|
|
2856
|
+
for (var i = 0; i < obj_recommendationFieldMapping_keys.length; i++) {
|
|
2857
|
+
var state_1 = _loop_1(i);
|
|
2858
|
+
if (typeof state_1 === "object")
|
|
2859
|
+
return state_1.value;
|
|
2860
|
+
}
|
|
2861
|
+
if (obj.strategyName !== undefined) {
|
|
2862
|
+
var obj_strategyName_1 = obj.strategyName;
|
|
2863
|
+
var path_strategyName_1 = path + '.strategyName';
|
|
2864
|
+
var obj_strategyName_union0 = null;
|
|
2865
|
+
var obj_strategyName_union0_error = (function () {
|
|
2866
|
+
if (typeof obj_strategyName_1 !== 'string') {
|
|
2867
|
+
return new TypeError('Expected "string" but received "' + typeof obj_strategyName_1 + '" (at "' + path_strategyName_1 + '")');
|
|
2868
|
+
}
|
|
2869
|
+
})();
|
|
2870
|
+
if (obj_strategyName_union0_error != null) {
|
|
2871
|
+
obj_strategyName_union0 = obj_strategyName_union0_error.message;
|
|
2872
|
+
}
|
|
2873
|
+
var obj_strategyName_union1 = null;
|
|
2874
|
+
var obj_strategyName_union1_error = (function () {
|
|
2875
|
+
if (obj_strategyName_1 !== null) {
|
|
2876
|
+
return new TypeError('Expected "null" but received "' + typeof obj_strategyName_1 + '" (at "' + path_strategyName_1 + '")');
|
|
2877
|
+
}
|
|
2878
|
+
})();
|
|
2879
|
+
if (obj_strategyName_union1_error != null) {
|
|
2880
|
+
obj_strategyName_union1 = obj_strategyName_union1_error.message;
|
|
2881
|
+
}
|
|
2882
|
+
if (obj_strategyName_union0 && obj_strategyName_union1) {
|
|
2883
|
+
var message = 'Object doesn\'t match union (at "' + path_strategyName_1 + '")';
|
|
2884
|
+
message += '\n' + obj_strategyName_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
2885
|
+
message += '\n' + obj_strategyName_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
2886
|
+
return new TypeError(message);
|
|
2887
|
+
}
|
|
2888
|
+
}
|
|
2889
|
+
if (obj.usecaseDefinitionName !== undefined) {
|
|
2890
|
+
var obj_usecaseDefinitionName_1 = obj.usecaseDefinitionName;
|
|
2891
|
+
var path_usecaseDefinitionName_1 = path + '.usecaseDefinitionName';
|
|
2892
|
+
var obj_usecaseDefinitionName_union0 = null;
|
|
2893
|
+
var obj_usecaseDefinitionName_union0_error = (function () {
|
|
2894
|
+
if (typeof obj_usecaseDefinitionName_1 !== 'string') {
|
|
2895
|
+
return new TypeError('Expected "string" but received "' + typeof obj_usecaseDefinitionName_1 + '" (at "' + path_usecaseDefinitionName_1 + '")');
|
|
2896
|
+
}
|
|
2897
|
+
})();
|
|
2898
|
+
if (obj_usecaseDefinitionName_union0_error != null) {
|
|
2899
|
+
obj_usecaseDefinitionName_union0 = obj_usecaseDefinitionName_union0_error.message;
|
|
2900
|
+
}
|
|
2901
|
+
var obj_usecaseDefinitionName_union1 = null;
|
|
2902
|
+
var obj_usecaseDefinitionName_union1_error = (function () {
|
|
2903
|
+
if (obj_usecaseDefinitionName_1 !== null) {
|
|
2904
|
+
return new TypeError('Expected "null" but received "' + typeof obj_usecaseDefinitionName_1 + '" (at "' + path_usecaseDefinitionName_1 + '")');
|
|
2905
|
+
}
|
|
2906
|
+
})();
|
|
2907
|
+
if (obj_usecaseDefinitionName_union1_error != null) {
|
|
2908
|
+
obj_usecaseDefinitionName_union1 = obj_usecaseDefinitionName_union1_error.message;
|
|
2909
|
+
}
|
|
2910
|
+
if (obj_usecaseDefinitionName_union0 && obj_usecaseDefinitionName_union1) {
|
|
2911
|
+
var message = 'Object doesn\'t match union (at "' + path_usecaseDefinitionName_1 + '")';
|
|
2912
|
+
message += '\n' + obj_usecaseDefinitionName_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
2913
|
+
message += '\n' + obj_usecaseDefinitionName_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
2914
|
+
return new TypeError(message);
|
|
2915
|
+
}
|
|
2916
|
+
}
|
|
2917
|
+
})();
|
|
2918
|
+
return v_error === undefined ? null : v_error;
|
|
2919
|
+
}
|
|
2920
|
+
|
|
2921
|
+
function validate$4(obj, path) {
|
|
2922
|
+
if (path === void 0) { path = 'Error'; }
|
|
2923
|
+
var v_error = (function () {
|
|
2924
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2925
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2926
|
+
}
|
|
2927
|
+
if (obj.message !== undefined) {
|
|
2928
|
+
var obj_message_1 = obj.message;
|
|
2929
|
+
var path_message_1 = path + '.message';
|
|
2930
|
+
var obj_message_union0 = null;
|
|
2931
|
+
var obj_message_union0_error = (function () {
|
|
2932
|
+
if (typeof obj_message_1 !== 'string') {
|
|
2933
|
+
return new TypeError('Expected "string" but received "' + typeof obj_message_1 + '" (at "' + path_message_1 + '")');
|
|
2934
|
+
}
|
|
2935
|
+
})();
|
|
2936
|
+
if (obj_message_union0_error != null) {
|
|
2937
|
+
obj_message_union0 = obj_message_union0_error.message;
|
|
2938
|
+
}
|
|
2939
|
+
var obj_message_union1 = null;
|
|
2940
|
+
var obj_message_union1_error = (function () {
|
|
2941
|
+
if (obj_message_1 !== null) {
|
|
2942
|
+
return new TypeError('Expected "null" but received "' + typeof obj_message_1 + '" (at "' + path_message_1 + '")');
|
|
2943
|
+
}
|
|
2944
|
+
})();
|
|
2945
|
+
if (obj_message_union1_error != null) {
|
|
2946
|
+
obj_message_union1 = obj_message_union1_error.message;
|
|
2947
|
+
}
|
|
2948
|
+
if (obj_message_union0 && obj_message_union1) {
|
|
2949
|
+
var message = 'Object doesn\'t match union (at "' + path_message_1 + '")';
|
|
2950
|
+
message += '\n' + obj_message_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
2951
|
+
message += '\n' + obj_message_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
2952
|
+
return new TypeError(message);
|
|
2953
|
+
}
|
|
2954
|
+
}
|
|
2955
|
+
if (obj.statusCode !== undefined) {
|
|
2956
|
+
var obj_statusCode_1 = obj.statusCode;
|
|
2957
|
+
var path_statusCode_1 = path + '.statusCode';
|
|
2958
|
+
var obj_statusCode_union0 = null;
|
|
2959
|
+
var obj_statusCode_union0_error = (function () {
|
|
2960
|
+
if (typeof obj_statusCode_1 !== 'string') {
|
|
2961
|
+
return new TypeError('Expected "string" but received "' + typeof obj_statusCode_1 + '" (at "' + path_statusCode_1 + '")');
|
|
2962
|
+
}
|
|
2963
|
+
})();
|
|
2964
|
+
if (obj_statusCode_union0_error != null) {
|
|
2965
|
+
obj_statusCode_union0 = obj_statusCode_union0_error.message;
|
|
2966
|
+
}
|
|
2967
|
+
var obj_statusCode_union1 = null;
|
|
2968
|
+
var obj_statusCode_union1_error = (function () {
|
|
2969
|
+
if (obj_statusCode_1 !== null) {
|
|
2970
|
+
return new TypeError('Expected "null" but received "' + typeof obj_statusCode_1 + '" (at "' + path_statusCode_1 + '")');
|
|
2971
|
+
}
|
|
2972
|
+
})();
|
|
2973
|
+
if (obj_statusCode_union1_error != null) {
|
|
2974
|
+
obj_statusCode_union1 = obj_statusCode_union1_error.message;
|
|
2975
|
+
}
|
|
2976
|
+
if (obj_statusCode_union0 && obj_statusCode_union1) {
|
|
2977
|
+
var message = 'Object doesn\'t match union (at "' + path_statusCode_1 + '")';
|
|
2978
|
+
message += '\n' + obj_statusCode_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
2979
|
+
message += '\n' + obj_statusCode_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
2980
|
+
return new TypeError(message);
|
|
2981
|
+
}
|
|
2982
|
+
}
|
|
2983
|
+
})();
|
|
2984
|
+
return v_error === undefined ? null : v_error;
|
|
2985
|
+
}
|
|
2986
|
+
function deepFreeze$4(input) {
|
|
2987
|
+
ObjectFreeze(input);
|
|
2988
|
+
}
|
|
2989
|
+
|
|
2990
|
+
function validate$3(obj, path) {
|
|
2991
|
+
if (path === void 0) { path = 'RecommendationActionParam'; }
|
|
2992
|
+
var v_error = (function () {
|
|
2993
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2994
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2995
|
+
}
|
|
2996
|
+
if (obj.name !== undefined) {
|
|
2997
|
+
var obj_name_1 = obj.name;
|
|
2998
|
+
var path_name_1 = path + '.name';
|
|
2999
|
+
var obj_name_union0 = null;
|
|
3000
|
+
var obj_name_union0_error = (function () {
|
|
3001
|
+
if (typeof obj_name_1 !== 'string') {
|
|
3002
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name_1 + '" (at "' + path_name_1 + '")');
|
|
3003
|
+
}
|
|
3004
|
+
})();
|
|
3005
|
+
if (obj_name_union0_error != null) {
|
|
3006
|
+
obj_name_union0 = obj_name_union0_error.message;
|
|
3007
|
+
}
|
|
3008
|
+
var obj_name_union1 = null;
|
|
3009
|
+
var obj_name_union1_error = (function () {
|
|
3010
|
+
if (obj_name_1 !== null) {
|
|
3011
|
+
return new TypeError('Expected "null" but received "' + typeof obj_name_1 + '" (at "' + path_name_1 + '")');
|
|
3012
|
+
}
|
|
3013
|
+
})();
|
|
3014
|
+
if (obj_name_union1_error != null) {
|
|
3015
|
+
obj_name_union1 = obj_name_union1_error.message;
|
|
3016
|
+
}
|
|
3017
|
+
if (obj_name_union0 && obj_name_union1) {
|
|
3018
|
+
var message = 'Object doesn\'t match union (at "' + path_name_1 + '")';
|
|
3019
|
+
message += '\n' + obj_name_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3020
|
+
message += '\n' + obj_name_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3021
|
+
return new TypeError(message);
|
|
3022
|
+
}
|
|
3023
|
+
}
|
|
3024
|
+
if (obj.type !== undefined) {
|
|
3025
|
+
var obj_type_1 = obj.type;
|
|
3026
|
+
var path_type_1 = path + '.type';
|
|
3027
|
+
var obj_type_union0 = null;
|
|
3028
|
+
var obj_type_union0_error = (function () {
|
|
3029
|
+
if (typeof obj_type_1 !== 'string') {
|
|
3030
|
+
return new TypeError('Expected "string" but received "' + typeof obj_type_1 + '" (at "' + path_type_1 + '")');
|
|
3031
|
+
}
|
|
3032
|
+
})();
|
|
3033
|
+
if (obj_type_union0_error != null) {
|
|
3034
|
+
obj_type_union0 = obj_type_union0_error.message;
|
|
3035
|
+
}
|
|
3036
|
+
var obj_type_union1 = null;
|
|
3037
|
+
var obj_type_union1_error = (function () {
|
|
3038
|
+
if (obj_type_1 !== null) {
|
|
3039
|
+
return new TypeError('Expected "null" but received "' + typeof obj_type_1 + '" (at "' + path_type_1 + '")');
|
|
3040
|
+
}
|
|
3041
|
+
})();
|
|
3042
|
+
if (obj_type_union1_error != null) {
|
|
3043
|
+
obj_type_union1 = obj_type_union1_error.message;
|
|
3044
|
+
}
|
|
3045
|
+
if (obj_type_union0 && obj_type_union1) {
|
|
3046
|
+
var message = 'Object doesn\'t match union (at "' + path_type_1 + '")';
|
|
3047
|
+
message += '\n' + obj_type_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3048
|
+
message += '\n' + obj_type_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3049
|
+
return new TypeError(message);
|
|
3050
|
+
}
|
|
3051
|
+
}
|
|
3052
|
+
if (obj.value !== undefined) {
|
|
3053
|
+
var obj_value = obj.value;
|
|
3054
|
+
var path_value = path + '.value';
|
|
3055
|
+
if (obj_value === undefined) {
|
|
3056
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_value + '" (at "' + path_value + '")');
|
|
3057
|
+
}
|
|
3058
|
+
}
|
|
3059
|
+
})();
|
|
3060
|
+
return v_error === undefined ? null : v_error;
|
|
3061
|
+
}
|
|
3062
|
+
function deepFreeze$3(input) {
|
|
3063
|
+
var input_value = input.value;
|
|
3064
|
+
if (input_value !== undefined) {
|
|
3065
|
+
deepFreeze$e(input_value);
|
|
3066
|
+
}
|
|
3067
|
+
ObjectFreeze(input);
|
|
3068
|
+
}
|
|
3069
|
+
|
|
3070
|
+
function validate$2(obj, path) {
|
|
3071
|
+
if (path === void 0) { path = 'Recommendation'; }
|
|
3072
|
+
var v_error = (function () {
|
|
3073
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3074
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
3075
|
+
}
|
|
3076
|
+
if (obj.acceptanceLabel !== undefined) {
|
|
3077
|
+
var obj_acceptanceLabel_1 = obj.acceptanceLabel;
|
|
3078
|
+
var path_acceptanceLabel_1 = path + '.acceptanceLabel';
|
|
3079
|
+
var obj_acceptanceLabel_union0 = null;
|
|
3080
|
+
var obj_acceptanceLabel_union0_error = (function () {
|
|
3081
|
+
if (typeof obj_acceptanceLabel_1 !== 'string') {
|
|
3082
|
+
return new TypeError('Expected "string" but received "' + typeof obj_acceptanceLabel_1 + '" (at "' + path_acceptanceLabel_1 + '")');
|
|
3083
|
+
}
|
|
3084
|
+
})();
|
|
3085
|
+
if (obj_acceptanceLabel_union0_error != null) {
|
|
3086
|
+
obj_acceptanceLabel_union0 = obj_acceptanceLabel_union0_error.message;
|
|
3087
|
+
}
|
|
3088
|
+
var obj_acceptanceLabel_union1 = null;
|
|
3089
|
+
var obj_acceptanceLabel_union1_error = (function () {
|
|
3090
|
+
if (obj_acceptanceLabel_1 !== null) {
|
|
3091
|
+
return new TypeError('Expected "null" but received "' + typeof obj_acceptanceLabel_1 + '" (at "' + path_acceptanceLabel_1 + '")');
|
|
3092
|
+
}
|
|
3093
|
+
})();
|
|
3094
|
+
if (obj_acceptanceLabel_union1_error != null) {
|
|
3095
|
+
obj_acceptanceLabel_union1 = obj_acceptanceLabel_union1_error.message;
|
|
3096
|
+
}
|
|
3097
|
+
if (obj_acceptanceLabel_union0 && obj_acceptanceLabel_union1) {
|
|
3098
|
+
var message = 'Object doesn\'t match union (at "' + path_acceptanceLabel_1 + '")';
|
|
3099
|
+
message += '\n' + obj_acceptanceLabel_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3100
|
+
message += '\n' + obj_acceptanceLabel_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3101
|
+
return new TypeError(message);
|
|
3102
|
+
}
|
|
3103
|
+
}
|
|
3104
|
+
if (obj.actionReferenceId !== undefined) {
|
|
3105
|
+
var obj_actionReferenceId_1 = obj.actionReferenceId;
|
|
3106
|
+
var path_actionReferenceId_1 = path + '.actionReferenceId';
|
|
3107
|
+
var obj_actionReferenceId_union0 = null;
|
|
3108
|
+
var obj_actionReferenceId_union0_error = (function () {
|
|
3109
|
+
if (typeof obj_actionReferenceId_1 !== 'string') {
|
|
3110
|
+
return new TypeError('Expected "string" but received "' + typeof obj_actionReferenceId_1 + '" (at "' + path_actionReferenceId_1 + '")');
|
|
3111
|
+
}
|
|
3112
|
+
})();
|
|
3113
|
+
if (obj_actionReferenceId_union0_error != null) {
|
|
3114
|
+
obj_actionReferenceId_union0 = obj_actionReferenceId_union0_error.message;
|
|
3115
|
+
}
|
|
3116
|
+
var obj_actionReferenceId_union1 = null;
|
|
3117
|
+
var obj_actionReferenceId_union1_error = (function () {
|
|
3118
|
+
if (obj_actionReferenceId_1 !== null) {
|
|
3119
|
+
return new TypeError('Expected "null" but received "' + typeof obj_actionReferenceId_1 + '" (at "' + path_actionReferenceId_1 + '")');
|
|
3120
|
+
}
|
|
3121
|
+
})();
|
|
3122
|
+
if (obj_actionReferenceId_union1_error != null) {
|
|
3123
|
+
obj_actionReferenceId_union1 = obj_actionReferenceId_union1_error.message;
|
|
3124
|
+
}
|
|
3125
|
+
if (obj_actionReferenceId_union0 && obj_actionReferenceId_union1) {
|
|
3126
|
+
var message = 'Object doesn\'t match union (at "' + path_actionReferenceId_1 + '")';
|
|
3127
|
+
message += '\n' + obj_actionReferenceId_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3128
|
+
message += '\n' + obj_actionReferenceId_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3129
|
+
return new TypeError(message);
|
|
3130
|
+
}
|
|
3131
|
+
}
|
|
3132
|
+
if (obj.actionReferenceLabel !== undefined) {
|
|
3133
|
+
var obj_actionReferenceLabel_1 = obj.actionReferenceLabel;
|
|
3134
|
+
var path_actionReferenceLabel_1 = path + '.actionReferenceLabel';
|
|
3135
|
+
var obj_actionReferenceLabel_union0 = null;
|
|
3136
|
+
var obj_actionReferenceLabel_union0_error = (function () {
|
|
3137
|
+
if (typeof obj_actionReferenceLabel_1 !== 'string') {
|
|
3138
|
+
return new TypeError('Expected "string" but received "' + typeof obj_actionReferenceLabel_1 + '" (at "' + path_actionReferenceLabel_1 + '")');
|
|
3139
|
+
}
|
|
3140
|
+
})();
|
|
3141
|
+
if (obj_actionReferenceLabel_union0_error != null) {
|
|
3142
|
+
obj_actionReferenceLabel_union0 = obj_actionReferenceLabel_union0_error.message;
|
|
3143
|
+
}
|
|
3144
|
+
var obj_actionReferenceLabel_union1 = null;
|
|
3145
|
+
var obj_actionReferenceLabel_union1_error = (function () {
|
|
3146
|
+
if (obj_actionReferenceLabel_1 !== null) {
|
|
3147
|
+
return new TypeError('Expected "null" but received "' + typeof obj_actionReferenceLabel_1 + '" (at "' + path_actionReferenceLabel_1 + '")');
|
|
3148
|
+
}
|
|
3149
|
+
})();
|
|
3150
|
+
if (obj_actionReferenceLabel_union1_error != null) {
|
|
3151
|
+
obj_actionReferenceLabel_union1 = obj_actionReferenceLabel_union1_error.message;
|
|
3152
|
+
}
|
|
3153
|
+
if (obj_actionReferenceLabel_union0 && obj_actionReferenceLabel_union1) {
|
|
3154
|
+
var message = 'Object doesn\'t match union (at "' + path_actionReferenceLabel_1 + '")';
|
|
3155
|
+
message += '\n' + obj_actionReferenceLabel_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3156
|
+
message += '\n' + obj_actionReferenceLabel_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3157
|
+
return new TypeError(message);
|
|
3158
|
+
}
|
|
3159
|
+
}
|
|
3160
|
+
if (obj.actionReferenceName !== undefined) {
|
|
3161
|
+
var obj_actionReferenceName_1 = obj.actionReferenceName;
|
|
3162
|
+
var path_actionReferenceName_1 = path + '.actionReferenceName';
|
|
3163
|
+
var obj_actionReferenceName_union0 = null;
|
|
3164
|
+
var obj_actionReferenceName_union0_error = (function () {
|
|
3165
|
+
if (typeof obj_actionReferenceName_1 !== 'string') {
|
|
3166
|
+
return new TypeError('Expected "string" but received "' + typeof obj_actionReferenceName_1 + '" (at "' + path_actionReferenceName_1 + '")');
|
|
3167
|
+
}
|
|
3168
|
+
})();
|
|
3169
|
+
if (obj_actionReferenceName_union0_error != null) {
|
|
3170
|
+
obj_actionReferenceName_union0 = obj_actionReferenceName_union0_error.message;
|
|
3171
|
+
}
|
|
3172
|
+
var obj_actionReferenceName_union1 = null;
|
|
3173
|
+
var obj_actionReferenceName_union1_error = (function () {
|
|
3174
|
+
if (obj_actionReferenceName_1 !== null) {
|
|
3175
|
+
return new TypeError('Expected "null" but received "' + typeof obj_actionReferenceName_1 + '" (at "' + path_actionReferenceName_1 + '")');
|
|
3176
|
+
}
|
|
3177
|
+
})();
|
|
3178
|
+
if (obj_actionReferenceName_union1_error != null) {
|
|
3179
|
+
obj_actionReferenceName_union1 = obj_actionReferenceName_union1_error.message;
|
|
3180
|
+
}
|
|
3181
|
+
if (obj_actionReferenceName_union0 && obj_actionReferenceName_union1) {
|
|
3182
|
+
var message = 'Object doesn\'t match union (at "' + path_actionReferenceName_1 + '")';
|
|
3183
|
+
message += '\n' + obj_actionReferenceName_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3184
|
+
message += '\n' + obj_actionReferenceName_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3185
|
+
return new TypeError(message);
|
|
3186
|
+
}
|
|
3187
|
+
}
|
|
3188
|
+
if (obj.actionStrategyParameters !== undefined) {
|
|
3189
|
+
var obj_actionStrategyParameters = obj.actionStrategyParameters;
|
|
3190
|
+
var path_actionStrategyParameters = path + '.actionStrategyParameters';
|
|
3191
|
+
if (!ArrayIsArray(obj_actionStrategyParameters)) {
|
|
3192
|
+
return new TypeError('Expected "array" but received "' + typeof obj_actionStrategyParameters + '" (at "' + path_actionStrategyParameters + '")');
|
|
3193
|
+
}
|
|
3194
|
+
var _loop_1 = function (i) {
|
|
3195
|
+
var obj_actionStrategyParameters_item = obj_actionStrategyParameters[i];
|
|
3196
|
+
var path_actionStrategyParameters_item = path_actionStrategyParameters + '[' + i + ']';
|
|
3197
|
+
var obj_actionStrategyParameters_item_union0 = null;
|
|
3198
|
+
var obj_actionStrategyParameters_item_union0_error = (function () {
|
|
3199
|
+
var referencepath_actionStrategyParameters_itemValidationError = validate$3(obj_actionStrategyParameters_item, path_actionStrategyParameters_item);
|
|
3200
|
+
if (referencepath_actionStrategyParameters_itemValidationError !== null) {
|
|
3201
|
+
var message = 'Object doesn\'t match RecommendationActionParam (at "' + path_actionStrategyParameters_item + '")\n';
|
|
3202
|
+
message += referencepath_actionStrategyParameters_itemValidationError.message.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3203
|
+
return new TypeError(message);
|
|
3204
|
+
}
|
|
3205
|
+
})();
|
|
3206
|
+
if (obj_actionStrategyParameters_item_union0_error != null) {
|
|
3207
|
+
obj_actionStrategyParameters_item_union0 = obj_actionStrategyParameters_item_union0_error.message;
|
|
3208
|
+
}
|
|
3209
|
+
var obj_actionStrategyParameters_item_union1 = null;
|
|
3210
|
+
var obj_actionStrategyParameters_item_union1_error = (function () {
|
|
3211
|
+
if (obj_actionStrategyParameters_item !== null) {
|
|
3212
|
+
return new TypeError('Expected "null" but received "' + typeof obj_actionStrategyParameters_item + '" (at "' + path_actionStrategyParameters_item + '")');
|
|
3213
|
+
}
|
|
3214
|
+
})();
|
|
3215
|
+
if (obj_actionStrategyParameters_item_union1_error != null) {
|
|
3216
|
+
obj_actionStrategyParameters_item_union1 = obj_actionStrategyParameters_item_union1_error.message;
|
|
3217
|
+
}
|
|
3218
|
+
if (obj_actionStrategyParameters_item_union0 && obj_actionStrategyParameters_item_union1) {
|
|
3219
|
+
var message = 'Object doesn\'t match union (at "' + path_actionStrategyParameters_item + '")';
|
|
3220
|
+
message += '\n' + obj_actionStrategyParameters_item_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3221
|
+
message += '\n' + obj_actionStrategyParameters_item_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3222
|
+
return { value: new TypeError(message) };
|
|
3223
|
+
}
|
|
3224
|
+
};
|
|
3225
|
+
for (var i = 0; i < obj_actionStrategyParameters.length; i++) {
|
|
3226
|
+
var state_1 = _loop_1(i);
|
|
3227
|
+
if (typeof state_1 === "object")
|
|
3228
|
+
return state_1.value;
|
|
3229
|
+
}
|
|
3230
|
+
}
|
|
3231
|
+
if (obj.actionType !== undefined) {
|
|
3232
|
+
var obj_actionType_1 = obj.actionType;
|
|
3233
|
+
var path_actionType_1 = path + '.actionType';
|
|
3234
|
+
var obj_actionType_union0 = null;
|
|
3235
|
+
var obj_actionType_union0_error = (function () {
|
|
3236
|
+
if (typeof obj_actionType_1 !== 'string') {
|
|
3237
|
+
return new TypeError('Expected "string" but received "' + typeof obj_actionType_1 + '" (at "' + path_actionType_1 + '")');
|
|
3238
|
+
}
|
|
3239
|
+
})();
|
|
3240
|
+
if (obj_actionType_union0_error != null) {
|
|
3241
|
+
obj_actionType_union0 = obj_actionType_union0_error.message;
|
|
3242
|
+
}
|
|
3243
|
+
var obj_actionType_union1 = null;
|
|
3244
|
+
var obj_actionType_union1_error = (function () {
|
|
3245
|
+
if (obj_actionType_1 !== null) {
|
|
3246
|
+
return new TypeError('Expected "null" but received "' + typeof obj_actionType_1 + '" (at "' + path_actionType_1 + '")');
|
|
3247
|
+
}
|
|
3248
|
+
})();
|
|
3249
|
+
if (obj_actionType_union1_error != null) {
|
|
3250
|
+
obj_actionType_union1 = obj_actionType_union1_error.message;
|
|
3251
|
+
}
|
|
3252
|
+
if (obj_actionType_union0 && obj_actionType_union1) {
|
|
3253
|
+
var message = 'Object doesn\'t match union (at "' + path_actionType_1 + '")';
|
|
3254
|
+
message += '\n' + obj_actionType_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3255
|
+
message += '\n' + obj_actionType_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3256
|
+
return new TypeError(message);
|
|
3257
|
+
}
|
|
3258
|
+
}
|
|
3259
|
+
if (obj.description !== undefined) {
|
|
3260
|
+
var obj_description_1 = obj.description;
|
|
3261
|
+
var path_description_1 = path + '.description';
|
|
3262
|
+
var obj_description_union0 = null;
|
|
3263
|
+
var obj_description_union0_error = (function () {
|
|
3264
|
+
if (typeof obj_description_1 !== 'string') {
|
|
3265
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description_1 + '" (at "' + path_description_1 + '")');
|
|
3266
|
+
}
|
|
3267
|
+
})();
|
|
3268
|
+
if (obj_description_union0_error != null) {
|
|
3269
|
+
obj_description_union0 = obj_description_union0_error.message;
|
|
3270
|
+
}
|
|
3271
|
+
var obj_description_union1 = null;
|
|
3272
|
+
var obj_description_union1_error = (function () {
|
|
3273
|
+
if (obj_description_1 !== null) {
|
|
3274
|
+
return new TypeError('Expected "null" but received "' + typeof obj_description_1 + '" (at "' + path_description_1 + '")');
|
|
3275
|
+
}
|
|
3276
|
+
})();
|
|
3277
|
+
if (obj_description_union1_error != null) {
|
|
3278
|
+
obj_description_union1 = obj_description_union1_error.message;
|
|
3279
|
+
}
|
|
3280
|
+
if (obj_description_union0 && obj_description_union1) {
|
|
3281
|
+
var message = 'Object doesn\'t match union (at "' + path_description_1 + '")';
|
|
3282
|
+
message += '\n' + obj_description_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3283
|
+
message += '\n' + obj_description_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3284
|
+
return new TypeError(message);
|
|
3285
|
+
}
|
|
3286
|
+
}
|
|
3287
|
+
if (obj.id !== undefined) {
|
|
3288
|
+
var obj_id_1 = obj.id;
|
|
3289
|
+
var path_id_1 = path + '.id';
|
|
3290
|
+
var obj_id_union0 = null;
|
|
3291
|
+
var obj_id_union0_error = (function () {
|
|
3292
|
+
if (typeof obj_id_1 !== 'string') {
|
|
3293
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id_1 + '" (at "' + path_id_1 + '")');
|
|
3294
|
+
}
|
|
3295
|
+
})();
|
|
3296
|
+
if (obj_id_union0_error != null) {
|
|
3297
|
+
obj_id_union0 = obj_id_union0_error.message;
|
|
3298
|
+
}
|
|
3299
|
+
var obj_id_union1 = null;
|
|
3300
|
+
var obj_id_union1_error = (function () {
|
|
3301
|
+
if (obj_id_1 !== null) {
|
|
3302
|
+
return new TypeError('Expected "null" but received "' + typeof obj_id_1 + '" (at "' + path_id_1 + '")');
|
|
3303
|
+
}
|
|
3304
|
+
})();
|
|
3305
|
+
if (obj_id_union1_error != null) {
|
|
3306
|
+
obj_id_union1 = obj_id_union1_error.message;
|
|
3307
|
+
}
|
|
3308
|
+
if (obj_id_union0 && obj_id_union1) {
|
|
3309
|
+
var message = 'Object doesn\'t match union (at "' + path_id_1 + '")';
|
|
3310
|
+
message += '\n' + obj_id_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3311
|
+
message += '\n' + obj_id_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3312
|
+
return new TypeError(message);
|
|
3313
|
+
}
|
|
3314
|
+
}
|
|
3315
|
+
if (obj.imageUrl !== undefined) {
|
|
3316
|
+
var obj_imageUrl_1 = obj.imageUrl;
|
|
3317
|
+
var path_imageUrl_1 = path + '.imageUrl';
|
|
3318
|
+
var obj_imageUrl_union0 = null;
|
|
3319
|
+
var obj_imageUrl_union0_error = (function () {
|
|
3320
|
+
if (typeof obj_imageUrl_1 !== 'string') {
|
|
3321
|
+
return new TypeError('Expected "string" but received "' + typeof obj_imageUrl_1 + '" (at "' + path_imageUrl_1 + '")');
|
|
3322
|
+
}
|
|
3323
|
+
})();
|
|
3324
|
+
if (obj_imageUrl_union0_error != null) {
|
|
3325
|
+
obj_imageUrl_union0 = obj_imageUrl_union0_error.message;
|
|
3326
|
+
}
|
|
3327
|
+
var obj_imageUrl_union1 = null;
|
|
3328
|
+
var obj_imageUrl_union1_error = (function () {
|
|
3329
|
+
if (obj_imageUrl_1 !== null) {
|
|
3330
|
+
return new TypeError('Expected "null" but received "' + typeof obj_imageUrl_1 + '" (at "' + path_imageUrl_1 + '")');
|
|
3331
|
+
}
|
|
3332
|
+
})();
|
|
3333
|
+
if (obj_imageUrl_union1_error != null) {
|
|
3334
|
+
obj_imageUrl_union1 = obj_imageUrl_union1_error.message;
|
|
3335
|
+
}
|
|
3336
|
+
if (obj_imageUrl_union0 && obj_imageUrl_union1) {
|
|
3337
|
+
var message = 'Object doesn\'t match union (at "' + path_imageUrl_1 + '")';
|
|
3338
|
+
message += '\n' + obj_imageUrl_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3339
|
+
message += '\n' + obj_imageUrl_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3340
|
+
return new TypeError(message);
|
|
3341
|
+
}
|
|
3342
|
+
}
|
|
3343
|
+
if (obj.name !== undefined) {
|
|
3344
|
+
var obj_name_1 = obj.name;
|
|
3345
|
+
var path_name_1 = path + '.name';
|
|
3346
|
+
var obj_name_union0 = null;
|
|
3347
|
+
var obj_name_union0_error = (function () {
|
|
3348
|
+
if (typeof obj_name_1 !== 'string') {
|
|
3349
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name_1 + '" (at "' + path_name_1 + '")');
|
|
3350
|
+
}
|
|
3351
|
+
})();
|
|
3352
|
+
if (obj_name_union0_error != null) {
|
|
3353
|
+
obj_name_union0 = obj_name_union0_error.message;
|
|
3354
|
+
}
|
|
3355
|
+
var obj_name_union1 = null;
|
|
3356
|
+
var obj_name_union1_error = (function () {
|
|
3357
|
+
if (obj_name_1 !== null) {
|
|
3358
|
+
return new TypeError('Expected "null" but received "' + typeof obj_name_1 + '" (at "' + path_name_1 + '")');
|
|
3359
|
+
}
|
|
3360
|
+
})();
|
|
3361
|
+
if (obj_name_union1_error != null) {
|
|
3362
|
+
obj_name_union1 = obj_name_union1_error.message;
|
|
3363
|
+
}
|
|
3364
|
+
if (obj_name_union0 && obj_name_union1) {
|
|
3365
|
+
var message = 'Object doesn\'t match union (at "' + path_name_1 + '")';
|
|
3366
|
+
message += '\n' + obj_name_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3367
|
+
message += '\n' + obj_name_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3368
|
+
return new TypeError(message);
|
|
3369
|
+
}
|
|
3370
|
+
}
|
|
3371
|
+
if (obj.rejectionLabel !== undefined) {
|
|
3372
|
+
var obj_rejectionLabel_1 = obj.rejectionLabel;
|
|
3373
|
+
var path_rejectionLabel_1 = path + '.rejectionLabel';
|
|
3374
|
+
var obj_rejectionLabel_union0 = null;
|
|
3375
|
+
var obj_rejectionLabel_union0_error = (function () {
|
|
3376
|
+
if (typeof obj_rejectionLabel_1 !== 'string') {
|
|
3377
|
+
return new TypeError('Expected "string" but received "' + typeof obj_rejectionLabel_1 + '" (at "' + path_rejectionLabel_1 + '")');
|
|
3378
|
+
}
|
|
3379
|
+
})();
|
|
3380
|
+
if (obj_rejectionLabel_union0_error != null) {
|
|
3381
|
+
obj_rejectionLabel_union0 = obj_rejectionLabel_union0_error.message;
|
|
3382
|
+
}
|
|
3383
|
+
var obj_rejectionLabel_union1 = null;
|
|
3384
|
+
var obj_rejectionLabel_union1_error = (function () {
|
|
3385
|
+
if (obj_rejectionLabel_1 !== null) {
|
|
3386
|
+
return new TypeError('Expected "null" but received "' + typeof obj_rejectionLabel_1 + '" (at "' + path_rejectionLabel_1 + '")');
|
|
3387
|
+
}
|
|
3388
|
+
})();
|
|
3389
|
+
if (obj_rejectionLabel_union1_error != null) {
|
|
3390
|
+
obj_rejectionLabel_union1 = obj_rejectionLabel_union1_error.message;
|
|
3391
|
+
}
|
|
3392
|
+
if (obj_rejectionLabel_union0 && obj_rejectionLabel_union1) {
|
|
3393
|
+
var message = 'Object doesn\'t match union (at "' + path_rejectionLabel_1 + '")';
|
|
3394
|
+
message += '\n' + obj_rejectionLabel_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3395
|
+
message += '\n' + obj_rejectionLabel_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3396
|
+
return new TypeError(message);
|
|
3397
|
+
}
|
|
3398
|
+
}
|
|
3399
|
+
})();
|
|
3400
|
+
return v_error === undefined ? null : v_error;
|
|
3401
|
+
}
|
|
3402
|
+
function deepFreeze$2(input) {
|
|
3403
|
+
var input_actionStrategyParameters = input.actionStrategyParameters;
|
|
3404
|
+
if (input_actionStrategyParameters !== undefined) {
|
|
3405
|
+
for (var i = 0; i < input_actionStrategyParameters.length; i++) {
|
|
3406
|
+
var input_actionStrategyParameters_item = input_actionStrategyParameters[i];
|
|
3407
|
+
if (input_actionStrategyParameters_item !== null && typeof input_actionStrategyParameters_item === 'object') {
|
|
3408
|
+
deepFreeze$3(input_actionStrategyParameters_item);
|
|
3409
|
+
}
|
|
3410
|
+
}
|
|
3411
|
+
ObjectFreeze(input_actionStrategyParameters);
|
|
3412
|
+
}
|
|
3413
|
+
ObjectFreeze(input);
|
|
3414
|
+
}
|
|
3415
|
+
|
|
3416
|
+
function validate$1(obj, path) {
|
|
3417
|
+
if (path === void 0) { path = 'RcmdStrategyResult'; }
|
|
3418
|
+
var v_error = (function () {
|
|
3419
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3420
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
3421
|
+
}
|
|
3422
|
+
if (obj.errors !== undefined) {
|
|
3423
|
+
var obj_errors = obj.errors;
|
|
3424
|
+
var path_errors = path + '.errors';
|
|
3425
|
+
if (!ArrayIsArray(obj_errors)) {
|
|
3426
|
+
return new TypeError('Expected "array" but received "' + typeof obj_errors + '" (at "' + path_errors + '")');
|
|
3427
|
+
}
|
|
3428
|
+
var _loop_1 = function (i) {
|
|
3429
|
+
var obj_errors_item = obj_errors[i];
|
|
3430
|
+
var path_errors_item = path_errors + '[' + i + ']';
|
|
3431
|
+
var obj_errors_item_union0 = null;
|
|
3432
|
+
var obj_errors_item_union0_error = (function () {
|
|
3433
|
+
var referencepath_errors_itemValidationError = validate$4(obj_errors_item, path_errors_item);
|
|
3434
|
+
if (referencepath_errors_itemValidationError !== null) {
|
|
3435
|
+
var message = 'Object doesn\'t match Error (at "' + path_errors_item + '")\n';
|
|
3436
|
+
message += referencepath_errors_itemValidationError.message.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3437
|
+
return new TypeError(message);
|
|
3438
|
+
}
|
|
3439
|
+
})();
|
|
3440
|
+
if (obj_errors_item_union0_error != null) {
|
|
3441
|
+
obj_errors_item_union0 = obj_errors_item_union0_error.message;
|
|
3442
|
+
}
|
|
3443
|
+
var obj_errors_item_union1 = null;
|
|
3444
|
+
var obj_errors_item_union1_error = (function () {
|
|
3445
|
+
if (obj_errors_item !== null) {
|
|
3446
|
+
return new TypeError('Expected "null" but received "' + typeof obj_errors_item + '" (at "' + path_errors_item + '")');
|
|
3447
|
+
}
|
|
3448
|
+
})();
|
|
3449
|
+
if (obj_errors_item_union1_error != null) {
|
|
3450
|
+
obj_errors_item_union1 = obj_errors_item_union1_error.message;
|
|
3451
|
+
}
|
|
3452
|
+
if (obj_errors_item_union0 && obj_errors_item_union1) {
|
|
3453
|
+
var message = 'Object doesn\'t match union (at "' + path_errors_item + '")';
|
|
3454
|
+
message += '\n' + obj_errors_item_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3455
|
+
message += '\n' + obj_errors_item_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3456
|
+
return { value: new TypeError(message) };
|
|
3457
|
+
}
|
|
3458
|
+
};
|
|
3459
|
+
for (var i = 0; i < obj_errors.length; i++) {
|
|
3460
|
+
var state_1 = _loop_1(i);
|
|
3461
|
+
if (typeof state_1 === "object")
|
|
3462
|
+
return state_1.value;
|
|
3463
|
+
}
|
|
3464
|
+
}
|
|
3465
|
+
if (obj.isSuccess !== undefined) {
|
|
3466
|
+
var obj_isSuccess_1 = obj.isSuccess;
|
|
3467
|
+
var path_isSuccess_1 = path + '.isSuccess';
|
|
3468
|
+
var obj_isSuccess_union0 = null;
|
|
3469
|
+
var obj_isSuccess_union0_error = (function () {
|
|
3470
|
+
if (typeof obj_isSuccess_1 !== 'boolean') {
|
|
3471
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isSuccess_1 + '" (at "' + path_isSuccess_1 + '")');
|
|
3472
|
+
}
|
|
3473
|
+
})();
|
|
3474
|
+
if (obj_isSuccess_union0_error != null) {
|
|
3475
|
+
obj_isSuccess_union0 = obj_isSuccess_union0_error.message;
|
|
3476
|
+
}
|
|
3477
|
+
var obj_isSuccess_union1 = null;
|
|
3478
|
+
var obj_isSuccess_union1_error = (function () {
|
|
3479
|
+
if (obj_isSuccess_1 !== null) {
|
|
3480
|
+
return new TypeError('Expected "null" but received "' + typeof obj_isSuccess_1 + '" (at "' + path_isSuccess_1 + '")');
|
|
3481
|
+
}
|
|
3482
|
+
})();
|
|
3483
|
+
if (obj_isSuccess_union1_error != null) {
|
|
3484
|
+
obj_isSuccess_union1 = obj_isSuccess_union1_error.message;
|
|
3485
|
+
}
|
|
3486
|
+
if (obj_isSuccess_union0 && obj_isSuccess_union1) {
|
|
3487
|
+
var message = 'Object doesn\'t match union (at "' + path_isSuccess_1 + '")';
|
|
3488
|
+
message += '\n' + obj_isSuccess_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3489
|
+
message += '\n' + obj_isSuccess_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3490
|
+
return new TypeError(message);
|
|
3491
|
+
}
|
|
3492
|
+
}
|
|
3493
|
+
var obj_onBehalfOfId = obj.onBehalfOfId;
|
|
3494
|
+
var path_onBehalfOfId = path + '.onBehalfOfId';
|
|
3495
|
+
var obj_onBehalfOfId_union0 = null;
|
|
3496
|
+
var obj_onBehalfOfId_union0_error = (function () {
|
|
3497
|
+
if (typeof obj_onBehalfOfId !== 'string') {
|
|
3498
|
+
return new TypeError('Expected "string" but received "' + typeof obj_onBehalfOfId + '" (at "' + path_onBehalfOfId + '")');
|
|
3499
|
+
}
|
|
3500
|
+
})();
|
|
3501
|
+
if (obj_onBehalfOfId_union0_error != null) {
|
|
3502
|
+
obj_onBehalfOfId_union0 = obj_onBehalfOfId_union0_error.message;
|
|
3503
|
+
}
|
|
3504
|
+
var obj_onBehalfOfId_union1 = null;
|
|
3505
|
+
var obj_onBehalfOfId_union1_error = (function () {
|
|
3506
|
+
if (obj_onBehalfOfId !== null) {
|
|
3507
|
+
return new TypeError('Expected "null" but received "' + typeof obj_onBehalfOfId + '" (at "' + path_onBehalfOfId + '")');
|
|
3508
|
+
}
|
|
3509
|
+
})();
|
|
3510
|
+
if (obj_onBehalfOfId_union1_error != null) {
|
|
3511
|
+
obj_onBehalfOfId_union1 = obj_onBehalfOfId_union1_error.message;
|
|
3512
|
+
}
|
|
3513
|
+
if (obj_onBehalfOfId_union0 && obj_onBehalfOfId_union1) {
|
|
3514
|
+
var message = 'Object doesn\'t match union (at "' + path_onBehalfOfId + '")';
|
|
3515
|
+
message += '\n' + obj_onBehalfOfId_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3516
|
+
message += '\n' + obj_onBehalfOfId_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3517
|
+
return new TypeError(message);
|
|
3518
|
+
}
|
|
3519
|
+
if (obj.predictionScore !== undefined) {
|
|
3520
|
+
obj.predictionScore;
|
|
3521
|
+
}
|
|
3522
|
+
if (obj.recommendations !== undefined) {
|
|
3523
|
+
var obj_recommendations = obj.recommendations;
|
|
3524
|
+
var path_recommendations = path + '.recommendations';
|
|
3525
|
+
if (!ArrayIsArray(obj_recommendations)) {
|
|
3526
|
+
return new TypeError('Expected "array" but received "' + typeof obj_recommendations + '" (at "' + path_recommendations + '")');
|
|
3527
|
+
}
|
|
3528
|
+
var _loop_2 = function (i) {
|
|
3529
|
+
var obj_recommendations_item = obj_recommendations[i];
|
|
3530
|
+
var path_recommendations_item = path_recommendations + '[' + i + ']';
|
|
3531
|
+
var obj_recommendations_item_union0 = null;
|
|
3532
|
+
var obj_recommendations_item_union0_error = (function () {
|
|
3533
|
+
var referencepath_recommendations_itemValidationError = validate$2(obj_recommendations_item, path_recommendations_item);
|
|
3534
|
+
if (referencepath_recommendations_itemValidationError !== null) {
|
|
3535
|
+
var message = 'Object doesn\'t match Recommendation (at "' + path_recommendations_item + '")\n';
|
|
3536
|
+
message += referencepath_recommendations_itemValidationError.message.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3537
|
+
return new TypeError(message);
|
|
3538
|
+
}
|
|
3539
|
+
})();
|
|
3540
|
+
if (obj_recommendations_item_union0_error != null) {
|
|
3541
|
+
obj_recommendations_item_union0 = obj_recommendations_item_union0_error.message;
|
|
3542
|
+
}
|
|
3543
|
+
var obj_recommendations_item_union1 = null;
|
|
3544
|
+
var obj_recommendations_item_union1_error = (function () {
|
|
3545
|
+
if (obj_recommendations_item !== null) {
|
|
3546
|
+
return new TypeError('Expected "null" but received "' + typeof obj_recommendations_item + '" (at "' + path_recommendations_item + '")');
|
|
3547
|
+
}
|
|
3548
|
+
})();
|
|
3549
|
+
if (obj_recommendations_item_union1_error != null) {
|
|
3550
|
+
obj_recommendations_item_union1 = obj_recommendations_item_union1_error.message;
|
|
3551
|
+
}
|
|
3552
|
+
if (obj_recommendations_item_union0 && obj_recommendations_item_union1) {
|
|
3553
|
+
var message = 'Object doesn\'t match union (at "' + path_recommendations_item + '")';
|
|
3554
|
+
message += '\n' + obj_recommendations_item_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3555
|
+
message += '\n' + obj_recommendations_item_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3556
|
+
return { value: new TypeError(message) };
|
|
3557
|
+
}
|
|
3558
|
+
};
|
|
3559
|
+
for (var i = 0; i < obj_recommendations.length; i++) {
|
|
3560
|
+
var state_2 = _loop_2(i);
|
|
3561
|
+
if (typeof state_2 === "object")
|
|
3562
|
+
return state_2.value;
|
|
3563
|
+
}
|
|
3564
|
+
}
|
|
3565
|
+
if (obj.recordId !== undefined) {
|
|
3566
|
+
var obj_recordId_1 = obj.recordId;
|
|
3567
|
+
var path_recordId_1 = path + '.recordId';
|
|
3568
|
+
var obj_recordId_union0 = null;
|
|
3569
|
+
var obj_recordId_union0_error = (function () {
|
|
3570
|
+
if (typeof obj_recordId_1 !== 'string') {
|
|
3571
|
+
return new TypeError('Expected "string" but received "' + typeof obj_recordId_1 + '" (at "' + path_recordId_1 + '")');
|
|
3572
|
+
}
|
|
3573
|
+
})();
|
|
3574
|
+
if (obj_recordId_union0_error != null) {
|
|
3575
|
+
obj_recordId_union0 = obj_recordId_union0_error.message;
|
|
3576
|
+
}
|
|
3577
|
+
var obj_recordId_union1 = null;
|
|
3578
|
+
var obj_recordId_union1_error = (function () {
|
|
3579
|
+
if (obj_recordId_1 !== null) {
|
|
3580
|
+
return new TypeError('Expected "null" but received "' + typeof obj_recordId_1 + '" (at "' + path_recordId_1 + '")');
|
|
3581
|
+
}
|
|
3582
|
+
})();
|
|
3583
|
+
if (obj_recordId_union1_error != null) {
|
|
3584
|
+
obj_recordId_union1 = obj_recordId_union1_error.message;
|
|
3585
|
+
}
|
|
3586
|
+
if (obj_recordId_union0 && obj_recordId_union1) {
|
|
3587
|
+
var message = 'Object doesn\'t match union (at "' + path_recordId_1 + '")';
|
|
3588
|
+
message += '\n' + obj_recordId_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3589
|
+
message += '\n' + obj_recordId_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3590
|
+
return new TypeError(message);
|
|
3591
|
+
}
|
|
3592
|
+
}
|
|
3593
|
+
})();
|
|
3594
|
+
return v_error === undefined ? null : v_error;
|
|
3595
|
+
}
|
|
3596
|
+
function deepFreeze$1(input) {
|
|
3597
|
+
var input_errors = input.errors;
|
|
3598
|
+
if (input_errors !== undefined) {
|
|
3599
|
+
for (var i = 0; i < input_errors.length; i++) {
|
|
3600
|
+
var input_errors_item = input_errors[i];
|
|
3601
|
+
if (input_errors_item !== null && typeof input_errors_item === 'object') {
|
|
3602
|
+
deepFreeze$4(input_errors_item);
|
|
3603
|
+
}
|
|
3604
|
+
}
|
|
3605
|
+
ObjectFreeze(input_errors);
|
|
3606
|
+
}
|
|
3607
|
+
var input_recommendations = input.recommendations;
|
|
3608
|
+
if (input_recommendations !== undefined) {
|
|
3609
|
+
for (var i = 0; i < input_recommendations.length; i++) {
|
|
3610
|
+
var input_recommendations_item = input_recommendations[i];
|
|
3611
|
+
if (input_recommendations_item !== null && typeof input_recommendations_item === 'object') {
|
|
3612
|
+
deepFreeze$2(input_recommendations_item);
|
|
3613
|
+
}
|
|
3614
|
+
}
|
|
3615
|
+
ObjectFreeze(input_recommendations);
|
|
3616
|
+
}
|
|
3617
|
+
ObjectFreeze(input);
|
|
3618
|
+
}
|
|
3619
|
+
|
|
3620
|
+
var TTL = 1000;
|
|
3621
|
+
var VERSION = "aaf9d28bb6dd45e46359c8fa29159989";
|
|
3622
|
+
function validate(obj, path) {
|
|
3623
|
+
if (path === void 0) { path = 'RecommendationOutputRepresentation'; }
|
|
3624
|
+
var v_error = (function () {
|
|
3625
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3626
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
3627
|
+
}
|
|
3628
|
+
if (obj.executionModeWarning !== undefined) {
|
|
3629
|
+
var obj_executionModeWarning_1 = obj.executionModeWarning;
|
|
3630
|
+
var path_executionModeWarning_1 = path + '.executionModeWarning';
|
|
3631
|
+
var obj_executionModeWarning_union0 = null;
|
|
3632
|
+
var obj_executionModeWarning_union0_error = (function () {
|
|
3633
|
+
if (typeof obj_executionModeWarning_1 !== 'string') {
|
|
3634
|
+
return new TypeError('Expected "string" but received "' + typeof obj_executionModeWarning_1 + '" (at "' + path_executionModeWarning_1 + '")');
|
|
3635
|
+
}
|
|
3636
|
+
})();
|
|
3637
|
+
if (obj_executionModeWarning_union0_error != null) {
|
|
3638
|
+
obj_executionModeWarning_union0 = obj_executionModeWarning_union0_error.message;
|
|
3639
|
+
}
|
|
3640
|
+
var obj_executionModeWarning_union1 = null;
|
|
3641
|
+
var obj_executionModeWarning_union1_error = (function () {
|
|
3642
|
+
if (obj_executionModeWarning_1 !== null) {
|
|
3643
|
+
return new TypeError('Expected "null" but received "' + typeof obj_executionModeWarning_1 + '" (at "' + path_executionModeWarning_1 + '")');
|
|
3644
|
+
}
|
|
3645
|
+
})();
|
|
3646
|
+
if (obj_executionModeWarning_union1_error != null) {
|
|
3647
|
+
obj_executionModeWarning_union1 = obj_executionModeWarning_union1_error.message;
|
|
3648
|
+
}
|
|
3649
|
+
if (obj_executionModeWarning_union0 && obj_executionModeWarning_union1) {
|
|
3650
|
+
var message = 'Object doesn\'t match union (at "' + path_executionModeWarning_1 + '")';
|
|
3651
|
+
message += '\n' + obj_executionModeWarning_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3652
|
+
message += '\n' + obj_executionModeWarning_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3653
|
+
return new TypeError(message);
|
|
3654
|
+
}
|
|
3655
|
+
}
|
|
3656
|
+
if (obj.recommendationPersistenceErrorMessage !== undefined) {
|
|
3657
|
+
var obj_recommendationPersistenceErrorMessage_1 = obj.recommendationPersistenceErrorMessage;
|
|
3658
|
+
var path_recommendationPersistenceErrorMessage_1 = path + '.recommendationPersistenceErrorMessage';
|
|
3659
|
+
var obj_recommendationPersistenceErrorMessage_union0 = null;
|
|
3660
|
+
var obj_recommendationPersistenceErrorMessage_union0_error = (function () {
|
|
3661
|
+
if (typeof obj_recommendationPersistenceErrorMessage_1 !== 'string') {
|
|
3662
|
+
return new TypeError('Expected "string" but received "' + typeof obj_recommendationPersistenceErrorMessage_1 + '" (at "' + path_recommendationPersistenceErrorMessage_1 + '")');
|
|
3663
|
+
}
|
|
3664
|
+
})();
|
|
3665
|
+
if (obj_recommendationPersistenceErrorMessage_union0_error != null) {
|
|
3666
|
+
obj_recommendationPersistenceErrorMessage_union0 = obj_recommendationPersistenceErrorMessage_union0_error.message;
|
|
3667
|
+
}
|
|
3668
|
+
var obj_recommendationPersistenceErrorMessage_union1 = null;
|
|
3669
|
+
var obj_recommendationPersistenceErrorMessage_union1_error = (function () {
|
|
3670
|
+
if (obj_recommendationPersistenceErrorMessage_1 !== null) {
|
|
3671
|
+
return new TypeError('Expected "null" but received "' + typeof obj_recommendationPersistenceErrorMessage_1 + '" (at "' + path_recommendationPersistenceErrorMessage_1 + '")');
|
|
3672
|
+
}
|
|
3673
|
+
})();
|
|
3674
|
+
if (obj_recommendationPersistenceErrorMessage_union1_error != null) {
|
|
3675
|
+
obj_recommendationPersistenceErrorMessage_union1 = obj_recommendationPersistenceErrorMessage_union1_error.message;
|
|
3676
|
+
}
|
|
3677
|
+
if (obj_recommendationPersistenceErrorMessage_union0 && obj_recommendationPersistenceErrorMessage_union1) {
|
|
3678
|
+
var message = 'Object doesn\'t match union (at "' + path_recommendationPersistenceErrorMessage_1 + '")';
|
|
3679
|
+
message += '\n' + obj_recommendationPersistenceErrorMessage_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3680
|
+
message += '\n' + obj_recommendationPersistenceErrorMessage_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3681
|
+
return new TypeError(message);
|
|
3682
|
+
}
|
|
3683
|
+
}
|
|
3684
|
+
if (obj.recommendationRecordIds !== undefined) {
|
|
3685
|
+
var obj_recommendationRecordIds = obj.recommendationRecordIds;
|
|
3686
|
+
var path_recommendationRecordIds = path + '.recommendationRecordIds';
|
|
3687
|
+
if (!ArrayIsArray(obj_recommendationRecordIds)) {
|
|
3688
|
+
return new TypeError('Expected "array" but received "' + typeof obj_recommendationRecordIds + '" (at "' + path_recommendationRecordIds + '")');
|
|
3689
|
+
}
|
|
3690
|
+
var _loop_1 = function (i) {
|
|
3691
|
+
var obj_recommendationRecordIds_item = obj_recommendationRecordIds[i];
|
|
3692
|
+
var path_recommendationRecordIds_item = path_recommendationRecordIds + '[' + i + ']';
|
|
3693
|
+
var obj_recommendationRecordIds_item_union0 = null;
|
|
3694
|
+
var obj_recommendationRecordIds_item_union0_error = (function () {
|
|
3695
|
+
if (typeof obj_recommendationRecordIds_item !== 'string') {
|
|
3696
|
+
return new TypeError('Expected "string" but received "' + typeof obj_recommendationRecordIds_item + '" (at "' + path_recommendationRecordIds_item + '")');
|
|
3697
|
+
}
|
|
3698
|
+
})();
|
|
3699
|
+
if (obj_recommendationRecordIds_item_union0_error != null) {
|
|
3700
|
+
obj_recommendationRecordIds_item_union0 = obj_recommendationRecordIds_item_union0_error.message;
|
|
3701
|
+
}
|
|
3702
|
+
var obj_recommendationRecordIds_item_union1 = null;
|
|
3703
|
+
var obj_recommendationRecordIds_item_union1_error = (function () {
|
|
3704
|
+
if (obj_recommendationRecordIds_item !== null) {
|
|
3705
|
+
return new TypeError('Expected "null" but received "' + typeof obj_recommendationRecordIds_item + '" (at "' + path_recommendationRecordIds_item + '")');
|
|
3706
|
+
}
|
|
3707
|
+
})();
|
|
3708
|
+
if (obj_recommendationRecordIds_item_union1_error != null) {
|
|
3709
|
+
obj_recommendationRecordIds_item_union1 = obj_recommendationRecordIds_item_union1_error.message;
|
|
3710
|
+
}
|
|
3711
|
+
if (obj_recommendationRecordIds_item_union0 && obj_recommendationRecordIds_item_union1) {
|
|
3712
|
+
var message = 'Object doesn\'t match union (at "' + path_recommendationRecordIds_item + '")';
|
|
3713
|
+
message += '\n' + obj_recommendationRecordIds_item_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3714
|
+
message += '\n' + obj_recommendationRecordIds_item_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3715
|
+
return { value: new TypeError(message) };
|
|
3716
|
+
}
|
|
3717
|
+
};
|
|
3718
|
+
for (var i = 0; i < obj_recommendationRecordIds.length; i++) {
|
|
3719
|
+
var state_1 = _loop_1(i);
|
|
3720
|
+
if (typeof state_1 === "object")
|
|
3721
|
+
return state_1.value;
|
|
3722
|
+
}
|
|
3723
|
+
}
|
|
3724
|
+
if (obj.recommendationStrategyResult !== undefined) {
|
|
3725
|
+
var obj_recommendationStrategyResult = obj.recommendationStrategyResult;
|
|
3726
|
+
var path_recommendationStrategyResult = path + '.recommendationStrategyResult';
|
|
3727
|
+
if (!ArrayIsArray(obj_recommendationStrategyResult)) {
|
|
3728
|
+
return new TypeError('Expected "array" but received "' + typeof obj_recommendationStrategyResult + '" (at "' + path_recommendationStrategyResult + '")');
|
|
3729
|
+
}
|
|
3730
|
+
var _loop_2 = function (i) {
|
|
3731
|
+
var obj_recommendationStrategyResult_item = obj_recommendationStrategyResult[i];
|
|
3732
|
+
var path_recommendationStrategyResult_item = path_recommendationStrategyResult + '[' + i + ']';
|
|
3733
|
+
var obj_recommendationStrategyResult_item_union0 = null;
|
|
3734
|
+
var obj_recommendationStrategyResult_item_union0_error = (function () {
|
|
3735
|
+
var referencepath_recommendationStrategyResult_itemValidationError = validate$1(obj_recommendationStrategyResult_item, path_recommendationStrategyResult_item);
|
|
3736
|
+
if (referencepath_recommendationStrategyResult_itemValidationError !== null) {
|
|
3737
|
+
var message = 'Object doesn\'t match RcmdStrategyResult (at "' + path_recommendationStrategyResult_item + '")\n';
|
|
3738
|
+
message += referencepath_recommendationStrategyResult_itemValidationError.message.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3739
|
+
return new TypeError(message);
|
|
3740
|
+
}
|
|
3741
|
+
})();
|
|
3742
|
+
if (obj_recommendationStrategyResult_item_union0_error != null) {
|
|
3743
|
+
obj_recommendationStrategyResult_item_union0 = obj_recommendationStrategyResult_item_union0_error.message;
|
|
3744
|
+
}
|
|
3745
|
+
var obj_recommendationStrategyResult_item_union1 = null;
|
|
3746
|
+
var obj_recommendationStrategyResult_item_union1_error = (function () {
|
|
3747
|
+
if (obj_recommendationStrategyResult_item !== null) {
|
|
3748
|
+
return new TypeError('Expected "null" but received "' + typeof obj_recommendationStrategyResult_item + '" (at "' + path_recommendationStrategyResult_item + '")');
|
|
3749
|
+
}
|
|
3750
|
+
})();
|
|
3751
|
+
if (obj_recommendationStrategyResult_item_union1_error != null) {
|
|
3752
|
+
obj_recommendationStrategyResult_item_union1 = obj_recommendationStrategyResult_item_union1_error.message;
|
|
3753
|
+
}
|
|
3754
|
+
if (obj_recommendationStrategyResult_item_union0 && obj_recommendationStrategyResult_item_union1) {
|
|
3755
|
+
var message = 'Object doesn\'t match union (at "' + path_recommendationStrategyResult_item + '")';
|
|
3756
|
+
message += '\n' + obj_recommendationStrategyResult_item_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3757
|
+
message += '\n' + obj_recommendationStrategyResult_item_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3758
|
+
return { value: new TypeError(message) };
|
|
3759
|
+
}
|
|
3760
|
+
};
|
|
3761
|
+
for (var i = 0; i < obj_recommendationStrategyResult.length; i++) {
|
|
3762
|
+
var state_2 = _loop_2(i);
|
|
3763
|
+
if (typeof state_2 === "object")
|
|
3764
|
+
return state_2.value;
|
|
3765
|
+
}
|
|
3766
|
+
}
|
|
3767
|
+
if (obj.requestId !== undefined) {
|
|
3768
|
+
var obj_requestId_1 = obj.requestId;
|
|
3769
|
+
var path_requestId_1 = path + '.requestId';
|
|
3770
|
+
var obj_requestId_union0 = null;
|
|
3771
|
+
var obj_requestId_union0_error = (function () {
|
|
3772
|
+
if (typeof obj_requestId_1 !== 'string') {
|
|
3773
|
+
return new TypeError('Expected "string" but received "' + typeof obj_requestId_1 + '" (at "' + path_requestId_1 + '")');
|
|
3774
|
+
}
|
|
3775
|
+
})();
|
|
3776
|
+
if (obj_requestId_union0_error != null) {
|
|
3777
|
+
obj_requestId_union0 = obj_requestId_union0_error.message;
|
|
3778
|
+
}
|
|
3779
|
+
var obj_requestId_union1 = null;
|
|
3780
|
+
var obj_requestId_union1_error = (function () {
|
|
3781
|
+
if (obj_requestId_1 !== null) {
|
|
3782
|
+
return new TypeError('Expected "null" but received "' + typeof obj_requestId_1 + '" (at "' + path_requestId_1 + '")');
|
|
3783
|
+
}
|
|
3784
|
+
})();
|
|
3785
|
+
if (obj_requestId_union1_error != null) {
|
|
3786
|
+
obj_requestId_union1 = obj_requestId_union1_error.message;
|
|
3787
|
+
}
|
|
3788
|
+
if (obj_requestId_union0 && obj_requestId_union1) {
|
|
3789
|
+
var message = 'Object doesn\'t match union (at "' + path_requestId_1 + '")';
|
|
3790
|
+
message += '\n' + obj_requestId_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3791
|
+
message += '\n' + obj_requestId_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3792
|
+
return new TypeError(message);
|
|
3793
|
+
}
|
|
3794
|
+
}
|
|
3795
|
+
var obj_status = obj.status;
|
|
3796
|
+
var path_status = path + '.status';
|
|
3797
|
+
var referencepath_statusValidationError = validate$7(obj_status, path_status);
|
|
3798
|
+
if (referencepath_statusValidationError !== null) {
|
|
3799
|
+
var message = 'Object doesn\'t match Status (at "' + path_status + '")\n';
|
|
3800
|
+
message += referencepath_statusValidationError.message.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3801
|
+
return new TypeError(message);
|
|
3802
|
+
}
|
|
3803
|
+
if (obj.strategyName !== undefined) {
|
|
3804
|
+
var obj_strategyName_1 = obj.strategyName;
|
|
3805
|
+
var path_strategyName_1 = path + '.strategyName';
|
|
3806
|
+
var obj_strategyName_union0 = null;
|
|
3807
|
+
var obj_strategyName_union0_error = (function () {
|
|
3808
|
+
if (typeof obj_strategyName_1 !== 'string') {
|
|
3809
|
+
return new TypeError('Expected "string" but received "' + typeof obj_strategyName_1 + '" (at "' + path_strategyName_1 + '")');
|
|
3810
|
+
}
|
|
3811
|
+
})();
|
|
3812
|
+
if (obj_strategyName_union0_error != null) {
|
|
3813
|
+
obj_strategyName_union0 = obj_strategyName_union0_error.message;
|
|
3814
|
+
}
|
|
3815
|
+
var obj_strategyName_union1 = null;
|
|
3816
|
+
var obj_strategyName_union1_error = (function () {
|
|
3817
|
+
if (obj_strategyName_1 !== null) {
|
|
3818
|
+
return new TypeError('Expected "null" but received "' + typeof obj_strategyName_1 + '" (at "' + path_strategyName_1 + '")');
|
|
3819
|
+
}
|
|
3820
|
+
})();
|
|
3821
|
+
if (obj_strategyName_union1_error != null) {
|
|
3822
|
+
obj_strategyName_union1 = obj_strategyName_union1_error.message;
|
|
3823
|
+
}
|
|
3824
|
+
if (obj_strategyName_union0 && obj_strategyName_union1) {
|
|
3825
|
+
var message = 'Object doesn\'t match union (at "' + path_strategyName_1 + '")';
|
|
3826
|
+
message += '\n' + obj_strategyName_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3827
|
+
message += '\n' + obj_strategyName_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3828
|
+
return new TypeError(message);
|
|
3829
|
+
}
|
|
3830
|
+
}
|
|
3831
|
+
if (obj.usecaseName !== undefined) {
|
|
3832
|
+
var obj_usecaseName_1 = obj.usecaseName;
|
|
3833
|
+
var path_usecaseName_1 = path + '.usecaseName';
|
|
3834
|
+
var obj_usecaseName_union0 = null;
|
|
3835
|
+
var obj_usecaseName_union0_error = (function () {
|
|
3836
|
+
if (typeof obj_usecaseName_1 !== 'string') {
|
|
3837
|
+
return new TypeError('Expected "string" but received "' + typeof obj_usecaseName_1 + '" (at "' + path_usecaseName_1 + '")');
|
|
3838
|
+
}
|
|
3839
|
+
})();
|
|
3840
|
+
if (obj_usecaseName_union0_error != null) {
|
|
3841
|
+
obj_usecaseName_union0 = obj_usecaseName_union0_error.message;
|
|
3842
|
+
}
|
|
3843
|
+
var obj_usecaseName_union1 = null;
|
|
3844
|
+
var obj_usecaseName_union1_error = (function () {
|
|
3845
|
+
if (obj_usecaseName_1 !== null) {
|
|
3846
|
+
return new TypeError('Expected "null" but received "' + typeof obj_usecaseName_1 + '" (at "' + path_usecaseName_1 + '")');
|
|
3847
|
+
}
|
|
3848
|
+
})();
|
|
3849
|
+
if (obj_usecaseName_union1_error != null) {
|
|
3850
|
+
obj_usecaseName_union1 = obj_usecaseName_union1_error.message;
|
|
3851
|
+
}
|
|
3852
|
+
if (obj_usecaseName_union0 && obj_usecaseName_union1) {
|
|
3853
|
+
var message = 'Object doesn\'t match union (at "' + path_usecaseName_1 + '")';
|
|
3854
|
+
message += '\n' + obj_usecaseName_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3855
|
+
message += '\n' + obj_usecaseName_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
3856
|
+
return new TypeError(message);
|
|
3857
|
+
}
|
|
3858
|
+
}
|
|
3859
|
+
})();
|
|
3860
|
+
return v_error === undefined ? null : v_error;
|
|
3861
|
+
}
|
|
3862
|
+
var RepresentationType = 'RecommendationOutputRepresentation';
|
|
3863
|
+
function keyBuilder(luvio, config) {
|
|
3864
|
+
return keyPrefix + '::' + RepresentationType + ':' + config.status;
|
|
3865
|
+
}
|
|
3866
|
+
function keyBuilderFromType(luvio, object) {
|
|
3867
|
+
var keyParams = {
|
|
3868
|
+
status: object.status.message
|
|
3869
|
+
};
|
|
3870
|
+
return keyBuilder(luvio, keyParams);
|
|
3871
|
+
}
|
|
3872
|
+
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
3873
|
+
return input;
|
|
3874
|
+
}
|
|
3875
|
+
var select$1 = function RecommendationOutputRepresentationSelect() {
|
|
3876
|
+
return {
|
|
3877
|
+
kind: 'Fragment',
|
|
3878
|
+
version: VERSION,
|
|
3879
|
+
private: [],
|
|
3880
|
+
opaque: true
|
|
3881
|
+
};
|
|
3882
|
+
};
|
|
3883
|
+
function equals(existing, incoming) {
|
|
3884
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
3885
|
+
return false;
|
|
3886
|
+
}
|
|
3887
|
+
return true;
|
|
3888
|
+
}
|
|
3889
|
+
function deepFreeze(input) {
|
|
3890
|
+
var input_recommendationRecordIds = input.recommendationRecordIds;
|
|
3891
|
+
if (input_recommendationRecordIds !== undefined) {
|
|
3892
|
+
for (var i = 0; i < input_recommendationRecordIds.length; i++) {
|
|
3893
|
+
}
|
|
3894
|
+
ObjectFreeze(input_recommendationRecordIds);
|
|
3895
|
+
}
|
|
3896
|
+
var input_recommendationStrategyResult = input.recommendationStrategyResult;
|
|
3897
|
+
if (input_recommendationStrategyResult !== undefined) {
|
|
3898
|
+
for (var i = 0; i < input_recommendationStrategyResult.length; i++) {
|
|
3899
|
+
var input_recommendationStrategyResult_item = input_recommendationStrategyResult[i];
|
|
3900
|
+
if (input_recommendationStrategyResult_item !== null && typeof input_recommendationStrategyResult_item === 'object') {
|
|
3901
|
+
deepFreeze$1(input_recommendationStrategyResult_item);
|
|
3902
|
+
}
|
|
3903
|
+
}
|
|
3904
|
+
ObjectFreeze(input_recommendationStrategyResult);
|
|
3905
|
+
}
|
|
3906
|
+
var input_status = input.status;
|
|
3907
|
+
deepFreeze$6(input_status);
|
|
3908
|
+
ObjectFreeze(input);
|
|
3909
|
+
}
|
|
3910
|
+
var ingest = function RecommendationOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
3911
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3912
|
+
var validateError = validate(input);
|
|
3913
|
+
if (validateError !== null) {
|
|
3914
|
+
throw validateError;
|
|
3915
|
+
}
|
|
3916
|
+
}
|
|
3917
|
+
var key = keyBuilderFromType(luvio, input);
|
|
3918
|
+
var existingRecord = store.readEntry(key);
|
|
3919
|
+
var ttlToUse = TTL;
|
|
3920
|
+
var incomingRecord = normalize(input, store.readEntry(key), {
|
|
3921
|
+
fullPath: key,
|
|
3922
|
+
parent: path.parent,
|
|
3923
|
+
propertyName: path.propertyName,
|
|
3924
|
+
ttl: ttlToUse
|
|
3925
|
+
});
|
|
3926
|
+
deepFreeze(input);
|
|
3927
|
+
if (existingRecord === undefined || equals(existingRecord, incomingRecord) === false) {
|
|
3928
|
+
luvio.storePublish(key, incomingRecord);
|
|
3929
|
+
}
|
|
3930
|
+
{
|
|
3931
|
+
var storeMetadataParams = {
|
|
3932
|
+
ttl: ttlToUse,
|
|
3933
|
+
namespace: "Einstein-AIAccelerator",
|
|
3934
|
+
version: VERSION,
|
|
3935
|
+
representationName: RepresentationType,
|
|
3936
|
+
};
|
|
3937
|
+
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
3938
|
+
}
|
|
3939
|
+
return createLink(key);
|
|
3940
|
+
};
|
|
3941
|
+
function getTypeCacheKeys(luvio, input, fullPathFactory) {
|
|
3942
|
+
var rootKeySet = new engine.StoreKeyMap();
|
|
3943
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
3944
|
+
var rootKey = keyBuilderFromType(luvio, input);
|
|
3945
|
+
rootKeySet.set(rootKey, {
|
|
3946
|
+
namespace: keyPrefix,
|
|
3947
|
+
representationName: RepresentationType,
|
|
3948
|
+
mergeable: false
|
|
3949
|
+
});
|
|
3950
|
+
return rootKeySet;
|
|
3951
|
+
}
|
|
3952
|
+
|
|
3953
|
+
function select(luvio, params) {
|
|
3954
|
+
return select$1();
|
|
3955
|
+
}
|
|
3956
|
+
function getResponseCacheKeys(luvio, resourceParams, response) {
|
|
3957
|
+
return getTypeCacheKeys(luvio, response);
|
|
3958
|
+
}
|
|
3959
|
+
function ingestSuccess(luvio, resourceParams, response) {
|
|
3960
|
+
var body = response.body;
|
|
3961
|
+
var key = keyBuilderFromType(luvio, body);
|
|
3962
|
+
luvio.storeIngest(key, ingest, body);
|
|
3963
|
+
var snapshot = luvio.storeLookup({
|
|
3964
|
+
recordId: key,
|
|
3965
|
+
node: select(),
|
|
3966
|
+
variables: {},
|
|
3967
|
+
});
|
|
3968
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3969
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
3970
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
3971
|
+
}
|
|
3972
|
+
}
|
|
3973
|
+
return snapshot;
|
|
3974
|
+
}
|
|
3975
|
+
function createResourceRequest(config) {
|
|
3976
|
+
var headers = {};
|
|
3977
|
+
return {
|
|
3978
|
+
baseUri: '/services/data/v58.0',
|
|
3979
|
+
basePath: '/connect/aiaccelerator/recommendations',
|
|
3980
|
+
method: 'post',
|
|
3981
|
+
body: config.body,
|
|
3982
|
+
urlParams: {},
|
|
3983
|
+
queryParams: {},
|
|
3984
|
+
headers: headers,
|
|
3985
|
+
priority: 'normal',
|
|
3986
|
+
};
|
|
3987
|
+
}
|
|
3988
|
+
|
|
3989
|
+
var fetchRecommendations_ConfigPropertyNames = {
|
|
3990
|
+
displayName: 'fetchRecommendations',
|
|
3991
|
+
parameters: {
|
|
3992
|
+
required: ['recommendationInput'],
|
|
3993
|
+
optional: []
|
|
3994
|
+
}
|
|
3995
|
+
};
|
|
3996
|
+
function createResourceParams(config) {
|
|
3997
|
+
var resourceParams = {
|
|
3998
|
+
body: {
|
|
3999
|
+
recommendationInput: config.recommendationInput
|
|
4000
|
+
}
|
|
4001
|
+
};
|
|
4002
|
+
return resourceParams;
|
|
4003
|
+
}
|
|
4004
|
+
function typeCheckConfig(untrustedConfig) {
|
|
4005
|
+
var config = {};
|
|
4006
|
+
var untrustedConfig_recommendationInput = untrustedConfig.recommendationInput;
|
|
4007
|
+
var referenceRecommendationInputRepresentationValidationError = validate$5(untrustedConfig_recommendationInput);
|
|
4008
|
+
if (referenceRecommendationInputRepresentationValidationError === null) {
|
|
4009
|
+
config.recommendationInput = untrustedConfig_recommendationInput;
|
|
4010
|
+
}
|
|
4011
|
+
return config;
|
|
4012
|
+
}
|
|
4013
|
+
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
4014
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
4015
|
+
return null;
|
|
4016
|
+
}
|
|
4017
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4018
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
4019
|
+
}
|
|
4020
|
+
var config = typeCheckConfig(untrustedConfig);
|
|
4021
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
4022
|
+
return null;
|
|
4023
|
+
}
|
|
4024
|
+
return config;
|
|
4025
|
+
}
|
|
4026
|
+
function buildNetworkSnapshot(luvio, config, options) {
|
|
4027
|
+
var resourceParams = createResourceParams(config);
|
|
4028
|
+
var request = createResourceRequest(resourceParams);
|
|
4029
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
4030
|
+
.then(function (response) {
|
|
4031
|
+
return luvio.handleSuccessResponse(function () {
|
|
4032
|
+
var snapshot = ingestSuccess(luvio, resourceParams, response);
|
|
4033
|
+
return luvio.storeBroadcast().then(function () { return snapshot; });
|
|
4034
|
+
}, function () { return getResponseCacheKeys(luvio, resourceParams, response.body); });
|
|
4035
|
+
}, function (response) {
|
|
4036
|
+
deepFreeze$e(response);
|
|
4037
|
+
throw response;
|
|
4038
|
+
});
|
|
4039
|
+
}
|
|
4040
|
+
var fetchRecommendationsAdapterFactory = function (luvio) {
|
|
4041
|
+
return function fetchRecommendations(untrustedConfig) {
|
|
4042
|
+
var config = validateAdapterConfig(untrustedConfig, fetchRecommendations_ConfigPropertyNames);
|
|
4043
|
+
// Invalid or incomplete config
|
|
4044
|
+
if (config === null) {
|
|
4045
|
+
throw new Error('Invalid config for "fetchRecommendations"');
|
|
4046
|
+
}
|
|
4047
|
+
return buildNetworkSnapshot(luvio, config);
|
|
4048
|
+
};
|
|
4049
|
+
};
|
|
4050
|
+
|
|
4051
|
+
exports.fetchRecommendationsAdapterFactory = fetchRecommendationsAdapterFactory;
|
|
4052
|
+
exports.predictionsAdapterFactory = predictionsAdapterFactory;
|
|
4053
|
+
|
|
4054
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4055
|
+
|
|
4056
|
+
}));
|