Skip to content

Commit 47a9d68

Browse files
authored
Merge branch 'main' into VAPI-3161-add-refer-verb
2 parents 882735a + 93c52d9 commit 47a9d68

28 files changed

Lines changed: 222 additions & 54 deletions

bandwidth.yml

Lines changed: 80 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2436,6 +2436,7 @@ components:
24362436
- media
24372437
rbmCardContent:
24382438
type: object
2439+
description: Must contain at least one of title, description, or media to be valid.
24392440
properties:
24402441
title:
24412442
type: string
@@ -2478,7 +2479,6 @@ components:
24782479
$ref: '#/components/schemas/multiChannelFullActions'
24792480
required:
24802481
- orientation
2481-
- thumbnailImageAlignment
24822482
- cardContent
24832483
standaloneCardOrientationEnum:
24842484
type: string
@@ -2489,8 +2489,8 @@ components:
24892489
thumbnailAlignmentEnum:
24902490
type: string
24912491
description: >-
2492-
The alignment of the thumbnail image in the card. Only applicable if the
2493-
card using horizontal orientation.
2492+
The alignment of the thumbnail image in the card. Required when
2493+
orientation is HORIZONTAL.
24942494
enum:
24952495
- LEFT
24962496
- RIGHT
@@ -2505,6 +2505,7 @@ components:
25052505
type: array
25062506
items:
25072507
$ref: '#/components/schemas/rbmCardContent'
2508+
minItems: 2
25082509
maxItems: 10
25092510
suggestions:
25102511
$ref: '#/components/schemas/multiChannelFullActions'
@@ -2568,7 +2569,11 @@ components:
25682569
type: string
25692570
description: >-
25702571
Defines the layout of the WebView on a mobile device. It must be defined
2571-
when application is set to `WEBVIEW`
2572+
2573+
when application is set to `WEBVIEW` and must not be set when
2574+
application
2575+
2576+
is set to `BROWSER`.
25722577
25732578
- `FULL` WebView takes the full screen.
25742579
@@ -2626,12 +2631,16 @@ components:
26262631
latitude:
26272632
type: string
26282633
format: double
2629-
description: The latitude of the location.
2634+
description: >-
2635+
The latitude of the location. Must be in range [-90.000000,
2636+
90.000000].
26302637
example: '37.7749'
26312638
longitude:
26322639
type: string
26332640
format: double
2634-
description: The longitude of the location.
2641+
description: >-
2642+
The longitude of the location. Must be in range [-180.000000,
2643+
180.000000].
26352644
example: '-122.4194'
26362645
label:
26372646
type: string
@@ -2655,12 +2664,16 @@ components:
26552664
startTime:
26562665
type: string
26572666
format: date-time
2658-
description: The start time of the event.
2667+
description: >-
2668+
The start time of the event. Must be a valid RFC-3339 value,
2669+
e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00.
26592670
example: 2022-09-14T18:20:16.000Z
26602671
endTime:
26612672
type: string
26622673
format: date-time
2663-
description: The end time of the event.
2674+
description: >-
2675+
The end time of the event. Must be a valid RFC-3339 value, e.g.,
2676+
2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00.
26642677
example: 2022-09-14T18:20:16.000Z
26652678
description:
26662679
type: string
@@ -2680,7 +2693,7 @@ components:
26802693
url:
26812694
type: string
26822695
format: uri
2683-
description: The URL to open in browser.
2696+
description: The URL to open in browser. Must use http:// or https:// scheme.
26842697
example: https://dev.bandwidth.com
26852698
maxLength: 2048
26862699
application:
@@ -5759,6 +5772,19 @@ components:
57595772
items:
57605773
type: string
57615774
pattern: ^\+[1-9]\d{1,14}$
5775+
rcsAgent:
5776+
type: string
5777+
description: >-
5778+
Override the default RCS sender/agent ID used when checking RCS
5779+
capabilities.
5780+
5781+
When provided, this value is used as the `sender` in the RCS
5782+
capability-check request instead of the account default.
5783+
5784+
Must be 1–40 characters and contain only letters, digits,
5785+
underscores, or hyphens.
5786+
pattern: ^[A-Za-z0-9_-]{1,40}$
5787+
example: MyCustomRcsAgent
57625788
required:
57635789
- phoneNumbers
57645790
asyncLookupRequest:
@@ -6008,12 +6034,30 @@ components:
60086034
description: Reason code for denial.
60096035
type: integer
60106036
example: 511
6037+
denialStatusCodeNullable:
6038+
description: Reason code for denial.
6039+
nullable: true
6040+
type: integer
6041+
example: 511
60116042
resubmitAllowed:
60126043
description: >-
60136044
Whether a Toll-Free Verification request qualifies for resubmission via
60146045
PUT.
60156046
example: true
60166047
type: boolean
6048+
additionalDenialReason:
6049+
type: object
6050+
properties:
6051+
statusCode:
6052+
$ref: '#/components/schemas/denialStatusCode'
6053+
reason:
6054+
$ref: '#/components/schemas/declineReasonDescription'
6055+
resubmitAllowed:
6056+
$ref: '#/components/schemas/resubmitAllowed'
6057+
required:
6058+
- statusCode
6059+
- reason
6060+
- resubmitAllowed
60176061
blocked:
60186062
description: >-
60196063
Whether a Toll-Free Verification is blocked. This attribute will only be
@@ -6168,19 +6212,6 @@ components:
61686212
type: boolean
61696213
description: Indicates whether the content is age-gated.
61706214
example: false
6171-
additionalDenialReason:
6172-
properties:
6173-
statusCode:
6174-
$ref: '#/components/schemas/denialStatusCode'
6175-
reason:
6176-
$ref: '#/components/schemas/declineReasonDescription'
6177-
resubmitAllowed:
6178-
$ref: '#/components/schemas/resubmitAllowed'
6179-
required:
6180-
- statusCode
6181-
- reason
6182-
- resubmitAllowed
6183-
type: object
61846215
internalTicketNumber:
61856216
type: string
61866217
description: >-
@@ -6376,6 +6407,7 @@ components:
63766407
description: >-
63776408
An optional list of denial reasons in addition to
63786409
declineReasonDescription when multiple reasons apply.
6410+
type: array
63796411
items:
63806412
$ref: '#/components/schemas/additionalDenialReason'
63816413
example:
@@ -6385,7 +6417,6 @@ components:
63856417
- statusCode: 513
63866418
reason: Reason B
63876419
resubmitAllowed: true
6388-
type: array
63896420
declineReasonDescription:
63906421
$ref: '#/components/schemas/declineReasonDescription'
63916422
denialStatusCode:
@@ -6753,6 +6784,23 @@ components:
67536784
$ref: '#/components/schemas/internalTicketNumber'
67546785
declineReasonDescription:
67556786
$ref: '#/components/schemas/declineReasonDescription'
6787+
denialStatusCode:
6788+
$ref: '#/components/schemas/denialStatusCodeNullable'
6789+
additionalDenialReasons:
6790+
description: >-
6791+
An optional list of denial reasons in addition to
6792+
declineReasonDescription when multiple reasons apply.
6793+
nullable: true
6794+
type: array
6795+
items:
6796+
$ref: '#/components/schemas/additionalDenialReason'
6797+
example:
6798+
- statusCode: 512
6799+
reason: Reason A
6800+
resubmitAllowed: true
6801+
- statusCode: 513
6802+
reason: Reason B
6803+
resubmitAllowed: true
67566804
resubmitAllowed:
67576805
$ref: '#/components/schemas/resubmitAllowed'
67586806
createdDateTime:
@@ -8758,6 +8806,13 @@ components:
87588806
phoneNumbers:
87598807
- '+19196104423'
87608808
- '+19196104424'
8809+
rcsAgentRequestExample:
8810+
summary: Number Lookup Request with Custom RCS Agent
8811+
value:
8812+
phoneNumbers:
8813+
- '+19196104423'
8814+
- '+19196104424'
8815+
rcsAgent: MyCustomRcsAgent
87618816
lookupAcceptedExample:
87628817
summary: Numbers Lookup Accepted
87638818
value:
@@ -9518,6 +9573,8 @@ components:
95189573
$ref: '#/components/examples/singleNumberRequestExample'
95199574
multipleNumberRequestExample:
95209575
$ref: '#/components/examples/multipleNumberRequestExample'
9576+
rcsAgentRequestExample:
9577+
$ref: '#/components/examples/rcsAgentRequestExample'
95219578
createAsyncBulkLookupRequest:
95229579
description: Asynchronous bulk phone number lookup request.
95239580
required: true

