diff --git a/examples/simple-examples/src/sms/batches/sendBinaryMessage.ts b/examples/simple-examples/src/sms/batches/sendBinaryMessage.ts index d86a953f..d0b3f5b5 100644 --- a/examples/simple-examples/src/sms/batches/sendBinaryMessage.ts +++ b/examples/simple-examples/src/sms/batches/sendBinaryMessage.ts @@ -1,4 +1,4 @@ -import { SendBinaryMessageRequestData, textToHex } from '@sinch/sdk-core'; +import { SendBinarySMSRequestData, textToHex } from '@sinch/sdk-core'; import { getPhoneNumberFromConfig, getPrintFormat, @@ -15,7 +15,7 @@ import { const recipientPhoneNumber = getRecipientPhoneNumberFromConfig(); const senderPhoneNumber = getPhoneNumberFromConfig(); - const requestData: SendBinaryMessageRequestData = { + const requestData: SendBinarySMSRequestData = { sendSMSRequestBody: { type: 'mt_binary', to: [ diff --git a/examples/simple-examples/src/sms/batches/sendMediaMessage.ts b/examples/simple-examples/src/sms/batches/sendMediaMessage.ts index 667a3f54..5ec6cca8 100644 --- a/examples/simple-examples/src/sms/batches/sendMediaMessage.ts +++ b/examples/simple-examples/src/sms/batches/sendMediaMessage.ts @@ -1,4 +1,4 @@ -import { SendMediaMessageRequestData } from '@sinch/sdk-core'; +import { SendMediaSMSRequestData } from '@sinch/sdk-core'; import { getPhoneNumberFromConfig, getPrintFormat, @@ -15,7 +15,7 @@ import { const recipientPhoneNumber = getRecipientPhoneNumberFromConfig(); const senderPhoneNumber = getPhoneNumberFromConfig(); - const requestData: SendMediaMessageRequestData = { + const requestData: SendMediaSMSRequestData = { sendSMSRequestBody: { type: 'mt_media', to: [ diff --git a/examples/simple-examples/src/sms/batches/sendTextMessage.ts b/examples/simple-examples/src/sms/batches/sendTextMessage.ts index a99052e1..f7ebbd18 100644 --- a/examples/simple-examples/src/sms/batches/sendTextMessage.ts +++ b/examples/simple-examples/src/sms/batches/sendTextMessage.ts @@ -1,4 +1,4 @@ -import { SendTextMessageRequestData } from '@sinch/sdk-core'; +import { SendTextSMSRequestData } from '@sinch/sdk-core'; import { getPhoneNumberFromConfig, getPrintFormat, @@ -15,7 +15,7 @@ import { const recipientPhoneNumber = getRecipientPhoneNumberFromConfig(); const senderPhoneNumber = getPhoneNumberFromConfig(); - const requestData: SendTextMessageRequestData = { + const requestData: SendTextSMSRequestData = { sendSMSRequestBody: { type: 'mt_text', to: [ diff --git a/packages/sms/src/rest/v1/batches/batches-api.jest.fixture.ts b/packages/sms/src/rest/v1/batches/batches-api.jest.fixture.ts index c53479c2..85cdcdd0 100644 --- a/packages/sms/src/rest/v1/batches/batches-api.jest.fixture.ts +++ b/packages/sms/src/rest/v1/batches/batches-api.jest.fixture.ts @@ -6,10 +6,10 @@ import { GetBatchMessageRequestData, ListBatchesRequestData, ReplaceBatchMessageRequestData, - SendBinaryMessageRequestData, - SendMediaMessageRequestData, + SendBinarySMSRequestData, + SendMediaSMSRequestData, SendSMSRequestData, - SendTextMessageRequestData, + SendTextSMSRequestData, UpdateBatchMessageRequestData, } from './batches-api'; import { BinaryResponse, DryRunResponse, MediaResponse, SendSMSResponse, TextResponse } from '../../../models'; @@ -48,15 +48,15 @@ export class BatchesApiFixture implements Partial> { /** * Fixture associated to function sendTextMessage */ - public sendTextMessage: jest.Mock, [SendTextMessageRequestData]> = jest.fn(); + public sendTextMessage: jest.Mock, [SendTextSMSRequestData]> = jest.fn(); /** * Fixture associated to function send */ - public sendBinaryMessage: jest.Mock, [SendBinaryMessageRequestData]> = jest.fn(); + public sendBinaryMessage: jest.Mock, [SendBinarySMSRequestData]> = jest.fn(); /** * Fixture associated to function send */ - public sendMediaMessage: jest.Mock, [SendMediaMessageRequestData]> = jest.fn(); + public sendMediaMessage: jest.Mock, [SendMediaSMSRequestData]> = jest.fn(); /** * Fixture associated to function update */ diff --git a/packages/sms/src/rest/v1/batches/batches-api.ts b/packages/sms/src/rest/v1/batches/batches-api.ts index 8d4d7863..a7a9e2cf 100644 --- a/packages/sms/src/rest/v1/batches/batches-api.ts +++ b/packages/sms/src/rest/v1/batches/batches-api.ts @@ -72,13 +72,13 @@ export interface SendSMSRequestData { /** Default schema is Text if type is not specified. */ 'sendSMSRequestBody'?: SendSMSRequest; } -export interface SendTextMessageRequestData { +export interface SendTextSMSRequestData { 'sendSMSRequestBody'?: TextRequest; } -export interface SendBinaryMessageRequestData { +export interface SendBinarySMSRequestData { 'sendSMSRequestBody'?: BinaryRequest; } -export interface SendMediaMessageRequestData { +export interface SendMediaSMSRequestData { 'sendSMSRequestBody'?: MediaRequest; } export interface UpdateBatchMessageRequestData { @@ -333,9 +333,9 @@ export class BatchesApi extends SmsDomainApi { * Any groups targeted in a scheduled batch will be evaluated at the time of sending. * If a group is deleted between batch creation and scheduled date, it will be considered empty. * Be sure to use the correct region in the server URL. - * @param { SendTextMessageRequestData } data - The data to provide to the API call. + * @param { SendTextSMSRequestData } data - The data to provide to the API call. */ - public async sendTextMessage(data: SendTextMessageRequestData): Promise { + public async sendTextMessage(data: SendTextSMSRequestData): Promise { const response = await this.send(data); return response as TextResponse; } @@ -347,9 +347,9 @@ export class BatchesApi extends SmsDomainApi { * Any groups targeted in a scheduled batch will be evaluated at the time of sending. * If a group is deleted between batch creation and scheduled date, it will be considered empty. * Be sure to use the correct region in the server URL. - * @param { SendBinaryMessageRequestData } data - The data to provide to the API call. + * @param { SendBinarySMSRequestData } data - The data to provide to the API call. */ - public async sendBinaryMessage(data: SendBinaryMessageRequestData): Promise { + public async sendBinaryMessage(data: SendBinarySMSRequestData): Promise { const response = await this.send(data); return response as BinaryResponse; } @@ -361,9 +361,9 @@ export class BatchesApi extends SmsDomainApi { * Any groups targeted in a scheduled batch will be evaluated at the time of sending. * If a group is deleted between batch creation and scheduled date, it will be considered empty. * Be sure to use the correct region in the server URL. - * @param { SendMediaMessageRequestData } data - The data to provide to the API call. + * @param { SendMediaSMSRequestData } data - The data to provide to the API call. */ - public async sendMediaMessage(data: SendMediaMessageRequestData): Promise { + public async sendMediaMessage(data: SendMediaSMSRequestData): Promise { const response = await this.send(data); return response as MediaResponse; } diff --git a/packages/sms/tests/rest/v1/batches/batches-api.test.ts b/packages/sms/tests/rest/v1/batches/batches-api.test.ts index 334e18d9..37eb82c5 100644 --- a/packages/sms/tests/rest/v1/batches/batches-api.test.ts +++ b/packages/sms/tests/rest/v1/batches/batches-api.test.ts @@ -14,11 +14,11 @@ import { SendSMSRequestData, SendSMSResponse, UpdateBatchMessageRequestData, - SendTextMessageRequestData, + SendTextSMSRequestData, TextResponse, - SendMediaMessageRequestData, + SendMediaSMSRequestData, MediaResponse, - SendBinaryMessageRequestData, + SendBinarySMSRequestData, BinaryResponse, } from '../../../../src'; @@ -300,7 +300,7 @@ describe('BatchesApi', () => { it('should make a POST request to send a text message', async () => { // Given - const requestData: SendTextMessageRequestData = { + const requestData: SendTextSMSRequestData = { sendSMSRequestBody: { type: 'mt_text', to: [ @@ -337,7 +337,7 @@ describe('BatchesApi', () => { it('should make a POST request to send a binary message', async () => { // Given - const requestData: SendBinaryMessageRequestData = { + const requestData: SendBinarySMSRequestData = { sendSMSRequestBody: { type: 'mt_binary', to: [ @@ -376,7 +376,7 @@ describe('BatchesApi', () => { it('should make a POST request to send a media message', async () => { // Given - const requestData: SendMediaMessageRequestData = { + const requestData: SendMediaSMSRequestData = { sendSMSRequestBody: { type: 'mt_media', to: [