@webiny/api-apw 0.0.0-unstable.ecd8734205 → 0.0.0-unstable.f9f12f52a0

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 (314) 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 +11 -7
  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 +17 -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.d.ts +1 -1
  268. package/utils/resolve.js +3 -1
  269. package/utils/resolve.js.map +1 -1
  270. package/plugins/hooks/notifications/appUrl.d.ts +0 -2
  271. package/plugins/hooks/notifications/appUrl.js +0 -18
  272. package/plugins/hooks/notifications/appUrl.js.map +0 -1
  273. package/plugins/pageBuilder/PageApwSettingsGetterPlugin.d.ts +0 -9
  274. package/plugins/pageBuilder/PageApwSettingsGetterPlugin.js +0 -36
  275. package/plugins/pageBuilder/PageApwSettingsGetterPlugin.js.map +0 -1
  276. package/plugins/pageBuilder/apwContentPagePlugins.d.ts +0 -3
  277. package/plugins/pageBuilder/apwContentPagePlugins.js +0 -26
  278. package/plugins/pageBuilder/apwContentPagePlugins.js.map +0 -1
  279. package/plugins/pageBuilder/extendPbPageSettingsSchema.d.ts +0 -3
  280. package/plugins/pageBuilder/extendPbPageSettingsSchema.js +0 -20
  281. package/plugins/pageBuilder/extendPbPageSettingsSchema.js.map +0 -1
  282. package/plugins/pageBuilder/index.d.ts +0 -11
  283. package/plugins/pageBuilder/index.js +0 -42
  284. package/plugins/pageBuilder/index.js.map +0 -1
  285. package/plugins/pageBuilder/linkContentReviewToPage.d.ts +0 -8
  286. package/plugins/pageBuilder/linkContentReviewToPage.js +0 -89
  287. package/plugins/pageBuilder/linkContentReviewToPage.js.map +0 -1
  288. package/plugins/pageBuilder/linkWorkflowToPage.d.ts +0 -8
  289. package/plugins/pageBuilder/linkWorkflowToPage.js +0 -164
  290. package/plugins/pageBuilder/linkWorkflowToPage.js.map +0 -1
  291. package/plugins/pageBuilder/notifications/changeRequestNotification.d.ts +0 -1
  292. package/plugins/pageBuilder/notifications/changeRequestNotification.js +0 -31
  293. package/plugins/pageBuilder/notifications/changeRequestNotification.js.map +0 -1
  294. package/plugins/pageBuilder/notifications/commentNotification.d.ts +0 -1
  295. package/plugins/pageBuilder/notifications/commentNotification.js +0 -31
  296. package/plugins/pageBuilder/notifications/commentNotification.js.map +0 -1
  297. package/plugins/pageBuilder/notifications/contentReviewNotification.d.ts +0 -1
  298. package/plugins/pageBuilder/notifications/contentReviewNotification.js +0 -31
  299. package/plugins/pageBuilder/notifications/contentReviewNotification.js.map +0 -1
  300. package/plugins/pageBuilder/notifications/contentUrl.d.ts +0 -1
  301. package/plugins/pageBuilder/notifications/contentUrl.js +0 -47
  302. package/plugins/pageBuilder/notifications/contentUrl.js.map +0 -1
  303. package/plugins/pageBuilder/triggerContentReview.d.ts +0 -8
  304. package/plugins/pageBuilder/triggerContentReview.js +0 -39
  305. package/plugins/pageBuilder/triggerContentReview.js.map +0 -1
  306. package/plugins/pageBuilder/updateContentReviewStatus.d.ts +0 -10
  307. package/plugins/pageBuilder/updateContentReviewStatus.js +0 -67
  308. package/plugins/pageBuilder/updateContentReviewStatus.js.map +0 -1
  309. package/plugins/pageBuilder/utils.d.ts +0 -22
  310. package/plugins/pageBuilder/utils.js +0 -150
  311. package/plugins/pageBuilder/utils.js.map +0 -1
  312. package/storageOperations/models/contentModelPluginFactory.d.ts +0 -8
  313. package/storageOperations/models/contentModelPluginFactory.js +0 -19
  314. package/storageOperations/models/contentModelPluginFactory.js.map +0 -1
