feat(auth): regenerate against OpenAPI 0.95.1 (AuthTokenError)#1
Merged
Conversation
Picks up OpenAPI spec 0.95.0: - New POST /auth/token operation, exported as auth() - AuthTokenResponse and AuthError schemas - apiKeyAuth security scheme Also carries forward additive schema changes from a prior missed regen: EquityPoint, ResultMap.pnlTotalPercent, and ResultMap.equityCurve.
Picks up the AuthError schema rename in spec 0.95.1 (symmetric with AuthTokenResponse). All other contract details unchanged. Generated type renames: - AuthError (schema) -> AuthTokenError - AuthError2 (op error union) -> AuthError (clean now, no suffix) The schema model is exposed as AuthTokenError; the per-operation error union returned by auth() is the unsuffixed AuthError. Bumps @qtsurfer/api-client to 0.2.1.
… cross-link
Generator regen does not touch the README. Add the `auth` row to the
operations table, a short usage snippet showing how to call `await auth({
headers: { 'X-API-Key': ... } })` and destructure `data.access_token`,
document the QTSURFER_APIKEY env-var convention, and point production callers
at the sibling SDK for token-refresh handling.
Part of openapi-auth-rollout Phase 2 (#168).
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.
Summary
Regenerates
@qtsurfer/api-clientagainst OpenAPI spec 0.95.1, picking up theAuthError→AuthTokenErrorschema rename (symmetric withAuthTokenResponse). No other contract changes.Carries forward additive schema updates from prior un-regenerated spec bumps (auth token endpoint,
EquityPoint,ResultMap.equityCurve,ResultMap.pnlTotalPercent).Generated type renames
AuthError(schema model) ->AuthTokenErrorAuthError2(op error union) ->AuthError(clean — no2suffix)The schema model is now exposed as
AuthTokenError; the per-operation error union returned byauth()is the unsuffixedAuthError. Hey-api no longer needs to suffix because the name conflict is gone in the spec.Version
0.2.0->0.2.1Test plan
bunx openapi-tssucceeds againstqtsurfer-api/main/openapi.yaml(spec 0.95.1).bunx tsc --noEmitclean.bunx tsupbuild clean (ESM 3.22KB, DTS 30.31KB).grep -c AuthError2 src/generated/*.tsreturns 0 across all generated files.sdk.gen.tsimportsAuthError(union) — no longerAuthError2.