@alicloud/xtee20210910 2.3.1 → 2.4.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 +37 -0
- package/dist/client.js +343 -4
- package/dist/client.js.map +1 -1
- package/dist/models/CreateForeignPocSampleAdvanceRequest.d.ts +40 -0
- package/dist/models/CreateForeignPocSampleAdvanceRequest.js +67 -0
- package/dist/models/CreateForeignPocSampleAdvanceRequest.js.map +1 -0
- package/dist/models/CreateForeignPocSampleRequest.d.ts +39 -0
- package/dist/models/CreateForeignPocSampleRequest.js +68 -0
- package/dist/models/CreateForeignPocSampleRequest.js.map +1 -0
- package/dist/models/CreateForeignPocSampleResponse.d.ts +19 -0
- package/dist/models/CreateForeignPocSampleResponse.js +69 -0
- package/dist/models/CreateForeignPocSampleResponse.js.map +1 -0
- package/dist/models/CreateForeignPocSampleResponseBody.d.ts +71 -0
- package/dist/models/CreateForeignPocSampleResponseBody.js +96 -0
- package/dist/models/CreateForeignPocSampleResponseBody.js.map +1 -0
- package/dist/models/DescribeRequestHitResponseBody.d.ts +7 -0
- package/dist/models/DescribeRequestHitResponseBody.js.map +1 -1
- package/dist/models/UploadForeignSampleFileAdvanceRequest.d.ts +30 -0
- package/dist/models/UploadForeignSampleFileAdvanceRequest.js +63 -0
- package/dist/models/UploadForeignSampleFileAdvanceRequest.js.map +1 -0
- package/dist/models/UploadForeignSampleFileRequest.d.ts +29 -0
- package/dist/models/UploadForeignSampleFileRequest.js +64 -0
- package/dist/models/UploadForeignSampleFileRequest.js.map +1 -0
- package/dist/models/UploadForeignSampleFileResponse.d.ts +19 -0
- package/dist/models/UploadForeignSampleFileResponse.js +69 -0
- package/dist/models/UploadForeignSampleFileResponse.js.map +1 -0
- package/dist/models/UploadForeignSampleFileResponseBody.d.ts +140 -0
- package/dist/models/UploadForeignSampleFileResponseBody.js +174 -0
- package/dist/models/UploadForeignSampleFileResponseBody.js.map +1 -0
- package/dist/models/model.d.ts +12 -0
- package/dist/models/model.js +48 -24
- package/dist/models/model.js.map +1 -1
- package/package.json +2 -1
- package/src/client.ts +373 -1
- package/src/models/CreateForeignPocSampleAdvanceRequest.ts +63 -0
- package/src/models/CreateForeignPocSampleRequest.ts +62 -0
- package/src/models/CreateForeignPocSampleResponse.ts +40 -0
- package/src/models/CreateForeignPocSampleResponseBody.ts +113 -0
- package/src/models/DescribeRequestHitResponseBody.ts +7 -0
- package/src/models/UploadForeignSampleFileAdvanceRequest.ts +49 -0
- package/src/models/UploadForeignSampleFileRequest.ts +48 -0
- package/src/models/UploadForeignSampleFileResponse.ts +40 -0
- package/src/models/UploadForeignSampleFileResponseBody.ts +242 -0
- package/src/models/model.ts +12 -0
package/src/client.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// This file is auto-generated, don't edit it
|
|
2
2
|
import * as $dara from '@darabonba/typescript';
|
|
3
|
-
import OpenApi from '@alicloud/openapi-core';
|
|
3
|
+
import OpenApi, * as $OpenApi from '@alicloud/openapi-core';
|
|
4
4
|
import { OpenApiUtil, $OpenApiUtil }from '@alicloud/openapi-core';
|
|
5
5
|
|
|
6
6
|
|
|
@@ -16,6 +16,90 @@ export default class Client extends OpenApi {
|
|
|
16
16
|
this._endpoint = this.getEndpoint("xtee", this._regionId, this._endpointRule, this._network, this._suffix, this._endpointMap, this._endpoint);
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
async _postOSSObject(bucketName: string, form: {[key: string]: any}, runtime: $dara.RuntimeOptions): Promise<{[key: string]: any}> {
|
|
20
|
+
let _runtime: { [key: string]: any } = {
|
|
21
|
+
key: runtime.key || this._key,
|
|
22
|
+
cert: runtime.cert || this._cert,
|
|
23
|
+
ca: runtime.ca || this._ca,
|
|
24
|
+
readTimeout: runtime.readTimeout || this._readTimeout,
|
|
25
|
+
connectTimeout: runtime.connectTimeout || this._connectTimeout,
|
|
26
|
+
httpProxy: runtime.httpProxy || this._httpProxy,
|
|
27
|
+
httpsProxy: runtime.httpsProxy || this._httpsProxy,
|
|
28
|
+
noProxy: runtime.noProxy || this._noProxy,
|
|
29
|
+
socks5Proxy: runtime.socks5Proxy || this._socks5Proxy,
|
|
30
|
+
socks5NetWork: runtime.socks5NetWork || this._socks5NetWork,
|
|
31
|
+
maxIdleConns: runtime.maxIdleConns || this._maxIdleConns,
|
|
32
|
+
retryOptions: this._retryOptions,
|
|
33
|
+
ignoreSSL: runtime.ignoreSSL || false,
|
|
34
|
+
tlsMinVersion: this._tlsMinVersion,
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
let _retriesAttempted = 0;
|
|
38
|
+
let _lastRequest = null, _lastResponse = null;
|
|
39
|
+
let _context = new $dara.RetryPolicyContext({
|
|
40
|
+
retriesAttempted: _retriesAttempted,
|
|
41
|
+
});
|
|
42
|
+
while ($dara.shouldRetry(_runtime['retryOptions'], _context)) {
|
|
43
|
+
if (_retriesAttempted > 0) {
|
|
44
|
+
let _backoffTime = $dara.getBackoffDelay(_runtime['retryOptions'], _context);
|
|
45
|
+
if (_backoffTime > 0) {
|
|
46
|
+
await $dara.sleep(_backoffTime);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
_retriesAttempted = _retriesAttempted + 1;
|
|
51
|
+
try {
|
|
52
|
+
let request_ = new $dara.Request();
|
|
53
|
+
let boundary = $dara.Form.getBoundary();
|
|
54
|
+
let tmp = String(form["host"]);
|
|
55
|
+
let host = `${bucketName}.${tmp}`;
|
|
56
|
+
request_.protocol = "HTTPS";
|
|
57
|
+
request_.method = "POST";
|
|
58
|
+
request_.pathname = `/`;
|
|
59
|
+
request_.headers = {
|
|
60
|
+
host: host,
|
|
61
|
+
date: OpenApiUtil.getDateUTCString(),
|
|
62
|
+
'user-agent': OpenApiUtil.getUserAgent(""),
|
|
63
|
+
};
|
|
64
|
+
request_.headers["content-type"] = `multipart/form-data; boundary=${boundary}`;
|
|
65
|
+
request_.body = $dara.Form.toFileForm(form, boundary);
|
|
66
|
+
_lastRequest = request_;
|
|
67
|
+
let response_ = await $dara.doAction(request_, _runtime);
|
|
68
|
+
_lastResponse = response_;
|
|
69
|
+
|
|
70
|
+
let respMap : {[key: string]: any} = null;
|
|
71
|
+
let bodyStr = await $dara.Stream.readAsString(response_.body);
|
|
72
|
+
if ((response_.statusCode >= 400) && (response_.statusCode < 600)) {
|
|
73
|
+
respMap = $dara.XML.parseXml(bodyStr, null);
|
|
74
|
+
let err = respMap["Error"];
|
|
75
|
+
throw new $OpenApi.ClientError({
|
|
76
|
+
code: String(err["Code"]),
|
|
77
|
+
message: String(err["Message"]),
|
|
78
|
+
data: {
|
|
79
|
+
httpCode: response_.statusCode,
|
|
80
|
+
requestId: String(err["RequestId"]),
|
|
81
|
+
hostId: String(err["HostId"]),
|
|
82
|
+
},
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
respMap = $dara.XML.parseXml(bodyStr, null);
|
|
87
|
+
return {
|
|
88
|
+
...respMap,
|
|
89
|
+
};
|
|
90
|
+
} catch (ex) {
|
|
91
|
+
_context = new $dara.RetryPolicyContext({
|
|
92
|
+
retriesAttempted : _retriesAttempted,
|
|
93
|
+
httpRequest : _lastRequest,
|
|
94
|
+
httpResponse : _lastResponse,
|
|
95
|
+
exception : ex,
|
|
96
|
+
});
|
|
97
|
+
continue;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
throw $dara.newUnretryableError(_context);
|
|
102
|
+
}
|
|
19
103
|
|
|
20
104
|
getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: {[key: string ]: string}, endpoint: string): string {
|
|
21
105
|
if (!$dara.isNull(endpoint)) {
|
|
@@ -1417,6 +1501,154 @@ export default class Client extends OpenApi {
|
|
|
1417
1501
|
return await this.createFieldWithOptions(request, runtime);
|
|
1418
1502
|
}
|
|
1419
1503
|
|
|
1504
|
+
/**
|
|
1505
|
+
* 创建样本记录对客
|
|
1506
|
+
*
|
|
1507
|
+
* @param request - CreateForeignPocSampleRequest
|
|
1508
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
1509
|
+
* @returns CreateForeignPocSampleResponse
|
|
1510
|
+
*/
|
|
1511
|
+
async createForeignPocSampleWithOptions(request: $_model.CreateForeignPocSampleRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CreateForeignPocSampleResponse> {
|
|
1512
|
+
request.validate();
|
|
1513
|
+
let query = { };
|
|
1514
|
+
if (!$dara.isNull(request.file)) {
|
|
1515
|
+
query["File"] = request.file;
|
|
1516
|
+
}
|
|
1517
|
+
|
|
1518
|
+
if (!$dara.isNull(request.lang)) {
|
|
1519
|
+
query["Lang"] = request.lang;
|
|
1520
|
+
}
|
|
1521
|
+
|
|
1522
|
+
if (!$dara.isNull(request.regId)) {
|
|
1523
|
+
query["RegId"] = request.regId;
|
|
1524
|
+
}
|
|
1525
|
+
|
|
1526
|
+
if (!$dara.isNull(request.remark)) {
|
|
1527
|
+
query["Remark"] = request.remark;
|
|
1528
|
+
}
|
|
1529
|
+
|
|
1530
|
+
if (!$dara.isNull(request.sampleName)) {
|
|
1531
|
+
query["SampleName"] = request.sampleName;
|
|
1532
|
+
}
|
|
1533
|
+
|
|
1534
|
+
if (!$dara.isNull(request.tab)) {
|
|
1535
|
+
query["Tab"] = request.tab;
|
|
1536
|
+
}
|
|
1537
|
+
|
|
1538
|
+
let req = new $OpenApiUtil.OpenApiRequest({
|
|
1539
|
+
query: OpenApiUtil.query(query),
|
|
1540
|
+
});
|
|
1541
|
+
let params = new $OpenApiUtil.Params({
|
|
1542
|
+
action: "CreateForeignPocSample",
|
|
1543
|
+
version: "2021-09-10",
|
|
1544
|
+
protocol: "HTTPS",
|
|
1545
|
+
pathname: "/",
|
|
1546
|
+
method: "POST",
|
|
1547
|
+
authType: "AK",
|
|
1548
|
+
style: "RPC",
|
|
1549
|
+
reqBodyType: "formData",
|
|
1550
|
+
bodyType: "json",
|
|
1551
|
+
});
|
|
1552
|
+
return $dara.cast<$_model.CreateForeignPocSampleResponse>(await this.callApi(params, req, runtime), new $_model.CreateForeignPocSampleResponse({}));
|
|
1553
|
+
}
|
|
1554
|
+
|
|
1555
|
+
/**
|
|
1556
|
+
* 创建样本记录对客
|
|
1557
|
+
*
|
|
1558
|
+
* @param request - CreateForeignPocSampleRequest
|
|
1559
|
+
* @returns CreateForeignPocSampleResponse
|
|
1560
|
+
*/
|
|
1561
|
+
async createForeignPocSample(request: $_model.CreateForeignPocSampleRequest): Promise<$_model.CreateForeignPocSampleResponse> {
|
|
1562
|
+
let runtime = new $dara.RuntimeOptions({ });
|
|
1563
|
+
return await this.createForeignPocSampleWithOptions(request, runtime);
|
|
1564
|
+
}
|
|
1565
|
+
|
|
1566
|
+
async createForeignPocSampleAdvance(request: $_model.CreateForeignPocSampleAdvanceRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CreateForeignPocSampleResponse> {
|
|
1567
|
+
// Step 0: init client
|
|
1568
|
+
if ($dara.isNull(this._credential)) {
|
|
1569
|
+
throw new $OpenApi.ClientError({
|
|
1570
|
+
code: "InvalidCredentials",
|
|
1571
|
+
message: "Please set up the credentials correctly. If you are setting them through environment variables, please ensure that ALIBABA_CLOUD_ACCESS_KEY_ID and ALIBABA_CLOUD_ACCESS_KEY_SECRET are set correctly. See https://help.aliyun.com/zh/sdk/developer-reference/configure-the-alibaba-cloud-accesskey-environment-variable-on-linux-macos-and-windows-systems for more details.",
|
|
1572
|
+
});
|
|
1573
|
+
}
|
|
1574
|
+
|
|
1575
|
+
let credentialModel = await this._credential.getCredential();
|
|
1576
|
+
let accessKeyId = credentialModel.accessKeyId;
|
|
1577
|
+
let accessKeySecret = credentialModel.accessKeySecret;
|
|
1578
|
+
let securityToken = credentialModel.securityToken;
|
|
1579
|
+
let credentialType = credentialModel.type;
|
|
1580
|
+
let openPlatformEndpoint = this._openPlatformEndpoint;
|
|
1581
|
+
if ($dara.isNull(openPlatformEndpoint) || openPlatformEndpoint == "") {
|
|
1582
|
+
openPlatformEndpoint = "openplatform.aliyuncs.com";
|
|
1583
|
+
}
|
|
1584
|
+
|
|
1585
|
+
if ($dara.isNull(credentialType)) {
|
|
1586
|
+
credentialType = "access_key";
|
|
1587
|
+
}
|
|
1588
|
+
|
|
1589
|
+
let authConfig = new $OpenApiUtil.Config({
|
|
1590
|
+
accessKeyId: accessKeyId,
|
|
1591
|
+
accessKeySecret: accessKeySecret,
|
|
1592
|
+
securityToken: securityToken,
|
|
1593
|
+
type: credentialType,
|
|
1594
|
+
endpoint: openPlatformEndpoint,
|
|
1595
|
+
protocol: this._protocol,
|
|
1596
|
+
regionId: this._regionId,
|
|
1597
|
+
});
|
|
1598
|
+
let authClient = new OpenApi(authConfig);
|
|
1599
|
+
let authRequest = {
|
|
1600
|
+
Product: "xtee",
|
|
1601
|
+
RegionId: this._regionId,
|
|
1602
|
+
};
|
|
1603
|
+
let authReq = new $OpenApiUtil.OpenApiRequest({
|
|
1604
|
+
query: OpenApiUtil.query(authRequest),
|
|
1605
|
+
});
|
|
1606
|
+
let authParams = new $OpenApiUtil.Params({
|
|
1607
|
+
action: "AuthorizeFileUpload",
|
|
1608
|
+
version: "2019-12-19",
|
|
1609
|
+
protocol: "HTTPS",
|
|
1610
|
+
pathname: "/",
|
|
1611
|
+
method: "GET",
|
|
1612
|
+
authType: "AK",
|
|
1613
|
+
style: "RPC",
|
|
1614
|
+
reqBodyType: "formData",
|
|
1615
|
+
bodyType: "json",
|
|
1616
|
+
});
|
|
1617
|
+
let authResponse : {[key: string]: any} = { };
|
|
1618
|
+
let fileObj = new $dara.FileField({ });
|
|
1619
|
+
let ossHeader : {[key: string]: any} = { };
|
|
1620
|
+
let tmpBody : {[key: string]: any} = { };
|
|
1621
|
+
let useAccelerate : boolean = false;
|
|
1622
|
+
let authResponseBody : {[key: string ]: string} = { };
|
|
1623
|
+
let createForeignPocSampleReq = new $_model.CreateForeignPocSampleRequest({ });
|
|
1624
|
+
OpenApiUtil.convert(request, createForeignPocSampleReq);
|
|
1625
|
+
if (!$dara.isNull(request.fileObject)) {
|
|
1626
|
+
authResponse = await authClient.callApi(authParams, authReq, runtime);
|
|
1627
|
+
tmpBody = authResponse["body"];
|
|
1628
|
+
useAccelerate = Boolean(tmpBody["UseAccelerate"]);
|
|
1629
|
+
authResponseBody = OpenApiUtil.stringifyMapValue(tmpBody);
|
|
1630
|
+
fileObj = new $dara.FileField({
|
|
1631
|
+
filename: authResponseBody["ObjectKey"],
|
|
1632
|
+
content: request.fileObject,
|
|
1633
|
+
contentType: "",
|
|
1634
|
+
});
|
|
1635
|
+
ossHeader = {
|
|
1636
|
+
host: OpenApiUtil.getEndpoint(authResponseBody["Endpoint"], useAccelerate, this._endpointType),
|
|
1637
|
+
OSSAccessKeyId: authResponseBody["AccessKeyId"],
|
|
1638
|
+
policy: authResponseBody["EncodedPolicy"],
|
|
1639
|
+
Signature: authResponseBody["Signature"],
|
|
1640
|
+
key: authResponseBody["ObjectKey"],
|
|
1641
|
+
file: fileObj,
|
|
1642
|
+
success_action_status: "201",
|
|
1643
|
+
};
|
|
1644
|
+
await this._postOSSObject(authResponseBody["Bucket"], ossHeader, runtime);
|
|
1645
|
+
createForeignPocSampleReq.file = `http://${authResponseBody["Bucket"]}.${authResponseBody["Endpoint"]}/${authResponseBody["ObjectKey"]}`;
|
|
1646
|
+
}
|
|
1647
|
+
|
|
1648
|
+
let createForeignPocSampleResp = await this.createForeignPocSampleWithOptions(createForeignPocSampleReq, runtime);
|
|
1649
|
+
return createForeignPocSampleResp;
|
|
1650
|
+
}
|
|
1651
|
+
|
|
1420
1652
|
/**
|
|
1421
1653
|
* Submit Task
|
|
1422
1654
|
*
|
|
@@ -17083,6 +17315,146 @@ export default class Client extends OpenApi {
|
|
|
17083
17315
|
return await this.uploadFileCheckWithOptions(request, runtime);
|
|
17084
17316
|
}
|
|
17085
17317
|
|
|
17318
|
+
/**
|
|
17319
|
+
* 上传并校验样本文件
|
|
17320
|
+
*
|
|
17321
|
+
* @param request - UploadForeignSampleFileRequest
|
|
17322
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
17323
|
+
* @returns UploadForeignSampleFileResponse
|
|
17324
|
+
*/
|
|
17325
|
+
async uploadForeignSampleFileWithOptions(request: $_model.UploadForeignSampleFileRequest, runtime: $dara.RuntimeOptions): Promise<$_model.UploadForeignSampleFileResponse> {
|
|
17326
|
+
request.validate();
|
|
17327
|
+
let query = { };
|
|
17328
|
+
if (!$dara.isNull(request.file)) {
|
|
17329
|
+
query["File"] = request.file;
|
|
17330
|
+
}
|
|
17331
|
+
|
|
17332
|
+
if (!$dara.isNull(request.lang)) {
|
|
17333
|
+
query["Lang"] = request.lang;
|
|
17334
|
+
}
|
|
17335
|
+
|
|
17336
|
+
if (!$dara.isNull(request.regId)) {
|
|
17337
|
+
query["RegId"] = request.regId;
|
|
17338
|
+
}
|
|
17339
|
+
|
|
17340
|
+
if (!$dara.isNull(request.tab)) {
|
|
17341
|
+
query["Tab"] = request.tab;
|
|
17342
|
+
}
|
|
17343
|
+
|
|
17344
|
+
let req = new $OpenApiUtil.OpenApiRequest({
|
|
17345
|
+
query: OpenApiUtil.query(query),
|
|
17346
|
+
});
|
|
17347
|
+
let params = new $OpenApiUtil.Params({
|
|
17348
|
+
action: "UploadForeignSampleFile",
|
|
17349
|
+
version: "2021-09-10",
|
|
17350
|
+
protocol: "HTTPS",
|
|
17351
|
+
pathname: "/",
|
|
17352
|
+
method: "POST",
|
|
17353
|
+
authType: "AK",
|
|
17354
|
+
style: "RPC",
|
|
17355
|
+
reqBodyType: "formData",
|
|
17356
|
+
bodyType: "json",
|
|
17357
|
+
});
|
|
17358
|
+
return $dara.cast<$_model.UploadForeignSampleFileResponse>(await this.callApi(params, req, runtime), new $_model.UploadForeignSampleFileResponse({}));
|
|
17359
|
+
}
|
|
17360
|
+
|
|
17361
|
+
/**
|
|
17362
|
+
* 上传并校验样本文件
|
|
17363
|
+
*
|
|
17364
|
+
* @param request - UploadForeignSampleFileRequest
|
|
17365
|
+
* @returns UploadForeignSampleFileResponse
|
|
17366
|
+
*/
|
|
17367
|
+
async uploadForeignSampleFile(request: $_model.UploadForeignSampleFileRequest): Promise<$_model.UploadForeignSampleFileResponse> {
|
|
17368
|
+
let runtime = new $dara.RuntimeOptions({ });
|
|
17369
|
+
return await this.uploadForeignSampleFileWithOptions(request, runtime);
|
|
17370
|
+
}
|
|
17371
|
+
|
|
17372
|
+
async uploadForeignSampleFileAdvance(request: $_model.UploadForeignSampleFileAdvanceRequest, runtime: $dara.RuntimeOptions): Promise<$_model.UploadForeignSampleFileResponse> {
|
|
17373
|
+
// Step 0: init client
|
|
17374
|
+
if ($dara.isNull(this._credential)) {
|
|
17375
|
+
throw new $OpenApi.ClientError({
|
|
17376
|
+
code: "InvalidCredentials",
|
|
17377
|
+
message: "Please set up the credentials correctly. If you are setting them through environment variables, please ensure that ALIBABA_CLOUD_ACCESS_KEY_ID and ALIBABA_CLOUD_ACCESS_KEY_SECRET are set correctly. See https://help.aliyun.com/zh/sdk/developer-reference/configure-the-alibaba-cloud-accesskey-environment-variable-on-linux-macos-and-windows-systems for more details.",
|
|
17378
|
+
});
|
|
17379
|
+
}
|
|
17380
|
+
|
|
17381
|
+
let credentialModel = await this._credential.getCredential();
|
|
17382
|
+
let accessKeyId = credentialModel.accessKeyId;
|
|
17383
|
+
let accessKeySecret = credentialModel.accessKeySecret;
|
|
17384
|
+
let securityToken = credentialModel.securityToken;
|
|
17385
|
+
let credentialType = credentialModel.type;
|
|
17386
|
+
let openPlatformEndpoint = this._openPlatformEndpoint;
|
|
17387
|
+
if ($dara.isNull(openPlatformEndpoint) || openPlatformEndpoint == "") {
|
|
17388
|
+
openPlatformEndpoint = "openplatform.aliyuncs.com";
|
|
17389
|
+
}
|
|
17390
|
+
|
|
17391
|
+
if ($dara.isNull(credentialType)) {
|
|
17392
|
+
credentialType = "access_key";
|
|
17393
|
+
}
|
|
17394
|
+
|
|
17395
|
+
let authConfig = new $OpenApiUtil.Config({
|
|
17396
|
+
accessKeyId: accessKeyId,
|
|
17397
|
+
accessKeySecret: accessKeySecret,
|
|
17398
|
+
securityToken: securityToken,
|
|
17399
|
+
type: credentialType,
|
|
17400
|
+
endpoint: openPlatformEndpoint,
|
|
17401
|
+
protocol: this._protocol,
|
|
17402
|
+
regionId: this._regionId,
|
|
17403
|
+
});
|
|
17404
|
+
let authClient = new OpenApi(authConfig);
|
|
17405
|
+
let authRequest = {
|
|
17406
|
+
Product: "xtee",
|
|
17407
|
+
RegionId: this._regionId,
|
|
17408
|
+
};
|
|
17409
|
+
let authReq = new $OpenApiUtil.OpenApiRequest({
|
|
17410
|
+
query: OpenApiUtil.query(authRequest),
|
|
17411
|
+
});
|
|
17412
|
+
let authParams = new $OpenApiUtil.Params({
|
|
17413
|
+
action: "AuthorizeFileUpload",
|
|
17414
|
+
version: "2019-12-19",
|
|
17415
|
+
protocol: "HTTPS",
|
|
17416
|
+
pathname: "/",
|
|
17417
|
+
method: "GET",
|
|
17418
|
+
authType: "AK",
|
|
17419
|
+
style: "RPC",
|
|
17420
|
+
reqBodyType: "formData",
|
|
17421
|
+
bodyType: "json",
|
|
17422
|
+
});
|
|
17423
|
+
let authResponse : {[key: string]: any} = { };
|
|
17424
|
+
let fileObj = new $dara.FileField({ });
|
|
17425
|
+
let ossHeader : {[key: string]: any} = { };
|
|
17426
|
+
let tmpBody : {[key: string]: any} = { };
|
|
17427
|
+
let useAccelerate : boolean = false;
|
|
17428
|
+
let authResponseBody : {[key: string ]: string} = { };
|
|
17429
|
+
let uploadForeignSampleFileReq = new $_model.UploadForeignSampleFileRequest({ });
|
|
17430
|
+
OpenApiUtil.convert(request, uploadForeignSampleFileReq);
|
|
17431
|
+
if (!$dara.isNull(request.fileObject)) {
|
|
17432
|
+
authResponse = await authClient.callApi(authParams, authReq, runtime);
|
|
17433
|
+
tmpBody = authResponse["body"];
|
|
17434
|
+
useAccelerate = Boolean(tmpBody["UseAccelerate"]);
|
|
17435
|
+
authResponseBody = OpenApiUtil.stringifyMapValue(tmpBody);
|
|
17436
|
+
fileObj = new $dara.FileField({
|
|
17437
|
+
filename: authResponseBody["ObjectKey"],
|
|
17438
|
+
content: request.fileObject,
|
|
17439
|
+
contentType: "",
|
|
17440
|
+
});
|
|
17441
|
+
ossHeader = {
|
|
17442
|
+
host: OpenApiUtil.getEndpoint(authResponseBody["Endpoint"], useAccelerate, this._endpointType),
|
|
17443
|
+
OSSAccessKeyId: authResponseBody["AccessKeyId"],
|
|
17444
|
+
policy: authResponseBody["EncodedPolicy"],
|
|
17445
|
+
Signature: authResponseBody["Signature"],
|
|
17446
|
+
key: authResponseBody["ObjectKey"],
|
|
17447
|
+
file: fileObj,
|
|
17448
|
+
success_action_status: "201",
|
|
17449
|
+
};
|
|
17450
|
+
await this._postOSSObject(authResponseBody["Bucket"], ossHeader, runtime);
|
|
17451
|
+
uploadForeignSampleFileReq.file = `http://${authResponseBody["Bucket"]}.${authResponseBody["Endpoint"]}/${authResponseBody["ObjectKey"]}`;
|
|
17452
|
+
}
|
|
17453
|
+
|
|
17454
|
+
let uploadForeignSampleFileResp = await this.uploadForeignSampleFileWithOptions(uploadForeignSampleFileReq, runtime);
|
|
17455
|
+
return uploadForeignSampleFileResp;
|
|
17456
|
+
}
|
|
17457
|
+
|
|
17086
17458
|
/**
|
|
17087
17459
|
* 上传并校验样本文件
|
|
17088
17460
|
*
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
// This file is auto-generated, don't edit it
|
|
2
|
+
import { Readable } from 'stream';
|
|
3
|
+
import * as $dara from '@darabonba/typescript';
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
export class CreateForeignPocSampleAdvanceRequest extends $dara.Model {
|
|
7
|
+
fileObject?: Readable;
|
|
8
|
+
/**
|
|
9
|
+
* @example
|
|
10
|
+
* zh
|
|
11
|
+
*/
|
|
12
|
+
lang?: string;
|
|
13
|
+
/**
|
|
14
|
+
* @example
|
|
15
|
+
* cn-hangzhou
|
|
16
|
+
*/
|
|
17
|
+
regId?: string;
|
|
18
|
+
/**
|
|
19
|
+
* @example
|
|
20
|
+
* nemo-test
|
|
21
|
+
*/
|
|
22
|
+
remark?: string;
|
|
23
|
+
/**
|
|
24
|
+
* @example
|
|
25
|
+
* SampleNameTest
|
|
26
|
+
*/
|
|
27
|
+
sampleName?: string;
|
|
28
|
+
/**
|
|
29
|
+
* @example
|
|
30
|
+
* FINANCE
|
|
31
|
+
*/
|
|
32
|
+
tab?: string;
|
|
33
|
+
static names(): { [key: string]: string } {
|
|
34
|
+
return {
|
|
35
|
+
fileObject: 'File',
|
|
36
|
+
lang: 'Lang',
|
|
37
|
+
regId: 'RegId',
|
|
38
|
+
remark: 'Remark',
|
|
39
|
+
sampleName: 'SampleName',
|
|
40
|
+
tab: 'Tab',
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
static types(): { [key: string]: any } {
|
|
45
|
+
return {
|
|
46
|
+
fileObject: 'Readable',
|
|
47
|
+
lang: 'string',
|
|
48
|
+
regId: 'string',
|
|
49
|
+
remark: 'string',
|
|
50
|
+
sampleName: 'string',
|
|
51
|
+
tab: 'string',
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
validate() {
|
|
56
|
+
super.validate();
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
constructor(map?: { [key: string]: any }) {
|
|
60
|
+
super(map);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// This file is auto-generated, don't edit it
|
|
2
|
+
import * as $dara from '@darabonba/typescript';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
export class CreateForeignPocSampleRequest extends $dara.Model {
|
|
6
|
+
file?: string;
|
|
7
|
+
/**
|
|
8
|
+
* @example
|
|
9
|
+
* zh
|
|
10
|
+
*/
|
|
11
|
+
lang?: string;
|
|
12
|
+
/**
|
|
13
|
+
* @example
|
|
14
|
+
* cn-hangzhou
|
|
15
|
+
*/
|
|
16
|
+
regId?: string;
|
|
17
|
+
/**
|
|
18
|
+
* @example
|
|
19
|
+
* nemo-test
|
|
20
|
+
*/
|
|
21
|
+
remark?: string;
|
|
22
|
+
/**
|
|
23
|
+
* @example
|
|
24
|
+
* SampleNameTest
|
|
25
|
+
*/
|
|
26
|
+
sampleName?: string;
|
|
27
|
+
/**
|
|
28
|
+
* @example
|
|
29
|
+
* FINANCE
|
|
30
|
+
*/
|
|
31
|
+
tab?: string;
|
|
32
|
+
static names(): { [key: string]: string } {
|
|
33
|
+
return {
|
|
34
|
+
file: 'File',
|
|
35
|
+
lang: 'Lang',
|
|
36
|
+
regId: 'RegId',
|
|
37
|
+
remark: 'Remark',
|
|
38
|
+
sampleName: 'SampleName',
|
|
39
|
+
tab: 'Tab',
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
static types(): { [key: string]: any } {
|
|
44
|
+
return {
|
|
45
|
+
file: 'string',
|
|
46
|
+
lang: 'string',
|
|
47
|
+
regId: 'string',
|
|
48
|
+
remark: 'string',
|
|
49
|
+
sampleName: 'string',
|
|
50
|
+
tab: 'string',
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
validate() {
|
|
55
|
+
super.validate();
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
constructor(map?: { [key: string]: any }) {
|
|
59
|
+
super(map);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// This file is auto-generated, don't edit it
|
|
2
|
+
import * as $dara from '@darabonba/typescript';
|
|
3
|
+
import { CreateForeignPocSampleResponseBody } from "./CreateForeignPocSampleResponseBody";
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
export class CreateForeignPocSampleResponse extends $dara.Model {
|
|
7
|
+
headers?: { [key: string]: string };
|
|
8
|
+
statusCode?: number;
|
|
9
|
+
body?: CreateForeignPocSampleResponseBody;
|
|
10
|
+
static names(): { [key: string]: string } {
|
|
11
|
+
return {
|
|
12
|
+
headers: 'headers',
|
|
13
|
+
statusCode: 'statusCode',
|
|
14
|
+
body: 'body',
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
static types(): { [key: string]: any } {
|
|
19
|
+
return {
|
|
20
|
+
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
21
|
+
statusCode: 'number',
|
|
22
|
+
body: CreateForeignPocSampleResponseBody,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
validate() {
|
|
27
|
+
if(this.headers) {
|
|
28
|
+
$dara.Model.validateMap(this.headers);
|
|
29
|
+
}
|
|
30
|
+
if(this.body && typeof (this.body as any).validate === 'function') {
|
|
31
|
+
(this.body as any).validate();
|
|
32
|
+
}
|
|
33
|
+
super.validate();
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
constructor(map?: { [key: string]: any }) {
|
|
37
|
+
super(map);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
// This file is auto-generated, don't edit it
|
|
2
|
+
import * as $dara from '@darabonba/typescript';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
export class CreateForeignPocSampleResponseBodyResultObject extends $dara.Model {
|
|
6
|
+
/**
|
|
7
|
+
* @example
|
|
8
|
+
* true
|
|
9
|
+
*/
|
|
10
|
+
hasWarnings?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* @example
|
|
13
|
+
* 174
|
|
14
|
+
*/
|
|
15
|
+
sampleId?: number;
|
|
16
|
+
/**
|
|
17
|
+
* @example
|
|
18
|
+
* SampleNameTest
|
|
19
|
+
*/
|
|
20
|
+
sampleName?: string;
|
|
21
|
+
/**
|
|
22
|
+
* @example
|
|
23
|
+
* FINANCE
|
|
24
|
+
*/
|
|
25
|
+
tab?: string;
|
|
26
|
+
/**
|
|
27
|
+
* @example
|
|
28
|
+
* test
|
|
29
|
+
*/
|
|
30
|
+
warningMessage?: string;
|
|
31
|
+
static names(): { [key: string]: string } {
|
|
32
|
+
return {
|
|
33
|
+
hasWarnings: 'HasWarnings',
|
|
34
|
+
sampleId: 'SampleId',
|
|
35
|
+
sampleName: 'SampleName',
|
|
36
|
+
tab: 'Tab',
|
|
37
|
+
warningMessage: 'WarningMessage',
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
static types(): { [key: string]: any } {
|
|
42
|
+
return {
|
|
43
|
+
hasWarnings: 'boolean',
|
|
44
|
+
sampleId: 'number',
|
|
45
|
+
sampleName: 'string',
|
|
46
|
+
tab: 'string',
|
|
47
|
+
warningMessage: 'string',
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
validate() {
|
|
52
|
+
super.validate();
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
constructor(map?: { [key: string]: any }) {
|
|
56
|
+
super(map);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export class CreateForeignPocSampleResponseBody extends $dara.Model {
|
|
61
|
+
/**
|
|
62
|
+
* @example
|
|
63
|
+
* 200
|
|
64
|
+
*/
|
|
65
|
+
code?: string;
|
|
66
|
+
/**
|
|
67
|
+
* @example
|
|
68
|
+
* 200
|
|
69
|
+
*/
|
|
70
|
+
httpStatusCode?: string;
|
|
71
|
+
/**
|
|
72
|
+
* @example
|
|
73
|
+
* success
|
|
74
|
+
*/
|
|
75
|
+
message?: string;
|
|
76
|
+
/**
|
|
77
|
+
* @example
|
|
78
|
+
* A32FE941-35F2-5378-B37C-4B8FDB16F094
|
|
79
|
+
*/
|
|
80
|
+
requestId?: string;
|
|
81
|
+
resultObject?: CreateForeignPocSampleResponseBodyResultObject;
|
|
82
|
+
static names(): { [key: string]: string } {
|
|
83
|
+
return {
|
|
84
|
+
code: 'Code',
|
|
85
|
+
httpStatusCode: 'HttpStatusCode',
|
|
86
|
+
message: 'Message',
|
|
87
|
+
requestId: 'RequestId',
|
|
88
|
+
resultObject: 'ResultObject',
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
static types(): { [key: string]: any } {
|
|
93
|
+
return {
|
|
94
|
+
code: 'string',
|
|
95
|
+
httpStatusCode: 'string',
|
|
96
|
+
message: 'string',
|
|
97
|
+
requestId: 'string',
|
|
98
|
+
resultObject: CreateForeignPocSampleResponseBodyResultObject,
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
validate() {
|
|
103
|
+
if(this.resultObject && typeof (this.resultObject as any).validate === 'function') {
|
|
104
|
+
(this.resultObject as any).validate();
|
|
105
|
+
}
|
|
106
|
+
super.validate();
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
constructor(map?: { [key: string]: any }) {
|
|
110
|
+
super(map);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
@@ -67,6 +67,13 @@ export class DescribeRequestHitResponseBodyResultObjectRuleHitRecords extends $d
|
|
|
67
67
|
* RUNNING
|
|
68
68
|
*/
|
|
69
69
|
ruleStatus?: string;
|
|
70
|
+
/**
|
|
71
|
+
* @remarks
|
|
72
|
+
* Rule Type
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* DEFAULT
|
|
76
|
+
*/
|
|
70
77
|
ruleType?: string;
|
|
71
78
|
static names(): { [key: string]: string } {
|
|
72
79
|
return {
|