tencentcloud-sdk-nodejs-apm 4.0.1046 → 4.1.2

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
@@ -52,10 +52,24 @@ npm install tencentcloud-sdk-nodejs --save
52
52
 
53
53
  ## 通过源码包安装
54
54
 
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,具体可参考示例。
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,4 @@
1
+ import { v20210622 } from "./v20210622";
2
+ export const apm = {
3
+ v20210622: v20210622,
4
+ };
@@ -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("apm.tencentcloudapi.com", "2021-06-22", clientConfig);
5
+ }
6
+ async DescribeGeneralApmApplicationConfig(req, cb) {
7
+ return this.request("DescribeGeneralApmApplicationConfig", req, cb);
8
+ }
9
+ async DescribeTagValues(req, cb) {
10
+ return this.request("DescribeTagValues", req, cb);
11
+ }
12
+ async DescribeGeneralSpanList(req, cb) {
13
+ return this.request("DescribeGeneralSpanList", req, cb);
14
+ }
15
+ async DescribeApmInstances(req, cb) {
16
+ return this.request("DescribeApmInstances", req, cb);
17
+ }
18
+ async DescribeApmAgent(req, cb) {
19
+ return this.request("DescribeApmAgent", req, cb);
20
+ }
21
+ async DescribeGeneralOTSpanList(req, cb) {
22
+ return this.request("DescribeGeneralOTSpanList", req, cb);
23
+ }
24
+ async ModifyApmInstance(req, cb) {
25
+ return this.request("ModifyApmInstance", req, cb);
26
+ }
27
+ async ModifyGeneralApmApplicationConfig(req, cb) {
28
+ return this.request("ModifyGeneralApmApplicationConfig", req, cb);
29
+ }
30
+ async DescribeGeneralMetricData(req, cb) {
31
+ return this.request("DescribeGeneralMetricData", req, cb);
32
+ }
33
+ async DescribeMetricRecords(req, cb) {
34
+ return this.request("DescribeMetricRecords", req, cb);
35
+ }
36
+ async TerminateApmInstance(req, cb) {
37
+ return this.request("TerminateApmInstance", req, cb);
38
+ }
39
+ async CreateApmInstance(req, cb) {
40
+ return this.request("CreateApmInstance", req, cb);
41
+ }
42
+ async DescribeServiceOverview(req, cb) {
43
+ return this.request("DescribeServiceOverview", req, cb);
44
+ }
45
+ }
File without changes
@@ -0,0 +1,6 @@
1
+ import * as Models from "./apm_models";
2
+ import { Client } from "./apm_client";
3
+ export const v20210622 = {
4
+ Client: Client,
5
+ Models: Models,
6
+ };
@@ -0,0 +1 @@
1
+ export { apm } from "./apm";
package/package.json CHANGED
@@ -1,16 +1,25 @@
1
1
  {
2
2
  "name": "tencentcloud-sdk-nodejs-apm",
3
- "version": "4.0.1046",
4
- "description": "Tencent Cloud API NODEJS SDK",
5
- "main": "tencentcloud/index.js",
3
+ "version": "4.1.2",
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
+ "prettier": "prettier --config prettier.config.js --write 'src/**/*.{tsx,ts,jsx,js,css,json,vue}'",
14
+ "clean": "rimraf tencentcloud es"
10
15
  },
11
16
  "engines": {
12
17
  "node": ">=10"
13
18
  },
19
+ "files": [
20
+ "tencentcloud",
21
+ "es"
22
+ ],
14
23
  "keywords": [
15
24
  "tencentcloudapi",
16
25
  "tencentcloud",
@@ -22,7 +31,7 @@
22
31
  "author": "tencentcloudapi",
23
32
  "license": "Apache-2.0",
24
33
  "dependencies": {
25
- "tencentcloud-sdk-nodejs-common": "^4.0.488",
34
+ "tencentcloud-sdk-nodejs-common": "*",
26
35
  "tslib": "1.13.0"
27
36
  },
28
37
  "directories": {
@@ -35,14 +44,21 @@
35
44
  },
36
45
  "devDependencies": {
37
46
  "@types/form-data": "^2.5.0",
47
+ "@types/json-bigint": "^1.0.1",
38
48
  "@types/node": "^14.0.26",
39
49
  "@types/node-fetch": "^2.5.7",
50
+ "@types/uuid": "^9.0.8",
40
51
  "@typescript-eslint/eslint-plugin": "^2.34.0",
41
52
  "@typescript-eslint/parser": "^2.34.0",
53
+ "babel-eslint": "^10.0.2",
42
54
  "chai": "^4.2.0",
55
+ "concurrently": "^6.5.1",
43
56
  "eslint": "^6.8.0",
44
- "mocha": "^8.1.1",
57
+ "eslint-plugin-react": "^7.17.0",
58
+ "mocha": "^8.4.0",
59
+ "prettier": "^2.3.0",
60
+ "rimraf": "^5.0.10",
45
61
  "ts-node": "^8.10.2",
46
62
  "typescript": "^3.9.7"
47
63
  }
48
- }
64
+ }
@@ -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
  * apm client
24
25
  * @class
@@ -527,21 +527,21 @@ export interface DescribeServiceOverviewRequest {
527
527
  */
528
528
  Metrics: Array<QueryMetricItem>;
529
529
  /**
530
- * 聚合维度
530
+ * 开始时间(单位:秒)
531
531
  */
532
- GroupBy: Array<string>;
532
+ StartTime: number;
533
533
  /**
534
- * 过滤条件
534
+ * 结束时间(单位:秒)
535
535
  */
536
- Filters?: Array<Filter>;
536
+ EndTime: number;
537
537
  /**
538
- * 开始时间(单位:秒)
538
+ * 聚合维度
539
539
  */
540
- StartTime?: number;
540
+ GroupBy: Array<string>;
541
541
  /**
542
- * 结束时间(单位:秒)
542
+ * 过滤条件
543
543
  */
544
- EndTime?: number;
544
+ Filters?: Array<Filter>;
545
545
  /**
546
546
  * 排序方式
547
547
  Value 填写:
@@ -586,11 +586,11 @@ export interface DescribeTagValuesRequest {
586
586
  /**
587
587
  * 开始时间(单位为秒)
588
588
  */
589
- StartTime?: number;
589
+ StartTime: number;
590
590
  /**
591
591
  * 结束时间(单位为秒)
592
592
  */
593
- EndTime?: number;
593
+ EndTime: number;
594
594
  /**
595
595
  * 过滤条件
596
596
  */
@@ -825,15 +825,15 @@ export interface DescribeGeneralSpanListRequest {
825
825
  /**
826
826
  * 业务系统 ID
827
827
  */
828
- InstanceId?: string;
828
+ InstanceId: string;
829
829
  /**
830
830
  * Span 查询开始时间戳(单位:秒)
831
831
  */
832
- StartTime?: number;
832
+ StartTime: number;
833
833
  /**
834
834
  * Span 查询结束时间戳(单位:秒)
835
835
  */
836
- EndTime?: number;
836
+ EndTime: number;
837
837
  /**
838
838
  * 通用过滤参数
839
839
  */
@@ -972,21 +972,25 @@ export interface DescribeApmAgentRequest {
972
972
  */
973
973
  export interface DescribeMetricRecordsRequest {
974
974
  /**
975
- * 指标列表
975
+ * 业务系统 ID
976
976
  */
977
- Metrics: Array<QueryMetricItem>;
977
+ InstanceId: string;
978
978
  /**
979
- * 业务系统 ID
979
+ * 指标列表
980
980
  */
981
- InstanceId?: string;
981
+ Metrics: Array<QueryMetricItem>;
982
982
  /**
983
983
  * 开始时间(单位为秒)
984
984
  */
985
- StartTime?: number;
985
+ StartTime: number;
986
986
  /**
987
987
  * 结束时间(单位为秒)
988
988
  */
989
- EndTime?: number;
989
+ EndTime: number;
990
+ /**
991
+ * 聚合维度
992
+ */
993
+ GroupBy: Array<string>;
990
994
  /**
991
995
  * 过滤条件
992
996
  */
@@ -995,10 +999,6 @@ export interface DescribeMetricRecordsRequest {
995
999
  * Or 过滤条件
996
1000
  */
997
1001
  OrFilters?: Array<Filter>;
998
- /**
999
- * 聚合维度
1000
- */
1001
- GroupBy?: Array<string>;
1002
1002
  /**
1003
1003
  * 排序
1004
1004
  现支持的 Key 有:
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.v20210622 = void 0;
4
- const Models = require("./apm_models");
4
+ const tslib_1 = require("tslib");
5
+ const Models = tslib_1.__importStar(require("./apm_models"));
5
6
  const apm_client_1 = require("./apm_client");
6
7
  exports.v20210622 = {
7
8
  Client: apm_client_1.Client,
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,5 +0,0 @@
1
- import { v20210622 } from "./v20210622"
2
-
3
- export const apm = {
4
- v20210622: v20210622,
5
- }
@@ -1,206 +0,0 @@
1
- /* eslint-disable @typescript-eslint/no-unused-vars */
2
- /*
3
- * Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing,
12
- * software distributed under the License is distributed on an
13
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
- * KIND, either express or implied. See the License for the
15
- * specific language governing permissions and limitations
16
- * under the License.
17
- */
18
- import * as TencentCloudCommon from "tencentcloud-sdk-nodejs-common"
19
- import {
20
- SpanLog,
21
- ModifyApmInstanceRequest,
22
- ApmInstanceDetail,
23
- CreateApmInstanceRequest,
24
- ModifyGeneralApmApplicationConfigRequest,
25
- DescribeServiceOverviewResponse,
26
- QueryMetricItem,
27
- TerminateApmInstanceRequest,
28
- DescribeApmInstancesResponse,
29
- Instrument,
30
- DescribeTagValuesResponse,
31
- Span,
32
- ApmAgentInfo,
33
- DescribeGeneralSpanListResponse,
34
- ApmMetricRecord,
35
- DescribeServiceOverviewRequest,
36
- DescribeApmAgentResponse,
37
- DescribeTagValuesRequest,
38
- ApmField,
39
- Line,
40
- ApmApplicationConfigView,
41
- ApmTag,
42
- APMKVItem,
43
- OrderBy,
44
- DescribeMetricRecordsResponse,
45
- DescribeGeneralOTSpanListResponse,
46
- DescribeGeneralSpanListRequest,
47
- Filter,
48
- APMKV,
49
- DescribeGeneralOTSpanListRequest,
50
- DescribeApmAgentRequest,
51
- DescribeMetricRecordsRequest,
52
- DescribeGeneralApmApplicationConfigResponse,
53
- DescribeGeneralMetricDataRequest,
54
- CreateApmInstanceResponse,
55
- SpanReference,
56
- SpanProcess,
57
- DescribeGeneralApmApplicationConfigRequest,
58
- ModifyApmInstanceResponse,
59
- GeneralFilter,
60
- DescribeApmInstancesRequest,
61
- SpanTag,
62
- DescribeGeneralMetricDataResponse,
63
- ModifyGeneralApmApplicationConfigResponse,
64
- TerminateApmInstanceResponse,
65
- } from "./apm_models"
66
-
67
- /**
68
- * apm client
69
- * @class
70
- */
71
- export class Client extends TencentCloudCommon.AbstractClient {
72
- constructor(clientConfig: TencentCloudCommon.ClientConfig) {
73
- super("apm.tencentcloudapi.com", "2021-06-22", clientConfig)
74
- }
75
-
76
- /**
77
- * 查询应用配置信息
78
- */
79
- async DescribeGeneralApmApplicationConfig(
80
- req: DescribeGeneralApmApplicationConfigRequest,
81
- cb?: (error: string, rep: DescribeGeneralApmApplicationConfigResponse) => void
82
- ): Promise<DescribeGeneralApmApplicationConfigResponse> {
83
- return this.request("DescribeGeneralApmApplicationConfig", req, cb)
84
- }
85
-
86
- /**
87
- * 根据维度名和过滤条件,查询维度数据.
88
- */
89
- async DescribeTagValues(
90
- req: DescribeTagValuesRequest,
91
- cb?: (error: string, rep: DescribeTagValuesResponse) => void
92
- ): Promise<DescribeTagValuesResponse> {
93
- return this.request("DescribeTagValues", req, cb)
94
- }
95
-
96
- /**
97
- * 通用查询调用链列表
98
- */
99
- async DescribeGeneralSpanList(
100
- req: DescribeGeneralSpanListRequest,
101
- cb?: (error: string, rep: DescribeGeneralSpanListResponse) => void
102
- ): Promise<DescribeGeneralSpanListResponse> {
103
- return this.request("DescribeGeneralSpanList", req, cb)
104
- }
105
-
106
- /**
107
- * 获取 APM 业务系统列表
108
- */
109
- async DescribeApmInstances(
110
- req: DescribeApmInstancesRequest,
111
- cb?: (error: string, rep: DescribeApmInstancesResponse) => void
112
- ): Promise<DescribeApmInstancesResponse> {
113
- return this.request("DescribeApmInstances", req, cb)
114
- }
115
-
116
- /**
117
- * 获取 APM 接入点
118
- */
119
- async DescribeApmAgent(
120
- req: DescribeApmAgentRequest,
121
- cb?: (error: string, rep: DescribeApmAgentResponse) => void
122
- ): Promise<DescribeApmAgentResponse> {
123
- return this.request("DescribeApmAgent", req, cb)
124
- }
125
-
126
- /**
127
- * 通用查询 OpenTelemetry 调用链列表
128
- */
129
- async DescribeGeneralOTSpanList(
130
- req: DescribeGeneralOTSpanListRequest,
131
- cb?: (error: string, rep: DescribeGeneralOTSpanListResponse) => void
132
- ): Promise<DescribeGeneralOTSpanListResponse> {
133
- return this.request("DescribeGeneralOTSpanList", req, cb)
134
- }
135
-
136
- /**
137
- * 修改APM业务系统接口
138
- */
139
- async ModifyApmInstance(
140
- req: ModifyApmInstanceRequest,
141
- cb?: (error: string, rep: ModifyApmInstanceResponse) => void
142
- ): Promise<ModifyApmInstanceResponse> {
143
- return this.request("ModifyApmInstance", req, cb)
144
- }
145
-
146
- /**
147
- * 对外开放的openApi,客户可以灵活的指定需要修改的字段,再加入需要修改的服务列表.
148
- */
149
- async ModifyGeneralApmApplicationConfig(
150
- req: ModifyGeneralApmApplicationConfigRequest,
151
- cb?: (error: string, rep: ModifyGeneralApmApplicationConfigResponse) => void
152
- ): Promise<ModifyGeneralApmApplicationConfigResponse> {
153
- return this.request("ModifyGeneralApmApplicationConfig", req, cb)
154
- }
155
-
156
- /**
157
- * 获取指标数据通用接口。用户根据需要上送请求参数,返回对应的指标数据。
158
- 接口调用频率限制为:20次/秒,1200次/分钟。单请求的数据点数限制为1440个。
159
- */
160
- async DescribeGeneralMetricData(
161
- req: DescribeGeneralMetricDataRequest,
162
- cb?: (error: string, rep: DescribeGeneralMetricDataResponse) => void
163
- ): Promise<DescribeGeneralMetricDataResponse> {
164
- return this.request("DescribeGeneralMetricData", req, cb)
165
- }
166
-
167
- /**
168
- * 查询指标列表接口,查询指标更推荐使用DescribeGeneralMetricData接口
169
- */
170
- async DescribeMetricRecords(
171
- req: DescribeMetricRecordsRequest,
172
- cb?: (error: string, rep: DescribeMetricRecordsResponse) => void
173
- ): Promise<DescribeMetricRecordsResponse> {
174
- return this.request("DescribeMetricRecords", req, cb)
175
- }
176
-
177
- /**
178
- * 销毁 APM 业务系统
179
- */
180
- async TerminateApmInstance(
181
- req: TerminateApmInstanceRequest,
182
- cb?: (error: string, rep: TerminateApmInstanceResponse) => void
183
- ): Promise<TerminateApmInstanceResponse> {
184
- return this.request("TerminateApmInstance", req, cb)
185
- }
186
-
187
- /**
188
- * 业务购买 APM 业务系统,调用该接口创建
189
- */
190
- async CreateApmInstance(
191
- req: CreateApmInstanceRequest,
192
- cb?: (error: string, rep: CreateApmInstanceResponse) => void
193
- ): Promise<CreateApmInstanceResponse> {
194
- return this.request("CreateApmInstance", req, cb)
195
- }
196
-
197
- /**
198
- * 应用概览数据拉取
199
- */
200
- async DescribeServiceOverview(
201
- req: DescribeServiceOverviewRequest,
202
- cb?: (error: string, rep: DescribeServiceOverviewResponse) => void
203
- ): Promise<DescribeServiceOverviewResponse> {
204
- return this.request("DescribeServiceOverview", req, cb)
205
- }
206
- }