(auth: AuthContext | null, deliveryId: string)
| 265 | } |
| 266 | |
| 267 | async getDelivery(auth: AuthContext | null, deliveryId: string): Promise<WebhookDelivery> { |
| 268 | const delivery = await this.deliveryRepository.findById(deliveryId); |
| 269 | if (!delivery) { |
| 270 | throw new NotFoundException(`Delivery ${deliveryId} not found`); |
| 271 | } |
| 272 | |
| 273 | // Verify access to the webhook |
| 274 | const webhook = await this.repository.findById(delivery.webhookId, { |
| 275 | organizationId: auth?.organizationId, |
| 276 | }); |
| 277 | if (!webhook) { |
| 278 | throw new NotFoundException(`Parent webhook not found`); |
| 279 | } |
| 280 | |
| 281 | return this.mapDeliveryRecord(delivery); |
| 282 | } |
| 283 | |
| 284 | // Public inbound webhook receiver (no auth) |
| 285 |
no test coverage detected