package/types.d.ts CHANGED
@@ -1,17 +1,14 @@
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
- import { Context } from "@webiny/api/types";
4
- import { PageBuilderContextObject } from "@webiny/api-page-builder/graphql/types";
5
- import { SecurityIdentity, SecurityPermission } from "@webiny/api-security/types";
6
- import { I18NLocale } from "@webiny/api-i18n/types";
7
- import { Tenant } from "@webiny/api-tenancy/types";
8
- import { Topic } from "@webiny/pubsub/types";
9
- import { ApwScheduleActionCrud, ScheduleActionContext } from "./scheduler/types";
10
- import HandlerClient from "@webiny/handler-client/HandlerClient";
11
- import { PluginsContainer } from "@webiny/plugins";
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";
1
+ import type { CmsEntry as BaseCmsEntry, OnEntryBeforePublishTopicParams, OnEntryAfterPublishTopicParams, OnEntryAfterUnpublishTopicParams, CmsEntryListSort } from "@webiny/api-headless-cms/types";
2
+ import type { Context } from "@webiny/api/types";
3
+ import type { SecurityIdentity, SecurityPermission } from "@webiny/api-security/types";
4
+ import type { I18NLocale } from "@webiny/api-i18n/types";
5
+ import type { Tenant } from "@webiny/api-tenancy/types";
6
+ import type { Topic } from "@webiny/pubsub/types";
7
+ import type { ApwScheduleActionCrud, ScheduleActionContext } from "./scheduler/types";
8
+ import type HandlerClient from "@webiny/handler-client/HandlerClient";
9
+ import type { PluginsContainer } from "@webiny/plugins";
10
+ import type { WcpContextObject } from "@webiny/api-wcp/types";
11
+ import type { MailerContext } from "@webiny/api-mailer/types";
15
12
  export interface ApwCmsEntry extends BaseCmsEntry {
16
13
  title: string;
17
14
  meta: {
@@ -46,7 +43,7 @@ export interface ListWhere {
46
43
  }
47
44
  export interface ListParams {
48
45
  where?: ListWhere;
49
- sort?: string[];
46
+ sort?: CmsEntryListSort;
50
47
  limit?: number;
51
48
  after?: string | null;
52
49
  }
@@ -68,19 +65,6 @@ export declare enum ApwContentTypes {
68
65
  PAGE = "page",
69
66
  CMS_ENTRY = "cms_entry"
70
67
  }
71
- export interface PageSettingsWithWorkflow extends PageSettings {
72
- apw: {
73
- workflowId: string;
74
- contentReviewId: string | null;
75
- };
76
- }
77
- export interface PageWithWorkflow extends Page {
78
- settings: PageSettingsWithWorkflow;
79
- }
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>;
84
68
  export declare enum WorkflowScopeTypes {
85
69
  DEFAULT = "default",
86
70
  CUSTOM = "custom"
@@ -99,7 +83,7 @@ export declare enum ApwWorkflowApplications {
99
83
  *
100
84
  * @category General
101
85
  */
102
- export interface CreatedBy {
86
+ export interface ApwIdentity {
103
87
  /**
104
88
  * ID if the user.
105
89
  */
@@ -117,8 +101,11 @@ export interface ApwBaseFields {
117
101
  id: string;
118
102
  entryId: string;
119
103
  createdOn: string;
104
+ modifiedOn: string | null;
120
105
  savedOn: string;
121
- createdBy: CreatedBy;
106
+ createdBy: ApwIdentity;
107
+ modifiedBy: ApwIdentity;
108
+ savedBy: ApwIdentity;
122
109
  }
123
110
  export interface ApwReviewer extends ApwBaseFields {
124
111
  identityId: string;
@@ -151,7 +138,7 @@ export interface ApwContentReviewStep {
151
138
  pendingChangeRequests: number;
152
139
  totalComments: number;
153
140
  signOffProvidedOn: string | null;
154
- signOffProvidedBy: CreatedBy | null;
141
+ signOffProvidedBy: ApwIdentity | null;
155
142
  }
156
143
  export interface ApwContentReview extends ApwBaseFields {
157
144
  title: string;
@@ -190,7 +177,7 @@ export declare enum ApwContentReviewStatus {
190
177
  READY_TO_BE_PUBLISHED = "readyToBePublished",
191
178
  PUBLISHED = "published"
192
179
  }
193
- export declare type ApwContentReviewListFilter = ApwContentReviewStatus | "requiresMyAttention";
180
+ export type ApwContentReviewListFilter = ApwContentReviewStatus | "requiresMyAttention";
194
181
  export interface ApwWorkflowStep<TReviewer = ApwReviewer> {
195
182
  title: string;
196
183
  type: ApwWorkflowStepTypes;
@@ -280,7 +267,7 @@ interface BaseApwCrud<TEntry, TCreateEntryParams, TUpdateEntryParams> {
280
267
  get(id: string): Promise<TEntry>;
281
268
  create(data: TCreateEntryParams): Promise<TEntry>;
282
269
  update(id: string, data: TUpdateEntryParams): Promise<TEntry>;
283
- delete(id: string): Promise<Boolean>;
270
+ delete(id: string): Promise<boolean>;
284
271
  }
285
272
  export interface ApwWorkflowCrud extends BaseApwCrud<ApwWorkflow, CreateApwWorkflowParams, UpdateApwWorkflowParams> {
286
273
  list(params?: ListWorkflowsParams): Promise<[ApwWorkflow[], ListMeta]>;
@@ -349,14 +336,14 @@ export interface ApwChangeRequestCrud extends BaseApwCrud<ApwChangeRequest, Crea
349
336
  }
350
337
  export interface ApwContentReviewCrud extends BaseApwCrud<ApwContentReview, CreateApwContentReviewParams, UpdateApwContentReviewParams> {
351
338
  list(params: ApwContentReviewListParams): Promise<[ApwContentReview[], ListMeta]>;
352
- provideSignOff(id: string, step: string): Promise<Boolean>;
353
- retractSignOff(id: string, step: string): Promise<Boolean>;
339
+ provideSignOff(id: string, step: string): Promise<boolean>;
340
+ retractSignOff(id: string, step: string): Promise<boolean>;
354
341
  isReviewRequired(data: ApwContentReviewContent): Promise<{
355
342
  isReviewRequired: boolean;
356
343
  contentReviewId?: string | null;
357
344
  }>;
358
- publishContent(id: string, datetime?: string): Promise<Boolean>;
359
- unpublishContent(id: string, datetime?: string): Promise<Boolean>;
345
+ publishContent(id: string, datetime?: string): Promise<boolean>;
346
+ unpublishContent(id: string, datetime?: string): Promise<boolean>;
360
347
  scheduleAction(data: ApwScheduleActionData): Promise<string>;
361
348
  deleteScheduledAction(id: string): Promise<boolean>;
362
349
  /**
@@ -370,15 +357,15 @@ export interface ApwContentReviewCrud extends BaseApwCrud<ApwContentReview, Crea
370
357
  onContentReviewAfterDelete: Topic<OnContentReviewAfterDeleteTopicParams>;
371
358
  onContentReviewBeforeList: Topic<OnContentReviewBeforeListTopicParams>;
372
359
  }
373
- export declare type ContentGetter = (id: string, settings: {
360
+ export type ContentGetter = (id: string, settings: {
374
361
  modelId?: string;
375
- }) => Promise<PageWithWorkflow | ApwCmsEntry | null>;
376
- export declare type ContentPublisher = (id: string, settings: {
362
+ }) => Promise<ApwCmsEntry | null>;
363
+ export type ContentPublisher = (id: string, settings: {
377
364
  modelId?: string;
378
- }) => Promise<Boolean | null>;
379
- export declare type ContentUnPublisher = (id: string, settings: {
365
+ }) => Promise<boolean | null>;
366
+ export type ContentUnPublisher = (id: string, settings: {
380
367
  modelId?: string;
381
- }) => Promise<Boolean | null>;
368
+ }) => Promise<boolean | null>;
382
369
  export interface AdvancedPublishingWorkflow {
383
370
  addContentGetter: (type: ApwContentTypes, func: ContentGetter) => void;
384
371
  getContentGetter: (type: ApwContentTypes) => ContentGetter;
@@ -393,9 +380,8 @@ export interface AdvancedPublishingWorkflow {
393
380
  contentReview: ApwContentReviewCrud;
394
381
  scheduleAction: ApwScheduleActionCrud;
395
382
  }
396
- export interface ApwContext extends Context, MailerContext, AdminSettingsContext {
383
+ export interface ApwContext extends Context, MailerContext {
397
384
  apw: AdvancedPublishingWorkflow;
398
- pageBuilder: PageBuilderContextObject;
399
385
  wcp: WcpContextObject;
400
386
  scheduleAction: ScheduleActionContext["scheduleAction"];
401
387
  }
@@ -417,7 +403,7 @@ export interface CreateApwParams {
417
403
  interface StorageOperationsGetReviewerParams {
418
404
  id: string;
419
405
  }
420
- declare type StorageOperationsListReviewersParams = ApwReviewerListParams;
406
+ type StorageOperationsListReviewersParams = ApwReviewerListParams;
421
407
  interface CreateApwReviewerData {
422
408
  identityId: string;
423
409
  displayName: string | null;
@@ -446,8 +432,8 @@ interface StorageOperationsGetParams {
446
432
  interface StorageOperationsDeleteParams {
447
433
  id: string;
448
434
  }
449
- declare type StorageOperationsGetWorkflowParams = StorageOperationsGetParams;
450
- declare type StorageOperationsListWorkflowsParams = ListParams;
435
+ type StorageOperationsGetWorkflowParams = StorageOperationsGetParams;
436
+ type StorageOperationsListWorkflowsParams = ListParams;
451
437
  interface StorageOperationsCreateWorkflowParams {
452
438
  data: CreateApwWorkflowParams;
453
439
  }
@@ -455,8 +441,8 @@ interface StorageOperationsUpdateWorkflowParams {
455
441
  id: string;
456
442
  data: UpdateApwWorkflowParams;
457
443
  }
458
- declare type StorageOperationsDeleteWorkflowParams = StorageOperationsDeleteParams;
459
- declare type StorageOperationsGetContentReviewParams = StorageOperationsGetParams;
444
+ type StorageOperationsDeleteWorkflowParams = StorageOperationsDeleteParams;
445
+ type StorageOperationsGetContentReviewParams = StorageOperationsGetParams;
460
446
  export interface ApwContentReviewListParams extends ListParams {
461
447
  where: ListWhere & {
462
448
  reviewStatus?: ApwContentReviewListFilter;
@@ -466,7 +452,7 @@ export interface ApwContentReviewListParams extends ListParams {
466
452
  workflowId_in?: string[];
467
453
  };
468
454
  }
469
- declare type StorageOperationsListContentReviewsParams = ApwContentReviewListParams;
455
+ type StorageOperationsListContentReviewsParams = ApwContentReviewListParams;
470
456
  interface StorageOperationsCreateContentReviewParams {
471
457
  data: CreateApwContentReviewParams;
472
458
  }
@@ -474,9 +460,9 @@ interface StorageOperationsUpdateContentReviewParams {
474
460
  id: string;
475
461
  data: UpdateApwContentReviewParams;
476
462
  }
477
- declare type StorageOperationsDeleteContentReviewParams = StorageOperationsDeleteParams;
478
- declare type StorageOperationsGetChangeRequestParams = StorageOperationsGetParams;
479
- declare type StorageOperationsListChangeRequestsParams = ApwChangeRequestListParams;
463
+ type StorageOperationsDeleteContentReviewParams = StorageOperationsDeleteParams;
464
+ type StorageOperationsGetChangeRequestParams = StorageOperationsGetParams;
465
+ type StorageOperationsListChangeRequestsParams = ApwChangeRequestListParams;
480
466
  interface StorageOperationsCreateChangeRequestParams {
481
467
  data: CreateApwChangeRequestParams;
482
468
  }
@@ -484,10 +470,10 @@ interface StorageOperationsUpdateChangeRequestParams {
484
470
  id: string;
485
471
  data: UpdateApwChangeRequestParams;
486
472
  }
487
- declare type StorageOperationsDeleteChangeRequestParams = StorageOperationsDeleteParams;
488
- declare type StorageOperationsGetCommentParams = StorageOperationsGetParams;
489
- declare type StorageOperationsDeleteCommentParams = StorageOperationsDeleteParams;
490
- declare type StorageOperationsListCommentsParams = ApwCommentListParams;
473
+ type StorageOperationsDeleteChangeRequestParams = StorageOperationsDeleteParams;
474
+ type StorageOperationsGetCommentParams = StorageOperationsGetParams;
475
+ type StorageOperationsDeleteCommentParams = StorageOperationsDeleteParams;
476
+ type StorageOperationsListCommentsParams = ApwCommentListParams;
491
477
  interface StorageOperationsCreateCommentParams {
492
478
  data: CreateApwCommentParams;
493
479
  }
@@ -500,35 +486,35 @@ export interface ApwReviewerStorageOperations {
500
486
  listReviewers(params: StorageOperationsListReviewersParams): Promise<[ApwReviewer[], ListMeta]>;
501
487
  createReviewer(params: StorageOperationsCreateReviewerParams): Promise<ApwReviewer>;
502
488
  updateReviewer(params: StorageOperationsUpdateReviewerParams): Promise<ApwReviewer>;
503
- deleteReviewer(params: StorageOperationsDeleteReviewerParams): Promise<Boolean>;
489
+ deleteReviewer(params: StorageOperationsDeleteReviewerParams): Promise<boolean>;
504
490
  }
505
491
  export interface ApwWorkflowStorageOperations {
506
492
  getWorkflow(params: StorageOperationsGetWorkflowParams): Promise<ApwWorkflow>;
507
493
  listWorkflows(params: StorageOperationsListWorkflowsParams): Promise<[ApwWorkflow[], ListMeta]>;
508
494
  createWorkflow(params: StorageOperationsCreateWorkflowParams): Promise<ApwWorkflow>;
509
495
  updateWorkflow(params: StorageOperationsUpdateWorkflowParams): Promise<ApwWorkflow>;
510
- deleteWorkflow(params: StorageOperationsDeleteWorkflowParams): Promise<Boolean>;
496
+ deleteWorkflow(params: StorageOperationsDeleteWorkflowParams): Promise<boolean>;
511
497
  }
512
498
  export interface ApwContentReviewStorageOperations {
513
499
  getContentReview(params: StorageOperationsGetContentReviewParams): Promise<ApwContentReview>;
514
500
  listContentReviews(params: StorageOperationsListContentReviewsParams): Promise<[ApwContentReview[], ListMeta]>;
515
501
  createContentReview(params: StorageOperationsCreateContentReviewParams): Promise<ApwContentReview>;
516
502
  updateContentReview(params: StorageOperationsUpdateContentReviewParams): Promise<ApwContentReview>;
517
- deleteContentReview(params: StorageOperationsDeleteContentReviewParams): Promise<Boolean>;
503
+ deleteContentReview(params: StorageOperationsDeleteContentReviewParams): Promise<boolean>;
518
504
  }
519
505
  export interface ApwChangeRequestStorageOperations {
520
506
  getChangeRequest(params: StorageOperationsGetChangeRequestParams): Promise<ApwChangeRequest>;
521
507
  listChangeRequests(params: StorageOperationsListChangeRequestsParams): Promise<[ApwChangeRequest[], ListMeta]>;
522
508
  createChangeRequest(params: StorageOperationsCreateChangeRequestParams): Promise<ApwChangeRequest>;
523
509
  updateChangeRequest(params: StorageOperationsUpdateChangeRequestParams): Promise<ApwChangeRequest>;
524
- deleteChangeRequest(params: StorageOperationsDeleteChangeRequestParams): Promise<Boolean>;
510
+ deleteChangeRequest(params: StorageOperationsDeleteChangeRequestParams): Promise<boolean>;
525
511
  }
526
512
  export interface ApwCommentStorageOperations {
527
513
  getComment(params: StorageOperationsGetCommentParams): Promise<ApwComment>;
528
514
  listComments(params: StorageOperationsListCommentsParams): Promise<[ApwComment[], ListMeta]>;
529
515
  createComment(params: StorageOperationsCreateCommentParams): Promise<ApwComment>;
530
516
  updateComment(params: StorageOperationsUpdateCommentParams): Promise<ApwComment>;
531
- deleteComment(params: StorageOperationsDeleteCommentParams): Promise<Boolean>;
517
+ deleteComment(params: StorageOperationsDeleteCommentParams): Promise<boolean>;
532
518
  }
533
519
  export interface ApwStorageOperations extends ApwReviewerStorageOperations, ApwWorkflowStorageOperations, ApwContentReviewStorageOperations, ApwChangeRequestStorageOperations, ApwCommentStorageOperations {
534
520
  }
@@ -736,7 +722,6 @@ export interface OnWorkflowBeforeDeleteTopicParams {
736
722
  export interface OnWorkflowAfterDeleteTopicParams {
737
723
  workflow: ApwWorkflow;
738
724
  }
739
- export declare type WorkflowModelDefinition = Pick<CmsModel, "name" | "modelId" | "layout" | "titleFieldId" | "description" | "fields" | "isPrivate">;
740
725
  /**
741
726
  * Headless CMS
742
727
  */
package/types.js CHANGED
@@ -4,52 +4,144 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.WorkflowScopeTypes = exports.ApwWorkflowStepTypes = exports.ApwWorkflowApplications = exports.ApwContentTypes = exports.ApwContentReviewStepStatus = exports.ApwContentReviewStatus = void 0;
7
- let ApwContentTypes;
8
- exports.ApwContentTypes = ApwContentTypes;
9
- (function (ApwContentTypes) {
7
+ let ApwContentTypes = exports.ApwContentTypes = /*#__PURE__*/function (ApwContentTypes) {
10
8
  ApwContentTypes["PAGE"] = "page";
11
9
  ApwContentTypes["CMS_ENTRY"] = "cms_entry";
12
- })(ApwContentTypes || (exports.ApwContentTypes = ApwContentTypes = {}));
13
- let WorkflowScopeTypes;
14
- exports.WorkflowScopeTypes = WorkflowScopeTypes;
15
- (function (WorkflowScopeTypes) {
10
+ return ApwContentTypes;
11
+ }({});
12
+ let WorkflowScopeTypes = exports.WorkflowScopeTypes = /*#__PURE__*/function (WorkflowScopeTypes) {
16
13
  WorkflowScopeTypes["DEFAULT"] = "default";
17
14
  WorkflowScopeTypes["CUSTOM"] = "custom";
18
- })(WorkflowScopeTypes || (exports.WorkflowScopeTypes = WorkflowScopeTypes = {}));
19
- let ApwContentReviewStepStatus;
20
- exports.ApwContentReviewStepStatus = ApwContentReviewStepStatus;
21
- (function (ApwContentReviewStepStatus) {
15
+ return WorkflowScopeTypes;
16
+ }({});
17
+ let ApwContentReviewStepStatus = exports.ApwContentReviewStepStatus = /*#__PURE__*/function (ApwContentReviewStepStatus) {
22
18
  ApwContentReviewStepStatus["DONE"] = "done";
23
19
  ApwContentReviewStepStatus["ACTIVE"] = "active";
24
20
  ApwContentReviewStepStatus["INACTIVE"] = "inactive";
25
- })(ApwContentReviewStepStatus || (exports.ApwContentReviewStepStatus = ApwContentReviewStepStatus = {}));
26
- let ApwWorkflowApplications;
21
+ return ApwContentReviewStepStatus;
22
+ }({});
23
+ let ApwWorkflowApplications = exports.ApwWorkflowApplications = /*#__PURE__*/function (ApwWorkflowApplications) {
24
+ ApwWorkflowApplications["PB"] = "pageBuilder";
25
+ ApwWorkflowApplications["CMS"] = "cms";
26
+ return ApwWorkflowApplications;
27
+ }({});
27
28
  /**
28
29
  * A interface describing the reference to a user that created some data in the database.
29
30
  *
30
31
  * @category General
31
32
  */
32
- exports.ApwWorkflowApplications = ApwWorkflowApplications;
33
- (function (ApwWorkflowApplications) {
34
- ApwWorkflowApplications["PB"] = "pageBuilder";
35
- ApwWorkflowApplications["CMS"] = "cms";
36
- })(ApwWorkflowApplications || (exports.ApwWorkflowApplications = ApwWorkflowApplications = {}));
37
- let ApwWorkflowStepTypes;
38
- exports.ApwWorkflowStepTypes = ApwWorkflowStepTypes;
39
- (function (ApwWorkflowStepTypes) {
33
+ let ApwWorkflowStepTypes = exports.ApwWorkflowStepTypes = /*#__PURE__*/function (ApwWorkflowStepTypes) {
40
34
  ApwWorkflowStepTypes["MANDATORY_BLOCKING"] = "mandatoryBlocking";
41
35
  ApwWorkflowStepTypes["MANDATORY_NON_BLOCKING"] = "mandatoryNonBlocking";
42
36
  ApwWorkflowStepTypes["NON_MANDATORY"] = "notMandatory";
43
- })(ApwWorkflowStepTypes || (exports.ApwWorkflowStepTypes = ApwWorkflowStepTypes = {}));
44
- let ApwContentReviewStatus;
45
- exports.ApwContentReviewStatus = ApwContentReviewStatus;
46
- (function (ApwContentReviewStatus) {
37
+ return ApwWorkflowStepTypes;
38
+ }({});
39
+ let ApwContentReviewStatus = exports.ApwContentReviewStatus = /*#__PURE__*/function (ApwContentReviewStatus) {
47
40
  ApwContentReviewStatus["UNDER_REVIEW"] = "underReview";
48
41
  ApwContentReviewStatus["READY_TO_BE_PUBLISHED"] = "readyToBePublished";
49
42
  ApwContentReviewStatus["PUBLISHED"] = "published";
50
- })(ApwContentReviewStatus || (exports.ApwContentReviewStatus = ApwContentReviewStatus = {}));
51
- var ApwScheduleActionTypes;
52
- (function (ApwScheduleActionTypes) {
43
+ return ApwContentReviewStatus;
44
+ }({});
45
+ var ApwScheduleActionTypes = /*#__PURE__*/function (ApwScheduleActionTypes) {
53
46
  ApwScheduleActionTypes["PUBLISH"] = "publish";
54
47
  ApwScheduleActionTypes["UNPUBLISH"] = "unpublish";
55
- })(ApwScheduleActionTypes || (ApwScheduleActionTypes = {}));
48
+ return ApwScheduleActionTypes;
49
+ }(ApwScheduleActionTypes || {});
50
+ /**
51
+ * @category Lifecycle events
52
+ */
53
+ /**
54
+ * @category Lifecycle events
55
+ */
56
+ /**
57
+ * @category Lifecycle events
58
+ */
59
+ /**
60
+ * @category Lifecycle events
61
+ */
62
+ /**
63
+ * @category Lifecycle events
64
+ */
65
+ /**
66
+ * @category Lifecycle events
67
+ */
68
+ /**
69
+ * @category Lifecycle events
70
+ */
71
+ /**
72
+ * @category Lifecycle events
73
+ */
74
+ /**
75
+ * @category Lifecycle events
76
+ */
77
+ /**
78
+ * @category Lifecycle events
79
+ */
80
+ /**
81
+ * @category Lifecycle events
82
+ */
83
+ /**
84
+ * @category Lifecycle events
85
+ */
86
+ /**
87
+ * @category Lifecycle events
88
+ */
89
+ /**
90
+ * @category Lifecycle events
91
+ */
92
+ /**
93
+ * @category Lifecycle events
94
+ */
95
+ /**
96
+ * @category Lifecycle events
97
+ */
98
+ /**
99
+ * @category Lifecycle events
100
+ */
101
+ /**
102
+ * @category Lifecycle events
103
+ */
104
+ /**
105
+ * @category Lifecycle events
106
+ */
107
+ /**
108
+ * @category Lifecycle events
109
+ */
110
+ /**
111
+ * @category Lifecycle events
112
+ */
113
+ /**
114
+ * @category Lifecycle events
115
+ */
116
+ /**
117
+ * @category Lifecycle events
118
+ */
119
+ /**
120
+ * @category Lifecycle events
121
+ */
122
+ /**
123
+ * @category Lifecycle events
124
+ */
125
+ /**
126
+ * @category Lifecycle events
127
+ */
128
+ /**
129
+ * @category Lifecycle events
130
+ */
131
+ /**
132
+ * @category Lifecycle events
133
+ */
134
+ /**
135
+ * @category Lifecycle events
136
+ */
137
+ /**
138
+ * @category Lifecycle events
139
+ */
140
+ /**
141
+ * @category Lifecycle events
142
+ */
143
+ /**
144
+ * Headless CMS
145
+ */
146
+
147
+ //# sourceMappingURL=types.js.map
package/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["ApwContentTypes","WorkflowScopeTypes","ApwContentReviewStepStatus","ApwWorkflowApplications","ApwWorkflowStepTypes","ApwContentReviewStatus","ApwScheduleActionTypes"],"sources":["types.ts"],"sourcesContent":["import {\n CmsEntry as BaseCmsEntry,\n CmsModel,\n OnEntryBeforePublishTopicParams,\n OnEntryAfterPublishTopicParams,\n OnEntryAfterUnpublishTopicParams\n} from \"@webiny/api-headless-cms/types\";\nimport {\n Page,\n OnPageBeforeCreateTopicParams,\n OnPageBeforeCreateFromTopicParams,\n OnPageBeforeUpdateTopicParams,\n OnPageBeforePublishTopicParams,\n PageSettings\n} from \"@webiny/api-page-builder/types\";\nimport { Context } from \"@webiny/api/types\";\nimport { PageBuilderContextObject } from \"@webiny/api-page-builder/graphql/types\";\nimport { SecurityIdentity, SecurityPermission } from \"@webiny/api-security/types\";\nimport { I18NLocale } from \"@webiny/api-i18n/types\";\nimport { Tenant } from \"@webiny/api-tenancy/types\";\nimport { Topic } from \"@webiny/pubsub/types\";\nimport { ApwScheduleActionCrud, ScheduleActionContext } from \"~/scheduler/types\";\nimport HandlerClient from \"@webiny/handler-client/HandlerClient\";\nimport { PluginsContainer } from \"@webiny/plugins\";\nimport { WcpContextObject } from \"@webiny/api-wcp/types\";\nimport { MailerContext } from \"@webiny/api-mailer/types\";\nimport { AdminSettingsContext } from \"@webiny/api-admin-settings/types\";\n\nexport interface ApwCmsEntry extends BaseCmsEntry {\n title: string;\n meta: {\n apw?: {\n contentReviewId?: string | null;\n workflowId?: string | null;\n };\n };\n}\n\nexport interface ApwFile {\n id: string;\n key: string;\n size: number;\n type: string;\n name: string;\n}\n\nexport interface ListWhere {\n /**\n * Fields.\n */\n id?: string;\n id_in?: string[];\n id_not?: string;\n id_not_in?: string[];\n /**\n * Who created the entry?\n */\n createdBy?: string;\n createdBy_not?: string;\n createdBy_in?: string[];\n createdBy_not_in?: string[];\n}\n\nexport interface ListParams {\n where?: ListWhere;\n sort?: string[];\n limit?: number;\n after?: string | null;\n}\n\nexport interface ListMeta {\n /**\n * A cursor for pagination.\n */\n cursor: string | null;\n /**\n * Is there more items to load?\n */\n hasMoreItems: boolean;\n /**\n * Total count of the items in the storage.\n */\n totalCount: number;\n}\n\nexport enum ApwContentTypes {\n PAGE = \"page\",\n CMS_ENTRY = \"cms_entry\"\n}\n\nexport interface PageSettingsWithWorkflow extends PageSettings {\n apw: {\n workflowId: string;\n contentReviewId: string | null;\n };\n}\nexport interface PageWithWorkflow extends Page {\n settings: PageSettingsWithWorkflow;\n}\n\nexport type ApwOnPageBeforeCreateTopicParams = OnPageBeforeCreateTopicParams<PageWithWorkflow>;\n\nexport type ApwOnPageBeforeCreateFromTopicParams =\n OnPageBeforeCreateFromTopicParams<PageWithWorkflow>;\n\nexport type ApwOnPageBeforeUpdateTopicParams = OnPageBeforeUpdateTopicParams<PageWithWorkflow>;\n\nexport type ApwOnPageBeforePublishTopicParams = OnPageBeforePublishTopicParams<PageWithWorkflow>;\n\nexport enum WorkflowScopeTypes {\n DEFAULT = \"default\",\n CUSTOM = \"custom\"\n}\n\nexport enum ApwContentReviewStepStatus {\n DONE = \"done\",\n ACTIVE = \"active\",\n INACTIVE = \"inactive\"\n}\n\nexport enum ApwWorkflowApplications {\n PB = \"pageBuilder\",\n CMS = \"cms\"\n}\n\n/**\n * A interface describing the reference to a user that created some data in the database.\n *\n * @category General\n */\nexport interface CreatedBy {\n /**\n * ID if the user.\n */\n id: string;\n /**\n * Full name of the user.\n */\n displayName: string | null;\n /**\n * Type of the user (admin, user)\n */\n type: string;\n}\n\nexport interface ApwBaseFields {\n id: string;\n entryId: string;\n createdOn: string;\n savedOn: string;\n createdBy: CreatedBy;\n}\n\nexport interface ApwReviewer extends ApwBaseFields {\n identityId: string;\n displayName: string | null;\n type: string;\n email?: string;\n}\nexport interface ApwReviewerWithEmail extends Omit<ApwReviewer, \"email\"> {\n email: string;\n}\n\nexport interface ApwComment extends ApwBaseFields {\n body: Record<string, any>;\n changeRequest: string;\n step: string;\n media: ApwFile;\n}\n\nexport interface ApwChangeRequest extends ApwBaseFields {\n body: Record<string, any>;\n title: string;\n resolved: boolean;\n step: string;\n media: ApwFile;\n}\n\nexport interface ApwContentReviewStep {\n type: ApwWorkflowStepTypes;\n title: string;\n slug: string;\n reviewers: ApwReviewer[];\n status: ApwContentReviewStepStatus;\n pendingChangeRequests: number;\n totalComments: number;\n signOffProvidedOn: string | null;\n signOffProvidedBy: CreatedBy | null;\n}\n\nexport interface ApwContentReview extends ApwBaseFields {\n title: string;\n reviewStatus: ApwContentReviewStatus;\n content: ApwContentReviewContent;\n steps: Array<ApwContentReviewStep>;\n latestCommentId: string | null;\n workflowId: string;\n}\n\nexport interface ApwWorkflow extends ApwBaseFields {\n title: string;\n steps: ApwWorkflowStep[];\n scope: ApwWorkflowScope;\n app: ApwWorkflowApplications;\n}\n\ninterface ApwWorkflowScopeCmsEntry {\n id: string;\n modelId: string;\n}\nexport interface ApwWorkflowScope {\n type: WorkflowScopeTypes;\n data: {\n categories?: string[];\n pages?: string[];\n models?: string[];\n entries?: ApwWorkflowScopeCmsEntry[];\n };\n}\n\nexport enum ApwWorkflowStepTypes {\n MANDATORY_BLOCKING = \"mandatoryBlocking\",\n MANDATORY_NON_BLOCKING = \"mandatoryNonBlocking\",\n NON_MANDATORY = \"notMandatory\"\n}\n\nexport enum ApwContentReviewStatus {\n UNDER_REVIEW = \"underReview\",\n READY_TO_BE_PUBLISHED = \"readyToBePublished\",\n PUBLISHED = \"published\"\n}\n\nexport type ApwContentReviewListFilter = ApwContentReviewStatus | \"requiresMyAttention\";\n\nexport interface ApwWorkflowStep<TReviewer = ApwReviewer> {\n title: string;\n type: ApwWorkflowStepTypes;\n reviewers: TReviewer[];\n id: string;\n}\n\nexport interface ApwContentReviewStep extends ApwWorkflowStep {\n status: ApwContentReviewStepStatus;\n pendingChangeRequests: number;\n}\n\nexport interface CreateApwWorkflowParams<TReviewer = string> {\n app: ApwWorkflowApplications;\n title: string;\n scope: ApwWorkflowScope;\n steps: ApwWorkflowStep<TReviewer>[];\n}\n\nexport interface UpdateApwWorkflowParams<TReviewer = string> {\n title?: string;\n scope?: ApwWorkflowScope;\n steps?: ApwWorkflowStep<TReviewer>[];\n}\n\nexport interface ListWorkflowsParams extends ListParams {\n where?: ListWhere & {\n app?: ApwWorkflowApplications;\n };\n}\n\ninterface CreateApwCommentParams {\n body: Record<string, any>;\n changeRequest: string;\n step: string;\n media: ApwFile;\n}\n\ninterface UpdateApwCommentParams {\n body: Record<string, any>;\n}\n\ninterface CreateApwChangeRequestParams {\n title: string;\n step: string;\n body: Record<string, any>;\n resolved: boolean;\n media: Record<string, any>;\n}\n\ninterface UpdateApwChangeRequestParams {\n title: string;\n body: Record<string, any>;\n resolved: boolean;\n media: Record<string, any>;\n}\n\nenum ApwScheduleActionTypes {\n PUBLISH = \"publish\",\n UNPUBLISH = \"unpublish\"\n}\n\nexport interface ApwScheduleActionData {\n action: ApwScheduleActionTypes;\n type: ApwContentTypes;\n datetime: string;\n entryId: string;\n /**\n * We will add modelId to the data for now.\n * TODO extract in separate package?\n */\n modelId?: string;\n}\n\nexport interface ApwContentReviewContent {\n id: string;\n type: ApwContentTypes;\n settings: {\n modelId?: string;\n };\n scheduledOn?: string | null;\n scheduledBy?: string | null;\n scheduledActionId?: string | null;\n publishedBy?: string | null;\n}\n\nexport interface CreateApwContentReviewParams {\n content: ApwContentReviewContent;\n reviewStatus: ApwContentReviewStatus;\n workflowId?: string;\n}\n\nexport interface UpdateApwContentReviewParams {\n title?: string;\n steps?: ApwContentReviewStep[];\n reviewStatus?: ApwContentReviewStatus;\n content?: ApwContentReviewContent;\n}\n\ninterface BaseApwCrud<TEntry, TCreateEntryParams, TUpdateEntryParams> {\n get(id: string): Promise<TEntry>;\n\n create(data: TCreateEntryParams): Promise<TEntry>;\n\n update(id: string, data: TUpdateEntryParams): Promise<TEntry>;\n\n delete(id: string): Promise<Boolean>;\n}\n\nexport interface ApwWorkflowCrud\n extends BaseApwCrud<ApwWorkflow, CreateApwWorkflowParams, UpdateApwWorkflowParams> {\n list(params?: ListWorkflowsParams): Promise<[ApwWorkflow[], ListMeta]>;\n\n /**\n * Lifecycle events\n */\n onWorkflowBeforeCreate: Topic<OnWorkflowBeforeCreateTopicParams>;\n onWorkflowAfterCreate: Topic<OnWorkflowAfterCreateTopicParams>;\n onWorkflowBeforeUpdate: Topic<OnWorkflowBeforeUpdateTopicParams>;\n onWorkflowAfterUpdate: Topic<OnWorkflowAfterUpdateTopicParams>;\n onWorkflowBeforeDelete: Topic<OnWorkflowBeforeDeleteTopicParams>;\n onWorkflowAfterDelete: Topic<OnWorkflowAfterDeleteTopicParams>;\n}\n\nexport interface ApwReviewerListParams extends ListParams {\n where: ListParams[\"where\"] & {\n identityId?: string;\n };\n}\n\nexport interface ApwReviewerCrud\n extends BaseApwCrud<ApwReviewer, CreateApwReviewerData, UpdateApwReviewerData> {\n list(params: ApwReviewerListParams): Promise<[ApwReviewer[], ListMeta]>;\n\n /**\n * Lifecycle events\n */\n onReviewerBeforeCreate: Topic<OnReviewerBeforeCreateTopicParams>;\n onReviewerAfterCreate: Topic<OnReviewerAfterCreateTopicParams>;\n onReviewerBeforeUpdate: Topic<OnReviewerBeforeUpdateTopicParams>;\n onReviewerAfterUpdate: Topic<OnReviewerAfterUpdateTopicParams>;\n onReviewerBeforeDelete: Topic<OnReviewerBeforeDeleteTopicParams>;\n onReviewerAfterDelete: Topic<OnReviewerAfterDeleteTopicParams>;\n}\n\nexport interface ApwCommentListParams extends ListParams {\n where: ListParams[\"where\"] & {\n changeRequest?: {\n id?: string;\n };\n };\n}\n\nexport interface ApwCommentCrud\n extends BaseApwCrud<ApwComment, CreateApwCommentParams, UpdateApwCommentParams> {\n list(params: ApwCommentListParams): Promise<[ApwComment[], ListMeta]>;\n\n /**\n * Lifecycle events\n */\n onCommentBeforeCreate: Topic<OnCommentBeforeCreateTopicParams>;\n onCommentAfterCreate: Topic<OnCommentAfterCreateTopicParams>;\n onCommentBeforeUpdate: Topic<OnCommentBeforeUpdateTopicParams>;\n onCommentAfterUpdate: Topic<OnCommentAfterUpdateTopicParams>;\n onCommentBeforeDelete: Topic<OnCommentBeforeDeleteTopicParams>;\n onCommentAfterDelete: Topic<OnCommentAfterDeleteTopicParams>;\n}\n\nexport interface ApwChangeRequestListParams extends ListParams {\n where: ListParams[\"where\"] & {\n step?: string;\n };\n}\n\nexport interface ApwChangeRequestCrud\n extends BaseApwCrud<\n ApwChangeRequest,\n CreateApwChangeRequestParams,\n UpdateApwChangeRequestParams\n > {\n list(params: ApwChangeRequestListParams): Promise<[ApwChangeRequest[], ListMeta]>;\n\n /**\n * Lifecycle events\n */\n onChangeRequestBeforeCreate: Topic<OnChangeRequestBeforeCreateTopicParams>;\n onChangeRequestAfterCreate: Topic<OnChangeRequestAfterCreateTopicParams>;\n onChangeRequestBeforeUpdate: Topic<OnChangeRequestBeforeUpdateTopicParams>;\n onChangeRequestAfterUpdate: Topic<OnChangeRequestAfterUpdateTopicParams>;\n onChangeRequestBeforeDelete: Topic<OnChangeRequestBeforeDeleteTopicParams>;\n onChangeRequestAfterDelete: Topic<OnChangeRequestAfterDeleteTopicParams>;\n}\n\nexport interface ApwContentReviewCrud\n extends BaseApwCrud<\n ApwContentReview,\n CreateApwContentReviewParams,\n UpdateApwContentReviewParams\n > {\n list(params: ApwContentReviewListParams): Promise<[ApwContentReview[], ListMeta]>;\n\n provideSignOff(id: string, step: string): Promise<Boolean>;\n\n retractSignOff(id: string, step: string): Promise<Boolean>;\n\n isReviewRequired(data: ApwContentReviewContent): Promise<{\n isReviewRequired: boolean;\n contentReviewId?: string | null;\n }>;\n\n publishContent(id: string, datetime?: string): Promise<Boolean>;\n\n unpublishContent(id: string, datetime?: string): Promise<Boolean>;\n\n scheduleAction(data: ApwScheduleActionData): Promise<string>;\n\n deleteScheduledAction(id: string): Promise<boolean>;\n\n /**\n * Lifecycle events\n */\n onContentReviewBeforeCreate: Topic<OnContentReviewBeforeCreateTopicParams>;\n onContentReviewAfterCreate: Topic<OnContentReviewAfterCreateTopicParams>;\n onContentReviewBeforeUpdate: Topic<OnContentReviewBeforeUpdateTopicParams>;\n onContentReviewAfterUpdate: Topic<OnContentReviewAfterUpdateTopicParams>;\n onContentReviewBeforeDelete: Topic<OnContentReviewBeforeDeleteTopicParams>;\n onContentReviewAfterDelete: Topic<OnContentReviewAfterDeleteTopicParams>;\n onContentReviewBeforeList: Topic<OnContentReviewBeforeListTopicParams>;\n}\n\nexport type ContentGetter = (\n id: string,\n settings: { modelId?: string }\n) => Promise<PageWithWorkflow | ApwCmsEntry | null>;\n\nexport type ContentPublisher = (\n id: string,\n settings: { modelId?: string }\n) => Promise<Boolean | null>;\n\nexport type ContentUnPublisher = (\n id: string,\n settings: { modelId?: string }\n) => Promise<Boolean | null>;\n\nexport interface AdvancedPublishingWorkflow {\n addContentGetter: (type: ApwContentTypes, func: ContentGetter) => void;\n getContentGetter: (type: ApwContentTypes) => ContentGetter;\n addContentPublisher: (type: ApwContentTypes, func: ContentPublisher) => void;\n getContentPublisher: (type: ApwContentTypes) => ContentPublisher;\n addContentUnPublisher: (type: ApwContentTypes, func: ContentUnPublisher) => void;\n getContentUnPublisher: (type: ApwContentTypes) => ContentUnPublisher;\n workflow: ApwWorkflowCrud;\n reviewer: ApwReviewerCrud;\n comment: ApwCommentCrud;\n changeRequest: ApwChangeRequestCrud;\n contentReview: ApwContentReviewCrud;\n scheduleAction: ApwScheduleActionCrud;\n}\n\nexport interface ApwContext extends Context, MailerContext, AdminSettingsContext {\n apw: AdvancedPublishingWorkflow;\n pageBuilder: PageBuilderContextObject;\n wcp: WcpContextObject;\n scheduleAction: ScheduleActionContext[\"scheduleAction\"];\n}\n\nexport interface LifeCycleHookCallbackParams {\n apw: ApwContext[\"apw\"];\n security: ApwContext[\"security\"];\n cms?: ApwContext[\"cms\"];\n}\n\nexport interface CreateApwParams {\n getLocale: () => I18NLocale;\n getIdentity: () => SecurityIdentity;\n getTenant: () => Tenant;\n getPermission: (name: string) => Promise<SecurityPermission | null>;\n storageOperations: ApwStorageOperations;\n scheduler: ApwScheduleActionCrud;\n handlerClient: HandlerClient;\n plugins: PluginsContainer;\n}\n\ninterface StorageOperationsGetReviewerParams {\n id: string;\n}\n\ntype StorageOperationsListReviewersParams = ApwReviewerListParams;\n\ninterface CreateApwReviewerData {\n identityId: string;\n displayName: string | null;\n type: string;\n email?: string | null;\n}\n\ninterface UpdateApwReviewerData {\n identityId: string;\n displayName: string | null;\n type: string;\n email?: string | null;\n}\n\ninterface StorageOperationsCreateReviewerParams {\n data: CreateApwReviewerData;\n}\n\ninterface StorageOperationsUpdateReviewerParams {\n id: string;\n data: UpdateApwReviewerData;\n}\n\ninterface StorageOperationsDeleteReviewerParams {\n id: string;\n}\n\ninterface StorageOperationsGetParams {\n id: string;\n}\n\ninterface StorageOperationsDeleteParams {\n id: string;\n}\n\ntype StorageOperationsGetWorkflowParams = StorageOperationsGetParams;\n\ntype StorageOperationsListWorkflowsParams = ListParams;\n\ninterface StorageOperationsCreateWorkflowParams {\n data: CreateApwWorkflowParams;\n}\n\ninterface StorageOperationsUpdateWorkflowParams {\n id: string;\n data: UpdateApwWorkflowParams;\n}\n\ntype StorageOperationsDeleteWorkflowParams = StorageOperationsDeleteParams;\ntype StorageOperationsGetContentReviewParams = StorageOperationsGetParams;\n\nexport interface ApwContentReviewListParams extends ListParams {\n where: ListWhere & {\n reviewStatus?: ApwContentReviewListFilter;\n title?: string;\n title_contains?: string;\n workflowId?: string;\n workflowId_in?: string[];\n };\n}\n\ntype StorageOperationsListContentReviewsParams = ApwContentReviewListParams;\n\ninterface StorageOperationsCreateContentReviewParams {\n data: CreateApwContentReviewParams;\n}\n\ninterface StorageOperationsUpdateContentReviewParams {\n id: string;\n data: UpdateApwContentReviewParams;\n}\n\ntype StorageOperationsDeleteContentReviewParams = StorageOperationsDeleteParams;\n\ntype StorageOperationsGetChangeRequestParams = StorageOperationsGetParams;\ntype StorageOperationsListChangeRequestsParams = ApwChangeRequestListParams;\n\ninterface StorageOperationsCreateChangeRequestParams {\n data: CreateApwChangeRequestParams;\n}\n\ninterface StorageOperationsUpdateChangeRequestParams {\n id: string;\n data: UpdateApwChangeRequestParams;\n}\n\ntype StorageOperationsDeleteChangeRequestParams = StorageOperationsDeleteParams;\n\ntype StorageOperationsGetCommentParams = StorageOperationsGetParams;\n\ntype StorageOperationsDeleteCommentParams = StorageOperationsDeleteParams;\ntype StorageOperationsListCommentsParams = ApwCommentListParams;\n\ninterface StorageOperationsCreateCommentParams {\n data: CreateApwCommentParams;\n}\n\ninterface StorageOperationsUpdateCommentParams {\n id: string;\n data: UpdateApwCommentParams;\n}\n\nexport interface ApwReviewerStorageOperations {\n /*\n * Reviewer methods\n */\n getReviewer(params: StorageOperationsGetReviewerParams): Promise<ApwReviewer>;\n\n listReviewers(params: StorageOperationsListReviewersParams): Promise<[ApwReviewer[], ListMeta]>;\n\n createReviewer(params: StorageOperationsCreateReviewerParams): Promise<ApwReviewer>;\n\n updateReviewer(params: StorageOperationsUpdateReviewerParams): Promise<ApwReviewer>;\n\n deleteReviewer(params: StorageOperationsDeleteReviewerParams): Promise<Boolean>;\n}\n\nexport interface ApwWorkflowStorageOperations {\n /*\n * Workflow methods\n */\n getWorkflow(params: StorageOperationsGetWorkflowParams): Promise<ApwWorkflow>;\n\n listWorkflows(params: StorageOperationsListWorkflowsParams): Promise<[ApwWorkflow[], ListMeta]>;\n\n createWorkflow(params: StorageOperationsCreateWorkflowParams): Promise<ApwWorkflow>;\n\n updateWorkflow(params: StorageOperationsUpdateWorkflowParams): Promise<ApwWorkflow>;\n\n deleteWorkflow(params: StorageOperationsDeleteWorkflowParams): Promise<Boolean>;\n}\n\nexport interface ApwContentReviewStorageOperations {\n /*\n * ContentReview methods\n */\n getContentReview(params: StorageOperationsGetContentReviewParams): Promise<ApwContentReview>;\n\n listContentReviews(\n params: StorageOperationsListContentReviewsParams\n ): Promise<[ApwContentReview[], ListMeta]>;\n\n createContentReview(\n params: StorageOperationsCreateContentReviewParams\n ): Promise<ApwContentReview>;\n\n updateContentReview(\n params: StorageOperationsUpdateContentReviewParams\n ): Promise<ApwContentReview>;\n\n deleteContentReview(params: StorageOperationsDeleteContentReviewParams): Promise<Boolean>;\n}\n\nexport interface ApwChangeRequestStorageOperations {\n /*\n * ChangeRequest methods\n */\n getChangeRequest(params: StorageOperationsGetChangeRequestParams): Promise<ApwChangeRequest>;\n\n listChangeRequests(\n params: StorageOperationsListChangeRequestsParams\n ): Promise<[ApwChangeRequest[], ListMeta]>;\n\n createChangeRequest(\n params: StorageOperationsCreateChangeRequestParams\n ): Promise<ApwChangeRequest>;\n\n updateChangeRequest(\n params: StorageOperationsUpdateChangeRequestParams\n ): Promise<ApwChangeRequest>;\n\n deleteChangeRequest(params: StorageOperationsDeleteChangeRequestParams): Promise<Boolean>;\n}\n\nexport interface ApwCommentStorageOperations {\n /*\n * Comment methods\n */\n getComment(params: StorageOperationsGetCommentParams): Promise<ApwComment>;\n\n listComments(params: StorageOperationsListCommentsParams): Promise<[ApwComment[], ListMeta]>;\n\n createComment(params: StorageOperationsCreateCommentParams): Promise<ApwComment>;\n\n updateComment(params: StorageOperationsUpdateCommentParams): Promise<ApwComment>;\n\n deleteComment(params: StorageOperationsDeleteCommentParams): Promise<Boolean>;\n}\n\nexport interface ApwStorageOperations\n extends ApwReviewerStorageOperations,\n ApwWorkflowStorageOperations,\n ApwContentReviewStorageOperations,\n ApwChangeRequestStorageOperations,\n ApwCommentStorageOperations {}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnCommentBeforeCreateTopicParams {\n input: CreateApwCommentParams;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnCommentAfterCreateTopicParams {\n comment: ApwComment;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnCommentBeforeUpdateTopicParams {\n original: ApwComment;\n input: Record<string, any>;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnCommentAfterUpdateTopicParams {\n original: ApwComment;\n comment: ApwComment;\n input: Record<string, any>;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnCommentBeforeDeleteTopicParams {\n comment: ApwComment;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnCommentAfterDeleteTopicParams {\n comment: ApwComment;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnChangeRequestBeforeCreateTopicParams {\n input: CreateApwChangeRequestParams;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnChangeRequestAfterCreateTopicParams {\n changeRequest: ApwChangeRequest;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnChangeRequestBeforeUpdateTopicParams {\n original: ApwChangeRequest;\n input: Record<string, any>;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnChangeRequestAfterUpdateTopicParams {\n original: ApwChangeRequest;\n changeRequest: ApwChangeRequest;\n input: Record<string, any>;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnChangeRequestBeforeDeleteTopicParams {\n changeRequest: ApwChangeRequest;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnChangeRequestAfterDeleteTopicParams {\n changeRequest: ApwChangeRequest;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnContentReviewBeforeCreateTopicParams {\n input: CreateApwContentReviewParams;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnContentReviewAfterCreateTopicParams {\n contentReview: ApwContentReview;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnContentReviewBeforeUpdateTopicParams {\n original: ApwContentReview;\n input: Record<string, any>;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnContentReviewAfterUpdateTopicParams {\n original: ApwContentReview;\n contentReview: ApwContentReview;\n input: Record<string, any>;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnContentReviewBeforeDeleteTopicParams {\n contentReview: ApwContentReview;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnContentReviewAfterDeleteTopicParams {\n contentReview: ApwContentReview;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnContentReviewBeforeListTopicParams {\n where: ApwContentReviewListParams[\"where\"];\n}\n\nexport interface CreateApwReviewerParams {\n type: string;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnReviewerBeforeCreateTopicParams {\n input: CreateApwReviewerParams;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnReviewerAfterCreateTopicParams {\n reviewer: ApwReviewer;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnReviewerBeforeUpdateTopicParams {\n original: ApwReviewer;\n input: Record<string, any>;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnReviewerAfterUpdateTopicParams {\n original: ApwReviewer;\n reviewer: ApwReviewer;\n input: Record<string, any>;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnReviewerBeforeDeleteTopicParams {\n reviewer: ApwReviewer;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnReviewerAfterDeleteTopicParams {\n reviewer: ApwReviewer;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnWorkflowBeforeCreateTopicParams {\n input: CreateApwWorkflowParams;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnWorkflowAfterCreateTopicParams {\n workflow: ApwWorkflow;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnWorkflowBeforeUpdateTopicParams {\n original: ApwWorkflow;\n input: Record<string, any>;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnWorkflowAfterUpdateTopicParams {\n original: ApwWorkflow;\n workflow: ApwWorkflow;\n input: Record<string, any>;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnWorkflowBeforeDeleteTopicParams {\n workflow: ApwWorkflow;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnWorkflowAfterDeleteTopicParams {\n workflow: ApwWorkflow;\n}\n\nexport type WorkflowModelDefinition = Pick<\n CmsModel,\n \"name\" | \"modelId\" | \"layout\" | \"titleFieldId\" | \"description\" | \"fields\" | \"isPrivate\"\n>;\n\n/**\n * Headless CMS\n */\nexport interface OnCmsEntryBeforePublishTopicParams\n extends Omit<OnEntryBeforePublishTopicParams, \"entry\"> {\n entry: ApwCmsEntry;\n}\nexport interface OnCmsEntryAfterPublishTopicParams\n extends Omit<OnEntryAfterPublishTopicParams, \"entry\"> {\n entry: ApwCmsEntry;\n}\nexport interface OnCmsEntryAfterUnpublishTopicParams\n extends Omit<OnEntryAfterUnpublishTopicParams, \"entry\"> {\n entry: ApwCmsEntry;\n}\n"],"mappings":";;;;;;IAqFYA,eAAe;AAAA;AAAA,WAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;AAAA,GAAfA,eAAe,+BAAfA,eAAe;AAAA,IAwBfC,kBAAkB;AAAA;AAAA,WAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;AAAA,GAAlBA,kBAAkB,kCAAlBA,kBAAkB;AAAA,IAKlBC,0BAA0B;AAAA;AAAA,WAA1BA,0BAA0B;EAA1BA,0BAA0B;EAA1BA,0BAA0B;EAA1BA,0BAA0B;AAAA,GAA1BA,0BAA0B,0CAA1BA,0BAA0B;AAAA,IAM1BC,uBAAuB;AAKnC;AACA;AACA;AACA;AACA;AAJA;AAAA,WALYA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;AAAA,GAAvBA,uBAAuB,uCAAvBA,uBAAuB;AAAA,IAoGvBC,oBAAoB;AAAA;AAAA,WAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;AAAA,GAApBA,oBAAoB,oCAApBA,oBAAoB;AAAA,IAMpBC,sBAAsB;AAAA;AAAA,WAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;AAAA,GAAtBA,sBAAsB,sCAAtBA,sBAAsB;AAAA,IAiE7BC,sBAAsB;AAAA,WAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;AAAA,GAAtBA,sBAAsB,KAAtBA,sBAAsB"}
1
+ {"version":3,"names":["ApwContentTypes","exports","WorkflowScopeTypes","ApwContentReviewStepStatus","ApwWorkflowApplications","ApwWorkflowStepTypes","ApwContentReviewStatus","ApwScheduleActionTypes"],"sources":["types.ts"],"sourcesContent":["import type {\n CmsEntry as BaseCmsEntry,\n OnEntryBeforePublishTopicParams,\n OnEntryAfterPublishTopicParams,\n OnEntryAfterUnpublishTopicParams,\n CmsEntryListSort\n} from \"@webiny/api-headless-cms/types\";\nimport type { Context } from \"@webiny/api/types\";\nimport type { SecurityIdentity, SecurityPermission } from \"@webiny/api-security/types\";\nimport type { I18NLocale } from \"@webiny/api-i18n/types\";\nimport type { Tenant } from \"@webiny/api-tenancy/types\";\nimport type { Topic } from \"@webiny/pubsub/types\";\nimport type { ApwScheduleActionCrud, ScheduleActionContext } from \"~/scheduler/types\";\nimport type HandlerClient from \"@webiny/handler-client/HandlerClient\";\nimport type { PluginsContainer } from \"@webiny/plugins\";\nimport type { WcpContextObject } from \"@webiny/api-wcp/types\";\nimport type { MailerContext } from \"@webiny/api-mailer/types\";\n\nexport interface ApwCmsEntry extends BaseCmsEntry {\n title: string;\n meta: {\n apw?: {\n contentReviewId?: string | null;\n workflowId?: string | null;\n };\n };\n}\n\nexport interface ApwFile {\n id: string;\n key: string;\n size: number;\n type: string;\n name: string;\n}\n\nexport interface ListWhere {\n /**\n * Fields.\n */\n id?: string;\n id_in?: string[];\n id_not?: string;\n id_not_in?: string[];\n /**\n * Who created the entry?\n */\n createdBy?: string;\n createdBy_not?: string;\n createdBy_in?: string[];\n createdBy_not_in?: string[];\n}\n\nexport interface ListParams {\n where?: ListWhere;\n sort?: CmsEntryListSort;\n limit?: number;\n after?: string | null;\n}\n\nexport interface ListMeta {\n /**\n * A cursor for pagination.\n */\n cursor: string | null;\n /**\n * Is there more items to load?\n */\n hasMoreItems: boolean;\n /**\n * Total count of the items in the storage.\n */\n totalCount: number;\n}\n\nexport enum ApwContentTypes {\n PAGE = \"page\",\n CMS_ENTRY = \"cms_entry\"\n}\n\nexport enum WorkflowScopeTypes {\n DEFAULT = \"default\",\n CUSTOM = \"custom\"\n}\n\nexport enum ApwContentReviewStepStatus {\n DONE = \"done\",\n ACTIVE = \"active\",\n INACTIVE = \"inactive\"\n}\n\nexport enum ApwWorkflowApplications {\n PB = \"pageBuilder\",\n CMS = \"cms\"\n}\n\n/**\n * A interface describing the reference to a user that created some data in the database.\n *\n * @category General\n */\nexport interface ApwIdentity {\n /**\n * ID if the user.\n */\n id: string;\n /**\n * Full name of the user.\n */\n displayName: string | null;\n /**\n * Type of the user (admin, user)\n */\n type: string;\n}\n\nexport interface ApwBaseFields {\n id: string;\n entryId: string;\n\n createdOn: string;\n modifiedOn: string | null;\n savedOn: string;\n createdBy: ApwIdentity;\n modifiedBy: ApwIdentity;\n savedBy: ApwIdentity;\n}\n\nexport interface ApwReviewer extends ApwBaseFields {\n identityId: string;\n displayName: string | null;\n type: string;\n email?: string;\n}\n\nexport interface ApwReviewerWithEmail extends Omit<ApwReviewer, \"email\"> {\n email: string;\n}\n\nexport interface ApwComment extends ApwBaseFields {\n body: Record<string, any>;\n changeRequest: string;\n step: string;\n media: ApwFile;\n}\n\nexport interface ApwChangeRequest extends ApwBaseFields {\n body: Record<string, any>;\n title: string;\n resolved: boolean;\n step: string;\n media: ApwFile;\n}\n\nexport interface ApwContentReviewStep {\n type: ApwWorkflowStepTypes;\n title: string;\n slug: string;\n reviewers: ApwReviewer[];\n status: ApwContentReviewStepStatus;\n pendingChangeRequests: number;\n totalComments: number;\n signOffProvidedOn: string | null;\n signOffProvidedBy: ApwIdentity | null;\n}\n\nexport interface ApwContentReview extends ApwBaseFields {\n title: string;\n reviewStatus: ApwContentReviewStatus;\n content: ApwContentReviewContent;\n steps: Array<ApwContentReviewStep>;\n latestCommentId: string | null;\n workflowId: string;\n}\n\nexport interface ApwWorkflow extends ApwBaseFields {\n title: string;\n steps: ApwWorkflowStep[];\n scope: ApwWorkflowScope;\n app: ApwWorkflowApplications;\n}\n\ninterface ApwWorkflowScopeCmsEntry {\n id: string;\n modelId: string;\n}\n\nexport interface ApwWorkflowScope {\n type: WorkflowScopeTypes;\n data: {\n categories?: string[];\n pages?: string[];\n models?: string[];\n entries?: ApwWorkflowScopeCmsEntry[];\n };\n}\n\nexport enum ApwWorkflowStepTypes {\n MANDATORY_BLOCKING = \"mandatoryBlocking\",\n MANDATORY_NON_BLOCKING = \"mandatoryNonBlocking\",\n NON_MANDATORY = \"notMandatory\"\n}\n\nexport enum ApwContentReviewStatus {\n UNDER_REVIEW = \"underReview\",\n READY_TO_BE_PUBLISHED = \"readyToBePublished\",\n PUBLISHED = \"published\"\n}\n\nexport type ApwContentReviewListFilter = ApwContentReviewStatus | \"requiresMyAttention\";\n\nexport interface ApwWorkflowStep<TReviewer = ApwReviewer> {\n title: string;\n type: ApwWorkflowStepTypes;\n reviewers: TReviewer[];\n id: string;\n}\n\nexport interface ApwContentReviewStep extends ApwWorkflowStep {\n status: ApwContentReviewStepStatus;\n pendingChangeRequests: number;\n}\n\nexport interface CreateApwWorkflowParams<TReviewer = string> {\n app: ApwWorkflowApplications;\n title: string;\n scope: ApwWorkflowScope;\n steps: ApwWorkflowStep<TReviewer>[];\n}\n\nexport interface UpdateApwWorkflowParams<TReviewer = string> {\n title?: string;\n scope?: ApwWorkflowScope;\n steps?: ApwWorkflowStep<TReviewer>[];\n}\n\nexport interface ListWorkflowsParams extends ListParams {\n where?: ListWhere & {\n app?: ApwWorkflowApplications;\n };\n}\n\ninterface CreateApwCommentParams {\n body: Record<string, any>;\n changeRequest: string;\n step: string;\n media: ApwFile;\n}\n\ninterface UpdateApwCommentParams {\n body: Record<string, any>;\n}\n\ninterface CreateApwChangeRequestParams {\n title: string;\n step: string;\n body: Record<string, any>;\n resolved: boolean;\n media: Record<string, any>;\n}\n\ninterface UpdateApwChangeRequestParams {\n title: string;\n body: Record<string, any>;\n resolved: boolean;\n media: Record<string, any>;\n}\n\nenum ApwScheduleActionTypes {\n PUBLISH = \"publish\",\n UNPUBLISH = \"unpublish\"\n}\n\nexport interface ApwScheduleActionData {\n action: ApwScheduleActionTypes;\n type: ApwContentTypes;\n datetime: string;\n entryId: string;\n /**\n * We will add modelId to the data for now.\n * TODO extract in separate package?\n */\n modelId?: string;\n}\n\nexport interface ApwContentReviewContent {\n id: string;\n type: ApwContentTypes;\n settings: {\n modelId?: string;\n };\n scheduledOn?: string | null;\n scheduledBy?: string | null;\n scheduledActionId?: string | null;\n publishedBy?: string | null;\n}\n\nexport interface CreateApwContentReviewParams {\n content: ApwContentReviewContent;\n reviewStatus: ApwContentReviewStatus;\n workflowId?: string;\n}\n\nexport interface UpdateApwContentReviewParams {\n title?: string;\n steps?: ApwContentReviewStep[];\n reviewStatus?: ApwContentReviewStatus;\n content?: ApwContentReviewContent;\n}\n\ninterface BaseApwCrud<TEntry, TCreateEntryParams, TUpdateEntryParams> {\n get(id: string): Promise<TEntry>;\n\n create(data: TCreateEntryParams): Promise<TEntry>;\n\n update(id: string, data: TUpdateEntryParams): Promise<TEntry>;\n\n delete(id: string): Promise<boolean>;\n}\n\nexport interface ApwWorkflowCrud\n extends BaseApwCrud<ApwWorkflow, CreateApwWorkflowParams, UpdateApwWorkflowParams> {\n list(params?: ListWorkflowsParams): Promise<[ApwWorkflow[], ListMeta]>;\n\n /**\n * Lifecycle events\n */\n onWorkflowBeforeCreate: Topic<OnWorkflowBeforeCreateTopicParams>;\n onWorkflowAfterCreate: Topic<OnWorkflowAfterCreateTopicParams>;\n onWorkflowBeforeUpdate: Topic<OnWorkflowBeforeUpdateTopicParams>;\n onWorkflowAfterUpdate: Topic<OnWorkflowAfterUpdateTopicParams>;\n onWorkflowBeforeDelete: Topic<OnWorkflowBeforeDeleteTopicParams>;\n onWorkflowAfterDelete: Topic<OnWorkflowAfterDeleteTopicParams>;\n}\n\nexport interface ApwReviewerListParams extends ListParams {\n where: ListParams[\"where\"] & {\n identityId?: string;\n };\n}\n\nexport interface ApwReviewerCrud\n extends BaseApwCrud<ApwReviewer, CreateApwReviewerData, UpdateApwReviewerData> {\n list(params: ApwReviewerListParams): Promise<[ApwReviewer[], ListMeta]>;\n\n /**\n * Lifecycle events\n */\n onReviewerBeforeCreate: Topic<OnReviewerBeforeCreateTopicParams>;\n onReviewerAfterCreate: Topic<OnReviewerAfterCreateTopicParams>;\n onReviewerBeforeUpdate: Topic<OnReviewerBeforeUpdateTopicParams>;\n onReviewerAfterUpdate: Topic<OnReviewerAfterUpdateTopicParams>;\n onReviewerBeforeDelete: Topic<OnReviewerBeforeDeleteTopicParams>;\n onReviewerAfterDelete: Topic<OnReviewerAfterDeleteTopicParams>;\n}\n\nexport interface ApwCommentListParams extends ListParams {\n where: ListParams[\"where\"] & {\n changeRequest?: {\n id?: string;\n };\n };\n}\n\nexport interface ApwCommentCrud\n extends BaseApwCrud<ApwComment, CreateApwCommentParams, UpdateApwCommentParams> {\n list(params: ApwCommentListParams): Promise<[ApwComment[], ListMeta]>;\n\n /**\n * Lifecycle events\n */\n onCommentBeforeCreate: Topic<OnCommentBeforeCreateTopicParams>;\n onCommentAfterCreate: Topic<OnCommentAfterCreateTopicParams>;\n onCommentBeforeUpdate: Topic<OnCommentBeforeUpdateTopicParams>;\n onCommentAfterUpdate: Topic<OnCommentAfterUpdateTopicParams>;\n onCommentBeforeDelete: Topic<OnCommentBeforeDeleteTopicParams>;\n onCommentAfterDelete: Topic<OnCommentAfterDeleteTopicParams>;\n}\n\nexport interface ApwChangeRequestListParams extends ListParams {\n where: ListParams[\"where\"] & {\n step?: string;\n };\n}\n\nexport interface ApwChangeRequestCrud\n extends BaseApwCrud<\n ApwChangeRequest,\n CreateApwChangeRequestParams,\n UpdateApwChangeRequestParams\n > {\n list(params: ApwChangeRequestListParams): Promise<[ApwChangeRequest[], ListMeta]>;\n\n /**\n * Lifecycle events\n */\n onChangeRequestBeforeCreate: Topic<OnChangeRequestBeforeCreateTopicParams>;\n onChangeRequestAfterCreate: Topic<OnChangeRequestAfterCreateTopicParams>;\n onChangeRequestBeforeUpdate: Topic<OnChangeRequestBeforeUpdateTopicParams>;\n onChangeRequestAfterUpdate: Topic<OnChangeRequestAfterUpdateTopicParams>;\n onChangeRequestBeforeDelete: Topic<OnChangeRequestBeforeDeleteTopicParams>;\n onChangeRequestAfterDelete: Topic<OnChangeRequestAfterDeleteTopicParams>;\n}\n\nexport interface ApwContentReviewCrud\n extends BaseApwCrud<\n ApwContentReview,\n CreateApwContentReviewParams,\n UpdateApwContentReviewParams\n > {\n list(params: ApwContentReviewListParams): Promise<[ApwContentReview[], ListMeta]>;\n\n provideSignOff(id: string, step: string): Promise<boolean>;\n\n retractSignOff(id: string, step: string): Promise<boolean>;\n\n isReviewRequired(data: ApwContentReviewContent): Promise<{\n isReviewRequired: boolean;\n contentReviewId?: string | null;\n }>;\n\n publishContent(id: string, datetime?: string): Promise<boolean>;\n\n unpublishContent(id: string, datetime?: string): Promise<boolean>;\n\n scheduleAction(data: ApwScheduleActionData): Promise<string>;\n\n deleteScheduledAction(id: string): Promise<boolean>;\n\n /**\n * Lifecycle events\n */\n onContentReviewBeforeCreate: Topic<OnContentReviewBeforeCreateTopicParams>;\n onContentReviewAfterCreate: Topic<OnContentReviewAfterCreateTopicParams>;\n onContentReviewBeforeUpdate: Topic<OnContentReviewBeforeUpdateTopicParams>;\n onContentReviewAfterUpdate: Topic<OnContentReviewAfterUpdateTopicParams>;\n onContentReviewBeforeDelete: Topic<OnContentReviewBeforeDeleteTopicParams>;\n onContentReviewAfterDelete: Topic<OnContentReviewAfterDeleteTopicParams>;\n onContentReviewBeforeList: Topic<OnContentReviewBeforeListTopicParams>;\n}\n\nexport type ContentGetter = (\n id: string,\n settings: { modelId?: string }\n) => Promise<ApwCmsEntry | null>;\n\nexport type ContentPublisher = (\n id: string,\n settings: { modelId?: string }\n) => Promise<boolean | null>;\n\nexport type ContentUnPublisher = (\n id: string,\n settings: { modelId?: string }\n) => Promise<boolean | null>;\n\nexport interface AdvancedPublishingWorkflow {\n addContentGetter: (type: ApwContentTypes, func: ContentGetter) => void;\n getContentGetter: (type: ApwContentTypes) => ContentGetter;\n addContentPublisher: (type: ApwContentTypes, func: ContentPublisher) => void;\n getContentPublisher: (type: ApwContentTypes) => ContentPublisher;\n addContentUnPublisher: (type: ApwContentTypes, func: ContentUnPublisher) => void;\n getContentUnPublisher: (type: ApwContentTypes) => ContentUnPublisher;\n workflow: ApwWorkflowCrud;\n reviewer: ApwReviewerCrud;\n comment: ApwCommentCrud;\n changeRequest: ApwChangeRequestCrud;\n contentReview: ApwContentReviewCrud;\n scheduleAction: ApwScheduleActionCrud;\n}\n\nexport interface ApwContext extends Context, MailerContext {\n apw: AdvancedPublishingWorkflow;\n wcp: WcpContextObject;\n scheduleAction: ScheduleActionContext[\"scheduleAction\"];\n}\n\nexport interface LifeCycleHookCallbackParams {\n apw: ApwContext[\"apw\"];\n security: ApwContext[\"security\"];\n cms?: ApwContext[\"cms\"];\n}\n\nexport interface CreateApwParams {\n getLocale: () => I18NLocale;\n getIdentity: () => SecurityIdentity;\n getTenant: () => Tenant;\n getPermission: (name: string) => Promise<SecurityPermission | null>;\n storageOperations: ApwStorageOperations;\n scheduler: ApwScheduleActionCrud;\n handlerClient: HandlerClient;\n plugins: PluginsContainer;\n}\n\ninterface StorageOperationsGetReviewerParams {\n id: string;\n}\n\ntype StorageOperationsListReviewersParams = ApwReviewerListParams;\n\ninterface CreateApwReviewerData {\n identityId: string;\n displayName: string | null;\n type: string;\n email?: string | null;\n}\n\ninterface UpdateApwReviewerData {\n identityId: string;\n displayName: string | null;\n type: string;\n email?: string | null;\n}\n\ninterface StorageOperationsCreateReviewerParams {\n data: CreateApwReviewerData;\n}\n\ninterface StorageOperationsUpdateReviewerParams {\n id: string;\n data: UpdateApwReviewerData;\n}\n\ninterface StorageOperationsDeleteReviewerParams {\n id: string;\n}\n\ninterface StorageOperationsGetParams {\n id: string;\n}\n\ninterface StorageOperationsDeleteParams {\n id: string;\n}\n\ntype StorageOperationsGetWorkflowParams = StorageOperationsGetParams;\n\ntype StorageOperationsListWorkflowsParams = ListParams;\n\ninterface StorageOperationsCreateWorkflowParams {\n data: CreateApwWorkflowParams;\n}\n\ninterface StorageOperationsUpdateWorkflowParams {\n id: string;\n data: UpdateApwWorkflowParams;\n}\n\ntype StorageOperationsDeleteWorkflowParams = StorageOperationsDeleteParams;\ntype StorageOperationsGetContentReviewParams = StorageOperationsGetParams;\n\nexport interface ApwContentReviewListParams extends ListParams {\n where: ListWhere & {\n reviewStatus?: ApwContentReviewListFilter;\n title?: string;\n title_contains?: string;\n workflowId?: string;\n workflowId_in?: string[];\n };\n}\n\ntype StorageOperationsListContentReviewsParams = ApwContentReviewListParams;\n\ninterface StorageOperationsCreateContentReviewParams {\n data: CreateApwContentReviewParams;\n}\n\ninterface StorageOperationsUpdateContentReviewParams {\n id: string;\n data: UpdateApwContentReviewParams;\n}\n\ntype StorageOperationsDeleteContentReviewParams = StorageOperationsDeleteParams;\n\ntype StorageOperationsGetChangeRequestParams = StorageOperationsGetParams;\ntype StorageOperationsListChangeRequestsParams = ApwChangeRequestListParams;\n\ninterface StorageOperationsCreateChangeRequestParams {\n data: CreateApwChangeRequestParams;\n}\n\ninterface StorageOperationsUpdateChangeRequestParams {\n id: string;\n data: UpdateApwChangeRequestParams;\n}\n\ntype StorageOperationsDeleteChangeRequestParams = StorageOperationsDeleteParams;\n\ntype StorageOperationsGetCommentParams = StorageOperationsGetParams;\n\ntype StorageOperationsDeleteCommentParams = StorageOperationsDeleteParams;\ntype StorageOperationsListCommentsParams = ApwCommentListParams;\n\ninterface StorageOperationsCreateCommentParams {\n data: CreateApwCommentParams;\n}\n\ninterface StorageOperationsUpdateCommentParams {\n id: string;\n data: UpdateApwCommentParams;\n}\n\nexport interface ApwReviewerStorageOperations {\n /*\n * Reviewer methods\n */\n getReviewer(params: StorageOperationsGetReviewerParams): Promise<ApwReviewer>;\n\n listReviewers(params: StorageOperationsListReviewersParams): Promise<[ApwReviewer[], ListMeta]>;\n\n createReviewer(params: StorageOperationsCreateReviewerParams): Promise<ApwReviewer>;\n\n updateReviewer(params: StorageOperationsUpdateReviewerParams): Promise<ApwReviewer>;\n\n deleteReviewer(params: StorageOperationsDeleteReviewerParams): Promise<boolean>;\n}\n\nexport interface ApwWorkflowStorageOperations {\n /*\n * Workflow methods\n */\n getWorkflow(params: StorageOperationsGetWorkflowParams): Promise<ApwWorkflow>;\n\n listWorkflows(params: StorageOperationsListWorkflowsParams): Promise<[ApwWorkflow[], ListMeta]>;\n\n createWorkflow(params: StorageOperationsCreateWorkflowParams): Promise<ApwWorkflow>;\n\n updateWorkflow(params: StorageOperationsUpdateWorkflowParams): Promise<ApwWorkflow>;\n\n deleteWorkflow(params: StorageOperationsDeleteWorkflowParams): Promise<boolean>;\n}\n\nexport interface ApwContentReviewStorageOperations {\n /*\n * ContentReview methods\n */\n getContentReview(params: StorageOperationsGetContentReviewParams): Promise<ApwContentReview>;\n\n listContentReviews(\n params: StorageOperationsListContentReviewsParams\n ): Promise<[ApwContentReview[], ListMeta]>;\n\n createContentReview(\n params: StorageOperationsCreateContentReviewParams\n ): Promise<ApwContentReview>;\n\n updateContentReview(\n params: StorageOperationsUpdateContentReviewParams\n ): Promise<ApwContentReview>;\n\n deleteContentReview(params: StorageOperationsDeleteContentReviewParams): Promise<boolean>;\n}\n\nexport interface ApwChangeRequestStorageOperations {\n /*\n * ChangeRequest methods\n */\n getChangeRequest(params: StorageOperationsGetChangeRequestParams): Promise<ApwChangeRequest>;\n\n listChangeRequests(\n params: StorageOperationsListChangeRequestsParams\n ): Promise<[ApwChangeRequest[], ListMeta]>;\n\n createChangeRequest(\n params: StorageOperationsCreateChangeRequestParams\n ): Promise<ApwChangeRequest>;\n\n updateChangeRequest(\n params: StorageOperationsUpdateChangeRequestParams\n ): Promise<ApwChangeRequest>;\n\n deleteChangeRequest(params: StorageOperationsDeleteChangeRequestParams): Promise<boolean>;\n}\n\nexport interface ApwCommentStorageOperations {\n /*\n * Comment methods\n */\n getComment(params: StorageOperationsGetCommentParams): Promise<ApwComment>;\n\n listComments(params: StorageOperationsListCommentsParams): Promise<[ApwComment[], ListMeta]>;\n\n createComment(params: StorageOperationsCreateCommentParams): Promise<ApwComment>;\n\n updateComment(params: StorageOperationsUpdateCommentParams): Promise<ApwComment>;\n\n deleteComment(params: StorageOperationsDeleteCommentParams): Promise<boolean>;\n}\n\nexport interface ApwStorageOperations\n extends ApwReviewerStorageOperations,\n ApwWorkflowStorageOperations,\n ApwContentReviewStorageOperations,\n ApwChangeRequestStorageOperations,\n ApwCommentStorageOperations {}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnCommentBeforeCreateTopicParams {\n input: CreateApwCommentParams;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnCommentAfterCreateTopicParams {\n comment: ApwComment;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnCommentBeforeUpdateTopicParams {\n original: ApwComment;\n input: Record<string, any>;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnCommentAfterUpdateTopicParams {\n original: ApwComment;\n comment: ApwComment;\n input: Record<string, any>;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnCommentBeforeDeleteTopicParams {\n comment: ApwComment;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnCommentAfterDeleteTopicParams {\n comment: ApwComment;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnChangeRequestBeforeCreateTopicParams {\n input: CreateApwChangeRequestParams;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnChangeRequestAfterCreateTopicParams {\n changeRequest: ApwChangeRequest;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnChangeRequestBeforeUpdateTopicParams {\n original: ApwChangeRequest;\n input: Record<string, any>;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnChangeRequestAfterUpdateTopicParams {\n original: ApwChangeRequest;\n changeRequest: ApwChangeRequest;\n input: Record<string, any>;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnChangeRequestBeforeDeleteTopicParams {\n changeRequest: ApwChangeRequest;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnChangeRequestAfterDeleteTopicParams {\n changeRequest: ApwChangeRequest;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnContentReviewBeforeCreateTopicParams {\n input: CreateApwContentReviewParams;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnContentReviewAfterCreateTopicParams {\n contentReview: ApwContentReview;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnContentReviewBeforeUpdateTopicParams {\n original: ApwContentReview;\n input: Record<string, any>;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnContentReviewAfterUpdateTopicParams {\n original: ApwContentReview;\n contentReview: ApwContentReview;\n input: Record<string, any>;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnContentReviewBeforeDeleteTopicParams {\n contentReview: ApwContentReview;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnContentReviewAfterDeleteTopicParams {\n contentReview: ApwContentReview;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnContentReviewBeforeListTopicParams {\n where: ApwContentReviewListParams[\"where\"];\n}\n\nexport interface CreateApwReviewerParams {\n type: string;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnReviewerBeforeCreateTopicParams {\n input: CreateApwReviewerParams;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnReviewerAfterCreateTopicParams {\n reviewer: ApwReviewer;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnReviewerBeforeUpdateTopicParams {\n original: ApwReviewer;\n input: Record<string, any>;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnReviewerAfterUpdateTopicParams {\n original: ApwReviewer;\n reviewer: ApwReviewer;\n input: Record<string, any>;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnReviewerBeforeDeleteTopicParams {\n reviewer: ApwReviewer;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnReviewerAfterDeleteTopicParams {\n reviewer: ApwReviewer;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnWorkflowBeforeCreateTopicParams {\n input: CreateApwWorkflowParams;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnWorkflowAfterCreateTopicParams {\n workflow: ApwWorkflow;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnWorkflowBeforeUpdateTopicParams {\n original: ApwWorkflow;\n input: Record<string, any>;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnWorkflowAfterUpdateTopicParams {\n original: ApwWorkflow;\n workflow: ApwWorkflow;\n input: Record<string, any>;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnWorkflowBeforeDeleteTopicParams {\n workflow: ApwWorkflow;\n}\n\n/**\n * @category Lifecycle events\n */\nexport interface OnWorkflowAfterDeleteTopicParams {\n workflow: ApwWorkflow;\n}\n\n/**\n * Headless CMS\n */\nexport interface OnCmsEntryBeforePublishTopicParams\n extends Omit<OnEntryBeforePublishTopicParams, \"entry\"> {\n entry: ApwCmsEntry;\n}\n\nexport interface OnCmsEntryAfterPublishTopicParams\n extends Omit<OnEntryAfterPublishTopicParams, \"entry\"> {\n entry: ApwCmsEntry;\n}\n\nexport interface OnCmsEntryAfterUnpublishTopicParams\n extends Omit<OnEntryAfterUnpublishTopicParams, \"entry\"> {\n entry: ApwCmsEntry;\n}\n"],"mappings":";;;;;;IA2EYA,eAAe,GAAAC,OAAA,CAAAD,eAAA,0BAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAA,OAAfA,eAAe;AAAA;AAAA,IAKfE,kBAAkB,GAAAD,OAAA,CAAAC,kBAAA,0BAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAA,OAAlBA,kBAAkB;AAAA;AAAA,IAKlBC,0BAA0B,GAAAF,OAAA,CAAAE,0BAAA,0BAA1BA,0BAA0B;EAA1BA,0BAA0B;EAA1BA,0BAA0B;EAA1BA,0BAA0B;EAAA,OAA1BA,0BAA0B;AAAA;AAAA,IAM1BC,uBAAuB,GAAAH,OAAA,CAAAG,uBAAA,0BAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAA,OAAvBA,uBAAuB;AAAA;AAKnC;AACA;AACA;AACA;AACA;AAJA,IAqGYC,oBAAoB,GAAAJ,OAAA,CAAAI,oBAAA,0BAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAAA,OAApBA,oBAAoB;AAAA;AAAA,IAMpBC,sBAAsB,GAAAL,OAAA,CAAAK,sBAAA,0BAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAA,OAAtBA,sBAAsB;AAAA;AAAA,IAiE7BC,sBAAsB,0BAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAA,OAAtBA,sBAAsB;AAAA,EAAtBA,sBAAsB;AA4a3B;AACA;AACA;AAKA;AACA;AACA;AAKA;AACA;AACA;AAMA;AACA;AACA;AAOA;AACA;AACA;AAKA;AACA;AACA;AAKA;AACA;AACA;AAKA;AACA;AACA;AAKA;AACA;AACA;AAMA;AACA;AACA;AAOA;AACA;AACA;AAKA;AACA;AACA;AAKA;AACA;AACA;AAKA;AACA;AACA;AAKA;AACA;AACA;AAMA;AACA;AACA;AAOA;AACA;AACA;AAKA;AACA;AACA;AAKA;AACA;AACA;AASA;AACA;AACA;AAKA;AACA;AACA;AAKA;AACA;AACA;AAMA;AACA;AACA;AAOA;AACA;AACA;AAKA;AACA;AACA;AAKA;AACA;AACA;AAKA;AACA;AACA;AAKA;AACA;AACA;AAMA;AACA;AACA;AAOA;AACA;AACA;AAKA;AACA;AACA;AAKA;AACA;AACA","ignoreList":[]}
@@ -1,5 +1,5 @@
1
- import { ApwContentTypes } from "../types";
2
- import { PluginsContainer } from "@webiny/plugins";
1
+ import type { ApwContentTypes } from "../types";
2
+ import type { PluginsContainer } from "@webiny/plugins";
3
3
  import { ContentApwSettingsPlugin } from "../ContentApwSettingsPlugin";
4
4
  interface GetContentApwSettingsPluginParams {
5
5
  type: ApwContentTypes;
@@ -17,4 +17,6 @@ const getContentApwSettingsPlugin = params => {
17
17
  }
18
18
  throw new _handlerGraphql.NotFoundError(`Could not find a "ContentApwSettingsPlugin" for "${type}".`);
19
19
  };
20
- exports.getContentApwSettingsPlugin = getContentApwSettingsPlugin;
20
+ exports.getContentApwSettingsPlugin = getContentApwSettingsPlugin;
21
+
22
+ //# sourceMappingURL=contentApwSettingsPlugin.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["getContentApwSettingsPlugin","params","type","plugins","plugin","byType","ContentApwSettingsPlugin","find","p","canUse","NotFoundError"],"sources":["contentApwSettingsPlugin.ts"],"sourcesContent":["import { ApwContentTypes } from \"~/types\";\nimport { PluginsContainer } from \"@webiny/plugins\";\nimport { ContentApwSettingsPlugin } from \"~/ContentApwSettingsPlugin\";\nimport { NotFoundError } from \"@webiny/handler-graphql\";\n\ninterface GetContentApwSettingsPluginParams {\n type: ApwContentTypes;\n plugins: PluginsContainer;\n}\nexport const getContentApwSettingsPlugin = <\n T extends ContentApwSettingsPlugin = ContentApwSettingsPlugin\n>(\n params: GetContentApwSettingsPluginParams\n): T => {\n const { type, plugins } = params;\n const plugin = plugins.byType<T>(ContentApwSettingsPlugin.type).find(p => p.canUse(type));\n if (plugin) {\n return plugin;\n }\n throw new NotFoundError(`Could not find a \"ContentApwSettingsPlugin\" for \"${type}\".`);\n};\n"],"mappings":";;;;;;AAEA;AACA;AAMO,MAAMA,2BAA2B,GAGpCC,MAAyC,IACrC;EACJ,MAAM;IAAEC,IAAI;IAAEC;EAAQ,CAAC,GAAGF,MAAM;EAChC,MAAMG,MAAM,GAAGD,OAAO,CAACE,MAAM,CAAIC,kDAAwB,CAACJ,IAAI,CAAC,CAACK,IAAI,CAACC,CAAC,IAAIA,CAAC,CAACC,MAAM,CAACP,IAAI,CAAC,CAAC;EACzF,IAAIE,MAAM,EAAE;IACR,OAAOA,MAAM;EACjB;EACA,MAAM,IAAIM,6BAAa,CAAE,oDAAmDR,IAAK,IAAG,CAAC;AACzF,CAAC;AAAC"}
1
+ {"version":3,"names":["_ContentApwSettingsPlugin","require","_handlerGraphql","getContentApwSettingsPlugin","params","type","plugins","plugin","byType","ContentApwSettingsPlugin","find","p","canUse","NotFoundError","exports"],"sources":["contentApwSettingsPlugin.ts"],"sourcesContent":["import type { ApwContentTypes } from \"~/types\";\nimport type { PluginsContainer } from \"@webiny/plugins\";\nimport { ContentApwSettingsPlugin } from \"~/ContentApwSettingsPlugin\";\nimport { NotFoundError } from \"@webiny/handler-graphql\";\n\ninterface GetContentApwSettingsPluginParams {\n type: ApwContentTypes;\n plugins: PluginsContainer;\n}\nexport const getContentApwSettingsPlugin = <\n T extends ContentApwSettingsPlugin = ContentApwSettingsPlugin\n>(\n params: GetContentApwSettingsPluginParams\n): T => {\n const { type, plugins } = params;\n const plugin = plugins.byType<T>(ContentApwSettingsPlugin.type).find(p => p.canUse(type));\n if (plugin) {\n return plugin;\n }\n throw new NotFoundError(`Could not find a \"ContentApwSettingsPlugin\" for \"${type}\".`);\n};\n"],"mappings":";;;;;;AAEA,IAAAA,yBAAA,GAAAC,OAAA;AACA,IAAAC,eAAA,GAAAD,OAAA;AAMO,MAAME,2BAA2B,GAGpCC,MAAyC,IACrC;EACJ,MAAM;IAAEC,IAAI;IAAEC;EAAQ,CAAC,GAAGF,MAAM;EAChC,MAAMG,MAAM,GAAGD,OAAO,CAACE,MAAM,CAAIC,kDAAwB,CAACJ,IAAI,CAAC,CAACK,IAAI,CAACC,CAAC,IAAIA,CAAC,CAACC,MAAM,CAACP,IAAI,CAAC,CAAC;EACzF,IAAIE,MAAM,EAAE;IACR,OAAOA,MAAM;EACjB;EACA,MAAM,IAAIM,6BAAa,CAAC,oDAAoDR,IAAI,IAAI,CAAC;AACzF,CAAC;AAACS,OAAA,CAAAX,2BAAA,GAAAA,2BAAA","ignoreList":[]}
package/utils/errors.js CHANGED
@@ -55,4 +55,6 @@ class NoSignOffProvidedError extends _error.default {
55
55
  });
56
56
  }
57
57
  }
58
- exports.NoSignOffProvidedError = NoSignOffProvidedError;
58
+ exports.NoSignOffProvidedError = NoSignOffProvidedError;
59
+
60
+ //# sourceMappingURL=errors.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["NotAuthorizedError","Error","constructor","data","code","message","StepMissingError","PendingChangeRequestsError","StepInActiveError","NoSignOffProvidedError"],"sources":["errors.ts"],"sourcesContent":["import Error from \"@webiny/error\";\n\nexport class NotAuthorizedError extends Error {\n constructor(data: Record<string, any>) {\n super({\n code: \"NOT_AUTHORISED\",\n message: `Not a reviewer, couldn't provide sign-off.`,\n data: data || null\n });\n }\n}\n\nexport class StepMissingError extends Error {\n constructor(data: Record<string, any>) {\n super({\n code: \"MISSING_STEP\",\n message: `Please complete previous steps first.`,\n data: data || null\n });\n }\n}\n\nexport class PendingChangeRequestsError extends Error {\n constructor(data: Record<string, any>) {\n super({\n code: \"PENDING_CHANGE_REQUESTS\",\n message: `Change requests are pending couldn't provide sign-off.`,\n data: data || null\n });\n }\n}\n\nexport class StepInActiveError extends Error {\n constructor(data: Record<string, any>) {\n super({\n code: \"STEP_NOT_ACTIVE\",\n message: `Step needs to be in active state before providing sign-off.`,\n data: data || null\n });\n }\n}\n\nexport class NoSignOffProvidedError extends Error {\n constructor(data: Record<string, any>) {\n super({\n code: \"NO_SIGN_OFF_PROVIDED\",\n message: `Sign-off must be provided in order for it to be retracted.`,\n data: data || null\n });\n }\n}\n"],"mappings":";;;;;;;AAAA;AAEO,MAAMA,kBAAkB,SAASC,cAAK,CAAC;EAC1CC,WAAW,CAACC,IAAyB,EAAE;IACnC,KAAK,CAAC;MACFC,IAAI,EAAE,gBAAgB;MACtBC,OAAO,EAAG,4CAA2C;MACrDF,IAAI,EAAEA,IAAI,IAAI;IAClB,CAAC,CAAC;EACN;AACJ;AAAC;AAEM,MAAMG,gBAAgB,SAASL,cAAK,CAAC;EACxCC,WAAW,CAACC,IAAyB,EAAE;IACnC,KAAK,CAAC;MACFC,IAAI,EAAE,cAAc;MACpBC,OAAO,EAAG,uCAAsC;MAChDF,IAAI,EAAEA,IAAI,IAAI;IAClB,CAAC,CAAC;EACN;AACJ;AAAC;AAEM,MAAMI,0BAA0B,SAASN,cAAK,CAAC;EAClDC,WAAW,CAACC,IAAyB,EAAE;IACnC,KAAK,CAAC;MACFC,IAAI,EAAE,yBAAyB;MAC/BC,OAAO,EAAG,wDAAuD;MACjEF,IAAI,EAAEA,IAAI,IAAI;IAClB,CAAC,CAAC;EACN;AACJ;AAAC;AAEM,MAAMK,iBAAiB,SAASP,cAAK,CAAC;EACzCC,WAAW,CAACC,IAAyB,EAAE;IACnC,KAAK,CAAC;MACFC,IAAI,EAAE,iBAAiB;MACvBC,OAAO,EAAG,6DAA4D;MACtEF,IAAI,EAAEA,IAAI,IAAI;IAClB,CAAC,CAAC;EACN;AACJ;AAAC;AAEM,MAAMM,sBAAsB,SAASR,cAAK,CAAC;EAC9CC,WAAW,CAACC,IAAyB,EAAE;IACnC,KAAK,CAAC;MACFC,IAAI,EAAE,sBAAsB;MAC5BC,OAAO,EAAG,4DAA2D;MACrEF,IAAI,EAAEA,IAAI,IAAI;IAClB,CAAC,CAAC;EACN;AACJ;AAAC"}
1
+ {"version":3,"names":["_error","_interopRequireDefault","require","NotAuthorizedError","Error","constructor","data","code","message","exports","StepMissingError","PendingChangeRequestsError","StepInActiveError","NoSignOffProvidedError"],"sources":["errors.ts"],"sourcesContent":["import Error from \"@webiny/error\";\n\nexport class NotAuthorizedError extends Error {\n constructor(data: Record<string, any>) {\n super({\n code: \"NOT_AUTHORISED\",\n message: `Not a reviewer, couldn't provide sign-off.`,\n data: data || null\n });\n }\n}\n\nexport class StepMissingError extends Error {\n constructor(data: Record<string, any>) {\n super({\n code: \"MISSING_STEP\",\n message: `Please complete previous steps first.`,\n data: data || null\n });\n }\n}\n\nexport class PendingChangeRequestsError extends Error {\n constructor(data: Record<string, any>) {\n super({\n code: \"PENDING_CHANGE_REQUESTS\",\n message: `Change requests are pending couldn't provide sign-off.`,\n data: data || null\n });\n }\n}\n\nexport class StepInActiveError extends Error {\n constructor(data: Record<string, any>) {\n super({\n code: \"STEP_NOT_ACTIVE\",\n message: `Step needs to be in active state before providing sign-off.`,\n data: data || null\n });\n }\n}\n\nexport class NoSignOffProvidedError extends Error {\n constructor(data: Record<string, any>) {\n super({\n code: \"NO_SIGN_OFF_PROVIDED\",\n message: `Sign-off must be provided in order for it to be retracted.`,\n data: data || null\n });\n }\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEO,MAAMC,kBAAkB,SAASC,cAAK,CAAC;EAC1CC,WAAWA,CAACC,IAAyB,EAAE;IACnC,KAAK,CAAC;MACFC,IAAI,EAAE,gBAAgB;MACtBC,OAAO,EAAE,4CAA4C;MACrDF,IAAI,EAAEA,IAAI,IAAI;IAClB,CAAC,CAAC;EACN;AACJ;AAACG,OAAA,CAAAN,kBAAA,GAAAA,kBAAA;AAEM,MAAMO,gBAAgB,SAASN,cAAK,CAAC;EACxCC,WAAWA,CAACC,IAAyB,EAAE;IACnC,KAAK,CAAC;MACFC,IAAI,EAAE,cAAc;MACpBC,OAAO,EAAE,uCAAuC;MAChDF,IAAI,EAAEA,IAAI,IAAI;IAClB,CAAC,CAAC;EACN;AACJ;AAACG,OAAA,CAAAC,gBAAA,GAAAA,gBAAA;AAEM,MAAMC,0BAA0B,SAASP,cAAK,CAAC;EAClDC,WAAWA,CAACC,IAAyB,EAAE;IACnC,KAAK,CAAC;MACFC,IAAI,EAAE,yBAAyB;MAC/BC,OAAO,EAAE,wDAAwD;MACjEF,IAAI,EAAEA,IAAI,IAAI;IAClB,CAAC,CAAC;EACN;AACJ;AAACG,OAAA,CAAAE,0BAAA,GAAAA,0BAAA;AAEM,MAAMC,iBAAiB,SAASR,cAAK,CAAC;EACzCC,WAAWA,CAACC,IAAyB,EAAE;IACnC,KAAK,CAAC;MACFC,IAAI,EAAE,iBAAiB;MACvBC,OAAO,EAAE,6DAA6D;MACtEF,IAAI,EAAEA,IAAI,IAAI;IAClB,CAAC,CAAC;EACN;AACJ;AAACG,OAAA,CAAAG,iBAAA,GAAAA,iBAAA;AAEM,MAAMC,sBAAsB,SAAST,cAAK,CAAC;EAC9CC,WAAWA,CAACC,IAAyB,EAAE;IACnC,KAAK,CAAC;MACFC,IAAI,EAAE,sBAAsB;MAC5BC,OAAO,EAAE,4DAA4D;MACrEF,IAAI,EAAEA,IAAI,IAAI;IAClB,CAAC,CAAC;EACN;AACJ;AAACG,OAAA,CAAAI,sBAAA,GAAAA,sBAAA","ignoreList":[]}