Skip to content

Commit 86964de

Browse files
band-swi[bot]DX-Bandwidthckoegel
authored
SWI-5869 Update SDK Based on Recent Spec Changes (#149)
* Generate SDK with OpenAPI Generator Version 7.6.0 * update test workflows * skip tests * move tests * fix test * no smoke tests for now * build? * disable smoke * pls build * update workflows and gitignore * fix unit test package * first unit tests * test fixes * regenerate tests * fixes to smoke tests * write a bunch of unit tests * update workflows * fix CallCleanup * update types and lots more unit tests * remove unused import * final unit tests * update bxml tests * fix smoke tests * update transcriptions tests * bring back smoke tests * remove matrix from smoke tests * use java 21 for tests * calls api unit tests * add other api unit tests * test formatting * switch from ArrayList to List * run prism in unit test wf * try a sleep because windows 19 is trash * use bash * SWI-5869 BXML Library Updates (#151) * move @params to avoid warnings hopefully * bxml formatting changes * add wf dispatch to test wf * not only on main * fix javadoc warnings * formatting * on main only --------- Co-authored-by: DX-Bandwidth <[email protected]> Co-authored-by: ckoegel <[email protected]> Co-authored-by: Cameron Koegel <[email protected]>
1 parent c53212a commit 86964de

File tree

205 files changed

+5176
-3687
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

205 files changed

+5176
-3687
lines changed

.github/workflows/test-pr.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Test PR
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.head_ref }}
11+
cancel-in-progress: true
12+
13+
14+
env:
15+
BW_ACCOUNT_ID: ${{ secrets.BW_ACCOUNT_ID }}
16+
BW_PASSWORD: ${{ secrets.BW_PASSWORD }}
17+
BW_USERNAME: ${{ secrets.BW_USERNAME }}
18+
BW_VOICE_APPLICATION_ID: ${{ secrets.BW_VOICE_APPLICATION_ID }}
19+
BW_MESSAGING_APPLICATION_ID: ${{ secrets.BW_MESSAGING_APPLICATION_ID }}
20+
BW_NUMBER: ${{ secrets.BW_NUMBER }}
21+
USER_NUMBER: ${{ secrets.USER_NUMBER }}
22+
BASE_CALLBACK_URL: ${{ secrets.BASE_CALLBACK_URL }}
23+
BW_USERNAME_FORBIDDEN: ${{ secrets.BW_USERNAME_FORBIDDEN }}
24+
BW_PASSWORD_FORBIDDEN: ${{ secrets.BW_PASSWORD_FORBIDDEN }}
25+
MANTECA_IDLE_NUMBER: ${{ secrets.MANTECA_IDLE_NUMBER }}
26+
MANTECA_ACTIVE_NUMBER: ${{ secrets.MANTECA_ACTIVE_NUMBER }}
27+
MANTECA_APPLICATION_ID: ${{ secrets.MANTECA_APPLICATION_ID }}
28+
MANTECA_BASE_URL: ${{ secrets.MANTECA_BASE_URL }}
29+
ATT_NUMBER: ${{ secrets.ATT_NUMBER }}
30+
T_MOBILE_NUMBER: ${{ secrets.T_MOBILE_NUMBER }}
31+
VZW_NUMBER: ${{ secrets.VZW_NUMBER }}
32+
33+
jobs:
34+
test:
35+
name: Test PR
36+
runs-on: ${{ matrix.os }}
37+
strategy:
38+
matrix:
39+
os: [windows-2022, windows-2019, ubuntu-20.04, ubuntu-22.04]
40+
java-version: ["11", "17", "21"]
41+
distribution: ["zulu", "temurin"]
42+
fail-fast: false
43+
steps:
44+
- name: Checkout
45+
uses: actions/checkout@v4
46+
47+
- name: Set up JDK
48+
uses: actions/setup-java@v4
49+
with:
50+
distribution: ${{ matrix.distribution }}
51+
java-version: ${{ matrix.java-version }}
52+
53+
- name: Build Package and Test
54+
env:
55+
JAVA_VERSION: ${{ matrix.java-version }}
56+
RUNNER_OS: ${{ matrix.os }}
57+
OPERATING_SYSTEM: ${{ matrix.os }}
58+
DISTRIBUTION: ${{ matrix.distribution }}
59+
run: |
60+
mvn -B package --file pom.xml -DskipTests
61+
npm install -g @stoplight/prism-cli
62+
prism mock ./bandwidth.yml & (sleep 3; mvn test -Punit-tests)
63+
shell: bash

