diff options
Diffstat (limited to 'types')
-rw-r--r-- | types/ext/anki.d.ts | 2 | ||||
-rw-r--r-- | types/ext/api.d.ts | 6 | ||||
-rw-r--r-- | types/ext/display-anki.d.ts | 3 | ||||
-rw-r--r-- | types/ext/settings.d.ts | 2 |
4 files changed, 12 insertions, 1 deletions
diff --git a/types/ext/anki.d.ts b/types/ext/anki.d.ts index 4a903c52..8ad0890f 100644 --- a/types/ext/anki.d.ts +++ b/types/ext/anki.d.ts @@ -22,6 +22,8 @@ export type NoteId = number; export type CardId = number; +export type NoteWithId = Note & {id: NoteId}; + export type Note = { fields: NoteFields; tags: string[]; diff --git a/types/ext/api.d.ts b/types/ext/api.d.ts index 9a922fb0..3a2fc0b8 100644 --- a/types/ext/api.d.ts +++ b/types/ext/api.d.ts @@ -169,6 +169,12 @@ type ApiSurface = { }; return: Anki.NoteId | null; }; + updateAnkiNote: { + params: { + noteWithId: Anki.NoteWithId; + }; + return: null; + }; getAnkiNoteInfo: { params: { notes: Anki.Note[]; diff --git a/types/ext/display-anki.d.ts b/types/ext/display-anki.d.ts index 1b0dd4ff..4b6c6e37 100644 --- a/types/ext/display-anki.d.ts +++ b/types/ext/display-anki.d.ts @@ -46,6 +46,9 @@ export type DictionaryEntryModeDetails = { requirements: AnkiNoteBuilder.Requirement[]; canAdd: boolean; valid: boolean; + /** + * Anki IDs of duplicate notes. May contain INVALID_NOTE_ID for notes whose ID could not be found. + */ noteIds: Anki.NoteId[] | null; noteInfos?: (Anki.NoteInfo | null)[]; ankiError: Error | null; diff --git a/types/ext/settings.d.ts b/types/ext/settings.d.ts index 1fce0f59..48a66728 100644 --- a/types/ext/settings.d.ts +++ b/types/ext/settings.d.ts @@ -395,7 +395,7 @@ export type AnkiScreenshotFormat = 'png' | 'jpeg'; export type AnkiDuplicateScope = 'collection' | 'deck' | 'deck-root'; -export type AnkiDuplicateBehavior = 'prevent' | 'new'; +export type AnkiDuplicateBehavior = 'prevent' | 'overwrite' | 'new'; export type AnkiDisplayTags = 'never' | 'always' | 'non-standard'; |