tencentcloud-sdk-nodejs-mqtt 4.0.1048 → 4.1.4
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/README.md +18 -4
- package/es/index.js +1 -0
- package/es/services/index.js +1 -0
- package/es/services/mqtt/index.js +4 -0
- package/es/services/mqtt/v20240516/index.js +6 -0
- package/es/services/mqtt/v20240516/mqtt_client.js +162 -0
- package/es/services/mqtt/v20240516/mqtt_models.js +0 -0
- package/package.json +26 -8
- package/tencentcloud/services/mqtt/v20240516/index.js +2 -1
- package/tencentcloud/services/mqtt/v20240516/mqtt_client.js +2 -1
- package/tencentcloud/services/mqtt/v20240516/mqtt_models.d.ts +12 -11
- package/index.d.ts +0 -2
- package/index.js +0 -6
- package/prettier.config.js +0 -38
- package/src/index.ts +0 -1
- package/src/services/index.ts +0 -1
- package/src/services/mqtt/index.ts +0 -5
- package/src/services/mqtt/v20240516/index.ts +0 -6
- package/src/services/mqtt/v20240516/mqtt_client.ts +0 -687
- package/src/services/mqtt/v20240516/mqtt_models.ts +0 -2749
- package/tsconfig.json +0 -33
- package/typings/index.d.ts +0 -2
package/README.md
CHANGED
|
@@ -52,10 +52,24 @@ npm install tencentcloud-sdk-nodejs --save
|
|
|
52
52
|
|
|
53
53
|
## 通过源码包安装
|
|
54
54
|
|
|
55
|
-
1.
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
1. clone 代码到本地:
|
|
56
|
+
```
|
|
57
|
+
git clone https://github.com/tencentcloud/tencentcloud-sdk-nodejs
|
|
58
|
+
# 或者
|
|
59
|
+
git clone https://gitee.com/tencentcloud/tencentcloud-sdk-nodejs
|
|
60
|
+
```
|
|
61
|
+
2. 在项目根目录执行以下命令完成构建:
|
|
62
|
+
```
|
|
63
|
+
npm install && npm run build
|
|
64
|
+
```
|
|
65
|
+
3. 打包 NPM 压缩文件,例如 `tencentcloud-sdk-nodejs-4.0.0.tgz`
|
|
66
|
+
```
|
|
67
|
+
npm pack
|
|
68
|
+
```
|
|
69
|
+
4. 安装包到你的项目里:
|
|
70
|
+
```
|
|
71
|
+
npm install /path/to/tencentcloud-sdk-nodejs/tencentcloud-sdk-nodejs-4.0.0.tgz
|
|
72
|
+
```
|
|
59
73
|
|
|
60
74
|
# 示例
|
|
61
75
|
|
package/es/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./services";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { mqtt } from "./mqtt";
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import * as TencentCloudCommon from "tencentcloud-sdk-nodejs-common";
|
|
2
|
+
export class Client extends TencentCloudCommon.AbstractClient {
|
|
3
|
+
constructor(clientConfig) {
|
|
4
|
+
super("mqtt.tencentcloudapi.com", "2024-05-16", clientConfig);
|
|
5
|
+
}
|
|
6
|
+
async DescribeUserList(req, cb) {
|
|
7
|
+
return this.request("DescribeUserList", req, cb);
|
|
8
|
+
}
|
|
9
|
+
async CreateInsPublicEndpoint(req, cb) {
|
|
10
|
+
return this.request("CreateInsPublicEndpoint", req, cb);
|
|
11
|
+
}
|
|
12
|
+
async ModifyTopic(req, cb) {
|
|
13
|
+
return this.request("ModifyTopic", req, cb);
|
|
14
|
+
}
|
|
15
|
+
async DeleteCaCertificate(req, cb) {
|
|
16
|
+
return this.request("DeleteCaCertificate", req, cb);
|
|
17
|
+
}
|
|
18
|
+
async DeactivateDeviceCertificate(req, cb) {
|
|
19
|
+
return this.request("DeactivateDeviceCertificate", req, cb);
|
|
20
|
+
}
|
|
21
|
+
async DescribeTopic(req, cb) {
|
|
22
|
+
return this.request("DescribeTopic", req, cb);
|
|
23
|
+
}
|
|
24
|
+
async DeactivateCaCertificate(req, cb) {
|
|
25
|
+
return this.request("DeactivateCaCertificate", req, cb);
|
|
26
|
+
}
|
|
27
|
+
async CreateJWTAuthenticator(req, cb) {
|
|
28
|
+
return this.request("CreateJWTAuthenticator", req, cb);
|
|
29
|
+
}
|
|
30
|
+
async DeleteDeviceCertificate(req, cb) {
|
|
31
|
+
return this.request("DeleteDeviceCertificate", req, cb);
|
|
32
|
+
}
|
|
33
|
+
async DeleteInstance(req, cb) {
|
|
34
|
+
return this.request("DeleteInstance", req, cb);
|
|
35
|
+
}
|
|
36
|
+
async PublishMessage(req, cb) {
|
|
37
|
+
return this.request("PublishMessage", req, cb);
|
|
38
|
+
}
|
|
39
|
+
async ModifyJWTAuthenticator(req, cb) {
|
|
40
|
+
return this.request("ModifyJWTAuthenticator", req, cb);
|
|
41
|
+
}
|
|
42
|
+
async ModifyJWKSAuthenticator(req, cb) {
|
|
43
|
+
return this.request("ModifyJWKSAuthenticator", req, cb);
|
|
44
|
+
}
|
|
45
|
+
async DescribeDeviceCertificates(req, cb) {
|
|
46
|
+
return this.request("DescribeDeviceCertificates", req, cb);
|
|
47
|
+
}
|
|
48
|
+
async DescribeInsPublicEndpoints(req, cb) {
|
|
49
|
+
return this.request("DescribeInsPublicEndpoints", req, cb);
|
|
50
|
+
}
|
|
51
|
+
async ModifyInsPublicEndpoint(req, cb) {
|
|
52
|
+
return this.request("ModifyInsPublicEndpoint", req, cb);
|
|
53
|
+
}
|
|
54
|
+
async DescribeDeviceCertificate(req, cb) {
|
|
55
|
+
return this.request("DescribeDeviceCertificate", req, cb);
|
|
56
|
+
}
|
|
57
|
+
async RegisterDeviceCertificate(req, cb) {
|
|
58
|
+
return this.request("RegisterDeviceCertificate", req, cb);
|
|
59
|
+
}
|
|
60
|
+
async ModifyInstanceCertBinding(req, cb) {
|
|
61
|
+
return this.request("ModifyInstanceCertBinding", req, cb);
|
|
62
|
+
}
|
|
63
|
+
async DescribeInsVPCEndpoints(req, cb) {
|
|
64
|
+
return this.request("DescribeInsVPCEndpoints", req, cb);
|
|
65
|
+
}
|
|
66
|
+
async DescribeClientList(req, cb) {
|
|
67
|
+
return this.request("DescribeClientList", req, cb);
|
|
68
|
+
}
|
|
69
|
+
async DescribeProductSKUList(req, cb) {
|
|
70
|
+
return this.request("DescribeProductSKUList", req, cb);
|
|
71
|
+
}
|
|
72
|
+
async DescribeCaCertificates(req, cb) {
|
|
73
|
+
return this.request("DescribeCaCertificates", req, cb);
|
|
74
|
+
}
|
|
75
|
+
async UpdateAuthorizationPolicyPriority(req, cb) {
|
|
76
|
+
return this.request("UpdateAuthorizationPolicyPriority", req, cb);
|
|
77
|
+
}
|
|
78
|
+
async CreateTopic(req, cb) {
|
|
79
|
+
return this.request("CreateTopic", req, cb);
|
|
80
|
+
}
|
|
81
|
+
async ActivateDeviceCertificate(req, cb) {
|
|
82
|
+
return this.request("ActivateDeviceCertificate", req, cb);
|
|
83
|
+
}
|
|
84
|
+
async DescribeAuthorizationPolicies(req, cb) {
|
|
85
|
+
return this.request("DescribeAuthorizationPolicies", req, cb);
|
|
86
|
+
}
|
|
87
|
+
async DescribeTopicList(req, cb) {
|
|
88
|
+
return this.request("DescribeTopicList", req, cb);
|
|
89
|
+
}
|
|
90
|
+
async DeleteInsPublicEndpoint(req, cb) {
|
|
91
|
+
return this.request("DeleteInsPublicEndpoint", req, cb);
|
|
92
|
+
}
|
|
93
|
+
async CreateInstance(req, cb) {
|
|
94
|
+
return this.request("CreateInstance", req, cb);
|
|
95
|
+
}
|
|
96
|
+
async DescribeInstanceList(req, cb) {
|
|
97
|
+
return this.request("DescribeInstanceList", req, cb);
|
|
98
|
+
}
|
|
99
|
+
async RevokedDeviceCertificate(req, cb) {
|
|
100
|
+
return this.request("RevokedDeviceCertificate", req, cb);
|
|
101
|
+
}
|
|
102
|
+
async DescribeInstance(req, cb) {
|
|
103
|
+
return this.request("DescribeInstance", req, cb);
|
|
104
|
+
}
|
|
105
|
+
async DeleteTopic(req, cb) {
|
|
106
|
+
return this.request("DeleteTopic", req, cb);
|
|
107
|
+
}
|
|
108
|
+
async DescribeCaCertificate(req, cb) {
|
|
109
|
+
return this.request("DescribeCaCertificate", req, cb);
|
|
110
|
+
}
|
|
111
|
+
async CreateJWKSAuthenticator(req, cb) {
|
|
112
|
+
return this.request("CreateJWKSAuthenticator", req, cb);
|
|
113
|
+
}
|
|
114
|
+
async ModifyUser(req, cb) {
|
|
115
|
+
return this.request("ModifyUser", req, cb);
|
|
116
|
+
}
|
|
117
|
+
async DeleteUser(req, cb) {
|
|
118
|
+
return this.request("DeleteUser", req, cb);
|
|
119
|
+
}
|
|
120
|
+
async ModifyAuthorizationPolicy(req, cb) {
|
|
121
|
+
return this.request("ModifyAuthorizationPolicy", req, cb);
|
|
122
|
+
}
|
|
123
|
+
async DeleteAuthorizationPolicy(req, cb) {
|
|
124
|
+
return this.request("DeleteAuthorizationPolicy", req, cb);
|
|
125
|
+
}
|
|
126
|
+
async ModifyHttpAuthenticator(req, cb) {
|
|
127
|
+
return this.request("ModifyHttpAuthenticator", req, cb);
|
|
128
|
+
}
|
|
129
|
+
async DeleteAuthenticator(req, cb) {
|
|
130
|
+
return this.request("DeleteAuthenticator", req, cb);
|
|
131
|
+
}
|
|
132
|
+
async RegisterCaCertificate(req, cb) {
|
|
133
|
+
return this.request("RegisterCaCertificate", req, cb);
|
|
134
|
+
}
|
|
135
|
+
async DescribeAuthenticator(req, cb) {
|
|
136
|
+
return this.request("DescribeAuthenticator", req, cb);
|
|
137
|
+
}
|
|
138
|
+
async ActivateCaCertificate(req, cb) {
|
|
139
|
+
return this.request("ActivateCaCertificate", req, cb);
|
|
140
|
+
}
|
|
141
|
+
async DescribeMessageList(req, cb) {
|
|
142
|
+
return this.request("DescribeMessageList", req, cb);
|
|
143
|
+
}
|
|
144
|
+
async CreateUser(req, cb) {
|
|
145
|
+
return this.request("CreateUser", req, cb);
|
|
146
|
+
}
|
|
147
|
+
async DescribeSharedSubscriptionLag(req, cb) {
|
|
148
|
+
return this.request("DescribeSharedSubscriptionLag", req, cb);
|
|
149
|
+
}
|
|
150
|
+
async ApplyRegistrationCode(req, cb) {
|
|
151
|
+
return this.request("ApplyRegistrationCode", req, cb);
|
|
152
|
+
}
|
|
153
|
+
async CreateAuthorizationPolicy(req, cb) {
|
|
154
|
+
return this.request("CreateAuthorizationPolicy", req, cb);
|
|
155
|
+
}
|
|
156
|
+
async ModifyInstance(req, cb) {
|
|
157
|
+
return this.request("ModifyInstance", req, cb);
|
|
158
|
+
}
|
|
159
|
+
async CreateHttpAuthenticator(req, cb) {
|
|
160
|
+
return this.request("CreateHttpAuthenticator", req, cb);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,16 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tencentcloud-sdk-nodejs-mqtt",
|
|
3
|
-
"version": "4.
|
|
4
|
-
"description": "
|
|
5
|
-
"main": "tencentcloud/index.js",
|
|
3
|
+
"version": "4.1.4",
|
|
4
|
+
"description": "腾讯云 API NODEJS SDK",
|
|
5
|
+
"main": "./tencentcloud/index.js",
|
|
6
|
+
"module": "./es/index.js",
|
|
7
|
+
"types": "./tencentcloud/index.d.ts",
|
|
6
8
|
"scripts": {
|
|
7
9
|
"test": "mocha -t 10000",
|
|
8
|
-
"build": "
|
|
9
|
-
"
|
|
10
|
+
"build": "concurrently 'npm:build:cjs' 'npm:build:es'",
|
|
11
|
+
"build:cjs": "tsc -p tsconfig.json",
|
|
12
|
+
"build:es": "tsc -p tsconfig.es.json",
|
|
13
|
+
"build:slim": "node ./scripts/build_slim.js",
|
|
14
|
+
"prettier": "prettier --config prettier.config.js --write 'src/**/*.{tsx,ts,jsx,js,css,json,vue}'",
|
|
15
|
+
"clean": "rimraf tencentcloud es"
|
|
10
16
|
},
|
|
11
17
|
"engines": {
|
|
12
18
|
"node": ">=10"
|
|
13
19
|
},
|
|
20
|
+
"files": [
|
|
21
|
+
"tencentcloud",
|
|
22
|
+
"es"
|
|
23
|
+
],
|
|
14
24
|
"keywords": [
|
|
15
25
|
"tencentcloudapi",
|
|
16
26
|
"tencentcloud",
|
|
@@ -22,7 +32,7 @@
|
|
|
22
32
|
"author": "tencentcloudapi",
|
|
23
33
|
"license": "Apache-2.0",
|
|
24
34
|
"dependencies": {
|
|
25
|
-
"tencentcloud-sdk-nodejs-common": "
|
|
35
|
+
"tencentcloud-sdk-nodejs-common": "*",
|
|
26
36
|
"tslib": "1.13.0"
|
|
27
37
|
},
|
|
28
38
|
"directories": {
|
|
@@ -35,14 +45,22 @@
|
|
|
35
45
|
},
|
|
36
46
|
"devDependencies": {
|
|
37
47
|
"@types/form-data": "^2.5.0",
|
|
48
|
+
"@types/json-bigint": "^1.0.1",
|
|
38
49
|
"@types/node": "^14.0.26",
|
|
39
50
|
"@types/node-fetch": "^2.5.7",
|
|
51
|
+
"@types/uuid": "^9.0.8",
|
|
40
52
|
"@typescript-eslint/eslint-plugin": "^2.34.0",
|
|
41
53
|
"@typescript-eslint/parser": "^2.34.0",
|
|
54
|
+
"babel-eslint": "^10.0.2",
|
|
42
55
|
"chai": "^4.2.0",
|
|
56
|
+
"concurrently": "^6.5.1",
|
|
57
|
+
"esbuild": "^0.25.0",
|
|
43
58
|
"eslint": "^6.8.0",
|
|
44
|
-
"
|
|
59
|
+
"eslint-plugin-react": "^7.17.0",
|
|
60
|
+
"mocha": "^8.4.0",
|
|
61
|
+
"prettier": "^2.3.0",
|
|
62
|
+
"rimraf": "^5.0.10",
|
|
45
63
|
"ts-node": "^8.10.2",
|
|
46
64
|
"typescript": "^3.9.7"
|
|
47
65
|
}
|
|
48
|
-
}
|
|
66
|
+
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.v20240516 = void 0;
|
|
4
|
-
const
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const Models = tslib_1.__importStar(require("./mqtt_models"));
|
|
5
6
|
const mqtt_client_1 = require("./mqtt_client");
|
|
6
7
|
exports.v20240516 = {
|
|
7
8
|
Client: mqtt_client_1.Client,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Client = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
4
5
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
5
6
|
/*
|
|
6
7
|
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
|
@@ -18,7 +19,7 @@ exports.Client = void 0;
|
|
|
18
19
|
* specific language governing permissions and limitations
|
|
19
20
|
* under the License.
|
|
20
21
|
*/
|
|
21
|
-
const TencentCloudCommon = require("tencentcloud-sdk-nodejs-common");
|
|
22
|
+
const TencentCloudCommon = tslib_1.__importStar(require("tencentcloud-sdk-nodejs-common"));
|
|
22
23
|
/**
|
|
23
24
|
* mqtt client
|
|
24
25
|
* @class
|
|
@@ -677,8 +677,7 @@ export interface MQTTInstanceItem {
|
|
|
677
677
|
*/
|
|
678
678
|
Version?: string;
|
|
679
679
|
/**
|
|
680
|
-
*
|
|
681
|
-
EXPERIMENT,体验版
|
|
680
|
+
* 实例类型
|
|
682
681
|
BASIC,基础版
|
|
683
682
|
PRO,专业版
|
|
684
683
|
PLATINUM,铂金版
|
|
@@ -719,7 +718,7 @@ export interface MQTTInstanceItem {
|
|
|
719
718
|
*/
|
|
720
719
|
TpsLimit?: number;
|
|
721
720
|
/**
|
|
722
|
-
*
|
|
721
|
+
* 创建时间,毫秒级时间戳
|
|
723
722
|
*/
|
|
724
723
|
CreateTime?: number;
|
|
725
724
|
/**
|
|
@@ -731,7 +730,9 @@ export interface MQTTInstanceItem {
|
|
|
731
730
|
*/
|
|
732
731
|
ClientNumLimit?: number;
|
|
733
732
|
/**
|
|
734
|
-
*
|
|
733
|
+
* 是否自动续费。仅包年包月就去那生效。
|
|
734
|
+
1:自动续费
|
|
735
|
+
0:非自动续费
|
|
735
736
|
*/
|
|
736
737
|
RenewFlag?: number;
|
|
737
738
|
/**
|
|
@@ -739,11 +740,11 @@ export interface MQTTInstanceItem {
|
|
|
739
740
|
*/
|
|
740
741
|
PayMode?: string;
|
|
741
742
|
/**
|
|
742
|
-
*
|
|
743
|
+
* 到期时间,毫秒级时间戳
|
|
743
744
|
*/
|
|
744
745
|
ExpiryTime?: number;
|
|
745
746
|
/**
|
|
746
|
-
*
|
|
747
|
+
* 预销毁时间,毫秒级时间戳
|
|
747
748
|
*/
|
|
748
749
|
DestroyTime?: number;
|
|
749
750
|
/**
|
|
@@ -1479,7 +1480,7 @@ export interface DescribeInsVPCEndpointsRequest {
|
|
|
1479
1480
|
*/
|
|
1480
1481
|
export interface DescribeTopicListRequest {
|
|
1481
1482
|
/**
|
|
1482
|
-
* 实例ID
|
|
1483
|
+
* 实例ID,从 [DescribeInstanceList](https://cloud.tencent.com/document/api/1778/111029)接口或控制台获得。
|
|
1483
1484
|
*/
|
|
1484
1485
|
InstanceId: string;
|
|
1485
1486
|
/**
|
|
@@ -2154,18 +2155,18 @@ export interface DescribeDeviceCertificateResponse {
|
|
|
2154
2155
|
*/
|
|
2155
2156
|
export interface DescribeInstanceListRequest {
|
|
2156
2157
|
/**
|
|
2157
|
-
*
|
|
2158
|
+
* 查询条件列表,支持以下字段
|
|
2158
2159
|
InstanceName:集群名模糊搜索
|
|
2159
2160
|
InstanceId:集群id精确搜索
|
|
2160
|
-
InstanceStatus
|
|
2161
|
+
InstanceStatus:集群状态搜索(RUNNING-运行中,CREATING-创建中,MODIFYING-变配中,DELETING-删除中)
|
|
2161
2162
|
*/
|
|
2162
2163
|
Filters?: Array<Filter>;
|
|
2163
2164
|
/**
|
|
2164
|
-
*
|
|
2165
|
+
* 查询起始位置,默认0
|
|
2165
2166
|
*/
|
|
2166
2167
|
Offset?: number;
|
|
2167
2168
|
/**
|
|
2168
|
-
*
|
|
2169
|
+
* 查询结果限制数量,默认20,最大100
|
|
2169
2170
|
*/
|
|
2170
2171
|
Limit?: number;
|
|
2171
2172
|
/**
|
package/index.d.ts
DELETED
package/index.js
DELETED
package/prettier.config.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
// prettier.config.js
|
|
2
|
-
module.exports = {
|
|
3
|
-
// 一行最多 100 字符
|
|
4
|
-
printWidth: 100,
|
|
5
|
-
// 使用 4 个空格缩进
|
|
6
|
-
tabWidth: 2,
|
|
7
|
-
// 不使用缩进符,而使用空格
|
|
8
|
-
useTabs: false,
|
|
9
|
-
// 行尾需要有分号
|
|
10
|
-
semi: false,
|
|
11
|
-
// 使用单引号
|
|
12
|
-
singleQuote: false,
|
|
13
|
-
// 对象的 key 仅在必要时用引号
|
|
14
|
-
quoteProps: "as-needed",
|
|
15
|
-
// jsx 不使用单引号,而使用双引号
|
|
16
|
-
jsxSingleQuote: false,
|
|
17
|
-
// 末尾不需要逗号
|
|
18
|
-
trailingComma: "es5",
|
|
19
|
-
// 大括号内的首尾需要空格
|
|
20
|
-
bracketSpacing: true,
|
|
21
|
-
// jsx 标签的反尖括号需要换行
|
|
22
|
-
jsxBracketSameLine: false,
|
|
23
|
-
// 箭头函数,只有一个参数的时候,也需要括号
|
|
24
|
-
arrowParens: "always",
|
|
25
|
-
// 每个文件格式化的范围是文件的全部内容
|
|
26
|
-
rangeStart: 0,
|
|
27
|
-
rangeEnd: Infinity,
|
|
28
|
-
// 不需要写文件开头的 @prettier
|
|
29
|
-
requirePragma: false,
|
|
30
|
-
// 不需要自动在文件开头插入 @prettier
|
|
31
|
-
insertPragma: false,
|
|
32
|
-
// 使用默认的折行标准
|
|
33
|
-
proseWrap: "preserve",
|
|
34
|
-
// 根据显示样式决定 html 要不要折行
|
|
35
|
-
htmlWhitespaceSensitivity: "css",
|
|
36
|
-
// 换行符使用 lf
|
|
37
|
-
endOfLine: "lf",
|
|
38
|
-
}
|
package/src/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./services"
|
package/src/services/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { mqtt } from "./mqtt"
|