.github/workflows/test-smoke.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Smoke Test
2+
3+
on:
4+
schedule:
5+
- cron: "0 4 * * *"
6+
pull_request:
7+
branches:
8+
- main
9+
paths:
10+
- "src/test/java/com/bandwidth/sdk/smoke/*"
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.head_ref }}
14+
cancel-in-progress: true
15+
16+
env:
17+
BW_ACCOUNT_ID: ${{ secrets.BW_ACCOUNT_ID }}
18+
BW_PASSWORD: ${{ secrets.BW_PASSWORD }}
19+
BW_USERNAME: ${{ secrets.BW_USERNAME }}
20+
BW_VOICE_APPLICATION_ID: ${{ secrets.BW_VOICE_APPLICATION_ID }}
21+
BW_MESSAGING_APPLICATION_ID: ${{ secrets.BW_MESSAGING_APPLICATION_ID }}
22+
BW_NUMBER: ${{ secrets.BW_NUMBER }}
23+
USER_NUMBER: ${{ secrets.USER_NUMBER }}
24+
BASE_CALLBACK_URL: ${{ secrets.BASE_CALLBACK_URL }}
25+
BW_USERNAME_FORBIDDEN: ${{ secrets.BW_USERNAME_FORBIDDEN }}
26+
BW_PASSWORD_FORBIDDEN: ${{ secrets.BW_PASSWORD_FORBIDDEN }}
27+
MANTECA_IDLE_NUMBER: ${{ secrets.MANTECA_IDLE_NUMBER }}
28+
MANTECA_ACTIVE_NUMBER: ${{ secrets.MANTECA_ACTIVE_NUMBER }}
29+
MANTECA_APPLICATION_ID: ${{ secrets.MANTECA_APPLICATION_ID }}
30+
MANTECA_BASE_URL: ${{ secrets.MANTECA_BASE_URL }}
31+
ATT_NUMBER: ${{ secrets.ATT_NUMBER }}
32+
T_MOBILE_NUMBER: ${{ secrets.T_MOBILE_NUMBER }}
33+
VZW_NUMBER: ${{ secrets.VZW_NUMBER }}
34+
35+
jobs:
36+
test:
37+
name: Test
38+
runs-on: ubuntu-latest
39+
steps:
40+
- name: Checkout
41+
uses: actions/checkout@v4
42+
43+
- name: Set up JDK
44+
uses: actions/setup-java@v4
45+
with:
46+
distribution: zulu
47+
java-version: 21
48+
49+
- name: Build Package and Test
50+
env:
51+
JAVA_VERSION: 21
52+
RUNNER_OS: ubuntu-latest
53+
OPERATING_SYSTEM: ubuntu-latest
54+
DISTRIBUTION: zulu
55+
run: |
56+
mvn -B package --file pom.xml -DskipTests
57+
mvn test -Psmoke-tests
58+
shell: bash
59+
60+
notify_for_failures:
61+
name: Notify for Failures
62+
needs: [test]
63+
if: failure()
64+
runs-on: ubuntu-latest
65+
steps:
66+
- name: Notify Slack of Failures
67+
uses: Bandwidth/[email protected]
68+
with:
69+
job-status: failure
70+
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
71+
slack-channel: ${{ secrets.SLACK_CHANNEL }}

.github/workflows/test.yml

Lines changed: 0 additions & 67 deletions
This file was deleted.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ build
2222

2323
.DS_Store
2424
.idea
25+
.settings

