Repository navigation
Conversation
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.
Prepares the C# SDK for the v0.10.0 rules engine's
event_quantitiespreflight, which prices a call (requests plus token counts) the way the API burns it. Mirrors schematic-go #250 as far as this SDK's hand-written code allows.Local evaluation already hands the generated
PreflightRequestBodyto the engine as its options, butHasPreflightchecked a fixed list of knobs, so a field the type gains on regen would have been silently left off. It now sends whatever the body serializes, minus null and empty-object fields, soevent_quantitiesreaches the engine as soon as Fern adds it.The generated rules-engine models keep unknown fields as extension data, so
quantity_rateson conditions and entitlements already reaches the engine and comes back on the result. The new tests pin both, and run the API's sharedquantity_cost.jsonfixture through the WASM engine withevent_quantitiescarried in the body's extension data.There's no public way to set
event_quantitiesyet: this SDK's only preflight surface is the generatedPreflightRequestBody(reached throughCheck), and that type gets the field once the API adds it to the preflight body and Fern regenerates. Exposing it onCheckOptionsis a follow-up after that.