This fixes many various issues that are already fixed in 3.0. Updates Drizzle to match beta to fix some issues https://github.com/payloadcms/payload/issues/4673 https://github.com/payloadcms/payload/issues/6845 https://github.com/payloadcms/payload/issues/6266, prev Drizzle update PR https://github.com/payloadcms/payload/pull/7460/ Ported PRs: - https://github.com/payloadcms/payload/pull/6158 - https://github.com/payloadcms/payload/pull/7900 - https://github.com/payloadcms/payload/pull/7962 (does include duplication fixes for blocks / arrays with specific for 2.0 method) - https://github.com/payloadcms/payload/pull/8355 - https://github.com/payloadcms/payload/pull/8456 - https://github.com/payloadcms/payload/pull/8331 (not in the commits list, as it was a clean merge) - https://github.com/payloadcms/payload/pull/8369 - https://github.com/payloadcms/payload/pull/7749 - https://github.com/payloadcms/payload/pull/8539 --------- Co-authored-by: Dan Ribbens <dan.ribbens@gmail.com> Co-authored-by: James Mikrut <james@payloadcms.com>
502 lines
11 KiB
TypeScript
502 lines
11 KiB
TypeScript
/* tslint:disable */
|
|
/* eslint-disable */
|
|
/**
|
|
* This file was automatically generated by Payload.
|
|
* 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 {
|
|
collections: {
|
|
'blocks-fields': BlocksField
|
|
'nested-arrays': NestedArray
|
|
'nested-field-tables': NestedFieldTable
|
|
users: User
|
|
'localized-posts': LocalizedPost
|
|
'array-fields': ArrayField
|
|
'localized-required': LocalizedRequired
|
|
'with-localized-relationship': WithLocalizedRelationship
|
|
'relationship-localized': RelationshipLocalized
|
|
dummy: Dummy
|
|
'nested-to-array-and-block': NestedToArrayAndBlock
|
|
groups: Group
|
|
tabs: Tab
|
|
'localized-sort': LocalizedSort
|
|
'blocks-same-name': BlocksSameName
|
|
'restricted-by-locale': RestrictedByLocale
|
|
'payload-preferences': PayloadPreference
|
|
'payload-migrations': PayloadMigration
|
|
}
|
|
globals: {
|
|
'global-array': GlobalArray
|
|
}
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "blocks-fields".
|
|
*/
|
|
export interface BlocksField {
|
|
id: string
|
|
content?:
|
|
| {
|
|
content?:
|
|
| {
|
|
text?: string | null
|
|
id?: string | null
|
|
blockName?: string | null
|
|
blockType: 'textBlock'
|
|
}[]
|
|
| null
|
|
id?: string | null
|
|
blockName?: string | null
|
|
blockType: 'blockInsideBlock'
|
|
}[]
|
|
| null
|
|
updatedAt: string
|
|
createdAt: string
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "nested-arrays".
|
|
*/
|
|
export interface NestedArray {
|
|
id: string
|
|
arrayWithBlocks?:
|
|
| {
|
|
blocksWithinArray?:
|
|
| {
|
|
relationWithinBlock?: (string | null) | LocalizedPost
|
|
id?: string | null
|
|
blockName?: string | null
|
|
blockType: 'someBlock'
|
|
}[]
|
|
| null
|
|
id?: string | null
|
|
}[]
|
|
| null
|
|
arrayWithLocalizedRelation?:
|
|
| {
|
|
localizedRelation?: (string | null) | LocalizedPost
|
|
id?: string | null
|
|
}[]
|
|
| null
|
|
updatedAt: string
|
|
createdAt: string
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "localized-posts".
|
|
*/
|
|
export interface LocalizedPost {
|
|
id: string
|
|
title?: string | null
|
|
description?: string | null
|
|
localizedDescription?: string | null
|
|
localizedCheckbox?: boolean | null
|
|
children?: (string | LocalizedPost)[] | null
|
|
group?: {
|
|
children?: string | null
|
|
}
|
|
updatedAt: string
|
|
createdAt: string
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "nested-field-tables".
|
|
*/
|
|
export interface NestedFieldTable {
|
|
id: string
|
|
array?:
|
|
| {
|
|
relation?: {
|
|
relationTo: 'localized-posts'
|
|
value: string | LocalizedPost
|
|
} | null
|
|
hasManyRelation?: (string | LocalizedPost)[] | null
|
|
hasManyPolyRelation?:
|
|
| {
|
|
relationTo: 'localized-posts'
|
|
value: string | LocalizedPost
|
|
}[]
|
|
| null
|
|
select?: ('one' | 'two' | 'three')[] | null
|
|
number?: number[] | null
|
|
text?: string[] | null
|
|
id?: string | null
|
|
}[]
|
|
| null
|
|
blocks?:
|
|
| {
|
|
nestedBlocks?:
|
|
| {
|
|
relation?: {
|
|
relationTo: 'localized-posts'
|
|
value: string | LocalizedPost
|
|
} | null
|
|
id?: string | null
|
|
blockName?: string | null
|
|
blockType: 'content'
|
|
}[]
|
|
| null
|
|
array?:
|
|
| {
|
|
relation?: {
|
|
relationTo: 'localized-posts'
|
|
value: string | LocalizedPost
|
|
} | null
|
|
id?: string | null
|
|
}[]
|
|
| null
|
|
id?: string | null
|
|
blockName?: string | null
|
|
blockType: 'block'
|
|
}[]
|
|
| null
|
|
updatedAt: string
|
|
createdAt: string
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "users".
|
|
*/
|
|
export interface User {
|
|
id: string
|
|
relation?: (string | null) | LocalizedPost
|
|
assignedLocales?: ('en' | 'es' | 'pt' | 'ar')[] | null
|
|
roles?: ('admin' | 'editor') | null
|
|
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
|
|
* via the `definition` "array-fields".
|
|
*/
|
|
export interface ArrayField {
|
|
id: string
|
|
items?:
|
|
| {
|
|
text: string
|
|
id?: string | null
|
|
}[]
|
|
| null
|
|
updatedAt: string
|
|
createdAt: string
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "localized-required".
|
|
*/
|
|
export interface LocalizedRequired {
|
|
id: string
|
|
title: string
|
|
layout: (
|
|
| {
|
|
text?: string | null
|
|
nestedArray?:
|
|
| {
|
|
text?: string | null
|
|
id?: string | null
|
|
}[]
|
|
| null
|
|
id?: string | null
|
|
blockName?: string | null
|
|
blockType: 'text'
|
|
}
|
|
| {
|
|
number?: number | null
|
|
id?: string | null
|
|
blockName?: string | null
|
|
blockType: 'number'
|
|
}
|
|
)[]
|
|
myTab: {
|
|
text?: string | null
|
|
group?: {
|
|
nestedArray2?:
|
|
| {
|
|
nestedText?: string | null
|
|
id?: string | null
|
|
}[]
|
|
| null
|
|
nestedText?: string | null
|
|
}
|
|
}
|
|
updatedAt: string
|
|
createdAt: string
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "with-localized-relationship".
|
|
*/
|
|
export interface WithLocalizedRelationship {
|
|
id: string
|
|
localizedRelationship?: (string | null) | LocalizedPost
|
|
localizedRelationHasManyField?: (string | LocalizedPost)[] | null
|
|
localizedRelationMultiRelationTo?:
|
|
| ({
|
|
relationTo: 'localized-posts'
|
|
value: string | LocalizedPost
|
|
} | null)
|
|
| ({
|
|
relationTo: 'dummy'
|
|
value: string | Dummy
|
|
} | null)
|
|
localizedRelationMultiRelationToHasMany?:
|
|
| (
|
|
| {
|
|
relationTo: 'localized-posts'
|
|
value: string | LocalizedPost
|
|
}
|
|
| {
|
|
relationTo: 'dummy'
|
|
value: string | Dummy
|
|
}
|
|
)[]
|
|
| null
|
|
updatedAt: string
|
|
createdAt: string
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "dummy".
|
|
*/
|
|
export interface Dummy {
|
|
id: string
|
|
name?: string | null
|
|
updatedAt: string
|
|
createdAt: string
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "relationship-localized".
|
|
*/
|
|
export interface RelationshipLocalized {
|
|
id: string
|
|
relationship?: (string | null) | LocalizedPost
|
|
relationshipHasMany?: (string | LocalizedPost)[] | null
|
|
relationMultiRelationTo?:
|
|
| ({
|
|
relationTo: 'localized-posts'
|
|
value: string | LocalizedPost
|
|
} | null)
|
|
| ({
|
|
relationTo: 'dummy'
|
|
value: string | Dummy
|
|
} | null)
|
|
relationMultiRelationToHasMany?:
|
|
| (
|
|
| {
|
|
relationTo: 'localized-posts'
|
|
value: string | LocalizedPost
|
|
}
|
|
| {
|
|
relationTo: 'dummy'
|
|
value: string | Dummy
|
|
}
|
|
)[]
|
|
| null
|
|
arrayField?:
|
|
| {
|
|
nestedRelation?: (string | null) | LocalizedPost
|
|
id?: string | null
|
|
}[]
|
|
| null
|
|
updatedAt: string
|
|
createdAt: string
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "nested-to-array-and-block".
|
|
*/
|
|
export interface NestedToArrayAndBlock {
|
|
id: string
|
|
blocks?:
|
|
| {
|
|
array?:
|
|
| {
|
|
text?: string | null
|
|
textNotLocalized?: string | null
|
|
id?: string | null
|
|
}[]
|
|
| null
|
|
id?: string | null
|
|
blockName?: string | null
|
|
blockType: 'block'
|
|
}[]
|
|
| null
|
|
updatedAt: string
|
|
createdAt: string
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "groups".
|
|
*/
|
|
export interface Group {
|
|
id: string
|
|
groupLocalizedRow?: {
|
|
text?: string | null
|
|
}
|
|
groupLocalized?: {
|
|
title?: string | null
|
|
}
|
|
group?: {
|
|
title?: string | null
|
|
}
|
|
deep?: {
|
|
array?:
|
|
| {
|
|
title?: string | null
|
|
id?: string | null
|
|
}[]
|
|
| null
|
|
blocks?:
|
|
| {
|
|
title?: string | null
|
|
id?: string | null
|
|
blockName?: string | null
|
|
blockType: 'first'
|
|
}[]
|
|
| null
|
|
}
|
|
updatedAt: string
|
|
createdAt: string
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "tabs".
|
|
*/
|
|
export interface Tab {
|
|
id: string
|
|
tabLocalized: {
|
|
title?: string | null
|
|
}
|
|
tab: {
|
|
title?: string | null
|
|
}
|
|
deep: {
|
|
array?:
|
|
| {
|
|
title?: string | null
|
|
id?: string | null
|
|
}[]
|
|
| null
|
|
blocks?:
|
|
| {
|
|
title?: string | null
|
|
id?: string | null
|
|
blockName?: string | null
|
|
blockType: 'first'
|
|
}[]
|
|
| null
|
|
}
|
|
updatedAt: string
|
|
createdAt: string
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "localized-sort".
|
|
*/
|
|
export interface LocalizedSort {
|
|
id: string
|
|
title?: string | null
|
|
date?: string | null
|
|
updatedAt: string
|
|
createdAt: string
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "blocks-same-name".
|
|
*/
|
|
export interface BlocksSameName {
|
|
id: string
|
|
blocks?:
|
|
| (
|
|
| {
|
|
title?: string | null
|
|
id?: string | null
|
|
blockName?: string | null
|
|
blockType: 'block_first'
|
|
}
|
|
| {
|
|
title?: string | null
|
|
id?: string | null
|
|
blockName?: string | null
|
|
blockType: 'block_second'
|
|
}
|
|
)[]
|
|
| null
|
|
updatedAt: string
|
|
createdAt: string
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "restricted-by-locale".
|
|
*/
|
|
export interface RestrictedByLocale {
|
|
id: string
|
|
title?: string | null
|
|
updatedAt: string
|
|
createdAt: string
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "payload-preferences".
|
|
*/
|
|
export interface PayloadPreference {
|
|
id: string
|
|
user: {
|
|
relationTo: 'users'
|
|
value: string | User
|
|
}
|
|
key?: string | null
|
|
value?:
|
|
| {
|
|
[k: string]: unknown
|
|
}
|
|
| unknown[]
|
|
| string
|
|
| number
|
|
| boolean
|
|
| null
|
|
updatedAt: string
|
|
createdAt: string
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "payload-migrations".
|
|
*/
|
|
export interface PayloadMigration {
|
|
id: string
|
|
name?: string | null
|
|
batch?: number | null
|
|
updatedAt: string
|
|
createdAt: string
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "global-array".
|
|
*/
|
|
export interface GlobalArray {
|
|
id: string
|
|
array?:
|
|
| {
|
|
text?: string | null
|
|
id?: string | null
|
|
}[]
|
|
| null
|
|
updatedAt?: string | null
|
|
createdAt?: string | null
|
|
}
|
|
|
|
declare module 'payload' {
|
|
export interface GeneratedTypes extends Config {}
|
|
}
|