@webiny/api-apw 0.0.0-unstable.1e66d121db → 0.0.0-unstable.2696f9d9e8

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 (267) hide show
  1. package/ApwChangeRequestNotification.d.ts +27 -0
  2. package/ApwChangeRequestNotification.js +28 -0
  3. package/ApwChangeRequestNotification.js.map +1 -0
  4. package/ApwCommentNotification.d.ts +27 -0
  5. package/ApwCommentNotification.js +28 -0
  6. package/ApwCommentNotification.js.map +1 -0
  7. package/ApwContentReviewNotification.d.ts +26 -0
  8. package/ApwContentReviewNotification.js +28 -0
  9. package/ApwContentReviewNotification.js.map +1 -0
  10. package/ApwContentUrlPlugin.d.ts +19 -0
  11. package/ApwContentUrlPlugin.js +28 -0
  12. package/ApwContentUrlPlugin.js.map +1 -0
  13. package/ContentApwSettingsPlugin.js +5 -9
  14. package/ContentApwSettingsPlugin.js.map +1 -1
  15. package/README.md +3 -3
  16. package/crud/createChangeRequestMethods.js +7 -12
  17. package/crud/createChangeRequestMethods.js.map +1 -1
  18. package/crud/createCommentMethods.js +7 -13
  19. package/crud/createCommentMethods.js.map +1 -1
  20. package/crud/createContentReviewMethods.js +83 -111
  21. package/crud/createContentReviewMethods.js.map +1 -1
  22. package/crud/createReviewerMethods.js +7 -13
  23. package/crud/createReviewerMethods.js.map +1 -1
  24. package/crud/createWorkflowMethods.js +7 -18
  25. package/crud/createWorkflowMethods.js.map +1 -1
  26. package/crud/index.js +5 -29
  27. package/crud/index.js.map +1 -1
  28. package/crud/utils.js +6 -33
  29. package/crud/utils.js.map +1 -1
  30. package/index.d.ts +2 -3
  31. package/index.js +6 -16
  32. package/index.js.map +1 -1
  33. package/package.json +40 -47
  34. package/plugins/cms/CmsEntryApwSettingsGetterPlugin.js +4 -19
  35. package/plugins/cms/CmsEntryApwSettingsGetterPlugin.js.map +1 -1
  36. package/plugins/cms/apwEntryPlugins.js +8 -13
  37. package/plugins/cms/apwEntryPlugins.js.map +1 -1
  38. package/plugins/cms/index.js +7 -10
  39. package/plugins/cms/index.js.map +1 -1
  40. package/plugins/cms/linkContentReviewToEntry.js +4 -20
  41. package/plugins/cms/linkContentReviewToEntry.js.map +1 -1
  42. package/plugins/cms/linkWorkflowToEntry.js +17 -45
  43. package/plugins/cms/linkWorkflowToEntry.js.map +1 -1
  44. package/plugins/cms/notifications/changeRequestNotification.d.ts +1 -0
  45. package/plugins/cms/notifications/changeRequestNotification.js +33 -0
  46. package/plugins/cms/notifications/changeRequestNotification.js.map +1 -0
  47. package/plugins/cms/notifications/commentNotification.d.ts +1 -0
  48. package/plugins/cms/notifications/commentNotification.js +33 -0
  49. package/plugins/cms/notifications/commentNotification.js.map +1 -0
  50. package/plugins/cms/notifications/contentReviewNotification.d.ts +1 -0
  51. package/plugins/cms/notifications/contentReviewNotification.js +33 -0
  52. package/plugins/cms/notifications/contentReviewNotification.js.map +1 -0
  53. package/plugins/cms/notifications/contentUrl.d.ts +8 -0
  54. package/plugins/cms/notifications/contentUrl.js +55 -0
  55. package/plugins/cms/notifications/contentUrl.js.map +1 -0
  56. package/plugins/cms/triggerContentReview.js +5 -18
  57. package/plugins/cms/triggerContentReview.js.map +1 -1
  58. package/plugins/cms/updateContentReviewStatus.js +14 -30
  59. package/plugins/cms/updateContentReviewStatus.js.map +1 -1
  60. package/plugins/cms/utils.d.ts +3 -2
  61. package/plugins/cms/utils.js +23 -60
  62. package/plugins/cms/utils.js.map +1 -1
  63. package/plugins/context.d.ts +0 -1
  64. package/plugins/context.js +2 -45
  65. package/plugins/context.js.map +1 -1
  66. package/plugins/graphql/changeRequest.gql.js +16 -19
  67. package/plugins/graphql/changeRequest.gql.js.map +1 -1
  68. package/plugins/graphql/comment.gql.js +41 -42
  69. package/plugins/graphql/comment.gql.js.map +1 -1
  70. package/plugins/graphql/contentReview.gql.js +25 -34
  71. package/plugins/graphql/contentReview.gql.js.map +1 -1
  72. package/plugins/graphql/reviewer.gql.js +17 -19
  73. package/plugins/graphql/reviewer.gql.js.map +1 -1
  74. package/plugins/graphql/utils.d.ts +2 -0
  75. package/plugins/graphql/utils.js +12 -0
  76. package/plugins/graphql/utils.js.map +1 -0
  77. package/plugins/graphql/workflow.gql.js +15 -19
  78. package/plugins/graphql/workflow.gql.js.map +1 -1
  79. package/plugins/graphql.js +5 -18
  80. package/plugins/graphql.js.map +1 -1
  81. package/plugins/hooks/createReviewerFromIdentity.js +28 -15
  82. package/plugins/hooks/createReviewerFromIdentity.js.map +1 -1
  83. package/plugins/hooks/deleteChangeRequestsAfterContentReview.js +3 -9
  84. package/plugins/hooks/deleteChangeRequestsAfterContentReview.js.map +1 -1
  85. package/plugins/hooks/deleteCommentsAfterChangeRequest.js +3 -8
  86. package/plugins/hooks/deleteCommentsAfterChangeRequest.js.map +1 -1
  87. package/plugins/hooks/index.js +4 -13
  88. package/plugins/hooks/index.js.map +1 -1
  89. package/plugins/hooks/initializeContentReviewSteps.js +15 -20
  90. package/plugins/hooks/initializeContentReviewSteps.js.map +1 -1
  91. package/plugins/hooks/initializeNotifications.d.ts +2 -0
  92. package/plugins/hooks/initializeNotifications.js +17 -0
  93. package/plugins/hooks/initializeNotifications.js.map +1 -0
  94. package/plugins/hooks/listContentReviews.d.ts +1 -1
  95. package/plugins/hooks/listContentReviews.js +11 -33
  96. package/plugins/hooks/listContentReviews.js.map +1 -1
  97. package/plugins/hooks/notifications/appUrl.d.ts +2 -0
  98. package/plugins/hooks/notifications/appUrl.js +20 -0
  99. package/plugins/hooks/notifications/appUrl.js.map +1 -0
  100. package/plugins/hooks/notifications/changeRequestAfterCreate.d.ts +2 -0
  101. package/plugins/hooks/notifications/changeRequestAfterCreate.js +113 -0
  102. package/plugins/hooks/notifications/changeRequestAfterCreate.js.map +1 -0
  103. package/plugins/hooks/notifications/changeRequestUrl.d.ts +8 -0
  104. package/plugins/hooks/notifications/changeRequestUrl.js +29 -0
  105. package/plugins/hooks/notifications/changeRequestUrl.js.map +1 -0
  106. package/plugins/hooks/notifications/commentAfterCreate.d.ts +2 -0
  107. package/plugins/hooks/notifications/commentAfterCreate.js +124 -0
  108. package/plugins/hooks/notifications/commentAfterCreate.js.map +1 -0
  109. package/plugins/hooks/notifications/commentUrl.d.ts +8 -0
  110. package/plugins/hooks/notifications/commentUrl.js +29 -0
  111. package/plugins/hooks/notifications/commentUrl.js.map +1 -0
  112. package/plugins/hooks/notifications/contentReviewAfterCreate.d.ts +2 -0
  113. package/plugins/hooks/notifications/contentReviewAfterCreate.js +96 -0
  114. package/plugins/hooks/notifications/contentReviewAfterCreate.js.map +1 -0
  115. package/plugins/hooks/notifications/contentReviewUrl.d.ts +7 -0
  116. package/plugins/hooks/notifications/contentReviewUrl.js +28 -0
  117. package/plugins/hooks/notifications/contentReviewUrl.js.map +1 -0
  118. package/plugins/hooks/notifications/contentUrl.d.ts +7 -0
  119. package/plugins/hooks/notifications/contentUrl.js +26 -0
  120. package/plugins/hooks/notifications/contentUrl.js.map +1 -0
  121. package/plugins/hooks/notifications/lastChangeRequestNotificationPlugin.d.ts +11 -0
  122. package/plugins/hooks/notifications/lastChangeRequestNotificationPlugin.js +23 -0
  123. package/plugins/hooks/notifications/lastChangeRequestNotificationPlugin.js.map +1 -0
  124. package/plugins/hooks/notifications/lastCommentNotificationPlugin.d.ts +11 -0
  125. package/plugins/hooks/notifications/lastCommentNotificationPlugin.js +23 -0
  126. package/plugins/hooks/notifications/lastCommentNotificationPlugin.js.map +1 -0
  127. package/plugins/hooks/notifications/lastContentReviewNotificationPlugin.d.ts +11 -0
  128. package/plugins/hooks/notifications/lastContentReviewNotificationPlugin.js +23 -0
  129. package/plugins/hooks/notifications/lastContentReviewNotificationPlugin.js.map +1 -0
  130. package/plugins/hooks/notifications/reviewers.d.ts +15 -0
  131. package/plugins/hooks/notifications/reviewers.js +47 -0
  132. package/plugins/hooks/notifications/reviewers.js.map +1 -0
  133. package/plugins/hooks/notifications/sendChangeRequestNotification.d.ts +2 -0
  134. package/plugins/hooks/notifications/sendChangeRequestNotification.js +43 -0
  135. package/plugins/hooks/notifications/sendChangeRequestNotification.js.map +1 -0
  136. package/plugins/hooks/notifications/sendCommentNotification.d.ts +2 -0
  137. package/plugins/hooks/notifications/sendCommentNotification.js +43 -0
  138. package/plugins/hooks/notifications/sendCommentNotification.js.map +1 -0
  139. package/plugins/hooks/notifications/sendContentReviewNotification.d.ts +2 -0
  140. package/plugins/hooks/notifications/sendContentReviewNotification.js +43 -0
  141. package/plugins/hooks/notifications/sendContentReviewNotification.js.map +1 -0
  142. package/plugins/hooks/updatePendingChangeRequests.js +7 -13
  143. package/plugins/hooks/updatePendingChangeRequests.js.map +1 -1
  144. package/plugins/hooks/updateTotalComments.js +21 -23
  145. package/plugins/hooks/updateTotalComments.js.map +1 -1
  146. package/plugins/hooks/validateChangeRequest.js +27 -16
  147. package/plugins/hooks/validateChangeRequest.js.map +1 -1
  148. package/plugins/hooks/validateComment.js +13 -12
  149. package/plugins/hooks/validateComment.js.map +1 -1
  150. package/plugins/hooks/validateContentReview.js +2 -6
  151. package/plugins/hooks/validateContentReview.js.map +1 -1
  152. package/plugins/pageBuilder/PageApwSettingsGetterPlugin.js +4 -19
  153. package/plugins/pageBuilder/PageApwSettingsGetterPlugin.js.map +1 -1
  154. package/plugins/pageBuilder/apwContentPagePlugins.js +2 -4
  155. package/plugins/pageBuilder/apwContentPagePlugins.js.map +1 -1
  156. package/plugins/pageBuilder/extendPbPageSettingsSchema.js +3 -6
  157. package/plugins/pageBuilder/extendPbPageSettingsSchema.js.map +1 -1
  158. package/plugins/pageBuilder/index.js +7 -8
  159. package/plugins/pageBuilder/index.js.map +1 -1
  160. package/plugins/pageBuilder/linkContentReviewToPage.js +15 -27
  161. package/plugins/pageBuilder/linkContentReviewToPage.js.map +1 -1
  162. package/plugins/pageBuilder/linkWorkflowToPage.js +3 -31
  163. package/plugins/pageBuilder/linkWorkflowToPage.js.map +1 -1
  164. package/plugins/pageBuilder/notifications/changeRequestNotification.d.ts +1 -0
  165. package/plugins/pageBuilder/notifications/changeRequestNotification.js +33 -0
  166. package/plugins/pageBuilder/notifications/changeRequestNotification.js.map +1 -0
  167. package/plugins/pageBuilder/notifications/commentNotification.d.ts +1 -0
  168. package/plugins/pageBuilder/notifications/commentNotification.js +33 -0
  169. package/plugins/pageBuilder/notifications/commentNotification.js.map +1 -0
  170. package/plugins/pageBuilder/notifications/contentReviewNotification.d.ts +1 -0
  171. package/plugins/pageBuilder/notifications/contentReviewNotification.js +33 -0
  172. package/plugins/pageBuilder/notifications/contentReviewNotification.js.map +1 -0
  173. package/plugins/pageBuilder/notifications/contentUrl.d.ts +1 -0
  174. package/plugins/pageBuilder/notifications/contentUrl.js +49 -0
  175. package/plugins/pageBuilder/notifications/contentUrl.js.map +1 -0
  176. package/plugins/pageBuilder/triggerContentReview.js +2 -11
  177. package/plugins/pageBuilder/triggerContentReview.js.map +1 -1
  178. package/plugins/pageBuilder/updateContentReviewStatus.js +10 -17
  179. package/plugins/pageBuilder/updateContentReviewStatus.js.map +1 -1
  180. package/plugins/pageBuilder/utils.d.ts +2 -2
  181. package/plugins/pageBuilder/utils.js +3 -35
  182. package/plugins/pageBuilder/utils.js.map +1 -1
  183. package/plugins/utils.d.ts +1 -2
  184. package/plugins/utils.js +6 -52
  185. package/plugins/utils.js.map +1 -1
  186. package/scheduler/createScheduleActionMethods.js +45 -50
  187. package/scheduler/createScheduleActionMethods.js.map +1 -1
  188. package/scheduler/handlers/executeAction/index.d.ts +1 -1
  189. package/scheduler/handlers/executeAction/index.js +47 -40
  190. package/scheduler/handlers/executeAction/index.js.map +1 -1
  191. package/scheduler/handlers/executeAction/plugins/ApplicationGraphQL.d.ts +6 -0
  192. package/scheduler/handlers/executeAction/plugins/ApplicationGraphQL.js +19 -9
  193. package/scheduler/handlers/executeAction/plugins/ApplicationGraphQL.js.map +1 -1
  194. package/scheduler/handlers/executeAction/plugins/HeadlessCMSGraphQL.d.ts +2 -3
  195. package/scheduler/handlers/executeAction/plugins/HeadlessCMSGraphQL.js +11 -28
  196. package/scheduler/handlers/executeAction/plugins/HeadlessCMSGraphQL.js.map +1 -1
  197. package/scheduler/handlers/executeAction/plugins/PageBuilderGraphQL.d.ts +2 -2
  198. package/scheduler/handlers/executeAction/plugins/PageBuilderGraphQL.js +10 -92
  199. package/scheduler/handlers/executeAction/plugins/PageBuilderGraphQL.js.map +1 -1
  200. package/scheduler/handlers/executeAction/security.js +2 -11
  201. package/scheduler/handlers/executeAction/security.js.map +1 -1
  202. package/scheduler/handlers/scheduleAction/index.d.ts +1 -1
  203. package/scheduler/handlers/scheduleAction/index.js +24 -37
  204. package/scheduler/handlers/scheduleAction/index.js.map +1 -1
  205. package/scheduler/handlers/scheduleAction/scheduleAction.utils.js +20 -36
  206. package/scheduler/handlers/scheduleAction/scheduleAction.utils.js.map +1 -1
  207. package/scheduler/handlers/utils.d.ts +2 -4
  208. package/scheduler/handlers/utils.js +8 -47
  209. package/scheduler/handlers/utils.js.map +1 -1
  210. package/scheduler/index.js +2 -3
  211. package/scheduler/index.js.map +1 -1
  212. package/scheduler/types.d.ts +12 -28
  213. package/scheduler/types.js +13 -22
  214. package/scheduler/types.js.map +1 -1
  215. package/storageOperations/changeRequestStorageOperations.js +59 -45
  216. package/storageOperations/changeRequestStorageOperations.js.map +1 -1
  217. package/storageOperations/commentStorageOperations.js +35 -50
  218. package/storageOperations/commentStorageOperations.js.map +1 -1
  219. package/storageOperations/contentReviewStorageOperations.d.ts +1 -1
  220. package/storageOperations/contentReviewStorageOperations.js +34 -43
  221. package/storageOperations/contentReviewStorageOperations.js.map +1 -1
  222. package/storageOperations/index.d.ts +1 -7
  223. package/storageOperations/index.js +10 -29
  224. package/storageOperations/index.js.map +1 -1
  225. package/storageOperations/models/changeRequest.model.d.ts +1 -2
  226. package/storageOperations/models/changeRequest.model.js +6 -15
  227. package/storageOperations/models/changeRequest.model.js.map +1 -1
  228. package/storageOperations/models/comment.model.d.ts +1 -2
  229. package/storageOperations/models/comment.model.js +6 -14
  230. package/storageOperations/models/comment.model.js.map +1 -1
  231. package/storageOperations/models/contentReview.model.d.ts +1 -2
  232. package/storageOperations/models/contentReview.model.js +13 -37
  233. package/storageOperations/models/contentReview.model.js.map +1 -1
  234. package/storageOperations/models/index.js +6 -50
  235. package/storageOperations/models/index.js.map +1 -1
  236. package/storageOperations/models/reviewer.model.d.ts +1 -2
  237. package/storageOperations/models/reviewer.model.js +22 -14
  238. package/storageOperations/models/reviewer.model.js.map +1 -1
  239. package/storageOperations/models/utils.js +2 -4
  240. package/storageOperations/models/utils.js.map +1 -1
  241. package/storageOperations/models/workflow.model.d.ts +1 -2
  242. package/storageOperations/models/workflow.model.js +19 -42
  243. package/storageOperations/models/workflow.model.js.map +1 -1
  244. package/storageOperations/reviewerStorageOperations.d.ts +1 -1
  245. package/storageOperations/reviewerStorageOperations.js +34 -40
  246. package/storageOperations/reviewerStorageOperations.js.map +1 -1
  247. package/storageOperations/types.js +3 -1
  248. package/storageOperations/workflowStorageOperations.js +40 -47
  249. package/storageOperations/workflowStorageOperations.js.map +1 -1
  250. package/types.d.ts +39 -25
  251. package/types.js +126 -42
  252. package/types.js.map +1 -1
  253. package/utils/contentApwSettingsPlugin.js +2 -6
  254. package/utils/contentApwSettingsPlugin.js.map +1 -1
  255. package/utils/errors.js +2 -17
  256. package/utils/errors.js.map +1 -1
  257. package/utils/fieldResolver.js +8 -18
  258. package/utils/fieldResolver.js.map +1 -1
  259. package/utils/pickEntryFieldValues.d.ts +3 -0
  260. package/utils/pickEntryFieldValues.js +31 -0
  261. package/utils/pickEntryFieldValues.js.map +1 -0
  262. package/utils/resolve.d.ts +1 -1
  263. package/utils/resolve.js +2 -3
  264. package/utils/resolve.js.map +1 -1
  265. package/storageOperations/models/contentModelPluginFactory.d.ts +0 -15
  266. package/storageOperations/models/contentModelPluginFactory.js +0 -28
  267. package/storageOperations/models/contentModelPluginFactory.js.map +0 -1
@@ -1,93 +1,84 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.createContentReviewStorageOperations = void 0;
9
-
10
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
11
-
12
- var _index = require("./index");
13
-
8
+ var _pickEntryFieldValues = require("../utils/pickEntryFieldValues");
14
9
  var _error = _interopRequireDefault(require("@webiny/error"));
15
-
16
10
  var _contentReview = require("./models/contentReview.model");
17
-
18
11
  const createContentReviewStorageOperations = ({
19
12
  cms,
20
13
  security
21
14
  }) => {
22
15
  const getContentReviewModel = async () => {
23
- security.disableAuthorization();
24
- const model = await cms.getModel(_contentReview.CONTENT_REVIEW_MODEL_ID);
25
- security.enableAuthorization();
26
-
16
+ const model = await security.withoutAuthorization(async () => {
17
+ return cms.getModel(_contentReview.CONTENT_REVIEW_MODEL_ID);
18
+ });
27
19
  if (!model) {
28
20
  throw new _error.default(`Could not find "${_contentReview.CONTENT_REVIEW_MODEL_ID}" model.`, "MODEL_NOT_FOUND_ERROR");
29
21
  }
30
-
31
22
  return model;
32
23
  };
33
-
34
24
  const getContentReview = async ({
35
25
  id
36
26
  }) => {
37
27
  const model = await getContentReviewModel();
38
- security.disableAuthorization();
39
- const entry = await cms.getEntryById(model, id);
40
- security.enableAuthorization();
41
- return (0, _index.getFieldValues)(entry, _index.baseFields);
28
+ const entry = await security.withoutAuthorization(async () => {
29
+ return cms.getEntryById(model, id);
30
+ });
31
+ return (0, _pickEntryFieldValues.pickEntryFieldValues)(entry);
42
32
  };
43
-
44
33
  return {
45
34
  getContentReviewModel,
46
35
  getContentReview,
47
-
48
36
  async listContentReviews(params) {
49
37
  const model = await getContentReviewModel();
50
- security.disableAuthorization();
51
- const [entries, meta] = await cms.listLatestEntries(model, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, params), {}, {
52
- where: (0, _objectSpread2.default)({}, params.where)
53
- }));
54
- security.enableAuthorization();
55
- return [entries.map(entry => (0, _index.getFieldValues)(entry, _index.baseFields)), meta];
38
+ const [entries, meta] = await security.withoutAuthorization(async () => {
39
+ return cms.listLatestEntries(model, {
40
+ ...params,
41
+ where: {
42
+ ...params.where
43
+ }
44
+ });
45
+ });
46
+ return [entries.map(_pickEntryFieldValues.pickEntryFieldValues), meta];
56
47
  },
