Socket
Book a DemoInstallSign in
Socket

@tng/soa-node-tracker

Package Overview
Dependencies
Maintainers
4
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tng/soa-node-tracker

SOA-TRACKER for Node ================

1.0.0
latest
npmnpm
Version published
Maintainers
4
Created
Source

SOA-TRACKER for Node

安装

yarn add @tng/soa-node-tracker

request 模块

  • https://github.com/teambition/tws-auth
  • https://github.com/teambition/node-teambition

使用

const SOAOrg = require('@tng/soa-node-tracker')
const TWSAuth = require('tws-auth')
const Teambition = require('teambition')

// use tws-auth
let twsAuth = new TWSAuth({ ... })
let soatracker = new SOAOrg({ twsAuth: twsAuth })

// use teambition
let teambition = new Teambition({ ... })
let soatracker = new SOAOrg({ teambition: teambition })

// create a track
let track = await soatracker.v1().tracks().create({
  "_resourceId": "50c32afae8cf1439d35a87e6",
  "_userId": "50c32afae8cf1439d35a87e6",
  "operation": "foo",
  "payload": {},
  "resourceType": "bar",
  "tags": [
    "50c32afae8cf1439d35a87e6"
  ]
}

// query tracks
let track = await soatracker.v1().tracks().list()

测试

npm test

接口

tracks

  • users()
  • .tracks().create(): 提交用户的行为
  • .tracks().delete(): 删除用户的行为记录
  • .tracks().list(): 查询用户的行为记录

FAQs

Package last updated on 04 Jul 2018

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.