Fixup for bug with generated type

This commit is contained in:
DrMint 2024-03-01 23:42:03 +01:00
parent 63e00a9b9d
commit 8a819de41e
4 changed files with 19 additions and 4 deletions

View File

@ -1,5 +1,6 @@
import { Where } from "payload/types"; import { Where } from "payload/types";
import { sectionBlock } from "../../blocks/sectionBlock"; import { sectionBlock } from "../../blocks/sectionBlock";
import { transcriptBlock } from "../../blocks/transcriptBlock";
import { QuickFilters, publishStatusFilters } from "../../components/QuickFilters"; import { QuickFilters, publishStatusFilters } from "../../components/QuickFilters";
import { CollectionGroups, Collections, PageType } from "../../constants"; import { CollectionGroups, Collections, PageType } from "../../constants";
import { backPropagationField } from "../../fields/backPropagationField/backPropagationField"; import { backPropagationField } from "../../fields/backPropagationField/backPropagationField";
@ -121,7 +122,7 @@ export const Pages = buildVersionedCollectionConfig({
images: true, images: true,
inlines: true, inlines: true,
alignment: true, alignment: true,
blocks: [sectionBlock], blocks: [sectionBlock, transcriptBlock],
links: true, links: true,
lists: true, lists: true,
}), }),

View File

@ -1,4 +1,5 @@
import { sectionBlock } from "../../blocks/sectionBlock"; import { sectionBlock } from "../../blocks/sectionBlock";
import { transcriptBlock } from "../../blocks/transcriptBlock";
import { QuickFilters, publishStatusFilters } from "../../components/QuickFilters"; import { QuickFilters, publishStatusFilters } from "../../components/QuickFilters";
import { CollectionGroups, Collections, KeysTypes } from "../../constants"; import { CollectionGroups, Collections, KeysTypes } from "../../constants";
import { imageField } from "../../fields/imageField/imageField"; import { imageField } from "../../fields/imageField/imageField";
@ -100,7 +101,7 @@ export const Posts = buildVersionedCollectionConfig({
images: true, images: true,
inlines: true, inlines: true,
alignment: true, alignment: true,
blocks: [sectionBlock], blocks: [sectionBlock, transcriptBlock],
links: true, links: true,
lists: true, lists: true,
}), }),

View File

@ -1,4 +1,4 @@
import { CueBlock, LineBlock, SectionBlock, TranscriptBlock } from "./types/collections"; import type { CueBlock, LineBlock, SectionBlock, TranscriptBlock } from "./types/collections";
// END MOCKING SECTION // END MOCKING SECTION
@ -243,7 +243,20 @@ export const isBlockNodeTranscriptBlock = (
/* BLOCKS */ /* BLOCKS */
/* TODO: TO BE REMOVED WHEN https://github.com/payloadcms/payload/issues/5216 is closed */
export interface CueBlock {
id?: string | null;
blockName?: string | null;
}
export interface LineBlock {
id?: string | null;
blockName?: string | null;
}
export interface GenericBlock { export interface GenericBlock {
id?: string | null;
blockName?: string | null;
content: unknown; content: unknown;
blockType: string; blockType: string;
} }

View File

@ -77,7 +77,7 @@ export default buildConfig({
Keys, Keys,
Tags, Tags,
TagsGroups, TagsGroups,
Images Images,
], ],
db: mongooseAdapter({ db: mongooseAdapter({
url: process.env.MONGODB_URI ?? "mongodb://mongo:27017/payload", url: process.env.MONGODB_URI ?? "mongodb://mongo:27017/payload",