@language-weaver/lw-sdk-js 1.2.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/common/configurations/ClientConfiguration.d.ts +2 -2
- package/lib/common/configurations/ClientConfiguration.js +0 -2
- package/lib/common/configurations/ClientConfiguration.js.map +1 -1
- package/lib/common/configurations/CredentialsConfiguration.js +2 -6
- package/lib/common/configurations/CredentialsConfiguration.js.map +1 -1
- package/lib/{translation/feedback/cloud/model → common/constants}/CloudFeedbackSortCriteria.d.ts +0 -0
- package/lib/{translation/feedback/cloud/model → common/constants}/CloudFeedbackSortCriteria.js +0 -0
- package/lib/common/constants/CloudFeedbackSortCriteria.js.map +1 -0
- package/lib/common/constants/Statuses.d.ts +6 -0
- package/lib/common/constants/Statuses.js +7 -1
- package/lib/common/constants/Statuses.js.map +1 -1
- package/lib/common/constants/TranslationConstants.d.ts +17 -8
- package/lib/common/constants/TranslationConstants.js +22 -11
- package/lib/common/constants/TranslationConstants.js.map +1 -1
- package/lib/common/exceptions/ContentInsightsException.d.ts +4 -0
- package/lib/common/exceptions/ContentInsightsException.js +17 -0
- package/lib/common/exceptions/ContentInsightsException.js.map +1 -0
- package/lib/common/external/communication/RestClient.js +9 -7
- package/lib/common/external/communication/RestClient.js.map +1 -1
- package/lib/common/utils/Utils.d.ts +8 -1
- package/lib/common/utils/Utils.js +133 -31
- package/lib/common/utils/Utils.js.map +1 -1
- package/lib/index.d.ts +45 -17
- package/lib/index.js +74 -20
- package/lib/index.js.map +1 -1
- package/lib/translation/common/LanguageWeaverClient.d.ts +10 -2
- package/lib/translation/common/cloud/CloudLanguageWeaverClient.d.ts +28 -4
- package/lib/translation/common/cloud/CloudLanguageWeaverClient.js +209 -112
- package/lib/translation/common/cloud/CloudLanguageWeaverClient.js.map +1 -1
- package/lib/translation/common/edge/EdgeLanguageWeaverClient.d.ts +26 -6
- package/lib/translation/common/edge/EdgeLanguageWeaverClient.js +204 -132
- package/lib/translation/common/edge/EdgeLanguageWeaverClient.js.map +1 -1
- package/lib/translation/common/edge/utils/EdgeLanguagePairUtil.d.ts +1 -1
- package/lib/translation/common/edge/utils/EdgeLanguagePairUtil.js +1 -1
- package/lib/translation/common/edge/utils/EdgeLanguagePairUtil.js.map +1 -1
- package/lib/translation/content-insights/cloud/api/CloudContentInsightsResponse.d.ts +23 -0
- package/lib/translation/content-insights/cloud/api/CloudContentInsightsResponse.js +69 -0
- package/lib/translation/content-insights/cloud/api/CloudContentInsightsResponse.js.map +1 -0
- package/lib/translation/content-insights/cloud/api/CloudContentInsightsStatisticsApiModel.d.ts +10 -0
- package/lib/translation/content-insights/cloud/api/CloudContentInsightsStatisticsApiModel.js +39 -0
- package/lib/translation/content-insights/cloud/api/CloudContentInsightsStatisticsApiModel.js.map +1 -0
- package/lib/translation/content-insights/cloud/api/CloudCreateContentInsightsResponse.d.ts +12 -0
- package/lib/translation/content-insights/cloud/api/CloudCreateContentInsightsResponse.js +32 -0
- package/lib/translation/content-insights/cloud/api/CloudCreateContentInsightsResponse.js.map +1 -0
- package/lib/translation/content-insights/cloud/api/CloudCreateContentInsightsStatusResponse.d.ts +16 -0
- package/lib/translation/content-insights/cloud/api/CloudCreateContentInsightsStatusResponse.js +42 -0
- package/lib/translation/content-insights/cloud/api/CloudCreateContentInsightsStatusResponse.js.map +1 -0
- package/lib/translation/content-insights/cloud/api/CloudDocumentApiModel.d.ts +12 -0
- package/lib/translation/content-insights/cloud/api/CloudDocumentApiModel.js +39 -0
- package/lib/translation/content-insights/cloud/api/CloudDocumentApiModel.js.map +1 -0
- package/lib/translation/content-insights/cloud/api/CloudSegmentApiModel.d.ts +15 -0
- package/lib/translation/content-insights/cloud/api/CloudSegmentApiModel.js +57 -0
- package/lib/translation/content-insights/cloud/api/CloudSegmentApiModel.js.map +1 -0
- package/lib/translation/content-insights/cloud/api/CloudSummarizationApiModel.d.ts +13 -0
- package/lib/translation/content-insights/cloud/api/CloudSummarizationApiModel.js +46 -0
- package/lib/translation/content-insights/cloud/api/CloudSummarizationApiModel.js.map +1 -0
- package/lib/translation/content-insights/cloud/request/CloudContentInsightsRequest.d.ts +3 -0
- package/lib/translation/content-insights/cloud/request/CloudContentInsightsRequest.js +30 -0
- package/lib/translation/content-insights/cloud/request/CloudContentInsightsRequest.js.map +1 -0
- package/lib/translation/content-insights/cloud/request/CloudFileContentInsightsRequest.d.ts +8 -0
- package/lib/translation/content-insights/cloud/request/CloudFileContentInsightsRequest.js +29 -0
- package/lib/translation/content-insights/cloud/request/CloudFileContentInsightsRequest.js.map +1 -0
- package/lib/translation/content-insights/cloud/result/CloudContentInsightsResult.d.ts +16 -0
- package/lib/translation/content-insights/cloud/result/CloudContentInsightsResult.js +49 -0
- package/lib/translation/content-insights/cloud/result/CloudContentInsightsResult.js.map +1 -0
- package/lib/translation/content-insights/cloud/result/CloudContentInsightsStatistics.d.ts +8 -0
- package/lib/translation/content-insights/cloud/result/CloudContentInsightsStatistics.js +29 -0
- package/lib/translation/content-insights/cloud/result/CloudContentInsightsStatistics.js.map +1 -0
- package/lib/translation/content-insights/cloud/result/CloudSegment.d.ts +6 -0
- package/lib/translation/content-insights/cloud/result/CloudSegment.js +40 -0
- package/lib/translation/content-insights/cloud/result/CloudSegment.js.map +1 -0
- package/lib/translation/content-insights/cloud/result/CloudSummarization.d.ts +6 -0
- package/lib/translation/content-insights/cloud/result/CloudSummarization.js +19 -0
- package/lib/translation/content-insights/cloud/result/CloudSummarization.js.map +1 -0
- package/lib/translation/content-insights/cloud/service/CloudContentInsightsService.d.ts +20 -0
- package/lib/translation/content-insights/cloud/service/CloudContentInsightsService.js +248 -0
- package/lib/translation/content-insights/cloud/service/CloudContentInsightsService.js.map +1 -0
- package/lib/translation/content-insights/common/request/ContentInsightsRequest.d.ts +7 -0
- package/lib/translation/content-insights/common/request/ContentInsightsRequest.js +23 -0
- package/lib/translation/content-insights/common/request/ContentInsightsRequest.js.map +1 -0
- package/lib/translation/content-insights/common/result/ContentInsightsResult.d.ts +6 -0
- package/lib/translation/content-insights/common/result/ContentInsightsResult.js +19 -0
- package/lib/translation/content-insights/common/result/ContentInsightsResult.js.map +1 -0
- package/lib/translation/content-insights/common/result/Segment.d.ts +8 -0
- package/lib/translation/content-insights/common/result/Segment.js +29 -0
- package/lib/translation/content-insights/common/result/Segment.js.map +1 -0
- package/lib/translation/content-insights/common/result/Summarization.d.ts +8 -0
- package/lib/translation/content-insights/common/result/Summarization.js +25 -0
- package/lib/translation/content-insights/common/result/Summarization.js.map +1 -0
- package/lib/translation/content-insights/common/utils/ContentInsightsUtils.d.ts +4 -0
- package/lib/translation/content-insights/common/utils/ContentInsightsUtils.js +145 -0
- package/lib/translation/content-insights/common/utils/ContentInsightsUtils.js.map +1 -0
- package/lib/translation/content-insights/edge/api/EdgeContentInsightsResponse.d.ts +13 -0
- package/lib/translation/content-insights/edge/api/EdgeContentInsightsResponse.js +53 -0
- package/lib/translation/content-insights/edge/api/EdgeContentInsightsResponse.js.map +1 -0
- package/lib/translation/content-insights/edge/api/EdgeSegmentApiModel.d.ts +12 -0
- package/lib/translation/content-insights/edge/api/EdgeSegmentApiModel.js +46 -0
- package/lib/translation/content-insights/edge/api/EdgeSegmentApiModel.js.map +1 -0
- package/lib/translation/content-insights/edge/request/EdgeContentInsightsRequest.d.ts +5 -0
- package/lib/translation/content-insights/edge/request/EdgeContentInsightsRequest.js +19 -0
- package/lib/translation/content-insights/edge/request/EdgeContentInsightsRequest.js.map +1 -0
- package/lib/translation/content-insights/edge/result/EdgeContentInsightsResult.d.ts +9 -0
- package/lib/translation/content-insights/edge/result/EdgeContentInsightsResult.js +29 -0
- package/lib/translation/content-insights/edge/result/EdgeContentInsightsResult.js.map +1 -0
- package/lib/translation/content-insights/edge/result/EdgeSegment.d.ts +3 -0
- package/lib/translation/content-insights/edge/result/EdgeSegment.js +30 -0
- package/lib/translation/content-insights/edge/result/EdgeSegment.js.map +1 -0
- package/lib/translation/content-insights/edge/result/EdgeSummarization.d.ts +6 -0
- package/lib/translation/content-insights/edge/result/EdgeSummarization.js +19 -0
- package/lib/translation/content-insights/edge/result/EdgeSummarization.js.map +1 -0
- package/lib/translation/content-insights/edge/service/EdgeContentInsightsService.d.ts +14 -0
- package/lib/translation/content-insights/edge/service/EdgeContentInsightsService.js +96 -0
- package/lib/translation/content-insights/edge/service/EdgeContentInsightsService.js.map +1 -0
- package/lib/translation/dictionaries/cloud/api/CloudDictionariesResponse.d.ts +14 -0
- package/lib/translation/dictionaries/cloud/api/CloudDictionariesResponse.js +72 -0
- package/lib/translation/dictionaries/cloud/api/CloudDictionariesResponse.js.map +1 -0
- package/lib/translation/dictionaries/cloud/api/CloudDictionaryApiModel.d.ts +36 -0
- package/lib/translation/dictionaries/cloud/api/CloudDictionaryApiModel.js +136 -0
- package/lib/translation/dictionaries/cloud/api/CloudDictionaryApiModel.js.map +1 -0
- package/lib/translation/{translate → dictionaries}/cloud/result/CloudDictionariesResult.d.ts +3 -3
- package/lib/translation/{translate → dictionaries}/cloud/result/CloudDictionariesResult.js +0 -0
- package/lib/translation/dictionaries/cloud/result/CloudDictionariesResult.js.map +1 -0
- package/lib/translation/{translate/cloud/api/CloudDictionaryResponse.d.ts → dictionaries/cloud/result/CloudDictionary.d.ts} +1 -1
- package/lib/translation/{translate/cloud/api/CloudDictionaryResponse.js → dictionaries/cloud/result/CloudDictionary.js} +15 -15
- package/lib/translation/dictionaries/cloud/result/CloudDictionary.js.map +1 -0
- package/lib/translation/dictionaries/cloud/service/CloudDictionariesService.d.ts +15 -0
- package/lib/translation/dictionaries/cloud/service/CloudDictionariesService.js +51 -0
- package/lib/translation/dictionaries/cloud/service/CloudDictionariesService.js.map +1 -0
- package/lib/translation/dictionaries/common/result/DictionariesResult.d.ts +7 -0
- package/lib/translation/{translate → dictionaries}/common/result/DictionariesResult.js +0 -0
- package/lib/translation/dictionaries/common/result/DictionariesResult.js.map +1 -0
- package/lib/translation/{translate/common/api/DictionaryResponse.d.ts → dictionaries/common/result/Dictionary.d.ts} +1 -1
- package/lib/translation/{translate/common/api/DictionaryResponse.js → dictionaries/common/result/Dictionary.js} +8 -8
- package/lib/translation/dictionaries/common/result/Dictionary.js.map +1 -0
- package/lib/translation/dictionaries/edge/api/EdgeDictionariesResponse.d.ts +22 -0
- package/lib/translation/dictionaries/edge/api/EdgeDictionariesResponse.js +84 -0
- package/lib/translation/dictionaries/edge/api/EdgeDictionariesResponse.js.map +1 -0
- package/lib/translation/dictionaries/edge/api/EdgeDictionaryApiModel.d.ts +15 -0
- package/lib/translation/dictionaries/edge/api/EdgeDictionaryApiModel.js +58 -0
- package/lib/translation/dictionaries/edge/api/EdgeDictionaryApiModel.js.map +1 -0
- package/lib/translation/{translate → dictionaries}/edge/result/EdgeDictionariesResult.d.ts +3 -3
- package/lib/translation/{translate → dictionaries}/edge/result/EdgeDictionariesResult.js +0 -0
- package/lib/translation/dictionaries/edge/result/EdgeDictionariesResult.js.map +1 -0
- package/lib/translation/{translate/edge/api/EdgeDictionaryResponse.d.ts → dictionaries/edge/result/EdgeDictionary.d.ts} +1 -1
- package/lib/translation/{translate/edge/api/EdgeDictionaryResponse.js → dictionaries/edge/result/EdgeDictionary.js} +8 -8
- package/lib/translation/dictionaries/edge/result/EdgeDictionary.js.map +1 -0
- package/lib/translation/dictionaries/edge/service/EdgeDictionariesService.d.ts +12 -0
- package/lib/translation/dictionaries/edge/service/EdgeDictionariesService.js +51 -0
- package/lib/translation/dictionaries/edge/service/EdgeDictionariesService.js.map +1 -0
- package/lib/translation/feedback/cloud/api/CloudFeedbackApiModel.js +2 -2
- package/lib/translation/feedback/cloud/api/CloudFeedbackApiModel.js.map +1 -1
- package/lib/translation/feedback/cloud/request/CloudFeedbackSortRequest.d.ts +1 -1
- package/lib/translation/feedback/cloud/{model → result}/CloudAuditData.d.ts +1 -1
- package/lib/translation/feedback/cloud/{model → result}/CloudAuditData.js +1 -1
- package/lib/translation/feedback/cloud/result/CloudAuditData.js.map +1 -0
- package/lib/translation/feedback/cloud/result/CloudFeedbackResult.d.ts +1 -1
- package/lib/translation/feedback/cloud/service/CloudFeedbackService.js +1 -1
- package/lib/translation/feedback/cloud/service/CloudFeedbackService.js.map +1 -1
- package/lib/translation/feedback/cloud/{validators → validator}/CloudFeedbackValidator.d.ts +1 -1
- package/lib/translation/feedback/cloud/{validators → validator}/CloudFeedbackValidator.js +1 -1
- package/lib/translation/feedback/cloud/validator/CloudFeedbackValidator.js.map +1 -0
- package/lib/translation/feedback/common/{model → result}/AuditData.d.ts +0 -0
- package/lib/translation/feedback/common/{model → result}/AuditData.js +0 -0
- package/lib/translation/feedback/common/result/AuditData.js.map +1 -0
- package/lib/translation/feedback/common/result/FeedbackResult.d.ts +1 -1
- package/lib/translation/feedback/common/{validators → validator}/FeedbackValidator.d.ts +0 -0
- package/lib/translation/feedback/common/{validators → validator}/FeedbackValidator.js +0 -0
- package/lib/translation/feedback/common/validator/FeedbackValidator.js.map +1 -0
- package/lib/translation/feedback/edge/api/EdgeFeedbackApiModel.d.ts +1 -1
- package/lib/translation/feedback/edge/api/EdgeFeedbackApiModel.js +1 -1
- package/lib/translation/feedback/edge/api/EdgeFeedbackApiModel.js.map +1 -1
- package/lib/translation/feedback/edge/service/EdgeFeedbackService.d.ts +1 -1
- package/lib/translation/feedback/edge/service/EdgeFeedbackService.js +1 -1
- package/lib/translation/feedback/edge/service/EdgeFeedbackService.js.map +1 -1
- package/lib/translation/feedback/edge/validator/EdgeFeedbackValidator.d.ts +3 -0
- package/lib/translation/feedback/edge/{validators → validator}/EdgeFeedbackValidator.js +1 -1
- package/lib/translation/feedback/edge/validator/EdgeFeedbackValidator.js.map +1 -0
- package/lib/translation/language-pairs/cloud/api/CloudLanguagePairApiModel.d.ts +21 -0
- package/lib/translation/language-pairs/cloud/api/CloudLanguagePairApiModel.js +81 -0
- package/lib/translation/language-pairs/cloud/api/CloudLanguagePairApiModel.js.map +1 -0
- package/lib/translation/language-pairs/cloud/api/CloudLanguagePairsResponse.d.ts +13 -0
- package/lib/translation/language-pairs/cloud/api/CloudLanguagePairsResponse.js +47 -0
- package/lib/translation/language-pairs/cloud/api/CloudLanguagePairsResponse.js.map +1 -0
- package/lib/translation/{translate/cloud/api → language-pairs/cloud/result}/CloudLanguagePair.d.ts +2 -0
- package/lib/translation/{translate/cloud/api → language-pairs/cloud/result}/CloudLanguagePair.js +11 -0
- package/lib/translation/language-pairs/cloud/result/CloudLanguagePair.js.map +1 -0
- package/lib/translation/{translate → language-pairs}/cloud/result/CloudLanguagePairsResult.d.ts +1 -1
- package/lib/translation/{translate → language-pairs}/cloud/result/CloudLanguagePairsResult.js +0 -0
- package/lib/translation/language-pairs/cloud/result/CloudLanguagePairsResult.js.map +1 -0
- package/lib/translation/language-pairs/cloud/service/CloudLanguagePairsService.d.ts +15 -0
- package/lib/translation/language-pairs/cloud/service/CloudLanguagePairsService.js +45 -0
- package/lib/translation/language-pairs/cloud/service/CloudLanguagePairsService.js.map +1 -0
- package/lib/translation/language-pairs/common/result/LanguagePair.d.ts +16 -0
- package/lib/translation/{translate/common/api → language-pairs/common/result}/LanguagePair.js +11 -0
- package/lib/translation/language-pairs/common/result/LanguagePair.js.map +1 -0
- package/lib/translation/{translate → language-pairs}/common/result/LanguagePairsResult.d.ts +1 -1
- package/lib/translation/{translate → language-pairs}/common/result/LanguagePairsResult.js +0 -0
- package/lib/translation/language-pairs/common/result/LanguagePairsResult.js.map +1 -0
- package/lib/translation/language-pairs/edge/api/EdgeLanguagePairApiModel.d.ts +17 -0
- package/lib/translation/language-pairs/edge/api/EdgeLanguagePairApiModel.js +89 -0
- package/lib/translation/language-pairs/edge/api/EdgeLanguagePairApiModel.js.map +1 -0
- package/lib/translation/language-pairs/edge/api/EdgeLanguagePairsApiModel.d.ts +10 -0
- package/lib/translation/language-pairs/edge/api/EdgeLanguagePairsApiModel.js +37 -0
- package/lib/translation/language-pairs/edge/api/EdgeLanguagePairsApiModel.js.map +1 -0
- package/lib/translation/language-pairs/edge/api/MemberPairApiModel.d.ts +31 -0
- package/lib/translation/language-pairs/edge/api/MemberPairApiModel.js +116 -0
- package/lib/translation/language-pairs/edge/api/MemberPairApiModel.js.map +1 -0
- package/lib/translation/language-pairs/edge/result/EdgeLanguagePair.d.ts +15 -0
- package/lib/translation/{translate/edge/api → language-pairs/edge/result}/EdgeLanguagePair.js +20 -0
- package/lib/translation/language-pairs/edge/result/EdgeLanguagePair.js.map +1 -0
- package/lib/translation/{translate → language-pairs}/edge/result/EdgeLanguagePairsResult.d.ts +1 -1
- package/lib/translation/{translate → language-pairs}/edge/result/EdgeLanguagePairsResult.js +0 -0
- package/lib/translation/language-pairs/edge/result/EdgeLanguagePairsResult.js.map +1 -0
- package/lib/translation/{translate/edge/api → language-pairs/edge/result}/MemberPair.d.ts +0 -0
- package/lib/translation/{translate/edge/api → language-pairs/edge/result}/MemberPair.js +0 -0
- package/lib/translation/language-pairs/edge/result/MemberPair.js.map +1 -0
- package/lib/translation/language-pairs/edge/service/EdgeLanguagePairsService.d.ts +14 -0
- package/lib/translation/language-pairs/edge/service/EdgeLanguagePairsService.js +80 -0
- package/lib/translation/language-pairs/edge/service/EdgeLanguagePairsService.js.map +1 -0
- package/lib/translation/linguistic-options/cloud/api/CloudLinguisticOptionApiModel.d.ts +13 -0
- package/lib/translation/linguistic-options/cloud/api/CloudLinguisticOptionApiModel.js +68 -0
- package/lib/translation/linguistic-options/cloud/api/CloudLinguisticOptionApiModel.js.map +1 -0
- package/lib/translation/linguistic-options/cloud/api/CloudLinguisticOptionsResponse.d.ts +6 -0
- package/lib/translation/linguistic-options/cloud/api/CloudLinguisticOptionsResponse.js +19 -0
- package/lib/translation/linguistic-options/cloud/api/CloudLinguisticOptionsResponse.js.map +1 -0
- package/lib/translation/linguistic-options/cloud/request/CloudGetLinguisticOptionsRequest.d.ts +3 -0
- package/lib/translation/linguistic-options/cloud/request/CloudGetLinguisticOptionsRequest.js +30 -0
- package/lib/translation/linguistic-options/cloud/request/CloudGetLinguisticOptionsRequest.js.map +1 -0
- package/lib/translation/linguistic-options/cloud/result/CloudLinguisticOption.d.ts +10 -0
- package/lib/translation/linguistic-options/cloud/result/CloudLinguisticOption.js +57 -0
- package/lib/translation/linguistic-options/cloud/result/CloudLinguisticOption.js.map +1 -0
- package/lib/translation/linguistic-options/cloud/result/CloudLinguisticOptionsResult.d.ts +6 -0
- package/lib/translation/linguistic-options/cloud/result/CloudLinguisticOptionsResult.js +19 -0
- package/lib/translation/linguistic-options/cloud/result/CloudLinguisticOptionsResult.js.map +1 -0
- package/lib/translation/linguistic-options/cloud/service/CloudLinguisticOptionsService.d.ts +19 -0
- package/lib/translation/linguistic-options/cloud/service/CloudLinguisticOptionsService.js +72 -0
- package/lib/translation/linguistic-options/cloud/service/CloudLinguisticOptionsService.js.map +1 -0
- package/lib/translation/linguistic-options/cloud/validator/CloudLinguisticOptionsValidator.d.ts +3 -0
- package/lib/translation/linguistic-options/cloud/validator/CloudLinguisticOptionsValidator.js +30 -0
- package/lib/translation/linguistic-options/cloud/validator/CloudLinguisticOptionsValidator.js.map +1 -0
- package/lib/translation/linguistic-options/common/api/LinguisticOptionApiModel.d.ts +11 -0
- package/lib/translation/linguistic-options/common/api/LinguisticOptionApiModel.js +39 -0
- package/lib/translation/linguistic-options/common/api/LinguisticOptionApiModel.js.map +1 -0
- package/lib/translation/{translate/common/api/LanguagePair.d.ts → linguistic-options/common/request/GetLinguisticOptionsRequest.d.ts} +1 -4
- package/lib/translation/linguistic-options/common/request/GetLinguisticOptionsRequest.js +39 -0
- package/lib/translation/linguistic-options/common/request/GetLinguisticOptionsRequest.js.map +1 -0
- package/lib/translation/linguistic-options/common/result/LinguisticOption.d.ts +11 -0
- package/lib/translation/linguistic-options/common/result/LinguisticOption.js +39 -0
- package/lib/translation/linguistic-options/common/result/LinguisticOption.js.map +1 -0
- package/lib/translation/linguistic-options/common/result/LinguisticOptionsResult.d.ts +6 -0
- package/lib/translation/linguistic-options/common/result/LinguisticOptionsResult.js +19 -0
- package/lib/translation/linguistic-options/common/result/LinguisticOptionsResult.js.map +1 -0
- package/lib/translation/linguistic-options/common/validator/LinguisticOptionsValidator.d.ts +4 -0
- package/lib/translation/linguistic-options/common/validator/LinguisticOptionsValidator.js +25 -0
- package/lib/translation/linguistic-options/common/validator/LinguisticOptionsValidator.js.map +1 -0
- package/lib/translation/linguistic-options/edge/api/EdgeLinguisticOptionApiModel.d.ts +7 -0
- package/lib/translation/linguistic-options/edge/api/EdgeLinguisticOptionApiModel.js +46 -0
- package/lib/translation/linguistic-options/edge/api/EdgeLinguisticOptionApiModel.js.map +1 -0
- package/lib/translation/linguistic-options/edge/api/EdgeLinguisticOptionsResponse.d.ts +6 -0
- package/lib/translation/linguistic-options/edge/api/EdgeLinguisticOptionsResponse.js +19 -0
- package/lib/translation/linguistic-options/edge/api/EdgeLinguisticOptionsResponse.js.map +1 -0
- package/lib/translation/linguistic-options/edge/request/EdgeGetLinguisticOptionsRequest.d.ts +9 -0
- package/lib/translation/linguistic-options/edge/request/EdgeGetLinguisticOptionsRequest.js +50 -0
- package/lib/translation/linguistic-options/edge/request/EdgeGetLinguisticOptionsRequest.js.map +1 -0
- package/lib/translation/linguistic-options/edge/result/EdgeLinguisticOption.d.ts +4 -0
- package/lib/translation/linguistic-options/edge/result/EdgeLinguisticOption.js +37 -0
- package/lib/translation/linguistic-options/edge/result/EdgeLinguisticOption.js.map +1 -0
- package/lib/translation/linguistic-options/edge/result/EdgeLinguisticOptionsResult.d.ts +6 -0
- package/lib/translation/linguistic-options/edge/result/EdgeLinguisticOptionsResult.js +19 -0
- package/lib/translation/linguistic-options/edge/result/EdgeLinguisticOptionsResult.js.map +1 -0
- package/lib/translation/linguistic-options/edge/service/EdgeLinguisticOptionsService.d.ts +18 -0
- package/lib/translation/linguistic-options/edge/service/EdgeLinguisticOptionsService.js +101 -0
- package/lib/translation/linguistic-options/edge/service/EdgeLinguisticOptionsService.js.map +1 -0
- package/lib/translation/linguistic-options/edge/validator/EdgeLinguisticOptionsValidator.d.ts +3 -0
- package/lib/translation/linguistic-options/edge/validator/EdgeLinguisticOptionsValidator.js +30 -0
- package/lib/translation/linguistic-options/edge/validator/EdgeLinguisticOptionsValidator.js.map +1 -0
- package/lib/translation/translate/cloud/request/CloudRetrieveFileRequest.d.ts +3 -0
- package/lib/translation/translate/cloud/request/CloudRetrieveFileRequest.js +30 -0
- package/lib/translation/translate/cloud/request/CloudRetrieveFileRequest.js.map +1 -0
- package/lib/translation/translate/cloud/request/CloudTranslateTextRequest.d.ts +3 -0
- package/lib/translation/translate/cloud/request/CloudTranslateTextRequest.js +21 -0
- package/lib/translation/translate/cloud/request/CloudTranslateTextRequest.js.map +1 -1
- package/lib/translation/translate/cloud/request/CloudTranslateTextRequestApiModel.d.ts +26 -0
- package/lib/translation/translate/cloud/request/CloudTranslateTextRequestApiModel.js +80 -0
- package/lib/translation/translate/cloud/request/CloudTranslateTextRequestApiModel.js.map +1 -0
- package/lib/translation/translate/cloud/result/CloudTranslationFileResult.d.ts +0 -3
- package/lib/translation/translate/cloud/result/CloudTranslationFileResult.js +0 -10
- package/lib/translation/translate/cloud/result/CloudTranslationFileResult.js.map +1 -1
- package/lib/translation/translate/cloud/result/CloudTranslationTextResult.d.ts +3 -3
- package/lib/translation/translate/cloud/result/CloudTranslationTextResult.js +3 -3
- package/lib/translation/translate/cloud/result/CloudTranslationTextResult.js.map +1 -1
- package/lib/translation/translate/common/request/RetrieveFileRequest.d.ts +11 -0
- package/lib/translation/translate/common/request/RetrieveFileRequest.js +39 -0
- package/lib/translation/translate/common/request/RetrieveFileRequest.js.map +1 -0
- package/lib/translation/translate/common/request/TranslateBatchFileRequest.d.ts +3 -0
- package/lib/translation/translate/common/request/TranslateBatchFileRequest.js +10 -0
- package/lib/translation/translate/common/request/TranslateBatchFileRequest.js.map +1 -1
- package/lib/translation/translate/common/request/TranslateRequest.d.ts +3 -0
- package/lib/translation/translate/common/request/TranslateRequest.js +10 -0
- package/lib/translation/translate/common/request/TranslateRequest.js.map +1 -1
- package/lib/translation/translate/common/result/TranslationFileResult.d.ts +6 -0
- package/lib/translation/translate/common/result/TranslationFileResult.js +20 -0
- package/lib/translation/translate/common/result/TranslationFileResult.js.map +1 -1
- package/lib/translation/translate/common/utils/TranslateFileUtil.d.ts +3 -1
- package/lib/translation/translate/common/utils/TranslateFileUtil.js +26 -53
- package/lib/translation/translate/common/utils/TranslateFileUtil.js.map +1 -1
- package/lib/translation/translate/edge/request/EdgeRetrieveFileRequest.d.ts +7 -0
- package/lib/translation/translate/edge/request/EdgeRetrieveFileRequest.js +40 -0
- package/lib/translation/translate/edge/request/EdgeRetrieveFileRequest.js.map +1 -0
- package/lib/translation/translate/edge/request/EdgeTranslateFileRequest.d.ts +2 -2
- package/lib/translation/translate/edge/request/EdgeTranslateFileRequest.js +15 -14
- package/lib/translation/translate/edge/request/EdgeTranslateFileRequest.js.map +1 -1
- package/lib/translation/translate/edge/request/{EdgeTranslateApiModel.d.ts → EdgeTranslateRequest.d.ts} +1 -1
- package/lib/translation/translate/edge/request/{EdgeTranslateApiModel.js → EdgeTranslateRequest.js} +14 -14
- package/lib/translation/translate/edge/request/EdgeTranslateRequest.js.map +1 -0
- package/lib/translation/translate/edge/request/EdgeTranslateTextRequest.d.ts +2 -2
- package/lib/translation/translate/edge/request/EdgeTranslateTextRequest.js +15 -14
- package/lib/translation/translate/edge/request/EdgeTranslateTextRequest.js.map +1 -1
- package/lib/translation/translate/edge/result/EdgeTranslationFileResult.d.ts +0 -3
- package/lib/translation/translate/edge/result/EdgeTranslationFileResult.js +0 -10
- package/lib/translation/translate/edge/result/EdgeTranslationFileResult.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +2 -2
- package/lib/translation/feedback/cloud/model/CloudAuditData.js.map +0 -1
- package/lib/translation/feedback/cloud/model/CloudFeedbackSortCriteria.js.map +0 -1
- package/lib/translation/feedback/cloud/validators/CloudFeedbackValidator.js.map +0 -1
- package/lib/translation/feedback/common/model/AuditData.js.map +0 -1
- package/lib/translation/feedback/common/validators/FeedbackValidator.js.map +0 -1
- package/lib/translation/feedback/edge/validators/EdgeFeedbackValidator.d.ts +0 -3
- package/lib/translation/feedback/edge/validators/EdgeFeedbackValidator.js.map +0 -1
- package/lib/translation/translate/cloud/api/CloudDictionaryResponse.js.map +0 -1
- package/lib/translation/translate/cloud/api/CloudLanguagePair.js.map +0 -1
- package/lib/translation/translate/cloud/result/CloudDictionariesResult.js.map +0 -1
- package/lib/translation/translate/cloud/result/CloudLanguagePairsResult.js.map +0 -1
- package/lib/translation/translate/common/api/DictionaryResponse.js.map +0 -1
- package/lib/translation/translate/common/api/LanguagePair.js.map +0 -1
- package/lib/translation/translate/common/result/DictionariesResult.d.ts +0 -7
- package/lib/translation/translate/common/result/DictionariesResult.js.map +0 -1
- package/lib/translation/translate/common/result/LanguagePairsResult.js.map +0 -1
- package/lib/translation/translate/edge/api/EdgeDictionaryResponse.js.map +0 -1
- package/lib/translation/translate/edge/api/EdgeLanguagePair.d.ts +0 -9
- package/lib/translation/translate/edge/api/EdgeLanguagePair.js.map +0 -1
- package/lib/translation/translate/edge/api/MemberPair.js.map +0 -1
- package/lib/translation/translate/edge/request/EdgeTranslateApiModel.js.map +0 -1
- package/lib/translation/translate/edge/result/EdgeDictionariesResult.js.map +0 -1
- package/lib/translation/translate/edge/result/EdgeLanguagePairsResult.js.map +0 -1
|
@@ -51,24 +51,27 @@ var EdgeFinalSubStatuses_1 = require("../../../common/constants/EdgeFinalSubStat
|
|
|
51
51
|
var EdgeTranslationException_1 = __importDefault(require("../../../common/exceptions/EdgeTranslationException"));
|
|
52
52
|
var Statuses_1 = require("../../../common/constants/Statuses");
|
|
53
53
|
var Utils_1 = __importDefault(require("../../../common/utils/Utils"));
|
|
54
|
+
var TranslationFileResult_1 = __importDefault(require("../../translate/common/result/TranslationFileResult"));
|
|
54
55
|
var EdgeTranslateFileRequest_1 = __importDefault(require("../../translate/edge/request/EdgeTranslateFileRequest"));
|
|
55
56
|
var EdgeTranslationFileResult_1 = __importDefault(require("../../translate/edge/result/EdgeTranslationFileResult"));
|
|
56
57
|
var TranslateFileUtil_1 = require("../../translate/common/utils/TranslateFileUtil");
|
|
57
|
-
var LanguagePairsResult_1 = __importDefault(require("../../translate/common/result/LanguagePairsResult"));
|
|
58
|
-
var LanguagePair_1 = __importDefault(require("../../translate/common/api/LanguagePair"));
|
|
59
58
|
var EdgeTranslateBatchFileRequest_1 = __importDefault(require("../../translate/edge/request/EdgeTranslateBatchFileRequest"));
|
|
60
59
|
var EdgeTranslationBatchFileResult_1 = __importDefault(require("../../translate/edge/result/EdgeTranslationBatchFileResult"));
|
|
61
|
-
var DictionariesResult_1 = __importDefault(require("../../translate/common/result/DictionariesResult"));
|
|
62
|
-
var EdgeDictionariesResult_1 = __importDefault(require("../../translate/edge/result/EdgeDictionariesResult"));
|
|
63
|
-
var DictionaryResponse_1 = __importDefault(require("../../translate/common/api/DictionaryResponse"));
|
|
64
60
|
var FormatToMimeType_1 = require("../../../common/constants/FormatToMimeType");
|
|
65
61
|
var EdgeFeedbackService_1 = __importDefault(require("../../feedback/edge/service/EdgeFeedbackService"));
|
|
66
62
|
var FilterFeedbackRequest_1 = __importDefault(require("../../feedback/common/request/FilterFeedbackRequest"));
|
|
67
63
|
var EdgeFilterFeedbackRequest_1 = __importDefault(require("../../feedback/edge/request/EdgeFilterFeedbackRequest"));
|
|
68
64
|
var PdfConverter_1 = require("../../../common/constants/PdfConverter");
|
|
65
|
+
var EdgeRetrieveFileRequest_1 = __importDefault(require("../../translate/edge/request/EdgeRetrieveFileRequest"));
|
|
66
|
+
var GetLinguisticOptionsRequest_1 = __importDefault(require("../../linguistic-options/common/request/GetLinguisticOptionsRequest"));
|
|
67
|
+
var EdgeGetLinguisticOptionsRequest_1 = __importDefault(require("../../linguistic-options/edge/request/EdgeGetLinguisticOptionsRequest"));
|
|
68
|
+
var EdgeLinguisticOptionsService_1 = __importDefault(require("../../linguistic-options/edge/service/EdgeLinguisticOptionsService"));
|
|
69
|
+
var EdgeLanguagePairsService_1 = __importDefault(require("../../language-pairs/edge/service/EdgeLanguagePairsService"));
|
|
70
|
+
var EdgeContentInsightsService_1 = __importDefault(require("../../content-insights/edge/service/EdgeContentInsightsService"));
|
|
71
|
+
var EdgeDictionariesService_1 = __importDefault(require("../../dictionaries/edge/service/EdgeDictionariesService"));
|
|
72
|
+
var CredentialsConfiguration_1 = __importDefault(require("../../../common/configurations/CredentialsConfiguration"));
|
|
69
73
|
var EdgeLanguageWeaverClient = /** @class */ (function () {
|
|
70
74
|
function EdgeLanguageWeaverClient() {
|
|
71
|
-
this._clientConfiguration = new ClientConfiguration_1.default();
|
|
72
75
|
this._url = TranslationConstants_1.EDGE_DEFAULT_URL;
|
|
73
76
|
this._client = new RestClient_1.default(this._url);
|
|
74
77
|
}
|
|
@@ -82,17 +85,32 @@ var EdgeLanguageWeaverClient = /** @class */ (function () {
|
|
|
82
85
|
return this;
|
|
83
86
|
};
|
|
84
87
|
EdgeLanguageWeaverClient.prototype.build = function () {
|
|
85
|
-
var _a;
|
|
86
88
|
return __awaiter(this, void 0, void 0, function () {
|
|
87
|
-
var
|
|
88
|
-
return __generator(this, function (
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
89
|
+
var e_1;
|
|
90
|
+
return __generator(this, function (_a) {
|
|
91
|
+
switch (_a.label) {
|
|
92
|
+
case 0:
|
|
93
|
+
this.setUrl();
|
|
94
|
+
_a.label = 1;
|
|
95
|
+
case 1:
|
|
96
|
+
_a.trys.push([1, 4, , 5]);
|
|
97
|
+
if (!!this.hasToken()) return [3 /*break*/, 3];
|
|
98
|
+
return [4 /*yield*/, this.handleCredentialsConfiguration()];
|
|
99
|
+
case 2:
|
|
100
|
+
_a.sent();
|
|
101
|
+
_a.label = 3;
|
|
102
|
+
case 3:
|
|
103
|
+
this._feedbackService = new EdgeFeedbackService_1.default(this._client, this._token);
|
|
104
|
+
this._languagePairsService = new EdgeLanguagePairsService_1.default(this._client, this._token);
|
|
105
|
+
this._linguisticOptionsService = new EdgeLinguisticOptionsService_1.default(this._client, this._token, this._languagePairsService);
|
|
106
|
+
this._contentInsightsService = new EdgeContentInsightsService_1.default(this._client, this._token);
|
|
107
|
+
this._dictionariesService = new EdgeDictionariesService_1.default(this._client, this._token);
|
|
108
|
+
return [2 /*return*/, this];
|
|
109
|
+
case 4:
|
|
110
|
+
e_1 = _a.sent();
|
|
111
|
+
return [2 /*return*/, Promise.reject(e_1)];
|
|
112
|
+
case 5: return [2 /*return*/];
|
|
93
113
|
}
|
|
94
|
-
this._feedbackService = new EdgeFeedbackService_1.default(this._client, this._token);
|
|
95
|
-
return [2 /*return*/, this];
|
|
96
114
|
});
|
|
97
115
|
});
|
|
98
116
|
};
|
|
@@ -102,6 +120,7 @@ var EdgeLanguageWeaverClient = /** @class */ (function () {
|
|
|
102
120
|
},
|
|
103
121
|
set: function (value) {
|
|
104
122
|
this._overwriteUrl = value;
|
|
123
|
+
this.setUrl();
|
|
105
124
|
},
|
|
106
125
|
enumerable: false,
|
|
107
126
|
configurable: true
|
|
@@ -125,6 +144,7 @@ var EdgeLanguageWeaverClient = /** @class */ (function () {
|
|
|
125
144
|
request.languagePairId = lp.languagePairId;
|
|
126
145
|
request.inputFormat = translateTextRequest.inputFormat;
|
|
127
146
|
request.dictionaries = translateTextRequest.dictionaries;
|
|
147
|
+
request.linguisticOptions = translateTextRequest.linguisticOptions;
|
|
128
148
|
return _this.translate(request);
|
|
129
149
|
})
|
|
130
150
|
.catch(function (error) { return Promise.reject(error); });
|
|
@@ -141,13 +161,14 @@ var EdgeLanguageWeaverClient = /** @class */ (function () {
|
|
|
141
161
|
request.languagePairId = lp.languagePairId;
|
|
142
162
|
request.dictionaries = translateFileRequest.dictionaries;
|
|
143
163
|
request.pdfConverter = translateFileRequest.pdfConverter;
|
|
164
|
+
request.linguisticOptions = translateFileRequest.linguisticOptions;
|
|
144
165
|
return _this.requestTranslateFile(request);
|
|
145
166
|
})
|
|
146
167
|
.catch(function (error) { return Promise.reject(error); });
|
|
147
168
|
};
|
|
148
169
|
EdgeLanguageWeaverClient.prototype.translateBatchFile = function (translateBatchFileRequest) {
|
|
149
170
|
return __awaiter(this, void 0, void 0, function () {
|
|
150
|
-
var sourceLanguageId, targetLanguageId, model, edgeLanguagePair, request,
|
|
171
|
+
var sourceLanguageId, targetLanguageId, model, edgeLanguagePair, request, e_2;
|
|
151
172
|
return __generator(this, function (_a) {
|
|
152
173
|
switch (_a.label) {
|
|
153
174
|
case 0:
|
|
@@ -164,109 +185,116 @@ var EdgeLanguageWeaverClient = /** @class */ (function () {
|
|
|
164
185
|
request.dictionaries = translateBatchFileRequest.dictionaries;
|
|
165
186
|
request.languagePairId = edgeLanguagePair.languagePairId;
|
|
166
187
|
request.pdfConverter = translateBatchFileRequest.pdfConverter;
|
|
188
|
+
request.linguisticOptions = translateBatchFileRequest.linguisticOptions;
|
|
167
189
|
return [2 /*return*/, this.requestTranslateBatchFile(request)];
|
|
168
190
|
case 3:
|
|
169
|
-
|
|
170
|
-
return [2 /*return*/, Promise.reject(
|
|
191
|
+
e_2 = _a.sent();
|
|
192
|
+
return [2 /*return*/, Promise.reject(e_2)];
|
|
171
193
|
case 4: return [2 /*return*/];
|
|
172
194
|
}
|
|
173
195
|
});
|
|
174
196
|
});
|
|
175
197
|
};
|
|
176
|
-
EdgeLanguageWeaverClient.prototype.
|
|
177
|
-
var _a;
|
|
198
|
+
EdgeLanguageWeaverClient.prototype.retrieveFileTranslation = function (retrieveFileRequest) {
|
|
178
199
|
return __awaiter(this, void 0, void 0, function () {
|
|
179
|
-
var
|
|
180
|
-
return __generator(this, function (
|
|
181
|
-
switch (
|
|
200
|
+
var edgeRetrieveFileRequest, response, translationFileResult, e_3;
|
|
201
|
+
return __generator(this, function (_a) {
|
|
202
|
+
switch (_a.label) {
|
|
182
203
|
case 0:
|
|
183
|
-
|
|
184
|
-
|
|
204
|
+
_a.trys.push([0, 2, , 3]);
|
|
205
|
+
edgeRetrieveFileRequest = new EdgeRetrieveFileRequest_1.default();
|
|
206
|
+
edgeRetrieveFileRequest.translationId = retrieveFileRequest.translationId;
|
|
207
|
+
edgeRetrieveFileRequest.outputDir = retrieveFileRequest.outputDir;
|
|
208
|
+
edgeRetrieveFileRequest.outputFile = retrieveFileRequest.outputFile;
|
|
209
|
+
return [4 /*yield*/, this.retrieveEdgeFileTranslation(edgeRetrieveFileRequest)];
|
|
185
210
|
case 1:
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
languagePair.model = lp.domain;
|
|
193
|
-
languagePair.name = lp.languagePairId;
|
|
194
|
-
languagePairs_1.push(languagePair);
|
|
195
|
-
});
|
|
196
|
-
return [2 /*return*/, new Promise(function (resolve) {
|
|
197
|
-
var result = new LanguagePairsResult_1.default();
|
|
198
|
-
result.languagePairs = languagePairs_1;
|
|
199
|
-
resolve(result);
|
|
200
|
-
})];
|
|
211
|
+
response = _a.sent();
|
|
212
|
+
translationFileResult = new TranslationFileResult_1.default();
|
|
213
|
+
translationFileResult.fileContent = response.fileContent;
|
|
214
|
+
translationFileResult.mimeType = response.mimeType;
|
|
215
|
+
translationFileResult.filename = response.filename;
|
|
216
|
+
return [2 /*return*/, Promise.resolve(translationFileResult)];
|
|
201
217
|
case 2:
|
|
202
|
-
|
|
203
|
-
return [2 /*return*/, Promise.reject(
|
|
218
|
+
e_3 = _a.sent();
|
|
219
|
+
return [2 /*return*/, Promise.reject(e_3)];
|
|
204
220
|
case 3: return [2 /*return*/];
|
|
205
221
|
}
|
|
206
222
|
});
|
|
207
223
|
});
|
|
208
224
|
};
|
|
209
|
-
EdgeLanguageWeaverClient.prototype.
|
|
210
|
-
return this
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
225
|
+
EdgeLanguageWeaverClient.prototype.retrieveEdgeFileTranslation = function (retrieveFileRequest) {
|
|
226
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
227
|
+
var validationError, statusPromise;
|
|
228
|
+
var _this = this;
|
|
229
|
+
return __generator(this, function (_a) {
|
|
230
|
+
validationError = (0, TranslateFileUtil_1.validateInputDataForRetrieveFileTranslation)(retrieveFileRequest);
|
|
231
|
+
if (validationError) {
|
|
232
|
+
return [2 /*return*/, Promise.reject({ message: validationError })];
|
|
233
|
+
}
|
|
234
|
+
statusPromise = this.obtainFinalStatus(retrieveFileRequest.translationId);
|
|
235
|
+
return [2 /*return*/, this.handleStatusResponse(retrieveFileRequest.translationId, statusPromise, function (statusResponse) { var _a; return _this.getFileTranslationResponse(retrieveFileRequest, undefined, (_a = statusResponse.profile) === null || _a === void 0 ? void 0 : _a.languagePairId); })];
|
|
236
|
+
});
|
|
237
|
+
});
|
|
238
|
+
};
|
|
239
|
+
EdgeLanguageWeaverClient.prototype.getLanguagePairs = function () {
|
|
240
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
241
|
+
return __generator(this, function (_a) {
|
|
242
|
+
if (this._languagePairsService) {
|
|
243
|
+
return [2 /*return*/, this._languagePairsService.getLanguagePairs()];
|
|
244
|
+
}
|
|
245
|
+
else {
|
|
246
|
+
return [2 /*return*/, Promise.reject({ message: TranslationConstants_1.GENERIC_ERROR + 'getting the language pairs' })];
|
|
247
|
+
}
|
|
248
|
+
return [2 /*return*/];
|
|
249
|
+
});
|
|
216
250
|
});
|
|
217
251
|
};
|
|
252
|
+
EdgeLanguageWeaverClient.prototype.getEdgeLanguagePairs = function () {
|
|
253
|
+
if (this._languagePairsService) {
|
|
254
|
+
return this._languagePairsService.getEdgeLanguagePairs();
|
|
255
|
+
}
|
|
256
|
+
else {
|
|
257
|
+
return Promise.reject({ message: TranslationConstants_1.GENERIC_ERROR + 'getting the language pairs' });
|
|
258
|
+
}
|
|
259
|
+
};
|
|
260
|
+
EdgeLanguageWeaverClient.prototype.getLinguisticOptions = function (getLinguisticOptionsRequest) {
|
|
261
|
+
if (this._linguisticOptionsService) {
|
|
262
|
+
return this._linguisticOptionsService.getLinguisticOptionsForLanguagePair(getLinguisticOptionsRequest || new GetLinguisticOptionsRequest_1.default());
|
|
263
|
+
}
|
|
264
|
+
else {
|
|
265
|
+
return Promise.reject({ message: TranslationConstants_1.GENERIC_ERROR + 'getting the linguistic options' });
|
|
266
|
+
}
|
|
267
|
+
};
|
|
268
|
+
EdgeLanguageWeaverClient.prototype.getEdgeLinguisticOptions = function (getLinguisticOptionsRequest) {
|
|
269
|
+
if (this._linguisticOptionsService) {
|
|
270
|
+
return this._linguisticOptionsService.getEdgeLinguisticOptionsForLanguagePair(getLinguisticOptionsRequest || new EdgeGetLinguisticOptionsRequest_1.default());
|
|
271
|
+
}
|
|
272
|
+
else {
|
|
273
|
+
return Promise.reject({ message: TranslationConstants_1.GENERIC_ERROR + 'getting the linguistic options' });
|
|
274
|
+
}
|
|
275
|
+
};
|
|
218
276
|
EdgeLanguageWeaverClient.prototype.getDictionaries = function (page, perPage) {
|
|
219
|
-
var _a;
|
|
220
277
|
if (perPage === void 0) { perPage = TranslationConstants_1.DEFAULT_DICTIONARIES_PAGE_SIZE; }
|
|
221
278
|
return __awaiter(this, void 0, void 0, function () {
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
case 0:
|
|
226
|
-
_b.trys.push([0, 2, , 3]);
|
|
227
|
-
return [4 /*yield*/, this.getEdgeDictionaries(page, perPage)];
|
|
228
|
-
case 1:
|
|
229
|
-
edgeDictionariesResult_1 = _b.sent();
|
|
230
|
-
dictionaries_1 = [];
|
|
231
|
-
(_a = edgeDictionariesResult_1.dictionaries) === null || _a === void 0 ? void 0 : _a.forEach(function (dictionary) {
|
|
232
|
-
var dictionaryResponse = new DictionaryResponse_1.default();
|
|
233
|
-
dictionaryResponse.id = dictionary.dictionaryId;
|
|
234
|
-
dictionaryResponse.source = dictionary.sourceLanguageId;
|
|
235
|
-
dictionaryResponse.target = dictionary.targetLanguageId;
|
|
236
|
-
dictionaries_1.push(dictionaryResponse);
|
|
237
|
-
});
|
|
238
|
-
return [2 /*return*/, new Promise(function (resolve) {
|
|
239
|
-
var result = new DictionariesResult_1.default();
|
|
240
|
-
result.dictionaries = dictionaries_1;
|
|
241
|
-
result.pageSize = edgeDictionariesResult_1.pageSize;
|
|
242
|
-
result.totalCount = edgeDictionariesResult_1.totalCount;
|
|
243
|
-
result.pageNumber = edgeDictionariesResult_1.pageNumber;
|
|
244
|
-
resolve(result);
|
|
245
|
-
})];
|
|
246
|
-
case 2:
|
|
247
|
-
e_3 = _b.sent();
|
|
248
|
-
return [2 /*return*/, Promise.reject(e_3)];
|
|
249
|
-
case 3: return [2 /*return*/];
|
|
279
|
+
return __generator(this, function (_a) {
|
|
280
|
+
if (this._dictionariesService) {
|
|
281
|
+
return [2 /*return*/, this._dictionariesService.getDictionaries(page, perPage)];
|
|
250
282
|
}
|
|
283
|
+
else {
|
|
284
|
+
return [2 /*return*/, Promise.reject({ message: TranslationConstants_1.GENERIC_ERROR + 'getting the dictionaries' })];
|
|
285
|
+
}
|
|
286
|
+
return [2 /*return*/];
|
|
251
287
|
});
|
|
252
288
|
});
|
|
253
289
|
};
|
|
254
290
|
EdgeLanguageWeaverClient.prototype.getEdgeDictionaries = function (page, perPage) {
|
|
255
291
|
if (perPage === void 0) { perPage = TranslationConstants_1.DEFAULT_DICTIONARIES_PAGE_SIZE; }
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
result.pageSize = response.perPage;
|
|
263
|
-
result.pageNumber = response.page;
|
|
264
|
-
result.totalCount = response.totalItems;
|
|
265
|
-
return Promise.resolve(result);
|
|
266
|
-
})
|
|
267
|
-
.catch(function (e) {
|
|
268
|
-
return Promise.reject(e);
|
|
269
|
-
});
|
|
292
|
+
if (this._dictionariesService) {
|
|
293
|
+
return this._dictionariesService.getEdgeDictionaries(page, perPage);
|
|
294
|
+
}
|
|
295
|
+
else {
|
|
296
|
+
return Promise.reject({ message: TranslationConstants_1.GENERIC_ERROR + 'getting the dictionaries' });
|
|
297
|
+
}
|
|
270
298
|
};
|
|
271
299
|
EdgeLanguageWeaverClient.prototype.getFeedback = function (pageNumber, pageSize, filterRequest) {
|
|
272
300
|
if (this._feedbackService) {
|
|
@@ -310,26 +338,29 @@ var EdgeLanguageWeaverClient = /** @class */ (function () {
|
|
|
310
338
|
};
|
|
311
339
|
EdgeLanguageWeaverClient.prototype.createEdgeFeedback = function (createEdgeFeedbackRequest) {
|
|
312
340
|
return __awaiter(this, void 0, void 0, function () {
|
|
313
|
-
var edgeLanguagePair, e_5;
|
|
341
|
+
var edgeLanguagePair, result, e_5;
|
|
314
342
|
return __generator(this, function (_a) {
|
|
315
343
|
switch (_a.label) {
|
|
316
344
|
case 0:
|
|
317
|
-
if (!this._feedbackService) return [3 /*break*/,
|
|
345
|
+
if (!this._feedbackService) return [3 /*break*/, 6];
|
|
318
346
|
if (!createEdgeFeedbackRequest.languagePairId) return [3 /*break*/, 1];
|
|
319
347
|
return [2 /*return*/, this._feedbackService.createEdgeFeedback(createEdgeFeedbackRequest)];
|
|
320
348
|
case 1:
|
|
321
|
-
_a.trys.push([1,
|
|
349
|
+
_a.trys.push([1, 4, , 5]);
|
|
322
350
|
return [4 /*yield*/, this.getLanguagePairForGivenData(createEdgeFeedbackRequest.sourceLanguageId, createEdgeFeedbackRequest.targetLanguageId, createEdgeFeedbackRequest.model)];
|
|
323
351
|
case 2:
|
|
324
352
|
edgeLanguagePair = _a.sent();
|
|
325
353
|
createEdgeFeedbackRequest.languagePairId = edgeLanguagePair.languagePairId;
|
|
326
|
-
return [
|
|
354
|
+
return [4 /*yield*/, this._feedbackService.createEdgeFeedback(createEdgeFeedbackRequest)];
|
|
327
355
|
case 3:
|
|
356
|
+
result = _a.sent();
|
|
357
|
+
return [2 /*return*/, Promise.resolve(result)];
|
|
358
|
+
case 4:
|
|
328
359
|
e_5 = _a.sent();
|
|
329
360
|
return [2 /*return*/, Promise.reject(e_5)];
|
|
330
|
-
case
|
|
331
|
-
case
|
|
332
|
-
case
|
|
361
|
+
case 5: return [3 /*break*/, 7];
|
|
362
|
+
case 6: return [2 /*return*/, Promise.reject({ message: TranslationConstants_1.GENERIC_ERROR + 'creating the feedback' })];
|
|
363
|
+
case 7: return [2 /*return*/];
|
|
333
364
|
}
|
|
334
365
|
});
|
|
335
366
|
});
|
|
@@ -382,8 +413,23 @@ var EdgeLanguageWeaverClient = /** @class */ (function () {
|
|
|
382
413
|
return Promise.reject({ message: TranslationConstants_1.GENERIC_ERROR + 'deleting the feedback' });
|
|
383
414
|
}
|
|
384
415
|
};
|
|
385
|
-
EdgeLanguageWeaverClient.prototype.
|
|
386
|
-
|
|
416
|
+
EdgeLanguageWeaverClient.prototype.getContentInsightsForTranslations = function (contentInsightsRequest) {
|
|
417
|
+
var _a;
|
|
418
|
+
if (this._contentInsightsService) {
|
|
419
|
+
return (_a = this._contentInsightsService) === null || _a === void 0 ? void 0 : _a.getContentInsightsResultForTranslation(contentInsightsRequest);
|
|
420
|
+
}
|
|
421
|
+
else {
|
|
422
|
+
return Promise.reject({ message: TranslationConstants_1.GENERIC_ERROR + 'requesting content insights for translation' });
|
|
423
|
+
}
|
|
424
|
+
};
|
|
425
|
+
EdgeLanguageWeaverClient.prototype.getEdgeContentInsightsResultForTranslation = function (contentInsightsRequest) {
|
|
426
|
+
var _a;
|
|
427
|
+
if (this._contentInsightsService) {
|
|
428
|
+
return (_a = this._contentInsightsService) === null || _a === void 0 ? void 0 : _a.getEdgeContentInsightsResultForTranslation(contentInsightsRequest);
|
|
429
|
+
}
|
|
430
|
+
else {
|
|
431
|
+
return Promise.reject({ message: TranslationConstants_1.GENERIC_ERROR + 'requesting content insights for translation' });
|
|
432
|
+
}
|
|
387
433
|
};
|
|
388
434
|
EdgeLanguageWeaverClient.prototype.translate = function (request) {
|
|
389
435
|
if (request.input && request.input.length > 1) {
|
|
@@ -419,14 +465,14 @@ var EdgeLanguageWeaverClient = /** @class */ (function () {
|
|
|
419
465
|
switch (_a.label) {
|
|
420
466
|
case 0:
|
|
421
467
|
if (!translateFileRequest.languagePairId) {
|
|
422
|
-
return [2 /*return*/, new Promise(function (resolve, reject) { return reject({ message: TranslationConstants_1.
|
|
468
|
+
return [2 /*return*/, new Promise(function (resolve, reject) { return reject({ message: TranslationConstants_1.MISSING_REQUIRED_LANGUAGE_PAIR_ID_ERROR }); })];
|
|
423
469
|
}
|
|
424
470
|
validationError = (0, TranslateFileUtil_1.validateInputDataForFileTranslation)(translateFileRequest);
|
|
425
471
|
if (validationError) {
|
|
426
472
|
return [2 /*return*/, Promise.reject({ message: validationError })];
|
|
427
473
|
}
|
|
428
474
|
fileSize = translateFileRequest.input ? Utils_1.default.getFileSize(translateFileRequest.input) : 0;
|
|
429
|
-
return [4 /*yield*/, this.
|
|
475
|
+
return [4 /*yield*/, this.getEdgeTranslateRequest(translateFileRequest)];
|
|
430
476
|
case 1:
|
|
431
477
|
request = _a.sent();
|
|
432
478
|
formData = createBodyForTranslationTextRequest(request);
|
|
@@ -436,7 +482,7 @@ var EdgeLanguageWeaverClient = /** @class */ (function () {
|
|
|
436
482
|
var statusPromise = _this.obtainFinalStatus(translationResponse.translationId, fileSize);
|
|
437
483
|
return _this.handleStatusResponse(translationResponse.translationId, statusPromise, function (statusResponse) {
|
|
438
484
|
var _a;
|
|
439
|
-
return _this.getFileTranslationResponse(
|
|
485
|
+
return _this.getFileTranslationResponse(translateFileRequest, translationResponse.translationId, (_a = statusResponse.profile) === null || _a === void 0 ? void 0 : _a.languagePairId);
|
|
440
486
|
});
|
|
441
487
|
})
|
|
442
488
|
.catch(function (error) { return Promise.reject(error); })];
|
|
@@ -460,7 +506,7 @@ var EdgeLanguageWeaverClient = /** @class */ (function () {
|
|
|
460
506
|
}
|
|
461
507
|
}
|
|
462
508
|
else {
|
|
463
|
-
return Promise.reject(EdgeTranslationException_1.default.getTranslationException(statusResponse.substate, translationId, TranslationConstants_1.
|
|
509
|
+
return Promise.reject(EdgeTranslationException_1.default.getTranslationException(statusResponse.substate, translationId, TranslationConstants_1.TRANSLATION_TIMEOUT_ERROR_MESSAGE));
|
|
464
510
|
}
|
|
465
511
|
})
|
|
466
512
|
.catch(function (error) { return Promise.reject(error); });
|
|
@@ -473,7 +519,7 @@ var EdgeLanguageWeaverClient = /** @class */ (function () {
|
|
|
473
519
|
switch (_a.label) {
|
|
474
520
|
case 0:
|
|
475
521
|
if (!translateBatchFileRequest.languagePairId) {
|
|
476
|
-
return [2 /*return*/, new Promise(function (resolve, reject) { return reject({ message: TranslationConstants_1.
|
|
522
|
+
return [2 /*return*/, new Promise(function (resolve, reject) { return reject({ message: TranslationConstants_1.MISSING_REQUIRED_LANGUAGE_PAIR_ID_ERROR }); })];
|
|
477
523
|
}
|
|
478
524
|
return [4 /*yield*/, (0, TranslateFileUtil_1.validateInputDataForBatchFileTranslation)(translateBatchFileRequest)];
|
|
479
525
|
case 1:
|
|
@@ -517,6 +563,7 @@ var EdgeLanguageWeaverClient = /** @class */ (function () {
|
|
|
517
563
|
request.outputDir = translateBatchFileRequest.outputDir;
|
|
518
564
|
}
|
|
519
565
|
request.pdfConverter = translateBatchFileRequest.pdfConverter;
|
|
566
|
+
request.linguisticOptions = translateBatchFileRequest.linguisticOptions;
|
|
520
567
|
return this.requestTranslateFile(request);
|
|
521
568
|
};
|
|
522
569
|
EdgeLanguageWeaverClient.prototype.translateSyncText = function (translateTextRequest) {
|
|
@@ -524,7 +571,7 @@ var EdgeLanguageWeaverClient = /** @class */ (function () {
|
|
|
524
571
|
if (error) {
|
|
525
572
|
return new Promise(function (resolve, reject) { return reject(error); });
|
|
526
573
|
}
|
|
527
|
-
var formData = createBodyForTranslationTextRequest(translateTextRequest.
|
|
574
|
+
var formData = createBodyForTranslationTextRequest(translateTextRequest.toEdgeTranslateRequest());
|
|
528
575
|
return this._client.requestMultipart(this._token, 'POST', TranslationConstants_1.EDGE_QUICK_TRANSLATION_PATH, formData);
|
|
529
576
|
};
|
|
530
577
|
EdgeLanguageWeaverClient.prototype.translateAsyncText = function (translateTextRequest) {
|
|
@@ -533,7 +580,7 @@ var EdgeLanguageWeaverClient = /** @class */ (function () {
|
|
|
533
580
|
if (error) {
|
|
534
581
|
return new Promise(function (resolve, reject) { return reject(error); });
|
|
535
582
|
}
|
|
536
|
-
var formData = createBodyForTranslationTextRequest(translateTextRequest.
|
|
583
|
+
var formData = createBodyForTranslationTextRequest(translateTextRequest.toEdgeTranslateRequest());
|
|
537
584
|
var translationPromise = this._client.requestMultipart(this._token, 'POST', TranslationConstants_1.EDGE_ASYNC_TRANSLATION_PATH, formData);
|
|
538
585
|
return translationPromise
|
|
539
586
|
.then(function (translationResponse) {
|
|
@@ -556,10 +603,11 @@ var EdgeLanguageWeaverClient = /** @class */ (function () {
|
|
|
556
603
|
.catch(function (error) { return reject(error); });
|
|
557
604
|
});
|
|
558
605
|
};
|
|
559
|
-
EdgeLanguageWeaverClient.prototype.getFileTranslationResponse = function (
|
|
606
|
+
EdgeLanguageWeaverClient.prototype.getFileTranslationResponse = function (request, requestId, languagePairId) {
|
|
560
607
|
var _this = this;
|
|
561
608
|
return new Promise(function (resolve, reject) {
|
|
562
|
-
|
|
609
|
+
var edgeRequestId = request instanceof EdgeRetrieveFileRequest_1.default ? request.translationId : requestId;
|
|
610
|
+
_this.retrieveTranslation(edgeRequestId)
|
|
563
611
|
.then(function (contentResponse) { return __awaiter(_this, void 0, void 0, function () {
|
|
564
612
|
var edgeTranslationFileResult, fs;
|
|
565
613
|
return __generator(this, function (_a) {
|
|
@@ -567,20 +615,19 @@ var EdgeLanguageWeaverClient = /** @class */ (function () {
|
|
|
567
615
|
case 0:
|
|
568
616
|
edgeTranslationFileResult = new EdgeTranslationFileResult_1.default();
|
|
569
617
|
edgeTranslationFileResult.languagePairId = languagePairId;
|
|
570
|
-
edgeTranslationFileResult.
|
|
618
|
+
edgeTranslationFileResult.translationId = edgeRequestId;
|
|
571
619
|
edgeTranslationFileResult.fileContent = contentResponse.data;
|
|
572
620
|
if (Utils_1.default.isBrowser()) {
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
}
|
|
621
|
+
edgeTranslationFileResult.filename =
|
|
622
|
+
request.outputFile || (0, TranslateFileUtil_1.getFileNameFromHeaders)(contentResponse, request);
|
|
623
|
+
edgeTranslationFileResult.mimeType =
|
|
624
|
+
request.outputFormat ||
|
|
625
|
+
FormatToMimeType_1.formatToMimeType[Utils_1.default.getFormatForFile(edgeTranslationFileResult.filename)];
|
|
626
|
+
edgeTranslationFileResult.fileContent = Utils_1.default.decodeStringFromBase64ToBlob(contentResponse.data);
|
|
580
627
|
}
|
|
581
|
-
if (!(
|
|
628
|
+
if (!(request.outputDir && !Utils_1.default.isBrowser())) return [3 /*break*/, 2];
|
|
582
629
|
fs = require('fs');
|
|
583
|
-
return [4 /*yield*/, fs.promises.writeFile(Utils_1.default.getFullPath(
|
|
630
|
+
return [4 /*yield*/, fs.promises.writeFile(Utils_1.default.getFullPath(request.outputDir, request.outputFile || (0, TranslateFileUtil_1.getFileNameFromHeaders)(contentResponse, request)), contentResponse.data, { encoding: 'base64' }, function (error) { return reject(error); })];
|
|
584
631
|
case 1:
|
|
585
632
|
_a.sent();
|
|
586
633
|
_a.label = 2;
|
|
@@ -601,7 +648,9 @@ var EdgeLanguageWeaverClient = /** @class */ (function () {
|
|
|
601
648
|
EdgeLanguageWeaverClient.prototype.obtainFinalStatus = function (requestId, fileSize) {
|
|
602
649
|
var self = this;
|
|
603
650
|
return new Promise(function (resolve, reject) {
|
|
604
|
-
var delay = fileSize
|
|
651
|
+
var delay = fileSize !== undefined && fileSize < 500
|
|
652
|
+
? TranslationConstants_1.SMALL_INPUT_GET_TRANSLATION_STATUS_DELAY
|
|
653
|
+
: TranslationConstants_1.LARGE_INPUT_GET_TRANSLATION_STATUS_DELAY;
|
|
605
654
|
var startTime = new Date().getTime();
|
|
606
655
|
getStatus();
|
|
607
656
|
function getStatus() {
|
|
@@ -622,7 +671,7 @@ var EdgeLanguageWeaverClient = /** @class */ (function () {
|
|
|
622
671
|
}
|
|
623
672
|
});
|
|
624
673
|
};
|
|
625
|
-
EdgeLanguageWeaverClient.prototype.
|
|
674
|
+
EdgeLanguageWeaverClient.prototype.getEdgeTranslateRequest = function (translateFileRequest) {
|
|
626
675
|
return __awaiter(this, void 0, void 0, function () {
|
|
627
676
|
var encodedFile, request;
|
|
628
677
|
return __generator(this, function (_a) {
|
|
@@ -630,7 +679,7 @@ var EdgeLanguageWeaverClient = /** @class */ (function () {
|
|
|
630
679
|
case 0: return [4 /*yield*/, Utils_1.default.getEncodedFile(translateFileRequest.input)];
|
|
631
680
|
case 1:
|
|
632
681
|
encodedFile = _a.sent();
|
|
633
|
-
request = translateFileRequest.
|
|
682
|
+
request = translateFileRequest.toEdgeTranslateRequest();
|
|
634
683
|
request.inputFormat =
|
|
635
684
|
translateFileRequest.inputFormat || Utils_1.default.getFormatForFile(translateFileRequest.input || '');
|
|
636
685
|
request.addInput(encodedFile);
|
|
@@ -647,6 +696,28 @@ var EdgeLanguageWeaverClient = /** @class */ (function () {
|
|
|
647
696
|
this._clientConfiguration.credentialsConfiguration &&
|
|
648
697
|
this._clientConfiguration.credentialsConfiguration.clientId);
|
|
649
698
|
};
|
|
699
|
+
EdgeLanguageWeaverClient.prototype.handleCredentialsConfiguration = function () {
|
|
700
|
+
var _a, _b;
|
|
701
|
+
if (this.hasCredentialsConfiguration()) {
|
|
702
|
+
var encoding = Utils_1.default.encodeStringToBase64(((_b = (_a = this._clientConfiguration) === null || _a === void 0 ? void 0 : _a.credentialsConfiguration) === null || _b === void 0 ? void 0 : _b.clientId) + ':');
|
|
703
|
+
this._token = new Token_1.default(encoding, undefined, 'Basic');
|
|
704
|
+
}
|
|
705
|
+
else {
|
|
706
|
+
var clientId = Utils_1.default.getClientIdEnvVar();
|
|
707
|
+
if (clientId) {
|
|
708
|
+
var credentialsConfiguration = new CredentialsConfiguration_1.default();
|
|
709
|
+
credentialsConfiguration.clientId = clientId;
|
|
710
|
+
var clientConfiguration = new ClientConfiguration_1.default();
|
|
711
|
+
clientConfiguration.credentialsConfiguration = credentialsConfiguration;
|
|
712
|
+
this._clientConfiguration = clientConfiguration;
|
|
713
|
+
var encoding = Utils_1.default.encodeStringToBase64(clientId + ':');
|
|
714
|
+
this._token = new Token_1.default(encoding, undefined, 'Basic');
|
|
715
|
+
}
|
|
716
|
+
else {
|
|
717
|
+
return Promise.reject({ message: 'ClientId is required for credentials configuration' });
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
};
|
|
650
721
|
EdgeLanguageWeaverClient.prototype.setUrl = function () {
|
|
651
722
|
if (this._overwriteUrl) {
|
|
652
723
|
this._url = this._overwriteUrl;
|
|
@@ -660,16 +731,12 @@ var EdgeLanguageWeaverClient = /** @class */ (function () {
|
|
|
660
731
|
this._client.baseUrl = this._url;
|
|
661
732
|
};
|
|
662
733
|
EdgeLanguageWeaverClient.prototype.getLanguagePairForGivenData = function (source, target, model) {
|
|
663
|
-
if (
|
|
664
|
-
return
|
|
734
|
+
if (this._languagePairsService) {
|
|
735
|
+
return this._languagePairsService.getLanguagePairForGivenData(source, target, model);
|
|
736
|
+
}
|
|
737
|
+
else {
|
|
738
|
+
return Promise.reject({ message: TranslationConstants_1.GENERIC_ERROR + 'getting the language pairs' });
|
|
665
739
|
}
|
|
666
|
-
return this.getEdgeLanguagePairsPromise().then(function (lps) {
|
|
667
|
-
var languagePair = lps.languagePairs.find(function (lp) { return lp.sourceLanguageId === source && lp.targetLanguageId === target && lp.domain === model; });
|
|
668
|
-
if (!languagePair) {
|
|
669
|
-
return Promise.reject({ message: TranslationConstants_1.LANGUAGE_PAIR_NOT_FOUND_ERROR });
|
|
670
|
-
}
|
|
671
|
-
return Promise.resolve(languagePair);
|
|
672
|
-
});
|
|
673
740
|
};
|
|
674
741
|
return EdgeLanguageWeaverClient;
|
|
675
742
|
}());
|
|
@@ -703,6 +770,11 @@ function createBodyForTranslationTextRequest(translateTextRequest) {
|
|
|
703
770
|
if (translateTextRequest.pdfConverter) {
|
|
704
771
|
formData.append(TranslationConstants_1.PDF_CONVERTER, PdfConverter_1.PdfConverterEdge[translateTextRequest.pdfConverter]);
|
|
705
772
|
}
|
|
773
|
+
if (translateTextRequest.linguisticOptions) {
|
|
774
|
+
translateTextRequest.linguisticOptions.forEach(function (value, key) {
|
|
775
|
+
formData.append(TranslationConstants_1.LINGUISTIC_OPTIONS, key + ':' + value);
|
|
776
|
+
});
|
|
777
|
+
}
|
|
706
778
|
return formData;
|
|
707
779
|
}
|
|
708
780
|
//# sourceMappingURL=EdgeLanguageWeaverClient.js.map
|