bandwidth/models/multi_channel_action_calendar_event.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ class MultiChannelActionCalendarEvent(BaseModel):
3434
text: Annotated[str, Field(strict=True, max_length=25)] = Field(description="Displayed text for user to click")
3535
postback_data: Union[Annotated[bytes, Field(strict=True, max_length=2048)], Annotated[str, Field(strict=True, max_length=2048)]] = Field(description="Base64 payload the customer receives when the reply is clicked.", alias="postbackData")
3636
title: Annotated[str, Field(strict=True, max_length=100)] = Field(description="The title of the event.")
37-
start_time: datetime = Field(description="The start time of the event.", alias="startTime")
38-
end_time: datetime = Field(description="The end time of the event.", alias="endTime")
37+
start_time: datetime = Field(description="The start time of the event. Must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00.", alias="startTime")
38+
end_time: datetime = Field(description="The end time of the event. Must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00.", alias="endTime")
3939
description: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="The description of the event.")
4040
additional_properties: Dict[str, Any] = {}
4141
__properties: ClassVar[List[str]] = ["type", "text", "postbackData", "title", "startTime", "endTime", "description"]

bandwidth/models/rbm_action_open_url.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class RbmActionOpenUrl(BaseModel):
3434
type: RbmActionTypeEnum
3535
text: Annotated[str, Field(strict=True, max_length=25)] = Field(description="Displayed text for user to click")
3636
postback_data: Union[Annotated[bytes, Field(strict=True, max_length=2048)], Annotated[str, Field(strict=True, max_length=2048)]] = Field(description="Base64 payload the customer receives when the reply is clicked.", alias="postbackData")
37-
url: Annotated[str, Field(strict=True, max_length=2048)] = Field(description="The URL to open in browser.")
37+
url: Annotated[str, Field(strict=True, max_length=2048)] = Field(description="The URL to open in browser. Must use http:// or https:// scheme.")
3838
application: Optional[RbmOpenUrlEnum] = None
3939
webview_view_mode: Optional[RbmWebViewEnum] = Field(default=None, alias="webviewViewMode")
4040
additional_properties: Dict[str, Any] = {}

