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

@re-ai/inner-tool-sdk

v0.1.0

Published

ReAI内部接口sdk

Downloads

300

Readme

ReAI 内部接口 sdk

使用方法

安装

npm i @re-ai/inner-tool-sdk
import { ReAITool, SMSPlatforms } from '@re-ai/inner-tool-sdk'

// 发送短信
ReAITool.sms().smsCodeSend({
    platform: SMSPlatforms.ALI,
    mobile: "xxxxxxxx"
})

// 验证短信
ReAITool.sms().smsCodeVerify({
    mobile: "xxxxxxxx",
    code: "xxxxxxxx"
})

支付接口

方法

create(data: PayOrderCreateData): Promise<RPCClientResponseResult<PayOrderInfo>>

创建新的支付订单。

  • 参数:
    • data (PayOrderCreateData): 包含订单创建数据的对象。
      • orderNo (string): 唯一订单号。
      • amount (number): 订单总金额。
      • desc (string): 订单描述。
      • ip (string): 发起订单的IP地址。
      • type (PayType): 支付类型(wxpay 微信支付或 alipay 支付宝支付)。
      • platform ("pc" | "h5" | "jsapi"): 发起订单的平台。
      • returnUrl (string?): 支付成功后重定向的URL。
      • notifyUrl (string?): 接收支付通知的URL。

get(orderNo: string): Promise<RPCClientResponseResult<PayOrderInfo>>

获取现有订单的详细信息。

  • 参数:
    • orderNo (string): 订单的唯一标识符。

短信接口

方法

smsCodeSend(data: SMSSendArgs): Promise<RPCClientResponseResult<SMSSendRes>>

发送短信验证码。

  • 参数:
    • data (SMSSendArgs): 包含发送短信数据的对象。
      • mobile (string): 将发送短信的手机号码。
      • platform (SMSPlatforms): 将使用的短信平台(ali 阿里云或 tx 腾讯云)。

smsCodeVerify(data: SMSVerifyArgs): Promise<RPCClientResponseResult<undefined>>

验证用户接收到的短信验证码。

  • 参数:
    • data (SMSVerifyArgs): 包含验证数据的对象。
      • mobile (string): 与短信验证码相关联的手机号码。
      • code (string): 要验证的验证码。

枚举和类型

PayType

定义支付系统的类型。

  • wxpay: 微信支付
  • alipay: 支付宝支付

SMSPlatforms

定义发送短信的平台。

  • ali: 阿里云
  • tx: 腾讯云