57
-
58
48
  async createContentReview(params) {
59
49
  const model = await getContentReviewModel();
60
- security.disableAuthorization();
61
- const entry = await cms.createEntry(model, params.data);
62
- security.enableAuthorization();
63
- return (0, _index.getFieldValues)(entry, _index.baseFields);
50
+ const entry = await security.withoutAuthorization(async () => {
51
+ return cms.createEntry(model, params.data);
52
+ });
53
+ return (0, _pickEntryFieldValues.pickEntryFieldValues)(entry);
64
54
  },
65
-
66
55
  async updateContentReview(params) {
67
56
  const model = await getContentReviewModel();
68
57
  /**
69
58
  * We're fetching the existing entry here because we're not accepting "app" field as input,
70
59
  * but, we still need to retain its value after the "update" operation.
71
60
  */
72
-
73
61
  const existingEntry = await getContentReview({
74
62
  id: params.id
75
63
  });
76
- security.disableAuthorization();
77
- const entry = await cms.updateEntry(model, params.id, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, existingEntry), params.data));
78
- security.enableAuthorization();
79
- return (0, _index.getFieldValues)(entry, _index.baseFields);
64
+ const entry = await security.withoutAuthorization(async () => {
65
+ return cms.updateEntry(model, params.id, {
66
+ ...existingEntry,
67
+ ...params.data,
68
+ savedOn: new Date()
69
+ });
70
+ });
71
+ return (0, _pickEntryFieldValues.pickEntryFieldValues)(entry);
80
72
  },
81
-
82
73
  async deleteContentReview(params) {
83
74
  const model = await getContentReviewModel();
84
- security.disableAuthorization();
85
- await cms.deleteEntry(model, params.id);
86
- security.enableAuthorization();
75
+ await security.withoutAuthorization(async () => {
76
+ return cms.deleteEntry(model, params.id);
77
+ });
87
78
  return true;
88
79
  }
89
-
90
80
  };
91
81
  };
82
+ exports.createContentReviewStorageOperations = createContentReviewStorageOperations;
92
83
 
