Skip to content

Commit d8b927d

Browse files
band-swi-release-engineering[bot]DX-Bandwidthckoegel
authored
SWI-11477 Update SDK Based on Recent Spec Changes (#122)
* Generate SDK with OpenAPI Generator Version * unit tests --------- Co-authored-by: DX-Bandwidth <dx@bandwidth.com> Co-authored-by: ckoegel <ckoegel1006@gmail.com>
1 parent 2a0596f commit d8b927d

9 files changed

Lines changed: 28 additions & 14 deletions

bandwidth.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2889,6 +2889,11 @@ components:
28892889
example: Yes, I would like to proceed
28902890
postbackData:
28912891
$ref: '#/components/schemas/rbmActionPostbackData'
2892+
pairedMessageId:
2893+
type: string
2894+
nullable: true
2895+
description: Corresponding parent message ID (MT).
2896+
example: 1752697342534u24xerqdukke523x
28922897
rbmLocationResponse:
28932898
type: object
28942899
properties:
@@ -2925,7 +2930,7 @@ components:
29252930
message-failed: '#/components/schemas/statusCallback'
29262931
message-read: '#/components/schemas/statusCallback'
29272932
message-received: '#/components/schemas/inboundCallback'
2928-
request-location-response: '#/components/schemas/inboundCallback'
2933+
requested-location-response: '#/components/schemas/inboundCallback'
29292934
suggestion-response: '#/components/schemas/inboundCallback'
29302935
statusCallback:
29312936
type: object
@@ -3035,14 +3040,15 @@ components:
30353040
- `message-received` indicates an MO message from a Bandwidth user's
30363041
client to a Bandwidth number.
30373042
3038-
- `request-location-response` indicates a response to a location request
3039-
sent by the Bandwidth user's client after receiving an RBM message.
3043+
- `requested-location-response` indicates a response to a location
3044+
request sent by the Bandwidth user's client after receiving an RBM
3045+
message.
30403046
30413047
- `suggestion-response` indicates a response to a suggestion sent by the
30423048
Bandwidth user's client after receiving an RBM message.
30433049
enum:
30443050
- message-received
3045-
- request-location-response
3051+
- requested-location-response
30463052
- suggestion-response
30473053
example: message-received
30483054
statusCallbackMessage:
@@ -9154,7 +9160,7 @@ components:
91549160
tag: '{"myTag": "myTagValue"}'
91559161
updateEndpointBxmlRequestExample:
91569162
summary: Update Endpoint BXML Request Example
9157-
value: <Bxml><StartRecording /></Bxml>
9163+
value: <Response><StartRecording /></Response>
91589164
endpointDisconnectedEventExample:
91599165
summary: Endpoint Disconnected Event
91609166
value:
@@ -9678,10 +9684,10 @@ components:
96789684
96799685
<p>The payload type will be one of <code>message-received</code>,
96809686
<code>suggestion-response</code>, or
9681-
<code>location-request-response</code>.
9687+
<code>requested-location-response</code>.
96829688
96839689
<p>Note that <code>suggestion-response</code> and
9684-
<code>location-request-response</code> callback types are
9690+
<code>requested-location-response</code> callback types are
96859691
pertinent only for RBM messages sent from the
96869692
<code>/messages/multiChannel</code> endpoint.
96879693

docs/InboundCallbackTypeEnum.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# InboundCallbackTypeEnum
22

3-
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.
3+
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.
44

55
## Enum
66

77
* `MessageReceived` (value: `'message-received'`)
88

9-
* `RequestLocationResponse` (value: `'request-location-response'`)
9+
* `RequestedLocationResponse` (value: `'requested-location-response'`)
1010

1111
* `SuggestionResponse` (value: `'suggestion-response'`)
1212

docs/RbmSuggestionResponse.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
88
**text** | **string** | The text associated with the suggestion response. | [optional] [default to undefined]
99
**postbackData** | **string** | Base64 payload the customer receives when the reply is clicked. | [optional] [default to undefined]
10+
**pairedMessageId** | **string** | Corresponding parent message ID (MT). | [optional] [default to undefined]
1011

1112
## Example
1213

@@ -16,6 +17,7 @@ import { RbmSuggestionResponse } from 'bandwidth-sdk';
1617
const instance: RbmSuggestionResponse = {
1718
text,
1819
postbackData,
20+
pairedMessageId,
1921
};
2022
```
2123

models/callback.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ import type { StatusCallback } from './status-callback';
3030
* @type Callback
3131
* 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.
3232
*/
33-
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;
33+
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;
3434

3535

models/inbound-callback-type-enum.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515

1616

1717
/**
18-
* 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.
18+
* 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.
1919
*/
2020

2121
export const InboundCallbackTypeEnum = {
2222
MessageReceived: 'message-received',
23-
RequestLocationResponse: 'request-location-response',
23+
RequestedLocationResponse: 'requested-location-response',
2424
SuggestionResponse: 'suggestion-response'
2525
} as const;
2626

models/rbm-suggestion-response.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,9 @@ export interface RbmSuggestionResponse {
2323
* Base64 payload the customer receives when the reply is clicked.
2424
*/
2525
'postbackData'?: string;
26+
/**
27+
* Corresponding parent message ID (MT).
28+
*/
29+
'pairedMessageId'?: string | null;
2630
}
2731

tests/unit/models/inbound-callback-type-enum.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import { InboundCallbackTypeEnum } from '../../../models/inbound-callback-type-e
33
describe('InboundCallbackTypeEnum', () => {
44
test('should define the expected values', () => {
55
expect(InboundCallbackTypeEnum.MessageReceived).toBe('message-received');
6-
expect(InboundCallbackTypeEnum.RequestLocationResponse).toBe('request-location-response');
6+
expect(InboundCallbackTypeEnum.RequestedLocationResponse).toBe('requested-location-response');
77
expect(InboundCallbackTypeEnum.SuggestionResponse).toBe('suggestion-response');
88
expect(Object.values(InboundCallbackTypeEnum)).toEqual([
99
'message-received',
10-
'request-location-response',
10+
'requested-location-response',
1111
'suggestion-response'
1212
]);
1313
});

tests/unit/models/rbm-suggestion-response.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ describe('RbmSuggestionResponse', () => {
55
const fixture: RbmSuggestionResponse = {
66
text: 'test-text',
77
postbackData: 'test-postbackData',
8+
pairedMessageId: 'test-pairedMessageId'
89
};
910

1011
expect(fixture.text).toBe('test-text');
1112
expect(fixture.postbackData).toBe('test-postbackData');
13+
expect(fixture.pairedMessageId).toBe('test-pairedMessageId');
1214
});
1315
});
File renamed without changes.

0 commit comments

Comments
 (0)