@agility/content-fetch 2.0.2-rc-2 → 2.0.2
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/.nyc_output/713b1ec2-05ec-4b67-8061-b6cad0a45ad5.json +1 -0
- package/coverage/base.css +223 -0
- package/coverage/block-navigation.js +79 -0
- package/coverage/index.html +123 -0
- package/coverage/prettify.css +1 -0
- package/coverage/prettify.js +2 -0
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +170 -0
- package/coverage/src/api-client.js.html +549 -0
- package/coverage/src/content-fetch.js.html +336 -0
- package/coverage/src/index.html +123 -0
- package/coverage/src/methods/getContentItem.js.html +285 -0
- package/coverage/src/methods/getContentList.js.html +486 -0
- package/coverage/src/methods/getGallery.js.html +243 -0
- package/coverage/src/methods/getPage.js.html +273 -0
- package/coverage/src/methods/getSitemapFlat.js.html +240 -0
- package/coverage/src/methods/getSitemapNested.js.html +231 -0
- package/coverage/src/methods/getSyncContent.js.html +258 -0
- package/coverage/src/methods/getSyncPages.js.html +258 -0
- package/coverage/src/methods/getUrlRedirections.js.html +339 -0
- package/coverage/src/methods/index.html +201 -0
- package/coverage/src/methods/syncContentItems.js.html +186 -0
- package/coverage/src/methods/syncPageItems.js.html +186 -0
- package/coverage/src/types/FilterLogicOperator.js.html +129 -0
- package/coverage/src/types/FilterOperator.js.html +156 -0
- package/coverage/src/types/SortDirection.js.html +129 -0
- package/coverage/src/types/index.html +123 -0
- package/coverage/src/utils.js.html +330 -0
- package/dist/api-client.d.ts +0 -3
- package/dist/browser.js +25 -66
- package/dist/node.js +25 -66
- package/dist/types/ContentItemReference.d.ts +5 -0
- package/dist/types/Filter.d.ts +2 -2
- package/package.json +1 -1
- package/dist/agility-content-fetch.node.js +0 -11377
- package/dist/methods/getPageByPath.d.ts +0 -42
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { Page } from "../types/Page";
|
|
2
|
-
import { ApiClientInstance } from "../types/Client";
|
|
3
|
-
/**
|
|
4
|
-
* Gets the details of a page by its Page ID.
|
|
5
|
-
* @memberof AgilityFetch.Client.Pages
|
|
6
|
-
* @param {Object} requestParams - The parameters for the API request.
|
|
7
|
-
* @param {number} requestParams.pageID - The unique page ID of the page you wish to retrieve in the current language.
|
|
8
|
-
* @param {string} requestParams.locale - The locale code of the content you want to retrieve.
|
|
9
|
-
* @param {string} requestParams.languageCode - DEPRECATED: Use locale instead - The language code of the content you want to retrieve.
|
|
10
|
-
* @param {boolean} [requestParams.expandAllContentLinks] - Whether or not to expand entire linked content references, includings lists and items that are rendered in the CMS as Grid or Link. Default is **false**
|
|
11
|
-
* @param {number} [requestParams.contentLinkDepth] - The depth, representing the levels in which you want linked content auto-resolved. Default is **2**.
|
|
12
|
-
* @returns {Promise<AgilityFetch.Types.Page>} - Returns a page item object.
|
|
13
|
-
* @example
|
|
14
|
-
*
|
|
15
|
-
* import agility from '@agility/content-fetch'
|
|
16
|
-
*
|
|
17
|
-
* const api = agility.getApi({
|
|
18
|
-
* guid: 'ade6cf3c',
|
|
19
|
-
* apiKey: 'defaultlive.201ffdd0841cacad5bb647e76547e918b0c9ecdb8b5ddb3cf92e9a79b03623cb',
|
|
20
|
-
* });
|
|
21
|
-
*
|
|
22
|
-
* api.getPage({
|
|
23
|
-
* pageID: 1,
|
|
24
|
-
* locale: 'en-us'
|
|
25
|
-
* })
|
|
26
|
-
* .then(function(page) {
|
|
27
|
-
* console.log(page);
|
|
28
|
-
* })
|
|
29
|
-
* .catch(function(error) {
|
|
30
|
-
* console.log(error);
|
|
31
|
-
* });
|
|
32
|
-
*/
|
|
33
|
-
export interface PageByPathRequestParams {
|
|
34
|
-
pagePath: string;
|
|
35
|
-
channelName: string;
|
|
36
|
-
locale?: string;
|
|
37
|
-
expandAllContentLinks?: boolean;
|
|
38
|
-
contentLinkDepth?: number;
|
|
39
|
-
languageCode?: string;
|
|
40
|
-
}
|
|
41
|
-
declare function getPageByPath(this: ApiClientInstance, requestParams: PageByPathRequestParams): Promise<Page>;
|
|
42
|
-
export default getPageByPath;
|