Upgrading to 0.43.0
Upgrade from the complete 0.42.0 package set using the upgrade procedure.
This development-preview minor set adds native fulfillment APIs and seven SQL
forwards, payment provider profiles and release-artifact qualification tooling.
Core's shared fulfillment status-map JSON drops provider trace columns while
preserving neutral status/customer-step results; Outbox republishes unchanged
runtime, exports and SQL. Pin every selected @openlup/* package to 0.43.0
together. Package installation and imports apply no SQL and activate no provider.
Apply the native schema migrations
Apply the complete selected catalogue, including every predecessor and these ordered forwards, before composing the updated ports:
| Registry slot | Migration | Purpose |
|---|---|---|
| 135 | 20261119200000_communication_event_prepare_erasure.sql |
Prepare the receipts relation lock before privacy subject locks. |
| 136 | 20261120100000_fulfillment_intake_channel.sql |
Record the selected push/poll dispatch acknowledgement channel. |
| 137 | 20261120110000_fulfillment_dispatch_outcomes.sql |
Native creation, operator attempts, dispatch admission and durable diagnostics. |
| 138 | 20261120120000_fulfillment_provider_intake.sql |
Durable provider observations, ingress correlation and reconciliation. |
| 139 | 20261120130000_fulfillment_alignment_arrival_chronology.sql |
Replacement preparation and arrival chronology for customer alignment. |
| 140 | 20261121090000_payment_provider_profiles.sql |
Replace ten effective payment-policy functions with declarative profile selection. |
| 141 | 20261121100000_order_delivery_contact_correction.sql |
Resolve, correct, capture, export and erase native delivery contacts. |
Follow Upgrade the database. Retain the installation
selection that owns your history, construct createPlatformPostgresMigrationRunner
from @openlup/platform/migrations, inspect status(), review
apply({ dryRun: true }), explicitly call apply(), then confirm there are no
pending paths. The runner applies only the pending suffix of an exact matching
prefix. Preserve every applied SQL byte and ledger identity. Module descriptors
are sparse projections, not standalone installation chains. An application with
its own chain must prepare compatible forwards against its actual schema and
history rather than overlaying an unrelated baseline.
Compose fulfillment in the application
Use the neutral contracts at @openlup/platform/fulfillment/contracts, services
at @openlup/platform/fulfillment and native factories at
@openlup/platform/fulfillment/native. Follow the
installed-store composition:
select an adapter and capabilities, supply a capability-local transaction lane,
authorization, service selection and schema metadata, and explicitly enable the
native binding. Select nativeDispatch: { portKey, providerRef } or retain your
own authoritative reader and candidate listing. Supply the adapter's pure
shadowCommandFingerprint; declarations and constructors mount no routes,
workers or schedules.
Create the local paid-order obligation before dispatch. Compose authenticated intake and leased reconciliation with recorded dispatch commitments, exact parcel reservations, the adapter's outbound order-identity mapping and the job ledger. Retain original provider occurrence bytes and first receipt separately. Provider identity resolves first; conflicting fallback associations refuse. Recorded attempts preserve exact replay; uncertain acceptance needs verified readback or authorized recovery before any later execution.
Bind the authorized label, handoff, tracking and contact-correction handlers.
Contact correction requires both the PostgreSQL digest and revision, the native
response schemas and the updated privacy contributor. Bind
createPostgresCustomerAlignmentRowsReader to readFulfillmentDelay, authorize
customer IDs and supply current schedules. Replacement dispatch uses its own
parcel identity and adapter-owned numbering. Only actual customer arrival can
settle alignment; a superseded predecessor is no longer outstanding, while an
undelivered replacement remains outstanding. The monotonic clamp extends a late
cycle once, never moves it earlier and never stacks deliveries.
Use @openlup/platform/fulfillment/testing for offline adapter certification.
Existing one-argument calls retain baseline mode. Full mode needs independent
expectations, typed success/failure and refusal witnesses against the captured
immutable adapter and real scripted transport log. The detailed migration notes
below describe the fixture changes. The installed-package PostgreSQL proof uses
a scripted provider; it supplies no live carrier qualification.
Declare native payment provider profiles
The profile forward replaces exactly ten effective policy functions and retains their privileges, including the sealed interactive body. Historical migrations, stored provider identities, evidence and receipts stay unchanged. Both reference profiles preserve their existing validation order, refusal, claims, refund and replay rules. Arbitrary admitted providers retain generic fallback behavior; claims and reopening are opt-in. A third provider needs an explicit profile declaration plus its protocol adapter; a new protocol or money/retry semantic still needs its own implementation. There is no mutable policy registry or per-command profile JSON. Optional host-selected execution flow labels are additive; omission preserves the existing composition.
The portable composition covers the reference card provider only. See provider composition and the migration notes below before changing an existing binding.
Qualification changes visible to an adopter
Release tooling can extract an exact published package set with verified tag, manifest and lock identities, then install it independently with exact package integrities and provenance for every package. The qualification receipt and package-set bill of materials bind those artifacts. Separate checks exercise an interrupted adjacent-set application-file upgrade and released-pair schema compatibility, preserving owned application files and the subscription clamp. The schema check uses the selected qualified PostgreSQL 16 profile; it supplies no general database rollback or hosted-service guarantee.
When explicitly published, a qualified starter image is bound to that exact artifact set, application extraction, dependency inventories and verified image provenance; its canary exercises the actual archive before publication. These are bounded artifact and sandbox-journey checks, not live payment or carrier qualification, a complete store outcome or a stable support promise. This preparation itself claims no executed qualification for 0.43.0. See verify published packages and distribution evidence.
Known limits
Provider and carrier proof is limited to fake clients, scripted adapters and offline fixtures; no live provider or carrier qualification is claimed. The starter still selects sandbox payments. The native payment rail supports the two reference providers through declarative profiles; a third provider needs a declaration plus its adapter. The supplied portable payment composition covers the reference card provider only; the second reference provider has no supplied portable composition. The included warehouse adapter is a reference example. Imports, declarations, package installation and offline certification activate no integration.
Fulfillment retains local reservations and local finished-picking consumption; provider-held reservations, provider-managed consumption, independent splits, standalone pickup-point/locker execution, native label create/void and provider-side cancellation remain unsupported. Labels are PDF only; reference-adapter label reads remain host-owned. Courier pickup has no provider-reaching port and declared support cannot earn full certification. Snapshot-only stock has no movements. Saved preferences require carrier/service strings even when native provider-selected parcels allow nulls. Native overview data requires a host reader.
Historical contacts, reservations, modes, acceptance proofs and arrival facts are not backfilled. Failed or uncertain dispatch and a lost replacement acknowledgement never authorize blind resubmission. Fulfilled parents need an authorized host workflow for replacement dispatch. Replacement creation/dispatch never confirm arrival: record actual delivery; an undelivered replacement remains outstanding. Delivered observations without admitted tracking references retain status evidence but cannot record arrival or alignment. The monotonic clamp never moves a cycle earlier or stacks deliveries.
Intake uses sequential page numbers, not opaque cursors; polling-only providers refuse webhook intake. Empty collections prove no absence. Human holds, terminal provider exceptions and evidence without usable chronology require manual handling. Native reads refuse missing destination/line snapshots. Replaying incomplete webhook transport metadata may replace polling-enriched nullable reference fields. Resolve missing or conflicting historical associations and evidence through authorized recovery; no inferred parcel, chronology or stock is supplied.
Offline certification checks honestly built fixtures and contract results; deliberate accessor, proxy or overridden-intrinsic manipulation to defeat the caller's own certification is outside its threat model. It is not an attestation of durable host behavior. Absence auto-reopen stays off by default and later dispatch requires explicit due-reopen consumption. Refund creation remains separate; refund evidence does not pause or cancel subscription service. Experimental services remain inert until explicitly composed.
Read the fulfillment execution limits and payment composition boundaries for the named refusals and authorized manual paths.
Package migration notes
@openlup/core
- Keep the shared fulfillment status facade and generated JSON neutral; provider dictionaries own translation. Canonical
packedremains preferred and every historical display alias keeps its customer-step result.
Migration: shared status-map JSON no longer carries adapter trace columns. Consumers needing provider translation use adapter-owned dictionaries. Existing status tokens, ranks, effects and customer steps are unchanged.
@openlup/platform
- Fix concurrent ecommerce-event projection and personal-data erasure by taking the receipts relation lock before subject row locks through a restricted preparation function. Recipient erasure, export, retained source facts and replay fences keep their existing behavior.
Migration: install the complete selected native chain through 20261119200000_communication_event_prepare_erasure.sql before using the updated privacy contributor.
- Add optional neutral fulfillment capability declarations, readiness refusals and native execution probes. Existing adapter operation flags and outputs remain unchanged; no unsupported native lifecycle operation becomes implemented.
- Add selected-intake dispatch ACK composition, snapshot-only stock synchronization and compatible receipt/observation aliases.
Migration: install the complete selected SQL catalogue through 20261120100000_fulfillment_intake_channel.sql before using the updated native dispatch store. Polling hosts pass the selected intake declaration to native ACK composition; omitted intake remains push and existing accepted receipts retain their channel.
Migration: omitted descriptor fields preserve existing behavior. Provider-owned reservations and provider-managed consumption now have explicit readiness refusals. Explicit stockMovements: false selects snapshots with a separate movement refusal and preserves the movement watermark; absent retains movement reads. Pass the declaration to the stock worker.
Migration: transportSelection: "provider" admits nullable native parcel carrier/service; saved customer preferences still require strings. PDF remains the sole supported label document format. Independent split, standalone pickup/locker, native label create/void and remote cancel requests remain named limits.
Migration: optional receiptKey must equal required legacy labelKey byte-for-byte. Neutral observation status aliases code/detailCode coexist with required legacy primary/subStatus; neutral shipment event kinds coexist with legacy order event kinds. Preserve event keys, occurrence identity and historical acceptance JSON; no backfill or receipt rewrite is supplied.
- Add native order delivery-contact resolution, latest-shipment contact comparison and fenced operator correction with exact retained replay, creation capture, privacy export/erasure and finite native transfer. Operator creation validates the resolved contact, with pre-parcel correction taking precedence over the original destination.
- Add source-specific delivery selection with injected normalized options and canonical point evidence. Provider-selected checkout/preferences remain constrained by their existing contracts.
Migration: install the complete selected catalogue through 20261121100000_order_delivery_contact_correction.sql. Native response schemas accept older inputs without deliveryContact and normalize its absence to null. Select the native response schemas and authorize the OMS correction handler. Submit both the PostgreSQL digest and revision; register the updated parcel-contact privacy contributor for private order contacts and retained correction responses. Historical baselines stay null; no backfill or provider activation is performed.
- Compose replacement preparation and dispatch under the new parcel identity, retaining optional frozen line lot/expiry fields and adapter-owned sequence numbering.
- Bind retained and in-flight dispatch replay to parcel sequence and optional line lot/expiry, preserving omitted versus explicit-null metadata selection.
- Add the explicit native customer alignment row reader for the existing current-schedule mapper. Reduced list/detail retain their existing projection; overview requires host data.
- Process changed non-null arrival timestamps while preserving subscription-first locking, all-unsuperseded-arrivals admission and the monotonic once-only schedule clamp. No automatic replacement confirmation is added.
Migration: install the complete selected SQL catalogue through 20261120130000_fulfillment_alignment_arrival_chronology.sql. Bind createPostgresCustomerAlignmentRowsReader from @openlup/platform/fulfillment/native to readFulfillmentDelay; authorize IDs and supply current schedules. Optional parcelSequenceNo is additive; adapters own any provider-facing format and existing callers default to the original parcel. Bind the selected adapter's order-identity codec to intake. Historical status alone supplies no arrival, reservation generation or inferred customer case. There is no backfill or hosted qualification.
- Add explicit native commerce creation and operator-attempt recording with cancellation composition. Local creation checks settled money, recorded order mode, contact, holds, cycle and reservations before committing a parcel; it makes no provider call.
- Fence selected native submission on succeeded same-provider operator attempts and full per-line held/committed reservation coverage. Admit initial
subscriptionorders; retain the paid-cycle check only for recordedsubscription_cycle. Replacement submission is supplied by the later native alignment composition; accepted-proof recovery remains available. - Add selected native dispatch candidates and final admission, actual-command shadow fingerprint forwarding, draft promotion/refresh and durable neutral failed/uncertain diagnostics. Operator audit attempts remain separate from command proof attempts.
Migration: install the complete selected catalogue through 20261120110000_fulfillment_dispatch_outcomes.sql before using these factories or the updated native dispatch store. Select nativeDispatch: { portKey, providerRef } or retain the existing host reader/list composition. Supply the adapter's pure shadowCommandFingerprint to preserve actual command identity across shadow and stage.
Migration: same-parcel/provider mapped-attempt replay returns the first attempt across draft refresh and promotion. Submitted references retain their mode and command identity. Existing dispatch outcomes stay NULL; no historical contacts, reservations, modes or acceptance proofs are reconstructed. Connected native transfers include the new private operator-attempt table.
Migration: the reference adapter preserves unreadable rejection bodies as network uncertainty, including HTTP 400. Readable definite rejections remain failed. Neither failed nor uncertain outcomes authorize automatic resubmission. No hosted provider qualification is implied.
Compose native provider ingress and leased reconciliation over the existing workers, recorded dispatch commitments, exact parcel reservations, shipment commands and job ledger. Retain first webhook envelopes, current polling tracking snapshots, closed occurrence/recovery facts and scoped holds without rewriting parcel status. Provider identity resolves first; all recorded fallback associations must agree on one order before ACK, and every match checks the adapter's outbound order identity. Delivered observations with no references retain the documented manual arrival path.
Migration: install the complete catalogue through 20261120120000_fulfillment_provider_intake.sql before binding createPostgresFulfillmentProviderIntake. Adapters selecting native intake must add closed intake facts and retain original occurrence bytes in optional intake.occurredAt; missing original chronology uses receipt time. Supply the adapter-owned optional orderIdentity mapping when outbound merchant identity differs from the recorded order number; existing generic callers and unbound operator fallbacks remain compatible. The optional durable observation readback is additive. Historical rows are not inferred or backfilled.
Migration: typed consumers can now handle three native dispatch refusals that were already returned.
- Remove provider trace columns from the source status facade and generated JSON; adapter-owned dictionaries retain provider status translation.
Migration: shared status-map JSON carries only the neutral core map. Use adapter-owned dictionaries for provider trace requirements. Prefer canonical packed; historical display aliases remain accepted without changed customer-step results.
-
Add the experimental
./fulfillment/testingoffline certification entry and scripted transport. Full qualification validates copied data with closed schemas and credits only independently compared invocations in one ledger. Evidence includes mode, derived profile, capability digest and port-less declarations. Host locking, durable deduplication, cancellation races, replacement and alignment remain real-PostgreSQL evidence. -
Keep executed refusal probes for non-PDF formats, label create/void, provider-side cancel, independent split, provider-owned reservations, snapshot-only movements and pickup-point/locker execution. The closed port-less list contains only courier pickup: unsupported records
probe: "no_port"; supported fails withcapability_not_certifiable. Callable unsupported operations need refusal witnesses. No provider behavior or SQL changes. -
Bind captured-adapter qualification to the deeply frozen original dispatch port and methods. Freeze scripted transport method slots. Derive refusal fixtures and the unchanged refusal type from the internal shared
FULFILLMENT_REFUSAL_REASONStuple. -
Apply readback capability and observation checks to paged rows; bind scenario aliases to their operation's existing capability guard. Snapshot and validate closed scripted outcomes once at enqueue. Refuse shared-memory buffers and views with
validation:shared_memory. -
Check unmapped poll evidence, observation replays, provider references and diagnostics through the shared projections before qualification credit. Snapshot asynchronous outcomes once; copy synchronous throws separately.
Migration: the unreleased testing subject's label-void expectations require an exclusive canProceed branch; successful cleanup cannot carry a refusal. Production label-port types and baseline callers remain unchanged.
Migration: scripted fake outcomes now contain snapshot-compatible data; construct Response objects from copied body/status data at the injected fetch boundary. Unknown outcome fields refuse before invocation; descriptor and buffer checks mitigate accidental accessor/proxy and shared-memory misuse. Paging evidence is recorded under readback.
Migration: captured adapters and their nested capabilities/ports are immutable; compose a separate adapter for custom behavior. The unreleased testing subject requires an expected dispatch after prepared results and forbids dispatch/replay keys after refused preparation. Existing baseline subject types remain accepted. Baseline host-storage label reads remain available when adapter label reading is unsupported; full mode still requires an explicit refusal. The internal shared FULFILLMENT_REFUSAL_REASONS tuple preserves every existing reason.
Migration: existing imports and one-argument calls retain baseline mode with shared data validation. Full mode requires independent expectations for every slot and mutually exclusive sync { input, expected } / { input, throws } roles. Refused preparations omit dispatch/replay keys; scenario indices are distinct integers in range. Supply read-only fake.calls handles backed by the private log, not caller arrays. Replace snapshot worker callbacks with snapshotOnly: true; the runner executes the real worker with its own isolated provider/store. Profile is derived: only the captured adapter factory brand permits dispatch-only qualification, which earns no other capability certification. Supported operations need contract-positive success and typed failure; unsupported cannot stand in for the failure of a supported operation. Missing expectations and malformed branches fail validation; descriptor-based snapshots mitigate accidental proxy, accessor and hidden-property misuse. Executable methods are captured once and invoked through a captured intrinsic. Return native promises without constructor/species overrides; native-promise checks and captured then handling mitigate accidental redirection. Policy callbacks and optional host-store methods use the same capture boundary; their returned and thrown data is copied before use. Inputs and outcomes are copied before use and compared by kind and deep strict equality. The kit certifies adapter behaviour against honestly built data fixtures and rejects missing, malformed or contradictory fixtures and contract-violating adapter results. Deliberate accessor, proxy or overridden-intrinsic manipulation to defeat the caller's own certification is outside the threat model. These mitigations reduce accidental misuse; they are not an attestation.
Migration: existing ./fulfillment and ./fulfillment/testing imports, signatures and behavior stay unchanged. Shared conformance support now belongs to fulfillment internals; the testing entry re-exports the same scenario types and scripted transport.
- Replace native provider identity predicates with immutable declarative profiles, retaining existing evidence, refusal codes, validation order and replay behavior. Reference adapters carry typed profile declarations; SQL/TypeScript parity and a declaration-only third-provider witness exercise both policy variants.
- Add optional host-selected execution flow labels to the portable payment rail; omission preserves the existing composition. The second reference provider's portable composition remains unsupported.
Migration: apply the complete selected catalogue through 20261121090000_payment_provider_profiles.sql. It replaces exactly ten functions and retains their existing privileges, including the sealed interactive body. Historical slots, witnesses, stored identities and receipts are unchanged. Arbitrary admitted providers retain their generic fallback; claims and reopening remain opt-in by profile. No mutable registry, provider activation or live qualification is introduced.
API changes
These declaration-report changes include referenced declaration files; they do not imply that every name is exported by every listed subpath. Provider-owned reports are summarized neutrally below.
packages/platform/api/catalog.api.md
Added declarations:
// API report diff: not compiled.
export declare function createDeliverySelectionBoundary(input: {
export { createDeliverySelectionBoundary } from './deliverySelectionBoundary.js';
packages/platform/api/commerce-native-checkout.api.md
Added declarations:
// API report diff: not compiled.
export declare function createDeliverySelectionBoundary(input: {
export { createDeliverySelectionBoundary } from './deliverySelectionBoundary.js';
packages/platform/api/commerce-server-postgres.api.md
Added declarations:
// API report diff: not compiled.
export declare function createDeliverySelectionBoundary(input: {
export { createDeliverySelectionBoundary } from './deliverySelectionBoundary.js';
packages/platform/api/commerce-server.api.md
Added declarations:
// API report diff: not compiled.
type Subject = FulfillmentAdapterConformanceSubject & Pick<FulfillmentAdapterTestSubject, "adapter" | "certification">;
export declare function isCapturedFulfillmentAdapter(adapter: object, port: FulfillmentDispatchPort, prepare: FulfillmentDispatchPort["prepare"], dispatch: FulfillmentDispatchPort["dispatch"]): boolean;
type PositiveResult<T> = T extends null ? never : T extends {
type SuccessFixture<M extends (...args: never[]) => unknown> = {
type FailureFixture<M extends (...args: never[]) => unknown> = {
type SyncFixtures<P> = {
export type FulfillmentTransportScenario = "transport-before-submission" | "transport-after-submission" | "http-failure";
export interface FulfillmentAdapterCertificationScenarios {
export type FulfillmentAdapterTestSubject = Omit<FulfillmentAdapterConformanceSubject, "fixtures"> & {
export interface FulfillmentConformanceOptions {
export interface FulfillmentQualification {
export declare const FULFILLMENT_REFUSAL_REASONS: readonly ["dispatch_reservations_not_recorded", "order_mode_unproven", "payment_not_succeeded", "subscription_cycle_not_paid", "not_dispatchable", "selection_required", "provider_mismatch", "carrier_service_required", "disabled", "not_ready", "unsupported", "withheld", "claim_conflict", "contact_stale", "stock_contention", "local_missing", "io_failure", "malformed", "untrusted", "unsupported_event", "stale", "missing_correlation", "provider_reservations_unsupported", "stock_consumption_policy_unsupported", "stock_movements_unsupported", "independent_split_unsupported", "pickup_point_delivery_unsupported", "label_create_unsupported", "label_void_unsupported", "provider_cancel_unsupported", "label_format_unsupported", "provider_proof_requires_acknowledgement", "succeeded_provider_attempt_exists", "replacement_dispatch_not_composed"];
export type ScriptedFulfillmentOutcome<T> = {
export declare class ScriptedFulfillmentTransportError extends Error {
type Fault = {
export declare function readScriptedFulfillmentFaultLog(handle: object): readonly Fault[];
export declare function createScriptedFulfillmentFake<Calls extends Record<string, unknown>>(): Readonly<{
export declare function createDeliverySelectionBoundary(input: {
export { createDeliverySelectionBoundary } from './deliverySelectionBoundary.js';
Changed declarations:
// API report diff: not compiled.
export declare function runFulfillmentAdapterConformance(subjects: readonly Subject[], options?: FulfillmentConformanceOptions): Promise<FulfillmentAdapterConformanceEvidence & {
export interface FulfillmentServicesOptions {
export interface FulfillmentCapabilityDescriptor {
export interface FulfillmentRefusal {
export interface FulfillmentDispatchRequest {
export type FulfillmentDispatchResult = ({
export interface FulfillmentObservation {
export interface DispatchRecord {
export interface SyncCursor {
export declare const FULFILLMENT_MIGRATIONS: readonly [{
export declare function createNativeUnsupportedFulfillmentPorts(): FulfillmentReplacementPort & FulfillmentOperatorMutationPort & FulfillmentCommerceReadPort & FulfillmentShipmentsOverviewPort & {
export declare function createPostgresFulfillmentDispatchStore(db: PgExecutor, host: {
export declare function readFulfillmentCapabilities(profiles: readonly FulfillmentCapabilityDescriptor[], selection: FulfillmentSelection | null | undefined,
interface StockSyncResult {
export declare function runFulfillmentStockSyncWorker(input: {
export declare function verifyAndNormalizeFulfillmentObservation(input: {
packages/platform/api/fulfillment-contracts.api.md
Added declarations:
// API report diff: not compiled.
export declare const FULFILLMENT_REFUSAL_REASONS: readonly ["dispatch_reservations_not_recorded", "order_mode_unproven", "payment_not_succeeded", "subscription_cycle_not_paid", "not_dispatchable", "selection_required", "provider_mismatch", "carrier_service_required", "disabled", "not_ready", "unsupported", "withheld", "claim_conflict", "contact_stale", "stock_contention", "local_missing", "io_failure", "malformed", "untrusted", "unsupported_event", "stale", "missing_correlation", "provider_reservations_unsupported", "stock_consumption_policy_unsupported", "stock_movements_unsupported", "independent_split_unsupported", "pickup_point_delivery_unsupported", "label_create_unsupported", "label_void_unsupported", "provider_cancel_unsupported", "label_format_unsupported", "provider_proof_requires_acknowledgement", "succeeded_provider_attempt_exists", "replacement_dispatch_not_composed"];
Changed declarations:
// API report diff: not compiled.
export interface FulfillmentServicesOptions {
export interface FulfillmentCapabilityDescriptor {
export interface FulfillmentRefusal {
export interface FulfillmentDispatchRequest {
export type FulfillmentDispatchResult = ({
export interface FulfillmentObservation {
export interface DispatchRecord {
export interface SyncCursor {
packages/platform/api/fulfillment-native.api.md
Added declarations:
// API report diff: not compiled.
export declare const FULFILLMENT_REFUSAL_REASONS: readonly ["dispatch_reservations_not_recorded", "order_mode_unproven", "payment_not_succeeded", "subscription_cycle_not_paid", "not_dispatchable", "selection_required", "provider_mismatch", "carrier_service_required", "disabled", "not_ready", "unsupported", "withheld", "claim_conflict", "contact_stale", "stock_contention", "local_missing", "io_failure", "malformed", "untrusted", "unsupported_event", "stale", "missing_correlation", "provider_reservations_unsupported", "stock_consumption_policy_unsupported", "stock_movements_unsupported", "independent_split_unsupported", "pickup_point_delivery_unsupported", "label_create_unsupported", "label_void_unsupported", "provider_cancel_unsupported", "label_format_unsupported", "provider_proof_requires_acknowledgement", "succeeded_provider_attempt_exists", "replacement_dispatch_not_composed"];
interface FulfillmentObservationTrackingReference {
interface FulfillmentObservationInput<LocalStatus, TrackingStatus> {
interface FulfillmentObservationStatusPolicy<LocalStatus, TrackingStatus> {
export declare function applyFulfillmentObservationEffects<LocalStatus, TrackingStatus>(input: FulfillmentObservationInput<LocalStatus, TrackingStatus>, policy: FulfillmentObservationStatusPolicy<LocalStatus, TrackingStatus>): Promise<void>;
export declare function createPostgresFulfillmentCommerceMutationPort(db: PgExecutor, input: {
export declare function createPostgresCustomerAlignmentRowsReader(db: PgExecutor): FulfillmentCustomerAlignmentRowsReader;
export declare const nativeDeliveryContactSchema: z.ZodObject<{
export declare const nativeDeliveryContactResolutionSchema: z.ZodObject<{
export declare const nativeDeliveryContactProjectionSchema: z.ZodObject<{
export declare function createPostgresDeliveryContactReadPort(executor: PgExecutor): {
export declare function nativeDeliveryContactProjection(resolution: z.infer<typeof nativeDeliveryContactResolutionSchema>, status: string, refs: {
export declare function createPostgresFulfillmentDispatchComposition(db: PgExecutor, selection: {
export { createPostgresCustomerAlignmentRowsReader } from './customerAlignment.js';
export { createPostgresDeliveryContactReadPort } from './deliveryContact.js';
export { createPostgresFulfillmentCommerceMutationPort } from './commerceMutations.js';
export { createPostgresFulfillmentDispatchComposition } from './dispatchComposition.js';
export { createPostgresFulfillmentProviderIntake, type NativeFulfillmentProviderIntakeOptions, type NativeFulfillmentProviderIntake, type NativeFulfillmentReconciliationJob, type NativeFulfillmentReconciliationResult } from './providerIntake.js';
type Ingress = Parameters<typeof verifyAndNormalizeFulfillmentObservation>[0];
type Ingress = Parameters<typeof import("./verifiedIngress.js").verifyAndNormalizeFulfillmentObservation>[0];
type Poll = Parameters<typeof runFulfillmentReconciliationPage>[0];
export interface NativeFulfillmentProviderIntakeOptions {
export interface NativeFulfillmentReconciliationJob {
type IntakeRefusal = {
export type NativeFulfillmentReconciliationResult = IntakeRefusal | {
export interface NativeFulfillmentProviderIntake {
export declare function createPostgresFulfillmentProviderIntake(input: NativeFulfillmentProviderIntakeOptions): NativeFulfillmentProviderIntake;
type DispatchRef = NonNullable<Awaited<ReturnType<Ingress["lifecycle"]["findDispatchRef"]>>>;
type DispatchRef = {
type PollEvidence = Pick<FulfillmentObservation, "correlation" | "eventKey" | "providerStatus" | "diagnostics"> | FulfillmentObservation;
export interface ReconciliationResult {
export declare function reconcileFulfillmentObservations(input: {
export declare function runFulfillmentReconciliationPage(input: Omit<Parameters<typeof reconcileFulfillmentObservations>[0], "readPage" | "batchSize" | "page"> & {
export declare function trackingReferenceComplete(ref: FulfillmentTrackingReference): boolean;
export declare function enrichTrackingReference(ref: FulfillmentTrackingReference, deliveryCarrier: {
export declare function uniqueTrackingReferences(refs: readonly FulfillmentTrackingReference[]): FulfillmentTrackingReference[];
type EffectInput = Parameters<typeof applyFulfillmentObservationEffects<FulfillmentObservation["fact"]["canonicalStatus"], "in_transit" | "delivered">>[0];
export interface FulfillmentIngressCounts {
export type FulfillmentIngressResult = {
export declare function fulfillmentIngressHttpResult(result: FulfillmentIngressResult): {
export declare function verifyAndNormalizeFulfillmentObservation(input: {
Changed declarations:
// API report diff: not compiled.
export interface FulfillmentServicesOptions {
export interface FulfillmentCapabilityDescriptor {
export interface FulfillmentRefusal {
export interface FulfillmentDispatchRequest {
export type FulfillmentDispatchResult = ({
export interface FulfillmentObservation {
export interface FulfillmentObservationPort {
interface FulfillmentObservationPort<TrackingStatus> {
export interface DispatchRecord {
export interface SyncCursor {
export declare const nativeFulfillmentCommerceResponseSchemas: {
export declare function createNativeFulfillmentBinding(input: {
export declare function createPostgresFulfillmentDispatchStore(db: PgExecutor, host: {
Warehouse reference adapter subpath
The reference adapter report adds four declaration lines: the shared refusal reason tuple, two intake normalization helpers and the adapter-owned intake order-identity codec. Nine declaration blocks change: the eight shared fulfillment contract blocks shown in the other reports and the adapter factory return shape. Protocol translation and identity formatting remain adapter-owned. The complete provider-specific report is available through the package export inventory.
packages/platform/api/fulfillment-testing.api.md
Added declarations:
// API report diff: not compiled.
type Subject = FulfillmentAdapterConformanceSubject & Pick<FulfillmentAdapterTestSubject, "adapter" | "certification">;
export declare function runFulfillmentAdapterConformance(subjects: readonly Subject[], options?: FulfillmentConformanceOptions): Promise<FulfillmentAdapterConformanceEvidence & {
export {};
export declare function isCapturedFulfillmentAdapter(adapter: object, port: FulfillmentDispatchPort, prepare: FulfillmentDispatchPort["prepare"], dispatch: FulfillmentDispatchPort["dispatch"]): boolean;
export interface CapturedFulfillmentCommand {
export declare function createCapturedFulfillmentAdapter(options: {
type PositiveResult<T> = T extends null ? never : T extends {
type SuccessFixture<M extends (...args: never[]) => unknown> = {
type FailureFixture<M extends (...args: never[]) => unknown> = {
type SyncFixtures<P> = {
export type FulfillmentTransportScenario = "transport-before-submission" | "transport-after-submission" | "http-failure";
export interface FulfillmentAdapterCertificationScenarios {
export type FulfillmentAdapterTestSubject = Omit<FulfillmentAdapterConformanceSubject, "fixtures"> & {
export interface FulfillmentConformanceOptions {
export interface FulfillmentQualification {
export interface DeliveryAlignmentPort {
export interface FulfillmentServicesOptions {
export interface FulfillmentServices {
export interface FulfillmentCapabilityDescriptor {
type Fixture<Method extends (...args: never[]) => unknown> = {
type SyncFixture<Port> = {
export interface FulfillmentAdapterConformanceSubject {
export interface FulfillmentAdapterConformanceEvidence {
export interface CustomerDeliveryAlignment {
export type FulfillmentCustomerAlignmentRowsReader = (subscriptionIds: string[]) => Promise<Record<string, unknown>[] | FulfillmentNativeUnsupported>;
type DeliveryKind = "parcel-locker" | "courier";
type PickupPoint = {
export interface FulfillmentSelection {
export declare const FULFILLMENT_REFUSAL_REASONS: readonly ["dispatch_reservations_not_recorded", "order_mode_unproven", "payment_not_succeeded", "subscription_cycle_not_paid", "not_dispatchable", "selection_required", "provider_mismatch", "carrier_service_required", "disabled", "not_ready", "unsupported", "withheld", "claim_conflict", "contact_stale", "stock_contention", "local_missing", "io_failure", "malformed", "untrusted", "unsupported_event", "stale", "missing_correlation", "provider_reservations_unsupported", "stock_consumption_policy_unsupported", "stock_movements_unsupported", "independent_split_unsupported", "pickup_point_delivery_unsupported", "label_create_unsupported", "label_void_unsupported", "provider_cancel_unsupported", "label_format_unsupported", "provider_proof_requires_acknowledgement", "succeeded_provider_attempt_exists", "replacement_dispatch_not_composed"];
export interface FulfillmentRefusal {
export interface FulfillmentDispatchRequest {
export interface DispatchEvidence {
export interface FulfillmentOperationError {
export type FulfillmentDispatchResult = ({
export type FulfillmentDispatchPrepareResult = {
export interface FulfillmentDispatchPort {
export type { FulfillmentOperationError, DispatchEvidence, FulfillmentDispatchPrepareResult, FulfillmentSelection, FulfillmentDispatchRequest, FulfillmentDispatchResult, FulfillmentDispatchPort, FulfillmentRefusal } from "./dispatch.js";
export type { LabelDocument, FulfillmentLabelPort } from "./label.js";
export type { FulfillmentObservation, FulfillmentObservationCodecs, FulfillmentObservationPort, FulfillmentTrackingReference } from "./observation.js";
export type { FulfillmentReadbackResult, FulfillmentReadbackPort, FulfillmentReconciliationObservation, FulfillmentObservationPagePort } from "./readback.js";
export type { SyncCursor, StockSnapshot, StockMovement, LocalStock, FulfillmentStockSyncProvider, FulfillmentStockSyncPort, FulfillmentProductSyncProvider, FulfillmentProductSyncPort } from "./sync.js";
export type { FulfillmentCapabilityDescriptor } from "./capabilities.js";
export type { DispatchRecord, FulfillmentStorePort, FulfillmentPaidHandoffPort } from "./store.js";
export type { DeliveryAlignmentPort } from "./alignment.js";
export type { FulfillmentAdapterConformanceSubject, FulfillmentAdapterConformanceEvidence } from "./conformance.js";
export type { FulfillmentNativeUnsupported } from './nativeUnsupported.js';
export type { FulfillmentReplacementPort, FulfillmentReplacementRequest, FulfillmentReplacementResult } from './replacement.js';
export type { FulfillmentOperatorMutationPort, FulfillmentOperatorMutationResult } from './operator.js';
export type { CustomerDeliveryAlignment, FulfillmentCustomerAlignmentRowsReader } from './customerAlignment.js';
export type { FulfillmentCommerceReadPort, FulfillmentCommerceReadPolicy, FulfillmentOrderStatus, FulfillmentPaymentStatus, FulfillmentCommerceOrder, FulfillmentOrdersListRequest, FulfillmentOrdersListResponse, FulfillmentOrderDetailRequest, FulfillmentOrderDetailResponse, FulfillmentShipmentsOverviewPort, FulfillmentShipmentsOverviewRequest, FulfillmentShipmentsOverviewResponse } from './read.js';
export type { FulfillmentProgressInput, FulfillmentProgressPresentation } from './read.js';
export type { FulfillmentServicesOptions, FulfillmentServices } from './bindings.js';
export type { CanonicalLocalFulfillmentStatus, CustomerFulfillmentStep } from "@openlup/core/fulfillment";
export interface LabelDocument {
export interface FulfillmentLabelPort {
export interface FulfillmentNativeUnsupported {
export interface FulfillmentObservationCodecs {
export interface FulfillmentTrackingReference {
export interface FulfillmentObservation {
export interface FulfillmentObservationPort {
interface MutationInput {
interface ParcelMutationInput extends MutationInput {
type AdminCommerceFulfillmentCreateRequest = MutationInput & {
type AdminCommerceFulfillmentRecordProviderAttemptRequest = ParcelMutationInput & {
type AdminCommerceFulfillmentRecordLabelRequest = ParcelMutationInput & {
type AdminCommerceFulfillmentHandOffRequest = ParcelMutationInput;
type AdminCommerceFulfillmentTrackingEventRequest = ParcelMutationInput & {
type AdminCommerceFulfillmentCancelRequest = ParcelMutationInput & {
export interface FulfillmentOperatorMutationResult {
export interface FulfillmentOperatorMutationPort {
export type FulfillmentOrderStatus = 'draft' | 'pending_payment' | 'paid' | 'failed' | 'expired' | 'fulfillment_pending' | 'cancelled' | 'fulfilled' | 'refunded';
export type FulfillmentPaymentStatus = 'not_started' | PaymentIntentStatus;
export interface FulfillmentCommerceOrder {
export interface FulfillmentOrdersListRequest {
export interface FulfillmentOrderDetailRequest {
export interface FulfillmentOrdersListResponse<Order = FulfillmentCommerceOrder> {
export interface FulfillmentOrderDetailResponse<Order = FulfillmentCommerceOrder> {
export interface FulfillmentCommerceReadPort<Order = FulfillmentCommerceOrder> {
export interface FulfillmentShipmentsOverviewRequest {
export interface FulfillmentShipmentsOverviewResponse {
export interface FulfillmentShipmentsOverviewPort {
export interface FulfillmentCommerceReadPolicy {
export type { FulfillmentProgressInput, FulfillmentProgressPresentation } from "@openlup/core/fulfillment";
export type FulfillmentReadbackResult = {
export interface FulfillmentReadbackPort {
export type FulfillmentReconciliationObservation = FulfillmentReadbackResult | {
export interface FulfillmentObservationPagePort {
export interface FulfillmentReplacementRequest {
export interface FulfillmentReplacementResult {
export interface FulfillmentReplacementPort {
export interface DispatchRecord {
export interface FulfillmentStorePort {
export interface FulfillmentPaidHandoffPort {
interface SyncIdentity {
export interface StockSnapshot extends SyncIdentity {
export interface StockMovement extends SyncIdentity {
export interface SyncCursor {
export interface LocalStock {
type Threshold = "safety_stock" | "reservation_coverage" | "forecast" | "stale_sync";
type Conflict = "unknown_sku" | "ean_conflict" | "kind_quantity_conflict";
export interface FulfillmentStockSyncProvider {
export interface FulfillmentStockSyncPort {
interface ProductPack {
export interface FulfillmentProductSyncProvider {
export interface FulfillmentProductSyncPort {
export type ScriptedFulfillmentOutcome<T> = {
export declare class ScriptedFulfillmentTransportError extends Error {
type Fault = {
export declare function readScriptedFulfillmentFaultLog(handle: object): readonly Fault[];
export declare function createScriptedFulfillmentFake<Calls extends Record<string, unknown>>(): Readonly<{
export { runFulfillmentAdapterConformance } from "../adapterConformance.js";
export { createCapturedFulfillmentAdapter } from "../capturedAdapter.js";
export type { CapturedFulfillmentCommand } from "../capturedAdapter.js";
export { createScriptedFulfillmentFake, ScriptedFulfillmentTransportError } from "./scriptedFake.js";
export type { ScriptedFulfillmentOutcome } from "./scriptedFake.js";
export type { FulfillmentAdapterCertificationScenarios, FulfillmentAdapterTestSubject, FulfillmentConformanceOptions, FulfillmentQualification, FulfillmentTransportScenario } from "./scenarios.js";
export type { FulfillmentAdapterCertificationScenarios, FulfillmentAdapterTestSubject, FulfillmentConformanceOptions, FulfillmentQualification, FulfillmentTransportScenario } from "../conformanceScenarios.js";
export { createScriptedFulfillmentFake, ScriptedFulfillmentTransportError } from "../scriptedFulfillmentFake.js";
export type { ScriptedFulfillmentOutcome } from "../scriptedFulfillmentFake.js";
packages/platform/api/fulfillment.api.md
Added declarations:
// API report diff: not compiled.
type Subject = FulfillmentAdapterConformanceSubject & Pick<FulfillmentAdapterTestSubject, "adapter" | "certification">;
export declare function isCapturedFulfillmentAdapter(adapter: object, port: FulfillmentDispatchPort, prepare: FulfillmentDispatchPort["prepare"], dispatch: FulfillmentDispatchPort["dispatch"]): boolean;
type PositiveResult<T> = T extends null ? never : T extends {
type SuccessFixture<M extends (...args: never[]) => unknown> = {
type FailureFixture<M extends (...args: never[]) => unknown> = {
type SyncFixtures<P> = {
export type FulfillmentTransportScenario = "transport-before-submission" | "transport-after-submission" | "http-failure";
export interface FulfillmentAdapterCertificationScenarios {
export type FulfillmentAdapterTestSubject = Omit<FulfillmentAdapterConformanceSubject, "fixtures"> & {
export interface FulfillmentConformanceOptions {
export interface FulfillmentQualification {
export declare const FULFILLMENT_REFUSAL_REASONS: readonly ["dispatch_reservations_not_recorded", "order_mode_unproven", "payment_not_succeeded", "subscription_cycle_not_paid", "not_dispatchable", "selection_required", "provider_mismatch", "carrier_service_required", "disabled", "not_ready", "unsupported", "withheld", "claim_conflict", "contact_stale", "stock_contention", "local_missing", "io_failure", "malformed", "untrusted", "unsupported_event", "stale", "missing_correlation", "provider_reservations_unsupported", "stock_consumption_policy_unsupported", "stock_movements_unsupported", "independent_split_unsupported", "pickup_point_delivery_unsupported", "label_create_unsupported", "label_void_unsupported", "provider_cancel_unsupported", "label_format_unsupported", "provider_proof_requires_acknowledgement", "succeeded_provider_attempt_exists", "replacement_dispatch_not_composed"];
export type ScriptedFulfillmentOutcome<T> = {
export declare class ScriptedFulfillmentTransportError extends Error {
type Fault = {
export declare function readScriptedFulfillmentFaultLog(handle: object): readonly Fault[];
export declare function createScriptedFulfillmentFake<Calls extends Record<string, unknown>>(): Readonly<{
Changed declarations:
// API report diff: not compiled.
export declare function runFulfillmentAdapterConformance(subjects: readonly Subject[], options?: FulfillmentConformanceOptions): Promise<FulfillmentAdapterConformanceEvidence & {
export interface FulfillmentServicesOptions {
export interface FulfillmentCapabilityDescriptor {
export interface FulfillmentRefusal {
export interface FulfillmentDispatchRequest {
export type FulfillmentDispatchResult = ({
export interface FulfillmentObservation {
export interface DispatchRecord {
export interface SyncCursor {
export declare const FULFILLMENT_MIGRATIONS: readonly [{
export declare function createNativeUnsupportedFulfillmentPorts(): FulfillmentReplacementPort & FulfillmentOperatorMutationPort & FulfillmentCommerceReadPort & FulfillmentShipmentsOverviewPort & {
export declare function createPostgresFulfillmentDispatchStore(db: PgExecutor, host: {
export declare function readFulfillmentCapabilities(profiles: readonly FulfillmentCapabilityDescriptor[], selection: FulfillmentSelection | null | undefined,
interface StockSyncResult {
export declare function runFulfillmentStockSyncWorker(input: {
export declare function verifyAndNormalizeFulfillmentObservation(input: {
packages/platform/api/payments-contracts.api.md
Added declarations:
// API report diff: not compiled.
export type { PaymentProviderProfile } from "./providerProfile.js";
export interface PaymentProviderProfile {
Reference payment adapter subpaths
Both reference payment adapter reports add the same two shared declaration lines shown in the payment contracts report: the profile type re-export and interface. No provider-specific declaration changes. Their portable-composition limits remain as described above; a typed declaration does not activate a provider.
packages/platform/api/payments-testing.api.md
Added declarations:
// API report diff: not compiled.
export type { PaymentProviderProfile } from "./providerProfile.js";
export interface PaymentProviderProfile {
packages/platform/api/payments.api.md
Added declarations:
// API report diff: not compiled.
export type { PaymentProviderProfile } from "./providerProfile.js";
export interface PaymentProviderProfile {
Changed declarations:
// API report diff: not compiled.
export declare function createPostgresProviderPaymentRail(input: {
packages/platform/api/pricing.api.md
Added declarations:
// API report diff: not compiled.
export declare function createDeliverySelectionBoundary(input: {
export { createDeliverySelectionBoundary } from './deliverySelectionBoundary.js';
packages/platform/api/promotions.api.md
Added declarations:
// API report diff: not compiled.
export declare function createDeliverySelectionBoundary(input: {
export { createDeliverySelectionBoundary } from './deliverySelectionBoundary.js';
packages/platform/api/shipping.api.md
Added declarations:
// API report diff: not compiled.
export declare function createDeliverySelectionBoundary(input: {
export { createDeliverySelectionBoundary } from './deliverySelectionBoundary.js';