Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@re-ai/inner-tool-sdk

Package Overview
Dependencies
Maintainers
0
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@re-ai/inner-tool-sdk - npm Package Compare versions

Comparing version 0.3.7 to 0.3.8

10

dist/interfaces/wechat.d.ts
import { RPCClientResponseResult } from "../types/rpc";
import { WechatMiniCode2SessionResult, WechatMiniGetPhoneNumberResult } from "../types/wechat";
import { WechatMiniCode2SessionResult, WechatMiniGetPhoneNumberResult, WechatMiniQrCodeGetParams, WechatMiniQrCodeGetResult, WechatMiniQrCodeGetType } from "../types/wechat";
export interface WechatRPCInterface {

@@ -25,2 +25,10 @@ /**

miniGetPhoneNumber(code: string): Promise<RPCClientResponseResult<WechatMiniGetPhoneNumberResult>>;
/**
* 获取小程序二维码。
*
* @param type 二维码类型,默认为"default"。
* @param params 二维码参数,根据不同的类型,可以是不同的参数对象。
* @returns 返回一个Promise,解析为包含二维码图片的Buffer。
*/
miniQrCodeGet(type: WechatMiniQrCodeGetType, params: WechatMiniQrCodeGetParams): Promise<RPCClientResponseResult<WechatMiniQrCodeGetResult>>;
}

3

dist/services/WechatService.d.ts
import { WechatRPCInterface } from "../interfaces/wechat";
import { RPCClient } from "../libs/RPCClient";
import { RPCClientOptions, RPCClientResponseResult } from "../types/rpc";
import { WechatMiniCode2SessionResult, WechatMiniGetPhoneNumberResult } from "../types/wechat";
import { WechatMiniCode2SessionResult, WechatMiniGetPhoneNumberResult, WechatMiniQrCodeGetParams, WechatMiniQrCodeGetResult, WechatMiniQrCodeGetType } from "../types/wechat";
export declare class WechatRPCService extends RPCClient implements WechatRPCInterface {

@@ -9,2 +9,3 @@ constructor(options?: RPCClientOptions);

miniGetPhoneNumber(code: string): Promise<RPCClientResponseResult<WechatMiniGetPhoneNumberResult>>;
miniQrCodeGet(type: WechatMiniQrCodeGetType, params: WechatMiniQrCodeGetParams): Promise<RPCClientResponseResult<WechatMiniQrCodeGetResult>>;
}

@@ -24,3 +24,11 @@ "use strict";

}
async miniQrCodeGet(type, params) {
return await this._request(wechat_1.WechatRPCMethods.MINI_QRCODE_GET, {
body: {
type,
params
}
});
}
}
exports.WechatRPCService = WechatRPCService;
export declare enum WechatRPCMethods {
MINI_CODE2SESSION = "miniCode2Session",
MINI_GETPHONENUMBER = "miniGetPhoneNumber"
MINI_GETPHONENUMBER = "miniGetPhoneNumber",
MINI_QRCODE_GET = "miniQrCodeGet"
}

@@ -19,1 +20,28 @@ export type WechatMiniCode2SessionResult = {

};
export type WechatMiniQrCodeGetType = "default" | "unlimited" | "qrcode";
export type WechatMiniQrCodeGetBaseParams = {
width?: number;
autoColor?: boolean;
lineColor?: {
r: number;
g: number;
b: number;
};
isHyaline?: boolean;
env_version?: "release" | "trial" | "develop";
};
export type WechatMiniQrCodeGetDefaultParams = WechatMiniQrCodeGetBaseParams & {
path: string;
};
export type WechatMiniQrCodeGetUnlimitedParams = {
scene: string;
check_path?: boolean;
} & WechatMiniQrCodeGetBaseParams;
export type WechatMiniQrCodeGetQrCodeParams = {
path: string;
width?: number;
};
export type WechatMiniQrCodeGetParams = WechatMiniQrCodeGetUnlimitedParams | WechatMiniQrCodeGetDefaultParams | WechatMiniQrCodeGetQrCodeParams;
export type WechatMiniQrCodeGetResult = {
buffer: string;
};

@@ -8,2 +8,3 @@ "use strict";

