@alicloud/cloudauth20190307 3.4.1 → 3.6.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/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
@@ -1370,6 +1534,36 @@ export class Id2MetaVerifyResponseBodyResultObject extends $dara.Model {
1370
1534
  }
1371
1535
  }
1372
1536
 
1537
+ export class Id2MetaVerifyWithOCRResponseBodyResultObject extends $dara.Model {
1538
+ /**
1539
+ * @example
1540
+ * 1
1541
+ */
1542
+ bizCode?: string;
1543
+ cardInfo?: string;
1544
+ static names(): { [key: string]: string } {
1545
+ return {
1546
+ bizCode: 'BizCode',
1547
+ cardInfo: 'CardInfo',
1548
+ };
1549
+ }
1550
+
1551
+ static types(): { [key: string]: any } {
1552
+ return {
1553
+ bizCode: 'string',
1554
+ cardInfo: 'string',
1555
+ };
1556
+ }
1557
+
1558
+ validate() {
1559
+ super.validate();
1560
+ }
1561
+
1562
+ constructor(map?: { [key: string]: any }) {
1563
+ super(map);
1564
+ }
1565
+ }
1566
+
1373
1567
  export class InitFaceVerifyResponseBodyResultObject extends $dara.Model {
1374
1568
  /**
1375
1569
  * @example
@@ -3664,42 +3858,424 @@ export class CredentialVerifyResponse extends $dara.Model {
3664
3858
  }
3665
3859
  }
3666
3860
 
3667
- export class DeepfakeDetectRequest extends $dara.Model {
3861
+ export class CredentialVerifyV2Request extends $dara.Model {
3668
3862
  /**
3669
3863
  * @example
3670
- * /9j/4AAQSkZJRgABAQAASxxxxxxx
3864
+ * 4601*****
3671
3865
  */
3672
- faceBase64?: string;
3866
+ certNum?: string;
3673
3867
  /**
3674
3868
  * @example
3675
- * IMAGE
3869
+ * 0104
3676
3870
  */
3677
- faceInputType?: string;
3871
+ credName?: string;
3678
3872
  /**
3679
3873
  * @example
3680
- * https://cn-shanghai-aliyun-cloudauth-xxxxxx.oss-cn-shanghai.aliyuncs.com/verify/xxxxx/xxxxx.jpeg
3874
+ * 01
3681
3875
  */
3682
- faceUrl?: string;
3876
+ credType?: string;
3683
3877
  /**
3684
3878
  * @example
3685
- * e0c34a77f5ac40a5aa5e6ed20c******
3879
+ * 4****************1
3686
3880
  */
3687
- outerOrderNo?: string;
3881
+ identifyNum?: string;
3882
+ imageFile?: string;
3883
+ /**
3884
+ * @example
3885
+ * http://marry.momocdn.com/avatar/3B/B6/3BB6527E-7467-926E-1048-B43614F20CC420230803_L.jpg
3886
+ */
3887
+ imageUrl?: string;
3888
+ /**
3889
+ * @example
3890
+ * 0
3891
+ */
3892
+ isCheck?: string;
3893
+ /**
3894
+ * @example
3895
+ * 0
3896
+ */
3897
+ isOcr?: string;
3898
+ merchantDetail?: CredentialVerifyV2RequestMerchantDetail[];
3899
+ merchantId?: string;
3900
+ /**
3901
+ * @example
3902
+ * ANTI_FAKE_CHECK
3903
+ */
3904
+ productCode?: string;
3905
+ prompt?: string;
3906
+ /**
3907
+ * @example
3908
+ * DEFAULT
3909
+ */
3910
+ promptModel?: string;
3911
+ userName?: string;
3688
3912
  static names(): { [key: string]: string } {
3689
3913
  return {
3690
- faceBase64: 'FaceBase64',
3691
- faceInputType: 'FaceInputType',
3692
- faceUrl: 'FaceUrl',
3693
- outerOrderNo: 'OuterOrderNo',
3914
+ certNum: 'CertNum',
3915
+ credName: 'CredName',
3916
+ credType: 'CredType',
3917
+ identifyNum: 'IdentifyNum',
3918
+ imageFile: 'ImageFile',
3919
+ imageUrl: 'ImageUrl',
3920
+ isCheck: 'IsCheck',
3921
+ isOcr: 'IsOcr',
3922
+ merchantDetail: 'MerchantDetail',
3923
+ merchantId: 'MerchantId',
3924
+ productCode: 'ProductCode',
3925
+ prompt: 'Prompt',
3926
+ promptModel: 'PromptModel',
3927
+ userName: 'UserName',
3694
3928
  };
3695
3929
  }
3696
3930
 
3697
3931
  static types(): { [key: string]: any } {
3698
3932
  return {
3699
- faceBase64: 'string',
3700
- faceInputType: 'string',
3701
- faceUrl: 'string',
3702
- outerOrderNo: 'string',
3933
+ certNum: 'string',
3934
+ credName: 'string',
3935
+ credType: 'string',
3936
+ identifyNum: 'string',
3937
+ imageFile: 'string',
3938
+ imageUrl: 'string',
3939
+ isCheck: 'string',
3940
+ isOcr: 'string',
3941
+ merchantDetail: { 'type': 'array', 'itemType': CredentialVerifyV2RequestMerchantDetail },
3942
+ merchantId: 'string',
3943
+ productCode: 'string',
3944
+ prompt: 'string',
3945
+ promptModel: 'string',
3946
+ userName: 'string',
3947
+ };
3948
+ }
3949
+
3950
+ validate() {
3951
+ if(Array.isArray(this.merchantDetail)) {
3952
+ $dara.Model.validateArray(this.merchantDetail);
3953
+ }
3954
+ super.validate();
3955
+ }
3956
+
3957
+ constructor(map?: { [key: string]: any }) {
3958
+ super(map);
3959
+ }
3960
+ }
3961
+
3962
+ export class CredentialVerifyV2AdvanceRequest extends $dara.Model {
3963
+ /**
3964
+ * @example
3965
+ * 4601*****
3966
+ */
3967
+ certNum?: string;
3968
+ /**
3969
+ * @example
3970
+ * 0104
3971
+ */
3972
+ credName?: string;
3973
+ /**
3974
+ * @example
3975
+ * 01
3976
+ */
3977
+ credType?: string;
3978
+ /**
3979
+ * @example
3980
+ * 4****************1
3981
+ */
3982
+ identifyNum?: string;
3983
+ imageFileObject?: Readable;
3984
+ /**
3985
+ * @example
3986
+ * http://marry.momocdn.com/avatar/3B/B6/3BB6527E-7467-926E-1048-B43614F20CC420230803_L.jpg
3987
+ */
3988
+ imageUrl?: string;
3989
+ /**
3990
+ * @example
3991
+ * 0
3992
+ */
3993
+ isCheck?: string;
3994
+ /**
3995
+ * @example
3996
+ * 0
3997
+ */
3998
+ isOcr?: string;
3999
+ merchantDetail?: CredentialVerifyV2AdvanceRequestMerchantDetail[];
4000
+ merchantId?: string;
4001
+ /**
4002
+ * @example
4003
+ * ANTI_FAKE_CHECK
4004
+ */
4005
+ productCode?: string;
4006
+ prompt?: string;
4007
+ /**
4008
+ * @example
4009
+ * DEFAULT
4010
+ */
4011
+ promptModel?: string;
4012
+ userName?: string;
4013
+ static names(): { [key: string]: string } {
4014
+ return {
4015
+ certNum: 'CertNum',
4016
+ credName: 'CredName',
4017
+ credType: 'CredType',
4018
+ identifyNum: 'IdentifyNum',
4019
+ imageFileObject: 'ImageFile',
4020
+ imageUrl: 'ImageUrl',
4021
+ isCheck: 'IsCheck',
4022
+ isOcr: 'IsOcr',
4023
+ merchantDetail: 'MerchantDetail',
4024
+ merchantId: 'MerchantId',
4025
+ productCode: 'ProductCode',
4026
+ prompt: 'Prompt',
4027
+ promptModel: 'PromptModel',
4028
+ userName: 'UserName',
4029
+ };
4030
+ }
4031
+
4032
+ static types(): { [key: string]: any } {
4033
+ return {
4034
+ certNum: 'string',
4035
+ credName: 'string',
4036
+ credType: 'string',
4037
+ identifyNum: 'string',
4038
+ imageFileObject: 'Readable',
4039
+ imageUrl: 'string',
4040
+ isCheck: 'string',
4041
+ isOcr: 'string',
4042
+ merchantDetail: { 'type': 'array', 'itemType': CredentialVerifyV2AdvanceRequestMerchantDetail },
4043
+ merchantId: 'string',
4044
+ productCode: 'string',
4045
+ prompt: 'string',
4046
+ promptModel: 'string',
4047
+ userName: 'string',
4048
+ };
4049
+ }
4050
+
4051
+ validate() {
4052
+ if(Array.isArray(this.merchantDetail)) {
4053
+ $dara.Model.validateArray(this.merchantDetail);
4054
+ }
4055
+ super.validate();
4056
+ }
4057
+
4058
+ constructor(map?: { [key: string]: any }) {
4059
+ super(map);
4060
+ }
4061
+ }
4062
+
4063
+ export class CredentialVerifyV2ShrinkRequest extends $dara.Model {
4064
+ /**
4065
+ * @example
4066
+ * 4601*****
4067
+ */
4068
+ certNum?: string;
4069
+ /**
4070
+ * @example
4071
+ * 0104
4072
+ */
4073
+ credName?: string;
4074
+ /**
4075
+ * @example
4076
+ * 01
4077
+ */
4078
+ credType?: string;
4079
+ /**
4080
+ * @example
4081
+ * 4****************1
4082
+ */
4083
+ identifyNum?: string;
4084
+ imageFile?: string;
4085
+ /**
4086
+ * @example
4087
+ * http://marry.momocdn.com/avatar/3B/B6/3BB6527E-7467-926E-1048-B43614F20CC420230803_L.jpg
4088
+ */
4089
+ imageUrl?: string;
4090
+ /**
4091
+ * @example
4092
+ * 0
4093
+ */
4094
+ isCheck?: string;
4095
+ /**
4096
+ * @example
4097
+ * 0
4098
+ */
4099
+ isOcr?: string;
4100
+ merchantDetailShrink?: string;
4101
+ merchantId?: string;
4102
+ /**
4103
+ * @example
4104
+ * ANTI_FAKE_CHECK
4105
+ */
4106
+ productCode?: string;
4107
+ prompt?: string;
4108
+ /**
4109
+ * @example
4110
+ * DEFAULT
4111
+ */
4112
+ promptModel?: string;
4113
+ userName?: string;
4114
+ static names(): { [key: string]: string } {
4115
+ return {
4116
+ certNum: 'CertNum',
4117
+ credName: 'CredName',
4118
+ credType: 'CredType',
4119
+ identifyNum: 'IdentifyNum',
4120
+ imageFile: 'ImageFile',
4121
+ imageUrl: 'ImageUrl',
4122
+ isCheck: 'IsCheck',
4123
+ isOcr: 'IsOcr',
4124
+ merchantDetailShrink: 'MerchantDetail',
4125
+ merchantId: 'MerchantId',
4126
+ productCode: 'ProductCode',
4127
+ prompt: 'Prompt',
4128
+ promptModel: 'PromptModel',
4129
+ userName: 'UserName',
4130
+ };
4131
+ }
4132
+
4133
+ static types(): { [key: string]: any } {
4134
+ return {
4135
+ certNum: 'string',
4136
+ credName: 'string',
4137
+ credType: 'string',
4138
+ identifyNum: 'string',
4139
+ imageFile: 'string',
4140
+ imageUrl: 'string',
4141
+ isCheck: 'string',
4142
+ isOcr: 'string',
4143
+ merchantDetailShrink: 'string',
4144
+ merchantId: 'string',
4145
+ productCode: 'string',
4146
+ prompt: 'string',
4147
+ promptModel: 'string',
4148
+ userName: 'string',
4149
+ };
4150
+ }
4151
+
4152
+ validate() {
4153
+ super.validate();
4154
+ }
4155
+
4156
+ constructor(map?: { [key: string]: any }) {
4157
+ super(map);
4158
+ }
4159
+ }
4160
+
4161
+ export class CredentialVerifyV2ResponseBody extends $dara.Model {
4162
+ /**
4163
+ * @example
4164
+ * 200
4165
+ */
4166
+ code?: string;
4167
+ /**
4168
+ * @example
4169
+ * success
4170
+ */
4171
+ message?: string;
4172
+ /**
4173
+ * @example
4174
+ * 04F0F334-1335-436C-A1D7-6C044FE73368
4175
+ */
4176
+ requestId?: string;
4177
+ resultObject?: CredentialVerifyV2ResponseBodyResultObject;
4178
+ static names(): { [key: string]: string } {
4179
+ return {
4180
+ code: 'Code',
4181
+ message: 'Message',
4182
+ requestId: 'RequestId',
4183
+ resultObject: 'ResultObject',
4184
+ };
4185
+ }
4186
+
4187
+ static types(): { [key: string]: any } {
4188
+ return {
4189
+ code: 'string',
4190
+ message: 'string',
4191
+ requestId: 'string',
4192
+ resultObject: CredentialVerifyV2ResponseBodyResultObject,
4193
+ };
4194
+ }
4195
+
4196
+ validate() {
4197
+ if(this.resultObject && typeof (this.resultObject as any).validate === 'function') {
4198
+ (this.resultObject as any).validate();
4199
+ }
4200
+ super.validate();
4201
+ }
4202
+
4203
+ constructor(map?: { [key: string]: any }) {
4204
+ super(map);
4205
+ }
4206
+ }
4207
+
4208
+ export class CredentialVerifyV2Response extends $dara.Model {
4209
+ headers?: { [key: string]: string };
4210
+ statusCode?: number;
4211
+ body?: CredentialVerifyV2ResponseBody;
4212
+ static names(): { [key: string]: string } {
4213
+ return {
4214
+ headers: 'headers',
4215
+ statusCode: 'statusCode',
4216
+ body: 'body',
4217
+ };
4218
+ }
4219
+
4220
+ static types(): { [key: string]: any } {
4221
+ return {
4222
+ headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
4223
+ statusCode: 'number',
4224
+ body: CredentialVerifyV2ResponseBody,
4225
+ };
4226
+ }
4227
+
4228
+ validate() {
4229
+ if(this.headers) {
4230
+ $dara.Model.validateMap(this.headers);
4231
+ }
4232
+ if(this.body && typeof (this.body as any).validate === 'function') {
4233
+ (this.body as any).validate();
4234
+ }
4235
+ super.validate();
4236
+ }
4237
+
4238
+ constructor(map?: { [key: string]: any }) {
4239
+ super(map);
4240
+ }
4241
+ }
4242
+
4243
+ export class DeepfakeDetectRequest extends $dara.Model {
4244
+ /**
4245
+ * @example
4246
+ * /9j/4AAQSkZJRgABAQAASxxxxxxx
4247
+ */
4248
+ faceBase64?: string;
4249
+ /**
4250
+ * @example
4251
+ * IMAGE
4252
+ */
4253
+ faceInputType?: string;
4254
+ /**
4255
+ * @example
4256
+ * https://cn-shanghai-aliyun-cloudauth-xxxxxx.oss-cn-shanghai.aliyuncs.com/verify/xxxxx/xxxxx.jpeg
4257
+ */
4258
+ faceUrl?: string;
4259
+ /**
4260
+ * @example
4261
+ * e0c34a77f5ac40a5aa5e6ed20c******
4262
+ */
4263
+ outerOrderNo?: string;
4264
+ static names(): { [key: string]: string } {
4265
+ return {
4266
+ faceBase64: 'FaceBase64',
4267
+ faceInputType: 'FaceInputType',
4268
+ faceUrl: 'FaceUrl',
4269
+ outerOrderNo: 'OuterOrderNo',
4270
+ };
4271
+ }
4272
+
4273
+ static types(): { [key: string]: any } {
4274
+ return {
4275
+ faceBase64: 'string',
4276
+ faceInputType: 'string',
4277
+ faceUrl: 'string',
4278
+ outerOrderNo: 'string',
3703
4279
  };
3704
4280
  }
3705
4281
 
@@ -5689,6 +6265,168 @@ export class Id2MetaVerifyResponse extends $dara.Model {
5689
6265
  }
5690
6266
  }
5691
6267
 
6268
+ export class Id2MetaVerifyWithOCRRequest extends $dara.Model {
6269
+ certFile?: string;
6270
+ certNationalFile?: string;
6271
+ /**
6272
+ * @example
6273
+ * https://www.aliyun.com/cert.jpeg
6274
+ */
6275
+ certNationalUrl?: string;
6276
+ /**
6277
+ * @example
6278
+ * https://www.aliyun.com/cert.jpeg
6279
+ */
6280
+ certUrl?: string;
6281
+ static names(): { [key: string]: string } {
6282
+ return {
6283
+ certFile: 'CertFile',
6284
+ certNationalFile: 'CertNationalFile',
6285
+ certNationalUrl: 'CertNationalUrl',
6286
+ certUrl: 'CertUrl',
6287
+ };
6288
+ }
6289
+
6290
+ static types(): { [key: string]: any } {
6291
+ return {
6292
+ certFile: 'string',
6293
+ certNationalFile: 'string',
6294
+ certNationalUrl: 'string',
6295
+ certUrl: 'string',
6296
+ };
6297
+ }
6298
+
6299
+ validate() {
6300
+ super.validate();
6301
+ }
6302
+
6303
+ constructor(map?: { [key: string]: any }) {
6304
+ super(map);
6305
+ }
6306
+ }
6307
+
6308
+ export class Id2MetaVerifyWithOCRAdvanceRequest extends $dara.Model {
6309
+ certFileObject?: Readable;
6310
+ certNationalFileObject?: Readable;
6311
+ /**
6312
+ * @example
6313
+ * https://www.aliyun.com/cert.jpeg
6314
+ */
6315
+ certNationalUrl?: string;
6316
+ /**
6317
+ * @example
6318
+ * https://www.aliyun.com/cert.jpeg
6319
+ */
6320
+ certUrl?: string;
6321
+ static names(): { [key: string]: string } {
6322
+ return {
6323
+ certFileObject: 'CertFile',
6324
+ certNationalFileObject: 'CertNationalFile',
6325
+ certNationalUrl: 'CertNationalUrl',
6326
+ certUrl: 'CertUrl',
6327
+ };
6328
+ }
6329
+
6330
+ static types(): { [key: string]: any } {
6331
+ return {
6332
+ certFileObject: 'Readable',
6333
+ certNationalFileObject: 'Readable',
6334
+ certNationalUrl: 'string',
6335
+ certUrl: 'string',
6336
+ };
6337
+ }
6338
+
6339
+ validate() {
6340
+ super.validate();
6341
+ }
6342
+
6343
+ constructor(map?: { [key: string]: any }) {
6344
+ super(map);
6345
+ }
6346
+ }
6347
+
6348
+ export class Id2MetaVerifyWithOCRResponseBody extends $dara.Model {
6349
+ /**
6350
+ * @example
6351
+ * 200
6352
+ */
6353
+ code?: string;
6354
+ /**
6355
+ * @example
6356
+ * success
6357
+ */
6358
+ message?: string;
6359
+ /**
6360
+ * @example
6361
+ * 130A2C10-B9EE-4D84-88E3-5384FF03****
6362
+ */
6363
+ requestId?: string;
6364
+ resultObject?: Id2MetaVerifyWithOCRResponseBodyResultObject;
6365
+ static names(): { [key: string]: string } {
6366
+ return {
6367
+ code: 'Code',
6368
+ message: 'Message',
6369
+ requestId: 'RequestId',
6370
+ resultObject: 'ResultObject',
6371
+ };
6372
+ }
6373
+
6374
+ static types(): { [key: string]: any } {
6375
+ return {
6376
+ code: 'string',
6377
+ message: 'string',
6378
+ requestId: 'string',
6379
+ resultObject: Id2MetaVerifyWithOCRResponseBodyResultObject,
6380
+ };
6381
+ }
6382
+
6383
+ validate() {
6384
+ if(this.resultObject && typeof (this.resultObject as any).validate === 'function') {
6385
+ (this.resultObject as any).validate();
6386
+ }
6387
+ super.validate();
6388
+ }
6389
+
6390
+ constructor(map?: { [key: string]: any }) {
6391
+ super(map);
6392
+ }
6393
+ }
6394
+
6395
+ export class Id2MetaVerifyWithOCRResponse extends $dara.Model {
6396
+ headers?: { [key: string]: string };
6397
+ statusCode?: number;
6398
+ body?: Id2MetaVerifyWithOCRResponseBody;
6399
+ static names(): { [key: string]: string } {
6400
+ return {
6401
+ headers: 'headers',
6402
+ statusCode: 'statusCode',
6403
+ body: 'body',
6404
+ };
6405
+ }
6406
+
6407
+ static types(): { [key: string]: any } {
6408
+ return {
6409
+ headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
6410
+ statusCode: 'number',
6411
+ body: Id2MetaVerifyWithOCRResponseBody,
6412
+ };
6413
+ }
6414
+
6415
+ validate() {
6416
+ if(this.headers) {
6417
+ $dara.Model.validateMap(this.headers);
6418
+ }
6419
+ if(this.body && typeof (this.body as any).validate === 'function') {
6420
+ (this.body as any).validate();
6421
+ }
6422
+ super.validate();
6423
+ }
6424
+
6425
+ constructor(map?: { [key: string]: any }) {
6426
+ super(map);
6427
+ }
6428
+ }
6429
+
5692
6430
  export class InitFaceVerifyRequest extends $dara.Model {
5693
6431
  appQualityCheck?: string;
5694
6432
  authId?: string;
@@ -8934,43 +9672,143 @@ export default class Client extends OpenApi {
8934
9672
  return await this.createAuthKeyWithOptions(request, runtime);
8935
9673
  }
8936
9674
 
8937
- /**
8938
- * @param request - CreateVerifySettingRequest
8939
- * @param runtime - runtime options for this request RuntimeOptions
8940
- * @returns CreateVerifySettingResponse
8941
- */
8942
- async createVerifySettingWithOptions(request: CreateVerifySettingRequest, runtime: $dara.RuntimeOptions): Promise<CreateVerifySettingResponse> {
8943
- request.validate();
8944
- let query = { };
8945
- if (!$dara.isNull(request.bizName)) {
8946
- query["BizName"] = request.bizName;
9675
+ /**
9676
+ * @param request - CreateVerifySettingRequest
9677
+ * @param runtime - runtime options for this request RuntimeOptions
9678
+ * @returns CreateVerifySettingResponse
9679
+ */
9680
+ async createVerifySettingWithOptions(request: CreateVerifySettingRequest, runtime: $dara.RuntimeOptions): Promise<CreateVerifySettingResponse> {
9681
+ request.validate();
9682
+ let query = { };
9683
+ if (!$dara.isNull(request.bizName)) {
9684
+ query["BizName"] = request.bizName;
9685
+ }
9686
+
9687
+ if (!$dara.isNull(request.bizType)) {
9688
+ query["BizType"] = request.bizType;
9689
+ }
9690
+
9691
+ if (!$dara.isNull(request.guideStep)) {
9692
+ query["GuideStep"] = request.guideStep;
9693
+ }
9694
+
9695
+ if (!$dara.isNull(request.privacyStep)) {
9696
+ query["PrivacyStep"] = request.privacyStep;
9697
+ }
9698
+
9699
+ if (!$dara.isNull(request.resultStep)) {
9700
+ query["ResultStep"] = request.resultStep;
9701
+ }
9702
+
9703
+ if (!$dara.isNull(request.solution)) {
9704
+ query["Solution"] = request.solution;
9705
+ }
9706
+
9707
+ let req = new $OpenApiUtil.OpenApiRequest({
9708
+ query: OpenApiUtil.query(query),
9709
+ });
9710
+ let params = new $OpenApiUtil.Params({
9711
+ action: "CreateVerifySetting",
9712
+ version: "2019-03-07",
9713
+ protocol: "HTTPS",
9714
+ pathname: "/",
9715
+ method: "POST",
9716
+ authType: "AK",
9717
+ style: "RPC",
9718
+ reqBodyType: "formData",
9719
+ bodyType: "json",
9720
+ });
9721
+ return $dara.cast<CreateVerifySettingResponse>(await this.callApi(params, req, runtime), new CreateVerifySettingResponse({}));
9722
+ }
9723
+
9724
+ /**
9725
+ * @param request - CreateVerifySettingRequest
9726
+ * @returns CreateVerifySettingResponse
9727
+ */
9728
+ async createVerifySetting(request: CreateVerifySettingRequest): Promise<CreateVerifySettingResponse> {
9729
+ let runtime = new $dara.RuntimeOptions({ });
9730
+ return await this.createVerifySettingWithOptions(request, runtime);
9731
+ }
9732
+
9733
+ /**
9734
+ * 凭证核验
9735
+ *
9736
+ * @param tmpReq - CredentialVerifyRequest
9737
+ * @param runtime - runtime options for this request RuntimeOptions
9738
+ * @returns CredentialVerifyResponse
9739
+ */
9740
+ async credentialVerifyWithOptions(tmpReq: CredentialVerifyRequest, runtime: $dara.RuntimeOptions): Promise<CredentialVerifyResponse> {
9741
+ tmpReq.validate();
9742
+ let request = new CredentialVerifyShrinkRequest({ });
9743
+ OpenApiUtil.convert(tmpReq, request);
9744
+ if (!$dara.isNull(tmpReq.merchantDetail)) {
9745
+ request.merchantDetailShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.merchantDetail, "MerchantDetail", "json");
9746
+ }
9747
+
9748
+ let query = { };
9749
+ if (!$dara.isNull(request.certNum)) {
9750
+ query["CertNum"] = request.certNum;
9751
+ }
9752
+
9753
+ if (!$dara.isNull(request.credName)) {
9754
+ query["CredName"] = request.credName;
9755
+ }
9756
+
9757
+ if (!$dara.isNull(request.credType)) {
9758
+ query["CredType"] = request.credType;
9759
+ }
9760
+
9761
+ if (!$dara.isNull(request.identifyNum)) {
9762
+ query["IdentifyNum"] = request.identifyNum;
9763
+ }
9764
+
9765
+ if (!$dara.isNull(request.imageUrl)) {
9766
+ query["ImageUrl"] = request.imageUrl;
9767
+ }
9768
+
9769
+ if (!$dara.isNull(request.isCheck)) {
9770
+ query["IsCheck"] = request.isCheck;
9771
+ }
9772
+
9773
+ if (!$dara.isNull(request.isOCR)) {
9774
+ query["IsOCR"] = request.isOCR;
9775
+ }
9776
+
9777
+ if (!$dara.isNull(request.merchantDetailShrink)) {
9778
+ query["MerchantDetail"] = request.merchantDetailShrink;
9779
+ }
9780
+
9781
+ if (!$dara.isNull(request.merchantId)) {
9782
+ query["MerchantId"] = request.merchantId;
8947
9783
  }
8948
9784
 
8949
- if (!$dara.isNull(request.bizType)) {
8950
- query["BizType"] = request.bizType;
9785
+ if (!$dara.isNull(request.productCode)) {
9786
+ query["ProductCode"] = request.productCode;
8951
9787
  }
8952
9788
 
8953
- if (!$dara.isNull(request.guideStep)) {
8954
- query["GuideStep"] = request.guideStep;
9789
+ if (!$dara.isNull(request.prompt)) {
9790
+ query["Prompt"] = request.prompt;
8955
9791
  }
8956
9792
 
8957
- if (!$dara.isNull(request.privacyStep)) {
8958
- query["PrivacyStep"] = request.privacyStep;
9793
+ if (!$dara.isNull(request.promptModel)) {
9794
+ query["PromptModel"] = request.promptModel;
8959
9795
  }
8960
9796
 
8961
- if (!$dara.isNull(request.resultStep)) {
8962
- query["ResultStep"] = request.resultStep;
9797
+ if (!$dara.isNull(request.userName)) {
9798
+ query["UserName"] = request.userName;
8963
9799
  }
8964
9800
 
8965
- if (!$dara.isNull(request.solution)) {
8966
- query["Solution"] = request.solution;
9801
+ let body : {[key: string ]: any} = { };
9802
+ if (!$dara.isNull(request.imageContext)) {
9803
+ body["ImageContext"] = request.imageContext;
8967
9804
  }
8968
9805
 
8969
9806
  let req = new $OpenApiUtil.OpenApiRequest({
8970
9807
  query: OpenApiUtil.query(query),
9808
+ body: OpenApiUtil.parseToMap(body),
8971
9809
  });
8972
9810
  let params = new $OpenApiUtil.Params({
8973
- action: "CreateVerifySetting",
9811
+ action: "CredentialVerify",
8974
9812
  version: "2019-03-07",
8975
9813
  protocol: "HTTPS",
8976
9814
  pathname: "/",
@@ -8980,28 +9818,30 @@ export default class Client extends OpenApi {
8980
9818
  reqBodyType: "formData",
8981
9819
  bodyType: "json",
8982
9820
  });
8983
- return $dara.cast<CreateVerifySettingResponse>(await this.callApi(params, req, runtime), new CreateVerifySettingResponse({}));
9821
+ return $dara.cast<CredentialVerifyResponse>(await this.callApi(params, req, runtime), new CredentialVerifyResponse({}));
8984
9822
  }
8985
9823
 
8986
9824
  /**
8987
- * @param request - CreateVerifySettingRequest
8988
- * @returns CreateVerifySettingResponse
9825
+ * 凭证核验
9826
+ *
9827
+ * @param request - CredentialVerifyRequest
9828
+ * @returns CredentialVerifyResponse
8989
9829
  */
8990
- async createVerifySetting(request: CreateVerifySettingRequest): Promise<CreateVerifySettingResponse> {
9830
+ async credentialVerify(request: CredentialVerifyRequest): Promise<CredentialVerifyResponse> {
8991
9831
  let runtime = new $dara.RuntimeOptions({ });
8992
- return await this.createVerifySettingWithOptions(request, runtime);
9832
+ return await this.credentialVerifyWithOptions(request, runtime);
8993
9833
  }
8994
9834
 
8995
9835
  /**
8996
9836
  * 凭证核验
8997
9837
  *
8998
- * @param tmpReq - CredentialVerifyRequest
9838
+ * @param tmpReq - CredentialVerifyV2Request
8999
9839
  * @param runtime - runtime options for this request RuntimeOptions
9000
- * @returns CredentialVerifyResponse
9840
+ * @returns CredentialVerifyV2Response
9001
9841
  */
9002
- async credentialVerifyWithOptions(tmpReq: CredentialVerifyRequest, runtime: $dara.RuntimeOptions): Promise<CredentialVerifyResponse> {
9842
+ async credentialVerifyV2WithOptions(tmpReq: CredentialVerifyV2Request, runtime: $dara.RuntimeOptions): Promise<CredentialVerifyV2Response> {
9003
9843
  tmpReq.validate();
9004
- let request = new CredentialVerifyShrinkRequest({ });
9844
+ let request = new CredentialVerifyV2ShrinkRequest({ });
9005
9845
  OpenApiUtil.convert(tmpReq, request);
9006
9846
  if (!$dara.isNull(tmpReq.merchantDetail)) {
9007
9847
  request.merchantDetailShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.merchantDetail, "MerchantDetail", "json");
@@ -9032,8 +9872,8 @@ export default class Client extends OpenApi {
9032
9872
  query["IsCheck"] = request.isCheck;
9033
9873
  }
9034
9874
 
9035
- if (!$dara.isNull(request.isOCR)) {
9036
- query["IsOCR"] = request.isOCR;
9875
+ if (!$dara.isNull(request.isOcr)) {
9876
+ query["IsOcr"] = request.isOcr;
9037
9877
  }
9038
9878
 
9039
9879
  if (!$dara.isNull(request.merchantDetailShrink)) {
@@ -9061,8 +9901,8 @@ export default class Client extends OpenApi {
9061
9901
  }
9062
9902
 
9063
9903
  let body : {[key: string ]: any} = { };
9064
- if (!$dara.isNull(request.imageContext)) {
9065
- body["ImageContext"] = request.imageContext;
9904
+ if (!$dara.isNull(request.imageFile)) {
9905
+ body["ImageFile"] = request.imageFile;
9066
9906
  }
9067
9907
 
9068
9908
  let req = new $OpenApiUtil.OpenApiRequest({
@@ -9070,7 +9910,7 @@ export default class Client extends OpenApi {
9070
9910
  body: OpenApiUtil.parseToMap(body),
9071
9911
  });
9072
9912
  let params = new $OpenApiUtil.Params({
9073
- action: "CredentialVerify",
9913
+ action: "CredentialVerifyV2",
9074
9914
  version: "2019-03-07",
9075
9915
  protocol: "HTTPS",
9076
9916
  pathname: "/",
@@ -9080,18 +9920,93 @@ export default class Client extends OpenApi {
9080
9920
  reqBodyType: "formData",
9081
9921
  bodyType: "json",
9082
9922
  });
9083
- return $dara.cast<CredentialVerifyResponse>(await this.callApi(params, req, runtime), new CredentialVerifyResponse({}));
9923
+ return $dara.cast<CredentialVerifyV2Response>(await this.callApi(params, req, runtime), new CredentialVerifyV2Response({}));
9084
9924
  }
9085
9925
 
9086
9926
  /**
9087
9927
  * 凭证核验
9088
9928
  *
9089
- * @param request - CredentialVerifyRequest
9090
- * @returns CredentialVerifyResponse
9929
+ * @param request - CredentialVerifyV2Request
9930
+ * @returns CredentialVerifyV2Response
9091
9931
  */
9092
- async credentialVerify(request: CredentialVerifyRequest): Promise<CredentialVerifyResponse> {
9932
+ async credentialVerifyV2(request: CredentialVerifyV2Request): Promise<CredentialVerifyV2Response> {
9093
9933
  let runtime = new $dara.RuntimeOptions({ });
9094
- return await this.credentialVerifyWithOptions(request, runtime);
9934
+ return await this.credentialVerifyV2WithOptions(request, runtime);
9935
+ }
9936
+
9937
+ async credentialVerifyV2Advance(request: CredentialVerifyV2AdvanceRequest, runtime: $dara.RuntimeOptions): Promise<CredentialVerifyV2Response> {
9938
+ // Step 0: init client
9939
+ let accessKeyId = await this._credential.getAccessKeyId();
9940
+ let accessKeySecret = await this._credential.getAccessKeySecret();
9941
+ let securityToken = await this._credential.getSecurityToken();
9942
+ let credentialType = this._credential.getType();
9943
+ let openPlatformEndpoint = this._openPlatformEndpoint;
9944
+ if ($dara.isNull(openPlatformEndpoint)) {
9945
+ openPlatformEndpoint = "openplatform.aliyuncs.com";
9946
+ }
9947
+
9948
+ if ($dara.isNull(credentialType)) {
9949
+ credentialType = "access_key";
9950
+ }
9951
+
9952
+ let authConfig = new $OpenApiUtil.Config({
9953
+ accessKeyId: accessKeyId,
9954
+ accessKeySecret: accessKeySecret,
9955
+ securityToken: securityToken,
9956
+ type: credentialType,
9957
+ endpoint: openPlatformEndpoint,
9958
+ protocol: this._protocol,
9959
+ regionId: this._regionId,
9960
+ });
9961
+ let authClient = new OpenPlatform(authConfig);
9962
+ let authRequest = new $OpenPlatform.AuthorizeFileUploadRequest({
9963
+ product: "Cloudauth",
9964
+ regionId: this._regionId,
9965
+ });
9966
+ let authResponse = new $OpenPlatform.AuthorizeFileUploadResponse({ });
9967
+ let ossConfig = new $OSS.Config({
9968
+ accessKeyId: accessKeyId,
9969
+ accessKeySecret: accessKeySecret,
9970
+ type: "access_key",
9971
+ protocol: this._protocol,
9972
+ regionId: this._regionId,
9973
+ });
9974
+ let ossClient : OSS = new OSS(ossConfig);
9975
+ let fileObj = new $FileForm.FileField({ });
9976
+ let ossHeader = new $OSS.PostObjectRequestHeader({ });
9977
+ let uploadRequest = new $OSS.PostObjectRequest({ });
9978
+ let ossRuntime = new $OSSUtil.RuntimeOptions({ });
9979
+ OpenApiUtil.convert(runtime, ossRuntime);
9980
+ let credentialVerifyV2Req = new CredentialVerifyV2Request({ });
9981
+ OpenApiUtil.convert(request, credentialVerifyV2Req);
9982
+ if (!$dara.isNull(request.imageFileObject)) {
9983
+ authResponse = await authClient.authorizeFileUploadWithOptions(authRequest, runtime);
9984
+ ossConfig.accessKeyId = authResponse.body.accessKeyId;
9985
+ ossConfig.endpoint = OpenApiUtil.getEndpoint(authResponse.body.endpoint, authResponse.body.useAccelerate, this._endpointType);
9986
+ ossClient = new OSS(ossConfig);
9987
+ fileObj = new $FileForm.FileField({
9988
+ filename: authResponse.body.objectKey,
9989
+ content: request.imageFileObject,
9990
+ contentType: "",
9991
+ });
9992
+ ossHeader = new $OSS.PostObjectRequestHeader({
9993
+ accessKeyId: authResponse.body.accessKeyId,
9994
+ policy: authResponse.body.encodedPolicy,
9995
+ signature: authResponse.body.signature,
9996
+ key: authResponse.body.objectKey,
9997
+ file: fileObj,
9998
+ successActionStatus: "201",
9999
+ });
10000
+ uploadRequest = new $OSS.PostObjectRequest({
10001
+ bucketName: authResponse.body.bucket,
10002
+ header: ossHeader,
10003
+ });
10004
+ await ossClient.postObject(uploadRequest, ossRuntime);
10005
+ credentialVerifyV2Req.imageFile = `http://${authResponse.body.bucket}.${authResponse.body.endpoint}/${authResponse.body.objectKey}`;
10006
+ }
10007
+
10008
+ let credentialVerifyV2Resp = await this.credentialVerifyV2WithOptions(credentialVerifyV2Req, runtime);
10009
+ return credentialVerifyV2Resp;
9095
10010
  }
9096
10011
 
9097
10012
  /**
@@ -9881,6 +10796,161 @@ export default class Client extends OpenApi {
9881
10796
  return await this.id2MetaVerifyWithOptions(request, runtime);
9882
10797
  }
9883
10798
 
10799
+ /**
10800
+ * 身份二要素图片核验
10801
+ *
10802
+ * @param request - Id2MetaVerifyWithOCRRequest
10803
+ * @param runtime - runtime options for this request RuntimeOptions
10804
+ * @returns Id2MetaVerifyWithOCRResponse
10805
+ */
10806
+ async id2MetaVerifyWithOCRWithOptions(request: Id2MetaVerifyWithOCRRequest, runtime: $dara.RuntimeOptions): Promise<Id2MetaVerifyWithOCRResponse> {
10807
+ request.validate();
10808
+ let body : {[key: string ]: any} = { };
10809
+ if (!$dara.isNull(request.certFile)) {
10810
+ body["CertFile"] = request.certFile;
10811
+ }
10812
+
10813
+ if (!$dara.isNull(request.certNationalFile)) {
10814
+ body["CertNationalFile"] = request.certNationalFile;
10815
+ }
10816
+
10817
+ if (!$dara.isNull(request.certNationalUrl)) {
10818
+ body["CertNationalUrl"] = request.certNationalUrl;
10819
+ }
10820
+
10821
+ if (!$dara.isNull(request.certUrl)) {
10822
+ body["CertUrl"] = request.certUrl;
10823
+ }
10824
+
10825
+ let req = new $OpenApiUtil.OpenApiRequest({
10826
+ body: OpenApiUtil.parseToMap(body),
10827
+ });
10828
+ let params = new $OpenApiUtil.Params({
10829
+ action: "Id2MetaVerifyWithOCR",
10830
+ version: "2019-03-07",
10831
+ protocol: "HTTPS",
10832
+ pathname: "/",
10833
+ method: "POST",
10834
+ authType: "AK",
10835
+ style: "RPC",
10836
+ reqBodyType: "formData",
10837
+ bodyType: "json",
10838
+ });
10839
+ return $dara.cast<Id2MetaVerifyWithOCRResponse>(await this.callApi(params, req, runtime), new Id2MetaVerifyWithOCRResponse({}));
10840
+ }
10841
+
10842
+ /**
10843
+ * 身份二要素图片核验
10844
+ *
10845
+ * @param request - Id2MetaVerifyWithOCRRequest
10846
+ * @returns Id2MetaVerifyWithOCRResponse
10847
+ */
10848
+ async id2MetaVerifyWithOCR(request: Id2MetaVerifyWithOCRRequest): Promise<Id2MetaVerifyWithOCRResponse> {
10849
+ let runtime = new $dara.RuntimeOptions({ });
10850
+ return await this.id2MetaVerifyWithOCRWithOptions(request, runtime);
10851
+ }
10852
+
10853
+ async id2MetaVerifyWithOCRAdvance(request: Id2MetaVerifyWithOCRAdvanceRequest, runtime: $dara.RuntimeOptions): Promise<Id2MetaVerifyWithOCRResponse> {
10854
+ // Step 0: init client
10855
+ let accessKeyId = await this._credential.getAccessKeyId();
10856
+ let accessKeySecret = await this._credential.getAccessKeySecret();
10857
+ let securityToken = await this._credential.getSecurityToken();
10858
+ let credentialType = this._credential.getType();
10859
+ let openPlatformEndpoint = this._openPlatformEndpoint;
10860
+ if ($dara.isNull(openPlatformEndpoint)) {
10861
+ openPlatformEndpoint = "openplatform.aliyuncs.com";
10862
+ }
10863
+
10864
+ if ($dara.isNull(credentialType)) {
10865
+ credentialType = "access_key";
10866
+ }
10867
+
10868
+ let authConfig = new $OpenApiUtil.Config({
10869
+ accessKeyId: accessKeyId,
10870
+ accessKeySecret: accessKeySecret,
10871
+ securityToken: securityToken,
10872
+ type: credentialType,
10873
+ endpoint: openPlatformEndpoint,
10874
+ protocol: this._protocol,
10875
+ regionId: this._regionId,
10876
+ });
10877
+ let authClient = new OpenPlatform(authConfig);
10878
+ let authRequest = new $OpenPlatform.AuthorizeFileUploadRequest({
10879
+ product: "Cloudauth",
10880
+ regionId: this._regionId,
10881
+ });
10882
+ let authResponse = new $OpenPlatform.AuthorizeFileUploadResponse({ });
10883
+ let ossConfig = new $OSS.Config({
10884
+ accessKeyId: accessKeyId,
10885
+ accessKeySecret: accessKeySecret,
10886
+ type: "access_key",
10887
+ protocol: this._protocol,
10888
+ regionId: this._regionId,
10889
+ });
10890
+ let ossClient : OSS = new OSS(ossConfig);
10891
+ let fileObj = new $FileForm.FileField({ });
10892
+ let ossHeader = new $OSS.PostObjectRequestHeader({ });
10893
+ let uploadRequest = new $OSS.PostObjectRequest({ });
10894
+ let ossRuntime = new $OSSUtil.RuntimeOptions({ });
10895
+ OpenApiUtil.convert(runtime, ossRuntime);
10896
+ let id2MetaVerifyWithOCRReq = new Id2MetaVerifyWithOCRRequest({ });
10897
+ OpenApiUtil.convert(request, id2MetaVerifyWithOCRReq);
10898
+ if (!$dara.isNull(request.certFileObject)) {
10899
+ authResponse = await authClient.authorizeFileUploadWithOptions(authRequest, runtime);
10900
+ ossConfig.accessKeyId = authResponse.body.accessKeyId;
10901
+ ossConfig.endpoint = OpenApiUtil.getEndpoint(authResponse.body.endpoint, authResponse.body.useAccelerate, this._endpointType);
10902
+ ossClient = new OSS(ossConfig);
10903
+ fileObj = new $FileForm.FileField({
10904
+ filename: authResponse.body.objectKey,
10905
+ content: request.certFileObject,
10906
+ contentType: "",
10907
+ });
10908
+ ossHeader = new $OSS.PostObjectRequestHeader({
10909
+ accessKeyId: authResponse.body.accessKeyId,
10910
+ policy: authResponse.body.encodedPolicy,
10911
+ signature: authResponse.body.signature,
10912
+ key: authResponse.body.objectKey,
10913
+ file: fileObj,
10914
+ successActionStatus: "201",
10915
+ });
10916
+ uploadRequest = new $OSS.PostObjectRequest({
10917
+ bucketName: authResponse.body.bucket,
10918
+ header: ossHeader,
10919
+ });
10920
+ await ossClient.postObject(uploadRequest, ossRuntime);
10921
+ id2MetaVerifyWithOCRReq.certFile = `http://${authResponse.body.bucket}.${authResponse.body.endpoint}/${authResponse.body.objectKey}`;
10922
+ }
10923
+
10924
+ if (!$dara.isNull(request.certNationalFileObject)) {
10925
+ authResponse = await authClient.authorizeFileUploadWithOptions(authRequest, runtime);
10926
+ ossConfig.accessKeyId = authResponse.body.accessKeyId;
10927
+ ossConfig.endpoint = OpenApiUtil.getEndpoint(authResponse.body.endpoint, authResponse.body.useAccelerate, this._endpointType);
10928
+ ossClient = new OSS(ossConfig);
10929
+ fileObj = new $FileForm.FileField({
10930
+ filename: authResponse.body.objectKey,
10931
+ content: request.certNationalFileObject,
10932
+ contentType: "",
10933
+ });
10934
+ ossHeader = new $OSS.PostObjectRequestHeader({
10935
+ accessKeyId: authResponse.body.accessKeyId,
10936
+ policy: authResponse.body.encodedPolicy,
10937
+ signature: authResponse.body.signature,
10938
+ key: authResponse.body.objectKey,
10939
+ file: fileObj,
10940
+ successActionStatus: "201",
10941
+ });
10942
+ uploadRequest = new $OSS.PostObjectRequest({
10943
+ bucketName: authResponse.body.bucket,
10944
+ header: ossHeader,
10945
+ });
10946
+ await ossClient.postObject(uploadRequest, ossRuntime);
10947
+ id2MetaVerifyWithOCRReq.certNationalFile = `http://${authResponse.body.bucket}.${authResponse.body.endpoint}/${authResponse.body.objectKey}`;
10948
+ }
10949
+
10950
+ let id2MetaVerifyWithOCRResp = await this.id2MetaVerifyWithOCRWithOptions(id2MetaVerifyWithOCRReq, runtime);
10951
+ return id2MetaVerifyWithOCRResp;
10952
+ }
10953
+
9884
10954
  /**
9885
10955
  * @param request - InitFaceVerifyRequest
9886
10956
  * @param runtime - runtime options for this request RuntimeOptions