.openapi-generator/FILES

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ docs/CallRecordingMetadata.md
1212
docs/CallState.md
1313
docs/CallStateEnum.md
1414
docs/CallTranscription.md
15+
docs/CallTranscriptionDetectedLanguageEnum.md
1516
docs/CallTranscriptionMetadata.md
1617
docs/CallTranscriptionResponse.md
18+
docs/CallTranscriptionTrackEnum.md
1719
docs/CallbackMethodEnum.md
1820
docs/CallsApi.md
1921
docs/CodeRequest.md
@@ -147,8 +149,10 @@ src/main/java/com/bandwidth/sdk/model/CallRecordingMetadata.java
147149
src/main/java/com/bandwidth/sdk/model/CallState.java
148150
src/main/java/com/bandwidth/sdk/model/CallStateEnum.java
149151
src/main/java/com/bandwidth/sdk/model/CallTranscription.java
152+
src/main/java/com/bandwidth/sdk/model/CallTranscriptionDetectedLanguageEnum.java
150153
src/main/java/com/bandwidth/sdk/model/CallTranscriptionMetadata.java
151154
src/main/java/com/bandwidth/sdk/model/CallTranscriptionResponse.java
155+
src/main/java/com/bandwidth/sdk/model/CallTranscriptionTrackEnum.java
152156
src/main/java/com/bandwidth/sdk/model/CallbackMethodEnum.java
153157
src/main/java/com/bandwidth/sdk/model/CodeRequest.java
154158
src/main/java/com/bandwidth/sdk/model/Conference.java
@@ -229,3 +233,5 @@ src/main/java/com/bandwidth/sdk/model/VerifyCodeRequest.java
229233
src/main/java/com/bandwidth/sdk/model/VerifyCodeResponse.java
230234
src/main/java/com/bandwidth/sdk/model/VoiceApiError.java
231235
src/main/java/com/bandwidth/sdk/model/VoiceCodeResponse.java
236+
src/test/java/com/bandwidth/sdk/model/CallTranscriptionDetectedLanguageEnumTest.java
237+
src/test/java/com/bandwidth/sdk/model/CallTranscriptionTrackEnumTest.java

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,10 @@ Class | Method | HTTP request | Description
174174
- [CallState](docs/CallState.md)
175175
- [CallStateEnum](docs/CallStateEnum.md)
176176
- [CallTranscription](docs/CallTranscription.md)
177+
- [CallTranscriptionDetectedLanguageEnum](docs/CallTranscriptionDetectedLanguageEnum.md)
177178
- [CallTranscriptionMetadata](docs/CallTranscriptionMetadata.md)
178179
- [CallTranscriptionResponse](docs/CallTranscriptionResponse.md)
180+
- [CallTranscriptionTrackEnum](docs/CallTranscriptionTrackEnum.md)
179181
- [CallbackMethodEnum](docs/CallbackMethodEnum.md)
180182
- [CodeRequest](docs/CodeRequest.md)
181183
- [Conference](docs/Conference.md)

api/openapi.yaml

