Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SWI-5869 Update SDK Based on Recent Spec Changes #149

Merged
merged 35 commits into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
d2a9abc
Generate SDK with OpenAPI Generator Version 7.6.0
DX-Bandwidth Aug 12, 2024
294899d
update test workflows
ckoegel Aug 12, 2024
23bea4e
skip tests
ckoegel Aug 12, 2024
331114f
move tests
ckoegel Aug 12, 2024
071a47f
fix test
ckoegel Aug 12, 2024
6cca85f
no smoke tests for now
ckoegel Aug 12, 2024
34b93b1
build?
ckoegel Aug 12, 2024
2615a36
disable smoke
ckoegel Aug 12, 2024
d98f4ed
pls build
ckoegel Aug 12, 2024
f19feb0
update workflows and gitignore
ckoegel Aug 13, 2024
8a5b323
fix unit test package
ckoegel Aug 13, 2024
b9e36f3
first unit tests
ckoegel Aug 13, 2024
6732677
test fixes
ckoegel Aug 13, 2024
0ccbd4a
regenerate tests
ckoegel Aug 13, 2024
fbaaa85
fixes to smoke tests
ckoegel Aug 13, 2024
e4fc8df
write a bunch of unit tests
ckoegel Aug 13, 2024
04a7dd9
update workflows
ckoegel Aug 13, 2024
8ffb87d
fix CallCleanup
ckoegel Aug 13, 2024
d192e3f
update types and lots more unit tests
ckoegel Aug 14, 2024
63b572c
remove unused import
ckoegel Aug 14, 2024
5152619
final unit tests
ckoegel Aug 14, 2024
a7f9059
update bxml tests
ckoegel Aug 14, 2024
524db78
fix smoke tests
ckoegel Aug 14, 2024
530b62b
update transcriptions tests
ckoegel Aug 14, 2024
f3ca432
bring back smoke tests
ckoegel Aug 14, 2024
c817c54
remove matrix from smoke tests
ckoegel Aug 14, 2024
e7ada61
use java 21 for tests
ckoegel Aug 14, 2024
939fbd8
calls api unit tests
ckoegel Aug 14, 2024
18218e3
add other api unit tests
ckoegel Aug 15, 2024
a6caca2
test formatting
ckoegel Aug 15, 2024
622e4de
switch from ArrayList to List
ckoegel Aug 15, 2024
fe0350e
run prism in unit test wf
ckoegel Aug 15, 2024
e87f14b
try a sleep because windows 19 is trash
ckoegel Aug 15, 2024
78ddb74
use bash
ckoegel Aug 15, 2024
110bd41
SWI-5869 BXML Library Updates (#151)
ckoegel Aug 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions .github/workflows/test-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Test PR

on:
pull_request:
branches:
- main
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true


env:
BW_ACCOUNT_ID: ${{ secrets.BW_ACCOUNT_ID }}
BW_PASSWORD: ${{ secrets.BW_PASSWORD }}
BW_USERNAME: ${{ secrets.BW_USERNAME }}
BW_VOICE_APPLICATION_ID: ${{ secrets.BW_VOICE_APPLICATION_ID }}
BW_MESSAGING_APPLICATION_ID: ${{ secrets.BW_MESSAGING_APPLICATION_ID }}
BW_NUMBER: ${{ secrets.BW_NUMBER }}
USER_NUMBER: ${{ secrets.USER_NUMBER }}
BASE_CALLBACK_URL: ${{ secrets.BASE_CALLBACK_URL }}
BW_USERNAME_FORBIDDEN: ${{ secrets.BW_USERNAME_FORBIDDEN }}
BW_PASSWORD_FORBIDDEN: ${{ secrets.BW_PASSWORD_FORBIDDEN }}
MANTECA_IDLE_NUMBER: ${{ secrets.MANTECA_IDLE_NUMBER }}
MANTECA_ACTIVE_NUMBER: ${{ secrets.MANTECA_ACTIVE_NUMBER }}
MANTECA_APPLICATION_ID: ${{ secrets.MANTECA_APPLICATION_ID }}
MANTECA_BASE_URL: ${{ secrets.MANTECA_BASE_URL }}
ATT_NUMBER: ${{ secrets.ATT_NUMBER }}
T_MOBILE_NUMBER: ${{ secrets.T_MOBILE_NUMBER }}
VZW_NUMBER: ${{ secrets.VZW_NUMBER }}

jobs:
test:
name: Test PR
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-2022, windows-2019, ubuntu-20.04, ubuntu-22.04]
java-version: ["11", "17", "21"]
distribution: ["zulu", "temurin"]
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: ${{ matrix.distribution }}
java-version: ${{ matrix.java-version }}

- name: Build Package and Test
env:
JAVA_VERSION: ${{ matrix.java-version }}
RUNNER_OS: ${{ matrix.os }}
OPERATING_SYSTEM: ${{ matrix.os }}
DISTRIBUTION: ${{ matrix.distribution }}
run: |
mvn -B package --file pom.xml -DskipTests
npm install -g @stoplight/prism-cli
prism mock ./bandwidth.yml & (sleep 3; mvn test -Punit-tests)
shell: bash
71 changes: 71 additions & 0 deletions .github/workflows/test-smoke.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Smoke Test

