Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@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

npmnpm
Version
0.7.29
Version published
Weekly downloads
179
8850%
Maintainers
1
Weekly downloads
 
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 24 Sep 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