93
- exports.createContentReviewStorageOperations = createContentReviewStorageOperations;
84
+ //# sourceMappingURL=contentReviewStorageOperations.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["createContentReviewStorageOperations","cms","security","getContentReviewModel","disableAuthorization","model","getModel","CONTENT_REVIEW_MODEL_ID","enableAuthorization","WebinyError","getContentReview","id","entry","getEntryById","getFieldValues","baseFields","listContentReviews","params","entries","meta","listLatestEntries","where","map","createContentReview","createEntry","data","updateContentReview","existingEntry","updateEntry","deleteContentReview","deleteEntry"],"sources":["contentReviewStorageOperations.ts"],"sourcesContent":["import { ApwContentReviewStorageOperations } from \"./types\";\nimport {\n baseFields,\n CreateApwStorageOperationsParams,\n getFieldValues\n} from \"~/storageOperations/index\";\nimport WebinyError from \"@webiny/error\";\nimport { CONTENT_REVIEW_MODEL_ID } from \"~/storageOperations/models/contentReview.model\";\n\nexport const createContentReviewStorageOperations = ({\n cms,\n security\n}: CreateApwStorageOperationsParams): ApwContentReviewStorageOperations => {\n const getContentReviewModel = async () => {\n security.disableAuthorization();\n const model = await cms.getModel(CONTENT_REVIEW_MODEL_ID);\n security.enableAuthorization();\n if (!model) {\n throw new WebinyError(\n `Could not find \"${CONTENT_REVIEW_MODEL_ID}\" model.`,\n \"MODEL_NOT_FOUND_ERROR\"\n );\n }\n return model;\n };\n const getContentReview: ApwContentReviewStorageOperations[\"getContentReview\"] = async ({\n id\n }) => {\n const model = await getContentReviewModel();\n security.disableAuthorization();\n const entry = await cms.getEntryById(model, id);\n security.enableAuthorization();\n return getFieldValues(entry, baseFields);\n };\n return {\n getContentReviewModel,\n getContentReview,\n async listContentReviews(params) {\n const model = await getContentReviewModel();\n security.disableAuthorization();\n const [entries, meta] = await cms.listLatestEntries(model, {\n ...params,\n where: {\n ...params.where\n }\n });\n security.enableAuthorization();\n return [entries.map(entry => getFieldValues(entry, baseFields)), meta];\n },\n async createContentReview(params) {\n const model = await getContentReviewModel();\n security.disableAuthorization();\n const entry = await cms.createEntry(model, params.data);\n security.enableAuthorization();\n return getFieldValues(entry, baseFields);\n },\n async updateContentReview(params) {\n const model = await getContentReviewModel();\n /**\n * We're fetching the existing entry here because we're not accepting \"app\" field as input,\n * but, we still need to retain its value after the \"update\" operation.\n */\n const existingEntry = await getContentReview({ id: params.id });\n\n security.disableAuthorization();\n const entry = await cms.updateEntry(model, params.id, {\n ...existingEntry,\n ...params.data\n });\n security.enableAuthorization();\n return getFieldValues(entry, baseFields);\n },\n async deleteContentReview(params) {\n const model = await getContentReviewModel();\n security.disableAuthorization();\n await cms.deleteEntry(model, params.id);\n security.enableAuthorization();\n return true;\n }\n };\n};\n"],"mappings":";;;;;;;;;;;AACA;;AAKA;;AACA;;AAEO,MAAMA,oCAAoC,GAAG,CAAC;EACjDC,GADiD;EAEjDC;AAFiD,CAAD,KAGuB;EACvE,MAAMC,qBAAqB,GAAG,YAAY;IACtCD,QAAQ,CAACE,oBAAT;IACA,MAAMC,KAAK,GAAG,MAAMJ,GAAG,CAACK,QAAJ,CAAaC,sCAAb,CAApB;IACAL,QAAQ,CAACM,mBAAT;;IACA,IAAI,CAACH,KAAL,EAAY;MACR,MAAM,IAAII,cAAJ,CACD,mBAAkBF,sCAAwB,UADzC,EAEF,uBAFE,CAAN;IAIH;;IACD,OAAOF,KAAP;EACH,CAXD;;EAYA,MAAMK,gBAAuE,GAAG,OAAO;IACnFC;EADmF,CAAP,KAE1E;IACF,MAAMN,KAAK,GAAG,MAAMF,qBAAqB,EAAzC;IACAD,QAAQ,CAACE,oBAAT;IACA,MAAMQ,KAAK,GAAG,MAAMX,GAAG,CAACY,YAAJ,CAAiBR,KAAjB,EAAwBM,EAAxB,CAApB;IACAT,QAAQ,CAACM,mBAAT;IACA,OAAO,IAAAM,qBAAA,EAAeF,KAAf,EAAsBG,iBAAtB,CAAP;EACH,CARD;;EASA,OAAO;IACHZ,qBADG;IAEHO,gBAFG;;IAGH,MAAMM,kBAAN,CAAyBC,MAAzB,EAAiC;MAC7B,MAAMZ,KAAK,GAAG,MAAMF,qBAAqB,EAAzC;MACAD,QAAQ,CAACE,oBAAT;MACA,MAAM,CAACc,OAAD,EAAUC,IAAV,IAAkB,MAAMlB,GAAG,CAACmB,iBAAJ,CAAsBf,KAAtB,8DACvBY,MADuB;QAE1BI,KAAK,kCACEJ,MAAM,CAACI,KADT;MAFqB,GAA9B;MAMAnB,QAAQ,CAACM,mBAAT;MACA,OAAO,CAACU,OAAO,CAACI,GAAR,CAAYV,KAAK,IAAI,IAAAE,qBAAA,EAAeF,KAAf,EAAsBG,iBAAtB,CAArB,CAAD,EAA0DI,IAA1D,CAAP;IACH,CAdE;;IAeH,MAAMI,mBAAN,CAA0BN,MAA1B,EAAkC;MAC9B,MAAMZ,KAAK,GAAG,MAAMF,qBAAqB,EAAzC;MACAD,QAAQ,CAACE,oBAAT;MACA,MAAMQ,KAAK,GAAG,MAAMX,GAAG,CAACuB,WAAJ,CAAgBnB,KAAhB,EAAuBY,MAAM,CAACQ,IAA9B,CAApB;MACAvB,QAAQ,CAACM,mBAAT;MACA,OAAO,IAAAM,qBAAA,EAAeF,KAAf,EAAsBG,iBAAtB,CAAP;IACH,CArBE;;IAsBH,MAAMW,mBAAN,CAA0BT,MAA1B,EAAkC;MAC9B,MAAMZ,KAAK,GAAG,MAAMF,qBAAqB,EAAzC;MACA;AACZ;AACA;AACA;;MACY,MAAMwB,aAAa,GAAG,MAAMjB,gBAAgB,CAAC;QAAEC,EAAE,EAAEM,MAAM,CAACN;MAAb,CAAD,CAA5C;MAEAT,QAAQ,CAACE,oBAAT;MACA,MAAMQ,KAAK,GAAG,MAAMX,GAAG,CAAC2B,WAAJ,CAAgBvB,KAAhB,EAAuBY,MAAM,CAACN,EAA9B,8DACbgB,aADa,GAEbV,MAAM,CAACQ,IAFM,EAApB;MAIAvB,QAAQ,CAACM,mBAAT;MACA,OAAO,IAAAM,qBAAA,EAAeF,KAAf,EAAsBG,iBAAtB,CAAP;IACH,CArCE;;IAsCH,MAAMc,mBAAN,CAA0BZ,MAA1B,EAAkC;MAC9B,MAAMZ,KAAK,GAAG,MAAMF,qBAAqB,EAAzC;MACAD,QAAQ,CAACE,oBAAT;MACA,MAAMH,GAAG,CAAC6B,WAAJ,CAAgBzB,KAAhB,EAAuBY,MAAM,CAACN,EAA9B,CAAN;MACAT,QAAQ,CAACM,mBAAT;MACA,OAAO,IAAP;IACH;;EA5CE,CAAP;AA8CH,CAvEM"}
1
+ {"version":3,"names":["_pickEntryFieldValues","require","_error","_interopRequireDefault","_contentReview","createContentReviewStorageOperations","cms","security","getContentReviewModel","model","withoutAuthorization","getModel","CONTENT_REVIEW_MODEL_ID","WebinyError","getContentReview","id","entry","getEntryById","pickEntryFieldValues","listContentReviews","params","entries","meta","listLatestEntries","where","map","createContentReview","createEntry","data","updateContentReview","existingEntry","updateEntry","savedOn","Date","deleteContentReview","deleteEntry","exports"],"sources":["contentReviewStorageOperations.ts"],"sourcesContent":["import { ApwContentReviewStorageOperations } from \"./types\";\nimport { CreateApwStorageOperationsParams } from \"~/storageOperations\";\nimport { pickEntryFieldValues } from \"~/utils/pickEntryFieldValues\";\nimport WebinyError from \"@webiny/error\";\nimport { CONTENT_REVIEW_MODEL_ID } from \"~/storageOperations/models/contentReview.model\";\nimport { ApwContentReview } from \"~/types\";\n\nexport const createContentReviewStorageOperations = ({\n cms,\n security\n}: CreateApwStorageOperationsParams): ApwContentReviewStorageOperations => {\n const getContentReviewModel = async () => {\n const model = await security.withoutAuthorization(async () => {\n return cms.getModel(CONTENT_REVIEW_MODEL_ID);\n });\n if (!model) {\n throw new WebinyError(\n `Could not find \"${CONTENT_REVIEW_MODEL_ID}\" model.`,\n \"MODEL_NOT_FOUND_ERROR\"\n );\n }\n return model;\n };\n const getContentReview: ApwContentReviewStorageOperations[\"getContentReview\"] = async ({\n id\n }) => {\n const model = await getContentReviewModel();\n const entry = await security.withoutAuthorization(async () => {\n return cms.getEntryById(model, id);\n });\n return pickEntryFieldValues(entry);\n };\n return {\n getContentReviewModel,\n getContentReview,\n async listContentReviews(params) {\n const model = await getContentReviewModel();\n\n const [entries, meta] = await security.withoutAuthorization(async () => {\n return cms.listLatestEntries(model, {\n ...params,\n where: {\n ...params.where\n }\n });\n });\n\n return [entries.map(pickEntryFieldValues<ApwContentReview>), meta];\n },\n async createContentReview(params) {\n const model = await getContentReviewModel();\n\n const entry = await security.withoutAuthorization(async () => {\n return cms.createEntry(model, params.data);\n });\n return pickEntryFieldValues(entry);\n },\n async updateContentReview(params) {\n const model = await getContentReviewModel();\n /**\n * We're fetching the existing entry here because we're not accepting \"app\" field as input,\n * but, we still need to retain its value after the \"update\" operation.\n */\n const existingEntry = await getContentReview({ id: params.id });\n\n const entry = await security.withoutAuthorization(async () => {\n return cms.updateEntry(model, params.id, {\n ...existingEntry,\n ...params.data,\n savedOn: new Date()\n });\n });\n return pickEntryFieldValues(entry);\n },\n async deleteContentReview(params) {\n const model = await getContentReviewModel();\n\n await security.withoutAuthorization(async () => {\n return cms.deleteEntry(model, params.id);\n });\n\n return true;\n }\n };\n};\n"],"mappings":";;;;;;;AAEA,IAAAA,qBAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AAGO,MAAMI,oCAAoC,GAAGA,CAAC;EACjDC,GAAG;EACHC;AAC8B,CAAC,KAAwC;EACvE,MAAMC,qBAAqB,GAAG,MAAAA,CAAA,KAAY;IACtC,MAAMC,KAAK,GAAG,MAAMF,QAAQ,CAACG,oBAAoB,CAAC,YAAY;MAC1D,OAAOJ,GAAG,CAACK,QAAQ,CAACC,sCAAuB,CAAC;IAChD,CAAC,CAAC;IACF,IAAI,CAACH,KAAK,EAAE;MACR,MAAM,IAAII,cAAW,CAChB,mBAAkBD,sCAAwB,UAAS,EACpD,uBACJ,CAAC;IACL;IACA,OAAOH,KAAK;EAChB,CAAC;EACD,MAAMK,gBAAuE,GAAG,MAAAA,CAAO;IACnFC;EACJ,CAAC,KAAK;IACF,MAAMN,KAAK,GAAG,MAAMD,qBAAqB,CAAC,CAAC;IAC3C,MAAMQ,KAAK,GAAG,MAAMT,QAAQ,CAACG,oBAAoB,CAAC,YAAY;MAC1D,OAAOJ,GAAG,CAACW,YAAY,CAACR,KAAK,EAAEM,EAAE,CAAC;IACtC,CAAC,CAAC;IACF,OAAO,IAAAG,0CAAoB,EAACF,KAAK,CAAC;EACtC,CAAC;EACD,OAAO;IACHR,qBAAqB;IACrBM,gBAAgB;IAChB,MAAMK,kBAAkBA,CAACC,MAAM,EAAE;MAC7B,MAAMX,KAAK,GAAG,MAAMD,qBAAqB,CAAC,CAAC;MAE3C,MAAM,CAACa,OAAO,EAAEC,IAAI,CAAC,GAAG,MAAMf,QAAQ,CAACG,oBAAoB,CAAC,YAAY;QACpE,OAAOJ,GAAG,CAACiB,iBAAiB,CAACd,KAAK,EAAE;UAChC,GAAGW,MAAM;UACTI,KAAK,EAAE;YACH,GAAGJ,MAAM,CAACI;UACd;QACJ,CAAC,CAAC;MACN,CAAC,CAAC;MAEF,OAAO,CAACH,OAAO,CAACI,GAAG,CAACP,0CAAsC,CAAC,EAAEI,IAAI,CAAC;IACtE,CAAC;IACD,MAAMI,mBAAmBA,CAACN,MAAM,EAAE;MAC9B,MAAMX,KAAK,GAAG,MAAMD,qBAAqB,CAAC,CAAC;MAE3C,MAAMQ,KAAK,GAAG,MAAMT,QAAQ,CAACG,oBAAoB,CAAC,YAAY;QAC1D,OAAOJ,GAAG,CAACqB,WAAW,CAAClB,KAAK,EAAEW,MAAM,CAACQ,IAAI,CAAC;MAC9C,CAAC,CAAC;MACF,OAAO,IAAAV,0CAAoB,EAACF,KAAK,CAAC;IACtC,CAAC;IACD,MAAMa,mBAAmBA,CAACT,MAAM,EAAE;MAC9B,MAAMX,KAAK,GAAG,MAAMD,qBAAqB,CAAC,CAAC;MAC3C;AACZ;AACA;AACA;MACY,MAAMsB,aAAa,GAAG,MAAMhB,gBAAgB,CAAC;QAAEC,EAAE,EAAEK,MAAM,CAACL;MAAG,CAAC,CAAC;MAE/D,MAAMC,KAAK,GAAG,MAAMT,QAAQ,CAACG,oBAAoB,CAAC,YAAY;QAC1D,OAAOJ,GAAG,CAACyB,WAAW,CAACtB,KAAK,EAAEW,MAAM,CAACL,EAAE,EAAE;UACrC,GAAGe,aAAa;UAChB,GAAGV,MAAM,CAACQ,IAAI;UACdI,OAAO,EAAE,IAAIC,IAAI,CAAC;QACtB,CAAC,CAAC;MACN,CAAC,CAAC;MACF,OAAO,IAAAf,0CAAoB,EAACF,KAAK,CAAC;IACtC,CAAC;IACD,MAAMkB,mBAAmBA,CAACd,MAAM,EAAE;MAC9B,MAAMX,KAAK,GAAG,MAAMD,qBAAqB,CAAC,CAAC;MAE3C,MAAMD,QAAQ,CAACG,oBAAoB,CAAC,YAAY;QAC5C,OAAOJ,GAAG,CAAC6B,WAAW,CAAC1B,KAAK,EAAEW,MAAM,CAACL,EAAE,CAAC;MAC5C,CAAC,CAAC;MAEF,OAAO,IAAI;IACf;EACJ,CAAC;AACL,CAAC;AAACqB,OAAA,CAAA/B,oCAAA,GAAAA,oCAAA"}
@@ -1,4 +1,4 @@
1
- import { CmsContext, CmsEntry, HeadlessCms } from "@webiny/api-headless-cms/types";
1
+ import { CmsContext, HeadlessCms } from "@webiny/api-headless-cms/types";
2
2
  import { ApwStorageOperations } from "../types";
