feat: 日报新增模板市场,支持社区模板安装与使用

This commit is contained in:
Wxw-Gu committed 2026-09-08 11:37:38 +08:00
1 parent 1156362c3c
commit 976aac32c5
35 files changed
+2957 -82

No files matched your search

+45
View File
@@ -0,0 +1,45 @@
import type { ReportTemplateOperationResult } from './report-template-package'
export const REPORT_TEMPLATE_CATALOG_URL =
'https://raw.githubusercontent.com/Wxw-Gu/TraceMemo-Templates/main/catalog/v1/index.json'
export interface ReportTemplateCatalogEntry {
id: string
version: string
interfaceVersion: string
name: string
description: string
author: string
platform?: 'default' | 'mobile' | 'desktop'
tags: string[]
license: string
minAppVersion: string | null
download: string
sizeBytes: number
sha256: string
preview?: string
publishedAt?: string | null
status: 'published' | 'draft'
}
export interface ReportTemplateCatalog {
schemaVersion: '1'
generatedAt?: string
source?: {
repository?: string
commit?: string
}
status: 'published' | 'draft'
templates: ReportTemplateCatalogEntry[]
}
export interface ReportTemplateCatalogResult {
success: boolean
catalog?: ReportTemplateCatalog
error?: string
code?: string
}
export interface ReportTemplateCatalogInstallResult extends ReportTemplateOperationResult {
catalogEntry?: ReportTemplateCatalogEntry
}