@alicloud/cloudauth20190307 3.4.1 → 3.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.d.ts +347 -0
- package/dist/client.js +460 -4
- package/dist/client.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +769 -46
package/src/client.ts
CHANGED
|
@@ -321,6 +321,170 @@ export class CredentialVerifyResponseBodyResultObject extends $dara.Model {
|
|
|
321
321
|
}
|
|
322
322
|
}
|
|
323
323
|
|
|
324
|
+
export class CredentialVerifyV2RequestMerchantDetail extends $dara.Model {
|
|
325
|
+
/**
|
|
326
|
+
* @example
|
|
327
|
+
* MerchantName
|
|
328
|
+
*/
|
|
329
|
+
key?: string;
|
|
330
|
+
/**
|
|
331
|
+
* @example
|
|
332
|
+
* ***
|
|
333
|
+
*/
|
|
334
|
+
value?: string;
|
|
335
|
+
static names(): { [key: string]: string } {
|
|
336
|
+
return {
|
|
337
|
+
key: 'Key',
|
|
338
|
+
value: 'Value',
|
|
339
|
+
};
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
static types(): { [key: string]: any } {
|
|
343
|
+
return {
|
|
344
|
+
key: 'string',
|
|
345
|
+
value: 'string',
|
|
346
|
+
};
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
validate() {
|
|
350
|
+
super.validate();
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
constructor(map?: { [key: string]: any }) {
|
|
354
|
+
super(map);
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
export class CredentialVerifyV2AdvanceRequestMerchantDetail extends $dara.Model {
|
|
359
|
+
/**
|
|
360
|
+
* @example
|
|
361
|
+
* MerchantName
|
|
362
|
+
*/
|
|
363
|
+
key?: string;
|
|
364
|
+
/**
|
|
365
|
+
* @example
|
|
366
|
+
* ***
|
|
367
|
+
*/
|
|
368
|
+
value?: string;
|
|
369
|
+
static names(): { [key: string]: string } {
|
|
370
|
+
return {
|
|
371
|
+
key: 'Key',
|
|
372
|
+
value: 'Value',
|
|
373
|
+
};
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
static types(): { [key: string]: any } {
|
|
377
|
+
return {
|
|
378
|
+
key: 'string',
|
|
379
|
+
value: 'string',
|
|
380
|
+
};
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
validate() {
|
|
384
|
+
super.validate();
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
constructor(map?: { [key: string]: any }) {
|
|
388
|
+
super(map);
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
export class CredentialVerifyV2ResponseBodyResultObjectVlResult extends $dara.Model {
|
|
393
|
+
/**
|
|
394
|
+
* @example
|
|
395
|
+
* true
|
|
396
|
+
*/
|
|
397
|
+
success?: boolean;
|
|
398
|
+
vlContent?: string;
|
|
399
|
+
static names(): { [key: string]: string } {
|
|
400
|
+
return {
|
|
401
|
+
success: 'Success',
|
|
402
|
+
vlContent: 'VlContent',
|
|
403
|
+
};
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
static types(): { [key: string]: any } {
|
|
407
|
+
return {
|
|
408
|
+
success: 'boolean',
|
|
409
|
+
vlContent: 'string',
|
|
410
|
+
};
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
validate() {
|
|
414
|
+
super.validate();
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
constructor(map?: { [key: string]: any }) {
|
|
418
|
+
super(map);
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
export class CredentialVerifyV2ResponseBodyResultObject extends $dara.Model {
|
|
423
|
+
materialInfo?: string;
|
|
424
|
+
ocrInfo?: string;
|
|
425
|
+
/**
|
|
426
|
+
* @example
|
|
427
|
+
* 1
|
|
428
|
+
*/
|
|
429
|
+
result?: string;
|
|
430
|
+
riskScore?: { [key: string]: string };
|
|
431
|
+
/**
|
|
432
|
+
* @example
|
|
433
|
+
* PS,SCREEN_PHOTO
|
|
434
|
+
*/
|
|
435
|
+
riskTag?: string;
|
|
436
|
+
/**
|
|
437
|
+
* @example
|
|
438
|
+
* **
|
|
439
|
+
*/
|
|
440
|
+
verifyDetail?: string;
|
|
441
|
+
/**
|
|
442
|
+
* @example
|
|
443
|
+
* *
|
|
444
|
+
*/
|
|
445
|
+
verifyResult?: string;
|
|
446
|
+
vlResult?: CredentialVerifyV2ResponseBodyResultObjectVlResult;
|
|
447
|
+
static names(): { [key: string]: string } {
|
|
448
|
+
return {
|
|
449
|
+
materialInfo: 'MaterialInfo',
|
|
450
|
+
ocrInfo: 'OcrInfo',
|
|
451
|
+
result: 'Result',
|
|
452
|
+
riskScore: 'RiskScore',
|
|
453
|
+
riskTag: 'RiskTag',
|
|
454
|
+
verifyDetail: 'VerifyDetail',
|
|
455
|
+
verifyResult: 'VerifyResult',
|
|
456
|
+
vlResult: 'VlResult',
|
|
457
|
+
};
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
static types(): { [key: string]: any } {
|
|
461
|
+
return {
|
|
462
|
+
materialInfo: 'string',
|
|
463
|
+
ocrInfo: 'string',
|
|
464
|
+
result: 'string',
|
|
465
|
+
riskScore: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
466
|
+
riskTag: 'string',
|
|
467
|
+
verifyDetail: 'string',
|
|
468
|
+
verifyResult: 'string',
|
|
469
|
+
vlResult: CredentialVerifyV2ResponseBodyResultObjectVlResult,
|
|
470
|
+
};
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
validate() {
|
|
474
|
+
if(this.riskScore) {
|
|
475
|
+
$dara.Model.validateMap(this.riskScore);
|
|
476
|
+
}
|
|
477
|
+
if(this.vlResult && typeof (this.vlResult as any).validate === 'function') {
|
|
478
|
+
(this.vlResult as any).validate();
|
|
479
|
+
}
|
|
480
|
+
super.validate();
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
constructor(map?: { [key: string]: any }) {
|
|
484
|
+
super(map);
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
|
|
324
488
|
export class DeepfakeDetectResponseBodyResultObject extends $dara.Model {
|
|
325
489
|
/**
|
|
326
490
|
* @example
|
|
@@ -3362,26 +3526,400 @@ export class CreateVerifySettingResponse extends $dara.Model {
|
|
|
3362
3526
|
body?: CreateVerifySettingResponseBody;
|
|
3363
3527
|
static names(): { [key: string]: string } {
|
|
3364
3528
|
return {
|
|
3365
|
-
headers: 'headers',
|
|
3366
|
-
statusCode: 'statusCode',
|
|
3367
|
-
body: 'body',
|
|
3529
|
+
headers: 'headers',
|
|
3530
|
+
statusCode: 'statusCode',
|
|
3531
|
+
body: 'body',
|
|
3532
|
+
};
|
|
3533
|
+
}
|
|
3534
|
+
|
|
3535
|
+
static types(): { [key: string]: any } {
|
|
3536
|
+
return {
|
|
3537
|
+
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
3538
|
+
statusCode: 'number',
|
|
3539
|
+
body: CreateVerifySettingResponseBody,
|
|
3540
|
+
};
|
|
3541
|
+
}
|
|
3542
|
+
|
|
3543
|
+
validate() {
|
|
3544
|
+
if(this.headers) {
|
|
3545
|
+
$dara.Model.validateMap(this.headers);
|
|
3546
|
+
}
|
|
3547
|
+
if(this.body && typeof (this.body as any).validate === 'function') {
|
|
3548
|
+
(this.body as any).validate();
|
|
3549
|
+
}
|
|
3550
|
+
super.validate();
|
|
3551
|
+
}
|
|
3552
|
+
|
|
3553
|
+
constructor(map?: { [key: string]: any }) {
|
|
3554
|
+
super(map);
|
|
3555
|
+
}
|
|
3556
|
+
}
|
|
3557
|
+
|
|
3558
|
+
export class CredentialVerifyRequest extends $dara.Model {
|
|
3559
|
+
/**
|
|
3560
|
+
* @example
|
|
3561
|
+
* 4601*****
|
|
3562
|
+
*/
|
|
3563
|
+
certNum?: string;
|
|
3564
|
+
/**
|
|
3565
|
+
* @example
|
|
3566
|
+
* 0104
|
|
3567
|
+
*/
|
|
3568
|
+
credName?: string;
|
|
3569
|
+
/**
|
|
3570
|
+
* @example
|
|
3571
|
+
* 01
|
|
3572
|
+
*/
|
|
3573
|
+
credType?: string;
|
|
3574
|
+
/**
|
|
3575
|
+
* @example
|
|
3576
|
+
* 429001********8211
|
|
3577
|
+
*/
|
|
3578
|
+
identifyNum?: string;
|
|
3579
|
+
/**
|
|
3580
|
+
* @example
|
|
3581
|
+
* base64
|
|
3582
|
+
*/
|
|
3583
|
+
imageContext?: string;
|
|
3584
|
+
/**
|
|
3585
|
+
* @example
|
|
3586
|
+
* http://marry.momocdn.com/avatar/3B/B6/3BB6527E-7467-926E-1048-B43614F20CC420230803_L.jpg
|
|
3587
|
+
*/
|
|
3588
|
+
imageUrl?: string;
|
|
3589
|
+
/**
|
|
3590
|
+
* @example
|
|
3591
|
+
* 0
|
|
3592
|
+
*/
|
|
3593
|
+
isCheck?: string;
|
|
3594
|
+
/**
|
|
3595
|
+
* @example
|
|
3596
|
+
* 1
|
|
3597
|
+
*/
|
|
3598
|
+
isOCR?: string;
|
|
3599
|
+
merchantDetail?: CredentialVerifyRequestMerchantDetail[];
|
|
3600
|
+
merchantId?: string;
|
|
3601
|
+
productCode?: string;
|
|
3602
|
+
prompt?: string;
|
|
3603
|
+
promptModel?: string;
|
|
3604
|
+
userName?: string;
|
|
3605
|
+
static names(): { [key: string]: string } {
|
|
3606
|
+
return {
|
|
3607
|
+
certNum: 'CertNum',
|
|
3608
|
+
credName: 'CredName',
|
|
3609
|
+
credType: 'CredType',
|
|
3610
|
+
identifyNum: 'IdentifyNum',
|
|
3611
|
+
imageContext: 'ImageContext',
|
|
3612
|
+
imageUrl: 'ImageUrl',
|
|
3613
|
+
isCheck: 'IsCheck',
|
|
3614
|
+
isOCR: 'IsOCR',
|
|
3615
|
+
merchantDetail: 'MerchantDetail',
|
|
3616
|
+
merchantId: 'MerchantId',
|
|
3617
|
+
productCode: 'ProductCode',
|
|
3618
|
+
prompt: 'Prompt',
|
|
3619
|
+
promptModel: 'PromptModel',
|
|
3620
|
+
userName: 'UserName',
|
|
3621
|
+
};
|
|
3622
|
+
}
|
|
3623
|
+
|
|
3624
|
+
static types(): { [key: string]: any } {
|
|
3625
|
+
return {
|
|
3626
|
+
certNum: 'string',
|
|
3627
|
+
credName: 'string',
|
|
3628
|
+
credType: 'string',
|
|
3629
|
+
identifyNum: 'string',
|
|
3630
|
+
imageContext: 'string',
|
|
3631
|
+
imageUrl: 'string',
|
|
3632
|
+
isCheck: 'string',
|
|
3633
|
+
isOCR: 'string',
|
|
3634
|
+
merchantDetail: { 'type': 'array', 'itemType': CredentialVerifyRequestMerchantDetail },
|
|
3635
|
+
merchantId: 'string',
|
|
3636
|
+
productCode: 'string',
|
|
3637
|
+
prompt: 'string',
|
|
3638
|
+
promptModel: 'string',
|
|
3639
|
+
userName: 'string',
|
|
3640
|
+
};
|
|
3641
|
+
}
|
|
3642
|
+
|
|
3643
|
+
validate() {
|
|
3644
|
+
if(Array.isArray(this.merchantDetail)) {
|
|
3645
|
+
$dara.Model.validateArray(this.merchantDetail);
|
|
3646
|
+
}
|
|
3647
|
+
super.validate();
|
|
3648
|
+
}
|
|
3649
|
+
|
|
3650
|
+
constructor(map?: { [key: string]: any }) {
|
|
3651
|
+
super(map);
|
|
3652
|
+
}
|
|
3653
|
+
}
|
|
3654
|
+
|
|
3655
|
+
export class CredentialVerifyShrinkRequest extends $dara.Model {
|
|
3656
|
+
/**
|
|
3657
|
+
* @example
|
|
3658
|
+
* 4601*****
|
|
3659
|
+
*/
|
|
3660
|
+
certNum?: string;
|
|
3661
|
+
/**
|
|
3662
|
+
* @example
|
|
3663
|
+
* 0104
|
|
3664
|
+
*/
|
|
3665
|
+
credName?: string;
|
|
3666
|
+
/**
|
|
3667
|
+
* @example
|
|
3668
|
+
* 01
|
|
3669
|
+
*/
|
|
3670
|
+
credType?: string;
|
|
3671
|
+
/**
|
|
3672
|
+
* @example
|
|
3673
|
+
* 429001********8211
|
|
3674
|
+
*/
|
|
3675
|
+
identifyNum?: string;
|
|
3676
|
+
/**
|
|
3677
|
+
* @example
|
|
3678
|
+
* base64
|
|
3679
|
+
*/
|
|
3680
|
+
imageContext?: string;
|
|
3681
|
+
/**
|
|
3682
|
+
* @example
|
|
3683
|
+
* http://marry.momocdn.com/avatar/3B/B6/3BB6527E-7467-926E-1048-B43614F20CC420230803_L.jpg
|
|
3684
|
+
*/
|
|
3685
|
+
imageUrl?: string;
|
|
3686
|
+
/**
|
|
3687
|
+
* @example
|
|
3688
|
+
* 0
|
|
3689
|
+
*/
|
|
3690
|
+
isCheck?: string;
|
|
3691
|
+
/**
|
|
3692
|
+
* @example
|
|
3693
|
+
* 1
|
|
3694
|
+
*/
|
|
3695
|
+
isOCR?: string;
|
|
3696
|
+
merchantDetailShrink?: string;
|
|
3697
|
+
merchantId?: string;
|
|
3698
|
+
productCode?: string;
|
|
3699
|
+
prompt?: string;
|
|
3700
|
+
promptModel?: string;
|
|
3701
|
+
userName?: string;
|
|
3702
|
+
static names(): { [key: string]: string } {
|
|
3703
|
+
return {
|
|
3704
|
+
certNum: 'CertNum',
|
|
3705
|
+
credName: 'CredName',
|
|
3706
|
+
credType: 'CredType',
|
|
3707
|
+
identifyNum: 'IdentifyNum',
|
|
3708
|
+
imageContext: 'ImageContext',
|
|
3709
|
+
imageUrl: 'ImageUrl',
|
|
3710
|
+
isCheck: 'IsCheck',
|
|
3711
|
+
isOCR: 'IsOCR',
|
|
3712
|
+
merchantDetailShrink: 'MerchantDetail',
|
|
3713
|
+
merchantId: 'MerchantId',
|
|
3714
|
+
productCode: 'ProductCode',
|
|
3715
|
+
prompt: 'Prompt',
|
|
3716
|
+
promptModel: 'PromptModel',
|
|
3717
|
+
userName: 'UserName',
|
|
3718
|
+
};
|
|
3719
|
+
}
|
|
3720
|
+
|
|
3721
|
+
static types(): { [key: string]: any } {
|
|
3722
|
+
return {
|
|
3723
|
+
certNum: 'string',
|
|
3724
|
+
credName: 'string',
|
|
3725
|
+
credType: 'string',
|
|
3726
|
+
identifyNum: 'string',
|
|
3727
|
+
imageContext: 'string',
|
|
3728
|
+
imageUrl: 'string',
|
|
3729
|
+
isCheck: 'string',
|
|
3730
|
+
isOCR: 'string',
|
|
3731
|
+
merchantDetailShrink: 'string',
|
|
3732
|
+
merchantId: 'string',
|
|
3733
|
+
productCode: 'string',
|
|
3734
|
+
prompt: 'string',
|
|
3735
|
+
promptModel: 'string',
|
|
3736
|
+
userName: 'string',
|
|
3737
|
+
};
|
|
3738
|
+
}
|
|
3739
|
+
|
|
3740
|
+
validate() {
|
|
3741
|
+
super.validate();
|
|
3742
|
+
}
|
|
3743
|
+
|
|
3744
|
+
constructor(map?: { [key: string]: any }) {
|
|
3745
|
+
super(map);
|
|
3746
|
+
}
|
|
3747
|
+
}
|
|
3748
|
+
|
|
3749
|
+
export class CredentialVerifyResponseBody extends $dara.Model {
|
|
3750
|
+
/**
|
|
3751
|
+
* @example
|
|
3752
|
+
* 200
|
|
3753
|
+
*/
|
|
3754
|
+
code?: string;
|
|
3755
|
+
/**
|
|
3756
|
+
* @example
|
|
3757
|
+
* success
|
|
3758
|
+
*/
|
|
3759
|
+
message?: string;
|
|
3760
|
+
/**
|
|
3761
|
+
* @example
|
|
3762
|
+
* D6163397-15C5-419C-9ACC-B7C83E0B4C10
|
|
3763
|
+
*/
|
|
3764
|
+
requestId?: string;
|
|
3765
|
+
resultObject?: CredentialVerifyResponseBodyResultObject;
|
|
3766
|
+
static names(): { [key: string]: string } {
|
|
3767
|
+
return {
|
|
3768
|
+
code: 'Code',
|
|
3769
|
+
message: 'Message',
|
|
3770
|
+
requestId: 'RequestId',
|
|
3771
|
+
resultObject: 'ResultObject',
|
|
3772
|
+
};
|
|
3773
|
+
}
|
|
3774
|
+
|
|
3775
|
+
static types(): { [key: string]: any } {
|
|
3776
|
+
return {
|
|
3777
|
+
code: 'string',
|
|
3778
|
+
message: 'string',
|
|
3779
|
+
requestId: 'string',
|
|
3780
|
+
resultObject: CredentialVerifyResponseBodyResultObject,
|
|
3781
|
+
};
|
|
3782
|
+
}
|
|
3783
|
+
|
|
3784
|
+
validate() {
|
|
3785
|
+
if(this.resultObject && typeof (this.resultObject as any).validate === 'function') {
|
|
3786
|
+
(this.resultObject as any).validate();
|
|
3787
|
+
}
|
|
3788
|
+
super.validate();
|
|
3789
|
+
}
|
|
3790
|
+
|
|
3791
|
+
constructor(map?: { [key: string]: any }) {
|
|
3792
|
+
super(map);
|
|
3793
|
+
}
|
|
3794
|
+
}
|
|
3795
|
+
|
|
3796
|
+
export class CredentialVerifyResponse extends $dara.Model {
|
|
3797
|
+
headers?: { [key: string]: string };
|
|
3798
|
+
statusCode?: number;
|
|
3799
|
+
body?: CredentialVerifyResponseBody;
|
|
3800
|
+
static names(): { [key: string]: string } {
|
|
3801
|
+
return {
|
|
3802
|
+
headers: 'headers',
|
|
3803
|
+
statusCode: 'statusCode',
|
|
3804
|
+
body: 'body',
|
|
3805
|
+
};
|
|
3806
|
+
}
|
|
3807
|
+
|
|
3808
|
+
static types(): { [key: string]: any } {
|
|
3809
|
+
return {
|
|
3810
|
+
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
3811
|
+
statusCode: 'number',
|
|
3812
|
+
body: CredentialVerifyResponseBody,
|
|
3813
|
+
};
|
|
3814
|
+
}
|
|
3815
|
+
|
|
3816
|
+
validate() {
|
|
3817
|
+
if(this.headers) {
|
|
3818
|
+
$dara.Model.validateMap(this.headers);
|
|
3819
|
+
}
|
|
3820
|
+
if(this.body && typeof (this.body as any).validate === 'function') {
|
|
3821
|
+
(this.body as any).validate();
|
|
3822
|
+
}
|
|
3823
|
+
super.validate();
|
|
3824
|
+
}
|
|
3825
|
+
|
|
3826
|
+
constructor(map?: { [key: string]: any }) {
|
|
3827
|
+
super(map);
|
|
3828
|
+
}
|
|
3829
|
+
}
|
|
3830
|
+
|
|
3831
|
+
export class CredentialVerifyV2Request extends $dara.Model {
|
|
3832
|
+
/**
|
|
3833
|
+
* @example
|
|
3834
|
+
* 4601*****
|
|
3835
|
+
*/
|
|
3836
|
+
certNum?: string;
|
|
3837
|
+
/**
|
|
3838
|
+
* @example
|
|
3839
|
+
* 0104
|
|
3840
|
+
*/
|
|
3841
|
+
credName?: string;
|
|
3842
|
+
/**
|
|
3843
|
+
* @example
|
|
3844
|
+
* 01
|
|
3845
|
+
*/
|
|
3846
|
+
credType?: string;
|
|
3847
|
+
/**
|
|
3848
|
+
* @example
|
|
3849
|
+
* 4****************1
|
|
3850
|
+
*/
|
|
3851
|
+
identifyNum?: string;
|
|
3852
|
+
imageFile?: string;
|
|
3853
|
+
/**
|
|
3854
|
+
* @example
|
|
3855
|
+
* http://marry.momocdn.com/avatar/3B/B6/3BB6527E-7467-926E-1048-B43614F20CC420230803_L.jpg
|
|
3856
|
+
*/
|
|
3857
|
+
imageUrl?: string;
|
|
3858
|
+
/**
|
|
3859
|
+
* @example
|
|
3860
|
+
* 0
|
|
3861
|
+
*/
|
|
3862
|
+
isCheck?: string;
|
|
3863
|
+
/**
|
|
3864
|
+
* @example
|
|
3865
|
+
* 0
|
|
3866
|
+
*/
|
|
3867
|
+
isOcr?: string;
|
|
3868
|
+
merchantDetail?: CredentialVerifyV2RequestMerchantDetail[];
|
|
3869
|
+
merchantId?: string;
|
|
3870
|
+
/**
|
|
3871
|
+
* @example
|
|
3872
|
+
* ANTI_FAKE_CHECK
|
|
3873
|
+
*/
|
|
3874
|
+
productCode?: string;
|
|
3875
|
+
prompt?: string;
|
|
3876
|
+
/**
|
|
3877
|
+
* @example
|
|
3878
|
+
* DEFAULT
|
|
3879
|
+
*/
|
|
3880
|
+
promptModel?: string;
|
|
3881
|
+
userName?: string;
|
|
3882
|
+
static names(): { [key: string]: string } {
|
|
3883
|
+
return {
|
|
3884
|
+
certNum: 'CertNum',
|
|
3885
|
+
credName: 'CredName',
|
|
3886
|
+
credType: 'CredType',
|
|
3887
|
+
identifyNum: 'IdentifyNum',
|
|
3888
|
+
imageFile: 'ImageFile',
|
|
3889
|
+
imageUrl: 'ImageUrl',
|
|
3890
|
+
isCheck: 'IsCheck',
|
|
3891
|
+
isOcr: 'IsOcr',
|
|
3892
|
+
merchantDetail: 'MerchantDetail',
|
|
3893
|
+
merchantId: 'MerchantId',
|
|
3894
|
+
productCode: 'ProductCode',
|
|
3895
|
+
prompt: 'Prompt',
|
|
3896
|
+
promptModel: 'PromptModel',
|
|
3897
|
+
userName: 'UserName',
|
|
3368
3898
|
};
|
|
3369
3899
|
}
|
|
3370
3900
|
|
|
3371
3901
|
static types(): { [key: string]: any } {
|
|
3372
3902
|
return {
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3903
|
+
certNum: 'string',
|
|
3904
|
+
credName: 'string',
|
|
3905
|
+
credType: 'string',
|
|
3906
|
+
identifyNum: 'string',
|
|
3907
|
+
imageFile: 'string',
|
|
3908
|
+
imageUrl: 'string',
|
|
3909
|
+
isCheck: 'string',
|
|
3910
|
+
isOcr: 'string',
|
|
3911
|
+
merchantDetail: { 'type': 'array', 'itemType': CredentialVerifyV2RequestMerchantDetail },
|
|
3912
|
+
merchantId: 'string',
|
|
3913
|
+
productCode: 'string',
|
|
3914
|
+
prompt: 'string',
|
|
3915
|
+
promptModel: 'string',
|
|
3916
|
+
userName: 'string',
|
|
3376
3917
|
};
|
|
3377
3918
|
}
|
|
3378
3919
|
|
|
3379
3920
|
validate() {
|
|
3380
|
-
if(this.
|
|
3381
|
-
$dara.Model.
|
|
3382
|
-
}
|
|
3383
|
-
if(this.body && typeof (this.body as any).validate === 'function') {
|
|
3384
|
-
(this.body as any).validate();
|
|
3921
|
+
if(Array.isArray(this.merchantDetail)) {
|
|
3922
|
+
$dara.Model.validateArray(this.merchantDetail);
|
|
3385
3923
|
}
|
|
3386
3924
|
super.validate();
|
|
3387
3925
|
}
|
|
@@ -3391,7 +3929,7 @@ export class CreateVerifySettingResponse extends $dara.Model {
|
|
|
3391
3929
|
}
|
|
3392
3930
|
}
|
|
3393
3931
|
|
|
3394
|
-
export class
|
|
3932
|
+
export class CredentialVerifyV2AdvanceRequest extends $dara.Model {
|
|
3395
3933
|
/**
|
|
3396
3934
|
* @example
|
|
3397
3935
|
* 4601*****
|
|
@@ -3409,14 +3947,10 @@ export class CredentialVerifyRequest extends $dara.Model {
|
|
|
3409
3947
|
credType?: string;
|
|
3410
3948
|
/**
|
|
3411
3949
|
* @example
|
|
3412
|
-
*
|
|
3950
|
+
* 4****************1
|
|
3413
3951
|
*/
|
|
3414
3952
|
identifyNum?: string;
|
|
3415
|
-
|
|
3416
|
-
* @example
|
|
3417
|
-
* base64
|
|
3418
|
-
*/
|
|
3419
|
-
imageContext?: string;
|
|
3953
|
+
imageFileObject?: Readable;
|
|
3420
3954
|
/**
|
|
3421
3955
|
* @example
|
|
3422
3956
|
* http://marry.momocdn.com/avatar/3B/B6/3BB6527E-7467-926E-1048-B43614F20CC420230803_L.jpg
|
|
@@ -3429,13 +3963,21 @@ export class CredentialVerifyRequest extends $dara.Model {
|
|
|
3429
3963
|
isCheck?: string;
|
|
3430
3964
|
/**
|
|
3431
3965
|
* @example
|
|
3432
|
-
*
|
|
3966
|
+
* 0
|
|
3433
3967
|
*/
|
|
3434
|
-
|
|
3435
|
-
merchantDetail?:
|
|
3968
|
+
isOcr?: string;
|
|
3969
|
+
merchantDetail?: CredentialVerifyV2AdvanceRequestMerchantDetail[];
|
|
3436
3970
|
merchantId?: string;
|
|
3971
|
+
/**
|
|
3972
|
+
* @example
|
|
3973
|
+
* ANTI_FAKE_CHECK
|
|
3974
|
+
*/
|
|
3437
3975
|
productCode?: string;
|
|
3438
3976
|
prompt?: string;
|
|
3977
|
+
/**
|
|
3978
|
+
* @example
|
|
3979
|
+
* DEFAULT
|
|
3980
|
+
*/
|
|
3439
3981
|
promptModel?: string;
|
|
3440
3982
|
userName?: string;
|
|
3441
3983
|
static names(): { [key: string]: string } {
|
|
@@ -3444,10 +3986,10 @@ export class CredentialVerifyRequest extends $dara.Model {
|
|
|
3444
3986
|
credName: 'CredName',
|
|
3445
3987
|
credType: 'CredType',
|
|
3446
3988
|
identifyNum: 'IdentifyNum',
|
|
3447
|
-
|
|
3989
|
+
imageFileObject: 'ImageFile',
|
|
3448
3990
|
imageUrl: 'ImageUrl',
|
|
3449
3991
|
isCheck: 'IsCheck',
|
|
3450
|
-
|
|
3992
|
+
isOcr: 'IsOcr',
|
|
3451
3993
|
merchantDetail: 'MerchantDetail',
|
|
3452
3994
|
merchantId: 'MerchantId',
|
|
3453
3995
|
productCode: 'ProductCode',
|
|
@@ -3463,11 +4005,11 @@ export class CredentialVerifyRequest extends $dara.Model {
|
|
|
3463
4005
|
credName: 'string',
|
|
3464
4006
|
credType: 'string',
|
|
3465
4007
|
identifyNum: 'string',
|
|
3466
|
-
|
|
4008
|
+
imageFileObject: 'Readable',
|
|
3467
4009
|
imageUrl: 'string',
|
|
3468
4010
|
isCheck: 'string',
|
|
3469
|
-
|
|
3470
|
-
merchantDetail: { 'type': 'array', 'itemType':
|
|
4011
|
+
isOcr: 'string',
|
|
4012
|
+
merchantDetail: { 'type': 'array', 'itemType': CredentialVerifyV2AdvanceRequestMerchantDetail },
|
|
3471
4013
|
merchantId: 'string',
|
|
3472
4014
|
productCode: 'string',
|
|
3473
4015
|
prompt: 'string',
|
|
@@ -3488,7 +4030,7 @@ export class CredentialVerifyRequest extends $dara.Model {
|
|
|
3488
4030
|
}
|
|
3489
4031
|
}
|
|
3490
4032
|
|
|
3491
|
-
export class
|
|
4033
|
+
export class CredentialVerifyV2ShrinkRequest extends $dara.Model {
|
|
3492
4034
|
/**
|
|
3493
4035
|
* @example
|
|
3494
4036
|
* 4601*****
|
|
@@ -3506,14 +4048,10 @@ export class CredentialVerifyShrinkRequest extends $dara.Model {
|
|
|
3506
4048
|
credType?: string;
|
|
3507
4049
|
/**
|
|
3508
4050
|
* @example
|
|
3509
|
-
*
|
|
4051
|
+
* 4****************1
|
|
3510
4052
|
*/
|
|
3511
4053
|
identifyNum?: string;
|
|
3512
|
-
|
|
3513
|
-
* @example
|
|
3514
|
-
* base64
|
|
3515
|
-
*/
|
|
3516
|
-
imageContext?: string;
|
|
4054
|
+
imageFile?: string;
|
|
3517
4055
|
/**
|
|
3518
4056
|
* @example
|
|
3519
4057
|
* http://marry.momocdn.com/avatar/3B/B6/3BB6527E-7467-926E-1048-B43614F20CC420230803_L.jpg
|
|
@@ -3526,13 +4064,21 @@ export class CredentialVerifyShrinkRequest extends $dara.Model {
|
|
|
3526
4064
|
isCheck?: string;
|
|
3527
4065
|
/**
|
|
3528
4066
|
* @example
|
|
3529
|
-
*
|
|
4067
|
+
* 0
|
|
3530
4068
|
*/
|
|
3531
|
-
|
|
4069
|
+
isOcr?: string;
|
|
3532
4070
|
merchantDetailShrink?: string;
|
|
3533
4071
|
merchantId?: string;
|
|
4072
|
+
/**
|
|
4073
|
+
* @example
|
|
4074
|
+
* ANTI_FAKE_CHECK
|
|
4075
|
+
*/
|
|
3534
4076
|
productCode?: string;
|
|
3535
4077
|
prompt?: string;
|
|
4078
|
+
/**
|
|
4079
|
+
* @example
|
|
4080
|
+
* DEFAULT
|
|
4081
|
+
*/
|
|
3536
4082
|
promptModel?: string;
|
|
3537
4083
|
userName?: string;
|
|
3538
4084
|
static names(): { [key: string]: string } {
|
|
@@ -3541,10 +4087,10 @@ export class CredentialVerifyShrinkRequest extends $dara.Model {
|
|
|
3541
4087
|
credName: 'CredName',
|
|
3542
4088
|
credType: 'CredType',
|
|
3543
4089
|
identifyNum: 'IdentifyNum',
|
|
3544
|
-
|
|
4090
|
+
imageFile: 'ImageFile',
|
|
3545
4091
|
imageUrl: 'ImageUrl',
|
|
3546
4092
|
isCheck: 'IsCheck',
|
|
3547
|
-
|
|
4093
|
+
isOcr: 'IsOcr',
|
|
3548
4094
|
merchantDetailShrink: 'MerchantDetail',
|
|
3549
4095
|
merchantId: 'MerchantId',
|
|
3550
4096
|
productCode: 'ProductCode',
|
|
@@ -3560,10 +4106,10 @@ export class CredentialVerifyShrinkRequest extends $dara.Model {
|
|
|
3560
4106
|
credName: 'string',
|
|
3561
4107
|
credType: 'string',
|
|
3562
4108
|
identifyNum: 'string',
|
|
3563
|
-
|
|
4109
|
+
imageFile: 'string',
|
|
3564
4110
|
imageUrl: 'string',
|
|
3565
4111
|
isCheck: 'string',
|
|
3566
|
-
|
|
4112
|
+
isOcr: 'string',
|
|
3567
4113
|
merchantDetailShrink: 'string',
|
|
3568
4114
|
merchantId: 'string',
|
|
3569
4115
|
productCode: 'string',
|
|
@@ -3582,7 +4128,7 @@ export class CredentialVerifyShrinkRequest extends $dara.Model {
|
|
|
3582
4128
|
}
|
|
3583
4129
|
}
|
|
3584
4130
|
|
|
3585
|
-
export class
|
|
4131
|
+
export class CredentialVerifyV2ResponseBody extends $dara.Model {
|
|
3586
4132
|
/**
|
|
3587
4133
|
* @example
|
|
3588
4134
|
* 200
|
|
@@ -3595,10 +4141,10 @@ export class CredentialVerifyResponseBody extends $dara.Model {
|
|
|
3595
4141
|
message?: string;
|
|
3596
4142
|
/**
|
|
3597
4143
|
* @example
|
|
3598
|
-
*
|
|
4144
|
+
* 04F0F334-1335-436C-A1D7-6C044FE73368
|
|
3599
4145
|
*/
|
|
3600
4146
|
requestId?: string;
|
|
3601
|
-
resultObject?:
|
|
4147
|
+
resultObject?: CredentialVerifyV2ResponseBodyResultObject;
|
|
3602
4148
|
static names(): { [key: string]: string } {
|
|
3603
4149
|
return {
|
|
3604
4150
|
code: 'Code',
|
|
@@ -3613,7 +4159,7 @@ export class CredentialVerifyResponseBody extends $dara.Model {
|
|
|
3613
4159
|
code: 'string',
|
|
3614
4160
|
message: 'string',
|
|
3615
4161
|
requestId: 'string',
|
|
3616
|
-
resultObject:
|
|
4162
|
+
resultObject: CredentialVerifyV2ResponseBodyResultObject,
|
|
3617
4163
|
};
|
|
3618
4164
|
}
|
|
3619
4165
|
|
|
@@ -3629,10 +4175,10 @@ export class CredentialVerifyResponseBody extends $dara.Model {
|
|
|
3629
4175
|
}
|
|
3630
4176
|
}
|
|
3631
4177
|
|
|
3632
|
-
export class
|
|
4178
|
+
export class CredentialVerifyV2Response extends $dara.Model {
|
|
3633
4179
|
headers?: { [key: string]: string };
|
|
3634
4180
|
statusCode?: number;
|
|
3635
|
-
body?:
|
|
4181
|
+
body?: CredentialVerifyV2ResponseBody;
|
|
3636
4182
|
static names(): { [key: string]: string } {
|
|
3637
4183
|
return {
|
|
3638
4184
|
headers: 'headers',
|
|
@@ -3645,7 +4191,7 @@ export class CredentialVerifyResponse extends $dara.Model {
|
|
|
3645
4191
|
return {
|
|
3646
4192
|
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
3647
4193
|
statusCode: 'number',
|
|
3648
|
-
body:
|
|
4194
|
+
body: CredentialVerifyV2ResponseBody,
|
|
3649
4195
|
};
|
|
3650
4196
|
}
|
|
3651
4197
|
|
|
@@ -9094,6 +9640,183 @@ export default class Client extends OpenApi {
|
|
|
9094
9640
|
return await this.credentialVerifyWithOptions(request, runtime);
|
|
9095
9641
|
}
|
|
9096
9642
|
|
|
9643
|
+
/**
|
|
9644
|
+
* 凭证核验
|
|
9645
|
+
*
|
|
9646
|
+
* @param tmpReq - CredentialVerifyV2Request
|
|
9647
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
9648
|
+
* @returns CredentialVerifyV2Response
|
|
9649
|
+
*/
|
|
9650
|
+
async credentialVerifyV2WithOptions(tmpReq: CredentialVerifyV2Request, runtime: $dara.RuntimeOptions): Promise<CredentialVerifyV2Response> {
|
|
9651
|
+
tmpReq.validate();
|
|
9652
|
+
let request = new CredentialVerifyV2ShrinkRequest({ });
|
|
9653
|
+
OpenApiUtil.convert(tmpReq, request);
|
|
9654
|
+
if (!$dara.isNull(tmpReq.merchantDetail)) {
|
|
9655
|
+
request.merchantDetailShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.merchantDetail, "MerchantDetail", "json");
|
|
9656
|
+
}
|
|
9657
|
+
|
|
9658
|
+
let query = { };
|
|
9659
|
+
if (!$dara.isNull(request.certNum)) {
|
|
9660
|
+
query["CertNum"] = request.certNum;
|
|
9661
|
+
}
|
|
9662
|
+
|
|
9663
|
+
if (!$dara.isNull(request.credName)) {
|
|
9664
|
+
query["CredName"] = request.credName;
|
|
9665
|
+
}
|
|
9666
|
+
|
|
9667
|
+
if (!$dara.isNull(request.credType)) {
|
|
9668
|
+
query["CredType"] = request.credType;
|
|
9669
|
+
}
|
|
9670
|
+
|
|
9671
|
+
if (!$dara.isNull(request.identifyNum)) {
|
|
9672
|
+
query["IdentifyNum"] = request.identifyNum;
|
|
9673
|
+
}
|
|
9674
|
+
|
|
9675
|
+
if (!$dara.isNull(request.imageUrl)) {
|
|
9676
|
+
query["ImageUrl"] = request.imageUrl;
|
|
9677
|
+
}
|
|
9678
|
+
|
|
9679
|
+
if (!$dara.isNull(request.isCheck)) {
|
|
9680
|
+
query["IsCheck"] = request.isCheck;
|
|
9681
|
+
}
|
|
9682
|
+
|
|
9683
|
+
if (!$dara.isNull(request.isOcr)) {
|
|
9684
|
+
query["IsOcr"] = request.isOcr;
|
|
9685
|
+
}
|
|
9686
|
+
|
|
9687
|
+
if (!$dara.isNull(request.merchantDetailShrink)) {
|
|
9688
|
+
query["MerchantDetail"] = request.merchantDetailShrink;
|
|
9689
|
+
}
|
|
9690
|
+
|
|
9691
|
+
if (!$dara.isNull(request.merchantId)) {
|
|
9692
|
+
query["MerchantId"] = request.merchantId;
|
|
9693
|
+
}
|
|
9694
|
+
|
|
9695
|
+
if (!$dara.isNull(request.productCode)) {
|
|
9696
|
+
query["ProductCode"] = request.productCode;
|
|
9697
|
+
}
|
|
9698
|
+
|
|
9699
|
+
if (!$dara.isNull(request.prompt)) {
|
|
9700
|
+
query["Prompt"] = request.prompt;
|
|
9701
|
+
}
|
|
9702
|
+
|
|
9703
|
+
if (!$dara.isNull(request.promptModel)) {
|
|
9704
|
+
query["PromptModel"] = request.promptModel;
|
|
9705
|
+
}
|
|
9706
|
+
|
|
9707
|
+
if (!$dara.isNull(request.userName)) {
|
|
9708
|
+
query["UserName"] = request.userName;
|
|
9709
|
+
}
|
|
9710
|
+
|
|
9711
|
+
let body : {[key: string ]: any} = { };
|
|
9712
|
+
if (!$dara.isNull(request.imageFile)) {
|
|
9713
|
+
body["ImageFile"] = request.imageFile;
|
|
9714
|
+
}
|
|
9715
|
+
|
|
9716
|
+
let req = new $OpenApiUtil.OpenApiRequest({
|
|
9717
|
+
query: OpenApiUtil.query(query),
|
|
9718
|
+
body: OpenApiUtil.parseToMap(body),
|
|
9719
|
+
});
|
|
9720
|
+
let params = new $OpenApiUtil.Params({
|
|
9721
|
+
action: "CredentialVerifyV2",
|
|
9722
|
+
version: "2019-03-07",
|
|
9723
|
+
protocol: "HTTPS",
|
|
9724
|
+
pathname: "/",
|
|
9725
|
+
method: "POST",
|
|
9726
|
+
authType: "AK",
|
|
9727
|
+
style: "RPC",
|
|
9728
|
+
reqBodyType: "formData",
|
|
9729
|
+
bodyType: "json",
|
|
9730
|
+
});
|
|
9731
|
+
return $dara.cast<CredentialVerifyV2Response>(await this.callApi(params, req, runtime), new CredentialVerifyV2Response({}));
|
|
9732
|
+
}
|
|
9733
|
+
|
|
9734
|
+
/**
|
|
9735
|
+
* 凭证核验
|
|
9736
|
+
*
|
|
9737
|
+
* @param request - CredentialVerifyV2Request
|
|
9738
|
+
* @returns CredentialVerifyV2Response
|
|
9739
|
+
*/
|
|
9740
|
+
async credentialVerifyV2(request: CredentialVerifyV2Request): Promise<CredentialVerifyV2Response> {
|
|
9741
|
+
let runtime = new $dara.RuntimeOptions({ });
|
|
9742
|
+
return await this.credentialVerifyV2WithOptions(request, runtime);
|
|
9743
|
+
}
|
|
9744
|
+
|
|
9745
|
+
async credentialVerifyV2Advance(request: CredentialVerifyV2AdvanceRequest, runtime: $dara.RuntimeOptions): Promise<CredentialVerifyV2Response> {
|
|
9746
|
+
// Step 0: init client
|
|
9747
|
+
let accessKeyId = await this._credential.getAccessKeyId();
|
|
9748
|
+
let accessKeySecret = await this._credential.getAccessKeySecret();
|
|
9749
|
+
let securityToken = await this._credential.getSecurityToken();
|
|
9750
|
+
let credentialType = this._credential.getType();
|
|
9751
|
+
let openPlatformEndpoint = this._openPlatformEndpoint;
|
|
9752
|
+
if ($dara.isNull(openPlatformEndpoint)) {
|
|
9753
|
+
openPlatformEndpoint = "openplatform.aliyuncs.com";
|
|
9754
|
+
}
|
|
9755
|
+
|
|
9756
|
+
if ($dara.isNull(credentialType)) {
|
|
9757
|
+
credentialType = "access_key";
|
|
9758
|
+
}
|
|
9759
|
+
|
|
9760
|
+
let authConfig = new $OpenApiUtil.Config({
|
|
9761
|
+
accessKeyId: accessKeyId,
|
|
9762
|
+
accessKeySecret: accessKeySecret,
|
|
9763
|
+
securityToken: securityToken,
|
|
9764
|
+
type: credentialType,
|
|
9765
|
+
endpoint: openPlatformEndpoint,
|
|
9766
|
+
protocol: this._protocol,
|
|
9767
|
+
regionId: this._regionId,
|
|
9768
|
+
});
|
|
9769
|
+
let authClient = new OpenPlatform(authConfig);
|
|
9770
|
+
let authRequest = new $OpenPlatform.AuthorizeFileUploadRequest({
|
|
9771
|
+
product: "Cloudauth",
|
|
9772
|
+
regionId: this._regionId,
|
|
9773
|
+
});
|
|
9774
|
+
let authResponse = new $OpenPlatform.AuthorizeFileUploadResponse({ });
|
|
9775
|
+
let ossConfig = new $OSS.Config({
|
|
9776
|
+
accessKeyId: accessKeyId,
|
|
9777
|
+
accessKeySecret: accessKeySecret,
|
|
9778
|
+
type: "access_key",
|
|
9779
|
+
protocol: this._protocol,
|
|
9780
|
+
regionId: this._regionId,
|
|
9781
|
+
});
|
|
9782
|
+
let ossClient : OSS = new OSS(ossConfig);
|
|
9783
|
+
let fileObj = new $FileForm.FileField({ });
|
|
9784
|
+
let ossHeader = new $OSS.PostObjectRequestHeader({ });
|
|
9785
|
+
let uploadRequest = new $OSS.PostObjectRequest({ });
|
|
9786
|
+
let ossRuntime = new $OSSUtil.RuntimeOptions({ });
|
|
9787
|
+
OpenApiUtil.convert(runtime, ossRuntime);
|
|
9788
|
+
let credentialVerifyV2Req = new CredentialVerifyV2Request({ });
|
|
9789
|
+
OpenApiUtil.convert(request, credentialVerifyV2Req);
|
|
9790
|
+
if (!$dara.isNull(request.imageFileObject)) {
|
|
9791
|
+
authResponse = await authClient.authorizeFileUploadWithOptions(authRequest, runtime);
|
|
9792
|
+
ossConfig.accessKeyId = authResponse.body.accessKeyId;
|
|
9793
|
+
ossConfig.endpoint = OpenApiUtil.getEndpoint(authResponse.body.endpoint, authResponse.body.useAccelerate, this._endpointType);
|
|
9794
|
+
ossClient = new OSS(ossConfig);
|
|
9795
|
+
fileObj = new $FileForm.FileField({
|
|
9796
|
+
filename: authResponse.body.objectKey,
|
|
9797
|
+
content: request.imageFileObject,
|
|
9798
|
+
contentType: "",
|
|
9799
|
+
});
|
|
9800
|
+
ossHeader = new $OSS.PostObjectRequestHeader({
|
|
9801
|
+
accessKeyId: authResponse.body.accessKeyId,
|
|
9802
|
+
policy: authResponse.body.encodedPolicy,
|
|
9803
|
+
signature: authResponse.body.signature,
|
|
9804
|
+
key: authResponse.body.objectKey,
|
|
9805
|
+
file: fileObj,
|
|
9806
|
+
successActionStatus: "201",
|
|
9807
|
+
});
|
|
9808
|
+
uploadRequest = new $OSS.PostObjectRequest({
|
|
9809
|
+
bucketName: authResponse.body.bucket,
|
|
9810
|
+
header: ossHeader,
|
|
9811
|
+
});
|
|
9812
|
+
await ossClient.postObject(uploadRequest, ossRuntime);
|
|
9813
|
+
credentialVerifyV2Req.imageFile = `http://${authResponse.body.bucket}.${authResponse.body.endpoint}/${authResponse.body.objectKey}`;
|
|
9814
|
+
}
|
|
9815
|
+
|
|
9816
|
+
let credentialVerifyV2Resp = await this.credentialVerifyV2WithOptions(credentialVerifyV2Req, runtime);
|
|
9817
|
+
return credentialVerifyV2Resp;
|
|
9818
|
+
}
|
|
9819
|
+
|
|
9097
9820
|
/**
|
|
9098
9821
|
* 人脸凭证核验服务
|
|
9099
9822
|
*
|