3
3
  import { Security } from "@webiny/api-security/types";
4
4
  export interface CreateApwStorageOperationsParams {
@@ -6,10 +6,4 @@ export interface CreateApwStorageOperationsParams {
6
6
  security: Security;
7
7
  getCmsContext: () => CmsContext;
8
8
  }
9
- /**
10
- * Using any because value can be a lot of types.
11
- * TODO @ts-refactor figure out correct types.
12
- */
13
- export declare function getFieldValues(entry: CmsEntry, fields: string[]): any;
14
- export declare const baseFields: string[];
15
9
  export declare const createStorageOperations: (params: CreateApwStorageOperationsParams) => ApwStorageOperations;
@@ -1,48 +1,29 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
8
- exports.createStorageOperations = exports.baseFields = void 0;
9
- exports.getFieldValues = getFieldValues;
10
-
11
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
12
-
13
- var _pick = _interopRequireDefault(require("lodash/pick"));
14
-
6
+ exports.createStorageOperations = void 0;
15
7
  var _reviewerStorageOperations = require("./reviewerStorageOperations");
16
-
17
8
  var _workflowStorageOperations = require("./workflowStorageOperations");
18
-
19
9
  var _contentReviewStorageOperations = require("./contentReviewStorageOperations");
20
-
21
10
  var _changeRequestStorageOperations = require("./changeRequestStorageOperations");
22
-
23
11
  var _commentStorageOperations = require("./commentStorageOperations");
24
-
25
12
  var _models = require("./models");
26
-
27
- /**
28
- * Using any because value can be a lot of types.
29
- * TODO @ts-refactor figure out correct types.
30
- */
31
- function getFieldValues(entry, fields) {
32
- return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (0, _pick.default)(entry, fields)), entry.values);
33
- }
34
-
35
- const baseFields = ["id", "entryId", "createdBy", "createdOn", "savedOn"];
36
- exports.baseFields = baseFields;
37
-
38
13
  const createStorageOperations = params => {
39
14
  const context = params.getCmsContext();
40
15
  /**
41
16
  * Register Apw models.
42
17
  */
43
-
44
18
  (0, _models.createApwModels)(context);
45
- return (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, (0, _reviewerStorageOperations.createReviewerStorageOperations)(params)), (0, _workflowStorageOperations.createWorkflowStorageOperations)(params)), (0, _contentReviewStorageOperations.createContentReviewStorageOperations)(params)), (0, _changeRequestStorageOperations.createChangeRequestStorageOperations)(params)), (0, _commentStorageOperations.createCommentStorageOperations)(params));
19
+ return {
20
+ ...(0, _reviewerStorageOperations.createReviewerStorageOperations)(params),
21
+ ...(0, _workflowStorageOperations.createWorkflowStorageOperations)(params),
22
+ ...(0, _contentReviewStorageOperations.createContentReviewStorageOperations)(params),
23
+ ...(0, _changeRequestStorageOperations.createChangeRequestStorageOperations)(params),
24
+ ...(0, _commentStorageOperations.createCommentStorageOperations)(params)
25
+ };
46
26
  };
27
+ exports.createStorageOperations = createStorageOperations;
47
28
 
