From 6f48ec71ae26dfe5c923f473a4fb12c0ecca1698 Mon Sep 17 00:00:00 2001 From: mohsin-plivo Date: Thu, 16 Mar 2023 14:56:03 +0530 Subject: [PATCH 1/3] SMS-5391: Add replaced_sender in MDR Get and List apis --- lib/resources/messages.js | 2 ++ types/resources/messages.d.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/lib/resources/messages.js b/lib/resources/messages.js index 64e3ed71..d2d95df7 100644 --- a/lib/resources/messages.js +++ b/lib/resources/messages.js @@ -50,6 +50,7 @@ export class MessageGetResponse { this.destinationCountryIso2 = params.destinationCountryIso2; this.requesterIP = params.requesterIp; this.isDomestic = params.isDomestic; + this.replacedSender = params.replacedSender; } } @@ -74,6 +75,7 @@ export class MessageListResponse { this.destinationCountryIso2 = params.destinationCountryIso2; this.requesterIP = params.requesterIp; this.isDomestic = params.isDomestic; + this.replacedSender = params.replacedSender; } } diff --git a/types/resources/messages.d.ts b/types/resources/messages.d.ts index 3eb29f1e..189ad510 100644 --- a/types/resources/messages.d.ts +++ b/types/resources/messages.d.ts @@ -23,6 +23,7 @@ export class MessageGetResponse { powerpackId: string; requesterIp: string; isDomestic: boolean; + replacedSender: string; } export class MessageListResponse { constructor(params: object); @@ -41,6 +42,7 @@ export class MessageListResponse { powerpackId: string; requesterIp: string; isDomestic: boolean; + replacedSender: string; } export class MMSMediaResponse { constructor(params: object); From 7f7b6c572509425437c513064f1d1b368f7d7036 Mon Sep 17 00:00:00 2001 From: mohsin-plivo Date: Thu, 20 Apr 2023 18:25:23 +0530 Subject: [PATCH 2/3] Version Bump --- CHANGELOG.md | 5 ++++- package.json | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e9021c7..4b0a8741 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # Change Log -# Change Log +## [4.45.0](https://github.com/plivo/plivo-node/tree/v4.45.0) (2023-04-25) +**Adding new attribute - 'isDomestic' in Get Message and List Message APIs** +- Add `replacedSender` to the response for the [list all messages API](https://www.plivo.com/docs/sms/api/message/list-all-messages/) and the [get message details API](https://www.plivo.com/docs/sms/api/message#retrieve-a-message) + ## [v4.44.0](https://github.com/plivo/plivo-node/tree/v4.44.0) (2023-04-11) **Feature - Added New Param 'source_ip' in GetCall and ListCalls** - Add `source_ip` to the response for the [retrieve a call details API](https://www.plivo.com/docs/voice/api/call#retrieve-a-call) and the [retreive all call details API](https://www.plivo.com/docs/voice/api/call#retrieve-all-calls) diff --git a/package.json b/package.json index 823cf57b..756aeb91 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "plivo", - "version": "4.44.0", + "version": "4.45.0", "description": "A Node.js SDK to make voice calls and send SMS using Plivo and to generate Plivo XML", "homepage": "https://github.com/plivo/plivo-node", "files": [ From a0786d9b9b51d25edbb1955b3dffa874c7e420a5 Mon Sep 17 00:00:00 2001 From: mohsin-plivo Date: Wed, 26 Apr 2023 17:21:49 +0530 Subject: [PATCH 3/3] Add api_id to list mdr response --- CHANGELOG.md | 1 + lib/resources/messages.js | 4 ++++ setup_sdk.sh | 1 + 3 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b0a8741..9d583e46 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## [4.45.0](https://github.com/plivo/plivo-node/tree/v4.45.0) (2023-04-25) **Adding new attribute - 'isDomestic' in Get Message and List Message APIs** - Add `replacedSender` to the response for the [list all messages API](https://www.plivo.com/docs/sms/api/message/list-all-messages/) and the [get message details API](https://www.plivo.com/docs/sms/api/message#retrieve-a-message) +- Add `apiId` to the response for the list all messages API ## [v4.44.0](https://github.com/plivo/plivo-node/tree/v4.44.0) (2023-04-11) **Feature - Added New Param 'source_ip' in GetCall and ListCalls** diff --git a/lib/resources/messages.js b/lib/resources/messages.js index d2d95df7..2c1d0b3f 100644 --- a/lib/resources/messages.js +++ b/lib/resources/messages.js @@ -333,6 +333,10 @@ export class MessageInterface extends PlivoResourceInterface { value: response.body.meta, enumerable: true }); + Object.defineProperty(objects, 'apiId', { + value: response.body.apiId, + enumerable: true + }) response.body.objects.forEach(item => { objects.push(new MessageListResponse(item, client)); }); diff --git a/setup_sdk.sh b/setup_sdk.sh index 67868d69..a6a9fe16 100755 --- a/setup_sdk.sh +++ b/setup_sdk.sh @@ -38,6 +38,7 @@ rm -rf package*.json node_modules npm init -y npm install $package rm $package +cd - echo -e "\n\nSDK setup complete! You can test changes either on host or inside the docker container:" echo -e "\ta. To test your changes ON HOST:"