Skip to content

Commit

Permalink
Fix conflicting names
Browse files Browse the repository at this point in the history
  • Loading branch information
asein-sinch committed Mar 22, 2024
1 parent cad4cd6 commit 8fe154e
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 27 deletions.
4 changes: 2 additions & 2 deletions examples/simple-examples/src/sms/batches/sendBinaryMessage.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SendBinaryMessageRequestData, textToHex } from '@sinch/sdk-core';
import { SendBinarySMSRequestData, textToHex } from '@sinch/sdk-core';
import {
getPhoneNumberFromConfig,
getPrintFormat,
Expand All @@ -15,7 +15,7 @@ import {
const recipientPhoneNumber = getRecipientPhoneNumberFromConfig();
const senderPhoneNumber = getPhoneNumberFromConfig();

const requestData: SendBinaryMessageRequestData = {
const requestData: SendBinarySMSRequestData = {
sendSMSRequestBody: {
type: 'mt_binary',
to: [
Expand Down
4 changes: 2 additions & 2 deletions examples/simple-examples/src/sms/batches/sendMediaMessage.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SendMediaMessageRequestData } from '@sinch/sdk-core';
import { SendMediaSMSRequestData } from '@sinch/sdk-core';
import {
getPhoneNumberFromConfig,
getPrintFormat,
Expand All @@ -15,7 +15,7 @@ import {
const recipientPhoneNumber = getRecipientPhoneNumberFromConfig();
const senderPhoneNumber = getPhoneNumberFromConfig();

const requestData: SendMediaMessageRequestData = {
const requestData: SendMediaSMSRequestData = {
sendSMSRequestBody: {
type: 'mt_media',
to: [
Expand Down
4 changes: 2 additions & 2 deletions examples/simple-examples/src/sms/batches/sendTextMessage.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SendTextMessageRequestData } from '@sinch/sdk-core';
import { SendTextSMSRequestData } from '@sinch/sdk-core';
import {
getPhoneNumberFromConfig,
getPrintFormat,
Expand All @@ -15,7 +15,7 @@ import {
const recipientPhoneNumber = getRecipientPhoneNumberFromConfig();
const senderPhoneNumber = getPhoneNumberFromConfig();

const requestData: SendTextMessageRequestData = {
const requestData: SendTextSMSRequestData = {
sendSMSRequestBody: {
type: 'mt_text',
to: [
Expand Down
12 changes: 6 additions & 6 deletions packages/sms/src/rest/v1/batches/batches-api.jest.fixture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -48,15 +48,15 @@ export class BatchesApiFixture implements Partial<Readonly<BatchesApi>> {
/**
* Fixture associated to function sendTextMessage
*/
public sendTextMessage: jest.Mock<Promise<TextResponse>, [SendTextMessageRequestData]> = jest.fn();
public sendTextMessage: jest.Mock<Promise<TextResponse>, [SendTextSMSRequestData]> = jest.fn();
/**
* Fixture associated to function send
*/
public sendBinaryMessage: jest.Mock<Promise<BinaryResponse>, [SendBinaryMessageRequestData]> = jest.fn();
public sendBinaryMessage: jest.Mock<Promise<BinaryResponse>, [SendBinarySMSRequestData]> = jest.fn();
/**
* Fixture associated to function send
*/
public sendMediaMessage: jest.Mock<Promise<MediaResponse>, [SendMediaMessageRequestData]> = jest.fn();
public sendMediaMessage: jest.Mock<Promise<MediaResponse>, [SendMediaSMSRequestData]> = jest.fn();
/**
* Fixture associated to function update
*/
Expand Down
18 changes: 9 additions & 9 deletions packages/sms/src/rest/v1/batches/batches-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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<TextResponse> {
public async sendTextMessage(data: SendTextSMSRequestData): Promise<TextResponse> {
const response = await this.send(data);
return response as TextResponse;
}
Expand All @@ -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<BinaryResponse> {
public async sendBinaryMessage(data: SendBinarySMSRequestData): Promise<BinaryResponse> {
const response = await this.send(data);
return response as BinaryResponse;
}
Expand All @@ -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<MediaResponse> {
public async sendMediaMessage(data: SendMediaSMSRequestData): Promise<MediaResponse> {
const response = await this.send(data);
return response as MediaResponse;
}
Expand Down
12 changes: 6 additions & 6 deletions packages/sms/tests/rest/v1/batches/batches-api.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ import {
SendSMSRequestData,
SendSMSResponse,
UpdateBatchMessageRequestData,
SendTextMessageRequestData,
SendTextSMSRequestData,
TextResponse,
SendMediaMessageRequestData,
SendMediaSMSRequestData,
MediaResponse,
SendBinaryMessageRequestData,
SendBinarySMSRequestData,
BinaryResponse,
} from '../../../../src';

Expand Down Expand Up @@ -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: [
Expand Down Expand Up @@ -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: [
Expand Down Expand Up @@ -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: [
Expand Down

0 comments on commit 8fe154e

Please sign in to comment.