Skip to content

NotificationStoreSuite — @gj-kit/nest-notifications

A public interface from @gj-kit/nest-notifications/testing. The signature below is taken directly from the 0.1.1 release declaration.

import { NotificationStoreSuite } from '@gj-kit/nest-notifications/testing';
/**
* What the contract cases drive. A host implements it by wiring its own three
* stores plus thin adapters over its publisher and account lifecycle, so the
* obligations that live outside `NotificationRelayStore` — I1-I3 (ingress) and
* L1-L4 (lifecycle) — are checkable against a real implementation rather than
* only against ours.
*/
interface NotificationStoreSuite {
readonly relayStore: NotificationRelayStore;
readonly deliveryStore: NotificationDeliveryStore;
readonly endpointStore: NotificationEndpointStore;
/** Runs the host's publisher inside its own transaction. Checks I1-I3, and so G1. */
stage(command: NotificationCommand): Promise<NotificationStageResult>;
/** Runs the host's account lifecycle for one recipient. Checks L1-L4, and so G7. */
tombstoneRecipient(input: {
readonly applicationKey: string;
readonly recipientRef: string;
}): Promise<void>;
/** Registers or refreshes an endpoint and returns what `listEnabled` would observe. */
registerEndpoint(input: {
readonly applicationKey: string;
readonly recipientRef: string;
readonly provider: string;
readonly address: string;
}): Promise<ObservedNotificationEndpoint>;
setCategoryEnabled(input: {
readonly applicationKey: string;
readonly recipientRef: string;
readonly category: string;
readonly enabled: boolean;
}): 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.

  • Package: @gj-kit/nest-notifications
  • Version: 0.1.1
  • Public entry: ./testing
  • Source: GitHub