@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.
Files changed (313) hide show
  1. package/ApwChangeRequestNotification.d.ts +1 -1
  2. package/ApwChangeRequestNotification.js +4 -6
  3. package/ApwChangeRequestNotification.js.map +1 -1
  4. package/ApwCommentNotification.d.ts +1 -1
  5. package/ApwCommentNotification.js +4 -6
  6. package/ApwCommentNotification.js.map +1 -1
  7. package/ApwContentReviewNotification.d.ts +1 -1
  8. package/ApwContentReviewNotification.js +4 -6
  9. package/ApwContentReviewNotification.js.map +1 -1
  10. package/ApwContentUrlPlugin.d.ts +1 -1
  11. package/ApwContentUrlPlugin.js +4 -6
  12. package/ApwContentUrlPlugin.js.map +1 -1
  13. package/ContentApwSettingsPlugin.d.ts +1 -1
  14. package/ContentApwSettingsPlugin.js +5 -4
  15. package/ContentApwSettingsPlugin.js.map +1 -1
  16. package/README.md +3 -3
  17. package/crud/createChangeRequestMethods.d.ts +1 -1
  18. package/crud/createChangeRequestMethods.js +3 -1
  19. package/crud/createChangeRequestMethods.js.map +1 -1
  20. package/crud/createCommentMethods.d.ts +1 -1
  21. package/crud/createCommentMethods.js +3 -1
  22. package/crud/createCommentMethods.js.map +1 -1
  23. package/crud/createContentReviewMethods.d.ts +2 -2
  24. package/crud/createContentReviewMethods.js +57 -32
  25. package/crud/createContentReviewMethods.js.map +1 -1
  26. package/crud/createReviewerMethods.d.ts +1 -1
  27. package/crud/createReviewerMethods.js +3 -1
  28. package/crud/createReviewerMethods.js.map +1 -1
  29. package/crud/createWorkflowMethods.d.ts +1 -1
  30. package/crud/createWorkflowMethods.js +3 -1
  31. package/crud/createWorkflowMethods.js.map +1 -1
  32. package/crud/index.d.ts +1 -1
  33. package/crud/index.js +6 -5
  34. package/crud/index.js.map +1 -1
  35. package/crud/utils.d.ts +2 -2
  36. package/crud/utils.js +8 -8
  37. package/crud/utils.js.map +1 -1
  38. package/index.d.ts +2 -2
  39. package/index.js +7 -6
  40. package/index.js.map +1 -1
  41. package/package.json +32 -50
  42. package/plugins/cms/CmsEntryApwSettingsGetterPlugin.d.ts +1 -1
  43. package/plugins/cms/CmsEntryApwSettingsGetterPlugin.js +5 -5
  44. package/plugins/cms/CmsEntryApwSettingsGetterPlugin.js.map +1 -1
  45. package/plugins/cms/apwEntryPlugins.d.ts +2 -2
  46. package/plugins/cms/apwEntryPlugins.js +19 -7
  47. package/plugins/cms/apwEntryPlugins.js.map +1 -1
  48. package/plugins/cms/index.d.ts +4 -4
  49. package/plugins/cms/index.js +3 -1
  50. package/plugins/cms/index.js.map +1 -1
  51. package/plugins/cms/linkContentReviewToEntry.d.ts +2 -2
  52. package/plugins/cms/linkContentReviewToEntry.js +5 -4
  53. package/plugins/cms/linkContentReviewToEntry.js.map +1 -1
  54. package/plugins/cms/linkWorkflowToEntry.d.ts +2 -2
  55. package/plugins/cms/linkWorkflowToEntry.js +17 -16
  56. package/plugins/cms/linkWorkflowToEntry.js.map +1 -1
  57. package/plugins/cms/notifications/changeRequestNotification.js +3 -1
  58. package/plugins/cms/notifications/changeRequestNotification.js.map +1 -1
  59. package/plugins/cms/notifications/commentNotification.js +3 -1
  60. package/plugins/cms/notifications/commentNotification.js.map +1 -1
  61. package/plugins/cms/notifications/contentReviewNotification.js +3 -1
  62. package/plugins/cms/notifications/contentReviewNotification.js.map +1 -1
  63. package/plugins/cms/notifications/contentUrl.js +3 -1
  64. package/plugins/cms/notifications/contentUrl.js.map +1 -1
  65. package/plugins/cms/triggerContentReview.d.ts +2 -2
  66. package/plugins/cms/triggerContentReview.js +6 -5
  67. package/plugins/cms/triggerContentReview.js.map +1 -1
  68. package/plugins/cms/updateContentReviewStatus.d.ts +3 -3
  69. package/plugins/cms/updateContentReviewStatus.js +15 -13
  70. package/plugins/cms/updateContentReviewStatus.js.map +1 -1
  71. package/plugins/cms/utils.d.ts +5 -4
  72. package/plugins/cms/utils.js +19 -13
  73. package/plugins/cms/utils.js.map +1 -1
  74. package/plugins/context.d.ts +3 -3
  75. package/plugins/context.js +5 -14
  76. package/plugins/context.js.map +1 -1
  77. package/plugins/graphql/changeRequest.gql.d.ts +1 -1
  78. package/plugins/graphql/changeRequest.gql.js +16 -13
  79. package/plugins/graphql/changeRequest.gql.js.map +1 -1
  80. package/plugins/graphql/comment.gql.d.ts +1 -1
  81. package/plugins/graphql/comment.gql.js +41 -36
  82. package/plugins/graphql/comment.gql.js.map +1 -1
  83. package/plugins/graphql/contentReview.gql.d.ts +1 -1
  84. package/plugins/graphql/contentReview.gql.js +26 -17
  85. package/plugins/graphql/contentReview.gql.js.map +1 -1
  86. package/plugins/graphql/reviewer.gql.d.ts +1 -1
  87. package/plugins/graphql/reviewer.gql.js +15 -13
  88. package/plugins/graphql/reviewer.gql.js.map +1 -1
  89. package/plugins/graphql/utils.d.ts +2 -0
  90. package/plugins/graphql/utils.js +10 -0
  91. package/plugins/graphql/utils.js.map +1 -0
  92. package/plugins/graphql/workflow.gql.d.ts +1 -1
  93. package/plugins/graphql/workflow.gql.js +15 -13
  94. package/plugins/graphql/workflow.gql.js.map +1 -1
  95. package/plugins/graphql.d.ts +1 -1
  96. package/plugins/graphql.js +4 -2
  97. package/plugins/graphql.js.map +1 -1
  98. package/plugins/hooks/createReviewerFromIdentity.d.ts +1 -1
  99. package/plugins/hooks/createReviewerFromIdentity.js +4 -2
  100. package/plugins/hooks/createReviewerFromIdentity.js.map +1 -1
  101. package/plugins/hooks/deleteChangeRequestsAfterContentReview.d.ts +1 -1
  102. package/plugins/hooks/deleteChangeRequestsAfterContentReview.js +3 -1
  103. package/plugins/hooks/deleteChangeRequestsAfterContentReview.js.map +1 -1
  104. package/plugins/hooks/deleteCommentsAfterChangeRequest.d.ts +1 -1
  105. package/plugins/hooks/deleteCommentsAfterChangeRequest.js +3 -1
  106. package/plugins/hooks/deleteCommentsAfterChangeRequest.js.map +1 -1
  107. package/plugins/hooks/index.d.ts +1 -1
  108. package/plugins/hooks/index.js +3 -1
  109. package/plugins/hooks/index.js.map +1 -1
  110. package/plugins/hooks/initializeContentReviewSteps.d.ts +1 -1
  111. package/plugins/hooks/initializeContentReviewSteps.js +6 -4
  112. package/plugins/hooks/initializeContentReviewSteps.js.map +1 -1
  113. package/plugins/hooks/initializeNotifications.d.ts +1 -1
  114. package/plugins/hooks/initializeNotifications.js +3 -1
  115. package/plugins/hooks/initializeNotifications.js.map +1 -1
  116. package/plugins/hooks/listContentReviews.d.ts +3 -3
  117. package/plugins/hooks/listContentReviews.js +4 -2
  118. package/plugins/hooks/listContentReviews.js.map +1 -1
  119. package/plugins/hooks/notifications/changeRequestAfterCreate.d.ts +1 -1
  120. package/plugins/hooks/notifications/changeRequestAfterCreate.js +8 -11
  121. package/plugins/hooks/notifications/changeRequestAfterCreate.js.map +1 -1
  122. package/plugins/hooks/notifications/changeRequestUrl.js +3 -1
  123. package/plugins/hooks/notifications/changeRequestUrl.js.map +1 -1
  124. package/plugins/hooks/notifications/commentAfterCreate.d.ts +1 -1
  125. package/plugins/hooks/notifications/commentAfterCreate.js +8 -11
  126. package/plugins/hooks/notifications/commentAfterCreate.js.map +1 -1
  127. package/plugins/hooks/notifications/commentUrl.js +3 -1
  128. package/plugins/hooks/notifications/commentUrl.js.map +1 -1
  129. package/plugins/hooks/notifications/contentReviewAfterCreate.d.ts +1 -1
  130. package/plugins/hooks/notifications/contentReviewAfterCreate.js +9 -12
  131. package/plugins/hooks/notifications/contentReviewAfterCreate.js.map +1 -1
  132. package/plugins/hooks/notifications/contentReviewUrl.js +3 -1
  133. package/plugins/hooks/notifications/contentReviewUrl.js.map +1 -1
  134. package/plugins/hooks/notifications/contentUrl.d.ts +2 -2
  135. package/plugins/hooks/notifications/contentUrl.js +3 -1
  136. package/plugins/hooks/notifications/contentUrl.js.map +1 -1
  137. package/plugins/hooks/notifications/getAppUrl.d.ts +2 -0
  138. package/plugins/hooks/notifications/getAppUrl.js +19 -0
  139. package/plugins/hooks/notifications/getAppUrl.js.map +1 -0
  140. package/plugins/hooks/notifications/lastChangeRequestNotificationPlugin.d.ts +1 -1
  141. package/plugins/hooks/notifications/lastChangeRequestNotificationPlugin.js +3 -1
  142. package/plugins/hooks/notifications/lastChangeRequestNotificationPlugin.js.map +1 -1
  143. package/plugins/hooks/notifications/lastCommentNotificationPlugin.d.ts +1 -1
  144. package/plugins/hooks/notifications/lastCommentNotificationPlugin.js +3 -1
  145. package/plugins/hooks/notifications/lastCommentNotificationPlugin.js.map +1 -1
  146. package/plugins/hooks/notifications/lastContentReviewNotificationPlugin.d.ts +1 -1
  147. package/plugins/hooks/notifications/lastContentReviewNotificationPlugin.js +3 -1
  148. package/plugins/hooks/notifications/lastContentReviewNotificationPlugin.js.map +1 -1
  149. package/plugins/hooks/notifications/reviewers.d.ts +1 -1
  150. package/plugins/hooks/notifications/reviewers.js +18 -15
  151. package/plugins/hooks/notifications/reviewers.js.map +1 -1
  152. package/plugins/hooks/notifications/sendChangeRequestNotification.d.ts +1 -1
  153. package/plugins/hooks/notifications/sendChangeRequestNotification.js +3 -1
  154. package/plugins/hooks/notifications/sendChangeRequestNotification.js.map +1 -1
  155. package/plugins/hooks/notifications/sendCommentNotification.d.ts +1 -1
  156. package/plugins/hooks/notifications/sendCommentNotification.js +3 -1
  157. package/plugins/hooks/notifications/sendCommentNotification.js.map +1 -1
  158. package/plugins/hooks/notifications/sendContentReviewNotification.d.ts +1 -1
  159. package/plugins/hooks/notifications/sendContentReviewNotification.js +3 -1
  160. package/plugins/hooks/notifications/sendContentReviewNotification.js.map +1 -1
  161. package/plugins/hooks/updatePendingChangeRequests.d.ts +1 -1
  162. package/plugins/hooks/updatePendingChangeRequests.js +8 -6
  163. package/plugins/hooks/updatePendingChangeRequests.js.map +1 -1
  164. package/plugins/hooks/updateTotalComments.d.ts +1 -1
  165. package/plugins/hooks/updateTotalComments.js +22 -15
  166. package/plugins/hooks/updateTotalComments.js.map +1 -1
  167. package/plugins/hooks/validateChangeRequest.d.ts +1 -1
  168. package/plugins/hooks/validateChangeRequest.js +3 -1
  169. package/plugins/hooks/validateChangeRequest.js.map +1 -1
  170. package/plugins/hooks/validateComment.d.ts +1 -1
  171. package/plugins/hooks/validateComment.js +3 -1
  172. package/plugins/hooks/validateComment.js.map +1 -1
  173. package/plugins/hooks/validateContentReview.d.ts +1 -1
  174. package/plugins/hooks/validateContentReview.js +3 -1
  175. package/plugins/hooks/validateContentReview.js.map +1 -1
  176. package/plugins/utils.d.ts +7 -6
  177. package/plugins/utils.js +12 -8
  178. package/plugins/utils.js.map +1 -1
  179. package/scheduler/createScheduleActionMethods.d.ts +1 -1
  180. package/scheduler/createScheduleActionMethods.js +105 -66
  181. package/scheduler/createScheduleActionMethods.js.map +1 -1
  182. package/scheduler/handlers/executeAction/index.d.ts +2 -2
  183. package/scheduler/handlers/executeAction/index.js +30 -9
  184. package/scheduler/handlers/executeAction/index.js.map +1 -1
  185. package/scheduler/handlers/executeAction/plugins/ApplicationGraphQL.js +5 -4
  186. package/scheduler/handlers/executeAction/plugins/ApplicationGraphQL.js.map +1 -1
  187. package/scheduler/handlers/executeAction/plugins/HeadlessCMSGraphQL.d.ts +2 -1
  188. package/scheduler/handlers/executeAction/plugins/HeadlessCMSGraphQL.js +6 -7
  189. package/scheduler/handlers/executeAction/plugins/HeadlessCMSGraphQL.js.map +1 -1
  190. package/scheduler/handlers/executeAction/plugins/PageBuilderGraphQL.d.ts +3 -2
  191. package/scheduler/handlers/executeAction/plugins/PageBuilderGraphQL.js +4 -7
  192. package/scheduler/handlers/executeAction/plugins/PageBuilderGraphQL.js.map +1 -1
  193. package/scheduler/handlers/executeAction/security.d.ts +2 -2
  194. package/scheduler/handlers/executeAction/security.js +3 -1
  195. package/scheduler/handlers/executeAction/security.js.map +1 -1
  196. package/scheduler/handlers/scheduleAction/index.d.ts +2 -2
  197. package/scheduler/handlers/scheduleAction/index.js +20 -15
  198. package/scheduler/handlers/scheduleAction/index.js.map +1 -1
  199. package/scheduler/handlers/scheduleAction/scheduleAction.utils.d.ts +3 -3
  200. package/scheduler/handlers/scheduleAction/scheduleAction.utils.js +19 -14
  201. package/scheduler/handlers/scheduleAction/scheduleAction.utils.js.map +1 -1
  202. package/scheduler/handlers/utils.d.ts +2 -3
  203. package/scheduler/handlers/utils.js +20 -13
  204. package/scheduler/handlers/utils.js.map +1 -1
  205. package/scheduler/index.d.ts +1 -1
  206. package/scheduler/index.js +3 -1
  207. package/scheduler/index.js.map +1 -1
  208. package/scheduler/types.d.ts +20 -36
  209. package/scheduler/types.js +11 -17
  210. package/scheduler/types.js.map +1 -1
  211. package/storageOperations/changeRequestStorageOperations.d.ts +2 -2
  212. package/storageOperations/changeRequestStorageOperations.js +44 -23
  213. package/storageOperations/changeRequestStorageOperations.js.map +1 -1
  214. package/storageOperations/commentStorageOperations.d.ts +3 -3
  215. package/storageOperations/commentStorageOperations.js +17 -24
  216. package/storageOperations/commentStorageOperations.js.map +1 -1
  217. package/storageOperations/contentReviewStorageOperations.d.ts +3 -3
  218. package/storageOperations/contentReviewStorageOperations.js +20 -25
  219. package/storageOperations/contentReviewStorageOperations.js.map +1 -1
  220. package/storageOperations/index.d.ts +3 -9
  221. package/storageOperations/index.js +11 -16
  222. package/storageOperations/index.js.map +1 -1
  223. package/storageOperations/models/changeRequest.model.d.ts +1 -2
  224. package/storageOperations/models/changeRequest.model.js +10 -11
  225. package/storageOperations/models/changeRequest.model.js.map +1 -1
  226. package/storageOperations/models/comment.model.d.ts +1 -2
  227. package/storageOperations/models/comment.model.js +10 -11
  228. package/storageOperations/models/comment.model.js.map +1 -1
  229. package/storageOperations/models/contentReview.model.d.ts +1 -2
  230. package/storageOperations/models/contentReview.model.js +16 -15
  231. package/storageOperations/models/contentReview.model.js.map +1 -1
  232. package/storageOperations/models/index.d.ts +1 -1
  233. package/storageOperations/models/index.js +11 -31
  234. package/storageOperations/models/index.js.map +1 -1
  235. package/storageOperations/models/reviewer.model.d.ts +1 -2
  236. package/storageOperations/models/reviewer.model.js +11 -12
  237. package/storageOperations/models/reviewer.model.js.map +1 -1
  238. package/storageOperations/models/utils.d.ts +2 -2
  239. package/storageOperations/models/utils.js +3 -1
  240. package/storageOperations/models/utils.js.map +1 -1
  241. package/storageOperations/models/workflow.model.d.ts +2 -3
  242. package/storageOperations/models/workflow.model.js +22 -23
  243. package/storageOperations/models/workflow.model.js.map +1 -1
  244. package/storageOperations/reviewerStorageOperations.d.ts +3 -3
  245. package/storageOperations/reviewerStorageOperations.js +24 -34
  246. package/storageOperations/reviewerStorageOperations.js.map +1 -1
  247. package/storageOperations/types.d.ts +2 -2
  248. package/storageOperations/types.js +3 -1
  249. package/storageOperations/types.js.map +1 -1
  250. package/storageOperations/workflowStorageOperations.d.ts +2 -2
  251. package/storageOperations/workflowStorageOperations.js +25 -28
  252. package/storageOperations/workflowStorageOperations.js.map +1 -1
  253. package/types.d.ts +49 -64
  254. package/types.js +121 -29
  255. package/types.js.map +1 -1
  256. package/utils/contentApwSettingsPlugin.d.ts +2 -2
  257. package/utils/contentApwSettingsPlugin.js +3 -1
  258. package/utils/contentApwSettingsPlugin.js.map +1 -1
  259. package/utils/errors.js +3 -1
  260. package/utils/errors.js.map +1 -1
  261. package/utils/fieldResolver.d.ts +2 -2
  262. package/utils/fieldResolver.js +7 -7
  263. package/utils/fieldResolver.js.map +1 -1
  264. package/utils/pickEntryFieldValues.d.ts +3 -0
  265. package/utils/pickEntryFieldValues.js +30 -0
  266. package/utils/pickEntryFieldValues.js.map +1 -0
  267. package/utils/resolve.js +3 -1
  268. package/utils/resolve.js.map +1 -1
  269. package/plugins/hooks/notifications/appUrl.d.ts +0 -2
  270. package/plugins/hooks/notifications/appUrl.js +0 -18
  271. package/plugins/hooks/notifications/appUrl.js.map +0 -1
  272. package/plugins/pageBuilder/PageApwSettingsGetterPlugin.d.ts +0 -9
  273. package/plugins/pageBuilder/PageApwSettingsGetterPlugin.js +0 -36
  274. package/plugins/pageBuilder/PageApwSettingsGetterPlugin.js.map +0 -1
  275. package/plugins/pageBuilder/apwContentPagePlugins.d.ts +0 -3
  276. package/plugins/pageBuilder/apwContentPagePlugins.js +0 -26
  277. package/plugins/pageBuilder/apwContentPagePlugins.js.map +0 -1
  278. package/plugins/pageBuilder/extendPbPageSettingsSchema.d.ts +0 -3
  279. package/plugins/pageBuilder/extendPbPageSettingsSchema.js +0 -20
  280. package/plugins/pageBuilder/extendPbPageSettingsSchema.js.map +0 -1
  281. package/plugins/pageBuilder/index.d.ts +0 -11
  282. package/plugins/pageBuilder/index.js +0 -42
  283. package/plugins/pageBuilder/index.js.map +0 -1
  284. package/plugins/pageBuilder/linkContentReviewToPage.d.ts +0 -8
  285. package/plugins/pageBuilder/linkContentReviewToPage.js +0 -89
  286. package/plugins/pageBuilder/linkContentReviewToPage.js.map +0 -1
  287. package/plugins/pageBuilder/linkWorkflowToPage.d.ts +0 -8
  288. package/plugins/pageBuilder/linkWorkflowToPage.js +0 -164
  289. package/plugins/pageBuilder/linkWorkflowToPage.js.map +0 -1
  290. package/plugins/pageBuilder/notifications/changeRequestNotification.d.ts +0 -1
  291. package/plugins/pageBuilder/notifications/changeRequestNotification.js +0 -31
  292. package/plugins/pageBuilder/notifications/changeRequestNotification.js.map +0 -1
  293. package/plugins/pageBuilder/notifications/commentNotification.d.ts +0 -1
  294. package/plugins/pageBuilder/notifications/commentNotification.js +0 -31
  295. package/plugins/pageBuilder/notifications/commentNotification.js.map +0 -1
  296. package/plugins/pageBuilder/notifications/contentReviewNotification.d.ts +0 -1
  297. package/plugins/pageBuilder/notifications/contentReviewNotification.js +0 -31
  298. package/plugins/pageBuilder/notifications/contentReviewNotification.js.map +0 -1
  299. package/plugins/pageBuilder/notifications/contentUrl.d.ts +0 -1
  300. package/plugins/pageBuilder/notifications/contentUrl.js +0 -47
  301. package/plugins/pageBuilder/notifications/contentUrl.js.map +0 -1
  302. package/plugins/pageBuilder/triggerContentReview.d.ts +0 -8
  303. package/plugins/pageBuilder/triggerContentReview.js +0 -39
  304. package/plugins/pageBuilder/triggerContentReview.js.map +0 -1
  305. package/plugins/pageBuilder/updateContentReviewStatus.d.ts +0 -10
  306. package/plugins/pageBuilder/updateContentReviewStatus.js +0 -67
  307. package/plugins/pageBuilder/updateContentReviewStatus.js.map +0 -1
  308. package/plugins/pageBuilder/utils.d.ts +0 -22
  309. package/plugins/pageBuilder/utils.js +0 -150
  310. package/plugins/pageBuilder/utils.js.map +0 -1
  311. package/storageOperations/models/contentModelPluginFactory.d.ts +0 -8
  312. package/storageOperations/models/contentModelPluginFactory.js +0 -19
  313. package/storageOperations/models/contentModelPluginFactory.js.map +0 -1
