Registry / crm-productivity / node-sellsy

node-sellsy

JSON →
library1.5.5jsnpmunverified

The `node-sellsy` library serves as a JavaScript wrapper for the Sellsy API, designed for both Node.js and browser environments. It provides a promise-based interface to interact with Sellsy's largely PHP-centric API, facilitating automation of tasks within the Sellsy platform. Developers can utilize a generic `sellsy.api({ method, params })` call for direct access to all documented Sellsy API methods, alongside higher-level abstractions for common operations on customer and document entities, such as `sellsy.customers.create` or `sellsy.documents.getList`. The latest stable version is 1.5.5, with the last update released in November 2021. A key differentiator is enabling JavaScript developers to integrate with Sellsy without relying on PHP, offering features like OAuth private app authentication. It handles the underlying HTTP requests and response parsing, returning data in a structured JavaScript object format.

npm install node-sellsy
INSTALL
IMPORT
SIG · NODE-SELLSY
N
node-sellsy
crm-productivityjavascriptv1.5.5
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Sellsy
✓ const Sellsy = require('node-sellsy');
This package is a CommonJS module. Use `require` to import the main `Sellsy` class for Node.js environments.
Sellsy
✓ // For ESM, you might need a wrapper or dynamic import: const Sellsy = (await import('node-sellsy')).default;
✗ import Sellsy from 'node-sellsy';
Direct ES module `import` syntax (e.g., `import Sellsy from 'node-sellsy'`) is not officially supported and will likely result in `undefined` or a module error without specific build tooling or dynamic import.
Sellsy
✓ // No named exports are provided by this CommonJS module.
✗ import { Sellsy } from 'node-sellsy';
This library does not use named exports. Attempting a named `import` will result in `Sellsy` being `undefined`.

Initializes the Sellsy API client with credentials from environment variables and fetches a list of clients matching a 'test' search term using the generic API method.

const Sellsy = require("node-sellsy"); const sellsy = new Sellsy({ creds: { consumerKey: process.env.SELLSY_CONSUMER_KEY ?? "YOUR_CONSUMER_KEY", consumerSecret: process.env.SELLSY_CONSUMER_SECRET ?? "YOUR_CONSUMER_SECRET", userToken: process.env.SELLSY_USER_TOKEN ?? "YOUR_USER_TOKEN", userSecret: process.env.SELLSY_USER_SECRET ?? "YOUR_USER_SECRET", }, }); const params = { search: { contains: "test", }, }; sellsy .api({ method: "Client.getList", params: params, }) .then((data) => { console.log("Successfully fetched client data:", data); }) .catch((e) => { console.error("Error fetching client data:", e); });
Debug
Known issues
gotchaUsing `node-sellsy` directly in a browser environment requires a custom proxy to circumvent Sellsy API's lack of CORS support, adding operational complexity.
fix
Deploy and configure a proxy server (e.g., `revolunet/sellsy-proxy` from GitHub) and specify its endpoint in the `Sellsy` client configuration using the `endPoint` option.
affects: >=1.0.0
breakingThe library's `engines` configuration specifies Node.js `>=0.10.0`, indicating it has not been tested or updated for modern Node.js versions (e.g., v16, v18, v20+). Compatibility issues or security vulnerabilities may arise on newer runtimes.
fix
Run in an environment with an older Node.js version compatible with the library, or consider migrating to an actively maintained alternative if available. Proceed with caution on modern Node.js.
affects: *
deprecatedThe `node-sellsy` library appears to be unmaintained, with its last release in November 2021. This implies a lack of future updates, bug fixes, or security patches, making it unsuitable for new projects or critical applications.
fix
Evaluate the ongoing need for Sellsy API integration and investigate alternative, actively maintained libraries or consider building direct API integrations if maintenance is critical.
affects: >=1.5.5
gotchaThe library is exclusively a CommonJS module. It does not provide native ES module exports, which can lead to import errors or require additional transpilation/bundling steps in modern ES module-driven Node.js or browser projects.
fix
Use CommonJS `require()` syntax. For ES modules, consider dynamic `import()` or configuring your build system (e.g., Webpack, Rollup) to handle CommonJS modules.
affects: *
gotchaCredentials (consumerKey, consumerSecret, userToken, userSecret) are shown directly in code examples. Storing sensitive API credentials directly in source code or public repositories is a severe security risk.
fix
Always store API credentials securely using environment variables (e.g., `process.env.SELLSY_CONSUMER_KEY`), a secrets management service, or a dedicated configuration system, injecting them at runtime.
affects: *
Errors
Common errors & fixes
ReferenceError: require is not defined
Attempting to use `require` in an ES module context in Node.js.
fix
Either convert your module to CommonJS (`.js` file without `"type": "module"` in `package.json` or `.cjs` extension) or use dynamic `import()`: `const Sellsy = (await import('node-sellsy')).default;`
TypeError: Sellsy is not a constructor
Incorrect ES module import syntax (e.g., `import { Sellsy } from 'node-sellsy';` or `import Sellsy from 'node-sellsy';`) for a CommonJS module, or trying to destructure a default export.
fix
Ensure you are using the correct CommonJS `require` syntax: `const Sellsy = require('node-sellsy');`
Error: Sellsy API doesnt provide CORS access
Attempting to use the `Sellsy` client directly from a browser environment without a proxy.
fix
Deploy a CORS proxy (e.g., `revolunet/sellsy-proxy`) and configure the `endPoint` option when initializing the `Sellsy` client.
error: invalid signature
Incorrect or expired OAuth credentials (consumerKey, consumerSecret, userToken, userSecret) provided to the Sellsy client.
fix
Double-check all four OAuth credentials for typos or ensure they are up-to-date and valid in your Sellsy API application settings.
Upgrade
Version history
1.5.5latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
32 hits · last 30 days
node
28
OpenAI (training)
1
Resources