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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@woolson/wx-pusher

v1.1.0

Published

WxPusher NodeJS SDK

Downloads

13

Readme

WxPusher SDK NodeJS版本

特性 Feature

  • 使用TS开发
  • 完整的类型声明
  • 完整的类型注释

安装 Install

npm install -S @woolson/wx-pusher

使用 Usage

引入

import { WxPusher } from '@woolson/wx-pusher';

推送信息

const PUSHER_TEST_TOKEN = '<PRIVATE_TOKEN>';
const TEST_TOPIC = <PRIVATE_TOPIC>;

/** 发送信息简化版 */
const { data: sendMsgSimpleRes } = await WxPusher.msgSendSimple({
  appToken: PUSHER_TEST_TOKEN,
  content: '测试内容',
  summary: '测试',
  topicId: TEST_TOPIC,
});
console.log('发送信息简化版', sendMsgSimpleRes.data, '\n\n');


/** 发送信息 */
const { data: sendMsgRes } = await WxPusher.msgSend({
  appToken: PUSHER_TEST_TOKEN,
  content: '测试内容',
  summary: '测试',
  topicIds: [TEST_TOPIC],
});
console.log('发送信息', sendMsgRes.data, '\n\n');

查询信息状态

const { data: messageStatus } = await WxPusher.msgStatusGet(71126666)
console.log('获取信息状态', messageStatus.data, '\n\n');

创建二维码

const { data: qrcodeRes } = await WxPusher.qrcodeCreate({
  appToken: PUSHER_TEST_TOKEN,
  extra: 'Test_Code',
})
console.log('创建二维码', qrcodeRes.data, '\n\n');

查询用户列表

const { data: userList } = await WxPusher.userListGet({
  appToken: PUSHER_TEST_TOKEN,
  page: 1,
  pageSize: 10,
})
console.log('查询用户列表', userList.data, '\n\n');

const { data: userList } = await WxPusher.userListGet({
  appToken: PUSHER_TEST_TOKEN,
  page: 1,
  pageSize: 10,
  uid: '<USER_ID>'
})
console.log('查询具体用户信息', userList[0].data, '\n\n');

类型声明 Type Declaration

// ============== 基础部分 ==============
/* 接口列表 */
export enum SendApis {}

/** 接口返回编码 */
export enum ResultCode {}

/** 用户来源 */
export enum UserSource {}

/** 用户关注类型 */
export enum UserSubscribeType {}

/** 请求返回统一结构 */
export interface ResBase<T> {}

/** 分页通用部分 */
export interface PaginationBase {}

// ============== 消息推送 ==============
/* 推送内容类型 */
export enum MsgContentType {}

/* 通知消息请求体 */
export interface MsgSendReqBase {}

/* 简单发送消息请求参数 */
export interface MsgSendReqParams {}

/* 全功能发送消息请求体 */
export interface MsgSendReqBody {}

/** 发送消息响应内容项 */
export interface MsgSendResDataItem {}

// ============== 创建二维码 ==============
/** 创建二维码请求参数 */
export interface QrcodeCreateReqBody {}

/** 创建二维码响应内容 */
export interface QrcodeCreateResData {}

// ============== 用户信息 ==============
/**
 * 查询用户列表请求参数
 * @deprecated 请使用UserListGetReqParamsV2
 */
export interface UserListGetReqParams {}

/**
 * 获取用户列表响应内容
 * @deprecated 请使用UserListGetResDataV2
 */
export interface UserListGetResData {}

/**
 * 获取用户列表响应用户信息
 * @deprecated 请使用UserListGetResDataItemV2
 */
export interface UserListGetResDataItem {}

/** 查询用户列表请求参数V2 */
export interface UserListGetReqParamsV2 {}

/** 获取用户列表响应内容V2 */
export interface UserListGetResData {}

/** 获取用户列表响应内容V2 */
export interface UserListGetResDataItemV2 {}

// ============== 公众号互动 ==============
/** 公众号事件互动类型 */
export enum EventActionType {}

/** 调用事件类型及相关数据 */
export interface EventData {}

/** 调用事件数据部分 */
export interface EventDataBase {}

/** 用户关注时间消息回调数据 */
export interface EventSubscribeData {}

/** 上行事件消息回调数据 */
export interface EventUpCmdData {}