tencentcloud-sdk-nodejs-faceid 4.1.114 → 4.1.149

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/README.md CHANGED
@@ -62,6 +62,8 @@ npm install tencentcloud-sdk-slim-nodejs --save
62
62
 
63
63
  1. clone 代码到本地:
64
64
  ```
65
+ git clone https://cnb.cool/tencent/cloud/api/sdk/tencentcloud-sdk-nodejs
66
+ # 或者
65
67
  git clone https://github.com/tencentcloud/tencentcloud-sdk-nodejs
66
68
  # 或者
67
69
  git clone https://gitee.com/tencentcloud/tencentcloud-sdk-nodejs
@@ -135,7 +137,7 @@ const CvmClient = tencentcloud.cvm.v20170312.Client
135
137
  // ...
136
138
  ```
137
139
 
138
- 实例化 `Client` 的入参支持 `clientConfig`,数据结构和说明详见 [ClientConfig](https://github.com/TencentCloud/tencentcloud-sdk-nodejs/blob/master/src/common/interface.ts)。
140
+ 实例化 `Client` 的入参支持 `clientConfig`,数据结构和说明详见 [ClientConfig](src/common/interface.ts)。
139
141
 
140
142
  ## Common Client
141
143
 
@@ -143,17 +145,17 @@ const CvmClient = tencentcloud.cvm.v20170312.Client
143
145
 
144
146
  **注意,您必须明确知道您调用的接口所需参数,否则可能会调用失败。**
145
147
 
146
- 详细使用请参阅示例:[使用 Common Client 进行调用](https://github.com/TencentCloud/tencentcloud-sdk-nodejs/tree/master/examples/common)
148
+ 详细使用请参阅示例:[使用 Common Client 进行调用](examples/common)
147
149
 
148
150
  ## 更多示例
149
151
 
150
- 请参考 [examples](https://github.com/TencentCloud/tencentcloud-sdk-nodejs/tree/master/examples) 目录。
152
+ 请参考 [examples](examples) 目录。
151
153
 
152
154
  # 相关配置
153
155
 
154
156
  ## 代理
155
157
 
156
- 如果是有代理的环境下,需要配置代理,请在创建 Client 时传入 [profile.httpProfile.proxy](https://github.com/TencentCloud/tencentcloud-sdk-nodejs/blob/master/src/common/interface.ts#L78) 参数,或设置系统环境变量 `http_proxy` ,否则可能无法正常调用,抛出连接超时的异常。
158
+ 如果是有代理的环境下,需要配置代理,请在创建 Client 时传入 [profile.httpProfile.proxy](src/common/interface.ts#L78) 参数,或设置系统环境变量 `http_proxy` ,否则可能无法正常调用,抛出连接超时的异常。
157
159
 
158
160
  # 凭证管理
159
161
 
@@ -78,9 +78,6 @@ export class Client extends TencentCloudCommon.AbstractClient {
78
78
  async GetFaceidRiskInfoToken(req, cb) {
79
79
  return this.request("GetFaceidRiskInfoToken", req, cb);
80
80
  }
81
- async Liveness(req, cb) {
82
- return this.request("Liveness", req, cb);
83
- }
84
81
  async PhoneVerificationCUCC(req, cb) {
85
82
  return this.request("PhoneVerificationCUCC", req, cb);
86
83
  }
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tencentcloud-sdk-nodejs-faceid",
3
- "version": "4.1.114",
3
+ "version": "4.1.149",
4
4
  "description": "腾讯云 API NODEJS SDK",
5
5
  "main": "./tencentcloud/index.js",
6
6
  "module": "./es/index.js",
@@ -12,7 +12,8 @@
12
12
  "build:es": "tsc -p tsconfig.es.json",
13
13
  "build:slim": "node ./scripts/build_slim.js",
14
14
  "prettier": "prettier --config prettier.config.js --write 'src/**/*.{tsx,ts,jsx,js,css,json,vue}'",
15
- "clean": "rimraf tencentcloud es"
15
+ "clean": "rimraf tencentcloud es",
16
+ "test:common": "vitest run"
16
17
  },
17
18
  "engines": {
18
19
  "node": ">=10"
@@ -44,9 +45,9 @@
44
45
  "url": "https://github.com/tencentcloud/tencentcloud-sdk-nodejs"
45
46
  },
46
47
  "devDependencies": {
47
- "@types/form-data": "^2.5.0",
48
+ "@types/ini": "^4.1.1",
48
49
  "@types/json-bigint": "^1.0.1",
49
- "@types/node": "^14.0.26",
50
+ "@types/node": "^18.0.0",
50
51
  "@types/node-fetch": "^2.5.7",
51
52
  "@types/uuid": "^9.0.8",
52
53
  "@typescript-eslint/eslint-plugin": "^2.34.0",
@@ -61,6 +62,7 @@
61
62
  "prettier": "^2.3.0",
62
63
  "rimraf": "^5.0.10",
63
64
  "ts-node": "^8.10.2",
64
- "typescript": "^3.9.7"
65
+ "typescript": "^5.9.2",
66
+ "vitest": "2.1.9"
65
67
  }
66
68
  }
@@ -1,5 +1,5 @@
1
1
  import * as TencentCloudCommon from "tencentcloud-sdk-nodejs-common";
2
- import { GetFaceidRiskInfoTokenResponse, CheckIdNameDateResponse, IdCardVerificationRequest, ImageRecognitionV2Response, GetDetectInfoEnhancedResponse, MobileStatusRequest, ParseNfcDataResponse, LivenessRecognitionRequest, CheckEidTokenStatusResponse, DetectAuthRequest, CheckEidTokenStatusRequest, GetFaceIdRiskInfoResponse, LivenessCompareResponse, BankCard2EVerificationResponse, MobileStatusResponse, LivenessResponse, EncryptedPhoneVerificationRequest, EncryptedPhoneVerificationResponse, LivenessRequest, DetectAIFakeFacesRequest, CheckBankCardInformationResponse, GetEidTokenRequest, CheckIdNameDateRequest, GetFaceIdTokenResponse, MinorsVerificationRequest, GetFaceIdResultResponse, DetectAIFakeFacesResponse, LivenessCompareRequest, CheckBankCardInformationRequest, BankCardVerificationRequest, GetWeChatBillDetailsResponse, CheckIdCardInformationResponse, GetEidResultRequest, DetectAuthResponse, PhoneVerificationResponse, IdCardOCRVerificationRequest, BankCard4EVerificationResponse, MobileNetworkTimeVerificationRequest, PhoneVerificationCMCCResponse, MobileNetworkTimeVerificationResponse, PhoneVerificationCUCCResponse, CheckIdCardInformationRequest, MinorsVerificationResponse, GetWeChatBillDetailsRequest, BankCardVerificationResponse, PhoneVerificationCUCCRequest, PhoneVerificationCMCCRequest, ImageRecognitionResponse, GetDetectInfoResponse, IdCardOCRVerificationResponse, IdCardVerificationResponse, GetActionSequenceRequest, GetDetectInfoEnhancedRequest, LivenessRecognitionResponse, GetLiveCodeRequest, GetEidResultResponse, PhoneVerificationRequest, GetFaceIdResultRequest, CheckPhoneAndNameResponse, GetFaceIdTokenRequest, GetFaceidRiskInfoTokenRequest, BankCard2EVerificationRequest, ImageRecognitionV2Request, PhoneVerificationCTCCResponse, ParseNfcDataRequest, PhoneVerificationCTCCRequest, ImageRecognitionRequest, BankCard4EVerificationRequest, GetActionSequenceResponse, GetFaceIdRiskInfoRequest, GetLiveCodeResponse, GetDetectInfoRequest, CheckPhoneAndNameRequest, GetEidTokenResponse } from "./faceid_models";
2
+ import { GetFaceidRiskInfoTokenResponse, CheckIdNameDateResponse, IdCardVerificationRequest, ImageRecognitionV2Response, GetDetectInfoEnhancedResponse, MobileStatusRequest, ParseNfcDataResponse, LivenessRecognitionRequest, CheckEidTokenStatusResponse, DetectAuthRequest, CheckEidTokenStatusRequest, GetFaceIdRiskInfoResponse, LivenessCompareResponse, BankCard2EVerificationResponse, MobileStatusResponse, EncryptedPhoneVerificationRequest, EncryptedPhoneVerificationResponse, DetectAIFakeFacesRequest, CheckBankCardInformationResponse, GetEidTokenRequest, CheckIdNameDateRequest, GetFaceIdTokenResponse, MinorsVerificationRequest, GetFaceIdResultResponse, DetectAIFakeFacesResponse, LivenessCompareRequest, CheckBankCardInformationRequest, BankCardVerificationRequest, GetWeChatBillDetailsResponse, CheckIdCardInformationResponse, GetEidResultRequest, DetectAuthResponse, PhoneVerificationResponse, IdCardOCRVerificationRequest, BankCard4EVerificationResponse, MobileNetworkTimeVerificationRequest, PhoneVerificationCMCCResponse, MobileNetworkTimeVerificationResponse, PhoneVerificationCUCCResponse, CheckIdCardInformationRequest, MinorsVerificationResponse, GetWeChatBillDetailsRequest, BankCardVerificationResponse, PhoneVerificationCUCCRequest, PhoneVerificationCMCCRequest, ImageRecognitionResponse, GetDetectInfoResponse, IdCardOCRVerificationResponse, IdCardVerificationResponse, GetActionSequenceRequest, GetDetectInfoEnhancedRequest, LivenessRecognitionResponse, GetLiveCodeRequest, GetEidResultResponse, PhoneVerificationRequest, GetFaceIdResultRequest, CheckPhoneAndNameResponse, GetFaceIdTokenRequest, GetFaceidRiskInfoTokenRequest, BankCard2EVerificationRequest, ImageRecognitionV2Request, PhoneVerificationCTCCResponse, ParseNfcDataRequest, PhoneVerificationCTCCRequest, ImageRecognitionRequest, BankCard4EVerificationRequest, GetActionSequenceResponse, GetFaceIdRiskInfoRequest, GetLiveCodeResponse, GetDetectInfoRequest, CheckPhoneAndNameRequest, GetEidTokenResponse } from "./faceid_models";
3
3
  /**
4
4
  * faceid client
5
5
  * @class
@@ -106,10 +106,6 @@ export declare class Client extends TencentCloudCommon.AbstractClient {
106
106
  * 每次调用人脸核身SDK服务前,需先调用本接口获取SDKToken,用来串联核身流程,在验证完成后,用于获取风险结果信息,该Token仅能核身一次。
107
107
  */
108
108
  GetFaceidRiskInfoToken(req: GetFaceidRiskInfoTokenRequest, cb?: (error: string, rep: GetFaceidRiskInfoTokenResponse) => void): Promise<GetFaceidRiskInfoTokenResponse>;
109
- /**
110
- * 活体检测
111
- */
112
- Liveness(req: LivenessRequest, cb?: (error: string, rep: LivenessResponse) => void): Promise<LivenessResponse>;
113
109
  /**
114
110
  * 本接口用于校验中国联通手机号、姓名和身份证号的真实性和一致性。中国联通支持的手机号段详情请查阅<a href="https://cloud.tencent.com/document/product/1007/46063">运营商类</a>文档。
115
111
  */
@@ -178,12 +178,6 @@ class Client extends TencentCloudCommon.AbstractClient {
178
178
  async GetFaceidRiskInfoToken(req, cb) {
179
179
  return this.request("GetFaceidRiskInfoToken", req, cb);
180
180
  }
181
- /**
182
- * 活体检测
183
- */
184
- async Liveness(req, cb) {
185
- return this.request("Liveness", req, cb);
186
- }
187
181
  /**
188
182
  * 本接口用于校验中国联通手机号、姓名和身份证号的真实性和一致性。中国联通支持的手机号段详情请查阅<a href="https://cloud.tencent.com/document/product/1007/46063">运营商类</a>文档。
189
183
  */
@@ -785,33 +785,6 @@ export interface MobileStatusResponse {
785
785
  */
786
786
  RequestId?: string;
787
787
  }
788
- /**
789
- * Liveness返回参数结构体
790
- */
791
- export interface LivenessResponse {
792
- /**
793
- * 验证通过后的视频最佳截图照片,照片为BASE64编码后的值,jpg格式。
794
- 注意:此字段可能返回 null,表示取不到有效值。
795
- */
796
- BestFrameBase64?: string;
797
- /**
798
- * 业务错误码,成功情况返回Success, 错误情况请参考下方错误码 列表中FailedOperation部分
799
- */
800
- Result?: string;
801
- /**
802
- * 业务结果描述。
803
- */
804
- Description?: string;
805
- /**
806
- * 最佳最佳截图列表,仅在配置了返回多张最佳截图时有效。
807
- 注意:此字段可能返回 null,表示取不到有效值。
808
- */
809
- BestFrameList?: Array<string>;
810
- /**
811
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
812
- */
813
- RequestId?: string;
814
- }
815
788
  /**
816
789
  * EncryptedPhoneVerification请求参数结构体
817
790
  */
@@ -884,34 +857,6 @@ export interface DetectInfoVideoData {
884
857
  */
885
858
  LivenessVideos?: Array<VideoDetailData>;
886
859
  }
887
- /**
888
- * Liveness请求参数结构体
889
- */
890
- export interface LivenessRequest {
891
- /**
892
- * 用于活体检测的视频,视频的BASE64值;
893
- BASE64编码后的大小不超过8M,支持mp4、avi、flv格式。
894
- */
895
- VideoBase64: string;
896
- /**
897
- * 活体检测类型,取值:LIP/ACTION/SILENT。
898
- LIP为数字模式,ACTION为动作模式,SILENT为静默模式,三种模式选择一种传入。
899
- */
900
- LivenessType: string;
901
- /**
902
- * 数字模式传参:数字验证码(1234),需先调用接口获取数字验证码;
903
- 动作模式传参:传动作顺序(2,1 or 1,2),需先调用接口获取动作顺序;
904
- 静默模式传参:不需要传递此参数。
905
- */
906
- ValidateData?: string;
907
- /**
908
- * 额外配置,传入JSON字符串。
909
- {
910
- "BestFrameNum": 2 //需要返回多张最佳截图,取值范围1-10
911
- }
912
- */
913
- Optional?: string;
914
- }
915
860
  /**
916
861
  * DetectAIFakeFaces请求参数结构体
917
862
  */
@@ -930,7 +875,7 @@ export interface DetectAIFakeFacesRequest {
930
875
  视频分辨率建议为480x640(最大支持720p),帧率在25fps~30fps之间。
931
876
  请使用标准的Base64编码方式(带=补位),编码规范参考RFC4648。
932
877
 
933
- 示例值:/9j/4AAQSkZJRg.....s97n//2Q==
878
+ 若您未使用Encryption进行加密传输,则本字段为必填参数。
934
879
  */
935
880
  FaceInput?: string;
936
881
  /**
@@ -939,6 +884,8 @@ export interface DetectAIFakeFacesRequest {
939
884
  1:传入的是图片类型。
940
885
  2:传入的是视频类型。
941
886
  其他:返回错误码InvalidParameter。
887
+
888
+ 若您未使用Encryption进行加密传输,则本字段为必填参数。
942
889
  */
943
890
  FaceInputType?: number;
944
891
  /**
@@ -1489,7 +1436,7 @@ export interface RetrievalLivenessExtraInfo {
1489
1436
  */
1490
1437
  export interface IntentionActionConfig {
1491
1438
  /**
1492
- * 点头确认模式下,系统语音播报使用的问题文本,问题最大长度为150个字符。
1439
+ * 点头确认模式下,系统语音播报使用的问题文本,问题最大长度为250个字符。
1493
1440
  */
1494
1441
  Text: string;
1495
1442
  }
@@ -2358,7 +2305,7 @@ export interface DetectInfoText {
2358
2305
  /**
2359
2306
  * 本次流程活体一比一的分数。
2360
2307
  - 取值范围 [0.00, 100.00]。
2361
- - 相似度大于等于70时才判断为同一人,也可根据具体场景自行调整阈值。
2308
+ - 相似度大于等于70时才判断为同一人,阈值不支持自定义。
2362
2309
  - 阈值70的误通过率为千分之一,阈值80的误通过率是万分之一。
2363
2310
  注意:此字段可能返回 null,表示取不到有效值。
2364
2311
  */
@@ -2445,6 +2392,19 @@ export interface DetectInfoText {
2445
2392
  注意:此字段可能返回 null,表示取不到有效值。
2446
2393
  */
2447
2394
  VisaNum?: string;
2395
+ /**
2396
+ * 活体检测的动作顺序,多动作以“,”分隔。
2397
+ 输出格式如:“1,2”表示“张嘴+眨眼”。
2398
+ - 详细序列值含义如下:
2399
+ 1:张嘴
2400
+ 2:眨眼
2401
+ 3:点头
2402
+ 4:摇头
2403
+ 5:静默
2404
+ 注:仅浮层H5产品返回
2405
+ 注意:此字段可能返回 null,表示取不到有效值。
2406
+ */
2407
+ LivenessActionSequence?: string;
2448
2408
  }
2449
2409
  /**
2450
2410
  * ImageRecognition返回参数结构体
@@ -2715,7 +2675,7 @@ export interface LivenessRecognitionResponse {
2715
2675
  /**
2716
2676
  * GetLiveCode请求参数结构体
2717
2677
  */
2718
- export declare type GetLiveCodeRequest = null;
2678
+ export type GetLiveCodeRequest = null;
2719
2679
  /**
2720
2680
  * GetEidResult返回参数结构体
2721
2681
  */
@@ -3391,7 +3351,7 @@ export interface GetEidTokenResponse {
3391
3351
  export interface IntentionQuestion {
3392
3352
  /**
3393
3353
  * 当选择语音问答模式时,系统自动播报的问题文本。
3394
- - 最大长度为150个字符。
3354
+ - 最大长度为250个字符。
3395
3355
  */
3396
3356
  Question: string;
3397
3357
  /**
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.faceid = void 0;
3
4
  var faceid_1 = require("./faceid");
4
5
  Object.defineProperty(exports, "faceid", { enumerable: true, get: function () { return faceid_1.faceid; } });