new InMemoryChannelLedger(Parametersoptions?):InMemoryChannelLedger
Returns
InMemoryChannelLedger
Methods
acceptInbound()
acceptInbound(Atomically claims an inbound provider message and persists its run mapping as one recovery unit. Persistent implementations must share this claim across router processes and must not release a claim afterchannel,externalMessageId,conversationId,accept):Promise<Readonly<{duplicate:boolean;runId:string; }>>
accept succeeds.
Parameters
Returns
Promise<Readonly<{ duplicate: boolean; runId: string; }>>
Implementation of
ChannelLedger.acceptInbound
findOutbound()
findOutbound(Parameterschannel,providerRequestId):Promise<string|undefined>
Returns
Promise<string | undefined>
Implementation of
ChannelLedger.findOutbound
findRun()
findRun(ParametersrunId):Promise<Readonly<{channel:string;conversationId:string; }> |undefined>
Returns
Promise<Readonly<{ channel: string; conversationId: string; }> | undefined>
Implementation of
ChannelLedger.findRun
recoverOutbound()
recoverOutbound(Reconciles a previous provider success without authorizing or sending again. Parameterschannel,runId,idempotencyKey):Promise<{providerRequestId:string; } |undefined>
Returns
Promise<{ providerRequestId: string; } | undefined>
Implementation of
ChannelLedger.recoverOutbound
sendOutbound()
sendOutbound(Reserves and completes one correlated outbound attempt. Implementations must retain the stable idempotency key through retries/recovery so a provider never observes an unkeyed resend after persistence uncertainty. Parameterschannel,runId,idempotencyKey,send):Promise<{providerRequestId:string; }>
Returns
Promise<{ providerRequestId: string; }>
Implementation of
ChannelLedger.sendOutbound
InMemoryChannelLedgerOptions
Properties failAfterInboundAcceptOnce?Test-only fault injection for recovery-path verification. failAfterOutboundSendOnce?readonlyoptionalfailAfterInboundAcceptOnce?:boolean
Test-only fault injection for recovery-path verification.readonlyoptionalfailAfterOutboundSendOnce?:boolean