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,149 @@
1
+ import { BaseParameters } from "../../parameters/index";
2
+ import { ExportEntriesFilterDto } from "../dto/export-entries-filter-dto";
3
+ import { EntryState } from "../enums/entry-state";
4
+ import { LabelTypeDto } from "../dto/label-type-dto";
5
+ import { DateFilterDto } from "../dto/date-filter-dto";
6
+ import { UserFilterDto } from "../dto/user-filter-dto";
7
+ import { PaginationDto } from "../dto/pagination-dto";
8
+ import { EntrySortingDto } from "../dto/entry-sorting-dto";
9
+
10
+ export class EntriesBulkActionParameters extends BaseParameters {
11
+ constructor() {
12
+ super();
13
+ this.set("filter", {});
14
+ }
15
+
16
+ setFilter(filter: ExportEntriesFilterDto): EntriesBulkActionParameters {
17
+ this.set("filter", filter);
18
+
19
+ return this;
20
+ }
21
+
22
+ setFilterQuery(query: string): EntriesBulkActionParameters {
23
+ const filter = this.parameters.filter || {};
24
+ filter.query = query;
25
+ this.set("filter", filter);
26
+
27
+ return this;
28
+ }
29
+
30
+ setFilterLocaleIds(localeIds: Array<string>): EntriesBulkActionParameters {
31
+ const filter = this.parameters.filter || {};
32
+ filter.localeIds = localeIds;
33
+ this.set("filter", filter);
34
+
35
+ return this;
36
+ }
37
+
38
+ setFilterEntryUids(entryUids: Array<string>): EntriesBulkActionParameters {
39
+ const filter = this.parameters.filter || {};
40
+ filter.entryUids = entryUids;
41
+ this.set("filter", filter);
42
+
43
+ return this;
44
+ }
45
+
46
+ setFilterEntryState(entryState: EntryState): EntriesBulkActionParameters {
47
+ const filter = this.parameters.filter || {};
48
+ filter.entryState = entryState;
49
+ this.set("filter", filter);
50
+
51
+ return this;
52
+ }
53
+
54
+ setFilterMissingTranslationLocaleId(localeId: string): EntriesBulkActionParameters {
55
+ const filter = this.parameters.filter || {};
56
+ filter.missingTranslationLocaleId = localeId;
57
+ this.set("filter", filter);
58
+
59
+ return this;
60
+ }
61
+
62
+ setFilterPresentTranslationLocaleId(localeId: string): EntriesBulkActionParameters {
63
+ const filter = this.parameters.filter || {};
64
+ filter.presentTranslationLocaleId = localeId;
65
+ this.set("filter", filter);
66
+
67
+ return this;
68
+ }
69
+
70
+ setFilterDntLocaleId(localeId: string): EntriesBulkActionParameters {
71
+ const filter = this.parameters.filter || {};
72
+ filter.dntLocaleId = localeId;
73
+ this.set("filter", filter);
74
+
75
+ return this;
76
+ }
77
+
78
+ setFilterReturnFallbackTranslations(returnFallback: boolean): EntriesBulkActionParameters {
79
+ const filter = this.parameters.filter || {};
80
+ filter.returnFallbackTranslations = returnFallback;
81
+ this.set("filter", filter);
82
+
83
+ return this;
84
+ }
85
+
86
+ setFilterLabels(labels: LabelTypeDto): EntriesBulkActionParameters {
87
+ const filter = this.parameters.filter || {};
88
+ filter.labels = labels;
89
+ this.set("filter", filter);
90
+
91
+ return this;
92
+ }
93
+
94
+ setFilterDntTermSet(dntTermSet: boolean): EntriesBulkActionParameters {
95
+ const filter = this.parameters.filter || {};
96
+ filter.dntTermSet = dntTermSet;
97
+ this.set("filter", filter);
98
+
99
+ return this;
100
+ }
101
+
102
+ setFilterCreated(created: DateFilterDto): EntriesBulkActionParameters {
103
+ const filter = this.parameters.filter || {};
104
+ filter.created = created;
105
+ this.set("filter", filter);
106
+
107
+ return this;
108
+ }
109
+
110
+ setFilterLastModified(lastModified: DateFilterDto): EntriesBulkActionParameters {
111
+ const filter = this.parameters.filter || {};
112
+ filter.lastModified = lastModified;
113
+ this.set("filter", filter);
114
+
115
+ return this;
116
+ }
117
+
118
+ setFilterCreatedBy(createdBy: UserFilterDto): EntriesBulkActionParameters {
119
+ const filter = this.parameters.filter || {};
120
+ filter.createdBy = createdBy;
121
+ this.set("filter", filter);
122
+
123
+ return this;
124
+ }
125
+
126
+ setFilterLastModifiedBy(lastModifiedBy: UserFilterDto): EntriesBulkActionParameters {
127
+ const filter = this.parameters.filter || {};
128
+ filter.lastModifiedBy = lastModifiedBy;
129
+ this.set("filter", filter);
130
+
131
+ return this;
132
+ }
133
+
134
+ setFilterPaging(paging: PaginationDto): EntriesBulkActionParameters {
135
+ const filter = this.parameters.filter || {};
136
+ filter.paging = paging;
137
+ this.set("filter", filter);
138
+
139
+ return this;
140
+ }
141
+
142
+ setFilterSorting(sorting: EntrySortingDto): EntriesBulkActionParameters {
143
+ const filter = this.parameters.filter || {};
144
+ filter.sorting = sorting;
145
+ this.set("filter", filter);
146
+
147
+ return this;
148
+ }
149
+ }
@@ -0,0 +1,123 @@
1
+ import { BaseParameters } from "../../parameters/index";
2
+ import { ExportEntriesFilterDto } from "../dto/export-entries-filter-dto";
3
+ import { EntryState } from "../enums/entry-state";
4
+ import { LabelTypeDto } from "../dto/label-type-dto";
5
+ import { DateFilterDto } from "../dto/date-filter-dto";
6
+ import { UserFilterDto } from "../dto/user-filter-dto";
7
+ import { PaginationDto } from "../dto/pagination-dto";
8
+ import { EntrySortingDto } from "../dto/entry-sorting-dto";
9
+
10
+ export class EntriesBulkLabelsParameters extends BaseParameters {
11
+ constructor() {
12
+ super();
13
+ this.set("filter", {});
14
+ }
15
+
16
+ setFilter(filter: ExportEntriesFilterDto): EntriesBulkLabelsParameters {
17
+ this.set("filter", filter);
18
+
19
+ return this;
20
+ }
21
+
22
+ setFilterQuery(query: string): EntriesBulkLabelsParameters {
23
+ this.parameters.filter.query = query;
24
+
25
+ return this;
26
+ }
27
+
28
+ setFilterLocaleIds(localeIds: Array<string>): EntriesBulkLabelsParameters {
29
+ this.parameters.filter.localeIds = localeIds;
30
+
31
+ return this;
32
+ }
33
+
34
+ setFilterEntryUids(entryUids: Array<string>): EntriesBulkLabelsParameters {
35
+ this.parameters.filter.entryUids = entryUids;
36
+
37
+ return this;
38
+ }
39
+
40
+ setFilterEntryState(entryState: EntryState): EntriesBulkLabelsParameters {
41
+ this.parameters.filter.entryState = entryState;
42
+
43
+ return this;
44
+ }
45
+
46
+ setFilterMissingTranslationLocaleId(localeId: string): EntriesBulkLabelsParameters {
47
+ this.parameters.filter.missingTranslationLocaleId = localeId;
48
+
49
+ return this;
50
+ }
51
+
52
+ setFilterPresentTranslationLocaleId(localeId: string): EntriesBulkLabelsParameters {
53
+ this.parameters.filter.presentTranslationLocaleId = localeId;
54
+
55
+ return this;
56
+ }
57
+
58
+ setFilterDntLocaleId(localeId: string): EntriesBulkLabelsParameters {
59
+ this.parameters.filter.dntLocaleId = localeId;
60
+
61
+ return this;
62
+ }
63
+
64
+ setFilterReturnFallbackTranslations(returnFallback: boolean): EntriesBulkLabelsParameters {
65
+ this.parameters.filter.returnFallbackTranslations = returnFallback;
66
+
67
+ return this;
68
+ }
69
+
70
+ setFilterLabels(labels: LabelTypeDto): EntriesBulkLabelsParameters {
71
+ this.parameters.filter.labels = labels;
72
+
73
+ return this;
74
+ }
75
+
76
+ setFilterDntTermSet(dntTermSet: boolean): EntriesBulkLabelsParameters {
77
+ this.parameters.filter.dntTermSet = dntTermSet;
78
+
79
+ return this;
80
+ }
81
+
82
+ setFilterCreated(created: DateFilterDto): EntriesBulkLabelsParameters {
83
+ this.parameters.filter.created = created;
84
+
85
+ return this;
86
+ }
87
+
88
+ setFilterLastModified(lastModified: DateFilterDto): EntriesBulkLabelsParameters {
89
+ this.parameters.filter.lastModified = lastModified;
90
+
91
+ return this;
92
+ }
93
+
94
+ setFilterCreatedBy(createdBy: UserFilterDto): EntriesBulkLabelsParameters {
95
+ this.parameters.filter.createdBy = createdBy;
96
+
97
+ return this;
98
+ }
99
+
100
+ setFilterLastModifiedBy(lastModifiedBy: UserFilterDto): EntriesBulkLabelsParameters {
101
+ this.parameters.filter.lastModifiedBy = lastModifiedBy;
102
+
103
+ return this;
104
+ }
105
+
106
+ setFilterPaging(paging: PaginationDto): EntriesBulkLabelsParameters {
107
+ this.parameters.filter.paging = paging;
108
+
109
+ return this;
110
+ }
111
+
112
+ setFilterSorting(sorting: EntrySortingDto): EntriesBulkLabelsParameters {
113
+ this.parameters.filter.sorting = sorting;
114
+
115
+ return this;
116
+ }
117
+
118
+ setLabelUids(labelUids: Array<string>): EntriesBulkLabelsParameters {
119
+ this.set("labelUids", labelUids);
120
+
121
+ return this;
122
+ }
123
+ }
@@ -47,114 +47,82 @@ export class ExportEntriesParameters extends BaseParameters {
47
47
  }
