npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@tng/soa-node-task

v1.1.0

Published

SOA-Task for Node ================

Downloads

6

Readme

SOA-Task for Node

安装

yarn add @tng/soa-node-task

request 模块

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

使用

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

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

// use teambition
let teambition = new Teambition({ ... })
let soatask = new SOATask({ teambition: teambition })

// 创建任务
let task = yield soatask.tasks().create({
  title: 'new task',
  startDate: '2018-01-01',
  dueDate: '2018-01-02',
  _creatorId: 'creator id'
})


// 获取任务信息
let taskInfo = yield soatask.tasks(task._id).info()

接口

projects

  • projects()
    • .initUniqueId(): 开启unique ID功能

projects.tasks

  • projects().tasks()
    • .batchUpdateDuedate(): 批量更新截止日期
    • .batchUpdateExecutor(): 批量更新执行者
    • .batchUpdateStartDate(): 批量更新开始时间
    • .batchUpdateTaskFlowStatusId(): 批量更新任务流id
    • .batchArchive(): 批量归档
    • .batchRemove(): 批量删除
    • .batchTransform(): 敏捷研发项目下, 批量转换任务
    • .batchUpdateExecutorInPro(): 敏捷研发项目下, 批量移交
    • .updateSubtaskScenariofieldconfig(): 敏捷研发项目下, 更新场景字段

projects.sprints

  • projects().sprints()
    • .updateStatus(): 更新迭代下任务的完成状态
  • projects().sprints().taskflowstatus()
    • .updateStatus(): 更新任务流下任务的完成状态

projects.tasklists

  • projects().tasklists().stages()
    • .updateModeToFlow(): 设置流程模式

tasklists

  • tasklists().tasks()
    • .archive(): 归档 tasklist 任务
    • .unarchive(): 解归档 tasklist 任务

stages

  • stages().tasks():
    • .create(): 创建任务
    • .archive(): 归档阶段下所有任务
    • .copy(): 批量复制
    • .updateDuedate(): 批量更新 stage 任务截止日期
    • .updateExecutor(): 批量更新阶段下的执行者
    • .updateVisible(): 批量更新任务的可见性

tasks

  • tasks()
    • .create(): 创建任务
    • .update(): 更新任务
    • .remove(): 根据 ID 删除任务
    • .archive(): 归档任务
    • .copy(): 复制任务
    • .updateStatus(): 更完成状态
    • .move(): 移动任务
    • .updatePos(): 更新任务位置
    • .unarchive(): 解归档任务
    • .batchCreate(): 批量创建任务
    • .batchGetByUserId(): 批量获取用户能看见的任务
    • .removeByConditions(): 多条件删除任务
    • .find(): 查找任务
    • .query(): 提供强大的任务查询能力

tasks.me

  • tasks().me()
    • .listCreated(): 获取用户创建的任务
    • .listExecute(): 获取用户执行的任务
    • .listInvolves(): 获取用户参与的任务

参数了解