@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,49 @@
|
|
|
1
|
+
import { TRANSLATE_KIT_CUSTOM_KEY } from './server/shared/field-config';
|
|
2
|
+
/**
|
|
3
|
+
* Apply translation configuration to a Payload field.
|
|
4
|
+
*
|
|
5
|
+
* Use this helper to configure how fields should be handled during translation.
|
|
6
|
+
*
|
|
7
|
+
* @param field - The Payload field to configure
|
|
8
|
+
* @param config - Translation configuration options
|
|
9
|
+
* @returns The field with translation configuration applied
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* import { withFieldTranslation } from '@focus-reactive/payload-plugin-translator'
|
|
14
|
+
*
|
|
15
|
+
* // Exclude a field from translation
|
|
16
|
+
* withFieldTranslation(
|
|
17
|
+
* { name: 'sku', type: 'text', localized: true },
|
|
18
|
+
* { exclude: true }
|
|
19
|
+
* )
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* // In a collection definition
|
|
25
|
+
* const Products: CollectionConfig = {
|
|
26
|
+
* slug: 'products',
|
|
27
|
+
* fields: [
|
|
28
|
+
* { name: 'title', type: 'text', localized: true },
|
|
29
|
+
* withFieldTranslation(
|
|
30
|
+
* { name: 'sku', type: 'text', localized: true },
|
|
31
|
+
* { exclude: true }
|
|
32
|
+
* ),
|
|
33
|
+
* ],
|
|
34
|
+
* }
|
|
35
|
+
* ```
|
|
36
|
+
*/ export function withFieldTranslation(field, config) {
|
|
37
|
+
return {
|
|
38
|
+
...field,
|
|
39
|
+
custom: {
|
|
40
|
+
...field.custom ?? {},
|
|
41
|
+
[TRANSLATE_KIT_CUSTOM_KEY]: config
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* @deprecated Use `withFieldTranslation` instead
|
|
47
|
+
*/ export const translateKitField = withFieldTranslation;
|
|
48
|
+
|
|
49
|
+
//# sourceMappingURL=field-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/field-config.ts"],"sourcesContent":["import type { Field } from 'payload'\n\nimport type { FieldTranslationConfig } from './server/shared/field-config'\nimport { TRANSLATE_KIT_CUSTOM_KEY } from './server/shared/field-config'\n\nexport type { FieldTranslationConfig }\n\n/**\n * @deprecated Use `FieldTranslationConfig` instead\n */\nexport type { FieldTranslationConfig as TranslateKitFieldConfig }\n\n/**\n * Apply translation configuration to a Payload field.\n *\n * Use this helper to configure how fields should be handled during translation.\n *\n * @param field - The Payload field to configure\n * @param config - Translation configuration options\n * @returns The field with translation configuration applied\n *\n * @example\n * ```ts\n * import { withFieldTranslation } from '@focus-reactive/payload-plugin-translator'\n *\n * // Exclude a field from translation\n * withFieldTranslation(\n * { name: 'sku', type: 'text', localized: true },\n * { exclude: true }\n * )\n * ```\n *\n * @example\n * ```ts\n * // In a collection definition\n * const Products: CollectionConfig = {\n * slug: 'products',\n * fields: [\n * { name: 'title', type: 'text', localized: true },\n * withFieldTranslation(\n * { name: 'sku', type: 'text', localized: true },\n * { exclude: true }\n * ),\n * ],\n * }\n * ```\n */\nexport function withFieldTranslation<T extends Field>(field: T, config: FieldTranslationConfig): T {\n return {\n ...field,\n custom: {\n ...(field.custom ?? {}),\n [TRANSLATE_KIT_CUSTOM_KEY]: config,\n },\n }\n}\n\n/**\n * @deprecated Use `withFieldTranslation` instead\n */\nexport const translateKitField = withFieldTranslation\n"],"names":["TRANSLATE_KIT_CUSTOM_KEY","withFieldTranslation","field","config","custom","translateKitField"],"mappings":"AAGA,SAASA,wBAAwB,QAAQ,+BAA8B;AASvE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCC,GACD,OAAO,SAASC,qBAAsCC,KAAQ,EAAEC,MAA8B;IAC5F,OAAO;QACL,GAAGD,KAAK;QACRE,QAAQ;YACN,GAAIF,MAAME,MAAM,IAAI,CAAC,CAAC;YACtB,CAACJ,yBAAyB,EAAEG;QAC9B;IACF;AACF;AAEA;;CAEC,GACD,OAAO,MAAME,oBAAoBJ,qBAAoB"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export { translatorPlugin } from './plugin';
|
|
2
|
+
export type { TranslatorPluginConfig } from './plugin';
|
|
3
|
+
export type { AccessGuard, AccessGuardRequest } from './types/AccessGuard';
|
|
4
|
+
export { createOpenAIProvider } from './server/modules/translation-providers';
|
|
5
|
+
export type { TranslationProvider, TranslationInput, TranslationOutput, OpenAIProviderConfig, DryRunConfig, } from './server/modules/translation-providers';
|
|
6
|
+
export { createPayloadJobsRunner, createSyncRunner } from './server/modules/task-runner';
|
|
7
|
+
export type { TaskRunnerProvider, PayloadJobsRunnerOptions } from './server/modules/task-runner';
|
|
8
|
+
export { withFieldTranslation } from './field-config';
|
|
9
|
+
export type { FieldTranslationConfig } from './field-config';
|
|
10
|
+
export { createTranslatePlugin, TranslateCollectionPlugin } from './plugin';
|
|
11
|
+
export type { TranslateCollectionPluginConfig } from './plugin';
|
|
12
|
+
export { OpenAITranslationProvider } from './server/modules/translation-providers';
|
|
13
|
+
export { translateKitField } from './field-config';
|
|
14
|
+
export type { TranslateKitFieldConfig } from './field-config';
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAC3C,YAAY,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAA;AAGtD,YAAY,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AAG1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAA;AAC7E,YAAY,EACV,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACpB,YAAY,GACb,MAAM,wCAAwC,CAAA;AAG/C,OAAO,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AACxF,YAAY,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAA;AAGhG,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AACrD,YAAY,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAA;AAG5D,OAAO,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAA;AAC3E,YAAY,EAAE,+BAA+B,EAAE,MAAM,UAAU,CAAA;AAC/D,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAA;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAClD,YAAY,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Main plugin
|
|
2
|
+
export { translatorPlugin } from './plugin';
|
|
3
|
+
// Translation providers
|
|
4
|
+
export { createOpenAIProvider } from './server/modules/translation-providers';
|
|
5
|
+
// Task runners
|
|
6
|
+
export { createPayloadJobsRunner, createSyncRunner } from './server/modules/task-runner';
|
|
7
|
+
// Field config
|
|
8
|
+
export { withFieldTranslation } from './field-config';
|
|
9
|
+
// Deprecated exports (for backwards compatibility)
|
|
10
|
+
export { createTranslatePlugin, TranslateCollectionPlugin } from './plugin';
|
|
11
|
+
export { OpenAITranslationProvider } from './server/modules/translation-providers';
|
|
12
|
+
export { translateKitField } from './field-config';
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["// Main plugin\nexport { translatorPlugin } from './plugin'\nexport type { TranslatorPluginConfig } from './plugin'\n\n// Access control\nexport type { AccessGuard, AccessGuardRequest } from './types/AccessGuard'\n\n// Translation providers\nexport { createOpenAIProvider } from './server/modules/translation-providers'\nexport type {\n TranslationProvider,\n TranslationInput,\n TranslationOutput,\n OpenAIProviderConfig,\n DryRunConfig,\n} from './server/modules/translation-providers'\n\n// Task runners\nexport { createPayloadJobsRunner, createSyncRunner } from './server/modules/task-runner'\nexport type { TaskRunnerProvider, PayloadJobsRunnerOptions } from './server/modules/task-runner'\n\n// Field config\nexport { withFieldTranslation } from './field-config'\nexport type { FieldTranslationConfig } from './field-config'\n\n// Deprecated exports (for backwards compatibility)\nexport { createTranslatePlugin, TranslateCollectionPlugin } from './plugin'\nexport type { TranslateCollectionPluginConfig } from './plugin'\nexport { OpenAITranslationProvider } from './server/modules/translation-providers'\nexport { translateKitField } from './field-config'\nexport type { TranslateKitFieldConfig } from './field-config'\n"],"names":["translatorPlugin","createOpenAIProvider","createPayloadJobsRunner","createSyncRunner","withFieldTranslation","createTranslatePlugin","TranslateCollectionPlugin","OpenAITranslationProvider","translateKitField"],"mappings":"AAAA,cAAc;AACd,SAASA,gBAAgB,QAAQ,WAAU;AAM3C,wBAAwB;AACxB,SAASC,oBAAoB,QAAQ,yCAAwC;AAS7E,eAAe;AACf,SAASC,uBAAuB,EAAEC,gBAAgB,QAAQ,+BAA8B;AAGxF,eAAe;AACf,SAASC,oBAAoB,QAAQ,iBAAgB;AAGrD,mDAAmD;AACnD,SAASC,qBAAqB,EAAEC,yBAAyB,QAAQ,WAAU;AAE3E,SAASC,yBAAyB,QAAQ,yCAAwC;AAClF,SAASC,iBAAiB,QAAQ,iBAAgB"}
|
package/dist/plugin.d.ts
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { CollectionConfig, Config } from 'payload';
|
|
2
|
+
import type { AccessGuard } from './types/AccessGuard';
|
|
3
|
+
import type { TranslationProvider } from './server/modules/translation-providers';
|
|
4
|
+
import type { TaskRunnerProvider } from './server/modules/task-runner';
|
|
5
|
+
export type TranslatorPluginConfig = {
|
|
6
|
+
/**
|
|
7
|
+
* Original collection configs (same objects passed to buildConfig).
|
|
8
|
+
* IMPORTANT: Must be the original collection objects, NOT sanitized configs from payload.collections.
|
|
9
|
+
* Original schemas preserve `localized: true` on nested fields.
|
|
10
|
+
*/
|
|
11
|
+
collections: CollectionConfig[];
|
|
12
|
+
/**
|
|
13
|
+
* Translation provider implementation (e.g., OpenAI, DeepL).
|
|
14
|
+
* Handles the actual text translation.
|
|
15
|
+
*/
|
|
16
|
+
translationProvider: TranslationProvider;
|
|
17
|
+
/**
|
|
18
|
+
* Task runner backend for background task execution.
|
|
19
|
+
* Use createPayloadJobsRunner() for Payload Jobs integration.
|
|
20
|
+
*/
|
|
21
|
+
runner: TaskRunnerProvider;
|
|
22
|
+
/**
|
|
23
|
+
* Access guard for translation endpoints.
|
|
24
|
+
* Controls who can trigger translations via API.
|
|
25
|
+
* @default undefined (no access restrictions)
|
|
26
|
+
*/
|
|
27
|
+
access?: AccessGuard;
|
|
28
|
+
/**
|
|
29
|
+
* Base path for all translation API endpoints.
|
|
30
|
+
* Useful to avoid conflicts with existing routes.
|
|
31
|
+
* @example '/my-translate' results in '/my-translate/enqueue', '/my-translate/run/:id', etc.
|
|
32
|
+
* @default '/translate'
|
|
33
|
+
*/
|
|
34
|
+
basePath?: string;
|
|
35
|
+
};
|
|
36
|
+
/** @deprecated Use `TranslatorPluginConfig` instead */
|
|
37
|
+
export type TranslateCollectionPluginConfig = TranslatorPluginConfig;
|
|
38
|
+
/** @deprecated Use `translatorPlugin` function instead */
|
|
39
|
+
export declare class TranslateCollectionPlugin {
|
|
40
|
+
private readonly pluginConfig;
|
|
41
|
+
constructor(pluginConfig: TranslatorPluginConfig);
|
|
42
|
+
init(): (config: Config) => Promise<Config>;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Creates a translation plugin for Payload CMS collections.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```ts
|
|
49
|
+
* export default buildConfig({
|
|
50
|
+
* plugins: [
|
|
51
|
+
* translatorPlugin({
|
|
52
|
+
* collections: [Posts, Pages],
|
|
53
|
+
* translationProvider: createOpenAIProvider({ apiKey: process.env.OPENAI_API_KEY }),
|
|
54
|
+
* runner: createPayloadJobsRunner(),
|
|
55
|
+
* }),
|
|
56
|
+
* ],
|
|
57
|
+
* })
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
export declare function translatorPlugin(config: TranslatorPluginConfig): (config: Config) => Promise<Config>;
|
|
61
|
+
/** @deprecated Use `translatorPlugin` instead */
|
|
62
|
+
export declare const createTranslatePlugin: typeof translatorPlugin;
|
|
63
|
+
//# sourceMappingURL=plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAKvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAA;AACjF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AAUtE,MAAM,MAAM,sBAAsB,GAAG;IACnC;;;;OAIG;IACH,WAAW,EAAE,gBAAgB,EAAE,CAAA;IAC/B;;;OAGG;IACH,mBAAmB,EAAE,mBAAmB,CAAA;IACxC;;;OAGG;IACH,MAAM,EAAE,kBAAkB,CAAA;IAC1B;;;;OAIG;IACH,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,uDAAuD;AACvD,MAAM,MAAM,+BAA+B,GAAG,sBAAsB,CAAA;AAEpE,0DAA0D;AAC1D,qBAAa,yBAAyB;IACxB,OAAO,CAAC,QAAQ,CAAC,YAAY;gBAAZ,YAAY,EAAE,sBAAsB;IAEjE,IAAI,IAAI,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC;CAqF5C;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,sBAAsB,GAAG,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAEpG;AAED,iDAAiD;AACjD,eAAO,MAAM,qBAAqB,yBAAmB,CAAA"}
|
package/dist/plugin.js
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { CacheProviderExport } from './client/app/cache/CacheProvider.export';
|
|
2
|
+
import { BulkDocumentTranslationDashboard } from './client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.export';
|
|
3
|
+
import { TranslateDocumentExport } from './client/widgets/translate-document';
|
|
4
|
+
import { TranslateDocumentHandler } from './server/features/translate-document';
|
|
5
|
+
import { createEnqueueRoute } from './server/features/enqueue-translation';
|
|
6
|
+
import { createRunRoute } from './server/features/run-translation';
|
|
7
|
+
import { createCancelRoute } from './server/features/cancel';
|
|
8
|
+
import { createCancelByCollectionRoute } from './server/features/cancel-by-collection';
|
|
9
|
+
import { createGetDocumentStatusRoute } from './server/features/get-document-status';
|
|
10
|
+
import { createGetCollectionStatusRoute } from './server/features/get-collection-status';
|
|
11
|
+
import { normalizePath, pipe } from './server/shared';
|
|
12
|
+
/** @deprecated Use `translatorPlugin` function instead */ export class TranslateCollectionPlugin {
|
|
13
|
+
pluginConfig;
|
|
14
|
+
constructor(pluginConfig){
|
|
15
|
+
this.pluginConfig = pluginConfig;
|
|
16
|
+
}
|
|
17
|
+
init() {
|
|
18
|
+
return async (config)=>{
|
|
19
|
+
const { access, translationProvider, basePath: rawBasePath = '/translate' } = this.pluginConfig;
|
|
20
|
+
// Build schema map from deep-cloned collections
|
|
21
|
+
// Deep clone is required because Payload mutates the original collection objects,
|
|
22
|
+
// removing `localized: true` from nested fields during sanitization
|
|
23
|
+
const schemaMap = new Map(this.pluginConfig.collections.map((col)=>[
|
|
24
|
+
col.slug,
|
|
25
|
+
structuredClone(col.fields)
|
|
26
|
+
]));
|
|
27
|
+
const collectionSlugs = new Set(schemaMap.keys());
|
|
28
|
+
const basePath = normalizePath(rawBasePath);
|
|
29
|
+
const translateHandler = new TranslateDocumentHandler(translationProvider, schemaMap);
|
|
30
|
+
// Configure runner with handler callback
|
|
31
|
+
const runnerConfigModifier = this.pluginConfig.runner.configure({
|
|
32
|
+
handler: async (payload, input)=>{
|
|
33
|
+
await translateHandler.handle(payload, {
|
|
34
|
+
collection: input.collection,
|
|
35
|
+
collectionId: input.collectionId,
|
|
36
|
+
sourceLng: input.sourceLng,
|
|
37
|
+
targetLng: input.targetLng,
|
|
38
|
+
strategy: input.strategy,
|
|
39
|
+
publishOnTranslation: input.publishOnTranslation
|
|
40
|
+
});
|
|
41
|
+
},
|
|
42
|
+
collections: Array.from(collectionSlugs)
|
|
43
|
+
});
|
|
44
|
+
return pipe(// 1. Set up UI component provider import
|
|
45
|
+
(cfg)=>{
|
|
46
|
+
if (!cfg.admin) cfg.admin = {};
|
|
47
|
+
if (!cfg.admin.components) cfg.admin.components = {};
|
|
48
|
+
if (!cfg.admin.components.providers) cfg.admin.components.providers = [];
|
|
49
|
+
cfg.admin.components.providers.push(new CacheProviderExport(basePath));
|
|
50
|
+
return cfg;
|
|
51
|
+
}, // 2. Set up UI component import
|
|
52
|
+
(cfg)=>{
|
|
53
|
+
cfg.collections?.forEach((collection)=>{
|
|
54
|
+
if (!collectionSlugs.has(collection.slug)) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
if (!collection.admin) collection.admin = {};
|
|
58
|
+
if (!collection.admin.components) collection.admin.components = {};
|
|
59
|
+
if (!collection.admin.components.edit) collection.admin.components.edit = {};
|
|
60
|
+
if (!collection.admin.components.edit.beforeDocumentControls) {
|
|
61
|
+
collection.admin.components.edit.beforeDocumentControls = [];
|
|
62
|
+
}
|
|
63
|
+
if (!collection.admin.components.beforeListTable) {
|
|
64
|
+
collection.admin.components.beforeListTable = [];
|
|
65
|
+
}
|
|
66
|
+
collection.admin.components.edit.beforeDocumentControls.push(new TranslateDocumentExport(collection, access));
|
|
67
|
+
collection.admin.components.beforeListTable.push(new BulkDocumentTranslationDashboard(access));
|
|
68
|
+
});
|
|
69
|
+
return cfg;
|
|
70
|
+
}, // 3. Runner configures jobs/tasks/autorun
|
|
71
|
+
runnerConfigModifier, // 4. Add global endpoints
|
|
72
|
+
(cfg)=>{
|
|
73
|
+
if (!cfg.endpoints) cfg.endpoints = [];
|
|
74
|
+
const collectionConfig = {
|
|
75
|
+
availableCollections: collectionSlugs
|
|
76
|
+
};
|
|
77
|
+
cfg.endpoints.push(...[
|
|
78
|
+
createEnqueueRoute(this.pluginConfig.runner, collectionConfig, access, basePath),
|
|
79
|
+
createRunRoute(this.pluginConfig.runner, access, basePath),
|
|
80
|
+
createCancelRoute(this.pluginConfig.runner, access, basePath),
|
|
81
|
+
createCancelByCollectionRoute(collectionConfig, this.pluginConfig.runner, access, basePath),
|
|
82
|
+
createGetDocumentStatusRoute(collectionConfig, this.pluginConfig.runner, access, basePath),
|
|
83
|
+
createGetCollectionStatusRoute(collectionConfig, this.pluginConfig.runner, access, basePath)
|
|
84
|
+
]);
|
|
85
|
+
return cfg;
|
|
86
|
+
})(config);
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Creates a translation plugin for Payload CMS collections.
|
|
92
|
+
*
|
|
93
|
+
* @example
|
|
94
|
+
* ```ts
|
|
95
|
+
* export default buildConfig({
|
|
96
|
+
* plugins: [
|
|
97
|
+
* translatorPlugin({
|
|
98
|
+
* collections: [Posts, Pages],
|
|
99
|
+
* translationProvider: createOpenAIProvider({ apiKey: process.env.OPENAI_API_KEY }),
|
|
100
|
+
* runner: createPayloadJobsRunner(),
|
|
101
|
+
* }),
|
|
102
|
+
* ],
|
|
103
|
+
* })
|
|
104
|
+
* ```
|
|
105
|
+
*/ export function translatorPlugin(config) {
|
|
106
|
+
return new TranslateCollectionPlugin(config).init();
|
|
107
|
+
}
|
|
108
|
+
/** @deprecated Use `translatorPlugin` instead */ export const createTranslatePlugin = translatorPlugin;
|
|
109
|
+
|
|
110
|
+
//# sourceMappingURL=plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/plugin.ts"],"sourcesContent":["import type { CollectionConfig, Config } from 'payload'\n\nimport { CacheProviderExport } from './client/app/cache/CacheProvider.export'\nimport { BulkDocumentTranslationDashboard } from './client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.export'\nimport { TranslateDocumentExport } from './client/widgets/translate-document'\nimport type { AccessGuard } from './types/AccessGuard'\nimport type { TranslationProvider } from './server/modules/translation-providers'\nimport type { TaskRunnerProvider } from './server/modules/task-runner'\nimport { TranslateDocumentHandler } from './server/features/translate-document'\nimport { createEnqueueRoute } from './server/features/enqueue-translation'\nimport { createRunRoute } from './server/features/run-translation'\nimport { createCancelRoute } from './server/features/cancel'\nimport { createCancelByCollectionRoute } from './server/features/cancel-by-collection'\nimport { createGetDocumentStatusRoute } from './server/features/get-document-status'\nimport { createGetCollectionStatusRoute } from './server/features/get-collection-status'\nimport { normalizePath, pipe } from './server/shared'\n\nexport type TranslatorPluginConfig = {\n /**\n * Original collection configs (same objects passed to buildConfig).\n * IMPORTANT: Must be the original collection objects, NOT sanitized configs from payload.collections.\n * Original schemas preserve `localized: true` on nested fields.\n */\n collections: CollectionConfig[]\n /**\n * Translation provider implementation (e.g., OpenAI, DeepL).\n * Handles the actual text translation.\n */\n translationProvider: TranslationProvider\n /**\n * Task runner backend for background task execution.\n * Use createPayloadJobsRunner() for Payload Jobs integration.\n */\n runner: TaskRunnerProvider\n /**\n * Access guard for translation endpoints.\n * Controls who can trigger translations via API.\n * @default undefined (no access restrictions)\n */\n access?: AccessGuard\n /**\n * Base path for all translation API endpoints.\n * Useful to avoid conflicts with existing routes.\n * @example '/my-translate' results in '/my-translate/enqueue', '/my-translate/run/:id', etc.\n * @default '/translate'\n */\n basePath?: string\n}\n\n/** @deprecated Use `TranslatorPluginConfig` instead */\nexport type TranslateCollectionPluginConfig = TranslatorPluginConfig\n\n/** @deprecated Use `translatorPlugin` function instead */\nexport class TranslateCollectionPlugin {\n constructor(private readonly pluginConfig: TranslatorPluginConfig) {}\n\n init(): (config: Config) => Promise<Config> {\n return async (config) => {\n const { access, translationProvider, basePath: rawBasePath = '/translate' } = this.pluginConfig\n\n // Build schema map from deep-cloned collections\n // Deep clone is required because Payload mutates the original collection objects,\n // removing `localized: true` from nested fields during sanitization\n const schemaMap = new Map(this.pluginConfig.collections.map((col) => [col.slug, structuredClone(col.fields)]))\n const collectionSlugs = new Set(schemaMap.keys())\n const basePath = normalizePath(rawBasePath)\n const translateHandler = new TranslateDocumentHandler(translationProvider, schemaMap)\n\n // Configure runner with handler callback\n const runnerConfigModifier = this.pluginConfig.runner.configure({\n handler: async (payload, input) => {\n await translateHandler.handle(payload, {\n collection: input.collection,\n collectionId: input.collectionId,\n sourceLng: input.sourceLng,\n targetLng: input.targetLng,\n strategy: input.strategy,\n publishOnTranslation: input.publishOnTranslation,\n })\n },\n collections: Array.from(collectionSlugs),\n })\n\n return pipe<Config>(\n // 1. Set up UI component provider import\n (cfg) => {\n if (!cfg.admin) cfg.admin = {}\n if (!cfg.admin.components) cfg.admin.components = {}\n if (!cfg.admin.components.providers) cfg.admin.components.providers = []\n\n cfg.admin.components.providers.push(new CacheProviderExport(basePath))\n return cfg\n },\n\n // 2. Set up UI component import\n (cfg) => {\n cfg.collections?.forEach((collection) => {\n if (!collectionSlugs.has(collection.slug)) {\n return\n }\n\n if (!collection.admin) collection.admin = {}\n if (!collection.admin.components) collection.admin.components = {}\n if (!collection.admin.components.edit) collection.admin.components.edit = {}\n if (!collection.admin.components.edit.beforeDocumentControls) {\n collection.admin.components.edit.beforeDocumentControls = []\n }\n if (!collection.admin.components.beforeListTable) {\n collection.admin.components.beforeListTable = []\n }\n\n collection.admin.components.edit.beforeDocumentControls.push(\n new TranslateDocumentExport(collection, access),\n )\n collection.admin.components.beforeListTable.push(new BulkDocumentTranslationDashboard(access))\n })\n return cfg\n },\n\n // 3. Runner configures jobs/tasks/autorun\n runnerConfigModifier,\n\n // 4. Add global endpoints\n (cfg) => {\n if (!cfg.endpoints) cfg.endpoints = []\n const collectionConfig = { availableCollections: collectionSlugs }\n cfg.endpoints.push(\n ...[\n createEnqueueRoute(this.pluginConfig.runner, collectionConfig, access, basePath),\n createRunRoute(this.pluginConfig.runner, access, basePath),\n createCancelRoute(this.pluginConfig.runner, access, basePath),\n createCancelByCollectionRoute(collectionConfig, this.pluginConfig.runner, access, basePath),\n createGetDocumentStatusRoute(collectionConfig, this.pluginConfig.runner, access, basePath),\n createGetCollectionStatusRoute(collectionConfig, this.pluginConfig.runner, access, basePath),\n ],\n )\n return cfg\n },\n )(config)\n }\n }\n}\n\n/**\n * Creates a translation plugin for Payload CMS collections.\n *\n * @example\n * ```ts\n * export default buildConfig({\n * plugins: [\n * translatorPlugin({\n * collections: [Posts, Pages],\n * translationProvider: createOpenAIProvider({ apiKey: process.env.OPENAI_API_KEY }),\n * runner: createPayloadJobsRunner(),\n * }),\n * ],\n * })\n * ```\n */\nexport function translatorPlugin(config: TranslatorPluginConfig): (config: Config) => Promise<Config> {\n return new TranslateCollectionPlugin(config).init()\n}\n\n/** @deprecated Use `translatorPlugin` instead */\nexport const createTranslatePlugin = translatorPlugin\n"],"names":["CacheProviderExport","BulkDocumentTranslationDashboard","TranslateDocumentExport","TranslateDocumentHandler","createEnqueueRoute","createRunRoute","createCancelRoute","createCancelByCollectionRoute","createGetDocumentStatusRoute","createGetCollectionStatusRoute","normalizePath","pipe","TranslateCollectionPlugin","pluginConfig","init","config","access","translationProvider","basePath","rawBasePath","schemaMap","Map","collections","map","col","slug","structuredClone","fields","collectionSlugs","Set","keys","translateHandler","runnerConfigModifier","runner","configure","handler","payload","input","handle","collection","collectionId","sourceLng","targetLng","strategy","publishOnTranslation","Array","from","cfg","admin","components","providers","push","forEach","has","edit","beforeDocumentControls","beforeListTable","endpoints","collectionConfig","availableCollections","translatorPlugin","createTranslatePlugin"],"mappings":"AAEA,SAASA,mBAAmB,QAAQ,0CAAyC;AAC7E,SAASC,gCAAgC,QAAQ,iFAAgF;AACjI,SAASC,uBAAuB,QAAQ,sCAAqC;AAI7E,SAASC,wBAAwB,QAAQ,uCAAsC;AAC/E,SAASC,kBAAkB,QAAQ,wCAAuC;AAC1E,SAASC,cAAc,QAAQ,oCAAmC;AAClE,SAASC,iBAAiB,QAAQ,2BAA0B;AAC5D,SAASC,6BAA6B,QAAQ,yCAAwC;AACtF,SAASC,4BAA4B,QAAQ,wCAAuC;AACpF,SAASC,8BAA8B,QAAQ,0CAAyC;AACxF,SAASC,aAAa,EAAEC,IAAI,QAAQ,kBAAiB;AAqCrD,wDAAwD,GACxD,OAAO,MAAMC;;IACX,YAAY,AAAiBC,YAAoC,CAAE;aAAtCA,eAAAA;IAAuC;IAEpEC,OAA4C;QAC1C,OAAO,OAAOC;YACZ,MAAM,EAAEC,MAAM,EAAEC,mBAAmB,EAAEC,UAAUC,cAAc,YAAY,EAAE,GAAG,IAAI,CAACN,YAAY;YAE/F,gDAAgD;YAChD,kFAAkF;YAClF,oEAAoE;YACpE,MAAMO,YAAY,IAAIC,IAAI,IAAI,CAACR,YAAY,CAACS,WAAW,CAACC,GAAG,CAAC,CAACC,MAAQ;oBAACA,IAAIC,IAAI;oBAAEC,gBAAgBF,IAAIG,MAAM;iBAAE;YAC5G,MAAMC,kBAAkB,IAAIC,IAAIT,UAAUU,IAAI;YAC9C,MAAMZ,WAAWR,cAAcS;YAC/B,MAAMY,mBAAmB,IAAI5B,yBAAyBc,qBAAqBG;YAE3E,yCAAyC;YACzC,MAAMY,uBAAuB,IAAI,CAACnB,YAAY,CAACoB,MAAM,CAACC,SAAS,CAAC;gBAC9DC,SAAS,OAAOC,SAASC;oBACvB,MAAMN,iBAAiBO,MAAM,CAACF,SAAS;wBACrCG,YAAYF,MAAME,UAAU;wBAC5BC,cAAcH,MAAMG,YAAY;wBAChCC,WAAWJ,MAAMI,SAAS;wBAC1BC,WAAWL,MAAMK,SAAS;wBAC1BC,UAAUN,MAAMM,QAAQ;wBACxBC,sBAAsBP,MAAMO,oBAAoB;oBAClD;gBACF;gBACAtB,aAAauB,MAAMC,IAAI,CAAClB;YAC1B;YAEA,OAAOjB,KACL,yCAAyC;YACzC,CAACoC;gBACC,IAAI,CAACA,IAAIC,KAAK,EAAED,IAAIC,KAAK,GAAG,CAAC;gBAC7B,IAAI,CAACD,IAAIC,KAAK,CAACC,UAAU,EAAEF,IAAIC,KAAK,CAACC,UAAU,GAAG,CAAC;gBACnD,IAAI,CAACF,IAAIC,KAAK,CAACC,UAAU,CAACC,SAAS,EAAEH,IAAIC,KAAK,CAACC,UAAU,CAACC,SAAS,GAAG,EAAE;gBAExEH,IAAIC,KAAK,CAACC,UAAU,CAACC,SAAS,CAACC,IAAI,CAAC,IAAInD,oBAAoBkB;gBAC5D,OAAO6B;YACT,GAEA,gCAAgC;YAChC,CAACA;gBACCA,IAAIzB,WAAW,EAAE8B,QAAQ,CAACb;oBACxB,IAAI,CAACX,gBAAgByB,GAAG,CAACd,WAAWd,IAAI,GAAG;wBACzC;oBACF;oBAEA,IAAI,CAACc,WAAWS,KAAK,EAAET,WAAWS,KAAK,GAAG,CAAC;oBAC3C,IAAI,CAACT,WAAWS,KAAK,CAACC,UAAU,EAAEV,WAAWS,KAAK,CAACC,UAAU,GAAG,CAAC;oBACjE,IAAI,CAACV,WAAWS,KAAK,CAACC,UAAU,CAACK,IAAI,EAAEf,WAAWS,KAAK,CAACC,UAAU,CAACK,IAAI,GAAG,CAAC;oBAC3E,IAAI,CAACf,WAAWS,KAAK,CAACC,UAAU,CAACK,IAAI,CAACC,sBAAsB,EAAE;wBAC5DhB,WAAWS,KAAK,CAACC,UAAU,CAACK,IAAI,CAACC,sBAAsB,GAAG,EAAE;oBAC9D;oBACA,IAAI,CAAChB,WAAWS,KAAK,CAACC,UAAU,CAACO,eAAe,EAAE;wBAChDjB,WAAWS,KAAK,CAACC,UAAU,CAACO,eAAe,GAAG,EAAE;oBAClD;oBAEAjB,WAAWS,KAAK,CAACC,UAAU,CAACK,IAAI,CAACC,sBAAsB,CAACJ,IAAI,CAC1D,IAAIjD,wBAAwBqC,YAAYvB;oBAE1CuB,WAAWS,KAAK,CAACC,UAAU,CAACO,eAAe,CAACL,IAAI,CAAC,IAAIlD,iCAAiCe;gBACxF;gBACA,OAAO+B;YACT,GAEA,0CAA0C;YAC1Cf,sBAEA,0BAA0B;YAC1B,CAACe;gBACC,IAAI,CAACA,IAAIU,SAAS,EAAEV,IAAIU,SAAS,GAAG,EAAE;gBACtC,MAAMC,mBAAmB;oBAAEC,sBAAsB/B;gBAAgB;gBACjEmB,IAAIU,SAAS,CAACN,IAAI,IACb;oBACD/C,mBAAmB,IAAI,CAACS,YAAY,CAACoB,MAAM,EAAEyB,kBAAkB1C,QAAQE;oBACvEb,eAAe,IAAI,CAACQ,YAAY,CAACoB,MAAM,EAAEjB,QAAQE;oBACjDZ,kBAAkB,IAAI,CAACO,YAAY,CAACoB,MAAM,EAAEjB,QAAQE;oBACpDX,8BAA8BmD,kBAAkB,IAAI,CAAC7C,YAAY,CAACoB,MAAM,EAAEjB,QAAQE;oBAClFV,6BAA6BkD,kBAAkB,IAAI,CAAC7C,YAAY,CAACoB,MAAM,EAAEjB,QAAQE;oBACjFT,+BAA+BiD,kBAAkB,IAAI,CAAC7C,YAAY,CAACoB,MAAM,EAAEjB,QAAQE;iBACpF;gBAEH,OAAO6B;YACT,GACAhC;QACJ;IACF;AACF;AAEA;;;;;;;;;;;;;;;CAeC,GACD,OAAO,SAAS6C,iBAAiB7C,MAA8B;IAC7D,OAAO,IAAIH,0BAA0BG,QAAQD,IAAI;AACnD;AAEA,+CAA+C,GAC/C,OAAO,MAAM+C,wBAAwBD,iBAAgB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { CollectionSlug, Payload } from 'payload';
|
|
2
|
+
/**
|
|
3
|
+
* Checks if collection is available for translation
|
|
4
|
+
*/
|
|
5
|
+
export declare function isCollectionAvailable(collectionSlug: string, availableCollections: Set<CollectionSlug>): CollectionSlug | null;
|
|
6
|
+
/**
|
|
7
|
+
* Gets all document IDs from a collection (for select_all option)
|
|
8
|
+
*/
|
|
9
|
+
export declare function getAllCollectionIds(payload: Payload, collectionSlug: CollectionSlug): Promise<string[]>;
|
|
10
|
+
//# sourceMappingURL=collection-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collection-utils.d.ts","sourceRoot":"","sources":["../../../../src/server/features/_lib/collection-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAEtD;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,cAAc,EAAE,MAAM,EACtB,oBAAoB,EAAE,GAAG,CAAC,cAAc,CAAC,GACxC,cAAc,GAAG,IAAI,CAEvB;AAED;;GAEG;AACH,wBAAsB,mBAAmB,CAAC,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAQ7G"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks if collection is available for translation
|
|
3
|
+
*/ export function isCollectionAvailable(collectionSlug, availableCollections) {
|
|
4
|
+
return availableCollections.has(collectionSlug) ? collectionSlug : null;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Gets all document IDs from a collection (for select_all option)
|
|
8
|
+
*/ export async function getAllCollectionIds(payload, collectionSlug) {
|
|
9
|
+
const result = await payload.find({
|
|
10
|
+
collection: collectionSlug,
|
|
11
|
+
pagination: false,
|
|
12
|
+
depth: 0,
|
|
13
|
+
select: {
|
|
14
|
+
id: true
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
return result.docs.map((doc)=>String(doc.id));
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=collection-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/server/features/_lib/collection-utils.ts"],"sourcesContent":["import type { CollectionSlug, Payload } from 'payload'\n\n/**\n * Checks if collection is available for translation\n */\nexport function isCollectionAvailable(\n collectionSlug: string,\n availableCollections: Set<CollectionSlug>,\n): CollectionSlug | null {\n return availableCollections.has(collectionSlug) ? collectionSlug : null\n}\n\n/**\n * Gets all document IDs from a collection (for select_all option)\n */\nexport async function getAllCollectionIds(payload: Payload, collectionSlug: CollectionSlug): Promise<string[]> {\n const result = await payload.find({\n collection: collectionSlug,\n pagination: false,\n depth: 0,\n select: { id: true },\n })\n return result.docs.map((doc) => String(doc.id))\n}\n"],"names":["isCollectionAvailable","collectionSlug","availableCollections","has","getAllCollectionIds","payload","result","find","collection","pagination","depth","select","id","docs","map","doc","String"],"mappings":"AAEA;;CAEC,GACD,OAAO,SAASA,sBACdC,cAAsB,EACtBC,oBAAyC;IAEzC,OAAOA,qBAAqBC,GAAG,CAACF,kBAAkBA,iBAAiB;AACrE;AAEA;;CAEC,GACD,OAAO,eAAeG,oBAAoBC,OAAgB,EAAEJ,cAA8B;IACxF,MAAMK,SAAS,MAAMD,QAAQE,IAAI,CAAC;QAChCC,YAAYP;QACZQ,YAAY;QACZC,OAAO;QACPC,QAAQ;YAAEC,IAAI;QAAK;IACrB;IACA,OAAON,OAAOO,IAAI,CAACC,GAAG,CAAC,CAACC,MAAQC,OAAOD,IAAIH,EAAE;AAC/C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/server/features/_lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/server/features/_lib/index.ts"],"sourcesContent":["export * from './collection-utils'\n"],"names":[],"mappings":"AAAA,cAAc,qBAAoB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { PayloadRequest } from 'payload';
|
|
2
|
+
import type { TaskRunnerProvider } from '../../modules/task-runner';
|
|
3
|
+
/**
|
|
4
|
+
* Cancels and deletes translation tasks by IDs
|
|
5
|
+
*/
|
|
6
|
+
export declare class CancelHandler {
|
|
7
|
+
private readonly taskRunnerFactory;
|
|
8
|
+
constructor(taskRunnerFactory: TaskRunnerProvider);
|
|
9
|
+
handle(req: PayloadRequest): Promise<Response>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../../src/server/features/cancel/handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAG7C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAInE;;GAEG;AACH,qBAAa,aAAa;IACZ,OAAO,CAAC,QAAQ,CAAC,iBAAiB;gBAAjB,iBAAiB,EAAE,kBAAkB;IAE5D,MAAM,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,QAAQ,CAAC;CAUrD"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ServerResponse } from '../../shared';
|
|
2
|
+
import { CancelInputSchema } from './model';
|
|
3
|
+
/**
|
|
4
|
+
* Cancels and deletes translation tasks by IDs
|
|
5
|
+
*/ export class CancelHandler {
|
|
6
|
+
taskRunnerFactory;
|
|
7
|
+
constructor(taskRunnerFactory){
|
|
8
|
+
this.taskRunnerFactory = taskRunnerFactory;
|
|
9
|
+
}
|
|
10
|
+
async handle(req) {
|
|
11
|
+
const validationResult = CancelInputSchema.safeParse(await req.json?.());
|
|
12
|
+
if (validationResult.error) return ServerResponse.validationError(validationResult.error.errors);
|
|
13
|
+
const { ids } = validationResult.data;
|
|
14
|
+
const runner = this.taskRunnerFactory.create(req.payload);
|
|
15
|
+
await runner.cancel(ids);
|
|
16
|
+
return ServerResponse.noContent();
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/server/features/cancel/handler.ts"],"sourcesContent":["import type { PayloadRequest } from 'payload'\n\nimport { ServerResponse } from '../../shared'\nimport type { TaskRunnerProvider } from '../../modules/task-runner'\n\nimport { CancelInputSchema } from './model'\n\n/**\n * Cancels and deletes translation tasks by IDs\n */\nexport class CancelHandler {\n constructor(private readonly taskRunnerFactory: TaskRunnerProvider) {}\n\n async handle(req: PayloadRequest): Promise<Response> {\n const validationResult = CancelInputSchema.safeParse(await req.json?.())\n if (validationResult.error) return ServerResponse.validationError(validationResult.error.errors)\n\n const { ids } = validationResult.data\n const runner = this.taskRunnerFactory.create(req.payload)\n await runner.cancel(ids)\n\n return ServerResponse.noContent()\n }\n}\n"],"names":["ServerResponse","CancelInputSchema","CancelHandler","taskRunnerFactory","handle","req","validationResult","safeParse","json","error","validationError","errors","ids","data","runner","create","payload","cancel","noContent"],"mappings":"AAEA,SAASA,cAAc,QAAQ,eAAc;AAG7C,SAASC,iBAAiB,QAAQ,UAAS;AAE3C;;CAEC,GACD,OAAO,MAAMC;;IACX,YAAY,AAAiBC,iBAAqC,CAAE;aAAvCA,oBAAAA;IAAwC;IAErE,MAAMC,OAAOC,GAAmB,EAAqB;QACnD,MAAMC,mBAAmBL,kBAAkBM,SAAS,CAAC,MAAMF,IAAIG,IAAI;QACnE,IAAIF,iBAAiBG,KAAK,EAAE,OAAOT,eAAeU,eAAe,CAACJ,iBAAiBG,KAAK,CAACE,MAAM;QAE/F,MAAM,EAAEC,GAAG,EAAE,GAAGN,iBAAiBO,IAAI;QACrC,MAAMC,SAAS,IAAI,CAACX,iBAAiB,CAACY,MAAM,CAACV,IAAIW,OAAO;QACxD,MAAMF,OAAOG,MAAM,CAACL;QAEpB,OAAOZ,eAAekB,SAAS;IACjC;AACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.test.d.ts","sourceRoot":"","sources":["../../../../src/server/features/cancel/handler.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { describe, it, expect, vi, beforeEach } from 'vitest';
|
|
2
|
+
import { CancelHandler } from './handler';
|
|
3
|
+
describe('CancelHandler', () => {
|
|
4
|
+
let handler;
|
|
5
|
+
let mockTaskRunner;
|
|
6
|
+
let mockTaskRunnerFactory;
|
|
7
|
+
const createMockRequest = (body) => ({
|
|
8
|
+
payload: {},
|
|
9
|
+
json: vi.fn().mockResolvedValue(body),
|
|
10
|
+
});
|
|
11
|
+
beforeEach(() => {
|
|
12
|
+
mockTaskRunner = {
|
|
13
|
+
enqueue: vi.fn(),
|
|
14
|
+
cancel: vi.fn().mockResolvedValue(undefined),
|
|
15
|
+
run: vi.fn(),
|
|
16
|
+
findByCollection: vi.fn(),
|
|
17
|
+
};
|
|
18
|
+
mockTaskRunnerFactory = {
|
|
19
|
+
create: vi.fn().mockReturnValue(mockTaskRunner),
|
|
20
|
+
configure: vi.fn(),
|
|
21
|
+
};
|
|
22
|
+
handler = new CancelHandler(mockTaskRunnerFactory);
|
|
23
|
+
});
|
|
24
|
+
describe('validation', () => {
|
|
25
|
+
it('returns validation error for missing ids', 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 non-array ids', async () => {
|
|
33
|
+
const req = createMockRequest({ ids: 'not-an-array' });
|
|
34
|
+
const response = await handler.handle(req);
|
|
35
|
+
expect(response.status).toBe(400);
|
|
36
|
+
});
|
|
37
|
+
it('returns validation error for empty ids array', async () => {
|
|
38
|
+
const req = createMockRequest({ ids: [] });
|
|
39
|
+
const response = await handler.handle(req);
|
|
40
|
+
expect(response.status).toBe(400);
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
describe('success responses', () => {
|
|
44
|
+
it('cancels tasks and returns 204', async () => {
|
|
45
|
+
const req = createMockRequest({ ids: ['task-1', 'task-2'] });
|
|
46
|
+
const response = await handler.handle(req);
|
|
47
|
+
expect(response.status).toBe(204);
|
|
48
|
+
expect(response.body).toBeNull();
|
|
49
|
+
});
|
|
50
|
+
it('calls runner.cancel with provided ids', async () => {
|
|
51
|
+
const req = createMockRequest({ ids: ['task-1', 'task-2', 'task-3'] });
|
|
52
|
+
await handler.handle(req);
|
|
53
|
+
expect(mockTaskRunner.cancel).toHaveBeenCalledWith(['task-1', 'task-2', 'task-3']);
|
|
54
|
+
});
|
|
55
|
+
it('creates task runner with request payload', async () => {
|
|
56
|
+
const mockPayload = { collections: {} };
|
|
57
|
+
const req = createMockRequest({ ids: ['task-1'] });
|
|
58
|
+
req.payload = mockPayload;
|
|
59
|
+
await handler.handle(req);
|
|
60
|
+
expect(mockTaskRunnerFactory.create).toHaveBeenCalledWith(mockPayload);
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/server/features/cancel/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/server/features/cancel/index.ts"],"sourcesContent":["export { createCancelRoute } from './route'\n"],"names":["createCancelRoute"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,UAAS"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Input validation schema for batch cancel
|
|
4
|
+
*/
|
|
5
|
+
export declare const CancelInputSchema: z.ZodObject<{
|
|
6
|
+
ids: z.ZodArray<z.ZodString, "many">;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
ids: string[];
|
|
9
|
+
}, {
|
|
10
|
+
ids: string[];
|
|
11
|
+
}>;
|
|
12
|
+
//# sourceMappingURL=model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../../src/server/features/cancel/model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;EAE5B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/server/features/cancel/model.ts"],"sourcesContent":["import { z } from 'zod'\n\n/**\n * Input validation schema for batch cancel\n */\nexport const CancelInputSchema = z.object({\n ids: z.array(z.string().nonempty()).min(1),\n})\n"],"names":["z","CancelInputSchema","object","ids","array","string","nonempty","min"],"mappings":"AAAA,SAASA,CAAC,QAAQ,MAAK;AAEvB;;CAEC,GACD,OAAO,MAAMC,oBAAoBD,EAAEE,MAAM,CAAC;IACxCC,KAAKH,EAAEI,KAAK,CAACJ,EAAEK,MAAM,GAAGC,QAAQ,IAAIC,GAAG,CAAC;AAC1C,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 batch cancel endpoint
|
|
6
|
+
*/
|
|
7
|
+
export declare function createCancelRoute(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/cancel/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,iBAAiB,CAC/B,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 { CancelHandler } from './handler';
|
|
3
|
+
/**
|
|
4
|
+
* Creates the batch cancel endpoint
|
|
5
|
+
*/ export function createCancelRoute(taskRunnerFactory, access, basePath = '/translate') {
|
|
6
|
+
const handler = new CancelHandler(taskRunnerFactory);
|
|
7
|
+
return {
|
|
8
|
+
path: `${basePath}/cancel`,
|
|
9
|
+
method: 'delete',
|
|
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/cancel/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 { CancelHandler } from './handler'\n\n/**\n * Creates the batch cancel endpoint\n */\nexport function createCancelRoute(\n taskRunnerFactory: TaskRunnerProvider,\n access?: AccessGuard,\n basePath = '/translate',\n): Endpoint {\n const handler = new CancelHandler(taskRunnerFactory)\n\n return {\n path: `${basePath}/cancel`,\n method: 'delete',\n handler: withAccessCheck(withErrorHandler(handler.handle.bind(handler)), access),\n }\n}\n"],"names":["withErrorHandler","withAccessCheck","CancelHandler","createCancelRoute","taskRunnerFactory","access","basePath","handler","path","method","handle","bind"],"mappings":"AAEA,SAASA,gBAAgB,EAAEC,eAAe,QAAQ,eAAc;AAIhE,SAASC,aAAa,QAAQ,YAAW;AAEzC;;CAEC,GACD,OAAO,SAASC,kBACdC,iBAAqC,EACrCC,MAAoB,EACpBC,WAAW,YAAY;IAEvB,MAAMC,UAAU,IAAIL,cAAcE;IAElC,OAAO;QACLI,MAAM,GAAGF,SAAS,OAAO,CAAC;QAC1BG,QAAQ;QACRF,SAASN,gBAAgBD,iBAAiBO,QAAQG,MAAM,CAACC,IAAI,CAACJ,WAAWF;IAC3E;AACF"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { PayloadRequest } from 'payload';
|
|
2
|
+
import type { TaskRunnerProvider } from '../../modules/task-runner';
|
|
3
|
+
import { type CancelConfig } from './model';
|
|
4
|
+
/**
|
|
5
|
+
* Cancels all pending translation tasks for a collection
|
|
6
|
+
*/
|
|
7
|
+
export declare class CancelByCollectionHandler {
|
|
8
|
+
private readonly config;
|
|
9
|
+
private readonly taskRunnerFactory;
|
|
10
|
+
constructor(config: CancelConfig, taskRunnerFactory: TaskRunnerProvider);
|
|
11
|
+
handle(req: PayloadRequest): Promise<Response>;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../../src/server/features/cancel-by-collection/handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAG7C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAGnE,OAAO,EAAiC,KAAK,YAAY,EAAE,MAAM,SAAS,CAAA;AAE1E;;GAEG;AACH,qBAAa,yBAAyB;IAElC,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,iBAAiB;gBADjB,MAAM,EAAE,YAAY,EACpB,iBAAiB,EAAE,kBAAkB;IAGlD,MAAM,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,QAAQ,CAAC;CAqBrD"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ServerResponse } from '../../shared';
|
|
2
|
+
import { isCollectionAvailable } from '../_lib/collection-utils';
|
|
3
|
+
import { CancelByCollectionInputSchema } from './model';
|
|
4
|
+
/**
|
|
5
|
+
* Cancels all pending translation tasks for a collection
|
|
6
|
+
*/ export class CancelByCollectionHandler {
|
|
7
|
+
config;
|
|
8
|
+
taskRunnerFactory;
|
|
9
|
+
constructor(config, taskRunnerFactory){
|
|
10
|
+
this.config = config;
|
|
11
|
+
this.taskRunnerFactory = taskRunnerFactory;
|
|
12
|
+
}
|
|
13
|
+
async handle(req) {
|
|
14
|
+
const validationResult = CancelByCollectionInputSchema.safeParse(req.routeParams);
|
|
15
|
+
if (validationResult.error) return ServerResponse.validationError(validationResult.error.errors);
|
|
16
|
+
const collectionSlug = isCollectionAvailable(validationResult.data.collection_slug, this.config.availableCollections);
|
|
17
|
+
if (!collectionSlug) return ServerResponse.badRequest('Collection not available for translation');
|
|
18
|
+
const runner = this.taskRunnerFactory.create(req.payload);
|
|
19
|
+
const tasks = await runner.findByCollection(collectionSlug);
|
|
20
|
+
if (tasks.length === 0) return ServerResponse.noContent();
|
|
21
|
+
const pendingTaskIds = tasks.filter((task)=>task.status === 'pending').map((task)=>task.id);
|
|
22
|
+
if (pendingTaskIds.length === 0) return ServerResponse.noContent();
|
|
23
|
+
await runner.cancel(pendingTaskIds);
|
|
24
|
+
return ServerResponse.noContent();
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=handler.js.map
|