From ac4f4ddc0dabf6e9ee76e175a0ef5b5872936de9 Mon Sep 17 00:00:00 2001 From: ajay-plivo Date: Mon, 11 Apr 2022 09:00:01 +0530 Subject: [PATCH 1/7] VT-4165:filtering added --- CHANGELOG.md | 4 ++++ lib/resources/recordings.js | 4 ++++ package.json | 2 +- types/resources/recordings.d.ts | 4 ++++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dec6dc0..c89d8ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## [v4.29.2](https://github.com/plivo/plivo-node/tree/v4.29.2) (2022-04-11) +**Features - List all recordings** +- `fromNumber` and `toNumber` added in filtering params [List all recordings](https://www.plivo.com/docs/voice/api/recording#list-all-recordings) + ## [v4.29.1](https://github.com/plivo/plivo-node/tree/v4.29.1) (2022-03-25) **Bug Fix - DialElement** - `confirmTimeout` parameter added to [The Dial element](https://www.plivo.com/docs/voice/xml/dial/) diff --git a/lib/resources/recordings.js b/lib/resources/recordings.js index f9294fe..322a646 100644 --- a/lib/resources/recordings.js +++ b/lib/resources/recordings.js @@ -27,6 +27,8 @@ export class RetrieveRecordingResponse { this.recordingType = params.recordingType; this.recordingUrl = params.recordingUrl; this.resourceUri = params.resourceUri; + this.fromNumber = params.fromNumber; + this.toNumber = params.toNumber; } } @@ -45,6 +47,8 @@ export class ListRecordingResponse { this.recordingType = params.recordingType; this.recordingUrl = params.recordingUrl; this.resourceUri = params.resourceUri; + this.fromNumber = params.fromNumber; + this.toNumber = params.toNumber; } } diff --git a/package.json b/package.json index 5614564..fb9099f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "plivo", - "version": "4.29.1", + "version": "4.29.2", "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 2cc6f4b..98a704d 100644 --- a/types/resources/recordings.d.ts +++ b/types/resources/recordings.d.ts @@ -12,6 +12,8 @@ export class RetrieveRecordingResponse { recordingType: string; recordingUrl: string; resourceUri: string; + fromNumber: string; + toNumber: string; } export class ListRecordingResponse { constructor(params: object); @@ -27,6 +29,8 @@ export class ListRecordingResponse { recordingType: string; recordingUrl: string; resourceUri: string; + fromNumber: string; + toNumber: string; } /** * Represents a Recording From 748618b0dec946698c2c4bbdf0ca4e44378bdd0b Mon Sep 17 00:00:00 2001 From: ajay-plivo Date: Wed, 13 Apr 2022 16:00:27 +0530 Subject: [PATCH 2/7] VT-4165:mockupdated --- lib/rest/request-test.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/rest/request-test.js b/lib/rest/request-test.js index cda9dc4..6c4da07 100644 --- a/lib/rest/request-test.js +++ b/lib/rest/request-test.js @@ -1882,7 +1882,9 @@ export function Request(config) { recording_start_ms: '1407235163907.00000', recording_type: 'conference', recording_url: 'http://s3.amazonaws.com/recordings_2013/c2186400-1c8c-11e4-a664-0026b945b52x.mp3', - resource_uri: '/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/c2186400-1c8c-11e4-a664-0026b945b52x/' + resource_uri: '/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/c2186400-1c8c-11e4-a664-0026b945b52x/', + from_number: '+919999323467', + to_number: '+919891865130', } }); } @@ -1911,7 +1913,9 @@ export function Request(config) { recording_start_ms: '1407235163907.00000', recording_type: 'conference', recording_url: 'http://s3.amazonaws.com/recordings_2013/c2186400-1c8c-1124-a664-0026b945b522.mp3', - resource_uri: '/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/c2186400-1c8c-1124-a664-0026b945b522/' + resource_uri: '/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/c2186400-1c8c-1124-a664-0026b945b522/', + from_number: '+919999323467', + to_number: '+919891865130', }, { add_time: '2014-08-05 16:05:21.993853+05:30', @@ -1924,7 +1928,9 @@ export function Request(config) { recording_start_ms: '1407234829553.00000', recording_type: 'conference', recording_url: 'http://s3.amazonaws.com/recordings_2013/fc2716b0-1c8b-11e4-bwad-842b2b17453e.mp3', - resource_uri: '/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/fc2716b0-1c8b-11e4-bwad-842b2b17453e/' + resource_uri: '/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/fc2716b0-1c8b-11e4-bwad-842b2b17453e/', + from_number: '+919999323467', + to_number: '+919891865130', } ] } From 756dfebdeb1c6005107c1061365b75bff2af502c Mon Sep 17 00:00:00 2001 From: ajay-plivo Date: Thu, 21 Apr 2022 12:16:56 +0530 Subject: [PATCH 3/7] VT-4165 --- CHANGELOG.md | 1 + lib/utils/plivoxml.js | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c89d8ba..6e132bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## [v4.29.2](https://github.com/plivo/plivo-node/tree/v4.29.2) (2022-04-11) **Features - List all recordings** - `fromNumber` and `toNumber` added in filtering params [List all recordings](https://www.plivo.com/docs/voice/api/recording#list-all-recordings) +- `record_min_member_count` param added to [Add a participant to a multiparty call using API](https://www.plivo.com/docs/voice/api/multiparty-call/participants#add-a-participant) ## [v4.29.1](https://github.com/plivo/plivo-node/tree/v4.29.1) (2022-03-25) **Bug Fix - DialElement** diff --git a/lib/utils/plivoxml.js b/lib/utils/plivoxml.js index fd5a887..a31a757 100644 --- a/lib/utils/plivoxml.js +++ b/lib/utils/plivoxml.js @@ -448,6 +448,7 @@ Response.prototype = { * @param {string} [attributes.role] * @param {number} [attributes.maxDuration] * @param {number} [attributes.maxParticipants] + * @param {number} [attributes.recordMinMemberCount] * @param {string} [attributes.waitMusicMethod] * @param {string} [attributes.agentHoldMusicMethod] * @param {string} [attributes.customerHoldMusicMethod] @@ -506,6 +507,13 @@ Response.prototype = { attributes.maxParticipants = 10 } + if(attributes.recordMinMemberCount && (attributes.recordMinMemberCount<1 || attributes.recordMinMemberCount>2)){ + throw new PlivoXMLError('Invalid attribute value ' + attributes.recordMinMemberCount + ' for recordMinMemberCount') + } + else if(!attributes.recordMinMemberCount){ + attributes.recordMinMemberCount = 1 + } + if(attributes.waitMusicMethod && VALID_METHOD_VALUES.indexOf(attributes.waitMusicMethod.toUpperCase())===-1){ throw new PlivoXMLError('Invalid attribute value ' + attributes.waitMusicMethod + ' for waitMusicMethod') } @@ -1004,7 +1012,7 @@ util.inherits(DTMF, Response); function MultiPartyCall(Response){ this.element = 'MultiPartyCall'; this.nestables = []; - this.valid_attributes = ['role', 'maxDuration', 'maxParticipants', 'waitMusicUrl', + this.valid_attributes = ['role', 'maxDuration', 'maxParticipants', 'recordMinMemberCount', 'waitMusicUrl', 'waitMusicMethod', 'agentHoldMusicUrl', 'agentHoldMusicMethod', 'customerHoldMusicUrl', 'customerHoldMusicMethod', 'record', 'recordFileFormat', 'recordingCallbackUrl', 'recordingCallbackMethod', From 893e4921b4dd7f83464e448672e93f0dc9896e03 Mon Sep 17 00:00:00 2001 From: ajay-plivo Date: Thu, 21 Apr 2022 12:48:54 +0530 Subject: [PATCH 4/7] VT-4165 --- lib/resources/multiPartyCall.js | 7 +++++++ test/xml.js | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/resources/multiPartyCall.js b/lib/resources/multiPartyCall.js index 56f6532..1e89245 100644 --- a/lib/resources/multiPartyCall.js +++ b/lib/resources/multiPartyCall.js @@ -144,6 +144,13 @@ export class MultiPartyCall extends PlivoResource{ params.maxParticipants = 10 } + if(params.recordMinMemberCount || params.recordMinMemberCount === 0){ + validRange('recordMinMemberCount', params.recordMinMemberCount, false, 1, 2) + } + else { + params.recordMinMemberCount = 1 + } + if(params.waitMusicUrl){ validUrl('waitMusicUrl', params.waitMusicUrl, false) } diff --git a/test/xml.js b/test/xml.js index cfc587e..7a63047 100644 --- a/test/xml.js +++ b/test/xml.js @@ -35,7 +35,7 @@ describe('PlivoXML', function () { maxDuration: 1000, statusCallbackEvents: 'participant-speak-events, participant-digit-input-events, add-participant-api-events, participant-state-changes, mpc-state-changes' }); - assert.equal('Nairobi',mpcResponse.toXML()); + assert.equal('Nairobi',mpcResponse.toXML()); done(); }); }); From a95f8103a572813d39499c6116a6de597d0fce65 Mon Sep 17 00:00:00 2001 From: ajay-plivo Date: Mon, 25 Apr 2022 16:39:30 +0530 Subject: [PATCH 5/7] VT-4165 --- lib/resources/recordings.js | 3 +++ types/resources/recordings.d.ts | 3 +++ 2 files changed, 6 insertions(+) diff --git a/lib/resources/recordings.js b/lib/resources/recordings.js index 322a646..91bf16c 100644 --- a/lib/resources/recordings.js +++ b/lib/resources/recordings.js @@ -49,6 +49,9 @@ export class ListRecordingResponse { this.resourceUri = params.resourceUri; this.fromNumber = params.fromNumber; this.toNumber = params.toNumber; + this.mpcName = params.mpcName; + this.conferenceUuid = params.conferenceUuid; + this.mpcUuid = params.mpcUuid; } } diff --git a/types/resources/recordings.d.ts b/types/resources/recordings.d.ts index 98a704d..9e291dc 100644 --- a/types/resources/recordings.d.ts +++ b/types/resources/recordings.d.ts @@ -31,6 +31,9 @@ export class ListRecordingResponse { resourceUri: string; fromNumber: string; toNumber: string; + conferenceUuid: string; + mpcName: string; + mpcUuid: string; } /** * Represents a Recording From a84785b4f1f572ab15821bdd1c013886afc3de6a Mon Sep 17 00:00:00 2001 From: ajay-plivo Date: Thu, 5 May 2022 19:17:01 +0530 Subject: [PATCH 6/7] VT-4165:versionChange --- CHANGELOG.md | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 15240cc..64a3c53 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Change Log -## [v4.30.1](https://github.com/plivo/plivo-node/tree/v4.30.1) (2022-04-11) +## [v4.31.0](https://github.com/plivo/plivo-node/tree/v4.31.0) (2022-05-05) **Features - List all recordings** - `fromNumber` and `toNumber` added in filtering params [List all recordings](https://www.plivo.com/docs/voice/api/recording#list-all-recordings) - `record_min_member_count` param added to [Add a participant to a multiparty call using API](https://www.plivo.com/docs/voice/api/multiparty-call/participants#add-a-participant) diff --git a/package.json b/package.json index 0487b53..b407d4e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "plivo", - "version": "4.30.1", + "version": "4.31.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 14c317619058450be2610976fe475837009c3c33 Mon Sep 17 00:00:00 2001 From: ajay-plivo Date: Thu, 5 May 2022 19:19:43 +0530 Subject: [PATCH 7/7] VT-4165 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b407d4e..cc1c427 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "plivo", - "version": "4.31.0", + "version": "4.32.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": [