Skip to content

Commit

Permalink
More docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbillion committed Jun 14, 2021
1 parent b0a7e54 commit 5c2b255
Show file tree
Hide file tree
Showing 2 changed files with 103 additions and 97 deletions.
101 changes: 52 additions & 49 deletions packages/wp-types/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,55 +29,58 @@ This package provides well-documented TypeScript definitions that describe the s

### Interfaces for REST API response objects

Route | Schema
------------------------------------ | ------
/wp/v2/block-directory/search | Todo
/wp/v2/block-renderer/{name} | Todo
/wp/v2/block-types | `WP_REST_API_Block_Types`
/wp/v2/block-types/{name} | `WP_REST_API_Block_Type`
/wp/v2/blocks | Todo
/wp/v2/blocks/{id} | Todo
/wp/v2/blocks/{id}/autosaves | Todo
/wp/v2/blocks/{parent}/autosaves/{id}| Todo
/wp/v2/categories | `WP_REST_API_Categories`
/wp/v2/categories/{id} | `WP_REST_API_Category`
/wp/v2/comments | `WP_REST_API_Comments`
/wp/v2/comments/{id} | `WP_REST_API_Comment`
/wp/v2/media | `WP_REST_API_Attachments`
/wp/v2/media/{id} | `WP_REST_API_Attachment`
/wp/v2/media/{id}/edit | Todo
/wp/v2/media/{id}/post-process | Todo
/wp/v2/pages | `WP_REST_API_Posts`
/wp/v2/pages/{id} | `WP_REST_API_Post`
/wp/v2/pages/{id}/autosaves | Todo
/wp/v2/pages/{parent}/autosaves/{id} | Todo
/wp/v2/pages/{parent}/revisions | Todo
/wp/v2/pages/{parent}/revisions/{id} | Todo
/wp/v2/plugins | Todo
/wp/v2/plugins/{plugin} | Todo
/wp/v2/posts | `WP_REST_API_Posts`
/wp/v2/posts/{id} | `WP_REST_API_Post`
/wp/v2/posts/{id}/autosaves | Todo
/wp/v2/posts/{parent}/autosaves/{id} | Todo
/wp/v2/posts/{parent}/revisions | Todo
/wp/v2/posts/{parent}/revisions/{id} | Todo
/wp/v2/search | `WP_REST_API_Search_Results`
/wp/v2/settings | Todo
/wp/v2/statuses | `WP_REST_API_Statuses`
/wp/v2/statuses/{status} | `WP_REST_API_Status`
/wp/v2/tags | `WP_REST_API_Tags`
/wp/v2/tags/{id} | `WP_REST_API_Tag`
/wp/v2/taxonomies | `WP_REST_API_Taxonomies`
/wp/v2/taxonomies/{taxonomy} | `WP_REST_API_Taxonomy`
/wp/v2/themes | Todo
/wp/v2/themes/{stylesheet} | Todo
/wp/v2/types | `WP_REST_API_Types`
/wp/v2/types/{type} | `WP_REST_API_Type`
/wp/v2/users | `WP_REST_API_Users`
/wp/v2/users/{id} | `WP_REST_API_User`
/wp/v2/users/me | `WP_REST_API_User`
Any enveloped REST API response | `WP_REST_API_Envelope<T>`
Any REST API error | `WP_REST_API_Error`
Route | Schema
------------------------------------------------------- | ------
/wp/v2/block-directory/search | Todo
/wp/v2/block-renderer/{name} | Todo
/wp/v2/block-types | `WP_REST_API_Block_Types`
/wp/v2/block-types/{name} | `WP_REST_API_Block_Type`
/wp/v2/blocks | Todo
/wp/v2/blocks/{id} | Todo
/wp/v2/blocks/{id}/autosaves | Todo
/wp/v2/blocks/{parent}/autosaves/{id} | Todo
/wp/v2/categories | `WP_REST_API_Categories`
/wp/v2/categories/{id} | `WP_REST_API_Category`
/wp/v2/comments | `WP_REST_API_Comments`
/wp/v2/comments/{id} | `WP_REST_API_Comment`
/wp/v2/media | `WP_REST_API_Attachments`
/wp/v2/media/{id} | `WP_REST_API_Attachment`
/wp/v2/media/{id}/edit | Todo
/wp/v2/media/{id}/post-process | Todo
/wp/v2/pages | `WP_REST_API_Posts`
/wp/v2/pages/{id} | `WP_REST_API_Post`
/wp/v2/pages/{id}/autosaves | Todo
/wp/v2/pages/{parent}/autosaves/{id} | Todo
/wp/v2/pages/{parent}/revisions | Todo
/wp/v2/pages/{parent}/revisions/{id} | Todo
/wp/v2/plugins | Todo
/wp/v2/plugins/{plugin} | Todo
/wp/v2/posts | `WP_REST_API_Posts`
/wp/v2/posts/{id} | `WP_REST_API_Post`
/wp/v2/posts/{id}/autosaves | Todo
/wp/v2/posts/{parent}/autosaves/{id} | Todo
/wp/v2/posts/{parent}/revisions | Todo
/wp/v2/posts/{parent}/revisions/{id} | Todo
/wp/v2/search | `WP_REST_API_Search_Results`
/wp/v2/settings | Todo
/wp/v2/statuses | `WP_REST_API_Statuses`
/wp/v2/statuses/{status} | `WP_REST_API_Status`
/wp/v2/tags | `WP_REST_API_Tags`
/wp/v2/tags/{id} | `WP_REST_API_Tag`
/wp/v2/taxonomies | `WP_REST_API_Taxonomies`
/wp/v2/taxonomies/{taxonomy} | `WP_REST_API_Taxonomy`
/wp/v2/themes | Todo
/wp/v2/themes/{stylesheet} | Todo
/wp/v2/types | `WP_REST_API_Types`
/wp/v2/types/{type} | `WP_REST_API_Type`
/wp/v2/users | `WP_REST_API_Users`
/wp/v2/users/({id}|me)/application-passwords | Todo
/wp/v2/users/({id}|me)/application-passwords/{uuid} | Todo
/wp/v2/users/({id}|me)/application-passwords/introspect | Todo
/wp/v2/users/{id} | `WP_REST_API_User`
/wp/v2/users/me | `WP_REST_API_User`
Any enveloped REST API response | `WP_REST_API_Envelope<T>`
Any REST API error | `WP_REST_API_Error`

