tencentcloud-sdk-nodejs-mqtt 4.0.1049 → 4.1.5

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 CHANGED
@@ -44,18 +44,40 @@ npm install tencentcloud-sdk-nodejs-vpc --save
44
44
 
45
45
  ### 安装全产品 SDK
46
46
 
47
+ 如果项目依赖的云产品较多,可以引入全产品 SDK。
48
+
47
49
  ```
48
50
  npm install tencentcloud-sdk-nodejs --save
49
51
  ```
50
52
 
51
- 全产品 SDK 包含了所有云产品的调用代码,体积偏大,对体积敏感的场景,推荐安装指定产品 SDK。
53
+ 全产品 SDK 包含所有云产品调用代码和 TypeScript 类型文件,体积偏大。对于体积敏感的场景,推荐安装指定产品 SDK。
54
+
55
+ 如果既希望全产品调用,又对包体积比较敏感,可以使用 Slim 版本 SDK。Slim SDK 移除类型文件,并进行了代码压缩,适合体积敏感场景使用:
56
+
57
+ ```
58
+ npm install tencentcloud-sdk-slim-nodejs --save
59
+ ```
52
60
 
53
61
  ## 通过源码包安装
54
62
 
55
- 1. 前往 [GitHub 仓库](https://github.com/tencentcloud/tencentcloud-sdk-nodejs) 或者 [Gitee 仓库](https://gitee.com/tencentcloud/tencentcloud-sdk-nodejs) 下载源码压缩包。
56
- 2. 解压源码包到您项目合适的位置,例如 `sdk/tencentcloud-sdk-nodejs`。
57
- 3. 执行 `npm install ./sdk/tencentcloud-sdk-nodejs`。
58
- 4. 使用 `require("tencentcloud-sdk-nodejs")` 的方式引入 SDK,具体可参考示例。
63
+ 1. clone 代码到本地:
64
+ ```
65
+ git clone https://github.com/tencentcloud/tencentcloud-sdk-nodejs
66
+ # 或者
67
+ git clone https://gitee.com/tencentcloud/tencentcloud-sdk-nodejs
68
+ ```
69
+ 2. 在项目根目录执行以下命令完成构建:
70
+ ```
71
+ npm install && npm run build
72
+ ```
73
+ 3. 打包 NPM 压缩文件,例如 `tencentcloud-sdk-nodejs-4.0.0.tgz`
74
+ ```
75
+ npm pack
76
+ ```
77
+ 4. 安装包到你的项目里:
78
+ ```
79
+ npm install /path/to/tencentcloud-sdk-nodejs/tencentcloud-sdk-nodejs-4.0.0.tgz
80
+ ```
59
81
 
60
82
  # 示例
61
83
 
package/es/index.js ADDED
@@ -0,0 +1 @@
1
+ export * from "./services";
@@ -0,0 +1 @@
1
+ export { mqtt } from "./mqtt";
@@ -0,0 +1,4 @@
1
+ import { v20240516 } from "./v20240516";
2
+ export const mqtt = {
3
+ v20240516: v20240516,
4
+ };
@@ -0,0 +1,6 @@
1
+ import * as Models from "./mqtt_models";
2
+ import { Client } from "./mqtt_client";
3
+ export const v20240516 = {
4
+ Client: Client,
5
+ Models: Models,
6
+ };
@@ -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.0.1049",
3
+ "version": "4.1.5",
4
4
  "description": "腾讯云 API NODEJS SDK",
5
- "main": "tencentcloud/index.js",
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": "tsc",
9
- "prettier": "prettier --config prettier.config.js --write 'src/**/*.{tsx,ts,jsx,js,css,json,vue}'"
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",
@@ -43,10 +53,13 @@
43
53
  "@typescript-eslint/parser": "^2.34.0",
44
54
  "babel-eslint": "^10.0.2",
45
55
  "chai": "^4.2.0",
56
+ "concurrently": "^6.5.1",
57
+ "esbuild": "^0.25.0",
46
58
  "eslint": "^6.8.0",
47
59
  "eslint-plugin-react": "^7.17.0",
48
- "mocha": "^8.1.1",
60
+ "mocha": "^8.4.0",
49
61
  "prettier": "^2.3.0",
62
+ "rimraf": "^5.0.10",
50
63
  "ts-node": "^8.10.2",
51
64
  "typescript": "^3.9.7"
52
65
  }
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.v20240516 = void 0;
4
- const Models = require("./mqtt_models");
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