Skip to content

Commit

Permalink
Merge pull request #295 from plivo/SMS-5391
Browse files Browse the repository at this point in the history
SMS-5391: Add replaced_sender in MDR Get and List apis
  • Loading branch information
narayana-plivo authored May 3, 2023
2 parents 26db545 + a0786d9 commit 884ff36
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 2 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# 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)
- 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**
- 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)
Expand Down
6 changes: 6 additions & 0 deletions lib/resources/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export class MessageGetResponse {
this.destinationCountryIso2 = params.destinationCountryIso2;
this.requesterIP = params.requesterIp;
this.isDomestic = params.isDomestic;
this.replacedSender = params.replacedSender;
}
}

Expand All @@ -74,6 +75,7 @@ export class MessageListResponse {
this.destinationCountryIso2 = params.destinationCountryIso2;
this.requesterIP = params.requesterIp;
this.isDomestic = params.isDomestic;
this.replacedSender = params.replacedSender;
}
}

Expand Down Expand Up @@ -331,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));
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
1 change: 1 addition & 0 deletions setup_sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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:"
Expand Down
2 changes: 2 additions & 0 deletions types/resources/messages.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export class MessageGetResponse {
powerpackId: string;
requesterIp: string;
isDomestic: boolean;
replacedSender: string;
}
export class MessageListResponse {
constructor(params: object);
Expand All @@ -41,6 +42,7 @@ export class MessageListResponse {
powerpackId: string;
requesterIp: string;
isDomestic: boolean;
replacedSender: string;
}
export class MMSMediaResponse {
constructor(params: object);
Expand Down

0 comments on commit 884ff36

Please sign in to comment.