tencentcloud-sdk-nodejs-ams 4.0.1052 → 4.1.29

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,6 @@
1
+ import { v20200608 } from "./v20200608";
2
+ import { v20201229 } from "./v20201229";
3
+ export const ams = {
4
+ v20200608: v20200608,
5
+ v20201229: v20201229,
6
+ };
@@ -0,0 +1,27 @@
1
+ import * as TencentCloudCommon from "tencentcloud-sdk-nodejs-common";
2
+ export class Client extends TencentCloudCommon.AbstractClient {
3
+ constructor(clientConfig) {
4
+ super("ams.tencentcloudapi.com", "2020-06-08", clientConfig);
5
+ }
6
+ async DescribeAudioStat(req, cb) {
7
+ return this.request("DescribeAudioStat", req, cb);
8
+ }
9
+ async DescribeTaskDetail(req, cb) {
10
+ return this.request("DescribeTaskDetail", req, cb);
11
+ }
12
+ async CreateBizConfig(req, cb) {
13
+ return this.request("CreateBizConfig", req, cb);
14
+ }
15
+ async DescribeBizConfig(req, cb) {
16
+ return this.request("DescribeBizConfig", req, cb);
17
+ }
18
+ async CancelTask(req, cb) {
19
+ return this.request("CancelTask", req, cb);
20
+ }
21
+ async CreateAudioModerationTask(req, cb) {
22
+ return this.request("CreateAudioModerationTask", req, cb);
23
+ }
24
+ async DescribeAmsList(req, cb) {
25
+ return this.request("DescribeAmsList", req, cb);
26
+ }
27
+ }
File without changes
@@ -0,0 +1,6 @@
1
+ import * as Models from "./ams_models";
2
+ import { Client } from "./ams_client";
3
+ export const v20200608 = {
4
+ Client: Client,
5
+ Models: Models,
6
+ };
@@ -0,0 +1,21 @@
1
+ import * as TencentCloudCommon from "tencentcloud-sdk-nodejs-common";
2
+ export class Client extends TencentCloudCommon.AbstractClient {
3
+ constructor(clientConfig) {
4
+ super("ams.tencentcloudapi.com", "2020-12-29", clientConfig);
5
+ }
6
+ async CreateAudioModerationTask(req, cb) {
7
+ return this.request("CreateAudioModerationTask", req, cb);
8
+ }
9
+ async CreateAudioModerationSyncTask(req, cb) {
10
+ return this.request("CreateAudioModerationSyncTask", req, cb);
11
+ }
12
+ async DescribeTaskDetail(req, cb) {
13
+ return this.request("DescribeTaskDetail", req, cb);
14
+ }
15
+ async DescribeTasks(req, cb) {
16
+ return this.request("DescribeTasks", req, cb);
17
+ }
18
+ async CancelTask(req, cb) {
19
+ return this.request("CancelTask", req, cb);
20
+ }
21
+ }
File without changes
@@ -0,0 +1,6 @@
1
+ import * as Models from "./ams_models";
2
+ import { Client } from "./ams_client";
3
+ export const v20201229 = {
4
+ Client: Client,
5
+ Models: Models,
6
+ };
@@ -0,0 +1 @@
1
+ export { ams } from "./ams";
package/package.json CHANGED
@@ -1,16 +1,26 @@
1
1
  {
2
2
  "name": "tencentcloud-sdk-nodejs-ams",
3
- "version": "4.0.1052",
4
- "description": "Tencent Cloud API NODEJS SDK",
5
- "main": "tencentcloud/index.js",
3
+ "version": "4.1.29",
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,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
  * ams client
24
25
  * @class
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.v20200608 = void 0;
4
- const Models = require("./ams_models");
4
+ const tslib_1 = require("tslib");
5
+ const Models = tslib_1.__importStar(require("./ams_models"));
5
6
  const ams_client_1 = require("./ams_client");
6
7
  exports.v20200608 = {
7
8
  Client: ams_client_1.Client,
@@ -11,8 +11,19 @@ export declare class Client extends TencentCloudCommon.AbstractClient {
11
11
 
12
12
  ### 功能使用说明:
13
13
  - 前往“[内容安全控制台-音频内容安全](https://console.cloud.tencent.com/cms)”开启使用音频内容安全服务,首次开通可获得**10小时**免费调用时长,有效期为1个月。
14
- - 默认接口请求频率限制:**20次/秒**,对于异步审核任务(点播音频),超出频率限制的请求会自动排入待审核队列,对于同步审核任务(直播音频),超出频率限制将会报错。
15
- - 默认并发审核路数限制:点播默认10路,异步审核任务(点播音频)数量超过并发审核路数时,将会进入排队;直播默认100路,同步审核任务(直播音频)超过并发审核路数,接口会返回错误。
14
+
15
+ ### 审核并发限制说明:
16
+
17
+ - **点播音频(异步审核)**
18
+ - 默认并发路数:10
19
+ - 队列处理机制:
20
+ - 当并发任务达到上限时,新任务进入队列等待处理;
21
+ - 新送审任务优先处理,旧任务往后排;
22
+ - **直播音频(异步审核)**
23
+ - 默认并发路数:100
24
+ - 队列处理机制:
25
+ - 运行中的审核任务达到上限时,新请求会提示超频错误:`RequestLimitExceeded`,错误详细为:`You have reached the concurrency limit`;
26
+ - 不支持排队;
16
27
 
17
28
  ### 接口功能说明:
18
29
  - 支持对音频流或音频文件进行检测,判断其中是否包含违规内容;
@@ -20,15 +31,15 @@ export declare class Client extends TencentCloudCommon.AbstractClient {
20
31
  - 支持识别违规内容,包括:低俗、谩骂、色情、广告等场景;
21
32
  - 支持批量提交检测任务,检测任务列表**最多支持10个**。
22
33
 
23
- ### 音频文件调用说明:
34
+ ### 音频文件流调用说明:
24
35
  - 音频文件大小支持:**文件 < 500M**;
25
36
  - 音频文件时长支持:**< 1小时**;
26
37
  - 音频码率类型支持:128 Kbps - 256 Kbps ;
27
38
  - 音频文件支持格式:wav、mp3、aac、flac、amr、3gp、 m4a、wma、ogg、ape;
28
39
  - (**当输入为视频文件时**)支持分离视频文件音轨,并对音频内容进行独立审核。
29
40
 
30
- ### 音频流调用说明:
31
- - 音频流时长支持:**< 3小时**;
41
+ ### 直播音频流调用说明:
42
+ - 音频流时长支持:**24小时以内**,超过需要重新推送审核任务;
32
43
  - 音频码率类型支持:128 Kbps - 256 Kbps ;
33
44
  - 音频流支持的传输协议:RTMP、HTTP、HTTPS;
34
45
  - 音频流格式支持的类型:rtp、srtp、rtmp、rtmps、mmsh、 mmst、hls、http、tcp、https、m3u8;
@@ -37,7 +48,7 @@ export declare class Client extends TencentCloudCommon.AbstractClient {
37
48
  ### 直播断流处理说明:
38
49
  - 请确认已对接[取消任务](https://cloud.tencent.com/document/product/1219/53258)。
39
50
  - 如果直播任务取消/结束,则终止直播拉流并退出审核。
40
- - 如果直播任务没有取消/结束,直播视频推流因故中断,产品将在将在10分钟内持续拉流重试。如果10分钟检测到音频切片数据,则恢复正常审核,反之,则终止拉流并退出审核。在拉流终止后,用户如有审核需求,需重新送审。
51
+ - 在直播任务未取消或结束的情况下,若推流中断(例如 `Operation not permitted` 错误),审核服务将在 10分钟内持续尝试重新拉流。检测到有效的图片或音频数据,审核将自动恢复正常;否则,10分钟后终止拉流并退出审核。此时如有需要,请重新提交审核请求。对于因网络问题导致的拉流失败(如 `HTTP 404 Not Found` 错误),系统将进行最多 16次重试。若成功获取有效数据,审核流程即刻恢复;若所有重试均失败,则同样终止拉流并退出审核,需用户重新送审。
41
52
  */
42
53
  CreateAudioModerationTask(req: CreateAudioModerationTaskRequest, cb?: (error: string, rep: CreateAudioModerationTaskResponse) => void): Promise<CreateAudioModerationTaskResponse>;
43
54
  /**
@@ -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
  * ams client
24
25
  * @class
@@ -32,8 +33,19 @@ class Client extends TencentCloudCommon.AbstractClient {
32
33
 
33
34
  ### 功能使用说明:
34
35
  - 前往“[内容安全控制台-音频内容安全](https://console.cloud.tencent.com/cms)”开启使用音频内容安全服务,首次开通可获得**10小时**免费调用时长,有效期为1个月。
35
- - 默认接口请求频率限制:**20次/秒**,对于异步审核任务(点播音频),超出频率限制的请求会自动排入待审核队列,对于同步审核任务(直播音频),超出频率限制将会报错。
36
- - 默认并发审核路数限制:点播默认10路,异步审核任务(点播音频)数量超过并发审核路数时,将会进入排队;直播默认100路,同步审核任务(直播音频)超过并发审核路数,接口会返回错误。
36
+
37
+ ### 审核并发限制说明:
38
+
39
+ - **点播音频(异步审核)**
40
+ - 默认并发路数:10
41
+ - 队列处理机制:
42
+ - 当并发任务达到上限时,新任务进入队列等待处理;
43
+ - 新送审任务优先处理,旧任务往后排;
44
+ - **直播音频(异步审核)**
45
+ - 默认并发路数:100
46
+ - 队列处理机制:
47
+ - 运行中的审核任务达到上限时,新请求会提示超频错误:`RequestLimitExceeded`,错误详细为:`You have reached the concurrency limit`;
48
+ - 不支持排队;
37
49
 
38
50
  ### 接口功能说明:
39
51
  - 支持对音频流或音频文件进行检测,判断其中是否包含违规内容;
@@ -41,15 +53,15 @@ class Client extends TencentCloudCommon.AbstractClient {
41
53
  - 支持识别违规内容,包括:低俗、谩骂、色情、广告等场景;
42
54
  - 支持批量提交检测任务,检测任务列表**最多支持10个**。
43
55
 
44
- ### 音频文件调用说明:
56
+ ### 音频文件流调用说明:
45
57
  - 音频文件大小支持:**文件 < 500M**;
46
58
  - 音频文件时长支持:**< 1小时**;
47
59
  - 音频码率类型支持:128 Kbps - 256 Kbps ;
48
60
  - 音频文件支持格式:wav、mp3、aac、flac、amr、3gp、 m4a、wma、ogg、ape;
49
61
  - (**当输入为视频文件时**)支持分离视频文件音轨,并对音频内容进行独立审核。
50
62
 
51
- ### 音频流调用说明:
52
- - 音频流时长支持:**< 3小时**;
63
+ ### 直播音频流调用说明:
64
+ - 音频流时长支持:**24小时以内**,超过需要重新推送审核任务;
53
65
  - 音频码率类型支持:128 Kbps - 256 Kbps ;
54
66
  - 音频流支持的传输协议:RTMP、HTTP、HTTPS;
55
67
  - 音频流格式支持的类型:rtp、srtp、rtmp、rtmps、mmsh、 mmst、hls、http、tcp、https、m3u8;
@@ -58,7 +70,7 @@ class Client extends TencentCloudCommon.AbstractClient {
58
70
  ### 直播断流处理说明:
59
71
  - 请确认已对接[取消任务](https://cloud.tencent.com/document/product/1219/53258)。
60
72
  - 如果直播任务取消/结束,则终止直播拉流并退出审核。
61
- - 如果直播任务没有取消/结束,直播视频推流因故中断,产品将在将在10分钟内持续拉流重试。如果10分钟检测到音频切片数据,则恢复正常审核,反之,则终止拉流并退出审核。在拉流终止后,用户如有审核需求,需重新送审。
73
+ - 在直播任务未取消或结束的情况下,若推流中断(例如 `Operation not permitted` 错误),审核服务将在 10分钟内持续尝试重新拉流。检测到有效的图片或音频数据,审核将自动恢复正常;否则,10分钟后终止拉流并退出审核。此时如有需要,请重新提交审核请求。对于因网络问题导致的拉流失败(如 `HTTP 404 Not Found` 错误),系统将进行最多 16次重试。若成功获取有效数据,审核流程即刻恢复;若所有重试均失败,则同样终止拉流并退出审核,需用户重新送审。
62
74
  */
63
75
  async CreateAudioModerationTask(req, cb) {
64
76
  return this.request("CreateAudioModerationTask", req, cb);
@@ -181,22 +181,22 @@ export interface TaskResult {
181
181
  * 该字段用于返回创建音频审核任务时在TaskInput结构内传入的DataId,用于标识具体审核任务。
182
182
  注意:此字段可能返回 null,表示取不到有效值。
183
183
  */
184
- DataId: string;
184
+ DataId?: string;
185
185
  /**
186
186
  * 该字段用于返回音频审核任务所生成的任务ID,用于标识具体审核任务,方便后续查询和管理。
187
187
  注意:此字段可能返回 null,表示取不到有效值。
188
188
  */
189
- TaskId: string;
189
+ TaskId?: string;
190
190
  /**
191
191
  * 该字段用于返回任务创建的状态,如返回OK则代表任务创建成功,其他返回值可参考公共错误码。
192
192
  注意:此字段可能返回 null,表示取不到有效值。
193
193
  */
194
- Code: string;
194
+ Code?: string;
195
195
  /**
196
196
  * **仅在Code的返回值为错误码时生效**,用于返回错误的详情内容。
197
197
  注意:此字段可能返回 null,表示取不到有效值。
198
198
  */
199
- Message: string;
199
+ Message?: string;
200
200
  }
201
201
  /**
202
202
  * CancelTask请求参数结构体
@@ -311,15 +311,16 @@ export interface CreateAudioModerationTaskRequest {
311
311
  */
312
312
  Tasks: Array<TaskInput>;
313
313
  /**
314
- * 该字段表示策略的具体编号,用于接口调度,在内容安全控制台中可配置。若不传入Biztype参数(留空),则代表采用默认的识别策略;传入则会在审核时根据业务场景采取不同的审核策略。<br>备注:Biztype仅为数字、字母与下划线的组合,长度为3-32个字符;不同Biztype关联不同的业务场景与识别能力策略,调用前请确认正确的Biztype。
314
+ * 该字段表示使用的策略的具体编号,该字段需要先在[内容安全控制台](https://console.cloud.tencent.com/cms/clouds/manage)中配置。
315
+ 备注:不同Biztype关联不同的业务场景与识别能力策略,调用前请确认正确的Biztype。
315
316
  */
316
317
  BizType?: string;
317
318
  /**
318
- * 该字段表示输入的音频审核类型,取值为:**AUDIO**(点播音频)和 **LIVE_AUDIO**(直播音频),默认值为AUDIO。
319
+ * 该字段表示输入的音频审核类型,取值含:**AUDIO**(点播音频)、**LIVE_AUDIO**(直播音频)、**AUDIO_AIGC**(AI生成识别)三种,默认值为AUDIO。
319
320
  */
320
321
  Type?: string;
321
322
  /**
322
- * 验证签名参数,具体可以参考[验签说明](https://cloud.tencent.com/document/product/1219/104000#42dd87d2-580f-46cf-a953-639a787d1eda)。
323
+ * 可选参数,该字段表示回调签名的key信息,用于保证数据的安全性。 签名方法为在返回的HTTP头部添加 X-Signature 的字段,值为: seed + body 的 SHA256 编码和Hex字符串,在收到回调数据后,可以根据返回的body,用 **sha256(seed + body)**, 计算出 `X-Signature` 进行验证。<br>具体使用实例可参考 [回调签名示例](https://cloud.tencent.com/document/product/1219/104000#42dd87d2-580f-46cf-a953-639a787d1eda)。
323
324
  */
324
325
  Seed?: string;
325
326
  /**
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.v20201229 = void 0;
4
- const Models = require("./ams_models");
4
+ const tslib_1 = require("tslib");
5
+ const Models = tslib_1.__importStar(require("./ams_models"));
5
6
  const ams_client_1 = require("./ams_client");
6
7
  exports.v20201229 = {
7
8
  Client: ams_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,7 +0,0 @@
1
- import { v20200608 } from "./v20200608"
2
- import { v20201229 } from "./v20201229"
3
-
4
- export const ams = {
5
- v20200608: v20200608,
6
- v20201229: v20201229,
7
- }
@@ -1,167 +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
- ImageSegments,
21
- ImageResultResult,
22
- InputInfo,
23
- StorageInfo,
24
- BucketInfo,
25
- CreateAudioModerationTaskResponse,
26
- CreateBizConfigRequest,
27
- DescribeBizConfigRequest,
28
- TaskResult,
29
- CancelTaskRequest,
30
- DescribeTaskDetailResponse,
31
- CreateAudioModerationTaskRequest,
32
- CreateBizConfigResponse,
33
- TaskInput,
34
- DescribeTaskDetailRequest,
35
- CancelTaskResponse,
36
- TaskLabel,
37
- ImageResultsResultDetail,
38
- DescribeAmsListRequest,
39
- Filters,
40
- AmsDetailInfo,
41
- AudioResultDetailLanguageResult,
42
- FileOutput,
43
- Filter,
44
- DescribeAudioStatResponse,
45
- DescribeAmsListResponse,
46
- TrendCount,
47
- AudioResultDetailTextResult,
48
- DescribeAudioStatRequest,
49
- Overview,
50
- AudioResult,
51
- AudioResultDetailMoanResult,
52
- DescribeBizConfigResponse,
53
- MediaInfo,
54
- MediaModerationConfig,
55
- AudioSegments,
56
- EvilCount,
57
- ImageResultsResultDetailLocation,
58
- ImageResult,
59
- } from "./ams_models"
60
-
61
- /**
62
- * ams client
63
- * @class
64
- */
65
- export class Client extends TencentCloudCommon.AbstractClient {
66
- constructor(clientConfig: TencentCloudCommon.ClientConfig) {
67
- super("ams.tencentcloudapi.com", "2020-06-08", clientConfig)
68
- }
69
-
70
- /**
71
- * 控制台识别统计
72
- */
73
- async DescribeAudioStat(
74
- req: DescribeAudioStatRequest,
75
- cb?: (error: string, rep: DescribeAudioStatResponse) => void
76
- ): Promise<DescribeAudioStatResponse> {
77
- return this.request("DescribeAudioStat", req, cb)
78
- }
79
-
80
- /**
81
- * 查看任务详情
82
- */
83
- async DescribeTaskDetail(
84
- req: DescribeTaskDetailRequest,
85
- cb?: (error: string, rep: DescribeTaskDetailResponse) => void
86
- ): Promise<DescribeTaskDetailResponse> {
87
- return this.request("DescribeTaskDetail", req, cb)
88
- }
89
-
90
- /**
91
- * 创建业务配置,1个账号最多可以创建20个配置,可定义音频审核的场景,如色情、谩骂等,
92
-
93
- 在创建业务配置之前,你需要以下步骤:
94
- 1. 开通COS存储桶功能,新建存储桶,例如 cms_segments,用来存储 视频转换过程中生成对音频和图片。
95
- 2. 然后在COS控制台,授权天御内容安全主账号 对 cms_segments 存储桶对读写权限。具体授权操作,参考https://cloud.tencent.com/document/product/436/38648
96
-
97
- */
98
- async CreateBizConfig(
99
- req: CreateBizConfigRequest,
100
- cb?: (error: string, rep: CreateBizConfigResponse) => void
101
- ): Promise<CreateBizConfigResponse> {
102
- return this.request("CreateBizConfig", req, cb)
103
- }
104
-
105
- /**
106
- * 查看单个配置
107
- */
108
- async DescribeBizConfig(
109
- req: DescribeBizConfigRequest,
110
- cb?: (error: string, rep: DescribeBizConfigResponse) => void
111
- ): Promise<DescribeBizConfigResponse> {
112
- return this.request("DescribeBizConfig", req, cb)
113
- }
114
-
115
- /**
116
- * 取消任务
117
- */
118
- async CancelTask(
119
- req: CancelTaskRequest,
120
- cb?: (error: string, rep: CancelTaskResponse) => void
121
- ): Promise<CancelTaskResponse> {
122
- return this.request("CancelTask", req, cb)
123
- }
124
-
125
- /**
126
- * 本接口(Audio Moderation)用于提交音频内容(包括音频文件或流地址)进行智能审核任务,使用前请您登陆控制台开通音频内容安全服务。
127
-
128
- ### 功能使用说明:
129
- - 前往“内容安全控制台-音频内容安全”开启使用音频内容安全服务,首次开通可获得20小时免费调用时长
130
-
131
- ### 接口功能说明:
132
- - 支持对音频流或音频文件进行检测,判断其中是否包含违规内容;
133
- - 支持设置回调地址 Callback 获取检测结果,或通过接口(查询音频检测结果)主动轮询获取检测结果;
134
- - 支持识别违规内容,包括:低俗、谩骂、色情、涉政、广告等场景;
135
- - 支持批量提交检测任务。检测任务列表最多支持10个;
136
-
137
- ### 音频文件调用说明:
138
- - 音频文件大小支持:文件 < 500M;
139
- - 音频文件时长支持:< 1小时;
140
- - 音频码率类型支持:128 Kbps - 256 Kbps ;
141
- - 音频文件支持格式:wav、mp3、aac、flac、amr、3gp、 m4a、wma、ogg、ape;
142
- - 支持音视频文件分离并对音频文件进行独立识别;
143
-
144
- ### 音频流调用说明:
145
- - 音频流时长支持:< 3小时;
146
- - 音频码率类型支持:128 Kbps - 256 Kbps ;
147
- - 音频流支持的传输协议:RTMP、HTTP、HTTPS;
148
- - 音频流格式支持的类型:rtp、srtp、rtmp、rtmps、mmsh、 mmst、hls、http、tcp、https、m3u8;
149
- - 支持音视频流分离并对音频流进行独立识别;
150
- */
151
- async CreateAudioModerationTask(
152
- req: CreateAudioModerationTaskRequest,
153
- cb?: (error: string, rep: CreateAudioModerationTaskResponse) => void
154
- ): Promise<CreateAudioModerationTaskResponse> {
155
- return this.request("CreateAudioModerationTask", req, cb)
156
- }
157
-
158
- /**
159
- * 音频审核明细列表
160
- */
161
- async DescribeAmsList(
162
- req: DescribeAmsListRequest,
163
- cb?: (error: string, rep: DescribeAmsListResponse) => void
164
- ): Promise<DescribeAmsListResponse> {
165
- return this.request("DescribeAmsList", req, cb)
166
- }
167
- }