@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/dist/client.d.ts +474 -0
- package/dist/client.js +739 -11
- package/dist/client.js.map +1 -1
- package/package.json +2 -2
- package/src/client.ts +1127 -57
package/dist/client.js
CHANGED
|
@@ -36,10 +36,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
36
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
40
|
-
exports.
|
|
41
|
-
exports.
|
|
42
|
-
exports.VerifyMaterialResponse = exports.VerifyMaterialResponseBody = exports.VerifyMaterialRequest = exports.VehicleQueryResponse = exports.VehicleQueryResponseBody = exports.VehicleQueryRequest = exports.VehicleMetaVerifyV2Response = exports.VehicleMetaVerifyV2ResponseBody = exports.VehicleMetaVerifyV2Request = exports.VehicleMetaVerifyResponse = exports.VehicleMetaVerifyResponseBody = exports.VehicleMetaVerifyRequest = exports.VehicleInsureQueryResponse = exports.VehicleInsureQueryResponseBody = exports.VehicleInsureQueryRequest = exports.Vehicle5ItemQueryResponse = exports.Vehicle5ItemQueryResponseBody = exports.Vehicle5ItemQueryRequest = exports.RemoveWhiteListSettingResponse = exports.RemoveWhiteListSettingResponseBody = exports.RemoveWhiteListSettingShrinkRequest = exports.RemoveWhiteListSettingRequest = exports.PageQueryWhiteListSettingResponse = exports.PageQueryWhiteListSettingResponseBody = exports.PageQueryWhiteListSettingRequest = exports.ModifyDeviceInfoResponse = void 0;
|
|
39
|
+
exports.VehicleMetaVerifyV2ResponseBodyResultObject = exports.VehicleMetaVerifyResponseBodyResultObject = exports.VehicleInsureQueryResponseBodyResultObject = exports.Vehicle5ItemQueryResponseBodyResultObject = exports.PageQueryWhiteListSettingResponseBodyResultObject = exports.MobileOnlineTimeResponseBodyResultObject = exports.MobileOnlineStatusResponseBodyResultObject = exports.MobileDetectResponseBodyResultObject = exports.MobileDetectResponseBodyResultObjectItems = exports.Mobile3MetaSimpleVerifyResponseBodyResultObject = exports.Mobile3MetaSimpleStandardVerifyResponseBodyResultObject = exports.Mobile3MetaDetailVerifyResponseBodyResultObject = exports.Mobile3MetaDetailStandardVerifyResponseBodyResultObject = exports.LivenessFaceVerifyResponseBodyResultObject = exports.InitFaceVerifyResponseBodyResultObject = exports.Id2MetaVerifyWithOCRResponseBodyResultObject = exports.Id2MetaVerifyResponseBodyResultObject = exports.Id2MetaStandardVerifyResponseBodyResultObject = exports.Id2MetaPeriodVerifyResponseBodyResultObject = exports.DetectFaceAttributesResponseBodyData = exports.DetectFaceAttributesResponseBodyDataFaceInfos = exports.DetectFaceAttributesResponseBodyDataFaceInfosFaceAttributesDetectInfo = exports.DetectFaceAttributesResponseBodyDataFaceInfosFaceAttributesDetectInfoFaceRect = exports.DetectFaceAttributesResponseBodyDataFaceInfosFaceAttributesDetectInfoFaceAttributes = exports.DetectFaceAttributesResponseBodyDataFaceInfosFaceAttributesDetectInfoFaceAttributesSmiling = exports.DetectFaceAttributesResponseBodyDataFaceInfosFaceAttributesDetectInfoFaceAttributesHeadpose = exports.DescribeVerifyTokenResponseBodyOssUploadToken = exports.DescribeVerifyResultResponseBodyMaterial = exports.DescribeVerifyResultResponseBodyMaterialIdCardInfo = exports.DescribeSmartStatisticsPageListResponseBodyItems = exports.DescribePageFaceVerifyDataResponseBodyItems = exports.DescribeOssUploadTokenResponseBodyOssUploadToken = exports.DescribeFaceVerifyResponseBodyResultObject = exports.DescribeFaceGuardRiskResponseBodyResultObject = exports.DescribeDeviceInfoResponseBodyDeviceInfoList = exports.DescribeDeviceInfoResponseBodyDeviceInfoListDeviceInfo = exports.DeleteFaceVerifyResultResponseBodyResultObject = exports.DeepfakeDetectResponseBodyResultObject = exports.CredentialVerifyV2ResponseBodyResultObject = exports.CredentialVerifyV2ResponseBodyResultObjectVlResult = exports.CredentialVerifyV2AdvanceRequestMerchantDetail = exports.CredentialVerifyV2RequestMerchantDetail = exports.CredentialVerifyResponseBodyResultObject = exports.CredentialVerifyResponseBodyResultObjectVlResult = exports.CredentialVerifyRequestMerchantDetail = exports.ContrastFaceVerifyResponseBodyResultObject = exports.CompareFacesResponseBodyData = exports.CompareFaceVerifyResponseBodyResultObject = exports.BankMetaVerifyResponseBodyResultObject = exports.AIGCFaceVerifyResponseBodyResultObject = void 0;
|
|
40
|
+
exports.DescribeOssUploadTokenResponseBody = exports.DescribeFaceVerifyResponse = exports.DescribeFaceVerifyResponseBody = exports.DescribeFaceVerifyRequest = exports.DescribeFaceGuardRiskResponse = exports.DescribeFaceGuardRiskResponseBody = exports.DescribeFaceGuardRiskRequest = exports.DescribeDeviceInfoResponse = exports.DescribeDeviceInfoResponseBody = exports.DescribeDeviceInfoRequest = exports.DeleteFaceVerifyResultResponse = exports.DeleteFaceVerifyResultResponseBody = exports.DeleteFaceVerifyResultRequest = exports.DeepfakeDetectResponse = exports.DeepfakeDetectResponseBody = exports.DeepfakeDetectRequest = exports.CredentialVerifyV2Response = exports.CredentialVerifyV2ResponseBody = exports.CredentialVerifyV2ShrinkRequest = exports.CredentialVerifyV2AdvanceRequest = exports.CredentialVerifyV2Request = exports.CredentialVerifyResponse = exports.CredentialVerifyResponseBody = exports.CredentialVerifyShrinkRequest = exports.CredentialVerifyRequest = exports.CreateVerifySettingResponse = exports.CreateVerifySettingResponseBody = exports.CreateVerifySettingRequest = exports.CreateAuthKeyResponse = exports.CreateAuthKeyResponseBody = exports.CreateAuthKeyRequest = exports.ContrastFaceVerifyResponse = exports.ContrastFaceVerifyResponseBody = exports.ContrastFaceVerifyAdvanceRequest = exports.ContrastFaceVerifyRequest = exports.CompareFacesResponse = exports.CompareFacesResponseBody = exports.CompareFacesRequest = exports.CompareFaceVerifyResponse = exports.CompareFaceVerifyResponseBody = exports.CompareFaceVerifyRequest = exports.BankMetaVerifyResponse = exports.BankMetaVerifyResponseBody = exports.BankMetaVerifyRequest = exports.AIGCFaceVerifyResponse = exports.AIGCFaceVerifyResponseBody = exports.AIGCFaceVerifyRequest = exports.VerifyMaterialResponseBodyMaterial = exports.VerifyMaterialResponseBodyMaterialIdCardInfo = exports.VehicleQueryResponseBodyResultObject = void 0;
|
|
41
|
+
exports.Mobile3MetaSimpleStandardVerifyResponse = exports.Mobile3MetaSimpleStandardVerifyResponseBody = exports.Mobile3MetaSimpleStandardVerifyRequest = exports.Mobile3MetaDetailVerifyResponse = exports.Mobile3MetaDetailVerifyResponseBody = exports.Mobile3MetaDetailVerifyRequest = exports.Mobile3MetaDetailStandardVerifyResponse = exports.Mobile3MetaDetailStandardVerifyResponseBody = exports.Mobile3MetaDetailStandardVerifyRequest = exports.LivenessFaceVerifyResponse = exports.LivenessFaceVerifyResponseBody = exports.LivenessFaceVerifyRequest = exports.InsertWhiteListSettingResponse = exports.InsertWhiteListSettingResponseBody = exports.InsertWhiteListSettingRequest = exports.InitFaceVerifyResponse = exports.InitFaceVerifyResponseBody = exports.InitFaceVerifyRequest = exports.Id2MetaVerifyWithOCRResponse = exports.Id2MetaVerifyWithOCRResponseBody = exports.Id2MetaVerifyWithOCRAdvanceRequest = exports.Id2MetaVerifyWithOCRRequest = exports.Id2MetaVerifyResponse = exports.Id2MetaVerifyResponseBody = exports.Id2MetaVerifyRequest = exports.Id2MetaStandardVerifyResponse = exports.Id2MetaStandardVerifyResponseBody = exports.Id2MetaStandardVerifyRequest = exports.Id2MetaPeriodVerifyResponse = exports.Id2MetaPeriodVerifyResponseBody = exports.Id2MetaPeriodVerifyRequest = exports.DetectFaceAttributesResponse = exports.DetectFaceAttributesResponseBody = exports.DetectFaceAttributesRequest = exports.DescribeVerifyTokenResponse = exports.DescribeVerifyTokenResponseBody = exports.DescribeVerifyTokenRequest = exports.DescribeVerifySDKResponse = exports.DescribeVerifySDKResponseBody = exports.DescribeVerifySDKRequest = exports.DescribeVerifyResultResponse = exports.DescribeVerifyResultResponseBody = exports.DescribeVerifyResultRequest = exports.DescribeSmartStatisticsPageListResponse = exports.DescribeSmartStatisticsPageListResponseBody = exports.DescribeSmartStatisticsPageListRequest = exports.DescribePageFaceVerifyDataResponse = exports.DescribePageFaceVerifyDataResponseBody = exports.DescribePageFaceVerifyDataRequest = exports.DescribeOssUploadTokenResponse = void 0;
|
|
42
|
+
exports.VerifyMaterialResponse = exports.VerifyMaterialResponseBody = exports.VerifyMaterialRequest = exports.VehicleQueryResponse = exports.VehicleQueryResponseBody = exports.VehicleQueryRequest = exports.VehicleMetaVerifyV2Response = exports.VehicleMetaVerifyV2ResponseBody = exports.VehicleMetaVerifyV2Request = exports.VehicleMetaVerifyResponse = exports.VehicleMetaVerifyResponseBody = exports.VehicleMetaVerifyRequest = exports.VehicleInsureQueryResponse = exports.VehicleInsureQueryResponseBody = exports.VehicleInsureQueryRequest = exports.Vehicle5ItemQueryResponse = exports.Vehicle5ItemQueryResponseBody = exports.Vehicle5ItemQueryRequest = exports.RemoveWhiteListSettingResponse = exports.RemoveWhiteListSettingResponseBody = exports.RemoveWhiteListSettingShrinkRequest = exports.RemoveWhiteListSettingRequest = exports.PageQueryWhiteListSettingResponse = exports.PageQueryWhiteListSettingResponseBody = exports.PageQueryWhiteListSettingRequest = exports.ModifyDeviceInfoResponse = exports.ModifyDeviceInfoResponseBody = exports.ModifyDeviceInfoRequest = exports.MobileOnlineTimeResponse = exports.MobileOnlineTimeResponseBody = exports.MobileOnlineTimeRequest = exports.MobileOnlineStatusResponse = exports.MobileOnlineStatusResponseBody = exports.MobileOnlineStatusRequest = exports.MobileDetectResponse = exports.MobileDetectResponseBody = exports.MobileDetectRequest = exports.Mobile3MetaSimpleVerifyResponse = exports.Mobile3MetaSimpleVerifyResponseBody = exports.Mobile3MetaSimpleVerifyRequest = void 0;
|
|
43
43
|
// This file is auto-generated, don't edit it
|
|
44
44
|
/**
|
|
45
45
|
*/
|
|
@@ -246,6 +246,108 @@ class CredentialVerifyResponseBodyResultObject extends $dara.Model {
|
|
|
246
246
|
}
|
|
247
247
|
}
|
|
248
248
|
exports.CredentialVerifyResponseBodyResultObject = CredentialVerifyResponseBodyResultObject;
|
|
249
|
+
class CredentialVerifyV2RequestMerchantDetail extends $dara.Model {
|
|
250
|
+
static names() {
|
|
251
|
+
return {
|
|
252
|
+
key: 'Key',
|
|
253
|
+
value: 'Value',
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
static types() {
|
|
257
|
+
return {
|
|
258
|
+
key: 'string',
|
|
259
|
+
value: 'string',
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
validate() {
|
|
263
|
+
super.validate();
|
|
264
|
+
}
|
|
265
|
+
constructor(map) {
|
|
266
|
+
super(map);
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
exports.CredentialVerifyV2RequestMerchantDetail = CredentialVerifyV2RequestMerchantDetail;
|
|
270
|
+
class CredentialVerifyV2AdvanceRequestMerchantDetail extends $dara.Model {
|
|
271
|
+
static names() {
|
|
272
|
+
return {
|
|
273
|
+
key: 'Key',
|
|
274
|
+
value: 'Value',
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
static types() {
|
|
278
|
+
return {
|
|
279
|
+
key: 'string',
|
|
280
|
+
value: 'string',
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
validate() {
|
|
284
|
+
super.validate();
|
|
285
|
+
}
|
|
286
|
+
constructor(map) {
|
|
287
|
+
super(map);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
exports.CredentialVerifyV2AdvanceRequestMerchantDetail = CredentialVerifyV2AdvanceRequestMerchantDetail;
|
|
291
|
+
class CredentialVerifyV2ResponseBodyResultObjectVlResult extends $dara.Model {
|
|
292
|
+
static names() {
|
|
293
|
+
return {
|
|
294
|
+
success: 'Success',
|
|
295
|
+
vlContent: 'VlContent',
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
static types() {
|
|
299
|
+
return {
|
|
300
|
+
success: 'boolean',
|
|
301
|
+
vlContent: 'string',
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
validate() {
|
|
305
|
+
super.validate();
|
|
306
|
+
}
|
|
307
|
+
constructor(map) {
|
|
308
|
+
super(map);
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
exports.CredentialVerifyV2ResponseBodyResultObjectVlResult = CredentialVerifyV2ResponseBodyResultObjectVlResult;
|
|
312
|
+
class CredentialVerifyV2ResponseBodyResultObject extends $dara.Model {
|
|
313
|
+
static names() {
|
|
314
|
+
return {
|
|
315
|
+
materialInfo: 'MaterialInfo',
|
|
316
|
+
ocrInfo: 'OcrInfo',
|
|
317
|
+
result: 'Result',
|
|
318
|
+
riskScore: 'RiskScore',
|
|
319
|
+
riskTag: 'RiskTag',
|
|
320
|
+
verifyDetail: 'VerifyDetail',
|
|
321
|
+
verifyResult: 'VerifyResult',
|
|
322
|
+
vlResult: 'VlResult',
|
|
323
|
+
};
|
|
324
|
+
}
|
|
325
|
+
static types() {
|
|
326
|
+
return {
|
|
327
|
+
materialInfo: 'string',
|
|
328
|
+
ocrInfo: 'string',
|
|
329
|
+
result: 'string',
|
|
330
|
+
riskScore: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
331
|
+
riskTag: 'string',
|
|
332
|
+
verifyDetail: 'string',
|
|
333
|
+
verifyResult: 'string',
|
|
334
|
+
vlResult: CredentialVerifyV2ResponseBodyResultObjectVlResult,
|
|
335
|
+
};
|
|
336
|
+
}
|
|
337
|
+
validate() {
|
|
338
|
+
if (this.riskScore) {
|
|
339
|
+
$dara.Model.validateMap(this.riskScore);
|
|
340
|
+
}
|
|
341
|
+
if (this.vlResult && typeof this.vlResult.validate === 'function') {
|
|
342
|
+
this.vlResult.validate();
|
|
343
|
+
}
|
|
344
|
+
super.validate();
|
|
345
|
+
}
|
|
346
|
+
constructor(map) {
|
|
347
|
+
super(map);
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
exports.CredentialVerifyV2ResponseBodyResultObject = CredentialVerifyV2ResponseBodyResultObject;
|
|
249
351
|
class DeepfakeDetectResponseBodyResultObject extends $dara.Model {
|
|
250
352
|
static names() {
|
|
251
353
|
return {
|
|
@@ -838,6 +940,27 @@ class Id2MetaVerifyResponseBodyResultObject extends $dara.Model {
|
|
|
838
940
|
}
|
|
839
941
|
}
|
|
840
942
|
exports.Id2MetaVerifyResponseBodyResultObject = Id2MetaVerifyResponseBodyResultObject;
|
|
943
|
+
class Id2MetaVerifyWithOCRResponseBodyResultObject extends $dara.Model {
|
|
944
|
+
static names() {
|
|
945
|
+
return {
|
|
946
|
+
bizCode: 'BizCode',
|
|
947
|
+
cardInfo: 'CardInfo',
|
|
948
|
+
};
|
|
949
|
+
}
|
|
950
|
+
static types() {
|
|
951
|
+
return {
|
|
952
|
+
bizCode: 'string',
|
|
953
|
+
cardInfo: 'string',
|
|
954
|
+
};
|
|
955
|
+
}
|
|
956
|
+
validate() {
|
|
957
|
+
super.validate();
|
|
958
|
+
}
|
|
959
|
+
constructor(map) {
|
|
960
|
+
super(map);
|
|
961
|
+
}
|
|
962
|
+
}
|
|
963
|
+
exports.Id2MetaVerifyWithOCRResponseBodyResultObject = Id2MetaVerifyWithOCRResponseBodyResultObject;
|
|
841
964
|
class InitFaceVerifyResponseBodyResultObject extends $dara.Model {
|
|
842
965
|
static names() {
|
|
843
966
|
return {
|
|
@@ -2126,6 +2249,204 @@ class CredentialVerifyResponse extends $dara.Model {
|
|
|
2126
2249
|
}
|
|
2127
2250
|
}
|
|
2128
2251
|
exports.CredentialVerifyResponse = CredentialVerifyResponse;
|
|
2252
|
+
class CredentialVerifyV2Request extends $dara.Model {
|
|
2253
|
+
static names() {
|
|
2254
|
+
return {
|
|
2255
|
+
certNum: 'CertNum',
|
|
2256
|
+
credName: 'CredName',
|
|
2257
|
+
credType: 'CredType',
|
|
2258
|
+
identifyNum: 'IdentifyNum',
|
|
2259
|
+
imageFile: 'ImageFile',
|
|
2260
|
+
imageUrl: 'ImageUrl',
|
|
2261
|
+
isCheck: 'IsCheck',
|
|
2262
|
+
isOcr: 'IsOcr',
|
|
2263
|
+
merchantDetail: 'MerchantDetail',
|
|
2264
|
+
merchantId: 'MerchantId',
|
|
2265
|
+
productCode: 'ProductCode',
|
|
2266
|
+
prompt: 'Prompt',
|
|
2267
|
+
promptModel: 'PromptModel',
|
|
2268
|
+
userName: 'UserName',
|
|
2269
|
+
};
|
|
2270
|
+
}
|
|
2271
|
+
static types() {
|
|
2272
|
+
return {
|
|
2273
|
+
certNum: 'string',
|
|
2274
|
+
credName: 'string',
|
|
2275
|
+
credType: 'string',
|
|
2276
|
+
identifyNum: 'string',
|
|
2277
|
+
imageFile: 'string',
|
|
2278
|
+
imageUrl: 'string',
|
|
2279
|
+
isCheck: 'string',
|
|
2280
|
+
isOcr: 'string',
|
|
2281
|
+
merchantDetail: { 'type': 'array', 'itemType': CredentialVerifyV2RequestMerchantDetail },
|
|
2282
|
+
merchantId: 'string',
|
|
2283
|
+
productCode: 'string',
|
|
2284
|
+
prompt: 'string',
|
|
2285
|
+
promptModel: 'string',
|
|
2286
|
+
userName: 'string',
|
|
2287
|
+
};
|
|
2288
|
+
}
|
|
2289
|
+
validate() {
|
|
2290
|
+
if (Array.isArray(this.merchantDetail)) {
|
|
2291
|
+
$dara.Model.validateArray(this.merchantDetail);
|
|
2292
|
+
}
|
|
2293
|
+
super.validate();
|
|
2294
|
+
}
|
|
2295
|
+
constructor(map) {
|
|
2296
|
+
super(map);
|
|
2297
|
+
}
|
|
2298
|
+
}
|
|
2299
|
+
exports.CredentialVerifyV2Request = CredentialVerifyV2Request;
|
|
2300
|
+
class CredentialVerifyV2AdvanceRequest extends $dara.Model {
|
|
2301
|
+
static names() {
|
|
2302
|
+
return {
|
|
2303
|
+
certNum: 'CertNum',
|
|
2304
|
+
credName: 'CredName',
|
|
2305
|
+
credType: 'CredType',
|
|
2306
|
+
identifyNum: 'IdentifyNum',
|
|
2307
|
+
imageFileObject: 'ImageFile',
|
|
2308
|
+
imageUrl: 'ImageUrl',
|
|
2309
|
+
isCheck: 'IsCheck',
|
|
2310
|
+
isOcr: 'IsOcr',
|
|
2311
|
+
merchantDetail: 'MerchantDetail',
|
|
2312
|
+
merchantId: 'MerchantId',
|
|
2313
|
+
productCode: 'ProductCode',
|
|
2314
|
+
prompt: 'Prompt',
|
|
2315
|
+
promptModel: 'PromptModel',
|
|
2316
|
+
userName: 'UserName',
|
|
2317
|
+
};
|
|
2318
|
+
}
|
|
2319
|
+
static types() {
|
|
2320
|
+
return {
|
|
2321
|
+
certNum: 'string',
|
|
2322
|
+
credName: 'string',
|
|
2323
|
+
credType: 'string',
|
|
2324
|
+
identifyNum: 'string',
|
|
2325
|
+
imageFileObject: 'Readable',
|
|
2326
|
+
imageUrl: 'string',
|
|
2327
|
+
isCheck: 'string',
|
|
2328
|
+
isOcr: 'string',
|
|
2329
|
+
merchantDetail: { 'type': 'array', 'itemType': CredentialVerifyV2AdvanceRequestMerchantDetail },
|
|
2330
|
+
merchantId: 'string',
|
|
2331
|
+
productCode: 'string',
|
|
2332
|
+
prompt: 'string',
|
|
2333
|
+
promptModel: 'string',
|
|
2334
|
+
userName: 'string',
|
|
2335
|
+
};
|
|
2336
|
+
}
|
|
2337
|
+
validate() {
|
|
2338
|
+
if (Array.isArray(this.merchantDetail)) {
|
|
2339
|
+
$dara.Model.validateArray(this.merchantDetail);
|
|
2340
|
+
}
|
|
2341
|
+
super.validate();
|
|
2342
|
+
}
|
|
2343
|
+
constructor(map) {
|
|
2344
|
+
super(map);
|
|
2345
|
+
}
|
|
2346
|
+
}
|
|
2347
|
+
exports.CredentialVerifyV2AdvanceRequest = CredentialVerifyV2AdvanceRequest;
|
|
2348
|
+
class CredentialVerifyV2ShrinkRequest extends $dara.Model {
|
|
2349
|
+
static names() {
|
|
2350
|
+
return {
|
|
2351
|
+
certNum: 'CertNum',
|
|
2352
|
+
credName: 'CredName',
|
|
2353
|
+
credType: 'CredType',
|
|
2354
|
+
identifyNum: 'IdentifyNum',
|
|
2355
|
+
imageFile: 'ImageFile',
|
|
2356
|
+
imageUrl: 'ImageUrl',
|
|
2357
|
+
isCheck: 'IsCheck',
|
|
2358
|
+
isOcr: 'IsOcr',
|
|
2359
|
+
merchantDetailShrink: 'MerchantDetail',
|
|
2360
|
+
merchantId: 'MerchantId',
|
|
2361
|
+
productCode: 'ProductCode',
|
|
2362
|
+
prompt: 'Prompt',
|
|
2363
|
+
promptModel: 'PromptModel',
|
|
2364
|
+
userName: 'UserName',
|
|
2365
|
+
};
|
|
2366
|
+
}
|
|
2367
|
+
static types() {
|
|
2368
|
+
return {
|
|
2369
|
+
certNum: 'string',
|
|
2370
|
+
credName: 'string',
|
|
2371
|
+
credType: 'string',
|
|
2372
|
+
identifyNum: 'string',
|
|
2373
|
+
imageFile: 'string',
|
|
2374
|
+
imageUrl: 'string',
|
|
2375
|
+
isCheck: 'string',
|
|
2376
|
+
isOcr: 'string',
|
|
2377
|
+
merchantDetailShrink: 'string',
|
|
2378
|
+
merchantId: 'string',
|
|
2379
|
+
productCode: 'string',
|
|
2380
|
+
prompt: 'string',
|
|
2381
|
+
promptModel: 'string',
|
|
2382
|
+
userName: 'string',
|
|
2383
|
+
};
|
|
2384
|
+
}
|
|
2385
|
+
validate() {
|
|
2386
|
+
super.validate();
|
|
2387
|
+
}
|
|
2388
|
+
constructor(map) {
|
|
2389
|
+
super(map);
|
|
2390
|
+
}
|
|
2391
|
+
}
|
|
2392
|
+
exports.CredentialVerifyV2ShrinkRequest = CredentialVerifyV2ShrinkRequest;
|
|
2393
|
+
class CredentialVerifyV2ResponseBody extends $dara.Model {
|
|
2394
|
+
static names() {
|
|
2395
|
+
return {
|
|
2396
|
+
code: 'Code',
|
|
2397
|
+
message: 'Message',
|
|
2398
|
+
requestId: 'RequestId',
|
|
2399
|
+
resultObject: 'ResultObject',
|
|
2400
|
+
};
|
|
2401
|
+
}
|
|
2402
|
+
static types() {
|
|
2403
|
+
return {
|
|
2404
|
+
code: 'string',
|
|
2405
|
+
message: 'string',
|
|
2406
|
+
requestId: 'string',
|
|
2407
|
+
resultObject: CredentialVerifyV2ResponseBodyResultObject,
|
|
2408
|
+
};
|
|
2409
|
+
}
|
|
2410
|
+
validate() {
|
|
2411
|
+
if (this.resultObject && typeof this.resultObject.validate === 'function') {
|
|
2412
|
+
this.resultObject.validate();
|
|
2413
|
+
}
|
|
2414
|
+
super.validate();
|
|
2415
|
+
}
|
|
2416
|
+
constructor(map) {
|
|
2417
|
+
super(map);
|
|
2418
|
+
}
|
|
2419
|
+
}
|
|
2420
|
+
exports.CredentialVerifyV2ResponseBody = CredentialVerifyV2ResponseBody;
|
|
2421
|
+
class CredentialVerifyV2Response extends $dara.Model {
|
|
2422
|
+
static names() {
|
|
2423
|
+
return {
|
|
2424
|
+
headers: 'headers',
|
|
2425
|
+
statusCode: 'statusCode',
|
|
2426
|
+
body: 'body',
|
|
2427
|
+
};
|
|
2428
|
+
}
|
|
2429
|
+
static types() {
|
|
2430
|
+
return {
|
|
2431
|
+
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
2432
|
+
statusCode: 'number',
|
|
2433
|
+
body: CredentialVerifyV2ResponseBody,
|
|
2434
|
+
};
|
|
2435
|
+
}
|
|
2436
|
+
validate() {
|
|
2437
|
+
if (this.headers) {
|
|
2438
|
+
$dara.Model.validateMap(this.headers);
|
|
2439
|
+
}
|
|
2440
|
+
if (this.body && typeof this.body.validate === 'function') {
|
|
2441
|
+
this.body.validate();
|
|
2442
|
+
}
|
|
2443
|
+
super.validate();
|
|
2444
|
+
}
|
|
2445
|
+
constructor(map) {
|
|
2446
|
+
super(map);
|
|
2447
|
+
}
|
|
2448
|
+
}
|
|
2449
|
+
exports.CredentialVerifyV2Response = CredentialVerifyV2Response;
|
|
2129
2450
|
class DeepfakeDetectRequest extends $dara.Model {
|
|
2130
2451
|
static names() {
|
|
2131
2452
|
return {
|
|
@@ -3298,8 +3619,115 @@ class Id2MetaVerifyRequest extends $dara.Model {
|
|
|
3298
3619
|
super(map);
|
|
3299
3620
|
}
|
|
3300
3621
|
}
|
|
3301
|
-
exports.Id2MetaVerifyRequest = Id2MetaVerifyRequest;
|
|
3302
|
-
class Id2MetaVerifyResponseBody extends $dara.Model {
|
|
3622
|
+
exports.Id2MetaVerifyRequest = Id2MetaVerifyRequest;
|
|
3623
|
+
class Id2MetaVerifyResponseBody extends $dara.Model {
|
|
3624
|
+
static names() {
|
|
3625
|
+
return {
|
|
3626
|
+
code: 'Code',
|
|
3627
|
+
message: 'Message',
|
|
3628
|
+
requestId: 'RequestId',
|
|
3629
|
+
resultObject: 'ResultObject',
|
|
3630
|
+
};
|
|
3631
|
+
}
|
|
3632
|
+
static types() {
|
|
3633
|
+
return {
|
|
3634
|
+
code: 'string',
|
|
3635
|
+
message: 'string',
|
|
3636
|
+
requestId: 'string',
|
|
3637
|
+
resultObject: Id2MetaVerifyResponseBodyResultObject,
|
|
3638
|
+
};
|
|
3639
|
+
}
|
|
3640
|
+
validate() {
|
|
3641
|
+
if (this.resultObject && typeof this.resultObject.validate === 'function') {
|
|
3642
|
+
this.resultObject.validate();
|
|
3643
|
+
}
|
|
3644
|
+
super.validate();
|
|
3645
|
+
}
|
|
3646
|
+
constructor(map) {
|
|
3647
|
+
super(map);
|
|
3648
|
+
}
|
|
3649
|
+
}
|
|
3650
|
+
exports.Id2MetaVerifyResponseBody = Id2MetaVerifyResponseBody;
|
|
3651
|
+
class Id2MetaVerifyResponse extends $dara.Model {
|
|
3652
|
+
static names() {
|
|
3653
|
+
return {
|
|
3654
|
+
headers: 'headers',
|
|
3655
|
+
statusCode: 'statusCode',
|
|
3656
|
+
body: 'body',
|
|
3657
|
+
};
|
|
3658
|
+
}
|
|
3659
|
+
static types() {
|
|
3660
|
+
return {
|
|
3661
|
+
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
3662
|
+
statusCode: 'number',
|
|
3663
|
+
body: Id2MetaVerifyResponseBody,
|
|
3664
|
+
};
|
|
3665
|
+
}
|
|
3666
|
+
validate() {
|
|
3667
|
+
if (this.headers) {
|
|
3668
|
+
$dara.Model.validateMap(this.headers);
|
|
3669
|
+
}
|
|
3670
|
+
if (this.body && typeof this.body.validate === 'function') {
|
|
3671
|
+
this.body.validate();
|
|
3672
|
+
}
|
|
3673
|
+
super.validate();
|
|
3674
|
+
}
|
|
3675
|
+
constructor(map) {
|
|
3676
|
+
super(map);
|
|
3677
|
+
}
|
|
3678
|
+
}
|
|
3679
|
+
exports.Id2MetaVerifyResponse = Id2MetaVerifyResponse;
|
|
3680
|
+
class Id2MetaVerifyWithOCRRequest extends $dara.Model {
|
|
3681
|
+
static names() {
|
|
3682
|
+
return {
|
|
3683
|
+
certFile: 'CertFile',
|
|
3684
|
+
certNationalFile: 'CertNationalFile',
|
|
3685
|
+
certNationalUrl: 'CertNationalUrl',
|
|
3686
|
+
certUrl: 'CertUrl',
|
|
3687
|
+
};
|
|
3688
|
+
}
|
|
3689
|
+
static types() {
|
|
3690
|
+
return {
|
|
3691
|
+
certFile: 'string',
|
|
3692
|
+
certNationalFile: 'string',
|
|
3693
|
+
certNationalUrl: 'string',
|
|
3694
|
+
certUrl: 'string',
|
|
3695
|
+
};
|
|
3696
|
+
}
|
|
3697
|
+
validate() {
|
|
3698
|
+
super.validate();
|
|
3699
|
+
}
|
|
3700
|
+
constructor(map) {
|
|
3701
|
+
super(map);
|
|
3702
|
+
}
|
|
3703
|
+
}
|
|
3704
|
+
exports.Id2MetaVerifyWithOCRRequest = Id2MetaVerifyWithOCRRequest;
|
|
3705
|
+
class Id2MetaVerifyWithOCRAdvanceRequest extends $dara.Model {
|
|
3706
|
+
static names() {
|
|
3707
|
+
return {
|
|
3708
|
+
certFileObject: 'CertFile',
|
|
3709
|
+
certNationalFileObject: 'CertNationalFile',
|
|
3710
|
+
certNationalUrl: 'CertNationalUrl',
|
|
3711
|
+
certUrl: 'CertUrl',
|
|
3712
|
+
};
|
|
3713
|
+
}
|
|
3714
|
+
static types() {
|
|
3715
|
+
return {
|
|
3716
|
+
certFileObject: 'Readable',
|
|
3717
|
+
certNationalFileObject: 'Readable',
|
|
3718
|
+
certNationalUrl: 'string',
|
|
3719
|
+
certUrl: 'string',
|
|
3720
|
+
};
|
|
3721
|
+
}
|
|
3722
|
+
validate() {
|
|
3723
|
+
super.validate();
|
|
3724
|
+
}
|
|
3725
|
+
constructor(map) {
|
|
3726
|
+
super(map);
|
|
3727
|
+
}
|
|
3728
|
+
}
|
|
3729
|
+
exports.Id2MetaVerifyWithOCRAdvanceRequest = Id2MetaVerifyWithOCRAdvanceRequest;
|
|
3730
|
+
class Id2MetaVerifyWithOCRResponseBody extends $dara.Model {
|
|
3303
3731
|
static names() {
|
|
3304
3732
|
return {
|
|
3305
3733
|
code: 'Code',
|
|
@@ -3313,7 +3741,7 @@ class Id2MetaVerifyResponseBody extends $dara.Model {
|
|
|
3313
3741
|
code: 'string',
|
|
3314
3742
|
message: 'string',
|
|
3315
3743
|
requestId: 'string',
|
|
3316
|
-
resultObject:
|
|
3744
|
+
resultObject: Id2MetaVerifyWithOCRResponseBodyResultObject,
|
|
3317
3745
|
};
|
|
3318
3746
|
}
|
|
3319
3747
|
validate() {
|
|
@@ -3326,8 +3754,8 @@ class Id2MetaVerifyResponseBody extends $dara.Model {
|
|
|
3326
3754
|
super(map);
|
|
3327
3755
|
}
|
|
3328
3756
|
}
|
|
3329
|
-
exports.
|
|
3330
|
-
class
|
|
3757
|
+
exports.Id2MetaVerifyWithOCRResponseBody = Id2MetaVerifyWithOCRResponseBody;
|
|
3758
|
+
class Id2MetaVerifyWithOCRResponse extends $dara.Model {
|
|
3331
3759
|
static names() {
|
|
3332
3760
|
return {
|
|
3333
3761
|
headers: 'headers',
|
|
@@ -3339,7 +3767,7 @@ class Id2MetaVerifyResponse extends $dara.Model {
|
|
|
3339
3767
|
return {
|
|
3340
3768
|
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
3341
3769
|
statusCode: 'number',
|
|
3342
|
-
body:
|
|
3770
|
+
body: Id2MetaVerifyWithOCRResponseBody,
|
|
3343
3771
|
};
|
|
3344
3772
|
}
|
|
3345
3773
|
validate() {
|
|
@@ -3355,7 +3783,7 @@ class Id2MetaVerifyResponse extends $dara.Model {
|
|
|
3355
3783
|
super(map);
|
|
3356
3784
|
}
|
|
3357
3785
|
}
|
|
3358
|
-
exports.
|
|
3786
|
+
exports.Id2MetaVerifyWithOCRResponse = Id2MetaVerifyWithOCRResponse;
|
|
3359
3787
|
class InitFaceVerifyRequest extends $dara.Model {
|
|
3360
3788
|
static names() {
|
|
3361
3789
|
return {
|
|
@@ -5643,6 +6071,162 @@ class Client extends openapi_core_1.default {
|
|
|
5643
6071
|
let runtime = new $dara.RuntimeOptions({});
|
|
5644
6072
|
return await this.credentialVerifyWithOptions(request, runtime);
|
|
5645
6073
|
}
|
|
6074
|
+
/**
|
|
6075
|
+
* 凭证核验
|
|
6076
|
+
*
|
|
6077
|
+
* @param tmpReq - CredentialVerifyV2Request
|
|
6078
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
6079
|
+
* @returns CredentialVerifyV2Response
|
|
6080
|
+
*/
|
|
6081
|
+
async credentialVerifyV2WithOptions(tmpReq, runtime) {
|
|
6082
|
+
tmpReq.validate();
|
|
6083
|
+
let request = new CredentialVerifyV2ShrinkRequest({});
|
|
6084
|
+
openapi_core_2.OpenApiUtil.convert(tmpReq, request);
|
|
6085
|
+
if (!$dara.isNull(tmpReq.merchantDetail)) {
|
|
6086
|
+
request.merchantDetailShrink = openapi_core_2.OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.merchantDetail, "MerchantDetail", "json");
|
|
6087
|
+
}
|
|
6088
|
+
let query = {};
|
|
6089
|
+
if (!$dara.isNull(request.certNum)) {
|
|
6090
|
+
query["CertNum"] = request.certNum;
|
|
6091
|
+
}
|
|
6092
|
+
if (!$dara.isNull(request.credName)) {
|
|
6093
|
+
query["CredName"] = request.credName;
|
|
6094
|
+
}
|
|
6095
|
+
if (!$dara.isNull(request.credType)) {
|
|
6096
|
+
query["CredType"] = request.credType;
|
|
6097
|
+
}
|
|
6098
|
+
if (!$dara.isNull(request.identifyNum)) {
|
|
6099
|
+
query["IdentifyNum"] = request.identifyNum;
|
|
6100
|
+
}
|
|
6101
|
+
if (!$dara.isNull(request.imageUrl)) {
|
|
6102
|
+
query["ImageUrl"] = request.imageUrl;
|
|
6103
|
+
}
|
|
6104
|
+
if (!$dara.isNull(request.isCheck)) {
|
|
6105
|
+
query["IsCheck"] = request.isCheck;
|
|
6106
|
+
}
|
|
6107
|
+
if (!$dara.isNull(request.isOcr)) {
|
|
6108
|
+
query["IsOcr"] = request.isOcr;
|
|
6109
|
+
}
|
|
6110
|
+
if (!$dara.isNull(request.merchantDetailShrink)) {
|
|
6111
|
+
query["MerchantDetail"] = request.merchantDetailShrink;
|
|
6112
|
+
}
|
|
6113
|
+
if (!$dara.isNull(request.merchantId)) {
|
|
6114
|
+
query["MerchantId"] = request.merchantId;
|
|
6115
|
+
}
|
|
6116
|
+
if (!$dara.isNull(request.productCode)) {
|
|
6117
|
+
query["ProductCode"] = request.productCode;
|
|
6118
|
+
}
|
|
6119
|
+
if (!$dara.isNull(request.prompt)) {
|
|
6120
|
+
query["Prompt"] = request.prompt;
|
|
6121
|
+
}
|
|
6122
|
+
if (!$dara.isNull(request.promptModel)) {
|
|
6123
|
+
query["PromptModel"] = request.promptModel;
|
|
6124
|
+
}
|
|
6125
|
+
if (!$dara.isNull(request.userName)) {
|
|
6126
|
+
query["UserName"] = request.userName;
|
|
6127
|
+
}
|
|
6128
|
+
let body = {};
|
|
6129
|
+
if (!$dara.isNull(request.imageFile)) {
|
|
6130
|
+
body["ImageFile"] = request.imageFile;
|
|
6131
|
+
}
|
|
6132
|
+
let req = new openapi_core_2.$OpenApiUtil.OpenApiRequest({
|
|
6133
|
+
query: openapi_core_2.OpenApiUtil.query(query),
|
|
6134
|
+
body: openapi_core_2.OpenApiUtil.parseToMap(body),
|
|
6135
|
+
});
|
|
6136
|
+
let params = new openapi_core_2.$OpenApiUtil.Params({
|
|
6137
|
+
action: "CredentialVerifyV2",
|
|
6138
|
+
version: "2019-03-07",
|
|
6139
|
+
protocol: "HTTPS",
|
|
6140
|
+
pathname: "/",
|
|
6141
|
+
method: "POST",
|
|
6142
|
+
authType: "AK",
|
|
6143
|
+
style: "RPC",
|
|
6144
|
+
reqBodyType: "formData",
|
|
6145
|
+
bodyType: "json",
|
|
6146
|
+
});
|
|
6147
|
+
return $dara.cast(await this.callApi(params, req, runtime), new CredentialVerifyV2Response({}));
|
|
6148
|
+
}
|
|
6149
|
+
/**
|
|
6150
|
+
* 凭证核验
|
|
6151
|
+
*
|
|
6152
|
+
* @param request - CredentialVerifyV2Request
|
|
6153
|
+
* @returns CredentialVerifyV2Response
|
|
6154
|
+
*/
|
|
6155
|
+
async credentialVerifyV2(request) {
|
|
6156
|
+
let runtime = new $dara.RuntimeOptions({});
|
|
6157
|
+
return await this.credentialVerifyV2WithOptions(request, runtime);
|
|
6158
|
+
}
|
|
6159
|
+
async credentialVerifyV2Advance(request, runtime) {
|
|
6160
|
+
// Step 0: init client
|
|
6161
|
+
let accessKeyId = await this._credential.getAccessKeyId();
|
|
6162
|
+
let accessKeySecret = await this._credential.getAccessKeySecret();
|
|
6163
|
+
let securityToken = await this._credential.getSecurityToken();
|
|
6164
|
+
let credentialType = this._credential.getType();
|
|
6165
|
+
let openPlatformEndpoint = this._openPlatformEndpoint;
|
|
6166
|
+
if ($dara.isNull(openPlatformEndpoint)) {
|
|
6167
|
+
openPlatformEndpoint = "openplatform.aliyuncs.com";
|
|
6168
|
+
}
|
|
6169
|
+
if ($dara.isNull(credentialType)) {
|
|
6170
|
+
credentialType = "access_key";
|
|
6171
|
+
}
|
|
6172
|
+
let authConfig = new openapi_core_2.$OpenApiUtil.Config({
|
|
6173
|
+
accessKeyId: accessKeyId,
|
|
6174
|
+
accessKeySecret: accessKeySecret,
|
|
6175
|
+
securityToken: securityToken,
|
|
6176
|
+
type: credentialType,
|
|
6177
|
+
endpoint: openPlatformEndpoint,
|
|
6178
|
+
protocol: this._protocol,
|
|
6179
|
+
regionId: this._regionId,
|
|
6180
|
+
});
|
|
6181
|
+
let authClient = new openplatform20191219_1.default(authConfig);
|
|
6182
|
+
let authRequest = new $OpenPlatform.AuthorizeFileUploadRequest({
|
|
6183
|
+
product: "Cloudauth",
|
|
6184
|
+
regionId: this._regionId,
|
|
6185
|
+
});
|
|
6186
|
+
let authResponse = new $OpenPlatform.AuthorizeFileUploadResponse({});
|
|
6187
|
+
let ossConfig = new $OSS.Config({
|
|
6188
|
+
accessKeyId: accessKeyId,
|
|
6189
|
+
accessKeySecret: accessKeySecret,
|
|
6190
|
+
type: "access_key",
|
|
6191
|
+
protocol: this._protocol,
|
|
6192
|
+
regionId: this._regionId,
|
|
6193
|
+
});
|
|
6194
|
+
let ossClient = new oss_client_1.default(ossConfig);
|
|
6195
|
+
let fileObj = new $FileForm.FileField({});
|
|
6196
|
+
let ossHeader = new $OSS.PostObjectRequestHeader({});
|
|
6197
|
+
let uploadRequest = new $OSS.PostObjectRequest({});
|
|
6198
|
+
let ossRuntime = new $OSSUtil.RuntimeOptions({});
|
|
6199
|
+
openapi_core_2.OpenApiUtil.convert(runtime, ossRuntime);
|
|
6200
|
+
let credentialVerifyV2Req = new CredentialVerifyV2Request({});
|
|
6201
|
+
openapi_core_2.OpenApiUtil.convert(request, credentialVerifyV2Req);
|
|
6202
|
+
if (!$dara.isNull(request.imageFileObject)) {
|
|
6203
|
+
authResponse = await authClient.authorizeFileUploadWithOptions(authRequest, runtime);
|
|
6204
|
+
ossConfig.accessKeyId = authResponse.body.accessKeyId;
|
|
6205
|
+
ossConfig.endpoint = openapi_core_2.OpenApiUtil.getEndpoint(authResponse.body.endpoint, authResponse.body.useAccelerate, this._endpointType);
|
|
6206
|
+
ossClient = new oss_client_1.default(ossConfig);
|
|
6207
|
+
fileObj = new $FileForm.FileField({
|
|
6208
|
+
filename: authResponse.body.objectKey,
|
|
6209
|
+
content: request.imageFileObject,
|
|
6210
|
+
contentType: "",
|
|
6211
|
+
});
|
|
6212
|
+
ossHeader = new $OSS.PostObjectRequestHeader({
|
|
6213
|
+
accessKeyId: authResponse.body.accessKeyId,
|
|
6214
|
+
policy: authResponse.body.encodedPolicy,
|
|
6215
|
+
signature: authResponse.body.signature,
|
|
6216
|
+
key: authResponse.body.objectKey,
|
|
6217
|
+
file: fileObj,
|
|
6218
|
+
successActionStatus: "201",
|
|
6219
|
+
});
|
|
6220
|
+
uploadRequest = new $OSS.PostObjectRequest({
|
|
6221
|
+
bucketName: authResponse.body.bucket,
|
|
6222
|
+
header: ossHeader,
|
|
6223
|
+
});
|
|
6224
|
+
await ossClient.postObject(uploadRequest, ossRuntime);
|
|
6225
|
+
credentialVerifyV2Req.imageFile = `http://${authResponse.body.bucket}.${authResponse.body.endpoint}/${authResponse.body.objectKey}`;
|
|
6226
|
+
}
|
|
6227
|
+
let credentialVerifyV2Resp = await this.credentialVerifyV2WithOptions(credentialVerifyV2Req, runtime);
|
|
6228
|
+
return credentialVerifyV2Resp;
|
|
6229
|
+
}
|
|
5646
6230
|
/**
|
|
5647
6231
|
* 人脸凭证核验服务
|
|
5648
6232
|
*
|
|
@@ -6337,6 +6921,150 @@ class Client extends openapi_core_1.default {
|
|
|
6337
6921
|
let runtime = new $dara.RuntimeOptions({});
|
|
6338
6922
|
return await this.id2MetaVerifyWithOptions(request, runtime);
|
|
6339
6923
|
}
|
|
6924
|
+
/**
|
|
6925
|
+
* 身份二要素图片核验
|
|
6926
|
+
*
|
|
6927
|
+
* @param request - Id2MetaVerifyWithOCRRequest
|
|
6928
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
6929
|
+
* @returns Id2MetaVerifyWithOCRResponse
|
|
6930
|
+
*/
|
|
6931
|
+
async id2MetaVerifyWithOCRWithOptions(request, runtime) {
|
|
6932
|
+
request.validate();
|
|
6933
|
+
let body = {};
|
|
6934
|
+
if (!$dara.isNull(request.certFile)) {
|
|
6935
|
+
body["CertFile"] = request.certFile;
|
|
6936
|
+
}
|
|
6937
|
+
if (!$dara.isNull(request.certNationalFile)) {
|
|
6938
|
+
body["CertNationalFile"] = request.certNationalFile;
|
|
6939
|
+
}
|
|
6940
|
+
if (!$dara.isNull(request.certNationalUrl)) {
|
|
6941
|
+
body["CertNationalUrl"] = request.certNationalUrl;
|
|
6942
|
+
}
|
|
6943
|
+
if (!$dara.isNull(request.certUrl)) {
|
|
6944
|
+
body["CertUrl"] = request.certUrl;
|
|
6945
|
+
}
|
|
6946
|
+
let req = new openapi_core_2.$OpenApiUtil.OpenApiRequest({
|
|
6947
|
+
body: openapi_core_2.OpenApiUtil.parseToMap(body),
|
|
6948
|
+
});
|
|
6949
|
+
let params = new openapi_core_2.$OpenApiUtil.Params({
|
|
6950
|
+
action: "Id2MetaVerifyWithOCR",
|
|
6951
|
+
version: "2019-03-07",
|
|
6952
|
+
protocol: "HTTPS",
|
|
6953
|
+
pathname: "/",
|
|
6954
|
+
method: "POST",
|
|
6955
|
+
authType: "AK",
|
|
6956
|
+
style: "RPC",
|
|
6957
|
+
reqBodyType: "formData",
|
|
6958
|
+
bodyType: "json",
|
|
6959
|
+
});
|
|
6960
|
+
return $dara.cast(await this.callApi(params, req, runtime), new Id2MetaVerifyWithOCRResponse({}));
|
|
6961
|
+
}
|
|
6962
|
+
/**
|
|
6963
|
+
* 身份二要素图片核验
|
|
6964
|
+
*
|
|
6965
|
+
* @param request - Id2MetaVerifyWithOCRRequest
|
|
6966
|
+
* @returns Id2MetaVerifyWithOCRResponse
|
|
6967
|
+
*/
|
|
6968
|
+
async id2MetaVerifyWithOCR(request) {
|
|
6969
|
+
let runtime = new $dara.RuntimeOptions({});
|
|
6970
|
+
return await this.id2MetaVerifyWithOCRWithOptions(request, runtime);
|
|
6971
|
+
}
|
|
6972
|
+
async id2MetaVerifyWithOCRAdvance(request, runtime) {
|
|
6973
|
+
// Step 0: init client
|
|
6974
|
+
let accessKeyId = await this._credential.getAccessKeyId();
|
|
6975
|
+
let accessKeySecret = await this._credential.getAccessKeySecret();
|
|
6976
|
+
let securityToken = await this._credential.getSecurityToken();
|
|
6977
|
+
let credentialType = this._credential.getType();
|
|
6978
|
+
let openPlatformEndpoint = this._openPlatformEndpoint;
|
|
6979
|
+
if ($dara.isNull(openPlatformEndpoint)) {
|
|
6980
|
+
openPlatformEndpoint = "openplatform.aliyuncs.com";
|
|
6981
|
+
}
|
|
6982
|
+
if ($dara.isNull(credentialType)) {
|
|
6983
|
+
credentialType = "access_key";
|
|
6984
|
+
}
|
|
6985
|
+
let authConfig = new openapi_core_2.$OpenApiUtil.Config({
|
|
6986
|
+
accessKeyId: accessKeyId,
|
|
6987
|
+
accessKeySecret: accessKeySecret,
|
|
6988
|
+
securityToken: securityToken,
|
|
6989
|
+
type: credentialType,
|
|
6990
|
+
endpoint: openPlatformEndpoint,
|
|
6991
|
+
protocol: this._protocol,
|
|
6992
|
+
regionId: this._regionId,
|
|
6993
|
+
});
|
|
6994
|
+
let authClient = new openplatform20191219_1.default(authConfig);
|
|
6995
|
+
let authRequest = new $OpenPlatform.AuthorizeFileUploadRequest({
|
|
6996
|
+
product: "Cloudauth",
|
|
6997
|
+
regionId: this._regionId,
|
|
6998
|
+
});
|
|
6999
|
+
let authResponse = new $OpenPlatform.AuthorizeFileUploadResponse({});
|
|
7000
|
+
let ossConfig = new $OSS.Config({
|
|
7001
|
+
accessKeyId: accessKeyId,
|
|
7002
|
+
accessKeySecret: accessKeySecret,
|
|
7003
|
+
type: "access_key",
|
|
7004
|
+
protocol: this._protocol,
|
|
7005
|
+
regionId: this._regionId,
|
|
7006
|
+
});
|
|
7007
|
+
let ossClient = new oss_client_1.default(ossConfig);
|
|
7008
|
+
let fileObj = new $FileForm.FileField({});
|
|
7009
|
+
let ossHeader = new $OSS.PostObjectRequestHeader({});
|
|
7010
|
+
let uploadRequest = new $OSS.PostObjectRequest({});
|
|
7011
|
+
let ossRuntime = new $OSSUtil.RuntimeOptions({});
|
|
7012
|
+
openapi_core_2.OpenApiUtil.convert(runtime, ossRuntime);
|
|
7013
|
+
let id2MetaVerifyWithOCRReq = new Id2MetaVerifyWithOCRRequest({});
|
|
7014
|
+
openapi_core_2.OpenApiUtil.convert(request, id2MetaVerifyWithOCRReq);
|
|
7015
|
+
if (!$dara.isNull(request.certFileObject)) {
|
|
7016
|
+
authResponse = await authClient.authorizeFileUploadWithOptions(authRequest, runtime);
|
|
7017
|
+
ossConfig.accessKeyId = authResponse.body.accessKeyId;
|
|
7018
|
+
ossConfig.endpoint = openapi_core_2.OpenApiUtil.getEndpoint(authResponse.body.endpoint, authResponse.body.useAccelerate, this._endpointType);
|
|
7019
|
+
ossClient = new oss_client_1.default(ossConfig);
|
|
7020
|
+
fileObj = new $FileForm.FileField({
|
|
7021
|
+
filename: authResponse.body.objectKey,
|
|
7022
|
+
content: request.certFileObject,
|
|
7023
|
+
contentType: "",
|
|
7024
|
+
});
|
|
7025
|
+
ossHeader = new $OSS.PostObjectRequestHeader({
|
|
7026
|
+
accessKeyId: authResponse.body.accessKeyId,
|
|
7027
|
+
policy: authResponse.body.encodedPolicy,
|
|
7028
|
+
signature: authResponse.body.signature,
|
|
7029
|
+
key: authResponse.body.objectKey,
|
|
7030
|
+
file: fileObj,
|
|
7031
|
+
successActionStatus: "201",
|
|
7032
|
+
});
|
|
7033
|
+
uploadRequest = new $OSS.PostObjectRequest({
|
|
7034
|
+
bucketName: authResponse.body.bucket,
|
|
7035
|
+
header: ossHeader,
|
|
7036
|
+
});
|
|
7037
|
+
await ossClient.postObject(uploadRequest, ossRuntime);
|
|
7038
|
+
id2MetaVerifyWithOCRReq.certFile = `http://${authResponse.body.bucket}.${authResponse.body.endpoint}/${authResponse.body.objectKey}`;
|
|
7039
|
+
}
|
|
7040
|
+
if (!$dara.isNull(request.certNationalFileObject)) {
|
|
7041
|
+
authResponse = await authClient.authorizeFileUploadWithOptions(authRequest, runtime);
|
|
7042
|
+
ossConfig.accessKeyId = authResponse.body.accessKeyId;
|
|
7043
|
+
ossConfig.endpoint = openapi_core_2.OpenApiUtil.getEndpoint(authResponse.body.endpoint, authResponse.body.useAccelerate, this._endpointType);
|
|
7044
|
+
ossClient = new oss_client_1.default(ossConfig);
|
|
7045
|
+
fileObj = new $FileForm.FileField({
|
|
7046
|
+
filename: authResponse.body.objectKey,
|
|
7047
|
+
content: request.certNationalFileObject,
|
|
7048
|
+
contentType: "",
|
|
7049
|
+
});
|
|
7050
|
+
ossHeader = new $OSS.PostObjectRequestHeader({
|
|
7051
|
+
accessKeyId: authResponse.body.accessKeyId,
|
|
7052
|
+
policy: authResponse.body.encodedPolicy,
|
|
7053
|
+
signature: authResponse.body.signature,
|
|
7054
|
+
key: authResponse.body.objectKey,
|
|
7055
|
+
file: fileObj,
|
|
7056
|
+
successActionStatus: "201",
|
|
7057
|
+
});
|
|
7058
|
+
uploadRequest = new $OSS.PostObjectRequest({
|
|
7059
|
+
bucketName: authResponse.body.bucket,
|
|
7060
|
+
header: ossHeader,
|
|
7061
|
+
});
|
|
7062
|
+
await ossClient.postObject(uploadRequest, ossRuntime);
|
|
7063
|
+
id2MetaVerifyWithOCRReq.certNationalFile = `http://${authResponse.body.bucket}.${authResponse.body.endpoint}/${authResponse.body.objectKey}`;
|
|
7064
|
+
}
|
|
7065
|
+
let id2MetaVerifyWithOCRResp = await this.id2MetaVerifyWithOCRWithOptions(id2MetaVerifyWithOCRReq, runtime);
|
|
7066
|
+
return id2MetaVerifyWithOCRResp;
|
|
7067
|
+
}
|
|
6340
7068
|
/**
|
|
6341
7069
|
* @param request - InitFaceVerifyRequest
|
|
6342
7070
|
* @param runtime - runtime options for this request RuntimeOptions
|