payload-rest-client
Version:
A typesafe rest api client for the payload cms.
50 lines (49 loc) • 1.05 kB
TypeScript
export interface User {
id: string;
email: string;
name: string;
tags?: (string | Tag)[] | null;
password?: string | null;
createdAt: string;
updatedAt: string;
}
export interface Tag {
id: number;
name: string;
relatedUsers?: {
docs?: (string | User)[] | null;
hasNextPage?: boolean | null;
} | null;
updatedAt: string;
createdAt: string;
}
export interface Settings {
id: string;
test: string;
updatedAt?: string | null;
createdAt?: string | null;
}
export interface UsersSelect<T extends boolean = true> {
updatedAt?: T;
createdAt?: T;
email?: T;
name?: T;
tags?: T;
resetPasswordToken?: T;
resetPasswordExpiration?: T;
salt?: T;
hash?: T;
loginAttempts?: T;
lockUntil?: T;
}
export interface TagsSelect<T extends boolean = true> {
name?: T;
updatedAt?: T;
createdAt?: T;
}
export interface SettingsSelect<T extends boolean = true> {
test?: T;
updatedAt?: T;
createdAt?: T;
globalType?: T;
}