@salesforce/lds-adapters-cms-delivery 1.314.0 → 1.316.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/cms-delivery.js +78 -65
- package/dist/es/es2018/types/src/generated/adapters/getCollectionItemsForChannel.d.ts +2 -0
- package/dist/es/es2018/types/src/generated/adapters/getCollectionItemsForSite.d.ts +2 -0
- package/dist/es/es2018/types/src/generated/resources/getConnectCmsDeliveryChannelsCollectionsByChannelIdAndCollectionKeyOrId.d.ts +2 -0
- package/dist/es/es2018/types/src/generated/resources/getConnectSitesCmsDeliveryCollectionsByCollectionKeyOrIdAndSiteId.d.ts +2 -0
- package/dist/es/es2018/types/src/generated/types/ManagedContentCollectionItemsRepresentation.d.ts +16 -7
- package/dist/es/es2018/types/src/generated/types/ManagedContentCollectionMetadataRepresentation.d.ts +5 -5
- package/dist/es/es2018/types/src/generated/types/ManagedContentDeliveryChannelSummaryRepresentation.d.ts +43 -0
- package/package.json +4 -4
- package/sfdc/index.js +71 -58
- package/src/raml/api.raml +69 -6
- package/dist/es/es2018/types/src/raml-artifacts/adapters/getCollectionItemsForChannel/onFetchResponseSuccess.d.ts +0 -5
- package/dist/es/es2018/types/src/raml-artifacts/adapters/getCollectionItemsForSite/onFetchResponseSuccess.d.ts +0 -5
|
@@ -107,17 +107,20 @@ function validate$g(obj, path = 'ManagedContentChannelTargetSummaryRepresentatio
|
|
|
107
107
|
return v_error === undefined ? null : v_error;
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
function validate$f(obj, path = '
|
|
110
|
+
function validate$f(obj, path = 'ManagedContentDeliveryChannelSummaryRepresentation') {
|
|
111
111
|
const v_error = (() => {
|
|
112
112
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
113
113
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
114
114
|
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
115
|
+
const obj_domainUrl = obj.domainUrl;
|
|
116
|
+
const path_domainUrl = path + '.domainUrl';
|
|
117
|
+
if (typeof obj_domainUrl !== 'string') {
|
|
118
|
+
return new TypeError('Expected "string" but received "' + typeof obj_domainUrl + '" (at "' + path_domainUrl + '")');
|
|
119
|
+
}
|
|
120
|
+
const obj_id = obj.id;
|
|
121
|
+
const path_id = path + '.id';
|
|
122
|
+
if (typeof obj_id !== 'string') {
|
|
123
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
121
124
|
}
|
|
122
125
|
const obj_name = obj.name;
|
|
123
126
|
const path_name = path + '.name';
|
|
@@ -129,16 +132,21 @@ function validate$f(obj, path = 'ManagedContentChannelSummaryRepresentation') {
|
|
|
129
132
|
if (typeof obj_resourceUrl !== 'string') {
|
|
130
133
|
return new TypeError('Expected "string" but received "' + typeof obj_resourceUrl + '" (at "' + path_resourceUrl + '")');
|
|
131
134
|
}
|
|
132
|
-
if (obj.
|
|
133
|
-
const
|
|
134
|
-
const
|
|
135
|
-
const
|
|
136
|
-
if (
|
|
137
|
-
let message = 'Object doesn\'t match ManagedContentChannelTargetSummaryRepresentation (at "' +
|
|
138
|
-
message +=
|
|
135
|
+
if (obj.target !== undefined) {
|
|
136
|
+
const obj_target = obj.target;
|
|
137
|
+
const path_target = path + '.target';
|
|
138
|
+
const referencepath_targetValidationError = validate$g(obj_target, path_target);
|
|
139
|
+
if (referencepath_targetValidationError !== null) {
|
|
140
|
+
let message = 'Object doesn\'t match ManagedContentChannelTargetSummaryRepresentation (at "' + path_target + '")\n';
|
|
141
|
+
message += referencepath_targetValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
139
142
|
return new TypeError(message);
|
|
140
143
|
}
|
|
141
144
|
}
|
|
145
|
+
const obj_type = obj.type;
|
|
146
|
+
const path_type = path + '.type';
|
|
147
|
+
if (typeof obj_type !== 'string') {
|
|
148
|
+
return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
|
|
149
|
+
}
|
|
142
150
|
})();
|
|
143
151
|
return v_error === undefined ? null : v_error;
|
|
144
152
|
}
|
|
@@ -225,18 +233,18 @@ function validate$c(obj, path = 'ManagedContentCollectionItemRepresentation') {
|
|
|
225
233
|
}
|
|
226
234
|
|
|
227
235
|
const TTL$3 = 3600000;
|
|
228
|
-
const VERSION$4 = "
|
|
236
|
+
const VERSION$4 = "b513480693ae9012df7865f2698d2001";
|
|
229
237
|
function validate$b(obj, path = 'ManagedContentCollectionItemsRepresentation') {
|
|
230
238
|
const v_error = (() => {
|
|
231
239
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
232
240
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
233
241
|
}
|
|
234
|
-
const
|
|
235
|
-
const
|
|
236
|
-
const
|
|
237
|
-
if (
|
|
238
|
-
let message = 'Object doesn\'t match
|
|
239
|
-
message +=
|
|
242
|
+
const obj_channelSummary = obj.channelSummary;
|
|
243
|
+
const path_channelSummary = path + '.channelSummary';
|
|
244
|
+
const referencepath_channelSummaryValidationError = validate$f(obj_channelSummary, path_channelSummary);
|
|
245
|
+
if (referencepath_channelSummaryValidationError !== null) {
|
|
246
|
+
let message = 'Object doesn\'t match ManagedContentDeliveryChannelSummaryRepresentation (at "' + path_channelSummary + '")\n';
|
|
247
|
+
message += referencepath_channelSummaryValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
240
248
|
return new TypeError(message);
|
|
241
249
|
}
|
|
242
250
|
const obj_collectionKey = obj.collectionKey;
|
|
@@ -252,6 +260,11 @@ function validate$b(obj, path = 'ManagedContentCollectionItemsRepresentation') {
|
|
|
252
260
|
message += referencepath_collectionTypeValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
253
261
|
return new TypeError(message);
|
|
254
262
|
}
|
|
263
|
+
const obj_currentPageUrl = obj.currentPageUrl;
|
|
264
|
+
const path_currentPageUrl = path + '.currentPageUrl';
|
|
265
|
+
if (typeof obj_currentPageUrl !== 'string') {
|
|
266
|
+
return new TypeError('Expected "string" but received "' + typeof obj_currentPageUrl + '" (at "' + path_currentPageUrl + '")');
|
|
267
|
+
}
|
|
255
268
|
const obj_id = obj.id;
|
|
256
269
|
const path_id = path + '.id';
|
|
257
270
|
if (typeof obj_id !== 'string') {
|
|
@@ -277,6 +290,20 @@ function validate$b(obj, path = 'ManagedContentCollectionItemsRepresentation') {
|
|
|
277
290
|
if (typeof obj_language !== 'string') {
|
|
278
291
|
return new TypeError('Expected "string" but received "' + typeof obj_language + '" (at "' + path_language + '")');
|
|
279
292
|
}
|
|
293
|
+
if (obj.nextPageUrl !== undefined) {
|
|
294
|
+
const obj_nextPageUrl = obj.nextPageUrl;
|
|
295
|
+
const path_nextPageUrl = path + '.nextPageUrl';
|
|
296
|
+
if (typeof obj_nextPageUrl !== 'string') {
|
|
297
|
+
return new TypeError('Expected "string" but received "' + typeof obj_nextPageUrl + '" (at "' + path_nextPageUrl + '")');
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
if (obj.previousPageUrl !== undefined) {
|
|
301
|
+
const obj_previousPageUrl = obj.previousPageUrl;
|
|
302
|
+
const path_previousPageUrl = path + '.previousPageUrl';
|
|
303
|
+
if (typeof obj_previousPageUrl !== 'string') {
|
|
304
|
+
return new TypeError('Expected "string" but received "' + typeof obj_previousPageUrl + '" (at "' + path_previousPageUrl + '")');
|
|
305
|
+
}
|
|
306
|
+
}
|
|
280
307
|
const obj_publishedDate = obj.publishedDate;
|
|
281
308
|
const path_publishedDate = path + '.publishedDate';
|
|
282
309
|
if (typeof obj_publishedDate !== 'string') {
|
|
@@ -287,10 +314,12 @@ function validate$b(obj, path = 'ManagedContentCollectionItemsRepresentation') {
|
|
|
287
314
|
if (typeof obj_title !== 'string') {
|
|
288
315
|
return new TypeError('Expected "string" but received "' + typeof obj_title + '" (at "' + path_title + '")');
|
|
289
316
|
}
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
317
|
+
if (obj.total !== undefined) {
|
|
318
|
+
const obj_total = obj.total;
|
|
319
|
+
const path_total = path + '.total';
|
|
320
|
+
if (typeof obj_total !== 'number' || (typeof obj_total === 'number' && Math.floor(obj_total) !== obj_total)) {
|
|
321
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_total + '" (at "' + path_total + '")');
|
|
322
|
+
}
|
|
294
323
|
}
|
|
295
324
|
const obj_urlName = obj.urlName;
|
|
296
325
|
const path_urlName = path + '.urlName';
|
|
@@ -344,7 +373,7 @@ function select$9(luvio, params) {
|
|
|
344
373
|
return select$a();
|
|
345
374
|
}
|
|
346
375
|
function keyBuilder$b(luvio, params) {
|
|
347
|
-
return keyPrefix + '::ManagedContentCollectionItemsRepresentation:(' + 'language:' + params.queryParams.language + ',' + 'channelId:' + params.urlParams.channelId + ',' + 'collectionKeyOrId:' + params.urlParams.collectionKeyOrId + ')';
|
|
376
|
+
return keyPrefix + '::ManagedContentCollectionItemsRepresentation:(' + 'language:' + params.queryParams.language + ',' + 'page:' + params.queryParams.page + ',' + 'pageSize:' + params.queryParams.pageSize + ',' + 'channelId:' + params.urlParams.channelId + ',' + 'collectionKeyOrId:' + params.urlParams.collectionKeyOrId + ')';
|
|
348
377
|
}
|
|
349
378
|
function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
|
|
350
379
|
getTypeCacheKeys$4(storeKeyMap, luvio, response, () => keyBuilder$b(luvio, resourceParams));
|
|
@@ -392,21 +421,13 @@ function createResourceRequest$5(config) {
|
|
|
392
421
|
};
|
|
393
422
|
}
|
|
394
423
|
|
|
395
|
-
function onFetchResponseSuccess$9(luvio, config, resourceParams, response) {
|
|
396
|
-
let updatedResourceParams = resourceParams;
|
|
397
|
-
// If language is not provided in request resource params, use language from the response
|
|
398
|
-
// and update the response params. As this resource params will be used to build a cache key.
|
|
399
|
-
if (updatedResourceParams.queryParams.language === undefined) {
|
|
400
|
-
updatedResourceParams.queryParams.language = response.body.language;
|
|
401
|
-
}
|
|
402
|
-
return onFetchResponseSuccess$8(luvio, config, updatedResourceParams, response);
|
|
403
|
-
}
|
|
404
|
-
|
|
405
424
|
const adapterName$5 = 'getCollectionItemsForChannel';
|
|
406
425
|
const getCollectionItemsForChannel_ConfigPropertyMetadata = [
|
|
407
426
|
generateParamConfigMetadata('channelId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
408
427
|
generateParamConfigMetadata('collectionKeyOrId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
409
428
|
generateParamConfigMetadata('language', false, 1 /* QueryParameter */, 0 /* String */),
|
|
429
|
+
generateParamConfigMetadata('page', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
430
|
+
generateParamConfigMetadata('pageSize', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
410
431
|
];
|
|
411
432
|
const getCollectionItemsForChannel_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, getCollectionItemsForChannel_ConfigPropertyMetadata);
|
|
412
433
|
const createResourceParams$5 = /*#__PURE__*/ createResourceParams$6(getCollectionItemsForChannel_ConfigPropertyMetadata);
|
|
@@ -436,7 +457,7 @@ function adapterFragment$5(luvio, config) {
|
|
|
436
457
|
createResourceParams$5(config);
|
|
437
458
|
return select$9();
|
|
438
459
|
}
|
|
439
|
-
function onFetchResponseSuccess$
|
|
460
|
+
function onFetchResponseSuccess$7(luvio, config, resourceParams, response) {
|
|
440
461
|
const snapshot = ingestSuccess$5(luvio, resourceParams, response, {
|
|
441
462
|
config,
|
|
442
463
|
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
@@ -455,7 +476,7 @@ function buildNetworkSnapshot$5(luvio, config, options) {
|
|
|
455
476
|
const request = createResourceRequest$5(resourceParams);
|
|
456
477
|
return luvio.dispatchResourceRequest(request, options)
|
|
457
478
|
.then((response) => {
|
|
458
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
479
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$7(luvio, config, resourceParams, response), () => {
|
|
459
480
|
const cache = new StoreKeyMap();
|
|
460
481
|
getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
|
|
461
482
|
return cache;
|
|
@@ -491,18 +512,18 @@ const getCollectionItemsForChannelAdapterFactory = (luvio) => function CMS__getC
|
|
|
491
512
|
};
|
|
492
513
|
|
|
493
514
|
const TTL$2 = 3600000;
|
|
494
|
-
const VERSION$3 = "
|
|
515
|
+
const VERSION$3 = "04f084216502225bdb5fe939fc41b883";
|
|
495
516
|
function validate$a(obj, path = 'ManagedContentCollectionMetadataRepresentation') {
|
|
496
517
|
const v_error = (() => {
|
|
497
518
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
498
519
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
499
520
|
}
|
|
500
|
-
const
|
|
501
|
-
const
|
|
502
|
-
const
|
|
503
|
-
if (
|
|
504
|
-
let message = 'Object doesn\'t match
|
|
505
|
-
message +=
|
|
521
|
+
const obj_channelSummary = obj.channelSummary;
|
|
522
|
+
const path_channelSummary = path + '.channelSummary';
|
|
523
|
+
const referencepath_channelSummaryValidationError = validate$f(obj_channelSummary, path_channelSummary);
|
|
524
|
+
if (referencepath_channelSummaryValidationError !== null) {
|
|
525
|
+
let message = 'Object doesn\'t match ManagedContentDeliveryChannelSummaryRepresentation (at "' + path_channelSummary + '")\n';
|
|
526
|
+
message += referencepath_channelSummaryValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
506
527
|
return new TypeError(message);
|
|
507
528
|
}
|
|
508
529
|
const obj_collectionKey = obj.collectionKey;
|
|
@@ -666,14 +687,14 @@ function createResourceRequest$4(config) {
|
|
|
666
687
|
};
|
|
667
688
|
}
|
|
668
689
|
|
|
669
|
-
function onFetchResponseSuccess$
|
|
690
|
+
function onFetchResponseSuccess$6(luvio, config, resourceParams, response) {
|
|
670
691
|
let updatedResourceParams = resourceParams;
|
|
671
692
|
// If language is not provided in request resource params, use language from the response
|
|
672
693
|
// and update the response params. As this resource params will be used to build a cache key.
|
|
673
694
|
if (updatedResourceParams.queryParams.language === undefined) {
|
|
674
695
|
updatedResourceParams.queryParams.language = response.body.language;
|
|
675
696
|
}
|
|
676
|
-
return onFetchResponseSuccess$
|
|
697
|
+
return onFetchResponseSuccess$5(luvio, config, updatedResourceParams, response);
|
|
677
698
|
}
|
|
678
699
|
|
|
679
700
|
const adapterName$4 = 'getCollectionMetadataForChannel';
|
|
@@ -711,7 +732,7 @@ function adapterFragment$4(luvio, config) {
|
|
|
711
732
|
createResourceParams$4(config);
|
|
712
733
|
return select$7();
|
|
713
734
|
}
|
|
714
|
-
function onFetchResponseSuccess$
|
|
735
|
+
function onFetchResponseSuccess$5(luvio, config, resourceParams, response) {
|
|
715
736
|
const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
|
|
716
737
|
config,
|
|
717
738
|
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
@@ -730,7 +751,7 @@ function buildNetworkSnapshot$4(luvio, config, options) {
|
|
|
730
751
|
const request = createResourceRequest$4(resourceParams);
|
|
731
752
|
return luvio.dispatchResourceRequest(request, options)
|
|
732
753
|
.then((response) => {
|
|
733
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
754
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$6(luvio, config, resourceParams, response), () => {
|
|
734
755
|
const cache = new StoreKeyMap();
|
|
735
756
|
getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
|
|
736
757
|
return cache;
|
|
@@ -1187,7 +1208,7 @@ function adapterFragment$3(luvio, config) {
|
|
|
1187
1208
|
createResourceParams$3(config);
|
|
1188
1209
|
return select$5();
|
|
1189
1210
|
}
|
|
1190
|
-
function onFetchResponseSuccess$
|
|
1211
|
+
function onFetchResponseSuccess$4(luvio, config, resourceParams, response) {
|
|
1191
1212
|
const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
|
|
1192
1213
|
config,
|
|
1193
1214
|
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
@@ -1206,7 +1227,7 @@ function buildNetworkSnapshot$3(luvio, config, options) {
|
|
|
1206
1227
|
const request = createResourceRequest$3(resourceParams);
|
|
1207
1228
|
return luvio.dispatchResourceRequest(request, options)
|
|
1208
1229
|
.then((response) => {
|
|
1209
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
1230
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$4(luvio, config, resourceParams, response), () => {
|
|
1210
1231
|
const cache = new StoreKeyMap();
|
|
1211
1232
|
getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
|
|
1212
1233
|
return cache;
|
|
@@ -1610,7 +1631,7 @@ function adapterFragment$2(luvio, config) {
|
|
|
1610
1631
|
createResourceParams$2(config);
|
|
1611
1632
|
return select$2();
|
|
1612
1633
|
}
|
|
1613
|
-
function onFetchResponseSuccess$
|
|
1634
|
+
function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
|
|
1614
1635
|
const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
|
|
1615
1636
|
config,
|
|
1616
1637
|
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
@@ -1629,7 +1650,7 @@ function buildNetworkSnapshot$2(luvio, config, options) {
|
|
|
1629
1650
|
const request = createResourceRequest$2(resourceParams);
|
|
1630
1651
|
return luvio.dispatchResourceRequest(request, options)
|
|
1631
1652
|
.then((response) => {
|
|
1632
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
1653
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
|
|
1633
1654
|
const cache = new StoreKeyMap();
|
|
1634
1655
|
getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
|
|
1635
1656
|
return cache;
|
|
@@ -1668,7 +1689,7 @@ function select$1(luvio, params) {
|
|
|
1668
1689
|
return select$a();
|
|
1669
1690
|
}
|
|
1670
1691
|
function keyBuilder$3(luvio, params) {
|
|
1671
|
-
return keyPrefix + '::ManagedContentCollectionItemsRepresentation:(' + 'language:' + params.queryParams.language + ',' + 'collectionKeyOrId:' + params.urlParams.collectionKeyOrId + ',' + 'siteId:' + params.urlParams.siteId + ')';
|
|
1692
|
+
return keyPrefix + '::ManagedContentCollectionItemsRepresentation:(' + 'language:' + params.queryParams.language + ',' + 'page:' + params.queryParams.page + ',' + 'pageSize:' + params.queryParams.pageSize + ',' + 'collectionKeyOrId:' + params.urlParams.collectionKeyOrId + ',' + 'siteId:' + params.urlParams.siteId + ')';
|
|
1672
1693
|
}
|
|
1673
1694
|
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
1674
1695
|
getTypeCacheKeys$4(storeKeyMap, luvio, response, () => keyBuilder$3(luvio, resourceParams));
|
|
@@ -1716,21 +1737,13 @@ function createResourceRequest$1(config) {
|
|
|
1716
1737
|
};
|
|
1717
1738
|
}
|
|
1718
1739
|
|
|
1719
|
-
function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
|
|
1720
|
-
let updatedResourceParams = resourceParams;
|
|
1721
|
-
// If language is not provided in request resource params, use language from the response
|
|
1722
|
-
// and update the response params. As this resource params will be used to build a cache key.
|
|
1723
|
-
if (updatedResourceParams.queryParams.language === undefined) {
|
|
1724
|
-
updatedResourceParams.queryParams.language = response.body.language;
|
|
1725
|
-
}
|
|
1726
|
-
return onFetchResponseSuccess$2(luvio, config, updatedResourceParams, response);
|
|
1727
|
-
}
|
|
1728
|
-
|
|
1729
1740
|
const adapterName$1 = 'getCollectionItemsForSite';
|
|
1730
1741
|
const getCollectionItemsForSite_ConfigPropertyMetadata = [
|
|
1731
1742
|
generateParamConfigMetadata('collectionKeyOrId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1732
1743
|
generateParamConfigMetadata('siteId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1733
1744
|
generateParamConfigMetadata('language', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1745
|
+
generateParamConfigMetadata('page', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
1746
|
+
generateParamConfigMetadata('pageSize', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
1734
1747
|
];
|
|
1735
1748
|
const getCollectionItemsForSite_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getCollectionItemsForSite_ConfigPropertyMetadata);
|
|
1736
1749
|
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$6(getCollectionItemsForSite_ConfigPropertyMetadata);
|
|
@@ -1779,7 +1792,7 @@ function buildNetworkSnapshot$1(luvio, config, options) {
|
|
|
1779
1792
|
const request = createResourceRequest$1(resourceParams);
|
|
1780
1793
|
return luvio.dispatchResourceRequest(request, options)
|
|
1781
1794
|
.then((response) => {
|
|
1782
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
1795
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
|
|
1783
1796
|
const cache = new StoreKeyMap();
|
|
1784
1797
|
getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
|
|
1785
1798
|
return cache;
|
|
@@ -9,6 +9,8 @@ export interface GetCollectionItemsForChannelConfig {
|
|
|
9
9
|
channelId: string;
|
|
10
10
|
collectionKeyOrId: string;
|
|
11
11
|
language?: string;
|
|
12
|
+
page?: number;
|
|
13
|
+
pageSize?: number;
|
|
12
14
|
}
|
|
13
15
|
export declare const createResourceParams: (config: GetCollectionItemsForChannelConfig) => resources_getConnectCmsDeliveryChannelsCollectionsByChannelIdAndCollectionKeyOrId_ResourceRequestConfig;
|
|
14
16
|
export declare function keyBuilder(luvio: $64$luvio_engine_Luvio, config: GetCollectionItemsForChannelConfig): string;
|
|
@@ -9,6 +9,8 @@ export interface GetCollectionItemsForSiteConfig {
|
|
|
9
9
|
collectionKeyOrId: string;
|
|
10
10
|
siteId: string;
|
|
11
11
|
language?: string;
|
|
12
|
+
page?: number;
|
|
13
|
+
pageSize?: number;
|
|
12
14
|
}
|
|
13
15
|
export declare const createResourceParams: (config: GetCollectionItemsForSiteConfig) => resources_getConnectSitesCmsDeliveryCollectionsByCollectionKeyOrIdAndSiteId_ResourceRequestConfig;
|
|
14
16
|
export declare function keyBuilder(luvio: $64$luvio_engine_Luvio, config: GetCollectionItemsForSiteConfig): string;
|
package/dist/es/es2018/types/src/generated/types/ManagedContentCollectionItemsRepresentation.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ManagedContentDeliveryChannelSummaryRepresentation as ManagedContentDeliveryChannelSummaryRepresentation_ManagedContentDeliveryChannelSummaryRepresentation } from './ManagedContentDeliveryChannelSummaryRepresentation';
|
|
2
2
|
import { ManagedContentTypeSummaryRepresentation as ManagedContentTypeSummaryRepresentation_ManagedContentTypeSummaryRepresentation } from './ManagedContentTypeSummaryRepresentation';
|
|
3
3
|
import { ManagedContentCollectionItemRepresentation as ManagedContentCollectionItemRepresentation_ManagedContentCollectionItemRepresentation } from './ManagedContentCollectionItemRepresentation';
|
|
4
4
|
import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, BaseFragment as $64$luvio_engine_BaseFragment, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
|
|
5
5
|
export declare const TTL = 3600000;
|
|
6
|
-
export declare const VERSION = "
|
|
6
|
+
export declare const VERSION = "b513480693ae9012df7865f2698d2001";
|
|
7
7
|
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
8
8
|
export declare const RepresentationType: string;
|
|
9
9
|
export declare function normalize(input: ManagedContentCollectionItemsRepresentation, existing: ManagedContentCollectionItemsRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): ManagedContentCollectionItemsRepresentationNormalized;
|
|
@@ -18,23 +18,29 @@ export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableSto
|
|
|
18
18
|
* (none)
|
|
19
19
|
*/
|
|
20
20
|
export interface ManagedContentCollectionItemsRepresentationNormalized {
|
|
21
|
-
/** The contextual information of the managed content channel */
|
|
22
|
-
|
|
21
|
+
/** The contextual information of the delivery managed content channel */
|
|
22
|
+
channelSummary: ManagedContentDeliveryChannelSummaryRepresentation_ManagedContentDeliveryChannelSummaryRepresentation;
|
|
23
23
|
/** The collection key */
|
|
24
24
|
collectionKey: string;
|
|
25
25
|
collectionType: ManagedContentTypeSummaryRepresentation_ManagedContentTypeSummaryRepresentation;
|
|
26
|
+
/** URL to the current page of collection authoring records. */
|
|
27
|
+
currentPageUrl: string;
|
|
26
28
|
/** The id of the collection */
|
|
27
29
|
id: string;
|
|
28
30
|
/** Collection Items for this page. */
|
|
29
31
|
items: Array<ManagedContentCollectionItemRepresentation_ManagedContentCollectionItemRepresentation>;
|
|
30
32
|
/** language of the collection. */
|
|
31
33
|
language: string;
|
|
34
|
+
/** URL to the next page of collection authoring records. */
|
|
35
|
+
nextPageUrl?: string;
|
|
36
|
+
/** URL to the previous page of collection authoring records. */
|
|
37
|
+
previousPageUrl?: string;
|
|
32
38
|
/** Published Date of the collection. */
|
|
33
39
|
publishedDate: string;
|
|
34
40
|
/** Title of the collection. */
|
|
35
41
|
title: string;
|
|
36
42
|
/** Total number of items in current collection detail page. */
|
|
37
|
-
total
|
|
43
|
+
total?: number;
|
|
38
44
|
/** URL Name of the collection. */
|
|
39
45
|
urlName: string;
|
|
40
46
|
}
|
|
@@ -45,14 +51,17 @@ export interface ManagedContentCollectionItemsRepresentationNormalized {
|
|
|
45
51
|
* (none)
|
|
46
52
|
*/
|
|
47
53
|
export interface ManagedContentCollectionItemsRepresentation {
|
|
48
|
-
|
|
54
|
+
channelSummary: ManagedContentDeliveryChannelSummaryRepresentation_ManagedContentDeliveryChannelSummaryRepresentation;
|
|
49
55
|
collectionKey: string;
|
|
50
56
|
collectionType: ManagedContentTypeSummaryRepresentation_ManagedContentTypeSummaryRepresentation;
|
|
57
|
+
currentPageUrl: string;
|
|
51
58
|
id: string;
|
|
52
59
|
items: Array<ManagedContentCollectionItemRepresentation_ManagedContentCollectionItemRepresentation>;
|
|
53
60
|
language: string;
|
|
61
|
+
nextPageUrl?: string;
|
|
62
|
+
previousPageUrl?: string;
|
|
54
63
|
publishedDate: string;
|
|
55
64
|
title: string;
|
|
56
|
-
total
|
|
65
|
+
total?: number;
|
|
57
66
|
urlName: string;
|
|
58
67
|
}
|
package/dist/es/es2018/types/src/generated/types/ManagedContentCollectionMetadataRepresentation.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ManagedContentDeliveryChannelSummaryRepresentation as ManagedContentDeliveryChannelSummaryRepresentation_ManagedContentDeliveryChannelSummaryRepresentation } from './ManagedContentDeliveryChannelSummaryRepresentation';
|
|
2
2
|
import { ManagedContentTypeSummaryRepresentation as ManagedContentTypeSummaryRepresentation_ManagedContentTypeSummaryRepresentation } from './ManagedContentTypeSummaryRepresentation';
|
|
3
3
|
import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, BaseFragment as $64$luvio_engine_BaseFragment, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
|
|
4
4
|
export declare const TTL = 3600000;
|
|
5
|
-
export declare const VERSION = "
|
|
5
|
+
export declare const VERSION = "04f084216502225bdb5fe939fc41b883";
|
|
6
6
|
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
7
7
|
export declare const RepresentationType: string;
|
|
8
8
|
export declare function normalize(input: ManagedContentCollectionMetadataRepresentation, existing: ManagedContentCollectionMetadataRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): ManagedContentCollectionMetadataRepresentationNormalized;
|
|
@@ -17,8 +17,8 @@ export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableSto
|
|
|
17
17
|
* (none)
|
|
18
18
|
*/
|
|
19
19
|
export interface ManagedContentCollectionMetadataRepresentationNormalized {
|
|
20
|
-
/** The contextual information of the channel */
|
|
21
|
-
|
|
20
|
+
/** The contextual information of the delivery managed content channel */
|
|
21
|
+
channelSummary: ManagedContentDeliveryChannelSummaryRepresentation_ManagedContentDeliveryChannelSummaryRepresentation;
|
|
22
22
|
/** Globally unique identifier of a collection and doesn't change when collection is moved between production and sandbox environments. */
|
|
23
23
|
collectionKey: string;
|
|
24
24
|
/** The basic metadata of the collection */
|
|
@@ -48,7 +48,7 @@ export interface ManagedContentCollectionMetadataRepresentationNormalized {
|
|
|
48
48
|
* (none)
|
|
49
49
|
*/
|
|
50
50
|
export interface ManagedContentCollectionMetadataRepresentation {
|
|
51
|
-
|
|
51
|
+
channelSummary: ManagedContentDeliveryChannelSummaryRepresentation_ManagedContentDeliveryChannelSummaryRepresentation;
|
|
52
52
|
collectionKey: string;
|
|
53
53
|
collectionMetadata: {
|
|
54
54
|
[key: string]: unknown;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ManagedContentChannelTargetSummaryRepresentation as ManagedContentChannelTargetSummaryRepresentation_ManagedContentChannelTargetSummaryRepresentation } from './ManagedContentChannelTargetSummaryRepresentation';
|
|
2
|
+
import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
|
|
3
|
+
export declare const VERSION = "b899e1537e70bbf01d50513be0a67e52";
|
|
4
|
+
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
5
|
+
export declare const RepresentationType: string;
|
|
6
|
+
export declare function normalize(input: ManagedContentDeliveryChannelSummaryRepresentation, existing: ManagedContentDeliveryChannelSummaryRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): ManagedContentDeliveryChannelSummaryRepresentationNormalized;
|
|
7
|
+
export declare const select: () => $64$luvio_engine_FragmentSelection;
|
|
8
|
+
export declare function equals(existing: ManagedContentDeliveryChannelSummaryRepresentationNormalized, incoming: ManagedContentDeliveryChannelSummaryRepresentationNormalized): boolean;
|
|
9
|
+
export declare const ingest: $64$luvio_engine_ResourceIngest;
|
|
10
|
+
export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: ManagedContentDeliveryChannelSummaryRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
|
|
11
|
+
/**
|
|
12
|
+
* Summary information of a CMS Delivery Channel
|
|
13
|
+
*
|
|
14
|
+
* Keys:
|
|
15
|
+
* (none)
|
|
16
|
+
*/
|
|
17
|
+
export interface ManagedContentDeliveryChannelSummaryRepresentationNormalized {
|
|
18
|
+
/** Domain Url of the org */
|
|
19
|
+
domainUrl: string;
|
|
20
|
+
/** Id of the Managed Content Channel */
|
|
21
|
+
id: string;
|
|
22
|
+
/** Name of the managed content channel */
|
|
23
|
+
name: string;
|
|
24
|
+
/** Resource URL for detailed information about the ManagedContentChannel */
|
|
25
|
+
resourceUrl: string;
|
|
26
|
+
target?: ManagedContentChannelTargetSummaryRepresentation_ManagedContentChannelTargetSummaryRepresentation;
|
|
27
|
+
/** Type of Managed Content Channel */
|
|
28
|
+
type: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Summary information of a CMS Delivery Channel
|
|
32
|
+
*
|
|
33
|
+
* Keys:
|
|
34
|
+
* (none)
|
|
35
|
+
*/
|
|
36
|
+
export interface ManagedContentDeliveryChannelSummaryRepresentation {
|
|
37
|
+
domainUrl: string;
|
|
38
|
+
id: string;
|
|
39
|
+
name: string;
|
|
40
|
+
resourceUrl: string;
|
|
41
|
+
target?: ManagedContentChannelTargetSummaryRepresentation_ManagedContentChannelTargetSummaryRepresentation;
|
|
42
|
+
type: string;
|
|
43
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-adapters-cms-delivery",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.316.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "Wire adapters for CMS endpoints",
|
|
6
6
|
"main": "dist/es/es2018/cms-delivery.js",
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
"release:core": "../../scripts/release/core.js --adapter=lds-adapters-cms-delivery"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@salesforce/lds-bindings": "^1.
|
|
32
|
+
"@salesforce/lds-bindings": "^1.316.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@salesforce/lds-compiler-plugins": "^1.
|
|
36
|
-
"@salesforce/lds-karma": "^1.
|
|
35
|
+
"@salesforce/lds-compiler-plugins": "^1.316.0",
|
|
36
|
+
"@salesforce/lds-karma": "^1.316.0"
|
|
37
37
|
},
|
|
38
38
|
"nx": {
|
|
39
39
|
"targets": {
|
package/sfdc/index.js
CHANGED
|
@@ -117,17 +117,20 @@ function validate$g(obj, path = 'ManagedContentChannelTargetSummaryRepresentatio
|
|
|
117
117
|
return v_error === undefined ? null : v_error;
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
function validate$f(obj, path = '
|
|
120
|
+
function validate$f(obj, path = 'ManagedContentDeliveryChannelSummaryRepresentation') {
|
|
121
121
|
const v_error = (() => {
|
|
122
122
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
123
123
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
124
124
|
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
125
|
+
const obj_domainUrl = obj.domainUrl;
|
|
126
|
+
const path_domainUrl = path + '.domainUrl';
|
|
127
|
+
if (typeof obj_domainUrl !== 'string') {
|
|
128
|
+
return new TypeError('Expected "string" but received "' + typeof obj_domainUrl + '" (at "' + path_domainUrl + '")');
|
|
129
|
+
}
|
|
130
|
+
const obj_id = obj.id;
|
|
131
|
+
const path_id = path + '.id';
|
|
132
|
+
if (typeof obj_id !== 'string') {
|
|
133
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
131
134
|
}
|
|
132
135
|
const obj_name = obj.name;
|
|
133
136
|
const path_name = path + '.name';
|
|
@@ -139,16 +142,21 @@ function validate$f(obj, path = 'ManagedContentChannelSummaryRepresentation') {
|
|
|
139
142
|
if (typeof obj_resourceUrl !== 'string') {
|
|
140
143
|
return new TypeError('Expected "string" but received "' + typeof obj_resourceUrl + '" (at "' + path_resourceUrl + '")');
|
|
141
144
|
}
|
|
142
|
-
if (obj.
|
|
143
|
-
const
|
|
144
|
-
const
|
|
145
|
-
const
|
|
146
|
-
if (
|
|
147
|
-
let message = 'Object doesn\'t match ManagedContentChannelTargetSummaryRepresentation (at "' +
|
|
148
|
-
message +=
|
|
145
|
+
if (obj.target !== undefined) {
|
|
146
|
+
const obj_target = obj.target;
|
|
147
|
+
const path_target = path + '.target';
|
|
148
|
+
const referencepath_targetValidationError = validate$g(obj_target, path_target);
|
|
149
|
+
if (referencepath_targetValidationError !== null) {
|
|
150
|
+
let message = 'Object doesn\'t match ManagedContentChannelTargetSummaryRepresentation (at "' + path_target + '")\n';
|
|
151
|
+
message += referencepath_targetValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
149
152
|
return new TypeError(message);
|
|
150
153
|
}
|
|
151
154
|
}
|
|
155
|
+
const obj_type = obj.type;
|
|
156
|
+
const path_type = path + '.type';
|
|
157
|
+
if (typeof obj_type !== 'string') {
|
|
158
|
+
return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
|
|
159
|
+
}
|
|
152
160
|
})();
|
|
153
161
|
return v_error === undefined ? null : v_error;
|
|
154
162
|
}
|
|
@@ -235,18 +243,18 @@ function validate$c(obj, path = 'ManagedContentCollectionItemRepresentation') {
|
|
|
235
243
|
}
|
|
236
244
|
|
|
237
245
|
const TTL$3 = 3600000;
|
|
238
|
-
const VERSION$4 = "
|
|
246
|
+
const VERSION$4 = "b513480693ae9012df7865f2698d2001";
|
|
239
247
|
function validate$b(obj, path = 'ManagedContentCollectionItemsRepresentation') {
|
|
240
248
|
const v_error = (() => {
|
|
241
249
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
242
250
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
243
251
|
}
|
|
244
|
-
const
|
|
245
|
-
const
|
|
246
|
-
const
|
|
247
|
-
if (
|
|
248
|
-
let message = 'Object doesn\'t match
|
|
249
|
-
message +=
|
|
252
|
+
const obj_channelSummary = obj.channelSummary;
|
|
253
|
+
const path_channelSummary = path + '.channelSummary';
|
|
254
|
+
const referencepath_channelSummaryValidationError = validate$f(obj_channelSummary, path_channelSummary);
|
|
255
|
+
if (referencepath_channelSummaryValidationError !== null) {
|
|
256
|
+
let message = 'Object doesn\'t match ManagedContentDeliveryChannelSummaryRepresentation (at "' + path_channelSummary + '")\n';
|
|
257
|
+
message += referencepath_channelSummaryValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
250
258
|
return new TypeError(message);
|
|
251
259
|
}
|
|
252
260
|
const obj_collectionKey = obj.collectionKey;
|
|
@@ -262,6 +270,11 @@ function validate$b(obj, path = 'ManagedContentCollectionItemsRepresentation') {
|
|
|
262
270
|
message += referencepath_collectionTypeValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
263
271
|
return new TypeError(message);
|
|
264
272
|
}
|
|
273
|
+
const obj_currentPageUrl = obj.currentPageUrl;
|
|
274
|
+
const path_currentPageUrl = path + '.currentPageUrl';
|
|
275
|
+
if (typeof obj_currentPageUrl !== 'string') {
|
|
276
|
+
return new TypeError('Expected "string" but received "' + typeof obj_currentPageUrl + '" (at "' + path_currentPageUrl + '")');
|
|
277
|
+
}
|
|
265
278
|
const obj_id = obj.id;
|
|
266
279
|
const path_id = path + '.id';
|
|
267
280
|
if (typeof obj_id !== 'string') {
|
|
@@ -287,6 +300,20 @@ function validate$b(obj, path = 'ManagedContentCollectionItemsRepresentation') {
|
|
|
287
300
|
if (typeof obj_language !== 'string') {
|
|
288
301
|
return new TypeError('Expected "string" but received "' + typeof obj_language + '" (at "' + path_language + '")');
|
|
289
302
|
}
|
|
303
|
+
if (obj.nextPageUrl !== undefined) {
|
|
304
|
+
const obj_nextPageUrl = obj.nextPageUrl;
|
|
305
|
+
const path_nextPageUrl = path + '.nextPageUrl';
|
|
306
|
+
if (typeof obj_nextPageUrl !== 'string') {
|
|
307
|
+
return new TypeError('Expected "string" but received "' + typeof obj_nextPageUrl + '" (at "' + path_nextPageUrl + '")');
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
if (obj.previousPageUrl !== undefined) {
|
|
311
|
+
const obj_previousPageUrl = obj.previousPageUrl;
|
|
312
|
+
const path_previousPageUrl = path + '.previousPageUrl';
|
|
313
|
+
if (typeof obj_previousPageUrl !== 'string') {
|
|
314
|
+
return new TypeError('Expected "string" but received "' + typeof obj_previousPageUrl + '" (at "' + path_previousPageUrl + '")');
|
|
315
|
+
}
|
|
316
|
+
}
|
|
290
317
|
const obj_publishedDate = obj.publishedDate;
|
|
291
318
|
const path_publishedDate = path + '.publishedDate';
|
|
292
319
|
if (typeof obj_publishedDate !== 'string') {
|
|
@@ -297,10 +324,12 @@ function validate$b(obj, path = 'ManagedContentCollectionItemsRepresentation') {
|
|
|
297
324
|
if (typeof obj_title !== 'string') {
|
|
298
325
|
return new TypeError('Expected "string" but received "' + typeof obj_title + '" (at "' + path_title + '")');
|
|
299
326
|
}
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
327
|
+
if (obj.total !== undefined) {
|
|
328
|
+
const obj_total = obj.total;
|
|
329
|
+
const path_total = path + '.total';
|
|
330
|
+
if (typeof obj_total !== 'number' || (typeof obj_total === 'number' && Math.floor(obj_total) !== obj_total)) {
|
|
331
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_total + '" (at "' + path_total + '")');
|
|
332
|
+
}
|
|
304
333
|
}
|
|
305
334
|
const obj_urlName = obj.urlName;
|
|
306
335
|
const path_urlName = path + '.urlName';
|
|
@@ -354,7 +383,7 @@ function select$9(luvio, params) {
|
|
|
354
383
|
return select$a();
|
|
355
384
|
}
|
|
356
385
|
function keyBuilder$b(luvio, params) {
|
|
357
|
-
return keyPrefix + '::ManagedContentCollectionItemsRepresentation:(' + 'language:' + params.queryParams.language + ',' + 'channelId:' + params.urlParams.channelId + ',' + 'collectionKeyOrId:' + params.urlParams.collectionKeyOrId + ')';
|
|
386
|
+
return keyPrefix + '::ManagedContentCollectionItemsRepresentation:(' + 'language:' + params.queryParams.language + ',' + 'page:' + params.queryParams.page + ',' + 'pageSize:' + params.queryParams.pageSize + ',' + 'channelId:' + params.urlParams.channelId + ',' + 'collectionKeyOrId:' + params.urlParams.collectionKeyOrId + ')';
|
|
358
387
|
}
|
|
359
388
|
function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
|
|
360
389
|
getTypeCacheKeys$4(storeKeyMap, luvio, response, () => keyBuilder$b(luvio, resourceParams));
|
|
@@ -402,21 +431,13 @@ function createResourceRequest$5(config) {
|
|
|
402
431
|
};
|
|
403
432
|
}
|
|
404
433
|
|
|
405
|
-
function onFetchResponseSuccess$9(luvio, config, resourceParams, response) {
|
|
406
|
-
let updatedResourceParams = resourceParams;
|
|
407
|
-
// If language is not provided in request resource params, use language from the response
|
|
408
|
-
// and update the response params. As this resource params will be used to build a cache key.
|
|
409
|
-
if (updatedResourceParams.queryParams.language === undefined) {
|
|
410
|
-
updatedResourceParams.queryParams.language = response.body.language;
|
|
411
|
-
}
|
|
412
|
-
return onFetchResponseSuccess$8(luvio, config, updatedResourceParams, response);
|
|
413
|
-
}
|
|
414
|
-
|
|
415
434
|
const adapterName$5 = 'getCollectionItemsForChannel';
|
|
416
435
|
const getCollectionItemsForChannel_ConfigPropertyMetadata = [
|
|
417
436
|
generateParamConfigMetadata('channelId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
418
437
|
generateParamConfigMetadata('collectionKeyOrId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
419
438
|
generateParamConfigMetadata('language', false, 1 /* QueryParameter */, 0 /* String */),
|
|
439
|
+
generateParamConfigMetadata('page', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
440
|
+
generateParamConfigMetadata('pageSize', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
420
441
|
];
|
|
421
442
|
const getCollectionItemsForChannel_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, getCollectionItemsForChannel_ConfigPropertyMetadata);
|
|
422
443
|
const createResourceParams$5 = /*#__PURE__*/ createResourceParams$6(getCollectionItemsForChannel_ConfigPropertyMetadata);
|
|
@@ -446,7 +467,7 @@ function adapterFragment$5(luvio, config) {
|
|
|
446
467
|
createResourceParams$5(config);
|
|
447
468
|
return select$9();
|
|
448
469
|
}
|
|
449
|
-
function onFetchResponseSuccess$
|
|
470
|
+
function onFetchResponseSuccess$7(luvio, config, resourceParams, response) {
|
|
450
471
|
const snapshot = ingestSuccess$5(luvio, resourceParams, response, {
|
|
451
472
|
config,
|
|
452
473
|
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
@@ -465,7 +486,7 @@ function buildNetworkSnapshot$5(luvio, config, options) {
|
|
|
465
486
|
const request = createResourceRequest$5(resourceParams);
|
|
466
487
|
return luvio.dispatchResourceRequest(request, options)
|
|
467
488
|
.then((response) => {
|
|
468
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
489
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$7(luvio, config, resourceParams, response), () => {
|
|
469
490
|
const cache = new StoreKeyMap();
|
|
470
491
|
getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
|
|
471
492
|
return cache;
|
|
@@ -504,7 +525,7 @@ function select$8(luvio, params) {
|
|
|
504
525
|
return select$a();
|
|
505
526
|
}
|
|
506
527
|
function keyBuilder$9(luvio, params) {
|
|
507
|
-
return keyPrefix + '::ManagedContentCollectionItemsRepresentation:(' + 'language:' + params.queryParams.language + ',' + 'collectionKeyOrId:' + params.urlParams.collectionKeyOrId + ',' + 'siteId:' + params.urlParams.siteId + ')';
|
|
528
|
+
return keyPrefix + '::ManagedContentCollectionItemsRepresentation:(' + 'language:' + params.queryParams.language + ',' + 'page:' + params.queryParams.page + ',' + 'pageSize:' + params.queryParams.pageSize + ',' + 'collectionKeyOrId:' + params.urlParams.collectionKeyOrId + ',' + 'siteId:' + params.urlParams.siteId + ')';
|
|
508
529
|
}
|
|
509
530
|
function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
|
|
510
531
|
getTypeCacheKeys$4(storeKeyMap, luvio, response, () => keyBuilder$9(luvio, resourceParams));
|
|
@@ -552,21 +573,13 @@ function createResourceRequest$4(config) {
|
|
|
552
573
|
};
|
|
553
574
|
}
|
|
554
575
|
|
|
555
|
-
function onFetchResponseSuccess$7(luvio, config, resourceParams, response) {
|
|
556
|
-
let updatedResourceParams = resourceParams;
|
|
557
|
-
// If language is not provided in request resource params, use language from the response
|
|
558
|
-
// and update the response params. As this resource params will be used to build a cache key.
|
|
559
|
-
if (updatedResourceParams.queryParams.language === undefined) {
|
|
560
|
-
updatedResourceParams.queryParams.language = response.body.language;
|
|
561
|
-
}
|
|
562
|
-
return onFetchResponseSuccess$6(luvio, config, updatedResourceParams, response);
|
|
563
|
-
}
|
|
564
|
-
|
|
565
576
|
const adapterName$4 = 'getCollectionItemsForSite';
|
|
566
577
|
const getCollectionItemsForSite_ConfigPropertyMetadata = [
|
|
567
578
|
generateParamConfigMetadata('collectionKeyOrId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
568
579
|
generateParamConfigMetadata('siteId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
569
580
|
generateParamConfigMetadata('language', false, 1 /* QueryParameter */, 0 /* String */),
|
|
581
|
+
generateParamConfigMetadata('page', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
582
|
+
generateParamConfigMetadata('pageSize', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
570
583
|
];
|
|
571
584
|
const getCollectionItemsForSite_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getCollectionItemsForSite_ConfigPropertyMetadata);
|
|
572
585
|
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$6(getCollectionItemsForSite_ConfigPropertyMetadata);
|
|
@@ -615,7 +628,7 @@ function buildNetworkSnapshot$4(luvio, config, options) {
|
|
|
615
628
|
const request = createResourceRequest$4(resourceParams);
|
|
616
629
|
return luvio.dispatchResourceRequest(request, options)
|
|
617
630
|
.then((response) => {
|
|
618
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
631
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$6(luvio, config, resourceParams, response), () => {
|
|
619
632
|
const cache = new StoreKeyMap();
|
|
620
633
|
getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
|
|
621
634
|
return cache;
|
|
@@ -651,18 +664,18 @@ const getCollectionItemsForSiteAdapterFactory = (luvio) => function CMS__getColl
|
|
|
651
664
|
};
|
|
652
665
|
|
|
653
666
|
const TTL$2 = 3600000;
|
|
654
|
-
const VERSION$3 = "
|
|
667
|
+
const VERSION$3 = "04f084216502225bdb5fe939fc41b883";
|
|
655
668
|
function validate$a(obj, path = 'ManagedContentCollectionMetadataRepresentation') {
|
|
656
669
|
const v_error = (() => {
|
|
657
670
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
658
671
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
659
672
|
}
|
|
660
|
-
const
|
|
661
|
-
const
|
|
662
|
-
const
|
|
663
|
-
if (
|
|
664
|
-
let message = 'Object doesn\'t match
|
|
665
|
-
message +=
|
|
673
|
+
const obj_channelSummary = obj.channelSummary;
|
|
674
|
+
const path_channelSummary = path + '.channelSummary';
|
|
675
|
+
const referencepath_channelSummaryValidationError = validate$f(obj_channelSummary, path_channelSummary);
|
|
676
|
+
if (referencepath_channelSummaryValidationError !== null) {
|
|
677
|
+
let message = 'Object doesn\'t match ManagedContentDeliveryChannelSummaryRepresentation (at "' + path_channelSummary + '")\n';
|
|
678
|
+
message += referencepath_channelSummaryValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
666
679
|
return new TypeError(message);
|
|
667
680
|
}
|
|
668
681
|
const obj_collectionKey = obj.collectionKey;
|
|
@@ -2055,4 +2068,4 @@ withDefaultLuvio((luvio) => {
|
|
|
2055
2068
|
});
|
|
2056
2069
|
|
|
2057
2070
|
export { getCollectionItemsForChannel, getCollectionItemsForChannel_imperative, getCollectionItemsForSite, getCollectionItemsForSite_imperative, getCollectionMetadataForChannel, getCollectionMetadataForChannel_imperative, getCollectionMetadataForSite, getCollectionMetadataForSite_imperative, listContent, listContentInternal, listContentInternal_imperative, listContent_imperative };
|
|
2058
|
-
// version: 1.
|
|
2071
|
+
// version: 1.316.0-4453f1e2b6
|
package/src/raml/api.raml
CHANGED
|
@@ -92,6 +92,35 @@ types:
|
|
|
92
92
|
description: Information of the Target Entity associated with this channel
|
|
93
93
|
type: ManagedContentChannelTargetSummaryRepresentation
|
|
94
94
|
required: false # TODO W-8891123 Hand rolled
|
|
95
|
+
ManagedContentDeliveryChannelSummaryRepresentation:
|
|
96
|
+
description: Summary information of a CMS Delivery Channel
|
|
97
|
+
type: object
|
|
98
|
+
properties:
|
|
99
|
+
domainUrl:
|
|
100
|
+
description: Domain Url of the org
|
|
101
|
+
type: string
|
|
102
|
+
id:
|
|
103
|
+
description: Id of the Managed Content Channel
|
|
104
|
+
type: string
|
|
105
|
+
name:
|
|
106
|
+
description: Name of the managed content channel
|
|
107
|
+
type: string
|
|
108
|
+
resourceUrl:
|
|
109
|
+
description: Resource URL for detailed information about the ManagedContentChannel
|
|
110
|
+
type: string
|
|
111
|
+
target:
|
|
112
|
+
description: Information of the Target Entity associated with this channel
|
|
113
|
+
type: ManagedContentChannelTargetSummaryRepresentation
|
|
114
|
+
required: false
|
|
115
|
+
type:
|
|
116
|
+
description: Type of Managed Content Channel
|
|
117
|
+
type: string
|
|
118
|
+
enum:
|
|
119
|
+
- CloudToCloud
|
|
120
|
+
- Community
|
|
121
|
+
- ConnectedApp
|
|
122
|
+
- PublicUnauthenticated
|
|
123
|
+
- UserPermission
|
|
95
124
|
ManagedContentChannelTargetSummaryRepresentation:
|
|
96
125
|
description: Contextual Information of the channel in managed content delivery
|
|
97
126
|
api
|
|
@@ -133,15 +162,18 @@ types:
|
|
|
133
162
|
description: Information about collection Items.
|
|
134
163
|
type: object
|
|
135
164
|
properties:
|
|
136
|
-
|
|
137
|
-
description: The contextual information of the managed content channel
|
|
138
|
-
type:
|
|
165
|
+
channelSummary:
|
|
166
|
+
description: The contextual information of the delivery managed content channel
|
|
167
|
+
type: ManagedContentDeliveryChannelSummaryRepresentation
|
|
139
168
|
collectionKey:
|
|
140
169
|
description: The collection key
|
|
141
170
|
type: string
|
|
142
171
|
collectionType:
|
|
143
172
|
description: Type of the collection.
|
|
144
173
|
type: ManagedContentTypeSummaryRepresentation
|
|
174
|
+
currentPageUrl:
|
|
175
|
+
description: URL to the current page of collection authoring records.
|
|
176
|
+
type: string
|
|
145
177
|
id:
|
|
146
178
|
description: The id of the collection
|
|
147
179
|
type: string
|
|
@@ -153,6 +185,14 @@ types:
|
|
|
153
185
|
language:
|
|
154
186
|
description: language of the collection.
|
|
155
187
|
type: string
|
|
188
|
+
nextPageUrl:
|
|
189
|
+
description: URL to the next page of collection authoring records.
|
|
190
|
+
type: string
|
|
191
|
+
required: false # TODO handrolled W-9314597
|
|
192
|
+
previousPageUrl:
|
|
193
|
+
description: URL to the previous page of collection authoring records.
|
|
194
|
+
type: string
|
|
195
|
+
required: false # TODO handrolled W-9314597
|
|
156
196
|
publishedDate:
|
|
157
197
|
description: Published Date of the collection.
|
|
158
198
|
type: string
|
|
@@ -162,6 +202,7 @@ types:
|
|
|
162
202
|
total:
|
|
163
203
|
description: Total number of items in current collection detail page.
|
|
164
204
|
type: integer
|
|
205
|
+
required: false # TODO handrolled W-9314597
|
|
165
206
|
urlName:
|
|
166
207
|
description: URL Name of the collection.
|
|
167
208
|
type: string
|
|
@@ -169,9 +210,9 @@ types:
|
|
|
169
210
|
description: Collection Metadata.
|
|
170
211
|
type: object
|
|
171
212
|
properties:
|
|
172
|
-
|
|
173
|
-
description: The contextual information of the channel
|
|
174
|
-
type:
|
|
213
|
+
channelSummary:
|
|
214
|
+
description: The contextual information of the delivery managed content channel
|
|
215
|
+
type: ManagedContentDeliveryChannelSummaryRepresentation
|
|
175
216
|
collectionKey:
|
|
176
217
|
description: Globally unique identifier of a collection and doesn't change
|
|
177
218
|
when collection is moved between production and sandbox environments.
|
|
@@ -1465,6 +1506,7 @@ types:
|
|
|
1465
1506
|
/channels/{channelId}:
|
|
1466
1507
|
/collections/{collectionKeyOrId}:
|
|
1467
1508
|
get:
|
|
1509
|
+
displayName: getManagedContentCollectionDelivery
|
|
1468
1510
|
description: Get collection Items.
|
|
1469
1511
|
responses:
|
|
1470
1512
|
'200':
|
|
@@ -1474,8 +1516,19 @@ types:
|
|
|
1474
1516
|
type: ManagedContentCollectionItemsRepresentation
|
|
1475
1517
|
queryParameters:
|
|
1476
1518
|
language:
|
|
1519
|
+
description: Language locale for the managed content collection,
|
|
1520
|
+
for example, en_US.
|
|
1477
1521
|
type: string
|
|
1478
1522
|
required: false
|
|
1523
|
+
page:
|
|
1524
|
+
description: The page of items to be fetched.
|
|
1525
|
+
type: integer
|
|
1526
|
+
required: false
|
|
1527
|
+
pageSize:
|
|
1528
|
+
description: The number of items per page to be fetched. Default
|
|
1529
|
+
is 50.
|
|
1530
|
+
type: integer
|
|
1531
|
+
required: false
|
|
1479
1532
|
uriParameters:
|
|
1480
1533
|
channelId:
|
|
1481
1534
|
type: string
|
|
@@ -2058,6 +2111,7 @@ types:
|
|
|
2058
2111
|
# (oas-body-name): translationRequest
|
|
2059
2112
|
/sites/{siteId}/cms/delivery/collections/{collectionKeyOrId}:
|
|
2060
2113
|
get:
|
|
2114
|
+
displayName: getManagedContentCollectionDelivery
|
|
2061
2115
|
description: Get collection Items.
|
|
2062
2116
|
responses:
|
|
2063
2117
|
'200':
|
|
@@ -2067,8 +2121,17 @@ types:
|
|
|
2067
2121
|
type: ManagedContentCollectionItemsRepresentation
|
|
2068
2122
|
queryParameters:
|
|
2069
2123
|
language:
|
|
2124
|
+
description: Language locale for the managed content collection, for example, en_US.
|
|
2070
2125
|
type: string
|
|
2071
2126
|
required: false
|
|
2127
|
+
page:
|
|
2128
|
+
description: The page of items to be fetched.
|
|
2129
|
+
type: integer
|
|
2130
|
+
required: false
|
|
2131
|
+
pageSize:
|
|
2132
|
+
description: The number of items per page to be fetched. Default is 50.
|
|
2133
|
+
type: integer
|
|
2134
|
+
required: false
|
|
2072
2135
|
uriParameters:
|
|
2073
2136
|
collectionKeyOrId:
|
|
2074
2137
|
type: string
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { Luvio, FetchResponse } from '@luvio/engine';
|
|
2
|
-
import type { GetCollectionItemsForChannelConfig } from '../../../generated/adapters/getCollectionItemsForChannel';
|
|
3
|
-
import type { ResourceRequestConfig } from '../../../generated/resources/getConnectCmsDeliveryChannelsCollectionsByChannelIdAndCollectionKeyOrId';
|
|
4
|
-
import type { ManagedContentCollectionItemsRepresentation } from '../../../generated/types/ManagedContentCollectionItemsRepresentation';
|
|
5
|
-
export declare function onFetchResponseSuccess(luvio: Luvio, config: GetCollectionItemsForChannelConfig, resourceParams: ResourceRequestConfig, response: FetchResponse<ManagedContentCollectionItemsRepresentation>): Promise<import("@luvio/engine").FulfilledSnapshot<ManagedContentCollectionItemsRepresentation, {}> | import("@luvio/engine").StaleSnapshot<ManagedContentCollectionItemsRepresentation, {}> | import("@luvio/engine").PendingSnapshot<ManagedContentCollectionItemsRepresentation, any>>;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { Luvio, FetchResponse } from '@luvio/engine';
|
|
2
|
-
import type { GetCollectionItemsForSiteConfig } from '../../../generated/adapters/getCollectionItemsForSite';
|
|
3
|
-
import type { ResourceRequestConfig } from '../../../generated/resources/getConnectSitesCmsDeliveryCollectionsByCollectionKeyOrIdAndSiteId';
|
|
4
|
-
import type { ManagedContentCollectionItemsRepresentation } from '../../../generated/types/ManagedContentCollectionItemsRepresentation';
|
|
5
|
-
export declare function onFetchResponseSuccess(luvio: Luvio, config: GetCollectionItemsForSiteConfig, resourceParams: ResourceRequestConfig, response: FetchResponse<ManagedContentCollectionItemsRepresentation>): Promise<import("@luvio/engine").FulfilledSnapshot<ManagedContentCollectionItemsRepresentation, {}> | import("@luvio/engine").StaleSnapshot<ManagedContentCollectionItemsRepresentation, {}> | import("@luvio/engine").PendingSnapshot<ManagedContentCollectionItemsRepresentation, any>>;
|