@antchain/antdigital-benchtwo 1.0.3

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.
@@ -0,0 +1,302 @@
1
+ import * as $Util from '@alicloud/tea-util';
2
+ import * as $tea from '@alicloud/tea-typescript';
3
+ /**
4
+ * @remarks
5
+ * Model for initing client
6
+ */
7
+ export declare class Config extends $tea.Model {
8
+ /**
9
+ * @remarks
10
+ * accesskey id
11
+ */
12
+ accessKeyId?: string;
13
+ /**
14
+ * @remarks
15
+ * accesskey secret
16
+ */
17
+ accessKeySecret?: string;
18
+ /**
19
+ * @remarks
20
+ * security token
21
+ */
22
+ securityToken?: string;
23
+ /**
24
+ * @remarks
25
+ * http protocol
26
+ *
27
+ * @example
28
+ * http
29
+ */
30
+ protocol?: string;
31
+ /**
32
+ * @remarks
33
+ * read timeout
34
+ *
35
+ * @example
36
+ * 10
37
+ */
38
+ readTimeout?: number;
39
+ /**
40
+ * @remarks
41
+ * connect timeout
42
+ *
43
+ * @example
44
+ * 10
45
+ */
46
+ connectTimeout?: number;
47
+ /**
48
+ * @remarks
49
+ * http proxy
50
+ *
51
+ * @example
52
+ * http://localhost
53
+ */
54
+ httpProxy?: string;
55
+ /**
56
+ * @remarks
57
+ * https proxy
58
+ *
59
+ * @example
60
+ * https://localhost
61
+ */
62
+ httpsProxy?: string;
63
+ /**
64
+ * @remarks
65
+ * endpoint
66
+ *
67
+ * @example
68
+ * cs.aliyuncs.com
69
+ */
70
+ endpoint?: string;
71
+ /**
72
+ * @remarks
73
+ * proxy white list
74
+ *
75
+ * @example
76
+ * http://localhost
77
+ */
78
+ noProxy?: string;
79
+ /**
80
+ * @remarks
81
+ * max idle conns
82
+ *
83
+ * @example
84
+ * 3
85
+ */
86
+ maxIdleConns?: number;
87
+ /**
88
+ * @remarks
89
+ * user agent
90
+ *
91
+ * @example
92
+ * Alibabacloud/1
93
+ */
94
+ userAgent?: string;
95
+ /**
96
+ * @remarks
97
+ * socks5 proxy
98
+ */
99
+ socks5Proxy?: string;
100
+ /**
101
+ * @remarks
102
+ * socks5 network
103
+ *
104
+ * @example
105
+ * TCP
106
+ */
107
+ socks5NetWork?: string;
108
+ /**
109
+ * @remarks
110
+ * 长链接最大空闲时长
111
+ */
112
+ maxIdleTimeMillis?: number;
113
+ /**
114
+ * @remarks
115
+ * 长链接最大连接时长
116
+ */
117
+ keepAliveDurationMillis?: number;
118
+ /**
119
+ * @remarks
120
+ * 最大连接数(长链接最大总数)
121
+ */
122
+ maxRequests?: number;
123
+ /**
124
+ * @remarks
125
+ * 每个目标主机的最大连接数(分主机域名的长链接最大总数
126
+ */
127
+ maxRequestsPerHost?: number;
128
+ static names(): {
129
+ [key: string]: string;
130
+ };
131
+ static types(): {
132
+ [key: string]: any;
133
+ };
134
+ constructor(map?: {
135
+ [key: string]: any;
136
+ });
137
+ }
138
+ export declare class OrderItemInfo extends $tea.Model {
139
+ /**
140
+ * @example
141
+ * SKU001
142
+ */
143
+ itemId: string;
144
+ /**
145
+ * @example
146
+ * 2
147
+ */
148
+ quantity: number;
149
+ static names(): {
150
+ [key: string]: string;
151
+ };
152
+ static types(): {
153
+ [key: string]: any;
154
+ };
155
+ constructor(map?: {
156
+ [key: string]: any;
157
+ });
158
+ }
159
+ export declare class Message extends $tea.Model {
160
+ /**
161
+ * @example
162
+ * 张三
163
+ */
164
+ name: string;
165
+ /**
166
+ * @example
167
+ * 18
168
+ */
169
+ age: number;
170
+ static names(): {
171
+ [key: string]: string;
172
+ };
173
+ static types(): {
174
+ [key: string]: any;
175
+ };
176
+ constructor(map?: {
177
+ [key: string]: any;
178
+ });
179
+ }
180
+ export declare class PayOrderOpenApiResult extends $tea.Model {
181
+ /**
182
+ * @example
183
+ * 11
184
+ */
185
+ test: string;
186
+ static names(): {
187
+ [key: string]: string;
188
+ };
189
+ static types(): {
190
+ [key: string]: any;
191
+ };
192
+ constructor(map?: {
193
+ [key: string]: any;
194
+ });
195
+ }
196
+ export declare class AA extends $tea.Model {
197
+ /**
198
+ * @example
199
+ * bb
200
+ */
201
+ aa: string;
202
+ static names(): {
203
+ [key: string]: string;
204
+ };
205
+ static types(): {
206
+ [key: string]: any;
207
+ };
208
+ constructor(map?: {
209
+ [key: string]: any;
210
+ });
211
+ }
212
+ export declare class TestAntchainDemotmtWorkbenchCreateRequest extends $tea.Model {
213
+ authToken?: string;
214
+ productInstanceId?: string;
215
+ timeout?: string;
216
+ static names(): {
217
+ [key: string]: string;
218
+ };
219
+ static types(): {
220
+ [key: string]: any;
221
+ };
222
+ constructor(map?: {
223
+ [key: string]: any;
224
+ });
225
+ }
226
+ export declare class TestAntchainDemotmtWorkbenchCreateResponse extends $tea.Model {
227
+ reqMsgId?: string;
228
+ resultCode?: string;
229
+ resultMsg?: string;
230
+ stauts?: string;
231
+ msg?: string;
232
+ static names(): {
233
+ [key: string]: string;
234
+ };
235
+ static types(): {
236
+ [key: string]: any;
237
+ };
238
+ constructor(map?: {
239
+ [key: string]: any;
240
+ });
241
+ }
242
+ export default class Client {
243
+ _endpoint: string;
244
+ _regionId: string;
245
+ _accessKeyId: string;
246
+ _accessKeySecret: string;
247
+ _protocol: string;
248
+ _userAgent: string;
249
+ _readTimeout: number;
250
+ _connectTimeout: number;
251
+ _httpProxy: string;
252
+ _httpsProxy: string;
253
+ _socks5Proxy: string;
254
+ _socks5NetWork: string;
255
+ _noProxy: string;
256
+ _maxIdleConns: number;
257
+ _securityToken: string;
258
+ _maxIdleTimeMillis: number;
259
+ _keepAliveDurationMillis: number;
260
+ _maxRequests: number;
261
+ _maxRequestsPerHost: number;
262
+ /**
263
+ * @remarks
264
+ * Init client with Config
265
+ *
266
+ * @param config - config contains the necessary information to create a client
267
+ */
268
+ constructor(config: Config);
269
+ /**
270
+ * @remarks
271
+ * Encapsulate the request and invoke the network
272
+ *
273
+ * @param action - api name
274
+ * @param protocol - http or https
275
+ * @param method - e.g. GET
276
+ * @param pathname - pathname of every api
277
+ * @param request - which contains request params
278
+ * @param runtime - which controls some details of call api, such as retry times
279
+ * @returns the response
280
+ */
281
+ doRequest(version: string, action: string, protocol: string, method: string, pathname: string, request: {
282
+ [key: string]: any;
283
+ }, headers: {
284
+ [key: string]: string;
285
+ }, runtime: $Util.RuntimeOptions): Promise<{
286
+ [key: string]: any;
287
+ }>;
288
+ /**
289
+ * @remarks
290
+ * Description: 测试使用
291
+ * Summary: 测试使用
292
+ */
293
+ testAntchainDemotmtWorkbenchCreate(request: TestAntchainDemotmtWorkbenchCreateRequest): Promise<TestAntchainDemotmtWorkbenchCreateResponse>;
294
+ /**
295
+ * @remarks
296
+ * Description: 测试使用
297
+ * Summary: 测试使用
298
+ */
299
+ testAntchainDemotmtWorkbenchCreateEx(request: TestAntchainDemotmtWorkbenchCreateRequest, headers: {
300
+ [key: string]: string;
301
+ }, runtime: $Util.RuntimeOptions): Promise<TestAntchainDemotmtWorkbenchCreateResponse>;
302
+ }
package/dist/client.js ADDED
@@ -0,0 +1,351 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
21
+ var __importDefault = (this && this.__importDefault) || function (mod) {
22
+ return (mod && mod.__esModule) ? mod : { "default": mod };
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.TestAntchainDemotmtWorkbenchCreateResponse = exports.TestAntchainDemotmtWorkbenchCreateRequest = exports.AA = exports.PayOrderOpenApiResult = exports.Message = exports.OrderItemInfo = exports.Config = void 0;
26
+ // This file is auto-generated, don't edit it
27
+ const alipay_util_1 = __importDefault(require("@antchain/alipay-util"));
28
+ const tea_util_1 = __importStar(require("@alicloud/tea-util")), $Util = tea_util_1;
29
+ const rpc_util_1 = __importDefault(require("@alicloud/rpc-util"));
30
+ const $tea = __importStar(require("@alicloud/tea-typescript"));
31
+ /**
32
+ * @remarks
33
+ * Model for initing client
34
+ */
35
+ class Config extends $tea.Model {
36
+ constructor(map) {
37
+ super(map);
38
+ }
39
+ static names() {
40
+ return {
41
+ accessKeyId: 'accessKeyId',
42
+ accessKeySecret: 'accessKeySecret',
43
+ securityToken: 'securityToken',
44
+ protocol: 'protocol',
45
+ readTimeout: 'readTimeout',
46
+ connectTimeout: 'connectTimeout',
47
+ httpProxy: 'httpProxy',
48
+ httpsProxy: 'httpsProxy',
49
+ endpoint: 'endpoint',
50
+ noProxy: 'noProxy',
51
+ maxIdleConns: 'maxIdleConns',
52
+ userAgent: 'userAgent',
53
+ socks5Proxy: 'socks5Proxy',
54
+ socks5NetWork: 'socks5NetWork',
55
+ maxIdleTimeMillis: 'maxIdleTimeMillis',
56
+ keepAliveDurationMillis: 'keepAliveDurationMillis',
57
+ maxRequests: 'maxRequests',
58
+ maxRequestsPerHost: 'maxRequestsPerHost',
59
+ };
60
+ }
61
+ static types() {
62
+ return {
63
+ accessKeyId: 'string',
64
+ accessKeySecret: 'string',
65
+ securityToken: 'string',
66
+ protocol: 'string',
67
+ readTimeout: 'number',
68
+ connectTimeout: 'number',
69
+ httpProxy: 'string',
70
+ httpsProxy: 'string',
71
+ endpoint: 'string',
72
+ noProxy: 'string',
73
+ maxIdleConns: 'number',
74
+ userAgent: 'string',
75
+ socks5Proxy: 'string',
76
+ socks5NetWork: 'string',
77
+ maxIdleTimeMillis: 'number',
78
+ keepAliveDurationMillis: 'number',
79
+ maxRequests: 'number',
80
+ maxRequestsPerHost: 'number',
81
+ };
82
+ }
83
+ }
84
+ exports.Config = Config;
85
+ // OrderItemInfo
86
+ class OrderItemInfo extends $tea.Model {
87
+ constructor(map) {
88
+ super(map);
89
+ }
90
+ static names() {
91
+ return {
92
+ itemId: 'item_id',
93
+ quantity: 'quantity',
94
+ };
95
+ }
96
+ static types() {
97
+ return {
98
+ itemId: 'string',
99
+ quantity: 'number',
100
+ };
101
+ }
102
+ }
103
+ exports.OrderItemInfo = OrderItemInfo;
104
+ // 基本信息
105
+ class Message extends $tea.Model {
106
+ constructor(map) {
107
+ super(map);
108
+ }
109
+ static names() {
110
+ return {
111
+ name: 'name',
112
+ age: 'age',
113
+ };
114
+ }
115
+ static types() {
116
+ return {
117
+ name: 'string',
118
+ age: 'number',
119
+ };
120
+ }
121
+ }
122
+ exports.Message = Message;
123
+ // 测试
124
+ class PayOrderOpenApiResult extends $tea.Model {
125
+ constructor(map) {
126
+ super(map);
127
+ }
128
+ static names() {
129
+ return {
130
+ test: 'test',
131
+ };
132
+ }
133
+ static types() {
134
+ return {
135
+ test: 'string',
136
+ };
137
+ }
138
+ }
139
+ exports.PayOrderOpenApiResult = PayOrderOpenApiResult;
140
+ // aaa
141
+ class AA extends $tea.Model {
142
+ constructor(map) {
143
+ super(map);
144
+ }
145
+ static names() {
146
+ return {
147
+ aa: 'aa',
148
+ };
149
+ }
150
+ static types() {
151
+ return {
152
+ aa: 'string',
153
+ };
154
+ }
155
+ }
156
+ exports.AA = AA;
157
+ class TestAntchainDemotmtWorkbenchCreateRequest extends $tea.Model {
158
+ constructor(map) {
159
+ super(map);
160
+ }
161
+ static names() {
162
+ return {
163
+ authToken: 'auth_token',
164
+ productInstanceId: 'product_instance_id',
165
+ timeout: 'timeout',
166
+ };
167
+ }
168
+ static types() {
169
+ return {
170
+ authToken: 'string',
171
+ productInstanceId: 'string',
172
+ timeout: 'string',
173
+ };
174
+ }
175
+ }
176
+ exports.TestAntchainDemotmtWorkbenchCreateRequest = TestAntchainDemotmtWorkbenchCreateRequest;
177
+ class TestAntchainDemotmtWorkbenchCreateResponse extends $tea.Model {
178
+ constructor(map) {
179
+ super(map);
180
+ }
181
+ static names() {
182
+ return {
183
+ reqMsgId: 'req_msg_id',
184
+ resultCode: 'result_code',
185
+ resultMsg: 'result_msg',
186
+ stauts: 'stauts',
187
+ msg: 'msg',
188
+ };
189
+ }
190
+ static types() {
191
+ return {
192
+ reqMsgId: 'string',
193
+ resultCode: 'string',
194
+ resultMsg: 'string',
195
+ stauts: 'string',
196
+ msg: 'string',
197
+ };
198
+ }
199
+ }
200
+ exports.TestAntchainDemotmtWorkbenchCreateResponse = TestAntchainDemotmtWorkbenchCreateResponse;
201
+ class Client {
202
+ /**
203
+ * @remarks
204
+ * Init client with Config
205
+ *
206
+ * @param config - config contains the necessary information to create a client
207
+ */
208
+ constructor(config) {
209
+ if (tea_util_1.default.isUnset(config)) {
210
+ throw $tea.newError({
211
+ code: "ParameterMissing",
212
+ message: "'config' can not be unset",
213
+ });
214
+ }
215
+ this._accessKeyId = config.accessKeyId;
216
+ this._accessKeySecret = config.accessKeySecret;
217
+ this._securityToken = config.securityToken;
218
+ this._endpoint = config.endpoint;
219
+ this._protocol = config.protocol;
220
+ this._userAgent = config.userAgent;
221
+ this._readTimeout = tea_util_1.default.defaultNumber(config.readTimeout, 20000);
222
+ this._connectTimeout = tea_util_1.default.defaultNumber(config.connectTimeout, 20000);
223
+ this._httpProxy = config.httpProxy;
224
+ this._httpsProxy = config.httpsProxy;
225
+ this._noProxy = config.noProxy;
226
+ this._socks5Proxy = config.socks5Proxy;
227
+ this._socks5NetWork = config.socks5NetWork;
228
+ this._maxIdleConns = tea_util_1.default.defaultNumber(config.maxIdleConns, 60000);
229
+ this._maxIdleTimeMillis = tea_util_1.default.defaultNumber(config.maxIdleTimeMillis, 5);
230
+ this._keepAliveDurationMillis = tea_util_1.default.defaultNumber(config.keepAliveDurationMillis, 5000);
231
+ this._maxRequests = tea_util_1.default.defaultNumber(config.maxRequests, 100);
232
+ this._maxRequestsPerHost = tea_util_1.default.defaultNumber(config.maxRequestsPerHost, 100);
233
+ }
234
+ /**
235
+ * @remarks
236
+ * Encapsulate the request and invoke the network
237
+ *
238
+ * @param action - api name
239
+ * @param protocol - http or https
240
+ * @param method - e.g. GET
241
+ * @param pathname - pathname of every api
242
+ * @param request - which contains request params
243
+ * @param runtime - which controls some details of call api, such as retry times
244
+ * @returns the response
245
+ */
246
+ async doRequest(version, action, protocol, method, pathname, request, headers, runtime) {
247
+ let _runtime = {
248
+ timeouted: "retry",
249
+ readTimeout: tea_util_1.default.defaultNumber(runtime.readTimeout, this._readTimeout),
250
+ connectTimeout: tea_util_1.default.defaultNumber(runtime.connectTimeout, this._connectTimeout),
251
+ httpProxy: tea_util_1.default.defaultString(runtime.httpProxy, this._httpProxy),
252
+ httpsProxy: tea_util_1.default.defaultString(runtime.httpsProxy, this._httpsProxy),
253
+ noProxy: tea_util_1.default.defaultString(runtime.noProxy, this._noProxy),
254
+ maxIdleConns: tea_util_1.default.defaultNumber(runtime.maxIdleConns, this._maxIdleConns),
255
+ maxIdleTimeMillis: this._maxIdleTimeMillis,
256
+ keepAliveDuration: this._keepAliveDurationMillis,
257
+ maxRequests: this._maxRequests,
258
+ maxRequestsPerHost: this._maxRequestsPerHost,
259
+ retry: {
260
+ retryable: runtime.autoretry,
261
+ maxAttempts: tea_util_1.default.defaultNumber(runtime.maxAttempts, 3),
262
+ },
263
+ backoff: {
264
+ policy: tea_util_1.default.defaultString(runtime.backoffPolicy, "no"),
265
+ period: tea_util_1.default.defaultNumber(runtime.backoffPeriod, 1),
266
+ },
267
+ ignoreSSL: runtime.ignoreSSL,
268
+ };
269
+ let _lastRequest = null;
270
+ let _now = Date.now();
271
+ let _retryTimes = 0;
272
+ while ($tea.allowRetry(_runtime['retry'], _retryTimes, _now)) {
273
+ if (_retryTimes > 0) {
274
+ let _backoffTime = $tea.getBackoffTime(_runtime['backoff'], _retryTimes);
275
+ if (_backoffTime > 0) {
276
+ await $tea.sleep(_backoffTime);
277
+ }
278
+ }
279
+ _retryTimes = _retryTimes + 1;
280
+ try {
281
+ let request_ = new $tea.Request();
282
+ request_.protocol = tea_util_1.default.defaultString(this._protocol, protocol);
283
+ request_.method = method;
284
+ request_.pathname = pathname;
285
+ request_.query = {
286
+ method: action,
287
+ version: version,
288
+ sign_type: "HmacSHA1",
289
+ req_time: alipay_util_1.default.getTimestamp(),
290
+ req_msg_id: alipay_util_1.default.getNonce(),
291
+ access_key: this._accessKeyId,
292
+ base_sdk_version: "TeaSDK-2.0",
293
+ sdk_version: "1.0.3",
294
+ _prod_code: "BENCHTWO",
295
+ _prod_channel: "default",
296
+ };
297
+ if (!tea_util_1.default.empty(this._securityToken)) {
298
+ request_.query["security_token"] = this._securityToken;
299
+ }
300
+ request_.headers = Object.assign({ host: tea_util_1.default.defaultString(this._endpoint, "openapi.antchain.antgroup.com"), 'user-agent': tea_util_1.default.getUserAgent(this._userAgent) }, headers);
301
+ let tmp = tea_util_1.default.anyifyMapValue(rpc_util_1.default.query(request));
302
+ request_.body = new $tea.BytesReadable(tea_util_1.default.toFormString(tmp));
303
+ request_.headers["content-type"] = "application/x-www-form-urlencoded";
304
+ let signedParam = Object.assign(Object.assign({}, request_.query), rpc_util_1.default.query(request));
305
+ request_.query["sign"] = alipay_util_1.default.getSignature(signedParam, this._accessKeySecret);
306
+ _lastRequest = request_;
307
+ let response_ = await $tea.doAction(request_, _runtime);
308
+ let raw = await tea_util_1.default.readAsString(response_.body);
309
+ let obj = tea_util_1.default.parseJSON(raw);
310
+ let res = tea_util_1.default.assertAsMap(obj);
311
+ let resp = tea_util_1.default.assertAsMap(res["response"]);
312
+ if (alipay_util_1.default.hasError(raw, this._accessKeySecret)) {
313
+ throw $tea.newError({
314
+ message: resp["result_msg"],
315
+ data: resp,
316
+ code: resp["result_code"],
317
+ });
318
+ }
319
+ return resp;
320
+ }
321
+ catch (ex) {
322
+ if ($tea.isRetryable(ex)) {
323
+ continue;
324
+ }
325
+ throw ex;
326
+ }
327
+ }
328
+ throw $tea.newUnretryableError(_lastRequest);
329
+ }
330
+ /**
331
+ * @remarks
332
+ * Description: 测试使用
333
+ * Summary: 测试使用
334
+ */
335
+ async testAntchainDemotmtWorkbenchCreate(request) {
336
+ let runtime = new $Util.RuntimeOptions({});
337
+ let headers = {};
338
+ return await this.testAntchainDemotmtWorkbenchCreateEx(request, headers, runtime);
339
+ }
340
+ /**
341
+ * @remarks
342
+ * Description: 测试使用
343
+ * Summary: 测试使用
344
+ */
345
+ async testAntchainDemotmtWorkbenchCreateEx(request, headers, runtime) {
346
+ tea_util_1.default.validateModel(request);
347
+ return $tea.cast(await this.doRequest("1.0", "antchain.demotmt.workbench.create.test", "HTTPS", "POST", `/gateway.do`, $tea.toMap(request), headers, runtime), new TestAntchainDemotmtWorkbenchCreateResponse({}));
348
+ }
349
+ }
350
+ exports.default = Client;
351
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA6C;AAC7C,wEAAiD;AACjD,mFAAkD;AAClD,kEAAyC;AACzC,+DAAiD;AAEjD;;;GAGG;AACH,MAAa,MAAO,SAAQ,IAAI,CAAC,KAAK;IAuKpC,YAAY,GAA4B;QACtC,KAAK,CAAC,GAAG,CAAC,CAAC;IACb,CAAC;IAhDD,MAAM,CAAC,KAAK;QACV,OAAO;YACL,WAAW,EAAE,aAAa;YAC1B,eAAe,EAAE,iBAAiB;YAClC,aAAa,EAAE,eAAe;YAC9B,QAAQ,EAAE,UAAU;YACpB,WAAW,EAAE,aAAa;YAC1B,cAAc,EAAE,gBAAgB;YAChC,SAAS,EAAE,WAAW;YACtB,UAAU,EAAE,YAAY;YACxB,QAAQ,EAAE,UAAU;YACpB,OAAO,EAAE,SAA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AAE;oBACxB,SAAS;iBACV;gBACD,MAAM,EAAE,CAAC;aACV;SACF;QAED,MAAM,IAAI,CAAC,mBAAmB,CAAC,YAAY,CAAC,CAAC;IAC/C,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,kCAAkC,CAAC,OAAkD;QACzF,IAAI,OAAO,GAAG,IAAI,KAAK,CAAC,cAAc,CAAC,EAAG,CAAC,CAAC;QAC5C,IAAI,OAAO,GAA8B,EAAG,CAAC;QAC7C,OAAO,MAAM,IAAI,CAAC,oCAAoC,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IACpF,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,oCAAoC,CAAC,OAAkD,EAAE,OAAiC,EAAE,OAA6B;QAC7J,kBAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QAC5B,OAAO,IAAI,CAAC,IAAI,CAA6C,MAAM,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,wCAAwC,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,IAAI,0CAA0C,CAAC,EAAE,CAAC,CAAC,CAAC;IACjQ,CAAC;CAEF;AAzLD,yBAyLC"}
package/package.json ADDED
@@ -0,0 +1,32 @@
1
+ {
2
+ "license":"Apache-2.0",
3
+ "devDependencies":{
4
+ "source-map-support":"^0.5.16",
5
+ "@types/node":"^12.12.26",
6
+ "@types/ms":"0.7.31",
7
+ "nyc":"^15.0.0",
8
+ "typescript":"^3.7.5",
9
+ "ts-node":"^8.6.2"
10
+ },
11
+ "author":"",
12
+ "name":"@antchain/antdigital-benchtwo",
13
+ "description":"",
14
+ "files":[
15
+ "dist",
16
+ "src"
17
+ ],
18
+ "main":"dist/client.js",
19
+ "scripts":{
20
+ "test":"mocha --reporter spec --timeout 3000 test/*.test.js",
21
+ "build":"tsc",
22
+ "prepublishOnly":"tsc",
23
+ "test-cov":"nyc -e .ts -r=html -r=text -r=lcov npm run test"
24
+ },
25
+ "version":"1.0.3",
26
+ "dependencies":{
27
+ "@alicloud/rpc-util":"^0.1.0",
28
+ "@antchain/alipay-util":"^1.0.4",
29
+ "@alicloud/tea-typescript":"^1.7.1",
30
+ "@alicloud/tea-util":"^1.4.11"
31
+ }
32
+ }
package/src/client.ts ADDED
@@ -0,0 +1,548 @@
1
+ // This file is auto-generated, don't edit it
2
+ import AntchainUtil from '@antchain/alipay-util';
3
+ import Util, * as $Util from '@alicloud/tea-util';
4
+ import RPCUtil from '@alicloud/rpc-util';
5
+ import * as $tea from '@alicloud/tea-typescript';
6
+
7
+ /**
8
+ * @remarks
9
+ * Model for initing client
10
+ */
11
+ export class Config extends $tea.Model {
12
+ /**
13
+ * @remarks
14
+ * accesskey id
15
+ */
16
+ accessKeyId?: string;
17
+ /**
18
+ * @remarks
19
+ * accesskey secret
20
+ */
21
+ accessKeySecret?: string;
22
+ /**
23
+ * @remarks
24
+ * security token
25
+ */
26
+ securityToken?: string;
27
+ /**
28
+ * @remarks
29
+ * http protocol
30
+ *
31
+ * @example
32
+ * http
33
+ */
34
+ protocol?: string;
35
+ /**
36
+ * @remarks
37
+ * read timeout
38
+ *
39
+ * @example
40
+ * 10
41
+ */
42
+ readTimeout?: number;
43
+ /**
44
+ * @remarks
45
+ * connect timeout
46
+ *
47
+ * @example
48
+ * 10
49
+ */
50
+ connectTimeout?: number;
51
+ /**
52
+ * @remarks
53
+ * http proxy
54
+ *
55
+ * @example
56
+ * http://localhost
57
+ */
58
+ httpProxy?: string;
59
+ /**
60
+ * @remarks
61
+ * https proxy
62
+ *
63
+ * @example
64
+ * https://localhost
65
+ */
66
+ httpsProxy?: string;
67
+ /**
68
+ * @remarks
69
+ * endpoint
70
+ *
71
+ * @example
72
+ * cs.aliyuncs.com
73
+ */
74
+ endpoint?: string;
75
+ /**
76
+ * @remarks
77
+ * proxy white list
78
+ *
79
+ * @example
80
+ * http://localhost
81
+ */
82
+ noProxy?: string;
83
+ /**
84
+ * @remarks
85
+ * max idle conns
86
+ *
87
+ * @example
88
+ * 3
89
+ */
90
+ maxIdleConns?: number;
91
+ /**
92
+ * @remarks
93
+ * user agent
94
+ *
95
+ * @example
96
+ * Alibabacloud/1
97
+ */
98
+ userAgent?: string;
99
+ /**
100
+ * @remarks
101
+ * socks5 proxy
102
+ */
103
+ socks5Proxy?: string;
104
+ /**
105
+ * @remarks
106
+ * socks5 network
107
+ *
108
+ * @example
109
+ * TCP
110
+ */
111
+ socks5NetWork?: string;
112
+ /**
113
+ * @remarks
114
+ * 长链接最大空闲时长
115
+ */
116
+ maxIdleTimeMillis?: number;
117
+ /**
118
+ * @remarks
119
+ * 长链接最大连接时长
120
+ */
121
+ keepAliveDurationMillis?: number;
122
+ /**
123
+ * @remarks
124
+ * 最大连接数(长链接最大总数)
125
+ */
126
+ maxRequests?: number;
127
+ /**
128
+ * @remarks
129
+ * 每个目标主机的最大连接数(分主机域名的长链接最大总数
130
+ */
131
+ maxRequestsPerHost?: number;
132
+ static names(): { [key: string]: string } {
133
+ return {
134
+ accessKeyId: 'accessKeyId',
135
+ accessKeySecret: 'accessKeySecret',
136
+ securityToken: 'securityToken',
137
+ protocol: 'protocol',
138
+ readTimeout: 'readTimeout',
139
+ connectTimeout: 'connectTimeout',
140
+ httpProxy: 'httpProxy',
141
+ httpsProxy: 'httpsProxy',
142
+ endpoint: 'endpoint',
143
+ noProxy: 'noProxy',
144
+ maxIdleConns: 'maxIdleConns',
145
+ userAgent: 'userAgent',
146
+ socks5Proxy: 'socks5Proxy',
147
+ socks5NetWork: 'socks5NetWork',
148
+ maxIdleTimeMillis: 'maxIdleTimeMillis',
149
+ keepAliveDurationMillis: 'keepAliveDurationMillis',
150
+ maxRequests: 'maxRequests',
151
+ maxRequestsPerHost: 'maxRequestsPerHost',
152
+ };
153
+ }
154
+
155
+ static types(): { [key: string]: any } {
156
+ return {
157
+ accessKeyId: 'string',
158
+ accessKeySecret: 'string',
159
+ securityToken: 'string',
160
+ protocol: 'string',
161
+ readTimeout: 'number',
162
+ connectTimeout: 'number',
163
+ httpProxy: 'string',
164
+ httpsProxy: 'string',
165
+ endpoint: 'string',
166
+ noProxy: 'string',
167
+ maxIdleConns: 'number',
168
+ userAgent: 'string',
169
+ socks5Proxy: 'string',
170
+ socks5NetWork: 'string',
171
+ maxIdleTimeMillis: 'number',
172
+ keepAliveDurationMillis: 'number',
173
+ maxRequests: 'number',
174
+ maxRequestsPerHost: 'number',
175
+ };
176
+ }
177
+
178
+ constructor(map?: { [key: string]: any }) {
179
+ super(map);
180
+ }
181
+ }
182
+
183
+ // OrderItemInfo
184
+ export class OrderItemInfo extends $tea.Model {
185
+ // 商品ID
186
+ /**
187
+ * @example
188
+ * SKU001
189
+ */
190
+ itemId: string;
191
+ // 数量
192
+ /**
193
+ * @example
194
+ * 2
195
+ */
196
+ quantity: number;
197
+ static names(): { [key: string]: string } {
198
+ return {
199
+ itemId: 'item_id',
200
+ quantity: 'quantity',
201
+ };
202
+ }
203
+
204
+ static types(): { [key: string]: any } {
205
+ return {
206
+ itemId: 'string',
207
+ quantity: 'number',
208
+ };
209
+ }
210
+
211
+ constructor(map?: { [key: string]: any }) {
212
+ super(map);
213
+ }
214
+ }
215
+
216
+ // 基本信息
217
+ export class Message extends $tea.Model {
218
+ // 姓名
219
+ /**
220
+ * @example
221
+ * 张三
222
+ */
223
+ name: string;
224
+ // 年龄
225
+ /**
226
+ * @example
227
+ * 18
228
+ */
229
+ age: number;
230
+ static names(): { [key: string]: string } {
231
+ return {
232
+ name: 'name',
233
+ age: 'age',
234
+ };
235
+ }
236
+
237
+ static types(): { [key: string]: any } {
238
+ return {
239
+ name: 'string',
240
+ age: 'number',
241
+ };
242
+ }
243
+
244
+ constructor(map?: { [key: string]: any }) {
245
+ super(map);
246
+ }
247
+ }
248
+
249
+ // 测试
250
+ export class PayOrderOpenApiResult extends $tea.Model {
251
+ // 11
252
+ /**
253
+ * @example
254
+ * 11
255
+ */
256
+ test: string;
257
+ static names(): { [key: string]: string } {
258
+ return {
259
+ test: 'test',
260
+ };
261
+ }
262
+
263
+ static types(): { [key: string]: any } {
264
+ return {
265
+ test: 'string',
266
+ };
267
+ }
268
+
269
+ constructor(map?: { [key: string]: any }) {
270
+ super(map);
271
+ }
272
+ }
273
+
274
+ // aaa
275
+ export class AA extends $tea.Model {
276
+ // cc
277
+ /**
278
+ * @example
279
+ * bb
280
+ */
281
+ aa: string;
282
+ static names(): { [key: string]: string } {
283
+ return {
284
+ aa: 'aa',
285
+ };
286
+ }
287
+
288
+ static types(): { [key: string]: any } {
289
+ return {
290
+ aa: 'string',
291
+ };
292
+ }
293
+
294
+ constructor(map?: { [key: string]: any }) {
295
+ super(map);
296
+ }
297
+ }
298
+
299
+ export class TestAntchainDemotmtWorkbenchCreateRequest extends $tea.Model {
300
+ // OAuth模式下的授权token
301
+ authToken?: string;
302
+ productInstanceId?: string;
303
+ // 超时
304
+ timeout?: string;
305
+ static names(): { [key: string]: string } {
306
+ return {
307
+ authToken: 'auth_token',
308
+ productInstanceId: 'product_instance_id',
309
+ timeout: 'timeout',
310
+ };
311
+ }
312
+
313
+ static types(): { [key: string]: any } {
314
+ return {
315
+ authToken: 'string',
316
+ productInstanceId: 'string',
317
+ timeout: 'string',
318
+ };
319
+ }
320
+
321
+ constructor(map?: { [key: string]: any }) {
322
+ super(map);
323
+ }
324
+ }
325
+
326
+ export class TestAntchainDemotmtWorkbenchCreateResponse extends $tea.Model {
327
+ // 请求唯一ID,用于链路跟踪和问题排查
328
+ reqMsgId?: string;
329
+ // 结果码,一般OK表示调用成功
330
+ resultCode?: string;
331
+ // 异常信息的文本描述
332
+ resultMsg?: string;
333
+ // 状态
334
+ stauts?: string;
335
+ // 描述
336
+ msg?: string;
337
+ static names(): { [key: string]: string } {
338
+ return {
339
+ reqMsgId: 'req_msg_id',
340
+ resultCode: 'result_code',
341
+ resultMsg: 'result_msg',
342
+ stauts: 'stauts',
343
+ msg: 'msg',
344
+ };
345
+ }
346
+
347
+ static types(): { [key: string]: any } {
348
+ return {
349
+ reqMsgId: 'string',
350
+ resultCode: 'string',
351
+ resultMsg: 'string',
352
+ stauts: 'string',
353
+ msg: 'string',
354
+ };
355
+ }
356
+
357
+ constructor(map?: { [key: string]: any }) {
358
+ super(map);
359
+ }
360
+ }
361
+
362
+
363
+ export default class Client {
364
+ _endpoint: string;
365
+ _regionId: string;
366
+ _accessKeyId: string;
367
+ _accessKeySecret: string;
368
+ _protocol: string;
369
+ _userAgent: string;
370
+ _readTimeout: number;
371
+ _connectTimeout: number;
372
+ _httpProxy: string;
373
+ _httpsProxy: string;
374
+ _socks5Proxy: string;
375
+ _socks5NetWork: string;
376
+ _noProxy: string;
377
+ _maxIdleConns: number;
378
+ _securityToken: string;
379
+ _maxIdleTimeMillis: number;
380
+ _keepAliveDurationMillis: number;
381
+ _maxRequests: number;
382
+ _maxRequestsPerHost: number;
383
+
384
+ /**
385
+ * @remarks
386
+ * Init client with Config
387
+ *
388
+ * @param config - config contains the necessary information to create a client
389
+ */
390
+ constructor(config: Config) {
391
+ if (Util.isUnset(config)) {
392
+ throw $tea.newError({
393
+ code: "ParameterMissing",
394
+ message: "'config' can not be unset",
395
+ });
396
+ }
397
+
398
+ this._accessKeyId = config.accessKeyId;
399
+ this._accessKeySecret = config.accessKeySecret;
400
+ this._securityToken = config.securityToken;
401
+ this._endpoint = config.endpoint;
402
+ this._protocol = config.protocol;
403
+ this._userAgent = config.userAgent;
404
+ this._readTimeout = Util.defaultNumber(config.readTimeout, 20000);
405
+ this._connectTimeout = Util.defaultNumber(config.connectTimeout, 20000);
406
+ this._httpProxy = config.httpProxy;
407
+ this._httpsProxy = config.httpsProxy;
408
+ this._noProxy = config.noProxy;
409
+ this._socks5Proxy = config.socks5Proxy;
410
+ this._socks5NetWork = config.socks5NetWork;
411
+ this._maxIdleConns = Util.defaultNumber(config.maxIdleConns, 60000);
412
+ this._maxIdleTimeMillis = Util.defaultNumber(config.maxIdleTimeMillis, 5);
413
+ this._keepAliveDurationMillis = Util.defaultNumber(config.keepAliveDurationMillis, 5000);
414
+ this._maxRequests = Util.defaultNumber(config.maxRequests, 100);
415
+ this._maxRequestsPerHost = Util.defaultNumber(config.maxRequestsPerHost, 100);
416
+ }
417
+
418
+ /**
419
+ * @remarks
420
+ * Encapsulate the request and invoke the network
421
+ *
422
+ * @param action - api name
423
+ * @param protocol - http or https
424
+ * @param method - e.g. GET
425
+ * @param pathname - pathname of every api
426
+ * @param request - which contains request params
427
+ * @param runtime - which controls some details of call api, such as retry times
428
+ * @returns the response
429
+ */
430
+ async doRequest(version: string, action: string, protocol: string, method: string, pathname: string, request: {[key: string]: any}, headers: {[key: string ]: string}, runtime: $Util.RuntimeOptions): Promise<{[key: string]: any}> {
431
+ let _runtime: { [key: string]: any } = {
432
+ timeouted: "retry",
433
+ readTimeout: Util.defaultNumber(runtime.readTimeout, this._readTimeout),
434
+ connectTimeout: Util.defaultNumber(runtime.connectTimeout, this._connectTimeout),
435
+ httpProxy: Util.defaultString(runtime.httpProxy, this._httpProxy),
436
+ httpsProxy: Util.defaultString(runtime.httpsProxy, this._httpsProxy),
437
+ noProxy: Util.defaultString(runtime.noProxy, this._noProxy),
438
+ maxIdleConns: Util.defaultNumber(runtime.maxIdleConns, this._maxIdleConns),
439
+ maxIdleTimeMillis: this._maxIdleTimeMillis,
440
+ keepAliveDuration: this._keepAliveDurationMillis,
441
+ maxRequests: this._maxRequests,
442
+ maxRequestsPerHost: this._maxRequestsPerHost,
443
+ retry: {
444
+ retryable: runtime.autoretry,
445
+ maxAttempts: Util.defaultNumber(runtime.maxAttempts, 3),
446
+ },
447
+ backoff: {
448
+ policy: Util.defaultString(runtime.backoffPolicy, "no"),
449
+ period: Util.defaultNumber(runtime.backoffPeriod, 1),
450
+ },
451
+ ignoreSSL: runtime.ignoreSSL,
452
+ }
453
+
454
+ let _lastRequest = null;
455
+ let _now = Date.now();
456
+ let _retryTimes = 0;
457
+ while ($tea.allowRetry(_runtime['retry'], _retryTimes, _now)) {
458
+ if (_retryTimes > 0) {
459
+ let _backoffTime = $tea.getBackoffTime(_runtime['backoff'], _retryTimes);
460
+ if (_backoffTime > 0) {
461
+ await $tea.sleep(_backoffTime);
462
+ }
463
+ }
464
+
465
+ _retryTimes = _retryTimes + 1;
466
+ try {
467
+ let request_ = new $tea.Request();
468
+ request_.protocol = Util.defaultString(this._protocol, protocol);
469
+ request_.method = method;
470
+ request_.pathname = pathname;
471
+ request_.query = {
472
+ method: action,
473
+ version: version,
474
+ sign_type: "HmacSHA1",
475
+ req_time: AntchainUtil.getTimestamp(),
476
+ req_msg_id: AntchainUtil.getNonce(),
477
+ access_key: this._accessKeyId,
478
+ base_sdk_version: "TeaSDK-2.0",
479
+ sdk_version: "1.0.3",
480
+ _prod_code: "BENCHTWO",
481
+ _prod_channel: "default",
482
+ };
483
+ if (!Util.empty(this._securityToken)) {
484
+ request_.query["security_token"] = this._securityToken;
485
+ }
486
+
487
+ request_.headers = {
488
+ host: Util.defaultString(this._endpoint, "openapi.antchain.antgroup.com"),
489
+ 'user-agent': Util.getUserAgent(this._userAgent),
490
+ ...headers,
491
+ };
492
+ let tmp = Util.anyifyMapValue(RPCUtil.query(request));
493
+ request_.body = new $tea.BytesReadable(Util.toFormString(tmp));
494
+ request_.headers["content-type"] = "application/x-www-form-urlencoded";
495
+ let signedParam = {
496
+ ...request_.query,
497
+ ...RPCUtil.query(request),
498
+ };
499
+ request_.query["sign"] = AntchainUtil.getSignature(signedParam, this._accessKeySecret);
500
+ _lastRequest = request_;
501
+ let response_ = await $tea.doAction(request_, _runtime);
502
+
503
+ let raw = await Util.readAsString(response_.body);
504
+ let obj = Util.parseJSON(raw);
505
+ let res = Util.assertAsMap(obj);
506
+ let resp = Util.assertAsMap(res["response"]);
507
+ if (AntchainUtil.hasError(raw, this._accessKeySecret)) {
508
+ throw $tea.newError({
509
+ message: resp["result_msg"],
510
+ data: resp,
511
+ code: resp["result_code"],
512
+ });
513
+ }
514
+
515
+ return resp;
516
+ } catch (ex) {
517
+ if ($tea.isRetryable(ex)) {
518
+ continue;
519
+ }
520
+ throw ex;
521
+ }
522
+ }
523
+
524
+ throw $tea.newUnretryableError(_lastRequest);
525
+ }
526
+
527
+ /**
528
+ * @remarks
529
+ * Description: 测试使用
530
+ * Summary: 测试使用
531
+ */
532
+ async testAntchainDemotmtWorkbenchCreate(request: TestAntchainDemotmtWorkbenchCreateRequest): Promise<TestAntchainDemotmtWorkbenchCreateResponse> {
533
+ let runtime = new $Util.RuntimeOptions({ });
534
+ let headers : {[key: string ]: string} = { };
535
+ return await this.testAntchainDemotmtWorkbenchCreateEx(request, headers, runtime);
536
+ }
537
+
538
+ /**
539
+ * @remarks
540
+ * Description: 测试使用
541
+ * Summary: 测试使用
542
+ */
543
+ async testAntchainDemotmtWorkbenchCreateEx(request: TestAntchainDemotmtWorkbenchCreateRequest, headers: {[key: string ]: string}, runtime: $Util.RuntimeOptions): Promise<TestAntchainDemotmtWorkbenchCreateResponse> {
544
+ Util.validateModel(request);
545
+ return $tea.cast<TestAntchainDemotmtWorkbenchCreateResponse>(await this.doRequest("1.0", "antchain.demotmt.workbench.create.test", "HTTPS", "POST", `/gateway.do`, $tea.toMap(request), headers, runtime), new TestAntchainDemotmtWorkbenchCreateResponse({}));
546
+ }
547
+
548
+ }