PluginProbe
Code Snippets / 3.6.6
Code Snippets v3.6.6
3.10.2 3.10.1 3.10.0 3.10.0-beta.2 3.10.0-beta.1 4.0.0-beta.1 3.9.6 trunk 2.10.0 2.10.1 2.12.0 2.12.1 2.13.0 2.13.1 2.13.2 2.13.3 2.14.0 2.14.1 2.14.2 2.14.3 2.14.4 2.14.5 2.14.6 3.0.0 3.0.1 All 64 releases
code-snippets / js / types / wp / Post.ts

Post.ts in Code Snippets 3.6.6, at js/types/wp/Post.ts

44 lines 989 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 export const POSTS_ENDPOINT = '/wp/v2/posts'
2
3 export interface Post {
4 id: number
5 date: string | null
6 date_gmt?: string | null
7 readonly guid?: { rendered: string }
8 link: string
9 modified?: string
10 modified_gmt?: string
11 slug: string
12 status?: PostStatus
13 readonly type: string
14 password?: string
15 readonly permalink_template?: string
16 readonly generated_slug?: string
17 title: { rendered: string }
18 content?: {
19 rendered: string
20 protected: boolean
21 }
22 excerpt: {
23 rendered: string
24 protected: false
25 }
26 author: number
27 featured_media: number
28 comment_status?: 'open' | 'closed'
29 ping_status?: 'open' | 'closed'
30 format?: PostFormat
31 meta?: Record<string, unknown>
32 sticky?: boolean
33 template?: string
34 categories?: number[]
35 tags?: number[]
36 }
37
38 export type PostStatus = 'publish' | 'future' | 'draft' | 'pending' | 'private'
39
40 export type PostFormat =
41 'standard' | 'aside' | 'chat' | 'gallery' | 'link' | 'image' | 'quote' | 'status' | 'video' | 'audio'
42
43 export type Posts = Post[]
44