# support

This commit is contained in:
Stephen Zhou
2026-01-12 16:00:19 +08:00
parent 6890f7d09c
commit 10f10f4785
4 changed files with 21 additions and 8 deletions

View File

@ -2,7 +2,7 @@
// DON NOT EDIT IT MANUALLY
//
// Generated from: https://raw.githubusercontent.com/langgenius/dify-docs/refs/heads/main/docs.json
// Generated at: 2026-01-12T06:51:06.502Z
// Generated at: 2026-01-12T07:59:44.777Z
/** @type {Map<string, string>} */
export const docRedirects = new Map([

View File

@ -35,7 +35,7 @@ export default antfu(
},
},
nextjs: true,
ignores: ['public'],
ignores: ['public', 'types/doc-paths.ts'],
typescript: {
overrides: {
'ts/consistent-type-definitions': ['error', 'type'],

View File

@ -165,14 +165,22 @@ function generateTypeDefinitions(groups: Record<string, Set<string>>): string {
lines.push('')
typeNames.push('ApiReferencePath')
// Generate combined type
lines.push('// Combined path without language prefix')
lines.push('export type DocPathWithoutLang =')
// Generate base combined type
lines.push('// Base path without language prefix')
lines.push('export type DocPathWithoutLangBase =')
for (const typeName of typeNames) {
lines.push(` | ${typeName}`)
}
lines.push('')
// Generate combined type with optional anchor support
lines.push('// Combined path without language prefix (supports optional #anchor)')
lines.push('export type DocPathWithoutLang =')
lines.push(' | DocPathWithoutLangBase')
// eslint-disable-next-line no-template-curly-in-string
lines.push(' | `${DocPathWithoutLangBase}#${string}`')
lines.push('')
// Generate full path type with language prefix
lines.push('// Full documentation path with language prefix')
// eslint-disable-next-line no-template-curly-in-string

View File

@ -2,7 +2,7 @@
// DON NOT EDIT IT MANUALLY
//
// Generated from: https://raw.githubusercontent.com/langgenius/dify-docs/refs/heads/main/docs.json
// Generated at: 2026-01-12T06:51:06.500Z
// Generated at: 2026-01-12T07:59:44.775Z
// Language prefixes
export type DocLanguage = 'en' | 'zh' | 'ja'
@ -165,12 +165,17 @@ export type ApiReferencePath =
| 'api-reference/openapi_knowledge.json'
| 'api-reference/openapi_completion.json'
// Combined path without language prefix
export type DocPathWithoutLang =
// Base path without language prefix
export type DocPathWithoutLangBase =
| UseDifyPath
| SelfHostPath
| DevelopPluginPath
| ApiReferencePath
// Combined path without language prefix (supports optional #anchor)
export type DocPathWithoutLang =
| DocPathWithoutLangBase
| `${DocPathWithoutLangBase}#${string}`
// Full documentation path with language prefix
export type DifyDocPath = `${DocLanguage}/${DocPathWithoutLang}`