Skip to content

Commit

Permalink
Merge pull request #298 from plivo/VT-5519
Browse files Browse the repository at this point in the history
Added new recording params and filter
  • Loading branch information
abhishekGupta-Plivo authored May 31, 2023
2 parents 9b87a88 + 85b71c3 commit ea0c80e
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 2 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## [v4.47.0](https://github.com/plivo/plivo-node/tree/v4.47.0) (2023-05-29)
- Added `monthly_recording_storage_amount`, `recording_storage_rate`, `rounded_recording_duration`, and `recording_storage_duration` parameters to the response for [get single recording API](https://www.plivo.com/docs/voice/api/recording#retrieve-a-recording) and [get all recordings API](https://www.plivo.com/docs/voice/api/recording#list-all-recordings)
- Added `recording_storage_duration` parameter as a filter option for [get all recordings API](https://www.plivo.com/docs/voice/api/recording#list-all-recordings)

## [v4.46.1](https://github.com/plivo/plivo-node/tree/v4.46.1) (2023-05-08)
**Chore - Bump xml2js from 0.4.19 to 0.5.0**
- Resolves [xml2js is vulnerable to prototype pollution](https://github.com/advisories/GHSA-776f-qx25-q3cc)
Expand Down Expand Up @@ -35,7 +39,6 @@
**Feature - Enhance MDR filtering capabilities **
- Added new fields on MDR object response


## [v4.39.0](https://github.com/plivo/plivo-node/tree/v4.39.0) (2022-01-25)
**Feature - Added New Param(requesterIP) in Get Message and List Mssage APIs**
- Add `requesterIP` 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)
Expand Down
9 changes: 9 additions & 0 deletions lib/resources/recordings.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ export class RetrieveRecordingResponse {
this.resourceUri = params.resourceUri;
this.fromNumber = params.fromNumber;
this.toNumber = params.toNumber;
this.monthlyRecordingStorageAmount = params.monthlyRecordingStorageAmount;
this.roundedRecordingDuration = params.roundedRecordingDuration;
this.recordingStorageDuration = params.recordingStorageDuration;
this.recordingStorageRate = params.recordingStorageRate;
}
}

Expand All @@ -52,6 +56,10 @@ export class ListRecordingResponse {
this.mpcName = params.mpcName;
this.conferenceUuid = params.conferenceUuid;
this.mpcUuid = params.mpcUuid;
this.monthlyRecordingStorageAmount = params.monthlyRecordingStorageAmount;
this.roundedRecordingDuration = params.roundedRecordingDuration;
this.recordingStorageDuration = params.recordingStorageDuration;
this.recordingStorageRate = params.recordingStorageRate;
}
}

Expand Down Expand Up @@ -156,6 +164,7 @@ export class RecordingInterface extends PlivoResourceInterface {
* @param {string} [params.addTime] - Filter based on the timings they were added
* @param {string} [params.limit] - Display no of results per page
* @param {string} [params.offset] - No of value items by which results should be offset
* @param {string} [params.recordingStorageDuration] - Filter based on how old the recordings are
*/
list(params = {}) {
params.isVoiceRequest = 'true';
Expand Down
2 changes: 2 additions & 0 deletions lib/rest/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ export function camelCaseRequestWrapper(requestFunc) {
'add_time__lt', 'add_time__lte',
'renewal_date__gte','renewal_date__gt',
'renewal_date__lte','renewal_date__lt',
'recording_storage_duration__gt', 'recording_storage_duration__gte',
'recording_storage_duration__lt', 'recording_storage_duration__lte'
]
if (skipParamsFromSnakeCasing.indexOf(key) >= 0) {
return key;
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.46.1",
"version": "4.47.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
10 changes: 10 additions & 0 deletions types/resources/recordings.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ export class RetrieveRecordingResponse {
resourceUri: string;
fromNumber: string;
toNumber: string;
monthlyRecordingStorageAmount: string;
roundedRecordingDuration: string;
recordingStorageDuration: string;
recordingStorageRate: string;
}
export class ListRecordingResponse {
constructor(params: object);
Expand All @@ -34,6 +38,11 @@ export class ListRecordingResponse {
conferenceUuid: string;
mpcName: string;
mpcUuid: string;
monthlyRecordingStorageAmount: string;
roundedRecordingDuration: string;
recordingStorageDuration: string;
recordingStorageRate: string;

}
/**
* Represents a Recording
Expand Down Expand Up @@ -80,6 +89,7 @@ export class RecordingInterface extends PlivoResourceInterface {
* @param {string} [params.addTime] - Filter based on the timings they were added
* @param {string} [params.limit] - Display no of results per page
* @param {string} [params.offset] - No of value items by which results should be offset
* @param {string} [params.recordingStorageDuration] - Filter based on how old the recordings are
*/
list(params?: {}): Promise<ListRecordingResponse>;
}
Expand Down

0 comments on commit ea0c80e

Please sign in to comment.