@whiplashmerch/whiplash-api-client 3.2.22 → 3.2.23
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
CHANGED
|
@@ -41797,7 +41797,7 @@ const loadDirectlyRelatedObjects = async (client, input, config, modelCache, per
|
|
|
41797
41797
|
ids = [...new Set(ids)];
|
|
41798
41798
|
// remove ids that belong in the cache, since we dont need to query for them
|
|
41799
41799
|
ids = ids.filter(id => {
|
|
41800
|
-
return modelCache[id] === undefined;
|
|
41800
|
+
return modelCache[String(id)] === undefined;
|
|
41801
41801
|
}).sort();
|
|
41802
41802
|
const totalPages = Math.ceil(ids.length / perPage);
|
|
41803
41803
|
if (ids.length > 0) {
|
|
@@ -41813,7 +41813,7 @@ const loadDirectlyRelatedObjects = async (client, input, config, modelCache, per
|
|
|
41813
41813
|
const idsParam = ids.slice(start, end);
|
|
41814
41814
|
// fetch the list of records related to the given ids
|
|
41815
41815
|
const searchParams = {
|
|
41816
|
-
search: JSON.stringify({ id_in: idsParam }),
|
|
41816
|
+
search: JSON.stringify({ id_in: idsParam, ...(config.searchCriteria || {}) }),
|
|
41817
41817
|
scope: 'list',
|
|
41818
41818
|
perPage: perPage,
|
|
41819
41819
|
};
|
|
@@ -41852,7 +41852,7 @@ const loadIndirectlyRelatedObjects = async (client, input, config, perPage = 25)
|
|
|
41852
41852
|
return input;
|
|
41853
41853
|
const criteria = config.idKey + '_in';
|
|
41854
41854
|
const searchParams = {
|
|
41855
|
-
search: JSON.stringify({ [criteria]: ids }),
|
|
41855
|
+
search: JSON.stringify({ [criteria]: ids, ...(config.searchCriteria || {}) }),
|
|
41856
41856
|
scope: 'list',
|
|
41857
41857
|
perPage: perPage,
|
|
41858
41858
|
};
|