@alicloud/aidge20260428 5.1.0 → 5.2.0
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/dist/client.d.ts +111 -54
- package/dist/client.js +158 -54
- package/dist/client.js.map +1 -1
- package/dist/models/ImageTranslationPlusResponseBody.d.ts +4 -6
- package/dist/models/ImageTranslationPlusResponseBody.js.map +1 -1
- package/dist/models/PrepaidTextTranslateRequest.d.ts +73 -0
- package/dist/models/PrepaidTextTranslateRequest.js +73 -0
- package/dist/models/PrepaidTextTranslateRequest.js.map +1 -0
- package/dist/models/PrepaidTextTranslateResponse.d.ts +19 -0
- package/dist/models/PrepaidTextTranslateResponse.js +69 -0
- package/dist/models/PrepaidTextTranslateResponse.js.map +1 -0
- package/dist/models/PrepaidTextTranslateResponseBody.d.ts +110 -0
- package/dist/models/PrepaidTextTranslateResponseBody.js +119 -0
- package/dist/models/PrepaidTextTranslateResponseBody.js.map +1 -0
- package/dist/models/PrepaidTextTranslateShrinkRequest.d.ts +73 -0
- package/dist/models/PrepaidTextTranslateShrinkRequest.js +70 -0
- package/dist/models/PrepaidTextTranslateShrinkRequest.js.map +1 -0
- package/dist/models/VideoGenerationRequest.d.ts +29 -0
- package/dist/models/VideoGenerationRequest.js.map +1 -1
- package/dist/models/VideoGenerationResponseBody.d.ts +23 -0
- package/dist/models/VideoGenerationResponseBody.js.map +1 -1
- package/dist/models/VideoGenerationShrinkRequest.d.ts +8 -0
- package/dist/models/VideoGenerationShrinkRequest.js.map +1 -1
- package/dist/models/model.d.ts +6 -0
- package/dist/models/model.js +15 -3
- package/dist/models/model.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +168 -54
- package/src/models/ImageTranslationPlusResponseBody.ts +4 -6
- package/src/models/PrepaidTextTranslateRequest.ts +101 -0
- package/src/models/PrepaidTextTranslateResponse.ts +40 -0
- package/src/models/PrepaidTextTranslateResponseBody.ts +164 -0
- package/src/models/PrepaidTextTranslateShrinkRequest.ts +98 -0
- package/src/models/VideoGenerationRequest.ts +29 -0
- package/src/models/VideoGenerationResponseBody.ts +23 -0
- package/src/models/VideoGenerationShrinkRequest.ts +8 -0
- package/src/models/model.ts +6 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import * as $dara from '@darabonba/typescript';
|
|
2
|
+
export declare class PrepaidTextTranslateRequest extends $dara.Model {
|
|
3
|
+
/**
|
|
4
|
+
* @remarks
|
|
5
|
+
* The business scenario identifier. This parameter is optional. Valid values: e-commerce-title, e-commerce-description, e-commerce-chat, e-commerce-cpv, novel, game. If not specified or an invalid value is passed, the general translation strategy is used by default.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* Alibaba-商品
|
|
9
|
+
*/
|
|
10
|
+
bizName?: string;
|
|
11
|
+
/**
|
|
12
|
+
* @remarks
|
|
13
|
+
* The format type of the source text. This parameter is optional. Supports text (plain text format) and html (web page format, preserving HTML tags).
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* text
|
|
17
|
+
*/
|
|
18
|
+
formatType?: string;
|
|
19
|
+
/**
|
|
20
|
+
* @remarks
|
|
21
|
+
* The intervention glossary ID. This parameter is optional. The glossary must be created separately in the console, and its ID must be provided. If the glossary ID is empty, the translation result is not modified.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* custom_glossary
|
|
25
|
+
*/
|
|
26
|
+
glossary?: string;
|
|
27
|
+
/**
|
|
28
|
+
* @remarks
|
|
29
|
+
* The source language code. This parameter is optional. If not specified, the language is automatically detected. You can pass auto for language detection.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* auto
|
|
33
|
+
*/
|
|
34
|
+
sourceLanguage?: string;
|
|
35
|
+
/**
|
|
36
|
+
* @remarks
|
|
37
|
+
* The list of texts to translate. This parameter is required. The total character length cannot exceed 50,000, and the list length cannot exceed 50.
|
|
38
|
+
*
|
|
39
|
+
* This parameter is required.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ["Hello world"]
|
|
43
|
+
*/
|
|
44
|
+
sourceTextList?: string[];
|
|
45
|
+
/**
|
|
46
|
+
* @remarks
|
|
47
|
+
* The target language code. This parameter is required. More than 100 language directions are supported. For details, refer to the supported language directions list.
|
|
48
|
+
*
|
|
49
|
+
* This parameter is required.
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* zh
|
|
53
|
+
*/
|
|
54
|
+
targetLanguage?: string;
|
|
55
|
+
/**
|
|
56
|
+
* @remarks
|
|
57
|
+
* The format of the translation text. html (web page format. This setting processes both the source text and translated text in HTML format) or text (text format. This setting processes both the source text and translated result as plain text without format processing).
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* e-commerce-title
|
|
61
|
+
*/
|
|
62
|
+
translateScene?: string;
|
|
63
|
+
static names(): {
|
|
64
|
+
[key: string]: string;
|
|
65
|
+
};
|
|
66
|
+
static types(): {
|
|
67
|
+
[key: string]: any;
|
|
68
|
+
};
|
|
69
|
+
validate(): void;
|
|
70
|
+
constructor(map?: {
|
|
71
|
+
[key: string]: any;
|
|
72
|
+
});
|
|
73
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.PrepaidTextTranslateRequest = void 0;
|
|
37
|
+
// This file is auto-generated, don't edit it
|
|
38
|
+
const $dara = __importStar(require("@darabonba/typescript"));
|
|
39
|
+
class PrepaidTextTranslateRequest extends $dara.Model {
|
|
40
|
+
static names() {
|
|
41
|
+
return {
|
|
42
|
+
bizName: 'BizName',
|
|
43
|
+
formatType: 'FormatType',
|
|
44
|
+
glossary: 'Glossary',
|
|
45
|
+
sourceLanguage: 'SourceLanguage',
|
|
46
|
+
sourceTextList: 'SourceTextList',
|
|
47
|
+
targetLanguage: 'TargetLanguage',
|
|
48
|
+
translateScene: 'TranslateScene',
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
static types() {
|
|
52
|
+
return {
|
|
53
|
+
bizName: 'string',
|
|
54
|
+
formatType: 'string',
|
|
55
|
+
glossary: 'string',
|
|
56
|
+
sourceLanguage: 'string',
|
|
57
|
+
sourceTextList: { 'type': 'array', 'itemType': 'string' },
|
|
58
|
+
targetLanguage: 'string',
|
|
59
|
+
translateScene: 'string',
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
validate() {
|
|
63
|
+
if (Array.isArray(this.sourceTextList)) {
|
|
64
|
+
$dara.Model.validateArray(this.sourceTextList);
|
|
65
|
+
}
|
|
66
|
+
super.validate();
|
|
67
|
+
}
|
|
68
|
+
constructor(map) {
|
|
69
|
+
super(map);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
exports.PrepaidTextTranslateRequest = PrepaidTextTranslateRequest;
|
|
73
|
+
//# sourceMappingURL=PrepaidTextTranslateRequest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrepaidTextTranslateRequest.js","sourceRoot":"","sources":["../../src/models/PrepaidTextTranslateRequest.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA6C;AAC7C,6DAA+C;AAG/C,MAAa,2BAA4B,SAAQ,KAAK,CAAC,KAAK;IA6D1D,MAAM,CAAC,KAAK;QACV,OAAO;YACL,OAAO,EAAE,SAAS;YAClB,UAAU,EAAE,YAAY;YACxB,QAAQ,EAAE,UAAU;YACpB,cAAc,EAAE,gBAAgB;YAChC,cAAc,EAAE,gBAAgB;YAChC,cAAc,EAAE,gBAAgB;YAChC,cAAc,EAAE,gBAAgB;SACjC,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,KAAK;QACV,OAAO;YACL,OAAO,EAAE,QAAQ;YACjB,UAAU,EAAE,QAAQ;YACpB,QAAQ,EAAE,QAAQ;YAClB,cAAc,EAAE,QAAQ;YACxB,cAAc,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE;YACzD,cAAc,EAAE,QAAQ;YACxB,cAAc,EAAE,QAAQ;SACzB,CAAC;IACJ,CAAC;IAED,QAAQ;QACN,IAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,EAAE,CAAC;YACtC,KAAK,CAAC,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QACjD,CAAC;QACD,KAAK,CAAC,QAAQ,EAAE,CAAC;IACnB,CAAC;IAED,YAAY,GAA4B;QACtC,KAAK,CAAC,GAAG,CAAC,CAAC;IACb,CAAC;CACF;AA/FD,kEA+FC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as $dara from '@darabonba/typescript';
|
|
2
|
+
import { PrepaidTextTranslateResponseBody } from "./PrepaidTextTranslateResponseBody";
|
|
3
|
+
export declare class PrepaidTextTranslateResponse extends $dara.Model {
|
|
4
|
+
headers?: {
|
|
5
|
+
[key: string]: string;
|
|
6
|
+
};
|
|
7
|
+
statusCode?: number;
|
|
8
|
+
body?: PrepaidTextTranslateResponseBody;
|
|
9
|
+
static names(): {
|
|
10
|
+
[key: string]: string;
|
|
11
|
+
};
|
|
12
|
+
static types(): {
|
|
13
|
+
[key: string]: any;
|
|
14
|
+
};
|
|
15
|
+
validate(): void;
|
|
16
|
+
constructor(map?: {
|
|
17
|
+
[key: string]: any;
|
|
18
|
+
});
|
|
19
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.PrepaidTextTranslateResponse = void 0;
|
|
37
|
+
// This file is auto-generated, don't edit it
|
|
38
|
+
const $dara = __importStar(require("@darabonba/typescript"));
|
|
39
|
+
const PrepaidTextTranslateResponseBody_1 = require("./PrepaidTextTranslateResponseBody");
|
|
40
|
+
class PrepaidTextTranslateResponse extends $dara.Model {
|
|
41
|
+
static names() {
|
|
42
|
+
return {
|
|
43
|
+
headers: 'headers',
|
|
44
|
+
statusCode: 'statusCode',
|
|
45
|
+
body: 'body',
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
static types() {
|
|
49
|
+
return {
|
|
50
|
+
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
51
|
+
statusCode: 'number',
|
|
52
|
+
body: PrepaidTextTranslateResponseBody_1.PrepaidTextTranslateResponseBody,
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
validate() {
|
|
56
|
+
if (this.headers) {
|
|
57
|
+
$dara.Model.validateMap(this.headers);
|
|
58
|
+
}
|
|
59
|
+
if (this.body && typeof this.body.validate === 'function') {
|
|
60
|
+
this.body.validate();
|
|
61
|
+
}
|
|
62
|
+
super.validate();
|
|
63
|
+
}
|
|
64
|
+
constructor(map) {
|
|
65
|
+
super(map);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
exports.PrepaidTextTranslateResponse = PrepaidTextTranslateResponse;
|
|
69
|
+
//# sourceMappingURL=PrepaidTextTranslateResponse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrepaidTextTranslateResponse.js","sourceRoot":"","sources":["../../src/models/PrepaidTextTranslateResponse.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA6C;AAC7C,6DAA+C;AAC/C,yFAAsF;AAGtF,MAAa,4BAA6B,SAAQ,KAAK,CAAC,KAAK;IAI3D,MAAM,CAAC,KAAK;QACV,OAAO;YACL,OAAO,EAAE,SAAS;YAClB,UAAU,EAAE,YAAY;YACxB,IAAI,EAAE,MAAM;SACb,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,KAAK;QACV,OAAO;YACL,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE;YACtE,UAAU,EAAE,QAAQ;YACpB,IAAI,EAAE,mEAAgC;SACvC,CAAC;IACJ,CAAC;IAED,QAAQ;QACN,IAAG,IAAI,CAAC,OAAO,EAAE,CAAC;YAChB,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACxC,CAAC;QACD,IAAG,IAAI,CAAC,IAAI,IAAI,OAAQ,IAAI,CAAC,IAAY,CAAC,QAAQ,KAAK,UAAU,EAAE,CAAC;YACjE,IAAI,CAAC,IAAY,CAAC,QAAQ,EAAE,CAAC;QAChC,CAAC;QACD,KAAK,CAAC,QAAQ,EAAE,CAAC;IACnB,CAAC;IAED,YAAY,GAA4B;QACtC,KAAK,CAAC,GAAG,CAAC,CAAC;IACb,CAAC;CACF;AAjCD,oEAiCC"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import * as $dara from '@darabonba/typescript';
|
|
2
|
+
export declare class PrepaidTextTranslateResponseBodyDataTranslations extends $dara.Model {
|
|
3
|
+
/**
|
|
4
|
+
* @remarks
|
|
5
|
+
* The character count of the source text.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* 11
|
|
9
|
+
*/
|
|
10
|
+
characters?: number;
|
|
11
|
+
/**
|
|
12
|
+
* @remarks
|
|
13
|
+
* The automatically detected source language.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* en
|
|
17
|
+
*/
|
|
18
|
+
detectedLanguage?: string;
|
|
19
|
+
/**
|
|
20
|
+
* @remarks
|
|
21
|
+
* The translated text.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* 你好世界
|
|
25
|
+
*/
|
|
26
|
+
translatedText?: string;
|
|
27
|
+
static names(): {
|
|
28
|
+
[key: string]: string;
|
|
29
|
+
};
|
|
30
|
+
static types(): {
|
|
31
|
+
[key: string]: any;
|
|
32
|
+
};
|
|
33
|
+
validate(): void;
|
|
34
|
+
constructor(map?: {
|
|
35
|
+
[key: string]: any;
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
export declare class PrepaidTextTranslateResponseBodyData extends $dara.Model {
|
|
39
|
+
/**
|
|
40
|
+
* @remarks
|
|
41
|
+
* The translation result list. Each element corresponds to a translation result for an entry in the input text list.
|
|
42
|
+
*/
|
|
43
|
+
translations?: PrepaidTextTranslateResponseBodyDataTranslations[];
|
|
44
|
+
/**
|
|
45
|
+
* @remarks
|
|
46
|
+
* The usage information, including the input character count.
|
|
47
|
+
*/
|
|
48
|
+
usageMap?: {
|
|
49
|
+
[key: string]: number;
|
|
50
|
+
};
|
|
51
|
+
static names(): {
|
|
52
|
+
[key: string]: string;
|
|
53
|
+
};
|
|
54
|
+
static types(): {
|
|
55
|
+
[key: string]: any;
|
|
56
|
+
};
|
|
57
|
+
validate(): void;
|
|
58
|
+
constructor(map?: {
|
|
59
|
+
[key: string]: any;
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
export declare class PrepaidTextTranslateResponseBody extends $dara.Model {
|
|
63
|
+
/**
|
|
64
|
+
* @remarks
|
|
65
|
+
* The response code. Returns "success" for normal calls.
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* success
|
|
69
|
+
*/
|
|
70
|
+
code?: string;
|
|
71
|
+
/**
|
|
72
|
+
* @remarks
|
|
73
|
+
* The translation result data, including the translation list and usage information.
|
|
74
|
+
*/
|
|
75
|
+
data?: PrepaidTextTranslateResponseBodyData;
|
|
76
|
+
/**
|
|
77
|
+
* @remarks
|
|
78
|
+
* The error message. Returns "Success" for normal calls. Returns specific error information for exceptions, such as "The parameters contain sensitive information. Try other input."
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* Success
|
|
82
|
+
*/
|
|
83
|
+
message?: string;
|
|
84
|
+
/**
|
|
85
|
+
* @remarks
|
|
86
|
+
* The request ID, used to identify a unique request call.
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* E1AD60F1-BAC7-546B-9533-E7AD02B16E3F
|
|
90
|
+
*/
|
|
91
|
+
requestId?: string;
|
|
92
|
+
/**
|
|
93
|
+
* @remarks
|
|
94
|
+
* Indicates whether the call is successful. true indicates success. false indicates failure.
|
|
95
|
+
*
|
|
96
|
+
* @example
|
|
97
|
+
* True
|
|
98
|
+
*/
|
|
99
|
+
success?: boolean;
|
|
100
|
+
static names(): {
|
|
101
|
+
[key: string]: string;
|
|
102
|
+
};
|
|
103
|
+
static types(): {
|
|
104
|
+
[key: string]: any;
|
|
105
|
+
};
|
|
106
|
+
validate(): void;
|
|
107
|
+
constructor(map?: {
|
|
108
|
+
[key: string]: any;
|
|
109
|
+
});
|
|
110
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.PrepaidTextTranslateResponseBody = exports.PrepaidTextTranslateResponseBodyData = exports.PrepaidTextTranslateResponseBodyDataTranslations = void 0;
|
|
37
|
+
// This file is auto-generated, don't edit it
|
|
38
|
+
const $dara = __importStar(require("@darabonba/typescript"));
|
|
39
|
+
class PrepaidTextTranslateResponseBodyDataTranslations extends $dara.Model {
|
|
40
|
+
static names() {
|
|
41
|
+
return {
|
|
42
|
+
characters: 'Characters',
|
|
43
|
+
detectedLanguage: 'DetectedLanguage',
|
|
44
|
+
translatedText: 'TranslatedText',
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
static types() {
|
|
48
|
+
return {
|
|
49
|
+
characters: 'number',
|
|
50
|
+
detectedLanguage: 'string',
|
|
51
|
+
translatedText: 'string',
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
validate() {
|
|
55
|
+
super.validate();
|
|
56
|
+
}
|
|
57
|
+
constructor(map) {
|
|
58
|
+
super(map);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
exports.PrepaidTextTranslateResponseBodyDataTranslations = PrepaidTextTranslateResponseBodyDataTranslations;
|
|
62
|
+
class PrepaidTextTranslateResponseBodyData extends $dara.Model {
|
|
63
|
+
static names() {
|
|
64
|
+
return {
|
|
65
|
+
translations: 'Translations',
|
|
66
|
+
usageMap: 'UsageMap',
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
static types() {
|
|
70
|
+
return {
|
|
71
|
+
translations: { 'type': 'array', 'itemType': PrepaidTextTranslateResponseBodyDataTranslations },
|
|
72
|
+
usageMap: { 'type': 'map', 'keyType': 'string', 'valueType': 'number' },
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
validate() {
|
|
76
|
+
if (Array.isArray(this.translations)) {
|
|
77
|
+
$dara.Model.validateArray(this.translations);
|
|
78
|
+
}
|
|
79
|
+
if (this.usageMap) {
|
|
80
|
+
$dara.Model.validateMap(this.usageMap);
|
|
81
|
+
}
|
|
82
|
+
super.validate();
|
|
83
|
+
}
|
|
84
|
+
constructor(map) {
|
|
85
|
+
super(map);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
exports.PrepaidTextTranslateResponseBodyData = PrepaidTextTranslateResponseBodyData;
|
|
89
|
+
class PrepaidTextTranslateResponseBody extends $dara.Model {
|
|
90
|
+
static names() {
|
|
91
|
+
return {
|
|
92
|
+
code: 'Code',
|
|
93
|
+
data: 'Data',
|
|
94
|
+
message: 'Message',
|
|
95
|
+
requestId: 'RequestId',
|
|
96
|
+
success: 'Success',
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
static types() {
|
|
100
|
+
return {
|
|
101
|
+
code: 'string',
|
|
102
|
+
data: PrepaidTextTranslateResponseBodyData,
|
|
103
|
+
message: 'string',
|
|
104
|
+
requestId: 'string',
|
|
105
|
+
success: 'boolean',
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
validate() {
|
|
109
|
+
if (this.data && typeof this.data.validate === 'function') {
|
|
110
|
+
this.data.validate();
|
|
111
|
+
}
|
|
112
|
+
super.validate();
|
|
113
|
+
}
|
|
114
|
+
constructor(map) {
|
|
115
|
+
super(map);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
exports.PrepaidTextTranslateResponseBody = PrepaidTextTranslateResponseBody;
|
|
119
|
+
//# sourceMappingURL=PrepaidTextTranslateResponseBody.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrepaidTextTranslateResponseBody.js","sourceRoot":"","sources":["../../src/models/PrepaidTextTranslateResponseBody.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA6C;AAC7C,6DAA+C;AAG/C,MAAa,gDAAiD,SAAQ,KAAK,CAAC,KAAK;IAyB/E,MAAM,CAAC,KAAK;QACV,OAAO;YACL,UAAU,EAAE,YAAY;YACxB,gBAAgB,EAAE,kBAAkB;YACpC,cAAc,EAAE,gBAAgB;SACjC,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,KAAK;QACV,OAAO;YACL,UAAU,EAAE,QAAQ;YACpB,gBAAgB,EAAE,QAAQ;YAC1B,cAAc,EAAE,QAAQ;SACzB,CAAC;IACJ,CAAC;IAED,QAAQ;QACN,KAAK,CAAC,QAAQ,EAAE,CAAC;IACnB,CAAC;IAED,YAAY,GAA4B;QACtC,KAAK,CAAC,GAAG,CAAC,CAAC;IACb,CAAC;CACF;AAhDD,4GAgDC;AAED,MAAa,oCAAqC,SAAQ,KAAK,CAAC,KAAK;IAWnE,MAAM,CAAC,KAAK;QACV,OAAO;YACL,YAAY,EAAE,cAAc;YAC5B,QAAQ,EAAE,UAAU;SACrB,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,KAAK;QACV,OAAO;YACL,YAAY,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,gDAAgD,EAAE;YAC/F,QAAQ,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE;SACxE,CAAC;IACJ,CAAC;IAED,QAAQ;QACN,IAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC;YACpC,KAAK,CAAC,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC/C,CAAC;QACD,IAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;YACjB,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACzC,CAAC;QACD,KAAK,CAAC,QAAQ,EAAE,CAAC;IACnB,CAAC;IAED,YAAY,GAA4B;QACtC,KAAK,CAAC,GAAG,CAAC,CAAC;IACb,CAAC;CACF;AAtCD,oFAsCC;AAED,MAAa,gCAAiC,SAAQ,KAAK,CAAC,KAAK;IAsC/D,MAAM,CAAC,KAAK;QACV,OAAO;YACL,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,SAAS;YAClB,SAAS,EAAE,WAAW;YACtB,OAAO,EAAE,SAAS;SACnB,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,KAAK;QACV,OAAO;YACL,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,oCAAoC;YAC1C,OAAO,EAAE,QAAQ;YACjB,SAAS,EAAE,QAAQ;YACnB,OAAO,EAAE,SAAS;SACnB,CAAC;IACJ,CAAC;IAED,QAAQ;QACN,IAAG,IAAI,CAAC,IAAI,IAAI,OAAQ,IAAI,CAAC,IAAY,CAAC,QAAQ,KAAK,UAAU,EAAE,CAAC;YACjE,IAAI,CAAC,IAAY,CAAC,QAAQ,EAAE,CAAC;QAChC,CAAC;QACD,KAAK,CAAC,QAAQ,EAAE,CAAC;IACnB,CAAC;IAED,YAAY,GAA4B;QACtC,KAAK,CAAC,GAAG,CAAC,CAAC;IACb,CAAC;CACF;AApED,4EAoEC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import * as $dara from '@darabonba/typescript';
|
|
2
|
+
export declare class PrepaidTextTranslateShrinkRequest extends $dara.Model {
|
|
3
|
+
/**
|
|
4
|
+
* @remarks
|
|
5
|
+
* The business scenario identifier. This parameter is optional. Valid values: e-commerce-title, e-commerce-description, e-commerce-chat, e-commerce-cpv, novel, game. If not specified or an invalid value is passed, the general translation strategy is used by default.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* Alibaba-商品
|
|
9
|
+
*/
|
|
10
|
+
bizName?: string;
|
|
11
|
+
/**
|
|
12
|
+
* @remarks
|
|
13
|
+
* The format type of the source text. This parameter is optional. Supports text (plain text format) and html (web page format, preserving HTML tags).
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* text
|
|
17
|
+
*/
|
|
18
|
+
formatType?: string;
|
|
19
|
+
/**
|
|
20
|
+
* @remarks
|
|
21
|
+
* The intervention glossary ID. This parameter is optional. The glossary must be created separately in the console, and its ID must be provided. If the glossary ID is empty, the translation result is not modified.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* custom_glossary
|
|
25
|
+
*/
|
|
26
|
+
glossary?: string;
|
|
27
|
+
/**
|
|
28
|
+
* @remarks
|
|
29
|
+
* The source language code. This parameter is optional. If not specified, the language is automatically detected. You can pass auto for language detection.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* auto
|
|
33
|
+
*/
|
|
34
|
+
sourceLanguage?: string;
|
|
35
|
+
/**
|
|
36
|
+
* @remarks
|
|
37
|
+
* The list of texts to translate. This parameter is required. The total character length cannot exceed 50,000, and the list length cannot exceed 50.
|
|
38
|
+
*
|
|
39
|
+
* This parameter is required.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ["Hello world"]
|
|
43
|
+
*/
|
|
44
|
+
sourceTextListShrink?: string;
|
|
45
|
+
/**
|
|
46
|
+
* @remarks
|
|
47
|
+
* The target language code. This parameter is required. More than 100 language directions are supported. For details, refer to the supported language directions list.
|
|
48
|
+
*
|
|
49
|
+
* This parameter is required.
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* zh
|
|
53
|
+
*/
|
|
54
|
+
targetLanguage?: string;
|
|
55
|
+
/**
|
|
56
|
+
* @remarks
|
|
57
|
+
* The format of the translation text. html (web page format. This setting processes both the source text and translated text in HTML format) or text (text format. This setting processes both the source text and translated result as plain text without format processing).
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* e-commerce-title
|
|
61
|
+
*/
|
|
62
|
+
translateScene?: string;
|
|
63
|
+
static names(): {
|
|
64
|
+
[key: string]: string;
|
|
65
|
+
};
|
|
66
|
+
static types(): {
|
|
67
|
+
[key: string]: any;
|
|
68
|
+
};
|
|
69
|
+
validate(): void;
|
|
70
|
+
constructor(map?: {
|
|
71
|
+
[key: string]: any;
|
|
72
|
+
});
|
|
73
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.PrepaidTextTranslateShrinkRequest = void 0;
|
|
37
|
+
// This file is auto-generated, don't edit it
|
|
38
|
+
const $dara = __importStar(require("@darabonba/typescript"));
|
|
39
|
+
class PrepaidTextTranslateShrinkRequest extends $dara.Model {
|
|
40
|
+
static names() {
|
|
41
|
+
return {
|
|
42
|
+
bizName: 'BizName',
|
|
43
|
+
formatType: 'FormatType',
|
|
44
|
+
glossary: 'Glossary',
|
|
45
|
+
sourceLanguage: 'SourceLanguage',
|
|
46
|
+
sourceTextListShrink: 'SourceTextList',
|
|
47
|
+
targetLanguage: 'TargetLanguage',
|
|
48
|
+
translateScene: 'TranslateScene',
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
static types() {
|
|
52
|
+
return {
|
|
53
|
+
bizName: 'string',
|
|
54
|
+
formatType: 'string',
|
|
55
|
+
glossary: 'string',
|
|
56
|
+
sourceLanguage: 'string',
|
|
57
|
+
sourceTextListShrink: 'string',
|
|
58
|
+
targetLanguage: 'string',
|
|
59
|
+
translateScene: 'string',
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
validate() {
|
|
63
|
+
super.validate();
|
|
64
|
+
}
|
|
65
|
+
constructor(map) {
|
|
66
|
+
super(map);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
exports.PrepaidTextTranslateShrinkRequest = PrepaidTextTranslateShrinkRequest;
|
|
70
|
+
//# sourceMappingURL=PrepaidTextTranslateShrinkRequest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrepaidTextTranslateShrinkRequest.js","sourceRoot":"","sources":["../../src/models/PrepaidTextTranslateShrinkRequest.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA6C;AAC7C,6DAA+C;AAG/C,MAAa,iCAAkC,SAAQ,KAAK,CAAC,KAAK;IA6DhE,MAAM,CAAC,KAAK;QACV,OAAO;YACL,OAAO,EAAE,SAAS;YAClB,UAAU,EAAE,YAAY;YACxB,QAAQ,EAAE,UAAU;YACpB,cAAc,EAAE,gBAAgB;YAChC,oBAAoB,EAAE,gBAAgB;YACtC,cAAc,EAAE,gBAAgB;YAChC,cAAc,EAAE,gBAAgB;SACjC,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,KAAK;QACV,OAAO;YACL,OAAO,EAAE,QAAQ;YACjB,UAAU,EAAE,QAAQ;YACpB,QAAQ,EAAE,QAAQ;YAClB,cAAc,EAAE,QAAQ;YACxB,oBAAoB,EAAE,QAAQ;YAC9B,cAAc,EAAE,QAAQ;YACxB,cAAc,EAAE,QAAQ;SACzB,CAAC;IACJ,CAAC;IAED,QAAQ;QACN,KAAK,CAAC,QAAQ,EAAE,CAAC;IACnB,CAAC;IAED,YAAY,GAA4B;QACtC,KAAK,CAAC,GAAG,CAAC,CAAC;IACb,CAAC;CACF;AA5FD,8EA4FC"}
|