@webiny/app-scheduler 0.0.0-unstable.7be00a75a9

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 (429) hide show
  1. package/Domain/Models/SchedulerItem/SchedulerItem.d.ts +13 -0
  2. package/Domain/Models/SchedulerItem/SchedulerItem.js +18 -0
  3. package/Domain/Models/SchedulerItem/SchedulerItem.js.map +1 -0
  4. package/Domain/Models/SchedulerItem/index.d.ts +1 -0
  5. package/Domain/Models/SchedulerItem/index.js +1 -0
  6. package/Domain/Models/index.d.ts +1 -0
  7. package/Domain/Models/index.js +1 -0
  8. package/Domain/Repositories/SchedulerItems/ISchedulerItemsRepository.d.ts +14 -0
  9. package/Domain/Repositories/SchedulerItems/ISchedulerItemsRepository.js +0 -0
  10. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepository.d.ts +36 -0
  11. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepository.js +119 -0
  12. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepository.js.map +1 -0
  13. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryFactory.d.ts +19 -0
  14. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryFactory.js +18 -0
  15. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryFactory.js.map +1 -0
  16. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryWithLoading.d.ts +17 -0
  17. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryWithLoading.js +39 -0
  18. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryWithLoading.js.map +1 -0
  19. package/Domain/Repositories/SchedulerItems/index.d.ts +4 -0
  20. package/Domain/Repositories/SchedulerItems/index.js +3 -0
  21. package/Domain/Repositories/Search/ISearchRepository.d.ts +4 -0
  22. package/Domain/Repositories/Search/ISearchRepository.js +0 -0
  23. package/Domain/Repositories/Search/SearchRepository.d.ts +7 -0
  24. package/Domain/Repositories/Search/SearchRepository.js +16 -0
  25. package/Domain/Repositories/Search/SearchRepository.js.map +1 -0
  26. package/Domain/Repositories/Search/SearchRepositoryFactory.d.ts +7 -0
  27. package/Domain/Repositories/Search/SearchRepositoryFactory.js +18 -0
  28. package/Domain/Repositories/Search/SearchRepositoryFactory.js.map +1 -0
  29. package/Domain/Repositories/Search/index.d.ts +3 -0
  30. package/Domain/Repositories/Search/index.js +2 -0
  31. package/Domain/Repositories/SelectedItems/ISelectedItemsRepository.d.ts +8 -0
  32. package/Domain/Repositories/SelectedItems/ISelectedItemsRepository.js +0 -0
  33. package/Domain/Repositories/SelectedItems/SelectedItemsRepository.d.ts +12 -0
  34. package/Domain/Repositories/SelectedItems/SelectedItemsRepository.js +28 -0
  35. package/Domain/Repositories/SelectedItems/SelectedItemsRepository.js.map +1 -0
  36. package/Domain/Repositories/SelectedItems/SelectedItemsRepositoryFactory.d.ts +7 -0
  37. package/Domain/Repositories/SelectedItems/SelectedItemsRepositoryFactory.js +18 -0
  38. package/Domain/Repositories/SelectedItems/SelectedItemsRepositoryFactory.js.map +1 -0
  39. package/Domain/Repositories/SelectedItems/index.d.ts +3 -0
  40. package/Domain/Repositories/SelectedItems/index.js +2 -0
  41. package/Domain/Repositories/Sorting/SortingRepositoryWithDefaults.d.ts +8 -0
  42. package/Domain/Repositories/Sorting/SortingRepositoryWithDefaults.js +21 -0
  43. package/Domain/Repositories/Sorting/SortingRepositoryWithDefaults.js.map +1 -0
  44. package/Domain/Repositories/Sorting/index.d.ts +1 -0
  45. package/Domain/Repositories/Sorting/index.js +1 -0
  46. package/Domain/Repositories/index.d.ts +4 -0
  47. package/Domain/Repositories/index.js +4 -0
  48. package/Domain/index.d.ts +2 -0
  49. package/Domain/index.js +2 -0
  50. package/Gateways/SchedulerCancelGraphQLGateway.d.ts +7 -0
  51. package/Gateways/SchedulerCancelGraphQLGateway.js +42 -0
  52. package/Gateways/SchedulerCancelGraphQLGateway.js.map +1 -0
  53. package/Gateways/SchedulerGetGraphQLGateway.d.ts +21 -0
  54. package/Gateways/SchedulerGetGraphQLGateway.js +68 -0
  55. package/Gateways/SchedulerGetGraphQLGateway.js.map +1 -0
  56. package/Gateways/SchedulerListGraphQLGateway.d.ts +7 -0
  57. package/Gateways/SchedulerListGraphQLGateway.js +86 -0
  58. package/Gateways/SchedulerListGraphQLGateway.js.map +1 -0
  59. package/Gateways/SchedulerPublishGraphQLGateway.d.ts +7 -0
  60. package/Gateways/SchedulerPublishGraphQLGateway.js +59 -0
  61. package/Gateways/SchedulerPublishGraphQLGateway.js.map +1 -0
  62. package/Gateways/SchedulerUnpublishGraphQLGateway.d.ts +23 -0
  63. package/Gateways/SchedulerUnpublishGraphQLGateway.js +63 -0
  64. package/Gateways/SchedulerUnpublishGraphQLGateway.js.map +1 -0
  65. package/Gateways/abstractions/CancelScheduledActionGateway.d.ts +7 -0
  66. package/Gateways/abstractions/CancelScheduledActionGateway.js +0 -0
  67. package/Gateways/abstractions/GetScheduledActionGateway.d.ts +9 -0
  68. package/Gateways/abstractions/GetScheduledActionGateway.js +0 -0
  69. package/Gateways/abstractions/ListScheduledActionsGateway.d.ts +27 -0
  70. package/Gateways/abstractions/ListScheduledActionsGateway.js +0 -0
  71. package/Gateways/abstractions/SchedulePublishActionGateway.d.ts +12 -0
  72. package/Gateways/abstractions/SchedulePublishActionGateway.js +0 -0
  73. package/Gateways/abstractions/ScheduleUnpublishActionGateway.d.ts +12 -0
  74. package/Gateways/abstractions/ScheduleUnpublishActionGateway.js +0 -0
  75. package/Gateways/graphql/fields.d.ts +1 -0
  76. package/Gateways/graphql/fields.js +17 -0
  77. package/Gateways/graphql/fields.js.map +1 -0
  78. package/Gateways/index.d.ts +5 -0
  79. package/Gateways/index.js +0 -0
  80. package/Gateways/schema/schedulerEntry.d.ts +16 -0
  81. package/Gateways/schema/schedulerEntry.js +19 -0
  82. package/Gateways/schema/schedulerEntry.js.map +1 -0
  83. package/LICENSE +21 -0
  84. package/Presentation/Scheduler/Scheduler.d.ts +17 -0
  85. package/Presentation/Scheduler/Scheduler.js +78 -0
  86. package/Presentation/Scheduler/Scheduler.js.map +1 -0
  87. package/Presentation/Scheduler/SchedulerControllers.d.ts +30 -0
  88. package/Presentation/Scheduler/SchedulerControllers.js +54 -0
  89. package/Presentation/Scheduler/SchedulerControllers.js.map +1 -0
  90. package/Presentation/Scheduler/SchedulerPresenter.d.ts +32 -0
  91. package/Presentation/Scheduler/SchedulerPresenter.js +45 -0
  92. package/Presentation/Scheduler/SchedulerPresenter.js.map +1 -0
  93. package/Presentation/Scheduler/controllers/CancelItem/CancelItemController.d.ts +7 -0
  94. package/Presentation/Scheduler/controllers/CancelItem/CancelItemController.js +12 -0
  95. package/Presentation/Scheduler/controllers/CancelItem/CancelItemController.js.map +1 -0
  96. package/Presentation/Scheduler/controllers/CancelItem/ICancelItemController.d.ts +3 -0
  97. package/Presentation/Scheduler/controllers/CancelItem/ICancelItemController.js +0 -0
  98. package/Presentation/Scheduler/controllers/CancelItem/index.d.ts +2 -0
  99. package/Presentation/Scheduler/controllers/CancelItem/index.js +1 -0
  100. package/Presentation/Scheduler/controllers/GetItem/GetItemController.d.ts +8 -0
  101. package/Presentation/Scheduler/controllers/GetItem/GetItemController.js +12 -0
  102. package/Presentation/Scheduler/controllers/GetItem/GetItemController.js.map +1 -0
  103. package/Presentation/Scheduler/controllers/GetItem/IGetItemController.d.ts +4 -0
  104. package/Presentation/Scheduler/controllers/GetItem/IGetItemController.js +0 -0
  105. package/Presentation/Scheduler/controllers/GetItem/index.d.ts +2 -0
  106. package/Presentation/Scheduler/controllers/GetItem/index.js +1 -0
  107. package/Presentation/Scheduler/controllers/ListItems/IListItemsController.d.ts +4 -0
  108. package/Presentation/Scheduler/controllers/ListItems/IListItemsController.js +0 -0
  109. package/Presentation/Scheduler/controllers/ListItems/ListItemsController.d.ts +8 -0
  110. package/Presentation/Scheduler/controllers/ListItems/ListItemsController.js +12 -0
  111. package/Presentation/Scheduler/controllers/ListItems/ListItemsController.js.map +1 -0
  112. package/Presentation/Scheduler/controllers/ListItems/index.d.ts +2 -0
  113. package/Presentation/Scheduler/controllers/ListItems/index.js +1 -0
  114. package/Presentation/Scheduler/controllers/ListMoreItems/IListMoreItemsController.d.ts +3 -0
  115. package/Presentation/Scheduler/controllers/ListMoreItems/IListMoreItemsController.js +0 -0
  116. package/Presentation/Scheduler/controllers/ListMoreItems/ListMoreItemsController.d.ts +7 -0
  117. package/Presentation/Scheduler/controllers/ListMoreItems/ListMoreItemsController.js +12 -0
  118. package/Presentation/Scheduler/controllers/ListMoreItems/ListMoreItemsController.js.map +1 -0
  119. package/Presentation/Scheduler/controllers/ListMoreItems/index.d.ts +2 -0
  120. package/Presentation/Scheduler/controllers/ListMoreItems/index.js +1 -0
  121. package/Presentation/Scheduler/controllers/PublishItem/IPublishItemController.d.ts +3 -0
  122. package/Presentation/Scheduler/controllers/PublishItem/IPublishItemController.js +0 -0
  123. package/Presentation/Scheduler/controllers/PublishItem/PublishItemController.d.ts +7 -0
  124. package/Presentation/Scheduler/controllers/PublishItem/PublishItemController.js +12 -0
  125. package/Presentation/Scheduler/controllers/PublishItem/PublishItemController.js.map +1 -0
  126. package/Presentation/Scheduler/controllers/PublishItem/index.d.ts +2 -0
  127. package/Presentation/Scheduler/controllers/PublishItem/index.js +1 -0
  128. package/Presentation/Scheduler/controllers/SearchItems/ISearchItemsController.d.ts +3 -0
  129. package/Presentation/Scheduler/controllers/SearchItems/ISearchItemsController.js +0 -0
  130. package/Presentation/Scheduler/controllers/SearchItems/SearchItemsController.d.ts +8 -0
  131. package/Presentation/Scheduler/controllers/SearchItems/SearchItemsController.js +15 -0
  132. package/Presentation/Scheduler/controllers/SearchItems/SearchItemsController.js.map +1 -0
  133. package/Presentation/Scheduler/controllers/SearchItems/index.d.ts +2 -0
  134. package/Presentation/Scheduler/controllers/SearchItems/index.js +1 -0
  135. package/Presentation/Scheduler/controllers/SelectAllItems/ISelectAllItemsController.d.ts +3 -0
  136. package/Presentation/Scheduler/controllers/SelectAllItems/ISelectAllItemsController.js +0 -0
  137. package/Presentation/Scheduler/controllers/SelectAllItems/SelectAllItemsController.d.ts +7 -0
  138. package/Presentation/Scheduler/controllers/SelectAllItems/SelectAllItemsController.js +12 -0
  139. package/Presentation/Scheduler/controllers/SelectAllItems/SelectAllItemsController.js.map +1 -0
  140. package/Presentation/Scheduler/controllers/SelectAllItems/index.d.ts +2 -0
  141. package/Presentation/Scheduler/controllers/SelectAllItems/index.js +1 -0
  142. package/Presentation/Scheduler/controllers/SelectItems/ISelectItemsController.d.ts +4 -0
  143. package/Presentation/Scheduler/controllers/SelectItems/ISelectItemsController.js +0 -0
  144. package/Presentation/Scheduler/controllers/SelectItems/SelectItemsController.d.ts +8 -0
  145. package/Presentation/Scheduler/controllers/SelectItems/SelectItemsController.js +14 -0
  146. package/Presentation/Scheduler/controllers/SelectItems/SelectItemsController.js.map +1 -0
  147. package/Presentation/Scheduler/controllers/SelectItems/index.d.ts +2 -0
  148. package/Presentation/Scheduler/controllers/SelectItems/index.js +1 -0
  149. package/Presentation/Scheduler/controllers/SortItems/ISortItemsController.d.ts +4 -0
  150. package/Presentation/Scheduler/controllers/SortItems/ISortItemsController.js +0 -0
  151. package/Presentation/Scheduler/controllers/SortItems/SortItemsController.d.ts +9 -0
  152. package/Presentation/Scheduler/controllers/SortItems/SortItemsController.js +18 -0
  153. package/Presentation/Scheduler/controllers/SortItems/SortItemsController.js.map +1 -0
  154. package/Presentation/Scheduler/controllers/SortItems/index.d.ts +2 -0
  155. package/Presentation/Scheduler/controllers/SortItems/index.js +1 -0
  156. package/Presentation/Scheduler/controllers/UnpublishItem/IUnpublishItemController.d.ts +3 -0
  157. package/Presentation/Scheduler/controllers/UnpublishItem/IUnpublishItemController.js +0 -0
  158. package/Presentation/Scheduler/controllers/UnpublishItem/UnpublishItemController.d.ts +7 -0
  159. package/Presentation/Scheduler/controllers/UnpublishItem/UnpublishItemController.js +12 -0
  160. package/Presentation/Scheduler/controllers/UnpublishItem/UnpublishItemController.js.map +1 -0
  161. package/Presentation/Scheduler/controllers/UnpublishItem/index.d.ts +2 -0
  162. package/Presentation/Scheduler/controllers/UnpublishItem/index.js +1 -0
  163. package/Presentation/Scheduler/controllers/UnselectAllItems/IUnselectAllItemsController.d.ts +3 -0
  164. package/Presentation/Scheduler/controllers/UnselectAllItems/IUnselectAllItemsController.js +0 -0
  165. package/Presentation/Scheduler/controllers/UnselectAllItems/UnselectAllItemsController.d.ts +7 -0
  166. package/Presentation/Scheduler/controllers/UnselectAllItems/UnselectAllItemsController.js +12 -0
  167. package/Presentation/Scheduler/controllers/UnselectAllItems/UnselectAllItemsController.js.map +1 -0
  168. package/Presentation/Scheduler/controllers/UnselectAllItems/index.d.ts +2 -0
  169. package/Presentation/Scheduler/controllers/UnselectAllItems/index.js +1 -0
  170. package/Presentation/Scheduler/controllers/index.d.ts +11 -0
  171. package/Presentation/Scheduler/controllers/index.js +11 -0
  172. package/Presentation/Scheduler/index.d.ts +1 -0
  173. package/Presentation/Scheduler/index.js +1 -0
  174. package/Presentation/SchedulerConfigs/SchedulerConfigs.d.ts +2 -0
  175. package/Presentation/SchedulerConfigs/SchedulerConfigs.js +52 -0
  176. package/Presentation/SchedulerConfigs/SchedulerConfigs.js.map +1 -0
  177. package/Presentation/SchedulerConfigs/index.d.ts +1 -0
  178. package/Presentation/SchedulerConfigs/index.js +1 -0
  179. package/Presentation/SchedulerRenderer/SchedulerRenderer.d.ts +6 -0
  180. package/Presentation/SchedulerRenderer/SchedulerRenderer.js +16 -0
  181. package/Presentation/SchedulerRenderer/SchedulerRenderer.js.map +1 -0
  182. package/Presentation/SchedulerRenderer/index.d.ts +1 -0
  183. package/Presentation/SchedulerRenderer/index.js +1 -0
  184. package/Presentation/abstractions/ISchedulerControllers.d.ts +14 -0
  185. package/Presentation/abstractions/ISchedulerControllers.js +0 -0
  186. package/Presentation/abstractions/ISchedulerPresenter.d.ts +20 -0
  187. package/Presentation/abstractions/ISchedulerPresenter.js +0 -0
  188. package/Presentation/abstractions/index.d.ts +2 -0
  189. package/Presentation/abstractions/index.js +0 -0
  190. package/Presentation/components/Actions/CancelItem/CancelItem.d.ts +2 -0
  191. package/Presentation/components/Actions/CancelItem/CancelItem.js +19 -0
  192. package/Presentation/components/Actions/CancelItem/CancelItem.js.map +1 -0
  193. package/Presentation/components/Actions/CancelItem/index.d.ts +1 -0
  194. package/Presentation/components/Actions/CancelItem/index.js +1 -0
  195. package/Presentation/components/Actions/index.d.ts +1 -0
  196. package/Presentation/components/Actions/index.js +1 -0
  197. package/Presentation/components/BottomInfoBar/BottomInfoBar.d.ts +2 -0
  198. package/Presentation/components/BottomInfoBar/BottomInfoBar.js +19 -0
  199. package/Presentation/components/BottomInfoBar/BottomInfoBar.js.map +1 -0
  200. package/Presentation/components/BottomInfoBar/BottomInfoBar.styled.d.ts +20 -0
  201. package/Presentation/components/BottomInfoBar/BottomInfoBar.styled.js +43 -0
  202. package/Presentation/components/BottomInfoBar/BottomInfoBar.styled.js.map +1 -0
  203. package/Presentation/components/BottomInfoBar/ListMeta.d.ts +7 -0
  204. package/Presentation/components/BottomInfoBar/ListMeta.js +9 -0
  205. package/Presentation/components/BottomInfoBar/ListMeta.js.map +1 -0
  206. package/Presentation/components/BottomInfoBar/ListStatus.d.ts +5 -0
  207. package/Presentation/components/BottomInfoBar/ListStatus.js +12 -0
  208. package/Presentation/components/BottomInfoBar/ListStatus.js.map +1 -0
  209. package/Presentation/components/BottomInfoBar/index.d.ts +1 -0
  210. package/Presentation/components/BottomInfoBar/index.js +1 -0
  211. package/Presentation/components/Cells/CellActions/CellActions.d.ts +2 -0
  212. package/Presentation/components/Cells/CellActions/CellActions.js +18 -0
  213. package/Presentation/components/Cells/CellActions/CellActions.js.map +1 -0
  214. package/Presentation/components/Cells/CellActions/index.d.ts +1 -0
  215. package/Presentation/components/Cells/CellActions/index.js +1 -0
  216. package/Presentation/components/Cells/CellRevision/CellRevision.d.ts +2 -0
  217. package/Presentation/components/Cells/CellRevision/CellRevision.js +15 -0
  218. package/Presentation/components/Cells/CellRevision/CellRevision.js.map +1 -0
  219. package/Presentation/components/Cells/CellRevision/CellRevision.styled.d.ts +11 -0
  220. package/Presentation/components/Cells/CellRevision/CellRevision.styled.js +18 -0
  221. package/Presentation/components/Cells/CellRevision/CellRevision.styled.js.map +1 -0
  222. package/Presentation/components/Cells/CellRevision/index.d.ts +1 -0
  223. package/Presentation/components/Cells/CellRevision/index.js +1 -0
  224. package/Presentation/components/Cells/CellScheduledBy/CellScheduledBy.d.ts +2 -0
  225. package/Presentation/components/Cells/CellScheduledBy/CellScheduledBy.js +10 -0
  226. package/Presentation/components/Cells/CellScheduledBy/CellScheduledBy.js.map +1 -0
  227. package/Presentation/components/Cells/CellScheduledBy/index.d.ts +1 -0
  228. package/Presentation/components/Cells/CellScheduledBy/index.js +1 -0
  229. package/Presentation/components/Cells/CellScheduledOn/CellScheduledOn.d.ts +24 -0
  230. package/Presentation/components/Cells/CellScheduledOn/CellScheduledOn.js +17 -0
  231. package/Presentation/components/Cells/CellScheduledOn/CellScheduledOn.js.map +1 -0
  232. package/Presentation/components/Cells/CellScheduledOn/index.d.ts +1 -0
  233. package/Presentation/components/Cells/CellScheduledOn/index.js +1 -0
  234. package/Presentation/components/Cells/CellTitle/CellTitle.d.ts +2 -0
  235. package/Presentation/components/Cells/CellTitle/CellTitle.js +14 -0
  236. package/Presentation/components/Cells/CellTitle/CellTitle.js.map +1 -0
  237. package/Presentation/components/Cells/CellTitle/CellTitle.styled.d.ts +11 -0
  238. package/Presentation/components/Cells/CellTitle/CellTitle.styled.js +18 -0
  239. package/Presentation/components/Cells/CellTitle/CellTitle.styled.js.map +1 -0
  240. package/Presentation/components/Cells/CellTitle/index.d.ts +1 -0
  241. package/Presentation/components/Cells/CellTitle/index.js +1 -0
  242. package/Presentation/components/Cells/CellType/CellActionType.d.ts +2 -0
  243. package/Presentation/components/Cells/CellType/CellActionType.js +15 -0
  244. package/Presentation/components/Cells/CellType/CellActionType.js.map +1 -0
  245. package/Presentation/components/Cells/CellType/CellActionType.styled.d.ts +11 -0
  246. package/Presentation/components/Cells/CellType/CellActionType.styled.js +18 -0
  247. package/Presentation/components/Cells/CellType/CellActionType.styled.js.map +1 -0
  248. package/Presentation/components/Cells/CellType/index.d.ts +1 -0
  249. package/Presentation/components/Cells/CellType/index.js +1 -0
  250. package/Presentation/components/Cells/index.d.ts +6 -0
  251. package/Presentation/components/Cells/index.js +6 -0
  252. package/Presentation/components/Empty/Empty.d.ts +2 -0
  253. package/Presentation/components/Empty/Empty.js +21 -0
  254. package/Presentation/components/Empty/Empty.js.map +1 -0
  255. package/Presentation/components/Empty/Empty.styled.d.ts +8 -0
  256. package/Presentation/components/Empty/Empty.styled.js +16 -0
  257. package/Presentation/components/Empty/Empty.styled.js.map +1 -0
  258. package/Presentation/components/Empty/index.d.ts +1 -0
  259. package/Presentation/components/Empty/index.js +1 -0
  260. package/Presentation/components/ScheduleDialog/IScheduleDialogPresenter.d.ts +26 -0
  261. package/Presentation/components/ScheduleDialog/IScheduleDialogPresenter.js +0 -0
  262. package/Presentation/components/ScheduleDialog/ScheduleDialogPresenter.d.ts +22 -0
  263. package/Presentation/components/ScheduleDialog/ScheduleDialogPresenter.js +86 -0
  264. package/Presentation/components/ScheduleDialog/ScheduleDialogPresenter.js.map +1 -0
  265. package/Presentation/components/ScheduleDialog/index.d.ts +1 -0
  266. package/Presentation/components/ScheduleDialog/index.js +1 -0
  267. package/Presentation/components/ScheduleDialog/types.d.ts +15 -0
  268. package/Presentation/components/ScheduleDialog/types.js +0 -0
  269. package/Presentation/components/ScheduleDialog/useScheduleDialog.d.ts +41 -0
  270. package/Presentation/components/ScheduleDialog/useScheduleDialog.js +192 -0
  271. package/Presentation/components/ScheduleDialog/useScheduleDialog.js.map +1 -0
  272. package/Presentation/components/SchedulerOverlay/SchedulerOverlay.d.ts +7 -0
  273. package/Presentation/components/SchedulerOverlay/SchedulerOverlay.js +30 -0
  274. package/Presentation/components/SchedulerOverlay/SchedulerOverlay.js.map +1 -0
  275. package/Presentation/components/SchedulerOverlay/index.d.ts +1 -0
  276. package/Presentation/components/SchedulerOverlay/index.js +1 -0
  277. package/Presentation/components/SearchInput/SearchInput.d.ts +2 -0
  278. package/Presentation/components/SearchInput/SearchInput.js +30 -0
  279. package/Presentation/components/SearchInput/SearchInput.js.map +1 -0
  280. package/Presentation/components/SearchInput/index.d.ts +1 -0
  281. package/Presentation/components/SearchInput/index.js +1 -0
  282. package/Presentation/components/Table/Table.d.ts +2 -0
  283. package/Presentation/components/Table/Table.js +29 -0
  284. package/Presentation/components/Table/Table.js.map +1 -0
  285. package/Presentation/components/Table/index.d.ts +1 -0
  286. package/Presentation/components/Table/index.js +1 -0
  287. package/Presentation/components/Title/Title.d.ts +5 -0
  288. package/Presentation/components/Title/Title.js +10 -0
  289. package/Presentation/components/Title/Title.js.map +1 -0
  290. package/Presentation/components/Title/Title.styled.d.ts +3 -0
  291. package/Presentation/components/Title/Title.styled.js +13 -0
  292. package/Presentation/components/Title/Title.styled.js.map +1 -0
  293. package/Presentation/components/Title/index.d.ts +1 -0
  294. package/Presentation/components/Title/index.js +1 -0
  295. package/Presentation/configs/index.d.ts +1 -0
  296. package/Presentation/configs/index.js +1 -0
  297. package/Presentation/configs/list/Browser/EntryAction.d.ts +7 -0
  298. package/Presentation/configs/list/Browser/EntryAction.js +13 -0
  299. package/Presentation/configs/list/Browser/EntryAction.js.map +1 -0
  300. package/Presentation/configs/list/Browser/Table/Column.d.ts +14 -0
  301. package/Presentation/configs/list/Browser/Table/Column.js +11 -0
  302. package/Presentation/configs/list/Browser/Table/Column.js.map +1 -0
  303. package/Presentation/configs/list/Browser/Table/Sorting.d.ts +5 -0
  304. package/Presentation/configs/list/Browser/Table/Sorting.js +7 -0
  305. package/Presentation/configs/list/Browser/Table/Sorting.js.map +1 -0
  306. package/Presentation/configs/list/Browser/Table/index.d.ts +18 -0
  307. package/Presentation/configs/list/Browser/Table/index.js +9 -0
  308. package/Presentation/configs/list/Browser/Table/index.js.map +1 -0
  309. package/Presentation/configs/list/Browser/index.d.ts +23 -0
  310. package/Presentation/configs/list/Browser/index.js +9 -0
  311. package/Presentation/configs/list/Browser/index.js.map +1 -0
  312. package/Presentation/configs/list/SchedulerListConfig.d.ts +33 -0
  313. package/Presentation/configs/list/SchedulerListConfig.js +30 -0
  314. package/Presentation/configs/list/SchedulerListConfig.js.map +1 -0
  315. package/Presentation/configs/list/index.d.ts +1 -0
  316. package/Presentation/configs/list/index.js +1 -0
  317. package/Presentation/hooks/index.d.ts +3 -0
  318. package/Presentation/hooks/index.js +3 -0
  319. package/Presentation/hooks/useCancelSchedulerItem.d.ts +8 -0
  320. package/Presentation/hooks/useCancelSchedulerItem.js +27 -0
  321. package/Presentation/hooks/useCancelSchedulerItem.js.map +1 -0
  322. package/Presentation/hooks/useScheduler.d.ts +28 -0
  323. package/Presentation/hooks/useScheduler.js +68 -0
  324. package/Presentation/hooks/useScheduler.js.map +1 -0
  325. package/Presentation/hooks/useSchedulerItem.d.ts +11 -0
  326. package/Presentation/hooks/useSchedulerItem.js +7 -0
  327. package/Presentation/hooks/useSchedulerItem.js.map +1 -0
  328. package/Presentation/index.d.ts +25 -0
  329. package/Presentation/index.js +49 -0
  330. package/Presentation/index.js.map +1 -0
  331. package/README.md +11 -0
  332. package/UseCases/CancelItem/CancelItemUseCase.d.ts +7 -0
  333. package/UseCases/CancelItem/CancelItemUseCase.js +13 -0
  334. package/UseCases/CancelItem/CancelItemUseCase.js.map +1 -0
  335. package/UseCases/CancelItem/ICancelItemUseCase.d.ts +3 -0
  336. package/UseCases/CancelItem/ICancelItemUseCase.js +0 -0
  337. package/UseCases/CancelItem/index.d.ts +2 -0
  338. package/UseCases/CancelItem/index.js +1 -0
  339. package/UseCases/GetItem/GetItemUseCase.d.ts +8 -0
  340. package/UseCases/GetItem/GetItemUseCase.js +13 -0
  341. package/UseCases/GetItem/GetItemUseCase.js.map +1 -0
  342. package/UseCases/GetItem/IGetItemUseCase.d.ts +4 -0
  343. package/UseCases/GetItem/IGetItemUseCase.js +0 -0
  344. package/UseCases/GetItem/index.d.ts +2 -0
  345. package/UseCases/GetItem/index.js +1 -0
  346. package/UseCases/GetScheduledItem/GetScheduledItemUseCase.d.ts +7 -0
  347. package/UseCases/GetScheduledItem/GetScheduledItemUseCase.js +14 -0
  348. package/UseCases/GetScheduledItem/GetScheduledItemUseCase.js.map +1 -0
  349. package/UseCases/GetScheduledItem/IGetScheduledItemUseCase.d.ts +4 -0
  350. package/UseCases/GetScheduledItem/IGetScheduledItemUseCase.js +0 -0
  351. package/UseCases/GetScheduledItem/index.d.ts +2 -0
  352. package/UseCases/GetScheduledItem/index.js +1 -0
  353. package/UseCases/ListItems/IListItemsUseCase.d.ts +4 -0
  354. package/UseCases/ListItems/IListItemsUseCase.js +0 -0
  355. package/UseCases/ListItems/ListItemsUseCase.d.ts +8 -0
  356. package/UseCases/ListItems/ListItemsUseCase.js +13 -0
  357. package/UseCases/ListItems/ListItemsUseCase.js.map +1 -0
  358. package/UseCases/ListItems/ListItemsUseCaseWithSearch.d.ts +9 -0
  359. package/UseCases/ListItems/ListItemsUseCaseWithSearch.js +23 -0
  360. package/UseCases/ListItems/ListItemsUseCaseWithSearch.js.map +1 -0
  361. package/UseCases/ListItems/ListItemsUseCaseWithSorting.d.ts +9 -0
  362. package/UseCases/ListItems/ListItemsUseCaseWithSorting.js +21 -0
  363. package/UseCases/ListItems/ListItemsUseCaseWithSorting.js.map +1 -0
  364. package/UseCases/ListItems/index.d.ts +4 -0
  365. package/UseCases/ListItems/index.js +3 -0
  366. package/UseCases/ListMoreItems/IListMoreItemsUseCase.d.ts +3 -0
  367. package/UseCases/ListMoreItems/IListMoreItemsUseCase.js +0 -0
  368. package/UseCases/ListMoreItems/ListMoreItemsUseCase.d.ts +7 -0
  369. package/UseCases/ListMoreItems/ListMoreItemsUseCase.js +13 -0
  370. package/UseCases/ListMoreItems/ListMoreItemsUseCase.js.map +1 -0
  371. package/UseCases/ListMoreItems/index.d.ts +2 -0
  372. package/UseCases/ListMoreItems/index.js +1 -0
  373. package/UseCases/PublishItem/IPublishItemUseCase.d.ts +3 -0
  374. package/UseCases/PublishItem/IPublishItemUseCase.js +0 -0
  375. package/UseCases/PublishItem/PublishItemUseCase.d.ts +7 -0
  376. package/UseCases/PublishItem/PublishItemUseCase.js +13 -0
  377. package/UseCases/PublishItem/PublishItemUseCase.js.map +1 -0
  378. package/UseCases/PublishItem/index.d.ts +2 -0
  379. package/UseCases/PublishItem/index.js +1 -0
  380. package/UseCases/SearchItems/ISearchItemsUseCase.d.ts +3 -0
  381. package/UseCases/SearchItems/ISearchItemsUseCase.js +0 -0
  382. package/UseCases/SearchItems/SearchItemsUseCase.d.ts +7 -0
  383. package/UseCases/SearchItems/SearchItemsUseCase.js +13 -0
  384. package/UseCases/SearchItems/SearchItemsUseCase.js.map +1 -0
  385. package/UseCases/SearchItems/index.d.ts +2 -0
  386. package/UseCases/SearchItems/index.js +1 -0
  387. package/UseCases/SelectAllItems/ISelectAllItemsUseCase.d.ts +3 -0
  388. package/UseCases/SelectAllItems/ISelectAllItemsUseCase.js +0 -0
  389. package/UseCases/SelectAllItems/SelectAllItemsUseCase.d.ts +7 -0
  390. package/UseCases/SelectAllItems/SelectAllItemsUseCase.js +13 -0
  391. package/UseCases/SelectAllItems/SelectAllItemsUseCase.js.map +1 -0
  392. package/UseCases/SelectAllItems/index.d.ts +2 -0
  393. package/UseCases/SelectAllItems/index.js +1 -0
  394. package/UseCases/SelectItems/ISelectItemsUseCase.d.ts +4 -0
  395. package/UseCases/SelectItems/ISelectItemsUseCase.js +0 -0
  396. package/UseCases/SelectItems/SelectItemsUseCase.d.ts +7 -0
  397. package/UseCases/SelectItems/SelectItemsUseCase.js +13 -0
  398. package/UseCases/SelectItems/SelectItemsUseCase.js.map +1 -0
  399. package/UseCases/SelectItems/index.d.ts +2 -0
  400. package/UseCases/SelectItems/index.js +1 -0
  401. package/UseCases/SortItems/ISortItemsUseCase.d.ts +4 -0
  402. package/UseCases/SortItems/ISortItemsUseCase.js +0 -0
  403. package/UseCases/SortItems/SortItemsUseCase.d.ts +7 -0
  404. package/UseCases/SortItems/SortItemsUseCase.js +13 -0
  405. package/UseCases/SortItems/SortItemsUseCase.js.map +1 -0
  406. package/UseCases/SortItems/index.d.ts +2 -0
  407. package/UseCases/SortItems/index.js +1 -0
  408. package/UseCases/UnSelectAllItems/IUnselectAllItemsUseCase.d.ts +3 -0
  409. package/UseCases/UnSelectAllItems/IUnselectAllItemsUseCase.js +0 -0
  410. package/UseCases/UnSelectAllItems/UnselectAllItemsUseCase.d.ts +7 -0
  411. package/UseCases/UnSelectAllItems/UnselectAllItemsUseCase.js +13 -0
  412. package/UseCases/UnSelectAllItems/UnselectAllItemsUseCase.js.map +1 -0
  413. package/UseCases/UnSelectAllItems/index.d.ts +2 -0
  414. package/UseCases/UnSelectAllItems/index.js +1 -0
  415. package/UseCases/UnpublishItem/IUnpublishItemUseCase.d.ts +3 -0
  416. package/UseCases/UnpublishItem/IUnpublishItemUseCase.js +0 -0
  417. package/UseCases/UnpublishItem/UnpublishItemUseCase.d.ts +7 -0
  418. package/UseCases/UnpublishItem/UnpublishItemUseCase.js +13 -0
  419. package/UseCases/UnpublishItem/UnpublishItemUseCase.js.map +1 -0
  420. package/UseCases/UnpublishItem/index.d.ts +2 -0
  421. package/UseCases/UnpublishItem/index.js +1 -0
  422. package/UseCases/index.d.ts +11 -0
  423. package/UseCases/index.js +11 -0
  424. package/index.d.ts +1 -0
  425. package/index.js +1 -0
  426. package/package.json +57 -0
  427. package/types.d.ts +37 -0
  428. package/types.js +16 -0
  429. package/types.js.map +1 -0
