@salesforce/lds-adapters-cdp-semantic-authoring 1.294.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.txt +82 -0
- package/dist/es/es2018/cdp-semantic-authoring.js +4502 -0
- package/dist/es/es2018/types/src/generated/adapters/adapter-utils.d.ts +62 -0
- package/dist/es/es2018/types/src/generated/adapters/getSemanticModel.d.ts +30 -0
- package/dist/es/es2018/types/src/generated/adapters/getSemanticModels.d.ts +33 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +2 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +6 -0
- package/dist/es/es2018/types/src/generated/resources/getSsotSemanticModels.d.ts +21 -0
- package/dist/es/es2018/types/src/generated/resources/getSsotSemanticModelsByModelApiNameOrId.d.ts +20 -0
- package/dist/es/es2018/types/src/generated/resources/getSsotSemanticModelsCalculatedDimensionsByCalculatedDimensionNameOrIdAndModelApiNameOrId.d.ts +16 -0
- package/dist/es/es2018/types/src/generated/resources/getSsotSemanticModelsCalculatedDimensionsByModelApiNameOrId.d.ts +18 -0
- package/dist/es/es2018/types/src/generated/resources/getSsotSemanticModelsCalculatedMeasurementsByCalculatedMeasurementNameOrIdAndModelApiNameOrId.d.ts +16 -0
- package/dist/es/es2018/types/src/generated/resources/getSsotSemanticModelsCalculatedMeasurementsByModelApiNameOrId.d.ts +18 -0
- package/dist/es/es2018/types/src/generated/resources/getSsotSemanticModelsDataObjectsByDataObjectNameOrIdAndModelApiNameOrId.d.ts +16 -0
- package/dist/es/es2018/types/src/generated/resources/getSsotSemanticModelsDataObjectsByModelApiNameOrId.d.ts +15 -0
- package/dist/es/es2018/types/src/generated/resources/getSsotSemanticModelsDataObjectsDimensionsByDataObjectNameOrIdAndDimensionNameOrIdAndModelApiNameOrId.d.ts +17 -0
- package/dist/es/es2018/types/src/generated/resources/getSsotSemanticModelsDataObjectsDimensionsByDataObjectNameOrIdAndModelApiNameOrId.d.ts +19 -0
- package/dist/es/es2018/types/src/generated/resources/getSsotSemanticModelsDataObjectsMeasurementsByDataObjectNameOrIdAndMeasurementNameOrIdAndModelApiNameOrId.d.ts +17 -0
- package/dist/es/es2018/types/src/generated/resources/getSsotSemanticModelsDataObjectsMeasurementsByDataObjectNameOrIdAndModelApiNameOrId.d.ts +19 -0
- package/dist/es/es2018/types/src/generated/resources/getSsotSemanticModelsLogicalViewsByLogicalViewApiNameOrIdAndModelApiNameOrId.d.ts +16 -0
- package/dist/es/es2018/types/src/generated/resources/getSsotSemanticModelsMetricsByMetricNameOrIdAndModelApiNameOrId.d.ts +16 -0
- package/dist/es/es2018/types/src/generated/resources/getSsotSemanticModelsMetricsByModelApiNameOrId.d.ts +15 -0
- package/dist/es/es2018/types/src/generated/resources/getSsotSemanticModelsParametersByModelApiNameOrId.d.ts +15 -0
- package/dist/es/es2018/types/src/generated/resources/getSsotSemanticModelsParametersByModelApiNameOrIdAndParameterApiNameOrId.d.ts +16 -0
- package/dist/es/es2018/types/src/generated/resources/getSsotSemanticModelsRelationshipsByModelApiNameOrId.d.ts +15 -0
- package/dist/es/es2018/types/src/generated/resources/getSsotSemanticModelsRelationshipsByModelApiNameOrIdAndRelationshipNameOrId.d.ts +16 -0
- package/dist/es/es2018/types/src/generated/types/SemanticAuthoringErrorOutputRepresentation.d.ts +40 -0
- package/dist/es/es2018/types/src/generated/types/SemanticBaseModelInputRepresentation.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/types/SemanticBaseModelOutputRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/SemanticCalculatedDimensionCollectionOutputRepresentation.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/types/SemanticCalculatedDimensionInputRepresentation.d.ts +67 -0
- package/dist/es/es2018/types/src/generated/types/SemanticCalculatedDimensionOutputRepresentation.d.ts +80 -0
- package/dist/es/es2018/types/src/generated/types/SemanticCalculatedMeasurementCollectionOutputRepresentation.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/types/SemanticCalculatedMeasurementInputRepresentation.d.ts +76 -0
- package/dist/es/es2018/types/src/generated/types/SemanticCalculatedMeasurementOutputRepresentation.d.ts +92 -0
- package/dist/es/es2018/types/src/generated/types/SemanticDataObjectCollectionInputRepresentation.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/types/SemanticDataObjectCollectionOutputRepresentation.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/types/SemanticDataObjectFieldReferenceInputRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/SemanticDataObjectFieldReferenceOutputRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/SemanticDataObjectInputRepresentation.d.ts +61 -0
- package/dist/es/es2018/types/src/generated/types/SemanticDataObjectOutputRepresentation.d.ts +82 -0
- package/dist/es/es2018/types/src/generated/types/SemanticDependencyCollectionInputRepresentation.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/types/SemanticDependencyCollectionOutputRepresentation.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/types/SemanticDependencyInnerCollectionOutputRepresentation.d.ts +35 -0
- package/dist/es/es2018/types/src/generated/types/SemanticDependencyInputRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/SemanticDependencyOutputRepresentation.d.ts +34 -0
- package/dist/es/es2018/types/src/generated/types/SemanticDimensionCollectionOutputRepresentation.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/types/SemanticDimensionInputRepresentation.d.ts +58 -0
- package/dist/es/es2018/types/src/generated/types/SemanticDimensionOutputRepresentation.d.ts +70 -0
- package/dist/es/es2018/types/src/generated/types/SemanticFieldReferenceInputRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/SemanticFieldReferenceOutputRepresentation.d.ts +32 -0
- package/dist/es/es2018/types/src/generated/types/SemanticFilterInputRepresentation.d.ts +34 -0
- package/dist/es/es2018/types/src/generated/types/SemanticFilterOutputRepresentation.d.ts +34 -0
- package/dist/es/es2018/types/src/generated/types/SemanticIdentifyingDimensionInputRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/SemanticIdentifyingDimensionOutputRepresentation.d.ts +32 -0
- package/dist/es/es2018/types/src/generated/types/SemanticInsightTypeInputRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/SemanticInsightTypeOutputRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/SemanticInsightsSettingsInputRepresentation.d.ts +40 -0
- package/dist/es/es2018/types/src/generated/types/SemanticInsightsSettingsOutputRepresentation.d.ts +43 -0
- package/dist/es/es2018/types/src/generated/types/SemanticLogicalViewCollectionOutputRepresentation.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/types/SemanticLogicalViewInputRepresentation.d.ts +49 -0
- package/dist/es/es2018/types/src/generated/types/SemanticLogicalViewOutputRepresentation.d.ts +64 -0
- package/dist/es/es2018/types/src/generated/types/SemanticLogicalViewPartialInputRepresentation.d.ts +43 -0
- package/dist/es/es2018/types/src/generated/types/SemanticMeasurementCollectionOutputRepresentation.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/types/SemanticMeasurementInputRepresentation.d.ts +64 -0
- package/dist/es/es2018/types/src/generated/types/SemanticMeasurementOutputRepresentation.d.ts +79 -0
- package/dist/es/es2018/types/src/generated/types/SemanticMetricCollectionOutputRepresentation.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/types/SemanticMetricInputRepresentation.d.ts +58 -0
- package/dist/es/es2018/types/src/generated/types/SemanticMetricOutputRepresentation.d.ts +73 -0
- package/dist/es/es2018/types/src/generated/types/SemanticModelCollectionOutputRepresentation.d.ts +44 -0
- package/dist/es/es2018/types/src/generated/types/SemanticModelInputRepresentation.d.ts +70 -0
- package/dist/es/es2018/types/src/generated/types/SemanticModelOutputRepresentation.d.ts +117 -0
- package/dist/es/es2018/types/src/generated/types/SemanticModelPartialInputRepresentation.d.ts +46 -0
- package/dist/es/es2018/types/src/generated/types/SemanticModelPartialOutputRepresentation.d.ts +76 -0
- package/dist/es/es2018/types/src/generated/types/SemanticParameterCollectionOutputRepresentation.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/types/SemanticParameterInputRepresentation.d.ts +58 -0
- package/dist/es/es2018/types/src/generated/types/SemanticParameterOutputRepresentation.d.ts +70 -0
- package/dist/es/es2018/types/src/generated/types/SemanticRelationshipCollectionOutputRepresentation.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/types/SemanticRelationshipCriteriaInputRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/SemanticRelationshipCriteriaOutputRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/SemanticRelationshipInputRepresentation.d.ts +58 -0
- package/dist/es/es2018/types/src/generated/types/SemanticRelationshipOutputRepresentation.d.ts +71 -0
- package/dist/es/es2018/types/src/generated/types/SemanticValidationOutputRepresentation.d.ts +38 -0
- package/dist/es/es2018/types/src/generated/types/type-utils.d.ts +32 -0
- package/package.json +66 -0
- package/sfdc/index.d.ts +1 -0
- package/sfdc/index.js +4584 -0
- package/src/raml/api.raml +2307 -0
- package/src/raml/luvio.raml +32 -0
package/sfdc/index.js
ADDED
|
@@ -0,0 +1,4584 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2022, Salesforce, Inc.,
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* For full license text, see the LICENSE.txt file
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
* ATTENTION!
|
|
9
|
+
* THIS IS A GENERATED FILE FROM https://github.com/salesforce-experience-platform-emu/lds-lightning-platform
|
|
10
|
+
* If you would like to contribute to LDS, please follow the steps outlined in the git repo.
|
|
11
|
+
* Any changes made to this file in p4 will be automatically overwritten.
|
|
12
|
+
* *******************************************************************************************
|
|
13
|
+
*/
|
|
14
|
+
/* proxy-compat-disable */
|
|
15
|
+
import { createInstrumentedAdapter, createLDSAdapter, createWireAdapterConstructor, createImperativeAdapter } from 'force/ldsBindings';
|
|
16
|
+
import { withDefaultLuvio } from 'force/ldsEngine';
|
|
17
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$2, typeCheckConfig as typeCheckConfig$2, createResourceParams as createResourceParams$2 } from 'force/luvioEngine';
|
|
18
|
+
|
|
19
|
+
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
20
|
+
const { keys: ObjectKeys, create: ObjectCreate } = Object;
|
|
21
|
+
const { isArray: ArrayIsArray$1 } = Array;
|
|
22
|
+
/**
|
|
23
|
+
* Validates an adapter config is well-formed.
|
|
24
|
+
* @param config The config to validate.
|
|
25
|
+
* @param adapter The adapter validation configuration.
|
|
26
|
+
* @param oneOf The keys the config must contain at least one of.
|
|
27
|
+
* @throws A TypeError if config doesn't satisfy the adapter's config validation.
|
|
28
|
+
*/
|
|
29
|
+
function validateConfig(config, adapter, oneOf) {
|
|
30
|
+
const { displayName } = adapter;
|
|
31
|
+
const { required, optional, unsupported } = adapter.parameters;
|
|
32
|
+
if (config === undefined ||
|
|
33
|
+
required.every(req => ObjectPrototypeHasOwnProperty.call(config, req)) === false) {
|
|
34
|
+
throw new TypeError(`adapter ${displayName} configuration must specify ${required.sort().join(', ')}`);
|
|
35
|
+
}
|
|
36
|
+
if (oneOf && oneOf.some(req => ObjectPrototypeHasOwnProperty.call(config, req)) === false) {
|
|
37
|
+
throw new TypeError(`adapter ${displayName} configuration must specify one of ${oneOf.sort().join(', ')}`);
|
|
38
|
+
}
|
|
39
|
+
if (unsupported !== undefined &&
|
|
40
|
+
unsupported.some(req => ObjectPrototypeHasOwnProperty.call(config, req))) {
|
|
41
|
+
throw new TypeError(`adapter ${displayName} does not yet support ${unsupported.sort().join(', ')}`);
|
|
42
|
+
}
|
|
43
|
+
const supported = required.concat(optional);
|
|
44
|
+
if (ObjectKeys(config).some(key => !supported.includes(key))) {
|
|
45
|
+
throw new TypeError(`adapter ${displayName} configuration supports only ${supported.sort().join(', ')}`);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
function untrustedIsObject(untrusted) {
|
|
49
|
+
return typeof untrusted === 'object' && untrusted !== null && ArrayIsArray$1(untrusted) === false;
|
|
50
|
+
}
|
|
51
|
+
function areRequiredParametersPresent(config, configPropertyNames) {
|
|
52
|
+
return configPropertyNames.parameters.required.every(req => req in config);
|
|
53
|
+
}
|
|
54
|
+
const snapshotRefreshOptions = {
|
|
55
|
+
overrides: {
|
|
56
|
+
headers: {
|
|
57
|
+
'Cache-Control': 'no-cache',
|
|
58
|
+
},
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
function generateParamConfigMetadata(name, required, resourceType, typeCheckShape, isArrayShape = false, coerceFn) {
|
|
62
|
+
return {
|
|
63
|
+
name,
|
|
64
|
+
required,
|
|
65
|
+
resourceType,
|
|
66
|
+
typeCheckShape,
|
|
67
|
+
isArrayShape,
|
|
68
|
+
coerceFn,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
function buildAdapterValidationConfig(displayName, paramsMeta) {
|
|
72
|
+
const required = paramsMeta.filter(p => p.required).map(p => p.name);
|
|
73
|
+
const optional = paramsMeta.filter(p => !p.required).map(p => p.name);
|
|
74
|
+
return {
|
|
75
|
+
displayName,
|
|
76
|
+
parameters: {
|
|
77
|
+
required,
|
|
78
|
+
optional,
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
const keyPrefix = 'SemanticAuthoring';
|
|
83
|
+
|
|
84
|
+
const { isArray: ArrayIsArray } = Array;
|
|
85
|
+
const { stringify: JSONStringify } = JSON;
|
|
86
|
+
function createLink(ref) {
|
|
87
|
+
return {
|
|
88
|
+
__ref: serializeStructuredKey(ref),
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function validate$j(obj, path = 'SemanticBaseModelOutputRepresentation') {
|
|
93
|
+
const v_error = (() => {
|
|
94
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
95
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
96
|
+
}
|
|
97
|
+
const obj_apiName = obj.apiName;
|
|
98
|
+
const path_apiName = path + '.apiName';
|
|
99
|
+
if (typeof obj_apiName !== 'string') {
|
|
100
|
+
return new TypeError('Expected "string" but received "' + typeof obj_apiName + '" (at "' + path_apiName + '")');
|
|
101
|
+
}
|
|
102
|
+
if (obj.label !== undefined) {
|
|
103
|
+
const obj_label = obj.label;
|
|
104
|
+
const path_label = path + '.label';
|
|
105
|
+
let obj_label_union0 = null;
|
|
106
|
+
const obj_label_union0_error = (() => {
|
|
107
|
+
if (typeof obj_label !== 'string') {
|
|
108
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
109
|
+
}
|
|
110
|
+
})();
|
|
111
|
+
if (obj_label_union0_error != null) {
|
|
112
|
+
obj_label_union0 = obj_label_union0_error.message;
|
|
113
|
+
}
|
|
114
|
+
let obj_label_union1 = null;
|
|
115
|
+
const obj_label_union1_error = (() => {
|
|
116
|
+
if (obj_label !== null) {
|
|
117
|
+
return new TypeError('Expected "null" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
118
|
+
}
|
|
119
|
+
})();
|
|
120
|
+
if (obj_label_union1_error != null) {
|
|
121
|
+
obj_label_union1 = obj_label_union1_error.message;
|
|
122
|
+
}
|
|
123
|
+
if (obj_label_union0 && obj_label_union1) {
|
|
124
|
+
let message = 'Object doesn\'t match union (at "' + path_label + '")';
|
|
125
|
+
message += '\n' + obj_label_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
126
|
+
message += '\n' + obj_label_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
127
|
+
return new TypeError(message);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
})();
|
|
131
|
+
return v_error === undefined ? null : v_error;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
function validate$i(obj, path = 'SemanticFilterOutputRepresentation') {
|
|
135
|
+
const v_error = (() => {
|
|
136
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
137
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
138
|
+
}
|
|
139
|
+
const obj_fieldName = obj.fieldName;
|
|
140
|
+
const path_fieldName = path + '.fieldName';
|
|
141
|
+
let obj_fieldName_union0 = null;
|
|
142
|
+
const obj_fieldName_union0_error = (() => {
|
|
143
|
+
if (typeof obj_fieldName !== 'string') {
|
|
144
|
+
return new TypeError('Expected "string" but received "' + typeof obj_fieldName + '" (at "' + path_fieldName + '")');
|
|
145
|
+
}
|
|
146
|
+
})();
|
|
147
|
+
if (obj_fieldName_union0_error != null) {
|
|
148
|
+
obj_fieldName_union0 = obj_fieldName_union0_error.message;
|
|
149
|
+
}
|
|
150
|
+
let obj_fieldName_union1 = null;
|
|
151
|
+
const obj_fieldName_union1_error = (() => {
|
|
152
|
+
if (obj_fieldName !== null) {
|
|
153
|
+
return new TypeError('Expected "null" but received "' + typeof obj_fieldName + '" (at "' + path_fieldName + '")');
|
|
154
|
+
}
|
|
155
|
+
})();
|
|
156
|
+
if (obj_fieldName_union1_error != null) {
|
|
157
|
+
obj_fieldName_union1 = obj_fieldName_union1_error.message;
|
|
158
|
+
}
|
|
159
|
+
if (obj_fieldName_union0 && obj_fieldName_union1) {
|
|
160
|
+
let message = 'Object doesn\'t match union (at "' + path_fieldName + '")';
|
|
161
|
+
message += '\n' + obj_fieldName_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
162
|
+
message += '\n' + obj_fieldName_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
163
|
+
return new TypeError(message);
|
|
164
|
+
}
|
|
165
|
+
const obj_operator = obj.operator;
|
|
166
|
+
const path_operator = path + '.operator';
|
|
167
|
+
if (typeof obj_operator !== 'string') {
|
|
168
|
+
return new TypeError('Expected "string" but received "' + typeof obj_operator + '" (at "' + path_operator + '")');
|
|
169
|
+
}
|
|
170
|
+
const obj_value = obj.value;
|
|
171
|
+
const path_value = path + '.value';
|
|
172
|
+
let obj_value_union0 = null;
|
|
173
|
+
const obj_value_union0_error = (() => {
|
|
174
|
+
if (typeof obj_value !== 'string') {
|
|
175
|
+
return new TypeError('Expected "string" but received "' + typeof obj_value + '" (at "' + path_value + '")');
|
|
176
|
+
}
|
|
177
|
+
})();
|
|
178
|
+
if (obj_value_union0_error != null) {
|
|
179
|
+
obj_value_union0 = obj_value_union0_error.message;
|
|
180
|
+
}
|
|
181
|
+
let obj_value_union1 = null;
|
|
182
|
+
const obj_value_union1_error = (() => {
|
|
183
|
+
if (obj_value !== null) {
|
|
184
|
+
return new TypeError('Expected "null" but received "' + typeof obj_value + '" (at "' + path_value + '")');
|
|
185
|
+
}
|
|
186
|
+
})();
|
|
187
|
+
if (obj_value_union1_error != null) {
|
|
188
|
+
obj_value_union1 = obj_value_union1_error.message;
|
|
189
|
+
}
|
|
190
|
+
if (obj_value_union0 && obj_value_union1) {
|
|
191
|
+
let message = 'Object doesn\'t match union (at "' + path_value + '")';
|
|
192
|
+
message += '\n' + obj_value_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
193
|
+
message += '\n' + obj_value_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
194
|
+
return new TypeError(message);
|
|
195
|
+
}
|
|
196
|
+
})();
|
|
197
|
+
return v_error === undefined ? null : v_error;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
function validate$h(obj, path = 'SemanticCalculatedDimensionOutputRepresentation') {
|
|
201
|
+
const v_error = (() => {
|
|
202
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
203
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
204
|
+
}
|
|
205
|
+
const obj_apiName = obj.apiName;
|
|
206
|
+
const path_apiName = path + '.apiName';
|
|
207
|
+
if (typeof obj_apiName !== 'string') {
|
|
208
|
+
return new TypeError('Expected "string" but received "' + typeof obj_apiName + '" (at "' + path_apiName + '")');
|
|
209
|
+
}
|
|
210
|
+
const obj_createdBy = obj.createdBy;
|
|
211
|
+
const path_createdBy = path + '.createdBy';
|
|
212
|
+
if (typeof obj_createdBy !== 'string') {
|
|
213
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdBy + '" (at "' + path_createdBy + '")');
|
|
214
|
+
}
|
|
215
|
+
const obj_createdDate = obj.createdDate;
|
|
216
|
+
const path_createdDate = path + '.createdDate';
|
|
217
|
+
if (typeof obj_createdDate !== 'string') {
|
|
218
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
|
|
219
|
+
}
|
|
220
|
+
const obj_dataType = obj.dataType;
|
|
221
|
+
const path_dataType = path + '.dataType';
|
|
222
|
+
if (typeof obj_dataType !== 'string') {
|
|
223
|
+
return new TypeError('Expected "string" but received "' + typeof obj_dataType + '" (at "' + path_dataType + '")');
|
|
224
|
+
}
|
|
225
|
+
if (obj.decimalPlace !== undefined) {
|
|
226
|
+
const obj_decimalPlace = obj.decimalPlace;
|
|
227
|
+
const path_decimalPlace = path + '.decimalPlace';
|
|
228
|
+
let obj_decimalPlace_union0 = null;
|
|
229
|
+
const obj_decimalPlace_union0_error = (() => {
|
|
230
|
+
if (typeof obj_decimalPlace !== 'number' || (typeof obj_decimalPlace === 'number' && Math.floor(obj_decimalPlace) !== obj_decimalPlace)) {
|
|
231
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_decimalPlace + '" (at "' + path_decimalPlace + '")');
|
|
232
|
+
}
|
|
233
|
+
})();
|
|
234
|
+
if (obj_decimalPlace_union0_error != null) {
|
|
235
|
+
obj_decimalPlace_union0 = obj_decimalPlace_union0_error.message;
|
|
236
|
+
}
|
|
237
|
+
let obj_decimalPlace_union1 = null;
|
|
238
|
+
const obj_decimalPlace_union1_error = (() => {
|
|
239
|
+
if (obj_decimalPlace !== null) {
|
|
240
|
+
return new TypeError('Expected "null" but received "' + typeof obj_decimalPlace + '" (at "' + path_decimalPlace + '")');
|
|
241
|
+
}
|
|
242
|
+
})();
|
|
243
|
+
if (obj_decimalPlace_union1_error != null) {
|
|
244
|
+
obj_decimalPlace_union1 = obj_decimalPlace_union1_error.message;
|
|
245
|
+
}
|
|
246
|
+
if (obj_decimalPlace_union0 && obj_decimalPlace_union1) {
|
|
247
|
+
let message = 'Object doesn\'t match union (at "' + path_decimalPlace + '")';
|
|
248
|
+
message += '\n' + obj_decimalPlace_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
249
|
+
message += '\n' + obj_decimalPlace_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
250
|
+
return new TypeError(message);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
if (obj.description !== undefined) {
|
|
254
|
+
const obj_description = obj.description;
|
|
255
|
+
const path_description = path + '.description';
|
|
256
|
+
let obj_description_union0 = null;
|
|
257
|
+
const obj_description_union0_error = (() => {
|
|
258
|
+
if (typeof obj_description !== 'string') {
|
|
259
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
260
|
+
}
|
|
261
|
+
})();
|
|
262
|
+
if (obj_description_union0_error != null) {
|
|
263
|
+
obj_description_union0 = obj_description_union0_error.message;
|
|
264
|
+
}
|
|
265
|
+
let obj_description_union1 = null;
|
|
266
|
+
const obj_description_union1_error = (() => {
|
|
267
|
+
if (obj_description !== null) {
|
|
268
|
+
return new TypeError('Expected "null" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
269
|
+
}
|
|
270
|
+
})();
|
|
271
|
+
if (obj_description_union1_error != null) {
|
|
272
|
+
obj_description_union1 = obj_description_union1_error.message;
|
|
273
|
+
}
|
|
274
|
+
if (obj_description_union0 && obj_description_union1) {
|
|
275
|
+
let message = 'Object doesn\'t match union (at "' + path_description + '")';
|
|
276
|
+
message += '\n' + obj_description_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
277
|
+
message += '\n' + obj_description_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
278
|
+
return new TypeError(message);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
if (obj.displayCategory !== undefined) {
|
|
282
|
+
const obj_displayCategory = obj.displayCategory;
|
|
283
|
+
const path_displayCategory = path + '.displayCategory';
|
|
284
|
+
if (typeof obj_displayCategory !== 'string') {
|
|
285
|
+
return new TypeError('Expected "string" but received "' + typeof obj_displayCategory + '" (at "' + path_displayCategory + '")');
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
if (obj.expression !== undefined) {
|
|
289
|
+
const obj_expression = obj.expression;
|
|
290
|
+
const path_expression = path + '.expression';
|
|
291
|
+
let obj_expression_union0 = null;
|
|
292
|
+
const obj_expression_union0_error = (() => {
|
|
293
|
+
if (typeof obj_expression !== 'string') {
|
|
294
|
+
return new TypeError('Expected "string" but received "' + typeof obj_expression + '" (at "' + path_expression + '")');
|
|
295
|
+
}
|
|
296
|
+
})();
|
|
297
|
+
if (obj_expression_union0_error != null) {
|
|
298
|
+
obj_expression_union0 = obj_expression_union0_error.message;
|
|
299
|
+
}
|
|
300
|
+
let obj_expression_union1 = null;
|
|
301
|
+
const obj_expression_union1_error = (() => {
|
|
302
|
+
if (obj_expression !== null) {
|
|
303
|
+
return new TypeError('Expected "null" but received "' + typeof obj_expression + '" (at "' + path_expression + '")');
|
|
304
|
+
}
|
|
305
|
+
})();
|
|
306
|
+
if (obj_expression_union1_error != null) {
|
|
307
|
+
obj_expression_union1 = obj_expression_union1_error.message;
|
|
308
|
+
}
|
|
309
|
+
if (obj_expression_union0 && obj_expression_union1) {
|
|
310
|
+
let message = 'Object doesn\'t match union (at "' + path_expression + '")';
|
|
311
|
+
message += '\n' + obj_expression_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
312
|
+
message += '\n' + obj_expression_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
313
|
+
return new TypeError(message);
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
if (obj.filterLogic !== undefined) {
|
|
317
|
+
const obj_filterLogic = obj.filterLogic;
|
|
318
|
+
const path_filterLogic = path + '.filterLogic';
|
|
319
|
+
let obj_filterLogic_union0 = null;
|
|
320
|
+
const obj_filterLogic_union0_error = (() => {
|
|
321
|
+
if (typeof obj_filterLogic !== 'string') {
|
|
322
|
+
return new TypeError('Expected "string" but received "' + typeof obj_filterLogic + '" (at "' + path_filterLogic + '")');
|
|
323
|
+
}
|
|
324
|
+
})();
|
|
325
|
+
if (obj_filterLogic_union0_error != null) {
|
|
326
|
+
obj_filterLogic_union0 = obj_filterLogic_union0_error.message;
|
|
327
|
+
}
|
|
328
|
+
let obj_filterLogic_union1 = null;
|
|
329
|
+
const obj_filterLogic_union1_error = (() => {
|
|
330
|
+
if (obj_filterLogic !== null) {
|
|
331
|
+
return new TypeError('Expected "null" but received "' + typeof obj_filterLogic + '" (at "' + path_filterLogic + '")');
|
|
332
|
+
}
|
|
333
|
+
})();
|
|
334
|
+
if (obj_filterLogic_union1_error != null) {
|
|
335
|
+
obj_filterLogic_union1 = obj_filterLogic_union1_error.message;
|
|
336
|
+
}
|
|
337
|
+
if (obj_filterLogic_union0 && obj_filterLogic_union1) {
|
|
338
|
+
let message = 'Object doesn\'t match union (at "' + path_filterLogic + '")';
|
|
339
|
+
message += '\n' + obj_filterLogic_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
340
|
+
message += '\n' + obj_filterLogic_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
341
|
+
return new TypeError(message);
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
if (obj.filters !== undefined) {
|
|
345
|
+
const obj_filters = obj.filters;
|
|
346
|
+
const path_filters = path + '.filters';
|
|
347
|
+
if (!ArrayIsArray(obj_filters)) {
|
|
348
|
+
return new TypeError('Expected "array" but received "' + typeof obj_filters + '" (at "' + path_filters + '")');
|
|
349
|
+
}
|
|
350
|
+
for (let i = 0; i < obj_filters.length; i++) {
|
|
351
|
+
const obj_filters_item = obj_filters[i];
|
|
352
|
+
const path_filters_item = path_filters + '[' + i + ']';
|
|
353
|
+
const referencepath_filters_itemValidationError = validate$i(obj_filters_item, path_filters_item);
|
|
354
|
+
if (referencepath_filters_itemValidationError !== null) {
|
|
355
|
+
let message = 'Object doesn\'t match SemanticFilterOutputRepresentation (at "' + path_filters_item + '")\n';
|
|
356
|
+
message += referencepath_filters_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
357
|
+
return new TypeError(message);
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
if (obj.geoRole !== undefined) {
|
|
362
|
+
const obj_geoRole = obj.geoRole;
|
|
363
|
+
const path_geoRole = path + '.geoRole';
|
|
364
|
+
if (typeof obj_geoRole !== 'string') {
|
|
365
|
+
return new TypeError('Expected "string" but received "' + typeof obj_geoRole + '" (at "' + path_geoRole + '")');
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
const obj_id = obj.id;
|
|
369
|
+
const path_id = path + '.id';
|
|
370
|
+
if (typeof obj_id !== 'string') {
|
|
371
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
372
|
+
}
|
|
373
|
+
if (obj.isVisible !== undefined) {
|
|
374
|
+
const obj_isVisible = obj.isVisible;
|
|
375
|
+
const path_isVisible = path + '.isVisible';
|
|
376
|
+
let obj_isVisible_union0 = null;
|
|
377
|
+
const obj_isVisible_union0_error = (() => {
|
|
378
|
+
if (typeof obj_isVisible !== 'boolean') {
|
|
379
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isVisible + '" (at "' + path_isVisible + '")');
|
|
380
|
+
}
|
|
381
|
+
})();
|
|
382
|
+
if (obj_isVisible_union0_error != null) {
|
|
383
|
+
obj_isVisible_union0 = obj_isVisible_union0_error.message;
|
|
384
|
+
}
|
|
385
|
+
let obj_isVisible_union1 = null;
|
|
386
|
+
const obj_isVisible_union1_error = (() => {
|
|
387
|
+
if (obj_isVisible !== null) {
|
|
388
|
+
return new TypeError('Expected "null" but received "' + typeof obj_isVisible + '" (at "' + path_isVisible + '")');
|
|
389
|
+
}
|
|
390
|
+
})();
|
|
391
|
+
if (obj_isVisible_union1_error != null) {
|
|
392
|
+
obj_isVisible_union1 = obj_isVisible_union1_error.message;
|
|
393
|
+
}
|
|
394
|
+
if (obj_isVisible_union0 && obj_isVisible_union1) {
|
|
395
|
+
let message = 'Object doesn\'t match union (at "' + path_isVisible + '")';
|
|
396
|
+
message += '\n' + obj_isVisible_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
397
|
+
message += '\n' + obj_isVisible_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
398
|
+
return new TypeError(message);
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
const obj_label = obj.label;
|
|
402
|
+
const path_label = path + '.label';
|
|
403
|
+
let obj_label_union0 = null;
|
|
404
|
+
const obj_label_union0_error = (() => {
|
|
405
|
+
if (typeof obj_label !== 'string') {
|
|
406
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
407
|
+
}
|
|
408
|
+
})();
|
|
409
|
+
if (obj_label_union0_error != null) {
|
|
410
|
+
obj_label_union0 = obj_label_union0_error.message;
|
|
411
|
+
}
|
|
412
|
+
let obj_label_union1 = null;
|
|
413
|
+
const obj_label_union1_error = (() => {
|
|
414
|
+
if (obj_label !== null) {
|
|
415
|
+
return new TypeError('Expected "null" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
416
|
+
}
|
|
417
|
+
})();
|
|
418
|
+
if (obj_label_union1_error != null) {
|
|
419
|
+
obj_label_union1 = obj_label_union1_error.message;
|
|
420
|
+
}
|
|
421
|
+
if (obj_label_union0 && obj_label_union1) {
|
|
422
|
+
let message = 'Object doesn\'t match union (at "' + path_label + '")';
|
|
423
|
+
message += '\n' + obj_label_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
424
|
+
message += '\n' + obj_label_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
425
|
+
return new TypeError(message);
|
|
426
|
+
}
|
|
427
|
+
if (obj.lastModifiedBy !== undefined) {
|
|
428
|
+
const obj_lastModifiedBy = obj.lastModifiedBy;
|
|
429
|
+
const path_lastModifiedBy = path + '.lastModifiedBy';
|
|
430
|
+
let obj_lastModifiedBy_union0 = null;
|
|
431
|
+
const obj_lastModifiedBy_union0_error = (() => {
|
|
432
|
+
if (typeof obj_lastModifiedBy !== 'string') {
|
|
433
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedBy + '" (at "' + path_lastModifiedBy + '")');
|
|
434
|
+
}
|
|
435
|
+
})();
|
|
436
|
+
if (obj_lastModifiedBy_union0_error != null) {
|
|
437
|
+
obj_lastModifiedBy_union0 = obj_lastModifiedBy_union0_error.message;
|
|
438
|
+
}
|
|
439
|
+
let obj_lastModifiedBy_union1 = null;
|
|
440
|
+
const obj_lastModifiedBy_union1_error = (() => {
|
|
441
|
+
if (obj_lastModifiedBy !== null) {
|
|
442
|
+
return new TypeError('Expected "null" but received "' + typeof obj_lastModifiedBy + '" (at "' + path_lastModifiedBy + '")');
|
|
443
|
+
}
|
|
444
|
+
})();
|
|
445
|
+
if (obj_lastModifiedBy_union1_error != null) {
|
|
446
|
+
obj_lastModifiedBy_union1 = obj_lastModifiedBy_union1_error.message;
|
|
447
|
+
}
|
|
448
|
+
if (obj_lastModifiedBy_union0 && obj_lastModifiedBy_union1) {
|
|
449
|
+
let message = 'Object doesn\'t match union (at "' + path_lastModifiedBy + '")';
|
|
450
|
+
message += '\n' + obj_lastModifiedBy_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
451
|
+
message += '\n' + obj_lastModifiedBy_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
452
|
+
return new TypeError(message);
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
if (obj.lastModifiedDate !== undefined) {
|
|
456
|
+
const obj_lastModifiedDate = obj.lastModifiedDate;
|
|
457
|
+
const path_lastModifiedDate = path + '.lastModifiedDate';
|
|
458
|
+
let obj_lastModifiedDate_union0 = null;
|
|
459
|
+
const obj_lastModifiedDate_union0_error = (() => {
|
|
460
|
+
if (typeof obj_lastModifiedDate !== 'string') {
|
|
461
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
|
|
462
|
+
}
|
|
463
|
+
})();
|
|
464
|
+
if (obj_lastModifiedDate_union0_error != null) {
|
|
465
|
+
obj_lastModifiedDate_union0 = obj_lastModifiedDate_union0_error.message;
|
|
466
|
+
}
|
|
467
|
+
let obj_lastModifiedDate_union1 = null;
|
|
468
|
+
const obj_lastModifiedDate_union1_error = (() => {
|
|
469
|
+
if (obj_lastModifiedDate !== null) {
|
|
470
|
+
return new TypeError('Expected "null" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
|
|
471
|
+
}
|
|
472
|
+
})();
|
|
473
|
+
if (obj_lastModifiedDate_union1_error != null) {
|
|
474
|
+
obj_lastModifiedDate_union1 = obj_lastModifiedDate_union1_error.message;
|
|
475
|
+
}
|
|
476
|
+
if (obj_lastModifiedDate_union0 && obj_lastModifiedDate_union1) {
|
|
477
|
+
let message = 'Object doesn\'t match union (at "' + path_lastModifiedDate + '")';
|
|
478
|
+
message += '\n' + obj_lastModifiedDate_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
479
|
+
message += '\n' + obj_lastModifiedDate_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
480
|
+
return new TypeError(message);
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
if (obj.sortOrder !== undefined) {
|
|
484
|
+
const obj_sortOrder = obj.sortOrder;
|
|
485
|
+
const path_sortOrder = path + '.sortOrder';
|
|
486
|
+
if (typeof obj_sortOrder !== 'string') {
|
|
487
|
+
return new TypeError('Expected "string" but received "' + typeof obj_sortOrder + '" (at "' + path_sortOrder + '")');
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
if (obj.syntax !== undefined) {
|
|
491
|
+
const obj_syntax = obj.syntax;
|
|
492
|
+
const path_syntax = path + '.syntax';
|
|
493
|
+
if (typeof obj_syntax !== 'string') {
|
|
494
|
+
return new TypeError('Expected "string" but received "' + typeof obj_syntax + '" (at "' + path_syntax + '")');
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
})();
|
|
498
|
+
return v_error === undefined ? null : v_error;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
function validate$g(obj, path = 'SemanticCalculatedMeasurementOutputRepresentation') {
|
|
502
|
+
const v_error = (() => {
|
|
503
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
504
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
505
|
+
}
|
|
506
|
+
if (obj.aggregationType !== undefined) {
|
|
507
|
+
const obj_aggregationType = obj.aggregationType;
|
|
508
|
+
const path_aggregationType = path + '.aggregationType';
|
|
509
|
+
if (typeof obj_aggregationType !== 'string') {
|
|
510
|
+
return new TypeError('Expected "string" but received "' + typeof obj_aggregationType + '" (at "' + path_aggregationType + '")');
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
const obj_apiName = obj.apiName;
|
|
514
|
+
const path_apiName = path + '.apiName';
|
|
515
|
+
if (typeof obj_apiName !== 'string') {
|
|
516
|
+
return new TypeError('Expected "string" but received "' + typeof obj_apiName + '" (at "' + path_apiName + '")');
|
|
517
|
+
}
|
|
518
|
+
const obj_createdBy = obj.createdBy;
|
|
519
|
+
const path_createdBy = path + '.createdBy';
|
|
520
|
+
if (typeof obj_createdBy !== 'string') {
|
|
521
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdBy + '" (at "' + path_createdBy + '")');
|
|
522
|
+
}
|
|
523
|
+
const obj_createdDate = obj.createdDate;
|
|
524
|
+
const path_createdDate = path + '.createdDate';
|
|
525
|
+
if (typeof obj_createdDate !== 'string') {
|
|
526
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
|
|
527
|
+
}
|
|
528
|
+
const obj_dataType = obj.dataType;
|
|
529
|
+
const path_dataType = path + '.dataType';
|
|
530
|
+
if (typeof obj_dataType !== 'string') {
|
|
531
|
+
return new TypeError('Expected "string" but received "' + typeof obj_dataType + '" (at "' + path_dataType + '")');
|
|
532
|
+
}
|
|
533
|
+
if (obj.decimalPlace !== undefined) {
|
|
534
|
+
const obj_decimalPlace = obj.decimalPlace;
|
|
535
|
+
const path_decimalPlace = path + '.decimalPlace';
|
|
536
|
+
let obj_decimalPlace_union0 = null;
|
|
537
|
+
const obj_decimalPlace_union0_error = (() => {
|
|
538
|
+
if (typeof obj_decimalPlace !== 'number' || (typeof obj_decimalPlace === 'number' && Math.floor(obj_decimalPlace) !== obj_decimalPlace)) {
|
|
539
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_decimalPlace + '" (at "' + path_decimalPlace + '")');
|
|
540
|
+
}
|
|
541
|
+
})();
|
|
542
|
+
if (obj_decimalPlace_union0_error != null) {
|
|
543
|
+
obj_decimalPlace_union0 = obj_decimalPlace_union0_error.message;
|
|
544
|
+
}
|
|
545
|
+
let obj_decimalPlace_union1 = null;
|
|
546
|
+
const obj_decimalPlace_union1_error = (() => {
|
|
547
|
+
if (obj_decimalPlace !== null) {
|
|
548
|
+
return new TypeError('Expected "null" but received "' + typeof obj_decimalPlace + '" (at "' + path_decimalPlace + '")');
|
|
549
|
+
}
|
|
550
|
+
})();
|
|
551
|
+
if (obj_decimalPlace_union1_error != null) {
|
|
552
|
+
obj_decimalPlace_union1 = obj_decimalPlace_union1_error.message;
|
|
553
|
+
}
|
|
554
|
+
if (obj_decimalPlace_union0 && obj_decimalPlace_union1) {
|
|
555
|
+
let message = 'Object doesn\'t match union (at "' + path_decimalPlace + '")';
|
|
556
|
+
message += '\n' + obj_decimalPlace_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
557
|
+
message += '\n' + obj_decimalPlace_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
558
|
+
return new TypeError(message);
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
if (obj.description !== undefined) {
|
|
562
|
+
const obj_description = obj.description;
|
|
563
|
+
const path_description = path + '.description';
|
|
564
|
+
let obj_description_union0 = null;
|
|
565
|
+
const obj_description_union0_error = (() => {
|
|
566
|
+
if (typeof obj_description !== 'string') {
|
|
567
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
568
|
+
}
|
|
569
|
+
})();
|
|
570
|
+
if (obj_description_union0_error != null) {
|
|
571
|
+
obj_description_union0 = obj_description_union0_error.message;
|
|
572
|
+
}
|
|
573
|
+
let obj_description_union1 = null;
|
|
574
|
+
const obj_description_union1_error = (() => {
|
|
575
|
+
if (obj_description !== null) {
|
|
576
|
+
return new TypeError('Expected "null" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
577
|
+
}
|
|
578
|
+
})();
|
|
579
|
+
if (obj_description_union1_error != null) {
|
|
580
|
+
obj_description_union1 = obj_description_union1_error.message;
|
|
581
|
+
}
|
|
582
|
+
if (obj_description_union0 && obj_description_union1) {
|
|
583
|
+
let message = 'Object doesn\'t match union (at "' + path_description + '")';
|
|
584
|
+
message += '\n' + obj_description_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
585
|
+
message += '\n' + obj_description_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
586
|
+
return new TypeError(message);
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
if (obj.directionality !== undefined) {
|
|
590
|
+
const obj_directionality = obj.directionality;
|
|
591
|
+
const path_directionality = path + '.directionality';
|
|
592
|
+
if (typeof obj_directionality !== 'string') {
|
|
593
|
+
return new TypeError('Expected "string" but received "' + typeof obj_directionality + '" (at "' + path_directionality + '")');
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
if (obj.displayCategory !== undefined) {
|
|
597
|
+
const obj_displayCategory = obj.displayCategory;
|
|
598
|
+
const path_displayCategory = path + '.displayCategory';
|
|
599
|
+
if (typeof obj_displayCategory !== 'string') {
|
|
600
|
+
return new TypeError('Expected "string" but received "' + typeof obj_displayCategory + '" (at "' + path_displayCategory + '")');
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
if (obj.expression !== undefined) {
|
|
604
|
+
const obj_expression = obj.expression;
|
|
605
|
+
const path_expression = path + '.expression';
|
|
606
|
+
let obj_expression_union0 = null;
|
|
607
|
+
const obj_expression_union0_error = (() => {
|
|
608
|
+
if (typeof obj_expression !== 'string') {
|
|
609
|
+
return new TypeError('Expected "string" but received "' + typeof obj_expression + '" (at "' + path_expression + '")');
|
|
610
|
+
}
|
|
611
|
+
})();
|
|
612
|
+
if (obj_expression_union0_error != null) {
|
|
613
|
+
obj_expression_union0 = obj_expression_union0_error.message;
|
|
614
|
+
}
|
|
615
|
+
let obj_expression_union1 = null;
|
|
616
|
+
const obj_expression_union1_error = (() => {
|
|
617
|
+
if (obj_expression !== null) {
|
|
618
|
+
return new TypeError('Expected "null" but received "' + typeof obj_expression + '" (at "' + path_expression + '")');
|
|
619
|
+
}
|
|
620
|
+
})();
|
|
621
|
+
if (obj_expression_union1_error != null) {
|
|
622
|
+
obj_expression_union1 = obj_expression_union1_error.message;
|
|
623
|
+
}
|
|
624
|
+
if (obj_expression_union0 && obj_expression_union1) {
|
|
625
|
+
let message = 'Object doesn\'t match union (at "' + path_expression + '")';
|
|
626
|
+
message += '\n' + obj_expression_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
627
|
+
message += '\n' + obj_expression_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
628
|
+
return new TypeError(message);
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
if (obj.filterLogic !== undefined) {
|
|
632
|
+
const obj_filterLogic = obj.filterLogic;
|
|
633
|
+
const path_filterLogic = path + '.filterLogic';
|
|
634
|
+
let obj_filterLogic_union0 = null;
|
|
635
|
+
const obj_filterLogic_union0_error = (() => {
|
|
636
|
+
if (typeof obj_filterLogic !== 'string') {
|
|
637
|
+
return new TypeError('Expected "string" but received "' + typeof obj_filterLogic + '" (at "' + path_filterLogic + '")');
|
|
638
|
+
}
|
|
639
|
+
})();
|
|
640
|
+
if (obj_filterLogic_union0_error != null) {
|
|
641
|
+
obj_filterLogic_union0 = obj_filterLogic_union0_error.message;
|
|
642
|
+
}
|
|
643
|
+
let obj_filterLogic_union1 = null;
|
|
644
|
+
const obj_filterLogic_union1_error = (() => {
|
|
645
|
+
if (obj_filterLogic !== null) {
|
|
646
|
+
return new TypeError('Expected "null" but received "' + typeof obj_filterLogic + '" (at "' + path_filterLogic + '")');
|
|
647
|
+
}
|
|
648
|
+
})();
|
|
649
|
+
if (obj_filterLogic_union1_error != null) {
|
|
650
|
+
obj_filterLogic_union1 = obj_filterLogic_union1_error.message;
|
|
651
|
+
}
|
|
652
|
+
if (obj_filterLogic_union0 && obj_filterLogic_union1) {
|
|
653
|
+
let message = 'Object doesn\'t match union (at "' + path_filterLogic + '")';
|
|
654
|
+
message += '\n' + obj_filterLogic_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
655
|
+
message += '\n' + obj_filterLogic_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
656
|
+
return new TypeError(message);
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
if (obj.filters !== undefined) {
|
|
660
|
+
const obj_filters = obj.filters;
|
|
661
|
+
const path_filters = path + '.filters';
|
|
662
|
+
if (!ArrayIsArray(obj_filters)) {
|
|
663
|
+
return new TypeError('Expected "array" but received "' + typeof obj_filters + '" (at "' + path_filters + '")');
|
|
664
|
+
}
|
|
665
|
+
for (let i = 0; i < obj_filters.length; i++) {
|
|
666
|
+
const obj_filters_item = obj_filters[i];
|
|
667
|
+
const path_filters_item = path_filters + '[' + i + ']';
|
|
668
|
+
const referencepath_filters_itemValidationError = validate$i(obj_filters_item, path_filters_item);
|
|
669
|
+
if (referencepath_filters_itemValidationError !== null) {
|
|
670
|
+
let message = 'Object doesn\'t match SemanticFilterOutputRepresentation (at "' + path_filters_item + '")\n';
|
|
671
|
+
message += referencepath_filters_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
672
|
+
return new TypeError(message);
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
const obj_id = obj.id;
|
|
677
|
+
const path_id = path + '.id';
|
|
678
|
+
if (typeof obj_id !== 'string') {
|
|
679
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
680
|
+
}
|
|
681
|
+
if (obj.isAggregatable !== undefined) {
|
|
682
|
+
const obj_isAggregatable = obj.isAggregatable;
|
|
683
|
+
const path_isAggregatable = path + '.isAggregatable';
|
|
684
|
+
let obj_isAggregatable_union0 = null;
|
|
685
|
+
const obj_isAggregatable_union0_error = (() => {
|
|
686
|
+
if (typeof obj_isAggregatable !== 'boolean') {
|
|
687
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isAggregatable + '" (at "' + path_isAggregatable + '")');
|
|
688
|
+
}
|
|
689
|
+
})();
|
|
690
|
+
if (obj_isAggregatable_union0_error != null) {
|
|
691
|
+
obj_isAggregatable_union0 = obj_isAggregatable_union0_error.message;
|
|
692
|
+
}
|
|
693
|
+
let obj_isAggregatable_union1 = null;
|
|
694
|
+
const obj_isAggregatable_union1_error = (() => {
|
|
695
|
+
if (obj_isAggregatable !== null) {
|
|
696
|
+
return new TypeError('Expected "null" but received "' + typeof obj_isAggregatable + '" (at "' + path_isAggregatable + '")');
|
|
697
|
+
}
|
|
698
|
+
})();
|
|
699
|
+
if (obj_isAggregatable_union1_error != null) {
|
|
700
|
+
obj_isAggregatable_union1 = obj_isAggregatable_union1_error.message;
|
|
701
|
+
}
|
|
702
|
+
if (obj_isAggregatable_union0 && obj_isAggregatable_union1) {
|
|
703
|
+
let message = 'Object doesn\'t match union (at "' + path_isAggregatable + '")';
|
|
704
|
+
message += '\n' + obj_isAggregatable_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
705
|
+
message += '\n' + obj_isAggregatable_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
706
|
+
return new TypeError(message);
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
if (obj.isVisible !== undefined) {
|
|
710
|
+
const obj_isVisible = obj.isVisible;
|
|
711
|
+
const path_isVisible = path + '.isVisible';
|
|
712
|
+
let obj_isVisible_union0 = null;
|
|
713
|
+
const obj_isVisible_union0_error = (() => {
|
|
714
|
+
if (typeof obj_isVisible !== 'boolean') {
|
|
715
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isVisible + '" (at "' + path_isVisible + '")');
|
|
716
|
+
}
|
|
717
|
+
})();
|
|
718
|
+
if (obj_isVisible_union0_error != null) {
|
|
719
|
+
obj_isVisible_union0 = obj_isVisible_union0_error.message;
|
|
720
|
+
}
|
|
721
|
+
let obj_isVisible_union1 = null;
|
|
722
|
+
const obj_isVisible_union1_error = (() => {
|
|
723
|
+
if (obj_isVisible !== null) {
|
|
724
|
+
return new TypeError('Expected "null" but received "' + typeof obj_isVisible + '" (at "' + path_isVisible + '")');
|
|
725
|
+
}
|
|
726
|
+
})();
|
|
727
|
+
if (obj_isVisible_union1_error != null) {
|
|
728
|
+
obj_isVisible_union1 = obj_isVisible_union1_error.message;
|
|
729
|
+
}
|
|
730
|
+
if (obj_isVisible_union0 && obj_isVisible_union1) {
|
|
731
|
+
let message = 'Object doesn\'t match union (at "' + path_isVisible + '")';
|
|
732
|
+
message += '\n' + obj_isVisible_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
733
|
+
message += '\n' + obj_isVisible_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
734
|
+
return new TypeError(message);
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
const obj_label = obj.label;
|
|
738
|
+
const path_label = path + '.label';
|
|
739
|
+
let obj_label_union0 = null;
|
|
740
|
+
const obj_label_union0_error = (() => {
|
|
741
|
+
if (typeof obj_label !== 'string') {
|
|
742
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
743
|
+
}
|
|
744
|
+
})();
|
|
745
|
+
if (obj_label_union0_error != null) {
|
|
746
|
+
obj_label_union0 = obj_label_union0_error.message;
|
|
747
|
+
}
|
|
748
|
+
let obj_label_union1 = null;
|
|
749
|
+
const obj_label_union1_error = (() => {
|
|
750
|
+
if (obj_label !== null) {
|
|
751
|
+
return new TypeError('Expected "null" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
752
|
+
}
|
|
753
|
+
})();
|
|
754
|
+
if (obj_label_union1_error != null) {
|
|
755
|
+
obj_label_union1 = obj_label_union1_error.message;
|
|
756
|
+
}
|
|
757
|
+
if (obj_label_union0 && obj_label_union1) {
|
|
758
|
+
let message = 'Object doesn\'t match union (at "' + path_label + '")';
|
|
759
|
+
message += '\n' + obj_label_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
760
|
+
message += '\n' + obj_label_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
761
|
+
return new TypeError(message);
|
|
762
|
+
}
|
|
763
|
+
if (obj.lastModifiedBy !== undefined) {
|
|
764
|
+
const obj_lastModifiedBy = obj.lastModifiedBy;
|
|
765
|
+
const path_lastModifiedBy = path + '.lastModifiedBy';
|
|
766
|
+
let obj_lastModifiedBy_union0 = null;
|
|
767
|
+
const obj_lastModifiedBy_union0_error = (() => {
|
|
768
|
+
if (typeof obj_lastModifiedBy !== 'string') {
|
|
769
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedBy + '" (at "' + path_lastModifiedBy + '")');
|
|
770
|
+
}
|
|
771
|
+
})();
|
|
772
|
+
if (obj_lastModifiedBy_union0_error != null) {
|
|
773
|
+
obj_lastModifiedBy_union0 = obj_lastModifiedBy_union0_error.message;
|
|
774
|
+
}
|
|
775
|
+
let obj_lastModifiedBy_union1 = null;
|
|
776
|
+
const obj_lastModifiedBy_union1_error = (() => {
|
|
777
|
+
if (obj_lastModifiedBy !== null) {
|
|
778
|
+
return new TypeError('Expected "null" but received "' + typeof obj_lastModifiedBy + '" (at "' + path_lastModifiedBy + '")');
|
|
779
|
+
}
|
|
780
|
+
})();
|
|
781
|
+
if (obj_lastModifiedBy_union1_error != null) {
|
|
782
|
+
obj_lastModifiedBy_union1 = obj_lastModifiedBy_union1_error.message;
|
|
783
|
+
}
|
|
784
|
+
if (obj_lastModifiedBy_union0 && obj_lastModifiedBy_union1) {
|
|
785
|
+
let message = 'Object doesn\'t match union (at "' + path_lastModifiedBy + '")';
|
|
786
|
+
message += '\n' + obj_lastModifiedBy_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
787
|
+
message += '\n' + obj_lastModifiedBy_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
788
|
+
return new TypeError(message);
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
if (obj.lastModifiedDate !== undefined) {
|
|
792
|
+
const obj_lastModifiedDate = obj.lastModifiedDate;
|
|
793
|
+
const path_lastModifiedDate = path + '.lastModifiedDate';
|
|
794
|
+
let obj_lastModifiedDate_union0 = null;
|
|
795
|
+
const obj_lastModifiedDate_union0_error = (() => {
|
|
796
|
+
if (typeof obj_lastModifiedDate !== 'string') {
|
|
797
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
|
|
798
|
+
}
|
|
799
|
+
})();
|
|
800
|
+
if (obj_lastModifiedDate_union0_error != null) {
|
|
801
|
+
obj_lastModifiedDate_union0 = obj_lastModifiedDate_union0_error.message;
|
|
802
|
+
}
|
|
803
|
+
let obj_lastModifiedDate_union1 = null;
|
|
804
|
+
const obj_lastModifiedDate_union1_error = (() => {
|
|
805
|
+
if (obj_lastModifiedDate !== null) {
|
|
806
|
+
return new TypeError('Expected "null" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
|
|
807
|
+
}
|
|
808
|
+
})();
|
|
809
|
+
if (obj_lastModifiedDate_union1_error != null) {
|
|
810
|
+
obj_lastModifiedDate_union1 = obj_lastModifiedDate_union1_error.message;
|
|
811
|
+
}
|
|
812
|
+
if (obj_lastModifiedDate_union0 && obj_lastModifiedDate_union1) {
|
|
813
|
+
let message = 'Object doesn\'t match union (at "' + path_lastModifiedDate + '")';
|
|
814
|
+
message += '\n' + obj_lastModifiedDate_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
815
|
+
message += '\n' + obj_lastModifiedDate_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
816
|
+
return new TypeError(message);
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
const obj_shouldTreatNullsAsZeros = obj.shouldTreatNullsAsZeros;
|
|
820
|
+
const path_shouldTreatNullsAsZeros = path + '.shouldTreatNullsAsZeros';
|
|
821
|
+
let obj_shouldTreatNullsAsZeros_union0 = null;
|
|
822
|
+
const obj_shouldTreatNullsAsZeros_union0_error = (() => {
|
|
823
|
+
if (typeof obj_shouldTreatNullsAsZeros !== 'boolean') {
|
|
824
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_shouldTreatNullsAsZeros + '" (at "' + path_shouldTreatNullsAsZeros + '")');
|
|
825
|
+
}
|
|
826
|
+
})();
|
|
827
|
+
if (obj_shouldTreatNullsAsZeros_union0_error != null) {
|
|
828
|
+
obj_shouldTreatNullsAsZeros_union0 = obj_shouldTreatNullsAsZeros_union0_error.message;
|
|
829
|
+
}
|
|
830
|
+
let obj_shouldTreatNullsAsZeros_union1 = null;
|
|
831
|
+
const obj_shouldTreatNullsAsZeros_union1_error = (() => {
|
|
832
|
+
if (obj_shouldTreatNullsAsZeros !== null) {
|
|
833
|
+
return new TypeError('Expected "null" but received "' + typeof obj_shouldTreatNullsAsZeros + '" (at "' + path_shouldTreatNullsAsZeros + '")');
|
|
834
|
+
}
|
|
835
|
+
})();
|
|
836
|
+
if (obj_shouldTreatNullsAsZeros_union1_error != null) {
|
|
837
|
+
obj_shouldTreatNullsAsZeros_union1 = obj_shouldTreatNullsAsZeros_union1_error.message;
|
|
838
|
+
}
|
|
839
|
+
if (obj_shouldTreatNullsAsZeros_union0 && obj_shouldTreatNullsAsZeros_union1) {
|
|
840
|
+
let message = 'Object doesn\'t match union (at "' + path_shouldTreatNullsAsZeros + '")';
|
|
841
|
+
message += '\n' + obj_shouldTreatNullsAsZeros_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
842
|
+
message += '\n' + obj_shouldTreatNullsAsZeros_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
843
|
+
return new TypeError(message);
|
|
844
|
+
}
|
|
845
|
+
if (obj.sortOrder !== undefined) {
|
|
846
|
+
const obj_sortOrder = obj.sortOrder;
|
|
847
|
+
const path_sortOrder = path + '.sortOrder';
|
|
848
|
+
if (typeof obj_sortOrder !== 'string') {
|
|
849
|
+
return new TypeError('Expected "string" but received "' + typeof obj_sortOrder + '" (at "' + path_sortOrder + '")');
|
|
850
|
+
}
|
|
851
|
+
}
|
|
852
|
+
if (obj.syntax !== undefined) {
|
|
853
|
+
const obj_syntax = obj.syntax;
|
|
854
|
+
const path_syntax = path + '.syntax';
|
|
855
|
+
if (typeof obj_syntax !== 'string') {
|
|
856
|
+
return new TypeError('Expected "string" but received "' + typeof obj_syntax + '" (at "' + path_syntax + '")');
|
|
857
|
+
}
|
|
858
|
+
}
|
|
859
|
+
if (obj.totalAggregationType !== undefined) {
|
|
860
|
+
const obj_totalAggregationType = obj.totalAggregationType;
|
|
861
|
+
const path_totalAggregationType = path + '.totalAggregationType';
|
|
862
|
+
if (typeof obj_totalAggregationType !== 'string') {
|
|
863
|
+
return new TypeError('Expected "string" but received "' + typeof obj_totalAggregationType + '" (at "' + path_totalAggregationType + '")');
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
})();
|
|
867
|
+
return v_error === undefined ? null : v_error;
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
function validate$f(obj, path = 'SemanticDimensionOutputRepresentation') {
|
|
871
|
+
const v_error = (() => {
|
|
872
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
873
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
874
|
+
}
|
|
875
|
+
const obj_apiName = obj.apiName;
|
|
876
|
+
const path_apiName = path + '.apiName';
|
|
877
|
+
if (typeof obj_apiName !== 'string') {
|
|
878
|
+
return new TypeError('Expected "string" but received "' + typeof obj_apiName + '" (at "' + path_apiName + '")');
|
|
879
|
+
}
|
|
880
|
+
const obj_createdBy = obj.createdBy;
|
|
881
|
+
const path_createdBy = path + '.createdBy';
|
|
882
|
+
if (typeof obj_createdBy !== 'string') {
|
|
883
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdBy + '" (at "' + path_createdBy + '")');
|
|
884
|
+
}
|
|
885
|
+
const obj_createdDate = obj.createdDate;
|
|
886
|
+
const path_createdDate = path + '.createdDate';
|
|
887
|
+
if (typeof obj_createdDate !== 'string') {
|
|
888
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
|
|
889
|
+
}
|
|
890
|
+
const obj_dataObjectFieldName = obj.dataObjectFieldName;
|
|
891
|
+
const path_dataObjectFieldName = path + '.dataObjectFieldName';
|
|
892
|
+
let obj_dataObjectFieldName_union0 = null;
|
|
893
|
+
const obj_dataObjectFieldName_union0_error = (() => {
|
|
894
|
+
if (typeof obj_dataObjectFieldName !== 'string') {
|
|
895
|
+
return new TypeError('Expected "string" but received "' + typeof obj_dataObjectFieldName + '" (at "' + path_dataObjectFieldName + '")');
|
|
896
|
+
}
|
|
897
|
+
})();
|
|
898
|
+
if (obj_dataObjectFieldName_union0_error != null) {
|
|
899
|
+
obj_dataObjectFieldName_union0 = obj_dataObjectFieldName_union0_error.message;
|
|
900
|
+
}
|
|
901
|
+
let obj_dataObjectFieldName_union1 = null;
|
|
902
|
+
const obj_dataObjectFieldName_union1_error = (() => {
|
|
903
|
+
if (obj_dataObjectFieldName !== null) {
|
|
904
|
+
return new TypeError('Expected "null" but received "' + typeof obj_dataObjectFieldName + '" (at "' + path_dataObjectFieldName + '")');
|
|
905
|
+
}
|
|
906
|
+
})();
|
|
907
|
+
if (obj_dataObjectFieldName_union1_error != null) {
|
|
908
|
+
obj_dataObjectFieldName_union1 = obj_dataObjectFieldName_union1_error.message;
|
|
909
|
+
}
|
|
910
|
+
if (obj_dataObjectFieldName_union0 && obj_dataObjectFieldName_union1) {
|
|
911
|
+
let message = 'Object doesn\'t match union (at "' + path_dataObjectFieldName + '")';
|
|
912
|
+
message += '\n' + obj_dataObjectFieldName_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
913
|
+
message += '\n' + obj_dataObjectFieldName_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
914
|
+
return new TypeError(message);
|
|
915
|
+
}
|
|
916
|
+
const obj_dataType = obj.dataType;
|
|
917
|
+
const path_dataType = path + '.dataType';
|
|
918
|
+
if (typeof obj_dataType !== 'string') {
|
|
919
|
+
return new TypeError('Expected "string" but received "' + typeof obj_dataType + '" (at "' + path_dataType + '")');
|
|
920
|
+
}
|
|
921
|
+
if (obj.decimalPlace !== undefined) {
|
|
922
|
+
const obj_decimalPlace = obj.decimalPlace;
|
|
923
|
+
const path_decimalPlace = path + '.decimalPlace';
|
|
924
|
+
let obj_decimalPlace_union0 = null;
|
|
925
|
+
const obj_decimalPlace_union0_error = (() => {
|
|
926
|
+
if (typeof obj_decimalPlace !== 'number' || (typeof obj_decimalPlace === 'number' && Math.floor(obj_decimalPlace) !== obj_decimalPlace)) {
|
|
927
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_decimalPlace + '" (at "' + path_decimalPlace + '")');
|
|
928
|
+
}
|
|
929
|
+
})();
|
|
930
|
+
if (obj_decimalPlace_union0_error != null) {
|
|
931
|
+
obj_decimalPlace_union0 = obj_decimalPlace_union0_error.message;
|
|
932
|
+
}
|
|
933
|
+
let obj_decimalPlace_union1 = null;
|
|
934
|
+
const obj_decimalPlace_union1_error = (() => {
|
|
935
|
+
if (obj_decimalPlace !== null) {
|
|
936
|
+
return new TypeError('Expected "null" but received "' + typeof obj_decimalPlace + '" (at "' + path_decimalPlace + '")');
|
|
937
|
+
}
|
|
938
|
+
})();
|
|
939
|
+
if (obj_decimalPlace_union1_error != null) {
|
|
940
|
+
obj_decimalPlace_union1 = obj_decimalPlace_union1_error.message;
|
|
941
|
+
}
|
|
942
|
+
if (obj_decimalPlace_union0 && obj_decimalPlace_union1) {
|
|
943
|
+
let message = 'Object doesn\'t match union (at "' + path_decimalPlace + '")';
|
|
944
|
+
message += '\n' + obj_decimalPlace_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
945
|
+
message += '\n' + obj_decimalPlace_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
946
|
+
return new TypeError(message);
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
if (obj.description !== undefined) {
|
|
950
|
+
const obj_description = obj.description;
|
|
951
|
+
const path_description = path + '.description';
|
|
952
|
+
let obj_description_union0 = null;
|
|
953
|
+
const obj_description_union0_error = (() => {
|
|
954
|
+
if (typeof obj_description !== 'string') {
|
|
955
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
956
|
+
}
|
|
957
|
+
})();
|
|
958
|
+
if (obj_description_union0_error != null) {
|
|
959
|
+
obj_description_union0 = obj_description_union0_error.message;
|
|
960
|
+
}
|
|
961
|
+
let obj_description_union1 = null;
|
|
962
|
+
const obj_description_union1_error = (() => {
|
|
963
|
+
if (obj_description !== null) {
|
|
964
|
+
return new TypeError('Expected "null" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
965
|
+
}
|
|
966
|
+
})();
|
|
967
|
+
if (obj_description_union1_error != null) {
|
|
968
|
+
obj_description_union1 = obj_description_union1_error.message;
|
|
969
|
+
}
|
|
970
|
+
if (obj_description_union0 && obj_description_union1) {
|
|
971
|
+
let message = 'Object doesn\'t match union (at "' + path_description + '")';
|
|
972
|
+
message += '\n' + obj_description_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
973
|
+
message += '\n' + obj_description_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
974
|
+
return new TypeError(message);
|
|
975
|
+
}
|
|
976
|
+
}
|
|
977
|
+
if (obj.displayCategory !== undefined) {
|
|
978
|
+
const obj_displayCategory = obj.displayCategory;
|
|
979
|
+
const path_displayCategory = path + '.displayCategory';
|
|
980
|
+
if (typeof obj_displayCategory !== 'string') {
|
|
981
|
+
return new TypeError('Expected "string" but received "' + typeof obj_displayCategory + '" (at "' + path_displayCategory + '")');
|
|
982
|
+
}
|
|
983
|
+
}
|
|
984
|
+
if (obj.geoRole !== undefined) {
|
|
985
|
+
const obj_geoRole = obj.geoRole;
|
|
986
|
+
const path_geoRole = path + '.geoRole';
|
|
987
|
+
if (typeof obj_geoRole !== 'string') {
|
|
988
|
+
return new TypeError('Expected "string" but received "' + typeof obj_geoRole + '" (at "' + path_geoRole + '")');
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
const obj_id = obj.id;
|
|
992
|
+
const path_id = path + '.id';
|
|
993
|
+
if (typeof obj_id !== 'string') {
|
|
994
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
995
|
+
}
|
|
996
|
+
if (obj.isVisible !== undefined) {
|
|
997
|
+
const obj_isVisible = obj.isVisible;
|
|
998
|
+
const path_isVisible = path + '.isVisible';
|
|
999
|
+
let obj_isVisible_union0 = null;
|
|
1000
|
+
const obj_isVisible_union0_error = (() => {
|
|
1001
|
+
if (typeof obj_isVisible !== 'boolean') {
|
|
1002
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isVisible + '" (at "' + path_isVisible + '")');
|
|
1003
|
+
}
|
|
1004
|
+
})();
|
|
1005
|
+
if (obj_isVisible_union0_error != null) {
|
|
1006
|
+
obj_isVisible_union0 = obj_isVisible_union0_error.message;
|
|
1007
|
+
}
|
|
1008
|
+
let obj_isVisible_union1 = null;
|
|
1009
|
+
const obj_isVisible_union1_error = (() => {
|
|
1010
|
+
if (obj_isVisible !== null) {
|
|
1011
|
+
return new TypeError('Expected "null" but received "' + typeof obj_isVisible + '" (at "' + path_isVisible + '")');
|
|
1012
|
+
}
|
|
1013
|
+
})();
|
|
1014
|
+
if (obj_isVisible_union1_error != null) {
|
|
1015
|
+
obj_isVisible_union1 = obj_isVisible_union1_error.message;
|
|
1016
|
+
}
|
|
1017
|
+
if (obj_isVisible_union0 && obj_isVisible_union1) {
|
|
1018
|
+
let message = 'Object doesn\'t match union (at "' + path_isVisible + '")';
|
|
1019
|
+
message += '\n' + obj_isVisible_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1020
|
+
message += '\n' + obj_isVisible_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1021
|
+
return new TypeError(message);
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
1024
|
+
const obj_label = obj.label;
|
|
1025
|
+
const path_label = path + '.label';
|
|
1026
|
+
let obj_label_union0 = null;
|
|
1027
|
+
const obj_label_union0_error = (() => {
|
|
1028
|
+
if (typeof obj_label !== 'string') {
|
|
1029
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
1030
|
+
}
|
|
1031
|
+
})();
|
|
1032
|
+
if (obj_label_union0_error != null) {
|
|
1033
|
+
obj_label_union0 = obj_label_union0_error.message;
|
|
1034
|
+
}
|
|
1035
|
+
let obj_label_union1 = null;
|
|
1036
|
+
const obj_label_union1_error = (() => {
|
|
1037
|
+
if (obj_label !== null) {
|
|
1038
|
+
return new TypeError('Expected "null" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
1039
|
+
}
|
|
1040
|
+
})();
|
|
1041
|
+
if (obj_label_union1_error != null) {
|
|
1042
|
+
obj_label_union1 = obj_label_union1_error.message;
|
|
1043
|
+
}
|
|
1044
|
+
if (obj_label_union0 && obj_label_union1) {
|
|
1045
|
+
let message = 'Object doesn\'t match union (at "' + path_label + '")';
|
|
1046
|
+
message += '\n' + obj_label_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1047
|
+
message += '\n' + obj_label_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1048
|
+
return new TypeError(message);
|
|
1049
|
+
}
|
|
1050
|
+
if (obj.lastModifiedBy !== undefined) {
|
|
1051
|
+
const obj_lastModifiedBy = obj.lastModifiedBy;
|
|
1052
|
+
const path_lastModifiedBy = path + '.lastModifiedBy';
|
|
1053
|
+
let obj_lastModifiedBy_union0 = null;
|
|
1054
|
+
const obj_lastModifiedBy_union0_error = (() => {
|
|
1055
|
+
if (typeof obj_lastModifiedBy !== 'string') {
|
|
1056
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedBy + '" (at "' + path_lastModifiedBy + '")');
|
|
1057
|
+
}
|
|
1058
|
+
})();
|
|
1059
|
+
if (obj_lastModifiedBy_union0_error != null) {
|
|
1060
|
+
obj_lastModifiedBy_union0 = obj_lastModifiedBy_union0_error.message;
|
|
1061
|
+
}
|
|
1062
|
+
let obj_lastModifiedBy_union1 = null;
|
|
1063
|
+
const obj_lastModifiedBy_union1_error = (() => {
|
|
1064
|
+
if (obj_lastModifiedBy !== null) {
|
|
1065
|
+
return new TypeError('Expected "null" but received "' + typeof obj_lastModifiedBy + '" (at "' + path_lastModifiedBy + '")');
|
|
1066
|
+
}
|
|
1067
|
+
})();
|
|
1068
|
+
if (obj_lastModifiedBy_union1_error != null) {
|
|
1069
|
+
obj_lastModifiedBy_union1 = obj_lastModifiedBy_union1_error.message;
|
|
1070
|
+
}
|
|
1071
|
+
if (obj_lastModifiedBy_union0 && obj_lastModifiedBy_union1) {
|
|
1072
|
+
let message = 'Object doesn\'t match union (at "' + path_lastModifiedBy + '")';
|
|
1073
|
+
message += '\n' + obj_lastModifiedBy_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1074
|
+
message += '\n' + obj_lastModifiedBy_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1075
|
+
return new TypeError(message);
|
|
1076
|
+
}
|
|
1077
|
+
}
|
|
1078
|
+
if (obj.lastModifiedDate !== undefined) {
|
|
1079
|
+
const obj_lastModifiedDate = obj.lastModifiedDate;
|
|
1080
|
+
const path_lastModifiedDate = path + '.lastModifiedDate';
|
|
1081
|
+
let obj_lastModifiedDate_union0 = null;
|
|
1082
|
+
const obj_lastModifiedDate_union0_error = (() => {
|
|
1083
|
+
if (typeof obj_lastModifiedDate !== 'string') {
|
|
1084
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
|
|
1085
|
+
}
|
|
1086
|
+
})();
|
|
1087
|
+
if (obj_lastModifiedDate_union0_error != null) {
|
|
1088
|
+
obj_lastModifiedDate_union0 = obj_lastModifiedDate_union0_error.message;
|
|
1089
|
+
}
|
|
1090
|
+
let obj_lastModifiedDate_union1 = null;
|
|
1091
|
+
const obj_lastModifiedDate_union1_error = (() => {
|
|
1092
|
+
if (obj_lastModifiedDate !== null) {
|
|
1093
|
+
return new TypeError('Expected "null" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
|
|
1094
|
+
}
|
|
1095
|
+
})();
|
|
1096
|
+
if (obj_lastModifiedDate_union1_error != null) {
|
|
1097
|
+
obj_lastModifiedDate_union1 = obj_lastModifiedDate_union1_error.message;
|
|
1098
|
+
}
|
|
1099
|
+
if (obj_lastModifiedDate_union0 && obj_lastModifiedDate_union1) {
|
|
1100
|
+
let message = 'Object doesn\'t match union (at "' + path_lastModifiedDate + '")';
|
|
1101
|
+
message += '\n' + obj_lastModifiedDate_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1102
|
+
message += '\n' + obj_lastModifiedDate_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1103
|
+
return new TypeError(message);
|
|
1104
|
+
}
|
|
1105
|
+
}
|
|
1106
|
+
if (obj.sortOrder !== undefined) {
|
|
1107
|
+
const obj_sortOrder = obj.sortOrder;
|
|
1108
|
+
const path_sortOrder = path + '.sortOrder';
|
|
1109
|
+
if (typeof obj_sortOrder !== 'string') {
|
|
1110
|
+
return new TypeError('Expected "string" but received "' + typeof obj_sortOrder + '" (at "' + path_sortOrder + '")');
|
|
1111
|
+
}
|
|
1112
|
+
}
|
|
1113
|
+
})();
|
|
1114
|
+
return v_error === undefined ? null : v_error;
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1117
|
+
function validate$e(obj, path = 'SemanticMeasurementOutputRepresentation') {
|
|
1118
|
+
const v_error = (() => {
|
|
1119
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1120
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1121
|
+
}
|
|
1122
|
+
if (obj.aggregationType !== undefined) {
|
|
1123
|
+
const obj_aggregationType = obj.aggregationType;
|
|
1124
|
+
const path_aggregationType = path + '.aggregationType';
|
|
1125
|
+
if (typeof obj_aggregationType !== 'string') {
|
|
1126
|
+
return new TypeError('Expected "string" but received "' + typeof obj_aggregationType + '" (at "' + path_aggregationType + '")');
|
|
1127
|
+
}
|
|
1128
|
+
}
|
|
1129
|
+
const obj_apiName = obj.apiName;
|
|
1130
|
+
const path_apiName = path + '.apiName';
|
|
1131
|
+
if (typeof obj_apiName !== 'string') {
|
|
1132
|
+
return new TypeError('Expected "string" but received "' + typeof obj_apiName + '" (at "' + path_apiName + '")');
|
|
1133
|
+
}
|
|
1134
|
+
const obj_createdBy = obj.createdBy;
|
|
1135
|
+
const path_createdBy = path + '.createdBy';
|
|
1136
|
+
if (typeof obj_createdBy !== 'string') {
|
|
1137
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdBy + '" (at "' + path_createdBy + '")');
|
|
1138
|
+
}
|
|
1139
|
+
const obj_createdDate = obj.createdDate;
|
|
1140
|
+
const path_createdDate = path + '.createdDate';
|
|
1141
|
+
if (typeof obj_createdDate !== 'string') {
|
|
1142
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
|
|
1143
|
+
}
|
|
1144
|
+
const obj_dataObjectFieldName = obj.dataObjectFieldName;
|
|
1145
|
+
const path_dataObjectFieldName = path + '.dataObjectFieldName';
|
|
1146
|
+
let obj_dataObjectFieldName_union0 = null;
|
|
1147
|
+
const obj_dataObjectFieldName_union0_error = (() => {
|
|
1148
|
+
if (typeof obj_dataObjectFieldName !== 'string') {
|
|
1149
|
+
return new TypeError('Expected "string" but received "' + typeof obj_dataObjectFieldName + '" (at "' + path_dataObjectFieldName + '")');
|
|
1150
|
+
}
|
|
1151
|
+
})();
|
|
1152
|
+
if (obj_dataObjectFieldName_union0_error != null) {
|
|
1153
|
+
obj_dataObjectFieldName_union0 = obj_dataObjectFieldName_union0_error.message;
|
|
1154
|
+
}
|
|
1155
|
+
let obj_dataObjectFieldName_union1 = null;
|
|
1156
|
+
const obj_dataObjectFieldName_union1_error = (() => {
|
|
1157
|
+
if (obj_dataObjectFieldName !== null) {
|
|
1158
|
+
return new TypeError('Expected "null" but received "' + typeof obj_dataObjectFieldName + '" (at "' + path_dataObjectFieldName + '")');
|
|
1159
|
+
}
|
|
1160
|
+
})();
|
|
1161
|
+
if (obj_dataObjectFieldName_union1_error != null) {
|
|
1162
|
+
obj_dataObjectFieldName_union1 = obj_dataObjectFieldName_union1_error.message;
|
|
1163
|
+
}
|
|
1164
|
+
if (obj_dataObjectFieldName_union0 && obj_dataObjectFieldName_union1) {
|
|
1165
|
+
let message = 'Object doesn\'t match union (at "' + path_dataObjectFieldName + '")';
|
|
1166
|
+
message += '\n' + obj_dataObjectFieldName_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1167
|
+
message += '\n' + obj_dataObjectFieldName_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1168
|
+
return new TypeError(message);
|
|
1169
|
+
}
|
|
1170
|
+
const obj_dataType = obj.dataType;
|
|
1171
|
+
const path_dataType = path + '.dataType';
|
|
1172
|
+
if (typeof obj_dataType !== 'string') {
|
|
1173
|
+
return new TypeError('Expected "string" but received "' + typeof obj_dataType + '" (at "' + path_dataType + '")');
|
|
1174
|
+
}
|
|
1175
|
+
if (obj.decimalPlace !== undefined) {
|
|
1176
|
+
const obj_decimalPlace = obj.decimalPlace;
|
|
1177
|
+
const path_decimalPlace = path + '.decimalPlace';
|
|
1178
|
+
let obj_decimalPlace_union0 = null;
|
|
1179
|
+
const obj_decimalPlace_union0_error = (() => {
|
|
1180
|
+
if (typeof obj_decimalPlace !== 'number' || (typeof obj_decimalPlace === 'number' && Math.floor(obj_decimalPlace) !== obj_decimalPlace)) {
|
|
1181
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_decimalPlace + '" (at "' + path_decimalPlace + '")');
|
|
1182
|
+
}
|
|
1183
|
+
})();
|
|
1184
|
+
if (obj_decimalPlace_union0_error != null) {
|
|
1185
|
+
obj_decimalPlace_union0 = obj_decimalPlace_union0_error.message;
|
|
1186
|
+
}
|
|
1187
|
+
let obj_decimalPlace_union1 = null;
|
|
1188
|
+
const obj_decimalPlace_union1_error = (() => {
|
|
1189
|
+
if (obj_decimalPlace !== null) {
|
|
1190
|
+
return new TypeError('Expected "null" but received "' + typeof obj_decimalPlace + '" (at "' + path_decimalPlace + '")');
|
|
1191
|
+
}
|
|
1192
|
+
})();
|
|
1193
|
+
if (obj_decimalPlace_union1_error != null) {
|
|
1194
|
+
obj_decimalPlace_union1 = obj_decimalPlace_union1_error.message;
|
|
1195
|
+
}
|
|
1196
|
+
if (obj_decimalPlace_union0 && obj_decimalPlace_union1) {
|
|
1197
|
+
let message = 'Object doesn\'t match union (at "' + path_decimalPlace + '")';
|
|
1198
|
+
message += '\n' + obj_decimalPlace_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1199
|
+
message += '\n' + obj_decimalPlace_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1200
|
+
return new TypeError(message);
|
|
1201
|
+
}
|
|
1202
|
+
}
|
|
1203
|
+
if (obj.description !== undefined) {
|
|
1204
|
+
const obj_description = obj.description;
|
|
1205
|
+
const path_description = path + '.description';
|
|
1206
|
+
let obj_description_union0 = null;
|
|
1207
|
+
const obj_description_union0_error = (() => {
|
|
1208
|
+
if (typeof obj_description !== 'string') {
|
|
1209
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
1210
|
+
}
|
|
1211
|
+
})();
|
|
1212
|
+
if (obj_description_union0_error != null) {
|
|
1213
|
+
obj_description_union0 = obj_description_union0_error.message;
|
|
1214
|
+
}
|
|
1215
|
+
let obj_description_union1 = null;
|
|
1216
|
+
const obj_description_union1_error = (() => {
|
|
1217
|
+
if (obj_description !== null) {
|
|
1218
|
+
return new TypeError('Expected "null" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
1219
|
+
}
|
|
1220
|
+
})();
|
|
1221
|
+
if (obj_description_union1_error != null) {
|
|
1222
|
+
obj_description_union1 = obj_description_union1_error.message;
|
|
1223
|
+
}
|
|
1224
|
+
if (obj_description_union0 && obj_description_union1) {
|
|
1225
|
+
let message = 'Object doesn\'t match union (at "' + path_description + '")';
|
|
1226
|
+
message += '\n' + obj_description_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1227
|
+
message += '\n' + obj_description_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1228
|
+
return new TypeError(message);
|
|
1229
|
+
}
|
|
1230
|
+
}
|
|
1231
|
+
if (obj.directionality !== undefined) {
|
|
1232
|
+
const obj_directionality = obj.directionality;
|
|
1233
|
+
const path_directionality = path + '.directionality';
|
|
1234
|
+
if (typeof obj_directionality !== 'string') {
|
|
1235
|
+
return new TypeError('Expected "string" but received "' + typeof obj_directionality + '" (at "' + path_directionality + '")');
|
|
1236
|
+
}
|
|
1237
|
+
}
|
|
1238
|
+
if (obj.displayCategory !== undefined) {
|
|
1239
|
+
const obj_displayCategory = obj.displayCategory;
|
|
1240
|
+
const path_displayCategory = path + '.displayCategory';
|
|
1241
|
+
if (typeof obj_displayCategory !== 'string') {
|
|
1242
|
+
return new TypeError('Expected "string" but received "' + typeof obj_displayCategory + '" (at "' + path_displayCategory + '")');
|
|
1243
|
+
}
|
|
1244
|
+
}
|
|
1245
|
+
const obj_id = obj.id;
|
|
1246
|
+
const path_id = path + '.id';
|
|
1247
|
+
if (typeof obj_id !== 'string') {
|
|
1248
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
1249
|
+
}
|
|
1250
|
+
if (obj.isAggregatable !== undefined) {
|
|
1251
|
+
const obj_isAggregatable = obj.isAggregatable;
|
|
1252
|
+
const path_isAggregatable = path + '.isAggregatable';
|
|
1253
|
+
let obj_isAggregatable_union0 = null;
|
|
1254
|
+
const obj_isAggregatable_union0_error = (() => {
|
|
1255
|
+
if (typeof obj_isAggregatable !== 'boolean') {
|
|
1256
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isAggregatable + '" (at "' + path_isAggregatable + '")');
|
|
1257
|
+
}
|
|
1258
|
+
})();
|
|
1259
|
+
if (obj_isAggregatable_union0_error != null) {
|
|
1260
|
+
obj_isAggregatable_union0 = obj_isAggregatable_union0_error.message;
|
|
1261
|
+
}
|
|
1262
|
+
let obj_isAggregatable_union1 = null;
|
|
1263
|
+
const obj_isAggregatable_union1_error = (() => {
|
|
1264
|
+
if (obj_isAggregatable !== null) {
|
|
1265
|
+
return new TypeError('Expected "null" but received "' + typeof obj_isAggregatable + '" (at "' + path_isAggregatable + '")');
|
|
1266
|
+
}
|
|
1267
|
+
})();
|
|
1268
|
+
if (obj_isAggregatable_union1_error != null) {
|
|
1269
|
+
obj_isAggregatable_union1 = obj_isAggregatable_union1_error.message;
|
|
1270
|
+
}
|
|
1271
|
+
if (obj_isAggregatable_union0 && obj_isAggregatable_union1) {
|
|
1272
|
+
let message = 'Object doesn\'t match union (at "' + path_isAggregatable + '")';
|
|
1273
|
+
message += '\n' + obj_isAggregatable_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1274
|
+
message += '\n' + obj_isAggregatable_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1275
|
+
return new TypeError(message);
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
if (obj.isVisible !== undefined) {
|
|
1279
|
+
const obj_isVisible = obj.isVisible;
|
|
1280
|
+
const path_isVisible = path + '.isVisible';
|
|
1281
|
+
let obj_isVisible_union0 = null;
|
|
1282
|
+
const obj_isVisible_union0_error = (() => {
|
|
1283
|
+
if (typeof obj_isVisible !== 'boolean') {
|
|
1284
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isVisible + '" (at "' + path_isVisible + '")');
|
|
1285
|
+
}
|
|
1286
|
+
})();
|
|
1287
|
+
if (obj_isVisible_union0_error != null) {
|
|
1288
|
+
obj_isVisible_union0 = obj_isVisible_union0_error.message;
|
|
1289
|
+
}
|
|
1290
|
+
let obj_isVisible_union1 = null;
|
|
1291
|
+
const obj_isVisible_union1_error = (() => {
|
|
1292
|
+
if (obj_isVisible !== null) {
|
|
1293
|
+
return new TypeError('Expected "null" but received "' + typeof obj_isVisible + '" (at "' + path_isVisible + '")');
|
|
1294
|
+
}
|
|
1295
|
+
})();
|
|
1296
|
+
if (obj_isVisible_union1_error != null) {
|
|
1297
|
+
obj_isVisible_union1 = obj_isVisible_union1_error.message;
|
|
1298
|
+
}
|
|
1299
|
+
if (obj_isVisible_union0 && obj_isVisible_union1) {
|
|
1300
|
+
let message = 'Object doesn\'t match union (at "' + path_isVisible + '")';
|
|
1301
|
+
message += '\n' + obj_isVisible_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1302
|
+
message += '\n' + obj_isVisible_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1303
|
+
return new TypeError(message);
|
|
1304
|
+
}
|
|
1305
|
+
}
|
|
1306
|
+
const obj_label = obj.label;
|
|
1307
|
+
const path_label = path + '.label';
|
|
1308
|
+
let obj_label_union0 = null;
|
|
1309
|
+
const obj_label_union0_error = (() => {
|
|
1310
|
+
if (typeof obj_label !== 'string') {
|
|
1311
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
1312
|
+
}
|
|
1313
|
+
})();
|
|
1314
|
+
if (obj_label_union0_error != null) {
|
|
1315
|
+
obj_label_union0 = obj_label_union0_error.message;
|
|
1316
|
+
}
|
|
1317
|
+
let obj_label_union1 = null;
|
|
1318
|
+
const obj_label_union1_error = (() => {
|
|
1319
|
+
if (obj_label !== null) {
|
|
1320
|
+
return new TypeError('Expected "null" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
1321
|
+
}
|
|
1322
|
+
})();
|
|
1323
|
+
if (obj_label_union1_error != null) {
|
|
1324
|
+
obj_label_union1 = obj_label_union1_error.message;
|
|
1325
|
+
}
|
|
1326
|
+
if (obj_label_union0 && obj_label_union1) {
|
|
1327
|
+
let message = 'Object doesn\'t match union (at "' + path_label + '")';
|
|
1328
|
+
message += '\n' + obj_label_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1329
|
+
message += '\n' + obj_label_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1330
|
+
return new TypeError(message);
|
|
1331
|
+
}
|
|
1332
|
+
if (obj.lastModifiedBy !== undefined) {
|
|
1333
|
+
const obj_lastModifiedBy = obj.lastModifiedBy;
|
|
1334
|
+
const path_lastModifiedBy = path + '.lastModifiedBy';
|
|
1335
|
+
let obj_lastModifiedBy_union0 = null;
|
|
1336
|
+
const obj_lastModifiedBy_union0_error = (() => {
|
|
1337
|
+
if (typeof obj_lastModifiedBy !== 'string') {
|
|
1338
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedBy + '" (at "' + path_lastModifiedBy + '")');
|
|
1339
|
+
}
|
|
1340
|
+
})();
|
|
1341
|
+
if (obj_lastModifiedBy_union0_error != null) {
|
|
1342
|
+
obj_lastModifiedBy_union0 = obj_lastModifiedBy_union0_error.message;
|
|
1343
|
+
}
|
|
1344
|
+
let obj_lastModifiedBy_union1 = null;
|
|
1345
|
+
const obj_lastModifiedBy_union1_error = (() => {
|
|
1346
|
+
if (obj_lastModifiedBy !== null) {
|
|
1347
|
+
return new TypeError('Expected "null" but received "' + typeof obj_lastModifiedBy + '" (at "' + path_lastModifiedBy + '")');
|
|
1348
|
+
}
|
|
1349
|
+
})();
|
|
1350
|
+
if (obj_lastModifiedBy_union1_error != null) {
|
|
1351
|
+
obj_lastModifiedBy_union1 = obj_lastModifiedBy_union1_error.message;
|
|
1352
|
+
}
|
|
1353
|
+
if (obj_lastModifiedBy_union0 && obj_lastModifiedBy_union1) {
|
|
1354
|
+
let message = 'Object doesn\'t match union (at "' + path_lastModifiedBy + '")';
|
|
1355
|
+
message += '\n' + obj_lastModifiedBy_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1356
|
+
message += '\n' + obj_lastModifiedBy_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1357
|
+
return new TypeError(message);
|
|
1358
|
+
}
|
|
1359
|
+
}
|
|
1360
|
+
if (obj.lastModifiedDate !== undefined) {
|
|
1361
|
+
const obj_lastModifiedDate = obj.lastModifiedDate;
|
|
1362
|
+
const path_lastModifiedDate = path + '.lastModifiedDate';
|
|
1363
|
+
let obj_lastModifiedDate_union0 = null;
|
|
1364
|
+
const obj_lastModifiedDate_union0_error = (() => {
|
|
1365
|
+
if (typeof obj_lastModifiedDate !== 'string') {
|
|
1366
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
|
|
1367
|
+
}
|
|
1368
|
+
})();
|
|
1369
|
+
if (obj_lastModifiedDate_union0_error != null) {
|
|
1370
|
+
obj_lastModifiedDate_union0 = obj_lastModifiedDate_union0_error.message;
|
|
1371
|
+
}
|
|
1372
|
+
let obj_lastModifiedDate_union1 = null;
|
|
1373
|
+
const obj_lastModifiedDate_union1_error = (() => {
|
|
1374
|
+
if (obj_lastModifiedDate !== null) {
|
|
1375
|
+
return new TypeError('Expected "null" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
|
|
1376
|
+
}
|
|
1377
|
+
})();
|
|
1378
|
+
if (obj_lastModifiedDate_union1_error != null) {
|
|
1379
|
+
obj_lastModifiedDate_union1 = obj_lastModifiedDate_union1_error.message;
|
|
1380
|
+
}
|
|
1381
|
+
if (obj_lastModifiedDate_union0 && obj_lastModifiedDate_union1) {
|
|
1382
|
+
let message = 'Object doesn\'t match union (at "' + path_lastModifiedDate + '")';
|
|
1383
|
+
message += '\n' + obj_lastModifiedDate_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1384
|
+
message += '\n' + obj_lastModifiedDate_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1385
|
+
return new TypeError(message);
|
|
1386
|
+
}
|
|
1387
|
+
}
|
|
1388
|
+
const obj_shouldTreatNullsAsZeros = obj.shouldTreatNullsAsZeros;
|
|
1389
|
+
const path_shouldTreatNullsAsZeros = path + '.shouldTreatNullsAsZeros';
|
|
1390
|
+
let obj_shouldTreatNullsAsZeros_union0 = null;
|
|
1391
|
+
const obj_shouldTreatNullsAsZeros_union0_error = (() => {
|
|
1392
|
+
if (typeof obj_shouldTreatNullsAsZeros !== 'boolean') {
|
|
1393
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_shouldTreatNullsAsZeros + '" (at "' + path_shouldTreatNullsAsZeros + '")');
|
|
1394
|
+
}
|
|
1395
|
+
})();
|
|
1396
|
+
if (obj_shouldTreatNullsAsZeros_union0_error != null) {
|
|
1397
|
+
obj_shouldTreatNullsAsZeros_union0 = obj_shouldTreatNullsAsZeros_union0_error.message;
|
|
1398
|
+
}
|
|
1399
|
+
let obj_shouldTreatNullsAsZeros_union1 = null;
|
|
1400
|
+
const obj_shouldTreatNullsAsZeros_union1_error = (() => {
|
|
1401
|
+
if (obj_shouldTreatNullsAsZeros !== null) {
|
|
1402
|
+
return new TypeError('Expected "null" but received "' + typeof obj_shouldTreatNullsAsZeros + '" (at "' + path_shouldTreatNullsAsZeros + '")');
|
|
1403
|
+
}
|
|
1404
|
+
})();
|
|
1405
|
+
if (obj_shouldTreatNullsAsZeros_union1_error != null) {
|
|
1406
|
+
obj_shouldTreatNullsAsZeros_union1 = obj_shouldTreatNullsAsZeros_union1_error.message;
|
|
1407
|
+
}
|
|
1408
|
+
if (obj_shouldTreatNullsAsZeros_union0 && obj_shouldTreatNullsAsZeros_union1) {
|
|
1409
|
+
let message = 'Object doesn\'t match union (at "' + path_shouldTreatNullsAsZeros + '")';
|
|
1410
|
+
message += '\n' + obj_shouldTreatNullsAsZeros_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1411
|
+
message += '\n' + obj_shouldTreatNullsAsZeros_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1412
|
+
return new TypeError(message);
|
|
1413
|
+
}
|
|
1414
|
+
if (obj.sortOrder !== undefined) {
|
|
1415
|
+
const obj_sortOrder = obj.sortOrder;
|
|
1416
|
+
const path_sortOrder = path + '.sortOrder';
|
|
1417
|
+
if (typeof obj_sortOrder !== 'string') {
|
|
1418
|
+
return new TypeError('Expected "string" but received "' + typeof obj_sortOrder + '" (at "' + path_sortOrder + '")');
|
|
1419
|
+
}
|
|
1420
|
+
}
|
|
1421
|
+
})();
|
|
1422
|
+
return v_error === undefined ? null : v_error;
|
|
1423
|
+
}
|
|
1424
|
+
|
|
1425
|
+
function validate$d(obj, path = 'SemanticDataObjectOutputRepresentation') {
|
|
1426
|
+
const v_error = (() => {
|
|
1427
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1428
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1429
|
+
}
|
|
1430
|
+
const obj_apiName = obj.apiName;
|
|
1431
|
+
const path_apiName = path + '.apiName';
|
|
1432
|
+
if (typeof obj_apiName !== 'string') {
|
|
1433
|
+
return new TypeError('Expected "string" but received "' + typeof obj_apiName + '" (at "' + path_apiName + '")');
|
|
1434
|
+
}
|
|
1435
|
+
const obj_createdBy = obj.createdBy;
|
|
1436
|
+
const path_createdBy = path + '.createdBy';
|
|
1437
|
+
if (typeof obj_createdBy !== 'string') {
|
|
1438
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdBy + '" (at "' + path_createdBy + '")');
|
|
1439
|
+
}
|
|
1440
|
+
const obj_createdDate = obj.createdDate;
|
|
1441
|
+
const path_createdDate = path + '.createdDate';
|
|
1442
|
+
if (typeof obj_createdDate !== 'string') {
|
|
1443
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
|
|
1444
|
+
}
|
|
1445
|
+
const obj_dataObjectName = obj.dataObjectName;
|
|
1446
|
+
const path_dataObjectName = path + '.dataObjectName';
|
|
1447
|
+
let obj_dataObjectName_union0 = null;
|
|
1448
|
+
const obj_dataObjectName_union0_error = (() => {
|
|
1449
|
+
if (typeof obj_dataObjectName !== 'string') {
|
|
1450
|
+
return new TypeError('Expected "string" but received "' + typeof obj_dataObjectName + '" (at "' + path_dataObjectName + '")');
|
|
1451
|
+
}
|
|
1452
|
+
})();
|
|
1453
|
+
if (obj_dataObjectName_union0_error != null) {
|
|
1454
|
+
obj_dataObjectName_union0 = obj_dataObjectName_union0_error.message;
|
|
1455
|
+
}
|
|
1456
|
+
let obj_dataObjectName_union1 = null;
|
|
1457
|
+
const obj_dataObjectName_union1_error = (() => {
|
|
1458
|
+
if (obj_dataObjectName !== null) {
|
|
1459
|
+
return new TypeError('Expected "null" but received "' + typeof obj_dataObjectName + '" (at "' + path_dataObjectName + '")');
|
|
1460
|
+
}
|
|
1461
|
+
})();
|
|
1462
|
+
if (obj_dataObjectName_union1_error != null) {
|
|
1463
|
+
obj_dataObjectName_union1 = obj_dataObjectName_union1_error.message;
|
|
1464
|
+
}
|
|
1465
|
+
if (obj_dataObjectName_union0 && obj_dataObjectName_union1) {
|
|
1466
|
+
let message = 'Object doesn\'t match union (at "' + path_dataObjectName + '")';
|
|
1467
|
+
message += '\n' + obj_dataObjectName_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1468
|
+
message += '\n' + obj_dataObjectName_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1469
|
+
return new TypeError(message);
|
|
1470
|
+
}
|
|
1471
|
+
const obj_dataObjectType = obj.dataObjectType;
|
|
1472
|
+
const path_dataObjectType = path + '.dataObjectType';
|
|
1473
|
+
if (typeof obj_dataObjectType !== 'string') {
|
|
1474
|
+
return new TypeError('Expected "string" but received "' + typeof obj_dataObjectType + '" (at "' + path_dataObjectType + '")');
|
|
1475
|
+
}
|
|
1476
|
+
if (obj.description !== undefined) {
|
|
1477
|
+
const obj_description = obj.description;
|
|
1478
|
+
const path_description = path + '.description';
|
|
1479
|
+
let obj_description_union0 = null;
|
|
1480
|
+
const obj_description_union0_error = (() => {
|
|
1481
|
+
if (typeof obj_description !== 'string') {
|
|
1482
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
1483
|
+
}
|
|
1484
|
+
})();
|
|
1485
|
+
if (obj_description_union0_error != null) {
|
|
1486
|
+
obj_description_union0 = obj_description_union0_error.message;
|
|
1487
|
+
}
|
|
1488
|
+
let obj_description_union1 = null;
|
|
1489
|
+
const obj_description_union1_error = (() => {
|
|
1490
|
+
if (obj_description !== null) {
|
|
1491
|
+
return new TypeError('Expected "null" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
1492
|
+
}
|
|
1493
|
+
})();
|
|
1494
|
+
if (obj_description_union1_error != null) {
|
|
1495
|
+
obj_description_union1 = obj_description_union1_error.message;
|
|
1496
|
+
}
|
|
1497
|
+
if (obj_description_union0 && obj_description_union1) {
|
|
1498
|
+
let message = 'Object doesn\'t match union (at "' + path_description + '")';
|
|
1499
|
+
message += '\n' + obj_description_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1500
|
+
message += '\n' + obj_description_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1501
|
+
return new TypeError(message);
|
|
1502
|
+
}
|
|
1503
|
+
}
|
|
1504
|
+
if (obj.filterLogic !== undefined) {
|
|
1505
|
+
const obj_filterLogic = obj.filterLogic;
|
|
1506
|
+
const path_filterLogic = path + '.filterLogic';
|
|
1507
|
+
let obj_filterLogic_union0 = null;
|
|
1508
|
+
const obj_filterLogic_union0_error = (() => {
|
|
1509
|
+
if (typeof obj_filterLogic !== 'string') {
|
|
1510
|
+
return new TypeError('Expected "string" but received "' + typeof obj_filterLogic + '" (at "' + path_filterLogic + '")');
|
|
1511
|
+
}
|
|
1512
|
+
})();
|
|
1513
|
+
if (obj_filterLogic_union0_error != null) {
|
|
1514
|
+
obj_filterLogic_union0 = obj_filterLogic_union0_error.message;
|
|
1515
|
+
}
|
|
1516
|
+
let obj_filterLogic_union1 = null;
|
|
1517
|
+
const obj_filterLogic_union1_error = (() => {
|
|
1518
|
+
if (obj_filterLogic !== null) {
|
|
1519
|
+
return new TypeError('Expected "null" but received "' + typeof obj_filterLogic + '" (at "' + path_filterLogic + '")');
|
|
1520
|
+
}
|
|
1521
|
+
})();
|
|
1522
|
+
if (obj_filterLogic_union1_error != null) {
|
|
1523
|
+
obj_filterLogic_union1 = obj_filterLogic_union1_error.message;
|
|
1524
|
+
}
|
|
1525
|
+
if (obj_filterLogic_union0 && obj_filterLogic_union1) {
|
|
1526
|
+
let message = 'Object doesn\'t match union (at "' + path_filterLogic + '")';
|
|
1527
|
+
message += '\n' + obj_filterLogic_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1528
|
+
message += '\n' + obj_filterLogic_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1529
|
+
return new TypeError(message);
|
|
1530
|
+
}
|
|
1531
|
+
}
|
|
1532
|
+
if (obj.filters !== undefined) {
|
|
1533
|
+
const obj_filters = obj.filters;
|
|
1534
|
+
const path_filters = path + '.filters';
|
|
1535
|
+
if (!ArrayIsArray(obj_filters)) {
|
|
1536
|
+
return new TypeError('Expected "array" but received "' + typeof obj_filters + '" (at "' + path_filters + '")');
|
|
1537
|
+
}
|
|
1538
|
+
for (let i = 0; i < obj_filters.length; i++) {
|
|
1539
|
+
const obj_filters_item = obj_filters[i];
|
|
1540
|
+
const path_filters_item = path_filters + '[' + i + ']';
|
|
1541
|
+
const referencepath_filters_itemValidationError = validate$i(obj_filters_item, path_filters_item);
|
|
1542
|
+
if (referencepath_filters_itemValidationError !== null) {
|
|
1543
|
+
let message = 'Object doesn\'t match SemanticFilterOutputRepresentation (at "' + path_filters_item + '")\n';
|
|
1544
|
+
message += referencepath_filters_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1545
|
+
return new TypeError(message);
|
|
1546
|
+
}
|
|
1547
|
+
}
|
|
1548
|
+
}
|
|
1549
|
+
const obj_id = obj.id;
|
|
1550
|
+
const path_id = path + '.id';
|
|
1551
|
+
if (typeof obj_id !== 'string') {
|
|
1552
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
1553
|
+
}
|
|
1554
|
+
const obj_label = obj.label;
|
|
1555
|
+
const path_label = path + '.label';
|
|
1556
|
+
let obj_label_union0 = null;
|
|
1557
|
+
const obj_label_union0_error = (() => {
|
|
1558
|
+
if (typeof obj_label !== 'string') {
|
|
1559
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
1560
|
+
}
|
|
1561
|
+
})();
|
|
1562
|
+
if (obj_label_union0_error != null) {
|
|
1563
|
+
obj_label_union0 = obj_label_union0_error.message;
|
|
1564
|
+
}
|
|
1565
|
+
let obj_label_union1 = null;
|
|
1566
|
+
const obj_label_union1_error = (() => {
|
|
1567
|
+
if (obj_label !== null) {
|
|
1568
|
+
return new TypeError('Expected "null" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
1569
|
+
}
|
|
1570
|
+
})();
|
|
1571
|
+
if (obj_label_union1_error != null) {
|
|
1572
|
+
obj_label_union1 = obj_label_union1_error.message;
|
|
1573
|
+
}
|
|
1574
|
+
if (obj_label_union0 && obj_label_union1) {
|
|
1575
|
+
let message = 'Object doesn\'t match union (at "' + path_label + '")';
|
|
1576
|
+
message += '\n' + obj_label_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1577
|
+
message += '\n' + obj_label_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1578
|
+
return new TypeError(message);
|
|
1579
|
+
}
|
|
1580
|
+
if (obj.lastModifiedBy !== undefined) {
|
|
1581
|
+
const obj_lastModifiedBy = obj.lastModifiedBy;
|
|
1582
|
+
const path_lastModifiedBy = path + '.lastModifiedBy';
|
|
1583
|
+
let obj_lastModifiedBy_union0 = null;
|
|
1584
|
+
const obj_lastModifiedBy_union0_error = (() => {
|
|
1585
|
+
if (typeof obj_lastModifiedBy !== 'string') {
|
|
1586
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedBy + '" (at "' + path_lastModifiedBy + '")');
|
|
1587
|
+
}
|
|
1588
|
+
})();
|
|
1589
|
+
if (obj_lastModifiedBy_union0_error != null) {
|
|
1590
|
+
obj_lastModifiedBy_union0 = obj_lastModifiedBy_union0_error.message;
|
|
1591
|
+
}
|
|
1592
|
+
let obj_lastModifiedBy_union1 = null;
|
|
1593
|
+
const obj_lastModifiedBy_union1_error = (() => {
|
|
1594
|
+
if (obj_lastModifiedBy !== null) {
|
|
1595
|
+
return new TypeError('Expected "null" but received "' + typeof obj_lastModifiedBy + '" (at "' + path_lastModifiedBy + '")');
|
|
1596
|
+
}
|
|
1597
|
+
})();
|
|
1598
|
+
if (obj_lastModifiedBy_union1_error != null) {
|
|
1599
|
+
obj_lastModifiedBy_union1 = obj_lastModifiedBy_union1_error.message;
|
|
1600
|
+
}
|
|
1601
|
+
if (obj_lastModifiedBy_union0 && obj_lastModifiedBy_union1) {
|
|
1602
|
+
let message = 'Object doesn\'t match union (at "' + path_lastModifiedBy + '")';
|
|
1603
|
+
message += '\n' + obj_lastModifiedBy_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1604
|
+
message += '\n' + obj_lastModifiedBy_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1605
|
+
return new TypeError(message);
|
|
1606
|
+
}
|
|
1607
|
+
}
|
|
1608
|
+
if (obj.lastModifiedDate !== undefined) {
|
|
1609
|
+
const obj_lastModifiedDate = obj.lastModifiedDate;
|
|
1610
|
+
const path_lastModifiedDate = path + '.lastModifiedDate';
|
|
1611
|
+
let obj_lastModifiedDate_union0 = null;
|
|
1612
|
+
const obj_lastModifiedDate_union0_error = (() => {
|
|
1613
|
+
if (typeof obj_lastModifiedDate !== 'string') {
|
|
1614
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
|
|
1615
|
+
}
|
|
1616
|
+
})();
|
|
1617
|
+
if (obj_lastModifiedDate_union0_error != null) {
|
|
1618
|
+
obj_lastModifiedDate_union0 = obj_lastModifiedDate_union0_error.message;
|
|
1619
|
+
}
|
|
1620
|
+
let obj_lastModifiedDate_union1 = null;
|
|
1621
|
+
const obj_lastModifiedDate_union1_error = (() => {
|
|
1622
|
+
if (obj_lastModifiedDate !== null) {
|
|
1623
|
+
return new TypeError('Expected "null" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
|
|
1624
|
+
}
|
|
1625
|
+
})();
|
|
1626
|
+
if (obj_lastModifiedDate_union1_error != null) {
|
|
1627
|
+
obj_lastModifiedDate_union1 = obj_lastModifiedDate_union1_error.message;
|
|
1628
|
+
}
|
|
1629
|
+
if (obj_lastModifiedDate_union0 && obj_lastModifiedDate_union1) {
|
|
1630
|
+
let message = 'Object doesn\'t match union (at "' + path_lastModifiedDate + '")';
|
|
1631
|
+
message += '\n' + obj_lastModifiedDate_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1632
|
+
message += '\n' + obj_lastModifiedDate_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1633
|
+
return new TypeError(message);
|
|
1634
|
+
}
|
|
1635
|
+
}
|
|
1636
|
+
if (obj.logicalViewId !== undefined) {
|
|
1637
|
+
const obj_logicalViewId = obj.logicalViewId;
|
|
1638
|
+
const path_logicalViewId = path + '.logicalViewId';
|
|
1639
|
+
let obj_logicalViewId_union0 = null;
|
|
1640
|
+
const obj_logicalViewId_union0_error = (() => {
|
|
1641
|
+
if (typeof obj_logicalViewId !== 'string') {
|
|
1642
|
+
return new TypeError('Expected "string" but received "' + typeof obj_logicalViewId + '" (at "' + path_logicalViewId + '")');
|
|
1643
|
+
}
|
|
1644
|
+
})();
|
|
1645
|
+
if (obj_logicalViewId_union0_error != null) {
|
|
1646
|
+
obj_logicalViewId_union0 = obj_logicalViewId_union0_error.message;
|
|
1647
|
+
}
|
|
1648
|
+
let obj_logicalViewId_union1 = null;
|
|
1649
|
+
const obj_logicalViewId_union1_error = (() => {
|
|
1650
|
+
if (obj_logicalViewId !== null) {
|
|
1651
|
+
return new TypeError('Expected "null" but received "' + typeof obj_logicalViewId + '" (at "' + path_logicalViewId + '")');
|
|
1652
|
+
}
|
|
1653
|
+
})();
|
|
1654
|
+
if (obj_logicalViewId_union1_error != null) {
|
|
1655
|
+
obj_logicalViewId_union1 = obj_logicalViewId_union1_error.message;
|
|
1656
|
+
}
|
|
1657
|
+
if (obj_logicalViewId_union0 && obj_logicalViewId_union1) {
|
|
1658
|
+
let message = 'Object doesn\'t match union (at "' + path_logicalViewId + '")';
|
|
1659
|
+
message += '\n' + obj_logicalViewId_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1660
|
+
message += '\n' + obj_logicalViewId_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1661
|
+
return new TypeError(message);
|
|
1662
|
+
}
|
|
1663
|
+
}
|
|
1664
|
+
if (obj.semanticDimensions !== undefined) {
|
|
1665
|
+
const obj_semanticDimensions = obj.semanticDimensions;
|
|
1666
|
+
const path_semanticDimensions = path + '.semanticDimensions';
|
|
1667
|
+
if (!ArrayIsArray(obj_semanticDimensions)) {
|
|
1668
|
+
return new TypeError('Expected "array" but received "' + typeof obj_semanticDimensions + '" (at "' + path_semanticDimensions + '")');
|
|
1669
|
+
}
|
|
1670
|
+
for (let i = 0; i < obj_semanticDimensions.length; i++) {
|
|
1671
|
+
const obj_semanticDimensions_item = obj_semanticDimensions[i];
|
|
1672
|
+
const path_semanticDimensions_item = path_semanticDimensions + '[' + i + ']';
|
|
1673
|
+
const referencepath_semanticDimensions_itemValidationError = validate$f(obj_semanticDimensions_item, path_semanticDimensions_item);
|
|
1674
|
+
if (referencepath_semanticDimensions_itemValidationError !== null) {
|
|
1675
|
+
let message = 'Object doesn\'t match SemanticDimensionOutputRepresentation (at "' + path_semanticDimensions_item + '")\n';
|
|
1676
|
+
message += referencepath_semanticDimensions_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1677
|
+
return new TypeError(message);
|
|
1678
|
+
}
|
|
1679
|
+
}
|
|
1680
|
+
}
|
|
1681
|
+
if (obj.semanticDimensionsUrl !== undefined) {
|
|
1682
|
+
const obj_semanticDimensionsUrl = obj.semanticDimensionsUrl;
|
|
1683
|
+
const path_semanticDimensionsUrl = path + '.semanticDimensionsUrl';
|
|
1684
|
+
let obj_semanticDimensionsUrl_union0 = null;
|
|
1685
|
+
const obj_semanticDimensionsUrl_union0_error = (() => {
|
|
1686
|
+
if (typeof obj_semanticDimensionsUrl !== 'string') {
|
|
1687
|
+
return new TypeError('Expected "string" but received "' + typeof obj_semanticDimensionsUrl + '" (at "' + path_semanticDimensionsUrl + '")');
|
|
1688
|
+
}
|
|
1689
|
+
})();
|
|
1690
|
+
if (obj_semanticDimensionsUrl_union0_error != null) {
|
|
1691
|
+
obj_semanticDimensionsUrl_union0 = obj_semanticDimensionsUrl_union0_error.message;
|
|
1692
|
+
}
|
|
1693
|
+
let obj_semanticDimensionsUrl_union1 = null;
|
|
1694
|
+
const obj_semanticDimensionsUrl_union1_error = (() => {
|
|
1695
|
+
if (obj_semanticDimensionsUrl !== null) {
|
|
1696
|
+
return new TypeError('Expected "null" but received "' + typeof obj_semanticDimensionsUrl + '" (at "' + path_semanticDimensionsUrl + '")');
|
|
1697
|
+
}
|
|
1698
|
+
})();
|
|
1699
|
+
if (obj_semanticDimensionsUrl_union1_error != null) {
|
|
1700
|
+
obj_semanticDimensionsUrl_union1 = obj_semanticDimensionsUrl_union1_error.message;
|
|
1701
|
+
}
|
|
1702
|
+
if (obj_semanticDimensionsUrl_union0 && obj_semanticDimensionsUrl_union1) {
|
|
1703
|
+
let message = 'Object doesn\'t match union (at "' + path_semanticDimensionsUrl + '")';
|
|
1704
|
+
message += '\n' + obj_semanticDimensionsUrl_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1705
|
+
message += '\n' + obj_semanticDimensionsUrl_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1706
|
+
return new TypeError(message);
|
|
1707
|
+
}
|
|
1708
|
+
}
|
|
1709
|
+
if (obj.semanticMeasurements !== undefined) {
|
|
1710
|
+
const obj_semanticMeasurements = obj.semanticMeasurements;
|
|
1711
|
+
const path_semanticMeasurements = path + '.semanticMeasurements';
|
|
1712
|
+
if (!ArrayIsArray(obj_semanticMeasurements)) {
|
|
1713
|
+
return new TypeError('Expected "array" but received "' + typeof obj_semanticMeasurements + '" (at "' + path_semanticMeasurements + '")');
|
|
1714
|
+
}
|
|
1715
|
+
for (let i = 0; i < obj_semanticMeasurements.length; i++) {
|
|
1716
|
+
const obj_semanticMeasurements_item = obj_semanticMeasurements[i];
|
|
1717
|
+
const path_semanticMeasurements_item = path_semanticMeasurements + '[' + i + ']';
|
|
1718
|
+
const referencepath_semanticMeasurements_itemValidationError = validate$e(obj_semanticMeasurements_item, path_semanticMeasurements_item);
|
|
1719
|
+
if (referencepath_semanticMeasurements_itemValidationError !== null) {
|
|
1720
|
+
let message = 'Object doesn\'t match SemanticMeasurementOutputRepresentation (at "' + path_semanticMeasurements_item + '")\n';
|
|
1721
|
+
message += referencepath_semanticMeasurements_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1722
|
+
return new TypeError(message);
|
|
1723
|
+
}
|
|
1724
|
+
}
|
|
1725
|
+
}
|
|
1726
|
+
if (obj.semanticMeasurementsUrl !== undefined) {
|
|
1727
|
+
const obj_semanticMeasurementsUrl = obj.semanticMeasurementsUrl;
|
|
1728
|
+
const path_semanticMeasurementsUrl = path + '.semanticMeasurementsUrl';
|
|
1729
|
+
let obj_semanticMeasurementsUrl_union0 = null;
|
|
1730
|
+
const obj_semanticMeasurementsUrl_union0_error = (() => {
|
|
1731
|
+
if (typeof obj_semanticMeasurementsUrl !== 'string') {
|
|
1732
|
+
return new TypeError('Expected "string" but received "' + typeof obj_semanticMeasurementsUrl + '" (at "' + path_semanticMeasurementsUrl + '")');
|
|
1733
|
+
}
|
|
1734
|
+
})();
|
|
1735
|
+
if (obj_semanticMeasurementsUrl_union0_error != null) {
|
|
1736
|
+
obj_semanticMeasurementsUrl_union0 = obj_semanticMeasurementsUrl_union0_error.message;
|
|
1737
|
+
}
|
|
1738
|
+
let obj_semanticMeasurementsUrl_union1 = null;
|
|
1739
|
+
const obj_semanticMeasurementsUrl_union1_error = (() => {
|
|
1740
|
+
if (obj_semanticMeasurementsUrl !== null) {
|
|
1741
|
+
return new TypeError('Expected "null" but received "' + typeof obj_semanticMeasurementsUrl + '" (at "' + path_semanticMeasurementsUrl + '")');
|
|
1742
|
+
}
|
|
1743
|
+
})();
|
|
1744
|
+
if (obj_semanticMeasurementsUrl_union1_error != null) {
|
|
1745
|
+
obj_semanticMeasurementsUrl_union1 = obj_semanticMeasurementsUrl_union1_error.message;
|
|
1746
|
+
}
|
|
1747
|
+
if (obj_semanticMeasurementsUrl_union0 && obj_semanticMeasurementsUrl_union1) {
|
|
1748
|
+
let message = 'Object doesn\'t match union (at "' + path_semanticMeasurementsUrl + '")';
|
|
1749
|
+
message += '\n' + obj_semanticMeasurementsUrl_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1750
|
+
message += '\n' + obj_semanticMeasurementsUrl_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1751
|
+
return new TypeError(message);
|
|
1752
|
+
}
|
|
1753
|
+
}
|
|
1754
|
+
const obj_shouldIncludeAllFields = obj.shouldIncludeAllFields;
|
|
1755
|
+
const path_shouldIncludeAllFields = path + '.shouldIncludeAllFields';
|
|
1756
|
+
let obj_shouldIncludeAllFields_union0 = null;
|
|
1757
|
+
const obj_shouldIncludeAllFields_union0_error = (() => {
|
|
1758
|
+
if (typeof obj_shouldIncludeAllFields !== 'boolean') {
|
|
1759
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_shouldIncludeAllFields + '" (at "' + path_shouldIncludeAllFields + '")');
|
|
1760
|
+
}
|
|
1761
|
+
})();
|
|
1762
|
+
if (obj_shouldIncludeAllFields_union0_error != null) {
|
|
1763
|
+
obj_shouldIncludeAllFields_union0 = obj_shouldIncludeAllFields_union0_error.message;
|
|
1764
|
+
}
|
|
1765
|
+
let obj_shouldIncludeAllFields_union1 = null;
|
|
1766
|
+
const obj_shouldIncludeAllFields_union1_error = (() => {
|
|
1767
|
+
if (obj_shouldIncludeAllFields !== null) {
|
|
1768
|
+
return new TypeError('Expected "null" but received "' + typeof obj_shouldIncludeAllFields + '" (at "' + path_shouldIncludeAllFields + '")');
|
|
1769
|
+
}
|
|
1770
|
+
})();
|
|
1771
|
+
if (obj_shouldIncludeAllFields_union1_error != null) {
|
|
1772
|
+
obj_shouldIncludeAllFields_union1 = obj_shouldIncludeAllFields_union1_error.message;
|
|
1773
|
+
}
|
|
1774
|
+
if (obj_shouldIncludeAllFields_union0 && obj_shouldIncludeAllFields_union1) {
|
|
1775
|
+
let message = 'Object doesn\'t match union (at "' + path_shouldIncludeAllFields + '")';
|
|
1776
|
+
message += '\n' + obj_shouldIncludeAllFields_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1777
|
+
message += '\n' + obj_shouldIncludeAllFields_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1778
|
+
return new TypeError(message);
|
|
1779
|
+
}
|
|
1780
|
+
})();
|
|
1781
|
+
return v_error === undefined ? null : v_error;
|
|
1782
|
+
}
|
|
1783
|
+
|
|
1784
|
+
function validate$c(obj, path = 'SemanticRelationshipCriteriaOutputRepresentation') {
|
|
1785
|
+
const v_error = (() => {
|
|
1786
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1787
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1788
|
+
}
|
|
1789
|
+
const obj_leftSemanticFieldApiName = obj.leftSemanticFieldApiName;
|
|
1790
|
+
const path_leftSemanticFieldApiName = path + '.leftSemanticFieldApiName';
|
|
1791
|
+
let obj_leftSemanticFieldApiName_union0 = null;
|
|
1792
|
+
const obj_leftSemanticFieldApiName_union0_error = (() => {
|
|
1793
|
+
if (typeof obj_leftSemanticFieldApiName !== 'string') {
|
|
1794
|
+
return new TypeError('Expected "string" but received "' + typeof obj_leftSemanticFieldApiName + '" (at "' + path_leftSemanticFieldApiName + '")');
|
|
1795
|
+
}
|
|
1796
|
+
})();
|
|
1797
|
+
if (obj_leftSemanticFieldApiName_union0_error != null) {
|
|
1798
|
+
obj_leftSemanticFieldApiName_union0 = obj_leftSemanticFieldApiName_union0_error.message;
|
|
1799
|
+
}
|
|
1800
|
+
let obj_leftSemanticFieldApiName_union1 = null;
|
|
1801
|
+
const obj_leftSemanticFieldApiName_union1_error = (() => {
|
|
1802
|
+
if (obj_leftSemanticFieldApiName !== null) {
|
|
1803
|
+
return new TypeError('Expected "null" but received "' + typeof obj_leftSemanticFieldApiName + '" (at "' + path_leftSemanticFieldApiName + '")');
|
|
1804
|
+
}
|
|
1805
|
+
})();
|
|
1806
|
+
if (obj_leftSemanticFieldApiName_union1_error != null) {
|
|
1807
|
+
obj_leftSemanticFieldApiName_union1 = obj_leftSemanticFieldApiName_union1_error.message;
|
|
1808
|
+
}
|
|
1809
|
+
if (obj_leftSemanticFieldApiName_union0 && obj_leftSemanticFieldApiName_union1) {
|
|
1810
|
+
let message = 'Object doesn\'t match union (at "' + path_leftSemanticFieldApiName + '")';
|
|
1811
|
+
message += '\n' + obj_leftSemanticFieldApiName_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1812
|
+
message += '\n' + obj_leftSemanticFieldApiName_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1813
|
+
return new TypeError(message);
|
|
1814
|
+
}
|
|
1815
|
+
const obj_rightSemanticFieldApiName = obj.rightSemanticFieldApiName;
|
|
1816
|
+
const path_rightSemanticFieldApiName = path + '.rightSemanticFieldApiName';
|
|
1817
|
+
let obj_rightSemanticFieldApiName_union0 = null;
|
|
1818
|
+
const obj_rightSemanticFieldApiName_union0_error = (() => {
|
|
1819
|
+
if (typeof obj_rightSemanticFieldApiName !== 'string') {
|
|
1820
|
+
return new TypeError('Expected "string" but received "' + typeof obj_rightSemanticFieldApiName + '" (at "' + path_rightSemanticFieldApiName + '")');
|
|
1821
|
+
}
|
|
1822
|
+
})();
|
|
1823
|
+
if (obj_rightSemanticFieldApiName_union0_error != null) {
|
|
1824
|
+
obj_rightSemanticFieldApiName_union0 = obj_rightSemanticFieldApiName_union0_error.message;
|
|
1825
|
+
}
|
|
1826
|
+
let obj_rightSemanticFieldApiName_union1 = null;
|
|
1827
|
+
const obj_rightSemanticFieldApiName_union1_error = (() => {
|
|
1828
|
+
if (obj_rightSemanticFieldApiName !== null) {
|
|
1829
|
+
return new TypeError('Expected "null" but received "' + typeof obj_rightSemanticFieldApiName + '" (at "' + path_rightSemanticFieldApiName + '")');
|
|
1830
|
+
}
|
|
1831
|
+
})();
|
|
1832
|
+
if (obj_rightSemanticFieldApiName_union1_error != null) {
|
|
1833
|
+
obj_rightSemanticFieldApiName_union1 = obj_rightSemanticFieldApiName_union1_error.message;
|
|
1834
|
+
}
|
|
1835
|
+
if (obj_rightSemanticFieldApiName_union0 && obj_rightSemanticFieldApiName_union1) {
|
|
1836
|
+
let message = 'Object doesn\'t match union (at "' + path_rightSemanticFieldApiName + '")';
|
|
1837
|
+
message += '\n' + obj_rightSemanticFieldApiName_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1838
|
+
message += '\n' + obj_rightSemanticFieldApiName_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1839
|
+
return new TypeError(message);
|
|
1840
|
+
}
|
|
1841
|
+
})();
|
|
1842
|
+
return v_error === undefined ? null : v_error;
|
|
1843
|
+
}
|
|
1844
|
+
|
|
1845
|
+
function validate$b(obj, path = 'SemanticRelationshipOutputRepresentation') {
|
|
1846
|
+
const v_error = (() => {
|
|
1847
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1848
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1849
|
+
}
|
|
1850
|
+
const obj_apiName = obj.apiName;
|
|
1851
|
+
const path_apiName = path + '.apiName';
|
|
1852
|
+
if (typeof obj_apiName !== 'string') {
|
|
1853
|
+
return new TypeError('Expected "string" but received "' + typeof obj_apiName + '" (at "' + path_apiName + '")');
|
|
1854
|
+
}
|
|
1855
|
+
const obj_cardinality = obj.cardinality;
|
|
1856
|
+
const path_cardinality = path + '.cardinality';
|
|
1857
|
+
if (typeof obj_cardinality !== 'string') {
|
|
1858
|
+
return new TypeError('Expected "string" but received "' + typeof obj_cardinality + '" (at "' + path_cardinality + '")');
|
|
1859
|
+
}
|
|
1860
|
+
const obj_createdBy = obj.createdBy;
|
|
1861
|
+
const path_createdBy = path + '.createdBy';
|
|
1862
|
+
if (typeof obj_createdBy !== 'string') {
|
|
1863
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdBy + '" (at "' + path_createdBy + '")');
|
|
1864
|
+
}
|
|
1865
|
+
const obj_createdDate = obj.createdDate;
|
|
1866
|
+
const path_createdDate = path + '.createdDate';
|
|
1867
|
+
if (typeof obj_createdDate !== 'string') {
|
|
1868
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
|
|
1869
|
+
}
|
|
1870
|
+
const obj_criteria = obj.criteria;
|
|
1871
|
+
const path_criteria = path + '.criteria';
|
|
1872
|
+
if (!ArrayIsArray(obj_criteria)) {
|
|
1873
|
+
return new TypeError('Expected "array" but received "' + typeof obj_criteria + '" (at "' + path_criteria + '")');
|
|
1874
|
+
}
|
|
1875
|
+
for (let i = 0; i < obj_criteria.length; i++) {
|
|
1876
|
+
const obj_criteria_item = obj_criteria[i];
|
|
1877
|
+
const path_criteria_item = path_criteria + '[' + i + ']';
|
|
1878
|
+
const referencepath_criteria_itemValidationError = validate$c(obj_criteria_item, path_criteria_item);
|
|
1879
|
+
if (referencepath_criteria_itemValidationError !== null) {
|
|
1880
|
+
let message = 'Object doesn\'t match SemanticRelationshipCriteriaOutputRepresentation (at "' + path_criteria_item + '")\n';
|
|
1881
|
+
message += referencepath_criteria_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1882
|
+
return new TypeError(message);
|
|
1883
|
+
}
|
|
1884
|
+
}
|
|
1885
|
+
if (obj.description !== undefined) {
|
|
1886
|
+
const obj_description = obj.description;
|
|
1887
|
+
const path_description = path + '.description';
|
|
1888
|
+
let obj_description_union0 = null;
|
|
1889
|
+
const obj_description_union0_error = (() => {
|
|
1890
|
+
if (typeof obj_description !== 'string') {
|
|
1891
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
1892
|
+
}
|
|
1893
|
+
})();
|
|
1894
|
+
if (obj_description_union0_error != null) {
|
|
1895
|
+
obj_description_union0 = obj_description_union0_error.message;
|
|
1896
|
+
}
|
|
1897
|
+
let obj_description_union1 = null;
|
|
1898
|
+
const obj_description_union1_error = (() => {
|
|
1899
|
+
if (obj_description !== null) {
|
|
1900
|
+
return new TypeError('Expected "null" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
1901
|
+
}
|
|
1902
|
+
})();
|
|
1903
|
+
if (obj_description_union1_error != null) {
|
|
1904
|
+
obj_description_union1 = obj_description_union1_error.message;
|
|
1905
|
+
}
|
|
1906
|
+
if (obj_description_union0 && obj_description_union1) {
|
|
1907
|
+
let message = 'Object doesn\'t match union (at "' + path_description + '")';
|
|
1908
|
+
message += '\n' + obj_description_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1909
|
+
message += '\n' + obj_description_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1910
|
+
return new TypeError(message);
|
|
1911
|
+
}
|
|
1912
|
+
}
|
|
1913
|
+
const obj_id = obj.id;
|
|
1914
|
+
const path_id = path + '.id';
|
|
1915
|
+
if (typeof obj_id !== 'string') {
|
|
1916
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
1917
|
+
}
|
|
1918
|
+
const obj_isEnabled = obj.isEnabled;
|
|
1919
|
+
const path_isEnabled = path + '.isEnabled';
|
|
1920
|
+
let obj_isEnabled_union0 = null;
|
|
1921
|
+
const obj_isEnabled_union0_error = (() => {
|
|
1922
|
+
if (typeof obj_isEnabled !== 'boolean') {
|
|
1923
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isEnabled + '" (at "' + path_isEnabled + '")');
|
|
1924
|
+
}
|
|
1925
|
+
})();
|
|
1926
|
+
if (obj_isEnabled_union0_error != null) {
|
|
1927
|
+
obj_isEnabled_union0 = obj_isEnabled_union0_error.message;
|
|
1928
|
+
}
|
|
1929
|
+
let obj_isEnabled_union1 = null;
|
|
1930
|
+
const obj_isEnabled_union1_error = (() => {
|
|
1931
|
+
if (obj_isEnabled !== null) {
|
|
1932
|
+
return new TypeError('Expected "null" but received "' + typeof obj_isEnabled + '" (at "' + path_isEnabled + '")');
|
|
1933
|
+
}
|
|
1934
|
+
})();
|
|
1935
|
+
if (obj_isEnabled_union1_error != null) {
|
|
1936
|
+
obj_isEnabled_union1 = obj_isEnabled_union1_error.message;
|
|
1937
|
+
}
|
|
1938
|
+
if (obj_isEnabled_union0 && obj_isEnabled_union1) {
|
|
1939
|
+
let message = 'Object doesn\'t match union (at "' + path_isEnabled + '")';
|
|
1940
|
+
message += '\n' + obj_isEnabled_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1941
|
+
message += '\n' + obj_isEnabled_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1942
|
+
return new TypeError(message);
|
|
1943
|
+
}
|
|
1944
|
+
const obj_joinType = obj.joinType;
|
|
1945
|
+
const path_joinType = path + '.joinType';
|
|
1946
|
+
if (typeof obj_joinType !== 'string') {
|
|
1947
|
+
return new TypeError('Expected "string" but received "' + typeof obj_joinType + '" (at "' + path_joinType + '")');
|
|
1948
|
+
}
|
|
1949
|
+
const obj_label = obj.label;
|
|
1950
|
+
const path_label = path + '.label';
|
|
1951
|
+
let obj_label_union0 = null;
|
|
1952
|
+
const obj_label_union0_error = (() => {
|
|
1953
|
+
if (typeof obj_label !== 'string') {
|
|
1954
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
1955
|
+
}
|
|
1956
|
+
})();
|
|
1957
|
+
if (obj_label_union0_error != null) {
|
|
1958
|
+
obj_label_union0 = obj_label_union0_error.message;
|
|
1959
|
+
}
|
|
1960
|
+
let obj_label_union1 = null;
|
|
1961
|
+
const obj_label_union1_error = (() => {
|
|
1962
|
+
if (obj_label !== null) {
|
|
1963
|
+
return new TypeError('Expected "null" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
1964
|
+
}
|
|
1965
|
+
})();
|
|
1966
|
+
if (obj_label_union1_error != null) {
|
|
1967
|
+
obj_label_union1 = obj_label_union1_error.message;
|
|
1968
|
+
}
|
|
1969
|
+
if (obj_label_union0 && obj_label_union1) {
|
|
1970
|
+
let message = 'Object doesn\'t match union (at "' + path_label + '")';
|
|
1971
|
+
message += '\n' + obj_label_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1972
|
+
message += '\n' + obj_label_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1973
|
+
return new TypeError(message);
|
|
1974
|
+
}
|
|
1975
|
+
if (obj.lastModifiedBy !== undefined) {
|
|
1976
|
+
const obj_lastModifiedBy = obj.lastModifiedBy;
|
|
1977
|
+
const path_lastModifiedBy = path + '.lastModifiedBy';
|
|
1978
|
+
let obj_lastModifiedBy_union0 = null;
|
|
1979
|
+
const obj_lastModifiedBy_union0_error = (() => {
|
|
1980
|
+
if (typeof obj_lastModifiedBy !== 'string') {
|
|
1981
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedBy + '" (at "' + path_lastModifiedBy + '")');
|
|
1982
|
+
}
|
|
1983
|
+
})();
|
|
1984
|
+
if (obj_lastModifiedBy_union0_error != null) {
|
|
1985
|
+
obj_lastModifiedBy_union0 = obj_lastModifiedBy_union0_error.message;
|
|
1986
|
+
}
|
|
1987
|
+
let obj_lastModifiedBy_union1 = null;
|
|
1988
|
+
const obj_lastModifiedBy_union1_error = (() => {
|
|
1989
|
+
if (obj_lastModifiedBy !== null) {
|
|
1990
|
+
return new TypeError('Expected "null" but received "' + typeof obj_lastModifiedBy + '" (at "' + path_lastModifiedBy + '")');
|
|
1991
|
+
}
|
|
1992
|
+
})();
|
|
1993
|
+
if (obj_lastModifiedBy_union1_error != null) {
|
|
1994
|
+
obj_lastModifiedBy_union1 = obj_lastModifiedBy_union1_error.message;
|
|
1995
|
+
}
|
|
1996
|
+
if (obj_lastModifiedBy_union0 && obj_lastModifiedBy_union1) {
|
|
1997
|
+
let message = 'Object doesn\'t match union (at "' + path_lastModifiedBy + '")';
|
|
1998
|
+
message += '\n' + obj_lastModifiedBy_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1999
|
+
message += '\n' + obj_lastModifiedBy_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2000
|
+
return new TypeError(message);
|
|
2001
|
+
}
|
|
2002
|
+
}
|
|
2003
|
+
if (obj.lastModifiedDate !== undefined) {
|
|
2004
|
+
const obj_lastModifiedDate = obj.lastModifiedDate;
|
|
2005
|
+
const path_lastModifiedDate = path + '.lastModifiedDate';
|
|
2006
|
+
let obj_lastModifiedDate_union0 = null;
|
|
2007
|
+
const obj_lastModifiedDate_union0_error = (() => {
|
|
2008
|
+
if (typeof obj_lastModifiedDate !== 'string') {
|
|
2009
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
|
|
2010
|
+
}
|
|
2011
|
+
})();
|
|
2012
|
+
if (obj_lastModifiedDate_union0_error != null) {
|
|
2013
|
+
obj_lastModifiedDate_union0 = obj_lastModifiedDate_union0_error.message;
|
|
2014
|
+
}
|
|
2015
|
+
let obj_lastModifiedDate_union1 = null;
|
|
2016
|
+
const obj_lastModifiedDate_union1_error = (() => {
|
|
2017
|
+
if (obj_lastModifiedDate !== null) {
|
|
2018
|
+
return new TypeError('Expected "null" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
|
|
2019
|
+
}
|
|
2020
|
+
})();
|
|
2021
|
+
if (obj_lastModifiedDate_union1_error != null) {
|
|
2022
|
+
obj_lastModifiedDate_union1 = obj_lastModifiedDate_union1_error.message;
|
|
2023
|
+
}
|
|
2024
|
+
if (obj_lastModifiedDate_union0 && obj_lastModifiedDate_union1) {
|
|
2025
|
+
let message = 'Object doesn\'t match union (at "' + path_lastModifiedDate + '")';
|
|
2026
|
+
message += '\n' + obj_lastModifiedDate_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2027
|
+
message += '\n' + obj_lastModifiedDate_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2028
|
+
return new TypeError(message);
|
|
2029
|
+
}
|
|
2030
|
+
}
|
|
2031
|
+
const obj_leftSemanticDefinitionApiName = obj.leftSemanticDefinitionApiName;
|
|
2032
|
+
const path_leftSemanticDefinitionApiName = path + '.leftSemanticDefinitionApiName';
|
|
2033
|
+
let obj_leftSemanticDefinitionApiName_union0 = null;
|
|
2034
|
+
const obj_leftSemanticDefinitionApiName_union0_error = (() => {
|
|
2035
|
+
if (typeof obj_leftSemanticDefinitionApiName !== 'string') {
|
|
2036
|
+
return new TypeError('Expected "string" but received "' + typeof obj_leftSemanticDefinitionApiName + '" (at "' + path_leftSemanticDefinitionApiName + '")');
|
|
2037
|
+
}
|
|
2038
|
+
})();
|
|
2039
|
+
if (obj_leftSemanticDefinitionApiName_union0_error != null) {
|
|
2040
|
+
obj_leftSemanticDefinitionApiName_union0 = obj_leftSemanticDefinitionApiName_union0_error.message;
|
|
2041
|
+
}
|
|
2042
|
+
let obj_leftSemanticDefinitionApiName_union1 = null;
|
|
2043
|
+
const obj_leftSemanticDefinitionApiName_union1_error = (() => {
|
|
2044
|
+
if (obj_leftSemanticDefinitionApiName !== null) {
|
|
2045
|
+
return new TypeError('Expected "null" but received "' + typeof obj_leftSemanticDefinitionApiName + '" (at "' + path_leftSemanticDefinitionApiName + '")');
|
|
2046
|
+
}
|
|
2047
|
+
})();
|
|
2048
|
+
if (obj_leftSemanticDefinitionApiName_union1_error != null) {
|
|
2049
|
+
obj_leftSemanticDefinitionApiName_union1 = obj_leftSemanticDefinitionApiName_union1_error.message;
|
|
2050
|
+
}
|
|
2051
|
+
if (obj_leftSemanticDefinitionApiName_union0 && obj_leftSemanticDefinitionApiName_union1) {
|
|
2052
|
+
let message = 'Object doesn\'t match union (at "' + path_leftSemanticDefinitionApiName + '")';
|
|
2053
|
+
message += '\n' + obj_leftSemanticDefinitionApiName_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2054
|
+
message += '\n' + obj_leftSemanticDefinitionApiName_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2055
|
+
return new TypeError(message);
|
|
2056
|
+
}
|
|
2057
|
+
if (obj.logicalViewId !== undefined) {
|
|
2058
|
+
const obj_logicalViewId = obj.logicalViewId;
|
|
2059
|
+
const path_logicalViewId = path + '.logicalViewId';
|
|
2060
|
+
let obj_logicalViewId_union0 = null;
|
|
2061
|
+
const obj_logicalViewId_union0_error = (() => {
|
|
2062
|
+
if (typeof obj_logicalViewId !== 'string') {
|
|
2063
|
+
return new TypeError('Expected "string" but received "' + typeof obj_logicalViewId + '" (at "' + path_logicalViewId + '")');
|
|
2064
|
+
}
|
|
2065
|
+
})();
|
|
2066
|
+
if (obj_logicalViewId_union0_error != null) {
|
|
2067
|
+
obj_logicalViewId_union0 = obj_logicalViewId_union0_error.message;
|
|
2068
|
+
}
|
|
2069
|
+
let obj_logicalViewId_union1 = null;
|
|
2070
|
+
const obj_logicalViewId_union1_error = (() => {
|
|
2071
|
+
if (obj_logicalViewId !== null) {
|
|
2072
|
+
return new TypeError('Expected "null" but received "' + typeof obj_logicalViewId + '" (at "' + path_logicalViewId + '")');
|
|
2073
|
+
}
|
|
2074
|
+
})();
|
|
2075
|
+
if (obj_logicalViewId_union1_error != null) {
|
|
2076
|
+
obj_logicalViewId_union1 = obj_logicalViewId_union1_error.message;
|
|
2077
|
+
}
|
|
2078
|
+
if (obj_logicalViewId_union0 && obj_logicalViewId_union1) {
|
|
2079
|
+
let message = 'Object doesn\'t match union (at "' + path_logicalViewId + '")';
|
|
2080
|
+
message += '\n' + obj_logicalViewId_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2081
|
+
message += '\n' + obj_logicalViewId_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2082
|
+
return new TypeError(message);
|
|
2083
|
+
}
|
|
2084
|
+
}
|
|
2085
|
+
const obj_rightSemanticDefinitionApiName = obj.rightSemanticDefinitionApiName;
|
|
2086
|
+
const path_rightSemanticDefinitionApiName = path + '.rightSemanticDefinitionApiName';
|
|
2087
|
+
let obj_rightSemanticDefinitionApiName_union0 = null;
|
|
2088
|
+
const obj_rightSemanticDefinitionApiName_union0_error = (() => {
|
|
2089
|
+
if (typeof obj_rightSemanticDefinitionApiName !== 'string') {
|
|
2090
|
+
return new TypeError('Expected "string" but received "' + typeof obj_rightSemanticDefinitionApiName + '" (at "' + path_rightSemanticDefinitionApiName + '")');
|
|
2091
|
+
}
|
|
2092
|
+
})();
|
|
2093
|
+
if (obj_rightSemanticDefinitionApiName_union0_error != null) {
|
|
2094
|
+
obj_rightSemanticDefinitionApiName_union0 = obj_rightSemanticDefinitionApiName_union0_error.message;
|
|
2095
|
+
}
|
|
2096
|
+
let obj_rightSemanticDefinitionApiName_union1 = null;
|
|
2097
|
+
const obj_rightSemanticDefinitionApiName_union1_error = (() => {
|
|
2098
|
+
if (obj_rightSemanticDefinitionApiName !== null) {
|
|
2099
|
+
return new TypeError('Expected "null" but received "' + typeof obj_rightSemanticDefinitionApiName + '" (at "' + path_rightSemanticDefinitionApiName + '")');
|
|
2100
|
+
}
|
|
2101
|
+
})();
|
|
2102
|
+
if (obj_rightSemanticDefinitionApiName_union1_error != null) {
|
|
2103
|
+
obj_rightSemanticDefinitionApiName_union1 = obj_rightSemanticDefinitionApiName_union1_error.message;
|
|
2104
|
+
}
|
|
2105
|
+
if (obj_rightSemanticDefinitionApiName_union0 && obj_rightSemanticDefinitionApiName_union1) {
|
|
2106
|
+
let message = 'Object doesn\'t match union (at "' + path_rightSemanticDefinitionApiName + '")';
|
|
2107
|
+
message += '\n' + obj_rightSemanticDefinitionApiName_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2108
|
+
message += '\n' + obj_rightSemanticDefinitionApiName_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2109
|
+
return new TypeError(message);
|
|
2110
|
+
}
|
|
2111
|
+
})();
|
|
2112
|
+
return v_error === undefined ? null : v_error;
|
|
2113
|
+
}
|
|
2114
|
+
|
|
2115
|
+
function validate$a(obj, path = 'SemanticLogicalViewOutputRepresentation') {
|
|
2116
|
+
const v_error = (() => {
|
|
2117
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2118
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2119
|
+
}
|
|
2120
|
+
const obj_apiName = obj.apiName;
|
|
2121
|
+
const path_apiName = path + '.apiName';
|
|
2122
|
+
if (typeof obj_apiName !== 'string') {
|
|
2123
|
+
return new TypeError('Expected "string" but received "' + typeof obj_apiName + '" (at "' + path_apiName + '")');
|
|
2124
|
+
}
|
|
2125
|
+
const obj_createdBy = obj.createdBy;
|
|
2126
|
+
const path_createdBy = path + '.createdBy';
|
|
2127
|
+
if (typeof obj_createdBy !== 'string') {
|
|
2128
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdBy + '" (at "' + path_createdBy + '")');
|
|
2129
|
+
}
|
|
2130
|
+
const obj_createdDate = obj.createdDate;
|
|
2131
|
+
const path_createdDate = path + '.createdDate';
|
|
2132
|
+
if (typeof obj_createdDate !== 'string') {
|
|
2133
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
|
|
2134
|
+
}
|
|
2135
|
+
if (obj.description !== undefined) {
|
|
2136
|
+
const obj_description = obj.description;
|
|
2137
|
+
const path_description = path + '.description';
|
|
2138
|
+
let obj_description_union0 = null;
|
|
2139
|
+
const obj_description_union0_error = (() => {
|
|
2140
|
+
if (typeof obj_description !== 'string') {
|
|
2141
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
2142
|
+
}
|
|
2143
|
+
})();
|
|
2144
|
+
if (obj_description_union0_error != null) {
|
|
2145
|
+
obj_description_union0 = obj_description_union0_error.message;
|
|
2146
|
+
}
|
|
2147
|
+
let obj_description_union1 = null;
|
|
2148
|
+
const obj_description_union1_error = (() => {
|
|
2149
|
+
if (obj_description !== null) {
|
|
2150
|
+
return new TypeError('Expected "null" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
2151
|
+
}
|
|
2152
|
+
})();
|
|
2153
|
+
if (obj_description_union1_error != null) {
|
|
2154
|
+
obj_description_union1 = obj_description_union1_error.message;
|
|
2155
|
+
}
|
|
2156
|
+
if (obj_description_union0 && obj_description_union1) {
|
|
2157
|
+
let message = 'Object doesn\'t match union (at "' + path_description + '")';
|
|
2158
|
+
message += '\n' + obj_description_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2159
|
+
message += '\n' + obj_description_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2160
|
+
return new TypeError(message);
|
|
2161
|
+
}
|
|
2162
|
+
}
|
|
2163
|
+
if (obj.filterLogic !== undefined) {
|
|
2164
|
+
const obj_filterLogic = obj.filterLogic;
|
|
2165
|
+
const path_filterLogic = path + '.filterLogic';
|
|
2166
|
+
let obj_filterLogic_union0 = null;
|
|
2167
|
+
const obj_filterLogic_union0_error = (() => {
|
|
2168
|
+
if (typeof obj_filterLogic !== 'string') {
|
|
2169
|
+
return new TypeError('Expected "string" but received "' + typeof obj_filterLogic + '" (at "' + path_filterLogic + '")');
|
|
2170
|
+
}
|
|
2171
|
+
})();
|
|
2172
|
+
if (obj_filterLogic_union0_error != null) {
|
|
2173
|
+
obj_filterLogic_union0 = obj_filterLogic_union0_error.message;
|
|
2174
|
+
}
|
|
2175
|
+
let obj_filterLogic_union1 = null;
|
|
2176
|
+
const obj_filterLogic_union1_error = (() => {
|
|
2177
|
+
if (obj_filterLogic !== null) {
|
|
2178
|
+
return new TypeError('Expected "null" but received "' + typeof obj_filterLogic + '" (at "' + path_filterLogic + '")');
|
|
2179
|
+
}
|
|
2180
|
+
})();
|
|
2181
|
+
if (obj_filterLogic_union1_error != null) {
|
|
2182
|
+
obj_filterLogic_union1 = obj_filterLogic_union1_error.message;
|
|
2183
|
+
}
|
|
2184
|
+
if (obj_filterLogic_union0 && obj_filterLogic_union1) {
|
|
2185
|
+
let message = 'Object doesn\'t match union (at "' + path_filterLogic + '")';
|
|
2186
|
+
message += '\n' + obj_filterLogic_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2187
|
+
message += '\n' + obj_filterLogic_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2188
|
+
return new TypeError(message);
|
|
2189
|
+
}
|
|
2190
|
+
}
|
|
2191
|
+
if (obj.filters !== undefined) {
|
|
2192
|
+
const obj_filters = obj.filters;
|
|
2193
|
+
const path_filters = path + '.filters';
|
|
2194
|
+
if (!ArrayIsArray(obj_filters)) {
|
|
2195
|
+
return new TypeError('Expected "array" but received "' + typeof obj_filters + '" (at "' + path_filters + '")');
|
|
2196
|
+
}
|
|
2197
|
+
for (let i = 0; i < obj_filters.length; i++) {
|
|
2198
|
+
const obj_filters_item = obj_filters[i];
|
|
2199
|
+
const path_filters_item = path_filters + '[' + i + ']';
|
|
2200
|
+
const referencepath_filters_itemValidationError = validate$i(obj_filters_item, path_filters_item);
|
|
2201
|
+
if (referencepath_filters_itemValidationError !== null) {
|
|
2202
|
+
let message = 'Object doesn\'t match SemanticFilterOutputRepresentation (at "' + path_filters_item + '")\n';
|
|
2203
|
+
message += referencepath_filters_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2204
|
+
return new TypeError(message);
|
|
2205
|
+
}
|
|
2206
|
+
}
|
|
2207
|
+
}
|
|
2208
|
+
const obj_id = obj.id;
|
|
2209
|
+
const path_id = path + '.id';
|
|
2210
|
+
if (typeof obj_id !== 'string') {
|
|
2211
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
2212
|
+
}
|
|
2213
|
+
const obj_label = obj.label;
|
|
2214
|
+
const path_label = path + '.label';
|
|
2215
|
+
let obj_label_union0 = null;
|
|
2216
|
+
const obj_label_union0_error = (() => {
|
|
2217
|
+
if (typeof obj_label !== 'string') {
|
|
2218
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
2219
|
+
}
|
|
2220
|
+
})();
|
|
2221
|
+
if (obj_label_union0_error != null) {
|
|
2222
|
+
obj_label_union0 = obj_label_union0_error.message;
|
|
2223
|
+
}
|
|
2224
|
+
let obj_label_union1 = null;
|
|
2225
|
+
const obj_label_union1_error = (() => {
|
|
2226
|
+
if (obj_label !== null) {
|
|
2227
|
+
return new TypeError('Expected "null" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
2228
|
+
}
|
|
2229
|
+
})();
|
|
2230
|
+
if (obj_label_union1_error != null) {
|
|
2231
|
+
obj_label_union1 = obj_label_union1_error.message;
|
|
2232
|
+
}
|
|
2233
|
+
if (obj_label_union0 && obj_label_union1) {
|
|
2234
|
+
let message = 'Object doesn\'t match union (at "' + path_label + '")';
|
|
2235
|
+
message += '\n' + obj_label_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2236
|
+
message += '\n' + obj_label_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2237
|
+
return new TypeError(message);
|
|
2238
|
+
}
|
|
2239
|
+
if (obj.lastModifiedBy !== undefined) {
|
|
2240
|
+
const obj_lastModifiedBy = obj.lastModifiedBy;
|
|
2241
|
+
const path_lastModifiedBy = path + '.lastModifiedBy';
|
|
2242
|
+
let obj_lastModifiedBy_union0 = null;
|
|
2243
|
+
const obj_lastModifiedBy_union0_error = (() => {
|
|
2244
|
+
if (typeof obj_lastModifiedBy !== 'string') {
|
|
2245
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedBy + '" (at "' + path_lastModifiedBy + '")');
|
|
2246
|
+
}
|
|
2247
|
+
})();
|
|
2248
|
+
if (obj_lastModifiedBy_union0_error != null) {
|
|
2249
|
+
obj_lastModifiedBy_union0 = obj_lastModifiedBy_union0_error.message;
|
|
2250
|
+
}
|
|
2251
|
+
let obj_lastModifiedBy_union1 = null;
|
|
2252
|
+
const obj_lastModifiedBy_union1_error = (() => {
|
|
2253
|
+
if (obj_lastModifiedBy !== null) {
|
|
2254
|
+
return new TypeError('Expected "null" but received "' + typeof obj_lastModifiedBy + '" (at "' + path_lastModifiedBy + '")');
|
|
2255
|
+
}
|
|
2256
|
+
})();
|
|
2257
|
+
if (obj_lastModifiedBy_union1_error != null) {
|
|
2258
|
+
obj_lastModifiedBy_union1 = obj_lastModifiedBy_union1_error.message;
|
|
2259
|
+
}
|
|
2260
|
+
if (obj_lastModifiedBy_union0 && obj_lastModifiedBy_union1) {
|
|
2261
|
+
let message = 'Object doesn\'t match union (at "' + path_lastModifiedBy + '")';
|
|
2262
|
+
message += '\n' + obj_lastModifiedBy_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2263
|
+
message += '\n' + obj_lastModifiedBy_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2264
|
+
return new TypeError(message);
|
|
2265
|
+
}
|
|
2266
|
+
}
|
|
2267
|
+
if (obj.lastModifiedDate !== undefined) {
|
|
2268
|
+
const obj_lastModifiedDate = obj.lastModifiedDate;
|
|
2269
|
+
const path_lastModifiedDate = path + '.lastModifiedDate';
|
|
2270
|
+
let obj_lastModifiedDate_union0 = null;
|
|
2271
|
+
const obj_lastModifiedDate_union0_error = (() => {
|
|
2272
|
+
if (typeof obj_lastModifiedDate !== 'string') {
|
|
2273
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
|
|
2274
|
+
}
|
|
2275
|
+
})();
|
|
2276
|
+
if (obj_lastModifiedDate_union0_error != null) {
|
|
2277
|
+
obj_lastModifiedDate_union0 = obj_lastModifiedDate_union0_error.message;
|
|
2278
|
+
}
|
|
2279
|
+
let obj_lastModifiedDate_union1 = null;
|
|
2280
|
+
const obj_lastModifiedDate_union1_error = (() => {
|
|
2281
|
+
if (obj_lastModifiedDate !== null) {
|
|
2282
|
+
return new TypeError('Expected "null" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
|
|
2283
|
+
}
|
|
2284
|
+
})();
|
|
2285
|
+
if (obj_lastModifiedDate_union1_error != null) {
|
|
2286
|
+
obj_lastModifiedDate_union1 = obj_lastModifiedDate_union1_error.message;
|
|
2287
|
+
}
|
|
2288
|
+
if (obj_lastModifiedDate_union0 && obj_lastModifiedDate_union1) {
|
|
2289
|
+
let message = 'Object doesn\'t match union (at "' + path_lastModifiedDate + '")';
|
|
2290
|
+
message += '\n' + obj_lastModifiedDate_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2291
|
+
message += '\n' + obj_lastModifiedDate_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2292
|
+
return new TypeError(message);
|
|
2293
|
+
}
|
|
2294
|
+
}
|
|
2295
|
+
if (obj.semanticDataObjects !== undefined) {
|
|
2296
|
+
const obj_semanticDataObjects = obj.semanticDataObjects;
|
|
2297
|
+
const path_semanticDataObjects = path + '.semanticDataObjects';
|
|
2298
|
+
if (!ArrayIsArray(obj_semanticDataObjects)) {
|
|
2299
|
+
return new TypeError('Expected "array" but received "' + typeof obj_semanticDataObjects + '" (at "' + path_semanticDataObjects + '")');
|
|
2300
|
+
}
|
|
2301
|
+
for (let i = 0; i < obj_semanticDataObjects.length; i++) {
|
|
2302
|
+
const obj_semanticDataObjects_item = obj_semanticDataObjects[i];
|
|
2303
|
+
const path_semanticDataObjects_item = path_semanticDataObjects + '[' + i + ']';
|
|
2304
|
+
const referencepath_semanticDataObjects_itemValidationError = validate$d(obj_semanticDataObjects_item, path_semanticDataObjects_item);
|
|
2305
|
+
if (referencepath_semanticDataObjects_itemValidationError !== null) {
|
|
2306
|
+
let message = 'Object doesn\'t match SemanticDataObjectOutputRepresentation (at "' + path_semanticDataObjects_item + '")\n';
|
|
2307
|
+
message += referencepath_semanticDataObjects_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2308
|
+
return new TypeError(message);
|
|
2309
|
+
}
|
|
2310
|
+
}
|
|
2311
|
+
}
|
|
2312
|
+
if (obj.semanticRelationships !== undefined) {
|
|
2313
|
+
const obj_semanticRelationships = obj.semanticRelationships;
|
|
2314
|
+
const path_semanticRelationships = path + '.semanticRelationships';
|
|
2315
|
+
if (!ArrayIsArray(obj_semanticRelationships)) {
|
|
2316
|
+
return new TypeError('Expected "array" but received "' + typeof obj_semanticRelationships + '" (at "' + path_semanticRelationships + '")');
|
|
2317
|
+
}
|
|
2318
|
+
for (let i = 0; i < obj_semanticRelationships.length; i++) {
|
|
2319
|
+
const obj_semanticRelationships_item = obj_semanticRelationships[i];
|
|
2320
|
+
const path_semanticRelationships_item = path_semanticRelationships + '[' + i + ']';
|
|
2321
|
+
const referencepath_semanticRelationships_itemValidationError = validate$b(obj_semanticRelationships_item, path_semanticRelationships_item);
|
|
2322
|
+
if (referencepath_semanticRelationships_itemValidationError !== null) {
|
|
2323
|
+
let message = 'Object doesn\'t match SemanticRelationshipOutputRepresentation (at "' + path_semanticRelationships_item + '")\n';
|
|
2324
|
+
message += referencepath_semanticRelationships_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2325
|
+
return new TypeError(message);
|
|
2326
|
+
}
|
|
2327
|
+
}
|
|
2328
|
+
}
|
|
2329
|
+
})();
|
|
2330
|
+
return v_error === undefined ? null : v_error;
|
|
2331
|
+
}
|
|
2332
|
+
|
|
2333
|
+
function validate$9(obj, path = 'SemanticDataObjectFieldReferenceOutputRepresentation') {
|
|
2334
|
+
const v_error = (() => {
|
|
2335
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2336
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2337
|
+
}
|
|
2338
|
+
const obj_dataObjectApiName = obj.dataObjectApiName;
|
|
2339
|
+
const path_dataObjectApiName = path + '.dataObjectApiName';
|
|
2340
|
+
let obj_dataObjectApiName_union0 = null;
|
|
2341
|
+
const obj_dataObjectApiName_union0_error = (() => {
|
|
2342
|
+
if (typeof obj_dataObjectApiName !== 'string') {
|
|
2343
|
+
return new TypeError('Expected "string" but received "' + typeof obj_dataObjectApiName + '" (at "' + path_dataObjectApiName + '")');
|
|
2344
|
+
}
|
|
2345
|
+
})();
|
|
2346
|
+
if (obj_dataObjectApiName_union0_error != null) {
|
|
2347
|
+
obj_dataObjectApiName_union0 = obj_dataObjectApiName_union0_error.message;
|
|
2348
|
+
}
|
|
2349
|
+
let obj_dataObjectApiName_union1 = null;
|
|
2350
|
+
const obj_dataObjectApiName_union1_error = (() => {
|
|
2351
|
+
if (obj_dataObjectApiName !== null) {
|
|
2352
|
+
return new TypeError('Expected "null" but received "' + typeof obj_dataObjectApiName + '" (at "' + path_dataObjectApiName + '")');
|
|
2353
|
+
}
|
|
2354
|
+
})();
|
|
2355
|
+
if (obj_dataObjectApiName_union1_error != null) {
|
|
2356
|
+
obj_dataObjectApiName_union1 = obj_dataObjectApiName_union1_error.message;
|
|
2357
|
+
}
|
|
2358
|
+
if (obj_dataObjectApiName_union0 && obj_dataObjectApiName_union1) {
|
|
2359
|
+
let message = 'Object doesn\'t match union (at "' + path_dataObjectApiName + '")';
|
|
2360
|
+
message += '\n' + obj_dataObjectApiName_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2361
|
+
message += '\n' + obj_dataObjectApiName_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2362
|
+
return new TypeError(message);
|
|
2363
|
+
}
|
|
2364
|
+
const obj_fieldApiName = obj.fieldApiName;
|
|
2365
|
+
const path_fieldApiName = path + '.fieldApiName';
|
|
2366
|
+
let obj_fieldApiName_union0 = null;
|
|
2367
|
+
const obj_fieldApiName_union0_error = (() => {
|
|
2368
|
+
if (typeof obj_fieldApiName !== 'string') {
|
|
2369
|
+
return new TypeError('Expected "string" but received "' + typeof obj_fieldApiName + '" (at "' + path_fieldApiName + '")');
|
|
2370
|
+
}
|
|
2371
|
+
})();
|
|
2372
|
+
if (obj_fieldApiName_union0_error != null) {
|
|
2373
|
+
obj_fieldApiName_union0 = obj_fieldApiName_union0_error.message;
|
|
2374
|
+
}
|
|
2375
|
+
let obj_fieldApiName_union1 = null;
|
|
2376
|
+
const obj_fieldApiName_union1_error = (() => {
|
|
2377
|
+
if (obj_fieldApiName !== null) {
|
|
2378
|
+
return new TypeError('Expected "null" but received "' + typeof obj_fieldApiName + '" (at "' + path_fieldApiName + '")');
|
|
2379
|
+
}
|
|
2380
|
+
})();
|
|
2381
|
+
if (obj_fieldApiName_union1_error != null) {
|
|
2382
|
+
obj_fieldApiName_union1 = obj_fieldApiName_union1_error.message;
|
|
2383
|
+
}
|
|
2384
|
+
if (obj_fieldApiName_union0 && obj_fieldApiName_union1) {
|
|
2385
|
+
let message = 'Object doesn\'t match union (at "' + path_fieldApiName + '")';
|
|
2386
|
+
message += '\n' + obj_fieldApiName_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2387
|
+
message += '\n' + obj_fieldApiName_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2388
|
+
return new TypeError(message);
|
|
2389
|
+
}
|
|
2390
|
+
})();
|
|
2391
|
+
return v_error === undefined ? null : v_error;
|
|
2392
|
+
}
|
|
2393
|
+
|
|
2394
|
+
function validate$8(obj, path = 'SemanticFieldReferenceOutputRepresentation') {
|
|
2395
|
+
const v_error = (() => {
|
|
2396
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2397
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2398
|
+
}
|
|
2399
|
+
if (obj.calculatedFieldApiName !== undefined) {
|
|
2400
|
+
const obj_calculatedFieldApiName = obj.calculatedFieldApiName;
|
|
2401
|
+
const path_calculatedFieldApiName = path + '.calculatedFieldApiName';
|
|
2402
|
+
let obj_calculatedFieldApiName_union0 = null;
|
|
2403
|
+
const obj_calculatedFieldApiName_union0_error = (() => {
|
|
2404
|
+
if (typeof obj_calculatedFieldApiName !== 'string') {
|
|
2405
|
+
return new TypeError('Expected "string" but received "' + typeof obj_calculatedFieldApiName + '" (at "' + path_calculatedFieldApiName + '")');
|
|
2406
|
+
}
|
|
2407
|
+
})();
|
|
2408
|
+
if (obj_calculatedFieldApiName_union0_error != null) {
|
|
2409
|
+
obj_calculatedFieldApiName_union0 = obj_calculatedFieldApiName_union0_error.message;
|
|
2410
|
+
}
|
|
2411
|
+
let obj_calculatedFieldApiName_union1 = null;
|
|
2412
|
+
const obj_calculatedFieldApiName_union1_error = (() => {
|
|
2413
|
+
if (obj_calculatedFieldApiName !== null) {
|
|
2414
|
+
return new TypeError('Expected "null" but received "' + typeof obj_calculatedFieldApiName + '" (at "' + path_calculatedFieldApiName + '")');
|
|
2415
|
+
}
|
|
2416
|
+
})();
|
|
2417
|
+
if (obj_calculatedFieldApiName_union1_error != null) {
|
|
2418
|
+
obj_calculatedFieldApiName_union1 = obj_calculatedFieldApiName_union1_error.message;
|
|
2419
|
+
}
|
|
2420
|
+
if (obj_calculatedFieldApiName_union0 && obj_calculatedFieldApiName_union1) {
|
|
2421
|
+
let message = 'Object doesn\'t match union (at "' + path_calculatedFieldApiName + '")';
|
|
2422
|
+
message += '\n' + obj_calculatedFieldApiName_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2423
|
+
message += '\n' + obj_calculatedFieldApiName_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2424
|
+
return new TypeError(message);
|
|
2425
|
+
}
|
|
2426
|
+
}
|
|
2427
|
+
if (obj.dataObjectFieldReference !== undefined) {
|
|
2428
|
+
const obj_dataObjectFieldReference = obj.dataObjectFieldReference;
|
|
2429
|
+
const path_dataObjectFieldReference = path + '.dataObjectFieldReference';
|
|
2430
|
+
const referencepath_dataObjectFieldReferenceValidationError = validate$9(obj_dataObjectFieldReference, path_dataObjectFieldReference);
|
|
2431
|
+
if (referencepath_dataObjectFieldReferenceValidationError !== null) {
|
|
2432
|
+
let message = 'Object doesn\'t match SemanticDataObjectFieldReferenceOutputRepresentation (at "' + path_dataObjectFieldReference + '")\n';
|
|
2433
|
+
message += referencepath_dataObjectFieldReferenceValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2434
|
+
return new TypeError(message);
|
|
2435
|
+
}
|
|
2436
|
+
}
|
|
2437
|
+
})();
|
|
2438
|
+
return v_error === undefined ? null : v_error;
|
|
2439
|
+
}
|
|
2440
|
+
|
|
2441
|
+
function validate$7(obj, path = 'SemanticIdentifyingDimensionOutputRepresentation') {
|
|
2442
|
+
const v_error = (() => {
|
|
2443
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2444
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2445
|
+
}
|
|
2446
|
+
if (obj.identifierDimensionReference !== undefined) {
|
|
2447
|
+
const obj_identifierDimensionReference = obj.identifierDimensionReference;
|
|
2448
|
+
const path_identifierDimensionReference = path + '.identifierDimensionReference';
|
|
2449
|
+
const referencepath_identifierDimensionReferenceValidationError = validate$8(obj_identifierDimensionReference, path_identifierDimensionReference);
|
|
2450
|
+
if (referencepath_identifierDimensionReferenceValidationError !== null) {
|
|
2451
|
+
let message = 'Object doesn\'t match SemanticFieldReferenceOutputRepresentation (at "' + path_identifierDimensionReference + '")\n';
|
|
2452
|
+
message += referencepath_identifierDimensionReferenceValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2453
|
+
return new TypeError(message);
|
|
2454
|
+
}
|
|
2455
|
+
}
|
|
2456
|
+
if (obj.namingDimensionReference !== undefined) {
|
|
2457
|
+
const obj_namingDimensionReference = obj.namingDimensionReference;
|
|
2458
|
+
const path_namingDimensionReference = path + '.namingDimensionReference';
|
|
2459
|
+
const referencepath_namingDimensionReferenceValidationError = validate$8(obj_namingDimensionReference, path_namingDimensionReference);
|
|
2460
|
+
if (referencepath_namingDimensionReferenceValidationError !== null) {
|
|
2461
|
+
let message = 'Object doesn\'t match SemanticFieldReferenceOutputRepresentation (at "' + path_namingDimensionReference + '")\n';
|
|
2462
|
+
message += referencepath_namingDimensionReferenceValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2463
|
+
return new TypeError(message);
|
|
2464
|
+
}
|
|
2465
|
+
}
|
|
2466
|
+
})();
|
|
2467
|
+
return v_error === undefined ? null : v_error;
|
|
2468
|
+
}
|
|
2469
|
+
|
|
2470
|
+
function validate$6(obj, path = 'SemanticInsightTypeOutputRepresentation') {
|
|
2471
|
+
const v_error = (() => {
|
|
2472
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2473
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2474
|
+
}
|
|
2475
|
+
if (obj.enabled !== undefined) {
|
|
2476
|
+
const obj_enabled = obj.enabled;
|
|
2477
|
+
const path_enabled = path + '.enabled';
|
|
2478
|
+
let obj_enabled_union0 = null;
|
|
2479
|
+
const obj_enabled_union0_error = (() => {
|
|
2480
|
+
if (typeof obj_enabled !== 'boolean') {
|
|
2481
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_enabled + '" (at "' + path_enabled + '")');
|
|
2482
|
+
}
|
|
2483
|
+
})();
|
|
2484
|
+
if (obj_enabled_union0_error != null) {
|
|
2485
|
+
obj_enabled_union0 = obj_enabled_union0_error.message;
|
|
2486
|
+
}
|
|
2487
|
+
let obj_enabled_union1 = null;
|
|
2488
|
+
const obj_enabled_union1_error = (() => {
|
|
2489
|
+
if (obj_enabled !== null) {
|
|
2490
|
+
return new TypeError('Expected "null" but received "' + typeof obj_enabled + '" (at "' + path_enabled + '")');
|
|
2491
|
+
}
|
|
2492
|
+
})();
|
|
2493
|
+
if (obj_enabled_union1_error != null) {
|
|
2494
|
+
obj_enabled_union1 = obj_enabled_union1_error.message;
|
|
2495
|
+
}
|
|
2496
|
+
if (obj_enabled_union0 && obj_enabled_union1) {
|
|
2497
|
+
let message = 'Object doesn\'t match union (at "' + path_enabled + '")';
|
|
2498
|
+
message += '\n' + obj_enabled_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2499
|
+
message += '\n' + obj_enabled_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2500
|
+
return new TypeError(message);
|
|
2501
|
+
}
|
|
2502
|
+
}
|
|
2503
|
+
if (obj.type !== undefined) {
|
|
2504
|
+
const obj_type = obj.type;
|
|
2505
|
+
const path_type = path + '.type';
|
|
2506
|
+
if (typeof obj_type !== 'string') {
|
|
2507
|
+
return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
|
|
2508
|
+
}
|
|
2509
|
+
}
|
|
2510
|
+
})();
|
|
2511
|
+
return v_error === undefined ? null : v_error;
|
|
2512
|
+
}
|
|
2513
|
+
|
|
2514
|
+
function validate$5(obj, path = 'SemanticInsightsSettingsOutputRepresentation') {
|
|
2515
|
+
const v_error = (() => {
|
|
2516
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2517
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2518
|
+
}
|
|
2519
|
+
if (obj.identifyingDimension !== undefined) {
|
|
2520
|
+
const obj_identifyingDimension = obj.identifyingDimension;
|
|
2521
|
+
const path_identifyingDimension = path + '.identifyingDimension';
|
|
2522
|
+
const referencepath_identifyingDimensionValidationError = validate$7(obj_identifyingDimension, path_identifyingDimension);
|
|
2523
|
+
if (referencepath_identifyingDimensionValidationError !== null) {
|
|
2524
|
+
let message = 'Object doesn\'t match SemanticIdentifyingDimensionOutputRepresentation (at "' + path_identifyingDimension + '")\n';
|
|
2525
|
+
message += referencepath_identifyingDimensionValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2526
|
+
return new TypeError(message);
|
|
2527
|
+
}
|
|
2528
|
+
}
|
|
2529
|
+
if (obj.insightTypes !== undefined) {
|
|
2530
|
+
const obj_insightTypes = obj.insightTypes;
|
|
2531
|
+
const path_insightTypes = path + '.insightTypes';
|
|
2532
|
+
if (!ArrayIsArray(obj_insightTypes)) {
|
|
2533
|
+
return new TypeError('Expected "array" but received "' + typeof obj_insightTypes + '" (at "' + path_insightTypes + '")');
|
|
2534
|
+
}
|
|
2535
|
+
for (let i = 0; i < obj_insightTypes.length; i++) {
|
|
2536
|
+
const obj_insightTypes_item = obj_insightTypes[i];
|
|
2537
|
+
const path_insightTypes_item = path_insightTypes + '[' + i + ']';
|
|
2538
|
+
const referencepath_insightTypes_itemValidationError = validate$6(obj_insightTypes_item, path_insightTypes_item);
|
|
2539
|
+
if (referencepath_insightTypes_itemValidationError !== null) {
|
|
2540
|
+
let message = 'Object doesn\'t match SemanticInsightTypeOutputRepresentation (at "' + path_insightTypes_item + '")\n';
|
|
2541
|
+
message += referencepath_insightTypes_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2542
|
+
return new TypeError(message);
|
|
2543
|
+
}
|
|
2544
|
+
}
|
|
2545
|
+
}
|
|
2546
|
+
if (obj.insightsDimensionsReferences !== undefined) {
|
|
2547
|
+
const obj_insightsDimensionsReferences = obj.insightsDimensionsReferences;
|
|
2548
|
+
const path_insightsDimensionsReferences = path + '.insightsDimensionsReferences';
|
|
2549
|
+
if (!ArrayIsArray(obj_insightsDimensionsReferences)) {
|
|
2550
|
+
return new TypeError('Expected "array" but received "' + typeof obj_insightsDimensionsReferences + '" (at "' + path_insightsDimensionsReferences + '")');
|
|
2551
|
+
}
|
|
2552
|
+
for (let i = 0; i < obj_insightsDimensionsReferences.length; i++) {
|
|
2553
|
+
const obj_insightsDimensionsReferences_item = obj_insightsDimensionsReferences[i];
|
|
2554
|
+
const path_insightsDimensionsReferences_item = path_insightsDimensionsReferences + '[' + i + ']';
|
|
2555
|
+
const referencepath_insightsDimensionsReferences_itemValidationError = validate$8(obj_insightsDimensionsReferences_item, path_insightsDimensionsReferences_item);
|
|
2556
|
+
if (referencepath_insightsDimensionsReferences_itemValidationError !== null) {
|
|
2557
|
+
let message = 'Object doesn\'t match SemanticFieldReferenceOutputRepresentation (at "' + path_insightsDimensionsReferences_item + '")\n';
|
|
2558
|
+
message += referencepath_insightsDimensionsReferences_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2559
|
+
return new TypeError(message);
|
|
2560
|
+
}
|
|
2561
|
+
}
|
|
2562
|
+
}
|
|
2563
|
+
if (obj.pluralNoun !== undefined) {
|
|
2564
|
+
const obj_pluralNoun = obj.pluralNoun;
|
|
2565
|
+
const path_pluralNoun = path + '.pluralNoun';
|
|
2566
|
+
let obj_pluralNoun_union0 = null;
|
|
2567
|
+
const obj_pluralNoun_union0_error = (() => {
|
|
2568
|
+
if (typeof obj_pluralNoun !== 'string') {
|
|
2569
|
+
return new TypeError('Expected "string" but received "' + typeof obj_pluralNoun + '" (at "' + path_pluralNoun + '")');
|
|
2570
|
+
}
|
|
2571
|
+
})();
|
|
2572
|
+
if (obj_pluralNoun_union0_error != null) {
|
|
2573
|
+
obj_pluralNoun_union0 = obj_pluralNoun_union0_error.message;
|
|
2574
|
+
}
|
|
2575
|
+
let obj_pluralNoun_union1 = null;
|
|
2576
|
+
const obj_pluralNoun_union1_error = (() => {
|
|
2577
|
+
if (obj_pluralNoun !== null) {
|
|
2578
|
+
return new TypeError('Expected "null" but received "' + typeof obj_pluralNoun + '" (at "' + path_pluralNoun + '")');
|
|
2579
|
+
}
|
|
2580
|
+
})();
|
|
2581
|
+
if (obj_pluralNoun_union1_error != null) {
|
|
2582
|
+
obj_pluralNoun_union1 = obj_pluralNoun_union1_error.message;
|
|
2583
|
+
}
|
|
2584
|
+
if (obj_pluralNoun_union0 && obj_pluralNoun_union1) {
|
|
2585
|
+
let message = 'Object doesn\'t match union (at "' + path_pluralNoun + '")';
|
|
2586
|
+
message += '\n' + obj_pluralNoun_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2587
|
+
message += '\n' + obj_pluralNoun_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2588
|
+
return new TypeError(message);
|
|
2589
|
+
}
|
|
2590
|
+
}
|
|
2591
|
+
if (obj.singularNoun !== undefined) {
|
|
2592
|
+
const obj_singularNoun = obj.singularNoun;
|
|
2593
|
+
const path_singularNoun = path + '.singularNoun';
|
|
2594
|
+
let obj_singularNoun_union0 = null;
|
|
2595
|
+
const obj_singularNoun_union0_error = (() => {
|
|
2596
|
+
if (typeof obj_singularNoun !== 'string') {
|
|
2597
|
+
return new TypeError('Expected "string" but received "' + typeof obj_singularNoun + '" (at "' + path_singularNoun + '")');
|
|
2598
|
+
}
|
|
2599
|
+
})();
|
|
2600
|
+
if (obj_singularNoun_union0_error != null) {
|
|
2601
|
+
obj_singularNoun_union0 = obj_singularNoun_union0_error.message;
|
|
2602
|
+
}
|
|
2603
|
+
let obj_singularNoun_union1 = null;
|
|
2604
|
+
const obj_singularNoun_union1_error = (() => {
|
|
2605
|
+
if (obj_singularNoun !== null) {
|
|
2606
|
+
return new TypeError('Expected "null" but received "' + typeof obj_singularNoun + '" (at "' + path_singularNoun + '")');
|
|
2607
|
+
}
|
|
2608
|
+
})();
|
|
2609
|
+
if (obj_singularNoun_union1_error != null) {
|
|
2610
|
+
obj_singularNoun_union1 = obj_singularNoun_union1_error.message;
|
|
2611
|
+
}
|
|
2612
|
+
if (obj_singularNoun_union0 && obj_singularNoun_union1) {
|
|
2613
|
+
let message = 'Object doesn\'t match union (at "' + path_singularNoun + '")';
|
|
2614
|
+
message += '\n' + obj_singularNoun_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2615
|
+
message += '\n' + obj_singularNoun_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2616
|
+
return new TypeError(message);
|
|
2617
|
+
}
|
|
2618
|
+
}
|
|
2619
|
+
})();
|
|
2620
|
+
return v_error === undefined ? null : v_error;
|
|
2621
|
+
}
|
|
2622
|
+
|
|
2623
|
+
function validate$4(obj, path = 'SemanticMetricOutputRepresentation') {
|
|
2624
|
+
const v_error = (() => {
|
|
2625
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2626
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2627
|
+
}
|
|
2628
|
+
if (obj.adjustableFilters !== undefined) {
|
|
2629
|
+
const obj_adjustableFilters = obj.adjustableFilters;
|
|
2630
|
+
const path_adjustableFilters = path + '.adjustableFilters';
|
|
2631
|
+
if (!ArrayIsArray(obj_adjustableFilters)) {
|
|
2632
|
+
return new TypeError('Expected "array" but received "' + typeof obj_adjustableFilters + '" (at "' + path_adjustableFilters + '")');
|
|
2633
|
+
}
|
|
2634
|
+
for (let i = 0; i < obj_adjustableFilters.length; i++) {
|
|
2635
|
+
const obj_adjustableFilters_item = obj_adjustableFilters[i];
|
|
2636
|
+
const path_adjustableFilters_item = path_adjustableFilters + '[' + i + ']';
|
|
2637
|
+
const referencepath_adjustableFilters_itemValidationError = validate$8(obj_adjustableFilters_item, path_adjustableFilters_item);
|
|
2638
|
+
if (referencepath_adjustableFilters_itemValidationError !== null) {
|
|
2639
|
+
let message = 'Object doesn\'t match SemanticFieldReferenceOutputRepresentation (at "' + path_adjustableFilters_item + '")\n';
|
|
2640
|
+
message += referencepath_adjustableFilters_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2641
|
+
return new TypeError(message);
|
|
2642
|
+
}
|
|
2643
|
+
}
|
|
2644
|
+
}
|
|
2645
|
+
const obj_apiName = obj.apiName;
|
|
2646
|
+
const path_apiName = path + '.apiName';
|
|
2647
|
+
if (typeof obj_apiName !== 'string') {
|
|
2648
|
+
return new TypeError('Expected "string" but received "' + typeof obj_apiName + '" (at "' + path_apiName + '")');
|
|
2649
|
+
}
|
|
2650
|
+
const obj_createdBy = obj.createdBy;
|
|
2651
|
+
const path_createdBy = path + '.createdBy';
|
|
2652
|
+
if (typeof obj_createdBy !== 'string') {
|
|
2653
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdBy + '" (at "' + path_createdBy + '")');
|
|
2654
|
+
}
|
|
2655
|
+
const obj_createdDate = obj.createdDate;
|
|
2656
|
+
const path_createdDate = path + '.createdDate';
|
|
2657
|
+
if (typeof obj_createdDate !== 'string') {
|
|
2658
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
|
|
2659
|
+
}
|
|
2660
|
+
if (obj.description !== undefined) {
|
|
2661
|
+
const obj_description = obj.description;
|
|
2662
|
+
const path_description = path + '.description';
|
|
2663
|
+
let obj_description_union0 = null;
|
|
2664
|
+
const obj_description_union0_error = (() => {
|
|
2665
|
+
if (typeof obj_description !== 'string') {
|
|
2666
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
2667
|
+
}
|
|
2668
|
+
})();
|
|
2669
|
+
if (obj_description_union0_error != null) {
|
|
2670
|
+
obj_description_union0 = obj_description_union0_error.message;
|
|
2671
|
+
}
|
|
2672
|
+
let obj_description_union1 = null;
|
|
2673
|
+
const obj_description_union1_error = (() => {
|
|
2674
|
+
if (obj_description !== null) {
|
|
2675
|
+
return new TypeError('Expected "null" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
2676
|
+
}
|
|
2677
|
+
})();
|
|
2678
|
+
if (obj_description_union1_error != null) {
|
|
2679
|
+
obj_description_union1 = obj_description_union1_error.message;
|
|
2680
|
+
}
|
|
2681
|
+
if (obj_description_union0 && obj_description_union1) {
|
|
2682
|
+
let message = 'Object doesn\'t match union (at "' + path_description + '")';
|
|
2683
|
+
message += '\n' + obj_description_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2684
|
+
message += '\n' + obj_description_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2685
|
+
return new TypeError(message);
|
|
2686
|
+
}
|
|
2687
|
+
}
|
|
2688
|
+
if (obj.filterLogic !== undefined) {
|
|
2689
|
+
const obj_filterLogic = obj.filterLogic;
|
|
2690
|
+
const path_filterLogic = path + '.filterLogic';
|
|
2691
|
+
let obj_filterLogic_union0 = null;
|
|
2692
|
+
const obj_filterLogic_union0_error = (() => {
|
|
2693
|
+
if (typeof obj_filterLogic !== 'string') {
|
|
2694
|
+
return new TypeError('Expected "string" but received "' + typeof obj_filterLogic + '" (at "' + path_filterLogic + '")');
|
|
2695
|
+
}
|
|
2696
|
+
})();
|
|
2697
|
+
if (obj_filterLogic_union0_error != null) {
|
|
2698
|
+
obj_filterLogic_union0 = obj_filterLogic_union0_error.message;
|
|
2699
|
+
}
|
|
2700
|
+
let obj_filterLogic_union1 = null;
|
|
2701
|
+
const obj_filterLogic_union1_error = (() => {
|
|
2702
|
+
if (obj_filterLogic !== null) {
|
|
2703
|
+
return new TypeError('Expected "null" but received "' + typeof obj_filterLogic + '" (at "' + path_filterLogic + '")');
|
|
2704
|
+
}
|
|
2705
|
+
})();
|
|
2706
|
+
if (obj_filterLogic_union1_error != null) {
|
|
2707
|
+
obj_filterLogic_union1 = obj_filterLogic_union1_error.message;
|
|
2708
|
+
}
|
|
2709
|
+
if (obj_filterLogic_union0 && obj_filterLogic_union1) {
|
|
2710
|
+
let message = 'Object doesn\'t match union (at "' + path_filterLogic + '")';
|
|
2711
|
+
message += '\n' + obj_filterLogic_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2712
|
+
message += '\n' + obj_filterLogic_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2713
|
+
return new TypeError(message);
|
|
2714
|
+
}
|
|
2715
|
+
}
|
|
2716
|
+
if (obj.filters !== undefined) {
|
|
2717
|
+
const obj_filters = obj.filters;
|
|
2718
|
+
const path_filters = path + '.filters';
|
|
2719
|
+
if (!ArrayIsArray(obj_filters)) {
|
|
2720
|
+
return new TypeError('Expected "array" but received "' + typeof obj_filters + '" (at "' + path_filters + '")');
|
|
2721
|
+
}
|
|
2722
|
+
for (let i = 0; i < obj_filters.length; i++) {
|
|
2723
|
+
const obj_filters_item = obj_filters[i];
|
|
2724
|
+
const path_filters_item = path_filters + '[' + i + ']';
|
|
2725
|
+
const referencepath_filters_itemValidationError = validate$i(obj_filters_item, path_filters_item);
|
|
2726
|
+
if (referencepath_filters_itemValidationError !== null) {
|
|
2727
|
+
let message = 'Object doesn\'t match SemanticFilterOutputRepresentation (at "' + path_filters_item + '")\n';
|
|
2728
|
+
message += referencepath_filters_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2729
|
+
return new TypeError(message);
|
|
2730
|
+
}
|
|
2731
|
+
}
|
|
2732
|
+
}
|
|
2733
|
+
const obj_id = obj.id;
|
|
2734
|
+
const path_id = path + '.id';
|
|
2735
|
+
if (typeof obj_id !== 'string') {
|
|
2736
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
2737
|
+
}
|
|
2738
|
+
if (obj.insightsSettings !== undefined) {
|
|
2739
|
+
const obj_insightsSettings = obj.insightsSettings;
|
|
2740
|
+
const path_insightsSettings = path + '.insightsSettings';
|
|
2741
|
+
const referencepath_insightsSettingsValidationError = validate$5(obj_insightsSettings, path_insightsSettings);
|
|
2742
|
+
if (referencepath_insightsSettingsValidationError !== null) {
|
|
2743
|
+
let message = 'Object doesn\'t match SemanticInsightsSettingsOutputRepresentation (at "' + path_insightsSettings + '")\n';
|
|
2744
|
+
message += referencepath_insightsSettingsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2745
|
+
return new TypeError(message);
|
|
2746
|
+
}
|
|
2747
|
+
}
|
|
2748
|
+
const obj_label = obj.label;
|
|
2749
|
+
const path_label = path + '.label';
|
|
2750
|
+
let obj_label_union0 = null;
|
|
2751
|
+
const obj_label_union0_error = (() => {
|
|
2752
|
+
if (typeof obj_label !== 'string') {
|
|
2753
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
2754
|
+
}
|
|
2755
|
+
})();
|
|
2756
|
+
if (obj_label_union0_error != null) {
|
|
2757
|
+
obj_label_union0 = obj_label_union0_error.message;
|
|
2758
|
+
}
|
|
2759
|
+
let obj_label_union1 = null;
|
|
2760
|
+
const obj_label_union1_error = (() => {
|
|
2761
|
+
if (obj_label !== null) {
|
|
2762
|
+
return new TypeError('Expected "null" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
2763
|
+
}
|
|
2764
|
+
})();
|
|
2765
|
+
if (obj_label_union1_error != null) {
|
|
2766
|
+
obj_label_union1 = obj_label_union1_error.message;
|
|
2767
|
+
}
|
|
2768
|
+
if (obj_label_union0 && obj_label_union1) {
|
|
2769
|
+
let message = 'Object doesn\'t match union (at "' + path_label + '")';
|
|
2770
|
+
message += '\n' + obj_label_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2771
|
+
message += '\n' + obj_label_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2772
|
+
return new TypeError(message);
|
|
2773
|
+
}
|
|
2774
|
+
if (obj.lastModifiedBy !== undefined) {
|
|
2775
|
+
const obj_lastModifiedBy = obj.lastModifiedBy;
|
|
2776
|
+
const path_lastModifiedBy = path + '.lastModifiedBy';
|
|
2777
|
+
let obj_lastModifiedBy_union0 = null;
|
|
2778
|
+
const obj_lastModifiedBy_union0_error = (() => {
|
|
2779
|
+
if (typeof obj_lastModifiedBy !== 'string') {
|
|
2780
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedBy + '" (at "' + path_lastModifiedBy + '")');
|
|
2781
|
+
}
|
|
2782
|
+
})();
|
|
2783
|
+
if (obj_lastModifiedBy_union0_error != null) {
|
|
2784
|
+
obj_lastModifiedBy_union0 = obj_lastModifiedBy_union0_error.message;
|
|
2785
|
+
}
|
|
2786
|
+
let obj_lastModifiedBy_union1 = null;
|
|
2787
|
+
const obj_lastModifiedBy_union1_error = (() => {
|
|
2788
|
+
if (obj_lastModifiedBy !== null) {
|
|
2789
|
+
return new TypeError('Expected "null" but received "' + typeof obj_lastModifiedBy + '" (at "' + path_lastModifiedBy + '")');
|
|
2790
|
+
}
|
|
2791
|
+
})();
|
|
2792
|
+
if (obj_lastModifiedBy_union1_error != null) {
|
|
2793
|
+
obj_lastModifiedBy_union1 = obj_lastModifiedBy_union1_error.message;
|
|
2794
|
+
}
|
|
2795
|
+
if (obj_lastModifiedBy_union0 && obj_lastModifiedBy_union1) {
|
|
2796
|
+
let message = 'Object doesn\'t match union (at "' + path_lastModifiedBy + '")';
|
|
2797
|
+
message += '\n' + obj_lastModifiedBy_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2798
|
+
message += '\n' + obj_lastModifiedBy_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2799
|
+
return new TypeError(message);
|
|
2800
|
+
}
|
|
2801
|
+
}
|
|
2802
|
+
if (obj.lastModifiedDate !== undefined) {
|
|
2803
|
+
const obj_lastModifiedDate = obj.lastModifiedDate;
|
|
2804
|
+
const path_lastModifiedDate = path + '.lastModifiedDate';
|
|
2805
|
+
let obj_lastModifiedDate_union0 = null;
|
|
2806
|
+
const obj_lastModifiedDate_union0_error = (() => {
|
|
2807
|
+
if (typeof obj_lastModifiedDate !== 'string') {
|
|
2808
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
|
|
2809
|
+
}
|
|
2810
|
+
})();
|
|
2811
|
+
if (obj_lastModifiedDate_union0_error != null) {
|
|
2812
|
+
obj_lastModifiedDate_union0 = obj_lastModifiedDate_union0_error.message;
|
|
2813
|
+
}
|
|
2814
|
+
let obj_lastModifiedDate_union1 = null;
|
|
2815
|
+
const obj_lastModifiedDate_union1_error = (() => {
|
|
2816
|
+
if (obj_lastModifiedDate !== null) {
|
|
2817
|
+
return new TypeError('Expected "null" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
|
|
2818
|
+
}
|
|
2819
|
+
})();
|
|
2820
|
+
if (obj_lastModifiedDate_union1_error != null) {
|
|
2821
|
+
obj_lastModifiedDate_union1 = obj_lastModifiedDate_union1_error.message;
|
|
2822
|
+
}
|
|
2823
|
+
if (obj_lastModifiedDate_union0 && obj_lastModifiedDate_union1) {
|
|
2824
|
+
let message = 'Object doesn\'t match union (at "' + path_lastModifiedDate + '")';
|
|
2825
|
+
message += '\n' + obj_lastModifiedDate_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2826
|
+
message += '\n' + obj_lastModifiedDate_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2827
|
+
return new TypeError(message);
|
|
2828
|
+
}
|
|
2829
|
+
}
|
|
2830
|
+
if (obj.measurementReference !== undefined) {
|
|
2831
|
+
const obj_measurementReference = obj.measurementReference;
|
|
2832
|
+
const path_measurementReference = path + '.measurementReference';
|
|
2833
|
+
const referencepath_measurementReferenceValidationError = validate$8(obj_measurementReference, path_measurementReference);
|
|
2834
|
+
if (referencepath_measurementReferenceValidationError !== null) {
|
|
2835
|
+
let message = 'Object doesn\'t match SemanticFieldReferenceOutputRepresentation (at "' + path_measurementReference + '")\n';
|
|
2836
|
+
message += referencepath_measurementReferenceValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2837
|
+
return new TypeError(message);
|
|
2838
|
+
}
|
|
2839
|
+
}
|
|
2840
|
+
if (obj.timeDimensionReference !== undefined) {
|
|
2841
|
+
const obj_timeDimensionReference = obj.timeDimensionReference;
|
|
2842
|
+
const path_timeDimensionReference = path + '.timeDimensionReference';
|
|
2843
|
+
const referencepath_timeDimensionReferenceValidationError = validate$8(obj_timeDimensionReference, path_timeDimensionReference);
|
|
2844
|
+
if (referencepath_timeDimensionReferenceValidationError !== null) {
|
|
2845
|
+
let message = 'Object doesn\'t match SemanticFieldReferenceOutputRepresentation (at "' + path_timeDimensionReference + '")\n';
|
|
2846
|
+
message += referencepath_timeDimensionReferenceValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2847
|
+
return new TypeError(message);
|
|
2848
|
+
}
|
|
2849
|
+
}
|
|
2850
|
+
if (obj.timeGrains !== undefined) {
|
|
2851
|
+
const obj_timeGrains = obj.timeGrains;
|
|
2852
|
+
const path_timeGrains = path + '.timeGrains';
|
|
2853
|
+
if (!ArrayIsArray(obj_timeGrains)) {
|
|
2854
|
+
return new TypeError('Expected "array" but received "' + typeof obj_timeGrains + '" (at "' + path_timeGrains + '")');
|
|
2855
|
+
}
|
|
2856
|
+
for (let i = 0; i < obj_timeGrains.length; i++) {
|
|
2857
|
+
const obj_timeGrains_item = obj_timeGrains[i];
|
|
2858
|
+
const path_timeGrains_item = path_timeGrains + '[' + i + ']';
|
|
2859
|
+
if (typeof obj_timeGrains_item !== 'string') {
|
|
2860
|
+
return new TypeError('Expected "string" but received "' + typeof obj_timeGrains_item + '" (at "' + path_timeGrains_item + '")');
|
|
2861
|
+
}
|
|
2862
|
+
}
|
|
2863
|
+
}
|
|
2864
|
+
})();
|
|
2865
|
+
return v_error === undefined ? null : v_error;
|
|
2866
|
+
}
|
|
2867
|
+
|
|
2868
|
+
function validate$3(obj, path = 'SemanticParameterOutputRepresentation') {
|
|
2869
|
+
const v_error = (() => {
|
|
2870
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2871
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2872
|
+
}
|
|
2873
|
+
const obj_apiName = obj.apiName;
|
|
2874
|
+
const path_apiName = path + '.apiName';
|
|
2875
|
+
if (typeof obj_apiName !== 'string') {
|
|
2876
|
+
return new TypeError('Expected "string" but received "' + typeof obj_apiName + '" (at "' + path_apiName + '")');
|
|
2877
|
+
}
|
|
2878
|
+
const obj_createdBy = obj.createdBy;
|
|
2879
|
+
const path_createdBy = path + '.createdBy';
|
|
2880
|
+
if (typeof obj_createdBy !== 'string') {
|
|
2881
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdBy + '" (at "' + path_createdBy + '")');
|
|
2882
|
+
}
|
|
2883
|
+
const obj_createdDate = obj.createdDate;
|
|
2884
|
+
const path_createdDate = path + '.createdDate';
|
|
2885
|
+
if (typeof obj_createdDate !== 'string') {
|
|
2886
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
|
|
2887
|
+
}
|
|
2888
|
+
const obj_dataType = obj.dataType;
|
|
2889
|
+
const path_dataType = path + '.dataType';
|
|
2890
|
+
if (typeof obj_dataType !== 'string') {
|
|
2891
|
+
return new TypeError('Expected "string" but received "' + typeof obj_dataType + '" (at "' + path_dataType + '")');
|
|
2892
|
+
}
|
|
2893
|
+
if (obj.defaultValue !== undefined) {
|
|
2894
|
+
const obj_defaultValue = obj.defaultValue;
|
|
2895
|
+
const path_defaultValue = path + '.defaultValue';
|
|
2896
|
+
let obj_defaultValue_union0 = null;
|
|
2897
|
+
const obj_defaultValue_union0_error = (() => {
|
|
2898
|
+
if (typeof obj_defaultValue !== 'string') {
|
|
2899
|
+
return new TypeError('Expected "string" but received "' + typeof obj_defaultValue + '" (at "' + path_defaultValue + '")');
|
|
2900
|
+
}
|
|
2901
|
+
})();
|
|
2902
|
+
if (obj_defaultValue_union0_error != null) {
|
|
2903
|
+
obj_defaultValue_union0 = obj_defaultValue_union0_error.message;
|
|
2904
|
+
}
|
|
2905
|
+
let obj_defaultValue_union1 = null;
|
|
2906
|
+
const obj_defaultValue_union1_error = (() => {
|
|
2907
|
+
if (obj_defaultValue !== null) {
|
|
2908
|
+
return new TypeError('Expected "null" but received "' + typeof obj_defaultValue + '" (at "' + path_defaultValue + '")');
|
|
2909
|
+
}
|
|
2910
|
+
})();
|
|
2911
|
+
if (obj_defaultValue_union1_error != null) {
|
|
2912
|
+
obj_defaultValue_union1 = obj_defaultValue_union1_error.message;
|
|
2913
|
+
}
|
|
2914
|
+
if (obj_defaultValue_union0 && obj_defaultValue_union1) {
|
|
2915
|
+
let message = 'Object doesn\'t match union (at "' + path_defaultValue + '")';
|
|
2916
|
+
message += '\n' + obj_defaultValue_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2917
|
+
message += '\n' + obj_defaultValue_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2918
|
+
return new TypeError(message);
|
|
2919
|
+
}
|
|
2920
|
+
}
|
|
2921
|
+
if (obj.description !== undefined) {
|
|
2922
|
+
const obj_description = obj.description;
|
|
2923
|
+
const path_description = path + '.description';
|
|
2924
|
+
let obj_description_union0 = null;
|
|
2925
|
+
const obj_description_union0_error = (() => {
|
|
2926
|
+
if (typeof obj_description !== 'string') {
|
|
2927
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
2928
|
+
}
|
|
2929
|
+
})();
|
|
2930
|
+
if (obj_description_union0_error != null) {
|
|
2931
|
+
obj_description_union0 = obj_description_union0_error.message;
|
|
2932
|
+
}
|
|
2933
|
+
let obj_description_union1 = null;
|
|
2934
|
+
const obj_description_union1_error = (() => {
|
|
2935
|
+
if (obj_description !== null) {
|
|
2936
|
+
return new TypeError('Expected "null" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
2937
|
+
}
|
|
2938
|
+
})();
|
|
2939
|
+
if (obj_description_union1_error != null) {
|
|
2940
|
+
obj_description_union1 = obj_description_union1_error.message;
|
|
2941
|
+
}
|
|
2942
|
+
if (obj_description_union0 && obj_description_union1) {
|
|
2943
|
+
let message = 'Object doesn\'t match union (at "' + path_description + '")';
|
|
2944
|
+
message += '\n' + obj_description_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2945
|
+
message += '\n' + obj_description_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2946
|
+
return new TypeError(message);
|
|
2947
|
+
}
|
|
2948
|
+
}
|
|
2949
|
+
const obj_id = obj.id;
|
|
2950
|
+
const path_id = path + '.id';
|
|
2951
|
+
if (typeof obj_id !== 'string') {
|
|
2952
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
2953
|
+
}
|
|
2954
|
+
const obj_label = obj.label;
|
|
2955
|
+
const path_label = path + '.label';
|
|
2956
|
+
let obj_label_union0 = null;
|
|
2957
|
+
const obj_label_union0_error = (() => {
|
|
2958
|
+
if (typeof obj_label !== 'string') {
|
|
2959
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
2960
|
+
}
|
|
2961
|
+
})();
|
|
2962
|
+
if (obj_label_union0_error != null) {
|
|
2963
|
+
obj_label_union0 = obj_label_union0_error.message;
|
|
2964
|
+
}
|
|
2965
|
+
let obj_label_union1 = null;
|
|
2966
|
+
const obj_label_union1_error = (() => {
|
|
2967
|
+
if (obj_label !== null) {
|
|
2968
|
+
return new TypeError('Expected "null" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
2969
|
+
}
|
|
2970
|
+
})();
|
|
2971
|
+
if (obj_label_union1_error != null) {
|
|
2972
|
+
obj_label_union1 = obj_label_union1_error.message;
|
|
2973
|
+
}
|
|
2974
|
+
if (obj_label_union0 && obj_label_union1) {
|
|
2975
|
+
let message = 'Object doesn\'t match union (at "' + path_label + '")';
|
|
2976
|
+
message += '\n' + obj_label_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2977
|
+
message += '\n' + obj_label_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2978
|
+
return new TypeError(message);
|
|
2979
|
+
}
|
|
2980
|
+
if (obj.lastModifiedBy !== undefined) {
|
|
2981
|
+
const obj_lastModifiedBy = obj.lastModifiedBy;
|
|
2982
|
+
const path_lastModifiedBy = path + '.lastModifiedBy';
|
|
2983
|
+
let obj_lastModifiedBy_union0 = null;
|
|
2984
|
+
const obj_lastModifiedBy_union0_error = (() => {
|
|
2985
|
+
if (typeof obj_lastModifiedBy !== 'string') {
|
|
2986
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedBy + '" (at "' + path_lastModifiedBy + '")');
|
|
2987
|
+
}
|
|
2988
|
+
})();
|
|
2989
|
+
if (obj_lastModifiedBy_union0_error != null) {
|
|
2990
|
+
obj_lastModifiedBy_union0 = obj_lastModifiedBy_union0_error.message;
|
|
2991
|
+
}
|
|
2992
|
+
let obj_lastModifiedBy_union1 = null;
|
|
2993
|
+
const obj_lastModifiedBy_union1_error = (() => {
|
|
2994
|
+
if (obj_lastModifiedBy !== null) {
|
|
2995
|
+
return new TypeError('Expected "null" but received "' + typeof obj_lastModifiedBy + '" (at "' + path_lastModifiedBy + '")');
|
|
2996
|
+
}
|
|
2997
|
+
})();
|
|
2998
|
+
if (obj_lastModifiedBy_union1_error != null) {
|
|
2999
|
+
obj_lastModifiedBy_union1 = obj_lastModifiedBy_union1_error.message;
|
|
3000
|
+
}
|
|
3001
|
+
if (obj_lastModifiedBy_union0 && obj_lastModifiedBy_union1) {
|
|
3002
|
+
let message = 'Object doesn\'t match union (at "' + path_lastModifiedBy + '")';
|
|
3003
|
+
message += '\n' + obj_lastModifiedBy_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3004
|
+
message += '\n' + obj_lastModifiedBy_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3005
|
+
return new TypeError(message);
|
|
3006
|
+
}
|
|
3007
|
+
}
|
|
3008
|
+
if (obj.lastModifiedDate !== undefined) {
|
|
3009
|
+
const obj_lastModifiedDate = obj.lastModifiedDate;
|
|
3010
|
+
const path_lastModifiedDate = path + '.lastModifiedDate';
|
|
3011
|
+
let obj_lastModifiedDate_union0 = null;
|
|
3012
|
+
const obj_lastModifiedDate_union0_error = (() => {
|
|
3013
|
+
if (typeof obj_lastModifiedDate !== 'string') {
|
|
3014
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
|
|
3015
|
+
}
|
|
3016
|
+
})();
|
|
3017
|
+
if (obj_lastModifiedDate_union0_error != null) {
|
|
3018
|
+
obj_lastModifiedDate_union0 = obj_lastModifiedDate_union0_error.message;
|
|
3019
|
+
}
|
|
3020
|
+
let obj_lastModifiedDate_union1 = null;
|
|
3021
|
+
const obj_lastModifiedDate_union1_error = (() => {
|
|
3022
|
+
if (obj_lastModifiedDate !== null) {
|
|
3023
|
+
return new TypeError('Expected "null" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
|
|
3024
|
+
}
|
|
3025
|
+
})();
|
|
3026
|
+
if (obj_lastModifiedDate_union1_error != null) {
|
|
3027
|
+
obj_lastModifiedDate_union1 = obj_lastModifiedDate_union1_error.message;
|
|
3028
|
+
}
|
|
3029
|
+
if (obj_lastModifiedDate_union0 && obj_lastModifiedDate_union1) {
|
|
3030
|
+
let message = 'Object doesn\'t match union (at "' + path_lastModifiedDate + '")';
|
|
3031
|
+
message += '\n' + obj_lastModifiedDate_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3032
|
+
message += '\n' + obj_lastModifiedDate_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3033
|
+
return new TypeError(message);
|
|
3034
|
+
}
|
|
3035
|
+
}
|
|
3036
|
+
if (obj.maxValue !== undefined) {
|
|
3037
|
+
const obj_maxValue = obj.maxValue;
|
|
3038
|
+
const path_maxValue = path + '.maxValue';
|
|
3039
|
+
let obj_maxValue_union0 = null;
|
|
3040
|
+
const obj_maxValue_union0_error = (() => {
|
|
3041
|
+
if (typeof obj_maxValue !== 'string') {
|
|
3042
|
+
return new TypeError('Expected "string" but received "' + typeof obj_maxValue + '" (at "' + path_maxValue + '")');
|
|
3043
|
+
}
|
|
3044
|
+
})();
|
|
3045
|
+
if (obj_maxValue_union0_error != null) {
|
|
3046
|
+
obj_maxValue_union0 = obj_maxValue_union0_error.message;
|
|
3047
|
+
}
|
|
3048
|
+
let obj_maxValue_union1 = null;
|
|
3049
|
+
const obj_maxValue_union1_error = (() => {
|
|
3050
|
+
if (obj_maxValue !== null) {
|
|
3051
|
+
return new TypeError('Expected "null" but received "' + typeof obj_maxValue + '" (at "' + path_maxValue + '")');
|
|
3052
|
+
}
|
|
3053
|
+
})();
|
|
3054
|
+
if (obj_maxValue_union1_error != null) {
|
|
3055
|
+
obj_maxValue_union1 = obj_maxValue_union1_error.message;
|
|
3056
|
+
}
|
|
3057
|
+
if (obj_maxValue_union0 && obj_maxValue_union1) {
|
|
3058
|
+
let message = 'Object doesn\'t match union (at "' + path_maxValue + '")';
|
|
3059
|
+
message += '\n' + obj_maxValue_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3060
|
+
message += '\n' + obj_maxValue_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3061
|
+
return new TypeError(message);
|
|
3062
|
+
}
|
|
3063
|
+
}
|
|
3064
|
+
if (obj.minValue !== undefined) {
|
|
3065
|
+
const obj_minValue = obj.minValue;
|
|
3066
|
+
const path_minValue = path + '.minValue';
|
|
3067
|
+
let obj_minValue_union0 = null;
|
|
3068
|
+
const obj_minValue_union0_error = (() => {
|
|
3069
|
+
if (typeof obj_minValue !== 'string') {
|
|
3070
|
+
return new TypeError('Expected "string" but received "' + typeof obj_minValue + '" (at "' + path_minValue + '")');
|
|
3071
|
+
}
|
|
3072
|
+
})();
|
|
3073
|
+
if (obj_minValue_union0_error != null) {
|
|
3074
|
+
obj_minValue_union0 = obj_minValue_union0_error.message;
|
|
3075
|
+
}
|
|
3076
|
+
let obj_minValue_union1 = null;
|
|
3077
|
+
const obj_minValue_union1_error = (() => {
|
|
3078
|
+
if (obj_minValue !== null) {
|
|
3079
|
+
return new TypeError('Expected "null" but received "' + typeof obj_minValue + '" (at "' + path_minValue + '")');
|
|
3080
|
+
}
|
|
3081
|
+
})();
|
|
3082
|
+
if (obj_minValue_union1_error != null) {
|
|
3083
|
+
obj_minValue_union1 = obj_minValue_union1_error.message;
|
|
3084
|
+
}
|
|
3085
|
+
if (obj_minValue_union0 && obj_minValue_union1) {
|
|
3086
|
+
let message = 'Object doesn\'t match union (at "' + path_minValue + '")';
|
|
3087
|
+
message += '\n' + obj_minValue_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3088
|
+
message += '\n' + obj_minValue_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3089
|
+
return new TypeError(message);
|
|
3090
|
+
}
|
|
3091
|
+
}
|
|
3092
|
+
if (obj.stepSize !== undefined) {
|
|
3093
|
+
const obj_stepSize = obj.stepSize;
|
|
3094
|
+
const path_stepSize = path + '.stepSize';
|
|
3095
|
+
let obj_stepSize_union0 = null;
|
|
3096
|
+
const obj_stepSize_union0_error = (() => {
|
|
3097
|
+
if (typeof obj_stepSize !== 'string') {
|
|
3098
|
+
return new TypeError('Expected "string" but received "' + typeof obj_stepSize + '" (at "' + path_stepSize + '")');
|
|
3099
|
+
}
|
|
3100
|
+
})();
|
|
3101
|
+
if (obj_stepSize_union0_error != null) {
|
|
3102
|
+
obj_stepSize_union0 = obj_stepSize_union0_error.message;
|
|
3103
|
+
}
|
|
3104
|
+
let obj_stepSize_union1 = null;
|
|
3105
|
+
const obj_stepSize_union1_error = (() => {
|
|
3106
|
+
if (obj_stepSize !== null) {
|
|
3107
|
+
return new TypeError('Expected "null" but received "' + typeof obj_stepSize + '" (at "' + path_stepSize + '")');
|
|
3108
|
+
}
|
|
3109
|
+
})();
|
|
3110
|
+
if (obj_stepSize_union1_error != null) {
|
|
3111
|
+
obj_stepSize_union1 = obj_stepSize_union1_error.message;
|
|
3112
|
+
}
|
|
3113
|
+
if (obj_stepSize_union0 && obj_stepSize_union1) {
|
|
3114
|
+
let message = 'Object doesn\'t match union (at "' + path_stepSize + '")';
|
|
3115
|
+
message += '\n' + obj_stepSize_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3116
|
+
message += '\n' + obj_stepSize_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3117
|
+
return new TypeError(message);
|
|
3118
|
+
}
|
|
3119
|
+
}
|
|
3120
|
+
const obj_type = obj.type;
|
|
3121
|
+
const path_type = path + '.type';
|
|
3122
|
+
if (typeof obj_type !== 'string') {
|
|
3123
|
+
return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
|
|
3124
|
+
}
|
|
3125
|
+
if (obj.values !== undefined) {
|
|
3126
|
+
const obj_values = obj.values;
|
|
3127
|
+
const path_values = path + '.values';
|
|
3128
|
+
if (!ArrayIsArray(obj_values)) {
|
|
3129
|
+
return new TypeError('Expected "array" but received "' + typeof obj_values + '" (at "' + path_values + '")');
|
|
3130
|
+
}
|
|
3131
|
+
for (let i = 0; i < obj_values.length; i++) {
|
|
3132
|
+
const obj_values_item = obj_values[i];
|
|
3133
|
+
const path_values_item = path_values + '[' + i + ']';
|
|
3134
|
+
if (typeof obj_values_item !== 'string') {
|
|
3135
|
+
return new TypeError('Expected "string" but received "' + typeof obj_values_item + '" (at "' + path_values_item + '")');
|
|
3136
|
+
}
|
|
3137
|
+
}
|
|
3138
|
+
}
|
|
3139
|
+
})();
|
|
3140
|
+
return v_error === undefined ? null : v_error;
|
|
3141
|
+
}
|
|
3142
|
+
|
|
3143
|
+
const VERSION$1 = "6238eb1609099d2b98488cf69ff5578a";
|
|
3144
|
+
function validate$2(obj, path = 'SemanticModelOutputRepresentation') {
|
|
3145
|
+
const v_error = (() => {
|
|
3146
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3147
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
3148
|
+
}
|
|
3149
|
+
const obj_apiName = obj.apiName;
|
|
3150
|
+
const path_apiName = path + '.apiName';
|
|
3151
|
+
if (typeof obj_apiName !== 'string') {
|
|
3152
|
+
return new TypeError('Expected "string" but received "' + typeof obj_apiName + '" (at "' + path_apiName + '")');
|
|
3153
|
+
}
|
|
3154
|
+
if (obj.app !== undefined) {
|
|
3155
|
+
const obj_app = obj.app;
|
|
3156
|
+
const path_app = path + '.app';
|
|
3157
|
+
let obj_app_union0 = null;
|
|
3158
|
+
const obj_app_union0_error = (() => {
|
|
3159
|
+
if (typeof obj_app !== 'string') {
|
|
3160
|
+
return new TypeError('Expected "string" but received "' + typeof obj_app + '" (at "' + path_app + '")');
|
|
3161
|
+
}
|
|
3162
|
+
})();
|
|
3163
|
+
if (obj_app_union0_error != null) {
|
|
3164
|
+
obj_app_union0 = obj_app_union0_error.message;
|
|
3165
|
+
}
|
|
3166
|
+
let obj_app_union1 = null;
|
|
3167
|
+
const obj_app_union1_error = (() => {
|
|
3168
|
+
if (obj_app !== null) {
|
|
3169
|
+
return new TypeError('Expected "null" but received "' + typeof obj_app + '" (at "' + path_app + '")');
|
|
3170
|
+
}
|
|
3171
|
+
})();
|
|
3172
|
+
if (obj_app_union1_error != null) {
|
|
3173
|
+
obj_app_union1 = obj_app_union1_error.message;
|
|
3174
|
+
}
|
|
3175
|
+
if (obj_app_union0 && obj_app_union1) {
|
|
3176
|
+
let message = 'Object doesn\'t match union (at "' + path_app + '")';
|
|
3177
|
+
message += '\n' + obj_app_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3178
|
+
message += '\n' + obj_app_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3179
|
+
return new TypeError(message);
|
|
3180
|
+
}
|
|
3181
|
+
}
|
|
3182
|
+
if (obj.baseModels !== undefined) {
|
|
3183
|
+
const obj_baseModels = obj.baseModels;
|
|
3184
|
+
const path_baseModels = path + '.baseModels';
|
|
3185
|
+
if (!ArrayIsArray(obj_baseModels)) {
|
|
3186
|
+
return new TypeError('Expected "array" but received "' + typeof obj_baseModels + '" (at "' + path_baseModels + '")');
|
|
3187
|
+
}
|
|
3188
|
+
for (let i = 0; i < obj_baseModels.length; i++) {
|
|
3189
|
+
const obj_baseModels_item = obj_baseModels[i];
|
|
3190
|
+
const path_baseModels_item = path_baseModels + '[' + i + ']';
|
|
3191
|
+
const referencepath_baseModels_itemValidationError = validate$j(obj_baseModels_item, path_baseModels_item);
|
|
3192
|
+
if (referencepath_baseModels_itemValidationError !== null) {
|
|
3193
|
+
let message = 'Object doesn\'t match SemanticBaseModelOutputRepresentation (at "' + path_baseModels_item + '")\n';
|
|
3194
|
+
message += referencepath_baseModels_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
3195
|
+
return new TypeError(message);
|
|
3196
|
+
}
|
|
3197
|
+
}
|
|
3198
|
+
}
|
|
3199
|
+
if (obj.categories !== undefined) {
|
|
3200
|
+
const obj_categories = obj.categories;
|
|
3201
|
+
const path_categories = path + '.categories';
|
|
3202
|
+
if (!ArrayIsArray(obj_categories)) {
|
|
3203
|
+
return new TypeError('Expected "array" but received "' + typeof obj_categories + '" (at "' + path_categories + '")');
|
|
3204
|
+
}
|
|
3205
|
+
for (let i = 0; i < obj_categories.length; i++) {
|
|
3206
|
+
const obj_categories_item = obj_categories[i];
|
|
3207
|
+
const path_categories_item = path_categories + '[' + i + ']';
|
|
3208
|
+
if (typeof obj_categories_item !== 'string') {
|
|
3209
|
+
return new TypeError('Expected "string" but received "' + typeof obj_categories_item + '" (at "' + path_categories_item + '")');
|
|
3210
|
+
}
|
|
3211
|
+
}
|
|
3212
|
+
}
|
|
3213
|
+
const obj_createdBy = obj.createdBy;
|
|
3214
|
+
const path_createdBy = path + '.createdBy';
|
|
3215
|
+
if (typeof obj_createdBy !== 'string') {
|
|
3216
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdBy + '" (at "' + path_createdBy + '")');
|
|
3217
|
+
}
|
|
3218
|
+
const obj_createdDate = obj.createdDate;
|
|
3219
|
+
const path_createdDate = path + '.createdDate';
|
|
3220
|
+
if (typeof obj_createdDate !== 'string') {
|
|
3221
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
|
|
3222
|
+
}
|
|
3223
|
+
const obj_dataspace = obj.dataspace;
|
|
3224
|
+
const path_dataspace = path + '.dataspace';
|
|
3225
|
+
let obj_dataspace_union0 = null;
|
|
3226
|
+
const obj_dataspace_union0_error = (() => {
|
|
3227
|
+
if (typeof obj_dataspace !== 'string') {
|
|
3228
|
+
return new TypeError('Expected "string" but received "' + typeof obj_dataspace + '" (at "' + path_dataspace + '")');
|
|
3229
|
+
}
|
|
3230
|
+
})();
|
|
3231
|
+
if (obj_dataspace_union0_error != null) {
|
|
3232
|
+
obj_dataspace_union0 = obj_dataspace_union0_error.message;
|
|
3233
|
+
}
|
|
3234
|
+
let obj_dataspace_union1 = null;
|
|
3235
|
+
const obj_dataspace_union1_error = (() => {
|
|
3236
|
+
if (obj_dataspace !== null) {
|
|
3237
|
+
return new TypeError('Expected "null" but received "' + typeof obj_dataspace + '" (at "' + path_dataspace + '")');
|
|
3238
|
+
}
|
|
3239
|
+
})();
|
|
3240
|
+
if (obj_dataspace_union1_error != null) {
|
|
3241
|
+
obj_dataspace_union1 = obj_dataspace_union1_error.message;
|
|
3242
|
+
}
|
|
3243
|
+
if (obj_dataspace_union0 && obj_dataspace_union1) {
|
|
3244
|
+
let message = 'Object doesn\'t match union (at "' + path_dataspace + '")';
|
|
3245
|
+
message += '\n' + obj_dataspace_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3246
|
+
message += '\n' + obj_dataspace_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3247
|
+
return new TypeError(message);
|
|
3248
|
+
}
|
|
3249
|
+
if (obj.description !== undefined) {
|
|
3250
|
+
const obj_description = obj.description;
|
|
3251
|
+
const path_description = path + '.description';
|
|
3252
|
+
let obj_description_union0 = null;
|
|
3253
|
+
const obj_description_union0_error = (() => {
|
|
3254
|
+
if (typeof obj_description !== 'string') {
|
|
3255
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
3256
|
+
}
|
|
3257
|
+
})();
|
|
3258
|
+
if (obj_description_union0_error != null) {
|
|
3259
|
+
obj_description_union0 = obj_description_union0_error.message;
|
|
3260
|
+
}
|
|
3261
|
+
let obj_description_union1 = null;
|
|
3262
|
+
const obj_description_union1_error = (() => {
|
|
3263
|
+
if (obj_description !== null) {
|
|
3264
|
+
return new TypeError('Expected "null" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
3265
|
+
}
|
|
3266
|
+
})();
|
|
3267
|
+
if (obj_description_union1_error != null) {
|
|
3268
|
+
obj_description_union1 = obj_description_union1_error.message;
|
|
3269
|
+
}
|
|
3270
|
+
if (obj_description_union0 && obj_description_union1) {
|
|
3271
|
+
let message = 'Object doesn\'t match union (at "' + path_description + '")';
|
|
3272
|
+
message += '\n' + obj_description_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3273
|
+
message += '\n' + obj_description_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3274
|
+
return new TypeError(message);
|
|
3275
|
+
}
|
|
3276
|
+
}
|
|
3277
|
+
const obj_id = obj.id;
|
|
3278
|
+
const path_id = path + '.id';
|
|
3279
|
+
if (typeof obj_id !== 'string') {
|
|
3280
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
3281
|
+
}
|
|
3282
|
+
const obj_label = obj.label;
|
|
3283
|
+
const path_label = path + '.label';
|
|
3284
|
+
let obj_label_union0 = null;
|
|
3285
|
+
const obj_label_union0_error = (() => {
|
|
3286
|
+
if (typeof obj_label !== 'string') {
|
|
3287
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
3288
|
+
}
|
|
3289
|
+
})();
|
|
3290
|
+
if (obj_label_union0_error != null) {
|
|
3291
|
+
obj_label_union0 = obj_label_union0_error.message;
|
|
3292
|
+
}
|
|
3293
|
+
let obj_label_union1 = null;
|
|
3294
|
+
const obj_label_union1_error = (() => {
|
|
3295
|
+
if (obj_label !== null) {
|
|
3296
|
+
return new TypeError('Expected "null" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
3297
|
+
}
|
|
3298
|
+
})();
|
|
3299
|
+
if (obj_label_union1_error != null) {
|
|
3300
|
+
obj_label_union1 = obj_label_union1_error.message;
|
|
3301
|
+
}
|
|
3302
|
+
if (obj_label_union0 && obj_label_union1) {
|
|
3303
|
+
let message = 'Object doesn\'t match union (at "' + path_label + '")';
|
|
3304
|
+
message += '\n' + obj_label_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3305
|
+
message += '\n' + obj_label_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3306
|
+
return new TypeError(message);
|
|
3307
|
+
}
|
|
3308
|
+
if (obj.lastModifiedBy !== undefined) {
|
|
3309
|
+
const obj_lastModifiedBy = obj.lastModifiedBy;
|
|
3310
|
+
const path_lastModifiedBy = path + '.lastModifiedBy';
|
|
3311
|
+
let obj_lastModifiedBy_union0 = null;
|
|
3312
|
+
const obj_lastModifiedBy_union0_error = (() => {
|
|
3313
|
+
if (typeof obj_lastModifiedBy !== 'string') {
|
|
3314
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedBy + '" (at "' + path_lastModifiedBy + '")');
|
|
3315
|
+
}
|
|
3316
|
+
})();
|
|
3317
|
+
if (obj_lastModifiedBy_union0_error != null) {
|
|
3318
|
+
obj_lastModifiedBy_union0 = obj_lastModifiedBy_union0_error.message;
|
|
3319
|
+
}
|
|
3320
|
+
let obj_lastModifiedBy_union1 = null;
|
|
3321
|
+
const obj_lastModifiedBy_union1_error = (() => {
|
|
3322
|
+
if (obj_lastModifiedBy !== null) {
|
|
3323
|
+
return new TypeError('Expected "null" but received "' + typeof obj_lastModifiedBy + '" (at "' + path_lastModifiedBy + '")');
|
|
3324
|
+
}
|
|
3325
|
+
})();
|
|
3326
|
+
if (obj_lastModifiedBy_union1_error != null) {
|
|
3327
|
+
obj_lastModifiedBy_union1 = obj_lastModifiedBy_union1_error.message;
|
|
3328
|
+
}
|
|
3329
|
+
if (obj_lastModifiedBy_union0 && obj_lastModifiedBy_union1) {
|
|
3330
|
+
let message = 'Object doesn\'t match union (at "' + path_lastModifiedBy + '")';
|
|
3331
|
+
message += '\n' + obj_lastModifiedBy_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3332
|
+
message += '\n' + obj_lastModifiedBy_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3333
|
+
return new TypeError(message);
|
|
3334
|
+
}
|
|
3335
|
+
}
|
|
3336
|
+
if (obj.lastModifiedDate !== undefined) {
|
|
3337
|
+
const obj_lastModifiedDate = obj.lastModifiedDate;
|
|
3338
|
+
const path_lastModifiedDate = path + '.lastModifiedDate';
|
|
3339
|
+
let obj_lastModifiedDate_union0 = null;
|
|
3340
|
+
const obj_lastModifiedDate_union0_error = (() => {
|
|
3341
|
+
if (typeof obj_lastModifiedDate !== 'string') {
|
|
3342
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
|
|
3343
|
+
}
|
|
3344
|
+
})();
|
|
3345
|
+
if (obj_lastModifiedDate_union0_error != null) {
|
|
3346
|
+
obj_lastModifiedDate_union0 = obj_lastModifiedDate_union0_error.message;
|
|
3347
|
+
}
|
|
3348
|
+
let obj_lastModifiedDate_union1 = null;
|
|
3349
|
+
const obj_lastModifiedDate_union1_error = (() => {
|
|
3350
|
+
if (obj_lastModifiedDate !== null) {
|
|
3351
|
+
return new TypeError('Expected "null" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
|
|
3352
|
+
}
|
|
3353
|
+
})();
|
|
3354
|
+
if (obj_lastModifiedDate_union1_error != null) {
|
|
3355
|
+
obj_lastModifiedDate_union1 = obj_lastModifiedDate_union1_error.message;
|
|
3356
|
+
}
|
|
3357
|
+
if (obj_lastModifiedDate_union0 && obj_lastModifiedDate_union1) {
|
|
3358
|
+
let message = 'Object doesn\'t match union (at "' + path_lastModifiedDate + '")';
|
|
3359
|
+
message += '\n' + obj_lastModifiedDate_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3360
|
+
message += '\n' + obj_lastModifiedDate_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3361
|
+
return new TypeError(message);
|
|
3362
|
+
}
|
|
3363
|
+
}
|
|
3364
|
+
if (obj.queryUnrelatedDataObjects !== undefined) {
|
|
3365
|
+
const obj_queryUnrelatedDataObjects = obj.queryUnrelatedDataObjects;
|
|
3366
|
+
const path_queryUnrelatedDataObjects = path + '.queryUnrelatedDataObjects';
|
|
3367
|
+
if (typeof obj_queryUnrelatedDataObjects !== 'string') {
|
|
3368
|
+
return new TypeError('Expected "string" but received "' + typeof obj_queryUnrelatedDataObjects + '" (at "' + path_queryUnrelatedDataObjects + '")');
|
|
3369
|
+
}
|
|
3370
|
+
}
|
|
3371
|
+
if (obj.semanticCalculatedDimensions !== undefined) {
|
|
3372
|
+
const obj_semanticCalculatedDimensions = obj.semanticCalculatedDimensions;
|
|
3373
|
+
const path_semanticCalculatedDimensions = path + '.semanticCalculatedDimensions';
|
|
3374
|
+
if (!ArrayIsArray(obj_semanticCalculatedDimensions)) {
|
|
3375
|
+
return new TypeError('Expected "array" but received "' + typeof obj_semanticCalculatedDimensions + '" (at "' + path_semanticCalculatedDimensions + '")');
|
|
3376
|
+
}
|
|
3377
|
+
for (let i = 0; i < obj_semanticCalculatedDimensions.length; i++) {
|
|
3378
|
+
const obj_semanticCalculatedDimensions_item = obj_semanticCalculatedDimensions[i];
|
|
3379
|
+
const path_semanticCalculatedDimensions_item = path_semanticCalculatedDimensions + '[' + i + ']';
|
|
3380
|
+
const referencepath_semanticCalculatedDimensions_itemValidationError = validate$h(obj_semanticCalculatedDimensions_item, path_semanticCalculatedDimensions_item);
|
|
3381
|
+
if (referencepath_semanticCalculatedDimensions_itemValidationError !== null) {
|
|
3382
|
+
let message = 'Object doesn\'t match SemanticCalculatedDimensionOutputRepresentation (at "' + path_semanticCalculatedDimensions_item + '")\n';
|
|
3383
|
+
message += referencepath_semanticCalculatedDimensions_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
3384
|
+
return new TypeError(message);
|
|
3385
|
+
}
|
|
3386
|
+
}
|
|
3387
|
+
}
|
|
3388
|
+
if (obj.semanticCalculatedDimensionsUrl !== undefined) {
|
|
3389
|
+
const obj_semanticCalculatedDimensionsUrl = obj.semanticCalculatedDimensionsUrl;
|
|
3390
|
+
const path_semanticCalculatedDimensionsUrl = path + '.semanticCalculatedDimensionsUrl';
|
|
3391
|
+
let obj_semanticCalculatedDimensionsUrl_union0 = null;
|
|
3392
|
+
const obj_semanticCalculatedDimensionsUrl_union0_error = (() => {
|
|
3393
|
+
if (typeof obj_semanticCalculatedDimensionsUrl !== 'string') {
|
|
3394
|
+
return new TypeError('Expected "string" but received "' + typeof obj_semanticCalculatedDimensionsUrl + '" (at "' + path_semanticCalculatedDimensionsUrl + '")');
|
|
3395
|
+
}
|
|
3396
|
+
})();
|
|
3397
|
+
if (obj_semanticCalculatedDimensionsUrl_union0_error != null) {
|
|
3398
|
+
obj_semanticCalculatedDimensionsUrl_union0 = obj_semanticCalculatedDimensionsUrl_union0_error.message;
|
|
3399
|
+
}
|
|
3400
|
+
let obj_semanticCalculatedDimensionsUrl_union1 = null;
|
|
3401
|
+
const obj_semanticCalculatedDimensionsUrl_union1_error = (() => {
|
|
3402
|
+
if (obj_semanticCalculatedDimensionsUrl !== null) {
|
|
3403
|
+
return new TypeError('Expected "null" but received "' + typeof obj_semanticCalculatedDimensionsUrl + '" (at "' + path_semanticCalculatedDimensionsUrl + '")');
|
|
3404
|
+
}
|
|
3405
|
+
})();
|
|
3406
|
+
if (obj_semanticCalculatedDimensionsUrl_union1_error != null) {
|
|
3407
|
+
obj_semanticCalculatedDimensionsUrl_union1 = obj_semanticCalculatedDimensionsUrl_union1_error.message;
|
|
3408
|
+
}
|
|
3409
|
+
if (obj_semanticCalculatedDimensionsUrl_union0 && obj_semanticCalculatedDimensionsUrl_union1) {
|
|
3410
|
+
let message = 'Object doesn\'t match union (at "' + path_semanticCalculatedDimensionsUrl + '")';
|
|
3411
|
+
message += '\n' + obj_semanticCalculatedDimensionsUrl_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3412
|
+
message += '\n' + obj_semanticCalculatedDimensionsUrl_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3413
|
+
return new TypeError(message);
|
|
3414
|
+
}
|
|
3415
|
+
}
|
|
3416
|
+
if (obj.semanticCalculatedMeasurements !== undefined) {
|
|
3417
|
+
const obj_semanticCalculatedMeasurements = obj.semanticCalculatedMeasurements;
|
|
3418
|
+
const path_semanticCalculatedMeasurements = path + '.semanticCalculatedMeasurements';
|
|
3419
|
+
if (!ArrayIsArray(obj_semanticCalculatedMeasurements)) {
|
|
3420
|
+
return new TypeError('Expected "array" but received "' + typeof obj_semanticCalculatedMeasurements + '" (at "' + path_semanticCalculatedMeasurements + '")');
|
|
3421
|
+
}
|
|
3422
|
+
for (let i = 0; i < obj_semanticCalculatedMeasurements.length; i++) {
|
|
3423
|
+
const obj_semanticCalculatedMeasurements_item = obj_semanticCalculatedMeasurements[i];
|
|
3424
|
+
const path_semanticCalculatedMeasurements_item = path_semanticCalculatedMeasurements + '[' + i + ']';
|
|
3425
|
+
const referencepath_semanticCalculatedMeasurements_itemValidationError = validate$g(obj_semanticCalculatedMeasurements_item, path_semanticCalculatedMeasurements_item);
|
|
3426
|
+
if (referencepath_semanticCalculatedMeasurements_itemValidationError !== null) {
|
|
3427
|
+
let message = 'Object doesn\'t match SemanticCalculatedMeasurementOutputRepresentation (at "' + path_semanticCalculatedMeasurements_item + '")\n';
|
|
3428
|
+
message += referencepath_semanticCalculatedMeasurements_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
3429
|
+
return new TypeError(message);
|
|
3430
|
+
}
|
|
3431
|
+
}
|
|
3432
|
+
}
|
|
3433
|
+
if (obj.semanticCalculatedMeasurementsUrl !== undefined) {
|
|
3434
|
+
const obj_semanticCalculatedMeasurementsUrl = obj.semanticCalculatedMeasurementsUrl;
|
|
3435
|
+
const path_semanticCalculatedMeasurementsUrl = path + '.semanticCalculatedMeasurementsUrl';
|
|
3436
|
+
let obj_semanticCalculatedMeasurementsUrl_union0 = null;
|
|
3437
|
+
const obj_semanticCalculatedMeasurementsUrl_union0_error = (() => {
|
|
3438
|
+
if (typeof obj_semanticCalculatedMeasurementsUrl !== 'string') {
|
|
3439
|
+
return new TypeError('Expected "string" but received "' + typeof obj_semanticCalculatedMeasurementsUrl + '" (at "' + path_semanticCalculatedMeasurementsUrl + '")');
|
|
3440
|
+
}
|
|
3441
|
+
})();
|
|
3442
|
+
if (obj_semanticCalculatedMeasurementsUrl_union0_error != null) {
|
|
3443
|
+
obj_semanticCalculatedMeasurementsUrl_union0 = obj_semanticCalculatedMeasurementsUrl_union0_error.message;
|
|
3444
|
+
}
|
|
3445
|
+
let obj_semanticCalculatedMeasurementsUrl_union1 = null;
|
|
3446
|
+
const obj_semanticCalculatedMeasurementsUrl_union1_error = (() => {
|
|
3447
|
+
if (obj_semanticCalculatedMeasurementsUrl !== null) {
|
|
3448
|
+
return new TypeError('Expected "null" but received "' + typeof obj_semanticCalculatedMeasurementsUrl + '" (at "' + path_semanticCalculatedMeasurementsUrl + '")');
|
|
3449
|
+
}
|
|
3450
|
+
})();
|
|
3451
|
+
if (obj_semanticCalculatedMeasurementsUrl_union1_error != null) {
|
|
3452
|
+
obj_semanticCalculatedMeasurementsUrl_union1 = obj_semanticCalculatedMeasurementsUrl_union1_error.message;
|
|
3453
|
+
}
|
|
3454
|
+
if (obj_semanticCalculatedMeasurementsUrl_union0 && obj_semanticCalculatedMeasurementsUrl_union1) {
|
|
3455
|
+
let message = 'Object doesn\'t match union (at "' + path_semanticCalculatedMeasurementsUrl + '")';
|
|
3456
|
+
message += '\n' + obj_semanticCalculatedMeasurementsUrl_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3457
|
+
message += '\n' + obj_semanticCalculatedMeasurementsUrl_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3458
|
+
return new TypeError(message);
|
|
3459
|
+
}
|
|
3460
|
+
}
|
|
3461
|
+
if (obj.semanticDataObjects !== undefined) {
|
|
3462
|
+
const obj_semanticDataObjects = obj.semanticDataObjects;
|
|
3463
|
+
const path_semanticDataObjects = path + '.semanticDataObjects';
|
|
3464
|
+
if (!ArrayIsArray(obj_semanticDataObjects)) {
|
|
3465
|
+
return new TypeError('Expected "array" but received "' + typeof obj_semanticDataObjects + '" (at "' + path_semanticDataObjects + '")');
|
|
3466
|
+
}
|
|
3467
|
+
for (let i = 0; i < obj_semanticDataObjects.length; i++) {
|
|
3468
|
+
const obj_semanticDataObjects_item = obj_semanticDataObjects[i];
|
|
3469
|
+
const path_semanticDataObjects_item = path_semanticDataObjects + '[' + i + ']';
|
|
3470
|
+
const referencepath_semanticDataObjects_itemValidationError = validate$d(obj_semanticDataObjects_item, path_semanticDataObjects_item);
|
|
3471
|
+
if (referencepath_semanticDataObjects_itemValidationError !== null) {
|
|
3472
|
+
let message = 'Object doesn\'t match SemanticDataObjectOutputRepresentation (at "' + path_semanticDataObjects_item + '")\n';
|
|
3473
|
+
message += referencepath_semanticDataObjects_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
3474
|
+
return new TypeError(message);
|
|
3475
|
+
}
|
|
3476
|
+
}
|
|
3477
|
+
}
|
|
3478
|
+
if (obj.semanticDataObjectsUrl !== undefined) {
|
|
3479
|
+
const obj_semanticDataObjectsUrl = obj.semanticDataObjectsUrl;
|
|
3480
|
+
const path_semanticDataObjectsUrl = path + '.semanticDataObjectsUrl';
|
|
3481
|
+
let obj_semanticDataObjectsUrl_union0 = null;
|
|
3482
|
+
const obj_semanticDataObjectsUrl_union0_error = (() => {
|
|
3483
|
+
if (typeof obj_semanticDataObjectsUrl !== 'string') {
|
|
3484
|
+
return new TypeError('Expected "string" but received "' + typeof obj_semanticDataObjectsUrl + '" (at "' + path_semanticDataObjectsUrl + '")');
|
|
3485
|
+
}
|
|
3486
|
+
})();
|
|
3487
|
+
if (obj_semanticDataObjectsUrl_union0_error != null) {
|
|
3488
|
+
obj_semanticDataObjectsUrl_union0 = obj_semanticDataObjectsUrl_union0_error.message;
|
|
3489
|
+
}
|
|
3490
|
+
let obj_semanticDataObjectsUrl_union1 = null;
|
|
3491
|
+
const obj_semanticDataObjectsUrl_union1_error = (() => {
|
|
3492
|
+
if (obj_semanticDataObjectsUrl !== null) {
|
|
3493
|
+
return new TypeError('Expected "null" but received "' + typeof obj_semanticDataObjectsUrl + '" (at "' + path_semanticDataObjectsUrl + '")');
|
|
3494
|
+
}
|
|
3495
|
+
})();
|
|
3496
|
+
if (obj_semanticDataObjectsUrl_union1_error != null) {
|
|
3497
|
+
obj_semanticDataObjectsUrl_union1 = obj_semanticDataObjectsUrl_union1_error.message;
|
|
3498
|
+
}
|
|
3499
|
+
if (obj_semanticDataObjectsUrl_union0 && obj_semanticDataObjectsUrl_union1) {
|
|
3500
|
+
let message = 'Object doesn\'t match union (at "' + path_semanticDataObjectsUrl + '")';
|
|
3501
|
+
message += '\n' + obj_semanticDataObjectsUrl_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3502
|
+
message += '\n' + obj_semanticDataObjectsUrl_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3503
|
+
return new TypeError(message);
|
|
3504
|
+
}
|
|
3505
|
+
}
|
|
3506
|
+
if (obj.semanticLogicalViews !== undefined) {
|
|
3507
|
+
const obj_semanticLogicalViews = obj.semanticLogicalViews;
|
|
3508
|
+
const path_semanticLogicalViews = path + '.semanticLogicalViews';
|
|
3509
|
+
if (!ArrayIsArray(obj_semanticLogicalViews)) {
|
|
3510
|
+
return new TypeError('Expected "array" but received "' + typeof obj_semanticLogicalViews + '" (at "' + path_semanticLogicalViews + '")');
|
|
3511
|
+
}
|
|
3512
|
+
for (let i = 0; i < obj_semanticLogicalViews.length; i++) {
|
|
3513
|
+
const obj_semanticLogicalViews_item = obj_semanticLogicalViews[i];
|
|
3514
|
+
const path_semanticLogicalViews_item = path_semanticLogicalViews + '[' + i + ']';
|
|
3515
|
+
const referencepath_semanticLogicalViews_itemValidationError = validate$a(obj_semanticLogicalViews_item, path_semanticLogicalViews_item);
|
|
3516
|
+
if (referencepath_semanticLogicalViews_itemValidationError !== null) {
|
|
3517
|
+
let message = 'Object doesn\'t match SemanticLogicalViewOutputRepresentation (at "' + path_semanticLogicalViews_item + '")\n';
|
|
3518
|
+
message += referencepath_semanticLogicalViews_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
3519
|
+
return new TypeError(message);
|
|
3520
|
+
}
|
|
3521
|
+
}
|
|
3522
|
+
}
|
|
3523
|
+
if (obj.semanticMetrics !== undefined) {
|
|
3524
|
+
const obj_semanticMetrics = obj.semanticMetrics;
|
|
3525
|
+
const path_semanticMetrics = path + '.semanticMetrics';
|
|
3526
|
+
if (!ArrayIsArray(obj_semanticMetrics)) {
|
|
3527
|
+
return new TypeError('Expected "array" but received "' + typeof obj_semanticMetrics + '" (at "' + path_semanticMetrics + '")');
|
|
3528
|
+
}
|
|
3529
|
+
for (let i = 0; i < obj_semanticMetrics.length; i++) {
|
|
3530
|
+
const obj_semanticMetrics_item = obj_semanticMetrics[i];
|
|
3531
|
+
const path_semanticMetrics_item = path_semanticMetrics + '[' + i + ']';
|
|
3532
|
+
const referencepath_semanticMetrics_itemValidationError = validate$4(obj_semanticMetrics_item, path_semanticMetrics_item);
|
|
3533
|
+
if (referencepath_semanticMetrics_itemValidationError !== null) {
|
|
3534
|
+
let message = 'Object doesn\'t match SemanticMetricOutputRepresentation (at "' + path_semanticMetrics_item + '")\n';
|
|
3535
|
+
message += referencepath_semanticMetrics_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
3536
|
+
return new TypeError(message);
|
|
3537
|
+
}
|
|
3538
|
+
}
|
|
3539
|
+
}
|
|
3540
|
+
if (obj.semanticParameters !== undefined) {
|
|
3541
|
+
const obj_semanticParameters = obj.semanticParameters;
|
|
3542
|
+
const path_semanticParameters = path + '.semanticParameters';
|
|
3543
|
+
if (!ArrayIsArray(obj_semanticParameters)) {
|
|
3544
|
+
return new TypeError('Expected "array" but received "' + typeof obj_semanticParameters + '" (at "' + path_semanticParameters + '")');
|
|
3545
|
+
}
|
|
3546
|
+
for (let i = 0; i < obj_semanticParameters.length; i++) {
|
|
3547
|
+
const obj_semanticParameters_item = obj_semanticParameters[i];
|
|
3548
|
+
const path_semanticParameters_item = path_semanticParameters + '[' + i + ']';
|
|
3549
|
+
const referencepath_semanticParameters_itemValidationError = validate$3(obj_semanticParameters_item, path_semanticParameters_item);
|
|
3550
|
+
if (referencepath_semanticParameters_itemValidationError !== null) {
|
|
3551
|
+
let message = 'Object doesn\'t match SemanticParameterOutputRepresentation (at "' + path_semanticParameters_item + '")\n';
|
|
3552
|
+
message += referencepath_semanticParameters_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
3553
|
+
return new TypeError(message);
|
|
3554
|
+
}
|
|
3555
|
+
}
|
|
3556
|
+
}
|
|
3557
|
+
if (obj.semanticParametersUrl !== undefined) {
|
|
3558
|
+
const obj_semanticParametersUrl = obj.semanticParametersUrl;
|
|
3559
|
+
const path_semanticParametersUrl = path + '.semanticParametersUrl';
|
|
3560
|
+
let obj_semanticParametersUrl_union0 = null;
|
|
3561
|
+
const obj_semanticParametersUrl_union0_error = (() => {
|
|
3562
|
+
if (typeof obj_semanticParametersUrl !== 'string') {
|
|
3563
|
+
return new TypeError('Expected "string" but received "' + typeof obj_semanticParametersUrl + '" (at "' + path_semanticParametersUrl + '")');
|
|
3564
|
+
}
|
|
3565
|
+
})();
|
|
3566
|
+
if (obj_semanticParametersUrl_union0_error != null) {
|
|
3567
|
+
obj_semanticParametersUrl_union0 = obj_semanticParametersUrl_union0_error.message;
|
|
3568
|
+
}
|
|
3569
|
+
let obj_semanticParametersUrl_union1 = null;
|
|
3570
|
+
const obj_semanticParametersUrl_union1_error = (() => {
|
|
3571
|
+
if (obj_semanticParametersUrl !== null) {
|
|
3572
|
+
return new TypeError('Expected "null" but received "' + typeof obj_semanticParametersUrl + '" (at "' + path_semanticParametersUrl + '")');
|
|
3573
|
+
}
|
|
3574
|
+
})();
|
|
3575
|
+
if (obj_semanticParametersUrl_union1_error != null) {
|
|
3576
|
+
obj_semanticParametersUrl_union1 = obj_semanticParametersUrl_union1_error.message;
|
|
3577
|
+
}
|
|
3578
|
+
if (obj_semanticParametersUrl_union0 && obj_semanticParametersUrl_union1) {
|
|
3579
|
+
let message = 'Object doesn\'t match union (at "' + path_semanticParametersUrl + '")';
|
|
3580
|
+
message += '\n' + obj_semanticParametersUrl_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3581
|
+
message += '\n' + obj_semanticParametersUrl_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3582
|
+
return new TypeError(message);
|
|
3583
|
+
}
|
|
3584
|
+
}
|
|
3585
|
+
if (obj.semanticRelationships !== undefined) {
|
|
3586
|
+
const obj_semanticRelationships = obj.semanticRelationships;
|
|
3587
|
+
const path_semanticRelationships = path + '.semanticRelationships';
|
|
3588
|
+
if (!ArrayIsArray(obj_semanticRelationships)) {
|
|
3589
|
+
return new TypeError('Expected "array" but received "' + typeof obj_semanticRelationships + '" (at "' + path_semanticRelationships + '")');
|
|
3590
|
+
}
|
|
3591
|
+
for (let i = 0; i < obj_semanticRelationships.length; i++) {
|
|
3592
|
+
const obj_semanticRelationships_item = obj_semanticRelationships[i];
|
|
3593
|
+
const path_semanticRelationships_item = path_semanticRelationships + '[' + i + ']';
|
|
3594
|
+
const referencepath_semanticRelationships_itemValidationError = validate$b(obj_semanticRelationships_item, path_semanticRelationships_item);
|
|
3595
|
+
if (referencepath_semanticRelationships_itemValidationError !== null) {
|
|
3596
|
+
let message = 'Object doesn\'t match SemanticRelationshipOutputRepresentation (at "' + path_semanticRelationships_item + '")\n';
|
|
3597
|
+
message += referencepath_semanticRelationships_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
3598
|
+
return new TypeError(message);
|
|
3599
|
+
}
|
|
3600
|
+
}
|
|
3601
|
+
}
|
|
3602
|
+
if (obj.semanticRelationshipsUrl !== undefined) {
|
|
3603
|
+
const obj_semanticRelationshipsUrl = obj.semanticRelationshipsUrl;
|
|
3604
|
+
const path_semanticRelationshipsUrl = path + '.semanticRelationshipsUrl';
|
|
3605
|
+
let obj_semanticRelationshipsUrl_union0 = null;
|
|
3606
|
+
const obj_semanticRelationshipsUrl_union0_error = (() => {
|
|
3607
|
+
if (typeof obj_semanticRelationshipsUrl !== 'string') {
|
|
3608
|
+
return new TypeError('Expected "string" but received "' + typeof obj_semanticRelationshipsUrl + '" (at "' + path_semanticRelationshipsUrl + '")');
|
|
3609
|
+
}
|
|
3610
|
+
})();
|
|
3611
|
+
if (obj_semanticRelationshipsUrl_union0_error != null) {
|
|
3612
|
+
obj_semanticRelationshipsUrl_union0 = obj_semanticRelationshipsUrl_union0_error.message;
|
|
3613
|
+
}
|
|
3614
|
+
let obj_semanticRelationshipsUrl_union1 = null;
|
|
3615
|
+
const obj_semanticRelationshipsUrl_union1_error = (() => {
|
|
3616
|
+
if (obj_semanticRelationshipsUrl !== null) {
|
|
3617
|
+
return new TypeError('Expected "null" but received "' + typeof obj_semanticRelationshipsUrl + '" (at "' + path_semanticRelationshipsUrl + '")');
|
|
3618
|
+
}
|
|
3619
|
+
})();
|
|
3620
|
+
if (obj_semanticRelationshipsUrl_union1_error != null) {
|
|
3621
|
+
obj_semanticRelationshipsUrl_union1 = obj_semanticRelationshipsUrl_union1_error.message;
|
|
3622
|
+
}
|
|
3623
|
+
if (obj_semanticRelationshipsUrl_union0 && obj_semanticRelationshipsUrl_union1) {
|
|
3624
|
+
let message = 'Object doesn\'t match union (at "' + path_semanticRelationshipsUrl + '")';
|
|
3625
|
+
message += '\n' + obj_semanticRelationshipsUrl_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3626
|
+
message += '\n' + obj_semanticRelationshipsUrl_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3627
|
+
return new TypeError(message);
|
|
3628
|
+
}
|
|
3629
|
+
}
|
|
3630
|
+
})();
|
|
3631
|
+
return v_error === undefined ? null : v_error;
|
|
3632
|
+
}
|
|
3633
|
+
const RepresentationType$1 = 'SemanticModelOutputRepresentation';
|
|
3634
|
+
function keyBuilder$4(luvio, config) {
|
|
3635
|
+
return keyPrefix + '::' + RepresentationType$1 + ':' + config.name;
|
|
3636
|
+
}
|
|
3637
|
+
function keyBuilderFromType(luvio, object) {
|
|
3638
|
+
const keyParams = {
|
|
3639
|
+
name: object.apiName
|
|
3640
|
+
};
|
|
3641
|
+
return keyBuilder$4(luvio, keyParams);
|
|
3642
|
+
}
|
|
3643
|
+
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
3644
|
+
return input;
|
|
3645
|
+
}
|
|
3646
|
+
const select$3 = function SemanticModelOutputRepresentationSelect() {
|
|
3647
|
+
return {
|
|
3648
|
+
kind: 'Fragment',
|
|
3649
|
+
version: VERSION$1,
|
|
3650
|
+
private: [],
|
|
3651
|
+
opaque: true
|
|
3652
|
+
};
|
|
3653
|
+
};
|
|
3654
|
+
function equals$1(existing, incoming) {
|
|
3655
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
3656
|
+
return false;
|
|
3657
|
+
}
|
|
3658
|
+
return true;
|
|
3659
|
+
}
|
|
3660
|
+
const ingest$1 = function SemanticModelOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
3661
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3662
|
+
const validateError = validate$2(input);
|
|
3663
|
+
if (validateError !== null) {
|
|
3664
|
+
throw validateError;
|
|
3665
|
+
}
|
|
3666
|
+
}
|
|
3667
|
+
const key = keyBuilderFromType(luvio, input);
|
|
3668
|
+
const ttlToUse = path.ttl !== undefined ? path.ttl : 30000;
|
|
3669
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "SemanticAuthoring", VERSION$1, RepresentationType$1, equals$1);
|
|
3670
|
+
return createLink(key);
|
|
3671
|
+
};
|
|
3672
|
+
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
3673
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
3674
|
+
const rootKey = keyBuilderFromType(luvio, input);
|
|
3675
|
+
rootKeySet.set(rootKey, {
|
|
3676
|
+
namespace: keyPrefix,
|
|
3677
|
+
representationName: RepresentationType$1,
|
|
3678
|
+
mergeable: false
|
|
3679
|
+
});
|
|
3680
|
+
}
|
|
3681
|
+
|
|
3682
|
+
function select$2(luvio, params) {
|
|
3683
|
+
return select$3();
|
|
3684
|
+
}
|
|
3685
|
+
function keyBuilder$3(luvio, params) {
|
|
3686
|
+
return keyBuilder$4(luvio, {
|
|
3687
|
+
name: params.urlParams.modelApiNameOrId
|
|
3688
|
+
});
|
|
3689
|
+
}
|
|
3690
|
+
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
3691
|
+
getTypeCacheKeys$1(storeKeyMap, luvio, response);
|
|
3692
|
+
}
|
|
3693
|
+
function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
3694
|
+
const { body } = response;
|
|
3695
|
+
const key = keyBuilder$3(luvio, resourceParams);
|
|
3696
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
3697
|
+
const snapshot = luvio.storeLookup({
|
|
3698
|
+
recordId: key,
|
|
3699
|
+
node: select$2(),
|
|
3700
|
+
variables: {},
|
|
3701
|
+
}, snapshotRefresh);
|
|
3702
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3703
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
3704
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
3705
|
+
}
|
|
3706
|
+
}
|
|
3707
|
+
deepFreeze(snapshot.data);
|
|
3708
|
+
return snapshot;
|
|
3709
|
+
}
|
|
3710
|
+
function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
3711
|
+
const key = keyBuilder$3(luvio, params);
|
|
3712
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
3713
|
+
luvio.storeIngestError(key, errorSnapshot);
|
|
3714
|
+
return errorSnapshot;
|
|
3715
|
+
}
|
|
3716
|
+
function createResourceRequest$1(config) {
|
|
3717
|
+
const headers = {};
|
|
3718
|
+
return {
|
|
3719
|
+
baseUri: '/services/data/v62.0',
|
|
3720
|
+
basePath: '/ssot/semantic/models/' + config.urlParams.modelApiNameOrId + '',
|
|
3721
|
+
method: 'get',
|
|
3722
|
+
body: null,
|
|
3723
|
+
urlParams: config.urlParams,
|
|
3724
|
+
queryParams: config.queryParams,
|
|
3725
|
+
headers,
|
|
3726
|
+
priority: 'normal',
|
|
3727
|
+
};
|
|
3728
|
+
}
|
|
3729
|
+
function createResourceRequestFromRepresentation(representation) {
|
|
3730
|
+
const config = {
|
|
3731
|
+
urlParams: {},
|
|
3732
|
+
queryParams: {},
|
|
3733
|
+
};
|
|
3734
|
+
config.urlParams.modelApiNameOrId = representation.apiName;
|
|
3735
|
+
return createResourceRequest$1(config);
|
|
3736
|
+
}
|
|
3737
|
+
|
|
3738
|
+
const adapterName$1 = 'getSemanticModel';
|
|
3739
|
+
const getSemanticModel_ConfigPropertyMetadata = [
|
|
3740
|
+
generateParamConfigMetadata('modelApiNameOrId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
3741
|
+
generateParamConfigMetadata('fieldName', false, 1 /* QueryParameter */, 0 /* String */),
|
|
3742
|
+
generateParamConfigMetadata('includeModelContent', false, 1 /* QueryParameter */, 1 /* Boolean */),
|
|
3743
|
+
];
|
|
3744
|
+
const getSemanticModel_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getSemanticModel_ConfigPropertyMetadata);
|
|
3745
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$2(getSemanticModel_ConfigPropertyMetadata);
|
|
3746
|
+
function keyBuilder$2(luvio, config) {
|
|
3747
|
+
const resourceParams = createResourceParams$1(config);
|
|
3748
|
+
return keyBuilder$3(luvio, resourceParams);
|
|
3749
|
+
}
|
|
3750
|
+
function typeCheckConfig$1(untrustedConfig) {
|
|
3751
|
+
const config = {};
|
|
3752
|
+
typeCheckConfig$2(untrustedConfig, config, getSemanticModel_ConfigPropertyMetadata);
|
|
3753
|
+
return config;
|
|
3754
|
+
}
|
|
3755
|
+
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
3756
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
3757
|
+
return null;
|
|
3758
|
+
}
|
|
3759
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3760
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
3761
|
+
}
|
|
3762
|
+
const config = typeCheckConfig$1(untrustedConfig);
|
|
3763
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3764
|
+
return null;
|
|
3765
|
+
}
|
|
3766
|
+
return config;
|
|
3767
|
+
}
|
|
3768
|
+
function adapterFragment$1(luvio, config) {
|
|
3769
|
+
createResourceParams$1(config);
|
|
3770
|
+
return select$2();
|
|
3771
|
+
}
|
|
3772
|
+
function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
|
|
3773
|
+
const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
|
|
3774
|
+
config,
|
|
3775
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
3776
|
+
});
|
|
3777
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
3778
|
+
}
|
|
3779
|
+
function onFetchResponseError$1(luvio, config, resourceParams, response) {
|
|
3780
|
+
const snapshot = ingestError$1(luvio, resourceParams, response, {
|
|
3781
|
+
config,
|
|
3782
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
3783
|
+
});
|
|
3784
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
3785
|
+
}
|
|
3786
|
+
function buildNetworkSnapshot$1(luvio, config, options) {
|
|
3787
|
+
const resourceParams = createResourceParams$1(config);
|
|
3788
|
+
const request = createResourceRequest$1(resourceParams);
|
|
3789
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
3790
|
+
.then((response) => {
|
|
3791
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
|
|
3792
|
+
const cache = new StoreKeyMap();
|
|
3793
|
+
getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
|
|
3794
|
+
return cache;
|
|
3795
|
+
});
|
|
3796
|
+
}, (response) => {
|
|
3797
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
|
|
3798
|
+
});
|
|
3799
|
+
}
|
|
3800
|
+
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
3801
|
+
return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
|
|
3802
|
+
}
|
|
3803
|
+
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
3804
|
+
const { luvio, config } = context;
|
|
3805
|
+
const selector = {
|
|
3806
|
+
recordId: keyBuilder$2(luvio, config),
|
|
3807
|
+
node: adapterFragment$1(luvio, config),
|
|
3808
|
+
variables: {},
|
|
3809
|
+
};
|
|
3810
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
3811
|
+
config,
|
|
3812
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
3813
|
+
});
|
|
3814
|
+
return cacheSnapshot;
|
|
3815
|
+
}
|
|
3816
|
+
const getSemanticModelAdapterFactory = (luvio) => function SemanticAuthoring__getSemanticModel(untrustedConfig, requestContext) {
|
|
3817
|
+
const config = validateAdapterConfig$1(untrustedConfig, getSemanticModel_ConfigPropertyNames);
|
|
3818
|
+
// Invalid or incomplete config
|
|
3819
|
+
if (config === null) {
|
|
3820
|
+
return null;
|
|
3821
|
+
}
|
|
3822
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
3823
|
+
buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
|
|
3824
|
+
};
|
|
3825
|
+
const notifyChangeFactory = (luvio, options) => {
|
|
3826
|
+
return function getSsotSemanticModelsByModelApiNameOrIdNotifyChange(configs) {
|
|
3827
|
+
const keys = configs.map(c => keyBuilder$4(luvio, c));
|
|
3828
|
+
luvio.getNotifyChangeStoreEntries(keys).then(entries => {
|
|
3829
|
+
for (let i = 0, len = entries.length; i < len; i++) {
|
|
3830
|
+
const { key, record: val } = entries[i];
|
|
3831
|
+
const refreshRequest = createResourceRequestFromRepresentation(val);
|
|
3832
|
+
luvio.dispatchResourceRequest(refreshRequest, options)
|
|
3833
|
+
.then((response) => {
|
|
3834
|
+
return luvio.handleSuccessResponse(() => {
|
|
3835
|
+
const { body } = response;
|
|
3836
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
3837
|
+
return luvio.storeBroadcast();
|
|
3838
|
+
}, () => {
|
|
3839
|
+
const cache = new StoreKeyMap();
|
|
3840
|
+
getTypeCacheKeys$1(cache, luvio, response.body);
|
|
3841
|
+
return cache;
|
|
3842
|
+
});
|
|
3843
|
+
}, (error) => {
|
|
3844
|
+
return luvio.handleErrorResponse(() => {
|
|
3845
|
+
const errorSnapshot = luvio.errorSnapshot(error);
|
|
3846
|
+
luvio.storeIngestError(key, errorSnapshot, undefined);
|
|
3847
|
+
return luvio.storeBroadcast().then(() => errorSnapshot);
|
|
3848
|
+
});
|
|
3849
|
+
});
|
|
3850
|
+
}
|
|
3851
|
+
});
|
|
3852
|
+
};
|
|
3853
|
+
};
|
|
3854
|
+
|
|
3855
|
+
function validate$1(obj, path = 'SemanticModelPartialOutputRepresentation') {
|
|
3856
|
+
const v_error = (() => {
|
|
3857
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3858
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
3859
|
+
}
|
|
3860
|
+
const obj_apiName = obj.apiName;
|
|
3861
|
+
const path_apiName = path + '.apiName';
|
|
3862
|
+
if (typeof obj_apiName !== 'string') {
|
|
3863
|
+
return new TypeError('Expected "string" but received "' + typeof obj_apiName + '" (at "' + path_apiName + '")');
|
|
3864
|
+
}
|
|
3865
|
+
if (obj.app !== undefined) {
|
|
3866
|
+
const obj_app = obj.app;
|
|
3867
|
+
const path_app = path + '.app';
|
|
3868
|
+
let obj_app_union0 = null;
|
|
3869
|
+
const obj_app_union0_error = (() => {
|
|
3870
|
+
if (typeof obj_app !== 'string') {
|
|
3871
|
+
return new TypeError('Expected "string" but received "' + typeof obj_app + '" (at "' + path_app + '")');
|
|
3872
|
+
}
|
|
3873
|
+
})();
|
|
3874
|
+
if (obj_app_union0_error != null) {
|
|
3875
|
+
obj_app_union0 = obj_app_union0_error.message;
|
|
3876
|
+
}
|
|
3877
|
+
let obj_app_union1 = null;
|
|
3878
|
+
const obj_app_union1_error = (() => {
|
|
3879
|
+
if (obj_app !== null) {
|
|
3880
|
+
return new TypeError('Expected "null" but received "' + typeof obj_app + '" (at "' + path_app + '")');
|
|
3881
|
+
}
|
|
3882
|
+
})();
|
|
3883
|
+
if (obj_app_union1_error != null) {
|
|
3884
|
+
obj_app_union1 = obj_app_union1_error.message;
|
|
3885
|
+
}
|
|
3886
|
+
if (obj_app_union0 && obj_app_union1) {
|
|
3887
|
+
let message = 'Object doesn\'t match union (at "' + path_app + '")';
|
|
3888
|
+
message += '\n' + obj_app_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3889
|
+
message += '\n' + obj_app_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3890
|
+
return new TypeError(message);
|
|
3891
|
+
}
|
|
3892
|
+
}
|
|
3893
|
+
if (obj.categories !== undefined) {
|
|
3894
|
+
const obj_categories = obj.categories;
|
|
3895
|
+
const path_categories = path + '.categories';
|
|
3896
|
+
if (!ArrayIsArray(obj_categories)) {
|
|
3897
|
+
return new TypeError('Expected "array" but received "' + typeof obj_categories + '" (at "' + path_categories + '")');
|
|
3898
|
+
}
|
|
3899
|
+
for (let i = 0; i < obj_categories.length; i++) {
|
|
3900
|
+
const obj_categories_item = obj_categories[i];
|
|
3901
|
+
const path_categories_item = path_categories + '[' + i + ']';
|
|
3902
|
+
if (typeof obj_categories_item !== 'string') {
|
|
3903
|
+
return new TypeError('Expected "string" but received "' + typeof obj_categories_item + '" (at "' + path_categories_item + '")');
|
|
3904
|
+
}
|
|
3905
|
+
}
|
|
3906
|
+
}
|
|
3907
|
+
const obj_createdBy = obj.createdBy;
|
|
3908
|
+
const path_createdBy = path + '.createdBy';
|
|
3909
|
+
if (typeof obj_createdBy !== 'string') {
|
|
3910
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdBy + '" (at "' + path_createdBy + '")');
|
|
3911
|
+
}
|
|
3912
|
+
const obj_createdDate = obj.createdDate;
|
|
3913
|
+
const path_createdDate = path + '.createdDate';
|
|
3914
|
+
if (typeof obj_createdDate !== 'string') {
|
|
3915
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
|
|
3916
|
+
}
|
|
3917
|
+
const obj_dataspace = obj.dataspace;
|
|
3918
|
+
const path_dataspace = path + '.dataspace';
|
|
3919
|
+
let obj_dataspace_union0 = null;
|
|
3920
|
+
const obj_dataspace_union0_error = (() => {
|
|
3921
|
+
if (typeof obj_dataspace !== 'string') {
|
|
3922
|
+
return new TypeError('Expected "string" but received "' + typeof obj_dataspace + '" (at "' + path_dataspace + '")');
|
|
3923
|
+
}
|
|
3924
|
+
})();
|
|
3925
|
+
if (obj_dataspace_union0_error != null) {
|
|
3926
|
+
obj_dataspace_union0 = obj_dataspace_union0_error.message;
|
|
3927
|
+
}
|
|
3928
|
+
let obj_dataspace_union1 = null;
|
|
3929
|
+
const obj_dataspace_union1_error = (() => {
|
|
3930
|
+
if (obj_dataspace !== null) {
|
|
3931
|
+
return new TypeError('Expected "null" but received "' + typeof obj_dataspace + '" (at "' + path_dataspace + '")');
|
|
3932
|
+
}
|
|
3933
|
+
})();
|
|
3934
|
+
if (obj_dataspace_union1_error != null) {
|
|
3935
|
+
obj_dataspace_union1 = obj_dataspace_union1_error.message;
|
|
3936
|
+
}
|
|
3937
|
+
if (obj_dataspace_union0 && obj_dataspace_union1) {
|
|
3938
|
+
let message = 'Object doesn\'t match union (at "' + path_dataspace + '")';
|
|
3939
|
+
message += '\n' + obj_dataspace_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3940
|
+
message += '\n' + obj_dataspace_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3941
|
+
return new TypeError(message);
|
|
3942
|
+
}
|
|
3943
|
+
if (obj.description !== undefined) {
|
|
3944
|
+
const obj_description = obj.description;
|
|
3945
|
+
const path_description = path + '.description';
|
|
3946
|
+
let obj_description_union0 = null;
|
|
3947
|
+
const obj_description_union0_error = (() => {
|
|
3948
|
+
if (typeof obj_description !== 'string') {
|
|
3949
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
3950
|
+
}
|
|
3951
|
+
})();
|
|
3952
|
+
if (obj_description_union0_error != null) {
|
|
3953
|
+
obj_description_union0 = obj_description_union0_error.message;
|
|
3954
|
+
}
|
|
3955
|
+
let obj_description_union1 = null;
|
|
3956
|
+
const obj_description_union1_error = (() => {
|
|
3957
|
+
if (obj_description !== null) {
|
|
3958
|
+
return new TypeError('Expected "null" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
3959
|
+
}
|
|
3960
|
+
})();
|
|
3961
|
+
if (obj_description_union1_error != null) {
|
|
3962
|
+
obj_description_union1 = obj_description_union1_error.message;
|
|
3963
|
+
}
|
|
3964
|
+
if (obj_description_union0 && obj_description_union1) {
|
|
3965
|
+
let message = 'Object doesn\'t match union (at "' + path_description + '")';
|
|
3966
|
+
message += '\n' + obj_description_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3967
|
+
message += '\n' + obj_description_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3968
|
+
return new TypeError(message);
|
|
3969
|
+
}
|
|
3970
|
+
}
|
|
3971
|
+
const obj_id = obj.id;
|
|
3972
|
+
const path_id = path + '.id';
|
|
3973
|
+
if (typeof obj_id !== 'string') {
|
|
3974
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
3975
|
+
}
|
|
3976
|
+
const obj_label = obj.label;
|
|
3977
|
+
const path_label = path + '.label';
|
|
3978
|
+
let obj_label_union0 = null;
|
|
3979
|
+
const obj_label_union0_error = (() => {
|
|
3980
|
+
if (typeof obj_label !== 'string') {
|
|
3981
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
3982
|
+
}
|
|
3983
|
+
})();
|
|
3984
|
+
if (obj_label_union0_error != null) {
|
|
3985
|
+
obj_label_union0 = obj_label_union0_error.message;
|
|
3986
|
+
}
|
|
3987
|
+
let obj_label_union1 = null;
|
|
3988
|
+
const obj_label_union1_error = (() => {
|
|
3989
|
+
if (obj_label !== null) {
|
|
3990
|
+
return new TypeError('Expected "null" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
3991
|
+
}
|
|
3992
|
+
})();
|
|
3993
|
+
if (obj_label_union1_error != null) {
|
|
3994
|
+
obj_label_union1 = obj_label_union1_error.message;
|
|
3995
|
+
}
|
|
3996
|
+
if (obj_label_union0 && obj_label_union1) {
|
|
3997
|
+
let message = 'Object doesn\'t match union (at "' + path_label + '")';
|
|
3998
|
+
message += '\n' + obj_label_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3999
|
+
message += '\n' + obj_label_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
4000
|
+
return new TypeError(message);
|
|
4001
|
+
}
|
|
4002
|
+
if (obj.lastModifiedBy !== undefined) {
|
|
4003
|
+
const obj_lastModifiedBy = obj.lastModifiedBy;
|
|
4004
|
+
const path_lastModifiedBy = path + '.lastModifiedBy';
|
|
4005
|
+
let obj_lastModifiedBy_union0 = null;
|
|
4006
|
+
const obj_lastModifiedBy_union0_error = (() => {
|
|
4007
|
+
if (typeof obj_lastModifiedBy !== 'string') {
|
|
4008
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedBy + '" (at "' + path_lastModifiedBy + '")');
|
|
4009
|
+
}
|
|
4010
|
+
})();
|
|
4011
|
+
if (obj_lastModifiedBy_union0_error != null) {
|
|
4012
|
+
obj_lastModifiedBy_union0 = obj_lastModifiedBy_union0_error.message;
|
|
4013
|
+
}
|
|
4014
|
+
let obj_lastModifiedBy_union1 = null;
|
|
4015
|
+
const obj_lastModifiedBy_union1_error = (() => {
|
|
4016
|
+
if (obj_lastModifiedBy !== null) {
|
|
4017
|
+
return new TypeError('Expected "null" but received "' + typeof obj_lastModifiedBy + '" (at "' + path_lastModifiedBy + '")');
|
|
4018
|
+
}
|
|
4019
|
+
})();
|
|
4020
|
+
if (obj_lastModifiedBy_union1_error != null) {
|
|
4021
|
+
obj_lastModifiedBy_union1 = obj_lastModifiedBy_union1_error.message;
|
|
4022
|
+
}
|
|
4023
|
+
if (obj_lastModifiedBy_union0 && obj_lastModifiedBy_union1) {
|
|
4024
|
+
let message = 'Object doesn\'t match union (at "' + path_lastModifiedBy + '")';
|
|
4025
|
+
message += '\n' + obj_lastModifiedBy_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
4026
|
+
message += '\n' + obj_lastModifiedBy_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
4027
|
+
return new TypeError(message);
|
|
4028
|
+
}
|
|
4029
|
+
}
|
|
4030
|
+
if (obj.lastModifiedDate !== undefined) {
|
|
4031
|
+
const obj_lastModifiedDate = obj.lastModifiedDate;
|
|
4032
|
+
const path_lastModifiedDate = path + '.lastModifiedDate';
|
|
4033
|
+
let obj_lastModifiedDate_union0 = null;
|
|
4034
|
+
const obj_lastModifiedDate_union0_error = (() => {
|
|
4035
|
+
if (typeof obj_lastModifiedDate !== 'string') {
|
|
4036
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
|
|
4037
|
+
}
|
|
4038
|
+
})();
|
|
4039
|
+
if (obj_lastModifiedDate_union0_error != null) {
|
|
4040
|
+
obj_lastModifiedDate_union0 = obj_lastModifiedDate_union0_error.message;
|
|
4041
|
+
}
|
|
4042
|
+
let obj_lastModifiedDate_union1 = null;
|
|
4043
|
+
const obj_lastModifiedDate_union1_error = (() => {
|
|
4044
|
+
if (obj_lastModifiedDate !== null) {
|
|
4045
|
+
return new TypeError('Expected "null" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
|
|
4046
|
+
}
|
|
4047
|
+
})();
|
|
4048
|
+
if (obj_lastModifiedDate_union1_error != null) {
|
|
4049
|
+
obj_lastModifiedDate_union1 = obj_lastModifiedDate_union1_error.message;
|
|
4050
|
+
}
|
|
4051
|
+
if (obj_lastModifiedDate_union0 && obj_lastModifiedDate_union1) {
|
|
4052
|
+
let message = 'Object doesn\'t match union (at "' + path_lastModifiedDate + '")';
|
|
4053
|
+
message += '\n' + obj_lastModifiedDate_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
4054
|
+
message += '\n' + obj_lastModifiedDate_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
4055
|
+
return new TypeError(message);
|
|
4056
|
+
}
|
|
4057
|
+
}
|
|
4058
|
+
if (obj.queryUnrelatedDataObjects !== undefined) {
|
|
4059
|
+
const obj_queryUnrelatedDataObjects = obj.queryUnrelatedDataObjects;
|
|
4060
|
+
const path_queryUnrelatedDataObjects = path + '.queryUnrelatedDataObjects';
|
|
4061
|
+
if (typeof obj_queryUnrelatedDataObjects !== 'string') {
|
|
4062
|
+
return new TypeError('Expected "string" but received "' + typeof obj_queryUnrelatedDataObjects + '" (at "' + path_queryUnrelatedDataObjects + '")');
|
|
4063
|
+
}
|
|
4064
|
+
}
|
|
4065
|
+
if (obj.semanticCalculatedDimensionsUrl !== undefined) {
|
|
4066
|
+
const obj_semanticCalculatedDimensionsUrl = obj.semanticCalculatedDimensionsUrl;
|
|
4067
|
+
const path_semanticCalculatedDimensionsUrl = path + '.semanticCalculatedDimensionsUrl';
|
|
4068
|
+
let obj_semanticCalculatedDimensionsUrl_union0 = null;
|
|
4069
|
+
const obj_semanticCalculatedDimensionsUrl_union0_error = (() => {
|
|
4070
|
+
if (typeof obj_semanticCalculatedDimensionsUrl !== 'string') {
|
|
4071
|
+
return new TypeError('Expected "string" but received "' + typeof obj_semanticCalculatedDimensionsUrl + '" (at "' + path_semanticCalculatedDimensionsUrl + '")');
|
|
4072
|
+
}
|
|
4073
|
+
})();
|
|
4074
|
+
if (obj_semanticCalculatedDimensionsUrl_union0_error != null) {
|
|
4075
|
+
obj_semanticCalculatedDimensionsUrl_union0 = obj_semanticCalculatedDimensionsUrl_union0_error.message;
|
|
4076
|
+
}
|
|
4077
|
+
let obj_semanticCalculatedDimensionsUrl_union1 = null;
|
|
4078
|
+
const obj_semanticCalculatedDimensionsUrl_union1_error = (() => {
|
|
4079
|
+
if (obj_semanticCalculatedDimensionsUrl !== null) {
|
|
4080
|
+
return new TypeError('Expected "null" but received "' + typeof obj_semanticCalculatedDimensionsUrl + '" (at "' + path_semanticCalculatedDimensionsUrl + '")');
|
|
4081
|
+
}
|
|
4082
|
+
})();
|
|
4083
|
+
if (obj_semanticCalculatedDimensionsUrl_union1_error != null) {
|
|
4084
|
+
obj_semanticCalculatedDimensionsUrl_union1 = obj_semanticCalculatedDimensionsUrl_union1_error.message;
|
|
4085
|
+
}
|
|
4086
|
+
if (obj_semanticCalculatedDimensionsUrl_union0 && obj_semanticCalculatedDimensionsUrl_union1) {
|
|
4087
|
+
let message = 'Object doesn\'t match union (at "' + path_semanticCalculatedDimensionsUrl + '")';
|
|
4088
|
+
message += '\n' + obj_semanticCalculatedDimensionsUrl_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
4089
|
+
message += '\n' + obj_semanticCalculatedDimensionsUrl_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
4090
|
+
return new TypeError(message);
|
|
4091
|
+
}
|
|
4092
|
+
}
|
|
4093
|
+
if (obj.semanticCalculatedMeasurementsUrl !== undefined) {
|
|
4094
|
+
const obj_semanticCalculatedMeasurementsUrl = obj.semanticCalculatedMeasurementsUrl;
|
|
4095
|
+
const path_semanticCalculatedMeasurementsUrl = path + '.semanticCalculatedMeasurementsUrl';
|
|
4096
|
+
let obj_semanticCalculatedMeasurementsUrl_union0 = null;
|
|
4097
|
+
const obj_semanticCalculatedMeasurementsUrl_union0_error = (() => {
|
|
4098
|
+
if (typeof obj_semanticCalculatedMeasurementsUrl !== 'string') {
|
|
4099
|
+
return new TypeError('Expected "string" but received "' + typeof obj_semanticCalculatedMeasurementsUrl + '" (at "' + path_semanticCalculatedMeasurementsUrl + '")');
|
|
4100
|
+
}
|
|
4101
|
+
})();
|
|
4102
|
+
if (obj_semanticCalculatedMeasurementsUrl_union0_error != null) {
|
|
4103
|
+
obj_semanticCalculatedMeasurementsUrl_union0 = obj_semanticCalculatedMeasurementsUrl_union0_error.message;
|
|
4104
|
+
}
|
|
4105
|
+
let obj_semanticCalculatedMeasurementsUrl_union1 = null;
|
|
4106
|
+
const obj_semanticCalculatedMeasurementsUrl_union1_error = (() => {
|
|
4107
|
+
if (obj_semanticCalculatedMeasurementsUrl !== null) {
|
|
4108
|
+
return new TypeError('Expected "null" but received "' + typeof obj_semanticCalculatedMeasurementsUrl + '" (at "' + path_semanticCalculatedMeasurementsUrl + '")');
|
|
4109
|
+
}
|
|
4110
|
+
})();
|
|
4111
|
+
if (obj_semanticCalculatedMeasurementsUrl_union1_error != null) {
|
|
4112
|
+
obj_semanticCalculatedMeasurementsUrl_union1 = obj_semanticCalculatedMeasurementsUrl_union1_error.message;
|
|
4113
|
+
}
|
|
4114
|
+
if (obj_semanticCalculatedMeasurementsUrl_union0 && obj_semanticCalculatedMeasurementsUrl_union1) {
|
|
4115
|
+
let message = 'Object doesn\'t match union (at "' + path_semanticCalculatedMeasurementsUrl + '")';
|
|
4116
|
+
message += '\n' + obj_semanticCalculatedMeasurementsUrl_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
4117
|
+
message += '\n' + obj_semanticCalculatedMeasurementsUrl_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
4118
|
+
return new TypeError(message);
|
|
4119
|
+
}
|
|
4120
|
+
}
|
|
4121
|
+
if (obj.semanticDataObjectsUrl !== undefined) {
|
|
4122
|
+
const obj_semanticDataObjectsUrl = obj.semanticDataObjectsUrl;
|
|
4123
|
+
const path_semanticDataObjectsUrl = path + '.semanticDataObjectsUrl';
|
|
4124
|
+
let obj_semanticDataObjectsUrl_union0 = null;
|
|
4125
|
+
const obj_semanticDataObjectsUrl_union0_error = (() => {
|
|
4126
|
+
if (typeof obj_semanticDataObjectsUrl !== 'string') {
|
|
4127
|
+
return new TypeError('Expected "string" but received "' + typeof obj_semanticDataObjectsUrl + '" (at "' + path_semanticDataObjectsUrl + '")');
|
|
4128
|
+
}
|
|
4129
|
+
})();
|
|
4130
|
+
if (obj_semanticDataObjectsUrl_union0_error != null) {
|
|
4131
|
+
obj_semanticDataObjectsUrl_union0 = obj_semanticDataObjectsUrl_union0_error.message;
|
|
4132
|
+
}
|
|
4133
|
+
let obj_semanticDataObjectsUrl_union1 = null;
|
|
4134
|
+
const obj_semanticDataObjectsUrl_union1_error = (() => {
|
|
4135
|
+
if (obj_semanticDataObjectsUrl !== null) {
|
|
4136
|
+
return new TypeError('Expected "null" but received "' + typeof obj_semanticDataObjectsUrl + '" (at "' + path_semanticDataObjectsUrl + '")');
|
|
4137
|
+
}
|
|
4138
|
+
})();
|
|
4139
|
+
if (obj_semanticDataObjectsUrl_union1_error != null) {
|
|
4140
|
+
obj_semanticDataObjectsUrl_union1 = obj_semanticDataObjectsUrl_union1_error.message;
|
|
4141
|
+
}
|
|
4142
|
+
if (obj_semanticDataObjectsUrl_union0 && obj_semanticDataObjectsUrl_union1) {
|
|
4143
|
+
let message = 'Object doesn\'t match union (at "' + path_semanticDataObjectsUrl + '")';
|
|
4144
|
+
message += '\n' + obj_semanticDataObjectsUrl_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
4145
|
+
message += '\n' + obj_semanticDataObjectsUrl_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
4146
|
+
return new TypeError(message);
|
|
4147
|
+
}
|
|
4148
|
+
}
|
|
4149
|
+
if (obj.semanticParametersUrl !== undefined) {
|
|
4150
|
+
const obj_semanticParametersUrl = obj.semanticParametersUrl;
|
|
4151
|
+
const path_semanticParametersUrl = path + '.semanticParametersUrl';
|
|
4152
|
+
let obj_semanticParametersUrl_union0 = null;
|
|
4153
|
+
const obj_semanticParametersUrl_union0_error = (() => {
|
|
4154
|
+
if (typeof obj_semanticParametersUrl !== 'string') {
|
|
4155
|
+
return new TypeError('Expected "string" but received "' + typeof obj_semanticParametersUrl + '" (at "' + path_semanticParametersUrl + '")');
|
|
4156
|
+
}
|
|
4157
|
+
})();
|
|
4158
|
+
if (obj_semanticParametersUrl_union0_error != null) {
|
|
4159
|
+
obj_semanticParametersUrl_union0 = obj_semanticParametersUrl_union0_error.message;
|
|
4160
|
+
}
|
|
4161
|
+
let obj_semanticParametersUrl_union1 = null;
|
|
4162
|
+
const obj_semanticParametersUrl_union1_error = (() => {
|
|
4163
|
+
if (obj_semanticParametersUrl !== null) {
|
|
4164
|
+
return new TypeError('Expected "null" but received "' + typeof obj_semanticParametersUrl + '" (at "' + path_semanticParametersUrl + '")');
|
|
4165
|
+
}
|
|
4166
|
+
})();
|
|
4167
|
+
if (obj_semanticParametersUrl_union1_error != null) {
|
|
4168
|
+
obj_semanticParametersUrl_union1 = obj_semanticParametersUrl_union1_error.message;
|
|
4169
|
+
}
|
|
4170
|
+
if (obj_semanticParametersUrl_union0 && obj_semanticParametersUrl_union1) {
|
|
4171
|
+
let message = 'Object doesn\'t match union (at "' + path_semanticParametersUrl + '")';
|
|
4172
|
+
message += '\n' + obj_semanticParametersUrl_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
4173
|
+
message += '\n' + obj_semanticParametersUrl_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
4174
|
+
return new TypeError(message);
|
|
4175
|
+
}
|
|
4176
|
+
}
|
|
4177
|
+
if (obj.semanticRelationshipsUrl !== undefined) {
|
|
4178
|
+
const obj_semanticRelationshipsUrl = obj.semanticRelationshipsUrl;
|
|
4179
|
+
const path_semanticRelationshipsUrl = path + '.semanticRelationshipsUrl';
|
|
4180
|
+
let obj_semanticRelationshipsUrl_union0 = null;
|
|
4181
|
+
const obj_semanticRelationshipsUrl_union0_error = (() => {
|
|
4182
|
+
if (typeof obj_semanticRelationshipsUrl !== 'string') {
|
|
4183
|
+
return new TypeError('Expected "string" but received "' + typeof obj_semanticRelationshipsUrl + '" (at "' + path_semanticRelationshipsUrl + '")');
|
|
4184
|
+
}
|
|
4185
|
+
})();
|
|
4186
|
+
if (obj_semanticRelationshipsUrl_union0_error != null) {
|
|
4187
|
+
obj_semanticRelationshipsUrl_union0 = obj_semanticRelationshipsUrl_union0_error.message;
|
|
4188
|
+
}
|
|
4189
|
+
let obj_semanticRelationshipsUrl_union1 = null;
|
|
4190
|
+
const obj_semanticRelationshipsUrl_union1_error = (() => {
|
|
4191
|
+
if (obj_semanticRelationshipsUrl !== null) {
|
|
4192
|
+
return new TypeError('Expected "null" but received "' + typeof obj_semanticRelationshipsUrl + '" (at "' + path_semanticRelationshipsUrl + '")');
|
|
4193
|
+
}
|
|
4194
|
+
})();
|
|
4195
|
+
if (obj_semanticRelationshipsUrl_union1_error != null) {
|
|
4196
|
+
obj_semanticRelationshipsUrl_union1 = obj_semanticRelationshipsUrl_union1_error.message;
|
|
4197
|
+
}
|
|
4198
|
+
if (obj_semanticRelationshipsUrl_union0 && obj_semanticRelationshipsUrl_union1) {
|
|
4199
|
+
let message = 'Object doesn\'t match union (at "' + path_semanticRelationshipsUrl + '")';
|
|
4200
|
+
message += '\n' + obj_semanticRelationshipsUrl_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
4201
|
+
message += '\n' + obj_semanticRelationshipsUrl_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
4202
|
+
return new TypeError(message);
|
|
4203
|
+
}
|
|
4204
|
+
}
|
|
4205
|
+
})();
|
|
4206
|
+
return v_error === undefined ? null : v_error;
|
|
4207
|
+
}
|
|
4208
|
+
|
|
4209
|
+
const VERSION = "73c687cae9892dfdc5145743352ced92";
|
|
4210
|
+
function validate(obj, path = 'SemanticModelCollectionOutputRepresentation') {
|
|
4211
|
+
const v_error = (() => {
|
|
4212
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
4213
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
4214
|
+
}
|
|
4215
|
+
const obj_count = obj.count;
|
|
4216
|
+
const path_count = path + '.count';
|
|
4217
|
+
let obj_count_union0 = null;
|
|
4218
|
+
const obj_count_union0_error = (() => {
|
|
4219
|
+
if (typeof obj_count !== 'number' || (typeof obj_count === 'number' && Math.floor(obj_count) !== obj_count)) {
|
|
4220
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_count + '" (at "' + path_count + '")');
|
|
4221
|
+
}
|
|
4222
|
+
})();
|
|
4223
|
+
if (obj_count_union0_error != null) {
|
|
4224
|
+
obj_count_union0 = obj_count_union0_error.message;
|
|
4225
|
+
}
|
|
4226
|
+
let obj_count_union1 = null;
|
|
4227
|
+
const obj_count_union1_error = (() => {
|
|
4228
|
+
if (obj_count !== null) {
|
|
4229
|
+
return new TypeError('Expected "null" but received "' + typeof obj_count + '" (at "' + path_count + '")');
|
|
4230
|
+
}
|
|
4231
|
+
})();
|
|
4232
|
+
if (obj_count_union1_error != null) {
|
|
4233
|
+
obj_count_union1 = obj_count_union1_error.message;
|
|
4234
|
+
}
|
|
4235
|
+
if (obj_count_union0 && obj_count_union1) {
|
|
4236
|
+
let message = 'Object doesn\'t match union (at "' + path_count + '")';
|
|
4237
|
+
message += '\n' + obj_count_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
4238
|
+
message += '\n' + obj_count_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
4239
|
+
return new TypeError(message);
|
|
4240
|
+
}
|
|
4241
|
+
if (obj.currentPageUrl !== undefined) {
|
|
4242
|
+
const obj_currentPageUrl = obj.currentPageUrl;
|
|
4243
|
+
const path_currentPageUrl = path + '.currentPageUrl';
|
|
4244
|
+
let obj_currentPageUrl_union0 = null;
|
|
4245
|
+
const obj_currentPageUrl_union0_error = (() => {
|
|
4246
|
+
if (typeof obj_currentPageUrl !== 'string') {
|
|
4247
|
+
return new TypeError('Expected "string" but received "' + typeof obj_currentPageUrl + '" (at "' + path_currentPageUrl + '")');
|
|
4248
|
+
}
|
|
4249
|
+
})();
|
|
4250
|
+
if (obj_currentPageUrl_union0_error != null) {
|
|
4251
|
+
obj_currentPageUrl_union0 = obj_currentPageUrl_union0_error.message;
|
|
4252
|
+
}
|
|
4253
|
+
let obj_currentPageUrl_union1 = null;
|
|
4254
|
+
const obj_currentPageUrl_union1_error = (() => {
|
|
4255
|
+
if (obj_currentPageUrl !== null) {
|
|
4256
|
+
return new TypeError('Expected "null" but received "' + typeof obj_currentPageUrl + '" (at "' + path_currentPageUrl + '")');
|
|
4257
|
+
}
|
|
4258
|
+
})();
|
|
4259
|
+
if (obj_currentPageUrl_union1_error != null) {
|
|
4260
|
+
obj_currentPageUrl_union1 = obj_currentPageUrl_union1_error.message;
|
|
4261
|
+
}
|
|
4262
|
+
if (obj_currentPageUrl_union0 && obj_currentPageUrl_union1) {
|
|
4263
|
+
let message = 'Object doesn\'t match union (at "' + path_currentPageUrl + '")';
|
|
4264
|
+
message += '\n' + obj_currentPageUrl_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
4265
|
+
message += '\n' + obj_currentPageUrl_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
4266
|
+
return new TypeError(message);
|
|
4267
|
+
}
|
|
4268
|
+
}
|
|
4269
|
+
if (obj.items !== undefined) {
|
|
4270
|
+
const obj_items = obj.items;
|
|
4271
|
+
const path_items = path + '.items';
|
|
4272
|
+
if (!ArrayIsArray(obj_items)) {
|
|
4273
|
+
return new TypeError('Expected "array" but received "' + typeof obj_items + '" (at "' + path_items + '")');
|
|
4274
|
+
}
|
|
4275
|
+
for (let i = 0; i < obj_items.length; i++) {
|
|
4276
|
+
const obj_items_item = obj_items[i];
|
|
4277
|
+
const path_items_item = path_items + '[' + i + ']';
|
|
4278
|
+
const referencepath_items_itemValidationError = validate$1(obj_items_item, path_items_item);
|
|
4279
|
+
if (referencepath_items_itemValidationError !== null) {
|
|
4280
|
+
let message = 'Object doesn\'t match SemanticModelPartialOutputRepresentation (at "' + path_items_item + '")\n';
|
|
4281
|
+
message += referencepath_items_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
4282
|
+
return new TypeError(message);
|
|
4283
|
+
}
|
|
4284
|
+
}
|
|
4285
|
+
}
|
|
4286
|
+
if (obj.nextPageUrl !== undefined) {
|
|
4287
|
+
const obj_nextPageUrl = obj.nextPageUrl;
|
|
4288
|
+
const path_nextPageUrl = path + '.nextPageUrl';
|
|
4289
|
+
let obj_nextPageUrl_union0 = null;
|
|
4290
|
+
const obj_nextPageUrl_union0_error = (() => {
|
|
4291
|
+
if (typeof obj_nextPageUrl !== 'string') {
|
|
4292
|
+
return new TypeError('Expected "string" but received "' + typeof obj_nextPageUrl + '" (at "' + path_nextPageUrl + '")');
|
|
4293
|
+
}
|
|
4294
|
+
})();
|
|
4295
|
+
if (obj_nextPageUrl_union0_error != null) {
|
|
4296
|
+
obj_nextPageUrl_union0 = obj_nextPageUrl_union0_error.message;
|
|
4297
|
+
}
|
|
4298
|
+
let obj_nextPageUrl_union1 = null;
|
|
4299
|
+
const obj_nextPageUrl_union1_error = (() => {
|
|
4300
|
+
if (obj_nextPageUrl !== null) {
|
|
4301
|
+
return new TypeError('Expected "null" but received "' + typeof obj_nextPageUrl + '" (at "' + path_nextPageUrl + '")');
|
|
4302
|
+
}
|
|
4303
|
+
})();
|
|
4304
|
+
if (obj_nextPageUrl_union1_error != null) {
|
|
4305
|
+
obj_nextPageUrl_union1 = obj_nextPageUrl_union1_error.message;
|
|
4306
|
+
}
|
|
4307
|
+
if (obj_nextPageUrl_union0 && obj_nextPageUrl_union1) {
|
|
4308
|
+
let message = 'Object doesn\'t match union (at "' + path_nextPageUrl + '")';
|
|
4309
|
+
message += '\n' + obj_nextPageUrl_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
4310
|
+
message += '\n' + obj_nextPageUrl_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
4311
|
+
return new TypeError(message);
|
|
4312
|
+
}
|
|
4313
|
+
}
|
|
4314
|
+
if (obj.previousPageUrl !== undefined) {
|
|
4315
|
+
const obj_previousPageUrl = obj.previousPageUrl;
|
|
4316
|
+
const path_previousPageUrl = path + '.previousPageUrl';
|
|
4317
|
+
let obj_previousPageUrl_union0 = null;
|
|
4318
|
+
const obj_previousPageUrl_union0_error = (() => {
|
|
4319
|
+
if (typeof obj_previousPageUrl !== 'string') {
|
|
4320
|
+
return new TypeError('Expected "string" but received "' + typeof obj_previousPageUrl + '" (at "' + path_previousPageUrl + '")');
|
|
4321
|
+
}
|
|
4322
|
+
})();
|
|
4323
|
+
if (obj_previousPageUrl_union0_error != null) {
|
|
4324
|
+
obj_previousPageUrl_union0 = obj_previousPageUrl_union0_error.message;
|
|
4325
|
+
}
|
|
4326
|
+
let obj_previousPageUrl_union1 = null;
|
|
4327
|
+
const obj_previousPageUrl_union1_error = (() => {
|
|
4328
|
+
if (obj_previousPageUrl !== null) {
|
|
4329
|
+
return new TypeError('Expected "null" but received "' + typeof obj_previousPageUrl + '" (at "' + path_previousPageUrl + '")');
|
|
4330
|
+
}
|
|
4331
|
+
})();
|
|
4332
|
+
if (obj_previousPageUrl_union1_error != null) {
|
|
4333
|
+
obj_previousPageUrl_union1 = obj_previousPageUrl_union1_error.message;
|
|
4334
|
+
}
|
|
4335
|
+
if (obj_previousPageUrl_union0 && obj_previousPageUrl_union1) {
|
|
4336
|
+
let message = 'Object doesn\'t match union (at "' + path_previousPageUrl + '")';
|
|
4337
|
+
message += '\n' + obj_previousPageUrl_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
4338
|
+
message += '\n' + obj_previousPageUrl_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
4339
|
+
return new TypeError(message);
|
|
4340
|
+
}
|
|
4341
|
+
}
|
|
4342
|
+
const obj_total = obj.total;
|
|
4343
|
+
const path_total = path + '.total';
|
|
4344
|
+
let obj_total_union0 = null;
|
|
4345
|
+
const obj_total_union0_error = (() => {
|
|
4346
|
+
if (typeof obj_total !== 'number' || (typeof obj_total === 'number' && Math.floor(obj_total) !== obj_total)) {
|
|
4347
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_total + '" (at "' + path_total + '")');
|
|
4348
|
+
}
|
|
4349
|
+
})();
|
|
4350
|
+
if (obj_total_union0_error != null) {
|
|
4351
|
+
obj_total_union0 = obj_total_union0_error.message;
|
|
4352
|
+
}
|
|
4353
|
+
let obj_total_union1 = null;
|
|
4354
|
+
const obj_total_union1_error = (() => {
|
|
4355
|
+
if (obj_total !== null) {
|
|
4356
|
+
return new TypeError('Expected "null" but received "' + typeof obj_total + '" (at "' + path_total + '")');
|
|
4357
|
+
}
|
|
4358
|
+
})();
|
|
4359
|
+
if (obj_total_union1_error != null) {
|
|
4360
|
+
obj_total_union1 = obj_total_union1_error.message;
|
|
4361
|
+
}
|
|
4362
|
+
if (obj_total_union0 && obj_total_union1) {
|
|
4363
|
+
let message = 'Object doesn\'t match union (at "' + path_total + '")';
|
|
4364
|
+
message += '\n' + obj_total_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
4365
|
+
message += '\n' + obj_total_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
4366
|
+
return new TypeError(message);
|
|
4367
|
+
}
|
|
4368
|
+
})();
|
|
4369
|
+
return v_error === undefined ? null : v_error;
|
|
4370
|
+
}
|
|
4371
|
+
const RepresentationType = 'SemanticModelCollectionOutputRepresentation';
|
|
4372
|
+
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
4373
|
+
return input;
|
|
4374
|
+
}
|
|
4375
|
+
const select$1 = function SemanticModelCollectionOutputRepresentationSelect() {
|
|
4376
|
+
return {
|
|
4377
|
+
kind: 'Fragment',
|
|
4378
|
+
version: VERSION,
|
|
4379
|
+
private: [],
|
|
4380
|
+
opaque: true
|
|
4381
|
+
};
|
|
4382
|
+
};
|
|
4383
|
+
function equals(existing, incoming) {
|
|
4384
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
4385
|
+
return false;
|
|
4386
|
+
}
|
|
4387
|
+
return true;
|
|
4388
|
+
}
|
|
4389
|
+
const ingest = function SemanticModelCollectionOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
4390
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4391
|
+
const validateError = validate(input);
|
|
4392
|
+
if (validateError !== null) {
|
|
4393
|
+
throw validateError;
|
|
4394
|
+
}
|
|
4395
|
+
}
|
|
4396
|
+
const key = path.fullPath;
|
|
4397
|
+
const ttlToUse = path.ttl !== undefined ? path.ttl : 30000;
|
|
4398
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "SemanticAuthoring", VERSION, RepresentationType, equals);
|
|
4399
|
+
return createLink(key);
|
|
4400
|
+
};
|
|
4401
|
+
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
4402
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
4403
|
+
const rootKey = fullPathFactory();
|
|
4404
|
+
rootKeySet.set(rootKey, {
|
|
4405
|
+
namespace: keyPrefix,
|
|
4406
|
+
representationName: RepresentationType,
|
|
4407
|
+
mergeable: false
|
|
4408
|
+
});
|
|
4409
|
+
}
|
|
4410
|
+
|
|
4411
|
+
function select(luvio, params) {
|
|
4412
|
+
return select$1();
|
|
4413
|
+
}
|
|
4414
|
+
function keyBuilder$1(luvio, params) {
|
|
4415
|
+
return keyPrefix + '::SemanticModelCollectionOutputRepresentation:(' + 'app:' + params.queryParams.app + ',' + 'category:' + params.queryParams.category + ',' + 'dataspace:' + params.queryParams.dataspace + ',' + 'label:' + params.queryParams.label + ',' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ',' + 'orderBy:' + params.queryParams.orderBy + ')';
|
|
4416
|
+
}
|
|
4417
|
+
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
4418
|
+
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
|
|
4419
|
+
}
|
|
4420
|
+
function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
4421
|
+
const { body } = response;
|
|
4422
|
+
const key = keyBuilder$1(luvio, resourceParams);
|
|
4423
|
+
luvio.storeIngest(key, ingest, body);
|
|
4424
|
+
const snapshot = luvio.storeLookup({
|
|
4425
|
+
recordId: key,
|
|
4426
|
+
node: select(),
|
|
4427
|
+
variables: {},
|
|
4428
|
+
}, snapshotRefresh);
|
|
4429
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4430
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
4431
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
4432
|
+
}
|
|
4433
|
+
}
|
|
4434
|
+
deepFreeze(snapshot.data);
|
|
4435
|
+
return snapshot;
|
|
4436
|
+
}
|
|
4437
|
+
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
4438
|
+
const key = keyBuilder$1(luvio, params);
|
|
4439
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
4440
|
+
luvio.storeIngestError(key, errorSnapshot);
|
|
4441
|
+
return errorSnapshot;
|
|
4442
|
+
}
|
|
4443
|
+
function createResourceRequest(config) {
|
|
4444
|
+
const headers = {};
|
|
4445
|
+
return {
|
|
4446
|
+
baseUri: '/services/data/v62.0',
|
|
4447
|
+
basePath: '/ssot/semantic/models',
|
|
4448
|
+
method: 'get',
|
|
4449
|
+
body: null,
|
|
4450
|
+
urlParams: {},
|
|
4451
|
+
queryParams: config.queryParams,
|
|
4452
|
+
headers,
|
|
4453
|
+
priority: 'normal',
|
|
4454
|
+
};
|
|
4455
|
+
}
|
|
4456
|
+
|
|
4457
|
+
const adapterName = 'getSemanticModels';
|
|
4458
|
+
const getSemanticModels_ConfigPropertyMetadata = [
|
|
4459
|
+
generateParamConfigMetadata('app', false, 1 /* QueryParameter */, 0 /* String */),
|
|
4460
|
+
generateParamConfigMetadata('category', false, 1 /* QueryParameter */, 0 /* String */),
|
|
4461
|
+
generateParamConfigMetadata('dataspace', false, 1 /* QueryParameter */, 0 /* String */),
|
|
4462
|
+
generateParamConfigMetadata('label', false, 1 /* QueryParameter */, 0 /* String */),
|
|
4463
|
+
generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
4464
|
+
generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
4465
|
+
generateParamConfigMetadata('orderBy', false, 1 /* QueryParameter */, 0 /* String */),
|
|
4466
|
+
];
|
|
4467
|
+
const getSemanticModels_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getSemanticModels_ConfigPropertyMetadata);
|
|
4468
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$2(getSemanticModels_ConfigPropertyMetadata);
|
|
4469
|
+
function keyBuilder(luvio, config) {
|
|
4470
|
+
const resourceParams = createResourceParams(config);
|
|
4471
|
+
return keyBuilder$1(luvio, resourceParams);
|
|
4472
|
+
}
|
|
4473
|
+
function typeCheckConfig(untrustedConfig) {
|
|
4474
|
+
const config = {};
|
|
4475
|
+
typeCheckConfig$2(untrustedConfig, config, getSemanticModels_ConfigPropertyMetadata);
|
|
4476
|
+
return config;
|
|
4477
|
+
}
|
|
4478
|
+
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
4479
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
4480
|
+
return null;
|
|
4481
|
+
}
|
|
4482
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4483
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
4484
|
+
}
|
|
4485
|
+
const config = typeCheckConfig(untrustedConfig);
|
|
4486
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
4487
|
+
return null;
|
|
4488
|
+
}
|
|
4489
|
+
return config;
|
|
4490
|
+
}
|
|
4491
|
+
function adapterFragment(luvio, config) {
|
|
4492
|
+
createResourceParams(config);
|
|
4493
|
+
return select();
|
|
4494
|
+
}
|
|
4495
|
+
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
4496
|
+
const snapshot = ingestSuccess(luvio, resourceParams, response, {
|
|
4497
|
+
config,
|
|
4498
|
+
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
4499
|
+
});
|
|
4500
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
4501
|
+
}
|
|
4502
|
+
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
4503
|
+
const snapshot = ingestError(luvio, resourceParams, response, {
|
|
4504
|
+
config,
|
|
4505
|
+
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
4506
|
+
});
|
|
4507
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
4508
|
+
}
|
|
4509
|
+
function buildNetworkSnapshot(luvio, config, options) {
|
|
4510
|
+
const resourceParams = createResourceParams(config);
|
|
4511
|
+
const request = createResourceRequest(resourceParams);
|
|
4512
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
4513
|
+
.then((response) => {
|
|
4514
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
4515
|
+
const cache = new StoreKeyMap();
|
|
4516
|
+
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
4517
|
+
return cache;
|
|
4518
|
+
});
|
|
4519
|
+
}, (response) => {
|
|
4520
|
+
return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
|
|
4521
|
+
});
|
|
4522
|
+
}
|
|
4523
|
+
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
4524
|
+
return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
|
|
4525
|
+
}
|
|
4526
|
+
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
4527
|
+
const { luvio, config } = context;
|
|
4528
|
+
const selector = {
|
|
4529
|
+
recordId: keyBuilder(luvio, config),
|
|
4530
|
+
node: adapterFragment(luvio, config),
|
|
4531
|
+
variables: {},
|
|
4532
|
+
};
|
|
4533
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
4534
|
+
config,
|
|
4535
|
+
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
4536
|
+
});
|
|
4537
|
+
return cacheSnapshot;
|
|
4538
|
+
}
|
|
4539
|
+
const getSemanticModelsAdapterFactory = (luvio) => function SemanticAuthoring__getSemanticModels(untrustedConfig, requestContext) {
|
|
4540
|
+
const config = validateAdapterConfig(untrustedConfig, getSemanticModels_ConfigPropertyNames);
|
|
4541
|
+
// Invalid or incomplete config
|
|
4542
|
+
if (config === null) {
|
|
4543
|
+
return null;
|
|
4544
|
+
}
|
|
4545
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
4546
|
+
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
4547
|
+
};
|
|
4548
|
+
|
|
4549
|
+
let getSemanticModel;
|
|
4550
|
+
let getSemanticModelNotifyChange;
|
|
4551
|
+
let getSemanticModels;
|
|
4552
|
+
// Imperative GET Adapters
|
|
4553
|
+
let getSemanticModel_imperative;
|
|
4554
|
+
let getSemanticModels_imperative;
|
|
4555
|
+
// Adapter Metadata
|
|
4556
|
+
const getSemanticModelMetadata = { apiFamily: 'SemanticAuthoring', name: 'getSemanticModel' };
|
|
4557
|
+
const getSemanticModelsMetadata = { apiFamily: 'SemanticAuthoring', name: 'getSemanticModels' };
|
|
4558
|
+
// Notify Update Available
|
|
4559
|
+
function bindExportsTo(luvio) {
|
|
4560
|
+
// LDS Adapters
|
|
4561
|
+
const getSemanticModel_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getSemanticModel', getSemanticModelAdapterFactory), getSemanticModelMetadata);
|
|
4562
|
+
const getSemanticModels_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getSemanticModels', getSemanticModelsAdapterFactory), getSemanticModelsMetadata);
|
|
4563
|
+
return {
|
|
4564
|
+
getSemanticModel: createWireAdapterConstructor(luvio, getSemanticModel_ldsAdapter, getSemanticModelMetadata),
|
|
4565
|
+
getSemanticModelNotifyChange: createLDSAdapter(luvio, 'getSemanticModelNotifyChange', notifyChangeFactory),
|
|
4566
|
+
getSemanticModels: createWireAdapterConstructor(luvio, getSemanticModels_ldsAdapter, getSemanticModelsMetadata),
|
|
4567
|
+
// Imperative GET Adapters
|
|
4568
|
+
getSemanticModel_imperative: createImperativeAdapter(luvio, getSemanticModel_ldsAdapter, getSemanticModelMetadata),
|
|
4569
|
+
getSemanticModels_imperative: createImperativeAdapter(luvio, getSemanticModels_ldsAdapter, getSemanticModelsMetadata),
|
|
4570
|
+
// Notify Update Availables
|
|
4571
|
+
};
|
|
4572
|
+
}
|
|
4573
|
+
withDefaultLuvio((luvio) => {
|
|
4574
|
+
({
|
|
4575
|
+
getSemanticModel,
|
|
4576
|
+
getSemanticModelNotifyChange,
|
|
4577
|
+
getSemanticModels,
|
|
4578
|
+
getSemanticModel_imperative,
|
|
4579
|
+
getSemanticModels_imperative,
|
|
4580
|
+
} = bindExportsTo(luvio));
|
|
4581
|
+
});
|
|
4582
|
+
|
|
4583
|
+
export { getSemanticModel, getSemanticModelNotifyChange, getSemanticModel_imperative, getSemanticModels, getSemanticModels_imperative };
|
|
4584
|
+
// version: 1.294.0-e7eb16228
|