Repository navigation
Conversation
Add AuthNonceResponse and AuthLoginResponse TypedDicts mirroring the TypeScript SDK, export them from the package root, and use them as the return types. Point the generator's TYPE_MAP at them so a regeneration keeps the annotations.
This branch has not been deployed
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.
Closes #2630.
Change
sdks/python/pmxt/models.py: addAuthNonceResponse(nonce,messageToSign, optionalexpiresAt) andAuthLoginResponse(apiKey,apiSecret, optionalpassphrase,expiresAt) as TypedDicts, matching the TypeScript interfaces.sdks/python/pmxt/__init__.py: export both from the package root.sdks/python/pmxt/client.py:get_auth_nonce/login_with_signaturenow return these types instead ofDict[str, Any]. Runtime behaviour is unchanged (still the raw dict).sdks/python/scripts/generate-client-methods.js: TYPE_MAP points at the new types. Both methods are inPRESERVE_EXISTING_METHODS, so their annotations are edited by hand inclient.py; re-running the generator leaves them as they are.Tests
tests/test_public_exports.pychecks the required/optional keys, the root exports, and the two return annotations. It fails without the change and passes with it.Verification and limits
pmxt_internalclient isn't in the repo and needs openapi-generator, which I don't have, so I ran the Python tests against a throwaway stub of that package.tests/test_public_exports.py: 10 passed. The rest oftests/(excluding e2e): 264 passed, 4 failed, and the same 4 fail with and without my change because they need the real generated client. CI is the proper run.generate-client-methods.jsproduces no further changes toclient.py.AI assistance was used for this contribution (implementation and review); I checked the diff and test results myself.