Lines changed: 42 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6865,6 +6865,21 @@ components:
68656865
- async
68666866
example: async
68676867
type: string
6868+
callTranscriptionDetectedLanguageEnum:
6869+
description: The detected language for this transcription.
6870+
enum:
6871+
- en-US
6872+
- es-US
6873+
- fr-FR
6874+
example: en-US
6875+
type: string
6876+
callTranscriptionTrackEnum:
6877+
description: Which `track` this transcription is derived from.
6878+
enum:
6879+
- inbound
6880+
- outbound
6881+
example: inbound
6882+
type: string
68686883
createCall:
68696884
properties:
68706885
to:
@@ -7421,6 +7436,7 @@ components:
74217436
url: https://voice.bandwidth.com/api/v2/accounts/9900000/calls/c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85/recordings/r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85/transcription
74227437
status: completed
74237438
parentCallId: c-95ac8d6e-1a31c52e-b38f-4198-93c1-51633ec68f8d
7439+
recordingName: my-recording-name
74247440
transferCallerId: "+15555555555"
74257441
transferTo: "+15555555555"
74267442
duration: PT13.67S
@@ -7520,6 +7536,10 @@ components:
75207536
type: string
75217537
transcription:
75227538
$ref: '#/components/schemas/recordingTranscriptionMetadata'
7539+
recordingName:
7540+
description: A name to identify this recording.
7541+
example: my-recording-name
7542+
type: string
75237543
type: object
75247544
conference:
75257545
example:
@@ -7731,6 +7751,7 @@ components:
77317751
channels: 1
77327752
mediaUrl: https://voice.bandwidth.com/api/v2/accounts/9900000/conferences/conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9/recordings/r-fbe05094-9fd2afe9-bf5b-4c68-820a-41a01c1c5833/media
77337753
conferenceId: conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9
7754+
recordingName: my-recording-name
77347755
name: my-conference-name
77357756
startTime: 2022-06-17T22:19:40.375Z
77367757
endTime: 2022-06-17T22:20:00Z
@@ -7793,6 +7814,10 @@ components:
77937814
format: uri
77947815
nullable: true
77957816
type: string
7817+
recordingName:
7818+
description: A name to identify this recording.
7819+
example: my-recording-name
7820+
type: string
77967821
type: object
77977822
machineDetectionConfiguration:
77987823
description: "The machine detection request used to perform <a href='/docs/voice/guides/machineDetection'>machine\
@@ -7976,6 +8001,7 @@ components:
79768001
callTranscriptionMetadataList:
79778002
example:
79788003
- transcriptionId: t-3f758f24-c7a2fc78-7c91-401a-8b2e-e542f9c40d6b
8004+
transcriptionName: live_transcription
79798005
transcriptionUrl: https://voice.bandwidth.com/api/v2/accounts/9900000/calls/c-fef240ff-5cfc9091-8069-4863-a8c0-a4dcbbf1f1a4/transcriptions/t-3f758f24-c7a2fc78-7c91-401a-8b2e-e542f9c40d6b
79808006
items:
79818007
$ref: '#/components/schemas/callTranscriptionMetadata'
@@ -7986,6 +8012,11 @@ components:
79868012
description: The programmable voice API transcription ID.
79878013
example: t-3f758f24-c7a2fc78-7c91-401a-8b2e-e542f9c40d6b
79888014
type: string
8015+
transcriptionName:
8016+
description: The programmable voice API transcription name. This name could
8017+
be provided by the user when creating the transcription.
8018+
example: live_transcription
8019+
type: string
79898020
transcriptionUrl:
79908021
description: |-
79918022
A URL that may be used to retrieve the transcription itself. This points to the
@@ -7996,17 +8027,17 @@ components:
79968027
callTranscriptionResponse:
79978028
example:
79988029
callId: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
7999-
accountId: "920012"
8030+
accountId: "9900000"
80008031
transcriptionId: t-3f758f24-c7a2fc78-7c91-401a-8b2e-e542f9c40d6b
80018032
tracks:
80028033
- detectedLanguage: en-US
80038034
track: inbound
8004-
text: Hello World! This is an example.
8035+
transcript: Hello World! This is an example.
80058036
confidence: 0.9
80068037
properties:
80078038
accountId:
80088039
description: The user account associated with the call.
8009-
example: "920012"
8040+
example: "9900000"
80108041
type: string
80118042
callId:
80128043
description: The call id associated with the event.
@@ -8020,7 +8051,7 @@ components:
80208051
example:
80218052
- detectedLanguage: en-US
80228053
track: inbound
8023-
text: Hello World! This is an example.
8054+
transcript: Hello World! This is an example.
80248055
confidence: 0.9
80258056
items:
80268057
$ref: '#/components/schemas/callTranscription'
@@ -8029,20 +8060,9 @@ components:
80298060
callTranscription:
80308061
properties:
80318062
detectedLanguage:
8032-
description: The detected language for this transcription.
8033-
enum:
8034-
- en-US
8035-
- es-US
8036-
- fr-FR
8037-
example: en-US
8038-
type: string
8063+
$ref: '#/components/schemas/callTranscriptionDetectedLanguageEnum'
80398064
track:
8040-
description: Which `track` this transcription is derived from.
8041-
enum:
8042-
- inbound
8043-
- outbound
8044-
example: inbound
8045-
type: string
8065+
$ref: '#/components/schemas/callTranscriptionTrackEnum'
80468066
transcript:
80478067
description: The transcription itself.
80488068
example: Hello World! This is an example.
@@ -8081,6 +8101,7 @@ components:
80818101
completedTime:
80828102
description: The time that the transcription was completed
80838103
example: 2022-06-13T18:46:29.715Z
8104+
format: date-time
80848105
type: string
80858106
url:
80868107
description: "The URL of the [transcription](#operation/getCallTranscription)"
@@ -9951,6 +9972,10 @@ components:
99519972
description: The call id associated with the event.
99529973
example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
99539974
type: string
9975+
recordingName:
9976+
description: A name to identify this recording.
9977+
example: my-recording-name
9978+
type: string
99549979
callUrl:
99559980
description: The URL of the call associated with the event.
99569981
example: https://voice.bandwidth.com/api/v2/accounts/9900000/calls/c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85

0 commit comments

Comments
 (0)