on:
schedule:
- cron: "0 4 * * *"
pull_request:
branches:
- main
paths:
- "src/test/java/com/bandwidth/sdk/smoke/*"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true

env:
BW_ACCOUNT_ID: ${{ secrets.BW_ACCOUNT_ID }}
BW_PASSWORD: ${{ secrets.BW_PASSWORD }}
BW_USERNAME: ${{ secrets.BW_USERNAME }}
BW_VOICE_APPLICATION_ID: ${{ secrets.BW_VOICE_APPLICATION_ID }}
BW_MESSAGING_APPLICATION_ID: ${{ secrets.BW_MESSAGING_APPLICATION_ID }}
BW_NUMBER: ${{ secrets.BW_NUMBER }}
USER_NUMBER: ${{ secrets.USER_NUMBER }}
BASE_CALLBACK_URL: ${{ secrets.BASE_CALLBACK_URL }}
BW_USERNAME_FORBIDDEN: ${{ secrets.BW_USERNAME_FORBIDDEN }}
BW_PASSWORD_FORBIDDEN: ${{ secrets.BW_PASSWORD_FORBIDDEN }}
MANTECA_IDLE_NUMBER: ${{ secrets.MANTECA_IDLE_NUMBER }}
MANTECA_ACTIVE_NUMBER: ${{ secrets.MANTECA_ACTIVE_NUMBER }}
MANTECA_APPLICATION_ID: ${{ secrets.MANTECA_APPLICATION_ID }}
MANTECA_BASE_URL: ${{ secrets.MANTECA_BASE_URL }}
ATT_NUMBER: ${{ secrets.ATT_NUMBER }}
T_MOBILE_NUMBER: ${{ secrets.T_MOBILE_NUMBER }}
VZW_NUMBER: ${{ secrets.VZW_NUMBER }}

jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 21

- name: Build Package and Test
env:
JAVA_VERSION: 21
RUNNER_OS: ubuntu-latest
OPERATING_SYSTEM: ubuntu-latest
DISTRIBUTION: zulu
run: |
mvn -B package --file pom.xml -DskipTests
mvn test -Psmoke-tests
shell: bash

notify_for_failures:
name: Notify for Failures
needs: [test]
if: failure()
runs-on: ubuntu-latest
steps:
- name: Notify Slack of Failures
uses: Bandwidth/[email protected]
with:
job-status: failure
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
slack-channel: ${{ secrets.SLACK_CHANNEL }}
67 changes: 0 additions & 67 deletions .github/workflows/test.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ build

