()
| 10 | ) {} |
| 11 | |
| 12 | getWebhooks() { |
| 13 | const webhooks = this.discoveryService.getProviders({ |
| 14 | metadataKey: Webhook.KEY, |
| 15 | }); |
| 16 | return webhooks.map(wrapper => { |
| 17 | const { name } = this.discoveryService.getMetadataByDecorator( |
| 18 | Webhook, |
| 19 | wrapper, |
| 20 | )!; |
| 21 | return { |
| 22 | name, |
| 23 | handlers: this.metadataScanner |
| 24 | .getAllMethodNames(wrapper.metatype!.prototype) |
| 25 | .map(methodName => { |
| 26 | const { event } = this.discoveryService.getMetadataByDecorator( |
| 27 | WebhookHandler, |
| 28 | wrapper, |
| 29 | methodName, |
| 30 | )!; |
| 31 | return { |
| 32 | methodName, |
| 33 | event, |
| 34 | }; |
| 35 | }), |
| 36 | }; |
| 37 | }); |
| 38 | } |
| 39 | } |
no test coverage detected