@salesforce/lds-adapters-cms-delivery 1.313.0 → 1.315.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.
@@ -225,7 +225,7 @@ function validate$c(obj, path = 'ManagedContentCollectionItemRepresentation') {
225
225
  }
226
226
 
227
227
  const TTL$3 = 3600000;
228
- const VERSION$4 = "f8aeed959e28f0d935539e65aa3e5211";
228
+ const VERSION$4 = "8a583ba2f3c7661dc9e517fa2f9e9e60";
229
229
  function validate$b(obj, path = 'ManagedContentCollectionItemsRepresentation') {
230
230
  const v_error = (() => {
231
231
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
@@ -252,6 +252,11 @@ function validate$b(obj, path = 'ManagedContentCollectionItemsRepresentation') {
252
252
  message += referencepath_collectionTypeValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
253
253
  return new TypeError(message);
254
254
  }
255
+ const obj_currentPageUrl = obj.currentPageUrl;
256
+ const path_currentPageUrl = path + '.currentPageUrl';
257
+ if (typeof obj_currentPageUrl !== 'string') {
258
+ return new TypeError('Expected "string" but received "' + typeof obj_currentPageUrl + '" (at "' + path_currentPageUrl + '")');
259
+ }
255
260
  const obj_id = obj.id;
256
261
  const path_id = path + '.id';
257
262
  if (typeof obj_id !== 'string') {
@@ -277,6 +282,20 @@ function validate$b(obj, path = 'ManagedContentCollectionItemsRepresentation') {
277
282
  if (typeof obj_language !== 'string') {
278
283
  return new TypeError('Expected "string" but received "' + typeof obj_language + '" (at "' + path_language + '")');
279
284
  }
285
+ if (obj.nextPageUrl !== undefined) {
286
+ const obj_nextPageUrl = obj.nextPageUrl;
287
+ const path_nextPageUrl = path + '.nextPageUrl';
288
+ if (typeof obj_nextPageUrl !== 'string') {
289
+ return new TypeError('Expected "string" but received "' + typeof obj_nextPageUrl + '" (at "' + path_nextPageUrl + '")');
290
+ }
291
+ }
292
+ if (obj.previousPageUrl !== undefined) {
293
+ const obj_previousPageUrl = obj.previousPageUrl;
294
+ const path_previousPageUrl = path + '.previousPageUrl';
295
+ if (typeof obj_previousPageUrl !== 'string') {
296
+ return new TypeError('Expected "string" but received "' + typeof obj_previousPageUrl + '" (at "' + path_previousPageUrl + '")');
297
+ }
298
+ }
280
299
  const obj_publishedDate = obj.publishedDate;
281
300
  const path_publishedDate = path + '.publishedDate';
282
301
  if (typeof obj_publishedDate !== 'string') {
@@ -287,10 +306,12 @@ function validate$b(obj, path = 'ManagedContentCollectionItemsRepresentation') {
287
306
  if (typeof obj_title !== 'string') {
288
307
  return new TypeError('Expected "string" but received "' + typeof obj_title + '" (at "' + path_title + '")');
289
308
  }
290
- const obj_total = obj.total;
291
- const path_total = path + '.total';
292
- if (typeof obj_total !== 'number' || (typeof obj_total === 'number' && Math.floor(obj_total) !== obj_total)) {
293
- return new TypeError('Expected "integer" but received "' + typeof obj_total + '" (at "' + path_total + '")');
309
+ if (obj.total !== undefined) {
310
+ const obj_total = obj.total;
311
+ const path_total = path + '.total';
312
+ if (typeof obj_total !== 'number' || (typeof obj_total === 'number' && Math.floor(obj_total) !== obj_total)) {
313
+ return new TypeError('Expected "integer" but received "' + typeof obj_total + '" (at "' + path_total + '")');
314
+ }
294
315
  }
295
316
  const obj_urlName = obj.urlName;
296
317
  const path_urlName = path + '.urlName';
@@ -344,7 +365,7 @@ function select$9(luvio, params) {
344
365
  return select$a();
345
366
  }
346
367
  function keyBuilder$b(luvio, params) {
347
- return keyPrefix + '::ManagedContentCollectionItemsRepresentation:(' + 'language:' + params.queryParams.language + ',' + 'channelId:' + params.urlParams.channelId + ',' + 'collectionKeyOrId:' + params.urlParams.collectionKeyOrId + ')';
368
+ return keyPrefix + '::ManagedContentCollectionItemsRepresentation:(' + 'language:' + params.queryParams.language + ',' + 'page:' + params.queryParams.page + ',' + 'pageSize:' + params.queryParams.pageSize + ',' + 'channelId:' + params.urlParams.channelId + ',' + 'collectionKeyOrId:' + params.urlParams.collectionKeyOrId + ')';
348
369
  }
349
370
  function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
350
371
  getTypeCacheKeys$4(storeKeyMap, luvio, response, () => keyBuilder$b(luvio, resourceParams));
@@ -392,21 +413,13 @@ function createResourceRequest$5(config) {
392
413
  };
393
414
  }
394
415
 
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
416
  const adapterName$5 = 'getCollectionItemsForChannel';
406
417
  const getCollectionItemsForChannel_ConfigPropertyMetadata = [
407
418
  generateParamConfigMetadata('channelId', true, 0 /* UrlParameter */, 0 /* String */),
408
419
  generateParamConfigMetadata('collectionKeyOrId', true, 0 /* UrlParameter */, 0 /* String */),
409
420
  generateParamConfigMetadata('language', false, 1 /* QueryParameter */, 0 /* String */),
421
+ generateParamConfigMetadata('page', false, 1 /* QueryParameter */, 3 /* Integer */),
422
+ generateParamConfigMetadata('pageSize', false, 1 /* QueryParameter */, 3 /* Integer */),
410
423
  ];
411
424
  const getCollectionItemsForChannel_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, getCollectionItemsForChannel_ConfigPropertyMetadata);
412
425
  const createResourceParams$5 = /*#__PURE__*/ createResourceParams$6(getCollectionItemsForChannel_ConfigPropertyMetadata);
@@ -436,7 +449,7 @@ function adapterFragment$5(luvio, config) {
436
449
  createResourceParams$5(config);
437
450
  return select$9();
438
451
  }
439
- function onFetchResponseSuccess$8(luvio, config, resourceParams, response) {
452
+ function onFetchResponseSuccess$7(luvio, config, resourceParams, response) {
440
453
  const snapshot = ingestSuccess$5(luvio, resourceParams, response, {
441
454
  config,
442
455
  resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
@@ -455,7 +468,7 @@ function buildNetworkSnapshot$5(luvio, config, options) {
455
468
  const request = createResourceRequest$5(resourceParams);
456
469
  return luvio.dispatchResourceRequest(request, options)
457
470
  .then((response) => {
458
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$9(luvio, config, resourceParams, response), () => {
471
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$7(luvio, config, resourceParams, response), () => {
459
472
  const cache = new StoreKeyMap();
460
473
  getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
461
474
  return cache;
@@ -666,14 +679,14 @@ function createResourceRequest$4(config) {
666
679
  };
667
680
  }
668
681
 
669
- function onFetchResponseSuccess$7(luvio, config, resourceParams, response) {
682
+ function onFetchResponseSuccess$6(luvio, config, resourceParams, response) {
670
683
  let updatedResourceParams = resourceParams;
671
684
  // If language is not provided in request resource params, use language from the response
672
685
  // and update the response params. As this resource params will be used to build a cache key.
673
686
  if (updatedResourceParams.queryParams.language === undefined) {
674
687
  updatedResourceParams.queryParams.language = response.body.language;
675
688
  }
676
- return onFetchResponseSuccess$6(luvio, config, updatedResourceParams, response);
689
+ return onFetchResponseSuccess$5(luvio, config, updatedResourceParams, response);
677
690
  }
678
691
 
679
692
  const adapterName$4 = 'getCollectionMetadataForChannel';
@@ -711,7 +724,7 @@ function adapterFragment$4(luvio, config) {
711
724
  createResourceParams$4(config);
712
725
  return select$7();
713
726
  }
714
- function onFetchResponseSuccess$6(luvio, config, resourceParams, response) {
727
+ function onFetchResponseSuccess$5(luvio, config, resourceParams, response) {
715
728
  const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
716
729
  config,
717
730
  resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
@@ -730,7 +743,7 @@ function buildNetworkSnapshot$4(luvio, config, options) {
730
743
  const request = createResourceRequest$4(resourceParams);
731
744
  return luvio.dispatchResourceRequest(request, options)
732
745
  .then((response) => {
733
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$7(luvio, config, resourceParams, response), () => {
746
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$6(luvio, config, resourceParams, response), () => {
734
747
  const cache = new StoreKeyMap();
735
748
  getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
736
749
  return cache;
@@ -1187,7 +1200,7 @@ function adapterFragment$3(luvio, config) {
1187
1200
  createResourceParams$3(config);
1188
1201
  return select$5();
1189
1202
  }
1190
- function onFetchResponseSuccess$5(luvio, config, resourceParams, response) {
1203
+ function onFetchResponseSuccess$4(luvio, config, resourceParams, response) {
1191
1204
  const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
1192
1205
  config,
1193
1206
  resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
@@ -1206,7 +1219,7 @@ function buildNetworkSnapshot$3(luvio, config, options) {
1206
1219
  const request = createResourceRequest$3(resourceParams);
1207
1220
  return luvio.dispatchResourceRequest(request, options)
1208
1221
  .then((response) => {
1209
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$5(luvio, config, resourceParams, response), () => {
1222
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$4(luvio, config, resourceParams, response), () => {
1210
1223
  const cache = new StoreKeyMap();
1211
1224
  getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
1212
1225
  return cache;
@@ -1610,7 +1623,7 @@ function adapterFragment$2(luvio, config) {
1610
1623
  createResourceParams$2(config);
1611
1624
  return select$2();
1612
1625
  }
1613
- function onFetchResponseSuccess$4(luvio, config, resourceParams, response) {
1626
+ function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
1614
1627
  const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
1615
1628
  config,
1616
1629
  resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
@@ -1629,7 +1642,7 @@ function buildNetworkSnapshot$2(luvio, config, options) {
1629
1642
  const request = createResourceRequest$2(resourceParams);
1630
1643
  return luvio.dispatchResourceRequest(request, options)
1631
1644
  .then((response) => {
1632
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$4(luvio, config, resourceParams, response), () => {
1645
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
1633
1646
  const cache = new StoreKeyMap();
1634
1647
  getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
1635
1648
  return cache;
@@ -1668,7 +1681,7 @@ function select$1(luvio, params) {
1668
1681
  return select$a();
1669
1682
  }
1670
1683
  function keyBuilder$3(luvio, params) {
1671
- return keyPrefix + '::ManagedContentCollectionItemsRepresentation:(' + 'language:' + params.queryParams.language + ',' + 'collectionKeyOrId:' + params.urlParams.collectionKeyOrId + ',' + 'siteId:' + params.urlParams.siteId + ')';
1684
+ return keyPrefix + '::ManagedContentCollectionItemsRepresentation:(' + 'language:' + params.queryParams.language + ',' + 'page:' + params.queryParams.page + ',' + 'pageSize:' + params.queryParams.pageSize + ',' + 'collectionKeyOrId:' + params.urlParams.collectionKeyOrId + ',' + 'siteId:' + params.urlParams.siteId + ')';
1672
1685
  }
1673
1686
  function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
1674
1687
  getTypeCacheKeys$4(storeKeyMap, luvio, response, () => keyBuilder$3(luvio, resourceParams));
@@ -1716,21 +1729,13 @@ function createResourceRequest$1(config) {
1716
1729
  };
1717
1730
  }
1718
1731
 
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
1732
  const adapterName$1 = 'getCollectionItemsForSite';
1730
1733
  const getCollectionItemsForSite_ConfigPropertyMetadata = [
1731
1734
  generateParamConfigMetadata('collectionKeyOrId', true, 0 /* UrlParameter */, 0 /* String */),
1732
1735
  generateParamConfigMetadata('siteId', true, 0 /* UrlParameter */, 0 /* String */),
1733
1736
  generateParamConfigMetadata('language', false, 1 /* QueryParameter */, 0 /* String */),
1737
+ generateParamConfigMetadata('page', false, 1 /* QueryParameter */, 3 /* Integer */),
1738
+ generateParamConfigMetadata('pageSize', false, 1 /* QueryParameter */, 3 /* Integer */),
1734
1739
  ];
1735
1740
  const getCollectionItemsForSite_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getCollectionItemsForSite_ConfigPropertyMetadata);
1736
1741
  const createResourceParams$1 = /*#__PURE__*/ createResourceParams$6(getCollectionItemsForSite_ConfigPropertyMetadata);
@@ -1779,7 +1784,7 @@ function buildNetworkSnapshot$1(luvio, config, options) {
1779
1784
  const request = createResourceRequest$1(resourceParams);
1780
1785
  return luvio.dispatchResourceRequest(request, options)
1781
1786
  .then((response) => {
1782
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
1787
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
1783
1788
  const cache = new StoreKeyMap();
1784
1789
  getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
1785
1790
  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;
@@ -7,6 +7,8 @@ export interface ResourceRequestConfig {
7
7
  };
8
8
  queryParams: {
9
9
  language?: string;
10
+ page?: number;
11
+ pageSize?: number;
10
12
  };
11
13
  }
12
14
  export declare function select(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): $64$luvio_engine_Fragment;
@@ -7,6 +7,8 @@ export interface ResourceRequestConfig {
7
7
  };
8
8
  queryParams: {
9
9
  language?: string;
10
+ page?: number;
11
+ pageSize?: number;
10
12
  };
11
13
  }
12
14
  export declare function select(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): $64$luvio_engine_Fragment;
@@ -3,7 +3,7 @@ import { ManagedContentTypeSummaryRepresentation as ManagedContentTypeSummaryRep
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 = "f8aeed959e28f0d935539e65aa3e5211";
6
+ export declare const VERSION = "8a583ba2f3c7661dc9e517fa2f9e9e60";
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;
@@ -23,18 +23,24 @@ export interface ManagedContentCollectionItemsRepresentationNormalized {
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: number;
43
+ total?: number;
38
44
  /** URL Name of the collection. */
39
45
  urlName: string;
40
46
  }
@@ -48,11 +54,14 @@ export interface ManagedContentCollectionItemsRepresentation {
48
54
  channelInfo: ManagedContentChannelSummaryRepresentation_ManagedContentChannelSummaryRepresentation;
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: number;
65
+ total?: number;
57
66
  urlName: string;
58
67
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-adapters-cms-delivery",
3
- "version": "1.313.0",
3
+ "version": "1.315.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.313.0"
32
+ "@salesforce/lds-bindings": "^1.315.0"
33
33
  },
34
34
  "devDependencies": {
35
- "@salesforce/lds-compiler-plugins": "^1.313.0",
36
- "@salesforce/lds-karma": "^1.313.0"
35
+ "@salesforce/lds-compiler-plugins": "^1.315.0",
36
+ "@salesforce/lds-karma": "^1.315.0"
37
37
  },
38
38
  "nx": {
39
39
  "targets": {
package/sfdc/index.js CHANGED
@@ -235,7 +235,7 @@ function validate$c(obj, path = 'ManagedContentCollectionItemRepresentation') {
235
235
  }
236
236
 
237
237
  const TTL$3 = 3600000;
238
- const VERSION$4 = "f8aeed959e28f0d935539e65aa3e5211";
238
+ const VERSION$4 = "8a583ba2f3c7661dc9e517fa2f9e9e60";
239
239
  function validate$b(obj, path = 'ManagedContentCollectionItemsRepresentation') {
240
240
  const v_error = (() => {
241
241
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
@@ -262,6 +262,11 @@ function validate$b(obj, path = 'ManagedContentCollectionItemsRepresentation') {
262
262
  message += referencepath_collectionTypeValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
263
263
  return new TypeError(message);
264
264
  }
265
+ const obj_currentPageUrl = obj.currentPageUrl;
266
+ const path_currentPageUrl = path + '.currentPageUrl';
267
+ if (typeof obj_currentPageUrl !== 'string') {
268
+ return new TypeError('Expected "string" but received "' + typeof obj_currentPageUrl + '" (at "' + path_currentPageUrl + '")');
269
+ }
265
270
  const obj_id = obj.id;
266
271
  const path_id = path + '.id';
267
272
  if (typeof obj_id !== 'string') {
@@ -287,6 +292,20 @@ function validate$b(obj, path = 'ManagedContentCollectionItemsRepresentation') {
287
292
  if (typeof obj_language !== 'string') {
288
293
  return new TypeError('Expected "string" but received "' + typeof obj_language + '" (at "' + path_language + '")');
289
294
  }
295
+ if (obj.nextPageUrl !== undefined) {
296
+ const obj_nextPageUrl = obj.nextPageUrl;
297
+ const path_nextPageUrl = path + '.nextPageUrl';
298
+ if (typeof obj_nextPageUrl !== 'string') {
299
+ return new TypeError('Expected "string" but received "' + typeof obj_nextPageUrl + '" (at "' + path_nextPageUrl + '")');
300
+ }
301
+ }
302
+ if (obj.previousPageUrl !== undefined) {
303
+ const obj_previousPageUrl = obj.previousPageUrl;
304
+ const path_previousPageUrl = path + '.previousPageUrl';
305
+ if (typeof obj_previousPageUrl !== 'string') {
306
+ return new TypeError('Expected "string" but received "' + typeof obj_previousPageUrl + '" (at "' + path_previousPageUrl + '")');
307
+ }
308
+ }
290
309
  const obj_publishedDate = obj.publishedDate;
291
310
  const path_publishedDate = path + '.publishedDate';
292
311
  if (typeof obj_publishedDate !== 'string') {
@@ -297,10 +316,12 @@ function validate$b(obj, path = 'ManagedContentCollectionItemsRepresentation') {
297
316
  if (typeof obj_title !== 'string') {
298
317
  return new TypeError('Expected "string" but received "' + typeof obj_title + '" (at "' + path_title + '")');
299
318
  }
300
- const obj_total = obj.total;
301
- const path_total = path + '.total';
302
- if (typeof obj_total !== 'number' || (typeof obj_total === 'number' && Math.floor(obj_total) !== obj_total)) {
303
- return new TypeError('Expected "integer" but received "' + typeof obj_total + '" (at "' + path_total + '")');
319
+ if (obj.total !== undefined) {
320
+ const obj_total = obj.total;
321
+ const path_total = path + '.total';
322
+ if (typeof obj_total !== 'number' || (typeof obj_total === 'number' && Math.floor(obj_total) !== obj_total)) {
323
+ return new TypeError('Expected "integer" but received "' + typeof obj_total + '" (at "' + path_total + '")');
324
+ }
304
325
  }
305
326
  const obj_urlName = obj.urlName;
306
327
  const path_urlName = path + '.urlName';
@@ -354,7 +375,7 @@ function select$9(luvio, params) {
354
375
  return select$a();
355
376
  }
356
377
  function keyBuilder$b(luvio, params) {
357
- return keyPrefix + '::ManagedContentCollectionItemsRepresentation:(' + 'language:' + params.queryParams.language + ',' + 'channelId:' + params.urlParams.channelId + ',' + 'collectionKeyOrId:' + params.urlParams.collectionKeyOrId + ')';
378
+ return keyPrefix + '::ManagedContentCollectionItemsRepresentation:(' + 'language:' + params.queryParams.language + ',' + 'page:' + params.queryParams.page + ',' + 'pageSize:' + params.queryParams.pageSize + ',' + 'channelId:' + params.urlParams.channelId + ',' + 'collectionKeyOrId:' + params.urlParams.collectionKeyOrId + ')';
358
379
  }
359
380
  function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
360
381
  getTypeCacheKeys$4(storeKeyMap, luvio, response, () => keyBuilder$b(luvio, resourceParams));
@@ -402,21 +423,13 @@ function createResourceRequest$5(config) {
402
423
  };
403
424
  }
404
425
 
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
426
  const adapterName$5 = 'getCollectionItemsForChannel';
416
427
  const getCollectionItemsForChannel_ConfigPropertyMetadata = [
417
428
  generateParamConfigMetadata('channelId', true, 0 /* UrlParameter */, 0 /* String */),
418
429
  generateParamConfigMetadata('collectionKeyOrId', true, 0 /* UrlParameter */, 0 /* String */),
419
430
  generateParamConfigMetadata('language', false, 1 /* QueryParameter */, 0 /* String */),
431
+ generateParamConfigMetadata('page', false, 1 /* QueryParameter */, 3 /* Integer */),
432
+ generateParamConfigMetadata('pageSize', false, 1 /* QueryParameter */, 3 /* Integer */),
420
433
  ];
421
434
  const getCollectionItemsForChannel_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, getCollectionItemsForChannel_ConfigPropertyMetadata);
422
435
  const createResourceParams$5 = /*#__PURE__*/ createResourceParams$6(getCollectionItemsForChannel_ConfigPropertyMetadata);
@@ -446,7 +459,7 @@ function adapterFragment$5(luvio, config) {
446
459
  createResourceParams$5(config);
447
460
  return select$9();
448
461
  }
449
- function onFetchResponseSuccess$8(luvio, config, resourceParams, response) {
462
+ function onFetchResponseSuccess$7(luvio, config, resourceParams, response) {
450
463
  const snapshot = ingestSuccess$5(luvio, resourceParams, response, {
451
464
  config,
452
465
  resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
@@ -465,7 +478,7 @@ function buildNetworkSnapshot$5(luvio, config, options) {
465
478
  const request = createResourceRequest$5(resourceParams);
466
479
  return luvio.dispatchResourceRequest(request, options)
467
480
  .then((response) => {
468
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$9(luvio, config, resourceParams, response), () => {
481
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$7(luvio, config, resourceParams, response), () => {
469
482
  const cache = new StoreKeyMap();
470
483
  getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
471
484
  return cache;
@@ -504,7 +517,7 @@ function select$8(luvio, params) {
504
517
  return select$a();
505
518
  }
506
519
  function keyBuilder$9(luvio, params) {
507
- return keyPrefix + '::ManagedContentCollectionItemsRepresentation:(' + 'language:' + params.queryParams.language + ',' + 'collectionKeyOrId:' + params.urlParams.collectionKeyOrId + ',' + 'siteId:' + params.urlParams.siteId + ')';
520
+ return keyPrefix + '::ManagedContentCollectionItemsRepresentation:(' + 'language:' + params.queryParams.language + ',' + 'page:' + params.queryParams.page + ',' + 'pageSize:' + params.queryParams.pageSize + ',' + 'collectionKeyOrId:' + params.urlParams.collectionKeyOrId + ',' + 'siteId:' + params.urlParams.siteId + ')';
508
521
  }
509
522
  function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
510
523
  getTypeCacheKeys$4(storeKeyMap, luvio, response, () => keyBuilder$9(luvio, resourceParams));
@@ -552,21 +565,13 @@ function createResourceRequest$4(config) {
552
565
  };
553
566
  }
554
567
 
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
568
  const adapterName$4 = 'getCollectionItemsForSite';
566
569
  const getCollectionItemsForSite_ConfigPropertyMetadata = [
567
570
  generateParamConfigMetadata('collectionKeyOrId', true, 0 /* UrlParameter */, 0 /* String */),
568
571
  generateParamConfigMetadata('siteId', true, 0 /* UrlParameter */, 0 /* String */),
569
572
  generateParamConfigMetadata('language', false, 1 /* QueryParameter */, 0 /* String */),
573
+ generateParamConfigMetadata('page', false, 1 /* QueryParameter */, 3 /* Integer */),
574
+ generateParamConfigMetadata('pageSize', false, 1 /* QueryParameter */, 3 /* Integer */),
570
575
  ];
571
576
  const getCollectionItemsForSite_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getCollectionItemsForSite_ConfigPropertyMetadata);
572
577
  const createResourceParams$4 = /*#__PURE__*/ createResourceParams$6(getCollectionItemsForSite_ConfigPropertyMetadata);
@@ -615,7 +620,7 @@ function buildNetworkSnapshot$4(luvio, config, options) {
615
620
  const request = createResourceRequest$4(resourceParams);
616
621
  return luvio.dispatchResourceRequest(request, options)
617
622
  .then((response) => {
618
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$7(luvio, config, resourceParams, response), () => {
623
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$6(luvio, config, resourceParams, response), () => {
619
624
  const cache = new StoreKeyMap();
620
625
  getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
621
626
  return cache;
@@ -2055,4 +2060,4 @@ withDefaultLuvio((luvio) => {
2055
2060
  });
2056
2061
 
2057
2062
  export { getCollectionItemsForChannel, getCollectionItemsForChannel_imperative, getCollectionItemsForSite, getCollectionItemsForSite_imperative, getCollectionMetadataForChannel, getCollectionMetadataForChannel_imperative, getCollectionMetadataForSite, getCollectionMetadataForSite_imperative, listContent, listContentInternal, listContentInternal_imperative, listContent_imperative };
2058
- // version: 1.313.0-19e9b0d234
2063
+ // version: 1.315.0-b7eff13c6d
package/src/raml/api.raml CHANGED
@@ -142,6 +142,9 @@ types:
142
142
  collectionType:
143
143
  description: Type of the collection.
144
144
  type: ManagedContentTypeSummaryRepresentation
145
+ currentPageUrl:
146
+ description: URL to the current page of collection authoring records.
147
+ type: string
145
148
  id:
146
149
  description: The id of the collection
147
150
  type: string
@@ -153,6 +156,14 @@ types:
153
156
  language:
154
157
  description: language of the collection.
155
158
  type: string
159
+ nextPageUrl:
160
+ description: URL to the next page of collection authoring records.
161
+ type: string
162
+ required: false # TODO handrolled W-9314597
163
+ previousPageUrl:
164
+ description: URL to the previous page of collection authoring records.
165
+ type: string
166
+ required: false # TODO handrolled W-9314597
156
167
  publishedDate:
157
168
  description: Published Date of the collection.
158
169
  type: string
@@ -162,6 +173,7 @@ types:
162
173
  total:
163
174
  description: Total number of items in current collection detail page.
164
175
  type: integer
176
+ required: false # TODO handrolled W-9314597
165
177
  urlName:
166
178
  description: URL Name of the collection.
167
179
  type: string
@@ -1476,6 +1488,14 @@ types:
1476
1488
  language:
1477
1489
  type: string
1478
1490
  required: false
1491
+ page:
1492
+ description: The page of items to be fetched.
1493
+ type: integer
1494
+ required: false
1495
+ pageSize:
1496
+ description: The number of items per page to be fetched.
1497
+ type: integer
1498
+ required: false
1479
1499
  uriParameters:
1480
1500
  channelId:
1481
1501
  type: string
@@ -2069,6 +2089,14 @@ types:
2069
2089
  language:
2070
2090
  type: string
2071
2091
  required: false
2092
+ page:
2093
+ description: The page of items to be fetched.
2094
+ type: integer
2095
+ required: false
2096
+ pageSize:
2097
+ description: The number of items per page to be fetched.
2098
+ type: integer
2099
+ required: false
2072
2100
  uriParameters:
2073
2101
  collectionKeyOrId:
2074
2102
  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>>;