@salesforce/lds-adapters-experience-model 1.251.0 → 1.253.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/experience-model.js +706 -318
- package/dist/es/es2018/types/src/generated/adapters/getTypes.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +1 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +3 -1
- package/dist/es/es2018/types/src/generated/resources/postConnectExperienceModelTypes.d.ts +17 -0
- package/dist/es/es2018/types/src/generated/types/ExperienceModelDesignConfigInputRepresentation.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/types/ExperienceModelRenditionConfigInputRepresentation.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/types/ExperienceModelSchemaConfigInputRepresentation.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/types/ExperienceModelTypesCollectionRepresentation.d.ts +30 -0
- package/dist/es/es2018/types/src/generated/types/ExperienceModelTypesConfigInputRepresentation.d.ts +43 -0
- package/dist/es/es2018/types/src/generated/types/ExperienceModelTypesInputRepresentation.d.ts +32 -0
- package/dist/es/es2018/types/src/generated/types/ExperienceModelTypesRepresentation.d.ts +56 -0
- package/package.json +3 -2
- package/sfdc/index.js +730 -334
- package/src/raml/api.raml +126 -0
- package/src/raml/luvio.raml +28 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* For full license text, see the LICENSE.txt file
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$
|
|
7
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$7, typeCheckConfig as typeCheckConfig$7, StoreKeyMap, createResourceParams as createResourceParams$7 } from '@luvio/engine';
|
|
8
8
|
|
|
9
9
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
10
|
const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
|
|
@@ -80,7 +80,7 @@ function createLink(ref) {
|
|
|
80
80
|
};
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
function validate$
|
|
83
|
+
function validate$e(obj, path = 'ExperienceModelBlockTypeSummaryRepresentation') {
|
|
84
84
|
const v_error = (() => {
|
|
85
85
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
86
86
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -137,9 +137,9 @@ function validate$8(obj, path = 'ExperienceModelBlockTypeSummaryRepresentation')
|
|
|
137
137
|
return v_error === undefined ? null : v_error;
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
const TTL$
|
|
141
|
-
const VERSION$
|
|
142
|
-
function validate$
|
|
140
|
+
const TTL$6 = 3600000;
|
|
141
|
+
const VERSION$6 = "c4cd880e972cdf9faaa6db963fe35b31";
|
|
142
|
+
function validate$d(obj, path = 'ExperienceModelBlockTypeCollectionRepresentation') {
|
|
143
143
|
const v_error = (() => {
|
|
144
144
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
145
145
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -152,7 +152,7 @@ function validate$7(obj, path = 'ExperienceModelBlockTypeCollectionRepresentatio
|
|
|
152
152
|
for (let i = 0; i < obj_blockTypes.length; i++) {
|
|
153
153
|
const obj_blockTypes_item = obj_blockTypes[i];
|
|
154
154
|
const path_blockTypes_item = path_blockTypes + '[' + i + ']';
|
|
155
|
-
const referencepath_blockTypes_itemValidationError = validate$
|
|
155
|
+
const referencepath_blockTypes_itemValidationError = validate$e(obj_blockTypes_item, path_blockTypes_item);
|
|
156
156
|
if (referencepath_blockTypes_itemValidationError !== null) {
|
|
157
157
|
let message = 'Object doesn\'t match ExperienceModelBlockTypeSummaryRepresentation (at "' + path_blockTypes_item + '")\n';
|
|
158
158
|
message += referencepath_blockTypes_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -186,62 +186,62 @@ function validate$7(obj, path = 'ExperienceModelBlockTypeCollectionRepresentatio
|
|
|
186
186
|
})();
|
|
187
187
|
return v_error === undefined ? null : v_error;
|
|
188
188
|
}
|
|
189
|
-
const RepresentationType$
|
|
190
|
-
function normalize$
|
|
189
|
+
const RepresentationType$6 = 'ExperienceModelBlockTypeCollectionRepresentation';
|
|
190
|
+
function normalize$6(input, existing, path, luvio, store, timestamp) {
|
|
191
191
|
return input;
|
|
192
192
|
}
|
|
193
|
-
const select$
|
|
193
|
+
const select$d = function ExperienceModelBlockTypeCollectionRepresentationSelect() {
|
|
194
194
|
return {
|
|
195
195
|
kind: 'Fragment',
|
|
196
|
-
version: VERSION$
|
|
196
|
+
version: VERSION$6,
|
|
197
197
|
private: [],
|
|
198
198
|
opaque: true
|
|
199
199
|
};
|
|
200
200
|
};
|
|
201
|
-
function equals$
|
|
201
|
+
function equals$6(existing, incoming) {
|
|
202
202
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
203
203
|
return false;
|
|
204
204
|
}
|
|
205
205
|
return true;
|
|
206
206
|
}
|
|
207
|
-
const ingest$
|
|
207
|
+
const ingest$6 = function ExperienceModelBlockTypeCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
208
208
|
if (process.env.NODE_ENV !== 'production') {
|
|
209
|
-
const validateError = validate$
|
|
209
|
+
const validateError = validate$d(input);
|
|
210
210
|
if (validateError !== null) {
|
|
211
211
|
throw validateError;
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
214
|
const key = path.fullPath;
|
|
215
|
-
const ttlToUse = TTL$
|
|
216
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
215
|
+
const ttlToUse = TTL$6;
|
|
216
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$6, "ExperienceType", VERSION$6, RepresentationType$6, equals$6);
|
|
217
217
|
return createLink(key);
|
|
218
218
|
};
|
|
219
|
-
function getTypeCacheKeys$
|
|
219
|
+
function getTypeCacheKeys$6(rootKeySet, luvio, input, fullPathFactory) {
|
|
220
220
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
221
221
|
const rootKey = fullPathFactory();
|
|
222
222
|
rootKeySet.set(rootKey, {
|
|
223
223
|
namespace: keyPrefix,
|
|
224
|
-
representationName: RepresentationType$
|
|
224
|
+
representationName: RepresentationType$6,
|
|
225
225
|
mergeable: false
|
|
226
226
|
});
|
|
227
227
|
}
|
|
228
228
|
|
|
229
|
-
function select$
|
|
230
|
-
return select$
|
|
229
|
+
function select$c(luvio, params) {
|
|
230
|
+
return select$d();
|
|
231
231
|
}
|
|
232
|
-
function keyBuilder$
|
|
232
|
+
function keyBuilder$d(luvio, params) {
|
|
233
233
|
return keyPrefix + '::ExperienceModelBlockTypeCollectionRepresentation:(' + 'contentTypeFullyQualifiedName:' + params.queryParams.contentTypeFullyQualifiedName + ',' + 'designConfigTarget:' + params.queryParams.designConfigTarget + ',' + 'fullyQualifiedNames:' + params.queryParams.fullyQualifiedNames + ',' + 'language:' + params.queryParams.language + ',' + 'mixinTypeFullyQualifiedNames:' + params.queryParams.mixinTypeFullyQualifiedNames + ',' + 'page:' + params.queryParams.page + ',' + 'pageSize:' + params.queryParams.pageSize + ',' + 'renditionConfigTarget:' + params.queryParams.renditionConfigTarget + ',' + 'typeClassFullyQualifiedNames:' + params.queryParams.typeClassFullyQualifiedNames + ')';
|
|
234
234
|
}
|
|
235
|
-
function getResponseCacheKeys$
|
|
236
|
-
getTypeCacheKeys$
|
|
235
|
+
function getResponseCacheKeys$6(storeKeyMap, luvio, resourceParams, response) {
|
|
236
|
+
getTypeCacheKeys$6(storeKeyMap, luvio, response, () => keyBuilder$d(luvio, resourceParams));
|
|
237
237
|
}
|
|
238
|
-
function ingestSuccess$
|
|
238
|
+
function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
|
|
239
239
|
const { body } = response;
|
|
240
|
-
const key = keyBuilder$
|
|
241
|
-
luvio.storeIngest(key, ingest$
|
|
240
|
+
const key = keyBuilder$d(luvio, resourceParams);
|
|
241
|
+
luvio.storeIngest(key, ingest$6, body);
|
|
242
242
|
const snapshot = luvio.storeLookup({
|
|
243
243
|
recordId: key,
|
|
244
|
-
node: select$
|
|
244
|
+
node: select$c(),
|
|
245
245
|
variables: {},
|
|
246
246
|
}, snapshotRefresh);
|
|
247
247
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -252,19 +252,19 @@ function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
252
252
|
deepFreeze(snapshot.data);
|
|
253
253
|
return snapshot;
|
|
254
254
|
}
|
|
255
|
-
function ingestError$
|
|
256
|
-
const key = keyBuilder$
|
|
255
|
+
function ingestError$6(luvio, params, error, snapshotRefresh) {
|
|
256
|
+
const key = keyBuilder$d(luvio, params);
|
|
257
257
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
258
258
|
const storeMetadataParams = {
|
|
259
|
-
ttl: TTL$
|
|
259
|
+
ttl: TTL$6,
|
|
260
260
|
namespace: keyPrefix,
|
|
261
|
-
version: VERSION$
|
|
262
|
-
representationName: RepresentationType$
|
|
261
|
+
version: VERSION$6,
|
|
262
|
+
representationName: RepresentationType$6
|
|
263
263
|
};
|
|
264
264
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
265
265
|
return errorSnapshot;
|
|
266
266
|
}
|
|
267
|
-
function createResourceRequest$
|
|
267
|
+
function createResourceRequest$6(config) {
|
|
268
268
|
const headers = {};
|
|
269
269
|
return {
|
|
270
270
|
baseUri: '/services/data/v60.0',
|
|
@@ -278,7 +278,7 @@ function createResourceRequest$5(config) {
|
|
|
278
278
|
};
|
|
279
279
|
}
|
|
280
280
|
|
|
281
|
-
const adapterName$
|
|
281
|
+
const adapterName$6 = 'getBlockTypes';
|
|
282
282
|
const getBlockTypes_ConfigPropertyMetadata = [
|
|
283
283
|
generateParamConfigMetadata('contentTypeFullyQualifiedName', false, 1 /* QueryParameter */, 0 /* String */),
|
|
284
284
|
generateParamConfigMetadata('designConfigTarget', false, 1 /* QueryParameter */, 0 /* String */),
|
|
@@ -290,91 +290,91 @@ const getBlockTypes_ConfigPropertyMetadata = [
|
|
|
290
290
|
generateParamConfigMetadata('renditionConfigTarget', false, 1 /* QueryParameter */, 0 /* String */),
|
|
291
291
|
generateParamConfigMetadata('typeClassFullyQualifiedNames', false, 1 /* QueryParameter */, 0 /* String */, true),
|
|
292
292
|
];
|
|
293
|
-
const getBlockTypes_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
294
|
-
const createResourceParams$
|
|
295
|
-
function keyBuilder$
|
|
296
|
-
const resourceParams = createResourceParams$
|
|
297
|
-
return keyBuilder$
|
|
293
|
+
const getBlockTypes_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, getBlockTypes_ConfigPropertyMetadata);
|
|
294
|
+
const createResourceParams$6 = /*#__PURE__*/ createResourceParams$7(getBlockTypes_ConfigPropertyMetadata);
|
|
295
|
+
function keyBuilder$c(luvio, config) {
|
|
296
|
+
const resourceParams = createResourceParams$6(config);
|
|
297
|
+
return keyBuilder$d(luvio, resourceParams);
|
|
298
298
|
}
|
|
299
|
-
function typeCheckConfig$
|
|
299
|
+
function typeCheckConfig$6(untrustedConfig) {
|
|
300
300
|
const config = {};
|
|
301
|
-
typeCheckConfig$
|
|
301
|
+
typeCheckConfig$7(untrustedConfig, config, getBlockTypes_ConfigPropertyMetadata);
|
|
302
302
|
return config;
|
|
303
303
|
}
|
|
304
|
-
function validateAdapterConfig$
|
|
304
|
+
function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
|
|
305
305
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
306
306
|
return null;
|
|
307
307
|
}
|
|
308
308
|
if (process.env.NODE_ENV !== 'production') {
|
|
309
309
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
310
310
|
}
|
|
311
|
-
const config = typeCheckConfig$
|
|
311
|
+
const config = typeCheckConfig$6(untrustedConfig);
|
|
312
312
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
313
313
|
return null;
|
|
314
314
|
}
|
|
315
315
|
return config;
|
|
316
316
|
}
|
|
317
|
-
function adapterFragment$
|
|
318
|
-
createResourceParams$
|
|
319
|
-
return select$
|
|
317
|
+
function adapterFragment$6(luvio, config) {
|
|
318
|
+
createResourceParams$6(config);
|
|
319
|
+
return select$c();
|
|
320
320
|
}
|
|
321
|
-
function onFetchResponseSuccess$
|
|
322
|
-
const snapshot = ingestSuccess$
|
|
321
|
+
function onFetchResponseSuccess$6(luvio, config, resourceParams, response) {
|
|
322
|
+
const snapshot = ingestSuccess$6(luvio, resourceParams, response, {
|
|
323
323
|
config,
|
|
324
|
-
resolve: () => buildNetworkSnapshot$
|
|
324
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
325
325
|
});
|
|
326
326
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
327
327
|
}
|
|
328
|
-
function onFetchResponseError$
|
|
329
|
-
const snapshot = ingestError$
|
|
328
|
+
function onFetchResponseError$6(luvio, config, resourceParams, response) {
|
|
329
|
+
const snapshot = ingestError$6(luvio, resourceParams, response, {
|
|
330
330
|
config,
|
|
331
|
-
resolve: () => buildNetworkSnapshot$
|
|
331
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
332
332
|
});
|
|
333
333
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
334
334
|
}
|
|
335
|
-
function buildNetworkSnapshot$
|
|
336
|
-
const resourceParams = createResourceParams$
|
|
337
|
-
const request = createResourceRequest$
|
|
335
|
+
function buildNetworkSnapshot$6(luvio, config, options) {
|
|
336
|
+
const resourceParams = createResourceParams$6(config);
|
|
337
|
+
const request = createResourceRequest$6(resourceParams);
|
|
338
338
|
return luvio.dispatchResourceRequest(request, options)
|
|
339
339
|
.then((response) => {
|
|
340
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
340
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$6(luvio, config, resourceParams, response), () => {
|
|
341
341
|
const cache = new StoreKeyMap();
|
|
342
|
-
getResponseCacheKeys$
|
|
342
|
+
getResponseCacheKeys$6(cache, luvio, resourceParams, response.body);
|
|
343
343
|
return cache;
|
|
344
344
|
});
|
|
345
345
|
}, (response) => {
|
|
346
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
346
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$6(luvio, config, resourceParams, response));
|
|
347
347
|
});
|
|
348
348
|
}
|
|
349
|
-
function buildNetworkSnapshotCachePolicy$
|
|
350
|
-
return buildNetworkSnapshotCachePolicy$
|
|
349
|
+
function buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext) {
|
|
350
|
+
return buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext, buildNetworkSnapshot$6, undefined, false);
|
|
351
351
|
}
|
|
352
|
-
function buildCachedSnapshotCachePolicy$
|
|
352
|
+
function buildCachedSnapshotCachePolicy$6(context, storeLookup) {
|
|
353
353
|
const { luvio, config } = context;
|
|
354
354
|
const selector = {
|
|
355
|
-
recordId: keyBuilder$
|
|
356
|
-
node: adapterFragment$
|
|
355
|
+
recordId: keyBuilder$c(luvio, config),
|
|
356
|
+
node: adapterFragment$6(luvio, config),
|
|
357
357
|
variables: {},
|
|
358
358
|
};
|
|
359
359
|
const cacheSnapshot = storeLookup(selector, {
|
|
360
360
|
config,
|
|
361
|
-
resolve: () => buildNetworkSnapshot$
|
|
361
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
362
362
|
});
|
|
363
363
|
return cacheSnapshot;
|
|
364
364
|
}
|
|
365
365
|
const getBlockTypesAdapterFactory = (luvio) => function ExperienceType__getBlockTypes(untrustedConfig, requestContext) {
|
|
366
|
-
const config = validateAdapterConfig$
|
|
366
|
+
const config = validateAdapterConfig$6(untrustedConfig, getBlockTypes_ConfigPropertyNames);
|
|
367
367
|
// Invalid or incomplete config
|
|
368
368
|
if (config === null) {
|
|
369
369
|
return null;
|
|
370
370
|
}
|
|
371
371
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
372
|
-
buildCachedSnapshotCachePolicy$
|
|
372
|
+
buildCachedSnapshotCachePolicy$6, buildNetworkSnapshotCachePolicy$6);
|
|
373
373
|
};
|
|
374
374
|
|
|
375
|
-
const TTL$
|
|
376
|
-
const VERSION$
|
|
377
|
-
function validate$
|
|
375
|
+
const TTL$5 = 3600000;
|
|
376
|
+
const VERSION$5 = "5a3f5e1d42d8f0aa089e888ddac06972";
|
|
377
|
+
function validate$c(obj, path = 'ExperienceModelBlockTypeDetailRepresentation') {
|
|
378
378
|
const v_error = (() => {
|
|
379
379
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
380
380
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -459,62 +459,62 @@ function validate$6(obj, path = 'ExperienceModelBlockTypeDetailRepresentation')
|
|
|
459
459
|
})();
|
|
460
460
|
return v_error === undefined ? null : v_error;
|
|
461
461
|
}
|
|
462
|
-
const RepresentationType$
|
|
463
|
-
function normalize$
|
|
462
|
+
const RepresentationType$5 = 'ExperienceModelBlockTypeDetailRepresentation';
|
|
463
|
+
function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
464
464
|
return input;
|
|
465
465
|
}
|
|
466
|
-
const select$
|
|
466
|
+
const select$b = function ExperienceModelBlockTypeDetailRepresentationSelect() {
|
|
467
467
|
return {
|
|
468
468
|
kind: 'Fragment',
|
|
469
|
-
version: VERSION$
|
|
469
|
+
version: VERSION$5,
|
|
470
470
|
private: [],
|
|
471
471
|
opaque: true
|
|
472
472
|
};
|
|
473
473
|
};
|
|
474
|
-
function equals$
|
|
474
|
+
function equals$5(existing, incoming) {
|
|
475
475
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
476
476
|
return false;
|
|
477
477
|
}
|
|
478
478
|
return true;
|
|
479
479
|
}
|
|
480
|
-
const ingest$
|
|
480
|
+
const ingest$5 = function ExperienceModelBlockTypeDetailRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
481
481
|
if (process.env.NODE_ENV !== 'production') {
|
|
482
|
-
const validateError = validate$
|
|
482
|
+
const validateError = validate$c(input);
|
|
483
483
|
if (validateError !== null) {
|
|
484
484
|
throw validateError;
|
|
485
485
|
}
|
|
486
486
|
}
|
|
487
487
|
const key = path.fullPath;
|
|
488
|
-
const ttlToUse = TTL$
|
|
489
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
488
|
+
const ttlToUse = TTL$5;
|
|
489
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$5, "ExperienceType", VERSION$5, RepresentationType$5, equals$5);
|
|
490
490
|
return createLink(key);
|
|
491
491
|
};
|
|
492
|
-
function getTypeCacheKeys$
|
|
492
|
+
function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
|
|
493
493
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
494
494
|
const rootKey = fullPathFactory();
|
|
495
495
|
rootKeySet.set(rootKey, {
|
|
496
496
|
namespace: keyPrefix,
|
|
497
|
-
representationName: RepresentationType$
|
|
497
|
+
representationName: RepresentationType$5,
|
|
498
498
|
mergeable: false
|
|
499
499
|
});
|
|
500
500
|
}
|
|
501
501
|
|
|
502
|
-
function select$
|
|
503
|
-
return select$
|
|
502
|
+
function select$a(luvio, params) {
|
|
503
|
+
return select$b();
|
|
504
504
|
}
|
|
505
|
-
function keyBuilder$
|
|
505
|
+
function keyBuilder$b(luvio, params) {
|
|
506
506
|
return keyPrefix + '::ExperienceModelBlockTypeDetailRepresentation:(' + 'designConfigTarget:' + params.queryParams.designConfigTarget + ',' + 'includeSubSchemaDefinitions:' + params.queryParams.includeSubSchemaDefinitions + ',' + 'language:' + params.queryParams.language + ',' + 'renditionConfigTarget:' + params.queryParams.renditionConfigTarget + ',' + 'fullyQualifiedName:' + params.urlParams.fullyQualifiedName + ')';
|
|
507
507
|
}
|
|
508
|
-
function getResponseCacheKeys$
|
|
509
|
-
getTypeCacheKeys$
|
|
508
|
+
function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
|
|
509
|
+
getTypeCacheKeys$5(storeKeyMap, luvio, response, () => keyBuilder$b(luvio, resourceParams));
|
|
510
510
|
}
|
|
511
|
-
function ingestSuccess$
|
|
511
|
+
function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
|
|
512
512
|
const { body } = response;
|
|
513
|
-
const key = keyBuilder$
|
|
514
|
-
luvio.storeIngest(key, ingest$
|
|
513
|
+
const key = keyBuilder$b(luvio, resourceParams);
|
|
514
|
+
luvio.storeIngest(key, ingest$5, body);
|
|
515
515
|
const snapshot = luvio.storeLookup({
|
|
516
516
|
recordId: key,
|
|
517
|
-
node: select$
|
|
517
|
+
node: select$a(),
|
|
518
518
|
variables: {},
|
|
519
519
|
}, snapshotRefresh);
|
|
520
520
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -525,19 +525,19 @@ function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
525
525
|
deepFreeze(snapshot.data);
|
|
526
526
|
return snapshot;
|
|
527
527
|
}
|
|
528
|
-
function ingestError$
|
|
529
|
-
const key = keyBuilder$
|
|
528
|
+
function ingestError$5(luvio, params, error, snapshotRefresh) {
|
|
529
|
+
const key = keyBuilder$b(luvio, params);
|
|
530
530
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
531
531
|
const storeMetadataParams = {
|
|
532
|
-
ttl: TTL$
|
|
532
|
+
ttl: TTL$5,
|
|
533
533
|
namespace: keyPrefix,
|
|
534
|
-
version: VERSION$
|
|
535
|
-
representationName: RepresentationType$
|
|
534
|
+
version: VERSION$5,
|
|
535
|
+
representationName: RepresentationType$5
|
|
536
536
|
};
|
|
537
537
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
538
538
|
return errorSnapshot;
|
|
539
539
|
}
|
|
540
|
-
function createResourceRequest$
|
|
540
|
+
function createResourceRequest$5(config) {
|
|
541
541
|
const headers = {};
|
|
542
542
|
return {
|
|
543
543
|
baseUri: '/services/data/v60.0',
|
|
@@ -551,7 +551,7 @@ function createResourceRequest$4(config) {
|
|
|
551
551
|
};
|
|
552
552
|
}
|
|
553
553
|
|
|
554
|
-
const adapterName$
|
|
554
|
+
const adapterName$5 = 'getBlockType';
|
|
555
555
|
const getBlockType_ConfigPropertyMetadata = [
|
|
556
556
|
generateParamConfigMetadata('fullyQualifiedName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
557
557
|
generateParamConfigMetadata('designConfigTarget', false, 1 /* QueryParameter */, 0 /* String */),
|
|
@@ -559,89 +559,89 @@ const getBlockType_ConfigPropertyMetadata = [
|
|
|
559
559
|
generateParamConfigMetadata('language', false, 1 /* QueryParameter */, 0 /* String */),
|
|
560
560
|
generateParamConfigMetadata('renditionConfigTarget', false, 1 /* QueryParameter */, 0 /* String */),
|
|
561
561
|
];
|
|
562
|
-
const getBlockType_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
563
|
-
const createResourceParams$
|
|
564
|
-
function keyBuilder$
|
|
565
|
-
const resourceParams = createResourceParams$
|
|
566
|
-
return keyBuilder$
|
|
562
|
+
const getBlockType_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, getBlockType_ConfigPropertyMetadata);
|
|
563
|
+
const createResourceParams$5 = /*#__PURE__*/ createResourceParams$7(getBlockType_ConfigPropertyMetadata);
|
|
564
|
+
function keyBuilder$a(luvio, config) {
|
|
565
|
+
const resourceParams = createResourceParams$5(config);
|
|
566
|
+
return keyBuilder$b(luvio, resourceParams);
|
|
567
567
|
}
|
|
568
|
-
function typeCheckConfig$
|
|
568
|
+
function typeCheckConfig$5(untrustedConfig) {
|
|
569
569
|
const config = {};
|
|
570
|
-
typeCheckConfig$
|
|
570
|
+
typeCheckConfig$7(untrustedConfig, config, getBlockType_ConfigPropertyMetadata);
|
|
571
571
|
return config;
|
|
572
572
|
}
|
|
573
|
-
function validateAdapterConfig$
|
|
573
|
+
function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
|
|
574
574
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
575
575
|
return null;
|
|
576
576
|
}
|
|
577
577
|
if (process.env.NODE_ENV !== 'production') {
|
|
578
578
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
579
579
|
}
|
|
580
|
-
const config = typeCheckConfig$
|
|
580
|
+
const config = typeCheckConfig$5(untrustedConfig);
|
|
581
581
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
582
582
|
return null;
|
|
583
583
|
}
|
|
584
584
|
return config;
|
|
585
585
|
}
|
|
586
|
-
function adapterFragment$
|
|
587
|
-
createResourceParams$
|
|
588
|
-
return select$
|
|
586
|
+
function adapterFragment$5(luvio, config) {
|
|
587
|
+
createResourceParams$5(config);
|
|
588
|
+
return select$a();
|
|
589
589
|
}
|
|
590
|
-
function onFetchResponseSuccess$
|
|
591
|
-
const snapshot = ingestSuccess$
|
|
590
|
+
function onFetchResponseSuccess$5(luvio, config, resourceParams, response) {
|
|
591
|
+
const snapshot = ingestSuccess$5(luvio, resourceParams, response, {
|
|
592
592
|
config,
|
|
593
|
-
resolve: () => buildNetworkSnapshot$
|
|
593
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
594
594
|
});
|
|
595
595
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
596
596
|
}
|
|
597
|
-
function onFetchResponseError$
|
|
598
|
-
const snapshot = ingestError$
|
|
597
|
+
function onFetchResponseError$5(luvio, config, resourceParams, response) {
|
|
598
|
+
const snapshot = ingestError$5(luvio, resourceParams, response, {
|
|
599
599
|
config,
|
|
600
|
-
resolve: () => buildNetworkSnapshot$
|
|
600
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
601
601
|
});
|
|
602
602
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
603
603
|
}
|
|
604
|
-
function buildNetworkSnapshot$
|
|
605
|
-
const resourceParams = createResourceParams$
|
|
606
|
-
const request = createResourceRequest$
|
|
604
|
+
function buildNetworkSnapshot$5(luvio, config, options) {
|
|
605
|
+
const resourceParams = createResourceParams$5(config);
|
|
606
|
+
const request = createResourceRequest$5(resourceParams);
|
|
607
607
|
return luvio.dispatchResourceRequest(request, options)
|
|
608
608
|
.then((response) => {
|
|
609
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
609
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$5(luvio, config, resourceParams, response), () => {
|
|
610
610
|
const cache = new StoreKeyMap();
|
|
611
|
-
getResponseCacheKeys$
|
|
611
|
+
getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
|
|
612
612
|
return cache;
|
|
613
613
|
});
|
|
614
614
|
}, (response) => {
|
|
615
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
615
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$5(luvio, config, resourceParams, response));
|
|
616
616
|
});
|
|
617
617
|
}
|
|
618
|
-
function buildNetworkSnapshotCachePolicy$
|
|
619
|
-
return buildNetworkSnapshotCachePolicy$
|
|
618
|
+
function buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext) {
|
|
619
|
+
return buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext, buildNetworkSnapshot$5, undefined, false);
|
|
620
620
|
}
|
|
621
|
-
function buildCachedSnapshotCachePolicy$
|
|
621
|
+
function buildCachedSnapshotCachePolicy$5(context, storeLookup) {
|
|
622
622
|
const { luvio, config } = context;
|
|
623
623
|
const selector = {
|
|
624
|
-
recordId: keyBuilder$
|
|
625
|
-
node: adapterFragment$
|
|
624
|
+
recordId: keyBuilder$a(luvio, config),
|
|
625
|
+
node: adapterFragment$5(luvio, config),
|
|
626
626
|
variables: {},
|
|
627
627
|
};
|
|
628
628
|
const cacheSnapshot = storeLookup(selector, {
|
|
629
629
|
config,
|
|
630
|
-
resolve: () => buildNetworkSnapshot$
|
|
630
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
631
631
|
});
|
|
632
632
|
return cacheSnapshot;
|
|
633
633
|
}
|
|
634
634
|
const getBlockTypeAdapterFactory = (luvio) => function ExperienceType__getBlockType(untrustedConfig, requestContext) {
|
|
635
|
-
const config = validateAdapterConfig$
|
|
635
|
+
const config = validateAdapterConfig$5(untrustedConfig, getBlockType_ConfigPropertyNames);
|
|
636
636
|
// Invalid or incomplete config
|
|
637
637
|
if (config === null) {
|
|
638
638
|
return null;
|
|
639
639
|
}
|
|
640
640
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
641
|
-
buildCachedSnapshotCachePolicy$
|
|
641
|
+
buildCachedSnapshotCachePolicy$5, buildNetworkSnapshotCachePolicy$5);
|
|
642
642
|
};
|
|
643
643
|
|
|
644
|
-
function validate$
|
|
644
|
+
function validate$b(obj, path = 'ExperienceModelContentTypeSummaryRepresentation') {
|
|
645
645
|
const v_error = (() => {
|
|
646
646
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
647
647
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -688,9 +688,9 @@ function validate$5(obj, path = 'ExperienceModelContentTypeSummaryRepresentation
|
|
|
688
688
|
return v_error === undefined ? null : v_error;
|
|
689
689
|
}
|
|
690
690
|
|
|
691
|
-
const TTL$
|
|
692
|
-
const VERSION$
|
|
693
|
-
function validate$
|
|
691
|
+
const TTL$4 = 3600000;
|
|
692
|
+
const VERSION$4 = "30f1f19149230f10ac9197e0d9769c88";
|
|
693
|
+
function validate$a(obj, path = 'ExperienceModelContentTypeCollectionRepresentation') {
|
|
694
694
|
const v_error = (() => {
|
|
695
695
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
696
696
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -703,7 +703,7 @@ function validate$4(obj, path = 'ExperienceModelContentTypeCollectionRepresentat
|
|
|
703
703
|
for (let i = 0; i < obj_contentTypes.length; i++) {
|
|
704
704
|
const obj_contentTypes_item = obj_contentTypes[i];
|
|
705
705
|
const path_contentTypes_item = path_contentTypes + '[' + i + ']';
|
|
706
|
-
const referencepath_contentTypes_itemValidationError = validate$
|
|
706
|
+
const referencepath_contentTypes_itemValidationError = validate$b(obj_contentTypes_item, path_contentTypes_item);
|
|
707
707
|
if (referencepath_contentTypes_itemValidationError !== null) {
|
|
708
708
|
let message = 'Object doesn\'t match ExperienceModelContentTypeSummaryRepresentation (at "' + path_contentTypes_item + '")\n';
|
|
709
709
|
message += referencepath_contentTypes_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -739,62 +739,62 @@ function validate$4(obj, path = 'ExperienceModelContentTypeCollectionRepresentat
|
|
|
739
739
|
})();
|
|
740
740
|
return v_error === undefined ? null : v_error;
|
|
741
741
|
}
|
|
742
|
-
const RepresentationType$
|
|
743
|
-
function normalize$
|
|
742
|
+
const RepresentationType$4 = 'ExperienceModelContentTypeCollectionRepresentation';
|
|
743
|
+
function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
744
744
|
return input;
|
|
745
745
|
}
|
|
746
|
-
const select$
|
|
746
|
+
const select$9 = function ExperienceModelContentTypeCollectionRepresentationSelect() {
|
|
747
747
|
return {
|
|
748
748
|
kind: 'Fragment',
|
|
749
|
-
version: VERSION$
|
|
749
|
+
version: VERSION$4,
|
|
750
750
|
private: [],
|
|
751
751
|
opaque: true
|
|
752
752
|
};
|
|
753
753
|
};
|
|
754
|
-
function equals$
|
|
754
|
+
function equals$4(existing, incoming) {
|
|
755
755
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
756
756
|
return false;
|
|
757
757
|
}
|
|
758
758
|
return true;
|
|
759
759
|
}
|
|
760
|
-
const ingest$
|
|
760
|
+
const ingest$4 = function ExperienceModelContentTypeCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
761
761
|
if (process.env.NODE_ENV !== 'production') {
|
|
762
|
-
const validateError = validate$
|
|
762
|
+
const validateError = validate$a(input);
|
|
763
763
|
if (validateError !== null) {
|
|
764
764
|
throw validateError;
|
|
765
765
|
}
|
|
766
766
|
}
|
|
767
767
|
const key = path.fullPath;
|
|
768
|
-
const ttlToUse = TTL$
|
|
769
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
768
|
+
const ttlToUse = TTL$4;
|
|
769
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "ExperienceType", VERSION$4, RepresentationType$4, equals$4);
|
|
770
770
|
return createLink(key);
|
|
771
771
|
};
|
|
772
|
-
function getTypeCacheKeys$
|
|
772
|
+
function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
|
|
773
773
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
774
774
|
const rootKey = fullPathFactory();
|
|
775
775
|
rootKeySet.set(rootKey, {
|
|
776
776
|
namespace: keyPrefix,
|
|
777
|
-
representationName: RepresentationType$
|
|
777
|
+
representationName: RepresentationType$4,
|
|
778
778
|
mergeable: false
|
|
779
779
|
});
|
|
780
780
|
}
|
|
781
781
|
|
|
782
|
-
function select$
|
|
783
|
-
return select$
|
|
782
|
+
function select$8(luvio, params) {
|
|
783
|
+
return select$9();
|
|
784
784
|
}
|
|
785
|
-
function keyBuilder$
|
|
785
|
+
function keyBuilder$9(luvio, params) {
|
|
786
786
|
return keyPrefix + '::ExperienceModelContentTypeCollectionRepresentation:(' + 'contextRecordId:' + params.queryParams.contextRecordId + ',' + 'designConfigTarget:' + params.queryParams.designConfigTarget + ',' + 'fullyQualifiedNames:' + params.queryParams.fullyQualifiedNames + ',' + 'language:' + params.queryParams.language + ',' + 'mixinTypeFullyQualifiedNames:' + params.queryParams.mixinTypeFullyQualifiedNames + ',' + 'page:' + params.queryParams.page + ',' + 'pageSize:' + params.queryParams.pageSize + ',' + 'renditionConfigTarget:' + params.queryParams.renditionConfigTarget + ',' + 'typeClassFullyQualifiedNames:' + params.queryParams.typeClassFullyQualifiedNames + ')';
|
|
787
787
|
}
|
|
788
|
-
function getResponseCacheKeys$
|
|
789
|
-
getTypeCacheKeys$
|
|
788
|
+
function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
|
|
789
|
+
getTypeCacheKeys$4(storeKeyMap, luvio, response, () => keyBuilder$9(luvio, resourceParams));
|
|
790
790
|
}
|
|
791
|
-
function ingestSuccess$
|
|
791
|
+
function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
792
792
|
const { body } = response;
|
|
793
|
-
const key = keyBuilder$
|
|
794
|
-
luvio.storeIngest(key, ingest$
|
|
793
|
+
const key = keyBuilder$9(luvio, resourceParams);
|
|
794
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
795
795
|
const snapshot = luvio.storeLookup({
|
|
796
796
|
recordId: key,
|
|
797
|
-
node: select$
|
|
797
|
+
node: select$8(),
|
|
798
798
|
variables: {},
|
|
799
799
|
}, snapshotRefresh);
|
|
800
800
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -805,19 +805,19 @@ function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
805
805
|
deepFreeze(snapshot.data);
|
|
806
806
|
return snapshot;
|
|
807
807
|
}
|
|
808
|
-
function ingestError$
|
|
809
|
-
const key = keyBuilder$
|
|
808
|
+
function ingestError$4(luvio, params, error, snapshotRefresh) {
|
|
809
|
+
const key = keyBuilder$9(luvio, params);
|
|
810
810
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
811
811
|
const storeMetadataParams = {
|
|
812
|
-
ttl: TTL$
|
|
812
|
+
ttl: TTL$4,
|
|
813
813
|
namespace: keyPrefix,
|
|
814
|
-
version: VERSION$
|
|
815
|
-
representationName: RepresentationType$
|
|
814
|
+
version: VERSION$4,
|
|
815
|
+
representationName: RepresentationType$4
|
|
816
816
|
};
|
|
817
817
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
818
818
|
return errorSnapshot;
|
|
819
819
|
}
|
|
820
|
-
function createResourceRequest$
|
|
820
|
+
function createResourceRequest$4(config) {
|
|
821
821
|
const headers = {};
|
|
822
822
|
return {
|
|
823
823
|
baseUri: '/services/data/v60.0',
|
|
@@ -831,7 +831,7 @@ function createResourceRequest$3(config) {
|
|
|
831
831
|
};
|
|
832
832
|
}
|
|
833
833
|
|
|
834
|
-
const adapterName$
|
|
834
|
+
const adapterName$4 = 'getContentTypes';
|
|
835
835
|
const getContentTypes_ConfigPropertyMetadata = [
|
|
836
836
|
generateParamConfigMetadata('contextRecordId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
837
837
|
generateParamConfigMetadata('designConfigTarget', false, 1 /* QueryParameter */, 0 /* String */),
|
|
@@ -843,91 +843,91 @@ const getContentTypes_ConfigPropertyMetadata = [
|
|
|
843
843
|
generateParamConfigMetadata('renditionConfigTarget', false, 1 /* QueryParameter */, 0 /* String */),
|
|
844
844
|
generateParamConfigMetadata('typeClassFullyQualifiedNames', false, 1 /* QueryParameter */, 0 /* String */, true),
|
|
845
845
|
];
|
|
846
|
-
const getContentTypes_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
847
|
-
const createResourceParams$
|
|
848
|
-
function keyBuilder$
|
|
849
|
-
const resourceParams = createResourceParams$
|
|
850
|
-
return keyBuilder$
|
|
846
|
+
const getContentTypes_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getContentTypes_ConfigPropertyMetadata);
|
|
847
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$7(getContentTypes_ConfigPropertyMetadata);
|
|
848
|
+
function keyBuilder$8(luvio, config) {
|
|
849
|
+
const resourceParams = createResourceParams$4(config);
|
|
850
|
+
return keyBuilder$9(luvio, resourceParams);
|
|
851
851
|
}
|
|
852
|
-
function typeCheckConfig$
|
|
852
|
+
function typeCheckConfig$4(untrustedConfig) {
|
|
853
853
|
const config = {};
|
|
854
|
-
typeCheckConfig$
|
|
854
|
+
typeCheckConfig$7(untrustedConfig, config, getContentTypes_ConfigPropertyMetadata);
|
|
855
855
|
return config;
|
|
856
856
|
}
|
|
857
|
-
function validateAdapterConfig$
|
|
857
|
+
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
858
858
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
859
859
|
return null;
|
|
860
860
|
}
|
|
861
861
|
if (process.env.NODE_ENV !== 'production') {
|
|
862
862
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
863
863
|
}
|
|
864
|
-
const config = typeCheckConfig$
|
|
864
|
+
const config = typeCheckConfig$4(untrustedConfig);
|
|
865
865
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
866
866
|
return null;
|
|
867
867
|
}
|
|
868
868
|
return config;
|
|
869
869
|
}
|
|
870
|
-
function adapterFragment$
|
|
871
|
-
createResourceParams$
|
|
872
|
-
return select$
|
|
870
|
+
function adapterFragment$4(luvio, config) {
|
|
871
|
+
createResourceParams$4(config);
|
|
872
|
+
return select$8();
|
|
873
873
|
}
|
|
874
|
-
function onFetchResponseSuccess$
|
|
875
|
-
const snapshot = ingestSuccess$
|
|
874
|
+
function onFetchResponseSuccess$4(luvio, config, resourceParams, response) {
|
|
875
|
+
const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
|
|
876
876
|
config,
|
|
877
|
-
resolve: () => buildNetworkSnapshot$
|
|
877
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
878
878
|
});
|
|
879
879
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
880
880
|
}
|
|
881
|
-
function onFetchResponseError$
|
|
882
|
-
const snapshot = ingestError$
|
|
881
|
+
function onFetchResponseError$4(luvio, config, resourceParams, response) {
|
|
882
|
+
const snapshot = ingestError$4(luvio, resourceParams, response, {
|
|
883
883
|
config,
|
|
884
|
-
resolve: () => buildNetworkSnapshot$
|
|
884
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
885
885
|
});
|
|
886
886
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
887
887
|
}
|
|
888
|
-
function buildNetworkSnapshot$
|
|
889
|
-
const resourceParams = createResourceParams$
|
|
890
|
-
const request = createResourceRequest$
|
|
888
|
+
function buildNetworkSnapshot$4(luvio, config, options) {
|
|
889
|
+
const resourceParams = createResourceParams$4(config);
|
|
890
|
+
const request = createResourceRequest$4(resourceParams);
|
|
891
891
|
return luvio.dispatchResourceRequest(request, options)
|
|
892
892
|
.then((response) => {
|
|
893
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
893
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$4(luvio, config, resourceParams, response), () => {
|
|
894
894
|
const cache = new StoreKeyMap();
|
|
895
|
-
getResponseCacheKeys$
|
|
895
|
+
getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
|
|
896
896
|
return cache;
|
|
897
897
|
});
|
|
898
898
|
}, (response) => {
|
|
899
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
899
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$4(luvio, config, resourceParams, response));
|
|
900
900
|
});
|
|
901
901
|
}
|
|
902
|
-
function buildNetworkSnapshotCachePolicy$
|
|
903
|
-
return buildNetworkSnapshotCachePolicy$
|
|
902
|
+
function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
|
|
903
|
+
return buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, undefined, false);
|
|
904
904
|
}
|
|
905
|
-
function buildCachedSnapshotCachePolicy$
|
|
905
|
+
function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
|
|
906
906
|
const { luvio, config } = context;
|
|
907
907
|
const selector = {
|
|
908
|
-
recordId: keyBuilder$
|
|
909
|
-
node: adapterFragment$
|
|
908
|
+
recordId: keyBuilder$8(luvio, config),
|
|
909
|
+
node: adapterFragment$4(luvio, config),
|
|
910
910
|
variables: {},
|
|
911
911
|
};
|
|
912
912
|
const cacheSnapshot = storeLookup(selector, {
|
|
913
913
|
config,
|
|
914
|
-
resolve: () => buildNetworkSnapshot$
|
|
914
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
915
915
|
});
|
|
916
916
|
return cacheSnapshot;
|
|
917
917
|
}
|
|
918
918
|
const getContentTypesAdapterFactory = (luvio) => function ExperienceType__getContentTypes(untrustedConfig, requestContext) {
|
|
919
|
-
const config = validateAdapterConfig$
|
|
919
|
+
const config = validateAdapterConfig$4(untrustedConfig, getContentTypes_ConfigPropertyNames);
|
|
920
920
|
// Invalid or incomplete config
|
|
921
921
|
if (config === null) {
|
|
922
922
|
return null;
|
|
923
923
|
}
|
|
924
924
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
925
|
-
buildCachedSnapshotCachePolicy$
|
|
925
|
+
buildCachedSnapshotCachePolicy$4, buildNetworkSnapshotCachePolicy$4);
|
|
926
926
|
};
|
|
927
927
|
|
|
928
|
-
const TTL$
|
|
929
|
-
const VERSION$
|
|
930
|
-
function validate$
|
|
928
|
+
const TTL$3 = 3600000;
|
|
929
|
+
const VERSION$3 = "fb0265f1d37480d0821fd97a29a0f9c2";
|
|
930
|
+
function validate$9(obj, path = 'ExperienceModelContentTypeDetailRepresentation') {
|
|
931
931
|
const v_error = (() => {
|
|
932
932
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
933
933
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -996,62 +996,62 @@ function validate$3(obj, path = 'ExperienceModelContentTypeDetailRepresentation'
|
|
|
996
996
|
})();
|
|
997
997
|
return v_error === undefined ? null : v_error;
|
|
998
998
|
}
|
|
999
|
-
const RepresentationType$
|
|
1000
|
-
function normalize$
|
|
999
|
+
const RepresentationType$3 = 'ExperienceModelContentTypeDetailRepresentation';
|
|
1000
|
+
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
1001
1001
|
return input;
|
|
1002
1002
|
}
|
|
1003
|
-
const select$
|
|
1003
|
+
const select$7 = function ExperienceModelContentTypeDetailRepresentationSelect() {
|
|
1004
1004
|
return {
|
|
1005
1005
|
kind: 'Fragment',
|
|
1006
|
-
version: VERSION$
|
|
1006
|
+
version: VERSION$3,
|
|
1007
1007
|
private: [],
|
|
1008
1008
|
opaque: true
|
|
1009
1009
|
};
|
|
1010
1010
|
};
|
|
1011
|
-
function equals$
|
|
1011
|
+
function equals$3(existing, incoming) {
|
|
1012
1012
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
1013
1013
|
return false;
|
|
1014
1014
|
}
|
|
1015
1015
|
return true;
|
|
1016
1016
|
}
|
|
1017
|
-
const ingest$
|
|
1017
|
+
const ingest$3 = function ExperienceModelContentTypeDetailRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1018
1018
|
if (process.env.NODE_ENV !== 'production') {
|
|
1019
|
-
const validateError = validate$
|
|
1019
|
+
const validateError = validate$9(input);
|
|
1020
1020
|
if (validateError !== null) {
|
|
1021
1021
|
throw validateError;
|
|
1022
1022
|
}
|
|
1023
1023
|
}
|
|
1024
1024
|
const key = path.fullPath;
|
|
1025
|
-
const ttlToUse = TTL$
|
|
1026
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
1025
|
+
const ttlToUse = TTL$3;
|
|
1026
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "ExperienceType", VERSION$3, RepresentationType$3, equals$3);
|
|
1027
1027
|
return createLink(key);
|
|
1028
1028
|
};
|
|
1029
|
-
function getTypeCacheKeys$
|
|
1029
|
+
function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
1030
1030
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1031
1031
|
const rootKey = fullPathFactory();
|
|
1032
1032
|
rootKeySet.set(rootKey, {
|
|
1033
1033
|
namespace: keyPrefix,
|
|
1034
|
-
representationName: RepresentationType$
|
|
1034
|
+
representationName: RepresentationType$3,
|
|
1035
1035
|
mergeable: false
|
|
1036
1036
|
});
|
|
1037
1037
|
}
|
|
1038
1038
|
|
|
1039
|
-
function select$
|
|
1040
|
-
return select$
|
|
1039
|
+
function select$6(luvio, params) {
|
|
1040
|
+
return select$7();
|
|
1041
1041
|
}
|
|
1042
|
-
function keyBuilder$
|
|
1042
|
+
function keyBuilder$7(luvio, params) {
|
|
1043
1043
|
return keyPrefix + '::ExperienceModelContentTypeDetailRepresentation:(' + 'designConfigTarget:' + params.queryParams.designConfigTarget + ',' + 'includeSubSchemaDefinitions:' + params.queryParams.includeSubSchemaDefinitions + ',' + 'language:' + params.queryParams.language + ',' + 'renditionConfigTarget:' + params.queryParams.renditionConfigTarget + ',' + 'fullyQualifiedName:' + params.urlParams.fullyQualifiedName + ')';
|
|
1044
1044
|
}
|
|
1045
|
-
function getResponseCacheKeys$
|
|
1046
|
-
getTypeCacheKeys$
|
|
1045
|
+
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
1046
|
+
getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$7(luvio, resourceParams));
|
|
1047
1047
|
}
|
|
1048
|
-
function ingestSuccess$
|
|
1048
|
+
function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
1049
1049
|
const { body } = response;
|
|
1050
|
-
const key = keyBuilder$
|
|
1051
|
-
luvio.storeIngest(key, ingest$
|
|
1050
|
+
const key = keyBuilder$7(luvio, resourceParams);
|
|
1051
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
1052
1052
|
const snapshot = luvio.storeLookup({
|
|
1053
1053
|
recordId: key,
|
|
1054
|
-
node: select$
|
|
1054
|
+
node: select$6(),
|
|
1055
1055
|
variables: {},
|
|
1056
1056
|
}, snapshotRefresh);
|
|
1057
1057
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1062,19 +1062,19 @@ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1062
1062
|
deepFreeze(snapshot.data);
|
|
1063
1063
|
return snapshot;
|
|
1064
1064
|
}
|
|
1065
|
-
function ingestError$
|
|
1066
|
-
const key = keyBuilder$
|
|
1065
|
+
function ingestError$3(luvio, params, error, snapshotRefresh) {
|
|
1066
|
+
const key = keyBuilder$7(luvio, params);
|
|
1067
1067
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1068
1068
|
const storeMetadataParams = {
|
|
1069
|
-
ttl: TTL$
|
|
1069
|
+
ttl: TTL$3,
|
|
1070
1070
|
namespace: keyPrefix,
|
|
1071
|
-
version: VERSION$
|
|
1072
|
-
representationName: RepresentationType$
|
|
1071
|
+
version: VERSION$3,
|
|
1072
|
+
representationName: RepresentationType$3
|
|
1073
1073
|
};
|
|
1074
1074
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
1075
1075
|
return errorSnapshot;
|
|
1076
1076
|
}
|
|
1077
|
-
function createResourceRequest$
|
|
1077
|
+
function createResourceRequest$3(config) {
|
|
1078
1078
|
const headers = {};
|
|
1079
1079
|
return {
|
|
1080
1080
|
baseUri: '/services/data/v60.0',
|
|
@@ -1088,7 +1088,7 @@ function createResourceRequest$2(config) {
|
|
|
1088
1088
|
};
|
|
1089
1089
|
}
|
|
1090
1090
|
|
|
1091
|
-
const adapterName$
|
|
1091
|
+
const adapterName$3 = 'getContentType';
|
|
1092
1092
|
const getContentType_ConfigPropertyMetadata = [
|
|
1093
1093
|
generateParamConfigMetadata('fullyQualifiedName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1094
1094
|
generateParamConfigMetadata('designConfigTarget', false, 1 /* QueryParameter */, 0 /* String */),
|
|
@@ -1096,89 +1096,89 @@ const getContentType_ConfigPropertyMetadata = [
|
|
|
1096
1096
|
generateParamConfigMetadata('language', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1097
1097
|
generateParamConfigMetadata('renditionConfigTarget', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1098
1098
|
];
|
|
1099
|
-
const getContentType_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1100
|
-
const createResourceParams$
|
|
1101
|
-
function keyBuilder$
|
|
1102
|
-
const resourceParams = createResourceParams$
|
|
1103
|
-
return keyBuilder$
|
|
1099
|
+
const getContentType_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getContentType_ConfigPropertyMetadata);
|
|
1100
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$7(getContentType_ConfigPropertyMetadata);
|
|
1101
|
+
function keyBuilder$6(luvio, config) {
|
|
1102
|
+
const resourceParams = createResourceParams$3(config);
|
|
1103
|
+
return keyBuilder$7(luvio, resourceParams);
|
|
1104
1104
|
}
|
|
1105
|
-
function typeCheckConfig$
|
|
1105
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
1106
1106
|
const config = {};
|
|
1107
|
-
typeCheckConfig$
|
|
1107
|
+
typeCheckConfig$7(untrustedConfig, config, getContentType_ConfigPropertyMetadata);
|
|
1108
1108
|
return config;
|
|
1109
1109
|
}
|
|
1110
|
-
function validateAdapterConfig$
|
|
1110
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
1111
1111
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1112
1112
|
return null;
|
|
1113
1113
|
}
|
|
1114
1114
|
if (process.env.NODE_ENV !== 'production') {
|
|
1115
1115
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1116
1116
|
}
|
|
1117
|
-
const config = typeCheckConfig$
|
|
1117
|
+
const config = typeCheckConfig$3(untrustedConfig);
|
|
1118
1118
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1119
1119
|
return null;
|
|
1120
1120
|
}
|
|
1121
1121
|
return config;
|
|
1122
1122
|
}
|
|
1123
|
-
function adapterFragment$
|
|
1124
|
-
createResourceParams$
|
|
1125
|
-
return select$
|
|
1123
|
+
function adapterFragment$3(luvio, config) {
|
|
1124
|
+
createResourceParams$3(config);
|
|
1125
|
+
return select$6();
|
|
1126
1126
|
}
|
|
1127
|
-
function onFetchResponseSuccess$
|
|
1128
|
-
const snapshot = ingestSuccess$
|
|
1127
|
+
function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
|
|
1128
|
+
const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
|
|
1129
1129
|
config,
|
|
1130
|
-
resolve: () => buildNetworkSnapshot$
|
|
1130
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
1131
1131
|
});
|
|
1132
1132
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1133
1133
|
}
|
|
1134
|
-
function onFetchResponseError$
|
|
1135
|
-
const snapshot = ingestError$
|
|
1134
|
+
function onFetchResponseError$3(luvio, config, resourceParams, response) {
|
|
1135
|
+
const snapshot = ingestError$3(luvio, resourceParams, response, {
|
|
1136
1136
|
config,
|
|
1137
|
-
resolve: () => buildNetworkSnapshot$
|
|
1137
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
1138
1138
|
});
|
|
1139
1139
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1140
1140
|
}
|
|
1141
|
-
function buildNetworkSnapshot$
|
|
1142
|
-
const resourceParams = createResourceParams$
|
|
1143
|
-
const request = createResourceRequest$
|
|
1141
|
+
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
1142
|
+
const resourceParams = createResourceParams$3(config);
|
|
1143
|
+
const request = createResourceRequest$3(resourceParams);
|
|
1144
1144
|
return luvio.dispatchResourceRequest(request, options)
|
|
1145
1145
|
.then((response) => {
|
|
1146
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
1146
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
|
|
1147
1147
|
const cache = new StoreKeyMap();
|
|
1148
|
-
getResponseCacheKeys$
|
|
1148
|
+
getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
|
|
1149
1149
|
return cache;
|
|
1150
1150
|
});
|
|
1151
1151
|
}, (response) => {
|
|
1152
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
1152
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$3(luvio, config, resourceParams, response));
|
|
1153
1153
|
});
|
|
1154
1154
|
}
|
|
1155
|
-
function buildNetworkSnapshotCachePolicy$
|
|
1156
|
-
return buildNetworkSnapshotCachePolicy$
|
|
1155
|
+
function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
|
|
1156
|
+
return buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
|
|
1157
1157
|
}
|
|
1158
|
-
function buildCachedSnapshotCachePolicy$
|
|
1158
|
+
function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
|
|
1159
1159
|
const { luvio, config } = context;
|
|
1160
1160
|
const selector = {
|
|
1161
|
-
recordId: keyBuilder$
|
|
1162
|
-
node: adapterFragment$
|
|
1161
|
+
recordId: keyBuilder$6(luvio, config),
|
|
1162
|
+
node: adapterFragment$3(luvio, config),
|
|
1163
1163
|
variables: {},
|
|
1164
1164
|
};
|
|
1165
1165
|
const cacheSnapshot = storeLookup(selector, {
|
|
1166
1166
|
config,
|
|
1167
|
-
resolve: () => buildNetworkSnapshot$
|
|
1167
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
1168
1168
|
});
|
|
1169
1169
|
return cacheSnapshot;
|
|
1170
1170
|
}
|
|
1171
1171
|
const getContentTypeAdapterFactory = (luvio) => function ExperienceType__getContentType(untrustedConfig, requestContext) {
|
|
1172
|
-
const config = validateAdapterConfig$
|
|
1172
|
+
const config = validateAdapterConfig$3(untrustedConfig, getContentType_ConfigPropertyNames);
|
|
1173
1173
|
// Invalid or incomplete config
|
|
1174
1174
|
if (config === null) {
|
|
1175
1175
|
return null;
|
|
1176
1176
|
}
|
|
1177
1177
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1178
|
-
buildCachedSnapshotCachePolicy$
|
|
1178
|
+
buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
|
|
1179
1179
|
};
|
|
1180
1180
|
|
|
1181
|
-
function validate$
|
|
1181
|
+
function validate$8(obj, path = 'ExperienceModelPropertyTypeSummaryRepresentation') {
|
|
1182
1182
|
const v_error = (() => {
|
|
1183
1183
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1184
1184
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1223,9 +1223,9 @@ function validate$2(obj, path = 'ExperienceModelPropertyTypeSummaryRepresentatio
|
|
|
1223
1223
|
return v_error === undefined ? null : v_error;
|
|
1224
1224
|
}
|
|
1225
1225
|
|
|
1226
|
-
const TTL$
|
|
1227
|
-
const VERSION$
|
|
1228
|
-
function validate$
|
|
1226
|
+
const TTL$2 = 3600000;
|
|
1227
|
+
const VERSION$2 = "172e544645942d550fc1f07812bb85b6";
|
|
1228
|
+
function validate$7(obj, path = 'ExperienceModelPropertyTypeCollectionRepresentation') {
|
|
1229
1229
|
const v_error = (() => {
|
|
1230
1230
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1231
1231
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1264,7 +1264,7 @@ function validate$1(obj, path = 'ExperienceModelPropertyTypeCollectionRepresenta
|
|
|
1264
1264
|
for (let i = 0; i < obj_propertyTypes.length; i++) {
|
|
1265
1265
|
const obj_propertyTypes_item = obj_propertyTypes[i];
|
|
1266
1266
|
const path_propertyTypes_item = path_propertyTypes + '[' + i + ']';
|
|
1267
|
-
const referencepath_propertyTypes_itemValidationError = validate$
|
|
1267
|
+
const referencepath_propertyTypes_itemValidationError = validate$8(obj_propertyTypes_item, path_propertyTypes_item);
|
|
1268
1268
|
if (referencepath_propertyTypes_itemValidationError !== null) {
|
|
1269
1269
|
let message = 'Object doesn\'t match ExperienceModelPropertyTypeSummaryRepresentation (at "' + path_propertyTypes_item + '")\n';
|
|
1270
1270
|
message += referencepath_propertyTypes_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1274,11 +1274,263 @@ function validate$1(obj, path = 'ExperienceModelPropertyTypeCollectionRepresenta
|
|
|
1274
1274
|
})();
|
|
1275
1275
|
return v_error === undefined ? null : v_error;
|
|
1276
1276
|
}
|
|
1277
|
-
const RepresentationType$
|
|
1277
|
+
const RepresentationType$2 = 'ExperienceModelPropertyTypeCollectionRepresentation';
|
|
1278
|
+
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
1279
|
+
return input;
|
|
1280
|
+
}
|
|
1281
|
+
const select$5 = function ExperienceModelPropertyTypeCollectionRepresentationSelect() {
|
|
1282
|
+
return {
|
|
1283
|
+
kind: 'Fragment',
|
|
1284
|
+
version: VERSION$2,
|
|
1285
|
+
private: [],
|
|
1286
|
+
opaque: true
|
|
1287
|
+
};
|
|
1288
|
+
};
|
|
1289
|
+
function equals$2(existing, incoming) {
|
|
1290
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
1291
|
+
return false;
|
|
1292
|
+
}
|
|
1293
|
+
return true;
|
|
1294
|
+
}
|
|
1295
|
+
const ingest$2 = function ExperienceModelPropertyTypeCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1296
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1297
|
+
const validateError = validate$7(input);
|
|
1298
|
+
if (validateError !== null) {
|
|
1299
|
+
throw validateError;
|
|
1300
|
+
}
|
|
1301
|
+
}
|
|
1302
|
+
const key = path.fullPath;
|
|
1303
|
+
const ttlToUse = TTL$2;
|
|
1304
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "ExperienceType", VERSION$2, RepresentationType$2, equals$2);
|
|
1305
|
+
return createLink(key);
|
|
1306
|
+
};
|
|
1307
|
+
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
1308
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1309
|
+
const rootKey = fullPathFactory();
|
|
1310
|
+
rootKeySet.set(rootKey, {
|
|
1311
|
+
namespace: keyPrefix,
|
|
1312
|
+
representationName: RepresentationType$2,
|
|
1313
|
+
mergeable: false
|
|
1314
|
+
});
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1317
|
+
function select$4(luvio, params) {
|
|
1318
|
+
return select$5();
|
|
1319
|
+
}
|
|
1320
|
+
function keyBuilder$5(luvio, params) {
|
|
1321
|
+
return keyPrefix + '::ExperienceModelPropertyTypeCollectionRepresentation:(' + 'designConfigTarget:' + params.queryParams.designConfigTarget + ',' + 'fullyQualifiedNames:' + params.queryParams.fullyQualifiedNames + ',' + 'language:' + params.queryParams.language + ',' + 'page:' + params.queryParams.page + ',' + 'pageSize:' + params.queryParams.pageSize + ',' + 'renditionConfigTarget:' + params.queryParams.renditionConfigTarget + ')';
|
|
1322
|
+
}
|
|
1323
|
+
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
1324
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$5(luvio, resourceParams));
|
|
1325
|
+
}
|
|
1326
|
+
function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
1327
|
+
const { body } = response;
|
|
1328
|
+
const key = keyBuilder$5(luvio, resourceParams);
|
|
1329
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
1330
|
+
const snapshot = luvio.storeLookup({
|
|
1331
|
+
recordId: key,
|
|
1332
|
+
node: select$4(),
|
|
1333
|
+
variables: {},
|
|
1334
|
+
}, snapshotRefresh);
|
|
1335
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1336
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1337
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1338
|
+
}
|
|
1339
|
+
}
|
|
1340
|
+
deepFreeze(snapshot.data);
|
|
1341
|
+
return snapshot;
|
|
1342
|
+
}
|
|
1343
|
+
function ingestError$2(luvio, params, error, snapshotRefresh) {
|
|
1344
|
+
const key = keyBuilder$5(luvio, params);
|
|
1345
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1346
|
+
const storeMetadataParams = {
|
|
1347
|
+
ttl: TTL$2,
|
|
1348
|
+
namespace: keyPrefix,
|
|
1349
|
+
version: VERSION$2,
|
|
1350
|
+
representationName: RepresentationType$2
|
|
1351
|
+
};
|
|
1352
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
1353
|
+
return errorSnapshot;
|
|
1354
|
+
}
|
|
1355
|
+
function createResourceRequest$2(config) {
|
|
1356
|
+
const headers = {};
|
|
1357
|
+
return {
|
|
1358
|
+
baseUri: '/services/data/v60.0',
|
|
1359
|
+
basePath: '/connect/experience-model/property-types',
|
|
1360
|
+
method: 'get',
|
|
1361
|
+
body: null,
|
|
1362
|
+
urlParams: {},
|
|
1363
|
+
queryParams: config.queryParams,
|
|
1364
|
+
headers,
|
|
1365
|
+
priority: 'normal',
|
|
1366
|
+
};
|
|
1367
|
+
}
|
|
1368
|
+
|
|
1369
|
+
const adapterName$2 = 'getPropertyTypes';
|
|
1370
|
+
const getPropertyTypes_ConfigPropertyMetadata = [
|
|
1371
|
+
generateParamConfigMetadata('designConfigTarget', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1372
|
+
generateParamConfigMetadata('fullyQualifiedNames', false, 1 /* QueryParameter */, 0 /* String */, true),
|
|
1373
|
+
generateParamConfigMetadata('language', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1374
|
+
generateParamConfigMetadata('page', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
1375
|
+
generateParamConfigMetadata('pageSize', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
1376
|
+
generateParamConfigMetadata('renditionConfigTarget', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1377
|
+
];
|
|
1378
|
+
const getPropertyTypes_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getPropertyTypes_ConfigPropertyMetadata);
|
|
1379
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$7(getPropertyTypes_ConfigPropertyMetadata);
|
|
1380
|
+
function keyBuilder$4(luvio, config) {
|
|
1381
|
+
const resourceParams = createResourceParams$2(config);
|
|
1382
|
+
return keyBuilder$5(luvio, resourceParams);
|
|
1383
|
+
}
|
|
1384
|
+
function typeCheckConfig$2(untrustedConfig) {
|
|
1385
|
+
const config = {};
|
|
1386
|
+
typeCheckConfig$7(untrustedConfig, config, getPropertyTypes_ConfigPropertyMetadata);
|
|
1387
|
+
return config;
|
|
1388
|
+
}
|
|
1389
|
+
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
1390
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1391
|
+
return null;
|
|
1392
|
+
}
|
|
1393
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1394
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1395
|
+
}
|
|
1396
|
+
const config = typeCheckConfig$2(untrustedConfig);
|
|
1397
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1398
|
+
return null;
|
|
1399
|
+
}
|
|
1400
|
+
return config;
|
|
1401
|
+
}
|
|
1402
|
+
function adapterFragment$2(luvio, config) {
|
|
1403
|
+
createResourceParams$2(config);
|
|
1404
|
+
return select$4();
|
|
1405
|
+
}
|
|
1406
|
+
function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
|
|
1407
|
+
const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
|
|
1408
|
+
config,
|
|
1409
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
1410
|
+
});
|
|
1411
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1412
|
+
}
|
|
1413
|
+
function onFetchResponseError$2(luvio, config, resourceParams, response) {
|
|
1414
|
+
const snapshot = ingestError$2(luvio, resourceParams, response, {
|
|
1415
|
+
config,
|
|
1416
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
1417
|
+
});
|
|
1418
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1419
|
+
}
|
|
1420
|
+
function buildNetworkSnapshot$2(luvio, config, options) {
|
|
1421
|
+
const resourceParams = createResourceParams$2(config);
|
|
1422
|
+
const request = createResourceRequest$2(resourceParams);
|
|
1423
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1424
|
+
.then((response) => {
|
|
1425
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
|
|
1426
|
+
const cache = new StoreKeyMap();
|
|
1427
|
+
getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
|
|
1428
|
+
return cache;
|
|
1429
|
+
});
|
|
1430
|
+
}, (response) => {
|
|
1431
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
|
|
1432
|
+
});
|
|
1433
|
+
}
|
|
1434
|
+
function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
|
|
1435
|
+
return buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
|
|
1436
|
+
}
|
|
1437
|
+
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
1438
|
+
const { luvio, config } = context;
|
|
1439
|
+
const selector = {
|
|
1440
|
+
recordId: keyBuilder$4(luvio, config),
|
|
1441
|
+
node: adapterFragment$2(luvio, config),
|
|
1442
|
+
variables: {},
|
|
1443
|
+
};
|
|
1444
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
1445
|
+
config,
|
|
1446
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
1447
|
+
});
|
|
1448
|
+
return cacheSnapshot;
|
|
1449
|
+
}
|
|
1450
|
+
const getPropertyTypesAdapterFactory = (luvio) => function ExperienceType__getPropertyTypes(untrustedConfig, requestContext) {
|
|
1451
|
+
const config = validateAdapterConfig$2(untrustedConfig, getPropertyTypes_ConfigPropertyNames);
|
|
1452
|
+
// Invalid or incomplete config
|
|
1453
|
+
if (config === null) {
|
|
1454
|
+
return null;
|
|
1455
|
+
}
|
|
1456
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1457
|
+
buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
|
|
1458
|
+
};
|
|
1459
|
+
|
|
1460
|
+
const TTL$1 = 3600000;
|
|
1461
|
+
const VERSION$1 = "56f77a37a5711b32738bafbcb3eed520";
|
|
1462
|
+
function validate$6(obj, path = 'ExperienceModelPropertyTypeDetailRepresentation') {
|
|
1463
|
+
const v_error = (() => {
|
|
1464
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1465
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1466
|
+
}
|
|
1467
|
+
if (obj.description !== undefined) {
|
|
1468
|
+
const obj_description = obj.description;
|
|
1469
|
+
const path_description = path + '.description';
|
|
1470
|
+
if (typeof obj_description !== 'string') {
|
|
1471
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
1472
|
+
}
|
|
1473
|
+
}
|
|
1474
|
+
if (obj.designConfig !== undefined) {
|
|
1475
|
+
const obj_designConfig = obj.designConfig;
|
|
1476
|
+
const path_designConfig = path + '.designConfig';
|
|
1477
|
+
if (obj_designConfig === undefined) {
|
|
1478
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_designConfig + '" (at "' + path_designConfig + '")');
|
|
1479
|
+
}
|
|
1480
|
+
}
|
|
1481
|
+
const obj_developerName = obj.developerName;
|
|
1482
|
+
const path_developerName = path + '.developerName';
|
|
1483
|
+
if (typeof obj_developerName !== 'string') {
|
|
1484
|
+
return new TypeError('Expected "string" but received "' + typeof obj_developerName + '" (at "' + path_developerName + '")');
|
|
1485
|
+
}
|
|
1486
|
+
if (obj.id !== undefined) {
|
|
1487
|
+
const obj_id = obj.id;
|
|
1488
|
+
const path_id = path + '.id';
|
|
1489
|
+
if (typeof obj_id !== 'string') {
|
|
1490
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
1491
|
+
}
|
|
1492
|
+
}
|
|
1493
|
+
const obj_namespacePrefix = obj.namespacePrefix;
|
|
1494
|
+
const path_namespacePrefix = path + '.namespacePrefix';
|
|
1495
|
+
if (typeof obj_namespacePrefix !== 'string') {
|
|
1496
|
+
return new TypeError('Expected "string" but received "' + typeof obj_namespacePrefix + '" (at "' + path_namespacePrefix + '")');
|
|
1497
|
+
}
|
|
1498
|
+
if (obj.renditionConfig !== undefined) {
|
|
1499
|
+
const obj_renditionConfig = obj.renditionConfig;
|
|
1500
|
+
const path_renditionConfig = path + '.renditionConfig';
|
|
1501
|
+
if (obj_renditionConfig === undefined) {
|
|
1502
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_renditionConfig + '" (at "' + path_renditionConfig + '")');
|
|
1503
|
+
}
|
|
1504
|
+
}
|
|
1505
|
+
const obj_schema = obj.schema;
|
|
1506
|
+
const path_schema = path + '.schema';
|
|
1507
|
+
if (typeof obj_schema !== 'object' || ArrayIsArray(obj_schema) || obj_schema === null) {
|
|
1508
|
+
return new TypeError('Expected "object" but received "' + typeof obj_schema + '" (at "' + path_schema + '")');
|
|
1509
|
+
}
|
|
1510
|
+
const obj_schema_keys = ObjectKeys(obj_schema);
|
|
1511
|
+
for (let i = 0; i < obj_schema_keys.length; i++) {
|
|
1512
|
+
const key = obj_schema_keys[i];
|
|
1513
|
+
const obj_schema_prop = obj_schema[key];
|
|
1514
|
+
const path_schema_prop = path_schema + '["' + key + '"]';
|
|
1515
|
+
if (obj_schema_prop === undefined) {
|
|
1516
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_schema_prop + '" (at "' + path_schema_prop + '")');
|
|
1517
|
+
}
|
|
1518
|
+
}
|
|
1519
|
+
if (obj.title !== undefined) {
|
|
1520
|
+
const obj_title = obj.title;
|
|
1521
|
+
const path_title = path + '.title';
|
|
1522
|
+
if (typeof obj_title !== 'string') {
|
|
1523
|
+
return new TypeError('Expected "string" but received "' + typeof obj_title + '" (at "' + path_title + '")');
|
|
1524
|
+
}
|
|
1525
|
+
}
|
|
1526
|
+
})();
|
|
1527
|
+
return v_error === undefined ? null : v_error;
|
|
1528
|
+
}
|
|
1529
|
+
const RepresentationType$1 = 'ExperienceModelPropertyTypeDetailRepresentation';
|
|
1278
1530
|
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
1279
1531
|
return input;
|
|
1280
1532
|
}
|
|
1281
|
-
const select$3 = function
|
|
1533
|
+
const select$3 = function ExperienceModelPropertyTypeDetailRepresentationSelect() {
|
|
1282
1534
|
return {
|
|
1283
1535
|
kind: 'Fragment',
|
|
1284
1536
|
version: VERSION$1,
|
|
@@ -1292,9 +1544,9 @@ function equals$1(existing, incoming) {
|
|
|
1292
1544
|
}
|
|
1293
1545
|
return true;
|
|
1294
1546
|
}
|
|
1295
|
-
const ingest$1 = function
|
|
1547
|
+
const ingest$1 = function ExperienceModelPropertyTypeDetailRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1296
1548
|
if (process.env.NODE_ENV !== 'production') {
|
|
1297
|
-
const validateError = validate$
|
|
1549
|
+
const validateError = validate$6(input);
|
|
1298
1550
|
if (validateError !== null) {
|
|
1299
1551
|
throw validateError;
|
|
1300
1552
|
}
|
|
@@ -1318,7 +1570,7 @@ function select$2(luvio, params) {
|
|
|
1318
1570
|
return select$3();
|
|
1319
1571
|
}
|
|
1320
1572
|
function keyBuilder$3(luvio, params) {
|
|
1321
|
-
return keyPrefix + '::
|
|
1573
|
+
return keyPrefix + '::ExperienceModelPropertyTypeDetailRepresentation:(' + 'designConfigTarget:' + params.queryParams.designConfigTarget + ',' + 'includeSubSchemaDefinitions:' + params.queryParams.includeSubSchemaDefinitions + ',' + 'language:' + params.queryParams.language + ',' + 'renditionConfigTarget:' + params.queryParams.renditionConfigTarget + ',' + 'fullyQualifiedName:' + params.urlParams.fullyQualifiedName + ')';
|
|
1322
1574
|
}
|
|
1323
1575
|
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
1324
1576
|
getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$3(luvio, resourceParams));
|
|
@@ -1356,34 +1608,33 @@ function createResourceRequest$1(config) {
|
|
|
1356
1608
|
const headers = {};
|
|
1357
1609
|
return {
|
|
1358
1610
|
baseUri: '/services/data/v60.0',
|
|
1359
|
-
basePath: '/connect/experience-model/property-types',
|
|
1611
|
+
basePath: '/connect/experience-model/property-types/' + config.urlParams.fullyQualifiedName + '',
|
|
1360
1612
|
method: 'get',
|
|
1361
1613
|
body: null,
|
|
1362
|
-
urlParams:
|
|
1614
|
+
urlParams: config.urlParams,
|
|
1363
1615
|
queryParams: config.queryParams,
|
|
1364
1616
|
headers,
|
|
1365
1617
|
priority: 'normal',
|
|
1366
1618
|
};
|
|
1367
1619
|
}
|
|
1368
1620
|
|
|
1369
|
-
const adapterName$1 = '
|
|
1370
|
-
const
|
|
1621
|
+
const adapterName$1 = 'getPropertyType';
|
|
1622
|
+
const getPropertyType_ConfigPropertyMetadata = [
|
|
1623
|
+
generateParamConfigMetadata('fullyQualifiedName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1371
1624
|
generateParamConfigMetadata('designConfigTarget', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1372
|
-
generateParamConfigMetadata('
|
|
1625
|
+
generateParamConfigMetadata('includeSubSchemaDefinitions', false, 1 /* QueryParameter */, 1 /* Boolean */),
|
|
1373
1626
|
generateParamConfigMetadata('language', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1374
|
-
generateParamConfigMetadata('page', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
1375
|
-
generateParamConfigMetadata('pageSize', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
1376
1627
|
generateParamConfigMetadata('renditionConfigTarget', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1377
1628
|
];
|
|
1378
|
-
const
|
|
1379
|
-
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$
|
|
1629
|
+
const getPropertyType_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getPropertyType_ConfigPropertyMetadata);
|
|
1630
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$7(getPropertyType_ConfigPropertyMetadata);
|
|
1380
1631
|
function keyBuilder$2(luvio, config) {
|
|
1381
1632
|
const resourceParams = createResourceParams$1(config);
|
|
1382
1633
|
return keyBuilder$3(luvio, resourceParams);
|
|
1383
1634
|
}
|
|
1384
1635
|
function typeCheckConfig$1(untrustedConfig) {
|
|
1385
1636
|
const config = {};
|
|
1386
|
-
typeCheckConfig$
|
|
1637
|
+
typeCheckConfig$7(untrustedConfig, config, getPropertyType_ConfigPropertyMetadata);
|
|
1387
1638
|
return config;
|
|
1388
1639
|
}
|
|
1389
1640
|
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
@@ -1432,7 +1683,7 @@ function buildNetworkSnapshot$1(luvio, config, options) {
|
|
|
1432
1683
|
});
|
|
1433
1684
|
}
|
|
1434
1685
|
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
1435
|
-
return buildNetworkSnapshotCachePolicy$
|
|
1686
|
+
return buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
|
|
1436
1687
|
}
|
|
1437
1688
|
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
1438
1689
|
const { luvio, config } = context;
|
|
@@ -1447,8 +1698,8 @@ function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
|
1447
1698
|
});
|
|
1448
1699
|
return cacheSnapshot;
|
|
1449
1700
|
}
|
|
1450
|
-
const
|
|
1451
|
-
const config = validateAdapterConfig$1(untrustedConfig,
|
|
1701
|
+
const getPropertyTypeAdapterFactory = (luvio) => function ExperienceType__getPropertyType(untrustedConfig, requestContext) {
|
|
1702
|
+
const config = validateAdapterConfig$1(untrustedConfig, getPropertyType_ConfigPropertyNames);
|
|
1452
1703
|
// Invalid or incomplete config
|
|
1453
1704
|
if (config === null) {
|
|
1454
1705
|
return null;
|
|
@@ -1457,13 +1708,115 @@ const getPropertyTypesAdapterFactory = (luvio) => function ExperienceType__getPr
|
|
|
1457
1708
|
buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
|
|
1458
1709
|
};
|
|
1459
1710
|
|
|
1460
|
-
|
|
1461
|
-
const
|
|
1462
|
-
|
|
1711
|
+
function validate$5(obj, path = 'ExperienceModelDesignConfigInputRepresentation') {
|
|
1712
|
+
const v_error = (() => {
|
|
1713
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1714
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1715
|
+
}
|
|
1716
|
+
if (obj.target !== undefined) {
|
|
1717
|
+
const obj_target = obj.target;
|
|
1718
|
+
const path_target = path + '.target';
|
|
1719
|
+
if (typeof obj_target !== 'string') {
|
|
1720
|
+
return new TypeError('Expected "string" but received "' + typeof obj_target + '" (at "' + path_target + '")');
|
|
1721
|
+
}
|
|
1722
|
+
}
|
|
1723
|
+
})();
|
|
1724
|
+
return v_error === undefined ? null : v_error;
|
|
1725
|
+
}
|
|
1726
|
+
|
|
1727
|
+
function validate$4(obj, path = 'ExperienceModelRenditionConfigInputRepresentation') {
|
|
1728
|
+
const v_error = (() => {
|
|
1729
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1730
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1731
|
+
}
|
|
1732
|
+
if (obj.target !== undefined) {
|
|
1733
|
+
const obj_target = obj.target;
|
|
1734
|
+
const path_target = path + '.target';
|
|
1735
|
+
if (typeof obj_target !== 'string') {
|
|
1736
|
+
return new TypeError('Expected "string" but received "' + typeof obj_target + '" (at "' + path_target + '")');
|
|
1737
|
+
}
|
|
1738
|
+
}
|
|
1739
|
+
})();
|
|
1740
|
+
return v_error === undefined ? null : v_error;
|
|
1741
|
+
}
|
|
1742
|
+
|
|
1743
|
+
function validate$3(obj, path = 'ExperienceModelSchemaConfigInputRepresentation') {
|
|
1744
|
+
const v_error = (() => {
|
|
1745
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1746
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1747
|
+
}
|
|
1748
|
+
if (obj.subSchemaDefinitions !== undefined) {
|
|
1749
|
+
const obj_subSchemaDefinitions = obj.subSchemaDefinitions;
|
|
1750
|
+
const path_subSchemaDefinitions = path + '.subSchemaDefinitions';
|
|
1751
|
+
if (typeof obj_subSchemaDefinitions !== 'boolean') {
|
|
1752
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_subSchemaDefinitions + '" (at "' + path_subSchemaDefinitions + '")');
|
|
1753
|
+
}
|
|
1754
|
+
}
|
|
1755
|
+
})();
|
|
1756
|
+
return v_error === undefined ? null : v_error;
|
|
1757
|
+
}
|
|
1758
|
+
|
|
1759
|
+
function validate$2(obj, path = 'ExperienceModelTypesConfigInputRepresentation') {
|
|
1760
|
+
const v_error = (() => {
|
|
1761
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1762
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1763
|
+
}
|
|
1764
|
+
const obj_descriptor = obj.descriptor;
|
|
1765
|
+
const path_descriptor = path + '.descriptor';
|
|
1766
|
+
if (typeof obj_descriptor !== 'string') {
|
|
1767
|
+
return new TypeError('Expected "string" but received "' + typeof obj_descriptor + '" (at "' + path_descriptor + '")');
|
|
1768
|
+
}
|
|
1769
|
+
if (obj.designConfig !== undefined) {
|
|
1770
|
+
const obj_designConfig = obj.designConfig;
|
|
1771
|
+
const path_designConfig = path + '.designConfig';
|
|
1772
|
+
const referencepath_designConfigValidationError = validate$5(obj_designConfig, path_designConfig);
|
|
1773
|
+
if (referencepath_designConfigValidationError !== null) {
|
|
1774
|
+
let message = 'Object doesn\'t match ExperienceModelDesignConfigInputRepresentation (at "' + path_designConfig + '")\n';
|
|
1775
|
+
message += referencepath_designConfigValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1776
|
+
return new TypeError(message);
|
|
1777
|
+
}
|
|
1778
|
+
}
|
|
1779
|
+
if (obj.renditionConfig !== undefined) {
|
|
1780
|
+
const obj_renditionConfig = obj.renditionConfig;
|
|
1781
|
+
const path_renditionConfig = path + '.renditionConfig';
|
|
1782
|
+
const referencepath_renditionConfigValidationError = validate$4(obj_renditionConfig, path_renditionConfig);
|
|
1783
|
+
if (referencepath_renditionConfigValidationError !== null) {
|
|
1784
|
+
let message = 'Object doesn\'t match ExperienceModelRenditionConfigInputRepresentation (at "' + path_renditionConfig + '")\n';
|
|
1785
|
+
message += referencepath_renditionConfigValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1786
|
+
return new TypeError(message);
|
|
1787
|
+
}
|
|
1788
|
+
}
|
|
1789
|
+
if (obj.schemaConfig !== undefined) {
|
|
1790
|
+
const obj_schemaConfig = obj.schemaConfig;
|
|
1791
|
+
const path_schemaConfig = path + '.schemaConfig';
|
|
1792
|
+
const referencepath_schemaConfigValidationError = validate$3(obj_schemaConfig, path_schemaConfig);
|
|
1793
|
+
if (referencepath_schemaConfigValidationError !== null) {
|
|
1794
|
+
let message = 'Object doesn\'t match ExperienceModelSchemaConfigInputRepresentation (at "' + path_schemaConfig + '")\n';
|
|
1795
|
+
message += referencepath_schemaConfigValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1796
|
+
return new TypeError(message);
|
|
1797
|
+
}
|
|
1798
|
+
}
|
|
1799
|
+
if (obj.sourceDescriptor !== undefined) {
|
|
1800
|
+
const obj_sourceDescriptor = obj.sourceDescriptor;
|
|
1801
|
+
const path_sourceDescriptor = path + '.sourceDescriptor';
|
|
1802
|
+
if (typeof obj_sourceDescriptor !== 'string') {
|
|
1803
|
+
return new TypeError('Expected "string" but received "' + typeof obj_sourceDescriptor + '" (at "' + path_sourceDescriptor + '")');
|
|
1804
|
+
}
|
|
1805
|
+
}
|
|
1806
|
+
})();
|
|
1807
|
+
return v_error === undefined ? null : v_error;
|
|
1808
|
+
}
|
|
1809
|
+
|
|
1810
|
+
function validate$1(obj, path = 'ExperienceModelTypesRepresentation') {
|
|
1463
1811
|
const v_error = (() => {
|
|
1464
1812
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1465
1813
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1466
1814
|
}
|
|
1815
|
+
const obj_bundleType = obj.bundleType;
|
|
1816
|
+
const path_bundleType = path + '.bundleType';
|
|
1817
|
+
if (typeof obj_bundleType !== 'string') {
|
|
1818
|
+
return new TypeError('Expected "string" but received "' + typeof obj_bundleType + '" (at "' + path_bundleType + '")');
|
|
1819
|
+
}
|
|
1467
1820
|
if (obj.description !== undefined) {
|
|
1468
1821
|
const obj_description = obj.description;
|
|
1469
1822
|
const path_description = path + '.description';
|
|
@@ -1474,8 +1827,8 @@ function validate(obj, path = 'ExperienceModelPropertyTypeDetailRepresentation')
|
|
|
1474
1827
|
if (obj.designConfig !== undefined) {
|
|
1475
1828
|
const obj_designConfig = obj.designConfig;
|
|
1476
1829
|
const path_designConfig = path + '.designConfig';
|
|
1477
|
-
if (obj_designConfig ===
|
|
1478
|
-
return new TypeError('Expected "
|
|
1830
|
+
if (typeof obj_designConfig !== 'object' || ArrayIsArray(obj_designConfig) || obj_designConfig === null) {
|
|
1831
|
+
return new TypeError('Expected "object" but received "' + typeof obj_designConfig + '" (at "' + path_designConfig + '")');
|
|
1479
1832
|
}
|
|
1480
1833
|
}
|
|
1481
1834
|
const obj_developerName = obj.developerName;
|
|
@@ -1498,22 +1851,15 @@ function validate(obj, path = 'ExperienceModelPropertyTypeDetailRepresentation')
|
|
|
1498
1851
|
if (obj.renditionConfig !== undefined) {
|
|
1499
1852
|
const obj_renditionConfig = obj.renditionConfig;
|
|
1500
1853
|
const path_renditionConfig = path + '.renditionConfig';
|
|
1501
|
-
if (obj_renditionConfig ===
|
|
1502
|
-
return new TypeError('Expected "
|
|
1854
|
+
if (typeof obj_renditionConfig !== 'object' || ArrayIsArray(obj_renditionConfig) || obj_renditionConfig === null) {
|
|
1855
|
+
return new TypeError('Expected "object" but received "' + typeof obj_renditionConfig + '" (at "' + path_renditionConfig + '")');
|
|
1503
1856
|
}
|
|
1504
1857
|
}
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
const obj_schema_keys = ObjectKeys(obj_schema);
|
|
1511
|
-
for (let i = 0; i < obj_schema_keys.length; i++) {
|
|
1512
|
-
const key = obj_schema_keys[i];
|
|
1513
|
-
const obj_schema_prop = obj_schema[key];
|
|
1514
|
-
const path_schema_prop = path_schema + '["' + key + '"]';
|
|
1515
|
-
if (obj_schema_prop === undefined) {
|
|
1516
|
-
return new TypeError('Expected "defined" but received "' + typeof obj_schema_prop + '" (at "' + path_schema_prop + '")');
|
|
1858
|
+
if (obj.schema !== undefined) {
|
|
1859
|
+
const obj_schema = obj.schema;
|
|
1860
|
+
const path_schema = path + '.schema';
|
|
1861
|
+
if (typeof obj_schema !== 'object' || ArrayIsArray(obj_schema) || obj_schema === null) {
|
|
1862
|
+
return new TypeError('Expected "object" but received "' + typeof obj_schema + '" (at "' + path_schema + '")');
|
|
1517
1863
|
}
|
|
1518
1864
|
}
|
|
1519
1865
|
if (obj.title !== undefined) {
|
|
@@ -1523,14 +1869,47 @@ function validate(obj, path = 'ExperienceModelPropertyTypeDetailRepresentation')
|
|
|
1523
1869
|
return new TypeError('Expected "string" but received "' + typeof obj_title + '" (at "' + path_title + '")');
|
|
1524
1870
|
}
|
|
1525
1871
|
}
|
|
1872
|
+
if (obj.typeDescriptor !== undefined) {
|
|
1873
|
+
const obj_typeDescriptor = obj.typeDescriptor;
|
|
1874
|
+
const path_typeDescriptor = path + '.typeDescriptor';
|
|
1875
|
+
if (typeof obj_typeDescriptor !== 'string') {
|
|
1876
|
+
return new TypeError('Expected "string" but received "' + typeof obj_typeDescriptor + '" (at "' + path_typeDescriptor + '")');
|
|
1877
|
+
}
|
|
1878
|
+
}
|
|
1526
1879
|
})();
|
|
1527
1880
|
return v_error === undefined ? null : v_error;
|
|
1528
1881
|
}
|
|
1529
|
-
|
|
1882
|
+
|
|
1883
|
+
const TTL = 3600000;
|
|
1884
|
+
const VERSION = "8769e559a95e852451b82fa1610c65e0";
|
|
1885
|
+
function validate(obj, path = 'ExperienceModelTypesCollectionRepresentation') {
|
|
1886
|
+
const v_error = (() => {
|
|
1887
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1888
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1889
|
+
}
|
|
1890
|
+
const obj_types = obj.types;
|
|
1891
|
+
const path_types = path + '.types';
|
|
1892
|
+
if (!ArrayIsArray(obj_types)) {
|
|
1893
|
+
return new TypeError('Expected "array" but received "' + typeof obj_types + '" (at "' + path_types + '")');
|
|
1894
|
+
}
|
|
1895
|
+
for (let i = 0; i < obj_types.length; i++) {
|
|
1896
|
+
const obj_types_item = obj_types[i];
|
|
1897
|
+
const path_types_item = path_types + '[' + i + ']';
|
|
1898
|
+
const referencepath_types_itemValidationError = validate$1(obj_types_item, path_types_item);
|
|
1899
|
+
if (referencepath_types_itemValidationError !== null) {
|
|
1900
|
+
let message = 'Object doesn\'t match ExperienceModelTypesRepresentation (at "' + path_types_item + '")\n';
|
|
1901
|
+
message += referencepath_types_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1902
|
+
return new TypeError(message);
|
|
1903
|
+
}
|
|
1904
|
+
}
|
|
1905
|
+
})();
|
|
1906
|
+
return v_error === undefined ? null : v_error;
|
|
1907
|
+
}
|
|
1908
|
+
const RepresentationType = 'ExperienceModelTypesCollectionRepresentation';
|
|
1530
1909
|
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
1531
1910
|
return input;
|
|
1532
1911
|
}
|
|
1533
|
-
const select$1 = function
|
|
1912
|
+
const select$1 = function ExperienceModelTypesCollectionRepresentationSelect() {
|
|
1534
1913
|
return {
|
|
1535
1914
|
kind: 'Fragment',
|
|
1536
1915
|
version: VERSION,
|
|
@@ -1544,7 +1923,7 @@ function equals(existing, incoming) {
|
|
|
1544
1923
|
}
|
|
1545
1924
|
return true;
|
|
1546
1925
|
}
|
|
1547
|
-
const ingest = function
|
|
1926
|
+
const ingest = function ExperienceModelTypesCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1548
1927
|
if (process.env.NODE_ENV !== 'production') {
|
|
1549
1928
|
const validateError = validate(input);
|
|
1550
1929
|
if (validateError !== null) {
|
|
@@ -1570,7 +1949,7 @@ function select(luvio, params) {
|
|
|
1570
1949
|
return select$1();
|
|
1571
1950
|
}
|
|
1572
1951
|
function keyBuilder$1(luvio, params) {
|
|
1573
|
-
return keyPrefix + '::
|
|
1952
|
+
return keyPrefix + '::ExperienceModelTypesCollectionRepresentation:(' + 'language:' + params.body.language + '::' + '[' + params.body.typeConfigs.map(element => { var _a, _b, _c, _d, _e, _f; return 'typeConfigs.descriptor:' + element.descriptor + '::' + (((_a = element.designConfig) === null || _a === void 0 ? void 0 : _a.target) === undefined ? 'typeConfigs.designConfig.target' : 'typeConfigs.designConfig.target:' + ((_b = element.designConfig) === null || _b === void 0 ? void 0 : _b.target)) + '::' + (((_c = element.renditionConfig) === null || _c === void 0 ? void 0 : _c.target) === undefined ? 'typeConfigs.renditionConfig.target' : 'typeConfigs.renditionConfig.target:' + ((_d = element.renditionConfig) === null || _d === void 0 ? void 0 : _d.target)) + '::' + (((_e = element.schemaConfig) === null || _e === void 0 ? void 0 : _e.subSchemaDefinitions) === undefined ? 'typeConfigs.schemaConfig.subSchemaDefinitions' : 'typeConfigs.schemaConfig.subSchemaDefinitions:' + ((_f = element.schemaConfig) === null || _f === void 0 ? void 0 : _f.subSchemaDefinitions)) + '::' + (element.sourceDescriptor === undefined ? 'typeConfigs.sourceDescriptor' : 'typeConfigs.sourceDescriptor:' + element.sourceDescriptor); }).join(',') + ']' + ')';
|
|
1574
1953
|
}
|
|
1575
1954
|
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
1576
1955
|
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
|
|
@@ -1608,33 +1987,42 @@ function createResourceRequest(config) {
|
|
|
1608
1987
|
const headers = {};
|
|
1609
1988
|
return {
|
|
1610
1989
|
baseUri: '/services/data/v60.0',
|
|
1611
|
-
basePath: '/connect/experience-model/
|
|
1612
|
-
method: '
|
|
1613
|
-
body:
|
|
1614
|
-
urlParams:
|
|
1615
|
-
queryParams:
|
|
1990
|
+
basePath: '/connect/experience-model/types',
|
|
1991
|
+
method: 'post',
|
|
1992
|
+
body: config.body,
|
|
1993
|
+
urlParams: {},
|
|
1994
|
+
queryParams: {},
|
|
1616
1995
|
headers,
|
|
1617
1996
|
priority: 'normal',
|
|
1618
1997
|
};
|
|
1619
1998
|
}
|
|
1620
1999
|
|
|
1621
|
-
const adapterName = '
|
|
1622
|
-
const
|
|
1623
|
-
generateParamConfigMetadata('
|
|
1624
|
-
generateParamConfigMetadata('
|
|
1625
|
-
generateParamConfigMetadata('includeSubSchemaDefinitions', false, 1 /* QueryParameter */, 1 /* Boolean */),
|
|
1626
|
-
generateParamConfigMetadata('language', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1627
|
-
generateParamConfigMetadata('renditionConfigTarget', false, 1 /* QueryParameter */, 0 /* String */),
|
|
2000
|
+
const adapterName = 'getTypes';
|
|
2001
|
+
const getTypes_ConfigPropertyMetadata = [
|
|
2002
|
+
generateParamConfigMetadata('language', true, 2 /* Body */, 0 /* String */),
|
|
2003
|
+
generateParamConfigMetadata('typeConfigs', true, 2 /* Body */, 4 /* Unsupported */, true),
|
|
1628
2004
|
];
|
|
1629
|
-
const
|
|
1630
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
2005
|
+
const getTypes_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getTypes_ConfigPropertyMetadata);
|
|
2006
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$7(getTypes_ConfigPropertyMetadata);
|
|
1631
2007
|
function keyBuilder(luvio, config) {
|
|
1632
2008
|
const resourceParams = createResourceParams(config);
|
|
1633
2009
|
return keyBuilder$1(luvio, resourceParams);
|
|
1634
2010
|
}
|
|
1635
2011
|
function typeCheckConfig(untrustedConfig) {
|
|
1636
2012
|
const config = {};
|
|
1637
|
-
typeCheckConfig$
|
|
2013
|
+
typeCheckConfig$7(untrustedConfig, config, getTypes_ConfigPropertyMetadata);
|
|
2014
|
+
const untrustedConfig_typeConfigs = untrustedConfig.typeConfigs;
|
|
2015
|
+
if (ArrayIsArray$1(untrustedConfig_typeConfigs)) {
|
|
2016
|
+
const untrustedConfig_typeConfigs_array = [];
|
|
2017
|
+
for (let i = 0, arrayLength = untrustedConfig_typeConfigs.length; i < arrayLength; i++) {
|
|
2018
|
+
const untrustedConfig_typeConfigs_item = untrustedConfig_typeConfigs[i];
|
|
2019
|
+
const referenceExperienceModelTypesConfigInputRepresentationValidationError = validate$2(untrustedConfig_typeConfigs_item);
|
|
2020
|
+
if (referenceExperienceModelTypesConfigInputRepresentationValidationError === null) {
|
|
2021
|
+
untrustedConfig_typeConfigs_array.push(untrustedConfig_typeConfigs_item);
|
|
2022
|
+
}
|
|
2023
|
+
}
|
|
2024
|
+
config.typeConfigs = untrustedConfig_typeConfigs_array;
|
|
2025
|
+
}
|
|
1638
2026
|
return config;
|
|
1639
2027
|
}
|
|
1640
2028
|
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
@@ -1683,7 +2071,7 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
1683
2071
|
});
|
|
1684
2072
|
}
|
|
1685
2073
|
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
1686
|
-
return buildNetworkSnapshotCachePolicy$
|
|
2074
|
+
return buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext, buildNetworkSnapshot, 'get', false);
|
|
1687
2075
|
}
|
|
1688
2076
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
1689
2077
|
const { luvio, config } = context;
|
|
@@ -1698,8 +2086,8 @@ function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
|
1698
2086
|
});
|
|
1699
2087
|
return cacheSnapshot;
|
|
1700
2088
|
}
|
|
1701
|
-
const
|
|
1702
|
-
const config = validateAdapterConfig(untrustedConfig,
|
|
2089
|
+
const getTypesAdapterFactory = (luvio) => function ExperienceType__getTypes(untrustedConfig, requestContext) {
|
|
2090
|
+
const config = validateAdapterConfig(untrustedConfig, getTypes_ConfigPropertyNames);
|
|
1703
2091
|
// Invalid or incomplete config
|
|
1704
2092
|
if (config === null) {
|
|
1705
2093
|
return null;
|
|
@@ -1708,4 +2096,4 @@ const getPropertyTypeAdapterFactory = (luvio) => function ExperienceType__getPro
|
|
|
1708
2096
|
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
1709
2097
|
};
|
|
1710
2098
|
|
|
1711
|
-
export { getBlockTypeAdapterFactory, getBlockTypesAdapterFactory, getContentTypeAdapterFactory, getContentTypesAdapterFactory, getPropertyTypeAdapterFactory, getPropertyTypesAdapterFactory };
|
|
2099
|
+
export { getBlockTypeAdapterFactory, getBlockTypesAdapterFactory, getContentTypeAdapterFactory, getContentTypesAdapterFactory, getPropertyTypeAdapterFactory, getPropertyTypesAdapterFactory, getTypesAdapterFactory };
|