diff --git a/apps/roboshield/payload-types.ts b/apps/roboshield/payload-types.ts index 6928f0159..18b4b04eb 100644 --- a/apps/roboshield/payload-types.ts +++ b/apps/roboshield/payload-types.ts @@ -11,11 +11,11 @@ export interface Config { media: Media; pages: Page; users: User; - "payload-preferences": PayloadPreference; - "payload-migrations": PayloadMigration; + 'payload-preferences': PayloadPreference; + 'payload-migrations': PayloadMigration; }; globals: { - "settings-site": SettingsSite; + 'settings-site': SettingsSite; }; } /** @@ -53,7 +53,7 @@ export interface Page { subtitle: string; id?: string | null; blockName?: string | null; - blockType: "page-header"; + blockType: 'page-header'; } | SiteHero | { @@ -65,30 +65,30 @@ export interface Page { }[]; id?: string | null; blockName?: string | null; - blockType: "richtext"; + blockType: 'richtext'; } | { image: string | Media; id?: string | null; blockName?: string | null; - blockType: "mediaBlock"; + blockType: 'mediaBlock'; } | { externalEmbedFields?: { - embedType?: ("url" | "code") | null; + embedType?: ('url' | 'code') | null; url?: string | null; caption?: string | null; code?: string | null; }; id?: string | null; blockName?: string | null; - blockType: "externalEmbed"; + blockType: 'externalEmbed'; } )[] | null; id?: string | null; blockName?: string | null; - blockType: "content"; + blockType: 'content'; } | { title: string; @@ -105,7 +105,7 @@ export interface Page { | null; id?: string | null; blockName?: string | null; - blockType: "statistics"; + blockType: 'statistics'; } | { steps?: @@ -124,7 +124,7 @@ export interface Page { fetch: string; id?: string | null; blockName?: string | null; - blockType: "existing-robots-txt"; + blockType: 'existing-robots-txt'; } | { title: string; @@ -147,7 +147,7 @@ export interface Page { }; id?: string | null; blockName?: string | null; - blockType: "delays"; + blockType: 'delays'; } | { title: string; @@ -170,7 +170,7 @@ export interface Page { }; id?: string | null; blockName?: string | null; - blockType: "paths"; + blockType: 'paths'; } | { title: string; @@ -189,7 +189,7 @@ export interface Page { }; id?: string | null; blockName?: string | null; - blockType: "block-bots"; + blockType: 'block-bots'; } | { title: string; @@ -201,7 +201,7 @@ export interface Page { placeholder: string; id?: string | null; blockName?: string | null; - blockType: "site-maps"; + blockType: 'site-maps'; } | { title: string; @@ -213,7 +213,7 @@ export interface Page { placeholder: string; id?: string | null; blockName?: string | null; - blockType: "finish"; + blockType: 'finish'; } )[] | null; @@ -227,7 +227,7 @@ export interface Page { }; id?: string | null; blockName?: string | null; - blockType: "robots-txt-generator"; + blockType: 'robots-txt-generator'; } )[] | null; @@ -247,7 +247,7 @@ export interface Page { | null; updatedAt: string; createdAt: string; - _status?: ("draft" | "published") | null; + _status?: ('draft' | 'published') | null; } /** * This interface was referenced by `Config`'s JSON-Schema @@ -256,7 +256,7 @@ export interface Page { export interface SiteHero { heroHeaders?: | { - headingType?: ("largeHeading" | "subHeading" | "rotatingText") | null; + headingType?: ('largeHeading' | 'subHeading' | 'rotatingText') | null; title?: string | null; id?: string | null; }[] @@ -267,7 +267,7 @@ export interface SiteHero { heroCallToAction?: string | null; id?: string | null; blockName?: string | null; - blockType: "page-hero"; + blockType: 'page-hero'; } /** * This interface was referenced by `Config`'s JSON-Schema @@ -277,7 +277,7 @@ export interface User { id: string; firstName: string; lastName: string; - roles: ("admin" | "editor")[]; + roles: ('admin' | 'editor')[]; updatedAt: string; createdAt: string; email: string; @@ -298,7 +298,7 @@ export interface User { export interface PayloadPreference { id: string; user: { - relationTo: "users"; + relationTo: 'users'; value: string | User; }; key?: string | null; @@ -341,9 +341,9 @@ export interface SettingsSite { menus?: | { label: string; - linkType?: ("custom" | "internal") | null; + linkType?: ('custom' | 'internal') | null; doc?: { - relationTo: "pages"; + relationTo: 'pages'; value: string | Page; } | null; url?: string | null; @@ -351,17 +351,15 @@ export interface SettingsSite { id?: string | null; }[] | null; - connect?: - | ("Facebook" | "Twitter" | "Instagram" | "Linkedin" | "Github" | "Slack") - | null; + connect?: ('Facebook' | 'Twitter' | 'Instagram' | 'Linkedin' | 'Github' | 'Slack') | null; }; secondaryNavigation?: { menus?: | { label: string; - linkType?: ("custom" | "internal") | null; + linkType?: ('custom' | 'internal') | null; doc?: { - relationTo: "pages"; + relationTo: 'pages'; value: string | Page; } | null; url?: string | null; @@ -374,13 +372,7 @@ export interface SettingsSite { title: string; links?: | { - platform: - | "Facebook" - | "Twitter" - | "Instagram" - | "Linkedin" - | "Github" - | "Slack"; + platform: 'Facebook' | 'Twitter' | 'Instagram' | 'Linkedin' | 'Github' | 'Slack'; url: string; id?: string | null; }[] @@ -400,9 +392,9 @@ export interface SettingsSite { name: string; logo: string | Media; label: string; - linkType?: ("custom" | "internal") | null; + linkType?: ('custom' | 'internal') | null; doc?: { - relationTo: "pages"; + relationTo: 'pages'; value: string | Page; } | null; url?: string | null; @@ -414,7 +406,3 @@ export interface SettingsSite { updatedAt?: string | null; createdAt?: string | null; } - -declare module "payload" { - export interface GeneratedTypes extends Config {} -} diff --git a/apps/roboshield/payload.config.ts b/apps/roboshield/payload.config.ts index ed46ab712..487f2b6da 100644 --- a/apps/roboshield/payload.config.ts +++ b/apps/roboshield/payload.config.ts @@ -13,6 +13,7 @@ import { s3Adapter } from "@payloadcms/plugin-cloud-storage/s3"; import Users from "./src/payload/collections/Users"; import { defaultLocale, locales } from "./src/payload/utils/locales"; import { loadEnvConfig } from "@next/env"; +import { Config } from "./payload-types"; const projectDir = process.cwd(); loadEnvConfig(projectDir); @@ -122,4 +123,11 @@ export default buildConfig({ }), ] as any[], telemetry: process?.env?.NODE_ENV !== "production", + typescript: { + declare: false, // defaults to true if not set + }, }); + +declare module "payload" { + export interface PayloadGeneratedTypes extends Config {} +}