From 15c95cd24b5f5541a4827d506846aa6bbcf5ac96 Mon Sep 17 00:00:00 2001 From: DX-Bandwidth Date: Tue, 21 Apr 2026 14:38:47 +0000 Subject: [PATCH 1/7] Generate SDK with OpenAPI Generator Version --- .openapi-generator/FILES | 6 + README.md | 3 + bandwidth.yml | 129 +++++++++++++++++----- docs/Callback.md | 4 +- docs/CreateCall.md | 4 +- docs/CreateEndpointResponse.md | 4 +- docs/EndpointResponse.md | 4 +- docs/EndpointsApi.md | 10 +- docs/Error1.md | 28 +++++ docs/Error1Source.md | 26 +++++ docs/ErrorResponse.md | 4 +- docs/InboundCallback.md | 4 +- docs/InboundCallbackTypeEnum.md | 2 +- docs/Link1.md | 24 ++++ docs/ListEndpointsResponse.md | 4 +- docs/MachineDetectionConfiguration.md | 2 +- docs/MessageRequest.md | 2 +- docs/RbmOpenUrlEnum.md | 2 +- docs/RbmWebViewEnum.md | 2 +- docs/StatusCallback.md | 2 +- docs/UpdateCall.md | 2 +- models/create-call.ts | 4 +- models/create-endpoint-response-data.ts | 9 +- models/create-endpoint-response.ts | 8 +- models/endpoint-response.ts | 8 +- models/endpoint.ts | 6 +- models/error-response.ts | 8 +- models/error1-source.ts | 35 ++++++ models/error1.ts | 39 +++++++ models/inbound-callback-type-enum.ts | 2 +- models/inbound-callback.ts | 4 +- models/index.ts | 3 + models/link1.ts | 40 +++++++ models/list-endpoints-response.ts | 8 +- models/lookup-result.ts | 2 +- models/machine-detection-configuration.ts | 2 +- models/message-request.ts | 2 +- models/rbm-open-url-enum.ts | 2 +- models/rbm-web-view-enum.ts | 2 +- models/status-callback.ts | 2 +- models/update-call.ts | 2 +- 41 files changed, 365 insertions(+), 91 deletions(-) create mode 100644 docs/Error1.md create mode 100644 docs/Error1Source.md create mode 100644 docs/Link1.md create mode 100644 models/error1-source.ts create mode 100644 models/error1.ts create mode 100644 models/link1.ts diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 0047818..c508267 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -81,6 +81,8 @@ docs/EndpointTypeEnum.md docs/Endpoints.md docs/EndpointsApi.md docs/Error.md +docs/Error1.md +docs/Error1Source.md docs/ErrorObject.md docs/ErrorResponse.md docs/ErrorSource.md @@ -98,6 +100,7 @@ docs/InitiateCallback.md docs/LatestMessageDeliveryStatusEnum.md docs/LineTypeEnum.md docs/Link.md +docs/Link1.md docs/LinkSchema.md docs/LinksObject.md docs/ListEndpointsResponse.md @@ -289,6 +292,8 @@ models/endpoints.ts models/error-object.ts models/error-response.ts models/error-source.ts +models/error1-source.ts +models/error1.ts models/failure-webhook.ts models/field-error.ts models/file-format-enum.ts @@ -305,6 +310,7 @@ models/latest-message-delivery-status-enum.ts models/line-type-enum.ts models/link-schema.ts models/link.ts +models/link1.ts models/links-object.ts models/list-endpoints-response.ts models/list-message-direction-enum.ts diff --git a/README.md b/README.md index a0a7a66..a085414 100644 --- a/README.md +++ b/README.md @@ -226,6 +226,8 @@ Class | Method | HTTP request | Description - [EndpointStatusEnum](docs/EndpointStatusEnum.md) - [EndpointTypeEnum](docs/EndpointTypeEnum.md) - [Endpoints](docs/Endpoints.md) + - [Error1](docs/Error1.md) + - [Error1Source](docs/Error1Source.md) - [ErrorObject](docs/ErrorObject.md) - [ErrorResponse](docs/ErrorResponse.md) - [ErrorSource](docs/ErrorSource.md) @@ -243,6 +245,7 @@ Class | Method | HTTP request | Description - [LatestMessageDeliveryStatusEnum](docs/LatestMessageDeliveryStatusEnum.md) - [LineTypeEnum](docs/LineTypeEnum.md) - [Link](docs/Link.md) + - [Link1](docs/Link1.md) - [LinkSchema](docs/LinkSchema.md) - [LinksObject](docs/LinksObject.md) - [ListEndpointsResponse](docs/ListEndpointsResponse.md) diff --git a/bandwidth.yml b/bandwidth.yml index 4378c20..c7105f3 100644 --- a/bandwidth.yml +++ b/bandwidth.yml @@ -2161,7 +2161,7 @@ components: type: string description: >- The name of the Authorized Message Provider (AMP) that handled this - message. + message. In the US, this is the carrier that the message was sent to. @@ -2248,7 +2248,7 @@ components: description: >- Either an alphanumeric sender ID or the sender's Bandwidth phone number in E.164 format, which must be hosted within Bandwidth and - linked to the account that is generating the message. + linked to the account that is generating the message. Alphanumeric Sender IDs can contain up to 11 characters, upper-case letters A-Z, lower-case letters a-z, numbers 0-9, space, hyphen -, @@ -2572,7 +2572,7 @@ components: - `BROWSER` Opens the URL in the device's default browser. If application is not set or the device doesn’t support WebView, this - option is used by default. + option is used by default. - `WEBVIEW` Opens the URL in an in-app WebView. enum: @@ -2585,7 +2585,7 @@ components: 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. + - `FULL` WebView takes the full screen. - `HALF` WebView takes half of the screen. @@ -2987,7 +2987,7 @@ components: to: type: string description: > - The destination phone number the message was sent to. + The destination phone number the message was sent to. For inbound callbacks, this is the Bandwidth number or alphanumeric identifier that received the message. @@ -3038,7 +3038,7 @@ components: client to a Bandwidth number. - `request-location-response` indicates a response to a location request - sent by the Bandwidth user's client after receiving an RBM message. + sent by the Bandwidth user's client after receiving an RBM message. - `suggestion-response` indicates a response to a suggestion sent by the Bandwidth user's client after receiving an RBM message. @@ -3277,7 +3277,7 @@ components: nullable: true type: string description: >- - The caller display name to use when the call is created. + The caller display name to use when the call is created. May not exceed 256 characters nor contain control characters such as new lines. @@ -3455,8 +3455,8 @@ components: May be cleared by setting `tag=""` - Max length 256 characters. - maxLength: 256 + Max length 4096 characters. + maxLength: 4096 example: arbitrary text here createCallResponse: type: object @@ -3833,11 +3833,11 @@ components: May be cleared by setting `tag=""`. - Max length 256 characters. + Max length 4096 characters. Not allowed if `state` is `completed`. - maxLength: 256 + maxLength: 4096 example: My Custom Tag updateCallRecording: type: object @@ -4214,7 +4214,7 @@ components: format: double description: >- When an answering machine is detected, the amount of silence (in - seconds) before assuming the message has finished playing. + seconds) before assuming the message has finished playing. If not provided it will default to the speechEndThreshold value. example: 5 @@ -5958,7 +5958,7 @@ components: format: date description: >- [DNI-Only](#section/DNI-Only). The date the phone number entered the - status described in `latestMessageDeliveryStatus`. + status described in `latestMessageDeliveryStatus`. Think of this as the "start time" for that status. @@ -7060,6 +7060,26 @@ components: required: - eventType - eventTime + link1: + type: object + properties: + href: + type: string + description: The full URL of the link. + example: >- + https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + rel: + type: string + description: The relationship of the link to the current resource. + example: self + method: + type: string + enum: + - GET + - POST + - DELETE + description: The HTTP method to use when making the request. + example: GET page: type: object properties: @@ -7085,13 +7105,57 @@ components: example: 0 required: - pageSize + error1: + type: object + properties: + id: + type: string + format: uuid + description: A unique identifier for the error. + example: 59512d87-7a92-4040-8e4a-78fb772019b9 + type: + type: string + description: The type of error. + example: resource.not_found + description: + type: string + description: A description of the error. + example: The requested resource was not found. + code: + type: string + description: A code that uniquely identifies the error. + example: '404' + source: + type: object + properties: + parameter: + type: string + description: The URI parameter that caused the error. + example: accountId + field: + type: string + description: The request body field that caused the error. + example: accountId + header: + type: string + description: The header that caused the error. + example: Authorization + reference: + type: string + description: >- + The resource ID or path to the resource (or non-existent + resource) causing the error. + example: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + required: + - type + - description listEndpointsResponse: type: object properties: links: type: array items: - $ref: '#/components/schemas/link' + $ref: '#/components/schemas/link1' page: $ref: '#/components/schemas/page' data: @@ -7101,7 +7165,7 @@ components: errors: type: array items: - $ref: '#/components/schemas/error' + $ref: '#/components/schemas/error1' required: - links - data @@ -7112,13 +7176,13 @@ components: links: type: array items: - $ref: '#/components/schemas/link' + $ref: '#/components/schemas/link1' data: $ref: '#/components/schemas/endpoint' errors: type: array items: - $ref: '#/components/schemas/error' + $ref: '#/components/schemas/error1' required: - links - data @@ -7129,13 +7193,13 @@ components: links: type: array items: - $ref: '#/components/schemas/link' + $ref: '#/components/schemas/link1' data: $ref: '#/components/schemas/createEndpointResponseData' errors: type: array items: - $ref: '#/components/schemas/error' + $ref: '#/components/schemas/error1' required: - links - data @@ -7146,7 +7210,7 @@ components: links: type: array items: - $ref: '#/components/schemas/link' + $ref: '#/components/schemas/link1' data: type: object nullable: true @@ -7154,7 +7218,7 @@ components: errors: type: array items: - $ref: '#/components/schemas/error' + $ref: '#/components/schemas/error1' required: - links - data @@ -7916,6 +7980,15 @@ components: $ref: '#/components/examples/unsupportedMediaTypeErrorExample' tooManyRequestsErrorResponse: description: Too Many Requests + headers: + Retry-After: + description: >- + The number of seconds the client should wait before making another + request. + required: true + schema: + type: integer + example: 900 content: application/json: schema: @@ -9137,10 +9210,10 @@ components: links: [] data: null errors: - - id: 59512d87-7a92-4040-8e4a-78fb772019b9 - type: too_many_requests - description: The client has sent too many requests in a given amount of time. - code: '429' + - type: too_many_endpoints + description: >- + Too many endpoints. Please delete an existing endpoint or wait 24 + hours for an endpoint to be removed. serviceUnavailableErrorExample: summary: Service Unavailable Error Example value: @@ -9556,12 +9629,12 @@ components: required: true description: >-

This Inbound Message Webhook is an envelope containing either a - received (MO) message to your + received (MO) message to your message-enabled Bandwidth telephone number or a multichannel - client's response to a suggestion response + client's response to a suggestion response - or location request. + or location request.

