WebhookInboxStore — @gj-kit/toss-payments-postgresql
A public interface from @gj-kit/toss-payments-postgresql. The signature below is taken directly from the 0.5.1 release declaration.
Verified import example
Section titled “Verified import example”import { WebhookInboxStore } from '@gj-kit/toss-payments-postgresql';Signature, parameters, and return type
Section titled “Signature, parameters, and return type”/** * 웹훅 inbox — 이벤트 원문 보존 (설계 §3.7). * * 코어 `WebhookDedupeStore.claim`에는 이벤트 메타가 전달되지 않으므로, inbox는 스토어 * seam이 아니라 **`WebhookHandlers`를 감싸는 헬퍼**다(코어 계약 무변경). 불변식: * - 사업 이벤트 1건 = 1행(dedupe_key PK). 재전송은 deliveries 증가로 관측된다. * - record는 핸들러 **앞**에서 실행한다 — 핸들러가 실패해도 수신 사실은 남는다 * (감사·재처리 목적). * - record 실패 기본 동작은 **삼키고 onRecordError 통지**다(AuditSink 선례 — 관측 * 계층이 웹훅 가용성을 볼모로 잡지 않는다). `failOnRecordError: true`면 throw → * 어댑터 500 → 토스 재전송(inbox를 내구 계약으로 쓰는 소비자용). * - 저장 전 이벤트의 모든 깊이 credential/secret/billingKey/authKey/token/password/card/ * account 계열 키를 마스킹한다 — provider payload는 새 필드와 중첩 raw를 포함할 수 * 있고 이 테이블은 cleanup() 대상이 아니라 무기한 보존된다. 핸들러에는 원본을 * 그대로 주되 저장본만 별도 객체로 마스킹한다. *//** 수동 기록 표면 — `withWebhookInbox`가 내부에서 쓰는 것과 동일한 단일 메서드. */interface WebhookInboxStore { record(webhook: AcceptedWebhook): Promise<void>;}This declaration is the source of truth for parameters, optionality, generics, return values, and public union/type contracts. Check the package golden path and this subpath’s import conditions for required environment, permission, and error boundaries before calling it.
Release context
Section titled “Release context”- Package:
@gj-kit/toss-payments-postgresql - Version:
0.5.1 - Public entry:
. - Source: GitHub