@webiny/api-apw 0.0.0-unstable.8c4d9f045a → 0.0.0-unstable.8feaff8c32

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 (248) hide show
  1. package/ApwChangeRequestNotification.d.ts +27 -0
  2. package/ApwChangeRequestNotification.js +30 -0
  3. package/ApwChangeRequestNotification.js.map +1 -0
  4. package/ApwCommentNotification.d.ts +27 -0
  5. package/ApwCommentNotification.js +30 -0
  6. package/ApwCommentNotification.js.map +1 -0
  7. package/ApwContentReviewNotification.d.ts +26 -0
  8. package/ApwContentReviewNotification.js +30 -0
  9. package/ApwContentReviewNotification.js.map +1 -0
  10. package/ApwContentUrlPlugin.d.ts +19 -0
  11. package/ApwContentUrlPlugin.js +30 -0
  12. package/ApwContentUrlPlugin.js.map +1 -0
  13. package/ContentApwSettingsPlugin.js +1 -6
  14. package/ContentApwSettingsPlugin.js.map +1 -1
  15. package/crud/createChangeRequestMethods.js +21 -25
  16. package/crud/createChangeRequestMethods.js.map +1 -1
  17. package/crud/createCommentMethods.js +21 -26
  18. package/crud/createCommentMethods.js.map +1 -1
  19. package/crud/createContentReviewMethods.js +89 -128
  20. package/crud/createContentReviewMethods.js.map +1 -1
  21. package/crud/createReviewerMethods.js +21 -26
  22. package/crud/createReviewerMethods.js.map +1 -1
  23. package/crud/createWorkflowMethods.d.ts +1 -1
  24. package/crud/createWorkflowMethods.js +37 -28
  25. package/crud/createWorkflowMethods.js.map +1 -1
  26. package/crud/index.js +3 -32
  27. package/crud/index.js.map +1 -1
  28. package/crud/utils.js +4 -36
  29. package/crud/utils.js.map +1 -1
  30. package/index.d.ts +2 -3
  31. package/index.js +6 -16
  32. package/index.js.map +1 -1
  33. package/package.json +40 -46
  34. package/plugins/cms/CmsEntryApwSettingsGetterPlugin.js +1 -16
  35. package/plugins/cms/CmsEntryApwSettingsGetterPlugin.js.map +1 -1
  36. package/plugins/cms/apwEntryPlugins.js +4 -16
  37. package/plugins/cms/apwEntryPlugins.js.map +1 -1
  38. package/plugins/cms/index.js +5 -10
  39. package/plugins/cms/index.js.map +1 -1
  40. package/plugins/cms/linkContentReviewToEntry.js +6 -23
  41. package/plugins/cms/linkContentReviewToEntry.js.map +1 -1
  42. package/plugins/cms/linkWorkflowToEntry.js +14 -43
  43. package/plugins/cms/linkWorkflowToEntry.js.map +1 -1
  44. package/plugins/cms/notifications/changeRequestNotification.d.ts +1 -0
  45. package/plugins/cms/notifications/changeRequestNotification.js +31 -0
  46. package/plugins/cms/notifications/changeRequestNotification.js.map +1 -0
  47. package/plugins/cms/notifications/commentNotification.d.ts +1 -0
  48. package/plugins/cms/notifications/commentNotification.js +31 -0
  49. package/plugins/cms/notifications/commentNotification.js.map +1 -0
  50. package/plugins/cms/notifications/contentReviewNotification.d.ts +1 -0
  51. package/plugins/cms/notifications/contentReviewNotification.js +31 -0
  52. package/plugins/cms/notifications/contentReviewNotification.js.map +1 -0
  53. package/plugins/cms/notifications/contentUrl.d.ts +8 -0
  54. package/plugins/cms/notifications/contentUrl.js +53 -0
  55. package/plugins/cms/notifications/contentUrl.js.map +1 -0
  56. package/plugins/cms/triggerContentReview.js +6 -20
  57. package/plugins/cms/triggerContentReview.js.map +1 -1
  58. package/plugins/cms/updateContentReviewStatus.js +14 -36
  59. package/plugins/cms/updateContentReviewStatus.js.map +1 -1
  60. package/plugins/cms/utils.js +6 -55
  61. package/plugins/cms/utils.js.map +1 -1
  62. package/plugins/context.d.ts +0 -1
  63. package/plugins/context.js +3 -48
  64. package/plugins/context.js.map +1 -1
  65. package/plugins/graphql/changeRequest.gql.js +4 -11
  66. package/plugins/graphql/changeRequest.gql.js.map +1 -1
  67. package/plugins/graphql/comment.gql.js +4 -11
  68. package/plugins/graphql/comment.gql.js.map +1 -1
  69. package/plugins/graphql/contentReview.gql.js +10 -29
  70. package/plugins/graphql/contentReview.gql.js.map +1 -1
  71. package/plugins/graphql/reviewer.gql.js +6 -11
  72. package/plugins/graphql/reviewer.gql.js.map +1 -1
  73. package/plugins/graphql/workflow.gql.js +4 -11
  74. package/plugins/graphql/workflow.gql.js.map +1 -1
  75. package/plugins/graphql.js +4 -19
  76. package/plugins/graphql.js.map +1 -1
  77. package/plugins/hooks/createReviewerFromIdentity.js +26 -15
  78. package/plugins/hooks/createReviewerFromIdentity.js.map +1 -1
  79. package/plugins/hooks/deleteChangeRequestsAfterContentReview.js +2 -10
  80. package/plugins/hooks/deleteChangeRequestsAfterContentReview.js.map +1 -1
  81. package/plugins/hooks/deleteCommentsAfterChangeRequest.js +2 -9
  82. package/plugins/hooks/deleteCommentsAfterChangeRequest.js.map +1 -1
  83. package/plugins/hooks/index.js +4 -12
  84. package/plugins/hooks/index.js.map +1 -1
  85. package/plugins/hooks/initializeContentReviewSteps.js +15 -25
  86. package/plugins/hooks/initializeContentReviewSteps.js.map +1 -1
  87. package/plugins/hooks/initializeNotifications.d.ts +2 -0
  88. package/plugins/hooks/initializeNotifications.js +15 -0
  89. package/plugins/hooks/initializeNotifications.js.map +1 -0
  90. package/plugins/hooks/listContentReviews.d.ts +10 -0
  91. package/plugins/hooks/listContentReviews.js +56 -0
  92. package/plugins/hooks/listContentReviews.js.map +1 -0
  93. package/plugins/hooks/notifications/appUrl.d.ts +2 -0
  94. package/plugins/hooks/notifications/appUrl.js +18 -0
  95. package/plugins/hooks/notifications/appUrl.js.map +1 -0
  96. package/plugins/hooks/notifications/changeRequestAfterCreate.d.ts +2 -0
  97. package/plugins/hooks/notifications/changeRequestAfterCreate.js +111 -0
  98. package/plugins/hooks/notifications/changeRequestAfterCreate.js.map +1 -0
  99. package/plugins/hooks/notifications/changeRequestUrl.d.ts +8 -0
  100. package/plugins/hooks/notifications/changeRequestUrl.js +27 -0
  101. package/plugins/hooks/notifications/changeRequestUrl.js.map +1 -0
  102. package/plugins/hooks/notifications/commentAfterCreate.d.ts +2 -0
  103. package/plugins/hooks/notifications/commentAfterCreate.js +122 -0
  104. package/plugins/hooks/notifications/commentAfterCreate.js.map +1 -0
  105. package/plugins/hooks/notifications/commentUrl.d.ts +8 -0
  106. package/plugins/hooks/notifications/commentUrl.js +27 -0
  107. package/plugins/hooks/notifications/commentUrl.js.map +1 -0
  108. package/plugins/hooks/notifications/contentReviewAfterCreate.d.ts +2 -0
  109. package/plugins/hooks/notifications/contentReviewAfterCreate.js +94 -0
  110. package/plugins/hooks/notifications/contentReviewAfterCreate.js.map +1 -0
  111. package/plugins/hooks/notifications/contentReviewUrl.d.ts +7 -0
  112. package/plugins/hooks/notifications/contentReviewUrl.js +26 -0
  113. package/plugins/hooks/notifications/contentReviewUrl.js.map +1 -0
  114. package/plugins/hooks/notifications/contentUrl.d.ts +7 -0
  115. package/plugins/hooks/notifications/contentUrl.js +24 -0
  116. package/plugins/hooks/notifications/contentUrl.js.map +1 -0
  117. package/plugins/hooks/notifications/lastChangeRequestNotificationPlugin.d.ts +11 -0
  118. package/plugins/hooks/notifications/lastChangeRequestNotificationPlugin.js +21 -0
  119. package/plugins/hooks/notifications/lastChangeRequestNotificationPlugin.js.map +1 -0
  120. package/plugins/hooks/notifications/lastCommentNotificationPlugin.d.ts +11 -0
  121. package/plugins/hooks/notifications/lastCommentNotificationPlugin.js +21 -0
  122. package/plugins/hooks/notifications/lastCommentNotificationPlugin.js.map +1 -0
  123. package/plugins/hooks/notifications/lastContentReviewNotificationPlugin.d.ts +11 -0
  124. package/plugins/hooks/notifications/lastContentReviewNotificationPlugin.js +21 -0
  125. package/plugins/hooks/notifications/lastContentReviewNotificationPlugin.js.map +1 -0
  126. package/plugins/hooks/notifications/reviewers.d.ts +15 -0
  127. package/plugins/hooks/notifications/reviewers.js +45 -0
  128. package/plugins/hooks/notifications/reviewers.js.map +1 -0
  129. package/plugins/hooks/notifications/sendChangeRequestNotification.d.ts +2 -0
  130. package/plugins/hooks/notifications/sendChangeRequestNotification.js +41 -0
  131. package/plugins/hooks/notifications/sendChangeRequestNotification.js.map +1 -0
  132. package/plugins/hooks/notifications/sendCommentNotification.d.ts +2 -0
  133. package/plugins/hooks/notifications/sendCommentNotification.js +41 -0
  134. package/plugins/hooks/notifications/sendCommentNotification.js.map +1 -0
  135. package/plugins/hooks/notifications/sendContentReviewNotification.d.ts +2 -0
  136. package/plugins/hooks/notifications/sendContentReviewNotification.js +41 -0
  137. package/plugins/hooks/notifications/sendContentReviewNotification.js.map +1 -0
  138. package/plugins/hooks/updatePendingChangeRequests.js +7 -19
  139. package/plugins/hooks/updatePendingChangeRequests.js.map +1 -1
  140. package/plugins/hooks/updateTotalComments.js +14 -27
  141. package/plugins/hooks/updateTotalComments.js.map +1 -1
  142. package/plugins/hooks/validateChangeRequest.js +27 -18
  143. package/plugins/hooks/validateChangeRequest.js.map +1 -1
  144. package/plugins/hooks/validateComment.js +13 -14
  145. package/plugins/hooks/validateComment.js.map +1 -1
  146. package/plugins/hooks/validateContentReview.js +2 -8
  147. package/plugins/hooks/validateContentReview.js.map +1 -1
  148. package/plugins/pageBuilder/PageApwSettingsGetterPlugin.js +1 -16
  149. package/plugins/pageBuilder/PageApwSettingsGetterPlugin.js.map +1 -1
  150. package/plugins/pageBuilder/apwContentPagePlugins.js +0 -4
  151. package/plugins/pageBuilder/apwContentPagePlugins.js.map +1 -1
  152. package/plugins/pageBuilder/extendPbPageSettingsSchema.js +1 -6
  153. package/plugins/pageBuilder/extendPbPageSettingsSchema.js.map +1 -1
  154. package/plugins/pageBuilder/index.js +5 -8
  155. package/plugins/pageBuilder/index.js.map +1 -1
  156. package/plugins/pageBuilder/linkContentReviewToPage.js +38 -42
  157. package/plugins/pageBuilder/linkContentReviewToPage.js.map +1 -1
  158. package/plugins/pageBuilder/linkWorkflowToPage.js +14 -32
  159. package/plugins/pageBuilder/linkWorkflowToPage.js.map +1 -1
  160. package/plugins/pageBuilder/notifications/changeRequestNotification.d.ts +1 -0
  161. package/plugins/pageBuilder/notifications/changeRequestNotification.js +31 -0
  162. package/plugins/pageBuilder/notifications/changeRequestNotification.js.map +1 -0
  163. package/plugins/pageBuilder/notifications/commentNotification.d.ts +1 -0
  164. package/plugins/pageBuilder/notifications/commentNotification.js +31 -0
  165. package/plugins/pageBuilder/notifications/commentNotification.js.map +1 -0
  166. package/plugins/pageBuilder/notifications/contentReviewNotification.d.ts +1 -0
  167. package/plugins/pageBuilder/notifications/contentReviewNotification.js +31 -0
  168. package/plugins/pageBuilder/notifications/contentReviewNotification.js.map +1 -0
  169. package/plugins/pageBuilder/notifications/contentUrl.d.ts +1 -0
  170. package/plugins/pageBuilder/notifications/contentUrl.js +47 -0
  171. package/plugins/pageBuilder/notifications/contentUrl.js.map +1 -0
  172. package/plugins/pageBuilder/triggerContentReview.js +3 -14
  173. package/plugins/pageBuilder/triggerContentReview.js.map +1 -1
  174. package/plugins/pageBuilder/updateContentReviewStatus.js +10 -26
  175. package/plugins/pageBuilder/updateContentReviewStatus.js.map +1 -1
  176. package/plugins/pageBuilder/utils.js +2 -36
  177. package/plugins/pageBuilder/utils.js.map +1 -1
  178. package/plugins/utils.d.ts +1 -1
  179. package/plugins/utils.js +4 -57
  180. package/plugins/utils.js.map +1 -1
  181. package/scheduler/createScheduleActionMethods.js +15 -36
  182. package/scheduler/createScheduleActionMethods.js.map +1 -1
  183. package/scheduler/handlers/executeAction/index.d.ts +1 -1
  184. package/scheduler/handlers/executeAction/index.js +45 -39
  185. package/scheduler/handlers/executeAction/index.js.map +1 -1
  186. package/scheduler/handlers/executeAction/plugins/ApplicationGraphQL.d.ts +6 -0
  187. package/scheduler/handlers/executeAction/plugins/ApplicationGraphQL.js +15 -6
  188. package/scheduler/handlers/executeAction/plugins/ApplicationGraphQL.js.map +1 -1
  189. package/scheduler/handlers/executeAction/plugins/HeadlessCMSGraphQL.d.ts +2 -3
  190. package/scheduler/handlers/executeAction/plugins/HeadlessCMSGraphQL.js +8 -24
  191. package/scheduler/handlers/executeAction/plugins/HeadlessCMSGraphQL.js.map +1 -1
  192. package/scheduler/handlers/executeAction/plugins/PageBuilderGraphQL.d.ts +2 -2
  193. package/scheduler/handlers/executeAction/plugins/PageBuilderGraphQL.js +8 -87
  194. package/scheduler/handlers/executeAction/plugins/PageBuilderGraphQL.js.map +1 -1
  195. package/scheduler/handlers/executeAction/security.js +0 -11
  196. package/scheduler/handlers/executeAction/security.js.map +1 -1
  197. package/scheduler/handlers/scheduleAction/index.js +21 -38
  198. package/scheduler/handlers/scheduleAction/index.js.map +1 -1
  199. package/scheduler/handlers/scheduleAction/scheduleAction.utils.js +9 -32
  200. package/scheduler/handlers/scheduleAction/scheduleAction.utils.js.map +1 -1
  201. package/scheduler/handlers/utils.d.ts +0 -1
  202. package/scheduler/handlers/utils.js +4 -42
  203. package/scheduler/handlers/utils.js.map +1 -1
  204. package/scheduler/index.js +0 -3
  205. package/scheduler/index.js.map +1 -1
  206. package/scheduler/types.d.ts +2 -20
  207. package/scheduler/types.js +12 -23
  208. package/scheduler/types.js.map +1 -1
  209. package/storageOperations/changeRequestStorageOperations.js +22 -45
  210. package/storageOperations/changeRequestStorageOperations.js.map +1 -1
  211. package/storageOperations/commentStorageOperations.js +25 -50
  212. package/storageOperations/commentStorageOperations.js.map +1 -1
  213. package/storageOperations/contentReviewStorageOperations.js +22 -43
  214. package/storageOperations/contentReviewStorageOperations.js.map +1 -1
  215. package/storageOperations/index.js +5 -23
  216. package/storageOperations/index.js.map +1 -1
  217. package/storageOperations/models/changeRequest.model.js +0 -9
  218. package/storageOperations/models/changeRequest.model.js.map +1 -1
  219. package/storageOperations/models/comment.model.js +0 -8
  220. package/storageOperations/models/comment.model.js.map +1 -1
  221. package/storageOperations/models/contentModelPluginFactory.d.ts +3 -10
  222. package/storageOperations/models/contentModelPluginFactory.js +5 -17
  223. package/storageOperations/models/contentModelPluginFactory.js.map +1 -1
  224. package/storageOperations/models/contentReview.model.js +6 -31
  225. package/storageOperations/models/contentReview.model.js.map +1 -1
  226. package/storageOperations/models/index.js +3 -29
  227. package/storageOperations/models/index.js.map +1 -1
  228. package/storageOperations/models/reviewer.model.js +17 -9
  229. package/storageOperations/models/reviewer.model.js.map +1 -1
  230. package/storageOperations/models/utils.js +3 -6
  231. package/storageOperations/models/utils.js.map +1 -1
  232. package/storageOperations/models/workflow.model.js +0 -23
  233. package/storageOperations/models/workflow.model.js.map +1 -1
  234. package/storageOperations/reviewerStorageOperations.js +22 -40
  235. package/storageOperations/reviewerStorageOperations.js.map +1 -1
  236. package/storageOperations/workflowStorageOperations.js +25 -48
  237. package/storageOperations/workflowStorageOperations.js.map +1 -1
  238. package/types.d.ts +104 -88
  239. package/types.js +124 -42
  240. package/types.js.map +1 -1
  241. package/utils/contentApwSettingsPlugin.js +0 -6
  242. package/utils/contentApwSettingsPlugin.js.map +1 -1
  243. package/utils/errors.js +1 -18
  244. package/utils/errors.js.map +1 -1
  245. package/utils/fieldResolver.js +5 -21
  246. package/utils/fieldResolver.js.map +1 -1
  247. package/utils/resolve.js +0 -3
  248. package/utils/resolve.js.map +1 -1
