From a66e440f8ead2b2d416442ae88a2ff7682d607ba Mon Sep 17 00:00:00 2001 From: Shubham Tiwari Date: Thu, 14 Dec 2023 14:43:58 +0530 Subject: [PATCH] chore: added support for SafeList query params --- src/hooks/init/twilio-api.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/hooks/init/twilio-api.js b/src/hooks/init/twilio-api.js index c2c5b5d85..814c7df87 100644 --- a/src/hooks/init/twilio-api.js +++ b/src/hooks/init/twilio-api.js @@ -43,6 +43,13 @@ class TwilioRestApiPlugin extends Plugin { Object.keys(actionDefinition.resource.operations).forEach((methodName) => { actionDefinition.methodName = methodName; actionDefinition.actionName = METHOD_TO_ACTION_MAP[pathType][methodName]; + if ( + actionDefinition.actionName !== 'create' && + pathType === 'list' && + 'delete' in actionDefinition.resource.operations + ) { + actionDefinition.actionName = METHOD_TO_ACTION_MAP.instance[methodName]; + } this.scanAction(actionDefinition); }, this); }