tencentcloud-sdk-nodejs 4.0.745 → 4.0.746

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.
Files changed (64) hide show
  1. package/CHANGELOG.md +157 -0
  2. package/SERVICE_CHANGELOG.md +181 -105
  3. package/package.json +1 -1
  4. package/products.md +18 -18
  5. package/src/common/abstract_client.ts +14 -9
  6. package/src/common/sdk_version.ts +1 -1
  7. package/src/common/sse_response_model.ts +121 -0
  8. package/src/services/cat/v20180409/cat_models.ts +2 -2
  9. package/src/services/cls/v20201016/cls_client.ts +1 -1
  10. package/src/services/cls/v20201016/cls_models.ts +15 -7
  11. package/src/services/cwp/v20180228/cwp_models.ts +2 -2
  12. package/src/services/domain/v20180808/domain_models.ts +1 -1
  13. package/src/services/dsgc/v20190723/dsgc_client.ts +5 -5
  14. package/src/services/dsgc/v20190723/dsgc_models.ts +33 -33
  15. package/src/services/ecm/v20190719/ecm_models.ts +1 -1
  16. package/src/services/ess/v20201111/ess_models.ts +0 -2
  17. package/src/services/essbasic/v20210526/essbasic_client.ts +32 -20
  18. package/src/services/essbasic/v20210526/essbasic_models.ts +237 -202
  19. package/src/services/hunyuan/v20230901/hunyuan_client.ts +2 -0
  20. package/src/services/iotvideo/v20211125/iotvideo_client.ts +16 -3
  21. package/src/services/iotvideo/v20211125/iotvideo_models.ts +112 -64
  22. package/src/services/scf/v20180416/scf_client.ts +1 -0
  23. package/src/services/scf/v20180416/scf_models.ts +21 -0
  24. package/src/services/tcss/v20201101/tcss_models.ts +79 -36
  25. package/src/services/trtc/v20190722/trtc_models.ts +8 -8
  26. package/src/services/vod/v20180717/vod_client.ts +12 -0
  27. package/src/services/vod/v20180717/vod_models.ts +28 -0
  28. package/src/services/vpc/v20170312/vpc_models.ts +6 -0
  29. package/src/services/waf/v20180125/waf_models.ts +2 -1
  30. package/tencentcloud/common/abstract_client.js +12 -6
  31. package/tencentcloud/common/sdk_version.d.ts +1 -1
  32. package/tencentcloud/common/sdk_version.js +1 -1
  33. package/tencentcloud/common/sse_response_model.d.ts +32 -0
  34. package/tencentcloud/common/sse_response_model.js +96 -0
  35. package/tencentcloud/services/cat/v20180409/cat_models.d.ts +2 -2
  36. package/tencentcloud/services/cls/v20201016/cls_client.d.ts +1 -1
  37. package/tencentcloud/services/cls/v20201016/cls_client.js +1 -1
  38. package/tencentcloud/services/cls/v20201016/cls_models.d.ts +15 -7
  39. package/tencentcloud/services/cwp/v20180228/cwp_models.d.ts +2 -2
  40. package/tencentcloud/services/domain/v20180808/domain_models.d.ts +1 -1
  41. package/tencentcloud/services/dsgc/v20190723/dsgc_client.d.ts +5 -5
  42. package/tencentcloud/services/dsgc/v20190723/dsgc_client.js +5 -5
  43. package/tencentcloud/services/dsgc/v20190723/dsgc_models.d.ts +33 -33
  44. package/tencentcloud/services/ecm/v20190719/ecm_models.d.ts +1 -1
  45. package/tencentcloud/services/ess/v20201111/ess_models.d.ts +0 -2
  46. package/tencentcloud/services/essbasic/v20210526/essbasic_client.d.ts +19 -15
  47. package/tencentcloud/services/essbasic/v20210526/essbasic_client.js +21 -15
  48. package/tencentcloud/services/essbasic/v20210526/essbasic_models.d.ts +235 -202
  49. package/tencentcloud/services/hunyuan/v20230901/hunyuan_client.d.ts +2 -0
  50. package/tencentcloud/services/hunyuan/v20230901/hunyuan_client.js +2 -0
  51. package/tencentcloud/services/iotvideo/v20211125/iotvideo_client.d.ts +5 -1
  52. package/tencentcloud/services/iotvideo/v20211125/iotvideo_client.js +6 -0
  53. package/tencentcloud/services/iotvideo/v20211125/iotvideo_models.d.ts +109 -64
  54. package/tencentcloud/services/scf/v20180416/scf_models.d.ts +20 -0
  55. package/tencentcloud/services/tcss/v20201101/tcss_models.d.ts +79 -36
  56. package/tencentcloud/services/trtc/v20190722/trtc_models.d.ts +8 -8
  57. package/tencentcloud/services/vod/v20180717/vod_client.d.ts +5 -1
  58. package/tencentcloud/services/vod/v20180717/vod_client.js +6 -0
  59. package/tencentcloud/services/vod/v20180717/vod_models.d.ts +26 -0
  60. package/tencentcloud/services/vpc/v20170312/vpc_models.d.ts +6 -0
  61. package/tencentcloud/services/waf/v20180125/waf_models.d.ts +2 -1
  62. package/test/essbasic.v20210526.test.js +12 -2
  63. package/test/iotvideo.v20211125.test.js +10 -0
  64. package/test/vod.v20180717.test.js +10 -0
package/products.md CHANGED
@@ -37,7 +37,7 @@
37
37
  | cam | [访问管理](https://cloud.tencent.com/document/product/598) | 2023-11-24 01:07:37 |
38
38
  | captcha | [验证码](https://cloud.tencent.com/document/product/1110) | 2023-11-07 01:13:48 |
39
39
  | car | [应用云渲染](https://cloud.tencent.com/document/product/1547) | 2023-11-08 01:13:35 |
40
- | cat | [云拨测](https://cloud.tencent.com/document/product/280) | 2023-11-24 01:07:54 |
40
+ | cat | [云拨测](https://cloud.tencent.com/document/product/280) | 2023-11-29 01:08:04 |
41
41
  | cbs | [云硬盘](https://cloud.tencent.com/document/product/362) | 2023-11-01 01:07:57 |
42
42
  | ccc | [云联络中心](https://cloud.tencent.com/document/product/679) | 2023-11-16 01:09:13 |
43
43
  | cdb | [云数据库 MySQL](https://cloud.tencent.com/document/product/236) | 2023-11-22 01:30:13 |
@@ -59,7 +59,7 @@
59
59
  | cloudaudit | [云审计](https://cloud.tencent.com/document/product/629) | 2023-05-18 01:13:28 |
60
60
  | cloudhsm | [云加密机](https://cloud.tencent.com/document/product/639) | 2023-08-17 01:57:08 |
61
61
  | cloudstudio | [Cloud Studio(云端 IDE)](https://cloud.tencent.com/document/product/1039) | 2023-08-03 01:03:28 |
62
- | cls | [日志服务](https://cloud.tencent.com/document/product/614) | 2023-11-28 01:10:26 |
62
+ | cls | [日志服务](https://cloud.tencent.com/document/product/614) | 2023-11-29 01:10:11 |
63
63
  | cme | [多媒体创作引擎](https://cloud.tencent.com/document/product/1156) | 2023-10-19 16:00:29 |
64
64
  | cmq | [消息队列 CMQ](https://cloud.tencent.com/document/product/406) | 2023-08-17 02:03:39 |
65
65
  | cms | [内容安全](https://cloud.tencent.com/document/product/669) | 2023-08-24 01:10:10 |
@@ -69,9 +69,9 @@
69
69
  | csip | [云安全一体化平台](https://cloud.tencent.com/document/product/664) | 2023-11-17 01:10:47 |
70
70
  | csxg | [5G入云服务](https://cloud.tencent.com/document/product/1687) | 2023-05-19 11:26:14 |
71
71
  | cvm | [云服务器](https://cloud.tencent.com/document/product/213) | 2023-11-23 01:14:32 |
72
- | cwp | [主机安全](https://cloud.tencent.com/document/product/296) | 2023-11-28 01:11:42 |
72
+ | cwp | [主机安全](https://cloud.tencent.com/document/product/296) | 2023-11-29 01:11:08 |
73
73
  | cws | [漏洞扫描服务](https://cloud.tencent.com/document/product) | 2019-11-22 12:16:15 |
74
- | cynosdb | [TDSQL-C MySQL 版](https://cloud.tencent.com/document/product/1003) | 2023-11-21 01:14:05 |
74
+ | cynosdb | [TDSQL-C MySQL 版](https://cloud.tencent.com/document/product/1003) | 2023-11-29 01:45:44 |
75
75
  | dasb | [T-Sec-堡垒机(BH)](https://cloud.tencent.com/document/product/1025) | 2023-11-17 01:12:46 |
76
76
  | dataintegration | [数据接入平台](https://cloud.tencent.com/document/product/1591) | 2022-07-26 15:32:15 |
77
77
  | dayu | [DDoS 高防包](https://cloud.tencent.com/document/product/1021) | 2023-05-18 01:20:11 |
@@ -81,22 +81,22 @@
81
81
  | dcdb | [TDSQL MySQL 版](https://cloud.tencent.com/document/product/557) | 2023-10-30 00:33:47 |
82
82
  | dlc | [数据湖计算 DLC](https://cloud.tencent.com/document/product/1342) | 2023-11-17 01:13:25 |
83
83
  | dnspod | [DNSPod](https://cloud.tencent.com/document/product/1427) | 2023-11-15 01:33:00 |
84
- | domain | [域名注册](https://cloud.tencent.com/document/product/242) | 2023-10-20 01:14:01 |
84
+ | domain | [域名注册](https://cloud.tencent.com/document/product/242) | 2023-11-29 01:52:55 |
85
85
  | drm | [数字版权管理](https://cloud.tencent.com/document/product/1000) | 2023-11-10 01:14:28 |
86
86
  | ds | [文档服务](https://cloud.tencent.com/document/product/869) | 2023-08-17 02:59:40 |
87
- | dsgc | [数据安全治理中心](https://cloud.tencent.com/document/product/1087) | 2023-11-21 01:16:05 |
87
+ | dsgc | [数据安全治理中心](https://cloud.tencent.com/document/product/1087) | 2023-11-29 01:53:04 |
88
88
  | dtf | [分布式事务](https://cloud.tencent.com/document/product/1224) | 2022-04-04 06:38:57 |
89
89
  | dts | [数据传输服务](https://cloud.tencent.com/document/product/571) | 2023-11-28 01:14:42 |
90
- | eb | [事件总线](https://cloud.tencent.com/document/product/1359) | 2023-11-24 01:14:11 |
90
+ | eb | [事件总线](https://cloud.tencent.com/document/product/1359) | 2023-11-29 01:54:37 |
91
91
  | ecc | [英文作文批改](https://cloud.tencent.com/document/product/1076) | 2023-09-13 01:42:58 |
92
92
  | ecdn | [全站加速网络](https://cloud.tencent.com/document/product/570) | 2023-08-17 03:03:04 |
93
- | ecm | [边缘计算机器](https://cloud.tencent.com/document/product/1108) | 2023-11-01 01:13:22 |
93
+ | ecm | [边缘计算机器](https://cloud.tencent.com/document/product/1108) | 2023-11-29 01:54:46 |
94
94
  | eiam | [数字身份管控平台(员工版)](https://cloud.tencent.com/document/product/1442) | 2023-05-18 01:25:40 |
95
95
  | eis | [数据连接器](https://cloud.tencent.com/document/product/1270) | 2023-08-10 01:17:44 |
96
96
  | emr | [弹性 MapReduce](https://cloud.tencent.com/document/product/589) | 2023-10-16 01:15:50 |
97
97
  | es | [Elasticsearch Service](https://cloud.tencent.com/document/product/845) | 2023-11-23 01:18:36 |
98
- | ess | [腾讯电子签企业版](https://cloud.tencent.com/document/product/1323) | 2023-11-24 01:14:56 |
99
- | essbasic | [腾讯电子签(基础版)](https://cloud.tencent.com/document/product/1420) | 2023-11-28 01:15:59 |
98
+ | ess | [腾讯电子签企业版](https://cloud.tencent.com/document/product/1323) | 2023-11-29 01:55:24 |
99
+ | essbasic | [腾讯电子签(基础版)](https://cloud.tencent.com/document/product/1420) | 2023-11-29 01:55:39 |
100
100
  | facefusion | [人脸融合](https://cloud.tencent.com/document/product/670) | 2023-09-18 01:48:33 |
101
101
  | faceid | [人脸核身](https://cloud.tencent.com/document/product/1007) | 2023-11-14 01:16:39 |
102
102
  | fmu | [人脸试妆](https://cloud.tencent.com/document/product/1172) | 2023-08-17 03:12:49 |
@@ -111,7 +111,7 @@
111
111
  | hai | [高性能应用服务](https://cloud.tencent.com/document/product/1721) | 2023-11-23 01:19:50 |
112
112
  | hasim | [高可用物联网卡](https://cloud.tencent.com/document/product/1482) | 2023-05-18 01:29:47 |
113
113
  | hcm | [数学作业批改](https://cloud.tencent.com/document/product/1004) | 2023-11-01 01:14:52 |
114
- | hunyuan | [腾讯混元大模型](https://cloud.tencent.com/document/product/1729) | 2023-11-27 00:11:15 |
114
+ | hunyuan | [腾讯混元大模型](https://cloud.tencent.com/document/product/1729) | 2023-11-29 01:56:24 |
115
115
  | iai | [人脸识别](https://cloud.tencent.com/document/product/867) | 2023-10-24 01:16:21 |
116
116
  | ic | [图片瘦身](https://cloud.tencent.com/document/product/636) | 2023-03-02 01:23:21 |
117
117
  | icr | [对话机器人](https://cloud.tencent.com/document/product/1268) | 2023-05-18 01:30:40 |
@@ -123,7 +123,7 @@
123
123
  | iotcloud | [物联网通信](https://cloud.tencent.com/document/product/634) | 2023-11-06 00:11:14 |
124
124
  | iotexplorer | [物联网开发平台](https://cloud.tencent.com/document/product/1081) | 2023-10-16 01:17:51 |
125
125
  | iottid | [物联网设备身份认证](https://cloud.tencent.com/document/product/1086) | 2023-05-18 01:33:02 |
126
- | iotvideo | [物联网智能视频服务](https://cloud.tencent.com/document/product/1131) | 2023-11-15 01:52:32 |
126
+ | iotvideo | [物联网智能视频服务](https://cloud.tencent.com/document/product/1131) | 2023-11-29 01:57:28 |
127
127
  | iotvideoindustry | [物联网智能视频服务(行业版)](https://cloud.tencent.com/document/product/1361) | 2023-08-17 03:44:44 |
128
128
  | irp | [智能推荐平台](https://cloud.tencent.com/document/product/1541) | 2023-09-22 02:00:51 |
129
129
  | iss | [智能视图计算平台](https://cloud.tencent.com/document/product/1344) | 2023-11-09 01:16:39 |
@@ -166,7 +166,7 @@
166
166
  | rkp | [风险探针](https://cloud.tencent.com/document/product/1169) | 2023-08-17 04:33:51 |
167
167
  | rp | [注册保护](https://cloud.tencent.com/document/product/1191) | 2022-04-04 07:04:06 |
168
168
  | rum | [前端性能监控](https://cloud.tencent.com/document/product/1464) | 2023-10-13 01:22:31 |
169
- | scf | [云函数](https://cloud.tencent.com/document/product/583) | 2023-11-24 01:21:32 |
169
+ | scf | [云函数](https://cloud.tencent.com/document/product/583) | 2023-11-29 02:01:37 |
170
170
  | ses | [邮件推送](https://cloud.tencent.com/document/product/1288) | 2023-11-07 02:07:25 |
171
171
  | smh | [智能媒资托管](https://cloud.tencent.com/document/product/1339) | 2023-07-11 01:37:49 |
172
172
  | smop | [腾讯安心用户运营平台](https://cloud.tencent.com/document/product/1310) | 2023-05-18 01:47:59 |
@@ -196,7 +196,7 @@
196
196
  | tci | [腾讯智学课堂分析](https://cloud.tencent.com/document/product) | 2020-08-24 08:06:03 |
197
197
  | tcm | [服务网格](https://cloud.tencent.com/document/product/1261) | 2023-10-09 01:23:14 |
198
198
  | tcr | [容器镜像服务](https://cloud.tencent.com/document/product/1141) | 2023-11-27 00:18:18 |
199
- | tcss | [容器安全服务](https://cloud.tencent.com/document/product/1285) | 2023-11-21 01:33:13 |
199
+ | tcss | [容器安全服务](https://cloud.tencent.com/document/product/1285) | 2023-11-29 02:03:30 |
200
200
  | tdcpg | [TDSQL-C PostgreSQL 版](https://cloud.tencent.com/document/product/1556) | 2023-06-21 01:36:25 |
201
201
  | tdid | [分布式身份](https://cloud.tencent.com/document/product/1439) | 2023-07-24 01:49:20 |
202
202
  | tdmq | [消息队列 TDMQ](https://cloud.tencent.com/document/product/1179) | 2023-11-28 01:25:42 |
@@ -221,7 +221,7 @@
221
221
  | trocket | [消息队列 RocketMQ 版](https://cloud.tencent.com/document/product/1493) | 2023-11-28 01:28:19 |
222
222
  | trp | [T-Sec-安心平台(RP)](https://cloud.tencent.com/document/product/1458) | 2023-10-26 14:46:10 |
223
223
  | trro | [远程实时操控](https://cloud.tencent.com/document/product/1584) | 2023-07-18 01:53:24 |
224
- | trtc | [实时音视频](https://cloud.tencent.com/document/product/647) | 2023-11-24 01:26:16 |
224
+ | trtc | [实时音视频](https://cloud.tencent.com/document/product/647) | 2023-11-29 02:06:56 |
225
225
  | tse | [微服务引擎 TSE](https://cloud.tencent.com/document/product/1364) | 2023-11-23 01:30:34 |
226
226
  | tsf | [微服务平台 TSF](https://cloud.tencent.com/document/product/649) | 2023-11-09 01:27:51 |
227
227
  | tsw | [微服务观测平台 TSW](https://cloud.tencent.com/document/product/1311) | 2023-05-18 02:04:00 |
@@ -229,10 +229,10 @@
229
229
  | ump | [客流数字化平台](https://cloud.tencent.com/document/product/1320) | 2023-08-17 05:50:27 |
230
230
  | vm | [视频内容安全](https://cloud.tencent.com/document/product/1265) | 2023-11-15 02:36:58 |
231
231
  | vms | [语音消息](https://cloud.tencent.com/document/product/1128) | 2023-08-17 05:50:56 |
232
- | vod | [云点播](https://cloud.tencent.com/document/product/266) | 2023-11-28 01:29:30 |
233
- | vpc | [私有网络](https://cloud.tencent.com/document/product/215) | 2023-11-28 01:30:07 |
232
+ | vod | [云点播](https://cloud.tencent.com/document/product/266) | 2023-11-29 02:07:53 |
233
+ | vpc | [私有网络](https://cloud.tencent.com/document/product/215) | 2023-11-29 02:08:37 |
234
234
  | vrs | [声音复刻](https://cloud.tencent.com/document/product/1283) | 2023-11-27 00:23:42 |
235
- | waf | [Web 应用防火墙](https://cloud.tencent.com/document/product/627) | 2023-11-22 08:16:17 |
235
+ | waf | [Web 应用防火墙](https://cloud.tencent.com/document/product/627) | 2023-11-29 02:09:22 |
236
236
  | wav | [企业微信汽车行业版](https://cloud.tencent.com/document/product/1318) | 2023-11-15 02:42:49 |
237
237
  | wedata | [数据开发治理平台 WeData](https://cloud.tencent.com/document/product/1267) | 2023-11-23 01:33:33 |
238
238
  | weilingwith | [微瓴同业开放平台](https://cloud.tencent.com/document/product/1693) | 2023-11-28 01:32:20 |
@@ -11,6 +11,7 @@ import Sign from "./sign"
11
11
  import { HttpConnection } from "./http/http_connection"
12
12
  import TencentCloudSDKHttpException from "./exception/tencent_cloud_sdk_exception"
13
13
  import { Response } from "node-fetch"
14
+ import { SSEResponseModel } from "./sse_response_model"
14
15
 
15
16
  export type ResponseCallback<TReuslt = any> = (error: string, rep: TReuslt) => void
16
17
  export interface RequestOptions extends Partial<Pick<HttpProfile, "headers">> {
@@ -215,16 +216,20 @@ export class AbstractClient {
215
216
  tcError.httpCode = res.status
216
217
  throw tcError
217
218
  } else {
218
- const data = await res.json()
219
- if (data.Response.Error) {
220
- const tcError = new TencentCloudSDKHttpException(
221
- data.Response.Error.Message,
222
- data.Response.RequestId
223
- )
224
- tcError.code = data.Response.Error.Code
225
- throw tcError
219
+ if (res.headers.get("content-type") === "text/event-stream") {
220
+ return new SSEResponseModel(res.body)
226
221
  } else {
227
- return data.Response
222
+ const data = await res.json()
223
+ if (data.Response.Error) {
224
+ const tcError = new TencentCloudSDKHttpException(
225
+ data.Response.Error.Message,
226
+ data.Response.RequestId
227
+ )
228
+ tcError.code = data.Response.Error.Code
229
+ throw tcError
230
+ } else {
231
+ return data.Response
232
+ }
228
233
  }
229
234
  }
230
235
  }
@@ -1 +1 @@
1
- export const sdkVersion = "4.0.745"
1
+ export const sdkVersion = "4.0.746"
@@ -0,0 +1,121 @@
1
+ import { EventEmitter } from "events"
2
+ import { Readable } from "stream"
3
+
4
+ interface EventSourceMessage {
5
+ /** The event ID to set the EventSource object's last event ID value. */
6
+ id: string
7
+ /** A string identifying the type of event described. */
8
+ event: string
9
+ /** The event data */
10
+ data: string
11
+ /** The reconnection interval (in milliseconds) to wait before retrying the connection */
12
+ retry?: number
13
+ }
14
+
15
+ class SSEEventEmitter extends EventEmitter {}
16
+
17
+ export class SSEResponseModel {
18
+ private stream: NodeJS.ReadableStream
19
+ private eventSource: SSEEventEmitter
20
+
21
+ constructor(stream: NodeJS.ReadableStream) {
22
+ this.stream = stream
23
+ this.eventSource = new SSEEventEmitter()
24
+ this.init()
25
+ }
26
+
27
+ /**
28
+ * @inner
29
+ */
30
+ private init() {
31
+ const { stream, eventSource } = this
32
+ stream.on("data", (chunk) => {
33
+ if (chunk !== null) {
34
+ const messages = chunk.toString().split("\n\n")
35
+ for (let i = 0; i < messages.length; i++) {
36
+ if (messages[i].length > 0) {
37
+ eventSource.emit("message", this.parseSSEMessage(messages[i]))
38
+ }
39
+ }
40
+ }
41
+ })
42
+ stream.on("close", () => {
43
+ eventSource.emit("close")
44
+ })
45
+ stream.on("error", (err) => {
46
+ eventSource.emit("error", err)
47
+ })
48
+ }
49
+
50
+ /**
51
+ * @inner
52
+ */
53
+ private parseSSEMessage(chunk: string) {
54
+ const message: EventSourceMessage = {
55
+ data: "",
56
+ event: "",
57
+ id: "",
58
+ retry: undefined,
59
+ }
60
+
61
+ const lines = chunk.split("\n")
62
+ for (let i = 0; i < lines.length; i++) {
63
+ const line = lines[i]
64
+ // line is of format "<field>:<value>" or "<field>: <value>"
65
+ const colonIndex = line.indexOf(":")
66
+ if (colonIndex <= 0) continue // exclude comments and lines with no values
67
+ const field = line.slice(0, colonIndex)
68
+ const value = line.slice(colonIndex + (line[colonIndex + 1] === " " ? 2 : 1))
69
+
70
+ switch (field) {
71
+ case "data":
72
+ message.data = message.data ? message.data + "\n" + value : value
73
+ break
74
+ case "event":
75
+ message.event = value
76
+ break
77
+ case "id":
78
+ message.id = value
79
+ break
80
+ case "retry":
81
+ const retry = parseInt(value, 10)
82
+ if (!isNaN(retry)) {
83
+ // per spec, ignore non-integers
84
+ message.retry = retry
85
+ }
86
+ break
87
+ }
88
+ }
89
+
90
+ return message
91
+ }
92
+
93
+ on(event: "message", listener: (message: EventSourceMessage) => void): this
94
+ on(event: "close", listener: () => void): this
95
+ on(event: "error", listener: (err: Error) => void): this
96
+ on(event: string, listener: any) {
97
+ this.eventSource.on(event, listener)
98
+ return this
99
+ }
100
+
101
+ removeListener(event: "message", listener: (message: EventSourceMessage) => void): this
102
+ removeListener(event: "close", listener: () => void): this
103
+ removeListener(event: "error", listener: (err: Error) => void): this
104
+ removeListener(event: string, listener: any) {
105
+ this.eventSource.removeListener(event, listener)
106
+ return this
107
+ }
108
+
109
+ async *[Symbol.asyncIterator](): AsyncIterableIterator<EventSourceMessage> {
110
+ for await (const chunk of this.stream) {
111
+ if (chunk !== null) {
112
+ const messages = chunk.toString().split("\n\n")
113
+ for (let i = 0; i < messages.length; i++) {
114
+ if (messages[i].length > 0) {
115
+ yield this.parseSSEMessage(messages[i])
116
+ }
117
+ }
118
+ }
119
+ }
120
+ }
121
+ }
@@ -398,11 +398,11 @@ AnalyzeTaskType_MediaStream:音视频体验
398
398
  */
399
399
  AnalyzeTaskType?: string
400
400
  /**
401
- * 指标类型,指标查询默认传gauge
401
+ * 指标类型(counter、gauge以及histogram),指标查询默认传gauge
402
402
  */
403
403
  MetricType?: string
404
404
  /**
405
- * 指标详细字段,可以传递传具体的指标也可以对指标进行聚合查询例如:"avg(ping_time)"代表整体时延(ms)
405
+ * 指标详细字段,可以传递传具体的指标也可以对指标进行聚合查询例如:"avg(ping_time)"代表整体时延(ms);不同的任务类型支持不同的field查询,以及聚合规则,详情可联系云拨测。
406
406
  */
407
407
  Field?: string
408
408
  /**
@@ -1293,7 +1293,7 @@ cls.pb.cc cls.pb.h cls.proto
1293
1293
  }
1294
1294
 
1295
1295
  /**
1296
- * 获取制定机器组下的机器状态
1296
+ * 获取指定机器组下的机器状态
1297
1297
  */
1298
1298
  async DescribeMachines(
1299
1299
  req: DescribeMachinesRequest,
@@ -4996,27 +4996,27 @@ export interface DescribeMachinesResponse {
4996
4996
  /**
4997
4997
  * 机器状态信息组
4998
4998
  */
4999
- Machines: Array<MachineInfo>
4999
+ Machines?: Array<MachineInfo>
5000
5000
  /**
5001
5001
  * 机器组是否开启自动升级功能
5002
5002
  */
5003
- AutoUpdate: number
5003
+ AutoUpdate?: number
5004
5004
  /**
5005
5005
  * 机器组自动升级功能预设开始时间
5006
5006
  */
5007
- UpdateStartTime: string
5007
+ UpdateStartTime?: string
5008
5008
  /**
5009
5009
  * 机器组自动升级功能预设结束时间
5010
5010
  */
5011
- UpdateEndTime: string
5011
+ UpdateEndTime?: string
5012
5012
  /**
5013
5013
  * 当前用户可用最新的Loglistener版本
5014
5014
  */
5015
- LatestAgentVersion: string
5015
+ LatestAgentVersion?: string
5016
5016
  /**
5017
5017
  * 是否开启服务日志
5018
5018
  */
5019
- ServiceLogging: boolean
5019
+ ServiceLogging?: boolean
5020
5020
  /**
5021
5021
  * 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
5022
5022
  */
@@ -5610,7 +5610,15 @@ export interface DescribeScheduledSqlInfoRequest {
5610
5610
  */
5611
5611
  TaskId?: string
5612
5612
  /**
5613
- * <li>srcTopicName按照【源日志主题名称】进行过滤,模糊匹配,类型:String必选:否<br><li>dstTopicName按照【目标日志主题名称】进行过滤,模糊匹配,类型:String必选:否<br><li>srcTopicId按照【源日志主题ID】进行过滤。类型:String必选:否<br><li>dstTopicId按照【目标日志主题ID】进行过滤。类型:String必选:否<br><li>bizType按照【主题类型】进行过滤,0日志主题1指标主题,,。类型:String必选:否<br><li>status按照【任务状态】进行过滤。类型:String必选:否<br><li>taskName按照【任务名称】进行过滤,模糊匹配,。类型:String必选:否<br><li>taskId按照【任务ID】进行过滤,模糊匹配,。类型:String必选:否每次请求的Filters的上限为10,Filter.Values的上限为100。
5613
+ * <li>srcTopicName按照【源日志主题名称】进行过滤,模糊匹配,类型:String必选:否</li>
5614
+ <li>dstTopicName按照【目标日志主题名称】进行过滤,模糊匹配,类型:String必选:否</li>
5615
+ <li>srcTopicId按照【源日志主题ID】进行过滤。类型:String必选:否</li>
5616
+ <li>dstTopicId按照【目标日志主题ID】进行过滤。类型:String必选:否</li>
5617
+ <li>bizType按照【主题类型】进行过滤,0日志主题1指标主题,。类型:String必选:否</li>
5618
+ <li>status按照【任务状态】进行过滤。类型:String必选:否</li>
5619
+ <li>taskName按照【任务名称】进行过滤,模糊匹配,。类型:String必选:否</li>
5620
+ <li>taskId按照【任务ID】进行过滤,模糊匹配,。类型:String必选:否</li>
5621
+
5614
5622
  */
5615
5623
  Filters?: Array<Filter>
5616
5624
  }
@@ -16978,11 +16978,11 @@ export interface DescribeLogExportsResponse {
16978
16978
  /**
16979
16979
  * 总数目
16980
16980
  */
16981
- TotalCount: number
16981
+ TotalCount?: number
16982
16982
  /**
16983
16983
  * 日志导出列表
16984
16984
  */
16985
- Exports: Array<ExportInfo>
16985
+ Exports?: Array<ExportInfo>
16986
16986
  /**
16987
16987
  * 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
16988
16988
  */
@@ -22,7 +22,7 @@ export interface UploadImageResponse {
22
22
  /**
23
23
  * 资质照片地址。
24
24
  */
25
- AccessUrl: string
25
+ AccessUrl?: string
26
26
  /**
27
27
  * 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
28
28
  */
@@ -460,7 +460,7 @@ export class Client extends AbstractClient {
460
460
  }
461
461
 
462
462
  /**
463
- * 复制合规组模版
463
+ * 复制合规组模板
464
464
  */
465
465
  async CopyDSPATemplate(
466
466
  req: CopyDSPATemplateRequest,
@@ -480,7 +480,7 @@ export class Client extends AbstractClient {
480
480
  }
481
481
 
482
482
  /**
483
- * 风险项页面--查看评估模版详情
483
+ * 风险项页面--查看评估模板详情
484
484
  */
485
485
  async DescribeDSPAAssessmentRiskTemplateDetail(
486
486
  req: DescribeDSPAAssessmentRiskTemplateDetailRequest,
@@ -894,7 +894,7 @@ export class Client extends AbstractClient {
894
894
  }
895
895
 
896
896
  /**
897
- * 风险模版---修改风险模版
897
+ * 风险模板---修改风险模板
898
898
  */
899
899
  async ModifyDSPAAssessmentRiskTemplate(
900
900
  req: ModifyDSPAAssessmentRiskTemplateRequest,
@@ -1257,7 +1257,7 @@ export class Client extends AbstractClient {
1257
1257
  }
1258
1258
 
1259
1259
  /**
1260
- * 风险模版页面--查询风险模版中的脆弱项配置
1260
+ * 风险模板页面--查询风险模板中的脆弱项配置
1261
1261
  */
1262
1262
  async DescribeDSPAAssessmentRiskTemplateVulnerableList(
1263
1263
  req: DescribeDSPAAssessmentRiskTemplateVulnerableListRequest,
@@ -1357,7 +1357,7 @@ export class Client extends AbstractClient {
1357
1357
  }
1358
1358
 
1359
1359
  /**
1360
- * 风险评估模版---创建风险评估模版
1360
+ * 风险评估模板---创建风险评估模板
1361
1361
  */
1362
1362
  async CreateDSPAAssessmentRiskTemplate(
1363
1363
  req: CreateDSPAAssessmentRiskTemplateRequest,