bijection/orders.ts
Operations, mutations and actions
Operations are built on the functions you already know. An operation does not replace mutations or actions, andaction keeps its ordinary meaning: a
function that can call third-party APIs directly with fetch.
Reach for an operation when a change matters to the business: when it must be
retried without being applied twice, when a person should be able to preview it
first, or when it has to ask an external system to do something.
What happens when you call an operation
1
Preview (optional)
A preview runs the same preparation on the current data, reports the changes
and external calls it would make, and then discards them. Nothing is
accepted, reserved or sent.
2
Acceptance
The caller submits the operation with a request key. Preparation runs in one
transaction. Its local changes, its external calls and the retained request
commit together, and the caller receives an acceptance receipt.
3
Delivery
After the commit, each external call is delivered to its destination through
the integration command it names. Delivery follows the destination’s declared
contract, not a generic retry loop.
4
Outcome
Each call ends with an outcome the destination’s evidence supports: for
example delivered, refused, or unknown. An unknown outcome stays unknown until
it is reconciled.
An acceptance receipt proves that your local changes committed. It is not
evidence that an external system applied anything. Follow each call’s status
for that.
Learn more
Defining operations
Declare an operation with
defineOperation: its object type, target,
arguments, result and preparation.Calling operations
Request keys, previews, recovery after a lost response, and status.
External calls
Submit durable external calls and follow their lifecycle and outcomes.
Operation interfaces
Share one operation shape across object types and discover implementations.
Durable waits
Commit work at a business-time boundary with
defineWait, and require
source freshness with sourceBarrier.CLI and console
Run, preview and recover operations with
bijection run, and follow them in
the console.