@salesforce/lds-adapters-industries-context 1.103.1 → 1.105.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 +1054 -273
- package/dist/types/src/generated/adapters/createContextAttributeTag.d.ts +15 -0
- package/dist/types/src/generated/adapters/deleteContextAttributeTag.d.ts +13 -0
- package/dist/types/src/generated/adapters/getContextAttributeTag.d.ts +27 -0
- package/dist/types/src/generated/adapters/getContextAttributeTagsByAttributeId.d.ts +26 -0
- package/dist/types/src/generated/adapters/updateContextAttributeTag.d.ts +16 -0
- package/dist/types/src/generated/artifacts/main.d.ts +5 -0
- package/dist/types/src/generated/artifacts/sfdc.d.ts +9 -1
- package/dist/types/src/generated/resources/deleteConnectContextdefinitionAttributetagByContextAttributeTagId.d.ts +5 -2
- package/dist/types/src/generated/resources/getConnectContextdefinitionAttributetagByContextAttributeTagId.d.ts +16 -0
- package/dist/types/src/generated/resources/patchConnectContextdefinitionAttributetagByContextAttributeTagId.d.ts +2 -3
- package/dist/types/src/generated/resources/postConnectContextdefinitionAttributetag.d.ts +2 -3
- package/dist/types/src/generated/types/ContextAttributeTagInputRepresentation.d.ts +5 -5
- package/dist/types/src/generated/types/ContextAttributeTagInputWrapperRepresentation.d.ts +29 -0
- package/dist/types/src/generated/types/ContextAttributeTagListRepresentation.d.ts +6 -14
- package/dist/types/src/generated/types/ContextAttributeTagRepresentation.d.ts +7 -7
- package/dist/umd/es2018/industries-context.js +1058 -272
- package/dist/umd/es5/industries-context.js +1060 -272
- package/package.json +3 -3
- package/sfdc/index.js +1488 -642
- package/src/raml/api.raml +25 -2
- package/src/raml/luvio.raml +27 -0
|
@@ -66,20 +66,20 @@ function equalsArray(a, b, equalsItem) {
|
|
|
66
66
|
}
|
|
67
67
|
return true;
|
|
68
68
|
}
|
|
69
|
-
function deepFreeze$
|
|
69
|
+
function deepFreeze$9(value) {
|
|
70
70
|
// No need to freeze primitives
|
|
71
71
|
if (typeof value !== 'object' || value === null) {
|
|
72
72
|
return;
|
|
73
73
|
}
|
|
74
74
|
if (ArrayIsArray(value)) {
|
|
75
75
|
for (let i = 0, len = value.length; i < len; i += 1) {
|
|
76
|
-
deepFreeze$
|
|
76
|
+
deepFreeze$9(value[i]);
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
else {
|
|
80
80
|
const keys = ObjectKeys(value);
|
|
81
81
|
for (let i = 0, len = keys.length; i < len; i += 1) {
|
|
82
|
-
deepFreeze$
|
|
82
|
+
deepFreeze$9(value[keys[i]]);
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
ObjectFreeze(value);
|
|
@@ -90,9 +90,9 @@ function createLink(ref) {
|
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
const TTL$
|
|
94
|
-
const VERSION$
|
|
95
|
-
function validate$
|
|
93
|
+
const TTL$7 = 30000;
|
|
94
|
+
const VERSION$7 = "5ded6ac11eaf95f0422141c310d984e3";
|
|
95
|
+
function validate$g(obj, path = 'ContextDefinitionInfoRepresentation') {
|
|
96
96
|
const v_error = (() => {
|
|
97
97
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
98
98
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -129,23 +129,23 @@ function validate$e(obj, path = 'ContextDefinitionInfoRepresentation') {
|
|
|
129
129
|
})();
|
|
130
130
|
return v_error === undefined ? null : v_error;
|
|
131
131
|
}
|
|
132
|
-
const RepresentationType$
|
|
133
|
-
function keyBuilder$
|
|
134
|
-
return keyPrefix + '::' + RepresentationType$
|
|
132
|
+
const RepresentationType$7 = 'ContextDefinitionInfoRepresentation';
|
|
133
|
+
function keyBuilder$q(luvio, config) {
|
|
134
|
+
return keyPrefix + '::' + RepresentationType$7 + ':' + config.id;
|
|
135
135
|
}
|
|
136
136
|
function keyBuilderFromType$5(luvio, object) {
|
|
137
137
|
const keyParams = {
|
|
138
138
|
id: object.contextDefinitionId
|
|
139
139
|
};
|
|
140
|
-
return keyBuilder$
|
|
140
|
+
return keyBuilder$q(luvio, keyParams);
|
|
141
141
|
}
|
|
142
|
-
function normalize$
|
|
142
|
+
function normalize$7(input, existing, path, luvio, store, timestamp) {
|
|
143
143
|
return input;
|
|
144
144
|
}
|
|
145
|
-
const select$
|
|
145
|
+
const select$p = function ContextDefinitionInfoRepresentationSelect() {
|
|
146
146
|
return {
|
|
147
147
|
kind: 'Fragment',
|
|
148
|
-
version: VERSION$
|
|
148
|
+
version: VERSION$7,
|
|
149
149
|
private: [],
|
|
150
150
|
selections: [
|
|
151
151
|
{
|
|
@@ -173,7 +173,7 @@ const select$k = function ContextDefinitionInfoRepresentationSelect() {
|
|
|
173
173
|
]
|
|
174
174
|
};
|
|
175
175
|
};
|
|
176
|
-
function equals$
|
|
176
|
+
function equals$7(existing, incoming) {
|
|
177
177
|
const existing_isSuccess = existing.isSuccess;
|
|
178
178
|
const incoming_isSuccess = incoming.isSuccess;
|
|
179
179
|
// if at least one of these optionals is defined
|
|
@@ -217,51 +217,51 @@ function equals$6(existing, incoming) {
|
|
|
217
217
|
}
|
|
218
218
|
return true;
|
|
219
219
|
}
|
|
220
|
-
const ingest$
|
|
220
|
+
const ingest$7 = function ContextDefinitionInfoRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
221
221
|
if (process.env.NODE_ENV !== 'production') {
|
|
222
|
-
const validateError = validate$
|
|
222
|
+
const validateError = validate$g(input);
|
|
223
223
|
if (validateError !== null) {
|
|
224
224
|
throw validateError;
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
227
|
const key = keyBuilderFromType$5(luvio, input);
|
|
228
228
|
const existingRecord = store.readEntry(key);
|
|
229
|
-
const ttlToUse = TTL$
|
|
230
|
-
let incomingRecord = normalize$
|
|
229
|
+
const ttlToUse = TTL$7;
|
|
230
|
+
let incomingRecord = normalize$7(input, store.readEntry(key), {
|
|
231
231
|
fullPath: key,
|
|
232
232
|
parent: path.parent,
|
|
233
233
|
propertyName: path.propertyName,
|
|
234
234
|
ttl: ttlToUse
|
|
235
235
|
});
|
|
236
|
-
if (existingRecord === undefined || equals$
|
|
236
|
+
if (existingRecord === undefined || equals$7(existingRecord, incomingRecord) === false) {
|
|
237
237
|
luvio.storePublish(key, incomingRecord);
|
|
238
238
|
}
|
|
239
239
|
{
|
|
240
240
|
const storeMetadataParams = {
|
|
241
241
|
ttl: ttlToUse,
|
|
242
242
|
namespace: "IndustriesContext",
|
|
243
|
-
version: VERSION$
|
|
244
|
-
representationName: RepresentationType$
|
|
243
|
+
version: VERSION$7,
|
|
244
|
+
representationName: RepresentationType$7,
|
|
245
245
|
};
|
|
246
246
|
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
247
247
|
}
|
|
248
248
|
return createLink(key);
|
|
249
249
|
};
|
|
250
|
-
function getTypeCacheKeys$
|
|
250
|
+
function getTypeCacheKeys$7(luvio, input, fullPathFactory) {
|
|
251
251
|
const rootKeySet = new StoreKeyMap();
|
|
252
252
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
253
253
|
const rootKey = keyBuilderFromType$5(luvio, input);
|
|
254
254
|
rootKeySet.set(rootKey, {
|
|
255
255
|
namespace: keyPrefix,
|
|
256
|
-
representationName: RepresentationType$
|
|
256
|
+
representationName: RepresentationType$7,
|
|
257
257
|
mergeable: false
|
|
258
258
|
});
|
|
259
259
|
return rootKeySet;
|
|
260
260
|
}
|
|
261
261
|
|
|
262
|
-
const TTL$
|
|
263
|
-
const VERSION$
|
|
264
|
-
function validate$
|
|
262
|
+
const TTL$6 = 10000;
|
|
263
|
+
const VERSION$6 = "4eaf7936c751a49821abb04c4e57d921";
|
|
264
|
+
function validate$f(obj, path = 'ContextDefinitionListRepresentation') {
|
|
265
265
|
const v_error = (() => {
|
|
266
266
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
267
267
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -286,14 +286,14 @@ function validate$d(obj, path = 'ContextDefinitionListRepresentation') {
|
|
|
286
286
|
})();
|
|
287
287
|
return v_error === undefined ? null : v_error;
|
|
288
288
|
}
|
|
289
|
-
const RepresentationType$
|
|
290
|
-
function normalize$
|
|
289
|
+
const RepresentationType$6 = 'ContextDefinitionListRepresentation';
|
|
290
|
+
function normalize$6(input, existing, path, luvio, store, timestamp) {
|
|
291
291
|
const input_contextDefinitionList = input.contextDefinitionList;
|
|
292
292
|
const input_contextDefinitionList_id = path.fullPath + '__contextDefinitionList';
|
|
293
293
|
for (let i = 0; i < input_contextDefinitionList.length; i++) {
|
|
294
294
|
const input_contextDefinitionList_item = input_contextDefinitionList[i];
|
|
295
295
|
let input_contextDefinitionList_item_id = input_contextDefinitionList_id + '__' + i;
|
|
296
|
-
input_contextDefinitionList[i] = ingest$
|
|
296
|
+
input_contextDefinitionList[i] = ingest$7(input_contextDefinitionList_item, {
|
|
297
297
|
fullPath: input_contextDefinitionList_item_id,
|
|
298
298
|
propertyName: i,
|
|
299
299
|
parent: {
|
|
@@ -306,17 +306,17 @@ function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
|
306
306
|
}
|
|
307
307
|
return input;
|
|
308
308
|
}
|
|
309
|
-
const select$
|
|
309
|
+
const select$o = function ContextDefinitionListRepresentationSelect() {
|
|
310
310
|
return {
|
|
311
311
|
kind: 'Fragment',
|
|
312
|
-
version: VERSION$
|
|
312
|
+
version: VERSION$6,
|
|
313
313
|
private: [],
|
|
314
314
|
selections: [
|
|
315
315
|
{
|
|
316
316
|
name: 'contextDefinitionList',
|
|
317
317
|
kind: 'Link',
|
|
318
318
|
plural: true,
|
|
319
|
-
fragment: select$
|
|
319
|
+
fragment: select$p()
|
|
320
320
|
},
|
|
321
321
|
{
|
|
322
322
|
name: 'isSuccess',
|
|
@@ -325,7 +325,7 @@ const select$j = function ContextDefinitionListRepresentationSelect() {
|
|
|
325
325
|
]
|
|
326
326
|
};
|
|
327
327
|
};
|
|
328
|
-
function equals$
|
|
328
|
+
function equals$6(existing, incoming) {
|
|
329
329
|
const existing_isSuccess = existing.isSuccess;
|
|
330
330
|
const incoming_isSuccess = incoming.isSuccess;
|
|
331
331
|
if (!(existing_isSuccess === incoming_isSuccess)) {
|
|
@@ -343,68 +343,68 @@ function equals$5(existing, incoming) {
|
|
|
343
343
|
}
|
|
344
344
|
return true;
|
|
345
345
|
}
|
|
346
|
-
const ingest$
|
|
346
|
+
const ingest$6 = function ContextDefinitionListRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
347
347
|
if (process.env.NODE_ENV !== 'production') {
|
|
348
|
-
const validateError = validate$
|
|
348
|
+
const validateError = validate$f(input);
|
|
349
349
|
if (validateError !== null) {
|
|
350
350
|
throw validateError;
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
353
|
const key = path.fullPath;
|
|
354
354
|
const existingRecord = store.readEntry(key);
|
|
355
|
-
const ttlToUse = TTL$
|
|
356
|
-
let incomingRecord = normalize$
|
|
355
|
+
const ttlToUse = TTL$6;
|
|
356
|
+
let incomingRecord = normalize$6(input, store.readEntry(key), {
|
|
357
357
|
fullPath: key,
|
|
358
358
|
parent: path.parent,
|
|
359
359
|
propertyName: path.propertyName,
|
|
360
360
|
ttl: ttlToUse
|
|
361
361
|
}, luvio, store);
|
|
362
|
-
if (existingRecord === undefined || equals$
|
|
362
|
+
if (existingRecord === undefined || equals$6(existingRecord, incomingRecord) === false) {
|
|
363
363
|
luvio.storePublish(key, incomingRecord);
|
|
364
364
|
}
|
|
365
365
|
{
|
|
366
366
|
const storeMetadataParams = {
|
|
367
367
|
ttl: ttlToUse,
|
|
368
368
|
namespace: "IndustriesContext",
|
|
369
|
-
version: VERSION$
|
|
370
|
-
representationName: RepresentationType$
|
|
369
|
+
version: VERSION$6,
|
|
370
|
+
representationName: RepresentationType$6,
|
|
371
371
|
};
|
|
372
372
|
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
373
373
|
}
|
|
374
374
|
return createLink(key);
|
|
375
375
|
};
|
|
376
|
-
function getTypeCacheKeys$
|
|
376
|
+
function getTypeCacheKeys$6(luvio, input, fullPathFactory) {
|
|
377
377
|
const rootKeySet = new StoreKeyMap();
|
|
378
378
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
379
379
|
const rootKey = fullPathFactory();
|
|
380
380
|
rootKeySet.set(rootKey, {
|
|
381
381
|
namespace: keyPrefix,
|
|
382
|
-
representationName: RepresentationType$
|
|
382
|
+
representationName: RepresentationType$6,
|
|
383
383
|
mergeable: false
|
|
384
384
|
});
|
|
385
385
|
const input_contextDefinitionList_length = input.contextDefinitionList.length;
|
|
386
386
|
for (let i = 0; i < input_contextDefinitionList_length; i++) {
|
|
387
|
-
rootKeySet.merge(getTypeCacheKeys$
|
|
387
|
+
rootKeySet.merge(getTypeCacheKeys$7(luvio, input.contextDefinitionList[i]));
|
|
388
388
|
}
|
|
389
389
|
return rootKeySet;
|
|
390
390
|
}
|
|
391
391
|
|
|
392
|
-
function select$
|
|
393
|
-
return select$
|
|
392
|
+
function select$n(luvio, params) {
|
|
393
|
+
return select$o();
|
|
394
394
|
}
|
|
395
|
-
function keyBuilder$
|
|
395
|
+
function keyBuilder$p(luvio, params) {
|
|
396
396
|
return keyPrefix + '::ContextDefinitionListRepresentation:(' + ')';
|
|
397
397
|
}
|
|
398
|
-
function getResponseCacheKeys$
|
|
399
|
-
return getTypeCacheKeys$
|
|
398
|
+
function getResponseCacheKeys$m(luvio, resourceParams, response) {
|
|
399
|
+
return getTypeCacheKeys$6(luvio, response, () => keyBuilder$p());
|
|
400
400
|
}
|
|
401
|
-
function ingestSuccess$
|
|
401
|
+
function ingestSuccess$h(luvio, resourceParams, response, snapshotRefresh) {
|
|
402
402
|
const { body } = response;
|
|
403
|
-
const key = keyBuilder$
|
|
404
|
-
luvio.storeIngest(key, ingest$
|
|
403
|
+
const key = keyBuilder$p();
|
|
404
|
+
luvio.storeIngest(key, ingest$6, body);
|
|
405
405
|
const snapshot = luvio.storeLookup({
|
|
406
406
|
recordId: key,
|
|
407
|
-
node: select$
|
|
407
|
+
node: select$n(),
|
|
408
408
|
variables: {},
|
|
409
409
|
}, snapshotRefresh);
|
|
410
410
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -414,19 +414,19 @@ function ingestSuccess$d(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
414
414
|
}
|
|
415
415
|
return snapshot;
|
|
416
416
|
}
|
|
417
|
-
function ingestError$
|
|
418
|
-
const key = keyBuilder$
|
|
417
|
+
function ingestError$7(luvio, params, error, snapshotRefresh) {
|
|
418
|
+
const key = keyBuilder$p();
|
|
419
419
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
420
420
|
const storeMetadataParams = {
|
|
421
|
-
ttl: TTL$
|
|
421
|
+
ttl: TTL$6,
|
|
422
422
|
namespace: keyPrefix,
|
|
423
|
-
version: VERSION$
|
|
424
|
-
representationName: RepresentationType$
|
|
423
|
+
version: VERSION$6,
|
|
424
|
+
representationName: RepresentationType$6
|
|
425
425
|
};
|
|
426
426
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
427
427
|
return errorSnapshot;
|
|
428
428
|
}
|
|
429
|
-
function createResourceRequest$
|
|
429
|
+
function createResourceRequest$m(config) {
|
|
430
430
|
const headers = {};
|
|
431
431
|
return {
|
|
432
432
|
baseUri: '/services/data/v58.0',
|
|
@@ -447,58 +447,58 @@ const getContextDefinitionList_ConfigPropertyNames = {
|
|
|
447
447
|
optional: []
|
|
448
448
|
}
|
|
449
449
|
};
|
|
450
|
-
function createResourceParams$
|
|
450
|
+
function createResourceParams$m(config) {
|
|
451
451
|
const resourceParams = {};
|
|
452
452
|
return resourceParams;
|
|
453
453
|
}
|
|
454
|
-
function keyBuilder$
|
|
455
|
-
return keyBuilder$
|
|
454
|
+
function keyBuilder$o(luvio, config) {
|
|
455
|
+
return keyBuilder$p();
|
|
456
456
|
}
|
|
457
|
-
function typeCheckConfig$
|
|
457
|
+
function typeCheckConfig$m(untrustedConfig) {
|
|
458
458
|
const config = {};
|
|
459
459
|
return config;
|
|
460
460
|
}
|
|
461
|
-
function validateAdapterConfig$
|
|
461
|
+
function validateAdapterConfig$m(untrustedConfig, configPropertyNames) {
|
|
462
462
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
463
463
|
return null;
|
|
464
464
|
}
|
|
465
465
|
if (process.env.NODE_ENV !== 'production') {
|
|
466
466
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
467
467
|
}
|
|
468
|
-
const config = typeCheckConfig$
|
|
468
|
+
const config = typeCheckConfig$m();
|
|
469
469
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
470
470
|
return null;
|
|
471
471
|
}
|
|
472
472
|
return config;
|
|
473
473
|
}
|
|
474
|
-
function adapterFragment$
|
|
475
|
-
return select$
|
|
474
|
+
function adapterFragment$7(luvio, config) {
|
|
475
|
+
return select$n();
|
|
476
476
|
}
|
|
477
|
-
function onFetchResponseSuccess$
|
|
478
|
-
const snapshot = ingestSuccess$
|
|
477
|
+
function onFetchResponseSuccess$7(luvio, config, resourceParams, response) {
|
|
478
|
+
const snapshot = ingestSuccess$h(luvio, resourceParams, response, {
|
|
479
479
|
config,
|
|
480
|
-
resolve: () => buildNetworkSnapshot$
|
|
480
|
+
resolve: () => buildNetworkSnapshot$m(luvio, config, snapshotRefreshOptions)
|
|
481
481
|
});
|
|
482
482
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
483
483
|
}
|
|
484
|
-
function onFetchResponseError$
|
|
485
|
-
const snapshot = ingestError$
|
|
484
|
+
function onFetchResponseError$7(luvio, config, resourceParams, response) {
|
|
485
|
+
const snapshot = ingestError$7(luvio, resourceParams, response, {
|
|
486
486
|
config,
|
|
487
|
-
resolve: () => buildNetworkSnapshot$
|
|
487
|
+
resolve: () => buildNetworkSnapshot$m(luvio, config, snapshotRefreshOptions)
|
|
488
488
|
});
|
|
489
489
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
490
490
|
}
|
|
491
|
-
function buildNetworkSnapshot$
|
|
492
|
-
const resourceParams = createResourceParams$
|
|
493
|
-
const request = createResourceRequest$
|
|
491
|
+
function buildNetworkSnapshot$m(luvio, config, options) {
|
|
492
|
+
const resourceParams = createResourceParams$m();
|
|
493
|
+
const request = createResourceRequest$m();
|
|
494
494
|
return luvio.dispatchResourceRequest(request, options)
|
|
495
495
|
.then((response) => {
|
|
496
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
496
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$7(luvio, config, resourceParams, response), () => getResponseCacheKeys$m(luvio, resourceParams, response.body));
|
|
497
497
|
}, (response) => {
|
|
498
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
498
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$7(luvio, config, resourceParams, response));
|
|
499
499
|
});
|
|
500
500
|
}
|
|
501
|
-
function buildNetworkSnapshotCachePolicy$
|
|
501
|
+
function buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext) {
|
|
502
502
|
const { luvio, config } = context;
|
|
503
503
|
const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
|
|
504
504
|
const dispatchOptions = {
|
|
@@ -513,32 +513,32 @@ function buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext
|
|
|
513
513
|
priority: networkPriority
|
|
514
514
|
};
|
|
515
515
|
}
|
|
516
|
-
return buildNetworkSnapshot$
|
|
516
|
+
return buildNetworkSnapshot$m(luvio, config, dispatchOptions);
|
|
517
517
|
}
|
|
518
|
-
function buildCachedSnapshotCachePolicy$
|
|
518
|
+
function buildCachedSnapshotCachePolicy$7(context, storeLookup) {
|
|
519
519
|
const { luvio, config } = context;
|
|
520
520
|
const selector = {
|
|
521
|
-
recordId: keyBuilder$
|
|
522
|
-
node: adapterFragment$
|
|
521
|
+
recordId: keyBuilder$o(),
|
|
522
|
+
node: adapterFragment$7(),
|
|
523
523
|
variables: {},
|
|
524
524
|
};
|
|
525
525
|
const cacheSnapshot = storeLookup(selector, {
|
|
526
526
|
config,
|
|
527
|
-
resolve: () => buildNetworkSnapshot$
|
|
527
|
+
resolve: () => buildNetworkSnapshot$m(luvio, config, snapshotRefreshOptions)
|
|
528
528
|
});
|
|
529
529
|
return cacheSnapshot;
|
|
530
530
|
}
|
|
531
531
|
const getContextDefinitionListAdapterFactory = (luvio) => function IndustriesContext__getContextDefinitionList(untrustedConfig, requestContext) {
|
|
532
|
-
const config = validateAdapterConfig$
|
|
532
|
+
const config = validateAdapterConfig$m(untrustedConfig, getContextDefinitionList_ConfigPropertyNames);
|
|
533
533
|
// Invalid or incomplete config
|
|
534
534
|
if (config === null) {
|
|
535
535
|
return null;
|
|
536
536
|
}
|
|
537
537
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
538
|
-
buildCachedSnapshotCachePolicy$
|
|
538
|
+
buildCachedSnapshotCachePolicy$7, buildNetworkSnapshotCachePolicy$7);
|
|
539
539
|
};
|
|
540
540
|
|
|
541
|
-
function validate$
|
|
541
|
+
function validate$e(obj, path = 'ContextDefinitionInputRepresentation') {
|
|
542
542
|
const v_error = (() => {
|
|
543
543
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
544
544
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -568,19 +568,19 @@ function validate$c(obj, path = 'ContextDefinitionInputRepresentation') {
|
|
|
568
568
|
return v_error === undefined ? null : v_error;
|
|
569
569
|
}
|
|
570
570
|
|
|
571
|
-
function select$
|
|
572
|
-
return select$
|
|
571
|
+
function select$m(luvio, params) {
|
|
572
|
+
return select$p();
|
|
573
573
|
}
|
|
574
|
-
function getResponseCacheKeys$
|
|
575
|
-
return getTypeCacheKeys$
|
|
574
|
+
function getResponseCacheKeys$l(luvio, resourceParams, response) {
|
|
575
|
+
return getTypeCacheKeys$7(luvio, response);
|
|
576
576
|
}
|
|
577
|
-
function ingestSuccess$
|
|
577
|
+
function ingestSuccess$g(luvio, resourceParams, response) {
|
|
578
578
|
const { body } = response;
|
|
579
579
|
const key = keyBuilderFromType$5(luvio, body);
|
|
580
|
-
luvio.storeIngest(key, ingest$
|
|
580
|
+
luvio.storeIngest(key, ingest$7, body);
|
|
581
581
|
const snapshot = luvio.storeLookup({
|
|
582
582
|
recordId: key,
|
|
583
|
-
node: select$
|
|
583
|
+
node: select$m(),
|
|
584
584
|
variables: {},
|
|
585
585
|
});
|
|
586
586
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -590,7 +590,7 @@ function ingestSuccess$c(luvio, resourceParams, response) {
|
|
|
590
590
|
}
|
|
591
591
|
return snapshot;
|
|
592
592
|
}
|
|
593
|
-
function createResourceRequest$
|
|
593
|
+
function createResourceRequest$l(config) {
|
|
594
594
|
const headers = {};
|
|
595
595
|
return {
|
|
596
596
|
baseUri: '/services/data/v58.0',
|
|
@@ -611,7 +611,7 @@ const createContextDefinition_ConfigPropertyNames = {
|
|
|
611
611
|
optional: []
|
|
612
612
|
}
|
|
613
613
|
};
|
|
614
|
-
function createResourceParams$
|
|
614
|
+
function createResourceParams$l(config) {
|
|
615
615
|
const resourceParams = {
|
|
616
616
|
body: {
|
|
617
617
|
contextDefinitionInput: config.contextDefinitionInput
|
|
@@ -619,54 +619,54 @@ function createResourceParams$g(config) {
|
|
|
619
619
|
};
|
|
620
620
|
return resourceParams;
|
|
621
621
|
}
|
|
622
|
-
function typeCheckConfig$
|
|
622
|
+
function typeCheckConfig$l(untrustedConfig) {
|
|
623
623
|
const config = {};
|
|
624
624
|
const untrustedConfig_contextDefinitionInput = untrustedConfig.contextDefinitionInput;
|
|
625
|
-
const referenceContextDefinitionInputRepresentationValidationError = validate$
|
|
625
|
+
const referenceContextDefinitionInputRepresentationValidationError = validate$e(untrustedConfig_contextDefinitionInput);
|
|
626
626
|
if (referenceContextDefinitionInputRepresentationValidationError === null) {
|
|
627
627
|
config.contextDefinitionInput = untrustedConfig_contextDefinitionInput;
|
|
628
628
|
}
|
|
629
629
|
return config;
|
|
630
630
|
}
|
|
631
|
-
function validateAdapterConfig$
|
|
631
|
+
function validateAdapterConfig$l(untrustedConfig, configPropertyNames) {
|
|
632
632
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
633
633
|
return null;
|
|
634
634
|
}
|
|
635
635
|
if (process.env.NODE_ENV !== 'production') {
|
|
636
636
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
637
637
|
}
|
|
638
|
-
const config = typeCheckConfig$
|
|
638
|
+
const config = typeCheckConfig$l(untrustedConfig);
|
|
639
639
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
640
640
|
return null;
|
|
641
641
|
}
|
|
642
642
|
return config;
|
|
643
643
|
}
|
|
644
|
-
function buildNetworkSnapshot$
|
|
645
|
-
const resourceParams = createResourceParams$
|
|
646
|
-
const request = createResourceRequest$
|
|
644
|
+
function buildNetworkSnapshot$l(luvio, config, options) {
|
|
645
|
+
const resourceParams = createResourceParams$l(config);
|
|
646
|
+
const request = createResourceRequest$l(resourceParams);
|
|
647
647
|
return luvio.dispatchResourceRequest(request, options)
|
|
648
648
|
.then((response) => {
|
|
649
649
|
return luvio.handleSuccessResponse(() => {
|
|
650
|
-
const snapshot = ingestSuccess$
|
|
650
|
+
const snapshot = ingestSuccess$g(luvio, resourceParams, response);
|
|
651
651
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
652
|
-
}, () => getResponseCacheKeys$
|
|
652
|
+
}, () => getResponseCacheKeys$l(luvio, resourceParams, response.body));
|
|
653
653
|
}, (response) => {
|
|
654
|
-
deepFreeze$
|
|
654
|
+
deepFreeze$9(response);
|
|
655
655
|
throw response;
|
|
656
656
|
});
|
|
657
657
|
}
|
|
658
658
|
const createContextDefinitionAdapterFactory = (luvio) => {
|
|
659
659
|
return function createContextDefinition(untrustedConfig) {
|
|
660
|
-
const config = validateAdapterConfig$
|
|
660
|
+
const config = validateAdapterConfig$l(untrustedConfig, createContextDefinition_ConfigPropertyNames);
|
|
661
661
|
// Invalid or incomplete config
|
|
662
662
|
if (config === null) {
|
|
663
663
|
throw new Error('Invalid config for "createContextDefinition"');
|
|
664
664
|
}
|
|
665
|
-
return buildNetworkSnapshot$
|
|
665
|
+
return buildNetworkSnapshot$l(luvio, config);
|
|
666
666
|
};
|
|
667
667
|
};
|
|
668
668
|
|
|
669
|
-
function validate$
|
|
669
|
+
function validate$d(obj, path = 'ContextAttributeInputRepresentation') {
|
|
670
670
|
const v_error = (() => {
|
|
671
671
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
672
672
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -738,32 +738,38 @@ function validate$b(obj, path = 'ContextAttributeInputRepresentation') {
|
|
|
738
738
|
return v_error === undefined ? null : v_error;
|
|
739
739
|
}
|
|
740
740
|
|
|
741
|
-
const TTL$
|
|
742
|
-
const VERSION$
|
|
743
|
-
function validate$
|
|
741
|
+
const TTL$5 = 30000;
|
|
742
|
+
const VERSION$5 = "6cc8b3ef582709be7344b57cb6370543";
|
|
743
|
+
function validate$c(obj, path = 'ContextAttributeTagRepresentation') {
|
|
744
744
|
const v_error = (() => {
|
|
745
745
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
746
746
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
747
747
|
}
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
748
|
+
if (obj.contextAttributeId !== undefined) {
|
|
749
|
+
const obj_contextAttributeId = obj.contextAttributeId;
|
|
750
|
+
const path_contextAttributeId = path + '.contextAttributeId';
|
|
751
|
+
if (typeof obj_contextAttributeId !== 'string') {
|
|
752
|
+
return new TypeError('Expected "string" but received "' + typeof obj_contextAttributeId + '" (at "' + path_contextAttributeId + '")');
|
|
753
|
+
}
|
|
752
754
|
}
|
|
753
755
|
const obj_contextAttributeTagId = obj.contextAttributeTagId;
|
|
754
756
|
const path_contextAttributeTagId = path + '.contextAttributeTagId';
|
|
755
757
|
if (typeof obj_contextAttributeTagId !== 'string') {
|
|
756
758
|
return new TypeError('Expected "string" but received "' + typeof obj_contextAttributeTagId + '" (at "' + path_contextAttributeTagId + '")');
|
|
757
759
|
}
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
760
|
+
if (obj.contextNodeId !== undefined) {
|
|
761
|
+
const obj_contextNodeId = obj.contextNodeId;
|
|
762
|
+
const path_contextNodeId = path + '.contextNodeId';
|
|
763
|
+
if (typeof obj_contextNodeId !== 'string') {
|
|
764
|
+
return new TypeError('Expected "string" but received "' + typeof obj_contextNodeId + '" (at "' + path_contextNodeId + '")');
|
|
765
|
+
}
|
|
762
766
|
}
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
+
if (obj.isSuccess !== undefined) {
|
|
768
|
+
const obj_isSuccess = obj.isSuccess;
|
|
769
|
+
const path_isSuccess = path + '.isSuccess';
|
|
770
|
+
if (typeof obj_isSuccess !== 'boolean') {
|
|
771
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isSuccess + '" (at "' + path_isSuccess + '")');
|
|
772
|
+
}
|
|
767
773
|
}
|
|
768
774
|
const obj_name = obj.name;
|
|
769
775
|
const path_name = path + '.name';
|
|
@@ -773,28 +779,29 @@ function validate$a(obj, path = 'ContextAttributeTagRepresentation') {
|
|
|
773
779
|
})();
|
|
774
780
|
return v_error === undefined ? null : v_error;
|
|
775
781
|
}
|
|
776
|
-
const RepresentationType$
|
|
777
|
-
function keyBuilder$
|
|
778
|
-
return keyPrefix + '::' + RepresentationType$
|
|
782
|
+
const RepresentationType$5 = 'ContextAttributeTagRepresentation';
|
|
783
|
+
function keyBuilder$n(luvio, config) {
|
|
784
|
+
return keyPrefix + '::' + RepresentationType$5 + ':' + config.id;
|
|
779
785
|
}
|
|
780
786
|
function keyBuilderFromType$4(luvio, object) {
|
|
781
787
|
const keyParams = {
|
|
782
788
|
id: object.contextAttributeTagId
|
|
783
789
|
};
|
|
784
|
-
return keyBuilder$
|
|
790
|
+
return keyBuilder$n(luvio, keyParams);
|
|
785
791
|
}
|
|
786
|
-
function normalize$
|
|
792
|
+
function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
787
793
|
return input;
|
|
788
794
|
}
|
|
789
|
-
const select$
|
|
795
|
+
const select$l = function ContextAttributeTagRepresentationSelect() {
|
|
790
796
|
return {
|
|
791
797
|
kind: 'Fragment',
|
|
792
|
-
version: VERSION$
|
|
798
|
+
version: VERSION$5,
|
|
793
799
|
private: [],
|
|
794
800
|
selections: [
|
|
795
801
|
{
|
|
796
802
|
name: 'contextAttributeId',
|
|
797
|
-
kind: 'Scalar'
|
|
803
|
+
kind: 'Scalar',
|
|
804
|
+
required: false
|
|
798
805
|
},
|
|
799
806
|
{
|
|
800
807
|
name: 'contextAttributeTagId',
|
|
@@ -802,11 +809,13 @@ const select$g = function ContextAttributeTagRepresentationSelect() {
|
|
|
802
809
|
},
|
|
803
810
|
{
|
|
804
811
|
name: 'contextNodeId',
|
|
805
|
-
kind: 'Scalar'
|
|
812
|
+
kind: 'Scalar',
|
|
813
|
+
required: false
|
|
806
814
|
},
|
|
807
815
|
{
|
|
808
816
|
name: 'isSuccess',
|
|
809
|
-
kind: 'Scalar'
|
|
817
|
+
kind: 'Scalar',
|
|
818
|
+
required: false
|
|
810
819
|
},
|
|
811
820
|
{
|
|
812
821
|
name: 'name',
|
|
@@ -815,16 +824,32 @@ const select$g = function ContextAttributeTagRepresentationSelect() {
|
|
|
815
824
|
]
|
|
816
825
|
};
|
|
817
826
|
};
|
|
818
|
-
function equals$
|
|
827
|
+
function equals$5(existing, incoming) {
|
|
819
828
|
const existing_isSuccess = existing.isSuccess;
|
|
820
829
|
const incoming_isSuccess = incoming.isSuccess;
|
|
821
|
-
if
|
|
822
|
-
|
|
830
|
+
// if at least one of these optionals is defined
|
|
831
|
+
if (existing_isSuccess !== undefined || incoming_isSuccess !== undefined) {
|
|
832
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
833
|
+
// not equal
|
|
834
|
+
if (existing_isSuccess === undefined || incoming_isSuccess === undefined) {
|
|
835
|
+
return false;
|
|
836
|
+
}
|
|
837
|
+
if (!(existing_isSuccess === incoming_isSuccess)) {
|
|
838
|
+
return false;
|
|
839
|
+
}
|
|
823
840
|
}
|
|
824
841
|
const existing_contextAttributeId = existing.contextAttributeId;
|
|
825
842
|
const incoming_contextAttributeId = incoming.contextAttributeId;
|
|
826
|
-
if
|
|
827
|
-
|
|
843
|
+
// if at least one of these optionals is defined
|
|
844
|
+
if (existing_contextAttributeId !== undefined || incoming_contextAttributeId !== undefined) {
|
|
845
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
846
|
+
// not equal
|
|
847
|
+
if (existing_contextAttributeId === undefined || incoming_contextAttributeId === undefined) {
|
|
848
|
+
return false;
|
|
849
|
+
}
|
|
850
|
+
if (!(existing_contextAttributeId === incoming_contextAttributeId)) {
|
|
851
|
+
return false;
|
|
852
|
+
}
|
|
828
853
|
}
|
|
829
854
|
const existing_contextAttributeTagId = existing.contextAttributeTagId;
|
|
830
855
|
const incoming_contextAttributeTagId = incoming.contextAttributeTagId;
|
|
@@ -833,8 +858,16 @@ function equals$4(existing, incoming) {
|
|
|
833
858
|
}
|
|
834
859
|
const existing_contextNodeId = existing.contextNodeId;
|
|
835
860
|
const incoming_contextNodeId = incoming.contextNodeId;
|
|
836
|
-
if
|
|
837
|
-
|
|
861
|
+
// if at least one of these optionals is defined
|
|
862
|
+
if (existing_contextNodeId !== undefined || incoming_contextNodeId !== undefined) {
|
|
863
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
864
|
+
// not equal
|
|
865
|
+
if (existing_contextNodeId === undefined || incoming_contextNodeId === undefined) {
|
|
866
|
+
return false;
|
|
867
|
+
}
|
|
868
|
+
if (!(existing_contextNodeId === incoming_contextNodeId)) {
|
|
869
|
+
return false;
|
|
870
|
+
}
|
|
838
871
|
}
|
|
839
872
|
const existing_name = existing.name;
|
|
840
873
|
const incoming_name = incoming.name;
|
|
@@ -843,54 +876,54 @@ function equals$4(existing, incoming) {
|
|
|
843
876
|
}
|
|
844
877
|
return true;
|
|
845
878
|
}
|
|
846
|
-
function deepFreeze$
|
|
879
|
+
function deepFreeze$8(input) {
|
|
847
880
|
ObjectFreeze(input);
|
|
848
881
|
}
|
|
849
|
-
const ingest$
|
|
882
|
+
const ingest$5 = function ContextAttributeTagRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
850
883
|
if (process.env.NODE_ENV !== 'production') {
|
|
851
|
-
const validateError = validate$
|
|
884
|
+
const validateError = validate$c(input);
|
|
852
885
|
if (validateError !== null) {
|
|
853
886
|
throw validateError;
|
|
854
887
|
}
|
|
855
888
|
}
|
|
856
889
|
const key = keyBuilderFromType$4(luvio, input);
|
|
857
890
|
const existingRecord = store.readEntry(key);
|
|
858
|
-
const ttlToUse = TTL$
|
|
859
|
-
let incomingRecord = normalize$
|
|
891
|
+
const ttlToUse = TTL$5;
|
|
892
|
+
let incomingRecord = normalize$5(input, store.readEntry(key), {
|
|
860
893
|
fullPath: key,
|
|
861
894
|
parent: path.parent,
|
|
862
895
|
propertyName: path.propertyName,
|
|
863
896
|
ttl: ttlToUse
|
|
864
897
|
});
|
|
865
|
-
if (existingRecord === undefined || equals$
|
|
898
|
+
if (existingRecord === undefined || equals$5(existingRecord, incomingRecord) === false) {
|
|
866
899
|
luvio.storePublish(key, incomingRecord);
|
|
867
900
|
}
|
|
868
901
|
{
|
|
869
902
|
const storeMetadataParams = {
|
|
870
903
|
ttl: ttlToUse,
|
|
871
904
|
namespace: "IndustriesContext",
|
|
872
|
-
version: VERSION$
|
|
873
|
-
representationName: RepresentationType$
|
|
905
|
+
version: VERSION$5,
|
|
906
|
+
representationName: RepresentationType$5,
|
|
874
907
|
};
|
|
875
908
|
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
876
909
|
}
|
|
877
910
|
return createLink(key);
|
|
878
911
|
};
|
|
879
|
-
function getTypeCacheKeys$
|
|
912
|
+
function getTypeCacheKeys$5(luvio, input, fullPathFactory) {
|
|
880
913
|
const rootKeySet = new StoreKeyMap();
|
|
881
914
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
882
915
|
const rootKey = keyBuilderFromType$4(luvio, input);
|
|
883
916
|
rootKeySet.set(rootKey, {
|
|
884
917
|
namespace: keyPrefix,
|
|
885
|
-
representationName: RepresentationType$
|
|
918
|
+
representationName: RepresentationType$5,
|
|
886
919
|
mergeable: false
|
|
887
920
|
});
|
|
888
921
|
return rootKeySet;
|
|
889
922
|
}
|
|
890
923
|
|
|
891
|
-
const TTL$
|
|
892
|
-
const VERSION$
|
|
893
|
-
function validate$
|
|
924
|
+
const TTL$4 = 30000;
|
|
925
|
+
const VERSION$4 = "07b953190ccdfc99b3c6245b4ab37939";
|
|
926
|
+
function validate$b(obj, path = 'ContextAttributeRepresentation') {
|
|
894
927
|
const v_error = (() => {
|
|
895
928
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
896
929
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -961,23 +994,23 @@ function validate$9(obj, path = 'ContextAttributeRepresentation') {
|
|
|
961
994
|
})();
|
|
962
995
|
return v_error === undefined ? null : v_error;
|
|
963
996
|
}
|
|
964
|
-
const RepresentationType$
|
|
965
|
-
function keyBuilder$
|
|
966
|
-
return keyPrefix + '::' + RepresentationType$
|
|
997
|
+
const RepresentationType$4 = 'ContextAttributeRepresentation';
|
|
998
|
+
function keyBuilder$m(luvio, config) {
|
|
999
|
+
return keyPrefix + '::' + RepresentationType$4 + ':' + config.id;
|
|
967
1000
|
}
|
|
968
1001
|
function keyBuilderFromType$3(luvio, object) {
|
|
969
1002
|
const keyParams = {
|
|
970
1003
|
id: object.contextAttributeId
|
|
971
1004
|
};
|
|
972
|
-
return keyBuilder$
|
|
1005
|
+
return keyBuilder$m(luvio, keyParams);
|
|
973
1006
|
}
|
|
974
|
-
function normalize$
|
|
1007
|
+
function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
975
1008
|
const input_attributeTags = input.attributeTags;
|
|
976
1009
|
const input_attributeTags_id = path.fullPath + '__attributeTags';
|
|
977
1010
|
for (let i = 0; i < input_attributeTags.length; i++) {
|
|
978
1011
|
const input_attributeTags_item = input_attributeTags[i];
|
|
979
1012
|
let input_attributeTags_item_id = input_attributeTags_id + '__' + i;
|
|
980
|
-
input_attributeTags[i] = ingest$
|
|
1013
|
+
input_attributeTags[i] = ingest$5(input_attributeTags_item, {
|
|
981
1014
|
fullPath: input_attributeTags_item_id,
|
|
982
1015
|
propertyName: i,
|
|
983
1016
|
parent: {
|
|
@@ -990,17 +1023,17 @@ function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
|
990
1023
|
}
|
|
991
1024
|
return input;
|
|
992
1025
|
}
|
|
993
|
-
const select$
|
|
1026
|
+
const select$k = function ContextAttributeRepresentationSelect() {
|
|
994
1027
|
return {
|
|
995
1028
|
kind: 'Fragment',
|
|
996
|
-
version: VERSION$
|
|
1029
|
+
version: VERSION$4,
|
|
997
1030
|
private: [],
|
|
998
1031
|
selections: [
|
|
999
1032
|
{
|
|
1000
1033
|
name: 'attributeTags',
|
|
1001
1034
|
kind: 'Link',
|
|
1002
1035
|
plural: true,
|
|
1003
|
-
fragment: select$
|
|
1036
|
+
fragment: select$l()
|
|
1004
1037
|
},
|
|
1005
1038
|
{
|
|
1006
1039
|
name: 'contextAttributeId',
|
|
@@ -1044,7 +1077,7 @@ const select$f = function ContextAttributeRepresentationSelect() {
|
|
|
1044
1077
|
]
|
|
1045
1078
|
};
|
|
1046
1079
|
};
|
|
1047
|
-
function equals$
|
|
1080
|
+
function equals$4(existing, incoming) {
|
|
1048
1081
|
const existing_isFinal = existing.isFinal;
|
|
1049
1082
|
const incoming_isFinal = incoming.isFinal;
|
|
1050
1083
|
if (!(existing_isFinal === incoming_isFinal)) {
|
|
@@ -1120,8 +1153,572 @@ function equals$3(existing, incoming) {
|
|
|
1120
1153
|
if (!(existing_attributeTags_item.__ref === incoming_attributeTags_item.__ref)) {
|
|
1121
1154
|
return false;
|
|
1122
1155
|
}
|
|
1123
|
-
});
|
|
1124
|
-
if (equals_attributeTags_items === false) {
|
|
1156
|
+
});
|
|
1157
|
+
if (equals_attributeTags_items === false) {
|
|
1158
|
+
return false;
|
|
1159
|
+
}
|
|
1160
|
+
return true;
|
|
1161
|
+
}
|
|
1162
|
+
function deepFreeze$7(input) {
|
|
1163
|
+
const input_attributeTags = input.attributeTags;
|
|
1164
|
+
for (let i = 0; i < input_attributeTags.length; i++) {
|
|
1165
|
+
const input_attributeTags_item = input_attributeTags[i];
|
|
1166
|
+
deepFreeze$8(input_attributeTags_item);
|
|
1167
|
+
}
|
|
1168
|
+
ObjectFreeze(input_attributeTags);
|
|
1169
|
+
ObjectFreeze(input);
|
|
1170
|
+
}
|
|
1171
|
+
const ingest$4 = function ContextAttributeRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1172
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1173
|
+
const validateError = validate$b(input);
|
|
1174
|
+
if (validateError !== null) {
|
|
1175
|
+
throw validateError;
|
|
1176
|
+
}
|
|
1177
|
+
}
|
|
1178
|
+
const key = keyBuilderFromType$3(luvio, input);
|
|
1179
|
+
const existingRecord = store.readEntry(key);
|
|
1180
|
+
const ttlToUse = TTL$4;
|
|
1181
|
+
let incomingRecord = normalize$4(input, store.readEntry(key), {
|
|
1182
|
+
fullPath: key,
|
|
1183
|
+
parent: path.parent,
|
|
1184
|
+
propertyName: path.propertyName,
|
|
1185
|
+
ttl: ttlToUse
|
|
1186
|
+
}, luvio, store);
|
|
1187
|
+
if (existingRecord === undefined || equals$4(existingRecord, incomingRecord) === false) {
|
|
1188
|
+
luvio.storePublish(key, incomingRecord);
|
|
1189
|
+
}
|
|
1190
|
+
{
|
|
1191
|
+
const storeMetadataParams = {
|
|
1192
|
+
ttl: ttlToUse,
|
|
1193
|
+
namespace: "IndustriesContext",
|
|
1194
|
+
version: VERSION$4,
|
|
1195
|
+
representationName: RepresentationType$4,
|
|
1196
|
+
};
|
|
1197
|
+
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
1198
|
+
}
|
|
1199
|
+
return createLink(key);
|
|
1200
|
+
};
|
|
1201
|
+
function getTypeCacheKeys$4(luvio, input, fullPathFactory) {
|
|
1202
|
+
const rootKeySet = new StoreKeyMap();
|
|
1203
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1204
|
+
const rootKey = keyBuilderFromType$3(luvio, input);
|
|
1205
|
+
rootKeySet.set(rootKey, {
|
|
1206
|
+
namespace: keyPrefix,
|
|
1207
|
+
representationName: RepresentationType$4,
|
|
1208
|
+
mergeable: false
|
|
1209
|
+
});
|
|
1210
|
+
const input_attributeTags_length = input.attributeTags.length;
|
|
1211
|
+
for (let i = 0; i < input_attributeTags_length; i++) {
|
|
1212
|
+
rootKeySet.merge(getTypeCacheKeys$5(luvio, input.attributeTags[i]));
|
|
1213
|
+
}
|
|
1214
|
+
return rootKeySet;
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
function select$j(luvio, params) {
|
|
1218
|
+
return select$k();
|
|
1219
|
+
}
|
|
1220
|
+
function getResponseCacheKeys$k(luvio, resourceParams, response) {
|
|
1221
|
+
return getTypeCacheKeys$4(luvio, response);
|
|
1222
|
+
}
|
|
1223
|
+
function ingestSuccess$f(luvio, resourceParams, response) {
|
|
1224
|
+
const { body } = response;
|
|
1225
|
+
const key = keyBuilderFromType$3(luvio, body);
|
|
1226
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
1227
|
+
const snapshot = luvio.storeLookup({
|
|
1228
|
+
recordId: key,
|
|
1229
|
+
node: select$j(),
|
|
1230
|
+
variables: {},
|
|
1231
|
+
});
|
|
1232
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1233
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1234
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1235
|
+
}
|
|
1236
|
+
}
|
|
1237
|
+
return snapshot;
|
|
1238
|
+
}
|
|
1239
|
+
function createResourceRequest$k(config) {
|
|
1240
|
+
const headers = {};
|
|
1241
|
+
return {
|
|
1242
|
+
baseUri: '/services/data/v58.0',
|
|
1243
|
+
basePath: '/connect/contextdefinition/attributenode',
|
|
1244
|
+
method: 'post',
|
|
1245
|
+
body: config.body,
|
|
1246
|
+
urlParams: {},
|
|
1247
|
+
queryParams: {},
|
|
1248
|
+
headers,
|
|
1249
|
+
priority: 'normal',
|
|
1250
|
+
};
|
|
1251
|
+
}
|
|
1252
|
+
|
|
1253
|
+
const createContextAttribute_ConfigPropertyNames = {
|
|
1254
|
+
displayName: 'createContextAttribute',
|
|
1255
|
+
parameters: {
|
|
1256
|
+
required: ['contextAttributeInput'],
|
|
1257
|
+
optional: []
|
|
1258
|
+
}
|
|
1259
|
+
};
|
|
1260
|
+
function createResourceParams$k(config) {
|
|
1261
|
+
const resourceParams = {
|
|
1262
|
+
body: {
|
|
1263
|
+
contextAttributeInput: config.contextAttributeInput
|
|
1264
|
+
}
|
|
1265
|
+
};
|
|
1266
|
+
return resourceParams;
|
|
1267
|
+
}
|
|
1268
|
+
function typeCheckConfig$k(untrustedConfig) {
|
|
1269
|
+
const config = {};
|
|
1270
|
+
const untrustedConfig_contextAttributeInput = untrustedConfig.contextAttributeInput;
|
|
1271
|
+
const referenceContextAttributeInputRepresentationValidationError = validate$d(untrustedConfig_contextAttributeInput);
|
|
1272
|
+
if (referenceContextAttributeInputRepresentationValidationError === null) {
|
|
1273
|
+
config.contextAttributeInput = untrustedConfig_contextAttributeInput;
|
|
1274
|
+
}
|
|
1275
|
+
return config;
|
|
1276
|
+
}
|
|
1277
|
+
function validateAdapterConfig$k(untrustedConfig, configPropertyNames) {
|
|
1278
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1279
|
+
return null;
|
|
1280
|
+
}
|
|
1281
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1282
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1283
|
+
}
|
|
1284
|
+
const config = typeCheckConfig$k(untrustedConfig);
|
|
1285
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1286
|
+
return null;
|
|
1287
|
+
}
|
|
1288
|
+
return config;
|
|
1289
|
+
}
|
|
1290
|
+
function buildNetworkSnapshot$k(luvio, config, options) {
|
|
1291
|
+
const resourceParams = createResourceParams$k(config);
|
|
1292
|
+
const request = createResourceRequest$k(resourceParams);
|
|
1293
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1294
|
+
.then((response) => {
|
|
1295
|
+
return luvio.handleSuccessResponse(() => {
|
|
1296
|
+
const snapshot = ingestSuccess$f(luvio, resourceParams, response);
|
|
1297
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1298
|
+
}, () => getResponseCacheKeys$k(luvio, resourceParams, response.body));
|
|
1299
|
+
}, (response) => {
|
|
1300
|
+
deepFreeze$9(response);
|
|
1301
|
+
throw response;
|
|
1302
|
+
});
|
|
1303
|
+
}
|
|
1304
|
+
const createContextAttributeAdapterFactory = (luvio) => {
|
|
1305
|
+
return function createContextAttribute(untrustedConfig) {
|
|
1306
|
+
const config = validateAdapterConfig$k(untrustedConfig, createContextAttribute_ConfigPropertyNames);
|
|
1307
|
+
// Invalid or incomplete config
|
|
1308
|
+
if (config === null) {
|
|
1309
|
+
throw new Error('Invalid config for "createContextAttribute"');
|
|
1310
|
+
}
|
|
1311
|
+
return buildNetworkSnapshot$k(luvio, config);
|
|
1312
|
+
};
|
|
1313
|
+
};
|
|
1314
|
+
|
|
1315
|
+
function keyBuilder$l(luvio, params) {
|
|
1316
|
+
return keyBuilder$m(luvio, {
|
|
1317
|
+
id: params.urlParams.contextAttributeId
|
|
1318
|
+
});
|
|
1319
|
+
}
|
|
1320
|
+
function getResponseCacheKeys$j(luvio, resourceParams) {
|
|
1321
|
+
const key = keyBuilder$l(luvio, resourceParams);
|
|
1322
|
+
const cacheKeyMap = new StoreKeyMap();
|
|
1323
|
+
cacheKeyMap.set(key, {
|
|
1324
|
+
namespace: keyPrefix,
|
|
1325
|
+
representationName: RepresentationType$4,
|
|
1326
|
+
mergeable: false
|
|
1327
|
+
});
|
|
1328
|
+
return cacheKeyMap;
|
|
1329
|
+
}
|
|
1330
|
+
function evictSuccess$4(luvio, resourceParams) {
|
|
1331
|
+
const key = keyBuilder$l(luvio, resourceParams);
|
|
1332
|
+
luvio.storeEvict(key);
|
|
1333
|
+
}
|
|
1334
|
+
function createResourceRequest$j(config) {
|
|
1335
|
+
const headers = {};
|
|
1336
|
+
return {
|
|
1337
|
+
baseUri: '/services/data/v58.0',
|
|
1338
|
+
basePath: '/connect/contextdefinition/attributenode/' + config.urlParams.contextAttributeId + '',
|
|
1339
|
+
method: 'delete',
|
|
1340
|
+
body: null,
|
|
1341
|
+
urlParams: config.urlParams,
|
|
1342
|
+
queryParams: {},
|
|
1343
|
+
headers,
|
|
1344
|
+
priority: 'normal',
|
|
1345
|
+
};
|
|
1346
|
+
}
|
|
1347
|
+
|
|
1348
|
+
const adapterName$4 = 'deleteContextAttribute';
|
|
1349
|
+
const deleteContextAttribute_ConfigPropertyNames = {
|
|
1350
|
+
displayName: 'deleteContextAttribute',
|
|
1351
|
+
parameters: {
|
|
1352
|
+
required: ['contextAttributeId'],
|
|
1353
|
+
optional: []
|
|
1354
|
+
}
|
|
1355
|
+
};
|
|
1356
|
+
function createResourceParams$j(config) {
|
|
1357
|
+
const resourceParams = {
|
|
1358
|
+
urlParams: {
|
|
1359
|
+
contextAttributeId: config.contextAttributeId
|
|
1360
|
+
}
|
|
1361
|
+
};
|
|
1362
|
+
return resourceParams;
|
|
1363
|
+
}
|
|
1364
|
+
function typeCheckConfig$j(untrustedConfig) {
|
|
1365
|
+
const config = {};
|
|
1366
|
+
const untrustedConfig_contextAttributeId = untrustedConfig.contextAttributeId;
|
|
1367
|
+
if (typeof untrustedConfig_contextAttributeId === 'string') {
|
|
1368
|
+
config.contextAttributeId = untrustedConfig_contextAttributeId;
|
|
1369
|
+
}
|
|
1370
|
+
return config;
|
|
1371
|
+
}
|
|
1372
|
+
function validateAdapterConfig$j(untrustedConfig, configPropertyNames) {
|
|
1373
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1374
|
+
return null;
|
|
1375
|
+
}
|
|
1376
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1377
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1378
|
+
}
|
|
1379
|
+
const config = typeCheckConfig$j(untrustedConfig);
|
|
1380
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1381
|
+
return null;
|
|
1382
|
+
}
|
|
1383
|
+
return config;
|
|
1384
|
+
}
|
|
1385
|
+
function buildNetworkSnapshot$j(luvio, config, options) {
|
|
1386
|
+
const resourceParams = createResourceParams$j(config);
|
|
1387
|
+
const request = createResourceRequest$j(resourceParams);
|
|
1388
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1389
|
+
.then(() => {
|
|
1390
|
+
return luvio.handleSuccessResponse(() => {
|
|
1391
|
+
evictSuccess$4(luvio, resourceParams);
|
|
1392
|
+
return luvio.storeBroadcast();
|
|
1393
|
+
}, () => getResponseCacheKeys$j(luvio, resourceParams));
|
|
1394
|
+
}, (response) => {
|
|
1395
|
+
deepFreeze$9(response);
|
|
1396
|
+
throw response;
|
|
1397
|
+
});
|
|
1398
|
+
}
|
|
1399
|
+
const deleteContextAttributeAdapterFactory = (luvio) => {
|
|
1400
|
+
return function IndustriesContextdeleteContextAttribute(untrustedConfig) {
|
|
1401
|
+
const config = validateAdapterConfig$j(untrustedConfig, deleteContextAttribute_ConfigPropertyNames);
|
|
1402
|
+
// Invalid or incomplete config
|
|
1403
|
+
if (config === null) {
|
|
1404
|
+
throw new Error(`Invalid config for "${adapterName$4}"`);
|
|
1405
|
+
}
|
|
1406
|
+
return buildNetworkSnapshot$j(luvio, config);
|
|
1407
|
+
};
|
|
1408
|
+
};
|
|
1409
|
+
|
|
1410
|
+
function select$i(luvio, params) {
|
|
1411
|
+
return select$k();
|
|
1412
|
+
}
|
|
1413
|
+
function keyBuilder$k(luvio, params) {
|
|
1414
|
+
return keyBuilder$m(luvio, {
|
|
1415
|
+
id: params.urlParams.contextAttributeId
|
|
1416
|
+
});
|
|
1417
|
+
}
|
|
1418
|
+
function getResponseCacheKeys$i(luvio, resourceParams, response) {
|
|
1419
|
+
return getTypeCacheKeys$4(luvio, response);
|
|
1420
|
+
}
|
|
1421
|
+
function ingestSuccess$e(luvio, resourceParams, response, snapshotRefresh) {
|
|
1422
|
+
const { body } = response;
|
|
1423
|
+
const key = keyBuilder$k(luvio, resourceParams);
|
|
1424
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
1425
|
+
const snapshot = luvio.storeLookup({
|
|
1426
|
+
recordId: key,
|
|
1427
|
+
node: select$i(),
|
|
1428
|
+
variables: {},
|
|
1429
|
+
}, snapshotRefresh);
|
|
1430
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1431
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1432
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1433
|
+
}
|
|
1434
|
+
}
|
|
1435
|
+
return snapshot;
|
|
1436
|
+
}
|
|
1437
|
+
function ingestError$6(luvio, params, error, snapshotRefresh) {
|
|
1438
|
+
const key = keyBuilder$k(luvio, params);
|
|
1439
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1440
|
+
const storeMetadataParams = {
|
|
1441
|
+
ttl: TTL$4,
|
|
1442
|
+
namespace: keyPrefix,
|
|
1443
|
+
version: VERSION$4,
|
|
1444
|
+
representationName: RepresentationType$4
|
|
1445
|
+
};
|
|
1446
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
1447
|
+
return errorSnapshot;
|
|
1448
|
+
}
|
|
1449
|
+
function createResourceRequest$i(config) {
|
|
1450
|
+
const headers = {};
|
|
1451
|
+
return {
|
|
1452
|
+
baseUri: '/services/data/v58.0',
|
|
1453
|
+
basePath: '/connect/contextdefinition/attributenode/' + config.urlParams.contextAttributeId + '',
|
|
1454
|
+
method: 'get',
|
|
1455
|
+
body: null,
|
|
1456
|
+
urlParams: config.urlParams,
|
|
1457
|
+
queryParams: {},
|
|
1458
|
+
headers,
|
|
1459
|
+
priority: 'normal',
|
|
1460
|
+
};
|
|
1461
|
+
}
|
|
1462
|
+
|
|
1463
|
+
const getContextAttribute_ConfigPropertyNames = {
|
|
1464
|
+
displayName: 'getContextAttribute',
|
|
1465
|
+
parameters: {
|
|
1466
|
+
required: ['contextAttributeId'],
|
|
1467
|
+
optional: []
|
|
1468
|
+
}
|
|
1469
|
+
};
|
|
1470
|
+
function createResourceParams$i(config) {
|
|
1471
|
+
const resourceParams = {
|
|
1472
|
+
urlParams: {
|
|
1473
|
+
contextAttributeId: config.contextAttributeId
|
|
1474
|
+
}
|
|
1475
|
+
};
|
|
1476
|
+
return resourceParams;
|
|
1477
|
+
}
|
|
1478
|
+
function keyBuilder$j(luvio, config) {
|
|
1479
|
+
const resourceParams = createResourceParams$i(config);
|
|
1480
|
+
return keyBuilder$k(luvio, resourceParams);
|
|
1481
|
+
}
|
|
1482
|
+
function typeCheckConfig$i(untrustedConfig) {
|
|
1483
|
+
const config = {};
|
|
1484
|
+
const untrustedConfig_contextAttributeId = untrustedConfig.contextAttributeId;
|
|
1485
|
+
if (typeof untrustedConfig_contextAttributeId === 'string') {
|
|
1486
|
+
config.contextAttributeId = untrustedConfig_contextAttributeId;
|
|
1487
|
+
}
|
|
1488
|
+
return config;
|
|
1489
|
+
}
|
|
1490
|
+
function validateAdapterConfig$i(untrustedConfig, configPropertyNames) {
|
|
1491
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1492
|
+
return null;
|
|
1493
|
+
}
|
|
1494
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1495
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1496
|
+
}
|
|
1497
|
+
const config = typeCheckConfig$i(untrustedConfig);
|
|
1498
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1499
|
+
return null;
|
|
1500
|
+
}
|
|
1501
|
+
return config;
|
|
1502
|
+
}
|
|
1503
|
+
function adapterFragment$6(luvio, config) {
|
|
1504
|
+
createResourceParams$i(config);
|
|
1505
|
+
return select$i();
|
|
1506
|
+
}
|
|
1507
|
+
function onFetchResponseSuccess$6(luvio, config, resourceParams, response) {
|
|
1508
|
+
const snapshot = ingestSuccess$e(luvio, resourceParams, response, {
|
|
1509
|
+
config,
|
|
1510
|
+
resolve: () => buildNetworkSnapshot$i(luvio, config, snapshotRefreshOptions)
|
|
1511
|
+
});
|
|
1512
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1513
|
+
}
|
|
1514
|
+
function onFetchResponseError$6(luvio, config, resourceParams, response) {
|
|
1515
|
+
const snapshot = ingestError$6(luvio, resourceParams, response, {
|
|
1516
|
+
config,
|
|
1517
|
+
resolve: () => buildNetworkSnapshot$i(luvio, config, snapshotRefreshOptions)
|
|
1518
|
+
});
|
|
1519
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1520
|
+
}
|
|
1521
|
+
function buildNetworkSnapshot$i(luvio, config, options) {
|
|
1522
|
+
const resourceParams = createResourceParams$i(config);
|
|
1523
|
+
const request = createResourceRequest$i(resourceParams);
|
|
1524
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1525
|
+
.then((response) => {
|
|
1526
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$6(luvio, config, resourceParams, response), () => getResponseCacheKeys$i(luvio, resourceParams, response.body));
|
|
1527
|
+
}, (response) => {
|
|
1528
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$6(luvio, config, resourceParams, response));
|
|
1529
|
+
});
|
|
1530
|
+
}
|
|
1531
|
+
function buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext) {
|
|
1532
|
+
const { luvio, config } = context;
|
|
1533
|
+
const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
|
|
1534
|
+
const dispatchOptions = {
|
|
1535
|
+
resourceRequestContext: {
|
|
1536
|
+
requestCorrelator,
|
|
1537
|
+
luvioRequestMethod: undefined,
|
|
1538
|
+
},
|
|
1539
|
+
eventObservers
|
|
1540
|
+
};
|
|
1541
|
+
if (networkPriority !== 'normal') {
|
|
1542
|
+
dispatchOptions.overrides = {
|
|
1543
|
+
priority: networkPriority
|
|
1544
|
+
};
|
|
1545
|
+
}
|
|
1546
|
+
return buildNetworkSnapshot$i(luvio, config, dispatchOptions);
|
|
1547
|
+
}
|
|
1548
|
+
function buildCachedSnapshotCachePolicy$6(context, storeLookup) {
|
|
1549
|
+
const { luvio, config } = context;
|
|
1550
|
+
const selector = {
|
|
1551
|
+
recordId: keyBuilder$j(luvio, config),
|
|
1552
|
+
node: adapterFragment$6(luvio, config),
|
|
1553
|
+
variables: {},
|
|
1554
|
+
};
|
|
1555
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
1556
|
+
config,
|
|
1557
|
+
resolve: () => buildNetworkSnapshot$i(luvio, config, snapshotRefreshOptions)
|
|
1558
|
+
});
|
|
1559
|
+
return cacheSnapshot;
|
|
1560
|
+
}
|
|
1561
|
+
const getContextAttributeAdapterFactory = (luvio) => function IndustriesContext__getContextAttribute(untrustedConfig, requestContext) {
|
|
1562
|
+
const config = validateAdapterConfig$i(untrustedConfig, getContextAttribute_ConfigPropertyNames);
|
|
1563
|
+
// Invalid or incomplete config
|
|
1564
|
+
if (config === null) {
|
|
1565
|
+
return null;
|
|
1566
|
+
}
|
|
1567
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1568
|
+
buildCachedSnapshotCachePolicy$6, buildNetworkSnapshotCachePolicy$6);
|
|
1569
|
+
};
|
|
1570
|
+
|
|
1571
|
+
function select$h(luvio, params) {
|
|
1572
|
+
return select$k();
|
|
1573
|
+
}
|
|
1574
|
+
function getResponseCacheKeys$h(luvio, resourceParams, response) {
|
|
1575
|
+
return getTypeCacheKeys$4(luvio, response);
|
|
1576
|
+
}
|
|
1577
|
+
function ingestSuccess$d(luvio, resourceParams, response) {
|
|
1578
|
+
const { body } = response;
|
|
1579
|
+
const key = keyBuilderFromType$3(luvio, body);
|
|
1580
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
1581
|
+
const snapshot = luvio.storeLookup({
|
|
1582
|
+
recordId: key,
|
|
1583
|
+
node: select$h(),
|
|
1584
|
+
variables: {},
|
|
1585
|
+
});
|
|
1586
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1587
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1588
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1589
|
+
}
|
|
1590
|
+
}
|
|
1591
|
+
return snapshot;
|
|
1592
|
+
}
|
|
1593
|
+
function createResourceRequest$h(config) {
|
|
1594
|
+
const headers = {};
|
|
1595
|
+
return {
|
|
1596
|
+
baseUri: '/services/data/v58.0',
|
|
1597
|
+
basePath: '/connect/contextdefinition/attributenode/' + config.urlParams.contextAttributeId + '',
|
|
1598
|
+
method: 'patch',
|
|
1599
|
+
body: config.body,
|
|
1600
|
+
urlParams: config.urlParams,
|
|
1601
|
+
queryParams: {},
|
|
1602
|
+
headers,
|
|
1603
|
+
priority: 'normal',
|
|
1604
|
+
};
|
|
1605
|
+
}
|
|
1606
|
+
|
|
1607
|
+
const updateContextAttribute_ConfigPropertyNames = {
|
|
1608
|
+
displayName: 'updateContextAttribute',
|
|
1609
|
+
parameters: {
|
|
1610
|
+
required: ['contextAttributeId', 'contextAttributeInput'],
|
|
1611
|
+
optional: []
|
|
1612
|
+
}
|
|
1613
|
+
};
|
|
1614
|
+
function createResourceParams$h(config) {
|
|
1615
|
+
const resourceParams = {
|
|
1616
|
+
urlParams: {
|
|
1617
|
+
contextAttributeId: config.contextAttributeId
|
|
1618
|
+
},
|
|
1619
|
+
body: {
|
|
1620
|
+
contextAttributeInput: config.contextAttributeInput
|
|
1621
|
+
}
|
|
1622
|
+
};
|
|
1623
|
+
return resourceParams;
|
|
1624
|
+
}
|
|
1625
|
+
function typeCheckConfig$h(untrustedConfig) {
|
|
1626
|
+
const config = {};
|
|
1627
|
+
const untrustedConfig_contextAttributeId = untrustedConfig.contextAttributeId;
|
|
1628
|
+
if (typeof untrustedConfig_contextAttributeId === 'string') {
|
|
1629
|
+
config.contextAttributeId = untrustedConfig_contextAttributeId;
|
|
1630
|
+
}
|
|
1631
|
+
const untrustedConfig_contextAttributeInput = untrustedConfig.contextAttributeInput;
|
|
1632
|
+
const referenceContextAttributeInputRepresentationValidationError = validate$d(untrustedConfig_contextAttributeInput);
|
|
1633
|
+
if (referenceContextAttributeInputRepresentationValidationError === null) {
|
|
1634
|
+
config.contextAttributeInput = untrustedConfig_contextAttributeInput;
|
|
1635
|
+
}
|
|
1636
|
+
return config;
|
|
1637
|
+
}
|
|
1638
|
+
function validateAdapterConfig$h(untrustedConfig, configPropertyNames) {
|
|
1639
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1640
|
+
return null;
|
|
1641
|
+
}
|
|
1642
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1643
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1644
|
+
}
|
|
1645
|
+
const config = typeCheckConfig$h(untrustedConfig);
|
|
1646
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1647
|
+
return null;
|
|
1648
|
+
}
|
|
1649
|
+
return config;
|
|
1650
|
+
}
|
|
1651
|
+
function buildNetworkSnapshot$h(luvio, config, options) {
|
|
1652
|
+
const resourceParams = createResourceParams$h(config);
|
|
1653
|
+
const request = createResourceRequest$h(resourceParams);
|
|
1654
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1655
|
+
.then((response) => {
|
|
1656
|
+
return luvio.handleSuccessResponse(() => {
|
|
1657
|
+
const snapshot = ingestSuccess$d(luvio, resourceParams, response);
|
|
1658
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1659
|
+
}, () => getResponseCacheKeys$h(luvio, resourceParams, response.body));
|
|
1660
|
+
}, (response) => {
|
|
1661
|
+
deepFreeze$9(response);
|
|
1662
|
+
throw response;
|
|
1663
|
+
});
|
|
1664
|
+
}
|
|
1665
|
+
const updateContextAttributeAdapterFactory = (luvio) => {
|
|
1666
|
+
return function updateContextAttribute(untrustedConfig) {
|
|
1667
|
+
const config = validateAdapterConfig$h(untrustedConfig, updateContextAttribute_ConfigPropertyNames);
|
|
1668
|
+
// Invalid or incomplete config
|
|
1669
|
+
if (config === null) {
|
|
1670
|
+
throw new Error('Invalid config for "updateContextAttribute"');
|
|
1671
|
+
}
|
|
1672
|
+
return buildNetworkSnapshot$h(luvio, config);
|
|
1673
|
+
};
|
|
1674
|
+
};
|
|
1675
|
+
|
|
1676
|
+
const TTL$3 = 10000;
|
|
1677
|
+
const VERSION$3 = "5b09f4269bc5a468321a113cc35d3e57";
|
|
1678
|
+
function validate$a(obj, path = 'ContextAttributeTagListRepresentation') {
|
|
1679
|
+
const v_error = (() => {
|
|
1680
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1681
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1682
|
+
}
|
|
1683
|
+
const obj_attributeTags = obj.attributeTags;
|
|
1684
|
+
const path_attributeTags = path + '.attributeTags';
|
|
1685
|
+
if (!ArrayIsArray(obj_attributeTags)) {
|
|
1686
|
+
return new TypeError('Expected "array" but received "' + typeof obj_attributeTags + '" (at "' + path_attributeTags + '")');
|
|
1687
|
+
}
|
|
1688
|
+
for (let i = 0; i < obj_attributeTags.length; i++) {
|
|
1689
|
+
const obj_attributeTags_item = obj_attributeTags[i];
|
|
1690
|
+
const path_attributeTags_item = path_attributeTags + '[' + i + ']';
|
|
1691
|
+
const referencepath_attributeTags_itemValidationError = validate$c(obj_attributeTags_item, path_attributeTags_item);
|
|
1692
|
+
if (referencepath_attributeTags_itemValidationError !== null) {
|
|
1693
|
+
let message = 'Object doesn\'t match ContextAttributeTagRepresentation (at "' + path_attributeTags_item + '")\n';
|
|
1694
|
+
message += referencepath_attributeTags_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1695
|
+
return new TypeError(message);
|
|
1696
|
+
}
|
|
1697
|
+
}
|
|
1698
|
+
if (obj.isSuccess !== undefined) {
|
|
1699
|
+
const obj_isSuccess = obj.isSuccess;
|
|
1700
|
+
const path_isSuccess = path + '.isSuccess';
|
|
1701
|
+
if (typeof obj_isSuccess !== 'boolean') {
|
|
1702
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isSuccess + '" (at "' + path_isSuccess + '")');
|
|
1703
|
+
}
|
|
1704
|
+
}
|
|
1705
|
+
})();
|
|
1706
|
+
return v_error === undefined ? null : v_error;
|
|
1707
|
+
}
|
|
1708
|
+
const RepresentationType$3 = 'ContextAttributeTagListRepresentation';
|
|
1709
|
+
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
1710
|
+
return input;
|
|
1711
|
+
}
|
|
1712
|
+
const select$g = function ContextAttributeTagListRepresentationSelect() {
|
|
1713
|
+
return {
|
|
1714
|
+
kind: 'Fragment',
|
|
1715
|
+
version: VERSION$3,
|
|
1716
|
+
private: [],
|
|
1717
|
+
opaque: true
|
|
1718
|
+
};
|
|
1719
|
+
};
|
|
1720
|
+
function equals$3(existing, incoming) {
|
|
1721
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
1125
1722
|
return false;
|
|
1126
1723
|
}
|
|
1127
1724
|
return true;
|
|
@@ -1130,19 +1727,19 @@ function deepFreeze$6(input) {
|
|
|
1130
1727
|
const input_attributeTags = input.attributeTags;
|
|
1131
1728
|
for (let i = 0; i < input_attributeTags.length; i++) {
|
|
1132
1729
|
const input_attributeTags_item = input_attributeTags[i];
|
|
1133
|
-
deepFreeze$
|
|
1730
|
+
deepFreeze$8(input_attributeTags_item);
|
|
1134
1731
|
}
|
|
1135
1732
|
ObjectFreeze(input_attributeTags);
|
|
1136
1733
|
ObjectFreeze(input);
|
|
1137
1734
|
}
|
|
1138
|
-
const ingest$3 = function
|
|
1735
|
+
const ingest$3 = function ContextAttributeTagListRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1139
1736
|
if (process.env.NODE_ENV !== 'production') {
|
|
1140
|
-
const validateError = validate$
|
|
1737
|
+
const validateError = validate$a(input);
|
|
1141
1738
|
if (validateError !== null) {
|
|
1142
1739
|
throw validateError;
|
|
1143
1740
|
}
|
|
1144
1741
|
}
|
|
1145
|
-
const key =
|
|
1742
|
+
const key = path.fullPath;
|
|
1146
1743
|
const existingRecord = store.readEntry(key);
|
|
1147
1744
|
const ttlToUse = TTL$3;
|
|
1148
1745
|
let incomingRecord = normalize$3(input, store.readEntry(key), {
|
|
@@ -1150,7 +1747,8 @@ const ingest$3 = function ContextAttributeRepresentationIngest(input, path, luvi
|
|
|
1150
1747
|
parent: path.parent,
|
|
1151
1748
|
propertyName: path.propertyName,
|
|
1152
1749
|
ttl: ttlToUse
|
|
1153
|
-
}
|
|
1750
|
+
});
|
|
1751
|
+
deepFreeze$6(input);
|
|
1154
1752
|
if (existingRecord === undefined || equals$3(existingRecord, incomingRecord) === false) {
|
|
1155
1753
|
luvio.storePublish(key, incomingRecord);
|
|
1156
1754
|
}
|
|
@@ -1168,29 +1766,212 @@ const ingest$3 = function ContextAttributeRepresentationIngest(input, path, luvi
|
|
|
1168
1766
|
function getTypeCacheKeys$3(luvio, input, fullPathFactory) {
|
|
1169
1767
|
const rootKeySet = new StoreKeyMap();
|
|
1170
1768
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1171
|
-
const rootKey =
|
|
1769
|
+
const rootKey = fullPathFactory();
|
|
1172
1770
|
rootKeySet.set(rootKey, {
|
|
1173
1771
|
namespace: keyPrefix,
|
|
1174
1772
|
representationName: RepresentationType$3,
|
|
1175
1773
|
mergeable: false
|
|
1176
1774
|
});
|
|
1177
|
-
const input_attributeTags_length = input.attributeTags.length;
|
|
1178
|
-
for (let i = 0; i < input_attributeTags_length; i++) {
|
|
1179
|
-
rootKeySet.merge(getTypeCacheKeys$4(luvio, input.attributeTags[i]));
|
|
1180
|
-
}
|
|
1181
1775
|
return rootKeySet;
|
|
1182
1776
|
}
|
|
1183
1777
|
|
|
1184
|
-
function select$
|
|
1778
|
+
function select$f(luvio, params) {
|
|
1779
|
+
return select$g();
|
|
1780
|
+
}
|
|
1781
|
+
function keyBuilder$i(luvio, params) {
|
|
1782
|
+
return keyPrefix + '::ContextAttributeTagListRepresentation:(' + 'contextAttributeId:' + params.urlParams.contextAttributeId + ')';
|
|
1783
|
+
}
|
|
1784
|
+
function getResponseCacheKeys$g(luvio, resourceParams, response) {
|
|
1785
|
+
return getTypeCacheKeys$3(luvio, response, () => keyBuilder$i(luvio, resourceParams));
|
|
1786
|
+
}
|
|
1787
|
+
function ingestSuccess$c(luvio, resourceParams, response, snapshotRefresh) {
|
|
1788
|
+
const { body } = response;
|
|
1789
|
+
const key = keyBuilder$i(luvio, resourceParams);
|
|
1790
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
1791
|
+
const snapshot = luvio.storeLookup({
|
|
1792
|
+
recordId: key,
|
|
1793
|
+
node: select$f(),
|
|
1794
|
+
variables: {},
|
|
1795
|
+
}, snapshotRefresh);
|
|
1796
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1797
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1798
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1799
|
+
}
|
|
1800
|
+
}
|
|
1801
|
+
return snapshot;
|
|
1802
|
+
}
|
|
1803
|
+
function ingestError$5(luvio, params, error, snapshotRefresh) {
|
|
1804
|
+
const key = keyBuilder$i(luvio, params);
|
|
1805
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1806
|
+
const storeMetadataParams = {
|
|
1807
|
+
ttl: TTL$3,
|
|
1808
|
+
namespace: keyPrefix,
|
|
1809
|
+
version: VERSION$3,
|
|
1810
|
+
representationName: RepresentationType$3
|
|
1811
|
+
};
|
|
1812
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
1813
|
+
return errorSnapshot;
|
|
1814
|
+
}
|
|
1815
|
+
function createResourceRequest$g(config) {
|
|
1816
|
+
const headers = {};
|
|
1817
|
+
return {
|
|
1818
|
+
baseUri: '/services/data/v58.0',
|
|
1819
|
+
basePath: '/connect/contextdefinition/attributenode/' + config.urlParams.contextAttributeId + '/tags',
|
|
1820
|
+
method: 'get',
|
|
1821
|
+
body: null,
|
|
1822
|
+
urlParams: config.urlParams,
|
|
1823
|
+
queryParams: {},
|
|
1824
|
+
headers,
|
|
1825
|
+
priority: 'normal',
|
|
1826
|
+
};
|
|
1827
|
+
}
|
|
1828
|
+
|
|
1829
|
+
const getContextAttributeTagsByAttributeId_ConfigPropertyNames = {
|
|
1830
|
+
displayName: 'getContextAttributeTagsByAttributeId',
|
|
1831
|
+
parameters: {
|
|
1832
|
+
required: ['contextAttributeId'],
|
|
1833
|
+
optional: []
|
|
1834
|
+
}
|
|
1835
|
+
};
|
|
1836
|
+
function createResourceParams$g(config) {
|
|
1837
|
+
const resourceParams = {
|
|
1838
|
+
urlParams: {
|
|
1839
|
+
contextAttributeId: config.contextAttributeId
|
|
1840
|
+
}
|
|
1841
|
+
};
|
|
1842
|
+
return resourceParams;
|
|
1843
|
+
}
|
|
1844
|
+
function keyBuilder$h(luvio, config) {
|
|
1845
|
+
const resourceParams = createResourceParams$g(config);
|
|
1846
|
+
return keyBuilder$i(luvio, resourceParams);
|
|
1847
|
+
}
|
|
1848
|
+
function typeCheckConfig$g(untrustedConfig) {
|
|
1849
|
+
const config = {};
|
|
1850
|
+
const untrustedConfig_contextAttributeId = untrustedConfig.contextAttributeId;
|
|
1851
|
+
if (typeof untrustedConfig_contextAttributeId === 'string') {
|
|
1852
|
+
config.contextAttributeId = untrustedConfig_contextAttributeId;
|
|
1853
|
+
}
|
|
1854
|
+
return config;
|
|
1855
|
+
}
|
|
1856
|
+
function validateAdapterConfig$g(untrustedConfig, configPropertyNames) {
|
|
1857
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1858
|
+
return null;
|
|
1859
|
+
}
|
|
1860
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1861
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1862
|
+
}
|
|
1863
|
+
const config = typeCheckConfig$g(untrustedConfig);
|
|
1864
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1865
|
+
return null;
|
|
1866
|
+
}
|
|
1867
|
+
return config;
|
|
1868
|
+
}
|
|
1869
|
+
function adapterFragment$5(luvio, config) {
|
|
1870
|
+
createResourceParams$g(config);
|
|
1185
1871
|
return select$f();
|
|
1186
1872
|
}
|
|
1873
|
+
function onFetchResponseSuccess$5(luvio, config, resourceParams, response) {
|
|
1874
|
+
const snapshot = ingestSuccess$c(luvio, resourceParams, response, {
|
|
1875
|
+
config,
|
|
1876
|
+
resolve: () => buildNetworkSnapshot$g(luvio, config, snapshotRefreshOptions)
|
|
1877
|
+
});
|
|
1878
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1879
|
+
}
|
|
1880
|
+
function onFetchResponseError$5(luvio, config, resourceParams, response) {
|
|
1881
|
+
const snapshot = ingestError$5(luvio, resourceParams, response, {
|
|
1882
|
+
config,
|
|
1883
|
+
resolve: () => buildNetworkSnapshot$g(luvio, config, snapshotRefreshOptions)
|
|
1884
|
+
});
|
|
1885
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1886
|
+
}
|
|
1887
|
+
function buildNetworkSnapshot$g(luvio, config, options) {
|
|
1888
|
+
const resourceParams = createResourceParams$g(config);
|
|
1889
|
+
const request = createResourceRequest$g(resourceParams);
|
|
1890
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1891
|
+
.then((response) => {
|
|
1892
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$5(luvio, config, resourceParams, response), () => getResponseCacheKeys$g(luvio, resourceParams, response.body));
|
|
1893
|
+
}, (response) => {
|
|
1894
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$5(luvio, config, resourceParams, response));
|
|
1895
|
+
});
|
|
1896
|
+
}
|
|
1897
|
+
function buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext) {
|
|
1898
|
+
const { luvio, config } = context;
|
|
1899
|
+
const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
|
|
1900
|
+
const dispatchOptions = {
|
|
1901
|
+
resourceRequestContext: {
|
|
1902
|
+
requestCorrelator,
|
|
1903
|
+
luvioRequestMethod: undefined,
|
|
1904
|
+
},
|
|
1905
|
+
eventObservers
|
|
1906
|
+
};
|
|
1907
|
+
if (networkPriority !== 'normal') {
|
|
1908
|
+
dispatchOptions.overrides = {
|
|
1909
|
+
priority: networkPriority
|
|
1910
|
+
};
|
|
1911
|
+
}
|
|
1912
|
+
return buildNetworkSnapshot$g(luvio, config, dispatchOptions);
|
|
1913
|
+
}
|
|
1914
|
+
function buildCachedSnapshotCachePolicy$5(context, storeLookup) {
|
|
1915
|
+
const { luvio, config } = context;
|
|
1916
|
+
const selector = {
|
|
1917
|
+
recordId: keyBuilder$h(luvio, config),
|
|
1918
|
+
node: adapterFragment$5(luvio, config),
|
|
1919
|
+
variables: {},
|
|
1920
|
+
};
|
|
1921
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
1922
|
+
config,
|
|
1923
|
+
resolve: () => buildNetworkSnapshot$g(luvio, config, snapshotRefreshOptions)
|
|
1924
|
+
});
|
|
1925
|
+
return cacheSnapshot;
|
|
1926
|
+
}
|
|
1927
|
+
const getContextAttributeTagsByAttributeIdAdapterFactory = (luvio) => function IndustriesContext__getContextAttributeTagsByAttributeId(untrustedConfig, requestContext) {
|
|
1928
|
+
const config = validateAdapterConfig$g(untrustedConfig, getContextAttributeTagsByAttributeId_ConfigPropertyNames);
|
|
1929
|
+
// Invalid or incomplete config
|
|
1930
|
+
if (config === null) {
|
|
1931
|
+
return null;
|
|
1932
|
+
}
|
|
1933
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1934
|
+
buildCachedSnapshotCachePolicy$5, buildNetworkSnapshotCachePolicy$5);
|
|
1935
|
+
};
|
|
1936
|
+
|
|
1937
|
+
function validate$9(obj, path = 'ContextAttributeTagInputRepresentation') {
|
|
1938
|
+
const v_error = (() => {
|
|
1939
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1940
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1941
|
+
}
|
|
1942
|
+
if (obj.contextAttributeId !== undefined) {
|
|
1943
|
+
const obj_contextAttributeId = obj.contextAttributeId;
|
|
1944
|
+
const path_contextAttributeId = path + '.contextAttributeId';
|
|
1945
|
+
if (typeof obj_contextAttributeId !== 'string') {
|
|
1946
|
+
return new TypeError('Expected "string" but received "' + typeof obj_contextAttributeId + '" (at "' + path_contextAttributeId + '")');
|
|
1947
|
+
}
|
|
1948
|
+
}
|
|
1949
|
+
if (obj.contextNodeId !== undefined) {
|
|
1950
|
+
const obj_contextNodeId = obj.contextNodeId;
|
|
1951
|
+
const path_contextNodeId = path + '.contextNodeId';
|
|
1952
|
+
if (typeof obj_contextNodeId !== 'string') {
|
|
1953
|
+
return new TypeError('Expected "string" but received "' + typeof obj_contextNodeId + '" (at "' + path_contextNodeId + '")');
|
|
1954
|
+
}
|
|
1955
|
+
}
|
|
1956
|
+
const obj_name = obj.name;
|
|
1957
|
+
const path_name = path + '.name';
|
|
1958
|
+
if (typeof obj_name !== 'string') {
|
|
1959
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
1960
|
+
}
|
|
1961
|
+
})();
|
|
1962
|
+
return v_error === undefined ? null : v_error;
|
|
1963
|
+
}
|
|
1964
|
+
|
|
1965
|
+
function select$e(luvio, params) {
|
|
1966
|
+
return select$l();
|
|
1967
|
+
}
|
|
1187
1968
|
function getResponseCacheKeys$f(luvio, resourceParams, response) {
|
|
1188
|
-
return getTypeCacheKeys$
|
|
1969
|
+
return getTypeCacheKeys$5(luvio, response);
|
|
1189
1970
|
}
|
|
1190
1971
|
function ingestSuccess$b(luvio, resourceParams, response) {
|
|
1191
1972
|
const { body } = response;
|
|
1192
|
-
const key = keyBuilderFromType$
|
|
1193
|
-
luvio.storeIngest(key, ingest$
|
|
1973
|
+
const key = keyBuilderFromType$4(luvio, body);
|
|
1974
|
+
luvio.storeIngest(key, ingest$5, body);
|
|
1194
1975
|
const snapshot = luvio.storeLookup({
|
|
1195
1976
|
recordId: key,
|
|
1196
1977
|
node: select$e(),
|
|
@@ -1207,7 +1988,7 @@ function createResourceRequest$f(config) {
|
|
|
1207
1988
|
const headers = {};
|
|
1208
1989
|
return {
|
|
1209
1990
|
baseUri: '/services/data/v58.0',
|
|
1210
|
-
basePath: '/connect/contextdefinition/
|
|
1991
|
+
basePath: '/connect/contextdefinition/attributetag',
|
|
1211
1992
|
method: 'post',
|
|
1212
1993
|
body: config.body,
|
|
1213
1994
|
urlParams: {},
|
|
@@ -1217,27 +1998,27 @@ function createResourceRequest$f(config) {
|
|
|
1217
1998
|
};
|
|
1218
1999
|
}
|
|
1219
2000
|
|
|
1220
|
-
const
|
|
1221
|
-
displayName: '
|
|
2001
|
+
const createContextAttributeTag_ConfigPropertyNames = {
|
|
2002
|
+
displayName: 'createContextAttributeTag',
|
|
1222
2003
|
parameters: {
|
|
1223
|
-
required: ['
|
|
2004
|
+
required: ['contextAttributeTagInput'],
|
|
1224
2005
|
optional: []
|
|
1225
2006
|
}
|
|
1226
2007
|
};
|
|
1227
2008
|
function createResourceParams$f(config) {
|
|
1228
2009
|
const resourceParams = {
|
|
1229
2010
|
body: {
|
|
1230
|
-
|
|
2011
|
+
contextAttributeTagInput: config.contextAttributeTagInput
|
|
1231
2012
|
}
|
|
1232
2013
|
};
|
|
1233
2014
|
return resourceParams;
|
|
1234
2015
|
}
|
|
1235
2016
|
function typeCheckConfig$f(untrustedConfig) {
|
|
1236
2017
|
const config = {};
|
|
1237
|
-
const
|
|
1238
|
-
const
|
|
1239
|
-
if (
|
|
1240
|
-
config.
|
|
2018
|
+
const untrustedConfig_contextAttributeTagInput = untrustedConfig.contextAttributeTagInput;
|
|
2019
|
+
const referenceContextAttributeTagInputRepresentationValidationError = validate$9(untrustedConfig_contextAttributeTagInput);
|
|
2020
|
+
if (referenceContextAttributeTagInputRepresentationValidationError === null) {
|
|
2021
|
+
config.contextAttributeTagInput = untrustedConfig_contextAttributeTagInput;
|
|
1241
2022
|
}
|
|
1242
2023
|
return config;
|
|
1243
2024
|
}
|
|
@@ -1264,24 +2045,24 @@ function buildNetworkSnapshot$f(luvio, config, options) {
|
|
|
1264
2045
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1265
2046
|
}, () => getResponseCacheKeys$f(luvio, resourceParams, response.body));
|
|
1266
2047
|
}, (response) => {
|
|
1267
|
-
deepFreeze$
|
|
2048
|
+
deepFreeze$9(response);
|
|
1268
2049
|
throw response;
|
|
1269
2050
|
});
|
|
1270
2051
|
}
|
|
1271
|
-
const
|
|
1272
|
-
return function
|
|
1273
|
-
const config = validateAdapterConfig$f(untrustedConfig,
|
|
2052
|
+
const createContextAttributeTagAdapterFactory = (luvio) => {
|
|
2053
|
+
return function createContextAttributeTag(untrustedConfig) {
|
|
2054
|
+
const config = validateAdapterConfig$f(untrustedConfig, createContextAttributeTag_ConfigPropertyNames);
|
|
1274
2055
|
// Invalid or incomplete config
|
|
1275
2056
|
if (config === null) {
|
|
1276
|
-
throw new Error('Invalid config for "
|
|
2057
|
+
throw new Error('Invalid config for "createContextAttributeTag"');
|
|
1277
2058
|
}
|
|
1278
2059
|
return buildNetworkSnapshot$f(luvio, config);
|
|
1279
2060
|
};
|
|
1280
2061
|
};
|
|
1281
2062
|
|
|
1282
2063
|
function keyBuilder$g(luvio, params) {
|
|
1283
|
-
return keyBuilder$
|
|
1284
|
-
id: params.urlParams.
|
|
2064
|
+
return keyBuilder$n(luvio, {
|
|
2065
|
+
id: params.urlParams.contextAttributeTagId
|
|
1285
2066
|
});
|
|
1286
2067
|
}
|
|
1287
2068
|
function getResponseCacheKeys$e(luvio, resourceParams) {
|
|
@@ -1289,7 +2070,7 @@ function getResponseCacheKeys$e(luvio, resourceParams) {
|
|
|
1289
2070
|
const cacheKeyMap = new StoreKeyMap();
|
|
1290
2071
|
cacheKeyMap.set(key, {
|
|
1291
2072
|
namespace: keyPrefix,
|
|
1292
|
-
representationName: RepresentationType$
|
|
2073
|
+
representationName: RepresentationType$5,
|
|
1293
2074
|
mergeable: false
|
|
1294
2075
|
});
|
|
1295
2076
|
return cacheKeyMap;
|
|
@@ -1302,7 +2083,7 @@ function createResourceRequest$e(config) {
|
|
|
1302
2083
|
const headers = {};
|
|
1303
2084
|
return {
|
|
1304
2085
|
baseUri: '/services/data/v58.0',
|
|
1305
|
-
basePath: '/connect/contextdefinition/
|
|
2086
|
+
basePath: '/connect/contextdefinition/attributetag/' + config.urlParams.contextAttributeTagId + '',
|
|
1306
2087
|
method: 'delete',
|
|
1307
2088
|
body: null,
|
|
1308
2089
|
urlParams: config.urlParams,
|
|
@@ -1312,27 +2093,27 @@ function createResourceRequest$e(config) {
|
|
|
1312
2093
|
};
|
|
1313
2094
|
}
|
|
1314
2095
|
|
|
1315
|
-
const adapterName$3 = '
|
|
1316
|
-
const
|
|
1317
|
-
displayName: '
|
|
2096
|
+
const adapterName$3 = 'deleteContextAttributeTag';
|
|
2097
|
+
const deleteContextAttributeTag_ConfigPropertyNames = {
|
|
2098
|
+
displayName: 'deleteContextAttributeTag',
|
|
1318
2099
|
parameters: {
|
|
1319
|
-
required: ['
|
|
2100
|
+
required: ['contextAttributeTagId'],
|
|
1320
2101
|
optional: []
|
|
1321
2102
|
}
|
|
1322
2103
|
};
|
|
1323
2104
|
function createResourceParams$e(config) {
|
|
1324
2105
|
const resourceParams = {
|
|
1325
2106
|
urlParams: {
|
|
1326
|
-
|
|
2107
|
+
contextAttributeTagId: config.contextAttributeTagId
|
|
1327
2108
|
}
|
|
1328
2109
|
};
|
|
1329
2110
|
return resourceParams;
|
|
1330
2111
|
}
|
|
1331
2112
|
function typeCheckConfig$e(untrustedConfig) {
|
|
1332
2113
|
const config = {};
|
|
1333
|
-
const
|
|
1334
|
-
if (typeof
|
|
1335
|
-
config.
|
|
2114
|
+
const untrustedConfig_contextAttributeTagId = untrustedConfig.contextAttributeTagId;
|
|
2115
|
+
if (typeof untrustedConfig_contextAttributeTagId === 'string') {
|
|
2116
|
+
config.contextAttributeTagId = untrustedConfig_contextAttributeTagId;
|
|
1336
2117
|
}
|
|
1337
2118
|
return config;
|
|
1338
2119
|
}
|
|
@@ -1359,13 +2140,13 @@ function buildNetworkSnapshot$e(luvio, config, options) {
|
|
|
1359
2140
|
return luvio.storeBroadcast();
|
|
1360
2141
|
}, () => getResponseCacheKeys$e(luvio, resourceParams));
|
|
1361
2142
|
}, (response) => {
|
|
1362
|
-
deepFreeze$
|
|
2143
|
+
deepFreeze$9(response);
|
|
1363
2144
|
throw response;
|
|
1364
2145
|
});
|
|
1365
2146
|
}
|
|
1366
|
-
const
|
|
1367
|
-
return function
|
|
1368
|
-
const config = validateAdapterConfig$e(untrustedConfig,
|
|
2147
|
+
const deleteContextAttributeTagAdapterFactory = (luvio) => {
|
|
2148
|
+
return function IndustriesContextdeleteContextAttributeTag(untrustedConfig) {
|
|
2149
|
+
const config = validateAdapterConfig$e(untrustedConfig, deleteContextAttributeTag_ConfigPropertyNames);
|
|
1369
2150
|
// Invalid or incomplete config
|
|
1370
2151
|
if (config === null) {
|
|
1371
2152
|
throw new Error(`Invalid config for "${adapterName$3}"`);
|
|
@@ -1375,20 +2156,20 @@ const deleteContextAttributeAdapterFactory = (luvio) => {
|
|
|
1375
2156
|
};
|
|
1376
2157
|
|
|
1377
2158
|
function select$d(luvio, params) {
|
|
1378
|
-
return select$
|
|
2159
|
+
return select$l();
|
|
1379
2160
|
}
|
|
1380
2161
|
function keyBuilder$f(luvio, params) {
|
|
1381
|
-
return keyBuilder$
|
|
1382
|
-
id: params.urlParams.
|
|
2162
|
+
return keyBuilder$n(luvio, {
|
|
2163
|
+
id: params.urlParams.contextAttributeTagId
|
|
1383
2164
|
});
|
|
1384
2165
|
}
|
|
1385
2166
|
function getResponseCacheKeys$d(luvio, resourceParams, response) {
|
|
1386
|
-
return getTypeCacheKeys$
|
|
2167
|
+
return getTypeCacheKeys$5(luvio, response);
|
|
1387
2168
|
}
|
|
1388
2169
|
function ingestSuccess$a(luvio, resourceParams, response, snapshotRefresh) {
|
|
1389
2170
|
const { body } = response;
|
|
1390
2171
|
const key = keyBuilder$f(luvio, resourceParams);
|
|
1391
|
-
luvio.storeIngest(key, ingest$
|
|
2172
|
+
luvio.storeIngest(key, ingest$5, body);
|
|
1392
2173
|
const snapshot = luvio.storeLookup({
|
|
1393
2174
|
recordId: key,
|
|
1394
2175
|
node: select$d(),
|
|
@@ -1405,10 +2186,10 @@ function ingestError$4(luvio, params, error, snapshotRefresh) {
|
|
|
1405
2186
|
const key = keyBuilder$f(luvio, params);
|
|
1406
2187
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1407
2188
|
const storeMetadataParams = {
|
|
1408
|
-
ttl: TTL$
|
|
2189
|
+
ttl: TTL$5,
|
|
1409
2190
|
namespace: keyPrefix,
|
|
1410
|
-
version: VERSION$
|
|
1411
|
-
representationName: RepresentationType$
|
|
2191
|
+
version: VERSION$5,
|
|
2192
|
+
representationName: RepresentationType$5
|
|
1412
2193
|
};
|
|
1413
2194
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
1414
2195
|
return errorSnapshot;
|
|
@@ -1417,7 +2198,7 @@ function createResourceRequest$d(config) {
|
|
|
1417
2198
|
const headers = {};
|
|
1418
2199
|
return {
|
|
1419
2200
|
baseUri: '/services/data/v58.0',
|
|
1420
|
-
basePath: '/connect/contextdefinition/
|
|
2201
|
+
basePath: '/connect/contextdefinition/attributetag/' + config.urlParams.contextAttributeTagId + '',
|
|
1421
2202
|
method: 'get',
|
|
1422
2203
|
body: null,
|
|
1423
2204
|
urlParams: config.urlParams,
|
|
@@ -1427,17 +2208,17 @@ function createResourceRequest$d(config) {
|
|
|
1427
2208
|
};
|
|
1428
2209
|
}
|
|
1429
2210
|
|
|
1430
|
-
const
|
|
1431
|
-
displayName: '
|
|
2211
|
+
const getContextAttributeTag_ConfigPropertyNames = {
|
|
2212
|
+
displayName: 'getContextAttributeTag',
|
|
1432
2213
|
parameters: {
|
|
1433
|
-
required: ['
|
|
2214
|
+
required: ['contextAttributeTagId'],
|
|
1434
2215
|
optional: []
|
|
1435
2216
|
}
|
|
1436
2217
|
};
|
|
1437
2218
|
function createResourceParams$d(config) {
|
|
1438
2219
|
const resourceParams = {
|
|
1439
2220
|
urlParams: {
|
|
1440
|
-
|
|
2221
|
+
contextAttributeTagId: config.contextAttributeTagId
|
|
1441
2222
|
}
|
|
1442
2223
|
};
|
|
1443
2224
|
return resourceParams;
|
|
@@ -1448,9 +2229,9 @@ function keyBuilder$e(luvio, config) {
|
|
|
1448
2229
|
}
|
|
1449
2230
|
function typeCheckConfig$d(untrustedConfig) {
|
|
1450
2231
|
const config = {};
|
|
1451
|
-
const
|
|
1452
|
-
if (typeof
|
|
1453
|
-
config.
|
|
2232
|
+
const untrustedConfig_contextAttributeTagId = untrustedConfig.contextAttributeTagId;
|
|
2233
|
+
if (typeof untrustedConfig_contextAttributeTagId === 'string') {
|
|
2234
|
+
config.contextAttributeTagId = untrustedConfig_contextAttributeTagId;
|
|
1454
2235
|
}
|
|
1455
2236
|
return config;
|
|
1456
2237
|
}
|
|
@@ -1525,8 +2306,8 @@ function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
|
|
|
1525
2306
|
});
|
|
1526
2307
|
return cacheSnapshot;
|
|
1527
2308
|
}
|
|
1528
|
-
const
|
|
1529
|
-
const config = validateAdapterConfig$d(untrustedConfig,
|
|
2309
|
+
const getContextAttributeTagAdapterFactory = (luvio) => function IndustriesContext__getContextAttributeTag(untrustedConfig, requestContext) {
|
|
2310
|
+
const config = validateAdapterConfig$d(untrustedConfig, getContextAttributeTag_ConfigPropertyNames);
|
|
1530
2311
|
// Invalid or incomplete config
|
|
1531
2312
|
if (config === null) {
|
|
1532
2313
|
return null;
|
|
@@ -1536,15 +2317,15 @@ const getContextAttributeAdapterFactory = (luvio) => function IndustriesContext_
|
|
|
1536
2317
|
};
|
|
1537
2318
|
|
|
1538
2319
|
function select$c(luvio, params) {
|
|
1539
|
-
return select$
|
|
2320
|
+
return select$l();
|
|
1540
2321
|
}
|
|
1541
2322
|
function getResponseCacheKeys$c(luvio, resourceParams, response) {
|
|
1542
|
-
return getTypeCacheKeys$
|
|
2323
|
+
return getTypeCacheKeys$5(luvio, response);
|
|
1543
2324
|
}
|
|
1544
2325
|
function ingestSuccess$9(luvio, resourceParams, response) {
|
|
1545
2326
|
const { body } = response;
|
|
1546
|
-
const key = keyBuilderFromType$
|
|
1547
|
-
luvio.storeIngest(key, ingest$
|
|
2327
|
+
const key = keyBuilderFromType$4(luvio, body);
|
|
2328
|
+
luvio.storeIngest(key, ingest$5, body);
|
|
1548
2329
|
const snapshot = luvio.storeLookup({
|
|
1549
2330
|
recordId: key,
|
|
1550
2331
|
node: select$c(),
|
|
@@ -1561,7 +2342,7 @@ function createResourceRequest$c(config) {
|
|
|
1561
2342
|
const headers = {};
|
|
1562
2343
|
return {
|
|
1563
2344
|
baseUri: '/services/data/v58.0',
|
|
1564
|
-
basePath: '/connect/contextdefinition/
|
|
2345
|
+
basePath: '/connect/contextdefinition/attributetag/' + config.urlParams.contextAttributeTagId + '',
|
|
1565
2346
|
method: 'patch',
|
|
1566
2347
|
body: config.body,
|
|
1567
2348
|
urlParams: config.urlParams,
|
|
@@ -1571,34 +2352,34 @@ function createResourceRequest$c(config) {
|
|
|
1571
2352
|
};
|
|
1572
2353
|
}
|
|
1573
2354
|
|
|
1574
|
-
const
|
|
1575
|
-
displayName: '
|
|
2355
|
+
const updateContextAttributeTag_ConfigPropertyNames = {
|
|
2356
|
+
displayName: 'updateContextAttributeTag',
|
|
1576
2357
|
parameters: {
|
|
1577
|
-
required: ['
|
|
2358
|
+
required: ['contextAttributeTagId', 'contextAttributeTagInput'],
|
|
1578
2359
|
optional: []
|
|
1579
2360
|
}
|
|
1580
2361
|
};
|
|
1581
2362
|
function createResourceParams$c(config) {
|
|
1582
2363
|
const resourceParams = {
|
|
1583
2364
|
urlParams: {
|
|
1584
|
-
|
|
2365
|
+
contextAttributeTagId: config.contextAttributeTagId
|
|
1585
2366
|
},
|
|
1586
2367
|
body: {
|
|
1587
|
-
|
|
2368
|
+
contextAttributeTagInput: config.contextAttributeTagInput
|
|
1588
2369
|
}
|
|
1589
2370
|
};
|
|
1590
2371
|
return resourceParams;
|
|
1591
2372
|
}
|
|
1592
2373
|
function typeCheckConfig$c(untrustedConfig) {
|
|
1593
2374
|
const config = {};
|
|
1594
|
-
const
|
|
1595
|
-
if (typeof
|
|
1596
|
-
config.
|
|
2375
|
+
const untrustedConfig_contextAttributeTagId = untrustedConfig.contextAttributeTagId;
|
|
2376
|
+
if (typeof untrustedConfig_contextAttributeTagId === 'string') {
|
|
2377
|
+
config.contextAttributeTagId = untrustedConfig_contextAttributeTagId;
|
|
1597
2378
|
}
|
|
1598
|
-
const
|
|
1599
|
-
const
|
|
1600
|
-
if (
|
|
1601
|
-
config.
|
|
2379
|
+
const untrustedConfig_contextAttributeTagInput = untrustedConfig.contextAttributeTagInput;
|
|
2380
|
+
const referenceContextAttributeTagInputRepresentationValidationError = validate$9(untrustedConfig_contextAttributeTagInput);
|
|
2381
|
+
if (referenceContextAttributeTagInputRepresentationValidationError === null) {
|
|
2382
|
+
config.contextAttributeTagInput = untrustedConfig_contextAttributeTagInput;
|
|
1602
2383
|
}
|
|
1603
2384
|
return config;
|
|
1604
2385
|
}
|
|
@@ -1625,36 +2406,36 @@ function buildNetworkSnapshot$c(luvio, config, options) {
|
|
|
1625
2406
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1626
2407
|
}, () => getResponseCacheKeys$c(luvio, resourceParams, response.body));
|
|
1627
2408
|
}, (response) => {
|
|
1628
|
-
deepFreeze$
|
|
2409
|
+
deepFreeze$9(response);
|
|
1629
2410
|
throw response;
|
|
1630
2411
|
});
|
|
1631
2412
|
}
|
|
1632
|
-
const
|
|
1633
|
-
return function
|
|
1634
|
-
const config = validateAdapterConfig$c(untrustedConfig,
|
|
2413
|
+
const updateContextAttributeTagAdapterFactory = (luvio) => {
|
|
2414
|
+
return function updateContextAttributeTag(untrustedConfig) {
|
|
2415
|
+
const config = validateAdapterConfig$c(untrustedConfig, updateContextAttributeTag_ConfigPropertyNames);
|
|
1635
2416
|
// Invalid or incomplete config
|
|
1636
2417
|
if (config === null) {
|
|
1637
|
-
throw new Error('Invalid config for "
|
|
2418
|
+
throw new Error('Invalid config for "updateContextAttributeTag"');
|
|
1638
2419
|
}
|
|
1639
2420
|
return buildNetworkSnapshot$c(luvio, config);
|
|
1640
2421
|
};
|
|
1641
2422
|
};
|
|
1642
2423
|
|
|
1643
2424
|
function select$b(luvio, params) {
|
|
1644
|
-
return select$
|
|
2425
|
+
return select$p();
|
|
1645
2426
|
}
|
|
1646
2427
|
function keyBuilder$d(luvio, params) {
|
|
1647
|
-
return keyBuilder$
|
|
2428
|
+
return keyBuilder$q(luvio, {
|
|
1648
2429
|
id: params.urlParams.contextDefinitionId
|
|
1649
2430
|
});
|
|
1650
2431
|
}
|
|
1651
2432
|
function getResponseCacheKeys$b(luvio, resourceParams, response) {
|
|
1652
|
-
return getTypeCacheKeys$
|
|
2433
|
+
return getTypeCacheKeys$7(luvio, response);
|
|
1653
2434
|
}
|
|
1654
2435
|
function ingestSuccess$8(luvio, resourceParams, response, snapshotRefresh) {
|
|
1655
2436
|
const { body } = response;
|
|
1656
2437
|
const key = keyBuilder$d(luvio, resourceParams);
|
|
1657
|
-
luvio.storeIngest(key, ingest$
|
|
2438
|
+
luvio.storeIngest(key, ingest$7, body);
|
|
1658
2439
|
const snapshot = luvio.storeLookup({
|
|
1659
2440
|
recordId: key,
|
|
1660
2441
|
node: select$b(),
|
|
@@ -1671,10 +2452,10 @@ function ingestError$3(luvio, params, error, snapshotRefresh) {
|
|
|
1671
2452
|
const key = keyBuilder$d(luvio, params);
|
|
1672
2453
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1673
2454
|
const storeMetadataParams = {
|
|
1674
|
-
ttl: TTL$
|
|
2455
|
+
ttl: TTL$7,
|
|
1675
2456
|
namespace: keyPrefix,
|
|
1676
|
-
version: VERSION$
|
|
1677
|
-
representationName: RepresentationType$
|
|
2457
|
+
version: VERSION$7,
|
|
2458
|
+
representationName: RepresentationType$7
|
|
1678
2459
|
};
|
|
1679
2460
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
1680
2461
|
return errorSnapshot;
|
|
@@ -1877,7 +2658,7 @@ function validate$7(obj, path = 'ContextNodeRepresentation') {
|
|
|
1877
2658
|
for (let i = 0; i < obj_attributes.length; i++) {
|
|
1878
2659
|
const obj_attributes_item = obj_attributes[i];
|
|
1879
2660
|
const path_attributes_item = path_attributes + '[' + i + ']';
|
|
1880
|
-
const referencepath_attributes_itemValidationError = validate$
|
|
2661
|
+
const referencepath_attributes_itemValidationError = validate$b(obj_attributes_item, path_attributes_item);
|
|
1881
2662
|
if (referencepath_attributes_itemValidationError !== null) {
|
|
1882
2663
|
let message = 'Object doesn\'t match ContextAttributeRepresentation (at "' + path_attributes_item + '")\n';
|
|
1883
2664
|
message += referencepath_attributes_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1943,7 +2724,7 @@ function validate$7(obj, path = 'ContextNodeRepresentation') {
|
|
|
1943
2724
|
for (let i = 0; i < obj_tags.length; i++) {
|
|
1944
2725
|
const obj_tags_item = obj_tags[i];
|
|
1945
2726
|
const path_tags_item = path_tags + '[' + i + ']';
|
|
1946
|
-
const referencepath_tags_itemValidationError = validate$
|
|
2727
|
+
const referencepath_tags_itemValidationError = validate$c(obj_tags_item, path_tags_item);
|
|
1947
2728
|
if (referencepath_tags_itemValidationError !== null) {
|
|
1948
2729
|
let message = 'Object doesn\'t match ContextAttributeTagRepresentation (at "' + path_tags_item + '")\n';
|
|
1949
2730
|
message += referencepath_tags_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1984,7 +2765,7 @@ function deepFreeze$5(input) {
|
|
|
1984
2765
|
const input_attributes = input.attributes;
|
|
1985
2766
|
for (let i = 0; i < input_attributes.length; i++) {
|
|
1986
2767
|
const input_attributes_item = input_attributes[i];
|
|
1987
|
-
deepFreeze$
|
|
2768
|
+
deepFreeze$7(input_attributes_item);
|
|
1988
2769
|
}
|
|
1989
2770
|
ObjectFreeze(input_attributes);
|
|
1990
2771
|
const input_childNodes = input.childNodes;
|
|
@@ -1996,7 +2777,7 @@ function deepFreeze$5(input) {
|
|
|
1996
2777
|
const input_tags = input.tags;
|
|
1997
2778
|
for (let i = 0; i < input_tags.length; i++) {
|
|
1998
2779
|
const input_tags_item = input_tags[i];
|
|
1999
|
-
deepFreeze$
|
|
2780
|
+
deepFreeze$8(input_tags_item);
|
|
2000
2781
|
}
|
|
2001
2782
|
ObjectFreeze(input_tags);
|
|
2002
2783
|
ObjectFreeze(input);
|
|
@@ -2127,7 +2908,7 @@ function buildNetworkSnapshot$a(luvio, config, options) {
|
|
|
2127
2908
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2128
2909
|
}, () => getResponseCacheKeys$a(luvio, resourceParams, response.body));
|
|
2129
2910
|
}, (response) => {
|
|
2130
|
-
deepFreeze$
|
|
2911
|
+
deepFreeze$9(response);
|
|
2131
2912
|
throw response;
|
|
2132
2913
|
});
|
|
2133
2914
|
}
|
|
@@ -2222,7 +3003,7 @@ function buildNetworkSnapshot$9(luvio, config, options) {
|
|
|
2222
3003
|
return luvio.storeBroadcast();
|
|
2223
3004
|
}, () => getResponseCacheKeys$9(luvio, resourceParams));
|
|
2224
3005
|
}, (response) => {
|
|
2225
|
-
deepFreeze$
|
|
3006
|
+
deepFreeze$9(response);
|
|
2226
3007
|
throw response;
|
|
2227
3008
|
});
|
|
2228
3009
|
}
|
|
@@ -2488,7 +3269,7 @@ function buildNetworkSnapshot$7(luvio, config, options) {
|
|
|
2488
3269
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2489
3270
|
}, () => getResponseCacheKeys$7(luvio, resourceParams, response.body));
|
|
2490
3271
|
}, (response) => {
|
|
2491
|
-
deepFreeze$
|
|
3272
|
+
deepFreeze$9(response);
|
|
2492
3273
|
throw response;
|
|
2493
3274
|
});
|
|
2494
3275
|
}
|
|
@@ -3092,7 +3873,7 @@ function buildNetworkSnapshot$6(luvio, config, options) {
|
|
|
3092
3873
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3093
3874
|
}, () => getResponseCacheKeys$6(luvio, resourceParams, response.body));
|
|
3094
3875
|
}, (response) => {
|
|
3095
|
-
deepFreeze$
|
|
3876
|
+
deepFreeze$9(response);
|
|
3096
3877
|
throw response;
|
|
3097
3878
|
});
|
|
3098
3879
|
}
|
|
@@ -3187,7 +3968,7 @@ function buildNetworkSnapshot$5(luvio, config, options) {
|
|
|
3187
3968
|
return luvio.storeBroadcast();
|
|
3188
3969
|
}, () => getResponseCacheKeys$5(luvio, resourceParams));
|
|
3189
3970
|
}, (response) => {
|
|
3190
|
-
deepFreeze$
|
|
3971
|
+
deepFreeze$9(response);
|
|
3191
3972
|
throw response;
|
|
3192
3973
|
});
|
|
3193
3974
|
}
|
|
@@ -3453,7 +4234,7 @@ function buildNetworkSnapshot$3(luvio, config, options) {
|
|
|
3453
4234
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3454
4235
|
}, () => getResponseCacheKeys$3(luvio, resourceParams, response.body));
|
|
3455
4236
|
}, (response) => {
|
|
3456
|
-
deepFreeze$
|
|
4237
|
+
deepFreeze$9(response);
|
|
3457
4238
|
throw response;
|
|
3458
4239
|
});
|
|
3459
4240
|
}
|
|
@@ -3754,7 +4535,7 @@ function buildNetworkSnapshot$2(luvio, config, options) {
|
|
|
3754
4535
|
return luvio.storeBroadcast();
|
|
3755
4536
|
}, () => getResponseCacheKeys$2(luvio, resourceParams));
|
|
3756
4537
|
}, (response) => {
|
|
3757
|
-
deepFreeze$
|
|
4538
|
+
deepFreeze$9(response);
|
|
3758
4539
|
throw response;
|
|
3759
4540
|
});
|
|
3760
4541
|
}
|
|
@@ -3931,15 +4712,15 @@ const getContextDefinitionAdapterFactory = (luvio) => function IndustriesContext
|
|
|
3931
4712
|
};
|
|
3932
4713
|
|
|
3933
4714
|
function select(luvio, params) {
|
|
3934
|
-
return select$
|
|
4715
|
+
return select$p();
|
|
3935
4716
|
}
|
|
3936
4717
|
function getResponseCacheKeys(luvio, resourceParams, response) {
|
|
3937
|
-
return getTypeCacheKeys$
|
|
4718
|
+
return getTypeCacheKeys$7(luvio, response);
|
|
3938
4719
|
}
|
|
3939
4720
|
function ingestSuccess(luvio, resourceParams, response) {
|
|
3940
4721
|
const { body } = response;
|
|
3941
4722
|
const key = keyBuilderFromType$5(luvio, body);
|
|
3942
|
-
luvio.storeIngest(key, ingest$
|
|
4723
|
+
luvio.storeIngest(key, ingest$7, body);
|
|
3943
4724
|
const snapshot = luvio.storeLookup({
|
|
3944
4725
|
recordId: key,
|
|
3945
4726
|
node: select(),
|
|
@@ -3991,7 +4772,7 @@ function typeCheckConfig(untrustedConfig) {
|
|
|
3991
4772
|
config.contextDefinitionId = untrustedConfig_contextDefinitionId;
|
|
3992
4773
|
}
|
|
3993
4774
|
const untrustedConfig_contextDefinitionInput = untrustedConfig.contextDefinitionInput;
|
|
3994
|
-
const referenceContextDefinitionInputRepresentationValidationError = validate$
|
|
4775
|
+
const referenceContextDefinitionInputRepresentationValidationError = validate$e(untrustedConfig_contextDefinitionInput);
|
|
3995
4776
|
if (referenceContextDefinitionInputRepresentationValidationError === null) {
|
|
3996
4777
|
config.contextDefinitionInput = untrustedConfig_contextDefinitionInput;
|
|
3997
4778
|
}
|
|
@@ -4020,7 +4801,7 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
4020
4801
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4021
4802
|
}, () => getResponseCacheKeys(luvio, resourceParams, response.body));
|
|
4022
4803
|
}, (response) => {
|
|
4023
|
-
deepFreeze$
|
|
4804
|
+
deepFreeze$9(response);
|
|
4024
4805
|
throw response;
|
|
4025
4806
|
});
|
|
4026
4807
|
}
|
|
@@ -4035,4 +4816,4 @@ const updateContextDefinitionAdapterFactory = (luvio) => {
|
|
|
4035
4816
|
};
|
|
4036
4817
|
};
|
|
4037
4818
|
|
|
4038
|
-
export { createContextAttributeAdapterFactory, createContextDefinitionAdapterFactory, createContextDefinitionVersionAdapterFactory, createContextNodeAdapterFactory, deleteContextAttributeAdapterFactory, deleteContextDefinitionAdapterFactory, deleteContextDefinitionVersionAdapterFactory, deleteContextNodeAdapterFactory, getContextAttributeAdapterFactory, getContextDefinitionAdapterFactory, getContextDefinitionInfoAdapterFactory, getContextDefinitionListAdapterFactory, getContextDefinitionVersionAdapterFactory, getContextNodeAdapterFactory, updateContextAttributeAdapterFactory, updateContextDefinitionAdapterFactory, updateContextDefinitionVersionAdapterFactory, updateContextNodeAdapterFactory };
|
|
4819
|
+
export { createContextAttributeAdapterFactory, createContextAttributeTagAdapterFactory, createContextDefinitionAdapterFactory, createContextDefinitionVersionAdapterFactory, createContextNodeAdapterFactory, deleteContextAttributeAdapterFactory, deleteContextAttributeTagAdapterFactory, deleteContextDefinitionAdapterFactory, deleteContextDefinitionVersionAdapterFactory, deleteContextNodeAdapterFactory, getContextAttributeAdapterFactory, getContextAttributeTagAdapterFactory, getContextAttributeTagsByAttributeIdAdapterFactory, getContextDefinitionAdapterFactory, getContextDefinitionInfoAdapterFactory, getContextDefinitionListAdapterFactory, getContextDefinitionVersionAdapterFactory, getContextNodeAdapterFactory, updateContextAttributeAdapterFactory, updateContextAttributeTagAdapterFactory, updateContextDefinitionAdapterFactory, updateContextDefinitionVersionAdapterFactory, updateContextNodeAdapterFactory };
|