@yunzhanghu/sdk-nodejs 0.0.1-beta.1
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/.eslintignore +4 -0
- package/.eslintrc.json +19 -0
- package/.husky/pre-commit +7 -0
- package/LICENSE +201 -0
- package/README.md +114 -0
- package/example/apiUserSign.js +70 -0
- package/example/authentication.js +142 -0
- package/example/bizlicXjjH5.js +46 -0
- package/example/bizlicXjjH5Api.js +65 -0
- package/example/conf/config.js +30 -0
- package/example/dataService.js +98 -0
- package/example/h5UserSign.js +68 -0
- package/example/invoice.js +91 -0
- package/example/notify.js +36 -0
- package/example/package.json +12 -0
- package/example/payment.js +186 -0
- package/example/tax.js +34 -0
- package/package.json +47 -0
- package/prettier.config.js +32 -0
- package/src/common/client.ts +367 -0
- package/src/common/exception/yzhSDKHttpException.ts +32 -0
- package/src/common/http/index.ts +57 -0
- package/src/common/utils/index.ts +18 -0
- package/src/index.ts +1 -0
- package/src/services/apiusersign/index.ts +125 -0
- package/src/services/authentication/index.ts +247 -0
- package/src/services/bizlicxjjh5/index.ts +129 -0
- package/src/services/bizlicxjjh5api/index.ts +169 -0
- package/src/services/dataservice/index.ts +315 -0
- package/src/services/h5usersign/index.ts +145 -0
- package/src/services/index.ts +10 -0
- package/src/services/invoice/index.ts +257 -0
- package/src/services/payment/index.ts +523 -0
- package/src/services/tax/index.ts +77 -0
- package/src/typings.d.ts +1 -0
- package/tsconfig.json +25 -0
- package/yzh/common/client.d.ts +119 -0
- package/yzh/common/client.js +314 -0
- package/yzh/common/exception/yzhSDKHttpException.d.ts +10 -0
- package/yzh/common/exception/yzhSDKHttpException.js +21 -0
- package/yzh/common/http/index.d.ts +6 -0
- package/yzh/common/http/index.js +51 -0
- package/yzh/common/utils/index.d.ts +14 -0
- package/yzh/common/utils/index.js +11 -0
- package/yzh/index.d.ts +1 -0
- package/yzh/index.js +4 -0
- package/yzh/services/apiusersign/index.d.ts +86 -0
- package/yzh/services/apiusersign/index.js +26 -0
- package/yzh/services/authentication/index.d.ts +153 -0
- package/yzh/services/authentication/index.js +42 -0
- package/yzh/services/bizlicxjjh5/index.d.ts +76 -0
- package/yzh/services/bizlicxjjh5/index.js +18 -0
- package/yzh/services/bizlicxjjh5api/index.d.ts +107 -0
- package/yzh/services/bizlicxjjh5api/index.js +22 -0
- package/yzh/services/dataservice/index.d.ts +243 -0
- package/yzh/services/dataservice/index.js +38 -0
- package/yzh/services/h5usersign/index.d.ts +90 -0
- package/yzh/services/h5usersign/index.js +26 -0
- package/yzh/services/index.d.ts +10 -0
- package/yzh/services/index.js +23 -0
- package/yzh/services/invoice/index.d.ts +158 -0
- package/yzh/services/invoice/index.js +34 -0
- package/yzh/services/payment/index.d.ts +358 -0
- package/yzh/services/payment/index.js +50 -0
- package/yzh/services/tax/index.d.ts +55 -0
- package/yzh/services/tax/index.js +18 -0
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
import YZHclient from "../../common/client";
|
|
2
|
+
|
|
3
|
+
/** BankCardFourAuthVerifyRequest 银行卡四要素鉴权请求(下发短信验证码)请求 */
|
|
4
|
+
interface BankCardFourAuthVerifyRequest {
|
|
5
|
+
/** 银行卡号 */
|
|
6
|
+
card_no: string
|
|
7
|
+
/** 身份证号码 */
|
|
8
|
+
id_card: string
|
|
9
|
+
/** 姓名 */
|
|
10
|
+
real_name: string
|
|
11
|
+
/** 银行预留手机号 */
|
|
12
|
+
mobile: string
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/** BankCardFourAuthVerifyResponse 银行卡四要素鉴权请求(下发短信验证码)返回 */
|
|
16
|
+
interface BankCardFourAuthVerifyResponse {
|
|
17
|
+
/** 交易凭证 */
|
|
18
|
+
ref: string
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** BankCardFourAuthConfirmRequest 银行卡四要素确认请求(上传短信验证码)请求 */
|
|
22
|
+
interface BankCardFourAuthConfirmRequest {
|
|
23
|
+
/** 银行卡号 */
|
|
24
|
+
card_no: string
|
|
25
|
+
/** 身份证号码 */
|
|
26
|
+
id_card: string
|
|
27
|
+
/** 姓名 */
|
|
28
|
+
real_name: string
|
|
29
|
+
/** 银行预留手机号 */
|
|
30
|
+
mobile: string
|
|
31
|
+
/** 短信验证码 */
|
|
32
|
+
captcha: string
|
|
33
|
+
/** 交易凭证 */
|
|
34
|
+
ref: string
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** BankCardFourAuthConfirmResponse 银行卡四要素确认请求(上传短信验证码)返回 */
|
|
38
|
+
interface BankCardFourAuthConfirmResponse {
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** BankCardFourVerifyRequest 银行卡四要素验证请求 */
|
|
42
|
+
interface BankCardFourVerifyRequest {
|
|
43
|
+
/** 银行卡号 */
|
|
44
|
+
card_no: string
|
|
45
|
+
/** 身份证号码 */
|
|
46
|
+
id_card: string
|
|
47
|
+
/** 姓名 */
|
|
48
|
+
real_name: string
|
|
49
|
+
/** 银行预留手机号 */
|
|
50
|
+
mobile: string
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** BankCardFourVerifyResponse 银行卡四要素验证返回 */
|
|
54
|
+
interface BankCardFourVerifyResponse {
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/** BankCardThreeVerifyRequest 银行卡三要素验证请求 */
|
|
58
|
+
interface BankCardThreeVerifyRequest {
|
|
59
|
+
/** 银行卡号 */
|
|
60
|
+
card_no: string
|
|
61
|
+
/** 身份证号码 */
|
|
62
|
+
id_card: string
|
|
63
|
+
/** 姓名 */
|
|
64
|
+
real_name: string
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/** BankCardThreeVerifyResponse 银行卡三要素验证返回 */
|
|
68
|
+
interface BankCardThreeVerifyResponse {
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/** IDCardVerifyRequest 身份证实名验证请求 */
|
|
72
|
+
interface IDCardVerifyRequest {
|
|
73
|
+
/** 身份证号码 */
|
|
74
|
+
id_card: string
|
|
75
|
+
/** 姓名 */
|
|
76
|
+
real_name: string
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/** IDCardVerifyResponse 身份证实名验证返回 */
|
|
80
|
+
interface IDCardVerifyResponse {
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/** UserExemptedInfoRequest 上传免验证用户名单信息请求 */
|
|
84
|
+
interface UserExemptedInfoRequest {
|
|
85
|
+
/** 证件类型码 */
|
|
86
|
+
card_type: string
|
|
87
|
+
/** 证件号码 */
|
|
88
|
+
id_card: string
|
|
89
|
+
/** 姓名 */
|
|
90
|
+
real_name: string
|
|
91
|
+
/** 申请备注 */
|
|
92
|
+
comment_apply: string
|
|
93
|
+
/** 综合服务主体 ID */
|
|
94
|
+
broker_id: string
|
|
95
|
+
/** 平台企业 ID */
|
|
96
|
+
dealer_id: string
|
|
97
|
+
/** 人员信息图片 */
|
|
98
|
+
user_images: string[]
|
|
99
|
+
/** 国别(地区)代码 */
|
|
100
|
+
country: string
|
|
101
|
+
/** 出生日期 */
|
|
102
|
+
birthday: string
|
|
103
|
+
/** 性别 */
|
|
104
|
+
gender: string
|
|
105
|
+
/** 回调地址 */
|
|
106
|
+
notify_url: string
|
|
107
|
+
/** 请求流水号 */
|
|
108
|
+
ref: string
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/** UserExemptedInfoResponse 上传免验证用户名单信息返回 */
|
|
112
|
+
interface UserExemptedInfoResponse {
|
|
113
|
+
/** 是否上传成功 */
|
|
114
|
+
ok: string
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/** NotifyUserExemptedInfoRequest 上传免验证用户名单信息审核结果通知 */
|
|
118
|
+
interface NotifyUserExemptedInfoRequest {
|
|
119
|
+
/** 综合服务主体 ID */
|
|
120
|
+
broker_id: string
|
|
121
|
+
/** 平台企业 ID */
|
|
122
|
+
dealer_id: string
|
|
123
|
+
/** 姓名 */
|
|
124
|
+
real_name: string
|
|
125
|
+
/** 证件号 */
|
|
126
|
+
id_card: string
|
|
127
|
+
/** 审核状态 */
|
|
128
|
+
status: string
|
|
129
|
+
/** 流水号 */
|
|
130
|
+
ref: string
|
|
131
|
+
/** 审核信息 */
|
|
132
|
+
comment: string
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/** UserWhiteCheckRequest 查看免验证用户名单是否存在请求 */
|
|
136
|
+
interface UserWhiteCheckRequest {
|
|
137
|
+
/** 证件号码 */
|
|
138
|
+
id_card: string
|
|
139
|
+
/** 姓名 */
|
|
140
|
+
real_name: string
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/** UserWhiteCheckResponse 查看免验证用户名单是否存在返回 */
|
|
144
|
+
interface UserWhiteCheckResponse {
|
|
145
|
+
|
|
146
|
+
ok: boolean
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/** GetBankCardInfoRequest 银行卡信息查询请求 */
|
|
150
|
+
interface GetBankCardInfoRequest {
|
|
151
|
+
/** 银行卡号 */
|
|
152
|
+
card_no: string
|
|
153
|
+
/** 银行名称 */
|
|
154
|
+
bank_name: string
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/** GetBankCardInfoResponse 银行卡信息查询返回 */
|
|
158
|
+
interface GetBankCardInfoResponse {
|
|
159
|
+
/** 银行代码 */
|
|
160
|
+
bank_code: string
|
|
161
|
+
/** 银行名称 */
|
|
162
|
+
bank_name: string
|
|
163
|
+
/** 卡类型 */
|
|
164
|
+
card_type: string
|
|
165
|
+
/** 云账户是否支持向该银行支付 */
|
|
166
|
+
is_support: boolean
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export class Authentication extends YZHclient {
|
|
170
|
+
constructor(conf: {
|
|
171
|
+
dealer_id: string
|
|
172
|
+
broker_id: string
|
|
173
|
+
app_key: string
|
|
174
|
+
des3_key: string
|
|
175
|
+
private_key: string
|
|
176
|
+
yzh_public_key: string
|
|
177
|
+
sign_type: "rsa" | "sha256"
|
|
178
|
+
base_url?: string
|
|
179
|
+
}) {
|
|
180
|
+
super(conf)
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// BankCardFourAuthVerify 银行卡四要素鉴权请求(下发短信验证码)
|
|
184
|
+
async BankCardFourAuthVerify(
|
|
185
|
+
req: BankCardFourAuthVerifyRequest,
|
|
186
|
+
cb?: (error: null | string, rep: BankCardFourAuthVerifyResponse) => void
|
|
187
|
+
): Promise<BankCardFourAuthVerifyResponse> {
|
|
188
|
+
return this.request("post", "/authentication/verify-request", req, { encryption: false }, cb)
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
// BankCardFourAuthConfirm 银行卡四要素确认请求(上传短信验证码)
|
|
192
|
+
async BankCardFourAuthConfirm(
|
|
193
|
+
req: BankCardFourAuthConfirmRequest,
|
|
194
|
+
cb?: (error: null | string, rep: BankCardFourAuthConfirmResponse) => void
|
|
195
|
+
): Promise<BankCardFourAuthConfirmResponse> {
|
|
196
|
+
return this.request("post", "/authentication/verify-confirm", req, { encryption: false }, cb)
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
// BankCardFourVerify 银行卡四要素验证
|
|
200
|
+
async BankCardFourVerify(
|
|
201
|
+
req: BankCardFourVerifyRequest,
|
|
202
|
+
cb?: (error: null | string, rep: BankCardFourVerifyResponse) => void
|
|
203
|
+
): Promise<BankCardFourVerifyResponse> {
|
|
204
|
+
return this.request("post", "/authentication/verify-bankcard-four-factor", req, { encryption: false }, cb)
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
// BankCardThreeVerify 银行卡三要素验证
|
|
208
|
+
async BankCardThreeVerify(
|
|
209
|
+
req: BankCardThreeVerifyRequest,
|
|
210
|
+
cb?: (error: null | string, rep: BankCardThreeVerifyResponse) => void
|
|
211
|
+
): Promise<BankCardThreeVerifyResponse> {
|
|
212
|
+
return this.request("post", "/authentication/verify-bankcard-three-factor", req, { encryption: false }, cb)
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
// IDCardVerify 身份证实名验证
|
|
216
|
+
async IDCardVerify(
|
|
217
|
+
req: IDCardVerifyRequest,
|
|
218
|
+
cb?: (error: null | string, rep: IDCardVerifyResponse) => void
|
|
219
|
+
): Promise<IDCardVerifyResponse> {
|
|
220
|
+
return this.request("post", "/authentication/verify-id", req, { encryption: false }, cb)
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
// UserExemptedInfo 上传免验证用户名单信息
|
|
224
|
+
async UserExemptedInfo(
|
|
225
|
+
req: UserExemptedInfoRequest,
|
|
226
|
+
cb?: (error: null | string, rep: UserExemptedInfoResponse) => void
|
|
227
|
+
): Promise<UserExemptedInfoResponse> {
|
|
228
|
+
return this.request("post", "/api/payment/v1/user/exempted/info", req, { encryption: false }, cb)
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
// UserWhiteCheck 查看免验证用户名单是否存在
|
|
232
|
+
async UserWhiteCheck(
|
|
233
|
+
req: UserWhiteCheckRequest,
|
|
234
|
+
cb?: (error: null | string, rep: UserWhiteCheckResponse) => void
|
|
235
|
+
): Promise<UserWhiteCheckResponse> {
|
|
236
|
+
return this.request("post", "/api/payment/v1/user/white/check", req, { encryption: false }, cb)
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
// GetBankCardInfo 银行卡信息查询接口
|
|
240
|
+
async GetBankCardInfo(
|
|
241
|
+
req: GetBankCardInfoRequest,
|
|
242
|
+
cb?: (error: null | string, rep: GetBankCardInfoResponse) => void
|
|
243
|
+
): Promise<GetBankCardInfoResponse> {
|
|
244
|
+
return this.request("get", "/api/payment/v1/card", req, { encryption: false }, cb)
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import YZHclient from "../../common/client";
|
|
2
|
+
|
|
3
|
+
/** H5GetStartUrlRequest 预启动请求 */
|
|
4
|
+
interface H5GetStartUrlRequest {
|
|
5
|
+
/** 平台企业 ID */
|
|
6
|
+
dealer_id: string
|
|
7
|
+
/** 综合服务主体 ID */
|
|
8
|
+
broker_id: string
|
|
9
|
+
/** 平台企业端的用户 ID */
|
|
10
|
+
dealer_user_id: string
|
|
11
|
+
/** 客户端类型 */
|
|
12
|
+
client_type: number
|
|
13
|
+
/** 异步通知 URL */
|
|
14
|
+
notify_url: string
|
|
15
|
+
/** H5 页面主题颜色 */
|
|
16
|
+
color: string
|
|
17
|
+
/** 跳转 URL */
|
|
18
|
+
return_url: string
|
|
19
|
+
/** H5 页面 Title */
|
|
20
|
+
custom_title: number
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** H5GetStartUrlResponse 预启动返回 */
|
|
24
|
+
interface H5GetStartUrlResponse {
|
|
25
|
+
/** 跳转 URL */
|
|
26
|
+
h5_url: string
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/** H5EcoCityAicStatusRequest 查询个体工商户状态请求 */
|
|
30
|
+
interface H5EcoCityAicStatusRequest {
|
|
31
|
+
/** 平台企业 ID */
|
|
32
|
+
dealer_id: string
|
|
33
|
+
/** 综合服务主体 ID */
|
|
34
|
+
broker_id: string
|
|
35
|
+
/** 平台企业端的用户 ID */
|
|
36
|
+
dealer_user_id: string
|
|
37
|
+
/** 身份证号码 */
|
|
38
|
+
id_card: string
|
|
39
|
+
/** 姓名 */
|
|
40
|
+
real_name: string
|
|
41
|
+
/** 用户唯一标识 */
|
|
42
|
+
open_id: string
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** H5EcoCityAicStatusResponse 查询个体工商户状态返回 */
|
|
46
|
+
interface H5EcoCityAicStatusResponse {
|
|
47
|
+
/** 用户签约状态 */
|
|
48
|
+
status: number
|
|
49
|
+
/** 注册状态描述 */
|
|
50
|
+
status_message: string
|
|
51
|
+
/** 注册详情状态码 */
|
|
52
|
+
status_detail: number
|
|
53
|
+
/** 注册详情状态码描述 */
|
|
54
|
+
status_detail_message: string
|
|
55
|
+
/** 注册发起时间 */
|
|
56
|
+
applyed_at: string
|
|
57
|
+
/** 注册完成时间 */
|
|
58
|
+
registed_at: string
|
|
59
|
+
/** 统一社会信用代码 */
|
|
60
|
+
uscc: string
|
|
61
|
+
/** 身份证号码 */
|
|
62
|
+
id_card: string
|
|
63
|
+
/** 姓名 */
|
|
64
|
+
real_name: string
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/** NotifyH5EcoCityAicRequest 结果回调 */
|
|
68
|
+
interface NotifyH5EcoCityAicRequest {
|
|
69
|
+
/** 用户唯一标识 */
|
|
70
|
+
open_id: string
|
|
71
|
+
/** 平台企业端的用户 ID */
|
|
72
|
+
dealer_user_id: string
|
|
73
|
+
/** 注册/注销提交时间 */
|
|
74
|
+
submit_at: string
|
|
75
|
+
/** 注册/注销完成时间 */
|
|
76
|
+
registed_at: string
|
|
77
|
+
/** 用户签约状态 */
|
|
78
|
+
status: number
|
|
79
|
+
/** 注册状态描述 */
|
|
80
|
+
status_message: string
|
|
81
|
+
/** 注册详情状态码 */
|
|
82
|
+
status_detail: number
|
|
83
|
+
/** 注册详情状态码描述 */
|
|
84
|
+
status_detail_message: string
|
|
85
|
+
/** 平台企业 ID */
|
|
86
|
+
dealer_id: string
|
|
87
|
+
/** 综合服务主体 ID */
|
|
88
|
+
broker_id: string
|
|
89
|
+
/** 统一社会信用代码 */
|
|
90
|
+
uscc: string
|
|
91
|
+
/** 身份证号码 */
|
|
92
|
+
id_card: string
|
|
93
|
+
/** 姓名 */
|
|
94
|
+
real_name: string
|
|
95
|
+
/** 回调类型 */
|
|
96
|
+
type: number
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export class Bizlicxjjh5 extends YZHclient {
|
|
100
|
+
constructor(conf: {
|
|
101
|
+
dealer_id: string
|
|
102
|
+
broker_id: string
|
|
103
|
+
app_key: string
|
|
104
|
+
des3_key: string
|
|
105
|
+
private_key: string
|
|
106
|
+
yzh_public_key: string
|
|
107
|
+
sign_type: "rsa" | "sha256"
|
|
108
|
+
base_url?: string
|
|
109
|
+
}) {
|
|
110
|
+
super(conf)
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// H5GetStartUrl 预启动
|
|
114
|
+
async H5GetStartUrl(
|
|
115
|
+
req: H5GetStartUrlRequest,
|
|
116
|
+
cb?: (error: null | string, rep: H5GetStartUrlResponse) => void
|
|
117
|
+
): Promise<H5GetStartUrlResponse> {
|
|
118
|
+
return this.request("get", "/api/aic/new-economy/h5/v1/h5url", req, { encryption: false }, cb)
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// H5EcoCityAicStatus 查询个体工商户状态
|
|
122
|
+
async H5EcoCityAicStatus(
|
|
123
|
+
req: H5EcoCityAicStatusRequest,
|
|
124
|
+
cb?: (error: null | string, rep: H5EcoCityAicStatusResponse) => void
|
|
125
|
+
): Promise<H5EcoCityAicStatusResponse> {
|
|
126
|
+
return this.request("get", "/api/aic/new-economy/h5/v1/status", req, { encryption: false }, cb)
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
}
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import YZHclient from "../../common/client";
|
|
2
|
+
|
|
3
|
+
/** H5PreCollectBizlicMsgRequest 工商实名信息录入请求 */
|
|
4
|
+
interface H5PreCollectBizlicMsgRequest {
|
|
5
|
+
/** 平台企业 ID */
|
|
6
|
+
dealer_id: string
|
|
7
|
+
/** 综合服务主体 ID */
|
|
8
|
+
broker_id: string
|
|
9
|
+
/** 平台企业端的用户 ID */
|
|
10
|
+
dealer_user_id: string
|
|
11
|
+
/** 手机号 */
|
|
12
|
+
phone_no: string
|
|
13
|
+
/** 身份证号码 */
|
|
14
|
+
id_card: string
|
|
15
|
+
/** 姓名 */
|
|
16
|
+
real_name: string
|
|
17
|
+
/** 身份证住址 */
|
|
18
|
+
id_card_address: string
|
|
19
|
+
/** 身份证签发机关 */
|
|
20
|
+
id_card_agency: string
|
|
21
|
+
/** 身份证民族 */
|
|
22
|
+
id_card_nation: string
|
|
23
|
+
/** 身份证有效期开始时间 */
|
|
24
|
+
id_card_validity_start: string
|
|
25
|
+
/** 身份证有效期结束时间 */
|
|
26
|
+
id_card_validity_end: string
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/** H5PreCollectBizlicMsgResponse 工商实名信息录入返回 */
|
|
30
|
+
interface H5PreCollectBizlicMsgResponse {
|
|
31
|
+
/** 平台企业端的用户 ID */
|
|
32
|
+
dealer_user_id: string
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/** H5APIGetStartUrlRequest 预启动请求 */
|
|
36
|
+
interface H5APIGetStartUrlRequest {
|
|
37
|
+
/** 平台企业 ID */
|
|
38
|
+
dealer_id: string
|
|
39
|
+
/** 综合服务主体 ID */
|
|
40
|
+
broker_id: string
|
|
41
|
+
/** 平台企业端的用户 ID */
|
|
42
|
+
dealer_user_id: string
|
|
43
|
+
/** 客户端类型 */
|
|
44
|
+
client_type: number
|
|
45
|
+
/** 异步通知 URL */
|
|
46
|
+
notify_url: string
|
|
47
|
+
/** H5 页面主题颜色 */
|
|
48
|
+
color: string
|
|
49
|
+
/** 跳转 URL */
|
|
50
|
+
return_url: string
|
|
51
|
+
/** H5 页面 Title */
|
|
52
|
+
custom_title: number
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** H5APIGetStartUrlResponse 预启动返回 */
|
|
56
|
+
interface H5APIGetStartUrlResponse {
|
|
57
|
+
/** 跳转 URL */
|
|
58
|
+
h5_url: string
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/** H5APIEcoCityAicStatusRequest 查询个体工商户状态请求 */
|
|
62
|
+
interface H5APIEcoCityAicStatusRequest {
|
|
63
|
+
/** 平台企业 ID */
|
|
64
|
+
dealer_id: string
|
|
65
|
+
/** 综合服务主体 ID */
|
|
66
|
+
broker_id: string
|
|
67
|
+
/** 平台企业端的用户 ID */
|
|
68
|
+
dealer_user_id: string
|
|
69
|
+
/** 身份证号码 */
|
|
70
|
+
id_card: string
|
|
71
|
+
/** 姓名 */
|
|
72
|
+
real_name: string
|
|
73
|
+
/** 用户唯一标识 */
|
|
74
|
+
open_id: string
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/** H5APIEcoCityAicStatusResponse 查询个体工商户状态返回 */
|
|
78
|
+
interface H5APIEcoCityAicStatusResponse {
|
|
79
|
+
/** 用户签约状态 */
|
|
80
|
+
status: number
|
|
81
|
+
/** 注册状态描述 */
|
|
82
|
+
status_message: string
|
|
83
|
+
/** 注册详情状态码 */
|
|
84
|
+
status_detail: number
|
|
85
|
+
/** 注册详情状态码描述 */
|
|
86
|
+
status_detail_message: string
|
|
87
|
+
/** 注册发起时间 */
|
|
88
|
+
applyed_at: string
|
|
89
|
+
/** 注册完成时间 */
|
|
90
|
+
registed_at: string
|
|
91
|
+
/** 统一社会信用代码 */
|
|
92
|
+
uscc: string
|
|
93
|
+
/** 身份证号码 */
|
|
94
|
+
id_card: string
|
|
95
|
+
/** 姓名 */
|
|
96
|
+
real_name: string
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/** NotifyH5APIEcoCityAicRequest 结果回调 */
|
|
100
|
+
interface NotifyH5APIEcoCityAicRequest {
|
|
101
|
+
/** 用户唯一标识 */
|
|
102
|
+
open_id: string
|
|
103
|
+
/** 平台企业端的用户 ID */
|
|
104
|
+
dealer_user_id: string
|
|
105
|
+
/** 注册/注销提交时间 */
|
|
106
|
+
submit_at: string
|
|
107
|
+
/** 注册/注销完成时间 */
|
|
108
|
+
registed_at: string
|
|
109
|
+
/** 用户签约状态 */
|
|
110
|
+
status: number
|
|
111
|
+
/** 注册状态描述 */
|
|
112
|
+
status_message: string
|
|
113
|
+
/** 注册详情状态码 */
|
|
114
|
+
status_detail: number
|
|
115
|
+
/** 注册详情状态码描述 */
|
|
116
|
+
status_detail_message: string
|
|
117
|
+
/** 平台企业 ID */
|
|
118
|
+
dealer_id: string
|
|
119
|
+
/** 综合服务主体 ID */
|
|
120
|
+
broker_id: string
|
|
121
|
+
/** 统一社会信用代码 */
|
|
122
|
+
uscc: string
|
|
123
|
+
/** 身份证号码 */
|
|
124
|
+
id_card: string
|
|
125
|
+
/** 姓名 */
|
|
126
|
+
real_name: string
|
|
127
|
+
/** 回调类型 */
|
|
128
|
+
type: number
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export class Bizlicxjjh5api extends YZHclient {
|
|
132
|
+
constructor(conf: {
|
|
133
|
+
dealer_id: string
|
|
134
|
+
broker_id: string
|
|
135
|
+
app_key: string
|
|
136
|
+
des3_key: string
|
|
137
|
+
private_key: string
|
|
138
|
+
yzh_public_key: string
|
|
139
|
+
sign_type: "rsa" | "sha256"
|
|
140
|
+
base_url?: string
|
|
141
|
+
}) {
|
|
142
|
+
super(conf)
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// H5PreCollectBizlicMsg 工商实名信息录入
|
|
146
|
+
async H5PreCollectBizlicMsg(
|
|
147
|
+
req: H5PreCollectBizlicMsgRequest,
|
|
148
|
+
cb?: (error: null | string, rep: H5PreCollectBizlicMsgResponse) => void
|
|
149
|
+
): Promise<H5PreCollectBizlicMsgResponse> {
|
|
150
|
+
return this.request("post", "/api/aic/new-economy/api-h5/v1/collect", req, { encryption: false }, cb)
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// H5APIGetStartUrl 预启动
|
|
154
|
+
async H5APIGetStartUrl(
|
|
155
|
+
req: H5APIGetStartUrlRequest,
|
|
156
|
+
cb?: (error: null | string, rep: H5APIGetStartUrlResponse) => void
|
|
157
|
+
): Promise<H5APIGetStartUrlResponse> {
|
|
158
|
+
return this.request("get", "/api/aic/new-economy/api-h5/v1/h5url", req, { encryption: false }, cb)
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// H5APIEcoCityAicStatus 查询个体工商户状态
|
|
162
|
+
async H5APIEcoCityAicStatus(
|
|
163
|
+
req: H5APIEcoCityAicStatusRequest,
|
|
164
|
+
cb?: (error: null | string, rep: H5APIEcoCityAicStatusResponse) => void
|
|
165
|
+
): Promise<H5APIEcoCityAicStatusResponse> {
|
|
166
|
+
return this.request("get", "/api/aic/new-economy/api-h5/v1/status", req, { encryption: false }, cb)
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
}
|