import { RequestOptionsFactory } from '@wix/sdk-types'; /** * Gets a post by the specified ID. * * * The `getPost()` function returns a Promise that resolves to a post whose ID matches the given ID. * */ export declare function getPost(payload: object): RequestOptionsFactory; /** * Gets a post by the provided slug. * * * The `getPostBySlug()` function returns a Promise that resolves to a post whose slug matches the given slug. * * The `slug` is the end of a post's URL that refers to a specific post. For example, if a post's URL is `https:/example.com/blog/post/my-post-slug`, the slug is `my-post-slug`. The slug is case-sensitive, and is generally derived from the post title, unless specified otherwise. */ export declare function getPostBySlug(payload: object): RequestOptionsFactory; /** * Retrieves a list of published posts. * * * The `listPosts()` function returns a Promise that resolves to a list of up to 100 published posts. * * Using the `options` parameter, you can filter your list of posts, set the amount of posts to be returned, and sort your list in a specified order. * * By default, the list is sorted by `firstPublishedDate` in descending order, and the amount of posts returned is 50. */ export declare function listPosts(payload: object): RequestOptionsFactory; /** * Creates a query to retrieve a list of posts. * * * The `queryPosts()` function builds a query to retrieve a list of up to 100 posts, and returns a [`PostsQueryBuilder`](https://www.wix.com/velo/reference/wix-blog-backend/posts/postsquerybuilder) object. * * The returned object contains the query definition which is typically used to run the query using the [`find()`](https://www.wix.com/velo/reference/wix-blog-backend/posts/postsquerybuilder/find) function. * * You can refine the query by chaining `PostsQueryBuilder` functions onto the query. `PostsQueryBuilder` functions enable you to sort, filter, and control the results that `queryPosts()` returns. * * `queryPosts()` runs with these `PostsQueryBuilder` defaults that can be overridden: * + [`limit(50)`](https://www.wix.com/velo/reference/wix-blog-backend/posts/postsquerybuilder/limit) * + [`descending('firstPublishedDate')`](https://www.wix.com/velo/reference/wix-blog-backend/posts/postsquerybuilder/descending) * * Note that the default limit is `'50'`, but the max limit is `'100'`. * * To learn how to query posts, refer to the table below. * * The following `PostsQueryBuilder` functions are supported for the `queryPosts()` function. For a full description of the Posts object, see the object returned for the [`items`](https://www.wix.com/velo/reference/wix-blog-backend/posts/postsqueryresult/items) property in [`PostsQueryResult`](https://www.wix.com/velo/reference/wix-blog-backend/posts/postsqueryresult). */ export declare function queryPosts(payload: object): RequestOptionsFactory; /** * Gets a specified post's metrics. * * * The `getPostMetrics()` function returns a Promise that resolves to the specified post's metrics. * * A post's metrics include the comments, likes, and views the post receives. */ export declare function getPostMetrics(payload: object): RequestOptionsFactory; /** * Retrieves the number of published posts per month within a specified time range. * * * The `queryPostCountStats()` function returns a Promise that resolves to the number of posts per month within the specified time range. * * You can set the time range using the `rangeStart` and `months` properties. The time range always starts on the 1st day of the month set in `rangeStart` and includes the number of `months` following `rangeStart`. For example, if `rangeStart` is set to `'2022-03-13'` and `months` is set to `4`, the time range will be from `'2022-03-01'` until `'2022-06-30'`. The time range ends on the last day of the month. * * >**Note:** If there are no published posts in a specific month, that month is not included in the response. For example, let's say a blog has `0` posts dated in February 2022. If `rangeStart` is set to `'2022-01-01'` and `months` is set to `3`, the response includes `postCount` values for January and March, but not February. */ export declare function queryPostCountStats(payload: object): RequestOptionsFactory; /** * Gets the total amount of published posts on the blog. * * * The `getTotalPosts()` function returns a Promise that resolves to the total amount of published posts on your blog's site. * * * You can use the `language` option to filter posts for a specified language. */ export declare function getTotalPosts(payload: object): RequestOptionsFactory;