@antchain/realperson 1.21.3 → 1.21.19
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 +211 -0
- package/dist/client.js +410 -2
- package/dist/client.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +647 -1
package/src/client.ts
CHANGED
|
@@ -78,6 +78,137 @@ export class Config extends $tea.Model {
|
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
+
// 卡证OCR图片坐标
|
|
82
|
+
export class OcrLocation extends $tea.Model {
|
|
83
|
+
// 表示定位位置的长方形左上顶点的垂直坐标
|
|
84
|
+
top?: string;
|
|
85
|
+
// 表示定位位置的长方形左上顶点的水平坐标
|
|
86
|
+
left?: string;
|
|
87
|
+
// 表示定位位置的长方形的宽度
|
|
88
|
+
width?: string;
|
|
89
|
+
// 表示定位位置的长方形的高度
|
|
90
|
+
height?: string;
|
|
91
|
+
static names(): { [key: string]: string } {
|
|
92
|
+
return {
|
|
93
|
+
top: 'top',
|
|
94
|
+
left: 'left',
|
|
95
|
+
width: 'width',
|
|
96
|
+
height: 'height',
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
static types(): { [key: string]: any } {
|
|
101
|
+
return {
|
|
102
|
+
top: 'string',
|
|
103
|
+
left: 'string',
|
|
104
|
+
width: 'string',
|
|
105
|
+
height: 'string',
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
constructor(map?: { [key: string]: any }) {
|
|
110
|
+
super(map);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// 卡证OCR图片质量
|
|
115
|
+
export class CardQuality extends $tea.Model {
|
|
116
|
+
// 1-清晰
|
|
117
|
+
// 0-不清晰
|
|
118
|
+
//
|
|
119
|
+
isClear?: string;
|
|
120
|
+
// 清晰度取值0-1,值越大表示图像质量越好,默认阈值0.5
|
|
121
|
+
isClearPropobility?: string;
|
|
122
|
+
// 1-边框/四角完整
|
|
123
|
+
// 0-边框/四角不完整
|
|
124
|
+
isComplete?: string;
|
|
125
|
+
// 取值0-1,值越大表示图像质量越好,默认阈值0.5
|
|
126
|
+
isCompletePropobility?: string;
|
|
127
|
+
// 1-头像、关键字段无遮挡/马赛克
|
|
128
|
+
// 0-头像、关键字段有遮挡/马赛克
|
|
129
|
+
isNoCover?: string;
|
|
130
|
+
// 有无遮挡propobility-取值0-1,值越大表示图像质量越好,默认阈值0.3
|
|
131
|
+
isNoCoverPropobility?: string;
|
|
132
|
+
static names(): { [key: string]: string } {
|
|
133
|
+
return {
|
|
134
|
+
isClear: 'is_clear',
|
|
135
|
+
isClearPropobility: 'is_clear_propobility',
|
|
136
|
+
isComplete: 'is_complete',
|
|
137
|
+
isCompletePropobility: 'is_complete_propobility',
|
|
138
|
+
isNoCover: 'is_no_cover',
|
|
139
|
+
isNoCoverPropobility: 'is_no_cover_propobility',
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
static types(): { [key: string]: any } {
|
|
144
|
+
return {
|
|
145
|
+
isClear: 'string',
|
|
146
|
+
isClearPropobility: 'string',
|
|
147
|
+
isComplete: 'string',
|
|
148
|
+
isCompletePropobility: 'string',
|
|
149
|
+
isNoCover: 'string',
|
|
150
|
+
isNoCoverPropobility: 'string',
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
constructor(map?: { [key: string]: any }) {
|
|
155
|
+
super(map);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// 卡证OCR风险结果
|
|
160
|
+
export class RiskInfo extends $tea.Model {
|
|
161
|
+
// 是否为复印件(仅身份证、银行卡含该字段)。0:否,1:是
|
|
162
|
+
copy?: string;
|
|
163
|
+
// 是否翻拍(仅身份证含该字段)。0:否,1:是
|
|
164
|
+
reshoot?: string;
|
|
165
|
+
// normal-识别正常
|
|
166
|
+
// non_idcard-上传的图片中不包含身份证
|
|
167
|
+
// blurred-身份证模糊
|
|
168
|
+
// other_type_card-其他类型证照
|
|
169
|
+
// over_exposure-身份证关键字段反光或过曝
|
|
170
|
+
// over_dark-身份证欠曝(亮度过低)
|
|
171
|
+
// unknown-未知状态
|
|
172
|
+
imageStatus?: string[];
|
|
173
|
+
// 输入参数 risk_info_type=true 时,则返回该字段,判断身份证是否存在风险,返回值:
|
|
174
|
+
// normal-正常身份证;
|
|
175
|
+
// copy-复印件;
|
|
176
|
+
// temporary-临时身份证;
|
|
177
|
+
// screen-翻拍;
|
|
178
|
+
// PS-被PS修改;
|
|
179
|
+
// unknown-其他未知情况
|
|
180
|
+
riskType?: string[];
|
|
181
|
+
// 图片质量
|
|
182
|
+
cardQuality?: CardQuality;
|
|
183
|
+
// 证件一致性
|
|
184
|
+
idcardNumberType?: string;
|
|
185
|
+
static names(): { [key: string]: string } {
|
|
186
|
+
return {
|
|
187
|
+
copy: 'copy',
|
|
188
|
+
reshoot: 'reshoot',
|
|
189
|
+
imageStatus: 'image_status',
|
|
190
|
+
riskType: 'risk_type',
|
|
191
|
+
cardQuality: 'card_quality',
|
|
192
|
+
idcardNumberType: 'idcard_number_type',
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
static types(): { [key: string]: any } {
|
|
197
|
+
return {
|
|
198
|
+
copy: 'string',
|
|
199
|
+
reshoot: 'string',
|
|
200
|
+
imageStatus: { 'type': 'array', 'itemType': 'string' },
|
|
201
|
+
riskType: { 'type': 'array', 'itemType': 'string' },
|
|
202
|
+
cardQuality: CardQuality,
|
|
203
|
+
idcardNumberType: 'string',
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
constructor(map?: { [key: string]: any }) {
|
|
208
|
+
super(map);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
81
212
|
// 音频元数据
|
|
82
213
|
export class AudioMeta extends $tea.Model {
|
|
83
214
|
// 采样率
|
|
@@ -140,6 +271,208 @@ export class Audio extends $tea.Model {
|
|
|
140
271
|
}
|
|
141
272
|
}
|
|
142
273
|
|
|
274
|
+
// 卡证OCR识别结果
|
|
275
|
+
export class OcrInfo extends $tea.Model {
|
|
276
|
+
// 当识别到身份证是人像面时返回FACE,国徽面时返回BACK
|
|
277
|
+
side?: string;
|
|
278
|
+
// 当请求参数 return_photo = true时返回,头像切图的 base64 编码(无编码头,需自行处理)
|
|
279
|
+
// *当服务降级时,返回null
|
|
280
|
+
photo?: string;
|
|
281
|
+
// {} 当请求参数 return_photo = true时返回,头像的位置信息(坐标0点为左上角)
|
|
282
|
+
// *当服务降级时,返回null
|
|
283
|
+
photoLocation?: OcrLocation;
|
|
284
|
+
// 当请求参数 return_card = true时返回,身份证裁剪切图的 base64 编码(无编码头,需自行处理)
|
|
285
|
+
// *当服务降级时,返回null
|
|
286
|
+
cardImage?: string;
|
|
287
|
+
// 当请求参数 return_card = true时返回,身份证裁剪切图的位置信息(坐标0点为左上角)
|
|
288
|
+
// *当服务降级时,返回null
|
|
289
|
+
cardLocation?: OcrLocation;
|
|
290
|
+
// 姓名
|
|
291
|
+
name?: string;
|
|
292
|
+
// 性别
|
|
293
|
+
sex?: string;
|
|
294
|
+
// 民族
|
|
295
|
+
nationality?: string;
|
|
296
|
+
// 出生日期(yyyyMMdd格式)
|
|
297
|
+
birth?: string;
|
|
298
|
+
// 住址
|
|
299
|
+
address?: string;
|
|
300
|
+
// 身份证号
|
|
301
|
+
num?: string;
|
|
302
|
+
// 发证日期(yyyyMMdd格式)
|
|
303
|
+
startDate?: string;
|
|
304
|
+
// 到期日(yyyyMMdd格式)。
|
|
305
|
+
// 如果是长期身份证,该字段内容为“长期”(不含引号)。
|
|
306
|
+
endDate?: string;
|
|
307
|
+
// 签发机关
|
|
308
|
+
issue?: string;
|
|
309
|
+
// 银行卡类型(CC(贷记卡),SCC(准贷记卡),DCC(存贷合一卡),DC(储蓄卡),PC(预付卡))
|
|
310
|
+
bankCardType?: string;
|
|
311
|
+
// 银行名,不能识别时为空
|
|
312
|
+
bankName?: string;
|
|
313
|
+
// 银行卡号
|
|
314
|
+
cardNumber?: string;
|
|
315
|
+
// 有效期至
|
|
316
|
+
validToDate?: string;
|
|
317
|
+
// 证件类别
|
|
318
|
+
title?: string;
|
|
319
|
+
// 有效期限(yyyy.MM.dd-yyyy.MM.dd格式)
|
|
320
|
+
dateOfExpiry?: string;
|
|
321
|
+
// 换证次数
|
|
322
|
+
changeNum?: string;
|
|
323
|
+
// 初次领证日期
|
|
324
|
+
firstIssue?: string;
|
|
325
|
+
// 准驾车型
|
|
326
|
+
driverClass?: string;
|
|
327
|
+
// 档案编号
|
|
328
|
+
docNum?: string;
|
|
329
|
+
// 电子驾驶证生成时间
|
|
330
|
+
issueTime?: string;
|
|
331
|
+
// 当前时间
|
|
332
|
+
currentTime?: string;
|
|
333
|
+
// 条形码编号
|
|
334
|
+
barCode?: string;
|
|
335
|
+
// 累计记分
|
|
336
|
+
points?: string;
|
|
337
|
+
// 记录
|
|
338
|
+
remark?: string;
|
|
339
|
+
// 状态
|
|
340
|
+
status?: string;
|
|
341
|
+
// 车辆识别代号
|
|
342
|
+
vehicle?: string;
|
|
343
|
+
// 品牌型号
|
|
344
|
+
model?: string;
|
|
345
|
+
// 车辆类型
|
|
346
|
+
type?: string;
|
|
347
|
+
// 使用性质
|
|
348
|
+
useage?: string;
|
|
349
|
+
// 发动机号码
|
|
350
|
+
engNum?: string;
|
|
351
|
+
// 车牌号码
|
|
352
|
+
plate?: string;
|
|
353
|
+
// 检验记录
|
|
354
|
+
inspecRecord?: string;
|
|
355
|
+
// 核定载质量
|
|
356
|
+
load?: string;
|
|
357
|
+
// 整备质量
|
|
358
|
+
curbMass?: string;
|
|
359
|
+
// 外廓尺寸
|
|
360
|
+
overallDimension?: string;
|
|
361
|
+
// 核定载人数
|
|
362
|
+
seating?: string;
|
|
363
|
+
// 总质量
|
|
364
|
+
grossMass?: string;
|
|
365
|
+
// 燃油类型
|
|
366
|
+
fuel?: string;
|
|
367
|
+
// 准牵引总质量
|
|
368
|
+
tractionMass?: string;
|
|
369
|
+
// 证芯编号
|
|
370
|
+
chipNum?: string;
|
|
371
|
+
static names(): { [key: string]: string } {
|
|
372
|
+
return {
|
|
373
|
+
side: 'side',
|
|
374
|
+
photo: 'photo',
|
|
375
|
+
photoLocation: 'photo_location',
|
|
376
|
+
cardImage: 'card_image',
|
|
377
|
+
cardLocation: 'card_location',
|
|
378
|
+
name: 'name',
|
|
379
|
+
sex: 'sex',
|
|
380
|
+
nationality: 'nationality',
|
|
381
|
+
birth: 'birth',
|
|
382
|
+
address: 'address',
|
|
383
|
+
num: 'num',
|
|
384
|
+
startDate: 'start_date',
|
|
385
|
+
endDate: 'end_date',
|
|
386
|
+
issue: 'issue',
|
|
387
|
+
bankCardType: 'bank_card_type',
|
|
388
|
+
bankName: 'bank_name',
|
|
389
|
+
cardNumber: 'card_number',
|
|
390
|
+
validToDate: 'valid_to_date',
|
|
391
|
+
title: 'title',
|
|
392
|
+
dateOfExpiry: 'date_of_expiry',
|
|
393
|
+
changeNum: 'change_num',
|
|
394
|
+
firstIssue: 'first_issue',
|
|
395
|
+
driverClass: 'driver_class',
|
|
396
|
+
docNum: 'doc_num',
|
|
397
|
+
issueTime: 'issue_time',
|
|
398
|
+
currentTime: 'current_time',
|
|
399
|
+
barCode: 'bar_code',
|
|
400
|
+
points: 'points',
|
|
401
|
+
remark: 'remark',
|
|
402
|
+
status: 'status',
|
|
403
|
+
vehicle: 'vehicle',
|
|
404
|
+
model: 'model',
|
|
405
|
+
type: 'type',
|
|
406
|
+
useage: 'useage',
|
|
407
|
+
engNum: 'eng_num',
|
|
408
|
+
plate: 'plate',
|
|
409
|
+
inspecRecord: 'inspec_record',
|
|
410
|
+
load: 'load',
|
|
411
|
+
curbMass: 'curb_mass',
|
|
412
|
+
overallDimension: 'overall_dimension',
|
|
413
|
+
seating: 'seating',
|
|
414
|
+
grossMass: 'gross_mass',
|
|
415
|
+
fuel: 'fuel',
|
|
416
|
+
tractionMass: 'traction_mass',
|
|
417
|
+
chipNum: 'chip_num',
|
|
418
|
+
};
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
static types(): { [key: string]: any } {
|
|
422
|
+
return {
|
|
423
|
+
side: 'string',
|
|
424
|
+
photo: 'string',
|
|
425
|
+
photoLocation: OcrLocation,
|
|
426
|
+
cardImage: 'string',
|
|
427
|
+
cardLocation: OcrLocation,
|
|
428
|
+
name: 'string',
|
|
429
|
+
sex: 'string',
|
|
430
|
+
nationality: 'string',
|
|
431
|
+
birth: 'string',
|
|
432
|
+
address: 'string',
|
|
433
|
+
num: 'string',
|
|
434
|
+
startDate: 'string',
|
|
435
|
+
endDate: 'string',
|
|
436
|
+
issue: 'string',
|
|
437
|
+
bankCardType: 'string',
|
|
438
|
+
bankName: 'string',
|
|
439
|
+
cardNumber: 'string',
|
|
440
|
+
validToDate: 'string',
|
|
441
|
+
title: 'string',
|
|
442
|
+
dateOfExpiry: 'string',
|
|
443
|
+
changeNum: 'string',
|
|
444
|
+
firstIssue: 'string',
|
|
445
|
+
driverClass: 'string',
|
|
446
|
+
docNum: 'string',
|
|
447
|
+
issueTime: 'string',
|
|
448
|
+
currentTime: 'string',
|
|
449
|
+
barCode: 'string',
|
|
450
|
+
points: 'string',
|
|
451
|
+
remark: 'string',
|
|
452
|
+
status: 'string',
|
|
453
|
+
vehicle: 'string',
|
|
454
|
+
model: 'string',
|
|
455
|
+
type: 'string',
|
|
456
|
+
useage: 'string',
|
|
457
|
+
engNum: 'string',
|
|
458
|
+
plate: 'string',
|
|
459
|
+
inspecRecord: 'string',
|
|
460
|
+
load: 'string',
|
|
461
|
+
curbMass: 'string',
|
|
462
|
+
overallDimension: 'string',
|
|
463
|
+
seating: 'string',
|
|
464
|
+
grossMass: 'string',
|
|
465
|
+
fuel: 'string',
|
|
466
|
+
tractionMass: 'string',
|
|
467
|
+
chipNum: 'string',
|
|
468
|
+
};
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
constructor(map?: { [key: string]: any }) {
|
|
472
|
+
super(map);
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
|
|
143
476
|
// 键值对
|
|
144
477
|
export class XNameValuePair extends $tea.Model {
|
|
145
478
|
// 键名
|
|
@@ -3922,6 +4255,10 @@ export class CreateFaceverifyServerRequest extends $tea.Model {
|
|
|
3922
4255
|
callbackNeedRetry?: string;
|
|
3923
4256
|
// 活体检测的类型
|
|
3924
4257
|
model?: string;
|
|
4258
|
+
// 图片文件
|
|
4259
|
+
fileObject?: Readable;
|
|
4260
|
+
fileObjectName?: string;
|
|
4261
|
+
fileId?: string;
|
|
3925
4262
|
static names(): { [key: string]: string } {
|
|
3926
4263
|
return {
|
|
3927
4264
|
authToken: 'auth_token',
|
|
@@ -3944,6 +4281,9 @@ export class CreateFaceverifyServerRequest extends $tea.Model {
|
|
|
3944
4281
|
userMobile: 'user_mobile',
|
|
3945
4282
|
callbackNeedRetry: 'callback_need_retry',
|
|
3946
4283
|
model: 'model',
|
|
4284
|
+
fileObject: 'fileObject',
|
|
4285
|
+
fileObjectName: 'fileObjectName',
|
|
4286
|
+
fileId: 'file_id',
|
|
3947
4287
|
};
|
|
3948
4288
|
}
|
|
3949
4289
|
|
|
@@ -3969,6 +4309,9 @@ export class CreateFaceverifyServerRequest extends $tea.Model {
|
|
|
3969
4309
|
userMobile: 'string',
|
|
3970
4310
|
callbackNeedRetry: 'string',
|
|
3971
4311
|
model: 'string',
|
|
4312
|
+
fileObject: 'Readable',
|
|
4313
|
+
fileObjectName: 'string',
|
|
4314
|
+
fileId: 'string',
|
|
3972
4315
|
};
|
|
3973
4316
|
}
|
|
3974
4317
|
|
|
@@ -4871,6 +5214,205 @@ export class QueryFaceverifyServermaterialResponse extends $tea.Model {
|
|
|
4871
5214
|
}
|
|
4872
5215
|
}
|
|
4873
5216
|
|
|
5217
|
+
export class ScaleinImageRequest extends $tea.Model {
|
|
5218
|
+
// OAuth模式下的授权token
|
|
5219
|
+
authToken?: string;
|
|
5220
|
+
productInstanceId?: string;
|
|
5221
|
+
// 图片
|
|
5222
|
+
fileObject?: Readable;
|
|
5223
|
+
fileObjectName?: string;
|
|
5224
|
+
fileId: string;
|
|
5225
|
+
static names(): { [key: string]: string } {
|
|
5226
|
+
return {
|
|
5227
|
+
authToken: 'auth_token',
|
|
5228
|
+
productInstanceId: 'product_instance_id',
|
|
5229
|
+
fileObject: 'fileObject',
|
|
5230
|
+
fileObjectName: 'fileObjectName',
|
|
5231
|
+
fileId: 'file_id',
|
|
5232
|
+
};
|
|
5233
|
+
}
|
|
5234
|
+
|
|
5235
|
+
static types(): { [key: string]: any } {
|
|
5236
|
+
return {
|
|
5237
|
+
authToken: 'string',
|
|
5238
|
+
productInstanceId: 'string',
|
|
5239
|
+
fileObject: 'Readable',
|
|
5240
|
+
fileObjectName: 'string',
|
|
5241
|
+
fileId: 'string',
|
|
5242
|
+
};
|
|
5243
|
+
}
|
|
5244
|
+
|
|
5245
|
+
constructor(map?: { [key: string]: any }) {
|
|
5246
|
+
super(map);
|
|
5247
|
+
}
|
|
5248
|
+
}
|
|
5249
|
+
|
|
5250
|
+
export class ScaleinImageResponse extends $tea.Model {
|
|
5251
|
+
// 请求唯一ID,用于链路跟踪和问题排查
|
|
5252
|
+
reqMsgId?: string;
|
|
5253
|
+
// 结果码,一般OK表示调用成功
|
|
5254
|
+
resultCode?: string;
|
|
5255
|
+
// 异常信息的文本描述
|
|
5256
|
+
resultMsg?: string;
|
|
5257
|
+
// 压缩后的图片base64
|
|
5258
|
+
base64?: string;
|
|
5259
|
+
static names(): { [key: string]: string } {
|
|
5260
|
+
return {
|
|
5261
|
+
reqMsgId: 'req_msg_id',
|
|
5262
|
+
resultCode: 'result_code',
|
|
5263
|
+
resultMsg: 'result_msg',
|
|
5264
|
+
base64: 'base64',
|
|
5265
|
+
};
|
|
5266
|
+
}
|
|
5267
|
+
|
|
5268
|
+
static types(): { [key: string]: any } {
|
|
5269
|
+
return {
|
|
5270
|
+
reqMsgId: 'string',
|
|
5271
|
+
resultCode: 'string',
|
|
5272
|
+
resultMsg: 'string',
|
|
5273
|
+
base64: 'string',
|
|
5274
|
+
};
|
|
5275
|
+
}
|
|
5276
|
+
|
|
5277
|
+
constructor(map?: { [key: string]: any }) {
|
|
5278
|
+
super(map);
|
|
5279
|
+
}
|
|
5280
|
+
}
|
|
5281
|
+
|
|
5282
|
+
export class RecognizeOcrIndividualcardRequest extends $tea.Model {
|
|
5283
|
+
// OAuth模式下的授权token
|
|
5284
|
+
authToken?: string;
|
|
5285
|
+
productInstanceId?: string;
|
|
5286
|
+
// 长度不超过32位的0-9A-Za-z字符串。 外部请求ID,由调用方自行生成并自行保证唯一,以便问题定位。
|
|
5287
|
+
outerOrderNo: string;
|
|
5288
|
+
// 待识别的卡类型。取值约束:ID_CARD(身份证);EEP_TO_ML_CARD(港澳来往大陆通行证);BANK_CARD(银行卡)
|
|
5289
|
+
ocrType: string;
|
|
5290
|
+
// 传入的图片是base64编码的图片还是图片的URL。取值约束:BASE64(类型为base64);FILE(文件)、URL(暂不支持)
|
|
5291
|
+
dataType: string;
|
|
5292
|
+
// 传入的图片的具体内容,需要与data_type的选择保持一致。
|
|
5293
|
+
//
|
|
5294
|
+
dataContent?: string;
|
|
5295
|
+
// 证件图片
|
|
5296
|
+
fileObject?: Readable;
|
|
5297
|
+
fileObjectName?: string;
|
|
5298
|
+
fileId?: string;
|
|
5299
|
+
// 入参data_content是否经AES加密。不填默认不加密。取值约束:0(不加密);1(加密)
|
|
5300
|
+
reqEncType?: string;
|
|
5301
|
+
// 出参ocr_info是否经AES加密。不填默认不加密。取值约束:0(不加密);1(加密)
|
|
5302
|
+
respEncType?: string;
|
|
5303
|
+
// 经过公钥RSA加密的AES密钥,用于对出参ocr_info加密。当req_enc_type = 1或resp_enc_type = 1时必填。
|
|
5304
|
+
encToken?: string;
|
|
5305
|
+
// 是否启用防伪检测,如果启用,出参会输出riskInfo字段。不填默认不启用防伪。取值约束:0(不启用);1(启用)
|
|
5306
|
+
riskInfoType?: string;
|
|
5307
|
+
// 是否返回身份证头像照片 0:否 1:是 不填默认不返回。
|
|
5308
|
+
returnPhoto?: string;
|
|
5309
|
+
// 是否返回身份证图片 0:否 1:是 不填默认不返回。
|
|
5310
|
+
returnImage?: string;
|
|
5311
|
+
// 扩展信息JSON串。
|
|
5312
|
+
externParam?: string;
|
|
5313
|
+
static names(): { [key: string]: string } {
|
|
5314
|
+
return {
|
|
5315
|
+
authToken: 'auth_token',
|
|
5316
|
+
productInstanceId: 'product_instance_id',
|
|
5317
|
+
outerOrderNo: 'outer_order_no',
|
|
5318
|
+
ocrType: 'ocr_type',
|
|
5319
|
+
dataType: 'data_type',
|
|
5320
|
+
dataContent: 'data_content',
|
|
5321
|
+
fileObject: 'fileObject',
|
|
5322
|
+
fileObjectName: 'fileObjectName',
|
|
5323
|
+
fileId: 'file_id',
|
|
5324
|
+
reqEncType: 'req_enc_type',
|
|
5325
|
+
respEncType: 'resp_enc_type',
|
|
5326
|
+
encToken: 'enc_token',
|
|
5327
|
+
riskInfoType: 'risk_info_type',
|
|
5328
|
+
returnPhoto: 'return_photo',
|
|
5329
|
+
returnImage: 'return_image',
|
|
5330
|
+
externParam: 'extern_param',
|
|
5331
|
+
};
|
|
5332
|
+
}
|
|
5333
|
+
|
|
5334
|
+
static types(): { [key: string]: any } {
|
|
5335
|
+
return {
|
|
5336
|
+
authToken: 'string',
|
|
5337
|
+
productInstanceId: 'string',
|
|
5338
|
+
outerOrderNo: 'string',
|
|
5339
|
+
ocrType: 'string',
|
|
5340
|
+
dataType: 'string',
|
|
5341
|
+
dataContent: 'string',
|
|
5342
|
+
fileObject: 'Readable',
|
|
5343
|
+
fileObjectName: 'string',
|
|
5344
|
+
fileId: 'string',
|
|
5345
|
+
reqEncType: 'string',
|
|
5346
|
+
respEncType: 'string',
|
|
5347
|
+
encToken: 'string',
|
|
5348
|
+
riskInfoType: 'string',
|
|
5349
|
+
returnPhoto: 'string',
|
|
5350
|
+
returnImage: 'string',
|
|
5351
|
+
externParam: 'string',
|
|
5352
|
+
};
|
|
5353
|
+
}
|
|
5354
|
+
|
|
5355
|
+
constructor(map?: { [key: string]: any }) {
|
|
5356
|
+
super(map);
|
|
5357
|
+
}
|
|
5358
|
+
}
|
|
5359
|
+
|
|
5360
|
+
export class RecognizeOcrIndividualcardResponse extends $tea.Model {
|
|
5361
|
+
// 请求唯一ID,用于链路跟踪和问题排查
|
|
5362
|
+
reqMsgId?: string;
|
|
5363
|
+
// 结果码,一般OK表示调用成功
|
|
5364
|
+
resultCode?: string;
|
|
5365
|
+
// 异常信息的文本描述
|
|
5366
|
+
resultMsg?: string;
|
|
5367
|
+
// 返回结果码
|
|
5368
|
+
retCode?: string;
|
|
5369
|
+
// 错误码
|
|
5370
|
+
retCodeSub?: string;
|
|
5371
|
+
// 错误信息
|
|
5372
|
+
retMessageSub?: string;
|
|
5373
|
+
// 识别结果,为JSON串。如果入参resp_enc_type=1则是经过AES加密后的JSON串。
|
|
5374
|
+
ocrInfo?: OcrInfo;
|
|
5375
|
+
// 防伪结果,为JSON串。如果入参resp_enc_type=1则是经过AES加密后的JSON串。 如果不启用防伪,则不返回该字段。
|
|
5376
|
+
riskInfo?: RiskInfo;
|
|
5377
|
+
// 扩展信息JSON串。
|
|
5378
|
+
extInfo?: string;
|
|
5379
|
+
// 加密后的识别结果
|
|
5380
|
+
ocrInfoEncrypt?: string;
|
|
5381
|
+
static names(): { [key: string]: string } {
|
|
5382
|
+
return {
|
|
5383
|
+
reqMsgId: 'req_msg_id',
|
|
5384
|
+
resultCode: 'result_code',
|
|
5385
|
+
resultMsg: 'result_msg',
|
|
5386
|
+
retCode: 'ret_code',
|
|
5387
|
+
retCodeSub: 'ret_code_sub',
|
|
5388
|
+
retMessageSub: 'ret_message_sub',
|
|
5389
|
+
ocrInfo: 'ocr_info',
|
|
5390
|
+
riskInfo: 'risk_info',
|
|
5391
|
+
extInfo: 'ext_info',
|
|
5392
|
+
ocrInfoEncrypt: 'ocr_info_encrypt',
|
|
5393
|
+
};
|
|
5394
|
+
}
|
|
5395
|
+
|
|
5396
|
+
static types(): { [key: string]: any } {
|
|
5397
|
+
return {
|
|
5398
|
+
reqMsgId: 'string',
|
|
5399
|
+
resultCode: 'string',
|
|
5400
|
+
resultMsg: 'string',
|
|
5401
|
+
retCode: 'string',
|
|
5402
|
+
retCodeSub: 'string',
|
|
5403
|
+
retMessageSub: 'string',
|
|
5404
|
+
ocrInfo: OcrInfo,
|
|
5405
|
+
riskInfo: RiskInfo,
|
|
5406
|
+
extInfo: 'string',
|
|
5407
|
+
ocrInfoEncrypt: 'string',
|
|
5408
|
+
};
|
|
5409
|
+
}
|
|
5410
|
+
|
|
5411
|
+
constructor(map?: { [key: string]: any }) {
|
|
5412
|
+
super(map);
|
|
5413
|
+
}
|
|
5414
|
+
}
|
|
5415
|
+
|
|
4874
5416
|
export class CreateAntcloudGatewayxFileUploadRequest extends $tea.Model {
|
|
4875
5417
|
// OAuth模式下的授权token
|
|
4876
5418
|
authToken?: string;
|
|
@@ -5072,7 +5614,7 @@ export default class Client {
|
|
|
5072
5614
|
req_msg_id: AntchainUtil.getNonce(),
|
|
5073
5615
|
access_key: this._accessKeyId,
|
|
5074
5616
|
base_sdk_version: "TeaSDK-2.0",
|
|
5075
|
-
sdk_version: "1.21.
|
|
5617
|
+
sdk_version: "1.21.19",
|
|
5076
5618
|
_prod_code: "REALPERSON",
|
|
5077
5619
|
_prod_channel: "undefined",
|
|
5078
5620
|
};
|
|
@@ -5999,6 +6541,28 @@ export default class Client {
|
|
|
5999
6541
|
* Summary: 数科刷脸服务端初始化接口
|
|
6000
6542
|
*/
|
|
6001
6543
|
async createFaceverifyServerEx(request: CreateFaceverifyServerRequest, headers: {[key: string ]: string}, runtime: $Util.RuntimeOptions): Promise<CreateFaceverifyServerResponse> {
|
|
6544
|
+
if (!Util.isUnset(request.fileObject)) {
|
|
6545
|
+
let uploadReq = new CreateAntcloudGatewayxFileUploadRequest({
|
|
6546
|
+
authToken: request.authToken,
|
|
6547
|
+
apiCode: "di.realperson.faceverify.server.create",
|
|
6548
|
+
fileName: request.fileObjectName,
|
|
6549
|
+
});
|
|
6550
|
+
let uploadResp = await this.createAntcloudGatewayxFileUploadEx(uploadReq, headers, runtime);
|
|
6551
|
+
if (!AntchainUtil.isSuccess(uploadResp.resultCode, "ok")) {
|
|
6552
|
+
let createFaceverifyServerResponse = new CreateFaceverifyServerResponse({
|
|
6553
|
+
reqMsgId: uploadResp.reqMsgId,
|
|
6554
|
+
resultCode: uploadResp.resultCode,
|
|
6555
|
+
resultMsg: uploadResp.resultMsg,
|
|
6556
|
+
});
|
|
6557
|
+
return createFaceverifyServerResponse;
|
|
6558
|
+
}
|
|
6559
|
+
|
|
6560
|
+
let uploadHeaders = AntchainUtil.parseUploadHeaders(uploadResp.uploadHeaders);
|
|
6561
|
+
await AntchainUtil.putObject(request.fileObject, uploadHeaders, uploadResp.uploadUrl);
|
|
6562
|
+
request.fileId = uploadResp.fileId;
|
|
6563
|
+
request.fileObject = null;
|
|
6564
|
+
}
|
|
6565
|
+
|
|
6002
6566
|
Util.validateModel(request);
|
|
6003
6567
|
return $tea.cast<CreateFaceverifyServerResponse>(await this.doRequest("1.0", "di.realperson.faceverify.server.create", "HTTPS", "POST", `/gateway.do`, $tea.toMap(request), headers, runtime), new CreateFaceverifyServerResponse({}));
|
|
6004
6568
|
}
|
|
@@ -6196,6 +6760,88 @@ export default class Client {
|
|
|
6196
6760
|
return $tea.cast<QueryFaceverifyServermaterialResponse>(await this.doRequest("1.0", "di.realperson.faceverify.servermaterial.query", "HTTPS", "POST", `/gateway.do`, $tea.toMap(request), headers, runtime), new QueryFaceverifyServermaterialResponse({}));
|
|
6197
6761
|
}
|
|
6198
6762
|
|
|
6763
|
+
/**
|
|
6764
|
+
* Description: 图片压缩接口
|
|
6765
|
+
* Summary: 图片压缩接口
|
|
6766
|
+
*/
|
|
6767
|
+
async scaleinImage(request: ScaleinImageRequest): Promise<ScaleinImageResponse> {
|
|
6768
|
+
let runtime = new $Util.RuntimeOptions({ });
|
|
6769
|
+
let headers : {[key: string ]: string} = { };
|
|
6770
|
+
return await this.scaleinImageEx(request, headers, runtime);
|
|
6771
|
+
}
|
|
6772
|
+
|
|
6773
|
+
/**
|
|
6774
|
+
* Description: 图片压缩接口
|
|
6775
|
+
* Summary: 图片压缩接口
|
|
6776
|
+
*/
|
|
6777
|
+
async scaleinImageEx(request: ScaleinImageRequest, headers: {[key: string ]: string}, runtime: $Util.RuntimeOptions): Promise<ScaleinImageResponse> {
|
|
6778
|
+
if (!Util.isUnset(request.fileObject)) {
|
|
6779
|
+
let uploadReq = new CreateAntcloudGatewayxFileUploadRequest({
|
|
6780
|
+
authToken: request.authToken,
|
|
6781
|
+
apiCode: "di.realperson.image.scalein",
|
|
6782
|
+
fileName: request.fileObjectName,
|
|
6783
|
+
});
|
|
6784
|
+
let uploadResp = await this.createAntcloudGatewayxFileUploadEx(uploadReq, headers, runtime);
|
|
6785
|
+
if (!AntchainUtil.isSuccess(uploadResp.resultCode, "ok")) {
|
|
6786
|
+
let scaleinImageResponse = new ScaleinImageResponse({
|
|
6787
|
+
reqMsgId: uploadResp.reqMsgId,
|
|
6788
|
+
resultCode: uploadResp.resultCode,
|
|
6789
|
+
resultMsg: uploadResp.resultMsg,
|
|
6790
|
+
});
|
|
6791
|
+
return scaleinImageResponse;
|
|
6792
|
+
}
|
|
6793
|
+
|
|
6794
|
+
let uploadHeaders = AntchainUtil.parseUploadHeaders(uploadResp.uploadHeaders);
|
|
6795
|
+
await AntchainUtil.putObject(request.fileObject, uploadHeaders, uploadResp.uploadUrl);
|
|
6796
|
+
request.fileId = uploadResp.fileId;
|
|
6797
|
+
request.fileObject = null;
|
|
6798
|
+
}
|
|
6799
|
+
|
|
6800
|
+
Util.validateModel(request);
|
|
6801
|
+
return $tea.cast<ScaleinImageResponse>(await this.doRequest("1.0", "di.realperson.image.scalein", "HTTPS", "POST", `/gateway.do`, $tea.toMap(request), headers, runtime), new ScaleinImageResponse({}));
|
|
6802
|
+
}
|
|
6803
|
+
|
|
6804
|
+
/**
|
|
6805
|
+
* Description: 要素卡证OCR
|
|
6806
|
+
* Summary: 要素卡证OCR
|
|
6807
|
+
*/
|
|
6808
|
+
async recognizeOcrIndividualcard(request: RecognizeOcrIndividualcardRequest): Promise<RecognizeOcrIndividualcardResponse> {
|
|
6809
|
+
let runtime = new $Util.RuntimeOptions({ });
|
|
6810
|
+
let headers : {[key: string ]: string} = { };
|
|
6811
|
+
return await this.recognizeOcrIndividualcardEx(request, headers, runtime);
|
|
6812
|
+
}
|
|
6813
|
+
|
|
6814
|
+
/**
|
|
6815
|
+
* Description: 要素卡证OCR
|
|
6816
|
+
* Summary: 要素卡证OCR
|
|
6817
|
+
*/
|
|
6818
|
+
async recognizeOcrIndividualcardEx(request: RecognizeOcrIndividualcardRequest, headers: {[key: string ]: string}, runtime: $Util.RuntimeOptions): Promise<RecognizeOcrIndividualcardResponse> {
|
|
6819
|
+
if (!Util.isUnset(request.fileObject)) {
|
|
6820
|
+
let uploadReq = new CreateAntcloudGatewayxFileUploadRequest({
|
|
6821
|
+
authToken: request.authToken,
|
|
6822
|
+
apiCode: "di.realperson.ocr.individualcard.recognize",
|
|
6823
|
+
fileName: request.fileObjectName,
|
|
6824
|
+
});
|
|
6825
|
+
let uploadResp = await this.createAntcloudGatewayxFileUploadEx(uploadReq, headers, runtime);
|
|
6826
|
+
if (!AntchainUtil.isSuccess(uploadResp.resultCode, "ok")) {
|
|
6827
|
+
let recognizeOcrIndividualcardResponse = new RecognizeOcrIndividualcardResponse({
|
|
6828
|
+
reqMsgId: uploadResp.reqMsgId,
|
|
6829
|
+
resultCode: uploadResp.resultCode,
|
|
6830
|
+
resultMsg: uploadResp.resultMsg,
|
|
6831
|
+
});
|
|
6832
|
+
return recognizeOcrIndividualcardResponse;
|
|
6833
|
+
}
|
|
6834
|
+
|
|
6835
|
+
let uploadHeaders = AntchainUtil.parseUploadHeaders(uploadResp.uploadHeaders);
|
|
6836
|
+
await AntchainUtil.putObject(request.fileObject, uploadHeaders, uploadResp.uploadUrl);
|
|
6837
|
+
request.fileId = uploadResp.fileId;
|
|
6838
|
+
request.fileObject = null;
|
|
6839
|
+
}
|
|
6840
|
+
|
|
6841
|
+
Util.validateModel(request);
|
|
6842
|
+
return $tea.cast<RecognizeOcrIndividualcardResponse>(await this.doRequest("1.0", "di.realperson.ocr.individualcard.recognize", "HTTPS", "POST", `/gateway.do`, $tea.toMap(request), headers, runtime), new RecognizeOcrIndividualcardResponse({}));
|
|
6843
|
+
}
|
|
6844
|
+
|
|
6199
6845
|
/**
|
|
6200
6846
|
* Description: 创建HTTP PUT提交的文件上传
|
|
6201
6847
|
* Summary: 文件上传创建
|