There seems to be a few issues with the typescript definitions in shopify-api-node. For reference, I'm looking at the graphql docs.
I'll outline a few that exist for IOrder.
1. billing_address is set to required, whereas the docs specify that
"Not all orders have mailing addresses"
Ideally, we'd have
instead of the current
2. client_details is set to required
According to your docs, order has no field client_details
3. shipping_address is to required
However, the value can be null. Ideally we'd have
4. Docs specify the existence of currentCartDiscountAmountSet
IOrder Typescript definition lacks it
5. Cancel_reason set to required, but according to docs
"Reason the order was canceled. Returns null if the order wasn't canceled."
I suggest cancel_reason: OrderCancelReason | null;
Am I mistaken here? If not, will those definitions be updated soon?
I also noticed that the definitions lack admin_graphql_api_id, why? Shouldn't they be there?
This npm package shopify-api-node is an open source package not released from Shopify. While I suspect some of the developer community might find your post here, I would recommend creating an issue in the repository linked to the npm package.