tencentcloud-sdk-nodejs-tbp 4.0.882 → 4.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,315 +0,0 @@
1
- /*
2
- * Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing,
11
- * software distributed under the License is distributed on an
12
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
13
- * KIND, either express or implied. See the License for the
14
- * specific language governing permissions and limitations
15
- * under the License.
16
- */
17
-
18
- /**
19
- * TextProcess返回参数结构体
20
- */
21
- export interface TextProcessResponse {
22
- /**
23
- * 当前会话状态{会话开始: START; 会话中: COUTINUE; 会话结束: COMPLETE}。
24
- 注意:此字段可能返回 null,表示取不到有效值。
25
- */
26
- DialogStatus?: string
27
- /**
28
- * 匹配到的机器人名称。
29
- 注意:此字段可能返回 null,表示取不到有效值。
30
- */
31
- BotName?: string
32
- /**
33
- * 匹配到的意图名称。
34
- 注意:此字段可能返回 null,表示取不到有效值。
35
- */
36
- IntentName?: string
37
- /**
38
- * 槽位信息。
39
- 注意:此字段可能返回 null,表示取不到有效值。
40
- */
41
- SlotInfoList?: Array<SlotInfo>
42
- /**
43
- * 原始的用户说法。
44
- 注意:此字段可能返回 null,表示取不到有效值。
45
- */
46
- InputText?: string
47
- /**
48
- * 透传字段,由用户自定义的WebService服务返回。
49
- 注意:此字段可能返回 null,表示取不到有效值。
50
- */
51
- SessionAttributes?: string
52
- /**
53
- * 机器人对话的应答文本。
54
- 注意:此字段可能返回 null,表示取不到有效值。
55
- */
56
- ResponseText?: string
57
- /**
58
- * 结果类型 {中间逻辑出错:0; 任务型机器人:1; 问答型机器人:2; 闲聊型机器人:3; 未匹配上,返回预设兜底话术:5; 未匹配上,返回相似问题列表:6}。
59
- 注意:此字段可能返回 null,表示取不到有效值。
60
- */
61
- ResultType?: string
62
- /**
63
- * 机器人应答。
64
- 注意:此字段可能返回 null,表示取不到有效值。
65
- */
66
- ResponseMessage?: ResponseMessage
67
- /**
68
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
69
- */
70
- RequestId?: string
71
- }
72
-
73
- /**
74
- * Group是消息组的具体定义,当前包含ContentType、Url、Content三个字段。其中,具体的ContentType字段定义,参考互联网MIME类型标准。
75
- */
76
- export interface Group {
77
- /**
78
- * 消息类型参考互联网MIME类型标准,当前仅支持"text/plain"。
79
- */
80
- ContentType?: string
81
- /**
82
- * 返回内容以链接形式提供。
83
- 注意:此字段可能返回 null,表示取不到有效值。
84
- */
85
- Url?: string
86
- /**
87
- * 普通文本。
88
- 注意:此字段可能返回 null,表示取不到有效值。
89
- */
90
- Content?: string
91
- }
92
-
93
- /**
94
- * 槽位信息
95
- */
96
- export interface SlotInfo {
97
- /**
98
- * 槽位名称
99
- 注意:此字段可能返回 null,表示取不到有效值。
100
- */
101
- SlotName: string
102
- /**
103
- * 槽位值
104
- 注意:此字段可能返回 null,表示取不到有效值。
105
- */
106
- SlotValue: string
107
- }
108
-
109
- /**
110
- * TextReset请求参数结构体
111
- */
112
- export interface TextResetRequest {
113
- /**
114
- * 机器人标识,用于定义抽象机器人。
115
- */
116
- BotId: string
117
- /**
118
- * 终端标识,每个终端(或线程)对应一个,区分并发多用户。
119
- */
120
- TerminalId: string
121
- /**
122
- * 机器人版本,取值"dev"或"release",{调试版本:dev;线上版本:release}。
123
- */
124
- BotEnv?: string
125
- }
126
-
127
- /**
128
- * Reset请求参数结构体
129
- */
130
- export interface ResetRequest {
131
- /**
132
- * 机器人标识
133
- */
134
- BotId: string
135
- /**
136
- * 子账户id,每个终端对应一个
137
- */
138
- UserId: string
139
- /**
140
- * 机器人版本号。BotVersion/BotEnv二选一:二者均填,仅BotVersion有效;二者均不填,默认BotEnv=dev
141
- */
142
- BotVersion?: string
143
- /**
144
- * 机器人环境{dev:测试;release:线上}。BotVersion/BotEnv二选一:二者均填,仅BotVersion有效;二者均不填,默认BotEnv=dev
145
- */
146
- BotEnv?: string
147
- }
148
-
149
- /**
150
- * TextReset返回参数结构体
151
- */
152
- export interface TextResetResponse {
153
- /**
154
- * 当前会话状态,取值:"START"/"COUTINUE"/"COMPLETE"。
155
- 注意:此字段可能返回 null,表示取不到有效值。
156
- */
157
- DialogStatus?: string
158
- /**
159
- * 匹配到的机器人名称。
160
- 注意:此字段可能返回 null,表示取不到有效值。
161
- */
162
- BotName?: string
163
- /**
164
- * 匹配到的意图名称。
165
- 注意:此字段可能返回 null,表示取不到有效值。
166
- */
167
- IntentName?: string
168
- /**
169
- * 槽位信息。
170
- 注意:此字段可能返回 null,表示取不到有效值。
171
- */
172
- SlotInfoList?: Array<SlotInfo>
173
- /**
174
- * 原始的用户说法。
175
- 注意:此字段可能返回 null,表示取不到有效值。
176
- */
177
- InputText?: string
178
- /**
179
- * 透传字段,由用户自定义的WebService服务返回。
180
- 注意:此字段可能返回 null,表示取不到有效值。
181
- */
182
- SessionAttributes?: string
183
- /**
184
- * 机器人对话的应答文本。
185
- 注意:此字段可能返回 null,表示取不到有效值。
186
- */
187
- ResponseText?: string
188
- /**
189
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
190
- */
191
- RequestId?: string
192
- }
193
-
194
- /**
195
- * 从TBP-RTS服务v1.3版本起,机器人以消息组列表的形式响应,消息组列表GroupList包含多组消息,用户根据需要对部分或全部消息组进行组合使用。
196
- */
197
- export interface ResponseMessage {
198
- /**
199
- * 消息组列表。
200
- 注意:此字段可能返回 null,表示取不到有效值。
201
- */
202
- GroupList?: Array<Group>
203
- }
204
-
205
- /**
206
- * CreateBot返回参数结构体
207
- */
208
- export interface CreateBotResponse {
209
- /**
210
- * 任务ID
211
- */
212
- TaskRequestId?: string
213
- /**
214
- * 任务信息
215
- */
216
- Msg?: string
217
- /**
218
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
219
- */
220
- RequestId?: string
221
- }
222
-
223
- /**
224
- * Reset返回参数结构体
225
- */
226
- export interface ResetResponse {
227
- /**
228
- * 当前会话状态。取值:"start"/"continue"/"complete"
229
- 注意:此字段可能返回 null,表示取不到有效值。
230
- */
231
- DialogStatus?: string
232
- /**
233
- * 匹配到的机器人名称
234
- 注意:此字段可能返回 null,表示取不到有效值。
235
- */
236
- BotName?: string
237
- /**
238
- * 匹配到的意图名称
239
- 注意:此字段可能返回 null,表示取不到有效值。
240
- */
241
- IntentName?: string
242
- /**
243
- * 机器人回答
244
- */
245
- ResponseText?: string
246
- /**
247
- * 语义解析的槽位结果列表
248
- 注意:此字段可能返回 null,表示取不到有效值。
249
- */
250
- SlotInfoList?: Array<SlotInfo>
251
- /**
252
- * 透传字段
253
- 注意:此字段可能返回 null,表示取不到有效值。
254
- */
255
- SessionAttributes?: string
256
- /**
257
- * 用户说法。该说法是用户原生说法或ASR识别结果,未经过语义优化
258
- 注意:此字段可能返回 null,表示取不到有效值。
259
- */
260
- Question?: string
261
- /**
262
- * tts合成pcm音频存储链接。仅当请求参数NeedTts=true时返回
263
- 注意:此字段可能返回 null,表示取不到有效值。
264
- */
265
- WaveUrl?: string
266
- /**
267
- * tts合成的pcm音频。二进制数组经过base64编码(暂时不返回)
268
- 注意:此字段可能返回 null,表示取不到有效值。
269
- */
270
- WaveData?: string
271
- /**
272
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
273
- */
274
- RequestId?: string
275
- }
276
-
277
- /**
278
- * CreateBot请求参数结构体
279
- */
280
- export interface CreateBotRequest {
281
- /**
282
- * 机器人名称
283
- */
284
- BotName: string
285
- /**
286
- * 机器人中文名称
287
- */
288
- BotCnName?: string
289
- }
290
-
291
- /**
292
- * TextProcess请求参数结构体
293
- */
294
- export interface TextProcessRequest {
295
- /**
296
- * 机器人标识,用于定义抽象机器人。
297
- */
298
- BotId: string
299
- /**
300
- * 终端标识,每个终端(或线程)对应一个,区分并发多用户。
301
- */
302
- TerminalId: string
303
- /**
304
- * 请求的文本。
305
- */
306
- InputText: string
307
- /**
308
- * 机器人版本,取值"dev"或"release",{调试版本:dev;线上版本:release}。
309
- */
310
- BotEnv?: string
311
- /**
312
- * 透传字段,透传给用户自定义的WebService服务。
313
- */
314
- SessionAttributes?: string
315
- }
@@ -1,6 +0,0 @@
1
- import * as Models from "./tbp_models"
2
- import { Client } from "./tbp_client"
3
- export const v20190627 = {
4
- Client: Client,
5
- Models: Models,
6
- }
@@ -1,57 +0,0 @@
1
- /* eslint-disable @typescript-eslint/no-unused-vars */
2
- /*
3
- * Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing,
12
- * software distributed under the License is distributed on an
13
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
- * KIND, either express or implied. See the License for the
15
- * specific language governing permissions and limitations
16
- * under the License.
17
- */
18
- import * as TencentCloudCommon from "tencentcloud-sdk-nodejs-common"
19
- import {
20
- TextProcessResponse,
21
- Group,
22
- SlotInfo,
23
- TextResetRequest,
24
- TextResetResponse,
25
- ResponseMessage,
26
- TextProcessRequest,
27
- } from "./tbp_models"
28
-
29
- /**
30
- * tbp client
31
- * @class
32
- */
33
- export class Client extends TencentCloudCommon.AbstractClient {
34
- constructor(clientConfig: TencentCloudCommon.ClientConfig) {
35
- super("tbp.tencentcloudapi.com", "2019-06-27", clientConfig)
36
- }
37
-
38
- /**
39
- * 会话重置接口。
40
- */
41
- async TextReset(
42
- req: TextResetRequest,
43
- cb?: (error: string, rep: TextResetResponse) => void
44
- ): Promise<TextResetResponse> {
45
- return this.request("TextReset", req, cb)
46
- }
47
-
48
- /**
49
- * 接收调用侧的文本输入,返回应答文本。
50
- */
51
- async TextProcess(
52
- req: TextProcessRequest,
53
- cb?: (error: string, rep: TextProcessResponse) => void
54
- ): Promise<TextProcessResponse> {
55
- return this.request("TextProcess", req, cb)
56
- }
57
- }
@@ -1,232 +0,0 @@
1
- /*
2
- * Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing,
11
- * software distributed under the License is distributed on an
12
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
13
- * KIND, either express or implied. See the License for the
14
- * specific language governing permissions and limitations
15
- * under the License.
16
- */
17
-
18
- /**
19
- * TextProcess返回参数结构体
20
- */
21
- export interface TextProcessResponse {
22
- /**
23
- * 当前会话状态{会话开始: START; 会话中: COUTINUE; 会话结束: COMPLETE}。
24
- 注意:此字段可能返回 null,表示取不到有效值。
25
- */
26
- DialogStatus?: string
27
- /**
28
- * 匹配到的机器人名称。
29
- 注意:此字段可能返回 null,表示取不到有效值。
30
- */
31
- BotName?: string
32
- /**
33
- * 匹配到的意图名称。
34
- 注意:此字段可能返回 null,表示取不到有效值。
35
- */
36
- IntentName?: string
37
- /**
38
- * 槽位信息。
39
- 注意:此字段可能返回 null,表示取不到有效值。
40
- */
41
- SlotInfoList?: Array<SlotInfo>
42
- /**
43
- * 原始的用户说法。
44
- 注意:此字段可能返回 null,表示取不到有效值。
45
- */
46
- InputText?: string
47
- /**
48
- * 机器人应答。
49
- 注意:此字段可能返回 null,表示取不到有效值。
50
- */
51
- ResponseMessage?: ResponseMessage
52
- /**
53
- * 透传字段,由用户自定义的WebService服务返回。
54
- 注意:此字段可能返回 null,表示取不到有效值。
55
- */
56
- SessionAttributes?: string
57
- /**
58
- * 结果类型 {中间逻辑出错:0; 任务型机器人:1; 问答型机器人:2; 闲聊型机器人:3; 未匹配上,返回预设兜底话术:5; 未匹配上,返回相似问题列表:6}。
59
- 注意:此字段可能返回 null,表示取不到有效值。
60
- */
61
- ResultType?: string
62
- /**
63
- * 机器人对话的应答文本。
64
- */
65
- ResponseText?: string
66
- /**
67
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
68
- */
69
- RequestId?: string
70
- }
71
-
72
- /**
73
- * Group是消息组的具体定义,当前包含ContentType、Url、Content三个字段。其中,具体的ContentType字段定义,参考互联网MIME类型标准。
74
- */
75
- export interface Group {
76
- /**
77
- * 消息类型参考互联网MIME类型标准,当前仅支持"text/plain"。
78
- */
79
- ContentType: string
80
- /**
81
- * 返回内容以链接形式提供。
82
- 注意:此字段可能返回 null,表示取不到有效值。
83
- */
84
- Url: string
85
- /**
86
- * 普通文本。
87
- 注意:此字段可能返回 null,表示取不到有效值。
88
- */
89
- Content: string
90
- }
91
-
92
- /**
93
- * 槽位信息
94
- */
95
- export interface SlotInfo {
96
- /**
97
- * 槽位名称
98
- 注意:此字段可能返回 null,表示取不到有效值。
99
- */
100
- SlotName: string
101
- /**
102
- * 槽位值
103
- 注意:此字段可能返回 null,表示取不到有效值。
104
- */
105
- SlotValue: string
106
- }
107
-
108
- /**
109
- * TextReset请求参数结构体
110
- */
111
- export interface TextResetRequest {
112
- /**
113
- * 机器人标识,用于定义抽象机器人。
114
- */
115
- BotId: string
116
- /**
117
- * 机器人版本,取值"dev"或"release",{调试版本:dev;线上版本:release}。
118
- */
119
- BotEnv: string
120
- /**
121
- * 终端标识,每个终端(或线程)对应一个,区分并发多用户。
122
- */
123
- TerminalId: string
124
- /**
125
- * 平台类型,{小程序:MiniProgram;小微:XiaoWei;公众号:OfficialAccount;企业微信: WXWork}。
126
- */
127
- PlatformType?: string
128
- /**
129
- * 当PlatformType为微信公众号或企业微信时,传递对应微信公众号或企业微信的唯一标识
130
- */
131
- PlatformId?: string
132
- }
133
-
134
- /**
135
- * TextReset返回参数结构体
136
- */
137
- export interface TextResetResponse {
138
- /**
139
- * 当前会话状态{会话开始: START; 会话中: COUTINUE; 会话结束: COMPLETE}。
140
- 注意:此字段可能返回 null,表示取不到有效值。
141
- */
142
- DialogStatus?: string
143
- /**
144
- * 匹配到的机器人名称。
145
- 注意:此字段可能返回 null,表示取不到有效值。
146
- */
147
- BotName?: string
148
- /**
149
- * 匹配到的意图名称。
150
- 注意:此字段可能返回 null,表示取不到有效值。
151
- */
152
- IntentName?: string
153
- /**
154
- * 槽位信息。
155
- 注意:此字段可能返回 null,表示取不到有效值。
156
- */
157
- SlotInfoList?: Array<SlotInfo>
158
- /**
159
- * 原始的用户说法。
160
- 注意:此字段可能返回 null,表示取不到有效值。
161
- */
162
- InputText?: string
163
- /**
164
- * 机器人应答。
165
- 注意:此字段可能返回 null,表示取不到有效值。
166
- */
167
- ResponseMessage?: ResponseMessage
168
- /**
169
- * 透传字段,由用户自定义的WebService服务返回。
170
- 注意:此字段可能返回 null,表示取不到有效值。
171
- */
172
- SessionAttributes?: string
173
- /**
174
- * 结果类型 {中间逻辑出错:0; 任务型机器人:1; 问答型机器人:2; 闲聊型机器人:3; 未匹配上,返回预设兜底话术:5; 未匹配上,返回相似问题列表:6}。
175
- 注意:此字段可能返回 null,表示取不到有效值。
176
- */
177
- ResultType?: string
178
- /**
179
- * 机器人对话的应答文本。
180
- 注意:此字段可能返回 null,表示取不到有效值。
181
- */
182
- ResponseText?: string
183
- /**
184
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
185
- */
186
- RequestId?: string
187
- }
188
-
189
- /**
190
- * 从TBP-RTS服务v1.3版本起,机器人以消息组列表的形式响应,消息组列表GroupList包含多组消息,用户根据需要对部分或全部消息组进行组合使用。
191
- */
192
- export interface ResponseMessage {
193
- /**
194
- * 消息组列表。
195
- 注意:此字段可能返回 null,表示取不到有效值。
196
- */
197
- GroupList: Array<Group>
198
- }
199
-
200
- /**
201
- * TextProcess请求参数结构体
202
- */
203
- export interface TextProcessRequest {
204
- /**
205
- * 机器人标识,用于定义抽象机器人。
206
- */
207
- BotId: string
208
- /**
209
- * 机器人版本,取值"dev"或"release",{调试版本:dev;线上版本:release}。
210
- */
211
- BotEnv: string
212
- /**
213
- * 终端标识,每个终端(或线程)对应一个,区分并发多用户。
214
- */
215
- TerminalId: string
216
- /**
217
- * 请求的文本。
218
- */
219
- InputText: string
220
- /**
221
- * 透传字段,透传给用户自定义的WebService服务。
222
- */
223
- SessionAttributes?: string
224
- /**
225
- * 平台类型,{小程序:MiniProgram;小微:XiaoWei;公众号:OfficialAccount;企业微信: WXWork}。
226
- */
227
- PlatformType?: string
228
- /**
229
- * 当PlatformType为微信公众号或企业微信时,传递对应微信公众号或企业微信的唯一标识
230
- */
231
- PlatformId?: string
232
- }
package/tsconfig.json DELETED
@@ -1,33 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- // "incremental": true, /* 增量编译 提高编译速度*/
4
- "target": "ES2019" /* 编译目标ES版本*/,
5
- "module": "commonjs" /* 编译目标模块系统*/,
6
- // "lib": [], /* 编译过程中需要引入的库文件列表*/
7
- "declaration": true /* 编译时创建声明文件 */,
8
- "outDir": "tencentcloud" /* ts编译输出目录 */,
9
- "rootDir": "src" /* ts编译根目录. */,
10
- "importHelpers": true /* 从tslib导入辅助工具函数(如__importDefault)*/,
11
- "strict": true /* 严格模式开关 等价于noImplicitAny、strictNullChecks、strictFunctionTypes、strictBindCallApply等设置true */,
12
- "strictNullChecks": false,
13
- "noUnusedLocals": false /* 未使用局部变量报错*/,
14
- "noUnusedParameters": false /* 未使用参数报错*/,
15
- "noImplicitReturns": true /* 有代码路径没有返回值时报错*/,
16
- "noFallthroughCasesInSwitch": true /* 不允许switch的case语句贯穿*/,
17
- "moduleResolution": "node" /* 模块解析策略 */,
18
- "typeRoots": [
19
- /* 要包含的类型声明文件路径列表*/
20
- "./typings",
21
- "./node_modules/@types"
22
- ],
23
- "allowSyntheticDefaultImports": true /* 允许从没有设置默认导出的模块中默认导入,仅用于提示,不影响编译结果*/,
24
- "esModuleInterop": false /* 允许编译生成文件时,在代码中注入工具类(__importDefault、__importStar)对ESM与commonjs混用情况做兼容处理*/,
25
- "sourceMap": false
26
- },
27
- "include": [
28
- /* 需要编译的文件 */
29
- "src/**/*.ts",
30
- "typings/**/*.ts"
31
- ],
32
- "exclude": []
33
- }
@@ -1,2 +0,0 @@
1
- declare module "get-stream"
2
- declare module "is-stream"