AbsoluteJS

@absolutejs/dispatch-apns

@absolutejs/dispatch-apnsv0.2.0betaMessaging

Apple Push Notification service HTTP/2 PushAdapter for @absolutejs/dispatch with ES256 provider-token rotation.

#Installation

BASH
bun add @absolutejs/dispatch-apns

#Capabilities

Overview

Apple Push Notification service HTTP/2 PushAdapter for @absolutejs/dispatch. It signs ES256 provider JWTs, reuses them for fifty minutes, maintains pooled HTTP/2 sessions, and never exposes the .p8 key to dispatch messages or audit metadata.

Call apns.dispose() during shutdown to drain its HTTP/2 sessions. Use environment: 'sandbox' only for development registrations. Alert, background, badge, sound, category, collapse, expiration, and mutable-content controls are available through message metadata.

Outcomes

What you can build

Build on the supported package contract

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

Hardening checklist

Production guidance

Make every external boundary explicitPin the deployed @absolutejs/dispatch-apns 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-apns 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-apns quick start

Partial snippet

# @absolutejs/dispatch-apns

TS
import { createDispatcher } from "@absolutejs/dispatch";
import { createApnsAdapter } from "@absolutejs/dispatch-apns";

const apns = createApnsAdapter({
  bundleId: process.env.APNS_BUNDLE_ID!,
  keyId: process.env.APNS_KEY_ID!,
  privateKey: process.env.APNS_PRIVATE_KEY!,
  teamId: process.env.APNS_TEAM_ID!,
});

const dispatcher = createDispatcher({ push: apns });

#Public entry points

Supported entry points declared by this package manifest.

Package entry point declared in package.json.

@absolutejs/dispatch-apns@absolutejs/dispatch-apns/manifest@absolutejs/dispatch-apns/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 @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.

9 symbols
ApnsTransportRequesttypePermalinkSource
TS
type ApnsTransportRequest = {
    headers: Record<string, string>;
    origin: string;
    path: string;
    payload: string;
};
Exported from @absolutejs/dispatch-apns