@language-weaver/lw-sdk-js 1.1.0 → 2.0.0
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/constants/ApprovalStatus.d.ts +1 -1
- package/lib/common/constants/ApprovalStatus.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/Format.d.ts +1 -1
- package/lib/common/constants/Format.js +4 -1
- package/lib/common/constants/Format.js.map +1 -1
- package/lib/common/constants/FormatToMimeType.js +2 -0
- package/lib/common/constants/FormatToMimeType.js.map +1 -1
- package/lib/common/constants/PdfConverter.d.ts +15 -0
- package/lib/common/constants/PdfConverter.js +22 -0
- package/lib/common/constants/PdfConverter.js.map +1 -0
- package/lib/common/constants/QualityEstimation.d.ts +6 -0
- package/lib/common/constants/QualityEstimation.js +17 -0
- package/lib/common/constants/QualityEstimation.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 +20 -3
- package/lib/common/constants/TranslationConstants.js +25 -5
- 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.d.ts +1 -1
- package/lib/common/external/communication/RestClient.js +14 -16
- package/lib/common/external/communication/RestClient.js.map +1 -1
- package/lib/common/utils/HttpUtils.d.ts +1 -0
- package/lib/common/utils/HttpUtils.js +13 -0
- package/lib/common/utils/HttpUtils.js.map +1 -1
- package/lib/common/utils/Utils.d.ts +7 -0
- package/lib/common/utils/Utils.js +127 -0
- package/lib/common/utils/Utils.js.map +1 -1
- package/lib/index.d.ts +62 -19
- package/lib/index.js +104 -20
- package/lib/index.js.map +1 -1
- package/lib/translation/common/LanguageWeaverClient.d.ts +19 -2
- package/lib/translation/common/cloud/CloudLanguageWeaverClient.d.ts +45 -4
- package/lib/translation/common/cloud/CloudLanguageWeaverClient.js +239 -100
- package/lib/translation/common/cloud/CloudLanguageWeaverClient.js.map +1 -1
- package/lib/translation/common/edge/EdgeLanguageWeaverClient.d.ts +43 -6
- package/lib/translation/common/edge/EdgeLanguageWeaverClient.js +287 -150
- 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.d.ts +4 -3
- package/lib/translation/feedback/cloud/api/CloudFeedbackApiModel.js +28 -23
- package/lib/translation/feedback/cloud/api/CloudFeedbackApiModel.js.map +1 -1
- package/lib/translation/feedback/cloud/api/CloudFeedbackApprovalListUpdateRequest.d.ts +7 -0
- package/lib/translation/feedback/cloud/api/CloudFeedbackApprovalListUpdateRequest.js +24 -0
- package/lib/translation/feedback/cloud/api/CloudFeedbackApprovalListUpdateRequest.js.map +1 -0
- package/lib/translation/feedback/cloud/api/CloudFeedbackApprovalUpdateRequest.d.ts +9 -0
- package/lib/translation/feedback/cloud/api/CloudFeedbackApprovalUpdateRequest.js +31 -0
- package/lib/translation/feedback/cloud/api/CloudFeedbackApprovalUpdateRequest.js.map +1 -0
- package/lib/translation/feedback/cloud/api/CloudFeedbackImprovement.d.ts +1 -1
- package/lib/translation/feedback/cloud/api/CloudFeedbackImprovement.js.map +1 -1
- package/lib/translation/feedback/cloud/api/CloudFeedbackRating.js +6 -1
- package/lib/translation/feedback/cloud/api/CloudFeedbackRating.js.map +1 -1
- package/lib/translation/feedback/cloud/api/CloudFilterFeedbackApiRequest.js +4 -4
- package/lib/translation/feedback/cloud/api/CloudFilterFeedbackApiRequest.js.map +1 -1
- package/lib/translation/feedback/cloud/api/CloudTranslationFeedback.d.ts +3 -0
- package/lib/translation/feedback/cloud/api/CloudTranslationFeedback.js +10 -0
- package/lib/translation/feedback/cloud/api/CloudTranslationFeedback.js.map +1 -1
- package/lib/translation/feedback/cloud/request/CloudCreateFeedbackRequest.d.ts +21 -0
- package/lib/translation/feedback/cloud/request/CloudCreateFeedbackRequest.js +104 -0
- package/lib/translation/feedback/cloud/request/CloudCreateFeedbackRequest.js.map +1 -0
- package/lib/translation/feedback/cloud/request/CloudDeleteFeedbackRequest.d.ts +3 -0
- package/lib/translation/feedback/cloud/request/CloudDeleteFeedbackRequest.js +30 -0
- package/lib/translation/feedback/cloud/request/CloudDeleteFeedbackRequest.js.map +1 -0
- package/lib/translation/feedback/cloud/request/CloudFeedbackSortRequest.d.ts +1 -1
- package/lib/translation/feedback/cloud/request/CloudUpdateFeedbackApprovalRequest.d.ts +3 -0
- package/lib/translation/feedback/cloud/request/CloudUpdateFeedbackApprovalRequest.js +30 -0
- package/lib/translation/feedback/cloud/request/CloudUpdateFeedbackApprovalRequest.js.map +1 -0
- package/lib/translation/feedback/cloud/request/CloudUpdateFeedbackRequest.d.ts +15 -0
- package/lib/translation/feedback/cloud/request/CloudUpdateFeedbackRequest.js +77 -0
- package/lib/translation/feedback/cloud/request/CloudUpdateFeedbackRequest.js.map +1 -0
- 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 +7 -3
- package/lib/translation/feedback/cloud/result/CloudFeedbackResult.js +10 -0
- package/lib/translation/feedback/cloud/result/CloudFeedbackResult.js.map +1 -1
- package/lib/translation/feedback/cloud/service/CloudFeedbackService.d.ts +21 -0
- package/lib/translation/feedback/cloud/service/CloudFeedbackService.js +111 -1
- package/lib/translation/feedback/cloud/service/CloudFeedbackService.js.map +1 -1
- package/lib/translation/feedback/cloud/validator/CloudFeedbackValidator.d.ts +9 -0
- package/lib/translation/feedback/cloud/{validators → validator}/CloudFeedbackValidator.js +20 -1
- package/lib/translation/feedback/cloud/validator/CloudFeedbackValidator.js.map +1 -0
- package/lib/translation/feedback/common/request/CreateFeedbackRequest.d.ts +29 -0
- package/lib/translation/feedback/common/request/CreateFeedbackRequest.js +123 -0
- package/lib/translation/feedback/common/request/CreateFeedbackRequest.js.map +1 -0
- package/lib/translation/feedback/common/request/DeleteFeedbackRequest.d.ts +5 -0
- package/lib/translation/feedback/common/request/DeleteFeedbackRequest.js +19 -0
- package/lib/translation/feedback/common/request/DeleteFeedbackRequest.js.map +1 -0
- package/lib/translation/feedback/common/request/FilterFeedbackRequest.d.ts +4 -4
- package/lib/translation/feedback/common/request/FilterFeedbackRequest.js.map +1 -1
- package/lib/translation/feedback/common/request/UpdateFeedbackApprovalRequest.d.ts +9 -0
- package/lib/translation/feedback/common/request/UpdateFeedbackApprovalRequest.js +29 -0
- package/lib/translation/feedback/common/request/UpdateFeedbackApprovalRequest.js.map +1 -0
- package/lib/translation/feedback/common/request/UpdateFeedbackRequest.d.ts +19 -0
- package/lib/translation/feedback/common/request/UpdateFeedbackRequest.js +80 -0
- package/lib/translation/feedback/common/request/UpdateFeedbackRequest.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 +3 -1
- package/lib/translation/feedback/common/result/FeedbackResult.js +8 -0
- package/lib/translation/feedback/common/result/FeedbackResult.js.map +1 -1
- package/lib/translation/feedback/common/validator/FeedbackValidator.d.ts +10 -0
- package/lib/translation/feedback/common/validator/FeedbackValidator.js +38 -0
- package/lib/translation/feedback/common/validator/FeedbackValidator.js.map +1 -0
- package/lib/translation/feedback/edge/api/EdgeFeedbackApiModel.d.ts +3 -2
- package/lib/translation/feedback/edge/api/EdgeFeedbackApiModel.js +43 -15
- package/lib/translation/feedback/edge/api/EdgeFeedbackApiModel.js.map +1 -1
- package/lib/translation/feedback/edge/request/EdgeCreateFeedbackRequest.d.ts +12 -0
- package/lib/translation/feedback/edge/request/EdgeCreateFeedbackRequest.js +63 -0
- package/lib/translation/feedback/edge/request/EdgeCreateFeedbackRequest.js.map +1 -0
- package/lib/translation/feedback/edge/request/EdgeDeleteFeedbackRequest.d.ts +3 -0
- package/lib/translation/feedback/edge/request/EdgeDeleteFeedbackRequest.js +30 -0
- package/lib/translation/feedback/edge/request/EdgeDeleteFeedbackRequest.js.map +1 -0
- package/lib/translation/feedback/edge/request/EdgeUpdateFeedbackApprovalRequest.d.ts +3 -0
- package/lib/translation/feedback/edge/request/EdgeUpdateFeedbackApprovalRequest.js +30 -0
- package/lib/translation/feedback/edge/request/EdgeUpdateFeedbackApprovalRequest.js.map +1 -0
- package/lib/translation/feedback/edge/request/EdgeUpdateFeedbackRequest.d.ts +9 -0
- package/lib/translation/feedback/edge/request/EdgeUpdateFeedbackRequest.js +50 -0
- package/lib/translation/feedback/edge/request/EdgeUpdateFeedbackRequest.js.map +1 -0
- package/lib/translation/feedback/edge/service/EdgeFeedbackService.d.ts +22 -0
- package/lib/translation/feedback/edge/service/EdgeFeedbackService.js +100 -3
- 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 +7 -0
- package/lib/translation/translate/common/request/TranslateBatchFileRequest.js +20 -7
- package/lib/translation/translate/common/request/TranslateBatchFileRequest.js.map +1 -1
- package/lib/translation/translate/common/request/TranslateFileRequest.d.ts +4 -0
- package/lib/translation/translate/common/request/TranslateFileRequest.js +10 -0
- package/lib/translation/translate/common/request/TranslateFileRequest.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/request/TranslateTextRequest.d.ts +3 -1
- package/lib/translation/translate/common/request/TranslateTextRequest.js +9 -1
- package/lib/translation/translate/common/request/TranslateTextRequest.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 -0
- package/lib/translation/translate/edge/request/EdgeTranslateFileRequest.js +16 -0
- package/lib/translation/translate/edge/request/EdgeTranslateFileRequest.js.map +1 -1
- package/lib/translation/translate/edge/request/EdgeTranslateRequest.d.ts +29 -0
- package/lib/translation/translate/edge/request/EdgeTranslateRequest.js +109 -0
- package/lib/translation/translate/edge/request/EdgeTranslateRequest.js.map +1 -0
- package/lib/translation/translate/edge/request/EdgeTranslateTextRequest.d.ts +2 -0
- package/lib/translation/translate/edge/request/EdgeTranslateTextRequest.js +16 -0
- 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.d.ts +0 -5
- 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.d.ts +0 -2
- package/lib/translation/feedback/common/validators/FeedbackValidator.js +0 -9
- 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/result/EdgeDictionariesResult.js.map +0 -1
- package/lib/translation/translate/edge/result/EdgeLanguagePairsResult.js.map +0 -1
|
@@ -3,5 +3,5 @@ export declare enum ApprovalStatus {
|
|
|
3
3
|
PENDING = "awaitingApproval",
|
|
4
4
|
REJECTED = "rejected"
|
|
5
5
|
}
|
|
6
|
-
export declare const getApprovalStatusKeyByValue: (value: string) => string;
|
|
6
|
+
export declare const getApprovalStatusKeyByValue: (value: string | ApprovalStatus) => string;
|
|
7
7
|
export declare const getApprovalStatusByKey: (key: string) => ApprovalStatus;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApprovalStatus.js","sourceRoot":"","sources":["../../../src/common/constants/ApprovalStatus.ts"],"names":[],"mappings":";;;AAAA,IAAY,cAIX;AAJD,WAAY,cAAc;IACtB,uCAAqB,CAAA;IACrB,8CAA4B,CAAA;IAC5B,uCAAqB,CAAA;AACzB,CAAC,EAJW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAIzB;AAEM,IAAM,2BAA2B,GAAG,UAAC,
|
|
1
|
+
{"version":3,"file":"ApprovalStatus.js","sourceRoot":"","sources":["../../../src/common/constants/ApprovalStatus.ts"],"names":[],"mappings":";;;AAAA,IAAY,cAIX;AAJD,WAAY,cAAc;IACtB,uCAAqB,CAAA;IACrB,8CAA4B,CAAA;IAC5B,uCAAqB,CAAA;AACzB,CAAC,EAJW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAIzB;AAEM,IAAM,2BAA2B,GAAG,UAAC,KAA8B;IACtE,IAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC,KAAuB,CAAC,CAAC;IAC7E,IAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,KAAK,CAAC,CAAC;IAE/C,OAAO,GAAG,CAAC;AACf,CAAC,CAAC;AALW,QAAA,2BAA2B,+BAKtC;AAEK,IAAM,sBAAsB,GAAG,UAAC,GAAW;IAC9C,OAAO,cAAc,CAAC,GAAkC,CAAC,CAAC;AAC9D,CAAC,CAAC;AAFW,QAAA,sBAAsB,0BAEjC"}
|
package/lib/{translation/feedback/cloud/model → common/constants}/CloudFeedbackSortCriteria.d.ts
RENAMED
|
File without changes
|
package/lib/{translation/feedback/cloud/model → common/constants}/CloudFeedbackSortCriteria.js
RENAMED
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CloudFeedbackSortCriteria.js","sourceRoot":"","sources":["../../../src/common/constants/CloudFeedbackSortCriteria.ts"],"names":[],"mappings":";;;AAAA,IAAY,yBAGX;AAHD,WAAY,yBAAyB;IACjC,0CAAa,CAAA;IACb,iDAAoB,CAAA;AACxB,CAAC,EAHW,yBAAyB,GAAzB,iCAAyB,KAAzB,iCAAyB,QAGpC"}
|
|
@@ -46,7 +46,10 @@ var getFormatKeyByValue = function (value) {
|
|
|
46
46
|
};
|
|
47
47
|
exports.getFormatKeyByValue = getFormatKeyByValue;
|
|
48
48
|
var getFormatByKey = function (key) {
|
|
49
|
-
|
|
49
|
+
if (key) {
|
|
50
|
+
return Format[key] || Format.UNK;
|
|
51
|
+
}
|
|
52
|
+
return Format.UNK;
|
|
50
53
|
};
|
|
51
54
|
exports.getFormatByKey = getFormatByKey;
|
|
52
55
|
//# sourceMappingURL=Format.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Format.js","sourceRoot":"","sources":["../../../src/common/constants/Format.ts"],"names":[],"mappings":";;;AAAA,IAAY,MAoCX;AApCD,WAAY,MAAM;IACd,qBAAW,CAAA;IACX,uBAAa,CAAA;IACb,uBAAa,CAAA;IACb,qBAAW,CAAA;IACX,uBAAa,CAAA;IACb,qBAAW,CAAA;IACX,yBAAe,CAAA;IACf,qBAAW,CAAA;IACX,qBAAW,CAAA;IACX,yBAAe,CAAA;IACf,qBAAW,CAAA;IACX,qBAAW,CAAA;IACX,qBAAW,CAAA;IACX,qBAAW,CAAA;IACX,qBAAW,CAAA;IACX,qBAAW,CAAA;IACX,qBAAW,CAAA;IACX,uBAAa,CAAA;IACb,qBAAW,CAAA;IACX,qBAAW,CAAA;IACX,qBAAW,CAAA;IACX,yBAAe,CAAA;IACf,uBAAa,CAAA;IACb,uBAAa,CAAA;IACb,uBAAa,CAAA;IACb,qBAAW,CAAA;IACX,uBAAa,CAAA;IACb,qBAAW,CAAA;IACX,qBAAW,CAAA;IACX,qBAAW,CAAA;IACX,yBAAe,CAAA;IACf,+BAAqB,CAAA;IACrB,2BAAiB,CAAA;IACjB,qBAAW,CAAA;IACX,qBAAW,CAAA;AACf,CAAC,EApCW,MAAM,GAAN,cAAM,KAAN,cAAM,QAoCjB;AAEM,IAAM,mBAAmB,GAAG,UAAC,KAAa;IAC7C,IAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,KAAe,CAAC,CAAC;IAC7D,IAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC;IAEvC,OAAO,GAAG,CAAC;AACf,CAAC,CAAC;AALW,QAAA,mBAAmB,uBAK9B;AAEK,IAAM,cAAc,GAAG,UAAC,
|
|
1
|
+
{"version":3,"file":"Format.js","sourceRoot":"","sources":["../../../src/common/constants/Format.ts"],"names":[],"mappings":";;;AAAA,IAAY,MAoCX;AApCD,WAAY,MAAM;IACd,qBAAW,CAAA;IACX,uBAAa,CAAA;IACb,uBAAa,CAAA;IACb,qBAAW,CAAA;IACX,uBAAa,CAAA;IACb,qBAAW,CAAA;IACX,yBAAe,CAAA;IACf,qBAAW,CAAA;IACX,qBAAW,CAAA;IACX,yBAAe,CAAA;IACf,qBAAW,CAAA;IACX,qBAAW,CAAA;IACX,qBAAW,CAAA;IACX,qBAAW,CAAA;IACX,qBAAW,CAAA;IACX,qBAAW,CAAA;IACX,qBAAW,CAAA;IACX,uBAAa,CAAA;IACb,qBAAW,CAAA;IACX,qBAAW,CAAA;IACX,qBAAW,CAAA;IACX,yBAAe,CAAA;IACf,uBAAa,CAAA;IACb,uBAAa,CAAA;IACb,uBAAa,CAAA;IACb,qBAAW,CAAA;IACX,uBAAa,CAAA;IACb,qBAAW,CAAA;IACX,qBAAW,CAAA;IACX,qBAAW,CAAA;IACX,yBAAe,CAAA;IACf,+BAAqB,CAAA;IACrB,2BAAiB,CAAA;IACjB,qBAAW,CAAA;IACX,qBAAW,CAAA;AACf,CAAC,EApCW,MAAM,GAAN,cAAM,KAAN,cAAM,QAoCjB;AAEM,IAAM,mBAAmB,GAAG,UAAC,KAAa;IAC7C,IAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,KAAe,CAAC,CAAC;IAC7D,IAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC;IAEvC,OAAO,GAAG,CAAC;AACf,CAAC,CAAC;AALW,QAAA,mBAAmB,uBAK9B;AAEK,IAAM,cAAc,GAAG,UAAC,GAAuB;IAClD,IAAI,GAAG,EAAE;QACL,OAAO,MAAM,CAAC,GAA0B,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC;KAC3D;IAED,OAAO,MAAM,CAAC,GAAG,CAAC;AACtB,CAAC,CAAC;AANW,QAAA,cAAc,kBAMzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormatToMimeType.js","sourceRoot":"","sources":["../../../src/common/constants/FormatToMimeType.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAA2B;IACpD,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,UAAU;IACf,IAAI,EAAE,WAAW;IACjB,GAAG,EAAE,YAAY;IACjB,KAAK,EAAE,aAAa;IACpB,GAAG,EAAE,YAAY;IACjB,KAAK,EAAE,qBAAqB;IAC5B,GAAG,EAAE,iBAAiB;IACtB,GAAG,EAAE,yCAAyC;IAC9C,GAAG,EAAE,gDAAgD;IACrD,GAAG,EAAE,iDAAiD;IACtD,GAAG,EAAE,iBAAiB;IACtB,GAAG,EAAE,iBAAiB;IACtB,GAAG,EAAE,oBAAoB;IACzB,GAAG,EAAE,0BAA0B;IAC/B,GAAG,EAAE,+BAA+B;IACpC,IAAI,EAAE,yEAAyE;IAC/E,IAAI,EAAE,mEAAmE;IACzE,IAAI,EAAE,2EAA2E;IACjF,GAAG,EAAE,YAAY;IACjB,IAAI,EAAE,YAAY;IAClB,GAAG,EAAE,WAAW;IAChB,GAAG,EAAE,WAAW;IAChB,KAAK,EAAE,YAAY;IACnB,MAAM,EAAE,uBAAuB;
|
|
1
|
+
{"version":3,"file":"FormatToMimeType.js","sourceRoot":"","sources":["../../../src/common/constants/FormatToMimeType.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAA2B;IACpD,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,UAAU;IACf,IAAI,EAAE,WAAW;IACjB,GAAG,EAAE,YAAY;IACjB,KAAK,EAAE,aAAa;IACpB,GAAG,EAAE,YAAY;IACjB,KAAK,EAAE,qBAAqB;IAC5B,GAAG,EAAE,iBAAiB;IACtB,GAAG,EAAE,yCAAyC;IAC9C,GAAG,EAAE,gDAAgD;IACrD,GAAG,EAAE,iDAAiD;IACtD,GAAG,EAAE,iBAAiB;IACtB,GAAG,EAAE,iBAAiB;IACtB,GAAG,EAAE,oBAAoB;IACzB,GAAG,EAAE,0BAA0B;IAC/B,GAAG,EAAE,+BAA+B;IACpC,IAAI,EAAE,yEAAyE;IAC/E,IAAI,EAAE,mEAAmE;IACzE,IAAI,EAAE,2EAA2E;IACjF,GAAG,EAAE,YAAY;IACjB,IAAI,EAAE,YAAY;IAClB,GAAG,EAAE,WAAW;IAChB,GAAG,EAAE,WAAW;IAChB,KAAK,EAAE,YAAY;IACnB,MAAM,EAAE,uBAAuB;IAC/B,GAAG,EAAE,gBAAgB;IACrB,GAAG,EAAE,4BAA4B;CACpC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare enum PdfConverter {
|
|
2
|
+
STANDARD = "STANDARD",
|
|
3
|
+
ABBYY = "ABBYY",
|
|
4
|
+
SMART_SELECTION = "SMART_SELECTION"
|
|
5
|
+
}
|
|
6
|
+
export declare enum PdfConverterCloud {
|
|
7
|
+
STANDARD = "STANDARD",
|
|
8
|
+
ABBYY = "ABBYY",
|
|
9
|
+
SMART_SELECTION = "SMART_SELECTION"
|
|
10
|
+
}
|
|
11
|
+
export declare enum PdfConverterEdge {
|
|
12
|
+
STANDARD = "Standard",
|
|
13
|
+
ABBYY = "Abbyy",
|
|
14
|
+
SMART_SELECTION = ""
|
|
15
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PdfConverterEdge = exports.PdfConverterCloud = exports.PdfConverter = void 0;
|
|
4
|
+
var PdfConverter;
|
|
5
|
+
(function (PdfConverter) {
|
|
6
|
+
PdfConverter["STANDARD"] = "STANDARD";
|
|
7
|
+
PdfConverter["ABBYY"] = "ABBYY";
|
|
8
|
+
PdfConverter["SMART_SELECTION"] = "SMART_SELECTION";
|
|
9
|
+
})(PdfConverter = exports.PdfConverter || (exports.PdfConverter = {}));
|
|
10
|
+
var PdfConverterCloud;
|
|
11
|
+
(function (PdfConverterCloud) {
|
|
12
|
+
PdfConverterCloud["STANDARD"] = "STANDARD";
|
|
13
|
+
PdfConverterCloud["ABBYY"] = "ABBYY";
|
|
14
|
+
PdfConverterCloud["SMART_SELECTION"] = "SMART_SELECTION";
|
|
15
|
+
})(PdfConverterCloud = exports.PdfConverterCloud || (exports.PdfConverterCloud = {}));
|
|
16
|
+
var PdfConverterEdge;
|
|
17
|
+
(function (PdfConverterEdge) {
|
|
18
|
+
PdfConverterEdge["STANDARD"] = "Standard";
|
|
19
|
+
PdfConverterEdge["ABBYY"] = "Abbyy";
|
|
20
|
+
PdfConverterEdge["SMART_SELECTION"] = "";
|
|
21
|
+
})(PdfConverterEdge = exports.PdfConverterEdge || (exports.PdfConverterEdge = {}));
|
|
22
|
+
//# sourceMappingURL=PdfConverter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PdfConverter.js","sourceRoot":"","sources":["../../../src/common/constants/PdfConverter.ts"],"names":[],"mappings":";;;AAAA,IAAY,YAIX;AAJD,WAAY,YAAY;IACpB,qCAAqB,CAAA;IACrB,+BAAe,CAAA;IACf,mDAAmC,CAAA;AACvC,CAAC,EAJW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAIvB;AAED,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IACzB,0CAAqB,CAAA;IACrB,oCAAe,CAAA;IACf,wDAAmC,CAAA;AACvC,CAAC,EAJW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAI5B;AAED,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IACxB,yCAAqB,CAAA;IACrB,mCAAe,CAAA;IACf,wCAAoB,CAAA;AACxB,CAAC,EAJW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAI3B"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getQualityEstimationByKey = exports.QualityEstimation = void 0;
|
|
4
|
+
var QualityEstimation;
|
|
5
|
+
(function (QualityEstimation) {
|
|
6
|
+
QualityEstimation["POOR"] = "POOR";
|
|
7
|
+
QualityEstimation["ADEQUATE"] = "ADEQUATE";
|
|
8
|
+
QualityEstimation["GOOD"] = "GOOD";
|
|
9
|
+
})(QualityEstimation = exports.QualityEstimation || (exports.QualityEstimation = {}));
|
|
10
|
+
var getQualityEstimationByKey = function (key) {
|
|
11
|
+
if (key) {
|
|
12
|
+
return QualityEstimation[key];
|
|
13
|
+
}
|
|
14
|
+
return undefined;
|
|
15
|
+
};
|
|
16
|
+
exports.getQualityEstimationByKey = getQualityEstimationByKey;
|
|
17
|
+
//# sourceMappingURL=QualityEstimation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QualityEstimation.js","sourceRoot":"","sources":["../../../src/common/constants/QualityEstimation.ts"],"names":[],"mappings":";;;AAAA,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IACzB,kCAAa,CAAA;IACb,0CAAqB,CAAA;IACrB,kCAAa,CAAA;AACjB,CAAC,EAJW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAI5B;AAEM,IAAM,yBAAyB,GAAG,UAAC,GAAuB;IAC7D,IAAI,GAAG,EAAE;QACL,OAAO,iBAAiB,CAAC,GAAqC,CAAC,CAAC;KACnE;IAED,OAAO,SAAS,CAAC;AACrB,CAAC,CAAC;AANW,QAAA,yBAAyB,6BAMpC"}
|
|
@@ -4,3 +4,9 @@ export declare const TRANSLATING_TRANSLATION_STATUS = "TRANSLATING";
|
|
|
4
4
|
export declare const CANCELLED_TRANSLATION_STATUS = "CANCELLED";
|
|
5
5
|
export declare const DONE_TRANSLATION_STATUS = "DONE";
|
|
6
6
|
export declare const FAILED_TRANSLATION_STATUS = "FAILED";
|
|
7
|
+
export declare const INIT_CONTENT_INSIGHTS_STATUS = "INIT";
|
|
8
|
+
export declare const IN_PROGRESS_CONTENT_INSIGHTS_STATUS = "IN_PROGRESS";
|
|
9
|
+
export declare const ACCEPTED_CONTENT_INSIGHTS_STATUS = "ACCEPTED";
|
|
10
|
+
export declare const DONE_CONTENT_INSIGHTS_STATUS = "DONE";
|
|
11
|
+
export declare const FAILED_CONTENT_INSIGHTS_STATUS = "FAILED";
|
|
12
|
+
export declare const UNK_CONTENT_INSIGHTS_STATUS = "UNK";
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FAILED_TRANSLATION_STATUS = exports.DONE_TRANSLATION_STATUS = exports.CANCELLED_TRANSLATION_STATUS = exports.TRANSLATING_TRANSLATION_STATUS = exports.INIT_TRANSLATION_STATUS = exports.UNK_TRANSLATION_STATUS = void 0;
|
|
3
|
+
exports.UNK_CONTENT_INSIGHTS_STATUS = exports.FAILED_CONTENT_INSIGHTS_STATUS = exports.DONE_CONTENT_INSIGHTS_STATUS = exports.ACCEPTED_CONTENT_INSIGHTS_STATUS = exports.IN_PROGRESS_CONTENT_INSIGHTS_STATUS = exports.INIT_CONTENT_INSIGHTS_STATUS = exports.FAILED_TRANSLATION_STATUS = exports.DONE_TRANSLATION_STATUS = exports.CANCELLED_TRANSLATION_STATUS = exports.TRANSLATING_TRANSLATION_STATUS = exports.INIT_TRANSLATION_STATUS = exports.UNK_TRANSLATION_STATUS = void 0;
|
|
4
4
|
exports.UNK_TRANSLATION_STATUS = 'UNK';
|
|
5
5
|
exports.INIT_TRANSLATION_STATUS = 'INIT';
|
|
6
6
|
exports.TRANSLATING_TRANSLATION_STATUS = 'TRANSLATING';
|
|
7
7
|
exports.CANCELLED_TRANSLATION_STATUS = 'CANCELLED';
|
|
8
8
|
exports.DONE_TRANSLATION_STATUS = 'DONE';
|
|
9
9
|
exports.FAILED_TRANSLATION_STATUS = 'FAILED';
|
|
10
|
+
exports.INIT_CONTENT_INSIGHTS_STATUS = 'INIT';
|
|
11
|
+
exports.IN_PROGRESS_CONTENT_INSIGHTS_STATUS = 'IN_PROGRESS';
|
|
12
|
+
exports.ACCEPTED_CONTENT_INSIGHTS_STATUS = 'ACCEPTED';
|
|
13
|
+
exports.DONE_CONTENT_INSIGHTS_STATUS = 'DONE';
|
|
14
|
+
exports.FAILED_CONTENT_INSIGHTS_STATUS = 'FAILED';
|
|
15
|
+
exports.UNK_CONTENT_INSIGHTS_STATUS = 'UNK';
|
|
10
16
|
//# sourceMappingURL=Statuses.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Statuses.js","sourceRoot":"","sources":["../../../src/common/constants/Statuses.ts"],"names":[],"mappings":";;;AAAa,QAAA,sBAAsB,GAAG,KAAK,CAAC;AAC/B,QAAA,uBAAuB,GAAG,MAAM,CAAC;AACjC,QAAA,8BAA8B,GAAG,aAAa,CAAC;AAC/C,QAAA,4BAA4B,GAAG,WAAW,CAAC;AAC3C,QAAA,uBAAuB,GAAG,MAAM,CAAC;AACjC,QAAA,yBAAyB,GAAG,QAAQ,CAAC"}
|
|
1
|
+
{"version":3,"file":"Statuses.js","sourceRoot":"","sources":["../../../src/common/constants/Statuses.ts"],"names":[],"mappings":";;;AAAa,QAAA,sBAAsB,GAAG,KAAK,CAAC;AAC/B,QAAA,uBAAuB,GAAG,MAAM,CAAC;AACjC,QAAA,8BAA8B,GAAG,aAAa,CAAC;AAC/C,QAAA,4BAA4B,GAAG,WAAW,CAAC;AAC3C,QAAA,uBAAuB,GAAG,MAAM,CAAC;AACjC,QAAA,yBAAyB,GAAG,QAAQ,CAAC;AAErC,QAAA,4BAA4B,GAAG,MAAM,CAAC;AACtC,QAAA,mCAAmC,GAAG,aAAa,CAAC;AACpD,QAAA,gCAAgC,GAAG,UAAU,CAAC;AAC9C,QAAA,4BAA4B,GAAG,MAAM,CAAC;AACtC,QAAA,8BAA8B,GAAG,QAAQ,CAAC;AAC1C,QAAA,2BAA2B,GAAG,KAAK,CAAC"}
|
|
@@ -3,12 +3,19 @@ export declare const SELF_PATH = "/v4/accounts/api-credentials/self";
|
|
|
3
3
|
export declare const USER_SELF_PATH = "/v4/accounts/users/self";
|
|
4
4
|
export declare const SYNC_TRANSLATION_PATH = "/v4/mt/translations/sync";
|
|
5
5
|
export declare const ASYNC_TRANSLATION_PATH = "/v4/mt/translations/async";
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const CONTENT_INSIGHTS_PATH = "/v4/content-insights";
|
|
7
|
+
export declare const CI_FILE_REQUEST_PARAM_NAME = "file";
|
|
8
|
+
export declare const CI_SOURCE_LANGUAGE_REQUEST_PARAM_NAME = "sourceLanguage";
|
|
9
|
+
export declare const CI_TRANSLATION_ID_REQUEST_PARAM_NAME = "translationIds";
|
|
10
|
+
export declare const EDGE_LANGUAGE_PAIRS_PATH = "/api/v2/language-pairs";
|
|
7
11
|
export declare const EDGE_GET_ALL_DICTIONARIES_PATH = "/api/v2/dictionaries";
|
|
8
12
|
export declare const EDGE_GET_ALL_FEEDBACK_PATH = "/api/v2/feedback";
|
|
13
|
+
export declare const EDGE_CREATE_FEEDBACK_PATH = "/api/v2/feedback";
|
|
9
14
|
export declare const EDGE_ASYNC_TRANSLATION_PATH = "/api/v2/translations";
|
|
10
15
|
export declare const EDGE_ASYNC_METADATA_PATH = "/api/v2/translations/{0}/metadata";
|
|
11
16
|
export declare const EDGE_QUICK_TRANSLATION_PATH = "/api/v2/translations/quick";
|
|
17
|
+
export declare const EDGE_RETRIEVE_CONTENT_INSIGHTS_PATH = "/content-insights";
|
|
18
|
+
export declare const getEdgeCreateContentInsightsPath: (translationId: string | undefined) => string;
|
|
12
19
|
export declare const INPUT = "input";
|
|
13
20
|
export declare const TARGET_LANGUAGE_ID = "targetLanguageId";
|
|
14
21
|
export declare const SOURCE_LANGUAGE_ID = "sourceLanguageId";
|
|
@@ -20,10 +27,14 @@ export declare const DICTIONARY_IDS = "dictionaryIds";
|
|
|
20
27
|
export declare const OUTPUT_FORMAT = "outputFormat";
|
|
21
28
|
export declare const TITLE = "title";
|
|
22
29
|
export declare const ENCODING = "encoding";
|
|
30
|
+
export declare const PDF_CONVERTER = "pdfConverter";
|
|
31
|
+
export declare const LINGUISTIC_OPTIONS = "linguisticOptions";
|
|
23
32
|
export declare const SMALL_INPUT_GET_TRANSLATION_STATUS_DELAY = 100;
|
|
24
33
|
export declare const LARGE_INPUT_GET_TRANSLATION_STATUS_DELAY = 500;
|
|
25
34
|
export declare const CHECK_STATUS_TIMEOUT = 300000;
|
|
26
35
|
export declare const THREAD_NUMBER_FOR_BATCH_TRANSLATION = 4;
|
|
36
|
+
export declare const SMALL_FILE_GET_CONTENT_INSIGHTS_STATUS_DELAY_MILLISECONDS = 100;
|
|
37
|
+
export declare const LARGE_FILE_GET_CONTENT_INSIGHTS_STATUS_DELAY_MILLISECONDS = 500;
|
|
27
38
|
export declare const SYNC_SIZE_LIMIT = 1000;
|
|
28
39
|
export declare const MAX_FILE_SIZE_LIMIT = 104857600;
|
|
29
40
|
export declare const MAX_ASYNC_TEXT_SIZE_LIMIT = 2097152;
|
|
@@ -34,6 +45,8 @@ export declare const EUROPE_URL = "https://api.languageweaver.com";
|
|
|
34
45
|
export declare const EDGE_DEFAULT_URL = "http://localhost:8001";
|
|
35
46
|
export declare const CLOUD_DATE_FORMAT = "YYYY/MM/DD";
|
|
36
47
|
export declare const EDGE_DATE_FORMAT = "YYYY-MM-DD HH:mm:ss.SSS";
|
|
48
|
+
export declare const SUPPORTED_INPUT_DATE_FORMATS: string[];
|
|
49
|
+
export declare const DEFAULT_FILENAME = "output.txt";
|
|
37
50
|
export declare const LW_CLIENT_ID_ENV_VAR = "LW_CLIENT_ID";
|
|
38
51
|
export declare const LW_CLIENT_SECRET_ENV_VAR = "LW_CLIENT_SECRET";
|
|
39
52
|
export declare const LW_PRODUCT_ENV_VAR = "LW_PRODUCT";
|
|
@@ -49,8 +62,10 @@ export declare const ACCEPT = "Accept";
|
|
|
49
62
|
export declare const CONTENT_TYPE = "Content-Type";
|
|
50
63
|
export declare const CLIENT_ID = "clientId";
|
|
51
64
|
export declare const CLIENT_SECRET = "clientSecret";
|
|
52
|
-
export declare const
|
|
53
|
-
export declare const
|
|
65
|
+
export declare const TRANSLATION_TIMEOUT_ERROR_MESSAGE = "Translation timeout";
|
|
66
|
+
export declare const CONTENT_INSIGHTS_TIMEOUT_ERROR_MESSAGE = "Content insights timeout";
|
|
67
|
+
export declare const MISSING_REQUIRED_REQUEST_ID_ERROR = "Missing required requestId";
|
|
68
|
+
export declare const MISSING_REQUIRED_LANGUAGE_PAIR_ID_ERROR = "Missing required languagePairId";
|
|
54
69
|
export declare const MISSING_REQUIRED_INPUT_FILE_ERROR = "Missing required input file";
|
|
55
70
|
export declare const MISSING_REQUIRED_INPUT_DIRECTORY_ERROR = "Missing required input directory";
|
|
56
71
|
export declare const MISSING_REQUIRED_INPUT_FILES_ERROR = "Missing required input files";
|
|
@@ -61,6 +76,8 @@ export declare const REQUIRED_INPUT_FILE_OF_TYPE_OBJECT_ERROR = "Input file must
|
|
|
61
76
|
export declare const REQUIRED_INPUT_FILE_OF_TYPE_STRING_ERROR = "Input file must be a string";
|
|
62
77
|
export declare const REQUIRED_INPUT_FILES_OF_TYPE_OBJECT_ERROR = "All input files must be instances of File object";
|
|
63
78
|
export declare const REQUIRED_INPUT_DIRECTORY_OF_TYPE_STRING_ERROR = "Input file must be a string";
|
|
79
|
+
export declare const REQUIRED_INPUT_OF_TYPE_STRING_ERROR = "Input file must be a string";
|
|
80
|
+
export declare const INVALID_FILE_OR_DIRECTORY_PATH_ERROR = "Invalid file or directory path: ";
|
|
64
81
|
export declare const INVALID_PATH_ERROR = "Invalid file path: ";
|
|
65
82
|
export declare const INVALID_DIRECTORY_ERROR = "Invalid directory: ";
|
|
66
83
|
export declare const LANGUAGE_PAIR_NOT_FOUND_ERROR = "No language pair found for given source, target and model";
|
|
@@ -1,18 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.PAGE_NUMBER_QUERY_PARAM = exports.GENERIC_ERROR = exports.LANGUAGE_PAIR_NOT_FOUND_ERROR = exports.INVALID_DIRECTORY_ERROR = exports.INVALID_PATH_ERROR = exports.REQUIRED_INPUT_DIRECTORY_OF_TYPE_STRING_ERROR = exports.REQUIRED_INPUT_FILES_OF_TYPE_OBJECT_ERROR = exports.REQUIRED_INPUT_FILE_OF_TYPE_STRING_ERROR = exports.REQUIRED_INPUT_FILE_OF_TYPE_OBJECT_ERROR = exports.READ_FILES_FROM_DIRECTORY_FAILED_ERROR = exports.MISSING_REQUIRED_OUTPUT_DIRECTORY_ERROR = exports.MISSING_REQUIRED_OUTPUT_FILE_ERROR = exports.MISSING_REQUIRED_INPUT_FILES_ERROR = exports.MISSING_REQUIRED_INPUT_DIRECTORY_ERROR = exports.MISSING_REQUIRED_INPUT_FILE_ERROR = exports.
|
|
3
|
+
exports.LW_CLIENT_ID_ENV_VAR = exports.DEFAULT_FILENAME = exports.SUPPORTED_INPUT_DATE_FORMATS = exports.EDGE_DATE_FORMAT = exports.CLOUD_DATE_FORMAT = exports.EDGE_DEFAULT_URL = exports.EUROPE_URL = exports.US_URL = exports.DEFAULT_FEEDBACK_PAGE_SIZE = exports.DEFAULT_DICTIONARIES_PAGE_SIZE = exports.MAX_ASYNC_TEXT_SIZE_LIMIT = exports.MAX_FILE_SIZE_LIMIT = exports.SYNC_SIZE_LIMIT = exports.LARGE_FILE_GET_CONTENT_INSIGHTS_STATUS_DELAY_MILLISECONDS = exports.SMALL_FILE_GET_CONTENT_INSIGHTS_STATUS_DELAY_MILLISECONDS = exports.THREAD_NUMBER_FOR_BATCH_TRANSLATION = exports.CHECK_STATUS_TIMEOUT = exports.LARGE_INPUT_GET_TRANSLATION_STATUS_DELAY = exports.SMALL_INPUT_GET_TRANSLATION_STATUS_DELAY = exports.LINGUISTIC_OPTIONS = exports.PDF_CONVERTER = exports.ENCODING = exports.TITLE = exports.OUTPUT_FORMAT = exports.DICTIONARY_IDS = exports.LANGUAGE_PAIR_ID = exports.DICTIONARIES = exports.INPUT_FORMAT = exports.MODEL = exports.SOURCE_LANGUAGE_ID = exports.TARGET_LANGUAGE_ID = exports.INPUT = exports.getEdgeCreateContentInsightsPath = exports.EDGE_RETRIEVE_CONTENT_INSIGHTS_PATH = exports.EDGE_QUICK_TRANSLATION_PATH = exports.EDGE_ASYNC_METADATA_PATH = exports.EDGE_ASYNC_TRANSLATION_PATH = exports.EDGE_CREATE_FEEDBACK_PATH = exports.EDGE_GET_ALL_FEEDBACK_PATH = exports.EDGE_GET_ALL_DICTIONARIES_PATH = exports.EDGE_LANGUAGE_PAIRS_PATH = exports.CI_TRANSLATION_ID_REQUEST_PARAM_NAME = exports.CI_SOURCE_LANGUAGE_REQUEST_PARAM_NAME = exports.CI_FILE_REQUEST_PARAM_NAME = exports.CONTENT_INSIGHTS_PATH = exports.ASYNC_TRANSLATION_PATH = exports.SYNC_TRANSLATION_PATH = exports.USER_SELF_PATH = exports.SELF_PATH = exports.CREDENTIALS_LOGIN_PATH = void 0;
|
|
4
|
+
exports.PAGE_NUMBER_QUERY_PARAM = exports.GENERIC_ERROR = exports.LANGUAGE_PAIR_NOT_FOUND_ERROR = exports.INVALID_DIRECTORY_ERROR = exports.INVALID_PATH_ERROR = exports.INVALID_FILE_OR_DIRECTORY_PATH_ERROR = exports.REQUIRED_INPUT_OF_TYPE_STRING_ERROR = exports.REQUIRED_INPUT_DIRECTORY_OF_TYPE_STRING_ERROR = exports.REQUIRED_INPUT_FILES_OF_TYPE_OBJECT_ERROR = exports.REQUIRED_INPUT_FILE_OF_TYPE_STRING_ERROR = exports.REQUIRED_INPUT_FILE_OF_TYPE_OBJECT_ERROR = exports.READ_FILES_FROM_DIRECTORY_FAILED_ERROR = exports.MISSING_REQUIRED_OUTPUT_DIRECTORY_ERROR = exports.MISSING_REQUIRED_OUTPUT_FILE_ERROR = exports.MISSING_REQUIRED_INPUT_FILES_ERROR = exports.MISSING_REQUIRED_INPUT_DIRECTORY_ERROR = exports.MISSING_REQUIRED_INPUT_FILE_ERROR = exports.MISSING_REQUIRED_LANGUAGE_PAIR_ID_ERROR = exports.MISSING_REQUIRED_REQUEST_ID_ERROR = exports.CONTENT_INSIGHTS_TIMEOUT_ERROR_MESSAGE = exports.TRANSLATION_TIMEOUT_ERROR_MESSAGE = exports.CLIENT_SECRET = exports.CLIENT_ID = exports.CONTENT_TYPE = exports.ACCEPT = exports.AUTHORIZATION = exports.REACT_APP_LW_CLOUD_REGION = exports.REACT_APP_LW_EDGE_OVERWRITE_URL = exports.REACT_APP_LW_PRODUCT_ENV_VAR = exports.REACT_APP_LW_CLIENT_SECRET_ENV_VAR = exports.REACT_APP_LW_CLIENT_ID_ENV_VAR = exports.LW_CLOUD_REGION = exports.LW_EDGE_OVERWRITE_URL = exports.LW_PRODUCT_ENV_VAR = exports.LW_CLIENT_SECRET_ENV_VAR = void 0;
|
|
5
5
|
exports.CREDENTIALS_LOGIN_PATH = '/v4/token';
|
|
6
6
|
exports.SELF_PATH = '/v4/accounts/api-credentials/self';
|
|
7
7
|
exports.USER_SELF_PATH = '/v4/accounts/users/self';
|
|
8
8
|
exports.SYNC_TRANSLATION_PATH = '/v4/mt/translations/sync';
|
|
9
9
|
exports.ASYNC_TRANSLATION_PATH = '/v4/mt/translations/async';
|
|
10
|
-
exports.
|
|
10
|
+
exports.CONTENT_INSIGHTS_PATH = '/v4/content-insights';
|
|
11
|
+
exports.CI_FILE_REQUEST_PARAM_NAME = 'file';
|
|
12
|
+
exports.CI_SOURCE_LANGUAGE_REQUEST_PARAM_NAME = 'sourceLanguage';
|
|
13
|
+
exports.CI_TRANSLATION_ID_REQUEST_PARAM_NAME = 'translationIds';
|
|
14
|
+
exports.EDGE_LANGUAGE_PAIRS_PATH = '/api/v2/language-pairs';
|
|
11
15
|
exports.EDGE_GET_ALL_DICTIONARIES_PATH = '/api/v2/dictionaries';
|
|
12
16
|
exports.EDGE_GET_ALL_FEEDBACK_PATH = '/api/v2/feedback';
|
|
17
|
+
exports.EDGE_CREATE_FEEDBACK_PATH = '/api/v2/feedback';
|
|
13
18
|
exports.EDGE_ASYNC_TRANSLATION_PATH = '/api/v2/translations';
|
|
14
19
|
exports.EDGE_ASYNC_METADATA_PATH = '/api/v2/translations/{0}/metadata';
|
|
15
20
|
exports.EDGE_QUICK_TRANSLATION_PATH = '/api/v2/translations/quick';
|
|
21
|
+
exports.EDGE_RETRIEVE_CONTENT_INSIGHTS_PATH = '/content-insights';
|
|
22
|
+
var getEdgeCreateContentInsightsPath = function (translationId) {
|
|
23
|
+
return exports.EDGE_ASYNC_TRANSLATION_PATH + '/' + translationId + exports.EDGE_RETRIEVE_CONTENT_INSIGHTS_PATH;
|
|
24
|
+
};
|
|
25
|
+
exports.getEdgeCreateContentInsightsPath = getEdgeCreateContentInsightsPath;
|
|
16
26
|
exports.INPUT = 'input';
|
|
17
27
|
exports.TARGET_LANGUAGE_ID = 'targetLanguageId';
|
|
18
28
|
exports.SOURCE_LANGUAGE_ID = 'sourceLanguageId';
|
|
@@ -24,10 +34,14 @@ exports.DICTIONARY_IDS = 'dictionaryIds';
|
|
|
24
34
|
exports.OUTPUT_FORMAT = 'outputFormat';
|
|
25
35
|
exports.TITLE = 'title';
|
|
26
36
|
exports.ENCODING = 'encoding';
|
|
37
|
+
exports.PDF_CONVERTER = 'pdfConverter';
|
|
38
|
+
exports.LINGUISTIC_OPTIONS = 'linguisticOptions';
|
|
27
39
|
exports.SMALL_INPUT_GET_TRANSLATION_STATUS_DELAY = 100;
|
|
28
40
|
exports.LARGE_INPUT_GET_TRANSLATION_STATUS_DELAY = 500;
|
|
29
41
|
exports.CHECK_STATUS_TIMEOUT = 300000; // timeout in milliseconds
|
|
30
42
|
exports.THREAD_NUMBER_FOR_BATCH_TRANSLATION = 4;
|
|
43
|
+
exports.SMALL_FILE_GET_CONTENT_INSIGHTS_STATUS_DELAY_MILLISECONDS = 100;
|
|
44
|
+
exports.LARGE_FILE_GET_CONTENT_INSIGHTS_STATUS_DELAY_MILLISECONDS = 500;
|
|
31
45
|
exports.SYNC_SIZE_LIMIT = 1000; // characters
|
|
32
46
|
exports.MAX_FILE_SIZE_LIMIT = 104857600; // 100MB in bytes
|
|
33
47
|
exports.MAX_ASYNC_TEXT_SIZE_LIMIT = 2097152; // 2MB in bytes
|
|
@@ -38,6 +52,8 @@ exports.EUROPE_URL = 'https://api.languageweaver.com';
|
|
|
38
52
|
exports.EDGE_DEFAULT_URL = 'http://localhost:8001';
|
|
39
53
|
exports.CLOUD_DATE_FORMAT = 'YYYY/MM/DD';
|
|
40
54
|
exports.EDGE_DATE_FORMAT = 'YYYY-MM-DD HH:mm:ss.SSS';
|
|
55
|
+
exports.SUPPORTED_INPUT_DATE_FORMATS = ['YYYY/MM/DD', 'YYYY-MM-DD', 'MM/DD/YYYY', 'MM-DD-YYYY'];
|
|
56
|
+
exports.DEFAULT_FILENAME = 'output.txt';
|
|
41
57
|
// Environment variables keys
|
|
42
58
|
exports.LW_CLIENT_ID_ENV_VAR = 'LW_CLIENT_ID';
|
|
43
59
|
exports.LW_CLIENT_SECRET_ENV_VAR = 'LW_CLIENT_SECRET';
|
|
@@ -55,8 +71,10 @@ exports.ACCEPT = 'Accept';
|
|
|
55
71
|
exports.CONTENT_TYPE = 'Content-Type';
|
|
56
72
|
exports.CLIENT_ID = 'clientId';
|
|
57
73
|
exports.CLIENT_SECRET = 'clientSecret';
|
|
58
|
-
exports.
|
|
59
|
-
exports.
|
|
74
|
+
exports.TRANSLATION_TIMEOUT_ERROR_MESSAGE = 'Translation timeout';
|
|
75
|
+
exports.CONTENT_INSIGHTS_TIMEOUT_ERROR_MESSAGE = 'Content insights timeout';
|
|
76
|
+
exports.MISSING_REQUIRED_REQUEST_ID_ERROR = 'Missing required requestId';
|
|
77
|
+
exports.MISSING_REQUIRED_LANGUAGE_PAIR_ID_ERROR = 'Missing required languagePairId';
|
|
60
78
|
exports.MISSING_REQUIRED_INPUT_FILE_ERROR = 'Missing required input file';
|
|
61
79
|
exports.MISSING_REQUIRED_INPUT_DIRECTORY_ERROR = 'Missing required input directory';
|
|
62
80
|
exports.MISSING_REQUIRED_INPUT_FILES_ERROR = 'Missing required input files';
|
|
@@ -67,6 +85,8 @@ exports.REQUIRED_INPUT_FILE_OF_TYPE_OBJECT_ERROR = 'Input file must be a File ob
|
|
|
67
85
|
exports.REQUIRED_INPUT_FILE_OF_TYPE_STRING_ERROR = 'Input file must be a string';
|
|
68
86
|
exports.REQUIRED_INPUT_FILES_OF_TYPE_OBJECT_ERROR = 'All input files must be instances of File object';
|
|
69
87
|
exports.REQUIRED_INPUT_DIRECTORY_OF_TYPE_STRING_ERROR = 'Input file must be a string';
|
|
88
|
+
exports.REQUIRED_INPUT_OF_TYPE_STRING_ERROR = 'Input file must be a string';
|
|
89
|
+
exports.INVALID_FILE_OR_DIRECTORY_PATH_ERROR = 'Invalid file or directory path: ';
|
|
70
90
|
exports.INVALID_PATH_ERROR = 'Invalid file path: ';
|
|
71
91
|
exports.INVALID_DIRECTORY_ERROR = 'Invalid directory: ';
|
|
72
92
|
exports.LANGUAGE_PAIR_NOT_FOUND_ERROR = 'No language pair found for given source, target and model';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TranslationConstants.js","sourceRoot":"","sources":["../../../src/common/constants/TranslationConstants.ts"],"names":[],"mappings":";;;;AAAa,QAAA,sBAAsB,GAAG,WAAW,CAAC;AACrC,QAAA,SAAS,GAAG,mCAAmC,CAAC;AAChD,QAAA,cAAc,GAAG,yBAAyB,CAAC;AAE3C,QAAA,qBAAqB,GAAG,0BAA0B,CAAC;AACnD,QAAA,sBAAsB,GAAG,2BAA2B,CAAC;AAErD,QAAA,
|
|
1
|
+
{"version":3,"file":"TranslationConstants.js","sourceRoot":"","sources":["../../../src/common/constants/TranslationConstants.ts"],"names":[],"mappings":";;;;AAAa,QAAA,sBAAsB,GAAG,WAAW,CAAC;AACrC,QAAA,SAAS,GAAG,mCAAmC,CAAC;AAChD,QAAA,cAAc,GAAG,yBAAyB,CAAC;AAE3C,QAAA,qBAAqB,GAAG,0BAA0B,CAAC;AACnD,QAAA,sBAAsB,GAAG,2BAA2B,CAAC;AAErD,QAAA,qBAAqB,GAAG,sBAAsB,CAAC;AAC/C,QAAA,0BAA0B,GAAG,MAAM,CAAC;AACpC,QAAA,qCAAqC,GAAG,gBAAgB,CAAC;AACzD,QAAA,oCAAoC,GAAG,gBAAgB,CAAC;AAExD,QAAA,wBAAwB,GAAG,wBAAwB,CAAC;AACpD,QAAA,8BAA8B,GAAG,sBAAsB,CAAC;AACxD,QAAA,0BAA0B,GAAG,kBAAkB,CAAC;AAChD,QAAA,yBAAyB,GAAG,kBAAkB,CAAC;AAC/C,QAAA,2BAA2B,GAAG,sBAAsB,CAAC;AACrD,QAAA,wBAAwB,GAAG,mCAAmC,CAAC;AAC/D,QAAA,2BAA2B,GAAG,4BAA4B,CAAC;AAE3D,QAAA,mCAAmC,GAAG,mBAAmB,CAAC;AAChE,IAAM,gCAAgC,GAAG,UAAC,aAAiC;IAC9E,OAAA,mCAA2B,GAAG,GAAG,GAAG,aAAa,GAAG,2CAAmC;AAAvF,CAAuF,CAAC;AAD/E,QAAA,gCAAgC,oCAC+C;AAE/E,QAAA,KAAK,GAAG,OAAO,CAAC;AAChB,QAA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,QAAA,mCAAmC,GAAG,6BAA6B,CAAC;AACpE,QAAA,oCAAoC,GAAG,kCAAkC,CAAC;AAC1E,QAAA,kBAAkB,GAAG,qBAAqB,CAAC;AAC3C,QAAA,uBAAuB,GAAG,qBAAqB,CAAC;AAChD,QAAA,6BAA6B,GAAG,2DAA2D,CAAC;AAE5F,QAAA,aAAa,GAAG,0BAA0B,CAAC;AAE3C,QAAA,uBAAuB,GAAG,YAAY,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var ContentInsightsException = /** @class */ (function () {
|
|
4
|
+
function ContentInsightsException() {
|
|
5
|
+
}
|
|
6
|
+
ContentInsightsException.getContentInsightsException = function (contentInsightsStatus, contentInsightsId, errors) {
|
|
7
|
+
var message = "Received status ".concat(contentInsightsStatus, " for content insights with \n ContentInsightsId: ").concat(contentInsightsId);
|
|
8
|
+
return {
|
|
9
|
+
message: errors ? message + " \n with errors: ".concat(JSON.stringify(errors)) : message,
|
|
10
|
+
contentInsightsStatus: contentInsightsStatus,
|
|
11
|
+
requestId: contentInsightsId,
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
return ContentInsightsException;
|
|
15
|
+
}());
|
|
16
|
+
exports.default = ContentInsightsException;
|
|
17
|
+
//# sourceMappingURL=ContentInsightsException.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContentInsightsException.js","sourceRoot":"","sources":["../../../src/common/exceptions/ContentInsightsException.ts"],"names":[],"mappings":";;AAEA;IAAA;IAcA,CAAC;IAbU,oDAA2B,GAAlC,UACI,qBAA6B,EAC7B,iBAAqC,EACrC,MAAoC;QAEpC,IAAM,OAAO,GAAG,0BAAmB,qBAAqB,8DAAoD,iBAAiB,CAAE,CAAC;QAEhI,OAAO;YACH,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,GAAG,2BAAoB,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAE,CAAC,CAAC,CAAC,OAAO;YAClF,qBAAqB,uBAAA;YACrB,SAAS,EAAE,iBAAiB;SAC/B,CAAC;IACN,CAAC;IACL,+BAAC;AAAD,CAAC,AAdD,IAcC"}
|
|
@@ -21,8 +21,8 @@ export default class RestClient {
|
|
|
21
21
|
getFetchOptionsForJsonRequest(token: Token | undefined, method: string, body: any, hasStreamResponse?: boolean): Record<string, any>;
|
|
22
22
|
getFetchOptionsForMultipartRequest(token: Token | undefined, method: string, body: any): Record<string, any>;
|
|
23
23
|
private addTraceHeaders;
|
|
24
|
+
private removeUnderscorePrefixesFromObjectKeys;
|
|
24
25
|
private addAuthorizationHeader;
|
|
25
|
-
private processBodyValues;
|
|
26
26
|
request(method: string, url: string, options: Record<string, any>, queryStringParams?: object, attempt?: number, config?: RequestConfig): Promise<any>;
|
|
27
27
|
getFetchUrl(method: string, url: string, queryStringParams?: object): string;
|
|
28
28
|
getUrlWithParams(url: string, queryStringParams: object): string;
|
|
@@ -107,6 +107,7 @@ var RestClient = /** @class */ (function () {
|
|
|
107
107
|
};
|
|
108
108
|
RestClient.prototype.getFetchOptionsForJsonRequest = function (token, method, body, hasStreamResponse) {
|
|
109
109
|
var _a;
|
|
110
|
+
var _this = this;
|
|
110
111
|
var traceId = TraceRequestInfo_1.default.buildTraceId();
|
|
111
112
|
var options = {
|
|
112
113
|
method: method,
|
|
@@ -118,7 +119,9 @@ var RestClient = /** @class */ (function () {
|
|
|
118
119
|
options = this.addTraceHeaders(options, traceId);
|
|
119
120
|
options = this.addAuthorizationHeader(options, token);
|
|
120
121
|
if (method === 'POST' || method === 'PUT' || method === 'DELETE') {
|
|
121
|
-
options['data'] = JSON.stringify(
|
|
122
|
+
options['data'] = JSON.stringify(body, function (_, value) {
|
|
123
|
+
return _this.removeUnderscorePrefixesFromObjectKeys(value);
|
|
124
|
+
});
|
|
122
125
|
}
|
|
123
126
|
if (hasStreamResponse) {
|
|
124
127
|
options['responseType'] = Utils_1.default.isBrowser() ? 'blob' : 'stream';
|
|
@@ -149,6 +152,14 @@ var RestClient = /** @class */ (function () {
|
|
|
149
152
|
}
|
|
150
153
|
return options;
|
|
151
154
|
};
|
|
155
|
+
RestClient.prototype.removeUnderscorePrefixesFromObjectKeys = function (value) {
|
|
156
|
+
return value && typeof value === 'object' && !Array.isArray(value)
|
|
157
|
+
? Object.fromEntries(Object.entries(value).map(function (_a) {
|
|
158
|
+
var key = _a[0], entryValue = _a[1];
|
|
159
|
+
return [key.replace(/^_/, ''), entryValue];
|
|
160
|
+
}))
|
|
161
|
+
: value;
|
|
162
|
+
};
|
|
152
163
|
RestClient.prototype.addAuthorizationHeader = function (options, token) {
|
|
153
164
|
var _a;
|
|
154
165
|
if (token) {
|
|
@@ -156,18 +167,6 @@ var RestClient = /** @class */ (function () {
|
|
|
156
167
|
}
|
|
157
168
|
return options;
|
|
158
169
|
};
|
|
159
|
-
RestClient.prototype.processBodyValues = function (body) {
|
|
160
|
-
if (body && typeof body === 'object') {
|
|
161
|
-
return Object.keys(body).reduce(function (acc, key) {
|
|
162
|
-
var _a, _b;
|
|
163
|
-
if (key && key.startsWith('_')) {
|
|
164
|
-
return __assign(__assign({}, acc), (_a = {}, _a[key.slice(1)] = body[key], _a));
|
|
165
|
-
}
|
|
166
|
-
return __assign(__assign({}, acc), (_b = {}, _b[key] = body[key], _b));
|
|
167
|
-
}, {});
|
|
168
|
-
}
|
|
169
|
-
return body;
|
|
170
|
-
};
|
|
171
170
|
RestClient.prototype.request = function (method, url, options, queryStringParams, attempt, config) {
|
|
172
171
|
var _this = this;
|
|
173
172
|
if (attempt === void 0) { attempt = 1; }
|
|
@@ -187,14 +186,13 @@ var RestClient = /** @class */ (function () {
|
|
|
187
186
|
retry = _a.sent();
|
|
188
187
|
if (retry) {
|
|
189
188
|
return [2 /*return*/, new Promise(function (resolve) {
|
|
190
|
-
var _a;
|
|
191
189
|
if (attempt === 1) {
|
|
192
190
|
resolve(_this.request(method, url, options, queryStringParams, attempt + 1));
|
|
193
191
|
}
|
|
194
|
-
else {
|
|
192
|
+
else if (_this.clientConfiguration) {
|
|
195
193
|
setTimeout(function () {
|
|
196
194
|
return resolve(_this.request(method, url, options, queryStringParams, attempt + 1, config));
|
|
197
|
-
},
|
|
195
|
+
}, _this.clientConfiguration.retryConfiguration.delay);
|
|
198
196
|
}
|
|
199
197
|
})];
|
|
200
198
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RestClient.js","sourceRoot":"","sources":["../../../../src/common/external/communication/RestClient.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qFAA+D;AAC/D,6EAAmH;AAEnH,gDAA0B;AAE1B,yGAAmF;AACnF,oEAA8C;AAC9C,4DAAsC;AAOtC,IAAM,oBAAoB,GAAkB;IACxC,iBAAiB,EAAE,KAAK;IACxB,aAAa,EAAE,KAAK;CACvB,CAAC;AAEF;IAMI,oBAAY,GAAW,EAAE,gBAAiC;QAAjC,iCAAA,EAAA,wBAAiC;QACtD,IAAI,CAAC,QAAQ,GAAG,mBAAS,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;QAC7C,IAAI,CAAC,iBAAiB,GAAG,gBAAgB,CAAC;IAC9C,CAAC;IAED,sBAAI,+BAAO;aAAX;YACI,OAAO,IAAI,CAAC,QAAQ,CAAC;QACzB,CAAC;aAED,UAAY,KAAa;YACrB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QAC1B,CAAC;;;OAJA;IAMD,sBAAI,uCAAe;aAAnB;YACI,OAAO,IAAI,CAAC,gBAAgB,CAAC;QACjC,CAAC;aAED,UAAoB,KAA2C;YAC3D,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC;QAClC,CAAC;;;OAJA;IAMD,sBAAI,2CAAmB;aAAvB;YACI,OAAO,IAAI,CAAC,oBAAoB,CAAC;QACrC,CAAC;aAED,UAAwB,KAAsC;YAC1D,IAAI,CAAC,oBAAoB,GAAG,KAAK,CAAC;QACtC,CAAC;;;OAJA;IAMD,gCAAW,GAAX,UACI,KAAwB,EACxB,MAAc,EACd,GAAW,EACX,IAAU,EACV,iBAA0B,EAC1B,MAA4C;QAA5C,uBAAA,EAAA,6BAA4C;QAE5C,IAAM,OAAO,GAAG,IAAI,CAAC,6BAA6B,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,iBAAiB,CAAC,CAAC;QAElG,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;IACpF,CAAC;IAED,qCAAgB,GAAhB,UACI,KAAwB,EACxB,MAAc,EACd,GAAW,EACX,IAAU,EACV,iBAA0B;QAE1B,IAAM,OAAO,GAAG,IAAI,CAAC,kCAAkC,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;QAE7E,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,iBAAiB,CAAC,CAAC;IACjE,CAAC;IAED,kDAA6B,GAA7B,UACI,KAAwB,EACxB,MAAc,EACd,IAAS,EACT,iBAA2B;;
|
|
1
|
+
{"version":3,"file":"RestClient.js","sourceRoot":"","sources":["../../../../src/common/external/communication/RestClient.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qFAA+D;AAC/D,6EAAmH;AAEnH,gDAA0B;AAE1B,yGAAmF;AACnF,oEAA8C;AAC9C,4DAAsC;AAOtC,IAAM,oBAAoB,GAAkB;IACxC,iBAAiB,EAAE,KAAK;IACxB,aAAa,EAAE,KAAK;CACvB,CAAC;AAEF;IAMI,oBAAY,GAAW,EAAE,gBAAiC;QAAjC,iCAAA,EAAA,wBAAiC;QACtD,IAAI,CAAC,QAAQ,GAAG,mBAAS,CAAC,a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KAAK,GAAU,SAEpB;wBAED,IAAI,OAAO,IAAI,CAAC,eAAe,KAAK,UAAU,EAAE;4BAC5C,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;yBAC/B;wBAED,sBAAO,IAAI,EAAC;;;wBAEZ,sBAAO,KAAK,EAAC;4BAIrB,sBAAO,IAAI,KAAK,GAAG,EAAC;;;;KACvB;IACL,iBAAC;AAAD,CAAC,AArTD,IAqTC"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
var TranslationConstants_1 = require("../constants/TranslationConstants");
|
|
4
7
|
var Regions_1 = require("../constants/Regions");
|
|
8
|
+
var Utils_1 = __importDefault(require("./Utils"));
|
|
5
9
|
var HttpUtils = /** @class */ (function () {
|
|
6
10
|
function HttpUtils() {
|
|
7
11
|
}
|
|
@@ -20,6 +24,15 @@ var HttpUtils = /** @class */ (function () {
|
|
|
20
24
|
return TranslationConstants_1.EUROPE_URL;
|
|
21
25
|
}
|
|
22
26
|
};
|
|
27
|
+
HttpUtils.getFormDataFromObject = function (object) {
|
|
28
|
+
var formData = Utils_1.default.getNewFormDataObject();
|
|
29
|
+
Object.keys(object).map(function (key) {
|
|
30
|
+
if (object[key]) {
|
|
31
|
+
formData.append(key.replace(/^_/, ''), object[key]);
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
return formData;
|
|
35
|
+
};
|
|
23
36
|
return HttpUtils;
|
|
24
37
|
}());
|
|
25
38
|
exports.default = HttpUtils;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpUtils.js","sourceRoot":"","sources":["../../../src/common/utils/HttpUtils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"HttpUtils.js","sourceRoot":"","sources":["../../../src/common/utils/HttpUtils.ts"],"names":[],"mappings":";;;;;AAAA,0EAAuE;AACvE,gDAA+C;AAC/C,kDAA4B;AAE5B;IAAA;IA6BA,CAAC;IA5BU,uBAAa,GAApB,UAAqB,MAAc;QAC/B,IAAI,GAAG,GAAG,MAAM,CAAC;QACjB,IAAI,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;YAC3E,GAAG,GAAG,UAAU,GAAG,MAAM,CAAC;SAC7B;QAED,OAAO,GAAG,CAAC;IACf,CAAC;IAEM,wBAAc,GAArB,UAAsB,MAAe;QACjC,IAAI,MAAM,KAAK,iBAAO,CAAC,EAAE,EAAE;YACvB,OAAO,6BAAM,CAAC;SACjB;aAAM;YACH,OAAO,iCAAU,CAAC;SACrB;IACL,CAAC;IAEM,+BAAqB,GAA5B,UAA6B,MAA2B;QACpD,IAAM,QAAQ,GAAG,eAAK,CAAC,oBAAoB,EAAE,CAAC;QAE9C,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,UAAC,GAAW;YAChC,IAAI,MAAM,CAAC,GAAG,CAAC,EAAE;gBACb,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;aACvD;QACL,CAAC,CAAC,CAAC;QAEH,OAAO,QAAQ,CAAC;IACpB,CAAC;IACL,gBAAC;AAAD,CAAC,AA7BD,IA6BC"}
|
|
@@ -27,8 +27,15 @@ export default class Utils {
|
|
|
27
27
|
static getExtensionInNode(file: string): string;
|
|
28
28
|
static validateDirectoryPath(directoryPath: string): string | null;
|
|
29
29
|
static validateFilePath(filePath: string): string | null;
|
|
30
|
+
static isDirectoryPath(directoryPath: string): any;
|
|
31
|
+
static isFilePath(filePath: string): any;
|
|
30
32
|
static getFileSize(file: string | File): number;
|
|
33
|
+
static getFilesSizeForContentInsights(files: string | File | File[]): Promise<any>;
|
|
34
|
+
static isArrayOfFiles(array: any): boolean;
|
|
35
|
+
static getInputFilesFromDirectory(input: string): Promise<any>;
|
|
31
36
|
static getFileBasename(file: string | File): string;
|
|
32
37
|
static getFilename(file: string | File): string;
|
|
33
38
|
static getNewFormDataObject(): any;
|
|
39
|
+
static validateInputDirectoryForNode(input: string): Promise<string | null>;
|
|
40
|
+
static getFileSizeExceededError(inputFile: string | File): string;
|
|
34
41
|
}
|