From b79af9ed5c77945739a8f6af0dc554aa556f120f Mon Sep 17 00:00:00 2001 From: DX-Bandwidth Date: Tue, 20 Oct 2026 14:10:48 +0000 Subject: [PATCH] Generate SDK with OpenAPI Generator Version 7.24.0 --- .openapi-generator/FILES | 2 + README.md | 1 + bandwidth.yml | 197 +++++++++++++++++- docs/InboundCallbackMessage.md | 2 + docs/MultiChannelAction.md | 2 +- docs/MultiChannelActionCalendarEvent.md | 2 +- docs/RbmActionBase.md | 2 +- docs/RbmActionDial.md | 2 +- docs/RbmActionOpenUrl.md | 2 +- docs/RbmActionViewLocation.md | 2 +- docs/RbmSession.md | 29 +++ docs/RbmSuggestionResponse.md | 4 +- docs/StatusCallbackMessage.md | 2 + docs/StatusCallbackTypeEnum.md | 4 +- models/callback.ts | 2 +- models/inbound-callback-message.ts | 4 + models/index.ts | 1 + models/multi-channel-action-calendar-event.ts | 2 +- models/multi-channel-action.ts | 2 +- models/rbm-action-base.ts | 2 +- models/rbm-action-dial.ts | 2 +- models/rbm-action-open-url.ts | 2 +- models/rbm-action-view-location.ts | 2 +- models/rbm-session.ts | 42 ++++ models/rbm-suggestion-response.ts | 4 +- models/status-callback-message.ts | 4 + models/status-callback-type-enum.ts | 3 +- 27 files changed, 298 insertions(+), 27 deletions(-) create mode 100644 docs/RbmSession.md create mode 100644 models/rbm-session.ts diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 52c0736..30b0159 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -170,6 +170,7 @@ docs/RbmMessageContentRichCard.md docs/RbmMessageContentText.md docs/RbmMessageMedia.md docs/RbmOpenUrlEnum.md +docs/RbmSession.md docs/RbmStandaloneCard.md docs/RbmSuggestionResponse.md docs/RbmWebViewEnum.md @@ -378,6 +379,7 @@ models/rbm-message-content-rich-card.ts models/rbm-message-content-text.ts models/rbm-message-media.ts models/rbm-open-url-enum.ts +models/rbm-session.ts models/rbm-standalone-card.ts models/rbm-suggestion-response.ts models/rbm-web-view-enum.ts diff --git a/README.md b/README.md index 89740b4..29f67b9 100644 --- a/README.md +++ b/README.md @@ -311,6 +311,7 @@ Class | Method | HTTP request | Description - [RbmMessageContentText](docs/RbmMessageContentText.md) - [RbmMessageMedia](docs/RbmMessageMedia.md) - [RbmOpenUrlEnum](docs/RbmOpenUrlEnum.md) + - [RbmSession](docs/RbmSession.md) - [RbmStandaloneCard](docs/RbmStandaloneCard.md) - [RbmSuggestionResponse](docs/RbmSuggestionResponse.md) - [RbmWebViewEnum](docs/RbmWebViewEnum.md) diff --git a/bandwidth.yml b/bandwidth.yml index 350b621..a33be21 100644 --- a/bandwidth.yml +++ b/bandwidth.yml @@ -2620,14 +2620,13 @@ components: type: string description: Displayed text for user to click maxLength: 25 - example: Hello world + example: Track my order rbmActionPostbackData: title: Post Back Data type: string - format: byte - description: Base64 payload the customer receives when the reply is clicked. + description: Payload the customer receives when the reply is clicked. maxLength: 2048 - example: SGVsbG8gd29ybGQ= + example: track-order-43654 rbmActionBase: type: object properties: @@ -2916,8 +2915,8 @@ components: properties: text: type: string - description: The text associated with the suggestion response. - example: Yes, I would like to proceed + description: The text of the suggestion the user tapped. + example: Track my order postbackData: $ref: '#/components/schemas/rbmActionPostbackData' pairedMessageId: @@ -2938,6 +2937,70 @@ components: format: double description: The longitude of the client's location. example: '-122.4194' + rbmSession: + type: object + description: >- + RCS interactive session information for the message. + + An interactive session is a 24-hour window covering all Rich and Rich + Media messages exchanged between an + + RCS agent and a specific end user mobile number. It is triggered when at + least 4 messages are exchanged within + + 24 hours, at least 2 of them mobile-originated and at least 1 + mobile-terminated. + + Only present on `message-delivered`, `message-received` and + `session-started` callbacks for RBM messages of + + US agents with the Conversational billing category. Omitted for all + other messages. + properties: + canInitiate: + type: boolean + description: >- + Whether the message can start an interactive session. + + `false` if the message is already part of an active session, or if + the agent is not eligible for + + interactive session billing. + example: false + id: + type: string + nullable: true + description: >- + The unique identifier of the interactive session the message is part + of. This is not a message ID. + + Omitted if the message is not part of a session. + example: 0f5a3b9c-2d4e-4f6a-8b1c-7e9d0a2b3c4d + type: + type: string + nullable: true + description: |- + The type of the interactive session. + Only present on `session-started` callbacks. + example: INTERACTIVE_SESSION + startTime: + type: string + nullable: true + format: date-time + description: >- + The time the 24-hour session window opened. Only present on + `session-started` callbacks. + example: '2026-08-06T09:59:55Z' + endTime: + type: string + nullable: true + format: date-time + description: >- + The time the 24-hour session window closes. Only present on + `session-started` callbacks. + example: '2026-08-07T09:59:55Z' + required: + - canInitiate callback: description: >- Callbacks are divided into two types based on direction of the related @@ -2960,6 +3023,7 @@ components: message-delivered: '#/components/schemas/statusCallback' message-failed: '#/components/schemas/statusCallback' message-read: '#/components/schemas/statusCallback' + session-started: '#/components/schemas/statusCallback' message-received: '#/components/schemas/inboundCallback' requested-location-response: '#/components/schemas/inboundCallback' suggestion-response: '#/components/schemas/inboundCallback' @@ -3060,12 +3124,17 @@ components: - `message-read` indicates that the RBM message was read by the recipient. + + - `session-started` indicates that a previously exchanged RBM message is + now part of an RCS interactive session and is no longer billed + individually. enum: - message-sending - message-sent - message-delivered - message-failed - message-read + - session-started example: message-delivered inboundCallbackTypeEnum: type: string @@ -3143,6 +3212,8 @@ components: $ref: '#/components/schemas/priorityEnum' channel: $ref: '#/components/schemas/multiChannelMessageChannelEnum' + session: + $ref: '#/components/schemas/rbmSession' required: - id - owner @@ -8878,6 +8949,31 @@ components: media: - >- https://messaging.bandwidth.com/api/v2/users/9900902/media/14762070468292kw2fuqty55yp2b2/0/bw.png + rbmMessageReceivedSessionCallbackExample: + summary: >- + An example of a rbm message-received callback body for a message that is + part of an RCS interactive session. + value: + time: '2026-08-06T10:00:05.502180Z' + type: message-received + to: BandwidthRBM + description: Incoming message received + message: + id: 1786010405502l2ntaoajuqjhqnxu + owner: BandwidthRBM + applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 + time: '2026-08-06T10:00:05.302180Z' + segmentCount: 1 + direction: in + to: + - BandwidthRBM + from: '+12345678902' + channel: RBM + content: + text: Yes, please book it for tomorrow. + session: + canInitiate: false + id: 0f5a3b9c-2d4e-4f6a-8b1c-7e9d0a2b3c4d messageSendingCallbackExample: summary: An example of a message-sending callback body. value: @@ -8977,6 +9073,79 @@ components: owner: '+12345678902' direction: out segmentCount: 1 + rbmMessageDeliveredSessionCallbackExample: + summary: >- + An example of a rbm message-delivered callback body for a message that + is part of an RCS interactive session. + value: + type: message-delivered + time: '2026-08-06T10:01:11.160744Z' + description: Message delivered to handset. + to: '+12345678902' + message: + id: 1786010470868ty55yp2b2kw2fuq + time: '2026-08-06T10:01:10.868292Z' + to: + - '+12345678902' + from: BandwidthRBM + text: '' + applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 + owner: BandwidthRBM + direction: out + segmentCount: 1 + channel: RBM + session: + canInitiate: false + id: 0f5a3b9c-2d4e-4f6a-8b1c-7e9d0a2b3c4d + rbmMessageDeliveredCanInitiateSessionCallbackExample: + summary: >- + An example of a rbm message-delivered callback body for a message that + is not yet part of an RCS interactive session. + value: + type: message-delivered + time: '2026-08-06T09:59:56.160744Z' + description: Message delivered to handset. + to: '+12345678902' + message: + id: 1786010395000kw2fuqty55yp2b2 + time: '2026-08-06T09:59:55.000000Z' + to: + - '+12345678902' + from: BandwidthRBM + text: '' + applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 + owner: BandwidthRBM + direction: out + segmentCount: 1 + channel: RBM + session: + canInitiate: true + sessionStartedCallbackExample: + summary: An example of a session-started callback body. + value: + type: session-started + time: '2026-08-06T10:00:00.123000Z' + description: Message is now part of an RCS interactive session. + to: '+12345678902' + message: + id: 1786010395000kw2fuqty55yp2b2 + owner: BandwidthRBM + applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 + time: '2026-08-06T10:00:00.120000Z' + segmentCount: 1 + direction: out + to: + - '+12345678902' + from: BandwidthRBM + text: '' + tag: '' + channel: RBM + session: + canInitiate: false + id: 0f5a3b9c-2d4e-4f6a-8b1c-7e9d0a2b3c4d + type: INTERACTIVE_SESSION + startTime: '2026-08-06T09:59:55Z' + endTime: '2026-08-07T09:59:55Z' messageFailedCallbackExample: summary: An example of a message-failed callback body. value: @@ -9980,6 +10149,9 @@ components: $ref: '#/components/examples/smsMessageReceivedCallbackExample' mmsMessageReceivedCallback: $ref: '#/components/examples/mmsMessageReceivedCallbackExample' + rbmMessageReceivedSessionCallback: + $ref: >- + #/components/examples/rbmMessageReceivedSessionCallbackExample responses: '200': description: OK @@ -9995,8 +10167,9 @@ components: information regarding a message sent (MT) from your message-enabled Bandwidth telephone number. -

The payload type will be one of message-sending, message-sent, message-delivered, message-failed or message-read. -

Note that message-read callbacks are pertinent only for RBM messages sent from the /messages/multiChannel endpoint. +

The payload type will be one of message-sending, message-sent, message-delivered, message-failed, message-read or session-started. +

Note that message-read and session-started callbacks are pertinent only for RBM messages sent from the /messages/multiChannel endpoint. +

Note that session-started callbacks are pertinent only for RBM messages of agents with the Conversational billing category.

Please visit Webhooks

content: @@ -10015,8 +10188,16 @@ components: groupMmsMessageDeliveredCallback: $ref: >- #/components/examples/groupMmsMessageDeliveredCallbackExample + rbmMessageDeliveredSessionCallback: + $ref: >- + #/components/examples/rbmMessageDeliveredSessionCallbackExample + rbmMessageDeliveredCanInitiateSessionCallback: + $ref: >- + #/components/examples/rbmMessageDeliveredCanInitiateSessionCallbackExample messageFailedCallback: $ref: '#/components/examples/messageFailedCallbackExample' + sessionStartedCallback: + $ref: '#/components/examples/sessionStartedCallbackExample' responses: '200': description: OK diff --git a/docs/InboundCallbackMessage.md b/docs/InboundCallbackMessage.md index 8f4c90f..090f10c 100644 --- a/docs/InboundCallbackMessage.md +++ b/docs/InboundCallbackMessage.md @@ -18,6 +18,7 @@ Name | Type | Description | Notes **media** | **Array<string>** | Optional media, not applicable for sms | [optional] [default to undefined] **priority** | [**PriorityEnum**](PriorityEnum.md) | | [optional] [default to undefined] **channel** | [**MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | [optional] [default to undefined] +**session** | [**RbmSession**](RbmSession.md) | | [optional] [default to undefined] **content** | [**MultiChannelMessageContent**](MultiChannelMessageContent.md) | | [optional] [default to undefined] **suggestionResponse** | [**RbmSuggestionResponse**](RbmSuggestionResponse.md) | | [optional] [default to undefined] **locationResponse** | [**RbmLocationResponse**](RbmLocationResponse.md) | | [optional] [default to undefined] @@ -41,6 +42,7 @@ const instance: InboundCallbackMessage = { media, priority, channel, + session, content, suggestionResponse, locationResponse, diff --git a/docs/MultiChannelAction.md b/docs/MultiChannelAction.md index 5d9e4b1..ab86686 100644 --- a/docs/MultiChannelAction.md +++ b/docs/MultiChannelAction.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | [**RbmActionTypeEnum**](RbmActionTypeEnum.md) | | [default to undefined] **text** | **string** | Displayed text for user to click | [default to undefined] -**postbackData** | **string** | Base64 payload the customer receives when the reply is clicked. | [default to undefined] +**postbackData** | **string** | Payload the customer receives when the reply is clicked. | [default to undefined] **phoneNumber** | **string** | The phone number to dial. Must be E164 format. | [default to undefined] **latitude** | **number** | The latitude of the location. Must be in range [-90.000000, 90.000000]. | [default to undefined] **longitude** | **number** | The longitude of the location. Must be in range [-180.000000, 180.000000]. | [default to undefined] diff --git a/docs/MultiChannelActionCalendarEvent.md b/docs/MultiChannelActionCalendarEvent.md index 372c968..3b268d8 100644 --- a/docs/MultiChannelActionCalendarEvent.md +++ b/docs/MultiChannelActionCalendarEvent.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | [**RbmActionTypeEnum**](RbmActionTypeEnum.md) | | [default to undefined] **text** | **string** | Displayed text for user to click | [default to undefined] -**postbackData** | **string** | Base64 payload the customer receives when the reply is clicked. | [default to undefined] +**postbackData** | **string** | Payload the customer receives when the reply is clicked. | [default to undefined] **title** | **string** | The title of the event. | [default to undefined] **startTime** | **string** | The start time of the event. Must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. | [default to undefined] **endTime** | **string** | The end time of the event. Must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. | [default to undefined] diff --git a/docs/RbmActionBase.md b/docs/RbmActionBase.md index 7a5d8f8..2b603b2 100644 --- a/docs/RbmActionBase.md +++ b/docs/RbmActionBase.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | [**RbmActionTypeEnum**](RbmActionTypeEnum.md) | | [default to undefined] **text** | **string** | Displayed text for user to click | [default to undefined] -**postbackData** | **string** | Base64 payload the customer receives when the reply is clicked. | [default to undefined] +**postbackData** | **string** | Payload the customer receives when the reply is clicked. | [default to undefined] ## Example diff --git a/docs/RbmActionDial.md b/docs/RbmActionDial.md index 334cbc7..1d5ea17 100644 --- a/docs/RbmActionDial.md +++ b/docs/RbmActionDial.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | [**RbmActionTypeEnum**](RbmActionTypeEnum.md) | | [default to undefined] **text** | **string** | Displayed text for user to click | [default to undefined] -**postbackData** | **string** | Base64 payload the customer receives when the reply is clicked. | [default to undefined] +**postbackData** | **string** | Payload the customer receives when the reply is clicked. | [default to undefined] **phoneNumber** | **string** | The phone number to dial. Must be E164 format. | [default to undefined] ## Example diff --git a/docs/RbmActionOpenUrl.md b/docs/RbmActionOpenUrl.md index 112070a..a247ff5 100644 --- a/docs/RbmActionOpenUrl.md +++ b/docs/RbmActionOpenUrl.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | [**RbmActionTypeEnum**](RbmActionTypeEnum.md) | | [default to undefined] **text** | **string** | Displayed text for user to click | [default to undefined] -**postbackData** | **string** | Base64 payload the customer receives when the reply is clicked. | [default to undefined] +**postbackData** | **string** | Payload the customer receives when the reply is clicked. | [default to undefined] **url** | **string** | The URL to open in browser. Must use http:// or https:// scheme. | [default to undefined] **application** | [**RbmOpenUrlEnum**](RbmOpenUrlEnum.md) | | [optional] [default to undefined] **webviewViewMode** | [**RbmWebViewEnum**](RbmWebViewEnum.md) | | [optional] [default to undefined] diff --git a/docs/RbmActionViewLocation.md b/docs/RbmActionViewLocation.md index e88c044..28b1835 100644 --- a/docs/RbmActionViewLocation.md +++ b/docs/RbmActionViewLocation.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | [**RbmActionTypeEnum**](RbmActionTypeEnum.md) | | [default to undefined] **text** | **string** | Displayed text for user to click | [default to undefined] -**postbackData** | **string** | Base64 payload the customer receives when the reply is clicked. | [default to undefined] +**postbackData** | **string** | Payload the customer receives when the reply is clicked. | [default to undefined] **latitude** | **number** | The latitude of the location. Must be in range [-90.000000, 90.000000]. | [default to undefined] **longitude** | **number** | The longitude of the location. Must be in range [-180.000000, 180.000000]. | [default to undefined] **label** | **string** | The label of the location. | [optional] [default to undefined] diff --git a/docs/RbmSession.md b/docs/RbmSession.md new file mode 100644 index 0000000..87305bb --- /dev/null +++ b/docs/RbmSession.md @@ -0,0 +1,29 @@ +# RbmSession + +RCS interactive session information for the message. An interactive session is a 24-hour window covering all Rich and Rich Media messages exchanged between an RCS agent and a specific end user mobile number. It is triggered when at least 4 messages are exchanged within 24 hours, at least 2 of them mobile-originated and at least 1 mobile-terminated. Only present on `message-delivered`, `message-received` and `session-started` callbacks for RBM messages of US agents with the Conversational billing category. Omitted for all other messages. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**canInitiate** | **boolean** | Whether the message can start an interactive session. `false` if the message is already part of an active session, or if the agent is not eligible for interactive session billing. | [default to undefined] +**id** | **string** | The unique identifier of the interactive session the message is part of. This is not a message ID. Omitted if the message is not part of a session. | [optional] [default to undefined] +**type** | **string** | The type of the interactive session. Only present on `session-started` callbacks. | [optional] [default to undefined] +**startTime** | **string** | The time the 24-hour session window opened. Only present on `session-started` callbacks. | [optional] [default to undefined] +**endTime** | **string** | The time the 24-hour session window closes. Only present on `session-started` callbacks. | [optional] [default to undefined] + +## Example + +```typescript +import { RbmSession } from 'bandwidth-sdk'; + +const instance: RbmSession = { + canInitiate, + id, + type, + startTime, + endTime, +}; +``` + +[[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/RbmSuggestionResponse.md b/docs/RbmSuggestionResponse.md index 79d9ee8..a50cbbc 100644 --- a/docs/RbmSuggestionResponse.md +++ b/docs/RbmSuggestionResponse.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**text** | **string** | The text associated with the suggestion response. | [optional] [default to undefined] -**postbackData** | **string** | Base64 payload the customer receives when the reply is clicked. | [optional] [default to undefined] +**text** | **string** | The text of the suggestion the user tapped. | [optional] [default to undefined] +**postbackData** | **string** | Payload the customer receives when the reply is clicked. | [optional] [default to undefined] **pairedMessageId** | **string** | Corresponding parent message ID (MT). | [optional] [default to undefined] ## Example diff --git a/docs/StatusCallbackMessage.md b/docs/StatusCallbackMessage.md index d0b04c3..7a0bae6 100644 --- a/docs/StatusCallbackMessage.md +++ b/docs/StatusCallbackMessage.md @@ -19,6 +19,7 @@ Name | Type | Description | Notes **media** | **Array<string>** | Optional media, not applicable for sms | [optional] [default to undefined] **priority** | [**PriorityEnum**](PriorityEnum.md) | | [optional] [default to undefined] **channel** | [**MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | [optional] [default to undefined] +**session** | [**RbmSession**](RbmSession.md) | | [optional] [default to undefined] ## Example @@ -39,6 +40,7 @@ const instance: StatusCallbackMessage = { media, priority, channel, + session, }; ``` diff --git a/docs/StatusCallbackTypeEnum.md b/docs/StatusCallbackTypeEnum.md index e7ad89a..f41ee8c 100644 --- a/docs/StatusCallbackTypeEnum.md +++ b/docs/StatusCallbackTypeEnum.md @@ -1,6 +1,6 @@ # StatusCallbackTypeEnum -The possible status callbacks when sending an MT SMS or MMS or RBM message: - `message-sending` indicates that Bandwidth is sending the message to the upstream provider. - `message-sent` indicates that the message has left the Bandwidth network and is in transit to the provider. - `message-delivered` indicates that the message was successfully delivered to handset. - `message-failed` indicates that the message could not be sent to the intended recipient. - `message-read` indicates that the RBM message was read by the recipient. +The possible status callbacks when sending an MT SMS or MMS or RBM message: - `message-sending` indicates that Bandwidth is sending the message to the upstream provider. - `message-sent` indicates that the message has left the Bandwidth network and is in transit to the provider. - `message-delivered` indicates that the message was successfully delivered to handset. - `message-failed` indicates that the message could not be sent to the intended recipient. - `message-read` indicates that the RBM message was read by the recipient. - `session-started` indicates that a previously exchanged RBM message is now part of an RCS interactive session and is no longer billed individually. ## Enum @@ -14,4 +14,6 @@ The possible status callbacks when sending an MT SMS or MMS or RBM message: - `m * `MessageRead` (value: `'message-read'`) +* `SessionStarted` (value: `'session-started'`) + [[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/models/callback.ts b/models/callback.ts index eda1a69..bc193d2 100644 --- a/models/callback.ts +++ b/models/callback.ts @@ -30,6 +30,6 @@ import type { StatusCallback } from './status-callback'; * @type Callback * Callbacks are divided into two types based on direction of the related message: - `statusCallback` indicates status of an outbound MT SMS, MMS, or RBM message. - `inboundCallback` indicates an inbound MO message or a multichannel message client\'s response to a suggestion or location request. */ -export type Callback = { type: 'message-delivered' } & StatusCallback | { type: 'message-failed' } & StatusCallback | { type: 'message-read' } & StatusCallback | { type: 'message-received' } & InboundCallback | { type: 'message-sending' } & StatusCallback | { type: 'message-sent' } & StatusCallback | { type: 'requested-location-response' } & InboundCallback | { type: 'suggestion-response' } & InboundCallback; +export type Callback = { type: 'message-delivered' } & StatusCallback | { type: 'message-failed' } & StatusCallback | { type: 'message-read' } & StatusCallback | { type: 'message-received' } & InboundCallback | { type: 'message-sending' } & StatusCallback | { type: 'message-sent' } & StatusCallback | { type: 'requested-location-response' } & InboundCallback | { type: 'session-started' } & StatusCallback | { type: 'suggestion-response' } & InboundCallback; diff --git a/models/inbound-callback-message.ts b/models/inbound-callback-message.ts index b56b57b..15ea0f0 100644 --- a/models/inbound-callback-message.ts +++ b/models/inbound-callback-message.ts @@ -30,6 +30,9 @@ import type { PriorityEnum } from './priority-enum'; import type { RbmLocationResponse } from './rbm-location-response'; // May contain unused imports in some cases // @ts-ignore +import type { RbmSession } from './rbm-session'; +// May contain unused imports in some cases +// @ts-ignore import type { RbmSuggestionResponse } from './rbm-suggestion-response'; // May contain unused imports in some cases // @ts-ignore @@ -76,6 +79,7 @@ export interface InboundCallbackMessage { 'media'?: Array; 'priority'?: PriorityEnum; 'channel'?: MultiChannelMessageChannelEnum; + 'session'?: RbmSession; 'content'?: MultiChannelMessageContent; 'suggestionResponse'?: RbmSuggestionResponse; 'locationResponse'?: RbmLocationResponse; diff --git a/models/index.ts b/models/index.ts index 2a926de..5a68669 100644 --- a/models/index.ts +++ b/models/index.ts @@ -144,6 +144,7 @@ export * from './rbm-message-content-rich-card'; export * from './rbm-message-content-text'; export * from './rbm-message-media'; export * from './rbm-open-url-enum'; +export * from './rbm-session'; export * from './rbm-standalone-card'; export * from './rbm-suggestion-response'; export * from './rbm-web-view-enum'; diff --git a/models/multi-channel-action-calendar-event.ts b/models/multi-channel-action-calendar-event.ts index 1ca5e90..905465e 100644 --- a/models/multi-channel-action-calendar-event.ts +++ b/models/multi-channel-action-calendar-event.ts @@ -30,7 +30,7 @@ export interface MultiChannelActionCalendarEvent { */ 'text': string; /** - * Base64 payload the customer receives when the reply is clicked. + * Payload the customer receives when the reply is clicked. */ 'postbackData': string; /** diff --git a/models/multi-channel-action.ts b/models/multi-channel-action.ts index fe7b201..caf7af1 100644 --- a/models/multi-channel-action.ts +++ b/models/multi-channel-action.ts @@ -45,7 +45,7 @@ export interface MultiChannelAction { */ 'text': string; /** - * Base64 payload the customer receives when the reply is clicked. + * Payload the customer receives when the reply is clicked. */ 'postbackData': string; /** diff --git a/models/rbm-action-base.ts b/models/rbm-action-base.ts index 5819d0c..741d3bf 100644 --- a/models/rbm-action-base.ts +++ b/models/rbm-action-base.ts @@ -24,7 +24,7 @@ export interface RbmActionBase { */ 'text': string; /** - * Base64 payload the customer receives when the reply is clicked. + * Payload the customer receives when the reply is clicked. */ 'postbackData': string; } diff --git a/models/rbm-action-dial.ts b/models/rbm-action-dial.ts index d292a21..5f640a2 100644 --- a/models/rbm-action-dial.ts +++ b/models/rbm-action-dial.ts @@ -30,7 +30,7 @@ export interface RbmActionDial { */ 'text': string; /** - * Base64 payload the customer receives when the reply is clicked. + * Payload the customer receives when the reply is clicked. */ 'postbackData': string; /** diff --git a/models/rbm-action-open-url.ts b/models/rbm-action-open-url.ts index d28784b..b6d65da 100644 --- a/models/rbm-action-open-url.ts +++ b/models/rbm-action-open-url.ts @@ -36,7 +36,7 @@ export interface RbmActionOpenUrl { */ 'text': string; /** - * Base64 payload the customer receives when the reply is clicked. + * Payload the customer receives when the reply is clicked. */ 'postbackData': string; /** diff --git a/models/rbm-action-view-location.ts b/models/rbm-action-view-location.ts index 766b681..9df9d55 100644 --- a/models/rbm-action-view-location.ts +++ b/models/rbm-action-view-location.ts @@ -30,7 +30,7 @@ export interface RbmActionViewLocation { */ 'text': string; /** - * Base64 payload the customer receives when the reply is clicked. + * Payload the customer receives when the reply is clicked. */ 'postbackData': string; /** diff --git a/models/rbm-session.ts b/models/rbm-session.ts new file mode 100644 index 0000000..d9c6bce --- /dev/null +++ b/models/rbm-session.ts @@ -0,0 +1,42 @@ +/* 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. + */ + + + +/** + * RCS interactive session information for the message. An interactive session is a 24-hour window covering all Rich and Rich Media messages exchanged between an RCS agent and a specific end user mobile number. It is triggered when at least 4 messages are exchanged within 24 hours, at least 2 of them mobile-originated and at least 1 mobile-terminated. Only present on `message-delivered`, `message-received` and `session-started` callbacks for RBM messages of US agents with the Conversational billing category. Omitted for all other messages. + */ +export interface RbmSession { + /** + * Whether the message can start an interactive session. `false` if the message is already part of an active session, or if the agent is not eligible for interactive session billing. + */ + 'canInitiate': boolean; + /** + * The unique identifier of the interactive session the message is part of. This is not a message ID. Omitted if the message is not part of a session. + */ + 'id'?: string | null; + /** + * The type of the interactive session. Only present on `session-started` callbacks. + */ + 'type'?: string | null; + /** + * The time the 24-hour session window opened. Only present on `session-started` callbacks. + */ + 'startTime'?: string | null; + /** + * The time the 24-hour session window closes. Only present on `session-started` callbacks. + */ + 'endTime'?: string | null; +} + diff --git a/models/rbm-suggestion-response.ts b/models/rbm-suggestion-response.ts index d062db2..47a9e37 100644 --- a/models/rbm-suggestion-response.ts +++ b/models/rbm-suggestion-response.ts @@ -16,11 +16,11 @@ export interface RbmSuggestionResponse { /** - * The text associated with the suggestion response. + * The text of the suggestion the user tapped. */ 'text'?: string; /** - * Base64 payload the customer receives when the reply is clicked. + * Payload the customer receives when the reply is clicked. */ 'postbackData'?: string; /** diff --git a/models/status-callback-message.ts b/models/status-callback-message.ts index 21a2816..1a2a925 100644 --- a/models/status-callback-message.ts +++ b/models/status-callback-message.ts @@ -22,6 +22,9 @@ import type { MultiChannelMessageChannelEnum } from './multi-channel-message-cha // May contain unused imports in some cases // @ts-ignore import type { PriorityEnum } from './priority-enum'; +// May contain unused imports in some cases +// @ts-ignore +import type { RbmSession } from './rbm-session'; /** * Message payload schema within a callback @@ -64,6 +67,7 @@ export interface StatusCallbackMessage { 'media'?: Array; 'priority'?: PriorityEnum; 'channel'?: MultiChannelMessageChannelEnum; + 'session'?: RbmSession; } diff --git a/models/status-callback-type-enum.ts b/models/status-callback-type-enum.ts index c628fa5..1ae6121 100644 --- a/models/status-callback-type-enum.ts +++ b/models/status-callback-type-enum.ts @@ -15,7 +15,7 @@ /** - * The possible status callbacks when sending an MT SMS or MMS or RBM message: - `message-sending` indicates that Bandwidth is sending the message to the upstream provider. - `message-sent` indicates that the message has left the Bandwidth network and is in transit to the provider. - `message-delivered` indicates that the message was successfully delivered to handset. - `message-failed` indicates that the message could not be sent to the intended recipient. - `message-read` indicates that the RBM message was read by the recipient. + * The possible status callbacks when sending an MT SMS or MMS or RBM message: - `message-sending` indicates that Bandwidth is sending the message to the upstream provider. - `message-sent` indicates that the message has left the Bandwidth network and is in transit to the provider. - `message-delivered` indicates that the message was successfully delivered to handset. - `message-failed` indicates that the message could not be sent to the intended recipient. - `message-read` indicates that the RBM message was read by the recipient. - `session-started` indicates that a previously exchanged RBM message is now part of an RCS interactive session and is no longer billed individually. */ export const StatusCallbackTypeEnum = { @@ -24,6 +24,7 @@ export const StatusCallbackTypeEnum = { MessageDelivered: 'message-delivered', MessageFailed: 'message-failed', MessageRead: 'message-read', + SessionStarted: 'session-started', } as const; export type StatusCallbackTypeEnum = typeof StatusCallbackTypeEnum[keyof typeof StatusCallbackTypeEnum];