48
- exports.createStorageOperations = createStorageOperations;
29
+ //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["getFieldValues","entry","fields","pick","values","baseFields","createStorageOperations","params","context","getCmsContext","createApwModels","createReviewerStorageOperations","createWorkflowStorageOperations","createContentReviewStorageOperations","createChangeRequestStorageOperations","createCommentStorageOperations"],"sources":["index.ts"],"sourcesContent":["import pick from \"lodash/pick\";\nimport { CmsContext, CmsEntry, HeadlessCms } from \"@webiny/api-headless-cms/types\";\nimport { ApwStorageOperations } from \"~/types\";\nimport { createReviewerStorageOperations } from \"./reviewerStorageOperations\";\nimport { createWorkflowStorageOperations } from \"./workflowStorageOperations\";\nimport { createContentReviewStorageOperations } from \"./contentReviewStorageOperations\";\nimport { createChangeRequestStorageOperations } from \"./changeRequestStorageOperations\";\nimport { createCommentStorageOperations } from \"~/storageOperations/commentStorageOperations\";\nimport { createApwModels } from \"./models\";\nimport { Security } from \"@webiny/api-security/types\";\n\nexport interface CreateApwStorageOperationsParams {\n cms: HeadlessCms;\n security: Security;\n getCmsContext: () => CmsContext;\n}\n\n/**\n * Using any because value can be a lot of types.\n * TODO @ts-refactor figure out correct types.\n */\nexport function getFieldValues(entry: CmsEntry, fields: string[]): any {\n return { ...pick(entry, fields), ...entry.values };\n}\n\nexport const baseFields = [\"id\", \"entryId\", \"createdBy\", \"createdOn\", \"savedOn\"];\n\nexport const createStorageOperations = (\n params: CreateApwStorageOperationsParams\n): ApwStorageOperations => {\n const context = params.getCmsContext();\n /**\n * Register Apw models.\n */\n createApwModels(context);\n\n return {\n ...createReviewerStorageOperations(params),\n ...createWorkflowStorageOperations(params),\n ...createContentReviewStorageOperations(params),\n ...createChangeRequestStorageOperations(params),\n ...createCommentStorageOperations(params)\n };\n};\n"],"mappings":";;;;;;;;;;;;AAAA;;AAGA;;AACA;;AACA;;AACA;;AACA;;AACA;;AASA;AACA;AACA;AACA;AACO,SAASA,cAAT,CAAwBC,KAAxB,EAAyCC,MAAzC,EAAgE;EACnE,mEAAY,IAAAC,aAAA,EAAKF,KAAL,EAAYC,MAAZ,CAAZ,GAAoCD,KAAK,CAACG,MAA1C;AACH;;AAEM,MAAMC,UAAU,GAAG,CAAC,IAAD,EAAO,SAAP,EAAkB,WAAlB,EAA+B,WAA/B,EAA4C,SAA5C,CAAnB;;;AAEA,MAAMC,uBAAuB,GAChCC,MADmC,IAEZ;EACvB,MAAMC,OAAO,GAAGD,MAAM,CAACE,aAAP,EAAhB;EACA;AACJ;AACA;;EACI,IAAAC,uBAAA,EAAgBF,OAAhB;EAEA,uJACO,IAAAG,0DAAA,EAAgCJ,MAAhC,CADP,GAEO,IAAAK,0DAAA,EAAgCL,MAAhC,CAFP,GAGO,IAAAM,oEAAA,EAAqCN,MAArC,CAHP,GAIO,IAAAO,oEAAA,EAAqCP,MAArC,CAJP,GAKO,IAAAQ,wDAAA,EAA+BR,MAA/B,CALP;AAOH,CAhBM"}
1
+ {"version":3,"names":["_reviewerStorageOperations","require","_workflowStorageOperations","_contentReviewStorageOperations","_changeRequestStorageOperations","_commentStorageOperations","_models","createStorageOperations","params","context","getCmsContext","createApwModels","createReviewerStorageOperations","createWorkflowStorageOperations","createContentReviewStorageOperations","createChangeRequestStorageOperations","createCommentStorageOperations","exports"],"sources":["index.ts"],"sourcesContent":["import { CmsContext, HeadlessCms } from \"@webiny/api-headless-cms/types\";\nimport { ApwStorageOperations } from \"~/types\";\nimport { createReviewerStorageOperations } from \"./reviewerStorageOperations\";\nimport { createWorkflowStorageOperations } from \"./workflowStorageOperations\";\nimport { createContentReviewStorageOperations } from \"./contentReviewStorageOperations\";\nimport { createChangeRequestStorageOperations } from \"./changeRequestStorageOperations\";\nimport { createCommentStorageOperations } from \"~/storageOperations/commentStorageOperations\";\nimport { createApwModels } from \"./models\";\nimport { Security } from \"@webiny/api-security/types\";\n\nexport interface CreateApwStorageOperationsParams {\n cms: HeadlessCms;\n security: Security;\n getCmsContext: () => CmsContext;\n}\n\nexport const createStorageOperations = (\n params: CreateApwStorageOperationsParams\n): ApwStorageOperations => {\n const context = params.getCmsContext();\n /**\n * Register Apw models.\n */\n createApwModels(context);\n\n return {\n ...createReviewerStorageOperations(params),\n ...createWorkflowStorageOperations(params),\n ...createContentReviewStorageOperations(params),\n ...createChangeRequestStorageOperations(params),\n ...createCommentStorageOperations(params)\n };\n};\n"],"mappings":";;;;;;AAEA,IAAAA,0BAAA,GAAAC,OAAA;AACA,IAAAC,0BAAA,GAAAD,OAAA;AACA,IAAAE,+BAAA,GAAAF,OAAA;AACA,IAAAG,+BAAA,GAAAH,OAAA;AACA,IAAAI,yBAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AASO,MAAMM,uBAAuB,GAChCC,MAAwC,IACjB;EACvB,MAAMC,OAAO,GAAGD,MAAM,CAACE,aAAa,CAAC,CAAC;EACtC;AACJ;AACA;EACI,IAAAC,uBAAe,EAACF,OAAO,CAAC;EAExB,OAAO;IACH,GAAG,IAAAG,0DAA+B,EAACJ,MAAM,CAAC;IAC1C,GAAG,IAAAK,0DAA+B,EAACL,MAAM,CAAC;IAC1C,GAAG,IAAAM,oEAAoC,EAACN,MAAM,CAAC;IAC/C,GAAG,IAAAO,oEAAoC,EAACP,MAAM,CAAC;IAC/C,GAAG,IAAAQ,wDAA8B,EAACR,MAAM;EAC5C,CAAC;AACL,CAAC;AAACS,OAAA,CAAAV,uBAAA,GAAAA,uBAAA"}
@@ -1,3 +1,2 @@
1
- import { WorkflowModelDefinition } from "../../types";
2
1
  export declare const CHANGE_REQUEST_MODEL_ID = "apwChangeRequestModelDefinition";
3
- export declare const createChangeRequestModelDefinition: () => WorkflowModelDefinition;
2
+ export declare const createChangeRequestModelDefinition: () => import("@webiny/api-headless-cms").CmsPrivateModelFull;
@@ -4,33 +4,28 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.createChangeRequestModelDefinition = exports.CHANGE_REQUEST_MODEL_ID = void 0;
7
-
7
+ var _apiHeadlessCms = require("@webiny/api-headless-cms");
8
8
  var _utils = require("./utils");
9
-
10
9
  const bodyField = () => (0, _utils.createModelField)({
11
10
  label: "Body",
12
11
  type: "rich-text",
13
12
  parent: "changeRequest"
14
13
  });
15
-
16
14
  const titleField = () => (0, _utils.createModelField)({
17
15
  label: "Title",
18
16
  type: "text",
19
17
  parent: "changeRequest"
20
18
  });
21
-
22
19
  const resolvedField = () => (0, _utils.createModelField)({
23
20
  label: "Resolved",
24
21
  type: "boolean",
25
22
  parent: "changeRequest"
26
23
  });
27
-
28
24
  const mediaField = () => (0, _utils.createModelField)({
29
25
  label: "Media",
30
26
  type: "file",
31
27
  parent: "changeRequest"
32
28
  });
33
-
34
29
  const stepField = () => (0, _utils.createModelField)({
35
30
  label: "Step",
36
31
  type: "text",
@@ -40,20 +35,16 @@ const stepField = () => (0, _utils.createModelField)({
40
35
  name: "required"
41
36
  }]
42
37
  });
43
-
44
38
  const CHANGE_REQUEST_MODEL_ID = "apwChangeRequestModelDefinition";
45
39
  exports.CHANGE_REQUEST_MODEL_ID = CHANGE_REQUEST_MODEL_ID;
46
-
47
40
  const createChangeRequestModelDefinition = () => {
48
- return {
41
+ return (0, _apiHeadlessCms.createPrivateModelDefinition)({
49
42
  name: "APW - Change Request",
50
43
  modelId: CHANGE_REQUEST_MODEL_ID,
51
44
  titleFieldId: "title",
52
- layout: [["changeRequest_body"], ["changeRequest_title"], ["changeRequest_resolved"], ["changeRequest_media"], ["changeRequest_step"]],
53
- fields: [bodyField(), titleField(), resolvedField(), mediaField(), stepField()],
54
- description: "",
55
- isPrivate: true
56
- };
45
+ fields: [bodyField(), titleField(), resolvedField(), mediaField(), stepField()]
46
+ });
57
47
  };
48
+ exports.createChangeRequestModelDefinition = createChangeRequestModelDefinition;
58
49
 
59
- exports.createChangeRequestModelDefinition = createChangeRequestModelDefinition;
50
+ //# sourceMappingURL=changeRequest.model.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["bodyField","createModelField","label","type","parent","titleField","resolvedField","mediaField","stepField","validation","message","name","CHANGE_REQUEST_MODEL_ID","createChangeRequestModelDefinition","modelId","titleFieldId","layout","fields","description","isPrivate"],"sources":["changeRequest.model.ts"],"sourcesContent":["import { createModelField } from \"./utils\";\nimport { WorkflowModelDefinition } from \"~/types\";\n\nconst bodyField = () =>\n createModelField({\n label: \"Body\",\n type: \"rich-text\",\n parent: \"changeRequest\"\n });\n\nconst titleField = () =>\n createModelField({\n label: \"Title\",\n type: \"text\",\n parent: \"changeRequest\"\n });\n\nconst resolvedField = () =>\n createModelField({\n label: \"Resolved\",\n type: \"boolean\",\n parent: \"changeRequest\"\n });\n\nconst mediaField = () =>\n createModelField({\n label: \"Media\",\n type: \"file\",\n parent: \"changeRequest\"\n });\n\nconst stepField = () =>\n createModelField({\n label: \"Step\",\n type: \"text\",\n parent: \"changeRequest\",\n validation: [\n {\n message: \"`step` field value is required in changeRequest.\",\n name: \"required\"\n }\n ]\n });\n\nexport const CHANGE_REQUEST_MODEL_ID = \"apwChangeRequestModelDefinition\";\n\nexport const createChangeRequestModelDefinition = (): WorkflowModelDefinition => {\n return {\n name: \"APW - Change Request\",\n modelId: CHANGE_REQUEST_MODEL_ID,\n titleFieldId: \"title\",\n layout: [\n [\"changeRequest_body\"],\n [\"changeRequest_title\"],\n [\"changeRequest_resolved\"],\n [\"changeRequest_media\"],\n [\"changeRequest_step\"]\n ],\n fields: [bodyField(), titleField(), resolvedField(), mediaField(), stepField()],\n description: \"\",\n isPrivate: true\n };\n};\n"],"mappings":";;;;;;;AAAA;;AAGA,MAAMA,SAAS,GAAG,MACd,IAAAC,uBAAA,EAAiB;EACbC,KAAK,EAAE,MADM;EAEbC,IAAI,EAAE,WAFO;EAGbC,MAAM,EAAE;AAHK,CAAjB,CADJ;;AAOA,MAAMC,UAAU,GAAG,MACf,IAAAJ,uBAAA,EAAiB;EACbC,KAAK,EAAE,OADM;EAEbC,IAAI,EAAE,MAFO;EAGbC,MAAM,EAAE;AAHK,CAAjB,CADJ;;AAOA,MAAME,aAAa,GAAG,MAClB,IAAAL,uBAAA,EAAiB;EACbC,KAAK,EAAE,UADM;EAEbC,IAAI,EAAE,SAFO;EAGbC,MAAM,EAAE;AAHK,CAAjB,CADJ;;AAOA,MAAMG,UAAU,GAAG,MACf,IAAAN,uBAAA,EAAiB;EACbC,KAAK,EAAE,OADM;EAEbC,IAAI,EAAE,MAFO;EAGbC,MAAM,EAAE;AAHK,CAAjB,CADJ;;AAOA,MAAMI,SAAS,GAAG,MACd,IAAAP,uBAAA,EAAiB;EACbC,KAAK,EAAE,MADM;EAEbC,IAAI,EAAE,MAFO;EAGbC,MAAM,EAAE,eAHK;EAIbK,UAAU,EAAE,CACR;IACIC,OAAO,EAAE,kDADb;IAEIC,IAAI,EAAE;EAFV,CADQ;AAJC,CAAjB,CADJ;;AAaO,MAAMC,uBAAuB,GAAG,iCAAhC;;;AAEA,MAAMC,kCAAkC,GAAG,MAA+B;EAC7E,OAAO;IACHF,IAAI,EAAE,sBADH;IAEHG,OAAO,EAAEF,uBAFN;IAGHG,YAAY,EAAE,OAHX;IAIHC,MAAM,EAAE,CACJ,CAAC,oBAAD,CADI,EAEJ,CAAC,qBAAD,CAFI,EAGJ,CAAC,wBAAD,CAHI,EAIJ,CAAC,qBAAD,CAJI,EAKJ,CAAC,oBAAD,CALI,CAJL;IAWHC,MAAM,EAAE,CAACjB,SAAS,EAAV,EAAcK,UAAU,EAAxB,EAA4BC,aAAa,EAAzC,EAA6CC,UAAU,EAAvD,EAA2DC,SAAS,EAApE,CAXL;IAYHU,WAAW,EAAE,EAZV;IAaHC,SAAS,EAAE;EAbR,CAAP;AAeH,CAhBM"}
1
+ {"version":3,"names":["_apiHeadlessCms","require","_utils","bodyField","createModelField","label","type","parent","titleField","resolvedField","mediaField","stepField","validation","message","name","CHANGE_REQUEST_MODEL_ID","exports","createChangeRequestModelDefinition","createPrivateModelDefinition","modelId","titleFieldId","fields"],"sources":["changeRequest.model.ts"],"sourcesContent":["import { createPrivateModelDefinition } from \"@webiny/api-headless-cms\";\nimport { createModelField } from \"./utils\";\n\nconst bodyField = () =>\n createModelField({\n label: \"Body\",\n type: \"rich-text\",\n parent: \"changeRequest\"\n });\n\nconst titleField = () =>\n createModelField({\n label: \"Title\",\n type: \"text\",\n parent: \"changeRequest\"\n });\n\nconst resolvedField = () =>\n createModelField({\n label: \"Resolved\",\n type: \"boolean\",\n parent: \"changeRequest\"\n });\n\nconst mediaField = () =>\n createModelField({\n label: \"Media\",\n type: \"file\",\n parent: \"changeRequest\"\n });\n\nconst stepField = () =>\n createModelField({\n label: \"Step\",\n type: \"text\",\n parent: \"changeRequest\",\n validation: [\n {\n message: \"`step` field value is required in changeRequest.\",\n name: \"required\"\n }\n ]\n });\n\nexport const CHANGE_REQUEST_MODEL_ID = \"apwChangeRequestModelDefinition\";\n\nexport const createChangeRequestModelDefinition = () => {\n return createPrivateModelDefinition({\n name: \"APW - Change Request\",\n modelId: CHANGE_REQUEST_MODEL_ID,\n titleFieldId: \"title\",\n fields: [bodyField(), titleField(), resolvedField(), mediaField(), stepField()]\n });\n};\n"],"mappings":";;;;;;AAAA,IAAAA,eAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAEA,MAAME,SAAS,GAAGA,CAAA,KACd,IAAAC,uBAAgB,EAAC;EACbC,KAAK,EAAE,MAAM;EACbC,IAAI,EAAE,WAAW;EACjBC,MAAM,EAAE;AACZ,CAAC,CAAC;AAEN,MAAMC,UAAU,GAAGA,CAAA,KACf,IAAAJ,uBAAgB,EAAC;EACbC,KAAK,EAAE,OAAO;EACdC,IAAI,EAAE,MAAM;EACZC,MAAM,EAAE;AACZ,CAAC,CAAC;AAEN,MAAME,aAAa,GAAGA,CAAA,KAClB,IAAAL,uBAAgB,EAAC;EACbC,KAAK,EAAE,UAAU;EACjBC,IAAI,EAAE,SAAS;EACfC,MAAM,EAAE;AACZ,CAAC,CAAC;AAEN,MAAMG,UAAU,GAAGA,CAAA,KACf,IAAAN,uBAAgB,EAAC;EACbC,KAAK,EAAE,OAAO;EACdC,IAAI,EAAE,MAAM;EACZC,MAAM,EAAE;AACZ,CAAC,CAAC;AAEN,MAAMI,SAAS,GAAGA,CAAA,KACd,IAAAP,uBAAgB,EAAC;EACbC,KAAK,EAAE,MAAM;EACbC,IAAI,EAAE,MAAM;EACZC,MAAM,EAAE,eAAe;EACvBK,UAAU,EAAE,CACR;IACIC,OAAO,EAAE,kDAAkD;IAC3DC,IAAI,EAAE;EACV,CAAC;AAET,CAAC,CAAC;AAEC,MAAMC,uBAAuB,GAAG,iCAAiC;AAACC,OAAA,CAAAD,uBAAA,GAAAA,uBAAA;AAElE,MAAME,kCAAkC,GAAGA,CAAA,KAAM;EACpD,OAAO,IAAAC,4CAA4B,EAAC;IAChCJ,IAAI,EAAE,sBAAsB;IAC5BK,OAAO,EAAEJ,uBAAuB;IAChCK,YAAY,EAAE,OAAO;IACrBC,MAAM,EAAE,CAAClB,SAAS,CAAC,CAAC,EAAEK,UAAU,CAAC,CAAC,EAAEC,aAAa,CAAC,CAAC,EAAEC,UAAU,CAAC,CAAC,EAAEC,SAAS,CAAC,CAAC;EAClF,CAAC,CAAC;AACN,CAAC;AAACK,OAAA,CAAAC,kCAAA,GAAAA,kCAAA"}
@@ -1,7 +1,6 @@
1
- import { WorkflowModelDefinition } from "../../types";
2
1
  interface CreateCommentModelDefinitionParams {
3
2
  modelId: string;
4
3
  }
5
4
  export declare const COMMENT_MODEL_ID = "apwCommentModelDefinition";
6
- export declare const createCommentModelDefinition: ({ modelId }: CreateCommentModelDefinitionParams) => WorkflowModelDefinition;
5
+ export declare const createCommentModelDefinition: ({ modelId }: CreateCommentModelDefinitionParams) => import("@webiny/api-headless-cms").CmsPrivateModelFull;
7
6
  export {};
@@ -4,15 +4,13 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.createCommentModelDefinition = exports.COMMENT_MODEL_ID = void 0;
7
-
7
+ var _apiHeadlessCms = require("@webiny/api-headless-cms");
8
8
  var _utils = require("./utils");
9
-
10
9
  const commentBody = () => (0, _utils.createModelField)({
11
10
  label: "Body",
12
11
  type: "rich-text",
13
12
  parent: "comment"
14
13
  });
15
-
16
14
  const changeRequestRef = modelId => (0, _utils.createModelField)({
17
15
  label: "Change Request",
18
16
  type: "ref",
@@ -23,7 +21,6 @@ const changeRequestRef = modelId => (0, _utils.createModelField)({
23
21
  }]
24
22
  }
25
23
  });
26
-
27
24
  const stepField = () => (0, _utils.createModelField)({
28
25
  label: "Step",
29
26
  type: "text",
@@ -33,28 +30,23 @@ const stepField = () => (0, _utils.createModelField)({
33
30
  name: "required"
34
31
  }]
35
32
  });
36
-
37
33
  const mediaField = () => (0, _utils.createModelField)({
38
34
  label: "Media",
39
35
  type: "file",
40
36
  parent: "comment"
41
37
  });
42
-
43
38
  const COMMENT_MODEL_ID = "apwCommentModelDefinition";
44
39
  exports.COMMENT_MODEL_ID = COMMENT_MODEL_ID;
45
-
46
40
  const createCommentModelDefinition = ({
47
41
  modelId
48
42
  }) => {
49
- return {
43
+ return (0, _apiHeadlessCms.createPrivateModelDefinition)({
50
44
  name: "APW - Comment",
51
45
  modelId: COMMENT_MODEL_ID,
52
46
  titleFieldId: "step",
53
- layout: [["comment_body"], ["comment_changeRequest"], ["comment_step"], ["comment_media"]],
54
- fields: [commentBody(), changeRequestRef(modelId), stepField(), mediaField()],
55
- description: "",
56
- isPrivate: true
57
- };
47
+ fields: [commentBody(), changeRequestRef(modelId), stepField(), mediaField()]
48
+ });
58
49
  };
50
+ exports.createCommentModelDefinition = createCommentModelDefinition;
59
51
 
