@webiny/webhooks 0.0.0-unstable.7be00a75a9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +11 -0
- package/admin/WebhookRoutes.d.ts +2 -0
- package/admin/WebhookRoutes.js +68 -0
- package/admin/WebhookRoutes.js.map +1 -0
- package/admin/Webhooks.d.ts +2 -0
- package/admin/Webhooks.js +64 -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/getWebhookSettings/GetWebhookSettingsGateway.d.ts +12 -0
- package/admin/features/getWebhookSettings/GetWebhookSettingsGateway.js +41 -0
- package/admin/features/getWebhookSettings/GetWebhookSettingsGateway.js.map +1 -0
- package/admin/features/getWebhookSettings/GetWebhookSettingsUseCase.d.ts +11 -0
- package/admin/features/getWebhookSettings/GetWebhookSettingsUseCase.js +18 -0
- package/admin/features/getWebhookSettings/GetWebhookSettingsUseCase.js.map +1 -0
- package/admin/features/getWebhookSettings/abstractions.d.ts +15 -0
- package/admin/features/getWebhookSettings/abstractions.js +6 -0
- package/admin/features/getWebhookSettings/abstractions.js.map +1 -0
- package/admin/features/getWebhookSettings/feature.d.ts +3 -0
- package/admin/features/getWebhookSettings/feature.js +19 -0
- package/admin/features/getWebhookSettings/feature.js.map +1 -0
- package/admin/features/getWebhookSettings/index.d.ts +2 -0
- package/admin/features/getWebhookSettings/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 +33 -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/features/updateWebhookSettings/UpdateWebhookSettingsGateway.d.ts +12 -0
- package/admin/features/updateWebhookSettings/UpdateWebhookSettingsGateway.js +44 -0
- package/admin/features/updateWebhookSettings/UpdateWebhookSettingsGateway.js.map +1 -0
- package/admin/features/updateWebhookSettings/UpdateWebhookSettingsUseCase.d.ts +11 -0
- package/admin/features/updateWebhookSettings/UpdateWebhookSettingsUseCase.js +18 -0
- package/admin/features/updateWebhookSettings/UpdateWebhookSettingsUseCase.js.map +1 -0
- package/admin/features/updateWebhookSettings/abstractions.d.ts +19 -0
- package/admin/features/updateWebhookSettings/abstractions.js +6 -0
- package/admin/features/updateWebhookSettings/abstractions.js.map +1 -0
- package/admin/features/updateWebhookSettings/feature.d.ts +3 -0
- package/admin/features/updateWebhookSettings/feature.js +19 -0
- package/admin/features/updateWebhookSettings/feature.js.map +1 -0
- package/admin/features/updateWebhookSettings/index.d.ts +2 -0
- package/admin/features/updateWebhookSettings/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 +21 -0
- package/admin/presentation/WebhookDeliveries/WebhookDeliveriesPresenter.js +57 -0
- package/admin/presentation/WebhookDeliveries/WebhookDeliveriesPresenter.js.map +1 -0
- package/admin/presentation/WebhookDeliveries/abstractions.d.ts +18 -0
- package/admin/presentation/WebhookDeliveries/abstractions.js +5 -0
- package/admin/presentation/WebhookDeliveries/abstractions.js.map +1 -0
- package/admin/presentation/WebhookDeliveries/components/DeliveryAccordionRow.d.ts +11 -0
- package/admin/presentation/WebhookDeliveries/components/DeliveryAccordionRow.js +36 -0
- package/admin/presentation/WebhookDeliveries/components/DeliveryAccordionRow.js.map +1 -0
- package/admin/presentation/WebhookDeliveries/components/DeliveryDetail.d.ts +11 -0
- package/admin/presentation/WebhookDeliveries/components/DeliveryDetail.js +32 -0
- package/admin/presentation/WebhookDeliveries/components/DeliveryDetail.js.map +1 -0
- package/admin/presentation/WebhookDeliveries/components/DeliveryDetailContent.d.ts +7 -0
- package/admin/presentation/WebhookDeliveries/components/DeliveryDetailContent.js +76 -0
- package/admin/presentation/WebhookDeliveries/components/DeliveryDetailContent.js.map +1 -0
- package/admin/presentation/WebhookDeliveries/components/DeliveryDetailPanel.d.ts +9 -0
- package/admin/presentation/WebhookDeliveries/components/DeliveryDetailPanel.js +22 -0
- package/admin/presentation/WebhookDeliveries/components/DeliveryDetailPanel.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/components/statusVariant.d.ts +1 -0
- package/admin/presentation/WebhookDeliveries/components/statusVariant.js +13 -0
- package/admin/presentation/WebhookDeliveries/components/statusVariant.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/WebhookDeliveriesPage/WebhookDeliveriesPagePresenter.d.ts +37 -0
- package/admin/presentation/WebhookDeliveriesPage/WebhookDeliveriesPagePresenter.js +196 -0
- package/admin/presentation/WebhookDeliveriesPage/WebhookDeliveriesPagePresenter.js.map +1 -0
- package/admin/presentation/WebhookDeliveriesPage/abstractions.d.ts +39 -0
- package/admin/presentation/WebhookDeliveriesPage/abstractions.js +5 -0
- package/admin/presentation/WebhookDeliveriesPage/abstractions.js.map +1 -0
- package/admin/presentation/WebhookDeliveriesPage/components/DeliveryBottomInfoBar.d.ts +9 -0
- package/admin/presentation/WebhookDeliveriesPage/components/DeliveryBottomInfoBar.js +43 -0
- package/admin/presentation/WebhookDeliveriesPage/components/DeliveryBottomInfoBar.js.map +1 -0
- package/admin/presentation/WebhookDeliveriesPage/components/DeliveryFilters.d.ts +9 -0
- package/admin/presentation/WebhookDeliveriesPage/components/DeliveryFilters.js +66 -0
- package/admin/presentation/WebhookDeliveriesPage/components/DeliveryFilters.js.map +1 -0
- package/admin/presentation/WebhookDeliveriesPage/components/DeliveryList.d.ts +9 -0
- package/admin/presentation/WebhookDeliveriesPage/components/DeliveryList.js +45 -0
- package/admin/presentation/WebhookDeliveriesPage/components/DeliveryList.js.map +1 -0
- package/admin/presentation/WebhookDeliveriesPage/components/WebhookDeliveriesPage.d.ts +2 -0
- package/admin/presentation/WebhookDeliveriesPage/components/WebhookDeliveriesPage.js +64 -0
- package/admin/presentation/WebhookDeliveriesPage/components/WebhookDeliveriesPage.js.map +1 -0
- package/admin/presentation/WebhookDeliveriesPage/feature.d.ts +3 -0
- package/admin/presentation/WebhookDeliveriesPage/feature.js +17 -0
- package/admin/presentation/WebhookDeliveriesPage/feature.js.map +1 -0
- package/admin/presentation/WebhookDeliveriesPage/index.d.ts +5 -0
- package/admin/presentation/WebhookDeliveriesPage/index.js +1 -0
- package/admin/presentation/WebhookForm/WebhookFormPresenter.d.ts +42 -0
- package/admin/presentation/WebhookForm/WebhookFormPresenter.js +252 -0
- package/admin/presentation/WebhookForm/WebhookFormPresenter.js.map +1 -0
- package/admin/presentation/WebhookForm/abstractions.d.ts +27 -0
- package/admin/presentation/WebhookForm/abstractions.js +5 -0
- package/admin/presentation/WebhookForm/abstractions.js.map +1 -0
- package/admin/presentation/WebhookForm/components/SigningSecret.d.ts +9 -0
- package/admin/presentation/WebhookForm/components/SigningSecret.js +47 -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 +97 -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 +46 -0
- package/admin/presentation/WebhookList/WebhookListPresenter.js +92 -0
- package/admin/presentation/WebhookList/WebhookListPresenter.js.map +1 -0
- package/admin/presentation/WebhookList/abstractions.d.ts +45 -0
- package/admin/presentation/WebhookList/abstractions.js +5 -0
- package/admin/presentation/WebhookList/abstractions.js.map +1 -0
- package/admin/presentation/WebhookList/components/CreateWebhookButton.d.ts +2 -0
- package/admin/presentation/WebhookList/components/CreateWebhookButton.js +22 -0
- package/admin/presentation/WebhookList/components/CreateWebhookButton.js.map +1 -0
- package/admin/presentation/WebhookList/components/WebhookListContent.d.ts +9 -0
- package/admin/presentation/WebhookList/components/WebhookListContent.js +158 -0
- package/admin/presentation/WebhookList/components/WebhookListContent.js.map +1 -0
- package/admin/presentation/WebhookList/components/WebhookListView.d.ts +2 -0
- package/admin/presentation/WebhookList/components/WebhookListView.js +46 -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/WebhookSettings/WebhookSettingsPresenter.d.ts +21 -0
- package/admin/presentation/WebhookSettings/WebhookSettingsPresenter.js +89 -0
- package/admin/presentation/WebhookSettings/WebhookSettingsPresenter.js.map +1 -0
- package/admin/presentation/WebhookSettings/abstractions.d.ts +16 -0
- package/admin/presentation/WebhookSettings/abstractions.js +5 -0
- package/admin/presentation/WebhookSettings/abstractions.js.map +1 -0
- package/admin/presentation/WebhookSettings/components/WebhookSettingsView.d.ts +2 -0
- package/admin/presentation/WebhookSettings/components/WebhookSettingsView.js +56 -0
- package/admin/presentation/WebhookSettings/components/WebhookSettingsView.js.map +1 -0
- package/admin/presentation/WebhookSettings/feature.d.ts +3 -0
- package/admin/presentation/WebhookSettings/feature.js +17 -0
- package/admin/presentation/WebhookSettings/feature.js.map +1 -0
- package/admin/presentation/WebhookSettings/index.d.ts +2 -0
- package/admin/presentation/WebhookSettings/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 +9 -0
- package/admin/routes.js +25 -0
- package/admin/routes.js.map +1 -0
- package/admin/shared/types.d.ts +9 -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 +65 -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 +35 -0
- package/api/domain/WebhookDelivery.js +0 -0
- package/api/domain/WebhookSettings.d.ts +4 -0
- package/api/domain/WebhookSettings.js +0 -0
- package/api/domain/constants.d.ts +5 -0
- package/api/domain/constants.js +8 -0
- package/api/domain/constants.js.map +1 -0
- package/api/domain/errors.d.ts +41 -0
- package/api/domain/errors.js +83 -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 +48 -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/CreateWebhook/schema.d.ts +10 -0
- package/api/features/CreateWebhook/schema.js +16 -0
- package/api/features/CreateWebhook/schema.js.map +1 -0
- package/api/features/CreateWebhookDelivery/CreateWebhookDeliveryRepository.d.ts +20 -0
- package/api/features/CreateWebhookDelivery/CreateWebhookDeliveryRepository.js +60 -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 +34 -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/DeleteWebhook/schema.d.ts +4 -0
- package/api/features/DeleteWebhook/schema.js +7 -0
- package/api/features/DeleteWebhook/schema.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 +29 -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/GetWebhook/schema.d.ts +4 -0
- package/api/features/GetWebhook/schema.js +7 -0
- package/api/features/GetWebhook/schema.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 +29 -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/GetWebhookDelivery/schema.d.ts +4 -0
- package/api/features/GetWebhookDelivery/schema.js +7 -0
- package/api/features/GetWebhookDelivery/schema.js.map +1 -0
- package/api/features/GetWebhookSettings/GetWebhookSettingsRepository.d.ts +19 -0
- package/api/features/GetWebhookSettings/GetWebhookSettingsRepository.js +57 -0
- package/api/features/GetWebhookSettings/GetWebhookSettingsRepository.js.map +1 -0
- package/api/features/GetWebhookSettings/abstractions.d.ts +13 -0
- package/api/features/GetWebhookSettings/abstractions.js +5 -0
- package/api/features/GetWebhookSettings/abstractions.js.map +1 -0
- package/api/features/GetWebhookSettings/feature.d.ts +4 -0
- package/api/features/GetWebhookSettings/feature.js +11 -0
- package/api/features/GetWebhookSettings/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 +27 -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/ListWebhookDeliveries/schema.d.ts +7 -0
- package/api/features/ListWebhookDeliveries/schema.js +10 -0
- package/api/features/ListWebhookDeliveries/schema.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 +27 -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/ListWebhooks/schema.d.ts +7 -0
- package/api/features/ListWebhooks/schema.js +10 -0
- package/api/features/ListWebhooks/schema.js.map +1 -0
- package/api/features/ResendWebhookDelivery/ResendWebhookDeliveryUseCase.d.ts +22 -0
- package/api/features/ResendWebhookDelivery/ResendWebhookDeliveryUseCase.js +70 -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/ResendWebhookDelivery/schema.d.ts +4 -0
- package/api/features/ResendWebhookDelivery/schema.js +7 -0
- package/api/features/ResendWebhookDelivery/schema.js.map +1 -0
- package/api/features/SendWebhookTask/SendWebhookTask.d.ts +33 -0
- package/api/features/SendWebhookTask/SendWebhookTask.js +111 -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 +16 -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 +21 -0
- package/api/features/TriggerWebhook/TriggerWebhookUseCase.js +65 -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/TriggerWebhook/schema.d.ts +5 -0
- package/api/features/TriggerWebhook/schema.js +8 -0
- package/api/features/TriggerWebhook/schema.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 +42 -0
- package/api/features/UpdateWebhook/UpdateWebhookUseCase.js.map +1 -0
- package/api/features/UpdateWebhook/abstractions.d.ts +30 -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/UpdateWebhook/schema.d.ts +9 -0
- package/api/features/UpdateWebhook/schema.js +15 -0
- package/api/features/UpdateWebhook/schema.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/UpdateWebhookSettings/UpdateWebhookSettingsRepository.d.ts +21 -0
- package/api/features/UpdateWebhookSettings/UpdateWebhookSettingsRepository.js +62 -0
- package/api/features/UpdateWebhookSettings/UpdateWebhookSettingsRepository.js.map +1 -0
- package/api/features/UpdateWebhookSettings/UpdateWebhookSettingsUseCase.d.ts +14 -0
- package/api/features/UpdateWebhookSettings/UpdateWebhookSettingsUseCase.js +27 -0
- package/api/features/UpdateWebhookSettings/UpdateWebhookSettingsUseCase.js.map +1 -0
- package/api/features/UpdateWebhookSettings/abstractions.d.ts +27 -0
- package/api/features/UpdateWebhookSettings/abstractions.js +6 -0
- package/api/features/UpdateWebhookSettings/abstractions.js.map +1 -0
- package/api/features/UpdateWebhookSettings/feature.d.ts +4 -0
- package/api/features/UpdateWebhookSettings/feature.js +13 -0
- package/api/features/UpdateWebhookSettings/feature.js.map +1 -0
- package/api/features/UpdateWebhookSettings/schema.d.ts +5 -0
- package/api/features/UpdateWebhookSettings/schema.js +9 -0
- package/api/features/UpdateWebhookSettings/schema.js.map +1 -0
- package/api/features/WebhookDeliver/WebhookDeliver.d.ts +13 -0
- package/api/features/WebhookDeliver/WebhookDeliver.js +79 -0
- package/api/features/WebhookDeliver/WebhookDeliver.js.map +1 -0
- package/api/features/WebhookDeliver/abstractions.d.ts +24 -0
- package/api/features/WebhookDeliver/abstractions.js +5 -0
- package/api/features/WebhookDeliver/abstractions.js.map +1 -0
- package/api/features/WebhookDeliver/feature.d.ts +4 -0
- package/api/features/WebhookDeliver/feature.js +11 -0
- package/api/features/WebhookDeliver/feature.js.map +1 -0
- package/api/features/WebhookDeliver/index.d.ts +2 -0
- package/api/features/WebhookDeliver/index.js +2 -0
- package/api/features/WebhookDispatcher/WebhookDispatcher.d.ts +19 -0
- package/api/features/WebhookDispatcher/WebhookDispatcher.js +61 -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 +9 -0
- package/api/features/WebhookSignPayload/WebhookSignPayload.js +26 -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 +166 -0
- package/api/graphql/WebhookCrudSchema.js.map +1 -0
- package/api/graphql/WebhookDeliverySchema.d.ts +8 -0
- package/api/graphql/WebhookDeliverySchema.js +100 -0
- package/api/graphql/WebhookDeliverySchema.js.map +1 -0
- package/api/graphql/WebhookEventSchema.d.ts +8 -0
- package/api/graphql/WebhookEventSchema.js +45 -0
- package/api/graphql/WebhookEventSchema.js.map +1 -0
- package/api/graphql/WebhookSettingsSchema.d.ts +8 -0
- package/api/graphql/WebhookSettingsSchema.js +62 -0
- package/api/graphql/WebhookSettingsSchema.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/models/WebhookSettingsModel.d.ts +8 -0
- package/api/models/WebhookSettingsModel.js +28 -0
- package/api/models/WebhookSettingsModel.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/api/utils/isValidEndpointUrl.d.ts +1 -0
- package/api/utils/isValidEndpointUrl.js +13 -0
- package/api/utils/isValidEndpointUrl.js.map +1 -0
- package/exports/api/webhooks.d.ts +5 -0
- package/exports/api/webhooks.js +1 -0
- package/package.json +58 -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,68 @@
|
|
|
1
|
+
import react from "react";
|
|
2
|
+
import { AdminConfig, AdminLayout, useRouter } from "@webiny/app-admin";
|
|
3
|
+
import { ReactComponent } from "@webiny/icons/webhook.svg";
|
|
4
|
+
import { HasPermission } from "./presentation/security/HasPermission.js";
|
|
5
|
+
import { WebhookListView } from "./presentation/WebhookList/components/WebhookListView.js";
|
|
6
|
+
import { WebhookFormView } from "./presentation/WebhookForm/components/WebhookFormView.js";
|
|
7
|
+
import { WebhookSettingsView } from "./presentation/WebhookSettings/components/WebhookSettingsView.js";
|
|
8
|
+
import { WebhookDeliveriesPage } from "./presentation/WebhookDeliveriesPage/components/WebhookDeliveriesPage.js";
|
|
9
|
+
import { Routes } from "./routes.js";
|
|
10
|
+
const { Menu: Menu, Route: Route } = AdminConfig;
|
|
11
|
+
const WebhookRoutes = ()=>{
|
|
12
|
+
const { getLink } = useRouter();
|
|
13
|
+
return /*#__PURE__*/ react.createElement(AdminConfig, null, /*#__PURE__*/ react.createElement(HasPermission, {
|
|
14
|
+
entity: "webhook"
|
|
15
|
+
}, /*#__PURE__*/ react.createElement(Route, {
|
|
16
|
+
route: Routes.List,
|
|
17
|
+
element: /*#__PURE__*/ react.createElement(AdminLayout, {
|
|
18
|
+
title: "Webhooks"
|
|
19
|
+
}, /*#__PURE__*/ react.createElement(WebhookListView, null))
|
|
20
|
+
}), /*#__PURE__*/ react.createElement(Route, {
|
|
21
|
+
route: Routes.Deliveries,
|
|
22
|
+
element: /*#__PURE__*/ react.createElement(AdminLayout, {
|
|
23
|
+
title: "Delivery Log"
|
|
24
|
+
}, /*#__PURE__*/ react.createElement(WebhookDeliveriesPage, null))
|
|
25
|
+
}), /*#__PURE__*/ react.createElement(Route, {
|
|
26
|
+
route: Routes.Settings,
|
|
27
|
+
element: /*#__PURE__*/ react.createElement(AdminLayout, {
|
|
28
|
+
title: "Webhook Settings"
|
|
29
|
+
}, /*#__PURE__*/ react.createElement(WebhookSettingsView, null))
|
|
30
|
+
}), /*#__PURE__*/ react.createElement(Route, {
|
|
31
|
+
route: Routes.Form,
|
|
32
|
+
element: /*#__PURE__*/ react.createElement(AdminLayout, {
|
|
33
|
+
title: "Webhooks"
|
|
34
|
+
}, /*#__PURE__*/ react.createElement(WebhookFormView, null))
|
|
35
|
+
}), /*#__PURE__*/ react.createElement(Menu, {
|
|
36
|
+
name: "webhooks.list",
|
|
37
|
+
parent: "dev-tools",
|
|
38
|
+
element: /*#__PURE__*/ react.createElement(Menu.Link, {
|
|
39
|
+
text: "Webhooks",
|
|
40
|
+
to: getLink(Routes.List),
|
|
41
|
+
icon: /*#__PURE__*/ react.createElement(Menu.Link.Icon, {
|
|
42
|
+
label: "Webhooks",
|
|
43
|
+
element: /*#__PURE__*/ react.createElement(ReactComponent, null)
|
|
44
|
+
})
|
|
45
|
+
})
|
|
46
|
+
}), /*#__PURE__*/ react.createElement(Menu, {
|
|
47
|
+
name: "webhooks.deliveries",
|
|
48
|
+
parent: "dev-tools",
|
|
49
|
+
element: /*#__PURE__*/ react.createElement(Menu.Link, {
|
|
50
|
+
text: "Webhooks Delivery Log",
|
|
51
|
+
to: getLink(Routes.Deliveries),
|
|
52
|
+
icon: /*#__PURE__*/ react.createElement(Menu.Link.Icon, {
|
|
53
|
+
label: "Webhooks Delivery Log",
|
|
54
|
+
element: /*#__PURE__*/ react.createElement(ReactComponent, null)
|
|
55
|
+
})
|
|
56
|
+
})
|
|
57
|
+
}), /*#__PURE__*/ react.createElement(Menu, {
|
|
58
|
+
name: "webhooks.settings",
|
|
59
|
+
parent: "settings.system",
|
|
60
|
+
element: /*#__PURE__*/ react.createElement(Menu.Link, {
|
|
61
|
+
text: "Webhooks",
|
|
62
|
+
to: getLink(Routes.Settings)
|
|
63
|
+
})
|
|
64
|
+
})));
|
|
65
|
+
};
|
|
66
|
+
export { WebhookRoutes };
|
|
67
|
+
|
|
68
|
+
//# 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 { ReactComponent as WebhookIcon } from \"@webiny/icons/webhook.svg\";\nimport { ReactComponent as WebhookDeliveryIcon } from \"@webiny/icons/webhook.svg\";\nimport { HasPermission } from \"./presentation/security/HasPermission.js\";\nimport { WebhookListView } from \"./presentation/WebhookList/components/WebhookListView.js\";\nimport { WebhookFormView } from \"./presentation/WebhookForm/components/WebhookFormView.js\";\nimport { WebhookSettingsView } from \"./presentation/WebhookSettings/components/WebhookSettingsView.js\";\nimport { WebhookDeliveriesPage } from \"./presentation/WebhookDeliveriesPage/components/WebhookDeliveriesPage.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.Deliveries}\n element={\n <AdminLayout title=\"Delivery Log\">\n <WebhookDeliveriesPage />\n </AdminLayout>\n }\n />\n <Route\n route={Routes.Settings}\n element={\n <AdminLayout title=\"Webhook Settings\">\n <WebhookSettingsView />\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.list\"\n parent={\"dev-tools\"}\n element={\n <Menu.Link\n text=\"Webhooks\"\n to={getLink(Routes.List)}\n icon={<Menu.Link.Icon label=\"Webhooks\" element={<WebhookIcon />} />}\n />\n }\n />\n <Menu\n name=\"webhooks.deliveries\"\n parent=\"dev-tools\"\n element={\n <Menu.Link\n text=\"Webhooks Delivery Log\"\n to={getLink(Routes.Deliveries)}\n icon={\n <Menu.Link.Icon\n label=\"Webhooks Delivery Log\"\n element={<WebhookDeliveryIcon />}\n />\n }\n />\n }\n />\n <Menu\n name=\"webhooks.settings\"\n parent=\"settings.system\"\n element={<Menu.Link text=\"Webhooks\" to={getLink(Routes.Settings)} />}\n />\n </HasPermission>\n </AdminConfig>\n );\n};\n"],"names":["Menu","Route","AdminConfig","WebhookRoutes","getLink","useRouter","HasPermission","Routes","AdminLayout","WebhookListView","WebhookDeliveriesPage","WebhookSettingsView","WebhookFormView","WebhookIcon","WebhookDeliveryIcon"],"mappings":";;;;;;;;;AAaA,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,UAAU;QACxB,uBACI,oBAACC,aAAWA;YAAC,OAAM;yBACf,oBAACE,uBAAqBA;sBAIlC,oBAACT,OAAKA;QACF,OAAOM,OAAO,QAAQ;QACtB,uBACI,oBAACC,aAAWA;YAAC,OAAM;yBACf,oBAACG,qBAAmBA;sBAIhC,oBAACV,OAAKA;QACF,OAAOM,OAAO,IAAI;QAClB,uBACI,oBAACC,aAAWA;YAAC,OAAM;yBACf,oBAACI,iBAAeA;sBAI5B,oBAACZ,MAAIA;QACD,MAAK;QACL,QAAQ;QACR,uBACI,oBAACA,KAAK,IAAI;YACN,MAAK;YACL,IAAII,QAAQG,OAAO,IAAI;YACvB,oBAAM,oBAACP,KAAK,IAAI,CAAC,IAAI;gBAAC,OAAM;gBAAW,uBAAS,oBAACa,gBAAWA;;;sBAIxE,oBAACb,MAAIA;QACD,MAAK;QACL,QAAO;QACP,uBACI,oBAACA,KAAK,IAAI;YACN,MAAK;YACL,IAAII,QAAQG,OAAO,UAAU;YAC7B,oBACI,oBAACP,KAAK,IAAI,CAAC,IAAI;gBACX,OAAM;gBACN,uBAAS,oBAACc,gBAAmBA;;;sBAMjD,oBAACd,MAAIA;QACD,MAAK;QACL,QAAO;QACP,uBAAS,oBAACA,KAAK,IAAI;YAAC,MAAK;YAAW,IAAII,QAAQG,OAAO,QAAQ;;;AAKnF"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import react from "react";
|
|
2
|
+
import { AdminConfig, RegisterFeature } from "@webiny/app-admin";
|
|
3
|
+
import { ReactComponent } from "@webiny/icons/webhook.svg";
|
|
4
|
+
import { ListWebhooksFeature } from "./features/ListWebhooks/index.js";
|
|
5
|
+
import { GetWebhookFeature } from "./features/getWebhook/index.js";
|
|
6
|
+
import { CreateWebhookFeature } from "./features/createWebhook/index.js";
|
|
7
|
+
import { UpdateWebhookFeature } from "./features/updateWebhook/index.js";
|
|
8
|
+
import { DeleteWebhookFeature } from "./features/deleteWebhook/index.js";
|
|
9
|
+
import { ListWebhookDeliveriesFeature } from "./features/listWebhookDeliveries/index.js";
|
|
10
|
+
import { TriggerWebhookFeature } from "./features/triggerWebhook/index.js";
|
|
11
|
+
import { ResendWebhookDeliveryFeature } from "./features/resendWebhookDelivery/index.js";
|
|
12
|
+
import { ListAvailableEventsFeature } from "./features/listAvailableEvents/index.js";
|
|
13
|
+
import { GetWebhookSettingsFeature } from "./features/getWebhookSettings/index.js";
|
|
14
|
+
import { UpdateWebhookSettingsFeature } from "./features/updateWebhookSettings/index.js";
|
|
15
|
+
import { WebhookPermissionsFeature } from "./features/permissions/index.js";
|
|
16
|
+
import { WebhookListPresenterFeature } from "./presentation/WebhookList/index.js";
|
|
17
|
+
import { WebhookFormPresenterFeature } from "./presentation/WebhookForm/index.js";
|
|
18
|
+
import { WebhookDeliveriesPresenterFeature } from "./presentation/WebhookDeliveries/index.js";
|
|
19
|
+
import { WebhookSettingsPresenterFeature } from "./presentation/WebhookSettings/index.js";
|
|
20
|
+
import { WebhookRoutes } from "./WebhookRoutes.js";
|
|
21
|
+
import { WEBHOOK_PERMISSIONS_SCHEMA } from "./permissions.js";
|
|
22
|
+
const { Security: Security } = AdminConfig;
|
|
23
|
+
const Webhooks = ()=>/*#__PURE__*/ react.createElement(react.Fragment, null, /*#__PURE__*/ react.createElement(RegisterFeature, {
|
|
24
|
+
feature: ListWebhooksFeature
|
|
25
|
+
}), /*#__PURE__*/ react.createElement(RegisterFeature, {
|
|
26
|
+
feature: GetWebhookFeature
|
|
27
|
+
}), /*#__PURE__*/ react.createElement(RegisterFeature, {
|
|
28
|
+
feature: CreateWebhookFeature
|
|
29
|
+
}), /*#__PURE__*/ react.createElement(RegisterFeature, {
|
|
30
|
+
feature: UpdateWebhookFeature
|
|
31
|
+
}), /*#__PURE__*/ react.createElement(RegisterFeature, {
|
|
32
|
+
feature: DeleteWebhookFeature
|
|
33
|
+
}), /*#__PURE__*/ react.createElement(RegisterFeature, {
|
|
34
|
+
feature: ListWebhookDeliveriesFeature
|
|
35
|
+
}), /*#__PURE__*/ react.createElement(RegisterFeature, {
|
|
36
|
+
feature: TriggerWebhookFeature
|
|
37
|
+
}), /*#__PURE__*/ react.createElement(RegisterFeature, {
|
|
38
|
+
feature: ResendWebhookDeliveryFeature
|
|
39
|
+
}), /*#__PURE__*/ react.createElement(RegisterFeature, {
|
|
40
|
+
feature: ListAvailableEventsFeature
|
|
41
|
+
}), /*#__PURE__*/ react.createElement(RegisterFeature, {
|
|
42
|
+
feature: GetWebhookSettingsFeature
|
|
43
|
+
}), /*#__PURE__*/ react.createElement(RegisterFeature, {
|
|
44
|
+
feature: UpdateWebhookSettingsFeature
|
|
45
|
+
}), /*#__PURE__*/ react.createElement(RegisterFeature, {
|
|
46
|
+
feature: WebhookPermissionsFeature
|
|
47
|
+
}), /*#__PURE__*/ react.createElement(RegisterFeature, {
|
|
48
|
+
feature: WebhookListPresenterFeature
|
|
49
|
+
}), /*#__PURE__*/ react.createElement(RegisterFeature, {
|
|
50
|
+
feature: WebhookFormPresenterFeature
|
|
51
|
+
}), /*#__PURE__*/ react.createElement(RegisterFeature, {
|
|
52
|
+
feature: WebhookDeliveriesPresenterFeature
|
|
53
|
+
}), /*#__PURE__*/ react.createElement(RegisterFeature, {
|
|
54
|
+
feature: WebhookSettingsPresenterFeature
|
|
55
|
+
}), /*#__PURE__*/ react.createElement(WebhookRoutes, null), /*#__PURE__*/ react.createElement(AdminConfig, null, /*#__PURE__*/ react.createElement(Security.Permissions, {
|
|
56
|
+
name: "webhooks",
|
|
57
|
+
title: "Webhooks",
|
|
58
|
+
description: "Manage webhook permissions.",
|
|
59
|
+
icon: /*#__PURE__*/ react.createElement(ReactComponent, null),
|
|
60
|
+
schema: WEBHOOK_PERMISSIONS_SCHEMA
|
|
61
|
+
})));
|
|
62
|
+
export { Webhooks };
|
|
63
|
+
|
|
64
|
+
//# 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 { ReactComponent as WebhookIcon } from \"@webiny/icons/webhook.svg\";\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 { GetWebhookSettingsFeature } from \"./features/getWebhookSettings/index.js\";\nimport { UpdateWebhookSettingsFeature } from \"./features/updateWebhookSettings/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 { WebhookSettingsPresenterFeature } from \"./presentation/WebhookSettings/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={GetWebhookSettingsFeature} />\n <RegisterFeature feature={UpdateWebhookSettingsFeature} />\n <RegisterFeature feature={WebhookPermissionsFeature} />\n {/* Presentation features. */}\n <RegisterFeature feature={WebhookListPresenterFeature} />\n <RegisterFeature feature={WebhookFormPresenterFeature} />\n <RegisterFeature feature={WebhookDeliveriesPresenterFeature} />\n <RegisterFeature feature={WebhookSettingsPresenterFeature} />\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 icon={<WebhookIcon />}\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","GetWebhookSettingsFeature","UpdateWebhookSettingsFeature","WebhookPermissionsFeature","WebhookListPresenterFeature","WebhookFormPresenterFeature","WebhookDeliveriesPresenterFeature","WebhookSettingsPresenterFeature","WebhookRoutes","WebhookIcon","WEBHOOK_PERMISSIONS_SCHEMA"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAuBA,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;sBAC1B,oBAACV,iBAAeA;QAAC,SAASW;sBAC1B,oBAACX,iBAAeA;QAAC,SAASY;sBAE1B,oBAACZ,iBAAeA;QAAC,SAASa;sBAC1B,oBAACb,iBAAeA;QAAC,SAASc;sBAC1B,oBAACd,iBAAeA;QAAC,SAASe;sBAC1B,oBAACf,iBAAeA;QAAC,SAASgB;sBAE1B,oBAACC,eAAaA,OAAAA,WAAAA,GAEd,oBAACnB,aAAWA,MAAAA,WAAAA,GACR,oBAACD,SAAS,WAAW;QACjB,MAAK;QACL,OAAM;QACN,aAAY;QACZ,oBAAM,oBAACqB,gBAAWA;QAClB,QAAQC"}
|
|
@@ -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"}
|