@antchain/antdigital-resolveagent 1.0.1

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,275 @@
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 ImportTaskBatchRequest extends $tea.Model {
139
+ authToken?: string;
140
+ productInstanceId?: string;
141
+ taskId: string;
142
+ batchNo: string;
143
+ list: string[];
144
+ static names(): {
145
+ [key: string]: string;
146
+ };
147
+ static types(): {
148
+ [key: string]: any;
149
+ };
150
+ constructor(map?: {
151
+ [key: string]: any;
152
+ });
153
+ }
154
+ export declare class ImportTaskBatchResponse extends $tea.Model {
155
+ reqMsgId?: string;
156
+ resultCode?: string;
157
+ resultMsg?: string;
158
+ static names(): {
159
+ [key: string]: string;
160
+ };
161
+ static types(): {
162
+ [key: string]: any;
163
+ };
164
+ constructor(map?: {
165
+ [key: string]: any;
166
+ });
167
+ }
168
+ export declare class ImportTaskRateinfoRequest extends $tea.Model {
169
+ authToken?: string;
170
+ productInstanceId?: string;
171
+ cusNo: string;
172
+ loanInfoList: string[];
173
+ static names(): {
174
+ [key: string]: string;
175
+ };
176
+ static types(): {
177
+ [key: string]: any;
178
+ };
179
+ constructor(map?: {
180
+ [key: string]: any;
181
+ });
182
+ }
183
+ export declare class ImportTaskRateinfoResponse extends $tea.Model {
184
+ reqMsgId?: string;
185
+ resultCode?: string;
186
+ resultMsg?: string;
187
+ flag?: string;
188
+ code?: number;
189
+ msg?: string;
190
+ data?: string;
191
+ static names(): {
192
+ [key: string]: string;
193
+ };
194
+ static types(): {
195
+ [key: string]: any;
196
+ };
197
+ constructor(map?: {
198
+ [key: string]: any;
199
+ });
200
+ }
201
+ export default class Client {
202
+ _endpoint: string;
203
+ _regionId: string;
204
+ _accessKeyId: string;
205
+ _accessKeySecret: string;
206
+ _protocol: string;
207
+ _userAgent: string;
208
+ _readTimeout: number;
209
+ _connectTimeout: number;
210
+ _httpProxy: string;
211
+ _httpsProxy: string;
212
+ _socks5Proxy: string;
213
+ _socks5NetWork: string;
214
+ _noProxy: string;
215
+ _maxIdleConns: number;
216
+ _securityToken: string;
217
+ _maxIdleTimeMillis: number;
218
+ _keepAliveDurationMillis: number;
219
+ _maxRequests: number;
220
+ _maxRequestsPerHost: number;
221
+ /**
222
+ * @remarks
223
+ * Init client with Config
224
+ *
225
+ * @param config - config contains the necessary information to create a client
226
+ */
227
+ constructor(config: Config);
228
+ /**
229
+ * @remarks
230
+ * Encapsulate the request and invoke the network
231
+ *
232
+ * @param action - api name
233
+ * @param protocol - http or https
234
+ * @param method - e.g. GET
235
+ * @param pathname - pathname of every api
236
+ * @param request - which contains request params
237
+ * @param runtime - which controls some details of call api, such as retry times
238
+ * @returns the response
239
+ */
240
+ doRequest(version: string, action: string, protocol: string, method: string, pathname: string, request: {
241
+ [key: string]: any;
242
+ }, headers: {
243
+ [key: string]: string;
244
+ }, runtime: $Util.RuntimeOptions): Promise<{
245
+ [key: string]: any;
246
+ }>;
247
+ /**
248
+ * @remarks
249
+ * Description: 贷后催调智能体批量名单导入接口
250
+ * Summary: 贷后催调智能体批量名单导入接口
251
+ */
252
+ importTaskBatch(request: ImportTaskBatchRequest): Promise<ImportTaskBatchResponse>;
253
+ /**
254
+ * @remarks
255
+ * Description: 贷后催调智能体批量名单导入接口
256
+ * Summary: 贷后催调智能体批量名单导入接口
257
+ */
258
+ importTaskBatchEx(request: ImportTaskBatchRequest, headers: {
259
+ [key: string]: string;
260
+ }, runtime: $Util.RuntimeOptions): Promise<ImportTaskBatchResponse>;
261
+ /**
262
+ * @remarks
263
+ * Description: 贷后对接360利率信息导入
264
+ * Summary: 贷后对接360利率信息导入
265
+ */
266
+ importTaskRateinfo(request: ImportTaskRateinfoRequest): Promise<ImportTaskRateinfoResponse>;
267
+ /**
268
+ * @remarks
269
+ * Description: 贷后对接360利率信息导入
270
+ * Summary: 贷后对接360利率信息导入
271
+ */
272
+ importTaskRateinfoEx(request: ImportTaskRateinfoRequest, headers: {
273
+ [key: string]: string;
274
+ }, runtime: $Util.RuntimeOptions): Promise<ImportTaskRateinfoResponse>;
275
+ }
package/dist/client.js ADDED
@@ -0,0 +1,348 @@
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.ImportTaskRateinfoResponse = exports.ImportTaskRateinfoRequest = exports.ImportTaskBatchResponse = exports.ImportTaskBatchRequest = 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
+ class ImportTaskBatchRequest extends $tea.Model {
86
+ constructor(map) {
87
+ super(map);
88
+ }
89
+ static names() {
90
+ return {
91
+ authToken: 'auth_token',
92
+ productInstanceId: 'product_instance_id',
93
+ taskId: 'task_id',
94
+ batchNo: 'batch_no',
95
+ list: 'list',
96
+ };
97
+ }
98
+ static types() {
99
+ return {
100
+ authToken: 'string',
101
+ productInstanceId: 'string',
102
+ taskId: 'string',
103
+ batchNo: 'string',
104
+ list: { 'type': 'array', 'itemType': 'string' },
105
+ };
106
+ }
107
+ }
108
+ exports.ImportTaskBatchRequest = ImportTaskBatchRequest;
109
+ class ImportTaskBatchResponse extends $tea.Model {
110
+ constructor(map) {
111
+ super(map);
112
+ }
113
+ static names() {
114
+ return {
115
+ reqMsgId: 'req_msg_id',
116
+ resultCode: 'result_code',
117
+ resultMsg: 'result_msg',
118
+ };
119
+ }
120
+ static types() {
121
+ return {
122
+ reqMsgId: 'string',
123
+ resultCode: 'string',
124
+ resultMsg: 'string',
125
+ };
126
+ }
127
+ }
128
+ exports.ImportTaskBatchResponse = ImportTaskBatchResponse;
129
+ class ImportTaskRateinfoRequest extends $tea.Model {
130
+ constructor(map) {
131
+ super(map);
132
+ }
133
+ static names() {
134
+ return {
135
+ authToken: 'auth_token',
136
+ productInstanceId: 'product_instance_id',
137
+ cusNo: 'cus_no',
138
+ loanInfoList: 'loan_info_list',
139
+ };
140
+ }
141
+ static types() {
142
+ return {
143
+ authToken: 'string',
144
+ productInstanceId: 'string',
145
+ cusNo: 'string',
146
+ loanInfoList: { 'type': 'array', 'itemType': 'string' },
147
+ };
148
+ }
149
+ }
150
+ exports.ImportTaskRateinfoRequest = ImportTaskRateinfoRequest;
151
+ class ImportTaskRateinfoResponse extends $tea.Model {
152
+ constructor(map) {
153
+ super(map);
154
+ }
155
+ static names() {
156
+ return {
157
+ reqMsgId: 'req_msg_id',
158
+ resultCode: 'result_code',
159
+ resultMsg: 'result_msg',
160
+ flag: 'flag',
161
+ code: 'code',
162
+ msg: 'msg',
163
+ data: 'data',
164
+ };
165
+ }
166
+ static types() {
167
+ return {
168
+ reqMsgId: 'string',
169
+ resultCode: 'string',
170
+ resultMsg: 'string',
171
+ flag: 'string',
172
+ code: 'number',
173
+ msg: 'string',
174
+ data: 'string',
175
+ };
176
+ }
177
+ }
178
+ exports.ImportTaskRateinfoResponse = ImportTaskRateinfoResponse;
179
+ class Client {
180
+ /**
181
+ * @remarks
182
+ * Init client with Config
183
+ *
184
+ * @param config - config contains the necessary information to create a client
185
+ */
186
+ constructor(config) {
187
+ if (tea_util_1.default.isUnset(config)) {
188
+ throw $tea.newError({
189
+ code: "ParameterMissing",
190
+ message: "'config' can not be unset",
191
+ });
192
+ }
193
+ this._accessKeyId = config.accessKeyId;
194
+ this._accessKeySecret = config.accessKeySecret;
195
+ this._securityToken = config.securityToken;
196
+ this._endpoint = config.endpoint;
197
+ this._protocol = config.protocol;
198
+ this._userAgent = config.userAgent;
199
+ this._readTimeout = tea_util_1.default.defaultNumber(config.readTimeout, 20000);
200
+ this._connectTimeout = tea_util_1.default.defaultNumber(config.connectTimeout, 20000);
201
+ this._httpProxy = config.httpProxy;
202
+ this._httpsProxy = config.httpsProxy;
203
+ this._noProxy = config.noProxy;
204
+ this._socks5Proxy = config.socks5Proxy;
205
+ this._socks5NetWork = config.socks5NetWork;
206
+ this._maxIdleConns = tea_util_1.default.defaultNumber(config.maxIdleConns, 60000);
207
+ this._maxIdleTimeMillis = tea_util_1.default.defaultNumber(config.maxIdleTimeMillis, 5);
208
+ this._keepAliveDurationMillis = tea_util_1.default.defaultNumber(config.keepAliveDurationMillis, 5000);
209
+ this._maxRequests = tea_util_1.default.defaultNumber(config.maxRequests, 100);
210
+ this._maxRequestsPerHost = tea_util_1.default.defaultNumber(config.maxRequestsPerHost, 100);
211
+ }
212
+ /**
213
+ * @remarks
214
+ * Encapsulate the request and invoke the network
215
+ *
216
+ * @param action - api name
217
+ * @param protocol - http or https
218
+ * @param method - e.g. GET
219
+ * @param pathname - pathname of every api
220
+ * @param request - which contains request params
221
+ * @param runtime - which controls some details of call api, such as retry times
222
+ * @returns the response
223
+ */
224
+ async doRequest(version, action, protocol, method, pathname, request, headers, runtime) {
225
+ let _runtime = {
226
+ timeouted: "retry",
227
+ readTimeout: tea_util_1.default.defaultNumber(runtime.readTimeout, this._readTimeout),
228
+ connectTimeout: tea_util_1.default.defaultNumber(runtime.connectTimeout, this._connectTimeout),
229
+ httpProxy: tea_util_1.default.defaultString(runtime.httpProxy, this._httpProxy),
230
+ httpsProxy: tea_util_1.default.defaultString(runtime.httpsProxy, this._httpsProxy),
231
+ noProxy: tea_util_1.default.defaultString(runtime.noProxy, this._noProxy),
232
+ maxIdleConns: tea_util_1.default.defaultNumber(runtime.maxIdleConns, this._maxIdleConns),
233
+ maxIdleTimeMillis: this._maxIdleTimeMillis,
234
+ keepAliveDuration: this._keepAliveDurationMillis,
235
+ maxRequests: this._maxRequests,
236
+ maxRequestsPerHost: this._maxRequestsPerHost,
237
+ retry: {
238
+ retryable: runtime.autoretry,
239
+ maxAttempts: tea_util_1.default.defaultNumber(runtime.maxAttempts, 3),
240
+ },
241
+ backoff: {
242
+ policy: tea_util_1.default.defaultString(runtime.backoffPolicy, "no"),
243
+ period: tea_util_1.default.defaultNumber(runtime.backoffPeriod, 1),
244
+ },
245
+ ignoreSSL: runtime.ignoreSSL,
246
+ };
247
+ let _lastRequest = null;
248
+ let _now = Date.now();
249
+ let _retryTimes = 0;
250
+ while ($tea.allowRetry(_runtime['retry'], _retryTimes, _now)) {
251
+ if (_retryTimes > 0) {
252
+ let _backoffTime = $tea.getBackoffTime(_runtime['backoff'], _retryTimes);
253
+ if (_backoffTime > 0) {
254
+ await $tea.sleep(_backoffTime);
255
+ }
256
+ }
257
+ _retryTimes = _retryTimes + 1;
258
+ try {
259
+ let request_ = new $tea.Request();
260
+ request_.protocol = tea_util_1.default.defaultString(this._protocol, protocol);
261
+ request_.method = method;
262
+ request_.pathname = pathname;
263
+ request_.query = {
264
+ method: action,
265
+ version: version,
266
+ sign_type: "HmacSHA1",
267
+ req_time: alipay_util_1.default.getTimestamp(),
268
+ req_msg_id: alipay_util_1.default.getNonce(),
269
+ access_key: this._accessKeyId,
270
+ base_sdk_version: "TeaSDK-2.0",
271
+ sdk_version: "1.0.1",
272
+ _prod_code: "RESOLVEAGENT",
273
+ _prod_channel: "default",
274
+ };
275
+ if (!tea_util_1.default.empty(this._securityToken)) {
276
+ request_.query["security_token"] = this._securityToken;
277
+ }
278
+ 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);
279
+ let tmp = tea_util_1.default.anyifyMapValue(rpc_util_1.default.query(request));
280
+ request_.body = new $tea.BytesReadable(tea_util_1.default.toFormString(tmp));
281
+ request_.headers["content-type"] = "application/x-www-form-urlencoded";
282
+ let signedParam = Object.assign(Object.assign({}, request_.query), rpc_util_1.default.query(request));
283
+ request_.query["sign"] = alipay_util_1.default.getSignature(signedParam, this._accessKeySecret);
284
+ _lastRequest = request_;
285
+ let response_ = await $tea.doAction(request_, _runtime);
286
+ let raw = await tea_util_1.default.readAsString(response_.body);
287
+ let obj = tea_util_1.default.parseJSON(raw);
288
+ let res = tea_util_1.default.assertAsMap(obj);
289
+ let resp = tea_util_1.default.assertAsMap(res["response"]);
290
+ if (alipay_util_1.default.hasError(raw, this._accessKeySecret)) {
291
+ throw $tea.newError({
292
+ message: resp["result_msg"],
293
+ data: resp,
294
+ code: resp["result_code"],
295
+ });
296
+ }
297
+ return resp;
298
+ }
299
+ catch (ex) {
300
+ if ($tea.isRetryable(ex)) {
301
+ continue;
302
+ }
303
+ throw ex;
304
+ }
305
+ }
306
+ throw $tea.newUnretryableError(_lastRequest);
307
+ }
308
+ /**
309
+ * @remarks
310
+ * Description: 贷后催调智能体批量名单导入接口
311
+ * Summary: 贷后催调智能体批量名单导入接口
312
+ */
313
+ async importTaskBatch(request) {
314
+ let runtime = new $Util.RuntimeOptions({});
315
+ let headers = {};
316
+ return await this.importTaskBatchEx(request, headers, runtime);
317
+ }
318
+ /**
319
+ * @remarks
320
+ * Description: 贷后催调智能体批量名单导入接口
321
+ * Summary: 贷后催调智能体批量名单导入接口
322
+ */
323
+ async importTaskBatchEx(request, headers, runtime) {
324
+ tea_util_1.default.validateModel(request);
325
+ return $tea.cast(await this.doRequest("1.0", "antdigital.resolveagent.task.batch.import", "HTTPS", "POST", `/gateway.do`, $tea.toMap(request), headers, runtime), new ImportTaskBatchResponse({}));
326
+ }
327
+ /**
328
+ * @remarks
329
+ * Description: 贷后对接360利率信息导入
330
+ * Summary: 贷后对接360利率信息导入
331
+ */
332
+ async importTaskRateinfo(request) {
333
+ let runtime = new $Util.RuntimeOptions({});
334
+ let headers = {};
335
+ return await this.importTaskRateinfoEx(request, headers, runtime);
336
+ }
337
+ /**
338
+ * @remarks
339
+ * Description: 贷后对接360利率信息导入
340
+ * Summary: 贷后对接360利率信息导入
341
+ */
342
+ async importTaskRateinfoEx(request, headers, runtime) {
343
+ tea_util_1.default.validateModel(request);
344
+ return $tea.cast(await this.doRequest("1.0", "antdigital.resolveagent.task.rateinfo.import", "HTTPS", "POST", `/gateway.do`, $tea.toMap(request), headers, runtime), new ImportTaskRateinfoResponse({}));
345
+ }
346
+ }
347
+ exports.default = Client;
348
+ //# 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,iBA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,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,8CAA8C,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,IAAI,0BAA0B,CAAC,EAAE,CAAC,CAAC,CAAC;IACvO,CAAC;CAEF;AA9MD,yBA8MC"}
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-resolveagent",
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.1",
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,528 @@
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
+ export class ImportTaskBatchRequest extends $tea.Model {
184
+ // OAuth模式下的授权token
185
+ authToken?: string;
186
+ productInstanceId?: string;
187
+ // 任务id
188
+ taskId: string;
189
+ // 批次号
190
+ batchNo: string;
191
+ // 导入名单列表
192
+ list: string[];
193
+ static names(): { [key: string]: string } {
194
+ return {
195
+ authToken: 'auth_token',
196
+ productInstanceId: 'product_instance_id',
197
+ taskId: 'task_id',
198
+ batchNo: 'batch_no',
199
+ list: 'list',
200
+ };
201
+ }
202
+
203
+ static types(): { [key: string]: any } {
204
+ return {
205
+ authToken: 'string',
206
+ productInstanceId: 'string',
207
+ taskId: 'string',
208
+ batchNo: 'string',
209
+ list: { 'type': 'array', 'itemType': 'string' },
210
+ };
211
+ }
212
+
213
+ constructor(map?: { [key: string]: any }) {
214
+ super(map);
215
+ }
216
+ }
217
+
218
+ export class ImportTaskBatchResponse extends $tea.Model {
219
+ // 请求唯一ID,用于链路跟踪和问题排查
220
+ reqMsgId?: string;
221
+ // 结果码,一般OK表示调用成功
222
+ resultCode?: string;
223
+ // 异常信息的文本描述
224
+ resultMsg?: string;
225
+ static names(): { [key: string]: string } {
226
+ return {
227
+ reqMsgId: 'req_msg_id',
228
+ resultCode: 'result_code',
229
+ resultMsg: 'result_msg',
230
+ };
231
+ }
232
+
233
+ static types(): { [key: string]: any } {
234
+ return {
235
+ reqMsgId: 'string',
236
+ resultCode: 'string',
237
+ resultMsg: 'string',
238
+ };
239
+ }
240
+
241
+ constructor(map?: { [key: string]: any }) {
242
+ super(map);
243
+ }
244
+ }
245
+
246
+ export class ImportTaskRateinfoRequest extends $tea.Model {
247
+ // OAuth模式下的授权token
248
+ authToken?: string;
249
+ productInstanceId?: string;
250
+ // 客户号
251
+ cusNo: string;
252
+ // 借据信息
253
+ loanInfoList: string[];
254
+ static names(): { [key: string]: string } {
255
+ return {
256
+ authToken: 'auth_token',
257
+ productInstanceId: 'product_instance_id',
258
+ cusNo: 'cus_no',
259
+ loanInfoList: 'loan_info_list',
260
+ };
261
+ }
262
+
263
+ static types(): { [key: string]: any } {
264
+ return {
265
+ authToken: 'string',
266
+ productInstanceId: 'string',
267
+ cusNo: 'string',
268
+ loanInfoList: { 'type': 'array', 'itemType': 'string' },
269
+ };
270
+ }
271
+
272
+ constructor(map?: { [key: string]: any }) {
273
+ super(map);
274
+ }
275
+ }
276
+
277
+ export class ImportTaskRateinfoResponse extends $tea.Model {
278
+ // 请求唯一ID,用于链路跟踪和问题排查
279
+ reqMsgId?: string;
280
+ // 结果码,一般OK表示调用成功
281
+ resultCode?: string;
282
+ // 异常信息的文本描述
283
+ resultMsg?: string;
284
+ // S:成功,F:失败
285
+ flag?: string;
286
+ // 0:成功,1:失败
287
+ code?: number;
288
+ // 成功or失败
289
+ msg?: string;
290
+ // data
291
+ data?: string;
292
+ static names(): { [key: string]: string } {
293
+ return {
294
+ reqMsgId: 'req_msg_id',
295
+ resultCode: 'result_code',
296
+ resultMsg: 'result_msg',
297
+ flag: 'flag',
298
+ code: 'code',
299
+ msg: 'msg',
300
+ data: 'data',
301
+ };
302
+ }
303
+
304
+ static types(): { [key: string]: any } {
305
+ return {
306
+ reqMsgId: 'string',
307
+ resultCode: 'string',
308
+ resultMsg: 'string',
309
+ flag: 'string',
310
+ code: 'number',
311
+ msg: 'string',
312
+ data: 'string',
313
+ };
314
+ }
315
+
316
+ constructor(map?: { [key: string]: any }) {
317
+ super(map);
318
+ }
319
+ }
320
+
321
+
322
+ export default class Client {
323
+ _endpoint: string;
324
+ _regionId: string;
325
+ _accessKeyId: string;
326
+ _accessKeySecret: string;
327
+ _protocol: string;
328
+ _userAgent: string;
329
+ _readTimeout: number;
330
+ _connectTimeout: number;
331
+ _httpProxy: string;
332
+ _httpsProxy: string;
333
+ _socks5Proxy: string;
334
+ _socks5NetWork: string;
335
+ _noProxy: string;
336
+ _maxIdleConns: number;
337
+ _securityToken: string;
338
+ _maxIdleTimeMillis: number;
339
+ _keepAliveDurationMillis: number;
340
+ _maxRequests: number;
341
+ _maxRequestsPerHost: number;
342
+
343
+ /**
344
+ * @remarks
345
+ * Init client with Config
346
+ *
347
+ * @param config - config contains the necessary information to create a client
348
+ */
349
+ constructor(config: Config) {
350
+ if (Util.isUnset(config)) {
351
+ throw $tea.newError({
352
+ code: "ParameterMissing",
353
+ message: "'config' can not be unset",
354
+ });
355
+ }
356
+
357
+ this._accessKeyId = config.accessKeyId;
358
+ this._accessKeySecret = config.accessKeySecret;
359
+ this._securityToken = config.securityToken;
360
+ this._endpoint = config.endpoint;
361
+ this._protocol = config.protocol;
362
+ this._userAgent = config.userAgent;
363
+ this._readTimeout = Util.defaultNumber(config.readTimeout, 20000);
364
+ this._connectTimeout = Util.defaultNumber(config.connectTimeout, 20000);
365
+ this._httpProxy = config.httpProxy;
366
+ this._httpsProxy = config.httpsProxy;
367
+ this._noProxy = config.noProxy;
368
+ this._socks5Proxy = config.socks5Proxy;
369
+ this._socks5NetWork = config.socks5NetWork;
370
+ this._maxIdleConns = Util.defaultNumber(config.maxIdleConns, 60000);
371
+ this._maxIdleTimeMillis = Util.defaultNumber(config.maxIdleTimeMillis, 5);
372
+ this._keepAliveDurationMillis = Util.defaultNumber(config.keepAliveDurationMillis, 5000);
373
+ this._maxRequests = Util.defaultNumber(config.maxRequests, 100);
374
+ this._maxRequestsPerHost = Util.defaultNumber(config.maxRequestsPerHost, 100);
375
+ }
376
+
377
+ /**
378
+ * @remarks
379
+ * Encapsulate the request and invoke the network
380
+ *
381
+ * @param action - api name
382
+ * @param protocol - http or https
383
+ * @param method - e.g. GET
384
+ * @param pathname - pathname of every api
385
+ * @param request - which contains request params
386
+ * @param runtime - which controls some details of call api, such as retry times
387
+ * @returns the response
388
+ */
389
+ 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}> {
390
+ let _runtime: { [key: string]: any } = {
391
+ timeouted: "retry",
392
+ readTimeout: Util.defaultNumber(runtime.readTimeout, this._readTimeout),
393
+ connectTimeout: Util.defaultNumber(runtime.connectTimeout, this._connectTimeout),
394
+ httpProxy: Util.defaultString(runtime.httpProxy, this._httpProxy),
395
+ httpsProxy: Util.defaultString(runtime.httpsProxy, this._httpsProxy),
396
+ noProxy: Util.defaultString(runtime.noProxy, this._noProxy),
397
+ maxIdleConns: Util.defaultNumber(runtime.maxIdleConns, this._maxIdleConns),
398
+ maxIdleTimeMillis: this._maxIdleTimeMillis,
399
+ keepAliveDuration: this._keepAliveDurationMillis,
400
+ maxRequests: this._maxRequests,
401
+ maxRequestsPerHost: this._maxRequestsPerHost,
402
+ retry: {
403
+ retryable: runtime.autoretry,
404
+ maxAttempts: Util.defaultNumber(runtime.maxAttempts, 3),
405
+ },
406
+ backoff: {
407
+ policy: Util.defaultString(runtime.backoffPolicy, "no"),
408
+ period: Util.defaultNumber(runtime.backoffPeriod, 1),
409
+ },
410
+ ignoreSSL: runtime.ignoreSSL,
411
+ }
412
+
413
+ let _lastRequest = null;
414
+ let _now = Date.now();
415
+ let _retryTimes = 0;
416
+ while ($tea.allowRetry(_runtime['retry'], _retryTimes, _now)) {
417
+ if (_retryTimes > 0) {
418
+ let _backoffTime = $tea.getBackoffTime(_runtime['backoff'], _retryTimes);
419
+ if (_backoffTime > 0) {
420
+ await $tea.sleep(_backoffTime);
421
+ }
422
+ }
423
+
424
+ _retryTimes = _retryTimes + 1;
425
+ try {
426
+ let request_ = new $tea.Request();
427
+ request_.protocol = Util.defaultString(this._protocol, protocol);
428
+ request_.method = method;
429
+ request_.pathname = pathname;
430
+ request_.query = {
431
+ method: action,
432
+ version: version,
433
+ sign_type: "HmacSHA1",
434
+ req_time: AntchainUtil.getTimestamp(),
435
+ req_msg_id: AntchainUtil.getNonce(),
436
+ access_key: this._accessKeyId,
437
+ base_sdk_version: "TeaSDK-2.0",
438
+ sdk_version: "1.0.1",
439
+ _prod_code: "RESOLVEAGENT",
440
+ _prod_channel: "default",
441
+ };
442
+ if (!Util.empty(this._securityToken)) {
443
+ request_.query["security_token"] = this._securityToken;
444
+ }
445
+
446
+ request_.headers = {
447
+ host: Util.defaultString(this._endpoint, "openapi.antchain.antgroup.com"),
448
+ 'user-agent': Util.getUserAgent(this._userAgent),
449
+ ...headers,
450
+ };
451
+ let tmp = Util.anyifyMapValue(RPCUtil.query(request));
452
+ request_.body = new $tea.BytesReadable(Util.toFormString(tmp));
453
+ request_.headers["content-type"] = "application/x-www-form-urlencoded";
454
+ let signedParam = {
455
+ ...request_.query,
456
+ ...RPCUtil.query(request),
457
+ };
458
+ request_.query["sign"] = AntchainUtil.getSignature(signedParam, this._accessKeySecret);
459
+ _lastRequest = request_;
460
+ let response_ = await $tea.doAction(request_, _runtime);
461
+
462
+ let raw = await Util.readAsString(response_.body);
463
+ let obj = Util.parseJSON(raw);
464
+ let res = Util.assertAsMap(obj);
465
+ let resp = Util.assertAsMap(res["response"]);
466
+ if (AntchainUtil.hasError(raw, this._accessKeySecret)) {
467
+ throw $tea.newError({
468
+ message: resp["result_msg"],
469
+ data: resp,
470
+ code: resp["result_code"],
471
+ });
472
+ }
473
+
474
+ return resp;
475
+ } catch (ex) {
476
+ if ($tea.isRetryable(ex)) {
477
+ continue;
478
+ }
479
+ throw ex;
480
+ }
481
+ }
482
+
483
+ throw $tea.newUnretryableError(_lastRequest);
484
+ }
485
+
486
+ /**
487
+ * @remarks
488
+ * Description: 贷后催调智能体批量名单导入接口
489
+ * Summary: 贷后催调智能体批量名单导入接口
490
+ */
491
+ async importTaskBatch(request: ImportTaskBatchRequest): Promise<ImportTaskBatchResponse> {
492
+ let runtime = new $Util.RuntimeOptions({ });
493
+ let headers : {[key: string ]: string} = { };
494
+ return await this.importTaskBatchEx(request, headers, runtime);
495
+ }
496
+
497
+ /**
498
+ * @remarks
499
+ * Description: 贷后催调智能体批量名单导入接口
500
+ * Summary: 贷后催调智能体批量名单导入接口
501
+ */
502
+ async importTaskBatchEx(request: ImportTaskBatchRequest, headers: {[key: string ]: string}, runtime: $Util.RuntimeOptions): Promise<ImportTaskBatchResponse> {
503
+ Util.validateModel(request);
504
+ return $tea.cast<ImportTaskBatchResponse>(await this.doRequest("1.0", "antdigital.resolveagent.task.batch.import", "HTTPS", "POST", `/gateway.do`, $tea.toMap(request), headers, runtime), new ImportTaskBatchResponse({}));
505
+ }
506
+
507
+ /**
508
+ * @remarks
509
+ * Description: 贷后对接360利率信息导入
510
+ * Summary: 贷后对接360利率信息导入
511
+ */
512
+ async importTaskRateinfo(request: ImportTaskRateinfoRequest): Promise<ImportTaskRateinfoResponse> {
513
+ let runtime = new $Util.RuntimeOptions({ });
514
+ let headers : {[key: string ]: string} = { };
515
+ return await this.importTaskRateinfoEx(request, headers, runtime);
516
+ }
517
+
518
+ /**
519
+ * @remarks
520
+ * Description: 贷后对接360利率信息导入
521
+ * Summary: 贷后对接360利率信息导入
522
+ */
523
+ async importTaskRateinfoEx(request: ImportTaskRateinfoRequest, headers: {[key: string ]: string}, runtime: $Util.RuntimeOptions): Promise<ImportTaskRateinfoResponse> {
524
+ Util.validateModel(request);
525
+ return $tea.cast<ImportTaskRateinfoResponse>(await this.doRequest("1.0", "antdigital.resolveagent.task.rateinfo.import", "HTTPS", "POST", `/gateway.do`, $tea.toMap(request), headers, runtime), new ImportTaskRateinfoResponse({}));
526
+ }
527
+
528
+ }