Skip to content

Commit 1bae9a5

Browse files
band-swi[bot]DX-Bandwidthckoegelajrice6713
authored
SWI-5462 Update SDK Based on Recent Spec Changes (#205)
* Generate SDK with OpenAPI Generator Version 7.4.0 * update workflows * fix wf * try one test * copy them all * remove all but init * now remove the init * bring it back * move bxml * move smoke * clean up spaces * update tests * fix completedTime to be date-time * include_optional * update spec * unit tests * more unit tests * unit tessssssssts * final model unit tests * move api unit tests * SWI-4279 Fix BXML Library Anti Pattern (#206) * fix verbs * finish updating bxml library * Update bandwidth/models/bxml/nestable_verb.py Co-authored-by: AJ Rice <[email protected]> --------- Co-authored-by: AJ Rice <[email protected]> * SWI-5462 Add Real Time Transcriptions Tests (#207) * add privacy field to calls api test * remove unused env var * update recordings smoke tests to use new method names * add files for stats and transcriptions apis * update smoke test header blocks * add statistics smoke tests * fill in skeleton of transcriptions test * transcriptions * 403 from manteca :( * finalize transcriptions tests * update smoke test wf * only main * fix tests hopefully * SWI-5457 Prism Unit Tests (#209) * SWI-5457 Prism Unit Tests * calls, conferences, media, messages * final unit tests * run prism on unit tests * only test models until base url can be updated * bring back apis, we're waiting to update * only test models for now * SWI-5462 Update to Generator v7.6.0 (#210) * SWI-5545 Update Transcription Model (#214) * SWI-5545 Update Transcription Model * remove models path from deploy tests * generate using 7.7.0-SNAPSHOT * remove old model * update tests * fix tests * regenerate with 7.7.0 * unit test everything on PR * small test updates * bash shell --------- Co-authored-by: DX-Bandwidth <[email protected]> Co-authored-by: ckoegel <[email protected]> Co-authored-by: Cameron Koegel <[email protected]> Co-authored-by: AJ Rice <[email protected]>
1 parent e809982 commit 1bae9a5

File tree

373 files changed

+9360
-4332
lines changed

Some content is hidden

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

373 files changed

+9360
-4332
lines changed

.github/workflows/deploy.yml

+7-5
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ jobs:
3030
MANTECA_IDLE_NUMBER: ${{ secrets.MANTECA_IDLE_NUMBER }}
3131
MANTECA_BASE_URL: ${{ secrets.MANTECA_BASE_URL }}
3232
MANTECA_APPLICATION_ID: ${{ secrets.MANTECA_APPLICATION_ID }}
33-
BW_NUMBER_PROVIDER: ${{ secrets.BW_NUMBER_PROVIDER }}
3433
steps:
3534
- name: Set Release Version
3635
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
@@ -57,7 +56,9 @@ jobs:
5756
5857
- name: Test
5958
run: |
60-
pytest -v
59+
npm install -g @stoplight/prism-cli
60+
prism mock ./bandwidth.yml & pytest -v ./test/unit
61+
6162
6263
- name: Deploy to PYPI
6364
run: |
@@ -68,7 +69,7 @@ jobs:
6869
env:
6970
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
7071
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
71-
72+
7273
- uses: Bandwidth/[email protected]
7374
if: always()
7475
with:
@@ -100,7 +101,6 @@ jobs:
100101
MANTECA_IDLE_NUMBER: ${{ secrets.MANTECA_IDLE_NUMBER }}
101102
MANTECA_BASE_URL: ${{ secrets.MANTECA_BASE_URL }}
102103
MANTECA_APPLICATION_ID: ${{ secrets.MANTECA_APPLICATION_ID }}
103-
BW_NUMBER_PROVIDER: ${{ secrets.BW_NUMBER_PROVIDER }}
104104
steps:
105105
- name: Set Release Version
106106
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
@@ -125,7 +125,9 @@ jobs:
125125
126126
- name: Test
127127
run: |-
128-
pytest -v
128+
npm install -g @stoplight/prism-cli
129+
prism mock ./bandwidth.yml & pytest -v ./test/unit
130+
shell: bash
129131

130132
- name: Deploy to PYPI
131133
run: |

.github/workflows/test-pr.yml

+63
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+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.head_ref }}
10+
cancel-in-progress: true
11+
12+
env:
13+
BW_ACCOUNT_ID: ${{ secrets.BW_ACCOUNT_ID }}
14+
BW_USERNAME: ${{ secrets.BW_USERNAME }}
15+
BW_PASSWORD: ${{ secrets.BW_PASSWORD }}
16+
BW_USERNAME_FORBIDDEN: ${{ secrets.BW_USERNAME_FORBIDDEN }}
17+
BW_PASSWORD_FORBIDDEN: ${{ secrets.BW_PASSWORD_FORBIDDEN }}
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+
VZW_NUMBER: ${{ secrets.VZW_NUMBER }}
23+
ATT_NUMBER: ${{ secrets.ATT_NUMBER }}
24+
T_MOBILE_NUMBER: ${{ secrets.T_MOBILE_NUMBER }}
25+
BASE_CALLBACK_URL: ${{ secrets.BASE_CALLBACK_URL }}
26+
MANTECA_ACTIVE_NUMBER: ${{ secrets.MANTECA_ACTIVE_NUMBER }}
27+
MANTECA_IDLE_NUMBER: ${{ secrets.MANTECA_IDLE_NUMBER }}
28+
MANTECA_BASE_URL: ${{ secrets.MANTECA_BASE_URL }}
29+
MANTECA_APPLICATION_ID: ${{ secrets.MANTECA_APPLICATION_ID }}
30+
31+
jobs:
32+
test:
33+
name: Test PR
34+
runs-on: ${{ matrix.os }}
35+
strategy:
36+
matrix:
37+
os: [windows-2022, windows-2019, ubuntu-20.04, ubuntu-latest]
38+
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
39+
fail-fast: false
40+
env:
41+
PYTHON_VERSION: ${{ matrix.python-version }}
42+
OPERATING_SYSTEM: ${{ matrix.os }}
43+
44+
steps:
45+
- name: Checkout
46+
uses: actions/checkout@v4
47+
48+
- name: Set up Python
49+
uses: actions/setup-python@v5
50+
with:
51+
python-version: ${{ matrix.python-version }}
52+
53+
- name: Install Packages
54+
run: |
55+
pip install -r requirements.txt
56+
pip install -r test-requirements.txt
57+
58+
- name: Test at Warning Level
59+
run: |
60+
echo "Log level: WARNING"
61+
npm install -g @stoplight/prism-cli
62+
prism mock ./bandwidth.yml & pytest -v --log-cli-level=WARNING ./test/unit
63+
shell: bash

.github/workflows/test-smoke.yml

+92
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
name: Smoke Tests
2+
3+
on:
4+
schedule:
5+
- cron: "0 4 * * *"
6+
workflow_dispatch:
7+
inputs:
8+
logLevel:
9+
description: Log level
10+
required: false
11+
default: WARNING
12+
type: choice
13+
options:
14+
- WARNING
15+
- DEBUG
16+
pull_request:
17+
branches:
18+
- main
19+
paths:
20+
- 'test/smoke/**'
21+
22+
concurrency:
23+
group: ${{ github.workflow }}-${{ github.head_ref }}
24+
cancel-in-progress: true
25+
26+
env:
27+
BW_ACCOUNT_ID: ${{ secrets.BW_ACCOUNT_ID }}
28+
BW_USERNAME: ${{ secrets.BW_USERNAME }}
29+
BW_PASSWORD: ${{ secrets.BW_PASSWORD }}
30+
BW_USERNAME_FORBIDDEN: ${{ secrets.BW_USERNAME_FORBIDDEN }}
31+
BW_PASSWORD_FORBIDDEN: ${{ secrets.BW_PASSWORD_FORBIDDEN }}
32+
BW_VOICE_APPLICATION_ID: ${{ secrets.BW_VOICE_APPLICATION_ID }}
33+
BW_MESSAGING_APPLICATION_ID: ${{ secrets.BW_MESSAGING_APPLICATION_ID }}
34+
BW_NUMBER: ${{ secrets.BW_NUMBER }}
35+
USER_NUMBER: ${{ secrets.USER_NUMBER }}
36+
VZW_NUMBER: ${{ secrets.VZW_NUMBER }}
37+
ATT_NUMBER: ${{ secrets.ATT_NUMBER }}
38+
T_MOBILE_NUMBER: ${{ secrets.T_MOBILE_NUMBER }}
39+
BASE_CALLBACK_URL: ${{ secrets.BASE_CALLBACK_URL }}
40+
MANTECA_ACTIVE_NUMBER: ${{ secrets.MANTECA_ACTIVE_NUMBER }}
41+
MANTECA_IDLE_NUMBER: ${{ secrets.MANTECA_IDLE_NUMBER }}
42+
MANTECA_BASE_URL: ${{ secrets.MANTECA_BASE_URL }}
43+
MANTECA_APPLICATION_ID: ${{ secrets.MANTECA_APPLICATION_ID }}
44+
45+
jobs:
46+
test:
47+
name: Smoke Test
48+
runs-on: ubuntu-latest
49+
env:
50+
PYTHON_VERSION: '3.12'
51+
OPERATING_SYSTEM: ubuntu
52+
53+
steps:
54+
- name: Checkout
55+
uses: actions/checkout@v4
56+
57+
- name: Set up Python
58+
uses: actions/setup-python@v5
59+
with:
60+
python-version: '3.12'
61+
62+
- name: Install Packages
63+
run: |
64+
pip install -r requirements.txt
65+
pip install -r test-requirements.txt
66+
67+
- name: Test at Debug Level
68+
if: ${{ inputs.logLevel == 'DEBUG' }}
69+
run: |
70+
echo "Log level: DEBUG"
71+
pytest -v --log-cli-level=DEBUG
72+
shell: bash
73+
74+
- name: Test at Warning Level
75+
if: ${{( inputs.logLevel == null) || ( inputs.logLevel == 'WARNING') }}
76+
run: |
77+
echo "Log level: WARNING"
78+
pytest -v --log-cli-level=WARNING ./test/smoke
79+
shell: bash
80+
81+
notify_for_failures:
82+
name: Notify for Failures
83+
needs: [test]
84+
if: failure()
85+
runs-on: ubuntu-latest
86+
steps:
87+
- name: Notify Slack of Failures
88+
uses: Bandwidth/[email protected]
89+
with:
90+
job-status: failure
91+
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
92+
slack-channel: ${{ secrets.SLACK_CHANNEL }}

.github/workflows/test.yml

-92
This file was deleted.

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ __pycache__/
66
# C extensions
77
*.so
88

9-
# MacOS Files
9+
# MacOS Files
1010
.DS_Store
1111

1212
# Distribution / packaging

.openapi-generator/FILES

+16-6
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ bandwidth/api/mfa_api.py
1111
bandwidth/api/phone_number_lookup_api.py
1212
bandwidth/api/recordings_api.py
1313
bandwidth/api/statistics_api.py
14+
bandwidth/api/transcriptions_api.py
1415
bandwidth/api_client.py
1516
bandwidth/api_response.py
1617
bandwidth/configuration.py
@@ -24,6 +25,11 @@ bandwidth/models/call_direction_enum.py
2425
bandwidth/models/call_recording_metadata.py
2526
bandwidth/models/call_state.py
2627
bandwidth/models/call_state_enum.py
28+
bandwidth/models/call_transcription.py
29+
bandwidth/models/call_transcription_detected_language_enum.py
30+
bandwidth/models/call_transcription_metadata.py
31+
bandwidth/models/call_transcription_response.py
32+
bandwidth/models/call_transcription_track_enum.py
2733
bandwidth/models/callback_method_enum.py
2834
bandwidth/models/code_request.py
2935
bandwidth/models/conference.py
@@ -83,6 +89,8 @@ bandwidth/models/priority_enum.py
8389
bandwidth/models/recording_available_callback.py
8490
bandwidth/models/recording_complete_callback.py
8591
bandwidth/models/recording_state_enum.py
92+
bandwidth/models/recording_transcription_metadata.py
93+
bandwidth/models/recording_transcriptions.py
8694
bandwidth/models/redirect_callback.py
8795
bandwidth/models/redirect_method_enum.py
8896
bandwidth/models/stir_shaken.py
@@ -91,8 +99,6 @@ bandwidth/models/tn_lookup_request_error.py
9199
bandwidth/models/transcribe_recording.py
92100
bandwidth/models/transcription.py
93101
bandwidth/models/transcription_available_callback.py
94-
bandwidth/models/transcription_list.py
95-
bandwidth/models/transcription_metadata.py
96102
bandwidth/models/transfer_answer_callback.py
97103
bandwidth/models/transfer_complete_callback.py
98104
bandwidth/models/transfer_disconnect_callback.py
@@ -114,6 +120,11 @@ docs/CallDirectionEnum.md
114120
docs/CallRecordingMetadata.md
115121
docs/CallState.md
116122
docs/CallStateEnum.md
123+
docs/CallTranscription.md
124+
docs/CallTranscriptionDetectedLanguageEnum.md
125+
docs/CallTranscriptionMetadata.md
126+
docs/CallTranscriptionResponse.md
127+
docs/CallTranscriptionTrackEnum.md
117128
docs/CallbackMethodEnum.md
118129
docs/CallsApi.md
119130
docs/CodeRequest.md
@@ -179,6 +190,8 @@ docs/PriorityEnum.md
179190
docs/RecordingAvailableCallback.md
180191
docs/RecordingCompleteCallback.md
181192
docs/RecordingStateEnum.md
193+
docs/RecordingTranscriptionMetadata.md
194+
docs/RecordingTranscriptions.md
182195
docs/RecordingsApi.md
183196
docs/RedirectCallback.md
184197
docs/RedirectMethodEnum.md
@@ -189,8 +202,7 @@ docs/TnLookupRequestError.md
189202
docs/TranscribeRecording.md
190203
docs/Transcription.md
191204
docs/TranscriptionAvailableCallback.md
192-
docs/TranscriptionList.md
193-
docs/TranscriptionMetadata.md
205+
docs/TranscriptionsApi.md
194206
docs/TransferAnswerCallback.md
195207
docs/TransferCompleteCallback.md
196208
docs/TransferDisconnectCallback.md
@@ -204,7 +216,5 @@ docs/VoiceApiError.md
204216
docs/VoiceCodeResponse.md
205217
git_push.sh
206218
pyproject.toml
207-
requirements.txt
208219
setup.py
209-
test-requirements.txt
210220
tox.ini

.openapi-generator/VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.4.0
1+
7.7.0

LICENSE

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
License:
1+
License:
22
========
33
The MIT License (MIT)
44
http://opensource.org/licenses/MIT
@@ -25,4 +25,4 @@ THE SOFTWARE.
2525

2626
Trade Mark:
2727
==========
28-
APIMATIC is a trade mark for APIMATIC Limited
28+
APIMATIC is a trade mark for APIMATIC Limited

0 commit comments

Comments
 (0)