60
- exports.createCommentModelDefinition = createCommentModelDefinition;
52
+ //# sourceMappingURL=comment.model.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["commentBody","createModelField","label","type","parent","changeRequestRef","modelId","settings","models","stepField","validation","message","name","mediaField","COMMENT_MODEL_ID","createCommentModelDefinition","titleFieldId","layout","fields","description","isPrivate"],"sources":["comment.model.ts"],"sourcesContent":["import { createModelField } from \"./utils\";\nimport { WorkflowModelDefinition } from \"~/types\";\n\nconst commentBody = () =>\n createModelField({\n label: \"Body\",\n type: \"rich-text\",\n parent: \"comment\"\n });\n\nconst changeRequestRef = (modelId: string) =>\n createModelField({\n label: \"Change Request\",\n type: \"ref\",\n parent: \"comment\",\n settings: {\n models: [\n {\n modelId\n }\n ]\n }\n });\n\nconst stepField = () =>\n createModelField({\n label: \"Step\",\n type: \"text\",\n parent: \"comment\",\n validation: [\n {\n message: \"`step` field value is required in comment.\",\n name: \"required\"\n }\n ]\n });\n\nconst mediaField = () =>\n createModelField({\n label: \"Media\",\n type: \"file\",\n parent: \"comment\"\n });\n\ninterface CreateCommentModelDefinitionParams {\n modelId: string;\n}\n\nexport const COMMENT_MODEL_ID = \"apwCommentModelDefinition\";\n\nexport const createCommentModelDefinition = ({\n modelId\n}: CreateCommentModelDefinitionParams): WorkflowModelDefinition => {\n return {\n name: \"APW - Comment\",\n modelId: COMMENT_MODEL_ID,\n titleFieldId: \"step\",\n layout: [[\"comment_body\"], [\"comment_changeRequest\"], [\"comment_step\"], [\"comment_media\"]],\n fields: [commentBody(), changeRequestRef(modelId), stepField(), mediaField()],\n description: \"\",\n isPrivate: true\n };\n};\n"],"mappings":";;;;;;;AAAA;;AAGA,MAAMA,WAAW,GAAG,MAChB,IAAAC,uBAAA,EAAiB;EACbC,KAAK,EAAE,MADM;EAEbC,IAAI,EAAE,WAFO;EAGbC,MAAM,EAAE;AAHK,CAAjB,CADJ;;AAOA,MAAMC,gBAAgB,GAAIC,OAAD,IACrB,IAAAL,uBAAA,EAAiB;EACbC,KAAK,EAAE,gBADM;EAEbC,IAAI,EAAE,KAFO;EAGbC,MAAM,EAAE,SAHK;EAIbG,QAAQ,EAAE;IACNC,MAAM,EAAE,CACJ;MACIF;IADJ,CADI;EADF;AAJG,CAAjB,CADJ;;AAcA,MAAMG,SAAS,GAAG,MACd,IAAAR,uBAAA,EAAiB;EACbC,KAAK,EAAE,MADM;EAEbC,IAAI,EAAE,MAFO;EAGbC,MAAM,EAAE,SAHK;EAIbM,UAAU,EAAE,CACR;IACIC,OAAO,EAAE,4CADb;IAEIC,IAAI,EAAE;EAFV,CADQ;AAJC,CAAjB,CADJ;;AAaA,MAAMC,UAAU,GAAG,MACf,IAAAZ,uBAAA,EAAiB;EACbC,KAAK,EAAE,OADM;EAEbC,IAAI,EAAE,MAFO;EAGbC,MAAM,EAAE;AAHK,CAAjB,CADJ;;AAWO,MAAMU,gBAAgB,GAAG,2BAAzB;;;AAEA,MAAMC,4BAA4B,GAAG,CAAC;EACzCT;AADyC,CAAD,KAEuB;EAC/D,OAAO;IACHM,IAAI,EAAE,eADH;IAEHN,OAAO,EAAEQ,gBAFN;IAGHE,YAAY,EAAE,MAHX;IAIHC,MAAM,EAAE,CAAC,CAAC,cAAD,CAAD,EAAmB,CAAC,uBAAD,CAAnB,EAA8C,CAAC,cAAD,CAA9C,EAAgE,CAAC,eAAD,CAAhE,CAJL;IAKHC,MAAM,EAAE,CAAClB,WAAW,EAAZ,EAAgBK,gBAAgB,CAACC,OAAD,CAAhC,EAA2CG,SAAS,EAApD,EAAwDI,UAAU,EAAlE,CALL;IAMHM,WAAW,EAAE,EANV;IAOHC,SAAS,EAAE;EAPR,CAAP;AASH,CAZM"}
1
+ {"version":3,"names":["_apiHeadlessCms","require","_utils","commentBody","createModelField","label","type","parent","changeRequestRef","modelId","settings","models","stepField","validation","message","name","mediaField","COMMENT_MODEL_ID","exports","createCommentModelDefinition","createPrivateModelDefinition","titleFieldId","fields"],"sources":["comment.model.ts"],"sourcesContent":["import { createPrivateModelDefinition } from \"@webiny/api-headless-cms\";\nimport { createModelField } from \"./utils\";\n\nconst commentBody = () =>\n createModelField({\n label: \"Body\",\n type: \"rich-text\",\n parent: \"comment\"\n });\n\nconst changeRequestRef = (modelId: string) =>\n createModelField({\n label: \"Change Request\",\n type: \"ref\",\n parent: \"comment\",\n settings: {\n models: [\n {\n modelId\n }\n ]\n }\n });\n\nconst stepField = () =>\n createModelField({\n label: \"Step\",\n type: \"text\",\n parent: \"comment\",\n validation: [\n {\n message: \"`step` field value is required in comment.\",\n name: \"required\"\n }\n ]\n });\n\nconst mediaField = () =>\n createModelField({\n label: \"Media\",\n type: \"file\",\n parent: \"comment\"\n });\n\ninterface CreateCommentModelDefinitionParams {\n modelId: string;\n}\n\nexport const COMMENT_MODEL_ID = \"apwCommentModelDefinition\";\n\nexport const createCommentModelDefinition = ({ modelId }: CreateCommentModelDefinitionParams) => {\n return createPrivateModelDefinition({\n name: \"APW - Comment\",\n modelId: COMMENT_MODEL_ID,\n titleFieldId: \"step\",\n fields: [commentBody(), changeRequestRef(modelId), stepField(), mediaField()]\n });\n};\n"],"mappings":";;;;;;AAAA,IAAAA,eAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAEA,MAAME,WAAW,GAAGA,CAAA,KAChB,IAAAC,uBAAgB,EAAC;EACbC,KAAK,EAAE,MAAM;EACbC,IAAI,EAAE,WAAW;EACjBC,MAAM,EAAE;AACZ,CAAC,CAAC;AAEN,MAAMC,gBAAgB,GAAIC,OAAe,IACrC,IAAAL,uBAAgB,EAAC;EACbC,KAAK,EAAE,gBAAgB;EACvBC,IAAI,EAAE,KAAK;EACXC,MAAM,EAAE,SAAS;EACjBG,QAAQ,EAAE;IACNC,MAAM,EAAE,CACJ;MACIF;IACJ,CAAC;EAET;AACJ,CAAC,CAAC;AAEN,MAAMG,SAAS,GAAGA,CAAA,KACd,IAAAR,uBAAgB,EAAC;EACbC,KAAK,EAAE,MAAM;EACbC,IAAI,EAAE,MAAM;EACZC,MAAM,EAAE,SAAS;EACjBM,UAAU,EAAE,CACR;IACIC,OAAO,EAAE,4CAA4C;IACrDC,IAAI,EAAE;EACV,CAAC;AAET,CAAC,CAAC;AAEN,MAAMC,UAAU,GAAGA,CAAA,KACf,IAAAZ,uBAAgB,EAAC;EACbC,KAAK,EAAE,OAAO;EACdC,IAAI,EAAE,MAAM;EACZC,MAAM,EAAE;AACZ,CAAC,CAAC;AAMC,MAAMU,gBAAgB,GAAG,2BAA2B;AAACC,OAAA,CAAAD,gBAAA,GAAAA,gBAAA;AAErD,MAAME,4BAA4B,GAAGA,CAAC;EAAEV;AAA4C,CAAC,KAAK;EAC7F,OAAO,IAAAW,4CAA4B,EAAC;IAChCL,IAAI,EAAE,eAAe;IACrBN,OAAO,EAAEQ,gBAAgB;IACzBI,YAAY,EAAE,MAAM;IACpBC,MAAM,EAAE,CAACnB,WAAW,CAAC,CAAC,EAAEK,gBAAgB,CAACC,OAAO,CAAC,EAAEG,SAAS,CAAC,CAAC,EAAEI,UAAU,CAAC,CAAC;EAChF,CAAC,CAAC;AACN,CAAC;AAACE,OAAA,CAAAC,4BAAA,GAAAA,4BAAA"}
@@ -1,7 +1,6 @@
1
- import { WorkflowModelDefinition } from "../../types";
2
1
  interface CreateContentReviewModelDefinitionParams {
3
2
  reviewerModelId: string;
4
3
  }
5
4
  export declare const CONTENT_REVIEW_MODEL_ID = "apwContentReviewModelDefinition";
6
- export declare const createContentReviewModelDefinition: ({ reviewerModelId }: CreateContentReviewModelDefinitionParams) => WorkflowModelDefinition;
5
+ export declare const createContentReviewModelDefinition: ({ reviewerModelId }: CreateContentReviewModelDefinitionParams) => import("@webiny/api-headless-cms").CmsPrivateModelFull;
7
6
  export {};