tencentcloud-sdk-nodejs-intl-en 3.0.1358 → 3.0.1360
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/package.json +1 -1
- package/tencentcloud/aiart/v20221229/aiart_client.js +16 -2
- package/tencentcloud/aiart/v20221229/models.js +178 -51
- package/tencentcloud/apm/v20210622/apm_client.js +181 -78
- package/tencentcloud/apm/v20210622/models.js +5109 -3010
- package/tencentcloud/cam/v20190116/cam_client.js +2 -1
- package/tencentcloud/cam/v20190116/models.js +149 -98
- package/tencentcloud/ccc/v20200210/ccc_client.js +2 -2
- package/tencentcloud/common/sdk_version.js +1 -1
- package/tencentcloud/index.js +1 -0
- package/tencentcloud/lighthouse/v20200324/lighthouse_client.js +12 -40
- package/tencentcloud/lighthouse/v20200324/models.js +180 -299
- package/tencentcloud/mna/index.js +3 -0
- package/tencentcloud/mna/v20210119/index.js +4 -0
- package/tencentcloud/mna/v20210119/mna_client.js +729 -0
- package/tencentcloud/mna/v20210119/models.js +6314 -0
- package/tencentcloud/mps/v20190612/models.js +2 -2
- package/tencentcloud/mqtt/v20240516/models.js +212 -36
- package/tencentcloud/mqtt/v20240516/mqtt_client.js +28 -15
- package/tencentcloud/ssm/v20190923/models.js +27 -27
- package/tencentcloud/trocket/v20230308/models.js +355 -28
- package/tencentcloud/trocket/v20230308/trocket_client.js +36 -9
- package/tencentcloud/tts/v20190823/models.js +3 -4
- package/tencentcloud/vod/v20180717/models.js +13 -13
package/package.json
CHANGED
|
@@ -16,10 +16,12 @@
|
|
|
16
16
|
*/
|
|
17
17
|
const models = require("./models");
|
|
18
18
|
const AbstractClient = require('../../common/abstract_client')
|
|
19
|
-
const ImageToImageRequest = models.ImageToImageRequest;
|
|
20
19
|
const ImageToImageResponse = models.ImageToImageResponse;
|
|
21
|
-
const LogoRect = models.LogoRect;
|
|
22
20
|
const LogoParam = models.LogoParam;
|
|
21
|
+
const ImageToImageRequest = models.ImageToImageRequest;
|
|
22
|
+
const LogoRect = models.LogoRect;
|
|
23
|
+
const ChangeClothesRequest = models.ChangeClothesRequest;
|
|
24
|
+
const ChangeClothesResponse = models.ChangeClothesResponse;
|
|
23
25
|
const ResultConfig = models.ResultConfig;
|
|
24
26
|
|
|
25
27
|
|
|
@@ -33,6 +35,18 @@ class AiartClient extends AbstractClient {
|
|
|
33
35
|
super("aiart.intl.tencentcloudapi.com", "2022-12-29", credential, region, profile);
|
|
34
36
|
}
|
|
35
37
|
|
|
38
|
+
/**
|
|
39
|
+
* This API is used to generate the images of the model changing clothes based on the model photo and the clothes image.
|
|
40
|
+
It supports 1 concurrency by default, which means that up to 1 submitted task can be processed simultaneously. Subsequent tasks can be processed only after ongoing ones are completed.
|
|
41
|
+
* @param {ChangeClothesRequest} req
|
|
42
|
+
* @param {function(string, ChangeClothesResponse):void} cb
|
|
43
|
+
* @public
|
|
44
|
+
*/
|
|
45
|
+
ChangeClothes(req, cb) {
|
|
46
|
+
let resp = new ChangeClothesResponse();
|
|
47
|
+
this.request("ChangeClothes", req, resp, cb);
|
|
48
|
+
}
|
|
49
|
+
|
|
36
50
|
/**
|
|
37
51
|
* This API is used to transfer the image style based on the image to image technology. Images with small figures, complex gestures or too many figures are not recommended.
|
|
38
52
|
It supports 3 concurrency by default, which means that up to 3 submitted tasks can be processed simultaneously. Subsequent tasks can be processed only after ongoing ones are completed.
|
|
@@ -16,6 +16,90 @@
|
|
|
16
16
|
*/
|
|
17
17
|
const AbstractModel = require("../../common/abstract_model");
|
|
18
18
|
|
|
19
|
+
/**
|
|
20
|
+
* ImageToImage response structure.
|
|
21
|
+
* @class
|
|
22
|
+
*/
|
|
23
|
+
class ImageToImageResponse extends AbstractModel {
|
|
24
|
+
constructor(){
|
|
25
|
+
super();
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Different content is returned depending on the input parameter RspImgType.
|
|
29
|
+
If the value is base64, the Base64 code of the generated image is returned.
|
|
30
|
+
If the value is url, the URL of the generated image is returned. The URL is valid for 1 hour. Save it in time.
|
|
31
|
+
* @type {string || null}
|
|
32
|
+
*/
|
|
33
|
+
this.ResultImage = null;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
|
|
37
|
+
* @type {string || null}
|
|
38
|
+
*/
|
|
39
|
+
this.RequestId = null;
|
|
40
|
+
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @private
|
|
45
|
+
*/
|
|
46
|
+
deserialize(params) {
|
|
47
|
+
if (!params) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
this.ResultImage = 'ResultImage' in params ? params.ResultImage : null;
|
|
51
|
+
this.RequestId = 'RequestId' in params ? params.RequestId : null;
|
|
52
|
+
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Logo parameter
|
|
58
|
+
* @class
|
|
59
|
+
*/
|
|
60
|
+
class LogoParam extends AbstractModel {
|
|
61
|
+
constructor(){
|
|
62
|
+
super();
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Logo URL
|
|
66
|
+
* @type {string || null}
|
|
67
|
+
*/
|
|
68
|
+
this.LogoUrl = null;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Logo Base64 code. Either the Base64 code or URL must be provided. If both are provided, URL prevails.
|
|
72
|
+
* @type {string || null}
|
|
73
|
+
*/
|
|
74
|
+
this.LogoImage = null;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Coordinates of the logo image in the generated image. The logo image will be stretched according to the coordinates.
|
|
78
|
+
* @type {LogoRect || null}
|
|
79
|
+
*/
|
|
80
|
+
this.LogoRect = null;
|
|
81
|
+
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* @private
|
|
86
|
+
*/
|
|
87
|
+
deserialize(params) {
|
|
88
|
+
if (!params) {
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
this.LogoUrl = 'LogoUrl' in params ? params.LogoUrl : null;
|
|
92
|
+
this.LogoImage = 'LogoImage' in params ? params.LogoImage : null;
|
|
93
|
+
|
|
94
|
+
if (params.LogoRect) {
|
|
95
|
+
let obj = new LogoRect();
|
|
96
|
+
obj.deserialize(params.LogoRect)
|
|
97
|
+
this.LogoRect = obj;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
19
103
|
/**
|
|
20
104
|
* ImageToImage request structure.
|
|
21
105
|
* @class
|
|
@@ -157,26 +241,36 @@ If the input value is greater than 0, the value will be used as the maximum numb
|
|
|
157
241
|
}
|
|
158
242
|
|
|
159
243
|
/**
|
|
160
|
-
*
|
|
244
|
+
* Input box
|
|
161
245
|
* @class
|
|
162
246
|
*/
|
|
163
|
-
class
|
|
247
|
+
class LogoRect extends AbstractModel {
|
|
164
248
|
constructor(){
|
|
165
249
|
super();
|
|
166
250
|
|
|
167
251
|
/**
|
|
168
|
-
*
|
|
169
|
-
|
|
170
|
-
If the value is url, the URL of the generated image is returned. The URL is valid for 1 hour. Save it in time.
|
|
171
|
-
* @type {string || null}
|
|
252
|
+
* X-axis coordinate of the upper left corner
|
|
253
|
+
* @type {number || null}
|
|
172
254
|
*/
|
|
173
|
-
this.
|
|
255
|
+
this.X = null;
|
|
174
256
|
|
|
175
257
|
/**
|
|
176
|
-
*
|
|
177
|
-
* @type {
|
|
258
|
+
* Y-axis coordinate of the upper left corner
|
|
259
|
+
* @type {number || null}
|
|
178
260
|
*/
|
|
179
|
-
this.
|
|
261
|
+
this.Y = null;
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Box width
|
|
265
|
+
* @type {number || null}
|
|
266
|
+
*/
|
|
267
|
+
this.Width = null;
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* Box height
|
|
271
|
+
* @type {number || null}
|
|
272
|
+
*/
|
|
273
|
+
this.Height = null;
|
|
180
274
|
|
|
181
275
|
}
|
|
182
276
|
|
|
@@ -187,43 +281,77 @@ If the value is url, the URL of the generated image is returned. The URL is vali
|
|
|
187
281
|
if (!params) {
|
|
188
282
|
return;
|
|
189
283
|
}
|
|
190
|
-
this.
|
|
191
|
-
this.
|
|
284
|
+
this.X = 'X' in params ? params.X : null;
|
|
285
|
+
this.Y = 'Y' in params ? params.Y : null;
|
|
286
|
+
this.Width = 'Width' in params ? params.Width : null;
|
|
287
|
+
this.Height = 'Height' in params ? params.Height : null;
|
|
192
288
|
|
|
193
289
|
}
|
|
194
290
|
}
|
|
195
291
|
|
|
196
292
|
/**
|
|
197
|
-
*
|
|
293
|
+
* ChangeClothes request structure.
|
|
198
294
|
* @class
|
|
199
295
|
*/
|
|
200
|
-
class
|
|
296
|
+
class ChangeClothesRequest extends AbstractModel {
|
|
201
297
|
constructor(){
|
|
202
298
|
super();
|
|
203
299
|
|
|
204
300
|
/**
|
|
205
|
-
*
|
|
206
|
-
|
|
301
|
+
* URL of the model image.
|
|
302
|
+
Image restrictions: The single-edge resolution must be less than 3,000 and greater than 512, and the size after Base64 encoding must be less than 8 MB.
|
|
303
|
+
Input requirements:
|
|
304
|
+
1. It is recommended to input a frontal model image that at least fully shows the model's body (whole body, upper body or lower body) and avoids large-angle body deflections or complex poses.
|
|
305
|
+
2. It is recommended to input a 3:4 ratio image for better generation effect.
|
|
306
|
+
3. It is recommended to keep the category of the original clothes in the model image and the category of the replaced clothes the same, or to keep the original clothes' coverage on the model's body equal to or less than the replaced clothes'. (For example, if you need to change the model to wear shorts, the model in the original input image should also wear shorts instead of long pants.) Otherwise, the generation effect will be impaired.
|
|
307
|
+
* @type {string || null}
|
|
207
308
|
*/
|
|
208
|
-
this.
|
|
309
|
+
this.ModelUrl = null;
|
|
209
310
|
|
|
210
311
|
/**
|
|
211
|
-
*
|
|
212
|
-
|
|
312
|
+
* URL of the clothes image.
|
|
313
|
+
Image restrictions: single-side resolution less than 3000 and greater than 512, less than 8MB after conversion to Base64 string.
|
|
314
|
+
Input requirements:
|
|
315
|
+
It is recommended to input a complete front-facing flat image of the clothes, containing only one garment in the image. The type of the clothes supports Upper-body, Lower-body and Dress, and you can choose one from the three. The algorithm will change the model's clothes based on the input model image and the input clothes image.
|
|
316
|
+
* @type {string || null}
|
|
213
317
|
*/
|
|
214
|
-
this.
|
|
318
|
+
this.ClothesUrl = null;
|
|
215
319
|
|
|
216
320
|
/**
|
|
217
|
-
*
|
|
218
|
-
|
|
321
|
+
* Type of the clothes, which needs to be consistent with the input clothes image.
|
|
322
|
+
Supported value:
|
|
323
|
+
Upper-body
|
|
324
|
+
Lower-body
|
|
325
|
+
Dress
|
|
326
|
+
* @type {string || null}
|
|
219
327
|
*/
|
|
220
|
-
this.
|
|
328
|
+
this.ClothesType = null;
|
|
221
329
|
|
|
222
330
|
/**
|
|
223
|
-
*
|
|
331
|
+
* Switch indicating whether to add a logo to the generated image. Default value: 1.
|
|
332
|
+
1: add logo
|
|
333
|
+
0: do not add logo
|
|
334
|
+
Other values: add logo
|
|
335
|
+
It is recommended to use an obvious logo to indicate that the image result is generated by AI.
|
|
224
336
|
* @type {number || null}
|
|
225
337
|
*/
|
|
226
|
-
this.
|
|
338
|
+
this.LogoAdd = null;
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* Logo content settings.
|
|
342
|
+
By default, the text "Generated by AI" is added to the bottom right corner of the generated image. You can also use other logo.
|
|
343
|
+
* @type {LogoParam || null}
|
|
344
|
+
*/
|
|
345
|
+
this.LogoParam = null;
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* Image return method (base64 or url).
|
|
349
|
+
You can specify only one method. Default value: base64.
|
|
350
|
+
The URL is valid for 1 hour.
|
|
351
|
+
It is recommended to choose url when the generated image resolution is large. Using base64 may cause return failure due to the image being too large.
|
|
352
|
+
* @type {string || null}
|
|
353
|
+
*/
|
|
354
|
+
this.RspImgType = null;
|
|
227
355
|
|
|
228
356
|
}
|
|
229
357
|
|
|
@@ -234,39 +362,42 @@ class LogoRect extends AbstractModel {
|
|
|
234
362
|
if (!params) {
|
|
235
363
|
return;
|
|
236
364
|
}
|
|
237
|
-
this.
|
|
238
|
-
this.
|
|
239
|
-
this.
|
|
240
|
-
this.
|
|
365
|
+
this.ModelUrl = 'ModelUrl' in params ? params.ModelUrl : null;
|
|
366
|
+
this.ClothesUrl = 'ClothesUrl' in params ? params.ClothesUrl : null;
|
|
367
|
+
this.ClothesType = 'ClothesType' in params ? params.ClothesType : null;
|
|
368
|
+
this.LogoAdd = 'LogoAdd' in params ? params.LogoAdd : null;
|
|
369
|
+
|
|
370
|
+
if (params.LogoParam) {
|
|
371
|
+
let obj = new LogoParam();
|
|
372
|
+
obj.deserialize(params.LogoParam)
|
|
373
|
+
this.LogoParam = obj;
|
|
374
|
+
}
|
|
375
|
+
this.RspImgType = 'RspImgType' in params ? params.RspImgType : null;
|
|
241
376
|
|
|
242
377
|
}
|
|
243
378
|
}
|
|
244
379
|
|
|
245
380
|
/**
|
|
246
|
-
*
|
|
381
|
+
* ChangeClothes response structure.
|
|
247
382
|
* @class
|
|
248
383
|
*/
|
|
249
|
-
class
|
|
384
|
+
class ChangeClothesResponse extends AbstractModel {
|
|
250
385
|
constructor(){
|
|
251
386
|
super();
|
|
252
387
|
|
|
253
388
|
/**
|
|
254
|
-
*
|
|
389
|
+
* Different content is returned depending on the input parameter RspImgType.
|
|
390
|
+
If the value is base64, the Base64 code of the generated image is returned.
|
|
391
|
+
If the value is url, the URL of the generated image is returned. The URL is valid for 1 hour. Save it in time.
|
|
255
392
|
* @type {string || null}
|
|
256
393
|
*/
|
|
257
|
-
this.
|
|
394
|
+
this.ResultImage = null;
|
|
258
395
|
|
|
259
396
|
/**
|
|
260
|
-
*
|
|
397
|
+
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
|
|
261
398
|
* @type {string || null}
|
|
262
399
|
*/
|
|
263
|
-
this.
|
|
264
|
-
|
|
265
|
-
/**
|
|
266
|
-
* Coordinates of the logo image in the generated image. The logo image will be stretched according to the coordinates.
|
|
267
|
-
* @type {LogoRect || null}
|
|
268
|
-
*/
|
|
269
|
-
this.LogoRect = null;
|
|
400
|
+
this.RequestId = null;
|
|
270
401
|
|
|
271
402
|
}
|
|
272
403
|
|
|
@@ -277,14 +408,8 @@ class LogoParam extends AbstractModel {
|
|
|
277
408
|
if (!params) {
|
|
278
409
|
return;
|
|
279
410
|
}
|
|
280
|
-
this.
|
|
281
|
-
this.
|
|
282
|
-
|
|
283
|
-
if (params.LogoRect) {
|
|
284
|
-
let obj = new LogoRect();
|
|
285
|
-
obj.deserialize(params.LogoRect)
|
|
286
|
-
this.LogoRect = obj;
|
|
287
|
-
}
|
|
411
|
+
this.ResultImage = 'ResultImage' in params ? params.ResultImage : null;
|
|
412
|
+
this.RequestId = 'RequestId' in params ? params.RequestId : null;
|
|
288
413
|
|
|
289
414
|
}
|
|
290
415
|
}
|
|
@@ -320,10 +445,12 @@ Images with the following resolutions can be generated: origin (The resolution i
|
|
|
320
445
|
}
|
|
321
446
|
|
|
322
447
|
module.exports = {
|
|
323
|
-
ImageToImageRequest: ImageToImageRequest,
|
|
324
448
|
ImageToImageResponse: ImageToImageResponse,
|
|
325
|
-
LogoRect: LogoRect,
|
|
326
449
|
LogoParam: LogoParam,
|
|
450
|
+
ImageToImageRequest: ImageToImageRequest,
|
|
451
|
+
LogoRect: LogoRect,
|
|
452
|
+
ChangeClothesRequest: ChangeClothesRequest,
|
|
453
|
+
ChangeClothesResponse: ChangeClothesResponse,
|
|
327
454
|
ResultConfig: ResultConfig,
|
|
328
455
|
|
|
329
456
|
}
|