smartling-api-sdk-nodejs 3.2.3 → 3.4.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.
Files changed (261) hide show
  1. package/.env.example +13 -0
  2. package/api/base/base-api.ts +2 -1
  3. package/api/glossaries/dto/custom-field-value-dto.ts +6 -0
  4. package/api/glossaries/dto/entry-request-translation-status-dto.ts +7 -0
  5. package/api/glossaries/dto/glossary-entries-count-dto.ts +5 -0
  6. package/api/glossaries/dto/glossary-entry-dto.ts +23 -0
  7. package/api/glossaries/dto/glossary-import-result-dto.ts +11 -0
  8. package/api/glossaries/dto/glossary-import-status-dto.ts +7 -0
  9. package/api/glossaries/dto/glossary-uids-dto.ts +3 -0
  10. package/api/glossaries/dto/import-entry-changes-dto.ts +6 -0
  11. package/api/glossaries/dto/import-entry-translation-changes-dto.ts +6 -0
  12. package/api/glossaries/dto/import-warning-dto.ts +4 -0
  13. package/api/glossaries/dto/label-dto.ts +4 -0
  14. package/api/glossaries/dto/locale-workflow-dto.ts +4 -0
  15. package/api/glossaries/dto/operation-dto.ts +3 -0
  16. package/api/glossaries/dto/translation-dto.ts +20 -0
  17. package/api/glossaries/dto/translation-request-status-dto.ts +5 -0
  18. package/api/glossaries/enums/import-file-media-type.ts +5 -0
  19. package/api/glossaries/enums/import-status.ts +6 -0
  20. package/api/glossaries/enums/index.ts +4 -0
  21. package/api/glossaries/enums/part-of-speech.ts +11 -0
  22. package/api/glossaries/enums/suggestion-status.ts +5 -0
  23. package/api/glossaries/index.ts +281 -0
  24. package/api/glossaries/params/archive-glossaries-parameters.ts +9 -0
  25. package/api/glossaries/params/authorize-entries-parameters.ts +37 -0
  26. package/api/glossaries/params/create-glossary-entry-parameters.ts +50 -0
  27. package/api/glossaries/params/create-glossary-parameters.ts +40 -0
  28. package/api/glossaries/params/create-label-parameters.ts +9 -0
  29. package/api/glossaries/params/entries-bulk-action-parameters.ts +149 -0
  30. package/api/glossaries/params/entries-bulk-labels-parameters.ts +123 -0
  31. package/api/glossaries/params/export-entries-parameters.ts +16 -48
  32. package/api/glossaries/params/initialize-import-parameters.ts +42 -0
  33. package/api/glossaries/params/search-glossary-counts-parameters.ts +41 -0
  34. package/api/glossaries/params/search-glossary-entries-parameters.ts +105 -0
  35. package/api/translation-memory/dto/async-action-result-dto.ts +12 -0
  36. package/api/translation-memory/dto/async-action-status.ts +8 -0
  37. package/api/translation-memory/dto/create-string-search-result-dto.ts +16 -0
  38. package/api/translation-memory/dto/duplicate-string-dto.ts +9 -0
  39. package/api/translation-memory/dto/locale-summary-dto.ts +10 -0
  40. package/api/translation-memory/dto/strings-export-async-action-result-dto.ts +8 -0
  41. package/api/translation-memory/dto/tm-dto.ts +23 -0
  42. package/api/translation-memory/dto/tm-locale-dto.ts +8 -0
  43. package/api/translation-memory/dto/tmx-import-summary-dto.ts +16 -0
  44. package/api/translation-memory/dto/tmx-parsing-error-dto.ts +7 -0
  45. package/api/translation-memory/dto/user-dto.ts +6 -0
  46. package/api/translation-memory/index.ts +368 -0
  47. package/api/translation-memory/params/bulk-export-tm-strings-parameters.ts +30 -0
  48. package/api/translation-memory/params/create-string-search-filter-parameters.ts +232 -0
  49. package/api/translation-memory/params/create-string-search-options.ts +8 -0
  50. package/api/translation-memory/params/create-tm-parameters.ts +28 -0
  51. package/api/translation-memory/params/escape-smp-unicode-parser-directive.ts +6 -0
  52. package/api/translation-memory/params/extended-export-metadata-type.ts +4 -0
  53. package/api/translation-memory/params/import-tmx-file-parameters.ts +76 -0
  54. package/api/translation-memory/params/keyword-search-type.ts +5 -0
  55. package/api/translation-memory/params/leverage-type.ts +5 -0
  56. package/api/translation-memory/params/search-keyword.ts +10 -0
  57. package/api/translation-memory/params/source-type.ts +7 -0
  58. package/api/translation-memory/params/string-search-tags.ts +7 -0
  59. package/api/translation-memory/params/translation-quality-type.ts +5 -0
  60. package/api/translation-memory/params/tu-translation-quality-type.ts +6 -0
  61. package/api/translation-memory/params/update-tm-parameters.ts +23 -0
  62. package/built/api/base/base-api.js +2 -1
  63. package/built/api/base/base-api.js.map +1 -1
  64. package/built/api/glossaries/dto/custom-field-value-dto.d.ts +6 -0
  65. package/built/api/glossaries/dto/custom-field-value-dto.js +3 -0
  66. package/built/api/glossaries/dto/custom-field-value-dto.js.map +1 -0
  67. package/built/api/glossaries/dto/entry-request-translation-status-dto.d.ts +6 -0
  68. package/built/api/glossaries/dto/entry-request-translation-status-dto.js +3 -0
  69. package/built/api/glossaries/dto/entry-request-translation-status-dto.js.map +1 -0
  70. package/built/api/glossaries/dto/glossary-entries-count-dto.d.ts +5 -0
  71. package/built/api/glossaries/dto/glossary-entries-count-dto.js +3 -0
  72. package/built/api/glossaries/dto/glossary-entries-count-dto.js.map +1 -0
  73. package/built/api/glossaries/dto/glossary-entry-dto.d.ts +22 -0
  74. package/built/api/glossaries/dto/glossary-entry-dto.js +3 -0
  75. package/built/api/glossaries/dto/glossary-entry-dto.js.map +1 -0
  76. package/built/api/glossaries/dto/glossary-import-result-dto.d.ts +10 -0
  77. package/built/api/glossaries/dto/glossary-import-result-dto.js +3 -0
  78. package/built/api/glossaries/dto/glossary-import-result-dto.js.map +1 -0
  79. package/built/api/glossaries/dto/glossary-import-status-dto.d.ts +6 -0
  80. package/built/api/glossaries/dto/glossary-import-status-dto.js +3 -0
  81. package/built/api/glossaries/dto/glossary-import-status-dto.js.map +1 -0
  82. package/built/api/glossaries/dto/glossary-uids-dto.d.ts +3 -0
  83. package/built/api/glossaries/dto/glossary-uids-dto.js +3 -0
  84. package/built/api/glossaries/dto/glossary-uids-dto.js.map +1 -0
  85. package/built/api/glossaries/dto/import-entry-changes-dto.d.ts +6 -0
  86. package/built/api/glossaries/dto/import-entry-changes-dto.js +3 -0
  87. package/built/api/glossaries/dto/import-entry-changes-dto.js.map +1 -0
  88. package/built/api/glossaries/dto/import-entry-translation-changes-dto.d.ts +6 -0
  89. package/built/api/glossaries/dto/import-entry-translation-changes-dto.js +3 -0
  90. package/built/api/glossaries/dto/import-entry-translation-changes-dto.js.map +1 -0
  91. package/built/api/glossaries/dto/import-warning-dto.d.ts +4 -0
  92. package/built/api/glossaries/dto/import-warning-dto.js +3 -0
  93. package/built/api/glossaries/dto/import-warning-dto.js.map +1 -0
  94. package/built/api/glossaries/dto/label-dto.d.ts +4 -0
  95. package/built/api/glossaries/dto/label-dto.js +3 -0
  96. package/built/api/glossaries/dto/label-dto.js.map +1 -0
  97. package/built/api/glossaries/dto/locale-workflow-dto.d.ts +4 -0
  98. package/built/api/glossaries/dto/locale-workflow-dto.js +3 -0
  99. package/built/api/glossaries/dto/locale-workflow-dto.js.map +1 -0
  100. package/built/api/glossaries/dto/operation-dto.d.ts +3 -0
  101. package/built/api/glossaries/dto/operation-dto.js +3 -0
  102. package/built/api/glossaries/dto/operation-dto.js.map +1 -0
  103. package/built/api/glossaries/dto/translation-dto.d.ts +19 -0
  104. package/built/api/glossaries/dto/translation-dto.js +3 -0
  105. package/built/api/glossaries/dto/translation-dto.js.map +1 -0
  106. package/built/api/glossaries/dto/translation-request-status-dto.d.ts +5 -0
  107. package/built/api/glossaries/dto/translation-request-status-dto.js +3 -0
  108. package/built/api/glossaries/dto/translation-request-status-dto.js.map +1 -0
  109. package/built/api/glossaries/enums/import-file-media-type.d.ts +5 -0
  110. package/built/api/glossaries/enums/import-file-media-type.js +10 -0
  111. package/built/api/glossaries/enums/import-file-media-type.js.map +1 -0
  112. package/built/api/glossaries/enums/import-status.d.ts +6 -0
  113. package/built/api/glossaries/enums/import-status.js +11 -0
  114. package/built/api/glossaries/enums/import-status.js.map +1 -0
  115. package/built/api/glossaries/enums/index.d.ts +4 -0
  116. package/built/api/glossaries/enums/index.js +9 -1
  117. package/built/api/glossaries/enums/index.js.map +1 -1
  118. package/built/api/glossaries/enums/part-of-speech.d.ts +11 -0
  119. package/built/api/glossaries/enums/part-of-speech.js +16 -0
  120. package/built/api/glossaries/enums/part-of-speech.js.map +1 -0
  121. package/built/api/glossaries/enums/suggestion-status.d.ts +5 -0
  122. package/built/api/glossaries/enums/suggestion-status.js +10 -0
  123. package/built/api/glossaries/enums/suggestion-status.js.map +1 -0
  124. package/built/api/glossaries/index.d.ts +39 -0
  125. package/built/api/glossaries/index.js +127 -0
  126. package/built/api/glossaries/index.js.map +1 -1
  127. package/built/api/glossaries/params/archive-glossaries-parameters.d.ts +4 -0
  128. package/built/api/glossaries/params/archive-glossaries-parameters.js +12 -0
  129. package/built/api/glossaries/params/archive-glossaries-parameters.js.map +1 -0
  130. package/built/api/glossaries/params/authorize-entries-parameters.d.ts +10 -0
  131. package/built/api/glossaries/params/authorize-entries-parameters.js +28 -0
  132. package/built/api/glossaries/params/authorize-entries-parameters.js.map +1 -0
  133. package/built/api/glossaries/params/create-glossary-entry-parameters.d.ts +13 -0
  134. package/built/api/glossaries/params/create-glossary-entry-parameters.js +36 -0
  135. package/built/api/glossaries/params/create-glossary-entry-parameters.js.map +1 -0
  136. package/built/api/glossaries/params/create-glossary-parameters.d.ts +10 -0
  137. package/built/api/glossaries/params/create-glossary-parameters.js +32 -0
  138. package/built/api/glossaries/params/create-glossary-parameters.js.map +1 -0
  139. package/built/api/glossaries/params/create-label-parameters.d.ts +4 -0
  140. package/built/api/glossaries/params/create-label-parameters.js +12 -0
  141. package/built/api/glossaries/params/create-label-parameters.js.map +1 -0
  142. package/built/api/glossaries/params/entries-bulk-action-parameters.d.ts +28 -0
  143. package/built/api/glossaries/params/entries-bulk-action-parameters.js +112 -0
  144. package/built/api/glossaries/params/entries-bulk-action-parameters.js.map +1 -0
  145. package/built/api/glossaries/params/entries-bulk-labels-parameters.d.ts +29 -0
  146. package/built/api/glossaries/params/entries-bulk-labels-parameters.js +84 -0
  147. package/built/api/glossaries/params/entries-bulk-labels-parameters.js.map +1 -0
  148. package/built/api/glossaries/params/export-entries-parameters.js +16 -48
  149. package/built/api/glossaries/params/export-entries-parameters.js.map +1 -1
  150. package/built/api/glossaries/params/initialize-import-parameters.d.ts +12 -0
  151. package/built/api/glossaries/params/initialize-import-parameters.js +60 -0
  152. package/built/api/glossaries/params/initialize-import-parameters.js.map +1 -0
  153. package/built/api/glossaries/params/search-glossary-counts-parameters.d.ts +11 -0
  154. package/built/api/glossaries/params/search-glossary-counts-parameters.js +32 -0
  155. package/built/api/glossaries/params/search-glossary-counts-parameters.js.map +1 -0
  156. package/built/api/glossaries/params/search-glossary-entries-parameters.d.ts +25 -0
  157. package/built/api/glossaries/params/search-glossary-entries-parameters.js +72 -0
  158. package/built/api/glossaries/params/search-glossary-entries-parameters.js.map +1 -0
  159. package/built/api/translation-memory/dto/async-action-result-dto.d.ts +10 -0
  160. package/built/api/translation-memory/dto/async-action-result-dto.js +3 -0
  161. package/built/api/translation-memory/dto/async-action-result-dto.js.map +1 -0
  162. package/built/api/translation-memory/dto/async-action-status.d.ts +8 -0
  163. package/built/api/translation-memory/dto/async-action-status.js +13 -0
  164. package/built/api/translation-memory/dto/async-action-status.js.map +1 -0
  165. package/built/api/translation-memory/dto/create-string-search-result-dto.d.ts +11 -0
  166. package/built/api/translation-memory/dto/create-string-search-result-dto.js +3 -0
  167. package/built/api/translation-memory/dto/create-string-search-result-dto.js.map +1 -0
  168. package/built/api/translation-memory/dto/duplicate-string-dto.d.ts +8 -0
  169. package/built/api/translation-memory/dto/duplicate-string-dto.js +3 -0
  170. package/built/api/translation-memory/dto/duplicate-string-dto.js.map +1 -0
  171. package/built/api/translation-memory/dto/locale-summary-dto.d.ts +8 -0
  172. package/built/api/translation-memory/dto/locale-summary-dto.js +3 -0
  173. package/built/api/translation-memory/dto/locale-summary-dto.js.map +1 -0
  174. package/built/api/translation-memory/dto/strings-export-async-action-result-dto.d.ts +6 -0
  175. package/built/api/translation-memory/dto/strings-export-async-action-result-dto.js +3 -0
  176. package/built/api/translation-memory/dto/strings-export-async-action-result-dto.js.map +1 -0
  177. package/built/api/translation-memory/dto/tm-dto.d.ts +19 -0
  178. package/built/api/translation-memory/dto/tm-dto.js +3 -0
  179. package/built/api/translation-memory/dto/tm-dto.js.map +1 -0
  180. package/built/api/translation-memory/dto/tm-locale-dto.d.ts +7 -0
  181. package/built/api/translation-memory/dto/tm-locale-dto.js +3 -0
  182. package/built/api/translation-memory/dto/tm-locale-dto.js.map +1 -0
  183. package/built/api/translation-memory/dto/tmx-import-summary-dto.d.ts +11 -0
  184. package/built/api/translation-memory/dto/tmx-import-summary-dto.js +3 -0
  185. package/built/api/translation-memory/dto/tmx-import-summary-dto.js.map +1 -0
  186. package/built/api/translation-memory/dto/tmx-parsing-error-dto.d.ts +6 -0
  187. package/built/api/translation-memory/dto/tmx-parsing-error-dto.js +3 -0
  188. package/built/api/translation-memory/dto/tmx-parsing-error-dto.js.map +1 -0
  189. package/built/api/translation-memory/dto/user-dto.d.ts +5 -0
  190. package/built/api/translation-memory/dto/user-dto.js +3 -0
  191. package/built/api/translation-memory/dto/user-dto.js.map +1 -0
  192. package/built/api/translation-memory/index.d.ts +27 -0
  193. package/built/api/translation-memory/index.js +250 -0
  194. package/built/api/translation-memory/index.js.map +1 -0
  195. package/built/api/translation-memory/params/bulk-export-tm-strings-parameters.d.ts +8 -0
  196. package/built/api/translation-memory/params/bulk-export-tm-strings-parameters.js +24 -0
  197. package/built/api/translation-memory/params/bulk-export-tm-strings-parameters.js.map +1 -0
  198. package/built/api/translation-memory/params/create-string-search-filter-parameters.d.ts +43 -0
  199. package/built/api/translation-memory/params/create-string-search-filter-parameters.js +151 -0
  200. package/built/api/translation-memory/params/create-string-search-filter-parameters.js.map +1 -0
  201. package/built/api/translation-memory/params/create-string-search-options.d.ts +7 -0
  202. package/built/api/translation-memory/params/create-string-search-options.js +3 -0
  203. package/built/api/translation-memory/params/create-string-search-options.js.map +1 -0
  204. package/built/api/translation-memory/params/create-tm-parameters.d.ts +8 -0
  205. package/built/api/translation-memory/params/create-tm-parameters.js +24 -0
  206. package/built/api/translation-memory/params/create-tm-parameters.js.map +1 -0
  207. package/built/api/translation-memory/params/escape-smp-unicode-parser-directive.d.ts +4 -0
  208. package/built/api/translation-memory/params/escape-smp-unicode-parser-directive.js +9 -0
  209. package/built/api/translation-memory/params/escape-smp-unicode-parser-directive.js.map +1 -0
  210. package/built/api/translation-memory/params/extended-export-metadata-type.d.ts +4 -0
  211. package/built/api/translation-memory/params/extended-export-metadata-type.js +9 -0
  212. package/built/api/translation-memory/params/extended-export-metadata-type.js.map +1 -0
  213. package/built/api/translation-memory/params/import-tmx-file-parameters.d.ts +17 -0
  214. package/built/api/translation-memory/params/import-tmx-file-parameters.js +80 -0
  215. package/built/api/translation-memory/params/import-tmx-file-parameters.js.map +1 -0
  216. package/built/api/translation-memory/params/keyword-search-type.d.ts +5 -0
  217. package/built/api/translation-memory/params/keyword-search-type.js +10 -0
  218. package/built/api/translation-memory/params/keyword-search-type.js.map +1 -0
  219. package/built/api/translation-memory/params/leverage-type.d.ts +5 -0
  220. package/built/api/translation-memory/params/leverage-type.js +10 -0
  221. package/built/api/translation-memory/params/leverage-type.js.map +1 -0
  222. package/built/api/translation-memory/params/search-keyword.d.ts +8 -0
  223. package/built/api/translation-memory/params/search-keyword.js +3 -0
  224. package/built/api/translation-memory/params/search-keyword.js.map +1 -0
  225. package/built/api/translation-memory/params/source-type.d.ts +7 -0
  226. package/built/api/translation-memory/params/source-type.js +12 -0
  227. package/built/api/translation-memory/params/source-type.js.map +1 -0
  228. package/built/api/translation-memory/params/string-search-tags.d.ts +6 -0
  229. package/built/api/translation-memory/params/string-search-tags.js +3 -0
  230. package/built/api/translation-memory/params/string-search-tags.js.map +1 -0
  231. package/built/api/translation-memory/params/translation-quality-type.d.ts +5 -0
  232. package/built/api/translation-memory/params/translation-quality-type.js +10 -0
  233. package/built/api/translation-memory/params/translation-quality-type.js.map +1 -0
  234. package/built/api/translation-memory/params/tu-translation-quality-type.d.ts +6 -0
  235. package/built/api/translation-memory/params/tu-translation-quality-type.js +11 -0
  236. package/built/api/translation-memory/params/tu-translation-quality-type.js.map +1 -0
  237. package/built/api/translation-memory/params/update-tm-parameters.d.ts +6 -0
  238. package/built/api/translation-memory/params/update-tm-parameters.js +20 -0
  239. package/built/api/translation-memory/params/update-tm-parameters.js.map +1 -0
  240. package/built/index.d.ts +56 -0
  241. package/built/index.js +56 -0
  242. package/built/index.js.map +1 -1
  243. package/built/package.json +5 -3
  244. package/built/test/glossaries.spec.js +404 -0
  245. package/built/test/glossaries.spec.js.map +1 -1
  246. package/built/test/integration/glossaries.spec.d.ts +1 -0
  247. package/built/test/integration/glossaries.spec.js +222 -0
  248. package/built/test/integration/glossaries.spec.js.map +1 -0
  249. package/built/test/integration/translation-memory.spec.d.ts +1 -0
  250. package/built/test/integration/translation-memory.spec.js +138 -0
  251. package/built/test/integration/translation-memory.spec.js.map +1 -0
  252. package/built/test/translation-memory.spec.d.ts +1 -0
  253. package/built/test/translation-memory.spec.js +712 -0
  254. package/built/test/translation-memory.spec.js.map +1 -0
  255. package/index.ts +56 -0
  256. package/package.json +5 -3
  257. package/test/data/sample.tmx +12 -0
  258. package/test/glossaries.spec.ts +559 -0
  259. package/test/integration/glossaries.spec.ts +358 -0
  260. package/test/integration/translation-memory.spec.ts +182 -0
  261. package/test/translation-memory.spec.ts +868 -0
