apps/gateway/src/services/webhook-repository.ts
Metadata
- Purpose: Gateway service module implementing business logic or integrations.
- Domain:
applications - Language:
ts - Bytes: 376
- Lines: 13
- Content hash (short):
e3041a58 - Source (start): apps/gateway/src/services/webhook-repository.ts:1
- Source (end): apps/gateway/src/services/webhook-repository.ts:13
Indexed Symbols
recordWebhookReceipt(line 3, function) - Implements record webhook receipt for service-layer operations.
Markdown Headings (if applicable)
No markdown headings detected.
Source Preview
import { query } from "./postgres.js";
export async function recordWebhookReceipt(provider: string, deliveryId: string): Promise<boolean> {
const result = await query(
`insert into webhook_receipts (provider, delivery_id)
values ($1, $2)
on conflict (provider, delivery_id) do nothing`,
[provider, deliveryId]
);
return (result.rowCount ?? 0) > 0;
}