Add automatic type regeneration
This commit is contained in:
@@ -1,2 +1,3 @@
|
||||
dist
|
||||
build
|
||||
src/payload-types.ts
|
||||
@@ -37,6 +37,10 @@
|
||||
"typescript": "^4.7.4"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.ts": "eslint --cache --fix"
|
||||
"*.ts": [
|
||||
"eslint --cache --fix",
|
||||
"yarn generate:types",
|
||||
"git add src/payload-types.ts"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,7 +92,6 @@ const Events: CollectionConfig = {
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
]
|
||||
};
|
||||
|
||||
|
||||
50
src/payload-types.ts
Normal file
50
src/payload-types.ts
Normal file
@@ -0,0 +1,50 @@
|
||||
/* tslint:disable */
|
||||
/**
|
||||
* This file was automatically generated by Payload CMS.
|
||||
* DO NOT MODIFY IT BY HAND. Instead, modify your source Payload config,
|
||||
* and re-run `payload generate:types` to regenerate this file.
|
||||
*/
|
||||
|
||||
export interface Config {}
|
||||
/**
|
||||
* This interface was referenced by `Config`'s JSON-Schema
|
||||
* via the `definition` "users".
|
||||
*/
|
||||
export interface User {
|
||||
id: string;
|
||||
email?: string;
|
||||
resetPasswordToken?: string;
|
||||
resetPasswordExpiration?: string;
|
||||
loginAttempts?: number;
|
||||
lockUntil?: string;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
}
|
||||
/**
|
||||
* This interface was referenced by `Config`'s JSON-Schema
|
||||
* via the `definition` "event-types".
|
||||
*/
|
||||
export interface EventType {
|
||||
id: string;
|
||||
name: string;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
}
|
||||
/**
|
||||
* This interface was referenced by `Config`'s JSON-Schema
|
||||
* via the `definition` "events".
|
||||
*/
|
||||
export interface Event {
|
||||
id: string;
|
||||
name: string;
|
||||
type: {
|
||||
value: string | EventType;
|
||||
relationTo: 'event-types';
|
||||
};
|
||||
startDate: string;
|
||||
endDate?: string;
|
||||
startTime: string;
|
||||
endTime?: string;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
}
|
||||
Reference in New Issue
Block a user