package/types.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { CmsContext, CmsEntry as BaseCmsEntry, CmsModel, BeforeEntryPublishTopicParams, AfterEntryPublishTopicParams, AfterEntryUnpublishTopicParams } from "@webiny/api-headless-cms/types";
2
- import { Page, OnBeforePageCreateTopicParams, OnBeforePageCreateFromTopicParams, OnBeforePageUpdateTopicParams, OnBeforePagePublishTopicParams, OnBeforePageRequestReviewTopicParams, PageSettings } from "@webiny/api-page-builder/types";
1
+ import { CmsEntry as BaseCmsEntry, OnEntryBeforePublishTopicParams, OnEntryAfterPublishTopicParams, OnEntryAfterUnpublishTopicParams } from "@webiny/api-headless-cms/types";
2
+ import { Page, OnPageBeforeCreateTopicParams, OnPageBeforeCreateFromTopicParams, OnPageBeforeUpdateTopicParams, OnPageBeforePublishTopicParams, PageSettings } from "@webiny/api-page-builder/types";
3
3
  import { Context } from "@webiny/api/types";
4
4
  import { PageBuilderContextObject } from "@webiny/api-page-builder/graphql/types";
5
5
  import { SecurityIdentity, SecurityPermission } from "@webiny/api-security/types";
