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

@steedos-labs/yunzhijia-im

v1.0.1

Published

yunzhijia im services built with nest architecture

Downloads

13

Readme

Description

这是一个发送消息到云之家封装的模块

云之家原始接口文档 https://www.yunzhijia.com/opendocs/docs.html#/server-api/im/pubSend

环境变量


  • IM 发送消息环境变量

    B6_YUNZHIJIA_IM_HOST // 发送消息的请求地址 eg: http://xxxxx:80

    B6_YUNZHIJIA_IM_EID // 企业id

    B6_YUNZHIJIA_IM_PUB // 公共号id

    B6_YUNZHIJIA_IM_PUBSERCET // 公共号密钥

    B6_YUNZHIJIA_IM_APPID // 轻应用ID

  • 包加载环境变量

    B6_PLUGIN_PACKAGES=@builder6/node-red

    B6_PLUGIN_MODULES=@steedos-labs/yunzhijia-im,@builder6/node-red


@steedos-labs/yunzhijia-im.sendMessage 方法的参数说明

sendMessage 方法用于发送消息,其参数对象包含以下属性:

  • innerTos: IInnerTo[]

    • 描述: 接收消息的目标列表。
    • 类型: 数组,每个元素是一个 IInnerTo 对象。
    • 结构 user 和 code 二选一:
      • user?: string[] - 接收消息的用户openid列表。
      • code?: "all" - 群发所有用户。
  • type: MsgType

    • 描述: 消息类型。
    • 类型: 枚举值,定义在 MsgType 中。
    • 可能的值:
      • 2 - 纯文本信息。
      • 5 - 文本链接信息。
      • 6 - 图文混排信息。
  • msgs: IInnerMsg[]

    • 描述: 消息内容列表。
    • 类型: 数组,每个元素是一个 IInnerMsg 对象。
    • 结构:
      • date?: string - 消息日期。
      • title?: string - 消息标题。
      • text: string - 消息文本。
      • url?: string - 消息链接。
      • name?: string - 消息名称。
      • pic?: string - 消息图片。
  • model?: MsgModel

    • 描述: 消息模型(仅在 typeMIXED 时使用)。
    • 类型: 枚举值,定义在 MsgModel 中。
    • 可能的值:
      • 1 - 单条文本编排模板。
      • 2 - 单条图文混排模板。
      • 3 - 多条图文混排模板。

sendMessage 方法的返回结果

{
  code: 200,
  data: {
    pubId: 'XT-45ad439f-ce77-488a-91c2-6b0bc63dc4b6',
    sourceMsgId: 'XT-6762dc1cd5dec4c2bce2d435'
  },
  message: '发送成功',
  success: true
}

请求示例

const params = {
  innerTos: [
    { user: ['667aaa5dd5de8eb92bbc7cdc', '337aaa5dd5de8eb92bbc7cdd'] }
  ],
  type: 2,
  msgs: [
    { text: 'Hello, world!' }
  ]
};

imService.sendMessage(params);

注意事项

  • innerTosmsgs 是必填项。
  • type 必须是 MsgType 枚举中的一个值。
  • typeMIXED 时,model 是可选项,但建议提供以确保消息格式正确。