feat: make magic todo status editable
This commit is contained in:
@@ -48,6 +48,7 @@ import type {
|
||||
MagicNotesSnapshot,
|
||||
MagicNoteUpdateInput,
|
||||
MagicTodoItem,
|
||||
MagicTodoUpdateInput,
|
||||
MagicTodosSnapshot
|
||||
} from './magic-notes-contracts'
|
||||
import type {
|
||||
@@ -1223,6 +1224,9 @@ export type DesktopApi = {
|
||||
options: MagicNoteAnalysisOptions
|
||||
) => Promise<MagicNoteDraftAnalysis>
|
||||
listTodos: () => Promise<MagicTodosSnapshot>
|
||||
updateTodo: (
|
||||
input: MagicTodoUpdateInput
|
||||
) => Promise<MagicTodoItem>
|
||||
analyzeTodo: (
|
||||
todoId: string,
|
||||
options: MagicNoteAnalysisOptions
|
||||
|
||||
@@ -130,6 +130,7 @@ export const ipcChannels = {
|
||||
magicNotesAnalyzeDraft: 'magic-notes:analyze-draft',
|
||||
magicNotesAnalysisEvent: 'magic-notes:analysis-event',
|
||||
magicTodosList: 'magic-todos:list',
|
||||
magicTodosUpdate: 'magic-todos:update',
|
||||
magicTodosAnalyze: 'magic-todos:analyze',
|
||||
knowledgeSnapshot: 'knowledge:snapshot',
|
||||
knowledgeCreateLibrary: 'knowledge:library:create',
|
||||
|
||||
@@ -205,6 +205,17 @@ export const magicTodoIdSchema = z
|
||||
})
|
||||
.strict()
|
||||
|
||||
export const magicTodoUpdateSchema = z
|
||||
.object({
|
||||
todoId: magicNoteIdSchema,
|
||||
completed: z.boolean(),
|
||||
expectedRevision: z.number().int().nonnegative()
|
||||
})
|
||||
.strict()
|
||||
export type MagicTodoUpdateInput = z.infer<
|
||||
typeof magicTodoUpdateSchema
|
||||
>
|
||||
|
||||
export type MagicNoteCommentKind =
|
||||
| 'narrative'
|
||||
| 'summary'
|
||||
|
||||
Reference in New Issue
Block a user