@webiny/app-scheduler 6.4.5 → 6.6.0-alpha.0

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 (521) hide show
  1. package/{Gateways/schema → domain}/schedulerEntry.d.ts +1 -1
  2. package/{Gateways/schema → domain}/schedulerEntry.js +1 -1
  3. package/domain/schedulerEntry.js.map +1 -0
  4. package/features/cancelScheduledAction/CancelScheduledActionGateway.d.ts +11 -0
  5. package/features/cancelScheduledAction/CancelScheduledActionGateway.js +41 -0
  6. package/features/cancelScheduledAction/CancelScheduledActionGateway.js.map +1 -0
  7. package/features/cancelScheduledAction/abstractions.d.ts +11 -0
  8. package/features/cancelScheduledAction/abstractions.js +5 -0
  9. package/features/cancelScheduledAction/abstractions.js.map +1 -0
  10. package/features/cancelScheduledAction/feature.d.ts +1 -0
  11. package/features/cancelScheduledAction/feature.js +11 -0
  12. package/features/cancelScheduledAction/feature.js.map +1 -0
  13. package/features/feature.d.ts +1 -0
  14. package/features/feature.js +19 -0
  15. package/features/feature.js.map +1 -0
  16. package/features/getScheduledAction/GetScheduledActionGateway.d.ts +11 -0
  17. package/features/getScheduledAction/GetScheduledActionGateway.js +57 -0
  18. package/features/getScheduledAction/GetScheduledActionGateway.js.map +1 -0
  19. package/{Gateways/abstractions/GetScheduledActionGateway.d.ts → features/getScheduledAction/abstractions.d.ts} +4 -0
  20. package/features/getScheduledAction/abstractions.js +5 -0
  21. package/features/getScheduledAction/abstractions.js.map +1 -0
  22. package/features/getScheduledAction/feature.d.ts +1 -0
  23. package/features/getScheduledAction/feature.js +11 -0
  24. package/features/getScheduledAction/feature.js.map +1 -0
  25. package/features/graphqlFields.d.ts +2 -0
  26. package/features/graphqlFields.js +23 -0
  27. package/features/graphqlFields.js.map +1 -0
  28. package/features/listScheduledActions/ListScheduledActionsGateway.d.ts +11 -0
  29. package/features/listScheduledActions/ListScheduledActionsGateway.js +84 -0
  30. package/features/listScheduledActions/ListScheduledActionsGateway.js.map +1 -0
  31. package/{Gateways/abstractions/ListScheduledActionsGateway.d.ts → features/listScheduledActions/abstractions.d.ts} +5 -2
  32. package/features/listScheduledActions/abstractions.js +5 -0
  33. package/features/listScheduledActions/abstractions.js.map +1 -0
  34. package/features/listScheduledActions/feature.d.ts +1 -0
  35. package/features/listScheduledActions/feature.js +11 -0
  36. package/features/listScheduledActions/feature.js.map +1 -0
  37. package/features/schedulePublishAction/SchedulePublishActionGateway.d.ts +11 -0
  38. package/features/schedulePublishAction/SchedulePublishActionGateway.js +67 -0
  39. package/features/schedulePublishAction/SchedulePublishActionGateway.js.map +1 -0
  40. package/{Gateways/abstractions/SchedulePublishActionGateway.d.ts → features/schedulePublishAction/abstractions.d.ts} +4 -0
  41. package/features/schedulePublishAction/abstractions.js +5 -0
  42. package/features/schedulePublishAction/abstractions.js.map +1 -0
  43. package/features/schedulePublishAction/feature.d.ts +1 -0
  44. package/features/schedulePublishAction/feature.js +11 -0
  45. package/features/schedulePublishAction/feature.js.map +1 -0
  46. package/features/scheduleUnpublishAction/ScheduleUnpublishActionGateway.d.ts +11 -0
  47. package/features/scheduleUnpublishAction/ScheduleUnpublishActionGateway.js +71 -0
  48. package/features/scheduleUnpublishAction/ScheduleUnpublishActionGateway.js.map +1 -0
  49. package/{Gateways/abstractions/ScheduleUnpublishActionGateway.d.ts → features/scheduleUnpublishAction/abstractions.d.ts} +4 -0
  50. package/features/scheduleUnpublishAction/abstractions.js +5 -0
  51. package/features/scheduleUnpublishAction/abstractions.js.map +1 -0
  52. package/features/scheduleUnpublishAction/feature.d.ts +1 -0
  53. package/features/scheduleUnpublishAction/feature.js +11 -0
  54. package/features/scheduleUnpublishAction/feature.js.map +1 -0
  55. package/index.d.ts +9 -1
  56. package/index.js +16 -1
  57. package/index.js.map +1 -0
  58. package/package.json +15 -16
  59. package/{Presentation → presentation}/SchedulerConfigs/SchedulerConfigs.js.map +1 -1
  60. package/{Presentation → presentation}/components/Actions/CancelItem/CancelItem.js +2 -3
  61. package/presentation/components/Actions/CancelItem/CancelItem.js.map +1 -0
  62. package/{Presentation → presentation}/components/BottomInfoBar/BottomInfoBar.styled.js.map +1 -1
  63. package/{Presentation → presentation}/components/BottomInfoBar/ListMeta.js.map +1 -1
  64. package/{Presentation → presentation}/components/BottomInfoBar/ListStatus.js.map +1 -1
  65. package/{Presentation → presentation}/components/Cells/CellActions/CellActions.js.map +1 -1
  66. package/{Presentation → presentation}/components/Cells/CellRevision/CellRevision.js.map +1 -1
  67. package/{Presentation → presentation}/components/Cells/CellRevision/CellRevision.styled.js.map +1 -1
  68. package/{Presentation → presentation}/components/Cells/CellScheduledBy/CellScheduledBy.js.map +1 -1
  69. package/{Presentation → presentation}/components/Cells/CellScheduledOn/CellScheduledOn.js.map +1 -1
  70. package/{Presentation → presentation}/components/Cells/CellTitle/CellTitle.js.map +1 -1
  71. package/{Presentation → presentation}/components/Cells/CellTitle/CellTitle.styled.js.map +1 -1
  72. package/{Presentation → presentation}/components/Cells/CellType/CellActionType.js.map +1 -1
  73. package/{Presentation → presentation}/components/Cells/CellType/CellActionType.styled.js.map +1 -1
  74. package/{Presentation → presentation}/components/Empty/Empty.styled.js.map +1 -1
  75. package/{Presentation → presentation}/components/Title/Title.js.map +1 -1
  76. package/{Presentation → presentation}/components/Title/Title.styled.js.map +1 -1
  77. package/{Presentation → presentation}/configs/list/Browser/EntryAction.d.ts +2 -1
  78. package/{Presentation → presentation}/configs/list/Browser/EntryAction.js.map +1 -1
  79. package/{Presentation → presentation}/configs/list/Browser/Table/Column.d.ts +4 -3
  80. package/{Presentation → presentation}/configs/list/Browser/Table/Column.js.map +1 -1
  81. package/{Presentation → presentation}/configs/list/Browser/Table/Sorting.js.map +1 -1
  82. package/presentation/configs/list/Browser/Table/index.d.ts +19 -0
  83. package/{Presentation → presentation}/configs/list/Browser/Table/index.js.map +1 -1
  84. package/presentation/configs/list/Browser/index.d.ts +23 -0
  85. package/{Presentation → presentation}/configs/list/Browser/index.js.map +1 -1
  86. package/{Presentation → presentation}/configs/list/SchedulerListConfig.d.ts +8 -6
  87. package/{Presentation → presentation}/configs/list/SchedulerListConfig.js.map +1 -1
  88. package/{Presentation → presentation}/hooks/index.d.ts +0 -1
  89. package/{Presentation → presentation}/hooks/index.js +0 -1
  90. package/{Presentation → presentation}/hooks/useCancelSchedulerItem.js +12 -7
  91. package/presentation/hooks/useCancelSchedulerItem.js.map +1 -0
  92. package/{Presentation → presentation}/hooks/useSchedulerItem.js.map +1 -1
  93. package/presentation/scheduleDialog/ScheduleDialogPresenter.d.ts +23 -0
  94. package/{Presentation/components/ScheduleDialog → presentation/scheduleDialog}/ScheduleDialogPresenter.js +22 -8
  95. package/presentation/scheduleDialog/ScheduleDialogPresenter.js.map +1 -0
  96. package/{Presentation/components/ScheduleDialog/IScheduleDialogPresenter.d.ts → presentation/scheduleDialog/abstractions.d.ts} +5 -1
  97. package/presentation/scheduleDialog/abstractions.js +5 -0
  98. package/presentation/scheduleDialog/abstractions.js.map +1 -0
  99. package/presentation/scheduleDialog/feature.d.ts +3 -0
  100. package/presentation/scheduleDialog/feature.js +17 -0
  101. package/presentation/scheduleDialog/feature.js.map +1 -0
  102. package/{Presentation/components/ScheduleDialog → presentation/scheduleDialog}/useScheduleDialog.d.ts +0 -2
  103. package/{Presentation/components/ScheduleDialog → presentation/scheduleDialog}/useScheduleDialog.js +63 -60
  104. package/presentation/scheduleDialog/useScheduleDialog.js.map +1 -0
  105. package/{Presentation/index.d.ts → presentation/schedulerList/Scheduler.d.ts} +2 -9
  106. package/presentation/schedulerList/Scheduler.js +28 -0
  107. package/presentation/schedulerList/Scheduler.js.map +1 -0
  108. package/presentation/schedulerList/SchedulerListDataSource.d.ts +15 -0
  109. package/presentation/schedulerList/SchedulerListDataSource.js +41 -0
  110. package/presentation/schedulerList/SchedulerListDataSource.js.map +1 -0
  111. package/presentation/schedulerList/SchedulerListPresenter.d.ts +21 -0
  112. package/presentation/schedulerList/SchedulerListPresenter.js +47 -0
  113. package/presentation/schedulerList/SchedulerListPresenter.js.map +1 -0
  114. package/presentation/schedulerList/abstractions.d.ts +13 -0
  115. package/presentation/schedulerList/abstractions.js +5 -0
  116. package/presentation/schedulerList/abstractions.js.map +1 -0
  117. package/presentation/schedulerList/components/BottomInfoBar.d.ts +9 -0
  118. package/presentation/schedulerList/components/BottomInfoBar.js +18 -0
  119. package/presentation/schedulerList/components/BottomInfoBar.js.map +1 -0
  120. package/presentation/schedulerList/components/Empty.d.ts +9 -0
  121. package/{Presentation/components/Empty → presentation/schedulerList/components}/Empty.js +6 -6
  122. package/presentation/schedulerList/components/Empty.js.map +1 -0
  123. package/presentation/schedulerList/components/SchedulerListView.d.ts +8 -0
  124. package/presentation/schedulerList/components/SchedulerListView.js +40 -0
  125. package/presentation/schedulerList/components/SchedulerListView.js.map +1 -0
  126. package/presentation/schedulerList/components/SchedulerOverlay.d.ts +11 -0
  127. package/presentation/schedulerList/components/SchedulerOverlay.js +38 -0
  128. package/presentation/schedulerList/components/SchedulerOverlay.js.map +1 -0
  129. package/presentation/schedulerList/components/SchedulerTable.d.ts +9 -0
  130. package/presentation/schedulerList/components/SchedulerTable.js +48 -0
  131. package/presentation/schedulerList/components/SchedulerTable.js.map +1 -0
  132. package/presentation/schedulerList/components/SearchInput.d.ts +9 -0
  133. package/{Presentation/components/SearchInput → presentation/schedulerList/components}/SearchInput.js +8 -8
  134. package/presentation/schedulerList/components/SearchInput.js.map +1 -0
  135. package/presentation/schedulerList/feature.d.ts +3 -0
  136. package/presentation/schedulerList/feature.js +17 -0
  137. package/presentation/schedulerList/feature.js.map +1 -0
  138. package/presentation/schedulerList/useSchedulerListPresenter.d.ts +1 -0
  139. package/presentation/schedulerList/useSchedulerListPresenter.js +6 -0
  140. package/presentation/schedulerList/useSchedulerListPresenter.js.map +1 -0
  141. package/types.d.ts +0 -7
  142. package/types.js +1 -9
  143. package/types.js.map +1 -1
  144. package/Domain/Models/SchedulerItem/SchedulerItem.d.ts +0 -13
  145. package/Domain/Models/SchedulerItem/SchedulerItem.js +0 -18
  146. package/Domain/Models/SchedulerItem/SchedulerItem.js.map +0 -1
  147. package/Domain/Models/SchedulerItem/index.d.ts +0 -1
  148. package/Domain/Models/SchedulerItem/index.js +0 -1
  149. package/Domain/Models/index.d.ts +0 -1
  150. package/Domain/Models/index.js +0 -1
  151. package/Domain/Repositories/SchedulerItems/ISchedulerItemsRepository.d.ts +0 -14
  152. package/Domain/Repositories/SchedulerItems/ISchedulerItemsRepository.js +0 -0
  153. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepository.d.ts +0 -36
  154. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepository.js +0 -119
  155. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepository.js.map +0 -1
  156. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryFactory.d.ts +0 -19
  157. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryFactory.js +0 -18
  158. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryFactory.js.map +0 -1
  159. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryWithLoading.d.ts +0 -17
  160. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryWithLoading.js +0 -39
  161. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryWithLoading.js.map +0 -1
  162. package/Domain/Repositories/SchedulerItems/index.d.ts +0 -4
  163. package/Domain/Repositories/SchedulerItems/index.js +0 -3
  164. package/Domain/Repositories/Search/ISearchRepository.d.ts +0 -4
  165. package/Domain/Repositories/Search/ISearchRepository.js +0 -0
  166. package/Domain/Repositories/Search/SearchRepository.d.ts +0 -7
  167. package/Domain/Repositories/Search/SearchRepository.js +0 -16
  168. package/Domain/Repositories/Search/SearchRepository.js.map +0 -1
  169. package/Domain/Repositories/Search/SearchRepositoryFactory.d.ts +0 -7
  170. package/Domain/Repositories/Search/SearchRepositoryFactory.js +0 -18
  171. package/Domain/Repositories/Search/SearchRepositoryFactory.js.map +0 -1
  172. package/Domain/Repositories/Search/index.d.ts +0 -3
  173. package/Domain/Repositories/Search/index.js +0 -2
  174. package/Domain/Repositories/SelectedItems/ISelectedItemsRepository.d.ts +0 -8
  175. package/Domain/Repositories/SelectedItems/ISelectedItemsRepository.js +0 -0
  176. package/Domain/Repositories/SelectedItems/SelectedItemsRepository.d.ts +0 -12
  177. package/Domain/Repositories/SelectedItems/SelectedItemsRepository.js +0 -28
  178. package/Domain/Repositories/SelectedItems/SelectedItemsRepository.js.map +0 -1
  179. package/Domain/Repositories/SelectedItems/SelectedItemsRepositoryFactory.d.ts +0 -7
  180. package/Domain/Repositories/SelectedItems/SelectedItemsRepositoryFactory.js +0 -18
  181. package/Domain/Repositories/SelectedItems/SelectedItemsRepositoryFactory.js.map +0 -1
  182. package/Domain/Repositories/SelectedItems/index.d.ts +0 -3
  183. package/Domain/Repositories/SelectedItems/index.js +0 -2
  184. package/Domain/Repositories/Sorting/SortingRepositoryWithDefaults.d.ts +0 -8
  185. package/Domain/Repositories/Sorting/SortingRepositoryWithDefaults.js +0 -21
  186. package/Domain/Repositories/Sorting/SortingRepositoryWithDefaults.js.map +0 -1
  187. package/Domain/Repositories/Sorting/index.d.ts +0 -1
  188. package/Domain/Repositories/Sorting/index.js +0 -1
  189. package/Domain/Repositories/index.d.ts +0 -4
  190. package/Domain/Repositories/index.js +0 -4
  191. package/Domain/index.d.ts +0 -2
  192. package/Domain/index.js +0 -2
  193. package/Gateways/SchedulerCancelGraphQLGateway.d.ts +0 -7
  194. package/Gateways/SchedulerCancelGraphQLGateway.js +0 -42
  195. package/Gateways/SchedulerCancelGraphQLGateway.js.map +0 -1
  196. package/Gateways/SchedulerGetGraphQLGateway.d.ts +0 -21
  197. package/Gateways/SchedulerGetGraphQLGateway.js +0 -68
  198. package/Gateways/SchedulerGetGraphQLGateway.js.map +0 -1
  199. package/Gateways/SchedulerListGraphQLGateway.d.ts +0 -7
  200. package/Gateways/SchedulerListGraphQLGateway.js +0 -86
  201. package/Gateways/SchedulerListGraphQLGateway.js.map +0 -1
  202. package/Gateways/SchedulerPublishGraphQLGateway.d.ts +0 -7
  203. package/Gateways/SchedulerPublishGraphQLGateway.js +0 -59
  204. package/Gateways/SchedulerPublishGraphQLGateway.js.map +0 -1
  205. package/Gateways/SchedulerUnpublishGraphQLGateway.d.ts +0 -23
  206. package/Gateways/SchedulerUnpublishGraphQLGateway.js +0 -63
  207. package/Gateways/SchedulerUnpublishGraphQLGateway.js.map +0 -1
  208. package/Gateways/abstractions/CancelScheduledActionGateway.d.ts +0 -7
  209. package/Gateways/abstractions/CancelScheduledActionGateway.js +0 -0
  210. package/Gateways/abstractions/GetScheduledActionGateway.js +0 -0
  211. package/Gateways/abstractions/ListScheduledActionsGateway.js +0 -0
  212. package/Gateways/abstractions/SchedulePublishActionGateway.js +0 -0
  213. package/Gateways/abstractions/ScheduleUnpublishActionGateway.js +0 -0
  214. package/Gateways/graphql/fields.d.ts +0 -1
  215. package/Gateways/graphql/fields.js +0 -17
  216. package/Gateways/graphql/fields.js.map +0 -1
  217. package/Gateways/index.d.ts +0 -5
  218. package/Gateways/index.js +0 -0
  219. package/Gateways/schema/schedulerEntry.js.map +0 -1
  220. package/Presentation/Scheduler/Scheduler.d.ts +0 -17
  221. package/Presentation/Scheduler/Scheduler.js +0 -78
  222. package/Presentation/Scheduler/Scheduler.js.map +0 -1
  223. package/Presentation/Scheduler/SchedulerControllers.d.ts +0 -30
  224. package/Presentation/Scheduler/SchedulerControllers.js +0 -54
  225. package/Presentation/Scheduler/SchedulerControllers.js.map +0 -1
  226. package/Presentation/Scheduler/SchedulerPresenter.d.ts +0 -32
  227. package/Presentation/Scheduler/SchedulerPresenter.js +0 -45
  228. package/Presentation/Scheduler/SchedulerPresenter.js.map +0 -1
  229. package/Presentation/Scheduler/controllers/CancelItem/CancelItemController.d.ts +0 -7
  230. package/Presentation/Scheduler/controllers/CancelItem/CancelItemController.js +0 -12
  231. package/Presentation/Scheduler/controllers/CancelItem/CancelItemController.js.map +0 -1
  232. package/Presentation/Scheduler/controllers/CancelItem/ICancelItemController.d.ts +0 -3
  233. package/Presentation/Scheduler/controllers/CancelItem/ICancelItemController.js +0 -0
  234. package/Presentation/Scheduler/controllers/CancelItem/index.d.ts +0 -2
  235. package/Presentation/Scheduler/controllers/CancelItem/index.js +0 -1
  236. package/Presentation/Scheduler/controllers/GetItem/GetItemController.d.ts +0 -8
  237. package/Presentation/Scheduler/controllers/GetItem/GetItemController.js +0 -12
  238. package/Presentation/Scheduler/controllers/GetItem/GetItemController.js.map +0 -1
  239. package/Presentation/Scheduler/controllers/GetItem/IGetItemController.d.ts +0 -4
  240. package/Presentation/Scheduler/controllers/GetItem/IGetItemController.js +0 -0
  241. package/Presentation/Scheduler/controllers/GetItem/index.d.ts +0 -2
  242. package/Presentation/Scheduler/controllers/GetItem/index.js +0 -1
  243. package/Presentation/Scheduler/controllers/ListItems/IListItemsController.d.ts +0 -4
  244. package/Presentation/Scheduler/controllers/ListItems/IListItemsController.js +0 -0
  245. package/Presentation/Scheduler/controllers/ListItems/ListItemsController.d.ts +0 -8
  246. package/Presentation/Scheduler/controllers/ListItems/ListItemsController.js +0 -12
  247. package/Presentation/Scheduler/controllers/ListItems/ListItemsController.js.map +0 -1
  248. package/Presentation/Scheduler/controllers/ListItems/index.d.ts +0 -2
  249. package/Presentation/Scheduler/controllers/ListItems/index.js +0 -1
  250. package/Presentation/Scheduler/controllers/ListMoreItems/IListMoreItemsController.d.ts +0 -3
  251. package/Presentation/Scheduler/controllers/ListMoreItems/IListMoreItemsController.js +0 -0
  252. package/Presentation/Scheduler/controllers/ListMoreItems/ListMoreItemsController.d.ts +0 -7
  253. package/Presentation/Scheduler/controllers/ListMoreItems/ListMoreItemsController.js +0 -12
  254. package/Presentation/Scheduler/controllers/ListMoreItems/ListMoreItemsController.js.map +0 -1
  255. package/Presentation/Scheduler/controllers/ListMoreItems/index.d.ts +0 -2
  256. package/Presentation/Scheduler/controllers/ListMoreItems/index.js +0 -1
  257. package/Presentation/Scheduler/controllers/PublishItem/IPublishItemController.d.ts +0 -3
  258. package/Presentation/Scheduler/controllers/PublishItem/IPublishItemController.js +0 -0
  259. package/Presentation/Scheduler/controllers/PublishItem/PublishItemController.d.ts +0 -7
  260. package/Presentation/Scheduler/controllers/PublishItem/PublishItemController.js +0 -12
  261. package/Presentation/Scheduler/controllers/PublishItem/PublishItemController.js.map +0 -1
  262. package/Presentation/Scheduler/controllers/PublishItem/index.d.ts +0 -2
  263. package/Presentation/Scheduler/controllers/PublishItem/index.js +0 -1
  264. package/Presentation/Scheduler/controllers/SearchItems/ISearchItemsController.d.ts +0 -3
  265. package/Presentation/Scheduler/controllers/SearchItems/ISearchItemsController.js +0 -0
  266. package/Presentation/Scheduler/controllers/SearchItems/SearchItemsController.d.ts +0 -8
  267. package/Presentation/Scheduler/controllers/SearchItems/SearchItemsController.js +0 -15
  268. package/Presentation/Scheduler/controllers/SearchItems/SearchItemsController.js.map +0 -1
  269. package/Presentation/Scheduler/controllers/SearchItems/index.d.ts +0 -2
  270. package/Presentation/Scheduler/controllers/SearchItems/index.js +0 -1
  271. package/Presentation/Scheduler/controllers/SelectAllItems/ISelectAllItemsController.d.ts +0 -3
  272. package/Presentation/Scheduler/controllers/SelectAllItems/ISelectAllItemsController.js +0 -0
  273. package/Presentation/Scheduler/controllers/SelectAllItems/SelectAllItemsController.d.ts +0 -7
  274. package/Presentation/Scheduler/controllers/SelectAllItems/SelectAllItemsController.js +0 -12
  275. package/Presentation/Scheduler/controllers/SelectAllItems/SelectAllItemsController.js.map +0 -1
  276. package/Presentation/Scheduler/controllers/SelectAllItems/index.d.ts +0 -2
  277. package/Presentation/Scheduler/controllers/SelectAllItems/index.js +0 -1
  278. package/Presentation/Scheduler/controllers/SelectItems/ISelectItemsController.d.ts +0 -4
  279. package/Presentation/Scheduler/controllers/SelectItems/ISelectItemsController.js +0 -0
  280. package/Presentation/Scheduler/controllers/SelectItems/SelectItemsController.d.ts +0 -8
  281. package/Presentation/Scheduler/controllers/SelectItems/SelectItemsController.js +0 -14
  282. package/Presentation/Scheduler/controllers/SelectItems/SelectItemsController.js.map +0 -1
  283. package/Presentation/Scheduler/controllers/SelectItems/index.d.ts +0 -2
  284. package/Presentation/Scheduler/controllers/SelectItems/index.js +0 -1
  285. package/Presentation/Scheduler/controllers/SortItems/ISortItemsController.d.ts +0 -4
  286. package/Presentation/Scheduler/controllers/SortItems/ISortItemsController.js +0 -0
  287. package/Presentation/Scheduler/controllers/SortItems/SortItemsController.d.ts +0 -9
  288. package/Presentation/Scheduler/controllers/SortItems/SortItemsController.js +0 -18
  289. package/Presentation/Scheduler/controllers/SortItems/SortItemsController.js.map +0 -1
  290. package/Presentation/Scheduler/controllers/SortItems/index.d.ts +0 -2
  291. package/Presentation/Scheduler/controllers/SortItems/index.js +0 -1
  292. package/Presentation/Scheduler/controllers/UnpublishItem/IUnpublishItemController.d.ts +0 -3
  293. package/Presentation/Scheduler/controllers/UnpublishItem/IUnpublishItemController.js +0 -0
  294. package/Presentation/Scheduler/controllers/UnpublishItem/UnpublishItemController.d.ts +0 -7
  295. package/Presentation/Scheduler/controllers/UnpublishItem/UnpublishItemController.js +0 -12
  296. package/Presentation/Scheduler/controllers/UnpublishItem/UnpublishItemController.js.map +0 -1
  297. package/Presentation/Scheduler/controllers/UnpublishItem/index.d.ts +0 -2
  298. package/Presentation/Scheduler/controllers/UnpublishItem/index.js +0 -1
  299. package/Presentation/Scheduler/controllers/UnselectAllItems/IUnselectAllItemsController.d.ts +0 -3
  300. package/Presentation/Scheduler/controllers/UnselectAllItems/IUnselectAllItemsController.js +0 -0
  301. package/Presentation/Scheduler/controllers/UnselectAllItems/UnselectAllItemsController.d.ts +0 -7
  302. package/Presentation/Scheduler/controllers/UnselectAllItems/UnselectAllItemsController.js +0 -12
  303. package/Presentation/Scheduler/controllers/UnselectAllItems/UnselectAllItemsController.js.map +0 -1
  304. package/Presentation/Scheduler/controllers/UnselectAllItems/index.d.ts +0 -2
  305. package/Presentation/Scheduler/controllers/UnselectAllItems/index.js +0 -1
  306. package/Presentation/Scheduler/controllers/index.d.ts +0 -11
  307. package/Presentation/Scheduler/controllers/index.js +0 -11
  308. package/Presentation/Scheduler/index.d.ts +0 -1
  309. package/Presentation/Scheduler/index.js +0 -1
  310. package/Presentation/SchedulerRenderer/SchedulerRenderer.d.ts +0 -6
  311. package/Presentation/SchedulerRenderer/SchedulerRenderer.js +0 -16
  312. package/Presentation/SchedulerRenderer/SchedulerRenderer.js.map +0 -1
  313. package/Presentation/SchedulerRenderer/index.d.ts +0 -1
  314. package/Presentation/SchedulerRenderer/index.js +0 -1
  315. package/Presentation/abstractions/ISchedulerControllers.d.ts +0 -14
  316. package/Presentation/abstractions/ISchedulerControllers.js +0 -0
  317. package/Presentation/abstractions/ISchedulerPresenter.d.ts +0 -20
  318. package/Presentation/abstractions/ISchedulerPresenter.js +0 -0
  319. package/Presentation/abstractions/index.d.ts +0 -2
  320. package/Presentation/abstractions/index.js +0 -0
  321. package/Presentation/components/Actions/CancelItem/CancelItem.js.map +0 -1
  322. package/Presentation/components/BottomInfoBar/BottomInfoBar.d.ts +0 -2
  323. package/Presentation/components/BottomInfoBar/BottomInfoBar.js +0 -19
  324. package/Presentation/components/BottomInfoBar/BottomInfoBar.js.map +0 -1
  325. package/Presentation/components/BottomInfoBar/index.d.ts +0 -1
  326. package/Presentation/components/BottomInfoBar/index.js +0 -1
  327. package/Presentation/components/Empty/Empty.d.ts +0 -2
  328. package/Presentation/components/Empty/Empty.js.map +0 -1
  329. package/Presentation/components/Empty/index.d.ts +0 -1
  330. package/Presentation/components/Empty/index.js +0 -1
  331. package/Presentation/components/ScheduleDialog/IScheduleDialogPresenter.js +0 -0
  332. package/Presentation/components/ScheduleDialog/ScheduleDialogPresenter.d.ts +0 -22
  333. package/Presentation/components/ScheduleDialog/ScheduleDialogPresenter.js.map +0 -1
  334. package/Presentation/components/ScheduleDialog/index.d.ts +0 -1
  335. package/Presentation/components/ScheduleDialog/index.js +0 -1
  336. package/Presentation/components/ScheduleDialog/types.d.ts +0 -15
  337. package/Presentation/components/ScheduleDialog/types.js +0 -0
  338. package/Presentation/components/ScheduleDialog/useScheduleDialog.js.map +0 -1
  339. package/Presentation/components/SchedulerOverlay/SchedulerOverlay.d.ts +0 -7
  340. package/Presentation/components/SchedulerOverlay/SchedulerOverlay.js +0 -30
  341. package/Presentation/components/SchedulerOverlay/SchedulerOverlay.js.map +0 -1
  342. package/Presentation/components/SchedulerOverlay/index.d.ts +0 -1
  343. package/Presentation/components/SchedulerOverlay/index.js +0 -1
  344. package/Presentation/components/SearchInput/SearchInput.d.ts +0 -2
  345. package/Presentation/components/SearchInput/SearchInput.js.map +0 -1
  346. package/Presentation/components/SearchInput/index.d.ts +0 -1
  347. package/Presentation/components/SearchInput/index.js +0 -1
  348. package/Presentation/components/Table/Table.d.ts +0 -2
  349. package/Presentation/components/Table/Table.js +0 -29
  350. package/Presentation/components/Table/Table.js.map +0 -1
  351. package/Presentation/components/Table/index.d.ts +0 -1
  352. package/Presentation/components/Table/index.js +0 -1
  353. package/Presentation/configs/list/Browser/Table/index.d.ts +0 -18
  354. package/Presentation/configs/list/Browser/index.d.ts +0 -23
  355. package/Presentation/hooks/useCancelSchedulerItem.js.map +0 -1
  356. package/Presentation/hooks/useScheduler.d.ts +0 -28
  357. package/Presentation/hooks/useScheduler.js +0 -68
  358. package/Presentation/hooks/useScheduler.js.map +0 -1
  359. package/Presentation/index.js +0 -49
  360. package/Presentation/index.js.map +0 -1
  361. package/UseCases/CancelItem/CancelItemUseCase.d.ts +0 -7
  362. package/UseCases/CancelItem/CancelItemUseCase.js +0 -13
  363. package/UseCases/CancelItem/CancelItemUseCase.js.map +0 -1
  364. package/UseCases/CancelItem/ICancelItemUseCase.d.ts +0 -3
  365. package/UseCases/CancelItem/ICancelItemUseCase.js +0 -0
  366. package/UseCases/CancelItem/index.d.ts +0 -2
  367. package/UseCases/CancelItem/index.js +0 -1
  368. package/UseCases/GetItem/GetItemUseCase.d.ts +0 -8
  369. package/UseCases/GetItem/GetItemUseCase.js +0 -13
  370. package/UseCases/GetItem/GetItemUseCase.js.map +0 -1
  371. package/UseCases/GetItem/IGetItemUseCase.d.ts +0 -4
  372. package/UseCases/GetItem/IGetItemUseCase.js +0 -0
  373. package/UseCases/GetItem/index.d.ts +0 -2
  374. package/UseCases/GetItem/index.js +0 -1
  375. package/UseCases/GetScheduledItem/GetScheduledItemUseCase.d.ts +0 -7
  376. package/UseCases/GetScheduledItem/GetScheduledItemUseCase.js +0 -14
  377. package/UseCases/GetScheduledItem/GetScheduledItemUseCase.js.map +0 -1
  378. package/UseCases/GetScheduledItem/IGetScheduledItemUseCase.d.ts +0 -4
  379. package/UseCases/GetScheduledItem/IGetScheduledItemUseCase.js +0 -0
  380. package/UseCases/GetScheduledItem/index.d.ts +0 -2
  381. package/UseCases/GetScheduledItem/index.js +0 -1
  382. package/UseCases/ListItems/IListItemsUseCase.d.ts +0 -4
  383. package/UseCases/ListItems/IListItemsUseCase.js +0 -0
  384. package/UseCases/ListItems/ListItemsUseCase.d.ts +0 -8
  385. package/UseCases/ListItems/ListItemsUseCase.js +0 -13
  386. package/UseCases/ListItems/ListItemsUseCase.js.map +0 -1
  387. package/UseCases/ListItems/ListItemsUseCaseWithSearch.d.ts +0 -9
  388. package/UseCases/ListItems/ListItemsUseCaseWithSearch.js +0 -23
  389. package/UseCases/ListItems/ListItemsUseCaseWithSearch.js.map +0 -1
  390. package/UseCases/ListItems/ListItemsUseCaseWithSorting.d.ts +0 -9
  391. package/UseCases/ListItems/ListItemsUseCaseWithSorting.js +0 -21
  392. package/UseCases/ListItems/ListItemsUseCaseWithSorting.js.map +0 -1
  393. package/UseCases/ListItems/index.d.ts +0 -4
  394. package/UseCases/ListItems/index.js +0 -3
  395. package/UseCases/ListMoreItems/IListMoreItemsUseCase.d.ts +0 -3
  396. package/UseCases/ListMoreItems/IListMoreItemsUseCase.js +0 -0
  397. package/UseCases/ListMoreItems/ListMoreItemsUseCase.d.ts +0 -7
  398. package/UseCases/ListMoreItems/ListMoreItemsUseCase.js +0 -13
  399. package/UseCases/ListMoreItems/ListMoreItemsUseCase.js.map +0 -1
  400. package/UseCases/ListMoreItems/index.d.ts +0 -2
  401. package/UseCases/ListMoreItems/index.js +0 -1
  402. package/UseCases/PublishItem/IPublishItemUseCase.d.ts +0 -3
  403. package/UseCases/PublishItem/IPublishItemUseCase.js +0 -0
  404. package/UseCases/PublishItem/PublishItemUseCase.d.ts +0 -7
  405. package/UseCases/PublishItem/PublishItemUseCase.js +0 -13
  406. package/UseCases/PublishItem/PublishItemUseCase.js.map +0 -1
  407. package/UseCases/PublishItem/index.d.ts +0 -2
  408. package/UseCases/PublishItem/index.js +0 -1
  409. package/UseCases/SearchItems/ISearchItemsUseCase.d.ts +0 -3
  410. package/UseCases/SearchItems/ISearchItemsUseCase.js +0 -0
  411. package/UseCases/SearchItems/SearchItemsUseCase.d.ts +0 -7
  412. package/UseCases/SearchItems/SearchItemsUseCase.js +0 -13
  413. package/UseCases/SearchItems/SearchItemsUseCase.js.map +0 -1
  414. package/UseCases/SearchItems/index.d.ts +0 -2
  415. package/UseCases/SearchItems/index.js +0 -1
  416. package/UseCases/SelectAllItems/ISelectAllItemsUseCase.d.ts +0 -3
  417. package/UseCases/SelectAllItems/ISelectAllItemsUseCase.js +0 -0
  418. package/UseCases/SelectAllItems/SelectAllItemsUseCase.d.ts +0 -7
  419. package/UseCases/SelectAllItems/SelectAllItemsUseCase.js +0 -13
  420. package/UseCases/SelectAllItems/SelectAllItemsUseCase.js.map +0 -1
  421. package/UseCases/SelectAllItems/index.d.ts +0 -2
  422. package/UseCases/SelectAllItems/index.js +0 -1
  423. package/UseCases/SelectItems/ISelectItemsUseCase.d.ts +0 -4
  424. package/UseCases/SelectItems/ISelectItemsUseCase.js +0 -0
  425. package/UseCases/SelectItems/SelectItemsUseCase.d.ts +0 -7
  426. package/UseCases/SelectItems/SelectItemsUseCase.js +0 -13
  427. package/UseCases/SelectItems/SelectItemsUseCase.js.map +0 -1
  428. package/UseCases/SelectItems/index.d.ts +0 -2
  429. package/UseCases/SelectItems/index.js +0 -1
  430. package/UseCases/SortItems/ISortItemsUseCase.d.ts +0 -4
  431. package/UseCases/SortItems/ISortItemsUseCase.js +0 -0
  432. package/UseCases/SortItems/SortItemsUseCase.d.ts +0 -7
  433. package/UseCases/SortItems/SortItemsUseCase.js +0 -13
  434. package/UseCases/SortItems/SortItemsUseCase.js.map +0 -1
  435. package/UseCases/SortItems/index.d.ts +0 -2
  436. package/UseCases/SortItems/index.js +0 -1
  437. package/UseCases/UnSelectAllItems/IUnselectAllItemsUseCase.d.ts +0 -3
  438. package/UseCases/UnSelectAllItems/IUnselectAllItemsUseCase.js +0 -0
  439. package/UseCases/UnSelectAllItems/UnselectAllItemsUseCase.d.ts +0 -7
  440. package/UseCases/UnSelectAllItems/UnselectAllItemsUseCase.js +0 -13
  441. package/UseCases/UnSelectAllItems/UnselectAllItemsUseCase.js.map +0 -1
  442. package/UseCases/UnSelectAllItems/index.d.ts +0 -2
  443. package/UseCases/UnSelectAllItems/index.js +0 -1
  444. package/UseCases/UnpublishItem/IUnpublishItemUseCase.d.ts +0 -3
  445. package/UseCases/UnpublishItem/IUnpublishItemUseCase.js +0 -0
  446. package/UseCases/UnpublishItem/UnpublishItemUseCase.d.ts +0 -7
  447. package/UseCases/UnpublishItem/UnpublishItemUseCase.js +0 -13
  448. package/UseCases/UnpublishItem/UnpublishItemUseCase.js.map +0 -1
  449. package/UseCases/UnpublishItem/index.d.ts +0 -2
  450. package/UseCases/UnpublishItem/index.js +0 -1
  451. package/UseCases/index.d.ts +0 -11
  452. package/UseCases/index.js +0 -11
  453. /package/{Presentation → presentation}/SchedulerConfigs/SchedulerConfigs.d.ts +0 -0
  454. /package/{Presentation → presentation}/SchedulerConfigs/SchedulerConfigs.js +0 -0
  455. /package/{Presentation → presentation}/SchedulerConfigs/index.d.ts +0 -0
  456. /package/{Presentation → presentation}/SchedulerConfigs/index.js +0 -0
  457. /package/{Presentation → presentation}/components/Actions/CancelItem/CancelItem.d.ts +0 -0
  458. /package/{Presentation → presentation}/components/Actions/CancelItem/index.d.ts +0 -0
  459. /package/{Presentation → presentation}/components/Actions/CancelItem/index.js +0 -0
  460. /package/{Presentation → presentation}/components/Actions/index.d.ts +0 -0
  461. /package/{Presentation → presentation}/components/Actions/index.js +0 -0
  462. /package/{Presentation → presentation}/components/BottomInfoBar/BottomInfoBar.styled.d.ts +0 -0
  463. /package/{Presentation → presentation}/components/BottomInfoBar/BottomInfoBar.styled.js +0 -0
  464. /package/{Presentation → presentation}/components/BottomInfoBar/ListMeta.d.ts +0 -0
  465. /package/{Presentation → presentation}/components/BottomInfoBar/ListMeta.js +0 -0
  466. /package/{Presentation → presentation}/components/BottomInfoBar/ListStatus.d.ts +0 -0
  467. /package/{Presentation → presentation}/components/BottomInfoBar/ListStatus.js +0 -0
  468. /package/{Presentation → presentation}/components/Cells/CellActions/CellActions.d.ts +0 -0
  469. /package/{Presentation → presentation}/components/Cells/CellActions/CellActions.js +0 -0
  470. /package/{Presentation → presentation}/components/Cells/CellActions/index.d.ts +0 -0
  471. /package/{Presentation → presentation}/components/Cells/CellActions/index.js +0 -0
  472. /package/{Presentation → presentation}/components/Cells/CellRevision/CellRevision.d.ts +0 -0
  473. /package/{Presentation → presentation}/components/Cells/CellRevision/CellRevision.js +0 -0
  474. /package/{Presentation → presentation}/components/Cells/CellRevision/CellRevision.styled.d.ts +0 -0
  475. /package/{Presentation → presentation}/components/Cells/CellRevision/CellRevision.styled.js +0 -0
  476. /package/{Presentation → presentation}/components/Cells/CellRevision/index.d.ts +0 -0
  477. /package/{Presentation → presentation}/components/Cells/CellRevision/index.js +0 -0
  478. /package/{Presentation → presentation}/components/Cells/CellScheduledBy/CellScheduledBy.d.ts +0 -0
  479. /package/{Presentation → presentation}/components/Cells/CellScheduledBy/CellScheduledBy.js +0 -0
  480. /package/{Presentation → presentation}/components/Cells/CellScheduledBy/index.d.ts +0 -0
  481. /package/{Presentation → presentation}/components/Cells/CellScheduledBy/index.js +0 -0
  482. /package/{Presentation → presentation}/components/Cells/CellScheduledOn/CellScheduledOn.d.ts +0 -0
  483. /package/{Presentation → presentation}/components/Cells/CellScheduledOn/CellScheduledOn.js +0 -0
  484. /package/{Presentation → presentation}/components/Cells/CellScheduledOn/index.d.ts +0 -0
  485. /package/{Presentation → presentation}/components/Cells/CellScheduledOn/index.js +0 -0
  486. /package/{Presentation → presentation}/components/Cells/CellTitle/CellTitle.d.ts +0 -0
  487. /package/{Presentation → presentation}/components/Cells/CellTitle/CellTitle.js +0 -0
  488. /package/{Presentation → presentation}/components/Cells/CellTitle/CellTitle.styled.d.ts +0 -0
  489. /package/{Presentation → presentation}/components/Cells/CellTitle/CellTitle.styled.js +0 -0
  490. /package/{Presentation → presentation}/components/Cells/CellTitle/index.d.ts +0 -0
  491. /package/{Presentation → presentation}/components/Cells/CellTitle/index.js +0 -0
  492. /package/{Presentation → presentation}/components/Cells/CellType/CellActionType.d.ts +0 -0
  493. /package/{Presentation → presentation}/components/Cells/CellType/CellActionType.js +0 -0
  494. /package/{Presentation → presentation}/components/Cells/CellType/CellActionType.styled.d.ts +0 -0
  495. /package/{Presentation → presentation}/components/Cells/CellType/CellActionType.styled.js +0 -0
  496. /package/{Presentation → presentation}/components/Cells/CellType/index.d.ts +0 -0
  497. /package/{Presentation → presentation}/components/Cells/CellType/index.js +0 -0
  498. /package/{Presentation → presentation}/components/Cells/index.d.ts +0 -0
  499. /package/{Presentation → presentation}/components/Cells/index.js +0 -0
  500. /package/{Presentation → presentation}/components/Empty/Empty.styled.d.ts +0 -0
  501. /package/{Presentation → presentation}/components/Empty/Empty.styled.js +0 -0
  502. /package/{Presentation → presentation}/components/Title/Title.d.ts +0 -0
  503. /package/{Presentation → presentation}/components/Title/Title.js +0 -0
  504. /package/{Presentation → presentation}/components/Title/Title.styled.d.ts +0 -0
  505. /package/{Presentation → presentation}/components/Title/Title.styled.js +0 -0
  506. /package/{Presentation → presentation}/components/Title/index.d.ts +0 -0
  507. /package/{Presentation → presentation}/components/Title/index.js +0 -0
  508. /package/{Presentation → presentation}/configs/index.d.ts +0 -0
  509. /package/{Presentation → presentation}/configs/index.js +0 -0
  510. /package/{Presentation → presentation}/configs/list/Browser/EntryAction.js +0 -0
  511. /package/{Presentation → presentation}/configs/list/Browser/Table/Column.js +0 -0
  512. /package/{Presentation → presentation}/configs/list/Browser/Table/Sorting.d.ts +0 -0
  513. /package/{Presentation → presentation}/configs/list/Browser/Table/Sorting.js +0 -0
  514. /package/{Presentation → presentation}/configs/list/Browser/Table/index.js +0 -0
  515. /package/{Presentation → presentation}/configs/list/Browser/index.js +0 -0
  516. /package/{Presentation → presentation}/configs/list/SchedulerListConfig.js +0 -0
  517. /package/{Presentation → presentation}/configs/list/index.d.ts +0 -0
  518. /package/{Presentation → presentation}/configs/list/index.js +0 -0
  519. /package/{Presentation → presentation}/hooks/useCancelSchedulerItem.d.ts +0 -0
  520. /package/{Presentation → presentation}/hooks/useSchedulerItem.d.ts +0 -0
  521. /package/{Presentation → presentation}/hooks/useSchedulerItem.js +0 -0
