mecmapi

0.2.3 • Public • Published

MECMAPI

npm
Manage Engine ECMA Script (node.js) UMD module/Library/Framework to work with REST API of ServiceDesk Plus


INSTALL/IMPORT

CDN

npm
Change version as needed in URL bellow:

https://cdn.jsdelivr.net/npm/mecmapi@0.2.1/index.js

NPM

https://www.npmjs.com/package/mecmapi

npm install mecmapi --save

USAGE EXAMPLE

browser

const mecmapi = new window.mecmapi({});

const scrProcessing = async (requestId, request) => {
    const noteDescription = `В ОБРАБОТКЕ  -//-  PROCESSING  ©`;

    const res = await mecmapi.updateRequest(requestId, {
        "group": {
            "name": "IT"
        },
        "request_type": {
            "name": "Request"
        },
        "level": {
            "name": "Coordinators"
        },
        "status": {
            "name": "Processing"
        },
        "udf_fields": {
            "udf_pick_1205": await vut.getUpdatedCoordinator()
        },
        "technician": null,
        ...request
    });
    await mecmapi.addNote(requestId, {
        "mark_first_response": true,
        "add_to_linked_requests": false,
        "notify_technician": false,
        "show_to_requester": false,
        "description": noteDescription
    })
}

const rid = vut.getRequestId();
scrProcessing(rid).then(() => {
    vut.gotoRequest(rid);
});
// CHANGELOG.md

Install

npm i mecmapi

DownloadsWeekly Downloads

17

Version

0.2.3

License

MIT

Unpacked Size

1.05 MB

Total Files

36

Last publish

Collaborators

  • grenudi