diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 08e4428..01ff4cc 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -13,6 +13,8 @@ jobs:
BW_ACCOUNT_ID: ${{ secrets.BW_ACCOUNT_ID }}
BW_USERNAME: ${{ secrets.BW_USERNAME }}
BW_PASSWORD: ${{ secrets.BW_PASSWORD }}
+ BW_CLIENT_ID: ${{ secrets.BW_CLIENT_ID }}
+ BW_CLIENT_SECRET: ${{ secrets.BW_CLIENT_SECRET }}
BW_USERNAME_FORBIDDEN: ${{ secrets.BW_USERNAME_FORBIDDEN }}
BW_PASSWORD_FORBIDDEN: ${{ secrets.BW_PASSWORD_FORBIDDEN }}
BW_VOICE_APPLICATION_ID: ${{ secrets.BW_VOICE_APPLICATION_ID }}
@@ -46,7 +48,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v6
with:
- node-version: 22
+ node-version: 24
registry-url: "https://registry.npmjs.org"
- name: Set OpenAPI Generator Version
diff --git a/.github/workflows/test-pr.yml b/.github/workflows/test-pr.yml
index 3318829..4af736c 100644
--- a/.github/workflows/test-pr.yml
+++ b/.github/workflows/test-pr.yml
@@ -13,6 +13,8 @@ env:
BW_ACCOUNT_ID: ${{ secrets.BW_ACCOUNT_ID }}
BW_USERNAME: ${{ secrets.BW_USERNAME }}
BW_PASSWORD: ${{ secrets.BW_PASSWORD }}
+ BW_CLIENT_ID: ${{ secrets.BW_CLIENT_ID }}
+ BW_CLIENT_SECRET: ${{ secrets.BW_CLIENT_SECRET }}
BW_USERNAME_FORBIDDEN: ${{ secrets.BW_USERNAME_FORBIDDEN }}
BW_PASSWORD_FORBIDDEN: ${{ secrets.BW_PASSWORD_FORBIDDEN }}
BW_VOICE_APPLICATION_ID: ${{ secrets.BW_VOICE_APPLICATION_ID }}
@@ -32,7 +34,7 @@ jobs:
strategy:
matrix:
os: [windows-2022, windows-2025, ubuntu-22.04, ubuntu-24.04]
- node-version: [18, 20, 22, 24]
+ node-version: [20, 22, 24]
fail-fast: false
steps:
- name: Checkout
diff --git a/.github/workflows/test-smoke.yml b/.github/workflows/test-smoke.yml
index d09ff6a..248247c 100644
--- a/.github/workflows/test-smoke.yml
+++ b/.github/workflows/test-smoke.yml
@@ -15,6 +15,8 @@ concurrency:
env:
BW_USERNAME: ${{ secrets.BW_USERNAME }}
BW_PASSWORD: ${{ secrets.BW_PASSWORD }}
+ BW_CLIENT_ID: ${{ secrets.BW_CLIENT_ID }}
+ BW_CLIENT_SECRET: ${{ secrets.BW_CLIENT_SECRET }}
BW_USERNAME_FORBIDDEN: ${{ secrets.BW_USERNAME_FORBIDDEN }}
BW_PASSWORD_FORBIDDEN: ${{ secrets.BW_PASSWORD_FORBIDDEN }}
USER_NUMBER: ${{ secrets.USER_NUMBER }}
@@ -40,7 +42,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v6
with:
- node-version: 22
+ node-version: 24
- name: Install Packages and Test
run: |
@@ -67,7 +69,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v6
with:
- node-version: 22
+ node-version: 24
- name: Install Packages and Test
run: |
diff --git a/README.md b/README.md
index 239dfbe..578938a 100644
--- a/README.md
+++ b/README.md
@@ -84,8 +84,8 @@ The following is a simple example of how to use this module:
import { CallsApi, Configuration } from 'bandwidth-sdk';
const config = new Configuration({
- username: BW_USERNAME,
- password: BW_PASSWORD
+ clientId: BW_CLIENT_ID,
+ clientSecret: BW_CLIENT_SECRET
});
const callsApi = new CallsApi(config);
@@ -346,3 +346,11 @@ Authentication schemes defined for the API:
- **Type**: HTTP basic authentication
+
+### OAuth2
+
+- **Type**: OAuth
+- **Flow**: application
+- **Authorization URL**:
+- **Scopes**: N/A
+
diff --git a/api/calls-api.ts b/api/calls-api.ts
index 2d30644..1a62df5 100644
--- a/api/calls-api.ts
+++ b/api/calls-api.ts
@@ -66,6 +66,10 @@ export const CallsApiAxiosParamCreator = function (configuration?: Configuration
// http basic authentication required
setBasicAuthToObject(localVarRequestOptions, configuration)
+ // authentication OAuth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
+
localVarHeaderParameter['Content-Type'] = 'application/json';
@@ -111,6 +115,10 @@ export const CallsApiAxiosParamCreator = function (configuration?: Configuration
// http basic authentication required
setBasicAuthToObject(localVarRequestOptions, configuration)
+ // authentication OAuth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -156,6 +164,10 @@ export const CallsApiAxiosParamCreator = function (configuration?: Configuration
// http basic authentication required
setBasicAuthToObject(localVarRequestOptions, configuration)
+ // authentication OAuth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
+
if (to !== undefined) {
localVarQueryParameter['to'] = to;
}
@@ -229,6 +241,10 @@ export const CallsApiAxiosParamCreator = function (configuration?: Configuration
// http basic authentication required
setBasicAuthToObject(localVarRequestOptions, configuration)
+ // authentication OAuth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
+
localVarHeaderParameter['Content-Type'] = 'application/json';
@@ -277,6 +293,10 @@ export const CallsApiAxiosParamCreator = function (configuration?: Configuration
// http basic authentication required
setBasicAuthToObject(localVarRequestOptions, configuration)
+ // authentication OAuth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
+
localVarHeaderParameter['Content-Type'] = 'application/xml';
diff --git a/api/conferences-api.ts b/api/conferences-api.ts
index 7bceb85..54628cc 100644
--- a/api/conferences-api.ts
+++ b/api/conferences-api.ts
@@ -73,6 +73,10 @@ export const ConferencesApiAxiosParamCreator = function (configuration?: Configu
// http basic authentication required
setBasicAuthToObject(localVarRequestOptions, configuration)
+ // authentication OAuth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -115,6 +119,10 @@ export const ConferencesApiAxiosParamCreator = function (configuration?: Configu
// http basic authentication required
setBasicAuthToObject(localVarRequestOptions, configuration)
+ // authentication OAuth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -161,6 +169,10 @@ export const ConferencesApiAxiosParamCreator = function (configuration?: Configu
// http basic authentication required
setBasicAuthToObject(localVarRequestOptions, configuration)
+ // authentication OAuth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -207,6 +219,10 @@ export const ConferencesApiAxiosParamCreator = function (configuration?: Configu
// http basic authentication required
setBasicAuthToObject(localVarRequestOptions, configuration)
+ // authentication OAuth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -249,6 +265,10 @@ export const ConferencesApiAxiosParamCreator = function (configuration?: Configu
// http basic authentication required
setBasicAuthToObject(localVarRequestOptions, configuration)
+ // authentication OAuth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -292,6 +312,10 @@ export const ConferencesApiAxiosParamCreator = function (configuration?: Configu
// http basic authentication required
setBasicAuthToObject(localVarRequestOptions, configuration)
+ // authentication OAuth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
+
if (name !== undefined) {
localVarQueryParameter['name'] = name;
}
@@ -357,6 +381,10 @@ export const ConferencesApiAxiosParamCreator = function (configuration?: Configu
// http basic authentication required
setBasicAuthToObject(localVarRequestOptions, configuration)
+ // authentication OAuth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
+
localVarHeaderParameter['Content-Type'] = 'application/json';
@@ -405,6 +433,10 @@ export const ConferencesApiAxiosParamCreator = function (configuration?: Configu
// http basic authentication required
setBasicAuthToObject(localVarRequestOptions, configuration)
+ // authentication OAuth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
+
localVarHeaderParameter['Content-Type'] = 'application/xml';
@@ -457,6 +489,10 @@ export const ConferencesApiAxiosParamCreator = function (configuration?: Configu
// http basic authentication required
setBasicAuthToObject(localVarRequestOptions, configuration)
+ // authentication OAuth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
+
localVarHeaderParameter['Content-Type'] = 'application/json';
diff --git a/api/media-api.ts b/api/media-api.ts
index be90feb..33cfe6c 100644
--- a/api/media-api.ts
+++ b/api/media-api.ts
@@ -61,6 +61,10 @@ export const MediaApiAxiosParamCreator = function (configuration?: Configuration
// http basic authentication required
setBasicAuthToObject(localVarRequestOptions, configuration)
+ // authentication OAuth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -103,6 +107,10 @@ export const MediaApiAxiosParamCreator = function (configuration?: Configuration
// http basic authentication required
setBasicAuthToObject(localVarRequestOptions, configuration)
+ // authentication OAuth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -142,6 +150,10 @@ export const MediaApiAxiosParamCreator = function (configuration?: Configuration
// http basic authentication required
setBasicAuthToObject(localVarRequestOptions, configuration)
+ // authentication OAuth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
+
if (continuationToken != null) {
@@ -192,6 +204,10 @@ export const MediaApiAxiosParamCreator = function (configuration?: Configuration
// http basic authentication required
setBasicAuthToObject(localVarRequestOptions, configuration)
+ // authentication OAuth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
+
localVarHeaderParameter['Content-Type'] = 'application/json';
diff --git a/api/messages-api.ts b/api/messages-api.ts
index df5e412..2b00916 100644
--- a/api/messages-api.ts
+++ b/api/messages-api.ts
@@ -74,6 +74,10 @@ export const MessagesApiAxiosParamCreator = function (configuration?: Configurat
// http basic authentication required
setBasicAuthToObject(localVarRequestOptions, configuration)
+ // authentication OAuth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
+
localVarHeaderParameter['Content-Type'] = 'application/json';
@@ -142,6 +146,10 @@ export const MessagesApiAxiosParamCreator = function (configuration?: Configurat
// http basic authentication required
setBasicAuthToObject(localVarRequestOptions, configuration)
+ // authentication OAuth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
+
if (messageId !== undefined) {
localVarQueryParameter['messageId'] = messageId;
}
diff --git a/api/mfaapi.ts b/api/mfaapi.ts
index dafb8ec..22c2a75 100644
--- a/api/mfaapi.ts
+++ b/api/mfaapi.ts
@@ -72,6 +72,10 @@ export const MFAApiAxiosParamCreator = function (configuration?: Configuration)
// http basic authentication required
setBasicAuthToObject(localVarRequestOptions, configuration)
+ // authentication OAuth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
+
localVarHeaderParameter['Content-Type'] = 'application/json';
@@ -116,6 +120,10 @@ export const MFAApiAxiosParamCreator = function (configuration?: Configuration)
// http basic authentication required
setBasicAuthToObject(localVarRequestOptions, configuration)
+ // authentication OAuth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
+
localVarHeaderParameter['Content-Type'] = 'application/json';
@@ -160,6 +168,10 @@ export const MFAApiAxiosParamCreator = function (configuration?: Configuration)
// http basic authentication required
setBasicAuthToObject(localVarRequestOptions, configuration)
+ // authentication OAuth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
+
localVarHeaderParameter['Content-Type'] = 'application/json';
diff --git a/api/multi-channel-api.ts b/api/multi-channel-api.ts
index ccfab14..d749461 100644
--- a/api/multi-channel-api.ts
+++ b/api/multi-channel-api.ts
@@ -62,6 +62,10 @@ export const MultiChannelApiAxiosParamCreator = function (configuration?: Config
// http basic authentication required
setBasicAuthToObject(localVarRequestOptions, configuration)
+ // authentication OAuth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
+
localVarHeaderParameter['Content-Type'] = 'application/json';
diff --git a/api/phone-number-lookup-api.ts b/api/phone-number-lookup-api.ts
index 8a16272..1876d0c 100644
--- a/api/phone-number-lookup-api.ts
+++ b/api/phone-number-lookup-api.ts
@@ -68,6 +68,10 @@ export const PhoneNumberLookupApiAxiosParamCreator = function (configuration?: C
// http basic authentication required
setBasicAuthToObject(localVarRequestOptions, configuration)
+ // authentication OAuth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
+
localVarHeaderParameter['Content-Type'] = 'application/json';
@@ -112,6 +116,10 @@ export const PhoneNumberLookupApiAxiosParamCreator = function (configuration?: C
// http basic authentication required
setBasicAuthToObject(localVarRequestOptions, configuration)
+ // authentication OAuth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
+
localVarHeaderParameter['Content-Type'] = 'application/json';
@@ -157,6 +165,10 @@ export const PhoneNumberLookupApiAxiosParamCreator = function (configuration?: C
// http basic authentication required
setBasicAuthToObject(localVarRequestOptions, configuration)
+ // authentication OAuth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
diff --git a/api/recordings-api.ts b/api/recordings-api.ts
index 1fcec47..fd45abe 100644
--- a/api/recordings-api.ts
+++ b/api/recordings-api.ts
@@ -71,6 +71,10 @@ export const RecordingsApiAxiosParamCreator = function (configuration?: Configur
// http basic authentication required
setBasicAuthToObject(localVarRequestOptions, configuration)
+ // authentication OAuth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -117,6 +121,10 @@ export const RecordingsApiAxiosParamCreator = function (configuration?: Configur
// http basic authentication required
setBasicAuthToObject(localVarRequestOptions, configuration)
+ // authentication OAuth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -163,6 +171,10 @@ export const RecordingsApiAxiosParamCreator = function (configuration?: Configur
// http basic authentication required
setBasicAuthToObject(localVarRequestOptions, configuration)
+ // authentication OAuth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -209,6 +221,10 @@ export const RecordingsApiAxiosParamCreator = function (configuration?: Configur
// http basic authentication required
setBasicAuthToObject(localVarRequestOptions, configuration)
+ // authentication OAuth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -255,6 +271,10 @@ export const RecordingsApiAxiosParamCreator = function (configuration?: Configur
// http basic authentication required
setBasicAuthToObject(localVarRequestOptions, configuration)
+ // authentication OAuth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -301,6 +321,10 @@ export const RecordingsApiAxiosParamCreator = function (configuration?: Configur
// http basic authentication required
setBasicAuthToObject(localVarRequestOptions, configuration)
+ // authentication OAuth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -343,6 +367,10 @@ export const RecordingsApiAxiosParamCreator = function (configuration?: Configur
// http basic authentication required
setBasicAuthToObject(localVarRequestOptions, configuration)
+ // authentication OAuth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
+
if (to !== undefined) {
localVarQueryParameter['to'] = to;
}
@@ -401,6 +429,10 @@ export const RecordingsApiAxiosParamCreator = function (configuration?: Configur
// http basic authentication required
setBasicAuthToObject(localVarRequestOptions, configuration)
+ // authentication OAuth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -450,6 +482,10 @@ export const RecordingsApiAxiosParamCreator = function (configuration?: Configur
// http basic authentication required
setBasicAuthToObject(localVarRequestOptions, configuration)
+ // authentication OAuth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
+
localVarHeaderParameter['Content-Type'] = 'application/json';
@@ -498,6 +534,10 @@ export const RecordingsApiAxiosParamCreator = function (configuration?: Configur
// http basic authentication required
setBasicAuthToObject(localVarRequestOptions, configuration)
+ // authentication OAuth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
+
localVarHeaderParameter['Content-Type'] = 'application/json';
diff --git a/api/statistics-api.ts b/api/statistics-api.ts
index af5250c..a1c1756 100644
--- a/api/statistics-api.ts
+++ b/api/statistics-api.ts
@@ -57,6 +57,10 @@ export const StatisticsApiAxiosParamCreator = function (configuration?: Configur
// http basic authentication required
setBasicAuthToObject(localVarRequestOptions, configuration)
+ // authentication OAuth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
diff --git a/api/toll-free-verification-api.ts b/api/toll-free-verification-api.ts
index e681a87..3dd071f 100644
--- a/api/toll-free-verification-api.ts
+++ b/api/toll-free-verification-api.ts
@@ -70,6 +70,10 @@ export const TollFreeVerificationApiAxiosParamCreator = function (configuration?
// http basic authentication required
setBasicAuthToObject(localVarRequestOptions, configuration)
+ // authentication OAuth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
+
localVarHeaderParameter['Content-Type'] = 'application/json';
@@ -115,6 +119,10 @@ export const TollFreeVerificationApiAxiosParamCreator = function (configuration?
// http basic authentication required
setBasicAuthToObject(localVarRequestOptions, configuration)
+ // authentication OAuth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -157,6 +165,10 @@ export const TollFreeVerificationApiAxiosParamCreator = function (configuration?
// http basic authentication required
setBasicAuthToObject(localVarRequestOptions, configuration)
+ // authentication OAuth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -199,6 +211,10 @@ export const TollFreeVerificationApiAxiosParamCreator = function (configuration?
// http basic authentication required
setBasicAuthToObject(localVarRequestOptions, configuration)
+ // authentication OAuth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -233,6 +249,10 @@ export const TollFreeVerificationApiAxiosParamCreator = function (configuration?
// http basic authentication required
setBasicAuthToObject(localVarRequestOptions, configuration)
+ // authentication OAuth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -271,6 +291,10 @@ export const TollFreeVerificationApiAxiosParamCreator = function (configuration?
// http basic authentication required
setBasicAuthToObject(localVarRequestOptions, configuration)
+ // authentication OAuth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -312,6 +336,10 @@ export const TollFreeVerificationApiAxiosParamCreator = function (configuration?
// http basic authentication required
setBasicAuthToObject(localVarRequestOptions, configuration)
+ // authentication OAuth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
+
localVarHeaderParameter['Content-Type'] = 'application/json';
@@ -360,6 +388,10 @@ export const TollFreeVerificationApiAxiosParamCreator = function (configuration?
// http basic authentication required
setBasicAuthToObject(localVarRequestOptions, configuration)
+ // authentication OAuth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
+
localVarHeaderParameter['Content-Type'] = 'application/json';
@@ -408,6 +440,10 @@ export const TollFreeVerificationApiAxiosParamCreator = function (configuration?
// http basic authentication required
setBasicAuthToObject(localVarRequestOptions, configuration)
+ // authentication OAuth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
+
localVarHeaderParameter['Content-Type'] = 'application/json';
diff --git a/api/transcriptions-api.ts b/api/transcriptions-api.ts
index adf0251..e14c0bb 100644
--- a/api/transcriptions-api.ts
+++ b/api/transcriptions-api.ts
@@ -67,6 +67,10 @@ export const TranscriptionsApiAxiosParamCreator = function (configuration?: Conf
// http basic authentication required
setBasicAuthToObject(localVarRequestOptions, configuration)
+ // authentication OAuth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -113,6 +117,10 @@ export const TranscriptionsApiAxiosParamCreator = function (configuration?: Conf
// http basic authentication required
setBasicAuthToObject(localVarRequestOptions, configuration)
+ // authentication OAuth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -155,6 +163,10 @@ export const TranscriptionsApiAxiosParamCreator = function (configuration?: Conf
// http basic authentication required
setBasicAuthToObject(localVarRequestOptions, configuration)
+ // authentication OAuth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
diff --git a/bandwidth.yml b/bandwidth.yml
index 6ee15ae..9ab77fd 100644
--- a/bandwidth.yml
+++ b/bandwidth.yml
@@ -9,6 +9,7 @@ info:
version: 1.0.0
security:
- Basic: []
+ - OAuth2: []
tags:
- name: Messages
- name: Media
@@ -8427,6 +8428,12 @@ components:
- Example: `Authorization: Basic ZGVtbZpwQDU1dzByZA==`
+ OAuth2:
+ type: oauth2
+ flows:
+ clientCredentials:
+ tokenUrl: https://api.bandwidth.com/api/v1/oauth2/token
+ scopes: {}
callbacks:
inboundCallback:
'{inboundCallbackUrl}':
diff --git a/common.ts b/common.ts
index 1024bac..f70fbcd 100644
--- a/common.ts
+++ b/common.ts
@@ -58,7 +58,9 @@ export const setOAuthToObject = async function (object: any, name: string, scope
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
? await configuration.accessToken(name, scopes)
: await configuration.accessToken;
- object["Authorization"] = "Bearer " + localVarAccessTokenValue;
+ if (localVarAccessTokenValue) {
+ object["Authorization"] = "Bearer " + localVarAccessTokenValue;
+ }
}
}
diff --git a/configuration.ts b/configuration.ts
index 25df277..5dc9caa 100644
--- a/configuration.ts
+++ b/configuration.ts
@@ -11,6 +11,8 @@
* Do not edit the class manually.
*/
+import globalAxios from 'axios';
+
interface AWSv4Configuration {
options?: {
region?: string
@@ -27,6 +29,8 @@ export interface ConfigurationParameters {
apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise);
username?: string;
password?: string;
+ clientId?: string;
+ clientSecret?: string;
accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise);
awsv4?: AWSv4Configuration;
basePath?: string;
@@ -49,12 +53,28 @@ export class Configuration {
* parameter for basic security
*/
password?: string;
+ /**
+ * parameter for client ID
+ */
+ clientId?: string;
+ /**
+ * parameter for client secret
+ */
+ clientSecret?: string;
/**
* parameter for oauth2 security
* @param name security name
* @param scopes oauth2 scope
*/
accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise);
+ /**
+ * temporary access token storage
+ */
+ tempAccessToken?: string;
+ /**
+ * when the temporary access token expires
+ */
+ tempAccessTokenExpiration?: number;
/**
* parameter for aws4 signature security
* @param {Object} AWS4Signature - AWS4 Signature security
@@ -91,7 +111,29 @@ export class Configuration {
this.apiKey = param.apiKey;
this.username = param.username;
this.password = param.password;
- this.accessToken = param.accessToken;
+ this.clientId = param.clientId;
+ this.clientSecret = param.clientSecret;
+ this.tempAccessToken;
+ this.tempAccessTokenExpiration;
+ this.accessToken = param.accessToken ?? (async (name, scopes) => {
+ const now = Math.floor(Date.now() / 1000);
+ if (this.tempAccessToken && (!this.tempAccessTokenExpiration || this.tempAccessTokenExpiration > now + 60)) {
+ return this.tempAccessToken;
+ } else if (this.clientId && this.clientSecret) {
+ const tokenRequestArgs = {
+ method: 'POST',
+ headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
+ auth: { username: this.clientId || '', password: this.clientSecret || '' },
+ data: 'grant_type=client_credentials',
+ url: 'https://api.bandwidth.com/api/v1/oauth2/token'
+ };
+ const response = await globalAxios.request(tokenRequestArgs);
+ this.tempAccessToken = response.data.access_token;
+ this.tempAccessTokenExpiration = now + response.data.expires_in;
+ return this.tempAccessToken!;
+ }
+ return undefined;
+ });
this.awsv4 = param.awsv4;
this.basePath = param.basePath;
this.serverIndex = param.serverIndex;
diff --git a/custom_templates/README.mustache b/custom_templates/README.mustache
index 95dd080..0fa14b9 100644
--- a/custom_templates/README.mustache
+++ b/custom_templates/README.mustache
@@ -84,8 +84,8 @@ The following is a simple example of how to use this module:
import { CallsApi, Configuration } from '{{npmName}}';
const config = new Configuration({
- username: BW_USERNAME,
- password: BW_PASSWORD
+ clientId: BW_CLIENT_ID,
+ clientSecret: BW_CLIENT_SECRET
});
const callsApi = new CallsApi(config);
diff --git a/custom_templates/common.mustache b/custom_templates/common.mustache
index 61054cc..7fde0ae 100644
--- a/custom_templates/common.mustache
+++ b/custom_templates/common.mustache
@@ -54,7 +54,9 @@ export const setOAuthToObject = async function (object: any, name: string, scope
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
? await configuration.accessToken(name, scopes)
: await configuration.accessToken;
- object["Authorization"] = "Bearer " + localVarAccessTokenValue;
+ if (localVarAccessTokenValue) {
+ object["Authorization"] = "Bearer " + localVarAccessTokenValue;
+ }
}
}
diff --git a/custom_templates/configuration.mustache b/custom_templates/configuration.mustache
index 1f64ab5..0a89e94 100644
--- a/custom_templates/configuration.mustache
+++ b/custom_templates/configuration.mustache
@@ -1,6 +1,8 @@
/* tslint:disable */
{{>licenseInfo}}
+import globalAxios from 'axios';
+
interface AWSv4Configuration {
options?: {
region?: string
@@ -17,6 +19,8 @@ export interface ConfigurationParameters {
apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise);
username?: string;
password?: string;
+ clientId?: string;
+ clientSecret?: string;
accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise);
awsv4?: AWSv4Configuration;
basePath?: string;
@@ -39,12 +43,28 @@ export class Configuration {
* parameter for basic security
*/
password?: string;
+ /**
+ * parameter for client ID
+ */
+ clientId?: string;
+ /**
+ * parameter for client secret
+ */
+ clientSecret?: string;
/**
* parameter for oauth2 security
* @param name security name
* @param scopes oauth2 scope
*/
accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise);
+ /**
+ * temporary access token storage
+ */
+ tempAccessToken?: string;
+ /**
+ * when the temporary access token expires
+ */
+ tempAccessTokenExpiration?: number;
/**
* parameter for aws4 signature security
* @param {Object} AWS4Signature - AWS4 Signature security
@@ -81,7 +101,29 @@ export class Configuration {
this.apiKey = param.apiKey;
this.username = param.username;
this.password = param.password;
- this.accessToken = param.accessToken;
+ this.clientId = param.clientId;
+ this.clientSecret = param.clientSecret;
+ this.tempAccessToken;
+ this.tempAccessTokenExpiration;
+ this.accessToken = param.accessToken ?? (async (name, scopes) => {
+ const now = Math.floor(Date.now() / 1000);
+ if (this.tempAccessToken && (!this.tempAccessTokenExpiration || this.tempAccessTokenExpiration > now + 60)) {
+ return this.tempAccessToken;
+ } else if (this.clientId && this.clientSecret) {
+ const tokenRequestArgs = {
+ method: 'POST',
+ headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
+ auth: { username: this.clientId || '', password: this.clientSecret || '' },
+ data: 'grant_type=client_credentials',
+ url: 'https://api.bandwidth.com/api/v1/oauth2/token'
+ };
+ const response = await globalAxios.request(tokenRequestArgs);
+ this.tempAccessToken = response.data.access_token;
+ this.tempAccessTokenExpiration = now + response.data.expires_in;
+ return this.tempAccessToken!;
+ }
+ return undefined;
+ });
this.awsv4 = param.awsv4;
this.basePath = param.basePath;
this.serverIndex = param.serverIndex;
diff --git a/custom_templates/package.mustache b/custom_templates/package.mustache
index f1a6d1e..c4094d4 100644
--- a/custom_templates/package.mustache
+++ b/custom_templates/package.mustache
@@ -28,9 +28,12 @@
"test-smoke": "jest --coverage --detectOpenHandles --testPathPattern=tests/smoke",
"test": "jest --coverage --detectOpenHandles"
},
+ "engines": {
+ "node": ">=20.0.0"
+ },
"dependencies": {
"axios": "^1.7.2",
- "xmlbuilder2": "^3.1.1"
+ "xmlbuilder2": "^4.0.0"
},
"devDependencies": {
"@types/jest": "^29.5.12",
@@ -38,7 +41,7 @@
"jest": "^29.7.0",
"jest-extended": "^4.0.2",
"ts-jest": "^29.1.1",
- "typescript": "^5.0"
+ "typescript": "^5.9.0"
}{{#npmRepository}},{{/npmRepository}}
{{#npmRepository}}
"publishConfig": {
diff --git a/docs/CallsApi.md b/docs/CallsApi.md
index 2763650..1c859b0 100644
--- a/docs/CallsApi.md
+++ b/docs/CallsApi.md
@@ -50,7 +50,7 @@ const { status, data } = await apiInstance.createCall(
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -112,7 +112,7 @@ const { status, data } = await apiInstance.getCallState(
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -192,7 +192,7 @@ const { status, data } = await apiInstance.listCalls(
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -258,7 +258,7 @@ void (empty response body)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -324,7 +324,7 @@ void (empty response body)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
diff --git a/docs/ConferencesApi.md b/docs/ConferencesApi.md
index 0e651cc..9a16fda 100644
--- a/docs/ConferencesApi.md
+++ b/docs/ConferencesApi.md
@@ -56,7 +56,7 @@ const { status, data } = await apiInstance.downloadConferenceRecording(
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -118,7 +118,7 @@ const { status, data } = await apiInstance.getConference(
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -183,7 +183,7 @@ const { status, data } = await apiInstance.getConferenceMember(
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -248,7 +248,7 @@ const { status, data } = await apiInstance.getConferenceRecording(
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -310,7 +310,7 @@ const { status, data } = await apiInstance.listConferenceRecordings(
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -384,7 +384,7 @@ const { status, data } = await apiInstance.listConferences(
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -450,7 +450,7 @@ void (empty response body)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -515,7 +515,7 @@ void (empty response body)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -584,7 +584,7 @@ void (empty response body)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
diff --git a/docs/MFAApi.md b/docs/MFAApi.md
index 4b58380..97e0004 100644
--- a/docs/MFAApi.md
+++ b/docs/MFAApi.md
@@ -48,7 +48,7 @@ const { status, data } = await apiInstance.generateMessagingCode(
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -107,7 +107,7 @@ const { status, data } = await apiInstance.generateVoiceCode(
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -166,7 +166,7 @@ const { status, data } = await apiInstance.verifyCode(
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
diff --git a/docs/MediaApi.md b/docs/MediaApi.md
index c4e26c7..49f8a5b 100644
--- a/docs/MediaApi.md
+++ b/docs/MediaApi.md
@@ -48,7 +48,7 @@ void (empty response body)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -110,7 +110,7 @@ const { status, data } = await apiInstance.getMedia(
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -172,7 +172,7 @@ const { status, data } = await apiInstance.listMedia(
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -243,7 +243,7 @@ void (empty response body)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
diff --git a/docs/MessagesApi.md b/docs/MessagesApi.md
index 517a6c7..0a01251 100644
--- a/docs/MessagesApi.md
+++ b/docs/MessagesApi.md
@@ -47,7 +47,7 @@ const { status, data } = await apiInstance.createMessage(
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -188,7 +188,7 @@ const { status, data } = await apiInstance.listMessages(
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
diff --git a/docs/MultiChannelApi.md b/docs/MultiChannelApi.md
index 8c9fce9..38ccffd 100644
--- a/docs/MultiChannelApi.md
+++ b/docs/MultiChannelApi.md
@@ -46,7 +46,7 @@ const { status, data } = await apiInstance.createMultiChannelMessage(
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
diff --git a/docs/PhoneNumberLookupApi.md b/docs/PhoneNumberLookupApi.md
index e695efe..66cfbed 100644
--- a/docs/PhoneNumberLookupApi.md
+++ b/docs/PhoneNumberLookupApi.md
@@ -48,7 +48,7 @@ const { status, data } = await apiInstance.createAsyncBulkLookup(
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -104,7 +104,7 @@ const { status, data } = await apiInstance.createSyncLookup(
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -159,7 +159,7 @@ const { status, data } = await apiInstance.getAsyncBulkLookup(
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
diff --git a/docs/RecordingsApi.md b/docs/RecordingsApi.md
index 6a741a5..4a844ac 100644
--- a/docs/RecordingsApi.md
+++ b/docs/RecordingsApi.md
@@ -57,7 +57,7 @@ void (empty response body)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -122,7 +122,7 @@ void (empty response body)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -187,7 +187,7 @@ void (empty response body)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -252,7 +252,7 @@ const { status, data } = await apiInstance.downloadCallRecording(
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -317,7 +317,7 @@ const { status, data } = await apiInstance.getCallRecording(
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -382,7 +382,7 @@ const { status, data } = await apiInstance.getRecordingTranscription(
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -453,7 +453,7 @@ const { status, data } = await apiInstance.listAccountCallRecordings(
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -515,7 +515,7 @@ const { status, data } = await apiInstance.listCallRecordings(
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -584,7 +584,7 @@ void (empty response body)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -650,7 +650,7 @@ void (empty response body)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
diff --git a/docs/StatisticsApi.md b/docs/StatisticsApi.md
index fc9a069..52cb384 100644
--- a/docs/StatisticsApi.md
+++ b/docs/StatisticsApi.md
@@ -42,7 +42,7 @@ const { status, data } = await apiInstance.getStatistics(
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
diff --git a/docs/TollFreeVerificationApi.md b/docs/TollFreeVerificationApi.md
index c4f0e6a..573946b 100644
--- a/docs/TollFreeVerificationApi.md
+++ b/docs/TollFreeVerificationApi.md
@@ -54,7 +54,7 @@ const { status, data } = await apiInstance.createWebhookSubscription(
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -116,7 +116,7 @@ void (empty response body)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -178,7 +178,7 @@ void (empty response body)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -240,7 +240,7 @@ const { status, data } = await apiInstance.getTollFreeVerificationStatus(
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -292,7 +292,7 @@ This endpoint does not have any parameters.
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -351,7 +351,7 @@ const { status, data } = await apiInstance.listWebhookSubscriptions(
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -413,7 +413,7 @@ void (empty response body)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -478,7 +478,7 @@ void (empty response body)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -543,7 +543,7 @@ const { status, data } = await apiInstance.updateWebhookSubscription(
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
diff --git a/docs/TranscriptionsApi.md b/docs/TranscriptionsApi.md
index fef6abf..2f012e5 100644
--- a/docs/TranscriptionsApi.md
+++ b/docs/TranscriptionsApi.md
@@ -50,7 +50,7 @@ void (empty response body)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -115,7 +115,7 @@ const { status, data } = await apiInstance.getRealTimeTranscription(
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -177,7 +177,7 @@ const { status, data } = await apiInstance.listRealTimeTranscriptions(
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
diff --git a/jest.config.js b/jest.config.js
index 1f10414..e694c84 100644
--- a/jest.config.js
+++ b/jest.config.js
@@ -6,6 +6,8 @@ module.exports = {
globals: {
'BW_USERNAME': process.env.BW_USERNAME,
'BW_PASSWORD': process.env.BW_PASSWORD,
+ 'BW_CLIENT_ID': process.env.BW_CLIENT_ID,
+ 'BW_CLIENT_SECRET': process.env.BW_CLIENT_SECRET,
'BW_ACCOUNT_ID': process.env.BW_ACCOUNT_ID,
'BW_NUMBER': process.env.BW_NUMBER,
'USER_NUMBER': process.env.USER_NUMBER,
diff --git a/package.json b/package.json
index 10ff4cc..a55f66b 100644
--- a/package.json
+++ b/package.json
@@ -24,9 +24,12 @@
"test-smoke": "jest --coverage --detectOpenHandles --testPathPattern=tests/smoke",
"test": "jest --coverage --detectOpenHandles"
},
+ "engines": {
+ "node": ">=20.0.0"
+ },
"dependencies": {
"axios": "^1.7.2",
- "xmlbuilder2": "^3.1.1"
+ "xmlbuilder2": "^4.0.0"
},
"devDependencies": {
"@types/jest": "^29.5.12",
@@ -34,6 +37,6 @@
"jest": "^29.7.0",
"jest-extended": "^4.0.2",
"ts-jest": "^29.1.1",
- "typescript": "^5.0"
+ "typescript": "^5.9.0"
}
}
diff --git a/tests/smoke/bxml.test.ts b/tests/smoke/bxml.test.ts
index e7f9e7c..feaa610 100644
--- a/tests/smoke/bxml.test.ts
+++ b/tests/smoke/bxml.test.ts
@@ -25,7 +25,10 @@ import { sleep, createMantecaCall, cleanupCalls } from '../callUtils';
describe('BXML Integration Tests', () => {
jest.setTimeout(20000);
- const config = new Configuration({username: BW_USERNAME, password: BW_PASSWORD});
+ const config = new Configuration({
+ clientId: BW_CLIENT_ID,
+ clientSecret: BW_CLIENT_SECRET
+ });
const callsApi = new CallsApi(config);
let activeCalls: string[] = [];
diff --git a/tests/smoke/calls-api.test.ts b/tests/smoke/calls-api.test.ts
index 1461083..a2084b6 100644
--- a/tests/smoke/calls-api.test.ts
+++ b/tests/smoke/calls-api.test.ts
@@ -13,7 +13,10 @@ import { createMantecaCall, sleep, cleanupCalls } from '../callUtils';
describe('CallsApi', () => {
jest.setTimeout(45000);
- const config = new Configuration({username: BW_USERNAME, password: BW_PASSWORD});
+ const config = new Configuration({
+ clientId: BW_CLIENT_ID,
+ clientSecret: BW_CLIENT_SECRET
+ });
const callsApi = new CallsApi(config);
const displayName = 'NodeJS SDK';
diff --git a/tests/smoke/conferences-api.test.ts b/tests/smoke/conferences-api.test.ts
index 4741025..6f85e71 100644
--- a/tests/smoke/conferences-api.test.ts
+++ b/tests/smoke/conferences-api.test.ts
@@ -6,7 +6,10 @@ import { setupManteca, createMantecaCall, cleanupCalls, getMantecaTestStatus, sl
describe('ConferencesApi', () => {
jest.setTimeout(125000);
- const config = new Configuration({username: BW_USERNAME, password: BW_PASSWORD});
+ const config = new Configuration({
+ username: BW_USERNAME,
+ password: BW_PASSWORD
+ });
const callsApi = new CallsApi(config);
const conferencesApi = new ConferencesApi(config);
diff --git a/tests/smoke/phone-number-lookup-api.test.ts b/tests/smoke/phone-number-lookup-api.test.ts
index 9d4c8f3..f18c9dc 100644
--- a/tests/smoke/phone-number-lookup-api.test.ts
+++ b/tests/smoke/phone-number-lookup-api.test.ts
@@ -14,8 +14,8 @@ import { sleep } from '../callUtils';
describe('PhoneNumberLookupApi', () => {
jest.setTimeout(40000);
const config = new Configuration({
- username: BW_USERNAME,
- password: BW_PASSWORD
+ clientId: BW_CLIENT_ID,
+ clientSecret: BW_CLIENT_SECRET
});
const phoneNumberLookupApi = new PhoneNumberLookupApi(config);
diff --git a/tests/smoke/recordings-api.test.ts b/tests/smoke/recordings-api.test.ts
index 93c476b..daf44d6 100644
--- a/tests/smoke/recordings-api.test.ts
+++ b/tests/smoke/recordings-api.test.ts
@@ -6,7 +6,10 @@ import { getMantecaTestStatus, setupManteca, createMantecaCall, cleanupCalls, sl
describe('RecordingsApi', () => {
jest.setTimeout(240000);
- const config = new Configuration({username: BW_USERNAME, password: BW_PASSWORD});
+ const config = new Configuration({
+ clientId: BW_CLIENT_ID,
+ clientSecret: BW_CLIENT_SECRET
+ });
const callsApi = new CallsApi(config);
const recordingsApi = new RecordingsApi(config);
diff --git a/tests/smoke/statistics-api.test.ts b/tests/smoke/statistics-api.test.ts
index f1bb55d..3cad27c 100644
--- a/tests/smoke/statistics-api.test.ts
+++ b/tests/smoke/statistics-api.test.ts
@@ -3,7 +3,10 @@ import { StatisticsApi } from '../../api';
import { Configuration } from '../../configuration';
describe('StatisticsApi', () => {
- const config = new Configuration({username: BW_USERNAME, password: BW_PASSWORD});
+ const config = new Configuration({
+ clientId: BW_CLIENT_ID,
+ clientSecret: BW_CLIENT_SECRET
+ });
const statisticsApi = new StatisticsApi(config);
describe('getStatistics', () => {
diff --git a/tests/smoke/toll-free-verification-api.test.ts b/tests/smoke/toll-free-verification-api.test.ts
index d2a4d91..bdd18d1 100644
--- a/tests/smoke/toll-free-verification-api.test.ts
+++ b/tests/smoke/toll-free-verification-api.test.ts
@@ -3,7 +3,10 @@ import { TollFreeVerificationApi } from '../../api';
import { Configuration } from '../../configuration';
describe('TollFreeVerificationApi', () => {
- const config = new Configuration({username: BW_USERNAME, password: BW_PASSWORD});
+ const config = new Configuration({
+ clientId: BW_CLIENT_ID,
+ clientSecret: BW_CLIENT_SECRET
+ });
const tfvApi = new TollFreeVerificationApi(config);
describe('listTollFreeUseCases', () => {
diff --git a/tests/smoke/transcriptions-api.test.ts b/tests/smoke/transcriptions-api.test.ts
index 9f1e8bd..6be9cab 100644
--- a/tests/smoke/transcriptions-api.test.ts
+++ b/tests/smoke/transcriptions-api.test.ts
@@ -6,7 +6,10 @@ import { cleanupCalls, createMantecaCall, setupManteca, sleep } from "../callUti
describe('TranscriptionsApi', () => {
jest.setTimeout(240000);
- const config = new Configuration({username: BW_USERNAME, password: BW_PASSWORD});
+ const config = new Configuration({
+ clientId: BW_CLIENT_ID,
+ clientSecret: BW_CLIENT_SECRET
+ });
const callsApi = new CallsApi(config);
const transcriptionsApi = new TranscriptionsApi(config);