| 1 |
export const TAGS_ENDPOINT = '/wp/v2/tags' |
| 2 |
export const CATEGORIES_ENDPOINT = '/wp/v2/categories' |
| 3 |
|
| 4 |
export interface Term { |
| 5 |
id: number |
| 6 |
count: number |
| 7 |
description: string |
| 8 |
link: string |
| 9 |
name: string |
| 10 |
slug: string |
| 11 |
taxonomy: Taxonomy |
| 12 |
meta: Record<string, unknown> |
| 13 |
} |
| 14 |
|
| 15 |
export type PostTag = Term |
| 16 |
|
| 17 |
export interface Category extends Term { |
| 18 |
parent: number |
| 19 |
} |
| 20 |
|
| 21 |
export type Taxonomy = 'category' | 'post_tag' | 'nav_menu' | 'link_category' | 'post_format' |
| 22 |
|
| 23 |
export type Terms = Term[] |
| 24 |
export type PostTags = PostTag[] |
| 25 |
export type Categories = Category[] |
| 26 |
|