From 02b8ee052c786d6479148228f26b44fc7a74a6cc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 21 Nov 2025 23:45:07 +0000 Subject: [PATCH 1/2] Initial plan From 090bf9785b1286fd7f8a097809a7cb91079c06a6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 21 Nov 2025 23:51:12 +0000 Subject: [PATCH 2/2] feat: add Client export as alias to DefaultApi Add Client export as an alias to DefaultApi to fix "TypeError: Client is not a constructor" error. Users can now use either OneLoginApi.Client or OneLoginApi.DefaultApi interchangeably. Updated README with example showing both options. Co-authored-by: Subterrane <5290140+Subterrane@users.noreply.github.com> --- README.md | 5 ++++- api/apis.ts | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 94d489d..f0280a0 100644 --- a/README.md +++ b/README.md @@ -104,8 +104,11 @@ Please follow the [installation](#installation) instruction and execute the foll ```javascript var OneLoginApi = require('one_login_api'); +// You can use either Client or DefaultApi - they are aliases +var api = new OneLoginApi.Client() +// or +// var api = new OneLoginApi.DefaultApi() -var api = new OneLoginApi.DefaultApi() var authorization = "authorization_example"; // {String} var userId = 56; // {Number} Set to the id of the user. var activateFactorRequest = new OneLoginApi.ActivateFactorRequest(); // {ActivateFactorRequest} diff --git a/api/apis.ts b/api/apis.ts index 93aa662..f7cd67d 100644 --- a/api/apis.ts +++ b/api/apis.ts @@ -12,3 +12,6 @@ export class HttpError extends Error { export { RequestFile } from '../model/models'; export const APIS = [DefaultApi]; + +// Export Client as an alias to DefaultApi for better compatibility +export { DefaultApi as Client };