@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.
- package/LICENSE +21 -0
- package/README.md +410 -0
- package/dist/client/app/cache/CacheProvider.d.ts +7 -0
- package/dist/client/app/cache/CacheProvider.d.ts.map +1 -0
- package/dist/client/app/cache/CacheProvider.export.d.ts +9 -0
- package/dist/client/app/cache/CacheProvider.export.d.ts.map +1 -0
- package/dist/client/app/cache/CacheProvider.export.js +12 -0
- package/dist/client/app/cache/CacheProvider.export.js.map +1 -0
- package/dist/client/app/cache/CacheProvider.js +18 -0
- package/dist/client/app/cache/CacheProvider.js.map +1 -0
- package/dist/client/app/cache/CacheProvider.jsx +11 -0
- package/dist/client/app/config/TranslateKitConfigContext.d.ts +9 -0
- package/dist/client/app/config/TranslateKitConfigContext.d.ts.map +1 -0
- package/dist/client/app/config/TranslateKitConfigContext.js +23 -0
- package/dist/client/app/config/TranslateKitConfigContext.js.map +1 -0
- package/dist/client/app/config/TranslateKitConfigContext.jsx +13 -0
- package/dist/client/app/config/index.d.ts +3 -0
- package/dist/client/app/config/index.d.ts.map +1 -0
- package/dist/client/app/config/index.js +3 -0
- package/dist/client/app/config/index.js.map +1 -0
- package/dist/client/entities/translation/api/mutations/useCancelCollectionTranslations.d.ts +6 -0
- package/dist/client/entities/translation/api/mutations/useCancelCollectionTranslations.d.ts.map +1 -0
- package/dist/client/entities/translation/api/mutations/useCancelCollectionTranslations.js +27 -0
- package/dist/client/entities/translation/api/mutations/useCancelCollectionTranslations.js.map +1 -0
- package/dist/client/entities/translation/api/mutations/useCancelDocumentTranslation.d.ts +6 -0
- package/dist/client/entities/translation/api/mutations/useCancelDocumentTranslation.d.ts.map +1 -0
- package/dist/client/entities/translation/api/mutations/useCancelDocumentTranslation.js +34 -0
- package/dist/client/entities/translation/api/mutations/useCancelDocumentTranslation.js.map +1 -0
- package/dist/client/entities/translation/api/mutations/useQueueDocumentTranslation.d.ts +13 -0
- package/dist/client/entities/translation/api/mutations/useQueueDocumentTranslation.d.ts.map +1 -0
- package/dist/client/entities/translation/api/mutations/useQueueDocumentTranslation.js +33 -0
- package/dist/client/entities/translation/api/mutations/useQueueDocumentTranslation.js.map +1 -0
- package/dist/client/entities/translation/api/mutations/useQueueDocumentTranslations.d.ts +9 -0
- package/dist/client/entities/translation/api/mutations/useQueueDocumentTranslations.d.ts.map +1 -0
- package/dist/client/entities/translation/api/mutations/useQueueDocumentTranslations.js +20 -0
- package/dist/client/entities/translation/api/mutations/useQueueDocumentTranslations.js.map +1 -0
- package/dist/client/entities/translation/api/mutations/useRunDocumentTranslation.d.ts +6 -0
- package/dist/client/entities/translation/api/mutations/useRunDocumentTranslation.d.ts.map +1 -0
- package/dist/client/entities/translation/api/mutations/useRunDocumentTranslation.js +27 -0
- package/dist/client/entities/translation/api/mutations/useRunDocumentTranslation.js.map +1 -0
- package/dist/client/entities/translation/api/queries/useCollectionTranslationStatus.d.ts +179 -0
- package/dist/client/entities/translation/api/queries/useCollectionTranslationStatus.d.ts.map +1 -0
- package/dist/client/entities/translation/api/queries/useCollectionTranslationStatus.js +67 -0
- package/dist/client/entities/translation/api/queries/useCollectionTranslationStatus.js.map +1 -0
- package/dist/client/entities/translation/api/queries/useDocumentTranslation.d.ts +180 -0
- package/dist/client/entities/translation/api/queries/useDocumentTranslation.d.ts.map +1 -0
- package/dist/client/entities/translation/api/queries/useDocumentTranslation.js +55 -0
- package/dist/client/entities/translation/api/queries/useDocumentTranslation.js.map +1 -0
- package/dist/client/entities/translation/index.d.ts +21 -0
- package/dist/client/entities/translation/index.d.ts.map +1 -0
- package/dist/client/entities/translation/index.js +21 -0
- package/dist/client/entities/translation/index.js.map +1 -0
- package/dist/client/entities/translation/model/enums.d.ts +7 -0
- package/dist/client/entities/translation/model/enums.d.ts.map +1 -0
- package/dist/client/entities/translation/model/enums.js +9 -0
- package/dist/client/entities/translation/model/enums.js.map +1 -0
- package/dist/client/entities/translation/model/types.d.ts +48 -0
- package/dist/client/entities/translation/model/types.d.ts.map +1 -0
- package/dist/client/entities/translation/model/types.js +3 -0
- package/dist/client/entities/translation/model/types.js.map +1 -0
- package/dist/client/entities/translation/ui/CompletedTranslationStatus/CompletedTranslationStatus.d.ts +8 -0
- package/dist/client/entities/translation/ui/CompletedTranslationStatus/CompletedTranslationStatus.d.ts.map +1 -0
- package/dist/client/entities/translation/ui/CompletedTranslationStatus/CompletedTranslationStatus.js +45 -0
- package/dist/client/entities/translation/ui/CompletedTranslationStatus/CompletedTranslationStatus.js.map +1 -0
- package/dist/client/entities/translation/ui/CompletedTranslationStatus/CompletedTranslationStatus.jsx +25 -0
- package/dist/client/entities/translation/ui/CompletedTranslationStatus/index.d.ts +2 -0
- package/dist/client/entities/translation/ui/CompletedTranslationStatus/index.d.ts.map +1 -0
- package/dist/client/entities/translation/ui/CompletedTranslationStatus/index.js +3 -0
- package/dist/client/entities/translation/ui/CompletedTranslationStatus/index.js.map +1 -0
- package/dist/client/entities/translation/ui/FailedTranslationStatus/FailedTranslationStatus.d.ts +10 -0
- package/dist/client/entities/translation/ui/FailedTranslationStatus/FailedTranslationStatus.d.ts.map +1 -0
- package/dist/client/entities/translation/ui/FailedTranslationStatus/FailedTranslationStatus.js +54 -0
- package/dist/client/entities/translation/ui/FailedTranslationStatus/FailedTranslationStatus.js.map +1 -0
- package/dist/client/entities/translation/ui/FailedTranslationStatus/FailedTranslationStatus.jsx +24 -0
- package/dist/client/entities/translation/ui/FailedTranslationStatus/index.d.ts +2 -0
- package/dist/client/entities/translation/ui/FailedTranslationStatus/index.d.ts.map +1 -0
- package/dist/client/entities/translation/ui/FailedTranslationStatus/index.js +3 -0
- package/dist/client/entities/translation/ui/FailedTranslationStatus/index.js.map +1 -0
- package/dist/client/entities/translation/ui/PendingTranslationStatus/PendingTranslationStatus.d.ts +12 -0
- package/dist/client/entities/translation/ui/PendingTranslationStatus/PendingTranslationStatus.d.ts.map +1 -0
- package/dist/client/entities/translation/ui/PendingTranslationStatus/PendingTranslationStatus.js +83 -0
- package/dist/client/entities/translation/ui/PendingTranslationStatus/PendingTranslationStatus.js.map +1 -0
- package/dist/client/entities/translation/ui/PendingTranslationStatus/PendingTranslationStatus.jsx +38 -0
- package/dist/client/entities/translation/ui/PendingTranslationStatus/index.d.ts +2 -0
- package/dist/client/entities/translation/ui/PendingTranslationStatus/index.d.ts.map +1 -0
- package/dist/client/entities/translation/ui/PendingTranslationStatus/index.js +3 -0
- package/dist/client/entities/translation/ui/PendingTranslationStatus/index.js.map +1 -0
- package/dist/client/entities/translation/ui/RunningTranslationStatus/RunningTranslationStatus.d.ts +11 -0
- package/dist/client/entities/translation/ui/RunningTranslationStatus/RunningTranslationStatus.d.ts.map +1 -0
- package/dist/client/entities/translation/ui/RunningTranslationStatus/RunningTranslationStatus.js +66 -0
- package/dist/client/entities/translation/ui/RunningTranslationStatus/RunningTranslationStatus.js.map +1 -0
- package/dist/client/entities/translation/ui/RunningTranslationStatus/RunningTranslationStatus.jsx +32 -0
- package/dist/client/entities/translation/ui/RunningTranslationStatus/index.d.ts +2 -0
- package/dist/client/entities/translation/ui/RunningTranslationStatus/index.d.ts.map +1 -0
- package/dist/client/entities/translation/ui/RunningTranslationStatus/index.js +3 -0
- package/dist/client/entities/translation/ui/RunningTranslationStatus/index.js.map +1 -0
- package/dist/client/entities/translation/ui/TranslationDirection/TranslationDirection.d.ts +8 -0
- package/dist/client/entities/translation/ui/TranslationDirection/TranslationDirection.d.ts.map +1 -0
- package/dist/client/entities/translation/ui/TranslationDirection/TranslationDirection.js +28 -0
- package/dist/client/entities/translation/ui/TranslationDirection/TranslationDirection.js.map +1 -0
- package/dist/client/entities/translation/ui/TranslationDirection/TranslationDirection.jsx +16 -0
- package/dist/client/entities/translation/ui/TranslationDirection/index.d.ts +2 -0
- package/dist/client/entities/translation/ui/TranslationDirection/index.d.ts.map +1 -0
- package/dist/client/entities/translation/ui/TranslationDirection/index.js +3 -0
- package/dist/client/entities/translation/ui/TranslationDirection/index.js.map +1 -0
- package/dist/client/features/collection-translation-form/index.client.d.ts +2 -0
- package/dist/client/features/collection-translation-form/index.client.d.ts.map +1 -0
- package/dist/client/features/collection-translation-form/index.client.js +3 -0
- package/dist/client/features/collection-translation-form/index.client.js.map +1 -0
- package/dist/client/features/collection-translation-form/index.d.ts +4 -0
- package/dist/client/features/collection-translation-form/index.d.ts.map +1 -0
- package/dist/client/features/collection-translation-form/index.js +4 -0
- package/dist/client/features/collection-translation-form/index.js.map +1 -0
- package/dist/client/features/collection-translation-form/model/constants.d.ts +16 -0
- package/dist/client/features/collection-translation-form/model/constants.d.ts.map +1 -0
- package/dist/client/features/collection-translation-form/model/constants.js +16 -0
- package/dist/client/features/collection-translation-form/model/constants.js.map +1 -0
- package/dist/client/features/collection-translation-form/model/form-model.d.ts +12 -0
- package/dist/client/features/collection-translation-form/model/form-model.d.ts.map +1 -0
- package/dist/client/features/collection-translation-form/model/form-model.js +32 -0
- package/dist/client/features/collection-translation-form/model/form-model.js.map +1 -0
- package/dist/client/features/collection-translation-form/model/index.d.ts +9 -0
- package/dist/client/features/collection-translation-form/model/index.d.ts.map +1 -0
- package/dist/client/features/collection-translation-form/model/index.js +6 -0
- package/dist/client/features/collection-translation-form/model/index.js.map +1 -0
- package/dist/client/features/collection-translation-form/model/schema.d.ts +23 -0
- package/dist/client/features/collection-translation-form/model/schema.d.ts.map +1 -0
- package/dist/client/features/collection-translation-form/model/schema.js +14 -0
- package/dist/client/features/collection-translation-form/model/schema.js.map +1 -0
- package/dist/client/features/collection-translation-form/ui/CollectionTranslationForm.d.ts +11 -0
- package/dist/client/features/collection-translation-form/ui/CollectionTranslationForm.d.ts.map +1 -0
- package/dist/client/features/collection-translation-form/ui/CollectionTranslationForm.js +64 -0
- package/dist/client/features/collection-translation-form/ui/CollectionTranslationForm.js.map +1 -0
- package/dist/client/features/collection-translation-form/ui/CollectionTranslationForm.jsx +25 -0
- package/dist/client/features/collection-translation-form/ui/index.d.ts +2 -0
- package/dist/client/features/collection-translation-form/ui/index.d.ts.map +1 -0
- package/dist/client/features/collection-translation-form/ui/index.js +3 -0
- package/dist/client/features/collection-translation-form/ui/index.js.map +1 -0
- package/dist/client/features/collection-translation-popup/index.d.ts +2 -0
- package/dist/client/features/collection-translation-popup/index.d.ts.map +1 -0
- package/dist/client/features/collection-translation-popup/index.js +3 -0
- package/dist/client/features/collection-translation-popup/index.js.map +1 -0
- package/dist/client/features/collection-translation-popup/ui/CollectionTranslationPopup.d.ts +8 -0
- package/dist/client/features/collection-translation-popup/ui/CollectionTranslationPopup.d.ts.map +1 -0
- package/dist/client/features/collection-translation-popup/ui/CollectionTranslationPopup.js +48 -0
- package/dist/client/features/collection-translation-popup/ui/CollectionTranslationPopup.js.map +1 -0
- package/dist/client/features/collection-translation-popup/ui/CollectionTranslationPopup.jsx +23 -0
- package/dist/client/features/collection-translation-progress/index.d.ts +2 -0
- package/dist/client/features/collection-translation-progress/index.d.ts.map +1 -0
- package/dist/client/features/collection-translation-progress/index.js +3 -0
- package/dist/client/features/collection-translation-progress/index.js.map +1 -0
- package/dist/client/features/collection-translation-progress/ui/CollectionTranslationProgress.d.ts +9 -0
- package/dist/client/features/collection-translation-progress/ui/CollectionTranslationProgress.d.ts.map +1 -0
- package/dist/client/features/collection-translation-progress/ui/CollectionTranslationProgress.js +108 -0
- package/dist/client/features/collection-translation-progress/ui/CollectionTranslationProgress.js.map +1 -0
- package/dist/client/features/collection-translation-progress/ui/CollectionTranslationProgress.jsx +47 -0
- package/dist/client/features/document-translation-progress-failed/index.d.ts +2 -0
- package/dist/client/features/document-translation-progress-failed/index.d.ts.map +1 -0
- package/dist/client/features/document-translation-progress-failed/index.js +3 -0
- package/dist/client/features/document-translation-progress-failed/index.js.map +1 -0
- package/dist/client/features/document-translation-progress-failed/ui/DocumentTranslationProgressFailed.d.ts +7 -0
- package/dist/client/features/document-translation-progress-failed/ui/DocumentTranslationProgressFailed.d.ts.map +1 -0
- package/dist/client/features/document-translation-progress-failed/ui/DocumentTranslationProgressFailed.js +28 -0
- package/dist/client/features/document-translation-progress-failed/ui/DocumentTranslationProgressFailed.js.map +1 -0
- package/dist/client/features/document-translation-progress-failed/ui/DocumentTranslationProgressFailed.jsx +19 -0
- package/dist/client/features/document-translation-progress-pending/index.d.ts +2 -0
- package/dist/client/features/document-translation-progress-pending/index.d.ts.map +1 -0
- package/dist/client/features/document-translation-progress-pending/index.js +3 -0
- package/dist/client/features/document-translation-progress-pending/index.js.map +1 -0
- package/dist/client/features/document-translation-progress-pending/ui/DocumentTranslationProgressPending.d.ts +7 -0
- package/dist/client/features/document-translation-progress-pending/ui/DocumentTranslationProgressPending.d.ts.map +1 -0
- package/dist/client/features/document-translation-progress-pending/ui/DocumentTranslationProgressPending.js +44 -0
- package/dist/client/features/document-translation-progress-pending/ui/DocumentTranslationProgressPending.js.map +1 -0
- package/dist/client/features/document-translation-progress-pending/ui/DocumentTranslationProgressPending.jsx +34 -0
- package/dist/client/features/document-translation-progress-running/index.d.ts +2 -0
- package/dist/client/features/document-translation-progress-running/index.d.ts.map +1 -0
- package/dist/client/features/document-translation-progress-running/index.js +3 -0
- package/dist/client/features/document-translation-progress-running/index.js.map +1 -0
- package/dist/client/features/document-translation-progress-running/ui/DocumentTranslationProgressRunning.d.ts +7 -0
- package/dist/client/features/document-translation-progress-running/ui/DocumentTranslationProgressRunning.d.ts.map +1 -0
- package/dist/client/features/document-translation-progress-running/ui/DocumentTranslationProgressRunning.js +28 -0
- package/dist/client/features/document-translation-progress-running/ui/DocumentTranslationProgressRunning.js.map +1 -0
- package/dist/client/features/document-translation-progress-running/ui/DocumentTranslationProgressRunning.jsx +19 -0
- package/dist/client/features/open-document-translation-popup/index.d.ts +2 -0
- package/dist/client/features/open-document-translation-popup/index.d.ts.map +1 -0
- package/dist/client/features/open-document-translation-popup/index.js +3 -0
- package/dist/client/features/open-document-translation-popup/index.js.map +1 -0
- package/dist/client/features/open-document-translation-popup/ui/OpenDocumentTranslationPopup.d.ts +10 -0
- package/dist/client/features/open-document-translation-popup/ui/OpenDocumentTranslationPopup.d.ts.map +1 -0
- package/dist/client/features/open-document-translation-popup/ui/OpenDocumentTranslationPopup.js +35 -0
- package/dist/client/features/open-document-translation-popup/ui/OpenDocumentTranslationPopup.js.map +1 -0
- package/dist/client/features/open-document-translation-popup/ui/OpenDocumentTranslationPopup.jsx +15 -0
- package/dist/client/features/translate-document-form/index.client.d.ts +2 -0
- package/dist/client/features/translate-document-form/index.client.d.ts.map +1 -0
- package/dist/client/features/translate-document-form/index.client.js +3 -0
- package/dist/client/features/translate-document-form/index.client.js.map +1 -0
- package/dist/client/features/translate-document-form/index.d.ts +4 -0
- package/dist/client/features/translate-document-form/index.d.ts.map +1 -0
- package/dist/client/features/translate-document-form/index.js +4 -0
- package/dist/client/features/translate-document-form/index.js.map +1 -0
- package/dist/client/features/translate-document-form/model/constants.d.ts +18 -0
- package/dist/client/features/translate-document-form/model/constants.d.ts.map +1 -0
- package/dist/client/features/translate-document-form/model/constants.js +18 -0
- package/dist/client/features/translate-document-form/model/constants.js.map +1 -0
- package/dist/client/features/translate-document-form/model/form-model.d.ts +12 -0
- package/dist/client/features/translate-document-form/model/form-model.d.ts.map +1 -0
- package/dist/client/features/translate-document-form/model/form-model.js +32 -0
- package/dist/client/features/translate-document-form/model/form-model.js.map +1 -0
- package/dist/client/features/translate-document-form/model/index.d.ts +9 -0
- package/dist/client/features/translate-document-form/model/index.d.ts.map +1 -0
- package/dist/client/features/translate-document-form/model/index.js +6 -0
- package/dist/client/features/translate-document-form/model/index.js.map +1 -0
- package/dist/client/features/translate-document-form/model/schema.d.ts +26 -0
- package/dist/client/features/translate-document-form/model/schema.d.ts.map +1 -0
- package/dist/client/features/translate-document-form/model/schema.js +15 -0
- package/dist/client/features/translate-document-form/model/schema.js.map +1 -0
- package/dist/client/features/translate-document-form/ui/DocumentTranslationForm.d.ts +10 -0
- package/dist/client/features/translate-document-form/ui/DocumentTranslationForm.d.ts.map +1 -0
- package/dist/client/features/translate-document-form/ui/DocumentTranslationForm.js +57 -0
- package/dist/client/features/translate-document-form/ui/DocumentTranslationForm.js.map +1 -0
- package/dist/client/features/translate-document-form/ui/DocumentTranslationForm.jsx +24 -0
- package/dist/client/features/translate-document-form/ui/index.d.ts +2 -0
- package/dist/client/features/translate-document-form/ui/index.d.ts.map +1 -0
- package/dist/client/features/translate-document-form/ui/index.js +3 -0
- package/dist/client/features/translate-document-form/ui/index.js.map +1 -0
- package/dist/client/shared/lib/assets/icons/LanguageTranslateIcon.d.ts +2 -0
- package/dist/client/shared/lib/assets/icons/LanguageTranslateIcon.d.ts.map +1 -0
- package/dist/client/shared/lib/assets/icons/LanguageTranslateIcon.js +18 -0
- package/dist/client/shared/lib/assets/icons/LanguageTranslateIcon.js.map +1 -0
- package/dist/client/shared/lib/assets/icons/LanguageTranslateIcon.jsx +4 -0
- package/dist/client/shared/lib/assets/icons/QuestionCircleIcon.d.ts +2 -0
- package/dist/client/shared/lib/assets/icons/QuestionCircleIcon.d.ts.map +1 -0
- package/dist/client/shared/lib/assets/icons/QuestionCircleIcon.js +16 -0
- package/dist/client/shared/lib/assets/icons/QuestionCircleIcon.js.map +1 -0
- package/dist/client/shared/lib/assets/icons/QuestionCircleIcon.jsx +3 -0
- package/dist/client/shared/lib/assets/icons/ReloadIcon.d.ts +2 -0
- package/dist/client/shared/lib/assets/icons/ReloadIcon.d.ts.map +1 -0
- package/dist/client/shared/lib/assets/icons/ReloadIcon.js +14 -0
- package/dist/client/shared/lib/assets/icons/ReloadIcon.js.map +1 -0
- package/dist/client/shared/lib/assets/icons/ReloadIcon.jsx +3 -0
- package/dist/client/shared/lib/errors/handleApiError.d.ts +8 -0
- package/dist/client/shared/lib/errors/handleApiError.d.ts.map +1 -0
- package/dist/client/shared/lib/errors/handleApiError.js +24 -0
- package/dist/client/shared/lib/errors/handleApiError.js.map +1 -0
- package/dist/client/shared/lib/forms/handle-form-error.d.ts +3 -0
- package/dist/client/shared/lib/forms/handle-form-error.d.ts.map +1 -0
- package/dist/client/shared/lib/forms/handle-form-error.js +26 -0
- package/dist/client/shared/lib/forms/handle-form-error.js.map +1 -0
- package/dist/client/shared/lib/payload/hooks/useCollectionDashboardUrlParams.d.ts +7 -0
- package/dist/client/shared/lib/payload/hooks/useCollectionDashboardUrlParams.d.ts.map +1 -0
- package/dist/client/shared/lib/payload/hooks/useCollectionDashboardUrlParams.js +12 -0
- package/dist/client/shared/lib/payload/hooks/useCollectionDashboardUrlParams.js.map +1 -0
- package/dist/client/shared/lib/payload/hooks/useCollectionDocumentUrlParams.d.ts +9 -0
- package/dist/client/shared/lib/payload/hooks/useCollectionDocumentUrlParams.d.ts.map +1 -0
- package/dist/client/shared/lib/payload/hooks/useCollectionDocumentUrlParams.js +14 -0
- package/dist/client/shared/lib/payload/hooks/useCollectionDocumentUrlParams.js.map +1 -0
- package/dist/client/shared/lib/payload/hooks/useLocaleOptions.d.ts +5 -0
- package/dist/client/shared/lib/payload/hooks/useLocaleOptions.d.ts.map +1 -0
- package/dist/client/shared/lib/payload/hooks/useLocaleOptions.js +13 -0
- package/dist/client/shared/lib/payload/hooks/useLocaleOptions.js.map +1 -0
- package/dist/client/shared/lib/utils/errors/handleApiError.d.ts +8 -0
- package/dist/client/shared/lib/utils/errors/handleApiError.d.ts.map +1 -0
- package/dist/client/shared/lib/utils/errors/handleApiError.js +24 -0
- package/dist/client/shared/lib/utils/errors/handleApiError.js.map +1 -0
- package/dist/client/shared/lib/utils/react/useToggle.d.ts +7 -0
- package/dist/client/shared/lib/utils/react/useToggle.d.ts.map +1 -0
- package/dist/client/shared/lib/utils/react/useToggle.js +24 -0
- package/dist/client/shared/lib/utils/react/useToggle.js.map +1 -0
- package/dist/client/shared/providers/CacheClientProvider/CacheClientProvider.factory.d.ts +32 -0
- package/dist/client/shared/providers/CacheClientProvider/CacheClientProvider.factory.d.ts.map +1 -0
- package/dist/client/shared/providers/CacheClientProvider/CacheClientProvider.factory.js +66 -0
- package/dist/client/shared/providers/CacheClientProvider/CacheClientProvider.factory.js.map +1 -0
- package/dist/client/shared/providers/CacheClientProvider/index.d.ts +2 -0
- package/dist/client/shared/providers/CacheClientProvider/index.d.ts.map +1 -0
- package/dist/client/shared/providers/CacheClientProvider/index.js +3 -0
- package/dist/client/shared/providers/CacheClientProvider/index.js.map +1 -0
- package/dist/client/shared/types/AccessGuard.d.ts +12 -0
- package/dist/client/shared/types/AccessGuard.d.ts.map +1 -0
- package/dist/client/shared/types/AccessGuard.js +3 -0
- package/dist/client/shared/types/AccessGuard.js.map +1 -0
- package/dist/client/shared/types/PayloadComponentExport.d.ts +3 -0
- package/dist/client/shared/types/PayloadComponentExport.d.ts.map +1 -0
- package/dist/client/shared/types/PayloadComponentExport.js +3 -0
- package/dist/client/shared/types/PayloadComponentExport.js.map +1 -0
- package/dist/client/shared/ui/Alert/Alert.d.ts +10 -0
- package/dist/client/shared/ui/Alert/Alert.d.ts.map +1 -0
- package/dist/client/shared/ui/Alert/Alert.js +40 -0
- package/dist/client/shared/ui/Alert/Alert.js.map +1 -0
- package/dist/client/shared/ui/Alert/Alert.jsx +33 -0
- package/dist/client/shared/ui/Alert/index.d.ts +2 -0
- package/dist/client/shared/ui/Alert/index.d.ts.map +1 -0
- package/dist/client/shared/ui/Alert/index.js +3 -0
- package/dist/client/shared/ui/Alert/index.js.map +1 -0
- package/dist/client/shared/ui/Button/Button.d.ts +12 -0
- package/dist/client/shared/ui/Button/Button.d.ts.map +1 -0
- package/dist/client/shared/ui/Button/Button.js +47 -0
- package/dist/client/shared/ui/Button/Button.js.map +1 -0
- package/dist/client/shared/ui/Button/Button.jsx +35 -0
- package/dist/client/shared/ui/Button/index.d.ts +2 -0
- package/dist/client/shared/ui/Button/index.d.ts.map +1 -0
- package/dist/client/shared/ui/Button/index.js +3 -0
- package/dist/client/shared/ui/Button/index.js.map +1 -0
- package/dist/client/shared/ui/Checkbox/Checkbox.d.ts +7 -0
- package/dist/client/shared/ui/Checkbox/Checkbox.d.ts.map +1 -0
- package/dist/client/shared/ui/Checkbox/Checkbox.js +14 -0
- package/dist/client/shared/ui/Checkbox/Checkbox.js.map +1 -0
- package/dist/client/shared/ui/Checkbox/Checkbox.jsx +6 -0
- package/dist/client/shared/ui/Checkbox/index.d.ts +2 -0
- package/dist/client/shared/ui/Checkbox/index.d.ts.map +1 -0
- package/dist/client/shared/ui/Checkbox/index.js +3 -0
- package/dist/client/shared/ui/Checkbox/index.js.map +1 -0
- package/dist/client/shared/ui/ColorIndicator/ColorIndicator.d.ts +9 -0
- package/dist/client/shared/ui/ColorIndicator/ColorIndicator.d.ts.map +1 -0
- package/dist/client/shared/ui/ColorIndicator/ColorIndicator.js +13 -0
- package/dist/client/shared/ui/ColorIndicator/ColorIndicator.js.map +1 -0
- package/dist/client/shared/ui/ColorIndicator/ColorIndicator.jsx +7 -0
- package/dist/client/shared/ui/ColorIndicator/index.d.ts +2 -0
- package/dist/client/shared/ui/ColorIndicator/index.d.ts.map +1 -0
- package/dist/client/shared/ui/ColorIndicator/index.js +3 -0
- package/dist/client/shared/ui/ColorIndicator/index.js.map +1 -0
- package/dist/client/shared/ui/Description/Description.d.ts +8 -0
- package/dist/client/shared/ui/Description/Description.d.ts.map +1 -0
- package/dist/client/shared/ui/Description/Description.js +15 -0
- package/dist/client/shared/ui/Description/Description.js.map +1 -0
- package/dist/client/shared/ui/Description/Description.jsx +7 -0
- package/dist/client/shared/ui/Description/index.d.ts +2 -0
- package/dist/client/shared/ui/Description/index.d.ts.map +1 -0
- package/dist/client/shared/ui/Description/index.js +3 -0
- package/dist/client/shared/ui/Description/index.js.map +1 -0
- package/dist/client/shared/ui/Divider/Divider.d.ts +11 -0
- package/dist/client/shared/ui/Divider/Divider.d.ts.map +1 -0
- package/dist/client/shared/ui/Divider/Divider.js +17 -0
- package/dist/client/shared/ui/Divider/Divider.js.map +1 -0
- package/dist/client/shared/ui/Divider/Divider.jsx +7 -0
- package/dist/client/shared/ui/Divider/index.d.ts +2 -0
- package/dist/client/shared/ui/Divider/index.d.ts.map +1 -0
- package/dist/client/shared/ui/Divider/index.js +3 -0
- package/dist/client/shared/ui/Divider/index.js.map +1 -0
- package/dist/client/shared/ui/Label/Label.d.ts +7 -0
- package/dist/client/shared/ui/Label/Label.d.ts.map +1 -0
- package/dist/client/shared/ui/Label/Label.js +20 -0
- package/dist/client/shared/ui/Label/Label.js.map +1 -0
- package/dist/client/shared/ui/Label/Label.jsx +9 -0
- package/dist/client/shared/ui/Label/index.d.ts +2 -0
- package/dist/client/shared/ui/Label/index.d.ts.map +1 -0
- package/dist/client/shared/ui/Label/index.js +3 -0
- package/dist/client/shared/ui/Label/index.js.map +1 -0
- package/dist/client/shared/ui/Loading/Loading.d.ts +8 -0
- package/dist/client/shared/ui/Loading/Loading.d.ts.map +1 -0
- package/dist/client/shared/ui/Loading/Loading.js +26 -0
- package/dist/client/shared/ui/Loading/Loading.js.map +1 -0
- package/dist/client/shared/ui/Loading/Loading.jsx +11 -0
- package/dist/client/shared/ui/Loading/index.d.ts +2 -0
- package/dist/client/shared/ui/Loading/index.d.ts.map +1 -0
- package/dist/client/shared/ui/Loading/index.js +3 -0
- package/dist/client/shared/ui/Loading/index.js.map +1 -0
- package/dist/client/shared/ui/Popup/Popup.d.ts +11 -0
- package/dist/client/shared/ui/Popup/Popup.d.ts.map +1 -0
- package/dist/client/shared/ui/Popup/Popup.js +27 -0
- package/dist/client/shared/ui/Popup/Popup.js.map +1 -0
- package/dist/client/shared/ui/Popup/Popup.jsx +13 -0
- package/dist/client/shared/ui/Popup/index.d.ts +2 -0
- package/dist/client/shared/ui/Popup/index.d.ts.map +1 -0
- package/dist/client/shared/ui/Popup/index.js +3 -0
- package/dist/client/shared/ui/Popup/index.js.map +1 -0
- package/dist/client/shared/ui/ProgressBar/ProgressBar.d.ts +10 -0
- package/dist/client/shared/ui/ProgressBar/ProgressBar.d.ts.map +1 -0
- package/dist/client/shared/ui/ProgressBar/ProgressBar.js +29 -0
- package/dist/client/shared/ui/ProgressBar/ProgressBar.js.map +1 -0
- package/dist/client/shared/ui/ProgressBar/ProgressBar.jsx +11 -0
- package/dist/client/shared/ui/ProgressBar/index.d.ts +2 -0
- package/dist/client/shared/ui/ProgressBar/index.d.ts.map +1 -0
- package/dist/client/shared/ui/ProgressBar/index.js +3 -0
- package/dist/client/shared/ui/ProgressBar/index.js.map +1 -0
- package/dist/client/shared/ui/Select/Select.d.ts +20 -0
- package/dist/client/shared/ui/Select/Select.d.ts.map +1 -0
- package/dist/client/shared/ui/Select/Select.js +54 -0
- package/dist/client/shared/ui/Select/Select.js.map +1 -0
- package/dist/client/shared/ui/Select/Select.jsx +41 -0
- package/dist/client/shared/ui/Select/index.d.ts +2 -0
- package/dist/client/shared/ui/Select/index.d.ts.map +1 -0
- package/dist/client/shared/ui/Select/index.js +3 -0
- package/dist/client/shared/ui/Select/index.js.map +1 -0
- package/dist/client/shared/ui/StatusCounter/StatusCounter.d.ts +11 -0
- package/dist/client/shared/ui/StatusCounter/StatusCounter.d.ts.map +1 -0
- package/dist/client/shared/ui/StatusCounter/StatusCounter.js +45 -0
- package/dist/client/shared/ui/StatusCounter/StatusCounter.js.map +1 -0
- package/dist/client/shared/ui/StatusCounter/StatusCounter.jsx +26 -0
- package/dist/client/shared/ui/StatusCounter/index.d.ts +2 -0
- package/dist/client/shared/ui/StatusCounter/index.d.ts.map +1 -0
- package/dist/client/shared/ui/StatusCounter/index.js +3 -0
- package/dist/client/shared/ui/StatusCounter/index.js.map +1 -0
- package/dist/client/shared/ui/StatusIndicator/StatusIndicator.d.ts +10 -0
- package/dist/client/shared/ui/StatusIndicator/StatusIndicator.d.ts.map +1 -0
- package/dist/client/shared/ui/StatusIndicator/StatusIndicator.js +20 -0
- package/dist/client/shared/ui/StatusIndicator/StatusIndicator.js.map +1 -0
- package/dist/client/shared/ui/StatusIndicator/StatusIndicator.jsx +10 -0
- package/dist/client/shared/ui/StatusIndicator/index.d.ts +2 -0
- package/dist/client/shared/ui/StatusIndicator/index.d.ts.map +1 -0
- package/dist/client/shared/ui/StatusIndicator/index.js +3 -0
- package/dist/client/shared/ui/StatusIndicator/index.js.map +1 -0
- package/dist/client/shared/ui/Tooltip/Tooltip.d.ts +11 -0
- package/dist/client/shared/ui/Tooltip/Tooltip.d.ts.map +1 -0
- package/dist/client/shared/ui/Tooltip/Tooltip.js +32 -0
- package/dist/client/shared/ui/Tooltip/Tooltip.js.map +1 -0
- package/dist/client/shared/ui/Tooltip/Tooltip.jsx +16 -0
- package/dist/client/shared/ui/Tooltip/index.d.ts +2 -0
- package/dist/client/shared/ui/Tooltip/index.d.ts.map +1 -0
- package/dist/client/shared/ui/Tooltip/index.js +3 -0
- package/dist/client/shared/ui/Tooltip/index.js.map +1 -0
- package/dist/client/shared/ui/form/FormCheckbox/FormCheckbox.d.ts +11 -0
- package/dist/client/shared/ui/form/FormCheckbox/FormCheckbox.d.ts.map +1 -0
- package/dist/client/shared/ui/form/FormCheckbox/FormCheckbox.js +51 -0
- package/dist/client/shared/ui/form/FormCheckbox/FormCheckbox.js.map +1 -0
- package/dist/client/shared/ui/form/FormCheckbox/FormCheckbox.jsx +24 -0
- package/dist/client/shared/ui/form/FormCheckbox/index.d.ts +2 -0
- package/dist/client/shared/ui/form/FormCheckbox/index.d.ts.map +1 -0
- package/dist/client/shared/ui/form/FormCheckbox/index.js +3 -0
- package/dist/client/shared/ui/form/FormCheckbox/index.js.map +1 -0
- package/dist/client/shared/ui/form/FormCheckboxPublish/FormCheckboxPublish.d.ts +8 -0
- package/dist/client/shared/ui/form/FormCheckboxPublish/FormCheckboxPublish.d.ts.map +1 -0
- package/dist/client/shared/ui/form/FormCheckboxPublish/FormCheckboxPublish.js +37 -0
- package/dist/client/shared/ui/form/FormCheckboxPublish/FormCheckboxPublish.js.map +1 -0
- package/dist/client/shared/ui/form/FormCheckboxPublish/FormCheckboxPublish.jsx +21 -0
- package/dist/client/shared/ui/form/FormCheckboxPublish/index.d.ts +2 -0
- package/dist/client/shared/ui/form/FormCheckboxPublish/index.d.ts.map +1 -0
- package/dist/client/shared/ui/form/FormCheckboxPublish/index.js +3 -0
- package/dist/client/shared/ui/form/FormCheckboxPublish/index.js.map +1 -0
- package/dist/client/shared/ui/form/FormSelect/FormSelect.d.ts +20 -0
- package/dist/client/shared/ui/form/FormSelect/FormSelect.d.ts.map +1 -0
- package/dist/client/shared/ui/form/FormSelect/FormSelect.js +88 -0
- package/dist/client/shared/ui/form/FormSelect/FormSelect.js.map +1 -0
- package/dist/client/shared/ui/form/FormSelect/FormSelect.jsx +44 -0
- package/dist/client/shared/ui/form/FormSelect/index.d.ts +2 -0
- package/dist/client/shared/ui/form/FormSelect/index.d.ts.map +1 -0
- package/dist/client/shared/ui/form/FormSelect/index.js +3 -0
- package/dist/client/shared/ui/form/FormSelect/index.js.map +1 -0
- package/dist/client/shared/ui/form/FormSelectLocale/FormSelectLocale.d.ts +12 -0
- package/dist/client/shared/ui/form/FormSelectLocale/FormSelectLocale.d.ts.map +1 -0
- package/dist/client/shared/ui/form/FormSelectLocale/FormSelectLocale.js +19 -0
- package/dist/client/shared/ui/form/FormSelectLocale/FormSelectLocale.js.map +1 -0
- package/dist/client/shared/ui/form/FormSelectLocale/FormSelectLocale.jsx +6 -0
- package/dist/client/shared/ui/form/FormSelectLocale/index.d.ts +2 -0
- package/dist/client/shared/ui/form/FormSelectLocale/index.d.ts.map +1 -0
- package/dist/client/shared/ui/form/FormSelectLocale/index.js +3 -0
- package/dist/client/shared/ui/form/FormSelectLocale/index.js.map +1 -0
- package/dist/client/shared/ui/form/FormSelectStrategy/FormSelectStrategy.d.ts +19 -0
- package/dist/client/shared/ui/form/FormSelectStrategy/FormSelectStrategy.d.ts.map +1 -0
- package/dist/client/shared/ui/form/FormSelectStrategy/FormSelectStrategy.js +59 -0
- package/dist/client/shared/ui/form/FormSelectStrategy/FormSelectStrategy.js.map +1 -0
- package/dist/client/shared/ui/form/FormSelectStrategy/FormSelectStrategy.jsx +25 -0
- package/dist/client/shared/ui/form/FormSelectStrategy/index.d.ts +3 -0
- package/dist/client/shared/ui/form/FormSelectStrategy/index.d.ts.map +1 -0
- package/dist/client/shared/ui/form/FormSelectStrategy/index.js +3 -0
- package/dist/client/shared/ui/form/FormSelectStrategy/index.js.map +1 -0
- package/dist/client/shared/utils/componentPath.d.ts +6 -0
- package/dist/client/shared/utils/componentPath.d.ts.map +1 -0
- package/dist/client/shared/utils/componentPath.js +9 -0
- package/dist/client/shared/utils/componentPath.js.map +1 -0
- package/dist/client/widgets/bulk-translation-dashboard/index.d.ts +2 -0
- package/dist/client/widgets/bulk-translation-dashboard/index.d.ts.map +1 -0
- package/dist/client/widgets/bulk-translation-dashboard/index.js +3 -0
- package/dist/client/widgets/bulk-translation-dashboard/index.js.map +1 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.d.ts +6 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.d.ts.map +1 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.export.d.ts +9 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.export.d.ts.map +1 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.export.js +15 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.export.js.map +1 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.export.jsx +11 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.js +78 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.js.map +1 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.jsx +55 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.server.d.ts +8 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.server.d.ts.map +1 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.server.js +24 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.server.js.map +1 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.server.jsx +17 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/index.d.ts +2 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/index.d.ts.map +1 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/index.js +3 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/index.js.map +1 -0
- package/dist/client/widgets/translate-document/index.d.ts +2 -0
- package/dist/client/widgets/translate-document/index.d.ts.map +1 -0
- package/dist/client/widgets/translate-document/index.js +3 -0
- package/dist/client/widgets/translate-document/index.js.map +1 -0
- package/dist/client/widgets/translate-document/ui/TranslateDocument.d.ts +6 -0
- package/dist/client/widgets/translate-document/ui/TranslateDocument.d.ts.map +1 -0
- package/dist/client/widgets/translate-document/ui/TranslateDocument.export.d.ts +11 -0
- package/dist/client/widgets/translate-document/ui/TranslateDocument.export.d.ts.map +1 -0
- package/dist/client/widgets/translate-document/ui/TranslateDocument.export.js +18 -0
- package/dist/client/widgets/translate-document/ui/TranslateDocument.export.js.map +1 -0
- package/dist/client/widgets/translate-document/ui/TranslateDocument.js +87 -0
- package/dist/client/widgets/translate-document/ui/TranslateDocument.js.map +1 -0
- package/dist/client/widgets/translate-document/ui/TranslateDocument.jsx +55 -0
- package/dist/client/widgets/translate-document/ui/TranslateDocument.server.d.ts +9 -0
- package/dist/client/widgets/translate-document/ui/TranslateDocument.server.d.ts.map +1 -0
- package/dist/client/widgets/translate-document/ui/TranslateDocument.server.js +23 -0
- package/dist/client/widgets/translate-document/ui/TranslateDocument.server.js.map +1 -0
- package/dist/client/widgets/translate-document/ui/TranslateDocument.server.jsx +16 -0
- package/dist/client/widgets/translate-document/ui/index.d.ts +2 -0
- package/dist/client/widgets/translate-document/ui/index.d.ts.map +1 -0
- package/dist/client/widgets/translate-document/ui/index.js +3 -0
- package/dist/client/widgets/translate-document/ui/index.js.map +1 -0
- package/dist/field-config.d.ts +48 -0
- package/dist/field-config.d.ts.map +1 -0
- package/dist/field-config.js +49 -0
- package/dist/field-config.js.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -0
- package/dist/plugin.d.ts +63 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/plugin.js +110 -0
- package/dist/plugin.js.map +1 -0
- package/dist/server/features/_lib/collection-utils.d.ts +10 -0
- package/dist/server/features/_lib/collection-utils.d.ts.map +1 -0
- package/dist/server/features/_lib/collection-utils.js +20 -0
- package/dist/server/features/_lib/collection-utils.js.map +1 -0
- package/dist/server/features/_lib/index.d.ts +2 -0
- package/dist/server/features/_lib/index.d.ts.map +1 -0
- package/dist/server/features/_lib/index.js +3 -0
- package/dist/server/features/_lib/index.js.map +1 -0
- package/dist/server/features/cancel/handler.d.ts +11 -0
- package/dist/server/features/cancel/handler.d.ts.map +1 -0
- package/dist/server/features/cancel/handler.js +20 -0
- package/dist/server/features/cancel/handler.js.map +1 -0
- package/dist/server/features/cancel/handler.test.d.ts +2 -0
- package/dist/server/features/cancel/handler.test.d.ts.map +1 -0
- package/dist/server/features/cancel/handler.test.js +63 -0
- package/dist/server/features/cancel/index.d.ts +2 -0
- package/dist/server/features/cancel/index.d.ts.map +1 -0
- package/dist/server/features/cancel/index.js +3 -0
- package/dist/server/features/cancel/index.js.map +1 -0
- package/dist/server/features/cancel/model.d.ts +12 -0
- package/dist/server/features/cancel/model.d.ts.map +1 -0
- package/dist/server/features/cancel/model.js +8 -0
- package/dist/server/features/cancel/model.js.map +1 -0
- package/dist/server/features/cancel/route.d.ts +8 -0
- package/dist/server/features/cancel/route.d.ts.map +1 -0
- package/dist/server/features/cancel/route.js +14 -0
- package/dist/server/features/cancel/route.js.map +1 -0
- package/dist/server/features/cancel-by-collection/handler.d.ts +13 -0
- package/dist/server/features/cancel-by-collection/handler.d.ts.map +1 -0
- package/dist/server/features/cancel-by-collection/handler.js +28 -0
- package/dist/server/features/cancel-by-collection/handler.js.map +1 -0
- package/dist/server/features/cancel-by-collection/handler.test.d.ts +2 -0
- package/dist/server/features/cancel-by-collection/handler.test.d.ts.map +1 -0
- package/dist/server/features/cancel-by-collection/handler.test.js +126 -0
- package/dist/server/features/cancel-by-collection/index.d.ts +2 -0
- package/dist/server/features/cancel-by-collection/index.d.ts.map +1 -0
- package/dist/server/features/cancel-by-collection/index.js +3 -0
- package/dist/server/features/cancel-by-collection/index.js.map +1 -0
- package/dist/server/features/cancel-by-collection/model.d.ts +19 -0
- package/dist/server/features/cancel-by-collection/model.d.ts.map +1 -0
- package/dist/server/features/cancel-by-collection/model.js +8 -0
- package/dist/server/features/cancel-by-collection/model.js.map +1 -0
- package/dist/server/features/cancel-by-collection/route.d.ts +9 -0
- package/dist/server/features/cancel-by-collection/route.d.ts.map +1 -0
- package/dist/server/features/cancel-by-collection/route.js +14 -0
- package/dist/server/features/cancel-by-collection/route.js.map +1 -0
- package/dist/server/features/enqueue-translation/handler.d.ts +13 -0
- package/dist/server/features/enqueue-translation/handler.d.ts.map +1 -0
- package/dist/server/features/enqueue-translation/handler.js +37 -0
- package/dist/server/features/enqueue-translation/handler.js.map +1 -0
- package/dist/server/features/enqueue-translation/handler.test.d.ts +2 -0
- package/dist/server/features/enqueue-translation/handler.test.d.ts.map +1 -0
- package/dist/server/features/enqueue-translation/handler.test.js +115 -0
- package/dist/server/features/enqueue-translation/index.d.ts +2 -0
- package/dist/server/features/enqueue-translation/index.d.ts.map +1 -0
- package/dist/server/features/enqueue-translation/index.js +3 -0
- package/dist/server/features/enqueue-translation/index.js.map +1 -0
- package/dist/server/features/enqueue-translation/model.d.ts +37 -0
- package/dist/server/features/enqueue-translation/model.d.ts.map +1 -0
- package/dist/server/features/enqueue-translation/model.js +17 -0
- package/dist/server/features/enqueue-translation/model.js.map +1 -0
- package/dist/server/features/enqueue-translation/route.d.ts +9 -0
- package/dist/server/features/enqueue-translation/route.d.ts.map +1 -0
- package/dist/server/features/enqueue-translation/route.js +14 -0
- package/dist/server/features/enqueue-translation/route.js.map +1 -0
- package/dist/server/features/get-collection-status/handler.d.ts +13 -0
- package/dist/server/features/get-collection-status/handler.d.ts.map +1 -0
- package/dist/server/features/get-collection-status/handler.js +29 -0
- package/dist/server/features/get-collection-status/handler.js.map +1 -0
- package/dist/server/features/get-collection-status/handler.test.d.ts +2 -0
- package/dist/server/features/get-collection-status/handler.test.d.ts.map +1 -0
- package/dist/server/features/get-collection-status/handler.test.js +108 -0
- package/dist/server/features/get-collection-status/index.d.ts +2 -0
- package/dist/server/features/get-collection-status/index.d.ts.map +1 -0
- package/dist/server/features/get-collection-status/index.js +3 -0
- package/dist/server/features/get-collection-status/index.js.map +1 -0
- package/dist/server/features/get-collection-status/model.d.ts +34 -0
- package/dist/server/features/get-collection-status/model.d.ts.map +1 -0
- package/dist/server/features/get-collection-status/model.js +8 -0
- package/dist/server/features/get-collection-status/model.js.map +1 -0
- package/dist/server/features/get-collection-status/route.d.ts +9 -0
- package/dist/server/features/get-collection-status/route.d.ts.map +1 -0
- package/dist/server/features/get-collection-status/route.js +14 -0
- package/dist/server/features/get-collection-status/route.js.map +1 -0
- package/dist/server/features/get-document-status/handler.d.ts +13 -0
- package/dist/server/features/get-document-status/handler.d.ts.map +1 -0
- package/dist/server/features/get-document-status/handler.js +27 -0
- package/dist/server/features/get-document-status/handler.js.map +1 -0
- package/dist/server/features/get-document-status/handler.test.d.ts +2 -0
- package/dist/server/features/get-document-status/handler.test.d.ts.map +1 -0
- package/dist/server/features/get-document-status/handler.test.js +138 -0
- package/dist/server/features/get-document-status/index.d.ts +3 -0
- package/dist/server/features/get-document-status/index.d.ts.map +1 -0
- package/dist/server/features/get-document-status/index.js +4 -0
- package/dist/server/features/get-document-status/index.js.map +1 -0
- package/dist/server/features/get-document-status/model.d.ts +59 -0
- package/dist/server/features/get-document-status/model.d.ts.map +1 -0
- package/dist/server/features/get-document-status/model.js +33 -0
- package/dist/server/features/get-document-status/model.js.map +1 -0
- package/dist/server/features/get-document-status/route.d.ts +9 -0
- package/dist/server/features/get-document-status/route.d.ts.map +1 -0
- package/dist/server/features/get-document-status/route.js +14 -0
- package/dist/server/features/get-document-status/route.js.map +1 -0
- package/dist/server/features/index.d.ts +7 -0
- package/dist/server/features/index.d.ts.map +1 -0
- package/dist/server/features/index.js +8 -0
- package/dist/server/features/index.js.map +1 -0
- package/dist/server/features/run-translation/handler.d.ts +11 -0
- package/dist/server/features/run-translation/handler.d.ts.map +1 -0
- package/dist/server/features/run-translation/handler.js +28 -0
- package/dist/server/features/run-translation/handler.js.map +1 -0
- package/dist/server/features/run-translation/handler.test.d.ts +2 -0
- package/dist/server/features/run-translation/handler.test.d.ts.map +1 -0
- package/dist/server/features/run-translation/handler.test.js +98 -0
- package/dist/server/features/run-translation/index.d.ts +2 -0
- package/dist/server/features/run-translation/index.d.ts.map +1 -0
- package/dist/server/features/run-translation/index.js +3 -0
- package/dist/server/features/run-translation/index.js.map +1 -0
- package/dist/server/features/run-translation/model.d.ts +12 -0
- package/dist/server/features/run-translation/model.d.ts.map +1 -0
- package/dist/server/features/run-translation/model.js +8 -0
- package/dist/server/features/run-translation/model.js.map +1 -0
- package/dist/server/features/run-translation/route.d.ts +8 -0
- package/dist/server/features/run-translation/route.d.ts.map +1 -0
- package/dist/server/features/run-translation/route.js +14 -0
- package/dist/server/features/run-translation/route.js.map +1 -0
- package/dist/server/features/translate-document/handler.d.ts +19 -0
- package/dist/server/features/translate-document/handler.d.ts.map +1 -0
- package/dist/server/features/translate-document/handler.js +69 -0
- package/dist/server/features/translate-document/handler.js.map +1 -0
- package/dist/server/features/translate-document/handler.test.d.ts +2 -0
- package/dist/server/features/translate-document/handler.test.d.ts.map +1 -0
- package/dist/server/features/translate-document/handler.test.js +171 -0
- package/dist/server/features/translate-document/index.d.ts +4 -0
- package/dist/server/features/translate-document/index.d.ts.map +1 -0
- package/dist/server/features/translate-document/index.js +4 -0
- package/dist/server/features/translate-document/index.js.map +1 -0
- package/dist/server/features/translate-document/model.d.ts +53 -0
- package/dist/server/features/translate-document/model.d.ts.map +1 -0
- package/dist/server/features/translate-document/model.js +30 -0
- package/dist/server/features/translate-document/model.js.map +1 -0
- package/dist/server/features/translate-document/task.d.ts +41 -0
- package/dist/server/features/translate-document/task.d.ts.map +1 -0
- package/dist/server/features/translate-document/task.js +44 -0
- package/dist/server/features/translate-document/task.js.map +1 -0
- package/dist/server/index.d.ts +4 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +5 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/modules/index.d.ts +3 -0
- package/dist/server/modules/index.d.ts.map +1 -0
- package/dist/server/modules/index.js +4 -0
- package/dist/server/modules/index.js.map +1 -0
- package/dist/server/modules/task-runner/TaskRunner.interface.d.ts +31 -0
- package/dist/server/modules/task-runner/TaskRunner.interface.d.ts.map +1 -0
- package/dist/server/modules/task-runner/TaskRunner.interface.js +10 -0
- package/dist/server/modules/task-runner/TaskRunner.interface.js.map +1 -0
- package/dist/server/modules/task-runner/TaskRunnerProvider.interface.d.ts +46 -0
- package/dist/server/modules/task-runner/TaskRunnerProvider.interface.d.ts.map +1 -0
- package/dist/server/modules/task-runner/TaskRunnerProvider.interface.js +11 -0
- package/dist/server/modules/task-runner/TaskRunnerProvider.interface.js.map +1 -0
- package/dist/server/modules/task-runner/index.d.ts +7 -0
- package/dist/server/modules/task-runner/index.d.ts.map +1 -0
- package/dist/server/modules/task-runner/index.js +4 -0
- package/dist/server/modules/task-runner/index.js.map +1 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsRunnerProvider.d.ts +20 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsRunnerProvider.d.ts.map +1 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsRunnerProvider.js +128 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsRunnerProvider.js.map +1 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsTaskRunner.d.ts +31 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsTaskRunner.d.ts.map +1 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsTaskRunner.js +165 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsTaskRunner.js.map +1 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsTaskRunner.test.d.ts +2 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsTaskRunner.test.d.ts.map +1 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsTaskRunner.test.js +188 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/index.d.ts +3 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/index.d.ts.map +1 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/index.js +3 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/index.js.map +1 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/normalizeJob.d.ts +7 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/normalizeJob.d.ts.map +1 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/normalizeJob.js +40 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/normalizeJob.js.map +1 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/normalizeJob.test.d.ts +2 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/normalizeJob.test.d.ts.map +1 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/normalizeJob.test.js +169 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/types.d.ts +85 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/types.d.ts.map +1 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/types.js +5 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/types.js.map +1 -0
- package/dist/server/modules/task-runner/sync-runner/SyncRunnerProvider.d.ts +25 -0
- package/dist/server/modules/task-runner/sync-runner/SyncRunnerProvider.d.ts.map +1 -0
- package/dist/server/modules/task-runner/sync-runner/SyncRunnerProvider.js +42 -0
- package/dist/server/modules/task-runner/sync-runner/SyncRunnerProvider.js.map +1 -0
- package/dist/server/modules/task-runner/sync-runner/SyncTaskRunner.d.ts +23 -0
- package/dist/server/modules/task-runner/sync-runner/SyncTaskRunner.d.ts.map +1 -0
- package/dist/server/modules/task-runner/sync-runner/SyncTaskRunner.js +72 -0
- package/dist/server/modules/task-runner/sync-runner/SyncTaskRunner.js.map +1 -0
- package/dist/server/modules/task-runner/sync-runner/SyncTaskRunner.test.d.ts +2 -0
- package/dist/server/modules/task-runner/sync-runner/SyncTaskRunner.test.d.ts.map +1 -0
- package/dist/server/modules/task-runner/sync-runner/SyncTaskRunner.test.js +148 -0
- package/dist/server/modules/task-runner/sync-runner/index.d.ts +2 -0
- package/dist/server/modules/task-runner/sync-runner/index.d.ts.map +1 -0
- package/dist/server/modules/task-runner/sync-runner/index.js +3 -0
- package/dist/server/modules/task-runner/sync-runner/index.js.map +1 -0
- package/dist/server/modules/task-runner/sync-runner/types.d.ts +18 -0
- package/dist/server/modules/task-runner/sync-runner/types.d.ts.map +1 -0
- package/dist/server/modules/task-runner/sync-runner/types.js +5 -0
- package/dist/server/modules/task-runner/sync-runner/types.js.map +1 -0
- package/dist/server/modules/task-runner/types.d.ts +41 -0
- package/dist/server/modules/task-runner/types.d.ts.map +1 -0
- package/dist/server/modules/task-runner/types.js +5 -0
- package/dist/server/modules/task-runner/types.js.map +1 -0
- package/dist/server/modules/translation-pipeline/TranslationPipeline.d.ts +35 -0
- package/dist/server/modules/translation-pipeline/TranslationPipeline.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/TranslationPipeline.js +55 -0
- package/dist/server/modules/translation-pipeline/TranslationPipeline.js.map +1 -0
- package/dist/server/modules/translation-pipeline/TranslationPipeline.test.d.ts +2 -0
- package/dist/server/modules/translation-pipeline/TranslationPipeline.test.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/TranslationPipeline.test.js +552 -0
- package/dist/server/modules/translation-pipeline/index.d.ts +4 -0
- package/dist/server/modules/translation-pipeline/index.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/index.js +4 -0
- package/dist/server/modules/translation-pipeline/index.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.d.ts +26 -0
- package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.js +97 -0
- package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.stage.d.ts +9 -0
- package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.stage.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.stage.js +15 -0
- package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.stage.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.test.d.ts +2 -0
- package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.test.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.test.js +294 -0
- package/dist/server/modules/translation-pipeline/stages/data-reconciler/index.d.ts +3 -0
- package/dist/server/modules/translation-pipeline/stages/data-reconciler/index.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/data-reconciler/index.js +4 -0
- package/dist/server/modules/translation-pipeline/stages/data-reconciler/index.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.d.ts +35 -0
- package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.js +128 -0
- package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.stage.d.ts +13 -0
- package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.stage.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.stage.js +23 -0
- package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.stage.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.test.d.ts +2 -0
- package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.test.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.test.js +737 -0
- package/dist/server/modules/translation-pipeline/stages/field-collector/index.d.ts +3 -0
- package/dist/server/modules/translation-pipeline/stages/field-collector/index.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/field-collector/index.js +4 -0
- package/dist/server/modules/translation-pipeline/stages/field-collector/index.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/index.d.ts +7 -0
- package/dist/server/modules/translation-pipeline/stages/index.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/index.js +7 -0
- package/dist/server/modules/translation-pipeline/stages/index.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/PlainTextExpander.d.ts +10 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/PlainTextExpander.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/PlainTextExpander.js +28 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/PlainTextExpander.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/RichTextExpander.d.ts +10 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/RichTextExpander.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/RichTextExpander.js +32 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/RichTextExpander.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.d.ts +24 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.js +34 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.stage.d.ts +11 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.stage.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.stage.js +29 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.stage.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.test.d.ts +2 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.test.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.test.js +396 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/TextExpander.interface.d.ts +27 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/TextExpander.interface.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/TextExpander.interface.js +6 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/TextExpander.interface.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/index.d.ts +7 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/index.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/index.js +6 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/index.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/translation/Translation.stage.d.ts +11 -0
- package/dist/server/modules/translation-pipeline/stages/translation/Translation.stage.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/translation/Translation.stage.js +23 -0
- package/dist/server/modules/translation-pipeline/stages/translation/Translation.stage.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/translation/index.d.ts +2 -0
- package/dist/server/modules/translation-pipeline/stages/translation/index.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/translation/index.js +3 -0
- package/dist/server/modules/translation-pipeline/stages/translation/index.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.d.ts +18 -0
- package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.js +27 -0
- package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.stage.d.ts +8 -0
- package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.stage.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.stage.js +15 -0
- package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.stage.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.test.d.ts +2 -0
- package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.test.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.test.js +110 -0
- package/dist/server/modules/translation-pipeline/stages/translation-applicator/index.d.ts +3 -0
- package/dist/server/modules/translation-pipeline/stages/translation-applicator/index.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/translation-applicator/index.js +4 -0
- package/dist/server/modules/translation-pipeline/stages/translation-applicator/index.js.map +1 -0
- package/dist/server/modules/translation-pipeline/strategies/Overwrite.strategy.d.ts +9 -0
- package/dist/server/modules/translation-pipeline/strategies/Overwrite.strategy.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/strategies/Overwrite.strategy.js +11 -0
- package/dist/server/modules/translation-pipeline/strategies/Overwrite.strategy.js.map +1 -0
- package/dist/server/modules/translation-pipeline/strategies/Overwrite.strategy.test.d.ts +2 -0
- package/dist/server/modules/translation-pipeline/strategies/Overwrite.strategy.test.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/strategies/Overwrite.strategy.test.js +36 -0
- package/dist/server/modules/translation-pipeline/strategies/SkipExisting.strategy.d.ts +10 -0
- package/dist/server/modules/translation-pipeline/strategies/SkipExisting.strategy.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/strategies/SkipExisting.strategy.js +19 -0
- package/dist/server/modules/translation-pipeline/strategies/SkipExisting.strategy.js.map +1 -0
- package/dist/server/modules/translation-pipeline/strategies/SkipExisting.strategy.test.d.ts +2 -0
- package/dist/server/modules/translation-pipeline/strategies/SkipExisting.strategy.test.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/strategies/SkipExisting.strategy.test.js +77 -0
- package/dist/server/modules/translation-pipeline/strategies/TranslationStrategy.interface.d.ts +22 -0
- package/dist/server/modules/translation-pipeline/strategies/TranslationStrategy.interface.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/strategies/TranslationStrategy.interface.js +10 -0
- package/dist/server/modules/translation-pipeline/strategies/TranslationStrategy.interface.js.map +1 -0
- package/dist/server/modules/translation-pipeline/strategies/index.d.ts +14 -0
- package/dist/server/modules/translation-pipeline/strategies/index.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/strategies/index.js +16 -0
- package/dist/server/modules/translation-pipeline/strategies/index.js.map +1 -0
- package/dist/server/modules/translation-pipeline/types/FieldChunk.d.ts +18 -0
- package/dist/server/modules/translation-pipeline/types/FieldChunk.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/types/FieldChunk.js +8 -0
- package/dist/server/modules/translation-pipeline/types/FieldChunk.js.map +1 -0
- package/dist/server/modules/translation-pipeline/types/Pipeline.d.ts +21 -0
- package/dist/server/modules/translation-pipeline/types/Pipeline.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/types/Pipeline.js +6 -0
- package/dist/server/modules/translation-pipeline/types/Pipeline.js.map +1 -0
- package/dist/server/modules/translation-pipeline/types/PipelineContext.d.ts +28 -0
- package/dist/server/modules/translation-pipeline/types/PipelineContext.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/types/PipelineContext.js +6 -0
- package/dist/server/modules/translation-pipeline/types/PipelineContext.js.map +1 -0
- package/dist/server/modules/translation-pipeline/types/TextChunk.d.ts +43 -0
- package/dist/server/modules/translation-pipeline/types/TextChunk.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/types/TextChunk.js +12 -0
- package/dist/server/modules/translation-pipeline/types/TextChunk.js.map +1 -0
- package/dist/server/modules/translation-pipeline/types/index.d.ts +6 -0
- package/dist/server/modules/translation-pipeline/types/index.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/types/index.js +3 -0
- package/dist/server/modules/translation-pipeline/types/index.js.map +1 -0
- package/dist/server/modules/translation-providers/OpenAITranslation.provider.d.ts +128 -0
- package/dist/server/modules/translation-providers/OpenAITranslation.provider.d.ts.map +1 -0
- package/dist/server/modules/translation-providers/OpenAITranslation.provider.js +138 -0
- package/dist/server/modules/translation-providers/OpenAITranslation.provider.js.map +1 -0
- package/dist/server/modules/translation-providers/OpenAITranslation.provider.test.d.ts +2 -0
- package/dist/server/modules/translation-providers/OpenAITranslation.provider.test.d.ts.map +1 -0
- package/dist/server/modules/translation-providers/OpenAITranslation.provider.test.js +214 -0
- package/dist/server/modules/translation-providers/TranslationProvider.interface.d.ts +56 -0
- package/dist/server/modules/translation-providers/TranslationProvider.interface.d.ts.map +1 -0
- package/dist/server/modules/translation-providers/TranslationProvider.interface.js +26 -0
- package/dist/server/modules/translation-providers/TranslationProvider.interface.js.map +1 -0
- package/dist/server/modules/translation-providers/index.d.ts +3 -0
- package/dist/server/modules/translation-providers/index.d.ts.map +1 -0
- package/dist/server/modules/translation-providers/index.js +3 -0
- package/dist/server/modules/translation-providers/index.js.map +1 -0
- package/dist/server/shared/access/AnyAccessGuard.d.ts +8 -0
- package/dist/server/shared/access/AnyAccessGuard.d.ts.map +1 -0
- package/dist/server/shared/access/AnyAccessGuard.js +9 -0
- package/dist/server/shared/access/AnyAccessGuard.js.map +1 -0
- package/dist/server/shared/access/handler.d.ts +8 -0
- package/dist/server/shared/access/handler.d.ts.map +1 -0
- package/dist/server/shared/access/handler.js +5 -0
- package/dist/server/shared/access/handler.js.map +1 -0
- package/dist/server/shared/access/index.d.ts +4 -0
- package/dist/server/shared/access/index.d.ts.map +1 -0
- package/dist/server/shared/access/index.js +3 -0
- package/dist/server/shared/access/index.js.map +1 -0
- package/dist/server/shared/access/types.d.ts +2 -0
- package/dist/server/shared/access/types.d.ts.map +1 -0
- package/dist/server/shared/access/types.js +3 -0
- package/dist/server/shared/access/types.js.map +1 -0
- package/dist/server/shared/field-config/getFieldConfig.d.ts +21 -0
- package/dist/server/shared/field-config/getFieldConfig.d.ts.map +1 -0
- package/dist/server/shared/field-config/getFieldConfig.js +29 -0
- package/dist/server/shared/field-config/getFieldConfig.js.map +1 -0
- package/dist/server/shared/field-config/getFieldConfig.test.d.ts +2 -0
- package/dist/server/shared/field-config/getFieldConfig.test.d.ts.map +1 -0
- package/dist/server/shared/field-config/getFieldConfig.test.js +74 -0
- package/dist/server/shared/field-config/index.d.ts +4 -0
- package/dist/server/shared/field-config/index.d.ts.map +1 -0
- package/dist/server/shared/field-config/index.js +4 -0
- package/dist/server/shared/field-config/index.js.map +1 -0
- package/dist/server/shared/field-config/types.d.ts +39 -0
- package/dist/server/shared/field-config/types.d.ts.map +1 -0
- package/dist/server/shared/field-config/types.js +22 -0
- package/dist/server/shared/field-config/types.js.map +1 -0
- package/dist/server/shared/guards/collection-guards.d.ts +7 -0
- package/dist/server/shared/guards/collection-guards.d.ts.map +1 -0
- package/dist/server/shared/guards/collection-guards.js +16 -0
- package/dist/server/shared/guards/collection-guards.js.map +1 -0
- package/dist/server/shared/guards/field-guards.d.ts +37 -0
- package/dist/server/shared/guards/field-guards.d.ts.map +1 -0
- package/dist/server/shared/guards/field-guards.js +34 -0
- package/dist/server/shared/guards/field-guards.js.map +1 -0
- package/dist/server/shared/guards/field-guards.test.d.ts +2 -0
- package/dist/server/shared/guards/field-guards.test.d.ts.map +1 -0
- package/dist/server/shared/guards/field-guards.test.js +166 -0
- package/dist/server/shared/guards/index.d.ts +4 -0
- package/dist/server/shared/guards/index.d.ts.map +1 -0
- package/dist/server/shared/guards/index.js +4 -0
- package/dist/server/shared/guards/index.js.map +1 -0
- package/dist/server/shared/http/ServerResponse.d.ts +24 -0
- package/dist/server/shared/http/ServerResponse.d.ts.map +1 -0
- package/dist/server/shared/http/ServerResponse.js +165 -0
- package/dist/server/shared/http/ServerResponse.js.map +1 -0
- package/dist/server/shared/http/ServerResponse.test.d.ts +2 -0
- package/dist/server/shared/http/ServerResponse.test.d.ts.map +1 -0
- package/dist/server/shared/http/ServerResponse.test.js +161 -0
- package/dist/server/shared/http/index.d.ts +4 -0
- package/dist/server/shared/http/index.d.ts.map +1 -0
- package/dist/server/shared/http/index.js +5 -0
- package/dist/server/shared/http/index.js.map +1 -0
- package/dist/server/shared/http/withAccessCheck.d.ts +8 -0
- package/dist/server/shared/http/withAccessCheck.d.ts.map +1 -0
- package/dist/server/shared/http/withAccessCheck.js +16 -0
- package/dist/server/shared/http/withAccessCheck.js.map +1 -0
- package/dist/server/shared/http/withAccessCheck.test.d.ts +2 -0
- package/dist/server/shared/http/withAccessCheck.test.d.ts.map +1 -0
- package/dist/server/shared/http/withAccessCheck.test.js +46 -0
- package/dist/server/shared/http/withErrorHandler.d.ts +6 -0
- package/dist/server/shared/http/withErrorHandler.d.ts.map +1 -0
- package/dist/server/shared/http/withErrorHandler.js +23 -0
- package/dist/server/shared/http/withErrorHandler.js.map +1 -0
- package/dist/server/shared/http/withErrorHandler.test.d.ts +2 -0
- package/dist/server/shared/http/withErrorHandler.test.d.ts.map +1 -0
- package/dist/server/shared/http/withErrorHandler.test.js +69 -0
- package/dist/server/shared/index.d.ts +11 -0
- package/dist/server/shared/index.d.ts.map +1 -0
- package/dist/server/shared/index.js +13 -0
- package/dist/server/shared/index.js.map +1 -0
- package/dist/server/shared/lexical/collectTextNodes.d.ts +10 -0
- package/dist/server/shared/lexical/collectTextNodes.d.ts.map +1 -0
- package/dist/server/shared/lexical/collectTextNodes.js +31 -0
- package/dist/server/shared/lexical/collectTextNodes.js.map +1 -0
- package/dist/server/shared/lexical/collectTextNodes.test.d.ts +2 -0
- package/dist/server/shared/lexical/collectTextNodes.test.d.ts.map +1 -0
- package/dist/server/shared/lexical/collectTextNodes.test.js +120 -0
- package/dist/server/shared/lexical/guards.d.ts +20 -0
- package/dist/server/shared/lexical/guards.d.ts.map +1 -0
- package/dist/server/shared/lexical/guards.js +18 -0
- package/dist/server/shared/lexical/guards.js.map +1 -0
- package/dist/server/shared/lexical/guards.test.d.ts +2 -0
- package/dist/server/shared/lexical/guards.test.d.ts.map +1 -0
- package/dist/server/shared/lexical/guards.test.js +160 -0
- package/dist/server/shared/lexical/index.d.ts +7 -0
- package/dist/server/shared/lexical/index.d.ts.map +1 -0
- package/dist/server/shared/lexical/index.js +6 -0
- package/dist/server/shared/lexical/index.js.map +1 -0
- package/dist/server/shared/lexical/isEmptyRichText.d.ts +14 -0
- package/dist/server/shared/lexical/isEmptyRichText.d.ts.map +1 -0
- package/dist/server/shared/lexical/isEmptyRichText.js +31 -0
- package/dist/server/shared/lexical/isEmptyRichText.js.map +1 -0
- package/dist/server/shared/lexical/isEmptyRichText.test.d.ts +2 -0
- package/dist/server/shared/lexical/isEmptyRichText.test.d.ts.map +1 -0
- package/dist/server/shared/lexical/isEmptyRichText.test.js +251 -0
- package/dist/server/shared/lexical/traverseLexicalTree.d.ts +11 -0
- package/dist/server/shared/lexical/traverseLexicalTree.d.ts.map +1 -0
- package/dist/server/shared/lexical/traverseLexicalTree.js +19 -0
- package/dist/server/shared/lexical/traverseLexicalTree.js.map +1 -0
- package/dist/server/shared/lexical/traverseLexicalTree.test.d.ts +2 -0
- package/dist/server/shared/lexical/traverseLexicalTree.test.d.ts.map +1 -0
- package/dist/server/shared/lexical/traverseLexicalTree.test.js +112 -0
- package/dist/server/shared/lexical/types.d.ts +20 -0
- package/dist/server/shared/lexical/types.d.ts.map +1 -0
- package/dist/server/shared/lexical/types.js +8 -0
- package/dist/server/shared/lexical/types.js.map +1 -0
- package/dist/server/shared/utils/LazyMap.d.ts +71 -0
- package/dist/server/shared/utils/LazyMap.d.ts.map +1 -0
- package/dist/server/shared/utils/LazyMap.js +95 -0
- package/dist/server/shared/utils/LazyMap.js.map +1 -0
- package/dist/server/shared/utils/LazyMap.test.d.ts +2 -0
- package/dist/server/shared/utils/LazyMap.test.d.ts.map +1 -0
- package/dist/server/shared/utils/LazyMap.test.js +262 -0
- package/dist/server/shared/utils/filterLocalizedFields.d.ts +11 -0
- package/dist/server/shared/utils/filterLocalizedFields.d.ts.map +1 -0
- package/dist/server/shared/utils/filterLocalizedFields.js +72 -0
- package/dist/server/shared/utils/filterLocalizedFields.js.map +1 -0
- package/dist/server/shared/utils/filterLocalizedFields.test.d.ts +2 -0
- package/dist/server/shared/utils/filterLocalizedFields.test.d.ts.map +1 -0
- package/dist/server/shared/utils/filterLocalizedFields.test.js +338 -0
- package/dist/server/shared/utils/getByPath.d.ts +9 -0
- package/dist/server/shared/utils/getByPath.d.ts.map +1 -0
- package/dist/server/shared/utils/getByPath.js +18 -0
- package/dist/server/shared/utils/getByPath.js.map +1 -0
- package/dist/server/shared/utils/getByPath.test.d.ts +2 -0
- package/dist/server/shared/utils/getByPath.test.d.ts.map +1 -0
- package/dist/server/shared/utils/getByPath.test.js +33 -0
- package/dist/server/shared/utils/index.d.ts +10 -0
- package/dist/server/shared/utils/index.d.ts.map +1 -0
- package/dist/server/shared/utils/index.js +10 -0
- package/dist/server/shared/utils/index.js.map +1 -0
- package/dist/server/shared/utils/isEmpty.d.ts +9 -0
- package/dist/server/shared/utils/isEmpty.d.ts.map +1 -0
- package/dist/server/shared/utils/isEmpty.js +15 -0
- package/dist/server/shared/utils/isEmpty.js.map +1 -0
- package/dist/server/shared/utils/isEmpty.test.d.ts +2 -0
- package/dist/server/shared/utils/isEmpty.test.d.ts.map +1 -0
- package/dist/server/shared/utils/isEmpty.test.js +60 -0
- package/dist/server/shared/utils/isObject.d.ts +5 -0
- package/dist/server/shared/utils/isObject.d.ts.map +1 -0
- package/dist/server/shared/utils/isObject.js +7 -0
- package/dist/server/shared/utils/isObject.js.map +1 -0
- package/dist/server/shared/utils/isObject.test.d.ts +2 -0
- package/dist/server/shared/utils/isObject.test.d.ts.map +1 -0
- package/dist/server/shared/utils/isObject.test.js +57 -0
- package/dist/server/shared/utils/normalizePath.d.ts +16 -0
- package/dist/server/shared/utils/normalizePath.d.ts.map +1 -0
- package/dist/server/shared/utils/normalizePath.js +22 -0
- package/dist/server/shared/utils/normalizePath.js.map +1 -0
- package/dist/server/shared/utils/normalizePath.test.d.ts +2 -0
- package/dist/server/shared/utils/normalizePath.test.d.ts.map +1 -0
- package/dist/server/shared/utils/normalizePath.test.js +33 -0
- package/dist/server/shared/utils/pipe.d.ts +5 -0
- package/dist/server/shared/utils/pipe.d.ts.map +1 -0
- package/dist/server/shared/utils/pipe.js +5 -0
- package/dist/server/shared/utils/pipe.js.map +1 -0
- package/dist/server/shared/utils/pipe.test.d.ts +2 -0
- package/dist/server/shared/utils/pipe.test.d.ts.map +1 -0
- package/dist/server/shared/utils/pipe.test.js +55 -0
- package/dist/server/shared/utils/setByPath.d.ts +11 -0
- package/dist/server/shared/utils/setByPath.d.ts.map +1 -0
- package/dist/server/shared/utils/setByPath.js +26 -0
- package/dist/server/shared/utils/setByPath.js.map +1 -0
- package/dist/server/shared/utils/setByPath.test.d.ts +2 -0
- package/dist/server/shared/utils/setByPath.test.d.ts.map +1 -0
- package/dist/server/shared/utils/setByPath.test.js +46 -0
- package/dist/types/AccessGuard.d.ts +12 -0
- package/dist/types/AccessGuard.d.ts.map +1 -0
- package/dist/types/AccessGuard.js +3 -0
- package/dist/types/AccessGuard.js.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +3 -0
- package/dist/types/index.js.map +1 -0
- package/dist/vitest-env.d.js +3 -0
- package/dist/vitest-env.d.js.map +1 -0
- package/package.json +91 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ServerResponse } from '../../shared';
|
|
2
|
+
import { RunInputSchema } from './model';
|
|
3
|
+
/**
|
|
4
|
+
* Runs a translation task by ID
|
|
5
|
+
*/ export class RunTranslationHandler {
|
|
6
|
+
taskRunnerFactory;
|
|
7
|
+
constructor(taskRunnerFactory){
|
|
8
|
+
this.taskRunnerFactory = taskRunnerFactory;
|
|
9
|
+
}
|
|
10
|
+
async handle(req) {
|
|
11
|
+
const validationResult = RunInputSchema.safeParse(req.routeParams);
|
|
12
|
+
if (validationResult.error) return ServerResponse.validationError(validationResult.error.errors);
|
|
13
|
+
const { id } = validationResult.data;
|
|
14
|
+
const runner = this.taskRunnerFactory.create(req.payload);
|
|
15
|
+
const result = await runner.run(id);
|
|
16
|
+
if (!result.success) {
|
|
17
|
+
if (result.error === 'not_found' || result.error === 'already_completed') {
|
|
18
|
+
return ServerResponse.notFound('Queued task not found');
|
|
19
|
+
}
|
|
20
|
+
if (result.error === 'already_running') {
|
|
21
|
+
return ServerResponse.tooManyRequests('Translation task is already in progress');
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return ServerResponse.noContent();
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/server/features/run-translation/handler.ts"],"sourcesContent":["import type { PayloadRequest } from 'payload'\n\nimport { ServerResponse } from '../../shared'\nimport type { TaskRunnerProvider } from '../../modules/task-runner'\n\nimport { RunInputSchema } from './model'\n\n/**\n * Runs a translation task by ID\n */\nexport class RunTranslationHandler {\n constructor(private readonly taskRunnerFactory: TaskRunnerProvider) {}\n\n async handle(req: PayloadRequest): Promise<Response> {\n const validationResult = RunInputSchema.safeParse(req.routeParams)\n if (validationResult.error) return ServerResponse.validationError(validationResult.error.errors)\n\n const { id } = validationResult.data\n const runner = this.taskRunnerFactory.create(req.payload)\n const result = await runner.run(id)\n\n if (!result.success) {\n if (result.error === 'not_found' || result.error === 'already_completed') {\n return ServerResponse.notFound('Queued task not found')\n }\n if (result.error === 'already_running') {\n return ServerResponse.tooManyRequests('Translation task is already in progress')\n }\n }\n\n return ServerResponse.noContent()\n }\n}\n"],"names":["ServerResponse","RunInputSchema","RunTranslationHandler","taskRunnerFactory","handle","req","validationResult","safeParse","routeParams","error","validationError","errors","id","data","runner","create","payload","result","run","success","notFound","tooManyRequests","noContent"],"mappings":"AAEA,SAASA,cAAc,QAAQ,eAAc;AAG7C,SAASC,cAAc,QAAQ,UAAS;AAExC;;CAEC,GACD,OAAO,MAAMC;;IACX,YAAY,AAAiBC,iBAAqC,CAAE;aAAvCA,oBAAAA;IAAwC;IAErE,MAAMC,OAAOC,GAAmB,EAAqB;QACnD,MAAMC,mBAAmBL,eAAeM,SAAS,CAACF,IAAIG,WAAW;QACjE,IAAIF,iBAAiBG,KAAK,EAAE,OAAOT,eAAeU,eAAe,CAACJ,iBAAiBG,KAAK,CAACE,MAAM;QAE/F,MAAM,EAAEC,EAAE,EAAE,GAAGN,iBAAiBO,IAAI;QACpC,MAAMC,SAAS,IAAI,CAACX,iBAAiB,CAACY,MAAM,CAACV,IAAIW,OAAO;QACxD,MAAMC,SAAS,MAAMH,OAAOI,GAAG,CAACN;QAEhC,IAAI,CAACK,OAAOE,OAAO,EAAE;YACnB,IAAIF,OAAOR,KAAK,KAAK,eAAeQ,OAAOR,KAAK,KAAK,qBAAqB;gBACxE,OAAOT,eAAeoB,QAAQ,CAAC;YACjC;YACA,IAAIH,OAAOR,KAAK,KAAK,mBAAmB;gBACtC,OAAOT,eAAeqB,eAAe,CAAC;YACxC;QACF;QAEA,OAAOrB,eAAesB,SAAS;IACjC;AACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.test.d.ts","sourceRoot":"","sources":["../../../../src/server/features/run-translation/handler.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { describe, it, expect, vi, beforeEach } from 'vitest';
|
|
2
|
+
import { RunTranslationHandler } from './handler';
|
|
3
|
+
describe('RunTranslationHandler', () => {
|
|
4
|
+
let handler;
|
|
5
|
+
let mockTaskRunner;
|
|
6
|
+
let mockTaskRunnerFactory;
|
|
7
|
+
const createMockRequest = (params = {}) => ({
|
|
8
|
+
payload: {},
|
|
9
|
+
routeParams: params,
|
|
10
|
+
});
|
|
11
|
+
beforeEach(() => {
|
|
12
|
+
mockTaskRunner = {
|
|
13
|
+
enqueue: vi.fn(),
|
|
14
|
+
cancel: vi.fn(),
|
|
15
|
+
run: vi.fn().mockResolvedValue({ success: true }),
|
|
16
|
+
findByCollection: vi.fn(),
|
|
17
|
+
};
|
|
18
|
+
mockTaskRunnerFactory = {
|
|
19
|
+
create: vi.fn().mockReturnValue(mockTaskRunner),
|
|
20
|
+
configure: vi.fn(),
|
|
21
|
+
};
|
|
22
|
+
handler = new RunTranslationHandler(mockTaskRunnerFactory);
|
|
23
|
+
});
|
|
24
|
+
describe('validation', () => {
|
|
25
|
+
it('returns validation error for missing id', async () => {
|
|
26
|
+
const req = createMockRequest({});
|
|
27
|
+
const response = await handler.handle(req);
|
|
28
|
+
expect(response.status).toBe(400);
|
|
29
|
+
const body = await response.json();
|
|
30
|
+
expect(body.message).toBe('Validation error');
|
|
31
|
+
});
|
|
32
|
+
it('returns validation error for empty id', async () => {
|
|
33
|
+
const req = createMockRequest({ id: '' });
|
|
34
|
+
const response = await handler.handle(req);
|
|
35
|
+
expect(response.status).toBe(400);
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
describe('success responses', () => {
|
|
39
|
+
it('returns 204 on successful run', async () => {
|
|
40
|
+
;
|
|
41
|
+
mockTaskRunner.run.mockResolvedValue({ success: true });
|
|
42
|
+
const req = createMockRequest({ id: 'task-123' });
|
|
43
|
+
const response = await handler.handle(req);
|
|
44
|
+
expect(response.status).toBe(204);
|
|
45
|
+
expect(response.body).toBeNull();
|
|
46
|
+
});
|
|
47
|
+
it('calls runner.run with correct task id', async () => {
|
|
48
|
+
const req = createMockRequest({ id: 'task-456' });
|
|
49
|
+
await handler.handle(req);
|
|
50
|
+
expect(mockTaskRunner.run).toHaveBeenCalledWith('task-456');
|
|
51
|
+
});
|
|
52
|
+
it('creates task runner with request payload', async () => {
|
|
53
|
+
const mockPayload = { collections: {} };
|
|
54
|
+
const req = createMockRequest({ id: 'task-123' });
|
|
55
|
+
req.payload = mockPayload;
|
|
56
|
+
await handler.handle(req);
|
|
57
|
+
expect(mockTaskRunnerFactory.create).toHaveBeenCalledWith(mockPayload);
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
describe('error responses', () => {
|
|
61
|
+
it('returns 404 when task not found', async () => {
|
|
62
|
+
;
|
|
63
|
+
mockTaskRunner.run.mockResolvedValue({
|
|
64
|
+
success: false,
|
|
65
|
+
error: 'not_found',
|
|
66
|
+
});
|
|
67
|
+
const req = createMockRequest({ id: 'non-existent' });
|
|
68
|
+
const response = await handler.handle(req);
|
|
69
|
+
expect(response.status).toBe(404);
|
|
70
|
+
const body = await response.json();
|
|
71
|
+
expect(body.message).toBe('Queued task not found');
|
|
72
|
+
});
|
|
73
|
+
it('returns 404 when task already completed', async () => {
|
|
74
|
+
;
|
|
75
|
+
mockTaskRunner.run.mockResolvedValue({
|
|
76
|
+
success: false,
|
|
77
|
+
error: 'already_completed',
|
|
78
|
+
});
|
|
79
|
+
const req = createMockRequest({ id: 'completed-task' });
|
|
80
|
+
const response = await handler.handle(req);
|
|
81
|
+
expect(response.status).toBe(404);
|
|
82
|
+
const body = await response.json();
|
|
83
|
+
expect(body.message).toBe('Queued task not found');
|
|
84
|
+
});
|
|
85
|
+
it('returns 429 when task is already running', async () => {
|
|
86
|
+
;
|
|
87
|
+
mockTaskRunner.run.mockResolvedValue({
|
|
88
|
+
success: false,
|
|
89
|
+
error: 'already_running',
|
|
90
|
+
});
|
|
91
|
+
const req = createMockRequest({ id: 'running-task' });
|
|
92
|
+
const response = await handler.handle(req);
|
|
93
|
+
expect(response.status).toBe(429);
|
|
94
|
+
const body = await response.json();
|
|
95
|
+
expect(body.message).toBe('Translation task is already in progress');
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/server/features/run-translation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/server/features/run-translation/index.ts"],"sourcesContent":["export { createRunRoute } from './route'\n"],"names":["createRunRoute"],"mappings":"AAAA,SAASA,cAAc,QAAQ,UAAS"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../../src/server/features/run-translation/model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;EAEzB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/server/features/run-translation/model.ts"],"sourcesContent":["import { z } from 'zod'\n\n/**\n * Input validation schema\n */\nexport const RunInputSchema = z.object({\n id: z.string().nonempty(),\n})\n"],"names":["z","RunInputSchema","object","id","string","nonempty"],"mappings":"AAAA,SAASA,CAAC,QAAQ,MAAK;AAEvB;;CAEC,GACD,OAAO,MAAMC,iBAAiBD,EAAEE,MAAM,CAAC;IACrCC,IAAIH,EAAEI,MAAM,GAAGC,QAAQ;AACzB,GAAE"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Endpoint } from 'payload';
|
|
2
|
+
import type { AccessGuard } from '../../shared';
|
|
3
|
+
import type { TaskRunnerProvider } from '../../modules/task-runner';
|
|
4
|
+
/**
|
|
5
|
+
* Creates the run translation endpoint
|
|
6
|
+
*/
|
|
7
|
+
export declare function createRunRoute(taskRunnerFactory: TaskRunnerProvider, access?: AccessGuard, basePath?: string): Endpoint;
|
|
8
|
+
//# sourceMappingURL=route.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../../../src/server/features/run-translation/route.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAGvC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAInE;;GAEG;AACH,wBAAgB,cAAc,CAC5B,iBAAiB,EAAE,kBAAkB,EACrC,MAAM,CAAC,EAAE,WAAW,EACpB,QAAQ,SAAe,GACtB,QAAQ,CAQV"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { withErrorHandler, withAccessCheck } from '../../shared';
|
|
2
|
+
import { RunTranslationHandler } from './handler';
|
|
3
|
+
/**
|
|
4
|
+
* Creates the run translation endpoint
|
|
5
|
+
*/ export function createRunRoute(taskRunnerFactory, access, basePath = '/translate') {
|
|
6
|
+
const handler = new RunTranslationHandler(taskRunnerFactory);
|
|
7
|
+
return {
|
|
8
|
+
path: `${basePath}/run/:id`,
|
|
9
|
+
method: 'post',
|
|
10
|
+
handler: withAccessCheck(withErrorHandler(handler.handle.bind(handler)), access)
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=route.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/server/features/run-translation/route.ts"],"sourcesContent":["import type { Endpoint } from 'payload'\n\nimport { withErrorHandler, withAccessCheck } from '../../shared'\nimport type { AccessGuard } from '../../shared'\nimport type { TaskRunnerProvider } from '../../modules/task-runner'\n\nimport { RunTranslationHandler } from './handler'\n\n/**\n * Creates the run translation endpoint\n */\nexport function createRunRoute(\n taskRunnerFactory: TaskRunnerProvider,\n access?: AccessGuard,\n basePath = '/translate',\n): Endpoint {\n const handler = new RunTranslationHandler(taskRunnerFactory)\n\n return {\n path: `${basePath}/run/:id`,\n method: 'post',\n handler: withAccessCheck(withErrorHandler(handler.handle.bind(handler)), access),\n }\n}\n"],"names":["withErrorHandler","withAccessCheck","RunTranslationHandler","createRunRoute","taskRunnerFactory","access","basePath","handler","path","method","handle","bind"],"mappings":"AAEA,SAASA,gBAAgB,EAAEC,eAAe,QAAQ,eAAc;AAIhE,SAASC,qBAAqB,QAAQ,YAAW;AAEjD;;CAEC,GACD,OAAO,SAASC,eACdC,iBAAqC,EACrCC,MAAoB,EACpBC,WAAW,YAAY;IAEvB,MAAMC,UAAU,IAAIL,sBAAsBE;IAE1C,OAAO;QACLI,MAAM,GAAGF,SAAS,QAAQ,CAAC;QAC3BG,QAAQ;QACRF,SAASN,gBAAgBD,iBAAiBO,QAAQG,MAAM,CAACC,IAAI,CAACJ,WAAWF;IAC3E;AACF"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Payload } from 'payload';
|
|
2
|
+
import type { Handler } from '../../shared';
|
|
3
|
+
import type { TranslationProvider } from '../../modules/translation-providers';
|
|
4
|
+
import type { CollectionSchemaMap, TranslateDocumentInput, TranslateDocumentOutput } from './model';
|
|
5
|
+
export type TranslateDocumentDependencies = {
|
|
6
|
+
translationProvider: TranslationProvider;
|
|
7
|
+
schemaMap: CollectionSchemaMap;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Translates a single document from source language to target language
|
|
11
|
+
*/
|
|
12
|
+
export declare class TranslateDocumentHandler implements Handler<TranslateDocumentInput, TranslateDocumentOutput> {
|
|
13
|
+
private readonly translationProvider;
|
|
14
|
+
private readonly schemaMap;
|
|
15
|
+
constructor(translationProvider: TranslationProvider, schemaMap: CollectionSchemaMap);
|
|
16
|
+
handle(payload: Payload, input: TranslateDocumentInput): Promise<TranslateDocumentOutput>;
|
|
17
|
+
private saveTranslatedDocument;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../../src/server/features/translate-document/handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAA6B,MAAM,SAAS,CAAA;AAGjE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAA;AAI9E,OAAO,KAAK,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAA;AAEnG,MAAM,MAAM,6BAA6B,GAAG;IAC1C,mBAAmB,EAAE,mBAAmB,CAAA;IACxC,SAAS,EAAE,mBAAmB,CAAA;CAC/B,CAAA;AAED;;GAEG;AACH,qBAAa,wBAAyB,YAAW,OAAO,CAAC,sBAAsB,EAAE,uBAAuB,CAAC;IAErG,OAAO,CAAC,QAAQ,CAAC,mBAAmB;IACpC,OAAO,CAAC,QAAQ,CAAC,SAAS;gBADT,mBAAmB,EAAE,mBAAmB,EACxC,SAAS,EAAE,mBAAmB;IAG3C,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,sBAAsB,GAAG,OAAO,CAAC,uBAAuB,CAAC;YAuCjF,sBAAsB;CA6BrC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { APIError } from 'payload';
|
|
2
|
+
import { TranslationPipeline } from '../../modules/translation-pipeline';
|
|
3
|
+
import { createTranslationStrategy } from '../../modules/translation-pipeline/strategies';
|
|
4
|
+
/**
|
|
5
|
+
* Translates a single document from source language to target language
|
|
6
|
+
*/ export class TranslateDocumentHandler {
|
|
7
|
+
translationProvider;
|
|
8
|
+
schemaMap;
|
|
9
|
+
constructor(translationProvider, schemaMap){
|
|
10
|
+
this.translationProvider = translationProvider;
|
|
11
|
+
this.schemaMap = schemaMap;
|
|
12
|
+
}
|
|
13
|
+
async handle(payload, input) {
|
|
14
|
+
const { collection, collectionId, sourceLng, targetLng, strategy, publishOnTranslation } = input;
|
|
15
|
+
// Get original schema (preserves localized: true on nested fields)
|
|
16
|
+
const schema = this.schemaMap.get(collection);
|
|
17
|
+
if (!schema) throw new APIError(`Collection "${collection}" not found in schemaMap`, 400);
|
|
18
|
+
const sourceData = await payload.findByID({
|
|
19
|
+
collection,
|
|
20
|
+
id: collectionId,
|
|
21
|
+
locale: sourceLng
|
|
22
|
+
});
|
|
23
|
+
const targetData = await payload.findByID({
|
|
24
|
+
collection,
|
|
25
|
+
id: collectionId,
|
|
26
|
+
locale: targetLng,
|
|
27
|
+
fallbackLocale: false
|
|
28
|
+
});
|
|
29
|
+
const translationStrategy = createTranslationStrategy(strategy);
|
|
30
|
+
const pipeline = new TranslationPipeline({
|
|
31
|
+
translationProvider: this.translationProvider,
|
|
32
|
+
translationStrategy
|
|
33
|
+
});
|
|
34
|
+
const result = await pipeline.execute({
|
|
35
|
+
schema,
|
|
36
|
+
sourceData,
|
|
37
|
+
targetData,
|
|
38
|
+
sourceLng,
|
|
39
|
+
targetLng
|
|
40
|
+
});
|
|
41
|
+
if (!result) return {
|
|
42
|
+
success: true
|
|
43
|
+
};
|
|
44
|
+
const collectionConfig = payload.collections[collection].config;
|
|
45
|
+
await this.saveTranslatedDocument(payload, collection, collectionId, result.translatedData, targetLng, sourceLng, collectionConfig, publishOnTranslation);
|
|
46
|
+
return {
|
|
47
|
+
success: true
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
async saveTranslatedDocument(payload, collection, collectionId, translatedData, targetLng, sourceLng, collectionConfig, publishOnTranslation) {
|
|
51
|
+
let isAutosaveEnabled = false;
|
|
52
|
+
const versions = collectionConfig.versions;
|
|
53
|
+
if (versions && versions.drafts) {
|
|
54
|
+
translatedData['_status'] = publishOnTranslation ? 'published' : 'draft';
|
|
55
|
+
const drafts = versions.drafts;
|
|
56
|
+
if (!publishOnTranslation && drafts.autosave) isAutosaveEnabled = true;
|
|
57
|
+
}
|
|
58
|
+
await payload.update({
|
|
59
|
+
collection: collection,
|
|
60
|
+
id: collectionId,
|
|
61
|
+
data: translatedData,
|
|
62
|
+
autosave: isAutosaveEnabled,
|
|
63
|
+
locale: targetLng,
|
|
64
|
+
fallbackLocale: sourceLng
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
//# sourceMappingURL=handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/server/features/translate-document/handler.ts"],"sourcesContent":["import type { Payload, SanitizedCollectionConfig } from 'payload'\nimport { APIError } from 'payload'\n\nimport type { Handler } from '../../shared'\nimport type { TranslationProvider } from '../../modules/translation-providers'\nimport { TranslationPipeline } from '../../modules/translation-pipeline'\nimport { createTranslationStrategy } from '../../modules/translation-pipeline/strategies'\n\nimport type { CollectionSchemaMap, TranslateDocumentInput, TranslateDocumentOutput } from './model'\n\nexport type TranslateDocumentDependencies = {\n translationProvider: TranslationProvider\n schemaMap: CollectionSchemaMap\n}\n\n/**\n * Translates a single document from source language to target language\n */\nexport class TranslateDocumentHandler implements Handler<TranslateDocumentInput, TranslateDocumentOutput> {\n constructor(\n private readonly translationProvider: TranslationProvider,\n private readonly schemaMap: CollectionSchemaMap,\n ) {}\n\n async handle(payload: Payload, input: TranslateDocumentInput): Promise<TranslateDocumentOutput> {\n const { collection, collectionId, sourceLng, targetLng, strategy, publishOnTranslation } = input\n\n // Get original schema (preserves localized: true on nested fields)\n const schema = this.schemaMap.get(collection)\n if (!schema) throw new APIError(`Collection \"${collection}\" not found in schemaMap`, 400)\n\n const sourceData = await payload.findByID({ collection, id: collectionId, locale: sourceLng })\n const targetData = await payload.findByID({\n collection,\n id: collectionId,\n locale: targetLng,\n fallbackLocale: false,\n })\n\n const translationStrategy = createTranslationStrategy(strategy)\n const pipeline = new TranslationPipeline({\n translationProvider: this.translationProvider,\n translationStrategy,\n })\n\n const result = await pipeline.execute({ schema, sourceData, targetData, sourceLng, targetLng })\n if (!result) return { success: true }\n\n const collectionConfig = payload.collections[collection].config\n await this.saveTranslatedDocument(\n payload,\n collection,\n collectionId,\n result.translatedData,\n targetLng,\n sourceLng,\n collectionConfig,\n publishOnTranslation,\n )\n\n return { success: true }\n }\n\n private async saveTranslatedDocument(\n payload: Payload,\n collection: string,\n collectionId: string | number,\n translatedData: Record<string, unknown>,\n targetLng: string,\n sourceLng: string,\n collectionConfig: SanitizedCollectionConfig,\n publishOnTranslation: boolean,\n ): Promise<void> {\n let isAutosaveEnabled = false\n const versions = collectionConfig.versions\n\n if (versions && versions.drafts) {\n translatedData['_status'] = publishOnTranslation ? 'published' : 'draft'\n\n const drafts = versions.drafts\n if (!publishOnTranslation && drafts.autosave) isAutosaveEnabled = true\n }\n\n await payload.update({\n collection: collection,\n id: collectionId,\n data: translatedData,\n autosave: isAutosaveEnabled,\n locale: targetLng,\n fallbackLocale: sourceLng,\n })\n }\n}\n"],"names":["APIError","TranslationPipeline","createTranslationStrategy","TranslateDocumentHandler","translationProvider","schemaMap","handle","payload","input","collection","collectionId","sourceLng","targetLng","strategy","publishOnTranslation","schema","get","sourceData","findByID","id","locale","targetData","fallbackLocale","translationStrategy","pipeline","result","execute","success","collectionConfig","collections","config","saveTranslatedDocument","translatedData","isAutosaveEnabled","versions","drafts","autosave","update","data"],"mappings":"AACA,SAASA,QAAQ,QAAQ,UAAS;AAIlC,SAASC,mBAAmB,QAAQ,qCAAoC;AACxE,SAASC,yBAAyB,QAAQ,gDAA+C;AASzF;;CAEC,GACD,OAAO,MAAMC;;;IACX,YACE,AAAiBC,mBAAwC,EACzD,AAAiBC,SAA8B,CAC/C;aAFiBD,sBAAAA;aACAC,YAAAA;IAChB;IAEH,MAAMC,OAAOC,OAAgB,EAAEC,KAA6B,EAAoC;QAC9F,MAAM,EAAEC,UAAU,EAAEC,YAAY,EAAEC,SAAS,EAAEC,SAAS,EAAEC,QAAQ,EAAEC,oBAAoB,EAAE,GAAGN;QAE3F,mEAAmE;QACnE,MAAMO,SAAS,IAAI,CAACV,SAAS,CAACW,GAAG,CAACP;QAClC,IAAI,CAACM,QAAQ,MAAM,IAAIf,SAAS,CAAC,YAAY,EAAES,WAAW,wBAAwB,CAAC,EAAE;QAErF,MAAMQ,aAAa,MAAMV,QAAQW,QAAQ,CAAC;YAAET;YAAYU,IAAIT;YAAcU,QAAQT;QAAU;QAC5F,MAAMU,aAAa,MAAMd,QAAQW,QAAQ,CAAC;YACxCT;YACAU,IAAIT;YACJU,QAAQR;YACRU,gBAAgB;QAClB;QAEA,MAAMC,sBAAsBrB,0BAA0BW;QACtD,MAAMW,WAAW,IAAIvB,oBAAoB;YACvCG,qBAAqB,IAAI,CAACA,mBAAmB;YAC7CmB;QACF;QAEA,MAAME,SAAS,MAAMD,SAASE,OAAO,CAAC;YAAEX;YAAQE;YAAYI;YAAYV;YAAWC;QAAU;QAC7F,IAAI,CAACa,QAAQ,OAAO;YAAEE,SAAS;QAAK;QAEpC,MAAMC,mBAAmBrB,QAAQsB,WAAW,CAACpB,WAAW,CAACqB,MAAM;QAC/D,MAAM,IAAI,CAACC,sBAAsB,CAC/BxB,SACAE,YACAC,cACAe,OAAOO,cAAc,EACrBpB,WACAD,WACAiB,kBACAd;QAGF,OAAO;YAAEa,SAAS;QAAK;IACzB;IAEA,MAAcI,uBACZxB,OAAgB,EAChBE,UAAkB,EAClBC,YAA6B,EAC7BsB,cAAuC,EACvCpB,SAAiB,EACjBD,SAAiB,EACjBiB,gBAA2C,EAC3Cd,oBAA6B,EACd;QACf,IAAImB,oBAAoB;QACxB,MAAMC,WAAWN,iBAAiBM,QAAQ;QAE1C,IAAIA,YAAYA,SAASC,MAAM,EAAE;YAC/BH,cAAc,CAAC,UAAU,GAAGlB,uBAAuB,cAAc;YAEjE,MAAMqB,SAASD,SAASC,MAAM;YAC9B,IAAI,CAACrB,wBAAwBqB,OAAOC,QAAQ,EAAEH,oBAAoB;QACpE;QAEA,MAAM1B,QAAQ8B,MAAM,CAAC;YACnB5B,YAAYA;YACZU,IAAIT;YACJ4B,MAAMN;YACNI,UAAUH;YACVb,QAAQR;YACRU,gBAAgBX;QAClB;IACF;AACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.test.d.ts","sourceRoot":"","sources":["../../../../src/server/features/translate-document/handler.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { describe, it, expect, vi, beforeEach } from 'vitest';
|
|
2
|
+
import { APIError } from 'payload';
|
|
3
|
+
import { TranslateDocumentHandler } from './handler';
|
|
4
|
+
// Mock TranslationPipeline
|
|
5
|
+
vi.mock('../../modules/translation-pipeline', () => ({
|
|
6
|
+
TranslationPipeline: vi.fn().mockImplementation(() => ({
|
|
7
|
+
execute: vi.fn().mockResolvedValue(null),
|
|
8
|
+
})),
|
|
9
|
+
}));
|
|
10
|
+
// Mock createTranslationStrategy
|
|
11
|
+
vi.mock('../../modules/translation-pipeline/strategies', () => ({
|
|
12
|
+
createTranslationStrategy: vi.fn().mockReturnValue({}),
|
|
13
|
+
}));
|
|
14
|
+
describe('TranslateDocumentHandler', () => {
|
|
15
|
+
let handler;
|
|
16
|
+
let mockTranslationProvider;
|
|
17
|
+
let mockSchemaMap;
|
|
18
|
+
let mockPayload;
|
|
19
|
+
const createInput = (overrides = {}) => ({
|
|
20
|
+
collection: 'posts',
|
|
21
|
+
collectionId: 'doc-123',
|
|
22
|
+
sourceLng: 'en',
|
|
23
|
+
targetLng: 'de',
|
|
24
|
+
strategy: 'overwrite',
|
|
25
|
+
publishOnTranslation: false,
|
|
26
|
+
...overrides,
|
|
27
|
+
});
|
|
28
|
+
beforeEach(() => {
|
|
29
|
+
vi.clearAllMocks();
|
|
30
|
+
mockTranslationProvider = {
|
|
31
|
+
translate: vi.fn().mockResolvedValue({}),
|
|
32
|
+
};
|
|
33
|
+
mockSchemaMap = new Map([
|
|
34
|
+
['posts', [{ name: 'title', type: 'text', localized: true }]],
|
|
35
|
+
['pages', [{ name: 'content', type: 'richText', localized: true }]],
|
|
36
|
+
]);
|
|
37
|
+
mockPayload = {
|
|
38
|
+
findByID: vi.fn().mockResolvedValue({ id: 'doc-123', title: 'Test' }),
|
|
39
|
+
update: vi.fn().mockResolvedValue({}),
|
|
40
|
+
collections: {
|
|
41
|
+
posts: {
|
|
42
|
+
config: {
|
|
43
|
+
versions: undefined,
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
pages: {
|
|
47
|
+
config: {
|
|
48
|
+
versions: {
|
|
49
|
+
drafts: true,
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
handler = new TranslateDocumentHandler(mockTranslationProvider, mockSchemaMap);
|
|
56
|
+
});
|
|
57
|
+
describe('schema validation', () => {
|
|
58
|
+
it('throws APIError when collection not in schemaMap', async () => {
|
|
59
|
+
const input = createInput({ collection: 'unknown' });
|
|
60
|
+
await expect(handler.handle(mockPayload, input)).rejects.toThrow(APIError);
|
|
61
|
+
await expect(handler.handle(mockPayload, input)).rejects.toThrow('Collection "unknown" not found in schemaMap');
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
describe('document fetching', () => {
|
|
65
|
+
it('fetches source document with source locale', async () => {
|
|
66
|
+
const input = createInput({ sourceLng: 'en' });
|
|
67
|
+
await handler.handle(mockPayload, input);
|
|
68
|
+
expect(mockPayload.findByID).toHaveBeenCalledWith({
|
|
69
|
+
collection: 'posts',
|
|
70
|
+
id: 'doc-123',
|
|
71
|
+
locale: 'en',
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
it('fetches target document with target locale and no fallback', async () => {
|
|
75
|
+
const input = createInput({ targetLng: 'de' });
|
|
76
|
+
await handler.handle(mockPayload, input);
|
|
77
|
+
expect(mockPayload.findByID).toHaveBeenCalledWith({
|
|
78
|
+
collection: 'posts',
|
|
79
|
+
id: 'doc-123',
|
|
80
|
+
locale: 'de',
|
|
81
|
+
fallbackLocale: false,
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
describe('success responses', () => {
|
|
86
|
+
it('returns success when no translation needed (pipeline returns null)', async () => {
|
|
87
|
+
const input = createInput();
|
|
88
|
+
const result = await handler.handle(mockPayload, input);
|
|
89
|
+
expect(result).toEqual({ success: true });
|
|
90
|
+
expect(mockPayload.update).not.toHaveBeenCalled();
|
|
91
|
+
});
|
|
92
|
+
it('returns success after saving translated document', async () => {
|
|
93
|
+
const { TranslationPipeline } = await import('../../modules/translation-pipeline');
|
|
94
|
+
TranslationPipeline.mockImplementation(() => ({
|
|
95
|
+
execute: vi.fn().mockResolvedValue({ translatedData: { title: 'Übersetzter Titel' } }),
|
|
96
|
+
}));
|
|
97
|
+
const input = createInput();
|
|
98
|
+
const result = await handler.handle(mockPayload, input);
|
|
99
|
+
expect(result).toEqual({ success: true });
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
describe('saving translated documents', () => {
|
|
103
|
+
beforeEach(async () => {
|
|
104
|
+
const { TranslationPipeline } = await import('../../modules/translation-pipeline');
|
|
105
|
+
TranslationPipeline.mockImplementation(() => ({
|
|
106
|
+
execute: vi.fn().mockResolvedValue({ translatedData: { title: 'Translated' } }),
|
|
107
|
+
}));
|
|
108
|
+
});
|
|
109
|
+
it('saves document with target locale and source as fallback', async () => {
|
|
110
|
+
const input = createInput({ sourceLng: 'en', targetLng: 'fr' });
|
|
111
|
+
await handler.handle(mockPayload, input);
|
|
112
|
+
expect(mockPayload.update).toHaveBeenCalledWith(expect.objectContaining({
|
|
113
|
+
collection: 'posts',
|
|
114
|
+
id: 'doc-123',
|
|
115
|
+
locale: 'fr',
|
|
116
|
+
fallbackLocale: 'en',
|
|
117
|
+
}));
|
|
118
|
+
});
|
|
119
|
+
it('saves document without autosave when versions not enabled', async () => {
|
|
120
|
+
const input = createInput();
|
|
121
|
+
await handler.handle(mockPayload, input);
|
|
122
|
+
expect(mockPayload.update).toHaveBeenCalledWith(expect.objectContaining({
|
|
123
|
+
autosave: false,
|
|
124
|
+
}));
|
|
125
|
+
});
|
|
126
|
+
it('sets _status to draft when versions with drafts enabled', async () => {
|
|
127
|
+
;
|
|
128
|
+
mockPayload.collections['posts'].config.versions = { drafts: true };
|
|
129
|
+
const input = createInput();
|
|
130
|
+
await handler.handle(mockPayload, input);
|
|
131
|
+
expect(mockPayload.update).toHaveBeenCalledWith(expect.objectContaining({
|
|
132
|
+
data: expect.objectContaining({
|
|
133
|
+
_status: 'draft',
|
|
134
|
+
}),
|
|
135
|
+
}));
|
|
136
|
+
});
|
|
137
|
+
it('sets _status to published when publishOnTranslation is true', async () => {
|
|
138
|
+
;
|
|
139
|
+
mockPayload.collections['posts'].config.versions = { drafts: true };
|
|
140
|
+
const input = createInput({ publishOnTranslation: true });
|
|
141
|
+
await handler.handle(mockPayload, input);
|
|
142
|
+
expect(mockPayload.update).toHaveBeenCalledWith(expect.objectContaining({
|
|
143
|
+
data: expect.objectContaining({
|
|
144
|
+
_status: 'published',
|
|
145
|
+
}),
|
|
146
|
+
}));
|
|
147
|
+
});
|
|
148
|
+
it('uses autosave when drafts with autosave enabled and not publishing', async () => {
|
|
149
|
+
;
|
|
150
|
+
mockPayload.collections['posts'].config.versions = {
|
|
151
|
+
drafts: { autosave: true },
|
|
152
|
+
};
|
|
153
|
+
const input = createInput();
|
|
154
|
+
await handler.handle(mockPayload, input);
|
|
155
|
+
expect(mockPayload.update).toHaveBeenCalledWith(expect.objectContaining({
|
|
156
|
+
autosave: true,
|
|
157
|
+
}));
|
|
158
|
+
});
|
|
159
|
+
it('does not use autosave when publishing', async () => {
|
|
160
|
+
;
|
|
161
|
+
mockPayload.collections['posts'].config.versions = {
|
|
162
|
+
drafts: { autosave: true },
|
|
163
|
+
};
|
|
164
|
+
const input = createInput({ publishOnTranslation: true });
|
|
165
|
+
await handler.handle(mockPayload, input);
|
|
166
|
+
expect(mockPayload.update).toHaveBeenCalledWith(expect.objectContaining({
|
|
167
|
+
autosave: false,
|
|
168
|
+
}));
|
|
169
|
+
});
|
|
170
|
+
});
|
|
171
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/server/features/translate-document/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,mBAAmB,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAA;AAChG,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAA;AACpD,YAAY,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/server/features/translate-document/index.ts"],"sourcesContent":["export { createTranslateDocumentTask, createAutoRunConfig, TASK_NAME, QUEUE_NAME } from './task'\nexport { TranslateDocumentHandler } from './handler'\nexport type { CollectionSchemaMap, AutoRunConfig } from './model'\n"],"names":["createTranslateDocumentTask","createAutoRunConfig","TASK_NAME","QUEUE_NAME","TranslateDocumentHandler"],"mappings":"AAAA,SAASA,2BAA2B,EAAEC,mBAAmB,EAAEC,SAAS,EAAEC,UAAU,QAAQ,SAAQ;AAChG,SAASC,wBAAwB,QAAQ,YAAW"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { CollectionSlug, Field } from 'payload';
|
|
2
|
+
import type { TranslationStrategyName } from '../../modules/translation-pipeline/strategies';
|
|
3
|
+
/**
|
|
4
|
+
* Input for the translate document handler
|
|
5
|
+
*/
|
|
6
|
+
export type TranslateDocumentInput = {
|
|
7
|
+
collection: CollectionSlug;
|
|
8
|
+
collectionId: string | number;
|
|
9
|
+
sourceLng: string;
|
|
10
|
+
targetLng: string;
|
|
11
|
+
strategy: TranslationStrategyName;
|
|
12
|
+
publishOnTranslation: boolean;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Output of the translate document handler
|
|
16
|
+
*/
|
|
17
|
+
export type TranslateDocumentOutput = {
|
|
18
|
+
success: true;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Map of collection slug to original field schema.
|
|
22
|
+
* Used to access original schemas before Payload sanitization.
|
|
23
|
+
*/
|
|
24
|
+
export type CollectionSchemaMap = Map<CollectionSlug, Field[]>;
|
|
25
|
+
/**
|
|
26
|
+
* Payload task configuration
|
|
27
|
+
*/
|
|
28
|
+
export type TaskConfig = {
|
|
29
|
+
collections: CollectionSlug[];
|
|
30
|
+
retries?: {
|
|
31
|
+
attempts?: number;
|
|
32
|
+
backoff?: {
|
|
33
|
+
delay?: number;
|
|
34
|
+
type: 'exponential' | 'fixed';
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Auto-run configuration for the job queue
|
|
40
|
+
*/
|
|
41
|
+
export type AutoRunConfig = {
|
|
42
|
+
cron?: string;
|
|
43
|
+
limit?: number;
|
|
44
|
+
queue?: string;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Payload input schema for the task
|
|
48
|
+
*/
|
|
49
|
+
export declare const taskInputSchema: Field[];
|
|
50
|
+
export declare const TASK_NAME: "translate_document";
|
|
51
|
+
export declare const QUEUE_NAME: "translations";
|
|
52
|
+
export declare const DEFAULT_AUTO_RUN: AutoRunConfig;
|
|
53
|
+
//# sourceMappingURL=model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../../src/server/features/translate-document/model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AACpD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAA;AAE5F;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC,UAAU,EAAE,cAAc,CAAA;IAC1B,YAAY,EAAE,MAAM,GAAG,MAAM,CAAA;IAC7B,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,uBAAuB,CAAA;IACjC,oBAAoB,EAAE,OAAO,CAAA;CAC9B,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC,OAAO,EAAE,IAAI,CAAA;CACd,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,GAAG,CAAC,cAAc,EAAE,KAAK,EAAE,CAAC,CAAA;AAE9D;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,WAAW,EAAE,cAAc,EAAE,CAAA;IAC7B,OAAO,CAAC,EAAE;QACR,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,OAAO,CAAC,EAAE;YAAE,KAAK,CAAC,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAA;SAAE,CAAA;KAC5D,CAAA;CACF,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,EAmBlC,CAAA;AAED,eAAO,MAAM,SAAS,EAAG,oBAA6B,CAAA;AACtD,eAAO,MAAM,UAAU,EAAG,cAAuB,CAAA;AACjD,eAAO,MAAM,gBAAgB,EAAE,aAG9B,CAAA"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Payload input schema for the task
|
|
3
|
+
*/ export const taskInputSchema = [
|
|
4
|
+
{
|
|
5
|
+
type: 'relationship',
|
|
6
|
+
name: 'collection',
|
|
7
|
+
relationTo: [],
|
|
8
|
+
required: true
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
type: 'text',
|
|
12
|
+
maxLength: 256,
|
|
13
|
+
name: 'source_lng',
|
|
14
|
+
required: true
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
type: 'text',
|
|
18
|
+
maxLength: 256,
|
|
19
|
+
name: 'target_lng',
|
|
20
|
+
required: true
|
|
21
|
+
}
|
|
22
|
+
];
|
|
23
|
+
export const TASK_NAME = 'translate_document';
|
|
24
|
+
export const QUEUE_NAME = 'translations';
|
|
25
|
+
export const DEFAULT_AUTO_RUN = {
|
|
26
|
+
cron: '* * * * *',
|
|
27
|
+
limit: 50
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
//# sourceMappingURL=model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/server/features/translate-document/model.ts"],"sourcesContent":["import type { CollectionSlug, Field } from 'payload'\nimport type { TranslationStrategyName } from '../../modules/translation-pipeline/strategies'\n\n/**\n * Input for the translate document handler\n */\nexport type TranslateDocumentInput = {\n collection: CollectionSlug\n collectionId: string | number\n sourceLng: string\n targetLng: string\n strategy: TranslationStrategyName\n publishOnTranslation: boolean\n}\n\n/**\n * Output of the translate document handler\n */\nexport type TranslateDocumentOutput = {\n success: true\n}\n\n/**\n * Map of collection slug to original field schema.\n * Used to access original schemas before Payload sanitization.\n */\nexport type CollectionSchemaMap = Map<CollectionSlug, Field[]>\n\n/**\n * Payload task configuration\n */\nexport type TaskConfig = {\n collections: CollectionSlug[]\n retries?: {\n attempts?: number\n backoff?: { delay?: number; type: 'exponential' | 'fixed' }\n }\n}\n\n/**\n * Auto-run configuration for the job queue\n */\nexport type AutoRunConfig = {\n cron?: string\n limit?: number\n queue?: string\n}\n\n/**\n * Payload input schema for the task\n */\nexport const taskInputSchema: Field[] = [\n {\n type: 'relationship',\n name: 'collection',\n relationTo: [], // Will be populated with actual collections\n required: true,\n },\n {\n type: 'text',\n maxLength: 256,\n name: 'source_lng',\n required: true,\n },\n {\n type: 'text',\n maxLength: 256,\n name: 'target_lng',\n required: true,\n },\n]\n\nexport const TASK_NAME = 'translate_document' as const\nexport const QUEUE_NAME = 'translations' as const\nexport const DEFAULT_AUTO_RUN: AutoRunConfig = {\n cron: '* * * * *',\n limit: 50,\n}\n"],"names":["taskInputSchema","type","name","relationTo","required","maxLength","TASK_NAME","QUEUE_NAME","DEFAULT_AUTO_RUN","cron","limit"],"mappings":"AAgDA;;CAEC,GACD,OAAO,MAAMA,kBAA2B;IACtC;QACEC,MAAM;QACNC,MAAM;QACNC,YAAY,EAAE;QACdC,UAAU;IACZ;IACA;QACEH,MAAM;QACNI,WAAW;QACXH,MAAM;QACNE,UAAU;IACZ;IACA;QACEH,MAAM;QACNI,WAAW;QACXH,MAAM;QACNE,UAAU;IACZ;CACD,CAAA;AAED,OAAO,MAAME,YAAY,qBAA6B;AACtD,OAAO,MAAMC,aAAa,eAAuB;AACjD,OAAO,MAAMC,mBAAkC;IAC7CC,MAAM;IACNC,OAAO;AACT,EAAC"}
|