Interface: CreateCheckoutDeps
Defined in: server/checkout/factory.ts:21
Everything createCheckout needs (proposal §Factory & injected deps): the
shared CheckoutFeatureDeps except its redundant actor callback: repositories
supply the one actor accessor used by every service. Adds outbox hooks and
the operational observer.
refundPolicy is required by CheckoutFeatureDeps — the decision table
advertises a role-gated authorize step, and an optional gate that silently
defaults open is not a control. 'allow-any-actor' is the explicit,
greppable opt-out. Omitting it is a compile error.
Extends
Omit<CheckoutFeatureDeps,"getActorId">
Properties
clock
clock: ClockPort;Defined in: server/checkout/deps.ts:79
Injectable now() for placement/status timestamps (deterministic tests).
Inherited from
hooks?
optional hooks?: CheckoutHooks;Defined in: server/checkout/factory.ts:26
Domain-lifecycle handlers delivered by the outbox dispatcher (optional).
observer?
optional observer?: CheckoutObserver;Defined in: server/checkout/factory.ts:28
Operational telemetry for delivery failures / dead-lettering (optional).
priceCart?
optional priceCart?: PriceCart;Defined in: server/checkout/deps.ts:104
Consumer pricing adapter (proposal §Pricing injection) — used ONLY by
CartService (getPricedCart/finalize re-price the cart through it).
Optional here so the other services (Order/Payment/Refund) construct
without it, exactly as they do today; the stage-8 factory always supplies
it. CartService throws a clear error when a cart-pricing op runs with
no adapter configured.
Inherited from
providers
providers: PaymentProviderRegistry;Defined in: server/checkout/deps.ts:88
provider key → adapter registry (proposal §Factory: providerRegistry
— the consumer registers its stripe/worldpay/manual adapters). Required,
not optional: the stage-8 factory requires it, and an unset registry
should fail at construction, not at the first tender op.
Inherited from
randomBytes
randomBytes: (n: number) => Uint8Array;Defined in: server/checkout/deps.ts:81
CSPRNG for order codes — injectable so collision-retry is testable.
Parameters
| Parameter | Type |
|---|---|
n | number |
Returns
Uint8Array
Inherited from
CheckoutFeatureDeps.randomBytes
refundPolicy
refundPolicy: RefundPolicyOption;Defined in: server/checkout/deps.ts:95
Refund authorization gate (proposal §Factory: REQUIRED — the decision
table advertises a role-gated authorize step; an optional gate that
silently defaults open is not a control). 'allow-any-actor' is the
explicit opt-out. RefundService.authorizeRefund consults it.
Inherited from
CheckoutFeatureDeps.refundPolicy
repos
repos: CheckoutRepositories;Defined in: server/checkout/deps.ts:75