@whiplashmerch/whiplash-api-client 1.0.65 → 1.0.66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.esm.js +3 -0
- package/dist/client.esm.js.map +1 -1
- package/dist/utils/loads.d.ts +3 -1
- package/package.json +1 -1
package/dist/client.esm.js
CHANGED
|
@@ -26985,6 +26985,7 @@ const getApi21InboundConsumerReturnUnitCount = (client, id) => {
|
|
|
26985
26985
|
|
|
26986
26986
|
const loadRelations = {
|
|
26987
26987
|
bill_of_lading: { idKey: 'bill_of_lading_id', entityKey: 'bill_of_lading', func: getApiV21BillOfLadings, type: RelationType.Direct },
|
|
26988
|
+
warehouse: { idKey: 'warehouse_id', entityKey: 'warehouse', func: getApiV21Warehouses, type: RelationType.Direct },
|
|
26988
26989
|
};
|
|
26989
26990
|
/**
|
|
26990
26991
|
* @returns ApiV21EntitiesLoadExtended[]
|
|
@@ -26993,6 +26994,8 @@ const getApiV21LoadsExtended = (client, params, options, perPage = 25) => {
|
|
|
26993
26994
|
const configuration = [];
|
|
26994
26995
|
if (options.bill_of_lading)
|
|
26995
26996
|
configuration.push(loadRelations.bill_of_lading);
|
|
26997
|
+
if (options.warehouse)
|
|
26998
|
+
configuration.push(loadRelations.warehouse);
|
|
26996
26999
|
return new Promise((resolve, reject) => getApiV21Loads(client, params)
|
|
26997
27000
|
.then(response => resolve(loadRelatedObjects(client, response, configuration, perPage)))
|
|
26998
27001
|
.catch(reject));
|