Skip to content

Commit d85f4ad

Browse files
band-swi-release-engineering[bot]DX-Bandwidthckoegel
authored
SWI-12184 Update SDK Based on Recent Spec Changes (#308)
* Generate SDK with OpenAPI Generator Version * unit tests --------- Co-authored-by: DX-Bandwidth <dx@bandwidth.com> Co-authored-by: ckoegel <ckoegel1006@gmail.com>
1 parent 77d19bf commit d85f4ad

53 files changed

Lines changed: 469 additions & 44 deletions

Some content is hidden

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

.openapi-generator/FILES

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,8 @@ bandwidth/models/recording_transcription_metadata.py
177177
bandwidth/models/recording_transcriptions.py
178178
bandwidth/models/redirect_callback.py
179179
bandwidth/models/redirect_method_enum.py
180+
bandwidth/models/refer_call_status_enum.py
181+
bandwidth/models/refer_complete_callback.py
180182
bandwidth/models/sip_connection_metadata.py
181183
bandwidth/models/sip_credentials.py
182184
bandwidth/models/sms_message_content.py
@@ -387,6 +389,8 @@ docs/RecordingTranscriptions.md
387389
docs/RecordingsApi.md
388390
docs/RedirectCallback.md
389391
docs/RedirectMethodEnum.md
392+
docs/ReferCallStatusEnum.md
393+
docs/ReferCompleteCallback.md
390394
docs/SipConnectionMetadata.md
391395
docs/SipCredentials.md
392396
docs/SmsMessageContent.md

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,8 @@ Class | Method | HTTP request | Description
319319
- [RecordingTranscriptions](docs/RecordingTranscriptions.md)
320320
- [RedirectCallback](docs/RedirectCallback.md)
321321
- [RedirectMethodEnum](docs/RedirectMethodEnum.md)
322+
- [ReferCallStatusEnum](docs/ReferCallStatusEnum.md)
323+
- [ReferCompleteCallback](docs/ReferCompleteCallback.md)
322324
- [SipConnectionMetadata](docs/SipConnectionMetadata.md)
323325
- [SipCredentials](docs/SipCredentials.md)
324326
- [SmsMessageContent](docs/SmsMessageContent.md)

bandwidth.yml

Lines changed: 63 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3184,6 +3184,13 @@ components:
31843184
- outbound
31853185
description: The direction of the call.
31863186
example: inbound
3187+
referCallStatusEnum:
3188+
type: string
3189+
enum:
3190+
- success
3191+
- failure
3192+
description: The outcome of the REFER operation.
3193+
example: success
31873194
fileFormatEnum:
31883195
type: string
31893196
enum:
@@ -5134,6 +5141,45 @@ components:
51345141
$ref: '#/components/schemas/transferCallerId'
51355142
transferTo:
51365143
$ref: '#/components/schemas/transferTo'
5144+
referCompleteCallback:
5145+
type: object
5146+
description: >-
5147+
This event is sent to the referCompleteUrl of a call's <Refer> verb when
5148+
the SIP REFER flow completes. On success, the call has been torn down
5149+
and the BXML returned from this callback is ignored. On failure, the
5150+
call remains active and the BXML returned from this callback is executed
5151+
on the call.
5152+
properties:
5153+
eventType:
5154+
$ref: '#/components/schemas/eventType'
5155+
eventTime:
5156+
$ref: '#/components/schemas/eventTime'
5157+
accountId:
5158+
$ref: '#/components/schemas/accountId'
5159+
applicationId:
5160+
$ref: '#/components/schemas/applicationId1'
5161+
from:
5162+
$ref: '#/components/schemas/from'
5163+
to:
5164+
$ref: '#/components/schemas/to'
5165+
direction:
5166+
$ref: '#/components/schemas/callDirectionEnum'
5167+
callId:
5168+
$ref: '#/components/schemas/callId'
5169+
callUrl:
5170+
$ref: '#/components/schemas/callUrl'
5171+
startTime:
5172+
$ref: '#/components/schemas/startTime'
5173+
answerTime:
5174+
$ref: '#/components/schemas/answerTime'
5175+
tag:
5176+
$ref: '#/components/schemas/tag1'
5177+
referCallStatus:
5178+
$ref: '#/components/schemas/referCallStatusEnum'
5179+
referSipResponseCode:
5180+
$ref: '#/components/schemas/referSipResponseCode'
5181+
notifySipResponseCode:
5182+
$ref: '#/components/schemas/notifySipResponseCode'
51375183
transcriptionAvailableCallback:
51385184
type: object
51395185
description: >-
@@ -5326,8 +5372,8 @@ components:
53265372
conferenceRedirect, conferenceMemberJoin, conferenceMemberExit,
53275373
conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf,
53285374
gather, initiate, machineDetectionComplete, recordingComplete,
5329-
recordingAvailable, redirect, transcriptionAvailable, transferAnswer,
5330-
transferComplete, transferDisconnect.
5375+
recordingAvailable, redirect, referComplete, transcriptionAvailable,
5376+
transferAnswer, transferComplete, transferDisconnect.
53315377
example: bridgeComplete
53325378
eventTime:
53335379
type: string
@@ -5479,6 +5525,21 @@ components:
54795525
or it was previously cleared, this field will not be present.
54805526
example: exampleTag
54815527
nullable: true
5528+
referSipResponseCode:
5529+
type: integer
5530+
description: >-
5531+
(optional) The SIP response code returned for the REFER request itself
5532+
(e.g. 202, 405, 603). Present when a SIP response was received for the
5533+
REFER.
5534+
example: 202
5535+
notifySipResponseCode:
5536+
type: integer
5537+
description: >-
5538+
(optional) The final SIP response code reported via NOTIFY
5539+
(message/sipfrag body). Present only when the caller's endpoint sent a
5540+
final NOTIFY (e.g. 200, 404, 486, 503). Not present on NOTIFY timeout or
5541+
when the REFER was rejected before a subscription was established.
5542+
example: 200
54825543
cause:
54835544
type: string
54845545
description: >-

bandwidth/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,8 @@
197197
"RecordingTranscriptions",
198198
"RedirectCallback",
199199
"RedirectMethodEnum",
200+
"ReferCallStatusEnum",
201+
"ReferCompleteCallback",
200202
"SipConnectionMetadata",
201203
"SipCredentials",
202204
"SmsMessageContent",
@@ -424,6 +426,8 @@
424426
from bandwidth.models.recording_transcriptions import RecordingTranscriptions as RecordingTranscriptions
425427
from bandwidth.models.redirect_callback import RedirectCallback as RedirectCallback
426428
from bandwidth.models.redirect_method_enum import RedirectMethodEnum as RedirectMethodEnum
429+
from bandwidth.models.refer_call_status_enum import ReferCallStatusEnum as ReferCallStatusEnum
430+
from bandwidth.models.refer_complete_callback import ReferCompleteCallback as ReferCompleteCallback
427431
from bandwidth.models.sip_connection_metadata import SipConnectionMetadata as SipConnectionMetadata
428432
from bandwidth.models.sip_credentials import SipCredentials as SipCredentials
429433
from bandwidth.models.sms_message_content import SmsMessageContent as SmsMessageContent

bandwidth/models/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,8 @@
171171
from bandwidth.models.recording_transcriptions import RecordingTranscriptions
172172
from bandwidth.models.redirect_callback import RedirectCallback
173173
from bandwidth.models.redirect_method_enum import RedirectMethodEnum
174+
from bandwidth.models.refer_call_status_enum import ReferCallStatusEnum
175+
from bandwidth.models.refer_complete_callback import ReferCompleteCallback
174176
from bandwidth.models.sip_connection_metadata import SipConnectionMetadata
175177
from bandwidth.models.sip_credentials import SipCredentials
176178
from bandwidth.models.sms_message_content import SmsMessageContent

bandwidth/models/answer_callback.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class AnswerCallback(BaseModel):
3030
"""
3131
The Answer event is sent to the answerUrl specified in the createCall request when an outbound call is answered.
3232
""" # noqa: E501
33-
event_type: Optional[StrictStr] = Field(default=None, description="The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect.", alias="eventType")
33+
event_type: Optional[StrictStr] = Field(default=None, description="The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect.", alias="eventType")
3434
event_time: Optional[datetime] = Field(default=None, description="The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution.", alias="eventTime")
3535
account_id: Optional[StrictStr] = Field(default=None, description="The user account associated with the call.", alias="accountId")
3636
application_id: Optional[StrictStr] = Field(default=None, description="The id of the application associated with the call.", alias="applicationId")

bandwidth/models/bridge_complete_callback.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class BridgeCompleteCallback(BaseModel):
2929
"""
3030
If the target call leaves the <Bridge>, then this callback is sent to the bridgeCompleteUrl, and the BXML returned in it is executed on the call. If this webhook is sent, the Bridge Target Complete webhook is NOT sent. This callback is also sent if any problem occurs that prevents the calls to be bridged.
3131
""" # noqa: E501
32-
event_type: Optional[StrictStr] = Field(default=None, description="The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect.", alias="eventType")
32+
event_type: Optional[StrictStr] = Field(default=None, description="The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect.", alias="eventType")
3333
event_time: Optional[datetime] = Field(default=None, description="The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution.", alias="eventTime")
3434
account_id: Optional[StrictStr] = Field(default=None, description="The user account associated with the call.", alias="accountId")
3535
application_id: Optional[StrictStr] = Field(default=None, description="The id of the application associated with the call.", alias="applicationId")

bandwidth/models/bridge_target_complete_callback.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class BridgeTargetCompleteCallback(BaseModel):
2929
"""
3030
If the originating call leaves the <Bridge>, then this callback is sent to the bridgeTargetCompleteUrl, and the BXML returned in it is executed on the target call. If this webhook is sent, the Bridge Complete webhook is NOT sent.
3131
""" # noqa: E501
32-
event_type: Optional[StrictStr] = Field(default=None, description="The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect.", alias="eventType")
32+
event_type: Optional[StrictStr] = Field(default=None, description="The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect.", alias="eventType")
3333
event_time: Optional[datetime] = Field(default=None, description="The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution.", alias="eventTime")
3434
account_id: Optional[StrictStr] = Field(default=None, description="The user account associated with the call.", alias="accountId")
3535
application_id: Optional[StrictStr] = Field(default=None, description="The id of the application associated with the call.", alias="applicationId")

bandwidth/models/conference_completed_callback.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class ConferenceCompletedCallback(BaseModel):
2828
"""
2929
The Conference Completed event is fired when the last member leaves the conference. The response to this event may not contain BXML.
3030
""" # noqa: E501
31-
event_type: Optional[StrictStr] = Field(default=None, description="The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect.", alias="eventType")
31+
event_type: Optional[StrictStr] = Field(default=None, description="The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect.", alias="eventType")
3232
event_time: Optional[datetime] = Field(default=None, description="The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution.", alias="eventTime")
3333
conference_id: Optional[StrictStr] = Field(default=None, description="The unique, Bandwidth-generated ID of the conference that was recorded", alias="conferenceId")
3434
name: Optional[StrictStr] = Field(default=None, description="The user-specified name of the conference that was recorded")

bandwidth/models/conference_created_callback.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class ConferenceCreatedCallback(BaseModel):
2828
"""
2929
The Conference Created event is fired whenever a new conference that specified a callbackUrl is created. The response may be either empty or a BXML document. Only the following verbs are valid for conferences: PlayAudio, SpeakSentence, StartRecording, StopRecording, PauseRecording, ResumeRecording. Audio verbs will be heard by all members of the conference. Recordings capture audio from all members who are not muted or on hold, as well as any audio verbs that are played into the conference.
3030
""" # noqa: E501
31-
event_type: Optional[StrictStr] = Field(default=None, description="The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect.", alias="eventType")
31+
event_type: Optional[StrictStr] = Field(default=None, description="The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect.", alias="eventType")
3232
event_time: Optional[datetime] = Field(default=None, description="The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution.", alias="eventTime")
3333
conference_id: Optional[StrictStr] = Field(default=None, description="The unique, Bandwidth-generated ID of the conference that was recorded", alias="conferenceId")
3434
name: Optional[StrictStr] = Field(default=None, description="The user-specified name of the conference that was recorded")

0 commit comments

Comments
 (0)