diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 3c2f0eb..ef5b34f 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -6,6 +6,7 @@ api/conferences-api.ts api/media-api.ts api/messages-api.ts api/mfaapi.ts +api/multi-channel-api.ts api/phone-number-lookup-api.ts api/recordings-api.ts api/statistics-api.ts @@ -33,6 +34,7 @@ models/call-transcription-track-enum.ts models/call-transcription.ts models/callback-method-enum.ts models/callback-type-enum.ts +models/card-width-enum.ts models/code-request.ts models/conference-completed-callback.ts models/conference-created-callback.ts @@ -49,16 +51,19 @@ models/create-call-response.ts models/create-call.ts models/create-lookup-response.ts models/create-message-request-error.ts +models/create-multi-channel-message-response.ts models/deferred-result.ts models/disconnect-callback.ts models/diversion.ts models/dtmf-callback.ts +models/error-object.ts models/failure-webhook.ts models/field-error.ts models/file-format-enum.ts models/gather-callback.ts models/index.ts models/initiate-callback.ts +models/link.ts models/links-object.ts models/list-message-direction-enum.ts models/list-message-item.ts @@ -84,10 +89,36 @@ models/messaging-request-error.ts models/mfa-forbidden-request-error.ts models/mfa-request-error.ts models/mfa-unauthorized-request-error.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-callback-data.ts +models/multi-channel-channel-list-object-content.ts +models/multi-channel-channel-list-object.ts +models/multi-channel-message-callback-data.ts +models/multi-channel-message-channel-enum.ts +models/multi-channel-message-data.ts +models/multi-channel-message-direction-enum.ts +models/multi-channel-message-request.ts +models/multi-channel-status-enum.ts models/opt-in-workflow.ts models/page-info.ts models/priority-enum.ts +models/rbm-action-base.ts +models/rbm-action-dial.ts +models/rbm-action-open-url.ts +models/rbm-action-type-enum.ts +models/rbm-action-view-location.ts +models/rbm-card-content-media.ts +models/rbm-card-content.ts +models/rbm-media-height-enum.ts +models/rbm-message-carousel-card.ts +models/rbm-message-content-file.ts +models/rbm-message-content-rich-card.ts +models/rbm-message-content-text.ts +models/rbm-message-media.ts +models/rbm-standalone-card.ts models/recording-available-callback.ts models/recording-complete-callback.ts models/recording-state-enum.ts @@ -95,8 +126,9 @@ models/recording-transcription-metadata.ts models/recording-transcriptions.ts models/redirect-callback.ts models/redirect-method-enum.ts +models/sms-message-content.ts +models/standalone-card-orientation-enum.ts models/stir-shaken.ts -models/tag.ts models/telephone-number.ts models/tfv-basic-authentication.ts models/tfv-callback-status-enum.ts @@ -105,6 +137,7 @@ models/tfv-status-enum.ts models/tfv-status.ts models/tfv-submission-info.ts models/tfv-submission-wrapper.ts +models/thumbnail-alignment-enum.ts models/tn-lookup-request-error.ts models/transcribe-recording.ts models/transcription-available-callback.ts diff --git a/api.ts b/api.ts index 3c42f05..9399a4f 100644 --- a/api.ts +++ b/api.ts @@ -19,6 +19,7 @@ export * from './api/conferences-api'; export * from './api/mfaapi'; export * from './api/media-api'; export * from './api/messages-api'; +export * from './api/multi-channel-api'; export * from './api/phone-number-lookup-api'; export * from './api/recordings-api'; export * from './api/statistics-api'; diff --git a/api/multi-channel-api.ts b/api/multi-channel-api.ts new file mode 100644 index 0000000..58da7bb --- /dev/null +++ b/api/multi-channel-api.ts @@ -0,0 +1,150 @@ +/* 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. + */ + + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; +// @ts-ignore +import type { CreateMessageRequestError } from '../models'; +// @ts-ignore +import type { CreateMultiChannelMessageResponse } from '../models'; +// @ts-ignore +import type { MessagingRequestError } from '../models'; +// @ts-ignore +import type { MultiChannelMessageRequest } from '../models'; +/** + * MultiChannelApi - axios parameter creator + * @export + */ +export const MultiChannelApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Endpoint for sending Multi-Channel messages. + * @summary Create Multi-Channel Message + * @param {string} accountId Your Bandwidth Account ID. + * @param {MultiChannelMessageRequest} multiChannelMessageRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createMultiChannelMessage: async (accountId: string, multiChannelMessageRequest: MultiChannelMessageRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'accountId' is not null or undefined + assertParamExists('createMultiChannelMessage', 'accountId', accountId) + // verify required parameter 'multiChannelMessageRequest' is not null or undefined + assertParamExists('createMultiChannelMessage', 'multiChannelMessageRequest', multiChannelMessageRequest) + const localVarPath = `/users/{accountId}/messages/multiChannel` + .replace(`{${"accountId"}}`, encodeURIComponent(String(accountId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Basic required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(multiChannelMessageRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * MultiChannelApi - functional programming interface + * @export + */ +export const MultiChannelApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = MultiChannelApiAxiosParamCreator(configuration) + return { + /** + * Endpoint for sending Multi-Channel messages. + * @summary Create Multi-Channel Message + * @param {string} accountId Your Bandwidth Account ID. + * @param {MultiChannelMessageRequest} multiChannelMessageRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createMultiChannelMessage(accountId: string, multiChannelMessageRequest: MultiChannelMessageRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createMultiChannelMessage(accountId, multiChannelMessageRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['MultiChannelApi.createMultiChannelMessage']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * MultiChannelApi - factory interface + * @export + */ +export const MultiChannelApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = MultiChannelApiFp(configuration) + return { + /** + * Endpoint for sending Multi-Channel messages. + * @summary Create Multi-Channel Message + * @param {string} accountId Your Bandwidth Account ID. + * @param {MultiChannelMessageRequest} multiChannelMessageRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createMultiChannelMessage(accountId: string, multiChannelMessageRequest: MultiChannelMessageRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.createMultiChannelMessage(accountId, multiChannelMessageRequest, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * MultiChannelApi - object-oriented interface + * @export + * @class MultiChannelApi + * @extends {BaseAPI} + */ +export class MultiChannelApi extends BaseAPI { + /** + * Endpoint for sending Multi-Channel messages. + * @summary Create Multi-Channel Message + * @param {string} accountId Your Bandwidth Account ID. + * @param {MultiChannelMessageRequest} multiChannelMessageRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MultiChannelApi + */ + public createMultiChannelMessage(accountId: string, multiChannelMessageRequest: MultiChannelMessageRequest, options?: RawAxiosRequestConfig) { + return MultiChannelApiFp(this.configuration).createMultiChannelMessage(accountId, multiChannelMessageRequest, options).then((request) => request(this.axios, this.basePath)); + } +} + diff --git a/bandwidth.yml b/bandwidth.yml index 8f3d160..0a0121c 100644 --- a/bandwidth.yml +++ b/bandwidth.yml @@ -12,6 +12,7 @@ security: tags: - name: Messages - name: Media + - name: Multi-Channel - name: Calls - name: Conferences - name: Recordings @@ -234,6 +235,43 @@ paths: statusCallback: $ref: '#/components/callbacks/statusCallback' servers: *ref_0 + /users/{accountId}/messages/multiChannel: + post: + summary: Create Multi-Channel Message + description: Endpoint for sending Multi-Channel messages. + operationId: createMultiChannelMessage + parameters: + - $ref: '#/components/parameters/accountId' + tags: + - Multi-Channel + requestBody: + $ref: '#/components/requestBodies/createMultiChannelMessageRequest' + responses: + '202': + $ref: '#/components/responses/createMultiChannelMessageResponse' + '400': + $ref: '#/components/responses/createMessageBadRequestError' + '401': + $ref: '#/components/responses/messagingUnauthorizedError' + '403': + $ref: '#/components/responses/messagingForbiddenError' + '404': + $ref: '#/components/responses/messagingNotFoundError' + '406': + $ref: '#/components/responses/messagingNotAcceptableError' + '415': + $ref: '#/components/responses/messagingInvalidMediaTypeError' + '429': + $ref: '#/components/responses/messagingTooManyRequestsError' + '500': + $ref: '#/components/responses/messagingInternalServerError' + callbacks: + multiChannelCallback: + $ref: '#/components/callbacks/multiChannelMessageCallback' + x-badges: + - name: Beta + color: '#076EA8' + servers: *ref_0 /accounts/{accountId}/calls: post: tags: @@ -1595,6 +1633,12 @@ paths: servers: *ref_4 components: schemas: + applicationId: + type: string + description: >- + The ID of the Application your from number or senderId is associated + with in the Bandwidth Phone Number Dashboard. + example: 93de2206-9669-4e07-948d-329f4b722ee2 callbackTypeEnum: type: string enum: @@ -1612,10 +1656,7 @@ components: example: message-delivered priorityEnum: type: string - description: |- - The priority specified by the user. - - Not supported on MMS. + description: The priority specified by the user. enum: - default - high @@ -1808,6 +1849,10 @@ components: required: - type - description + messageId: + type: string + description: The ID of the message. + example: 1589228074636lm4k2je7j7jklbn2 media: title: Media type: object @@ -1820,12 +1865,11 @@ components: type: string tag: title: Tag - type: object - properties: - key: - type: string - value: - type: string + type: string + description: >- + A custom string that will be included in callback events of the message. + Max 1024 characters. + example: custom string deferredResult: title: DeferredResult type: object @@ -1834,6 +1878,15 @@ components: type: object setOrExpired: type: boolean + expiration: + type: string + format: date-time + description: >- + A string with the date/time value that the message will automatically + expire by. This must be a valid RFC-3339 value, e.g., + 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. Must be a date-time + in the future. + example: '2021-02-01T11:29:18-05:00' message: title: Message type: object @@ -1898,10 +1951,7 @@ components: priority: $ref: '#/components/schemas/priorityEnum' expiration: - type: string - format: date-time - description: The expiration date-time set by the user. - example: '2021-02-01T11:29:18-05:00' + $ref: '#/components/schemas/expiration' messageRequest: title: MessageRequest type: object @@ -1937,44 +1987,489 @@ components: plus +, underscore _ and ampersand &. Alphanumeric Sender IDs must contain at least one letter. example: '+15551113333' + text: + $ref: '#/components/schemas/messageText' + media: + $ref: '#/components/schemas/messageMedia' + tag: + $ref: '#/components/schemas/tag' + priority: + $ref: '#/components/schemas/priorityEnum' + expiration: + $ref: '#/components/schemas/expiration' + messageText: + type: string + description: The contents of the text message. Must be 2048 characters or less. + maxLength: 2048 + example: Hello world + messageMedia: + type: array + items: + type: string + format: uri + maxLength: 4096 + description: |- + A list of URLs to include as media attachments as part of the message. + Each URL can be at most 4096 characters. + example: + - https://dev.bandwidth.com/images/bandwidth-logo.png + - https://dev.bandwidth.com/images/github_logo.png + createMultiChannelMessageResponse: + type: object + properties: + links: + type: array + items: + $ref: '#/components/schemas/link' + data: + $ref: '#/components/schemas/multiChannelMessageData' + errors: + type: array + items: + $ref: '#/components/schemas/errorObject' + multiChannelMessageChannelEnum: + description: The channel of the multi-channel message. + type: string + enum: + - RBM + - SMS + - MMS + example: RBM + multiChannelMessageDirectionEnum: + type: string + enum: + - INBOUND + - OUTBOUND + example: OUTBOUND + multiChannelSenderId: + type: string + description: The sender ID of the message. This could be an alphanumeric sender ID. + example: BandwidthRBM + multiChannelDestination: + type: string + description: The phone number the message should be sent to in E164 format. + example: '+15552223333' + rbmMessageContentText: + title: RBM Text + type: object + properties: text: type: string - description: The contents of the text message. Must be 2048 characters or less. - maxLength: 2048 + description: >- + The text associated with the message. Must be 3270 characters or + less + maxLength: 3270 example: Hello world + suggestions: + $ref: '#/components/schemas/multiChannelFullActions' + required: + - text + rbmMediaHeightEnum: + type: string + description: The height of the media. + enum: + - SHORT + - MEDIUM + - TALL + example: SHORT + rbmMessageContentFile: + title: RBM Rich Media File + type: object + properties: + fileUrl: + type: string + format: uri + description: The URL of the media file. 100MB is the maximum file size. + example: https://dev.bandwidth.com/images/bandwidth-logo.png + maxLength: 1000 + thumbnailUrl: + type: string + format: uri + description: The URL of the thumbnail image. Applies only to video file media. + example: https://dev.bandwidth.com/images/bandwidth-logo.png + maxLength: 1000 + required: + - fileUrl + rbmMessageMedia: + title: RBM Media + type: object + properties: media: + $ref: '#/components/schemas/rbmMessageContentFile' + suggestions: + $ref: '#/components/schemas/multiChannelFullActions' + required: + - media + rbmCardContent: + type: object + properties: + title: + type: string + description: The title of the card. Must be 200 characters or less. + maxLength: 200 + example: Bandwidth + description: + type: string + description: The description of the card. Must be 2000 characters or less. + maxLength: 2000 + example: Bandwidth is a communications platform as a service (CPaaS) company. + media: + allOf: + - $ref: '#/components/schemas/rbmMessageContentFile' + - type: object + properties: + height: + $ref: '#/components/schemas/rbmMediaHeightEnum' + required: + - height + suggestions: + description: >- + An array of suggested actions for the recipient that will be + displayed on the rich card. type: array items: - type: string - format: uri - maxLength: 4096 + $ref: '#/components/schemas/multiChannelAction' + maxItems: 4 + rbmStandaloneCard: + title: Standalone Card + type: object + properties: + orientation: + $ref: '#/components/schemas/standaloneCardOrientationEnum' + thumbnailImageAlignment: + $ref: '#/components/schemas/thumbnailAlignmentEnum' + cardContent: + $ref: '#/components/schemas/rbmCardContent' + suggestions: + $ref: '#/components/schemas/multiChannelFullActions' + required: + - orientation + - thumbnailImageAlignment + - cardContent + standaloneCardOrientationEnum: + type: string + enum: + - HORIZONTAL + - VERTICAL + example: VERTICAL + thumbnailAlignmentEnum: + type: string + description: >- + The alignment of the thumbnail image in the card. Only applicable if the + card using horizontal orientation. + enum: + - LEFT + - RIGHT + example: LEFT + rbmMessageCarouselCard: + title: Carousel + type: object + properties: + cardWidth: + $ref: '#/components/schemas/cardWidthEnum' + cardContents: + type: array + items: + $ref: '#/components/schemas/rbmCardContent' + maxItems: 10 + suggestions: + $ref: '#/components/schemas/multiChannelFullActions' + required: + - cardContents + - cardWidth + cardWidthEnum: + type: string + enum: + - SMALL + - MEDIUM + example: SMALL + smsMessageContent: + title: SMS Text + type: object + properties: + text: + $ref: '#/components/schemas/messageText' + required: + - text + mmsMessageContent: + title: MMS Message + type: object + properties: + text: + $ref: '#/components/schemas/messageText' + media: + $ref: '#/components/schemas/messageMedia' + rbmMessageContentRichCard: + title: RBM Rich Card + oneOf: + - $ref: '#/components/schemas/rbmStandaloneCard' + - $ref: '#/components/schemas/rbmMessageCarouselCard' + rbmActionTypeEnum: + type: string + enum: + - REPLY + - DIAL_PHONE + - SHOW_LOCATION + - CREATE_CALENDAR_EVENT + - OPEN_URL + - REQUEST_LOCATION + example: REPLY + rbmActionText: + title: Text + type: string + description: Displayed text for user to click + maxLength: 25 + example: Hello world + rbmActionPostBackData: + title: Post Back Data + type: string + format: byte + description: Base64 payload the customer receives when the reply is clicked. + maxLength: 2048 + example: SGVsbG8gd29ybGQ= + rbmActionBase: + type: object + properties: + type: + $ref: '#/components/schemas/rbmActionTypeEnum' + text: + $ref: '#/components/schemas/rbmActionText' + postBackData: + $ref: '#/components/schemas/rbmActionPostBackData' + required: + - text + - postBackData + - type + rbmActionDial: + allOf: + - $ref: '#/components/schemas/rbmActionBase' + - title: Dial Phone + type: object + properties: + phoneNumber: + type: string + description: The phone number to dial. Must be E164 format. + example: '+15552223333' + required: + - phoneNumber + rbmActionViewLocation: + allOf: + - $ref: '#/components/schemas/rbmActionBase' + - title: Show Location + type: object + properties: + latitude: + type: string + format: double + description: The latitude of the location. + example: '37.7749' + longitude: + type: string + format: double + description: The longitude of the location. + example: '-122.4194' + label: + type: string + description: The label of the location. + example: San Francisco + maxLength: 100 + required: + - latitude + - longitude + multiChannelActionCalendarEvent: + allOf: + - $ref: '#/components/schemas/rbmActionBase' + - title: Calendar Event + type: object + properties: + title: + type: string + description: The title of the event. + example: Meeting with John + maxLength: 100 + startTime: + type: string + format: date-time + description: The start time of the event. + example: 2022-09-14T18:20:16.000Z + endTime: + type: string + format: date-time + description: The end time of the event. + example: 2022-09-14T18:20:16.000Z + description: + type: string + description: The description of the event. + example: Discuss the new project + maxLength: 500 + required: + - title + - startTime + - endTime + rbmActionOpenUrl: + allOf: + - $ref: '#/components/schemas/rbmActionBase' + - title: Open URL + type: object + properties: + url: + type: string + format: uri + description: The URL to open in browser. + example: https://dev.bandwidth.com + maxLength: 2048 + required: + - url + multiChannelFullActions: + type: array + description: An array of suggested actions for the recipient. + items: + $ref: '#/components/schemas/multiChannelAction' + maxItems: 11 + multiChannelAction: + oneOf: + - $ref: '#/components/schemas/rbmActionBase' + - $ref: '#/components/schemas/rbmActionDial' + - $ref: '#/components/schemas/rbmActionViewLocation' + - $ref: '#/components/schemas/multiChannelActionCalendarEvent' + - $ref: '#/components/schemas/rbmActionOpenUrl' + discriminator: + propertyName: type + mapping: + REPLY: '#/components/schemas/rbmActionBase' + DIAL_PHONE: '#/components/schemas/rbmActionDial' + SHOW_LOCATION: '#/components/schemas/rbmActionViewLocation' + CREATE_CALENDAR_EVENT: '#/components/schemas/multiChannelActionCalendarEvent' + OPEN_URL: '#/components/schemas/rbmActionOpenUrl' + REQUEST_LOCATION: '#/components/schemas/rbmActionBase' + multiChannelStatusEnum: + type: string + enum: + - QUEUED + - SENDING + - DELIVERED + - FAILED + example: DELIVERED + multiChannelChannelListObject: + type: object + properties: + from: + $ref: '#/components/schemas/multiChannelSenderId' + applicationId: + $ref: '#/components/schemas/applicationId' + channel: + $ref: '#/components/schemas/multiChannelMessageChannelEnum' + content: + description: The content of the message. + oneOf: + - $ref: '#/components/schemas/rbmMessageContentText' + - $ref: '#/components/schemas/rbmMessageMedia' + - $ref: '#/components/schemas/rbmMessageContentRichCard' + - $ref: '#/components/schemas/smsMessageContent' + - $ref: '#/components/schemas/mmsMessageContent' + required: + - from + - applicationId + - channel + - content + multiChannelMessageRequest: + description: Multi-Channel Message Request + type: object + properties: + to: + $ref: '#/components/schemas/multiChannelDestination' + channelList: + type: array description: >- - A list of URLs to include as media attachments as part of the - message. - - Each URL can be at most 4096 characters. - example: - - https://dev.bandwidth.com/images/bandwidth-logo.png - - https://dev.bandwidth.com/images/github_logo.png + A list of message bodies. The messages will be attempted in the + order they are listed. Once a message sends successfully, the others + will be ignored. + items: + $ref: '#/components/schemas/multiChannelChannelListObject' + maxItems: 4 tag: - type: string - description: >- - A custom string that will be included in callback events of the - message. Max 1024 characters. - example: custom string + $ref: '#/components/schemas/tag' priority: $ref: '#/components/schemas/priorityEnum' expiration: + $ref: '#/components/schemas/expiration' + required: + - to + - channelList + multiChannelMessageCallbackData: + type: object + properties: + messageId: + $ref: '#/components/schemas/messageId' + status: + $ref: '#/components/schemas/multiChannelStatusEnum' + direction: + $ref: '#/components/schemas/multiChannelMessageDirectionEnum' + from: + $ref: '#/components/schemas/multiChannelSenderId' + to: + $ref: '#/components/schemas/multiChannelDestination' + applicationId: + $ref: '#/components/schemas/applicationId' + channel: + $ref: '#/components/schemas/multiChannelMessageChannelEnum' + tag: + $ref: '#/components/schemas/tag' + multiChannelMessageData: + type: object + properties: + messageId: + $ref: '#/components/schemas/messageId' + status: + $ref: '#/components/schemas/multiChannelStatusEnum' + time: + description: The time the message was received by the Bandwidth API. type: string format: date-time - description: >- - A string with the date/time value that the message will - automatically expire by. This must be a valid RFC-3339 value, e.g., - 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. Must be a - date-time in the future. - - Not supported on MMS. - example: '2021-02-01T11:29:18-05:00' + example: 2025-01-01T18:20:16.000Z + direction: + $ref: '#/components/schemas/multiChannelMessageDirectionEnum' + from: + $ref: '#/components/schemas/multiChannelSenderId' + to: + $ref: '#/components/schemas/multiChannelDestination' + applicationId: + $ref: '#/components/schemas/applicationId' + channel: + $ref: '#/components/schemas/multiChannelMessageChannelEnum' + tag: + $ref: '#/components/schemas/tag' + multiChannelCallbackData: + type: object + properties: + time: + description: The time of the callback event. + type: string + format: date-time + example: 2025-01-01T18:20:16.000Z + type: + $ref: '#/components/schemas/multiChannelStatusEnum' + to: + $ref: '#/components/schemas/multiChannelDestination' + description: + type: string + example: Incoming message received + message: + $ref: '#/components/schemas/multiChannelMessageCallbackData' + link: + type: object + properties: + rel: + type: string + href: + type: string + errorObject: + type: object + properties: + code: + type: string + message: + type: string messageCallback: description: Message Callback Schema type: object @@ -2796,7 +3291,7 @@ components: type: object properties: applicationId: - $ref: '#/components/schemas/applicationId' + $ref: '#/components/schemas/applicationId1' accountId: $ref: '#/components/schemas/accountId' callId: @@ -3404,7 +3899,7 @@ components: accountId: $ref: '#/components/schemas/accountId' applicationId: - $ref: '#/components/schemas/applicationId' + $ref: '#/components/schemas/applicationId1' from: $ref: '#/components/schemas/from' to: @@ -3441,7 +3936,7 @@ components: accountId: $ref: '#/components/schemas/accountId' applicationId: - $ref: '#/components/schemas/applicationId' + $ref: '#/components/schemas/applicationId1' from: $ref: '#/components/schemas/from' to: @@ -3481,7 +3976,7 @@ components: accountId: $ref: '#/components/schemas/accountId' applicationId: - $ref: '#/components/schemas/applicationId' + $ref: '#/components/schemas/applicationId1' from: $ref: '#/components/schemas/from' to: @@ -3662,7 +4157,7 @@ components: accountId: $ref: '#/components/schemas/accountId' applicationId: - $ref: '#/components/schemas/applicationId' + $ref: '#/components/schemas/applicationId1' from: $ref: '#/components/schemas/from' to: @@ -3702,7 +4197,7 @@ components: accountId: $ref: '#/components/schemas/accountId' applicationId: - $ref: '#/components/schemas/applicationId' + $ref: '#/components/schemas/applicationId1' from: $ref: '#/components/schemas/from' to: @@ -3742,7 +4237,7 @@ components: accountId: $ref: '#/components/schemas/accountId' applicationId: - $ref: '#/components/schemas/applicationId' + $ref: '#/components/schemas/applicationId1' from: $ref: '#/components/schemas/from' to: @@ -3786,7 +4281,7 @@ components: accountId: $ref: '#/components/schemas/accountId' applicationId: - $ref: '#/components/schemas/applicationId' + $ref: '#/components/schemas/applicationId1' from: $ref: '#/components/schemas/from' to: @@ -3820,7 +4315,7 @@ components: accountId: $ref: '#/components/schemas/accountId' applicationId: - $ref: '#/components/schemas/applicationId' + $ref: '#/components/schemas/applicationId1' from: $ref: '#/components/schemas/from' to: @@ -3856,7 +4351,7 @@ components: accountId: $ref: '#/components/schemas/accountId' applicationId: - $ref: '#/components/schemas/applicationId' + $ref: '#/components/schemas/applicationId1' from: $ref: '#/components/schemas/from' to: @@ -3906,7 +4401,7 @@ components: accountId: $ref: '#/components/schemas/accountId' applicationId: - $ref: '#/components/schemas/applicationId' + $ref: '#/components/schemas/applicationId1' from: $ref: '#/components/schemas/from' to: @@ -3956,7 +4451,7 @@ components: accountId: $ref: '#/components/schemas/accountId' applicationId: - $ref: '#/components/schemas/applicationId' + $ref: '#/components/schemas/applicationId1' from: $ref: '#/components/schemas/from' to: @@ -3994,7 +4489,7 @@ components: accountId: $ref: '#/components/schemas/accountId' applicationId: - $ref: '#/components/schemas/applicationId' + $ref: '#/components/schemas/applicationId1' from: $ref: '#/components/schemas/from' to: @@ -4047,7 +4542,7 @@ components: accountId: $ref: '#/components/schemas/accountId' applicationId: - $ref: '#/components/schemas/applicationId' + $ref: '#/components/schemas/applicationId1' from: $ref: '#/components/schemas/from' to: @@ -4086,7 +4581,7 @@ components: accountId: $ref: '#/components/schemas/accountId' applicationId: - $ref: '#/components/schemas/applicationId' + $ref: '#/components/schemas/applicationId1' from: $ref: '#/components/schemas/from' to: @@ -4132,7 +4627,7 @@ components: accountId: $ref: '#/components/schemas/accountId' applicationId: - $ref: '#/components/schemas/applicationId' + $ref: '#/components/schemas/applicationId1' from: $ref: '#/components/schemas/from' to: @@ -4188,7 +4683,7 @@ components: type: string description: The user account associated with the call. example: '9900000' - applicationId: + applicationId1: type: string description: The id of the application associated with the call. example: 04e88489-df02-4e34-a0ee-27a91849555f @@ -5318,6 +5813,12 @@ components: application/json: schema: $ref: '#/components/schemas/message' + createMultiChannelMessageResponse: + description: Accepted + content: + application/json: + schema: + $ref: '#/components/schemas/createMultiChannelMessageResponse' listMessagesResponse: description: OK content: @@ -6577,6 +7078,12 @@ components: schema: $ref: '#/components/schemas/messageRequest' required: true + createMultiChannelMessageRequest: + content: + application/json: + schema: + $ref: '#/components/schemas/multiChannelMessageRequest' + required: true uploadMediaRequest: content: application/json: @@ -6978,6 +7485,19 @@ components: responses: '200': description: OK + multiChannelMessageCallback: + '{multiChannelMessageCallbackUrl}': + post: + requestBody: + required: true + description: Status Callback Payload + content: + application/json: + schema: + $ref: '#/components/schemas/multiChannelCallbackData' + responses: + '204': + description: No Content tfVerificationStatus: your_url.com/webhookService: post: diff --git a/base.ts b/base.ts index a70eaa4..fa73643 100644 --- a/base.ts +++ b/base.ts @@ -221,6 +221,12 @@ export const operationServerMap: ServerMap = { description: "Production", } ], + "MultiChannelApi.createMultiChannelMessage": [ + { + url: "https://messaging.bandwidth.com/api/v2", + description: "Production", + } + ], "PhoneNumberLookupApi.createLookup": [ { url: "https://numbers.bandwidth.com/api/v1", diff --git a/models/card-width-enum.ts b/models/card-width-enum.ts new file mode 100644 index 0000000..24b407d --- /dev/null +++ b/models/card-width-enum.ts @@ -0,0 +1,31 @@ +/* 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 + * @enum {string} + */ + +export const CardWidthEnum = { + Small: 'SMALL', + Medium: 'MEDIUM' +} as const; + +export type CardWidthEnum = typeof CardWidthEnum[keyof typeof CardWidthEnum]; + + + diff --git a/models/create-multi-channel-message-response.ts b/models/create-multi-channel-message-response.ts new file mode 100644 index 0000000..3789b22 --- /dev/null +++ b/models/create-multi-channel-message-response.ts @@ -0,0 +1,51 @@ +/* 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 { ErrorObject } from './error-object'; +// May contain unused imports in some cases +// @ts-ignore +import type { Link } from './link'; +// May contain unused imports in some cases +// @ts-ignore +import type { MultiChannelMessageData } from './multi-channel-message-data'; + +/** + * + * @export + * @interface CreateMultiChannelMessageResponse + */ +export interface CreateMultiChannelMessageResponse { + /** + * + * @type {Array} + * @memberof CreateMultiChannelMessageResponse + */ + 'links'?: Array; + /** + * + * @type {MultiChannelMessageData} + * @memberof CreateMultiChannelMessageResponse + */ + 'data'?: MultiChannelMessageData; + /** + * + * @type {Array} + * @memberof CreateMultiChannelMessageResponse + */ + 'errors'?: Array; +} + diff --git a/models/error-object.ts b/models/error-object.ts new file mode 100644 index 0000000..6a89f07 --- /dev/null +++ b/models/error-object.ts @@ -0,0 +1,36 @@ +/* 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 ErrorObject + */ +export interface ErrorObject { + /** + * + * @type {string} + * @memberof ErrorObject + */ + 'code'?: string; + /** + * + * @type {string} + * @memberof ErrorObject + */ + 'message'?: string; +} + diff --git a/models/index.ts b/models/index.ts index 3656aa0..5298d2d 100644 --- a/models/index.ts +++ b/models/index.ts @@ -15,6 +15,7 @@ export * from './call-transcription-response'; export * from './call-transcription-track-enum'; export * from './callback-method-enum'; export * from './callback-type-enum'; +export * from './card-width-enum'; export * from './code-request'; export * from './conference'; export * from './conference-completed-callback'; @@ -31,15 +32,18 @@ export * from './create-call'; export * from './create-call-response'; export * from './create-lookup-response'; export * from './create-message-request-error'; +export * from './create-multi-channel-message-response'; export * from './deferred-result'; export * from './disconnect-callback'; export * from './diversion'; export * from './dtmf-callback'; +export * from './error-object'; export * from './failure-webhook'; export * from './field-error'; export * from './file-format-enum'; export * from './gather-callback'; export * from './initiate-callback'; +export * from './link'; export * from './links-object'; export * from './list-message-direction-enum'; export * from './list-message-item'; @@ -65,10 +69,36 @@ export * from './messaging-request-error'; export * from './mfa-forbidden-request-error'; export * from './mfa-request-error'; export * from './mfa-unauthorized-request-error'; +export * from './mms-message-content'; export * from './model-error'; +export * from './multi-channel-action'; +export * from './multi-channel-action-calendar-event'; +export * from './multi-channel-callback-data'; +export * from './multi-channel-channel-list-object'; +export * from './multi-channel-channel-list-object-content'; +export * from './multi-channel-message-callback-data'; +export * from './multi-channel-message-channel-enum'; +export * from './multi-channel-message-data'; +export * from './multi-channel-message-direction-enum'; +export * from './multi-channel-message-request'; +export * from './multi-channel-status-enum'; export * from './opt-in-workflow'; export * from './page-info'; export * from './priority-enum'; +export * from './rbm-action-base'; +export * from './rbm-action-dial'; +export * from './rbm-action-open-url'; +export * from './rbm-action-type-enum'; +export * from './rbm-action-view-location'; +export * from './rbm-card-content'; +export * from './rbm-card-content-media'; +export * from './rbm-media-height-enum'; +export * from './rbm-message-carousel-card'; +export * from './rbm-message-content-file'; +export * from './rbm-message-content-rich-card'; +export * from './rbm-message-content-text'; +export * from './rbm-message-media'; +export * from './rbm-standalone-card'; export * from './recording-available-callback'; export * from './recording-complete-callback'; export * from './recording-state-enum'; @@ -76,8 +106,9 @@ export * from './recording-transcription-metadata'; export * from './recording-transcriptions'; export * from './redirect-callback'; export * from './redirect-method-enum'; +export * from './sms-message-content'; +export * from './standalone-card-orientation-enum'; export * from './stir-shaken'; -export * from './tag'; export * from './telephone-number'; export * from './tfv-basic-authentication'; export * from './tfv-callback-status-enum'; @@ -86,6 +117,7 @@ export * from './tfv-status'; export * from './tfv-status-enum'; export * from './tfv-submission-info'; export * from './tfv-submission-wrapper'; +export * from './thumbnail-alignment-enum'; export * from './tn-lookup-request-error'; export * from './transcribe-recording'; export * from './transcription'; diff --git a/models/link.ts b/models/link.ts new file mode 100644 index 0000000..a528414 --- /dev/null +++ b/models/link.ts @@ -0,0 +1,36 @@ +/* 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 Link + */ +export interface Link { + /** + * + * @type {string} + * @memberof Link + */ + 'rel'?: string; + /** + * + * @type {string} + * @memberof Link + */ + 'href'?: string; +} + diff --git a/models/message-request.ts b/models/message-request.ts index 81389bb..3cd4115 100644 --- a/models/message-request.ts +++ b/models/message-request.ts @@ -66,7 +66,7 @@ export interface MessageRequest { */ 'priority'?: PriorityEnum; /** - * A string with the date/time value that the message will automatically expire by. This must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. Must be a date-time in the future. Not supported on MMS. + * A string with the date/time value that the message will automatically expire by. This must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. Must be a date-time in the future. * @type {string} * @memberof MessageRequest */ diff --git a/models/message.ts b/models/message.ts index c5413ba..0c746d8 100644 --- a/models/message.ts +++ b/models/message.ts @@ -99,7 +99,7 @@ export interface Message { */ 'priority'?: PriorityEnum; /** - * The expiration date-time set by the user. + * A string with the date/time value that the message will automatically expire by. This must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. Must be a date-time in the future. * @type {string} * @memberof Message */ diff --git a/models/mms-message-content.ts b/models/mms-message-content.ts new file mode 100644 index 0000000..7a758c4 --- /dev/null +++ b/models/mms-message-content.ts @@ -0,0 +1,36 @@ +/* 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 MmsMessageContent + */ +export interface MmsMessageContent { + /** + * The contents of the text message. Must be 2048 characters or less. + * @type {string} + * @memberof MmsMessageContent + */ + 'text'?: string; + /** + * A list of URLs to include as media attachments as part of the message. Each URL can be at most 4096 characters. + * @type {Array} + * @memberof MmsMessageContent + */ + 'media'?: Array; +} + diff --git a/models/multi-channel-action-calendar-event.ts b/models/multi-channel-action-calendar-event.ts new file mode 100644 index 0000000..bf3bc66 --- /dev/null +++ b/models/multi-channel-action-calendar-event.ts @@ -0,0 +1,29 @@ +/* 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 { RbmActionBase } from './rbm-action-base'; +// May contain unused imports in some cases +// @ts-ignore +import type { RbmActionTypeEnum } from './rbm-action-type-enum'; + +/** + * @type MultiChannelActionCalendarEvent + * @export + */ +export type MultiChannelActionCalendarEvent = RbmActionBase; + + diff --git a/models/multi-channel-action.ts b/models/multi-channel-action.ts new file mode 100644 index 0000000..b934dc6 --- /dev/null +++ b/models/multi-channel-action.ts @@ -0,0 +1,41 @@ +/* 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 { MultiChannelActionCalendarEvent } from './multi-channel-action-calendar-event'; +// May contain unused imports in some cases +// @ts-ignore +import type { RbmActionBase } from './rbm-action-base'; +// May contain unused imports in some cases +// @ts-ignore +import type { RbmActionDial } from './rbm-action-dial'; +// May contain unused imports in some cases +// @ts-ignore +import type { RbmActionOpenUrl } from './rbm-action-open-url'; +// May contain unused imports in some cases +// @ts-ignore +import type { RbmActionTypeEnum } from './rbm-action-type-enum'; +// May contain unused imports in some cases +// @ts-ignore +import type { RbmActionViewLocation } from './rbm-action-view-location'; + +/** + * @type MultiChannelAction + * @export + */ +export type MultiChannelAction = { type: 'CREATE_CALENDAR_EVENT' } & MultiChannelActionCalendarEvent | { type: 'DIAL_PHONE' } & RbmActionDial | { type: 'OPEN_URL' } & RbmActionOpenUrl | { type: 'REPLY' } & RbmActionBase | { type: 'REQUEST_LOCATION' } & RbmActionBase | { type: 'SHOW_LOCATION' } & RbmActionViewLocation; + + diff --git a/models/multi-channel-callback-data.ts b/models/multi-channel-callback-data.ts new file mode 100644 index 0000000..70c63df --- /dev/null +++ b/models/multi-channel-callback-data.ts @@ -0,0 +1,62 @@ +/* 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 { MultiChannelMessageCallbackData } from './multi-channel-message-callback-data'; +// May contain unused imports in some cases +// @ts-ignore +import type { MultiChannelStatusEnum } from './multi-channel-status-enum'; + +/** + * + * @export + * @interface MultiChannelCallbackData + */ +export interface MultiChannelCallbackData { + /** + * The time of the callback event. + * @type {string} + * @memberof MultiChannelCallbackData + */ + 'time'?: string; + /** + * + * @type {MultiChannelStatusEnum} + * @memberof MultiChannelCallbackData + */ + 'type'?: MultiChannelStatusEnum; + /** + * The phone number the message should be sent to in E164 format. + * @type {string} + * @memberof MultiChannelCallbackData + */ + 'to'?: string; + /** + * + * @type {string} + * @memberof MultiChannelCallbackData + */ + 'description'?: string; + /** + * + * @type {MultiChannelMessageCallbackData} + * @memberof MultiChannelCallbackData + */ + 'message'?: MultiChannelMessageCallbackData; +} + + + diff --git a/models/multi-channel-channel-list-object-content.ts b/models/multi-channel-channel-list-object-content.ts new file mode 100644 index 0000000..2447c2b --- /dev/null +++ b/models/multi-channel-channel-list-object-content.ts @@ -0,0 +1,54 @@ +/* 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 { CardWidthEnum } from './card-width-enum'; +// May contain unused imports in some cases +// @ts-ignore +import type { MmsMessageContent } from './mms-message-content'; +// May contain unused imports in some cases +// @ts-ignore +import type { MultiChannelAction } from './multi-channel-action'; +// May contain unused imports in some cases +// @ts-ignore +import type { RbmCardContent } from './rbm-card-content'; +// May contain unused imports in some cases +// @ts-ignore +import type { RbmMessageContentRichCard } from './rbm-message-content-rich-card'; +// May contain unused imports in some cases +// @ts-ignore +import type { RbmMessageContentText } from './rbm-message-content-text'; +// May contain unused imports in some cases +// @ts-ignore +import type { RbmMessageMedia } from './rbm-message-media'; +// May contain unused imports in some cases +// @ts-ignore +import type { SmsMessageContent } from './sms-message-content'; +// May contain unused imports in some cases +// @ts-ignore +import type { StandaloneCardOrientationEnum } from './standalone-card-orientation-enum'; +// May contain unused imports in some cases +// @ts-ignore +import type { ThumbnailAlignmentEnum } from './thumbnail-alignment-enum'; + +/** + * @type MultiChannelChannelListObjectContent + * The content of the message. + * @export + */ +export type MultiChannelChannelListObjectContent = MmsMessageContent | RbmMessageContentRichCard | RbmMessageContentText | RbmMessageMedia | SmsMessageContent; + + diff --git a/models/multi-channel-channel-list-object.ts b/models/multi-channel-channel-list-object.ts new file mode 100644 index 0000000..e4f61e7 --- /dev/null +++ b/models/multi-channel-channel-list-object.ts @@ -0,0 +1,56 @@ +/* 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 { MultiChannelChannelListObjectContent } from './multi-channel-channel-list-object-content'; +// May contain unused imports in some cases +// @ts-ignore +import type { MultiChannelMessageChannelEnum } from './multi-channel-message-channel-enum'; + +/** + * + * @export + * @interface MultiChannelChannelListObject + */ +export interface MultiChannelChannelListObject { + /** + * The sender ID of the message. This could be an alphanumeric sender ID. + * @type {string} + * @memberof MultiChannelChannelListObject + */ + 'from': string; + /** + * The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. + * @type {string} + * @memberof MultiChannelChannelListObject + */ + 'applicationId': string; + /** + * + * @type {MultiChannelMessageChannelEnum} + * @memberof MultiChannelChannelListObject + */ + 'channel': MultiChannelMessageChannelEnum; + /** + * + * @type {MultiChannelChannelListObjectContent} + * @memberof MultiChannelChannelListObject + */ + 'content': MultiChannelChannelListObjectContent; +} + + + diff --git a/models/multi-channel-message-callback-data.ts b/models/multi-channel-message-callback-data.ts new file mode 100644 index 0000000..a58e657 --- /dev/null +++ b/models/multi-channel-message-callback-data.ts @@ -0,0 +1,83 @@ +/* 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 { MultiChannelMessageChannelEnum } from './multi-channel-message-channel-enum'; +// May contain unused imports in some cases +// @ts-ignore +import type { MultiChannelMessageDirectionEnum } from './multi-channel-message-direction-enum'; +// May contain unused imports in some cases +// @ts-ignore +import type { MultiChannelStatusEnum } from './multi-channel-status-enum'; + +/** + * + * @export + * @interface MultiChannelMessageCallbackData + */ +export interface MultiChannelMessageCallbackData { + /** + * The ID of the message. + * @type {string} + * @memberof MultiChannelMessageCallbackData + */ + 'messageId'?: string; + /** + * + * @type {MultiChannelStatusEnum} + * @memberof MultiChannelMessageCallbackData + */ + 'status'?: MultiChannelStatusEnum; + /** + * + * @type {MultiChannelMessageDirectionEnum} + * @memberof MultiChannelMessageCallbackData + */ + 'direction'?: MultiChannelMessageDirectionEnum; + /** + * The sender ID of the message. This could be an alphanumeric sender ID. + * @type {string} + * @memberof MultiChannelMessageCallbackData + */ + 'from'?: string; + /** + * The phone number the message should be sent to in E164 format. + * @type {string} + * @memberof MultiChannelMessageCallbackData + */ + 'to'?: string; + /** + * The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. + * @type {string} + * @memberof MultiChannelMessageCallbackData + */ + 'applicationId'?: string; + /** + * + * @type {MultiChannelMessageChannelEnum} + * @memberof MultiChannelMessageCallbackData + */ + 'channel'?: MultiChannelMessageChannelEnum; + /** + * A custom string that will be included in callback events of the message. Max 1024 characters. + * @type {string} + * @memberof MultiChannelMessageCallbackData + */ + 'tag'?: string; +} + + + diff --git a/models/multi-channel-message-channel-enum.ts b/models/multi-channel-message-channel-enum.ts new file mode 100644 index 0000000..61e39bc --- /dev/null +++ b/models/multi-channel-message-channel-enum.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + + +/** + * The channel of the multi-channel message. + * @export + * @enum {string} + */ + +export const MultiChannelMessageChannelEnum = { + Rbm: 'RBM', + Sms: 'SMS', + Mms: 'MMS' +} as const; + +export type MultiChannelMessageChannelEnum = typeof MultiChannelMessageChannelEnum[keyof typeof MultiChannelMessageChannelEnum]; + + + diff --git a/models/multi-channel-message-data.ts b/models/multi-channel-message-data.ts new file mode 100644 index 0000000..6469295 --- /dev/null +++ b/models/multi-channel-message-data.ts @@ -0,0 +1,89 @@ +/* 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 { MultiChannelMessageChannelEnum } from './multi-channel-message-channel-enum'; +// May contain unused imports in some cases +// @ts-ignore +import type { MultiChannelMessageDirectionEnum } from './multi-channel-message-direction-enum'; +// May contain unused imports in some cases +// @ts-ignore +import type { MultiChannelStatusEnum } from './multi-channel-status-enum'; + +/** + * + * @export + * @interface MultiChannelMessageData + */ +export interface MultiChannelMessageData { + /** + * The ID of the message. + * @type {string} + * @memberof MultiChannelMessageData + */ + 'messageId'?: string; + /** + * + * @type {MultiChannelStatusEnum} + * @memberof MultiChannelMessageData + */ + 'status'?: MultiChannelStatusEnum; + /** + * The time the message was received by the Bandwidth API. + * @type {string} + * @memberof MultiChannelMessageData + */ + 'time'?: string; + /** + * + * @type {MultiChannelMessageDirectionEnum} + * @memberof MultiChannelMessageData + */ + 'direction'?: MultiChannelMessageDirectionEnum; + /** + * The sender ID of the message. This could be an alphanumeric sender ID. + * @type {string} + * @memberof MultiChannelMessageData + */ + 'from'?: string; + /** + * The phone number the message should be sent to in E164 format. + * @type {string} + * @memberof MultiChannelMessageData + */ + 'to'?: string; + /** + * The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. + * @type {string} + * @memberof MultiChannelMessageData + */ + 'applicationId'?: string; + /** + * + * @type {MultiChannelMessageChannelEnum} + * @memberof MultiChannelMessageData + */ + 'channel'?: MultiChannelMessageChannelEnum; + /** + * A custom string that will be included in callback events of the message. Max 1024 characters. + * @type {string} + * @memberof MultiChannelMessageData + */ + 'tag'?: string; +} + + + diff --git a/models/multi-channel-message-direction-enum.ts b/models/multi-channel-message-direction-enum.ts new file mode 100644 index 0000000..c79b828 --- /dev/null +++ b/models/multi-channel-message-direction-enum.ts @@ -0,0 +1,31 @@ +/* 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 + * @enum {string} + */ + +export const MultiChannelMessageDirectionEnum = { + Inbound: 'INBOUND', + Outbound: 'OUTBOUND' +} as const; + +export type MultiChannelMessageDirectionEnum = typeof MultiChannelMessageDirectionEnum[keyof typeof MultiChannelMessageDirectionEnum]; + + + diff --git a/models/multi-channel-message-request.ts b/models/multi-channel-message-request.ts new file mode 100644 index 0000000..f63b4b6 --- /dev/null +++ b/models/multi-channel-message-request.ts @@ -0,0 +1,62 @@ +/* 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 { MultiChannelChannelListObject } from './multi-channel-channel-list-object'; +// May contain unused imports in some cases +// @ts-ignore +import type { PriorityEnum } from './priority-enum'; + +/** + * Multi-Channel Message Request + * @export + * @interface MultiChannelMessageRequest + */ +export interface MultiChannelMessageRequest { + /** + * The phone number the message should be sent to in E164 format. + * @type {string} + * @memberof MultiChannelMessageRequest + */ + 'to': string; + /** + * A list of message bodies. The messages will be attempted in the order they are listed. Once a message sends successfully, the others will be ignored. + * @type {Array} + * @memberof MultiChannelMessageRequest + */ + 'channelList': Array; + /** + * A custom string that will be included in callback events of the message. Max 1024 characters. + * @type {string} + * @memberof MultiChannelMessageRequest + */ + 'tag'?: string; + /** + * + * @type {PriorityEnum} + * @memberof MultiChannelMessageRequest + */ + 'priority'?: PriorityEnum; + /** + * A string with the date/time value that the message will automatically expire by. This must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. Must be a date-time in the future. + * @type {string} + * @memberof MultiChannelMessageRequest + */ + 'expiration'?: string; +} + + + diff --git a/models/multi-channel-status-enum.ts b/models/multi-channel-status-enum.ts new file mode 100644 index 0000000..79b581d --- /dev/null +++ b/models/multi-channel-status-enum.ts @@ -0,0 +1,33 @@ +/* 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 + * @enum {string} + */ + +export const MultiChannelStatusEnum = { + Queued: 'QUEUED', + Sending: 'SENDING', + Delivered: 'DELIVERED', + Failed: 'FAILED' +} as const; + +export type MultiChannelStatusEnum = typeof MultiChannelStatusEnum[keyof typeof MultiChannelStatusEnum]; + + + diff --git a/models/priority-enum.ts b/models/priority-enum.ts index 900fe68..c478608 100644 --- a/models/priority-enum.ts +++ b/models/priority-enum.ts @@ -15,7 +15,7 @@ /** - * The priority specified by the user. Not supported on MMS. + * The priority specified by the user. * @export * @enum {string} */ diff --git a/models/rbm-action-base.ts b/models/rbm-action-base.ts new file mode 100644 index 0000000..61585de --- /dev/null +++ b/models/rbm-action-base.ts @@ -0,0 +1,47 @@ +/* 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 { RbmActionTypeEnum } from './rbm-action-type-enum'; + +/** + * + * @export + * @interface RbmActionBase + */ +export interface RbmActionBase { + /** + * + * @type {RbmActionTypeEnum} + * @memberof RbmActionBase + */ + 'type': RbmActionTypeEnum; + /** + * Displayed text for user to click + * @type {string} + * @memberof RbmActionBase + */ + 'text': string; + /** + * Base64 payload the customer receives when the reply is clicked. + * @type {string} + * @memberof RbmActionBase + */ + 'postBackData': string; +} + + + diff --git a/models/rbm-action-dial.ts b/models/rbm-action-dial.ts new file mode 100644 index 0000000..4105867 --- /dev/null +++ b/models/rbm-action-dial.ts @@ -0,0 +1,29 @@ +/* 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 { RbmActionBase } from './rbm-action-base'; +// May contain unused imports in some cases +// @ts-ignore +import type { RbmActionTypeEnum } from './rbm-action-type-enum'; + +/** + * @type RbmActionDial + * @export + */ +export type RbmActionDial = RbmActionBase; + + diff --git a/models/rbm-action-open-url.ts b/models/rbm-action-open-url.ts new file mode 100644 index 0000000..70743c0 --- /dev/null +++ b/models/rbm-action-open-url.ts @@ -0,0 +1,29 @@ +/* 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 { RbmActionBase } from './rbm-action-base'; +// May contain unused imports in some cases +// @ts-ignore +import type { RbmActionTypeEnum } from './rbm-action-type-enum'; + +/** + * @type RbmActionOpenUrl + * @export + */ +export type RbmActionOpenUrl = RbmActionBase; + + diff --git a/models/rbm-action-type-enum.ts b/models/rbm-action-type-enum.ts new file mode 100644 index 0000000..431cf0a --- /dev/null +++ b/models/rbm-action-type-enum.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 + * @enum {string} + */ + +export const RbmActionTypeEnum = { + Reply: 'REPLY', + DialPhone: 'DIAL_PHONE', + ShowLocation: 'SHOW_LOCATION', + CreateCalendarEvent: 'CREATE_CALENDAR_EVENT', + OpenUrl: 'OPEN_URL', + RequestLocation: 'REQUEST_LOCATION' +} as const; + +export type RbmActionTypeEnum = typeof RbmActionTypeEnum[keyof typeof RbmActionTypeEnum]; + + + diff --git a/models/rbm-action-view-location.ts b/models/rbm-action-view-location.ts new file mode 100644 index 0000000..d33417c --- /dev/null +++ b/models/rbm-action-view-location.ts @@ -0,0 +1,29 @@ +/* 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 { RbmActionBase } from './rbm-action-base'; +// May contain unused imports in some cases +// @ts-ignore +import type { RbmActionTypeEnum } from './rbm-action-type-enum'; + +/** + * @type RbmActionViewLocation + * @export + */ +export type RbmActionViewLocation = RbmActionBase; + + diff --git a/models/rbm-card-content-media.ts b/models/rbm-card-content-media.ts new file mode 100644 index 0000000..246fba3 --- /dev/null +++ b/models/rbm-card-content-media.ts @@ -0,0 +1,29 @@ +/* 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 { RbmMediaHeightEnum } from './rbm-media-height-enum'; +// May contain unused imports in some cases +// @ts-ignore +import type { RbmMessageContentFile } from './rbm-message-content-file'; + +/** + * @type RbmCardContentMedia + * @export + */ +export type RbmCardContentMedia = RbmMessageContentFile; + + diff --git a/models/rbm-card-content.ts b/models/rbm-card-content.ts new file mode 100644 index 0000000..4170f5b --- /dev/null +++ b/models/rbm-card-content.ts @@ -0,0 +1,54 @@ +/* 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 { MultiChannelAction } from './multi-channel-action'; +// May contain unused imports in some cases +// @ts-ignore +import type { RbmCardContentMedia } from './rbm-card-content-media'; + +/** + * + * @export + * @interface RbmCardContent + */ +export interface RbmCardContent { + /** + * The title of the card. Must be 200 characters or less. + * @type {string} + * @memberof RbmCardContent + */ + 'title'?: string; + /** + * The description of the card. Must be 2000 characters or less. + * @type {string} + * @memberof RbmCardContent + */ + 'description'?: string; + /** + * + * @type {RbmCardContentMedia} + * @memberof RbmCardContent + */ + 'media'?: RbmCardContentMedia; + /** + * An array of suggested actions for the recipient that will be displayed on the rich card. + * @type {Array} + * @memberof RbmCardContent + */ + 'suggestions'?: Array; +} + diff --git a/models/rbm-media-height-enum.ts b/models/rbm-media-height-enum.ts new file mode 100644 index 0000000..e82e6c6 --- /dev/null +++ b/models/rbm-media-height-enum.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + + +/** + * The height of the media. + * @export + * @enum {string} + */ + +export const RbmMediaHeightEnum = { + Short: 'SHORT', + Medium: 'MEDIUM', + Tall: 'TALL' +} as const; + +export type RbmMediaHeightEnum = typeof RbmMediaHeightEnum[keyof typeof RbmMediaHeightEnum]; + + + diff --git a/models/rbm-message-carousel-card.ts b/models/rbm-message-carousel-card.ts new file mode 100644 index 0000000..a09a725 --- /dev/null +++ b/models/rbm-message-carousel-card.ts @@ -0,0 +1,53 @@ +/* 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 { CardWidthEnum } from './card-width-enum'; +// May contain unused imports in some cases +// @ts-ignore +import type { MultiChannelAction } from './multi-channel-action'; +// May contain unused imports in some cases +// @ts-ignore +import type { RbmCardContent } from './rbm-card-content'; + +/** + * + * @export + * @interface RbmMessageCarouselCard + */ +export interface RbmMessageCarouselCard { + /** + * + * @type {CardWidthEnum} + * @memberof RbmMessageCarouselCard + */ + 'cardWidth': CardWidthEnum; + /** + * + * @type {Array} + * @memberof RbmMessageCarouselCard + */ + 'cardContents': Array; + /** + * An array of suggested actions for the recipient. + * @type {Array} + * @memberof RbmMessageCarouselCard + */ + 'suggestions'?: Array; +} + + + diff --git a/models/rbm-message-content-file.ts b/models/rbm-message-content-file.ts new file mode 100644 index 0000000..cbf3acf --- /dev/null +++ b/models/rbm-message-content-file.ts @@ -0,0 +1,36 @@ +/* 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 RbmMessageContentFile + */ +export interface RbmMessageContentFile { + /** + * The URL of the media file. 100MB is the maximum file size. + * @type {string} + * @memberof RbmMessageContentFile + */ + 'fileUrl': string; + /** + * The URL of the thumbnail image. Applies only to video file media. + * @type {string} + * @memberof RbmMessageContentFile + */ + 'thumbnailUrl'?: string; +} + diff --git a/models/rbm-message-content-rich-card.ts b/models/rbm-message-content-rich-card.ts new file mode 100644 index 0000000..17469d8 --- /dev/null +++ b/models/rbm-message-content-rich-card.ts @@ -0,0 +1,44 @@ +/* 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 { CardWidthEnum } from './card-width-enum'; +// May contain unused imports in some cases +// @ts-ignore +import type { MultiChannelAction } from './multi-channel-action'; +// May contain unused imports in some cases +// @ts-ignore +import type { RbmCardContent } from './rbm-card-content'; +// May contain unused imports in some cases +// @ts-ignore +import type { RbmMessageCarouselCard } from './rbm-message-carousel-card'; +// May contain unused imports in some cases +// @ts-ignore +import type { RbmStandaloneCard } from './rbm-standalone-card'; +// May contain unused imports in some cases +// @ts-ignore +import type { StandaloneCardOrientationEnum } from './standalone-card-orientation-enum'; +// May contain unused imports in some cases +// @ts-ignore +import type { ThumbnailAlignmentEnum } from './thumbnail-alignment-enum'; + +/** + * @type RbmMessageContentRichCard + * @export + */ +export type RbmMessageContentRichCard = RbmMessageCarouselCard | RbmStandaloneCard; + + diff --git a/models/rbm-message-content-text.ts b/models/rbm-message-content-text.ts new file mode 100644 index 0000000..4c43a6c --- /dev/null +++ b/models/rbm-message-content-text.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 { MultiChannelAction } from './multi-channel-action'; + +/** + * + * @export + * @interface RbmMessageContentText + */ +export interface RbmMessageContentText { + /** + * The text associated with the message. Must be 3270 characters or less + * @type {string} + * @memberof RbmMessageContentText + */ + 'text': string; + /** + * An array of suggested actions for the recipient. + * @type {Array} + * @memberof RbmMessageContentText + */ + 'suggestions'?: Array; +} + diff --git a/models/rbm-message-media.ts b/models/rbm-message-media.ts new file mode 100644 index 0000000..218b180 --- /dev/null +++ b/models/rbm-message-media.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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { MultiChannelAction } from './multi-channel-action'; +// May contain unused imports in some cases +// @ts-ignore +import type { RbmMessageContentFile } from './rbm-message-content-file'; + +/** + * + * @export + * @interface RbmMessageMedia + */ +export interface RbmMessageMedia { + /** + * + * @type {RbmMessageContentFile} + * @memberof RbmMessageMedia + */ + 'media': RbmMessageContentFile; + /** + * An array of suggested actions for the recipient. + * @type {Array} + * @memberof RbmMessageMedia + */ + 'suggestions'?: Array; +} + diff --git a/models/rbm-standalone-card.ts b/models/rbm-standalone-card.ts new file mode 100644 index 0000000..eda7533 --- /dev/null +++ b/models/rbm-standalone-card.ts @@ -0,0 +1,62 @@ +/* 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 { MultiChannelAction } from './multi-channel-action'; +// May contain unused imports in some cases +// @ts-ignore +import type { RbmCardContent } from './rbm-card-content'; +// May contain unused imports in some cases +// @ts-ignore +import type { StandaloneCardOrientationEnum } from './standalone-card-orientation-enum'; +// May contain unused imports in some cases +// @ts-ignore +import type { ThumbnailAlignmentEnum } from './thumbnail-alignment-enum'; + +/** + * + * @export + * @interface RbmStandaloneCard + */ +export interface RbmStandaloneCard { + /** + * + * @type {StandaloneCardOrientationEnum} + * @memberof RbmStandaloneCard + */ + 'orientation': StandaloneCardOrientationEnum; + /** + * + * @type {ThumbnailAlignmentEnum} + * @memberof RbmStandaloneCard + */ + 'thumbnailImageAlignment': ThumbnailAlignmentEnum; + /** + * + * @type {RbmCardContent} + * @memberof RbmStandaloneCard + */ + 'cardContent': RbmCardContent; + /** + * An array of suggested actions for the recipient. + * @type {Array} + * @memberof RbmStandaloneCard + */ + 'suggestions'?: Array; +} + + + diff --git a/models/sms-message-content.ts b/models/sms-message-content.ts new file mode 100644 index 0000000..5d3cad8 --- /dev/null +++ b/models/sms-message-content.ts @@ -0,0 +1,30 @@ +/* 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 SmsMessageContent + */ +export interface SmsMessageContent { + /** + * The contents of the text message. Must be 2048 characters or less. + * @type {string} + * @memberof SmsMessageContent + */ + 'text': string; +} + diff --git a/models/standalone-card-orientation-enum.ts b/models/standalone-card-orientation-enum.ts new file mode 100644 index 0000000..25fa274 --- /dev/null +++ b/models/standalone-card-orientation-enum.ts @@ -0,0 +1,31 @@ +/* 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 + * @enum {string} + */ + +export const StandaloneCardOrientationEnum = { + Horizontal: 'HORIZONTAL', + Vertical: 'VERTICAL' +} as const; + +export type StandaloneCardOrientationEnum = typeof StandaloneCardOrientationEnum[keyof typeof StandaloneCardOrientationEnum]; + + + diff --git a/models/thumbnail-alignment-enum.ts b/models/thumbnail-alignment-enum.ts new file mode 100644 index 0000000..784d7b9 --- /dev/null +++ b/models/thumbnail-alignment-enum.ts @@ -0,0 +1,31 @@ +/* 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. + */ + + + +/** + * The alignment of the thumbnail image in the card. Only applicable if the card using horizontal orientation. + * @export + * @enum {string} + */ + +export const ThumbnailAlignmentEnum = { + Left: 'LEFT', + Right: 'RIGHT' +} as const; + +export type ThumbnailAlignmentEnum = typeof ThumbnailAlignmentEnum[keyof typeof ThumbnailAlignmentEnum]; + + + diff --git a/tests/smoke/conferences-api.test.ts b/tests/smoke/conferences-api.test.ts index 7022ea8..4741025 100644 --- a/tests/smoke/conferences-api.test.ts +++ b/tests/smoke/conferences-api.test.ts @@ -90,7 +90,7 @@ describe('ConferencesApi', () => { }); describe('updateConferenceBxml', () => { - test('should update conference bxml', async () => { + test.skip('should update conference bxml', async () => { // PV Issue const updateBxml = 'This should be a conference recording.'; const { status } = @@ -116,7 +116,7 @@ describe('ConferencesApi', () => { }); describe('listConferenceRecordings', () => { - test('should list conference recordings', async () => { + test.skip('should list conference recordings', async () => { // PV Issue const { status, data } = await conferencesApi.listConferenceRecordings(BW_ACCOUNT_ID, conferenceId); expect(status).toEqual(200); @@ -133,7 +133,7 @@ describe('ConferencesApi', () => { }); describe('getConferenceRecording', () => { - test('should get conference recording', async () => { + test.skip('should get conference recording', async () => { // PV Issue const { status, data } = await conferencesApi.getConferenceRecording(BW_ACCOUNT_ID, conferenceId, recordingId); expect(status).toEqual(200); @@ -147,7 +147,7 @@ describe('ConferencesApi', () => { }); describe('downloadConferenceRecording', () => { - test('should download conference recording', async () => { + test.skip('should download conference recording', async () => { // PV Issue const { status, data } = await conferencesApi.downloadConferenceRecording(BW_ACCOUNT_ID, conferenceId, recordingId); expect(status).toEqual(200); diff --git a/tests/smoke/multi-channel-api.test.ts b/tests/smoke/multi-channel-api.test.ts new file mode 100644 index 0000000..26f586a --- /dev/null +++ b/tests/smoke/multi-channel-api.test.ts @@ -0,0 +1,44 @@ +//@ts-nocheck +import { MultiChannelApi } from '../../api'; +import { Configuration } from '../../configuration'; +import { + MultiChannelChannelListObject, + MultiChannelMessageChannelEnum, + PriorityEnum, + RbmMessageContentText +} from '../../models'; + +describe('MultiChannelApi', () => { + const config = new Configuration({ + username: BW_USERNAME, + password: BW_PASSWORD + }); + const multiChannelApi = new MultiChannelApi(config); + + const expirationTime = Date.now() + 1000 * 60 * 60 * 24 + 60; + const expiration = new Date(expirationTime).toISOString(); + + describe('createMultiChannelMessage', () => { + test('should create a multi-channel message', async () => { + const channelListObject: MultiChannelChannelListObject = { + from: BW_NUMBER, + applicationId: BW_MESSAGING_APPLICATION_ID, + channel: MultiChannelMessageChannelEnum.Rbm, + content: { + text: "Hello World!" + } + }; + + const multiChannelMessageRequest: MultiChannelMessageRequest = { + to: USER_NUMBER, + tag: "tag", + priority: PriorityEnum.HIGH, + channelList: [channelListObject], + expiration, + }; + + const { status, data } = await multiChannelApi.createMultiChannelMessage(BW_ACCOUNT_ID, multiChannelMessageRequest); + expect(status).toEqual(202); + }); + }); +}); diff --git a/tests/smoke/transcriptions-api.test.ts b/tests/smoke/transcriptions-api.test.ts index 4a6e29c..9f1e8bd 100644 --- a/tests/smoke/transcriptions-api.test.ts +++ b/tests/smoke/transcriptions-api.test.ts @@ -77,7 +77,7 @@ describe('TranscriptionsApi', () => { }); describe('deleteRealTimeTranscription', () => { - test('should delete call transcription', async () => { + test.skip('should delete call transcription', async () => { // PV Issue const { status } = await transcriptionsApi.deleteRealTimeTranscription(BW_ACCOUNT_ID, mantecaCallId, transcriptionId); expect(status).toEqual(200); // This is a bug in the API, it should return 204. VAPI-1863 should fix this. diff --git a/tests/unit/api/multi-channel-api.test.ts b/tests/unit/api/multi-channel-api.test.ts new file mode 100644 index 0000000..cd6310e --- /dev/null +++ b/tests/unit/api/multi-channel-api.test.ts @@ -0,0 +1,45 @@ +//@ts-nocheck +import { MultiChannelApi } from '../../../api'; +import { Configuration } from '../../../configuration'; +import { + MultiChannelChannelListObject, + MultiChannelMessageChannelEnum, + PriorityEnum, + RbmMessageContentText +} from '../../../models'; + +describe('MultiChannelApi', () => { + const config = new Configuration({ + username: BW_USERNAME, + password: BW_PASSWORD, + basePath: 'http://127.0.0.1:4010' + }); + const multiChannelApi = new MultiChannelApi(config); + + const expirationTime = Date.now() + 1000 * 60 * 60 * 24 + 60; + const expiration = new Date(expirationTime).toISOString(); + + describe('createMultiChannelMessage', () => { + test.skip('should create a multi-channel message', async () => { // skip because prism can't handle a oneOf with differing required fields + const channelListObject: MultiChannelChannelListObject = { + from: BW_NUMBER, + applicationId: BW_MESSAGING_APPLICATION_ID, + channel: MultiChannelMessageChannelEnum.Rbm, + content: { + text: "Hello World!" + } + }; + + const multiChannelMessageRequest: MultiChannelMessageRequest = { + to: USER_NUMBER, + tag: "tag", + priority: PriorityEnum.HIGH, + expiration, + }; + + const { status, data } = await multiChannelApi.createMultiChannelMessage(BW_ACCOUNT_ID, multiChannelMessageRequest); + + expect(status).toEqual(202); + }); + }); +}); diff --git a/tests/unit/models/card-width-enum.test.ts b/tests/unit/models/card-width-enum.test.ts new file mode 100644 index 0000000..df7e9e9 --- /dev/null +++ b/tests/unit/models/card-width-enum.test.ts @@ -0,0 +1,8 @@ +import { CardWidthEnum } from '../../../models/card-width-enum'; + +describe('CardWidthEnum', () => { + test('should define the expected values', () => { + expect(CardWidthEnum.Small).toBe('SMALL'); + expect(CardWidthEnum.Medium).toBe('MEDIUM'); + }); +}); diff --git a/tests/unit/models/multi-channel-message-channel-enum.test.ts b/tests/unit/models/multi-channel-message-channel-enum.test.ts new file mode 100644 index 0000000..03cc427 --- /dev/null +++ b/tests/unit/models/multi-channel-message-channel-enum.test.ts @@ -0,0 +1,9 @@ +import { MultiChannelMessageChannelEnum } from '../../../models/multi-channel-message-channel-enum'; + +describe('MultiChannelMessageChannelEnum', () => { + test('should define the expected values', () => { + expect(MultiChannelMessageChannelEnum.Rbm).toBe('RBM'); + expect(MultiChannelMessageChannelEnum.Sms).toBe('SMS'); + expect(MultiChannelMessageChannelEnum.Mms).toBe('MMS'); + }); +}); diff --git a/tests/unit/models/multi-channel-message-direction-enum.test.ts b/tests/unit/models/multi-channel-message-direction-enum.test.ts new file mode 100644 index 0000000..3c758df --- /dev/null +++ b/tests/unit/models/multi-channel-message-direction-enum.test.ts @@ -0,0 +1,8 @@ +import { MultiChannelMessageDirectionEnum } from '../../../models/multi-channel-message-direction-enum'; + +describe('MultiChannelMessageDirectionEnum', () => { + test('should define the expected values', () => { + expect(MultiChannelMessageDirectionEnum.Inbound).toBe('INBOUND'); + expect(MultiChannelMessageDirectionEnum.Outbound).toBe('OUTBOUND'); + }); +}); diff --git a/tests/unit/models/multi-channel-status-enum.test.ts b/tests/unit/models/multi-channel-status-enum.test.ts new file mode 100644 index 0000000..23d70df --- /dev/null +++ b/tests/unit/models/multi-channel-status-enum.test.ts @@ -0,0 +1,10 @@ +import { MultiChannelStatusEnum } from '../../../models/multi-channel-status-enum'; + +describe('MultiChannelStatusEnum', () => { + test('should define the expected values', () => { + expect(MultiChannelStatusEnum.Queued).toBe('QUEUED'); + expect(MultiChannelStatusEnum.Sending).toBe('SENDING'); + expect(MultiChannelStatusEnum.Delivered).toBe('DELIVERED'); + expect(MultiChannelStatusEnum.Failed).toBe('FAILED'); + }); +}); diff --git a/tests/unit/models/rbm-action-type-enum.test.ts b/tests/unit/models/rbm-action-type-enum.test.ts new file mode 100644 index 0000000..f393869 --- /dev/null +++ b/tests/unit/models/rbm-action-type-enum.test.ts @@ -0,0 +1,12 @@ +import { RbmActionTypeEnum } from '../../../models/rbm-action-type-enum'; + +describe('RbmActionTypeEnum', () => { + test('should define the expected values', () => { + expect(RbmActionTypeEnum.Reply).toBe('REPLY'); + expect(RbmActionTypeEnum.DialPhone).toBe('DIAL_PHONE'); + expect(RbmActionTypeEnum.ShowLocation).toBe('SHOW_LOCATION'); + expect(RbmActionTypeEnum.CreateCalendarEvent).toBe('CREATE_CALENDAR_EVENT'); + expect(RbmActionTypeEnum.OpenUrl).toBe('OPEN_URL'); + expect(RbmActionTypeEnum.RequestLocation).toBe('REQUEST_LOCATION'); + }); +}); diff --git a/tests/unit/models/rbm-media-height-enum.test.ts b/tests/unit/models/rbm-media-height-enum.test.ts new file mode 100644 index 0000000..54c707b --- /dev/null +++ b/tests/unit/models/rbm-media-height-enum.test.ts @@ -0,0 +1,9 @@ +import { RbmMediaHeightEnum } from '../../../models/rbm-media-height-enum'; + +describe('RbmMediaHeightEnum', () => { + test('should define the expected values', () => { + expect(RbmMediaHeightEnum.Short).toBe('SHORT'); + expect(RbmMediaHeightEnum.Medium).toBe('MEDIUM'); + expect(RbmMediaHeightEnum.Tall).toBe('TALL'); + }); +}); diff --git a/tests/unit/models/standalone-card-orientation-enum.test.ts b/tests/unit/models/standalone-card-orientation-enum.test.ts new file mode 100644 index 0000000..ec73044 --- /dev/null +++ b/tests/unit/models/standalone-card-orientation-enum.test.ts @@ -0,0 +1,8 @@ +import { StandaloneCardOrientationEnum } from '../../../models/standalone-card-orientation-enum'; + +describe('StandaloneCardOrientationEnum', () => { + test('should define the expected values', () => { + expect(StandaloneCardOrientationEnum.Horizontal).toBe('HORIZONTAL'); + expect(StandaloneCardOrientationEnum.Vertical).toBe('VERTICAL'); + }); +}); diff --git a/tests/unit/models/thumbnail-alignment-enum.test.ts b/tests/unit/models/thumbnail-alignment-enum.test.ts new file mode 100644 index 0000000..312c164 --- /dev/null +++ b/tests/unit/models/thumbnail-alignment-enum.test.ts @@ -0,0 +1,7 @@ +import { ThumbnailAlignmentEnum } from '../../../models/thumbnail-alignment-enum'; +describe('ThumbnailAlignmentEnum', () => { + test('should define the expected values', () => { + expect(ThumbnailAlignmentEnum.Left).toBe('LEFT'); + expect(ThumbnailAlignmentEnum.Right).toBe('RIGHT'); + }); +});