@@ -0,0 +1,2 @@
1
+ export * from "./Models/index.js";
2
+ export * from "./Repositories/index.js";
@@ -0,0 +1,7 @@
1
+ import type { ApolloClient } from "apollo-client";
2
+ import type { ICancelScheduledActionGateway, ICancelScheduledActionGatewayParams } from "./abstractions/CancelScheduledActionGateway.js";
3
+ export declare class SchedulerCancelGraphQLGateway implements ICancelScheduledActionGateway {
4
+ private readonly client;
5
+ constructor(client: ApolloClient<object>);
6
+ execute(params: ICancelScheduledActionGatewayParams): Promise<void>;
7
+ }
@@ -0,0 +1,42 @@
1
+ import graphql_tag from "graphql-tag";
2
+ const createScheduleCancelActionMutation = ()=>graphql_tag`
3
+ mutation ScheduleCancelAction($namespace: String!, $id: ID!) {
4
+ scheduler {
5
+ cancelScheduledAction(namespace: $namespace, id: $id) {
6
+ data
7
+ error {
8
+ message
9
+ code
10
+ data
11
+ stack
12
+ }
13
+ }
14
+ }
15
+ }
16
+ `;
17
+ class SchedulerCancelGraphQLGateway {
18
+ constructor(client){
19
+ this.client = client;
20
+ }
21
+ async execute(params) {
22
+ const { data: response, errors } = await this.client.mutate({
23
+ mutation: createScheduleCancelActionMutation(),
24
+ variables: {
25
+ namespace: params.namespace,
26
+ id: params.id
27
+ },
28
+ fetchPolicy: "no-cache"
29
+ });
30
+ const result = response?.scheduler?.cancelScheduledAction;
31
+ if (!result || errors?.length) {
32
+ console.error({
33
+ errors
34
+ });
35
+ throw new Error("Network error while canceling a scheduled action.");
36
+ }
37
+ if (!result.data) throw new Error(result.error?.message || "Could not cancel scheduled action.");
38
+ }
39
+ }
40
+ export { SchedulerCancelGraphQLGateway };
41
+
42
+ //# sourceMappingURL=SchedulerCancelGraphQLGateway.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Gateways/SchedulerCancelGraphQLGateway.js","sources":["../../src/Gateways/SchedulerCancelGraphQLGateway.ts"],"sourcesContent":["import type { ApolloClient } from \"apollo-client\";\nimport gql from \"graphql-tag\";\nimport type { SchedulerErrorResponse } from \"~/types.js\";\nimport type {\n ICancelScheduledActionGateway,\n ICancelScheduledActionGatewayParams\n} from \"./abstractions/CancelScheduledActionGateway.js\";\n\nconst createScheduleCancelActionMutation = () => {\n return gql`\n mutation ScheduleCancelAction($namespace: String!, $id: ID!) {\n scheduler {\n cancelScheduledAction(namespace: $namespace, id: $id) {\n data\n error {\n message\n code\n data\n stack\n }\n }\n }\n }\n `;\n};\n\ninterface SchedulerCancelGraphQLMutationVariables {\n namespace: string;\n id: string;\n}\n\ninterface SchedulerCancelGraphQLMutationResponse {\n scheduler: {\n cancelScheduledAction: {\n data: boolean | null;\n error: SchedulerErrorResponse | null;\n };\n };\n}\n\nexport class SchedulerCancelGraphQLGateway implements ICancelScheduledActionGateway {\n private readonly client: ApolloClient<object>;\n\n public constructor(client: ApolloClient<object>) {\n this.client = client;\n }\n\n public async execute(params: ICancelScheduledActionGatewayParams) {\n const { data: response, errors } = await this.client.mutate<\n SchedulerCancelGraphQLMutationResponse,\n SchedulerCancelGraphQLMutationVariables\n >({\n mutation: createScheduleCancelActionMutation(),\n variables: {\n namespace: params.namespace,\n id: params.id\n },\n fetchPolicy: \"no-cache\"\n });\n\n const result = response?.scheduler?.cancelScheduledAction;\n if (!result || errors?.length) {\n console.error({\n errors\n });\n throw new Error(\"Network error while canceling a scheduled action.\");\n }\n\n if (!result.data) {\n throw new Error(result.error?.message || \"Could not cancel scheduled action.\");\n }\n }\n}\n"],"names":["createScheduleCancelActionMutation","gql","SchedulerCancelGraphQLGateway","client","params","response","errors","result","console","Error"],"mappings":";AAQA,MAAMA,qCAAqC,IAChCC,WAAG,CAAC;;;;;;;;;;;;;;IAcX,CAAC;AAiBE,MAAMC;IAGT,YAAmBC,MAA4B,CAAE;QAC7C,IAAI,CAAC,MAAM,GAAGA;IAClB;IAEA,MAAa,QAAQC,MAA2C,EAAE;QAC9D,MAAM,EAAE,MAAMC,QAAQ,EAAEC,MAAM,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAGzD;YACE,UAAUN;YACV,WAAW;gBACP,WAAWI,OAAO,SAAS;gBAC3B,IAAIA,OAAO,EAAE;YACjB;YACA,aAAa;QACjB;QAEA,MAAMG,SAASF,UAAU,WAAW;QACpC,IAAI,CAACE,UAAUD,QAAQ,QAAQ;YAC3BE,QAAQ,KAAK,CAAC;gBACVF;YACJ;YACA,MAAM,IAAIG,MAAM;QACpB;QAEA,IAAI,CAACF,OAAO,IAAI,EACZ,MAAM,IAAIE,MAAMF,OAAO,KAAK,EAAE,WAAW;IAEjD;AACJ"}
@@ -0,0 +1,21 @@
1
+ import type { ApolloClient } from "apollo-client";
2
+ import type { IGetScheduledActionGateway, IGetScheduledActionGatewayExecuteParams } from "./abstractions/GetScheduledActionGateway.js";
3
+ export declare const createGetScheduledActionQuery: () => import("graphql").DocumentNode;
4
+ export declare class SchedulerGetGraphQLGateway implements IGetScheduledActionGateway {
5
+ private readonly client;
6
+ constructor(client: ApolloClient<any>);
7
+ execute(params: IGetScheduledActionGatewayExecuteParams): Promise<{
8
+ id: string;
9
+ targetId: string;
10
+ namespace: string;
11
+ scheduledBy: {
12
+ id: string;
13
+ displayName: string;
14
+ type: string;
15
+ };
16
+ publishOn: Date | undefined;
17
+ unpublishOn: Date | undefined;
18
+ actionType: import("~/types.js").ScheduleActionType;
19
+ title: string;
20
+ } | null>;
21
+ }
@@ -0,0 +1,68 @@
1
+ import graphql_tag from "graphql-tag";
2
+ import zod from "zod";
3
+ import { createZodError } from "@webiny/utils/createZodError.js";
4
+ import { schedulerEntrySchema } from "./schema/schedulerEntry.js";
5
+ import { createSchedulerEntryFields } from "./graphql/fields.js";
6
+ const createGetScheduledActionQuery = ()=>graphql_tag`
7
+ query GetTargetScheduledActionQuery($namespace: String!, $id: ID!) {
8
+ scheduler {
9
+ getTargetScheduledAction(namespace: $namespace, id: $id) {
10
+ data {
11
+ ${createSchedulerEntryFields()}
12
+ }
13
+ error {
14
+ message
15
+ code
16
+ data
17
+ stack
18
+ }
19
+ }
20
+ }
21
+ }
22
+ `;
23
+ const schema = zod.object({
24
+ data: schedulerEntrySchema
25
+ });
26
+ class SchedulerGetGraphQLGateway {
27
+ constructor(client){
28
+ this.client = client;
29
+ }
30
+ async execute(params) {
31
+ const { data: response, errors } = await this.client.query({
32
+ query: createGetScheduledActionQuery(),
33
+ variables: {
34
+ namespace: params.namespace,
35
+ id: params.id
36
+ },
37
+ fetchPolicy: "network-only"
38
+ });
39
+ const result = response?.scheduler?.getTargetScheduledAction;
40
+ if (!result || errors?.length) {
41
+ console.error({
42
+ errors
43
+ });
44
+ throw new Error("Network error while getting scheduled action.");
45
+ }
46
+ if (result.error) {
47
+ console.error({
48
+ error: result.error
49
+ });
50
+ throw new Error(result.error.message || "Could not fetch scheduled action.");
51
+ }
52
+ if (!result.data) return null;
53
+ const validated = await schema.safeParseAsync(result);
54
+ if (!validated.success) {
55
+ const err = createZodError(validated.error);
56
+ console.error(err);
57
+ console.log(JSON.stringify({
58
+ err,
59
+ ex: validated.error
60
+ }));
61
+ throw err;
62
+ }
63
+ return validated.data.data;
64
+ }
65
+ }
66
+ export { SchedulerGetGraphQLGateway, createGetScheduledActionQuery };
67
+
68
+ //# sourceMappingURL=SchedulerGetGraphQLGateway.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Gateways/SchedulerGetGraphQLGateway.js","sources":["../../src/Gateways/SchedulerGetGraphQLGateway.ts"],"sourcesContent":["import type { ApolloClient } from \"apollo-client\";\nimport gql from \"graphql-tag\";\nimport zod from \"zod\";\nimport { createZodError } from \"@webiny/utils/createZodError.js\";\nimport { schedulerEntrySchema } from \"./schema/schedulerEntry.js\";\nimport { createSchedulerEntryFields } from \"./graphql/fields.js\";\nimport type {\n IGetScheduledActionGateway,\n IGetScheduledActionGatewayExecuteParams\n} from \"./abstractions/GetScheduledActionGateway.js\";\nimport type { SchedulerEntry, SchedulerErrorResponse } from \"~/types.js\";\n\nexport const createGetScheduledActionQuery = () => {\n return gql`\n query GetTargetScheduledActionQuery($namespace: String!, $id: ID!) {\n scheduler {\n getTargetScheduledAction(namespace: $namespace, id: $id) {\n data {\n ${createSchedulerEntryFields()}\n }\n error {\n message\n code\n data\n stack\n }\n }\n }\n }\n `;\n};\n\ninterface SchedulerGetGraphQLQueryResponse {\n scheduler: {\n getTargetScheduledAction: {\n data: SchedulerEntry | null;\n error: SchedulerErrorResponse | null;\n };\n };\n}\n\nconst schema = zod.object({\n data: schedulerEntrySchema\n});\n\nexport class SchedulerGetGraphQLGateway implements IGetScheduledActionGateway {\n private readonly client: ApolloClient<any>;\n\n public constructor(client: ApolloClient<any>) {\n this.client = client;\n }\n\n public async execute(params: IGetScheduledActionGatewayExecuteParams) {\n const { data: response, errors } = await this.client.query<\n SchedulerGetGraphQLQueryResponse,\n IGetScheduledActionGatewayExecuteParams\n >({\n query: createGetScheduledActionQuery(),\n variables: {\n namespace: params.namespace,\n id: params.id\n },\n fetchPolicy: \"network-only\"\n });\n\n const result = response?.scheduler?.getTargetScheduledAction;\n if (!result || errors?.length) {\n console.error({\n errors\n });\n throw new Error(\"Network error while getting scheduled action.\");\n } else if (result.error) {\n console.error({\n error: result.error\n });\n throw new Error(result.error.message || \"Could not fetch scheduled action.\");\n } else if (!result.data) {\n return null;\n }\n\n const validated = await schema.safeParseAsync(result);\n if (!validated.success) {\n const err = createZodError(validated.error);\n console.error(err);\n console.log(\n JSON.stringify({\n err,\n ex: validated.error\n })\n );\n throw err;\n }\n\n return validated.data.data;\n }\n}\n"],"names":["createGetScheduledActionQuery","gql","createSchedulerEntryFields","schema","zod","schedulerEntrySchema","SchedulerGetGraphQLGateway","client","params","response","errors","result","console","Error","validated","err","createZodError","JSON"],"mappings":";;;;;AAYO,MAAMA,gCAAgC,IAClCC,WAAG,CAAC;;;;;wBAKS,EAAEC,6BAA6B;;;;;;;;;;;IAWnD,CAAC;AAYL,MAAMC,SAASC,IAAI,MAAM,CAAC;IACtB,MAAMC;AACV;AAEO,MAAMC;IAGT,YAAmBC,MAAyB,CAAE;QAC1C,IAAI,CAAC,MAAM,GAAGA;IAClB;IAEA,MAAa,QAAQC,MAA+C,EAAE;QAClE,MAAM,EAAE,MAAMC,QAAQ,EAAEC,MAAM,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAGxD;YACE,OAAOV;YACP,WAAW;gBACP,WAAWQ,OAAO,SAAS;gBAC3B,IAAIA,OAAO,EAAE;YACjB;YACA,aAAa;QACjB;QAEA,MAAMG,SAASF,UAAU,WAAW;QACpC,IAAI,CAACE,UAAUD,QAAQ,QAAQ;YAC3BE,QAAQ,KAAK,CAAC;gBACVF;YACJ;YACA,MAAM,IAAIG,MAAM;QACpB;QAAO,IAAIF,OAAO,KAAK,EAAE;YACrBC,QAAQ,KAAK,CAAC;gBACV,OAAOD,OAAO,KAAK;YACvB;YACA,MAAM,IAAIE,MAAMF,OAAO,KAAK,CAAC,OAAO,IAAI;QAC5C;QAAO,IAAI,CAACA,OAAO,IAAI,EACnB,OAAO;QAGX,MAAMG,YAAY,MAAMX,OAAO,cAAc,CAACQ;QAC9C,IAAI,CAACG,UAAU,OAAO,EAAE;YACpB,MAAMC,MAAMC,eAAeF,UAAU,KAAK;YAC1CF,QAAQ,KAAK,CAACG;YACdH,QAAQ,GAAG,CACPK,KAAK,SAAS,CAAC;gBACXF;gBACA,IAAID,UAAU,KAAK;YACvB;YAEJ,MAAMC;QACV;QAEA,OAAOD,UAAU,IAAI,CAAC,IAAI;IAC9B;AACJ"}
@@ -0,0 +1,7 @@
1
+ import type { ApolloClient } from "apollo-client";
2
+ import type { IListScheduledActionsGateway, IListScheduledActionsGatewayExecuteParams, IListScheduledActionsGatewayExecuteResponse } from "./abstractions/ListScheduledActionsGateway.js";
3
+ export declare class SchedulerListGraphQLGateway implements IListScheduledActionsGateway {
4
+ private readonly client;
5
+ constructor(client: ApolloClient<any>);
6
+ execute(params: IListScheduledActionsGatewayExecuteParams): Promise<IListScheduledActionsGatewayExecuteResponse>;
7
+ }
@@ -0,0 +1,86 @@
1
+ import graphql_tag from "graphql-tag";
2
+ import zod from "zod";
3
+ import { createZodError } from "@webiny/utils/createZodError.js";
4
+ import { schedulerEntrySchema } from "./schema/schedulerEntry.js";
5
+ import { createSchedulerEntryFields } from "./graphql/fields.js";
6
+ const createListScheduledActionsQuery = ()=>graphql_tag`
7
+ query ListScheduledActions(
8
+ $namespace: String!
9
+ $where: ListScheduledActionsWhereInput
10
+ $sort: [ListScheduledActionsSorter!]
11
+ $limit: Int
12
+ $after: String
13
+ ) {
14
+ scheduler {
15
+ listScheduledActions(
16
+ namespace: $namespace
17
+ where: $where
18
+ sort: $sort
19
+ limit: $limit
20
+ after: $after
21
+ ) {
22
+ data {
23
+ ${createSchedulerEntryFields()}
24
+ }
25
+ meta {
26
+ totalCount
27
+ cursor
28
+ hasMoreItems
29
+ }
30
+ error {
31
+ message
32
+ code
33
+ data
34
+ stack
35
+ }
36
+ }
37
+ }
38
+ }
39
+ `;
40
+ const schema = zod.object({
41
+ data: zod.array(schedulerEntrySchema),
42
+ meta: zod.object({
43
+ totalCount: zod.number(),
44
+ cursor: zod.string().nullable(),
45
+ hasMoreItems: zod.boolean()
46
+ })
47
+ });
48
+ class SchedulerListGraphQLGateway {
49
+ constructor(client){
50
+ this.client = client;
51
+ }
52
+ async execute(params) {
53
+ const { data: response, errors } = await this.client.query({
54
+ query: createListScheduledActionsQuery(),
55
+ variables: {
56
+ namespace: params.namespace,
57
+ where: params.where,
58
+ limit: params.limit,
59
+ after: params.after,
60
+ sort: params.sort
61
+ },
62
+ fetchPolicy: "network-only"
63
+ });
64
+ const result = response?.scheduler?.listScheduledActions;
65
+ if (!result || errors?.length) {
66
+ console.error({
67
+ errors
68
+ });
69
+ throw new Error("Network error while listing scheduled actions.");
70
+ }
71
+ if (!result.data || !result.meta) throw new Error(result.error?.message || "Could not list schedule actions.");
72
+ const validated = await schema.safeParseAsync(result);
73
+ if (!validated.success) {
74
+ const err = createZodError(validated.error);
75
+ console.error(err);
76
+ throw err;
77
+ }
78
+ return {
79
+ items: validated.data.data,
80
+ meta: validated.data.meta
81
+ };
82
+ }
83
+ }
84
+ export { SchedulerListGraphQLGateway };
85
+
86
+ //# sourceMappingURL=SchedulerListGraphQLGateway.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Gateways/SchedulerListGraphQLGateway.js","sources":["../../src/Gateways/SchedulerListGraphQLGateway.ts"],"sourcesContent":["import type { ApolloClient } from \"apollo-client\";\nimport gql from \"graphql-tag\";\nimport zod from \"zod\";\nimport { createZodError } from \"@webiny/utils/createZodError.js\";\nimport { schedulerEntrySchema } from \"./schema/schedulerEntry.js\";\nimport { createSchedulerEntryFields } from \"./graphql/fields.js\";\nimport type {\n IListScheduledActionsGateway,\n IListScheduledActionsGatewayExecuteParams,\n IListScheduledActionsGatewayExecuteResponse\n} from \"./abstractions/ListScheduledActionsGateway.js\";\nimport type { SchedulerEntry, SchedulerErrorResponse, SchedulerMetaResponse } from \"~/types.js\";\n\nconst createListScheduledActionsQuery = () => {\n return gql`\n query ListScheduledActions(\n $namespace: String!\n $where: ListScheduledActionsWhereInput\n $sort: [ListScheduledActionsSorter!]\n $limit: Int\n $after: String\n ) {\n scheduler {\n listScheduledActions(\n namespace: $namespace\n where: $where\n sort: $sort\n limit: $limit\n after: $after\n ) {\n data {\n ${createSchedulerEntryFields()}\n }\n meta {\n totalCount\n cursor\n hasMoreItems\n }\n error {\n message\n code\n data\n stack\n }\n }\n }\n }\n `;\n};\n\ninterface SchedulerListGraphQLQueryResponse {\n scheduler: {\n listScheduledActions: {\n data: SchedulerEntry[] | null;\n meta: SchedulerMetaResponse | null;\n error: SchedulerErrorResponse | null;\n };\n };\n}\n\nconst schema = zod.object({\n data: zod.array(schedulerEntrySchema),\n meta: zod.object({\n totalCount: zod.number(),\n cursor: zod.string().nullable(),\n hasMoreItems: zod.boolean()\n })\n});\n\nexport class SchedulerListGraphQLGateway implements IListScheduledActionsGateway {\n private readonly client: ApolloClient<any>;\n\n public constructor(client: ApolloClient<any>) {\n this.client = client;\n }\n\n public async execute(\n params: IListScheduledActionsGatewayExecuteParams\n ): Promise<IListScheduledActionsGatewayExecuteResponse> {\n const { data: response, errors } = await this.client.query<\n SchedulerListGraphQLQueryResponse,\n IListScheduledActionsGatewayExecuteParams\n >({\n query: createListScheduledActionsQuery(),\n variables: {\n namespace: params.namespace,\n where: params.where,\n limit: params.limit,\n after: params.after,\n sort: params.sort\n },\n fetchPolicy: \"network-only\"\n });\n\n const result = response?.scheduler?.listScheduledActions;\n if (!result || errors?.length) {\n console.error({\n errors\n });\n throw new Error(\"Network error while listing scheduled actions.\");\n }\n\n if (!result.data || !result.meta) {\n throw new Error(result.error?.message || \"Could not list schedule actions.\");\n }\n\n const validated = await schema.safeParseAsync(result);\n if (!validated.success) {\n const err = createZodError(validated.error);\n console.error(err);\n throw err;\n }\n\n return {\n items: validated.data.data,\n meta: validated.data.meta\n };\n }\n}\n"],"names":["createListScheduledActionsQuery","gql","createSchedulerEntryFields","schema","zod","schedulerEntrySchema","SchedulerListGraphQLGateway","client","params","response","errors","result","console","Error","validated","err","createZodError"],"mappings":";;;;;AAaA,MAAMA,kCAAkC,IAC7BC,WAAG,CAAC;;;;;;;;;;;;;;;;;wBAiBS,EAAEC,6BAA6B;;;;;;;;;;;;;;;;IAgBnD,CAAC;AAaL,MAAMC,SAASC,IAAI,MAAM,CAAC;IACtB,MAAMA,IAAI,KAAK,CAACC;IAChB,MAAMD,IAAI,MAAM,CAAC;QACb,YAAYA,IAAI,MAAM;QACtB,QAAQA,IAAI,MAAM,GAAG,QAAQ;QAC7B,cAAcA,IAAI,OAAO;IAC7B;AACJ;AAEO,MAAME;IAGT,YAAmBC,MAAyB,CAAE;QAC1C,IAAI,CAAC,MAAM,GAAGA;IAClB;IAEA,MAAa,QACTC,MAAiD,EACG;QACpD,MAAM,EAAE,MAAMC,QAAQ,EAAEC,MAAM,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAGxD;YACE,OAAOV;YACP,WAAW;gBACP,WAAWQ,OAAO,SAAS;gBAC3B,OAAOA,OAAO,KAAK;gBACnB,OAAOA,OAAO,KAAK;gBACnB,OAAOA,OAAO,KAAK;gBACnB,MAAMA,OAAO,IAAI;YACrB;YACA,aAAa;QACjB;QAEA,MAAMG,SAASF,UAAU,WAAW;QACpC,IAAI,CAACE,UAAUD,QAAQ,QAAQ;YAC3BE,QAAQ,KAAK,CAAC;gBACVF;YACJ;YACA,MAAM,IAAIG,MAAM;QACpB;QAEA,IAAI,CAACF,OAAO,IAAI,IAAI,CAACA,OAAO,IAAI,EAC5B,MAAM,IAAIE,MAAMF,OAAO,KAAK,EAAE,WAAW;QAG7C,MAAMG,YAAY,MAAMX,OAAO,cAAc,CAACQ;QAC9C,IAAI,CAACG,UAAU,OAAO,EAAE;YACpB,MAAMC,MAAMC,eAAeF,UAAU,KAAK;YAC1CF,QAAQ,KAAK,CAACG;YACd,MAAMA;QACV;QAEA,OAAO;YACH,OAAOD,UAAU,IAAI,CAAC,IAAI;YAC1B,MAAMA,UAAU,IAAI,CAAC,IAAI;QAC7B;IACJ;AACJ"}
@@ -0,0 +1,7 @@
1
+ import type { ApolloClient } from "apollo-client";
2
+ import type { ISchedulePublishActionGateway, ISchedulePublishActionGatewayExecuteParams, ISchedulePublishActionGatewayExecuteResponse } from "./abstractions/SchedulePublishActionGateway.js";
3
+ export declare class SchedulerPublishGraphQLGateway implements ISchedulePublishActionGateway {
4
+ private readonly client;
5
+ constructor(client: ApolloClient<any>);
6
+ execute(params: ISchedulePublishActionGatewayExecuteParams): Promise<ISchedulePublishActionGatewayExecuteResponse>;
7
+ }
@@ -0,0 +1,59 @@
1
+ import zod from "zod";
2
+ import { schedulerEntrySchema } from "./schema/schedulerEntry.js";
3
+ import { createZodError } from "@webiny/utils/createZodError.js";
4
+ import graphql_tag from "graphql-tag";
5
+ import { createSchedulerEntryFields } from "./graphql/fields.js";
6
+ import { ScheduleActionType } from "../types.js";
7
+ const createSchedulePublishActionMutation = ()=>graphql_tag`
8
+ mutation CreateSchedulePublishAction($namespace: String!, $targetId: ID!, $scheduleFor: DateTime, $actionType: ScheduleRecordType!) {
9
+ scheduler {
10
+ scheduleAction(namespace: $namespace, targetId: $targetId, scheduleFor: $scheduleFor, actionType: $actionType) {
11
+ data {
12
+ ${createSchedulerEntryFields()}
13
+ }
14
+ error {
15
+ message
16
+ code
17
+ data
18
+ stack
19
+ }
20
+ }
21
+ }
22
+ }
23
+ `;
24
+ const schema = zod.object({
25
+ data: schedulerEntrySchema
26
+ });
27
+ class SchedulerPublishGraphQLGateway {
28
+ constructor(client){
29
+ this.client = client;
30
+ }
31
+ async execute(params) {
32
+ const { data: response, errors } = await this.client.mutate({
33
+ mutation: createSchedulePublishActionMutation(),
34
+ variables: {
35
+ namespace: params.namespace,
36
+ targetId: params.targetId,
37
+ scheduleFor: params.scheduleOn,
38
+ actionType: ScheduleActionType.publish
39
+ },
40
+ fetchPolicy: "no-cache"
41
+ });
42
+ const result = response?.scheduler?.scheduleAction;
43
+ if (!result || errors?.length) {
44
+ console.error({
45
+ errors
46
+ });
47
+ throw new Error("Network error while scheduling an action.");
48
+ }
49
+ if (!result.data) throw new Error(result.error?.message || "Could execute schedule publish action.");
50
+ const validated = await schema.safeParseAsync(result);
51
+ if (!validated.success) throw createZodError(validated.error);
52
+ return {
53
+ item: validated.data.data
54
+ };
55
+ }
56
+ }
57
+ export { SchedulerPublishGraphQLGateway };
58
+
59
+ //# sourceMappingURL=SchedulerPublishGraphQLGateway.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Gateways/SchedulerPublishGraphQLGateway.js","sources":["../../src/Gateways/SchedulerPublishGraphQLGateway.ts"],"sourcesContent":["import type { ApolloClient } from \"apollo-client\";\nimport zod from \"zod\";\nimport { schedulerEntrySchema } from \"./schema/schedulerEntry.js\";\nimport { createZodError } from \"@webiny/utils/createZodError.js\";\nimport gql from \"graphql-tag\";\nimport { createSchedulerEntryFields } from \"./graphql/fields.js\";\nimport { type SchedulerEntry, type SchedulerErrorResponse, ScheduleActionType } from \"~/types.js\";\nimport type {\n ISchedulePublishActionGateway,\n ISchedulePublishActionGatewayExecuteParams,\n ISchedulePublishActionGatewayExecuteResponse\n} from \"./abstractions/SchedulePublishActionGateway.js\";\n\nconst createSchedulePublishActionMutation = () => {\n return gql`\n mutation CreateSchedulePublishAction($namespace: String!, $targetId: ID!, $scheduleFor: DateTime, $actionType: ScheduleRecordType!) {\n scheduler {\n scheduleAction(namespace: $namespace, targetId: $targetId, scheduleFor: $scheduleFor, actionType: $actionType) {\n data {\n ${createSchedulerEntryFields()}\n }\n error {\n message\n code\n data\n stack\n }\n }\n }\n }\n `;\n};\n\ninterface SchedulerPublishGraphQLMutationVariables {\n namespace: string;\n targetId: string;\n scheduleFor: Date;\n actionType: ScheduleActionType.publish;\n}\n\ninterface SchedulerPublishGraphQLMutationResponse {\n scheduler: {\n scheduleAction: {\n data: SchedulerEntry | null;\n error: SchedulerErrorResponse | null;\n };\n };\n}\n\nconst schema = zod.object({\n data: schedulerEntrySchema\n});\n\nexport class SchedulerPublishGraphQLGateway implements ISchedulePublishActionGateway {\n private readonly client: ApolloClient<any>;\n\n public constructor(client: ApolloClient<any>) {\n this.client = client;\n }\n\n public async execute(\n params: ISchedulePublishActionGatewayExecuteParams\n ): Promise<ISchedulePublishActionGatewayExecuteResponse> {\n const { data: response, errors } = await this.client.mutate<\n SchedulerPublishGraphQLMutationResponse,\n SchedulerPublishGraphQLMutationVariables\n >({\n mutation: createSchedulePublishActionMutation(),\n variables: {\n namespace: params.namespace,\n targetId: params.targetId,\n scheduleFor: params.scheduleOn,\n actionType: ScheduleActionType.publish\n },\n fetchPolicy: \"no-cache\"\n });\n\n const result = response?.scheduler?.scheduleAction;\n if (!result || errors?.length) {\n console.error({\n errors\n });\n throw new Error(\"Network error while scheduling an action.\");\n }\n\n if (!result.data) {\n throw new Error(result.error?.message || \"Could execute schedule publish action.\");\n }\n\n const validated = await schema.safeParseAsync(result);\n if (!validated.success) {\n throw createZodError(validated.error);\n }\n return {\n item: validated.data.data\n };\n }\n}\n"],"names":["createSchedulePublishActionMutation","gql","createSchedulerEntryFields","schema","zod","schedulerEntrySchema","SchedulerPublishGraphQLGateway","client","params","response","errors","ScheduleActionType","result","console","Error","validated","createZodError"],"mappings":";;;;;;AAaA,MAAMA,sCAAsC,IACjCC,WAAG,CAAC;;;;;wBAKS,EAAEC,6BAA6B;;;;;;;;;;;IAWnD,CAAC;AAmBL,MAAMC,SAASC,IAAI,MAAM,CAAC;IACtB,MAAMC;AACV;AAEO,MAAMC;IAGT,YAAmBC,MAAyB,CAAE;QAC1C,IAAI,CAAC,MAAM,GAAGA;IAClB;IAEA,MAAa,QACTC,MAAkD,EACG;QACrD,MAAM,EAAE,MAAMC,QAAQ,EAAEC,MAAM,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAGzD;YACE,UAAUV;YACV,WAAW;gBACP,WAAWQ,OAAO,SAAS;gBAC3B,UAAUA,OAAO,QAAQ;gBACzB,aAAaA,OAAO,UAAU;gBAC9B,YAAYG,mBAAmB,OAAO;YAC1C;YACA,aAAa;QACjB;QAEA,MAAMC,SAASH,UAAU,WAAW;QACpC,IAAI,CAACG,UAAUF,QAAQ,QAAQ;YAC3BG,QAAQ,KAAK,CAAC;gBACVH;YACJ;YACA,MAAM,IAAII,MAAM;QACpB;QAEA,IAAI,CAACF,OAAO,IAAI,EACZ,MAAM,IAAIE,MAAMF,OAAO,KAAK,EAAE,WAAW;QAG7C,MAAMG,YAAY,MAAMZ,OAAO,cAAc,CAACS;QAC9C,IAAI,CAACG,UAAU,OAAO,EAClB,MAAMC,eAAeD,UAAU,KAAK;QAExC,OAAO;YACH,MAAMA,UAAU,IAAI,CAAC,IAAI;QAC7B;IACJ;AACJ"}
@@ -0,0 +1,23 @@
1
+ import type { ApolloClient } from "apollo-client";
2
+ import { ScheduleActionType } from "../types.js";
3
+ import type { IScheduleUnpublishActionGateway, IScheduleUnpublishActionGatewayExecuteParams } from "./abstractions/ScheduleUnpublishActionGateway.js";
4
+ export declare class SchedulerUnpublishGraphQLGateway implements IScheduleUnpublishActionGateway {
5
+ private readonly client;
6
+ constructor(client: ApolloClient<any>);
7
+ execute(params: IScheduleUnpublishActionGatewayExecuteParams): Promise<{
8
+ item: {
9
+ id: string;
10
+ targetId: string;
11
+ namespace: string;
12
+ scheduledBy: {
13
+ id: string;
14
+ displayName: string;
15
+ type: string;
16
+ };
17
+ publishOn: Date | undefined;
18
+ unpublishOn: Date | undefined;
19
+ actionType: ScheduleActionType;
20
+ title: string;
21
+ };
22
+ }>;
23
+ }
@@ -0,0 +1,63 @@
1
+ import zod from "zod";
2
+ import { schedulerEntrySchema } from "./schema/schedulerEntry.js";
3
+ import { createZodError } from "@webiny/utils/createZodError.js";
4
+ import graphql_tag from "graphql-tag";
5
+ import { createSchedulerEntryFields } from "./graphql/fields.js";
6
+ import { ScheduleActionType } from "../types.js";
7
+ const createScheduleUnpublishActionMutation = ()=>graphql_tag`
8
+ mutation ScheduleUnpublishAction($namespace: String!, $targetId: ID!, $scheduleFor: DateTime, $actionType: ScheduleRecordType!) {
9
+ scheduler {
10
+ scheduleAction(namespace: $namespace, targetId: $targetId, scheduleFor: $scheduleFor, actionType: $actionType) {
11
+ data {
12
+ ${createSchedulerEntryFields()}
13
+ }
14
+ error {
15
+ message
16
+ code
17
+ data
18
+ stack
19
+ }
20
+ }
21
+ }
22
+ }
23
+ `;
24
+ const schema = zod.object({
25
+ data: schedulerEntrySchema
26
+ });
27
+ class SchedulerUnpublishGraphQLGateway {
28
+ constructor(client){
29
+ this.client = client;
30
+ }
31
+ async execute(params) {
32
+ const { data: response, errors } = await this.client.mutate({
33
+ mutation: createScheduleUnpublishActionMutation(),
34
+ variables: {
35
+ namespace: params.namespace,
36
+ targetId: params.targetId,
37
+ scheduleFor: params.scheduleOn,
38
+ actionType: ScheduleActionType.unpublish
39
+ },
40
+ fetchPolicy: "no-cache"
41
+ });
42
+ const result = response?.scheduler?.scheduleAction;
43
+ if (!result || errors?.length) {
44
+ console.error({
45
+ errors
46
+ });
47
+ throw new Error("Network error while creating a schedule.");
48
+ }
49
+ if (!result.data) throw new Error(result.error?.message || "Could execute schedule unpublish action.");
50
+ const validated = await schema.safeParseAsync(result);
51
+ if (!validated.success) {
52
+ const err = createZodError(validated.error);
53
+ console.error(err);
54
+ throw err;
55
+ }
56
+ return {
57
+ item: validated.data.data
58
+ };
59
+ }
60
+ }
61
+ export { SchedulerUnpublishGraphQLGateway };
62
+
63
+ //# sourceMappingURL=SchedulerUnpublishGraphQLGateway.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Gateways/SchedulerUnpublishGraphQLGateway.js","sources":["../../src/Gateways/SchedulerUnpublishGraphQLGateway.ts"],"sourcesContent":["import type { ApolloClient } from \"apollo-client\";\nimport zod from \"zod\";\nimport { schedulerEntrySchema } from \"./schema/schedulerEntry.js\";\nimport { createZodError } from \"@webiny/utils/createZodError.js\";\nimport gql from \"graphql-tag\";\nimport { createSchedulerEntryFields } from \"./graphql/fields.js\";\nimport { type SchedulerEntry, type SchedulerErrorResponse, ScheduleActionType } from \"~/types.js\";\nimport type {\n IScheduleUnpublishActionGateway,\n IScheduleUnpublishActionGatewayExecuteParams\n} from \"./abstractions/ScheduleUnpublishActionGateway.js\";\n\nconst createScheduleUnpublishActionMutation = () => {\n return gql`\n mutation ScheduleUnpublishAction($namespace: String!, $targetId: ID!, $scheduleFor: DateTime, $actionType: ScheduleRecordType!) {\n scheduler {\n scheduleAction(namespace: $namespace, targetId: $targetId, scheduleFor: $scheduleFor, actionType: $actionType) {\n data {\n ${createSchedulerEntryFields()}\n }\n error {\n message\n code\n data\n stack\n }\n }\n }\n }\n `;\n};\n\ninterface SchedulerUnpublishGraphQLMutationVariables {\n namespace: string;\n targetId: string;\n scheduleFor: Date;\n actionType: ScheduleActionType.unpublish;\n}\n\ninterface SchedulerUnpublishGraphQLMutationResponse {\n scheduler: {\n scheduleAction: {\n data: SchedulerEntry | null;\n error: SchedulerErrorResponse | null;\n };\n };\n}\n\nconst schema = zod.object({\n data: schedulerEntrySchema\n});\n\nexport class SchedulerUnpublishGraphQLGateway implements IScheduleUnpublishActionGateway {\n private readonly client: ApolloClient<any>;\n\n public constructor(client: ApolloClient<any>) {\n this.client = client;\n }\n\n public async execute(params: IScheduleUnpublishActionGatewayExecuteParams) {\n const { data: response, errors } = await this.client.mutate<\n SchedulerUnpublishGraphQLMutationResponse,\n SchedulerUnpublishGraphQLMutationVariables\n >({\n mutation: createScheduleUnpublishActionMutation(),\n variables: {\n namespace: params.namespace,\n targetId: params.targetId,\n scheduleFor: params.scheduleOn,\n actionType: ScheduleActionType.unpublish\n },\n fetchPolicy: \"no-cache\"\n });\n\n const result = response?.scheduler?.scheduleAction;\n if (!result || errors?.length) {\n console.error({\n errors\n });\n throw new Error(\"Network error while creating a schedule.\");\n }\n\n if (!result.data) {\n throw new Error(result.error?.message || \"Could execute schedule unpublish action.\");\n }\n\n const validated = await schema.safeParseAsync(result);\n if (!validated.success) {\n const err = createZodError(validated.error);\n console.error(err);\n throw err;\n }\n return {\n item: validated.data.data\n };\n }\n}\n"],"names":["createScheduleUnpublishActionMutation","gql","createSchedulerEntryFields","schema","zod","schedulerEntrySchema","SchedulerUnpublishGraphQLGateway","client","params","response","errors","ScheduleActionType","result","console","Error","validated","err","createZodError"],"mappings":";;;;;;AAYA,MAAMA,wCAAwC,IACnCC,WAAG,CAAC;;;;;wBAKS,EAAEC,6BAA6B;;;;;;;;;;;IAWnD,CAAC;AAmBL,MAAMC,SAASC,IAAI,MAAM,CAAC;IACtB,MAAMC;AACV;AAEO,MAAMC;IAGT,YAAmBC,MAAyB,CAAE;QAC1C,IAAI,CAAC,MAAM,GAAGA;IAClB;IAEA,MAAa,QAAQC,MAAoD,EAAE;QACvE,MAAM,EAAE,MAAMC,QAAQ,EAAEC,MAAM,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAGzD;YACE,UAAUV;YACV,WAAW;gBACP,WAAWQ,OAAO,SAAS;gBAC3B,UAAUA,OAAO,QAAQ;gBACzB,aAAaA,OAAO,UAAU;gBAC9B,YAAYG,mBAAmB,SAAS;YAC5C;YACA,aAAa;QACjB;QAEA,MAAMC,SAASH,UAAU,WAAW;QACpC,IAAI,CAACG,UAAUF,QAAQ,QAAQ;YAC3BG,QAAQ,KAAK,CAAC;gBACVH;YACJ;YACA,MAAM,IAAII,MAAM;QACpB;QAEA,IAAI,CAACF,OAAO,IAAI,EACZ,MAAM,IAAIE,MAAMF,OAAO,KAAK,EAAE,WAAW;QAG7C,MAAMG,YAAY,MAAMZ,OAAO,cAAc,CAACS;QAC9C,IAAI,CAACG,UAAU,OAAO,EAAE;YACpB,MAAMC,MAAMC,eAAeF,UAAU,KAAK;YAC1CF,QAAQ,KAAK,CAACG;YACd,MAAMA;QACV;QACA,OAAO;YACH,MAAMD,UAAU,IAAI,CAAC,IAAI;QAC7B;IACJ;AACJ"}
@@ -0,0 +1,7 @@
1
+ export interface ICancelScheduledActionGatewayParams {
2
+ namespace: string;
3
+ id: string;
4
+ }
5
+ export interface ICancelScheduledActionGateway {
6
+ execute(params: ICancelScheduledActionGatewayParams): Promise<void>;
7
+ }
@@ -0,0 +1,9 @@
1
+ import type { SchedulerEntry } from "../../types.js";
2
+ export interface IGetScheduledActionGatewayExecuteParams {
3
+ namespace: string;
4
+ id: string;
5
+ }
6
+ export type IGetScheduledActionGatewayResponse = SchedulerEntry | null;
7
+ export interface IGetScheduledActionGateway {
8
+ execute(params: IGetScheduledActionGatewayExecuteParams): Promise<IGetScheduledActionGatewayResponse>;
9
+ }
@@ -0,0 +1,27 @@
1
+ import type { SchedulerEntry, SchedulerMetaResponse } from "../../types.js";
2
+ import type { ScheduleActionType } from "../../types.js";
3
+ export interface IListScheduledActionsExecuteParamsWhere {
4
+ targetId?: string;
5
+ title_contains?: string;
6
+ title_not_contains?: string;
7
+ type?: ScheduleActionType;
8
+ scheduledBy?: string;
9
+ scheduledFor?: Date;
10
+ scheduledFor_gte?: Date;
11
+ scheduledFor_lte?: Date;
12
+ }
13
+ export type IListScheduledActionsExecuteParamsSort = "scheduledFor_ASC" | "scheduledFor_DESC";
14
+ export interface IListScheduledActionsGatewayExecuteParams {
15
+ namespace: string;
16
+ where?: IListScheduledActionsExecuteParamsWhere;
17
+ sort?: IListScheduledActionsExecuteParamsSort[];
18
+ limit?: number;
19
+ after?: string;
20
+ }
21
+ export interface IListScheduledActionsGatewayExecuteResponse {
22
+ items: SchedulerEntry[];
23
+ meta: SchedulerMetaResponse;
24
+ }
25
+ export interface IListScheduledActionsGateway {
26
+ execute(params: IListScheduledActionsGatewayExecuteParams): Promise<IListScheduledActionsGatewayExecuteResponse>;
27
+ }
@@ -0,0 +1,12 @@
1
+ import type { SchedulerEntry } from "../../types.js";
2
+ export interface ISchedulePublishActionGatewayExecuteParams {
3
+ namespace: string;
4
+ targetId: string;
5
+ scheduleOn: Date;
6
+ }
7
+ export interface ISchedulePublishActionGatewayExecuteResponse {
8
+ item: SchedulerEntry;
9
+ }
10
+ export interface ISchedulePublishActionGateway {
11
+ execute(params: ISchedulePublishActionGatewayExecuteParams): Promise<ISchedulePublishActionGatewayExecuteResponse>;
12
+ }
@@ -0,0 +1,12 @@
1
+ import type { SchedulerEntry } from "../../types.js";
2
+ export interface IScheduleUnpublishActionGatewayExecuteParams {
3
+ namespace: string;
4
+ targetId: string;
5
+ scheduleOn: Date;
6
+ }
7
+ export interface IScheduleUnpublishActionGatewayExecuteResponse {
8
+ item: SchedulerEntry;
9
+ }
10
+ export interface IScheduleUnpublishActionGateway {
11
+ execute(params: IScheduleUnpublishActionGatewayExecuteParams): Promise<IScheduleUnpublishActionGatewayExecuteResponse>;
12
+ }
@@ -0,0 +1 @@
1
+ export declare const createSchedulerEntryFields: () => string;
@@ -0,0 +1,17 @@
1
+ const createSchedulerEntryFields = ()=>`
2
+ id
3
+ targetId
4
+ namespace
5
+ scheduledBy {
6
+ id
7
+ displayName
8
+ type
9
+ }
10
+ publishOn
11
+ unpublishOn
12
+ actionType
13
+ title
14
+ `;
15
+ export { createSchedulerEntryFields };
16
+
17
+ //# sourceMappingURL=fields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Gateways/graphql/fields.js","sources":["../../../src/Gateways/graphql/fields.ts"],"sourcesContent":["export const createSchedulerEntryFields = (): string => {\n return `\n id\n targetId\n namespace\n scheduledBy {\n id\n displayName\n type\n }\n publishOn\n unpublishOn\n actionType\n title\n `;\n};\n"],"names":["createSchedulerEntryFields"],"mappings":"AAAO,MAAMA,6BAA6B,IAC/B,CAAC;;;;;;;;;;;;;IAaR,CAAC"}
@@ -0,0 +1,5 @@
1
+ export type { ICancelScheduledActionGatewayParams, ICancelScheduledActionGateway } from "./abstractions/CancelScheduledActionGateway.js";
2
+ export type { IGetScheduledActionGatewayExecuteParams, IGetScheduledActionGateway, IGetScheduledActionGatewayResponse } from "./abstractions/GetScheduledActionGateway.js";
3
+ export type { IListScheduledActionsGatewayExecuteParams, IListScheduledActionsExecuteParamsSort, IListScheduledActionsExecuteParamsWhere, IListScheduledActionsGateway, IListScheduledActionsGatewayExecuteResponse } from "./abstractions/ListScheduledActionsGateway.js";
4
+ export type { ISchedulePublishActionGatewayExecuteParams, ISchedulePublishActionGateway, ISchedulePublishActionGatewayExecuteResponse } from "./abstractions/SchedulePublishActionGateway.js";
5
+ export type { IScheduleUnpublishActionGatewayExecuteParams, IScheduleUnpublishActionGateway, IScheduleUnpublishActionGatewayExecuteResponse } from "./abstractions/ScheduleUnpublishActionGateway.js";
File without changes
@@ -0,0 +1,16 @@
1
+ import zod from "zod";
2
+ import { ScheduleActionType } from "../../types.js";
3
+ export declare const schedulerEntrySchema: zod.ZodObject<{
4
+ id: zod.ZodString;
5
+ targetId: zod.ZodString;
6
+ namespace: zod.ZodString;
7
+ scheduledBy: zod.ZodObject<{
8
+ id: zod.ZodString;
9
+ displayName: zod.ZodString;
10
+ type: zod.ZodString;
11
+ }, zod.core.$strip>;
12
+ publishOn: zod.ZodPipe<zod.ZodOptional<zod.ZodNullable<zod.ZodString>>, zod.ZodTransform<Date | undefined, string | null | undefined>>;
13
+ unpublishOn: zod.ZodPipe<zod.ZodOptional<zod.ZodNullable<zod.ZodString>>, zod.ZodTransform<Date | undefined, string | null | undefined>>;
14
+ actionType: zod.ZodEnum<typeof ScheduleActionType>;
15
+ title: zod.ZodString;
16
+ }, zod.core.$strip>;
@@ -0,0 +1,19 @@
1
+ import zod from "zod";
2
+ import { ScheduleActionType } from "../../types.js";
3
+ const schedulerEntrySchema = zod.object({
4
+ id: zod.string(),
5
+ targetId: zod.string(),
6
+ namespace: zod.string(),
7
+ scheduledBy: zod.object({
8
+ id: zod.string(),
9
+ displayName: zod.string(),
10
+ type: zod.string()
11
+ }),
12
+ publishOn: zod.string().nullable().optional().transform((value)=>value ? new Date(value) : void 0),
13
+ unpublishOn: zod.string().nullable().optional().transform((value)=>value ? new Date(value) : void 0),
14
+ actionType: zod["enum"](ScheduleActionType),
15
+ title: zod.string()
16
+ });
17
+ export { schedulerEntrySchema };
18
+
19
+ //# sourceMappingURL=schedulerEntry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Gateways/schema/schedulerEntry.js","sources":["../../../src/Gateways/schema/schedulerEntry.ts"],"sourcesContent":["import zod from \"zod\";\nimport { ScheduleActionType } from \"~/types.js\";\n\nexport const schedulerEntrySchema = zod.object({\n id: zod.string(),\n targetId: zod.string(),\n namespace: zod.string(),\n scheduledBy: zod.object({\n id: zod.string(),\n displayName: zod.string(),\n type: zod.string()\n }),\n publishOn: zod\n .string()\n .nullable()\n .optional()\n .transform(value => {\n return !!value ? new Date(value) : undefined;\n }),\n unpublishOn: zod\n .string()\n .nullable()\n .optional()\n .transform(value => {\n return !!value ? new Date(value) : undefined;\n }),\n actionType: zod.enum(ScheduleActionType),\n title: zod.string()\n});\n"],"names":["schedulerEntrySchema","zod","value","Date","undefined","ScheduleActionType"],"mappings":";;AAGO,MAAMA,uBAAuBC,IAAI,MAAM,CAAC;IAC3C,IAAIA,IAAI,MAAM;IACd,UAAUA,IAAI,MAAM;IACpB,WAAWA,IAAI,MAAM;IACrB,aAAaA,IAAI,MAAM,CAAC;QACpB,IAAIA,IAAI,MAAM;QACd,aAAaA,IAAI,MAAM;QACvB,MAAMA,IAAI,MAAM;IACpB;IACA,WAAWA,IAAAA,MACA,GACN,QAAQ,GACR,QAAQ,GACR,SAAS,CAACC,CAAAA,QACA,AAAEA,QAAQ,IAAIC,KAAKD,SAASE;IAE3C,aAAaH,IAAAA,MACF,GACN,QAAQ,GACR,QAAQ,GACR,SAAS,CAACC,CAAAA,QACA,AAAEA,QAAQ,IAAIC,KAAKD,SAASE;IAE3C,YAAYH,GAAG,CAAHA,OAAQ,CAACI;IACrB,OAAOJ,IAAI,MAAM;AACrB"}