The payload type will be one of message-received, suggestion-response, or diff --git a/docs/Callback.md b/docs/Callback.md index 52af615..6cbe3b8 100644 --- a/docs/Callback.md +++ b/docs/Callback.md @@ -9,11 +9,11 @@ Name | Type | Description | Notes **time** | **string** | | [default to undefined] **eventTime** | **string** | Represents the time at which the message was read, for `message-read` callbacks. | [optional] [default to undefined] **type** | [**InboundCallbackTypeEnum**](InboundCallbackTypeEnum.md) | | [default to undefined] -**to** | **string** | The destination phone number the message was sent to. For inbound callbacks, this is the Bandwidth number or alphanumeric identifier that received the message. | [default to undefined] +**to** | **string** | The destination phone number the message was sent to. For inbound callbacks, this is the Bandwidth number or alphanumeric identifier that received the message. | [default to undefined] **description** | **string** | A detailed description of the event described by the callback. | [default to undefined] **message** | [**InboundCallbackMessage**](InboundCallbackMessage.md) | | [default to undefined] **errorCode** | **number** | Optional error code, applicable only when type is `message-failed`. | [optional] [default to undefined] -**carrierName** | **string** | The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to. This field is present only when this account feature has been enabled. | [optional] [default to undefined] +**carrierName** | **string** | The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to. This field is present only when this account feature has been enabled. | [optional] [default to undefined] ## Example diff --git a/docs/CreateCall.md b/docs/CreateCall.md index c0fe3fd..53fb60b 100644 --- a/docs/CreateCall.md +++ b/docs/CreateCall.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **to** | **string** | The destination to call (must be an E.164 formatted number (e.g. `+15555551212`) or a SIP URI (e.g. `sip:user@server.example`)). | [default to undefined] **from** | **string** | A Bandwidth phone number on your account the call should come from (must be in E.164 format, like `+15555551212`) even if `privacy` is set to true. | [default to undefined] **privacy** | **boolean** | Hide the calling number. The `displayName` field can be used to customize the displayed name. | [optional] [default to undefined] -**displayName** | **string** | The caller display name to use when the call is created. May not exceed 256 characters nor contain control characters such as new lines. If `privacy` is true, only the following values are valid: `Restricted`, `Anonymous`, `Private`, or `Unavailable`. | [optional] [default to undefined] +**displayName** | **string** | The caller display name to use when the call is created. May not exceed 256 characters nor contain control characters such as new lines. If `privacy` is true, only the following values are valid: `Restricted`, `Anonymous`, `Private`, or `Unavailable`. | [optional] [default to undefined] **uui** | **string** | A comma-separated list of \'User-To-User\' headers to be sent in the INVITE when calling a SIP URI. Each value must end with an \'encoding\' parameter as described in <a href=\'https://tools.ietf.org/html/rfc7433\'>RFC 7433</a>. Only \'jwt\', \'base64\' and \'hex\' encodings are allowed. The entire value cannot exceed 350 characters, including parameters and separators. | [optional] [default to undefined] **applicationId** | **string** | The id of the application associated with the `from` number. | [default to undefined] **answerUrl** | **string** | The full URL to send the <a href=\'/docs/voice/webhooks/answer\'>Answer</a> event to when the called party answers. This endpoint should return the first <a href=\'/docs/voice/bxml\'>BXML document</a> to be executed in the call. Must use `https` if specifying `username` and `password`. | [default to undefined] @@ -25,7 +25,7 @@ Name | Type | Description | Notes **callbackTimeout** | **number** | This is the timeout (in seconds) to use when delivering webhooks for the call. Can be any numeric value (including decimals) between 1 and 25. | [optional] [default to 15] **machineDetection** | [**MachineDetectionConfiguration**](MachineDetectionConfiguration.md) | | [optional] [default to undefined] **priority** | **number** | The priority of this call over other calls from your account. For example, if during a call your application needs to place a new call and bridge it with the current call, you might want to create the call with priority 1 so that it will be the next call picked off your queue, ahead of other less time sensitive calls. A lower value means higher priority, so a priority 1 call takes precedence over a priority 2 call. | [optional] [default to 5] -**tag** | **string** | A custom string that will be sent with all webhooks for this call unless overwritten by a future <a href=\'/docs/voice/bxml/tag\'>`<Tag>`</a> verb or `tag` attribute on another verb, or cleared. May be cleared by setting `tag=\"\"` Max length 256 characters. | [optional] [default to undefined] +**tag** | **string** | A custom string that will be sent with all webhooks for this call unless overwritten by a future <a href=\'/docs/voice/bxml/tag\'>`<Tag>`</a> verb or `tag` attribute on another verb, or cleared. May be cleared by setting `tag=\"\"` Max length 4096 characters. | [optional] [default to undefined] ## Example diff --git a/docs/CreateEndpointResponse.md b/docs/CreateEndpointResponse.md index 5737b6e..ad2e756 100644 --- a/docs/CreateEndpointResponse.md +++ b/docs/CreateEndpointResponse.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**links** | [**Array<Link>**](Link.md) | | [default to undefined] +**links** | [**Array<Link1>**](Link1.md) | | [default to undefined] **data** | [**CreateEndpointResponseData**](CreateEndpointResponseData.md) | | [default to undefined] -**errors** | [**Array<ModelError>**](ModelError.md) | | [default to undefined] +**errors** | [**Array<Error1>**](Error1.md) | | [default to undefined] ## Example diff --git a/docs/EndpointResponse.md b/docs/EndpointResponse.md index 4086be9..4233a3e 100644 --- a/docs/EndpointResponse.md +++ b/docs/EndpointResponse.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**links** | [**Array<Link>**](Link.md) | | [default to undefined] +**links** | [**Array<Link1>**](Link1.md) | | [default to undefined] **data** | [**Endpoint**](Endpoint.md) | | [default to undefined] -**errors** | [**Array<ModelError>**](ModelError.md) | | [default to undefined] +**errors** | [**Array<Error1>**](Error1.md) | | [default to undefined] ## Example diff --git a/docs/EndpointsApi.md b/docs/EndpointsApi.md index baa4304..e8ec89b 100644 --- a/docs/EndpointsApi.md +++ b/docs/EndpointsApi.md @@ -67,7 +67,7 @@ const { status, data } = await apiInstance.createEndpoint( |**404** | Not Found | - | |**405** | Method Not Allowed | - | |**415** | Unsupported Media Type | - | -|**429** | Too Many Requests | - | +|**429** | Too Many Requests | * Retry-After - The number of seconds the client should wait before making another request.
| |**500** | Service Unavailable | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -129,7 +129,7 @@ void (empty response body) |**404** | Not Found | - | |**405** | Method Not Allowed | - | |**415** | Unsupported Media Type | - | -|**429** | Too Many Requests | - | +|**429** | Too Many Requests | * Retry-After - The number of seconds the client should wait before making another request.
| |**500** | Service Unavailable | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -191,7 +191,7 @@ const { status, data } = await apiInstance.getEndpoint( |**404** | Not Found | - | |**405** | Method Not Allowed | - | |**415** | Unsupported Media Type | - | -|**429** | Too Many Requests | - | +|**429** | Too Many Requests | * Retry-After - The number of seconds the client should wait before making another request.
| |**500** | Service Unavailable | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -262,7 +262,7 @@ const { status, data } = await apiInstance.listEndpoints( |**404** | Not Found | - | |**405** | Method Not Allowed | - | |**415** | Unsupported Media Type | - | -|**429** | Too Many Requests | - | +|**429** | Too Many Requests | * Retry-After - The number of seconds the client should wait before making another request.
| |**500** | Service Unavailable | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -327,7 +327,7 @@ void (empty response body) |**404** | Not Found | - | |**405** | Method Not Allowed | - | |**415** | Unsupported Media Type | - | -|**429** | Too Many Requests | - | +|**429** | Too Many Requests | * Retry-After - The number of seconds the client should wait before making another request.
| |**500** | Service Unavailable | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/Error1.md b/docs/Error1.md new file mode 100644 index 0000000..6959775 --- /dev/null +++ b/docs/Error1.md @@ -0,0 +1,28 @@ +# Error1 + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | A unique identifier for the error. | [optional] [default to undefined] +**type** | **string** | The type of error. | [default to undefined] +**description** | **string** | A description of the error. | [default to undefined] +**code** | **string** | A code that uniquely identifies the error. | [optional] [default to undefined] +**source** | [**Error1Source**](Error1Source.md) | | [optional] [default to undefined] + +## Example + +```typescript +import { Error1 } from 'bandwidth-sdk'; + +const instance: Error1 = { + id, + type, + description, + code, + source, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Error1Source.md b/docs/Error1Source.md new file mode 100644 index 0000000..03a1dfe --- /dev/null +++ b/docs/Error1Source.md @@ -0,0 +1,26 @@ +# Error1Source + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**parameter** | **string** | The URI parameter that caused the error. | [optional] [default to undefined] +**field** | **string** | The request body field that caused the error. | [optional] [default to undefined] +**header** | **string** | The header that caused the error. | [optional] [default to undefined] +**reference** | **string** | The resource ID or path to the resource (or non-existent resource) causing the error. | [optional] [default to undefined] + +## Example + +```typescript +import { Error1Source } from 'bandwidth-sdk'; + +const instance: Error1Source = { + parameter, + field, + header, + reference, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ErrorResponse.md b/docs/ErrorResponse.md index b4c56be..6ebef1e 100644 --- a/docs/ErrorResponse.md +++ b/docs/ErrorResponse.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**links** | [**Array<Link>**](Link.md) | | [default to undefined] +**links** | [**Array<Link1>**](Link1.md) | | [default to undefined] **data** | **object** | | [default to undefined] -**errors** | [**Array<ModelError>**](ModelError.md) | | [default to undefined] +**errors** | [**Array<Error1>**](Error1.md) | | [default to undefined] ## Example diff --git a/docs/InboundCallback.md b/docs/InboundCallback.md index 3f423b3..c174271 100644 --- a/docs/InboundCallback.md +++ b/docs/InboundCallback.md @@ -8,10 +8,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **time** | **string** | | [default to undefined] **type** | [**InboundCallbackTypeEnum**](InboundCallbackTypeEnum.md) | | [default to undefined] -**to** | **string** | The destination phone number the message was sent to. For inbound callbacks, this is the Bandwidth number or alphanumeric identifier that received the message. | [default to undefined] +**to** | **string** | The destination phone number the message was sent to. For inbound callbacks, this is the Bandwidth number or alphanumeric identifier that received the message. | [default to undefined] **description** | **string** | A detailed description of the event described by the callback. | [default to undefined] **message** | [**InboundCallbackMessage**](InboundCallbackMessage.md) | | [default to undefined] -**carrierName** | **string** | The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to. This field is present only when this account feature has been enabled. | [optional] [default to undefined] +**carrierName** | **string** | The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to. This field is present only when this account feature has been enabled. | [optional] [default to undefined] ## Example diff --git a/docs/InboundCallbackTypeEnum.md b/docs/InboundCallbackTypeEnum.md index 714e436..5e38723 100644 --- a/docs/InboundCallbackTypeEnum.md +++ b/docs/InboundCallbackTypeEnum.md @@ -1,6 +1,6 @@ # InboundCallbackTypeEnum -The possible inbound callback types originating from MO messages or multichannel message client responses: - `message-received` indicates an MO message from a Bandwidth user\'s client to a Bandwidth number. - `request-location-response` indicates a response to a location request sent by the Bandwidth user\'s client after receiving an RBM message. - `suggestion-response` indicates a response to a suggestion sent by the Bandwidth user\'s client after receiving an RBM message. +The possible inbound callback types originating from MO messages or multichannel message client responses: - `message-received` indicates an MO message from a Bandwidth user\'s client to a Bandwidth number. - `request-location-response` indicates a response to a location request sent by the Bandwidth user\'s client after receiving an RBM message. - `suggestion-response` indicates a response to a suggestion sent by the Bandwidth user\'s client after receiving an RBM message. ## Enum diff --git a/docs/Link1.md b/docs/Link1.md new file mode 100644 index 0000000..5f2841e --- /dev/null +++ b/docs/Link1.md @@ -0,0 +1,24 @@ +# Link1 + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **string** | The full URL of the link. | [optional] [default to undefined] +**rel** | **string** | The relationship of the link to the current resource. | [optional] [default to undefined] +**method** | **string** | The HTTP method to use when making the request. | [optional] [default to undefined] + +## Example + +```typescript +import { Link1 } from 'bandwidth-sdk'; + +const instance: Link1 = { + href, + rel, + method, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ListEndpointsResponse.md b/docs/ListEndpointsResponse.md index 9d3b63f..e442b58 100644 --- a/docs/ListEndpointsResponse.md +++ b/docs/ListEndpointsResponse.md @@ -5,10 +5,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**links** | [**Array<Link>**](Link.md) | | [default to undefined] +**links** | [**Array<Link1>**](Link1.md) | | [default to undefined] **page** | [**Page**](Page.md) | | [optional] [default to undefined] **data** | [**Array<Endpoints>**](Endpoints.md) | | [default to undefined] -**errors** | [**Array<ModelError>**](ModelError.md) | | [default to undefined] +**errors** | [**Array<Error1>**](Error1.md) | | [default to undefined] ## Example diff --git a/docs/MachineDetectionConfiguration.md b/docs/MachineDetectionConfiguration.md index 992504e..8139824 100644 --- a/docs/MachineDetectionConfiguration.md +++ b/docs/MachineDetectionConfiguration.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **silenceTimeout** | **number** | If no speech is detected in this period, a callback with a \'silence\' result is sent. | [optional] [default to 10] **speechThreshold** | **number** | When speech has ended and a result couldn\'t be determined based on the audio content itself, this value is used to determine if the speaker is a machine based on the speech duration. If the length of the speech detected is greater than or equal to this threshold, the result will be \'answering-machine\'. If the length of speech detected is below this threshold, the result will be \'human\'. | [optional] [default to 10] **speechEndThreshold** | **number** | Amount of silence (in seconds) before assuming the callee has finished speaking. | [optional] [default to 5] -**machineSpeechEndThreshold** | **number** | When an answering machine is detected, the amount of silence (in seconds) before assuming the message has finished playing. If not provided it will default to the speechEndThreshold value. | [optional] [default to undefined] +**machineSpeechEndThreshold** | **number** | When an answering machine is detected, the amount of silence (in seconds) before assuming the message has finished playing. If not provided it will default to the speechEndThreshold value. | [optional] [default to undefined] **delayResult** | **boolean** | If set to \'true\' and if an answering machine is detected, the \'answering-machine\' callback will be delayed until the machine is done speaking, or an end of message tone is detected, or until the \'detectionTimeout\' is exceeded. If false, the \'answering-machine\' result is sent immediately. | [optional] [default to false] **callbackUrl** | **string** | The URL to send the \'machineDetectionComplete\' webhook when the detection is completed. Only for \'async\' mode. | [optional] [default to undefined] **callbackMethod** | [**CallbackMethodEnum**](CallbackMethodEnum.md) | | [optional] [default to undefined] diff --git a/docs/MessageRequest.md b/docs/MessageRequest.md index 73d6171..d344237 100644 --- a/docs/MessageRequest.md +++ b/docs/MessageRequest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **applicationId** | **string** | The ID of the Application your from number or senderId is associated with in the Bandwidth App. | [default to undefined] **to** | **Set<string>** | The phone number(s) the message should be sent to in E164 format. | [default to undefined] -**from** | **string** | Either an alphanumeric sender ID or the sender\'s Bandwidth phone number in E.164 format, which must be hosted within Bandwidth and linked to the account that is generating the message. Alphanumeric Sender IDs can contain up to 11 characters, upper-case letters A-Z, lower-case letters a-z, numbers 0-9, space, hyphen -, plus +, underscore _ and ampersand &. Alphanumeric Sender IDs must contain at least one letter. | [default to undefined] +**from** | **string** | Either an alphanumeric sender ID or the sender\'s Bandwidth phone number in E.164 format, which must be hosted within Bandwidth and linked to the account that is generating the message. Alphanumeric Sender IDs can contain up to 11 characters, upper-case letters A-Z, lower-case letters a-z, numbers 0-9, space, hyphen -, plus +, underscore _ and ampersand &. Alphanumeric Sender IDs must contain at least one letter. | [default to undefined] **text** | **string** | The contents of the text message. Must be 2048 characters or less. | [optional] [default to undefined] **media** | **Array<string>** | A list of URLs to include as media attachments as part of the message. Each URL can be at most 4096 characters. | [optional] [default to undefined] **tag** | **string** | A custom string that will be included in callback events of the message. Max 1024 characters. | [optional] [default to undefined] diff --git a/docs/RbmOpenUrlEnum.md b/docs/RbmOpenUrlEnum.md index 3d603fd..0ceb3e0 100644 --- a/docs/RbmOpenUrlEnum.md +++ b/docs/RbmOpenUrlEnum.md @@ -1,6 +1,6 @@ # RbmOpenUrlEnum -Specifies how the URL should be opened on a mobile device. - `BROWSER` Opens the URL in the device\'s default browser. If application is not set or the device doesn’t support WebView, this option is used by default. - `WEBVIEW` Opens the URL in an in-app WebView. +Specifies how the URL should be opened on a mobile device. - `BROWSER` Opens the URL in the device\'s default browser. If application is not set or the device doesn’t support WebView, this option is used by default. - `WEBVIEW` Opens the URL in an in-app WebView. ## Enum diff --git a/docs/RbmWebViewEnum.md b/docs/RbmWebViewEnum.md index ee61bc7..c713add 100644 --- a/docs/RbmWebViewEnum.md +++ b/docs/RbmWebViewEnum.md @@ -1,6 +1,6 @@ # RbmWebViewEnum -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. +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. ## Enum diff --git a/docs/StatusCallback.md b/docs/StatusCallback.md index 6cc4a0d..f428e28 100644 --- a/docs/StatusCallback.md +++ b/docs/StatusCallback.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes **description** | **string** | A detailed description of the event described by the callback. | [default to undefined] **message** | [**StatusCallbackMessage**](StatusCallbackMessage.md) | | [default to undefined] **errorCode** | **number** | Optional error code, applicable only when type is `message-failed`. | [optional] [default to undefined] -**carrierName** | **string** | The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to. This field is present only when this account feature has been enabled. | [optional] [default to undefined] +**carrierName** | **string** | The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to. This field is present only when this account feature has been enabled. | [optional] [default to undefined] ## Example diff --git a/docs/UpdateCall.md b/docs/UpdateCall.md index d016dd9..1d30279 100644 --- a/docs/UpdateCall.md +++ b/docs/UpdateCall.md @@ -14,7 +14,7 @@ Name | Type | Description | Notes **redirectFallbackMethod** | [**RedirectMethodEnum**](RedirectMethodEnum.md) | | [optional] [default to undefined] **fallbackUsername** | **string** | Basic auth username. | [optional] [default to undefined] **fallbackPassword** | **string** | Basic auth password. | [optional] [default to undefined] -**tag** | **string** | A custom string that will be sent with this and all future callbacks unless overwritten by a future `tag` attribute or [`<Tag>`](/docs/voice/bxml/tag) verb, or cleared. May be cleared by setting `tag=\"\"`. Max length 256 characters. Not allowed if `state` is `completed`. | [optional] [default to undefined] +**tag** | **string** | A custom string that will be sent with this and all future callbacks unless overwritten by a future `tag` attribute or [`<Tag>`](/docs/voice/bxml/tag) verb, or cleared. May be cleared by setting `tag=\"\"`. Max length 4096 characters. Not allowed if `state` is `completed`. | [optional] [default to undefined] ## Example diff --git a/models/create-call.ts b/models/create-call.ts index 853a29a..71618ea 100644 --- a/models/create-call.ts +++ b/models/create-call.ts @@ -34,7 +34,7 @@ export interface CreateCall { */ 'privacy'?: boolean | null; /** - * The caller display name to use when the call is created. May not exceed 256 characters nor contain control characters such as new lines. If `privacy` is true, only the following values are valid: `Restricted`, `Anonymous`, `Private`, or `Unavailable`. + * The caller display name to use when the call is created. May not exceed 256 characters nor contain control characters such as new lines. If `privacy` is true, only the following values are valid: `Restricted`, `Anonymous`, `Private`, or `Unavailable`. */ 'displayName'?: string | null; /** @@ -90,7 +90,7 @@ export interface CreateCall { */ 'priority'?: number | null; /** - * A custom string that will be sent with all webhooks for this call unless overwritten by a future `` verb or `tag` attribute on another verb, or cleared. May be cleared by setting `tag=\"\"` Max length 256 characters. + * A custom string that will be sent with all webhooks for this call unless overwritten by a future `` verb or `tag` attribute on another verb, or cleared. May be cleared by setting `tag=\"\"` Max length 4096 characters. */ 'tag'?: string | null; } diff --git a/models/create-endpoint-response-data.ts b/models/create-endpoint-response-data.ts index 5fd1f3d..5c42ed7 100644 --- a/models/create-endpoint-response-data.ts +++ b/models/create-endpoint-response-data.ts @@ -29,9 +29,6 @@ import type { EndpointTypeEnum } from './endpoint-type-enum'; /** * @type CreateEndpointResponseData */ -export interface CreateEndpointResponseData extends Endpoint { - /** - * The json web token specific to the endpoint. Used to authenticate the client with the media gateway. - */ - 'token': string; -} +export type CreateEndpointResponseData = Endpoint; + + diff --git a/models/create-endpoint-response.ts b/models/create-endpoint-response.ts index c00f714..8694eae 100644 --- a/models/create-endpoint-response.ts +++ b/models/create-endpoint-response.ts @@ -18,14 +18,14 @@ import type { CreateEndpointResponseData } from './create-endpoint-response-data'; // May contain unused imports in some cases // @ts-ignore -import type { Link } from './link'; +import type { Error1 } from './error1'; // May contain unused imports in some cases // @ts-ignore -import type { ModelError } from './model-error'; +import type { Link1 } from './link1'; export interface CreateEndpointResponse { - 'links': Array; + 'links': Array; 'data': CreateEndpointResponseData; - 'errors': Array; + 'errors': Array; } diff --git a/models/endpoint-response.ts b/models/endpoint-response.ts index c8e5e76..c9f9d73 100644 --- a/models/endpoint-response.ts +++ b/models/endpoint-response.ts @@ -18,14 +18,14 @@ import type { Endpoint } from './endpoint'; // May contain unused imports in some cases // @ts-ignore -import type { Link } from './link'; +import type { Error1 } from './error1'; // May contain unused imports in some cases // @ts-ignore -import type { ModelError } from './model-error'; +import type { Link1 } from './link1'; export interface EndpointResponse { - 'links': Array; + 'links': Array; 'data': Endpoint; - 'errors': Array; + 'errors': Array; } diff --git a/models/endpoint.ts b/models/endpoint.ts index e23a9aa..649c2b5 100644 --- a/models/endpoint.ts +++ b/models/endpoint.ts @@ -29,6 +29,6 @@ import type { Endpoints } from './endpoints'; /** * @type Endpoint */ -export interface Endpoint extends Endpoints { - 'devices'?: Array; -} +export type Endpoint = Endpoints; + + diff --git a/models/error-response.ts b/models/error-response.ts index f59da8f..1e0742d 100644 --- a/models/error-response.ts +++ b/models/error-response.ts @@ -15,14 +15,14 @@ // May contain unused imports in some cases // @ts-ignore -import type { Link } from './link'; +import type { Error1 } from './error1'; // May contain unused imports in some cases // @ts-ignore -import type { ModelError } from './model-error'; +import type { Link1 } from './link1'; export interface ErrorResponse { - 'links': Array; + 'links': Array; 'data': object | null; - 'errors': Array; + 'errors': Array; } diff --git a/models/error1-source.ts b/models/error1-source.ts new file mode 100644 index 0000000..0682129 --- /dev/null +++ b/models/error1-source.ts @@ -0,0 +1,35 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Bandwidth + * Bandwidth\'s Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export interface Error1Source { + /** + * The URI parameter that caused the error. + */ + 'parameter'?: string; + /** + * The request body field that caused the error. + */ + 'field'?: string; + /** + * The header that caused the error. + */ + 'header'?: string; + /** + * The resource ID or path to the resource (or non-existent resource) causing the error. + */ + 'reference'?: string; +} + diff --git a/models/error1.ts b/models/error1.ts new file mode 100644 index 0000000..f54d843 --- /dev/null +++ b/models/error1.ts @@ -0,0 +1,39 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Bandwidth + * Bandwidth\'s Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { Error1Source } from './error1-source'; + +export interface Error1 { + /** + * A unique identifier for the error. + */ + 'id'?: string; + /** + * The type of error. + */ + 'type': string; + /** + * A description of the error. + */ + 'description': string; + /** + * A code that uniquely identifies the error. + */ + 'code'?: string; + 'source'?: Error1Source; +} + diff --git a/models/inbound-callback-type-enum.ts b/models/inbound-callback-type-enum.ts index 7c4a076..bb29bbe 100644 --- a/models/inbound-callback-type-enum.ts +++ b/models/inbound-callback-type-enum.ts @@ -15,7 +15,7 @@ /** - * The possible inbound callback types originating from MO messages or multichannel message client responses: - `message-received` indicates an MO message from a Bandwidth user\'s client to a Bandwidth number. - `request-location-response` indicates a response to a location request sent by the Bandwidth user\'s client after receiving an RBM message. - `suggestion-response` indicates a response to a suggestion sent by the Bandwidth user\'s client after receiving an RBM message. + * The possible inbound callback types originating from MO messages or multichannel message client responses: - `message-received` indicates an MO message from a Bandwidth user\'s client to a Bandwidth number. - `request-location-response` indicates a response to a location request sent by the Bandwidth user\'s client after receiving an RBM message. - `suggestion-response` indicates a response to a suggestion sent by the Bandwidth user\'s client after receiving an RBM message. */ export const InboundCallbackTypeEnum = { diff --git a/models/inbound-callback.ts b/models/inbound-callback.ts index 0d77ebe..7080ef7 100644 --- a/models/inbound-callback.ts +++ b/models/inbound-callback.ts @@ -27,7 +27,7 @@ export interface InboundCallback { 'time': string; 'type': InboundCallbackTypeEnum; /** - * The destination phone number the message was sent to. For inbound callbacks, this is the Bandwidth number or alphanumeric identifier that received the message. + * The destination phone number the message was sent to. For inbound callbacks, this is the Bandwidth number or alphanumeric identifier that received the message. */ 'to': string; /** @@ -36,7 +36,7 @@ export interface InboundCallback { 'description': string; 'message': InboundCallbackMessage; /** - * The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to. This field is present only when this account feature has been enabled. + * The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to. This field is present only when this account feature has been enabled. */ 'carrierName'?: string; } diff --git a/models/index.ts b/models/index.ts index ed01abf..02348d4 100644 --- a/models/index.ts +++ b/models/index.ts @@ -59,6 +59,8 @@ export * from './endpoint-response'; export * from './endpoint-status-enum'; export * from './endpoint-type-enum'; export * from './endpoints'; +export * from './error1'; +export * from './error1-source'; export * from './error-object'; export * from './error-response'; export * from './error-source'; @@ -76,6 +78,7 @@ export * from './initiate-callback'; export * from './latest-message-delivery-status-enum'; export * from './line-type-enum'; export * from './link'; +export * from './link1'; export * from './link-schema'; export * from './links-object'; export * from './list-endpoints-response'; diff --git a/models/link1.ts b/models/link1.ts new file mode 100644 index 0000000..caf3958 --- /dev/null +++ b/models/link1.ts @@ -0,0 +1,40 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Bandwidth + * Bandwidth\'s Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export interface Link1 { + /** + * The full URL of the link. + */ + 'href'?: string; + /** + * The relationship of the link to the current resource. + */ + 'rel'?: string; + /** + * The HTTP method to use when making the request. + */ + 'method'?: Link1MethodEnum; +} + +export const Link1MethodEnum = { + Get: 'GET', + Post: 'POST', + Delete: 'DELETE' +} as const; + +export type Link1MethodEnum = typeof Link1MethodEnum[keyof typeof Link1MethodEnum]; + + diff --git a/models/list-endpoints-response.ts b/models/list-endpoints-response.ts index a8a1235..f5df199 100644 --- a/models/list-endpoints-response.ts +++ b/models/list-endpoints-response.ts @@ -18,18 +18,18 @@ import type { Endpoints } from './endpoints'; // May contain unused imports in some cases // @ts-ignore -import type { Link } from './link'; +import type { Error1 } from './error1'; // May contain unused imports in some cases // @ts-ignore -import type { ModelError } from './model-error'; +import type { Link1 } from './link1'; // May contain unused imports in some cases // @ts-ignore import type { Page } from './page'; export interface ListEndpointsResponse { - 'links': Array; + 'links': Array; 'page'?: Page; 'data': Array; - 'errors': Array; + 'errors': Array; } diff --git a/models/lookup-result.ts b/models/lookup-result.ts index fdff7b2..7457d83 100644 --- a/models/lookup-result.ts +++ b/models/lookup-result.ts @@ -55,7 +55,7 @@ export interface LookupResult { 'deactivationEvent'?: DeactivationEventEnum; 'latestMessageDeliveryStatus'?: LatestMessageDeliveryStatusEnum; /** - * [DNI-Only](#section/DNI-Only). The date the phone number entered the status described in `latestMessageDeliveryStatus`. Think of this as the \"start time\" for that status. Value resets every time the `latestMessageDeliveryStatus` changes. + * [DNI-Only](#section/DNI-Only). The date the phone number entered the status described in `latestMessageDeliveryStatus`. Think of this as the \"start time\" for that status. Value resets every time the `latestMessageDeliveryStatus` changes. */ 'initialMessageDeliveryStatusDate'?: string; /** diff --git a/models/machine-detection-configuration.ts b/models/machine-detection-configuration.ts index e586ce8..ab04051 100644 --- a/models/machine-detection-configuration.ts +++ b/models/machine-detection-configuration.ts @@ -42,7 +42,7 @@ export interface MachineDetectionConfiguration { */ 'speechEndThreshold'?: number | null; /** - * When an answering machine is detected, the amount of silence (in seconds) before assuming the message has finished playing. If not provided it will default to the speechEndThreshold value. + * When an answering machine is detected, the amount of silence (in seconds) before assuming the message has finished playing. If not provided it will default to the speechEndThreshold value. */ 'machineSpeechEndThreshold'?: number | null; /** diff --git a/models/message-request.ts b/models/message-request.ts index df22774..bf97afc 100644 --- a/models/message-request.ts +++ b/models/message-request.ts @@ -27,7 +27,7 @@ export interface MessageRequest { */ 'to': Set; /** - * Either an alphanumeric sender ID or the sender\'s Bandwidth phone number in E.164 format, which must be hosted within Bandwidth and linked to the account that is generating the message. Alphanumeric Sender IDs can contain up to 11 characters, upper-case letters A-Z, lower-case letters a-z, numbers 0-9, space, hyphen -, plus +, underscore _ and ampersand &. Alphanumeric Sender IDs must contain at least one letter. + * Either an alphanumeric sender ID or the sender\'s Bandwidth phone number in E.164 format, which must be hosted within Bandwidth and linked to the account that is generating the message. Alphanumeric Sender IDs can contain up to 11 characters, upper-case letters A-Z, lower-case letters a-z, numbers 0-9, space, hyphen -, plus +, underscore _ and ampersand &. Alphanumeric Sender IDs must contain at least one letter. */ 'from': string; /** diff --git a/models/rbm-open-url-enum.ts b/models/rbm-open-url-enum.ts index d4e75a6..f45ae64 100644 --- a/models/rbm-open-url-enum.ts +++ b/models/rbm-open-url-enum.ts @@ -15,7 +15,7 @@ /** - * Specifies how the URL should be opened on a mobile device. - `BROWSER` Opens the URL in the device\'s default browser. If application is not set or the device doesn’t support WebView, this option is used by default. - `WEBVIEW` Opens the URL in an in-app WebView. + * Specifies how the URL should be opened on a mobile device. - `BROWSER` Opens the URL in the device\'s default browser. If application is not set or the device doesn’t support WebView, this option is used by default. - `WEBVIEW` Opens the URL in an in-app WebView. */ export const RbmOpenUrlEnum = { diff --git a/models/rbm-web-view-enum.ts b/models/rbm-web-view-enum.ts index 2654665..3d7e67a 100644 --- a/models/rbm-web-view-enum.ts +++ b/models/rbm-web-view-enum.ts @@ -15,7 +15,7 @@ /** - * 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. + * 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. */ export const RbmWebViewEnum = { diff --git a/models/status-callback.ts b/models/status-callback.ts index 9805fa8..b91b87c 100644 --- a/models/status-callback.ts +++ b/models/status-callback.ts @@ -44,7 +44,7 @@ export interface StatusCallback { */ 'errorCode'?: number; /** - * The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to. This field is present only when this account feature has been enabled. + * The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to. This field is present only when this account feature has been enabled. */ 'carrierName'?: string; } diff --git a/models/update-call.ts b/models/update-call.ts index f374513..95ad6f2 100644 --- a/models/update-call.ts +++ b/models/update-call.ts @@ -49,7 +49,7 @@ export interface UpdateCall { */ 'fallbackPassword'?: string | null; /** - * A custom string that will be sent with this and all future callbacks unless overwritten by a future `tag` attribute or [``](/docs/voice/bxml/tag) verb, or cleared. May be cleared by setting `tag=\"\"`. Max length 256 characters. Not allowed if `state` is `completed`. + * A custom string that will be sent with this and all future callbacks unless overwritten by a future `tag` attribute or [``](/docs/voice/bxml/tag) verb, or cleared. May be cleared by setting `tag=\"\"`. Max length 4096 characters. Not allowed if `state` is `completed`. */ 'tag'?: string | null; } From db3d62f8655b53dfd0cf9ebcc32264300ae032eb Mon Sep 17 00:00:00 2001 From: ckoegel Date: Wed, 22 Apr 2026 14:12:56 -0400 Subject: [PATCH 2/7] update with new spec changes --- .openapi-generator/FILES | 20 ++--- README.md | 10 +-- api/endpoints-api.ts | 4 +- bandwidth.yml | 88 +++++++++---------- docs/{Error1.md => BrtcError.md} | 8 +- ...{ErrorResponse.md => BrtcErrorResponse.md} | 10 +-- docs/{Error1Source.md => BrtcErrorSource.md} | 6 +- docs/{Link1.md => BrtcLink.md} | 6 +- docs/CreateEndpointResponse.md | 4 +- docs/EndpointResponse.md | 4 +- docs/ListEndpointsResponse.md | 4 +- .../{Error.md => WebhookSubscriptionError.md} | 6 +- docs/WebhookSubscriptionsListBody.md | 2 +- ...ror-response.ts => brtc-error-response.ts} | 10 +-- ...{error1-source.ts => brtc-error-source.ts} | 2 +- models/{error1.ts => brtc-error.ts} | 6 +- models/{link1.ts => brtc-link.ts} | 13 +-- models/create-endpoint-response.ts | 10 +-- models/endpoint-response.ts | 10 +-- models/index.ts | 10 +-- models/list-endpoints-response.ts | 10 +-- ...error.ts => webhook-subscription-error.ts} | 2 +- models/webhook-subscriptions-list-body.ts | 6 +- 23 files changed, 120 insertions(+), 131 deletions(-) rename docs/{Error1.md => BrtcError.md} (79%) rename docs/{ErrorResponse.md => BrtcErrorResponse.md} (58%) rename docs/{Error1Source.md => BrtcErrorSource.md} (88%) rename docs/{Link1.md => BrtcLink.md} (88%) rename docs/{Error.md => WebhookSubscriptionError.md} (82%) rename models/{error-response.ts => brtc-error-response.ts} (72%) rename models/{error1-source.ts => brtc-error-source.ts} (95%) rename models/{error1.ts => brtc-error.ts} (85%) rename models/{link1.ts => brtc-link.ts} (70%) rename models/{model-error.ts => webhook-subscription-error.ts} (92%) diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index c508267..7fd34a1 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -24,6 +24,10 @@ docs/AsyncLookupRequest.md docs/BlockedWebhook.md docs/BridgeCompleteCallback.md docs/BridgeTargetCompleteCallback.md +docs/BrtcError.md +docs/BrtcErrorResponse.md +docs/BrtcErrorSource.md +docs/BrtcLink.md docs/BusinessEntityTypeEnum.md docs/BusinessRegistrationTypeEnum.md docs/CallDirectionEnum.md @@ -80,11 +84,7 @@ docs/EndpointStatusEnum.md docs/EndpointTypeEnum.md docs/Endpoints.md docs/EndpointsApi.md -docs/Error.md -docs/Error1.md -docs/Error1Source.md docs/ErrorObject.md -docs/ErrorResponse.md docs/ErrorSource.md docs/FailureWebhook.md docs/FieldError.md @@ -100,7 +100,6 @@ docs/InitiateCallback.md docs/LatestMessageDeliveryStatusEnum.md docs/LineTypeEnum.md docs/Link.md -docs/Link1.md docs/LinkSchema.md docs/LinksObject.md docs/ListEndpointsResponse.md @@ -223,6 +222,7 @@ docs/VoiceApiError.md docs/VoiceCodeResponse.md docs/WebhookSubscription.md docs/WebhookSubscriptionBasicAuthentication.md +docs/WebhookSubscriptionError.md docs/WebhookSubscriptionRequestSchema.md docs/WebhookSubscriptionTypeEnum.md docs/WebhookSubscriptionsListBody.md @@ -236,6 +236,10 @@ models/async-lookup-request.ts models/blocked-webhook.ts models/bridge-complete-callback.ts models/bridge-target-complete-callback.ts +models/brtc-error-response.ts +models/brtc-error-source.ts +models/brtc-error.ts +models/brtc-link.ts models/business-entity-type-enum.ts models/business-registration-type-enum.ts models/call-direction-enum.ts @@ -290,10 +294,7 @@ models/endpoint-type-enum.ts models/endpoint.ts models/endpoints.ts models/error-object.ts -models/error-response.ts models/error-source.ts -models/error1-source.ts -models/error1.ts models/failure-webhook.ts models/field-error.ts models/file-format-enum.ts @@ -310,7 +311,6 @@ models/latest-message-delivery-status-enum.ts models/line-type-enum.ts models/link-schema.ts models/link.ts -models/link1.ts models/links-object.ts models/list-endpoints-response.ts models/list-message-direction-enum.ts @@ -337,7 +337,6 @@ models/mfa-request-error.ts models/mfa-unauthorized-request-error.ts models/mms-message-content-file.ts models/mms-message-content.ts -models/model-error.ts models/multi-channel-action-calendar-event.ts models/multi-channel-action.ts models/multi-channel-channel-list-mmsobject.ts @@ -423,6 +422,7 @@ models/verify-code-response.ts models/voice-api-error.ts models/voice-code-response.ts models/webhook-subscription-basic-authentication.ts +models/webhook-subscription-error.ts models/webhook-subscription-request-schema.ts models/webhook-subscription-type-enum.ts models/webhook-subscription.ts diff --git a/README.md b/README.md index a085414..4eb50e1 100644 --- a/README.md +++ b/README.md @@ -173,6 +173,10 @@ Class | Method | HTTP request | Description - [BlockedWebhook](docs/BlockedWebhook.md) - [BridgeCompleteCallback](docs/BridgeCompleteCallback.md) - [BridgeTargetCompleteCallback](docs/BridgeTargetCompleteCallback.md) + - [BrtcError](docs/BrtcError.md) + - [BrtcErrorResponse](docs/BrtcErrorResponse.md) + - [BrtcErrorSource](docs/BrtcErrorSource.md) + - [BrtcLink](docs/BrtcLink.md) - [BusinessEntityTypeEnum](docs/BusinessEntityTypeEnum.md) - [BusinessRegistrationTypeEnum](docs/BusinessRegistrationTypeEnum.md) - [CallDirectionEnum](docs/CallDirectionEnum.md) @@ -226,10 +230,7 @@ Class | Method | HTTP request | Description - [EndpointStatusEnum](docs/EndpointStatusEnum.md) - [EndpointTypeEnum](docs/EndpointTypeEnum.md) - [Endpoints](docs/Endpoints.md) - - [Error1](docs/Error1.md) - - [Error1Source](docs/Error1Source.md) - [ErrorObject](docs/ErrorObject.md) - - [ErrorResponse](docs/ErrorResponse.md) - [ErrorSource](docs/ErrorSource.md) - [FailureWebhook](docs/FailureWebhook.md) - [FieldError](docs/FieldError.md) @@ -245,7 +246,6 @@ Class | Method | HTTP request | Description - [LatestMessageDeliveryStatusEnum](docs/LatestMessageDeliveryStatusEnum.md) - [LineTypeEnum](docs/LineTypeEnum.md) - [Link](docs/Link.md) - - [Link1](docs/Link1.md) - [LinkSchema](docs/LinkSchema.md) - [LinksObject](docs/LinksObject.md) - [ListEndpointsResponse](docs/ListEndpointsResponse.md) @@ -273,7 +273,6 @@ Class | Method | HTTP request | Description - [MfaUnauthorizedRequestError](docs/MfaUnauthorizedRequestError.md) - [MmsMessageContent](docs/MmsMessageContent.md) - [MmsMessageContentFile](docs/MmsMessageContentFile.md) - - [ModelError](docs/ModelError.md) - [MultiChannelAction](docs/MultiChannelAction.md) - [MultiChannelActionCalendarEvent](docs/MultiChannelActionCalendarEvent.md) - [MultiChannelChannelListMMSObject](docs/MultiChannelChannelListMMSObject.md) @@ -360,6 +359,7 @@ Class | Method | HTTP request | Description - [VoiceCodeResponse](docs/VoiceCodeResponse.md) - [WebhookSubscription](docs/WebhookSubscription.md) - [WebhookSubscriptionBasicAuthentication](docs/WebhookSubscriptionBasicAuthentication.md) + - [WebhookSubscriptionError](docs/WebhookSubscriptionError.md) - [WebhookSubscriptionRequestSchema](docs/WebhookSubscriptionRequestSchema.md) - [WebhookSubscriptionTypeEnum](docs/WebhookSubscriptionTypeEnum.md) - [WebhookSubscriptionsListBody](docs/WebhookSubscriptionsListBody.md) diff --git a/api/endpoints-api.ts b/api/endpoints-api.ts index 2891576..2b27714 100644 --- a/api/endpoints-api.ts +++ b/api/endpoints-api.ts @@ -22,6 +22,8 @@ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObj // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; // @ts-ignore +import type { BrtcErrorResponse } from '../models'; +// @ts-ignore import type { CreateEndpointResponse } from '../models'; // @ts-ignore import type { CreateWebRtcConnectionRequest } from '../models'; @@ -32,8 +34,6 @@ import type { EndpointStatusEnum } from '../models'; // @ts-ignore import type { EndpointTypeEnum } from '../models'; // @ts-ignore -import type { ErrorResponse } from '../models'; -// @ts-ignore import type { ListEndpointsResponse } from '../models'; /** * EndpointsApi - axios parameter creator diff --git a/bandwidth.yml b/bandwidth.yml index c7105f3..0bf6842 100644 --- a/bandwidth.yml +++ b/bandwidth.yml @@ -6635,7 +6635,7 @@ components: errors: type: array items: - $ref: '#/components/schemas/error' + $ref: '#/components/schemas/webhookSubscriptionError' data: items: $ref: '#/components/schemas/webhookSubscription' @@ -6661,7 +6661,7 @@ components: If more results exist than specified by 'size', this link return the last page of result. type: string - error: + webhookSubscriptionError: type: object properties: code: @@ -7060,7 +7060,7 @@ components: required: - eventType - eventTime - link1: + brtcLink: type: object properties: href: @@ -7074,10 +7074,6 @@ components: example: self method: type: string - enum: - - GET - - POST - - DELETE description: The HTTP method to use when making the request. example: GET page: @@ -7105,7 +7101,7 @@ components: example: 0 required: - pageSize - error1: + brtcError: type: object properties: id: @@ -7126,36 +7122,38 @@ components: description: A code that uniquely identifies the error. example: '404' source: - type: object - properties: - parameter: - type: string - description: The URI parameter that caused the error. - example: accountId - field: - type: string - description: The request body field that caused the error. - example: accountId - header: - type: string - description: The header that caused the error. - example: Authorization - reference: - type: string - description: >- - The resource ID or path to the resource (or non-existent - resource) causing the error. - example: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + $ref: '#/components/schemas/brtcErrorSource' required: - type - description + brtcErrorSource: + type: object + properties: + parameter: + type: string + description: The URI parameter that caused the error. + example: accountId + field: + type: string + description: The request body field that caused the error. + example: accountId + header: + type: string + description: The header that caused the error. + example: Authorization + reference: + type: string + description: >- + The resource ID or path to the resource (or non-existent resource) + causing the error. + example: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 listEndpointsResponse: type: object properties: links: type: array items: - $ref: '#/components/schemas/link1' + $ref: '#/components/schemas/brtcLink' page: $ref: '#/components/schemas/page' data: @@ -7165,7 +7163,7 @@ components: errors: type: array items: - $ref: '#/components/schemas/error1' + $ref: '#/components/schemas/brtcError' required: - links - data @@ -7176,13 +7174,13 @@ components: links: type: array items: - $ref: '#/components/schemas/link1' + $ref: '#/components/schemas/brtcLink' data: $ref: '#/components/schemas/endpoint' errors: type: array items: - $ref: '#/components/schemas/error1' + $ref: '#/components/schemas/brtcError' required: - links - data @@ -7193,24 +7191,24 @@ components: links: type: array items: - $ref: '#/components/schemas/link1' + $ref: '#/components/schemas/brtcLink' data: $ref: '#/components/schemas/createEndpointResponseData' errors: type: array items: - $ref: '#/components/schemas/error1' + $ref: '#/components/schemas/brtcError' required: - links - data - errors - errorResponse: + brtcErrorResponse: type: object properties: links: type: array items: - $ref: '#/components/schemas/link1' + $ref: '#/components/schemas/brtcLink' data: type: object nullable: true @@ -7218,7 +7216,7 @@ components: errors: type: array items: - $ref: '#/components/schemas/error1' + $ref: '#/components/schemas/brtcError' required: - links - data @@ -7929,7 +7927,7 @@ components: content: application/json: schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' examples: badRequestErrorExample: $ref: '#/components/examples/badRequestErrorExample' @@ -7938,7 +7936,7 @@ components: content: application/json: schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' examples: unauthorizedErrorExample: $ref: '#/components/examples/unauthorizedErrorExample' @@ -7947,7 +7945,7 @@ components: content: application/json: schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' examples: forbiddenErrorExample: $ref: '#/components/examples/forbiddenErrorExample' @@ -7956,7 +7954,7 @@ components: content: application/json: schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' examples: notFoundErrorExample: $ref: '#/components/examples/notFoundErrorExample' @@ -7965,7 +7963,7 @@ components: content: application/json: schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' examples: methodNotAllowedErrorExample: $ref: '#/components/examples/methodNotAllowedErrorExample' @@ -7974,7 +7972,7 @@ components: content: application/json: schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' examples: unsuppotedMediaTypeErrorExample: $ref: '#/components/examples/unsupportedMediaTypeErrorExample' @@ -7992,7 +7990,7 @@ components: content: application/json: schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' examples: tooManyRequestsErrorExample: $ref: '#/components/examples/tooManyRequestsErrorExample' @@ -8001,7 +7999,7 @@ components: content: application/json: schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' examples: serviceUnavailableErrorExample: $ref: '#/components/examples/serviceUnavailableErrorExample' diff --git a/docs/Error1.md b/docs/BrtcError.md similarity index 79% rename from docs/Error1.md rename to docs/BrtcError.md index 6959775..7dd09f5 100644 --- a/docs/Error1.md +++ b/docs/BrtcError.md @@ -1,4 +1,4 @@ -# Error1 +# BrtcError ## Properties @@ -9,14 +9,14 @@ Name | Type | Description | Notes **type** | **string** | The type of error. | [default to undefined] **description** | **string** | A description of the error. | [default to undefined] **code** | **string** | A code that uniquely identifies the error. | [optional] [default to undefined] -**source** | [**Error1Source**](Error1Source.md) | | [optional] [default to undefined] +**source** | [**BrtcErrorSource**](BrtcErrorSource.md) | | [optional] [default to undefined] ## Example ```typescript -import { Error1 } from 'bandwidth-sdk'; +import { BrtcError } from 'bandwidth-sdk'; -const instance: Error1 = { +const instance: BrtcError = { id, type, description, diff --git a/docs/ErrorResponse.md b/docs/BrtcErrorResponse.md similarity index 58% rename from docs/ErrorResponse.md rename to docs/BrtcErrorResponse.md index 6ebef1e..3749482 100644 --- a/docs/ErrorResponse.md +++ b/docs/BrtcErrorResponse.md @@ -1,20 +1,20 @@ -# ErrorResponse +# BrtcErrorResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**links** | [**Array<Link1>**](Link1.md) | | [default to undefined] +**links** | [**Array<BrtcLink>**](BrtcLink.md) | | [default to undefined] **data** | **object** | | [default to undefined] -**errors** | [**Array<Error1>**](Error1.md) | | [default to undefined] +**errors** | [**Array<BrtcError>**](BrtcError.md) | | [default to undefined] ## Example ```typescript -import { ErrorResponse } from 'bandwidth-sdk'; +import { BrtcErrorResponse } from 'bandwidth-sdk'; -const instance: ErrorResponse = { +const instance: BrtcErrorResponse = { links, data, errors, diff --git a/docs/Error1Source.md b/docs/BrtcErrorSource.md similarity index 88% rename from docs/Error1Source.md rename to docs/BrtcErrorSource.md index 03a1dfe..20dcaa8 100644 --- a/docs/Error1Source.md +++ b/docs/BrtcErrorSource.md @@ -1,4 +1,4 @@ -# Error1Source +# BrtcErrorSource ## Properties @@ -13,9 +13,9 @@ Name | Type | Description | Notes ## Example ```typescript -import { Error1Source } from 'bandwidth-sdk'; +import { BrtcErrorSource } from 'bandwidth-sdk'; -const instance: Error1Source = { +const instance: BrtcErrorSource = { parameter, field, header, diff --git a/docs/Link1.md b/docs/BrtcLink.md similarity index 88% rename from docs/Link1.md rename to docs/BrtcLink.md index 5f2841e..93b4ae1 100644 --- a/docs/Link1.md +++ b/docs/BrtcLink.md @@ -1,4 +1,4 @@ -# Link1 +# BrtcLink ## Properties @@ -12,9 +12,9 @@ Name | Type | Description | Notes ## Example ```typescript -import { Link1 } from 'bandwidth-sdk'; +import { BrtcLink } from 'bandwidth-sdk'; -const instance: Link1 = { +const instance: BrtcLink = { href, rel, method, diff --git a/docs/CreateEndpointResponse.md b/docs/CreateEndpointResponse.md index ad2e756..f801171 100644 --- a/docs/CreateEndpointResponse.md +++ b/docs/CreateEndpointResponse.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**links** | [**Array<Link1>**](Link1.md) | | [default to undefined] +**links** | [**Array<BrtcLink>**](BrtcLink.md) | | [default to undefined] **data** | [**CreateEndpointResponseData**](CreateEndpointResponseData.md) | | [default to undefined] -**errors** | [**Array<Error1>**](Error1.md) | | [default to undefined] +**errors** | [**Array<BrtcError>**](BrtcError.md) | | [default to undefined] ## Example diff --git a/docs/EndpointResponse.md b/docs/EndpointResponse.md index 4233a3e..064a896 100644 --- a/docs/EndpointResponse.md +++ b/docs/EndpointResponse.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**links** | [**Array<Link1>**](Link1.md) | | [default to undefined] +**links** | [**Array<BrtcLink>**](BrtcLink.md) | | [default to undefined] **data** | [**Endpoint**](Endpoint.md) | | [default to undefined] -**errors** | [**Array<Error1>**](Error1.md) | | [default to undefined] +**errors** | [**Array<BrtcError>**](BrtcError.md) | | [default to undefined] ## Example diff --git a/docs/ListEndpointsResponse.md b/docs/ListEndpointsResponse.md index e442b58..3e37152 100644 --- a/docs/ListEndpointsResponse.md +++ b/docs/ListEndpointsResponse.md @@ -5,10 +5,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**links** | [**Array<Link1>**](Link1.md) | | [default to undefined] +**links** | [**Array<BrtcLink>**](BrtcLink.md) | | [default to undefined] **page** | [**Page**](Page.md) | | [optional] [default to undefined] **data** | [**Array<Endpoints>**](Endpoints.md) | | [default to undefined] -**errors** | [**Array<Error1>**](Error1.md) | | [default to undefined] +**errors** | [**Array<BrtcError>**](BrtcError.md) | | [default to undefined] ## Example diff --git a/docs/Error.md b/docs/WebhookSubscriptionError.md similarity index 82% rename from docs/Error.md rename to docs/WebhookSubscriptionError.md index 3514538..4b30919 100644 --- a/docs/Error.md +++ b/docs/WebhookSubscriptionError.md @@ -1,4 +1,4 @@ -# ModelError +# WebhookSubscriptionError ## Properties @@ -12,9 +12,9 @@ Name | Type | Description | Notes ## Example ```typescript -import { ModelError } from 'bandwidth-sdk'; +import { WebhookSubscriptionError } from 'bandwidth-sdk'; -const instance: ModelError = { +const instance: WebhookSubscriptionError = { code, description, telephoneNumbers, diff --git a/docs/WebhookSubscriptionsListBody.md b/docs/WebhookSubscriptionsListBody.md index 8485b50..ce0e6de 100644 --- a/docs/WebhookSubscriptionsListBody.md +++ b/docs/WebhookSubscriptionsListBody.md @@ -7,7 +7,7 @@ A list of all webhook subscriptions registered for this account ID for this part Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **links** | [**LinksObject**](LinksObject.md) | | [optional] [default to undefined] -**errors** | [**Array<ModelError>**](ModelError.md) | | [optional] [default to undefined] +**errors** | [**Array<WebhookSubscriptionError>**](WebhookSubscriptionError.md) | | [optional] [default to undefined] **data** | [**Array<WebhookSubscription>**](WebhookSubscription.md) | | [default to undefined] ## Example diff --git a/models/error-response.ts b/models/brtc-error-response.ts similarity index 72% rename from models/error-response.ts rename to models/brtc-error-response.ts index 1e0742d..9cb97bc 100644 --- a/models/error-response.ts +++ b/models/brtc-error-response.ts @@ -15,14 +15,14 @@ // May contain unused imports in some cases // @ts-ignore -import type { Error1 } from './error1'; +import type { BrtcError } from './brtc-error'; // May contain unused imports in some cases // @ts-ignore -import type { Link1 } from './link1'; +import type { BrtcLink } from './brtc-link'; -export interface ErrorResponse { - 'links': Array; +export interface BrtcErrorResponse { + 'links': Array; 'data': object | null; - 'errors': Array; + 'errors': Array; } diff --git a/models/error1-source.ts b/models/brtc-error-source.ts similarity index 95% rename from models/error1-source.ts rename to models/brtc-error-source.ts index 0682129..aaccfa3 100644 --- a/models/error1-source.ts +++ b/models/brtc-error-source.ts @@ -14,7 +14,7 @@ -export interface Error1Source { +export interface BrtcErrorSource { /** * The URI parameter that caused the error. */ diff --git a/models/error1.ts b/models/brtc-error.ts similarity index 85% rename from models/error1.ts rename to models/brtc-error.ts index f54d843..01ab53f 100644 --- a/models/error1.ts +++ b/models/brtc-error.ts @@ -15,9 +15,9 @@ // May contain unused imports in some cases // @ts-ignore -import type { Error1Source } from './error1-source'; +import type { BrtcErrorSource } from './brtc-error-source'; -export interface Error1 { +export interface BrtcError { /** * A unique identifier for the error. */ @@ -34,6 +34,6 @@ export interface Error1 { * A code that uniquely identifies the error. */ 'code'?: string; - 'source'?: Error1Source; + 'source'?: BrtcErrorSource; } diff --git a/models/link1.ts b/models/brtc-link.ts similarity index 70% rename from models/link1.ts rename to models/brtc-link.ts index caf3958..ef62862 100644 --- a/models/link1.ts +++ b/models/brtc-link.ts @@ -14,7 +14,7 @@ -export interface Link1 { +export interface BrtcLink { /** * The full URL of the link. */ @@ -26,15 +26,6 @@ export interface Link1 { /** * The HTTP method to use when making the request. */ - 'method'?: Link1MethodEnum; + 'method'?: string; } -export const Link1MethodEnum = { - Get: 'GET', - Post: 'POST', - Delete: 'DELETE' -} as const; - -export type Link1MethodEnum = typeof Link1MethodEnum[keyof typeof Link1MethodEnum]; - - diff --git a/models/create-endpoint-response.ts b/models/create-endpoint-response.ts index 8694eae..3a07bac 100644 --- a/models/create-endpoint-response.ts +++ b/models/create-endpoint-response.ts @@ -15,17 +15,17 @@ // May contain unused imports in some cases // @ts-ignore -import type { CreateEndpointResponseData } from './create-endpoint-response-data'; +import type { BrtcError } from './brtc-error'; // May contain unused imports in some cases // @ts-ignore -import type { Error1 } from './error1'; +import type { BrtcLink } from './brtc-link'; // May contain unused imports in some cases // @ts-ignore -import type { Link1 } from './link1'; +import type { CreateEndpointResponseData } from './create-endpoint-response-data'; export interface CreateEndpointResponse { - 'links': Array; + 'links': Array; 'data': CreateEndpointResponseData; - 'errors': Array; + 'errors': Array; } diff --git a/models/endpoint-response.ts b/models/endpoint-response.ts index c9f9d73..37013eb 100644 --- a/models/endpoint-response.ts +++ b/models/endpoint-response.ts @@ -15,17 +15,17 @@ // May contain unused imports in some cases // @ts-ignore -import type { Endpoint } from './endpoint'; +import type { BrtcError } from './brtc-error'; // May contain unused imports in some cases // @ts-ignore -import type { Error1 } from './error1'; +import type { BrtcLink } from './brtc-link'; // May contain unused imports in some cases // @ts-ignore -import type { Link1 } from './link1'; +import type { Endpoint } from './endpoint'; export interface EndpointResponse { - 'links': Array; + 'links': Array; 'data': Endpoint; - 'errors': Array; + 'errors': Array; } diff --git a/models/index.ts b/models/index.ts index 02348d4..bb6e465 100644 --- a/models/index.ts +++ b/models/index.ts @@ -6,6 +6,10 @@ export * from './async-lookup-request'; export * from './blocked-webhook'; export * from './bridge-complete-callback'; export * from './bridge-target-complete-callback'; +export * from './brtc-error'; +export * from './brtc-error-response'; +export * from './brtc-error-source'; +export * from './brtc-link'; export * from './business-entity-type-enum'; export * from './business-registration-type-enum'; export * from './call-direction-enum'; @@ -59,10 +63,7 @@ export * from './endpoint-response'; export * from './endpoint-status-enum'; export * from './endpoint-type-enum'; export * from './endpoints'; -export * from './error1'; -export * from './error1-source'; export * from './error-object'; -export * from './error-response'; export * from './error-source'; export * from './failure-webhook'; export * from './field-error'; @@ -78,7 +79,6 @@ export * from './initiate-callback'; export * from './latest-message-delivery-status-enum'; export * from './line-type-enum'; export * from './link'; -export * from './link1'; export * from './link-schema'; export * from './links-object'; export * from './list-endpoints-response'; @@ -106,7 +106,6 @@ export * from './mfa-request-error'; export * from './mfa-unauthorized-request-error'; export * from './mms-message-content'; export * from './mms-message-content-file'; -export * from './model-error'; export * from './multi-channel-action'; export * from './multi-channel-action-calendar-event'; export * from './multi-channel-channel-list-mmsobject'; @@ -193,6 +192,7 @@ export * from './voice-api-error'; export * from './voice-code-response'; export * from './webhook-subscription'; export * from './webhook-subscription-basic-authentication'; +export * from './webhook-subscription-error'; export * from './webhook-subscription-request-schema'; export * from './webhook-subscription-type-enum'; export * from './webhook-subscriptions-list-body'; diff --git a/models/list-endpoints-response.ts b/models/list-endpoints-response.ts index f5df199..a9f7b42 100644 --- a/models/list-endpoints-response.ts +++ b/models/list-endpoints-response.ts @@ -15,21 +15,21 @@ // May contain unused imports in some cases // @ts-ignore -import type { Endpoints } from './endpoints'; +import type { BrtcError } from './brtc-error'; // May contain unused imports in some cases // @ts-ignore -import type { Error1 } from './error1'; +import type { BrtcLink } from './brtc-link'; // May contain unused imports in some cases // @ts-ignore -import type { Link1 } from './link1'; +import type { Endpoints } from './endpoints'; // May contain unused imports in some cases // @ts-ignore import type { Page } from './page'; export interface ListEndpointsResponse { - 'links': Array; + 'links': Array; 'page'?: Page; 'data': Array; - 'errors': Array; + 'errors': Array; } diff --git a/models/model-error.ts b/models/webhook-subscription-error.ts similarity index 92% rename from models/model-error.ts rename to models/webhook-subscription-error.ts index 8fe991b..57dac6a 100644 --- a/models/model-error.ts +++ b/models/webhook-subscription-error.ts @@ -17,7 +17,7 @@ // @ts-ignore import type { TelephoneNumber } from './telephone-number'; -export interface ModelError { +export interface WebhookSubscriptionError { 'code'?: number; 'description'?: string; 'telephoneNumbers'?: Array; diff --git a/models/webhook-subscriptions-list-body.ts b/models/webhook-subscriptions-list-body.ts index c54ce43..6f18db2 100644 --- a/models/webhook-subscriptions-list-body.ts +++ b/models/webhook-subscriptions-list-body.ts @@ -18,17 +18,17 @@ import type { LinksObject } from './links-object'; // May contain unused imports in some cases // @ts-ignore -import type { ModelError } from './model-error'; +import type { WebhookSubscription } from './webhook-subscription'; // May contain unused imports in some cases // @ts-ignore -import type { WebhookSubscription } from './webhook-subscription'; +import type { WebhookSubscriptionError } from './webhook-subscription-error'; /** * A list of all webhook subscriptions registered for this account ID for this particular feature (unpaginated). */ export interface WebhookSubscriptionsListBody { 'links'?: LinksObject; - 'errors'?: Array; + 'errors'?: Array; 'data': Array; } From 15a29a441a92e12774e193f2f22a3633c7a18bcc Mon Sep 17 00:00:00 2001 From: ckoegel Date: Wed, 22 Apr 2026 14:51:53 -0400 Subject: [PATCH 3/7] formatting --- bandwidth.yml | 24 +++++++++++------------ docs/Callback.md | 4 ++-- docs/CreateCall.md | 2 +- docs/InboundCallback.md | 4 ++-- docs/InboundCallbackTypeEnum.md | 2 +- docs/MachineDetectionConfiguration.md | 2 +- docs/MessageRequest.md | 2 +- docs/RbmOpenUrlEnum.md | 2 +- docs/RbmWebViewEnum.md | 2 +- docs/StatusCallback.md | 2 +- models/create-call.ts | 2 +- models/inbound-callback-type-enum.ts | 2 +- models/inbound-callback.ts | 4 ++-- models/machine-detection-configuration.ts | 2 +- models/message-request.ts | 2 +- models/rbm-open-url-enum.ts | 2 +- models/rbm-web-view-enum.ts | 2 +- models/status-callback.ts | 2 +- 18 files changed, 32 insertions(+), 32 deletions(-) diff --git a/bandwidth.yml b/bandwidth.yml index 0bf6842..1a5cadd 100644 --- a/bandwidth.yml +++ b/bandwidth.yml @@ -2161,7 +2161,7 @@ components: type: string description: >- The name of the Authorized Message Provider (AMP) that handled this - message. + message. In the US, this is the carrier that the message was sent to. @@ -2248,7 +2248,7 @@ components: description: >- Either an alphanumeric sender ID or the sender's Bandwidth phone number in E.164 format, which must be hosted within Bandwidth and - linked to the account that is generating the message. + linked to the account that is generating the message. Alphanumeric Sender IDs can contain up to 11 characters, upper-case letters A-Z, lower-case letters a-z, numbers 0-9, space, hyphen -, @@ -2571,8 +2571,8 @@ components: Specifies how the URL should be opened on a mobile device. - `BROWSER` Opens the URL in the device's default browser. If - application is not set or the device doesn’t support WebView, this - option is used by default. + application is not set or the device doesn't support WebView, this + option is used by default. - `WEBVIEW` Opens the URL in an in-app WebView. enum: @@ -2585,7 +2585,7 @@ components: 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. + - `FULL` WebView takes the full screen. - `HALF` WebView takes half of the screen. @@ -2987,7 +2987,7 @@ components: to: type: string description: > - The destination phone number the message was sent to. + The destination phone number the message was sent to. For inbound callbacks, this is the Bandwidth number or alphanumeric identifier that received the message. @@ -3038,7 +3038,7 @@ components: client to a Bandwidth number. - `request-location-response` indicates a response to a location request - sent by the Bandwidth user's client after receiving an RBM message. + sent by the Bandwidth user's client after receiving an RBM message. - `suggestion-response` indicates a response to a suggestion sent by the Bandwidth user's client after receiving an RBM message. @@ -3277,7 +3277,7 @@ components: nullable: true type: string description: >- - The caller display name to use when the call is created. + The caller display name to use when the call is created. May not exceed 256 characters nor contain control characters such as new lines. @@ -4214,7 +4214,7 @@ components: format: double description: >- When an answering machine is detected, the amount of silence (in - seconds) before assuming the message has finished playing. + seconds) before assuming the message has finished playing. If not provided it will default to the speechEndThreshold value. example: 5 @@ -9627,12 +9627,12 @@ components: required: true description: >-

This Inbound Message Webhook is an envelope containing either a - received (MO) message to your + received (MO) message to your message-enabled Bandwidth telephone number or a multichannel - client's response to a suggestion response + client's response to a suggestion response - or location request. + or location request.

The payload type will be one of message-received, suggestion-response, or diff --git a/docs/Callback.md b/docs/Callback.md index 6cbe3b8..52af615 100644 --- a/docs/Callback.md +++ b/docs/Callback.md @@ -9,11 +9,11 @@ Name | Type | Description | Notes **time** | **string** | | [default to undefined] **eventTime** | **string** | Represents the time at which the message was read, for `message-read` callbacks. | [optional] [default to undefined] **type** | [**InboundCallbackTypeEnum**](InboundCallbackTypeEnum.md) | | [default to undefined] -**to** | **string** | The destination phone number the message was sent to. For inbound callbacks, this is the Bandwidth number or alphanumeric identifier that received the message. | [default to undefined] +**to** | **string** | The destination phone number the message was sent to. For inbound callbacks, this is the Bandwidth number or alphanumeric identifier that received the message. | [default to undefined] **description** | **string** | A detailed description of the event described by the callback. | [default to undefined] **message** | [**InboundCallbackMessage**](InboundCallbackMessage.md) | | [default to undefined] **errorCode** | **number** | Optional error code, applicable only when type is `message-failed`. | [optional] [default to undefined] -**carrierName** | **string** | The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to. This field is present only when this account feature has been enabled. | [optional] [default to undefined] +**carrierName** | **string** | The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to. This field is present only when this account feature has been enabled. | [optional] [default to undefined] ## Example diff --git a/docs/CreateCall.md b/docs/CreateCall.md index 53fb60b..c18ba9a 100644 --- a/docs/CreateCall.md +++ b/docs/CreateCall.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **to** | **string** | The destination to call (must be an E.164 formatted number (e.g. `+15555551212`) or a SIP URI (e.g. `sip:user@server.example`)). | [default to undefined] **from** | **string** | A Bandwidth phone number on your account the call should come from (must be in E.164 format, like `+15555551212`) even if `privacy` is set to true. | [default to undefined] **privacy** | **boolean** | Hide the calling number. The `displayName` field can be used to customize the displayed name. | [optional] [default to undefined] -**displayName** | **string** | The caller display name to use when the call is created. May not exceed 256 characters nor contain control characters such as new lines. If `privacy` is true, only the following values are valid: `Restricted`, `Anonymous`, `Private`, or `Unavailable`. | [optional] [default to undefined] +**displayName** | **string** | The caller display name to use when the call is created. May not exceed 256 characters nor contain control characters such as new lines. If `privacy` is true, only the following values are valid: `Restricted`, `Anonymous`, `Private`, or `Unavailable`. | [optional] [default to undefined] **uui** | **string** | A comma-separated list of \'User-To-User\' headers to be sent in the INVITE when calling a SIP URI. Each value must end with an \'encoding\' parameter as described in <a href=\'https://tools.ietf.org/html/rfc7433\'>RFC 7433</a>. Only \'jwt\', \'base64\' and \'hex\' encodings are allowed. The entire value cannot exceed 350 characters, including parameters and separators. | [optional] [default to undefined] **applicationId** | **string** | The id of the application associated with the `from` number. | [default to undefined] **answerUrl** | **string** | The full URL to send the <a href=\'/docs/voice/webhooks/answer\'>Answer</a> event to when the called party answers. This endpoint should return the first <a href=\'/docs/voice/bxml\'>BXML document</a> to be executed in the call. Must use `https` if specifying `username` and `password`. | [default to undefined] diff --git a/docs/InboundCallback.md b/docs/InboundCallback.md index c174271..3f423b3 100644 --- a/docs/InboundCallback.md +++ b/docs/InboundCallback.md @@ -8,10 +8,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **time** | **string** | | [default to undefined] **type** | [**InboundCallbackTypeEnum**](InboundCallbackTypeEnum.md) | | [default to undefined] -**to** | **string** | The destination phone number the message was sent to. For inbound callbacks, this is the Bandwidth number or alphanumeric identifier that received the message. | [default to undefined] +**to** | **string** | The destination phone number the message was sent to. For inbound callbacks, this is the Bandwidth number or alphanumeric identifier that received the message. | [default to undefined] **description** | **string** | A detailed description of the event described by the callback. | [default to undefined] **message** | [**InboundCallbackMessage**](InboundCallbackMessage.md) | | [default to undefined] -**carrierName** | **string** | The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to. This field is present only when this account feature has been enabled. | [optional] [default to undefined] +**carrierName** | **string** | The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to. This field is present only when this account feature has been enabled. | [optional] [default to undefined] ## Example diff --git a/docs/InboundCallbackTypeEnum.md b/docs/InboundCallbackTypeEnum.md index 5e38723..714e436 100644 --- a/docs/InboundCallbackTypeEnum.md +++ b/docs/InboundCallbackTypeEnum.md @@ -1,6 +1,6 @@ # InboundCallbackTypeEnum -The possible inbound callback types originating from MO messages or multichannel message client responses: - `message-received` indicates an MO message from a Bandwidth user\'s client to a Bandwidth number. - `request-location-response` indicates a response to a location request sent by the Bandwidth user\'s client after receiving an RBM message. - `suggestion-response` indicates a response to a suggestion sent by the Bandwidth user\'s client after receiving an RBM message. +The possible inbound callback types originating from MO messages or multichannel message client responses: - `message-received` indicates an MO message from a Bandwidth user\'s client to a Bandwidth number. - `request-location-response` indicates a response to a location request sent by the Bandwidth user\'s client after receiving an RBM message. - `suggestion-response` indicates a response to a suggestion sent by the Bandwidth user\'s client after receiving an RBM message. ## Enum diff --git a/docs/MachineDetectionConfiguration.md b/docs/MachineDetectionConfiguration.md index 8139824..992504e 100644 --- a/docs/MachineDetectionConfiguration.md +++ b/docs/MachineDetectionConfiguration.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **silenceTimeout** | **number** | If no speech is detected in this period, a callback with a \'silence\' result is sent. | [optional] [default to 10] **speechThreshold** | **number** | When speech has ended and a result couldn\'t be determined based on the audio content itself, this value is used to determine if the speaker is a machine based on the speech duration. If the length of the speech detected is greater than or equal to this threshold, the result will be \'answering-machine\'. If the length of speech detected is below this threshold, the result will be \'human\'. | [optional] [default to 10] **speechEndThreshold** | **number** | Amount of silence (in seconds) before assuming the callee has finished speaking. | [optional] [default to 5] -**machineSpeechEndThreshold** | **number** | When an answering machine is detected, the amount of silence (in seconds) before assuming the message has finished playing. If not provided it will default to the speechEndThreshold value. | [optional] [default to undefined] +**machineSpeechEndThreshold** | **number** | When an answering machine is detected, the amount of silence (in seconds) before assuming the message has finished playing. If not provided it will default to the speechEndThreshold value. | [optional] [default to undefined] **delayResult** | **boolean** | If set to \'true\' and if an answering machine is detected, the \'answering-machine\' callback will be delayed until the machine is done speaking, or an end of message tone is detected, or until the \'detectionTimeout\' is exceeded. If false, the \'answering-machine\' result is sent immediately. | [optional] [default to false] **callbackUrl** | **string** | The URL to send the \'machineDetectionComplete\' webhook when the detection is completed. Only for \'async\' mode. | [optional] [default to undefined] **callbackMethod** | [**CallbackMethodEnum**](CallbackMethodEnum.md) | | [optional] [default to undefined] diff --git a/docs/MessageRequest.md b/docs/MessageRequest.md index d344237..73d6171 100644 --- a/docs/MessageRequest.md +++ b/docs/MessageRequest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **applicationId** | **string** | The ID of the Application your from number or senderId is associated with in the Bandwidth App. | [default to undefined] **to** | **Set<string>** | The phone number(s) the message should be sent to in E164 format. | [default to undefined] -**from** | **string** | Either an alphanumeric sender ID or the sender\'s Bandwidth phone number in E.164 format, which must be hosted within Bandwidth and linked to the account that is generating the message. Alphanumeric Sender IDs can contain up to 11 characters, upper-case letters A-Z, lower-case letters a-z, numbers 0-9, space, hyphen -, plus +, underscore _ and ampersand &. Alphanumeric Sender IDs must contain at least one letter. | [default to undefined] +**from** | **string** | Either an alphanumeric sender ID or the sender\'s Bandwidth phone number in E.164 format, which must be hosted within Bandwidth and linked to the account that is generating the message. Alphanumeric Sender IDs can contain up to 11 characters, upper-case letters A-Z, lower-case letters a-z, numbers 0-9, space, hyphen -, plus +, underscore _ and ampersand &. Alphanumeric Sender IDs must contain at least one letter. | [default to undefined] **text** | **string** | The contents of the text message. Must be 2048 characters or less. | [optional] [default to undefined] **media** | **Array<string>** | A list of URLs to include as media attachments as part of the message. Each URL can be at most 4096 characters. | [optional] [default to undefined] **tag** | **string** | A custom string that will be included in callback events of the message. Max 1024 characters. | [optional] [default to undefined] diff --git a/docs/RbmOpenUrlEnum.md b/docs/RbmOpenUrlEnum.md index 0ceb3e0..0f8ca14 100644 --- a/docs/RbmOpenUrlEnum.md +++ b/docs/RbmOpenUrlEnum.md @@ -1,6 +1,6 @@ # RbmOpenUrlEnum -Specifies how the URL should be opened on a mobile device. - `BROWSER` Opens the URL in the device\'s default browser. If application is not set or the device doesn’t support WebView, this option is used by default. - `WEBVIEW` Opens the URL in an in-app WebView. +Specifies how the URL should be opened on a mobile device. - `BROWSER` Opens the URL in the device\'s default browser. If application is not set or the device doesn\'t support WebView, this option is used by default. - `WEBVIEW` Opens the URL in an in-app WebView. ## Enum diff --git a/docs/RbmWebViewEnum.md b/docs/RbmWebViewEnum.md index c713add..ee61bc7 100644 --- a/docs/RbmWebViewEnum.md +++ b/docs/RbmWebViewEnum.md @@ -1,6 +1,6 @@ # RbmWebViewEnum -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. +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. ## Enum diff --git a/docs/StatusCallback.md b/docs/StatusCallback.md index f428e28..6cc4a0d 100644 --- a/docs/StatusCallback.md +++ b/docs/StatusCallback.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes **description** | **string** | A detailed description of the event described by the callback. | [default to undefined] **message** | [**StatusCallbackMessage**](StatusCallbackMessage.md) | | [default to undefined] **errorCode** | **number** | Optional error code, applicable only when type is `message-failed`. | [optional] [default to undefined] -**carrierName** | **string** | The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to. This field is present only when this account feature has been enabled. | [optional] [default to undefined] +**carrierName** | **string** | The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to. This field is present only when this account feature has been enabled. | [optional] [default to undefined] ## Example diff --git a/models/create-call.ts b/models/create-call.ts index 71618ea..184c4f1 100644 --- a/models/create-call.ts +++ b/models/create-call.ts @@ -34,7 +34,7 @@ export interface CreateCall { */ 'privacy'?: boolean | null; /** - * The caller display name to use when the call is created. May not exceed 256 characters nor contain control characters such as new lines. If `privacy` is true, only the following values are valid: `Restricted`, `Anonymous`, `Private`, or `Unavailable`. + * The caller display name to use when the call is created. May not exceed 256 characters nor contain control characters such as new lines. If `privacy` is true, only the following values are valid: `Restricted`, `Anonymous`, `Private`, or `Unavailable`. */ 'displayName'?: string | null; /** diff --git a/models/inbound-callback-type-enum.ts b/models/inbound-callback-type-enum.ts index bb29bbe..7c4a076 100644 --- a/models/inbound-callback-type-enum.ts +++ b/models/inbound-callback-type-enum.ts @@ -15,7 +15,7 @@ /** - * The possible inbound callback types originating from MO messages or multichannel message client responses: - `message-received` indicates an MO message from a Bandwidth user\'s client to a Bandwidth number. - `request-location-response` indicates a response to a location request sent by the Bandwidth user\'s client after receiving an RBM message. - `suggestion-response` indicates a response to a suggestion sent by the Bandwidth user\'s client after receiving an RBM message. + * The possible inbound callback types originating from MO messages or multichannel message client responses: - `message-received` indicates an MO message from a Bandwidth user\'s client to a Bandwidth number. - `request-location-response` indicates a response to a location request sent by the Bandwidth user\'s client after receiving an RBM message. - `suggestion-response` indicates a response to a suggestion sent by the Bandwidth user\'s client after receiving an RBM message. */ export const InboundCallbackTypeEnum = { diff --git a/models/inbound-callback.ts b/models/inbound-callback.ts index 7080ef7..0d77ebe 100644 --- a/models/inbound-callback.ts +++ b/models/inbound-callback.ts @@ -27,7 +27,7 @@ export interface InboundCallback { 'time': string; 'type': InboundCallbackTypeEnum; /** - * The destination phone number the message was sent to. For inbound callbacks, this is the Bandwidth number or alphanumeric identifier that received the message. + * The destination phone number the message was sent to. For inbound callbacks, this is the Bandwidth number or alphanumeric identifier that received the message. */ 'to': string; /** @@ -36,7 +36,7 @@ export interface InboundCallback { 'description': string; 'message': InboundCallbackMessage; /** - * The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to. This field is present only when this account feature has been enabled. + * The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to. This field is present only when this account feature has been enabled. */ 'carrierName'?: string; } diff --git a/models/machine-detection-configuration.ts b/models/machine-detection-configuration.ts index ab04051..e586ce8 100644 --- a/models/machine-detection-configuration.ts +++ b/models/machine-detection-configuration.ts @@ -42,7 +42,7 @@ export interface MachineDetectionConfiguration { */ 'speechEndThreshold'?: number | null; /** - * When an answering machine is detected, the amount of silence (in seconds) before assuming the message has finished playing. If not provided it will default to the speechEndThreshold value. + * When an answering machine is detected, the amount of silence (in seconds) before assuming the message has finished playing. If not provided it will default to the speechEndThreshold value. */ 'machineSpeechEndThreshold'?: number | null; /** diff --git a/models/message-request.ts b/models/message-request.ts index bf97afc..df22774 100644 --- a/models/message-request.ts +++ b/models/message-request.ts @@ -27,7 +27,7 @@ export interface MessageRequest { */ 'to': Set; /** - * Either an alphanumeric sender ID or the sender\'s Bandwidth phone number in E.164 format, which must be hosted within Bandwidth and linked to the account that is generating the message. Alphanumeric Sender IDs can contain up to 11 characters, upper-case letters A-Z, lower-case letters a-z, numbers 0-9, space, hyphen -, plus +, underscore _ and ampersand &. Alphanumeric Sender IDs must contain at least one letter. + * Either an alphanumeric sender ID or the sender\'s Bandwidth phone number in E.164 format, which must be hosted within Bandwidth and linked to the account that is generating the message. Alphanumeric Sender IDs can contain up to 11 characters, upper-case letters A-Z, lower-case letters a-z, numbers 0-9, space, hyphen -, plus +, underscore _ and ampersand &. Alphanumeric Sender IDs must contain at least one letter. */ 'from': string; /** diff --git a/models/rbm-open-url-enum.ts b/models/rbm-open-url-enum.ts index f45ae64..3f1e003 100644 --- a/models/rbm-open-url-enum.ts +++ b/models/rbm-open-url-enum.ts @@ -15,7 +15,7 @@ /** - * Specifies how the URL should be opened on a mobile device. - `BROWSER` Opens the URL in the device\'s default browser. If application is not set or the device doesn’t support WebView, this option is used by default. - `WEBVIEW` Opens the URL in an in-app WebView. + * Specifies how the URL should be opened on a mobile device. - `BROWSER` Opens the URL in the device\'s default browser. If application is not set or the device doesn\'t support WebView, this option is used by default. - `WEBVIEW` Opens the URL in an in-app WebView. */ export const RbmOpenUrlEnum = { diff --git a/models/rbm-web-view-enum.ts b/models/rbm-web-view-enum.ts index 3d7e67a..2654665 100644 --- a/models/rbm-web-view-enum.ts +++ b/models/rbm-web-view-enum.ts @@ -15,7 +15,7 @@ /** - * 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. + * 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. */ export const RbmWebViewEnum = { diff --git a/models/status-callback.ts b/models/status-callback.ts index b91b87c..9805fa8 100644 --- a/models/status-callback.ts +++ b/models/status-callback.ts @@ -44,7 +44,7 @@ export interface StatusCallback { */ 'errorCode'?: number; /** - * The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to. This field is present only when this account feature has been enabled. + * The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to. This field is present only when this account feature has been enabled. */ 'carrierName'?: string; } From 9799cd6c8f9402d127ab88f8549b86d2f132ca82 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Wed, 22 Apr 2026 14:56:56 -0400 Subject: [PATCH 4/7] more formatting --- bandwidth.yml | 2 +- docs/LookupResult.md | 2 +- models/lookup-result.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bandwidth.yml b/bandwidth.yml index 1a5cadd..6ad54bc 100644 --- a/bandwidth.yml +++ b/bandwidth.yml @@ -5958,7 +5958,7 @@ components: format: date description: >- [DNI-Only](#section/DNI-Only). The date the phone number entered the - status described in `latestMessageDeliveryStatus`. + status described in `latestMessageDeliveryStatus`. Think of this as the "start time" for that status. diff --git a/docs/LookupResult.md b/docs/LookupResult.md index 4174d49..89b6265 100644 --- a/docs/LookupResult.md +++ b/docs/LookupResult.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes **deactivationDate** | **string** | [DNI-Only](#section/DNI-Only). The datetime the carrier reported a deactivation event. | [optional] [default to undefined] **deactivationEvent** | [**DeactivationEventEnum**](DeactivationEventEnum.md) | | [optional] [default to undefined] **latestMessageDeliveryStatus** | [**LatestMessageDeliveryStatusEnum**](LatestMessageDeliveryStatusEnum.md) | | [optional] [default to undefined] -**initialMessageDeliveryStatusDate** | **string** | [DNI-Only](#section/DNI-Only). The date the phone number entered the status described in `latestMessageDeliveryStatus`. Think of this as the \"start time\" for that status. Value resets every time the `latestMessageDeliveryStatus` changes. | [optional] [default to undefined] +**initialMessageDeliveryStatusDate** | **string** | [DNI-Only](#section/DNI-Only). The date the phone number entered the status described in `latestMessageDeliveryStatus`. Think of this as the \"start time\" for that status. Value resets every time the `latestMessageDeliveryStatus` changes. | [optional] [default to undefined] **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 `latestMessageDeliveryStatus` is. Value resets every time the `latestMessageDeliveryStatus` changes. | [optional] [default to undefined] **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] diff --git a/models/lookup-result.ts b/models/lookup-result.ts index 7457d83..fdff7b2 100644 --- a/models/lookup-result.ts +++ b/models/lookup-result.ts @@ -55,7 +55,7 @@ export interface LookupResult { 'deactivationEvent'?: DeactivationEventEnum; 'latestMessageDeliveryStatus'?: LatestMessageDeliveryStatusEnum; /** - * [DNI-Only](#section/DNI-Only). The date the phone number entered the status described in `latestMessageDeliveryStatus`. Think of this as the \"start time\" for that status. Value resets every time the `latestMessageDeliveryStatus` changes. + * [DNI-Only](#section/DNI-Only). The date the phone number entered the status described in `latestMessageDeliveryStatus`. Think of this as the \"start time\" for that status. Value resets every time the `latestMessageDeliveryStatus` changes. */ 'initialMessageDeliveryStatusDate'?: string; /** From 54baef2775e53c89c4693044f1020c5c107e2b95 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Wed, 22 Apr 2026 15:10:34 -0400 Subject: [PATCH 5/7] update tests --- tests/unit/models/brtc-error-response.test.ts | 50 +++++++++++++++++++ tests/unit/models/brtc-error-source.test.ts | 17 +++++++ tests/unit/models/brtc-error.test.ts | 30 +++++++++++ tests/unit/models/brtc-link.test.ts | 15 ++++++ .../models/create-endpoint-response.test.ts | 37 ++++++++++---- tests/unit/models/endpoint-response.test.ts | 37 ++++++++++---- tests/unit/models/error-response.test.ts | 31 ------------ .../models/list-endpoints-response.test.ts | 37 ++++++++++---- 8 files changed, 196 insertions(+), 58 deletions(-) create mode 100644 tests/unit/models/brtc-error-response.test.ts create mode 100644 tests/unit/models/brtc-error-source.test.ts create mode 100644 tests/unit/models/brtc-error.test.ts create mode 100644 tests/unit/models/brtc-link.test.ts delete mode 100644 tests/unit/models/error-response.test.ts diff --git a/tests/unit/models/brtc-error-response.test.ts b/tests/unit/models/brtc-error-response.test.ts new file mode 100644 index 0000000..98cb52b --- /dev/null +++ b/tests/unit/models/brtc-error-response.test.ts @@ -0,0 +1,50 @@ +import { BrtcErrorResponse } from '../../../models/brtc-error-response'; +import { BrtcLink } from '../../../models/brtc-link'; +import { BrtcError } from '../../../models/brtc-error'; +import { BrtcErrorSource } from '../../../models/brtc-error-source'; + +describe('BrtcErrorResponse', () => { + test('should support full error response shape', () => { + const source: BrtcErrorSource = { + parameter: 'endpointId', + field: 'id', + header: 'Authorization', + reference: '/endpoints/ep-123' + }; + + const link: BrtcLink = { + href: 'http://api.example.com/endpoints', + rel: 'self', + method: 'GET' + }; + + const error: BrtcError = { + id: 'err-001', + type: 'not-found', + description: 'Endpoint not found', + code: '404', + source + }; + + const response: BrtcErrorResponse = { + links: [link], + data: null, + errors: [error] + }; + + expect(response.links).toHaveLength(1); + expect(response.links[0].href).toBe('http://api.example.com/endpoints'); + expect(response.links[0].rel).toBe('self'); + expect(response.links[0].method).toBe('GET'); + expect(response.data).toBeNull(); + expect(response.errors).toHaveLength(1); + expect(response.errors[0].id).toBe('err-001'); + expect(response.errors[0].type).toBe('not-found'); + expect(response.errors[0].description).toBe('Endpoint not found'); + expect(response.errors[0].code).toBe('404'); + expect(response.errors[0].source?.parameter).toBe('endpointId'); + expect(response.errors[0].source?.field).toBe('id'); + expect(response.errors[0].source?.header).toBe('Authorization'); + expect(response.errors[0].source?.reference).toBe('/endpoints/ep-123'); + }); +}); diff --git a/tests/unit/models/brtc-error-source.test.ts b/tests/unit/models/brtc-error-source.test.ts new file mode 100644 index 0000000..e43b345 --- /dev/null +++ b/tests/unit/models/brtc-error-source.test.ts @@ -0,0 +1,17 @@ +import { BrtcErrorSource } from '../../../models/brtc-error-source'; + +describe('BrtcErrorSource', () => { + test('should support full BrtcErrorSource shape', () => { + const source: BrtcErrorSource = { + parameter: 'endpointId', + field: 'id', + header: 'Authorization', + reference: '/endpoints/ep-123' + }; + + expect(source.parameter).toBe('endpointId'); + expect(source.field).toBe('id'); + expect(source.header).toBe('Authorization'); + expect(source.reference).toBe('/endpoints/ep-123'); + }); +}); diff --git a/tests/unit/models/brtc-error.test.ts b/tests/unit/models/brtc-error.test.ts new file mode 100644 index 0000000..a1513e7 --- /dev/null +++ b/tests/unit/models/brtc-error.test.ts @@ -0,0 +1,30 @@ +import { BrtcError } from '../../../models/brtc-error'; +import { BrtcErrorSource } from '../../../models/brtc-error-source'; + +describe('BrtcError', () => { + test('should support full BrtcError shape', () => { + const source: BrtcErrorSource = { + parameter: 'endpointId', + field: 'id', + header: 'Authorization', + reference: '/endpoints/ep-123' + }; + + const error: BrtcError = { + id: 'err-001', + type: 'not-found', + description: 'Endpoint not found', + code: '404', + source + }; + + expect(error.id).toBe('err-001'); + expect(error.type).toBe('not-found'); + expect(error.description).toBe('Endpoint not found'); + expect(error.code).toBe('404'); + expect(error.source?.parameter).toBe('endpointId'); + expect(error.source?.field).toBe('id'); + expect(error.source?.header).toBe('Authorization'); + expect(error.source?.reference).toBe('/endpoints/ep-123'); + }); +}); diff --git a/tests/unit/models/brtc-link.test.ts b/tests/unit/models/brtc-link.test.ts new file mode 100644 index 0000000..d7f36a0 --- /dev/null +++ b/tests/unit/models/brtc-link.test.ts @@ -0,0 +1,15 @@ +import { BrtcLink } from '../../../models/brtc-link'; + +describe('BrtcLink', () => { + test('should support full BrtcLink shape', () => { + const link: BrtcLink = { + href: 'http://api.example.com/endpoints', + rel: 'self', + method: 'GET' + }; + + expect(link.href).toBe('http://api.example.com/endpoints'); + expect(link.rel).toBe('self'); + expect(link.method).toBe('GET'); + }); +}); diff --git a/tests/unit/models/create-endpoint-response.test.ts b/tests/unit/models/create-endpoint-response.test.ts index ed7058c..2ccfdd6 100644 --- a/tests/unit/models/create-endpoint-response.test.ts +++ b/tests/unit/models/create-endpoint-response.test.ts @@ -4,14 +4,16 @@ import { Device } from '../../../models/device'; import { DeviceStatusEnum } from '../../../models/device-status-enum'; import { EndpointStatusEnum } from '../../../models/endpoint-status-enum'; import { EndpointTypeEnum } from '../../../models/endpoint-type-enum'; -import { Link } from '../../../models/link'; -import { ModelError } from '../../../models/model-error'; +import { BrtcLink } from '../../../models/brtc-link'; +import { BrtcError } from '../../../models/brtc-error'; +import { BrtcErrorSource } from '../../../models/brtc-error-source'; describe('CreateEndpointResponse', () => { test('should create an endpoint response with all fields', () => { - const link: Link = { + const link: BrtcLink = { + href: 'http://api.example.com/endpoints/ep-123456', rel: 'self', - href: 'http://api.example.com/endpoints/ep-123456' + method: 'POST' }; const devices: Device[] = [ @@ -34,9 +36,19 @@ describe('CreateEndpointResponse', () => { devices }; - const error: ModelError = { - code: 400, - description: 'Missing required field: endpointId' + const source: BrtcErrorSource = { + parameter: 'endpointId', + field: 'id', + header: 'Authorization', + reference: '/endpoints' + }; + + const error: BrtcError = { + id: 'err-400', + type: 'validation-error', + description: 'Missing required field: endpointId', + code: '400', + source }; const response: CreateEndpointResponse = { @@ -46,8 +58,9 @@ describe('CreateEndpointResponse', () => { }; expect(response.links).toHaveLength(1); - expect(response.links[0].rel).toBe('self'); expect(response.links[0].href).toBe('http://api.example.com/endpoints/ep-123456'); + expect(response.links[0].rel).toBe('self'); + expect(response.links[0].method).toBe('POST'); expect(response.data.endpointId).toBe('ep-123456'); expect(response.data.type).toBe('WEBRTC'); expect(response.data.status).toBe('CONNECTED'); @@ -61,7 +74,13 @@ describe('CreateEndpointResponse', () => { expect(response.data.devices![0].status).toBe(DeviceStatusEnum.Connected); expect(response.data.devices![0].creationTimestamp).toBe('2024-02-18T10:31:00Z'); expect(response.errors).toHaveLength(1); - expect(response.errors[0].code).toBe(400); + expect(response.errors[0].id).toBe('err-400'); + expect(response.errors[0].type).toBe('validation-error'); expect(response.errors[0].description).toContain('endpointId'); + expect(response.errors[0].code).toBe('400'); + expect(response.errors[0].source?.parameter).toBe('endpointId'); + expect(response.errors[0].source?.field).toBe('id'); + expect(response.errors[0].source?.header).toBe('Authorization'); + expect(response.errors[0].source?.reference).toBe('/endpoints'); }); }); diff --git a/tests/unit/models/endpoint-response.test.ts b/tests/unit/models/endpoint-response.test.ts index 7a145ea..6219079 100644 --- a/tests/unit/models/endpoint-response.test.ts +++ b/tests/unit/models/endpoint-response.test.ts @@ -4,14 +4,16 @@ import { Device } from '../../../models/device'; import { DeviceStatusEnum } from '../../../models/device-status-enum'; import { EndpointStatusEnum } from '../../../models/endpoint-status-enum'; import { EndpointTypeEnum } from '../../../models/endpoint-type-enum'; -import { Link } from '../../../models/link'; -import { ModelError } from '../../../models/model-error'; +import { BrtcLink } from '../../../models/brtc-link'; +import { BrtcError } from '../../../models/brtc-error'; +import { BrtcErrorSource } from '../../../models/brtc-error-source'; describe('EndpointResponse', () => { test('should create an endpoint response with all fields', () => { - const link: Link = { + const link: BrtcLink = { + href: 'http://api.example.com/endpoints/ep-123456', rel: 'self', - href: 'http://api.example.com/endpoints/ep-123456' + method: 'GET' }; const devices: Device[] = [ @@ -33,9 +35,19 @@ describe('EndpointResponse', () => { devices }; - const error: ModelError = { - code: 400, - description: 'Invalid endpoint configuration' + const source: BrtcErrorSource = { + parameter: 'endpointId', + field: 'id', + header: 'Authorization', + reference: '/endpoints/ep-123456' + }; + + const error: BrtcError = { + id: 'err-400', + type: 'validation-error', + description: 'Invalid endpoint configuration', + code: '400', + source }; const response: EndpointResponse = { @@ -45,8 +57,9 @@ describe('EndpointResponse', () => { }; expect(response.links).toHaveLength(1); - expect(response.links[0].rel).toBe('self'); expect(response.links[0].href).toBe('http://api.example.com/endpoints/ep-123456'); + expect(response.links[0].rel).toBe('self'); + expect(response.links[0].method).toBe('GET'); expect(response.data.endpointId).toBe('ep-123456'); expect(response.data.type).toBe(EndpointTypeEnum.Webrtc); expect(response.data.status).toBe(EndpointStatusEnum.Connected); @@ -59,7 +72,13 @@ describe('EndpointResponse', () => { expect(response.data.devices![0].status).toBe(DeviceStatusEnum.Connected); expect(response.data.devices![0].creationTimestamp).toBe('2024-02-18T10:31:00Z'); expect(response.errors).toHaveLength(1); - expect(response.errors[0].code).toBe(400); + expect(response.errors[0].id).toBe('err-400'); + expect(response.errors[0].type).toBe('validation-error'); expect(response.errors[0].description).toBe('Invalid endpoint configuration'); + expect(response.errors[0].code).toBe('400'); + expect(response.errors[0].source?.parameter).toBe('endpointId'); + expect(response.errors[0].source?.field).toBe('id'); + expect(response.errors[0].source?.header).toBe('Authorization'); + expect(response.errors[0].source?.reference).toBe('/endpoints/ep-123456'); }); }); diff --git a/tests/unit/models/error-response.test.ts b/tests/unit/models/error-response.test.ts deleted file mode 100644 index e0f370b..0000000 --- a/tests/unit/models/error-response.test.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { ErrorResponse } from '../../../models/error-response'; -import { Link } from '../../../models/link'; -import { ModelError } from '../../../models/model-error'; - -describe('ErrorResponse', () => { - test('should support full error response shape', () => { - const link: Link = { - rel: 'self', - href: 'http://api.example.com/endpoints' - }; - - const error: ModelError = { - code: 404, - description: 'Endpoint not found' - }; - - const response: ErrorResponse = { - links: [link], - data: null, - errors: [error] - }; - - expect(response.links).toHaveLength(1); - expect(response.links[0].rel).toBe('self'); - expect(response.links[0].href).toBe('http://api.example.com/endpoints'); - expect(response.data).toBeNull(); - expect(response.errors).toHaveLength(1); - expect(response.errors[0].code).toBe(404); - expect(response.errors[0].description).toBe('Endpoint not found'); - }); -}); diff --git a/tests/unit/models/list-endpoints-response.test.ts b/tests/unit/models/list-endpoints-response.test.ts index 37a749c..7373694 100644 --- a/tests/unit/models/list-endpoints-response.test.ts +++ b/tests/unit/models/list-endpoints-response.test.ts @@ -2,15 +2,17 @@ import { ListEndpointsResponse } from '../../../models/list-endpoints-response'; import { Endpoints } from '../../../models/endpoints'; import { EndpointStatusEnum } from '../../../models/endpoint-status-enum'; import { EndpointTypeEnum } from '../../../models/endpoint-type-enum'; -import { Link } from '../../../models/link'; +import { BrtcLink } from '../../../models/brtc-link'; +import { BrtcError } from '../../../models/brtc-error'; +import { BrtcErrorSource } from '../../../models/brtc-error-source'; import { Page } from '../../../models/page'; -import { ModelError } from '../../../models/model-error'; describe('ListEndpointsResponse', () => { test('should create a list endpoints response with all fields', () => { - const link: Link = { + const link: BrtcLink = { + href: 'http://api.example.com/endpoints?page=1', rel: 'self', - href: 'http://api.example.com/endpoints?page=1' + method: 'GET' }; const page: Page = { @@ -38,9 +40,19 @@ describe('ListEndpointsResponse', () => { } ]; - const error: ModelError = { - code: 500, - description: 'Internal server error' + const source: BrtcErrorSource = { + parameter: 'page', + field: 'pageNumber', + header: 'Authorization', + reference: '/endpoints' + }; + + const error: BrtcError = { + id: 'err-500', + type: 'internal-error', + description: 'Internal server error', + code: '500', + source }; const response: ListEndpointsResponse = { @@ -51,8 +63,9 @@ describe('ListEndpointsResponse', () => { }; expect(response.links).toHaveLength(1); - expect(response.links[0].rel).toBe('self'); expect(response.links[0].href).toBe('http://api.example.com/endpoints?page=1'); + expect(response.links[0].rel).toBe('self'); + expect(response.links[0].method).toBe('GET'); expect(response.page).toBeDefined(); expect(response.page?.pageSize).toBe(10); expect(response.page?.pageNumber).toBe(1); @@ -69,7 +82,13 @@ describe('ListEndpointsResponse', () => { expect(new Date(response.data[1].expirationTimestamp).getFullYear()).toBe(2024); expect(new Date(response.data[1].expirationTimestamp).toISOString()).toBe('2024-02-19T10:30:00.000Z'); expect(response.errors).toHaveLength(1); - expect(response.errors[0].code).toBe(500); + expect(response.errors[0].id).toBe('err-500'); + expect(response.errors[0].type).toBe('internal-error'); expect(response.errors[0].description).toBe('Internal server error'); + expect(response.errors[0].code).toBe('500'); + expect(response.errors[0].source?.parameter).toBe('page'); + expect(response.errors[0].source?.field).toBe('pageNumber'); + expect(response.errors[0].source?.header).toBe('Authorization'); + expect(response.errors[0].source?.reference).toBe('/endpoints'); }); }); From 2ba60328e8e364d979071f51514e12ee6c4a189f Mon Sep 17 00:00:00 2001 From: ckoegel Date: Wed, 22 Apr 2026 15:33:15 -0400 Subject: [PATCH 6/7] fix allOf models --- custom_templates/modelAllOf.mustache | 14 ++++++ models/create-endpoint-response-data.ts | 26 ++++++++++- models/create-web-rtc-connection-request.ts | 18 +++++++- models/endpoint-event.ts | 27 +++++++++++- models/endpoint.ts | 22 +++++++++- models/inbound-callback-message.ts | 43 ++++++++++++++++++- models/multi-channel-action-calendar-event.ts | 28 +++++++++++- .../multi-channel-channel-list-mmsobject.ts | 13 +++++- ...channel-channel-list-mmsresponse-object.ts | 32 +++++++++++++- .../multi-channel-channel-list-rbmobject.ts | 13 +++++- ...channel-channel-list-rbmresponse-object.ts | 32 +++++++++++++- .../multi-channel-channel-list-smsobject.ts | 13 +++++- ...channel-channel-list-smsresponse-object.ts | 32 +++++++++++++- models/rbm-action-dial.ts | 16 ++++++- models/rbm-action-open-url.ts | 18 +++++++- models/rbm-action-view-location.ts | 24 ++++++++++- models/rbm-card-content-media.ts | 12 +++++- tests/unit/models/endpoint-event.test.ts | 21 ++++++++- 18 files changed, 387 insertions(+), 17 deletions(-) create mode 100644 custom_templates/modelAllOf.mustache diff --git a/custom_templates/modelAllOf.mustache b/custom_templates/modelAllOf.mustache new file mode 100644 index 0000000..5309235 --- /dev/null +++ b/custom_templates/modelAllOf.mustache @@ -0,0 +1,14 @@ +/** + * @type {{classname}}{{#description}} + * {{{.}}}{{/description}} + */ +export type {{classname}} = {{#allOf}}{{#isModel}}{{{dataType}}}{{/isModel}}{{^isModel}}{{#hasVars}}{ +{{#vars}} +{{#description}} + /** + * {{{.}}} + */ +{{/description}} + '{{name}}'{{^required}}?{{/required}}: {{{dataType}}}; +{{/vars}} +}{{/hasVars}}{{/isModel}}{{^-last}} & {{/-last}}{{/allOf}}; diff --git a/models/create-endpoint-response-data.ts b/models/create-endpoint-response-data.ts index 5c42ed7..7de21e6 100644 --- a/models/create-endpoint-response-data.ts +++ b/models/create-endpoint-response-data.ts @@ -29,6 +29,30 @@ import type { EndpointTypeEnum } from './endpoint-type-enum'; /** * @type CreateEndpointResponseData */ -export type CreateEndpointResponseData = Endpoint; +export type CreateEndpointResponseData = { + /** + * The unique ID of the endpoint. + */ + 'endpointId': string; + 'type': EndpointTypeEnum; + 'status': EndpointStatusEnum; + /** + * The time the endpoint was created. In ISO-8601 format. + */ + 'creationTimestamp': string; + /** + * The time the endpoint token will expire. In ISO-8601 format. Tokens last 24 hours. + */ + 'expirationTimestamp': string; + /** + * A tag for the endpoint. + */ + 'tag'?: string; + 'devices'?: Array; + /** + * The json web token specific to the endpoint. Used to authenticate the client with the media gateway. + */ + 'token': string; +}; diff --git a/models/create-web-rtc-connection-request.ts b/models/create-web-rtc-connection-request.ts index d907ec3..f487f0a 100644 --- a/models/create-web-rtc-connection-request.ts +++ b/models/create-web-rtc-connection-request.ts @@ -26,6 +26,22 @@ import type { EndpointTypeEnum } from './endpoint-type-enum'; /** * @type CreateWebRtcConnectionRequest */ -export type CreateWebRtcConnectionRequest = CreateEndpointRequestBase; +export type CreateWebRtcConnectionRequest = { + 'type': EndpointTypeEnum; + 'direction': EndpointDirectionEnum; + /** + * The URL to send event callbacks to. + */ + 'eventCallbackUrl'?: string; + /** + * The URL to send event fallbacks to. + */ + 'eventFallbackUrl'?: string; + /** + * A tag for the endpoint. + */ + 'tag'?: string; + 'connectionMetadata'?: object; +}; diff --git a/models/endpoint-event.ts b/models/endpoint-event.ts index f1667d2..fa0d34a 100644 --- a/models/endpoint-event.ts +++ b/models/endpoint-event.ts @@ -33,6 +33,31 @@ import type { Endpoints } from './endpoints'; * @type EndpointEvent * An event that occurred on an endpoint. */ -export type EndpointEvent = Endpoints; +export type EndpointEvent = { + /** + * The unique ID of the endpoint. + */ + 'endpointId': string; + 'type': EndpointTypeEnum; + 'status': EndpointStatusEnum; + /** + * The time the endpoint was created. In ISO-8601 format. + */ + 'creationTimestamp': string; + /** + * The time the endpoint token will expire. In ISO-8601 format. Tokens last 24 hours. + */ + 'expirationTimestamp': string; + /** + * A tag for the endpoint. + */ + 'tag'?: string; + /** + * The time the event occurred. In ISO-8601 format. + */ + 'eventTime': string; + 'eventType': EndpointEventTypeEnum; + 'device'?: Device; +}; diff --git a/models/endpoint.ts b/models/endpoint.ts index 649c2b5..1a2860b 100644 --- a/models/endpoint.ts +++ b/models/endpoint.ts @@ -29,6 +29,26 @@ import type { Endpoints } from './endpoints'; /** * @type Endpoint */ -export type Endpoint = Endpoints; +export type Endpoint = { + /** + * The unique ID of the endpoint. + */ + 'endpointId': string; + 'type': EndpointTypeEnum; + 'status': EndpointStatusEnum; + /** + * The time the endpoint was created. In ISO-8601 format. + */ + 'creationTimestamp': string; + /** + * The time the endpoint token will expire. In ISO-8601 format. Tokens last 24 hours. + */ + 'expirationTimestamp': string; + /** + * A tag for the endpoint. + */ + 'tag'?: string; + 'devices'?: Array; +}; diff --git a/models/inbound-callback-message.ts b/models/inbound-callback-message.ts index 28e609a..ab9eca2 100644 --- a/models/inbound-callback-message.ts +++ b/models/inbound-callback-message.ts @@ -38,6 +38,47 @@ import type { StatusCallbackMessage } from './status-callback-message'; /** * @type InboundCallbackMessage */ -export type InboundCallbackMessage = StatusCallbackMessage; +export type InboundCallbackMessage = { + /** + * A unique identifier of the message. + */ + 'id': string; + /** + * The Bandwidth phone number or alphanumeric identifier associated with the message. + */ + 'owner': string; + /** + * The ID of the Application your from number or senderId is associated with in the Bandwidth App. + */ + 'applicationId': string; + 'time': string; + /** + * The number of segments the user\'s message is broken into before sending over carrier networks. + */ + 'segmentCount': number; + 'direction': MessageDirectionEnum; + /** + * The phone number recipients of the message. + */ + 'to': Set; + /** + * The Bandwidth phone number or alphanumeric identifier the message was sent from. + */ + 'from': string; + 'text'?: string; + /** + * A custom string that will be included in callback events of the message. Max 1024 characters. + */ + 'tag'?: string; + /** + * Optional media, not applicable for sms + */ + 'media'?: Array; + 'priority'?: PriorityEnum; + 'channel'?: MultiChannelMessageChannelEnum; + 'content'?: MultiChannelMessageContent; + 'suggestionResponse'?: RbmSuggestionResponse; + 'locationResponse'?: RbmLocationResponse; +}; diff --git a/models/multi-channel-action-calendar-event.ts b/models/multi-channel-action-calendar-event.ts index 7fc8036..8b13b8a 100644 --- a/models/multi-channel-action-calendar-event.ts +++ b/models/multi-channel-action-calendar-event.ts @@ -23,6 +23,32 @@ import type { RbmActionTypeEnum } from './rbm-action-type-enum'; /** * @type MultiChannelActionCalendarEvent */ -export type MultiChannelActionCalendarEvent = RbmActionBase; +export type MultiChannelActionCalendarEvent = { + 'type': RbmActionTypeEnum; + /** + * Displayed text for user to click + */ + 'text': string; + /** + * Base64 payload the customer receives when the reply is clicked. + */ + 'postbackData': string; + /** + * The title of the event. + */ + 'title': string; + /** + * The start time of the event. + */ + 'startTime': string; + /** + * The end time of the event. + */ + 'endTime': string; + /** + * The description of the event. + */ + 'description'?: string; +}; diff --git a/models/multi-channel-channel-list-mmsobject.ts b/models/multi-channel-channel-list-mmsobject.ts index 3b0ffeb..62bd28d 100644 --- a/models/multi-channel-channel-list-mmsobject.ts +++ b/models/multi-channel-channel-list-mmsobject.ts @@ -26,6 +26,17 @@ import type { MultiChannelMessageChannelEnum } from './multi-channel-message-cha /** * @type MultiChannelChannelListMMSObject */ -export type MultiChannelChannelListMMSObject = MultiChannelChannelListObjectBase; +export type MultiChannelChannelListMMSObject = { + /** + * The sender ID of the message. This could be an alphanumeric sender ID. + */ + 'from': string; + /** + * The ID of the Application your from number or senderId is associated with in the Bandwidth App. + */ + 'applicationId': string; + 'channel': MultiChannelMessageChannelEnum; + 'content': MmsMessageContent; +}; diff --git a/models/multi-channel-channel-list-mmsresponse-object.ts b/models/multi-channel-channel-list-mmsresponse-object.ts index 95b451e..ca5bc24 100644 --- a/models/multi-channel-channel-list-mmsresponse-object.ts +++ b/models/multi-channel-channel-list-mmsresponse-object.ts @@ -29,6 +29,36 @@ import type { MultiChannelMessageChannelEnum } from './multi-channel-message-cha /** * @type MultiChannelChannelListMMSResponseObject */ -export type MultiChannelChannelListMMSResponseObject = MultiChannelChannelListMMSObject & MultiChannelChannelListOwnerObject; +export type MultiChannelChannelListMMSResponseObject = { + /** + * The sender ID of the message. This could be an alphanumeric sender ID. + */ + 'from': string; + /** + * The ID of the Application your from number or senderId is associated with in the Bandwidth App. + */ + 'applicationId': string; + 'channel': MultiChannelMessageChannelEnum; + 'content': MmsMessageContent; + /** + * The Bandwidth senderId associated with the message. Identical to \'from\'. + */ + 'owner': string; +} & { + /** + * The sender ID of the message. This could be an alphanumeric sender ID. + */ + 'from': string; + /** + * The ID of the Application your from number or senderId is associated with in the Bandwidth App. + */ + 'applicationId': string; + 'channel': MultiChannelMessageChannelEnum; + 'content': MmsMessageContent; + /** + * The Bandwidth senderId associated with the message. Identical to \'from\'. + */ + 'owner': string; +}; diff --git a/models/multi-channel-channel-list-rbmobject.ts b/models/multi-channel-channel-list-rbmobject.ts index fb00b51..d29cd1d 100644 --- a/models/multi-channel-channel-list-rbmobject.ts +++ b/models/multi-channel-channel-list-rbmobject.ts @@ -26,6 +26,17 @@ import type { MultiChannelMessageChannelEnum } from './multi-channel-message-cha /** * @type MultiChannelChannelListRBMObject */ -export type MultiChannelChannelListRBMObject = MultiChannelChannelListObjectBase; +export type MultiChannelChannelListRBMObject = { + /** + * The sender ID of the message. This could be an alphanumeric sender ID. + */ + 'from': string; + /** + * The ID of the Application your from number or senderId is associated with in the Bandwidth App. + */ + 'applicationId': string; + 'channel': MultiChannelMessageChannelEnum; + 'content': MultiChannelChannelListRBMObjectAllOfContent; +}; diff --git a/models/multi-channel-channel-list-rbmresponse-object.ts b/models/multi-channel-channel-list-rbmresponse-object.ts index f3c4e77..8124dc8 100644 --- a/models/multi-channel-channel-list-rbmresponse-object.ts +++ b/models/multi-channel-channel-list-rbmresponse-object.ts @@ -29,6 +29,36 @@ import type { MultiChannelMessageChannelEnum } from './multi-channel-message-cha /** * @type MultiChannelChannelListRBMResponseObject */ -export type MultiChannelChannelListRBMResponseObject = MultiChannelChannelListOwnerObject & MultiChannelChannelListRBMObject; +export type MultiChannelChannelListRBMResponseObject = { + /** + * The sender ID of the message. This could be an alphanumeric sender ID. + */ + 'from': string; + /** + * The ID of the Application your from number or senderId is associated with in the Bandwidth App. + */ + 'applicationId': string; + 'channel': MultiChannelMessageChannelEnum; + 'content': MultiChannelChannelListRBMObjectAllOfContent; + /** + * The Bandwidth senderId associated with the message. Identical to \'from\'. + */ + 'owner': string; +} & { + /** + * The sender ID of the message. This could be an alphanumeric sender ID. + */ + 'from': string; + /** + * The ID of the Application your from number or senderId is associated with in the Bandwidth App. + */ + 'applicationId': string; + 'channel': MultiChannelMessageChannelEnum; + 'content': MultiChannelChannelListRBMObjectAllOfContent; + /** + * The Bandwidth senderId associated with the message. Identical to \'from\'. + */ + 'owner': string; +}; diff --git a/models/multi-channel-channel-list-smsobject.ts b/models/multi-channel-channel-list-smsobject.ts index b85d6a0..446719a 100644 --- a/models/multi-channel-channel-list-smsobject.ts +++ b/models/multi-channel-channel-list-smsobject.ts @@ -26,6 +26,17 @@ import type { SmsMessageContent } from './sms-message-content'; /** * @type MultiChannelChannelListSMSObject */ -export type MultiChannelChannelListSMSObject = MultiChannelChannelListObjectBase; +export type MultiChannelChannelListSMSObject = { + /** + * The sender ID of the message. This could be an alphanumeric sender ID. + */ + 'from': string; + /** + * The ID of the Application your from number or senderId is associated with in the Bandwidth App. + */ + 'applicationId': string; + 'channel': MultiChannelMessageChannelEnum; + 'content': SmsMessageContent; +}; diff --git a/models/multi-channel-channel-list-smsresponse-object.ts b/models/multi-channel-channel-list-smsresponse-object.ts index 131d01b..e2f97dc 100644 --- a/models/multi-channel-channel-list-smsresponse-object.ts +++ b/models/multi-channel-channel-list-smsresponse-object.ts @@ -29,6 +29,36 @@ import type { SmsMessageContent } from './sms-message-content'; /** * @type MultiChannelChannelListSMSResponseObject */ -export type MultiChannelChannelListSMSResponseObject = MultiChannelChannelListOwnerObject & MultiChannelChannelListSMSObject; +export type MultiChannelChannelListSMSResponseObject = { + /** + * The sender ID of the message. This could be an alphanumeric sender ID. + */ + 'from': string; + /** + * The ID of the Application your from number or senderId is associated with in the Bandwidth App. + */ + 'applicationId': string; + 'channel': MultiChannelMessageChannelEnum; + 'content': SmsMessageContent; + /** + * The Bandwidth senderId associated with the message. Identical to \'from\'. + */ + 'owner': string; +} & { + /** + * The sender ID of the message. This could be an alphanumeric sender ID. + */ + 'from': string; + /** + * The ID of the Application your from number or senderId is associated with in the Bandwidth App. + */ + 'applicationId': string; + 'channel': MultiChannelMessageChannelEnum; + 'content': SmsMessageContent; + /** + * The Bandwidth senderId associated with the message. Identical to \'from\'. + */ + 'owner': string; +}; diff --git a/models/rbm-action-dial.ts b/models/rbm-action-dial.ts index 95df4d0..c98b240 100644 --- a/models/rbm-action-dial.ts +++ b/models/rbm-action-dial.ts @@ -23,6 +23,20 @@ import type { RbmActionTypeEnum } from './rbm-action-type-enum'; /** * @type RbmActionDial */ -export type RbmActionDial = RbmActionBase; +export type RbmActionDial = { + 'type': RbmActionTypeEnum; + /** + * Displayed text for user to click + */ + 'text': string; + /** + * Base64 payload the customer receives when the reply is clicked. + */ + 'postbackData': string; + /** + * The phone number to dial. Must be E164 format. + */ + 'phoneNumber': string; +}; diff --git a/models/rbm-action-open-url.ts b/models/rbm-action-open-url.ts index 26eb979..34373c0 100644 --- a/models/rbm-action-open-url.ts +++ b/models/rbm-action-open-url.ts @@ -29,6 +29,22 @@ import type { RbmWebViewEnum } from './rbm-web-view-enum'; /** * @type RbmActionOpenUrl */ -export type RbmActionOpenUrl = RbmActionBase; +export type RbmActionOpenUrl = { + 'type': RbmActionTypeEnum; + /** + * Displayed text for user to click + */ + 'text': string; + /** + * Base64 payload the customer receives when the reply is clicked. + */ + 'postbackData': string; + /** + * The URL to open in browser. + */ + 'url': string; + 'application'?: RbmOpenUrlEnum; + 'webviewViewMode'?: RbmWebViewEnum; +}; diff --git a/models/rbm-action-view-location.ts b/models/rbm-action-view-location.ts index d507e56..999e30b 100644 --- a/models/rbm-action-view-location.ts +++ b/models/rbm-action-view-location.ts @@ -23,6 +23,28 @@ import type { RbmActionTypeEnum } from './rbm-action-type-enum'; /** * @type RbmActionViewLocation */ -export type RbmActionViewLocation = RbmActionBase; +export type RbmActionViewLocation = { + 'type': RbmActionTypeEnum; + /** + * Displayed text for user to click + */ + 'text': string; + /** + * Base64 payload the customer receives when the reply is clicked. + */ + 'postbackData': string; + /** + * The latitude of the location. + */ + 'latitude': number; + /** + * The longitude of the location. + */ + 'longitude': number; + /** + * The label of the location. + */ + 'label'?: string; +}; diff --git a/models/rbm-card-content-media.ts b/models/rbm-card-content-media.ts index e8ea2cb..e2b3dec 100644 --- a/models/rbm-card-content-media.ts +++ b/models/rbm-card-content-media.ts @@ -23,6 +23,16 @@ import type { RbmMessageContentFile } from './rbm-message-content-file'; /** * @type RbmCardContentMedia */ -export type RbmCardContentMedia = RbmMessageContentFile; +export type RbmCardContentMedia = { + /** + * The URL of the media file. 100MB is the maximum file size. + */ + 'fileUrl': string; + /** + * The URL of the thumbnail image. Applies only to video file media. + */ + 'thumbnailUrl'?: string; + 'height': RbmMediaHeightEnum; +}; diff --git a/tests/unit/models/endpoint-event.test.ts b/tests/unit/models/endpoint-event.test.ts index 5eab3a6..220e25b 100644 --- a/tests/unit/models/endpoint-event.test.ts +++ b/tests/unit/models/endpoint-event.test.ts @@ -1,16 +1,29 @@ import { EndpointEvent } from '../../../models/endpoint-event'; +import { EndpointEventTypeEnum } from '../../../models/endpoint-event-type-enum'; import { EndpointStatusEnum } from '../../../models/endpoint-status-enum'; import { EndpointTypeEnum } from '../../../models/endpoint-type-enum'; +import { Device } from '../../../models/device'; +import { DeviceStatusEnum } from '../../../models/device-status-enum'; describe('EndpointEvent', () => { test('should create an endpoint event with all fields', () => { + const device: Device = { + deviceId: 'dev-1', + deviceName: 'Chrome Browser', + status: DeviceStatusEnum.Connected, + creationTimestamp: '2024-02-18T10:31:00Z' + }; + const event: EndpointEvent = { endpointId: 'ep-123456', type: EndpointTypeEnum.Webrtc, status: EndpointStatusEnum.Connected, creationTimestamp: '2024-02-18T10:30:00Z', expirationTimestamp: '2024-02-19T10:30:00Z', - tag: 'test-event' + tag: 'test-event', + eventTime: '2024-02-18T10:35:00Z', + eventType: EndpointEventTypeEnum.DeviceConnected, + device }; expect(event.endpointId).toBe('ep-123456'); @@ -21,5 +34,11 @@ describe('EndpointEvent', () => { expect(new Date(event.expirationTimestamp).getFullYear()).toBe(2024); expect(new Date(event.expirationTimestamp).toISOString()).toBe('2024-02-19T10:30:00.000Z'); expect(event.tag).toBe('test-event'); + expect(new Date(event.eventTime).toISOString()).toBe('2024-02-18T10:35:00.000Z'); + expect(event.eventType).toBe(EndpointEventTypeEnum.DeviceConnected); + expect(event.device?.deviceId).toBe('dev-1'); + expect(event.device?.deviceName).toBe('Chrome Browser'); + expect(event.device?.status).toBe(DeviceStatusEnum.Connected); + expect(event.device?.creationTimestamp).toBe('2024-02-18T10:31:00Z'); }); }); From 1f0b2abc9a7b1c1ae2d9f2385cb379ba7f13de74 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Wed, 22 Apr 2026 15:36:36 -0400 Subject: [PATCH 7/7] interfaces over types --- custom_templates/modelAllOf.mustache | 4 ++-- models/create-endpoint-response-data.ts | 4 ++-- models/create-web-rtc-connection-request.ts | 4 ++-- models/endpoint-event.ts | 4 ++-- models/endpoint.ts | 4 ++-- models/inbound-callback-message.ts | 4 ++-- models/multi-channel-action-calendar-event.ts | 4 ++-- .../multi-channel-channel-list-mmsobject.ts | 4 ++-- ...channel-channel-list-mmsresponse-object.ts | 19 ++----------------- .../multi-channel-channel-list-rbmobject.ts | 4 ++-- ...channel-channel-list-rbmresponse-object.ts | 19 ++----------------- .../multi-channel-channel-list-smsobject.ts | 4 ++-- ...channel-channel-list-smsresponse-object.ts | 19 ++----------------- models/rbm-action-dial.ts | 4 ++-- models/rbm-action-open-url.ts | 4 ++-- models/rbm-action-view-location.ts | 4 ++-- models/rbm-card-content-media.ts | 4 ++-- 17 files changed, 34 insertions(+), 79 deletions(-) diff --git a/custom_templates/modelAllOf.mustache b/custom_templates/modelAllOf.mustache index 5309235..76e4beb 100644 --- a/custom_templates/modelAllOf.mustache +++ b/custom_templates/modelAllOf.mustache @@ -2,7 +2,7 @@ * @type {{classname}}{{#description}} * {{{.}}}{{/description}} */ -export type {{classname}} = {{#allOf}}{{#isModel}}{{{dataType}}}{{/isModel}}{{^isModel}}{{#hasVars}}{ +export interface {{classname}} { {{#vars}} {{#description}} /** @@ -11,4 +11,4 @@ export type {{classname}} = {{#allOf}}{{#isModel}}{{{dataType}}}{{/isModel}}{{^i {{/description}} '{{name}}'{{^required}}?{{/required}}: {{{dataType}}}; {{/vars}} -}{{/hasVars}}{{/isModel}}{{^-last}} & {{/-last}}{{/allOf}}; +} diff --git a/models/create-endpoint-response-data.ts b/models/create-endpoint-response-data.ts index 7de21e6..835dd26 100644 --- a/models/create-endpoint-response-data.ts +++ b/models/create-endpoint-response-data.ts @@ -29,7 +29,7 @@ import type { EndpointTypeEnum } from './endpoint-type-enum'; /** * @type CreateEndpointResponseData */ -export type CreateEndpointResponseData = { +export interface CreateEndpointResponseData { /** * The unique ID of the endpoint. */ @@ -53,6 +53,6 @@ export type CreateEndpointResponseData = { * The json web token specific to the endpoint. Used to authenticate the client with the media gateway. */ 'token': string; -}; +} diff --git a/models/create-web-rtc-connection-request.ts b/models/create-web-rtc-connection-request.ts index f487f0a..9fcd57d 100644 --- a/models/create-web-rtc-connection-request.ts +++ b/models/create-web-rtc-connection-request.ts @@ -26,7 +26,7 @@ import type { EndpointTypeEnum } from './endpoint-type-enum'; /** * @type CreateWebRtcConnectionRequest */ -export type CreateWebRtcConnectionRequest = { +export interface CreateWebRtcConnectionRequest { 'type': EndpointTypeEnum; 'direction': EndpointDirectionEnum; /** @@ -42,6 +42,6 @@ export type CreateWebRtcConnectionRequest = { */ 'tag'?: string; 'connectionMetadata'?: object; -}; +} diff --git a/models/endpoint-event.ts b/models/endpoint-event.ts index fa0d34a..ce05cc6 100644 --- a/models/endpoint-event.ts +++ b/models/endpoint-event.ts @@ -33,7 +33,7 @@ import type { Endpoints } from './endpoints'; * @type EndpointEvent * An event that occurred on an endpoint. */ -export type EndpointEvent = { +export interface EndpointEvent { /** * The unique ID of the endpoint. */ @@ -58,6 +58,6 @@ export type EndpointEvent = { 'eventTime': string; 'eventType': EndpointEventTypeEnum; 'device'?: Device; -}; +} diff --git a/models/endpoint.ts b/models/endpoint.ts index 1a2860b..dd0ef90 100644 --- a/models/endpoint.ts +++ b/models/endpoint.ts @@ -29,7 +29,7 @@ import type { Endpoints } from './endpoints'; /** * @type Endpoint */ -export type Endpoint = { +export interface Endpoint { /** * The unique ID of the endpoint. */ @@ -49,6 +49,6 @@ export type Endpoint = { */ 'tag'?: string; 'devices'?: Array; -}; +} diff --git a/models/inbound-callback-message.ts b/models/inbound-callback-message.ts index ab9eca2..b56b57b 100644 --- a/models/inbound-callback-message.ts +++ b/models/inbound-callback-message.ts @@ -38,7 +38,7 @@ import type { StatusCallbackMessage } from './status-callback-message'; /** * @type InboundCallbackMessage */ -export type InboundCallbackMessage = { +export interface InboundCallbackMessage { /** * A unique identifier of the message. */ @@ -79,6 +79,6 @@ export type InboundCallbackMessage = { 'content'?: MultiChannelMessageContent; 'suggestionResponse'?: RbmSuggestionResponse; 'locationResponse'?: RbmLocationResponse; -}; +} diff --git a/models/multi-channel-action-calendar-event.ts b/models/multi-channel-action-calendar-event.ts index 8b13b8a..bd86f36 100644 --- a/models/multi-channel-action-calendar-event.ts +++ b/models/multi-channel-action-calendar-event.ts @@ -23,7 +23,7 @@ import type { RbmActionTypeEnum } from './rbm-action-type-enum'; /** * @type MultiChannelActionCalendarEvent */ -export type MultiChannelActionCalendarEvent = { +export interface MultiChannelActionCalendarEvent { 'type': RbmActionTypeEnum; /** * Displayed text for user to click @@ -49,6 +49,6 @@ export type MultiChannelActionCalendarEvent = { * The description of the event. */ 'description'?: string; -}; +} diff --git a/models/multi-channel-channel-list-mmsobject.ts b/models/multi-channel-channel-list-mmsobject.ts index 62bd28d..7703a6e 100644 --- a/models/multi-channel-channel-list-mmsobject.ts +++ b/models/multi-channel-channel-list-mmsobject.ts @@ -26,7 +26,7 @@ import type { MultiChannelMessageChannelEnum } from './multi-channel-message-cha /** * @type MultiChannelChannelListMMSObject */ -export type MultiChannelChannelListMMSObject = { +export interface MultiChannelChannelListMMSObject { /** * The sender ID of the message. This could be an alphanumeric sender ID. */ @@ -37,6 +37,6 @@ export type MultiChannelChannelListMMSObject = { 'applicationId': string; 'channel': MultiChannelMessageChannelEnum; 'content': MmsMessageContent; -}; +} diff --git a/models/multi-channel-channel-list-mmsresponse-object.ts b/models/multi-channel-channel-list-mmsresponse-object.ts index ca5bc24..e2d85b9 100644 --- a/models/multi-channel-channel-list-mmsresponse-object.ts +++ b/models/multi-channel-channel-list-mmsresponse-object.ts @@ -29,7 +29,7 @@ import type { MultiChannelMessageChannelEnum } from './multi-channel-message-cha /** * @type MultiChannelChannelListMMSResponseObject */ -export type MultiChannelChannelListMMSResponseObject = { +export interface MultiChannelChannelListMMSResponseObject { /** * The sender ID of the message. This could be an alphanumeric sender ID. */ @@ -44,21 +44,6 @@ export type MultiChannelChannelListMMSResponseObject = { * The Bandwidth senderId associated with the message. Identical to \'from\'. */ 'owner': string; -} & { - /** - * The sender ID of the message. This could be an alphanumeric sender ID. - */ - 'from': string; - /** - * The ID of the Application your from number or senderId is associated with in the Bandwidth App. - */ - 'applicationId': string; - 'channel': MultiChannelMessageChannelEnum; - 'content': MmsMessageContent; - /** - * The Bandwidth senderId associated with the message. Identical to \'from\'. - */ - 'owner': string; -}; +} diff --git a/models/multi-channel-channel-list-rbmobject.ts b/models/multi-channel-channel-list-rbmobject.ts index d29cd1d..8f121ec 100644 --- a/models/multi-channel-channel-list-rbmobject.ts +++ b/models/multi-channel-channel-list-rbmobject.ts @@ -26,7 +26,7 @@ import type { MultiChannelMessageChannelEnum } from './multi-channel-message-cha /** * @type MultiChannelChannelListRBMObject */ -export type MultiChannelChannelListRBMObject = { +export interface MultiChannelChannelListRBMObject { /** * The sender ID of the message. This could be an alphanumeric sender ID. */ @@ -37,6 +37,6 @@ export type MultiChannelChannelListRBMObject = { 'applicationId': string; 'channel': MultiChannelMessageChannelEnum; 'content': MultiChannelChannelListRBMObjectAllOfContent; -}; +} diff --git a/models/multi-channel-channel-list-rbmresponse-object.ts b/models/multi-channel-channel-list-rbmresponse-object.ts index 8124dc8..1147ca9 100644 --- a/models/multi-channel-channel-list-rbmresponse-object.ts +++ b/models/multi-channel-channel-list-rbmresponse-object.ts @@ -29,7 +29,7 @@ import type { MultiChannelMessageChannelEnum } from './multi-channel-message-cha /** * @type MultiChannelChannelListRBMResponseObject */ -export type MultiChannelChannelListRBMResponseObject = { +export interface MultiChannelChannelListRBMResponseObject { /** * The sender ID of the message. This could be an alphanumeric sender ID. */ @@ -44,21 +44,6 @@ export type MultiChannelChannelListRBMResponseObject = { * The Bandwidth senderId associated with the message. Identical to \'from\'. */ 'owner': string; -} & { - /** - * The sender ID of the message. This could be an alphanumeric sender ID. - */ - 'from': string; - /** - * The ID of the Application your from number or senderId is associated with in the Bandwidth App. - */ - 'applicationId': string; - 'channel': MultiChannelMessageChannelEnum; - 'content': MultiChannelChannelListRBMObjectAllOfContent; - /** - * The Bandwidth senderId associated with the message. Identical to \'from\'. - */ - 'owner': string; -}; +} diff --git a/models/multi-channel-channel-list-smsobject.ts b/models/multi-channel-channel-list-smsobject.ts index 446719a..ebad627 100644 --- a/models/multi-channel-channel-list-smsobject.ts +++ b/models/multi-channel-channel-list-smsobject.ts @@ -26,7 +26,7 @@ import type { SmsMessageContent } from './sms-message-content'; /** * @type MultiChannelChannelListSMSObject */ -export type MultiChannelChannelListSMSObject = { +export interface MultiChannelChannelListSMSObject { /** * The sender ID of the message. This could be an alphanumeric sender ID. */ @@ -37,6 +37,6 @@ export type MultiChannelChannelListSMSObject = { 'applicationId': string; 'channel': MultiChannelMessageChannelEnum; 'content': SmsMessageContent; -}; +} diff --git a/models/multi-channel-channel-list-smsresponse-object.ts b/models/multi-channel-channel-list-smsresponse-object.ts index e2f97dc..1cf47b3 100644 --- a/models/multi-channel-channel-list-smsresponse-object.ts +++ b/models/multi-channel-channel-list-smsresponse-object.ts @@ -29,7 +29,7 @@ import type { SmsMessageContent } from './sms-message-content'; /** * @type MultiChannelChannelListSMSResponseObject */ -export type MultiChannelChannelListSMSResponseObject = { +export interface MultiChannelChannelListSMSResponseObject { /** * The sender ID of the message. This could be an alphanumeric sender ID. */ @@ -44,21 +44,6 @@ export type MultiChannelChannelListSMSResponseObject = { * The Bandwidth senderId associated with the message. Identical to \'from\'. */ 'owner': string; -} & { - /** - * The sender ID of the message. This could be an alphanumeric sender ID. - */ - 'from': string; - /** - * The ID of the Application your from number or senderId is associated with in the Bandwidth App. - */ - 'applicationId': string; - 'channel': MultiChannelMessageChannelEnum; - 'content': SmsMessageContent; - /** - * The Bandwidth senderId associated with the message. Identical to \'from\'. - */ - 'owner': string; -}; +} diff --git a/models/rbm-action-dial.ts b/models/rbm-action-dial.ts index c98b240..d292a21 100644 --- a/models/rbm-action-dial.ts +++ b/models/rbm-action-dial.ts @@ -23,7 +23,7 @@ import type { RbmActionTypeEnum } from './rbm-action-type-enum'; /** * @type RbmActionDial */ -export type RbmActionDial = { +export interface RbmActionDial { 'type': RbmActionTypeEnum; /** * Displayed text for user to click @@ -37,6 +37,6 @@ export type RbmActionDial = { * The phone number to dial. Must be E164 format. */ 'phoneNumber': string; -}; +} diff --git a/models/rbm-action-open-url.ts b/models/rbm-action-open-url.ts index 34373c0..6fb3f3b 100644 --- a/models/rbm-action-open-url.ts +++ b/models/rbm-action-open-url.ts @@ -29,7 +29,7 @@ import type { RbmWebViewEnum } from './rbm-web-view-enum'; /** * @type RbmActionOpenUrl */ -export type RbmActionOpenUrl = { +export interface RbmActionOpenUrl { 'type': RbmActionTypeEnum; /** * Displayed text for user to click @@ -45,6 +45,6 @@ export type RbmActionOpenUrl = { 'url': string; 'application'?: RbmOpenUrlEnum; 'webviewViewMode'?: RbmWebViewEnum; -}; +} diff --git a/models/rbm-action-view-location.ts b/models/rbm-action-view-location.ts index 999e30b..9e0510e 100644 --- a/models/rbm-action-view-location.ts +++ b/models/rbm-action-view-location.ts @@ -23,7 +23,7 @@ import type { RbmActionTypeEnum } from './rbm-action-type-enum'; /** * @type RbmActionViewLocation */ -export type RbmActionViewLocation = { +export interface RbmActionViewLocation { 'type': RbmActionTypeEnum; /** * Displayed text for user to click @@ -45,6 +45,6 @@ export type RbmActionViewLocation = { * The label of the location. */ 'label'?: string; -}; +} diff --git a/models/rbm-card-content-media.ts b/models/rbm-card-content-media.ts index e2b3dec..c4a0b6d 100644 --- a/models/rbm-card-content-media.ts +++ b/models/rbm-card-content-media.ts @@ -23,7 +23,7 @@ import type { RbmMessageContentFile } from './rbm-message-content-file'; /** * @type RbmCardContentMedia */ -export type RbmCardContentMedia = { +export interface RbmCardContentMedia { /** * The URL of the media file. 100MB is the maximum file size. */ @@ -33,6 +33,6 @@ export type RbmCardContentMedia = { */ 'thumbnailUrl'?: string; 'height': RbmMediaHeightEnum; -}; +}