import { NaverOpenApiAuthType } from "../../types/auth_types"; import { PAPAGO_preprocessed_KoreanNameRomanizer, PAPAGO_preprocessed_LanguageDetction, PAPAGO_preprocessed_Translation } from '../../types/processing_types'; import { ApiClientResponse, PapagoDetectLanguageReturnType, PapagoKoreanNameRomanizerReturnType, PapagoTranslationReturnType } from "../../types/return_types"; export declare class PAPAGO { /** * The account clientId / clientSecret key pair for NaverOpenAPI authentication * * @access private * @type {NaverOpenApiAuthType} * @memberof PAPAGO */ private openApiAuth; /** * The ApiClient for working with http request * * @access private * @type {ApiClient} * @memberof PAPAGO */ private client; /** * Creates an instance of PAPAGO service agent. * * @param {string} baseURL The baseURL of each session ( based on service ) * @param {NaverOpenApiAuthType} apiAuth Service identification for using NaverOpenApi * @memberof PAPAGO */ constructor(baseUrl: string, openApiAuth: NaverOpenApiAuthType); /** * Construct Translation Service apiRequest. pass source, target language and text want to translate. * Input parameter validation is implemented which handles API service Error beforehand request. * @async * @access public * @param {string} source - text's language which want to translate. * @param {string} target - language which want to be translated. * @param {string} text - text which want to be translated. * @returns {Promise>} return Promise response of http request with current ApiRequest configs and handle errors * @memberof PAPAGO */ translation(source: string, target: string, text: string): Promise>; /** * Construct Detect Language Service apiRequest. pass text want to detect language. * Input parameter validation is implemented which handles API service Error beforehand request. * @async * @access public * @param {string} text - text which want to detect language. * @returns {Promise>} return Promise response of http request with current ApiRequest configs and handle errors * @memberof PAPAGO */ detectLanguage(text: string): Promise>; /** * Construct Korean Name Romanizer Service apiRequest. pass korean name to be romanized analyzation. * Input parameter validation is implemented which handles API service Error beforehand request. * @async * @access public * @param {string} koreanName - koreanName which is to be romanized. * @returns {Promise>} return Promise response of http request with current ApiRequest configs and handle errors * @memberof PAPAGO */ koreanNameRominizer(koreanName: string): Promise>; /** * Parameter validation for translation Service. * It provides source / target validations with languagesupports, and text validation for length allowable by service. * @access private * @param {string} source - text's language which want to translate. * @param {string} target - language which want to be translated. * @param {string} text - text which want to be translated. * @returns {ServiceError | undefined} return ServiceError of each error if parameter violate API rules. * @memberof PAPAGO */ private languageSupportValidation; /** * Parameter validation for translation Service. * It provides text validation for length allowable by service. * @access private * @param {string} text - text which want to detect language. * @returns {ServiceError | undefined} return ServiceError of each error if parameter violate API rules. * @memberof PAPAGO */ private detectLanguageValidation; /** * Parameter validation for translation Service. * It provides name string validation for length, rules allowable by service by regex. * @access private * @param {string} name - koreanName which is to be romanized. * @returns {ServiceError | undefined} return ServiceError of each error if parameter violate API rules. * @memberof PAPAGO */ private koreanNameRomanizerValidation; }