Chore: Migrate REST API - getSupportedLanguagesAutoTranslate to Typescript (#4020)

This commit is contained in:
Reinaldo Neto 2022-04-14 14:29:32 -03:00 committed by GitHub
parent ef81796cd3
commit 456d017475
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -743,7 +743,8 @@ export const saveAutoTranslate = ({
options?: { defaultLanguage: string };
}) => sdk.methodCallWrapper('autoTranslate.saveSettings', rid, field, value, options ?? null);
export const getSupportedLanguagesAutoTranslate = () => sdk.methodCallWrapper('autoTranslate.getSupportedLanguages', 'en');
export const getSupportedLanguagesAutoTranslate = (): Promise<{ language: string; name: string }[]> =>
sdk.methodCallWrapper('autoTranslate.getSupportedLanguages', 'en');
export const translateMessage = (message: any, targetLanguage: string) =>
sdk.methodCallWrapper('autoTranslate.translateMessage', message, targetLanguage);