Skip to content

Commit ceabe08

Browse files
band-swi-release-engineering[bot]DX-Bandwidthckoegel
authored
SWI-9388 Update SDK Based on Recent Spec Changes (#94)
* Generate SDK with OpenAPI Generator Version * remove custom http error * update rbm smoke tests * update rbm test --------- Co-authored-by: DX-Bandwidth <dx@bandwidth.com> Co-authored-by: ckoegel <ckoegel1006@gmail.com>
1 parent 10b768b commit ceabe08

7 files changed

Lines changed: 278 additions & 18 deletions

File tree

api/messages-api.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export const MessagesApiAxiosParamCreator = function (configuration?: Configurat
9393
};
9494
},
9595
/**
96-
* Returns a list of messages based on query parameters.
96+
* Returns a list of messages based on query parameters. **Rate Limit:** This endpoint is rate limited to 3500 requests per 5 minutes per Source IP address. Exceeding the limit returns HTTP 429 with a `Retry-After` header.
9797
* @summary List Messages
9898
* @param {string} accountId Your Bandwidth Account ID.
9999
* @param {string} [messageId] The ID of the message to search for. Special characters need to be encoded using URL encoding. Message IDs could come in different formats, e.g., 9e0df4ca-b18d-40d7-a59f-82fcdf5ae8e6 and 1589228074636lm4k2je7j7jklbn2 are valid message ID formats. Note that you must include at least one query parameter.
@@ -293,7 +293,7 @@ export const MessagesApiFp = function(configuration?: Configuration) {
293293
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
294294
},
295295
/**
296-
* Returns a list of messages based on query parameters.
296+
* Returns a list of messages based on query parameters. **Rate Limit:** This endpoint is rate limited to 3500 requests per 5 minutes per Source IP address. Exceeding the limit returns HTTP 429 with a `Retry-After` header.
297297
* @summary List Messages
298298
* @param {string} accountId Your Bandwidth Account ID.
299299
* @param {string} [messageId] The ID of the message to search for. Special characters need to be encoded using URL encoding. Message IDs could come in different formats, e.g., 9e0df4ca-b18d-40d7-a59f-82fcdf5ae8e6 and 1589228074636lm4k2je7j7jklbn2 are valid message ID formats. Note that you must include at least one query parameter.
@@ -353,7 +353,7 @@ export const MessagesApiFactory = function (configuration?: Configuration, baseP
353353
return localVarFp.createMessage(accountId, messageRequest, options).then((request) => request(axios, basePath));
354354
},
355355
/**
356-
* Returns a list of messages based on query parameters.
356+
* Returns a list of messages based on query parameters. **Rate Limit:** This endpoint is rate limited to 3500 requests per 5 minutes per Source IP address. Exceeding the limit returns HTTP 429 with a `Retry-After` header.
357357
* @summary List Messages
358358
* @param {string} accountId Your Bandwidth Account ID.
359359
* @param {string} [messageId] The ID of the message to search for. Special characters need to be encoded using URL encoding. Message IDs could come in different formats, e.g., 9e0df4ca-b18d-40d7-a59f-82fcdf5ae8e6 and 1589228074636lm4k2je7j7jklbn2 are valid message ID formats. Note that you must include at least one query parameter.
@@ -409,7 +409,7 @@ export class MessagesApi extends BaseAPI {
409409
}
410410

411411
/**
412-
* Returns a list of messages based on query parameters.
412+
* Returns a list of messages based on query parameters. **Rate Limit:** This endpoint is rate limited to 3500 requests per 5 minutes per Source IP address. Exceeding the limit returns HTTP 429 with a `Retry-After` header.
413413
* @summary List Messages
414414
* @param {string} accountId Your Bandwidth Account ID.
415415
* @param {string} [messageId] The ID of the message to search for. Special characters need to be encoded using URL encoding. Message IDs could come in different formats, e.g., 9e0df4ca-b18d-40d7-a59f-82fcdf5ae8e6 and 1589228074636lm4k2je7j7jklbn2 are valid message ID formats. Note that you must include at least one query parameter.

bandwidth.yml

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,13 @@ paths:
163163
/users/{accountId}/messages:
164164
get:
165165
summary: List Messages
166-
description: Returns a list of messages based on query parameters.
166+
description: >
167+
Returns a list of messages based on query parameters.
168+
169+
170+
**Rate Limit:** This endpoint is rate limited to 3500 requests per 5
171+
minutes per Source IP address. Exceeding the limit returns HTTP 429 with
172+
a `Retry-After` header.
167173
operationId: listMessages
168174
tags:
169175
- Messages
@@ -207,10 +213,12 @@ paths:
207213
$ref: '#/components/responses/messagingForbiddenError'
208214
'404':
209215
$ref: '#/components/responses/messagingNotFoundError'
216+
'405':
217+
$ref: '#/components/responses/messagingMethodNotAllowedError'
210218
'415':
211219
$ref: '#/components/responses/messagingInvalidMediaTypeError'
212220
'429':
213-
$ref: '#/components/responses/messagingTooManyRequestsError'
221+
$ref: '#/components/responses/listMessagesTooManyRequestsError'
214222
'500':
215223
$ref: '#/components/responses/messagingInternalServerError'
216224
post:
@@ -2257,7 +2265,9 @@ components:
22572265
type: object
22582266
properties:
22592267
media:
2260-
$ref: '#/components/schemas/rbmMessageContentFile'
2268+
type: array
2269+
items:
2270+
$ref: '#/components/schemas/rbmMessageContentFile'
22612271
suggestions:
22622272
$ref: '#/components/schemas/multiChannelFullActions'
22632273
required:
@@ -5875,15 +5885,13 @@ components:
58755885
type: object
58765886
internalTicketNumber:
58775887
type: string
5878-
format: uuid
58795888
description: >-
58805889
Unique identifier (UUID) generated by Bandwidth to assist in tracking
58815890
the verification status of a toll-free number - included in all webhook
58825891
payloads.
58835892
example: acde070d-8c4c-4f0d-9d8a-162843c10333
58845893
internalTicketNumberForWebhook:
58855894
type: string
5886-
format: uuid
58875895
description: >-
58885896
Unique identifier (UUID) generated by Bandwidth to assist in tracking
58895897
the verification status of a toll-free number.
@@ -6752,6 +6760,21 @@ components:
67526760
- type: internal-server-error
67536761
description: Internal server error. No further information available
67546762
source: {}
6763+
listMessagesTooManyRequestsError:
6764+
description: Too Many Requests
6765+
headers:
6766+
Retry-After:
6767+
description: The number of seconds to wait before retrying the request.
6768+
schema:
6769+
type: integer
6770+
example: 300
6771+
content:
6772+
application/json:
6773+
schema:
6774+
$ref: "#/components/schemas/messagingRequestError"
6775+
example:
6776+
type: rate_limit_exceeded
6777+
description: Rate limit exceeded. Wait for Retry-After time before sending another request.
67556778
createCallResponse:
67566779
description: Created
67576780
headers:

docs/MessagesApi.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ const { status, data } = await apiInstance.createMessage(
7474
# **listMessages**
7575
> MessagesList listMessages()
7676
77-
Returns a list of messages based on query parameters.
77+
Returns a list of messages based on query parameters. **Rate Limit:** This endpoint is rate limited to 3500 requests per 5 minutes per Source IP address. Exceeding the limit returns HTTP 429 with a `Retry-After` header.
7878

7979
### Example
8080

@@ -204,8 +204,9 @@ const { status, data } = await apiInstance.listMessages(
204204
|**401** | Unauthorized | - |
205205
|**403** | Forbidden | - |
206206
|**404** | Not Found | - |
207+
|**405** | Method Not Allowed | - |
207208
|**415** | Unsupported Media Type | - |
208-
|**429** | Too Many Requests | - |
209+
|**429** | Too Many Requests | * Retry-After - The number of seconds to wait before retrying the request. <br> |
209210
|**500** | Internal Server Error | - |
210211

211212
[[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)

docs/MultiChannelChannelListRBMObjectAllOfContent.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
88
------------ | ------------- | ------------- | -------------
99
**text** | **string** | The text associated with the message. Must be 3270 characters or less | [default to undefined]
1010
**suggestions** | [**Array&lt;MultiChannelAction&gt;**](MultiChannelAction.md) | An array of suggested actions for the recipient. | [optional] [default to undefined]
11-
**media** | [**RbmMessageContentFile**](RbmMessageContentFile.md) | | [default to undefined]
11+
**media** | [**Array&lt;RbmMessageContentFile&gt;**](RbmMessageContentFile.md) | | [default to undefined]
1212
**orientation** | [**StandaloneCardOrientationEnum**](StandaloneCardOrientationEnum.md) | | [default to undefined]
1313
**thumbnailImageAlignment** | [**ThumbnailAlignmentEnum**](ThumbnailAlignmentEnum.md) | | [default to undefined]
1414
**cardContent** | [**RbmCardContent**](RbmCardContent.md) | | [default to undefined]

docs/RbmMessageMedia.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
8-
**media** | [**RbmMessageContentFile**](RbmMessageContentFile.md) | | [default to undefined]
8+
**media** | [**Array&lt;RbmMessageContentFile&gt;**](RbmMessageContentFile.md) | | [default to undefined]
99
**suggestions** | [**Array&lt;MultiChannelAction&gt;**](MultiChannelAction.md) | An array of suggested actions for the recipient. | [optional] [default to undefined]
1010

1111
## Example

models/rbm-message-media.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import type { MultiChannelAction } from './multi-channel-action';
2121
import type { RbmMessageContentFile } from './rbm-message-content-file';
2222

2323
export interface RbmMessageMedia {
24-
'media': RbmMessageContentFile;
24+
'media': Array<RbmMessageContentFile>;
2525
/**
2626
* An array of suggested actions for the recipient.
2727
*/

0 commit comments

Comments
 (0)