leo_ns
02/14/2024, 7:45 PMerictgrubaugh
02/14/2024, 8:06 PM@azure/cosmos
is an npm package.
In general, to use a third-party library like this in NetSuite, you first need to obtain the built JS file(s) for the library, either by downloading them directly from the repo or installing via the npm install
command. Then you need to upload those file(s) to the File Cabinet. Then you can include them in your SuiteScript modules:
define(['SuiteScripts/lib/cosmos'], (cosmos) => {
// ...
const client = new cosmos.CosmosClient(/* ... */)
// ...
})
erictgrubaugh
02/14/2024, 8:07 PMleo_ns
02/14/2024, 8:10 PM