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