NotificationRelayOptions — @gj-kit/nest-notifications
A public interface from @gj-kit/nest-notifications/core. The signature below is taken directly from the 0.1.1 release declaration.
Verified import example
Section titled “Verified import example”import { NotificationRelayOptions } from '@gj-kit/nest-notifications/core';Signature, parameters, and return type
Section titled “Signature, parameters, and return type”/** * 릴레이 — ingress outbox 행을 배달로 물질화한다(설계 §3.6). * * 소스 로직을 유지하되 저장소 호출만 포트로 바꾼다. 소스와 달라지는 지점은 세 개이고 * 전부 결함 수정이다: 시각을 행마다 다시 읽고(§0.2-⑦), stale 임계를 기간으로만 넘기며 * (R12), `createDelivery`의 `created: false`를 병합/follow-up으로 되돌린다(R11 · §0.3-⑦). */interface NotificationRelayOptions { readonly applicationKey: string; readonly store: NotificationRelayStore; readonly policy: NotificationSchedulingPolicy; readonly runtime?: NotificationRuntime | undefined; readonly logger?: NotificationLogger | undefined; /** Defaults to {@link DEFAULT_RELAY_PAGE_SIZE}. */ readonly pageSize?: number | undefined; /** * Passed to the store as a duration; the store compares it against its own * clock (R12). Defaults to {@link DEFAULT_CLAIM_STALE_MS}. */ readonly claimStaleMs?: number | undefined; /** * Rows already attempted this many times are left out of the due page (R13). * Absent means no bound - a permanently failing row is then re-claimed every * pass and, at `pageSize` such rows, starves healthy notifications (design * 7-16). The library owns no backoff policy (design 0.4-7); this is the only * lever it offers, and choosing a value is an operational decision. * * **Both settings lose something, so read this before picking one.** * * - `attempts` counts *claims*, not elapsed time: there is no cooldown between * a `releaseClaim` and the next claim, so the retry window this buys is * `maxAttempts ÷ pass frequency`, not a duration. Every pass counts - a * periodic runner's and a `NotificationPipelineWakeup` pass alike - so with * the wakeup hint enabled a staging burst can spend the whole budget of an * unrelated failing row in seconds. * - An exhausted row leaves the due page **permanently**, and nothing in this * package reports it: neither summary type counts it, and the store is asked * for a filtered page rather than for what it filtered out. Watching for * exhausted rows is a host query (design 6-15), and a host that does not run * one converts a transport outage longer than the budget into silent loss. */ readonly maxAttempts?: number | undefined;}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/nest-notifications - Version:
0.1.1 - Public entry:
./core - Source: GitHub