Search.../

listDeletedDraftPosts( )

Developer Preview

Retrieves a list of up to 100 deleted draft posts.

Description

List Deleted Draft Posts runs with these defaults, which you can override:

  • editedDate is sorted in descending order. In this case,editedDate implies the date the post was deleted.
  • paging.limit is 50.
  • paging.offset is 0.
Admin Method

This function requires elevated permissions to run. This function is not universal and runs only on the backend.

Syntax

function listDeletedDraftPosts(options: ListDeletedDraftPostsOptions): Promise<ListDeletedDraftPostsResponse>

listDeletedDraftPosts Parameters

NAME
TYPE
DESCRIPTION
options
Optional
ListDeletedDraftPostsOptions

Options for listing deleted draft posts.

Returns

Return Type:

Promise<
ListDeletedDraftPostsResponse
>
NAME
TYPE
DESCRIPTION
draftPosts
Array<
DraftPost
>

List of draft posts.

metaData
MetaData

Details on the paged set of results returned.

Was this helpful?

listDeletedDraftPosts example

Copy Code
1import { draftPosts } from 'wix-blog-backend';
2
3 async function listDeletedDraftPosts(options) {
4 try {
5 const result = await draftPosts.listDeletedDraftPosts(options);
6
7 return result;
8 } catch (error) {
9 console.error(error);
10 // Handle the error
11 }
12 }
13