@webiny/api-apw 0.0.0-unstable.e3f4727c56 → 0.0.0-unstable.eb196ccd2f
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/ApwChangeRequestNotification.d.ts +1 -1
- package/ApwChangeRequestNotification.js +4 -6
- package/ApwChangeRequestNotification.js.map +1 -1
- package/ApwCommentNotification.d.ts +1 -1
- package/ApwCommentNotification.js +4 -6
- package/ApwCommentNotification.js.map +1 -1
- package/ApwContentReviewNotification.d.ts +1 -1
- package/ApwContentReviewNotification.js +4 -6
- package/ApwContentReviewNotification.js.map +1 -1
- package/ApwContentUrlPlugin.d.ts +1 -1
- package/ApwContentUrlPlugin.js +4 -6
- package/ApwContentUrlPlugin.js.map +1 -1
- package/ContentApwSettingsPlugin.d.ts +1 -1
- package/ContentApwSettingsPlugin.js +5 -4
- package/ContentApwSettingsPlugin.js.map +1 -1
- package/README.md +3 -3
- package/crud/createChangeRequestMethods.d.ts +1 -1
- package/crud/createChangeRequestMethods.js +3 -1
- package/crud/createChangeRequestMethods.js.map +1 -1
- package/crud/createCommentMethods.d.ts +1 -1
- package/crud/createCommentMethods.js +3 -1
- package/crud/createCommentMethods.js.map +1 -1
- package/crud/createContentReviewMethods.d.ts +2 -2
- package/crud/createContentReviewMethods.js +57 -32
- package/crud/createContentReviewMethods.js.map +1 -1
- package/crud/createReviewerMethods.d.ts +1 -1
- package/crud/createReviewerMethods.js +3 -1
- package/crud/createReviewerMethods.js.map +1 -1
- package/crud/createWorkflowMethods.d.ts +1 -1
- package/crud/createWorkflowMethods.js +3 -1
- package/crud/createWorkflowMethods.js.map +1 -1
- package/crud/index.d.ts +1 -1
- package/crud/index.js +6 -5
- package/crud/index.js.map +1 -1
- package/crud/utils.d.ts +2 -2
- package/crud/utils.js +8 -8
- package/crud/utils.js.map +1 -1
- package/index.d.ts +2 -2
- package/index.js +7 -6
- package/index.js.map +1 -1
- package/package.json +32 -50
- package/plugins/cms/CmsEntryApwSettingsGetterPlugin.d.ts +1 -1
- package/plugins/cms/CmsEntryApwSettingsGetterPlugin.js +5 -5
- package/plugins/cms/CmsEntryApwSettingsGetterPlugin.js.map +1 -1
- package/plugins/cms/apwEntryPlugins.d.ts +2 -2
- package/plugins/cms/apwEntryPlugins.js +19 -7
- package/plugins/cms/apwEntryPlugins.js.map +1 -1
- package/plugins/cms/index.d.ts +4 -4
- package/plugins/cms/index.js +3 -1
- package/plugins/cms/index.js.map +1 -1
- package/plugins/cms/linkContentReviewToEntry.d.ts +2 -2
- package/plugins/cms/linkContentReviewToEntry.js +5 -4
- package/plugins/cms/linkContentReviewToEntry.js.map +1 -1
- package/plugins/cms/linkWorkflowToEntry.d.ts +2 -2
- package/plugins/cms/linkWorkflowToEntry.js +17 -16
- package/plugins/cms/linkWorkflowToEntry.js.map +1 -1
- package/plugins/cms/notifications/changeRequestNotification.js +3 -1
- package/plugins/cms/notifications/changeRequestNotification.js.map +1 -1
- package/plugins/cms/notifications/commentNotification.js +3 -1
- package/plugins/cms/notifications/commentNotification.js.map +1 -1
- package/plugins/cms/notifications/contentReviewNotification.js +3 -1
- package/plugins/cms/notifications/contentReviewNotification.js.map +1 -1
- package/plugins/cms/notifications/contentUrl.js +3 -1
- package/plugins/cms/notifications/contentUrl.js.map +1 -1
- package/plugins/cms/triggerContentReview.d.ts +2 -2
- package/plugins/cms/triggerContentReview.js +6 -5
- package/plugins/cms/triggerContentReview.js.map +1 -1
- package/plugins/cms/updateContentReviewStatus.d.ts +3 -3
- package/plugins/cms/updateContentReviewStatus.js +15 -13
- package/plugins/cms/updateContentReviewStatus.js.map +1 -1
- package/plugins/cms/utils.d.ts +5 -4
- package/plugins/cms/utils.js +19 -13
- package/plugins/cms/utils.js.map +1 -1
- package/plugins/context.d.ts +3 -3
- package/plugins/context.js +5 -14
- package/plugins/context.js.map +1 -1
- package/plugins/graphql/changeRequest.gql.d.ts +1 -1
- package/plugins/graphql/changeRequest.gql.js +16 -13
- package/plugins/graphql/changeRequest.gql.js.map +1 -1
- package/plugins/graphql/comment.gql.d.ts +1 -1
- package/plugins/graphql/comment.gql.js +41 -36
- package/plugins/graphql/comment.gql.js.map +1 -1
- package/plugins/graphql/contentReview.gql.d.ts +1 -1
- package/plugins/graphql/contentReview.gql.js +26 -17
- package/plugins/graphql/contentReview.gql.js.map +1 -1
- package/plugins/graphql/reviewer.gql.d.ts +1 -1
- package/plugins/graphql/reviewer.gql.js +15 -13
- package/plugins/graphql/reviewer.gql.js.map +1 -1
- package/plugins/graphql/utils.d.ts +2 -0
- package/plugins/graphql/utils.js +10 -0
- package/plugins/graphql/utils.js.map +1 -0
- package/plugins/graphql/workflow.gql.d.ts +1 -1
- package/plugins/graphql/workflow.gql.js +15 -13
- package/plugins/graphql/workflow.gql.js.map +1 -1
- package/plugins/graphql.d.ts +1 -1
- package/plugins/graphql.js +4 -2
- package/plugins/graphql.js.map +1 -1
- package/plugins/hooks/createReviewerFromIdentity.d.ts +1 -1
- package/plugins/hooks/createReviewerFromIdentity.js +4 -2
- package/plugins/hooks/createReviewerFromIdentity.js.map +1 -1
- package/plugins/hooks/deleteChangeRequestsAfterContentReview.d.ts +1 -1
- package/plugins/hooks/deleteChangeRequestsAfterContentReview.js +3 -1
- package/plugins/hooks/deleteChangeRequestsAfterContentReview.js.map +1 -1
- package/plugins/hooks/deleteCommentsAfterChangeRequest.d.ts +1 -1
- package/plugins/hooks/deleteCommentsAfterChangeRequest.js +3 -1
- package/plugins/hooks/deleteCommentsAfterChangeRequest.js.map +1 -1
- package/plugins/hooks/index.d.ts +1 -1
- package/plugins/hooks/index.js +3 -1
- package/plugins/hooks/index.js.map +1 -1
- package/plugins/hooks/initializeContentReviewSteps.d.ts +1 -1
- package/plugins/hooks/initializeContentReviewSteps.js +6 -4
- package/plugins/hooks/initializeContentReviewSteps.js.map +1 -1
- package/plugins/hooks/initializeNotifications.d.ts +1 -1
- package/plugins/hooks/initializeNotifications.js +3 -1
- package/plugins/hooks/initializeNotifications.js.map +1 -1
- package/plugins/hooks/listContentReviews.d.ts +3 -3
- package/plugins/hooks/listContentReviews.js +4 -2
- package/plugins/hooks/listContentReviews.js.map +1 -1
- package/plugins/hooks/notifications/changeRequestAfterCreate.d.ts +1 -1
- package/plugins/hooks/notifications/changeRequestAfterCreate.js +8 -11
- package/plugins/hooks/notifications/changeRequestAfterCreate.js.map +1 -1
- package/plugins/hooks/notifications/changeRequestUrl.js +3 -1
- package/plugins/hooks/notifications/changeRequestUrl.js.map +1 -1
- package/plugins/hooks/notifications/commentAfterCreate.d.ts +1 -1
- package/plugins/hooks/notifications/commentAfterCreate.js +8 -11
- package/plugins/hooks/notifications/commentAfterCreate.js.map +1 -1
- package/plugins/hooks/notifications/commentUrl.js +3 -1
- package/plugins/hooks/notifications/commentUrl.js.map +1 -1
- package/plugins/hooks/notifications/contentReviewAfterCreate.d.ts +1 -1
- package/plugins/hooks/notifications/contentReviewAfterCreate.js +9 -12
- package/plugins/hooks/notifications/contentReviewAfterCreate.js.map +1 -1
- package/plugins/hooks/notifications/contentReviewUrl.js +3 -1
- package/plugins/hooks/notifications/contentReviewUrl.js.map +1 -1
- package/plugins/hooks/notifications/contentUrl.d.ts +2 -2
- package/plugins/hooks/notifications/contentUrl.js +3 -1
- package/plugins/hooks/notifications/contentUrl.js.map +1 -1
- package/plugins/hooks/notifications/getAppUrl.d.ts +2 -0
- package/plugins/hooks/notifications/getAppUrl.js +19 -0
- package/plugins/hooks/notifications/getAppUrl.js.map +1 -0
- package/plugins/hooks/notifications/lastChangeRequestNotificationPlugin.d.ts +1 -1
- package/plugins/hooks/notifications/lastChangeRequestNotificationPlugin.js +3 -1
- package/plugins/hooks/notifications/lastChangeRequestNotificationPlugin.js.map +1 -1
- package/plugins/hooks/notifications/lastCommentNotificationPlugin.d.ts +1 -1
- package/plugins/hooks/notifications/lastCommentNotificationPlugin.js +3 -1
- package/plugins/hooks/notifications/lastCommentNotificationPlugin.js.map +1 -1
- package/plugins/hooks/notifications/lastContentReviewNotificationPlugin.d.ts +1 -1
- package/plugins/hooks/notifications/lastContentReviewNotificationPlugin.js +3 -1
- package/plugins/hooks/notifications/lastContentReviewNotificationPlugin.js.map +1 -1
- package/plugins/hooks/notifications/reviewers.d.ts +1 -1
- package/plugins/hooks/notifications/reviewers.js +18 -15
- package/plugins/hooks/notifications/reviewers.js.map +1 -1
- package/plugins/hooks/notifications/sendChangeRequestNotification.d.ts +1 -1
- package/plugins/hooks/notifications/sendChangeRequestNotification.js +3 -1
- package/plugins/hooks/notifications/sendChangeRequestNotification.js.map +1 -1
- package/plugins/hooks/notifications/sendCommentNotification.d.ts +1 -1
- package/plugins/hooks/notifications/sendCommentNotification.js +3 -1
- package/plugins/hooks/notifications/sendCommentNotification.js.map +1 -1
- package/plugins/hooks/notifications/sendContentReviewNotification.d.ts +1 -1
- package/plugins/hooks/notifications/sendContentReviewNotification.js +3 -1
- package/plugins/hooks/notifications/sendContentReviewNotification.js.map +1 -1
- package/plugins/hooks/updatePendingChangeRequests.d.ts +1 -1
- package/plugins/hooks/updatePendingChangeRequests.js +8 -6
- package/plugins/hooks/updatePendingChangeRequests.js.map +1 -1
- package/plugins/hooks/updateTotalComments.d.ts +1 -1
- package/plugins/hooks/updateTotalComments.js +22 -15
- package/plugins/hooks/updateTotalComments.js.map +1 -1
- package/plugins/hooks/validateChangeRequest.d.ts +1 -1
- package/plugins/hooks/validateChangeRequest.js +3 -1
- package/plugins/hooks/validateChangeRequest.js.map +1 -1
- package/plugins/hooks/validateComment.d.ts +1 -1
- package/plugins/hooks/validateComment.js +3 -1
- package/plugins/hooks/validateComment.js.map +1 -1
- package/plugins/hooks/validateContentReview.d.ts +1 -1
- package/plugins/hooks/validateContentReview.js +3 -1
- package/plugins/hooks/validateContentReview.js.map +1 -1
- package/plugins/utils.d.ts +7 -6
- package/plugins/utils.js +12 -8
- package/plugins/utils.js.map +1 -1
- package/scheduler/createScheduleActionMethods.d.ts +1 -1
- package/scheduler/createScheduleActionMethods.js +105 -66
- package/scheduler/createScheduleActionMethods.js.map +1 -1
- package/scheduler/handlers/executeAction/index.d.ts +2 -2
- package/scheduler/handlers/executeAction/index.js +30 -9
- package/scheduler/handlers/executeAction/index.js.map +1 -1
- package/scheduler/handlers/executeAction/plugins/ApplicationGraphQL.js +5 -4
- package/scheduler/handlers/executeAction/plugins/ApplicationGraphQL.js.map +1 -1
- package/scheduler/handlers/executeAction/plugins/HeadlessCMSGraphQL.d.ts +2 -1
- package/scheduler/handlers/executeAction/plugins/HeadlessCMSGraphQL.js +6 -7
- package/scheduler/handlers/executeAction/plugins/HeadlessCMSGraphQL.js.map +1 -1
- package/scheduler/handlers/executeAction/plugins/PageBuilderGraphQL.d.ts +3 -2
- package/scheduler/handlers/executeAction/plugins/PageBuilderGraphQL.js +4 -7
- package/scheduler/handlers/executeAction/plugins/PageBuilderGraphQL.js.map +1 -1
- package/scheduler/handlers/executeAction/security.d.ts +2 -2
- package/scheduler/handlers/executeAction/security.js +3 -1
- package/scheduler/handlers/executeAction/security.js.map +1 -1
- package/scheduler/handlers/scheduleAction/index.d.ts +2 -2
- package/scheduler/handlers/scheduleAction/index.js +20 -15
- package/scheduler/handlers/scheduleAction/index.js.map +1 -1
- package/scheduler/handlers/scheduleAction/scheduleAction.utils.d.ts +3 -3
- package/scheduler/handlers/scheduleAction/scheduleAction.utils.js +19 -14
- package/scheduler/handlers/scheduleAction/scheduleAction.utils.js.map +1 -1
- package/scheduler/handlers/utils.d.ts +2 -3
- package/scheduler/handlers/utils.js +20 -13
- package/scheduler/handlers/utils.js.map +1 -1
- package/scheduler/index.d.ts +1 -1
- package/scheduler/index.js +3 -1
- package/scheduler/index.js.map +1 -1
- package/scheduler/types.d.ts +20 -36
- package/scheduler/types.js +11 -17
- package/scheduler/types.js.map +1 -1
- package/storageOperations/changeRequestStorageOperations.d.ts +2 -2
- package/storageOperations/changeRequestStorageOperations.js +44 -23
- package/storageOperations/changeRequestStorageOperations.js.map +1 -1
- package/storageOperations/commentStorageOperations.d.ts +3 -3
- package/storageOperations/commentStorageOperations.js +17 -24
- package/storageOperations/commentStorageOperations.js.map +1 -1
- package/storageOperations/contentReviewStorageOperations.d.ts +3 -3
- package/storageOperations/contentReviewStorageOperations.js +20 -25
- package/storageOperations/contentReviewStorageOperations.js.map +1 -1
- package/storageOperations/index.d.ts +3 -9
- package/storageOperations/index.js +11 -16
- package/storageOperations/index.js.map +1 -1
- package/storageOperations/models/changeRequest.model.d.ts +1 -2
- package/storageOperations/models/changeRequest.model.js +10 -11
- package/storageOperations/models/changeRequest.model.js.map +1 -1
- package/storageOperations/models/comment.model.d.ts +1 -2
- package/storageOperations/models/comment.model.js +10 -11
- package/storageOperations/models/comment.model.js.map +1 -1
- package/storageOperations/models/contentReview.model.d.ts +1 -2
- package/storageOperations/models/contentReview.model.js +16 -15
- package/storageOperations/models/contentReview.model.js.map +1 -1
- package/storageOperations/models/index.d.ts +1 -1
- package/storageOperations/models/index.js +11 -31
- package/storageOperations/models/index.js.map +1 -1
- package/storageOperations/models/reviewer.model.d.ts +1 -2
- package/storageOperations/models/reviewer.model.js +11 -12
- package/storageOperations/models/reviewer.model.js.map +1 -1
- package/storageOperations/models/utils.d.ts +2 -2
- package/storageOperations/models/utils.js +3 -1
- package/storageOperations/models/utils.js.map +1 -1
- package/storageOperations/models/workflow.model.d.ts +2 -3
- package/storageOperations/models/workflow.model.js +22 -23
- package/storageOperations/models/workflow.model.js.map +1 -1
- package/storageOperations/reviewerStorageOperations.d.ts +3 -3
- package/storageOperations/reviewerStorageOperations.js +24 -34
- package/storageOperations/reviewerStorageOperations.js.map +1 -1
- package/storageOperations/types.d.ts +2 -2
- package/storageOperations/types.js +3 -1
- package/storageOperations/types.js.map +1 -1
- package/storageOperations/workflowStorageOperations.d.ts +2 -2
- package/storageOperations/workflowStorageOperations.js +25 -28
- package/storageOperations/workflowStorageOperations.js.map +1 -1
- package/types.d.ts +49 -64
- package/types.js +121 -29
- package/types.js.map +1 -1
- package/utils/contentApwSettingsPlugin.d.ts +2 -2
- package/utils/contentApwSettingsPlugin.js +3 -1
- package/utils/contentApwSettingsPlugin.js.map +1 -1
- package/utils/errors.js +3 -1
- package/utils/errors.js.map +1 -1
- package/utils/fieldResolver.d.ts +2 -2
- package/utils/fieldResolver.js +7 -7
- package/utils/fieldResolver.js.map +1 -1
- package/utils/pickEntryFieldValues.d.ts +3 -0
- package/utils/pickEntryFieldValues.js +30 -0
- package/utils/pickEntryFieldValues.js.map +1 -0
- package/utils/resolve.js +3 -1
- package/utils/resolve.js.map +1 -1
- package/plugins/hooks/notifications/appUrl.d.ts +0 -2
- package/plugins/hooks/notifications/appUrl.js +0 -18
- package/plugins/hooks/notifications/appUrl.js.map +0 -1
- package/plugins/pageBuilder/PageApwSettingsGetterPlugin.d.ts +0 -9
- package/plugins/pageBuilder/PageApwSettingsGetterPlugin.js +0 -36
- package/plugins/pageBuilder/PageApwSettingsGetterPlugin.js.map +0 -1
- package/plugins/pageBuilder/apwContentPagePlugins.d.ts +0 -3
- package/plugins/pageBuilder/apwContentPagePlugins.js +0 -26
- package/plugins/pageBuilder/apwContentPagePlugins.js.map +0 -1
- package/plugins/pageBuilder/extendPbPageSettingsSchema.d.ts +0 -3
- package/plugins/pageBuilder/extendPbPageSettingsSchema.js +0 -20
- package/plugins/pageBuilder/extendPbPageSettingsSchema.js.map +0 -1
- package/plugins/pageBuilder/index.d.ts +0 -11
- package/plugins/pageBuilder/index.js +0 -42
- package/plugins/pageBuilder/index.js.map +0 -1
- package/plugins/pageBuilder/linkContentReviewToPage.d.ts +0 -8
- package/plugins/pageBuilder/linkContentReviewToPage.js +0 -89
- package/plugins/pageBuilder/linkContentReviewToPage.js.map +0 -1
- package/plugins/pageBuilder/linkWorkflowToPage.d.ts +0 -8
- package/plugins/pageBuilder/linkWorkflowToPage.js +0 -164
- package/plugins/pageBuilder/linkWorkflowToPage.js.map +0 -1
- package/plugins/pageBuilder/notifications/changeRequestNotification.d.ts +0 -1
- package/plugins/pageBuilder/notifications/changeRequestNotification.js +0 -31
- package/plugins/pageBuilder/notifications/changeRequestNotification.js.map +0 -1
- package/plugins/pageBuilder/notifications/commentNotification.d.ts +0 -1
- package/plugins/pageBuilder/notifications/commentNotification.js +0 -31
- package/plugins/pageBuilder/notifications/commentNotification.js.map +0 -1
- package/plugins/pageBuilder/notifications/contentReviewNotification.d.ts +0 -1
- package/plugins/pageBuilder/notifications/contentReviewNotification.js +0 -31
- package/plugins/pageBuilder/notifications/contentReviewNotification.js.map +0 -1
- package/plugins/pageBuilder/notifications/contentUrl.d.ts +0 -1
- package/plugins/pageBuilder/notifications/contentUrl.js +0 -47
- package/plugins/pageBuilder/notifications/contentUrl.js.map +0 -1
- package/plugins/pageBuilder/triggerContentReview.d.ts +0 -8
- package/plugins/pageBuilder/triggerContentReview.js +0 -39
- package/plugins/pageBuilder/triggerContentReview.js.map +0 -1
- package/plugins/pageBuilder/updateContentReviewStatus.d.ts +0 -10
- package/plugins/pageBuilder/updateContentReviewStatus.js +0 -67
- package/plugins/pageBuilder/updateContentReviewStatus.js.map +0 -1
- package/plugins/pageBuilder/utils.d.ts +0 -22
- package/plugins/pageBuilder/utils.js +0 -150
- package/plugins/pageBuilder/utils.js.map +0 -1
- package/storageOperations/models/contentModelPluginFactory.d.ts +0 -8
- package/storageOperations/models/contentModelPluginFactory.js +0 -19
- package/storageOperations/models/contentModelPluginFactory.js.map +0 -1
@@ -17,4 +17,6 @@ const getContentApwSettingsPlugin = params => {
|
|
17
17
|
}
|
18
18
|
throw new _handlerGraphql.NotFoundError(`Could not find a "ContentApwSettingsPlugin" for "${type}".`);
|
19
19
|
};
|
20
|
-
exports.getContentApwSettingsPlugin = getContentApwSettingsPlugin;
|
20
|
+
exports.getContentApwSettingsPlugin = getContentApwSettingsPlugin;
|
21
|
+
|
22
|
+
//# sourceMappingURL=contentApwSettingsPlugin.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["getContentApwSettingsPlugin","params","type","plugins","plugin","byType","ContentApwSettingsPlugin","find","p","canUse","NotFoundError"],"sources":["contentApwSettingsPlugin.ts"],"sourcesContent":["import { ApwContentTypes } from \"~/types\";\nimport { PluginsContainer } from \"@webiny/plugins\";\nimport { ContentApwSettingsPlugin } from \"~/ContentApwSettingsPlugin\";\nimport { NotFoundError } from \"@webiny/handler-graphql\";\n\ninterface GetContentApwSettingsPluginParams {\n type: ApwContentTypes;\n plugins: PluginsContainer;\n}\nexport const getContentApwSettingsPlugin = <\n T extends ContentApwSettingsPlugin = ContentApwSettingsPlugin\n>(\n params: GetContentApwSettingsPluginParams\n): T => {\n const { type, plugins } = params;\n const plugin = plugins.byType<T>(ContentApwSettingsPlugin.type).find(p => p.canUse(type));\n if (plugin) {\n return plugin;\n }\n throw new NotFoundError(`Could not find a \"ContentApwSettingsPlugin\" for \"${type}\".`);\n};\n"],"mappings":";;;;;;AAEA;AACA;AAMO,
|
1
|
+
{"version":3,"names":["_ContentApwSettingsPlugin","require","_handlerGraphql","getContentApwSettingsPlugin","params","type","plugins","plugin","byType","ContentApwSettingsPlugin","find","p","canUse","NotFoundError","exports"],"sources":["contentApwSettingsPlugin.ts"],"sourcesContent":["import type { ApwContentTypes } from \"~/types\";\nimport type { PluginsContainer } from \"@webiny/plugins\";\nimport { ContentApwSettingsPlugin } from \"~/ContentApwSettingsPlugin\";\nimport { NotFoundError } from \"@webiny/handler-graphql\";\n\ninterface GetContentApwSettingsPluginParams {\n type: ApwContentTypes;\n plugins: PluginsContainer;\n}\nexport const getContentApwSettingsPlugin = <\n T extends ContentApwSettingsPlugin = ContentApwSettingsPlugin\n>(\n params: GetContentApwSettingsPluginParams\n): T => {\n const { type, plugins } = params;\n const plugin = plugins.byType<T>(ContentApwSettingsPlugin.type).find(p => p.canUse(type));\n if (plugin) {\n return plugin;\n }\n throw new NotFoundError(`Could not find a \"ContentApwSettingsPlugin\" for \"${type}\".`);\n};\n"],"mappings":";;;;;;AAEA,IAAAA,yBAAA,GAAAC,OAAA;AACA,IAAAC,eAAA,GAAAD,OAAA;AAMO,MAAME,2BAA2B,GAGpCC,MAAyC,IACrC;EACJ,MAAM;IAAEC,IAAI;IAAEC;EAAQ,CAAC,GAAGF,MAAM;EAChC,MAAMG,MAAM,GAAGD,OAAO,CAACE,MAAM,CAAIC,kDAAwB,CAACJ,IAAI,CAAC,CAACK,IAAI,CAACC,CAAC,IAAIA,CAAC,CAACC,MAAM,CAACP,IAAI,CAAC,CAAC;EACzF,IAAIE,MAAM,EAAE;IACR,OAAOA,MAAM;EACjB;EACA,MAAM,IAAIM,6BAAa,CAAC,oDAAoDR,IAAI,IAAI,CAAC;AACzF,CAAC;AAACS,OAAA,CAAAX,2BAAA,GAAAA,2BAAA","ignoreList":[]}
|
package/utils/errors.js
CHANGED
package/utils/errors.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["NotAuthorizedError","Error","constructor","data","code","message","StepMissingError","PendingChangeRequestsError","StepInActiveError","NoSignOffProvidedError"],"sources":["errors.ts"],"sourcesContent":["import Error from \"@webiny/error\";\n\nexport class NotAuthorizedError extends Error {\n constructor(data: Record<string, any>) {\n super({\n code: \"NOT_AUTHORISED\",\n message: `Not a reviewer, couldn't provide sign-off.`,\n data: data || null\n });\n }\n}\n\nexport class StepMissingError extends Error {\n constructor(data: Record<string, any>) {\n super({\n code: \"MISSING_STEP\",\n message: `Please complete previous steps first.`,\n data: data || null\n });\n }\n}\n\nexport class PendingChangeRequestsError extends Error {\n constructor(data: Record<string, any>) {\n super({\n code: \"PENDING_CHANGE_REQUESTS\",\n message: `Change requests are pending couldn't provide sign-off.`,\n data: data || null\n });\n }\n}\n\nexport class StepInActiveError extends Error {\n constructor(data: Record<string, any>) {\n super({\n code: \"STEP_NOT_ACTIVE\",\n message: `Step needs to be in active state before providing sign-off.`,\n data: data || null\n });\n }\n}\n\nexport class NoSignOffProvidedError extends Error {\n constructor(data: Record<string, any>) {\n super({\n code: \"NO_SIGN_OFF_PROVIDED\",\n message: `Sign-off must be provided in order for it to be retracted.`,\n data: data || null\n });\n }\n}\n"],"mappings":";;;;;;;AAAA;AAEO,
|
1
|
+
{"version":3,"names":["_error","_interopRequireDefault","require","NotAuthorizedError","Error","constructor","data","code","message","exports","StepMissingError","PendingChangeRequestsError","StepInActiveError","NoSignOffProvidedError"],"sources":["errors.ts"],"sourcesContent":["import Error from \"@webiny/error\";\n\nexport class NotAuthorizedError extends Error {\n constructor(data: Record<string, any>) {\n super({\n code: \"NOT_AUTHORISED\",\n message: `Not a reviewer, couldn't provide sign-off.`,\n data: data || null\n });\n }\n}\n\nexport class StepMissingError extends Error {\n constructor(data: Record<string, any>) {\n super({\n code: \"MISSING_STEP\",\n message: `Please complete previous steps first.`,\n data: data || null\n });\n }\n}\n\nexport class PendingChangeRequestsError extends Error {\n constructor(data: Record<string, any>) {\n super({\n code: \"PENDING_CHANGE_REQUESTS\",\n message: `Change requests are pending couldn't provide sign-off.`,\n data: data || null\n });\n }\n}\n\nexport class StepInActiveError extends Error {\n constructor(data: Record<string, any>) {\n super({\n code: \"STEP_NOT_ACTIVE\",\n message: `Step needs to be in active state before providing sign-off.`,\n data: data || null\n });\n }\n}\n\nexport class NoSignOffProvidedError extends Error {\n constructor(data: Record<string, any>) {\n super({\n code: \"NO_SIGN_OFF_PROVIDED\",\n message: `Sign-off must be provided in order for it to be retracted.`,\n data: data || null\n });\n }\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEO,MAAMC,kBAAkB,SAASC,cAAK,CAAC;EAC1CC,WAAWA,CAACC,IAAyB,EAAE;IACnC,KAAK,CAAC;MACFC,IAAI,EAAE,gBAAgB;MACtBC,OAAO,EAAE,4CAA4C;MACrDF,IAAI,EAAEA,IAAI,IAAI;IAClB,CAAC,CAAC;EACN;AACJ;AAACG,OAAA,CAAAN,kBAAA,GAAAA,kBAAA;AAEM,MAAMO,gBAAgB,SAASN,cAAK,CAAC;EACxCC,WAAWA,CAACC,IAAyB,EAAE;IACnC,KAAK,CAAC;MACFC,IAAI,EAAE,cAAc;MACpBC,OAAO,EAAE,uCAAuC;MAChDF,IAAI,EAAEA,IAAI,IAAI;IAClB,CAAC,CAAC;EACN;AACJ;AAACG,OAAA,CAAAC,gBAAA,GAAAA,gBAAA;AAEM,MAAMC,0BAA0B,SAASP,cAAK,CAAC;EAClDC,WAAWA,CAACC,IAAyB,EAAE;IACnC,KAAK,CAAC;MACFC,IAAI,EAAE,yBAAyB;MAC/BC,OAAO,EAAE,wDAAwD;MACjEF,IAAI,EAAEA,IAAI,IAAI;IAClB,CAAC,CAAC;EACN;AACJ;AAACG,OAAA,CAAAE,0BAAA,GAAAA,0BAAA;AAEM,MAAMC,iBAAiB,SAASR,cAAK,CAAC;EACzCC,WAAWA,CAACC,IAAyB,EAAE;IACnC,KAAK,CAAC;MACFC,IAAI,EAAE,iBAAiB;MACvBC,OAAO,EAAE,6DAA6D;MACtEF,IAAI,EAAEA,IAAI,IAAI;IAClB,CAAC,CAAC;EACN;AACJ;AAACG,OAAA,CAAAG,iBAAA,GAAAA,iBAAA;AAEM,MAAMC,sBAAsB,SAAST,cAAK,CAAC;EAC9CC,WAAWA,CAACC,IAAyB,EAAE;IACnC,KAAK,CAAC;MACFC,IAAI,EAAE,sBAAsB;MAC5BC,OAAO,EAAE,4DAA4D;MACrEF,IAAI,EAAEA,IAAI,IAAI;IAClB,CAAC,CAAC;EACN;AACJ;AAACG,OAAA,CAAAI,sBAAA,GAAAA,sBAAA","ignoreList":[]}
|
package/utils/fieldResolver.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import { CmsContext, CmsEntry, CmsModel } from "@webiny/api-headless-cms/types";
|
2
|
-
import { ApwBaseFields } from "../types";
|
1
|
+
import type { CmsContext, CmsEntry, CmsModel } from "@webiny/api-headless-cms/types";
|
2
|
+
import type { ApwBaseFields } from "../types";
|
3
3
|
interface Transformer {
|
4
4
|
fieldId: keyof ApwBaseFields;
|
5
5
|
model: any;
|
package/utils/fieldResolver.js
CHANGED
@@ -1,21 +1,19 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
5
4
|
value: true
|
6
5
|
});
|
7
6
|
exports.getTransformer = exports.getFieldValues = void 0;
|
8
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
9
|
-
var _pick = _interopRequireDefault(require("lodash/pick"));
|
10
7
|
var _apiHeadlessCms = require("@webiny/api-headless-cms");
|
8
|
+
var _pickEntryFieldValues = require("./pickEntryFieldValues");
|
11
9
|
const getFieldValues = async params => {
|
12
10
|
const {
|
13
11
|
entry,
|
14
12
|
context,
|
15
|
-
transformers = []
|
16
|
-
fields
|
13
|
+
transformers = []
|
17
14
|
} = params;
|
18
|
-
const values = (0,
|
15
|
+
const values = (0, _pickEntryFieldValues.pickEntryFieldValues)(entry);
|
16
|
+
|
19
17
|
/**
|
20
18
|
* Transform field value for each transformers.
|
21
19
|
*/
|
@@ -41,4 +39,6 @@ const getTransformer = (model, fieldId) => ({
|
|
41
39
|
model: model,
|
42
40
|
field: model.fields.find(field => field.fieldId === fieldId)
|
43
41
|
});
|
44
|
-
exports.getTransformer = getTransformer;
|
42
|
+
exports.getTransformer = getTransformer;
|
43
|
+
|
44
|
+
//# sourceMappingURL=fieldResolver.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["getFieldValues","params","entry","context","transformers","
|
1
|
+
{"version":3,"names":["_apiHeadlessCms","require","_pickEntryFieldValues","getFieldValues","params","entry","context","transformers","values","pickEntryFieldValues","transformer","fieldId","model","field","entryFieldFromStorageTransform","value","exports","getTransformer","fields","find"],"sources":["fieldResolver.ts"],"sourcesContent":["import type { CmsContext, CmsEntry, CmsModel } from \"@webiny/api-headless-cms/types\";\nimport { entryFieldFromStorageTransform } from \"@webiny/api-headless-cms\";\nimport type { ApwBaseFields } from \"~/types\";\nimport { pickEntryFieldValues } from \"~/utils/pickEntryFieldValues\";\n\ninterface Transformer {\n fieldId: keyof ApwBaseFields;\n model: any;\n field: any;\n}\n\ninterface GetFieldValuesParams {\n entry: CmsEntry;\n fields: string[];\n transformers?: Transformer[];\n context: CmsContext;\n}\n\nexport const getFieldValues = async <T extends ApwBaseFields>(\n params: GetFieldValuesParams\n): Promise<T> => {\n const { entry, context, transformers = [] } = params;\n\n const values = pickEntryFieldValues<T>(entry);\n\n /**\n * Transform field value for each transformers.\n */\n for (const transformer of transformers) {\n const { fieldId, model, field } = transformer;\n // Get transformed value (eg. data decompression)\n values[fieldId] = await entryFieldFromStorageTransform({\n context,\n model,\n field,\n value: values[fieldId]\n });\n }\n\n return values;\n};\n\nexport const getTransformer = (model: CmsModel, fieldId: string): Transformer => ({\n fieldId: fieldId as unknown as keyof ApwBaseFields,\n model: model,\n field: model.fields.find(field => field.fieldId === fieldId)\n});\n"],"mappings":";;;;;;AACA,IAAAA,eAAA,GAAAC,OAAA;AAEA,IAAAC,qBAAA,GAAAD,OAAA;AAeO,MAAME,cAAc,GAAG,MAC1BC,MAA4B,IACf;EACb,MAAM;IAAEC,KAAK;IAAEC,OAAO;IAAEC,YAAY,GAAG;EAAG,CAAC,GAAGH,MAAM;EAEpD,MAAMI,MAAM,GAAG,IAAAC,0CAAoB,EAAIJ,KAAK,CAAC;;EAE7C;AACJ;AACA;EACI,KAAK,MAAMK,WAAW,IAAIH,YAAY,EAAE;IACpC,MAAM;MAAEI,OAAO;MAAEC,KAAK;MAAEC;IAAM,CAAC,GAAGH,WAAW;IAC7C;IACAF,MAAM,CAACG,OAAO,CAAC,GAAG,MAAM,IAAAG,8CAA8B,EAAC;MACnDR,OAAO;MACPM,KAAK;MACLC,KAAK;MACLE,KAAK,EAAEP,MAAM,CAACG,OAAO;IACzB,CAAC,CAAC;EACN;EAEA,OAAOH,MAAM;AACjB,CAAC;AAACQ,OAAA,CAAAb,cAAA,GAAAA,cAAA;AAEK,MAAMc,cAAc,GAAGA,CAACL,KAAe,EAAED,OAAe,MAAmB;EAC9EA,OAAO,EAAEA,OAAyC;EAClDC,KAAK,EAAEA,KAAK;EACZC,KAAK,EAAED,KAAK,CAACM,MAAM,CAACC,IAAI,CAACN,KAAK,IAAIA,KAAK,CAACF,OAAO,KAAKA,OAAO;AAC/D,CAAC,CAAC;AAACK,OAAA,CAAAC,cAAA,GAAAA,cAAA","ignoreList":[]}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.baseFields = void 0;
|
7
|
+
exports.pickEntryFieldValues = pickEntryFieldValues;
|
8
|
+
const baseFields = exports.baseFields = [
|
9
|
+
// Entry ID is mapped to "id" (we don't use revisions with ACO entities).
|
10
|
+
"id", "createdOn", "modifiedOn", "savedOn", "createdBy", "modifiedBy", "savedBy"];
|
11
|
+
const pickBaseEntryFieldValues = entry => {
|
12
|
+
const pickedValues = {};
|
13
|
+
for (const fieldName of baseFields) {
|
14
|
+
const [srcFieldName, targetFieldName = srcFieldName] = fieldName.split(":");
|
15
|
+
if (srcFieldName in entry) {
|
16
|
+
Object.assign(pickedValues, {
|
17
|
+
[targetFieldName]: entry[srcFieldName]
|
18
|
+
});
|
19
|
+
}
|
20
|
+
}
|
21
|
+
return pickedValues;
|
22
|
+
};
|
23
|
+
function pickEntryFieldValues(entry) {
|
24
|
+
return {
|
25
|
+
...pickBaseEntryFieldValues(entry),
|
26
|
+
...entry.values
|
27
|
+
};
|
28
|
+
}
|
29
|
+
|
30
|
+
//# sourceMappingURL=pickEntryFieldValues.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["baseFields","exports","pickBaseEntryFieldValues","entry","pickedValues","fieldName","srcFieldName","targetFieldName","split","Object","assign","pickEntryFieldValues","values"],"sources":["pickEntryFieldValues.ts"],"sourcesContent":["import type { CmsEntry } from \"@webiny/api-headless-cms/types\";\n\nexport const baseFields = [\n // Entry ID is mapped to \"id\" (we don't use revisions with ACO entities).\n \"id\",\n\n \"createdOn\",\n \"modifiedOn\",\n \"savedOn\",\n \"createdBy\",\n \"modifiedBy\",\n \"savedBy\"\n];\n\nconst pickBaseEntryFieldValues = (entry: CmsEntry) => {\n const pickedValues: Partial<CmsEntry> = {};\n for (const fieldName of baseFields) {\n const [srcFieldName, targetFieldName = srcFieldName] = fieldName.split(\":\");\n if (srcFieldName in entry) {\n Object.assign(pickedValues, {\n [targetFieldName]: entry[srcFieldName as keyof CmsEntry]\n });\n }\n }\n\n return pickedValues;\n};\n\nexport function pickEntryFieldValues<T>(entry: CmsEntry): T {\n return {\n ...pickBaseEntryFieldValues(entry),\n ...entry.values\n } as T;\n}\n"],"mappings":";;;;;;;AAEO,MAAMA,UAAU,GAAAC,OAAA,CAAAD,UAAA,GAAG;AACtB;AACA,IAAI,EAEJ,WAAW,EACX,YAAY,EACZ,SAAS,EACT,WAAW,EACX,YAAY,EACZ,SAAS,CACZ;AAED,MAAME,wBAAwB,GAAIC,KAAe,IAAK;EAClD,MAAMC,YAA+B,GAAG,CAAC,CAAC;EAC1C,KAAK,MAAMC,SAAS,IAAIL,UAAU,EAAE;IAChC,MAAM,CAACM,YAAY,EAAEC,eAAe,GAAGD,YAAY,CAAC,GAAGD,SAAS,CAACG,KAAK,CAAC,GAAG,CAAC;IAC3E,IAAIF,YAAY,IAAIH,KAAK,EAAE;MACvBM,MAAM,CAACC,MAAM,CAACN,YAAY,EAAE;QACxB,CAACG,eAAe,GAAGJ,KAAK,CAACG,YAAY;MACzC,CAAC,CAAC;IACN;EACJ;EAEA,OAAOF,YAAY;AACvB,CAAC;AAEM,SAASO,oBAAoBA,CAAIR,KAAe,EAAK;EACxD,OAAO;IACH,GAAGD,wBAAwB,CAACC,KAAK,CAAC;IAClC,GAAGA,KAAK,CAACS;EACb,CAAC;AACL","ignoreList":[]}
|
package/utils/resolve.js
CHANGED
package/utils/resolve.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["fn","Response","e","ErrorResponse"],"sources":["resolve.ts"],"sourcesContent":["import { Response, ErrorResponse } from \"@webiny/handler-graphql\";\n\nexport default async (fn: () => Promise<any>) => {\n try {\n return new Response(await fn());\n } catch (e) {\n return new ErrorResponse(e);\n }\n};\n"],"mappings":";;;;;;AAAA;AAAkE,
|
1
|
+
{"version":3,"names":["_handlerGraphql","require","_default","fn","Response","e","ErrorResponse","exports","default"],"sources":["resolve.ts"],"sourcesContent":["import { Response, ErrorResponse } from \"@webiny/handler-graphql\";\n\nexport default async (fn: () => Promise<any>) => {\n try {\n return new Response(await fn());\n } catch (e) {\n return new ErrorResponse(e);\n }\n};\n"],"mappings":";;;;;;AAAA,IAAAA,eAAA,GAAAC,OAAA;AAAkE,IAAAC,QAAA,GAEnD,MAAOC,EAAsB,IAAK;EAC7C,IAAI;IACA,OAAO,IAAIC,wBAAQ,CAAC,MAAMD,EAAE,CAAC,CAAC,CAAC;EACnC,CAAC,CAAC,OAAOE,CAAC,EAAE;IACR,OAAO,IAAIC,6BAAa,CAACD,CAAC,CAAC;EAC/B;AACJ,CAAC;AAAAE,OAAA,CAAAC,OAAA,GAAAN,QAAA","ignoreList":[]}
|
@@ -1,18 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.getAppUrl = void 0;
|
7
|
-
const getAppUrl = async context => {
|
8
|
-
const tenant = context.tenancy.getCurrentTenant().id;
|
9
|
-
try {
|
10
|
-
return await context.settings.getSettings(tenant);
|
11
|
-
} catch (ex) {
|
12
|
-
if (ex.code !== "NOT_FOUND") {
|
13
|
-
throw ex;
|
14
|
-
}
|
15
|
-
}
|
16
|
-
return null;
|
17
|
-
};
|
18
|
-
exports.getAppUrl = getAppUrl;
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["getAppUrl","context","tenant","tenancy","getCurrentTenant","id","settings","getSettings","ex","code"],"sources":["appUrl.ts"],"sourcesContent":["import { ApwContext } from \"~/types\";\n\nexport const getAppUrl = async (context: ApwContext) => {\n const tenant = context.tenancy.getCurrentTenant().id;\n try {\n return await context.settings.getSettings(tenant);\n } catch (ex) {\n if (ex.code !== \"NOT_FOUND\") {\n throw ex;\n }\n }\n return null;\n};\n"],"mappings":";;;;;;AAEO,MAAMA,SAAS,GAAG,MAAOC,OAAmB,IAAK;EACpD,MAAMC,MAAM,GAAGD,OAAO,CAACE,OAAO,CAACC,gBAAgB,EAAE,CAACC,EAAE;EACpD,IAAI;IACA,OAAO,MAAMJ,OAAO,CAACK,QAAQ,CAACC,WAAW,CAACL,MAAM,CAAC;EACrD,CAAC,CAAC,OAAOM,EAAE,EAAE;IACT,IAAIA,EAAE,CAACC,IAAI,KAAK,WAAW,EAAE;MACzB,MAAMD,EAAE;IACZ;EACJ;EACA,OAAO,IAAI;AACf,CAAC;AAAC"}
|
@@ -1,9 +0,0 @@
|
|
1
|
-
import { ContentApwSettingsPlugin } from "../../ContentApwSettingsPlugin";
|
2
|
-
import { ApwContentTypes, PageWithWorkflow } from "../../types";
|
3
|
-
export declare class PageApwSettingsGetterPlugin extends ContentApwSettingsPlugin {
|
4
|
-
canUse(type: ApwContentTypes): boolean;
|
5
|
-
setWorkflowId(page: PageWithWorkflow, id: string | null): void;
|
6
|
-
getWorkflowId(page: PageWithWorkflow): string | null;
|
7
|
-
setContentReviewId(page: PageWithWorkflow, id: string | null): void;
|
8
|
-
getContentReviewId(page: PageWithWorkflow): string | null;
|
9
|
-
}
|
@@ -1,36 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
5
|
-
value: true
|
6
|
-
});
|
7
|
-
exports.PageApwSettingsGetterPlugin = void 0;
|
8
|
-
var _ContentApwSettingsPlugin = require("../../ContentApwSettingsPlugin");
|
9
|
-
var _types = require("../../types");
|
10
|
-
var _set = _interopRequireDefault(require("lodash/set"));
|
11
|
-
class PageApwSettingsGetterPlugin extends _ContentApwSettingsPlugin.ContentApwSettingsPlugin {
|
12
|
-
canUse(type) {
|
13
|
-
return type === _types.ApwContentTypes.PAGE;
|
14
|
-
}
|
15
|
-
setWorkflowId(page, id) {
|
16
|
-
page.settings = (0, _set.default)(page.settings || {}, "apw.workflowId", id);
|
17
|
-
}
|
18
|
-
getWorkflowId(page) {
|
19
|
-
var _page$settings$apw;
|
20
|
-
if (!page.settings) {
|
21
|
-
return null;
|
22
|
-
}
|
23
|
-
return ((_page$settings$apw = page.settings.apw) === null || _page$settings$apw === void 0 ? void 0 : _page$settings$apw.workflowId) || null;
|
24
|
-
}
|
25
|
-
setContentReviewId(page, id) {
|
26
|
-
page.settings = (0, _set.default)(page.settings || {}, "apw.contentReviewId", id);
|
27
|
-
}
|
28
|
-
getContentReviewId(page) {
|
29
|
-
var _page$settings$apw2;
|
30
|
-
if (!page.settings) {
|
31
|
-
return null;
|
32
|
-
}
|
33
|
-
return (_page$settings$apw2 = page.settings.apw) === null || _page$settings$apw2 === void 0 ? void 0 : _page$settings$apw2.contentReviewId;
|
34
|
-
}
|
35
|
-
}
|
36
|
-
exports.PageApwSettingsGetterPlugin = PageApwSettingsGetterPlugin;
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["PageApwSettingsGetterPlugin","ContentApwSettingsPlugin","canUse","type","ApwContentTypes","PAGE","setWorkflowId","page","id","settings","set","getWorkflowId","apw","workflowId","setContentReviewId","getContentReviewId","contentReviewId"],"sources":["PageApwSettingsGetterPlugin.ts"],"sourcesContent":["import { ContentApwSettingsPlugin } from \"~/ContentApwSettingsPlugin\";\nimport { ApwContentTypes, PageWithWorkflow } from \"~/types\";\nimport set from \"lodash/set\";\n\nexport class PageApwSettingsGetterPlugin extends ContentApwSettingsPlugin {\n public override canUse(type: ApwContentTypes): boolean {\n return type === ApwContentTypes.PAGE;\n }\n\n public override setWorkflowId(page: PageWithWorkflow, id: string | null) {\n page.settings = set(page.settings || {}, \"apw.workflowId\", id);\n }\n\n public override getWorkflowId(page: PageWithWorkflow): string | null {\n if (!page.settings) {\n return null;\n }\n return page.settings.apw?.workflowId || null;\n }\n\n public override setContentReviewId(page: PageWithWorkflow, id: string | null) {\n page.settings = set(page.settings || {}, \"apw.contentReviewId\", id);\n }\n\n public override getContentReviewId(page: PageWithWorkflow): string | null {\n if (!page.settings) {\n return null;\n }\n return page.settings.apw?.contentReviewId;\n }\n}\n"],"mappings":";;;;;;;AAAA;AACA;AACA;AAEO,MAAMA,2BAA2B,SAASC,kDAAwB,CAAC;EACtDC,MAAM,CAACC,IAAqB,EAAW;IACnD,OAAOA,IAAI,KAAKC,sBAAe,CAACC,IAAI;EACxC;EAEgBC,aAAa,CAACC,IAAsB,EAAEC,EAAiB,EAAE;IACrED,IAAI,CAACE,QAAQ,GAAG,IAAAC,YAAG,EAACH,IAAI,CAACE,QAAQ,IAAI,CAAC,CAAC,EAAE,gBAAgB,EAAED,EAAE,CAAC;EAClE;EAEgBG,aAAa,CAACJ,IAAsB,EAAiB;IAAA;IACjE,IAAI,CAACA,IAAI,CAACE,QAAQ,EAAE;MAChB,OAAO,IAAI;IACf;IACA,OAAO,uBAAAF,IAAI,CAACE,QAAQ,CAACG,GAAG,uDAAjB,mBAAmBC,UAAU,KAAI,IAAI;EAChD;EAEgBC,kBAAkB,CAACP,IAAsB,EAAEC,EAAiB,EAAE;IAC1ED,IAAI,CAACE,QAAQ,GAAG,IAAAC,YAAG,EAACH,IAAI,CAACE,QAAQ,IAAI,CAAC,CAAC,EAAE,qBAAqB,EAAED,EAAE,CAAC;EACvE;EAEgBO,kBAAkB,CAACR,IAAsB,EAAiB;IAAA;IACtE,IAAI,CAACA,IAAI,CAACE,QAAQ,EAAE;MAChB,OAAO,IAAI;IACf;IACA,8BAAOF,IAAI,CAACE,QAAQ,CAACG,GAAG,wDAAjB,oBAAmBI,eAAe;EAC7C;AACJ;AAAC"}
|
@@ -1,26 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.apwContentPagePlugins = void 0;
|
7
|
-
var _api = require("@webiny/api");
|
8
|
-
var _types = require("../../types");
|
9
|
-
const apwContentPagePlugins = () => new _api.ContextPlugin(async context => {
|
10
|
-
const {
|
11
|
-
apw,
|
12
|
-
pageBuilder
|
13
|
-
} = context;
|
14
|
-
apw.addContentGetter(_types.ApwContentTypes.PAGE, async id => {
|
15
|
-
return pageBuilder.getPage(id);
|
16
|
-
});
|
17
|
-
apw.addContentPublisher(_types.ApwContentTypes.PAGE, async id => {
|
18
|
-
await pageBuilder.publishPage(id);
|
19
|
-
return true;
|
20
|
-
});
|
21
|
-
apw.addContentUnPublisher(_types.ApwContentTypes.PAGE, async id => {
|
22
|
-
await pageBuilder.unpublishPage(id);
|
23
|
-
return true;
|
24
|
-
});
|
25
|
-
});
|
26
|
-
exports.apwContentPagePlugins = apwContentPagePlugins;
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["apwContentPagePlugins","ContextPlugin","context","apw","pageBuilder","addContentGetter","ApwContentTypes","PAGE","id","getPage","addContentPublisher","publishPage","addContentUnPublisher","unpublishPage"],"sources":["apwContentPagePlugins.ts"],"sourcesContent":["import { ContextPlugin } from \"@webiny/api\";\nimport { ApwContentTypes, ApwContext, PageWithWorkflow } from \"~/types\";\n\nexport const apwContentPagePlugins = () =>\n new ContextPlugin<ApwContext>(async context => {\n const { apw, pageBuilder } = context;\n\n apw.addContentGetter(ApwContentTypes.PAGE, async id => {\n return pageBuilder.getPage<PageWithWorkflow>(id);\n });\n\n apw.addContentPublisher(ApwContentTypes.PAGE, async id => {\n await pageBuilder.publishPage<PageWithWorkflow>(id);\n return true;\n });\n\n apw.addContentUnPublisher(ApwContentTypes.PAGE, async id => {\n await pageBuilder.unpublishPage<PageWithWorkflow>(id);\n return true;\n });\n });\n"],"mappings":";;;;;;AAAA;AACA;AAEO,MAAMA,qBAAqB,GAAG,MACjC,IAAIC,kBAAa,CAAa,MAAMC,OAAO,IAAI;EAC3C,MAAM;IAAEC,GAAG;IAAEC;EAAY,CAAC,GAAGF,OAAO;EAEpCC,GAAG,CAACE,gBAAgB,CAACC,sBAAe,CAACC,IAAI,EAAE,MAAMC,EAAE,IAAI;IACnD,OAAOJ,WAAW,CAACK,OAAO,CAAmBD,EAAE,CAAC;EACpD,CAAC,CAAC;EAEFL,GAAG,CAACO,mBAAmB,CAACJ,sBAAe,CAACC,IAAI,EAAE,MAAMC,EAAE,IAAI;IACtD,MAAMJ,WAAW,CAACO,WAAW,CAAmBH,EAAE,CAAC;IACnD,OAAO,IAAI;EACf,CAAC,CAAC;EAEFL,GAAG,CAACS,qBAAqB,CAACN,sBAAe,CAACC,IAAI,EAAE,MAAMC,EAAE,IAAI;IACxD,MAAMJ,WAAW,CAACS,aAAa,CAAmBL,EAAE,CAAC;IACrD,OAAO,IAAI;EACf,CAAC,CAAC;AACN,CAAC,CAAC;AAAC"}
|
@@ -1,20 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.extendPbPageSettingsSchema = void 0;
|
7
|
-
var _plugins = require("@webiny/handler-graphql/plugins");
|
8
|
-
const extendPbPageSettingsSchema = () => new _plugins.GraphQLSchemaPlugin({
|
9
|
-
typeDefs: /* GraphQL */`
|
10
|
-
type PbApwPageSettings {
|
11
|
-
workflowId: ID
|
12
|
-
contentReviewId: ID
|
13
|
-
}
|
14
|
-
|
15
|
-
extend type PbPageSettings {
|
16
|
-
apw: PbApwPageSettings
|
17
|
-
}
|
18
|
-
`
|
19
|
-
});
|
20
|
-
exports.extendPbPageSettingsSchema = extendPbPageSettingsSchema;
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["extendPbPageSettingsSchema","GraphQLSchemaPlugin","typeDefs"],"sources":["extendPbPageSettingsSchema.ts"],"sourcesContent":["import { GraphQLSchemaPlugin } from \"@webiny/handler-graphql/plugins\";\nimport { ApwContext } from \"~/types\";\n\nexport const extendPbPageSettingsSchema = () =>\n new GraphQLSchemaPlugin<ApwContext>({\n typeDefs: /* GraphQL */ `\n type PbApwPageSettings {\n workflowId: ID\n contentReviewId: ID\n }\n\n extend type PbPageSettings {\n apw: PbApwPageSettings\n }\n `\n });\n"],"mappings":";;;;;;AAAA;AAGO,MAAMA,0BAA0B,GAAG,MACtC,IAAIC,4BAAmB,CAAa;EAChCC,QAAQ,EAAE,aAAe;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACI,CAAC,CAAC;AAAC"}
|
@@ -1,11 +0,0 @@
|
|
1
|
-
import { Security } from "@webiny/api-security/types";
|
2
|
-
import { PageBuilderContextObject } from "@webiny/api-page-builder/graphql/types";
|
3
|
-
import { AdvancedPublishingWorkflow } from "../../types";
|
4
|
-
import { PluginsContainer } from "@webiny/plugins";
|
5
|
-
export interface ApwPageBuilderPluginsParams {
|
6
|
-
pageBuilder: PageBuilderContextObject;
|
7
|
-
apw: AdvancedPublishingWorkflow;
|
8
|
-
security: Security;
|
9
|
-
plugins: PluginsContainer;
|
10
|
-
}
|
11
|
-
export declare const apwPageBuilderHooks: (params: ApwPageBuilderPluginsParams) => void;
|
@@ -1,42 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.apwPageBuilderHooks = void 0;
|
7
|
-
var _triggerContentReview = require("./triggerContentReview");
|
8
|
-
var _linkContentReviewToPage = require("./linkContentReviewToPage");
|
9
|
-
var _updateContentReviewStatus = require("./updateContentReviewStatus");
|
10
|
-
var _linkWorkflowToPage = require("./linkWorkflowToPage");
|
11
|
-
var _PageApwSettingsGetterPlugin = require("./PageApwSettingsGetterPlugin");
|
12
|
-
var _commentNotification = require("./notifications/commentNotification");
|
13
|
-
var _contentUrl = require("./notifications/contentUrl");
|
14
|
-
var _changeRequestNotification = require("./notifications/changeRequestNotification");
|
15
|
-
var _contentReviewNotification = require("./notifications/contentReviewNotification");
|
16
|
-
const apwPageBuilderHooks = params => {
|
17
|
-
const {
|
18
|
-
pageBuilder,
|
19
|
-
apw,
|
20
|
-
security,
|
21
|
-
plugins
|
22
|
-
} = params;
|
23
|
-
plugins.register([new _PageApwSettingsGetterPlugin.PageApwSettingsGetterPlugin(), (0, _commentNotification.createCommentNotification)(), (0, _changeRequestNotification.createChangeRequestNotification)(), (0, _contentUrl.createContentUrlPlugin)(), (0, _contentReviewNotification.createContentReviewNotification)()]);
|
24
|
-
(0, _triggerContentReview.triggerContentReview)({
|
25
|
-
apw,
|
26
|
-
pageBuilder
|
27
|
-
});
|
28
|
-
(0, _linkContentReviewToPage.linkContentReviewToPage)({
|
29
|
-
apw,
|
30
|
-
pageBuilder
|
31
|
-
});
|
32
|
-
(0, _updateContentReviewStatus.updateContentReviewStatus)({
|
33
|
-
apw,
|
34
|
-
pageBuilder,
|
35
|
-
security
|
36
|
-
});
|
37
|
-
(0, _linkWorkflowToPage.linkWorkflowToPage)({
|
38
|
-
apw,
|
39
|
-
pageBuilder
|
40
|
-
});
|
41
|
-
};
|
42
|
-
exports.apwPageBuilderHooks = apwPageBuilderHooks;
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["apwPageBuilderHooks","params","pageBuilder","apw","security","plugins","register","PageApwSettingsGetterPlugin","createCommentNotification","createChangeRequestNotification","createContentUrlPlugin","createContentReviewNotification","triggerContentReview","linkContentReviewToPage","updateContentReviewStatus","linkWorkflowToPage"],"sources":["index.ts"],"sourcesContent":["import { Security } from \"@webiny/api-security/types\";\nimport { PageBuilderContextObject } from \"@webiny/api-page-builder/graphql/types\";\nimport { AdvancedPublishingWorkflow } from \"~/types\";\nimport { triggerContentReview } from \"./triggerContentReview\";\nimport { linkContentReviewToPage } from \"./linkContentReviewToPage\";\nimport { updateContentReviewStatus } from \"./updateContentReviewStatus\";\nimport { linkWorkflowToPage } from \"./linkWorkflowToPage\";\nimport { PluginsContainer } from \"@webiny/plugins\";\nimport { PageApwSettingsGetterPlugin } from \"~/plugins/pageBuilder/PageApwSettingsGetterPlugin\";\nimport { createCommentNotification } from \"./notifications/commentNotification\";\nimport { createContentUrlPlugin } from \"./notifications/contentUrl\";\nimport { createChangeRequestNotification } from \"./notifications/changeRequestNotification\";\nimport { createContentReviewNotification } from \"./notifications/contentReviewNotification\";\n\nexport interface ApwPageBuilderPluginsParams {\n pageBuilder: PageBuilderContextObject;\n apw: AdvancedPublishingWorkflow;\n security: Security;\n plugins: PluginsContainer;\n}\n\nexport const apwPageBuilderHooks = (params: ApwPageBuilderPluginsParams) => {\n const { pageBuilder, apw, security, plugins } = params;\n\n plugins.register([\n new PageApwSettingsGetterPlugin(),\n createCommentNotification(),\n createChangeRequestNotification(),\n createContentUrlPlugin(),\n createContentReviewNotification()\n ]);\n\n triggerContentReview({\n apw,\n pageBuilder\n });\n linkContentReviewToPage({\n apw,\n pageBuilder\n });\n updateContentReviewStatus({\n apw,\n pageBuilder,\n security\n });\n linkWorkflowToPage({\n apw,\n pageBuilder\n });\n};\n"],"mappings":";;;;;;AAGA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AASO,MAAMA,mBAAmB,GAAIC,MAAmC,IAAK;EACxE,MAAM;IAAEC,WAAW;IAAEC,GAAG;IAAEC,QAAQ;IAAEC;EAAQ,CAAC,GAAGJ,MAAM;EAEtDI,OAAO,CAACC,QAAQ,CAAC,CACb,IAAIC,wDAA2B,EAAE,EACjC,IAAAC,8CAAyB,GAAE,EAC3B,IAAAC,0DAA+B,GAAE,EACjC,IAAAC,kCAAsB,GAAE,EACxB,IAAAC,0DAA+B,GAAE,CACpC,CAAC;EAEF,IAAAC,0CAAoB,EAAC;IACjBT,GAAG;IACHD;EACJ,CAAC,CAAC;EACF,IAAAW,gDAAuB,EAAC;IACpBV,GAAG;IACHD;EACJ,CAAC,CAAC;EACF,IAAAY,oDAAyB,EAAC;IACtBX,GAAG;IACHD,WAAW;IACXE;EACJ,CAAC,CAAC;EACF,IAAAW,sCAAkB,EAAC;IACfZ,GAAG;IACHD;EACJ,CAAC,CAAC;AACN,CAAC;AAAC"}
|
@@ -1,8 +0,0 @@
|
|
1
|
-
import { AdvancedPublishingWorkflow } from "../../types";
|
2
|
-
import { PageBuilderContextObject } from "@webiny/api-page-builder/graphql/types";
|
3
|
-
interface LinkContentReviewToPageParams {
|
4
|
-
apw: AdvancedPublishingWorkflow;
|
5
|
-
pageBuilder: PageBuilderContextObject;
|
6
|
-
}
|
7
|
-
export declare const linkContentReviewToPage: (params: LinkContentReviewToPageParams) => void;
|
8
|
-
export {};
|
@@ -1,89 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
5
|
-
value: true
|
6
|
-
});
|
7
|
-
exports.linkContentReviewToPage = void 0;
|
8
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
9
|
-
var _error = _interopRequireDefault(require("@webiny/error"));
|
10
|
-
var _types = require("../../types");
|
11
|
-
var _utils = require("./utils");
|
12
|
-
const linkContentReviewToPage = params => {
|
13
|
-
const {
|
14
|
-
apw,
|
15
|
-
pageBuilder
|
16
|
-
} = params;
|
17
|
-
apw.contentReview.onContentReviewAfterCreate.subscribe(async ({
|
18
|
-
contentReview
|
19
|
-
}) => {
|
20
|
-
const {
|
21
|
-
content
|
22
|
-
} = contentReview;
|
23
|
-
if (content.type !== _types.ApwContentTypes.PAGE) {
|
24
|
-
return;
|
25
|
-
}
|
26
|
-
await (0, _utils.updatePageSettings)({
|
27
|
-
getPage: pageBuilder.getPage,
|
28
|
-
updatePage: pageBuilder.updatePage,
|
29
|
-
uniquePageId: content.id,
|
30
|
-
getNewSettings: settings => {
|
31
|
-
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, settings), {}, {
|
32
|
-
apw: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, settings.apw || {}), {}, {
|
33
|
-
contentReviewId: contentReview.id
|
34
|
-
})
|
35
|
-
});
|
36
|
-
}
|
37
|
-
});
|
38
|
-
});
|
39
|
-
apw.contentReview.onContentReviewAfterDelete.subscribe(async ({
|
40
|
-
contentReview
|
41
|
-
}) => {
|
42
|
-
const {
|
43
|
-
content
|
44
|
-
} = contentReview;
|
45
|
-
if (content.type !== _types.ApwContentTypes.PAGE) {
|
46
|
-
return;
|
47
|
-
}
|
48
|
-
await (0, _utils.updatePageSettings)({
|
49
|
-
getPage: pageBuilder.getPage,
|
50
|
-
updatePage: pageBuilder.updatePage,
|
51
|
-
uniquePageId: content.id,
|
52
|
-
getNewSettings: settings => {
|
53
|
-
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, settings), {}, {
|
54
|
-
apw: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, settings.apw || {}), {}, {
|
55
|
-
contentReviewId: null
|
56
|
-
})
|
57
|
-
});
|
58
|
-
}
|
59
|
-
});
|
60
|
-
});
|
61
|
-
pageBuilder.onPageBeforeDelete.subscribe(async ({
|
62
|
-
page
|
63
|
-
}) => {
|
64
|
-
var _page$settings, _page$settings$apw;
|
65
|
-
const contentReviewId = (_page$settings = page.settings) === null || _page$settings === void 0 ? void 0 : (_page$settings$apw = _page$settings.apw) === null || _page$settings$apw === void 0 ? void 0 : _page$settings$apw.contentReviewId;
|
66
|
-
if (!contentReviewId) {
|
67
|
-
return;
|
68
|
-
}
|
69
|
-
let contentReview;
|
70
|
-
try {
|
71
|
-
contentReview = await apw.contentReview.get(contentReviewId);
|
72
|
-
} catch (ex) {
|
73
|
-
/**
|
74
|
-
* We're handling the case whereby "contentReviewId" is still linked to page;
|
75
|
-
* even when the contentReview entry has been deleted. In that case, we'll allow page deletion.
|
76
|
-
*/
|
77
|
-
if (ex.code !== "NOT_FOUND") {
|
78
|
-
throw ex;
|
79
|
-
}
|
80
|
-
}
|
81
|
-
if (contentReview) {
|
82
|
-
throw new _error.default(`Cannot delete the page because a peer review has been requested. Please delete the review first.`, "CANNOT_DELETE_REVIEW_EXIST", {
|
83
|
-
contentReviewId,
|
84
|
-
page
|
85
|
-
});
|
86
|
-
}
|
87
|
-
});
|
88
|
-
};
|
89
|
-
exports.linkContentReviewToPage = linkContentReviewToPage;
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["linkContentReviewToPage","params","apw","pageBuilder","contentReview","onContentReviewAfterCreate","subscribe","content","type","ApwContentTypes","PAGE","updatePageSettings","getPage","updatePage","uniquePageId","id","getNewSettings","settings","contentReviewId","onContentReviewAfterDelete","onPageBeforeDelete","page","get","ex","code","Error"],"sources":["linkContentReviewToPage.ts"],"sourcesContent":["import Error from \"@webiny/error\";\nimport { AdvancedPublishingWorkflow, ApwContentTypes } from \"~/types\";\nimport { updatePageSettings } from \"./utils\";\nimport { PageBuilderContextObject } from \"@webiny/api-page-builder/graphql/types\";\n\ninterface LinkContentReviewToPageParams {\n apw: AdvancedPublishingWorkflow;\n pageBuilder: PageBuilderContextObject;\n}\n\nexport const linkContentReviewToPage = (params: LinkContentReviewToPageParams) => {\n const { apw, pageBuilder } = params;\n\n apw.contentReview.onContentReviewAfterCreate.subscribe(async ({ contentReview }) => {\n const { content } = contentReview;\n\n if (content.type !== ApwContentTypes.PAGE) {\n return;\n }\n await updatePageSettings({\n getPage: pageBuilder.getPage,\n updatePage: pageBuilder.updatePage,\n uniquePageId: content.id,\n getNewSettings: settings => {\n return {\n ...settings,\n apw: {\n ...(settings.apw || {}),\n contentReviewId: contentReview.id\n }\n };\n }\n });\n });\n\n apw.contentReview.onContentReviewAfterDelete.subscribe(async ({ contentReview }) => {\n const { content } = contentReview;\n\n if (content.type !== ApwContentTypes.PAGE) {\n return;\n }\n await updatePageSettings({\n getPage: pageBuilder.getPage,\n updatePage: pageBuilder.updatePage,\n uniquePageId: content.id,\n getNewSettings: settings => {\n return {\n ...settings,\n apw: {\n ...(settings.apw || {}),\n contentReviewId: null\n }\n };\n }\n });\n });\n\n pageBuilder.onPageBeforeDelete.subscribe(async ({ page }) => {\n const contentReviewId = page.settings?.apw?.contentReviewId;\n if (!contentReviewId) {\n return;\n }\n\n let contentReview;\n try {\n contentReview = await apw.contentReview.get(contentReviewId);\n } catch (ex) {\n /**\n * We're handling the case whereby \"contentReviewId\" is still linked to page;\n * even when the contentReview entry has been deleted. In that case, we'll allow page deletion.\n */\n if (ex.code !== \"NOT_FOUND\") {\n throw ex;\n }\n }\n\n if (contentReview) {\n throw new Error(\n `Cannot delete the page because a peer review has been requested. Please delete the review first.`,\n \"CANNOT_DELETE_REVIEW_EXIST\",\n {\n contentReviewId,\n page\n }\n );\n }\n });\n};\n"],"mappings":";;;;;;;;AAAA;AACA;AACA;AAQO,MAAMA,uBAAuB,GAAIC,MAAqC,IAAK;EAC9E,MAAM;IAAEC,GAAG;IAAEC;EAAY,CAAC,GAAGF,MAAM;EAEnCC,GAAG,CAACE,aAAa,CAACC,0BAA0B,CAACC,SAAS,CAAC,OAAO;IAAEF;EAAc,CAAC,KAAK;IAChF,MAAM;MAAEG;IAAQ,CAAC,GAAGH,aAAa;IAEjC,IAAIG,OAAO,CAACC,IAAI,KAAKC,sBAAe,CAACC,IAAI,EAAE;MACvC;IACJ;IACA,MAAM,IAAAC,yBAAkB,EAAC;MACrBC,OAAO,EAAET,WAAW,CAACS,OAAO;MAC5BC,UAAU,EAAEV,WAAW,CAACU,UAAU;MAClCC,YAAY,EAAEP,OAAO,CAACQ,EAAE;MACxBC,cAAc,EAAEC,QAAQ,IAAI;QACxB,mEACOA,QAAQ;UACXf,GAAG,8DACKe,QAAQ,CAACf,GAAG,IAAI,CAAC,CAAC;YACtBgB,eAAe,EAAEd,aAAa,CAACW;UAAE;QACpC;MAET;IACJ,CAAC,CAAC;EACN,CAAC,CAAC;EAEFb,GAAG,CAACE,aAAa,CAACe,0BAA0B,CAACb,SAAS,CAAC,OAAO;IAAEF;EAAc,CAAC,KAAK;IAChF,MAAM;MAAEG;IAAQ,CAAC,GAAGH,aAAa;IAEjC,IAAIG,OAAO,CAACC,IAAI,KAAKC,sBAAe,CAACC,IAAI,EAAE;MACvC;IACJ;IACA,MAAM,IAAAC,yBAAkB,EAAC;MACrBC,OAAO,EAAET,WAAW,CAACS,OAAO;MAC5BC,UAAU,EAAEV,WAAW,CAACU,UAAU;MAClCC,YAAY,EAAEP,OAAO,CAACQ,EAAE;MACxBC,cAAc,EAAEC,QAAQ,IAAI;QACxB,mEACOA,QAAQ;UACXf,GAAG,8DACKe,QAAQ,CAACf,GAAG,IAAI,CAAC,CAAC;YACtBgB,eAAe,EAAE;UAAI;QACxB;MAET;IACJ,CAAC,CAAC;EACN,CAAC,CAAC;EAEFf,WAAW,CAACiB,kBAAkB,CAACd,SAAS,CAAC,OAAO;IAAEe;EAAK,CAAC,KAAK;IAAA;IACzD,MAAMH,eAAe,qBAAGG,IAAI,CAACJ,QAAQ,yEAAb,eAAef,GAAG,uDAAlB,mBAAoBgB,eAAe;IAC3D,IAAI,CAACA,eAAe,EAAE;MAClB;IACJ;IAEA,IAAId,aAAa;IACjB,IAAI;MACAA,aAAa,GAAG,MAAMF,GAAG,CAACE,aAAa,CAACkB,GAAG,CAACJ,eAAe,CAAC;IAChE,CAAC,CAAC,OAAOK,EAAE,EAAE;MACT;AACZ;AACA;AACA;MACY,IAAIA,EAAE,CAACC,IAAI,KAAK,WAAW,EAAE;QACzB,MAAMD,EAAE;MACZ;IACJ;IAEA,IAAInB,aAAa,EAAE;MACf,MAAM,IAAIqB,cAAK,CACV,kGAAiG,EAClG,4BAA4B,EAC5B;QACIP,eAAe;QACfG;MACJ,CAAC,CACJ;IACL;EACJ,CAAC,CAAC;AACN,CAAC;AAAC"}
|
@@ -1,8 +0,0 @@
|
|
1
|
-
import { AdvancedPublishingWorkflow } from "../../types";
|
2
|
-
import { PageBuilderContextObject } from "@webiny/api-page-builder/graphql/types";
|
3
|
-
interface LinkWorkflowToPageParams {
|
4
|
-
apw: AdvancedPublishingWorkflow;
|
5
|
-
pageBuilder: PageBuilderContextObject;
|
6
|
-
}
|
7
|
-
export declare const linkWorkflowToPage: (params: LinkWorkflowToPageParams) => void;
|
8
|
-
export {};
|