@language-weaver/lw-sdk-js 1.2.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (347) hide show
  1. package/lib/common/configurations/ClientConfiguration.d.ts +2 -2
  2. package/lib/common/configurations/ClientConfiguration.js +0 -2
  3. package/lib/common/configurations/ClientConfiguration.js.map +1 -1
  4. package/lib/common/configurations/CredentialsConfiguration.js +2 -6
  5. package/lib/common/configurations/CredentialsConfiguration.js.map +1 -1
  6. package/lib/{translation/feedback/cloud/model → common/constants}/CloudFeedbackSortCriteria.d.ts +0 -0
  7. package/lib/{translation/feedback/cloud/model → common/constants}/CloudFeedbackSortCriteria.js +0 -0
  8. package/lib/common/constants/CloudFeedbackSortCriteria.js.map +1 -0
  9. package/lib/common/constants/Statuses.d.ts +6 -0
  10. package/lib/common/constants/Statuses.js +7 -1
  11. package/lib/common/constants/Statuses.js.map +1 -1
  12. package/lib/common/constants/TranslationConstants.d.ts +17 -8
  13. package/lib/common/constants/TranslationConstants.js +22 -11
  14. package/lib/common/constants/TranslationConstants.js.map +1 -1
  15. package/lib/common/exceptions/ContentInsightsException.d.ts +4 -0
  16. package/lib/common/exceptions/ContentInsightsException.js +17 -0
  17. package/lib/common/exceptions/ContentInsightsException.js.map +1 -0
  18. package/lib/common/external/communication/RestClient.js +9 -7
  19. package/lib/common/external/communication/RestClient.js.map +1 -1
  20. package/lib/common/utils/Utils.d.ts +8 -1
  21. package/lib/common/utils/Utils.js +133 -31
  22. package/lib/common/utils/Utils.js.map +1 -1
  23. package/lib/index.d.ts +45 -17
  24. package/lib/index.js +74 -20
  25. package/lib/index.js.map +1 -1
  26. package/lib/translation/common/LanguageWeaverClient.d.ts +10 -2
  27. package/lib/translation/common/cloud/CloudLanguageWeaverClient.d.ts +28 -4
  28. package/lib/translation/common/cloud/CloudLanguageWeaverClient.js +209 -112
  29. package/lib/translation/common/cloud/CloudLanguageWeaverClient.js.map +1 -1
  30. package/lib/translation/common/edge/EdgeLanguageWeaverClient.d.ts +26 -6
  31. package/lib/translation/common/edge/EdgeLanguageWeaverClient.js +204 -132
  32. package/lib/translation/common/edge/EdgeLanguageWeaverClient.js.map +1 -1
  33. package/lib/translation/common/edge/utils/EdgeLanguagePairUtil.d.ts +1 -1
  34. package/lib/translation/common/edge/utils/EdgeLanguagePairUtil.js +1 -1
  35. package/lib/translation/common/edge/utils/EdgeLanguagePairUtil.js.map +1 -1
  36. package/lib/translation/content-insights/cloud/api/CloudContentInsightsResponse.d.ts +23 -0
  37. package/lib/translation/content-insights/cloud/api/CloudContentInsightsResponse.js +69 -0
  38. package/lib/translation/content-insights/cloud/api/CloudContentInsightsResponse.js.map +1 -0
  39. package/lib/translation/content-insights/cloud/api/CloudContentInsightsStatisticsApiModel.d.ts +10 -0
  40. package/lib/translation/content-insights/cloud/api/CloudContentInsightsStatisticsApiModel.js +39 -0
  41. package/lib/translation/content-insights/cloud/api/CloudContentInsightsStatisticsApiModel.js.map +1 -0
  42. package/lib/translation/content-insights/cloud/api/CloudCreateContentInsightsResponse.d.ts +12 -0
  43. package/lib/translation/content-insights/cloud/api/CloudCreateContentInsightsResponse.js +32 -0
  44. package/lib/translation/content-insights/cloud/api/CloudCreateContentInsightsResponse.js.map +1 -0
  45. package/lib/translation/content-insights/cloud/api/CloudCreateContentInsightsStatusResponse.d.ts +16 -0
  46. package/lib/translation/content-insights/cloud/api/CloudCreateContentInsightsStatusResponse.js +42 -0
  47. package/lib/translation/content-insights/cloud/api/CloudCreateContentInsightsStatusResponse.js.map +1 -0
  48. package/lib/translation/content-insights/cloud/api/CloudDocumentApiModel.d.ts +12 -0
  49. package/lib/translation/content-insights/cloud/api/CloudDocumentApiModel.js +39 -0
  50. package/lib/translation/content-insights/cloud/api/CloudDocumentApiModel.js.map +1 -0
  51. package/lib/translation/content-insights/cloud/api/CloudSegmentApiModel.d.ts +15 -0
  52. package/lib/translation/content-insights/cloud/api/CloudSegmentApiModel.js +57 -0
  53. package/lib/translation/content-insights/cloud/api/CloudSegmentApiModel.js.map +1 -0
  54. package/lib/translation/content-insights/cloud/api/CloudSummarizationApiModel.d.ts +13 -0
  55. package/lib/translation/content-insights/cloud/api/CloudSummarizationApiModel.js +46 -0
  56. package/lib/translation/content-insights/cloud/api/CloudSummarizationApiModel.js.map +1 -0
  57. package/lib/translation/content-insights/cloud/request/CloudContentInsightsRequest.d.ts +3 -0
  58. package/lib/translation/content-insights/cloud/request/CloudContentInsightsRequest.js +30 -0
  59. package/lib/translation/content-insights/cloud/request/CloudContentInsightsRequest.js.map +1 -0
  60. package/lib/translation/content-insights/cloud/request/CloudFileContentInsightsRequest.d.ts +8 -0
  61. package/lib/translation/content-insights/cloud/request/CloudFileContentInsightsRequest.js +29 -0
  62. package/lib/translation/content-insights/cloud/request/CloudFileContentInsightsRequest.js.map +1 -0
  63. package/lib/translation/content-insights/cloud/result/CloudContentInsightsResult.d.ts +16 -0
  64. package/lib/translation/content-insights/cloud/result/CloudContentInsightsResult.js +49 -0
  65. package/lib/translation/content-insights/cloud/result/CloudContentInsightsResult.js.map +1 -0
  66. package/lib/translation/content-insights/cloud/result/CloudContentInsightsStatistics.d.ts +8 -0
  67. package/lib/translation/content-insights/cloud/result/CloudContentInsightsStatistics.js +29 -0
  68. package/lib/translation/content-insights/cloud/result/CloudContentInsightsStatistics.js.map +1 -0
  69. package/lib/translation/content-insights/cloud/result/CloudSegment.d.ts +6 -0
  70. package/lib/translation/content-insights/cloud/result/CloudSegment.js +40 -0
  71. package/lib/translation/content-insights/cloud/result/CloudSegment.js.map +1 -0
  72. package/lib/translation/content-insights/cloud/result/CloudSummarization.d.ts +6 -0
  73. package/lib/translation/content-insights/cloud/result/CloudSummarization.js +19 -0
  74. package/lib/translation/content-insights/cloud/result/CloudSummarization.js.map +1 -0
  75. package/lib/translation/content-insights/cloud/service/CloudContentInsightsService.d.ts +20 -0
  76. package/lib/translation/content-insights/cloud/service/CloudContentInsightsService.js +248 -0
  77. package/lib/translation/content-insights/cloud/service/CloudContentInsightsService.js.map +1 -0
  78. package/lib/translation/content-insights/common/request/ContentInsightsRequest.d.ts +7 -0
  79. package/lib/translation/content-insights/common/request/ContentInsightsRequest.js +23 -0
  80. package/lib/translation/content-insights/common/request/ContentInsightsRequest.js.map +1 -0
  81. package/lib/translation/content-insights/common/result/ContentInsightsResult.d.ts +6 -0
  82. package/lib/translation/content-insights/common/result/ContentInsightsResult.js +19 -0
  83. package/lib/translation/content-insights/common/result/ContentInsightsResult.js.map +1 -0
  84. package/lib/translation/content-insights/common/result/Segment.d.ts +8 -0
  85. package/lib/translation/content-insights/common/result/Segment.js +29 -0
  86. package/lib/translation/content-insights/common/result/Segment.js.map +1 -0
  87. package/lib/translation/content-insights/common/result/Summarization.d.ts +8 -0
  88. package/lib/translation/content-insights/common/result/Summarization.js +25 -0
  89. package/lib/translation/content-insights/common/result/Summarization.js.map +1 -0
  90. package/lib/translation/content-insights/common/utils/ContentInsightsUtils.d.ts +4 -0
  91. package/lib/translation/content-insights/common/utils/ContentInsightsUtils.js +145 -0
  92. package/lib/translation/content-insights/common/utils/ContentInsightsUtils.js.map +1 -0
  93. package/lib/translation/content-insights/edge/api/EdgeContentInsightsResponse.d.ts +13 -0
  94. package/lib/translation/content-insights/edge/api/EdgeContentInsightsResponse.js +53 -0
  95. package/lib/translation/content-insights/edge/api/EdgeContentInsightsResponse.js.map +1 -0
  96. package/lib/translation/content-insights/edge/api/EdgeSegmentApiModel.d.ts +12 -0
  97. package/lib/translation/content-insights/edge/api/EdgeSegmentApiModel.js +46 -0
  98. package/lib/translation/content-insights/edge/api/EdgeSegmentApiModel.js.map +1 -0
  99. package/lib/translation/content-insights/edge/request/EdgeContentInsightsRequest.d.ts +5 -0
  100. package/lib/translation/content-insights/edge/request/EdgeContentInsightsRequest.js +19 -0
  101. package/lib/translation/content-insights/edge/request/EdgeContentInsightsRequest.js.map +1 -0
  102. package/lib/translation/content-insights/edge/result/EdgeContentInsightsResult.d.ts +9 -0
  103. package/lib/translation/content-insights/edge/result/EdgeContentInsightsResult.js +29 -0
  104. package/lib/translation/content-insights/edge/result/EdgeContentInsightsResult.js.map +1 -0
  105. package/lib/translation/content-insights/edge/result/EdgeSegment.d.ts +3 -0
  106. package/lib/translation/content-insights/edge/result/EdgeSegment.js +30 -0
  107. package/lib/translation/content-insights/edge/result/EdgeSegment.js.map +1 -0
  108. package/lib/translation/content-insights/edge/result/EdgeSummarization.d.ts +6 -0
  109. package/lib/translation/content-insights/edge/result/EdgeSummarization.js +19 -0
  110. package/lib/translation/content-insights/edge/result/EdgeSummarization.js.map +1 -0
  111. package/lib/translation/content-insights/edge/service/EdgeContentInsightsService.d.ts +14 -0
  112. package/lib/translation/content-insights/edge/service/EdgeContentInsightsService.js +96 -0
  113. package/lib/translation/content-insights/edge/service/EdgeContentInsightsService.js.map +1 -0
  114. package/lib/translation/dictionaries/cloud/api/CloudDictionariesResponse.d.ts +14 -0
  115. package/lib/translation/dictionaries/cloud/api/CloudDictionariesResponse.js +72 -0
  116. package/lib/translation/dictionaries/cloud/api/CloudDictionariesResponse.js.map +1 -0
  117. package/lib/translation/dictionaries/cloud/api/CloudDictionaryApiModel.d.ts +36 -0
  118. package/lib/translation/dictionaries/cloud/api/CloudDictionaryApiModel.js +136 -0
  119. package/lib/translation/dictionaries/cloud/api/CloudDictionaryApiModel.js.map +1 -0
  120. package/lib/translation/{translate → dictionaries}/cloud/result/CloudDictionariesResult.d.ts +3 -3
  121. package/lib/translation/{translate → dictionaries}/cloud/result/CloudDictionariesResult.js +0 -0
  122. package/lib/translation/dictionaries/cloud/result/CloudDictionariesResult.js.map +1 -0
  123. package/lib/translation/{translate/cloud/api/CloudDictionaryResponse.d.ts → dictionaries/cloud/result/CloudDictionary.d.ts} +1 -1
  124. package/lib/translation/{translate/cloud/api/CloudDictionaryResponse.js → dictionaries/cloud/result/CloudDictionary.js} +15 -15
  125. package/lib/translation/dictionaries/cloud/result/CloudDictionary.js.map +1 -0
  126. package/lib/translation/dictionaries/cloud/service/CloudDictionariesService.d.ts +15 -0
  127. package/lib/translation/dictionaries/cloud/service/CloudDictionariesService.js +51 -0
  128. package/lib/translation/dictionaries/cloud/service/CloudDictionariesService.js.map +1 -0
  129. package/lib/translation/dictionaries/common/result/DictionariesResult.d.ts +7 -0
  130. package/lib/translation/{translate → dictionaries}/common/result/DictionariesResult.js +0 -0
  131. package/lib/translation/dictionaries/common/result/DictionariesResult.js.map +1 -0
  132. package/lib/translation/{translate/common/api/DictionaryResponse.d.ts → dictionaries/common/result/Dictionary.d.ts} +1 -1
  133. package/lib/translation/{translate/common/api/DictionaryResponse.js → dictionaries/common/result/Dictionary.js} +8 -8
  134. package/lib/translation/dictionaries/common/result/Dictionary.js.map +1 -0
  135. package/lib/translation/dictionaries/edge/api/EdgeDictionariesResponse.d.ts +22 -0
  136. package/lib/translation/dictionaries/edge/api/EdgeDictionariesResponse.js +84 -0
  137. package/lib/translation/dictionaries/edge/api/EdgeDictionariesResponse.js.map +1 -0
  138. package/lib/translation/dictionaries/edge/api/EdgeDictionaryApiModel.d.ts +15 -0
  139. package/lib/translation/dictionaries/edge/api/EdgeDictionaryApiModel.js +58 -0
  140. package/lib/translation/dictionaries/edge/api/EdgeDictionaryApiModel.js.map +1 -0
  141. package/lib/translation/{translate → dictionaries}/edge/result/EdgeDictionariesResult.d.ts +3 -3
  142. package/lib/translation/{translate → dictionaries}/edge/result/EdgeDictionariesResult.js +0 -0
  143. package/lib/translation/dictionaries/edge/result/EdgeDictionariesResult.js.map +1 -0
  144. package/lib/translation/{translate/edge/api/EdgeDictionaryResponse.d.ts → dictionaries/edge/result/EdgeDictionary.d.ts} +1 -1
  145. package/lib/translation/{translate/edge/api/EdgeDictionaryResponse.js → dictionaries/edge/result/EdgeDictionary.js} +8 -8
  146. package/lib/translation/dictionaries/edge/result/EdgeDictionary.js.map +1 -0
  147. package/lib/translation/dictionaries/edge/service/EdgeDictionariesService.d.ts +12 -0
  148. package/lib/translation/dictionaries/edge/service/EdgeDictionariesService.js +51 -0
  149. package/lib/translation/dictionaries/edge/service/EdgeDictionariesService.js.map +1 -0
  150. package/lib/translation/feedback/cloud/api/CloudFeedbackApiModel.js +2 -2
  151. package/lib/translation/feedback/cloud/api/CloudFeedbackApiModel.js.map +1 -1
  152. package/lib/translation/feedback/cloud/request/CloudFeedbackSortRequest.d.ts +1 -1
  153. package/lib/translation/feedback/cloud/{model → result}/CloudAuditData.d.ts +1 -1
  154. package/lib/translation/feedback/cloud/{model → result}/CloudAuditData.js +1 -1
  155. package/lib/translation/feedback/cloud/result/CloudAuditData.js.map +1 -0
  156. package/lib/translation/feedback/cloud/result/CloudFeedbackResult.d.ts +1 -1
  157. package/lib/translation/feedback/cloud/service/CloudFeedbackService.js +1 -1
  158. package/lib/translation/feedback/cloud/service/CloudFeedbackService.js.map +1 -1
  159. package/lib/translation/feedback/cloud/{validators → validator}/CloudFeedbackValidator.d.ts +1 -1
  160. package/lib/translation/feedback/cloud/{validators → validator}/CloudFeedbackValidator.js +1 -1
  161. package/lib/translation/feedback/cloud/validator/CloudFeedbackValidator.js.map +1 -0
  162. package/lib/translation/feedback/common/{model → result}/AuditData.d.ts +0 -0
  163. package/lib/translation/feedback/common/{model → result}/AuditData.js +0 -0
  164. package/lib/translation/feedback/common/result/AuditData.js.map +1 -0
  165. package/lib/translation/feedback/common/result/FeedbackResult.d.ts +1 -1
  166. package/lib/translation/feedback/common/{validators → validator}/FeedbackValidator.d.ts +0 -0
  167. package/lib/translation/feedback/common/{validators → validator}/FeedbackValidator.js +0 -0
  168. package/lib/translation/feedback/common/validator/FeedbackValidator.js.map +1 -0
  169. package/lib/translation/feedback/edge/api/EdgeFeedbackApiModel.d.ts +1 -1
  170. package/lib/translation/feedback/edge/api/EdgeFeedbackApiModel.js +1 -1
  171. package/lib/translation/feedback/edge/api/EdgeFeedbackApiModel.js.map +1 -1
  172. package/lib/translation/feedback/edge/service/EdgeFeedbackService.d.ts +1 -1
  173. package/lib/translation/feedback/edge/service/EdgeFeedbackService.js +1 -1
  174. package/lib/translation/feedback/edge/service/EdgeFeedbackService.js.map +1 -1
  175. package/lib/translation/feedback/edge/validator/EdgeFeedbackValidator.d.ts +3 -0
  176. package/lib/translation/feedback/edge/{validators → validator}/EdgeFeedbackValidator.js +1 -1
  177. package/lib/translation/feedback/edge/validator/EdgeFeedbackValidator.js.map +1 -0
  178. package/lib/translation/language-pairs/cloud/api/CloudLanguagePairApiModel.d.ts +21 -0
  179. package/lib/translation/language-pairs/cloud/api/CloudLanguagePairApiModel.js +81 -0
  180. package/lib/translation/language-pairs/cloud/api/CloudLanguagePairApiModel.js.map +1 -0
  181. package/lib/translation/language-pairs/cloud/api/CloudLanguagePairsResponse.d.ts +13 -0
  182. package/lib/translation/language-pairs/cloud/api/CloudLanguagePairsResponse.js +47 -0
  183. package/lib/translation/language-pairs/cloud/api/CloudLanguagePairsResponse.js.map +1 -0
  184. package/lib/translation/{translate/cloud/api → language-pairs/cloud/result}/CloudLanguagePair.d.ts +2 -0
  185. package/lib/translation/{translate/cloud/api → language-pairs/cloud/result}/CloudLanguagePair.js +11 -0
  186. package/lib/translation/language-pairs/cloud/result/CloudLanguagePair.js.map +1 -0
  187. package/lib/translation/{translate → language-pairs}/cloud/result/CloudLanguagePairsResult.d.ts +1 -1
  188. package/lib/translation/{translate → language-pairs}/cloud/result/CloudLanguagePairsResult.js +0 -0
  189. package/lib/translation/language-pairs/cloud/result/CloudLanguagePairsResult.js.map +1 -0
  190. package/lib/translation/language-pairs/cloud/service/CloudLanguagePairsService.d.ts +15 -0
  191. package/lib/translation/language-pairs/cloud/service/CloudLanguagePairsService.js +45 -0
  192. package/lib/translation/language-pairs/cloud/service/CloudLanguagePairsService.js.map +1 -0
  193. package/lib/translation/language-pairs/common/result/LanguagePair.d.ts +16 -0
  194. package/lib/translation/{translate/common/api → language-pairs/common/result}/LanguagePair.js +11 -0
  195. package/lib/translation/language-pairs/common/result/LanguagePair.js.map +1 -0
  196. package/lib/translation/{translate → language-pairs}/common/result/LanguagePairsResult.d.ts +1 -1
  197. package/lib/translation/{translate → language-pairs}/common/result/LanguagePairsResult.js +0 -0
  198. package/lib/translation/language-pairs/common/result/LanguagePairsResult.js.map +1 -0
  199. package/lib/translation/language-pairs/edge/api/EdgeLanguagePairApiModel.d.ts +17 -0
  200. package/lib/translation/language-pairs/edge/api/EdgeLanguagePairApiModel.js +89 -0
  201. package/lib/translation/language-pairs/edge/api/EdgeLanguagePairApiModel.js.map +1 -0
  202. package/lib/translation/language-pairs/edge/api/EdgeLanguagePairsApiModel.d.ts +10 -0
  203. package/lib/translation/language-pairs/edge/api/EdgeLanguagePairsApiModel.js +37 -0
  204. package/lib/translation/language-pairs/edge/api/EdgeLanguagePairsApiModel.js.map +1 -0
  205. package/lib/translation/language-pairs/edge/api/MemberPairApiModel.d.ts +31 -0
  206. package/lib/translation/language-pairs/edge/api/MemberPairApiModel.js +116 -0
  207. package/lib/translation/language-pairs/edge/api/MemberPairApiModel.js.map +1 -0
  208. package/lib/translation/language-pairs/edge/result/EdgeLanguagePair.d.ts +15 -0
  209. package/lib/translation/{translate/edge/api → language-pairs/edge/result}/EdgeLanguagePair.js +20 -0
  210. package/lib/translation/language-pairs/edge/result/EdgeLanguagePair.js.map +1 -0
  211. package/lib/translation/{translate → language-pairs}/edge/result/EdgeLanguagePairsResult.d.ts +1 -1
  212. package/lib/translation/{translate → language-pairs}/edge/result/EdgeLanguagePairsResult.js +0 -0
  213. package/lib/translation/language-pairs/edge/result/EdgeLanguagePairsResult.js.map +1 -0
  214. package/lib/translation/{translate/edge/api → language-pairs/edge/result}/MemberPair.d.ts +0 -0
  215. package/lib/translation/{translate/edge/api → language-pairs/edge/result}/MemberPair.js +0 -0
  216. package/lib/translation/language-pairs/edge/result/MemberPair.js.map +1 -0
  217. package/lib/translation/language-pairs/edge/service/EdgeLanguagePairsService.d.ts +14 -0
  218. package/lib/translation/language-pairs/edge/service/EdgeLanguagePairsService.js +80 -0
  219. package/lib/translation/language-pairs/edge/service/EdgeLanguagePairsService.js.map +1 -0
  220. package/lib/translation/linguistic-options/cloud/api/CloudLinguisticOptionApiModel.d.ts +13 -0
  221. package/lib/translation/linguistic-options/cloud/api/CloudLinguisticOptionApiModel.js +68 -0
  222. package/lib/translation/linguistic-options/cloud/api/CloudLinguisticOptionApiModel.js.map +1 -0
  223. package/lib/translation/linguistic-options/cloud/api/CloudLinguisticOptionsResponse.d.ts +6 -0
  224. package/lib/translation/linguistic-options/cloud/api/CloudLinguisticOptionsResponse.js +19 -0
  225. package/lib/translation/linguistic-options/cloud/api/CloudLinguisticOptionsResponse.js.map +1 -0
  226. package/lib/translation/linguistic-options/cloud/request/CloudGetLinguisticOptionsRequest.d.ts +3 -0
  227. package/lib/translation/linguistic-options/cloud/request/CloudGetLinguisticOptionsRequest.js +30 -0
  228. package/lib/translation/linguistic-options/cloud/request/CloudGetLinguisticOptionsRequest.js.map +1 -0
  229. package/lib/translation/linguistic-options/cloud/result/CloudLinguisticOption.d.ts +10 -0
  230. package/lib/translation/linguistic-options/cloud/result/CloudLinguisticOption.js +57 -0
  231. package/lib/translation/linguistic-options/cloud/result/CloudLinguisticOption.js.map +1 -0
  232. package/lib/translation/linguistic-options/cloud/result/CloudLinguisticOptionsResult.d.ts +6 -0
  233. package/lib/translation/linguistic-options/cloud/result/CloudLinguisticOptionsResult.js +19 -0
  234. package/lib/translation/linguistic-options/cloud/result/CloudLinguisticOptionsResult.js.map +1 -0
  235. package/lib/translation/linguistic-options/cloud/service/CloudLinguisticOptionsService.d.ts +19 -0
  236. package/lib/translation/linguistic-options/cloud/service/CloudLinguisticOptionsService.js +72 -0
  237. package/lib/translation/linguistic-options/cloud/service/CloudLinguisticOptionsService.js.map +1 -0
  238. package/lib/translation/linguistic-options/cloud/validator/CloudLinguisticOptionsValidator.d.ts +3 -0
  239. package/lib/translation/linguistic-options/cloud/validator/CloudLinguisticOptionsValidator.js +30 -0
  240. package/lib/translation/linguistic-options/cloud/validator/CloudLinguisticOptionsValidator.js.map +1 -0
  241. package/lib/translation/linguistic-options/common/api/LinguisticOptionApiModel.d.ts +11 -0
  242. package/lib/translation/linguistic-options/common/api/LinguisticOptionApiModel.js +39 -0
  243. package/lib/translation/linguistic-options/common/api/LinguisticOptionApiModel.js.map +1 -0
  244. package/lib/translation/{translate/common/api/LanguagePair.d.ts → linguistic-options/common/request/GetLinguisticOptionsRequest.d.ts} +1 -4
  245. package/lib/translation/linguistic-options/common/request/GetLinguisticOptionsRequest.js +39 -0
  246. package/lib/translation/linguistic-options/common/request/GetLinguisticOptionsRequest.js.map +1 -0
  247. package/lib/translation/linguistic-options/common/result/LinguisticOption.d.ts +11 -0
  248. package/lib/translation/linguistic-options/common/result/LinguisticOption.js +39 -0
  249. package/lib/translation/linguistic-options/common/result/LinguisticOption.js.map +1 -0
  250. package/lib/translation/linguistic-options/common/result/LinguisticOptionsResult.d.ts +6 -0
  251. package/lib/translation/linguistic-options/common/result/LinguisticOptionsResult.js +19 -0
  252. package/lib/translation/linguistic-options/common/result/LinguisticOptionsResult.js.map +1 -0
  253. package/lib/translation/linguistic-options/common/validator/LinguisticOptionsValidator.d.ts +4 -0
  254. package/lib/translation/linguistic-options/common/validator/LinguisticOptionsValidator.js +25 -0
  255. package/lib/translation/linguistic-options/common/validator/LinguisticOptionsValidator.js.map +1 -0
  256. package/lib/translation/linguistic-options/edge/api/EdgeLinguisticOptionApiModel.d.ts +7 -0
  257. package/lib/translation/linguistic-options/edge/api/EdgeLinguisticOptionApiModel.js +46 -0
  258. package/lib/translation/linguistic-options/edge/api/EdgeLinguisticOptionApiModel.js.map +1 -0
  259. package/lib/translation/linguistic-options/edge/api/EdgeLinguisticOptionsResponse.d.ts +6 -0
  260. package/lib/translation/linguistic-options/edge/api/EdgeLinguisticOptionsResponse.js +19 -0
  261. package/lib/translation/linguistic-options/edge/api/EdgeLinguisticOptionsResponse.js.map +1 -0
  262. package/lib/translation/linguistic-options/edge/request/EdgeGetLinguisticOptionsRequest.d.ts +9 -0
  263. package/lib/translation/linguistic-options/edge/request/EdgeGetLinguisticOptionsRequest.js +50 -0
  264. package/lib/translation/linguistic-options/edge/request/EdgeGetLinguisticOptionsRequest.js.map +1 -0
  265. package/lib/translation/linguistic-options/edge/result/EdgeLinguisticOption.d.ts +4 -0
  266. package/lib/translation/linguistic-options/edge/result/EdgeLinguisticOption.js +37 -0
  267. package/lib/translation/linguistic-options/edge/result/EdgeLinguisticOption.js.map +1 -0
  268. package/lib/translation/linguistic-options/edge/result/EdgeLinguisticOptionsResult.d.ts +6 -0
  269. package/lib/translation/linguistic-options/edge/result/EdgeLinguisticOptionsResult.js +19 -0
  270. package/lib/translation/linguistic-options/edge/result/EdgeLinguisticOptionsResult.js.map +1 -0
  271. package/lib/translation/linguistic-options/edge/service/EdgeLinguisticOptionsService.d.ts +18 -0
  272. package/lib/translation/linguistic-options/edge/service/EdgeLinguisticOptionsService.js +101 -0
  273. package/lib/translation/linguistic-options/edge/service/EdgeLinguisticOptionsService.js.map +1 -0
  274. package/lib/translation/linguistic-options/edge/validator/EdgeLinguisticOptionsValidator.d.ts +3 -0
  275. package/lib/translation/linguistic-options/edge/validator/EdgeLinguisticOptionsValidator.js +30 -0
  276. package/lib/translation/linguistic-options/edge/validator/EdgeLinguisticOptionsValidator.js.map +1 -0
  277. package/lib/translation/translate/cloud/request/CloudRetrieveFileRequest.d.ts +3 -0
  278. package/lib/translation/translate/cloud/request/CloudRetrieveFileRequest.js +30 -0
  279. package/lib/translation/translate/cloud/request/CloudRetrieveFileRequest.js.map +1 -0
  280. package/lib/translation/translate/cloud/request/CloudTranslateTextRequest.d.ts +3 -0
  281. package/lib/translation/translate/cloud/request/CloudTranslateTextRequest.js +21 -0
  282. package/lib/translation/translate/cloud/request/CloudTranslateTextRequest.js.map +1 -1
  283. package/lib/translation/translate/cloud/request/CloudTranslateTextRequestApiModel.d.ts +26 -0
  284. package/lib/translation/translate/cloud/request/CloudTranslateTextRequestApiModel.js +80 -0
  285. package/lib/translation/translate/cloud/request/CloudTranslateTextRequestApiModel.js.map +1 -0
  286. package/lib/translation/translate/cloud/result/CloudTranslationFileResult.d.ts +0 -3
  287. package/lib/translation/translate/cloud/result/CloudTranslationFileResult.js +0 -10
  288. package/lib/translation/translate/cloud/result/CloudTranslationFileResult.js.map +1 -1
  289. package/lib/translation/translate/cloud/result/CloudTranslationTextResult.d.ts +3 -3
  290. package/lib/translation/translate/cloud/result/CloudTranslationTextResult.js +3 -3
  291. package/lib/translation/translate/cloud/result/CloudTranslationTextResult.js.map +1 -1
  292. package/lib/translation/translate/common/request/RetrieveFileRequest.d.ts +11 -0
  293. package/lib/translation/translate/common/request/RetrieveFileRequest.js +39 -0
  294. package/lib/translation/translate/common/request/RetrieveFileRequest.js.map +1 -0
  295. package/lib/translation/translate/common/request/TranslateBatchFileRequest.d.ts +3 -0
  296. package/lib/translation/translate/common/request/TranslateBatchFileRequest.js +10 -0
  297. package/lib/translation/translate/common/request/TranslateBatchFileRequest.js.map +1 -1
  298. package/lib/translation/translate/common/request/TranslateRequest.d.ts +3 -0
  299. package/lib/translation/translate/common/request/TranslateRequest.js +10 -0
  300. package/lib/translation/translate/common/request/TranslateRequest.js.map +1 -1
  301. package/lib/translation/translate/common/result/TranslationFileResult.d.ts +6 -0
  302. package/lib/translation/translate/common/result/TranslationFileResult.js +20 -0
  303. package/lib/translation/translate/common/result/TranslationFileResult.js.map +1 -1
  304. package/lib/translation/translate/common/utils/TranslateFileUtil.d.ts +3 -1
  305. package/lib/translation/translate/common/utils/TranslateFileUtil.js +26 -53
  306. package/lib/translation/translate/common/utils/TranslateFileUtil.js.map +1 -1
  307. package/lib/translation/translate/edge/request/EdgeRetrieveFileRequest.d.ts +7 -0
  308. package/lib/translation/translate/edge/request/EdgeRetrieveFileRequest.js +40 -0
  309. package/lib/translation/translate/edge/request/EdgeRetrieveFileRequest.js.map +1 -0
  310. package/lib/translation/translate/edge/request/EdgeTranslateFileRequest.d.ts +2 -2
  311. package/lib/translation/translate/edge/request/EdgeTranslateFileRequest.js +15 -14
  312. package/lib/translation/translate/edge/request/EdgeTranslateFileRequest.js.map +1 -1
  313. package/lib/translation/translate/edge/request/{EdgeTranslateApiModel.d.ts → EdgeTranslateRequest.d.ts} +1 -1
  314. package/lib/translation/translate/edge/request/{EdgeTranslateApiModel.js → EdgeTranslateRequest.js} +14 -14
  315. package/lib/translation/translate/edge/request/EdgeTranslateRequest.js.map +1 -0
  316. package/lib/translation/translate/edge/request/EdgeTranslateTextRequest.d.ts +2 -2
  317. package/lib/translation/translate/edge/request/EdgeTranslateTextRequest.js +15 -14
  318. package/lib/translation/translate/edge/request/EdgeTranslateTextRequest.js.map +1 -1
  319. package/lib/translation/translate/edge/result/EdgeTranslationFileResult.d.ts +0 -3
  320. package/lib/translation/translate/edge/result/EdgeTranslationFileResult.js +0 -10
  321. package/lib/translation/translate/edge/result/EdgeTranslationFileResult.js.map +1 -1
  322. package/lib/version.d.ts +1 -1
  323. package/lib/version.js +1 -1
  324. package/package.json +2 -2
  325. package/lib/translation/feedback/cloud/model/CloudAuditData.js.map +0 -1
  326. package/lib/translation/feedback/cloud/model/CloudFeedbackSortCriteria.js.map +0 -1
  327. package/lib/translation/feedback/cloud/validators/CloudFeedbackValidator.js.map +0 -1
  328. package/lib/translation/feedback/common/model/AuditData.js.map +0 -1
  329. package/lib/translation/feedback/common/validators/FeedbackValidator.js.map +0 -1
  330. package/lib/translation/feedback/edge/validators/EdgeFeedbackValidator.d.ts +0 -3
  331. package/lib/translation/feedback/edge/validators/EdgeFeedbackValidator.js.map +0 -1
  332. package/lib/translation/translate/cloud/api/CloudDictionaryResponse.js.map +0 -1
  333. package/lib/translation/translate/cloud/api/CloudLanguagePair.js.map +0 -1
  334. package/lib/translation/translate/cloud/result/CloudDictionariesResult.js.map +0 -1
  335. package/lib/translation/translate/cloud/result/CloudLanguagePairsResult.js.map +0 -1
  336. package/lib/translation/translate/common/api/DictionaryResponse.js.map +0 -1
  337. package/lib/translation/translate/common/api/LanguagePair.js.map +0 -1
  338. package/lib/translation/translate/common/result/DictionariesResult.d.ts +0 -7
  339. package/lib/translation/translate/common/result/DictionariesResult.js.map +0 -1
  340. package/lib/translation/translate/common/result/LanguagePairsResult.js.map +0 -1
  341. package/lib/translation/translate/edge/api/EdgeDictionaryResponse.js.map +0 -1
  342. package/lib/translation/translate/edge/api/EdgeLanguagePair.d.ts +0 -9
  343. package/lib/translation/translate/edge/api/EdgeLanguagePair.js.map +0 -1
  344. package/lib/translation/translate/edge/api/MemberPair.js.map +0 -1
  345. package/lib/translation/translate/edge/request/EdgeTranslateApiModel.js.map +0 -1
  346. package/lib/translation/translate/edge/result/EdgeDictionariesResult.js.map +0 -1
  347. package/lib/translation/translate/edge/result/EdgeLanguagePairsResult.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CloudContentInsightsRequest.js","sourceRoot":"","sources":["../../../../../src/translation/content-insights/cloud/request/CloudContentInsightsRequest.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,uGAAiF;AAEjF;IAAyD,+CAAsB;IAA/E;;IAAiF,CAAC;IAAD,kCAAC;AAAD,CAAC,AAAlF,CAAyD,gCAAsB,GAAG"}
