Skip to content

amicaldo/ecodms-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ecodms-node

Abstraction for the ecoDMS 18.09 (apu) API.

Documentation

constructor(config)

  • Parameters:
    • configobject
      • originstring
      • usernamestring
      • passwordstring
      • portnumber|string (optional, default: 8180)

test()

  • Returns: Promise<string>

getStatus()

  • Returns: Promise<object[]>

getRoles()

  • Returns: Promise<string[]>

getUserRoles()

  • Returns: Promise<string[]>

getTypes()

  • Returns: Promise<object[]>

getFolders()

  • Returns: Promise<object[]>

getFolderById(id)

  • Parameters: idnumber|string
  • Returns: Promise<object>

getDocumentById(id)

  • Parameters: idnumber|string
  • Returns: Promise<string>

getDocumentByIdAndVersion(id, version)

  • Parameters:
    • idnumber|string
    • versionnumber|string
  • Returns: Promise<string>

deleteDocumentById(id)

  • Parameters: idnumber|string
  • Returns: Promise<boolean>

recoverDocumentById(id)

  • Parameters: idnumber|string
  • Returns: Promise<boolean>

getLinkedDocumentsById(id)

  • Parameters: idnumber|string
  • Returns: Promise<number[]>

linkDocuments(id, linkIds)

  • Parameters:
    • idnumber|string
    • linkIdsnumber[]|string[]
  • Returns: Promise<number[]>

deleteLinked(id, linkIds)

  • Parameters:
    • idnumber|string
    • linkIdsnumber[]|string[]
  • Returns: Promise<boolean>

getDocumentInfoById(id)

  • Parameters: idnumber|string
  • Returns: Promise<object[]>

getDocumentPreview(id, page, height)

  • Parameters:
    • idnumber|string
    • pagenumber|string
    • heightnumber|string
  • Returns: Promise<string>

getClassifyAttributes()

  • Returns: Promise<number[]>

uploadFile(filepath, versionControlled = false)

  • Parameters:
    • filepathstring
    • versionControlledboolean (optional, default: false)
  • Returns: Promise<number>

uploadFileWithPdf(filepath, pdfpath, versionControlled = false)

  • Parameters:
    • filepathstring
    • pdfpathstring
    • versionControlledboolean (optional, default: false)
  • Returns: Promise<number>

addVersionToDocument(id, filepath, fixed = false)

  • Parameters:
    • idnumber|string
    • filepathstring
    • fixedboolean (optional, default: false)
  • Returns: Promise<boolean>

addVersionWithPdfToDocument(id, filepath, pdfpath, fixed = false)

  • Parameters:
    • idnumber|string
    • filepathstring
    • pdfpathstring
    • fixedboolean (optional, default: false)
  • Returns: Promise<boolean>

createNewClassify(docInfoObject)

  • Parameters: docInfoObjectobject
  • Returns: Promise<number>

createFolder(folderObject)

  • Parameters: folderObjectobject
  • Returns: Promise<number>

createSubfolder(folderObject, parentFolderId)

  • Parameters:
    • folderObjectobject
    • parentFolderIdnumber|string
  • Returns: Promise<number>

Examples

const EcoDms = require('ecodms-node');

const api = new EcoDms({
    origin: 'http://example-ecodms.com',
    username: 'user',
    password: 'pass'
});

api.test()
  .then((res) => console.log('API works'))
  .catch((err) => console.log('API does not work'));

// Do anything you want from here

About

Abstraction for the ecoDMS 18.09 (apu) API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published