Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
222 changes: 139 additions & 83 deletions dev/payload-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,92 @@
* and re-run `payload generate:types` to regenerate this file.
*/

/**
* Supported timezones in IANA format.
*
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "supportedTimezones".
*/
export type SupportedTimezones =
| 'Pacific/Midway'
| 'Pacific/Niue'
| 'Pacific/Honolulu'
| 'Pacific/Rarotonga'
| 'America/Anchorage'
| 'Pacific/Gambier'
| 'America/Los_Angeles'
| 'America/Tijuana'
| 'America/Denver'
| 'America/Phoenix'
| 'America/Chicago'
| 'America/Guatemala'
| 'America/New_York'
| 'America/Bogota'
| 'America/Caracas'
| 'America/Santiago'
| 'America/Buenos_Aires'
| 'America/Sao_Paulo'
| 'Atlantic/South_Georgia'
| 'Atlantic/Azores'
| 'Atlantic/Cape_Verde'
| 'Europe/London'
| 'Europe/Berlin'
| 'Africa/Lagos'
| 'Europe/Athens'
| 'Africa/Cairo'
| 'Europe/Moscow'
| 'Asia/Riyadh'
| 'Asia/Dubai'
| 'Asia/Baku'
| 'Asia/Karachi'
| 'Asia/Tashkent'
| 'Asia/Calcutta'
| 'Asia/Dhaka'
| 'Asia/Almaty'
| 'Asia/Jakarta'
| 'Asia/Bangkok'
| 'Asia/Shanghai'
| 'Asia/Singapore'
| 'Asia/Tokyo'
| 'Asia/Seoul'
| 'Australia/Brisbane'
| 'Australia/Sydney'
| 'Pacific/Guam'
| 'Pacific/Noumea'
| 'Pacific/Auckland'
| 'Pacific/Fiji';

