Socket
Book a DemoInstallSign in
Socket

@rgwch/mayan_edms-api

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rgwch/mayan_edms-api

API access for the Mayan EDMS system

latest
Source
npmnpm
Version
0.4.5
Version published
Maintainers
1
Created
Source

Mayan EDMS API

Overview

This is a nodejs library to access the API of the Mayan EDMS. It tries to simplify some common tasks when using automated services to work with Mayan.

Usage

import {mayan} from '@rgwch/mayan_edms-api'

mayan.connect("https://some.mayan.server","username","password", false).then(result)=>{
    if(result){
        console.log("We are connected. Use API now")
    }
})

All methods are async. Connect should be the first call. On success, it receives a token which is stored internally and used for all subsequent API calls. Note that the user who connects must have specific rights for every method in the fairly fine-grained permission system of Mayan EDMS. I recommend to test first as admin user and change to the real user only if that is successful.

You can use the provided test/docker-compose.yml for a quick test installation of Mayan EDMS

Documentation, see docs

Contributing

git clone https://github.com/rgwch/mayan_edms-api
cd mayan_edms-api
npm i
npm run build

Testing

There's only an integration test.

First run

Before first run you must initialize a Mayan EDMS for testing:

cd test
docker-compose up -d
# or: docker compose up -d

Then navigate to [http://localhost:5656/]

Login as admin with the indicated password. Go to the "User" Menu in the right upper part of the window. Change the password to "testuser".

Then you can leave the Mayan UI and run the tests

Test runs

npm test

Cleaning up

docker-compose down

Later runs of docker-compose up -d will be much faster and no initialization is needed.

FAQs

Package last updated on 03 May 2025

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.