diff --git a/bandwidth.yml b/bandwidth.yml index 5e2bc9b..a380e26 100644 --- a/bandwidth.yml +++ b/bandwidth.yml @@ -2889,6 +2889,11 @@ components: example: Yes, I would like to proceed postbackData: $ref: '#/components/schemas/rbmActionPostbackData' + pairedMessageId: + type: string + nullable: true + description: Corresponding parent message ID (MT). + example: 1752697342534u24xerqdukke523x rbmLocationResponse: type: object properties: @@ -2925,7 +2930,7 @@ components: message-failed: '#/components/schemas/statusCallback' message-read: '#/components/schemas/statusCallback' message-received: '#/components/schemas/inboundCallback' - request-location-response: '#/components/schemas/inboundCallback' + requested-location-response: '#/components/schemas/inboundCallback' suggestion-response: '#/components/schemas/inboundCallback' statusCallback: type: object @@ -3035,14 +3040,15 @@ components: - `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. + - `requested-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: - message-received - - request-location-response + - requested-location-response - suggestion-response example: message-received statusCallbackMessage: @@ -9154,7 +9160,7 @@ components: tag: '{"myTag": "myTagValue"}' updateEndpointBxmlRequestExample: summary: Update Endpoint BXML Request Example - value: + value: endpointDisconnectedEventExample: summary: Endpoint Disconnected Event value: @@ -9678,10 +9684,10 @@ components:

The payload type will be one of message-received, suggestion-response, or - location-request-response. + requested-location-response.

Note that suggestion-response and - location-request-response callback types are + requested-location-response callback types are pertinent only for RBM messages sent from the /messages/multiChannel endpoint. diff --git a/docs/InboundCallbackTypeEnum.md b/docs/InboundCallbackTypeEnum.md index 714e436..31a6fe7 100644 --- a/docs/InboundCallbackTypeEnum.md +++ b/docs/InboundCallbackTypeEnum.md @@ -1,12 +1,12 @@ # 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. - `requested-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 * `MessageReceived` (value: `'message-received'`) -* `RequestLocationResponse` (value: `'request-location-response'`) +* `RequestedLocationResponse` (value: `'requested-location-response'`) * `SuggestionResponse` (value: `'suggestion-response'`) diff --git a/docs/RbmSuggestionResponse.md b/docs/RbmSuggestionResponse.md index 9902757..79d9ee8 100644 --- a/docs/RbmSuggestionResponse.md +++ b/docs/RbmSuggestionResponse.md @@ -7,6 +7,7 @@ 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] +**pairedMessageId** | **string** | Corresponding parent message ID (MT). | [optional] [default to undefined] ## Example @@ -16,6 +17,7 @@ import { RbmSuggestionResponse } from 'bandwidth-sdk'; const instance: RbmSuggestionResponse = { text, postbackData, + pairedMessageId, }; ``` diff --git a/models/callback.ts b/models/callback.ts index ddea47b..eda1a69 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: 'request-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: 'suggestion-response' } & InboundCallback; diff --git a/models/inbound-callback-type-enum.ts b/models/inbound-callback-type-enum.ts index 7c4a076..0a092c9 100644 --- a/models/inbound-callback-type-enum.ts +++ b/models/inbound-callback-type-enum.ts @@ -15,12 +15,12 @@ /** - * 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. - `requested-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 = { MessageReceived: 'message-received', - RequestLocationResponse: 'request-location-response', + RequestedLocationResponse: 'requested-location-response', SuggestionResponse: 'suggestion-response' } as const; diff --git a/models/rbm-suggestion-response.ts b/models/rbm-suggestion-response.ts index c346d37..d062db2 100644 --- a/models/rbm-suggestion-response.ts +++ b/models/rbm-suggestion-response.ts @@ -23,5 +23,9 @@ export interface RbmSuggestionResponse { * Base64 payload the customer receives when the reply is clicked. */ 'postbackData'?: string; + /** + * Corresponding parent message ID (MT). + */ + 'pairedMessageId'?: string | null; } diff --git a/tests/unit/models/inbound-callback-type-enum.test.ts b/tests/unit/models/inbound-callback-type-enum.test.ts index 5418bd8..c13da9c 100644 --- a/tests/unit/models/inbound-callback-type-enum.test.ts +++ b/tests/unit/models/inbound-callback-type-enum.test.ts @@ -3,11 +3,11 @@ import { InboundCallbackTypeEnum } from '../../../models/inbound-callback-type-e describe('InboundCallbackTypeEnum', () => { test('should define the expected values', () => { expect(InboundCallbackTypeEnum.MessageReceived).toBe('message-received'); - expect(InboundCallbackTypeEnum.RequestLocationResponse).toBe('request-location-response'); + expect(InboundCallbackTypeEnum.RequestedLocationResponse).toBe('requested-location-response'); expect(InboundCallbackTypeEnum.SuggestionResponse).toBe('suggestion-response'); expect(Object.values(InboundCallbackTypeEnum)).toEqual([ 'message-received', - 'request-location-response', + 'requested-location-response', 'suggestion-response' ]); }); diff --git a/tests/unit/models/rbm-suggestion-response.test.ts b/tests/unit/models/rbm-suggestion-response.test.ts index ff2ac5e..77ede01 100644 --- a/tests/unit/models/rbm-suggestion-response.test.ts +++ b/tests/unit/models/rbm-suggestion-response.test.ts @@ -5,9 +5,11 @@ describe('RbmSuggestionResponse', () => { const fixture: RbmSuggestionResponse = { text: 'test-text', postbackData: 'test-postbackData', + pairedMessageId: 'test-pairedMessageId' }; expect(fixture.text).toBe('test-text'); expect(fixture.postbackData).toBe('test-postbackData'); + expect(fixture.pairedMessageId).toBe('test-pairedMessageId'); }); }); diff --git a/tests/unit/models/rbm-veb-view-enum.test.ts b/tests/unit/models/rbm-web-view-enum.test.ts similarity index 100% rename from tests/unit/models/rbm-veb-view-enum.test.ts rename to tests/unit/models/rbm-web-view-enum.test.ts