Skip to content

Type declarations are not case consistent #736

@rayhackshaw

Description

@rayhackshaw

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions