duffel-api-javascript icon indicating copy to clipboard operation
duffel-api-javascript copied to clipboard

Incorrect types on order change requests

Open ryanmogk opened this issue 11 months ago • 1 comments

The return type of a get on duffel.orderChanges.get(...) is incorrect at src/booking/OrderChanges/OrderChanges.ts.

It's set to OrderChangeOfferSlice when the response should be OrderChangeOffer

Current code:

/**
    * Retrieves an order change by its ID
    * @param {string} id - Duffel's unique identifier for the order change
    * @link https://duffel.com/docs/api/order-changes/get-order-change-by-id
    */
get: (id: string) => Promise<DuffelResponse<OrderChangeOfferSlice>>;

Corrected:

/**
    * Retrieves an order change by its ID
    * @param {string} id - Duffel's unique identifier for the order change
    * @link https://duffel.com/docs/api/order-changes/get-order-change-by-id
    */
get: (id: string) => Promise<DuffelResponse<OrderChangeOffer>>;

ryanmogk avatar Nov 12 '24 00:11 ryanmogk