Registry / storage / alfresco-js-api-node

alfresco-js-api-node

JSON →
library4.0.0-beta1jsnpmunverified

JavaScript client library (v4.0.0-beta1) for the Alfresco REST API and Activiti REST API. Provides both ECM (Enterprise Content Management) and BPM (Business Process Management) APIs. Supports multiple authentication methods: username/password, ticket-based, and OAuth2 (implicit flow, password flow). Ships TypeScript definitions. Suitable for Node.js and browser environments. Similar to alfresco-js-api but separated for Node.js usage. Beta release with frequent updates.

npm install alfresco-js-api-node
INSTALL
IMPORT
SIG · ALFRESCO-JS-API-NO
A
alfresco-js-api-node
storagejavascriptv4.0.0-beta1
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.

AlfrescoApi
import { AlfrescoApi } from 'alfresco-js-api-node'
const AlfrescoApi = require('alfresco-js-api-node')
ESM import works in Node 12+; CommonJS require may not work due to ESM-only package.
EcmAuth
import { EcmAuth } from 'alfresco-js-api-node'
import { EcmAuth } from 'alfresco-js-api'
EcmAuth is available in the Node-specific package; browser package may differ.
BpmAuth
import { BpmAuth } from 'alfresco-js-api-node'
import { BpmAuth } from 'alfresco-js-api'
BpmAuth is for Activiti BPM; ensure correct package.
AlfrescoApiCompatibility
import { AlfrescoApiCompatibility } from 'alfresco-js-api-node'
Optional compatibility layer for older API usage; not commonly needed.

Shows initializing AlfrescoApi, logging in with username/password, and fetching node info via ECM API.

import { AlfrescoApi } from 'alfresco-js-api-node'; const alfrescoApi = new AlfrescoApi({ hostEcm: 'http://localhost:8080', hostBpm: 'http://localhost:9999', authType: 'BASIC', contextRoot: 'alfresco' }); alfrescoApi.login('admin', 'admin').then(() => { alfrescoApi.core.nodesApi.getNodeInfo('-root-').then(node => { console.log(node); }); }); // Alternatively with ticket alfrescoApi.loginTicket('TICKET_...').then(() => { console.log('Logged in with ticket'); });
Debug
Known issues
breakingIn beta versions, the API surface may change without notice. Avoid using in production.
fix
Wait for stable release or pin to a specific beta version and test thoroughly.
affects: <=4.0.0-beta1
gotchaAuthentication with ticket requires passing ticket string directly; common mistake is to pass ticket object.
fix
Use alfrescoApi.loginTicket('TICKET_...') with a string, not an object.
affects: >=4.0.0-beta1
deprecatedThe 'AlfrescoApiCompatibility' class is deprecated and may be removed in future versions.
fix
Use standard AlfrescoApi instead; migrate away from compatibility layer.
affects: >=4.0.0-beta1
gotchaOAuth2 implicit flow requires specific configuration and event handling; missing event listeners can cause silent failures.
fix
Always attach event listeners for 'error', 'unauthorized', and 'tokenExpired' when using OAuth2.
affects: >=4.0.0-beta1
Errors
Common errors & fixes
Error: Cannot find module 'alfresco-js-api-node'
Package not installed or incorrect import path.
fix
Run 'npm install alfresco-js-api-node' and ensure import path is correct.
TypeError: alfrescoApi.login is not a function
Using an older version where login method was named differently or not available.
fix
Upgrade to version 4.0.0-beta1 or later; use alfrescoApi.login directly.
AlfrescoApi constructor: authType must be one of: BASIC, OAUTH, TICKET
Invalid authType value passed.
fix
Use one of 'BASIC', 'OAUTH', or 'TICKET' (case-sensitive).
Upgrade
Version history
4.0.0-beta1latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
39 hits · last 30 days
node
32
OpenAI (training)
2
Resources
alfresco-js-api-node — npm install alfresco-js-api-node · libregistry