@@ -10,6 +10,9 @@ import { ApwScheduleActionCrud, ScheduleActionContext } from "./scheduler/types"
10
10
  import HandlerClient from "@webiny/handler-client/HandlerClient";
11
11
  import { PluginsContainer } from "@webiny/plugins";
12
12
  import { WcpContextObject } from "@webiny/api-wcp/types";
13
+ import { MailerContext } from "@webiny/api-mailer/types";
14
+ import { AdminSettingsContext } from "@webiny/api-admin-settings/types";
15
+ import { CmsPrivateModelFull } from "@webiny/api-headless-cms";
13
16
  export interface ApwCmsEntry extends BaseCmsEntry {
14
17
  title: string;
15
18
  meta: {
@@ -75,11 +78,10 @@ export interface PageSettingsWithWorkflow extends PageSettings {
75
78
  export interface PageWithWorkflow extends Page {
76
79
  settings: PageSettingsWithWorkflow;
77
80
  }
78
- export declare type ApwOnBeforePageCreateTopicParams = OnBeforePageCreateTopicParams<PageWithWorkflow>;
79
- export declare type ApwOnBeforePageCreateFromTopicParams = OnBeforePageCreateFromTopicParams<PageWithWorkflow>;
80
- export declare type ApwOnBeforePageUpdateTopicParams = OnBeforePageUpdateTopicParams<PageWithWorkflow>;
81
- export declare type ApwOnBeforePagePublishTopicParams = OnBeforePagePublishTopicParams<PageWithWorkflow>;
82
- export declare type ApwOnBeforePageRequestReviewTopicParams = OnBeforePageRequestReviewTopicParams<PageWithWorkflow>;
81
+ export declare type ApwOnPageBeforeCreateTopicParams = OnPageBeforeCreateTopicParams<PageWithWorkflow>;
82
+ export declare type ApwOnPageBeforeCreateFromTopicParams = OnPageBeforeCreateFromTopicParams<PageWithWorkflow>;
83
+ export declare type ApwOnPageBeforeUpdateTopicParams = OnPageBeforeUpdateTopicParams<PageWithWorkflow>;
84
+ export declare type ApwOnPageBeforePublishTopicParams = OnPageBeforePublishTopicParams<PageWithWorkflow>;
83
85
  export declare enum WorkflowScopeTypes {
84
86
  DEFAULT = "default",
85
87
  CUSTOM = "custom"
@@ -98,7 +100,7 @@ export declare enum ApwWorkflowApplications {
98
100
  *
99
101
  * @category General
100
102
  */
101
- export interface CreatedBy {
103
+ export interface ApwIdentity {
102
104
  /**
103
105
  * ID if the user.
104
106
  */
@@ -114,14 +116,19 @@ export interface CreatedBy {
114
116
  }
115
117
  export interface ApwBaseFields {
116
118
  id: string;
119
+ entryId: string;
117
120
  createdOn: string;
118
121
  savedOn: string;
119
- createdBy: CreatedBy;
122
+ createdBy: ApwIdentity;
120
123
  }
121
124
  export interface ApwReviewer extends ApwBaseFields {
122
125
  identityId: string;
123
126
  displayName: string | null;
124
127
  type: string;
128
+ email?: string;
129
+ }
130
+ export interface ApwReviewerWithEmail extends Omit<ApwReviewer, "email"> {
131
+ email: string;
125
132
  }
126
133
  export interface ApwComment extends ApwBaseFields {
127
134
  body: Record<string, any>;
@@ -145,14 +152,15 @@ export interface ApwContentReviewStep {
145
152
  pendingChangeRequests: number;
146
153
  totalComments: number;
147
154
  signOffProvidedOn: string | null;
148
- signOffProvidedBy: CreatedBy | null;
155
+ signOffProvidedBy: ApwIdentity | null;
149
156
  }
150
157
  export interface ApwContentReview extends ApwBaseFields {
151
158
  title: string;
152
- status: ApwContentReviewStatus;
159
+ reviewStatus: ApwContentReviewStatus;
153
160
  content: ApwContentReviewContent;
154
161
  steps: Array<ApwContentReviewStep>;
155
162
  latestCommentId: string | null;
163
+ workflowId: string;
156
164
  }
157
165
  export interface ApwWorkflow extends ApwBaseFields {
158
166
  title: string;
@@ -206,15 +214,10 @@ export interface UpdateApwWorkflowParams<TReviewer = string> {
206
214
  steps?: ApwWorkflowStep<TReviewer>[];
207
215
  }
208
216
  export interface ListWorkflowsParams extends ListParams {
209
- where: ListWhere & {
217
+ where?: ListWhere & {
210
218
  app?: ApwWorkflowApplications;
211
219
  };
212
220
  }
213
- interface CreateReviewerParams {
214
- identityId: string;
215
- displayName: string | null;
216
- type: string;
217
- }
218
221
  interface CreateApwCommentParams {
219
222
  body: Record<string, any>;
220
223
  changeRequest: string;
@@ -265,11 +268,13 @@ export interface ApwContentReviewContent {
265
268
  }
266
269
  export interface CreateApwContentReviewParams {
267
270
  content: ApwContentReviewContent;
271
+ reviewStatus: ApwContentReviewStatus;
272
+ workflowId?: string;
268
273
  }
269
- interface UpdateApwContentReviewParams {
274
+ export interface UpdateApwContentReviewParams {
270
275
  title?: string;
271
276
  steps?: ApwContentReviewStep[];
272
- status?: ApwContentReviewStatus;
277
+ reviewStatus?: ApwContentReviewStatus;
273
278
  content?: ApwContentReviewContent;
274
279
  }
275
280
  interface BaseApwCrud<TEntry, TCreateEntryParams, TUpdateEntryParams> {
@@ -279,33 +284,33 @@ interface BaseApwCrud<TEntry, TCreateEntryParams, TUpdateEntryParams> {
279
284
  delete(id: string): Promise<Boolean>;
280
285
  }
281
286
  export interface ApwWorkflowCrud extends BaseApwCrud<ApwWorkflow, CreateApwWorkflowParams, UpdateApwWorkflowParams> {
282
- list(params: ListWorkflowsParams): Promise<[ApwWorkflow[], ListMeta]>;
287
+ list(params?: ListWorkflowsParams): Promise<[ApwWorkflow[], ListMeta]>;
283
288
  /**
284
289
  * Lifecycle events
285
290
  */
286
- onBeforeWorkflowCreate: Topic<OnBeforeWorkflowCreateTopicParams>;
287
- onAfterWorkflowCreate: Topic<OnAfterWorkflowCreateTopicParams>;
288
- onBeforeWorkflowUpdate: Topic<OnBeforeWorkflowUpdateTopicParams>;
289
- onAfterWorkflowUpdate: Topic<OnAfterWorkflowUpdateTopicParams>;
290
- onBeforeWorkflowDelete: Topic<OnBeforeWorkflowDeleteTopicParams>;
291
- onAfterWorkflowDelete: Topic<OnAfterWorkflowDeleteTopicParams>;
291
+ onWorkflowBeforeCreate: Topic<OnWorkflowBeforeCreateTopicParams>;
292
+ onWorkflowAfterCreate: Topic<OnWorkflowAfterCreateTopicParams>;
293
+ onWorkflowBeforeUpdate: Topic<OnWorkflowBeforeUpdateTopicParams>;
294
+ onWorkflowAfterUpdate: Topic<OnWorkflowAfterUpdateTopicParams>;
295
+ onWorkflowBeforeDelete: Topic<OnWorkflowBeforeDeleteTopicParams>;
296
+ onWorkflowAfterDelete: Topic<OnWorkflowAfterDeleteTopicParams>;
292
297
  }
293
298
  export interface ApwReviewerListParams extends ListParams {
294
299
  where: ListParams["where"] & {
295
300
  identityId?: string;
296
301
  };
297
302
  }
298
- export interface ApwReviewerCrud extends BaseApwCrud<ApwReviewer, CreateReviewerParams, UpdateApwReviewerData> {
303
+ export interface ApwReviewerCrud extends BaseApwCrud<ApwReviewer, CreateApwReviewerData, UpdateApwReviewerData> {
299
304
  list(params: ApwReviewerListParams): Promise<[ApwReviewer[], ListMeta]>;
300
305
  /**
301
306
  * Lifecycle events
302
307
  */
303
- onBeforeReviewerCreate: Topic<OnBeforeReviewerCreateTopicParams>;
304
- onAfterReviewerCreate: Topic<OnAfterReviewerCreateTopicParams>;
305
- onBeforeReviewerUpdate: Topic<OnBeforeReviewerUpdateTopicParams>;
306
- onAfterReviewerUpdate: Topic<OnAfterReviewerUpdateTopicParams>;
307
- onBeforeReviewerDelete: Topic<OnBeforeReviewerDeleteTopicParams>;
308
- onAfterReviewerDelete: Topic<OnAfterReviewerDeleteTopicParams>;
308
+ onReviewerBeforeCreate: Topic<OnReviewerBeforeCreateTopicParams>;
309
+ onReviewerAfterCreate: Topic<OnReviewerAfterCreateTopicParams>;
310
+ onReviewerBeforeUpdate: Topic<OnReviewerBeforeUpdateTopicParams>;
311
+ onReviewerAfterUpdate: Topic<OnReviewerAfterUpdateTopicParams>;
312
+ onReviewerBeforeDelete: Topic<OnReviewerBeforeDeleteTopicParams>;
313
+ onReviewerAfterDelete: Topic<OnReviewerAfterDeleteTopicParams>;
309
314
  }
310
315
  export interface ApwCommentListParams extends ListParams {
311
316
  where: ListParams["where"] & {
@@ -319,12 +324,12 @@ export interface ApwCommentCrud extends BaseApwCrud<ApwComment, CreateApwComment
319
324
  /**
320
325
  * Lifecycle events
321
326
  */
322
- onBeforeCommentCreate: Topic<OnBeforeCommentCreateTopicParams>;
323
- onAfterCommentCreate: Topic<OnAfterCommentCreateTopicParams>;
324
- onBeforeCommentUpdate: Topic<OnBeforeCommentUpdateTopicParams>;
325
- onAfterCommentUpdate: Topic<OnAfterCommentUpdateTopicParams>;
326
- onBeforeCommentDelete: Topic<OnBeforeCommentDeleteTopicParams>;
327
- onAfterCommentDelete: Topic<OnAfterCommentDeleteTopicParams>;
327
+ onCommentBeforeCreate: Topic<OnCommentBeforeCreateTopicParams>;
328
+ onCommentAfterCreate: Topic<OnCommentAfterCreateTopicParams>;
329
+ onCommentBeforeUpdate: Topic<OnCommentBeforeUpdateTopicParams>;
330
+ onCommentAfterUpdate: Topic<OnCommentAfterUpdateTopicParams>;
331
+ onCommentBeforeDelete: Topic<OnCommentBeforeDeleteTopicParams>;
332
+ onCommentAfterDelete: Topic<OnCommentAfterDeleteTopicParams>;
328
333
  }
329
334
  export interface ApwChangeRequestListParams extends ListParams {
330
335
  where: ListParams["where"] & {
@@ -336,12 +341,12 @@ export interface ApwChangeRequestCrud extends BaseApwCrud<ApwChangeRequest, Crea
336
341
  /**
337
342
  * Lifecycle events
338
343
  */
339
- onBeforeChangeRequestCreate: Topic<OnBeforeChangeRequestCreateTopicParams>;
340
- onAfterChangeRequestCreate: Topic<OnAfterChangeRequestCreateTopicParams>;
341
- onBeforeChangeRequestUpdate: Topic<OnBeforeChangeRequestUpdateTopicParams>;
342
- onAfterChangeRequestUpdate: Topic<OnAfterChangeRequestUpdateTopicParams>;
343
- onBeforeChangeRequestDelete: Topic<OnBeforeChangeRequestDeleteTopicParams>;
344
- onAfterChangeRequestDelete: Topic<OnAfterChangeRequestDeleteTopicParams>;
344
+ onChangeRequestBeforeCreate: Topic<OnChangeRequestBeforeCreateTopicParams>;
345
+ onChangeRequestAfterCreate: Topic<OnChangeRequestAfterCreateTopicParams>;
346
+ onChangeRequestBeforeUpdate: Topic<OnChangeRequestBeforeUpdateTopicParams>;
347
+ onChangeRequestAfterUpdate: Topic<OnChangeRequestAfterUpdateTopicParams>;
348
+ onChangeRequestBeforeDelete: Topic<OnChangeRequestBeforeDeleteTopicParams>;
349
+ onChangeRequestAfterDelete: Topic<OnChangeRequestAfterDeleteTopicParams>;
345
350
  }
346
351
  export interface ApwContentReviewCrud extends BaseApwCrud<ApwContentReview, CreateApwContentReviewParams, UpdateApwContentReviewParams> {
347
352
  list(params: ApwContentReviewListParams): Promise<[ApwContentReview[], ListMeta]>;
@@ -358,12 +363,13 @@ export interface ApwContentReviewCrud extends BaseApwCrud<ApwContentReview, Crea
358
363
  /**
359
364
  * Lifecycle events
360
365
  */
361
- onBeforeContentReviewCreate: Topic<OnBeforeContentReviewCreateTopicParams>;
362
- onAfterContentReviewCreate: Topic<OnAfterContentReviewCreateTopicParams>;
363
- onBeforeContentReviewUpdate: Topic<OnBeforeContentReviewUpdateTopicParams>;
364
- onAfterContentReviewUpdate: Topic<OnAfterContentReviewUpdateTopicParams>;
365
- onBeforeContentReviewDelete: Topic<OnBeforeContentReviewDeleteTopicParams>;
366
- onAfterContentReviewDelete: Topic<OnAfterContentReviewDeleteTopicParams>;
366
+ onContentReviewBeforeCreate: Topic<OnContentReviewBeforeCreateTopicParams>;
367
+ onContentReviewAfterCreate: Topic<OnContentReviewAfterCreateTopicParams>;
368
+ onContentReviewBeforeUpdate: Topic<OnContentReviewBeforeUpdateTopicParams>;
369
+ onContentReviewAfterUpdate: Topic<OnContentReviewAfterUpdateTopicParams>;
370
+ onContentReviewBeforeDelete: Topic<OnContentReviewBeforeDeleteTopicParams>;
371
+ onContentReviewAfterDelete: Topic<OnContentReviewAfterDeleteTopicParams>;
372
+ onContentReviewBeforeList: Topic<OnContentReviewBeforeListTopicParams>;
367
373
  }
368
374
  export declare type ContentGetter = (id: string, settings: {
369
375
  modelId?: string;
@@ -388,7 +394,7 @@ export interface AdvancedPublishingWorkflow {
388
394
  contentReview: ApwContentReviewCrud;
389
395
  scheduleAction: ApwScheduleActionCrud;
390
396
  }
391
- export interface ApwContext extends Context, CmsContext {
397
+ export interface ApwContext extends Context, MailerContext, AdminSettingsContext {
392
398
  apw: AdvancedPublishingWorkflow;
393
399
  pageBuilder: PageBuilderContextObject;
394
400
  wcp: WcpContextObject;
@@ -417,11 +423,13 @@ interface CreateApwReviewerData {
417
423
  identityId: string;
418
424
  displayName: string | null;
419
425
  type: string;
426
+ email?: string | null;
420
427
  }
421
428
  interface UpdateApwReviewerData {
422
429
  identityId: string;
423
430
  displayName: string | null;
424
431
  type: string;
432
+ email?: string | null;
425
433
  }
426
434
  interface StorageOperationsCreateReviewerParams {
427
435
  data: CreateApwReviewerData;
@@ -451,10 +459,12 @@ interface StorageOperationsUpdateWorkflowParams {
451
459
  declare type StorageOperationsDeleteWorkflowParams = StorageOperationsDeleteParams;
452
460
  declare type StorageOperationsGetContentReviewParams = StorageOperationsGetParams;
453
461
  export interface ApwContentReviewListParams extends ListParams {
454
- where?: ListWhere & {
455
- status?: ApwContentReviewListFilter;
462
+ where: ListWhere & {
463
+ reviewStatus?: ApwContentReviewListFilter;
456
464
  title?: string;
457
465
  title_contains?: string;
466
+ workflowId?: string;
467
+ workflowId_in?: string[];
458
468
  };
459
469
  }
460
470
  declare type StorageOperationsListContentReviewsParams = ApwContentReviewListParams;
@@ -526,26 +536,26 @@ export interface ApwStorageOperations extends ApwReviewerStorageOperations, ApwW
526
536
  /**
527
537
  * @category Lifecycle events
528
538
  */
529
- export interface OnBeforeCommentCreateTopicParams {
539
+ export interface OnCommentBeforeCreateTopicParams {
530
540
  input: CreateApwCommentParams;
531
541
  }
532
542
  /**
533
543
  * @category Lifecycle events
534
544
  */
535
- export interface OnAfterCommentCreateTopicParams {
545
+ export interface OnCommentAfterCreateTopicParams {
536
546
  comment: ApwComment;
537
547
  }
538
548
  /**
539
549
  * @category Lifecycle events
540
550
  */
541
- export interface OnBeforeCommentUpdateTopicParams {
551
+ export interface OnCommentBeforeUpdateTopicParams {
542
552
  original: ApwComment;
543
553
  input: Record<string, any>;
544
554
  }
545
555
  /**
546
556
  * @category Lifecycle events
547
557
  */
548
- export interface OnAfterCommentUpdateTopicParams {
558
+ export interface OnCommentAfterUpdateTopicParams {
549
559
  original: ApwComment;
550
560
  comment: ApwComment;
551
561
  input: Record<string, any>;
@@ -553,38 +563,38 @@ export interface OnAfterCommentUpdateTopicParams {
553
563
  /**
554
564
  * @category Lifecycle events
555
565
  */
556
- export interface OnBeforeCommentDeleteTopicParams {
566
+ export interface OnCommentBeforeDeleteTopicParams {
557
567
  comment: ApwComment;
558
568
  }
559
569
  /**
560
570
  * @category Lifecycle events
561
571
  */
562
- export interface OnAfterCommentDeleteTopicParams {
572
+ export interface OnCommentAfterDeleteTopicParams {
563
573
  comment: ApwComment;
564
574
  }
565
575
  /**
566
576
  * @category Lifecycle events
567
577
  */
568
- export interface OnBeforeChangeRequestCreateTopicParams {
578
+ export interface OnChangeRequestBeforeCreateTopicParams {
569
579
  input: CreateApwChangeRequestParams;
570
580
  }
571
581
  /**
572
582
  * @category Lifecycle events
573
583
  */
574
- export interface OnAfterChangeRequestCreateTopicParams {
584
+ export interface OnChangeRequestAfterCreateTopicParams {
575
585
  changeRequest: ApwChangeRequest;
576
586
  }
577
587
  /**
578
588
  * @category Lifecycle events
579
589
  */
580
- export interface OnBeforeChangeRequestUpdateTopicParams {
590
+ export interface OnChangeRequestBeforeUpdateTopicParams {
581
591
  original: ApwChangeRequest;
582
592
  input: Record<string, any>;
583
593
  }
584
594
  /**
585
595
  * @category Lifecycle events
586
596
  */
587
- export interface OnAfterChangeRequestUpdateTopicParams {
597
+ export interface OnChangeRequestAfterUpdateTopicParams {
588
598
  original: ApwChangeRequest;
589
599
  changeRequest: ApwChangeRequest;
590
600
  input: Record<string, any>;
@@ -592,38 +602,38 @@ export interface OnAfterChangeRequestUpdateTopicParams {
592
602
  /**
593
603
  * @category Lifecycle events
594
604
  */
595
- export interface OnBeforeChangeRequestDeleteTopicParams {
605
+ export interface OnChangeRequestBeforeDeleteTopicParams {
596
606
  changeRequest: ApwChangeRequest;
597
607
  }
598
608
  /**
599
609
  * @category Lifecycle events
600
610
  */
601
- export interface OnAfterChangeRequestDeleteTopicParams {
611
+ export interface OnChangeRequestAfterDeleteTopicParams {
602
612
  changeRequest: ApwChangeRequest;
603
613
  }
604
614
  /**
605
615
  * @category Lifecycle events
606
616
  */
607
- export interface OnBeforeContentReviewCreateTopicParams {
617
+ export interface OnContentReviewBeforeCreateTopicParams {
608
618
  input: CreateApwContentReviewParams;
609
619
  }
610
620
  /**
611
621
  * @category Lifecycle events
612
622
  */
613
- export interface OnAfterContentReviewCreateTopicParams {
623
+ export interface OnContentReviewAfterCreateTopicParams {
614
624
  contentReview: ApwContentReview;
615
625
  }
616
626
  /**
617
627
  * @category Lifecycle events
618
628
  */
619
- export interface OnBeforeContentReviewUpdateTopicParams {
629
+ export interface OnContentReviewBeforeUpdateTopicParams {
620
630
  original: ApwContentReview;
621
631
  input: Record<string, any>;
622
632
  }
623
633
  /**
624
634
  * @category Lifecycle events
625
635
  */
626
- export interface OnAfterContentReviewUpdateTopicParams {
636
+ export interface OnContentReviewAfterUpdateTopicParams {
627
637
  original: ApwContentReview;
628
638
  contentReview: ApwContentReview;
629
639
  input: Record<string, any>;
@@ -631,41 +641,47 @@ export interface OnAfterContentReviewUpdateTopicParams {
631
641
  /**
632
642
  * @category Lifecycle events
633
643
  */
634
- export interface OnBeforeContentReviewDeleteTopicParams {
644
+ export interface OnContentReviewBeforeDeleteTopicParams {
635
645
  contentReview: ApwContentReview;
636
646
  }
637
647
  /**
638
648
  * @category Lifecycle events
639
649
  */
640
- export interface OnAfterContentReviewDeleteTopicParams {
650
+ export interface OnContentReviewAfterDeleteTopicParams {
641
651
  contentReview: ApwContentReview;
642
652
  }
653
+ /**
654
+ * @category Lifecycle events
655
+ */
656
+ export interface OnContentReviewBeforeListTopicParams {
657
+ where: ApwContentReviewListParams["where"];
658
+ }
643
659
  export interface CreateApwReviewerParams {
644
660
  type: string;
645
661
  }
646
662
  /**
647
663
  * @category Lifecycle events
648
664
  */
649
- export interface OnBeforeReviewerCreateTopicParams {
665
+ export interface OnReviewerBeforeCreateTopicParams {
650
666
  input: CreateApwReviewerParams;
651
667
  }
652
668
  /**
653
669
  * @category Lifecycle events
654
670
  */
655
- export interface OnAfterReviewerCreateTopicParams {
671
+ export interface OnReviewerAfterCreateTopicParams {
656
672
  reviewer: ApwReviewer;
657
673
  }
658
674
  /**
659
675
  * @category Lifecycle events
660
676
  */
661
- export interface OnBeforeReviewerUpdateTopicParams {
677
+ export interface OnReviewerBeforeUpdateTopicParams {
662
678
  original: ApwReviewer;
663
679
  input: Record<string, any>;
664
680
  }
665
681
  /**
666
682
  * @category Lifecycle events
667
683
  */
668
- export interface OnAfterReviewerUpdateTopicParams {
684
+ export interface OnReviewerAfterUpdateTopicParams {
669
685
  original: ApwReviewer;
670
686
  reviewer: ApwReviewer;
671
687
  input: Record<string, any>;
@@ -673,38 +689,38 @@ export interface OnAfterReviewerUpdateTopicParams {
673
689
  /**
674
690
  * @category Lifecycle events
675
691
  */
676
- export interface OnBeforeReviewerDeleteTopicParams {
692
+ export interface OnReviewerBeforeDeleteTopicParams {
677
693
  reviewer: ApwReviewer;
678
694
  }
679
695
  /**
680
696
  * @category Lifecycle events
681
697
  */
682
- export interface OnAfterReviewerDeleteTopicParams {
698
+ export interface OnReviewerAfterDeleteTopicParams {
683
699
  reviewer: ApwReviewer;
684
700
  }
685
701
  /**
686
702
  * @category Lifecycle events
687
703
  */
688
- export interface OnBeforeWorkflowCreateTopicParams {
704
+ export interface OnWorkflowBeforeCreateTopicParams {
689
705
  input: CreateApwWorkflowParams;
690
706
  }
691
707
  /**
692
708
  * @category Lifecycle events
693
709
  */
694
- export interface OnAfterWorkflowCreateTopicParams {
710
+ export interface OnWorkflowAfterCreateTopicParams {
695
711
  workflow: ApwWorkflow;
696
712
  }
697
713
  /**
698
714
  * @category Lifecycle events
699
715
  */
700
- export interface OnBeforeWorkflowUpdateTopicParams {
716
+ export interface OnWorkflowBeforeUpdateTopicParams {
701
717
  original: ApwWorkflow;
702
718
  input: Record<string, any>;
703
719
  }
704
720
  /**
705
721
  * @category Lifecycle events
706
722
  */
707
- export interface OnAfterWorkflowUpdateTopicParams {
723
+ export interface OnWorkflowAfterUpdateTopicParams {
708
724
  original: ApwWorkflow;
709
725
  workflow: ApwWorkflow;
710
726
  input: Record<string, any>;
@@ -712,26 +728,26 @@ export interface OnAfterWorkflowUpdateTopicParams {
712
728
  /**
713
729
  * @category Lifecycle events
714
730
  */
715
- export interface OnBeforeWorkflowDeleteTopicParams {
731
+ export interface OnWorkflowBeforeDeleteTopicParams {
716
732
  workflow: ApwWorkflow;
717
733
  }
718
734
  /**
719
735
  * @category Lifecycle events
720
736
  */
721
- export interface OnAfterWorkflowDeleteTopicParams {
737
+ export interface OnWorkflowAfterDeleteTopicParams {
722
738
  workflow: ApwWorkflow;
723
739
  }
724
- export declare type WorkflowModelDefinition = Pick<CmsModel, "name" | "modelId" | "layout" | "titleFieldId" | "description" | "fields" | "isPrivate">;
740
+ export declare type WorkflowModelDefinition = Omit<CmsPrivateModelFull, "noValidate" | "group">;
725
741
  /**
726
742
  * Headless CMS
727
743
  */
728
- export interface OnBeforeCmsEntryPublishTopicParams extends Omit<BeforeEntryPublishTopicParams, "entry"> {
744
+ export interface OnCmsEntryBeforePublishTopicParams extends Omit<OnEntryBeforePublishTopicParams, "entry"> {
729
745
  entry: ApwCmsEntry;
730
746
  }
731
- export interface OnAfterCmsEntryPublishTopicParams extends Omit<AfterEntryPublishTopicParams, "entry"> {
747
+ export interface OnCmsEntryAfterPublishTopicParams extends Omit<OnEntryAfterPublishTopicParams, "entry"> {
732
748
  entry: ApwCmsEntry;
733
749
  }
734
- export interface OnAfterCmsEntryUnpublishTopicParams extends Omit<AfterEntryUnpublishTopicParams, "entry"> {
750
+ export interface OnCmsEntryAfterUnpublishTopicParams extends Omit<OnEntryAfterUnpublishTopicParams, "entry"> {
735
751
  entry: ApwCmsEntry;
736
752
  }
737
753
  export {};