Support ESM for purecloud-platform-client-v2?

Do you have any guides how to set up purecloud-platform-client-v2 for node and typescript using esm instead of e.g. CommonJS?

E.g. to support node script syntax such as below with the typescript definitions pulled in?

// script.ts
import platformsclient from "purecloud-platform-client-v2"
const client = platformsclient.ApiClient.instance

I read some posts on this topic like https://developer.genesys.cloud/devapps/sdk/docexplorer/purecloudjavascript/ and other forum posts and as I understood it, I might need compile the source code included in the package myself to get this to work?

I'm not using a bundler like webpack or rollup right now, since I just want to write a few scripts in Typescript using this package, and I was hoping it would be possible. I don't have much experience with using bundlers in this context, so I'm unsure of the best path forward, and want to ask before I spend more time on it.

I also read an older post that you are working on getting a setup, to add support for esm imports?

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.