All notable changes to fragment-python will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Releases prior to 1.0.0 were published before this changelog was added and
are not documented here.
create_paymentnow also returns the Payment'sid,ik,amount,mode, andcurrency, so itspaymentcan be passed to<PaymentSession>in@fragment-dev/payment-elementsas-is.get_ledger_account_linescan filter byexternal_tx_idsonLedgerLinesFilterSet, returning only the Ledger Lines linked to those external transactions. Only supported for linked Ledger Accounts.
PaymentStatusnow usesacceptedinstead ofapproved:PaymentStatus.approvedis nowPaymentStatus.accepted. Payments are experimental, so this API may change in a future release.
instantiateLedgerAccountcreates a Ledger Account from a template in the Ledger's Schema before any Ledger Entry is posted to it, creating any missing templated ancestors. Pass aledger, apath, and optionalparameters.getPaymentreads one Payment byikandledgerIk. It returns the Payment'samount,currency,status,type,typeVersion,mode,parametersandcreated.listPaymentspages through a Ledger's Payments withfirst,afterandbefore, and filters oncreatedandstatusviaPaymentsFilterSet.- Scenes can simulate Payments.
SceneInputtakes apaymentslist ofScenePaymentInput, and aSceneEventInputwithevent_typeofpaymentreferences one byikto post a lifecycle transition. PaymentStatushas a newapprovedstate.CurrencyCodehas a newSLEmember.
createPaymentnow returns aCreatePaymentResultwrappingpayment, instead of returning thePaymentdirectly.typeVersionis now required oncreatePayment. It previously defaulted to the latest active version.SchemaPaymentAccountingInputnow keys its Ledger Entries byinitiatedandsettled, instead ofneeds_payment_method_to_processingandprocessing_to_settled.
createPaymentcreates a Payment on a Ledger. Pass anik, aledgerIk, and a Paymenttype, along with optionaltypeVersionandparameters. It returns the Payment'sclientSecretandstatus. Payments are experimental, so this API may change in a future release.
typeVersiononLedgerEntryInputis now supported and defaults to1. It was previously reserved for an upcoming feature.PaymentStatusnow usesneeds_payment_methodinstead ofrequires_confirmation.SchemaPaymentEntryStatusis now namedSchemaPaymentTypeStatus, andSchemaPaymentEntryInputnow takesneeds_payment_method_to_processinginstead ofneeds_confirmation_to_processing.
- Ledger Line tags can now be updated using
updateLedgerEntry
AddLedgerEntriesposts a batch of Ledger Entries atomically.- Strongly-typed batch payloads. Codegen now emits a
typed_entriesmodule with one model per Ledger Entry type, derived from the per-entry-typeaddLedgerEntryoperations in the codegen input directory. Because a batch mutation takes one list of one input type, GraphQL cannot type each entry'sparametersfield individually; these models do. They can be passed toadd_ledger_entriesdirectly, mixed with rawAddLedgerEntryInputvalues. Model names always carry the entry type version, defaulting toV1.
GetLedgerAccountBalancenow returns totalbalance(self + children) instead ofownBalance.ListLedgerAccountBalancesandListMultiCurrencyLedgerAccountBalancesnow acceptconsistencyModeonchildBalance,childBalances,balance, andbalances.
GetLedgerAccountBalanceWithChildRolluphas been removed.
-
Upgrade your schema to use the total balance consistency feature:
- Add the path to your schema JSON or the JSON itself to the top of the prompt below and give it to your LLM of choice. It'll make some small changes to your consistency configs and conditions.
- Deploy the new schema
Fragment schema JSON path or full schema: <YOUR_SCHEMA_OR_PATH>
Above is a Fragment schema JSON file or the path to it. Transform it to use total balances by following
the rules below, then validate the result. If a file path is provided, edit the file in place — do not
create a copy or temporary file.
Rules
1. Entry conditions
Replace ownBalance with totalBalance in all entry conditions.
2. Default consistency config
In the schema's defaultConsistencyConfig, replace ownBalanceUpdates with totalBalanceUpdates.
3. Ledger account consistency config
For each ledger account (not groups — groups keep ownBalanceUpdates unchanged), determine the new
consistency value using these three questions:
- (A) Is this account a leaf on any entry line? Check whether any entry in the schema references this
account as a line target.
- (B) Is this account strongly consistent? Either it has an explicit ownBalanceUpdates: "strong", or it
inherits "strong" from defaultConsistencyConfig.
- (C) Does this account have an entry condition? Check whether any entry condition references this
account.
Then apply:
- (A) Yes + (B) Yes → totalBalanceUpdates: "strong"
- (C) Yes → totalBalanceUpdates: "strong"
- (A) No + (B) Yes + (C) No → totalBalanceUpdates: "eventual"
- (B) No + (C) No → totalBalanceUpdates: "eventual"
In short: an account gets totalBalanceUpdates: "strong" if it is either a leaf on an entry line and was
already strongly consistent, or has an entry condition. Everything else becomes "eventual".
4. Groups are excluded
Do not change ownBalanceUpdates on groups. This migration only applies to ledger accounts.
Pre-Validation
Validate the transformed schema before returning it:
- If the input was a file path, run: fragment verify-schema --path <path-to-schema> --verbose
- If the input was pasted schema JSON, write it to a temporary file and run: fragment verify-schema --path
<temp-file> --verbose
- If you don't have access to a shell, skip this step.
-
Upgrade your Fragment SDK to the latest version:
GetLedgerAccountBalancenow returns totalbalance(self + children) instead ofownBalance.- Change
$ownBalanceConsistencyModeto$balanceConsistencyMode
- Change
- Use
GetLedgerAccountBalanceinstead ofGetLedgerAccountBalanceWithChildRollup.