tencentcloud-sdk-nodejs 4.0.504 → 4.0.506
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.
- package/CHANGELOG.md +277 -0
- package/README.md +17 -29
- package/SERVICE_CHANGELOG.md +272 -75
- package/examples/cvm_role.js +26 -0
- package/package.json +1 -1
- package/products.md +21 -21
- package/src/common/abstract_client.ts +27 -19
- package/src/common/cvm_role_credential.ts +62 -0
- package/src/common/http/fetch.ts +2 -2
- package/src/common/interface.ts +8 -1
- package/src/common/sdk_version.ts +1 -1
- package/src/services/antiddos/v20200309/antiddos_models.ts +23 -1
- package/src/services/billing/v20180709/billing_models.ts +4 -6
- package/src/services/ccc/v20200210/ccc_client.ts +13 -1
- package/src/services/ccc/v20200210/ccc_models.ts +54 -29
- package/src/services/cfs/v20190719/cfs_models.ts +12 -0
- package/src/services/cfw/v20190904/cfw_models.ts +1 -1
- package/src/services/cvm/v20170312/cvm_models.ts +24 -39
- package/src/services/essbasic/v20210526/essbasic_client.ts +1 -1
- package/src/services/gme/v20180711/gme_client.ts +6 -6
- package/src/services/gme/v20180711/gme_models.ts +7 -7
- package/src/services/mps/v20190612/mps_models.ts +15 -6
- package/src/services/nlp/v20190408/nlp_client.ts +28 -4
- package/src/services/nlp/v20190408/nlp_models.ts +118 -38
- package/src/services/ses/v20201002/ses_client.ts +12 -0
- package/src/services/ses/v20201002/ses_models.ts +25 -0
- package/src/services/ssl/v20191205/ssl_client.ts +1 -0
- package/src/services/ssl/v20191205/ssl_models.ts +47 -0
- package/src/services/thpc/v20220401/thpc_models.ts +5 -5
- package/src/services/tione/v20211111/tione_models.ts +29 -2
- package/src/services/trtc/v20190722/trtc_models.ts +4 -4
- package/src/services/tsf/v20180326/tsf_models.ts +3 -2
- package/src/services/vpc/v20170312/vpc_client.ts +1 -1
- package/src/services/vpc/v20170312/vpc_models.ts +14 -8
- package/tencentcloud/common/abstract_client.d.ts +3 -2
- package/tencentcloud/common/abstract_client.js +21 -13
- package/tencentcloud/common/cvm_role_credential.d.ts +17 -0
- package/tencentcloud/common/cvm_role_credential.js +47 -0
- package/tencentcloud/common/http/fetch.d.ts +2 -2
- package/tencentcloud/common/interface.d.ts +7 -1
- package/tencentcloud/common/sdk_version.d.ts +1 -1
- package/tencentcloud/common/sdk_version.js +1 -1
- package/tencentcloud/services/antiddos/v20200309/antiddos_models.d.ts +19 -1
- package/tencentcloud/services/billing/v20180709/billing_models.d.ts +4 -6
- package/tencentcloud/services/ccc/v20200210/ccc_client.d.ts +5 -1
- package/tencentcloud/services/ccc/v20200210/ccc_client.js +6 -0
- package/tencentcloud/services/ccc/v20200210/ccc_models.d.ts +46 -24
- package/tencentcloud/services/cfs/v20190719/cfs_models.d.ts +10 -0
- package/tencentcloud/services/cfw/v20190904/cfw_models.d.ts +1 -1
- package/tencentcloud/services/cvm/v20170312/cvm_models.d.ts +19 -38
- package/tencentcloud/services/essbasic/v20210526/essbasic_client.d.ts +1 -1
- package/tencentcloud/services/essbasic/v20210526/essbasic_client.js +1 -1
- package/tencentcloud/services/gme/v20180711/gme_client.d.ts +6 -6
- package/tencentcloud/services/gme/v20180711/gme_client.js +6 -6
- package/tencentcloud/services/gme/v20180711/gme_models.d.ts +7 -7
- package/tencentcloud/services/mps/v20190612/mps_models.d.ts +12 -4
- package/tencentcloud/services/nlp/v20190408/nlp_client.d.ts +9 -1
- package/tencentcloud/services/nlp/v20190408/nlp_client.js +12 -0
- package/tencentcloud/services/nlp/v20190408/nlp_models.d.ts +103 -35
- package/tencentcloud/services/ses/v20201002/ses_client.d.ts +5 -1
- package/tencentcloud/services/ses/v20201002/ses_client.js +6 -0
- package/tencentcloud/services/ses/v20201002/ses_models.d.ts +22 -0
- package/tencentcloud/services/ssl/v20191205/ssl_models.d.ts +40 -0
- package/tencentcloud/services/thpc/v20220401/thpc_models.d.ts +5 -5
- package/tencentcloud/services/tione/v20211111/tione_models.d.ts +24 -2
- package/tencentcloud/services/trtc/v20190722/trtc_models.d.ts +4 -4
- package/tencentcloud/services/tsf/v20180326/tsf_models.d.ts +1 -0
- package/tencentcloud/services/vpc/v20170312/vpc_client.d.ts +1 -1
- package/tencentcloud/services/vpc/v20170312/vpc_client.js +1 -1
- package/tencentcloud/services/vpc/v20170312/vpc_models.d.ts +11 -6
- package/test/ccc.v20200210.test.js +10 -0
- package/test/nlp.v20190408.test.js +20 -0
- package/test/ses.v20201002.test.js +10 -0
package/products.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
| afc | [定制建模](https://cloud.tencent.com/document/product/1029) | 2022-11-14 06:09:18 |
|
|
9
9
|
| ame | [正版曲库直通车](https://cloud.tencent.com/document/product/1155) | 2022-04-15 06:01:25 |
|
|
10
10
|
| ams | [音频内容安全](https://cloud.tencent.com/document/product/1219) | 2022-11-16 06:07:01 |
|
|
11
|
-
| antiddos | [T-Sec-DDoS防护(Anti-DDoS)](https://cloud.tencent.com/document/product/1021) | 2022-12-
|
|
11
|
+
| antiddos | [T-Sec-DDoS防护(Anti-DDoS)](https://cloud.tencent.com/document/product/1021) | 2022-12-16 01:05:43 |
|
|
12
12
|
| apcas | [汽车精准获客服务](https://cloud.tencent.com/document/product/1244) | 2022-04-04 06:05:36 |
|
|
13
13
|
| ape | [正版图库直通车](https://cloud.tencent.com/document/product/1181) | 2022-04-04 06:05:40 |
|
|
14
14
|
| api | [云 API](https://cloud.tencent.com/document/product/1278) | 2022-06-07 06:00:45 |
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
| batch | [批量计算](https://cloud.tencent.com/document/product/599) | 2022-12-09 01:11:02 |
|
|
22
22
|
| bda | [人体分析](https://cloud.tencent.com/document/product/1208) | 2022-12-15 01:09:06 |
|
|
23
23
|
| bi | [商业智能分析 BI](https://cloud.tencent.com/document/product/590) | 2022-08-09 10:42:14 |
|
|
24
|
-
| billing | [费用中心](https://cloud.tencent.com/document/product/555) | 2022-
|
|
24
|
+
| billing | [费用中心](https://cloud.tencent.com/document/product/555) | 2022-12-19 01:17:34 |
|
|
25
25
|
| bizlive | [商业直播](https://cloud.tencent.com/document/product) | 2020-03-10 01:08:07 |
|
|
26
26
|
| bm | [黑石物理服务器1.0](https://cloud.tencent.com/document/product/386) | 2022-08-09 11:50:03 |
|
|
27
27
|
| bma | [品牌经营管家](https://cloud.tencent.com/document/product/1296) | 2022-11-04 06:09:26 |
|
|
@@ -32,23 +32,23 @@
|
|
|
32
32
|
| bri | [业务风险情报](https://cloud.tencent.com/document/product/1064) | 2021-01-07 08:02:40 |
|
|
33
33
|
| bsca | [二进制软件成分分析](https://cloud.tencent.com/document/product/1483) | 2022-09-29 06:12:03 |
|
|
34
34
|
| btoe | [区块链可信取证](https://cloud.tencent.com/document/product/1259) | 2022-04-04 06:10:17 |
|
|
35
|
-
| cam | [访问管理](https://cloud.tencent.com/document/product/598) | 2022-12-
|
|
35
|
+
| cam | [访问管理](https://cloud.tencent.com/document/product/598) | 2022-12-16 01:09:31 |
|
|
36
36
|
| captcha | [验证码](https://cloud.tencent.com/document/product/1110) | 2022-12-15 01:11:14 |
|
|
37
37
|
| car | [应用云渲染](https://cloud.tencent.com/document/product/1547) | 2022-11-18 06:12:01 |
|
|
38
38
|
| casb | [云访问安全代理](https://cloud.tencent.com/document/product/1303) | 2022-10-31 06:12:52 |
|
|
39
39
|
| cat | [云拨测](https://cloud.tencent.com/document/product/280) | 2022-12-12 01:11:14 |
|
|
40
40
|
| cbs | [云硬盘](https://cloud.tencent.com/document/product/362) | 2022-12-15 01:11:34 |
|
|
41
|
-
| ccc | [云呼叫中心](https://cloud.tencent.com/document/product/679) | 2022-12-
|
|
41
|
+
| ccc | [云呼叫中心](https://cloud.tencent.com/document/product/679) | 2022-12-16 01:10:35 |
|
|
42
42
|
| cdb | [云数据库 MySQL](https://cloud.tencent.com/document/product/236) | 2022-12-09 01:15:21 |
|
|
43
43
|
| cdc | [本地专用集群](https://cloud.tencent.com/document/product/1346) | 2022-12-15 01:12:58 |
|
|
44
44
|
| cdn | [内容分发网络 CDN](https://cloud.tencent.com/document/product/228) | 2022-12-14 01:13:32 |
|
|
45
45
|
| cds | [T-Sec-数据安全审计(DSA)](https://cloud.tencent.com/document/product/856) | 2022-10-31 06:15:53 |
|
|
46
46
|
| cdwch | [云数据仓库 ClickHouse](https://cloud.tencent.com/document/product/1299) | 2022-12-07 06:23:42 |
|
|
47
47
|
| cfg | [混沌演练平台](https://cloud.tencent.com/document/product/1500) | 2022-09-26 06:16:02 |
|
|
48
|
-
| cfs | [文件存储](https://cloud.tencent.com/document/product/582) | 2022-
|
|
49
|
-
| cfw | [云防火墙](https://cloud.tencent.com/document/product/1132) | 2022-
|
|
48
|
+
| cfs | [文件存储](https://cloud.tencent.com/document/product/582) | 2022-12-19 01:23:20 |
|
|
49
|
+
| cfw | [云防火墙](https://cloud.tencent.com/document/product/1132) | 2022-12-16 01:12:46 |
|
|
50
50
|
| chdfs | [云 HDFS](https://cloud.tencent.com/document/product/1105) | 2022-07-04 06:04:36 |
|
|
51
|
-
| ciam | [账号风控平台](https://cloud.tencent.com/document/product/1441) | 2022-
|
|
51
|
+
| ciam | [账号风控平台](https://cloud.tencent.com/document/product/1441) | 2022-12-19 01:24:16 |
|
|
52
52
|
| cii | [智能保险助手](https://cloud.tencent.com/document/product/1368) | 2022-06-27 06:06:02 |
|
|
53
53
|
| cim | [](https://cloud.tencent.com/document/product) | 2019-05-16 17:21:18 |
|
|
54
54
|
| cis | [](https://cloud.tencent.com/document/product) | 2018-06-07 15:01:42 |
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
| cms | [内容安全](https://cloud.tencent.com/document/product) | 2020-10-29 08:03:08 |
|
|
64
64
|
| cpdp | [企业收付平台](https://cloud.tencent.com/document/product/1122) | 2022-12-14 11:33:48 |
|
|
65
65
|
| cr | [金融联络机器人](https://cloud.tencent.com/document/product/656) | 2021-02-24 08:03:24 |
|
|
66
|
-
| cvm | [云服务器](https://cloud.tencent.com/document/product/213) | 2022-12-
|
|
66
|
+
| cvm | [云服务器](https://cloud.tencent.com/document/product/213) | 2022-12-19 01:29:05 |
|
|
67
67
|
| cwp | [主机安全](https://cloud.tencent.com/document/product/296) | 2022-12-13 10:22:29 |
|
|
68
68
|
| cws | [漏洞扫描服务](https://cloud.tencent.com/document/product) | 2019-11-22 12:16:15 |
|
|
69
69
|
| cynosdb | [TDSQL-C MySQL 版](https://cloud.tencent.com/document/product/1003) | 2022-12-15 01:20:30 |
|
|
@@ -90,13 +90,13 @@
|
|
|
90
90
|
| emr | [弹性 MapReduce](https://cloud.tencent.com/document/product/589) | 2022-12-13 10:29:37 |
|
|
91
91
|
| es | [Elasticsearch Service](https://cloud.tencent.com/document/product/845) | 2022-12-12 01:25:49 |
|
|
92
92
|
| ess | [腾讯电子签企业版](https://cloud.tencent.com/document/product/1323) | 2022-12-14 01:27:17 |
|
|
93
|
-
| essbasic | [腾讯电子签(基础版)](https://cloud.tencent.com/document/product/1420) | 2022-12-
|
|
93
|
+
| essbasic | [腾讯电子签(基础版)](https://cloud.tencent.com/document/product/1420) | 2022-12-19 01:39:01 |
|
|
94
94
|
| facefusion | [人脸融合](https://cloud.tencent.com/document/product/670) | 2022-06-15 06:09:10 |
|
|
95
95
|
| faceid | [人脸核身](https://cloud.tencent.com/document/product/1007) | 2022-12-07 06:39:49 |
|
|
96
96
|
| fmu | [人脸试妆](https://cloud.tencent.com/document/product/1172) | 2022-04-04 06:43:06 |
|
|
97
97
|
| ft | [人像变换](https://cloud.tencent.com/document/product/1202) | 2022-04-04 06:43:12 |
|
|
98
98
|
| gaap | [全球应用加速](https://cloud.tencent.com/document/product/608) | 2022-11-23 06:29:46 |
|
|
99
|
-
| gme | [游戏多媒体引擎](https://cloud.tencent.com/document/product/607) | 2022-12-
|
|
99
|
+
| gme | [游戏多媒体引擎](https://cloud.tencent.com/document/product/607) | 2022-12-16 01:25:37 |
|
|
100
100
|
| gpm | [游戏玩家匹配](https://cloud.tencent.com/document/product/1294) | 2022-07-11 06:12:36 |
|
|
101
101
|
| gs | [云游戏](https://cloud.tencent.com/document/product/1162) | 2022-11-18 06:29:55 |
|
|
102
102
|
| gse | [游戏服务器伸缩](https://cloud.tencent.com/document/product/1165) | 2022-07-11 06:12:44 |
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
| iotcloud | [物联网通信](https://cloud.tencent.com/document/product/634) | 2022-08-16 06:27:22 |
|
|
114
114
|
| iotexplorer | [物联网开发平台](https://cloud.tencent.com/document/product/1081) | 2022-12-12 01:29:57 |
|
|
115
115
|
| iottid | [物联网设备身份认证](https://cloud.tencent.com/document/product/1086) | 2022-04-04 06:49:46 |
|
|
116
|
-
| iotvideo | [物联网智能视频服务](https://cloud.tencent.com/document/product/1131) | 2022-12-
|
|
116
|
+
| iotvideo | [物联网智能视频服务](https://cloud.tencent.com/document/product/1131) | 2022-12-16 01:28:53 |
|
|
117
117
|
| iotvideoindustry | [物联网智能视频服务(行业版)](https://cloud.tencent.com/document/product/1361) | 2022-11-17 06:31:48 |
|
|
118
118
|
| irp | [智能推荐平台](https://cloud.tencent.com/document/product/1541) | 2022-08-19 06:27:03 |
|
|
119
119
|
| ivld | [媒体智能标签](https://cloud.tencent.com/document/product/1509) | 2022-10-28 11:32:11 |
|
|
@@ -131,12 +131,12 @@
|
|
|
131
131
|
| mna | [移动网络加速](https://cloud.tencent.com/document/product/1385) | 2022-11-17 11:16:37 |
|
|
132
132
|
| mongodb | [云数据库 MongoDB](https://cloud.tencent.com/document/product/240) | 2022-11-28 06:50:22 |
|
|
133
133
|
| monitor | [云监控](https://cloud.tencent.com/document/product/248) | 2022-12-14 01:36:14 |
|
|
134
|
-
| mps | [媒体处理](https://cloud.tencent.com/document/product/862) | 2022-
|
|
134
|
+
| mps | [媒体处理](https://cloud.tencent.com/document/product/862) | 2022-12-16 01:33:15 |
|
|
135
135
|
| mrs | [医疗报告结构化](https://cloud.tencent.com/document/product/1314) | 2022-12-08 01:38:36 |
|
|
136
136
|
| ms | [移动应用安全](https://cloud.tencent.com/document/product/283) | 2022-12-09 15:05:58 |
|
|
137
137
|
| msp | [迁移服务平台](https://cloud.tencent.com/document/product/659) | 2022-04-04 07:00:13 |
|
|
138
138
|
| mvj | [营销价值判断](https://cloud.tencent.com/document/product) | 2020-03-19 08:11:44 |
|
|
139
|
-
| nlp | [自然语言处理](https://cloud.tencent.com/document/product/271) | 2022-12-
|
|
139
|
+
| nlp | [自然语言处理](https://cloud.tencent.com/document/product/271) | 2022-12-15 10:27:58 |
|
|
140
140
|
| npp | [号码保护](https://cloud.tencent.com/document/product) | 2020-04-22 08:00:22 |
|
|
141
141
|
| oceanus | [流计算 Oceanus](https://cloud.tencent.com/document/product/849) | 2022-11-24 06:45:29 |
|
|
142
142
|
| ocr | [文字识别](https://cloud.tencent.com/document/product/866) | 2022-12-12 01:39:40 |
|
|
@@ -152,8 +152,8 @@
|
|
|
152
152
|
| rkp | [风险探针](https://cloud.tencent.com/document/product/1169) | 2022-04-04 07:04:04 |
|
|
153
153
|
| rp | [注册保护](https://cloud.tencent.com/document/product/1191) | 2022-04-04 07:04:06 |
|
|
154
154
|
| rum | [前端性能监控](https://cloud.tencent.com/document/product/1464) | 2022-12-09 01:53:36 |
|
|
155
|
-
| scf | [云函数](https://cloud.tencent.com/document/product/583) | 2022-12-
|
|
156
|
-
| ses | [邮件推送](https://cloud.tencent.com/document/product/1288) | 2022-
|
|
155
|
+
| scf | [云函数](https://cloud.tencent.com/document/product/583) | 2022-12-16 01:37:15 |
|
|
156
|
+
| ses | [邮件推送](https://cloud.tencent.com/document/product/1288) | 2022-12-16 01:37:37 |
|
|
157
157
|
| smh | [智能媒资托管](https://cloud.tencent.com/document/product/1339) | 2022-11-23 06:47:21 |
|
|
158
158
|
| smpn | [营销号码安全](https://cloud.tencent.com/document/product/1127) | 2022-04-04 07:05:41 |
|
|
159
159
|
| sms | [短信](https://cloud.tencent.com/document/product/382) | 2022-11-15 06:36:50 |
|
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
| solar | [智汇零售](https://cloud.tencent.com/document/product) | 2020-03-19 08:01:59 |
|
|
162
162
|
| sqlserver | [云数据库 SQL Server](https://cloud.tencent.com/document/product/238) | 2022-12-07 06:58:03 |
|
|
163
163
|
| ssa | [安全运营中心](https://cloud.tencent.com/document/product/664) | 2022-08-16 06:39:20 |
|
|
164
|
-
| ssl | [SSL 证书](https://cloud.tencent.com/document/product/400) | 2022-
|
|
164
|
+
| ssl | [SSL 证书](https://cloud.tencent.com/document/product/400) | 2022-12-19 01:58:27 |
|
|
165
165
|
| sslpod | [SSL证书监控SSLPod](https://cloud.tencent.com/document/product/1084) | 2022-10-31 06:47:43 |
|
|
166
166
|
| ssm | [凭据管理系统](https://cloud.tencent.com/document/product/1140) | 2022-10-20 06:38:33 |
|
|
167
167
|
| sts | [安全凭证服务](https://cloud.tencent.com/document/product/1312) | 2022-07-07 06:15:25 |
|
|
@@ -187,14 +187,14 @@
|
|
|
187
187
|
| tds | [设备安全](https://cloud.tencent.com/document/product/1628) | 2022-12-06 07:10:10 |
|
|
188
188
|
| tem | [弹性微服务 TEM](https://cloud.tencent.com/document/product/1371) | 2022-12-15 01:49:45 |
|
|
189
189
|
| teo | [边缘安全加速平台](https://cloud.tencent.com/document/product/1552) | 2022-12-13 10:53:47 |
|
|
190
|
-
| thpc | [高性能计算平台](https://cloud.tencent.com/document/product/1527) | 2022-
|
|
190
|
+
| thpc | [高性能计算平台](https://cloud.tencent.com/document/product/1527) | 2022-12-19 02:07:42 |
|
|
191
191
|
| tia | [智能钛机器学习](https://cloud.tencent.com/document/product/851) | 2021-10-21 11:12:52 |
|
|
192
192
|
| tic | [资源编排 TIC](https://cloud.tencent.com/document/product/1213) | 2022-10-31 06:55:14 |
|
|
193
193
|
| ticm | [智能鉴黄](https://cloud.tencent.com/document/product/864) | 2021-01-07 08:08:15 |
|
|
194
194
|
| tics | [威胁情报云查服务](https://cloud.tencent.com/document/product/1013) | 2022-04-04 07:16:59 |
|
|
195
195
|
| tiems | [腾讯云 TI 平台 TI-EMS ](https://cloud.tencent.com/document/product/1120) | 2022-07-19 06:19:39 |
|
|
196
196
|
| tiia | [图像分析](https://cloud.tencent.com/document/product/865) | 2022-12-15 01:51:46 |
|
|
197
|
-
| tione | [腾讯云 TI 平台 TI-ONE](https://cloud.tencent.com/document/product/851) | 2022-12-
|
|
197
|
+
| tione | [腾讯云 TI 平台 TI-ONE](https://cloud.tencent.com/document/product/851) | 2022-12-19 02:08:29 |
|
|
198
198
|
| tiw | [互动白板](https://cloud.tencent.com/document/product/1137) | 2022-12-13 10:56:59 |
|
|
199
199
|
| tke | [容器服务](https://cloud.tencent.com/document/product/457) | 2022-12-14 01:52:28 |
|
|
200
200
|
| tkgdq | [腾讯知识图谱数据查询](https://cloud.tencent.com/document/product) | 2020-03-10 00:51:44 |
|
|
@@ -202,16 +202,16 @@
|
|
|
202
202
|
| tmt | [机器翻译](https://cloud.tencent.com/document/product/551) | 2022-12-09 02:09:44 |
|
|
203
203
|
| trdp | [流量风险决策平台](https://cloud.tencent.com/document/product/1604) | 2022-12-07 07:14:03 |
|
|
204
204
|
| trp | [T-Sec-安心平台(RP)](https://cloud.tencent.com/document/product/1458) | 2022-12-07 07:14:07 |
|
|
205
|
-
| trtc | [实时音视频](https://cloud.tencent.com/document/product/647) | 2022-12-
|
|
205
|
+
| trtc | [实时音视频](https://cloud.tencent.com/document/product/647) | 2022-12-19 02:11:18 |
|
|
206
206
|
| tse | [微服务引擎 TSE](https://cloud.tencent.com/document/product/1364) | 2022-10-31 06:58:14 |
|
|
207
|
-
| tsf | [微服务平台 TSF](https://cloud.tencent.com/document/product/649) | 2022-12-
|
|
207
|
+
| tsf | [微服务平台 TSF](https://cloud.tencent.com/document/product/649) | 2022-12-16 01:48:54 |
|
|
208
208
|
| tsw | [微服务观测平台 TSW](https://cloud.tencent.com/document/product/1311) | 2022-10-31 06:59:44 |
|
|
209
209
|
| tts | [语音合成](https://cloud.tencent.com/document/product/1073) | 2022-11-29 07:36:55 |
|
|
210
210
|
| ump | [客流数字化平台](https://cloud.tencent.com/document/product/1320) | 2022-04-04 07:22:44 |
|
|
211
211
|
| vm | [视频内容安全](https://cloud.tencent.com/document/product/1265) | 2022-11-16 06:46:30 |
|
|
212
212
|
| vms | [语音消息](https://cloud.tencent.com/document/product/1128) | 2022-04-04 07:22:54 |
|
|
213
213
|
| vod | [云点播](https://cloud.tencent.com/document/product/266) | 2022-12-09 10:06:16 |
|
|
214
|
-
| vpc | [私有网络](https://cloud.tencent.com/document/product/215) | 2022-12-
|
|
214
|
+
| vpc | [私有网络](https://cloud.tencent.com/document/product/215) | 2022-12-16 18:54:14 |
|
|
215
215
|
| waf | [Web 应用防火墙](https://cloud.tencent.com/document/product/627) | 2022-12-09 02:16:48 |
|
|
216
216
|
| wav | [企业微信汽车行业版](https://cloud.tencent.com/document/product/1318) | 2022-10-12 07:10:28 |
|
|
217
217
|
| wedata | [数据开发治理平台 WeData](https://cloud.tencent.com/document/product/1267) | 2022-12-07 07:21:53 |
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
ClientConfig,
|
|
6
6
|
SUPPORT_LANGUAGE_LIST,
|
|
7
7
|
HttpProfile,
|
|
8
|
+
DynamicCredential,
|
|
8
9
|
} from "./interface"
|
|
9
10
|
import Sign from "./sign"
|
|
10
11
|
import { HttpConnection } from "./http/http_connection"
|
|
@@ -41,7 +42,7 @@ type ResponseData = any
|
|
|
41
42
|
export class AbstractClient {
|
|
42
43
|
sdkVersion: string
|
|
43
44
|
path: string
|
|
44
|
-
credential: Credential
|
|
45
|
+
credential: Credential | DynamicCredential
|
|
45
46
|
region: string
|
|
46
47
|
apiVersion: string
|
|
47
48
|
endpoint: string
|
|
@@ -64,14 +65,11 @@ export class AbstractClient {
|
|
|
64
65
|
/**
|
|
65
66
|
* 认证信息实例
|
|
66
67
|
*/
|
|
67
|
-
this.credential =
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
},
|
|
73
|
-
credential
|
|
74
|
-
)
|
|
68
|
+
this.credential = credential || {
|
|
69
|
+
secretId: null,
|
|
70
|
+
secretKey: null,
|
|
71
|
+
token: null,
|
|
72
|
+
}
|
|
75
73
|
|
|
76
74
|
/**
|
|
77
75
|
* 产品地域
|
|
@@ -106,6 +104,13 @@ export class AbstractClient {
|
|
|
106
104
|
}
|
|
107
105
|
}
|
|
108
106
|
|
|
107
|
+
async getCredential(): Promise<Credential> {
|
|
108
|
+
if ("getCredential" in this.credential) {
|
|
109
|
+
return await this.credential.getCredential()
|
|
110
|
+
}
|
|
111
|
+
return this.credential
|
|
112
|
+
}
|
|
113
|
+
|
|
109
114
|
/**
|
|
110
115
|
* @inner
|
|
111
116
|
*/
|
|
@@ -141,7 +146,7 @@ export class AbstractClient {
|
|
|
141
146
|
return this.doRequestWithSign3(action, req, options)
|
|
142
147
|
}
|
|
143
148
|
let params = this.mergeData(req)
|
|
144
|
-
params = this.formatRequestData(action, params)
|
|
149
|
+
params = await this.formatRequestData(action, params)
|
|
145
150
|
let res
|
|
146
151
|
try {
|
|
147
152
|
res = await HttpConnection.doRequest({
|
|
@@ -170,11 +175,12 @@ export class AbstractClient {
|
|
|
170
175
|
): Promise<ResponseData> {
|
|
171
176
|
let res
|
|
172
177
|
try {
|
|
178
|
+
const credential = await this.getCredential()
|
|
173
179
|
res = await HttpConnection.doRequestWithSign3({
|
|
174
180
|
method: this.profile.httpProfile.reqMethod,
|
|
175
181
|
url: this.profile.httpProfile.protocol + this.endpoint + this.path,
|
|
176
|
-
secretId:
|
|
177
|
-
secretKey:
|
|
182
|
+
secretId: credential.secretId,
|
|
183
|
+
secretKey: credential.secretKey,
|
|
178
184
|
region: this.region,
|
|
179
185
|
data: params || "",
|
|
180
186
|
service: this.endpoint.split(".")[0],
|
|
@@ -182,7 +188,7 @@ export class AbstractClient {
|
|
|
182
188
|
version: this.apiVersion,
|
|
183
189
|
multipart: options && options.multipart,
|
|
184
190
|
timeout: this.profile.httpProfile.reqTimeout * 1000,
|
|
185
|
-
token:
|
|
191
|
+
token: credential.token,
|
|
186
192
|
requestClient: this.sdkVersion,
|
|
187
193
|
language: this.profile.language,
|
|
188
194
|
headers: Object.assign({}, this.profile.httpProfile.headers, options.headers),
|
|
@@ -237,23 +243,25 @@ export class AbstractClient {
|
|
|
237
243
|
/**
|
|
238
244
|
* @inner
|
|
239
245
|
*/
|
|
240
|
-
private formatRequestData(action: string, params: RequestData): RequestData {
|
|
246
|
+
private async formatRequestData(action: string, params: RequestData): Promise<RequestData> {
|
|
241
247
|
params.Action = action
|
|
242
248
|
params.RequestClient = this.sdkVersion
|
|
243
249
|
params.Nonce = Math.round(Math.random() * 65535)
|
|
244
250
|
params.Timestamp = Math.round(Date.now() / 1000)
|
|
245
251
|
params.Version = this.apiVersion
|
|
246
252
|
|
|
247
|
-
|
|
248
|
-
|
|
253
|
+
const credential = await this.getCredential()
|
|
254
|
+
|
|
255
|
+
if (credential.secretId) {
|
|
256
|
+
params.SecretId = credential.secretId
|
|
249
257
|
}
|
|
250
258
|
|
|
251
259
|
if (this.region) {
|
|
252
260
|
params.Region = this.region
|
|
253
261
|
}
|
|
254
262
|
|
|
255
|
-
if (
|
|
256
|
-
params.Token =
|
|
263
|
+
if (credential.token) {
|
|
264
|
+
params.Token = credential.token
|
|
257
265
|
}
|
|
258
266
|
|
|
259
267
|
if (this.profile.language) {
|
|
@@ -265,7 +273,7 @@ export class AbstractClient {
|
|
|
265
273
|
}
|
|
266
274
|
const signStr = this.formatSignString(params)
|
|
267
275
|
|
|
268
|
-
params.Signature = Sign.sign(
|
|
276
|
+
params.Signature = Sign.sign(credential.secretKey, signStr, this.profile.signMethod)
|
|
269
277
|
return params
|
|
270
278
|
}
|
|
271
279
|
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Credential, DynamicCredential } from "./interface"
|
|
2
|
+
import fetch from "./http/fetch"
|
|
3
|
+
|
|
4
|
+
const META_URL = "http://metadata.tencentyun.com/latest/meta-data/"
|
|
5
|
+
const ROLE_URL = META_URL + "cam/security-credentials/"
|
|
6
|
+
const EXPIRE_BUFFER = 30 * 1000
|
|
7
|
+
|
|
8
|
+
interface CvmRoleCredentialResult {
|
|
9
|
+
TmpSecretId: string
|
|
10
|
+
TmpSecretKey: string
|
|
11
|
+
ExpiredTime: 1671330188
|
|
12
|
+
Expiration: string
|
|
13
|
+
Token: string
|
|
14
|
+
Code: string
|
|
15
|
+
}
|
|
16
|
+
export default class CvmRoleCredential implements DynamicCredential {
|
|
17
|
+
protected roleNameTask: Promise<string>
|
|
18
|
+
protected credentialTask: Promise<CvmRoleCredentialResult>
|
|
19
|
+
protected async getRoleName() {
|
|
20
|
+
const response = await fetch(ROLE_URL, {})
|
|
21
|
+
if (!response.ok) {
|
|
22
|
+
throw new Error("Get cvm role name failed, Please confirm whether the role is bound")
|
|
23
|
+
}
|
|
24
|
+
return await response.text()
|
|
25
|
+
}
|
|
26
|
+
protected async getRoleCredential(roleName: string): Promise<CvmRoleCredentialResult> {
|
|
27
|
+
const response = await fetch(ROLE_URL + roleName, {})
|
|
28
|
+
if (!response.ok) {
|
|
29
|
+
throw new Error(
|
|
30
|
+
`Get credential from metadata server by role name ${roleName} failed, http code: ${response.status}`
|
|
31
|
+
)
|
|
32
|
+
}
|
|
33
|
+
const json: CvmRoleCredentialResult = await response.json()
|
|
34
|
+
if (json.Code !== "Success") {
|
|
35
|
+
throw new Error(
|
|
36
|
+
`Get credential from metadata server by role name ${roleName} failed, Code: ${json.Code}`
|
|
37
|
+
)
|
|
38
|
+
}
|
|
39
|
+
return json
|
|
40
|
+
}
|
|
41
|
+
async getCredential(): Promise<Credential> {
|
|
42
|
+
if (!this.roleNameTask) {
|
|
43
|
+
this.roleNameTask = this.getRoleName()
|
|
44
|
+
}
|
|
45
|
+
const roleName = await this.roleNameTask
|
|
46
|
+
if (!this.credentialTask) {
|
|
47
|
+
this.credentialTask = this.getRoleCredential(roleName)
|
|
48
|
+
}
|
|
49
|
+
const credential = await this.credentialTask
|
|
50
|
+
// expired
|
|
51
|
+
if (credential.ExpiredTime * 1000 - EXPIRE_BUFFER <= Date.now()) {
|
|
52
|
+
this.credentialTask = null
|
|
53
|
+
return this.getCredential()
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return {
|
|
57
|
+
secretId: credential.TmpSecretId,
|
|
58
|
+
secretKey: credential.TmpSecretKey,
|
|
59
|
+
token: credential.Token,
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
package/src/common/http/fetch.ts
CHANGED
|
@@ -3,9 +3,9 @@ import HttpsProxyAgent = require("https-proxy-agent")
|
|
|
3
3
|
|
|
4
4
|
export interface FetchOptions extends Omit<RequestInit, "signal"> {
|
|
5
5
|
proxy?: string
|
|
6
|
-
headers
|
|
6
|
+
headers?: Record<string, string>
|
|
7
7
|
// node-fetch中的signal声明与ts自带的有点冲突,以ts的为准
|
|
8
|
-
signal
|
|
8
|
+
signal?: AbortSignal
|
|
9
9
|
}
|
|
10
10
|
export default function (url: string, options: FetchOptions): Promise<Response> {
|
|
11
11
|
const instanceOptions = options || ({} as FetchOptions)
|
package/src/common/interface.ts
CHANGED
|
@@ -7,7 +7,7 @@ export interface ClientConfig {
|
|
|
7
7
|
* @param {Credential} credential 认证信息
|
|
8
8
|
* 必选
|
|
9
9
|
*/
|
|
10
|
-
credential: Credential
|
|
10
|
+
credential: Credential | DynamicCredential
|
|
11
11
|
/**
|
|
12
12
|
* @param {string} region 产品地域
|
|
13
13
|
* 对于要求区分地域的产品,此参数必选(如 cvm);对于不区分地域的产品(如 sms),无需传入。
|
|
@@ -112,3 +112,10 @@ export interface Credential {
|
|
|
112
112
|
*/
|
|
113
113
|
token?: string
|
|
114
114
|
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* 动态认证信息
|
|
118
|
+
*/
|
|
119
|
+
export interface DynamicCredential {
|
|
120
|
+
getCredential(): Promise<Credential>
|
|
121
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const sdkVersion = "4.0.
|
|
1
|
+
export const sdkVersion = "4.0.506"
|
|
@@ -4995,6 +4995,11 @@ export interface SwitchWaterPrintConfigRequest {
|
|
|
4995
4995
|
* 水印开启/关闭状态,1表示开启;0表示关闭
|
|
4996
4996
|
*/
|
|
4997
4997
|
OpenStatus: number
|
|
4998
|
+
|
|
4999
|
+
/**
|
|
5000
|
+
* 是否开启代理,1开启则忽略IP+端口校验;0关闭则需要IP+端口校验
|
|
5001
|
+
*/
|
|
5002
|
+
CloudSdkProxy?: number
|
|
4998
5003
|
}
|
|
4999
5004
|
|
|
5000
5005
|
/**
|
|
@@ -5136,6 +5141,12 @@ shortfpcheckall(精简模式)
|
|
|
5136
5141
|
]
|
|
5137
5142
|
*/
|
|
5138
5143
|
Verify?: string
|
|
5144
|
+
|
|
5145
|
+
/**
|
|
5146
|
+
* 是否开启代理,1开启则忽略IP+端口校验;0关闭则需要IP+端口校验
|
|
5147
|
+
注意:此字段可能返回 null,表示取不到有效值。
|
|
5148
|
+
*/
|
|
5149
|
+
CloudSdkProxy?: number
|
|
5139
5150
|
}
|
|
5140
5151
|
|
|
5141
5152
|
/**
|
|
@@ -5554,6 +5565,17 @@ export interface BGPInstance {
|
|
|
5554
5565
|
* 攻击封堵套餐标记
|
|
5555
5566
|
*/
|
|
5556
5567
|
VitalityVersion: number
|
|
5568
|
+
|
|
5569
|
+
/**
|
|
5570
|
+
* 网络线路
|
|
5571
|
+
注意:此字段可能返回 null,表示取不到有效值。
|
|
5572
|
+
*/
|
|
5573
|
+
Line: number
|
|
5574
|
+
|
|
5575
|
+
/**
|
|
5576
|
+
* 弹性业务带宽开关
|
|
5577
|
+
*/
|
|
5578
|
+
ElasticServiceBandwidth: number
|
|
5557
5579
|
}
|
|
5558
5580
|
|
|
5559
5581
|
/**
|
|
@@ -5636,7 +5658,7 @@ export interface DescribeBizTrendRequest {
|
|
|
5636
5658
|
Business: string
|
|
5637
5659
|
|
|
5638
5660
|
/**
|
|
5639
|
-
* 统计周期,可取值300,1800,3600,21600,86400,单位秒
|
|
5661
|
+
* 统计周期,可取值60,300,1800,3600,21600,86400,单位秒
|
|
5640
5662
|
*/
|
|
5641
5663
|
Period: number
|
|
5642
5664
|
|
|
@@ -237,12 +237,10 @@ export interface DescribeDosageDetailByDateRequest {
|
|
|
237
237
|
10195 互动直播-边缘机房
|
|
238
238
|
|
|
239
239
|
cdn业务:
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
10231:CDN静态加速流量(海外)
|
|
245
|
-
10232:CDN静态加速带宽(海外)
|
|
240
|
+
102383:CDN静态加速流量(国内)
|
|
241
|
+
102384:CDN静态加速带宽(国内)
|
|
242
|
+
102385:CDN静态加速流量(海外)
|
|
243
|
+
102386:CDN静态加速带宽(海外)
|
|
246
244
|
|
|
247
245
|
100967:弹性公网IP-按流量计费
|
|
248
246
|
101065:公网负载均衡-按流量计费
|
|
@@ -20,6 +20,7 @@ import { ClientConfig } from "../../../common/interface"
|
|
|
20
20
|
import {
|
|
21
21
|
DescribeExtensionRequest,
|
|
22
22
|
StopAutoCalloutTaskRequest,
|
|
23
|
+
HangUpCallRequest,
|
|
23
24
|
CreateSDKLoginTokenResponse,
|
|
24
25
|
ModifyStaffRequest,
|
|
25
26
|
DeleteStaffResponse,
|
|
@@ -82,6 +83,7 @@ import {
|
|
|
82
83
|
CreateAutoCalloutTaskRequest,
|
|
83
84
|
Filter,
|
|
84
85
|
UnbindStaffSkillGroupListRequest,
|
|
86
|
+
CreateCallOutSessionRequest,
|
|
85
87
|
StopAutoCalloutTaskResponse,
|
|
86
88
|
SkillGroupItem,
|
|
87
89
|
MessageBody,
|
|
@@ -109,7 +111,7 @@ import {
|
|
|
109
111
|
ModifyStaffResponse,
|
|
110
112
|
DescribeStaffStatusMetricsResponse,
|
|
111
113
|
DescribeCarrierPrivilegeNumberApplicantsResponse,
|
|
112
|
-
|
|
114
|
+
HangUpCallResponse,
|
|
113
115
|
BindStaffSkillGroupListResponse,
|
|
114
116
|
DescribeExtensionsRequest,
|
|
115
117
|
DescribeProtectedTelCdrRequest,
|
|
@@ -159,6 +161,16 @@ export class Client extends AbstractClient {
|
|
|
159
161
|
return this.request("DescribeStaffInfoList", req, cb)
|
|
160
162
|
}
|
|
161
163
|
|
|
164
|
+
/**
|
|
165
|
+
* 挂断电话
|
|
166
|
+
*/
|
|
167
|
+
async HangUpCall(
|
|
168
|
+
req: HangUpCallRequest,
|
|
169
|
+
cb?: (error: string, rep: HangUpCallResponse) => void
|
|
170
|
+
): Promise<HangUpCallResponse> {
|
|
171
|
+
return this.request("HangUpCall", req, cb)
|
|
172
|
+
}
|
|
173
|
+
|
|
162
174
|
/**
|
|
163
175
|
* 获取当前正在通话的会话列表
|
|
164
176
|
*/
|
|
@@ -45,6 +45,21 @@ export interface StopAutoCalloutTaskRequest {
|
|
|
45
45
|
TaskId: number
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
/**
|
|
49
|
+
* HangUpCall请求参数结构体
|
|
50
|
+
*/
|
|
51
|
+
export interface HangUpCallRequest {
|
|
52
|
+
/**
|
|
53
|
+
* TCCC 实例应用 ID
|
|
54
|
+
*/
|
|
55
|
+
SdkAppId: number
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* 会话ID
|
|
59
|
+
*/
|
|
60
|
+
SessionId: string
|
|
61
|
+
}
|
|
62
|
+
|
|
48
63
|
/**
|
|
49
64
|
* CreateSDKLoginToken返回参数结构体
|
|
50
65
|
*/
|
|
@@ -2063,6 +2078,41 @@ export interface UnbindStaffSkillGroupListRequest {
|
|
|
2063
2078
|
SkillGroupList: Array<number>
|
|
2064
2079
|
}
|
|
2065
2080
|
|
|
2081
|
+
/**
|
|
2082
|
+
* CreateCallOutSession请求参数结构体
|
|
2083
|
+
*/
|
|
2084
|
+
export interface CreateCallOutSessionRequest {
|
|
2085
|
+
/**
|
|
2086
|
+
* 应用 ID
|
|
2087
|
+
*/
|
|
2088
|
+
SdkAppId: number
|
|
2089
|
+
|
|
2090
|
+
/**
|
|
2091
|
+
* 客服用户 ID,一般为客服邮箱
|
|
2092
|
+
*/
|
|
2093
|
+
UserId: string
|
|
2094
|
+
|
|
2095
|
+
/**
|
|
2096
|
+
* 被叫号码,须带 0086 前缀
|
|
2097
|
+
*/
|
|
2098
|
+
Callee: string
|
|
2099
|
+
|
|
2100
|
+
/**
|
|
2101
|
+
* 主叫号码,须带 0086 前缀
|
|
2102
|
+
*/
|
|
2103
|
+
Caller?: string
|
|
2104
|
+
|
|
2105
|
+
/**
|
|
2106
|
+
* 是否强制使用手机外呼,当前只支持 true,若为 true 请确保已配置白名单
|
|
2107
|
+
*/
|
|
2108
|
+
IsForceUseMobile?: boolean
|
|
2109
|
+
|
|
2110
|
+
/**
|
|
2111
|
+
* 自定义数据,长度限制 1024 字节
|
|
2112
|
+
*/
|
|
2113
|
+
Uui?: string
|
|
2114
|
+
}
|
|
2115
|
+
|
|
2066
2116
|
/**
|
|
2067
2117
|
* StopAutoCalloutTask返回参数结构体
|
|
2068
2118
|
*/
|
|
@@ -2676,38 +2726,13 @@ export interface DescribeCarrierPrivilegeNumberApplicantsResponse {
|
|
|
2676
2726
|
}
|
|
2677
2727
|
|
|
2678
2728
|
/**
|
|
2679
|
-
*
|
|
2729
|
+
* HangUpCall返回参数结构体
|
|
2680
2730
|
*/
|
|
2681
|
-
export interface
|
|
2682
|
-
/**
|
|
2683
|
-
* 应用 ID
|
|
2684
|
-
*/
|
|
2685
|
-
SdkAppId: number
|
|
2686
|
-
|
|
2687
|
-
/**
|
|
2688
|
-
* 客服用户 ID,一般为客服邮箱
|
|
2689
|
-
*/
|
|
2690
|
-
UserId: string
|
|
2691
|
-
|
|
2731
|
+
export interface HangUpCallResponse {
|
|
2692
2732
|
/**
|
|
2693
|
-
*
|
|
2694
|
-
*/
|
|
2695
|
-
Callee: string
|
|
2696
|
-
|
|
2697
|
-
/**
|
|
2698
|
-
* 主叫号码,须带 0086 前缀
|
|
2699
|
-
*/
|
|
2700
|
-
Caller?: string
|
|
2701
|
-
|
|
2702
|
-
/**
|
|
2703
|
-
* 是否强制使用手机外呼,当前只支持 true,若为 true 请确保已配置白名单
|
|
2704
|
-
*/
|
|
2705
|
-
IsForceUseMobile?: boolean
|
|
2706
|
-
|
|
2707
|
-
/**
|
|
2708
|
-
* 自定义数据,长度限制 1024 字节
|
|
2733
|
+
* 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
|
2709
2734
|
*/
|
|
2710
|
-
|
|
2735
|
+
RequestId?: string
|
|
2711
2736
|
}
|
|
2712
2737
|
|
|
2713
2738
|
/**
|
|
@@ -938,6 +938,18 @@ export interface UserQuota {
|
|
|
938
938
|
* 文件系统ID
|
|
939
939
|
*/
|
|
940
940
|
FileSystemId: string
|
|
941
|
+
|
|
942
|
+
/**
|
|
943
|
+
* 容量使用,单位GiB
|
|
944
|
+
注意:此字段可能返回 null,表示取不到有效值。
|
|
945
|
+
*/
|
|
946
|
+
CapacityUsed?: number
|
|
947
|
+
|
|
948
|
+
/**
|
|
949
|
+
* 文件使用个数,单位个
|
|
950
|
+
注意:此字段可能返回 null,表示取不到有效值。
|
|
951
|
+
*/
|
|
952
|
+
FileUsed?: number
|
|
941
953
|
}
|
|
942
954
|
|
|
943
955
|
/**
|