.DS_Store
.idea
.settings
6 changes: 6 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ docs/CallRecordingMetadata.md
docs/CallState.md
docs/CallStateEnum.md
docs/CallTranscription.md
docs/CallTranscriptionDetectedLanguageEnum.md
docs/CallTranscriptionMetadata.md
docs/CallTranscriptionResponse.md
docs/CallTranscriptionTrackEnum.md
docs/CallbackMethodEnum.md
docs/CallsApi.md
docs/CodeRequest.md
Expand Down Expand Up @@ -147,8 +149,10 @@ src/main/java/com/bandwidth/sdk/model/CallRecordingMetadata.java
src/main/java/com/bandwidth/sdk/model/CallState.java
src/main/java/com/bandwidth/sdk/model/CallStateEnum.java
src/main/java/com/bandwidth/sdk/model/CallTranscription.java
src/main/java/com/bandwidth/sdk/model/CallTranscriptionDetectedLanguageEnum.java
src/main/java/com/bandwidth/sdk/model/CallTranscriptionMetadata.java
src/main/java/com/bandwidth/sdk/model/CallTranscriptionResponse.java
src/main/java/com/bandwidth/sdk/model/CallTranscriptionTrackEnum.java
src/main/java/com/bandwidth/sdk/model/CallbackMethodEnum.java
src/main/java/com/bandwidth/sdk/model/CodeRequest.java
src/main/java/com/bandwidth/sdk/model/Conference.java
Expand Down Expand Up @@ -229,3 +233,5 @@ src/main/java/com/bandwidth/sdk/model/VerifyCodeRequest.java
src/main/java/com/bandwidth/sdk/model/VerifyCodeResponse.java
src/main/java/com/bandwidth/sdk/model/VoiceApiError.java
src/main/java/com/bandwidth/sdk/model/VoiceCodeResponse.java
src/test/java/com/bandwidth/sdk/model/CallTranscriptionDetectedLanguageEnumTest.java
src/test/java/com/bandwidth/sdk/model/CallTranscriptionTrackEnumTest.java
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,10 @@ Class | Method | HTTP request | Description
- [CallState](docs/CallState.md)
- [CallStateEnum](docs/CallStateEnum.md)
- [CallTranscription](docs/CallTranscription.md)
- [CallTranscriptionDetectedLanguageEnum](docs/CallTranscriptionDetectedLanguageEnum.md)
- [CallTranscriptionMetadata](docs/CallTranscriptionMetadata.md)
- [CallTranscriptionResponse](docs/CallTranscriptionResponse.md)
- [CallTranscriptionTrackEnum](docs/CallTranscriptionTrackEnum.md)
- [CallbackMethodEnum](docs/CallbackMethodEnum.md)
- [CodeRequest](docs/CodeRequest.md)
- [Conference](docs/Conference.md)
Expand Down
59 changes: 42 additions & 17 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6865,6 +6865,21 @@ components:
- async
example: async
type: string
callTranscriptionDetectedLanguageEnum:
description: The detected language for this transcription.
enum:
- en-US
- es-US
- fr-FR
example: en-US
type: string
callTranscriptionTrackEnum:
description: Which `track` this transcription is derived from.
enum:
- inbound
- outbound
example: inbound
type: string
createCall:
properties:
to:
Expand Down Expand Up @@ -7421,6 +7436,7 @@ components:
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
status: completed
parentCallId: c-95ac8d6e-1a31c52e-b38f-4198-93c1-51633ec68f8d
recordingName: my-recording-name
transferCallerId: "+15555555555"
transferTo: "+15555555555"
duration: PT13.67S
Expand Down Expand Up @@ -7520,6 +7536,10 @@ components:
type: string
transcription:
$ref: '#/components/schemas/recordingTranscriptionMetadata'
recordingName:
description: A name to identify this recording.
example: my-recording-name
type: string
type: object
conference:
example:
Expand Down Expand Up @@ -7731,6 +7751,7 @@ components:
channels: 1
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
conferenceId: conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9
recordingName: my-recording-name
name: my-conference-name
startTime: 2022-06-17T22:19:40.375Z
endTime: 2022-06-17T22:20:00Z
Expand Down Expand Up @@ -7793,6 +7814,10 @@ components:
format: uri
nullable: true
type: string
recordingName:
description: A name to identify this recording.
example: my-recording-name
type: string
type: object
machineDetectionConfiguration:
description: "The machine detection request used to perform <a href='/docs/voice/guides/machineDetection'>machine\
Expand Down Expand Up @@ -7976,6 +8001,7 @@ components:
callTranscriptionMetadataList:
example:
- transcriptionId: t-3f758f24-c7a2fc78-7c91-401a-8b2e-e542f9c40d6b
transcriptionName: live_transcription
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
items:
$ref: '#/components/schemas/callTranscriptionMetadata'
Expand All @@ -7986,6 +8012,11 @@ components:
description: The programmable voice API transcription ID.
example: t-3f758f24-c7a2fc78-7c91-401a-8b2e-e542f9c40d6b
type: string
transcriptionName:
description: The programmable voice API transcription name. This name could
be provided by the user when creating the transcription.
example: live_transcription
type: string
transcriptionUrl:
description: |-
A URL that may be used to retrieve the transcription itself. This points to the
Expand All @@ -7996,17 +8027,17 @@ components:
callTranscriptionResponse:
example:
callId: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
accountId: "920012"
accountId: "9900000"
transcriptionId: t-3f758f24-c7a2fc78-7c91-401a-8b2e-e542f9c40d6b
tracks:
- detectedLanguage: en-US
track: inbound
text: Hello World! This is an example.
transcript: Hello World! This is an example.
confidence: 0.9
properties:
accountId:
description: The user account associated with the call.
example: "920012"
example: "9900000"
type: string
callId:
description: The call id associated with the event.
Expand All @@ -8020,7 +8051,7 @@ components:
example:
- detectedLanguage: en-US
track: inbound
text: Hello World! This is an example.
transcript: Hello World! This is an example.
confidence: 0.9
items:
$ref: '#/components/schemas/callTranscription'
Expand All @@ -8029,20 +8060,9 @@ components:
callTranscription:
properties:
detectedLanguage:
description: The detected language for this transcription.
enum:
- en-US
- es-US
- fr-FR
example: en-US
type: string
$ref: '#/components/schemas/callTranscriptionDetectedLanguageEnum'
track:
description: Which `track` this transcription is derived from.
enum:
- inbound
- outbound
example: inbound
type: string
$ref: '#/components/schemas/callTranscriptionTrackEnum'
transcript:
description: The transcription itself.
example: Hello World! This is an example.
Expand Down Expand Up @@ -8081,6 +8101,7 @@ components:
completedTime:
description: The time that the transcription was completed
example: 2022-06-13T18:46:29.715Z
format: date-time
type: string
url:
description: "The URL of the [transcription](#operation/getCallTranscription)"
Expand Down Expand Up @@ -9951,6 +9972,10 @@ components:
description: The call id associated with the event.
example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
type: string
recordingName:
description: A name to identify this recording.
example: my-recording-name
type: string
callUrl:
description: The URL of the call associated with the event.
example: https://voice.bandwidth.com/api/v2/accounts/9900000/calls/c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
Expand Down
Loading