feat: jsdocs for generated types, by using admin.description (#9917)

This makes use of admin.description to generate JSDocs for field,
collection and global generated types.


![image](https://github.com/user-attachments/assets/980d825f-49a2-426d-933a-2ff3d205ea24)


![image](https://github.com/user-attachments/assets/d0b1f288-1ea1-4d80-8c05-003d59a4e41a)

For the future, we should add a dedicated property to override these
JSDocs.

You can view the effect of this PR on our test suite generated types
here:
05f552bbbc
This commit is contained in:
Alessio Gravili
2024-12-19 20:22:43 -07:00
committed by GitHub
parent 46e50c4572
commit b3308736c4
21 changed files with 323 additions and 47 deletions

View File

@@ -147,6 +147,9 @@ export interface User {
*/
export interface PayloadJob {
id: string;
/**
* Input data provided to the job
*/
input?:
| {
[k: string]: unknown;
@@ -167,7 +170,13 @@ export interface PayloadJob {
| null;
completedAt?: string | null;
totalTried?: number | null;
/**
* If hasError is true this job will not be retried
*/
hasError?: boolean | null;
/**
* If hasError is true, this is the error that caused it
*/
error?:
| {
[k: string]: unknown;
@@ -177,6 +186,9 @@ export interface PayloadJob {
| number
| boolean
| null;
/**
* Task execution log
*/
log?:
| {
executedAt: string;