@@ -1,21 +0,0 @@
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
- }
@@ -1,68 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,7 +0,0 @@
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
- }
@@ -1,86 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,7 +0,0 @@
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
- }
@@ -1,59 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,23 +0,0 @@
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
- }
@@ -1,63 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,7 +0,0 @@
1
- export interface ICancelScheduledActionGatewayParams {
2
- namespace: string;
3
- id: string;
4
- }
5
- export interface ICancelScheduledActionGateway {
6
- execute(params: ICancelScheduledActionGatewayParams): Promise<void>;
7
- }
@@ -1 +0,0 @@
1
- export declare const createSchedulerEntryFields: () => string;
@@ -1,17 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,5 +0,0 @@
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";
package/Gateways/index.js DELETED
File without changes
@@ -1 +0,0 @@
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"}
@@ -1,17 +0,0 @@
1
- import React from "react";
2
- import type { Sorting } from "@webiny/app-utils";
3
- import type { ICancelScheduledActionGateway, IGetScheduledActionGateway, IListScheduledActionsGateway, ISchedulePublishActionGateway, IScheduleUnpublishActionGateway } from "../../Gateways/index.js";
4
- export interface SchedulerProps {
5
- namespace: string;
6
- getGateway: IGetScheduledActionGateway;
7
- listGateway: IListScheduledActionsGateway;
8
- cancelGateway: ICancelScheduledActionGateway;
9
- publishGateway: ISchedulePublishActionGateway;
10
- unpublishGateway: IScheduleUnpublishActionGateway;
11
- onClose: () => void;
12
- sorting: Sorting[];
13
- title: string;
14
- }
15
- export declare const Scheduler: ((props: SchedulerProps) => React.JSX.Element) & {
16
- displayName: string;
17
- };
@@ -1,78 +0,0 @@
1
- import react, { useEffect, useMemo } from "react";
2
- import { observer } from "mobx-react-lite";
3
- import { loadingRepositoryFactory, metaRepositoryFactory, sortRepositoryFactory } from "@webiny/app-utils";
4
- import { SchedulerProvider } from "../hooks/index.js";
5
- import { SchedulerOverlay } from "../components/SchedulerOverlay/index.js";
6
- import { SchedulerPresenter } from "./SchedulerPresenter.js";
7
- import { SchedulerItemsRepositoryWithLoading, SortingRepositoryWithDefaults, schedulerItemsRepositoryFactory, searchRepositoryFactory, selectedItemsRepositoryFactory } from "../../Domain/index.js";
8
- import { SchedulerControllers } from "./SchedulerControllers.js";
9
- const Scheduler = observer((props)=>{
10
- const metaRepository = useMemo(()=>metaRepositoryFactory.getRepository(), []);
11
- const searchRepository = useMemo(()=>searchRepositoryFactory.getRepository(), []);
12
- const sortingRepository = useMemo(()=>{
13
- const sortRepository = sortRepositoryFactory.getRepository();
14
- return new SortingRepositoryWithDefaults(props.sorting, sortRepository);
15
- }, [
16
- props.sorting
17
- ]);
18
- const loadingRepository = useMemo(()=>loadingRepositoryFactory.getRepository(), []);
19
- const selectedRepository = useMemo(()=>selectedItemsRepositoryFactory.getRepository(), []);
20
- const itemsRepository = useMemo(()=>{
21
- const schedulerItemsRepository = schedulerItemsRepositoryFactory.getRepository({
22
- metaRepository,
23
- getGateway: props.getGateway,
24
- cancelGateway: props.cancelGateway,
25
- publishGateway: props.publishGateway,
26
- unpublishGateway: props.unpublishGateway,
27
- listGateway: props.listGateway,
28
- namespace: props.namespace
29
- });
30
- return new SchedulerItemsRepositoryWithLoading(loadingRepository, schedulerItemsRepository);
31
- }, [
32
- metaRepository,
33
- loadingRepository,
34
- props.listGateway,
35
- props.cancelGateway,
36
- props.publishGateway,
37
- props.unpublishGateway,
38
- props.listGateway,
39
- props.namespace
40
- ]);
41
- const controllers = useMemo(()=>new SchedulerControllers({
42
- itemsRepository,
43
- selectedRepository,
44
- sortingRepository,
45
- searchRepository
46
- }).getControllers(), [
47
- itemsRepository,
48
- selectedRepository,
49
- sortingRepository,
50
- searchRepository,
51
- loadingRepository
52
- ]);
53
- const presenter = useMemo(()=>new SchedulerPresenter({
54
- itemsRepository,
55
- selectedRepository,
56
- sortingRepository,
57
- searchRepository
58
- }), [
59
- itemsRepository,
60
- selectedRepository,
61
- sortingRepository,
62
- searchRepository
63
- ]);
64
- useEffect(()=>{
65
- controllers.listItems.execute();
66
- }, []);
67
- return /*#__PURE__*/ react.createElement(SchedulerProvider, {
68
- namespace: props.namespace,
69
- controllers: controllers,
70
- presenter: presenter
71
- }, /*#__PURE__*/ react.createElement(SchedulerOverlay, {
72
- onExited: props.onClose,
73
- title: props.title
74
- }));
75
- });
76
- export { Scheduler };
77
-
78
- //# sourceMappingURL=Scheduler.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Presentation/Scheduler/Scheduler.js","sources":["../../../src/Presentation/Scheduler/Scheduler.tsx"],"sourcesContent":["import React, { useEffect, useMemo } from \"react\";\nimport { observer } from \"mobx-react-lite\";\nimport type { Sorting } from \"@webiny/app-utils\";\nimport {\n loadingRepositoryFactory,\n metaRepositoryFactory,\n sortRepositoryFactory\n} from \"@webiny/app-utils\";\nimport { SchedulerProvider } from \"../hooks/index.js\";\nimport { SchedulerOverlay } from \"../components/SchedulerOverlay/index.js\";\nimport { SchedulerPresenter } from \"./SchedulerPresenter.js\";\nimport {\n schedulerItemsRepositoryFactory,\n SchedulerItemsRepositoryWithLoading,\n searchRepositoryFactory,\n selectedItemsRepositoryFactory,\n SortingRepositoryWithDefaults\n} from \"~/Domain/index.js\";\nimport type {\n ICancelScheduledActionGateway,\n IGetScheduledActionGateway,\n IListScheduledActionsGateway,\n ISchedulePublishActionGateway,\n IScheduleUnpublishActionGateway\n} from \"~/Gateways/index.js\";\nimport { SchedulerControllers } from \"~/Presentation/Scheduler/SchedulerControllers.js\";\n\nexport interface SchedulerProps {\n namespace: string;\n getGateway: IGetScheduledActionGateway;\n listGateway: IListScheduledActionsGateway;\n cancelGateway: ICancelScheduledActionGateway;\n publishGateway: ISchedulePublishActionGateway;\n unpublishGateway: IScheduleUnpublishActionGateway;\n onClose: () => void;\n sorting: Sorting[];\n title: string;\n}\n\nexport const Scheduler = observer((props: SchedulerProps) => {\n const metaRepository = useMemo(() => {\n return metaRepositoryFactory.getRepository();\n }, []);\n\n const searchRepository = useMemo(() => {\n return searchRepositoryFactory.getRepository();\n }, []);\n\n const sortingRepository = useMemo(() => {\n const sortRepository = sortRepositoryFactory.getRepository();\n return new SortingRepositoryWithDefaults(props.sorting, sortRepository);\n }, [props.sorting]);\n\n const loadingRepository = useMemo(() => {\n return loadingRepositoryFactory.getRepository();\n }, []);\n\n const selectedRepository = useMemo(() => {\n return selectedItemsRepositoryFactory.getRepository();\n }, []);\n\n const itemsRepository = useMemo(() => {\n const schedulerItemsRepository = schedulerItemsRepositoryFactory.getRepository({\n metaRepository,\n getGateway: props.getGateway,\n cancelGateway: props.cancelGateway,\n publishGateway: props.publishGateway,\n unpublishGateway: props.unpublishGateway,\n listGateway: props.listGateway,\n namespace: props.namespace\n });\n\n return new SchedulerItemsRepositoryWithLoading(loadingRepository, schedulerItemsRepository);\n }, [\n metaRepository,\n loadingRepository,\n props.listGateway,\n props.cancelGateway,\n props.publishGateway,\n props.unpublishGateway,\n props.listGateway,\n props.namespace\n ]);\n\n const controllers = useMemo(() => {\n return new SchedulerControllers({\n itemsRepository,\n selectedRepository,\n sortingRepository,\n searchRepository\n }).getControllers();\n }, [\n itemsRepository,\n selectedRepository,\n sortingRepository,\n searchRepository,\n loadingRepository\n ]);\n\n const presenter = useMemo(() => {\n return new SchedulerPresenter({\n itemsRepository,\n selectedRepository,\n sortingRepository,\n searchRepository\n });\n }, [itemsRepository, selectedRepository, sortingRepository, searchRepository]);\n\n useEffect(() => {\n controllers.listItems.execute();\n }, []);\n\n return (\n <SchedulerProvider\n namespace={props.namespace}\n controllers={controllers}\n presenter={presenter}\n >\n <SchedulerOverlay onExited={props.onClose} title={props.title} />\n </SchedulerProvider>\n );\n});\n"],"names":["Scheduler","observer","props","metaRepository","useMemo","metaRepositoryFactory","searchRepository","searchRepositoryFactory","sortingRepository","sortRepository","sortRepositoryFactory","SortingRepositoryWithDefaults","loadingRepository","loadingRepositoryFactory","selectedRepository","selectedItemsRepositoryFactory","itemsRepository","schedulerItemsRepository","schedulerItemsRepositoryFactory","SchedulerItemsRepositoryWithLoading","controllers","SchedulerControllers","presenter","SchedulerPresenter","useEffect","SchedulerProvider","SchedulerOverlay"],"mappings":";;;;;;;;AAuCO,MAAMA,YAAYC,SAAS,CAACC;IAC/B,MAAMC,iBAAiBC,QAAQ,IACpBC,sBAAsB,aAAa,IAC3C,EAAE;IAEL,MAAMC,mBAAmBF,QAAQ,IACtBG,wBAAwB,aAAa,IAC7C,EAAE;IAEL,MAAMC,oBAAoBJ,QAAQ;QAC9B,MAAMK,iBAAiBC,sBAAsB,aAAa;QAC1D,OAAO,IAAIC,8BAA8BT,MAAM,OAAO,EAAEO;IAC5D,GAAG;QAACP,MAAM,OAAO;KAAC;IAElB,MAAMU,oBAAoBR,QAAQ,IACvBS,yBAAyB,aAAa,IAC9C,EAAE;IAEL,MAAMC,qBAAqBV,QAAQ,IACxBW,+BAA+B,aAAa,IACpD,EAAE;IAEL,MAAMC,kBAAkBZ,QAAQ;QAC5B,MAAMa,2BAA2BC,gCAAgC,aAAa,CAAC;YAC3Ef;YACA,YAAYD,MAAM,UAAU;YAC5B,eAAeA,MAAM,aAAa;YAClC,gBAAgBA,MAAM,cAAc;YACpC,kBAAkBA,MAAM,gBAAgB;YACxC,aAAaA,MAAM,WAAW;YAC9B,WAAWA,MAAM,SAAS;QAC9B;QAEA,OAAO,IAAIiB,oCAAoCP,mBAAmBK;IACtE,GAAG;QACCd;QACAS;QACAV,MAAM,WAAW;QACjBA,MAAM,aAAa;QACnBA,MAAM,cAAc;QACpBA,MAAM,gBAAgB;QACtBA,MAAM,WAAW;QACjBA,MAAM,SAAS;KAClB;IAED,MAAMkB,cAAchB,QAAQ,IACjB,IAAIiB,qBAAqB;YAC5BL;YACAF;YACAN;YACAF;QACJ,GAAG,cAAc,IAClB;QACCU;QACAF;QACAN;QACAF;QACAM;KACH;IAED,MAAMU,YAAYlB,QAAQ,IACf,IAAImB,mBAAmB;YAC1BP;YACAF;YACAN;YACAF;QACJ,IACD;QAACU;QAAiBF;QAAoBN;QAAmBF;KAAiB;IAE7EkB,UAAU;QACNJ,YAAY,SAAS,CAAC,OAAO;IACjC,GAAG,EAAE;IAEL,OAAO,WAAP,GACI,oBAACK,mBAAiBA;QACd,WAAWvB,MAAM,SAAS;QAC1B,aAAakB;QACb,WAAWE;qBAEX,oBAACI,kBAAgBA;QAAC,UAAUxB,MAAM,OAAO;QAAE,OAAOA,MAAM,KAAK;;AAGzE"}
@@ -1,30 +0,0 @@
1
- import type { ISortingRepository } from "@webiny/app-utils";
2
- import type { ISchedulerItemsRepository, ISearchRepository, ISelectedItemsRepository } from "../../Domain/index.js";
3
- import type { ICancelItemController, IGetItemController, IListItemsController, IListMoreItemsController, IPublishItemController, ISearchItemsController, ISelectAllItemsController, ISelectItemsController, ISortItemsController, IUnpublishItemController, IUnselectAllItemsController } from "../../Presentation/Scheduler/controllers/index.js";
4
- export interface ISchedulerControllersParams {
5
- itemsRepository: ISchedulerItemsRepository;
6
- selectedRepository: ISelectedItemsRepository;
7
- sortingRepository: ISortingRepository;
8
- searchRepository: ISearchRepository;
9
- }
10
- export interface ISchedulerControllersResponse {
11
- listItems: IListItemsController;
12
- getItem: IGetItemController;
13
- listMoreItems: IListMoreItemsController;
14
- selectItems: ISelectItemsController;
15
- selectAllItems: ISelectAllItemsController;
16
- unselectAllItems: IUnselectAllItemsController;
17
- sortItems: ISortItemsController;
18
- searchItems: ISearchItemsController;
19
- scheduleCancelItem: ICancelItemController;
20
- schedulePublishItem: IPublishItemController;
21
- scheduleUnpublishItem: IUnpublishItemController;
22
- }
23
- export declare class SchedulerControllers {
24
- private readonly itemsRepository;
25
- private readonly selectedRepository;
26
- private readonly sortingRepository;
27
- private readonly searchRepository;
28
- constructor(params: ISchedulerControllersParams);
29
- getControllers(): ISchedulerControllersResponse;
30
- }