@language-weaver/lw-sdk-js 2.0.1 → 2.1.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/Order.d.ts +2 -2
- package/lib/common/constants/Order.js +2 -2
- 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 +6 -0
- package/lib/common/constants/TranslationConstants.js +8 -2
- package/lib/common/constants/TranslationConstants.js.map +1 -1
- package/lib/common/constants/languages/Iso639Mapping.js +4 -0
- package/lib/common/constants/languages/Iso639Mapping.js.map +1 -1
- package/lib/common/exceptions/LanguageDetectionException.d.ts +4 -0
- package/lib/common/exceptions/LanguageDetectionException.js +17 -0
- package/lib/common/exceptions/LanguageDetectionException.js.map +1 -0
- package/lib/index.d.ts +11 -3
- package/lib/index.js +22 -6
- package/lib/index.js.map +1 -1
- package/lib/translation/common/LanguageWeaverClient.d.ts +5 -0
- package/lib/translation/common/cloud/CloudLanguageWeaverClient.d.ts +11 -0
- package/lib/translation/common/cloud/CloudLanguageWeaverClient.js +34 -0
- package/lib/translation/common/cloud/CloudLanguageWeaverClient.js.map +1 -1
- package/lib/translation/common/edge/EdgeLanguageWeaverClient.d.ts +11 -0
- package/lib/translation/common/edge/EdgeLanguageWeaverClient.js +109 -37
- 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 +4 -4
- package/lib/translation/common/edge/utils/EdgeLanguagePairUtil.js.map +1 -1
- package/lib/translation/feedback/cloud/api/CloudFeedbackApiModel.d.ts +0 -4
- package/lib/translation/feedback/cloud/api/CloudFeedbackApiModel.js +5 -21
- package/lib/translation/feedback/cloud/api/CloudFeedbackApiModel.js.map +1 -1
- package/lib/translation/feedback/cloud/api/CloudFilterFeedbackApiRequest.d.ts +0 -3
- package/lib/translation/feedback/cloud/api/CloudFilterFeedbackApiRequest.js +0 -13
- package/lib/translation/feedback/cloud/api/CloudFilterFeedbackApiRequest.js.map +1 -1
- package/lib/translation/feedback/cloud/api/CloudTranslationFeedback.d.ts +0 -6
- package/lib/translation/feedback/cloud/api/CloudTranslationFeedback.js +0 -20
- package/lib/translation/feedback/cloud/api/CloudTranslationFeedback.js.map +1 -1
- package/lib/translation/feedback/cloud/request/CloudCreateFeedbackRequest.d.ts +0 -6
- package/lib/translation/feedback/cloud/request/CloudCreateFeedbackRequest.js +0 -26
- package/lib/translation/feedback/cloud/request/CloudCreateFeedbackRequest.js.map +1 -1
- package/lib/translation/feedback/cloud/request/CloudFilterFeedbackRequest.d.ts +0 -4
- package/lib/translation/feedback/cloud/request/CloudFilterFeedbackRequest.js +0 -10
- package/lib/translation/feedback/cloud/request/CloudFilterFeedbackRequest.js.map +1 -1
- package/lib/translation/feedback/cloud/request/CloudUpdateFeedbackRequest.d.ts +0 -6
- package/lib/translation/feedback/cloud/request/CloudUpdateFeedbackRequest.js +1 -28
- package/lib/translation/feedback/cloud/request/CloudUpdateFeedbackRequest.js.map +1 -1
- package/lib/translation/feedback/cloud/result/CloudFeedbackResult.d.ts +0 -9
- package/lib/translation/feedback/cloud/result/CloudFeedbackResult.js +0 -30
- package/lib/translation/feedback/cloud/result/CloudFeedbackResult.js.map +1 -1
- package/lib/translation/feedback/cloud/service/CloudFeedbackService.js +3 -10
- package/lib/translation/feedback/cloud/service/CloudFeedbackService.js.map +1 -1
- package/lib/translation/feedback/cloud/validator/CloudFeedbackValidator.d.ts +1 -3
- package/lib/translation/feedback/cloud/validator/CloudFeedbackValidator.js +0 -13
- package/lib/translation/feedback/cloud/validator/CloudFeedbackValidator.js.map +1 -1
- package/lib/translation/feedback/common/request/CreateFeedbackRequest.d.ts +0 -5
- package/lib/translation/feedback/common/request/CreateFeedbackRequest.js +0 -27
- package/lib/translation/feedback/common/request/CreateFeedbackRequest.js.map +1 -1
- package/lib/translation/feedback/common/request/UpdateFeedbackRequest.d.ts +0 -7
- package/lib/translation/feedback/common/request/UpdateFeedbackRequest.js +0 -35
- package/lib/translation/feedback/common/request/UpdateFeedbackRequest.js.map +1 -1
- package/lib/translation/feedback/common/result/FeedbackCommonResult.d.ts +0 -3
- package/lib/translation/feedback/common/result/FeedbackCommonResult.js +0 -11
- package/lib/translation/feedback/common/result/FeedbackCommonResult.js.map +1 -1
- package/lib/translation/feedback/common/result/FeedbackResult.d.ts +0 -4
- package/lib/translation/feedback/common/result/FeedbackResult.js +0 -17
- package/lib/translation/feedback/common/result/FeedbackResult.js.map +1 -1
- package/lib/translation/feedback/common/validator/FeedbackValidator.d.ts +1 -3
- package/lib/translation/feedback/common/validator/FeedbackValidator.js +0 -8
- package/lib/translation/feedback/common/validator/FeedbackValidator.js.map +1 -1
- package/lib/translation/feedback/edge/api/EdgeFeedbackApiModel.d.ts +0 -3
- package/lib/translation/feedback/edge/api/EdgeFeedbackApiModel.js +3 -20
- package/lib/translation/feedback/edge/api/EdgeFeedbackApiModel.js.map +1 -1
- package/lib/translation/feedback/edge/api/EdgeFeedbackListResponse.js +1 -1
- package/lib/translation/feedback/edge/api/EdgeFeedbackListResponse.js.map +1 -1
- package/lib/translation/feedback/edge/request/EdgeCreateFeedbackRequest.js +0 -3
- package/lib/translation/feedback/edge/request/EdgeCreateFeedbackRequest.js.map +1 -1
- package/lib/translation/feedback/edge/request/EdgeFilterFeedbackRequest.d.ts +0 -3
- package/lib/translation/feedback/edge/request/EdgeFilterFeedbackRequest.js +0 -10
- package/lib/translation/feedback/edge/request/EdgeFilterFeedbackRequest.js.map +1 -1
- package/lib/translation/feedback/edge/request/EdgeUpdateFeedbackRequest.js +0 -3
- package/lib/translation/feedback/edge/request/EdgeUpdateFeedbackRequest.js.map +1 -1
- package/lib/translation/feedback/edge/service/EdgeFeedbackService.js +0 -7
- package/lib/translation/feedback/edge/service/EdgeFeedbackService.js.map +1 -1
- package/lib/translation/language-detection/cloud/api/CloudLanguageDetectionResponse.d.ts +21 -0
- package/lib/translation/language-detection/cloud/api/CloudLanguageDetectionResponse.js +71 -0
- package/lib/translation/language-detection/cloud/api/CloudLanguageDetectionResponse.js.map +1 -0
- package/lib/translation/language-detection/cloud/request/CloudFileLanguageDetectionRequest.d.ts +3 -0
- package/lib/translation/language-detection/cloud/request/CloudFileLanguageDetectionRequest.js +30 -0
- package/lib/translation/language-detection/cloud/request/CloudFileLanguageDetectionRequest.js.map +1 -0
- package/lib/translation/language-detection/cloud/request/CloudTextLanguageDetectionRequest.d.ts +3 -0
- package/lib/translation/language-detection/cloud/request/CloudTextLanguageDetectionRequest.js +30 -0
- package/lib/translation/language-detection/cloud/request/CloudTextLanguageDetectionRequest.js.map +1 -0
- package/lib/translation/language-detection/cloud/result/CloudLanguageDetectionResult.d.ts +3 -0
- package/lib/translation/language-detection/cloud/result/CloudLanguageDetectionResult.js +30 -0
- package/lib/translation/language-detection/cloud/result/CloudLanguageDetectionResult.js.map +1 -0
- package/lib/translation/language-detection/cloud/service/CloudLanguageDetectionService.d.ts +26 -0
- package/lib/translation/language-detection/cloud/service/CloudLanguageDetectionService.js +225 -0
- package/lib/translation/language-detection/cloud/service/CloudLanguageDetectionService.js.map +1 -0
- package/lib/translation/language-detection/common/api/AsyncLanguageDetectionResponse.d.ts +5 -0
- package/lib/translation/language-detection/common/api/AsyncLanguageDetectionResponse.js +19 -0
- package/lib/translation/language-detection/common/api/AsyncLanguageDetectionResponse.js.map +1 -0
- package/lib/translation/language-detection/common/api/Language.d.ts +14 -0
- package/lib/translation/language-detection/common/api/Language.js +49 -0
- package/lib/translation/language-detection/common/api/Language.js.map +1 -0
- package/lib/translation/language-detection/common/api/LanguageDetectionStatusResponse.d.ts +9 -0
- package/lib/translation/language-detection/common/api/LanguageDetectionStatusResponse.js +29 -0
- package/lib/translation/language-detection/common/api/LanguageDetectionStatusResponse.js.map +1 -0
- package/lib/translation/language-detection/common/api/Script.d.ts +11 -0
- package/lib/translation/language-detection/common/api/Script.js +39 -0
- package/lib/translation/language-detection/common/api/Script.js.map +1 -0
- package/lib/translation/language-detection/common/request/FileLanguageDetectionRequest.d.ts +9 -0
- package/lib/translation/language-detection/common/request/FileLanguageDetectionRequest.js +29 -0
- package/lib/translation/language-detection/common/request/FileLanguageDetectionRequest.js.map +1 -0
- package/lib/translation/language-detection/common/request/TextLanguageDetectionRequest.d.ts +9 -0
- package/lib/translation/language-detection/common/request/TextLanguageDetectionRequest.js +29 -0
- package/lib/translation/language-detection/common/request/TextLanguageDetectionRequest.js.map +1 -0
- package/lib/translation/language-detection/common/result/LanguageDetectionResult.d.ts +16 -0
- package/lib/translation/language-detection/common/result/LanguageDetectionResult.js +49 -0
- package/lib/translation/language-detection/common/result/LanguageDetectionResult.js.map +1 -0
- package/lib/translation/language-detection/edge/api/EdgeLanguageDetectionResponse.d.ts +10 -0
- package/lib/translation/language-detection/edge/api/EdgeLanguageDetectionResponse.js +30 -0
- package/lib/translation/language-detection/edge/api/EdgeLanguageDetectionResponse.js.map +1 -0
- package/lib/translation/language-detection/edge/api/EdgeTextLanguageDetectionApiModel.d.ts +11 -0
- package/lib/translation/language-detection/edge/api/EdgeTextLanguageDetectionApiModel.js +39 -0
- package/lib/translation/language-detection/edge/api/EdgeTextLanguageDetectionApiModel.js.map +1 -0
- package/lib/translation/language-detection/edge/request/EdgeFileLanguageDetectionRequest.d.ts +6 -0
- package/lib/translation/language-detection/edge/request/EdgeFileLanguageDetectionRequest.js +40 -0
- package/lib/translation/language-detection/edge/request/EdgeFileLanguageDetectionRequest.js.map +1 -0
- package/lib/translation/language-detection/edge/request/EdgeTextLanguageDetectionRequest.d.ts +6 -0
- package/lib/translation/language-detection/edge/request/EdgeTextLanguageDetectionRequest.js +40 -0
- package/lib/translation/language-detection/edge/request/EdgeTextLanguageDetectionRequest.js.map +1 -0
- package/lib/translation/language-detection/edge/result/EdgeLanguageDetectionResult.d.ts +3 -0
- package/lib/translation/language-detection/edge/result/EdgeLanguageDetectionResult.js +30 -0
- package/lib/translation/language-detection/edge/result/EdgeLanguageDetectionResult.js.map +1 -0
- package/lib/translation/language-detection/edge/service/EdgeLanguageDetectionService.d.ts +23 -0
- package/lib/translation/language-detection/edge/service/EdgeLanguageDetectionService.js +138 -0
- package/lib/translation/language-detection/edge/service/EdgeLanguageDetectionService.js.map +1 -0
- package/lib/translation/language-pairs/edge/api/EdgeLanguagePairApiModel.js +2 -2
- package/lib/translation/language-pairs/edge/api/EdgeLanguagePairApiModel.js.map +1 -1
- package/lib/translation/language-pairs/edge/api/MemberPairApiModel.d.ts +3 -3
- package/lib/translation/language-pairs/edge/api/MemberPairApiModel.js +4 -4
- package/lib/translation/language-pairs/edge/api/MemberPairApiModel.js.map +1 -1
- package/lib/translation/language-pairs/edge/result/EdgeLanguagePair.js +1 -1
- package/lib/translation/language-pairs/edge/result/EdgeLanguagePair.js.map +1 -1
- package/lib/translation/language-pairs/edge/result/MemberPair.d.ts +3 -3
- package/lib/translation/language-pairs/edge/result/MemberPair.js +3 -3
- package/lib/translation/language-pairs/edge/result/MemberPair.js.map +1 -1
- package/lib/translation/language-pairs/edge/service/EdgeLanguagePairsService.js +1 -1
- package/lib/translation/language-pairs/edge/service/EdgeLanguagePairsService.js.map +1 -1
- package/lib/translation/linguistic-options/edge/service/EdgeLinguisticOptionsService.js +2 -2
- package/lib/translation/linguistic-options/edge/service/EdgeLinguisticOptionsService.js.map +1 -1
- package/lib/translation/translate/common/utils/TranslateFileUtil.d.ts +1 -0
- package/lib/translation/translate/common/utils/TranslateFileUtil.js +13 -1
- package/lib/translation/translate/common/utils/TranslateFileUtil.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/lib/common/constants/FeedbackCategory.d.ts +0 -4
- package/lib/common/constants/FeedbackCategory.js +0 -9
- package/lib/common/constants/FeedbackCategory.js.map +0 -1
- package/lib/common/constants/FeedbackComment.d.ts +0 -10
- package/lib/common/constants/FeedbackComment.js +0 -15
- package/lib/common/constants/FeedbackComment.js.map +0 -1
- package/lib/translation/feedback/cloud/api/CloudFeedbackRating.d.ts +0 -10
- package/lib/translation/feedback/cloud/api/CloudFeedbackRating.js +0 -39
- package/lib/translation/feedback/cloud/api/CloudFeedbackRating.js.map +0 -1
|
@@ -53,26 +53,6 @@ var CloudTranslationFeedback = /** @class */ (function () {
|
|
|
53
53
|
enumerable: false,
|
|
54
54
|
configurable: true
|
|
55
55
|
});
|
|
56
|
-
Object.defineProperty(CloudTranslationFeedback.prototype, "selectedText", {
|
|
57
|
-
get: function () {
|
|
58
|
-
return this._selectedText;
|
|
59
|
-
},
|
|
60
|
-
set: function (value) {
|
|
61
|
-
this._selectedText = value;
|
|
62
|
-
},
|
|
63
|
-
enumerable: false,
|
|
64
|
-
configurable: true
|
|
65
|
-
});
|
|
66
|
-
Object.defineProperty(CloudTranslationFeedback.prototype, "metadata", {
|
|
67
|
-
get: function () {
|
|
68
|
-
return this._metadata;
|
|
69
|
-
},
|
|
70
|
-
set: function (value) {
|
|
71
|
-
this._metadata = value;
|
|
72
|
-
},
|
|
73
|
-
enumerable: false,
|
|
74
|
-
configurable: true
|
|
75
|
-
});
|
|
76
56
|
Object.defineProperty(CloudTranslationFeedback.prototype, "numberOfSegments", {
|
|
77
57
|
get: function () {
|
|
78
58
|
return this._numberOfSegments;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CloudTranslationFeedback.js","sourceRoot":"","sources":["../../../../../src/translation/feedback/cloud/api/CloudTranslationFeedback.ts"],"names":[],"mappings":";;AAAA;IAAA;
|
|
1
|
+
{"version":3,"file":"CloudTranslationFeedback.js","sourceRoot":"","sources":["../../../../../src/translation/feedback/cloud/api/CloudTranslationFeedback.ts"],"names":[],"mappings":";;AAAA;IAAA;IAgEA,CAAC;IAvDG,sBAAI,sDAAgB;aAApB;YACI,OAAO,IAAI,CAAC,iBAAiB,CAAC;QAClC,CAAC;aAED,UAAqB,KAAyB;YAC1C,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC;QACnC,CAAC;;;OAJA;IAMD,sBAAI,sDAAgB;aAApB;YACI,OAAO,IAAI,CAAC,iBAAiB,CAAC;QAClC,CAAC;aAED,UAAqB,KAAyB;YAC1C,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC;QACnC,CAAC;;;OAJA;IAMD,sBAAI,2CAAK;aAAT;YACI,OAAO,IAAI,CAAC,MAAM,CAAC;QACvB,CAAC;aAED,UAAU,KAAyB;YAC/B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACxB,CAAC;;;OAJA;IAMD,sBAAI,gDAAU;aAAd;YACI,OAAO,IAAI,CAAC,WAAW,CAAC;QAC5B,CAAC;aAED,UAAe,KAAyB;YACpC,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;QAC7B,CAAC;;;OAJA;IAMD,sBAAI,kDAAY;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,sDAAgB;aAApB;YACI,OAAO,IAAI,CAAC,iBAAiB,CAAC;QAClC,CAAC;aAED,UAAqB,KAAyB;YAC1C,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC;QACnC,CAAC;;;OAJA;IAMD,sBAAI,yDAAmB;aAAvB;YACI,OAAO,IAAI,CAAC,oBAAoB,CAAC;QACrC,CAAC;aAED,UAAwB,KAAyB;YAC7C,IAAI,CAAC,oBAAoB,GAAG,KAAK,CAAC;QACtC,CAAC;;;OAJA;IAKL,+BAAC;AAAD,CAAC,AAhED,IAgEC"}
|
|
@@ -2,17 +2,11 @@ import CreateFeedbackRequest from '../../common/request/CreateFeedbackRequest';
|
|
|
2
2
|
import { QualityEstimation } from '../../../../common/constants/QualityEstimation';
|
|
3
3
|
import CloudFeedbackApiModel from '../api/CloudFeedbackApiModel';
|
|
4
4
|
export default class CloudCreateFeedbackRequest extends CreateFeedbackRequest {
|
|
5
|
-
private _translationMetadata;
|
|
6
5
|
private _numberOfSegments;
|
|
7
|
-
private _rating;
|
|
8
6
|
private _qualityEstimationMT;
|
|
9
7
|
private _qualityEstimation;
|
|
10
|
-
get translationMetadata(): string | undefined;
|
|
11
|
-
set translationMetadata(value: string | undefined);
|
|
12
8
|
get numberOfSegments(): number | undefined;
|
|
13
9
|
set numberOfSegments(value: number | undefined);
|
|
14
|
-
get rating(): number | undefined;
|
|
15
|
-
set rating(value: number | undefined);
|
|
16
10
|
get qualityEstimationMT(): QualityEstimation | undefined;
|
|
17
11
|
set qualityEstimationMT(value: QualityEstimation | undefined);
|
|
18
12
|
get qualityEstimation(): QualityEstimation | undefined;
|
|
@@ -22,22 +22,11 @@ var CreateFeedbackRequest_1 = __importDefault(require("../../common/request/Crea
|
|
|
22
22
|
var CloudFeedbackApiModel_1 = __importDefault(require("../api/CloudFeedbackApiModel"));
|
|
23
23
|
var CloudTranslationFeedback_1 = __importDefault(require("../api/CloudTranslationFeedback"));
|
|
24
24
|
var CloudFeedbackImprovement_1 = __importDefault(require("../api/CloudFeedbackImprovement"));
|
|
25
|
-
var CloudFeedbackRating_1 = __importDefault(require("../api/CloudFeedbackRating"));
|
|
26
25
|
var CloudCreateFeedbackRequest = /** @class */ (function (_super) {
|
|
27
26
|
__extends(CloudCreateFeedbackRequest, _super);
|
|
28
27
|
function CloudCreateFeedbackRequest() {
|
|
29
28
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
30
29
|
}
|
|
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
30
|
Object.defineProperty(CloudCreateFeedbackRequest.prototype, "numberOfSegments", {
|
|
42
31
|
get: function () {
|
|
43
32
|
return this._numberOfSegments;
|
|
@@ -48,16 +37,6 @@ var CloudCreateFeedbackRequest = /** @class */ (function (_super) {
|
|
|
48
37
|
enumerable: false,
|
|
49
38
|
configurable: true
|
|
50
39
|
});
|
|
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
40
|
Object.defineProperty(CloudCreateFeedbackRequest.prototype, "qualityEstimationMT", {
|
|
62
41
|
get: function () {
|
|
63
42
|
return this._qualityEstimationMT;
|
|
@@ -86,15 +65,10 @@ var CloudCreateFeedbackRequest = /** @class */ (function (_super) {
|
|
|
86
65
|
translation.model = this.model;
|
|
87
66
|
translation.sourceText = this.sourceText;
|
|
88
67
|
translation.targetMTText = this.targetText;
|
|
89
|
-
translation.metadata = this.translationMetadata;
|
|
90
68
|
translation.numberOfSegments = this.numberOfSegments;
|
|
91
69
|
translation.qualityEstimationMT = this.qualityEstimationMT;
|
|
92
|
-
var rating = new CloudFeedbackRating_1.default();
|
|
93
|
-
rating.score = this.rating;
|
|
94
|
-
rating.comments = this.comments;
|
|
95
70
|
feedbackApiModel.translation = translation;
|
|
96
71
|
feedbackApiModel.improvement = new CloudFeedbackImprovement_1.default(this.suggestedTranslation);
|
|
97
|
-
feedbackApiModel.rating = rating;
|
|
98
72
|
feedbackApiModel.qualityEstimation = this.qualityEstimation;
|
|
99
73
|
return feedbackApiModel;
|
|
100
74
|
};
|
|
@@ -1 +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;
|
|
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;AAEvE;IAAwD,8CAAqB;IAA7E;;IA6CA,CAAC;IAxCG,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,2DAAmB;aAAvB;YACI,OAAO,IAAI,CAAC,oBAAoB,CAAC;QACrC,CAAC;aAED,UAAwB,KAAoC;YACxD,IAAI,CAAC,oBAAoB,GAAG,KAAK,CAAC;QACtC,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,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC;QACrD,WAAW,CAAC,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC;QACrD,WAAW,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QAC/B,WAAW,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;QACzC,WAAW,CAAC,YAAY,GAAG,IAAI,CAAC,UAAU,CAAC;QAC3C,WAAW,CAAC,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC;QACrD,WAAW,CAAC,mBAAmB,GAAG,IAAI,CAAC,mBAAmB,CAAC;QAC3D,gBAAgB,CAAC,WAAW,GAAG,WAAW,CAAC;QAC3C,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,AA7CD,CAAwD,+BAAqB,GA6C5E"}
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
import { FeedbackCategory } from '../../../../common/constants/FeedbackCategory';
|
|
2
1
|
import FilterFeedbackRequest from '../../common/request/FilterFeedbackRequest';
|
|
3
2
|
import CloudFeedbackSortRequest from './CloudFeedbackSortRequest';
|
|
4
3
|
export default class CloudFilterFeedbackRequest extends FilterFeedbackRequest {
|
|
5
4
|
private _feedbackId;
|
|
6
|
-
private _feedbackCategory;
|
|
7
5
|
private _sortRequest;
|
|
8
6
|
get feedbackId(): string | undefined;
|
|
9
7
|
set feedbackId(value: string | undefined);
|
|
10
|
-
get feedbackCategory(): FeedbackCategory | undefined;
|
|
11
|
-
set feedbackCategory(value: FeedbackCategory | undefined);
|
|
12
8
|
get sortRequest(): CloudFeedbackSortRequest | undefined;
|
|
13
9
|
set sortRequest(value: CloudFeedbackSortRequest | undefined);
|
|
14
10
|
}
|
|
@@ -34,16 +34,6 @@ var CloudFilterFeedbackRequest = /** @class */ (function (_super) {
|
|
|
34
34
|
enumerable: false,
|
|
35
35
|
configurable: true
|
|
36
36
|
});
|
|
37
|
-
Object.defineProperty(CloudFilterFeedbackRequest.prototype, "feedbackCategory", {
|
|
38
|
-
get: function () {
|
|
39
|
-
return this._feedbackCategory;
|
|
40
|
-
},
|
|
41
|
-
set: function (value) {
|
|
42
|
-
this._feedbackCategory = value;
|
|
43
|
-
},
|
|
44
|
-
enumerable: false,
|
|
45
|
-
configurable: true
|
|
46
|
-
});
|
|
47
37
|
Object.defineProperty(CloudFilterFeedbackRequest.prototype, "sortRequest", {
|
|
48
38
|
get: function () {
|
|
49
39
|
return this._sortRequest;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CloudFilterFeedbackRequest.js","sourceRoot":"","sources":["../../../../../src/translation/feedback/cloud/request/CloudFilterFeedbackRequest.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"CloudFilterFeedbackRequest.js","sourceRoot":"","sources":["../../../../../src/translation/feedback/cloud/request/CloudFilterFeedbackRequest.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,qGAA+E;AAG/E;IAAwD,8CAAqB;IAA7E;;IAmBA,CAAC;IAfG,sBAAI,kDAAU;aAAd;YACI,OAAO,IAAI,CAAC,WAAW,CAAC;QAC5B,CAAC;aAED,UAAe,KAAyB;YACpC,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;QAC7B,CAAC;;;OAJA;IAMD,sBAAI,mDAAW;aAAf;YACI,OAAO,IAAI,CAAC,YAAY,CAAC;QAC7B,CAAC;aAED,UAAgB,KAA2C;YACvD,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;QAC9B,CAAC;;;OAJA;IAKL,iCAAC;AAAD,CAAC,AAnBD,CAAwD,+BAAqB,GAmB5E"}
|
|
@@ -2,13 +2,7 @@ import UpdateFeedbackRequest from '../../common/request/UpdateFeedbackRequest';
|
|
|
2
2
|
import { QualityEstimation } from '../../../../common/constants/QualityEstimation';
|
|
3
3
|
import CloudFeedbackApiModel from '../api/CloudFeedbackApiModel';
|
|
4
4
|
export default class CloudUpdateFeedbackRequest extends UpdateFeedbackRequest {
|
|
5
|
-
private _selectedText;
|
|
6
|
-
private _rating;
|
|
7
5
|
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
6
|
get qualityEstimation(): QualityEstimation | undefined;
|
|
13
7
|
set qualityEstimation(value: QualityEstimation | undefined);
|
|
14
8
|
toCloudFeedbackApiModel(): CloudFeedbackApiModel;
|
|
@@ -21,33 +21,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
21
21
|
var UpdateFeedbackRequest_1 = __importDefault(require("../../common/request/UpdateFeedbackRequest"));
|
|
22
22
|
var CloudFeedbackApiModel_1 = __importDefault(require("../api/CloudFeedbackApiModel"));
|
|
23
23
|
var CloudTranslationFeedback_1 = __importDefault(require("../api/CloudTranslationFeedback"));
|
|
24
|
-
var CloudFeedbackRating_1 = __importDefault(require("../api/CloudFeedbackRating"));
|
|
25
24
|
var CloudFeedbackImprovement_1 = __importDefault(require("../api/CloudFeedbackImprovement"));
|
|
26
25
|
var CloudUpdateFeedbackRequest = /** @class */ (function (_super) {
|
|
27
26
|
__extends(CloudUpdateFeedbackRequest, _super);
|
|
28
27
|
function CloudUpdateFeedbackRequest() {
|
|
29
28
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
30
29
|
}
|
|
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
30
|
Object.defineProperty(CloudUpdateFeedbackRequest.prototype, "qualityEstimation", {
|
|
52
31
|
get: function () {
|
|
53
32
|
return this._qualityEstimation;
|
|
@@ -60,13 +39,7 @@ var CloudUpdateFeedbackRequest = /** @class */ (function (_super) {
|
|
|
60
39
|
});
|
|
61
40
|
CloudUpdateFeedbackRequest.prototype.toCloudFeedbackApiModel = function () {
|
|
62
41
|
var feedbackApiModel = new CloudFeedbackApiModel_1.default();
|
|
63
|
-
|
|
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;
|
|
42
|
+
feedbackApiModel.translation = new CloudTranslationFeedback_1.default();
|
|
70
43
|
feedbackApiModel.improvement = new CloudFeedbackImprovement_1.default(this.suggestedTranslation);
|
|
71
44
|
feedbackApiModel.qualityEstimation = this.qualityEstimation;
|
|
72
45
|
return feedbackApiModel;
|
|
@@ -1 +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,
|
|
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,6FAAuE;AAEvE;IAAwD,8CAAqB;IAA7E;;IAmBA,CAAC;IAhBG,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,gBAAgB,CAAC,WAAW,GAAG,IAAI,kCAAwB,EAAE,CAAC;QAC9D,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,AAnBD,CAAwD,+BAAqB,GAmB5E"}
|
|
@@ -2,22 +2,13 @@ import CloudAuditData from './CloudAuditData';
|
|
|
2
2
|
import FeedbackCommonResult from '../../common/result/FeedbackCommonResult';
|
|
3
3
|
import { QualityEstimation } from '../../../../common/constants/QualityEstimation';
|
|
4
4
|
export default class CloudFeedbackResult extends FeedbackCommonResult {
|
|
5
|
-
private _selectedText;
|
|
6
|
-
private _translationMetadata;
|
|
7
5
|
private _numberOfSegments;
|
|
8
|
-
private _ratingScore;
|
|
9
6
|
private _qualityEstimation;
|
|
10
7
|
private _qualityEstimationMT;
|
|
11
8
|
private _feedbackAuditData;
|
|
12
9
|
private _approvalAuditData;
|
|
13
|
-
get selectedText(): string | undefined;
|
|
14
|
-
set selectedText(value: string | undefined);
|
|
15
|
-
get translationMetadata(): string | undefined;
|
|
16
|
-
set translationMetadata(value: string | undefined);
|
|
17
10
|
get numberOfSegments(): number | undefined;
|
|
18
11
|
set numberOfSegments(value: number | undefined);
|
|
19
|
-
get ratingScore(): number | undefined;
|
|
20
|
-
set ratingScore(value: number | undefined);
|
|
21
12
|
get qualityEstimation(): QualityEstimation | undefined;
|
|
22
13
|
set qualityEstimation(value: QualityEstimation | undefined);
|
|
23
14
|
get qualityEstimationMT(): QualityEstimation | undefined;
|
|
@@ -24,26 +24,6 @@ var CloudFeedbackResult = /** @class */ (function (_super) {
|
|
|
24
24
|
function CloudFeedbackResult() {
|
|
25
25
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
26
26
|
}
|
|
27
|
-
Object.defineProperty(CloudFeedbackResult.prototype, "selectedText", {
|
|
28
|
-
get: function () {
|
|
29
|
-
return this._selectedText;
|
|
30
|
-
},
|
|
31
|
-
set: function (value) {
|
|
32
|
-
this._selectedText = value;
|
|
33
|
-
},
|
|
34
|
-
enumerable: false,
|
|
35
|
-
configurable: true
|
|
36
|
-
});
|
|
37
|
-
Object.defineProperty(CloudFeedbackResult.prototype, "translationMetadata", {
|
|
38
|
-
get: function () {
|
|
39
|
-
return this._translationMetadata;
|
|
40
|
-
},
|
|
41
|
-
set: function (value) {
|
|
42
|
-
this._translationMetadata = value;
|
|
43
|
-
},
|
|
44
|
-
enumerable: false,
|
|
45
|
-
configurable: true
|
|
46
|
-
});
|
|
47
27
|
Object.defineProperty(CloudFeedbackResult.prototype, "numberOfSegments", {
|
|
48
28
|
get: function () {
|
|
49
29
|
return this._numberOfSegments;
|
|
@@ -54,16 +34,6 @@ var CloudFeedbackResult = /** @class */ (function (_super) {
|
|
|
54
34
|
enumerable: false,
|
|
55
35
|
configurable: true
|
|
56
36
|
});
|
|
57
|
-
Object.defineProperty(CloudFeedbackResult.prototype, "ratingScore", {
|
|
58
|
-
get: function () {
|
|
59
|
-
return this._ratingScore;
|
|
60
|
-
},
|
|
61
|
-
set: function (value) {
|
|
62
|
-
this._ratingScore = value;
|
|
63
|
-
},
|
|
64
|
-
enumerable: false,
|
|
65
|
-
configurable: true
|
|
66
|
-
});
|
|
67
37
|
Object.defineProperty(CloudFeedbackResult.prototype, "qualityEstimation", {
|
|
68
38
|
get: function () {
|
|
69
39
|
return this._qualityEstimation;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CloudFeedbackResult.js","sourceRoot":"","sources":["../../../../../src/translation/feedback/cloud/result/CloudFeedbackResult.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AACA,kGAA4E;AAG5E;IAAiD,uCAAoB;IAArE;;
|
|
1
|
+
{"version":3,"file":"CloudFeedbackResult.js","sourceRoot":"","sources":["../../../../../src/translation/feedback/cloud/result/CloudFeedbackResult.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AACA,kGAA4E;AAG5E;IAAiD,uCAAoB;IAArE;;IA8CA,CAAC;IAvCG,sBAAI,iDAAgB;aAApB;YACI,OAAO,IAAI,CAAC,iBAAiB,CAAC;QAClC,CAAC;aAED,UAAqB,KAAyB;YAC1C,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC;QACnC,CAAC;;;OAJA;IAMD,sBAAI,kDAAiB;aAArB;YACI,OAAO,IAAI,CAAC,kBAAkB,CAAC;QACnC,CAAC;aAED,UAAsB,KAAoC;YACtD,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC;QACpC,CAAC;;;OAJA;IAMD,sBAAI,oDAAmB;aAAvB;YACI,OAAO,IAAI,CAAC,oBAAoB,CAAC;QACrC,CAAC;aAED,UAAwB,KAAoC;YACxD,IAAI,CAAC,oBAAoB,GAAG,KAAK,CAAC;QACtC,CAAC;;;OAJA;IAMD,sBAAI,kDAAiB;aAArB;YACI,OAAO,IAAI,CAAC,kBAAkB,CAAC;QACnC,CAAC;aAED,UAAsB,KAAiC;YACnD,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC;QACpC,CAAC;;;OAJA;IAMD,sBAAI,kDAAiB;aAArB;YACI,OAAO,IAAI,CAAC,kBAAkB,CAAC;QACnC,CAAC;aAED,UAAsB,KAAiC;YACnD,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC;QACpC,CAAC;;;OAJA;IAKL,0BAAC;AAAD,CAAC,AA9CD,CAAiD,8BAAoB,GA8CpE"}
|
|
@@ -27,7 +27,8 @@ var CloudFeedbackApprovalUpdateRequest_1 = __importDefault(require("../api/Cloud
|
|
|
27
27
|
var ApprovalStatus_1 = require("../../../../common/constants/ApprovalStatus");
|
|
28
28
|
var CloudDeleteFeedbackRequest_1 = __importDefault(require("../request/CloudDeleteFeedbackRequest"));
|
|
29
29
|
var PAGE_SIZE_QUERY_PARAM = 'pageSize';
|
|
30
|
-
var
|
|
30
|
+
var SORT_DIRECTION_QUERY_PARAM = 'sortDirection';
|
|
31
|
+
var SORT_FIELD_QUERY_PARAM = 'sortField';
|
|
31
32
|
var CloudFeedbackService = /** @class */ (function () {
|
|
32
33
|
function CloudFeedbackService(client, token, selfInfo) {
|
|
33
34
|
this._validator = new CloudFeedbackValidator_1.default();
|
|
@@ -46,19 +47,11 @@ var CloudFeedbackService = /** @class */ (function () {
|
|
|
46
47
|
.catch(function (e) { return Promise.reject(e); });
|
|
47
48
|
};
|
|
48
49
|
CloudFeedbackService.prototype.createFeedback = function (feedbackRequest) {
|
|
49
|
-
var validationError = this._validator.validateSingleComment(feedbackRequest);
|
|
50
|
-
if (validationError) {
|
|
51
|
-
return Promise.reject({ message: validationError });
|
|
52
|
-
}
|
|
53
50
|
return this.performCreateFeedback(feedbackRequest)
|
|
54
51
|
.then(function (response) { return Promise.resolve(response.toResult()); })
|
|
55
52
|
.catch(function (e) { return Promise.reject(e); });
|
|
56
53
|
};
|
|
57
54
|
CloudFeedbackService.prototype.createCloudFeedback = function (feedbackRequest) {
|
|
58
|
-
var validationError = this._validator.validateCreateFeedbackRequest(feedbackRequest);
|
|
59
|
-
if (validationError) {
|
|
60
|
-
return Promise.reject({ message: validationError });
|
|
61
|
-
}
|
|
62
55
|
return this.performCreateFeedback(feedbackRequest)
|
|
63
56
|
.then(function (response) { return Promise.resolve(response.toCloudResult()); })
|
|
64
57
|
.catch(function (e) { return Promise.reject(e); });
|
|
@@ -187,7 +180,7 @@ var CloudFeedbackService = /** @class */ (function () {
|
|
|
187
180
|
if (filterRequest.sortRequest) {
|
|
188
181
|
var sortRequest = filterRequest.sortRequest;
|
|
189
182
|
if (sortRequest.criteria && sortRequest.order) {
|
|
190
|
-
queryParams = __assign(__assign({}, queryParams), (_a = {}, _a[
|
|
183
|
+
queryParams = __assign(__assign({}, queryParams), (_a = {}, _a[SORT_DIRECTION_QUERY_PARAM] = sortRequest.order, _a[SORT_FIELD_QUERY_PARAM] = sortRequest.criteria, _a));
|
|
191
184
|
}
|
|
192
185
|
}
|
|
193
186
|
return queryParams;
|
|
@@ -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,+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,
|
|
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,0BAA0B,GAAG,eAAe,CAAC;AACnD,IAAM,sBAAsB,GAAG,WAAW,CAAC;AAE3C;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,GA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OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAjB,CAAiB,CAAC,CAAC;IACzC,CAAC;IAEO,iDAAkB,GAA1B,UAA2B,aAAyC;;QAChE,IAAI,WAAW,GAAG,EAAE,CAAC;QAErB,IAAI,aAAa,CAAC,WAAW,EAAE;YAC3B,IAAM,WAAW,GAA6B,aAAa,CAAC,WAAW,CAAC;YAExE,IAAI,WAAW,CAAC,QAAQ,IAAI,WAAW,CAAC,KAAK,EAAE;gBAC3C,WAAW,yBACJ,WAAW,gBACb,0BAA0B,IAAG,WAAW,CAAC,KAAK,KAC9C,sBAAsB,IAAG,WAAW,CAAC,QAAQ,MACjD,CAAC;aACL;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,AAtPD,IAsPC"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import FeedbackValidator from '../../common/validator/FeedbackValidator';
|
|
2
2
|
import CloudFeedbackSortRequest from '../request/CloudFeedbackSortRequest';
|
|
3
|
-
import CloudCreateFeedbackRequest from '../request/CloudCreateFeedbackRequest';
|
|
4
3
|
import UpdateFeedbackRequest from '../../common/request/UpdateFeedbackRequest';
|
|
5
4
|
export default class CloudFeedbackValidator extends FeedbackValidator {
|
|
6
5
|
validateCloudFeedbackSortRequest(sortRequest: CloudFeedbackSortRequest | undefined): "Both order and criteria should be specified for feedback sorting" | null;
|
|
7
|
-
|
|
8
|
-
validateUpdateFeedbackRequest(updateFeedbackRequest: UpdateFeedbackRequest): "feedbackId is required for update operations" | "Rating must be between 1 and 5" | null;
|
|
6
|
+
validateUpdateFeedbackRequest(updateFeedbackRequest: UpdateFeedbackRequest): "feedbackId is required for update operations" | null;
|
|
9
7
|
}
|
|
@@ -19,7 +19,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
19
19
|
};
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
21
|
var FeedbackValidator_1 = __importDefault(require("../../common/validator/FeedbackValidator"));
|
|
22
|
-
var CloudUpdateFeedbackRequest_1 = __importDefault(require("../request/CloudUpdateFeedbackRequest"));
|
|
23
22
|
var CloudFeedbackValidator = /** @class */ (function (_super) {
|
|
24
23
|
__extends(CloudFeedbackValidator, _super);
|
|
25
24
|
function CloudFeedbackValidator() {
|
|
@@ -31,19 +30,7 @@ var CloudFeedbackValidator = /** @class */ (function (_super) {
|
|
|
31
30
|
}
|
|
32
31
|
return null;
|
|
33
32
|
};
|
|
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
33
|
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
34
|
if (!updateFeedbackRequest.feedbackId) {
|
|
48
35
|
return 'feedbackId is required for update operations';
|
|
49
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CloudFeedbackValidator.js","sourceRoot":"","sources":["../../../../../src/translation/feedback/cloud/validator/CloudFeedbackValidator.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,+FAAyE;
|
|
1
|
+
{"version":3,"file":"CloudFeedbackValidator.js","sourceRoot":"","sources":["../../../../../src/translation/feedback/cloud/validator/CloudFeedbackValidator.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,+FAAyE;AAMzE;IAAoD,0CAAiB;IAArE;;IAgBA,CAAC;IAfU,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,qBAA4C;QAC7E,IAAI,CAAC,qBAAqB,CAAC,UAAU,EAAE;YACnC,OAAO,8CAA8C,CAAC;SACzD;QAED,OAAO,IAAI,CAAC;IAChB,CAAC;IACL,6BAAC;AAAD,CAAC,AAhBD,CAAoD,2BAAiB,GAgBpE"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import FeedbackComment from '../../../../common/constants/FeedbackComment';
|
|
2
1
|
import CloudFeedbackApiModel from '../../cloud/api/CloudFeedbackApiModel';
|
|
3
2
|
import EdgeFeedbackApiModel from '../../edge/api/EdgeFeedbackApiModel';
|
|
4
3
|
export default class CreateFeedbackRequest {
|
|
@@ -8,7 +7,6 @@ export default class CreateFeedbackRequest {
|
|
|
8
7
|
private _sourceText;
|
|
9
8
|
private _targetText;
|
|
10
9
|
private _suggestedTranslation;
|
|
11
|
-
private _comments;
|
|
12
10
|
get sourceLanguageId(): string | undefined;
|
|
13
11
|
set sourceLanguageId(value: string | undefined);
|
|
14
12
|
get targetLanguageId(): string | undefined;
|
|
@@ -21,9 +19,6 @@ export default class CreateFeedbackRequest {
|
|
|
21
19
|
set targetText(value: string | undefined);
|
|
22
20
|
get suggestedTranslation(): string | undefined;
|
|
23
21
|
set suggestedTranslation(value: string | undefined);
|
|
24
|
-
get comments(): string[];
|
|
25
|
-
set comments(value: string[]);
|
|
26
|
-
addComment(comment: string | FeedbackComment): CreateFeedbackRequest;
|
|
27
22
|
toCloudFeedbackApiModel(): CloudFeedbackApiModel;
|
|
28
23
|
toEdgeFeedbackApiModel(languagePairId?: string): EdgeFeedbackApiModel;
|
|
29
24
|
}
|
|
@@ -6,11 +6,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
var CloudFeedbackApiModel_1 = __importDefault(require("../../cloud/api/CloudFeedbackApiModel"));
|
|
7
7
|
var CloudTranslationFeedback_1 = __importDefault(require("../../cloud/api/CloudTranslationFeedback"));
|
|
8
8
|
var CloudFeedbackImprovement_1 = __importDefault(require("../../cloud/api/CloudFeedbackImprovement"));
|
|
9
|
-
var CloudFeedbackRating_1 = __importDefault(require("../../cloud/api/CloudFeedbackRating"));
|
|
10
9
|
var EdgeFeedbackApiModel_1 = __importDefault(require("../../edge/api/EdgeFeedbackApiModel"));
|
|
11
10
|
var CreateFeedbackRequest = /** @class */ (function () {
|
|
12
11
|
function CreateFeedbackRequest() {
|
|
13
|
-
this._comments = [];
|
|
14
12
|
}
|
|
15
13
|
Object.defineProperty(CreateFeedbackRequest.prototype, "sourceLanguageId", {
|
|
16
14
|
get: function () {
|
|
@@ -72,25 +70,6 @@ var CreateFeedbackRequest = /** @class */ (function () {
|
|
|
72
70
|
enumerable: false,
|
|
73
71
|
configurable: true
|
|
74
72
|
});
|
|
75
|
-
Object.defineProperty(CreateFeedbackRequest.prototype, "comments", {
|
|
76
|
-
get: function () {
|
|
77
|
-
return this._comments;
|
|
78
|
-
},
|
|
79
|
-
set: function (value) {
|
|
80
|
-
this._comments = value;
|
|
81
|
-
},
|
|
82
|
-
enumerable: false,
|
|
83
|
-
configurable: true
|
|
84
|
-
});
|
|
85
|
-
CreateFeedbackRequest.prototype.addComment = function (comment) {
|
|
86
|
-
if (this.comments) {
|
|
87
|
-
this.comments.push(comment);
|
|
88
|
-
}
|
|
89
|
-
else {
|
|
90
|
-
this.comments = [comment];
|
|
91
|
-
}
|
|
92
|
-
return this;
|
|
93
|
-
};
|
|
94
73
|
CreateFeedbackRequest.prototype.toCloudFeedbackApiModel = function () {
|
|
95
74
|
var feedbackApiModel = new CloudFeedbackApiModel_1.default();
|
|
96
75
|
var translation = new CloudTranslationFeedback_1.default();
|
|
@@ -99,11 +78,8 @@ var CreateFeedbackRequest = /** @class */ (function () {
|
|
|
99
78
|
translation.model = this.model;
|
|
100
79
|
translation.sourceText = this.sourceText;
|
|
101
80
|
translation.targetMTText = this.targetText;
|
|
102
|
-
var rating = new CloudFeedbackRating_1.default();
|
|
103
|
-
rating.comments = this.comments;
|
|
104
81
|
feedbackApiModel.translation = translation;
|
|
105
82
|
feedbackApiModel.improvement = new CloudFeedbackImprovement_1.default(this.suggestedTranslation);
|
|
106
|
-
feedbackApiModel.rating = rating;
|
|
107
83
|
return feedbackApiModel;
|
|
108
84
|
};
|
|
109
85
|
CreateFeedbackRequest.prototype.toEdgeFeedbackApiModel = function (languagePairId) {
|
|
@@ -112,9 +88,6 @@ var CreateFeedbackRequest = /** @class */ (function () {
|
|
|
112
88
|
feedbackApiModel.sourceText = this.sourceText;
|
|
113
89
|
feedbackApiModel.machineTranslation = this.targetText;
|
|
114
90
|
feedbackApiModel.suggestedTranslation = this.suggestedTranslation;
|
|
115
|
-
if (this.comments.length > 0) {
|
|
116
|
-
feedbackApiModel.comment = this.comments[0];
|
|
117
|
-
}
|
|
118
91
|
return feedbackApiModel;
|
|
119
92
|
};
|
|
120
93
|
return CreateFeedbackRequest;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateFeedbackRequest.js","sourceRoot":"","sources":["../../../../../src/translation/feedback/common/request/CreateFeedbackRequest.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"CreateFeedbackRequest.js","sourceRoot":"","sources":["../../../../../src/translation/feedback/common/request/CreateFeedbackRequest.ts"],"names":[],"mappings":";;;;;AAAA,gGAA0E;AAC1E,sGAAgF;AAChF,sGAAgF;AAChF,6FAAuE;AAEvE;IAAA;IAgFA,CAAC;IAvEG,sBAAI,mDAAgB;aAApB;YACI,OAAO,IAAI,CAAC,iBAAiB,CAAC;QAClC,CAAC;aAED,UAAqB,KAAyB;YAC1C,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC;QACnC,CAAC;;;OAJA;IAMD,sBAAI,mDAAgB;aAApB;YACI,OAAO,IAAI,CAAC,iBAAiB,CAAC;QAClC,CAAC;aAED,UAAqB,KAAyB;YAC1C,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC;QACnC,CAAC;;;OAJA;IAMD,sBAAI,wCAAK;aAAT;YACI,OAAO,IAAI,CAAC,MAAM,CAAC;QACvB,CAAC;aAED,UAAU,KAAyB;YAC/B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACxB,CAAC;;;OAJA;IAMD,sBAAI,6CAAU;aAAd;YACI,OAAO,IAAI,CAAC,WAAW,CAAC;QAC5B,CAAC;aAED,UAAe,KAAyB;YACpC,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;QAC7B,CAAC;;;OAJA;IAMD,sBAAI,6CAAU;aAAd;YACI,OAAO,IAAI,CAAC,WAAW,CAAC;QAC5B,CAAC;aAED,UAAe,KAAyB;YACpC,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;QAC7B,CAAC;;;OAJA;IAMD,sBAAI,uDAAoB;aAAxB;YACI,OAAO,IAAI,CAAC,qBAAqB,CAAC;QACtC,CAAC;aAED,UAAyB,KAAyB;YAC9C,IAAI,CAAC,qBAAqB,GAAG,KAAK,CAAC;QACvC,CAAC;;;OAJA;IAMM,uDAAuB,GAA9B;QACI,IAAM,gBAAgB,GAAG,IAAI,+BAAqB,EAAE,CAAC;QACrD,IAAM,WAAW,GAAG,IAAI,kCAAwB,EAAE,CAAC;QACnD,WAAW,CAAC,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC;QACrD,WAAW,CAAC,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC;QACrD,WAAW,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QAC/B,WAAW,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;QACzC,WAAW,CAAC,YAAY,GAAG,IAAI,CAAC,UAAU,CAAC;QAC3C,gBAAgB,CAAC,WAAW,GAAG,WAAW,CAAC;QAC3C,gBAAgB,CAAC,WAAW,GAAG,IAAI,kCAAwB,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;QAEvF,OAAO,gBAAgB,CAAC;IAC5B,CAAC;IAEM,sDAAsB,GAA7B,UAA8B,cAAuB;QACjD,IAAM,gBAAgB,GAAG,IAAI,8BAAoB,EAAE,CAAC;QACpD,gBAAgB,CAAC,cAAc,GAAG,cAAc,CAAC;QACjD,gBAAgB,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;QAC9C,gBAAgB,CAAC,kBAAkB,GAAG,IAAI,CAAC,UAAU,CAAC;QACtD,gBAAgB,CAAC,oBAAoB,GAAG,IAAI,CAAC,oBAAoB,CAAC;QAElE,OAAO,gBAAgB,CAAC;IAC5B,CAAC;IACL,4BAAC;AAAD,CAAC,AAhFD,IAgFC"}
|
|
@@ -1,19 +1,12 @@
|
|
|
1
|
-
import FeedbackComment from '../../../../common/constants/FeedbackComment';
|
|
2
1
|
import CloudFeedbackApiModel from '../../cloud/api/CloudFeedbackApiModel';
|
|
3
2
|
import EdgeFeedbackApiModel from '../../edge/api/EdgeFeedbackApiModel';
|
|
4
3
|
export default class UpdateFeedbackRequest {
|
|
5
4
|
private _feedbackId;
|
|
6
5
|
private _suggestedTranslation;
|
|
7
|
-
private _comments;
|
|
8
6
|
get feedbackId(): string | undefined;
|
|
9
7
|
set feedbackId(value: string | undefined);
|
|
10
8
|
get suggestedTranslation(): string | undefined;
|
|
11
9
|
set suggestedTranslation(value: string | undefined);
|
|
12
|
-
get comments(): string[];
|
|
13
|
-
set comments(value: string[]);
|
|
14
|
-
setComment(comment: string | FeedbackComment): UpdateFeedbackRequest;
|
|
15
|
-
clearComments(): this;
|
|
16
|
-
addComment(comment: FeedbackComment | string): UpdateFeedbackRequest;
|
|
17
10
|
toCloudFeedbackApiModel(): CloudFeedbackApiModel;
|
|
18
11
|
toEdgeFeedbackApiModel(): EdgeFeedbackApiModel;
|
|
19
12
|
}
|
|
@@ -4,12 +4,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
var CloudFeedbackApiModel_1 = __importDefault(require("../../cloud/api/CloudFeedbackApiModel"));
|
|
7
|
-
var CloudFeedbackRating_1 = __importDefault(require("../../cloud/api/CloudFeedbackRating"));
|
|
8
7
|
var CloudFeedbackImprovement_1 = __importDefault(require("../../cloud/api/CloudFeedbackImprovement"));
|
|
9
8
|
var EdgeFeedbackApiModel_1 = __importDefault(require("../../edge/api/EdgeFeedbackApiModel"));
|
|
10
9
|
var UpdateFeedbackRequest = /** @class */ (function () {
|
|
11
10
|
function UpdateFeedbackRequest() {
|
|
12
|
-
this._comments = [];
|
|
13
11
|
}
|
|
14
12
|
Object.defineProperty(UpdateFeedbackRequest.prototype, "feedbackId", {
|
|
15
13
|
get: function () {
|
|
@@ -31,47 +29,14 @@ var UpdateFeedbackRequest = /** @class */ (function () {
|
|
|
31
29
|
enumerable: false,
|
|
32
30
|
configurable: true
|
|
33
31
|
});
|
|
34
|
-
Object.defineProperty(UpdateFeedbackRequest.prototype, "comments", {
|
|
35
|
-
get: function () {
|
|
36
|
-
return this._comments;
|
|
37
|
-
},
|
|
38
|
-
set: function (value) {
|
|
39
|
-
this._comments = value;
|
|
40
|
-
},
|
|
41
|
-
enumerable: false,
|
|
42
|
-
configurable: true
|
|
43
|
-
});
|
|
44
|
-
UpdateFeedbackRequest.prototype.setComment = function (comment) {
|
|
45
|
-
this.comments = [comment];
|
|
46
|
-
return this;
|
|
47
|
-
};
|
|
48
|
-
UpdateFeedbackRequest.prototype.clearComments = function () {
|
|
49
|
-
this.comments = [];
|
|
50
|
-
return this;
|
|
51
|
-
};
|
|
52
|
-
UpdateFeedbackRequest.prototype.addComment = function (comment) {
|
|
53
|
-
if (this.comments) {
|
|
54
|
-
this.comments.push(comment);
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
this.comments = [comment];
|
|
58
|
-
}
|
|
59
|
-
return this;
|
|
60
|
-
};
|
|
61
32
|
UpdateFeedbackRequest.prototype.toCloudFeedbackApiModel = function () {
|
|
62
33
|
var feedbackApiModel = new CloudFeedbackApiModel_1.default();
|
|
63
|
-
var rating = new CloudFeedbackRating_1.default();
|
|
64
|
-
rating.comments = this.comments;
|
|
65
|
-
feedbackApiModel.rating = rating;
|
|
66
34
|
feedbackApiModel.improvement = new CloudFeedbackImprovement_1.default(this.suggestedTranslation);
|
|
67
35
|
return feedbackApiModel;
|
|
68
36
|
};
|
|
69
37
|
UpdateFeedbackRequest.prototype.toEdgeFeedbackApiModel = function () {
|
|
70
38
|
var feedbackApiModel = new EdgeFeedbackApiModel_1.default();
|
|
71
39
|
feedbackApiModel.suggestedTranslation = this.suggestedTranslation;
|
|
72
|
-
if (this.comments.length > 0) {
|
|
73
|
-
feedbackApiModel.comment = this.comments[0];
|
|
74
|
-
}
|
|
75
40
|
return feedbackApiModel;
|
|
76
41
|
};
|
|
77
42
|
return UpdateFeedbackRequest;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpdateFeedbackRequest.js","sourceRoot":"","sources":["../../../../../src/translation/feedback/common/request/UpdateFeedbackRequest.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"UpdateFeedbackRequest.js","sourceRoot":"","sources":["../../../../../src/translation/feedback/common/request/UpdateFeedbackRequest.ts"],"names":[],"mappings":";;;;;AAAA,gGAA0E;AAC1E,sGAAgF;AAChF,6FAAuE;AAEvE;IAAA;IAkCA,CAAC;IA9BG,sBAAI,6CAAU;aAAd;YACI,OAAO,IAAI,CAAC,WAAW,CAAC;QAC5B,CAAC;aAED,UAAe,KAAyB;YACpC,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;QAC7B,CAAC;;;OAJA;IAMD,sBAAI,uDAAoB;aAAxB;YACI,OAAO,IAAI,CAAC,qBAAqB,CAAC;QACtC,CAAC;aAED,UAAyB,KAAyB;YAC9C,IAAI,CAAC,qBAAqB,GAAG,KAAK,CAAC;QACvC,CAAC;;;OAJA;IAMM,uDAAuB,GAA9B;QACI,IAAM,gBAAgB,GAAG,IAAI,+BAAqB,EAAE,CAAC;QAErD,gBAAgB,CAAC,WAAW,GAAG,IAAI,kCAAwB,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;QAEvF,OAAO,gBAAgB,CAAC;IAC5B,CAAC;IAEM,sDAAsB,GAA7B;QACI,IAAM,gBAAgB,GAAG,IAAI,8BAAoB,EAAE,CAAC;QACpD,gBAAgB,CAAC,oBAAoB,GAAG,IAAI,CAAC,oBAAoB,CAAC;QAElE,OAAO,gBAAgB,CAAC;IAC5B,CAAC;IACL,4BAAC;AAAD,CAAC,AAlCD,IAkCC"}
|