@yunzhanghu/sdk-nodejs 1.0.21 → 1.0.23

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.
@@ -0,0 +1,123 @@
1
+ import YZHclient from '../../common/client';
2
+
3
+ /** CollectRealNameInfoRequest */
4
+ interface CollectRealNameInfoRequest {
5
+ /** 综合服务主体 ID */
6
+ broker_id: string;
7
+ /** 平台企业 ID */
8
+ dealer_id: string;
9
+ /** 姓名 */
10
+ real_name: string;
11
+ /** 证件号码 */
12
+ id_card: string;
13
+ /** 实名认证结果 */
14
+ realname_result: number;
15
+ /** 实名认证通过时间 */
16
+ realname_time: string;
17
+ /** 实名认证方式 */
18
+ realname_type: number;
19
+ /** 实名认证唯一可追溯编码 */
20
+ realname_trace_id: string;
21
+ /** 认证平台 */
22
+ realname_platform: string;
23
+ /** 人脸照片 */
24
+ face_image: string;
25
+ /** 人脸识别验证分数 */
26
+ face_verify_score: string;
27
+ /** 银行卡号 */
28
+ bank_no: string;
29
+ /** 银行预留手机号 */
30
+ bank_phone: string;
31
+ /** 平台企业审核人 */
32
+ reviewer: string;
33
+ /** 人脸照片收集类型 */
34
+ face_image_collect_type: number;
35
+ }
36
+
37
+ /** CollectRealNameInfoResponse */
38
+ interface CollectRealNameInfoResponse {
39
+ /** 录入状态 */
40
+ status: string;
41
+ }
42
+
43
+ /** QueryRealNameInfoRequest */
44
+ interface QueryRealNameInfoRequest {
45
+ /** 综合服务主体 ID */
46
+ broker_id: string;
47
+ /** 平台企业 ID */
48
+ dealer_id: string;
49
+ /** 姓名 */
50
+ real_name: string;
51
+ /** 证件号码 */
52
+ id_card: string;
53
+ }
54
+
55
+ /** QueryRealNameInfoResponse */
56
+ interface QueryRealNameInfoResponse {
57
+ /** 实名认证结果 */
58
+ realname_result: number;
59
+ /** 实名认证通过时间 */
60
+ realname_time: string;
61
+ /** 实名认证方式 */
62
+ realname_type: number;
63
+ /** 实名认证唯一可追溯编码 */
64
+ realname_trace_id: string;
65
+ /** 认证平台 */
66
+ realname_platform: string;
67
+ /** 是否存在人脸照片 */
68
+ face_image: string;
69
+ /** 人脸识别验证分数 */
70
+ face_verify_score: string;
71
+ /** 银行卡号 */
72
+ bank_no: string;
73
+ /** 银行预留手机号 */
74
+ bank_phone: string;
75
+ /** 平台企业审核人 */
76
+ reviewer: string;
77
+ }
78
+
79
+ export class RealNameServiceClient extends YZHclient {
80
+ // eslint-disable-next-line no-useless-constructor
81
+ constructor(conf: {
82
+ dealer_id: string;
83
+ broker_id: string;
84
+ app_key: string;
85
+ des3_key: string;
86
+ private_key: string;
87
+ yzh_public_key: string;
88
+ sign_type: 'rsa' | 'sha256';
89
+ base_url?: string;
90
+ timeout?: number;
91
+ }) {
92
+ super(conf);
93
+ }
94
+
95
+ // CollectRealNameInfo 用户实名认证信息收集
96
+ async CollectRealNameInfo(
97
+ req: CollectRealNameInfoRequest,
98
+ cb?: (error: null | string,rep: CollectRealNameInfoResponse)=>void
99
+ ): Promise<CollectRealNameInfoResponse> {
100
+ return this.request(
101
+ 'post',
102
+ '/api/user/v1/collect/realname/info',
103
+ req,
104
+ {encryption: false },
105
+ cb
106
+ );
107
+ }
108
+
109
+ // QueryRealNameInfo 用户实名认证信息查询
110
+ async QueryRealNameInfo(
111
+ req: QueryRealNameInfoRequest,
112
+ cb?: (error: null | string,rep: QueryRealNameInfoResponse)=>void
113
+ ): Promise<QueryRealNameInfoResponse> {
114
+ return this.request(
115
+ 'get',
116
+ '/api/user/v1/query/realname/info',
117
+ req,
118
+ {encryption: false },
119
+ cb
120
+ );
121
+ }
122
+
123
+ }
@@ -0,0 +1,20 @@
1
+ 'use strict';
2
+ Object.defineProperty(exports, '__esModule', { value: true });
3
+ exports.RealNameServiceClient = void 0;
4
+ const client_1 = require('../../common/client');
5
+ class RealNameServiceClient extends client_1.default {
6
+ // eslint-disable-next-line no-useless-constructor
7
+ constructor(conf) {
8
+ super(conf);
9
+ }
10
+ // CollectRealNameInfo 用户实名认证信息收集
11
+ async CollectRealNameInfo(req, cb) {
12
+ return this.request('post', '/api/user/v1/collect/realname/info', req, { encryption: false }, cb);
13
+ }
14
+ // QueryRealNameInfo 用户实名认证信息查询
15
+ async QueryRealNameInfo(req, cb) {
16
+ return this.request('get', '/api/user/v1/query/realname/info', req, { encryption: false }, cb);
17
+ }
18
+
19
+ }
20
+ exports.RealNameServiceClient = RealNameServiceClient;