@webiny/api-apw 0.0.0-unstable.5e7233243f → 0.0.0-unstable.6e5425ee89
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ApwChangeRequestNotification.d.ts +27 -0
- package/ApwChangeRequestNotification.js +30 -0
- package/ApwChangeRequestNotification.js.map +1 -0
- package/ApwCommentNotification.d.ts +27 -0
- package/ApwCommentNotification.js +30 -0
- package/ApwCommentNotification.js.map +1 -0
- package/ApwContentReviewNotification.d.ts +26 -0
- package/ApwContentReviewNotification.js +30 -0
- package/ApwContentReviewNotification.js.map +1 -0
- package/ApwContentUrlPlugin.d.ts +19 -0
- package/ApwContentUrlPlugin.js +30 -0
- package/ApwContentUrlPlugin.js.map +1 -0
- package/ContentApwSettingsPlugin.js +1 -6
- package/ContentApwSettingsPlugin.js.map +1 -1
- package/crud/createChangeRequestMethods.js +21 -25
- package/crud/createChangeRequestMethods.js.map +1 -1
- package/crud/createCommentMethods.js +21 -26
- package/crud/createCommentMethods.js.map +1 -1
- package/crud/createContentReviewMethods.js +71 -125
- package/crud/createContentReviewMethods.js.map +1 -1
- package/crud/createReviewerMethods.js +21 -26
- package/crud/createReviewerMethods.js.map +1 -1
- package/crud/createWorkflowMethods.d.ts +1 -1
- package/crud/createWorkflowMethods.js +37 -28
- package/crud/createWorkflowMethods.js.map +1 -1
- package/crud/index.js +3 -32
- package/crud/index.js.map +1 -1
- package/crud/utils.js +4 -36
- package/crud/utils.js.map +1 -1
- package/index.d.ts +3 -3
- package/index.js +7 -13
- package/index.js.map +1 -1
- package/package.json +38 -37
- package/plugins/cms/CmsEntryApwSettingsGetterPlugin.js +1 -16
- package/plugins/cms/CmsEntryApwSettingsGetterPlugin.js.map +1 -1
- package/plugins/cms/apwEntryPlugins.js +4 -16
- package/plugins/cms/apwEntryPlugins.js.map +1 -1
- package/plugins/cms/index.js +5 -10
- package/plugins/cms/index.js.map +1 -1
- package/plugins/cms/linkContentReviewToEntry.js +4 -21
- package/plugins/cms/linkContentReviewToEntry.js.map +1 -1
- package/plugins/cms/linkWorkflowToEntry.js +7 -36
- package/plugins/cms/linkWorkflowToEntry.js.map +1 -1
- package/plugins/cms/notifications/changeRequestNotification.d.ts +1 -0
- package/plugins/cms/notifications/changeRequestNotification.js +31 -0
- package/plugins/cms/notifications/changeRequestNotification.js.map +1 -0
- package/plugins/cms/notifications/commentNotification.d.ts +1 -0
- package/plugins/cms/notifications/commentNotification.js +31 -0
- package/plugins/cms/notifications/commentNotification.js.map +1 -0
- package/plugins/cms/notifications/contentReviewNotification.d.ts +1 -0
- package/plugins/cms/notifications/contentReviewNotification.js +31 -0
- package/plugins/cms/notifications/contentReviewNotification.js.map +1 -0
- package/plugins/cms/notifications/contentUrl.d.ts +8 -0
- package/plugins/cms/notifications/contentUrl.js +53 -0
- package/plugins/cms/notifications/contentUrl.js.map +1 -0
- package/plugins/cms/triggerContentReview.js +3 -17
- package/plugins/cms/triggerContentReview.js.map +1 -1
- package/plugins/cms/updateContentReviewStatus.js +10 -32
- package/plugins/cms/updateContentReviewStatus.js.map +1 -1
- package/plugins/cms/utils.js +6 -55
- package/plugins/cms/utils.js.map +1 -1
- package/plugins/context.js +1 -32
- package/plugins/context.js.map +1 -1
- package/plugins/graphql/changeRequest.gql.js +2 -9
- package/plugins/graphql/changeRequest.gql.js.map +1 -1
- package/plugins/graphql/comment.gql.js +2 -9
- package/plugins/graphql/comment.gql.js.map +1 -1
- package/plugins/graphql/contentReview.gql.js +5 -24
- package/plugins/graphql/contentReview.gql.js.map +1 -1
- package/plugins/graphql/reviewer.gql.js +4 -9
- package/plugins/graphql/reviewer.gql.js.map +1 -1
- package/plugins/graphql/workflow.gql.js +2 -9
- package/plugins/graphql/workflow.gql.js.map +1 -1
- package/plugins/graphql.js +2 -17
- package/plugins/graphql.js.map +1 -1
- package/plugins/hooks/createReviewerFromIdentity.js +26 -15
- package/plugins/hooks/createReviewerFromIdentity.js.map +1 -1
- package/plugins/hooks/deleteChangeRequestsAfterContentReview.js +2 -10
- package/plugins/hooks/deleteChangeRequestsAfterContentReview.js.map +1 -1
- package/plugins/hooks/deleteCommentsAfterChangeRequest.js +2 -9
- package/plugins/hooks/deleteCommentsAfterChangeRequest.js.map +1 -1
- package/plugins/hooks/index.js +4 -12
- package/plugins/hooks/index.js.map +1 -1
- package/plugins/hooks/initializeContentReviewSteps.js +7 -23
- package/plugins/hooks/initializeContentReviewSteps.js.map +1 -1
- package/plugins/hooks/initializeNotifications.d.ts +2 -0
- package/plugins/hooks/initializeNotifications.js +15 -0
- package/plugins/hooks/initializeNotifications.js.map +1 -0
- package/plugins/hooks/listContentReviews.d.ts +10 -0
- package/plugins/hooks/listContentReviews.js +56 -0
- package/plugins/hooks/listContentReviews.js.map +1 -0
- package/plugins/hooks/notifications/appUrl.d.ts +2 -0
- package/plugins/hooks/notifications/appUrl.js +18 -0
- package/plugins/hooks/notifications/appUrl.js.map +1 -0
- package/plugins/hooks/notifications/changeRequestAfterCreate.d.ts +2 -0
- package/plugins/hooks/notifications/changeRequestAfterCreate.js +116 -0
- package/plugins/hooks/notifications/changeRequestAfterCreate.js.map +1 -0
- package/plugins/hooks/notifications/changeRequestUrl.d.ts +8 -0
- package/plugins/hooks/notifications/changeRequestUrl.js +27 -0
- package/plugins/hooks/notifications/changeRequestUrl.js.map +1 -0
- package/plugins/hooks/notifications/commentAfterCreate.d.ts +2 -0
- package/plugins/hooks/notifications/commentAfterCreate.js +127 -0
- package/plugins/hooks/notifications/commentAfterCreate.js.map +1 -0
- package/plugins/hooks/notifications/commentUrl.d.ts +8 -0
- package/plugins/hooks/notifications/commentUrl.js +27 -0
- package/plugins/hooks/notifications/commentUrl.js.map +1 -0
- package/plugins/hooks/notifications/contentReviewAfterCreate.d.ts +2 -0
- package/plugins/hooks/notifications/contentReviewAfterCreate.js +99 -0
- package/plugins/hooks/notifications/contentReviewAfterCreate.js.map +1 -0
- package/plugins/hooks/notifications/contentReviewUrl.d.ts +7 -0
- package/plugins/hooks/notifications/contentReviewUrl.js +26 -0
- package/plugins/hooks/notifications/contentReviewUrl.js.map +1 -0
- package/plugins/hooks/notifications/contentUrl.d.ts +7 -0
- package/plugins/hooks/notifications/contentUrl.js +24 -0
- package/plugins/hooks/notifications/contentUrl.js.map +1 -0
- package/plugins/hooks/notifications/lastChangeRequestNotificationPlugin.d.ts +11 -0
- package/plugins/hooks/notifications/lastChangeRequestNotificationPlugin.js +21 -0
- package/plugins/hooks/notifications/lastChangeRequestNotificationPlugin.js.map +1 -0
- package/plugins/hooks/notifications/lastCommentNotificationPlugin.d.ts +11 -0
- package/plugins/hooks/notifications/lastCommentNotificationPlugin.js +21 -0
- package/plugins/hooks/notifications/lastCommentNotificationPlugin.js.map +1 -0
- package/plugins/hooks/notifications/lastContentReviewNotificationPlugin.d.ts +11 -0
- package/plugins/hooks/notifications/lastContentReviewNotificationPlugin.js +21 -0
- package/plugins/hooks/notifications/lastContentReviewNotificationPlugin.js.map +1 -0
- package/plugins/hooks/notifications/reviewers.d.ts +15 -0
- package/plugins/hooks/notifications/reviewers.js +44 -0
- package/plugins/hooks/notifications/reviewers.js.map +1 -0
- package/plugins/hooks/notifications/sendChangeRequestNotification.d.ts +2 -0
- package/plugins/hooks/notifications/sendChangeRequestNotification.js +41 -0
- package/plugins/hooks/notifications/sendChangeRequestNotification.js.map +1 -0
- package/plugins/hooks/notifications/sendCommentNotification.d.ts +2 -0
- package/plugins/hooks/notifications/sendCommentNotification.js +41 -0
- package/plugins/hooks/notifications/sendCommentNotification.js.map +1 -0
- package/plugins/hooks/notifications/sendContentReviewNotification.d.ts +2 -0
- package/plugins/hooks/notifications/sendContentReviewNotification.js +41 -0
- package/plugins/hooks/notifications/sendContentReviewNotification.js.map +1 -0
- package/plugins/hooks/updatePendingChangeRequests.js +7 -19
- package/plugins/hooks/updatePendingChangeRequests.js.map +1 -1
- package/plugins/hooks/updateTotalComments.js +14 -27
- package/plugins/hooks/updateTotalComments.js.map +1 -1
- package/plugins/hooks/validateChangeRequest.js +27 -18
- package/plugins/hooks/validateChangeRequest.js.map +1 -1
- package/plugins/hooks/validateComment.js +13 -14
- package/plugins/hooks/validateComment.js.map +1 -1
- package/plugins/hooks/validateContentReview.js +2 -8
- package/plugins/hooks/validateContentReview.js.map +1 -1
- package/plugins/pageBuilder/PageApwSettingsGetterPlugin.js +1 -16
- package/plugins/pageBuilder/PageApwSettingsGetterPlugin.js.map +1 -1
- package/plugins/pageBuilder/apwContentPagePlugins.js +0 -4
- package/plugins/pageBuilder/apwContentPagePlugins.js.map +1 -1
- package/plugins/pageBuilder/extendPbPageSettingsSchema.js +1 -6
- package/plugins/pageBuilder/extendPbPageSettingsSchema.js.map +1 -1
- package/plugins/pageBuilder/index.js +5 -8
- package/plugins/pageBuilder/index.js.map +1 -1
- package/plugins/pageBuilder/linkContentReviewToPage.js +38 -42
- package/plugins/pageBuilder/linkContentReviewToPage.js.map +1 -1
- package/plugins/pageBuilder/linkWorkflowToPage.js +14 -32
- package/plugins/pageBuilder/linkWorkflowToPage.js.map +1 -1
- package/plugins/pageBuilder/notifications/changeRequestNotification.d.ts +1 -0
- package/plugins/pageBuilder/notifications/changeRequestNotification.js +31 -0
- package/plugins/pageBuilder/notifications/changeRequestNotification.js.map +1 -0
- package/plugins/pageBuilder/notifications/commentNotification.d.ts +1 -0
- package/plugins/pageBuilder/notifications/commentNotification.js +31 -0
- package/plugins/pageBuilder/notifications/commentNotification.js.map +1 -0
- package/plugins/pageBuilder/notifications/contentReviewNotification.d.ts +1 -0
- package/plugins/pageBuilder/notifications/contentReviewNotification.js +31 -0
- package/plugins/pageBuilder/notifications/contentReviewNotification.js.map +1 -0
- package/plugins/pageBuilder/notifications/contentUrl.d.ts +1 -0
- package/plugins/pageBuilder/notifications/contentUrl.js +47 -0
- package/plugins/pageBuilder/notifications/contentUrl.js.map +1 -0
- package/plugins/pageBuilder/triggerContentReview.js +3 -14
- package/plugins/pageBuilder/triggerContentReview.js.map +1 -1
- package/plugins/pageBuilder/updateContentReviewStatus.js +10 -26
- package/plugins/pageBuilder/updateContentReviewStatus.js.map +1 -1
- package/plugins/pageBuilder/utils.js +2 -36
- package/plugins/pageBuilder/utils.js.map +1 -1
- package/plugins/utils.d.ts +1 -1
- package/plugins/utils.js +4 -57
- package/plugins/utils.js.map +1 -1
- package/scheduler/createScheduleActionMethods.js +17 -33
- package/scheduler/createScheduleActionMethods.js.map +1 -1
- package/scheduler/handlers/executeAction/index.js +9 -33
- package/scheduler/handlers/executeAction/index.js.map +1 -1
- package/scheduler/handlers/executeAction/plugins/ApplicationGraphQL.js +1 -6
- package/scheduler/handlers/executeAction/plugins/ApplicationGraphQL.js.map +1 -1
- package/scheduler/handlers/executeAction/plugins/HeadlessCMSGraphQL.js +1 -22
- package/scheduler/handlers/executeAction/plugins/HeadlessCMSGraphQL.js.map +1 -1
- package/scheduler/handlers/executeAction/plugins/PageBuilderGraphQL.js +5 -28
- package/scheduler/handlers/executeAction/plugins/PageBuilderGraphQL.js.map +1 -1
- package/scheduler/handlers/executeAction/security.js +0 -11
- package/scheduler/handlers/executeAction/security.js.map +1 -1
- package/scheduler/handlers/scheduleAction/index.js +13 -34
- package/scheduler/handlers/scheduleAction/index.js.map +1 -1
- package/scheduler/handlers/scheduleAction/scheduleAction.utils.js +7 -32
- package/scheduler/handlers/scheduleAction/scheduleAction.utils.js.map +1 -1
- package/scheduler/handlers/utils.js +4 -41
- package/scheduler/handlers/utils.js.map +1 -1
- package/scheduler/index.js +0 -3
- package/scheduler/index.js.map +1 -1
- package/scheduler/types.js +0 -6
- package/scheduler/types.js.map +1 -1
- package/storageOperations/changeRequestStorageOperations.js +5 -28
- package/storageOperations/changeRequestStorageOperations.js.map +1 -1
- package/storageOperations/commentStorageOperations.js +4 -29
- package/storageOperations/commentStorageOperations.js.map +1 -1
- package/storageOperations/contentReviewStorageOperations.js +5 -26
- package/storageOperations/contentReviewStorageOperations.js.map +1 -1
- package/storageOperations/index.js +5 -23
- package/storageOperations/index.js.map +1 -1
- package/storageOperations/models/changeRequest.model.js +0 -9
- package/storageOperations/models/changeRequest.model.js.map +1 -1
- package/storageOperations/models/comment.model.js +0 -8
- package/storageOperations/models/comment.model.js.map +1 -1
- package/storageOperations/models/contentModelPluginFactory.js +3 -12
- package/storageOperations/models/contentModelPluginFactory.js.map +1 -1
- package/storageOperations/models/contentReview.model.js +6 -31
- package/storageOperations/models/contentReview.model.js.map +1 -1
- package/storageOperations/models/index.js +3 -25
- package/storageOperations/models/index.js.map +1 -1
- package/storageOperations/models/reviewer.model.js +17 -9
- package/storageOperations/models/reviewer.model.js.map +1 -1
- package/storageOperations/models/utils.js +3 -6
- package/storageOperations/models/utils.js.map +1 -1
- package/storageOperations/models/workflow.model.js +0 -23
- package/storageOperations/models/workflow.model.js.map +1 -1
- package/storageOperations/reviewerStorageOperations.js +16 -29
- package/storageOperations/reviewerStorageOperations.js.map +1 -1
- package/storageOperations/workflowStorageOperations.js +6 -31
- package/storageOperations/workflowStorageOperations.js.map +1 -1
- package/types.d.ts +99 -84
- package/types.js +0 -14
- package/types.js.map +1 -1
- package/utils/contentApwSettingsPlugin.js +0 -6
- package/utils/contentApwSettingsPlugin.js.map +1 -1
- package/utils/errors.js +1 -18
- package/utils/errors.js.map +1 -1
- package/utils/fieldResolver.js +5 -21
- package/utils/fieldResolver.js.map +1 -1
- package/utils/resolve.js +0 -3
- package/utils/resolve.js.map +1 -1
package/types.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import {
|
2
|
-
import { Page,
|
1
|
+
import { CmsEntry as BaseCmsEntry, CmsModel, 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,8 @@ 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";
|
13
15
|
export interface ApwCmsEntry extends BaseCmsEntry {
|
14
16
|
title: string;
|
15
17
|
meta: {
|
@@ -75,11 +77,10 @@ export interface PageSettingsWithWorkflow extends PageSettings {
|
|
75
77
|
export interface PageWithWorkflow extends Page {
|
76
78
|
settings: PageSettingsWithWorkflow;
|
77
79
|
}
|
78
|
-
export declare type
|
79
|
-
export declare type
|
80
|
-
export declare type
|
81
|
-
export declare type
|
82
|
-
export declare type ApwOnBeforePageRequestReviewTopicParams = OnBeforePageRequestReviewTopicParams<PageWithWorkflow>;
|
80
|
+
export declare type ApwOnPageBeforeCreateTopicParams = OnPageBeforeCreateTopicParams<PageWithWorkflow>;
|
81
|
+
export declare type ApwOnPageBeforeCreateFromTopicParams = OnPageBeforeCreateFromTopicParams<PageWithWorkflow>;
|
82
|
+
export declare type ApwOnPageBeforeUpdateTopicParams = OnPageBeforeUpdateTopicParams<PageWithWorkflow>;
|
83
|
+
export declare type ApwOnPageBeforePublishTopicParams = OnPageBeforePublishTopicParams<PageWithWorkflow>;
|
83
84
|
export declare enum WorkflowScopeTypes {
|
84
85
|
DEFAULT = "default",
|
85
86
|
CUSTOM = "custom"
|
@@ -114,6 +115,7 @@ export interface CreatedBy {
|
|
114
115
|
}
|
115
116
|
export interface ApwBaseFields {
|
116
117
|
id: string;
|
118
|
+
entryId: string;
|
117
119
|
createdOn: string;
|
118
120
|
savedOn: string;
|
119
121
|
createdBy: CreatedBy;
|
@@ -122,6 +124,10 @@ export interface ApwReviewer extends ApwBaseFields {
|
|
122
124
|
identityId: string;
|
123
125
|
displayName: string | null;
|
124
126
|
type: string;
|
127
|
+
email?: string;
|
128
|
+
}
|
129
|
+
export interface ApwReviewerWithEmail extends Omit<ApwReviewer, "email"> {
|
130
|
+
email: string;
|
125
131
|
}
|
126
132
|
export interface ApwComment extends ApwBaseFields {
|
127
133
|
body: Record<string, any>;
|
@@ -149,10 +155,11 @@ export interface ApwContentReviewStep {
|
|
149
155
|
}
|
150
156
|
export interface ApwContentReview extends ApwBaseFields {
|
151
157
|
title: string;
|
152
|
-
|
158
|
+
reviewStatus: ApwContentReviewStatus;
|
153
159
|
content: ApwContentReviewContent;
|
154
160
|
steps: Array<ApwContentReviewStep>;
|
155
161
|
latestCommentId: string | null;
|
162
|
+
workflowId: string;
|
156
163
|
}
|
157
164
|
export interface ApwWorkflow extends ApwBaseFields {
|
158
165
|
title: string;
|
@@ -206,15 +213,10 @@ export interface UpdateApwWorkflowParams<TReviewer = string> {
|
|
206
213
|
steps?: ApwWorkflowStep<TReviewer>[];
|
207
214
|
}
|
208
215
|
export interface ListWorkflowsParams extends ListParams {
|
209
|
-
where
|
216
|
+
where?: ListWhere & {
|
210
217
|
app?: ApwWorkflowApplications;
|
211
218
|
};
|
212
219
|
}
|
213
|
-
interface CreateReviewerParams {
|
214
|
-
identityId: string;
|
215
|
-
displayName: string | null;
|
216
|
-
type: string;
|
217
|
-
}
|
218
220
|
interface CreateApwCommentParams {
|
219
221
|
body: Record<string, any>;
|
220
222
|
changeRequest: string;
|
@@ -265,11 +267,13 @@ export interface ApwContentReviewContent {
|
|
265
267
|
}
|
266
268
|
export interface CreateApwContentReviewParams {
|
267
269
|
content: ApwContentReviewContent;
|
270
|
+
reviewStatus: ApwContentReviewStatus;
|
271
|
+
workflowId?: string;
|
268
272
|
}
|
269
|
-
interface UpdateApwContentReviewParams {
|
273
|
+
export interface UpdateApwContentReviewParams {
|
270
274
|
title?: string;
|
271
275
|
steps?: ApwContentReviewStep[];
|
272
|
-
|
276
|
+
reviewStatus?: ApwContentReviewStatus;
|
273
277
|
content?: ApwContentReviewContent;
|
274
278
|
}
|
275
279
|
interface BaseApwCrud<TEntry, TCreateEntryParams, TUpdateEntryParams> {
|
@@ -279,33 +283,33 @@ interface BaseApwCrud<TEntry, TCreateEntryParams, TUpdateEntryParams> {
|
|
279
283
|
delete(id: string): Promise<Boolean>;
|
280
284
|
}
|
281
285
|
export interface ApwWorkflowCrud extends BaseApwCrud<ApwWorkflow, CreateApwWorkflowParams, UpdateApwWorkflowParams> {
|
282
|
-
list(params
|
286
|
+
list(params?: ListWorkflowsParams): Promise<[ApwWorkflow[], ListMeta]>;
|
283
287
|
/**
|
284
288
|
* Lifecycle events
|
285
289
|
*/
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
290
|
+
onWorkflowBeforeCreate: Topic<OnWorkflowBeforeCreateTopicParams>;
|
291
|
+
onWorkflowAfterCreate: Topic<OnWorkflowAfterCreateTopicParams>;
|
292
|
+
onWorkflowBeforeUpdate: Topic<OnWorkflowBeforeUpdateTopicParams>;
|
293
|
+
onWorkflowAfterUpdate: Topic<OnWorkflowAfterUpdateTopicParams>;
|
294
|
+
onWorkflowBeforeDelete: Topic<OnWorkflowBeforeDeleteTopicParams>;
|
295
|
+
onWorkflowAfterDelete: Topic<OnWorkflowAfterDeleteTopicParams>;
|
292
296
|
}
|
293
297
|
export interface ApwReviewerListParams extends ListParams {
|
294
298
|
where: ListParams["where"] & {
|
295
299
|
identityId?: string;
|
296
300
|
};
|
297
301
|
}
|
298
|
-
export interface ApwReviewerCrud extends BaseApwCrud<ApwReviewer,
|
302
|
+
export interface ApwReviewerCrud extends BaseApwCrud<ApwReviewer, CreateApwReviewerData, UpdateApwReviewerData> {
|
299
303
|
list(params: ApwReviewerListParams): Promise<[ApwReviewer[], ListMeta]>;
|
300
304
|
/**
|
301
305
|
* Lifecycle events
|
302
306
|
*/
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
307
|
+
onReviewerBeforeCreate: Topic<OnReviewerBeforeCreateTopicParams>;
|
308
|
+
onReviewerAfterCreate: Topic<OnReviewerAfterCreateTopicParams>;
|
309
|
+
onReviewerBeforeUpdate: Topic<OnReviewerBeforeUpdateTopicParams>;
|
310
|
+
onReviewerAfterUpdate: Topic<OnReviewerAfterUpdateTopicParams>;
|
311
|
+
onReviewerBeforeDelete: Topic<OnReviewerBeforeDeleteTopicParams>;
|
312
|
+
onReviewerAfterDelete: Topic<OnReviewerAfterDeleteTopicParams>;
|
309
313
|
}
|
310
314
|
export interface ApwCommentListParams extends ListParams {
|
311
315
|
where: ListParams["where"] & {
|
@@ -319,12 +323,12 @@ export interface ApwCommentCrud extends BaseApwCrud<ApwComment, CreateApwComment
|
|
319
323
|
/**
|
320
324
|
* Lifecycle events
|
321
325
|
*/
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
326
|
+
onCommentBeforeCreate: Topic<OnCommentBeforeCreateTopicParams>;
|
327
|
+
onCommentAfterCreate: Topic<OnCommentAfterCreateTopicParams>;
|
328
|
+
onCommentBeforeUpdate: Topic<OnCommentBeforeUpdateTopicParams>;
|
329
|
+
onCommentAfterUpdate: Topic<OnCommentAfterUpdateTopicParams>;
|
330
|
+
onCommentBeforeDelete: Topic<OnCommentBeforeDeleteTopicParams>;
|
331
|
+
onCommentAfterDelete: Topic<OnCommentAfterDeleteTopicParams>;
|
328
332
|
}
|
329
333
|
export interface ApwChangeRequestListParams extends ListParams {
|
330
334
|
where: ListParams["where"] & {
|
@@ -336,12 +340,12 @@ export interface ApwChangeRequestCrud extends BaseApwCrud<ApwChangeRequest, Crea
|
|
336
340
|
/**
|
337
341
|
* Lifecycle events
|
338
342
|
*/
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
343
|
+
onChangeRequestBeforeCreate: Topic<OnChangeRequestBeforeCreateTopicParams>;
|
344
|
+
onChangeRequestAfterCreate: Topic<OnChangeRequestAfterCreateTopicParams>;
|
345
|
+
onChangeRequestBeforeUpdate: Topic<OnChangeRequestBeforeUpdateTopicParams>;
|
346
|
+
onChangeRequestAfterUpdate: Topic<OnChangeRequestAfterUpdateTopicParams>;
|
347
|
+
onChangeRequestBeforeDelete: Topic<OnChangeRequestBeforeDeleteTopicParams>;
|
348
|
+
onChangeRequestAfterDelete: Topic<OnChangeRequestAfterDeleteTopicParams>;
|
345
349
|
}
|
346
350
|
export interface ApwContentReviewCrud extends BaseApwCrud<ApwContentReview, CreateApwContentReviewParams, UpdateApwContentReviewParams> {
|
347
351
|
list(params: ApwContentReviewListParams): Promise<[ApwContentReview[], ListMeta]>;
|
@@ -358,12 +362,13 @@ export interface ApwContentReviewCrud extends BaseApwCrud<ApwContentReview, Crea
|
|
358
362
|
/**
|
359
363
|
* Lifecycle events
|
360
364
|
*/
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
365
|
+
onContentReviewBeforeCreate: Topic<OnContentReviewBeforeCreateTopicParams>;
|
366
|
+
onContentReviewAfterCreate: Topic<OnContentReviewAfterCreateTopicParams>;
|
367
|
+
onContentReviewBeforeUpdate: Topic<OnContentReviewBeforeUpdateTopicParams>;
|
368
|
+
onContentReviewAfterUpdate: Topic<OnContentReviewAfterUpdateTopicParams>;
|
369
|
+
onContentReviewBeforeDelete: Topic<OnContentReviewBeforeDeleteTopicParams>;
|
370
|
+
onContentReviewAfterDelete: Topic<OnContentReviewAfterDeleteTopicParams>;
|
371
|
+
onContentReviewBeforeList: Topic<OnContentReviewBeforeListTopicParams>;
|
367
372
|
}
|
368
373
|
export declare type ContentGetter = (id: string, settings: {
|
369
374
|
modelId?: string;
|
@@ -388,7 +393,7 @@ export interface AdvancedPublishingWorkflow {
|
|
388
393
|
contentReview: ApwContentReviewCrud;
|
389
394
|
scheduleAction: ApwScheduleActionCrud;
|
390
395
|
}
|
391
|
-
export interface ApwContext extends Context,
|
396
|
+
export interface ApwContext extends Context, MailerContext, AdminSettingsContext {
|
392
397
|
apw: AdvancedPublishingWorkflow;
|
393
398
|
pageBuilder: PageBuilderContextObject;
|
394
399
|
wcp: WcpContextObject;
|
@@ -417,11 +422,13 @@ interface CreateApwReviewerData {
|
|
417
422
|
identityId: string;
|
418
423
|
displayName: string | null;
|
419
424
|
type: string;
|
425
|
+
email?: string | null;
|
420
426
|
}
|
421
427
|
interface UpdateApwReviewerData {
|
422
428
|
identityId: string;
|
423
429
|
displayName: string | null;
|
424
430
|
type: string;
|
431
|
+
email?: string | null;
|
425
432
|
}
|
426
433
|
interface StorageOperationsCreateReviewerParams {
|
427
434
|
data: CreateApwReviewerData;
|
@@ -451,10 +458,12 @@ interface StorageOperationsUpdateWorkflowParams {
|
|
451
458
|
declare type StorageOperationsDeleteWorkflowParams = StorageOperationsDeleteParams;
|
452
459
|
declare type StorageOperationsGetContentReviewParams = StorageOperationsGetParams;
|
453
460
|
export interface ApwContentReviewListParams extends ListParams {
|
454
|
-
where
|
455
|
-
|
461
|
+
where: ListWhere & {
|
462
|
+
reviewStatus?: ApwContentReviewListFilter;
|
456
463
|
title?: string;
|
457
464
|
title_contains?: string;
|
465
|
+
workflowId?: string;
|
466
|
+
workflowId_in?: string[];
|
458
467
|
};
|
459
468
|
}
|
460
469
|
declare type StorageOperationsListContentReviewsParams = ApwContentReviewListParams;
|
@@ -526,26 +535,26 @@ export interface ApwStorageOperations extends ApwReviewerStorageOperations, ApwW
|
|
526
535
|
/**
|
527
536
|
* @category Lifecycle events
|
528
537
|
*/
|
529
|
-
export interface
|
538
|
+
export interface OnCommentBeforeCreateTopicParams {
|
530
539
|
input: CreateApwCommentParams;
|
531
540
|
}
|
532
541
|
/**
|
533
542
|
* @category Lifecycle events
|
534
543
|
*/
|
535
|
-
export interface
|
544
|
+
export interface OnCommentAfterCreateTopicParams {
|
536
545
|
comment: ApwComment;
|
537
546
|
}
|
538
547
|
/**
|
539
548
|
* @category Lifecycle events
|
540
549
|
*/
|
541
|
-
export interface
|
550
|
+
export interface OnCommentBeforeUpdateTopicParams {
|
542
551
|
original: ApwComment;
|
543
552
|
input: Record<string, any>;
|
544
553
|
}
|
545
554
|
/**
|
546
555
|
* @category Lifecycle events
|
547
556
|
*/
|
548
|
-
export interface
|
557
|
+
export interface OnCommentAfterUpdateTopicParams {
|
549
558
|
original: ApwComment;
|
550
559
|
comment: ApwComment;
|
551
560
|
input: Record<string, any>;
|
@@ -553,38 +562,38 @@ export interface OnAfterCommentUpdateTopicParams {
|
|
553
562
|
/**
|
554
563
|
* @category Lifecycle events
|
555
564
|
*/
|
556
|
-
export interface
|
565
|
+
export interface OnCommentBeforeDeleteTopicParams {
|
557
566
|
comment: ApwComment;
|
558
567
|
}
|
559
568
|
/**
|
560
569
|
* @category Lifecycle events
|
561
570
|
*/
|
562
|
-
export interface
|
571
|
+
export interface OnCommentAfterDeleteTopicParams {
|
563
572
|
comment: ApwComment;
|
564
573
|
}
|
565
574
|
/**
|
566
575
|
* @category Lifecycle events
|
567
576
|
*/
|
568
|
-
export interface
|
577
|
+
export interface OnChangeRequestBeforeCreateTopicParams {
|
569
578
|
input: CreateApwChangeRequestParams;
|
570
579
|
}
|
571
580
|
/**
|
572
581
|
* @category Lifecycle events
|
573
582
|
*/
|
574
|
-
export interface
|
583
|
+
export interface OnChangeRequestAfterCreateTopicParams {
|
575
584
|
changeRequest: ApwChangeRequest;
|
576
585
|
}
|
577
586
|
/**
|
578
587
|
* @category Lifecycle events
|
579
588
|
*/
|
580
|
-
export interface
|
589
|
+
export interface OnChangeRequestBeforeUpdateTopicParams {
|
581
590
|
original: ApwChangeRequest;
|
582
591
|
input: Record<string, any>;
|
583
592
|
}
|
584
593
|
/**
|
585
594
|
* @category Lifecycle events
|
586
595
|
*/
|
587
|
-
export interface
|
596
|
+
export interface OnChangeRequestAfterUpdateTopicParams {
|
588
597
|
original: ApwChangeRequest;
|
589
598
|
changeRequest: ApwChangeRequest;
|
590
599
|
input: Record<string, any>;
|
@@ -592,38 +601,38 @@ export interface OnAfterChangeRequestUpdateTopicParams {
|
|
592
601
|
/**
|
593
602
|
* @category Lifecycle events
|
594
603
|
*/
|
595
|
-
export interface
|
604
|
+
export interface OnChangeRequestBeforeDeleteTopicParams {
|
596
605
|
changeRequest: ApwChangeRequest;
|
597
606
|
}
|
598
607
|
/**
|
599
608
|
* @category Lifecycle events
|
600
609
|
*/
|
601
|
-
export interface
|
610
|
+
export interface OnChangeRequestAfterDeleteTopicParams {
|
602
611
|
changeRequest: ApwChangeRequest;
|
603
612
|
}
|
604
613
|
/**
|
605
614
|
* @category Lifecycle events
|
606
615
|
*/
|
607
|
-
export interface
|
616
|
+
export interface OnContentReviewBeforeCreateTopicParams {
|
608
617
|
input: CreateApwContentReviewParams;
|
609
618
|
}
|
610
619
|
/**
|
611
620
|
* @category Lifecycle events
|
612
621
|
*/
|
613
|
-
export interface
|
622
|
+
export interface OnContentReviewAfterCreateTopicParams {
|
614
623
|
contentReview: ApwContentReview;
|
615
624
|
}
|
616
625
|
/**
|
617
626
|
* @category Lifecycle events
|
618
627
|
*/
|
619
|
-
export interface
|
628
|
+
export interface OnContentReviewBeforeUpdateTopicParams {
|
620
629
|
original: ApwContentReview;
|
621
630
|
input: Record<string, any>;
|
622
631
|
}
|
623
632
|
/**
|
624
633
|
* @category Lifecycle events
|
625
634
|
*/
|
626
|
-
export interface
|
635
|
+
export interface OnContentReviewAfterUpdateTopicParams {
|
627
636
|
original: ApwContentReview;
|
628
637
|
contentReview: ApwContentReview;
|
629
638
|
input: Record<string, any>;
|
@@ -631,41 +640,47 @@ export interface OnAfterContentReviewUpdateTopicParams {
|
|
631
640
|
/**
|
632
641
|
* @category Lifecycle events
|
633
642
|
*/
|
634
|
-
export interface
|
643
|
+
export interface OnContentReviewBeforeDeleteTopicParams {
|
635
644
|
contentReview: ApwContentReview;
|
636
645
|
}
|
637
646
|
/**
|
638
647
|
* @category Lifecycle events
|
639
648
|
*/
|
640
|
-
export interface
|
649
|
+
export interface OnContentReviewAfterDeleteTopicParams {
|
641
650
|
contentReview: ApwContentReview;
|
642
651
|
}
|
652
|
+
/**
|
653
|
+
* @category Lifecycle events
|
654
|
+
*/
|
655
|
+
export interface OnContentReviewBeforeListTopicParams {
|
656
|
+
where: ApwContentReviewListParams["where"];
|
657
|
+
}
|
643
658
|
export interface CreateApwReviewerParams {
|
644
659
|
type: string;
|
645
660
|
}
|
646
661
|
/**
|
647
662
|
* @category Lifecycle events
|
648
663
|
*/
|
649
|
-
export interface
|
664
|
+
export interface OnReviewerBeforeCreateTopicParams {
|
650
665
|
input: CreateApwReviewerParams;
|
651
666
|
}
|
652
667
|
/**
|
653
668
|
* @category Lifecycle events
|
654
669
|
*/
|
655
|
-
export interface
|
670
|
+
export interface OnReviewerAfterCreateTopicParams {
|
656
671
|
reviewer: ApwReviewer;
|
657
672
|
}
|
658
673
|
/**
|
659
674
|
* @category Lifecycle events
|
660
675
|
*/
|
661
|
-
export interface
|
676
|
+
export interface OnReviewerBeforeUpdateTopicParams {
|
662
677
|
original: ApwReviewer;
|
663
678
|
input: Record<string, any>;
|
664
679
|
}
|
665
680
|
/**
|
666
681
|
* @category Lifecycle events
|
667
682
|
*/
|
668
|
-
export interface
|
683
|
+
export interface OnReviewerAfterUpdateTopicParams {
|
669
684
|
original: ApwReviewer;
|
670
685
|
reviewer: ApwReviewer;
|
671
686
|
input: Record<string, any>;
|
@@ -673,38 +688,38 @@ export interface OnAfterReviewerUpdateTopicParams {
|
|
673
688
|
/**
|
674
689
|
* @category Lifecycle events
|
675
690
|
*/
|
676
|
-
export interface
|
691
|
+
export interface OnReviewerBeforeDeleteTopicParams {
|
677
692
|
reviewer: ApwReviewer;
|
678
693
|
}
|
679
694
|
/**
|
680
695
|
* @category Lifecycle events
|
681
696
|
*/
|
682
|
-
export interface
|
697
|
+
export interface OnReviewerAfterDeleteTopicParams {
|
683
698
|
reviewer: ApwReviewer;
|
684
699
|
}
|
685
700
|
/**
|
686
701
|
* @category Lifecycle events
|
687
702
|
*/
|
688
|
-
export interface
|
703
|
+
export interface OnWorkflowBeforeCreateTopicParams {
|
689
704
|
input: CreateApwWorkflowParams;
|
690
705
|
}
|
691
706
|
/**
|
692
707
|
* @category Lifecycle events
|
693
708
|
*/
|
694
|
-
export interface
|
709
|
+
export interface OnWorkflowAfterCreateTopicParams {
|
695
710
|
workflow: ApwWorkflow;
|
696
711
|
}
|
697
712
|
/**
|
698
713
|
* @category Lifecycle events
|
699
714
|
*/
|
700
|
-
export interface
|
715
|
+
export interface OnWorkflowBeforeUpdateTopicParams {
|
701
716
|
original: ApwWorkflow;
|
702
717
|
input: Record<string, any>;
|
703
718
|
}
|
704
719
|
/**
|
705
720
|
* @category Lifecycle events
|
706
721
|
*/
|
707
|
-
export interface
|
722
|
+
export interface OnWorkflowAfterUpdateTopicParams {
|
708
723
|
original: ApwWorkflow;
|
709
724
|
workflow: ApwWorkflow;
|
710
725
|
input: Record<string, any>;
|
@@ -712,26 +727,26 @@ export interface OnAfterWorkflowUpdateTopicParams {
|
|
712
727
|
/**
|
713
728
|
* @category Lifecycle events
|
714
729
|
*/
|
715
|
-
export interface
|
730
|
+
export interface OnWorkflowBeforeDeleteTopicParams {
|
716
731
|
workflow: ApwWorkflow;
|
717
732
|
}
|
718
733
|
/**
|
719
734
|
* @category Lifecycle events
|
720
735
|
*/
|
721
|
-
export interface
|
736
|
+
export interface OnWorkflowAfterDeleteTopicParams {
|
722
737
|
workflow: ApwWorkflow;
|
723
738
|
}
|
724
739
|
export declare type WorkflowModelDefinition = Pick<CmsModel, "name" | "modelId" | "layout" | "titleFieldId" | "description" | "fields" | "isPrivate">;
|
725
740
|
/**
|
726
741
|
* Headless CMS
|
727
742
|
*/
|
728
|
-
export interface
|
743
|
+
export interface OnCmsEntryBeforePublishTopicParams extends Omit<OnEntryBeforePublishTopicParams, "entry"> {
|
729
744
|
entry: ApwCmsEntry;
|
730
745
|
}
|
731
|
-
export interface
|
746
|
+
export interface OnCmsEntryAfterPublishTopicParams extends Omit<OnEntryAfterPublishTopicParams, "entry"> {
|
732
747
|
entry: ApwCmsEntry;
|
733
748
|
}
|
734
|
-
export interface
|
749
|
+
export interface OnCmsEntryAfterUnpublishTopicParams extends Omit<OnEntryAfterUnpublishTopicParams, "entry"> {
|
735
750
|
entry: ApwCmsEntry;
|
736
751
|
}
|
737
752
|
export {};
|
package/types.js
CHANGED
@@ -6,63 +6,49 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
exports.WorkflowScopeTypes = exports.ApwWorkflowStepTypes = exports.ApwWorkflowApplications = exports.ApwContentTypes = exports.ApwContentReviewStepStatus = exports.ApwContentReviewStatus = void 0;
|
7
7
|
let ApwContentTypes;
|
8
8
|
exports.ApwContentTypes = ApwContentTypes;
|
9
|
-
|
10
9
|
(function (ApwContentTypes) {
|
11
10
|
ApwContentTypes["PAGE"] = "page";
|
12
11
|
ApwContentTypes["CMS_ENTRY"] = "cms_entry";
|
13
12
|
})(ApwContentTypes || (exports.ApwContentTypes = ApwContentTypes = {}));
|
14
|
-
|
15
13
|
let WorkflowScopeTypes;
|
16
14
|
exports.WorkflowScopeTypes = WorkflowScopeTypes;
|
17
|
-
|
18
15
|
(function (WorkflowScopeTypes) {
|
19
16
|
WorkflowScopeTypes["DEFAULT"] = "default";
|
20
17
|
WorkflowScopeTypes["CUSTOM"] = "custom";
|
21
18
|
})(WorkflowScopeTypes || (exports.WorkflowScopeTypes = WorkflowScopeTypes = {}));
|
22
|
-
|
23
19
|
let ApwContentReviewStepStatus;
|
24
20
|
exports.ApwContentReviewStepStatus = ApwContentReviewStepStatus;
|
25
|
-
|
26
21
|
(function (ApwContentReviewStepStatus) {
|
27
22
|
ApwContentReviewStepStatus["DONE"] = "done";
|
28
23
|
ApwContentReviewStepStatus["ACTIVE"] = "active";
|
29
24
|
ApwContentReviewStepStatus["INACTIVE"] = "inactive";
|
30
25
|
})(ApwContentReviewStepStatus || (exports.ApwContentReviewStepStatus = ApwContentReviewStepStatus = {}));
|
31
|
-
|
32
26
|
let ApwWorkflowApplications;
|
33
27
|
/**
|
34
28
|
* A interface describing the reference to a user that created some data in the database.
|
35
29
|
*
|
36
30
|
* @category General
|
37
31
|
*/
|
38
|
-
|
39
32
|
exports.ApwWorkflowApplications = ApwWorkflowApplications;
|
40
|
-
|
41
33
|
(function (ApwWorkflowApplications) {
|
42
34
|
ApwWorkflowApplications["PB"] = "pageBuilder";
|
43
35
|
ApwWorkflowApplications["CMS"] = "cms";
|
44
36
|
})(ApwWorkflowApplications || (exports.ApwWorkflowApplications = ApwWorkflowApplications = {}));
|
45
|
-
|
46
37
|
let ApwWorkflowStepTypes;
|
47
38
|
exports.ApwWorkflowStepTypes = ApwWorkflowStepTypes;
|
48
|
-
|
49
39
|
(function (ApwWorkflowStepTypes) {
|
50
40
|
ApwWorkflowStepTypes["MANDATORY_BLOCKING"] = "mandatoryBlocking";
|
51
41
|
ApwWorkflowStepTypes["MANDATORY_NON_BLOCKING"] = "mandatoryNonBlocking";
|
52
42
|
ApwWorkflowStepTypes["NON_MANDATORY"] = "notMandatory";
|
53
43
|
})(ApwWorkflowStepTypes || (exports.ApwWorkflowStepTypes = ApwWorkflowStepTypes = {}));
|
54
|
-
|
55
44
|
let ApwContentReviewStatus;
|
56
45
|
exports.ApwContentReviewStatus = ApwContentReviewStatus;
|
57
|
-
|
58
46
|
(function (ApwContentReviewStatus) {
|
59
47
|
ApwContentReviewStatus["UNDER_REVIEW"] = "underReview";
|
60
48
|
ApwContentReviewStatus["READY_TO_BE_PUBLISHED"] = "readyToBePublished";
|
61
49
|
ApwContentReviewStatus["PUBLISHED"] = "published";
|
62
50
|
})(ApwContentReviewStatus || (exports.ApwContentReviewStatus = ApwContentReviewStatus = {}));
|
63
|
-
|
64
51
|
var ApwScheduleActionTypes;
|
65
|
-
|
66
52
|
(function (ApwScheduleActionTypes) {
|
67
53
|
ApwScheduleActionTypes["PUBLISH"] = "publish";
|
68
54
|
ApwScheduleActionTypes["UNPUBLISH"] = "unpublish";
|