@@ -0,0 +1,8 @@
1
+ export default class CloudFileContentInsightsRequest {
2
+ private _sourceLanguage;
3
+ private _files;
4
+ get sourceLanguage(): string | undefined;
5
+ set sourceLanguage(value: string | undefined);
6
+ get files(): string | File | File[] | undefined;
7
+ set files(value: string | File | File[] | undefined);
8
+ }
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var CloudFileContentInsightsRequest = /** @class */ (function () {
4
+ function CloudFileContentInsightsRequest() {
5
+ }
6
+ Object.defineProperty(CloudFileContentInsightsRequest.prototype, "sourceLanguage", {
7
+ get: function () {
8
+ return this._sourceLanguage;
9
+ },
10
+ set: function (value) {
11
+ this._sourceLanguage = value;
12
+ },
13
+ enumerable: false,
14
+ configurable: true
15
+ });
16
+ Object.defineProperty(CloudFileContentInsightsRequest.prototype, "files", {
17
+ get: function () {
18
+ return this._files;
19
+ },
20
+ set: function (value) {
21
+ this._files = value;
22
+ },
23
+ enumerable: false,
24
+ configurable: true
25
+ });
26
+ return CloudFileContentInsightsRequest;
27
+ }());
28
+ exports.default = CloudFileContentInsightsRequest;
29
+ //# sourceMappingURL=CloudFileContentInsightsRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CloudFileContentInsightsRequest.js","sourceRoot":"","sources":["../../../../../src/translation/content-insights/cloud/request/CloudFileContentInsightsRequest.ts"],"names":[],"mappings":";;AAAA;IAAA;IAmBA,CAAC;IAfG,sBAAI,2DAAc;aAAlB;YACI,OAAO,IAAI,CAAC,eAAe,CAAC;QAChC,CAAC;aAED,UAAmB,KAAyB;YACxC,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC;QACjC,CAAC;;;OAJA;IAMD,sBAAI,kDAAK;aAAT;YACI,OAAO,IAAI,CAAC,MAAM,CAAC;QACvB,CAAC;aAED,UAAU,KAAyC;YAC/C,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACxB,CAAC;;;OAJA;IAKL,sCAAC;AAAD,CAAC,AAnBD,IAmBC"}
@@ -0,0 +1,16 @@
1
+ import CloudContentInsightsStatistics from './CloudContentInsightsStatistics';
2
+ import CloudSummarization from './CloudSummarization';
3
+ export default class CloudContentInsightsResult {
4
+ private _contentInsightsId;
5
+ private _sourceLanguage;
6
+ private _summarization;
7
+ private _stats;
8
+ get contentInsightsId(): string | undefined;
9
+ set contentInsightsId(value: string | undefined);
10
+ get sourceLanguage(): string | undefined;
11
+ set sourceLanguage(value: string | undefined);
12
+ get summarization(): CloudSummarization | undefined;
13
+ set summarization(value: CloudSummarization | undefined);
14
+ get stats(): CloudContentInsightsStatistics | undefined;
15
+ set stats(value: CloudContentInsightsStatistics | undefined);
16
+ }
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var CloudContentInsightsResult = /** @class */ (function () {
4
+ function CloudContentInsightsResult() {
5
+ }
6
+ Object.defineProperty(CloudContentInsightsResult.prototype, "contentInsightsId", {
7
+ get: function () {
8
+ return this._contentInsightsId;
9
+ },
10
+ set: function (value) {
11
+ this._contentInsightsId = value;
12
+ },
13
+ enumerable: false,
14
+ configurable: true
15
+ });
16
+ Object.defineProperty(CloudContentInsightsResult.prototype, "sourceLanguage", {
17
+ get: function () {
18
+ return this._sourceLanguage;
19
+ },
20
+ set: function (value) {
21
+ this._sourceLanguage = value;
22
+ },
23
+ enumerable: false,
24
+ configurable: true
25
+ });
26
+ Object.defineProperty(CloudContentInsightsResult.prototype, "summarization", {
27
+ get: function () {
28
+ return this._summarization;
29
+ },
30
+ set: function (value) {
31
+ this._summarization = value;
32
+ },
33
+ enumerable: false,
34
+ configurable: true
35
+ });
36
+ Object.defineProperty(CloudContentInsightsResult.prototype, "stats", {
37
+ get: function () {
38
+ return this._stats;
39
+ },
40
+ set: function (value) {
41
+ this._stats = value;
42
+ },
43
+ enumerable: false,
44
+ configurable: true
45
+ });
46
+ return CloudContentInsightsResult;
47
+ }());
48
+ exports.default = CloudContentInsightsResult;
49
+ //# sourceMappingURL=CloudContentInsightsResult.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CloudContentInsightsResult.js","sourceRoot":"","sources":["../../../../../src/translation/content-insights/cloud/result/CloudContentInsightsResult.ts"],"names":[],"mappings":";;AAGA;IAAA;IAqCA,CAAC;IA/BG,sBAAI,yDAAiB;aAArB;YACI,OAAO,IAAI,CAAC,kBAAkB,CAAC;QACnC,CAAC;aAED,UAAsB,KAAyB;YAC3C,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC;QACpC,CAAC;;;OAJA;IAMD,sBAAI,sDAAc;aAAlB;YACI,OAAO,IAAI,CAAC,eAAe,CAAC;QAChC,CAAC;aAED,UAAmB,KAAyB;YACxC,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC;QACjC,CAAC;;;OAJA;IAMD,sBAAI,qDAAa;aAAjB;YACI,OAAO,IAAI,CAAC,cAAc,CAAC;QAC/B,CAAC;aAED,UAAkB,KAAqC;YACnD,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;QAChC,CAAC;;;OAJA;IAMD,sBAAI,6CAAK;aAAT;YACI,OAAO,IAAI,CAAC,MAAM,CAAC;QACvB,CAAC;aAED,UAAU,KAAiD;YACvD,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACxB,CAAC;;;OAJA;IAKL,iCAAC;AAAD,CAAC,AArCD,IAqCC"}
@@ -0,0 +1,8 @@
1
+ export default class CloudContentInsightsStatistics {
2
+ private _inputWordCount;
3
+ private _inputCharCount;
4
+ get inputWordCount(): number | undefined;
5
+ set inputWordCount(value: number | undefined);
6
+ get inputCharCount(): number | undefined;
7
+ set inputCharCount(value: number | undefined);
8
+ }
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var CloudContentInsightsStatistics = /** @class */ (function () {
4
+ function CloudContentInsightsStatistics() {
5
+ }
6
+ Object.defineProperty(CloudContentInsightsStatistics.prototype, "inputWordCount", {
7
+ get: function () {
8
+ return this._inputWordCount;
9
+ },
10
+ set: function (value) {
11
+ this._inputWordCount = value;
12
+ },
13
+ enumerable: false,
14
+ configurable: true
15
+ });
16
+ Object.defineProperty(CloudContentInsightsStatistics.prototype, "inputCharCount", {
17
+ get: function () {
18
+ return this._inputCharCount;
19
+ },
20
+ set: function (value) {
21
+ this._inputCharCount = value;
22
+ },
23
+ enumerable: false,
24
+ configurable: true
25
+ });
26
+ return CloudContentInsightsStatistics;
27
+ }());
28
+ exports.default = CloudContentInsightsStatistics;
29
+ //# sourceMappingURL=CloudContentInsightsStatistics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CloudContentInsightsStatistics.js","sourceRoot":"","sources":["../../../../../src/translation/content-insights/cloud/result/CloudContentInsightsStatistics.ts"],"names":[],"mappings":";;AAAA;IAAA;IAmBA,CAAC;IAfG,sBAAI,0DAAc;aAAlB;YACI,OAAO,IAAI,CAAC,eAAe,CAAC;QAChC,CAAC;aAED,UAAmB,KAAyB;YACxC,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC;QACjC,CAAC;;;OAJA;IAMD,sBAAI,0DAAc;aAAlB;YACI,OAAO,IAAI,CAAC,eAAe,CAAC;QAChC,CAAC;aAED,UAAmB,KAAyB;YACxC,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC;QACjC,CAAC;;;OAJA;IAKL,qCAAC;AAAD,CAAC,AAnBD,IAmBC"}
@@ -0,0 +1,6 @@
1
+ import Segment from '../../common/result/Segment';
2
+ export default class CloudSegment extends Segment {
3
+ private _lineNumber;
4
+ get lineNumber(): number | undefined;
5
+ set lineNumber(value: number | undefined);
6
+ }
@@ -0,0 +1,40 @@
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 Segment_1 = __importDefault(require("../../common/result/Segment"));
22
+ var CloudSegment = /** @class */ (function (_super) {
23
+ __extends(CloudSegment, _super);
24
+ function CloudSegment() {
25
+ return _super !== null && _super.apply(this, arguments) || this;
26
+ }
27
+ Object.defineProperty(CloudSegment.prototype, "lineNumber", {
28
+ get: function () {
29
+ return this._lineNumber;
30
+ },
31
+ set: function (value) {
32
+ this._lineNumber = value;
33
+ },
34
+ enumerable: false,
35
+ configurable: true
36
+ });
37
+ return CloudSegment;
38
+ }(Segment_1.default));
39
+ exports.default = CloudSegment;
40
+ //# sourceMappingURL=CloudSegment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CloudSegment.js","sourceRoot":"","sources":["../../../../../src/translation/content-insights/cloud/result/CloudSegment.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,wEAAkD;AAElD;IAA0C,gCAAO;IAAjD;;IAUA,CAAC;IAPG,sBAAI,oCAAU;aAAd;YACI,OAAO,IAAI,CAAC,WAAW,CAAC;QAC5B,CAAC;aAED,UAAe,KAAyB;YACpC,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;QAC7B,CAAC;;;OAJA;IAKL,mBAAC;AAAD,CAAC,AAVD,CAA0C,iBAAO,GAUhD"}
@@ -0,0 +1,6 @@
1
+ import CloudSegment from './CloudSegment';
2
+ export default class CloudSummarization {
3
+ private _segments;
4
+ get segments(): CloudSegment[] | undefined;
5
+ set segments(value: CloudSegment[] | undefined);
6
+ }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var CloudSummarization = /** @class */ (function () {
4
+ function CloudSummarization() {
5
+ }
6
+ Object.defineProperty(CloudSummarization.prototype, "segments", {
7
+ get: function () {
8
+ return this._segments;
9
+ },
10
+ set: function (value) {
11
+ this._segments = value;
12
+ },
13
+ enumerable: false,
14
+ configurable: true
15
+ });
16
+ return CloudSummarization;
17
+ }());
18
+ exports.default = CloudSummarization;
19
+ //# sourceMappingURL=CloudSummarization.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CloudSummarization.js","sourceRoot":"","sources":["../../../../../src/translation/content-insights/cloud/result/CloudSummarization.ts"],"names":[],"mappings":";;AAEA;IAAA;IAUA,CAAC;IAPG,sBAAI,wCAAQ;aAAZ;YACI,OAAO,IAAI,CAAC,SAAS,CAAC;QAC1B,CAAC;aAED,UAAa,KAAiC;YAC1C,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;QAC3B,CAAC;;;OAJA;IAKL,yBAAC;AAAD,CAAC,AAVD,IAUC"}
@@ -0,0 +1,20 @@
1
+ import RestClient from '../../../../common/external/communication/RestClient';
2
+ import Token from '../../../../common/auth/domain/Token';
3
+ import CloudFileContentInsightsRequest from '../request/CloudFileContentInsightsRequest';
4
+ import CloudContentInsightsResult from '../result/CloudContentInsightsResult';
5
+ import ContentInsightsResult from '../../common/result/ContentInsightsResult';
6
+ import ContentInsightsRequest from '../../common/request/ContentInsightsRequest';
7
+ import CloudContentInsightsRequest from '../request/CloudContentInsightsRequest';
8
+ export default class CloudContentInsightsService {
9
+ private readonly _client;
10
+ private readonly _token;
11
+ constructor(client: RestClient, token: Token | undefined);
12
+ getContentInsightsResultForTranslations(cloudContentInsightsRequest: ContentInsightsRequest): Promise<ContentInsightsResult>;
13
+ getCloudContentInsightsResultForTranslations(cloudContentInsightsRequest: CloudContentInsightsRequest): Promise<CloudContentInsightsResult>;
14
+ getCloudContentInsightsResult(createContentInsightsRequest: CloudFileContentInsightsRequest): Promise<CloudContentInsightsResult>;
15
+ private executeContentInsightsRequest;
16
+ private executeContentInsightsRequestForExistingTranslations;
17
+ private obtainFinalStatus;
18
+ private handleStatusResponse;
19
+ private getContentInsightsResponse;
20
+ }
@@ -0,0 +1,248 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (_) try {
18
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
38
+ var __importDefault = (this && this.__importDefault) || function (mod) {
39
+ return (mod && mod.__esModule) ? mod : { "default": mod };
40
+ };
41
+ Object.defineProperty(exports, "__esModule", { value: true });
42
+ var Utils_1 = __importDefault(require("../../../../common/utils/Utils"));
43
+ var TranslationConstants_1 = require("../../../../common/constants/TranslationConstants");
44
+ var Statuses_1 = require("../../../../common/constants/Statuses");
45
+ var ContentInsightsException_1 = __importDefault(require("../../../../common/exceptions/ContentInsightsException"));
46
+ var ErrorResponse_1 = __importDefault(require("../../../../common/api/ErrorResponse"));
47
+ var ContentInsightsUtils_1 = require("../../common/utils/ContentInsightsUtils");
48
+ var CloudSegmentApiModel_1 = __importDefault(require("../api/CloudSegmentApiModel"));
49
+ var CloudContentInsightsResponse_1 = __importDefault(require("../api/CloudContentInsightsResponse"));
50
+ var CloudContentInsightsStatisticsApiModel_1 = __importDefault(require("../api/CloudContentInsightsStatisticsApiModel"));
51
+ var CloudSummarizationApiModel_1 = __importDefault(require("../api/CloudSummarizationApiModel"));
52
+ var CloudContentInsightsService = /** @class */ (function () {
53
+ function CloudContentInsightsService(client, token) {
54
+ this._client = client;
55
+ this._token = token;
56
+ }
57
+ CloudContentInsightsService.prototype.getContentInsightsResultForTranslations = function (cloudContentInsightsRequest) {
58
+ var _this = this;
59
+ var createContentInsightsPromise = this.executeContentInsightsRequestForExistingTranslations(cloudContentInsightsRequest);
60
+ return createContentInsightsPromise
61
+ .then(function (response) {
62
+ var statusPromise = _this.obtainFinalStatus(response.contentInsightsId);
63
+ return _this.handleStatusResponse(response.contentInsightsId, statusPromise, function () {
64
+ return _this.getContentInsightsResponse(response)
65
+ .then(function (contentInsightsResponse) {
66
+ return Promise.resolve(contentInsightsResponse.toResult());
67
+ })
68
+ .catch(function (e) { return Promise.reject(e); });
69
+ });
70
+ })
71
+ .catch(function (error) { return Promise.reject(error); });
72
+ };
73
+ CloudContentInsightsService.prototype.getCloudContentInsightsResultForTranslations = function (cloudContentInsightsRequest) {
74
+ var _this = this;
75
+ var createContentInsightsPromise = this.executeContentInsightsRequestForExistingTranslations(cloudContentInsightsRequest);
76
+ return createContentInsightsPromise
77
+ .then(function (response) {
78
+ var statusPromise = _this.obtainFinalStatus(response.contentInsightsId);
79
+ return _this.handleStatusResponse(response.contentInsightsId, statusPromise, function () {
80
+ return _this.getContentInsightsResponse(response)
81
+ .then(function (contentInsightsResponse) {
82
+ return Promise.resolve(contentInsightsResponse.toCloudResult());
83
+ })
84
+ .catch(function (e) { return Promise.reject(e); });
85
+ });
86
+ })
87
+ .catch(function (error) { return Promise.reject(error); });
88
+ };
89
+ CloudContentInsightsService.prototype.getCloudContentInsightsResult = function (createContentInsightsRequest) {
90
+ return __awaiter(this, void 0, void 0, function () {
91
+ var validationError, fileSize, initContentInsightsPromise;
92
+ var _this = this;
93
+ return __generator(this, function (_a) {
94
+ switch (_a.label) {
95
+ case 0: return [4 /*yield*/, (0, ContentInsightsUtils_1.validateInputData)(createContentInsightsRequest)];
96
+ case 1:
97
+ validationError = _a.sent();
98
+ if (validationError) {
99
+ return [2 /*return*/, Promise.reject({ message: validationError })];
100
+ }
101
+ return [4 /*yield*/, Utils_1.default.getFilesSizeForContentInsights(createContentInsightsRequest.files || '')];
102
+ case 2:
103
+ fileSize = _a.sent();
104
+ initContentInsightsPromise = this.executeContentInsightsRequest(createContentInsightsRequest);
105
+ return [2 /*return*/, initContentInsightsPromise
106
+ .then(function (response) {
107
+ var statusPromise = _this.obtainFinalStatus(response.contentInsightsId, fileSize);
108
+ return _this.handleStatusResponse(response.contentInsightsId, statusPromise, function () {
109
+ return _this.getContentInsightsResponse(response)
110
+ .then(function (contentInsightsResponse) {
111
+ return Promise.resolve(contentInsightsResponse.toCloudResult());
112
+ })
113
+ .catch(function (e) { return Promise.reject(e); });
114
+ });
115
+ })
116
+ .catch(function (error) { return Promise.reject(error); })];
117
+ }
118
+ });
119
+ });
120
+ };
121
+ CloudContentInsightsService.prototype.executeContentInsightsRequest = function (createContentInsightsRequest) {
122
+ return __awaiter(this, void 0, void 0, function () {
123
+ var formData, fs_1, files;
124
+ return __generator(this, function (_a) {
125
+ switch (_a.label) {
126
+ case 0:
127
+ formData = Utils_1.default.getNewFormDataObject();
128
+ if (!(Utils_1.default.isBrowser() && createContentInsightsRequest.files)) return [3 /*break*/, 1];
129
+ if (Utils_1.default.isArrayOfFiles(createContentInsightsRequest.files) &&
130
+ Array.isArray(createContentInsightsRequest.files)) {
131
+ createContentInsightsRequest.files.forEach(function (file) {
132
+ formData.append(TranslationConstants_1.CI_FILE_REQUEST_PARAM_NAME, file);
133
+ });
134
+ }
135
+ else {
136
+ formData.append(TranslationConstants_1.CI_FILE_REQUEST_PARAM_NAME, createContentInsightsRequest.files);
137
+ }
138
+ return [3 /*break*/, 4];
139
+ case 1:
140
+ if (!(typeof createContentInsightsRequest.files === 'string')) return [3 /*break*/, 4];
141
+ fs_1 = require('fs');
142
+ if (!Utils_1.default.isDirectoryPath(createContentInsightsRequest.files)) return [3 /*break*/, 3];
143
+ return [4 /*yield*/, Utils_1.default.getInputFilesFromDirectory(createContentInsightsRequest.files)];
144
+ case 2:
145
+ files = _a.sent();
146
+ files.forEach(function (file) {
147
+ formData.append(TranslationConstants_1.CI_FILE_REQUEST_PARAM_NAME, fs_1.createReadStream(file || ''));
148
+ });
149
+ return [3 /*break*/, 4];
150
+ case 3:
151
+ formData.append(TranslationConstants_1.CI_FILE_REQUEST_PARAM_NAME, fs_1.createReadStream(createContentInsightsRequest.files || ''));
152
+ _a.label = 4;
153
+ case 4:
154
+ if (createContentInsightsRequest.sourceLanguage) {
155
+ formData.append(TranslationConstants_1.CI_SOURCE_LANGUAGE_REQUEST_PARAM_NAME, createContentInsightsRequest.sourceLanguage);
156
+ }
157
+ return [2 /*return*/, this._client.requestMultipart(this._token, 'POST', TranslationConstants_1.CONTENT_INSIGHTS_PATH, formData)];
158
+ }
159
+ });
160
+ });
161
+ };
162
+ CloudContentInsightsService.prototype.executeContentInsightsRequestForExistingTranslations = function (createContentInsightsRequest) {
163
+ return this._client.requestJson(this._token, 'POST', TranslationConstants_1.CONTENT_INSIGHTS_PATH, createContentInsightsRequest);
164
+ };
165
+ CloudContentInsightsService.prototype.obtainFinalStatus = function (contentInsightsId, fileSize) {
166
+ var self = this;
167
+ return new Promise(function (resolve) {
168
+ var delay = fileSize ? getDelay(fileSize) : TranslationConstants_1.SMALL_FILE_GET_CONTENT_INSIGHTS_STATUS_DELAY_MILLISECONDS;
169
+ var startTime = new Date().getTime();
170
+ getStatus();
171
+ function getStatus() {
172
+ self._client
173
+ .requestJson(self._token, 'GET', TranslationConstants_1.CONTENT_INSIGHTS_PATH + '/' + contentInsightsId)
174
+ .then(function (statusResponse) {
175
+ if ([
176
+ Statuses_1.INIT_CONTENT_INSIGHTS_STATUS,
177
+ Statuses_1.IN_PROGRESS_CONTENT_INSIGHTS_STATUS,
178
+ Statuses_1.ACCEPTED_CONTENT_INSIGHTS_STATUS,
179
+ ].includes(statusResponse.contentInsightsStatus) &&
180
+ new Date().getTime() - startTime < TranslationConstants_1.CHECK_STATUS_TIMEOUT) {
181
+ setTimeout(function () {
182
+ getStatus();
183
+ }, delay);
184
+ }
185
+ else {
186
+ resolve(statusResponse);
187
+ }
188
+ })
189
+ .catch(function (e) { return Promise.reject(e); });
190
+ }
191
+ function getDelay(size) {
192
+ return size < 500
193
+ ? TranslationConstants_1.SMALL_FILE_GET_CONTENT_INSIGHTS_STATUS_DELAY_MILLISECONDS
194
+ : TranslationConstants_1.LARGE_FILE_GET_CONTENT_INSIGHTS_STATUS_DELAY_MILLISECONDS;
195
+ }
196
+ });
197
+ };
198
+ CloudContentInsightsService.prototype.handleStatusResponse = function (contentInsightsId, statusPromise, successHandler) {
199
+ return statusPromise
200
+ .then(function (statusResponse) {
201
+ switch (statusResponse.contentInsightsStatus) {
202
+ case Statuses_1.DONE_CONTENT_INSIGHTS_STATUS:
203
+ return Promise.resolve(successHandler(statusResponse));
204
+ case Statuses_1.FAILED_CONTENT_INSIGHTS_STATUS:
205
+ return Promise.reject(ContentInsightsException_1.default.getContentInsightsException(statusResponse.contentInsightsStatus, contentInsightsId, statusResponse.errors));
206
+ case Statuses_1.INIT_CONTENT_INSIGHTS_STATUS:
207
+ case Statuses_1.IN_PROGRESS_CONTENT_INSIGHTS_STATUS:
208
+ case Statuses_1.ACCEPTED_CONTENT_INSIGHTS_STATUS:
209
+ var errorResponse = new ErrorResponse_1.default(-1, TranslationConstants_1.CONTENT_INSIGHTS_TIMEOUT_ERROR_MESSAGE);
210
+ return Promise.reject(ContentInsightsException_1.default.getContentInsightsException(statusResponse.contentInsightsStatus, contentInsightsId, [errorResponse]));
211
+ default:
212
+ return Promise.reject(ContentInsightsException_1.default.getContentInsightsException(Statuses_1.UNK_CONTENT_INSIGHTS_STATUS, contentInsightsId));
213
+ }
214
+ })
215
+ .catch(function (e) { return Promise.reject(e); });
216
+ };
217
+ CloudContentInsightsService.prototype.getContentInsightsResponse = function (contentInsightsResponse) {
218
+ var _this = this;
219
+ return new Promise(function (resolve, reject) {
220
+ _this._client
221
+ .requestJson(_this._token, 'GET', TranslationConstants_1.CONTENT_INSIGHTS_PATH + '/' + contentInsightsResponse.contentInsightsId + '/result')
222
+ .then(function (response) { return __awaiter(_this, void 0, void 0, function () {
223
+ var cloudContentInsightsResponse, stats, summarization;
224
+ var _a, _b;
225
+ return __generator(this, function (_c) {
226
+ cloudContentInsightsResponse = new CloudContentInsightsResponse_1.default();
227
+ stats = new CloudContentInsightsStatisticsApiModel_1.default();
228
+ Object.assign(stats, response === null || response === void 0 ? void 0 : response.stats);
229
+ summarization = new CloudSummarizationApiModel_1.default();
230
+ summarization.segments = (_b = (_a = response === null || response === void 0 ? void 0 : response.summarization) === null || _a === void 0 ? void 0 : _a.segments) === null || _b === void 0 ? void 0 : _b.map(function (segment) {
231
+ var cloudSegment = new CloudSegmentApiModel_1.default();
232
+ Object.assign(cloudSegment, segment);
233
+ return cloudSegment;
234
+ });
235
+ Object.assign(cloudContentInsightsResponse, response);
236
+ cloudContentInsightsResponse.stats = stats;
237
+ cloudContentInsightsResponse.summarization = summarization;
238
+ resolve(cloudContentInsightsResponse);
239
+ return [2 /*return*/];
240
+ });
241
+ }); })
242
+ .catch(function (error) { return reject(error); });
243
+ });
244
+ };
245
+ return CloudContentInsightsService;
246
+ }());
247
+ exports.default = CloudContentInsightsService;
248
+ //# sourceMappingURL=CloudContentInsightsService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CloudContentInsightsService.js","sourceRoot":"","sources":["../../../../../src/translation/content-insights/cloud/service/CloudContentInsightsService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,yEAAmD;AACnD,0FAQ2D;AAE3D,kEAO+C;AAC/C,oHAA8F;AAC9F,uFAAiE;AAEjE,gFAA4E;AAI5E,qFAA+D;AAC/D,qGAA+E;AAC/E,yHAAmG;AACnG,iGAA2E;AAE3E;IAII,qCAAY,MAAkB,EAAE,KAAwB;QACpD,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACxB,CAAC;IAEM,6EAAuC,GAA9C,UACI,2BAAmD;QADvD,iBAkBC;QAfG,IAAM,4BAA4B,GAC9B,IAAI,CAAC,oDAAoD,CAAC,2BAA2B,CAAC,CAAC;QAC3F,OAAO,4BAA4B;aAC9B,IAAI,CAAC,UAAC,QAA4C;YAC/C,IAAM,aAAa,GAAG,KAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC;YAEzE,OAAO,KAAI,CAAC,oBAAoB,CAAC,QAAQ,CAAC,iBAAiB,EAAE,aAAa,EAAE;gBACxE,OAAA,KAAI,CAAC,0BAA0B,CAAC,QAAQ,CAAC;qBACpC,IAAI,CAAC,UAAC,uBAAqD;oBACxD,OAAA,OAAO,CAAC,OAAO,CAAC,uBAAuB,CAAC,QAAQ,EAAE,CAAC;gBAAnD,CAAmD,CACtD;qBACA,KAAK,CAAC,UAAC,CAAC,IAAK,OAAA,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAjB,CAAiB,CAAC;YAJpC,CAIoC,CACvC,CAAC;QACN,CAAC,CAAC;aACD,KAA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,IAAI,oCAA0B,EAAE,CAAC;oBACvD,aAAa,CAAC,QAAQ,GAAG,MAAA,MAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,aAAa,0CAAE,QAAQ,0CAAE,GAAG,CAAC,UAAC,OAAY;wBACzE,IAAM,YAAY,GAAG,IAAI,8BAAoB,EAAE,CAAC;wBAChD,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;wBACrC,OAAO,YAAY,CAAC;oBACxB,CAAC,CAAC,CAAC;oBAEH,MAAM,CAAC,MAAM,CAAC,4BAA4B,EAAE,QAAQ,CAAC,CAAC;oBACtD,4BAA4B,CAAC,KAAK,GAAG,KAAK,CAAC;oBAC3C,4BAA4B,CAAC,aAAa,GAAG,aAAa,CAAC;oBAE3D,OAAO,CAAC,4BAA4B,CAAC,CAAC;;;iBACzC,CAAC;iBACD,KAAK,CAAC,UAAC,KAAU,IAAK,OAAA,MAAM,CAAC,KAAK,CAAC,EAAb,CAAa,CAAC,CAAC;QAC9C,CAAC,CAAC,CAAC;IACP,CAAC;IACL,kCAAC;AAAD,CAAC,AAxOD,IAwOC"}
@@ -0,0 +1,7 @@
1
+ export default class ContentInsightsRequest {
2
+ private _translationIds;
3
+ constructor();
4
+ get translationIds(): string[];
5
+ set translationIds(value: string[]);
6
+ addTranslationId(translationId: string): void;
7
+ }
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var ContentInsightsRequest = /** @class */ (function () {
4
+ function ContentInsightsRequest() {
5
+ this._translationIds = [];
6
+ }
7
+ Object.defineProperty(ContentInsightsRequest.prototype, "translationIds", {
8
+ get: function () {
9
+ return this._translationIds;
10
+ },
11
+ set: function (value) {
12
+ this._translationIds = value;
13
+ },
14
+ enumerable: false,
15
+ configurable: true
16
+ });
17
+ ContentInsightsRequest.prototype.addTranslationId = function (translationId) {
18
+ this.translationIds.push(translationId);
19
+ };
20
+ return ContentInsightsRequest;
21
+ }());
22
+ exports.default = ContentInsightsRequest;
23
+ //# sourceMappingURL=ContentInsightsRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContentInsightsRequest.js","sourceRoot":"","sources":["../../../../../src/translation/content-insights/common/request/ContentInsightsRequest.ts"],"names":[],"mappings":";;AAAA;IAGI;QACI,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC;IAC9B,CAAC;IAED,sBAAI,kDAAc;aAAlB;YACI,OAAO,IAAI,CAAC,eAAe,CAAC;QAChC,CAAC;aAED,UAAmB,KAAe;YAC9B,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC;QACjC,CAAC;;;OAJA;IAMD,iDAAgB,GAAhB,UAAiB,aAAqB;QAClC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAC5C,CAAC;IACL,6BAAC;AAAD,CAAC,AAlBD,IAkBC"}
@@ -0,0 +1,6 @@
1
+ import Summarization from './Summarization';
2
+ export default class ContentInsightsResult {
3
+ private _summarization;
4
+ get summarization(): Summarization | undefined;
5
+ set summarization(value: Summarization | undefined);
6
+ }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var ContentInsightsResult = /** @class */ (function () {
4
+ function ContentInsightsResult() {
5
+ }
6
+ Object.defineProperty(ContentInsightsResult.prototype, "summarization", {
7
+ get: function () {
8
+ return this._summarization;
9
+ },
10
+ set: function (value) {
11
+ this._summarization = value;
12
+ },
13
+ enumerable: false,
14
+ configurable: true
15
+ });
16
+ return ContentInsightsResult;
17
+ }());
18
+ exports.default = ContentInsightsResult;
19
+ //# sourceMappingURL=ContentInsightsResult.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContentInsightsResult.js","sourceRoot":"","sources":["../../../../../src/translation/content-insights/common/result/ContentInsightsResult.ts"],"names":[],"mappings":";;AAEA;IAAA;IAUA,CAAC;IAPG,sBAAI,gDAAa;aAAjB;YACI,OAAO,IAAI,CAAC,cAAc,CAAC;QAC/B,CAAC;aAED,UAAkB,KAAgC;YAC9C,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;QAChC,CAAC;;;OAJA;IAKL,4BAAC;AAAD,CAAC,AAVD,IAUC"}
@@ -0,0 +1,8 @@
1
+ export default class Segment {
2
+ private _text;
3
+ private _score;
4
+ get text(): string | undefined;
5
+ set text(value: string | undefined);
6
+ get score(): number | undefined;
7
+ set score(value: number | undefined);
8
+ }