@availity/api-axios
Advanced tools
Comparing version 9.0.4 to 9.0.5
@@ -5,2 +5,15 @@ # Changelog | ||
## [9.0.5](https://github.com/Availity/sdk-js/compare/@availity/api-axios@9.0.4...@availity/api-axios@9.0.5) (2024-12-13) | ||
### Bug Fixes | ||
* **api-axios:** all logic math.min ([a722c65](https://github.com/Availity/sdk-js/commit/a722c65b36b405382a0a1d1273b5e358f9f3d5e9)) | ||
* **api-axios:** default 1 if response.limit not present on all ([0f2ca5d](https://github.com/Availity/sdk-js/commit/0f2ca5d4c53eceb7d184b6c62a1295ece9436acf)) | ||
* **api-axios:** use request.length if response.limit not present on all ([bd7812d](https://github.com/Availity/sdk-js/commit/bd7812d9f30a561f15c5803b9a0b87b52326d51d)) | ||
* **api-axios:** use request.limit if response.limit not present on all ([0994453](https://github.com/Availity/sdk-js/commit/0994453ffdf54f4d3036d40fa5ceab1873a565b1)) | ||
* use request limit if response limit is not present for all ([2cef9cb](https://github.com/Availity/sdk-js/commit/2cef9cb64b0cc360cf146da7277e67b79f96cef5)) | ||
## [9.0.4](https://github.com/Availity/sdk-js/compare/@availity/api-axios@9.0.3...@availity/api-axios@9.0.4) (2024-10-23) | ||
@@ -7,0 +20,0 @@ |
@@ -439,5 +439,8 @@ "use strict"; | ||
return __async(this, null, function* () { | ||
var _a; | ||
const response = yield this.query(config); | ||
const key = this.getQueryResultKey(response.data); | ||
const totalPages = Math.ceil(response.data.totalCount / response.data.limit); | ||
const length = (_a = response.data) == null ? void 0 : _a.length; | ||
const limit = response.data.limit || length <= response.data.totalCount ? Math.min(length, response.data.totalCount) || 1 : 1; | ||
const totalPages = Math.ceil(response.data.totalCount / limit); | ||
const result = response.data[key] || []; | ||
@@ -451,3 +454,3 @@ if (totalPages > 1) { | ||
otherPages.map((page) => __async(this, null, function* () { | ||
const resp = yield this.getPage(page, config, response.data.limit); | ||
const resp = yield this.getPage(page, config, limit); | ||
return resp.data[key] || []; | ||
@@ -454,0 +457,0 @@ })) |
{ | ||
"name": "@availity/api-axios", | ||
"version": "9.0.4", | ||
"version": "9.0.5", | ||
"description": "Wrappers for axios designed to work with the Availity portal", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -290,3 +290,5 @@ import qs from 'qs'; | ||
const key = this.getQueryResultKey(response.data); | ||
const totalPages = Math.ceil(response.data.totalCount / response.data.limit); | ||
const length = response.data?.length; | ||
const limit = response.data.limit || length <= response.data.totalCount ? Math.min(length, response.data.totalCount) || 1 : 1; | ||
const totalPages = Math.ceil(response.data.totalCount / limit); | ||
const result = response.data[key] || []; | ||
@@ -302,3 +304,3 @@ | ||
otherPages.map(async (page) => { | ||
const resp = await this.getPage(page, config, response.data.limit); | ||
const resp = await this.getPage(page, config, limit); | ||
return resp.data[key] || []; | ||
@@ -305,0 +307,0 @@ }) |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
200903
619
4319