export interface Config {
auth: {
users: UserAuthOperations;
};
blocks: {};
collections: {
posts: Post;
media: Media;
'plugin-collection': PluginCollection;
users: User;
authors: Author;
posts: Post;
'payload-locked-documents': PayloadLockedDocument;
'payload-preferences': PayloadPreference;
'payload-migrations': PayloadMigration;
};
collectionsJoins: {};
collectionsSelect: {
posts: PostsSelect<false> | PostsSelect<true>;
media: MediaSelect<false> | MediaSelect<true>;
'plugin-collection': PluginCollectionSelect<false> | PluginCollectionSelect<true>;
users: UsersSelect<false> | UsersSelect<true>;
authors: AuthorsSelect<false> | AuthorsSelect<true>;
posts: PostsSelect<false> | PostsSelect<true>;
'payload-locked-documents': PayloadLockedDocumentsSelect<false> | PayloadLockedDocumentsSelect<true>;
'payload-preferences': PayloadPreferencesSelect<false> | PayloadPreferencesSelect<true>;
'payload-migrations': PayloadMigrationsSelect<false> | PayloadMigrationsSelect<true>;
};
db: {
defaultIDType: string;
};
globals: {};
globalsSelect: {};
globals: {
settings: Setting;
};
globalsSelect: {
settings: SettingsSelect<false> | SettingsSelect<true>;
};
locale: null;
user: User & {
collection: 'users';
Expand Down Expand Up @@ -63,57 +121,47 @@ export interface UserAuthOperations {
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "posts".
*/
export interface Post {
id: string;
addedByPlugin?: string | null;
updatedAt: string;
createdAt: string;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "media".
* via the `definition` "users".
*/
export interface Media {
export interface User {
id: string;
totpSecret?: string | null;
hasTotp?: boolean | null;
updatedAt: string;
createdAt: string;
url?: string | null;
thumbnailURL?: string | null;
filename?: string | null;
mimeType?: string | null;
filesize?: number | null;
width?: number | null;
height?: number | null;
focalX?: number | null;
focalY?: number | null;
enableAPIKey?: boolean | null;
apiKey?: string | null;
apiKeyIndex?: string | null;
email: string;
resetPasswordToken?: string | null;
resetPasswordExpiration?: string | null;
salt?: string | null;
hash?: string | null;
loginAttempts?: number | null;
lockUntil?: string | null;
password?: string | null;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "plugin-collection".
* via the `definition` "authors".
*/
export interface PluginCollection {
export interface Author {
id: string;
firstname: string;
lastname: string;
updatedAt: string;
createdAt: string;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "users".
* via the `definition` "posts".
*/
export interface User {
export interface Post {
id: string;
title: string;
content: string;
updatedAt: string;
createdAt: string;
email: string;
resetPasswordToken?: string | null;
resetPasswordExpiration?: string | null;
salt?: string | null;
hash?: string | null;
loginAttempts?: number | null;
lockUntil?: string | null;
password?: string | null;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
Expand All @@ -123,20 +171,16 @@ export interface PayloadLockedDocument {
id: string;
document?:
| ({
relationTo: 'posts';
value: string | Post;
} | null)
| ({
relationTo: 'media';
value: string | Media;
relationTo: 'users';
value: string | User;
} | null)
| ({
relationTo: 'plugin-collection';
value: string | PluginCollection;
relationTo: 'authors';
value: string | Author;
} | null)
| ({
relationTo: 'users';
value: string | User;
relationTo: 'posts';
value: string | Post;
} | null);
globalSlug?: string | null;
user: {
Expand Down Expand Up @@ -182,53 +226,43 @@ export interface PayloadMigration {
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "posts_select".
*/
export interface PostsSelect<T extends boolean = true> {
addedByPlugin?: T;
updatedAt?: T;
createdAt?: T;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "media_select".
* via the `definition` "users_select".
*/
export interface MediaSelect<T extends boolean = true> {
export interface UsersSelect<T extends boolean = true> {
totpSecret?: T;
hasTotp?: T;
updatedAt?: T;
createdAt?: T;
url?: T;
thumbnailURL?: T;
filename?: T;
mimeType?: T;
filesize?: T;
width?: T;
height?: T;
focalX?: T;
focalY?: T;
enableAPIKey?: T;
apiKey?: T;
apiKeyIndex?: T;
email?: T;
resetPasswordToken?: T;
resetPasswordExpiration?: T;
salt?: T;
hash?: T;
loginAttempts?: T;
lockUntil?: T;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "plugin-collection_select".
* via the `definition` "authors_select".
*/
export interface PluginCollectionSelect<T extends boolean = true> {
id?: T;
export interface AuthorsSelect<T extends boolean = true> {
firstname?: T;
lastname?: T;
updatedAt?: T;
createdAt?: T;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "users_select".
* via the `definition` "posts_select".
*/
export interface UsersSelect<T extends boolean = true> {
export interface PostsSelect<T extends boolean = true> {
title?: T;
content?: T;
updatedAt?: T;
createdAt?: T;
email?: T;
resetPasswordToken?: T;
resetPasswordExpiration?: T;
salt?: T;
hash?: T;
loginAttempts?: T;
lockUntil?: T;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
Expand Down Expand Up @@ -262,6 +296,28 @@ export interface PayloadMigrationsSelect<T extends boolean = true> {
updatedAt?: T;
createdAt?: T;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "settings".
*/
export interface Setting {
id: string;
darkMode?: boolean | null;
maintenance?: boolean | null;
updatedAt?: string | null;
createdAt?: string | null;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "settings_select".
*/
export interface SettingsSelect<T extends boolean = true> {
darkMode?: T;
maintenance?: T;
updatedAt?: T;
createdAt?: T;
globalType?: T;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "auth".
Expand Down
3 changes: 3 additions & 0 deletions dev/payload.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ export default buildConfig({
collection: 'users',
forceSetup: process.env.FORCE_SETUP === '1',
disableAccessWrapper: process.env.DISABLE_ACCESS_WRAPPER === '1',
userSpecificForceTotpField: {
enabled: true,
},
}),
],
secret: process.env.PAYLOAD_SECRET || 'test-secret_key',
Expand Down
Loading