Skip to content

Commit 568b2a5

Browse files
authored
Merge branch 'main' into brtc-sdks
2 parents ff44833 + 13c9969 commit 568b2a5

6 files changed

Lines changed: 134 additions & 37 deletions

File tree

bandwidth.yml

Lines changed: 121 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5727,6 +5727,10 @@ components:
57275727
example: GET
57285728
lookupErrorSchema:
57295729
type: object
5730+
required:
5731+
- code
5732+
- type
5733+
- description
57305734
properties:
57315735
code:
57325736
type: string
@@ -5874,6 +5878,39 @@ components:
58745878
type: array
58755879
items:
58765880
$ref: '#/components/schemas/lookupErrorSchema'
5881+
rcsErrorEnum:
5882+
type: string
5883+
description: >-
5884+
[RCS-Only](#section/RCS-Only). Error encountered during RCS capability
5885+
lookup. Appears as the `code` field in the top-level `errors` array.
5886+
5887+
5888+
**RCS service pass-through codes:**
5889+
5890+
- `REQUEST_FAILED`: The RCS service returned this error code.
5891+
5892+
- `UNKNOWN_CODE`: The RCS service returned this error code.
5893+
5894+
- `INVALID_DESTINATION_ADDRESS`: The RCS service returned this error
5895+
code.
5896+
5897+
- `UNKNOWN_STATUS: <code>`: The RCS service returned an unrecognized
5898+
status code, where `<code>` is the raw value.
5899+
5900+
5901+
**Service-level errors:**
5902+
5903+
- `MISSING_FROM_RESPONSE`: The phone number was absent from the RCS
5904+
service response.
5905+
5906+
- `RCS_SERVICE_UNAVAILABLE`: An exception was thrown during the async
5907+
RCS service call.
5908+
5909+
- `RCS_SERVICE_DISABLED`: RCS lookup is disabled in configuration.
5910+
5911+
- `EMPTY_RESPONSE`: The RCS service returned a null or empty response
5912+
body.
5913+
example: RCS_SERVICE_UNAVAILABLE
58775914
lookupResult:
58785915
type: object
58795916
description: Carrier information results for the specified telephone number.
@@ -5939,6 +5976,14 @@ components:
59395976
59405977
Value resets every time the `latestMessageDeliveryStatus` changes.
59415978
example: '2025-06-21'
5979+
rcsEnabled:
5980+
type: boolean
5981+
description: >
5982+
[RCS-Only](#section/RCS-Only). Indicates whether the phone number is
5983+
capable of receiving RCS messages. Value will be null if account has
5984+
RCS, but no value was returned. Absent when account does not have
5985+
RCS.
5986+
example: true
59425987
accountId1:
59435988
type: string
59445989
description: User's account ID.
@@ -7621,6 +7666,10 @@ components:
76217666
$ref: '#/components/examples/lookupCompleteWithDniExample'
76227667
lookupCompleteExample:
76237668
$ref: '#/components/examples/lookupCompleteExample'
7669+
lookupCompleteWithRcsExample:
7670+
$ref: '#/components/examples/lookupCompleteWithRcsExample'
7671+
lookupCompleteWithRcsErrorExample:
7672+
$ref: '#/components/examples/lookupCompleteWithRcsErrorExample'
76247673
lookupPartialExample:
76257674
$ref: '#/components/examples/lookupPartialExample'
76267675
lookupFailedExample:
@@ -7632,8 +7681,8 @@ components:
76327681
schema:
76337682
$ref: '#/components/schemas/createAsyncBulkLookupResponse'
76347683
examples:
7635-
lookupInProgressExample:
7636-
$ref: '#/components/examples/lookupInProgressExample'
7684+
lookupAcceptedExample:
7685+
$ref: '#/components/examples/lookupAcceptedExample'
76377686
getAsyncBulkLookupResponse:
76387687
description: OK
76397688
content:
@@ -8659,25 +8708,32 @@ components:
86598708
phoneNumbers:
86608709
- '+19196104423'
86618710
- '+19196104424'
8662-
lookupInProgressExample:
8663-
summary: Numbers Lookup In Progress
8711+
lookupAcceptedExample:
8712+
summary: Numbers Lookup Accepted
86648713
value:
86658714
links:
8666-
- href: href
8667-
rel: rel
8715+
- href: >-
8716+
/accounts/9912345/phoneNumberLookup/bulk/004223a0-8b17-41b1-bf81-20732adf5590
8717+
rel: createdRequest
86688718
method: GET
86698719
data:
86708720
requestId: 004223a0-8b17-41b1-bf81-20732adf5590
86718721
status: IN_PROGRESS
86728722
results: []
86738723
errors: []
8724+
lookupInProgressExample:
8725+
summary: Numbers Lookup In Progress
8726+
value:
8727+
links: []
8728+
data:
8729+
requestId: 004223a0-8b17-41b1-bf81-20732adf5590
8730+
status: IN_PROGRESS
8731+
results: []
8732+
errors: []
86748733
lookupFailedExample:
86758734
summary: Numbers Lookup Failed
86768735
value:
8677-
links:
8678-
- href: href
8679-
rel: rel
8680-
method: GET
8736+
links: []
86818737
data:
86828738
requestId: 004223a0-8b17-41b1-bf81-20732adf5590
86838739
status: FAILED
@@ -8694,10 +8750,7 @@ components:
86948750
lookupPartialExample:
86958751
summary: Numbers Lookup Partial Complete
86968752
value:
8697-
links:
8698-
- href: href
8699-
rel: rel
8700-
method: GET
8753+
links: []
87018754
data:
87028755
requestId: 004223a0-8b17-41b1-bf81-20732adf5590
87038756
status: PARTIAL_COMPLETE
@@ -8724,10 +8777,7 @@ components:
87248777
lookupCompleteExample:
87258778
summary: Numbers Lookup Complete (without DNI)
87268779
value:
8727-
links:
8728-
- href: href
8729-
rel: rel
8730-
method: GET
8780+
links: []
87318781
data:
87328782
requestId: 004223a0-8b17-41b1-bf81-20732adf5590
87338783
status: COMPLETE
@@ -8746,10 +8796,7 @@ components:
87468796
lookupCompleteWithDniExample:
87478797
summary: Numbers Lookup Complete (with DNI)
87488798
value:
8749-
links:
8750-
- href: href
8751-
rel: rel
8752-
method: GET
8799+
links: []
87538800
data:
87548801
requestId: 20732adf-bf81-8b17-41b1-004223a05590
87558802
status: COMPLETE
@@ -8787,6 +8834,58 @@ components:
87878834
deactivationEvent: DEACTIVATED
87888835
latestMessageDeliveryStatus: NOT_ENABLED
87898836
errors: []
8837+
lookupCompleteWithRcsExample:
8838+
summary: Numbers Lookup Complete (with RCS)
8839+
value:
8840+
links: []
8841+
data:
8842+
requestId: 004223a0-8b17-41b1-bf81-20732adf5590
8843+
status: COMPLETE
8844+
results:
8845+
- phoneNumber: '+10072904497'
8846+
lineType: MOBILE
8847+
messagingProvider: Verizon Wireless
8848+
voiceProvider: Verizon Wireless
8849+
countryCodeA3: USA
8850+
rcsEnabled: true
8851+
- phoneNumber: '+10072904498'
8852+
lineType: MOBILE
8853+
messagingProvider: T-Mobile USA
8854+
voiceProvider: T-Mobile USA
8855+
countryCodeA3: USA
8856+
rcsEnabled: false
8857+
errors: []
8858+
lookupCompleteWithRcsErrorExample:
8859+
summary: Numbers Lookup Complete (with RCS error)
8860+
value:
8861+
links: []
8862+
data:
8863+
requestId: 004223a0-8b17-41b1-bf81-20732adf5590
8864+
status: COMPLETE
8865+
results:
8866+
- phoneNumber: '+10072904497'
8867+
lineType: MOBILE
8868+
messagingProvider: Verizon Wireless
8869+
voiceProvider: Verizon Wireless
8870+
countryCodeA3: USA
8871+
- phoneNumber: '+10072904498'
8872+
lineType: MOBILE
8873+
messagingProvider: T-Mobile USA
8874+
voiceProvider: T-Mobile USA
8875+
countryCodeA3: USA
8876+
errors:
8877+
- code: RCS_SERVICE_UNAVAILABLE
8878+
type: rcs-error
8879+
description: An exception was thrown during the async RCS service call.
8880+
meta:
8881+
phoneNumbers:
8882+
- '+10072904497'
8883+
- code: MISSING_FROM_RESPONSE
8884+
type: rcs-error
8885+
description: The phone number was absent from the RCS service response.
8886+
meta:
8887+
phoneNumbers:
8888+
- '+10072904498'
87908889
badRequestExample:
87918890
summary: Example Bad Request Error
87928891
value:

docs/LookupErrorSchema.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55

66
Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
8-
**code** | **string** | Validation error code | [optional] [default to undefined]
9-
**description** | **string** | Description of validation error | [optional] [default to undefined]
10-
**type** | **string** | Type of validation error | [optional] [default to undefined]
8+
**code** | **string** | Validation error code | [default to undefined]
9+
**description** | **string** | Description of validation error | [default to undefined]
10+
**type** | **string** | Type of validation error | [default to undefined]
1111
**meta** | [**LookupErrorSchemaMeta**](LookupErrorSchemaMeta.md) | | [optional] [default to undefined]
1212

1313
## Example

docs/LookupResult.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ Name | Type | Description | Notes
1515
**deactivationDate** | **string** | [DNI-Only](#section/DNI-Only). The datetime the carrier reported a deactivation event. | [optional] [default to undefined]
1616
**deactivationEvent** | [**DeactivationEventEnum**](DeactivationEventEnum.md) | | [optional] [default to undefined]
1717
**latestMessageDeliveryStatus** | [**LatestMessageDeliveryStatusEnum**](LatestMessageDeliveryStatusEnum.md) | | [optional] [default to undefined]
18-
**initialMessageDeliveryStatusDate** | **string** | [DNI-Only](#section/DNI-Only). The date the phone number entered the status described in &#x60;latestMessageDeliveryStatus&#x60;. Think of this as the \&quot;start time\&quot; for that status. Value resets every time the &#x60;latestMessageDeliveryStatus&#x60; changes. | [optional] [default to undefined]
18+
**initialMessageDeliveryStatusDate** | **string** | [DNI-Only](#section/DNI-Only). The date the phone number entered the status described in &#x60;latestMessageDeliveryStatus&#x60;. Think of this as the \&quot;start time\&quot; for that status. Value resets every time the &#x60;latestMessageDeliveryStatus&#x60; changes. | [optional] [default to undefined]
1919
**latestMessageDeliveryStatusDate** | **string** | [DNI-Only](#section/DNI-Only). The date bandwidth last received delivery status information for this phone number. Use this field to understand how up-to-date the &#x60;latestMessageDeliveryStatus&#x60; is. Value resets every time the &#x60;latestMessageDeliveryStatus&#x60; changes. | [optional] [default to undefined]
20+
**rcsEnabled** | **boolean** | [RCS-Only](#section/RCS-Only). Indicates whether the phone number is capable of receiving RCS messages. Value will be null if account has RCS, but no value was returned. Absent when account does not have RCS. | [optional] [default to undefined]
2021

2122
## Example
2223

@@ -35,6 +36,7 @@ const instance: LookupResult = {
3536
latestMessageDeliveryStatus,
3637
initialMessageDeliveryStatusDate,
3738
latestMessageDeliveryStatusDate,
39+
rcsEnabled,
3840
};
3941
```
4042

models/lookup-error-schema.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ export interface LookupErrorSchema {
2121
/**
2222
* Validation error code
2323
*/
24-
'code'?: string;
24+
'code': string;
2525
/**
2626
* Description of validation error
2727
*/
28-
'description'?: string;
28+
'description': string;
2929
/**
3030
* Type of validation error
3131
*/
32-
'type'?: string;
32+
'type': string;
3333
'meta'?: LookupErrorSchemaMeta;
3434
}
3535

models/lookup-result.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ export interface LookupResult {
6262
* [DNI-Only](#section/DNI-Only). The date bandwidth last received delivery status information for this phone number. Use this field to understand how up-to-date the `latestMessageDeliveryStatus` is. Value resets every time the `latestMessageDeliveryStatus` changes.
6363
*/
6464
'latestMessageDeliveryStatusDate'?: string;
65+
/**
66+
* [RCS-Only](#section/RCS-Only). Indicates whether the phone number is capable of receiving RCS messages. Value will be null if account has RCS, but no value was returned. Absent when account does not have RCS.
67+
*/
68+
'rcsEnabled'?: boolean;
6569
}
6670

6771

tests/unit/api/phone-number-lookup-api.test.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,6 @@ describe('PhoneNumberLookupApi', () => {
4545
const { status, data } = await phoneNumberLookupApi.createSyncLookup(BW_ACCOUNT_ID, request);
4646

4747
expect(status).toEqual(200);
48-
expect(data.links[0]).toBeDefined();
49-
expect(data.links[0].rel).toBeString();
50-
expect(data.links[0].href).toBeString();
51-
expect(data.links[0].method).toBeString();
5248
expect(data.data.requestId).toBeString();
5349
expect(data.data.status).toBeOneOf(Object.values(CompletedLookupStatusEnum));
5450
expect(data.data.results).toBeInstanceOf(Array);
@@ -70,10 +66,6 @@ describe('PhoneNumberLookupApi', () => {
7066
const { status, data } = await phoneNumberLookupApi.getAsyncBulkLookup(BW_ACCOUNT_ID, requestId);
7167

7268
expect(status).toEqual(200);
73-
expect(data.links[0]).toBeDefined();
74-
expect(data.links[0].rel).toBeString();
75-
expect(data.links[0].href).toBeString();
76-
expect(data.links[0].method).toBeString();
7769
expect(data.data.requestId).toBeString();
7870
expect(data.data.status).toBeOneOf(Object.values(InProgressLookupStatusEnum));
7971
expect(data.data.results).toBeInstanceOf(Array);

0 commit comments

Comments
 (0)