aboutsummaryrefslogtreecommitdiff
path: root/types
diff options
context:
space:
mode:
Diffstat (limited to 'types')
-rw-r--r--types/ext/anki-note-builder.d.ts2
-rw-r--r--types/ext/api.d.ts1
-rw-r--r--types/ext/audio-downloader.d.ts28
-rw-r--r--types/ext/language-descriptors.d.ts1
-rw-r--r--types/ext/language.d.ts1
-rw-r--r--types/ext/settings.d.ts2
6 files changed, 34 insertions, 1 deletions
diff --git a/types/ext/anki-note-builder.d.ts b/types/ext/anki-note-builder.d.ts
index 510c0687..9174c563 100644
--- a/types/ext/anki-note-builder.d.ts
+++ b/types/ext/anki-note-builder.d.ts
@@ -24,6 +24,7 @@ import type * as Extension from './extension';
import type * as Settings from './settings';
import type * as TemplateRenderer from './template-renderer';
import type * as Api from './api';
+import type * as Language from './language';
export type CreateNoteDetails = {
dictionaryEntry: Dictionary.DictionaryEntry;
@@ -90,6 +91,7 @@ export type AudioMediaOptions = {
sources: Audio.AudioSourceInfo[];
preferredAudioIndex: number | null;
idleTimeout: number | null;
+ languageSummary: Language.LanguageSummary;
};
export type MediaOptions = {
diff --git a/types/ext/api.d.ts b/types/ext/api.d.ts
index 3a2fc0b8..46be7938 100644
--- a/types/ext/api.d.ts
+++ b/types/ext/api.d.ts
@@ -219,6 +219,7 @@ type ApiSurface = {
source: Audio.AudioSourceInfo;
term: string;
reading: string;
+ languageSummary: Language.LanguageSummary;
};
return: AudioDownloader.Info[];
};
diff --git a/types/ext/audio-downloader.d.ts b/types/ext/audio-downloader.d.ts
index a785c185..c7f7ecbe 100644
--- a/types/ext/audio-downloader.d.ts
+++ b/types/ext/audio-downloader.d.ts
@@ -16,11 +16,13 @@
*/
import type * as Audio from './audio';
+import type * as Language from './language';
export type GetInfoHandler = (
term: string,
reading: string,
details?: Audio.AudioSourceInfo,
+ languageSummary?: Language.LanguageSummary,
) => Promise<Info[]>;
export type Info = Info1 | Info2;
@@ -52,3 +54,29 @@ export type CustomAudioListSource = {
url: string;
name?: string;
};
+
+export type LinguaLibreLookupResponse = {
+ query: {
+ search: LinguaLibreLookupResult[];
+ };
+};
+
+export type LinguaLibreFileResponse = {
+ query: {
+ pages: Record<string, LinguaLibreFileResult>;
+ };
+};
+
+export type LinguaLibreLookupResult = {
+ title: string;
+};
+
+export type LinguaLibreFileResult = {
+ title: string;
+ imageinfo: LinguaLibreFileResultImageInfo[];
+};
+
+export type LinguaLibreFileResultImageInfo = {
+ url: string;
+ user: string;
+};
diff --git a/types/ext/language-descriptors.d.ts b/types/ext/language-descriptors.d.ts
index d0136d92..52d4a5d2 100644
--- a/types/ext/language-descriptors.d.ts
+++ b/types/ext/language-descriptors.d.ts
@@ -27,6 +27,7 @@ type LanguageDescriptor<
TTextPostprocessorDescriptor extends TextProcessorDescriptor = Record<string, never>,
> = {
iso: TIso;
+ iso639_3: string;
name: string;
exampleText: string;
/**
diff --git a/types/ext/language.d.ts b/types/ext/language.d.ts
index ea8c0e47..ccc668af 100644
--- a/types/ext/language.d.ts
+++ b/types/ext/language.d.ts
@@ -63,5 +63,6 @@ export type TextProcessorWithId<T = unknown> = {
export type LanguageSummary = {
name: string;
iso: string;
+ iso639_3: string;
exampleText: string;
};
diff --git a/types/ext/settings.d.ts b/types/ext/settings.d.ts
index 8183befd..9253efc3 100644
--- a/types/ext/settings.d.ts
+++ b/types/ext/settings.d.ts
@@ -383,7 +383,7 @@ export type PopupWindowType = 'normal' | 'popup';
export type PopupWindowState = 'normal' | 'maximized' | 'fullscreen';
-export type AudioSourceType = 'jpod101' | 'jpod101-alternate' | 'jisho' | 'text-to-speech' | 'text-to-speech-reading' | 'custom' | 'custom-json';
+export type AudioSourceType = 'jpod101' | 'jpod101-alternate' | 'jisho' | 'lingua-libre' | 'text-to-speech' | 'text-to-speech-reading' | 'custom' | 'custom-json';
export type TranslationConvertType = 'false' | 'true' | 'variant';