How to use touchAction in webdriverjs for javascript code

“use strict”;

var wd = require(“selenium-webdriver”),
By = wd.By,
until = wd.until;
var desiredCaps =
{
platformName: “Android”,
platformversion: “9”,
devicename: “xxxxxxx”,
automationName: “UiAutomator2”,
noReset:“true”,
appPackage:“com.sec.android.app.launcher”,
appActivity:“com.sec.android.app.launcher.activities.LauncherActivity”,
browserName: ‘’,

};
async function phonepe()
{
let driver = await new wd.Builder().usingServer("http://127.0.0.1:4723/wd/hub").withCapabilities(desiredCaps).build(.withCapabilities(desiredCaps).build());
driver.touchAction([
{ action: ‘press’, x: 404, y: 658 },
{ action: ‘moveTo’, x: 404, y: 50 },
‘release’
])
driver.touchPerform([ { action: ‘press’, options: { x: 100, y: 250 }}, { action: ‘moveTo’, options: { x: 300, y: 100 }}, { action: ‘release’ } ]);

await driver.close();
}
phonepe();

errors logs----------------------------------------

(node:40512) UnhandledPromiseRejectionWarning: TypeError: driver.touchAction is not a function
at phonepe (c:\Users\Mohit\Desktop\new\touchActions.js:24:8)
at processTicksAndRejections (internal/process/task_queues.js:97:5)

Docs say that touchAction is not in driver (browser), but elements.
This may help: https://webdriver.io/docs/api/element/touchAction