Registry / database / arbiter

arbiter

JSON →
library2.0.2jsnpmunverified

A Salesforce ORM for Node.js (v2.0.2) built on JSForce, providing declarative models, field remapping, validation, and an extended query API. It simplifies querying related Salesforce objects and updating records. Requires Node >= 6.0. Less active development; alternatives like nforce or jsforce-native exist.

npm install arbiter
INSTALL
IMPORT
SIG · ARBITER
A
arbiter
databasejavascriptv2.0.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

Arbiter
import Arbiter from 'arbiter-salesforce'
const Arbiter = require('arbiter');
Package name is 'arbiter-salesforce' on npm, not 'arbiter'. Default export is a class.
Schema
import { Schema } from 'arbiter-salesforce'
const { Schema } = require('arbiter');
Named export from 'arbiter-salesforce'. Common mistake: using wrong package name or importing from 'arbiter'.
Query
import { Query } from 'arbiter-salesforce'
Query is a class returned by model methods like findAll. Not typically imported directly.

Sets up a Salesforce connection using JSForce, defines a model with field mapping, then queries the first 10 accounts.

import Arbiter, { Schema } from 'arbiter-salesforce'; const connection = new Arbiter.Connection({ loginUrl: 'https://login.salesforce.com', username: process.env.SF_USERNAME ?? '', password: process.env.SF_PASSWORD ?? '' }); const AccountSchema = new Schema('Account', { Id: { type: 'string', required: true }, Name: { type: 'string', required: true }, BillingCity: { type: 'string', map: 'City' }, BillingState: { type: 'string', map: 'State' } }); const Account = connection.model('Account', AccountSchema); async function queryAccounts() { const accounts = await Account.find({}, { limit: 10 }); console.log(accounts); } queryAccounts().catch(err => console.error(err));
Debug
Known issues
gotchaPackage installed as 'arbiter-salesforce', not 'arbiter'. Using 'require('arbiter')' fails.
fix
Install and import 'arbiter-salesforce' instead of 'arbiter'.
affects: all
gotchaSchema field mapping is NOT bidirectional: saving a record writes to the Salesforce field name, not the mapped name.
fix
When setting fields for create/update, use the Salesforce API field names (e.g., 'BillingCity') not the mapped name ('City').
affects: all
deprecatedNode.js engines requirement '>= 6.0' but many dependencies like jsforce require Node >= 10.
fix
Use Node.js 10+ or check jsforce version compatibility.
affects: >=2.0.0
gotchaThe 'Connection' constructor accepts 'loginUrl' but not all Salesforce instances support the same URL (e.g., sandbox uses 'test.salesforce.com').
fix
Use the correct login URL for your Salesforce environment: production 'login.salesforce.com', sandbox 'test.salesforce.com'.
affects: all
Errors
Common errors & fixes
Error: Cannot find module 'arbiter'
Incorrect package name in require or import.
fix
Install 'arbiter-salesforce' and use 'require('arbiter-salesforce')' or 'import ... from 'arbiter-salesforce''.
TypeError: Schema is not a constructor
Importing 'Schema' as default instead of named export.
fix
Use 'import { Schema } from 'arbiter-salesforce''.
Error: Invalid login attempt. Failed to authenticate.
Wrong loginUrl, username, or password.
fix
Double-check Salesforce credentials and loginUrl. For sandbox, use 'https://test.salesforce.com'.
Upgrade
Version history
2.0.2latest on npm
Audit
Dependencies
jsforcerequiredCore dependency for Salesforce API interaction; Arbiter mirrors and extends its API.
Agent activity
17 hits · last 30 days
node
14
OpenAI (training)
1
Resources
arbiter — npm install arbiter · libregistry