diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b0fdabcda..6ae586a6b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased](https://github.com/HubSpot/hubspot-api-nodejs/compare/14.1.2...HEAD) +## [Unreleased](https://github.com/HubSpot/hubspot-api-nodejs/compare/14.1.3...HEAD) + +## [14.1.3] - 2026-11-02 + +## Fixed + +- Fixed `oauth.v3.advancedApi.revokeToken` failing to handle an empty `200` response. ## [14.1.2] - 2026-10-28 diff --git a/codegen/oauth/v3/apis/AdvancedApi.ts b/codegen/oauth/v3/apis/AdvancedApi.ts index 0afafab340..3e7a4f3f2d 100644 --- a/codegen/oauth/v3/apis/AdvancedApi.ts +++ b/codegen/oauth/v3/apis/AdvancedApi.ts @@ -350,8 +350,11 @@ export class AdvancedApiResponseProcessor { * @params response Response returned by the server for a request to revokeToken * @throws ApiException if the response code was not in [200, 299] */ - public async revokeTokenWithHttpInfo(response: ResponseContext): Promise> { + public async revokeTokenWithHttpInfo(response: ResponseContext): Promise> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + return new HttpInfo(response.httpStatusCode, response.headers, response.body, undefined); + } if (isCodeInRange("0", response.httpStatusCode)) { const body: Error = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), @@ -362,7 +365,11 @@ export class AdvancedApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - return new HttpInfo(response.httpStatusCode, response.headers, response.body, undefined); + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); diff --git a/package-lock.json b/package-lock.json index 5a1383dea3..461a3e9a23 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@hubspot/api-client", - "version": "14.1.2", + "version": "14.1.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@hubspot/api-client", - "version": "14.1.2", + "version": "14.1.3", "license": "ISC", "dependencies": { "@types/node": "*", diff --git a/package.json b/package.json index cb7f80d557..7c34f9f3e6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@hubspot/api-client", - "version": "14.1.2", + "version": "14.1.3", "description": "NodeJS v3 [HubSpot API](https://developers.hubspot.com/docs/api/overview) SDK(Client) files", "main": "lib/index.js", "types": "lib/index.d.ts",