AbsoluteJS

@absolutejs/dispatch-push-postgres

@absolutejs/dispatch-push-postgresv0.1.0betaMessaging

Durable PostgreSQL device registry and fenced fanout claims for @absolutejs/dispatch push lifecycle.

#Installation

BASH
bun add @absolutejs/dispatch-push-postgres

#Capabilities

Overview

Production persistence for the provider-neutral push lifecycle in @absolutejs/dispatch.

It stores tenant-isolated device registrations, user/device/topic targeting state, invalid-token retirement, and fenced idempotent fanout claims. Apply both exported schemas, then compose the stores with createPushLifecycle.

Registration is atomic across a stable (tenant, platform, deviceId) identity and the provider token. Token rotation retains the subscription identity and removes any superseded token record inside the same fenced transaction.

Outcomes

What you can build

Build on the supported package contract

Use @absolutejs/dispatch-push-postgres through its supported public entry points.

Hardening checklist

Production guidance

Make every external boundary explicitPin the deployed @absolutejs/dispatch-push-postgres version, replace example or memory-backed dependencies with durable implementations, bound external calls, protect credentials, and emit enough evidence to retry or recover safely.

Follow in order

Troubleshooting path

1
Trace from the first failed boundary
Reproduce the smallest canonical @absolutejs/dispatch-push-postgres example, confirm the supported entry point and version in the API explorer, then inspect the first boundary that did not produce its documented result.

#@absolutejs/dispatch-push-postgres quick start

Partial snippet

# @absolutejs/dispatch-push-postgres

TS
import { createPushLifecycle } from "@absolutejs/dispatch";
import {
  createPostgresPushSubscriptionStore,
  createPostgresPushFanoutClaimStore,
} from "@absolutejs/dispatch-push-postgres";
import {
  createPostgresIdempotentOperationStore,
  createPostgresTransactionRunner,
} from "@absolutejs/reliability";

const runner = createPostgresTransactionRunner(pool);
const lifecycle = createPushLifecycle({
  adapterFor: ({ platform, tenant }) => resolveTenantAdapter(tenant, platform),
  claimStore: createPostgresPushFanoutClaimStore(
    createPostgresIdempotentOperationStore(runner),
  ),
  store: createPostgresPushSubscriptionStore(runner),
});

#Public entry points

Supported entry points declared by this package manifest.

Package entry point declared in package.json.

@absolutejs/dispatch-push-postgres@absolutejs/dispatch-push-postgres/manifest@absolutejs/dispatch-push-postgres/manifest.json

#Package commands

Scripts declared by this package manifest.

bun run buildrm -rf dist && bun build src/index.ts src/manifest.ts --outdir dist --sourcemap --target=bun --external @absolutejs/dispatch --external '@absolutejs/dispatch/*' --external @absolutejs/manifest --external @absolutejs/reliability --external @sinclair/typebox && tsc --project tsconfig.build.json && absolute-manifest emit
bun run check:packagebun run format && bun run typecheck && bun run test && bun run verify-package && bun run build && bun run verify-package --artifacts
bun run formatprettier --write "./**/*.{ts,json,md}"
bun run testbun test
bun run typechecktsc --noEmit

#API reference

Search the declarations exported by the current package type files. Expand a symbol to inspect its source-backed signature.

4 symbols
IDEMPOTENT_OPERATION_POSTGRES_SCHEMAexportPermalinkSource
TS
IDEMPOTENT_OPERATION_POSTGRES_SCHEMA
Exported from @absolutejs/dispatch-push-postgres