@focus-reactive/payload-plugin-translator 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1064) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +410 -0
  3. package/dist/client/app/cache/CacheProvider.d.ts +7 -0
  4. package/dist/client/app/cache/CacheProvider.d.ts.map +1 -0
  5. package/dist/client/app/cache/CacheProvider.export.d.ts +9 -0
  6. package/dist/client/app/cache/CacheProvider.export.d.ts.map +1 -0
  7. package/dist/client/app/cache/CacheProvider.export.js +12 -0
  8. package/dist/client/app/cache/CacheProvider.export.js.map +1 -0
  9. package/dist/client/app/cache/CacheProvider.js +18 -0
  10. package/dist/client/app/cache/CacheProvider.js.map +1 -0
  11. package/dist/client/app/cache/CacheProvider.jsx +11 -0
  12. package/dist/client/app/config/TranslateKitConfigContext.d.ts +9 -0
  13. package/dist/client/app/config/TranslateKitConfigContext.d.ts.map +1 -0
  14. package/dist/client/app/config/TranslateKitConfigContext.js +23 -0
  15. package/dist/client/app/config/TranslateKitConfigContext.js.map +1 -0
  16. package/dist/client/app/config/TranslateKitConfigContext.jsx +13 -0
  17. package/dist/client/app/config/index.d.ts +3 -0
  18. package/dist/client/app/config/index.d.ts.map +1 -0
  19. package/dist/client/app/config/index.js +3 -0
  20. package/dist/client/app/config/index.js.map +1 -0
  21. package/dist/client/entities/translation/api/mutations/useCancelCollectionTranslations.d.ts +6 -0
  22. package/dist/client/entities/translation/api/mutations/useCancelCollectionTranslations.d.ts.map +1 -0
  23. package/dist/client/entities/translation/api/mutations/useCancelCollectionTranslations.js +27 -0
  24. package/dist/client/entities/translation/api/mutations/useCancelCollectionTranslations.js.map +1 -0
  25. package/dist/client/entities/translation/api/mutations/useCancelDocumentTranslation.d.ts +6 -0
  26. package/dist/client/entities/translation/api/mutations/useCancelDocumentTranslation.d.ts.map +1 -0
  27. package/dist/client/entities/translation/api/mutations/useCancelDocumentTranslation.js +34 -0
  28. package/dist/client/entities/translation/api/mutations/useCancelDocumentTranslation.js.map +1 -0
  29. package/dist/client/entities/translation/api/mutations/useQueueDocumentTranslation.d.ts +13 -0
  30. package/dist/client/entities/translation/api/mutations/useQueueDocumentTranslation.d.ts.map +1 -0
  31. package/dist/client/entities/translation/api/mutations/useQueueDocumentTranslation.js +33 -0
  32. package/dist/client/entities/translation/api/mutations/useQueueDocumentTranslation.js.map +1 -0
  33. package/dist/client/entities/translation/api/mutations/useQueueDocumentTranslations.d.ts +9 -0
  34. package/dist/client/entities/translation/api/mutations/useQueueDocumentTranslations.d.ts.map +1 -0
  35. package/dist/client/entities/translation/api/mutations/useQueueDocumentTranslations.js +20 -0
  36. package/dist/client/entities/translation/api/mutations/useQueueDocumentTranslations.js.map +1 -0
  37. package/dist/client/entities/translation/api/mutations/useRunDocumentTranslation.d.ts +6 -0
  38. package/dist/client/entities/translation/api/mutations/useRunDocumentTranslation.d.ts.map +1 -0
  39. package/dist/client/entities/translation/api/mutations/useRunDocumentTranslation.js +27 -0
  40. package/dist/client/entities/translation/api/mutations/useRunDocumentTranslation.js.map +1 -0
  41. package/dist/client/entities/translation/api/queries/useCollectionTranslationStatus.d.ts +179 -0
  42. package/dist/client/entities/translation/api/queries/useCollectionTranslationStatus.d.ts.map +1 -0
  43. package/dist/client/entities/translation/api/queries/useCollectionTranslationStatus.js +67 -0
  44. package/dist/client/entities/translation/api/queries/useCollectionTranslationStatus.js.map +1 -0
  45. package/dist/client/entities/translation/api/queries/useDocumentTranslation.d.ts +180 -0
  46. package/dist/client/entities/translation/api/queries/useDocumentTranslation.d.ts.map +1 -0
  47. package/dist/client/entities/translation/api/queries/useDocumentTranslation.js +55 -0
  48. package/dist/client/entities/translation/api/queries/useDocumentTranslation.js.map +1 -0
  49. package/dist/client/entities/translation/index.d.ts +21 -0
  50. package/dist/client/entities/translation/index.d.ts.map +1 -0
  51. package/dist/client/entities/translation/index.js +21 -0
  52. package/dist/client/entities/translation/index.js.map +1 -0
  53. package/dist/client/entities/translation/model/enums.d.ts +7 -0
  54. package/dist/client/entities/translation/model/enums.d.ts.map +1 -0
  55. package/dist/client/entities/translation/model/enums.js +9 -0
  56. package/dist/client/entities/translation/model/enums.js.map +1 -0
  57. package/dist/client/entities/translation/model/types.d.ts +48 -0
  58. package/dist/client/entities/translation/model/types.d.ts.map +1 -0
  59. package/dist/client/entities/translation/model/types.js +3 -0
  60. package/dist/client/entities/translation/model/types.js.map +1 -0
  61. package/dist/client/entities/translation/ui/CompletedTranslationStatus/CompletedTranslationStatus.d.ts +8 -0
  62. package/dist/client/entities/translation/ui/CompletedTranslationStatus/CompletedTranslationStatus.d.ts.map +1 -0
  63. package/dist/client/entities/translation/ui/CompletedTranslationStatus/CompletedTranslationStatus.js +45 -0
  64. package/dist/client/entities/translation/ui/CompletedTranslationStatus/CompletedTranslationStatus.js.map +1 -0
  65. package/dist/client/entities/translation/ui/CompletedTranslationStatus/CompletedTranslationStatus.jsx +25 -0
  66. package/dist/client/entities/translation/ui/CompletedTranslationStatus/index.d.ts +2 -0
  67. package/dist/client/entities/translation/ui/CompletedTranslationStatus/index.d.ts.map +1 -0
  68. package/dist/client/entities/translation/ui/CompletedTranslationStatus/index.js +3 -0
  69. package/dist/client/entities/translation/ui/CompletedTranslationStatus/index.js.map +1 -0
  70. package/dist/client/entities/translation/ui/FailedTranslationStatus/FailedTranslationStatus.d.ts +10 -0
  71. package/dist/client/entities/translation/ui/FailedTranslationStatus/FailedTranslationStatus.d.ts.map +1 -0
  72. package/dist/client/entities/translation/ui/FailedTranslationStatus/FailedTranslationStatus.js +54 -0
  73. package/dist/client/entities/translation/ui/FailedTranslationStatus/FailedTranslationStatus.js.map +1 -0
  74. package/dist/client/entities/translation/ui/FailedTranslationStatus/FailedTranslationStatus.jsx +24 -0
  75. package/dist/client/entities/translation/ui/FailedTranslationStatus/index.d.ts +2 -0
  76. package/dist/client/entities/translation/ui/FailedTranslationStatus/index.d.ts.map +1 -0
  77. package/dist/client/entities/translation/ui/FailedTranslationStatus/index.js +3 -0
  78. package/dist/client/entities/translation/ui/FailedTranslationStatus/index.js.map +1 -0
  79. package/dist/client/entities/translation/ui/PendingTranslationStatus/PendingTranslationStatus.d.ts +12 -0
  80. package/dist/client/entities/translation/ui/PendingTranslationStatus/PendingTranslationStatus.d.ts.map +1 -0
  81. package/dist/client/entities/translation/ui/PendingTranslationStatus/PendingTranslationStatus.js +83 -0
  82. package/dist/client/entities/translation/ui/PendingTranslationStatus/PendingTranslationStatus.js.map +1 -0
  83. package/dist/client/entities/translation/ui/PendingTranslationStatus/PendingTranslationStatus.jsx +38 -0
  84. package/dist/client/entities/translation/ui/PendingTranslationStatus/index.d.ts +2 -0
  85. package/dist/client/entities/translation/ui/PendingTranslationStatus/index.d.ts.map +1 -0
  86. package/dist/client/entities/translation/ui/PendingTranslationStatus/index.js +3 -0
  87. package/dist/client/entities/translation/ui/PendingTranslationStatus/index.js.map +1 -0
  88. package/dist/client/entities/translation/ui/RunningTranslationStatus/RunningTranslationStatus.d.ts +11 -0
  89. package/dist/client/entities/translation/ui/RunningTranslationStatus/RunningTranslationStatus.d.ts.map +1 -0
  90. package/dist/client/entities/translation/ui/RunningTranslationStatus/RunningTranslationStatus.js +66 -0
  91. package/dist/client/entities/translation/ui/RunningTranslationStatus/RunningTranslationStatus.js.map +1 -0
  92. package/dist/client/entities/translation/ui/RunningTranslationStatus/RunningTranslationStatus.jsx +32 -0
  93. package/dist/client/entities/translation/ui/RunningTranslationStatus/index.d.ts +2 -0
  94. package/dist/client/entities/translation/ui/RunningTranslationStatus/index.d.ts.map +1 -0
  95. package/dist/client/entities/translation/ui/RunningTranslationStatus/index.js +3 -0
  96. package/dist/client/entities/translation/ui/RunningTranslationStatus/index.js.map +1 -0
  97. package/dist/client/entities/translation/ui/TranslationDirection/TranslationDirection.d.ts +8 -0
  98. package/dist/client/entities/translation/ui/TranslationDirection/TranslationDirection.d.ts.map +1 -0
  99. package/dist/client/entities/translation/ui/TranslationDirection/TranslationDirection.js +28 -0
  100. package/dist/client/entities/translation/ui/TranslationDirection/TranslationDirection.js.map +1 -0
  101. package/dist/client/entities/translation/ui/TranslationDirection/TranslationDirection.jsx +16 -0
  102. package/dist/client/entities/translation/ui/TranslationDirection/index.d.ts +2 -0
  103. package/dist/client/entities/translation/ui/TranslationDirection/index.d.ts.map +1 -0
  104. package/dist/client/entities/translation/ui/TranslationDirection/index.js +3 -0
  105. package/dist/client/entities/translation/ui/TranslationDirection/index.js.map +1 -0
  106. package/dist/client/features/collection-translation-form/index.client.d.ts +2 -0
  107. package/dist/client/features/collection-translation-form/index.client.d.ts.map +1 -0
  108. package/dist/client/features/collection-translation-form/index.client.js +3 -0
  109. package/dist/client/features/collection-translation-form/index.client.js.map +1 -0
  110. package/dist/client/features/collection-translation-form/index.d.ts +4 -0
  111. package/dist/client/features/collection-translation-form/index.d.ts.map +1 -0
  112. package/dist/client/features/collection-translation-form/index.js +4 -0
  113. package/dist/client/features/collection-translation-form/index.js.map +1 -0
  114. package/dist/client/features/collection-translation-form/model/constants.d.ts +16 -0
  115. package/dist/client/features/collection-translation-form/model/constants.d.ts.map +1 -0
  116. package/dist/client/features/collection-translation-form/model/constants.js +16 -0
  117. package/dist/client/features/collection-translation-form/model/constants.js.map +1 -0
  118. package/dist/client/features/collection-translation-form/model/form-model.d.ts +12 -0
  119. package/dist/client/features/collection-translation-form/model/form-model.d.ts.map +1 -0
  120. package/dist/client/features/collection-translation-form/model/form-model.js +32 -0
  121. package/dist/client/features/collection-translation-form/model/form-model.js.map +1 -0
  122. package/dist/client/features/collection-translation-form/model/index.d.ts +9 -0
  123. package/dist/client/features/collection-translation-form/model/index.d.ts.map +1 -0
  124. package/dist/client/features/collection-translation-form/model/index.js +6 -0
  125. package/dist/client/features/collection-translation-form/model/index.js.map +1 -0
  126. package/dist/client/features/collection-translation-form/model/schema.d.ts +23 -0
  127. package/dist/client/features/collection-translation-form/model/schema.d.ts.map +1 -0
  128. package/dist/client/features/collection-translation-form/model/schema.js +14 -0
  129. package/dist/client/features/collection-translation-form/model/schema.js.map +1 -0
  130. package/dist/client/features/collection-translation-form/ui/CollectionTranslationForm.d.ts +11 -0
  131. package/dist/client/features/collection-translation-form/ui/CollectionTranslationForm.d.ts.map +1 -0
  132. package/dist/client/features/collection-translation-form/ui/CollectionTranslationForm.js +64 -0
  133. package/dist/client/features/collection-translation-form/ui/CollectionTranslationForm.js.map +1 -0
  134. package/dist/client/features/collection-translation-form/ui/CollectionTranslationForm.jsx +25 -0
  135. package/dist/client/features/collection-translation-form/ui/index.d.ts +2 -0
  136. package/dist/client/features/collection-translation-form/ui/index.d.ts.map +1 -0
  137. package/dist/client/features/collection-translation-form/ui/index.js +3 -0
  138. package/dist/client/features/collection-translation-form/ui/index.js.map +1 -0
  139. package/dist/client/features/collection-translation-popup/index.d.ts +2 -0
  140. package/dist/client/features/collection-translation-popup/index.d.ts.map +1 -0
  141. package/dist/client/features/collection-translation-popup/index.js +3 -0
  142. package/dist/client/features/collection-translation-popup/index.js.map +1 -0
  143. package/dist/client/features/collection-translation-popup/ui/CollectionTranslationPopup.d.ts +8 -0
  144. package/dist/client/features/collection-translation-popup/ui/CollectionTranslationPopup.d.ts.map +1 -0
  145. package/dist/client/features/collection-translation-popup/ui/CollectionTranslationPopup.js +48 -0
  146. package/dist/client/features/collection-translation-popup/ui/CollectionTranslationPopup.js.map +1 -0
  147. package/dist/client/features/collection-translation-popup/ui/CollectionTranslationPopup.jsx +23 -0
  148. package/dist/client/features/collection-translation-progress/index.d.ts +2 -0
  149. package/dist/client/features/collection-translation-progress/index.d.ts.map +1 -0
  150. package/dist/client/features/collection-translation-progress/index.js +3 -0
  151. package/dist/client/features/collection-translation-progress/index.js.map +1 -0
  152. package/dist/client/features/collection-translation-progress/ui/CollectionTranslationProgress.d.ts +9 -0
  153. package/dist/client/features/collection-translation-progress/ui/CollectionTranslationProgress.d.ts.map +1 -0
  154. package/dist/client/features/collection-translation-progress/ui/CollectionTranslationProgress.js +108 -0
  155. package/dist/client/features/collection-translation-progress/ui/CollectionTranslationProgress.js.map +1 -0
  156. package/dist/client/features/collection-translation-progress/ui/CollectionTranslationProgress.jsx +47 -0
  157. package/dist/client/features/document-translation-progress-failed/index.d.ts +2 -0
  158. package/dist/client/features/document-translation-progress-failed/index.d.ts.map +1 -0
  159. package/dist/client/features/document-translation-progress-failed/index.js +3 -0
  160. package/dist/client/features/document-translation-progress-failed/index.js.map +1 -0
  161. package/dist/client/features/document-translation-progress-failed/ui/DocumentTranslationProgressFailed.d.ts +7 -0
  162. package/dist/client/features/document-translation-progress-failed/ui/DocumentTranslationProgressFailed.d.ts.map +1 -0
  163. package/dist/client/features/document-translation-progress-failed/ui/DocumentTranslationProgressFailed.js +28 -0
  164. package/dist/client/features/document-translation-progress-failed/ui/DocumentTranslationProgressFailed.js.map +1 -0
  165. package/dist/client/features/document-translation-progress-failed/ui/DocumentTranslationProgressFailed.jsx +19 -0
  166. package/dist/client/features/document-translation-progress-pending/index.d.ts +2 -0
  167. package/dist/client/features/document-translation-progress-pending/index.d.ts.map +1 -0
  168. package/dist/client/features/document-translation-progress-pending/index.js +3 -0
  169. package/dist/client/features/document-translation-progress-pending/index.js.map +1 -0
  170. package/dist/client/features/document-translation-progress-pending/ui/DocumentTranslationProgressPending.d.ts +7 -0
  171. package/dist/client/features/document-translation-progress-pending/ui/DocumentTranslationProgressPending.d.ts.map +1 -0
  172. package/dist/client/features/document-translation-progress-pending/ui/DocumentTranslationProgressPending.js +44 -0
  173. package/dist/client/features/document-translation-progress-pending/ui/DocumentTranslationProgressPending.js.map +1 -0
  174. package/dist/client/features/document-translation-progress-pending/ui/DocumentTranslationProgressPending.jsx +34 -0
  175. package/dist/client/features/document-translation-progress-running/index.d.ts +2 -0
  176. package/dist/client/features/document-translation-progress-running/index.d.ts.map +1 -0
  177. package/dist/client/features/document-translation-progress-running/index.js +3 -0
  178. package/dist/client/features/document-translation-progress-running/index.js.map +1 -0
  179. package/dist/client/features/document-translation-progress-running/ui/DocumentTranslationProgressRunning.d.ts +7 -0
  180. package/dist/client/features/document-translation-progress-running/ui/DocumentTranslationProgressRunning.d.ts.map +1 -0
  181. package/dist/client/features/document-translation-progress-running/ui/DocumentTranslationProgressRunning.js +28 -0
  182. package/dist/client/features/document-translation-progress-running/ui/DocumentTranslationProgressRunning.js.map +1 -0
  183. package/dist/client/features/document-translation-progress-running/ui/DocumentTranslationProgressRunning.jsx +19 -0
  184. package/dist/client/features/open-document-translation-popup/index.d.ts +2 -0
  185. package/dist/client/features/open-document-translation-popup/index.d.ts.map +1 -0
  186. package/dist/client/features/open-document-translation-popup/index.js +3 -0
  187. package/dist/client/features/open-document-translation-popup/index.js.map +1 -0
  188. package/dist/client/features/open-document-translation-popup/ui/OpenDocumentTranslationPopup.d.ts +10 -0
  189. package/dist/client/features/open-document-translation-popup/ui/OpenDocumentTranslationPopup.d.ts.map +1 -0
  190. package/dist/client/features/open-document-translation-popup/ui/OpenDocumentTranslationPopup.js +35 -0
  191. package/dist/client/features/open-document-translation-popup/ui/OpenDocumentTranslationPopup.js.map +1 -0
  192. package/dist/client/features/open-document-translation-popup/ui/OpenDocumentTranslationPopup.jsx +15 -0
  193. package/dist/client/features/translate-document-form/index.client.d.ts +2 -0
  194. package/dist/client/features/translate-document-form/index.client.d.ts.map +1 -0
  195. package/dist/client/features/translate-document-form/index.client.js +3 -0
  196. package/dist/client/features/translate-document-form/index.client.js.map +1 -0
  197. package/dist/client/features/translate-document-form/index.d.ts +4 -0
  198. package/dist/client/features/translate-document-form/index.d.ts.map +1 -0
  199. package/dist/client/features/translate-document-form/index.js +4 -0
  200. package/dist/client/features/translate-document-form/index.js.map +1 -0
  201. package/dist/client/features/translate-document-form/model/constants.d.ts +18 -0
  202. package/dist/client/features/translate-document-form/model/constants.d.ts.map +1 -0
  203. package/dist/client/features/translate-document-form/model/constants.js +18 -0
  204. package/dist/client/features/translate-document-form/model/constants.js.map +1 -0
  205. package/dist/client/features/translate-document-form/model/form-model.d.ts +12 -0
  206. package/dist/client/features/translate-document-form/model/form-model.d.ts.map +1 -0
  207. package/dist/client/features/translate-document-form/model/form-model.js +32 -0
  208. package/dist/client/features/translate-document-form/model/form-model.js.map +1 -0
  209. package/dist/client/features/translate-document-form/model/index.d.ts +9 -0
  210. package/dist/client/features/translate-document-form/model/index.d.ts.map +1 -0
  211. package/dist/client/features/translate-document-form/model/index.js +6 -0
  212. package/dist/client/features/translate-document-form/model/index.js.map +1 -0
  213. package/dist/client/features/translate-document-form/model/schema.d.ts +26 -0
  214. package/dist/client/features/translate-document-form/model/schema.d.ts.map +1 -0
  215. package/dist/client/features/translate-document-form/model/schema.js +15 -0
  216. package/dist/client/features/translate-document-form/model/schema.js.map +1 -0
  217. package/dist/client/features/translate-document-form/ui/DocumentTranslationForm.d.ts +10 -0
  218. package/dist/client/features/translate-document-form/ui/DocumentTranslationForm.d.ts.map +1 -0
  219. package/dist/client/features/translate-document-form/ui/DocumentTranslationForm.js +57 -0
  220. package/dist/client/features/translate-document-form/ui/DocumentTranslationForm.js.map +1 -0
  221. package/dist/client/features/translate-document-form/ui/DocumentTranslationForm.jsx +24 -0
  222. package/dist/client/features/translate-document-form/ui/index.d.ts +2 -0
  223. package/dist/client/features/translate-document-form/ui/index.d.ts.map +1 -0
  224. package/dist/client/features/translate-document-form/ui/index.js +3 -0
  225. package/dist/client/features/translate-document-form/ui/index.js.map +1 -0
  226. package/dist/client/shared/lib/assets/icons/LanguageTranslateIcon.d.ts +2 -0
  227. package/dist/client/shared/lib/assets/icons/LanguageTranslateIcon.d.ts.map +1 -0
  228. package/dist/client/shared/lib/assets/icons/LanguageTranslateIcon.js +18 -0
  229. package/dist/client/shared/lib/assets/icons/LanguageTranslateIcon.js.map +1 -0
  230. package/dist/client/shared/lib/assets/icons/LanguageTranslateIcon.jsx +4 -0
  231. package/dist/client/shared/lib/assets/icons/QuestionCircleIcon.d.ts +2 -0
  232. package/dist/client/shared/lib/assets/icons/QuestionCircleIcon.d.ts.map +1 -0
  233. package/dist/client/shared/lib/assets/icons/QuestionCircleIcon.js +16 -0
  234. package/dist/client/shared/lib/assets/icons/QuestionCircleIcon.js.map +1 -0
  235. package/dist/client/shared/lib/assets/icons/QuestionCircleIcon.jsx +3 -0
  236. package/dist/client/shared/lib/assets/icons/ReloadIcon.d.ts +2 -0
  237. package/dist/client/shared/lib/assets/icons/ReloadIcon.d.ts.map +1 -0
  238. package/dist/client/shared/lib/assets/icons/ReloadIcon.js +14 -0
  239. package/dist/client/shared/lib/assets/icons/ReloadIcon.js.map +1 -0
  240. package/dist/client/shared/lib/assets/icons/ReloadIcon.jsx +3 -0
  241. package/dist/client/shared/lib/errors/handleApiError.d.ts +8 -0
  242. package/dist/client/shared/lib/errors/handleApiError.d.ts.map +1 -0
  243. package/dist/client/shared/lib/errors/handleApiError.js +24 -0
  244. package/dist/client/shared/lib/errors/handleApiError.js.map +1 -0
  245. package/dist/client/shared/lib/forms/handle-form-error.d.ts +3 -0
  246. package/dist/client/shared/lib/forms/handle-form-error.d.ts.map +1 -0
  247. package/dist/client/shared/lib/forms/handle-form-error.js +26 -0
  248. package/dist/client/shared/lib/forms/handle-form-error.js.map +1 -0
  249. package/dist/client/shared/lib/payload/hooks/useCollectionDashboardUrlParams.d.ts +7 -0
  250. package/dist/client/shared/lib/payload/hooks/useCollectionDashboardUrlParams.d.ts.map +1 -0
  251. package/dist/client/shared/lib/payload/hooks/useCollectionDashboardUrlParams.js +12 -0
  252. package/dist/client/shared/lib/payload/hooks/useCollectionDashboardUrlParams.js.map +1 -0
  253. package/dist/client/shared/lib/payload/hooks/useCollectionDocumentUrlParams.d.ts +9 -0
  254. package/dist/client/shared/lib/payload/hooks/useCollectionDocumentUrlParams.d.ts.map +1 -0
  255. package/dist/client/shared/lib/payload/hooks/useCollectionDocumentUrlParams.js +14 -0
  256. package/dist/client/shared/lib/payload/hooks/useCollectionDocumentUrlParams.js.map +1 -0
  257. package/dist/client/shared/lib/payload/hooks/useLocaleOptions.d.ts +5 -0
  258. package/dist/client/shared/lib/payload/hooks/useLocaleOptions.d.ts.map +1 -0
  259. package/dist/client/shared/lib/payload/hooks/useLocaleOptions.js +13 -0
  260. package/dist/client/shared/lib/payload/hooks/useLocaleOptions.js.map +1 -0
  261. package/dist/client/shared/lib/utils/errors/handleApiError.d.ts +8 -0
  262. package/dist/client/shared/lib/utils/errors/handleApiError.d.ts.map +1 -0
  263. package/dist/client/shared/lib/utils/errors/handleApiError.js +24 -0
  264. package/dist/client/shared/lib/utils/errors/handleApiError.js.map +1 -0
  265. package/dist/client/shared/lib/utils/react/useToggle.d.ts +7 -0
  266. package/dist/client/shared/lib/utils/react/useToggle.d.ts.map +1 -0
  267. package/dist/client/shared/lib/utils/react/useToggle.js +24 -0
  268. package/dist/client/shared/lib/utils/react/useToggle.js.map +1 -0
  269. package/dist/client/shared/providers/CacheClientProvider/CacheClientProvider.factory.d.ts +32 -0
  270. package/dist/client/shared/providers/CacheClientProvider/CacheClientProvider.factory.d.ts.map +1 -0
  271. package/dist/client/shared/providers/CacheClientProvider/CacheClientProvider.factory.js +66 -0
  272. package/dist/client/shared/providers/CacheClientProvider/CacheClientProvider.factory.js.map +1 -0
  273. package/dist/client/shared/providers/CacheClientProvider/index.d.ts +2 -0
  274. package/dist/client/shared/providers/CacheClientProvider/index.d.ts.map +1 -0
  275. package/dist/client/shared/providers/CacheClientProvider/index.js +3 -0
  276. package/dist/client/shared/providers/CacheClientProvider/index.js.map +1 -0
  277. package/dist/client/shared/types/AccessGuard.d.ts +12 -0
  278. package/dist/client/shared/types/AccessGuard.d.ts.map +1 -0
  279. package/dist/client/shared/types/AccessGuard.js +3 -0
  280. package/dist/client/shared/types/AccessGuard.js.map +1 -0
  281. package/dist/client/shared/types/PayloadComponentExport.d.ts +3 -0
  282. package/dist/client/shared/types/PayloadComponentExport.d.ts.map +1 -0
  283. package/dist/client/shared/types/PayloadComponentExport.js +3 -0
  284. package/dist/client/shared/types/PayloadComponentExport.js.map +1 -0
  285. package/dist/client/shared/ui/Alert/Alert.d.ts +10 -0
  286. package/dist/client/shared/ui/Alert/Alert.d.ts.map +1 -0
  287. package/dist/client/shared/ui/Alert/Alert.js +40 -0
  288. package/dist/client/shared/ui/Alert/Alert.js.map +1 -0
  289. package/dist/client/shared/ui/Alert/Alert.jsx +33 -0
  290. package/dist/client/shared/ui/Alert/index.d.ts +2 -0
  291. package/dist/client/shared/ui/Alert/index.d.ts.map +1 -0
  292. package/dist/client/shared/ui/Alert/index.js +3 -0
  293. package/dist/client/shared/ui/Alert/index.js.map +1 -0
  294. package/dist/client/shared/ui/Button/Button.d.ts +12 -0
  295. package/dist/client/shared/ui/Button/Button.d.ts.map +1 -0
  296. package/dist/client/shared/ui/Button/Button.js +47 -0
  297. package/dist/client/shared/ui/Button/Button.js.map +1 -0
  298. package/dist/client/shared/ui/Button/Button.jsx +35 -0
  299. package/dist/client/shared/ui/Button/index.d.ts +2 -0
  300. package/dist/client/shared/ui/Button/index.d.ts.map +1 -0
  301. package/dist/client/shared/ui/Button/index.js +3 -0
  302. package/dist/client/shared/ui/Button/index.js.map +1 -0
  303. package/dist/client/shared/ui/Checkbox/Checkbox.d.ts +7 -0
  304. package/dist/client/shared/ui/Checkbox/Checkbox.d.ts.map +1 -0
  305. package/dist/client/shared/ui/Checkbox/Checkbox.js +14 -0
  306. package/dist/client/shared/ui/Checkbox/Checkbox.js.map +1 -0
  307. package/dist/client/shared/ui/Checkbox/Checkbox.jsx +6 -0
  308. package/dist/client/shared/ui/Checkbox/index.d.ts +2 -0
  309. package/dist/client/shared/ui/Checkbox/index.d.ts.map +1 -0
  310. package/dist/client/shared/ui/Checkbox/index.js +3 -0
  311. package/dist/client/shared/ui/Checkbox/index.js.map +1 -0
  312. package/dist/client/shared/ui/ColorIndicator/ColorIndicator.d.ts +9 -0
  313. package/dist/client/shared/ui/ColorIndicator/ColorIndicator.d.ts.map +1 -0
  314. package/dist/client/shared/ui/ColorIndicator/ColorIndicator.js +13 -0
  315. package/dist/client/shared/ui/ColorIndicator/ColorIndicator.js.map +1 -0
  316. package/dist/client/shared/ui/ColorIndicator/ColorIndicator.jsx +7 -0
  317. package/dist/client/shared/ui/ColorIndicator/index.d.ts +2 -0
  318. package/dist/client/shared/ui/ColorIndicator/index.d.ts.map +1 -0
  319. package/dist/client/shared/ui/ColorIndicator/index.js +3 -0
  320. package/dist/client/shared/ui/ColorIndicator/index.js.map +1 -0
  321. package/dist/client/shared/ui/Description/Description.d.ts +8 -0
  322. package/dist/client/shared/ui/Description/Description.d.ts.map +1 -0
  323. package/dist/client/shared/ui/Description/Description.js +15 -0
  324. package/dist/client/shared/ui/Description/Description.js.map +1 -0
  325. package/dist/client/shared/ui/Description/Description.jsx +7 -0
  326. package/dist/client/shared/ui/Description/index.d.ts +2 -0
  327. package/dist/client/shared/ui/Description/index.d.ts.map +1 -0
  328. package/dist/client/shared/ui/Description/index.js +3 -0
  329. package/dist/client/shared/ui/Description/index.js.map +1 -0
  330. package/dist/client/shared/ui/Divider/Divider.d.ts +11 -0
  331. package/dist/client/shared/ui/Divider/Divider.d.ts.map +1 -0
  332. package/dist/client/shared/ui/Divider/Divider.js +17 -0
  333. package/dist/client/shared/ui/Divider/Divider.js.map +1 -0
  334. package/dist/client/shared/ui/Divider/Divider.jsx +7 -0
  335. package/dist/client/shared/ui/Divider/index.d.ts +2 -0
  336. package/dist/client/shared/ui/Divider/index.d.ts.map +1 -0
  337. package/dist/client/shared/ui/Divider/index.js +3 -0
  338. package/dist/client/shared/ui/Divider/index.js.map +1 -0
  339. package/dist/client/shared/ui/Label/Label.d.ts +7 -0
  340. package/dist/client/shared/ui/Label/Label.d.ts.map +1 -0
  341. package/dist/client/shared/ui/Label/Label.js +20 -0
  342. package/dist/client/shared/ui/Label/Label.js.map +1 -0
  343. package/dist/client/shared/ui/Label/Label.jsx +9 -0
  344. package/dist/client/shared/ui/Label/index.d.ts +2 -0
  345. package/dist/client/shared/ui/Label/index.d.ts.map +1 -0
  346. package/dist/client/shared/ui/Label/index.js +3 -0
  347. package/dist/client/shared/ui/Label/index.js.map +1 -0
  348. package/dist/client/shared/ui/Loading/Loading.d.ts +8 -0
  349. package/dist/client/shared/ui/Loading/Loading.d.ts.map +1 -0
  350. package/dist/client/shared/ui/Loading/Loading.js +26 -0
  351. package/dist/client/shared/ui/Loading/Loading.js.map +1 -0
  352. package/dist/client/shared/ui/Loading/Loading.jsx +11 -0
  353. package/dist/client/shared/ui/Loading/index.d.ts +2 -0
  354. package/dist/client/shared/ui/Loading/index.d.ts.map +1 -0
  355. package/dist/client/shared/ui/Loading/index.js +3 -0
  356. package/dist/client/shared/ui/Loading/index.js.map +1 -0
  357. package/dist/client/shared/ui/Popup/Popup.d.ts +11 -0
  358. package/dist/client/shared/ui/Popup/Popup.d.ts.map +1 -0
  359. package/dist/client/shared/ui/Popup/Popup.js +27 -0
  360. package/dist/client/shared/ui/Popup/Popup.js.map +1 -0
  361. package/dist/client/shared/ui/Popup/Popup.jsx +13 -0
  362. package/dist/client/shared/ui/Popup/index.d.ts +2 -0
  363. package/dist/client/shared/ui/Popup/index.d.ts.map +1 -0
  364. package/dist/client/shared/ui/Popup/index.js +3 -0
  365. package/dist/client/shared/ui/Popup/index.js.map +1 -0
  366. package/dist/client/shared/ui/ProgressBar/ProgressBar.d.ts +10 -0
  367. package/dist/client/shared/ui/ProgressBar/ProgressBar.d.ts.map +1 -0
  368. package/dist/client/shared/ui/ProgressBar/ProgressBar.js +29 -0
  369. package/dist/client/shared/ui/ProgressBar/ProgressBar.js.map +1 -0
  370. package/dist/client/shared/ui/ProgressBar/ProgressBar.jsx +11 -0
  371. package/dist/client/shared/ui/ProgressBar/index.d.ts +2 -0
  372. package/dist/client/shared/ui/ProgressBar/index.d.ts.map +1 -0
  373. package/dist/client/shared/ui/ProgressBar/index.js +3 -0
  374. package/dist/client/shared/ui/ProgressBar/index.js.map +1 -0
  375. package/dist/client/shared/ui/Select/Select.d.ts +20 -0
  376. package/dist/client/shared/ui/Select/Select.d.ts.map +1 -0
  377. package/dist/client/shared/ui/Select/Select.js +54 -0
  378. package/dist/client/shared/ui/Select/Select.js.map +1 -0
  379. package/dist/client/shared/ui/Select/Select.jsx +41 -0
  380. package/dist/client/shared/ui/Select/index.d.ts +2 -0
  381. package/dist/client/shared/ui/Select/index.d.ts.map +1 -0
  382. package/dist/client/shared/ui/Select/index.js +3 -0
  383. package/dist/client/shared/ui/Select/index.js.map +1 -0
  384. package/dist/client/shared/ui/StatusCounter/StatusCounter.d.ts +11 -0
  385. package/dist/client/shared/ui/StatusCounter/StatusCounter.d.ts.map +1 -0
  386. package/dist/client/shared/ui/StatusCounter/StatusCounter.js +45 -0
  387. package/dist/client/shared/ui/StatusCounter/StatusCounter.js.map +1 -0
  388. package/dist/client/shared/ui/StatusCounter/StatusCounter.jsx +26 -0
  389. package/dist/client/shared/ui/StatusCounter/index.d.ts +2 -0
  390. package/dist/client/shared/ui/StatusCounter/index.d.ts.map +1 -0
  391. package/dist/client/shared/ui/StatusCounter/index.js +3 -0
  392. package/dist/client/shared/ui/StatusCounter/index.js.map +1 -0
  393. package/dist/client/shared/ui/StatusIndicator/StatusIndicator.d.ts +10 -0
  394. package/dist/client/shared/ui/StatusIndicator/StatusIndicator.d.ts.map +1 -0
  395. package/dist/client/shared/ui/StatusIndicator/StatusIndicator.js +20 -0
  396. package/dist/client/shared/ui/StatusIndicator/StatusIndicator.js.map +1 -0
  397. package/dist/client/shared/ui/StatusIndicator/StatusIndicator.jsx +10 -0
  398. package/dist/client/shared/ui/StatusIndicator/index.d.ts +2 -0
  399. package/dist/client/shared/ui/StatusIndicator/index.d.ts.map +1 -0
  400. package/dist/client/shared/ui/StatusIndicator/index.js +3 -0
  401. package/dist/client/shared/ui/StatusIndicator/index.js.map +1 -0
  402. package/dist/client/shared/ui/Tooltip/Tooltip.d.ts +11 -0
  403. package/dist/client/shared/ui/Tooltip/Tooltip.d.ts.map +1 -0
  404. package/dist/client/shared/ui/Tooltip/Tooltip.js +32 -0
  405. package/dist/client/shared/ui/Tooltip/Tooltip.js.map +1 -0
  406. package/dist/client/shared/ui/Tooltip/Tooltip.jsx +16 -0
  407. package/dist/client/shared/ui/Tooltip/index.d.ts +2 -0
  408. package/dist/client/shared/ui/Tooltip/index.d.ts.map +1 -0
  409. package/dist/client/shared/ui/Tooltip/index.js +3 -0
  410. package/dist/client/shared/ui/Tooltip/index.js.map +1 -0
  411. package/dist/client/shared/ui/form/FormCheckbox/FormCheckbox.d.ts +11 -0
  412. package/dist/client/shared/ui/form/FormCheckbox/FormCheckbox.d.ts.map +1 -0
  413. package/dist/client/shared/ui/form/FormCheckbox/FormCheckbox.js +51 -0
  414. package/dist/client/shared/ui/form/FormCheckbox/FormCheckbox.js.map +1 -0
  415. package/dist/client/shared/ui/form/FormCheckbox/FormCheckbox.jsx +24 -0
  416. package/dist/client/shared/ui/form/FormCheckbox/index.d.ts +2 -0
  417. package/dist/client/shared/ui/form/FormCheckbox/index.d.ts.map +1 -0
  418. package/dist/client/shared/ui/form/FormCheckbox/index.js +3 -0
  419. package/dist/client/shared/ui/form/FormCheckbox/index.js.map +1 -0
  420. package/dist/client/shared/ui/form/FormCheckboxPublish/FormCheckboxPublish.d.ts +8 -0
  421. package/dist/client/shared/ui/form/FormCheckboxPublish/FormCheckboxPublish.d.ts.map +1 -0
  422. package/dist/client/shared/ui/form/FormCheckboxPublish/FormCheckboxPublish.js +37 -0
  423. package/dist/client/shared/ui/form/FormCheckboxPublish/FormCheckboxPublish.js.map +1 -0
  424. package/dist/client/shared/ui/form/FormCheckboxPublish/FormCheckboxPublish.jsx +21 -0
  425. package/dist/client/shared/ui/form/FormCheckboxPublish/index.d.ts +2 -0
  426. package/dist/client/shared/ui/form/FormCheckboxPublish/index.d.ts.map +1 -0
  427. package/dist/client/shared/ui/form/FormCheckboxPublish/index.js +3 -0
  428. package/dist/client/shared/ui/form/FormCheckboxPublish/index.js.map +1 -0
  429. package/dist/client/shared/ui/form/FormSelect/FormSelect.d.ts +20 -0
  430. package/dist/client/shared/ui/form/FormSelect/FormSelect.d.ts.map +1 -0
  431. package/dist/client/shared/ui/form/FormSelect/FormSelect.js +88 -0
  432. package/dist/client/shared/ui/form/FormSelect/FormSelect.js.map +1 -0
  433. package/dist/client/shared/ui/form/FormSelect/FormSelect.jsx +44 -0
  434. package/dist/client/shared/ui/form/FormSelect/index.d.ts +2 -0
  435. package/dist/client/shared/ui/form/FormSelect/index.d.ts.map +1 -0
  436. package/dist/client/shared/ui/form/FormSelect/index.js +3 -0
  437. package/dist/client/shared/ui/form/FormSelect/index.js.map +1 -0
  438. package/dist/client/shared/ui/form/FormSelectLocale/FormSelectLocale.d.ts +12 -0
  439. package/dist/client/shared/ui/form/FormSelectLocale/FormSelectLocale.d.ts.map +1 -0
  440. package/dist/client/shared/ui/form/FormSelectLocale/FormSelectLocale.js +19 -0
  441. package/dist/client/shared/ui/form/FormSelectLocale/FormSelectLocale.js.map +1 -0
  442. package/dist/client/shared/ui/form/FormSelectLocale/FormSelectLocale.jsx +6 -0
  443. package/dist/client/shared/ui/form/FormSelectLocale/index.d.ts +2 -0
  444. package/dist/client/shared/ui/form/FormSelectLocale/index.d.ts.map +1 -0
  445. package/dist/client/shared/ui/form/FormSelectLocale/index.js +3 -0
  446. package/dist/client/shared/ui/form/FormSelectLocale/index.js.map +1 -0
  447. package/dist/client/shared/ui/form/FormSelectStrategy/FormSelectStrategy.d.ts +19 -0
  448. package/dist/client/shared/ui/form/FormSelectStrategy/FormSelectStrategy.d.ts.map +1 -0
  449. package/dist/client/shared/ui/form/FormSelectStrategy/FormSelectStrategy.js +59 -0
  450. package/dist/client/shared/ui/form/FormSelectStrategy/FormSelectStrategy.js.map +1 -0
  451. package/dist/client/shared/ui/form/FormSelectStrategy/FormSelectStrategy.jsx +25 -0
  452. package/dist/client/shared/ui/form/FormSelectStrategy/index.d.ts +3 -0
  453. package/dist/client/shared/ui/form/FormSelectStrategy/index.d.ts.map +1 -0
  454. package/dist/client/shared/ui/form/FormSelectStrategy/index.js +3 -0
  455. package/dist/client/shared/ui/form/FormSelectStrategy/index.js.map +1 -0
  456. package/dist/client/shared/utils/componentPath.d.ts +6 -0
  457. package/dist/client/shared/utils/componentPath.d.ts.map +1 -0
  458. package/dist/client/shared/utils/componentPath.js +9 -0
  459. package/dist/client/shared/utils/componentPath.js.map +1 -0
  460. package/dist/client/widgets/bulk-translation-dashboard/index.d.ts +2 -0
  461. package/dist/client/widgets/bulk-translation-dashboard/index.d.ts.map +1 -0
  462. package/dist/client/widgets/bulk-translation-dashboard/index.js +3 -0
  463. package/dist/client/widgets/bulk-translation-dashboard/index.js.map +1 -0
  464. package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.d.ts +6 -0
  465. package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.d.ts.map +1 -0
  466. package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.export.d.ts +9 -0
  467. package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.export.d.ts.map +1 -0
  468. package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.export.js +15 -0
  469. package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.export.js.map +1 -0
  470. package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.export.jsx +11 -0
  471. package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.js +78 -0
  472. package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.js.map +1 -0
  473. package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.jsx +55 -0
  474. package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.server.d.ts +8 -0
  475. package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.server.d.ts.map +1 -0
  476. package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.server.js +24 -0
  477. package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.server.js.map +1 -0
  478. package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.server.jsx +17 -0
  479. package/dist/client/widgets/bulk-translation-dashboard/ui/index.d.ts +2 -0
  480. package/dist/client/widgets/bulk-translation-dashboard/ui/index.d.ts.map +1 -0
  481. package/dist/client/widgets/bulk-translation-dashboard/ui/index.js +3 -0
  482. package/dist/client/widgets/bulk-translation-dashboard/ui/index.js.map +1 -0
  483. package/dist/client/widgets/translate-document/index.d.ts +2 -0
  484. package/dist/client/widgets/translate-document/index.d.ts.map +1 -0
  485. package/dist/client/widgets/translate-document/index.js +3 -0
  486. package/dist/client/widgets/translate-document/index.js.map +1 -0
  487. package/dist/client/widgets/translate-document/ui/TranslateDocument.d.ts +6 -0
  488. package/dist/client/widgets/translate-document/ui/TranslateDocument.d.ts.map +1 -0
  489. package/dist/client/widgets/translate-document/ui/TranslateDocument.export.d.ts +11 -0
  490. package/dist/client/widgets/translate-document/ui/TranslateDocument.export.d.ts.map +1 -0
  491. package/dist/client/widgets/translate-document/ui/TranslateDocument.export.js +18 -0
  492. package/dist/client/widgets/translate-document/ui/TranslateDocument.export.js.map +1 -0
  493. package/dist/client/widgets/translate-document/ui/TranslateDocument.js +87 -0
  494. package/dist/client/widgets/translate-document/ui/TranslateDocument.js.map +1 -0
  495. package/dist/client/widgets/translate-document/ui/TranslateDocument.jsx +55 -0
  496. package/dist/client/widgets/translate-document/ui/TranslateDocument.server.d.ts +9 -0
  497. package/dist/client/widgets/translate-document/ui/TranslateDocument.server.d.ts.map +1 -0
  498. package/dist/client/widgets/translate-document/ui/TranslateDocument.server.js +23 -0
  499. package/dist/client/widgets/translate-document/ui/TranslateDocument.server.js.map +1 -0
  500. package/dist/client/widgets/translate-document/ui/TranslateDocument.server.jsx +16 -0
  501. package/dist/client/widgets/translate-document/ui/index.d.ts +2 -0
  502. package/dist/client/widgets/translate-document/ui/index.d.ts.map +1 -0
  503. package/dist/client/widgets/translate-document/ui/index.js +3 -0
  504. package/dist/client/widgets/translate-document/ui/index.js.map +1 -0
  505. package/dist/field-config.d.ts +48 -0
  506. package/dist/field-config.d.ts.map +1 -0
  507. package/dist/field-config.js +49 -0
  508. package/dist/field-config.js.map +1 -0
  509. package/dist/index.d.ts +15 -0
  510. package/dist/index.d.ts.map +1 -0
  511. package/dist/index.js +14 -0
  512. package/dist/index.js.map +1 -0
  513. package/dist/plugin.d.ts +63 -0
  514. package/dist/plugin.d.ts.map +1 -0
  515. package/dist/plugin.js +110 -0
  516. package/dist/plugin.js.map +1 -0
  517. package/dist/server/features/_lib/collection-utils.d.ts +10 -0
  518. package/dist/server/features/_lib/collection-utils.d.ts.map +1 -0
  519. package/dist/server/features/_lib/collection-utils.js +20 -0
  520. package/dist/server/features/_lib/collection-utils.js.map +1 -0
  521. package/dist/server/features/_lib/index.d.ts +2 -0
  522. package/dist/server/features/_lib/index.d.ts.map +1 -0
  523. package/dist/server/features/_lib/index.js +3 -0
  524. package/dist/server/features/_lib/index.js.map +1 -0
  525. package/dist/server/features/cancel/handler.d.ts +11 -0
  526. package/dist/server/features/cancel/handler.d.ts.map +1 -0
  527. package/dist/server/features/cancel/handler.js +20 -0
  528. package/dist/server/features/cancel/handler.js.map +1 -0
  529. package/dist/server/features/cancel/handler.test.d.ts +2 -0
  530. package/dist/server/features/cancel/handler.test.d.ts.map +1 -0
  531. package/dist/server/features/cancel/handler.test.js +63 -0
  532. package/dist/server/features/cancel/index.d.ts +2 -0
  533. package/dist/server/features/cancel/index.d.ts.map +1 -0
  534. package/dist/server/features/cancel/index.js +3 -0
  535. package/dist/server/features/cancel/index.js.map +1 -0
  536. package/dist/server/features/cancel/model.d.ts +12 -0
  537. package/dist/server/features/cancel/model.d.ts.map +1 -0
  538. package/dist/server/features/cancel/model.js +8 -0
  539. package/dist/server/features/cancel/model.js.map +1 -0
  540. package/dist/server/features/cancel/route.d.ts +8 -0
  541. package/dist/server/features/cancel/route.d.ts.map +1 -0
  542. package/dist/server/features/cancel/route.js +14 -0
  543. package/dist/server/features/cancel/route.js.map +1 -0
  544. package/dist/server/features/cancel-by-collection/handler.d.ts +13 -0
  545. package/dist/server/features/cancel-by-collection/handler.d.ts.map +1 -0
  546. package/dist/server/features/cancel-by-collection/handler.js +28 -0
  547. package/dist/server/features/cancel-by-collection/handler.js.map +1 -0
  548. package/dist/server/features/cancel-by-collection/handler.test.d.ts +2 -0
  549. package/dist/server/features/cancel-by-collection/handler.test.d.ts.map +1 -0
  550. package/dist/server/features/cancel-by-collection/handler.test.js +126 -0
  551. package/dist/server/features/cancel-by-collection/index.d.ts +2 -0
  552. package/dist/server/features/cancel-by-collection/index.d.ts.map +1 -0
  553. package/dist/server/features/cancel-by-collection/index.js +3 -0
  554. package/dist/server/features/cancel-by-collection/index.js.map +1 -0
  555. package/dist/server/features/cancel-by-collection/model.d.ts +19 -0
  556. package/dist/server/features/cancel-by-collection/model.d.ts.map +1 -0
  557. package/dist/server/features/cancel-by-collection/model.js +8 -0
  558. package/dist/server/features/cancel-by-collection/model.js.map +1 -0
  559. package/dist/server/features/cancel-by-collection/route.d.ts +9 -0
  560. package/dist/server/features/cancel-by-collection/route.d.ts.map +1 -0
  561. package/dist/server/features/cancel-by-collection/route.js +14 -0
  562. package/dist/server/features/cancel-by-collection/route.js.map +1 -0
  563. package/dist/server/features/enqueue-translation/handler.d.ts +13 -0
  564. package/dist/server/features/enqueue-translation/handler.d.ts.map +1 -0
  565. package/dist/server/features/enqueue-translation/handler.js +37 -0
  566. package/dist/server/features/enqueue-translation/handler.js.map +1 -0
  567. package/dist/server/features/enqueue-translation/handler.test.d.ts +2 -0
  568. package/dist/server/features/enqueue-translation/handler.test.d.ts.map +1 -0
  569. package/dist/server/features/enqueue-translation/handler.test.js +115 -0
  570. package/dist/server/features/enqueue-translation/index.d.ts +2 -0
  571. package/dist/server/features/enqueue-translation/index.d.ts.map +1 -0
  572. package/dist/server/features/enqueue-translation/index.js +3 -0
  573. package/dist/server/features/enqueue-translation/index.js.map +1 -0
  574. package/dist/server/features/enqueue-translation/model.d.ts +37 -0
  575. package/dist/server/features/enqueue-translation/model.d.ts.map +1 -0
  576. package/dist/server/features/enqueue-translation/model.js +17 -0
  577. package/dist/server/features/enqueue-translation/model.js.map +1 -0
  578. package/dist/server/features/enqueue-translation/route.d.ts +9 -0
  579. package/dist/server/features/enqueue-translation/route.d.ts.map +1 -0
  580. package/dist/server/features/enqueue-translation/route.js +14 -0
  581. package/dist/server/features/enqueue-translation/route.js.map +1 -0
  582. package/dist/server/features/get-collection-status/handler.d.ts +13 -0
  583. package/dist/server/features/get-collection-status/handler.d.ts.map +1 -0
  584. package/dist/server/features/get-collection-status/handler.js +29 -0
  585. package/dist/server/features/get-collection-status/handler.js.map +1 -0
  586. package/dist/server/features/get-collection-status/handler.test.d.ts +2 -0
  587. package/dist/server/features/get-collection-status/handler.test.d.ts.map +1 -0
  588. package/dist/server/features/get-collection-status/handler.test.js +108 -0
  589. package/dist/server/features/get-collection-status/index.d.ts +2 -0
  590. package/dist/server/features/get-collection-status/index.d.ts.map +1 -0
  591. package/dist/server/features/get-collection-status/index.js +3 -0
  592. package/dist/server/features/get-collection-status/index.js.map +1 -0
  593. package/dist/server/features/get-collection-status/model.d.ts +34 -0
  594. package/dist/server/features/get-collection-status/model.d.ts.map +1 -0
  595. package/dist/server/features/get-collection-status/model.js +8 -0
  596. package/dist/server/features/get-collection-status/model.js.map +1 -0
  597. package/dist/server/features/get-collection-status/route.d.ts +9 -0
  598. package/dist/server/features/get-collection-status/route.d.ts.map +1 -0
  599. package/dist/server/features/get-collection-status/route.js +14 -0
  600. package/dist/server/features/get-collection-status/route.js.map +1 -0
  601. package/dist/server/features/get-document-status/handler.d.ts +13 -0
  602. package/dist/server/features/get-document-status/handler.d.ts.map +1 -0
  603. package/dist/server/features/get-document-status/handler.js +27 -0
  604. package/dist/server/features/get-document-status/handler.js.map +1 -0
  605. package/dist/server/features/get-document-status/handler.test.d.ts +2 -0
  606. package/dist/server/features/get-document-status/handler.test.d.ts.map +1 -0
  607. package/dist/server/features/get-document-status/handler.test.js +138 -0
  608. package/dist/server/features/get-document-status/index.d.ts +3 -0
  609. package/dist/server/features/get-document-status/index.d.ts.map +1 -0
  610. package/dist/server/features/get-document-status/index.js +4 -0
  611. package/dist/server/features/get-document-status/index.js.map +1 -0
  612. package/dist/server/features/get-document-status/model.d.ts +59 -0
  613. package/dist/server/features/get-document-status/model.d.ts.map +1 -0
  614. package/dist/server/features/get-document-status/model.js +33 -0
  615. package/dist/server/features/get-document-status/model.js.map +1 -0
  616. package/dist/server/features/get-document-status/route.d.ts +9 -0
  617. package/dist/server/features/get-document-status/route.d.ts.map +1 -0
  618. package/dist/server/features/get-document-status/route.js +14 -0
  619. package/dist/server/features/get-document-status/route.js.map +1 -0
  620. package/dist/server/features/index.d.ts +7 -0
  621. package/dist/server/features/index.d.ts.map +1 -0
  622. package/dist/server/features/index.js +8 -0
  623. package/dist/server/features/index.js.map +1 -0
  624. package/dist/server/features/run-translation/handler.d.ts +11 -0
  625. package/dist/server/features/run-translation/handler.d.ts.map +1 -0
  626. package/dist/server/features/run-translation/handler.js +28 -0
  627. package/dist/server/features/run-translation/handler.js.map +1 -0
  628. package/dist/server/features/run-translation/handler.test.d.ts +2 -0
  629. package/dist/server/features/run-translation/handler.test.d.ts.map +1 -0
  630. package/dist/server/features/run-translation/handler.test.js +98 -0
  631. package/dist/server/features/run-translation/index.d.ts +2 -0
  632. package/dist/server/features/run-translation/index.d.ts.map +1 -0
  633. package/dist/server/features/run-translation/index.js +3 -0
  634. package/dist/server/features/run-translation/index.js.map +1 -0
  635. package/dist/server/features/run-translation/model.d.ts +12 -0
  636. package/dist/server/features/run-translation/model.d.ts.map +1 -0
  637. package/dist/server/features/run-translation/model.js +8 -0
  638. package/dist/server/features/run-translation/model.js.map +1 -0
  639. package/dist/server/features/run-translation/route.d.ts +8 -0
  640. package/dist/server/features/run-translation/route.d.ts.map +1 -0
  641. package/dist/server/features/run-translation/route.js +14 -0
  642. package/dist/server/features/run-translation/route.js.map +1 -0
  643. package/dist/server/features/translate-document/handler.d.ts +19 -0
  644. package/dist/server/features/translate-document/handler.d.ts.map +1 -0
  645. package/dist/server/features/translate-document/handler.js +69 -0
  646. package/dist/server/features/translate-document/handler.js.map +1 -0
  647. package/dist/server/features/translate-document/handler.test.d.ts +2 -0
  648. package/dist/server/features/translate-document/handler.test.d.ts.map +1 -0
  649. package/dist/server/features/translate-document/handler.test.js +171 -0
  650. package/dist/server/features/translate-document/index.d.ts +4 -0
  651. package/dist/server/features/translate-document/index.d.ts.map +1 -0
  652. package/dist/server/features/translate-document/index.js +4 -0
  653. package/dist/server/features/translate-document/index.js.map +1 -0
  654. package/dist/server/features/translate-document/model.d.ts +53 -0
  655. package/dist/server/features/translate-document/model.d.ts.map +1 -0
  656. package/dist/server/features/translate-document/model.js +30 -0
  657. package/dist/server/features/translate-document/model.js.map +1 -0
  658. package/dist/server/features/translate-document/task.d.ts +41 -0
  659. package/dist/server/features/translate-document/task.d.ts.map +1 -0
  660. package/dist/server/features/translate-document/task.js +44 -0
  661. package/dist/server/features/translate-document/task.js.map +1 -0
  662. package/dist/server/index.d.ts +4 -0
  663. package/dist/server/index.d.ts.map +1 -0
  664. package/dist/server/index.js +5 -0
  665. package/dist/server/index.js.map +1 -0
  666. package/dist/server/modules/index.d.ts +3 -0
  667. package/dist/server/modules/index.d.ts.map +1 -0
  668. package/dist/server/modules/index.js +4 -0
  669. package/dist/server/modules/index.js.map +1 -0
  670. package/dist/server/modules/task-runner/TaskRunner.interface.d.ts +31 -0
  671. package/dist/server/modules/task-runner/TaskRunner.interface.d.ts.map +1 -0
  672. package/dist/server/modules/task-runner/TaskRunner.interface.js +10 -0
  673. package/dist/server/modules/task-runner/TaskRunner.interface.js.map +1 -0
  674. package/dist/server/modules/task-runner/TaskRunnerProvider.interface.d.ts +46 -0
  675. package/dist/server/modules/task-runner/TaskRunnerProvider.interface.d.ts.map +1 -0
  676. package/dist/server/modules/task-runner/TaskRunnerProvider.interface.js +11 -0
  677. package/dist/server/modules/task-runner/TaskRunnerProvider.interface.js.map +1 -0
  678. package/dist/server/modules/task-runner/index.d.ts +7 -0
  679. package/dist/server/modules/task-runner/index.d.ts.map +1 -0
  680. package/dist/server/modules/task-runner/index.js +4 -0
  681. package/dist/server/modules/task-runner/index.js.map +1 -0
  682. package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsRunnerProvider.d.ts +20 -0
  683. package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsRunnerProvider.d.ts.map +1 -0
  684. package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsRunnerProvider.js +128 -0
  685. package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsRunnerProvider.js.map +1 -0
  686. package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsTaskRunner.d.ts +31 -0
  687. package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsTaskRunner.d.ts.map +1 -0
  688. package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsTaskRunner.js +165 -0
  689. package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsTaskRunner.js.map +1 -0
  690. package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsTaskRunner.test.d.ts +2 -0
  691. package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsTaskRunner.test.d.ts.map +1 -0
  692. package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsTaskRunner.test.js +188 -0
  693. package/dist/server/modules/task-runner/payload-jobs-runner/index.d.ts +3 -0
  694. package/dist/server/modules/task-runner/payload-jobs-runner/index.d.ts.map +1 -0
  695. package/dist/server/modules/task-runner/payload-jobs-runner/index.js +3 -0
  696. package/dist/server/modules/task-runner/payload-jobs-runner/index.js.map +1 -0
  697. package/dist/server/modules/task-runner/payload-jobs-runner/normalizeJob.d.ts +7 -0
  698. package/dist/server/modules/task-runner/payload-jobs-runner/normalizeJob.d.ts.map +1 -0
  699. package/dist/server/modules/task-runner/payload-jobs-runner/normalizeJob.js +40 -0
  700. package/dist/server/modules/task-runner/payload-jobs-runner/normalizeJob.js.map +1 -0
  701. package/dist/server/modules/task-runner/payload-jobs-runner/normalizeJob.test.d.ts +2 -0
  702. package/dist/server/modules/task-runner/payload-jobs-runner/normalizeJob.test.d.ts.map +1 -0
  703. package/dist/server/modules/task-runner/payload-jobs-runner/normalizeJob.test.js +169 -0
  704. package/dist/server/modules/task-runner/payload-jobs-runner/types.d.ts +85 -0
  705. package/dist/server/modules/task-runner/payload-jobs-runner/types.d.ts.map +1 -0
  706. package/dist/server/modules/task-runner/payload-jobs-runner/types.js +5 -0
  707. package/dist/server/modules/task-runner/payload-jobs-runner/types.js.map +1 -0
  708. package/dist/server/modules/task-runner/sync-runner/SyncRunnerProvider.d.ts +25 -0
  709. package/dist/server/modules/task-runner/sync-runner/SyncRunnerProvider.d.ts.map +1 -0
  710. package/dist/server/modules/task-runner/sync-runner/SyncRunnerProvider.js +42 -0
  711. package/dist/server/modules/task-runner/sync-runner/SyncRunnerProvider.js.map +1 -0
  712. package/dist/server/modules/task-runner/sync-runner/SyncTaskRunner.d.ts +23 -0
  713. package/dist/server/modules/task-runner/sync-runner/SyncTaskRunner.d.ts.map +1 -0
  714. package/dist/server/modules/task-runner/sync-runner/SyncTaskRunner.js +72 -0
  715. package/dist/server/modules/task-runner/sync-runner/SyncTaskRunner.js.map +1 -0
  716. package/dist/server/modules/task-runner/sync-runner/SyncTaskRunner.test.d.ts +2 -0
  717. package/dist/server/modules/task-runner/sync-runner/SyncTaskRunner.test.d.ts.map +1 -0
  718. package/dist/server/modules/task-runner/sync-runner/SyncTaskRunner.test.js +148 -0
  719. package/dist/server/modules/task-runner/sync-runner/index.d.ts +2 -0
  720. package/dist/server/modules/task-runner/sync-runner/index.d.ts.map +1 -0
  721. package/dist/server/modules/task-runner/sync-runner/index.js +3 -0
  722. package/dist/server/modules/task-runner/sync-runner/index.js.map +1 -0
  723. package/dist/server/modules/task-runner/sync-runner/types.d.ts +18 -0
  724. package/dist/server/modules/task-runner/sync-runner/types.d.ts.map +1 -0
  725. package/dist/server/modules/task-runner/sync-runner/types.js +5 -0
  726. package/dist/server/modules/task-runner/sync-runner/types.js.map +1 -0
  727. package/dist/server/modules/task-runner/types.d.ts +41 -0
  728. package/dist/server/modules/task-runner/types.d.ts.map +1 -0
  729. package/dist/server/modules/task-runner/types.js +5 -0
  730. package/dist/server/modules/task-runner/types.js.map +1 -0
  731. package/dist/server/modules/translation-pipeline/TranslationPipeline.d.ts +35 -0
  732. package/dist/server/modules/translation-pipeline/TranslationPipeline.d.ts.map +1 -0
  733. package/dist/server/modules/translation-pipeline/TranslationPipeline.js +55 -0
  734. package/dist/server/modules/translation-pipeline/TranslationPipeline.js.map +1 -0
  735. package/dist/server/modules/translation-pipeline/TranslationPipeline.test.d.ts +2 -0
  736. package/dist/server/modules/translation-pipeline/TranslationPipeline.test.d.ts.map +1 -0
  737. package/dist/server/modules/translation-pipeline/TranslationPipeline.test.js +552 -0
  738. package/dist/server/modules/translation-pipeline/index.d.ts +4 -0
  739. package/dist/server/modules/translation-pipeline/index.d.ts.map +1 -0
  740. package/dist/server/modules/translation-pipeline/index.js +4 -0
  741. package/dist/server/modules/translation-pipeline/index.js.map +1 -0
  742. package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.d.ts +26 -0
  743. package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.d.ts.map +1 -0
  744. package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.js +97 -0
  745. package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.js.map +1 -0
  746. package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.stage.d.ts +9 -0
  747. package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.stage.d.ts.map +1 -0
  748. package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.stage.js +15 -0
  749. package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.stage.js.map +1 -0
  750. package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.test.d.ts +2 -0
  751. package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.test.d.ts.map +1 -0
  752. package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.test.js +294 -0
  753. package/dist/server/modules/translation-pipeline/stages/data-reconciler/index.d.ts +3 -0
  754. package/dist/server/modules/translation-pipeline/stages/data-reconciler/index.d.ts.map +1 -0
  755. package/dist/server/modules/translation-pipeline/stages/data-reconciler/index.js +4 -0
  756. package/dist/server/modules/translation-pipeline/stages/data-reconciler/index.js.map +1 -0
  757. package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.d.ts +35 -0
  758. package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.d.ts.map +1 -0
  759. package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.js +128 -0
  760. package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.js.map +1 -0
  761. package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.stage.d.ts +13 -0
  762. package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.stage.d.ts.map +1 -0
  763. package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.stage.js +23 -0
  764. package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.stage.js.map +1 -0
  765. package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.test.d.ts +2 -0
  766. package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.test.d.ts.map +1 -0
  767. package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.test.js +737 -0
  768. package/dist/server/modules/translation-pipeline/stages/field-collector/index.d.ts +3 -0
  769. package/dist/server/modules/translation-pipeline/stages/field-collector/index.d.ts.map +1 -0
  770. package/dist/server/modules/translation-pipeline/stages/field-collector/index.js +4 -0
  771. package/dist/server/modules/translation-pipeline/stages/field-collector/index.js.map +1 -0
  772. package/dist/server/modules/translation-pipeline/stages/index.d.ts +7 -0
  773. package/dist/server/modules/translation-pipeline/stages/index.d.ts.map +1 -0
  774. package/dist/server/modules/translation-pipeline/stages/index.js +7 -0
  775. package/dist/server/modules/translation-pipeline/stages/index.js.map +1 -0
  776. package/dist/server/modules/translation-pipeline/stages/text-expander/PlainTextExpander.d.ts +10 -0
  777. package/dist/server/modules/translation-pipeline/stages/text-expander/PlainTextExpander.d.ts.map +1 -0
  778. package/dist/server/modules/translation-pipeline/stages/text-expander/PlainTextExpander.js +28 -0
  779. package/dist/server/modules/translation-pipeline/stages/text-expander/PlainTextExpander.js.map +1 -0
  780. package/dist/server/modules/translation-pipeline/stages/text-expander/RichTextExpander.d.ts +10 -0
  781. package/dist/server/modules/translation-pipeline/stages/text-expander/RichTextExpander.d.ts.map +1 -0
  782. package/dist/server/modules/translation-pipeline/stages/text-expander/RichTextExpander.js +32 -0
  783. package/dist/server/modules/translation-pipeline/stages/text-expander/RichTextExpander.js.map +1 -0
  784. package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.d.ts +24 -0
  785. package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.d.ts.map +1 -0
  786. package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.js +34 -0
  787. package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.js.map +1 -0
  788. package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.stage.d.ts +11 -0
  789. package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.stage.d.ts.map +1 -0
  790. package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.stage.js +29 -0
  791. package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.stage.js.map +1 -0
  792. package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.test.d.ts +2 -0
  793. package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.test.d.ts.map +1 -0
  794. package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.test.js +396 -0
  795. package/dist/server/modules/translation-pipeline/stages/text-expander/TextExpander.interface.d.ts +27 -0
  796. package/dist/server/modules/translation-pipeline/stages/text-expander/TextExpander.interface.d.ts.map +1 -0
  797. package/dist/server/modules/translation-pipeline/stages/text-expander/TextExpander.interface.js +6 -0
  798. package/dist/server/modules/translation-pipeline/stages/text-expander/TextExpander.interface.js.map +1 -0
  799. package/dist/server/modules/translation-pipeline/stages/text-expander/index.d.ts +7 -0
  800. package/dist/server/modules/translation-pipeline/stages/text-expander/index.d.ts.map +1 -0
  801. package/dist/server/modules/translation-pipeline/stages/text-expander/index.js +6 -0
  802. package/dist/server/modules/translation-pipeline/stages/text-expander/index.js.map +1 -0
  803. package/dist/server/modules/translation-pipeline/stages/translation/Translation.stage.d.ts +11 -0
  804. package/dist/server/modules/translation-pipeline/stages/translation/Translation.stage.d.ts.map +1 -0
  805. package/dist/server/modules/translation-pipeline/stages/translation/Translation.stage.js +23 -0
  806. package/dist/server/modules/translation-pipeline/stages/translation/Translation.stage.js.map +1 -0
  807. package/dist/server/modules/translation-pipeline/stages/translation/index.d.ts +2 -0
  808. package/dist/server/modules/translation-pipeline/stages/translation/index.d.ts.map +1 -0
  809. package/dist/server/modules/translation-pipeline/stages/translation/index.js +3 -0
  810. package/dist/server/modules/translation-pipeline/stages/translation/index.js.map +1 -0
  811. package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.d.ts +18 -0
  812. package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.d.ts.map +1 -0
  813. package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.js +27 -0
  814. package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.js.map +1 -0
  815. package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.stage.d.ts +8 -0
  816. package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.stage.d.ts.map +1 -0
  817. package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.stage.js +15 -0
  818. package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.stage.js.map +1 -0
  819. package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.test.d.ts +2 -0
  820. package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.test.d.ts.map +1 -0
  821. package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.test.js +110 -0
  822. package/dist/server/modules/translation-pipeline/stages/translation-applicator/index.d.ts +3 -0
  823. package/dist/server/modules/translation-pipeline/stages/translation-applicator/index.d.ts.map +1 -0
  824. package/dist/server/modules/translation-pipeline/stages/translation-applicator/index.js +4 -0
  825. package/dist/server/modules/translation-pipeline/stages/translation-applicator/index.js.map +1 -0
  826. package/dist/server/modules/translation-pipeline/strategies/Overwrite.strategy.d.ts +9 -0
  827. package/dist/server/modules/translation-pipeline/strategies/Overwrite.strategy.d.ts.map +1 -0
  828. package/dist/server/modules/translation-pipeline/strategies/Overwrite.strategy.js +11 -0
  829. package/dist/server/modules/translation-pipeline/strategies/Overwrite.strategy.js.map +1 -0
  830. package/dist/server/modules/translation-pipeline/strategies/Overwrite.strategy.test.d.ts +2 -0
  831. package/dist/server/modules/translation-pipeline/strategies/Overwrite.strategy.test.d.ts.map +1 -0
  832. package/dist/server/modules/translation-pipeline/strategies/Overwrite.strategy.test.js +36 -0
  833. package/dist/server/modules/translation-pipeline/strategies/SkipExisting.strategy.d.ts +10 -0
  834. package/dist/server/modules/translation-pipeline/strategies/SkipExisting.strategy.d.ts.map +1 -0
  835. package/dist/server/modules/translation-pipeline/strategies/SkipExisting.strategy.js +19 -0
  836. package/dist/server/modules/translation-pipeline/strategies/SkipExisting.strategy.js.map +1 -0
  837. package/dist/server/modules/translation-pipeline/strategies/SkipExisting.strategy.test.d.ts +2 -0
  838. package/dist/server/modules/translation-pipeline/strategies/SkipExisting.strategy.test.d.ts.map +1 -0
  839. package/dist/server/modules/translation-pipeline/strategies/SkipExisting.strategy.test.js +77 -0
  840. package/dist/server/modules/translation-pipeline/strategies/TranslationStrategy.interface.d.ts +22 -0
  841. package/dist/server/modules/translation-pipeline/strategies/TranslationStrategy.interface.d.ts.map +1 -0
  842. package/dist/server/modules/translation-pipeline/strategies/TranslationStrategy.interface.js +10 -0
  843. package/dist/server/modules/translation-pipeline/strategies/TranslationStrategy.interface.js.map +1 -0
  844. package/dist/server/modules/translation-pipeline/strategies/index.d.ts +14 -0
  845. package/dist/server/modules/translation-pipeline/strategies/index.d.ts.map +1 -0
  846. package/dist/server/modules/translation-pipeline/strategies/index.js +16 -0
  847. package/dist/server/modules/translation-pipeline/strategies/index.js.map +1 -0
  848. package/dist/server/modules/translation-pipeline/types/FieldChunk.d.ts +18 -0
  849. package/dist/server/modules/translation-pipeline/types/FieldChunk.d.ts.map +1 -0
  850. package/dist/server/modules/translation-pipeline/types/FieldChunk.js +8 -0
  851. package/dist/server/modules/translation-pipeline/types/FieldChunk.js.map +1 -0
  852. package/dist/server/modules/translation-pipeline/types/Pipeline.d.ts +21 -0
  853. package/dist/server/modules/translation-pipeline/types/Pipeline.d.ts.map +1 -0
  854. package/dist/server/modules/translation-pipeline/types/Pipeline.js +6 -0
  855. package/dist/server/modules/translation-pipeline/types/Pipeline.js.map +1 -0
  856. package/dist/server/modules/translation-pipeline/types/PipelineContext.d.ts +28 -0
  857. package/dist/server/modules/translation-pipeline/types/PipelineContext.d.ts.map +1 -0
  858. package/dist/server/modules/translation-pipeline/types/PipelineContext.js +6 -0
  859. package/dist/server/modules/translation-pipeline/types/PipelineContext.js.map +1 -0
  860. package/dist/server/modules/translation-pipeline/types/TextChunk.d.ts +43 -0
  861. package/dist/server/modules/translation-pipeline/types/TextChunk.d.ts.map +1 -0
  862. package/dist/server/modules/translation-pipeline/types/TextChunk.js +12 -0
  863. package/dist/server/modules/translation-pipeline/types/TextChunk.js.map +1 -0
  864. package/dist/server/modules/translation-pipeline/types/index.d.ts +6 -0
  865. package/dist/server/modules/translation-pipeline/types/index.d.ts.map +1 -0
  866. package/dist/server/modules/translation-pipeline/types/index.js +3 -0
  867. package/dist/server/modules/translation-pipeline/types/index.js.map +1 -0
  868. package/dist/server/modules/translation-providers/OpenAITranslation.provider.d.ts +128 -0
  869. package/dist/server/modules/translation-providers/OpenAITranslation.provider.d.ts.map +1 -0
  870. package/dist/server/modules/translation-providers/OpenAITranslation.provider.js +138 -0
  871. package/dist/server/modules/translation-providers/OpenAITranslation.provider.js.map +1 -0
  872. package/dist/server/modules/translation-providers/OpenAITranslation.provider.test.d.ts +2 -0
  873. package/dist/server/modules/translation-providers/OpenAITranslation.provider.test.d.ts.map +1 -0
  874. package/dist/server/modules/translation-providers/OpenAITranslation.provider.test.js +214 -0
  875. package/dist/server/modules/translation-providers/TranslationProvider.interface.d.ts +56 -0
  876. package/dist/server/modules/translation-providers/TranslationProvider.interface.d.ts.map +1 -0
  877. package/dist/server/modules/translation-providers/TranslationProvider.interface.js +26 -0
  878. package/dist/server/modules/translation-providers/TranslationProvider.interface.js.map +1 -0
  879. package/dist/server/modules/translation-providers/index.d.ts +3 -0
  880. package/dist/server/modules/translation-providers/index.d.ts.map +1 -0
  881. package/dist/server/modules/translation-providers/index.js +3 -0
  882. package/dist/server/modules/translation-providers/index.js.map +1 -0
  883. package/dist/server/shared/access/AnyAccessGuard.d.ts +8 -0
  884. package/dist/server/shared/access/AnyAccessGuard.d.ts.map +1 -0
  885. package/dist/server/shared/access/AnyAccessGuard.js +9 -0
  886. package/dist/server/shared/access/AnyAccessGuard.js.map +1 -0
  887. package/dist/server/shared/access/handler.d.ts +8 -0
  888. package/dist/server/shared/access/handler.d.ts.map +1 -0
  889. package/dist/server/shared/access/handler.js +5 -0
  890. package/dist/server/shared/access/handler.js.map +1 -0
  891. package/dist/server/shared/access/index.d.ts +4 -0
  892. package/dist/server/shared/access/index.d.ts.map +1 -0
  893. package/dist/server/shared/access/index.js +3 -0
  894. package/dist/server/shared/access/index.js.map +1 -0
  895. package/dist/server/shared/access/types.d.ts +2 -0
  896. package/dist/server/shared/access/types.d.ts.map +1 -0
  897. package/dist/server/shared/access/types.js +3 -0
  898. package/dist/server/shared/access/types.js.map +1 -0
  899. package/dist/server/shared/field-config/getFieldConfig.d.ts +21 -0
  900. package/dist/server/shared/field-config/getFieldConfig.d.ts.map +1 -0
  901. package/dist/server/shared/field-config/getFieldConfig.js +29 -0
  902. package/dist/server/shared/field-config/getFieldConfig.js.map +1 -0
  903. package/dist/server/shared/field-config/getFieldConfig.test.d.ts +2 -0
  904. package/dist/server/shared/field-config/getFieldConfig.test.d.ts.map +1 -0
  905. package/dist/server/shared/field-config/getFieldConfig.test.js +74 -0
  906. package/dist/server/shared/field-config/index.d.ts +4 -0
  907. package/dist/server/shared/field-config/index.d.ts.map +1 -0
  908. package/dist/server/shared/field-config/index.js +4 -0
  909. package/dist/server/shared/field-config/index.js.map +1 -0
  910. package/dist/server/shared/field-config/types.d.ts +39 -0
  911. package/dist/server/shared/field-config/types.d.ts.map +1 -0
  912. package/dist/server/shared/field-config/types.js +22 -0
  913. package/dist/server/shared/field-config/types.js.map +1 -0
  914. package/dist/server/shared/guards/collection-guards.d.ts +7 -0
  915. package/dist/server/shared/guards/collection-guards.d.ts.map +1 -0
  916. package/dist/server/shared/guards/collection-guards.js +16 -0
  917. package/dist/server/shared/guards/collection-guards.js.map +1 -0
  918. package/dist/server/shared/guards/field-guards.d.ts +37 -0
  919. package/dist/server/shared/guards/field-guards.d.ts.map +1 -0
  920. package/dist/server/shared/guards/field-guards.js +34 -0
  921. package/dist/server/shared/guards/field-guards.js.map +1 -0
  922. package/dist/server/shared/guards/field-guards.test.d.ts +2 -0
  923. package/dist/server/shared/guards/field-guards.test.d.ts.map +1 -0
  924. package/dist/server/shared/guards/field-guards.test.js +166 -0
  925. package/dist/server/shared/guards/index.d.ts +4 -0
  926. package/dist/server/shared/guards/index.d.ts.map +1 -0
  927. package/dist/server/shared/guards/index.js +4 -0
  928. package/dist/server/shared/guards/index.js.map +1 -0
  929. package/dist/server/shared/http/ServerResponse.d.ts +24 -0
  930. package/dist/server/shared/http/ServerResponse.d.ts.map +1 -0
  931. package/dist/server/shared/http/ServerResponse.js +165 -0
  932. package/dist/server/shared/http/ServerResponse.js.map +1 -0
  933. package/dist/server/shared/http/ServerResponse.test.d.ts +2 -0
  934. package/dist/server/shared/http/ServerResponse.test.d.ts.map +1 -0
  935. package/dist/server/shared/http/ServerResponse.test.js +161 -0
  936. package/dist/server/shared/http/index.d.ts +4 -0
  937. package/dist/server/shared/http/index.d.ts.map +1 -0
  938. package/dist/server/shared/http/index.js +5 -0
  939. package/dist/server/shared/http/index.js.map +1 -0
  940. package/dist/server/shared/http/withAccessCheck.d.ts +8 -0
  941. package/dist/server/shared/http/withAccessCheck.d.ts.map +1 -0
  942. package/dist/server/shared/http/withAccessCheck.js +16 -0
  943. package/dist/server/shared/http/withAccessCheck.js.map +1 -0
  944. package/dist/server/shared/http/withAccessCheck.test.d.ts +2 -0
  945. package/dist/server/shared/http/withAccessCheck.test.d.ts.map +1 -0
  946. package/dist/server/shared/http/withAccessCheck.test.js +46 -0
  947. package/dist/server/shared/http/withErrorHandler.d.ts +6 -0
  948. package/dist/server/shared/http/withErrorHandler.d.ts.map +1 -0
  949. package/dist/server/shared/http/withErrorHandler.js +23 -0
  950. package/dist/server/shared/http/withErrorHandler.js.map +1 -0
  951. package/dist/server/shared/http/withErrorHandler.test.d.ts +2 -0
  952. package/dist/server/shared/http/withErrorHandler.test.d.ts.map +1 -0
  953. package/dist/server/shared/http/withErrorHandler.test.js +69 -0
  954. package/dist/server/shared/index.d.ts +11 -0
  955. package/dist/server/shared/index.d.ts.map +1 -0
  956. package/dist/server/shared/index.js +13 -0
  957. package/dist/server/shared/index.js.map +1 -0
  958. package/dist/server/shared/lexical/collectTextNodes.d.ts +10 -0
  959. package/dist/server/shared/lexical/collectTextNodes.d.ts.map +1 -0
  960. package/dist/server/shared/lexical/collectTextNodes.js +31 -0
  961. package/dist/server/shared/lexical/collectTextNodes.js.map +1 -0
  962. package/dist/server/shared/lexical/collectTextNodes.test.d.ts +2 -0
  963. package/dist/server/shared/lexical/collectTextNodes.test.d.ts.map +1 -0
  964. package/dist/server/shared/lexical/collectTextNodes.test.js +120 -0
  965. package/dist/server/shared/lexical/guards.d.ts +20 -0
  966. package/dist/server/shared/lexical/guards.d.ts.map +1 -0
  967. package/dist/server/shared/lexical/guards.js +18 -0
  968. package/dist/server/shared/lexical/guards.js.map +1 -0
  969. package/dist/server/shared/lexical/guards.test.d.ts +2 -0
  970. package/dist/server/shared/lexical/guards.test.d.ts.map +1 -0
  971. package/dist/server/shared/lexical/guards.test.js +160 -0
  972. package/dist/server/shared/lexical/index.d.ts +7 -0
  973. package/dist/server/shared/lexical/index.d.ts.map +1 -0
  974. package/dist/server/shared/lexical/index.js +6 -0
  975. package/dist/server/shared/lexical/index.js.map +1 -0
  976. package/dist/server/shared/lexical/isEmptyRichText.d.ts +14 -0
  977. package/dist/server/shared/lexical/isEmptyRichText.d.ts.map +1 -0
  978. package/dist/server/shared/lexical/isEmptyRichText.js +31 -0
  979. package/dist/server/shared/lexical/isEmptyRichText.js.map +1 -0
  980. package/dist/server/shared/lexical/isEmptyRichText.test.d.ts +2 -0
  981. package/dist/server/shared/lexical/isEmptyRichText.test.d.ts.map +1 -0
  982. package/dist/server/shared/lexical/isEmptyRichText.test.js +251 -0
  983. package/dist/server/shared/lexical/traverseLexicalTree.d.ts +11 -0
  984. package/dist/server/shared/lexical/traverseLexicalTree.d.ts.map +1 -0
  985. package/dist/server/shared/lexical/traverseLexicalTree.js +19 -0
  986. package/dist/server/shared/lexical/traverseLexicalTree.js.map +1 -0
  987. package/dist/server/shared/lexical/traverseLexicalTree.test.d.ts +2 -0
  988. package/dist/server/shared/lexical/traverseLexicalTree.test.d.ts.map +1 -0
  989. package/dist/server/shared/lexical/traverseLexicalTree.test.js +112 -0
  990. package/dist/server/shared/lexical/types.d.ts +20 -0
  991. package/dist/server/shared/lexical/types.d.ts.map +1 -0
  992. package/dist/server/shared/lexical/types.js +8 -0
  993. package/dist/server/shared/lexical/types.js.map +1 -0
  994. package/dist/server/shared/utils/LazyMap.d.ts +71 -0
  995. package/dist/server/shared/utils/LazyMap.d.ts.map +1 -0
  996. package/dist/server/shared/utils/LazyMap.js +95 -0
  997. package/dist/server/shared/utils/LazyMap.js.map +1 -0
  998. package/dist/server/shared/utils/LazyMap.test.d.ts +2 -0
  999. package/dist/server/shared/utils/LazyMap.test.d.ts.map +1 -0
  1000. package/dist/server/shared/utils/LazyMap.test.js +262 -0
  1001. package/dist/server/shared/utils/filterLocalizedFields.d.ts +11 -0
  1002. package/dist/server/shared/utils/filterLocalizedFields.d.ts.map +1 -0
  1003. package/dist/server/shared/utils/filterLocalizedFields.js +72 -0
  1004. package/dist/server/shared/utils/filterLocalizedFields.js.map +1 -0
  1005. package/dist/server/shared/utils/filterLocalizedFields.test.d.ts +2 -0
  1006. package/dist/server/shared/utils/filterLocalizedFields.test.d.ts.map +1 -0
  1007. package/dist/server/shared/utils/filterLocalizedFields.test.js +338 -0
  1008. package/dist/server/shared/utils/getByPath.d.ts +9 -0
  1009. package/dist/server/shared/utils/getByPath.d.ts.map +1 -0
  1010. package/dist/server/shared/utils/getByPath.js +18 -0
  1011. package/dist/server/shared/utils/getByPath.js.map +1 -0
  1012. package/dist/server/shared/utils/getByPath.test.d.ts +2 -0
  1013. package/dist/server/shared/utils/getByPath.test.d.ts.map +1 -0
  1014. package/dist/server/shared/utils/getByPath.test.js +33 -0
  1015. package/dist/server/shared/utils/index.d.ts +10 -0
  1016. package/dist/server/shared/utils/index.d.ts.map +1 -0
  1017. package/dist/server/shared/utils/index.js +10 -0
  1018. package/dist/server/shared/utils/index.js.map +1 -0
  1019. package/dist/server/shared/utils/isEmpty.d.ts +9 -0
  1020. package/dist/server/shared/utils/isEmpty.d.ts.map +1 -0
  1021. package/dist/server/shared/utils/isEmpty.js +15 -0
  1022. package/dist/server/shared/utils/isEmpty.js.map +1 -0
  1023. package/dist/server/shared/utils/isEmpty.test.d.ts +2 -0
  1024. package/dist/server/shared/utils/isEmpty.test.d.ts.map +1 -0
  1025. package/dist/server/shared/utils/isEmpty.test.js +60 -0
  1026. package/dist/server/shared/utils/isObject.d.ts +5 -0
  1027. package/dist/server/shared/utils/isObject.d.ts.map +1 -0
  1028. package/dist/server/shared/utils/isObject.js +7 -0
  1029. package/dist/server/shared/utils/isObject.js.map +1 -0
  1030. package/dist/server/shared/utils/isObject.test.d.ts +2 -0
  1031. package/dist/server/shared/utils/isObject.test.d.ts.map +1 -0
  1032. package/dist/server/shared/utils/isObject.test.js +57 -0
  1033. package/dist/server/shared/utils/normalizePath.d.ts +16 -0
  1034. package/dist/server/shared/utils/normalizePath.d.ts.map +1 -0
  1035. package/dist/server/shared/utils/normalizePath.js +22 -0
  1036. package/dist/server/shared/utils/normalizePath.js.map +1 -0
  1037. package/dist/server/shared/utils/normalizePath.test.d.ts +2 -0
  1038. package/dist/server/shared/utils/normalizePath.test.d.ts.map +1 -0
  1039. package/dist/server/shared/utils/normalizePath.test.js +33 -0
  1040. package/dist/server/shared/utils/pipe.d.ts +5 -0
  1041. package/dist/server/shared/utils/pipe.d.ts.map +1 -0
  1042. package/dist/server/shared/utils/pipe.js +5 -0
  1043. package/dist/server/shared/utils/pipe.js.map +1 -0
  1044. package/dist/server/shared/utils/pipe.test.d.ts +2 -0
  1045. package/dist/server/shared/utils/pipe.test.d.ts.map +1 -0
  1046. package/dist/server/shared/utils/pipe.test.js +55 -0
  1047. package/dist/server/shared/utils/setByPath.d.ts +11 -0
  1048. package/dist/server/shared/utils/setByPath.d.ts.map +1 -0
  1049. package/dist/server/shared/utils/setByPath.js +26 -0
  1050. package/dist/server/shared/utils/setByPath.js.map +1 -0
  1051. package/dist/server/shared/utils/setByPath.test.d.ts +2 -0
  1052. package/dist/server/shared/utils/setByPath.test.d.ts.map +1 -0
  1053. package/dist/server/shared/utils/setByPath.test.js +46 -0
  1054. package/dist/types/AccessGuard.d.ts +12 -0
  1055. package/dist/types/AccessGuard.d.ts.map +1 -0
  1056. package/dist/types/AccessGuard.js +3 -0
  1057. package/dist/types/AccessGuard.js.map +1 -0
  1058. package/dist/types/index.d.ts +2 -0
  1059. package/dist/types/index.d.ts.map +1 -0
  1060. package/dist/types/index.js +3 -0
  1061. package/dist/types/index.js.map +1 -0
  1062. package/dist/vitest-env.d.js +3 -0
  1063. package/dist/vitest-env.d.js.map +1 -0
  1064. package/package.json +91 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/server/modules/translation-pipeline/types/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC9C,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAC3E,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAC/D,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAChE,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA"}
