Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type declarations are not case consistent #736

Open
Ray-Hackshaw opened this issue Dec 16, 2024 · 2 comments
Open

Type declarations are not case consistent #736

Ray-Hackshaw opened this issue Dec 16, 2024 · 2 comments

Comments

@Ray-Hackshaw
Copy link

SDK you're using (please complete the following information):

  • Version 9.3.0-alpha.5

Describe the bug
The exported types from the xero-node sdk are not capitalised yet the responses from the API are.

This mismatch makes it so that the types can't be used to define response payloads without some kind of manual serialisation step involved, or opting to simply not use them at all.

e.g. GET Payments
API returns BankAmount, Amount etc
The SDK type declaration has these as bankAmount, amount

To Reproduce
Steps to reproduce the behavior:

  1. Go to API Explorer and call any basic GET endpoint (Payments)
  2. Observe response with capitalised property names
  3. Find payment.d.ts file in xero-node SDK
  4. See the same type but with lowercase starting property names

Expected behavior
The types in the SDK should match the API responses.

Screenshots
image
image

I have observed this so far with Payments and Budgets, however I imagine this is the same for most/all endpoints.

Copy link

PETOSS-686

Copy link

Thanks for raising an issue, a ticket has been created to track your request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant