@re-ai/inner-tool-sdk
Advanced tools
Comparing version 0.2.5 to 0.2.6
@@ -0,2 +1,4 @@ | ||
import WebSocket from "ws"; | ||
import { DifyService } from "../services/DifyService"; | ||
import { HDMessageService } from "../services/HDMessageService"; | ||
import { PayService } from "../services/PayService"; | ||
@@ -19,2 +21,3 @@ import { SMSService } from "../services/SMSService"; | ||
static dify(options: DIFYOptions): DifyService; | ||
static hdMessage(ws: WebSocket): HDMessageService; | ||
} |
@@ -5,2 +5,3 @@ "use strict"; | ||
const DifyService_1 = require("../services/DifyService"); | ||
const HDMessageService_1 = require("../services/HDMessageService"); | ||
const PayService_1 = require("../services/PayService"); | ||
@@ -49,3 +50,6 @@ const SMSService_1 = require("../services/SMSService"); | ||
} | ||
static hdMessage(ws) { | ||
return new HDMessageService_1.HDMessageService(ws); | ||
} | ||
} | ||
exports.ReAITool = ReAITool; |
export * from './types/sms'; | ||
export * from './types/pay'; | ||
export * from './types/text'; | ||
export * from './types/dify'; | ||
export * from './types/oneapi'; | ||
export * from './types/hd/message'; | ||
export * from './entrys'; |
@@ -19,3 +19,6 @@ "use strict"; | ||
__exportStar(require("./types/pay"), exports); | ||
__exportStar(require("./types/text"), exports); | ||
__exportStar(require("./types/dify"), exports); | ||
__exportStar(require("./types/oneapi"), exports); | ||
__exportStar(require("./types/hd/message"), exports); | ||
__exportStar(require("./entrys"), exports); |
{ | ||
"name": "@re-ai/inner-tool-sdk", | ||
"version": "0.2.5", | ||
"version": "0.2.6", | ||
"description": "ReAI内部接口sdk", | ||
@@ -24,4 +24,5 @@ "main": "dist/index.js", | ||
"axios": "^1.6.8", | ||
"jayson": "^4.1.0" | ||
"jayson": "^4.1.0", | ||
"ws": "^8.17.1" | ||
} | ||
} | ||
} |
@@ -8,3 +8,6 @@ | ||
+ one-api接口,[接口说明看这里](./doc/oneapi.md), 环境变量添加 `REAI_ONE_API_TOKEN` , `REAI_ONE_API_HOST` | ||
+ 2023.06.17 | ||
+ 添加文本处理(快递地址解析) | ||
+ 添加硬件ws消息的处理个发送,[文档](./doc/hd.md) | ||
+ | ||
## 使用方法 | ||
@@ -79,3 +82,16 @@ | ||
#### 文本处理 | ||
```typescript | ||
import { ReAITool, TextPlatform } from '@re-ai/inner-tool-sdk' | ||
ReAITool.text().address({ | ||
platform: TextPlatform.ALIYUN, | ||
text: "需要处理的地址文本" | ||
}).then(res => { | ||
console.log(res); | ||
}) | ||
``` | ||
## 支付接口 | ||
@@ -126,5 +142,5 @@ | ||
## 枚举和类型 | ||
### 枚举和类型 | ||
### `PayType` | ||
#### `PayType` | ||
定义支付系统的类型。 | ||
@@ -134,5 +150,25 @@ - `wxpay`: 微信支付 | ||
### `SMSPlatforms` | ||
#### `SMSPlatforms` | ||
定义发送短信的平台。 | ||
- `ali`: 阿里云 | ||
- `tx`: 腾讯云 | ||
## 文本处理接口 | ||
### 方法 | ||
#### `address(data: TextAddressArgs): Promise<RPCClientResponseResult<TextAddressResult>>` | ||
- **参数** | ||
- `data` (`TextAddressArgs`): 包含文本处理数据的对象。 | ||
- `platform` (`TextPlatform`): 文本处理平台(`ali` 阿里云或 `tx` 腾讯云)。 | ||
- `text` (`string`): 要处理的文本。 | ||
### 枚举和类型 | ||
#### `TextPlatform` | ||
定义文本处理系统的类型。 | ||
- `aliyun`: 阿里云 | ||
- `baidu`: 百度 |
import WebSocket from "ws"; | ||
import { DifyService } from "../services/DifyService"; | ||
import { HDMessageService } from "../services/HDMessageService"; | ||
import { PayService } from "../services/PayService"; | ||
@@ -55,2 +57,6 @@ import { SMSService } from "../services/SMSService"; | ||
static hdMessage(ws: WebSocket) { | ||
return new HDMessageService(ws) | ||
} | ||
} |
export * from './types/sms' | ||
export * from './types/pay' | ||
export * from './types/text' | ||
export * from './types/dify' | ||
export * from './types/oneapi' | ||
export * from './types/hd/message' | ||
export * from './entrys' |
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
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
135624
95
3617
171
3
+ Addedws@^8.17.1
+ Addedws@8.18.0(transitive)