48
48
 
49
49
  setFilterQuery(query: string): ExportEntriesParameters {
50
- const filter = this.parameters.filter || {};
51
- filter.query = query;
52
- this.set("filter", filter);
50
+ this.parameters.filter.query = query;
53
51
  return this;
54
52
  }
55
53
 
56
54
  setFilterLocaleIds(localeIds: Array<string>): ExportEntriesParameters {
57
- const filter = this.parameters.filter || {};
58
- filter.localeIds = localeIds;
59
- this.set("filter", filter);
55
+ this.parameters.filter.localeIds = localeIds;
60
56
  return this;
61
57
  }
62
58
 
63
59
  setFilterEntryUids(entryUids: Array<string>): ExportEntriesParameters {
64
- const filter = this.parameters.filter || {};
65
- filter.entryUids = entryUids;
66
- this.set("filter", filter);
60
+ this.parameters.filter.entryUids = entryUids;
67
61
  return this;
68
62
  }
69
63
 
70
64
  setFilterEntryState(entryState: EntryState): ExportEntriesParameters {
71
- const filter = this.parameters.filter || {};
72
- filter.entryState = entryState;
73
- this.set("filter", filter);
65
+ this.parameters.filter.entryState = entryState;
74
66
  return this;
75
67
  }
76
68
 
