diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e8a5b9b..bafd0230 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) @@ -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) diff --git a/lib/resources/recordings.js b/lib/resources/recordings.js index 91bf16c7..0e26b73c 100644 --- a/lib/resources/recordings.js +++ b/lib/resources/recordings.js @@ -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; } } @@ -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; } } @@ -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'; diff --git a/lib/rest/utils.js b/lib/rest/utils.js index fafa95c8..d37d5720 100644 --- a/lib/rest/utils.js +++ b/lib/rest/utils.js @@ -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; diff --git a/package.json b/package.json index f86ad8c3..9624f194 100644 --- a/package.json +++ b/package.json @@ -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": [ diff --git a/types/resources/recordings.d.ts b/types/resources/recordings.d.ts index 9e291dc0..c134ab6a 100644 --- a/types/resources/recordings.d.ts +++ b/types/resources/recordings.d.ts @@ -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); @@ -34,6 +38,11 @@ export class ListRecordingResponse { conferenceUuid: string; mpcName: string; mpcUuid: string; + monthlyRecordingStorageAmount: string; + roundedRecordingDuration: string; + recordingStorageDuration: string; + recordingStorageRate: string; + } /** * Represents a Recording @@ -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; }