@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
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
var CreateFeedbackRequest_1 = __importDefault(require("../../common/request/CreateFeedbackRequest"));
|
|
22
|
+
var CloudFeedbackApiModel_1 = __importDefault(require("../api/CloudFeedbackApiModel"));
|
|
23
|
+
var CloudTranslationFeedback_1 = __importDefault(require("../api/CloudTranslationFeedback"));
|
|
24
|
+
var CloudFeedbackImprovement_1 = __importDefault(require("../api/CloudFeedbackImprovement"));
|
|
25
|
+
var CloudFeedbackRating_1 = __importDefault(require("../api/CloudFeedbackRating"));
|
|
26
|
+
var CloudCreateFeedbackRequest = /** @class */ (function (_super) {
|
|
27
|
+
__extends(CloudCreateFeedbackRequest, _super);
|
|
28
|
+
function CloudCreateFeedbackRequest() {
|
|
29
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
30
|
+
}
|
|
31
|
+
Object.defineProperty(CloudCreateFeedbackRequest.prototype, "translationMetadata", {
|
|
32
|
+
get: function () {
|
|
33
|
+
return this._translationMetadata;
|
|
34
|
+
},
|
|
35
|
+
set: function (value) {
|
|
36
|
+
this._translationMetadata = value;
|
|
37
|
+
},
|
|
38
|
+
enumerable: false,
|
|
39
|
+
configurable: true
|
|
40
|
+
});
|
|
41
|
+
Object.defineProperty(CloudCreateFeedbackRequest.prototype, "numberOfSegments", {
|
|
42
|
+
get: function () {
|
|
43
|
+
return this._numberOfSegments;
|
|
44
|
+
},
|
|
45
|
+
set: function (value) {
|
|
46
|
+
this._numberOfSegments = value;
|
|
47
|
+
},
|
|
48
|
+
enumerable: false,
|
|
49
|
+
configurable: true
|
|
50
|
+
});
|
|
51
|
+
Object.defineProperty(CloudCreateFeedbackRequest.prototype, "rating", {
|
|
52
|
+
get: function () {
|
|
53
|
+
return this._rating;
|
|
54
|
+
},
|
|
55
|
+
set: function (value) {
|
|
56
|
+
this._rating = value;
|
|
57
|
+
},
|
|
58
|
+
enumerable: false,
|
|
59
|
+
configurable: true
|
|
60
|
+
});
|
|
61
|
+
Object.defineProperty(CloudCreateFeedbackRequest.prototype, "qualityEstimationMT", {
|
|
62
|
+
get: function () {
|
|
63
|
+
return this._qualityEstimationMT;
|
|
64
|
+
},
|
|
65
|
+
set: function (value) {
|
|
66
|
+
this._qualityEstimationMT = value;
|
|
67
|
+
},
|
|
68
|
+
enumerable: false,
|
|
69
|
+
configurable: true
|
|
70
|
+
});
|
|
71
|
+
Object.defineProperty(CloudCreateFeedbackRequest.prototype, "qualityEstimation", {
|
|
72
|
+
get: function () {
|
|
73
|
+
return this._qualityEstimation;
|
|
74
|
+
},
|
|
75
|
+
set: function (value) {
|
|
76
|
+
this._qualityEstimation = value;
|
|
77
|
+
},
|
|
78
|
+
enumerable: false,
|
|
79
|
+
configurable: true
|
|
80
|
+
});
|
|
81
|
+
CloudCreateFeedbackRequest.prototype.toCloudFeedbackApiModel = function () {
|
|
82
|
+
var feedbackApiModel = new CloudFeedbackApiModel_1.default();
|
|
83
|
+
var translation = new CloudTranslationFeedback_1.default();
|
|
84
|
+
translation.sourceLanguageId = this.sourceLanguageId;
|
|
85
|
+
translation.targetLanguageId = this.targetLanguageId;
|
|
86
|
+
translation.model = this.model;
|
|
87
|
+
translation.sourceText = this.sourceText;
|
|
88
|
+
translation.targetMTText = this.targetText;
|
|
89
|
+
translation.metadata = this.translationMetadata;
|
|
90
|
+
translation.numberOfSegments = this.numberOfSegments;
|
|
91
|
+
translation.qualityEstimationMT = this.qualityEstimationMT;
|
|
92
|
+
var rating = new CloudFeedbackRating_1.default();
|
|
93
|
+
rating.score = this.rating;
|
|
94
|
+
rating.comments = this.comments;
|
|
95
|
+
feedbackApiModel.translation = translation;
|
|
96
|
+
feedbackApiModel.improvement = new CloudFeedbackImprovement_1.default(this.suggestedTranslation);
|
|
97
|
+
feedbackApiModel.rating = rating;
|
|
98
|
+
feedbackApiModel.qualityEstimation = this.qualityEstimation;
|
|
99
|
+
return feedbackApiModel;
|
|
100
|
+
};
|
|
101
|
+
return CloudCreateFeedbackRequest;
|
|
102
|
+
}(CreateFeedbackRequest_1.default));
|
|
103
|
+
exports.default = CloudCreateFeedbackRequest;
|
|
104
|
+
//# sourceMappingURL=CloudCreateFeedbackRequest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CloudCreateFeedbackRequest.js","sourceRoot":"","sources":["../../../../../src/translation/feedback/cloud/request/CloudCreateFeedbackRequest.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,qGAA+E;AAE/E,uFAAiE;AACjE,6FAAuE;AACvE,6FAAuE;AACvE,mFAA6D;AAE7D;IAAwD,8CAAqB;IAA7E;;IAoEA,CAAC;IA7DG,sBAAI,2DAAmB;aAAvB;YACI,OAAO,IAAI,CAAC,oBAAoB,CAAC;QACrC,CAAC;aAED,UAAwB,KAAyB;YAC7C,IAAI,CAAC,oBAAoB,GAAG,KAAK,CAAC;QACtC,CAAC;;;OAJA;IAMD,sBAAI,wDAAgB;aAApB;YACI,OAAO,IAAI,CAAC,iBAAiB,CAAC;QAClC,CAAC;aAED,UAAqB,KAAyB;YAC1C,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC;QACnC,CAAC;;;OAJA;IAMD,sBAAI,8CAAM;aAAV;YACI,OAAO,IAAI,CAAC,OAAO,CAAC;QACxB,CAAC;aAED,UAAW,KAAyB;YAChC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACzB,CAAC;;;OAJA;IAMD,sBAAI,2DAAmB;aAAvB;YACI,OAAO,IAAI,CAAC,oBAAoB,CAAC;QACrC,CAAC;aAED,UAAwB,KAAoC;YACxD,IAAI,CAAC,oBAAoB,GAA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AAAD,CAAC,AApED,CAAwD,+BAAqB,GAoE5E"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
var DeleteFeedbackRequest_1 = __importDefault(require("../../common/request/DeleteFeedbackRequest"));
|
|
22
|
+
var CloudDeleteFeedbackRequest = /** @class */ (function (_super) {
|
|
23
|
+
__extends(CloudDeleteFeedbackRequest, _super);
|
|
24
|
+
function CloudDeleteFeedbackRequest() {
|
|
25
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
26
|
+
}
|
|
27
|
+
return CloudDeleteFeedbackRequest;
|
|
28
|
+
}(DeleteFeedbackRequest_1.default));
|
|
29
|
+
exports.default = CloudDeleteFeedbackRequest;
|
|
30
|
+
//# sourceMappingURL=CloudDeleteFeedbackRequest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CloudDeleteFeedbackRequest.js","sourceRoot":"","sources":["../../../../../src/translation/feedback/cloud/request/CloudDeleteFeedbackRequest.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,qGAA+E;AAE/E;IAAwD,8CAAqB;IAA7E;;IAA+E,CAAC;IAAD,iCAAC;AAAD,CAAC,AAAhF,CAAwD,+BAAqB,GAAG"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Order } from '../../../../common/constants/Order';
|
|
2
|
-
import { CloudFeedbackSortCriteria } from '
|
|
2
|
+
import { CloudFeedbackSortCriteria } from '../../../../common/constants/CloudFeedbackSortCriteria';
|
|
3
3
|
export default class CloudFeedbackSortRequest {
|
|
4
4
|
private _criteria;
|
|
5
5
|
private _order;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
var UpdateFeedbackApprovalRequest_1 = __importDefault(require("../../common/request/UpdateFeedbackApprovalRequest"));
|
|
22
|
+
var CloudUpdateFeedbackApprovalRequest = /** @class */ (function (_super) {
|
|
23
|
+
__extends(CloudUpdateFeedbackApprovalRequest, _super);
|
|
24
|
+
function CloudUpdateFeedbackApprovalRequest() {
|
|
25
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
26
|
+
}
|
|
27
|
+
return CloudUpdateFeedbackApprovalRequest;
|
|
28
|
+
}(UpdateFeedbackApprovalRequest_1.default));
|
|
29
|
+
exports.default = CloudUpdateFeedbackApprovalRequest;
|
|
30
|
+
//# sourceMappingURL=CloudUpdateFeedbackApprovalRequest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CloudUpdateFeedbackApprovalRequest.js","sourceRoot":"","sources":["../../../../../src/translation/feedback/cloud/request/CloudUpdateFeedbackApprovalRequest.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,qHAA+F;AAE/F;IAAgE,sDAA6B;IAA7F;;IAA+F,CAAC;IAAD,yCAAC;AAAD,CAAC,AAAhG,CAAgE,uCAA6B,GAAG"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import UpdateFeedbackRequest from '../../common/request/UpdateFeedbackRequest';
|
|
2
|
+
import { QualityEstimation } from '../../../../common/constants/QualityEstimation';
|
|
3
|
+
import CloudFeedbackApiModel from '../api/CloudFeedbackApiModel';
|
|
4
|
+
export default class CloudUpdateFeedbackRequest extends UpdateFeedbackRequest {
|
|
5
|
+
private _selectedText;
|
|
6
|
+
private _rating;
|
|
7
|
+
private _qualityEstimation;
|
|
8
|
+
get selectedText(): string | undefined;
|
|
9
|
+
set selectedText(value: string | undefined);
|
|
10
|
+
get rating(): number | undefined;
|
|
11
|
+
set rating(value: number | undefined);
|
|
12
|
+
get qualityEstimation(): QualityEstimation | undefined;
|
|
13
|
+
set qualityEstimation(value: QualityEstimation | undefined);
|
|
14
|
+
toCloudFeedbackApiModel(): CloudFeedbackApiModel;
|
|
15
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
var UpdateFeedbackRequest_1 = __importDefault(require("../../common/request/UpdateFeedbackRequest"));
|
|
22
|
+
var CloudFeedbackApiModel_1 = __importDefault(require("../api/CloudFeedbackApiModel"));
|
|
23
|
+
var CloudTranslationFeedback_1 = __importDefault(require("../api/CloudTranslationFeedback"));
|
|
24
|
+
var CloudFeedbackRating_1 = __importDefault(require("../api/CloudFeedbackRating"));
|
|
25
|
+
var CloudFeedbackImprovement_1 = __importDefault(require("../api/CloudFeedbackImprovement"));
|
|
26
|
+
var CloudUpdateFeedbackRequest = /** @class */ (function (_super) {
|
|
27
|
+
__extends(CloudUpdateFeedbackRequest, _super);
|
|
28
|
+
function CloudUpdateFeedbackRequest() {
|
|
29
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
30
|
+
}
|
|
31
|
+
Object.defineProperty(CloudUpdateFeedbackRequest.prototype, "selectedText", {
|
|
32
|
+
get: function () {
|
|
33
|
+
return this._selectedText;
|
|
34
|
+
},
|
|
35
|
+
set: function (value) {
|
|
36
|
+
this._selectedText = value;
|
|
37
|
+
},
|
|
38
|
+
enumerable: false,
|
|
39
|
+
configurable: true
|
|
40
|
+
});
|
|
41
|
+
Object.defineProperty(CloudUpdateFeedbackRequest.prototype, "rating", {
|
|
42
|
+
get: function () {
|
|
43
|
+
return this._rating;
|
|
44
|
+
},
|
|
45
|
+
set: function (value) {
|
|
46
|
+
this._rating = value;
|
|
47
|
+
},
|
|
48
|
+
enumerable: false,
|
|
49
|
+
configurable: true
|
|
50
|
+
});
|
|
51
|
+
Object.defineProperty(CloudUpdateFeedbackRequest.prototype, "qualityEstimation", {
|
|
52
|
+
get: function () {
|
|
53
|
+
return this._qualityEstimation;
|
|
54
|
+
},
|
|
55
|
+
set: function (value) {
|
|
56
|
+
this._qualityEstimation = value;
|
|
57
|
+
},
|
|
58
|
+
enumerable: false,
|
|
59
|
+
configurable: true
|
|
60
|
+
});
|
|
61
|
+
CloudUpdateFeedbackRequest.prototype.toCloudFeedbackApiModel = function () {
|
|
62
|
+
var feedbackApiModel = new CloudFeedbackApiModel_1.default();
|
|
63
|
+
var translation = new CloudTranslationFeedback_1.default();
|
|
64
|
+
translation.selectedText = this.selectedText;
|
|
65
|
+
var rating = new CloudFeedbackRating_1.default();
|
|
66
|
+
rating.score = this.rating;
|
|
67
|
+
rating.comments = this.comments;
|
|
68
|
+
feedbackApiModel.translation = translation;
|
|
69
|
+
feedbackApiModel.rating = rating;
|
|
70
|
+
feedbackApiModel.improvement = new CloudFeedbackImprovement_1.default(this.suggestedTranslation);
|
|
71
|
+
feedbackApiModel.qualityEstimation = this.qualityEstimation;
|
|
72
|
+
return feedbackApiModel;
|
|
73
|
+
};
|
|
74
|
+
return CloudUpdateFeedbackRequest;
|
|
75
|
+
}(UpdateFeedbackRequest_1.default));
|
|
76
|
+
exports.default = CloudUpdateFeedbackRequest;
|
|
77
|
+
//# sourceMappingURL=CloudUpdateFeedbackRequest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CloudUpdateFeedbackRequest.js","sourceRoot":"","sources":["../../../../../src/translation/feedback/cloud/request/CloudUpdateFeedbackRequest.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,qGAA+E;AAE/E,uFAAiE;AACjE,6FAAuE;AACvE,mFAA6D;AAC7D,6FAAuE;AAEvE;IAAwD,8CAAqB;IAA7E;;IA2CA,CAAC;IAtCG,sBAAI,oDAAY;aAAhB;YACI,OAAO,IAAI,CAAC,aAAa,CAAC;QAC9B,CAAC;aAED,UAAiB,KAAyB;YACtC,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;QAC/B,CAAC;;;OAJA;IAMD,sBAAI,8CAAM;aAAV;YACI,OAAO,IAAI,CAAC,OAAO,CAAC;QACxB,CAAC;aAED,UAAW,KAAyB;YAChC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACzB,CAAC;;;OAJA;IAMD,sBAAI,yDAAiB;aAArB;YACI,OAAO,IAAI,CAAC,kBAAkB,CAAC;QACnC,CAAC;aAED,UAAsB,KAAoC;YACtD,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC;QACpC,CAAC;;;OAJA;IAMM,4DAAuB,GAA9B;QACI,IAAM,gBAAgB,GAAG,IAAI,+BAAqB,EAAE,CAAC;QACrD,IAAM,WAAW,GAAG,IAAI,kCAAwB,EAAE,CAAC;QACnD,WAAW,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;QAC7C,IAAM,MAAM,GAAG,IAAI,6BAAmB,EAAE,CAAC;QACzC,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC;QAC3B,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAChC,gBAAgB,CAAC,WAAW,GAAG,WAAW,CAAC;QAC3C,gBAAgB,CAAC,MAAM,GAAG,MAAM,CAAC;QACjC,gBAAgB,CAAC,WAAW,GAAG,IAAI,kCAAwB,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;QACvF,gBAAgB,CAAC,iBAAiB,GAAG,IAAI,CAAC,iBAAiB,CAAC;QAE5D,OAAO,gBAAgB,CAAC;IAC5B,CAAC;IACL,iCAAC;AAAD,CAAC,AA3CD,CAAwD,+BAAqB,GA2C5E"}
|
|
@@ -18,7 +18,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
18
18
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
19
|
};
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
var AuditData_1 = __importDefault(require("../../common/
|
|
21
|
+
var AuditData_1 = __importDefault(require("../../common/result/AuditData"));
|
|
22
22
|
var CloudAuditData = /** @class */ (function (_super) {
|
|
23
23
|
__extends(CloudAuditData, _super);
|
|
24
24
|
function CloudAuditData() {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CloudAuditData.js","sourceRoot":"","sources":["../../../../../src/translation/feedback/cloud/result/CloudAuditData.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,4EAAsD;AAEtD;IAA4C,kCAAS;IAArD;;IAuDA,CAAC;IA/CG,sBAAI,8CAAkB;aAAtB;YACI,OAAO,IAAI,CAAC,mBAAmB,CAAC;QACpC,CAAC;aAED,UAAuB,KAAyB;YAC5C,IAAI,CAAC,mBAAmB,GAAG,KAAK,CAAC;QACrC,CAAC;;;OAJA;IAMD,sBAAI,6CAAiB;aAArB;YACI,OAAO,IAAI,CAAC,kBAAkB,CAAC;QACnC,CAAC;aAED,UAAsB,KAAyB;YAC3C,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC;QACpC,CAAC;;;OAJA;IAMD,sBAAI,2CAAe;aAAnB;YACI,OAAO,IAAI,CAAC,gBAAgB,CAAC;QACjC,CAAC;aAED,UAAoB,KAAyB;YACzC,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC;QAClC,CAAC;;;OAJA;IAMD,sBAAI,mDAAuB;aAA3B;YACI,OAAO,IAAI,CAAC,wBAAwB,CAAC;QACzC,CAAC;aAED,UAA4B,KAAyB;YACjD,IAAI,CAAC,wBAAwB,GAAG,KAAK,CAAC;QAC1C,CAAC;;;OAJA;IAMD,sBAAI,kDAAsB;aAA1B;YACI,OAAO,IAAI,CAAC,uBAAuB,CAAC;QACxC,CAAC;aAED,UAA2B,KAAyB;YAChD,IAAI,CAAC,uBAAuB,GAAG,KAAK,CAAC;QACzC,CAAC;;;OAJA;IAMD,sBAAI,gDAAoB;aAAxB;YACI,OAAO,IAAI,CAAC,qBAAqB,CAAC;QACtC,CAAC;aAED,UAAyB,KAAyB;YAC9C,IAAI,CAAC,qBAAqB,GAAG,KAAK,CAAC;QACvC,CAAC;;;OAJA;IAKL,qBAAC;AAAD,CAAC,AAvDD,CAA4C,mBAAS,GAuDpD"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import CloudAuditData from '
|
|
1
|
+
import CloudAuditData from './CloudAuditData';
|
|
2
2
|
import FeedbackCommonResult from '../../common/result/FeedbackCommonResult';
|
|
3
|
+
import { QualityEstimation } from '../../../../common/constants/QualityEstimation';
|
|
3
4
|
export default class CloudFeedbackResult extends FeedbackCommonResult {
|
|
4
5
|
private _selectedText;
|
|
5
6
|
private _translationMetadata;
|
|
6
7
|
private _numberOfSegments;
|
|
7
8
|
private _ratingScore;
|
|
8
9
|
private _qualityEstimation;
|
|
10
|
+
private _qualityEstimationMT;
|
|
9
11
|
private _feedbackAuditData;
|
|
10
12
|
private _approvalAuditData;
|
|
11
13
|
get selectedText(): string | undefined;
|
|
@@ -16,8 +18,10 @@ export default class CloudFeedbackResult extends FeedbackCommonResult {
|
|
|
16
18
|
set numberOfSegments(value: number | undefined);
|
|
17
19
|
get ratingScore(): number | undefined;
|
|
18
20
|
set ratingScore(value: number | undefined);
|
|
19
|
-
get qualityEstimation():
|
|
20
|
-
set qualityEstimation(value:
|
|
21
|
+
get qualityEstimation(): QualityEstimation | undefined;
|
|
22
|
+
set qualityEstimation(value: QualityEstimation | undefined);
|
|
23
|
+
get qualityEstimationMT(): QualityEstimation | undefined;
|
|
24
|
+
set qualityEstimationMT(value: QualityEstimation | undefined);
|
|
21
25
|
get feedbackAuditData(): CloudAuditData | undefined;
|
|
22
26
|
set feedbackAuditData(value: CloudAuditData | undefined);
|
|
23
27
|
get approvalAuditData(): CloudAuditData | undefined;
|
|
@@ -74,6 +74,16 @@ var CloudFeedbackResult = /** @class */ (function (_super) {
|
|
|
74
74
|
enumerable: false,
|
|
75
75
|
configurable: true
|
|
76
76
|
});
|
|
77
|
+
Object.defineProperty(CloudFeedbackResult.prototype, "qualityEstimationMT", {
|
|
78
|
+
get: function () {
|
|
79
|
+
return this._qualityEstimationMT;
|
|
80
|
+
},
|
|
81
|
+
set: function (value) {
|
|
82
|
+
this._qualityEstimationMT = value;
|
|
83
|
+
},
|
|
84
|
+
enumerable: false,
|
|
85
|
+
configurable: true
|
|
86
|
+
});
|
|
77
87
|
Object.defineProperty(CloudFeedbackResult.prototype, "feedbackAuditData", {
|
|
78
88
|
get: function () {
|
|
79
89
|
return this._feedbackAuditData;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CloudFeedbackResult.js","sourceRoot":"","sources":["../../../../../src/translation/feedback/cloud/result/CloudFeedbackResult.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AACA,kGAA4E;
|
|
1
|
+
{"version":3,"file":"CloudFeedbackResult.js","sourceRoot":"","sources":["../../../../../src/translation/feedback/cloud/result/CloudFeedbackResult.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AACA,kGAA4E;AAG5E;IAAiD,uCAAoB;IAArE;;IAyEA,CAAC;IA/DG,sBAAI,6CAAY;aAAhB;YACI,OAAO,IAAI,CAAC,aAAa,CAAC;QAC9B,CAAC;aAED,UAAiB,KAA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iD,8BAAoB,GAyEpE"}
|
|
@@ -6,6 +6,16 @@ import FeedbackListResult from '../../common/result/FeedbackListResult';
|
|
|
6
6
|
import CloudFilterFeedbackRequest from '../request/CloudFilterFeedbackRequest';
|
|
7
7
|
import CloudFeedbackListResult from '../result/CloudFeedbackListResult';
|
|
8
8
|
import Token from '../../../../common/auth/domain/Token';
|
|
9
|
+
import CreateFeedbackRequest from '../../common/request/CreateFeedbackRequest';
|
|
10
|
+
import FeedbackResult from '../../common/result/FeedbackResult';
|
|
11
|
+
import CloudCreateFeedbackRequest from '../request/CloudCreateFeedbackRequest';
|
|
12
|
+
import CloudFeedbackResult from '../result/CloudFeedbackResult';
|
|
13
|
+
import UpdateFeedbackRequest from '../../common/request/UpdateFeedbackRequest';
|
|
14
|
+
import CloudUpdateFeedbackRequest from '../request/CloudUpdateFeedbackRequest';
|
|
15
|
+
import UpdateFeedbackApprovalRequest from '../../common/request/UpdateFeedbackApprovalRequest';
|
|
16
|
+
import CloudUpdateFeedbackApprovalRequest from '../request/CloudUpdateFeedbackApprovalRequest';
|
|
17
|
+
import DeleteFeedbackRequest from '../../common/request/DeleteFeedbackRequest';
|
|
18
|
+
import CloudDeleteFeedbackRequest from '../request/CloudDeleteFeedbackRequest';
|
|
9
19
|
export default class CloudFeedbackService {
|
|
10
20
|
private readonly _selfInfo;
|
|
11
21
|
private readonly _client;
|
|
@@ -14,6 +24,17 @@ export default class CloudFeedbackService {
|
|
|
14
24
|
constructor(client: RestClient, token: Token | undefined, selfInfo: SelfInformation | UserSelfInformation | undefined);
|
|
15
25
|
getAllFeedback(pageNumber: number, pageSize?: number, filterRequest?: FilterFeedbackRequest): Promise<FeedbackListResult>;
|
|
16
26
|
getAllCloudFeedback(pageNumber: number, pageSize?: number, filterRequest?: CloudFilterFeedbackRequest): Promise<CloudFeedbackListResult>;
|
|
27
|
+
createFeedback(feedbackRequest: CreateFeedbackRequest): Promise<FeedbackResult>;
|
|
28
|
+
createCloudFeedback(feedbackRequest: CloudCreateFeedbackRequest): Promise<CloudFeedbackResult>;
|
|
29
|
+
updateFeedback(feedbackRequest: UpdateFeedbackRequest): Promise<FeedbackResult>;
|
|
30
|
+
updateCloudFeedback(feedbackRequest: CloudUpdateFeedbackRequest): Promise<CloudFeedbackResult>;
|
|
31
|
+
updateFeedbackApproval(feedbackRequest: UpdateFeedbackApprovalRequest): Promise<FeedbackResult>;
|
|
32
|
+
updateCloudFeedbackApproval(feedbackRequest: CloudUpdateFeedbackApprovalRequest): Promise<CloudFeedbackResult>;
|
|
33
|
+
deleteFeedback(feedbackRequest: DeleteFeedbackRequest): Promise<null>;
|
|
34
|
+
deleteCloudFeedback(feedbackRequest: CloudDeleteFeedbackRequest): Promise<null>;
|
|
35
|
+
private performCreateFeedback;
|
|
36
|
+
private performUpdateFeedback;
|
|
37
|
+
private performUpdateApprovalRequest;
|
|
17
38
|
private performGetAllFeedback;
|
|
18
39
|
private getSortQueryParams;
|
|
19
40
|
private getPageQueryParams;
|
|
@@ -17,9 +17,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
var CloudFeedbackListResponse_1 = __importDefault(require("../api/CloudFeedbackListResponse"));
|
|
18
18
|
var CloudFilterFeedbackRequest_1 = __importDefault(require("../request/CloudFilterFeedbackRequest"));
|
|
19
19
|
var CloudFilterFeedbackApiRequest_1 = __importDefault(require("../api/CloudFilterFeedbackApiRequest"));
|
|
20
|
-
var CloudFeedbackValidator_1 = __importDefault(require("../
|
|
20
|
+
var CloudFeedbackValidator_1 = __importDefault(require("../validator/CloudFeedbackValidator"));
|
|
21
21
|
var TranslationConstants_1 = require("../../../../common/constants/TranslationConstants");
|
|
22
22
|
var CloudFeedbackApiModel_1 = __importDefault(require("../api/CloudFeedbackApiModel"));
|
|
23
|
+
var CloudCreateFeedbackRequest_1 = __importDefault(require("../request/CloudCreateFeedbackRequest"));
|
|
24
|
+
var CloudUpdateFeedbackRequest_1 = __importDefault(require("../request/CloudUpdateFeedbackRequest"));
|
|
25
|
+
var CloudFeedbackApprovalListUpdateRequest_1 = __importDefault(require("../api/CloudFeedbackApprovalListUpdateRequest"));
|
|
26
|
+
var CloudFeedbackApprovalUpdateRequest_1 = __importDefault(require("../api/CloudFeedbackApprovalUpdateRequest"));
|
|
27
|
+
var ApprovalStatus_1 = require("../../../../common/constants/ApprovalStatus");
|
|
28
|
+
var CloudDeleteFeedbackRequest_1 = __importDefault(require("../request/CloudDeleteFeedbackRequest"));
|
|
23
29
|
var PAGE_SIZE_QUERY_PARAM = 'pageSize';
|
|
24
30
|
var SORT_QUERY_PARAM = 'sort';
|
|
25
31
|
var CloudFeedbackService = /** @class */ (function () {
|
|
@@ -39,6 +45,110 @@ var CloudFeedbackService = /** @class */ (function () {
|
|
|
39
45
|
.then(function (response) { return Promise.resolve(response.toCloudResult()); })
|
|
40
46
|
.catch(function (e) { return Promise.reject(e); });
|
|
41
47
|
};
|
|
48
|
+
CloudFeedbackService.prototype.createFeedback = function (feedbackRequest) {
|
|
49
|
+
var validationError = this._validator.validateSingleComment(feedbackRequest);
|
|
50
|
+
if (validationError) {
|
|
51
|
+
return Promise.reject({ message: validationError });
|
|
52
|
+
}
|
|
53
|
+
return this.performCreateFeedback(feedbackRequest)
|
|
54
|
+
.then(function (response) { return Promise.resolve(response.toResult()); })
|
|
55
|
+
.catch(function (e) { return Promise.reject(e); });
|
|
56
|
+
};
|
|
57
|
+
CloudFeedbackService.prototype.createCloudFeedback = function (feedbackRequest) {
|
|
58
|
+
var validationError = this._validator.validateCreateFeedbackRequest(feedbackRequest);
|
|
59
|
+
if (validationError) {
|
|
60
|
+
return Promise.reject({ message: validationError });
|
|
61
|
+
}
|
|
62
|
+
return this.performCreateFeedback(feedbackRequest)
|
|
63
|
+
.then(function (response) { return Promise.resolve(response.toCloudResult()); })
|
|
64
|
+
.catch(function (e) { return Promise.reject(e); });
|
|
65
|
+
};
|
|
66
|
+
CloudFeedbackService.prototype.updateFeedback = function (feedbackRequest) {
|
|
67
|
+
return this.performUpdateFeedback(feedbackRequest)
|
|
68
|
+
.then(function (response) { return Promise.resolve(response.toResult()); })
|
|
69
|
+
.catch(function (e) { return Promise.reject(e); });
|
|
70
|
+
};
|
|
71
|
+
CloudFeedbackService.prototype.updateCloudFeedback = function (feedbackRequest) {
|
|
72
|
+
return this.performUpdateFeedback(feedbackRequest)
|
|
73
|
+
.then(function (response) { return Promise.resolve(response.toCloudResult()); })
|
|
74
|
+
.catch(function (e) { return Promise.reject(e); });
|
|
75
|
+
};
|
|
76
|
+
CloudFeedbackService.prototype.updateFeedbackApproval = function (feedbackRequest) {
|
|
77
|
+
return this.performUpdateApprovalRequest(feedbackRequest)
|
|
78
|
+
.then(function (response) { return Promise.resolve(response.toResult()); })
|
|
79
|
+
.catch(function (e) { return Promise.reject(e); });
|
|
80
|
+
};
|
|
81
|
+
CloudFeedbackService.prototype.updateCloudFeedbackApproval = function (feedbackRequest) {
|
|
82
|
+
return this.performUpdateApprovalRequest(feedbackRequest)
|
|
83
|
+
.then(function (response) { return Promise.resolve(response.toCloudResult()); })
|
|
84
|
+
.catch(function (e) { return Promise.reject(e); });
|
|
85
|
+
};
|
|
86
|
+
CloudFeedbackService.prototype.deleteFeedback = function (feedbackRequest) {
|
|
87
|
+
var cloudFeedbackRequest = new CloudDeleteFeedbackRequest_1.default();
|
|
88
|
+
cloudFeedbackRequest.feedbackId = feedbackRequest.feedbackId;
|
|
89
|
+
return this.deleteCloudFeedback(cloudFeedbackRequest);
|
|
90
|
+
};
|
|
91
|
+
CloudFeedbackService.prototype.deleteCloudFeedback = function (feedbackRequest) {
|
|
92
|
+
var _a;
|
|
93
|
+
var validationError = this._validator.validateDeleteFeedbackRequest(feedbackRequest);
|
|
94
|
+
if (validationError) {
|
|
95
|
+
return Promise.reject({ message: validationError });
|
|
96
|
+
}
|
|
97
|
+
return this._client
|
|
98
|
+
.requestJson(this._token, 'DELETE', "/v4/accounts/".concat((_a = this._selfInfo) === null || _a === void 0 ? void 0 : _a.accountId, "/feedback/translations/").concat(feedbackRequest.feedbackId))
|
|
99
|
+
.then(function () { return Promise.resolve(null); })
|
|
100
|
+
.catch(function (e) { return Promise.reject(e); });
|
|
101
|
+
};
|
|
102
|
+
CloudFeedbackService.prototype.performCreateFeedback = function (feedbackRequest) {
|
|
103
|
+
var _a;
|
|
104
|
+
var apiRequest;
|
|
105
|
+
if (feedbackRequest instanceof CloudCreateFeedbackRequest_1.default) {
|
|
106
|
+
var cloudCreateFeedbackRequest = feedbackRequest;
|
|
107
|
+
apiRequest = cloudCreateFeedbackRequest.toCloudFeedbackApiModel();
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
apiRequest = feedbackRequest.toCloudFeedbackApiModel();
|
|
111
|
+
}
|
|
112
|
+
return this._client
|
|
113
|
+
.requestJson(this._token, 'POST', "/v4/accounts/".concat((_a = this._selfInfo) === null || _a === void 0 ? void 0 : _a.accountId, "/feedback/translations/"), apiRequest)
|
|
114
|
+
.then(function (response) { return Promise.resolve(new CloudFeedbackApiModel_1.default(response)); })
|
|
115
|
+
.catch(function (e) { return Promise.reject(e); });
|
|
116
|
+
};
|
|
117
|
+
CloudFeedbackService.prototype.performUpdateFeedback = function (feedbackRequest) {
|
|
118
|
+
var _a;
|
|
119
|
+
var validationError = this._validator.validateUpdateFeedbackRequest(feedbackRequest);
|
|
120
|
+
if (validationError) {
|
|
121
|
+
return Promise.reject({ message: validationError });
|
|
122
|
+
}
|
|
123
|
+
var apiRequest;
|
|
124
|
+
if (feedbackRequest instanceof CloudUpdateFeedbackRequest_1.default) {
|
|
125
|
+
var cloudUpdateFeedbackRequest = feedbackRequest;
|
|
126
|
+
apiRequest = cloudUpdateFeedbackRequest.toCloudFeedbackApiModel();
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
apiRequest = feedbackRequest.toCloudFeedbackApiModel();
|
|
130
|
+
}
|
|
131
|
+
return this._client
|
|
132
|
+
.requestJson(this._token, 'PUT', "/v4/accounts/".concat((_a = this._selfInfo) === null || _a === void 0 ? void 0 : _a.accountId, "/feedback/translations/").concat(feedbackRequest.feedbackId), apiRequest)
|
|
133
|
+
.then(function (response) { return Promise.resolve(new CloudFeedbackApiModel_1.default(response)); })
|
|
134
|
+
.catch(function (e) { return Promise.reject(e); });
|
|
135
|
+
};
|
|
136
|
+
CloudFeedbackService.prototype.performUpdateApprovalRequest = function (feedbackRequest) {
|
|
137
|
+
var _a;
|
|
138
|
+
var validationError = this._validator.validateUpdateFeedbackApprovalRequest(feedbackRequest);
|
|
139
|
+
if (validationError) {
|
|
140
|
+
return Promise.reject({ message: validationError });
|
|
141
|
+
}
|
|
142
|
+
var feedbackApprovalRequest = new CloudFeedbackApprovalListUpdateRequest_1.default();
|
|
143
|
+
var feedbackApproval = new CloudFeedbackApprovalUpdateRequest_1.default(feedbackRequest.feedbackId, (0, ApprovalStatus_1.getApprovalStatusKeyByValue)(feedbackRequest.approvalStatus || ''));
|
|
144
|
+
feedbackApprovalRequest.addFeedback(feedbackApproval);
|
|
145
|
+
return this._client
|
|
146
|
+
.requestJson(this._token, 'PUT', "/v4/accounts/".concat((_a = this._selfInfo) === null || _a === void 0 ? void 0 : _a.accountId, "/feedback/translations/approval"), feedbackApprovalRequest)
|
|
147
|
+
.then(function (response) {
|
|
148
|
+
return Promise.resolve(new CloudFeedbackApiModel_1.default(response.feedbackList[0]));
|
|
149
|
+
})
|
|
150
|
+
.catch(function (e) { return Promise.reject(e); });
|
|
151
|
+
};
|
|
42
152
|
CloudFeedbackService.prototype.performGetAllFeedback = function (pageNumber, pageSize, filterRequest) {
|
|
43
153
|
var _a;
|
|
44
154
|
var requestPath = "/v4/accounts/".concat((_a = this._selfInfo) === null || _a === void 0 ? void 0 : _a.accountId, "/feedback/translations/filter");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CloudFeedbackService.js","sourceRoot":"","sources":["../../../../../src/translation/feedback/cloud/service/CloudFeedbackService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAKA,+FAAyE;AACzE,qGAA+E;AAG/E,uGAAiF;AACjF
|
|
1
|
+
{"version":3,"file":"CloudFeedbackService.js","sourceRoot":"","sources":["../../../../../src/translation/feedback/cloud/service/CloudFeedbackService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAKA,+FAAyE;AACzE,qGAA+E;AAG/E,uGAAiF;AACjF,+FAAyE;AAEzE,0FAAwH;AACxH,uFAAiE;AAGjE,qGAA+E;AAG/E,qGAA+E;AAG/E,yHAAmG;AACnG,iHAA2F;AAC3F,8EAA0F;AAE1F,qGAA+E;AAE/E,IAAM,qBAAqB,GAAG,UAAU,CAAC;AACzC,IAAM,gBAAgB,GAAG,MAAM,CAAC;AAEhC;IAMI,8BACI,MAAkB,EAClB,KAAwB,EACxB,QAA2D;QAL9C,eAAU,GAA2B,IAAI,gCAAsB,EAAE,CAAC;QAO/E,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC9B,CAAC;IAEM,6CAAc,GAArB,UACI,UAAkB,EAClB,QAAiB,EACjB,aAAqC;QAErC,OAAO,IAAI,CAAC,qBAAqB,CAAC,UAAU,EAAE,QAAQ,EAAE,aAAa,CAAC;aACjE,IAAI,CAAC,UAAC,QAAmC,IAAK,OAAA,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,EAApC,CAAoC,CAAC;aACnF,KAAK,CAAC,UAAC,CAAC,IAAK,OAAA,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAjB,CAAiB,CAAC,CAAC;IACzC,CAAC;IAEM,kDAAmB,GAA1B,UACI,UAAkB,EAClB,QAAiB,EACjB,aAA0C;QAE1C,OAAO,IAAI,CAAC,qBAAqB,CAAC,UAAU,EAAE,QAAQ,EAAE,aAAa,CAAC;aACjE,IAAI,CAAC,UAAC,QAAmC,IAAK,OAAA,OAAO,CAAC,OAA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AAC,WAAW,CAAC;YAExE,IAAI,WAAW,CAAC,QAAQ,IAAI,WAAW,CAAC,KAAK,EAAE;gBAC3C,WAAW,yBAAQ,WAAW,gBAAG,gBAAgB,IAAG,UAAG,WAAW,CAAC,QAAQ,cAAI,WAAW,CAAC,KAAK,CAAE,MAAE,CAAC;aACxG;SACJ;QAED,OAAO,WAAW,CAAC;IACvB,CAAC;IAEO,iDAAkB,GAA1B,UAA2B,UAAkB,EAAE,QAAiB;;QAC5D,IAAI,WAAW,GAAG,EAAE,CAAC;QAErB,IAAI,UAAU,EAAE;YACZ,WAAW,yBAAQ,WAAW,gBAAG,8CAAuB,IAAG,UAAU,MAAE,CAAC;SAC3E;QAED,WAAW,yBAAQ,WAAW,gBAAG,qBAAqB,IAAG,QAAQ,IAAI,iDAA0B,MAAE,CAAC;QAElG,OAAO,WAAW,CAAC;IACvB,CAAC;IACL,2BAAC;AAAD,CAAC,AA9PD,IA8PC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import FeedbackValidator from '../../common/validator/FeedbackValidator';
|
|
2
|
+
import CloudFeedbackSortRequest from '../request/CloudFeedbackSortRequest';
|
|
3
|
+
import CloudCreateFeedbackRequest from '../request/CloudCreateFeedbackRequest';
|
|
4
|
+
import UpdateFeedbackRequest from '../../common/request/UpdateFeedbackRequest';
|
|
5
|
+
export default class CloudFeedbackValidator extends FeedbackValidator {
|
|
6
|
+
validateCloudFeedbackSortRequest(sortRequest: CloudFeedbackSortRequest | undefined): "Both order and criteria should be specified for feedback sorting" | null;
|
|
7
|
+
validateCreateFeedbackRequest(createFeedbackRequest: CloudCreateFeedbackRequest): "Rating must be between 1 and 5" | undefined;
|
|
8
|
+
validateUpdateFeedbackRequest(updateFeedbackRequest: UpdateFeedbackRequest): "feedbackId is required for update operations" | "Rating must be between 1 and 5" | null;
|
|
9
|
+
}
|
|
@@ -18,7 +18,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
18
18
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
19
|
};
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
var FeedbackValidator_1 = __importDefault(require("../../common/
|
|
21
|
+
var FeedbackValidator_1 = __importDefault(require("../../common/validator/FeedbackValidator"));
|
|
22
|
+
var CloudUpdateFeedbackRequest_1 = __importDefault(require("../request/CloudUpdateFeedbackRequest"));
|
|
22
23
|
var CloudFeedbackValidator = /** @class */ (function (_super) {
|
|
23
24
|
__extends(CloudFeedbackValidator, _super);
|
|
24
25
|
function CloudFeedbackValidator() {
|
|
@@ -30,6 +31,24 @@ var CloudFeedbackValidator = /** @class */ (function (_super) {
|
|
|
30
31
|
}
|
|
31
32
|
return null;
|
|
32
33
|
};
|
|
34
|
+
CloudFeedbackValidator.prototype.validateCreateFeedbackRequest = function (createFeedbackRequest) {
|
|
35
|
+
if (createFeedbackRequest.rating !== undefined &&
|
|
36
|
+
(createFeedbackRequest.rating < 1 || createFeedbackRequest.rating > 5)) {
|
|
37
|
+
return 'Rating must be between 1 and 5';
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
CloudFeedbackValidator.prototype.validateUpdateFeedbackRequest = function (updateFeedbackRequest) {
|
|
41
|
+
if (updateFeedbackRequest instanceof CloudUpdateFeedbackRequest_1.default) {
|
|
42
|
+
if (updateFeedbackRequest.rating !== undefined &&
|
|
43
|
+
(updateFeedbackRequest.rating < 1 || updateFeedbackRequest.rating > 5)) {
|
|
44
|
+
return 'Rating must be between 1 and 5';
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
if (!updateFeedbackRequest.feedbackId) {
|
|
48
|
+
return 'feedbackId is required for update operations';
|
|
49
|
+
}
|
|
50
|
+
return null;
|
|
51
|
+
};
|
|
33
52
|
return CloudFeedbackValidator;
|
|
34
53
|
}(FeedbackValidator_1.default));
|
|
35
54
|
exports.default = CloudFeedbackValidator;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CloudFeedbackValidator.js","sourceRoot":"","sources":["../../../../../src/translation/feedback/cloud/validator/CloudFeedbackValidator.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,+FAAyE;AAGzE,qGAA+E;AAG/E;IAAoD,0CAAiB;IAArE;;IAkCA,CAAC;IAjCU,iEAAgC,GAAvC,UAAwC,WAAiD;QACrF,IAAI,WAAW,IAAI,CAAC,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,EAAE;YAC9D,OAAO,kEAAkE,CAAC;SAC7E;QAED,OAAO,IAAI,CAAC;IAChB,CAAC;IAEM,8DAA6B,GAApC,UAAqC,qBAAiD;QAClF,IACI,qBAAqB,CAAC,MAAM,KAAK,SAAS;YAC1C,CAAC,qBAAqB,CAAC,MAAM,GAAG,CAAC,IAAI,qBAAqB,CAAC,MAAM,GAAG,CAAC,CAAC,EACxE;YACE,OAAO,gCAAgC,CAAC;SAC3C;IACL,CAAC;IAEM,8DAA6B,GAApC,UAAqC,qBAA4C;QAC7E,IAAI,qBAAqB,YAAY,oCAA0B,EAAE;YAC7D,IACI,qBAAqB,CAAC,MAAM,KAAK,SAAS;gBAC1C,CAAC,qBAAqB,CAAC,MAAM,GAAG,CAAC,IAAI,qBAAqB,CAAC,MAAM,GAAG,CAAC,CAAC,EACxE;gBACE,OAAO,gCAAgC,CAAC;aAC3C;SACJ;QAED,IAAI,CAAC,qBAAqB,CAAC,UAAU,EAAE;YACnC,OAAO,8CAA8C,CAAC;SACzD;QAED,OAAO,IAAI,CAAC;IAChB,CAAC;IACL,6BAAC;AAAD,CAAC,AAlCD,CAAoD,2BAAiB,GAkCpE"}
|