### Properties

Expand Down
99 changes: 51 additions & 48 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,54 +33,57 @@ The schemas in this library are used to generate [the WordPress TypeScript defin

### REST API Response Schemas

Route | Schema
------------------------------------ | ------
/wp/v2/block-directory/search | Todo
/wp/v2/block-renderer/{name} | Todo
/wp/v2/block-types | `WP_REST_API_Block_Types`
/wp/v2/block-types/{name} | `WP_REST_API_Block_Type`
/wp/v2/blocks | Todo
/wp/v2/blocks/{id} | Todo
/wp/v2/blocks/{id}/autosaves | Todo
/wp/v2/blocks/{parent}/autosaves/{id}| Todo
/wp/v2/categories | `WP_REST_API_Categories`
/wp/v2/categories/{id} | `WP_REST_API_Category`
/wp/v2/comments | `WP_REST_API_Comments`
/wp/v2/comments/{id} | `WP_REST_API_Comment`
/wp/v2/media | `WP_REST_API_Attachments`
/wp/v2/media/{id} | `WP_REST_API_Attachment`
/wp/v2/media/{id}/edit | Todo
/wp/v2/media/{id}/post-process | Todo
/wp/v2/pages | `WP_REST_API_Posts`
/wp/v2/pages/{id} | `WP_REST_API_Post`
/wp/v2/pages/{id}/autosaves | Todo
/wp/v2/pages/{parent}/autosaves/{id} | Todo
/wp/v2/pages/{parent}/revisions | Todo
/wp/v2/pages/{parent}/revisions/{id} | Todo
/wp/v2/plugins | Todo
/wp/v2/plugins/{plugin} | Todo
/wp/v2/posts | `WP_REST_API_Posts`
/wp/v2/posts/{id} | `WP_REST_API_Post`
/wp/v2/posts/{id}/autosaves | Todo
/wp/v2/posts/{parent}/autosaves/{id} | Todo
/wp/v2/posts/{parent}/revisions | Todo
/wp/v2/posts/{parent}/revisions/{id} | Todo
/wp/v2/search | `WP_REST_API_Search_Results`
/wp/v2/settings | Todo
/wp/v2/statuses | `WP_REST_API_Statuses`
/wp/v2/statuses/{status} | `WP_REST_API_Status`
/wp/v2/tags | `WP_REST_API_Tags`
/wp/v2/tags/{id} | `WP_REST_API_Tag`
/wp/v2/taxonomies | `WP_REST_API_Taxonomies`
/wp/v2/taxonomies/{taxonomy} | `WP_REST_API_Taxonomy`
/wp/v2/themes | Todo
/wp/v2/themes/{stylesheet} | Todo
/wp/v2/types | `WP_REST_API_Types`
/wp/v2/types/{type} | `WP_REST_API_Type`
/wp/v2/users | `WP_REST_API_Users`
/wp/v2/users/{id} | `WP_REST_API_User`
/wp/v2/users/me | `WP_REST_API_User`
Any REST API error | `WP_REST_API_Error`
Route | Schema
------------------------------------------------------- | ------
/wp/v2/block-directory/search | Todo
/wp/v2/block-renderer/{name} | Todo
/wp/v2/block-types | `WP_REST_API_Block_Types`
/wp/v2/block-types/{name} | `WP_REST_API_Block_Type`
/wp/v2/blocks | Todo
/wp/v2/blocks/{id} | Todo
/wp/v2/blocks/{id}/autosaves | Todo
/wp/v2/blocks/{parent}/autosaves/{id} | Todo
/wp/v2/categories | `WP_REST_API_Categories`
/wp/v2/categories/{id} | `WP_REST_API_Category`
/wp/v2/comments | `WP_REST_API_Comments`
/wp/v2/comments/{id} | `WP_REST_API_Comment`
/wp/v2/media | `WP_REST_API_Attachments`
/wp/v2/media/{id} | `WP_REST_API_Attachment`
/wp/v2/media/{id}/edit | Todo
/wp/v2/media/{id}/post-process | Todo
/wp/v2/pages | `WP_REST_API_Posts`
/wp/v2/pages/{id} | `WP_REST_API_Post`
/wp/v2/pages/{id}/autosaves | Todo
/wp/v2/pages/{parent}/autosaves/{id} | Todo
/wp/v2/pages/{parent}/revisions | Todo
/wp/v2/pages/{parent}/revisions/{id} | Todo
/wp/v2/plugins | Todo
/wp/v2/plugins/{plugin} | Todo
/wp/v2/posts | `WP_REST_API_Posts`
/wp/v2/posts/{id} | `WP_REST_API_Post`
/wp/v2/posts/{id}/autosaves | Todo
/wp/v2/posts/{parent}/autosaves/{id} | Todo
/wp/v2/posts/{parent}/revisions | Todo
/wp/v2/posts/{parent}/revisions/{id} | Todo
/wp/v2/search | `WP_REST_API_Search_Results`
/wp/v2/settings | Todo
/wp/v2/statuses | `WP_REST_API_Statuses`
/wp/v2/statuses/{status} | `WP_REST_API_Status`
/wp/v2/tags | `WP_REST_API_Tags`
/wp/v2/tags/{id} | `WP_REST_API_Tag`
/wp/v2/taxonomies | `WP_REST_API_Taxonomies`
/wp/v2/taxonomies/{taxonomy} | `WP_REST_API_Taxonomy`
/wp/v2/themes | Todo
/wp/v2/themes/{stylesheet} | Todo
/wp/v2/types | `WP_REST_API_Types`
/wp/v2/types/{type} | `WP_REST_API_Type`
/wp/v2/users | `WP_REST_API_Users`
/wp/v2/users/({id}|me)/application-passwords | Todo
/wp/v2/users/({id}|me)/application-passwords/{uuid} | Todo
/wp/v2/users/({id}|me)/application-passwords/introspect | Todo
/wp/v2/users/{id} | `WP_REST_API_User`
/wp/v2/users/me | `WP_REST_API_User`
Any REST API error | `WP_REST_API_Error`

The REST API schemas use JSON Hyper-Schema.

Expand Down

0 comments on commit 5c2b255

Please sign in to comment.