WechatRPCMethods["MINI_GETPHONENUMBER"] = "miniGetPhoneNumber";
WechatRPCMethods["MINI_QRCODE_GET"] = "miniQrCodeGet";
})(WechatRPCMethods || (exports.WechatRPCMethods = WechatRPCMethods = {}));

@@ -0,0 +0,0 @@ ### 示例代码

@@ -0,0 +0,0 @@ # 文件上传及管理

@@ -0,0 +0,0 @@ # 硬件ws消息发送接口sdk

@@ -0,0 +0,0 @@ # OneAPI 接口文档

{
"name": "@re-ai/inner-tool-sdk",
"version": "0.3.7",
"version": "0.3.8",
"description": "ReAI内部接口sdk",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -0,0 +0,0 @@

@@ -0,0 +0,0 @@

@@ -0,0 +0,0 @@ export * from './types/sms'

@@ -0,0 +0,0 @@ import { WSBridgePayload } from "../types/bridge";

@@ -0,0 +0,0 @@ import { DIFYChatMessageData, DIFYChunkChatCompletionResponse, DIFYHitTestResult } from "../types/dify";

@@ -0,0 +0,0 @@ import { ExpressQueryReqData, ExpressQueryResData } from "../types/express";

@@ -0,0 +0,0 @@ import { FileData, FileListResult, FileUploadResult } from "../types/file";

@@ -0,0 +0,0 @@ import { HDWSMessageRecieveKeys, HDWSMessageRecieveResultData } from "../../types/hd/message";

@@ -0,0 +0,0 @@ import { HDInfoTypes } from "../../types/hd/message";

@@ -0,0 +0,0 @@ import { OneAPIChannelData, OneAPIChannelListData, OneAPIChannelListReq, OneAPILoginReq, OneAPILoginRes, OneAPILogsListData, OneAPILogsReq, OneAPIModelsData, OneAPIPriceData, OneAPIRedemptionAddReq, OneAPIRedemptionData, OneAPIRedemptionListData, OneAPIRedemptionReq, OneAPIRegisterReq, OneAPIResponse, OneAPISelfData, OneAPITokenAddReq, OneAPITokenData, OneAPITokenListData, OneAPITokenListReq, OneAPITokenUpdateReq, OneAPITopupReq } from "../types/oneapi";

@@ -0,0 +0,0 @@ import { PayOrderCreateData, PayOrderInfo, PayOrderRefundCreateData, PayOrderRefundCreateInfo, PayOrderRefundInfo, PayType } from "../types/pay";

@@ -0,0 +0,0 @@ import { RPCClientResponseResult } from "../types/rpc";

@@ -0,0 +0,0 @@ import { RPCClientResponseResult } from "../types/rpc";

@@ -0,0 +0,0 @@ export interface ITranslate {

import { RPCClientResponseResult } from "../types/rpc";
import { WechatMiniCode2SessionResult, WechatMiniGetPhoneNumberResult } from "../types/wechat";
import { WechatMiniCode2SessionResult, WechatMiniGetPhoneNumberResult, WechatMiniQrCodeGetParams, WechatMiniQrCodeGetResult, WechatMiniQrCodeGetType } from "../types/wechat";

@@ -29,2 +29,11 @@ export interface WechatRPCInterface {

miniGetPhoneNumber(code: string): Promise<RPCClientResponseResult<WechatMiniGetPhoneNumberResult>>
/**
* 获取小程序二维码。
*
* @param type 二维码类型,默认为"default"。
* @param params 二维码参数,根据不同的类型,可以是不同的参数对象。
* @returns 返回一个Promise,解析为包含二维码图片的Buffer。
*/
miniQrCodeGet(type: WechatMiniQrCodeGetType, params: WechatMiniQrCodeGetParams): Promise<RPCClientResponseResult<WechatMiniQrCodeGetResult>>
}

@@ -0,0 +0,0 @@ import { DIFYChatCompletionResponse, DIFYChatMessageData, DIFYChunkChatCompletionResponse, DIFYHitTestResult, DIFYOptions } from "../types/dify";

@@ -0,0 +0,0 @@ import axios, { AxiosRequestConfig, AxiosResponse } from "axios";

@@ -0,0 +0,0 @@ import jayson, { TcpClient } from "jayson";

@@ -0,0 +0,0 @@ import WebSocket, { CloseEvent, ErrorEvent, MessageEvent } from "ws"

@@ -0,0 +0,0 @@ import { DifyInterface } from "../interfaces/dify";

@@ -0,0 +0,0 @@ import { ExpressInterface } from "../interfaces/express";

@@ -0,0 +0,0 @@ import { readFileSync } from "fs";

@@ -0,0 +0,0 @@ import WebSocket from "ws";

@@ -0,0 +0,0 @@ // import { join } from "path";

@@ -0,0 +0,0 @@ import { PayInterface } from "../interfaces/pay";

@@ -0,0 +0,0 @@ import WebSocket, { CloseEvent, Data, ErrorEvent, MessageEvent, OpenEvent } from "ws";

@@ -0,0 +0,0 @@ import { SMSInterface } from "../interfaces/sms";

import { WechatRPCInterface } from "../interfaces/wechat";
import { RPCClient } from "../libs/RPCClient";
import { RPCClientOptions, RPCClientResponseResult } from "../types/rpc";
import { WechatMiniCode2SessionResult, WechatMiniGetPhoneNumberResult, WechatRPCMethods } from "../types/wechat";
import { WechatMiniCode2SessionResult, WechatMiniGetPhoneNumberResult, WechatMiniQrCodeGetParams, WechatMiniQrCodeGetResult, WechatMiniQrCodeGetType, WechatRPCMethods } from "../types/wechat";

@@ -26,2 +26,11 @@ export class WechatRPCService extends RPCClient implements WechatRPCInterface {

}
async miniQrCodeGet(type: WechatMiniQrCodeGetType, params: WechatMiniQrCodeGetParams): Promise<RPCClientResponseResult<WechatMiniQrCodeGetResult>> {
return await this._request<WechatMiniQrCodeGetResult>(WechatRPCMethods.MINI_QRCODE_GET, {
body: {
type,
params
}
});
}
}

@@ -0,0 +0,0 @@

@@ -0,0 +0,0 @@ export type DIFYChatMessageData = {

@@ -0,0 +0,0 @@ export type ExpressQueryReqData = {

@@ -0,0 +0,0 @@

@@ -0,0 +0,0 @@ export enum HDInfoTypes {

@@ -0,0 +0,0 @@

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ export type SeamlessOptions = {

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ export enum TextPlatform {

export enum WechatRPCMethods {
MINI_CODE2SESSION = "miniCode2Session",
MINI_GETPHONENUMBER = "miniGetPhoneNumber"
MINI_GETPHONENUMBER = "miniGetPhoneNumber",
MINI_QRCODE_GET = "miniQrCodeGet"
}

@@ -12,3 +13,3 @@

export type WechatMiniGetPhoneNumberResult ={
export type WechatMiniGetPhoneNumberResult = {
phoneNumber: string,

@@ -21,2 +22,36 @@ purePhoneNumber: string,

}
}
export type WechatMiniQrCodeGetType = "default" | "unlimited" | "qrcode"
export type WechatMiniQrCodeGetBaseParams = {
width?: number,
autoColor?: boolean,
lineColor?: {
r: number,
g: number,
b: number
},
isHyaline?: boolean,
env_version?: "release" | "trial" | "develop"
}
export type WechatMiniQrCodeGetDefaultParams = WechatMiniQrCodeGetBaseParams & {
path: string
}
export type WechatMiniQrCodeGetUnlimitedParams = {
scene: string,
check_path?: boolean
} & WechatMiniQrCodeGetBaseParams
export type WechatMiniQrCodeGetQrCodeParams = {
path: string,
width?: number
}
export type WechatMiniQrCodeGetParams = WechatMiniQrCodeGetUnlimitedParams | WechatMiniQrCodeGetDefaultParams | WechatMiniQrCodeGetQrCodeParams
export type WechatMiniQrCodeGetResult = {
buffer: string
}

@@ -0,0 +0,0 @@ export const getCurrentDate = (): string => {

@@ -0,0 +0,0 @@ export enum LogLevel {

@@ -0,0 +0,0 @@ {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc