tencentcloud-sdk-nodejs-mongodb 4.0.1053 → 4.1.24

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 (31) hide show
  1. package/README.md +27 -5
  2. package/es/index.js +1 -0
  3. package/es/services/index.js +1 -0
  4. package/es/services/mongodb/index.js +6 -0
  5. package/es/services/mongodb/v20180408/index.js +6 -0
  6. package/es/services/mongodb/v20180408/mongodb_client.js +45 -0
  7. package/es/services/mongodb/v20180408/mongodb_models.js +0 -0
  8. package/es/services/mongodb/v20190725/index.js +6 -0
  9. package/es/services/mongodb/v20190725/mongodb_client.js +159 -0
  10. package/es/services/mongodb/v20190725/mongodb_models.js +0 -0
  11. package/package.json +26 -8
  12. package/tencentcloud/services/mongodb/index.d.ts +4 -4
  13. package/tencentcloud/services/mongodb/index.js +2 -2
  14. package/tencentcloud/services/mongodb/v20180408/index.js +2 -1
  15. package/tencentcloud/services/mongodb/v20180408/mongodb_client.js +2 -1
  16. package/tencentcloud/services/mongodb/v20190725/index.js +2 -1
  17. package/tencentcloud/services/mongodb/v20190725/mongodb_client.js +2 -1
  18. package/index.d.ts +0 -2
  19. package/index.js +0 -6
  20. package/prettier.config.js +0 -38
  21. package/src/index.ts +0 -1
  22. package/src/services/index.ts +0 -1
  23. package/src/services/mongodb/index.ts +0 -7
  24. package/src/services/mongodb/v20180408/index.ts +0 -6
  25. package/src/services/mongodb/v20180408/mongodb_client.ts +0 -193
  26. package/src/services/mongodb/v20180408/mongodb_models.ts +0 -915
  27. package/src/services/mongodb/v20190725/index.ts +0 -6
  28. package/src/services/mongodb/v20190725/mongodb_client.ts +0 -686
  29. package/src/services/mongodb/v20190725/mongodb_models.ts +0 -3480
  30. package/tsconfig.json +0 -33
  31. package/typings/index.d.ts +0 -2
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 { mongodb } from "./mongodb";
@@ -0,0 +1,6 @@
1
+ import { v20180408 } from "./v20180408";
2
+ import { v20190725 } from "./v20190725";
3
+ export const mongodb = {
4
+ v20180408: v20180408,
5
+ v20190725: v20190725,
6
+ };
@@ -0,0 +1,6 @@
1
+ import * as Models from "./mongodb_models";
2
+ import { Client } from "./mongodb_client";
3
+ export const v20180408 = {
4
+ Client: Client,
5
+ Models: Models,
6
+ };
@@ -0,0 +1,45 @@
1
+ import * as TencentCloudCommon from "tencentcloud-sdk-nodejs-common";
2
+ export class Client extends TencentCloudCommon.AbstractClient {
3
+ constructor(clientConfig) {
4
+ super("mongodb.tencentcloudapi.com", "2018-04-08", clientConfig);
5
+ }
6
+ async AssignProject(req, cb) {
7
+ return this.request("AssignProject", req, cb);
8
+ }
9
+ async TerminateDBInstance(req, cb) {
10
+ return this.request("TerminateDBInstance", req, cb);
11
+ }
12
+ async CreateDBInstance(req, cb) {
13
+ return this.request("CreateDBInstance", req, cb);
14
+ }
15
+ async DescribeClientConnections(req, cb) {
16
+ return this.request("DescribeClientConnections", req, cb);
17
+ }
18
+ async CreateDBInstanceHour(req, cb) {
19
+ return this.request("CreateDBInstanceHour", req, cb);
20
+ }
21
+ async DescribeSlowLog(req, cb) {
22
+ return this.request("DescribeSlowLog", req, cb);
23
+ }
24
+ async RenameInstance(req, cb) {
25
+ return this.request("RenameInstance", req, cb);
26
+ }
27
+ async UpgradeDBInstance(req, cb) {
28
+ return this.request("UpgradeDBInstance", req, cb);
29
+ }
30
+ async SetAutoRenew(req, cb) {
31
+ return this.request("SetAutoRenew", req, cb);
32
+ }
33
+ async DescribeSpecInfo(req, cb) {
34
+ return this.request("DescribeSpecInfo", req, cb);
35
+ }
36
+ async SetPassword(req, cb) {
37
+ return this.request("SetPassword", req, cb);
38
+ }
39
+ async UpgradeDBInstanceHour(req, cb) {
40
+ return this.request("UpgradeDBInstanceHour", req, cb);
41
+ }
42
+ async DescribeDBInstances(req, cb) {
43
+ return this.request("DescribeDBInstances", req, cb);
44
+ }
45
+ }
@@ -0,0 +1,6 @@
1
+ import * as Models from "./mongodb_models";
2
+ import { Client } from "./mongodb_client";
3
+ export const v20190725 = {
4
+ Client: Client,
5
+ Models: Models,
6
+ };
@@ -0,0 +1,159 @@
1
+ import * as TencentCloudCommon from "tencentcloud-sdk-nodejs-common";
2
+ export class Client extends TencentCloudCommon.AbstractClient {
3
+ constructor(clientConfig) {
4
+ super("mongodb.tencentcloudapi.com", "2019-07-25", clientConfig);
5
+ }
6
+ async TerminateDBInstances(req, cb) {
7
+ return this.request("TerminateDBInstances", req, cb);
8
+ }
9
+ async DescribeDBInstanceURL(req, cb) {
10
+ return this.request("DescribeDBInstanceURL", req, cb);
11
+ }
12
+ async DescribeDBInstanceNodeProperty(req, cb) {
13
+ return this.request("DescribeDBInstanceNodeProperty", req, cb);
14
+ }
15
+ async DescribeDBInstanceParamTpl(req, cb) {
16
+ return this.request("DescribeDBInstanceParamTpl", req, cb);
17
+ }
18
+ async DescribeDBInstanceDeal(req, cb) {
19
+ return this.request("DescribeDBInstanceDeal", req, cb);
20
+ }
21
+ async DescribeCurrentOp(req, cb) {
22
+ return this.request("DescribeCurrentOp", req, cb);
23
+ }
24
+ async DescribeClientConnections(req, cb) {
25
+ return this.request("DescribeClientConnections", req, cb);
26
+ }
27
+ async ResetDBInstancePassword(req, cb) {
28
+ return this.request("ResetDBInstancePassword", req, cb);
29
+ }
30
+ async DescribeSecurityGroup(req, cb) {
31
+ return this.request("DescribeSecurityGroup", req, cb);
32
+ }
33
+ async SetAccountUserPrivilege(req, cb) {
34
+ return this.request("SetAccountUserPrivilege", req, cb);
35
+ }
36
+ async FlushInstanceRouterConfig(req, cb) {
37
+ return this.request("FlushInstanceRouterConfig", req, cb);
38
+ }
39
+ async DescribeDBBackups(req, cb) {
40
+ return this.request("DescribeDBBackups", req, cb);
41
+ }
42
+ async IsolateDBInstance(req, cb) {
43
+ return this.request("IsolateDBInstance", req, cb);
44
+ }
45
+ async SetBackupRules(req, cb) {
46
+ return this.request("SetBackupRules", req, cb);
47
+ }
48
+ async InquirePriceModifyDBInstanceSpec(req, cb) {
49
+ return this.request("InquirePriceModifyDBInstanceSpec", req, cb);
50
+ }
51
+ async RestartNodes(req, cb) {
52
+ return this.request("RestartNodes", req, cb);
53
+ }
54
+ async DescribeBackupRules(req, cb) {
55
+ return this.request("DescribeBackupRules", req, cb);
56
+ }
57
+ async RenameInstance(req, cb) {
58
+ return this.request("RenameInstance", req, cb);
59
+ }
60
+ async DescribeAsyncRequestInfo(req, cb) {
61
+ return this.request("DescribeAsyncRequestInfo", req, cb);
62
+ }
63
+ async CreateAccountUser(req, cb) {
64
+ return this.request("CreateAccountUser", req, cb);
65
+ }
66
+ async OfflineIsolatedDBInstance(req, cb) {
67
+ return this.request("OfflineIsolatedDBInstance", req, cb);
68
+ }
69
+ async ModifyDBInstanceParamTpl(req, cb) {
70
+ return this.request("ModifyDBInstanceParamTpl", req, cb);
71
+ }
72
+ async CreateDBInstanceHour(req, cb) {
73
+ return this.request("CreateDBInstanceHour", req, cb);
74
+ }
75
+ async CreateDBInstanceParamTpl(req, cb) {
76
+ return this.request("CreateDBInstanceParamTpl", req, cb);
77
+ }
78
+ async DropDBInstanceParamTpl(req, cb) {
79
+ return this.request("DropDBInstanceParamTpl", req, cb);
80
+ }
81
+ async RenewDBInstances(req, cb) {
82
+ return this.request("RenewDBInstances", req, cb);
83
+ }
84
+ async CreateBackupDownloadTask(req, cb) {
85
+ return this.request("CreateBackupDownloadTask", req, cb);
86
+ }
87
+ async FlashBackDBInstance(req, cb) {
88
+ return this.request("FlashBackDBInstance", req, cb);
89
+ }
90
+ async DescribeDBInstances(req, cb) {
91
+ return this.request("DescribeDBInstances", req, cb);
92
+ }
93
+ async DescribeDBInstanceNamespace(req, cb) {
94
+ return this.request("DescribeDBInstanceNamespace", req, cb);
95
+ }
96
+ async DescribeSlowLogPatterns(req, cb) {
97
+ return this.request("DescribeSlowLogPatterns", req, cb);
98
+ }
99
+ async DescribeSlowLogs(req, cb) {
100
+ return this.request("DescribeSlowLogs", req, cb);
101
+ }
102
+ async ModifyDBInstanceNetworkAddress(req, cb) {
103
+ return this.request("ModifyDBInstanceNetworkAddress", req, cb);
104
+ }
105
+ async CreateDBInstance(req, cb) {
106
+ return this.request("CreateDBInstance", req, cb);
107
+ }
108
+ async ModifyDBInstanceSpec(req, cb) {
109
+ return this.request("ModifyDBInstanceSpec", req, cb);
110
+ }
111
+ async DescribeInstanceParams(req, cb) {
112
+ return this.request("DescribeInstanceParams", req, cb);
113
+ }
114
+ async DescribeSpecInfo(req, cb) {
115
+ return this.request("DescribeSpecInfo", req, cb);
116
+ }
117
+ async DescribeBackupDownloadTask(req, cb) {
118
+ return this.request("DescribeBackupDownloadTask", req, cb);
119
+ }
120
+ async InquirePriceCreateDBInstances(req, cb) {
121
+ return this.request("InquirePriceCreateDBInstances", req, cb);
122
+ }
123
+ async AssignProject(req, cb) {
124
+ return this.request("AssignProject", req, cb);
125
+ }
126
+ async DescribeTransparentDataEncryptionStatus(req, cb) {
127
+ return this.request("DescribeTransparentDataEncryptionStatus", req, cb);
128
+ }
129
+ async DescribeAccountUsers(req, cb) {
130
+ return this.request("DescribeAccountUsers", req, cb);
131
+ }
132
+ async SetInstanceMaintenance(req, cb) {
133
+ return this.request("SetInstanceMaintenance", req, cb);
134
+ }
135
+ async ModifyInstanceParams(req, cb) {
136
+ return this.request("ModifyInstanceParams", req, cb);
137
+ }
138
+ async DescribeDBInstanceParamTplDetail(req, cb) {
139
+ return this.request("DescribeDBInstanceParamTplDetail", req, cb);
140
+ }
141
+ async KillOps(req, cb) {
142
+ return this.request("KillOps", req, cb);
143
+ }
144
+ async EnableTransparentDataEncryption(req, cb) {
145
+ return this.request("EnableTransparentDataEncryption", req, cb);
146
+ }
147
+ async CreateBackupDBInstance(req, cb) {
148
+ return this.request("CreateBackupDBInstance", req, cb);
149
+ }
150
+ async InquirePriceRenewDBInstances(req, cb) {
151
+ return this.request("InquirePriceRenewDBInstances", req, cb);
152
+ }
153
+ async DeleteAccountUser(req, cb) {
154
+ return this.request("DeleteAccountUser", req, cb);
155
+ }
156
+ async ModifyDBInstanceSecurityGroup(req, cb) {
157
+ return this.request("ModifyDBInstanceSecurityGroup", req, cb);
158
+ }
159
+ }
package/package.json CHANGED
@@ -1,16 +1,26 @@
1
1
  {
2
2
  "name": "tencentcloud-sdk-nodejs-mongodb",
3
- "version": "4.0.1053",
4
- "description": "Tencent Cloud API NODEJS SDK",
5
- "main": "tencentcloud/index.js",
3
+ "version": "4.1.24",
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": "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",
@@ -22,7 +32,7 @@
22
32
  "author": "tencentcloudapi",
23
33
  "license": "Apache-2.0",
24
34
  "dependencies": {
25
- "tencentcloud-sdk-nodejs-common": "^4.0.488",
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
- "mocha": "^8.1.1",
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,10 +1,10 @@
1
1
  export declare const mongodb: {
2
- v20190725: {
3
- Client: typeof import("./v20190725/mongodb_client").Client;
4
- Models: typeof import("./v20190725/mongodb_models");
5
- };
6
2
  v20180408: {
7
3
  Client: typeof import("./v20180408/mongodb_client").Client;
8
4
  Models: typeof import("./v20180408/mongodb_models");
9
5
  };
6
+ v20190725: {
7
+ Client: typeof import("./v20190725/mongodb_client").Client;
8
+ Models: typeof import("./v20190725/mongodb_models");
9
+ };
10
10
  };
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.mongodb = void 0;
4
- const v20190725_1 = require("./v20190725");
5
4
  const v20180408_1 = require("./v20180408");
5
+ const v20190725_1 = require("./v20190725");
6
6
  exports.mongodb = {
7
- v20190725: v20190725_1.v20190725,
8
7
  v20180408: v20180408_1.v20180408,
8
+ v20190725: v20190725_1.v20190725,
9
9
  };
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.v20180408 = void 0;
4
- const Models = require("./mongodb_models");
4
+ const tslib_1 = require("tslib");
5
+ const Models = tslib_1.__importStar(require("./mongodb_models"));
5
6
  const mongodb_client_1 = require("./mongodb_client");
6
7
  exports.v20180408 = {
7
8
  Client: mongodb_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
  * mongodb client
24
25
  * @class
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.v20190725 = void 0;
4
- const Models = require("./mongodb_models");
4
+ const tslib_1 = require("tslib");
5
+ const Models = tslib_1.__importStar(require("./mongodb_models"));
5
6
  const mongodb_client_1 = require("./mongodb_client");
6
7
  exports.v20190725 = {
7
8
  Client: mongodb_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
  * mongodb client
24
25
  * @class
package/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- import * as tencentcloud from './tencentcloud';
2
- export default tencentcloud;
package/index.js DELETED
@@ -1,6 +0,0 @@
1
- 'use strict'
2
- Object.defineProperty(exports, '__esModule', { value: true })
3
- const tslib_1 = require('tslib')
4
- const tencentcloud = tslib_1.__importStar(require('./tencentcloud'))
5
- exports.default = tencentcloud
6
- //# sourceMappingURL=index.js.map
@@ -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"
@@ -1 +0,0 @@
1
- export { mongodb } from "./mongodb"
@@ -1,7 +0,0 @@
1
- import { v20190725 } from "./v20190725"
2
- import { v20180408 } from "./v20180408"
3
-
4
- export const mongodb = {
5
- v20190725: v20190725,
6
- v20180408: v20180408,
7
- }
@@ -1,6 +0,0 @@
1
- import * as Models from "./mongodb_models"
2
- import { Client } from "./mongodb_client"
3
- export const v20180408 = {
4
- Client: Client,
5
- Models: Models,
6
- }