@webiny/app-headless-cms-workflows 0.0.0-unstable.0156a4c312
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/Components/CmsEntriesList/CmsReviewMoveEntryAction.d.ts +2 -0
- package/Components/CmsEntriesList/CmsReviewMoveEntryAction.js +43 -0
- package/Components/CmsEntriesList/CmsReviewMoveEntryAction.js.map +1 -0
- package/Components/CmsEntriesList/CmsReviewMoveEntryAction.test.d.ts +1 -0
- package/Components/CmsEntriesList/CmsReviewMoveEntryAction.test.js +118 -0
- package/Components/CmsEntriesList/CmsReviewMoveEntryAction.test.js.map +1 -0
- package/Components/CmsEntriesList/CmsReviewScheduleEntryAction.d.ts +2 -0
- package/Components/CmsEntriesList/CmsReviewScheduleEntryAction.js +22 -0
- package/Components/CmsEntriesList/CmsReviewScheduleEntryAction.js.map +1 -0
- package/Components/CmsEntriesList/CmsReviewScheduleEntryAction.test.d.ts +1 -0
- package/Components/CmsEntriesList/CmsReviewScheduleEntryAction.test.js +98 -0
- package/Components/CmsEntriesList/CmsReviewScheduleEntryAction.test.js.map +1 -0
- package/Components/ContentEntryForm/CmsEntryReviewBar.d.ts +2 -0
- package/Components/ContentEntryForm/CmsEntryReviewBar.js +32 -0
- package/Components/ContentEntryForm/CmsEntryReviewBar.js.map +1 -0
- package/Components/ContentEntryForm/CmsEntryReviewBar.test.d.ts +1 -0
- package/Components/ContentEntryForm/CmsEntryReviewBar.test.js +128 -0
- package/Components/ContentEntryForm/CmsEntryReviewBar.test.js.map +1 -0
- package/Components/ContentEntryForm/CmsEntryReviewBlockedActions.d.ts +2 -0
- package/Components/ContentEntryForm/CmsEntryReviewBlockedActions.js +46 -0
- package/Components/ContentEntryForm/CmsEntryReviewBlockedActions.js.map +1 -0
- package/Components/ContentEntryForm/CmsEntryReviewBlockedActions.test.d.ts +1 -0
- package/Components/ContentEntryForm/CmsEntryReviewBlockedActions.test.js +222 -0
- package/Components/ContentEntryForm/CmsEntryReviewBlockedActions.test.js.map +1 -0
- package/Components/ContentEntryForm/CmsEntryReviewFormLock.d.ts +2 -0
- package/Components/ContentEntryForm/CmsEntryReviewFormLock.js +32 -0
- package/Components/ContentEntryForm/CmsEntryReviewFormLock.js.map +1 -0
- package/Components/ContentEntryForm/CmsEntryReviewFormLock.test.d.ts +1 -0
- package/Components/ContentEntryForm/CmsEntryReviewFormLock.test.js +94 -0
- package/Components/ContentEntryForm/CmsEntryReviewFormLock.test.js.map +1 -0
- package/Components/ContentEntryForm/CmsEntryReviewNewRevision.d.ts +2 -0
- package/Components/ContentEntryForm/CmsEntryReviewNewRevision.js +56 -0
- package/Components/ContentEntryForm/CmsEntryReviewNewRevision.js.map +1 -0
- package/Components/ContentEntryForm/CmsEntryReviewNewRevision.test.d.ts +1 -0
- package/Components/ContentEntryForm/CmsEntryReviewNewRevision.test.js +186 -0
- package/Components/ContentEntryForm/CmsEntryReviewNewRevision.test.js.map +1 -0
- package/Components/ContentEntryForm/CmsEntryReviewScheduleMenuItem.d.ts +2 -0
- package/Components/ContentEntryForm/CmsEntryReviewScheduleMenuItem.js +26 -0
- package/Components/ContentEntryForm/CmsEntryReviewScheduleMenuItem.js.map +1 -0
- package/Components/ContentEntryForm/CmsEntryReviewScheduleMenuItem.test.d.ts +1 -0
- package/Components/ContentEntryForm/CmsEntryReviewScheduleMenuItem.test.js +78 -0
- package/Components/ContentEntryForm/CmsEntryReviewScheduleMenuItem.test.js.map +1 -0
- package/Components/ContentEntryForm/getModelFieldLabels.d.ts +3 -0
- package/Components/ContentEntryForm/getModelFieldLabels.js +8 -0
- package/Components/ContentEntryForm/getModelFieldLabels.js.map +1 -0
- package/Components/ContentEntryForm/index.d.ts +5 -0
- package/Components/ContentEntryForm/index.js +5 -0
- package/Components/ContentReviews/CmsContentReviews.d.ts +2 -0
- package/Components/ContentReviews/CmsContentReviews.js +11 -0
- package/Components/ContentReviews/CmsContentReviews.js.map +1 -0
- package/Components/ContentReviews/CmsContentReviews.test.d.ts +1 -0
- package/Components/ContentReviews/CmsContentReviews.test.js +214 -0
- package/Components/ContentReviews/CmsContentReviews.test.js.map +1 -0
- package/Components/ContentReviews/CmsContentReviewsMount.d.ts +4 -0
- package/Components/ContentReviews/CmsContentReviewsMount.js +44 -0
- package/Components/ContentReviews/CmsContentReviewsMount.js.map +1 -0
- package/Components/ContentReviews/CmsContentReviewsSidebarItem.d.ts +2 -0
- package/Components/ContentReviews/CmsContentReviewsSidebarItem.js +20 -0
- package/Components/ContentReviews/CmsContentReviewsSidebarItem.js.map +1 -0
- package/Components/ContentReviews/CmsContentReviewsSidebarItem.test.d.ts +1 -0
- package/Components/ContentReviews/CmsContentReviewsSidebarItem.test.js +83 -0
- package/Components/ContentReviews/CmsContentReviewsSidebarItem.test.js.map +1 -0
- package/Components/ModelDelete/ModelBoundToWorkflowErrorData.d.ts +8 -0
- package/Components/ModelDelete/ModelBoundToWorkflowErrorData.js +0 -0
- package/Components/ModelDelete/ModelDeleteWorkflowCopy.d.ts +10 -0
- package/Components/ModelDelete/ModelDeleteWorkflowCopy.js +0 -0
- package/Components/ModelDelete/ModelDeleteWorkflowError.d.ts +2 -0
- package/Components/ModelDelete/ModelDeleteWorkflowError.js +34 -0
- package/Components/ModelDelete/ModelDeleteWorkflowError.js.map +1 -0
- package/Components/ModelDelete/ModelDeleteWorkflowError.test.d.ts +1 -0
- package/Components/ModelDelete/ModelDeleteWorkflowError.test.js +73 -0
- package/Components/ModelDelete/ModelDeleteWorkflowError.test.js.map +1 -0
- package/Components/ModelDelete/getModelDeleteWorkflowCopy.d.ts +3 -0
- package/Components/ModelDelete/getModelDeleteWorkflowCopy.js +17 -0
- package/Components/ModelDelete/getModelDeleteWorkflowCopy.js.map +1 -0
- package/Components/ModelDelete/getModelDeleteWorkflowCopy.test.d.ts +1 -0
- package/Components/ModelDelete/getModelDeleteWorkflowCopy.test.js +28 -0
- package/Components/ModelDelete/getModelDeleteWorkflowCopy.test.js.map +1 -0
- package/Components/ignoreAction.d.ts +1 -0
- package/Components/ignoreAction.js +4 -0
- package/Components/ignoreAction.js.map +1 -0
- package/LICENSE +21 -0
- package/README.md +11 -0
- package/Routes/CmsWorkflowEditor.d.ts +2 -0
- package/Routes/CmsWorkflowEditor.js +23 -0
- package/Routes/CmsWorkflowEditor.js.map +1 -0
- package/Routes/CmsWorkflowEditor.test.d.ts +1 -0
- package/Routes/CmsWorkflowEditor.test.js +141 -0
- package/Routes/CmsWorkflowEditor.test.js.map +1 -0
- package/Routes/index.d.ts +1 -0
- package/Routes/index.js +1 -0
- package/features/cache/CmsReviewCacheSyncHandler.d.ts +8 -0
- package/features/cache/CmsReviewCacheSyncHandler.js +14 -0
- package/features/cache/CmsReviewCacheSyncHandler.js.map +1 -0
- package/features/cache/CmsReviewCacheWriter.d.ts +14 -0
- package/features/cache/CmsReviewCacheWriter.js +39 -0
- package/features/cache/CmsReviewCacheWriter.js.map +1 -0
- package/features/cache/CmsReviewCacheWriter.test.d.ts +1 -0
- package/features/cache/CmsReviewCacheWriter.test.js +207 -0
- package/features/cache/CmsReviewCacheWriter.test.js.map +1 -0
- package/features/cache/CmsReviewEntriesCacheProviderDecorator.d.ts +12 -0
- package/features/cache/CmsReviewEntriesCacheProviderDecorator.js +17 -0
- package/features/cache/CmsReviewEntriesCacheProviderDecorator.js.map +1 -0
- package/features/cache/CmsReviewEntriesCacheProviderDecorator.test.d.ts +1 -0
- package/features/cache/CmsReviewEntriesCacheProviderDecorator.test.js +129 -0
- package/features/cache/CmsReviewEntriesCacheProviderDecorator.test.js.map +1 -0
- package/features/cache/ReviewPreservingEntriesCache.d.ts +18 -0
- package/features/cache/ReviewPreservingEntriesCache.js +54 -0
- package/features/cache/ReviewPreservingEntriesCache.js.map +1 -0
- package/features/cache/abstractions.d.ts +5 -0
- package/features/cache/abstractions.js +5 -0
- package/features/cache/abstractions.js.map +1 -0
- package/features/editorGateway/CmsWorkflowEditorGateway/CmsWorkflowEditorGateway.d.ts +26 -0
- package/features/editorGateway/CmsWorkflowEditorGateway/CmsWorkflowEditorGateway.js +104 -0
- package/features/editorGateway/CmsWorkflowEditorGateway/CmsWorkflowEditorGateway.js.map +1 -0
- package/features/editorGateway/CmsWorkflowEditorGateway/CmsWorkflowEditorGateway.test.d.ts +1 -0
- package/features/editorGateway/CmsWorkflowEditorGateway/CmsWorkflowEditorGateway.test.js +589 -0
- package/features/editorGateway/CmsWorkflowEditorGateway/CmsWorkflowEditorGateway.test.js.map +1 -0
- package/features/editorGateway/feature.d.ts +1 -0
- package/features/editorGateway/feature.js +11 -0
- package/features/editorGateway/feature.js.map +1 -0
- package/features/editorGateway/feature.test.d.ts +1 -0
- package/features/editorGateway/feature.test.js +272 -0
- package/features/editorGateway/feature.test.js.map +1 -0
- package/features/editorGateway/graphql/cmsEntryFolderExists.d.ts +1 -0
- package/features/editorGateway/graphql/cmsEntryFolderExists.js +16 -0
- package/features/editorGateway/graphql/cmsEntryFolderExists.js.map +1 -0
- package/features/editorGateway/graphql/deleteCmsEntryWorkflow.d.ts +1 -0
- package/features/editorGateway/graphql/deleteCmsEntryWorkflow.js +19 -0
- package/features/editorGateway/graphql/deleteCmsEntryWorkflow.js.map +1 -0
- package/features/editorGateway/graphql/getCmsEntryWorkflow.d.ts +1 -0
- package/features/editorGateway/graphql/getCmsEntryWorkflow.js +19 -0
- package/features/editorGateway/graphql/getCmsEntryWorkflow.js.map +1 -0
- package/features/editorGateway/graphql/inspectCmsEntryRouting.d.ts +1 -0
- package/features/editorGateway/graphql/inspectCmsEntryRouting.js +19 -0
- package/features/editorGateway/graphql/inspectCmsEntryRouting.js.map +1 -0
- package/features/editorGateway/graphql/listCmsEntryWorkflowModels.d.ts +1 -0
- package/features/editorGateway/graphql/listCmsEntryWorkflowModels.js +29 -0
- package/features/editorGateway/graphql/listCmsEntryWorkflowModels.js.map +1 -0
- package/features/editorGateway/graphql/storeCmsEntryWorkflow.d.ts +1 -0
- package/features/editorGateway/graphql/storeCmsEntryWorkflow.js +19 -0
- package/features/editorGateway/graphql/storeCmsEntryWorkflow.js.map +1 -0
- package/features/editorMounting/CmsWorkflowEditorAppAdapter.d.ts +25 -0
- package/features/editorMounting/CmsWorkflowEditorAppAdapter.js +51 -0
- package/features/editorMounting/CmsWorkflowEditorAppAdapter.js.map +1 -0
- package/features/editorMounting/CmsWorkflowEditorAppAdapter.test.d.ts +1 -0
- package/features/editorMounting/CmsWorkflowEditorAppAdapter.test.js +185 -0
- package/features/editorMounting/CmsWorkflowEditorAppAdapter.test.js.map +1 -0
- package/features/editorMounting/abstractions.d.ts +5 -0
- package/features/editorMounting/abstractions.js +5 -0
- package/features/editorMounting/abstractions.js.map +1 -0
- package/features/editorMounting/feature.d.ts +3 -0
- package/features/editorMounting/feature.js +19 -0
- package/features/editorMounting/feature.js.map +1 -0
- package/features/editorMounting/feature.test.d.ts +1 -0
- package/features/editorMounting/feature.test.js +100 -0
- package/features/editorMounting/feature.test.js.map +1 -0
- package/features/editorReview/CmsEntryReview.d.ts +8 -0
- package/features/editorReview/CmsEntryReview.js +14 -0
- package/features/editorReview/CmsEntryReview.js.map +1 -0
- package/features/editorReview/abstractions.d.ts +5 -0
- package/features/editorReview/abstractions.js +5 -0
- package/features/editorReview/abstractions.js.map +1 -0
- package/features/editorReview/feature.d.ts +3 -0
- package/features/editorReview/feature.js +17 -0
- package/features/editorReview/feature.js.map +1 -0
- package/features/editorReview/feature.test.d.ts +1 -0
- package/features/editorReview/feature.test.js +46 -0
- package/features/editorReview/feature.test.js.map +1 -0
- package/features/editorReview/useCmsEntryReview.d.ts +2 -0
- package/features/editorReview/useCmsEntryReview.js +8 -0
- package/features/editorReview/useCmsEntryReview.js.map +1 -0
- package/features/feature.d.ts +1 -0
- package/features/feature.js +15 -0
- package/features/feature.js.map +1 -0
- package/features/gateway/CmsReviewChangeMessageHandler.d.ts +8 -0
- package/features/gateway/CmsReviewChangeMessageHandler.js +16 -0
- package/features/gateway/CmsReviewChangeMessageHandler.js.map +1 -0
- package/features/gateway/CmsReviewContentAdapter/CmsReviewContentAdapter.d.ts +16 -0
- package/features/gateway/CmsReviewContentAdapter/CmsReviewContentAdapter.js +39 -0
- package/features/gateway/CmsReviewContentAdapter/CmsReviewContentAdapter.js.map +1 -0
- package/features/gateway/CmsReviewContentAdapter/CmsReviewContentAdapter.test.d.ts +1 -0
- package/features/gateway/CmsReviewContentAdapter/CmsReviewContentAdapter.test.js +83 -0
- package/features/gateway/CmsReviewContentAdapter/CmsReviewContentAdapter.test.js.map +1 -0
- package/features/gateway/CmsReviewContentAdapter/abstractions.d.ts +5 -0
- package/features/gateway/CmsReviewContentAdapter/abstractions.js +5 -0
- package/features/gateway/CmsReviewContentAdapter/abstractions.js.map +1 -0
- package/features/gateway/CmsReviewGateway/CmsReviewGateway.d.ts +52 -0
- package/features/gateway/CmsReviewGateway/CmsReviewGateway.js +221 -0
- package/features/gateway/CmsReviewGateway/CmsReviewGateway.js.map +1 -0
- package/features/gateway/CmsReviewGateway/CmsReviewGateway.test.d.ts +1 -0
- package/features/gateway/CmsReviewGateway/CmsReviewGateway.test.js +689 -0
- package/features/gateway/CmsReviewGateway/CmsReviewGateway.test.js.map +1 -0
- package/features/gateway/CmsReviewNotificationHandler.d.ts +8 -0
- package/features/gateway/CmsReviewNotificationHandler.js +16 -0
- package/features/gateway/CmsReviewNotificationHandler.js.map +1 -0
- package/features/gateway/CmsReviewRowProvider/CmsReviewRowProvider.d.ts +8 -0
- package/features/gateway/CmsReviewRowProvider/CmsReviewRowProvider.js +14 -0
- package/features/gateway/CmsReviewRowProvider/CmsReviewRowProvider.js.map +1 -0
- package/features/gateway/CmsReviewRowProvider/abstractions.d.ts +5 -0
- package/features/gateway/CmsReviewRowProvider/abstractions.js +5 -0
- package/features/gateway/CmsReviewRowProvider/abstractions.js.map +1 -0
- package/features/gateway/contentReviewsBindings.test.d.ts +1 -0
- package/features/gateway/contentReviewsBindings.test.js +125 -0
- package/features/gateway/contentReviewsBindings.test.js.map +1 -0
- package/features/gateway/feature.d.ts +4 -0
- package/features/gateway/feature.js +27 -0
- package/features/gateway/feature.js.map +1 -0
- package/features/gateway/feature.test.d.ts +1 -0
- package/features/gateway/feature.test.js +79 -0
- package/features/gateway/feature.test.js.map +1 -0
- package/features/gateway/graphql/CmsOperationResponse.d.ts +3 -0
- package/features/gateway/graphql/CmsOperationResponse.js +0 -0
- package/features/gateway/graphql/approveCmsEntryReviewStep.d.ts +1 -0
- package/features/gateway/graphql/approveCmsEntryReviewStep.js +18 -0
- package/features/gateway/graphql/approveCmsEntryReviewStep.js.map +1 -0
- package/features/gateway/graphql/cancelCmsEntryReview.d.ts +1 -0
- package/features/gateway/graphql/cancelCmsEntryReview.js +18 -0
- package/features/gateway/graphql/cancelCmsEntryReview.js.map +1 -0
- package/features/gateway/graphql/cancelCmsEntryReviewsForDelete.d.ts +1 -0
- package/features/gateway/graphql/cancelCmsEntryReviewsForDelete.js +28 -0
- package/features/gateway/graphql/cancelCmsEntryReviewsForDelete.js.map +1 -0
- package/features/gateway/graphql/getCmsEntryReview.d.ts +1 -0
- package/features/gateway/graphql/getCmsEntryReview.js +18 -0
- package/features/gateway/graphql/getCmsEntryReview.js.map +1 -0
- package/features/gateway/graphql/getCmsEntryReviewStepRun.d.ts +1 -0
- package/features/gateway/graphql/getCmsEntryReviewStepRun.js +18 -0
- package/features/gateway/graphql/getCmsEntryReviewStepRun.js.map +1 -0
- package/features/gateway/graphql/getCmsEntryTargetReview.d.ts +1 -0
- package/features/gateway/graphql/getCmsEntryTargetReview.js +18 -0
- package/features/gateway/graphql/getCmsEntryTargetReview.js.map +1 -0
- package/features/gateway/graphql/listCmsEntryBlockingReviews.d.ts +1 -0
- package/features/gateway/graphql/listCmsEntryBlockingReviews.js +18 -0
- package/features/gateway/graphql/listCmsEntryBlockingReviews.js.map +1 -0
- package/features/gateway/graphql/listCmsEntryReviewStepCandidates.d.ts +1 -0
- package/features/gateway/graphql/listCmsEntryReviewStepCandidates.js +18 -0
- package/features/gateway/graphql/listCmsEntryReviewStepCandidates.js.map +1 -0
- package/features/gateway/graphql/listCmsEntryReviews.d.ts +1 -0
- package/features/gateway/graphql/listCmsEntryReviews.js +34 -0
- package/features/gateway/graphql/listCmsEntryReviews.js.map +1 -0
- package/features/gateway/graphql/listCmsEntryStepCandidates.d.ts +1 -0
- package/features/gateway/graphql/listCmsEntryStepCandidates.js +28 -0
- package/features/gateway/graphql/listCmsEntryStepCandidates.js.map +1 -0
- package/features/gateway/graphql/listCmsEntryWorkflows.d.ts +1 -0
- package/features/gateway/graphql/listCmsEntryWorkflows.js +18 -0
- package/features/gateway/graphql/listCmsEntryWorkflows.js.map +1 -0
- package/features/gateway/graphql/reassignCmsEntryReviewStep.d.ts +1 -0
- package/features/gateway/graphql/reassignCmsEntryReviewStep.js +18 -0
- package/features/gateway/graphql/reassignCmsEntryReviewStep.js.map +1 -0
- package/features/gateway/graphql/rejectCmsEntryReviewStep.d.ts +1 -0
- package/features/gateway/graphql/rejectCmsEntryReviewStep.js +18 -0
- package/features/gateway/graphql/rejectCmsEntryReviewStep.js.map +1 -0
- package/features/gateway/graphql/requestCmsEntryReview.d.ts +1 -0
- package/features/gateway/graphql/requestCmsEntryReview.js +28 -0
- package/features/gateway/graphql/requestCmsEntryReview.js.map +1 -0
- package/features/gateway/graphql/restartCmsEntryReviewStep.d.ts +1 -0
- package/features/gateway/graphql/restartCmsEntryReviewStep.js +18 -0
- package/features/gateway/graphql/restartCmsEntryReviewStep.js.map +1 -0
- package/features/gateway/graphql/startCmsEntryReviewStep.d.ts +1 -0
- package/features/gateway/graphql/startCmsEntryReviewStep.js +18 -0
- package/features/gateway/graphql/startCmsEntryReviewStep.js.map +1 -0
- package/features/gateway/graphql/takeOverCmsEntryReviewStep.d.ts +1 -0
- package/features/gateway/graphql/takeOverCmsEntryReviewStep.js +22 -0
- package/features/gateway/graphql/takeOverCmsEntryReviewStep.js.map +1 -0
- package/features/trash/BulkDeletePresenterReviewDecorator.d.ts +20 -0
- package/features/trash/BulkDeletePresenterReviewDecorator.js +81 -0
- package/features/trash/BulkDeletePresenterReviewDecorator.js.map +1 -0
- package/features/trash/BulkDeletePresenterReviewDecorator.test.d.ts +1 -0
- package/features/trash/BulkDeletePresenterReviewDecorator.test.js +693 -0
- package/features/trash/BulkDeletePresenterReviewDecorator.test.js.map +1 -0
- package/features/trash/DeleteEntryRevisionUseCaseReviewDecorator.d.ts +13 -0
- package/features/trash/DeleteEntryRevisionUseCaseReviewDecorator.js +23 -0
- package/features/trash/DeleteEntryRevisionUseCaseReviewDecorator.js.map +1 -0
- package/features/trash/DeleteEntryRevisionUseCaseReviewDecorator.test.d.ts +1 -0
- package/features/trash/DeleteEntryRevisionUseCaseReviewDecorator.test.js +123 -0
- package/features/trash/DeleteEntryRevisionUseCaseReviewDecorator.test.js.map +1 -0
- package/features/trash/DeleteEntryUseCaseReviewDecorator.d.ts +13 -0
- package/features/trash/DeleteEntryUseCaseReviewDecorator.js +23 -0
- package/features/trash/DeleteEntryUseCaseReviewDecorator.js.map +1 -0
- package/features/trash/DeleteEntryUseCaseReviewDecorator.test.d.ts +1 -0
- package/features/trash/DeleteEntryUseCaseReviewDecorator.test.js +139 -0
- package/features/trash/DeleteEntryUseCaseReviewDecorator.test.js.map +1 -0
- package/features/trash/PermanentlyDeleteEntryUseCaseReviewDecorator.d.ts +13 -0
- package/features/trash/PermanentlyDeleteEntryUseCaseReviewDecorator.js +23 -0
- package/features/trash/PermanentlyDeleteEntryUseCaseReviewDecorator.js.map +1 -0
- package/features/trash/PermanentlyDeleteEntryUseCaseReviewDecorator.test.d.ts +1 -0
- package/features/trash/PermanentlyDeleteEntryUseCaseReviewDecorator.test.js +122 -0
- package/features/trash/PermanentlyDeleteEntryUseCaseReviewDecorator.test.js.map +1 -0
- package/features/trash/feature.d.ts +1 -0
- package/features/trash/feature.js +17 -0
- package/features/trash/feature.js.map +1 -0
- package/features/trash/feature.test.d.ts +1 -0
- package/features/trash/feature.test.js +213 -0
- package/features/trash/feature.test.js.map +1 -0
- package/index.d.ts +2 -0
- package/index.editor.test.d.ts +1 -0
- package/index.editor.test.js +149 -0
- package/index.editor.test.js.map +1 -0
- package/index.js +41 -0
- package/index.js.map +1 -0
- package/index.lists.test.d.ts +1 -0
- package/index.lists.test.js +172 -0
- package/index.lists.test.js.map +1 -0
- package/index.mount.test.d.ts +1 -0
- package/index.mount.test.js +49 -0
- package/index.mount.test.js.map +1 -0
- package/index.test.d.ts +1 -0
- package/index.test.js +414 -0
- package/index.test.js.map +1 -0
- package/package.json +54 -0
- package/presentation/CmsEntryContentReloader.d.ts +8 -0
- package/presentation/CmsEntryContentReloader.js +20 -0
- package/presentation/CmsEntryContentReloader.js.map +1 -0
- package/presentation/CmsEntryContentReloader.test.d.ts +1 -0
- package/presentation/CmsEntryContentReloader.test.js +118 -0
- package/presentation/CmsEntryContentReloader.test.js.map +1 -0
- package/presentation/CmsEntryFormPresenterReviewDecorator.d.ts +27 -0
- package/presentation/CmsEntryFormPresenterReviewDecorator.js +167 -0
- package/presentation/CmsEntryFormPresenterReviewDecorator.js.map +1 -0
- package/presentation/CmsEntryFormPresenterReviewDecorator.test.d.ts +1 -0
- package/presentation/CmsEntryFormPresenterReviewDecorator.test.js +601 -0
- package/presentation/CmsEntryFormPresenterReviewDecorator.test.js.map +1 -0
- package/presentation/CmsEntryUnsavedChanges.d.ts +7 -0
- package/presentation/CmsEntryUnsavedChanges.js +12 -0
- package/presentation/CmsEntryUnsavedChanges.js.map +1 -0
- package/presentation/CmsEntryUnsavedChanges.test.d.ts +1 -0
- package/presentation/CmsEntryUnsavedChanges.test.js +23 -0
- package/presentation/CmsEntryUnsavedChanges.test.js.map +1 -0
- package/presentation/CmsReviewFieldSelections.test.d.ts +1 -0
- package/presentation/CmsReviewFieldSelections.test.js +27 -0
- package/presentation/CmsReviewFieldSelections.test.js.map +1 -0
- package/presentation/CmsReviewGetEntryFieldSelection.d.ts +8 -0
- package/presentation/CmsReviewGetEntryFieldSelection.js +16 -0
- package/presentation/CmsReviewGetEntryFieldSelection.js.map +1 -0
- package/presentation/CmsReviewListEntriesFieldSelection.d.ts +8 -0
- package/presentation/CmsReviewListEntriesFieldSelection.js +16 -0
- package/presentation/CmsReviewListEntriesFieldSelection.js.map +1 -0
- package/presentation/CmsReviewTableRowMapperDecorator.d.ts +11 -0
- package/presentation/CmsReviewTableRowMapperDecorator.js +24 -0
- package/presentation/CmsReviewTableRowMapperDecorator.js.map +1 -0
- package/presentation/CmsReviewTableRowMapperDecorator.test.d.ts +1 -0
- package/presentation/CmsReviewTableRowMapperDecorator.test.js +120 -0
- package/presentation/CmsReviewTableRowMapperDecorator.test.js.map +1 -0
- package/presentation/CmsRevisionsListPresenterDecorator.d.ts +24 -0
- package/presentation/CmsRevisionsListPresenterDecorator.js +66 -0
- package/presentation/CmsRevisionsListPresenterDecorator.js.map +1 -0
- package/presentation/CmsRevisionsListPresenterDecorator.test.d.ts +1 -0
- package/presentation/CmsRevisionsListPresenterDecorator.test.js +174 -0
- package/presentation/CmsRevisionsListPresenterDecorator.test.js.map +1 -0
- package/presentation/contentReviews/CmsContentReviewsPresenter.d.ts +28 -0
- package/presentation/contentReviews/CmsContentReviewsPresenter.js +103 -0
- package/presentation/contentReviews/CmsContentReviewsPresenter.js.map +1 -0
- package/presentation/contentReviews/CmsContentReviewsPresenter.test.d.ts +1 -0
- package/presentation/contentReviews/CmsContentReviewsPresenter.test.js +238 -0
- package/presentation/contentReviews/CmsContentReviewsPresenter.test.js.map +1 -0
- package/presentation/contentReviews/abstractions.d.ts +31 -0
- package/presentation/contentReviews/abstractions.js +5 -0
- package/presentation/contentReviews/abstractions.js.map +1 -0
- package/presentation/contentReviews/feature.d.ts +3 -0
- package/presentation/contentReviews/feature.js +17 -0
- package/presentation/contentReviews/feature.js.map +1 -0
- package/presentation/contentReviews/toContentTypes.d.ts +3 -0
- package/presentation/contentReviews/toContentTypes.js +14 -0
- package/presentation/contentReviews/toContentTypes.js.map +1 -0
- package/presentation/contentReviews/toContentTypes.test.d.ts +1 -0
- package/presentation/contentReviews/toContentTypes.test.js +20 -0
- package/presentation/contentReviews/toContentTypes.test.js.map +1 -0
- package/presentation/feature.d.ts +1 -0
- package/presentation/feature.js +19 -0
- package/presentation/feature.js.map +1 -0
- package/presentation/getCmsEntryReviewContext.d.ts +4 -0
- package/presentation/getCmsEntryReviewContext.js +12 -0
- package/presentation/getCmsEntryReviewContext.js.map +1 -0
- package/presentation/getCmsEntryReviewInitParams.d.ts +13 -0
- package/presentation/getCmsEntryReviewInitParams.js +18 -0
- package/presentation/getCmsEntryReviewInitParams.js.map +1 -0
- package/presentation/getCmsEntryReviewInitParams.test.d.ts +1 -0
- package/presentation/getCmsEntryReviewInitParams.test.js +69 -0
- package/presentation/getCmsEntryReviewInitParams.test.js.map +1 -0
- package/routes.d.ts +11 -0
- package/routes.js +21 -0
- package/routes.js.map +1 -0
- package/testing/createEntry.d.ts +3 -0
- package/testing/createEntry.js +22 -0
- package/testing/createEntry.js.map +1 -0
- package/testing/createEntrySession.d.ts +9 -0
- package/testing/createEntrySession.js +29 -0
- package/testing/createEntrySession.js.map +1 -0
- package/testing/createFolder.d.ts +2 -0
- package/testing/createFolder.js +13 -0
- package/testing/createFolder.js.map +1 -0
- package/testing/createFormVm.d.ts +2 -0
- package/testing/createFormVm.js +22 -0
- package/testing/createFormVm.js.map +1 -0
- package/testing/models.d.ts +4 -0
- package/testing/models.js +23 -0
- package/testing/models.js.map +1 -0
- package/testing/renderEditorTree.d.ts +17 -0
- package/testing/renderEditorTree.js +93 -0
- package/testing/renderEditorTree.js.map +1 -0
- package/testing/reviewStates.d.ts +17 -0
- package/testing/reviewStates.js +65 -0
- package/testing/reviewStates.js.map +1 -0
- package/types.d.ts +10 -0
- package/types.js +0 -0
- package/utils/appName.d.ts +4 -0
- package/utils/appName.js +13 -0
- package/utils/appName.js.map +1 -0
- package/utils/isReviewableModel.d.ts +2 -0
- package/utils/isReviewableModel.js +7 -0
- package/utils/isReviewableModel.js.map +1 -0
- package/utils/renderModelIcon.d.ts +3 -0
- package/utils/renderModelIcon.js +19 -0
- package/utils/renderModelIcon.js.map +1 -0
- package/utils/renderModelIconOrFallback.d.ts +3 -0
- package/utils/renderModelIconOrFallback.js +17 -0
- package/utils/renderModelIconOrFallback.js.map +1 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { beforeEach, describe, expect, it } from "vitest";
|
|
2
|
+
import { Container } from "@webiny/di";
|
|
3
|
+
import { ContentEntriesCacheProvider } from "@webiny/app-headless-cms/features/contentEntry/abstractions.js";
|
|
4
|
+
import { ContentEntriesCacheProvider as ContentEntriesCacheProvider_js_ContentEntriesCacheProvider } from "@webiny/app-headless-cms/features/contentEntry/ContentEntriesCacheProvider.js";
|
|
5
|
+
import { ReviewState } from "@webiny/app-workflows/review/domain/ReviewState.js";
|
|
6
|
+
import { StepState } from "@webiny/app-workflows/review/domain/StepState.js";
|
|
7
|
+
import { CmsWorkflowsCacheFeature } from "../feature.js";
|
|
8
|
+
import { CmsReviewEntriesCacheProviderDecorator } from "./CmsReviewEntriesCacheProviderDecorator.js";
|
|
9
|
+
const CANCELLED = {
|
|
10
|
+
workflowId: "wf-1",
|
|
11
|
+
reviewState: ReviewState.Cancelled,
|
|
12
|
+
stepId: "step-1",
|
|
13
|
+
stepName: "Legal review",
|
|
14
|
+
stepState: StepState.InReview
|
|
15
|
+
};
|
|
16
|
+
function createEntry(params = {}) {
|
|
17
|
+
const { version = 1, title = "Hello", system } = params;
|
|
18
|
+
const meta = {
|
|
19
|
+
title,
|
|
20
|
+
status: "draft",
|
|
21
|
+
version,
|
|
22
|
+
locked: false
|
|
23
|
+
};
|
|
24
|
+
if (void 0 !== system) meta.system = system;
|
|
25
|
+
return {
|
|
26
|
+
id: `entry-1#000${version}`,
|
|
27
|
+
entryId: "entry-1",
|
|
28
|
+
meta
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
function readWorkflow(entry) {
|
|
32
|
+
const meta = entry?.meta;
|
|
33
|
+
return meta?.system?.workflow;
|
|
34
|
+
}
|
|
35
|
+
let container;
|
|
36
|
+
function getCache() {
|
|
37
|
+
return container.resolve(ContentEntriesCacheProvider).get("article");
|
|
38
|
+
}
|
|
39
|
+
function readEntry() {
|
|
40
|
+
return getCache().getItem((entry)=>"entry-1" === entry.entryId);
|
|
41
|
+
}
|
|
42
|
+
beforeEach(()=>{
|
|
43
|
+
container = new Container();
|
|
44
|
+
container.register(ContentEntriesCacheProvider_js_ContentEntriesCacheProvider).inSingletonScope();
|
|
45
|
+
container.registerDecorator(CmsReviewEntriesCacheProviderDecorator);
|
|
46
|
+
getCache().setItems([
|
|
47
|
+
createEntry({
|
|
48
|
+
system: {
|
|
49
|
+
workflow: CANCELLED
|
|
50
|
+
}
|
|
51
|
+
})
|
|
52
|
+
]);
|
|
53
|
+
});
|
|
54
|
+
describe("CmsReviewEntriesCacheProviderDecorator", ()=>{
|
|
55
|
+
it("keeps the cached workflow when a mutation returns the same revision without one", ()=>{
|
|
56
|
+
getCache().addItems([
|
|
57
|
+
createEntry({
|
|
58
|
+
title: "Edited"
|
|
59
|
+
})
|
|
60
|
+
]);
|
|
61
|
+
const entry = readEntry();
|
|
62
|
+
expect(entry?.meta.title).toBe("Edited");
|
|
63
|
+
expect(readWorkflow(entry)).toEqual(CANCELLED);
|
|
64
|
+
});
|
|
65
|
+
it("keeps the cached workflow when the returned entry selects other system fields", ()=>{
|
|
66
|
+
getCache().addItems([
|
|
67
|
+
createEntry({
|
|
68
|
+
title: "Edited",
|
|
69
|
+
system: {}
|
|
70
|
+
})
|
|
71
|
+
]);
|
|
72
|
+
expect(readWorkflow(readEntry())).toEqual(CANCELLED);
|
|
73
|
+
});
|
|
74
|
+
it("takes the workflow the added entry carries, including no review", ()=>{
|
|
75
|
+
getCache().addItems([
|
|
76
|
+
createEntry({
|
|
77
|
+
system: {
|
|
78
|
+
workflow: null
|
|
79
|
+
}
|
|
80
|
+
})
|
|
81
|
+
]);
|
|
82
|
+
expect(readWorkflow(readEntry())).toBeNull();
|
|
83
|
+
});
|
|
84
|
+
it("gives a new revision of the entry no workflow of the cached revision", ()=>{
|
|
85
|
+
getCache().addItems([
|
|
86
|
+
createEntry({
|
|
87
|
+
version: 2
|
|
88
|
+
})
|
|
89
|
+
]);
|
|
90
|
+
const entry = readEntry();
|
|
91
|
+
expect(entry?.id).toBe("entry-1#0002");
|
|
92
|
+
expect(readWorkflow(entry)).toBeUndefined();
|
|
93
|
+
});
|
|
94
|
+
it("adds an entry that is not cached unchanged", ()=>{
|
|
95
|
+
getCache().clear();
|
|
96
|
+
const added = createEntry({
|
|
97
|
+
title: "New"
|
|
98
|
+
});
|
|
99
|
+
getCache().addItems([
|
|
100
|
+
added
|
|
101
|
+
]);
|
|
102
|
+
expect(readEntry()).toEqual(added);
|
|
103
|
+
});
|
|
104
|
+
it("hands every other cache call to the cached list", ()=>{
|
|
105
|
+
getCache().removeItems((entry)=>"entry-1" === entry.entryId);
|
|
106
|
+
expect(getCache().count()).toBe(0);
|
|
107
|
+
expect(getCache().hasItems()).toBe(false);
|
|
108
|
+
});
|
|
109
|
+
it("is registered by the CMS workflows cache feature", ()=>{
|
|
110
|
+
container = new Container();
|
|
111
|
+
container.register(ContentEntriesCacheProvider_js_ContentEntriesCacheProvider).inSingletonScope();
|
|
112
|
+
CmsWorkflowsCacheFeature.register(container);
|
|
113
|
+
getCache().setItems([
|
|
114
|
+
createEntry({
|
|
115
|
+
system: {
|
|
116
|
+
workflow: CANCELLED
|
|
117
|
+
}
|
|
118
|
+
})
|
|
119
|
+
]);
|
|
120
|
+
getCache().addItems([
|
|
121
|
+
createEntry({
|
|
122
|
+
title: "Edited"
|
|
123
|
+
})
|
|
124
|
+
]);
|
|
125
|
+
expect(readWorkflow(readEntry())).toEqual(CANCELLED);
|
|
126
|
+
});
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
//# sourceMappingURL=CmsReviewEntriesCacheProviderDecorator.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/cache/CmsReviewEntriesCacheProviderDecorator.test.js","sources":["../../../src/features/cache/CmsReviewEntriesCacheProviderDecorator.test.ts"],"sourcesContent":["import { beforeEach } from \"vitest\";\nimport { describe } from \"vitest\";\nimport { expect } from \"vitest\";\nimport { it } from \"vitest\";\nimport { Container } from \"@webiny/di\";\nimport { ContentEntriesCacheProvider as ContentEntriesCacheProviderAbstraction } from \"@webiny/app-headless-cms/features/contentEntry/abstractions.js\";\nimport { ContentEntriesCacheProvider } from \"@webiny/app-headless-cms/features/contentEntry/ContentEntriesCacheProvider.js\";\nimport type { CmsContentEntry } from \"@webiny/app-headless-cms-common/types/index.js\";\nimport { ReviewState } from \"@webiny/app-workflows/review/domain/ReviewState.js\";\nimport { StepState } from \"@webiny/app-workflows/review/domain/StepState.js\";\nimport type { SystemWorkflowValue } from \"@webiny/app-workflows/review/domain/types.js\";\nimport type { ICmsEntryMetaWithReview } from \"~/types.js\";\nimport { CmsWorkflowsCacheFeature } from \"~/features/feature.js\";\nimport { CmsReviewEntriesCacheProviderDecorator } from \"./CmsReviewEntriesCacheProviderDecorator.js\";\n\nconst CANCELLED: SystemWorkflowValue = {\n workflowId: \"wf-1\",\n reviewState: ReviewState.Cancelled,\n stepId: \"step-1\",\n stepName: \"Legal review\",\n stepState: StepState.InReview\n};\n\ninterface CreateEntryParams {\n version?: number;\n title?: string;\n system?: ICmsEntryMetaWithReview[\"system\"];\n}\n\nfunction createEntry(params: CreateEntryParams = {}): CmsContentEntry {\n const { version = 1, title = \"Hello\", system } = params;\n const meta: Record<string, unknown> = { title, status: \"draft\", version, locked: false };\n if (system !== undefined) {\n meta.system = system;\n }\n return {\n id: `entry-1#000${version}`,\n entryId: \"entry-1\",\n meta\n } as unknown as CmsContentEntry;\n}\n\nfunction readWorkflow(entry: CmsContentEntry | undefined): unknown {\n const meta: ICmsEntryMetaWithReview | undefined = entry?.meta;\n return meta?.system?.workflow;\n}\n\nlet container: Container;\n\nfunction getCache() {\n return container.resolve(ContentEntriesCacheProviderAbstraction).get(\"article\");\n}\n\nfunction readEntry(): CmsContentEntry | undefined {\n return getCache().getItem(entry => entry.entryId === \"entry-1\");\n}\n\nbeforeEach(() => {\n container = new Container();\n container.register(ContentEntriesCacheProvider).inSingletonScope();\n container.registerDecorator(CmsReviewEntriesCacheProviderDecorator);\n getCache().setItems([createEntry({ system: { workflow: CANCELLED } })]);\n});\n\ndescribe(\"CmsReviewEntriesCacheProviderDecorator\", () => {\n it(\"keeps the cached workflow when a mutation returns the same revision without one\", () => {\n getCache().addItems([createEntry({ title: \"Edited\" })]);\n\n const entry = readEntry();\n expect(entry?.meta.title).toBe(\"Edited\");\n expect(readWorkflow(entry)).toEqual(CANCELLED);\n });\n\n it(\"keeps the cached workflow when the returned entry selects other system fields\", () => {\n getCache().addItems([createEntry({ title: \"Edited\", system: {} })]);\n\n expect(readWorkflow(readEntry())).toEqual(CANCELLED);\n });\n\n it(\"takes the workflow the added entry carries, including no review\", () => {\n getCache().addItems([createEntry({ system: { workflow: null } })]);\n\n expect(readWorkflow(readEntry())).toBeNull();\n });\n\n it(\"gives a new revision of the entry no workflow of the cached revision\", () => {\n getCache().addItems([createEntry({ version: 2 })]);\n\n const entry = readEntry();\n expect(entry?.id).toBe(\"entry-1#0002\");\n expect(readWorkflow(entry)).toBeUndefined();\n });\n\n it(\"adds an entry that is not cached unchanged\", () => {\n getCache().clear();\n const added = createEntry({ title: \"New\" });\n\n getCache().addItems([added]);\n\n expect(readEntry()).toEqual(added);\n });\n\n it(\"hands every other cache call to the cached list\", () => {\n getCache().removeItems(entry => entry.entryId === \"entry-1\");\n\n expect(getCache().count()).toBe(0);\n expect(getCache().hasItems()).toBe(false);\n });\n\n it(\"is registered by the CMS workflows cache feature\", () => {\n container = new Container();\n container.register(ContentEntriesCacheProvider).inSingletonScope();\n CmsWorkflowsCacheFeature.register(container);\n getCache().setItems([createEntry({ system: { workflow: CANCELLED } })]);\n\n getCache().addItems([createEntry({ title: \"Edited\" })]);\n\n expect(readWorkflow(readEntry())).toEqual(CANCELLED);\n });\n});\n"],"names":["CANCELLED","ReviewState","StepState","createEntry","params","version","title","system","meta","undefined","readWorkflow","entry","container","getCache","ContentEntriesCacheProviderAbstraction","readEntry","beforeEach","Container","ContentEntriesCacheProvider","CmsReviewEntriesCacheProviderDecorator","describe","it","expect","added","CmsWorkflowsCacheFeature"],"mappings":";;;;;;;;AAeA,MAAMA,YAAiC;IACnC,YAAY;IACZ,aAAaC,YAAY,SAAS;IAClC,QAAQ;IACR,UAAU;IACV,WAAWC,UAAU,QAAQ;AACjC;AAQA,SAASC,YAAYC,SAA4B,CAAC,CAAC;IAC/C,MAAM,EAAEC,UAAU,CAAC,EAAEC,QAAQ,OAAO,EAAEC,MAAM,EAAE,GAAGH;IACjD,MAAMI,OAAgC;QAAEF;QAAO,QAAQ;QAASD;QAAS,QAAQ;IAAM;IACvF,IAAIE,AAAWE,WAAXF,QACAC,KAAK,MAAM,GAAGD;IAElB,OAAO;QACH,IAAI,CAAC,WAAW,EAAEF,SAAS;QAC3B,SAAS;QACTG;IACJ;AACJ;AAEA,SAASE,aAAaC,KAAkC;IACpD,MAAMH,OAA4CG,OAAO;IACzD,OAAOH,MAAM,QAAQ;AACzB;AAEA,IAAII;AAEJ,SAASC;IACL,OAAOD,UAAU,OAAO,CAACE,6BAAwC,GAAG,CAAC;AACzE;AAEA,SAASC;IACL,OAAOF,WAAW,OAAO,CAACF,CAAAA,QAASA,AAAkB,cAAlBA,MAAM,OAAO;AACpD;AAEAK,WAAW;IACPJ,YAAY,IAAIK;IAChBL,UAAU,QAAQ,CAACM,4DAA6B,gBAAgB;IAChEN,UAAU,iBAAiB,CAACO;IAC5BN,WAAW,QAAQ,CAAC;QAACV,YAAY;YAAE,QAAQ;gBAAE,UAAUH;YAAU;QAAE;KAAG;AAC1E;AAEAoB,SAAS,0CAA0C;IAC/CC,GAAG,mFAAmF;QAClFR,WAAW,QAAQ,CAAC;YAACV,YAAY;gBAAE,OAAO;YAAS;SAAG;QAEtD,MAAMQ,QAAQI;QACdO,OAAOX,OAAO,KAAK,OAAO,IAAI,CAAC;QAC/BW,OAAOZ,aAAaC,QAAQ,OAAO,CAACX;IACxC;IAEAqB,GAAG,iFAAiF;QAChFR,WAAW,QAAQ,CAAC;YAACV,YAAY;gBAAE,OAAO;gBAAU,QAAQ,CAAC;YAAE;SAAG;QAElEmB,OAAOZ,aAAaK,cAAc,OAAO,CAACf;IAC9C;IAEAqB,GAAG,mEAAmE;QAClER,WAAW,QAAQ,CAAC;YAACV,YAAY;gBAAE,QAAQ;oBAAE,UAAU;gBAAK;YAAE;SAAG;QAEjEmB,OAAOZ,aAAaK,cAAc,QAAQ;IAC9C;IAEAM,GAAG,wEAAwE;QACvER,WAAW,QAAQ,CAAC;YAACV,YAAY;gBAAE,SAAS;YAAE;SAAG;QAEjD,MAAMQ,QAAQI;QACdO,OAAOX,OAAO,IAAI,IAAI,CAAC;QACvBW,OAAOZ,aAAaC,QAAQ,aAAa;IAC7C;IAEAU,GAAG,8CAA8C;QAC7CR,WAAW,KAAK;QAChB,MAAMU,QAAQpB,YAAY;YAAE,OAAO;QAAM;QAEzCU,WAAW,QAAQ,CAAC;YAACU;SAAM;QAE3BD,OAAOP,aAAa,OAAO,CAACQ;IAChC;IAEAF,GAAG,mDAAmD;QAClDR,WAAW,WAAW,CAACF,CAAAA,QAASA,AAAkB,cAAlBA,MAAM,OAAO;QAE7CW,OAAOT,WAAW,KAAK,IAAI,IAAI,CAAC;QAChCS,OAAOT,WAAW,QAAQ,IAAI,IAAI,CAAC;IACvC;IAEAQ,GAAG,oDAAoD;QACnDT,YAAY,IAAIK;QAChBL,UAAU,QAAQ,CAACM,4DAA6B,gBAAgB;QAChEM,yBAAyB,QAAQ,CAACZ;QAClCC,WAAW,QAAQ,CAAC;YAACV,YAAY;gBAAE,QAAQ;oBAAE,UAAUH;gBAAU;YAAE;SAAG;QAEtEa,WAAW,QAAQ,CAAC;YAACV,YAAY;gBAAE,OAAO;YAAS;SAAG;QAEtDmB,OAAOZ,aAAaK,cAAc,OAAO,CAACf;IAC9C;AACJ"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { IListCache } from "@webiny/app-admin/features/listCache/index.js";
|
|
2
|
+
import type { IListCacheItemUpdater } from "@webiny/app-admin/features/listCache/index.js";
|
|
3
|
+
import type { IListCachePredicate } from "@webiny/app-admin/features/listCache/index.js";
|
|
4
|
+
import type { CmsContentEntry } from "@webiny/app-headless-cms-common/types/index.js";
|
|
5
|
+
export declare class ReviewPreservingEntriesCache implements IListCache<CmsContentEntry> {
|
|
6
|
+
private readonly cache;
|
|
7
|
+
constructor(cache: IListCache<CmsContentEntry>);
|
|
8
|
+
count(): number;
|
|
9
|
+
clear(): void;
|
|
10
|
+
hasItems(): boolean;
|
|
11
|
+
getItems(): CmsContentEntry[];
|
|
12
|
+
getItem(predicate: IListCachePredicate<CmsContentEntry>): CmsContentEntry | undefined;
|
|
13
|
+
addItems(items: CmsContentEntry[]): void;
|
|
14
|
+
setItems(items: CmsContentEntry[]): void;
|
|
15
|
+
updateItems(updater: IListCacheItemUpdater<CmsContentEntry>): void;
|
|
16
|
+
removeItems(predicate: IListCachePredicate<CmsContentEntry>): void;
|
|
17
|
+
private keepCachedWorkflow;
|
|
18
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
class ReviewPreservingEntriesCache {
|
|
2
|
+
constructor(cache){
|
|
3
|
+
this.cache = cache;
|
|
4
|
+
}
|
|
5
|
+
count() {
|
|
6
|
+
return this.cache.count();
|
|
7
|
+
}
|
|
8
|
+
clear() {
|
|
9
|
+
this.cache.clear();
|
|
10
|
+
}
|
|
11
|
+
hasItems() {
|
|
12
|
+
return this.cache.hasItems();
|
|
13
|
+
}
|
|
14
|
+
getItems() {
|
|
15
|
+
return this.cache.getItems();
|
|
16
|
+
}
|
|
17
|
+
getItem(predicate) {
|
|
18
|
+
return this.cache.getItem(predicate);
|
|
19
|
+
}
|
|
20
|
+
addItems(items) {
|
|
21
|
+
this.cache.addItems(items.map((item)=>this.keepCachedWorkflow(item)));
|
|
22
|
+
}
|
|
23
|
+
setItems(items) {
|
|
24
|
+
this.cache.setItems(items);
|
|
25
|
+
}
|
|
26
|
+
updateItems(updater) {
|
|
27
|
+
this.cache.updateItems(updater);
|
|
28
|
+
}
|
|
29
|
+
removeItems(predicate) {
|
|
30
|
+
this.cache.removeItems(predicate);
|
|
31
|
+
}
|
|
32
|
+
keepCachedWorkflow(item) {
|
|
33
|
+
const meta = item.meta;
|
|
34
|
+
if (meta.system?.workflow !== void 0) return item;
|
|
35
|
+
const cached = this.cache.getItem((entry)=>entry.id === item.id);
|
|
36
|
+
const cachedMeta = cached?.meta;
|
|
37
|
+
const workflow = cachedMeta?.system?.workflow;
|
|
38
|
+
if (void 0 === workflow) return item;
|
|
39
|
+
const nextMeta = {
|
|
40
|
+
...item.meta,
|
|
41
|
+
system: {
|
|
42
|
+
...meta.system,
|
|
43
|
+
workflow
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
return {
|
|
47
|
+
...item,
|
|
48
|
+
meta: nextMeta
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
export { ReviewPreservingEntriesCache };
|
|
53
|
+
|
|
54
|
+
//# sourceMappingURL=ReviewPreservingEntriesCache.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/cache/ReviewPreservingEntriesCache.js","sources":["../../../src/features/cache/ReviewPreservingEntriesCache.ts"],"sourcesContent":["import type { IListCache } from \"@webiny/app-admin/features/listCache/index.js\";\nimport type { IListCacheItemUpdater } from \"@webiny/app-admin/features/listCache/index.js\";\nimport type { IListCachePredicate } from \"@webiny/app-admin/features/listCache/index.js\";\nimport type { CmsContentEntry } from \"@webiny/app-headless-cms-common/types/index.js\";\nimport type { ICmsEntryMetaWithReview } from \"~/types.js\";\n\n/*\n * Only the entry list and entry reads select `meta.system.workflow`; the entries the mutations\n * return (update, publish, restore, ...) do not, and adding one replaces the cached row. An added\n * entry without a workflow selection keeps the cached revision's workflow; a different revision\n * of the entry (a new one) has no review of its own yet, so it keeps nothing.\n */\nexport class ReviewPreservingEntriesCache implements IListCache<CmsContentEntry> {\n constructor(private readonly cache: IListCache<CmsContentEntry>) {}\n\n count(): number {\n return this.cache.count();\n }\n\n clear(): void {\n this.cache.clear();\n }\n\n hasItems(): boolean {\n return this.cache.hasItems();\n }\n\n getItems(): CmsContentEntry[] {\n return this.cache.getItems();\n }\n\n getItem(predicate: IListCachePredicate<CmsContentEntry>): CmsContentEntry | undefined {\n return this.cache.getItem(predicate);\n }\n\n addItems(items: CmsContentEntry[]): void {\n this.cache.addItems(items.map(item => this.keepCachedWorkflow(item)));\n }\n\n setItems(items: CmsContentEntry[]): void {\n this.cache.setItems(items);\n }\n\n updateItems(updater: IListCacheItemUpdater<CmsContentEntry>): void {\n this.cache.updateItems(updater);\n }\n\n removeItems(predicate: IListCachePredicate<CmsContentEntry>): void {\n this.cache.removeItems(predicate);\n }\n\n private keepCachedWorkflow(item: CmsContentEntry): CmsContentEntry {\n const meta: ICmsEntryMetaWithReview = item.meta;\n\n if (meta.system?.workflow !== undefined) {\n return item;\n }\n\n const cached = this.cache.getItem(entry => entry.id === item.id);\n const cachedMeta: ICmsEntryMetaWithReview | undefined = cached?.meta;\n const workflow = cachedMeta?.system?.workflow;\n\n if (workflow === undefined) {\n return item;\n }\n\n const nextMeta: ICmsEntryMetaWithReview = {\n ...item.meta,\n system: { ...meta.system, workflow }\n };\n\n return { ...item, meta: nextMeta };\n }\n}\n"],"names":["ReviewPreservingEntriesCache","cache","predicate","items","item","updater","meta","undefined","cached","entry","cachedMeta","workflow","nextMeta"],"mappings":"AAYO,MAAMA;IACT,YAA6BC,KAAkC,CAAE;aAApCA,KAAK,GAALA;IAAqC;IAElE,QAAgB;QACZ,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK;IAC3B;IAEA,QAAc;QACV,IAAI,CAAC,KAAK,CAAC,KAAK;IACpB;IAEA,WAAoB;QAChB,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ;IAC9B;IAEA,WAA8B;QAC1B,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ;IAC9B;IAEA,QAAQC,SAA+C,EAA+B;QAClF,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAACA;IAC9B;IAEA,SAASC,KAAwB,EAAQ;QACrC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAACA,MAAM,GAAG,CAACC,CAAAA,OAAQ,IAAI,CAAC,kBAAkB,CAACA;IAClE;IAEA,SAASD,KAAwB,EAAQ;QACrC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAACA;IACxB;IAEA,YAAYE,OAA+C,EAAQ;QAC/D,IAAI,CAAC,KAAK,CAAC,WAAW,CAACA;IAC3B;IAEA,YAAYH,SAA+C,EAAQ;QAC/D,IAAI,CAAC,KAAK,CAAC,WAAW,CAACA;IAC3B;IAEQ,mBAAmBE,IAAqB,EAAmB;QAC/D,MAAME,OAAgCF,KAAK,IAAI;QAE/C,IAAIE,KAAK,MAAM,EAAE,aAAaC,QAC1B,OAAOH;QAGX,MAAMI,SAAS,IAAI,CAAC,KAAK,CAAC,OAAO,CAACC,CAAAA,QAASA,MAAM,EAAE,KAAKL,KAAK,EAAE;QAC/D,MAAMM,aAAkDF,QAAQ;QAChE,MAAMG,WAAWD,YAAY,QAAQ;QAErC,IAAIC,AAAaJ,WAAbI,UACA,OAAOP;QAGX,MAAMQ,WAAoC;YACtC,GAAGR,KAAK,IAAI;YACZ,QAAQ;gBAAE,GAAGE,KAAK,MAAM;gBAAEK;YAAS;QACvC;QAEA,OAAO;YAAE,GAAGP,IAAI;YAAE,MAAMQ;QAAS;IACrC;AACJ"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { IReviewCacheWriter } from "@webiny/app-workflows/review/cache/IReviewCacheWriter.js";
|
|
2
|
+
export declare const CmsReviewCacheWriter: import("@webiny/di").Abstraction<IReviewCacheWriter>;
|
|
3
|
+
export declare namespace CmsReviewCacheWriter {
|
|
4
|
+
type Interface = IReviewCacheWriter;
|
|
5
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/cache/abstractions.js","sources":["../../../src/features/cache/abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/admin\";\nimport type { IReviewCacheWriter } from \"@webiny/app-workflows/review/cache/IReviewCacheWriter.js\";\n\nexport const CmsReviewCacheWriter = createAbstraction<IReviewCacheWriter>(\n \"Cms/Workflows/ReviewCacheWriter\"\n);\n\nexport namespace CmsReviewCacheWriter {\n export type Interface = IReviewCacheWriter;\n}\n"],"names":["CmsReviewCacheWriter","createAbstraction"],"mappings":";AAGO,MAAMA,uBAAuBC,kBAChC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { MainGraphQLClient } from "@webiny/app/features/mainGraphQLClient/abstractions.js";
|
|
2
|
+
import type { EditorEnvelope } from "@webiny/app-workflows/editor/gateway/dto.js";
|
|
3
|
+
import type { EditorWorkflowDto } from "@webiny/app-workflows/editor/gateway/dto.js";
|
|
4
|
+
import type { RoutingInspectionDto } from "@webiny/app-workflows/editor/gateway/dto.js";
|
|
5
|
+
import type { WorkflowModelPageDto } from "@webiny/app-workflows/editor/gateway/dto.js";
|
|
6
|
+
import type { FolderExistsParams } from "@webiny/app-workflows/editor/appGateway/IWorkflowEditorAppGateway.js";
|
|
7
|
+
import type { InspectRoutingParams } from "@webiny/app-workflows/editor/appGateway/IWorkflowEditorAppGateway.js";
|
|
8
|
+
import type { ListWorkflowModelsParams } from "@webiny/app-workflows/editor/appGateway/IWorkflowEditorAppGateway.js";
|
|
9
|
+
import type { StoreWorkflowParams } from "@webiny/app-workflows/editor/appGateway/IWorkflowEditorAppGateway.js";
|
|
10
|
+
import type { WorkflowAppKind } from "@webiny/app-workflows/domain/WorkflowAppKind.js";
|
|
11
|
+
import { WorkflowEditorAppGateway as GatewayAbstraction } from "@webiny/app-workflows/editor/appGateway/abstractions.js";
|
|
12
|
+
declare class CmsWorkflowEditorGatewayImpl implements GatewayAbstraction.Interface {
|
|
13
|
+
private client;
|
|
14
|
+
readonly app: WorkflowAppKind;
|
|
15
|
+
constructor(client: MainGraphQLClient.Interface);
|
|
16
|
+
listModels(params: ListWorkflowModelsParams): Promise<EditorEnvelope<WorkflowModelPageDto>>;
|
|
17
|
+
getWorkflow(id: string): Promise<EditorEnvelope<EditorWorkflowDto>>;
|
|
18
|
+
storeWorkflow(params: StoreWorkflowParams): Promise<EditorEnvelope<EditorWorkflowDto>>;
|
|
19
|
+
deleteWorkflow(id: string): Promise<EditorEnvelope<EditorWorkflowDto>>;
|
|
20
|
+
inspectRouting(params: InspectRoutingParams): Promise<EditorEnvelope<RoutingInspectionDto>>;
|
|
21
|
+
folderExists(params: FolderExistsParams): Promise<EditorEnvelope<boolean>>;
|
|
22
|
+
}
|
|
23
|
+
export declare const CmsWorkflowEditorGateway: typeof CmsWorkflowEditorGatewayImpl & {
|
|
24
|
+
__abstraction: import("@webiny/di").Abstraction<import("@webiny/app-workflows/editor/appGateway/IWorkflowEditorAppGateway.js").IWorkflowEditorAppGateway>;
|
|
25
|
+
};
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { MainGraphQLClient } from "@webiny/app/features/mainGraphQLClient/abstractions.js";
|
|
2
|
+
import { WorkflowEditorAppGateway } from "@webiny/app-workflows/editor/appGateway/abstractions.js";
|
|
3
|
+
import { CMS_ENTRY_FOLDER_EXISTS } from "../graphql/cmsEntryFolderExists.js";
|
|
4
|
+
import { DELETE_CMS_ENTRY_WORKFLOW } from "../graphql/deleteCmsEntryWorkflow.js";
|
|
5
|
+
import { GET_CMS_ENTRY_WORKFLOW } from "../graphql/getCmsEntryWorkflow.js";
|
|
6
|
+
import { INSPECT_CMS_ENTRY_ROUTING } from "../graphql/inspectCmsEntryRouting.js";
|
|
7
|
+
import { LIST_CMS_ENTRY_WORKFLOW_MODELS } from "../graphql/listCmsEntryWorkflowModels.js";
|
|
8
|
+
import { STORE_CMS_ENTRY_WORKFLOW } from "../graphql/storeCmsEntryWorkflow.js";
|
|
9
|
+
class CmsWorkflowEditorGatewayImpl {
|
|
10
|
+
constructor(client){
|
|
11
|
+
this.client = client;
|
|
12
|
+
this.app = "cms";
|
|
13
|
+
}
|
|
14
|
+
async listModels(params) {
|
|
15
|
+
const search = params.search.length > 0 ? params.search : null;
|
|
16
|
+
const response = await this.client.execute({
|
|
17
|
+
query: LIST_CMS_ENTRY_WORKFLOW_MODELS,
|
|
18
|
+
variables: {
|
|
19
|
+
search,
|
|
20
|
+
limit: params.limit,
|
|
21
|
+
after: params.after
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
const envelope = response.cms.listCmsEntryWorkflowModels;
|
|
25
|
+
if (envelope.error) return {
|
|
26
|
+
data: null,
|
|
27
|
+
error: envelope.error
|
|
28
|
+
};
|
|
29
|
+
if (!envelope.data) return {
|
|
30
|
+
data: null,
|
|
31
|
+
error: null
|
|
32
|
+
};
|
|
33
|
+
const meta = envelope.meta ?? {
|
|
34
|
+
cursor: null,
|
|
35
|
+
hasMoreItems: false
|
|
36
|
+
};
|
|
37
|
+
return {
|
|
38
|
+
data: {
|
|
39
|
+
rows: envelope.data,
|
|
40
|
+
meta
|
|
41
|
+
},
|
|
42
|
+
error: null
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
async getWorkflow(id) {
|
|
46
|
+
const response = await this.client.execute({
|
|
47
|
+
query: GET_CMS_ENTRY_WORKFLOW,
|
|
48
|
+
variables: {
|
|
49
|
+
id
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
return response.cms.getCmsEntryWorkflow;
|
|
53
|
+
}
|
|
54
|
+
async storeWorkflow(params) {
|
|
55
|
+
const response = await this.client.execute({
|
|
56
|
+
query: STORE_CMS_ENTRY_WORKFLOW,
|
|
57
|
+
variables: {
|
|
58
|
+
data: params.data,
|
|
59
|
+
savedOn: params.savedOn
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
return response.cms.storeCmsEntryWorkflow;
|
|
63
|
+
}
|
|
64
|
+
async deleteWorkflow(id) {
|
|
65
|
+
const response = await this.client.execute({
|
|
66
|
+
query: DELETE_CMS_ENTRY_WORKFLOW,
|
|
67
|
+
variables: {
|
|
68
|
+
id
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
return response.cms.deleteCmsEntryWorkflow;
|
|
72
|
+
}
|
|
73
|
+
async inspectRouting(params) {
|
|
74
|
+
const response = await this.client.execute({
|
|
75
|
+
query: INSPECT_CMS_ENTRY_ROUTING,
|
|
76
|
+
variables: {
|
|
77
|
+
stepConfig: params.stepConfig,
|
|
78
|
+
modelId: params.modelId,
|
|
79
|
+
requesterId: params.requesterId,
|
|
80
|
+
folderId: params.folderId
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
return response.cms.inspectCmsEntryRouting;
|
|
84
|
+
}
|
|
85
|
+
async folderExists(params) {
|
|
86
|
+
const response = await this.client.execute({
|
|
87
|
+
query: CMS_ENTRY_FOLDER_EXISTS,
|
|
88
|
+
variables: {
|
|
89
|
+
id: params.id,
|
|
90
|
+
type: params.type
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
return response.cms.cmsEntryFolderExists;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
const CmsWorkflowEditorGateway = WorkflowEditorAppGateway.createImplementation({
|
|
97
|
+
implementation: CmsWorkflowEditorGatewayImpl,
|
|
98
|
+
dependencies: [
|
|
99
|
+
MainGraphQLClient
|
|
100
|
+
]
|
|
101
|
+
});
|
|
102
|
+
export { CmsWorkflowEditorGateway };
|
|
103
|
+
|
|
104
|
+
//# sourceMappingURL=CmsWorkflowEditorGateway.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/editorGateway/CmsWorkflowEditorGateway/CmsWorkflowEditorGateway.js","sources":["../../../../src/features/editorGateway/CmsWorkflowEditorGateway/CmsWorkflowEditorGateway.ts"],"sourcesContent":["import { MainGraphQLClient } from \"@webiny/app/features/mainGraphQLClient/abstractions.js\";\nimport type { EditorEnvelope } from \"@webiny/app-workflows/editor/gateway/dto.js\";\nimport type { EditorErrorDto } from \"@webiny/app-workflows/editor/gateway/dto.js\";\nimport type { EditorListMetaDto } from \"@webiny/app-workflows/editor/gateway/dto.js\";\nimport type { EditorWorkflowDto } from \"@webiny/app-workflows/editor/gateway/dto.js\";\nimport type { RoutingInspectionDto } from \"@webiny/app-workflows/editor/gateway/dto.js\";\nimport type { WorkflowModelPageDto } from \"@webiny/app-workflows/editor/gateway/dto.js\";\nimport type { WorkflowModelRowDto } from \"@webiny/app-workflows/editor/gateway/dto.js\";\nimport type { FolderExistsParams } from \"@webiny/app-workflows/editor/appGateway/IWorkflowEditorAppGateway.js\";\nimport type { InspectRoutingParams } from \"@webiny/app-workflows/editor/appGateway/IWorkflowEditorAppGateway.js\";\nimport type { ListWorkflowModelsParams } from \"@webiny/app-workflows/editor/appGateway/IWorkflowEditorAppGateway.js\";\nimport type { StoreWorkflowParams } from \"@webiny/app-workflows/editor/appGateway/IWorkflowEditorAppGateway.js\";\nimport type { WorkflowAppKind } from \"@webiny/app-workflows/domain/WorkflowAppKind.js\";\nimport type { CmsOperationResponse } from \"~/features/gateway/graphql/CmsOperationResponse.js\";\nimport { WorkflowEditorAppGateway as GatewayAbstraction } from \"@webiny/app-workflows/editor/appGateway/abstractions.js\";\nimport { CMS_ENTRY_FOLDER_EXISTS } from \"../graphql/cmsEntryFolderExists.js\";\nimport { DELETE_CMS_ENTRY_WORKFLOW } from \"../graphql/deleteCmsEntryWorkflow.js\";\nimport { GET_CMS_ENTRY_WORKFLOW } from \"../graphql/getCmsEntryWorkflow.js\";\nimport { INSPECT_CMS_ENTRY_ROUTING } from \"../graphql/inspectCmsEntryRouting.js\";\nimport { LIST_CMS_ENTRY_WORKFLOW_MODELS } from \"../graphql/listCmsEntryWorkflowModels.js\";\nimport { STORE_CMS_ENTRY_WORKFLOW } from \"../graphql/storeCmsEntryWorkflow.js\";\n\n// A list answer of the server: the rows and the page meta next to the error.\ninterface CmsWorkflowModelListEnvelope {\n data: WorkflowModelRowDto[] | null;\n meta: EditorListMetaDto | null;\n error: EditorErrorDto | null;\n}\n\nclass CmsWorkflowEditorGatewayImpl implements GatewayAbstraction.Interface {\n // The routing `WorkflowEditorGateway` picks this gateway for `app: \"cms\"` (R347).\n public readonly app: WorkflowAppKind = \"cms\";\n\n constructor(private client: MainGraphQLClient.Interface) {}\n\n async listModels(\n params: ListWorkflowModelsParams\n ): Promise<EditorEnvelope<WorkflowModelPageDto>> {\n const search = params.search.length > 0 ? params.search : null;\n\n const response = await this.client.execute<\n CmsOperationResponse<\"listCmsEntryWorkflowModels\", CmsWorkflowModelListEnvelope>\n >({\n query: LIST_CMS_ENTRY_WORKFLOW_MODELS,\n variables: { search, limit: params.limit, after: params.after }\n });\n\n const envelope = response.cms.listCmsEntryWorkflowModels;\n if (envelope.error) {\n return { data: null, error: envelope.error };\n }\n if (!envelope.data) {\n return { data: null, error: null };\n }\n const meta: EditorListMetaDto = envelope.meta ?? { cursor: null, hasMoreItems: false };\n return { data: { rows: envelope.data, meta }, error: null };\n }\n\n async getWorkflow(id: string): Promise<EditorEnvelope<EditorWorkflowDto>> {\n const response = await this.client.execute<\n CmsOperationResponse<\"getCmsEntryWorkflow\", EditorEnvelope<EditorWorkflowDto>>\n >({\n query: GET_CMS_ENTRY_WORKFLOW,\n variables: { id }\n });\n\n return response.cms.getCmsEntryWorkflow;\n }\n\n async storeWorkflow(params: StoreWorkflowParams): Promise<EditorEnvelope<EditorWorkflowDto>> {\n const response = await this.client.execute<\n CmsOperationResponse<\"storeCmsEntryWorkflow\", EditorEnvelope<EditorWorkflowDto>>\n >({\n query: STORE_CMS_ENTRY_WORKFLOW,\n variables: { data: params.data, savedOn: params.savedOn }\n });\n\n return response.cms.storeCmsEntryWorkflow;\n }\n\n async deleteWorkflow(id: string): Promise<EditorEnvelope<EditorWorkflowDto>> {\n const response = await this.client.execute<\n CmsOperationResponse<\"deleteCmsEntryWorkflow\", EditorEnvelope<EditorWorkflowDto>>\n >({\n query: DELETE_CMS_ENTRY_WORKFLOW,\n variables: { id }\n });\n\n return response.cms.deleteCmsEntryWorkflow;\n }\n\n async inspectRouting(\n params: InspectRoutingParams\n ): Promise<EditorEnvelope<RoutingInspectionDto>> {\n const response = await this.client.execute<\n CmsOperationResponse<\"inspectCmsEntryRouting\", EditorEnvelope<RoutingInspectionDto>>\n >({\n query: INSPECT_CMS_ENTRY_ROUTING,\n variables: {\n stepConfig: params.stepConfig,\n modelId: params.modelId,\n requesterId: params.requesterId,\n folderId: params.folderId\n }\n });\n\n return response.cms.inspectCmsEntryRouting;\n }\n\n async folderExists(params: FolderExistsParams): Promise<EditorEnvelope<boolean>> {\n const response = await this.client.execute<\n CmsOperationResponse<\"cmsEntryFolderExists\", EditorEnvelope<boolean>>\n >({\n query: CMS_ENTRY_FOLDER_EXISTS,\n variables: { id: params.id, type: params.type }\n });\n\n return response.cms.cmsEntryFolderExists;\n }\n}\n\n/*\n * The CMS registration of the shared `WorkflowEditorAppGateway` token (R347). It keeps its app name\n * (R344): the CMS and WB registrations of one token stay distinguishable.\n */\nexport const CmsWorkflowEditorGateway = GatewayAbstraction.createImplementation({\n implementation: CmsWorkflowEditorGatewayImpl,\n dependencies: [MainGraphQLClient]\n});\n"],"names":["CmsWorkflowEditorGatewayImpl","client","params","search","response","LIST_CMS_ENTRY_WORKFLOW_MODELS","envelope","meta","id","GET_CMS_ENTRY_WORKFLOW","STORE_CMS_ENTRY_WORKFLOW","DELETE_CMS_ENTRY_WORKFLOW","INSPECT_CMS_ENTRY_ROUTING","CMS_ENTRY_FOLDER_EXISTS","CmsWorkflowEditorGateway","GatewayAbstraction","MainGraphQLClient"],"mappings":";;;;;;;;AA6BA,MAAMA;IAIF,YAAoBC,MAAmC,CAAE;aAArCA,MAAM,GAANA;aAFJ,GAAG,GAAoB;IAEmB;IAE1D,MAAM,WACFC,MAAgC,EACa;QAC7C,MAAMC,SAASD,OAAO,MAAM,CAAC,MAAM,GAAG,IAAIA,OAAO,MAAM,GAAG;QAE1D,MAAME,WAAW,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAExC;YACE,OAAOC;YACP,WAAW;gBAAEF;gBAAQ,OAAOD,OAAO,KAAK;gBAAE,OAAOA,OAAO,KAAK;YAAC;QAClE;QAEA,MAAMI,WAAWF,SAAS,GAAG,CAAC,0BAA0B;QACxD,IAAIE,SAAS,KAAK,EACd,OAAO;YAAE,MAAM;YAAM,OAAOA,SAAS,KAAK;QAAC;QAE/C,IAAI,CAACA,SAAS,IAAI,EACd,OAAO;YAAE,MAAM;YAAM,OAAO;QAAK;QAErC,MAAMC,OAA0BD,SAAS,IAAI,IAAI;YAAE,QAAQ;YAAM,cAAc;QAAM;QACrF,OAAO;YAAE,MAAM;gBAAE,MAAMA,SAAS,IAAI;gBAAEC;YAAK;YAAG,OAAO;QAAK;IAC9D;IAEA,MAAM,YAAYC,EAAU,EAA8C;QACtE,MAAMJ,WAAW,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAExC;YACE,OAAOK;YACP,WAAW;gBAAED;YAAG;QACpB;QAEA,OAAOJ,SAAS,GAAG,CAAC,mBAAmB;IAC3C;IAEA,MAAM,cAAcF,MAA2B,EAA8C;QACzF,MAAME,WAAW,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAExC;YACE,OAAOM;YACP,WAAW;gBAAE,MAAMR,OAAO,IAAI;gBAAE,SAASA,OAAO,OAAO;YAAC;QAC5D;QAEA,OAAOE,SAAS,GAAG,CAAC,qBAAqB;IAC7C;IAEA,MAAM,eAAeI,EAAU,EAA8C;QACzE,MAAMJ,WAAW,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAExC;YACE,OAAOO;YACP,WAAW;gBAAEH;YAAG;QACpB;QAEA,OAAOJ,SAAS,GAAG,CAAC,sBAAsB;IAC9C;IAEA,MAAM,eACFF,MAA4B,EACiB;QAC7C,MAAME,WAAW,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAExC;YACE,OAAOQ;YACP,WAAW;gBACP,YAAYV,OAAO,UAAU;gBAC7B,SAASA,OAAO,OAAO;gBACvB,aAAaA,OAAO,WAAW;gBAC/B,UAAUA,OAAO,QAAQ;YAC7B;QACJ;QAEA,OAAOE,SAAS,GAAG,CAAC,sBAAsB;IAC9C;IAEA,MAAM,aAAaF,MAA0B,EAAoC;QAC7E,MAAME,WAAW,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAExC;YACE,OAAOS;YACP,WAAW;gBAAE,IAAIX,OAAO,EAAE;gBAAE,MAAMA,OAAO,IAAI;YAAC;QAClD;QAEA,OAAOE,SAAS,GAAG,CAAC,oBAAoB;IAC5C;AACJ;AAMO,MAAMU,2BAA2BC,yBAAAA,oBAAuC,CAAC;IAC5E,gBAAgBf;IAChB,cAAc;QAACgB;KAAkB;AACrC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|