@salesforce/lds-adapters-industries-context 1.162.0 → 1.163.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/es2018/industries-context.js +1199 -59
- package/dist/es/es2018/types/src/generated/adapters/getContext.d.ts +27 -0
- package/dist/es/es2018/types/src/generated/adapters/queryContextRecordAndChildren.d.ts +16 -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 +5 -1
- package/dist/es/es2018/types/src/generated/resources/getConnectContextByContextId.d.ts +1 -0
- package/dist/es/es2018/types/src/generated/resources/postConnectContextQueryrecord.d.ts +16 -0
- package/dist/es/es2018/types/src/generated/types/ContextAttrHydrationDetailRepresentation.d.ts +4 -1
- package/dist/es/es2018/types/src/generated/types/ContextAttributeInputRepresentation.d.ts +4 -1
- package/dist/es/es2018/types/src/generated/types/ContextAttributeMappingInputRepresentation.d.ts +4 -4
- package/dist/es/es2018/types/src/generated/types/ContextAttributeMappingRepresentation.d.ts +4 -4
- package/dist/es/es2018/types/src/generated/types/ContextAttributeRepresentation.d.ts +4 -1
- package/dist/es/es2018/types/src/generated/types/ContextDataRecordRepresentation.d.ts +10 -7
- package/dist/es/es2018/types/src/generated/types/ContextInfoRepresentation.d.ts +8 -5
- package/dist/es/es2018/types/src/generated/types/ContextQueryRecordRepresentation.d.ts +3 -3
- package/dist/es/es2018/types/src/generated/types/MappedAttributeDataTypeInfoRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/QueryContextRecordInputRepresentation.d.ts +37 -0
- package/dist/es/es2018/types/src/generated/types/QueryContextRecordInputWrapperRepresentation.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/types/QueryContextRecordListInputRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/QueryContextRecordListResultRepresentation.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/types/QueryContextRecordResultDataRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/QueryContextRecordResultRepresentation.d.ts +48 -0
- package/package.json +1 -1
- package/sfdc/index.js +2613 -1422
- package/src/raml/api.raml +158 -8
- package/src/raml/luvio.raml +20 -2
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import { serializeStructuredKey, StoreKeyMap, deepFreeze } from '@luvio/engine';
|
|
8
8
|
|
|
9
9
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
|
-
const { keys: ObjectKeys, create: ObjectCreate } = Object;
|
|
10
|
+
const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
|
|
11
11
|
const { isArray: ArrayIsArray$1 } = Array;
|
|
12
12
|
/**
|
|
13
13
|
* Validates an adapter config is well-formed.
|
|
@@ -31,7 +31,7 @@ function validateConfig(config, adapter, oneOf) {
|
|
|
31
31
|
throw new TypeError(`adapter ${displayName} does not yet support ${unsupported.sort().join(', ')}`);
|
|
32
32
|
}
|
|
33
33
|
const supported = required.concat(optional);
|
|
34
|
-
if (ObjectKeys(config).some(key => !supported.includes(key))) {
|
|
34
|
+
if (ObjectKeys$1(config).some(key => !supported.includes(key))) {
|
|
35
35
|
throw new TypeError(`adapter ${displayName} configuration supports only ${supported.sort().join(', ')}`);
|
|
36
36
|
}
|
|
37
37
|
}
|
|
@@ -50,6 +50,7 @@ const snapshotRefreshOptions = {
|
|
|
50
50
|
};
|
|
51
51
|
const keyPrefix = 'IndustriesContext';
|
|
52
52
|
|
|
53
|
+
const { keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
|
|
53
54
|
const { isArray: ArrayIsArray } = Array;
|
|
54
55
|
const { stringify: JSONStringify } = JSON;
|
|
55
56
|
function equalsArray(a, b, equalsItem) {
|
|
@@ -65,15 +66,1080 @@ function equalsArray(a, b, equalsItem) {
|
|
|
65
66
|
}
|
|
66
67
|
return true;
|
|
67
68
|
}
|
|
69
|
+
function equalsObject(a, b, equalsProp) {
|
|
70
|
+
const aKeys = ObjectKeys(a).sort();
|
|
71
|
+
const bKeys = ObjectKeys(b).sort();
|
|
72
|
+
const aKeysLength = aKeys.length;
|
|
73
|
+
const bKeysLength = bKeys.length;
|
|
74
|
+
if (aKeysLength !== bKeysLength) {
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
for (let i = 0; i < aKeys.length; i++) {
|
|
78
|
+
const key = aKeys[i];
|
|
79
|
+
if (key !== bKeys[i]) {
|
|
80
|
+
return false;
|
|
81
|
+
}
|
|
82
|
+
if (equalsProp(a[key], b[key]) === false) {
|
|
83
|
+
return false;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return true;
|
|
87
|
+
}
|
|
68
88
|
function createLink(ref) {
|
|
69
89
|
return {
|
|
70
|
-
__ref: serializeStructuredKey(ref),
|
|
90
|
+
__ref: serializeStructuredKey(ref),
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function validate$t(obj, path = 'QueryContextRecordInputRepresentation') {
|
|
95
|
+
const v_error = (() => {
|
|
96
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
97
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
98
|
+
}
|
|
99
|
+
if (obj.attributes !== undefined) {
|
|
100
|
+
const obj_attributes = obj.attributes;
|
|
101
|
+
const path_attributes = path + '.attributes';
|
|
102
|
+
if (!ArrayIsArray(obj_attributes)) {
|
|
103
|
+
return new TypeError('Expected "array" but received "' + typeof obj_attributes + '" (at "' + path_attributes + '")');
|
|
104
|
+
}
|
|
105
|
+
for (let i = 0; i < obj_attributes.length; i++) {
|
|
106
|
+
const obj_attributes_item = obj_attributes[i];
|
|
107
|
+
const path_attributes_item = path_attributes + '[' + i + ']';
|
|
108
|
+
if (typeof obj_attributes_item !== 'string') {
|
|
109
|
+
return new TypeError('Expected "string" but received "' + typeof obj_attributes_item + '" (at "' + path_attributes_item + '")');
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
if (obj.businessObjectTypeFilter !== undefined) {
|
|
114
|
+
const obj_businessObjectTypeFilter = obj.businessObjectTypeFilter;
|
|
115
|
+
const path_businessObjectTypeFilter = path + '.businessObjectTypeFilter';
|
|
116
|
+
if (typeof obj_businessObjectTypeFilter !== 'string') {
|
|
117
|
+
return new TypeError('Expected "string" but received "' + typeof obj_businessObjectTypeFilter + '" (at "' + path_businessObjectTypeFilter + '")');
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
const obj_contextId = obj.contextId;
|
|
121
|
+
const path_contextId = path + '.contextId';
|
|
122
|
+
if (typeof obj_contextId !== 'string') {
|
|
123
|
+
return new TypeError('Expected "string" but received "' + typeof obj_contextId + '" (at "' + path_contextId + '")');
|
|
124
|
+
}
|
|
125
|
+
if (obj.queryPath !== undefined) {
|
|
126
|
+
const obj_queryPath = obj.queryPath;
|
|
127
|
+
const path_queryPath = path + '.queryPath';
|
|
128
|
+
if (!ArrayIsArray(obj_queryPath)) {
|
|
129
|
+
return new TypeError('Expected "array" but received "' + typeof obj_queryPath + '" (at "' + path_queryPath + '")');
|
|
130
|
+
}
|
|
131
|
+
for (let i = 0; i < obj_queryPath.length; i++) {
|
|
132
|
+
const obj_queryPath_item = obj_queryPath[i];
|
|
133
|
+
const path_queryPath_item = path_queryPath + '[' + i + ']';
|
|
134
|
+
if (typeof obj_queryPath_item !== 'string') {
|
|
135
|
+
return new TypeError('Expected "string" but received "' + typeof obj_queryPath_item + '" (at "' + path_queryPath_item + '")');
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
})();
|
|
140
|
+
return v_error === undefined ? null : v_error;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
const VERSION$h = "6fc1ed5f9fdcaa261c69ec3614505566";
|
|
144
|
+
function validate$s(obj, path = 'ContextDataRecordRepresentation') {
|
|
145
|
+
const v_error = (() => {
|
|
146
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
147
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
148
|
+
}
|
|
149
|
+
if (obj.attributesAndValues !== undefined) {
|
|
150
|
+
const obj_attributesAndValues = obj.attributesAndValues;
|
|
151
|
+
const path_attributesAndValues = path + '.attributesAndValues';
|
|
152
|
+
if (typeof obj_attributesAndValues !== 'object' || ArrayIsArray(obj_attributesAndValues) || obj_attributesAndValues === null) {
|
|
153
|
+
return new TypeError('Expected "object" but received "' + typeof obj_attributesAndValues + '" (at "' + path_attributesAndValues + '")');
|
|
154
|
+
}
|
|
155
|
+
const obj_attributesAndValues_keys = ObjectKeys(obj_attributesAndValues);
|
|
156
|
+
for (let i = 0; i < obj_attributesAndValues_keys.length; i++) {
|
|
157
|
+
const key = obj_attributesAndValues_keys[i];
|
|
158
|
+
const obj_attributesAndValues_prop = obj_attributesAndValues[key];
|
|
159
|
+
const path_attributesAndValues_prop = path_attributesAndValues + '["' + key + '"]';
|
|
160
|
+
if (obj_attributesAndValues_prop === undefined) {
|
|
161
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_attributesAndValues_prop + '" (at "' + path_attributesAndValues_prop + '")');
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
if (obj.childBusinessObjectTypes !== undefined) {
|
|
166
|
+
const obj_childBusinessObjectTypes = obj.childBusinessObjectTypes;
|
|
167
|
+
const path_childBusinessObjectTypes = path + '.childBusinessObjectTypes';
|
|
168
|
+
if (!ArrayIsArray(obj_childBusinessObjectTypes)) {
|
|
169
|
+
return new TypeError('Expected "array" but received "' + typeof obj_childBusinessObjectTypes + '" (at "' + path_childBusinessObjectTypes + '")');
|
|
170
|
+
}
|
|
171
|
+
for (let i = 0; i < obj_childBusinessObjectTypes.length; i++) {
|
|
172
|
+
const obj_childBusinessObjectTypes_item = obj_childBusinessObjectTypes[i];
|
|
173
|
+
const path_childBusinessObjectTypes_item = path_childBusinessObjectTypes + '[' + i + ']';
|
|
174
|
+
if (typeof obj_childBusinessObjectTypes_item !== 'string') {
|
|
175
|
+
return new TypeError('Expected "string" but received "' + typeof obj_childBusinessObjectTypes_item + '" (at "' + path_childBusinessObjectTypes_item + '")');
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
if (obj.contextDataRecordId !== undefined) {
|
|
180
|
+
const obj_contextDataRecordId = obj.contextDataRecordId;
|
|
181
|
+
const path_contextDataRecordId = path + '.contextDataRecordId';
|
|
182
|
+
if (typeof obj_contextDataRecordId !== 'string') {
|
|
183
|
+
return new TypeError('Expected "string" but received "' + typeof obj_contextDataRecordId + '" (at "' + path_contextDataRecordId + '")');
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
if (obj.contextDefinitionId !== undefined) {
|
|
187
|
+
const obj_contextDefinitionId = obj.contextDefinitionId;
|
|
188
|
+
const path_contextDefinitionId = path + '.contextDefinitionId';
|
|
189
|
+
if (typeof obj_contextDefinitionId !== 'string') {
|
|
190
|
+
return new TypeError('Expected "string" but received "' + typeof obj_contextDefinitionId + '" (at "' + path_contextDefinitionId + '")');
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
if (obj.contextMappingId !== undefined) {
|
|
194
|
+
const obj_contextMappingId = obj.contextMappingId;
|
|
195
|
+
const path_contextMappingId = path + '.contextMappingId';
|
|
196
|
+
if (typeof obj_contextMappingId !== 'string') {
|
|
197
|
+
return new TypeError('Expected "string" but received "' + typeof obj_contextMappingId + '" (at "' + path_contextMappingId + '")');
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
if (obj.currentState !== undefined) {
|
|
201
|
+
const obj_currentState = obj.currentState;
|
|
202
|
+
const path_currentState = path + '.currentState';
|
|
203
|
+
if (typeof obj_currentState !== 'string') {
|
|
204
|
+
return new TypeError('Expected "string" but received "' + typeof obj_currentState + '" (at "' + path_currentState + '")');
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
if (obj.errorCode !== undefined) {
|
|
208
|
+
const obj_errorCode = obj.errorCode;
|
|
209
|
+
const path_errorCode = path + '.errorCode';
|
|
210
|
+
if (typeof obj_errorCode !== 'string') {
|
|
211
|
+
return new TypeError('Expected "string" but received "' + typeof obj_errorCode + '" (at "' + path_errorCode + '")');
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
if (obj.errorMessages !== undefined) {
|
|
215
|
+
const obj_errorMessages = obj.errorMessages;
|
|
216
|
+
const path_errorMessages = path + '.errorMessages';
|
|
217
|
+
if (!ArrayIsArray(obj_errorMessages)) {
|
|
218
|
+
return new TypeError('Expected "array" but received "' + typeof obj_errorMessages + '" (at "' + path_errorMessages + '")');
|
|
219
|
+
}
|
|
220
|
+
for (let i = 0; i < obj_errorMessages.length; i++) {
|
|
221
|
+
const obj_errorMessages_item = obj_errorMessages[i];
|
|
222
|
+
const path_errorMessages_item = path_errorMessages + '[' + i + ']';
|
|
223
|
+
if (typeof obj_errorMessages_item !== 'string') {
|
|
224
|
+
return new TypeError('Expected "string" but received "' + typeof obj_errorMessages_item + '" (at "' + path_errorMessages_item + '")');
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
if (obj.lastProcessedTimeStamp !== undefined) {
|
|
229
|
+
const obj_lastProcessedTimeStamp = obj.lastProcessedTimeStamp;
|
|
230
|
+
const path_lastProcessedTimeStamp = path + '.lastProcessedTimeStamp';
|
|
231
|
+
if (typeof obj_lastProcessedTimeStamp !== 'string') {
|
|
232
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastProcessedTimeStamp + '" (at "' + path_lastProcessedTimeStamp + '")');
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
if (obj.lastUpdatedTimeStamp !== undefined) {
|
|
236
|
+
const obj_lastUpdatedTimeStamp = obj.lastUpdatedTimeStamp;
|
|
237
|
+
const path_lastUpdatedTimeStamp = path + '.lastUpdatedTimeStamp';
|
|
238
|
+
if (typeof obj_lastUpdatedTimeStamp !== 'string') {
|
|
239
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastUpdatedTimeStamp + '" (at "' + path_lastUpdatedTimeStamp + '")');
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
if (obj.processingStatus !== undefined) {
|
|
243
|
+
const obj_processingStatus = obj.processingStatus;
|
|
244
|
+
const path_processingStatus = path + '.processingStatus';
|
|
245
|
+
if (typeof obj_processingStatus !== 'string') {
|
|
246
|
+
return new TypeError('Expected "string" but received "' + typeof obj_processingStatus + '" (at "' + path_processingStatus + '")');
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
})();
|
|
250
|
+
return v_error === undefined ? null : v_error;
|
|
251
|
+
}
|
|
252
|
+
const select$N = function ContextDataRecordRepresentationSelect() {
|
|
253
|
+
return {
|
|
254
|
+
kind: 'Fragment',
|
|
255
|
+
version: VERSION$h,
|
|
256
|
+
private: [],
|
|
257
|
+
selections: [
|
|
258
|
+
{
|
|
259
|
+
name: 'attributesAndValues',
|
|
260
|
+
kind: 'Object',
|
|
261
|
+
// any
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
name: 'childBusinessObjectTypes',
|
|
265
|
+
kind: 'Scalar',
|
|
266
|
+
plural: true,
|
|
267
|
+
required: false
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
name: 'contextDataRecordId',
|
|
271
|
+
kind: 'Scalar',
|
|
272
|
+
required: false
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
name: 'contextDefinitionId',
|
|
276
|
+
kind: 'Scalar',
|
|
277
|
+
required: false
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
name: 'contextMappingId',
|
|
281
|
+
kind: 'Scalar',
|
|
282
|
+
required: false
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
name: 'currentState',
|
|
286
|
+
kind: 'Scalar',
|
|
287
|
+
required: false
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
name: 'errorCode',
|
|
291
|
+
kind: 'Scalar',
|
|
292
|
+
required: false
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
name: 'errorMessages',
|
|
296
|
+
kind: 'Scalar',
|
|
297
|
+
plural: true,
|
|
298
|
+
required: false
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
name: 'lastProcessedTimeStamp',
|
|
302
|
+
kind: 'Scalar',
|
|
303
|
+
required: false
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
name: 'lastUpdatedTimeStamp',
|
|
307
|
+
kind: 'Scalar',
|
|
308
|
+
required: false
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
name: 'processingStatus',
|
|
312
|
+
kind: 'Scalar',
|
|
313
|
+
required: false
|
|
314
|
+
}
|
|
315
|
+
]
|
|
316
|
+
};
|
|
317
|
+
};
|
|
318
|
+
function equals$h(existing, incoming) {
|
|
319
|
+
const existing_contextDataRecordId = existing.contextDataRecordId;
|
|
320
|
+
const incoming_contextDataRecordId = incoming.contextDataRecordId;
|
|
321
|
+
// if at least one of these optionals is defined
|
|
322
|
+
if (existing_contextDataRecordId !== undefined || incoming_contextDataRecordId !== undefined) {
|
|
323
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
324
|
+
// not equal
|
|
325
|
+
if (existing_contextDataRecordId === undefined || incoming_contextDataRecordId === undefined) {
|
|
326
|
+
return false;
|
|
327
|
+
}
|
|
328
|
+
if (!(existing_contextDataRecordId === incoming_contextDataRecordId)) {
|
|
329
|
+
return false;
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
const existing_contextDefinitionId = existing.contextDefinitionId;
|
|
333
|
+
const incoming_contextDefinitionId = incoming.contextDefinitionId;
|
|
334
|
+
// if at least one of these optionals is defined
|
|
335
|
+
if (existing_contextDefinitionId !== undefined || incoming_contextDefinitionId !== undefined) {
|
|
336
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
337
|
+
// not equal
|
|
338
|
+
if (existing_contextDefinitionId === undefined || incoming_contextDefinitionId === undefined) {
|
|
339
|
+
return false;
|
|
340
|
+
}
|
|
341
|
+
if (!(existing_contextDefinitionId === incoming_contextDefinitionId)) {
|
|
342
|
+
return false;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
const existing_contextMappingId = existing.contextMappingId;
|
|
346
|
+
const incoming_contextMappingId = incoming.contextMappingId;
|
|
347
|
+
// if at least one of these optionals is defined
|
|
348
|
+
if (existing_contextMappingId !== undefined || incoming_contextMappingId !== undefined) {
|
|
349
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
350
|
+
// not equal
|
|
351
|
+
if (existing_contextMappingId === undefined || incoming_contextMappingId === undefined) {
|
|
352
|
+
return false;
|
|
353
|
+
}
|
|
354
|
+
if (!(existing_contextMappingId === incoming_contextMappingId)) {
|
|
355
|
+
return false;
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
const existing_currentState = existing.currentState;
|
|
359
|
+
const incoming_currentState = incoming.currentState;
|
|
360
|
+
// if at least one of these optionals is defined
|
|
361
|
+
if (existing_currentState !== undefined || incoming_currentState !== undefined) {
|
|
362
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
363
|
+
// not equal
|
|
364
|
+
if (existing_currentState === undefined || incoming_currentState === undefined) {
|
|
365
|
+
return false;
|
|
366
|
+
}
|
|
367
|
+
if (!(existing_currentState === incoming_currentState)) {
|
|
368
|
+
return false;
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
const existing_errorCode = existing.errorCode;
|
|
372
|
+
const incoming_errorCode = incoming.errorCode;
|
|
373
|
+
// if at least one of these optionals is defined
|
|
374
|
+
if (existing_errorCode !== undefined || incoming_errorCode !== undefined) {
|
|
375
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
376
|
+
// not equal
|
|
377
|
+
if (existing_errorCode === undefined || incoming_errorCode === undefined) {
|
|
378
|
+
return false;
|
|
379
|
+
}
|
|
380
|
+
if (!(existing_errorCode === incoming_errorCode)) {
|
|
381
|
+
return false;
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
const existing_lastProcessedTimeStamp = existing.lastProcessedTimeStamp;
|
|
385
|
+
const incoming_lastProcessedTimeStamp = incoming.lastProcessedTimeStamp;
|
|
386
|
+
// if at least one of these optionals is defined
|
|
387
|
+
if (existing_lastProcessedTimeStamp !== undefined || incoming_lastProcessedTimeStamp !== undefined) {
|
|
388
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
389
|
+
// not equal
|
|
390
|
+
if (existing_lastProcessedTimeStamp === undefined || incoming_lastProcessedTimeStamp === undefined) {
|
|
391
|
+
return false;
|
|
392
|
+
}
|
|
393
|
+
if (!(existing_lastProcessedTimeStamp === incoming_lastProcessedTimeStamp)) {
|
|
394
|
+
return false;
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
const existing_lastUpdatedTimeStamp = existing.lastUpdatedTimeStamp;
|
|
398
|
+
const incoming_lastUpdatedTimeStamp = incoming.lastUpdatedTimeStamp;
|
|
399
|
+
// if at least one of these optionals is defined
|
|
400
|
+
if (existing_lastUpdatedTimeStamp !== undefined || incoming_lastUpdatedTimeStamp !== undefined) {
|
|
401
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
402
|
+
// not equal
|
|
403
|
+
if (existing_lastUpdatedTimeStamp === undefined || incoming_lastUpdatedTimeStamp === undefined) {
|
|
404
|
+
return false;
|
|
405
|
+
}
|
|
406
|
+
if (!(existing_lastUpdatedTimeStamp === incoming_lastUpdatedTimeStamp)) {
|
|
407
|
+
return false;
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
const existing_processingStatus = existing.processingStatus;
|
|
411
|
+
const incoming_processingStatus = incoming.processingStatus;
|
|
412
|
+
// if at least one of these optionals is defined
|
|
413
|
+
if (existing_processingStatus !== undefined || incoming_processingStatus !== undefined) {
|
|
414
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
415
|
+
// not equal
|
|
416
|
+
if (existing_processingStatus === undefined || incoming_processingStatus === undefined) {
|
|
417
|
+
return false;
|
|
418
|
+
}
|
|
419
|
+
if (!(existing_processingStatus === incoming_processingStatus)) {
|
|
420
|
+
return false;
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
const existing_attributesAndValues = existing.attributesAndValues;
|
|
424
|
+
const incoming_attributesAndValues = incoming.attributesAndValues;
|
|
425
|
+
// if at least one of these optionals is defined
|
|
426
|
+
if (existing_attributesAndValues !== undefined || incoming_attributesAndValues !== undefined) {
|
|
427
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
428
|
+
// not equal
|
|
429
|
+
if (existing_attributesAndValues === undefined || incoming_attributesAndValues === undefined) {
|
|
430
|
+
return false;
|
|
431
|
+
}
|
|
432
|
+
const equals_attributesAndValues_props = equalsObject(existing_attributesAndValues, incoming_attributesAndValues, (existing_attributesAndValues_prop, incoming_attributesAndValues_prop) => {
|
|
433
|
+
if (JSONStringify(incoming_attributesAndValues_prop) !== JSONStringify(existing_attributesAndValues_prop)) {
|
|
434
|
+
return false;
|
|
435
|
+
}
|
|
436
|
+
});
|
|
437
|
+
if (equals_attributesAndValues_props === false) {
|
|
438
|
+
return false;
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
const existing_childBusinessObjectTypes = existing.childBusinessObjectTypes;
|
|
442
|
+
const incoming_childBusinessObjectTypes = incoming.childBusinessObjectTypes;
|
|
443
|
+
// if at least one of these optionals is defined
|
|
444
|
+
if (existing_childBusinessObjectTypes !== undefined || incoming_childBusinessObjectTypes !== undefined) {
|
|
445
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
446
|
+
// not equal
|
|
447
|
+
if (existing_childBusinessObjectTypes === undefined || incoming_childBusinessObjectTypes === undefined) {
|
|
448
|
+
return false;
|
|
449
|
+
}
|
|
450
|
+
const equals_childBusinessObjectTypes_items = equalsArray(existing_childBusinessObjectTypes, incoming_childBusinessObjectTypes, (existing_childBusinessObjectTypes_item, incoming_childBusinessObjectTypes_item) => {
|
|
451
|
+
if (!(existing_childBusinessObjectTypes_item === incoming_childBusinessObjectTypes_item)) {
|
|
452
|
+
return false;
|
|
453
|
+
}
|
|
454
|
+
});
|
|
455
|
+
if (equals_childBusinessObjectTypes_items === false) {
|
|
456
|
+
return false;
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
const existing_errorMessages = existing.errorMessages;
|
|
460
|
+
const incoming_errorMessages = incoming.errorMessages;
|
|
461
|
+
// if at least one of these optionals is defined
|
|
462
|
+
if (existing_errorMessages !== undefined || incoming_errorMessages !== undefined) {
|
|
463
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
464
|
+
// not equal
|
|
465
|
+
if (existing_errorMessages === undefined || incoming_errorMessages === undefined) {
|
|
466
|
+
return false;
|
|
467
|
+
}
|
|
468
|
+
const equals_errorMessages_items = equalsArray(existing_errorMessages, incoming_errorMessages, (existing_errorMessages_item, incoming_errorMessages_item) => {
|
|
469
|
+
if (!(existing_errorMessages_item === incoming_errorMessages_item)) {
|
|
470
|
+
return false;
|
|
471
|
+
}
|
|
472
|
+
});
|
|
473
|
+
if (equals_errorMessages_items === false) {
|
|
474
|
+
return false;
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
return true;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
const VERSION$g = "49d8c0b4cc8734f68ac1bc90a4614c4a";
|
|
481
|
+
function validate$r(obj, path = 'ContextQueryRecordRepresentation') {
|
|
482
|
+
const v_error = (() => {
|
|
483
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
484
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
485
|
+
}
|
|
486
|
+
if (obj.childQueryRecords !== undefined) {
|
|
487
|
+
const obj_childQueryRecords = obj.childQueryRecords;
|
|
488
|
+
const path_childQueryRecords = path + '.childQueryRecords';
|
|
489
|
+
if (!ArrayIsArray(obj_childQueryRecords)) {
|
|
490
|
+
return new TypeError('Expected "array" but received "' + typeof obj_childQueryRecords + '" (at "' + path_childQueryRecords + '")');
|
|
491
|
+
}
|
|
492
|
+
for (let i = 0; i < obj_childQueryRecords.length; i++) {
|
|
493
|
+
const obj_childQueryRecords_item = obj_childQueryRecords[i];
|
|
494
|
+
const path_childQueryRecords_item = path_childQueryRecords + '[' + i + ']';
|
|
495
|
+
if (obj_childQueryRecords_item === undefined) {
|
|
496
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_childQueryRecords_item + '" (at "' + path_childQueryRecords_item + '")');
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
if (obj.record !== undefined) {
|
|
501
|
+
const obj_record = obj.record;
|
|
502
|
+
const path_record = path + '.record';
|
|
503
|
+
const referencepath_recordValidationError = validate$s(obj_record, path_record);
|
|
504
|
+
if (referencepath_recordValidationError !== null) {
|
|
505
|
+
let message = 'Object doesn\'t match ContextDataRecordRepresentation (at "' + path_record + '")\n';
|
|
506
|
+
message += referencepath_recordValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
507
|
+
return new TypeError(message);
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
})();
|
|
511
|
+
return v_error === undefined ? null : v_error;
|
|
512
|
+
}
|
|
513
|
+
const select$M = function ContextQueryRecordRepresentationSelect() {
|
|
514
|
+
const { selections: ContextDataRecordRepresentation__selections, opaque: ContextDataRecordRepresentation__opaque, } = select$N();
|
|
515
|
+
return {
|
|
516
|
+
kind: 'Fragment',
|
|
517
|
+
version: VERSION$g,
|
|
518
|
+
private: [],
|
|
519
|
+
selections: [
|
|
520
|
+
{
|
|
521
|
+
name: 'childQueryRecords',
|
|
522
|
+
kind: 'Object',
|
|
523
|
+
// any
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
name: 'record',
|
|
527
|
+
kind: 'Object',
|
|
528
|
+
selections: ContextDataRecordRepresentation__selections,
|
|
529
|
+
required: false
|
|
530
|
+
}
|
|
531
|
+
]
|
|
532
|
+
};
|
|
533
|
+
};
|
|
534
|
+
function equals$g(existing, incoming) {
|
|
535
|
+
const existing_childQueryRecords = existing.childQueryRecords;
|
|
536
|
+
const incoming_childQueryRecords = incoming.childQueryRecords;
|
|
537
|
+
// if at least one of these optionals is defined
|
|
538
|
+
if (existing_childQueryRecords !== undefined || incoming_childQueryRecords !== undefined) {
|
|
539
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
540
|
+
// not equal
|
|
541
|
+
if (existing_childQueryRecords === undefined || incoming_childQueryRecords === undefined) {
|
|
542
|
+
return false;
|
|
543
|
+
}
|
|
544
|
+
const equals_childQueryRecords_items = equalsArray(existing_childQueryRecords, incoming_childQueryRecords, (existing_childQueryRecords_item, incoming_childQueryRecords_item) => {
|
|
545
|
+
if (JSONStringify(incoming_childQueryRecords_item) !== JSONStringify(existing_childQueryRecords_item)) {
|
|
546
|
+
return false;
|
|
547
|
+
}
|
|
548
|
+
});
|
|
549
|
+
if (equals_childQueryRecords_items === false) {
|
|
550
|
+
return false;
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
const existing_record = existing.record;
|
|
554
|
+
const incoming_record = incoming.record;
|
|
555
|
+
// if at least one of these optionals is defined
|
|
556
|
+
if (existing_record !== undefined || incoming_record !== undefined) {
|
|
557
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
558
|
+
// not equal
|
|
559
|
+
if (existing_record === undefined || incoming_record === undefined) {
|
|
560
|
+
return false;
|
|
561
|
+
}
|
|
562
|
+
if (!(equals$h(existing_record, incoming_record))) {
|
|
563
|
+
return false;
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
return true;
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
const TTL$f = 10000;
|
|
570
|
+
const VERSION$f = "d6e0481a792086c09a70a174a9232ada";
|
|
571
|
+
function validate$q(obj, path = 'QueryContextRecordResultRepresentation') {
|
|
572
|
+
const v_error = (() => {
|
|
573
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
574
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
575
|
+
}
|
|
576
|
+
const obj_contextId = obj.contextId;
|
|
577
|
+
const path_contextId = path + '.contextId';
|
|
578
|
+
if (typeof obj_contextId !== 'string') {
|
|
579
|
+
return new TypeError('Expected "string" but received "' + typeof obj_contextId + '" (at "' + path_contextId + '")');
|
|
580
|
+
}
|
|
581
|
+
if (obj.isDone !== undefined) {
|
|
582
|
+
const obj_isDone = obj.isDone;
|
|
583
|
+
const path_isDone = path + '.isDone';
|
|
584
|
+
if (typeof obj_isDone !== 'boolean') {
|
|
585
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isDone + '" (at "' + path_isDone + '")');
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
if (obj.isSuccess !== undefined) {
|
|
589
|
+
const obj_isSuccess = obj.isSuccess;
|
|
590
|
+
const path_isSuccess = path + '.isSuccess';
|
|
591
|
+
if (typeof obj_isSuccess !== 'boolean') {
|
|
592
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isSuccess + '" (at "' + path_isSuccess + '")');
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
if (obj.queryRecords !== undefined) {
|
|
596
|
+
const obj_queryRecords = obj.queryRecords;
|
|
597
|
+
const path_queryRecords = path + '.queryRecords';
|
|
598
|
+
if (!ArrayIsArray(obj_queryRecords)) {
|
|
599
|
+
return new TypeError('Expected "array" but received "' + typeof obj_queryRecords + '" (at "' + path_queryRecords + '")');
|
|
600
|
+
}
|
|
601
|
+
for (let i = 0; i < obj_queryRecords.length; i++) {
|
|
602
|
+
const obj_queryRecords_item = obj_queryRecords[i];
|
|
603
|
+
const path_queryRecords_item = path_queryRecords + '[' + i + ']';
|
|
604
|
+
const referencepath_queryRecords_itemValidationError = validate$r(obj_queryRecords_item, path_queryRecords_item);
|
|
605
|
+
if (referencepath_queryRecords_itemValidationError !== null) {
|
|
606
|
+
let message = 'Object doesn\'t match ContextQueryRecordRepresentation (at "' + path_queryRecords_item + '")\n';
|
|
607
|
+
message += referencepath_queryRecords_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
608
|
+
return new TypeError(message);
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
})();
|
|
613
|
+
return v_error === undefined ? null : v_error;
|
|
614
|
+
}
|
|
615
|
+
const RepresentationType$f = 'QueryContextRecordResultRepresentation';
|
|
616
|
+
function keyBuilder$L(luvio, config) {
|
|
617
|
+
return keyPrefix + '::' + RepresentationType$f + ':' + config.id;
|
|
618
|
+
}
|
|
619
|
+
function keyBuilderFromType$d(luvio, object) {
|
|
620
|
+
const keyParams = {
|
|
621
|
+
id: object.contextId
|
|
622
|
+
};
|
|
623
|
+
return keyBuilder$L(luvio, keyParams);
|
|
624
|
+
}
|
|
625
|
+
function normalize$f(input, existing, path, luvio, store, timestamp) {
|
|
626
|
+
return input;
|
|
627
|
+
}
|
|
628
|
+
const select$L = function QueryContextRecordResultRepresentationSelect() {
|
|
629
|
+
const { selections: ContextQueryRecordRepresentation__selections, opaque: ContextQueryRecordRepresentation__opaque, } = select$M();
|
|
630
|
+
return {
|
|
631
|
+
kind: 'Fragment',
|
|
632
|
+
version: VERSION$f,
|
|
633
|
+
private: [],
|
|
634
|
+
selections: [
|
|
635
|
+
{
|
|
636
|
+
name: 'contextId',
|
|
637
|
+
kind: 'Scalar'
|
|
638
|
+
},
|
|
639
|
+
{
|
|
640
|
+
name: 'isDone',
|
|
641
|
+
kind: 'Scalar',
|
|
642
|
+
required: false
|
|
643
|
+
},
|
|
644
|
+
{
|
|
645
|
+
name: 'isSuccess',
|
|
646
|
+
kind: 'Scalar',
|
|
647
|
+
required: false
|
|
648
|
+
},
|
|
649
|
+
{
|
|
650
|
+
name: 'queryRecords',
|
|
651
|
+
kind: 'Object',
|
|
652
|
+
plural: true,
|
|
653
|
+
selections: ContextQueryRecordRepresentation__selections,
|
|
654
|
+
required: false
|
|
655
|
+
}
|
|
656
|
+
]
|
|
657
|
+
};
|
|
658
|
+
};
|
|
659
|
+
function equals$f(existing, incoming) {
|
|
660
|
+
const existing_isDone = existing.isDone;
|
|
661
|
+
const incoming_isDone = incoming.isDone;
|
|
662
|
+
// if at least one of these optionals is defined
|
|
663
|
+
if (existing_isDone !== undefined || incoming_isDone !== undefined) {
|
|
664
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
665
|
+
// not equal
|
|
666
|
+
if (existing_isDone === undefined || incoming_isDone === undefined) {
|
|
667
|
+
return false;
|
|
668
|
+
}
|
|
669
|
+
if (!(existing_isDone === incoming_isDone)) {
|
|
670
|
+
return false;
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
const existing_isSuccess = existing.isSuccess;
|
|
674
|
+
const incoming_isSuccess = incoming.isSuccess;
|
|
675
|
+
// if at least one of these optionals is defined
|
|
676
|
+
if (existing_isSuccess !== undefined || incoming_isSuccess !== undefined) {
|
|
677
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
678
|
+
// not equal
|
|
679
|
+
if (existing_isSuccess === undefined || incoming_isSuccess === undefined) {
|
|
680
|
+
return false;
|
|
681
|
+
}
|
|
682
|
+
if (!(existing_isSuccess === incoming_isSuccess)) {
|
|
683
|
+
return false;
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
const existing_contextId = existing.contextId;
|
|
687
|
+
const incoming_contextId = incoming.contextId;
|
|
688
|
+
if (!(existing_contextId === incoming_contextId)) {
|
|
689
|
+
return false;
|
|
690
|
+
}
|
|
691
|
+
const existing_queryRecords = existing.queryRecords;
|
|
692
|
+
const incoming_queryRecords = incoming.queryRecords;
|
|
693
|
+
// if at least one of these optionals is defined
|
|
694
|
+
if (existing_queryRecords !== undefined || incoming_queryRecords !== undefined) {
|
|
695
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
696
|
+
// not equal
|
|
697
|
+
if (existing_queryRecords === undefined || incoming_queryRecords === undefined) {
|
|
698
|
+
return false;
|
|
699
|
+
}
|
|
700
|
+
const equals_queryRecords_items = equalsArray(existing_queryRecords, incoming_queryRecords, (existing_queryRecords_item, incoming_queryRecords_item) => {
|
|
701
|
+
if (!(equals$g(existing_queryRecords_item, incoming_queryRecords_item))) {
|
|
702
|
+
return false;
|
|
703
|
+
}
|
|
704
|
+
});
|
|
705
|
+
if (equals_queryRecords_items === false) {
|
|
706
|
+
return false;
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
return true;
|
|
710
|
+
}
|
|
711
|
+
const ingest$f = function QueryContextRecordResultRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
712
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
713
|
+
const validateError = validate$q(input);
|
|
714
|
+
if (validateError !== null) {
|
|
715
|
+
throw validateError;
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
const key = keyBuilderFromType$d(luvio, input);
|
|
719
|
+
const existingRecord = store.readEntry(key);
|
|
720
|
+
const ttlToUse = TTL$f;
|
|
721
|
+
let incomingRecord = normalize$f(input, store.readEntry(key), {
|
|
722
|
+
fullPath: key,
|
|
723
|
+
parent: path.parent,
|
|
724
|
+
propertyName: path.propertyName,
|
|
725
|
+
ttl: ttlToUse
|
|
726
|
+
});
|
|
727
|
+
if (existingRecord === undefined || equals$f(existingRecord, incomingRecord) === false) {
|
|
728
|
+
luvio.storePublish(key, incomingRecord);
|
|
729
|
+
}
|
|
730
|
+
{
|
|
731
|
+
const storeMetadataParams = {
|
|
732
|
+
ttl: ttlToUse,
|
|
733
|
+
namespace: "IndustriesContext",
|
|
734
|
+
version: VERSION$f,
|
|
735
|
+
representationName: RepresentationType$f,
|
|
736
|
+
};
|
|
737
|
+
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
738
|
+
}
|
|
739
|
+
return createLink(key);
|
|
740
|
+
};
|
|
741
|
+
function getTypeCacheKeys$f(luvio, input, fullPathFactory) {
|
|
742
|
+
const rootKeySet = new StoreKeyMap();
|
|
743
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
744
|
+
const rootKey = keyBuilderFromType$d(luvio, input);
|
|
745
|
+
rootKeySet.set(rootKey, {
|
|
746
|
+
namespace: keyPrefix,
|
|
747
|
+
representationName: RepresentationType$f,
|
|
748
|
+
mergeable: false
|
|
749
|
+
});
|
|
750
|
+
return rootKeySet;
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
function select$K(luvio, params) {
|
|
754
|
+
return select$L();
|
|
755
|
+
}
|
|
756
|
+
function getResponseCacheKeys$D(luvio, resourceParams, response) {
|
|
757
|
+
return getTypeCacheKeys$f(luvio, response);
|
|
758
|
+
}
|
|
759
|
+
function ingestSuccess$v(luvio, resourceParams, response) {
|
|
760
|
+
const { body } = response;
|
|
761
|
+
const key = keyBuilderFromType$d(luvio, body);
|
|
762
|
+
luvio.storeIngest(key, ingest$f, body);
|
|
763
|
+
const snapshot = luvio.storeLookup({
|
|
764
|
+
recordId: key,
|
|
765
|
+
node: select$K(),
|
|
766
|
+
variables: {},
|
|
767
|
+
});
|
|
768
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
769
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
770
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
deepFreeze(snapshot.data);
|
|
774
|
+
return snapshot;
|
|
775
|
+
}
|
|
776
|
+
function createResourceRequest$D(config) {
|
|
777
|
+
const headers = {};
|
|
778
|
+
return {
|
|
779
|
+
baseUri: '/services/data/v59.0',
|
|
780
|
+
basePath: '/connect/context/queryrecord',
|
|
781
|
+
method: 'post',
|
|
782
|
+
body: config.body,
|
|
783
|
+
urlParams: {},
|
|
784
|
+
queryParams: config.queryParams,
|
|
785
|
+
headers,
|
|
786
|
+
priority: 'normal',
|
|
787
|
+
};
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
const queryContextRecordAndChildren_ConfigPropertyNames = {
|
|
791
|
+
displayName: 'queryContextRecordAndChildren',
|
|
792
|
+
parameters: {
|
|
793
|
+
required: ['queryContextRecordInput'],
|
|
794
|
+
optional: ['children']
|
|
795
|
+
}
|
|
796
|
+
};
|
|
797
|
+
function createResourceParams$D(config) {
|
|
798
|
+
const resourceParams = {
|
|
799
|
+
queryParams: {
|
|
800
|
+
children: config.children
|
|
801
|
+
},
|
|
802
|
+
body: {
|
|
803
|
+
queryContextRecordInput: config.queryContextRecordInput
|
|
804
|
+
}
|
|
805
|
+
};
|
|
806
|
+
return resourceParams;
|
|
807
|
+
}
|
|
808
|
+
function typeCheckConfig$D(untrustedConfig) {
|
|
809
|
+
const config = {};
|
|
810
|
+
const untrustedConfig_children = untrustedConfig.children;
|
|
811
|
+
if (typeof untrustedConfig_children === 'boolean') {
|
|
812
|
+
config.children = untrustedConfig_children;
|
|
813
|
+
}
|
|
814
|
+
const untrustedConfig_queryContextRecordInput = untrustedConfig.queryContextRecordInput;
|
|
815
|
+
const referenceQueryContextRecordInputRepresentationValidationError = validate$t(untrustedConfig_queryContextRecordInput);
|
|
816
|
+
if (referenceQueryContextRecordInputRepresentationValidationError === null) {
|
|
817
|
+
config.queryContextRecordInput = untrustedConfig_queryContextRecordInput;
|
|
818
|
+
}
|
|
819
|
+
return config;
|
|
820
|
+
}
|
|
821
|
+
function validateAdapterConfig$D(untrustedConfig, configPropertyNames) {
|
|
822
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
823
|
+
return null;
|
|
824
|
+
}
|
|
825
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
826
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
827
|
+
}
|
|
828
|
+
const config = typeCheckConfig$D(untrustedConfig);
|
|
829
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
830
|
+
return null;
|
|
831
|
+
}
|
|
832
|
+
return config;
|
|
833
|
+
}
|
|
834
|
+
function buildNetworkSnapshot$D(luvio, config, options) {
|
|
835
|
+
const resourceParams = createResourceParams$D(config);
|
|
836
|
+
const request = createResourceRequest$D(resourceParams);
|
|
837
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
838
|
+
.then((response) => {
|
|
839
|
+
return luvio.handleSuccessResponse(() => {
|
|
840
|
+
const snapshot = ingestSuccess$v(luvio, resourceParams, response);
|
|
841
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
842
|
+
}, () => getResponseCacheKeys$D(luvio, resourceParams, response.body));
|
|
843
|
+
}, (response) => {
|
|
844
|
+
deepFreeze(response);
|
|
845
|
+
throw response;
|
|
846
|
+
});
|
|
847
|
+
}
|
|
848
|
+
const queryContextRecordAndChildrenAdapterFactory = (luvio) => {
|
|
849
|
+
return function queryContextRecordAndChildren(untrustedConfig) {
|
|
850
|
+
const config = validateAdapterConfig$D(untrustedConfig, queryContextRecordAndChildren_ConfigPropertyNames);
|
|
851
|
+
// Invalid or incomplete config
|
|
852
|
+
if (config === null) {
|
|
853
|
+
throw new Error('Invalid config for "queryContextRecordAndChildren"');
|
|
854
|
+
}
|
|
855
|
+
return buildNetworkSnapshot$D(luvio, config);
|
|
856
|
+
};
|
|
857
|
+
};
|
|
858
|
+
|
|
859
|
+
const TTL$e = 30000;
|
|
860
|
+
const VERSION$e = "f4529c1d2c50b9cc056022fbea50b225";
|
|
861
|
+
function validate$p(obj, path = 'ContextInfoRepresentation') {
|
|
862
|
+
const v_error = (() => {
|
|
863
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
864
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
865
|
+
}
|
|
866
|
+
if (obj.childBusinessObjectTypes !== undefined) {
|
|
867
|
+
const obj_childBusinessObjectTypes = obj.childBusinessObjectTypes;
|
|
868
|
+
const path_childBusinessObjectTypes = path + '.childBusinessObjectTypes';
|
|
869
|
+
if (!ArrayIsArray(obj_childBusinessObjectTypes)) {
|
|
870
|
+
return new TypeError('Expected "array" but received "' + typeof obj_childBusinessObjectTypes + '" (at "' + path_childBusinessObjectTypes + '")');
|
|
871
|
+
}
|
|
872
|
+
for (let i = 0; i < obj_childBusinessObjectTypes.length; i++) {
|
|
873
|
+
const obj_childBusinessObjectTypes_item = obj_childBusinessObjectTypes[i];
|
|
874
|
+
const path_childBusinessObjectTypes_item = path_childBusinessObjectTypes + '[' + i + ']';
|
|
875
|
+
if (typeof obj_childBusinessObjectTypes_item !== 'string') {
|
|
876
|
+
return new TypeError('Expected "string" but received "' + typeof obj_childBusinessObjectTypes_item + '" (at "' + path_childBusinessObjectTypes_item + '")');
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
if (obj.contextDefinitionId !== undefined) {
|
|
881
|
+
const obj_contextDefinitionId = obj.contextDefinitionId;
|
|
882
|
+
const path_contextDefinitionId = path + '.contextDefinitionId';
|
|
883
|
+
if (typeof obj_contextDefinitionId !== 'string') {
|
|
884
|
+
return new TypeError('Expected "string" but received "' + typeof obj_contextDefinitionId + '" (at "' + path_contextDefinitionId + '")');
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
const obj_contextId = obj.contextId;
|
|
888
|
+
const path_contextId = path + '.contextId';
|
|
889
|
+
if (typeof obj_contextId !== 'string') {
|
|
890
|
+
return new TypeError('Expected "string" but received "' + typeof obj_contextId + '" (at "' + path_contextId + '")');
|
|
891
|
+
}
|
|
892
|
+
if (obj.contextMappingId !== undefined) {
|
|
893
|
+
const obj_contextMappingId = obj.contextMappingId;
|
|
894
|
+
const path_contextMappingId = path + '.contextMappingId';
|
|
895
|
+
if (typeof obj_contextMappingId !== 'string') {
|
|
896
|
+
return new TypeError('Expected "string" but received "' + typeof obj_contextMappingId + '" (at "' + path_contextMappingId + '")');
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
if (obj.isSuccess !== undefined) {
|
|
900
|
+
const obj_isSuccess = obj.isSuccess;
|
|
901
|
+
const path_isSuccess = path + '.isSuccess';
|
|
902
|
+
if (typeof obj_isSuccess !== 'boolean') {
|
|
903
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isSuccess + '" (at "' + path_isSuccess + '")');
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
})();
|
|
907
|
+
return v_error === undefined ? null : v_error;
|
|
908
|
+
}
|
|
909
|
+
const RepresentationType$e = 'ContextInfoRepresentation';
|
|
910
|
+
function keyBuilder$K(luvio, config) {
|
|
911
|
+
return keyPrefix + '::' + RepresentationType$e + ':' + config.id;
|
|
912
|
+
}
|
|
913
|
+
function keyBuilderFromType$c(luvio, object) {
|
|
914
|
+
const keyParams = {
|
|
915
|
+
id: object.contextId
|
|
916
|
+
};
|
|
917
|
+
return keyBuilder$K(luvio, keyParams);
|
|
918
|
+
}
|
|
919
|
+
function normalize$e(input, existing, path, luvio, store, timestamp) {
|
|
920
|
+
return input;
|
|
921
|
+
}
|
|
922
|
+
const select$J = function ContextInfoRepresentationSelect() {
|
|
923
|
+
return {
|
|
924
|
+
kind: 'Fragment',
|
|
925
|
+
version: VERSION$e,
|
|
926
|
+
private: [],
|
|
927
|
+
opaque: true
|
|
928
|
+
};
|
|
929
|
+
};
|
|
930
|
+
function equals$e(existing, incoming) {
|
|
931
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
932
|
+
return false;
|
|
933
|
+
}
|
|
934
|
+
return true;
|
|
935
|
+
}
|
|
936
|
+
const ingest$e = function ContextInfoRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
937
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
938
|
+
const validateError = validate$p(input);
|
|
939
|
+
if (validateError !== null) {
|
|
940
|
+
throw validateError;
|
|
941
|
+
}
|
|
942
|
+
}
|
|
943
|
+
const key = keyBuilderFromType$c(luvio, input);
|
|
944
|
+
const existingRecord = store.readEntry(key);
|
|
945
|
+
const ttlToUse = TTL$e;
|
|
946
|
+
let incomingRecord = normalize$e(input, store.readEntry(key), {
|
|
947
|
+
fullPath: key,
|
|
948
|
+
parent: path.parent,
|
|
949
|
+
propertyName: path.propertyName,
|
|
950
|
+
ttl: ttlToUse
|
|
951
|
+
});
|
|
952
|
+
if (existingRecord === undefined || equals$e(existingRecord, incomingRecord) === false) {
|
|
953
|
+
luvio.storePublish(key, incomingRecord);
|
|
954
|
+
}
|
|
955
|
+
{
|
|
956
|
+
const storeMetadataParams = {
|
|
957
|
+
ttl: ttlToUse,
|
|
958
|
+
namespace: "IndustriesContext",
|
|
959
|
+
version: VERSION$e,
|
|
960
|
+
representationName: RepresentationType$e,
|
|
961
|
+
};
|
|
962
|
+
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
963
|
+
}
|
|
964
|
+
return createLink(key);
|
|
965
|
+
};
|
|
966
|
+
function getTypeCacheKeys$e(luvio, input, fullPathFactory) {
|
|
967
|
+
const rootKeySet = new StoreKeyMap();
|
|
968
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
969
|
+
const rootKey = keyBuilderFromType$c(luvio, input);
|
|
970
|
+
rootKeySet.set(rootKey, {
|
|
971
|
+
namespace: keyPrefix,
|
|
972
|
+
representationName: RepresentationType$e,
|
|
973
|
+
mergeable: false
|
|
974
|
+
});
|
|
975
|
+
return rootKeySet;
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
function select$I(luvio, params) {
|
|
979
|
+
return select$J();
|
|
980
|
+
}
|
|
981
|
+
function keyBuilder$J(luvio, params) {
|
|
982
|
+
return keyBuilder$K(luvio, {
|
|
983
|
+
id: params.urlParams.contextId
|
|
984
|
+
});
|
|
985
|
+
}
|
|
986
|
+
function getResponseCacheKeys$C(luvio, resourceParams, response) {
|
|
987
|
+
return getTypeCacheKeys$e(luvio, response);
|
|
988
|
+
}
|
|
989
|
+
function ingestSuccess$u(luvio, resourceParams, response, snapshotRefresh) {
|
|
990
|
+
const { body } = response;
|
|
991
|
+
const key = keyBuilder$J(luvio, resourceParams);
|
|
992
|
+
luvio.storeIngest(key, ingest$e, body);
|
|
993
|
+
const snapshot = luvio.storeLookup({
|
|
994
|
+
recordId: key,
|
|
995
|
+
node: select$I(),
|
|
996
|
+
variables: {},
|
|
997
|
+
}, snapshotRefresh);
|
|
998
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
999
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1000
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
deepFreeze(snapshot.data);
|
|
1004
|
+
return snapshot;
|
|
1005
|
+
}
|
|
1006
|
+
function ingestError$c(luvio, params, error, snapshotRefresh) {
|
|
1007
|
+
const key = keyBuilder$J(luvio, params);
|
|
1008
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1009
|
+
const storeMetadataParams = {
|
|
1010
|
+
ttl: TTL$e,
|
|
1011
|
+
namespace: keyPrefix,
|
|
1012
|
+
version: VERSION$e,
|
|
1013
|
+
representationName: RepresentationType$e
|
|
1014
|
+
};
|
|
1015
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
1016
|
+
return errorSnapshot;
|
|
1017
|
+
}
|
|
1018
|
+
function createResourceRequest$C(config) {
|
|
1019
|
+
const headers = {};
|
|
1020
|
+
return {
|
|
1021
|
+
baseUri: '/services/data/v59.0',
|
|
1022
|
+
basePath: '/connect/context/' + config.urlParams.contextId + '',
|
|
1023
|
+
method: 'get',
|
|
1024
|
+
body: null,
|
|
1025
|
+
urlParams: config.urlParams,
|
|
1026
|
+
queryParams: {},
|
|
1027
|
+
headers,
|
|
1028
|
+
priority: 'normal',
|
|
1029
|
+
};
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
const getContext_ConfigPropertyNames = {
|
|
1033
|
+
displayName: 'getContext',
|
|
1034
|
+
parameters: {
|
|
1035
|
+
required: ['contextId'],
|
|
1036
|
+
optional: []
|
|
1037
|
+
}
|
|
1038
|
+
};
|
|
1039
|
+
function createResourceParams$C(config) {
|
|
1040
|
+
const resourceParams = {
|
|
1041
|
+
urlParams: {
|
|
1042
|
+
contextId: config.contextId
|
|
1043
|
+
}
|
|
1044
|
+
};
|
|
1045
|
+
return resourceParams;
|
|
1046
|
+
}
|
|
1047
|
+
function keyBuilder$I(luvio, config) {
|
|
1048
|
+
const resourceParams = createResourceParams$C(config);
|
|
1049
|
+
return keyBuilder$J(luvio, resourceParams);
|
|
1050
|
+
}
|
|
1051
|
+
function typeCheckConfig$C(untrustedConfig) {
|
|
1052
|
+
const config = {};
|
|
1053
|
+
const untrustedConfig_contextId = untrustedConfig.contextId;
|
|
1054
|
+
if (typeof untrustedConfig_contextId === 'string') {
|
|
1055
|
+
config.contextId = untrustedConfig_contextId;
|
|
1056
|
+
}
|
|
1057
|
+
return config;
|
|
1058
|
+
}
|
|
1059
|
+
function validateAdapterConfig$C(untrustedConfig, configPropertyNames) {
|
|
1060
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1061
|
+
return null;
|
|
1062
|
+
}
|
|
1063
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1064
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1065
|
+
}
|
|
1066
|
+
const config = typeCheckConfig$C(untrustedConfig);
|
|
1067
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1068
|
+
return null;
|
|
1069
|
+
}
|
|
1070
|
+
return config;
|
|
1071
|
+
}
|
|
1072
|
+
function adapterFragment$c(luvio, config) {
|
|
1073
|
+
createResourceParams$C(config);
|
|
1074
|
+
return select$I();
|
|
1075
|
+
}
|
|
1076
|
+
function onFetchResponseSuccess$c(luvio, config, resourceParams, response) {
|
|
1077
|
+
const snapshot = ingestSuccess$u(luvio, resourceParams, response, {
|
|
1078
|
+
config,
|
|
1079
|
+
resolve: () => buildNetworkSnapshot$C(luvio, config, snapshotRefreshOptions)
|
|
1080
|
+
});
|
|
1081
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1082
|
+
}
|
|
1083
|
+
function onFetchResponseError$c(luvio, config, resourceParams, response) {
|
|
1084
|
+
const snapshot = ingestError$c(luvio, resourceParams, response, {
|
|
1085
|
+
config,
|
|
1086
|
+
resolve: () => buildNetworkSnapshot$C(luvio, config, snapshotRefreshOptions)
|
|
1087
|
+
});
|
|
1088
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1089
|
+
}
|
|
1090
|
+
function buildNetworkSnapshot$C(luvio, config, options) {
|
|
1091
|
+
const resourceParams = createResourceParams$C(config);
|
|
1092
|
+
const request = createResourceRequest$C(resourceParams);
|
|
1093
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1094
|
+
.then((response) => {
|
|
1095
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$c(luvio, config, resourceParams, response), () => getResponseCacheKeys$C(luvio, resourceParams, response.body));
|
|
1096
|
+
}, (response) => {
|
|
1097
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$c(luvio, config, resourceParams, response));
|
|
1098
|
+
});
|
|
1099
|
+
}
|
|
1100
|
+
function buildNetworkSnapshotCachePolicy$c(context, coercedAdapterRequestContext) {
|
|
1101
|
+
const { luvio, config } = context;
|
|
1102
|
+
const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
|
|
1103
|
+
const dispatchOptions = {
|
|
1104
|
+
resourceRequestContext: {
|
|
1105
|
+
requestCorrelator,
|
|
1106
|
+
luvioRequestMethod: undefined,
|
|
1107
|
+
},
|
|
1108
|
+
eventObservers
|
|
1109
|
+
};
|
|
1110
|
+
if (networkPriority !== 'normal') {
|
|
1111
|
+
dispatchOptions.overrides = {
|
|
1112
|
+
priority: networkPriority
|
|
1113
|
+
};
|
|
1114
|
+
}
|
|
1115
|
+
return buildNetworkSnapshot$C(luvio, config, dispatchOptions);
|
|
1116
|
+
}
|
|
1117
|
+
function buildCachedSnapshotCachePolicy$c(context, storeLookup) {
|
|
1118
|
+
const { luvio, config } = context;
|
|
1119
|
+
const selector = {
|
|
1120
|
+
recordId: keyBuilder$I(luvio, config),
|
|
1121
|
+
node: adapterFragment$c(luvio, config),
|
|
1122
|
+
variables: {},
|
|
71
1123
|
};
|
|
1124
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
1125
|
+
config,
|
|
1126
|
+
resolve: () => buildNetworkSnapshot$C(luvio, config, snapshotRefreshOptions)
|
|
1127
|
+
});
|
|
1128
|
+
return cacheSnapshot;
|
|
72
1129
|
}
|
|
1130
|
+
const getContextAdapterFactory = (luvio) => function IndustriesContext__getContext(untrustedConfig, requestContext) {
|
|
1131
|
+
const config = validateAdapterConfig$C(untrustedConfig, getContext_ConfigPropertyNames);
|
|
1132
|
+
// Invalid or incomplete config
|
|
1133
|
+
if (config === null) {
|
|
1134
|
+
return null;
|
|
1135
|
+
}
|
|
1136
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1137
|
+
buildCachedSnapshotCachePolicy$c, buildNetworkSnapshotCachePolicy$c);
|
|
1138
|
+
};
|
|
73
1139
|
|
|
74
1140
|
const TTL$d = 30000;
|
|
75
1141
|
const VERSION$d = "05ab63159c5733f63fae9f5eb081ee89";
|
|
76
|
-
function validate$
|
|
1142
|
+
function validate$o(obj, path = 'ContextDefinitionInfoRepresentation') {
|
|
77
1143
|
const v_error = (() => {
|
|
78
1144
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
79
1145
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -422,7 +1488,7 @@ function equals$d(existing, incoming) {
|
|
|
422
1488
|
}
|
|
423
1489
|
const ingest$d = function ContextDefinitionInfoRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
424
1490
|
if (process.env.NODE_ENV !== 'production') {
|
|
425
|
-
const validateError = validate$
|
|
1491
|
+
const validateError = validate$o(input);
|
|
426
1492
|
if (validateError !== null) {
|
|
427
1493
|
throw validateError;
|
|
428
1494
|
}
|
|
@@ -464,7 +1530,7 @@ function getTypeCacheKeys$d(luvio, input, fullPathFactory) {
|
|
|
464
1530
|
|
|
465
1531
|
const TTL$c = 10000;
|
|
466
1532
|
const VERSION$c = "847680af81af4497e1c8078978aa7a7e";
|
|
467
|
-
function validate$
|
|
1533
|
+
function validate$n(obj, path = 'ContextDefinitionListRepresentation') {
|
|
468
1534
|
const v_error = (() => {
|
|
469
1535
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
470
1536
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -559,7 +1625,7 @@ function equals$c(existing, incoming) {
|
|
|
559
1625
|
}
|
|
560
1626
|
const ingest$c = function ContextDefinitionListRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
561
1627
|
if (process.env.NODE_ENV !== 'production') {
|
|
562
|
-
const validateError = validate$
|
|
1628
|
+
const validateError = validate$n(input);
|
|
563
1629
|
if (validateError !== null) {
|
|
564
1630
|
throw validateError;
|
|
565
1631
|
}
|
|
@@ -763,7 +1829,7 @@ const getContextDefinitionListAdapterFactory = (luvio) => function IndustriesCon
|
|
|
763
1829
|
buildCachedSnapshotCachePolicy$b, buildNetworkSnapshotCachePolicy$b);
|
|
764
1830
|
};
|
|
765
1831
|
|
|
766
|
-
function validate$
|
|
1832
|
+
function validate$m(obj, path = 'ContextDefinitionInputRepresentation') {
|
|
767
1833
|
const v_error = (() => {
|
|
768
1834
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
769
1835
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -869,7 +1935,7 @@ function createResourceParams$A(config) {
|
|
|
869
1935
|
function typeCheckConfig$A(untrustedConfig) {
|
|
870
1936
|
const config = {};
|
|
871
1937
|
const untrustedConfig_contextDefinitionInput = untrustedConfig.contextDefinitionInput;
|
|
872
|
-
const referenceContextDefinitionInputRepresentationValidationError = validate$
|
|
1938
|
+
const referenceContextDefinitionInputRepresentationValidationError = validate$m(untrustedConfig_contextDefinitionInput);
|
|
873
1939
|
if (referenceContextDefinitionInputRepresentationValidationError === null) {
|
|
874
1940
|
config.contextDefinitionInput = untrustedConfig_contextDefinitionInput;
|
|
875
1941
|
}
|
|
@@ -913,7 +1979,7 @@ const createContextDefinitionAdapterFactory = (luvio) => {
|
|
|
913
1979
|
};
|
|
914
1980
|
};
|
|
915
1981
|
|
|
916
|
-
function validate$
|
|
1982
|
+
function validate$l(obj, path = 'ContextAttributeInputRepresentation') {
|
|
917
1983
|
const v_error = (() => {
|
|
918
1984
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
919
1985
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -939,6 +2005,13 @@ function validate$k(obj, path = 'ContextAttributeInputRepresentation') {
|
|
|
939
2005
|
return new TypeError('Expected "string" but received "' + typeof obj_dataType + '" (at "' + path_dataType + '")');
|
|
940
2006
|
}
|
|
941
2007
|
}
|
|
2008
|
+
if (obj.domainSet !== undefined) {
|
|
2009
|
+
const obj_domainSet = obj.domainSet;
|
|
2010
|
+
const path_domainSet = path + '.domainSet';
|
|
2011
|
+
if (typeof obj_domainSet !== 'string') {
|
|
2012
|
+
return new TypeError('Expected "string" but received "' + typeof obj_domainSet + '" (at "' + path_domainSet + '")');
|
|
2013
|
+
}
|
|
2014
|
+
}
|
|
942
2015
|
if (obj.fieldType !== undefined) {
|
|
943
2016
|
const obj_fieldType = obj.fieldType;
|
|
944
2017
|
const path_fieldType = path + '.fieldType';
|
|
@@ -980,7 +2053,7 @@ function validate$k(obj, path = 'ContextAttributeInputRepresentation') {
|
|
|
980
2053
|
|
|
981
2054
|
const TTL$b = 30000;
|
|
982
2055
|
const VERSION$b = "3a7bdb86e90ea4923b5b327dfec3f38f";
|
|
983
|
-
function validate$
|
|
2056
|
+
function validate$k(obj, path = 'ContextAttributeTagRepresentation') {
|
|
984
2057
|
const v_error = (() => {
|
|
985
2058
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
986
2059
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1129,7 +2202,7 @@ function equals$b(existing, incoming) {
|
|
|
1129
2202
|
}
|
|
1130
2203
|
const ingest$b = function ContextAttributeTagRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1131
2204
|
if (process.env.NODE_ENV !== 'production') {
|
|
1132
|
-
const validateError = validate$
|
|
2205
|
+
const validateError = validate$k(input);
|
|
1133
2206
|
if (validateError !== null) {
|
|
1134
2207
|
throw validateError;
|
|
1135
2208
|
}
|
|
@@ -1170,8 +2243,8 @@ function getTypeCacheKeys$b(luvio, input, fullPathFactory) {
|
|
|
1170
2243
|
}
|
|
1171
2244
|
|
|
1172
2245
|
const TTL$a = 30000;
|
|
1173
|
-
const VERSION$a = "
|
|
1174
|
-
function validate$
|
|
2246
|
+
const VERSION$a = "f668e8eb15a473a71c2a9c3ea8669c35";
|
|
2247
|
+
function validate$j(obj, path = 'ContextAttributeRepresentation') {
|
|
1175
2248
|
const v_error = (() => {
|
|
1176
2249
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1177
2250
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1200,6 +2273,13 @@ function validate$i(obj, path = 'ContextAttributeRepresentation') {
|
|
|
1200
2273
|
return new TypeError('Expected "string" but received "' + typeof obj_dataType + '" (at "' + path_dataType + '")');
|
|
1201
2274
|
}
|
|
1202
2275
|
}
|
|
2276
|
+
if (obj.domainSet !== undefined) {
|
|
2277
|
+
const obj_domainSet = obj.domainSet;
|
|
2278
|
+
const path_domainSet = path + '.domainSet';
|
|
2279
|
+
if (typeof obj_domainSet !== 'string') {
|
|
2280
|
+
return new TypeError('Expected "string" but received "' + typeof obj_domainSet + '" (at "' + path_domainSet + '")');
|
|
2281
|
+
}
|
|
2282
|
+
}
|
|
1203
2283
|
if (obj.fieldType !== undefined) {
|
|
1204
2284
|
const obj_fieldType = obj.fieldType;
|
|
1205
2285
|
const path_fieldType = path + '.fieldType';
|
|
@@ -1295,6 +2375,11 @@ const select$C = function ContextAttributeRepresentationSelect() {
|
|
|
1295
2375
|
kind: 'Scalar',
|
|
1296
2376
|
required: false
|
|
1297
2377
|
},
|
|
2378
|
+
{
|
|
2379
|
+
name: 'domainSet',
|
|
2380
|
+
kind: 'Scalar',
|
|
2381
|
+
required: false
|
|
2382
|
+
},
|
|
1298
2383
|
{
|
|
1299
2384
|
name: 'fieldType',
|
|
1300
2385
|
kind: 'Scalar',
|
|
@@ -1386,6 +2471,19 @@ function equals$a(existing, incoming) {
|
|
|
1386
2471
|
return false;
|
|
1387
2472
|
}
|
|
1388
2473
|
}
|
|
2474
|
+
const existing_domainSet = existing.domainSet;
|
|
2475
|
+
const incoming_domainSet = incoming.domainSet;
|
|
2476
|
+
// if at least one of these optionals is defined
|
|
2477
|
+
if (existing_domainSet !== undefined || incoming_domainSet !== undefined) {
|
|
2478
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
2479
|
+
// not equal
|
|
2480
|
+
if (existing_domainSet === undefined || incoming_domainSet === undefined) {
|
|
2481
|
+
return false;
|
|
2482
|
+
}
|
|
2483
|
+
if (!(existing_domainSet === incoming_domainSet)) {
|
|
2484
|
+
return false;
|
|
2485
|
+
}
|
|
2486
|
+
}
|
|
1389
2487
|
const existing_fieldType = existing.fieldType;
|
|
1390
2488
|
const incoming_fieldType = incoming.fieldType;
|
|
1391
2489
|
// if at least one of these optionals is defined
|
|
@@ -1439,7 +2537,7 @@ function equals$a(existing, incoming) {
|
|
|
1439
2537
|
}
|
|
1440
2538
|
const ingest$a = function ContextAttributeRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1441
2539
|
if (process.env.NODE_ENV !== 'production') {
|
|
1442
|
-
const validateError = validate$
|
|
2540
|
+
const validateError = validate$j(input);
|
|
1443
2541
|
if (validateError !== null) {
|
|
1444
2542
|
throw validateError;
|
|
1445
2543
|
}
|
|
@@ -1538,7 +2636,7 @@ function createResourceParams$z(config) {
|
|
|
1538
2636
|
function typeCheckConfig$z(untrustedConfig) {
|
|
1539
2637
|
const config = {};
|
|
1540
2638
|
const untrustedConfig_contextAttributeInput = untrustedConfig.contextAttributeInput;
|
|
1541
|
-
const referenceContextAttributeInputRepresentationValidationError = validate$
|
|
2639
|
+
const referenceContextAttributeInputRepresentationValidationError = validate$l(untrustedConfig_contextAttributeInput);
|
|
1542
2640
|
if (referenceContextAttributeInputRepresentationValidationError === null) {
|
|
1543
2641
|
config.contextAttributeInput = untrustedConfig_contextAttributeInput;
|
|
1544
2642
|
}
|
|
@@ -1901,7 +2999,7 @@ function typeCheckConfig$w(untrustedConfig) {
|
|
|
1901
2999
|
config.contextAttributeId = untrustedConfig_contextAttributeId;
|
|
1902
3000
|
}
|
|
1903
3001
|
const untrustedConfig_contextAttributeInput = untrustedConfig.contextAttributeInput;
|
|
1904
|
-
const referenceContextAttributeInputRepresentationValidationError = validate$
|
|
3002
|
+
const referenceContextAttributeInputRepresentationValidationError = validate$l(untrustedConfig_contextAttributeInput);
|
|
1905
3003
|
if (referenceContextAttributeInputRepresentationValidationError === null) {
|
|
1906
3004
|
config.contextAttributeInput = untrustedConfig_contextAttributeInput;
|
|
1907
3005
|
}
|
|
@@ -1947,7 +3045,7 @@ const updateContextAttributeAdapterFactory = (luvio) => {
|
|
|
1947
3045
|
|
|
1948
3046
|
const TTL$9 = 10000;
|
|
1949
3047
|
const VERSION$9 = "5d7bd042347d78b8c394239649db8f46";
|
|
1950
|
-
function validate$
|
|
3048
|
+
function validate$i(obj, path = 'ContextAttributeTagListRepresentation') {
|
|
1951
3049
|
const v_error = (() => {
|
|
1952
3050
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1953
3051
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1961,7 +3059,7 @@ function validate$h(obj, path = 'ContextAttributeTagListRepresentation') {
|
|
|
1961
3059
|
for (let i = 0; i < obj_attributeTags.length; i++) {
|
|
1962
3060
|
const obj_attributeTags_item = obj_attributeTags[i];
|
|
1963
3061
|
const path_attributeTags_item = path_attributeTags + '[' + i + ']';
|
|
1964
|
-
const referencepath_attributeTags_itemValidationError = validate$
|
|
3062
|
+
const referencepath_attributeTags_itemValidationError = validate$k(obj_attributeTags_item, path_attributeTags_item);
|
|
1965
3063
|
if (referencepath_attributeTags_itemValidationError !== null) {
|
|
1966
3064
|
let message = 'Object doesn\'t match ContextAttributeTagRepresentation (at "' + path_attributeTags_item + '")\n';
|
|
1967
3065
|
message += referencepath_attributeTags_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1999,7 +3097,7 @@ function equals$9(existing, incoming) {
|
|
|
1999
3097
|
}
|
|
2000
3098
|
const ingest$9 = function ContextAttributeTagListRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2001
3099
|
if (process.env.NODE_ENV !== 'production') {
|
|
2002
|
-
const validateError = validate$
|
|
3100
|
+
const validateError = validate$i(input);
|
|
2003
3101
|
if (validateError !== null) {
|
|
2004
3102
|
throw validateError;
|
|
2005
3103
|
}
|
|
@@ -2199,7 +3297,7 @@ const getContextAttributeTagsByAttributeIdAdapterFactory = (luvio) => function I
|
|
|
2199
3297
|
buildCachedSnapshotCachePolicy$9, buildNetworkSnapshotCachePolicy$9);
|
|
2200
3298
|
};
|
|
2201
3299
|
|
|
2202
|
-
function validate$
|
|
3300
|
+
function validate$h(obj, path = 'ContextAttributeTagInputRepresentation') {
|
|
2203
3301
|
const v_error = (() => {
|
|
2204
3302
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2205
3303
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2282,7 +3380,7 @@ function createResourceParams$u(config) {
|
|
|
2282
3380
|
function typeCheckConfig$u(untrustedConfig) {
|
|
2283
3381
|
const config = {};
|
|
2284
3382
|
const untrustedConfig_contextAttributeTagInput = untrustedConfig.contextAttributeTagInput;
|
|
2285
|
-
const referenceContextAttributeTagInputRepresentationValidationError = validate$
|
|
3383
|
+
const referenceContextAttributeTagInputRepresentationValidationError = validate$h(untrustedConfig_contextAttributeTagInput);
|
|
2286
3384
|
if (referenceContextAttributeTagInputRepresentationValidationError === null) {
|
|
2287
3385
|
config.contextAttributeTagInput = untrustedConfig_contextAttributeTagInput;
|
|
2288
3386
|
}
|
|
@@ -2645,7 +3743,7 @@ function typeCheckConfig$r(untrustedConfig) {
|
|
|
2645
3743
|
config.contextAttributeTagId = untrustedConfig_contextAttributeTagId;
|
|
2646
3744
|
}
|
|
2647
3745
|
const untrustedConfig_contextAttributeTagInput = untrustedConfig.contextAttributeTagInput;
|
|
2648
|
-
const referenceContextAttributeTagInputRepresentationValidationError = validate$
|
|
3746
|
+
const referenceContextAttributeTagInputRepresentationValidationError = validate$h(untrustedConfig_contextAttributeTagInput);
|
|
2649
3747
|
if (referenceContextAttributeTagInputRepresentationValidationError === null) {
|
|
2650
3748
|
config.contextAttributeTagInput = untrustedConfig_contextAttributeTagInput;
|
|
2651
3749
|
}
|
|
@@ -2851,7 +3949,7 @@ const getContextDefinitionInfoAdapterFactory = (luvio) => function IndustriesCon
|
|
|
2851
3949
|
buildCachedSnapshotCachePolicy$7, buildNetworkSnapshotCachePolicy$7);
|
|
2852
3950
|
};
|
|
2853
3951
|
|
|
2854
|
-
function validate$
|
|
3952
|
+
function validate$g(obj, path = 'ContextNodeInputRepresentation') {
|
|
2855
3953
|
const v_error = (() => {
|
|
2856
3954
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2857
3955
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2928,7 +4026,7 @@ function validate$f(obj, path = 'ContextNodeInputRepresentation') {
|
|
|
2928
4026
|
|
|
2929
4027
|
const TTL$8 = 30000;
|
|
2930
4028
|
const VERSION$8 = "4022adb1f74fc3b3538535fc2e6861ce";
|
|
2931
|
-
function validate$
|
|
4029
|
+
function validate$f(obj, path = 'ContextNodeRepresentation') {
|
|
2932
4030
|
const v_error = (() => {
|
|
2933
4031
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2934
4032
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2942,7 +4040,7 @@ function validate$e(obj, path = 'ContextNodeRepresentation') {
|
|
|
2942
4040
|
for (let i = 0; i < obj_attributes.length; i++) {
|
|
2943
4041
|
const obj_attributes_item = obj_attributes[i];
|
|
2944
4042
|
const path_attributes_item = path_attributes + '[' + i + ']';
|
|
2945
|
-
const referencepath_attributes_itemValidationError = validate$
|
|
4043
|
+
const referencepath_attributes_itemValidationError = validate$j(obj_attributes_item, path_attributes_item);
|
|
2946
4044
|
if (referencepath_attributes_itemValidationError !== null) {
|
|
2947
4045
|
let message = 'Object doesn\'t match ContextAttributeRepresentation (at "' + path_attributes_item + '")\n';
|
|
2948
4046
|
message += referencepath_attributes_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2959,7 +4057,7 @@ function validate$e(obj, path = 'ContextNodeRepresentation') {
|
|
|
2959
4057
|
for (let i = 0; i < obj_childNodes.length; i++) {
|
|
2960
4058
|
const obj_childNodes_item = obj_childNodes[i];
|
|
2961
4059
|
const path_childNodes_item = path_childNodes + '[' + i + ']';
|
|
2962
|
-
const referencepath_childNodes_itemValidationError = validate$
|
|
4060
|
+
const referencepath_childNodes_itemValidationError = validate$f(obj_childNodes_item, path_childNodes_item);
|
|
2963
4061
|
if (referencepath_childNodes_itemValidationError !== null) {
|
|
2964
4062
|
let message = 'Object doesn\'t match ContextNodeRepresentation (at "' + path_childNodes_item + '")\n';
|
|
2965
4063
|
message += referencepath_childNodes_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -3016,7 +4114,7 @@ function validate$e(obj, path = 'ContextNodeRepresentation') {
|
|
|
3016
4114
|
for (let i = 0; i < obj_tags.length; i++) {
|
|
3017
4115
|
const obj_tags_item = obj_tags[i];
|
|
3018
4116
|
const path_tags_item = path_tags + '[' + i + ']';
|
|
3019
|
-
const referencepath_tags_itemValidationError = validate$
|
|
4117
|
+
const referencepath_tags_itemValidationError = validate$k(obj_tags_item, path_tags_item);
|
|
3020
4118
|
if (referencepath_tags_itemValidationError !== null) {
|
|
3021
4119
|
let message = 'Object doesn\'t match ContextAttributeTagRepresentation (at "' + path_tags_item + '")\n';
|
|
3022
4120
|
message += referencepath_tags_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -3056,7 +4154,7 @@ function equals$8(existing, incoming) {
|
|
|
3056
4154
|
}
|
|
3057
4155
|
const ingest$8 = function ContextNodeRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
3058
4156
|
if (process.env.NODE_ENV !== 'production') {
|
|
3059
|
-
const validateError = validate$
|
|
4157
|
+
const validateError = validate$f(input);
|
|
3060
4158
|
if (validateError !== null) {
|
|
3061
4159
|
throw validateError;
|
|
3062
4160
|
}
|
|
@@ -3151,7 +4249,7 @@ function createResourceParams$p(config) {
|
|
|
3151
4249
|
function typeCheckConfig$p(untrustedConfig) {
|
|
3152
4250
|
const config = {};
|
|
3153
4251
|
const untrustedConfig_contextNodeInput = untrustedConfig.contextNodeInput;
|
|
3154
|
-
const referenceContextNodeInputRepresentationValidationError = validate$
|
|
4252
|
+
const referenceContextNodeInputRepresentationValidationError = validate$g(untrustedConfig_contextNodeInput);
|
|
3155
4253
|
if (referenceContextNodeInputRepresentationValidationError === null) {
|
|
3156
4254
|
config.contextNodeInput = untrustedConfig_contextNodeInput;
|
|
3157
4255
|
}
|
|
@@ -3514,7 +4612,7 @@ function typeCheckConfig$m(untrustedConfig) {
|
|
|
3514
4612
|
config.contextNodeId = untrustedConfig_contextNodeId;
|
|
3515
4613
|
}
|
|
3516
4614
|
const untrustedConfig_contextNodeInput = untrustedConfig.contextNodeInput;
|
|
3517
|
-
const referenceContextNodeInputRepresentationValidationError = validate$
|
|
4615
|
+
const referenceContextNodeInputRepresentationValidationError = validate$g(untrustedConfig_contextNodeInput);
|
|
3518
4616
|
if (referenceContextNodeInputRepresentationValidationError === null) {
|
|
3519
4617
|
config.contextNodeInput = untrustedConfig_contextNodeInput;
|
|
3520
4618
|
}
|
|
@@ -3558,7 +4656,7 @@ const updateContextNodeAdapterFactory = (luvio) => {
|
|
|
3558
4656
|
};
|
|
3559
4657
|
};
|
|
3560
4658
|
|
|
3561
|
-
function validate$
|
|
4659
|
+
function validate$e(obj, path = 'ContextAttributeListInputRepresentation') {
|
|
3562
4660
|
const v_error = (() => {
|
|
3563
4661
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3564
4662
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -3581,7 +4679,7 @@ function validate$d(obj, path = 'ContextAttributeListInputRepresentation') {
|
|
|
3581
4679
|
|
|
3582
4680
|
const TTL$7 = 10000;
|
|
3583
4681
|
const VERSION$7 = "6bbfbaed88b7bd009de04a1002ab7022";
|
|
3584
|
-
function validate$
|
|
4682
|
+
function validate$d(obj, path = 'ContextAttributeListRepresentation') {
|
|
3585
4683
|
const v_error = (() => {
|
|
3586
4684
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3587
4685
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -3699,7 +4797,7 @@ function equals$7(existing, incoming) {
|
|
|
3699
4797
|
}
|
|
3700
4798
|
const ingest$7 = function ContextAttributeListRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
3701
4799
|
if (process.env.NODE_ENV !== 'production') {
|
|
3702
|
-
const validateError = validate$
|
|
4800
|
+
const validateError = validate$d(input);
|
|
3703
4801
|
if (validateError !== null) {
|
|
3704
4802
|
throw validateError;
|
|
3705
4803
|
}
|
|
@@ -3805,7 +4903,7 @@ function typeCheckConfig$l(untrustedConfig) {
|
|
|
3805
4903
|
config.contextNodeId = untrustedConfig_contextNodeId;
|
|
3806
4904
|
}
|
|
3807
4905
|
const untrustedConfig_contextAttributeListInput = untrustedConfig.contextAttributeListInput;
|
|
3808
|
-
const referenceContextAttributeListInputRepresentationValidationError = validate$
|
|
4906
|
+
const referenceContextAttributeListInputRepresentationValidationError = validate$e(untrustedConfig_contextAttributeListInput);
|
|
3809
4907
|
if (referenceContextAttributeListInputRepresentationValidationError === null) {
|
|
3810
4908
|
config.contextAttributeListInput = untrustedConfig_contextAttributeListInput;
|
|
3811
4909
|
}
|
|
@@ -3849,7 +4947,7 @@ const createContextAttributeListAdapterFactory = (luvio) => {
|
|
|
3849
4947
|
};
|
|
3850
4948
|
};
|
|
3851
4949
|
|
|
3852
|
-
function validate$
|
|
4950
|
+
function validate$c(obj, path = 'ContextDefinitionVersionInputRepresentation') {
|
|
3853
4951
|
const v_error = (() => {
|
|
3854
4952
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3855
4953
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -3912,8 +5010,38 @@ function validate$b(obj, path = 'ContextDefinitionVersionInputRepresentation') {
|
|
|
3912
5010
|
return v_error === undefined ? null : v_error;
|
|
3913
5011
|
}
|
|
3914
5012
|
|
|
5013
|
+
function validate$b(obj, path = 'MappedAttributeDataTypeInfoRepresentation') {
|
|
5014
|
+
const v_error = (() => {
|
|
5015
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
5016
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
5017
|
+
}
|
|
5018
|
+
if (obj.dataType !== undefined) {
|
|
5019
|
+
const obj_dataType = obj.dataType;
|
|
5020
|
+
const path_dataType = path + '.dataType';
|
|
5021
|
+
if (typeof obj_dataType !== 'string') {
|
|
5022
|
+
return new TypeError('Expected "string" but received "' + typeof obj_dataType + '" (at "' + path_dataType + '")');
|
|
5023
|
+
}
|
|
5024
|
+
}
|
|
5025
|
+
if (obj.supportedPicklistValues !== undefined) {
|
|
5026
|
+
const obj_supportedPicklistValues = obj.supportedPicklistValues;
|
|
5027
|
+
const path_supportedPicklistValues = path + '.supportedPicklistValues';
|
|
5028
|
+
if (!ArrayIsArray(obj_supportedPicklistValues)) {
|
|
5029
|
+
return new TypeError('Expected "array" but received "' + typeof obj_supportedPicklistValues + '" (at "' + path_supportedPicklistValues + '")');
|
|
5030
|
+
}
|
|
5031
|
+
for (let i = 0; i < obj_supportedPicklistValues.length; i++) {
|
|
5032
|
+
const obj_supportedPicklistValues_item = obj_supportedPicklistValues[i];
|
|
5033
|
+
const path_supportedPicklistValues_item = path_supportedPicklistValues + '[' + i + ']';
|
|
5034
|
+
if (typeof obj_supportedPicklistValues_item !== 'string') {
|
|
5035
|
+
return new TypeError('Expected "string" but received "' + typeof obj_supportedPicklistValues_item + '" (at "' + path_supportedPicklistValues_item + '")');
|
|
5036
|
+
}
|
|
5037
|
+
}
|
|
5038
|
+
}
|
|
5039
|
+
})();
|
|
5040
|
+
return v_error === undefined ? null : v_error;
|
|
5041
|
+
}
|
|
5042
|
+
|
|
3915
5043
|
const TTL$6 = 30000;
|
|
3916
|
-
const VERSION$6 = "
|
|
5044
|
+
const VERSION$6 = "d2590d21bfb4b591939abfe1e50521be";
|
|
3917
5045
|
function validate$a(obj, path = 'ContextAttrHydrationDetailRepresentation') {
|
|
3918
5046
|
const v_error = (() => {
|
|
3919
5047
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -3945,6 +5073,16 @@ function validate$a(obj, path = 'ContextAttrHydrationDetailRepresentation') {
|
|
|
3945
5073
|
return new TypeError('Expected "boolean" but received "' + typeof obj_isSuccess + '" (at "' + path_isSuccess + '")');
|
|
3946
5074
|
}
|
|
3947
5075
|
}
|
|
5076
|
+
if (obj.mappedAttributeDataTypeInfo !== undefined) {
|
|
5077
|
+
const obj_mappedAttributeDataTypeInfo = obj.mappedAttributeDataTypeInfo;
|
|
5078
|
+
const path_mappedAttributeDataTypeInfo = path + '.mappedAttributeDataTypeInfo';
|
|
5079
|
+
const referencepath_mappedAttributeDataTypeInfoValidationError = validate$b(obj_mappedAttributeDataTypeInfo, path_mappedAttributeDataTypeInfo);
|
|
5080
|
+
if (referencepath_mappedAttributeDataTypeInfoValidationError !== null) {
|
|
5081
|
+
let message = 'Object doesn\'t match MappedAttributeDataTypeInfoRepresentation (at "' + path_mappedAttributeDataTypeInfo + '")\n';
|
|
5082
|
+
message += referencepath_mappedAttributeDataTypeInfoValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
5083
|
+
return new TypeError(message);
|
|
5084
|
+
}
|
|
5085
|
+
}
|
|
3948
5086
|
if (obj.parentMappingAttributeId !== undefined) {
|
|
3949
5087
|
const obj_parentMappingAttributeId = obj.parentMappingAttributeId;
|
|
3950
5088
|
const path_parentMappingAttributeId = path + '.parentMappingAttributeId';
|
|
@@ -4039,7 +5177,7 @@ function getTypeCacheKeys$6(luvio, input, fullPathFactory) {
|
|
|
4039
5177
|
}
|
|
4040
5178
|
|
|
4041
5179
|
const TTL$5 = 30000;
|
|
4042
|
-
const VERSION$5 = "
|
|
5180
|
+
const VERSION$5 = "1a8ef2806a43e6f2685e46e157f53073";
|
|
4043
5181
|
function validate$9(obj, path = 'ContextAttributeMappingRepresentation') {
|
|
4044
5182
|
const v_error = (() => {
|
|
4045
5183
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -4069,11 +5207,11 @@ function validate$9(obj, path = 'ContextAttributeMappingRepresentation') {
|
|
|
4069
5207
|
if (typeof obj_contextAttributeMappingId !== 'string') {
|
|
4070
5208
|
return new TypeError('Expected "string" but received "' + typeof obj_contextAttributeMappingId + '" (at "' + path_contextAttributeMappingId + '")');
|
|
4071
5209
|
}
|
|
4072
|
-
if (obj.
|
|
4073
|
-
const
|
|
4074
|
-
const
|
|
4075
|
-
if (typeof
|
|
4076
|
-
return new TypeError('Expected "string" but received "' + typeof
|
|
5210
|
+
if (obj.contextInputAttributeName !== undefined) {
|
|
5211
|
+
const obj_contextInputAttributeName = obj.contextInputAttributeName;
|
|
5212
|
+
const path_contextInputAttributeName = path + '.contextInputAttributeName';
|
|
5213
|
+
if (typeof obj_contextInputAttributeName !== 'string') {
|
|
5214
|
+
return new TypeError('Expected "string" but received "' + typeof obj_contextInputAttributeName + '" (at "' + path_contextInputAttributeName + '")');
|
|
4077
5215
|
}
|
|
4078
5216
|
}
|
|
4079
5217
|
if (obj.isSuccess !== undefined) {
|
|
@@ -4144,7 +5282,7 @@ const select$l = function ContextAttributeMappingRepresentationSelect() {
|
|
|
4144
5282
|
kind: 'Scalar'
|
|
4145
5283
|
},
|
|
4146
5284
|
{
|
|
4147
|
-
name: '
|
|
5285
|
+
name: 'contextInputAttributeName',
|
|
4148
5286
|
kind: 'Scalar',
|
|
4149
5287
|
required: false
|
|
4150
5288
|
},
|
|
@@ -4193,16 +5331,16 @@ function equals$5(existing, incoming) {
|
|
|
4193
5331
|
if (!(existing_contextAttributeMappingId === incoming_contextAttributeMappingId)) {
|
|
4194
5332
|
return false;
|
|
4195
5333
|
}
|
|
4196
|
-
const
|
|
4197
|
-
const
|
|
5334
|
+
const existing_contextInputAttributeName = existing.contextInputAttributeName;
|
|
5335
|
+
const incoming_contextInputAttributeName = incoming.contextInputAttributeName;
|
|
4198
5336
|
// if at least one of these optionals is defined
|
|
4199
|
-
if (
|
|
5337
|
+
if (existing_contextInputAttributeName !== undefined || incoming_contextInputAttributeName !== undefined) {
|
|
4200
5338
|
// if one of these is not defined we know the other is defined and therefore
|
|
4201
5339
|
// not equal
|
|
4202
|
-
if (
|
|
5340
|
+
if (existing_contextInputAttributeName === undefined || incoming_contextInputAttributeName === undefined) {
|
|
4203
5341
|
return false;
|
|
4204
5342
|
}
|
|
4205
|
-
if (!(
|
|
5343
|
+
if (!(existing_contextInputAttributeName === incoming_contextInputAttributeName)) {
|
|
4206
5344
|
return false;
|
|
4207
5345
|
}
|
|
4208
5346
|
}
|
|
@@ -4825,7 +5963,7 @@ function validate$6(obj, path = 'ContextDefinitionVersionRepresentation') {
|
|
|
4825
5963
|
for (let i = 0; i < obj_contextNodes.length; i++) {
|
|
4826
5964
|
const obj_contextNodes_item = obj_contextNodes[i];
|
|
4827
5965
|
const path_contextNodes_item = path_contextNodes + '[' + i + ']';
|
|
4828
|
-
const referencepath_contextNodes_itemValidationError = validate$
|
|
5966
|
+
const referencepath_contextNodes_itemValidationError = validate$f(obj_contextNodes_item, path_contextNodes_item);
|
|
4829
5967
|
if (referencepath_contextNodes_itemValidationError !== null) {
|
|
4830
5968
|
let message = 'Object doesn\'t match ContextNodeRepresentation (at "' + path_contextNodes_item + '")\n';
|
|
4831
5969
|
message += referencepath_contextNodes_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -4995,7 +6133,7 @@ function createResourceParams$k(config) {
|
|
|
4995
6133
|
function typeCheckConfig$k(untrustedConfig) {
|
|
4996
6134
|
const config = {};
|
|
4997
6135
|
const untrustedConfig_contextDefinitionVersionInput = untrustedConfig.contextDefinitionVersionInput;
|
|
4998
|
-
const referenceContextDefinitionVersionInputRepresentationValidationError = validate$
|
|
6136
|
+
const referenceContextDefinitionVersionInputRepresentationValidationError = validate$c(untrustedConfig_contextDefinitionVersionInput);
|
|
4999
6137
|
if (referenceContextDefinitionVersionInputRepresentationValidationError === null) {
|
|
5000
6138
|
config.contextDefinitionVersionInput = untrustedConfig_contextDefinitionVersionInput;
|
|
5001
6139
|
}
|
|
@@ -5358,7 +6496,7 @@ function typeCheckConfig$h(untrustedConfig) {
|
|
|
5358
6496
|
config.contextDefinitionVersionId = untrustedConfig_contextDefinitionVersionId;
|
|
5359
6497
|
}
|
|
5360
6498
|
const untrustedConfig_contextDefinitionVersionInput = untrustedConfig.contextDefinitionVersionInput;
|
|
5361
|
-
const referenceContextDefinitionVersionInputRepresentationValidationError = validate$
|
|
6499
|
+
const referenceContextDefinitionVersionInputRepresentationValidationError = validate$c(untrustedConfig_contextDefinitionVersionInput);
|
|
5362
6500
|
if (referenceContextDefinitionVersionInputRepresentationValidationError === null) {
|
|
5363
6501
|
config.contextDefinitionVersionInput = untrustedConfig_contextDefinitionVersionInput;
|
|
5364
6502
|
}
|
|
@@ -6010,7 +7148,7 @@ function typeCheckConfig$e(untrustedConfig) {
|
|
|
6010
7148
|
config.contextDefinitionId = untrustedConfig_contextDefinitionId;
|
|
6011
7149
|
}
|
|
6012
7150
|
const untrustedConfig_contextDefinitionInput = untrustedConfig.contextDefinitionInput;
|
|
6013
|
-
const referenceContextDefinitionInputRepresentationValidationError = validate$
|
|
7151
|
+
const referenceContextDefinitionInputRepresentationValidationError = validate$m(untrustedConfig_contextDefinitionInput);
|
|
6014
7152
|
if (referenceContextDefinitionInputRepresentationValidationError === null) {
|
|
6015
7153
|
config.contextDefinitionInput = untrustedConfig_contextDefinitionInput;
|
|
6016
7154
|
}
|
|
@@ -6238,6 +7376,13 @@ function validate$3(obj, path = 'ContextAttributeMappingInputRepresentation') {
|
|
|
6238
7376
|
if (typeof obj_contextAttributeId !== 'string') {
|
|
6239
7377
|
return new TypeError('Expected "string" but received "' + typeof obj_contextAttributeId + '" (at "' + path_contextAttributeId + '")');
|
|
6240
7378
|
}
|
|
7379
|
+
if (obj.contextInputAttributeName !== undefined) {
|
|
7380
|
+
const obj_contextInputAttributeName = obj.contextInputAttributeName;
|
|
7381
|
+
const path_contextInputAttributeName = path + '.contextInputAttributeName';
|
|
7382
|
+
if (typeof obj_contextInputAttributeName !== 'string') {
|
|
7383
|
+
return new TypeError('Expected "string" but received "' + typeof obj_contextInputAttributeName + '" (at "' + path_contextInputAttributeName + '")');
|
|
7384
|
+
}
|
|
7385
|
+
}
|
|
6241
7386
|
if (obj.deleteExistingHydrationDetail !== undefined) {
|
|
6242
7387
|
const obj_deleteExistingHydrationDetail = obj.deleteExistingHydrationDetail;
|
|
6243
7388
|
const path_deleteExistingHydrationDetail = path + '.deleteExistingHydrationDetail';
|
|
@@ -6245,11 +7390,6 @@ function validate$3(obj, path = 'ContextAttributeMappingInputRepresentation') {
|
|
|
6245
7390
|
return new TypeError('Expected "boolean" but received "' + typeof obj_deleteExistingHydrationDetail + '" (at "' + path_deleteExistingHydrationDetail + '")');
|
|
6246
7391
|
}
|
|
6247
7392
|
}
|
|
6248
|
-
const obj_hydrationSource = obj.hydrationSource;
|
|
6249
|
-
const path_hydrationSource = path + '.hydrationSource';
|
|
6250
|
-
if (typeof obj_hydrationSource !== 'string') {
|
|
6251
|
-
return new TypeError('Expected "string" but received "' + typeof obj_hydrationSource + '" (at "' + path_hydrationSource + '")');
|
|
6252
|
-
}
|
|
6253
7393
|
if (obj.parentNodeMappingId !== undefined) {
|
|
6254
7394
|
const obj_parentNodeMappingId = obj.parentNodeMappingId;
|
|
6255
7395
|
const path_parentNodeMappingId = path + '.parentNodeMappingId';
|
|
@@ -7990,4 +9130,4 @@ const putContextServiceAccessAdapterFactory = (luvio) => {
|
|
|
7990
9130
|
};
|
|
7991
9131
|
};
|
|
7992
9132
|
|
|
7993
|
-
export { createContextAttributeAdapterFactory, createContextAttributeListAdapterFactory, createContextAttributeMappingAdapterFactory, createContextAttributeTagAdapterFactory, createContextDefinitionAdapterFactory, createContextDefinitionVersionAdapterFactory, createContextMappingAdapterFactory, createContextNodeAdapterFactory, createContextNodeMappingAdapterFactory, deleteContextAttributeAdapterFactory, deleteContextAttributeMappingAdapterFactory, deleteContextAttributeTagAdapterFactory, deleteContextDefinitionAdapterFactory, deleteContextDefinitionVersionAdapterFactory, deleteContextMappingAdapterFactory, deleteContextNodeAdapterFactory, deleteContextNodeMappingAdapterFactory, getContextAttributeAdapterFactory, getContextAttributeMappingAdapterFactory, getContextAttributeTagAdapterFactory, getContextAttributeTagsByAttributeIdAdapterFactory, getContextDefinitionAdapterFactory, getContextDefinitionInfoAdapterFactory, getContextDefinitionListAdapterFactory, getContextDefinitionVersionAdapterFactory, getContextMappingAdapterFactory, getContextNodeAdapterFactory, getContextNodeMappingAdapterFactory, getContextServiceAccessAdapterFactory, putContextServiceAccessAdapterFactory, updateContextAttributeAdapterFactory, updateContextAttributeMappingAdapterFactory, updateContextAttributeTagAdapterFactory, updateContextDefinitionAdapterFactory, updateContextDefinitionVersionAdapterFactory, updateContextMappingAdapterFactory, updateContextNodeAdapterFactory, updateContextNodeMappingAdapterFactory };
|
|
9133
|
+
export { createContextAttributeAdapterFactory, createContextAttributeListAdapterFactory, createContextAttributeMappingAdapterFactory, createContextAttributeTagAdapterFactory, createContextDefinitionAdapterFactory, createContextDefinitionVersionAdapterFactory, createContextMappingAdapterFactory, createContextNodeAdapterFactory, createContextNodeMappingAdapterFactory, deleteContextAttributeAdapterFactory, deleteContextAttributeMappingAdapterFactory, deleteContextAttributeTagAdapterFactory, deleteContextDefinitionAdapterFactory, deleteContextDefinitionVersionAdapterFactory, deleteContextMappingAdapterFactory, deleteContextNodeAdapterFactory, deleteContextNodeMappingAdapterFactory, getContextAdapterFactory, getContextAttributeAdapterFactory, getContextAttributeMappingAdapterFactory, getContextAttributeTagAdapterFactory, getContextAttributeTagsByAttributeIdAdapterFactory, getContextDefinitionAdapterFactory, getContextDefinitionInfoAdapterFactory, getContextDefinitionListAdapterFactory, getContextDefinitionVersionAdapterFactory, getContextMappingAdapterFactory, getContextNodeAdapterFactory, getContextNodeMappingAdapterFactory, getContextServiceAccessAdapterFactory, putContextServiceAccessAdapterFactory, queryContextRecordAndChildrenAdapterFactory, updateContextAttributeAdapterFactory, updateContextAttributeMappingAdapterFactory, updateContextAttributeTagAdapterFactory, updateContextDefinitionAdapterFactory, updateContextDefinitionVersionAdapterFactory, updateContextMappingAdapterFactory, updateContextNodeAdapterFactory, updateContextNodeMappingAdapterFactory };
|