import { CrowdinApi , PatchRequest , ResponseList , ResponseObject } from '../core' ; export class Languages extends CrowdinApi { param limit param offset listSupportedLanguages ( limit ? , offset ? ) { const url = `${ this . url }/languages` ; return this . getList ( url , limit , offset ) ; } param request addCustomLanguage ( request ) { const url = `${ this . url }/languages` ; return this . post ( url , request , this . defaultConfig ( ) ) ; } param languageId getLanguage ( languageId ) { const url = `${ this . url }/languages/${ languageId }` ; return this . get ( url , this . defaultConfig ( ) ) ; } param languageId deleteCustomLanguage ( languageId ) { const url = `${ this . url }/languages/${ languageId }` ; return this . delete ( url , this . defaultConfig ( ) ) ; } param languageId param request editCustomLanguage ( languageId , request ) { const url = `${ this . url }/languages/${ languageId }` ; return this . patch ( url , request , this . defaultConfig ( ) ) ; } } export namespace LanguagesModel { export interface Language { id : string ; name : string ; editorCode : string ; twoLettersCode : string ; threeLettersCode : string ; locale : string ; androidCode : string ; osxCode : string ; osxLocale : string ; pluralCategoryNames : string [ ] ; pluralRules : string ; pluralExamples : string [ ] ; textDirection : TextDirection ; dialectOf : number ; } export interface AddLanguageRequest { name : string ; dialectOf ? : number ; code : string ; localeCode : string ; twoLettersCode ? : string ; threeLettersCode : string ; textDirection : TextDirection ; pluralCategoryNames : string [ ] ; } export enum TextDirection { LTR = 'ltr' , RTL = 'rtl' } }