@@ -1,164 +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.linkWorkflowToPage = void 0;
8
- var _get = _interopRequireDefault(require("lodash/get"));
9
- var _set = _interopRequireDefault(require("lodash/set"));
10
- var _types = require("../../types");
11
- var _utils = require("./utils");
12
- const linkWorkflowToPage = params => {
13
- const {
14
- apw,
15
- pageBuilder
16
- } = params;
17
- pageBuilder.onPageBeforeCreate.subscribe(async ({
18
- page
19
- }) => {
20
- await (0, _utils.assignWorkflowToPage)({
21
- listWorkflow: apw.workflow.list,
22
- page
23
- });
24
- });
25
- pageBuilder.onPageBeforeCreateFrom.subscribe(async params => {
26
- const {
27
- page,
28
- original
29
- } = params;
30
- /**
31
- * If the previous revision(original) already had the "contentReviewId",
32
- * we need to unlink it so that new "contentReview" can be request for the new revision.
33
- */
34
- const previousContentReviewId = (0, _get.default)(original, "settings.apw.contentReviewId");
35
- if (previousContentReviewId) {
36
- page.settings.apw.contentReviewId = null;
37
- }
38
-
39
- /**
40
- * If the previous revision(original) already had the "workflowId",
41
- * we don't need to do anything we'll just let it be copied over.
42
- */
43
- const previousWorkflowId = (0, _get.default)(original, "settings.apw.workflowId");
44
- if (previousWorkflowId) {
45
- return;
46
- }
47
- /**
48
- * Lookup and assign "workflowId".
49
- */
50
- await (0, _utils.assignWorkflowToPage)({
51
- listWorkflow: apw.workflow.list,
52
- page
53
- });
54
- });
55
- pageBuilder.onPageBeforeUpdate.subscribe(async params => {
56
- const {
57
- page,
58
- original
59
- } = params;
60
- const prevApwWorkflowId = (0, _get.default)(original, "settings.apw");
61
- const currentApwWorkflowId = (0, _get.default)(page, "settings.apw");
62
- /**
63
- * Make sure the apw property doesn't get lost between updates.
64
- * It can happen because we run modal validation in "onBeforePageUpdate" event,
65
- * which doesn't have the "apw" property.
66
- */
67
- if (prevApwWorkflowId && !currentApwWorkflowId) {
68
- page.settings.apw = original.settings.apw;
69
- }
70
- /*
71
- * If there is a linked "contentReview" for this page and the page "title" has changed.
72
- * Let's update the "title" field in "contentReview".
73
- */
74
- const linkedContentReviewId = (0, _get.default)(page, "settings.apw.contentReviewId");
75
- const prevTitle = (0, _get.default)(original, "title");
76
- const newTitle = (0, _get.default)(page, "title");
77
- if (linkedContentReviewId && prevTitle !== newTitle) {
78
- await apw.contentReview.update(linkedContentReviewId, {
79
- title: newTitle
80
- });
81
- }
82
- });
83
- /**
84
- * Link created workflow to associated pages.
85
- */
86
- apw.workflow.onWorkflowAfterCreate.subscribe(async ({
87
- workflow
88
- }) => {
89
- const {
90
- scope
91
- } = workflow;
92
- if (workflow.app !== _types.ApwWorkflowApplications.PB) {
93
- return;
94
- }
95
- /**
96
- * If the workflow has pages in it's scope, we'll link that workflow for each of those pages.
97
- */
98
- if ((0, _utils.hasPages)(workflow) === false) {
99
- return;
100
- }
101
- const pages = (0, _get.default)(scope, "data.pages");
102
- for (const pid of pages) {
103
- await (0, _utils.updatePageSettings)({
104
- getPage: pageBuilder.getPage,
105
- updatePage: pageBuilder.updatePage,
106
- uniquePageId: pid,
107
- getNewSettings: settings => {
108
- return (0, _set.default)(settings, "apw.workflowId", workflow.id);
109
- }
110
- });
111
- }
112
- });
113
- /**
114
- * Link updated workflow to associated pages.
115
- */
116
- apw.workflow.onWorkflowAfterUpdate.subscribe(async ({
117
- workflow,
118
- original
119
- }) => {
120
- const {
121
- scope
122
- } = workflow;
123
- if (workflow.app !== _types.ApwWorkflowApplications.PB) {
124
- return;
125
- }
126
- const {
127
- scope: prevScope
128
- } = original;
129
- /**
130
- * If the workflow has pages in it's scope and there is a change in that page list,
131
- * we'll update the workflow link for corresponding pages.
132
- */
133
- if ((0, _utils.hasPages)(workflow) === false || (0, _utils.shouldUpdatePages)(scope, prevScope) === false) {
134
- return;
135
- }
136
- const previousPages = (0, _get.default)(prevScope, "data.pages", []);
137
- const currentPages = (0, _get.default)(scope, "data.pages", []);
138
- const {
139
- removedPages,
140
- addedPages
141
- } = (0, _utils.getPagesDiff)(currentPages, previousPages);
142
- for (const pid of addedPages) {
143
- await (0, _utils.updatePageSettings)({
144
- getPage: pageBuilder.getPage,
145
- updatePage: pageBuilder.updatePage,
146
- uniquePageId: pid,
147
- getNewSettings: settings => {
148
- return (0, _set.default)(settings, "apw.workflowId", workflow.id);
149
- }
150
- });
151
- }
152
- for (const pid of removedPages) {
153
- await (0, _utils.updatePageSettings)({
154
- getPage: pageBuilder.getPage,
155
- updatePage: pageBuilder.updatePage,
156
- uniquePageId: pid,
157
- getNewSettings: settings => {
158
- return (0, _set.default)(settings, "apw.workflowId", null);
159
- }
160
- });
161
- }
162
- });
163
- };
164
- exports.linkWorkflowToPage = linkWorkflowToPage;
@@ -1 +0,0 @@
1
- {"version":3,"names":["linkWorkflowToPage","params","apw","pageBuilder","onPageBeforeCreate","subscribe","page","assignWorkflowToPage","listWorkflow","workflow","list","onPageBeforeCreateFrom","original","previousContentReviewId","get","settings","contentReviewId","previousWorkflowId","onPageBeforeUpdate","prevApwWorkflowId","currentApwWorkflowId","linkedContentReviewId","prevTitle","newTitle","contentReview","update","title","onWorkflowAfterCreate","scope","app","ApwWorkflowApplications","PB","hasPages","pages","pid","updatePageSettings","getPage","updatePage","uniquePageId","getNewSettings","set","id","onWorkflowAfterUpdate","prevScope","shouldUpdatePages","previousPages","currentPages","removedPages","addedPages","getPagesDiff"],"sources":["linkWorkflowToPage.ts"],"sourcesContent":["import get from \"lodash/get\";\nimport set from \"lodash/set\";\nimport {\n ApwWorkflowApplications,\n ApwOnPageBeforeCreateTopicParams,\n ApwOnPageBeforeCreateFromTopicParams,\n ApwOnPageBeforeUpdateTopicParams,\n AdvancedPublishingWorkflow\n} from \"~/types\";\nimport {\n getPagesDiff,\n hasPages,\n updatePageSettings,\n shouldUpdatePages,\n assignWorkflowToPage\n} from \"./utils\";\nimport { PageBuilderContextObject } from \"@webiny/api-page-builder/graphql/types\";\n\ninterface LinkWorkflowToPageParams {\n apw: AdvancedPublishingWorkflow;\n pageBuilder: PageBuilderContextObject;\n}\n\nexport const linkWorkflowToPage = (params: LinkWorkflowToPageParams) => {\n const { apw, pageBuilder } = params;\n\n pageBuilder.onPageBeforeCreate.subscribe<ApwOnPageBeforeCreateTopicParams>(async ({ page }) => {\n await assignWorkflowToPage({ listWorkflow: apw.workflow.list, page });\n });\n pageBuilder.onPageBeforeCreateFrom.subscribe<ApwOnPageBeforeCreateFromTopicParams>(\n async params => {\n const { page, original } = params;\n /**\n * If the previous revision(original) already had the \"contentReviewId\",\n * we need to unlink it so that new \"contentReview\" can be request for the new revision.\n */\n const previousContentReviewId = get(original, \"settings.apw.contentReviewId\");\n if (previousContentReviewId) {\n page.settings.apw.contentReviewId = null;\n }\n\n /**\n * If the previous revision(original) already had the \"workflowId\",\n * we don't need to do anything we'll just let it be copied over.\n */\n const previousWorkflowId = get(original, \"settings.apw.workflowId\");\n if (previousWorkflowId) {\n return;\n }\n /**\n * Lookup and assign \"workflowId\".\n */\n await assignWorkflowToPage({ listWorkflow: apw.workflow.list, page });\n }\n );\n pageBuilder.onPageBeforeUpdate.subscribe<ApwOnPageBeforeUpdateTopicParams>(async params => {\n const { page, original } = params;\n const prevApwWorkflowId = get(original, \"settings.apw\");\n const currentApwWorkflowId = get(page, \"settings.apw\");\n /**\n * Make sure the apw property doesn't get lost between updates.\n * It can happen because we run modal validation in \"onBeforePageUpdate\" event,\n * which doesn't have the \"apw\" property.\n */\n if (prevApwWorkflowId && !currentApwWorkflowId) {\n page.settings.apw = original.settings.apw;\n }\n /*\n * If there is a linked \"contentReview\" for this page and the page \"title\" has changed.\n * Let's update the \"title\" field in \"contentReview\".\n */\n const linkedContentReviewId = get(page, \"settings.apw.contentReviewId\");\n const prevTitle = get(original, \"title\");\n const newTitle = get(page, \"title\");\n\n if (linkedContentReviewId && prevTitle !== newTitle) {\n await apw.contentReview.update(linkedContentReviewId, { title: newTitle });\n }\n });\n /**\n * Link created workflow to associated pages.\n */\n apw.workflow.onWorkflowAfterCreate.subscribe(async ({ workflow }) => {\n const { scope } = workflow;\n if (workflow.app !== ApwWorkflowApplications.PB) {\n return;\n }\n /**\n * If the workflow has pages in it's scope, we'll link that workflow for each of those pages.\n */\n if (hasPages(workflow) === false) {\n return;\n }\n const pages = get(scope, \"data.pages\") as unknown as string[];\n\n for (const pid of pages) {\n await updatePageSettings({\n getPage: pageBuilder.getPage,\n updatePage: pageBuilder.updatePage,\n uniquePageId: pid,\n getNewSettings: settings => {\n return set(settings, \"apw.workflowId\", workflow.id);\n }\n });\n }\n });\n /**\n * Link updated workflow to associated pages.\n */\n apw.workflow.onWorkflowAfterUpdate.subscribe(async ({ workflow, original }) => {\n const { scope } = workflow;\n if (workflow.app !== ApwWorkflowApplications.PB) {\n return;\n }\n const { scope: prevScope } = original;\n /**\n * If the workflow has pages in it's scope and there is a change in that page list,\n * we'll update the workflow link for corresponding pages.\n */\n if (hasPages(workflow) === false || shouldUpdatePages(scope, prevScope) === false) {\n return;\n }\n\n const previousPages = get(prevScope, \"data.pages\", []);\n const currentPages = get(scope, \"data.pages\", []);\n\n const { removedPages, addedPages } = getPagesDiff(currentPages, previousPages);\n for (const pid of addedPages) {\n await updatePageSettings({\n getPage: pageBuilder.getPage,\n updatePage: pageBuilder.updatePage,\n uniquePageId: pid,\n getNewSettings: settings => {\n return set(settings, \"apw.workflowId\", workflow.id);\n }\n });\n }\n for (const pid of removedPages) {\n await updatePageSettings({\n getPage: pageBuilder.getPage,\n updatePage: pageBuilder.updatePage,\n uniquePageId: pid,\n getNewSettings: settings => {\n return set(settings, \"apw.workflowId\", null);\n }\n });\n }\n });\n};\n"],"mappings":";;;;;;;AAAA;AACA;AACA;AAOA;AAcO,MAAMA,kBAAkB,GAAIC,MAAgC,IAAK;EACpE,MAAM;IAAEC,GAAG;IAAEC;EAAY,CAAC,GAAGF,MAAM;EAEnCE,WAAW,CAACC,kBAAkB,CAACC,SAAS,CAAmC,OAAO;IAAEC;EAAK,CAAC,KAAK;IAC3F,MAAM,IAAAC,2BAAoB,EAAC;MAAEC,YAAY,EAAEN,GAAG,CAACO,QAAQ,CAACC,IAAI;MAAEJ;IAAK,CAAC,CAAC;EACzE,CAAC,CAAC;EACFH,WAAW,CAACQ,sBAAsB,CAACN,SAAS,CACxC,MAAMJ,MAAM,IAAI;IACZ,MAAM;MAAEK,IAAI;MAAEM;IAAS,CAAC,GAAGX,MAAM;IACjC;AACZ;AACA;AACA;IACY,MAAMY,uBAAuB,GAAG,IAAAC,YAAG,EAACF,QAAQ,EAAE,8BAA8B,CAAC;IAC7E,IAAIC,uBAAuB,EAAE;MACzBP,IAAI,CAACS,QAAQ,CAACb,GAAG,CAACc,eAAe,GAAG,IAAI;IAC5C;;IAEA;AACZ;AACA;AACA;IACY,MAAMC,kBAAkB,GAAG,IAAAH,YAAG,EAACF,QAAQ,EAAE,yBAAyB,CAAC;IACnE,IAAIK,kBAAkB,EAAE;MACpB;IACJ;IACA;AACZ;AACA;IACY,MAAM,IAAAV,2BAAoB,EAAC;MAAEC,YAAY,EAAEN,GAAG,CAACO,QAAQ,CAACC,IAAI;MAAEJ;IAAK,CAAC,CAAC;EACzE,CAAC,CACJ;EACDH,WAAW,CAACe,kBAAkB,CAACb,SAAS,CAAmC,MAAMJ,MAAM,IAAI;IACvF,MAAM;MAAEK,IAAI;MAAEM;IAAS,CAAC,GAAGX,MAAM;IACjC,MAAMkB,iBAAiB,GAAG,IAAAL,YAAG,EAACF,QAAQ,EAAE,cAAc,CAAC;IACvD,MAAMQ,oBAAoB,GAAG,IAAAN,YAAG,EAACR,IAAI,EAAE,cAAc,CAAC;IACtD;AACR;AACA;AACA;AACA;IACQ,IAAIa,iBAAiB,IAAI,CAACC,oBAAoB,EAAE;MAC5Cd,IAAI,CAACS,QAAQ,CAACb,GAAG,GAAGU,QAAQ,CAACG,QAAQ,CAACb,GAAG;IAC7C;IACA;AACR;AACA;AACA;IACQ,MAAMmB,qBAAqB,GAAG,IAAAP,YAAG,EAACR,IAAI,EAAE,8BAA8B,CAAC;IACvE,MAAMgB,SAAS,GAAG,IAAAR,YAAG,EAACF,QAAQ,EAAE,OAAO,CAAC;IACxC,MAAMW,QAAQ,GAAG,IAAAT,YAAG,EAACR,IAAI,EAAE,OAAO,CAAC;IAEnC,IAAIe,qBAAqB,IAAIC,SAAS,KAAKC,QAAQ,EAAE;MACjD,MAAMrB,GAAG,CAACsB,aAAa,CAACC,MAAM,CAACJ,qBAAqB,EAAE;QAAEK,KAAK,EAAEH;MAAS,CAAC,CAAC;IAC9E;EACJ,CAAC,CAAC;EACF;AACJ;AACA;EACIrB,GAAG,CAACO,QAAQ,CAACkB,qBAAqB,CAACtB,SAAS,CAAC,OAAO;IAAEI;EAAS,CAAC,KAAK;IACjE,MAAM;MAAEmB;IAAM,CAAC,GAAGnB,QAAQ;IAC1B,IAAIA,QAAQ,CAACoB,GAAG,KAAKC,8BAAuB,CAACC,EAAE,EAAE;MAC7C;IACJ;IACA;AACR;AACA;IACQ,IAAI,IAAAC,eAAQ,EAACvB,QAAQ,CAAC,KAAK,KAAK,EAAE;MAC9B;IACJ;IACA,MAAMwB,KAAK,GAAG,IAAAnB,YAAG,EAACc,KAAK,EAAE,YAAY,CAAwB;IAE7D,KAAK,MAAMM,GAAG,IAAID,KAAK,EAAE;MACrB,MAAM,IAAAE,yBAAkB,EAAC;QACrBC,OAAO,EAAEjC,WAAW,CAACiC,OAAO;QAC5BC,UAAU,EAAElC,WAAW,CAACkC,UAAU;QAClCC,YAAY,EAAEJ,GAAG;QACjBK,cAAc,EAAExB,QAAQ,IAAI;UACxB,OAAO,IAAAyB,YAAG,EAACzB,QAAQ,EAAE,gBAAgB,EAAEN,QAAQ,CAACgC,EAAE,CAAC;QACvD;MACJ,CAAC,CAAC;IACN;EACJ,CAAC,CAAC;EACF;AACJ;AACA;EACIvC,GAAG,CAACO,QAAQ,CAACiC,qBAAqB,CAACrC,SAAS,CAAC,OAAO;IAAEI,QAAQ;IAAEG;EAAS,CAAC,KAAK;IAC3E,MAAM;MAAEgB;IAAM,CAAC,GAAGnB,QAAQ;IAC1B,IAAIA,QAAQ,CAACoB,GAAG,KAAKC,8BAAuB,CAACC,EAAE,EAAE;MAC7C;IACJ;IACA,MAAM;MAAEH,KAAK,EAAEe;IAAU,CAAC,GAAG/B,QAAQ;IACrC;AACR;AACA;AACA;IACQ,IAAI,IAAAoB,eAAQ,EAACvB,QAAQ,CAAC,KAAK,KAAK,IAAI,IAAAmC,wBAAiB,EAAChB,KAAK,EAAEe,SAAS,CAAC,KAAK,KAAK,EAAE;MAC/E;IACJ;IAEA,MAAME,aAAa,GAAG,IAAA/B,YAAG,EAAC6B,SAAS,EAAE,YAAY,EAAE,EAAE,CAAC;IACtD,MAAMG,YAAY,GAAG,IAAAhC,YAAG,EAACc,KAAK,EAAE,YAAY,EAAE,EAAE,CAAC;IAEjD,MAAM;MAAEmB,YAAY;MAAEC;IAAW,CAAC,GAAG,IAAAC,mBAAY,EAACH,YAAY,EAAED,aAAa,CAAC;IAC9E,KAAK,MAAMX,GAAG,IAAIc,UAAU,EAAE;MAC1B,MAAM,IAAAb,yBAAkB,EAAC;QACrBC,OAAO,EAAEjC,WAAW,CAACiC,OAAO;QAC5BC,UAAU,EAAElC,WAAW,CAACkC,UAAU;QAClCC,YAAY,EAAEJ,GAAG;QACjBK,cAAc,EAAExB,QAAQ,IAAI;UACxB,OAAO,IAAAyB,YAAG,EAACzB,QAAQ,EAAE,gBAAgB,EAAEN,QAAQ,CAACgC,EAAE,CAAC;QACvD;MACJ,CAAC,CAAC;IACN;IACA,KAAK,MAAMP,GAAG,IAAIa,YAAY,EAAE;MAC5B,MAAM,IAAAZ,yBAAkB,EAAC;QACrBC,OAAO,EAAEjC,WAAW,CAACiC,OAAO;QAC5BC,UAAU,EAAElC,WAAW,CAACkC,UAAU;QAClCC,YAAY,EAAEJ,GAAG;QACjBK,cAAc,EAAExB,QAAQ,IAAI;UACxB,OAAO,IAAAyB,YAAG,EAACzB,QAAQ,EAAE,gBAAgB,EAAE,IAAI,CAAC;QAChD;MACJ,CAAC,CAAC;IACN;EACJ,CAAC,CAAC;AACN,CAAC;AAAC"}
@@ -1 +0,0 @@
1
- export declare const createChangeRequestNotification: () => import("../../../ApwChangeRequestNotification").ApwChangeRequestNotification;
@@ -1,31 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.createChangeRequestNotification = void 0;
7
- var _types = require("../../../types");
8
- var _ApwChangeRequestNotification = require("../../../ApwChangeRequestNotification");
9
- const createChangeRequestNotification = () => {
10
- const plugin = (0, _ApwChangeRequestNotification.createApwChangeRequestNotification)(_types.ApwContentTypes.PAGE, params => {
11
- const {
12
- changeRequestUrl,
13
- contentUrl
14
- } = params;
15
- return {
16
- text: `
17
- Hi,<br /><br />
18
-
19
- You have received a <a href="${changeRequestUrl}">change request</a>, for <a href="${contentUrl}">this</a> page.<br /><br />
20
-
21
- Here are the full URLs:<br /><br />
22
-
23
- Change Request: ${changeRequestUrl}<br />
24
- Page: ${contentUrl}
25
- `
26
- };
27
- });
28
- plugin.name = `${plugin.type}.${_types.ApwContentTypes.PAGE}.default`;
29
- return plugin;
30
- };
31
- exports.createChangeRequestNotification = createChangeRequestNotification;
@@ -1 +0,0 @@
1
- {"version":3,"names":["createChangeRequestNotification","plugin","createApwChangeRequestNotification","ApwContentTypes","PAGE","params","changeRequestUrl","contentUrl","text","name","type"],"sources":["changeRequestNotification.ts"],"sourcesContent":["import { ApwContentTypes } from \"~/types\";\nimport { createApwChangeRequestNotification } from \"~/ApwChangeRequestNotification\";\n\nexport const createChangeRequestNotification = () => {\n const plugin = createApwChangeRequestNotification(ApwContentTypes.PAGE, params => {\n const { changeRequestUrl, contentUrl } = params;\n return {\n text: `\n Hi,<br /><br />\n \n You have received a <a href=\"${changeRequestUrl}\">change request</a>, for <a href=\"${contentUrl}\">this</a> page.<br /><br />\n \n Here are the full URLs:<br /><br />\n \n Change Request: ${changeRequestUrl}<br />\n Page: ${contentUrl}\n `\n };\n });\n\n plugin.name = `${plugin.type}.${ApwContentTypes.PAGE}.default`;\n\n return plugin;\n};\n"],"mappings":";;;;;;AAAA;AACA;AAEO,MAAMA,+BAA+B,GAAG,MAAM;EACjD,MAAMC,MAAM,GAAG,IAAAC,gEAAkC,EAACC,sBAAe,CAACC,IAAI,EAAEC,MAAM,IAAI;IAC9E,MAAM;MAAEC,gBAAgB;MAAEC;IAAW,CAAC,GAAGF,MAAM;IAC/C,OAAO;MACHG,IAAI,EAAG;AACnB;AACA;AACA,+CAA+CF,gBAAiB,sCAAqCC,UAAW;AAChH;AACA;AACA;AACA,kCAAkCD,gBAAiB;AACnD,wBAAwBC,UAAW;AACnC;IACQ,CAAC;EACL,CAAC,CAAC;EAEFN,MAAM,CAACQ,IAAI,GAAI,GAAER,MAAM,CAACS,IAAK,IAAGP,sBAAe,CAACC,IAAK,UAAS;EAE9D,OAAOH,MAAM;AACjB,CAAC;AAAC"}
@@ -1 +0,0 @@
1
- export declare const createCommentNotification: () => import("../../../ApwCommentNotification").ApwCommentNotification;
@@ -1,31 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.createCommentNotification = void 0;
7
- var _ApwCommentNotification = require("../../../ApwCommentNotification");
8
- var _types = require("../../../types");
9
- const createCommentNotification = () => {
10
- const plugin = (0, _ApwCommentNotification.createApwCommentNotification)(_types.ApwContentTypes.PAGE, params => {
11
- const {
12
- commentUrl,
13
- contentUrl
14
- } = params;
15
- return {
16
- text: `
17
- Hi,<br /><br />
18
-
19
- You have received a <a href="${commentUrl}">comment</a>, on a change request, for <a href="${contentUrl}">this</a> page.<br /><br />
20
-
21
- Here are the full URLs:<br /><br />
22
-
23
- Comment: ${commentUrl}<br />
24
- Page: ${contentUrl}
25
- `
26
- };
27
- });
28
- plugin.name = `${plugin.type}.${_types.ApwContentTypes.PAGE}.default`;
29
- return plugin;
30
- };
31
- exports.createCommentNotification = createCommentNotification;
@@ -1 +0,0 @@
1
- {"version":3,"names":["createCommentNotification","plugin","createApwCommentNotification","ApwContentTypes","PAGE","params","commentUrl","contentUrl","text","name","type"],"sources":["commentNotification.ts"],"sourcesContent":["import { createApwCommentNotification } from \"~/ApwCommentNotification\";\nimport { ApwContentTypes } from \"~/types\";\n\nexport const createCommentNotification = () => {\n const plugin = createApwCommentNotification(ApwContentTypes.PAGE, params => {\n const { commentUrl, contentUrl } = params;\n return {\n text: `\n Hi,<br /><br />\n \n You have received a <a href=\"${commentUrl}\">comment</a>, on a change request, for <a href=\"${contentUrl}\">this</a> page.<br /><br />\n \n Here are the full URLs:<br /><br />\n \n Comment: ${commentUrl}<br />\n Page: ${contentUrl}\n `\n };\n });\n\n plugin.name = `${plugin.type}.${ApwContentTypes.PAGE}.default`;\n\n return plugin;\n};\n"],"mappings":";;;;;;AAAA;AACA;AAEO,MAAMA,yBAAyB,GAAG,MAAM;EAC3C,MAAMC,MAAM,GAAG,IAAAC,oDAA4B,EAACC,sBAAe,CAACC,IAAI,EAAEC,MAAM,IAAI;IACxE,MAAM;MAAEC,UAAU;MAAEC;IAAW,CAAC,GAAGF,MAAM;IACzC,OAAO;MACHG,IAAI,EAAG;AACnB;AACA;AACA,+CAA+CF,UAAW,oDAAmDC,UAAW;AACxH;AACA;AACA;AACA,2BAA2BD,UAAW;AACtC,wBAAwBC,UAAW;AACnC;IACQ,CAAC;EACL,CAAC,CAAC;EAEFN,MAAM,CAACQ,IAAI,GAAI,GAAER,MAAM,CAACS,IAAK,IAAGP,sBAAe,CAACC,IAAK,UAAS;EAE9D,OAAOH,MAAM;AACjB,CAAC;AAAC"}
@@ -1 +0,0 @@
1
- export declare const createContentReviewNotification: () => import("../../../ApwContentReviewNotification").ApwContentReviewNotification;
@@ -1,31 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.createContentReviewNotification = void 0;
7
- var _types = require("../../../types");
8
- var _ApwContentReviewNotification = require("../../../ApwContentReviewNotification");
9
- const createContentReviewNotification = () => {
10
- const plugin = (0, _ApwContentReviewNotification.createApwContentReviewNotification)(_types.ApwContentTypes.PAGE, params => {
11
- const {
12
- contentReviewUrl,
13
- contentUrl
14
- } = params;
15
- return {
16
- text: `
17
- Hi,<br /><br />
18
-
19
- You have received a <a href="${contentReviewUrl}">content review</a>, for <a href="${contentUrl}">this</a> page.<br /><br />
20
-
21
- Here are the full URLs:<br /><br />
22
-
23
- Content Review: ${contentReviewUrl}<br />
24
- Page: ${contentUrl}
25
- `
26
- };
27
- });
28
- plugin.name = `${plugin.type}.${_types.ApwContentTypes.PAGE}.default`;
29
- return plugin;
30
- };
31
- exports.createContentReviewNotification = createContentReviewNotification;
@@ -1 +0,0 @@
1
- {"version":3,"names":["createContentReviewNotification","plugin","createApwContentReviewNotification","ApwContentTypes","PAGE","params","contentReviewUrl","contentUrl","text","name","type"],"sources":["contentReviewNotification.ts"],"sourcesContent":["import { ApwContentTypes } from \"~/types\";\nimport { createApwContentReviewNotification } from \"~/ApwContentReviewNotification\";\n\nexport const createContentReviewNotification = () => {\n const plugin = createApwContentReviewNotification(ApwContentTypes.PAGE, params => {\n const { contentReviewUrl, contentUrl } = params;\n return {\n text: `\n Hi,<br /><br />\n \n You have received a <a href=\"${contentReviewUrl}\">content review</a>, for <a href=\"${contentUrl}\">this</a> page.<br /><br />\n \n Here are the full URLs:<br /><br />\n \n Content Review: ${contentReviewUrl}<br />\n Page: ${contentUrl}\n `\n };\n });\n\n plugin.name = `${plugin.type}.${ApwContentTypes.PAGE}.default`;\n\n return plugin;\n};\n"],"mappings":";;;;;;AAAA;AACA;AAEO,MAAMA,+BAA+B,GAAG,MAAM;EACjD,MAAMC,MAAM,GAAG,IAAAC,gEAAkC,EAACC,sBAAe,CAACC,IAAI,EAAEC,MAAM,IAAI;IAC9E,MAAM;MAAEC,gBAAgB;MAAEC;IAAW,CAAC,GAAGF,MAAM;IAC/C,OAAO;MACHG,IAAI,EAAG;AACnB;AACA;AACA,+CAA+CF,gBAAiB,sCAAqCC,UAAW;AAChH;AACA;AACA;AACA,kCAAkCD,gBAAiB;AACnD,wBAAwBC,UAAW;AACnC;IACQ,CAAC;EACL,CAAC,CAAC;EAEFN,MAAM,CAACQ,IAAI,GAAI,GAAER,MAAM,CAACS,IAAK,IAAGP,sBAAe,CAACC,IAAK,UAAS;EAE9D,OAAOH,MAAM;AACjB,CAAC;AAAC"}
@@ -1 +0,0 @@
1
- export declare const createContentUrlPlugin: () => import("../../../ApwContentUrlPlugin").ApwContentUrlPlugin;
@@ -1,47 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.createContentUrlPlugin = void 0;
7
- var _ApwContentUrlPlugin = require("../../../ApwContentUrlPlugin");
8
- var _types = require("../../../types");
9
- /**
10
- * In this file we create a plugin which in turn creates a content entry url when requested by the code which sends notifications.
11
- * Due to multiple content types for the APW, everything needs to be pluginable.
12
- */
13
-
14
- const createPageUrl = params => {
15
- /**
16
- * All variables must exist for URL to be created.
17
- * We go through all vars and throw a log if it does not exist.
18
- */
19
- for (const key in params) {
20
- if (!!key) {
21
- continue;
22
- }
23
- console.log(`Missing variable "${key}", which we use to create a page URL.`);
24
- return null;
25
- }
26
- const {
27
- baseUrl,
28
- id
29
- } = params;
30
- return `${baseUrl}/page-builder/pages?id=${id}`;
31
- };
32
- const createContentUrlPlugin = () => {
33
- return (0, _ApwContentUrlPlugin.createApwContentUrlPlugin)(_types.ApwContentTypes.PAGE, params => {
34
- const {
35
- baseUrl,
36
- contentReview
37
- } = params;
38
- const {
39
- id
40
- } = contentReview.content;
41
- return createPageUrl({
42
- baseUrl,
43
- id
44
- });
45
- });
46
- };
47
- exports.createContentUrlPlugin = createContentUrlPlugin;
@@ -1 +0,0 @@
1
- {"version":3,"names":["createPageUrl","params","key","console","log","baseUrl","id","createContentUrlPlugin","createApwContentUrlPlugin","ApwContentTypes","PAGE","contentReview","content"],"sources":["contentUrl.ts"],"sourcesContent":["/**\n * In this file we create a plugin which in turn creates a content entry url when requested by the code which sends notifications.\n * Due to multiple content types for the APW, everything needs to be pluginable.\n */\nimport { createApwContentUrlPlugin } from \"~/ApwContentUrlPlugin\";\nimport { ApwContentTypes } from \"~/types\";\n\ninterface CreatePageUrlParams {\n baseUrl?: string;\n id: string;\n}\nconst createPageUrl = (params: CreatePageUrlParams): string | null => {\n /**\n * All variables must exist for URL to be created.\n * We go through all vars and throw a log if it does not exist.\n */\n for (const key in params) {\n if (!!key) {\n continue;\n }\n console.log(`Missing variable \"${key}\", which we use to create a page URL.`);\n return null;\n }\n const { baseUrl, id } = params;\n return `${baseUrl}/page-builder/pages?id=${id}`;\n};\n\nexport const createContentUrlPlugin = () => {\n return createApwContentUrlPlugin(ApwContentTypes.PAGE, params => {\n const { baseUrl, contentReview } = params;\n const { id } = contentReview.content;\n return createPageUrl({\n baseUrl,\n id\n });\n });\n};\n"],"mappings":";;;;;;AAIA;AACA;AALA;AACA;AACA;AACA;;AAQA,MAAMA,aAAa,GAAIC,MAA2B,IAAoB;EAClE;AACJ;AACA;AACA;EACI,KAAK,MAAMC,GAAG,IAAID,MAAM,EAAE;IACtB,IAAI,CAAC,CAACC,GAAG,EAAE;MACP;IACJ;IACAC,OAAO,CAACC,GAAG,CAAE,qBAAoBF,GAAI,uCAAsC,CAAC;IAC5E,OAAO,IAAI;EACf;EACA,MAAM;IAAEG,OAAO;IAAEC;EAAG,CAAC,GAAGL,MAAM;EAC9B,OAAQ,GAAEI,OAAQ,0BAAyBC,EAAG,EAAC;AACnD,CAAC;AAEM,MAAMC,sBAAsB,GAAG,MAAM;EACxC,OAAO,IAAAC,8CAAyB,EAACC,sBAAe,CAACC,IAAI,EAAET,MAAM,IAAI;IAC7D,MAAM;MAAEI,OAAO;MAAEM;IAAc,CAAC,GAAGV,MAAM;IACzC,MAAM;MAAEK;IAAG,CAAC,GAAGK,aAAa,CAACC,OAAO;IACpC,OAAOZ,aAAa,CAAC;MACjBK,OAAO;MACPC;IACJ,CAAC,CAAC;EACN,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 TriggerContentReviewParams {
4
- apw: AdvancedPublishingWorkflow;
5
- pageBuilder: PageBuilderContextObject;
6
- }
7
- export declare const triggerContentReview: (params: TriggerContentReviewParams) => void;
8
- export {};
@@ -1,39 +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.triggerContentReview = void 0;
8
- var _get = _interopRequireDefault(require("lodash/get"));
9
- var _error = _interopRequireDefault(require("@webiny/error"));
10
- var _types = require("../../types");
11
- const triggerContentReview = params => {
12
- const {
13
- pageBuilder,
14
- apw
15
- } = params;
16
- pageBuilder.onPageBeforePublish.subscribe(async ({
17
- page
18
- }) => {
19
- const contentReviewId = (0, _get.default)(page, "settings.apw.contentReviewId");
20
- if (contentReviewId) {
21
- const contentReview = await apw.contentReview.get(contentReviewId);
22
- if (contentReview.reviewStatus === _types.ApwContentReviewStatus.UNDER_REVIEW) {
23
- throw new _error.default(`A peer review for this content has been already requested.`, "REVIEW_ALREADY_EXIST", {
24
- contentReviewId,
25
- page
26
- });
27
- }
28
- return;
29
- }
30
- const workflowId = (0, _get.default)(page, "settings.apw.workflowId");
31
- if (workflowId) {
32
- throw new _error.default("This content requires peer review approval before it can be published.", "REVIEW_REQUIRED", {
33
- workflowId,
34
- page
35
- });
36
- }
37
- });
38
- };
39
- exports.triggerContentReview = triggerContentReview;
@@ -1 +0,0 @@
1
- {"version":3,"names":["triggerContentReview","params","pageBuilder","apw","onPageBeforePublish","subscribe","page","contentReviewId","get","contentReview","reviewStatus","ApwContentReviewStatus","UNDER_REVIEW","Error","workflowId"],"sources":["triggerContentReview.ts"],"sourcesContent":["import get from \"lodash/get\";\nimport Error from \"@webiny/error\";\nimport {\n AdvancedPublishingWorkflow,\n ApwContentReviewStatus,\n ApwOnPageBeforePublishTopicParams\n} from \"~/types\";\nimport { PageBuilderContextObject } from \"@webiny/api-page-builder/graphql/types\";\n\ninterface TriggerContentReviewParams {\n apw: AdvancedPublishingWorkflow;\n pageBuilder: PageBuilderContextObject;\n}\n\nexport const triggerContentReview = (params: TriggerContentReviewParams) => {\n const { pageBuilder, apw } = params;\n\n pageBuilder.onPageBeforePublish.subscribe<ApwOnPageBeforePublishTopicParams>(\n async ({ page }) => {\n const contentReviewId = get(page, \"settings.apw.contentReviewId\");\n if (contentReviewId) {\n const contentReview = await apw.contentReview.get(contentReviewId);\n\n if (contentReview.reviewStatus === ApwContentReviewStatus.UNDER_REVIEW) {\n throw new Error(\n `A peer review for this content has been already requested.`,\n \"REVIEW_ALREADY_EXIST\",\n {\n contentReviewId,\n page\n }\n );\n }\n return;\n }\n\n const workflowId = get(page, \"settings.apw.workflowId\");\n\n if (workflowId) {\n throw new Error(\n \"This content requires peer review approval before it can be published.\",\n \"REVIEW_REQUIRED\",\n {\n workflowId,\n page\n }\n );\n }\n }\n );\n};\n"],"mappings":";;;;;;;AAAA;AACA;AACA;AAYO,MAAMA,oBAAoB,GAAIC,MAAkC,IAAK;EACxE,MAAM;IAAEC,WAAW;IAAEC;EAAI,CAAC,GAAGF,MAAM;EAEnCC,WAAW,CAACE,mBAAmB,CAACC,SAAS,CACrC,OAAO;IAAEC;EAAK,CAAC,KAAK;IAChB,MAAMC,eAAe,GAAG,IAAAC,YAAG,EAACF,IAAI,EAAE,8BAA8B,CAAC;IACjE,IAAIC,eAAe,EAAE;MACjB,MAAME,aAAa,GAAG,MAAMN,GAAG,CAACM,aAAa,CAACD,GAAG,CAACD,eAAe,CAAC;MAElE,IAAIE,aAAa,CAACC,YAAY,KAAKC,6BAAsB,CAACC,YAAY,EAAE;QACpE,MAAM,IAAIC,cAAK,CACV,4DAA2D,EAC5D,sBAAsB,EACtB;UACIN,eAAe;UACfD;QACJ,CAAC,CACJ;MACL;MACA;IACJ;IAEA,MAAMQ,UAAU,GAAG,IAAAN,YAAG,EAACF,IAAI,EAAE,yBAAyB,CAAC;IAEvD,IAAIQ,UAAU,EAAE;MACZ,MAAM,IAAID,cAAK,CACX,wEAAwE,EACxE,iBAAiB,EACjB;QACIC,UAAU;QACVR;MACJ,CAAC,CACJ;IACL;EACJ,CAAC,CACJ;AACL,CAAC;AAAC"}
@@ -1,10 +0,0 @@
1
- import { AdvancedPublishingWorkflow } from "../../types";
2
- import { PageBuilderContextObject } from "@webiny/api-page-builder/graphql/types";
3
- import { Security } from "@webiny/api-security/types";
4
- interface UpdateContentReviewStatusParams {
5
- apw: AdvancedPublishingWorkflow;
6
- pageBuilder: PageBuilderContextObject;
7
- security: Security;
8
- }
9
- export declare const updateContentReviewStatus: (params: UpdateContentReviewStatusParams) => void;
10
- export {};
@@ -1,67 +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.updateContentReviewStatus = void 0;
8
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
9
- var _get = _interopRequireDefault(require("lodash/get"));
10
- var _types = require("../../types");
11
- var _utils = require("../../crud/utils");
12
- const updateContentReviewStatus = params => {
13
- const {
14
- apw,
15
- pageBuilder,
16
- security
17
- } = params;
18
- pageBuilder.onPageAfterPublish.subscribe(async ({
19
- page
20
- }) => {
21
- const contentReviewId = (0, _get.default)(page, "settings.apw.contentReviewId");
22
- /**
23
- * Bail out if there is no "content review" linked.
24
- */
25
- if (!contentReviewId) {
26
- return;
27
- }
28
- const contentReview = await apw.contentReview.get(contentReviewId);
29
- const identity = security.getIdentity();
30
- /**
31
- * If content review is "readyToBePublished set its status as "published" after page publish.
32
- */
33
- if (contentReview.reviewStatus === _types.ApwContentReviewStatus.READY_TO_BE_PUBLISHED) {
34
- await apw.contentReview.update(contentReviewId, {
35
- reviewStatus: _types.ApwContentReviewStatus.PUBLISHED,
36
- content: (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, contentReview.content), _utils.INITIAL_CONTENT_REVIEW_CONTENT_SCHEDULE_META), {}, {
37
- publishedBy: identity.id
38
- })
39
- });
40
- }
41
- });
42
- pageBuilder.onPageAfterUnpublish.subscribe(async ({
43
- page
44
- }) => {
45
- const contentReviewId = (0, _get.default)(page, "settings.apw.contentReviewId");
46
- /**
47
- * Bail out if there is no "content review" linked.
48
- */
49
- if (!contentReviewId) {
50
- return;
51
- }
52
- const contentReview = await apw.contentReview.get(contentReviewId);
53
- /**
54
- * If content review is "published set its status as "readyToBePublished" after page unpublish.
55
- */
56
-
57
- if (contentReview.reviewStatus === _types.ApwContentReviewStatus.PUBLISHED) {
58
- await apw.contentReview.update(contentReviewId, {
59
- reviewStatus: _types.ApwContentReviewStatus.READY_TO_BE_PUBLISHED,
60
- content: (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, contentReview.content), _utils.INITIAL_CONTENT_REVIEW_CONTENT_SCHEDULE_META), {}, {
61
- publishedBy: null
62
- })
63
- });
64
- }
65
- });
66
- };
67
- exports.updateContentReviewStatus = updateContentReviewStatus;
@@ -1 +0,0 @@
1
- {"version":3,"names":["updateContentReviewStatus","params","apw","pageBuilder","security","onPageAfterPublish","subscribe","page","contentReviewId","get","contentReview","identity","getIdentity","reviewStatus","ApwContentReviewStatus","READY_TO_BE_PUBLISHED","update","PUBLISHED","content","INITIAL_CONTENT_REVIEW_CONTENT_SCHEDULE_META","publishedBy","id","onPageAfterUnpublish"],"sources":["updateContentReviewStatus.ts"],"sourcesContent":["import get from \"lodash/get\";\nimport {\n AdvancedPublishingWorkflow,\n ApwContentReviewStatus,\n ApwOnPageBeforePublishTopicParams\n} from \"~/types\";\nimport { INITIAL_CONTENT_REVIEW_CONTENT_SCHEDULE_META } from \"~/crud/utils\";\nimport { PageBuilderContextObject } from \"@webiny/api-page-builder/graphql/types\";\nimport { Security } from \"@webiny/api-security/types\";\n\ninterface UpdateContentReviewStatusParams {\n apw: AdvancedPublishingWorkflow;\n pageBuilder: PageBuilderContextObject;\n security: Security;\n}\n\nexport const updateContentReviewStatus = (params: UpdateContentReviewStatusParams) => {\n const { apw, pageBuilder, security } = params;\n\n pageBuilder.onPageAfterPublish.subscribe<ApwOnPageBeforePublishTopicParams>(\n async ({ page }) => {\n const contentReviewId = get(page, \"settings.apw.contentReviewId\");\n /**\n * Bail out if there is no \"content review\" linked.\n */\n if (!contentReviewId) {\n return;\n }\n\n const contentReview = await apw.contentReview.get(contentReviewId);\n const identity = security.getIdentity();\n /**\n * If content review is \"readyToBePublished set its status as \"published\" after page publish.\n */\n if (contentReview.reviewStatus === ApwContentReviewStatus.READY_TO_BE_PUBLISHED) {\n await apw.contentReview.update(contentReviewId, {\n reviewStatus: ApwContentReviewStatus.PUBLISHED,\n content: {\n ...contentReview.content,\n ...INITIAL_CONTENT_REVIEW_CONTENT_SCHEDULE_META,\n publishedBy: identity.id\n }\n });\n }\n }\n );\n pageBuilder.onPageAfterUnpublish.subscribe<ApwOnPageBeforePublishTopicParams>(\n async ({ page }) => {\n const contentReviewId = get(page, \"settings.apw.contentReviewId\");\n /**\n * Bail out if there is no \"content review\" linked.\n */\n if (!contentReviewId) {\n return;\n }\n\n const contentReview = await apw.contentReview.get(contentReviewId);\n /**\n * If content review is \"published set its status as \"readyToBePublished\" after page unpublish.\n */\n\n if (contentReview.reviewStatus === ApwContentReviewStatus.PUBLISHED) {\n await apw.contentReview.update(contentReviewId, {\n reviewStatus: ApwContentReviewStatus.READY_TO_BE_PUBLISHED,\n content: {\n ...contentReview.content,\n ...INITIAL_CONTENT_REVIEW_CONTENT_SCHEDULE_META,\n publishedBy: null\n }\n });\n }\n }\n );\n};\n"],"mappings":";;;;;;;;AAAA;AACA;AAKA;AAUO,MAAMA,yBAAyB,GAAIC,MAAuC,IAAK;EAClF,MAAM;IAAEC,GAAG;IAAEC,WAAW;IAAEC;EAAS,CAAC,GAAGH,MAAM;EAE7CE,WAAW,CAACE,kBAAkB,CAACC,SAAS,CACpC,OAAO;IAAEC;EAAK,CAAC,KAAK;IAChB,MAAMC,eAAe,GAAG,IAAAC,YAAG,EAACF,IAAI,EAAE,8BAA8B,CAAC;IACjE;AACZ;AACA;IACY,IAAI,CAACC,eAAe,EAAE;MAClB;IACJ;IAEA,MAAME,aAAa,GAAG,MAAMR,GAAG,CAACQ,aAAa,CAACD,GAAG,CAACD,eAAe,CAAC;IAClE,MAAMG,QAAQ,GAAGP,QAAQ,CAACQ,WAAW,EAAE;IACvC;AACZ;AACA;IACY,IAAIF,aAAa,CAACG,YAAY,KAAKC,6BAAsB,CAACC,qBAAqB,EAAE;MAC7E,MAAMb,GAAG,CAACQ,aAAa,CAACM,MAAM,CAACR,eAAe,EAAE;QAC5CK,YAAY,EAAEC,6BAAsB,CAACG,SAAS;QAC9CC,OAAO,0FACAR,aAAa,CAACQ,OAAO,GACrBC,mDAA4C;UAC/CC,WAAW,EAAET,QAAQ,CAACU;QAAE;MAEhC,CAAC,CAAC;IACN;EACJ,CAAC,CACJ;EACDlB,WAAW,CAACmB,oBAAoB,CAAChB,SAAS,CACtC,OAAO;IAAEC;EAAK,CAAC,KAAK;IAChB,MAAMC,eAAe,GAAG,IAAAC,YAAG,EAACF,IAAI,EAAE,8BAA8B,CAAC;IACjE;AACZ;AACA;IACY,IAAI,CAACC,eAAe,EAAE;MAClB;IACJ;IAEA,MAAME,aAAa,GAAG,MAAMR,GAAG,CAACQ,aAAa,CAACD,GAAG,CAACD,eAAe,CAAC;IAClE;AACZ;AACA;;IAEY,IAAIE,aAAa,CAACG,YAAY,KAAKC,6BAAsB,CAACG,SAAS,EAAE;MACjE,MAAMf,GAAG,CAACQ,aAAa,CAACM,MAAM,CAACR,eAAe,EAAE;QAC5CK,YAAY,EAAEC,6BAAsB,CAACC,qBAAqB;QAC1DG,OAAO,0FACAR,aAAa,CAACQ,OAAO,GACrBC,mDAA4C;UAC/CC,WAAW,EAAE;QAAI;MAEzB,CAAC,CAAC;IACN;EACJ,CAAC,CACJ;AACL,CAAC;AAAC"}
@@ -1,22 +0,0 @@
1
- import { ApwWorkflow, ApwWorkflowCrud, ApwWorkflowScope, PageWithWorkflow } from "../../types";
2
- import { PageBuilderContextObject } from "@webiny/api-page-builder/graphql/types";
3
- interface AssignWorkflowToPageParams {
4
- listWorkflow: ApwWorkflowCrud["list"];
5
- page: PageWithWorkflow;
6
- }
7
- export declare const assignWorkflowToPage: ({ listWorkflow, page }: AssignWorkflowToPageParams) => Promise<void>;
8
- export declare const hasPages: (workflow: ApwWorkflow) => Boolean;
9
- export declare const shouldUpdatePages: (scope: ApwWorkflowScope, prevScope: ApwWorkflowScope) => Boolean;
10
- interface GetUpdatePageOpsResult {
11
- addedPages: string[];
12
- removedPages: string[];
13
- }
14
- export declare const getPagesDiff: (currentPages: string[], prevPages: string[]) => GetUpdatePageOpsResult;
15
- interface UpdatePageSettingsParams {
16
- getPage: PageBuilderContextObject["getPage"];
17
- updatePage: PageBuilderContextObject["updatePage"];
18
- uniquePageId: string;
19
- getNewSettings: (settings: PageWithWorkflow["settings"]) => PageWithWorkflow["settings"];
20
- }
21
- export declare const updatePageSettings: ({ getPage, updatePage, uniquePageId, getNewSettings }: UpdatePageSettingsParams) => Promise<void>;
22
- export {};