Latest Supply Chain Attack:Mini Shai-Hulud Hits @antv npm Packages, 639 Versions Compromised.Learn More
Socket
Book a DemoSign in
Socket

@pantherx.dev/common-api

Package Overview
Dependencies
Maintainers
1
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pantherx.dev/common-api

Axios-powered, type-safe access to Central Management API

latest
npmnpm
Version
0.8.0
Version published
Maintainers
1
Created
Source

Central Management Library - Common API

npm version

This library enables easy, axios-powered, type-safe access to Central Management API endpoints. It relies primarily on @pantherx.dev/common.

The collection was initially developed for testing, hence the rather verbose approach (axios config for each request), however, it also makes it very flexible and accessible. One benefit of using this, is that all odities are documented, and DTO's are up to date.

This likely won't be useful to you unless you are working with us, or with / on one of our products.

Usage

Install with

npm i --save @pantherx.dev/common-api

and use like this:

import { cmDocuments } from '@pantherx.dev/common'

const axiosConfig = {
    headers: {
        authorization: `Bearer ${access_token}`,
    },
    baseURL: 'https://identity.domain.com',
}
// Shortcut: axiosConfigDefault(accessToken)
const documents = await cmDocuments.list(axiosConfig)

Similiarly for others: cmDevices, cmUsers, ...

Default operations include:

  • list
  • get
  • create
  • patch (this might become update in the future)
  • delete

FAQs

Package last updated on 03 Oct 2022

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