bandwidth/models/rbm_action_view_location.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ class RbmActionViewLocation(BaseModel):
3232
type: RbmActionTypeEnum
3333
text: Annotated[str, Field(strict=True, max_length=25)] = Field(description="Displayed text for user to click")
3434
postback_data: Union[Annotated[bytes, Field(strict=True, max_length=2048)], Annotated[str, Field(strict=True, max_length=2048)]] = Field(description="Base64 payload the customer receives when the reply is clicked.", alias="postbackData")
35-
latitude: StrictStr = Field(description="The latitude of the location.")
36-
longitude: StrictStr = Field(description="The longitude of the location.")
35+
latitude: StrictStr = Field(description="The latitude of the location. Must be in range [-90.000000, 90.000000].")
36+
longitude: StrictStr = Field(description="The longitude of the location. Must be in range [-180.000000, 180.000000].")
3737
label: Optional[Annotated[str, Field(strict=True, max_length=100)]] = Field(default=None, description="The label of the location.")
3838
additional_properties: Dict[str, Any] = {}
3939
__properties: ClassVar[List[str]] = ["type", "text", "postbackData", "latitude", "longitude", "label"]

bandwidth/models/rbm_card_content.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
class RbmCardContent(BaseModel):
3030
"""
31-
RbmCardContent
31+
Must contain at least one of title, description, or media to be valid.
3232
""" # noqa: E501
3333
title: Optional[Annotated[str, Field(strict=True, max_length=200)]] = Field(default=None, description="The title of the card. Must be 200 characters or less.")
3434
description: Optional[Annotated[str, Field(strict=True, max_length=2000)]] = Field(default=None, description="The description of the card. Must be 2000 characters or less.")

