DingTalkChannelProperties
public record DingTalkChannelProperties( String appKey, String appSecret, String robotCode, String mode, String aesKey, String apiBase, String oapiBase, String streamRegisterUrl)
io/agentscope/extensions/channel/dingtalk/DingTalkChannelProperties.java:41–136承载 DingTalk 渠道属性数据的记录类型。位于 io.agentscope.extensions.channel.dingtalk 包。核心成员包括 appKey、appSecret、robotCode、mode、aesKey、apiBase。
Configuration for a single DingTalk (钉钉) channel instance.
Reception mode: #MODE_STREAM (default) receives bot messages over a persistent
WebSocket connection; #MODE_HTTP receives them via signed HTTP callbacks delivered to
/api/channels/dingtalk/{channelId}/callback, requiring a Spring web application.
记录组件摘要Record Component Summary
| 组件Component | 类型Type | 说明Description |
|---|---|---|
appKey | String | 执行应用键相关操作。 enterprise internal app key |
appSecret | String | 执行应用密钥相关操作。 enterprise internal app secret |
robotCode | String | 执行 `robotCode` 方法。 robot code used as outbound sender id; required for replies |
mode | String | 执行模式相关操作。 reception mode: `stream` (default) or `http` |
aesKey | String | 执行 `aesKey` 方法。 43-character base64 (no padding) AES key for callback body decryption; only used
in `http` mode, and only required when the robot is configured with encryption |
apiBase | String | 执行API 基类相关操作。 override for the DingTalk OpenAPI base; default
`https://api.dingtalk.com` |
oapiBase | String | 执行 `oapiBase` 方法。 override for the legacy OAPI base used by `gettoken`; default
`https://oapi.dingtalk.com` |
streamRegisterUrl | String | 执行注册 URL。 override for the Stream gateway registration endpoint; default
`https://api.dingtalk.com/v1.0/gateway/connections/open` |
字段摘要Field Summary
| 字段Field | 类型Type | 说明Description |
|---|---|---|
MODE_STREAMstaticfinal | String | 模式流字段。 Reception mode value: bot messages arrive over a persistent Stream WebSocket. |
MODE_HTTPstaticfinal | String | 模式 HTTP字段。 Reception mode value: bot messages arrive as signed HTTP callbacks. |
DEFAULT_API_BASEstaticfinal | String | 默认 API 基类字段。 The DEFAULT API BASE field. |
DEFAULT_OAPI_BASEstaticfinal | String | 默认 OAPI 基类字段。 The DEFAULT OAPI BASE field. |
DEFAULT_STREAM_REGISTER_URLstaticfinal | String | 默认流注册 URL字段。 The DEFAULT STREAM REGISTER URL field. |
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public DingTalkChannelProperties(String appKey, String appSecret, String robotCode, String mode, String aesKey, String apiBase, String oapiBase, String streamRegisterUrl) | 初始化 `DingTalkChannelProperties` 实例。 Creates a new instance. |
public DingTalkChannelProperties(String appKey, String appSecret, String robotCode, String apiBase, String oapiBase, String streamRegisterUrl)deprecated | 初始化 `DingTalkChannelProperties` 实例。 Convenience constructor matching the pre-callback-mode signature; delegates with `
mode=stream` and no `aesKey`. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public static DingTalkChannelProperties from(String channelId, Map<String, Object> props)static | 创建并返回实例。 Reads a `DingTalkChannelProperties` out of an arbitrary properties map. |
记录组件详情Record Component Detail
appKey
String appKey执行应用键相关操作。
enterprise internal app key
io/agentscope/extensions/channel/dingtalk/DingTalkChannelProperties.java:41–136appSecret
String appSecret执行应用密钥相关操作。
enterprise internal app secret
io/agentscope/extensions/channel/dingtalk/DingTalkChannelProperties.java:41–136robotCode
String robotCode执行 robotCode 方法。
robot code used as outbound sender id; required for replies
io/agentscope/extensions/channel/dingtalk/DingTalkChannelProperties.java:41–136mode
String mode执行模式相关操作。
reception mode: stream (default) or http
io/agentscope/extensions/channel/dingtalk/DingTalkChannelProperties.java:41–136aesKey
String aesKey执行 aesKey 方法。
43-character base64 (no padding) AES key for callback body decryption; only used
in http mode, and only required when the robot is configured with encryption
io/agentscope/extensions/channel/dingtalk/DingTalkChannelProperties.java:41–136apiBase
String apiBase执行API 基类相关操作。
override for the DingTalk OpenAPI base; default
https://api.dingtalk.com
io/agentscope/extensions/channel/dingtalk/DingTalkChannelProperties.java:41–136oapiBase
String oapiBase执行 oapiBase 方法。
override for the legacy OAPI base used by gettoken; default
https://oapi.dingtalk.com
io/agentscope/extensions/channel/dingtalk/DingTalkChannelProperties.java:41–136streamRegisterUrl
String streamRegisterUrl执行注册 URL。
override for the Stream gateway registration endpoint; default
https://api.dingtalk.com/v1.0/gateway/connections/open
io/agentscope/extensions/channel/dingtalk/DingTalkChannelProperties.java:41–136字段详情Field Detail
MODE_STREAM
public static final String MODE_STREAM
模式流字段。声明为 public static final String MODE_STREAM。
Reception mode value: bot messages arrive over a persistent Stream WebSocket.
io/agentscope/extensions/channel/dingtalk/DingTalkChannelProperties.java:52MODE_HTTP
public static final String MODE_HTTP
模式 HTTP字段。声明为 public static final String MODE_HTTP。
Reception mode value: bot messages arrive as signed HTTP callbacks.
io/agentscope/extensions/channel/dingtalk/DingTalkChannelProperties.java:55DEFAULT_API_BASE
public static final String DEFAULT_API_BASE
默认 API 基类字段。声明为 public static final String DEFAULT_API_BASE。
The DEFAULT API BASE field.
io/agentscope/extensions/channel/dingtalk/DingTalkChannelProperties.java:57DEFAULT_OAPI_BASE
public static final String DEFAULT_OAPI_BASE
默认 OAPI 基类字段。声明为 public static final String DEFAULT_OAPI_BASE。
The DEFAULT OAPI BASE field.
io/agentscope/extensions/channel/dingtalk/DingTalkChannelProperties.java:58DEFAULT_STREAM_REGISTER_URL
public static final String DEFAULT_STREAM_REGISTER_URL
默认流注册 URL字段。声明为 public static final String DEFAULT_STREAM_REGISTER_URL。
The DEFAULT STREAM REGISTER URL field.
io/agentscope/extensions/channel/dingtalk/DingTalkChannelProperties.java:59–60构造器详情Constructor Detail
DingTalkChannelProperties
public DingTalkChannelProperties(String appKey, String appSecret, String robotCode, String mode, String aesKey, String apiBase, String oapiBase, String streamRegisterUrl)
初始化 DingTalkChannelProperties 实例。
Creates a new instance.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
appKey | String | 应用键(类型 `String`)。The app key. |
appSecret | String | 应用密钥(类型 `String`)。The app secret. |
robotCode | String | robot Code(类型 `String`)。The robot code. |
mode | String | 模式(类型 `String`)。The mode. |
aesKey | String | aes 键(类型 `String`)。The aes key. |
apiBase | String | API 基类(类型 `String`)。The api base. |
oapiBase | String | oapi 基类(类型 `String`)。The oapi base. |
streamRegisterUrl | String | 流注册 URL(类型 `String`)。The stream register url. |
io/agentscope/extensions/channel/dingtalk/DingTalkChannelProperties.java:62–97DingTalkChannelProperties
public DingTalkChannelProperties(String appKey, String appSecret, String robotCode, String apiBase, String oapiBase, String streamRegisterUrl)
初始化 DingTalkChannelProperties 实例。
Convenience constructor matching the pre-callback-mode signature; delegates with mode=stream and no aesKey.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
appKey | String | 应用键(类型 `String`)。The app key. |
appSecret | String | 应用密钥(类型 `String`)。The app secret. |
robotCode | String | robot Code(类型 `String`)。The robot code. |
apiBase | String | API 基类(类型 `String`)。The api base. |
oapiBase | String | oapi 基类(类型 `String`)。The oapi base. |
streamRegisterUrl | String | 流注册 URL(类型 `String`)。The stream register url. |
io/agentscope/extensions/channel/dingtalk/DingTalkChannelProperties.java:106–115方法详情Method Detail
from
public static DingTalkChannelProperties from(String channelId, Map<String, Object> props)
创建并返回实例。
Reads a DingTalkChannelProperties out of an arbitrary properties map.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
channelId | String | 渠道标识(类型 `String`)。The channel id. |
props | Map<String, Object> | props(类型 `Map`)。The props. |
DingTalkChannelPropertiesio/agentscope/extensions/channel/dingtalk/DingTalkChannelProperties.java:118–130