@@ -0,0 +1,3 @@
1
+ export { isPlainTextChunk, isRichTextChunk } from './TextChunk';
2
+
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/server/modules/translation-pipeline/types/index.ts"],"sourcesContent":["export type { FieldChunk } from './FieldChunk'\nexport type { PlainTextChunk, RichTextChunk, TextChunk } from './TextChunk'\nexport { isPlainTextChunk, isRichTextChunk } from './TextChunk'\nexport type { PipelineConfig, PipelineResult } from './Pipeline'\nexport type { PipelineContext, PipelineStage } from './PipelineContext'\n"],"names":["isPlainTextChunk","isRichTextChunk"],"mappings":"AAEA,SAASA,gBAAgB,EAAEC,eAAe,QAAQ,cAAa"}
@@ -0,0 +1,128 @@
1
+ import type { TranslationProvider, TranslationInput, TranslationOutput } from './TranslationProvider.interface';
2
+ import { ChatModel } from 'openai/resources/index.mjs';
3
+ /**
4
+ * Function to transform text in dry run mode.
5
+ * Receives the original text and returns the transformed text.
6
+ */
7
+ type DryRunTransformer = (text: string) => string | Promise<string>;
8
+ /**
9
+ * Configuration for dry run mode with custom transformer.
10
+ */
11
+ export type DryRunConfig = {
12
+ /** Custom transformer function for text */
13
+ transform: DryRunTransformer;
14
+ /** Delay in milliseconds before returning mock translation (simulates API latency) */
15
+ timeout?: number;
16
+ };
17
+ /**
18
+ * Context passed to the system prompt builder function.
19
+ */
20
+ export type SystemPromptContext = {
21
+ /** Source language code (e.g., 'en', 'de') */
22
+ sourceLang: string;
23
+ /** Target language code (e.g., 'fr', 'es') */
24
+ targetLang: string;
25
+ /** Default system prompt that can be extended or replaced */
26
+ defaultPrompt: string;
27
+ };
28
+ /**
29
+ * Function to build a custom system prompt for translation.
30
+ */
31
+ type SystemPromptBuilder = (context: SystemPromptContext) => string;
32
+ export type OpenAIProviderConfig = {
33
+ apiKey: string;
34
+ /**
35
+ * OpenAI model to use for translation.
36
+ *
37
+ * @default 'gpt-4o'
38
+ *
39
+ * @example
40
+ * model: 'gpt-4o-mini'
41
+ */
42
+ model?: (string & {}) | ChatModel;
43
+ /**
44
+ * Custom system prompt builder for translation.
45
+ * Receives context with source/target languages and the default prompt.
46
+ *
47
+ * @example
48
+ * // Add custom instructions
49
+ * systemPrompt: ({ sourceLang, targetLang, defaultPrompt }) =>
50
+ * `${defaultPrompt}\nUse formal language. Keep brand names unchanged.`
51
+ *
52
+ * @example
53
+ * // Completely custom prompt
54
+ * systemPrompt: ({ sourceLang, targetLang }) =>
55
+ * `Translate JSON values from ${sourceLang} to ${targetLang}. Be concise.`
56
+ */
57
+ systemPrompt?: SystemPromptBuilder;
58
+ /**
59
+ * When enabled, simulates translations without making actual API calls to OpenAI.
60
+ *
61
+ * - `true` — uses default transformer that reverses the text
62
+ * - `{ transform, timeout? }` — custom transformer with optional delay
63
+ *
64
+ * @example
65
+ * // Default behavior (reverse text, no delay)
66
+ * dryRun: true
67
+ *
68
+ * @example
69
+ * // Custom transformer with delay
70
+ * dryRun: {
71
+ * transform: (text) => `[TRANSLATED] ${text}`,
72
+ * timeout: 1000, // 1 second delay
73
+ * }
74
+ *
75
+ * @default false
76
+ */
77
+ dryRun?: boolean | DryRunConfig;
78
+ };
79
+ /** @deprecated Use `createOpenAIProvider` function instead */
80
+ export declare class OpenAITranslationProvider implements TranslationProvider {
81
+ private readonly config;
82
+ private openAiClient;
83
+ constructor(config: OpenAIProviderConfig);
84
+ translate(content: TranslationInput, souceLng: string, targetLng: string): Promise<TranslationOutput | null>;
85
+ /**
86
+ * Builds the system prompt for translation.
87
+ */
88
+ private buildSystemPrompt;
89
+ /**
90
+ * Returns the transformer function for dry run mode.
91
+ * If dryRun is an object with transform, returns it.
92
+ * If dryRun is true, returns the default transformer that reverses text.
93
+ */
94
+ private getDryRunTransformer;
95
+ /**
96
+ * Returns the timeout for dry run mode.
97
+ * If dryRun is an object with timeout, returns it.
98
+ * Otherwise returns 0 (no delay).
99
+ */
100
+ private getDryRunTimeout;
101
+ private createMockTranslation;
102
+ /**
103
+ * Recursively transforms the values of an object or array using the provided transformer function.
104
+ * @param obj The object or value to transform.
105
+ * @param transformer The function to apply to each value.
106
+ * @returns The transformed object, array, or value.
107
+ */
108
+ private transformObjectValues;
109
+ }
110
+ /**
111
+ * Creates an OpenAI translation provider.
112
+ *
113
+ * @example
114
+ * ```ts
115
+ * // Basic usage
116
+ * createOpenAIProvider({ apiKey: process.env.OPENAI_API_KEY })
117
+ *
118
+ * // With options
119
+ * createOpenAIProvider({
120
+ * apiKey: process.env.OPENAI_API_KEY,
121
+ * model: 'gpt-4o-mini',
122
+ * systemPrompt: ({ defaultPrompt }) => `${defaultPrompt}\nUse formal language.`,
123
+ * })
124
+ * ```
125
+ */
126
+ export declare function createOpenAIProvider(config: OpenAIProviderConfig): OpenAITranslationProvider;
127
+ export {};
128
+ //# sourceMappingURL=OpenAITranslation.provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OpenAITranslation.provider.d.ts","sourceRoot":"","sources":["../../../../src/server/modules/translation-providers/OpenAITranslation.provider.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AAE/G,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AAEtD;;;GAGG;AACH,KAAK,iBAAiB,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;AAEnE;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,2CAA2C;IAC3C,SAAS,EAAE,iBAAiB,CAAA;IAC5B,sFAAsF;IACtF,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,8CAA8C;IAC9C,UAAU,EAAE,MAAM,CAAA;IAClB,8CAA8C;IAC9C,UAAU,EAAE,MAAM,CAAA;IAClB,6DAA6D;IAC7D,aAAa,EAAE,MAAM,CAAA;CACtB,CAAA;AAED;;GAEG;AACH,KAAK,mBAAmB,GAAG,CAAC,OAAO,EAAE,mBAAmB,KAAK,MAAM,CAAA;AAEnE,MAAM,MAAM,oBAAoB,GAAG;IACjC,MAAM,EAAE,MAAM,CAAA;IACd;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,CAAC,MAAM,GAAG,EAAE,CAAC,GAAG,SAAS,CAAA;IACjC;;;;;;;;;;;;;OAaG;IACH,YAAY,CAAC,EAAE,mBAAmB,CAAA;IAClC;;;;;;;;;;;;;;;;;;OAkBG;IACH,MAAM,CAAC,EAAE,OAAO,GAAG,YAAY,CAAA;CAChC,CAAA;AAED,8DAA8D;AAC9D,qBAAa,yBAA0B,YAAW,mBAAmB;IAGvD,OAAO,CAAC,QAAQ,CAAC,MAAM;IAFnC,OAAO,CAAC,YAAY,CAAQ;gBAEC,MAAM,EAAE,oBAAoB;IAInD,SAAS,CAAC,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC;IAyClH;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAYzB;;;;OAIG;IACH,OAAO,CAAC,oBAAoB;IAO5B;;;;OAIG;IACH,OAAO,CAAC,gBAAgB;YAOV,qBAAqB;IAgBnC;;;;;OAKG;YACW,qBAAqB;CAkBpC;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,oBAAoB,GAAG,yBAAyB,CAE5F"}
@@ -0,0 +1,138 @@
1
+ import OpenAI from 'openai';
2
+ import { isObject } from '../../shared';
3
+ /** @deprecated Use `createOpenAIProvider` function instead */ export class OpenAITranslationProvider {
4
+ config;
5
+ openAiClient;
6
+ constructor(config){
7
+ this.config = config;
8
+ this.openAiClient = new OpenAI({
9
+ apiKey: config.apiKey
10
+ });
11
+ }
12
+ async translate(content, souceLng, targetLng) {
13
+ if (this.config.dryRun) {
14
+ console.info('[DRY RUN] Translation simulation:', {
15
+ content,
16
+ sourceLang: souceLng,
17
+ targetLang: targetLng,
18
+ provider: 'OpenAI'
19
+ });
20
+ const timeout = this.getDryRunTimeout();
21
+ if (timeout > 0) await new Promise((resolve)=>setTimeout(resolve, timeout));
22
+ const transformer = this.getDryRunTransformer();
23
+ return this.createMockTranslation(content, transformer);
24
+ }
25
+ const systemPrompt = this.buildSystemPrompt(souceLng, targetLng);
26
+ const chatCompletion = await this.openAiClient.chat.completions.create({
27
+ messages: [
28
+ {
29
+ role: 'system',
30
+ content: systemPrompt
31
+ },
32
+ {
33
+ role: 'user',
34
+ content: JSON.stringify(content)
35
+ }
36
+ ],
37
+ model: this.config.model ?? 'gpt-4o',
38
+ temperature: 0,
39
+ top_p: 1,
40
+ frequency_penalty: 0,
41
+ presence_penalty: 0,
42
+ response_format: {
43
+ type: 'json_object'
44
+ }
45
+ });
46
+ const translatedContent = chatCompletion.choices[0].message.content;
47
+ if (!translatedContent) return null;
48
+ try {
49
+ return JSON.parse(translatedContent);
50
+ } catch {
51
+ return null;
52
+ }
53
+ }
54
+ /**
55
+ * Builds the system prompt for translation.
56
+ */ buildSystemPrompt(sourceLang, targetLang) {
57
+ const defaultPrompt = `Translate the values from the JSON that the user will send you${sourceLang ? ` from ${sourceLang}` : ''} into ${targetLang}. Keep all JSON keys exactly as they are, only translate the values.
58
+ The response should be a valid JSON object with the same structure and keys as the input, but with translated values.
59
+ Maintain any special formatting, placeholders, or variables within the values if they exist.`;
60
+ if (this.config.systemPrompt) {
61
+ return this.config.systemPrompt({
62
+ sourceLang,
63
+ targetLang,
64
+ defaultPrompt
65
+ });
66
+ }
67
+ return defaultPrompt;
68
+ }
69
+ /**
70
+ * Returns the transformer function for dry run mode.
71
+ * If dryRun is an object with transform, returns it.
72
+ * If dryRun is true, returns the default transformer that reverses text.
73
+ */ getDryRunTransformer() {
74
+ if (typeof this.config.dryRun === 'object' && this.config.dryRun.transform) {
75
+ return this.config.dryRun.transform;
76
+ }
77
+ return (text)=>text.split('').reverse().join('');
78
+ }
79
+ /**
80
+ * Returns the timeout for dry run mode.
81
+ * If dryRun is an object with timeout, returns it.
82
+ * Otherwise returns 0 (no delay).
83
+ */ getDryRunTimeout() {
84
+ if (typeof this.config.dryRun === 'object' && this.config.dryRun.timeout) {
85
+ return this.config.dryRun.timeout;
86
+ }
87
+ return 0;
88
+ }
89
+ async createMockTranslation(content, transformer) {
90
+ try {
91
+ const mockTranslation = await this.transformObjectValues(content, async (value)=>{
92
+ if (typeof value === 'string' && value.trim()) return transformer(value);
93
+ return value;
94
+ });
95
+ return mockTranslation;
96
+ } catch {
97
+ return null;
98
+ }
99
+ }
100
+ /**
101
+ * Recursively transforms the values of an object or array using the provided transformer function.
102
+ * @param obj The object or value to transform.
103
+ * @param transformer The function to apply to each value.
104
+ * @returns The transformed object, array, or value.
105
+ */ async transformObjectValues(obj, transformer) {
106
+ if (Array.isArray(obj)) {
107
+ return Promise.all(obj.map((item)=>this.transformObjectValues(item, transformer)));
108
+ }
109
+ if (isObject(obj)) {
110
+ const result = {};
111
+ for (const [key, value] of Object.entries(obj)){
112
+ result[key] = await this.transformObjectValues(value, transformer);
113
+ }
114
+ return result;
115
+ }
116
+ return transformer(obj);
117
+ }
118
+ }
119
+ /**
120
+ * Creates an OpenAI translation provider.
121
+ *
122
+ * @example
123
+ * ```ts
124
+ * // Basic usage
125
+ * createOpenAIProvider({ apiKey: process.env.OPENAI_API_KEY })
126
+ *
127
+ * // With options
128
+ * createOpenAIProvider({
129
+ * apiKey: process.env.OPENAI_API_KEY,
130
+ * model: 'gpt-4o-mini',
131
+ * systemPrompt: ({ defaultPrompt }) => `${defaultPrompt}\nUse formal language.`,
132
+ * })
133
+ * ```
134
+ */ export function createOpenAIProvider(config) {
135
+ return new OpenAITranslationProvider(config);
136
+ }
137
+
138
+ //# sourceMappingURL=OpenAITranslation.provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/server/modules/translation-providers/OpenAITranslation.provider.ts"],"sourcesContent":["import OpenAI from 'openai'\n\nimport type { TranslationProvider, TranslationInput, TranslationOutput } from './TranslationProvider.interface'\nimport { isObject } from '../../shared'\nimport { ChatModel } from 'openai/resources/index.mjs'\n\n/**\n * Function to transform text in dry run mode.\n * Receives the original text and returns the transformed text.\n */\ntype DryRunTransformer = (text: string) => string | Promise<string>\n\n/**\n * Configuration for dry run mode with custom transformer.\n */\nexport type DryRunConfig = {\n /** Custom transformer function for text */\n transform: DryRunTransformer\n /** Delay in milliseconds before returning mock translation (simulates API latency) */\n timeout?: number\n}\n\n/**\n * Context passed to the system prompt builder function.\n */\nexport type SystemPromptContext = {\n /** Source language code (e.g., 'en', 'de') */\n sourceLang: string\n /** Target language code (e.g., 'fr', 'es') */\n targetLang: string\n /** Default system prompt that can be extended or replaced */\n defaultPrompt: string\n}\n\n/**\n * Function to build a custom system prompt for translation.\n */\ntype SystemPromptBuilder = (context: SystemPromptContext) => string\n\nexport type OpenAIProviderConfig = {\n apiKey: string\n /**\n * OpenAI model to use for translation.\n *\n * @default 'gpt-4o'\n *\n * @example\n * model: 'gpt-4o-mini'\n */\n model?: (string & {}) | ChatModel\n /**\n * Custom system prompt builder for translation.\n * Receives context with source/target languages and the default prompt.\n *\n * @example\n * // Add custom instructions\n * systemPrompt: ({ sourceLang, targetLang, defaultPrompt }) =>\n * `${defaultPrompt}\\nUse formal language. Keep brand names unchanged.`\n *\n * @example\n * // Completely custom prompt\n * systemPrompt: ({ sourceLang, targetLang }) =>\n * `Translate JSON values from ${sourceLang} to ${targetLang}. Be concise.`\n */\n systemPrompt?: SystemPromptBuilder\n /**\n * When enabled, simulates translations without making actual API calls to OpenAI.\n *\n * - `true` — uses default transformer that reverses the text\n * - `{ transform, timeout? }` — custom transformer with optional delay\n *\n * @example\n * // Default behavior (reverse text, no delay)\n * dryRun: true\n *\n * @example\n * // Custom transformer with delay\n * dryRun: {\n * transform: (text) => `[TRANSLATED] ${text}`,\n * timeout: 1000, // 1 second delay\n * }\n *\n * @default false\n */\n dryRun?: boolean | DryRunConfig\n}\n\n/** @deprecated Use `createOpenAIProvider` function instead */\nexport class OpenAITranslationProvider implements TranslationProvider {\n private openAiClient: OpenAI\n\n constructor(private readonly config: OpenAIProviderConfig) {\n this.openAiClient = new OpenAI({ apiKey: config.apiKey })\n }\n\n async translate(content: TranslationInput, souceLng: string, targetLng: string): Promise<TranslationOutput | null> {\n if (this.config.dryRun) {\n console.info('[DRY RUN] Translation simulation:', {\n content,\n sourceLang: souceLng,\n targetLang: targetLng,\n provider: 'OpenAI',\n })\n\n const timeout = this.getDryRunTimeout()\n if (timeout > 0) await new Promise((resolve) => setTimeout(resolve, timeout))\n\n const transformer = this.getDryRunTransformer()\n return this.createMockTranslation(content, transformer)\n }\n\n const systemPrompt = this.buildSystemPrompt(souceLng, targetLng)\n\n const chatCompletion = await this.openAiClient.chat.completions.create({\n messages: [\n { role: 'system', content: systemPrompt },\n { role: 'user', content: JSON.stringify(content) },\n ],\n model: this.config.model ?? 'gpt-4o',\n temperature: 0,\n top_p: 1,\n frequency_penalty: 0,\n presence_penalty: 0,\n response_format: { type: 'json_object' },\n })\n\n const translatedContent = chatCompletion.choices[0].message.content\n if (!translatedContent) return null\n\n try {\n return JSON.parse(translatedContent)\n } catch {\n return null\n }\n }\n\n /**\n * Builds the system prompt for translation.\n */\n private buildSystemPrompt(sourceLang: string, targetLang: string): string {\n const defaultPrompt = `Translate the values from the JSON that the user will send you${sourceLang ? ` from ${sourceLang}` : ''} into ${targetLang}. Keep all JSON keys exactly as they are, only translate the values.\nThe response should be a valid JSON object with the same structure and keys as the input, but with translated values.\nMaintain any special formatting, placeholders, or variables within the values if they exist.`\n\n if (this.config.systemPrompt) {\n return this.config.systemPrompt({ sourceLang, targetLang, defaultPrompt })\n }\n\n return defaultPrompt\n }\n\n /**\n * Returns the transformer function for dry run mode.\n * If dryRun is an object with transform, returns it.\n * If dryRun is true, returns the default transformer that reverses text.\n */\n private getDryRunTransformer(): DryRunTransformer {\n if (typeof this.config.dryRun === 'object' && this.config.dryRun.transform) {\n return this.config.dryRun.transform\n }\n return (text: string) => text.split('').reverse().join('')\n }\n\n /**\n * Returns the timeout for dry run mode.\n * If dryRun is an object with timeout, returns it.\n * Otherwise returns 0 (no delay).\n */\n private getDryRunTimeout(): number {\n if (typeof this.config.dryRun === 'object' && this.config.dryRun.timeout) {\n return this.config.dryRun.timeout\n }\n return 0\n }\n\n private async createMockTranslation(\n content: TranslationInput,\n transformer: DryRunTransformer,\n ): Promise<TranslationOutput | null> {\n try {\n const mockTranslation = await this.transformObjectValues(content, async (value) => {\n if (typeof value === 'string' && value.trim()) return transformer(value)\n return value\n })\n\n return mockTranslation as TranslationOutput\n } catch {\n return null\n }\n }\n\n /**\n * Recursively transforms the values of an object or array using the provided transformer function.\n * @param obj The object or value to transform.\n * @param transformer The function to apply to each value.\n * @returns The transformed object, array, or value.\n */\n private async transformObjectValues(\n obj: unknown,\n transformer: (value: unknown) => unknown | Promise<unknown>,\n ): Promise<unknown> {\n if (Array.isArray(obj)) {\n return Promise.all(obj.map((item) => this.transformObjectValues(item, transformer)))\n }\n\n if (isObject(obj)) {\n const result: Record<string, unknown> = {}\n for (const [key, value] of Object.entries(obj)) {\n result[key] = await this.transformObjectValues(value, transformer)\n }\n return result\n }\n\n return transformer(obj)\n }\n}\n\n/**\n * Creates an OpenAI translation provider.\n *\n * @example\n * ```ts\n * // Basic usage\n * createOpenAIProvider({ apiKey: process.env.OPENAI_API_KEY })\n *\n * // With options\n * createOpenAIProvider({\n * apiKey: process.env.OPENAI_API_KEY,\n * model: 'gpt-4o-mini',\n * systemPrompt: ({ defaultPrompt }) => `${defaultPrompt}\\nUse formal language.`,\n * })\n * ```\n */\nexport function createOpenAIProvider(config: OpenAIProviderConfig): OpenAITranslationProvider {\n return new OpenAITranslationProvider(config)\n}\n"],"names":["OpenAI","isObject","OpenAITranslationProvider","openAiClient","config","apiKey","translate","content","souceLng","targetLng","dryRun","console","info","sourceLang","targetLang","provider","timeout","getDryRunTimeout","Promise","resolve","setTimeout","transformer","getDryRunTransformer","createMockTranslation","systemPrompt","buildSystemPrompt","chatCompletion","chat","completions","create","messages","role","JSON","stringify","model","temperature","top_p","frequency_penalty","presence_penalty","response_format","type","translatedContent","choices","message","parse","defaultPrompt","transform","text","split","reverse","join","mockTranslation","transformObjectValues","value","trim","obj","Array","isArray","all","map","item","result","key","Object","entries","createOpenAIProvider"],"mappings":"AAAA,OAAOA,YAAY,SAAQ;AAG3B,SAASC,QAAQ,QAAQ,eAAc;AAoFvC,4DAA4D,GAC5D,OAAO,MAAMC;;IACHC,aAAoB;IAE5B,YAAY,AAAiBC,MAA4B,CAAE;aAA9BA,SAAAA;QAC3B,IAAI,CAACD,YAAY,GAAG,IAAIH,OAAO;YAAEK,QAAQD,OAAOC,MAAM;QAAC;IACzD;IAEA,MAAMC,UAAUC,OAAyB,EAAEC,QAAgB,EAAEC,SAAiB,EAAqC;QACjH,IAAI,IAAI,CAACL,MAAM,CAACM,MAAM,EAAE;YACtBC,QAAQC,IAAI,CAAC,qCAAqC;gBAChDL;gBACAM,YAAYL;gBACZM,YAAYL;gBACZM,UAAU;YACZ;YAEA,MAAMC,UAAU,IAAI,CAACC,gBAAgB;YACrC,IAAID,UAAU,GAAG,MAAM,IAAIE,QAAQ,CAACC,UAAYC,WAAWD,SAASH;YAEpE,MAAMK,cAAc,IAAI,CAACC,oBAAoB;YAC7C,OAAO,IAAI,CAACC,qBAAqB,CAAChB,SAASc;QAC7C;QAEA,MAAMG,eAAe,IAAI,CAACC,iBAAiB,CAACjB,UAAUC;QAEtD,MAAMiB,iBAAiB,MAAM,IAAI,CAACvB,YAAY,CAACwB,IAAI,CAACC,WAAW,CAACC,MAAM,CAAC;YACrEC,UAAU;gBACR;oBAAEC,MAAM;oBAAUxB,SAASiB;gBAAa;gBACxC;oBAAEO,MAAM;oBAAQxB,SAASyB,KAAKC,SAAS,CAAC1B;gBAAS;aAClD;YACD2B,OAAO,IAAI,CAAC9B,MAAM,CAAC8B,KAAK,IAAI;YAC5BC,aAAa;YACbC,OAAO;YACPC,mBAAmB;YACnBC,kBAAkB;YAClBC,iBAAiB;gBAAEC,MAAM;YAAc;QACzC;QAEA,MAAMC,oBAAoBf,eAAegB,OAAO,CAAC,EAAE,CAACC,OAAO,CAACpC,OAAO;QACnE,IAAI,CAACkC,mBAAmB,OAAO;QAE/B,IAAI;YACF,OAAOT,KAAKY,KAAK,CAACH;QACpB,EAAE,OAAM;YACN,OAAO;QACT;IACF;IAEA;;GAEC,GACD,AAAQhB,kBAAkBZ,UAAkB,EAAEC,UAAkB,EAAU;QACxE,MAAM+B,gBAAgB,CAAC,8DAA8D,EAAEhC,aAAa,CAAC,MAAM,EAAEA,YAAY,GAAG,GAAG,MAAM,EAAEC,WAAW;;4FAE1D,CAAC;QAEzF,IAAI,IAAI,CAACV,MAAM,CAACoB,YAAY,EAAE;YAC5B,OAAO,IAAI,CAACpB,MAAM,CAACoB,YAAY,CAAC;gBAAEX;gBAAYC;gBAAY+B;YAAc;QAC1E;QAEA,OAAOA;IACT;IAEA;;;;GAIC,GACD,AAAQvB,uBAA0C;QAChD,IAAI,OAAO,IAAI,CAAClB,MAAM,CAACM,MAAM,KAAK,YAAY,IAAI,CAACN,MAAM,CAACM,MAAM,CAACoC,SAAS,EAAE;YAC1E,OAAO,IAAI,CAAC1C,MAAM,CAACM,MAAM,CAACoC,SAAS;QACrC;QACA,OAAO,CAACC,OAAiBA,KAAKC,KAAK,CAAC,IAAIC,OAAO,GAAGC,IAAI,CAAC;IACzD;IAEA;;;;GAIC,GACD,AAAQjC,mBAA2B;QACjC,IAAI,OAAO,IAAI,CAACb,MAAM,CAACM,MAAM,KAAK,YAAY,IAAI,CAACN,MAAM,CAACM,MAAM,CAACM,OAAO,EAAE;YACxE,OAAO,IAAI,CAACZ,MAAM,CAACM,MAAM,CAACM,OAAO;QACnC;QACA,OAAO;IACT;IAEA,MAAcO,sBACZhB,OAAyB,EACzBc,WAA8B,EACK;QACnC,IAAI;YACF,MAAM8B,kBAAkB,MAAM,IAAI,CAACC,qBAAqB,CAAC7C,SAAS,OAAO8C;gBACvE,IAAI,OAAOA,UAAU,YAAYA,MAAMC,IAAI,IAAI,OAAOjC,YAAYgC;gBAClE,OAAOA;YACT;YAEA,OAAOF;QACT,EAAE,OAAM;YACN,OAAO;QACT;IACF;IAEA;;;;;GAKC,GACD,MAAcC,sBACZG,GAAY,EACZlC,WAA2D,EACzC;QAClB,IAAImC,MAAMC,OAAO,CAACF,MAAM;YACtB,OAAOrC,QAAQwC,GAAG,CAACH,IAAII,GAAG,CAAC,CAACC,OAAS,IAAI,CAACR,qBAAqB,CAACQ,MAAMvC;QACxE;QAEA,IAAIpB,SAASsD,MAAM;YACjB,MAAMM,SAAkC,CAAC;YACzC,KAAK,MAAM,CAACC,KAAKT,MAAM,IAAIU,OAAOC,OAAO,CAACT,KAAM;gBAC9CM,MAAM,CAACC,IAAI,GAAG,MAAM,IAAI,CAACV,qBAAqB,CAACC,OAAOhC;YACxD;YACA,OAAOwC;QACT;QAEA,OAAOxC,YAAYkC;IACrB;AACF;AAEA;;;;;;;;;;;;;;;CAeC,GACD,OAAO,SAASU,qBAAqB7D,MAA4B;IAC/D,OAAO,IAAIF,0BAA0BE;AACvC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=OpenAITranslation.provider.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OpenAITranslation.provider.test.d.ts","sourceRoot":"","sources":["../../../../src/server/modules/translation-providers/OpenAITranslation.provider.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,214 @@
1
+ import { describe, it, expect, vi, beforeEach } from 'vitest';
2
+ import { OpenAITranslationProvider } from './OpenAITranslation.provider';
3
+ // Mock OpenAI
4
+ vi.mock('openai', () => ({
5
+ default: vi.fn().mockImplementation(() => ({
6
+ chat: {
7
+ completions: {
8
+ create: vi.fn(),
9
+ },
10
+ },
11
+ })),
12
+ }));
13
+ describe('OpenAITranslationProvider', () => {
14
+ let provider;
15
+ let mockCreate;
16
+ beforeEach(async () => {
17
+ vi.clearAllMocks();
18
+ // Get the mocked OpenAI class
19
+ const OpenAI = (await import('openai')).default;
20
+ mockCreate = vi.fn();
21
+ OpenAI.mockImplementation(() => ({
22
+ chat: {
23
+ completions: {
24
+ create: mockCreate,
25
+ },
26
+ },
27
+ }));
28
+ provider = new OpenAITranslationProvider({ apiKey: 'test-api-key' });
29
+ });
30
+ describe('translate', () => {
31
+ it('calls OpenAI API with correct parameters', async () => {
32
+ mockCreate.mockResolvedValue({
33
+ choices: [{ message: { content: '{"0": "Hallo"}' } }],
34
+ });
35
+ await provider.translate({ 0: 'Hello' }, 'en', 'de');
36
+ expect(mockCreate).toHaveBeenCalledWith(expect.objectContaining({
37
+ model: 'gpt-4o',
38
+ temperature: 0,
39
+ response_format: { type: 'json_object' },
40
+ messages: expect.arrayContaining([
41
+ expect.objectContaining({ role: 'system' }),
42
+ expect.objectContaining({
43
+ role: 'user',
44
+ content: '{"0":"Hello"}',
45
+ }),
46
+ ]),
47
+ }));
48
+ });
49
+ it('returns parsed JSON response', async () => {
50
+ mockCreate.mockResolvedValue({
51
+ choices: [{ message: { content: '{"0": "Titel", "1": "Inhalt"}' } }],
52
+ });
53
+ const result = await provider.translate({ 0: 'Title', 1: 'Content' }, 'en', 'de');
54
+ expect(result).toEqual({ 0: 'Titel', 1: 'Inhalt' });
55
+ });
56
+ it('returns null when API returns empty content', async () => {
57
+ mockCreate.mockResolvedValue({
58
+ choices: [{ message: { content: null } }],
59
+ });
60
+ const result = await provider.translate({ 0: 'Hello' }, 'en', 'de');
61
+ expect(result).toBeNull();
62
+ });
63
+ it('returns null when API returns invalid JSON', async () => {
64
+ mockCreate.mockResolvedValue({
65
+ choices: [{ message: { content: 'not valid json' } }],
66
+ });
67
+ const result = await provider.translate({ 0: 'Hello' }, 'en', 'de');
68
+ expect(result).toBeNull();
69
+ });
70
+ it('includes source language in system prompt when provided', async () => {
71
+ mockCreate.mockResolvedValue({
72
+ choices: [{ message: { content: '{}' } }],
73
+ });
74
+ await provider.translate({ 0: 'Hello' }, 'en', 'de');
75
+ expect(mockCreate).toHaveBeenCalledWith(expect.objectContaining({
76
+ messages: expect.arrayContaining([
77
+ expect.objectContaining({
78
+ role: 'system',
79
+ content: expect.stringContaining('from en'),
80
+ }),
81
+ ]),
82
+ }));
83
+ });
84
+ });
85
+ describe('dryRun mode', () => {
86
+ describe('with dryRun: true (default transformer, no delay)', () => {
87
+ beforeEach(async () => {
88
+ provider = new OpenAITranslationProvider({ apiKey: 'test-key', dryRun: true });
89
+ });
90
+ it('does not call OpenAI API in dry run mode', async () => {
91
+ await provider.translate({ 0: 'Hello' }, 'en', 'de');
92
+ expect(mockCreate).not.toHaveBeenCalled();
93
+ });
94
+ it('returns mock translation with reversed text', async () => {
95
+ const result = await provider.translate({ 0: 'Hello World' }, 'en', 'de');
96
+ expect(result).toEqual({ 0: 'dlroW olleH' });
97
+ });
98
+ it('handles multiple indexed entries in dry run', async () => {
99
+ const content = {
100
+ 0: 'First text',
101
+ 1: 'Second text',
102
+ 2: 'Third text',
103
+ };
104
+ const result = await provider.translate(content, 'en', 'fr');
105
+ expect(result).toEqual({
106
+ 0: 'txet tsriF',
107
+ 1: 'txet dnoceS',
108
+ 2: 'txet drihT',
109
+ });
110
+ });
111
+ it('preserves empty strings in dry run', async () => {
112
+ const content = {
113
+ 0: 'Hello',
114
+ 1: '',
115
+ 2: 'World',
116
+ };
117
+ const result = await provider.translate(content, 'en', 'de');
118
+ expect(result).toEqual({
119
+ 0: 'olleH',
120
+ 1: '',
121
+ 2: 'dlroW',
122
+ });
123
+ });
124
+ it('handles whitespace-only strings in dry run', async () => {
125
+ const content = {
126
+ 0: 'Hello',
127
+ 1: ' ',
128
+ 2: 'World',
129
+ };
130
+ const result = await provider.translate(content, 'en', 'de');
131
+ // Whitespace-only strings are not transformed (value.trim() is empty)
132
+ expect(result).toEqual({
133
+ 0: 'olleH',
134
+ 1: ' ',
135
+ 2: 'dlroW',
136
+ });
137
+ });
138
+ });
139
+ describe('with custom transformer config', () => {
140
+ it('uses custom transformer function', async () => {
141
+ provider = new OpenAITranslationProvider({
142
+ apiKey: 'test-key',
143
+ dryRun: {
144
+ transform: (text) => `[TRANSLATED] ${text}`,
145
+ },
146
+ });
147
+ const result = await provider.translate({ 0: 'Hello World' }, 'en', 'de');
148
+ expect(result).toEqual({ 0: '[TRANSLATED] Hello World' });
149
+ });
150
+ it('uses custom transformer for multiple entries', async () => {
151
+ provider = new OpenAITranslationProvider({
152
+ apiKey: 'test-key',
153
+ dryRun: {
154
+ transform: (text) => text.toUpperCase(),
155
+ },
156
+ });
157
+ const content = {
158
+ 0: 'hello',
159
+ 1: 'world',
160
+ };
161
+ const result = await provider.translate(content, 'en', 'fr');
162
+ expect(result).toEqual({
163
+ 0: 'HELLO',
164
+ 1: 'WORLD',
165
+ });
166
+ });
167
+ it('does not call OpenAI API with custom transformer', async () => {
168
+ provider = new OpenAITranslationProvider({
169
+ apiKey: 'test-key',
170
+ dryRun: {
171
+ transform: (text) => `mock: ${text}`,
172
+ },
173
+ });
174
+ await provider.translate({ 0: 'Test' }, 'en', 'de');
175
+ expect(mockCreate).not.toHaveBeenCalled();
176
+ });
177
+ it('respects timeout option', async () => {
178
+ vi.useFakeTimers();
179
+ provider = new OpenAITranslationProvider({
180
+ apiKey: 'test-key',
181
+ dryRun: {
182
+ transform: (text) => `[T] ${text}`,
183
+ timeout: 1000,
184
+ },
185
+ });
186
+ const translatePromise = provider.translate({ 0: 'Hello' }, 'en', 'de');
187
+ // Should not resolve immediately
188
+ await vi.advanceTimersByTimeAsync(500);
189
+ // Advance past timeout
190
+ await vi.advanceTimersByTimeAsync(600);
191
+ const result = await translatePromise;
192
+ expect(result).toEqual({ 0: '[T] Hello' });
193
+ vi.useRealTimers();
194
+ });
195
+ it('supports async transformer function', async () => {
196
+ provider = new OpenAITranslationProvider({
197
+ apiKey: 'test-key',
198
+ dryRun: {
199
+ transform: async (text) => {
200
+ // Simulate async operation (e.g., external API call)
201
+ await new Promise((resolve) => setTimeout(resolve, 10));
202
+ return `[ASYNC] ${text}`;
203
+ },
204
+ },
205
+ });
206
+ const result = await provider.translate({ 0: 'Hello', 1: 'World' }, 'en', 'de');
207
+ expect(result).toEqual({
208
+ 0: '[ASYNC] Hello',
209
+ 1: '[ASYNC] World',
210
+ });
211
+ });
212
+ });
213
+ });
214
+ });
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Numeric index used as key in translation input and output.
3
+ * Represents the position of text in the original document structure.
4
+ */
5
+ export type TranslationIndex = number;
6
+ /**
7
+ * Input map of text content for translation.
8
+ * Keys are numeric indices that must be preserved in the output.
9
+ * Values are the text strings to translate.
10
+ *
11
+ * @example
12
+ * { 0: "Hello", 1: "World", 2: "Welcome to our site" }
13
+ */
14
+ export type TranslationInput = Record<TranslationIndex, string>;
15
+ /**
16
+ * Output of translation operation.
17
+ * Must have the same keys as input, with translated values.
18
+ *
19
+ * @example
20
+ * // Input: { 0: "Hello", 1: "World" }
21
+ * // Output: { 0: "Привет", 1: "Мир" }
22
+ */
23
+ export type TranslationOutput = Record<TranslationIndex, string>;
24
+ /**
25
+ * Interface for translation service providers.
26
+ *
27
+ * Implementations must:
28
+ * - Preserve all numeric keys from input
29
+ * - Return translated text values for each key
30
+ * - Return null on translation failure
31
+ * - Handle empty input gracefully
32
+ *
33
+ * @example
34
+ * ```typescript
35
+ * class MyProvider implements TranslationProvider {
36
+ * async translate(input, sourceLng, targetLng) {
37
+ * // Input: { 0: "Hello", 1: "World" }
38
+ * // Output: { 0: "Bonjour", 1: "Monde" }
39
+ * const output = await myTranslationAPI.translate(input, targetLng)
40
+ * return output
41
+ * }
42
+ * }
43
+ * ```
44
+ */
45
+ export interface TranslationProvider {
46
+ /**
47
+ * Translates indexed text content from source to target language.
48
+ *
49
+ * @param input - Map of index to text string. Keys must be preserved in output.
50
+ * @param sourceLng - Source language code (e.g., 'en', 'de'). May be empty for auto-detect.
51
+ * @param targetLng - Target language code (e.g., 'fr', 'es').
52
+ * @returns Translated output with same keys, or null on failure.
53
+ */
54
+ translate(input: TranslationInput, sourceLng: string, targetLng: string): Promise<TranslationOutput | null>;
55
+ }
56
+ //# sourceMappingURL=TranslationProvider.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TranslationProvider.interface.d.ts","sourceRoot":"","sources":["../../../../src/server/modules/translation-providers/TranslationProvider.interface.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAA;AAErC;;;;;;;GAOG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAA;AAE/D;;;;;;;GAOG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAA;AAEhE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;;;;;OAOG;IACH,SAAS,CAAC,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAA;CAC5G"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Numeric index used as key in translation input and output.
3
+ * Represents the position of text in the original document structure.
4
+ */ /**
5
+ * Interface for translation service providers.
6
+ *
7
+ * Implementations must:
8
+ * - Preserve all numeric keys from input
9
+ * - Return translated text values for each key
10
+ * - Return null on translation failure
11
+ * - Handle empty input gracefully
12
+ *
13
+ * @example
14
+ * ```typescript
15
+ * class MyProvider implements TranslationProvider {
16
+ * async translate(input, sourceLng, targetLng) {
17
+ * // Input: { 0: "Hello", 1: "World" }
18
+ * // Output: { 0: "Bonjour", 1: "Monde" }
19
+ * const output = await myTranslationAPI.translate(input, targetLng)
20
+ * return output
21
+ * }
22
+ * }
23
+ * ```
24
+ */ export { };
25
+
26
+ //# sourceMappingURL=TranslationProvider.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/server/modules/translation-providers/TranslationProvider.interface.ts"],"sourcesContent":["/**\n * Numeric index used as key in translation input and output.\n * Represents the position of text in the original document structure.\n */\nexport type TranslationIndex = number\n\n/**\n * Input map of text content for translation.\n * Keys are numeric indices that must be preserved in the output.\n * Values are the text strings to translate.\n *\n * @example\n * { 0: \"Hello\", 1: \"World\", 2: \"Welcome to our site\" }\n */\nexport type TranslationInput = Record<TranslationIndex, string>\n\n/**\n * Output of translation operation.\n * Must have the same keys as input, with translated values.\n *\n * @example\n * // Input: { 0: \"Hello\", 1: \"World\" }\n * // Output: { 0: \"Привет\", 1: \"Мир\" }\n */\nexport type TranslationOutput = Record<TranslationIndex, string>\n\n/**\n * Interface for translation service providers.\n *\n * Implementations must:\n * - Preserve all numeric keys from input\n * - Return translated text values for each key\n * - Return null on translation failure\n * - Handle empty input gracefully\n *\n * @example\n * ```typescript\n * class MyProvider implements TranslationProvider {\n * async translate(input, sourceLng, targetLng) {\n * // Input: { 0: \"Hello\", 1: \"World\" }\n * // Output: { 0: \"Bonjour\", 1: \"Monde\" }\n * const output = await myTranslationAPI.translate(input, targetLng)\n * return output\n * }\n * }\n * ```\n */\nexport interface TranslationProvider {\n /**\n * Translates indexed text content from source to target language.\n *\n * @param input - Map of index to text string. Keys must be preserved in output.\n * @param sourceLng - Source language code (e.g., 'en', 'de'). May be empty for auto-detect.\n * @param targetLng - Target language code (e.g., 'fr', 'es').\n * @returns Translated output with same keys, or null on failure.\n */\n translate(input: TranslationInput, sourceLng: string, targetLng: string): Promise<TranslationOutput | null>\n}\n"],"names":[],"mappings":"AAAA;;;CAGC,GAuBD;;;;;;;;;;;;;;;;;;;;CAoBC,GACD,WAUC"}
@@ -0,0 +1,3 @@
1
+ export type { TranslationProvider, TranslationInput, TranslationOutput, TranslationIndex, } from './TranslationProvider.interface';
2
+ export { OpenAITranslationProvider, createOpenAIProvider, type OpenAIProviderConfig, type DryRunConfig, type SystemPromptContext, } from './OpenAITranslation.provider';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/server/modules/translation-providers/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,iCAAiC,CAAA;AACxC,OAAO,EACL,yBAAyB,EACzB,oBAAoB,EACpB,KAAK,oBAAoB,EACzB,KAAK,YAAY,EACjB,KAAK,mBAAmB,GACzB,MAAM,8BAA8B,CAAA"}
@@ -0,0 +1,3 @@
1
+ export { OpenAITranslationProvider, createOpenAIProvider } from './OpenAITranslation.provider';
2
+
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/server/modules/translation-providers/index.ts"],"sourcesContent":["export type {\n TranslationProvider,\n TranslationInput,\n TranslationOutput,\n TranslationIndex,\n} from './TranslationProvider.interface'\nexport {\n OpenAITranslationProvider,\n createOpenAIProvider,\n type OpenAIProviderConfig,\n type DryRunConfig,\n type SystemPromptContext,\n} from './OpenAITranslation.provider'\n"],"names":["OpenAITranslationProvider","createOpenAIProvider"],"mappings":"AAMA,SACEA,yBAAyB,EACzBC,oBAAoB,QAIf,+BAA8B"}
@@ -0,0 +1,8 @@
1
+ import type { AccessGuard } from './types';
2
+ /**
3
+ * Default access guard that allows all requests
4
+ */
5
+ export declare class AnyAccessGuard implements AccessGuard {
6
+ check(): Promise<boolean>;
7
+ }
8
+ //# sourceMappingURL=AnyAccessGuard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AnyAccessGuard.d.ts","sourceRoot":"","sources":["../../../../src/server/shared/access/AnyAccessGuard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAE1C;;GAEG;AACH,qBAAa,cAAe,YAAW,WAAW;IAC1C,KAAK,IAAI,OAAO,CAAC,OAAO,CAAC;CAGhC"}