@webiny/webhooks 6.4.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +11 -0
- package/admin/SecurityPermission.d.ts +2 -0
- package/admin/SecurityPermission.js +15 -0
- package/admin/SecurityPermission.js.map +1 -0
- package/admin/WebhookRoutes.d.ts +2 -0
- package/admin/WebhookRoutes.js +33 -0
- package/admin/WebhookRoutes.js.map +1 -0
- package/admin/Webhooks.d.ts +2 -0
- package/admin/Webhooks.js +53 -0
- package/admin/Webhooks.js.map +1 -0
- package/admin/features/ListWebhooks/ListWebhooksGateway.d.ts +11 -0
- package/admin/features/ListWebhooks/ListWebhooksGateway.js +62 -0
- package/admin/features/ListWebhooks/ListWebhooksGateway.js.map +1 -0
- package/admin/features/ListWebhooks/ListWebhooksRepository.d.ts +10 -0
- package/admin/features/ListWebhooks/ListWebhooksRepository.js +18 -0
- package/admin/features/ListWebhooks/ListWebhooksRepository.js.map +1 -0
- package/admin/features/ListWebhooks/ListWebhooksUseCase.d.ts +10 -0
- package/admin/features/ListWebhooks/ListWebhooksUseCase.js +18 -0
- package/admin/features/ListWebhooks/ListWebhooksUseCase.js.map +1 -0
- package/admin/features/ListWebhooks/abstractions.d.ts +36 -0
- package/admin/features/ListWebhooks/abstractions.js +7 -0
- package/admin/features/ListWebhooks/abstractions.js.map +1 -0
- package/admin/features/ListWebhooks/feature.d.ts +3 -0
- package/admin/features/ListWebhooks/feature.js +21 -0
- package/admin/features/ListWebhooks/feature.js.map +1 -0
- package/admin/features/ListWebhooks/index.d.ts +2 -0
- package/admin/features/ListWebhooks/index.js +2 -0
- package/admin/features/createWebhook/CreateWebhookGateway.d.ts +12 -0
- package/admin/features/createWebhook/CreateWebhookGateway.js +21 -0
- package/admin/features/createWebhook/CreateWebhookGateway.js.map +1 -0
- package/admin/features/createWebhook/CreateWebhookUseCase.d.ts +11 -0
- package/admin/features/createWebhook/CreateWebhookUseCase.js +18 -0
- package/admin/features/createWebhook/CreateWebhookUseCase.js.map +1 -0
- package/admin/features/createWebhook/abstractions.d.ts +23 -0
- package/admin/features/createWebhook/abstractions.js +6 -0
- package/admin/features/createWebhook/abstractions.js.map +1 -0
- package/admin/features/createWebhook/feature.d.ts +3 -0
- package/admin/features/createWebhook/feature.js +19 -0
- package/admin/features/createWebhook/feature.js.map +1 -0
- package/admin/features/createWebhook/index.d.ts +2 -0
- package/admin/features/createWebhook/index.js +2 -0
- package/admin/features/deleteWebhook/DeleteWebhookGateway.d.ts +11 -0
- package/admin/features/deleteWebhook/DeleteWebhookGateway.js +23 -0
- package/admin/features/deleteWebhook/DeleteWebhookGateway.js.map +1 -0
- package/admin/features/deleteWebhook/DeleteWebhookUseCase.d.ts +10 -0
- package/admin/features/deleteWebhook/DeleteWebhookUseCase.js +18 -0
- package/admin/features/deleteWebhook/DeleteWebhookUseCase.js.map +1 -0
- package/admin/features/deleteWebhook/abstractions.d.ts +14 -0
- package/admin/features/deleteWebhook/abstractions.js +6 -0
- package/admin/features/deleteWebhook/abstractions.js.map +1 -0
- package/admin/features/deleteWebhook/feature.d.ts +3 -0
- package/admin/features/deleteWebhook/feature.js +19 -0
- package/admin/features/deleteWebhook/feature.js.map +1 -0
- package/admin/features/deleteWebhook/index.d.ts +2 -0
- package/admin/features/deleteWebhook/index.js +2 -0
- package/admin/features/getWebhook/GetWebhookGateway.d.ts +12 -0
- package/admin/features/getWebhook/GetWebhookGateway.js +23 -0
- package/admin/features/getWebhook/GetWebhookGateway.js.map +1 -0
- package/admin/features/getWebhook/GetWebhookUseCase.d.ts +11 -0
- package/admin/features/getWebhook/GetWebhookUseCase.js +18 -0
- package/admin/features/getWebhook/GetWebhookUseCase.js.map +1 -0
- package/admin/features/getWebhook/abstractions.d.ts +15 -0
- package/admin/features/getWebhook/abstractions.js +6 -0
- package/admin/features/getWebhook/abstractions.js.map +1 -0
- package/admin/features/getWebhook/feature.d.ts +3 -0
- package/admin/features/getWebhook/feature.js +19 -0
- package/admin/features/getWebhook/feature.js.map +1 -0
- package/admin/features/getWebhook/index.d.ts +2 -0
- package/admin/features/getWebhook/index.js +2 -0
- package/admin/features/listAvailableEvents/ListAvailableEventsGateway.d.ts +12 -0
- package/admin/features/listAvailableEvents/ListAvailableEventsGateway.js +21 -0
- package/admin/features/listAvailableEvents/ListAvailableEventsGateway.js.map +1 -0
- package/admin/features/listAvailableEvents/ListAvailableEventsUseCase.d.ts +11 -0
- package/admin/features/listAvailableEvents/ListAvailableEventsUseCase.js +18 -0
- package/admin/features/listAvailableEvents/ListAvailableEventsUseCase.js.map +1 -0
- package/admin/features/listAvailableEvents/abstractions.d.ts +15 -0
- package/admin/features/listAvailableEvents/abstractions.js +6 -0
- package/admin/features/listAvailableEvents/abstractions.js.map +1 -0
- package/admin/features/listAvailableEvents/feature.d.ts +3 -0
- package/admin/features/listAvailableEvents/feature.js +19 -0
- package/admin/features/listAvailableEvents/feature.js.map +1 -0
- package/admin/features/listAvailableEvents/index.d.ts +2 -0
- package/admin/features/listAvailableEvents/index.js +2 -0
- package/admin/features/listWebhookDeliveries/ListWebhookDeliveriesGateway.d.ts +11 -0
- package/admin/features/listWebhookDeliveries/ListWebhookDeliveriesGateway.js +28 -0
- package/admin/features/listWebhookDeliveries/ListWebhookDeliveriesGateway.js.map +1 -0
- package/admin/features/listWebhookDeliveries/ListWebhookDeliveriesUseCase.d.ts +10 -0
- package/admin/features/listWebhookDeliveries/ListWebhookDeliveriesUseCase.js +18 -0
- package/admin/features/listWebhookDeliveries/ListWebhookDeliveriesUseCase.js.map +1 -0
- package/admin/features/listWebhookDeliveries/abstractions.d.ts +28 -0
- package/admin/features/listWebhookDeliveries/abstractions.js +6 -0
- package/admin/features/listWebhookDeliveries/abstractions.js.map +1 -0
- package/admin/features/listWebhookDeliveries/feature.d.ts +3 -0
- package/admin/features/listWebhookDeliveries/feature.js +19 -0
- package/admin/features/listWebhookDeliveries/feature.js.map +1 -0
- package/admin/features/listWebhookDeliveries/index.d.ts +2 -0
- package/admin/features/listWebhookDeliveries/index.js +2 -0
- package/admin/features/permissions/abstractions.d.ts +17 -0
- package/admin/features/permissions/abstractions.js +6 -0
- package/admin/features/permissions/abstractions.js.map +1 -0
- package/admin/features/permissions/feature.d.ts +14 -0
- package/admin/features/permissions/feature.js +7 -0
- package/admin/features/permissions/feature.js.map +1 -0
- package/admin/features/permissions/index.d.ts +2 -0
- package/admin/features/permissions/index.js +2 -0
- package/admin/features/resendWebhookDelivery/ResendWebhookDeliveryGateway.d.ts +11 -0
- package/admin/features/resendWebhookDelivery/ResendWebhookDeliveryGateway.js +23 -0
- package/admin/features/resendWebhookDelivery/ResendWebhookDeliveryGateway.js.map +1 -0
- package/admin/features/resendWebhookDelivery/ResendWebhookDeliveryUseCase.d.ts +10 -0
- package/admin/features/resendWebhookDelivery/ResendWebhookDeliveryUseCase.js +18 -0
- package/admin/features/resendWebhookDelivery/ResendWebhookDeliveryUseCase.js.map +1 -0
- package/admin/features/resendWebhookDelivery/abstractions.d.ts +14 -0
- package/admin/features/resendWebhookDelivery/abstractions.js +6 -0
- package/admin/features/resendWebhookDelivery/abstractions.js.map +1 -0
- package/admin/features/resendWebhookDelivery/feature.d.ts +3 -0
- package/admin/features/resendWebhookDelivery/feature.js +19 -0
- package/admin/features/resendWebhookDelivery/feature.js.map +1 -0
- package/admin/features/resendWebhookDelivery/index.d.ts +2 -0
- package/admin/features/resendWebhookDelivery/index.js +2 -0
- package/admin/features/triggerWebhook/TriggerWebhookGateway.d.ts +12 -0
- package/admin/features/triggerWebhook/TriggerWebhookGateway.js +24 -0
- package/admin/features/triggerWebhook/TriggerWebhookGateway.js.map +1 -0
- package/admin/features/triggerWebhook/TriggerWebhookUseCase.d.ts +11 -0
- package/admin/features/triggerWebhook/TriggerWebhookUseCase.js +18 -0
- package/admin/features/triggerWebhook/TriggerWebhookUseCase.js.map +1 -0
- package/admin/features/triggerWebhook/abstractions.d.ts +15 -0
- package/admin/features/triggerWebhook/abstractions.js +6 -0
- package/admin/features/triggerWebhook/abstractions.js.map +1 -0
- package/admin/features/triggerWebhook/feature.d.ts +3 -0
- package/admin/features/triggerWebhook/feature.js +19 -0
- package/admin/features/triggerWebhook/feature.js.map +1 -0
- package/admin/features/triggerWebhook/index.d.ts +2 -0
- package/admin/features/triggerWebhook/index.js +2 -0
- package/admin/features/updateWebhook/UpdateWebhookGateway.d.ts +12 -0
- package/admin/features/updateWebhook/UpdateWebhookGateway.js +24 -0
- package/admin/features/updateWebhook/UpdateWebhookGateway.js.map +1 -0
- package/admin/features/updateWebhook/UpdateWebhookUseCase.d.ts +11 -0
- package/admin/features/updateWebhook/UpdateWebhookUseCase.js +18 -0
- package/admin/features/updateWebhook/UpdateWebhookUseCase.js.map +1 -0
- package/admin/features/updateWebhook/abstractions.d.ts +23 -0
- package/admin/features/updateWebhook/abstractions.js +6 -0
- package/admin/features/updateWebhook/abstractions.js.map +1 -0
- package/admin/features/updateWebhook/feature.d.ts +3 -0
- package/admin/features/updateWebhook/feature.js +19 -0
- package/admin/features/updateWebhook/feature.js.map +1 -0
- package/admin/features/updateWebhook/index.d.ts +2 -0
- package/admin/features/updateWebhook/index.js +2 -0
- package/admin/index.d.ts +2 -0
- package/admin/index.js +2 -0
- package/admin/permissions.d.ts +12 -0
- package/admin/permissions.js +22 -0
- package/admin/permissions.js.map +1 -0
- package/admin/presentation/WebhookDeliveries/WebhookDeliveriesDataSource.d.ts +16 -0
- package/admin/presentation/WebhookDeliveries/WebhookDeliveriesDataSource.js +68 -0
- package/admin/presentation/WebhookDeliveries/WebhookDeliveriesDataSource.js.map +1 -0
- package/admin/presentation/WebhookDeliveries/WebhookDeliveriesPresenter.d.ts +19 -0
- package/admin/presentation/WebhookDeliveries/WebhookDeliveriesPresenter.js +77 -0
- package/admin/presentation/WebhookDeliveries/WebhookDeliveriesPresenter.js.map +1 -0
- package/admin/presentation/WebhookDeliveries/abstractions.d.ts +22 -0
- package/admin/presentation/WebhookDeliveries/abstractions.js +5 -0
- package/admin/presentation/WebhookDeliveries/abstractions.js.map +1 -0
- package/admin/presentation/WebhookDeliveries/components/DeliveryDetail.d.ts +11 -0
- package/admin/presentation/WebhookDeliveries/components/DeliveryDetail.js +73 -0
- package/admin/presentation/WebhookDeliveries/components/DeliveryDetail.js.map +1 -0
- package/admin/presentation/WebhookDeliveries/components/WebhookDeliveriesDrawer.d.ts +8 -0
- package/admin/presentation/WebhookDeliveries/components/WebhookDeliveriesDrawer.js +119 -0
- package/admin/presentation/WebhookDeliveries/components/WebhookDeliveriesDrawer.js.map +1 -0
- package/admin/presentation/WebhookDeliveries/feature.d.ts +3 -0
- package/admin/presentation/WebhookDeliveries/feature.js +17 -0
- package/admin/presentation/WebhookDeliveries/feature.js.map +1 -0
- package/admin/presentation/WebhookDeliveries/index.d.ts +2 -0
- package/admin/presentation/WebhookDeliveries/index.js +2 -0
- package/admin/presentation/WebhookForm/WebhookFormPresenter.d.ts +35 -0
- package/admin/presentation/WebhookForm/WebhookFormPresenter.js +163 -0
- package/admin/presentation/WebhookForm/WebhookFormPresenter.js.map +1 -0
- package/admin/presentation/WebhookForm/abstractions.d.ts +35 -0
- package/admin/presentation/WebhookForm/abstractions.js +5 -0
- package/admin/presentation/WebhookForm/abstractions.js.map +1 -0
- package/admin/presentation/WebhookForm/components/EventsSelector.d.ts +12 -0
- package/admin/presentation/WebhookForm/components/EventsSelector.js +44 -0
- package/admin/presentation/WebhookForm/components/EventsSelector.js.map +1 -0
- package/admin/presentation/WebhookForm/components/SigningSecret.d.ts +6 -0
- package/admin/presentation/WebhookForm/components/SigningSecret.js +43 -0
- package/admin/presentation/WebhookForm/components/SigningSecret.js.map +1 -0
- package/admin/presentation/WebhookForm/components/WebhookFormView.d.ts +2 -0
- package/admin/presentation/WebhookForm/components/WebhookFormView.js +88 -0
- package/admin/presentation/WebhookForm/components/WebhookFormView.js.map +1 -0
- package/admin/presentation/WebhookForm/feature.d.ts +3 -0
- package/admin/presentation/WebhookForm/feature.js +17 -0
- package/admin/presentation/WebhookForm/feature.js.map +1 -0
- package/admin/presentation/WebhookForm/index.d.ts +2 -0
- package/admin/presentation/WebhookForm/index.js +2 -0
- package/admin/presentation/WebhookList/WebhookListDataSource.d.ts +15 -0
- package/admin/presentation/WebhookList/WebhookListDataSource.js +67 -0
- package/admin/presentation/WebhookList/WebhookListDataSource.js.map +1 -0
- package/admin/presentation/WebhookList/WebhookListPresenter.d.ts +22 -0
- package/admin/presentation/WebhookList/WebhookListPresenter.js +90 -0
- package/admin/presentation/WebhookList/WebhookListPresenter.js.map +1 -0
- package/admin/presentation/WebhookList/abstractions.d.ts +27 -0
- package/admin/presentation/WebhookList/abstractions.js +5 -0
- package/admin/presentation/WebhookList/abstractions.js.map +1 -0
- package/admin/presentation/WebhookList/components/WebhookListView.d.ts +2 -0
- package/admin/presentation/WebhookList/components/WebhookListView.js +172 -0
- package/admin/presentation/WebhookList/components/WebhookListView.js.map +1 -0
- package/admin/presentation/WebhookList/feature.d.ts +3 -0
- package/admin/presentation/WebhookList/feature.js +17 -0
- package/admin/presentation/WebhookList/feature.js.map +1 -0
- package/admin/presentation/WebhookList/index.d.ts +2 -0
- package/admin/presentation/WebhookList/index.js +2 -0
- package/admin/presentation/security/HasPermission.d.ts +12 -0
- package/admin/presentation/security/HasPermission.js +6 -0
- package/admin/presentation/security/HasPermission.js.map +1 -0
- package/admin/presentation/security/usePermissions.d.ts +12 -0
- package/admin/presentation/security/usePermissions.js +6 -0
- package/admin/presentation/security/usePermissions.js.map +1 -0
- package/admin/routes.d.ts +7 -0
- package/admin/routes.js +17 -0
- package/admin/routes.js.map +1 -0
- package/admin/shared/types.d.ts +5 -0
- package/admin/shared/types.js +0 -0
- package/api/Extension.d.ts +1 -0
- package/api/Extension.js +1 -0
- package/api/WebhooksFeature.d.ts +4 -0
- package/api/WebhooksFeature.js +55 -0
- package/api/WebhooksFeature.js.map +1 -0
- package/api/domain/Webhook.d.ts +27 -0
- package/api/domain/Webhook.js +0 -0
- package/api/domain/WebhookDelivery.d.ts +36 -0
- package/api/domain/WebhookDelivery.js +0 -0
- package/api/domain/constants.d.ts +4 -0
- package/api/domain/constants.js +7 -0
- package/api/domain/constants.js.map +1 -0
- package/api/domain/errors.d.ts +36 -0
- package/api/domain/errors.js +70 -0
- package/api/domain/errors.js.map +1 -0
- package/api/features/CreateWebhook/CreateWebhookRepository.d.ts +18 -0
- package/api/features/CreateWebhook/CreateWebhookRepository.js +43 -0
- package/api/features/CreateWebhook/CreateWebhookRepository.js.map +1 -0
- package/api/features/CreateWebhook/CreateWebhookUseCase.d.ts +16 -0
- package/api/features/CreateWebhook/CreateWebhookUseCase.js +57 -0
- package/api/features/CreateWebhook/CreateWebhookUseCase.js.map +1 -0
- package/api/features/CreateWebhook/abstractions.d.ts +33 -0
- package/api/features/CreateWebhook/abstractions.js +6 -0
- package/api/features/CreateWebhook/abstractions.js.map +1 -0
- package/api/features/CreateWebhook/feature.d.ts +4 -0
- package/api/features/CreateWebhook/feature.js +13 -0
- package/api/features/CreateWebhook/feature.js.map +1 -0
- package/api/features/CreateWebhookDelivery/CreateWebhookDeliveryRepository.d.ts +20 -0
- package/api/features/CreateWebhookDelivery/CreateWebhookDeliveryRepository.js +58 -0
- package/api/features/CreateWebhookDelivery/CreateWebhookDeliveryRepository.js.map +1 -0
- package/api/features/CreateWebhookDelivery/abstractions.d.ts +21 -0
- package/api/features/CreateWebhookDelivery/abstractions.js +5 -0
- package/api/features/CreateWebhookDelivery/abstractions.js.map +1 -0
- package/api/features/CreateWebhookDelivery/feature.d.ts +4 -0
- package/api/features/CreateWebhookDelivery/feature.js +11 -0
- package/api/features/CreateWebhookDelivery/feature.js.map +1 -0
- package/api/features/DeleteWebhook/DeleteWebhookRepository.d.ts +19 -0
- package/api/features/DeleteWebhook/DeleteWebhookRepository.js +66 -0
- package/api/features/DeleteWebhook/DeleteWebhookRepository.js.map +1 -0
- package/api/features/DeleteWebhook/DeleteWebhookUseCase.d.ts +15 -0
- package/api/features/DeleteWebhook/DeleteWebhookUseCase.js +29 -0
- package/api/features/DeleteWebhook/DeleteWebhookUseCase.js.map +1 -0
- package/api/features/DeleteWebhook/abstractions.d.ts +20 -0
- package/api/features/DeleteWebhook/abstractions.js +6 -0
- package/api/features/DeleteWebhook/abstractions.js.map +1 -0
- package/api/features/DeleteWebhook/feature.d.ts +4 -0
- package/api/features/DeleteWebhook/feature.js +13 -0
- package/api/features/DeleteWebhook/feature.js.map +1 -0
- package/api/features/GetWebhook/GetWebhookRepository.d.ts +17 -0
- package/api/features/GetWebhook/GetWebhookRepository.js +39 -0
- package/api/features/GetWebhook/GetWebhookRepository.js.map +1 -0
- package/api/features/GetWebhook/GetWebhookUseCase.d.ts +14 -0
- package/api/features/GetWebhook/GetWebhookUseCase.js +24 -0
- package/api/features/GetWebhook/GetWebhookUseCase.js.map +1 -0
- package/api/features/GetWebhook/abstractions.d.ts +21 -0
- package/api/features/GetWebhook/abstractions.js +6 -0
- package/api/features/GetWebhook/abstractions.js.map +1 -0
- package/api/features/GetWebhook/feature.d.ts +4 -0
- package/api/features/GetWebhook/feature.js +13 -0
- package/api/features/GetWebhook/feature.js.map +1 -0
- package/api/features/GetWebhookDelivery/GetWebhookDeliveryRepository.d.ts +17 -0
- package/api/features/GetWebhookDelivery/GetWebhookDeliveryRepository.js +39 -0
- package/api/features/GetWebhookDelivery/GetWebhookDeliveryRepository.js.map +1 -0
- package/api/features/GetWebhookDelivery/GetWebhookDeliveryUseCase.d.ts +14 -0
- package/api/features/GetWebhookDelivery/GetWebhookDeliveryUseCase.js +24 -0
- package/api/features/GetWebhookDelivery/GetWebhookDeliveryUseCase.js.map +1 -0
- package/api/features/GetWebhookDelivery/abstractions.d.ts +21 -0
- package/api/features/GetWebhookDelivery/abstractions.js +6 -0
- package/api/features/GetWebhookDelivery/abstractions.js.map +1 -0
- package/api/features/GetWebhookDelivery/feature.d.ts +4 -0
- package/api/features/GetWebhookDelivery/feature.js +13 -0
- package/api/features/GetWebhookDelivery/feature.js.map +1 -0
- package/api/features/ListAvailableWebhookEvents/ListAvailableWebhookEventsUseCase.d.ts +14 -0
- package/api/features/ListAvailableWebhookEvents/ListAvailableWebhookEventsUseCase.js +30 -0
- package/api/features/ListAvailableWebhookEvents/ListAvailableWebhookEventsUseCase.js.map +1 -0
- package/api/features/ListAvailableWebhookEvents/abstractions.d.ts +9 -0
- package/api/features/ListAvailableWebhookEvents/abstractions.js +5 -0
- package/api/features/ListAvailableWebhookEvents/abstractions.js.map +1 -0
- package/api/features/ListAvailableWebhookEvents/feature.d.ts +4 -0
- package/api/features/ListAvailableWebhookEvents/feature.js +11 -0
- package/api/features/ListAvailableWebhookEvents/feature.js.map +1 -0
- package/api/features/ListWebhookDeliveries/ListWebhookDeliveriesRepository.d.ts +21 -0
- package/api/features/ListWebhookDeliveries/ListWebhookDeliveriesRepository.js +63 -0
- package/api/features/ListWebhookDeliveries/ListWebhookDeliveriesRepository.js.map +1 -0
- package/api/features/ListWebhookDeliveries/ListWebhookDeliveriesUseCase.d.ts +14 -0
- package/api/features/ListWebhookDeliveries/ListWebhookDeliveriesUseCase.js +24 -0
- package/api/features/ListWebhookDeliveries/ListWebhookDeliveriesUseCase.js.map +1 -0
- package/api/features/ListWebhookDeliveries/abstractions.d.ts +40 -0
- package/api/features/ListWebhookDeliveries/abstractions.js +6 -0
- package/api/features/ListWebhookDeliveries/abstractions.js.map +1 -0
- package/api/features/ListWebhookDeliveries/feature.d.ts +4 -0
- package/api/features/ListWebhookDeliveries/feature.js +13 -0
- package/api/features/ListWebhookDeliveries/feature.js.map +1 -0
- package/api/features/ListWebhooks/ListWebhooksRepository.d.ts +21 -0
- package/api/features/ListWebhooks/ListWebhooksRepository.js +63 -0
- package/api/features/ListWebhooks/ListWebhooksRepository.js.map +1 -0
- package/api/features/ListWebhooks/ListWebhooksUseCase.d.ts +14 -0
- package/api/features/ListWebhooks/ListWebhooksUseCase.js +24 -0
- package/api/features/ListWebhooks/ListWebhooksUseCase.js.map +1 -0
- package/api/features/ListWebhooks/abstractions.d.ts +41 -0
- package/api/features/ListWebhooks/abstractions.js +6 -0
- package/api/features/ListWebhooks/abstractions.js.map +1 -0
- package/api/features/ListWebhooks/feature.d.ts +4 -0
- package/api/features/ListWebhooks/feature.js +13 -0
- package/api/features/ListWebhooks/feature.js.map +1 -0
- package/api/features/ResendWebhookDelivery/ResendWebhookDeliveryUseCase.d.ts +20 -0
- package/api/features/ResendWebhookDelivery/ResendWebhookDeliveryUseCase.js +60 -0
- package/api/features/ResendWebhookDelivery/ResendWebhookDeliveryUseCase.js.map +1 -0
- package/api/features/ResendWebhookDelivery/abstractions.d.ts +12 -0
- package/api/features/ResendWebhookDelivery/abstractions.js +5 -0
- package/api/features/ResendWebhookDelivery/abstractions.js.map +1 -0
- package/api/features/ResendWebhookDelivery/feature.d.ts +4 -0
- package/api/features/ResendWebhookDelivery/feature.js +11 -0
- package/api/features/ResendWebhookDelivery/feature.js.map +1 -0
- package/api/features/SendWebhookTask/SendWebhookTask.d.ts +29 -0
- package/api/features/SendWebhookTask/SendWebhookTask.js +99 -0
- package/api/features/SendWebhookTask/SendWebhookTask.js.map +1 -0
- package/api/features/SendWebhookTask/feature.d.ts +4 -0
- package/api/features/SendWebhookTask/feature.js +11 -0
- package/api/features/SendWebhookTask/feature.js.map +1 -0
- package/api/features/SendWebhookTask/types.d.ts +15 -0
- package/api/features/SendWebhookTask/types.js +0 -0
- package/api/features/Transformers/WebhookDeliveryTransformer.d.ts +13 -0
- package/api/features/Transformers/WebhookDeliveryTransformer.js +57 -0
- package/api/features/Transformers/WebhookDeliveryTransformer.js.map +1 -0
- package/api/features/Transformers/WebhookTransformer.d.ts +11 -0
- package/api/features/Transformers/WebhookTransformer.js +35 -0
- package/api/features/Transformers/WebhookTransformer.js.map +1 -0
- package/api/features/Transformers/abstractions/WebhookDeliveryTransformer.d.ts +10 -0
- package/api/features/Transformers/abstractions/WebhookDeliveryTransformer.js +5 -0
- package/api/features/Transformers/abstractions/WebhookDeliveryTransformer.js.map +1 -0
- package/api/features/Transformers/abstractions/WebhookTransformer.d.ts +10 -0
- package/api/features/Transformers/abstractions/WebhookTransformer.js +5 -0
- package/api/features/Transformers/abstractions/WebhookTransformer.js.map +1 -0
- package/api/features/Transformers/feature.d.ts +4 -0
- package/api/features/Transformers/feature.js +13 -0
- package/api/features/Transformers/feature.js.map +1 -0
- package/api/features/Transformers/index.d.ts +2 -0
- package/api/features/Transformers/index.js +2 -0
- package/api/features/TriggerWebhook/TriggerWebhookUseCase.d.ts +19 -0
- package/api/features/TriggerWebhook/TriggerWebhookUseCase.js +54 -0
- package/api/features/TriggerWebhook/TriggerWebhookUseCase.js.map +1 -0
- package/api/features/TriggerWebhook/abstractions.d.ts +13 -0
- package/api/features/TriggerWebhook/abstractions.js +5 -0
- package/api/features/TriggerWebhook/abstractions.js.map +1 -0
- package/api/features/TriggerWebhook/feature.d.ts +4 -0
- package/api/features/TriggerWebhook/feature.js +11 -0
- package/api/features/TriggerWebhook/feature.js.map +1 -0
- package/api/features/UpdateWebhook/UpdateWebhookRepository.d.ts +21 -0
- package/api/features/UpdateWebhook/UpdateWebhookRepository.js +50 -0
- package/api/features/UpdateWebhook/UpdateWebhookRepository.js.map +1 -0
- package/api/features/UpdateWebhook/UpdateWebhookUseCase.d.ts +16 -0
- package/api/features/UpdateWebhook/UpdateWebhookUseCase.js +66 -0
- package/api/features/UpdateWebhook/UpdateWebhookUseCase.js.map +1 -0
- package/api/features/UpdateWebhook/abstractions.d.ts +31 -0
- package/api/features/UpdateWebhook/abstractions.js +6 -0
- package/api/features/UpdateWebhook/abstractions.js.map +1 -0
- package/api/features/UpdateWebhook/feature.d.ts +4 -0
- package/api/features/UpdateWebhook/feature.js +13 -0
- package/api/features/UpdateWebhook/feature.js.map +1 -0
- package/api/features/UpdateWebhookDelivery/UpdateWebhookDeliveryRepository.d.ts +22 -0
- package/api/features/UpdateWebhookDelivery/UpdateWebhookDeliveryRepository.js +62 -0
- package/api/features/UpdateWebhookDelivery/UpdateWebhookDeliveryRepository.js.map +1 -0
- package/api/features/UpdateWebhookDelivery/abstractions.d.ts +23 -0
- package/api/features/UpdateWebhookDelivery/abstractions.js +5 -0
- package/api/features/UpdateWebhookDelivery/abstractions.js.map +1 -0
- package/api/features/UpdateWebhookDelivery/feature.d.ts +4 -0
- package/api/features/UpdateWebhookDelivery/feature.js +11 -0
- package/api/features/UpdateWebhookDelivery/feature.js.map +1 -0
- package/api/features/WebhookDispatcher/WebhookDispatcher.d.ts +17 -0
- package/api/features/WebhookDispatcher/WebhookDispatcher.js +56 -0
- package/api/features/WebhookDispatcher/WebhookDispatcher.js.map +1 -0
- package/api/features/WebhookDispatcher/feature.d.ts +4 -0
- package/api/features/WebhookDispatcher/feature.js +11 -0
- package/api/features/WebhookDispatcher/feature.js.map +1 -0
- package/api/features/WebhookPermissions/abstractions.d.ts +17 -0
- package/api/features/WebhookPermissions/abstractions.js +6 -0
- package/api/features/WebhookPermissions/abstractions.js.map +1 -0
- package/api/features/WebhookPermissions/feature.d.ts +4 -0
- package/api/features/WebhookPermissions/feature.js +7 -0
- package/api/features/WebhookPermissions/feature.js.map +1 -0
- package/api/features/WebhookSignPayload/WebhookSignPayload.d.ts +8 -0
- package/api/features/WebhookSignPayload/WebhookSignPayload.js +20 -0
- package/api/features/WebhookSignPayload/WebhookSignPayload.js.map +1 -0
- package/api/features/WebhookSignPayload/feature.d.ts +4 -0
- package/api/features/WebhookSignPayload/feature.js +11 -0
- package/api/features/WebhookSignPayload/feature.js.map +1 -0
- package/api/features/WebhookVerifyPayload/WebhookVerifyPayload.d.ts +10 -0
- package/api/features/WebhookVerifyPayload/WebhookVerifyPayload.js +22 -0
- package/api/features/WebhookVerifyPayload/WebhookVerifyPayload.js.map +1 -0
- package/api/features/WebhookVerifyPayload/feature.d.ts +4 -0
- package/api/features/WebhookVerifyPayload/feature.js +11 -0
- package/api/features/WebhookVerifyPayload/feature.js.map +1 -0
- package/api/graphql/WebhookCrudSchema.d.ts +8 -0
- package/api/graphql/WebhookCrudSchema.js +167 -0
- package/api/graphql/WebhookCrudSchema.js.map +1 -0
- package/api/graphql/WebhookDeliverySchema.d.ts +8 -0
- package/api/graphql/WebhookDeliverySchema.js +96 -0
- package/api/graphql/WebhookDeliverySchema.js.map +1 -0
- package/api/graphql/WebhookEventSchema.d.ts +8 -0
- package/api/graphql/WebhookEventSchema.js +43 -0
- package/api/graphql/WebhookEventSchema.js.map +1 -0
- package/api/graphql/WebhookTriggerSchema.d.ts +8 -0
- package/api/graphql/WebhookTriggerSchema.js +36 -0
- package/api/graphql/WebhookTriggerSchema.js.map +1 -0
- package/api/index.d.ts +1 -0
- package/api/index.js +8 -0
- package/api/index.js.map +1 -0
- package/api/models/WebhookDeliveryModel.d.ts +8 -0
- package/api/models/WebhookDeliveryModel.js +36 -0
- package/api/models/WebhookDeliveryModel.js.map +1 -0
- package/api/models/WebhookModel.d.ts +8 -0
- package/api/models/WebhookModel.js +33 -0
- package/api/models/WebhookModel.js.map +1 -0
- package/api/permissions.d.ts +12 -0
- package/api/permissions.js +22 -0
- package/api/permissions.js.map +1 -0
- package/exports/api/webhooks.d.ts +6 -0
- package/exports/api/webhooks.js +2 -0
- package/package.json +54 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Webiny
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# @webiny/webhooks
|
|
2
|
+
|
|
3
|
+
> [!NOTE]
|
|
4
|
+
> This package is part of the [Webiny](https://www.webiny.com) monorepo.
|
|
5
|
+
> It’s **included in every Webiny project by default** and is not meant to be used as a standalone package.
|
|
6
|
+
|
|
7
|
+
📘 **Documentation:** [https://www.webiny.com/docs](https://www.webiny.com/docs)
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
_This README file is automatically generated during the publish process._
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import react from "react";
|
|
2
|
+
import { AdminConfig } from "@webiny/app-admin";
|
|
3
|
+
import { ReactComponent } from "@webiny/icons/webhook.svg";
|
|
4
|
+
import { WEBHOOK_PERMISSIONS_SCHEMA } from "./permissions.js";
|
|
5
|
+
const { Security: Security } = AdminConfig;
|
|
6
|
+
const SecurityPermission = ()=>/*#__PURE__*/ react.createElement(AdminConfig, null, /*#__PURE__*/ react.createElement(Security.Permissions, {
|
|
7
|
+
name: "webhooks",
|
|
8
|
+
title: "Webhooks",
|
|
9
|
+
description: "Manage Webhooks permissions.",
|
|
10
|
+
icon: /*#__PURE__*/ react.createElement(ReactComponent, null),
|
|
11
|
+
schema: WEBHOOK_PERMISSIONS_SCHEMA
|
|
12
|
+
}));
|
|
13
|
+
export { SecurityPermission };
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=SecurityPermission.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin/SecurityPermission.js","sources":["../../src/admin/SecurityPermission.tsx"],"sourcesContent":["import React from \"react\";\nimport { AdminConfig } from \"@webiny/app-admin\";\nimport { ReactComponent as PermissionsIcon } from \"@webiny/icons/webhook.svg\";\nimport { WEBHOOK_PERMISSIONS_SCHEMA } from \"~/admin/permissions.js\";\n\nconst { Security } = AdminConfig;\n\nexport const SecurityPermission = () => {\n return (\n <AdminConfig>\n <Security.Permissions\n name=\"webhooks\"\n title=\"Webhooks\"\n description=\"Manage Webhooks permissions.\"\n icon={<PermissionsIcon />}\n schema={WEBHOOK_PERMISSIONS_SCHEMA}\n />\n </AdminConfig>\n );\n};\n"],"names":["Security","AdminConfig","SecurityPermission","PermissionsIcon","WEBHOOK_PERMISSIONS_SCHEMA"],"mappings":";;;;AAKA,MAAM,EAAEA,UAAAA,QAAQ,EAAE,GAAGC;AAEd,MAAMC,qBAAqB,IACvB,WAAP,GACI,oBAACD,aAAWA,MAAAA,WAAAA,GACR,oBAACD,SAAS,WAAW;QACjB,MAAK;QACL,OAAM;QACN,aAAY;QACZ,oBAAM,oBAACG,gBAAeA;QACtB,QAAQC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import react from "react";
|
|
2
|
+
import { AdminConfig, AdminLayout, useRouter } from "@webiny/app-admin";
|
|
3
|
+
import { HasPermission } from "./presentation/security/HasPermission.js";
|
|
4
|
+
import { WebhookListView } from "./presentation/WebhookList/components/WebhookListView.js";
|
|
5
|
+
import { WebhookFormView } from "./presentation/WebhookForm/components/WebhookFormView.js";
|
|
6
|
+
import { Routes } from "./routes.js";
|
|
7
|
+
const { Menu: Menu, Route: Route } = AdminConfig;
|
|
8
|
+
const WebhookRoutes = ()=>{
|
|
9
|
+
const { getLink } = useRouter();
|
|
10
|
+
return /*#__PURE__*/ react.createElement(AdminConfig, null, /*#__PURE__*/ react.createElement(HasPermission, {
|
|
11
|
+
entity: "webhook"
|
|
12
|
+
}, /*#__PURE__*/ react.createElement(Route, {
|
|
13
|
+
route: Routes.List,
|
|
14
|
+
element: /*#__PURE__*/ react.createElement(AdminLayout, {
|
|
15
|
+
title: "Webhooks"
|
|
16
|
+
}, /*#__PURE__*/ react.createElement(WebhookListView, null))
|
|
17
|
+
}), /*#__PURE__*/ react.createElement(Route, {
|
|
18
|
+
route: Routes.Form,
|
|
19
|
+
element: /*#__PURE__*/ react.createElement(AdminLayout, {
|
|
20
|
+
title: "Webhooks"
|
|
21
|
+
}, /*#__PURE__*/ react.createElement(WebhookFormView, null))
|
|
22
|
+
}), /*#__PURE__*/ react.createElement(Menu, {
|
|
23
|
+
name: "webhooks",
|
|
24
|
+
after: "settings",
|
|
25
|
+
element: /*#__PURE__*/ react.createElement(Menu.Link, {
|
|
26
|
+
text: "Webhooks",
|
|
27
|
+
to: getLink(Routes.List)
|
|
28
|
+
})
|
|
29
|
+
})));
|
|
30
|
+
};
|
|
31
|
+
export { WebhookRoutes };
|
|
32
|
+
|
|
33
|
+
//# sourceMappingURL=WebhookRoutes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin/WebhookRoutes.js","sources":["../../src/admin/WebhookRoutes.tsx"],"sourcesContent":["import React from \"react\";\nimport { AdminConfig } from \"@webiny/app-admin\";\nimport { useRouter } from \"@webiny/app-admin\";\nimport { AdminLayout } from \"@webiny/app-admin\";\nimport { HasPermission } from \"./presentation/security/HasPermission.js\";\nimport { WebhookListView } from \"./presentation/WebhookList/components/WebhookListView.js\";\nimport { WebhookFormView } from \"./presentation/WebhookForm/components/WebhookFormView.js\";\nimport { Routes } from \"./routes.js\";\n\nconst { Menu, Route } = AdminConfig;\n\nexport const WebhookRoutes = () => {\n const { getLink } = useRouter();\n\n return (\n <AdminConfig>\n <HasPermission entity=\"webhook\">\n <Route\n route={Routes.List}\n element={\n <AdminLayout title=\"Webhooks\">\n <WebhookListView />\n </AdminLayout>\n }\n />\n <Route\n route={Routes.Form}\n element={\n <AdminLayout title=\"Webhooks\">\n <WebhookFormView />\n </AdminLayout>\n }\n />\n <Menu\n name=\"webhooks\"\n after=\"settings\"\n element={<Menu.Link text=\"Webhooks\" to={getLink(Routes.List)} />}\n />\n </HasPermission>\n </AdminConfig>\n );\n};\n"],"names":["Menu","Route","AdminConfig","WebhookRoutes","getLink","useRouter","HasPermission","Routes","AdminLayout","WebhookListView","WebhookFormView"],"mappings":";;;;;;AASA,MAAM,EAAEA,MAAAA,IAAI,EAAEC,OAAAA,KAAK,EAAE,GAAGC;AAEjB,MAAMC,gBAAgB;IACzB,MAAM,EAAEC,OAAO,EAAE,GAAGC;IAEpB,OAAO,WAAP,GACI,oBAACH,aAAWA,MAAAA,WAAAA,GACR,oBAACI,eAAaA;QAAC,QAAO;qBAClB,oBAACL,OAAKA;QACF,OAAOM,OAAO,IAAI;QAClB,uBACI,oBAACC,aAAWA;YAAC,OAAM;yBACf,oBAACC,iBAAeA;sBAI5B,oBAACR,OAAKA;QACF,OAAOM,OAAO,IAAI;QAClB,uBACI,oBAACC,aAAWA;YAAC,OAAM;yBACf,oBAACE,iBAAeA;sBAI5B,oBAACV,MAAIA;QACD,MAAK;QACL,OAAM;QACN,uBAAS,oBAACA,KAAK,IAAI;YAAC,MAAK;YAAW,IAAII,QAAQG,OAAO,IAAI;;;AAK/E"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import react from "react";
|
|
2
|
+
import { AdminConfig, RegisterFeature } from "@webiny/app-admin";
|
|
3
|
+
import { ListWebhooksFeature } from "./features/ListWebhooks/index.js";
|
|
4
|
+
import { GetWebhookFeature } from "./features/getWebhook/index.js";
|
|
5
|
+
import { CreateWebhookFeature } from "./features/createWebhook/index.js";
|
|
6
|
+
import { UpdateWebhookFeature } from "./features/updateWebhook/index.js";
|
|
7
|
+
import { DeleteWebhookFeature } from "./features/deleteWebhook/index.js";
|
|
8
|
+
import { ListWebhookDeliveriesFeature } from "./features/listWebhookDeliveries/index.js";
|
|
9
|
+
import { TriggerWebhookFeature } from "./features/triggerWebhook/index.js";
|
|
10
|
+
import { ResendWebhookDeliveryFeature } from "./features/resendWebhookDelivery/index.js";
|
|
11
|
+
import { ListAvailableEventsFeature } from "./features/listAvailableEvents/index.js";
|
|
12
|
+
import { WebhookPermissionsFeature } from "./features/permissions/index.js";
|
|
13
|
+
import { WebhookListPresenterFeature } from "./presentation/WebhookList/index.js";
|
|
14
|
+
import { WebhookFormPresenterFeature } from "./presentation/WebhookForm/index.js";
|
|
15
|
+
import { WebhookDeliveriesPresenterFeature } from "./presentation/WebhookDeliveries/index.js";
|
|
16
|
+
import { WebhookRoutes } from "./WebhookRoutes.js";
|
|
17
|
+
import { WEBHOOK_PERMISSIONS_SCHEMA } from "./permissions.js";
|
|
18
|
+
const { Security: Security } = AdminConfig;
|
|
19
|
+
const Webhooks = ()=>/*#__PURE__*/ react.createElement(react.Fragment, null, /*#__PURE__*/ react.createElement(RegisterFeature, {
|
|
20
|
+
feature: ListWebhooksFeature
|
|
21
|
+
}), /*#__PURE__*/ react.createElement(RegisterFeature, {
|
|
22
|
+
feature: GetWebhookFeature
|
|
23
|
+
}), /*#__PURE__*/ react.createElement(RegisterFeature, {
|
|
24
|
+
feature: CreateWebhookFeature
|
|
25
|
+
}), /*#__PURE__*/ react.createElement(RegisterFeature, {
|
|
26
|
+
feature: UpdateWebhookFeature
|
|
27
|
+
}), /*#__PURE__*/ react.createElement(RegisterFeature, {
|
|
28
|
+
feature: DeleteWebhookFeature
|
|
29
|
+
}), /*#__PURE__*/ react.createElement(RegisterFeature, {
|
|
30
|
+
feature: ListWebhookDeliveriesFeature
|
|
31
|
+
}), /*#__PURE__*/ react.createElement(RegisterFeature, {
|
|
32
|
+
feature: TriggerWebhookFeature
|
|
33
|
+
}), /*#__PURE__*/ react.createElement(RegisterFeature, {
|
|
34
|
+
feature: ResendWebhookDeliveryFeature
|
|
35
|
+
}), /*#__PURE__*/ react.createElement(RegisterFeature, {
|
|
36
|
+
feature: ListAvailableEventsFeature
|
|
37
|
+
}), /*#__PURE__*/ react.createElement(RegisterFeature, {
|
|
38
|
+
feature: WebhookPermissionsFeature
|
|
39
|
+
}), /*#__PURE__*/ react.createElement(RegisterFeature, {
|
|
40
|
+
feature: WebhookListPresenterFeature
|
|
41
|
+
}), /*#__PURE__*/ react.createElement(RegisterFeature, {
|
|
42
|
+
feature: WebhookFormPresenterFeature
|
|
43
|
+
}), /*#__PURE__*/ react.createElement(RegisterFeature, {
|
|
44
|
+
feature: WebhookDeliveriesPresenterFeature
|
|
45
|
+
}), /*#__PURE__*/ react.createElement(WebhookRoutes, null), /*#__PURE__*/ react.createElement(AdminConfig, null, /*#__PURE__*/ react.createElement(Security.Permissions, {
|
|
46
|
+
name: "webhooks",
|
|
47
|
+
title: "Webhooks",
|
|
48
|
+
description: "Manage webhook permissions.",
|
|
49
|
+
schema: WEBHOOK_PERMISSIONS_SCHEMA
|
|
50
|
+
})));
|
|
51
|
+
export { Webhooks };
|
|
52
|
+
|
|
53
|
+
//# sourceMappingURL=Webhooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin/Webhooks.js","sources":["../../src/admin/Webhooks.tsx"],"sourcesContent":["import React from \"react\";\nimport { AdminConfig } from \"@webiny/app-admin\";\nimport { RegisterFeature } from \"@webiny/app-admin\";\nimport { ListWebhooksFeature } from \"./features/ListWebhooks/index.js\";\nimport { GetWebhookFeature } from \"./features/getWebhook/index.js\";\nimport { CreateWebhookFeature } from \"./features/createWebhook/index.js\";\nimport { UpdateWebhookFeature } from \"./features/updateWebhook/index.js\";\nimport { DeleteWebhookFeature } from \"./features/deleteWebhook/index.js\";\nimport { ListWebhookDeliveriesFeature } from \"./features/listWebhookDeliveries/index.js\";\nimport { TriggerWebhookFeature } from \"./features/triggerWebhook/index.js\";\nimport { ResendWebhookDeliveryFeature } from \"./features/resendWebhookDelivery/index.js\";\nimport { ListAvailableEventsFeature } from \"./features/listAvailableEvents/index.js\";\nimport { WebhookPermissionsFeature } from \"./features/permissions/index.js\";\nimport { WebhookListPresenterFeature } from \"./presentation/WebhookList/index.js\";\nimport { WebhookFormPresenterFeature } from \"./presentation/WebhookForm/index.js\";\nimport { WebhookDeliveriesPresenterFeature } from \"./presentation/WebhookDeliveries/index.js\";\nimport { WebhookRoutes } from \"./WebhookRoutes.js\";\nimport { WEBHOOK_PERMISSIONS_SCHEMA } from \"~/admin/permissions.js\";\n\nconst { Security } = AdminConfig;\n\nexport const Webhooks = () => {\n return (\n <>\n {/* Headless features. */}\n <RegisterFeature feature={ListWebhooksFeature} />\n <RegisterFeature feature={GetWebhookFeature} />\n <RegisterFeature feature={CreateWebhookFeature} />\n <RegisterFeature feature={UpdateWebhookFeature} />\n <RegisterFeature feature={DeleteWebhookFeature} />\n <RegisterFeature feature={ListWebhookDeliveriesFeature} />\n <RegisterFeature feature={TriggerWebhookFeature} />\n <RegisterFeature feature={ResendWebhookDeliveryFeature} />\n <RegisterFeature feature={ListAvailableEventsFeature} />\n <RegisterFeature feature={WebhookPermissionsFeature} />\n {/* Presentation features. */}\n <RegisterFeature feature={WebhookListPresenterFeature} />\n <RegisterFeature feature={WebhookFormPresenterFeature} />\n <RegisterFeature feature={WebhookDeliveriesPresenterFeature} />\n {/* Routes + menu. */}\n <WebhookRoutes />\n {/* Security permissions UI. */}\n <AdminConfig>\n <Security.Permissions\n name=\"webhooks\"\n title=\"Webhooks\"\n description=\"Manage webhook permissions.\"\n schema={WEBHOOK_PERMISSIONS_SCHEMA}\n />\n </AdminConfig>\n </>\n );\n};\n"],"names":["Security","AdminConfig","Webhooks","RegisterFeature","ListWebhooksFeature","GetWebhookFeature","CreateWebhookFeature","UpdateWebhookFeature","DeleteWebhookFeature","ListWebhookDeliveriesFeature","TriggerWebhookFeature","ResendWebhookDeliveryFeature","ListAvailableEventsFeature","WebhookPermissionsFeature","WebhookListPresenterFeature","WebhookFormPresenterFeature","WebhookDeliveriesPresenterFeature","WebhookRoutes","WEBHOOK_PERMISSIONS_SCHEMA"],"mappings":";;;;;;;;;;;;;;;;;AAmBA,MAAM,EAAEA,UAAAA,QAAQ,EAAE,GAAGC;AAEd,MAAMC,WAAW,IACb,WAAP,GACI,wDAEI,oBAACC,iBAAeA;QAAC,SAASC;sBAC1B,oBAACD,iBAAeA;QAAC,SAASE;sBAC1B,oBAACF,iBAAeA;QAAC,SAASG;sBAC1B,oBAACH,iBAAeA;QAAC,SAASI;sBAC1B,oBAACJ,iBAAeA;QAAC,SAASK;sBAC1B,oBAACL,iBAAeA;QAAC,SAASM;sBAC1B,oBAACN,iBAAeA;QAAC,SAASO;sBAC1B,oBAACP,iBAAeA;QAAC,SAASQ;sBAC1B,oBAACR,iBAAeA;QAAC,SAASS;sBAC1B,oBAACT,iBAAeA;QAAC,SAASU;sBAE1B,oBAACV,iBAAeA;QAAC,SAASW;sBAC1B,oBAACX,iBAAeA;QAAC,SAASY;sBAC1B,oBAACZ,iBAAeA;QAAC,SAASa;sBAE1B,oBAACC,eAAaA,OAAAA,WAAAA,GAEd,oBAAChB,aAAWA,MAAAA,WAAAA,GACR,oBAACD,SAAS,WAAW;QACjB,MAAK;QACL,OAAM;QACN,aAAY;QACZ,QAAQkB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { MainGraphQLClient } from "@webiny/app/features/mainGraphQLClient/index.js";
|
|
2
|
+
import { ListWebhooksGateway as GatewayAbstraction, type IListWebhooksInput, type IListWebhooksOutput } from "./abstractions.js";
|
|
3
|
+
declare class ListWebhooksGraphQLGateway implements GatewayAbstraction.Interface {
|
|
4
|
+
private client;
|
|
5
|
+
constructor(client: MainGraphQLClient.Interface);
|
|
6
|
+
execute(input: IListWebhooksInput): Promise<IListWebhooksOutput>;
|
|
7
|
+
}
|
|
8
|
+
export declare const ListWebhooksGateway: typeof ListWebhooksGraphQLGateway & {
|
|
9
|
+
__abstraction: import("@webiny/di").Abstraction<import("./abstractions.js").IListWebhooksGateway>;
|
|
10
|
+
};
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { MainGraphQLClient } from "@webiny/app/features/mainGraphQLClient/index.js";
|
|
2
|
+
import { ListWebhooksGateway } from "./abstractions.js";
|
|
3
|
+
const LIST_WEBHOOKS = `
|
|
4
|
+
query ListWebhooks($where: ListWebhooksWhereInput, $limit: Int, $after: String) {
|
|
5
|
+
webhooks {
|
|
6
|
+
listWebhooks(where: $where, limit: $limit, after: $after) {
|
|
7
|
+
data {
|
|
8
|
+
id
|
|
9
|
+
name
|
|
10
|
+
slug
|
|
11
|
+
endpointUrl
|
|
12
|
+
description
|
|
13
|
+
enabled
|
|
14
|
+
events
|
|
15
|
+
signingSecret
|
|
16
|
+
createdOn
|
|
17
|
+
modifiedOn
|
|
18
|
+
}
|
|
19
|
+
meta {
|
|
20
|
+
cursor
|
|
21
|
+
hasMoreItems
|
|
22
|
+
totalCount
|
|
23
|
+
}
|
|
24
|
+
error {
|
|
25
|
+
code
|
|
26
|
+
message
|
|
27
|
+
data
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
`;
|
|
33
|
+
class ListWebhooksGraphQLGateway {
|
|
34
|
+
constructor(client){
|
|
35
|
+
this.client = client;
|
|
36
|
+
}
|
|
37
|
+
async execute(input) {
|
|
38
|
+
const response = await this.client.execute({
|
|
39
|
+
query: LIST_WEBHOOKS,
|
|
40
|
+
variables: {
|
|
41
|
+
where: input.where,
|
|
42
|
+
limit: input.limit,
|
|
43
|
+
after: input.after
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
const envelope = response.webhooks.listWebhooks;
|
|
47
|
+
if (envelope.error) throw new Error(envelope.error.message);
|
|
48
|
+
return {
|
|
49
|
+
items: envelope.data,
|
|
50
|
+
meta: envelope.meta
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
const ListWebhooksGateway_ListWebhooksGateway = ListWebhooksGateway.createImplementation({
|
|
55
|
+
implementation: ListWebhooksGraphQLGateway,
|
|
56
|
+
dependencies: [
|
|
57
|
+
MainGraphQLClient
|
|
58
|
+
]
|
|
59
|
+
});
|
|
60
|
+
export { ListWebhooksGateway_ListWebhooksGateway as ListWebhooksGateway };
|
|
61
|
+
|
|
62
|
+
//# sourceMappingURL=ListWebhooksGateway.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin/features/ListWebhooks/ListWebhooksGateway.js","sources":["../../../../src/admin/features/ListWebhooks/ListWebhooksGateway.ts"],"sourcesContent":["import { MainGraphQLClient } from \"@webiny/app/features/mainGraphQLClient/index.js\";\nimport {\n ListWebhooksGateway as GatewayAbstraction,\n type IListWebhooksInput,\n type IListWebhooksOutput\n} from \"./abstractions.js\";\nimport type { Webhook } from \"~/admin/shared/types.js\";\n\nconst LIST_WEBHOOKS = /* GraphQL */ `\n query ListWebhooks($where: ListWebhooksWhereInput, $limit: Int, $after: String) {\n webhooks {\n listWebhooks(where: $where, limit: $limit, after: $after) {\n data {\n id\n name\n slug\n endpointUrl\n description\n enabled\n events\n signingSecret\n createdOn\n modifiedOn\n }\n meta {\n cursor\n hasMoreItems\n totalCount\n }\n error {\n code\n message\n data\n }\n }\n }\n }\n`;\n\ntype ListWebhooksResponse = {\n webhooks: {\n listWebhooks:\n | {\n data: Webhook[];\n meta: { cursor: string | null; hasMoreItems: boolean; totalCount: number };\n error: null;\n }\n | {\n data: null;\n meta: null;\n error: { code: string; message: string; data: unknown };\n };\n };\n};\n\nclass ListWebhooksGraphQLGateway implements GatewayAbstraction.Interface {\n constructor(private client: MainGraphQLClient.Interface) {}\n\n async execute(input: IListWebhooksInput): Promise<IListWebhooksOutput> {\n const response = await this.client.execute<ListWebhooksResponse>({\n query: LIST_WEBHOOKS,\n variables: {\n where: input.where,\n limit: input.limit,\n after: input.after\n }\n });\n\n const envelope = response.webhooks.listWebhooks;\n if (envelope.error) {\n throw new Error(envelope.error.message);\n }\n\n return {\n items: envelope.data,\n meta: envelope.meta\n };\n }\n}\n\nexport const ListWebhooksGateway = GatewayAbstraction.createImplementation({\n implementation: ListWebhooksGraphQLGateway,\n dependencies: [MainGraphQLClient]\n});\n"],"names":["LIST_WEBHOOKS","ListWebhooksGraphQLGateway","client","input","response","envelope","Error","ListWebhooksGateway","GatewayAbstraction","MainGraphQLClient"],"mappings":";;AAQA,MAAMA,gBAA8B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BrC,CAAC;AAkBD,MAAMC;IACF,YAAoBC,MAAmC,CAAE;aAArCA,MAAM,GAANA;IAAsC;IAE1D,MAAM,QAAQC,KAAyB,EAAgC;QACnE,MAAMC,WAAW,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAuB;YAC7D,OAAOJ;YACP,WAAW;gBACP,OAAOG,MAAM,KAAK;gBAClB,OAAOA,MAAM,KAAK;gBAClB,OAAOA,MAAM,KAAK;YACtB;QACJ;QAEA,MAAME,WAAWD,SAAS,QAAQ,CAAC,YAAY;QAC/C,IAAIC,SAAS,KAAK,EACd,MAAM,IAAIC,MAAMD,SAAS,KAAK,CAAC,OAAO;QAG1C,OAAO;YACH,OAAOA,SAAS,IAAI;YACpB,MAAMA,SAAS,IAAI;QACvB;IACJ;AACJ;AAEO,MAAME,0CAAsBC,oBAAAA,oBAAuC,CAAC;IACvE,gBAAgBP;IAChB,cAAc;QAACQ;KAAkB;AACrC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ListWebhooksGateway, ListWebhooksRepository as RepositoryAbstraction, type IListWebhooksInput, type IListWebhooksOutput } from "./abstractions.js";
|
|
2
|
+
declare class ListWebhooksRepositoryImpl implements RepositoryAbstraction.Interface {
|
|
3
|
+
private readonly gateway;
|
|
4
|
+
constructor(gateway: ListWebhooksGateway.Interface);
|
|
5
|
+
execute(input: IListWebhooksInput): Promise<IListWebhooksOutput>;
|
|
6
|
+
}
|
|
7
|
+
export declare const ListWebhooksRepository: typeof ListWebhooksRepositoryImpl & {
|
|
8
|
+
__abstraction: import("@webiny/di").Abstraction<import("./abstractions.js").IListWebhooksRepository>;
|
|
9
|
+
};
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ListWebhooksGateway, ListWebhooksRepository } from "./abstractions.js";
|
|
2
|
+
class ListWebhooksRepositoryImpl {
|
|
3
|
+
constructor(gateway){
|
|
4
|
+
this.gateway = gateway;
|
|
5
|
+
}
|
|
6
|
+
async execute(input) {
|
|
7
|
+
return this.gateway.execute(input);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
const ListWebhooksRepository_ListWebhooksRepository = ListWebhooksRepository.createImplementation({
|
|
11
|
+
implementation: ListWebhooksRepositoryImpl,
|
|
12
|
+
dependencies: [
|
|
13
|
+
ListWebhooksGateway
|
|
14
|
+
]
|
|
15
|
+
});
|
|
16
|
+
export { ListWebhooksRepository_ListWebhooksRepository as ListWebhooksRepository };
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=ListWebhooksRepository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin/features/ListWebhooks/ListWebhooksRepository.js","sources":["../../../../src/admin/features/ListWebhooks/ListWebhooksRepository.ts"],"sourcesContent":["import {\n ListWebhooksGateway,\n ListWebhooksRepository as RepositoryAbstraction,\n type IListWebhooksInput,\n type IListWebhooksOutput\n} from \"./abstractions.js\";\n\nclass ListWebhooksRepositoryImpl implements RepositoryAbstraction.Interface {\n constructor(private readonly gateway: ListWebhooksGateway.Interface) {}\n\n async execute(input: IListWebhooksInput): Promise<IListWebhooksOutput> {\n return this.gateway.execute(input);\n }\n}\n\nexport const ListWebhooksRepository = RepositoryAbstraction.createImplementation({\n implementation: ListWebhooksRepositoryImpl,\n dependencies: [ListWebhooksGateway]\n});\n"],"names":["ListWebhooksRepositoryImpl","gateway","input","ListWebhooksRepository","RepositoryAbstraction","ListWebhooksGateway"],"mappings":";AAOA,MAAMA;IACF,YAA6BC,OAAsC,CAAE;aAAxCA,OAAO,GAAPA;IAAyC;IAEtE,MAAM,QAAQC,KAAyB,EAAgC;QACnE,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAACA;IAChC;AACJ;AAEO,MAAMC,gDAAyBC,uBAAAA,oBAA0C,CAAC;IAC7E,gBAAgBJ;IAChB,cAAc;QAACK;KAAoB;AACvC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ListWebhooksRepository, ListWebhooksUseCase as UseCaseAbstraction, type IListWebhooksInput, type IListWebhooksOutput } from "./abstractions.js";
|
|
2
|
+
declare class ListWebhooksUseCaseImpl implements UseCaseAbstraction.Interface {
|
|
3
|
+
private repository;
|
|
4
|
+
constructor(repository: ListWebhooksRepository.Interface);
|
|
5
|
+
execute(input: IListWebhooksInput): Promise<IListWebhooksOutput>;
|
|
6
|
+
}
|
|
7
|
+
export declare const ListWebhooksUseCase: typeof ListWebhooksUseCaseImpl & {
|
|
8
|
+
__abstraction: import("@webiny/di").Abstraction<import("./abstractions.js").IListWebhooksUseCase>;
|
|
9
|
+
};
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ListWebhooksRepository, ListWebhooksUseCase } from "./abstractions.js";
|
|
2
|
+
class ListWebhooksUseCaseImpl {
|
|
3
|
+
constructor(repository){
|
|
4
|
+
this.repository = repository;
|
|
5
|
+
}
|
|
6
|
+
async execute(input) {
|
|
7
|
+
return this.repository.execute(input);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
const ListWebhooksUseCase_ListWebhooksUseCase = ListWebhooksUseCase.createImplementation({
|
|
11
|
+
implementation: ListWebhooksUseCaseImpl,
|
|
12
|
+
dependencies: [
|
|
13
|
+
ListWebhooksRepository
|
|
14
|
+
]
|
|
15
|
+
});
|
|
16
|
+
export { ListWebhooksUseCase_ListWebhooksUseCase as ListWebhooksUseCase };
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=ListWebhooksUseCase.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin/features/ListWebhooks/ListWebhooksUseCase.js","sources":["../../../../src/admin/features/ListWebhooks/ListWebhooksUseCase.ts"],"sourcesContent":["import {\n ListWebhooksRepository,\n ListWebhooksUseCase as UseCaseAbstraction,\n type IListWebhooksInput,\n type IListWebhooksOutput\n} from \"./abstractions.js\";\n\nclass ListWebhooksUseCaseImpl implements UseCaseAbstraction.Interface {\n constructor(private repository: ListWebhooksRepository.Interface) {}\n\n async execute(input: IListWebhooksInput): Promise<IListWebhooksOutput> {\n return this.repository.execute(input);\n }\n}\n\nexport const ListWebhooksUseCase = UseCaseAbstraction.createImplementation({\n implementation: ListWebhooksUseCaseImpl,\n dependencies: [ListWebhooksRepository]\n});\n"],"names":["ListWebhooksUseCaseImpl","repository","input","ListWebhooksUseCase","UseCaseAbstraction","ListWebhooksRepository"],"mappings":";AAOA,MAAMA;IACF,YAAoBC,UAA4C,CAAE;aAA9CA,UAAU,GAAVA;IAA+C;IAEnE,MAAM,QAAQC,KAAyB,EAAgC;QACnE,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAACA;IACnC;AACJ;AAEO,MAAMC,0CAAsBC,oBAAAA,oBAAuC,CAAC;IACvE,gBAAgBJ;IAChB,cAAc;QAACK;KAAuB;AAC1C"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { Webhook } from "../../../admin/shared/types.js";
|
|
2
|
+
export interface IListWebhooksInput {
|
|
3
|
+
where?: Record<string, unknown>;
|
|
4
|
+
limit?: number;
|
|
5
|
+
after?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface IListWebhooksMeta {
|
|
8
|
+
cursor: string | null;
|
|
9
|
+
hasMoreItems: boolean;
|
|
10
|
+
totalCount: number;
|
|
11
|
+
}
|
|
12
|
+
export interface IListWebhooksOutput {
|
|
13
|
+
items: Webhook[];
|
|
14
|
+
meta: IListWebhooksMeta;
|
|
15
|
+
}
|
|
16
|
+
export interface IListWebhooksGateway {
|
|
17
|
+
execute(input: IListWebhooksInput): Promise<IListWebhooksOutput>;
|
|
18
|
+
}
|
|
19
|
+
export declare const ListWebhooksGateway: import("@webiny/di").Abstraction<IListWebhooksGateway>;
|
|
20
|
+
export declare namespace ListWebhooksGateway {
|
|
21
|
+
type Interface = IListWebhooksGateway;
|
|
22
|
+
}
|
|
23
|
+
export interface IListWebhooksRepository {
|
|
24
|
+
execute(input: IListWebhooksInput): Promise<IListWebhooksOutput>;
|
|
25
|
+
}
|
|
26
|
+
export declare const ListWebhooksRepository: import("@webiny/di").Abstraction<IListWebhooksRepository>;
|
|
27
|
+
export declare namespace ListWebhooksRepository {
|
|
28
|
+
type Interface = IListWebhooksRepository;
|
|
29
|
+
}
|
|
30
|
+
export interface IListWebhooksUseCase {
|
|
31
|
+
execute(input: IListWebhooksInput): Promise<IListWebhooksOutput>;
|
|
32
|
+
}
|
|
33
|
+
export declare const ListWebhooksUseCase: import("@webiny/di").Abstraction<IListWebhooksUseCase>;
|
|
34
|
+
export declare namespace ListWebhooksUseCase {
|
|
35
|
+
type Interface = IListWebhooksUseCase;
|
|
36
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createAbstraction } from "@webiny/feature/admin";
|
|
2
|
+
const ListWebhooksGateway = createAbstraction("ListWebhooksGateway");
|
|
3
|
+
const ListWebhooksRepository = createAbstraction("ListWebhooksRepository");
|
|
4
|
+
const ListWebhooksUseCase = createAbstraction("ListWebhooksUseCase");
|
|
5
|
+
export { ListWebhooksGateway, ListWebhooksRepository, ListWebhooksUseCase };
|
|
6
|
+
|
|
7
|
+
//# sourceMappingURL=abstractions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin/features/ListWebhooks/abstractions.js","sources":["../../../../src/admin/features/ListWebhooks/abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/admin\";\nimport type { Webhook } from \"~/admin/shared/types.js\";\n\nexport interface IListWebhooksInput {\n where?: Record<string, unknown>;\n limit?: number;\n after?: string;\n}\n\nexport interface IListWebhooksMeta {\n cursor: string | null;\n hasMoreItems: boolean;\n totalCount: number;\n}\n\nexport interface IListWebhooksOutput {\n items: Webhook[];\n meta: IListWebhooksMeta;\n}\n\nexport interface IListWebhooksGateway {\n execute(input: IListWebhooksInput): Promise<IListWebhooksOutput>;\n}\n\nexport const ListWebhooksGateway = createAbstraction<IListWebhooksGateway>(\"ListWebhooksGateway\");\n\nexport namespace ListWebhooksGateway {\n export type Interface = IListWebhooksGateway;\n}\n\nexport interface IListWebhooksRepository {\n execute(input: IListWebhooksInput): Promise<IListWebhooksOutput>;\n}\n\nexport const ListWebhooksRepository =\n createAbstraction<IListWebhooksRepository>(\"ListWebhooksRepository\");\n\nexport namespace ListWebhooksRepository {\n export type Interface = IListWebhooksRepository;\n}\n\nexport interface IListWebhooksUseCase {\n execute(input: IListWebhooksInput): Promise<IListWebhooksOutput>;\n}\n\nexport const ListWebhooksUseCase = createAbstraction<IListWebhooksUseCase>(\"ListWebhooksUseCase\");\n\nexport namespace ListWebhooksUseCase {\n export type Interface = IListWebhooksUseCase;\n}\n"],"names":["ListWebhooksGateway","createAbstraction","ListWebhooksRepository","ListWebhooksUseCase"],"mappings":";AAwBO,MAAMA,sBAAsBC,kBAAwC;AAUpE,MAAMC,yBACTD,kBAA2C;AAUxC,MAAME,sBAAsBF,kBAAwC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { createFeature } from "@webiny/feature/admin";
|
|
2
|
+
import { ListWebhooksUseCase } from "./abstractions.js";
|
|
3
|
+
import { ListWebhooksUseCase as external_ListWebhooksUseCase_js_ListWebhooksUseCase } from "./ListWebhooksUseCase.js";
|
|
4
|
+
import { ListWebhooksRepository } from "./ListWebhooksRepository.js";
|
|
5
|
+
import { ListWebhooksGateway } from "./ListWebhooksGateway.js";
|
|
6
|
+
const ListWebhooksFeature = createFeature({
|
|
7
|
+
name: "Webhooks/ListWebhooks",
|
|
8
|
+
register (container) {
|
|
9
|
+
container.register(external_ListWebhooksUseCase_js_ListWebhooksUseCase);
|
|
10
|
+
container.register(ListWebhooksRepository).inSingletonScope();
|
|
11
|
+
container.register(ListWebhooksGateway).inSingletonScope();
|
|
12
|
+
},
|
|
13
|
+
resolve (container) {
|
|
14
|
+
return {
|
|
15
|
+
useCase: container.resolve(ListWebhooksUseCase)
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
export { ListWebhooksFeature };
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin/features/ListWebhooks/feature.js","sources":["../../../../src/admin/features/ListWebhooks/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/admin\";\nimport { ListWebhooksUseCase as UseCaseAbstraction } from \"./abstractions.js\";\nimport { ListWebhooksUseCase } from \"./ListWebhooksUseCase.js\";\nimport { ListWebhooksRepository } from \"./ListWebhooksRepository.js\";\nimport { ListWebhooksGateway } from \"./ListWebhooksGateway.js\";\n\nexport const ListWebhooksFeature = createFeature({\n name: \"Webhooks/ListWebhooks\",\n register(container) {\n container.register(ListWebhooksUseCase);\n container.register(ListWebhooksRepository).inSingletonScope();\n container.register(ListWebhooksGateway).inSingletonScope();\n },\n resolve(container) {\n return {\n useCase: container.resolve(UseCaseAbstraction)\n };\n }\n});\n"],"names":["ListWebhooksFeature","createFeature","container","ListWebhooksUseCase","ListWebhooksRepository","ListWebhooksGateway","UseCaseAbstraction"],"mappings":";;;;;AAMO,MAAMA,sBAAsBC,cAAc;IAC7C,MAAM;IACN,UAASC,SAAS;QACdA,UAAU,QAAQ,CAACC;QACnBD,UAAU,QAAQ,CAACE,wBAAwB,gBAAgB;QAC3DF,UAAU,QAAQ,CAACG,qBAAqB,gBAAgB;IAC5D;IACA,SAAQH,SAAS;QACb,OAAO;YACH,SAASA,UAAU,OAAO,CAACI;QAC/B;IACJ;AACJ"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { WebinySdk } from "@webiny/app-admin/features/webinySdk/abstractions.js";
|
|
2
|
+
import type { Webhook } from "../../../admin/shared/types.js";
|
|
3
|
+
import { CreateWebhookGateway as GatewayAbstraction, type CreateWebhookInput } from "./abstractions.js";
|
|
4
|
+
declare class CreateWebhookGatewayImpl implements GatewayAbstraction.Interface {
|
|
5
|
+
private readonly sdk;
|
|
6
|
+
constructor(sdk: WebinySdk.Interface);
|
|
7
|
+
execute(input: CreateWebhookInput): Promise<Webhook>;
|
|
8
|
+
}
|
|
9
|
+
export declare const CreateWebhookGateway: typeof CreateWebhookGatewayImpl & {
|
|
10
|
+
__abstraction: import("@webiny/di").Abstraction<import("./abstractions.js").ICreateWebhookGateway>;
|
|
11
|
+
};
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { WebinySdk } from "@webiny/app-admin/features/webinySdk/abstractions.js";
|
|
2
|
+
import { CreateWebhookGateway } from "./abstractions.js";
|
|
3
|
+
class CreateWebhookGatewayImpl {
|
|
4
|
+
constructor(sdk){
|
|
5
|
+
this.sdk = sdk;
|
|
6
|
+
}
|
|
7
|
+
async execute(input) {
|
|
8
|
+
const result = await this.sdk.webhooks.createWebhook(input);
|
|
9
|
+
if (result.isFail()) throw new Error(result.error.message);
|
|
10
|
+
return result.value;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
const CreateWebhookGateway_CreateWebhookGateway = CreateWebhookGateway.createImplementation({
|
|
14
|
+
implementation: CreateWebhookGatewayImpl,
|
|
15
|
+
dependencies: [
|
|
16
|
+
WebinySdk
|
|
17
|
+
]
|
|
18
|
+
});
|
|
19
|
+
export { CreateWebhookGateway_CreateWebhookGateway as CreateWebhookGateway };
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=CreateWebhookGateway.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin/features/createWebhook/CreateWebhookGateway.js","sources":["../../../../src/admin/features/createWebhook/CreateWebhookGateway.ts"],"sourcesContent":["import { WebinySdk } from \"@webiny/app-admin/features/webinySdk/abstractions.js\";\nimport type { Webhook } from \"~/admin/shared/types.js\";\nimport {\n CreateWebhookGateway as GatewayAbstraction,\n type CreateWebhookInput\n} from \"./abstractions.js\";\n\nclass CreateWebhookGatewayImpl implements GatewayAbstraction.Interface {\n constructor(private readonly sdk: WebinySdk.Interface) {}\n\n async execute(input: CreateWebhookInput): Promise<Webhook> {\n const result = await this.sdk.webhooks.createWebhook(input);\n\n if (result.isFail()) {\n throw new Error(result.error.message);\n }\n\n return result.value;\n }\n}\n\nexport const CreateWebhookGateway = GatewayAbstraction.createImplementation({\n implementation: CreateWebhookGatewayImpl,\n dependencies: [WebinySdk]\n});\n"],"names":["CreateWebhookGatewayImpl","sdk","input","result","Error","CreateWebhookGateway","GatewayAbstraction","WebinySdk"],"mappings":";;AAOA,MAAMA;IACF,YAA6BC,GAAwB,CAAE;aAA1BA,GAAG,GAAHA;IAA2B;IAExD,MAAM,QAAQC,KAAyB,EAAoB;QACvD,MAAMC,SAAS,MAAM,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,aAAa,CAACD;QAErD,IAAIC,OAAO,MAAM,IACb,MAAM,IAAIC,MAAMD,OAAO,KAAK,CAAC,OAAO;QAGxC,OAAOA,OAAO,KAAK;IACvB;AACJ;AAEO,MAAME,4CAAuBC,qBAAAA,oBAAuC,CAAC;IACxE,gBAAgBN;IAChB,cAAc;QAACO;KAAU;AAC7B"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Webhook } from "../../../admin/shared/types.js";
|
|
2
|
+
import { CreateWebhookUseCase as UseCaseAbstraction, CreateWebhookGateway, type CreateWebhookInput } from "./abstractions.js";
|
|
3
|
+
declare class CreateWebhookUseCaseImpl implements UseCaseAbstraction.Interface {
|
|
4
|
+
private readonly gateway;
|
|
5
|
+
constructor(gateway: CreateWebhookGateway.Interface);
|
|
6
|
+
execute(input: CreateWebhookInput): Promise<Webhook>;
|
|
7
|
+
}
|
|
8
|
+
export declare const CreateWebhookUseCase: typeof CreateWebhookUseCaseImpl & {
|
|
9
|
+
__abstraction: import("@webiny/di").Abstraction<import("./abstractions.js").ICreateWebhookUseCase>;
|
|
10
|
+
};
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CreateWebhookGateway, CreateWebhookUseCase } from "./abstractions.js";
|
|
2
|
+
class CreateWebhookUseCaseImpl {
|
|
3
|
+
constructor(gateway){
|
|
4
|
+
this.gateway = gateway;
|
|
5
|
+
}
|
|
6
|
+
async execute(input) {
|
|
7
|
+
return this.gateway.execute(input);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
const CreateWebhookUseCase_CreateWebhookUseCase = CreateWebhookUseCase.createImplementation({
|
|
11
|
+
implementation: CreateWebhookUseCaseImpl,
|
|
12
|
+
dependencies: [
|
|
13
|
+
CreateWebhookGateway
|
|
14
|
+
]
|
|
15
|
+
});
|
|
16
|
+
export { CreateWebhookUseCase_CreateWebhookUseCase as CreateWebhookUseCase };
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=CreateWebhookUseCase.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin/features/createWebhook/CreateWebhookUseCase.js","sources":["../../../../src/admin/features/createWebhook/CreateWebhookUseCase.ts"],"sourcesContent":["import type { Webhook } from \"~/admin/shared/types.js\";\nimport {\n CreateWebhookUseCase as UseCaseAbstraction,\n CreateWebhookGateway,\n type CreateWebhookInput\n} from \"./abstractions.js\";\n\nclass CreateWebhookUseCaseImpl implements UseCaseAbstraction.Interface {\n constructor(private readonly gateway: CreateWebhookGateway.Interface) {}\n\n async execute(input: CreateWebhookInput): Promise<Webhook> {\n return this.gateway.execute(input);\n }\n}\n\nexport const CreateWebhookUseCase = UseCaseAbstraction.createImplementation({\n implementation: CreateWebhookUseCaseImpl,\n dependencies: [CreateWebhookGateway]\n});\n"],"names":["CreateWebhookUseCaseImpl","gateway","input","CreateWebhookUseCase","UseCaseAbstraction","CreateWebhookGateway"],"mappings":";AAOA,MAAMA;IACF,YAA6BC,OAAuC,CAAE;aAAzCA,OAAO,GAAPA;IAA0C;IAEvE,MAAM,QAAQC,KAAyB,EAAoB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAACA;IAChC;AACJ;AAEO,MAAMC,4CAAuBC,qBAAAA,oBAAuC,CAAC;IACxE,gBAAgBJ;IAChB,cAAc;QAACK;KAAqB;AACxC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Webhook } from "../../../admin/shared/types.js";
|
|
2
|
+
export interface CreateWebhookInput {
|
|
3
|
+
name: string;
|
|
4
|
+
endpointUrl: string;
|
|
5
|
+
events: string[];
|
|
6
|
+
slug?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
enabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface ICreateWebhookGateway {
|
|
11
|
+
execute(input: CreateWebhookInput): Promise<Webhook>;
|
|
12
|
+
}
|
|
13
|
+
export declare const CreateWebhookGateway: import("@webiny/di").Abstraction<ICreateWebhookGateway>;
|
|
14
|
+
export declare namespace CreateWebhookGateway {
|
|
15
|
+
type Interface = ICreateWebhookGateway;
|
|
16
|
+
}
|
|
17
|
+
export interface ICreateWebhookUseCase {
|
|
18
|
+
execute(input: CreateWebhookInput): Promise<Webhook>;
|
|
19
|
+
}
|
|
20
|
+
export declare const CreateWebhookUseCase: import("@webiny/di").Abstraction<ICreateWebhookUseCase>;
|
|
21
|
+
export declare namespace CreateWebhookUseCase {
|
|
22
|
+
type Interface = ICreateWebhookUseCase;
|
|
23
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { createAbstraction } from "@webiny/feature/admin";
|
|
2
|
+
const CreateWebhookGateway = createAbstraction("CreateWebhookGateway");
|
|
3
|
+
const CreateWebhookUseCase = createAbstraction("CreateWebhookUseCase");
|
|
4
|
+
export { CreateWebhookGateway, CreateWebhookUseCase };
|
|
5
|
+
|
|
6
|
+
//# sourceMappingURL=abstractions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin/features/createWebhook/abstractions.js","sources":["../../../../src/admin/features/createWebhook/abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/admin\";\nimport type { Webhook } from \"~/admin/shared/types.js\";\n\nexport interface CreateWebhookInput {\n name: string;\n endpointUrl: string;\n events: string[];\n slug?: string;\n description?: string;\n enabled?: boolean;\n}\n\nexport interface ICreateWebhookGateway {\n execute(input: CreateWebhookInput): Promise<Webhook>;\n}\n\nexport const CreateWebhookGateway =\n createAbstraction<ICreateWebhookGateway>(\"CreateWebhookGateway\");\n\nexport namespace CreateWebhookGateway {\n export type Interface = ICreateWebhookGateway;\n}\n\nexport interface ICreateWebhookUseCase {\n execute(input: CreateWebhookInput): Promise<Webhook>;\n}\n\nexport const CreateWebhookUseCase =\n createAbstraction<ICreateWebhookUseCase>(\"CreateWebhookUseCase\");\n\nexport namespace CreateWebhookUseCase {\n export type Interface = ICreateWebhookUseCase;\n}\n"],"names":["CreateWebhookGateway","createAbstraction","CreateWebhookUseCase"],"mappings":";AAgBO,MAAMA,uBACTC,kBAAyC;AAUtC,MAAMC,uBACTD,kBAAyC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { createFeature } from "@webiny/feature/admin";
|
|
2
|
+
import { CreateWebhookUseCase } from "./abstractions.js";
|
|
3
|
+
import { CreateWebhookUseCase as external_CreateWebhookUseCase_js_CreateWebhookUseCase } from "./CreateWebhookUseCase.js";
|
|
4
|
+
import { CreateWebhookGateway } from "./CreateWebhookGateway.js";
|
|
5
|
+
const CreateWebhookFeature = createFeature({
|
|
6
|
+
name: "Webhooks/CreateWebhook",
|
|
7
|
+
register (container) {
|
|
8
|
+
container.register(external_CreateWebhookUseCase_js_CreateWebhookUseCase);
|
|
9
|
+
container.register(CreateWebhookGateway).inSingletonScope();
|
|
10
|
+
},
|
|
11
|
+
resolve (container) {
|
|
12
|
+
return {
|
|
13
|
+
useCase: container.resolve(CreateWebhookUseCase)
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
export { CreateWebhookFeature };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin/features/createWebhook/feature.js","sources":["../../../../src/admin/features/createWebhook/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/admin\";\nimport { CreateWebhookUseCase as UseCaseAbstraction } from \"./abstractions.js\";\nimport { CreateWebhookUseCase } from \"./CreateWebhookUseCase.js\";\nimport { CreateWebhookGateway } from \"./CreateWebhookGateway.js\";\n\nexport const CreateWebhookFeature = createFeature({\n name: \"Webhooks/CreateWebhook\",\n register(container) {\n container.register(CreateWebhookUseCase);\n container.register(CreateWebhookGateway).inSingletonScope();\n },\n resolve(container) {\n return {\n useCase: container.resolve(UseCaseAbstraction)\n };\n }\n});\n"],"names":["CreateWebhookFeature","createFeature","container","CreateWebhookUseCase","CreateWebhookGateway","UseCaseAbstraction"],"mappings":";;;;AAKO,MAAMA,uBAAuBC,cAAc;IAC9C,MAAM;IACN,UAASC,SAAS;QACdA,UAAU,QAAQ,CAACC;QACnBD,UAAU,QAAQ,CAACE,sBAAsB,gBAAgB;IAC7D;IACA,SAAQF,SAAS;QACb,OAAO;YACH,SAASA,UAAU,OAAO,CAACG;QAC/B;IACJ;AACJ"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { WebinySdk } from "@webiny/app-admin/features/webinySdk/abstractions.js";
|
|
2
|
+
import { DeleteWebhookGateway as GatewayAbstraction } from "./abstractions.js";
|
|
3
|
+
declare class DeleteWebhookGatewayImpl implements GatewayAbstraction.Interface {
|
|
4
|
+
private readonly sdk;
|
|
5
|
+
constructor(sdk: WebinySdk.Interface);
|
|
6
|
+
execute(id: string): Promise<boolean>;
|
|
7
|
+
}
|
|
8
|
+
export declare const DeleteWebhookGateway: typeof DeleteWebhookGatewayImpl & {
|
|
9
|
+
__abstraction: import("@webiny/di").Abstraction<import("./abstractions.js").IDeleteWebhookGateway>;
|
|
10
|
+
};
|
|
11
|
+
export {};
|