Skip to content

Commit

Permalink
string types
Browse files Browse the repository at this point in the history
  • Loading branch information
r1tsuu committed Oct 29, 2024
1 parent db1b441 commit 33bbd16
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions test/_community/payload-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export interface Config {
'payload-migrations': PayloadMigration;
};
db: {
defaultIDType: number;
defaultIDType: string;
};
globals: {
menu: Menu;
Expand Down Expand Up @@ -54,7 +54,7 @@ export interface UserAuthOperations {
* via the `definition` "posts".
*/
export interface Post {
id: number;
id: string;
text?: string | null;
serverTextField?: string | null;
richText?: {
Expand Down Expand Up @@ -97,7 +97,7 @@ export interface Post {
* via the `definition` "simple".
*/
export interface Simple {
id: number;
id: string;
text?: string | null;
updatedAt: string;
createdAt: string;
Expand All @@ -107,7 +107,7 @@ export interface Simple {
* via the `definition` "media".
*/
export interface Media {
id: number;
id: string;
updatedAt: string;
createdAt: string;
url?: string | null;
Expand Down Expand Up @@ -151,7 +151,7 @@ export interface Media {
* via the `definition` "users".
*/
export interface User {
id: number;
id: string;
updatedAt: string;
createdAt: string;
email: string;
Expand All @@ -168,28 +168,28 @@ export interface User {
* via the `definition` "payload-locked-documents".
*/
export interface PayloadLockedDocument {
id: number;
id: string;
document?:
| ({
relationTo: 'posts';
value: number | Post;
value: string | Post;
} | null)
| ({
relationTo: 'simple';
value: number | Simple;
value: string | Simple;
} | null)
| ({
relationTo: 'media';
value: number | Media;
value: string | Media;
} | null)
| ({
relationTo: 'users';
value: number | User;
value: string | User;
} | null);
globalSlug?: string | null;
user: {
relationTo: 'users';
value: number | User;
value: string | User;
};
updatedAt: string;
createdAt: string;
Expand All @@ -199,10 +199,10 @@ export interface PayloadLockedDocument {
* via the `definition` "payload-preferences".
*/
export interface PayloadPreference {
id: number;
id: string;
user: {
relationTo: 'users';
value: number | User;
value: string | User;
};
key?: string | null;
value?:
Expand All @@ -222,7 +222,7 @@ export interface PayloadPreference {
* via the `definition` "payload-migrations".
*/
export interface PayloadMigration {
id: number;
id: string;
name?: string | null;
batch?: number | null;
updatedAt: string;
Expand All @@ -233,7 +233,7 @@ export interface PayloadMigration {
* via the `definition` "menu".
*/
export interface Menu {
id: number;
id: string;
globalText?: string | null;
updatedAt?: string | null;
createdAt?: string | null;
Expand All @@ -243,7 +243,7 @@ export interface Menu {
* via the `definition` "custom-ts".
*/
export interface CustomT {
id: number;
id: string;
custom?: 'hello' | 'world';
withDefinitionsUsage?: ObjectWithNumber[];
json: {
Expand Down

0 comments on commit 33bbd16

Please sign in to comment.