chore: cleans up locked-documents (#8269)

Co-authored-by: Dan Ribbens <dan.ribbens@gmail.com>
This commit is contained in:
Patrik
2024-09-17 18:19:18 -04:00
committed by GitHub
parent 4d54cc6e02
commit 023c650e03
19 changed files with 209 additions and 417 deletions

View File

@@ -13,10 +13,9 @@ export interface Config {
collections: {
pages: Page;
posts: Post;
simple: Simple;
users: User;
'payload-preferences': PayloadPreference;
'payload-locked-documents': PayloadLockedDocument;
'payload-preferences': PayloadPreference;
'payload-migrations': PayloadMigration;
};
db: {
@@ -24,7 +23,6 @@ export interface Config {
};
globals: {
menu: Menu;
'custom-ts': CustomT;
};
locale: null;
user: User & {
@@ -56,37 +54,6 @@ export interface UserAuthOperations {
export interface Page {
id: string;
text?: string | null;
richText?: {
root: {
type: string;
children: {
type: string;
version: number;
[k: string]: unknown;
}[];
direction: ('ltr' | 'rtl') | null;
format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | '';
indent: number;
version: number;
};
[k: string]: unknown;
} | null;
myBlocks?:
| (
| {
test?: string | null;
id?: string | null;
blockName?: string | null;
blockType: 'test';
}
| {
test2?: string | null;
id?: string | null;
blockName?: string | null;
blockType: 'someBlock2';
}
)[]
| null;
updatedAt: string;
createdAt: string;
_status?: ('draft' | 'published') | null;
@@ -98,51 +65,10 @@ export interface Page {
export interface Post {
id: string;
text?: string | null;
richText?: {
root: {
type: string;
children: {
type: string;
version: number;
[k: string]: unknown;
}[];
direction: ('ltr' | 'rtl') | null;
format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | '';
indent: number;
version: number;
};
[k: string]: unknown;
} | null;
myBlocks?:
| (
| {
test?: string | null;
id?: string | null;
blockName?: string | null;
blockType: 'test';
}
| {
test2?: string | null;
id?: string | null;
blockName?: string | null;
blockType: 'someBlock2';
}
)[]
| null;
updatedAt: string;
createdAt: string;
_status?: ('draft' | 'published') | null;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "simple".
*/
export interface Simple {
id: string;
text?: string | null;
updatedAt: string;
createdAt: string;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "users".
@@ -161,6 +87,34 @@ export interface User {
lockUntil?: string | null;
password?: string | null;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "payload-locked-documents".
*/
export interface PayloadLockedDocument {
id: string;
document?:
| ({
relationTo: 'pages';
value: string | Page;
} | null)
| ({
relationTo: 'posts';
value: string | Post;
} | null)
| ({
relationTo: 'users';
value: string | User;
} | null);
globalSlug?: string | null;
user: {
relationTo: 'users';
value: string | User;
};
editedAt?: string | null;
updatedAt: string;
createdAt: string;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "payload-preferences".
@@ -184,45 +138,6 @@ export interface PayloadPreference {
updatedAt: string;
createdAt: string;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "payload-locked-documents".
*/
export interface PayloadLockedDocument {
id: string;
document?:
| ({
relationTo: 'pages';
value: string | Page;
} | null)
| ({
relationTo: 'posts';
value: string | Post;
} | null)
| ({
relationTo: 'simple';
value: string | Simple;
} | null)
| ({
relationTo: 'users';
value: string | User;
} | null)
| ({
relationTo: 'payload-preferences';
value: string | PayloadPreference;
} | null);
globalSlug?: string | null;
_lastEdited: {
user: {
relationTo: 'users';
value: string | User;
};
editedAt?: string | null;
};
isLocked?: boolean | null;
updatedAt: string;
createdAt: string;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "payload-migrations".
@@ -244,29 +159,6 @@ export interface Menu {
updatedAt?: string | null;
createdAt?: string | null;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "custom-ts".
*/
export interface CustomT {
id: string;
custom?: 'hello' | 'world';
withDefinitionsUsage?: ObjectWithNumber[];
json: {
id: string;
name: string;
age?: number;
}[];
updatedAt?: string | null;
createdAt?: string | null;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "objectWithNumber".
*/
export interface ObjectWithNumber {
id?: number;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "auth".