feat(BFP-5021): add DELISTING to TradeType enum + regenerate clients - #296
Merged
Merged
Conversation
added 2 commits
September 9, 2026 10:47
Mirrors the upstream pro-mono api-specs TradeType (delist-close fills carry this value). Ordered ORDER, LIQUIDATION, DELEVERAGE, DELISTING, UNSPECIFIED.
Regenerated via apigen. rust + python bump 1.18.0 -> 1.19.0 (their own line); ts package bumped 2.1.0 -> 2.2.0 (its published npm line — apigen derives from rust/Cargo.toml 1.x, which is desynced from the ts 2.x npm line; see PR notes). Reverted whitespace/byte-only regen noise in unrelated generated files.
NidaKarim
requested review from
a team,
alawrenc and
lucasfronza
as code owners
September 9, 2026 14:48
Onurfesci
approved these changes
Sep 9, 2026
kevin-ip
approved these changes
Sep 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
DELISTINGto theTradeTypeenum and regenerates the ts/python/rust clients. Unblocks perpetual-ui BFP-5021 — delist-driven force-closes carrytradeType: "DELISTING"(from the backend, BFP-5019/5020, already live), and the FE should reference the SDK enum rather than a hardcoded string.How
resources/common.yamlTradeTypeenum gainsDELISTINGbetweenDELEVERAGEandUNSPECIFIED, matching the upstream pro-mono api-specs order exactly.apigen.DELISTINGlands in the correct position in every client:ts/sdk/src/api.ts:Delisting: 'DELISTING'.../models/trade_type.py:DELISTING = 'DELISTING'.../models/trade_type.rs:#[serde(rename = "DELISTING")] Delistingtsc -p tsconfig.esm.json --noEmit) passes.apigenderives one version fromrust/Cargo.toml(currently on the 1.x line) and applied it to every SDK. But the TS npm package is on the 2.x line (published2.0.0/2.1.0; perpetual-ui pins2.1.0). Left as apigen produced it,ts/sdk/package.jsonwould regress2.1.0 → 1.19.0.So in this PR:
1.18.0 → 1.19.0and python1.18.0 → 1.19.0(their own lines — unchanged behavior).2.1.0 → 2.2.0— set by hand to a forward minor over the published2.1.0(thets-release-*tag publishests/sdk/package.json's version).The underlying rust(1.x)/python(1.x) vs ts-npm(2.x) version-line desync is pre-existing — apigen's base (
rust/Cargo.toml) doesn't track the TS npm line. Not fixing that here; flagging so the maintainer picks the intended TS release version at tag time and decides whether to reconcile apigen's base.Notes
update_account_preference_request.rs, python client infra, READMEs) was reverted to keep the diff to the actual change. There is no regenerate/no-dirty CI gate (typecheck.yamlonly builds/typechecks each client), so this is safe.api.tsshows as a "binary" diff — that's the repo's own.gitattributes(binary: set,linguist-generated: set) on generated files, not a real binary change; the only content change is the one enum line.Follow-up
Once published, perpetual-ui #5055 bumps the dep and swaps the temporary
DELISTING_TRADE_TYPEstring forTradeType.Delisting.🤖 Generated with Claude Code