Skip to content

Commit 1767e34

Browse files
band-swi[bot]DX-Bandwidthckoegel
authored
SWI-5799 Update SDK Based on Recent Spec Changes (#221)
* Generate SDK with OpenAPI Generator Version 7.7.0 * add unit tests * fix unit test --------- Co-authored-by: DX-Bandwidth <[email protected]> Co-authored-by: ckoegel <[email protected]>
1 parent c0c74a6 commit 1767e34

File tree

6 files changed

+21
-4
lines changed

6 files changed

+21
-4
lines changed

bandwidth.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2802,6 +2802,8 @@ components:
28022802
$ref: '#/components/schemas/mediaUrl'
28032803
transcription:
28042804
$ref: '#/components/schemas/recordingTranscriptionMetadata'
2805+
recordingName:
2806+
$ref: '#/components/schemas/recordingName'
28052807
conference:
28062808
type: object
28072809
properties:
@@ -3041,6 +3043,8 @@ components:
30413043
$ref: '#/components/schemas/status'
30423044
mediaUrl:
30433045
$ref: '#/components/schemas/mediaUrl'
3046+
recordingName:
3047+
$ref: '#/components/schemas/recordingName'
30443048
machineDetectionConfiguration:
30453049
type: object
30463050
description: >-
@@ -4266,6 +4270,10 @@ components:
42664270
type: string
42674271
description: The call id associated with the event.
42684272
example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
4273+
recordingName:
4274+
type: string
4275+
description: A name to identify this recording.
4276+
example: my-recording-name
42694277
callUrl:
42704278
type: string
42714279
description: The URL of the call associated with the event.

bandwidth/models/call_recording_metadata.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@ class CallRecordingMetadata(BaseModel):
4949
status: Optional[StrictStr] = Field(default=None, description="The current status of the process. For recording, current possible values are 'processing', 'partial', 'complete', 'deleted', and 'error'. For transcriptions, current possible values are 'none', 'processing', 'available', 'error', 'timeout', 'file-size-too-big', and 'file-size-too-small'. Additional states may be added in the future, so your application must be tolerant of unknown values.")
5050
media_url: Optional[StrictStr] = Field(default=None, description="The URL that can be used to download the recording. Only present if the recording is finished and may be downloaded.", alias="mediaUrl")
5151
transcription: Optional[RecordingTranscriptionMetadata] = None
52+
recording_name: Optional[StrictStr] = Field(default=None, description="A name to identify this recording.", alias="recordingName")
5253
additional_properties: Dict[str, Any] = {}
53-
__properties: ClassVar[List[str]] = ["applicationId", "accountId", "callId", "parentCallId", "recordingId", "to", "from", "transferCallerId", "transferTo", "duration", "direction", "channels", "startTime", "endTime", "fileFormat", "status", "mediaUrl", "transcription"]
54+
__properties: ClassVar[List[str]] = ["applicationId", "accountId", "callId", "parentCallId", "recordingId", "to", "from", "transferCallerId", "transferTo", "duration", "direction", "channels", "startTime", "endTime", "fileFormat", "status", "mediaUrl", "transcription", "recordingName"]
5455

5556
model_config = ConfigDict(
5657
populate_by_name=True,
@@ -140,7 +141,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
140141
"fileFormat": obj.get("fileFormat"),
141142
"status": obj.get("status"),
142143
"mediaUrl": obj.get("mediaUrl"),
143-
"transcription": RecordingTranscriptionMetadata.from_dict(obj["transcription"]) if obj.get("transcription") is not None else None
144+
"transcription": RecordingTranscriptionMetadata.from_dict(obj["transcription"]) if obj.get("transcription") is not None else None,
145+
"recordingName": obj.get("recordingName")
144146
})
145147
# store additional fields in additional_properties
146148
for _key in obj.keys():

bandwidth/models/conference_recording_metadata.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,9 @@ class ConferenceRecordingMetadata(BaseModel):
4040
file_format: Optional[FileFormatEnum] = Field(default=None, alias="fileFormat")
4141
status: Optional[StrictStr] = Field(default=None, description="The current status of the process. For recording, current possible values are 'processing', 'partial', 'complete', 'deleted', and 'error'. For transcriptions, current possible values are 'none', 'processing', 'available', 'error', 'timeout', 'file-size-too-big', and 'file-size-too-small'. Additional states may be added in the future, so your application must be tolerant of unknown values.")
4242
media_url: Optional[StrictStr] = Field(default=None, description="The URL that can be used to download the recording. Only present if the recording is finished and may be downloaded.", alias="mediaUrl")
43+
recording_name: Optional[StrictStr] = Field(default=None, description="A name to identify this recording.", alias="recordingName")
4344
additional_properties: Dict[str, Any] = {}
44-
__properties: ClassVar[List[str]] = ["accountId", "conferenceId", "name", "recordingId", "duration", "channels", "startTime", "endTime", "fileFormat", "status", "mediaUrl"]
45+
__properties: ClassVar[List[str]] = ["accountId", "conferenceId", "name", "recordingId", "duration", "channels", "startTime", "endTime", "fileFormat", "status", "mediaUrl", "recordingName"]
4546

4647
model_config = ConfigDict(
4748
populate_by_name=True,
@@ -116,7 +117,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
116117
"endTime": obj.get("endTime"),
117118
"fileFormat": obj.get("fileFormat"),
118119
"status": obj.get("status"),
119-
"mediaUrl": obj.get("mediaUrl")
120+
"mediaUrl": obj.get("mediaUrl"),
121+
"recordingName": obj.get("recordingName")
120122
})
121123
# store additional fields in additional_properties
122124
for _key in obj.keys():

docs/CallRecordingMetadata.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Name | Type | Description | Notes
2323
**status** | **str** | The current status of the process. For recording, current possible values are &#39;processing&#39;, &#39;partial&#39;, &#39;complete&#39;, &#39;deleted&#39;, and &#39;error&#39;. For transcriptions, current possible values are &#39;none&#39;, &#39;processing&#39;, &#39;available&#39;, &#39;error&#39;, &#39;timeout&#39;, &#39;file-size-too-big&#39;, and &#39;file-size-too-small&#39;. Additional states may be added in the future, so your application must be tolerant of unknown values. | [optional]
2424
**media_url** | **str** | The URL that can be used to download the recording. Only present if the recording is finished and may be downloaded. | [optional]
2525
**transcription** | [**RecordingTranscriptionMetadata**](RecordingTranscriptionMetadata.md) | | [optional]
26+
**recording_name** | **str** | A name to identify this recording. | [optional]
2627

2728
## Example
2829

docs/ConferenceRecordingMetadata.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Name | Type | Description | Notes
1616
**file_format** | [**FileFormatEnum**](FileFormatEnum.md) | | [optional]
1717
**status** | **str** | The current status of the process. For recording, current possible values are &#39;processing&#39;, &#39;partial&#39;, &#39;complete&#39;, &#39;deleted&#39;, and &#39;error&#39;. For transcriptions, current possible values are &#39;none&#39;, &#39;processing&#39;, &#39;available&#39;, &#39;error&#39;, &#39;timeout&#39;, &#39;file-size-too-big&#39;, and &#39;file-size-too-small&#39;. Additional states may be added in the future, so your application must be tolerant of unknown values. | [optional]
1818
**media_url** | **str** | The URL that can be used to download the recording. Only present if the recording is finished and may be downloaded. | [optional]
19+
**recording_name** | **str** | A name to identify this recording. | [optional]
1920

2021
## Example
2122

test/unit/api/test_recordings_api.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ def test_list_account_call_recordings(self) -> None:
9393
assert_that(response.data[0].transcription.status, instance_of(str))
9494
assert_that(response.data[0].transcription.completed_time, instance_of(datetime))
9595
assert_that(response.data[0].transcription.url, starts_with('http'))
96+
assert_that(response.data[0].recording_name, instance_of(str))
9697

9798
def test_list_call_recordings(self) -> None:
9899
"""Test case for list_call_recordings
@@ -126,6 +127,7 @@ def test_list_call_recordings(self) -> None:
126127
assert_that(response.data[0].transcription.status, instance_of(str))
127128
assert_that(response.data[0].transcription.completed_time, instance_of(datetime))
128129
assert_that(response.data[0].transcription.url, starts_with('http'))
130+
assert_that(response.data[0].recording_name, instance_of(str))
129131

130132
@unittest.skip("skip due to prism error")
131133
def test_get_call_recording(self) -> None:
@@ -160,6 +162,7 @@ def test_get_call_recording(self) -> None:
160162
assert_that(response.data.transcription.status, instance_of(str))
161163
assert_that(response.data.transcription.completed_time, instance_of(datetime))
162164
assert_that(response.data.transcription.url, starts_with('http'))
165+
assert_that(response.data.recording_name, instance_of(str))
163166

164167
def test_download_call_recording(self) -> None:
165168
"""Test case for download_call_recording

0 commit comments

Comments
 (0)