tencentcloud-sdk-nodejs-vclm 4.0.1049 → 4.1.18
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 +27 -5
- package/es/index.js +1 -0
- package/es/services/index.js +1 -0
- package/es/services/vclm/index.js +4 -0
- package/es/services/vclm/v20240523/index.js +6 -0
- package/es/services/vclm/v20240523/vclm_client.js +27 -0
- package/es/services/vclm/v20240523/vclm_models.js +0 -0
- package/package.json +18 -5
- package/tencentcloud/services/vclm/v20240523/index.js +2 -1
- package/tencentcloud/services/vclm/v20240523/vclm_client.js +2 -1
- package/tencentcloud/services/vclm/v20240523/vclm_models.d.ts +1 -1
- 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/vclm/index.ts +0 -5
- package/src/services/vclm/v20240523/index.ts +0 -6
- package/src/services/vclm/v20240523/vclm_client.ts +0 -118
- package/src/services/vclm/v20240523/vclm_models.ts +0 -431
- package/tsconfig.json +0 -33
- 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
|
|
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.
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
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 { vclm } from "./vclm";
|
|
@@ -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("vclm.tencentcloudapi.com", "2024-05-23", clientConfig);
|
|
5
|
+
}
|
|
6
|
+
async SubmitVideoStylizationJob(req, cb) {
|
|
7
|
+
return this.request("SubmitVideoStylizationJob", req, cb);
|
|
8
|
+
}
|
|
9
|
+
async SubmitPortraitSingJob(req, cb) {
|
|
10
|
+
return this.request("SubmitPortraitSingJob", req, cb);
|
|
11
|
+
}
|
|
12
|
+
async DescribePortraitSingJob(req, cb) {
|
|
13
|
+
return this.request("DescribePortraitSingJob", req, cb);
|
|
14
|
+
}
|
|
15
|
+
async DescribeImageAnimateJob(req, cb) {
|
|
16
|
+
return this.request("DescribeImageAnimateJob", req, cb);
|
|
17
|
+
}
|
|
18
|
+
async SubmitImageAnimateJob(req, cb) {
|
|
19
|
+
return this.request("SubmitImageAnimateJob", req, cb);
|
|
20
|
+
}
|
|
21
|
+
async CheckAnimateImageJob(req, cb) {
|
|
22
|
+
return this.request("CheckAnimateImageJob", req, cb);
|
|
23
|
+
}
|
|
24
|
+
async DescribeVideoStylizationJob(req, cb) {
|
|
25
|
+
return this.request("DescribeVideoStylizationJob", req, cb);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,16 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tencentcloud-sdk-nodejs-vclm",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.1.18",
|
|
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": "
|
|
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",
|
|
@@ -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.
|
|
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.v20240523 = void 0;
|
|
4
|
-
const
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const Models = tslib_1.__importStar(require("./vclm_models"));
|
|
5
6
|
const vclm_client_1 = require("./vclm_client");
|
|
6
7
|
exports.v20240523 = {
|
|
7
8
|
Client: vclm_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
|
* vclm client
|
|
24
25
|
* @class
|
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 { vclm } from "./vclm"
|
|
@@ -1,118 +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
|
-
CheckAnimateImageJobResponse,
|
|
21
|
-
SubmitVideoStylizationJobRequest,
|
|
22
|
-
CheckAnimateImageJobRequest,
|
|
23
|
-
DescribeVideoStylizationJobRequest,
|
|
24
|
-
DescribePortraitSingJobRequest,
|
|
25
|
-
DescribeImageAnimateJobResponse,
|
|
26
|
-
SubmitPortraitSingJobRequest,
|
|
27
|
-
LogoRect,
|
|
28
|
-
SubmitImageAnimateJobResponse,
|
|
29
|
-
SubmitVideoStylizationJobResponse,
|
|
30
|
-
DescribeVideoStylizationJobResponse,
|
|
31
|
-
SubmitImageAnimateJobRequest,
|
|
32
|
-
DescribeImageAnimateJobRequest,
|
|
33
|
-
DescribePortraitSingJobResponse,
|
|
34
|
-
SubmitPortraitSingJobResponse,
|
|
35
|
-
LogoParam,
|
|
36
|
-
} from "./vclm_models"
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* vclm client
|
|
40
|
-
* @class
|
|
41
|
-
*/
|
|
42
|
-
export class Client extends TencentCloudCommon.AbstractClient {
|
|
43
|
-
constructor(clientConfig: TencentCloudCommon.ClientConfig) {
|
|
44
|
-
super("vclm.tencentcloudapi.com", "2024-05-23", clientConfig)
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* 用于提交视频风格化任务。支持将输入视频生成特定风格的视频。生成后的视频画面风格多样、流畅自然,能够满足社交娱乐、互动营销、视频素材制作等场景的需求。
|
|
49
|
-
*/
|
|
50
|
-
async SubmitVideoStylizationJob(
|
|
51
|
-
req: SubmitVideoStylizationJobRequest,
|
|
52
|
-
cb?: (error: string, rep: SubmitVideoStylizationJobResponse) => void
|
|
53
|
-
): Promise<SubmitVideoStylizationJobResponse> {
|
|
54
|
-
return this.request("SubmitVideoStylizationJob", req, cb)
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* 用于提交图片唱演任务。
|
|
59
|
-
支持提交音频和图片生成唱演视频,满足社交娱乐、互动营销等场景的需求。
|
|
60
|
-
*/
|
|
61
|
-
async SubmitPortraitSingJob(
|
|
62
|
-
req: SubmitPortraitSingJobRequest,
|
|
63
|
-
cb?: (error: string, rep: SubmitPortraitSingJobResponse) => void
|
|
64
|
-
): Promise<SubmitPortraitSingJobResponse> {
|
|
65
|
-
return this.request("SubmitPortraitSingJob", req, cb)
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* 用于查询图片唱演任务。
|
|
70
|
-
支持提交音频和图片生成唱演视频,满足社交娱乐、互动营销等场景的需求。
|
|
71
|
-
*/
|
|
72
|
-
async DescribePortraitSingJob(
|
|
73
|
-
req: DescribePortraitSingJobRequest,
|
|
74
|
-
cb?: (error: string, rep: DescribePortraitSingJobResponse) => void
|
|
75
|
-
): Promise<DescribePortraitSingJobResponse> {
|
|
76
|
-
return this.request("DescribePortraitSingJob", req, cb)
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* 用于查询图片跳舞任务。图片跳舞能力支持舞蹈动作结合图片生成跳舞视频,满足社交娱乐、互动营销等场景的需求。
|
|
81
|
-
*/
|
|
82
|
-
async DescribeImageAnimateJob(
|
|
83
|
-
req: DescribeImageAnimateJobRequest,
|
|
84
|
-
cb?: (error: string, rep: DescribeImageAnimateJobResponse) => void
|
|
85
|
-
): Promise<DescribeImageAnimateJobResponse> {
|
|
86
|
-
return this.request("DescribeImageAnimateJob", req, cb)
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* 用于提交图片跳舞任务。图片跳舞能力支持舞蹈动作结合图片生成跳舞视频,满足社交娱乐、互动营销等场景的需求。
|
|
91
|
-
*/
|
|
92
|
-
async SubmitImageAnimateJob(
|
|
93
|
-
req: SubmitImageAnimateJobRequest,
|
|
94
|
-
cb?: (error: string, rep: SubmitImageAnimateJobResponse) => void
|
|
95
|
-
): Promise<SubmitImageAnimateJobResponse> {
|
|
96
|
-
return this.request("SubmitImageAnimateJob", req, cb)
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* 检查图片跳舞输入图
|
|
101
|
-
*/
|
|
102
|
-
async CheckAnimateImageJob(
|
|
103
|
-
req: CheckAnimateImageJobRequest,
|
|
104
|
-
cb?: (error: string, rep: CheckAnimateImageJobResponse) => void
|
|
105
|
-
): Promise<CheckAnimateImageJobResponse> {
|
|
106
|
-
return this.request("CheckAnimateImageJob", req, cb)
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* 用于查询视频风格化任务。视频风格化支持将输入视频生成特定风格的视频。生成后的视频画面风格多样、流畅自然,能够满足社交娱乐、互动营销、视频素材制作等场景的需求。
|
|
111
|
-
*/
|
|
112
|
-
async DescribeVideoStylizationJob(
|
|
113
|
-
req: DescribeVideoStylizationJobRequest,
|
|
114
|
-
cb?: (error: string, rep: DescribeVideoStylizationJobResponse) => void
|
|
115
|
-
): Promise<DescribeVideoStylizationJobResponse> {
|
|
116
|
-
return this.request("DescribeVideoStylizationJob", req, cb)
|
|
117
|
-
}
|
|
118
|
-
}
|
|
@@ -1,431 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing,
|
|
11
|
-
* software distributed under the License is distributed on an
|
|
12
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
13
|
-
* KIND, either express or implied. See the License for the
|
|
14
|
-
* specific language governing permissions and limitations
|
|
15
|
-
* under the License.
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* CheckAnimateImageJob返回参数结构体
|
|
20
|
-
*/
|
|
21
|
-
export interface CheckAnimateImageJobResponse {
|
|
22
|
-
/**
|
|
23
|
-
* 输入图是否通过校验。
|
|
24
|
-
*/
|
|
25
|
-
CheckPass?: boolean
|
|
26
|
-
/**
|
|
27
|
-
* 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
|
28
|
-
*/
|
|
29
|
-
RequestId?: string
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* SubmitVideoStylizationJob请求参数结构体
|
|
34
|
-
*/
|
|
35
|
-
export interface SubmitVideoStylizationJobRequest {
|
|
36
|
-
/**
|
|
37
|
-
* 风格ID。取值说明:
|
|
38
|
-
2d_anime:2D动漫;
|
|
39
|
-
3d_cartoon:3D卡通;
|
|
40
|
-
3d_china:3D国潮;
|
|
41
|
-
pixel_art:像素风。
|
|
42
|
-
*/
|
|
43
|
-
StyleId: string
|
|
44
|
-
/**
|
|
45
|
-
* 输入视频URL。视频要求:
|
|
46
|
-
- 视频格式:mp4、mov;
|
|
47
|
-
- 视频时长:1~60秒;
|
|
48
|
-
- 视频分辨率:540P~2056P,即长宽像素数均在540px~2056px范围内;
|
|
49
|
-
- 视频大小:不超过200M;
|
|
50
|
-
- 视频FPS:15~60fps。
|
|
51
|
-
*/
|
|
52
|
-
VideoUrl: string
|
|
53
|
-
/**
|
|
54
|
-
* 风格化强度。取值说明:
|
|
55
|
-
low:风格化强度弱;
|
|
56
|
-
medium:风格化强度中等;
|
|
57
|
-
high:风格化强度强。
|
|
58
|
-
默认值为medium。
|
|
59
|
-
*/
|
|
60
|
-
StyleStrength?: string
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* CheckAnimateImageJob请求参数结构体
|
|
65
|
-
*/
|
|
66
|
-
export interface CheckAnimateImageJobRequest {
|
|
67
|
-
/**
|
|
68
|
-
* 动作模板ID。
|
|
69
|
-
*/
|
|
70
|
-
TemplateId: string
|
|
71
|
-
/**
|
|
72
|
-
* 图片格式:支持PNG、JPG、JPEG、BMP、WEBP格式;
|
|
73
|
-
图片分辨率:长边分辨率范围【192,4096】;
|
|
74
|
-
图片大小:不超过10M;
|
|
75
|
-
图片宽高比:【宽:高】数值在 1:2 到 1:1.2 范围内
|
|
76
|
-
*/
|
|
77
|
-
ImageUrl?: string
|
|
78
|
-
/**
|
|
79
|
-
* 图片base64数据。
|
|
80
|
-
图片格式:支持PNG、JPG、JPEG、BMP、WEBP格式;
|
|
81
|
-
图片分辨率:长边分辨率范围【192,4096】;
|
|
82
|
-
图片大小:不超过10M;
|
|
83
|
-
图片宽高比:【宽:高】数值在 1:2 到 1:1.2 范围内
|
|
84
|
-
*/
|
|
85
|
-
ImageBase64?: string
|
|
86
|
-
/**
|
|
87
|
-
* 是否对输入图采用加强检测方案。
|
|
88
|
-
|
|
89
|
-
默认不加强检测(false),仅对输入图做必要的基础检测。
|
|
90
|
-
|
|
91
|
-
开启加强检测(true)有助于提升效果稳定性,将根据选择的动作模板提取建议的人体关键点,并判断输入图中是否包含这些人体关键点。加强检测仅对人像输入图生效,对非人输入图不生效。
|
|
92
|
-
*/
|
|
93
|
-
EnableBodyJoins?: boolean
|
|
94
|
-
/**
|
|
95
|
-
* 是否开启人脸检测。
|
|
96
|
-
|
|
97
|
-
默认开启人脸检测(true),拦截主体为人像但无人脸、人脸不完整或被遮挡的输入图。可选关闭人脸检测(false)。
|
|
98
|
-
*/
|
|
99
|
-
EnableFace?: boolean
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* DescribeVideoStylizationJob请求参数结构体
|
|
104
|
-
*/
|
|
105
|
-
export interface DescribeVideoStylizationJobRequest {
|
|
106
|
-
/**
|
|
107
|
-
* 任务ID
|
|
108
|
-
*/
|
|
109
|
-
JobId: string
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* DescribePortraitSingJob请求参数结构体
|
|
114
|
-
*/
|
|
115
|
-
export interface DescribePortraitSingJobRequest {
|
|
116
|
-
/**
|
|
117
|
-
* 任务ID
|
|
118
|
-
*/
|
|
119
|
-
JobId: string
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* DescribeImageAnimateJob返回参数结构体
|
|
124
|
-
*/
|
|
125
|
-
export interface DescribeImageAnimateJobResponse {
|
|
126
|
-
/**
|
|
127
|
-
* 任务状态。WAIT:等待中,RUN:执行中,FAIL:任务失败,DONE:任务成功
|
|
128
|
-
*/
|
|
129
|
-
Status?: string
|
|
130
|
-
/**
|
|
131
|
-
* 错误码。
|
|
132
|
-
*/
|
|
133
|
-
ErrorCode?: string
|
|
134
|
-
/**
|
|
135
|
-
* 错误信息。
|
|
136
|
-
*/
|
|
137
|
-
ErrorMessage?: string
|
|
138
|
-
/**
|
|
139
|
-
* 结果视频URL。有效期 24 小时。
|
|
140
|
-
*/
|
|
141
|
-
ResultVideoUrl?: string
|
|
142
|
-
/**
|
|
143
|
-
* 掩码视频链接
|
|
144
|
-
*/
|
|
145
|
-
MaskVideoUrl?: string
|
|
146
|
-
/**
|
|
147
|
-
* 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
|
148
|
-
*/
|
|
149
|
-
RequestId?: string
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* SubmitPortraitSingJob请求参数结构体
|
|
154
|
-
*/
|
|
155
|
-
export interface SubmitPortraitSingJobRequest {
|
|
156
|
-
/**
|
|
157
|
-
* 传入音频URL地址,音频要求:
|
|
158
|
-
- 音频时长:2秒 - 60秒
|
|
159
|
-
- 音频格式:mp3、wav、m4a
|
|
160
|
-
*/
|
|
161
|
-
AudioUrl: string
|
|
162
|
-
/**
|
|
163
|
-
* 传入图片URL地址,图片要求:
|
|
164
|
-
- 图片格式:jpg、jpeg、png、bmp、webp
|
|
165
|
-
- 图片分辨率:192~4096
|
|
166
|
-
- 图片大小:不超过10M
|
|
167
|
-
- 图片宽高比:图片【宽:高】在1:2到2:1范围内
|
|
168
|
-
- 图片内容:避免上传无人脸、无宠物脸或脸部过小、不完整、不清晰、偏转角度过大、嘴部被遮挡的图片。
|
|
169
|
-
*/
|
|
170
|
-
ImageUrl?: string
|
|
171
|
-
/**
|
|
172
|
-
* 传入图片Base64编码,编码后请求体大小不超过10M。
|
|
173
|
-
图片Base64编码与URL地址必传其一,如果都传以ImageBase64为准。
|
|
174
|
-
*/
|
|
175
|
-
ImageBase64?: string
|
|
176
|
-
/**
|
|
177
|
-
* 唱演模式,默认使用人像模式。
|
|
178
|
-
Person:人像模式,仅支持上传人像图片,人像生成效果更好,如果图中未检测到有效人脸将被拦截,生成时会将视频短边分辨率放缩至512。
|
|
179
|
-
Pet:宠物模式,支持宠物等非人像图片,固定生成512:512分辨率视频。
|
|
180
|
-
*/
|
|
181
|
-
Mode?: string
|
|
182
|
-
/**
|
|
183
|
-
* 生成视频尺寸。可选取值:"512:512"。
|
|
184
|
-
|
|
185
|
-
人像模式下,如果不传该参数,默认生成视频的短边分辨率为512,长边分辨率不固定、由模型根据生成效果自动适配得到。如需固定生成分辨率可传入512:512。
|
|
186
|
-
|
|
187
|
-
宠物模式下,如果不传该参数,默认将脸部唱演视频回贴原图,生成视频分辨率与原图一致。如不需要脸部回贴,仅保留脸部唱演视频,可传入512:512。
|
|
188
|
-
*/
|
|
189
|
-
Resolution?: string
|
|
190
|
-
/**
|
|
191
|
-
* 为生成视频添加标识的开关,默认为0。
|
|
192
|
-
1:添加标识;
|
|
193
|
-
0:不添加标识;
|
|
194
|
-
其他数值:默认按1处理。
|
|
195
|
-
建议您使用显著标识来提示,该视频是 AI 生成的视频。
|
|
196
|
-
*/
|
|
197
|
-
LogoAdd?: number
|
|
198
|
-
/**
|
|
199
|
-
* 标识内容设置。 默认在生成视频的右下角添加“视频由 AI 生成”字样,您可根据自身需要替换为其他的标识图片。
|
|
200
|
-
*/
|
|
201
|
-
LogoParam?: LogoParam
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
/**
|
|
205
|
-
* 水印图输入框
|
|
206
|
-
*/
|
|
207
|
-
export interface LogoRect {
|
|
208
|
-
/**
|
|
209
|
-
* 水印图框X坐标值。当值大于0时,坐标轴原点位于原图左侧,方向指右;当值小于0时,坐标轴原点位于原图右侧,方向指左。
|
|
210
|
-
*/
|
|
211
|
-
X?: number
|
|
212
|
-
/**
|
|
213
|
-
* 水印图框Y坐标值。当值大于0时,坐标轴原点位于原图上侧,方向指下;当值小于0时,坐标轴原点位于原图下侧,方向指上。
|
|
214
|
-
*/
|
|
215
|
-
Y?: number
|
|
216
|
-
/**
|
|
217
|
-
* 水印图框宽度。
|
|
218
|
-
*/
|
|
219
|
-
Width?: number
|
|
220
|
-
/**
|
|
221
|
-
* 水印图框高度。
|
|
222
|
-
*/
|
|
223
|
-
Height?: number
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
/**
|
|
227
|
-
* SubmitImageAnimateJob返回参数结构体
|
|
228
|
-
*/
|
|
229
|
-
export interface SubmitImageAnimateJobResponse {
|
|
230
|
-
/**
|
|
231
|
-
* 图片跳舞任务ID。
|
|
232
|
-
*/
|
|
233
|
-
JobId?: string
|
|
234
|
-
/**
|
|
235
|
-
* 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
|
236
|
-
*/
|
|
237
|
-
RequestId?: string
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
/**
|
|
241
|
-
* SubmitVideoStylizationJob返回参数结构体
|
|
242
|
-
*/
|
|
243
|
-
export interface SubmitVideoStylizationJobResponse {
|
|
244
|
-
/**
|
|
245
|
-
* 任务ID。任务有效期为48小时。
|
|
246
|
-
*/
|
|
247
|
-
JobId?: string
|
|
248
|
-
/**
|
|
249
|
-
* 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
|
250
|
-
*/
|
|
251
|
-
RequestId?: string
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
/**
|
|
255
|
-
* DescribeVideoStylizationJob返回参数结构体
|
|
256
|
-
*/
|
|
257
|
-
export interface DescribeVideoStylizationJobResponse {
|
|
258
|
-
/**
|
|
259
|
-
* 任务ID。
|
|
260
|
-
*/
|
|
261
|
-
JobId?: string
|
|
262
|
-
/**
|
|
263
|
-
* 任务状态码。取值说明:
|
|
264
|
-
JobInit: "初始化中";
|
|
265
|
-
JobModerationFailed: "审核失败";
|
|
266
|
-
JobRunning: "处理中";
|
|
267
|
-
JobFailed: "处理失败";
|
|
268
|
-
JobSuccess: "处理完成"。
|
|
269
|
-
*/
|
|
270
|
-
StatusCode?: string
|
|
271
|
-
/**
|
|
272
|
-
* 任务状态描述。取值说明:
|
|
273
|
-
JobInit: "初始化中";
|
|
274
|
-
JobModerationFailed: "审核失败";
|
|
275
|
-
JobRunning: "处理中";
|
|
276
|
-
JobFailed: "处理失败";
|
|
277
|
-
JobSuccess: "处理完成"。
|
|
278
|
-
*/
|
|
279
|
-
StatusMsg?: string
|
|
280
|
-
/**
|
|
281
|
-
* 处理结果视频Url。URL有效期为24小时。
|
|
282
|
-
*/
|
|
283
|
-
ResultVideoUrl?: string
|
|
284
|
-
/**
|
|
285
|
-
* 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
|
286
|
-
*/
|
|
287
|
-
RequestId?: string
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
/**
|
|
291
|
-
* SubmitImageAnimateJob请求参数结构体
|
|
292
|
-
*/
|
|
293
|
-
export interface SubmitImageAnimateJobRequest {
|
|
294
|
-
/**
|
|
295
|
-
* 图片格式:支持PNG、JPG、JPEG、BMP、WEBP格式;
|
|
296
|
-
图片分辨率:长边分辨率范围【192,4096】;
|
|
297
|
-
图片大小:不超过10M;
|
|
298
|
-
图片宽高比:【宽:高】数值在 1:2 到 1:1.2 范围内
|
|
299
|
-
*/
|
|
300
|
-
ImageUrl?: string
|
|
301
|
-
/**
|
|
302
|
-
* 图片base64数据。
|
|
303
|
-
图片格式:支持PNG、JPG、JPEG、BMP、WEBP格式;
|
|
304
|
-
图片分辨率:长边分辨率范围【192,4096】;
|
|
305
|
-
图片大小:不超过10M;
|
|
306
|
-
图片宽高比:【宽:高】数值在 1:2 到 1:1.2 范围内
|
|
307
|
-
*/
|
|
308
|
-
ImageBase64?: string
|
|
309
|
-
/**
|
|
310
|
-
* 动作模板ID。取值说明:ke3 科目三;tuziwu 兔子舞;huajiangwu 划桨舞。
|
|
311
|
-
|
|
312
|
-
*/
|
|
313
|
-
TemplateId?: string
|
|
314
|
-
/**
|
|
315
|
-
* 结果视频是否保留模板音频。默认为true
|
|
316
|
-
*/
|
|
317
|
-
EnableAudio?: boolean
|
|
318
|
-
/**
|
|
319
|
-
* 是否对输入图采用加强检测方案。
|
|
320
|
-
|
|
321
|
-
默认不加强检测(false),仅对输入图做必要的基础检测。
|
|
322
|
-
|
|
323
|
-
开启加强检测(true)有助于提升效果稳定性,将根据选择的动作模板提取建议的人体关键点,并判断输入图中是否包含这些人体关键点。加强检测仅对人像输入图生效,对非人输入图不生效。
|
|
324
|
-
*/
|
|
325
|
-
EnableBodyJoins?: boolean
|
|
326
|
-
/**
|
|
327
|
-
* 是否对结果视频背景进行分割,默认值为false。
|
|
328
|
-
true:分割结果视频,结果视频(ResultVideoUrl)将为去除背景的绿幕视频,并返回掩码视频(MaskVideoUrl);
|
|
329
|
-
false:不分割结果视频,结果视频(ResultVideoUrl)为带背景的视频,掩码视频(MaskVideoUrl)为空字符串。
|
|
330
|
-
*/
|
|
331
|
-
EnableSegment?: boolean
|
|
332
|
-
/**
|
|
333
|
-
* 为生成视频添加标识的开关,默认为0。
|
|
334
|
-
1:添加标识。
|
|
335
|
-
0:不添加标识。
|
|
336
|
-
其他数值:默认按1处理。
|
|
337
|
-
建议您使用显著标识来提示,该视频是 AI 生成的视频。
|
|
338
|
-
*/
|
|
339
|
-
LogoAdd?: number
|
|
340
|
-
/**
|
|
341
|
-
* 标识内容设置。
|
|
342
|
-
默认在生成视频的右下角添加“视频由 AI 生成”字样,您可根据自身需要替换为其他的标识图片。
|
|
343
|
-
*/
|
|
344
|
-
LogoParam?: LogoParam
|
|
345
|
-
/**
|
|
346
|
-
* 是否开启人脸检测。
|
|
347
|
-
|
|
348
|
-
默认开启人脸检测(true),拦截主体为人像但无人脸、人脸不完整或被遮挡的输入图。可选关闭人脸检测(false)。
|
|
349
|
-
*/
|
|
350
|
-
EnableFace?: boolean
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
/**
|
|
354
|
-
* DescribeImageAnimateJob请求参数结构体
|
|
355
|
-
*/
|
|
356
|
-
export interface DescribeImageAnimateJobRequest {
|
|
357
|
-
/**
|
|
358
|
-
* 任务ID。
|
|
359
|
-
*/
|
|
360
|
-
JobId?: string
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
/**
|
|
364
|
-
* DescribePortraitSingJob返回参数结构体
|
|
365
|
-
*/
|
|
366
|
-
export interface DescribePortraitSingJobResponse {
|
|
367
|
-
/**
|
|
368
|
-
* 任务ID
|
|
369
|
-
*/
|
|
370
|
-
JobId?: string
|
|
371
|
-
/**
|
|
372
|
-
* 任务状态码
|
|
373
|
-
—RUN:处理中
|
|
374
|
-
—FAIL:处理失败
|
|
375
|
-
—STOP:处理终止
|
|
376
|
-
—DONE:处理完成
|
|
377
|
-
*/
|
|
378
|
-
StatusCode?: string
|
|
379
|
-
/**
|
|
380
|
-
* 任务状态信息
|
|
381
|
-
*/
|
|
382
|
-
StatusMsg?: string
|
|
383
|
-
/**
|
|
384
|
-
* 任务执行错误码。当任务状态不为FAIL时,该值为""。
|
|
385
|
-
*/
|
|
386
|
-
ErrorCode?: string
|
|
387
|
-
/**
|
|
388
|
-
* 任务执行错误信息。当任务状态不为FAIL时,该值为""。
|
|
389
|
-
*/
|
|
390
|
-
ErrorMessage?: string
|
|
391
|
-
/**
|
|
392
|
-
* 生成视频的URL地址。有效期24小时。
|
|
393
|
-
*/
|
|
394
|
-
ResultVideoUrl?: string
|
|
395
|
-
/**
|
|
396
|
-
* 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
|
397
|
-
*/
|
|
398
|
-
RequestId?: string
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
/**
|
|
402
|
-
* SubmitPortraitSingJob返回参数结构体
|
|
403
|
-
*/
|
|
404
|
-
export interface SubmitPortraitSingJobResponse {
|
|
405
|
-
/**
|
|
406
|
-
* 任务ID。任务有效期为48小时。
|
|
407
|
-
*/
|
|
408
|
-
JobId?: string
|
|
409
|
-
/**
|
|
410
|
-
* 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
|
411
|
-
*/
|
|
412
|
-
RequestId?: string
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
/**
|
|
416
|
-
* logo参数
|
|
417
|
-
*/
|
|
418
|
-
export interface LogoParam {
|
|
419
|
-
/**
|
|
420
|
-
* 水印 Url
|
|
421
|
-
*/
|
|
422
|
-
LogoUrl?: string
|
|
423
|
-
/**
|
|
424
|
-
* 水印 Base64,Url 和 Base64 二选一传入,如果都提供以 Url 为准
|
|
425
|
-
*/
|
|
426
|
-
LogoImage?: string
|
|
427
|
-
/**
|
|
428
|
-
* 水印图片位于生成结果图中的坐标及宽高,将按照坐标对标识图片进行位置和大小的拉伸匹配。
|
|
429
|
-
*/
|
|
430
|
-
LogoRect?: LogoRect
|
|
431
|
-
}
|
package/tsconfig.json
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
// "incremental": true, /* 增量编译 提高编译速度*/
|
|
4
|
-
"target": "ES2019" /* 编译目标ES版本*/,
|
|
5
|
-
"module": "commonjs" /* 编译目标模块系统*/,
|
|
6
|
-
// "lib": [], /* 编译过程中需要引入的库文件列表*/
|
|
7
|
-
"declaration": true /* 编译时创建声明文件 */,
|
|
8
|
-
"outDir": "tencentcloud" /* ts编译输出目录 */,
|
|
9
|
-
"rootDir": "src" /* ts编译根目录. */,
|
|
10
|
-
"importHelpers": true /* 从tslib导入辅助工具函数(如__importDefault)*/,
|
|
11
|
-
"strict": true /* 严格模式开关 等价于noImplicitAny、strictNullChecks、strictFunctionTypes、strictBindCallApply等设置true */,
|
|
12
|
-
"strictNullChecks": false,
|
|
13
|
-
"noUnusedLocals": false /* 未使用局部变量报错*/,
|
|
14
|
-
"noUnusedParameters": false /* 未使用参数报错*/,
|
|
15
|
-
"noImplicitReturns": true /* 有代码路径没有返回值时报错*/,
|
|
16
|
-
"noFallthroughCasesInSwitch": true /* 不允许switch的case语句贯穿*/,
|
|
17
|
-
"moduleResolution": "node" /* 模块解析策略 */,
|
|
18
|
-
"typeRoots": [
|
|
19
|
-
/* 要包含的类型声明文件路径列表*/
|
|
20
|
-
"./typings",
|
|
21
|
-
"./node_modules/@types"
|
|
22
|
-
],
|
|
23
|
-
"allowSyntheticDefaultImports": true /* 允许从没有设置默认导出的模块中默认导入,仅用于提示,不影响编译结果*/,
|
|
24
|
-
"esModuleInterop": false /* 允许编译生成文件时,在代码中注入工具类(__importDefault、__importStar)对ESM与commonjs混用情况做兼容处理*/,
|
|
25
|
-
"sourceMap": false
|
|
26
|
-
},
|
|
27
|
-
"include": [
|
|
28
|
-
/* 需要编译的文件 */
|
|
29
|
-
"src/**/*.ts",
|
|
30
|
-
"typings/**/*.ts"
|
|
31
|
-
],
|
|
32
|
-
"exclude": []
|
|
33
|
-
}
|
package/typings/index.d.ts
DELETED