@@ -0,0 +1,222 @@
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 __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ const dotenv_1 = __importDefault(require("dotenv"));
16
+ const assert_1 = __importDefault(require("assert"));
17
+ const index_1 = require("../../api/builder/index");
18
+ const index_2 = require("../../api/glossaries/index");
19
+ const create_glossary_parameters_1 = require("../../api/glossaries/params/create-glossary-parameters");
20
+ const archive_glossaries_parameters_1 = require("../../api/glossaries/params/archive-glossaries-parameters");
21
+ const search_glossary_counts_parameters_1 = require("../../api/glossaries/params/search-glossary-counts-parameters");
22
+ const search_glossaries_parameters_1 = require("../../api/glossaries/params/search-glossaries-parameters");
23
+ const create_glossary_entry_parameters_1 = require("../../api/glossaries/params/create-glossary-entry-parameters");
24
+ const search_glossary_entries_parameters_1 = require("../../api/glossaries/params/search-glossary-entries-parameters");
25
+ const entries_bulk_action_parameters_1 = require("../../api/glossaries/params/entries-bulk-action-parameters");
26
+ const entries_bulk_labels_parameters_1 = require("../../api/glossaries/params/entries-bulk-labels-parameters");
27
+ const create_label_parameters_1 = require("../../api/glossaries/params/create-label-parameters");
28
+ const initialize_import_parameters_1 = require("../../api/glossaries/params/initialize-import-parameters");
29
+ const export_entries_parameters_1 = require("../../api/glossaries/params/export-entries-parameters");
30
+ const import_file_media_type_1 = require("../../api/glossaries/enums/import-file-media-type");
31
+ const export_format_1 = require("../../api/glossaries/enums/export-format");
32
+ dotenv_1.default.config();
33
+ const baseSmartlingApiUrl = process.env.SMARTLING_API_BASE_URL || "https://api.smartling.com";
34
+ const accountUid = process.env.SMARTLING_ACCOUNT_UID;
35
+ const userId = process.env.SMARTLING_USER_ID;
36
+ const userSecret = process.env.SMARTLING_USER_SECRET;
37
+ const hasCredentials = Boolean(accountUid && userId && userSecret);
38
+ const logResponsesEnabled = process.env.SMARTLING_LOG_RESPONSES === "true";
39
+ function logResponse(label, response) {
40
+ if (!logResponsesEnabled) {
41
+ return;
42
+ }
43
+ console.log(`\n--- ${label} ---\n${JSON.stringify(response, null, 2)}`);
44
+ }
45
+ describe("SmartlingGlossariesApi integration tests.", function integrationSuite() {
46
+ this.timeout(60000);
47
+ let api;
48
+ let glossaryUid;
49
+ let entryUid;
50
+ let labelUid;
51
+ before(function skipWithoutCredentials() {
52
+ if (!hasCredentials) {
53
+ console.log("Skipping Glossaries integration tests: set SMARTLING_ACCOUNT_UID, SMARTLING_USER_ID, SMARTLING_USER_SECRET in .env");
54
+ this.skip();
55
+ }
56
+ api = new index_1.SmartlingApiClientBuilder()
57
+ .setBaseSmartlingApiUrl(baseSmartlingApiUrl)
58
+ .authWithUserIdAndUserSecret(userId, userSecret)
59
+ .build(index_2.SmartlingGlossariesApi);
60
+ });
61
+ before(() => __awaiter(this, void 0, void 0, function* () {
62
+ const created = yield api.createGlossary(accountUid, new create_glossary_parameters_1.CreateGlossaryParameters()
63
+ .setGlossaryName(`Integration test glossary ${Date.now()}`)
64
+ .setLocaleIds(["en-US", "fr-FR"]));
65
+ logResponse("createGlossary", created);
66
+ ({ glossaryUid } = created);
67
+ }));
68
+ after(() => __awaiter(this, void 0, void 0, function* () {
69
+ if (glossaryUid) {
70
+ const archived = yield api.archiveGlossaries(accountUid, new archive_glossaries_parameters_1.ArchiveGlossariesParameters().setGlossaryUids([glossaryUid]));
71
+ logResponse("archiveGlossaries (cleanup)", archived);
72
+ }
73
+ }));
74
+ it("gets the created glossary", () => __awaiter(this, void 0, void 0, function* () {
75
+ const glossary = yield api.getGlossary(accountUid, glossaryUid);
76
+ logResponse("getGlossary", glossary);
77
+ assert_1.default.equal(glossary.glossaryUid, glossaryUid);
78
+ }));
79
+ it("updates the glossary", () => __awaiter(this, void 0, void 0, function* () {
80
+ const updatedName = `Integration test glossary ${Date.now()} (updated)`;
81
+ const updated = yield api.updateGlossary(accountUid, glossaryUid, new create_glossary_parameters_1.CreateGlossaryParameters()
82
+ .setGlossaryName(updatedName)
83
+ .setLocaleIds(["en-US", "fr-FR"]));
84
+ logResponse("updateGlossary", updated);
85
+ assert_1.default.equal(updated.glossaryUid, glossaryUid);
86
+ assert_1.default.equal(updated.glossaryName, updatedName);
87
+ assert_1.default.equal(updated.localeIds.length, 2);
88
+ assert_1.default.ok(updated.localeIds.includes("en-US"));
89
+ assert_1.default.ok(updated.localeIds.includes("fr-FR"));
90
+ }));
91
+ it("archives and restores the glossary", () => __awaiter(this, void 0, void 0, function* () {
92
+ const archived = yield api.archiveGlossaries(accountUid, new archive_glossaries_parameters_1.ArchiveGlossariesParameters().setGlossaryUids([glossaryUid]));
93
+ logResponse("archiveGlossaries", archived);
94
+ assert_1.default.ok(archived.glossaryUids.includes(glossaryUid));
95
+ const restored = yield api.restoreGlossaries(accountUid, new archive_glossaries_parameters_1.ArchiveGlossariesParameters().setGlossaryUids([glossaryUid]));
96
+ logResponse("restoreGlossaries", restored);
97
+ assert_1.default.ok(restored.glossaryUids.includes(glossaryUid));
98
+ }));
99
+ it("searches glossaries", () => __awaiter(this, void 0, void 0, function* () {
100
+ const result = yield api.searchGlossaries(accountUid, new search_glossaries_parameters_1.SearchGlossariesParameters().setGlossaryUids([glossaryUid]));
101
+ logResponse("searchGlossaries", result);
102
+ assert_1.default.equal(result.items.length, 1);
103
+ }));
104
+ it("searches glossaries with entries counts", () => __awaiter(this, void 0, void 0, function* () {
105
+ const result = yield api.searchGlossariesWithEntriesCounts(accountUid, new search_glossary_counts_parameters_1.SearchGlossaryCountsParameters().setGlossaryUids([glossaryUid]));
106
+ logResponse("searchGlossariesWithEntriesCounts", result);
107
+ assert_1.default.equal(result.items.length, 1);
108
+ }));
109
+ it("creates a glossary entry", () => __awaiter(this, void 0, void 0, function* () {
110
+ const entry = yield api.createGlossaryEntry(accountUid, glossaryUid, new create_glossary_entry_parameters_1.CreateGlossaryEntryParameters()
111
+ .setDefinition("Integration test term")
112
+ .setTranslations([{ localeId: "fr-FR", term: "Terme de test" }]));
113
+ logResponse("createGlossaryEntry", entry);
114
+ ({ entryUid } = entry);
115
+ assert_1.default.ok(entryUid);
116
+ }));
117
+ it("reads the created glossary entry", () => __awaiter(this, void 0, void 0, function* () {
118
+ const entry = yield api.readGlossaryEntry(accountUid, glossaryUid, entryUid);
119
+ logResponse("readGlossaryEntry", entry);
120
+ assert_1.default.equal(entry.entryUid, entryUid);
121
+ }));
122
+ it("updates the glossary entry", () => __awaiter(this, void 0, void 0, function* () {
123
+ const updatedDefinition = "Integration test term (updated)";
124
+ const updatedTerm = "Terme de test (modifie)";
125
+ const entry = yield api.updateGlossaryEntry(accountUid, glossaryUid, entryUid, new create_glossary_entry_parameters_1.CreateGlossaryEntryParameters()
126
+ .setDefinition(updatedDefinition)
127
+ .setTranslations([{ localeId: "fr-FR", term: updatedTerm }]));
128
+ logResponse("updateGlossaryEntry", entry);
129
+ assert_1.default.equal(entry.entryUid, entryUid);
130
+ assert_1.default.equal(entry.definition, updatedDefinition);
131
+ const frTranslation = entry.translations.find((translation) => translation.localeId === "fr-FR");
132
+ assert_1.default.ok(frTranslation);
133
+ assert_1.default.equal(frTranslation.term, updatedTerm);
134
+ }));
135
+ it("searches glossary entries", () => __awaiter(this, void 0, void 0, function* () {
136
+ const result = yield api.searchGlossaryEntries(accountUid, glossaryUid, new search_glossary_entries_parameters_1.SearchGlossaryEntriesParameters().setEntryUids([entryUid]));
137
+ logResponse("searchGlossaryEntries", result);
138
+ assert_1.default.equal(result.items.length, 1);
139
+ }));
140
+ it("creates and reads back a label", () => __awaiter(this, void 0, void 0, function* () {
141
+ const label = yield api.createGlossaryLabel(accountUid, new create_label_parameters_1.CreateLabelParameters().setLabelText(`Integration label ${Date.now()}`));
142
+ logResponse("createGlossaryLabel", label);
143
+ ({ labelUid } = label);
144
+ const updatedLabelText = `Integration label ${Date.now()} (updated)`;
145
+ const updatedLabel = yield api.updateGlossaryLabel(accountUid, labelUid, new create_label_parameters_1.CreateLabelParameters().setLabelText(updatedLabelText));
146
+ logResponse("updateGlossaryLabel", updatedLabel);
147
+ assert_1.default.equal(updatedLabel.labelUid, labelUid);
148
+ assert_1.default.equal(updatedLabel.labelText, updatedLabelText);
149
+ const allLabels = yield api.readAllGlossaryLabels(accountUid);
150
+ logResponse("readAllGlossaryLabels", allLabels);
151
+ const persistedLabel = allLabels.items.find((label2) => label2.labelUid === labelUid);
152
+ assert_1.default.ok(persistedLabel);
153
+ assert_1.default.equal(persistedLabel.labelText, updatedLabelText);
154
+ }));
155
+ it("adds and removes a label on the glossary entry", () => __awaiter(this, void 0, void 0, function* () {
156
+ const addResult = yield api.addLabelsToGlossaryEntries(accountUid, glossaryUid, new entries_bulk_labels_parameters_1.EntriesBulkLabelsParameters()
157
+ .setFilterEntryUids([entryUid])
158
+ .setLabelUids([labelUid]));
159
+ logResponse("addLabelsToGlossaryEntries", addResult);
160
+ assert_1.default.ok(addResult.operationUid);
161
+ const removeResult = yield api.removeLabelsFromGlossaryEntries(accountUid, glossaryUid, new entries_bulk_labels_parameters_1.EntriesBulkLabelsParameters()
162
+ .setFilterEntryUids([entryUid])
163
+ .setLabelUids([labelUid]));
164
+ logResponse("removeLabelsFromGlossaryEntries", removeResult);
165
+ assert_1.default.ok(removeResult.operationUid);
166
+ }));
167
+ it("deletes the label", () => __awaiter(this, void 0, void 0, function* () {
168
+ yield api.deleteGlossaryLabel(accountUid, labelUid);
169
+ }));
170
+ it("archives and restores the glossary entry", () => __awaiter(this, void 0, void 0, function* () {
171
+ const archiveResult = yield api.archiveGlossaryEntries(accountUid, glossaryUid, new entries_bulk_action_parameters_1.EntriesBulkActionParameters().setFilterEntryUids([entryUid]));
172
+ logResponse("archiveGlossaryEntries", archiveResult);
173
+ assert_1.default.ok(archiveResult.operationUid);
174
+ const restoreResult = yield api.restoreGlossaryEntries(accountUid, glossaryUid, new entries_bulk_action_parameters_1.EntriesBulkActionParameters().setFilterEntryUids([entryUid]));
175
+ logResponse("restoreGlossaryEntries", restoreResult);
176
+ assert_1.default.ok(restoreResult.operationUid);
177
+ }));
178
+ it("exports glossary entries", () => __awaiter(this, void 0, void 0, function* () {
179
+ const exported = yield api.exportGlossaryEntries(accountUid, glossaryUid, new export_entries_parameters_1.ExportEntriesParameters().setFormat(export_format_1.ExportFormat.CSV).setLocaleIds(["fr-FR"]));
180
+ logResponse("exportGlossaryEntries (length)", exported.length);
181
+ assert_1.default.ok(exported.length > 0);
182
+ }));
183
+ it("initializes, checks, and confirms a glossary import", () => __awaiter(this, void 0, void 0, function* () {
184
+ const localeColumnSuffix = "French (France) [fr-FR] fr-FR";
185
+ const importHeader = [
186
+ "ID", "Definition", "Part Of Speech", "Label Names", "Created By", "Last Modified By",
187
+ "Created At", "Last Modified At", "Archived", "MT-suitable", "Suggestion-status",
188
+ `Term ${localeColumnSuffix}`,
189
+ `Linguistic Variations ${localeColumnSuffix}`,
190
+ `Notes ${localeColumnSuffix}`,
191
+ `Case Sensitive ${localeColumnSuffix}`,
192
+ `Exact Match ${localeColumnSuffix}`,
193
+ `Do Not Translate ${localeColumnSuffix}`,
194
+ `Disabled ${localeColumnSuffix}`,
195
+ `Last Modified By ${localeColumnSuffix}`
196
+ ];
197
+ const importRow = new Array(importHeader.length).fill("");
198
+ importRow[1] = "Imported term";
199
+ importRow[11] = "Terme importe";
200
+ const importCsvContent = `${importHeader.map((column) => `"${column}"`).join(",")}\n`
201
+ + `${importRow.map((value) => `"${value}"`).join(",")}\n`;
202
+ const importResult = yield api.initializeGlossaryImport(accountUid, glossaryUid, new initialize_import_parameters_1.InitializeImportParameters()
203
+ .setImportFileContent(importCsvContent)
204
+ .setImportFileName("integration-import.csv")
205
+ .setImportFileMediaType(import_file_media_type_1.ImportFileMediaType.CSV));
206
+ logResponse("initializeGlossaryImport", importResult);
207
+ assert_1.default.ok(importResult.glossaryImport.importUid);
208
+ assert_1.default.ok(importResult.entryChanges);
209
+ const status = yield api.importStatus(accountUid, glossaryUid, importResult.glossaryImport.importUid);
210
+ logResponse("importStatus", status);
211
+ assert_1.default.equal(status.importUid, importResult.glossaryImport.importUid);
212
+ const confirmed = yield api.confirmGlossaryImport(accountUid, glossaryUid, importResult.glossaryImport.importUid);
213
+ logResponse("confirmGlossaryImport", confirmed);
214
+ assert_1.default.equal(confirmed.importUid, importResult.glossaryImport.importUid);
215
+ }));
216
+ it("removes the glossary entry", () => __awaiter(this, void 0, void 0, function* () {
217
+ const result = yield api.removeGlossaryEntries(accountUid, glossaryUid, new entries_bulk_action_parameters_1.EntriesBulkActionParameters().setFilterEntryUids([entryUid]));
218
+ logResponse("removeGlossaryEntries", result);
219
+ assert_1.default.ok(result.operationUid);
220
+ }));
221
+ });
222
+ //# sourceMappingURL=glossaries.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"glossaries.spec.js","sourceRoot":"","sources":["../../../test/integration/glossaries.spec.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,oDAA4B;AAC5B,oDAA4B;AAC5B,mDAAoE;AACpE,sDAAoE;AACpE,uGAAkG;AAClG,6GAAwG;AACxG,qHAA+G;AAC/G,2GAAsG;AACtG,mHAA6G;AAC7G,uHAAiH;AACjH,+GAAyG;AACzG,+GAAyG;AACzG,iGAA4F;AAC5F,2GAAsG;AACtG,qGAAgG;AAChG,8FAAwF;AACxF,4EAAwE;AAExE,gBAAM,CAAC,MAAM,EAAE,CAAC;AAEhB,MAAM,mBAAmB,GAAG,OAAO,CAAC,GAAG,CAAC,sBAAsB,IAAI,2BAA2B,CAAC;AAC9F,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,qBAA+B,CAAC;AAC/D,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,iBAA2B,CAAC;AACvD,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,qBAA+B,CAAC;AAC/D,MAAM,cAAc,GAAG,OAAO,CAAC,UAAU,IAAI,MAAM,IAAI,UAAU,CAAC,CAAC;AACnE,MAAM,mBAAmB,GAAG,OAAO,CAAC,GAAG,CAAC,uBAAuB,KAAK,MAAM,CAAC;AAE3E,SAAS,WAAW,CAAC,KAAa,EAAE,QAAiB;IACjD,IAAI,CAAC,mBAAmB,EAAE;QACtB,OAAO;KACV;IAGD,OAAO,CAAC,GAAG,CAAC,SAAS,KAAK,SAAS,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IA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138 @@
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 __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ const dotenv_1 = __importDefault(require("dotenv"));
16
+ const assert_1 = __importDefault(require("assert"));
17
+ const index_1 = require("../../api/builder/index");
18
+ const index_2 = require("../../api/translation-memory/index");
19
+ const import_tmx_file_parameters_1 = require("../../api/translation-memory/params/import-tmx-file-parameters");
20
+ const create_string_search_filter_parameters_1 = require("../../api/translation-memory/params/create-string-search-filter-parameters");
21
+ const bulk_export_tm_strings_parameters_1 = require("../../api/translation-memory/params/bulk-export-tm-strings-parameters");
22
+ const create_tm_parameters_1 = require("../../api/translation-memory/params/create-tm-parameters");
23
+ const update_tm_parameters_1 = require("../../api/translation-memory/params/update-tm-parameters");
24
+ const translation_quality_type_1 = require("../../api/translation-memory/params/translation-quality-type");
25
+ dotenv_1.default.config();
26
+ const baseSmartlingApiUrl = process.env.SMARTLING_API_BASE_URL || "https://api.smartling.com";
27
+ const accountUid = process.env.SMARTLING_ACCOUNT_UID;
28
+ const userId = process.env.SMARTLING_USER_ID;
29
+ const userSecret = process.env.SMARTLING_USER_SECRET;
30
+ const hasCredentials = Boolean(accountUid && userId && userSecret);
31
+ const logResponsesEnabled = process.env.SMARTLING_LOG_RESPONSES === "true";
32
+ function logResponse(label, response) {
33
+ if (!logResponsesEnabled) {
34
+ return;
35
+ }
36
+ console.log(`\n--- ${label} ---\n${JSON.stringify(response, null, 2)}`);
37
+ }
38
+ function delay(milliseconds) {
39
+ return new Promise((resolve) => {
40
+ setTimeout(resolve, milliseconds);
41
+ });
42
+ }
43
+ describe("SmartlingTranslationMemoryApi integration tests.", function integrationSuite() {
44
+ this.timeout(240000);
45
+ let api;
46
+ let tmUid;
47
+ before(function skipWithoutCredentials() {
48
+ if (!hasCredentials) {
49
+ console.log("Skipping Translation Memory integration tests: set SMARTLING_ACCOUNT_UID, SMARTLING_USER_ID, SMARTLING_USER_SECRET in .env");
50
+ this.skip();
51
+ }
52
+ api = new index_1.SmartlingApiClientBuilder()
53
+ .setBaseSmartlingApiUrl(baseSmartlingApiUrl)
54
+ .authWithUserIdAndUserSecret(userId, userSecret)
55
+ .build(index_2.SmartlingTranslationMemoryApi);
56
+ });
57
+ before(() => __awaiter(this, void 0, void 0, function* () {
58
+ const created = yield api.createTm(accountUid, new create_tm_parameters_1.CreateTmParameters()
59
+ .setName(`api-sdk-nodejs integration test TM ${Date.now()}`)
60
+ .setDescription("Created by the api-sdk-nodejs integration suite")
61
+ .setSourceLocaleId("en-US")
62
+ .setTranslationQuality(translation_quality_type_1.TranslationQualityType.TRANSLATION));
63
+ logResponse("createTm", created);
64
+ assert_1.default.ok(created, "createTm returned null");
65
+ ({ tmUid } = created);
66
+ }));
67
+ after(() => __awaiter(this, void 0, void 0, function* () {
68
+ if (tmUid) {
69
+ const deleted = yield api.deleteTm(accountUid, tmUid);
70
+ logResponse("deleteTm (cleanup)", deleted);
71
+ }
72
+ }));
73
+ it("Updates the TM", () => __awaiter(this, void 0, void 0, function* () {
74
+ const updatedName = `api-sdk-nodejs integration test TM (updated) ${Date.now()}`;
75
+ const updatedDescription = "Updated by the api-sdk-nodejs integration suite";
76
+ const updated = yield api.updateTm(accountUid, new update_tm_parameters_1.UpdateTmParameters()
77
+ .setTmUid(tmUid)
78
+ .setName(updatedName)
79
+ .setDescription(updatedDescription));
80
+ logResponse("updateTm", updated);
81
+ assert_1.default.ok(updated, "updateTm returned null");
82
+ assert_1.default.equal(updated.tmUid, tmUid);
83
+ assert_1.default.equal(updated.name, updatedName);
84
+ assert_1.default.equal(updated.description, updatedDescription);
85
+ assert_1.default.ok(updated.created instanceof Date);
86
+ assert_1.default.ok(updated.lastModified instanceof Date);
87
+ }));
88
+ it("Imports a TMX file", () => __awaiter(this, void 0, void 0, function* () {
89
+ const result = yield api.importTmxFile(accountUid, new import_tmx_file_parameters_1.ImportTmxFileParameters()
90
+ .setFileFromLocalFilePath("./test/data/sample.tmx")
91
+ .setFileUri(`integration-test-${Date.now()}.tmx`)
92
+ .setTmUid(tmUid)
93
+ .setDescription("api-sdk-nodejs integration test import"));
94
+ logResponse("importTmxFile", result);
95
+ assert_1.default.ok(result.jobUid);
96
+ assert_1.default.ok(result.tmxUid);
97
+ assert_1.default.equal(typeof result.stringCount, "number");
98
+ assert_1.default.equal(typeof result.wordCount, "number");
99
+ }));
100
+ it("Creates a string search, bulk-exports it, polls status, and downloads the TMX", () => __awaiter(this, void 0, void 0, function* () {
101
+ const searchFilter = new create_string_search_filter_parameters_1.CreateStringSearchFilterParameters().setTmUids([tmUid]);
102
+ let searchResult = yield api.createStringSearch(accountUid, searchFilter);
103
+ const searchDeadline = Date.now() + 30000;
104
+ while (!(searchResult === null || searchResult === void 0 ? void 0 : searchResult.stringCount) && Date.now() < searchDeadline) {
105
+ yield delay(2000);
106
+ searchResult = yield api.createStringSearch(accountUid, searchFilter);
107
+ }
108
+ logResponse("createStringSearch", searchResult);
109
+ assert_1.default.ok(searchResult, "createStringSearch returned null");
110
+ assert_1.default.ok(searchResult.searchUid);
111
+ assert_1.default.ok(searchResult.stringCount);
112
+ const exportResult = yield api.bulkExportTmStrings(accountUid, new bulk_export_tm_strings_parameters_1.BulkExportTmStringsParameters().setSearchUid(searchResult.searchUid));
113
+ logResponse("bulkExportTmStrings", exportResult);
114
+ assert_1.default.ok(exportResult, "bulkExportTmStrings returned null");
115
+ assert_1.default.ok(exportResult.actionUid);
116
+ const terminalStatuses = ["SUCCESS", "FAILURE", "CANCELED", "STOPPED"];
117
+ let status = yield api.getBulkExportTmStringsStatus(accountUid, exportResult.actionUid);
118
+ const deadline = Date.now() + 90000;
119
+ while (!((status === null || status === void 0 ? void 0 : status.executionComplete) || terminalStatuses.includes(status === null || status === void 0 ? void 0 : status.actionStatus))
120
+ && Date.now() < deadline) {
121
+ yield delay(2000);
122
+ status = yield api.getBulkExportTmStringsStatus(accountUid, exportResult.actionUid);
123
+ }
124
+ logResponse("getBulkExportTmStringsStatus", status);
125
+ assert_1.default.ok(status, "getBulkExportTmStringsStatus returned null");
126
+ assert_1.default.equal(status.actionStatus, "SUCCESS");
127
+ assert_1.default.equal(status.executionComplete, true);
128
+ assert_1.default.ok(status.tmxDownloadKey, "bulkExportTmStrings completed but returned no tmxDownloadKey - can't exercise downloadTmxFile");
129
+ const downloaded = yield api.downloadTmxFile(accountUid, status.tmxDownloadKey);
130
+ logResponse("downloadTmxFile", {
131
+ fileName: downloaded.fileName,
132
+ contentType: downloaded.contentType,
133
+ byteLength: downloaded.fileContent.byteLength
134
+ });
135
+ assert_1.default.ok(downloaded.fileContent.byteLength > 0);
136
+ }));
137
+ });
138
+ //# sourceMappingURL=translation-memory.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"translation-memory.spec.js","sourceRoot":"","sources":["../../../test/integration/translation-memory.spec.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,oDAA4B;AAC5B,oDAA4B;AAC5B,mDAAoE;AACpE,8DAAmF;AACnF,+GAAyG;AACzG,uIAAgI;AAChI,6HAAsH;AACtH,mGAA8F;AAC9F,mGAA8F;AAC9F,2GAAsG;AAEtG,gBAAM,CAAC,MAAM,EAAE,CAAC;AAEhB,MAAM,mBAAmB,GAAG,OAAO,CAAC,GAAG,CAAC,sBAAsB,IAAI,2BAA2B,CAAC;AAC9F,MAAM,UAAU,GAAG,OAAO,CA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