goshippo / shippo-javascript-sdk

MIT License
7 stars 1 forks source link

Items in `Transaction.messages` array are always empty objects #27

Closed Cyberuben closed 4 months ago

Cyberuben commented 4 months ago

When querying transactions through the SDK, the parsing of the messages doesn't seem to work properly.

Example response through SDK:

image

Same transaction through Postman:

image
shippo-lueders commented 4 months ago

the core issue is that the schema is not really defined, it's just

        messages:
          example: []
          items:
            type: object
          type: array

the complexity is that messages is likely a shared model, across multiple endpoints (ratings, shipments, transactions) and I'm trying to confirm whether they're really shared or whether there are variances.

in summary - thanks for reporting, trying to figure out the best solve, should have a fix by tomorrow at the latest

shippo-lueders commented 4 months ago

https://www.npmjs.com/package/shippo/v/2.2.2 has been published which corrects the message schema