bandwidth/models/rbm_message_carousel_card.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class RbmMessageCarouselCard(BaseModel):
3232
RbmMessageCarouselCard
3333
""" # noqa: E501
3434
card_width: CardWidthEnum = Field(alias="cardWidth")
35-
card_contents: Annotated[List[RbmCardContent], Field(max_length=10)] = Field(alias="cardContents")
35+
card_contents: Annotated[List[RbmCardContent], Field(min_length=2, max_length=10)] = Field(alias="cardContents")
3636
suggestions: Optional[Annotated[List[MultiChannelAction], Field(max_length=11)]] = Field(default=None, description="An array of suggested actions for the recipient.")
3737
additional_properties: Dict[str, Any] = {}
3838
__properties: ClassVar[List[str]] = ["cardWidth", "cardContents", "suggestions"]

bandwidth/models/rbm_standalone_card.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class RbmStandaloneCard(BaseModel):
3333
RbmStandaloneCard
3434
""" # noqa: E501
3535
orientation: StandaloneCardOrientationEnum
36-
thumbnail_image_alignment: ThumbnailAlignmentEnum = Field(alias="thumbnailImageAlignment")
36+
thumbnail_image_alignment: Optional[ThumbnailAlignmentEnum] = Field(default=None, alias="thumbnailImageAlignment")
3737
card_content: RbmCardContent = Field(alias="cardContent")
3838
suggestions: Optional[Annotated[List[MultiChannelAction], Field(max_length=11)]] = Field(default=None, description="An array of suggested actions for the recipient.")
3939
additional_properties: Dict[str, Any] = {}

bandwidth/models/rbm_web_view_enum.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
class RbmWebViewEnum(str, Enum):
2323
"""
24-
Defines the layout of the WebView on a mobile device. It must be defined when application is set to `WEBVIEW` - `FULL` WebView takes the full screen. - `HALF` WebView takes half of the screen. - `TALL` WebView takes three-quarters of the screen.
24+
Defines the layout of the WebView on a mobile device. It must be defined when application is set to `WEBVIEW` and must not be set when application is set to `BROWSER`. - `FULL` WebView takes the full screen. - `HALF` WebView takes half of the screen. - `TALL` WebView takes three-quarters of the screen.
2525
"""
2626

2727
"""

bandwidth/models/sync_lookup_request.py

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import json
2020

2121
from pydantic import BaseModel, ConfigDict, Field, field_validator
22-
from typing import Any, ClassVar, Dict, List
22+
from typing import Any, ClassVar, Dict, List, Optional
2323
from typing_extensions import Annotated
2424
from typing import Optional, Set
2525
from typing_extensions import Self
@@ -29,8 +29,19 @@ class SyncLookupRequest(BaseModel):
2929
SyncLookupRequest
3030
""" # noqa: E501
3131
phone_numbers: List[Annotated[str, Field(strict=True)]] = Field(description="Telephone numbers in E.164 format.", alias="phoneNumbers")
32+
rcs_agent: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Override the default RCS sender/agent ID used when checking RCS capabilities. When provided, this value is used as the `sender` in the RCS capability-check request instead of the account default. Must be 1–40 characters and contain only letters, digits, underscores, or hyphens.", alias="rcsAgent")
3233
additional_properties: Dict[str, Any] = {}
33-
__properties: ClassVar[List[str]] = ["phoneNumbers"]
34+
__properties: ClassVar[List[str]] = ["phoneNumbers", "rcsAgent"]
35+
36+
@field_validator('rcs_agent')
37+
def rcs_agent_validate_regular_expression(cls, value):
38+
"""Validates the regular expression"""
39+
if value is None:
40+
return value
41+
42+
if not re.match(r"^[A-Za-z0-9_-]{1,40}$", value):
43+
raise ValueError(r"must validate the regular expression /^[A-Za-z0-9_-]{1,40}$/")
44+
return value
3445

3546
model_config = ConfigDict(
3647
populate_by_name=True,
@@ -90,7 +101,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
90101
return cls.model_validate(obj)
91102

92103
_obj = cls.model_validate({
93-
"phoneNumbers": obj.get("phoneNumbers")
104+
"phoneNumbers": obj.get("phoneNumbers"),
105+
"rcsAgent": obj.get("rcsAgent")
94106
})
95107
# store additional fields in additional_properties
96108
for _key in obj.keys():

0 commit comments

Comments
 (0)