New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@twec/node-suite

Package Overview
Dependencies
Maintainers
4
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@twec/node-suite

Generic functionality for connecting to NetSuite Web Services from Node

  • 0.1.2
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
5
decreased by-28.57%
Maintainers
4
Weekly downloads
 
Created
Source

Node-Suite

(Node + NetSuite)

This package contains functionality for connecting to NetSuite Web Services from Node, handling token authorization and SOAP XML parsing, and allows fetching records and uploading files.

Install

npm install @twec/node-suite

Use in your node app

Import

const NetSuite = require('node-suite');
// or: import NetSuite from 'node-suite';

Instantiate

When instatiating your netsuite object, you'll need to provide a config object with connection details. See config.json.example.

const netSuiteConfig = {
  // various properties
  // see config.json.example
  // or the defaultConfig in index.js
};
const ns = new NetSuite(netSuiteConfig);

Get a record

const record = await ns.get({
  // Specify one or more of these properties
  type: '',
  internalId: '',
  externalId: ''
});

Upload a file

const fileRef = await ns.upload(
  './some/local/dir/my-file.csv', // local file 
  'uploads/my-file.csv', // NetSuite target file path
);

Other

Checkout other methods: look at the netsuite object console.log(ns); and read index.js.

Limitations

Currently you can only fetch records (get operation), upload a file (upsert operation), and fetch folders.

Unit Testing

npm test will run both the AVA unit tests and ESLint.

Test it out locally

  • Create a config.json in the root of the package directory; see config.json.example for an example of the format expected.
  • Modify config.json to have the appropriate connection strings (likely pointing to sandbox)
  • Modify test.js to comment-out code to run a specific test
  • Run node test.js

Keywords

FAQs

Package last updated on 11 Oct 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc