@re-ai/inner-tool-sdk
Advanced tools
Comparing version 0.3.8 to 0.4.0
@@ -18,2 +18,3 @@ import WebSocket from "ws"; | ||
import { WechatRPCService } from "../services/WechatService"; | ||
import { MQTTAPIService } from "../services/MQTTService"; | ||
export declare class ReAITool { | ||
@@ -35,2 +36,5 @@ static sms(options?: RPCClientOptions): SMSService; | ||
static seamless(host: string, roomId?: string): Seamless; | ||
static MQTTDeviceAPI(options?: { | ||
baseUrl: string; | ||
}): MQTTAPIService; | ||
} |
@@ -16,2 +16,3 @@ "use strict"; | ||
const WechatService_1 = require("../services/WechatService"); | ||
const MQTTService_1 = require("../services/MQTTService"); | ||
class ReAITool { | ||
@@ -92,3 +93,8 @@ static sms(options) { | ||
} | ||
static MQTTDeviceAPI(options) { | ||
return new MQTTService_1.MQTTAPIService({ | ||
baseUrl: options?.baseUrl || process.env.REAI_MQTT_API_BASE_URL || 'https://hd.cn.reai.com/api' | ||
}); | ||
} | ||
} | ||
exports.ReAITool = ReAITool; |
@@ -12,2 +12,3 @@ export type OptionsFile = { | ||
export type FileData = { | ||
objectId: string; | ||
name: string; | ||
@@ -14,0 +15,0 @@ url: string; |
{ | ||
"name": "@re-ai/inner-tool-sdk", | ||
"version": "0.3.8", | ||
"version": "0.4.0", | ||
"description": "ReAI内部接口sdk", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -6,2 +6,6 @@ | ||
+ 2024.08.16 | ||
+ 添加硬件MQTT接口, [文档](./doc/mqtt.md) | ||
+ 2024.07.24 | ||
+ 添加微信小程序码获取接口 | ||
+ 2024.07.19 | ||
@@ -50,4 +54,5 @@ + 添加微信小程序获取手机号码接口 | ||
| RPC_HOST_EXPRESS | 文本处理地址 | 127.0.0.1 | | ||
| ONE_API_HOST | one-api服务地址 | | | ||
| ONE_API_HOST | one-api 服务地址 | | | ||
| ONE_API_TOKEN | one-api 管理员token | (只在管理员模式下生效) | | ||
| REAI_MQTT_API_BASE_URL| mqtt服务地址 | https://hd.cn.reai.com/api | | ||
@@ -54,0 +59,0 @@ ### 示例 |
@@ -19,2 +19,3 @@ | ||
import { WechatRPCService } from "../services/WechatService"; | ||
import { MQTTAPIService } from "../services/MQTTService"; | ||
@@ -110,2 +111,9 @@ export class ReAITool { | ||
static MQTTDeviceAPI(options?: { | ||
baseUrl: string | ||
}) { | ||
return new MQTTAPIService({ | ||
baseUrl: options?.baseUrl || process.env.REAI_MQTT_API_BASE_URL || 'https://hd.cn.reai.com/api' | ||
}) | ||
} | ||
} |
@@ -15,2 +15,3 @@ | ||
export type FileData = { | ||
objectId: string, // 文件id | ||
name: string, | ||
@@ -17,0 +18,0 @@ url: string, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
244827
158
6216
235
53
7