77
69
  setFilterMissingTranslationLocaleId(localeId: string): ExportEntriesParameters {
78
- const filter = this.parameters.filter || {};
79
- filter.missingTranslationLocaleId = localeId;
80
- this.set("filter", filter);
70
+ this.parameters.filter.missingTranslationLocaleId = localeId;
81
71
  return this;
82
72
  }
83
73
 
84
74
  setFilterPresentTranslationLocaleId(localeId: string): ExportEntriesParameters {
85
- const filter = this.parameters.filter || {};
86
- filter.presentTranslationLocaleId = localeId;
87
- this.set("filter", filter);
75
+ this.parameters.filter.presentTranslationLocaleId = localeId;
88
76
  return this;
89
77
  }
90
78
 
91
79
  setFilterDntLocaleId(localeId: string): ExportEntriesParameters {
92
- const filter = this.parameters.filter || {};
93
- filter.dntLocaleId = localeId;
94
- this.set("filter", filter);
80
+ this.parameters.filter.dntLocaleId = localeId;
95
81
  return this;
96
82
  }
97
83
 
98
84
  setFilterReturnFallbackTranslations(returnFallback: boolean): ExportEntriesParameters {
99
- const filter = this.parameters.filter || {};
100
- filter.returnFallbackTranslations = returnFallback;
101
- this.set("filter", filter);
85
+ this.parameters.filter.returnFallbackTranslations = returnFallback;
102
86
  return this;
103
87
  }
104
88
 
105
89
  setFilterLabels(labels: LabelTypeDto): ExportEntriesParameters {
106
- const filter = this.parameters.filter || {};
107
- filter.labels = labels;
108
- this.set("filter", filter);
90
+ this.parameters.filter.labels = labels;
109
91
  return this;
110
92
  }
111
93
 
112
94
  setFilterDntTermSet(dntTermSet: boolean): ExportEntriesParameters {
113
- const filter = this.parameters.filter || {};
114
- filter.dntTermSet = dntTermSet;
115
- this.set("filter", filter);
95
+ this.parameters.filter.dntTermSet = dntTermSet;
116
96
  return this;
117
97
  }
118
98
 
119
99
  setFilterCreated(created: DateFilterDto): ExportEntriesParameters {
120
- const filter = this.parameters.filter || {};
121
- filter.created = created;
122
- this.set("filter", filter);
100
+ this.parameters.filter.created = created;
123
101
  return this;
124
102
  }
125
103
 
126
104
  setFilterLastModified(lastModified: DateFilterDto): ExportEntriesParameters {
127
- const filter = this.parameters.filter || {};
128
- filter.lastModified = lastModified;
129
- this.set("filter", filter);
105
+ this.parameters.filter.lastModified = lastModified;
130
106
  return this;
131
107
  }
132
108
 
133
109
  setFilterCreatedBy(createdBy: UserFilterDto): ExportEntriesParameters {
134
- const filter = this.parameters.filter || {};
135
- filter.createdBy = createdBy;
136
- this.set("filter", filter);
110
+ this.parameters.filter.createdBy = createdBy;
137
111
  return this;
138
112
  }
139
113
 
140
114
  setFilterLastModifiedBy(lastModifiedBy: UserFilterDto): ExportEntriesParameters {
141
- const filter = this.parameters.filter || {};
142
- filter.lastModifiedBy = lastModifiedBy;
143
- this.set("filter", filter);
115
+ this.parameters.filter.lastModifiedBy = lastModifiedBy;
144
116
  return this;
145
117
  }
146
118
 
147
119
  setFilterPaging(paging: PaginationDto): ExportEntriesParameters {
148
- const filter = this.parameters.filter || {};
149
- filter.paging = paging;
150
- this.set("filter", filter);
120
+ this.parameters.filter.paging = paging;
151
121
  return this;
152
122
  }
153
123
 
154
124
  setFilterSorting(sorting: EntrySortingDto): ExportEntriesParameters {
155
- const filter = this.parameters.filter || {};
156
- filter.sorting = sorting;
157
- this.set("filter", filter);
125
+ this.parameters.filter.sorting = sorting;
158
126
  return this;
159
127
  }
160
128
  }
@@ -0,0 +1,42 @@
1
+ import * as fs from "fs";
2
+ import string2fileStream from "string-to-file-stream";
3
+ import { BaseParameters } from "../../parameters/index";
4
+ import { ImportFileMediaType } from "../enums/import-file-media-type";
5
+
6
+ export class InitializeImportParameters extends BaseParameters {
7
+ setArchiveMode(archiveMode: boolean): InitializeImportParameters {
8
+ this.set("archiveMode", archiveMode);
9
+
10
+ return this;
11
+ }
12
+
13
+ setImportFileFromLocalFilePath(filePath: string): InitializeImportParameters {
14
+ this.set("importFile", fs.createReadStream(fs.realpathSync(filePath)));
15
+
16
+ return this;
17
+ }
18
+
19
+ setImportFileContent(fileContent: string): InitializeImportParameters {
20
+ this.set("importFile", string2fileStream(fileContent));
21
+
22
+ return this;
23
+ }
24
+
25
+ setImportFileContentFromBuffer(fileContent: Buffer): InitializeImportParameters {
26
+ this.set("importFile", fileContent);
27
+
28
+ return this;
29
+ }
30
+
31
+ setImportFileName(importFileName: string): InitializeImportParameters {
32
+ this.set("importFileName", importFileName);
33
+
34
+ return this;
35
+ }
36
+
37
+ setImportFileMediaType(importFileMediaType: ImportFileMediaType): InitializeImportParameters {
38
+ this.set("importFileMediaType", importFileMediaType);
39
+
40
+ return this;
41
+ }
42
+ }
@@ -0,0 +1,41 @@
1
+ import { BaseParameters } from "../../parameters/index";
2
+ import { PaginationDto } from "../dto/pagination-dto";
3
+ import { SortingDto } from "../dto/sorting-dto";
4
+
5
+ export class SearchGlossaryCountsParameters extends BaseParameters {
6
+ setQuery(query: string): SearchGlossaryCountsParameters {
7
+ this.set("query", query);
8
+
9
+ return this;
10
+ }
11
+
12
+ setGlossaryState(glossaryState: "ACTIVE" | "ARCHIVED" | "BOTH"): SearchGlossaryCountsParameters {
13
+ this.set("glossaryState", glossaryState);
14
+
15
+ return this;
16
+ }
17
+
18
+ setTargetLocaleId(targetLocaleId: string): SearchGlossaryCountsParameters {
19
+ this.set("targetLocaleId", targetLocaleId);
20
+
21
+ return this;
22
+ }
23
+
24
+ setGlossaryUids(glossaryUids: Array<string>): SearchGlossaryCountsParameters {
25
+ this.set("glossaryUids", glossaryUids);
26
+
27
+ return this;
28
+ }
29
+
30
+ setPaging(paging: PaginationDto): SearchGlossaryCountsParameters {
31
+ this.set("paging", paging);
32
+
33
+ return this;
34
+ }
35
+
36
+ setSorting(sorting: SortingDto): SearchGlossaryCountsParameters {
37
+ this.set("sorting", sorting);
38
+
39
+ return this;
40
+ }
41
+ }
@@ -0,0 +1,105 @@
1
+ import { BaseParameters } from "../../parameters/index";
2
+ import { EntryState } from "../enums/entry-state";
3
+ import { LabelTypeDto } from "../dto/label-type-dto";
4
+ import { DateFilterDto } from "../dto/date-filter-dto";
5
+ import { UserFilterDto } from "../dto/user-filter-dto";
6
+ import { PaginationDto } from "../dto/pagination-dto";
7
+ import { EntrySortingDto } from "../dto/entry-sorting-dto";
8
+
9
+ export class SearchGlossaryEntriesParameters extends BaseParameters {
10
+ setQuery(query: string): SearchGlossaryEntriesParameters {
11
+ this.set("query", query);
12
+
13
+ return this;
14
+ }
15
+
16
+ setLocaleIds(localeIds: Array<string>): SearchGlossaryEntriesParameters {
17
+ this.set("localeIds", localeIds);
18
+
19
+ return this;
20
+ }
21
+
22
+ setEntryUids(entryUids: Array<string>): SearchGlossaryEntriesParameters {
23
+ this.set("entryUids", entryUids);
24
+
25
+ return this;
26
+ }
27
+
28
+ setEntryState(entryState: EntryState): SearchGlossaryEntriesParameters {
29
+ this.set("entryState", entryState);
30
+
31
+ return this;
32
+ }
33
+
34
+ setMissingTranslationLocaleId(localeId: string): SearchGlossaryEntriesParameters {
35
+ this.set("missingTranslationLocaleId", localeId);
36
+
37
+ return this;
38
+ }
39
+
40
+ setPresentTranslationLocaleId(localeId: string): SearchGlossaryEntriesParameters {
41
+ this.set("presentTranslationLocaleId", localeId);
42
+
43
+ return this;
44
+ }
45
+
46
+ setDntLocaleId(localeId: string): SearchGlossaryEntriesParameters {
47
+ this.set("dntLocaleId", localeId);
48
+
49
+ return this;
50
+ }
51
+
52
+ setReturnFallbackTranslations(returnFallback: boolean): SearchGlossaryEntriesParameters {
53
+ this.set("returnFallbackTranslations", returnFallback);
54
+
55
+ return this;
56
+ }
57
+
58
+ setLabels(labels: LabelTypeDto): SearchGlossaryEntriesParameters {
59
+ this.set("labels", labels);
60
+
61
+ return this;
62
+ }
63
+
64
+ setDntTermSet(dntTermSet: boolean): SearchGlossaryEntriesParameters {
65
+ this.set("dntTermSet", dntTermSet);
66
+
67
+ return this;
68
+ }
69
+
70
+ setCreated(created: DateFilterDto): SearchGlossaryEntriesParameters {
71
+ this.set("created", created);
72
+
73
+ return this;
74
+ }
75
+
76
+ setLastModified(lastModified: DateFilterDto): SearchGlossaryEntriesParameters {
77
+ this.set("lastModified", lastModified);
78
+
79
+ return this;
80
+ }
81
+
82
+ setCreatedBy(createdBy: UserFilterDto): SearchGlossaryEntriesParameters {
83
+ this.set("createdBy", createdBy);
84
+
85
+ return this;
86
+ }
87
+
88
+ setLastModifiedBy(lastModifiedBy: UserFilterDto): SearchGlossaryEntriesParameters {
89
+ this.set("lastModifiedBy", lastModifiedBy);
90
+
91
+ return this;
92
+ }
93
+
94
+ setPaging(paging: PaginationDto): SearchGlossaryEntriesParameters {
95
+ this.set("paging", paging);
96
+
97
+ return this;
98
+ }
99
+
100
+ setSorting(sorting: EntrySortingDto): SearchGlossaryEntriesParameters {
101
+ this.set("sorting", sorting);
102
+
103
+ return this;
104
+ }
105
+ }
@@ -0,0 +1,12 @@
1
+ import { AsyncActionStatus } from "./async-action-status";
2
+
3
+ interface AsyncActionResultDto {
4
+ actionUid: string;
5
+ totalCount: number;
6
+ processedCount: number;
7
+ errorCount: number;
8
+ executionComplete: boolean;
9
+ actionStatus: AsyncActionStatus;
10
+ }
11
+
12
+ export { AsyncActionResultDto };
@@ -0,0 +1,8 @@
1
+ export enum AsyncActionStatus {
2
+ QUEUEING = "QUEUEING",
3
+ EXECUTING = "EXECUTING",
4
+ SUCCESS = "SUCCESS",
5
+ FAILURE = "FAILURE",
6
+ CANCELED = "CANCELED",
7
+ STOPPED = "STOPPED"
8
+ }
@@ -0,0 +1,16 @@
1
+ import { DuplicateStringDto } from "./duplicate-string-dto";
2
+
3
+ interface CreateStringSearchResultDto {
4
+ searchUid: string;
5
+ stringCount: number | null;
6
+ wordCount: number | null;
7
+ duplicateStrings: Array<DuplicateStringDto> | null;
8
+ duplicateSearch: boolean | null;
9
+ // UID of the async action tracking search indexing, only present if indexing continues in
10
+ // the background - distinct from AsyncActionResultDto.actionUid (a bulk operation's own
11
+ // tracking UID, always present once that operation has started).
12
+ actionUid: string | null;
13
+ offlineReportUid: string | null;
14
+ }
15
+
16
+ export { CreateStringSearchResultDto };
@@ -0,0 +1,9 @@
1
+ interface DuplicateStringDto {
2
+ duplicateKey: string;
3
+ count: number;
4
+ srcText: string;
5
+ srcLocale: string;
6
+ translationLocale: string;
7
+ }
8
+
9
+ export { DuplicateStringDto };
@@ -0,0 +1,10 @@
1
+ import { TmLocaleDto } from "./tm-locale-dto";
2
+
3
+ interface LocaleSummaryDto {
4
+ translationLocaleId: string;
5
+ translationLocale: TmLocaleDto;
6
+ stringCount: number;
7
+ wordCount: number;
8
+ }
9
+
10
+ export { LocaleSummaryDto };
@@ -0,0 +1,8 @@
1
+ import { AsyncActionResultDto } from "./async-action-result-dto";
2
+
3
+ interface StringsExportAsyncActionResultDto extends AsyncActionResultDto {
4
+ tmxDownloadKey: string | null;
5
+ expired: boolean;
6
+ }
7
+
8
+ export { StringsExportAsyncActionResultDto };
@@ -0,0 +1,23 @@
1
+ import { UserDto } from "./user-dto";
2
+ import { TmLocaleDto } from "./tm-locale-dto";
3
+ import { LocaleSummaryDto } from "./locale-summary-dto";
4
+ import { TranslationQualityType } from "../params/translation-quality-type";
5
+
6
+ interface TmDto {
7
+ // Nullable per the real schema (TM.tmUid: ID, no "!"), but in practice always populated for
8
+ // a successful createTm/updateTm/deleteTm/searchTms result - it's the TM's own identifier.
9
+ tmUid: string | null;
10
+ name: string;
11
+ description: string | null;
12
+ sourceLocaleId: string;
13
+ sourceLocale: TmLocaleDto;
14
+ creator: UserDto;
15
+ created: Date;
16
+ lastModifier: UserDto;
17
+ lastModified: Date;
18
+ localeSummary: Array<LocaleSummaryDto> | null;
19
+ translationQuality: TranslationQualityType;
20
+ managedWordsEnabled: boolean;
21
+ }
22
+
23
+ export { TmDto };