Initial commit

This commit is contained in:
2026-03-08 01:34:54 +08:00
commit 1f104f73c8
441 changed files with 64911 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
import { defineEndpoints } from '../types.js'
export const TODO_ENDPOINTS = defineEndpoints({
list: { path: '/', method: 'GET' },
save: { path: '/save', method: 'POST' },
add: { path: '/add', method: 'POST' },
toggle: { path: '/toggle', method: 'POST' },
update: { path: '/update', method: 'POST' },
delete: { path: '/delete', method: 'DELETE' },
})
export type TodoEndpoints = typeof TODO_ENDPOINTS

View File

@@ -0,0 +1,16 @@
import { defineApiModule } from '../types.js'
import { TODO_ENDPOINTS } from './api.js'
export * from './types.js'
export * from './api.js'
export const TODO_MODULE = defineApiModule({
id: 'todo',
name: 'TODO',
basePath: '/todo',
order: 30,
version: '1.0.0',
endpoints: TODO_ENDPOINTS,
})
export type { TodoEndpoints } from './api.js'

View File

@@ -0,0 +1,22 @@
import type { DayTodo } from '../../types/todo.js'
export interface TodoFilePath {
relPath: string
fullPath: string
}
export interface ParsedTodoFile {
fullPath: string
dayTodos: DayTodo[]
}
export interface GetTodoResult {
dayTodos: DayTodo[]
year: number
month: number
}
export interface MigrationContext {
todayStr: string
yesterdayStr: string
}