Generate your own TypeScript interfaces based on your collections.
While building your own custom functionality into FrogBot, like Plugins, Hooks, Access Control functions, custom views, GraphQL queries or mutations, or anything else, you may benefit from generating your own TypeScript types dynamically from your FrogBot Config itself.
Run the following command in a FrogBot project to generate types based on your FrogBot Config:
frogbot generate:types
You can run this command whenever you need to regenerate your types. The single generated frogbot-types.ts file augments FrogBot with generated collection and agent types.
Configure type generation with the root typescript option.
Option
Type
Default
Description
autoGenerate
boolean
true
Regenerates types each time FrogBot starts outside production. Startup doesn’t wait for it, and a failure is logged as a warning. frogbot generate:types always runs.
outputFile
string
frogbot-types.ts next to your config
Path the types are written to. The FROGBOT_TS_OUTPUT_PATH environment variable takes precedence; a relative path in it is resolved from the config directory.
Functions that modify the JSON schema before it’s compiled, in order. See Custom generated types.
generateInputTypes
boolean
false
Also generates an input type for each collection, for writes: relationships as IDs, and id, defaults and FrogBot-managed fields optional. FrogBot’s Local API doesn’t use them; use them to type a form, a seed script or an API client.
strictDraftTypes
boolean
false
Adds strictDraftTypes: true to the generated Config interface. FrogBot’s Local API types don’t read it yet, so draft typing doesn’t change.
declare
false | { ignoreTSError?: boolean }
—
Accepted by the type, but has no effect. The generated file always ends with the declare module 'frogbot' block.
postProcess
(({ compiledTypes, config }) => string)[]
—
Accepted by the type, but has no effect. FrogBot doesn’t run these functions on the generated output.
The generated file ends with a declare module 'frogbot' block that registers your collection, agent, model, and role types with FrogBot. FrogBot always writes this block.If you copy frogbot-types.ts into a project that doesn’t install frogbot, the block reports an error there. Install frogbot as a dev dependency of that project, as described in Using your types.
FrogBot generates your types based on a JSON schema. You can extend that JSON schema, and thus the generated types, by passing a function to typescript.schema:
// frogbot.config.ts{ // ... typescript: { schema: [ ({ jsonSchema }) => { // Modify the JSON schema here jsonSchema.$defs.Test = { type: 'object', properties: { title: { type: 'string' }, content: { type: 'string' }, }, required: ['title', 'content'], } return jsonSchema }, ] }}// This will generate the following type in your frogbot-types.ts:export interface Test { title: string content: string [k: string]: unknown}
This function takes the existing JSON schema as an argument and returns the modified JSON schema. It can be useful for plugins that wish to generate their own types.
array, group and named tab fields generate a top-level interface only when you set interfaceName on them. block fields always generate a top-level interface — interfaceName on a block is an override of the auto-derived name (which is a PascalCase form of the slug: 'content-block' → ContentBlock).The following group field config:
// a top level reusable interface!!export interface SharedMeta { title?: string description?: string}// example usage inside collection interfaceexport interface Collection1 { // ...other fields meta?: SharedMeta}
Naming CollisionsSince these types are hoisted to the top level, you need to be aware that naming collisions can
occur. For example, if you have a collection with the name of Meta and you also create a
interface with the name Meta they will collide. It is recommended to scope your interfaces by
appending the field type to the end, i.e. MetaGroup or similar.
Every block generates a top-level interface named after its slug ('hero' → Hero). If two different blocks resolve to the same name but have different fields — for example a hero block reused across collections but overridden in one of them — a single shared Hero interface couldn’t represent both shapes. The first block keeps the clean name; any later block with a different shape gets a short content-hash suffix, so neither is silently mistyped:
export interface Hero { /* the first shape */}export interface Hero_9C7E4012 { /* the differing shape */}
The suffix is derived from the block’s fields, so the same schema always produces the same name across regenerations — it only changes when the block’s fields change. If you import a hashed interface and later change that block, you’ll get a type error that points you at the change instead of silently receiving the wrong shape.To choose the name yourself and avoid the hash, set an explicit interfaceName on the block. Explicit names are always used verbatim. This is the recommended fix when two blocks intentionally share a slug, or when you want a stable, human-readable name to import.
Now that your types have been generated, FrogBot’s Local API will now be typed. It is common for users to want to use this in their frontend code, we recommend generating them with FrogBot and then copying the file over to your frontend codebase. This is the simplest way to get your types into your frontend codebase.The generated file refers to types from frogbot, so install frogbot as a dev dependency of the frontend (pnpm add -D frogbot) and set skipLibCheck: true in its tsconfig.json. frogbot is only used for types and isn’t bundled. With the file in place, the FrogBot REST API SDK is typed from it automatically.
Once your types are generated, req.user is typed as your generated user, or null when no one is signed in. This applies in access control, hooks, endpoints, tools, and every other place that receives req, with no cast. For example, if your users collection has a role field:
import type { Access } from 'frogbot';export const isAdmin: Access = ({ req }) => req.user?.role === 'admin';
With more than one auth collection, req.user is a union of their generated types. Check collection to narrow it:
if (req.user?.collection === 'admins') { req.user.level; // only admins have `level`}
Use TypedUser to type your own helpers:
import type { TypedUser } from 'frogbot';export const hasRole = (user: TypedUser | null, role: string) => user?.role === role;
Outside a FrogBot request, such as in server components, route handlers, and server actions, frogbot.auth() returns the same type:
frogbot.createRequest({ user }) expects a full user. Passing an object with only some fields, such as { id: 1 }, is a type error. Pass the user returned by frogbot.auth() or read from the Local API instead.Before you generate types, req.user is an object with an id and unknown fields.Keep skipLibCheck: true in your tsconfig.json, as FrogBot’s templates do. Prebuilt pieces ship declaration files built without your generated types, so skipLibCheck: false reports errors inside those files that don’t affect your code.
ImportantFrogBot needs to be able to find your config to generate your types.
FrogBot will automatically try and locate your config, but might not always be able to find it. For example, if you are working in a /src directory or similar, you need to tell FrogBot where to find your config manually by using an environment variable. If this applies to you, you can create an npm script to make generating your types easier.To add an npm script to generate your types and show FrogBot where to find your config, open your package.json and update the scripts property to the following:
Now you can run pnpm generate:types to easily generate your types.
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"FrogBot Docs","colors":{"primary":"#030712","light":"#F9FAFB","dark":"#3acf6a"},"logo":{"light":"https://mintcdn.com/firmware/1jF8tzNdCWHCfika/logo/FrogBotLightGreen.svg?fit=max\u0026auto=format\u0026n=1jF8tzNdCWHCfika\u0026q=85\u0026s=de657b1e4825a6b0d0c7607cc6cd1933","dark":"https://mintcdn.com/firmware/1jF8tzNdCWHCfika/logo/FrogBotLongGreen.svg?fit=max\u0026auto=format\u0026n=1jF8tzNdCWHCfika\u0026q=85\u0026s=eed21f0fb6485cf12699700d0f455341"},"favicon":"https://mintcdn.com/firmware/pvDTxOOi5ftoZro_/favicon.svg?fit=max\u0026auto=format\u0026n=pvDTxOOi5ftoZro_\u0026q=85\u0026s=044d843a7a3071dad0518e3ad6f7d59d","api":{"mdx":{"auth":{"method":"bearer"},"server":"https://app.frogbot.ai/api"}},"background":{"color":{"light":"#F9FAFB","dark":"#0b1120"}},"navbar":{"links":[{"href":"https://github.com/frogbotai/frogbot","type":"github"},{"icon":"discord","href":"https://discord.gg/JBZF7syAnU","label":"Discord"},{"href":"https://x.com/cgilly2fast","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.frogbot.ai"}},"footer":{"socials":{"x":"https://x.com/frogbot_ai","linkedin":"https://www.linkedin.com/company/frogbotai"}},"styling":{"codeblocks":{"theme":"tokyo-night"},"latex":true},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"navigation":{"global":{},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"firmware","hasAudioNarration":false,"actualSubdomain":"firmware","customDomains":["docs.frogbot.ai"],"gitSource":{"type":"github","owner":"frogbotai","repo":"frogbot","deployBranch":"main","contentDirectory":"docs","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae354449757c0f6dff43b35","collectionId":"547721b1-d6ea-4b0a-982d-fd3b3bb600a4","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae354449757c0f6dff43b35"},"entitlements":{},"buildId":"6ae54e87335dd0cca3e42f8f","clientVersion":"0.0.4043","searchFilterCounts":[{"language":"default","tag":"General","count":174},{"language":"default","tag":"Features","count":75},{"language":"default","tag":"Basics","count":54},{"language":"default","tag":"Fields","count":34},{"language":"default","tag":"Ecosystem","count":24},{"language":"default","tag":"Cloud","count":21},{"language":"default","tag":"Plugins","count":16},{"language":"default","tag":"Managing Data","count":14},{"language":"default","tag":"Chat","count":11},{"language":"default","tag":"Pieces","count":11}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":".dark #sidebar-content a,.dark #sidebar-content button{color:#d1d5db!important}.dark #sidebar-content a:hover,.dark #sidebar-content button:hover{color:#f9fafb!important}.dark .sidebar-group-header{color:#e5e7eb}.dark #content-area,.dark #content-area [data-as=p],.dark #content-area li,.dark #content-area p,.dark #content-area span:not(:where(pre, code) span),.dark .prose :where(p, li, span):not(:where(code, code *)){color:#cbd5e1!important}.dark .prose{--tw-prose-invert-body:#cbd5e1;--tw-prose-invert-lead:#cbd5e1;--tw-prose-invert-bullets:#64748b;--tw-prose-invert-counters:#94a3b8;--tw-prose-invert-quotes:#e2e8f0;--tw-prose-invert-captions:#94a3b8;--tw-prose-invert-headings:#f8fafc;--tw-prose-invert-bold:#f8fafc}.dark [data-component-part=card-content],.dark [data-component-part=card-content] *{color:#cbd5e1!important}.dark #table-of-contents a{color:#cbd5e1}.dark #table-of-contents a:hover{color:#f1f5f9}.dark #content-area h1,.dark #content-area h1 *,.dark #content-area h2,.dark #content-area h2 *,.dark #content-area h3,.dark #content-area h3 *,.dark #content-area h4,.dark #content-area h4 *,.dark [data-component-part=card-title]{color:#f8fafc!important}.prompt{background-color:#fff!important;border-color:rgb(var(--gray-950)/.1)!important;color:rgb(var(--gray-700))!important}.dark .prompt{background-color:rgb(var(--background-dark))!important;border-color:rgb(255 255 255/.1)!important;color:#cbd5e1!important}.prompt [data-component-part=prompt-action-copy-button]{background-color:rgb(var(--primary-dark))!important;border-color:transparent!important;color:#fff!important}.prompt [data-component-part=prompt-action-copy-button]:hover{background-color:rgb(var(--primary-dark)/.9)!important}.dark #content-area .prompt [data-component-part=prompt-action-copy-button] *,.prompt [data-component-part=prompt-action-copy-button] *{color:#fff!important}"}],"page":{"pagePath":"typescript/generating-types","slug":"/typescript/generating-types","pageMetadata":{"title":"Generating TypeScript Interfaces","sidebarTitle":"Generating Types","description":"Generate your own TypeScript interfaces based on your collections.","keywords":"headless cms, typescript, documentation, Content Management System, cms, headless, javascript, node, react, nextjs","href":"/typescript/generating-types"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Generate your own TypeScript interfaces based on your collections.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`While building your own custom functionality into FrogBot, like `,_jsx(_components.a,{href:`/plugins/overview`,children:`Plugins`}),`, `,_jsx(_components.a,{href:`/hooks/overview`,children:`Hooks`}),`, `,_jsx(_components.a,{href:`/access-control/overview`,children:`Access Control`}),` functions, custom views, `,_jsx(_components.a,{href:`/graphql/overview`,children:`GraphQL queries or mutations`}),`, or anything else, you may benefit from generating your own TypeScript types dynamically from your FrogBot Config itself.`]}),`\n`,_jsx(Heading,{level:`2`,id:`types-generation-script`,children:`Types generation script`}),`\n`,_jsx(_components.p,{children:`Run the following command in a FrogBot project to generate types based on your FrogBot Config:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes tokyo-night tokyo-night`,style:{backgroundColor:`#1a1b26`,\"--shiki-dark-bg\":`#1a1b26`,color:`#a9b1d6`,\"--shiki-dark\":`#a9b1d6`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C0CAF5`,\"--shiki-dark\":`#C0CAF5`},children:`frogbot`}),_jsx(_components.span,{style:{color:`#9ECE6A`,\"--shiki-dark\":`#9ECE6A`},children:` generate:types`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`You can run this command whenever you need to regenerate your types. The single generated `,_jsx(_components.code,{children:`frogbot-types.ts`}),` file augments FrogBot with generated collection and agent types.`]}),`\n`,_jsx(Heading,{level:`2`,id:`type-generation-options`,children:`Type generation options`}),`\n`,_jsxs(_components.p,{children:[`Configure type generation with the root `,_jsx(_components.code,{children:`typescript`}),` option.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Option`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Default`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`autoGenerate`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`boolean`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`true`})}),_jsxs(_components.td,{children:[`Regenerates types each time FrogBot starts outside production. Startup doesn’t wait for it, and a failure is logged as a warning. `,_jsx(_components.code,{children:`frogbot generate:types`}),` always runs.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`outputFile`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`frogbot-types.ts`}),` next to your config`]}),_jsxs(_components.td,{children:[`Path the types are written to. The `,_jsx(_components.code,{children:`FROGBOT_TS_OUTPUT_PATH`}),` environment variable takes precedence; a relative path in it is resolved from the config directory.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`schema`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`(({ collectionIDFieldTypes, config, i18n, jsonSchema }) => JSONSchema4)[]`})}),_jsx(_components.td,{children:`—`}),_jsxs(_components.td,{children:[`Functions that modify the JSON schema before it’s compiled, in order. See `,_jsx(_components.a,{href:`#custom-generated-types`,children:`Custom generated types`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`generateInputTypes`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`boolean`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`false`})}),_jsxs(_components.td,{children:[`Also generates an input type for each collection, for writes: relationships as IDs, and `,_jsx(_components.code,{children:`id`}),`, defaults and FrogBot-managed fields optional. FrogBot’s Local API doesn’t use them; use them to type a form, a seed script or an API client.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`strictDraftTypes`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`boolean`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`false`})}),_jsxs(_components.td,{children:[`Adds `,_jsx(_components.code,{children:`strictDraftTypes: true`}),` to the generated `,_jsx(_components.code,{children:`Config`}),` interface. FrogBot’s Local API types don’t read it yet, so `,_jsx(_components.code,{children:`draft`}),` typing doesn’t change.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`declare`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`false | { ignoreTSError?: boolean }`})}),_jsx(_components.td,{children:`—`}),_jsxs(_components.td,{children:[`Accepted by the type, but has no effect. The generated file always ends with the `,_jsx(_components.code,{children:`declare module 'frogbot'`}),` block.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`postProcess`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`(({ compiledTypes, config }) => string)[]`})}),_jsx(_components.td,{children:`—`}),_jsx(_components.td,{children:`Accepted by the type, but has no effect. FrogBot doesn’t run these functions on the generated output.`})]})]})]}),`\n`,_jsxs(Heading,{level:`2`,id:`the-declare-block`,children:[`The `,_jsx(_components.code,{children:`declare`}),` block`]}),`\n`,_jsxs(_components.p,{children:[`The generated file ends with a `,_jsx(_components.code,{children:`declare module 'frogbot'`}),` block that registers your collection, agent, model, and role types with FrogBot. FrogBot always writes this block.`]}),`\n`,_jsxs(_components.p,{children:[`If you copy `,_jsx(_components.code,{children:`frogbot-types.ts`}),` into a project that doesn’t install `,_jsx(_components.code,{children:`frogbot`}),`, the block reports an error there. Install `,_jsx(_components.code,{children:`frogbot`}),` as a dev dependency of that project, as described in `,_jsx(_components.a,{href:`#using-your-types`,children:`Using your types`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`custom-output-file-path`,children:`Custom output file path`}),`\n`,_jsx(_components.p,{children:`You can specify where you want your types to be generated by adding a property to your FrogBot Config:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes tokyo-night tokyo-night`,style:{backgroundColor:`#1a1b26`,\"--shiki-dark-bg\":`#1a1b26`,color:`#a9b1d6`,\"--shiki-dark\":`#a9b1d6`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#51597D`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#51597D`,\"--shiki-dark-font-style\":`italic`},children:`// frogbot.config.ts`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:`{`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#51597D`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#51597D`,\"--shiki-dark-font-style\":`italic`},children:` // ...`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#73DACA`,\"--shiki-dark\":`#73DACA`},children:`\ttypescript`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#51597D`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#51597D`,\"--shiki-dark-font-style\":`italic`},children:` // defaults to: path.resolve(__dirname, './frogbot-types.ts')`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#73DACA`,\"--shiki-dark\":`#73DACA`},children:`\t\toutputFile`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#C0CAF5`,\"--shiki-dark\":`#C0CAF5`},children:` path`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`.`}),_jsx(_components.span,{style:{color:`#7AA2F7`,\"--shiki-dark\":`#7AA2F7`},children:`resolve`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:`(`}),_jsx(_components.span,{style:{color:`#C0CAF5`,\"--shiki-dark\":`#C0CAF5`},children:`__dirname`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`,`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:` '`}),_jsx(_components.span,{style:{color:`#9ECE6A`,\"--shiki-dark\":`#9ECE6A`},children:`./generated-types.ts`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`'`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:`)`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:`\t}`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The above example places your types next to your FrogBot Config itself as the file `,_jsx(_components.code,{children:`generated-types.ts`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`custom-generated-types`,children:`Custom generated types`}),`\n`,_jsxs(_components.p,{children:[`FrogBot generates your types based on a JSON schema. You can extend that JSON schema, and thus the generated types, by passing a function to `,_jsx(_components.code,{children:`typescript.schema`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`28`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes tokyo-night tokyo-night`,style:{backgroundColor:`#1a1b26`,\"--shiki-dark-bg\":`#1a1b26`,color:`#a9b1d6`,\"--shiki-dark\":`#a9b1d6`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`28`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#51597D`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#51597D`,\"--shiki-dark-font-style\":`italic`},children:`// frogbot.config.ts`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:`{`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#51597D`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#51597D`,\"--shiki-dark-font-style\":`italic`},children:` // ...`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#73DACA`,\"--shiki-dark\":`#73DACA`},children:` typescript`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#73DACA`,\"--shiki-dark\":`#73DACA`},children:` schema`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` (`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`{`}),_jsx(_components.span,{style:{color:`#E0AF68`,\"--shiki-dark\":`#E0AF68`},children:` jsonSchema`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:` }`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:`) `}),_jsx(_components.span,{style:{color:`#BB9AF7`,\"--shiki-dark\":`#BB9AF7`},children:`=>`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#51597D`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#51597D`,\"--shiki-dark-font-style\":`italic`},children:` // Modify the JSON schema here`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C0CAF5`,\"--shiki-dark\":`#C0CAF5`},children:` jsonSchema`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`.`}),_jsx(_components.span,{style:{color:`#C0CAF5`,\"--shiki-dark\":`#C0CAF5`},children:`$defs`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`.`}),_jsx(_components.span,{style:{color:`#7DCFFF`,\"--shiki-dark\":`#7DCFFF`},children:`Test`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:` =`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#73DACA`,\"--shiki-dark\":`#73DACA`},children:` type`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:` '`}),_jsx(_components.span,{style:{color:`#9ECE6A`,\"--shiki-dark\":`#9ECE6A`},children:`object`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`'`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#73DACA`,\"--shiki-dark\":`#73DACA`},children:` properties`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#73DACA`,\"--shiki-dark\":`#73DACA`},children:` title`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` { `}),_jsx(_components.span,{style:{color:`#41A6B5`,\"--shiki-dark\":`#41A6B5`},children:`type`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:` '`}),_jsx(_components.span,{style:{color:`#9ECE6A`,\"--shiki-dark\":`#9ECE6A`},children:`string`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`'`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` }`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#73DACA`,\"--shiki-dark\":`#73DACA`},children:` content`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` { `}),_jsx(_components.span,{style:{color:`#41A6B5`,\"--shiki-dark\":`#41A6B5`},children:`type`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:` '`}),_jsx(_components.span,{style:{color:`#9ECE6A`,\"--shiki-dark\":`#9ECE6A`},children:`string`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`'`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` }`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` }`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#73DACA`,\"--shiki-dark\":`#73DACA`},children:` required`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` [`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`'`}),_jsx(_components.span,{style:{color:`#9ECE6A`,\"--shiki-dark\":`#9ECE6A`},children:`title`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`'`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`,`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:` '`}),_jsx(_components.span,{style:{color:`#9ECE6A`,\"--shiki-dark\":`#9ECE6A`},children:`content`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`'`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:`]`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#BB9AF7`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#BB9AF7`,\"--shiki-dark-font-style\":`italic`},children:` return`}),_jsx(_components.span,{style:{color:`#7DCFFF`,\"--shiki-dark\":`#7DCFFF`},children:` jsonSchema`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` }`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#51597D`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#51597D`,\"--shiki-dark-font-style\":`italic`},children:`// This will generate the following type in your frogbot-types.ts:`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#7DCFFF`,\"--shiki-dark\":`#7DCFFF`},children:`export`}),_jsx(_components.span,{style:{color:`#BB9AF7`,\"--shiki-dark\":`#BB9AF7`},children:` interface`}),_jsx(_components.span,{style:{color:`#C0CAF5`,\"--shiki-dark\":`#C0CAF5`},children:` Test`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#73DACA`,\"--shiki-dark\":`#73DACA`},children:` title`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#0DB9D7`,\"--shiki-dark\":`#0DB9D7`},children:` string`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#73DACA`,\"--shiki-dark\":`#73DACA`},children:` content`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#0DB9D7`,\"--shiki-dark\":`#0DB9D7`},children:` string`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` [`}),_jsx(_components.span,{style:{color:`#7DCFFF`,\"--shiki-dark\":`#7DCFFF`},children:`k`}),_jsx(_components.span,{style:{color:`#A9B1D6`,\"--shiki-dark\":`#A9B1D6`},children:`: `}),_jsx(_components.span,{style:{color:`#7DCFFF`,\"--shiki-dark\":`#7DCFFF`},children:`string`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:`]`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#0DB9D7`,\"--shiki-dark\":`#0DB9D7`},children:` unknown`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`This function takes the existing JSON schema as an argument and returns the modified JSON schema. It can be useful for plugins that wish to generate their own types.`}),`\n`,_jsx(Heading,{level:`3`,id:`external-schema-references`,children:`External schema references`}),`\n`,_jsxs(_components.p,{children:[`You can use `,_jsx(_components.code,{children:`$ref`}),` to reference external JSON schema files in your custom schemas:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`13`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes tokyo-night tokyo-night`,style:{backgroundColor:`#1a1b26`,\"--shiki-dark-bg\":`#1a1b26`,color:`#a9b1d6`,\"--shiki-dark\":`#a9b1d6`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`13`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#51597D`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#51597D`,\"--shiki-dark-font-style\":`italic`},children:`// frogbot.config.ts`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#73DACA`,\"--shiki-dark\":`#73DACA`},children:` typescript`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#73DACA`,\"--shiki-dark\":`#73DACA`},children:` schema`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` (`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`{`}),_jsx(_components.span,{style:{color:`#E0AF68`,\"--shiki-dark\":`#E0AF68`},children:` jsonSchema`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:` }`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:`) `}),_jsx(_components.span,{style:{color:`#BB9AF7`,\"--shiki-dark\":`#BB9AF7`},children:`=>`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C0CAF5`,\"--shiki-dark\":`#C0CAF5`},children:` jsonSchema`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`.`}),_jsx(_components.span,{style:{color:`#C0CAF5`,\"--shiki-dark\":`#C0CAF5`},children:`$defs`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`.`}),_jsx(_components.span,{style:{color:`#7DCFFF`,\"--shiki-dark\":`#7DCFFF`},children:`MyType`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:` =`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#73DACA`,\"--shiki-dark\":`#73DACA`},children:` $ref`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:` '`}),_jsx(_components.span,{style:{color:`#9ECE6A`,\"--shiki-dark\":`#9ECE6A`},children:`./schemas/my-type.json`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`'`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#BB9AF7`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#BB9AF7`,\"--shiki-dark-font-style\":`italic`},children:` return`}),_jsx(_components.span,{style:{color:`#7DCFFF`,\"--shiki-dark\":`#7DCFFF`},children:` jsonSchema`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` }`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`External references are resolved relative to your project’s working directory (`,_jsx(_components.code,{children:`process.cwd()`}),`).`]}),`\n`,_jsx(Heading,{level:`2`,id:`example-usage`,children:`Example Usage`}),`\n`,_jsx(_components.p,{children:`For example, let’s look at the following simple FrogBot Config:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`38`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes tokyo-night tokyo-night`,style:{backgroundColor:`#1a1b26`,\"--shiki-dark-bg\":`#1a1b26`,color:`#a9b1d6`,\"--shiki-dark\":`#a9b1d6`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`38`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#7DCFFF`,\"--shiki-dark\":`#7DCFFF`},children:`import`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` { `}),_jsx(_components.span,{style:{color:`#0DB9D7`,\"--shiki-dark\":`#0DB9D7`},children:`buildConfig`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` }`}),_jsx(_components.span,{style:{color:`#7DCFFF`,\"--shiki-dark\":`#7DCFFF`},children:` from`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:` '`}),_jsx(_components.span,{style:{color:`#9ECE6A`,\"--shiki-dark\":`#9ECE6A`},children:`frogbot`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`'`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#7DCFFF`,\"--shiki-dark\":`#7DCFFF`},children:`export`}),_jsx(_components.span,{style:{color:`#7DCFFF`,\"--shiki-dark\":`#7DCFFF`},children:` default`}),_jsx(_components.span,{style:{color:`#7AA2F7`,\"--shiki-dark\":`#7AA2F7`},children:` buildConfig`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:`({`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#51597D`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#51597D`,\"--shiki-dark-font-style\":`italic`},children:` // secret and db omitted`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#73DACA`,\"--shiki-dark\":`#73DACA`},children:` serverURL`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#C0CAF5`,\"--shiki-dark\":`#C0CAF5`},children:` process`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`.`}),_jsx(_components.span,{style:{color:`#C0CAF5`,\"--shiki-dark\":`#C0CAF5`},children:`env`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`.`}),_jsx(_components.span,{style:{color:`#FF9E64`,\"--shiki-dark\":`#FF9E64`},children:`NEXT_PUBLIC_SERVER_URL`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#73DACA`,\"--shiki-dark\":`#73DACA`},children:` admin`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#73DACA`,\"--shiki-dark\":`#73DACA`},children:` user`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:` '`}),_jsx(_components.span,{style:{color:`#9ECE6A`,\"--shiki-dark\":`#9ECE6A`},children:`users`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`'`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` }`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#73DACA`,\"--shiki-dark\":`#73DACA`},children:` collections`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#73DACA`,\"--shiki-dark\":`#73DACA`},children:` slug`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:` '`}),_jsx(_components.span,{style:{color:`#9ECE6A`,\"--shiki-dark\":`#9ECE6A`},children:`users`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`'`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#73DACA`,\"--shiki-dark\":`#73DACA`},children:` fields`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#41A6B5`,\"--shiki-dark\":`#41A6B5`},children:` name`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:` '`}),_jsx(_components.span,{style:{color:`#9ECE6A`,\"--shiki-dark\":`#9ECE6A`},children:`name`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`'`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#41A6B5`,\"--shiki-dark\":`#41A6B5`},children:` type`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:` '`}),_jsx(_components.span,{style:{color:`#9ECE6A`,\"--shiki-dark\":`#9ECE6A`},children:`text`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`'`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#41A6B5`,\"--shiki-dark\":`#41A6B5`},children:` required`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#FF9E64`,\"--shiki-dark\":`#FF9E64`},children:` true`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` }`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` ]`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` }`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#73DACA`,\"--shiki-dark\":`#73DACA`},children:` slug`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:` '`}),_jsx(_components.span,{style:{color:`#9ECE6A`,\"--shiki-dark\":`#9ECE6A`},children:`posts`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`'`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#73DACA`,\"--shiki-dark\":`#73DACA`},children:` admin`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#41A6B5`,\"--shiki-dark\":`#41A6B5`},children:` useAsTitle`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:` '`}),_jsx(_components.span,{style:{color:`#9ECE6A`,\"--shiki-dark\":`#9ECE6A`},children:`title`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`'`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` }`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#73DACA`,\"--shiki-dark\":`#73DACA`},children:` fields`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#41A6B5`,\"--shiki-dark\":`#41A6B5`},children:` name`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:` '`}),_jsx(_components.span,{style:{color:`#9ECE6A`,\"--shiki-dark\":`#9ECE6A`},children:`title`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`'`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#41A6B5`,\"--shiki-dark\":`#41A6B5`},children:` type`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:` '`}),_jsx(_components.span,{style:{color:`#9ECE6A`,\"--shiki-dark\":`#9ECE6A`},children:`text`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`'`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` }`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#41A6B5`,\"--shiki-dark\":`#41A6B5`},children:` name`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:` '`}),_jsx(_components.span,{style:{color:`#9ECE6A`,\"--shiki-dark\":`#9ECE6A`},children:`author`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`'`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#41A6B5`,\"--shiki-dark\":`#41A6B5`},children:` type`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:` '`}),_jsx(_components.span,{style:{color:`#9ECE6A`,\"--shiki-dark\":`#9ECE6A`},children:`relationship`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`'`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#41A6B5`,\"--shiki-dark\":`#41A6B5`},children:` relationTo`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:` '`}),_jsx(_components.span,{style:{color:`#9ECE6A`,\"--shiki-dark\":`#9ECE6A`},children:`users`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`'`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` }`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` ]`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` }`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` ]`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:`})`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`By generating types, we’ll end up with a file containing the following two TypeScript interfaces:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`15`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes tokyo-night tokyo-night`,style:{backgroundColor:`#1a1b26`,\"--shiki-dark-bg\":`#1a1b26`,color:`#a9b1d6`,\"--shiki-dark\":`#a9b1d6`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`15`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#7DCFFF`,\"--shiki-dark\":`#7DCFFF`},children:`export`}),_jsx(_components.span,{style:{color:`#BB9AF7`,\"--shiki-dark\":`#BB9AF7`},children:` interface`}),_jsx(_components.span,{style:{color:`#C0CAF5`,\"--shiki-dark\":`#C0CAF5`},children:` User`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#73DACA`,\"--shiki-dark\":`#73DACA`},children:` id`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#0DB9D7`,\"--shiki-dark\":`#0DB9D7`},children:` string`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#73DACA`,\"--shiki-dark\":`#73DACA`},children:` name`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#0DB9D7`,\"--shiki-dark\":`#0DB9D7`},children:` string`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#73DACA`,\"--shiki-dark\":`#73DACA`},children:` email`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`?:`}),_jsx(_components.span,{style:{color:`#0DB9D7`,\"--shiki-dark\":`#0DB9D7`},children:` string`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#73DACA`,\"--shiki-dark\":`#73DACA`},children:` resetPasswordToken`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`?:`}),_jsx(_components.span,{style:{color:`#0DB9D7`,\"--shiki-dark\":`#0DB9D7`},children:` string`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#73DACA`,\"--shiki-dark\":`#73DACA`},children:` resetPasswordExpiration`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`?:`}),_jsx(_components.span,{style:{color:`#0DB9D7`,\"--shiki-dark\":`#0DB9D7`},children:` string`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#73DACA`,\"--shiki-dark\":`#73DACA`},children:` loginAttempts`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`?:`}),_jsx(_components.span,{style:{color:`#0DB9D7`,\"--shiki-dark\":`#0DB9D7`},children:` number`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#73DACA`,\"--shiki-dark\":`#73DACA`},children:` lockUntil`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`?:`}),_jsx(_components.span,{style:{color:`#0DB9D7`,\"--shiki-dark\":`#0DB9D7`},children:` string`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#7DCFFF`,\"--shiki-dark\":`#7DCFFF`},children:`export`}),_jsx(_components.span,{style:{color:`#BB9AF7`,\"--shiki-dark\":`#BB9AF7`},children:` interface`}),_jsx(_components.span,{style:{color:`#C0CAF5`,\"--shiki-dark\":`#C0CAF5`},children:` Post`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#73DACA`,\"--shiki-dark\":`#73DACA`},children:` id`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#0DB9D7`,\"--shiki-dark\":`#0DB9D7`},children:` string`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#73DACA`,\"--shiki-dark\":`#73DACA`},children:` title`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`?:`}),_jsx(_components.span,{style:{color:`#0DB9D7`,\"--shiki-dark\":`#0DB9D7`},children:` string`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#73DACA`,\"--shiki-dark\":`#73DACA`},children:` author`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`?:`}),_jsx(_components.span,{style:{color:`#0DB9D7`,\"--shiki-dark\":`#0DB9D7`},children:` string`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:` |`}),_jsx(_components.span,{style:{color:`#C0CAF5`,\"--shiki-dark\":`#C0CAF5`},children:` User`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`custom-field-interfaces`,children:`Custom Field Interfaces`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`array`}),`, `,_jsx(_components.code,{children:`group`}),` and named `,_jsx(_components.code,{children:`tab`}),` fields generate a top-level interface only when you set `,_jsx(_components.code,{children:`interfaceName`}),` on them. `,_jsx(_components.code,{children:`block`}),` fields always generate a top-level interface — `,_jsx(_components.code,{children:`interfaceName`}),` on a block is an `,_jsx(_components.strong,{children:`override`}),` of the auto-derived name (which is a PascalCase form of the slug: `,_jsx(_components.code,{children:`'content-block'`}),` → `,_jsx(_components.code,{children:`ContentBlock`}),`).`]}),`\n`,_jsx(_components.p,{children:`The following group field config:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`15`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes tokyo-night tokyo-night`,style:{backgroundColor:`#1a1b26`,\"--shiki-dark-bg\":`#1a1b26`,color:`#a9b1d6`,\"--shiki-dark\":`#a9b1d6`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`15`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#73DACA`,\"--shiki-dark\":`#73DACA`},children:` type`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:` '`}),_jsx(_components.span,{style:{color:`#9ECE6A`,\"--shiki-dark\":`#9ECE6A`},children:`group`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`'`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#73DACA`,\"--shiki-dark\":`#73DACA`},children:` name`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:` '`}),_jsx(_components.span,{style:{color:`#9ECE6A`,\"--shiki-dark\":`#9ECE6A`},children:`meta`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`'`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#73DACA`,\"--shiki-dark\":`#73DACA`},children:` interfaceName`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:` '`}),_jsx(_components.span,{style:{color:`#9ECE6A`,\"--shiki-dark\":`#9ECE6A`},children:`SharedMeta`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`'`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`,`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` \u003c-- `}),_jsx(_components.span,{style:{color:`#C0CAF5`,\"--shiki-dark\":`#C0CAF5`},children:`here`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:`!!`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C0CAF5`,\"--shiki-dark\":`#C0CAF5`},children:` fields`}),_jsx(_components.span,{style:{color:`#BB9AF7`,\"--shiki-dark\":`#BB9AF7`},children:`:`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#73DACA`,\"--shiki-dark\":`#73DACA`},children:` name`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:` '`}),_jsx(_components.span,{style:{color:`#9ECE6A`,\"--shiki-dark\":`#9ECE6A`},children:`title`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`'`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#73DACA`,\"--shiki-dark\":`#73DACA`},children:` type`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:` '`}),_jsx(_components.span,{style:{color:`#9ECE6A`,\"--shiki-dark\":`#9ECE6A`},children:`text`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`'`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` }`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#73DACA`,\"--shiki-dark\":`#73DACA`},children:` name`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:` '`}),_jsx(_components.span,{style:{color:`#9ECE6A`,\"--shiki-dark\":`#9ECE6A`},children:`description`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`'`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#73DACA`,\"--shiki-dark\":`#73DACA`},children:` type`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:` '`}),_jsx(_components.span,{style:{color:`#9ECE6A`,\"--shiki-dark\":`#9ECE6A`},children:`text`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`'`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` }`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`will generate:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes tokyo-night tokyo-night`,style:{backgroundColor:`#1a1b26`,\"--shiki-dark-bg\":`#1a1b26`,color:`#a9b1d6`,\"--shiki-dark\":`#a9b1d6`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`11`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#51597D`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#51597D`,\"--shiki-dark-font-style\":`italic`},children:`// a top level reusable interface!!`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#7DCFFF`,\"--shiki-dark\":`#7DCFFF`},children:`export`}),_jsx(_components.span,{style:{color:`#BB9AF7`,\"--shiki-dark\":`#BB9AF7`},children:` interface`}),_jsx(_components.span,{style:{color:`#C0CAF5`,\"--shiki-dark\":`#C0CAF5`},children:` SharedMeta`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#73DACA`,\"--shiki-dark\":`#73DACA`},children:` title`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`?:`}),_jsx(_components.span,{style:{color:`#0DB9D7`,\"--shiki-dark\":`#0DB9D7`},children:` string`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#73DACA`,\"--shiki-dark\":`#73DACA`},children:` description`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`?:`}),_jsx(_components.span,{style:{color:`#0DB9D7`,\"--shiki-dark\":`#0DB9D7`},children:` string`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#51597D`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#51597D`,\"--shiki-dark-font-style\":`italic`},children:`// example usage inside collection interface`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#7DCFFF`,\"--shiki-dark\":`#7DCFFF`},children:`export`}),_jsx(_components.span,{style:{color:`#BB9AF7`,\"--shiki-dark\":`#BB9AF7`},children:` interface`}),_jsx(_components.span,{style:{color:`#C0CAF5`,\"--shiki-dark\":`#C0CAF5`},children:` Collection1`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#51597D`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#51597D`,\"--shiki-dark-font-style\":`italic`},children:` // ...other fields`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#73DACA`,\"--shiki-dark\":`#73DACA`},children:` meta`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`?:`}),_jsx(_components.span,{style:{color:`#C0CAF5`,\"--shiki-dark\":`#C0CAF5`},children:` SharedMeta`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(Warning,{children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`Naming Collisions`})}),_jsxs(_components.p,{children:[`Since these types are hoisted to the top level, you need to be aware that naming collisions can\noccur. For example, if you have a collection with the name of `,_jsx(_components.code,{children:`Meta`}),` and you also create a\ninterface with the name `,_jsx(_components.code,{children:`Meta`}),` they will collide. It is recommended to scope your interfaces by\nappending the field type to the end, i.e. `,_jsx(_components.code,{children:`MetaGroup`}),` or similar.`]})]}),`\n`,_jsx(Heading,{level:`3`,id:`block-interface-name-collisions`,children:`Block interface name collisions`}),`\n`,_jsxs(_components.p,{children:[`Every `,_jsx(_components.code,{children:`block`}),` generates a top-level interface named after its slug (`,_jsx(_components.code,{children:`'hero'`}),` → `,_jsx(_components.code,{children:`Hero`}),`). If two `,_jsx(_components.strong,{children:`different`}),` blocks resolve to the same name but have different fields — for example a `,_jsx(_components.code,{children:`hero`}),` block reused across collections but overridden in one of them — a single shared `,_jsx(_components.code,{children:`Hero`}),` interface couldn’t represent both shapes. The first block keeps the clean name; any later block with a different shape gets a short content-hash suffix, so neither is silently mistyped:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes tokyo-night tokyo-night`,style:{backgroundColor:`#1a1b26`,\"--shiki-dark-bg\":`#1a1b26`,color:`#a9b1d6`,\"--shiki-dark\":`#a9b1d6`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#7DCFFF`,\"--shiki-dark\":`#7DCFFF`},children:`export`}),_jsx(_components.span,{style:{color:`#BB9AF7`,\"--shiki-dark\":`#BB9AF7`},children:` interface`}),_jsx(_components.span,{style:{color:`#C0CAF5`,\"--shiki-dark\":`#C0CAF5`},children:` Hero`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#51597D`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#51597D`,\"--shiki-dark-font-style\":`italic`},children:` /* the first shape */`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:`}`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#7DCFFF`,\"--shiki-dark\":`#7DCFFF`},children:`export`}),_jsx(_components.span,{style:{color:`#BB9AF7`,\"--shiki-dark\":`#BB9AF7`},children:` interface`}),_jsx(_components.span,{style:{color:`#C0CAF5`,\"--shiki-dark\":`#C0CAF5`},children:` Hero_9C7E4012`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#51597D`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#51597D`,\"--shiki-dark-font-style\":`italic`},children:` /* the differing shape */`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The suffix is derived from the block’s fields, so the `,_jsx(_components.strong,{children:`same schema always produces the same name`}),` across regenerations — it only changes when the block’s fields change. If you import a hashed interface and later change that block, you’ll get a type error that points you at the change instead of silently receiving the wrong shape.`]}),`\n`,_jsxs(_components.p,{children:[`To choose the name yourself and avoid the hash, set an explicit `,_jsx(_components.a,{href:`/fields/blocks`,children:_jsx(_components.code,{children:`interfaceName`})}),` on the block. Explicit names are always used verbatim. This is the recommended fix when two blocks intentionally share a slug, or when you want a stable, human-readable name to import.`]}),`\n`,_jsx(Heading,{level:`2`,id:`using-your-types`,children:`Using your types`}),`\n`,_jsx(_components.p,{children:`Now that your types have been generated, FrogBot’s Local API will now be typed. It is common for users to want to use this in their frontend code, we recommend generating them with FrogBot and then copying the file over to your frontend codebase. This is the simplest way to get your types into your frontend codebase.`}),`\n`,_jsxs(_components.p,{children:[`The generated file refers to types from `,_jsx(_components.code,{children:`frogbot`}),`, so install `,_jsx(_components.code,{children:`frogbot`}),` as a dev dependency of the frontend (`,_jsx(_components.code,{children:`pnpm add -D frogbot`}),`) and set `,_jsx(_components.code,{children:`skipLibCheck: true`}),` in its `,_jsx(_components.code,{children:`tsconfig.json`}),`. `,_jsx(_components.code,{children:`frogbot`}),` is only used for types and isn’t bundled. With the file in place, the `,_jsx(_components.a,{href:`/rest-api/overview#frogbot-rest-api-sdk`,children:`FrogBot REST API SDK`}),` is typed from it automatically.`]}),`\n`,_jsx(Heading,{level:`3`,id:`typing-the-current-user`,children:`Typing the current user`}),`\n`,_jsxs(_components.p,{children:[`Once your types are generated, `,_jsx(_components.code,{children:`req.user`}),` is typed as your generated user, or `,_jsx(_components.code,{children:`null`}),` when no one is signed in. This applies in access control, hooks, endpoints, tools, and every other place that receives `,_jsx(_components.code,{children:`req`}),`, with no cast. For example, if your users collection has a `,_jsx(_components.code,{children:`role`}),` field:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes tokyo-night tokyo-night`,style:{backgroundColor:`#1a1b26`,\"--shiki-dark-bg\":`#1a1b26`,color:`#a9b1d6`,\"--shiki-dark\":`#a9b1d6`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#7DCFFF`,\"--shiki-dark\":`#7DCFFF`},children:`import`}),_jsx(_components.span,{style:{color:`#BB9AF7`,\"--shiki-dark\":`#BB9AF7`},children:` type`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` { `}),_jsx(_components.span,{style:{color:`#0DB9D7`,\"--shiki-dark\":`#0DB9D7`},children:`Access`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` }`}),_jsx(_components.span,{style:{color:`#7DCFFF`,\"--shiki-dark\":`#7DCFFF`},children:` from`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:` '`}),_jsx(_components.span,{style:{color:`#9ECE6A`,\"--shiki-dark\":`#9ECE6A`},children:`frogbot`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`'`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#7DCFFF`,\"--shiki-dark\":`#7DCFFF`},children:`export`}),_jsx(_components.span,{style:{color:`#9D7CD8`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#9D7CD8`,\"--shiki-dark-font-style\":`italic`},children:` const`}),_jsx(_components.span,{style:{color:`#7AA2F7`,\"--shiki-dark\":`#7AA2F7`},children:` isAdmin`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#C0CAF5`,\"--shiki-dark\":`#C0CAF5`},children:` Access`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:` =`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` (`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`{`}),_jsx(_components.span,{style:{color:`#E0AF68`,\"--shiki-dark\":`#E0AF68`},children:` req`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:` }`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:`)`}),_jsx(_components.span,{style:{color:`#BB9AF7`,\"--shiki-dark\":`#BB9AF7`},children:` =>`}),_jsx(_components.span,{style:{color:`#C0CAF5`,\"--shiki-dark\":`#C0CAF5`},children:` req`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`.`}),_jsx(_components.span,{style:{color:`#C0CAF5`,\"--shiki-dark\":`#C0CAF5`},children:`user`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`?.`}),_jsx(_components.span,{style:{color:`#7DCFFF`,\"--shiki-dark\":`#7DCFFF`},children:`role`}),_jsx(_components.span,{style:{color:`#BB9AF7`,\"--shiki-dark\":`#BB9AF7`},children:` ===`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:` '`}),_jsx(_components.span,{style:{color:`#9ECE6A`,\"--shiki-dark\":`#9ECE6A`},children:`admin`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`'`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`;`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`With more than one auth collection, `,_jsx(_components.code,{children:`req.user`}),` is a union of their generated types. Check `,_jsx(_components.code,{children:`collection`}),` to narrow it:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes tokyo-night tokyo-night`,style:{backgroundColor:`#1a1b26`,\"--shiki-dark-bg\":`#1a1b26`,color:`#a9b1d6`,\"--shiki-dark\":`#a9b1d6`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#BB9AF7`,\"--shiki-dark\":`#BB9AF7`},children:`if`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` (`}),_jsx(_components.span,{style:{color:`#C0CAF5`,\"--shiki-dark\":`#C0CAF5`},children:`req`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`.`}),_jsx(_components.span,{style:{color:`#C0CAF5`,\"--shiki-dark\":`#C0CAF5`},children:`user`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`?.`}),_jsx(_components.span,{style:{color:`#7DCFFF`,\"--shiki-dark\":`#7DCFFF`},children:`collection`}),_jsx(_components.span,{style:{color:`#BB9AF7`,\"--shiki-dark\":`#BB9AF7`},children:` ===`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:` '`}),_jsx(_components.span,{style:{color:`#9ECE6A`,\"--shiki-dark\":`#9ECE6A`},children:`admins`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`'`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:`)`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C0CAF5`,\"--shiki-dark\":`#C0CAF5`},children:` req`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`.`}),_jsx(_components.span,{style:{color:`#C0CAF5`,\"--shiki-dark\":`#C0CAF5`},children:`user`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`.`}),_jsx(_components.span,{style:{color:`#7DCFFF`,\"--shiki-dark\":`#7DCFFF`},children:`level`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`;`}),_jsx(_components.span,{style:{color:`#51597D`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#51597D`,\"--shiki-dark-font-style\":`italic`},children:\" // only admins have `level`\"})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:`TypedUser`}),` to type your own helpers:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes tokyo-night tokyo-night`,style:{backgroundColor:`#1a1b26`,\"--shiki-dark-bg\":`#1a1b26`,color:`#a9b1d6`,\"--shiki-dark\":`#a9b1d6`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#7DCFFF`,\"--shiki-dark\":`#7DCFFF`},children:`import`}),_jsx(_components.span,{style:{color:`#BB9AF7`,\"--shiki-dark\":`#BB9AF7`},children:` type`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` { `}),_jsx(_components.span,{style:{color:`#0DB9D7`,\"--shiki-dark\":`#0DB9D7`},children:`TypedUser`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` }`}),_jsx(_components.span,{style:{color:`#7DCFFF`,\"--shiki-dark\":`#7DCFFF`},children:` from`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:` '`}),_jsx(_components.span,{style:{color:`#9ECE6A`,\"--shiki-dark\":`#9ECE6A`},children:`frogbot`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`'`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#7DCFFF`,\"--shiki-dark\":`#7DCFFF`},children:`export`}),_jsx(_components.span,{style:{color:`#9D7CD8`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#9D7CD8`,\"--shiki-dark-font-style\":`italic`},children:` const`}),_jsx(_components.span,{style:{color:`#7AA2F7`,\"--shiki-dark\":`#7AA2F7`},children:` hasRole`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:` =`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` (`}),_jsx(_components.span,{style:{color:`#E0AF68`,\"--shiki-dark\":`#E0AF68`},children:`user`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#C0CAF5`,\"--shiki-dark\":`#C0CAF5`},children:` TypedUser`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:` |`}),_jsx(_components.span,{style:{color:`#0DB9D7`,\"--shiki-dark\":`#0DB9D7`},children:` null`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`,`}),_jsx(_components.span,{style:{color:`#E0AF68`,\"--shiki-dark\":`#E0AF68`},children:` role`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#0DB9D7`,\"--shiki-dark\":`#0DB9D7`},children:` string`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:`)`}),_jsx(_components.span,{style:{color:`#BB9AF7`,\"--shiki-dark\":`#BB9AF7`},children:` =>`}),_jsx(_components.span,{style:{color:`#C0CAF5`,\"--shiki-dark\":`#C0CAF5`},children:` user`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`?.`}),_jsx(_components.span,{style:{color:`#7DCFFF`,\"--shiki-dark\":`#7DCFFF`},children:`role`}),_jsx(_components.span,{style:{color:`#BB9AF7`,\"--shiki-dark\":`#BB9AF7`},children:` ===`}),_jsx(_components.span,{style:{color:`#C0CAF5`,\"--shiki-dark\":`#C0CAF5`},children:` role`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`;`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Outside a FrogBot request, such as in server components, route handlers, and server actions, `,_jsx(_components.code,{children:`frogbot.auth()`}),` returns the same type:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes tokyo-night tokyo-night`,style:{backgroundColor:`#1a1b26`,\"--shiki-dark-bg\":`#1a1b26`,color:`#a9b1d6`,\"--shiki-dark\":`#a9b1d6`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9D7CD8`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#9D7CD8`,\"--shiki-dark-font-style\":`italic`},children:`const`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:` {`}),_jsx(_components.span,{style:{color:`#BB9AF7`,\"--shiki-dark\":`#BB9AF7`},children:` user`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:` }`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:` =`}),_jsx(_components.span,{style:{color:`#BB9AF7`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#BB9AF7`,\"--shiki-dark-font-style\":`italic`},children:` await`}),_jsx(_components.span,{style:{color:`#C0CAF5`,\"--shiki-dark\":`#C0CAF5`},children:` frogbot`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`.`}),_jsx(_components.span,{style:{color:`#7AA2F7`,\"--shiki-dark\":`#7AA2F7`},children:`auth`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:`({`}),_jsx(_components.span,{style:{color:`#73DACA`,\"--shiki-dark\":`#73DACA`},children:` headers`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#BB9AF7`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#BB9AF7`,\"--shiki-dark-font-style\":`italic`},children:` await`}),_jsx(_components.span,{style:{color:`#7AA2F7`,\"--shiki-dark\":`#7AA2F7`},children:` headers`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:`()`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` })`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`;`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`frogbot.createRequest({ user })`}),` expects a full user. Passing an object with only some fields, such as `,_jsx(_components.code,{children:`{ id: 1 }`}),`, is a type error. Pass the user returned by `,_jsx(_components.code,{children:`frogbot.auth()`}),` or read from the Local API instead.`]}),`\n`,_jsxs(_components.p,{children:[`Before you generate types, `,_jsx(_components.code,{children:`req.user`}),` is an object with an `,_jsx(_components.code,{children:`id`}),` and unknown fields.`]}),`\n`,_jsxs(_components.p,{children:[`Keep `,_jsx(_components.code,{children:`skipLibCheck: true`}),` in your `,_jsx(_components.code,{children:`tsconfig.json`}),`, as FrogBot’s templates do. Prebuilt pieces ship declaration files built without your generated types, so `,_jsx(_components.code,{children:`skipLibCheck: false`}),` reports errors inside those files that don’t affect your code.`]}),`\n`,_jsx(Heading,{level:`3`,id:`adding-an-npm-script`,children:`Adding an npm script`}),`\n`,_jsxs(Warning,{children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`Important`})}),_jsx(_components.p,{children:`FrogBot needs to be able to find your config to generate your types.`})]}),`\n`,_jsxs(_components.p,{children:[`FrogBot will automatically try and locate your config, but might not always be able to find it. For example, if you are working in a `,_jsx(_components.code,{children:`/src`}),` directory or similar, you need to tell FrogBot where to find your config manually by using an environment variable. If this applies to you, you can create an npm script to make generating your types easier.`]}),`\n`,_jsxs(_components.p,{children:[`To add an npm script to generate your types and show FrogBot where to find your config, open your `,_jsx(_components.code,{children:`package.json`}),` and update the `,_jsx(_components.code,{children:`scripts`}),` property to the following:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes tokyo-night tokyo-night`,style:{backgroundColor:`#1a1b26`,\"--shiki-dark-bg\":`#1a1b26`,color:`#a9b1d6`,\"--shiki-dark\":`#a9b1d6`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:` \"`}),_jsx(_components.span,{style:{color:`#7AA2F7`,\"--shiki-dark\":`#7AA2F7`},children:`scripts`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`\"`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:` \"`}),_jsx(_components.span,{style:{color:`#0DB9D7`,\"--shiki-dark\":`#0DB9D7`},children:`generate:types`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`\"`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`:`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:` \"`}),_jsx(_components.span,{style:{color:`#9ECE6A`,\"--shiki-dark\":`#9ECE6A`},children:`FROGBOT_CONFIG_PATH=src/frogbot.config.ts frogbot generate:types`}),_jsx(_components.span,{style:{color:`#89DDFF`,\"--shiki-dark\":`#89DDFF`},children:`\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#9ABDF5`,\"--shiki-dark\":`#9ABDF5`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Now you can run `,_jsx(_components.code,{children:`pnpm generate:types`}),` to easily generate your types.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":{"theme":"tokyo-night"},"config":{},"pageMetadata":{"title":"Generating TypeScript Interfaces","sidebarTitle":"Generating Types","description":"Generate your own TypeScript interfaces based on your collections.","keywords":"headless cms, typescript, documentation, Content Management System, cms, headless, javascript, node, react, nextjs","href":"/typescript/generating-types"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Types generation script","slug":"types-generation-script","depth":2,"children":[]},{"title":"Type generation options","slug":"type-generation-options","depth":2,"children":[]},{"title":"The declare block","slug":"the-declare-block","depth":2,"children":[]},{"title":"Custom output file path","slug":"custom-output-file-path","depth":2,"children":[]},{"title":"Custom generated types","slug":"custom-generated-types","depth":2,"children":[{"title":"External schema references","slug":"external-schema-references","depth":3,"children":[]}]},{"title":"Example Usage","slug":"example-usage","depth":2,"children":[]},{"title":"Custom Field Interfaces","slug":"custom-field-interfaces","depth":2,"children":[{"title":"Block interface name collisions","slug":"block-interface-name-collisions","depth":3,"children":[]}]},{"title":"Using your types","slug":"using-your-types","depth":2,"children":[{"title":"Typing the current user","slug":"typing-the-current-user","depth":3,"children":[]},{"title":"Adding an npm script","slug":"adding-an-npm-script","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":[],"subdomain":"firmware","siteName":"FrogBot Docs","title":"Generating TypeScript Interfaces - FrogBot Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-18T16:17:05.151Z","originalFileLocation":"typescript/generating-types.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Generate your own TypeScript interfaces based on your collections.\">\u003cmeta data-mint-head name=\"application-name\" content=\"FrogBot Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/firmware/-rhCEx-k_rFkB_Pu/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/firmware/-rhCEx-k_rFkB_Pu/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/firmware/-rhCEx-k_rFkB_Pu/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/firmware/-rhCEx-k_rFkB_Pu/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/firmware/-rhCEx-k_rFkB_Pu/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/firmware/-rhCEx-k_rFkB_Pu/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/firmware/-rhCEx-k_rFkB_Pu/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/firmware/-rhCEx-k_rFkB_Pu/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/firmware/-rhCEx-k_rFkB_Pu/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Generating TypeScript Interfaces - FrogBot Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Generate your own TypeScript interfaces based on your collections.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"FrogBot Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.frogbot.ai/typescript/generating-types\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://firmware.mintlify.app/_mintlify/api/og/v2?division=TypeScript\u0026amp;title=Generating+TypeScript+Interfaces\u0026amp;description=Generate+your+own+TypeScript+interfaces+based+on+your+collections.\u0026amp;theme=f4bccae87e3aea4ea0fb024f\u0026amp;signature=dfe5251b20407f77a30c45ae436a08027191abb9400c6fd9221e32e739512f40\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Generating TypeScript Interfaces - FrogBot Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Generate your own TypeScript interfaces based on your collections.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://firmware.mintlify.app/_mintlify/api/og/v2?division=TypeScript\u0026amp;title=Generating+TypeScript+Interfaces\u0026amp;description=Generate+your+own+TypeScript+interfaces+based+on+your+collections.\u0026amp;theme=f4bccae87e3aea4ea0fb024f\u0026amp;signature=dfe5251b20407f77a30c45ae436a08027191abb9400c6fd9221e32e739512f40\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/firmware/-rhCEx-k_rFkB_Pu/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"FrogBot Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#030712\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.frogbot.ai/typescript/generating-types\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/typescript/generating-types.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.frogbot.ai/#organization\",\"name\":\"FrogBot Docs\",\"url\":\"https://docs.frogbot.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/firmware/1jF8tzNdCWHCfika/logo/FrogBotLightGreen.svg?fit=max\u0026auto=format\u0026n=1jF8tzNdCWHCfika\u0026q=85\u0026s=de657b1e4825a6b0d0c7607cc6cd1933\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.frogbot.ai#website\",\"name\":\"FrogBot Docs\",\"url\":\"https://docs.frogbot.ai\",\"publisher\":{\"@id\":\"https://docs.frogbot.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.frogbot.ai/typescript/generating-types#webpage\",\"url\":\"https://docs.frogbot.ai/typescript/generating-types\",\"name\":\"Generating TypeScript Interfaces\",\"description\":\"Generate your own TypeScript interfaces based on your collections.\",\"dateModified\":\"2026-10-18T16:17:05.151Z\",\"isPartOf\":{\"@id\":\"https://docs.frogbot.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.frogbot.ai/typescript/generating-types#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.frogbot.ai/typescript/generating-types#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Features\",\"item\":\"https://docs.frogbot.ai/admin/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"TypeScript\",\"item\":\"https://docs.frogbot.ai/typescript/overview\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Generating TypeScript Interfaces\",\"item\":\"https://docs.frogbot.ai/typescript/generating-types\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.frogbot.ai/typescript/generating-types#article\",\"headline\":\"Generating TypeScript Interfaces\",\"name\":\"Generating TypeScript Interfaces\",\"description\":\"Generate your own TypeScript interfaces based on your collections.\",\"url\":\"https://docs.frogbot.ai/typescript/generating-types\",\"mainEntityOfPage\":{\"@id\":\"https://docs.frogbot.ai/typescript/generating-types#webpage\"},\"dateModified\":\"2026-10-18T16:17:05.151Z\",\"publisher\":{\"@id\":\"https://docs.frogbot.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.frogbot.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"FrogBot Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"FrogBot Docs","nav":{"global":{},"tabs":[{"tab":"General","groups":[{"group":"Start here","pages":[{"title":"What is FrogBot?","sidebarTitle":"What is FrogBot?","href":""},{"title":"Set up FrogBot step by step","sidebarTitle":"Step-by-step setup","href":"/getting-started/setup"},{"title":"Start with a coding agent","sidebarTitle":"Start with a coding agent","href":"/getting-started/coding-agent"},{"title":"Installation","sidebarTitle":"Installation","href":"/getting-started/installation"},{"title":"CLI","sidebarTitle":"CLI","href":"/getting-started/cli"},{"title":"FrogBot concepts","sidebarTitle":"Concepts","href":"/getting-started/concepts"}]},{"group":"Basics","pages":[{"group":"Configuration","expanded":false,"pages":[{"title":"Configuration","sidebarTitle":"Overview","href":"/configuration/overview"},{"title":"Collection Configs","sidebarTitle":"Collections","href":"/configuration/collections"},{"title":"Environment Variables","sidebarTitle":"Environment Variables","href":"/configuration/environment-vars"},{"title":"I18n","sidebarTitle":"I18n","href":"/configuration/i18n"},{"title":"Localization","sidebarTitle":"Localization","href":"/configuration/localization"}]},{"group":"Database","expanded":false,"pages":[{"title":"Database","sidebarTitle":"Overview","href":"/database/overview"},{"title":"MongoDB","sidebarTitle":"MongoDB","href":"/database/mongodb"},{"title":"Postgres","sidebarTitle":"Postgres","href":"/database/postgres"},{"title":"SQLite","sidebarTitle":"SQLite","href":"/database/sqlite"},{"title":"Migrations","sidebarTitle":"Migrations","href":"/database/migrations"},{"title":"Transactions","href":"/database/transactions"},{"title":"Indexes","sidebarTitle":"Indexes","href":"/database/indexes"}]},{"group":"Search","expanded":false,"pages":[{"title":"Collection search","sidebarTitle":"Overview","href":"/search/overview"}]},{"group":"Access Control","expanded":false,"pages":[{"title":"Access Control","sidebarTitle":"Overview","href":"/access-control/overview"},{"title":"Collection Access Control","sidebarTitle":"Collections","href":"/access-control/collections"},{"title":"Field-level Access Control","sidebarTitle":"Fields","href":"/access-control/fields"}]},{"group":"Hooks","expanded":false,"pages":[{"title":"Hooks Overview","sidebarTitle":"Overview","href":"/hooks/overview"},{"title":"Collection Hooks","sidebarTitle":"Collections","href":"/hooks/collections"},{"title":"Field Hooks","sidebarTitle":"Fields","href":"/hooks/fields"},{"title":"Context","sidebarTitle":"Context","href":"/hooks/context"}]},{"group":"Fields","expanded":false,"pages":[{"title":"Fields Overview","sidebarTitle":"Overview","href":"/fields/overview"},{"title":"Text Field","sidebarTitle":"Text","href":"/fields/text"},{"title":"Textarea Field","sidebarTitle":"Textarea","href":"/fields/textarea"},{"title":"Number Field","sidebarTitle":"Number","href":"/fields/number"},{"title":"Email Field","sidebarTitle":"Email","href":"/fields/email"},{"title":"Checkbox Field","sidebarTitle":"Checkbox","href":"/fields/checkbox"},{"title":"Date Field","sidebarTitle":"Date","href":"/fields/date"},{"title":"Select Field","sidebarTitle":"Select","href":"/fields/select"},{"title":"Radio Group Field","sidebarTitle":"Radio Group","href":"/fields/radio"},{"title":"Relationship Field","sidebarTitle":"Relationship","href":"/fields/relationship"},{"title":"Upload Field","sidebarTitle":"Upload","href":"/fields/upload"},{"title":"Rich Text Field","sidebarTitle":"Rich Text","href":"/fields/rich-text"},{"title":"Array Field","sidebarTitle":"Array","href":"/fields/array"},{"title":"Blocks Field","sidebarTitle":"Blocks","href":"/fields/blocks"},{"title":"Group Field","sidebarTitle":"Group","href":"/fields/group"},{"title":"Tabs Field","sidebarTitle":"Tabs","href":"/fields/tabs"},{"title":"Row Field","sidebarTitle":"Row","href":"/fields/row"},{"title":"Collapsible Field","sidebarTitle":"Collapsible","href":"/fields/collapsible"},{"title":"Join Field","sidebarTitle":"Join","href":"/fields/join"},{"title":"JSON Field","sidebarTitle":"JSON","href":"/fields/json"},{"title":"Vector field","sidebarTitle":"Vector","href":"/fields/vector"},{"title":"Code Field","sidebarTitle":"Code","href":"/fields/code"},{"title":"Point Field","sidebarTitle":"Point","href":"/fields/point"},{"title":"UI Field","sidebarTitle":"UI","href":"/fields/ui"},{"group":"Field kinds","pages":[{"title":"Money Field","sidebarTitle":"Money","href":"/fields/money"},{"title":"Percent Field","sidebarTitle":"Percent","href":"/fields/percent"},{"title":"Rating Field","sidebarTitle":"Rating","href":"/fields/rating"},{"title":"Duration Field","sidebarTitle":"Duration","href":"/fields/duration"},{"title":"URL Field","sidebarTitle":"URL","href":"/fields/url"},{"title":"Phone Field","sidebarTitle":"Phone","href":"/fields/phone"},{"title":"Barcode Field","sidebarTitle":"Barcode","href":"/fields/barcode"},{"title":"Autonumber Field","sidebarTitle":"Autonumber","href":"/fields/autonumber"},{"title":"AI Field","sidebarTitle":"AI","href":"/fields/ai"}]},{"title":"Fields Generated by FrogBot","sidebarTitle":"Generated Fields","href":"/fields/default-fields"}]}]},{"group":"Managing Data","pages":[{"group":"Local API","expanded":false,"pages":[{"title":"Local API","sidebarTitle":"Overview","href":"/local-api/overview"},{"title":"Respecting Access Control with Local API Operations","sidebarTitle":"Access Control","href":"/local-api/access-control"},{"title":"Using Local API Operations with Server Functions","sidebarTitle":"Server Functions","href":"/local-api/server-functions"},{"title":"Using FrogBot outside Next.js","sidebarTitle":"Outside Next.js","href":"/local-api/outside-nextjs"}]},{"group":"REST API","expanded":false,"pages":[{"title":"REST API","sidebarTitle":"Overview","href":"/rest-api/overview"}]},{"group":"GraphQL","expanded":false,"pages":[{"title":"Enable GraphQL","sidebarTitle":"Enable GraphQL","href":"/graphql/enable"},{"title":"GraphQL Overview","sidebarTitle":"Overview","href":"/graphql/overview"},{"title":"GraphQL Schema","sidebarTitle":"GraphQL Schema","href":"/graphql/graphql-schema"},{"title":"Adding your own Queries and Mutations","sidebarTitle":"Custom Queries and Mutations","href":"/graphql/extending"}]},{"group":"Queries","expanded":false,"pages":[{"title":"Querying your Documents","sidebarTitle":"Overview","href":"/queries/overview"},{"title":"Depth","sidebarTitle":"Depth","href":"/queries/depth"},{"title":"Pagination","sidebarTitle":"Pagination","href":"/queries/pagination"},{"title":"Select","sidebarTitle":"Select","href":"/queries/select"},{"title":"Sort","sidebarTitle":"Sort","href":"/queries/sort"}]}]},{"group":"Features","pages":[{"group":"Admin","expanded":false,"pages":[{"title":"Admin panel","sidebarTitle":"Overview","href":"/admin/overview"},{"title":"Admin navigation","sidebarTitle":"Admin navigation","href":"/admin/admin-navigation"},{"title":"Collection board","href":"/admin/collection-board"},{"title":"Collection calendar","href":"/admin/collection-calendar"}]},{"group":"Authentication","expanded":false,"pages":[{"title":"Authentication Overview","sidebarTitle":"Overview","href":"/authentication/overview"},{"title":"OAuth sign-in","sidebarTitle":"Sign-in","href":"/authentication/sign-in"},{"title":"Authentication Operations","sidebarTitle":"Operations","href":"/authentication/operations"},{"title":"JWT Strategy","sidebarTitle":"JWT Strategy","href":"/authentication/jwt"},{"title":"Cookie Strategy","sidebarTitle":"Cookie Strategy","href":"/authentication/cookies"},{"title":"Authentication Emails","sidebarTitle":"Email Verification","href":"/authentication/email"},{"title":"API Key Strategy","sidebarTitle":"API Key Strategy","href":"/authentication/api-keys"},{"title":"Token Data","sidebarTitle":"Token Data","href":"/authentication/token-data"},{"title":"Custom Strategies","sidebarTitle":"Custom Strategies","href":"/authentication/custom-strategies"}]},{"group":"Upload","expanded":false,"pages":[{"title":"Uploads","sidebarTitle":"Overview","href":"/upload/overview"},{"title":"Storage Adapters","sidebarTitle":"Storage Adapters","href":"/upload/storage-adapters"},{"title":"Files","sidebarTitle":"Files","href":"/upload/files"}]},{"group":"Jobs Queue","expanded":false,"pages":[{"title":"Jobs","href":"/jobs-queue/overview"},{"title":"Job workers","href":"/jobs-queue/workers"}]},{"group":"Versions","expanded":false,"pages":[{"title":"Versions","sidebarTitle":"Overview","href":"/versions/overview"},{"title":"Drafts","sidebarTitle":"Drafts","href":"/versions/drafts"},{"title":"Autosave","sidebarTitle":"Autosave","href":"/versions/autosave"}]},{"group":"Email","expanded":false,"pages":[{"title":"Email","sidebarTitle":"Overview","href":"/email/overview"}]},{"group":"Trash","expanded":false,"pages":[{"title":"Trash","sidebarTitle":"Overview","href":"/trash/overview"}]},{"group":"TypeScript","expanded":false,"pages":[{"title":"TypeScript - Overview","sidebarTitle":"Overview","description":"FrogBot is the most powerful TypeScript headless CMS available.","href":"/typescript/overview"},{"title":"Generating TypeScript Interfaces","sidebarTitle":"Generating Types","href":"/typescript/generating-types"}]},{"group":"Troubleshooting","expanded":false,"pages":[{"title":"Troubleshooting","sidebarTitle":"Troubleshooting","description":"Troubleshooting Common Issues in FrogBot","href":"/troubleshooting/troubleshooting"}]},{"group":"Custom Components","expanded":false,"pages":[{"title":"Swap in your own React components","href":"/custom-components/overview"},{"title":"Root Components","href":"/custom-components/root-components"},{"title":"Swap in your own React Context providers","href":"/custom-components/custom-providers"},{"title":"Customizing Views","href":"/custom-components/custom-views"},{"title":"Dashboard Widgets","href":"/custom-components/dashboard"},{"title":"Document Views","href":"/custom-components/document-views"},{"title":"Edit View","href":"/custom-components/edit-view"},{"title":"List View","href":"/custom-components/list-view"}]},{"group":"Rich Text","expanded":false,"pages":[{"title":"Rich Text Editor","sidebarTitle":"Overview","href":"/rich-text/overview"},{"title":"Official Features","sidebarTitle":"Official Features","href":"/rich-text/official-features"},{"title":"Lexical Converters","sidebarTitle":"Converters","href":"/rich-text/converters"},{"title":"Converting JSX","sidebarTitle":"Converting JSX","href":"/rich-text/converting-jsx"},{"title":"Converting HTML","sidebarTitle":"Converting HTML","href":"/rich-text/converting-html"},{"title":"Converting Markdown","sidebarTitle":"Converting Markdown","href":"/rich-text/converting-markdown"},{"title":"Converting Plain Text","sidebarTitle":"Converting Plain Text","href":"/rich-text/converting-plaintext"},{"title":"Blocks","sidebarTitle":"Blocks","href":"/rich-text/blocks"},{"title":"Custom Features","sidebarTitle":"Custom Features","href":"/rich-text/custom-features"},{"title":"Rendering on demand (Experimental)","sidebarTitle":"Rendering on demand","href":"/rich-text/rendering-on-demand"},{"title":"Views (Experimental)","sidebarTitle":"Views","href":"/rich-text/views"}]},{"group":"Live Preview","expanded":false,"pages":[{"title":"Live Preview","sidebarTitle":"Overview","href":"/live-preview/overview"},{"title":"Implementing Live Preview in your frontend","sidebarTitle":"Frontend","href":"/live-preview/frontend"},{"title":"Server-side Live Preview","sidebarTitle":"Server-side","href":"/live-preview/server"},{"title":"Client-side Live Preview","sidebarTitle":"Client-side","href":"/live-preview/client"}]},{"group":"AI","expanded":false,"pages":[{"title":"AI","sidebarTitle":"AI","href":"/ai/overview"}]},{"group":"Agents","expanded":false,"pages":[{"title":"Agents","sidebarTitle":"Agents","href":"/agents/overview"}]},{"group":"Chat","expanded":false,"pages":[{"title":"Chat persistence","sidebarTitle":"Overview","href":"/chat/overview"},{"title":"Ask the user questions","sidebarTitle":"Questions","href":"/chat/questions"},{"title":"Turns and queued messages","sidebarTitle":"Turns and queues","href":"/chat/turns"},{"title":"Chat manifest","sidebarTitle":"Manifest","api":"GET https://app.frogbot.ai/api/frogbot","href":"/chat/manifest"},{"title":"Training data export","sidebarTitle":"Training data","href":"/chat/training-data"},{"title":"Install the chat UI","sidebarTitle":"UI installation","href":"/chat/ui-installation"},{"title":"Set up the chat provider","sidebarTitle":"Provider setup","href":"/chat/ui-provider"},{"title":"Render Chat","sidebarTitle":"Chat component","href":"/chat/ui-chat"},{"title":"Theme and white-label the chat UI","sidebarTitle":"Theming","href":"/chat/ui-theming"},{"title":"Register tools and artifacts","sidebarTitle":"Tools and artifacts","href":"/chat/ui-registries"},{"title":"Build your own chat shell","sidebarTitle":"Build your own shell","href":"/chat/ui-custom-shell"}]},{"group":"MCP","expanded":false,"pages":[{"title":"MCP servers","sidebarTitle":"MCP servers","href":"/mcp/overview"}]},{"group":"Connections","expanded":false,"pages":[{"title":"Connections","sidebarTitle":"Connections","href":"/connections/overview"}]},{"group":"Pieces","expanded":false,"pages":[{"title":"Pieces","sidebarTitle":"Pieces","href":"/pieces/overview"},{"title":"Available pieces","sidebarTitle":"Available pieces","href":"/pieces/index"},{"title":"Triggers","href":"/pieces/triggers"},{"title":"Web search via pieces","sidebarTitle":"Web search","href":"/pieces/web-search"},{"title":"Slack","href":"/pieces/slack"},{"title":"Discord","href":"/pieces/discord"},{"title":"Microsoft Teams","href":"/pieces/teams"},{"title":"Telegram","href":"/pieces/telegram"},{"title":"GitHub","href":"/pieces/github"},{"title":"Linear","href":"/pieces/linear"},{"title":"Channel questions","href":"/pieces/channel-questions"}]}]},{"group":"Ecosystem","pages":[{"group":"Plugins","expanded":false,"pages":[{"title":"Plugins","sidebarTitle":"Overview","href":"/plugins/overview"},{"title":"AI policy","href":"/plugins/ai-policy"},{"title":"API keys","sidebarTitle":"API keys","href":"/plugins/api-keys"},{"title":"Audit log","href":"/plugins/audit-log"},{"title":"AI request capture","href":"/plugins/capture"},{"title":"Dojo","href":"/plugins/dojo"},{"title":"Roles","sidebarTitle":"Roles","href":"/plugins/roles"},{"title":"Usage reports","href":"/plugins/usage-reports"},{"title":"MCP server","sidebarTitle":"MCP server","href":"/plugins/mcp"},{"title":"Import and export","href":"/plugins/import-export"},{"title":"Nested documents","href":"/plugins/nested-docs"},{"title":"Redirects","href":"/plugins/redirects"},{"title":"Sentry","href":"/plugins/sentry"},{"title":"SEO","href":"/plugins/seo"},{"title":"Stripe","href":"/plugins/stripe"},{"title":"Building Your Own Plugin","sidebarTitle":"Build Your Own","href":"/plugins/build-your-own"}]},{"group":"Gateway","expanded":false,"pages":[{"title":"Gateway","sidebarTitle":"Overview","href":"/gateway/overview"},{"title":"Providers","sidebarTitle":"Providers","href":"/gateway/providers"},{"title":"Configuration","sidebarTitle":"Configuration","href":"/gateway/configuration"},{"title":"Embedding","sidebarTitle":"Embedding","href":"/gateway/embedding"},{"title":"Hooks","sidebarTitle":"Hooks","href":"/gateway/hooks"},{"title":"Observability","sidebarTitle":"Observability","href":"/gateway/observability"},{"title":"Errors","sidebarTitle":"Errors","href":"/gateway/errors"}]},{"group":"Agent Skills","expanded":false,"pages":[{"title":"Coding agents","href":"/skills/coding-agents"}]}]},{"group":"Deployment","pages":[{"group":"Deployment","expanded":false,"pages":[{"title":"Deployment","sidebarTitle":"Deployment","href":"/deployment/overview"}]}]}]},{"tab":"Cloud","pages":[{"title":"Cloud","href":"/subscription-intro"}]}]},"basePath":"","title":"Generating TypeScript Interfaces - FrogBot Docs","buildId":"dpl_G9nrg4qeJSZtah1Ziwbc2n6WkLch","deploymentId":"dpl_G9nrg4qeJSZtah1Ziwbc2n6WkLch","dynamics":[],"chunks":[]}