@yunzhanghu/sdk-nodejs 1.0.2 → 1.0.4

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.
Files changed (66) hide show
  1. package/.editorconfig +8 -0
  2. package/.eslintrc.js +16 -0
  3. package/.prettierrc.js +3 -0
  4. package/README.md +23 -6
  5. package/example/apiUserSign.js +66 -12
  6. package/example/authentication.js +136 -25
  7. package/example/bizlicXjjH5.js +33 -7
  8. package/example/bizlicXjjH5Api.js +50 -10
  9. package/example/conf/config.js +2 -0
  10. package/example/dataService.js +105 -8
  11. package/example/h5UserSign.js +65 -10
  12. package/example/invoice.js +111 -14
  13. package/example/notify.js +0 -1
  14. package/example/payment.js +208 -26
  15. package/example/tax.js +31 -3
  16. package/example/uploadusersign.js +66 -0
  17. package/package.json +50 -45
  18. package/src/common/client.ts +364 -355
  19. package/src/common/exception/yzhSDKHttpException.ts +29 -26
  20. package/src/common/http/index.ts +62 -53
  21. package/src/common/utils/index.ts +16 -14
  22. package/src/index.ts +1 -1
  23. package/src/services/apiusersign/index.ts +107 -105
  24. package/src/services/authentication/index.ts +162 -196
  25. package/src/services/bizlicxjjh5/index.ts +77 -107
  26. package/src/services/bizlicxjjh5api/index.ts +108 -156
  27. package/src/services/dataservice/index.ts +246 -268
  28. package/src/services/h5usersign/index.ts +93 -105
  29. package/src/services/index.ts +11 -10
  30. package/src/services/invoice/index.ts +184 -244
  31. package/src/services/payment/index.ts +501 -435
  32. package/src/services/tax/index.ts +53 -51
  33. package/src/services/uploadusersign/index.ts +88 -0
  34. package/src/typings.d.ts +1 -1
  35. package/tdsformat.js +22 -0
  36. package/tsconfig.json +2 -1
  37. package/yzh/common/client.d.ts +3 -0
  38. package/yzh/common/client.js +9 -3
  39. package/yzh/common/http/index.d.ts +1 -0
  40. package/yzh/common/http/index.js +18 -8
  41. package/yzh/common/utils/index.d.ts +1 -0
  42. package/yzh/common/utils/index.js +1 -0
  43. package/yzh/services/apiusersign/index.d.ts +34 -7
  44. package/yzh/services/apiusersign/index.js +9 -8
  45. package/yzh/services/authentication/index.d.ts +57 -19
  46. package/yzh/services/authentication/index.js +12 -11
  47. package/yzh/services/bizlicxjjh5/index.d.ts +16 -4
  48. package/yzh/services/bizlicxjjh5/index.js +6 -5
  49. package/yzh/services/bizlicxjjh5api/index.d.ts +22 -5
  50. package/yzh/services/bizlicxjjh5api/index.js +7 -6
  51. package/yzh/services/dataservice/index.d.ts +52 -11
  52. package/yzh/services/dataservice/index.js +23 -10
  53. package/yzh/services/h5usersign/index.d.ts +28 -6
  54. package/yzh/services/h5usersign/index.js +8 -7
  55. package/yzh/services/index.d.ts +3 -2
  56. package/yzh/services/index.js +7 -5
  57. package/yzh/services/invoice/index.d.ts +51 -12
  58. package/yzh/services/invoice/index.js +11 -10
  59. package/yzh/services/payment/index.d.ts +194 -18
  60. package/yzh/services/payment/index.js +28 -13
  61. package/yzh/services/tax/index.d.ts +17 -4
  62. package/yzh/services/tax/index.js +6 -5
  63. package/yzh/services/uploadusersign/index.d.ts +78 -0
  64. package/yzh/services/uploadusersign/index.js +19 -0
  65. package/.eslintrc.json +0 -19
  66. package/prettier.config.js +0 -32
@@ -1,4 +1,4 @@
1
- import YZHclient from "../../common/client";
1
+ import YZHclient from '../../common/client';
2
2
  /** BankCardFourAuthVerifyRequest 银行卡四要素鉴权请求(下发短信验证码)请求 */
3
3
  interface BankCardFourAuthVerifyRequest {
4
4
  /** 银行卡号 */
@@ -10,11 +10,13 @@ interface BankCardFourAuthVerifyRequest {
10
10
  /** 银行预留手机号 */
11
11
  mobile: string;
12
12
  }
13
+
13
14
  /** BankCardFourAuthVerifyResponse 银行卡四要素鉴权请求(下发短信验证码)返回 */
14
15
  interface BankCardFourAuthVerifyResponse {
15
16
  /** 交易凭证 */
16
17
  ref: string;
17
18
  }
19
+
18
20
  /** BankCardFourAuthConfirmRequest 银行卡四要素确认请求(上传短信验证码)请求 */
19
21
  interface BankCardFourAuthConfirmRequest {
20
22
  /** 银行卡号 */
@@ -30,9 +32,10 @@ interface BankCardFourAuthConfirmRequest {
30
32
  /** 交易凭证 */
31
33
  ref: string;
32
34
  }
35
+
33
36
  /** BankCardFourAuthConfirmResponse 银行卡四要素确认请求(上传短信验证码)返回 */
34
- interface BankCardFourAuthConfirmResponse {
35
- }
37
+ interface BankCardFourAuthConfirmResponse {}
38
+
36
39
  /** BankCardFourVerifyRequest 银行卡四要素验证请求 */
37
40
  interface BankCardFourVerifyRequest {
38
41
  /** 银行卡号 */
@@ -44,9 +47,10 @@ interface BankCardFourVerifyRequest {
44
47
  /** 银行预留手机号 */
45
48
  mobile: string;
46
49
  }
50
+
47
51
  /** BankCardFourVerifyResponse 银行卡四要素验证返回 */
48
- interface BankCardFourVerifyResponse {
49
- }
52
+ interface BankCardFourVerifyResponse {}
53
+
50
54
  /** BankCardThreeVerifyRequest 银行卡三要素验证请求 */
51
55
  interface BankCardThreeVerifyRequest {
52
56
  /** 银行卡号 */
@@ -56,9 +60,10 @@ interface BankCardThreeVerifyRequest {
56
60
  /** 姓名 */
57
61
  real_name: string;
58
62
  }
63
+
59
64
  /** BankCardThreeVerifyResponse 银行卡三要素验证返回 */
60
- interface BankCardThreeVerifyResponse {
61
- }
65
+ interface BankCardThreeVerifyResponse {}
66
+
62
67
  /** IDCardVerifyRequest 身份证实名验证请求 */
63
68
  interface IDCardVerifyRequest {
64
69
  /** 身份证号码 */
@@ -66,9 +71,10 @@ interface IDCardVerifyRequest {
66
71
  /** 姓名 */
67
72
  real_name: string;
68
73
  }
74
+
69
75
  /** IDCardVerifyResponse 身份证实名验证返回 */
70
- interface IDCardVerifyResponse {
71
- }
76
+ interface IDCardVerifyResponse {}
77
+
72
78
  /** UserExemptedInfoRequest 上传免验证用户名单信息请求 */
73
79
  interface UserExemptedInfoRequest {
74
80
  /** 证件类型码 */
@@ -96,11 +102,13 @@ interface UserExemptedInfoRequest {
96
102
  /** 请求流水号 */
97
103
  ref: string;
98
104
  }
105
+
99
106
  /** UserExemptedInfoResponse 上传免验证用户名单信息返回 */
100
107
  interface UserExemptedInfoResponse {
101
108
  /** 是否上传成功 */
102
109
  ok: string;
103
110
  }
111
+
104
112
  /** UserWhiteCheckRequest 查看免验证用户名单是否存在请求 */
105
113
  interface UserWhiteCheckRequest {
106
114
  /** 证件号码 */
@@ -108,10 +116,12 @@ interface UserWhiteCheckRequest {
108
116
  /** 姓名 */
109
117
  real_name: string;
110
118
  }
119
+
111
120
  /** UserWhiteCheckResponse 查看免验证用户名单是否存在返回 */
112
121
  interface UserWhiteCheckResponse {
113
122
  ok: boolean;
114
123
  }
124
+
115
125
  /** GetBankCardInfoRequest 银行卡信息查询请求 */
116
126
  interface GetBankCardInfoRequest {
117
127
  /** 银行卡号 */
@@ -119,6 +129,7 @@ interface GetBankCardInfoRequest {
119
129
  /** 银行名称 */
120
130
  bank_name: string;
121
131
  }
132
+
122
133
  /** GetBankCardInfoResponse 银行卡信息查询返回 */
123
134
  interface GetBankCardInfoResponse {
124
135
  /** 银行代码 */
@@ -130,6 +141,7 @@ interface GetBankCardInfoResponse {
130
141
  /** 云账户是否支持向该银行支付 */
131
142
  is_support: boolean;
132
143
  }
144
+
133
145
  export declare class AuthenticationClient extends YZHclient {
134
146
  constructor(conf: {
135
147
  dealer_id: string;
@@ -138,16 +150,42 @@ export declare class AuthenticationClient extends YZHclient {
138
150
  des3_key: string;
139
151
  private_key: string;
140
152
  yzh_public_key: string;
141
- sign_type: "rsa" | "sha256";
153
+ sign_type: 'rsa' | 'sha256';
142
154
  base_url?: string;
155
+ timeout?: number;
143
156
  });
144
- BankCardFourAuthVerify(req: BankCardFourAuthVerifyRequest, cb?: (error: null | string, rep: BankCardFourAuthVerifyResponse) => void): Promise<BankCardFourAuthVerifyResponse>;
145
- BankCardFourAuthConfirm(req: BankCardFourAuthConfirmRequest, cb?: (error: null | string, rep: BankCardFourAuthConfirmResponse) => void): Promise<BankCardFourAuthConfirmResponse>;
146
- BankCardFourVerify(req: BankCardFourVerifyRequest, cb?: (error: null | string, rep: BankCardFourVerifyResponse) => void): Promise<BankCardFourVerifyResponse>;
147
- BankCardThreeVerify(req: BankCardThreeVerifyRequest, cb?: (error: null | string, rep: BankCardThreeVerifyResponse) => void): Promise<BankCardThreeVerifyResponse>;
148
- IDCardVerify(req: IDCardVerifyRequest, cb?: (error: null | string, rep: IDCardVerifyResponse) => void): Promise<IDCardVerifyResponse>;
149
- UserExemptedInfo(req: UserExemptedInfoRequest, cb?: (error: null | string, rep: UserExemptedInfoResponse) => void): Promise<UserExemptedInfoResponse>;
150
- UserWhiteCheck(req: UserWhiteCheckRequest, cb?: (error: null | string, rep: UserWhiteCheckResponse) => void): Promise<UserWhiteCheckResponse>;
151
- GetBankCardInfo(req: GetBankCardInfoRequest, cb?: (error: null | string, rep: GetBankCardInfoResponse) => void): Promise<GetBankCardInfoResponse>;
152
- }
157
+ BankCardFourAuthVerify(
158
+ req: BankCardFourAuthVerifyRequest,
159
+ cb?: (error: null | string, rep: BankCardFourAuthVerifyResponse) => void
160
+ ): Promise<BankCardFourAuthVerifyResponse>;
161
+ BankCardFourAuthConfirm(
162
+ req: BankCardFourAuthConfirmRequest,
163
+ cb?: (error: null | string, rep: BankCardFourAuthConfirmResponse) => void
164
+ ): Promise<BankCardFourAuthConfirmResponse>;
165
+ BankCardFourVerify(
166
+ req: BankCardFourVerifyRequest,
167
+ cb?: (error: null | string, rep: BankCardFourVerifyResponse) => void
168
+ ): Promise<BankCardFourVerifyResponse>;
169
+ BankCardThreeVerify(
170
+ req: BankCardThreeVerifyRequest,
171
+ cb?: (error: null | string, rep: BankCardThreeVerifyResponse) => void
172
+ ): Promise<BankCardThreeVerifyResponse>;
173
+ IDCardVerify(
174
+ req: IDCardVerifyRequest,
175
+ cb?: (error: null | string, rep: IDCardVerifyResponse) => void
176
+ ): Promise<IDCardVerifyResponse>;
177
+ UserExemptedInfo(
178
+ req: UserExemptedInfoRequest,
179
+ cb?: (error: null | string, rep: UserExemptedInfoResponse) => void
180
+ ): Promise<UserExemptedInfoResponse>;
181
+ UserWhiteCheck(
182
+ req: UserWhiteCheckRequest,
183
+ cb?: (error: null | string, rep: UserWhiteCheckResponse) => void
184
+ ): Promise<UserWhiteCheckResponse>;
185
+ GetBankCardInfo(
186
+ req: GetBankCardInfoRequest,
187
+ cb?: (error: null | string, rep: GetBankCardInfoResponse) => void
188
+ ): Promise<GetBankCardInfoResponse>;
189
+ }
190
+
153
191
  export {};
@@ -1,42 +1,43 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ 'use strict';
2
+ Object.defineProperty(exports, '__esModule', { value: true });
3
3
  exports.AuthenticationClient = void 0;
4
- const client_1 = require("../../common/client");
4
+ const client_1 = require('../../common/client');
5
5
  class AuthenticationClient extends client_1.default {
6
+ // eslint-disable-next-line no-useless-constructor
6
7
  constructor(conf) {
7
8
  super(conf);
8
9
  }
9
10
  // BankCardFourAuthVerify 银行卡四要素鉴权请求(下发短信验证码)
10
11
  async BankCardFourAuthVerify(req, cb) {
11
- return this.request("post", "/authentication/verify-request", req, { encryption: false }, cb);
12
+ return this.request('post', '/authentication/verify-request', req, { encryption: false }, cb);
12
13
  }
13
14
  // BankCardFourAuthConfirm 银行卡四要素确认请求(上传短信验证码)
14
15
  async BankCardFourAuthConfirm(req, cb) {
15
- return this.request("post", "/authentication/verify-confirm", req, { encryption: false }, cb);
16
+ return this.request('post', '/authentication/verify-confirm', req, { encryption: false }, cb);
16
17
  }
17
18
  // BankCardFourVerify 银行卡四要素验证
18
19
  async BankCardFourVerify(req, cb) {
19
- return this.request("post", "/authentication/verify-bankcard-four-factor", req, { encryption: false }, cb);
20
+ return this.request('post', '/authentication/verify-bankcard-four-factor', req, { encryption: false }, cb);
20
21
  }
21
22
  // BankCardThreeVerify 银行卡三要素验证
22
23
  async BankCardThreeVerify(req, cb) {
23
- return this.request("post", "/authentication/verify-bankcard-three-factor", req, { encryption: false }, cb);
24
+ return this.request('post', '/authentication/verify-bankcard-three-factor', req, { encryption: false }, cb);
24
25
  }
25
26
  // IDCardVerify 身份证实名验证
26
27
  async IDCardVerify(req, cb) {
27
- return this.request("post", "/authentication/verify-id", req, { encryption: false }, cb);
28
+ return this.request('post', '/authentication/verify-id', req, { encryption: false }, cb);
28
29
  }
29
30
  // UserExemptedInfo 上传免验证用户名单信息
30
31
  async UserExemptedInfo(req, cb) {
31
- return this.request("post", "/api/payment/v1/user/exempted/info", req, { encryption: false }, cb);
32
+ return this.request('post', '/api/payment/v1/user/exempted/info', req, { encryption: false }, cb);
32
33
  }
33
34
  // UserWhiteCheck 查看免验证用户名单是否存在
34
35
  async UserWhiteCheck(req, cb) {
35
- return this.request("post", "/api/payment/v1/user/white/check", req, { encryption: false }, cb);
36
+ return this.request('post', '/api/payment/v1/user/white/check', req, { encryption: false }, cb);
36
37
  }
37
38
  // GetBankCardInfo 银行卡信息查询接口
38
39
  async GetBankCardInfo(req, cb) {
39
- return this.request("get", "/api/payment/v1/card", req, { encryption: false }, cb);
40
+ return this.request('get', '/api/payment/v1/card', req, { encryption: false }, cb);
40
41
  }
41
42
  }
42
43
  exports.AuthenticationClient = AuthenticationClient;
@@ -1,4 +1,4 @@
1
- import YZHclient from "../../common/client";
1
+ import YZHclient from '../../common/client';
2
2
  /** H5GetStartUrlRequest 预启动请求 */
3
3
  interface H5GetStartUrlRequest {
4
4
  /** 平台企业 ID */
@@ -18,11 +18,13 @@ interface H5GetStartUrlRequest {
18
18
  /** H5 页面 Title */
19
19
  customer_title: number;
20
20
  }
21
+
21
22
  /** H5GetStartUrlResponse 预启动返回 */
22
23
  interface H5GetStartUrlResponse {
23
24
  /** 跳转 URL */
24
25
  h5_url: string;
25
26
  }
27
+
26
28
  /** H5EcoCityAicStatusRequest 查询个体工商户状态请求 */
27
29
  interface H5EcoCityAicStatusRequest {
28
30
  /** 平台企业 ID */
@@ -38,6 +40,7 @@ interface H5EcoCityAicStatusRequest {
38
40
  /** 用户唯一标识 */
39
41
  open_id: string;
40
42
  }
43
+
41
44
  /** H5EcoCityAicStatusResponse 查询个体工商户状态返回 */
42
45
  interface H5EcoCityAicStatusResponse {
43
46
  /** 用户签约状态 */
@@ -59,6 +62,7 @@ interface H5EcoCityAicStatusResponse {
59
62
  /** 姓名 */
60
63
  real_name: string;
61
64
  }
65
+
62
66
  export declare class BizlicXjjH5ServiceClient extends YZHclient {
63
67
  constructor(conf: {
64
68
  dealer_id: string;
@@ -67,10 +71,18 @@ export declare class BizlicXjjH5ServiceClient extends YZHclient {
67
71
  des3_key: string;
68
72
  private_key: string;
69
73
  yzh_public_key: string;
70
- sign_type: "rsa" | "sha256";
74
+ sign_type: 'rsa' | 'sha256';
71
75
  base_url?: string;
76
+ timeout?: number;
72
77
  });
73
- H5GetStartUrl(req: H5GetStartUrlRequest, cb?: (error: null | string, rep: H5GetStartUrlResponse) => void): Promise<H5GetStartUrlResponse>;
74
- H5EcoCityAicStatus(req: H5EcoCityAicStatusRequest, cb?: (error: null | string, rep: H5EcoCityAicStatusResponse) => void): Promise<H5EcoCityAicStatusResponse>;
78
+ H5GetStartUrl(
79
+ req: H5GetStartUrlRequest,
80
+ cb?: (error: null | string, rep: H5GetStartUrlResponse) => void
81
+ ): Promise<H5GetStartUrlResponse>;
82
+ H5EcoCityAicStatus(
83
+ req: H5EcoCityAicStatusRequest,
84
+ cb?: (error: null | string, rep: H5EcoCityAicStatusResponse) => void
85
+ ): Promise<H5EcoCityAicStatusResponse>;
75
86
  }
87
+
76
88
  export {};
@@ -1,18 +1,19 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ 'use strict';
2
+ Object.defineProperty(exports, '__esModule', { value: true });
3
3
  exports.BizlicXjjH5ServiceClient = void 0;
4
- const client_1 = require("../../common/client");
4
+ const client_1 = require('../../common/client');
5
5
  class BizlicXjjH5ServiceClient extends client_1.default {
6
+ // eslint-disable-next-line no-useless-constructor
6
7
  constructor(conf) {
7
8
  super(conf);
8
9
  }
9
10
  // H5GetStartUrl 预启动
10
11
  async H5GetStartUrl(req, cb) {
11
- return this.request("get", "/api/aic/new-economy/h5/v1/h5url", req, { encryption: false }, cb);
12
+ return this.request('get', '/api/aic/new-economy/h5/v1/h5url', req, { encryption: false }, cb);
12
13
  }
13
14
  // H5EcoCityAicStatus 查询个体工商户状态
14
15
  async H5EcoCityAicStatus(req, cb) {
15
- return this.request("get", "/api/aic/new-economy/h5/v1/status", req, { encryption: false }, cb);
16
+ return this.request('get', '/api/aic/new-economy/h5/v1/status', req, { encryption: false }, cb);
16
17
  }
17
18
  }
18
19
  exports.BizlicXjjH5ServiceClient = BizlicXjjH5ServiceClient;
@@ -1,4 +1,4 @@
1
- import YZHclient from "../../common/client";
1
+ import YZHclient from '../../common/client';
2
2
  /** H5PreCollectBizlicMsgRequest 工商实名信息录入请求 */
3
3
  interface H5PreCollectBizlicMsgRequest {
4
4
  /** 平台企业 ID */
@@ -24,11 +24,13 @@ interface H5PreCollectBizlicMsgRequest {
24
24
  /** 身份证有效期结束时间 */
25
25
  id_card_validity_end: string;
26
26
  }
27
+
27
28
  /** H5PreCollectBizlicMsgResponse 工商实名信息录入返回 */
28
29
  interface H5PreCollectBizlicMsgResponse {
29
30
  /** 平台企业端的用户 ID */
30
31
  dealer_user_id: string;
31
32
  }
33
+
32
34
  /** H5APIGetStartUrlRequest 预启动请求 */
33
35
  interface H5APIGetStartUrlRequest {
34
36
  /** 平台企业 ID */
@@ -48,11 +50,13 @@ interface H5APIGetStartUrlRequest {
48
50
  /** H5 页面 Title */
49
51
  customer_title: number;
50
52
  }
53
+
51
54
  /** H5APIGetStartUrlResponse 预启动返回 */
52
55
  interface H5APIGetStartUrlResponse {
53
56
  /** 跳转 URL */
54
57
  h5_url: string;
55
58
  }
59
+
56
60
  /** H5APIEcoCityAicStatusRequest 查询个体工商户状态请求 */
57
61
  interface H5APIEcoCityAicStatusRequest {
58
62
  /** 平台企业 ID */
@@ -68,6 +72,7 @@ interface H5APIEcoCityAicStatusRequest {
68
72
  /** 用户唯一标识 */
69
73
  open_id: string;
70
74
  }
75
+
71
76
  /** H5APIEcoCityAicStatusResponse 查询个体工商户状态返回 */
72
77
  interface H5APIEcoCityAicStatusResponse {
73
78
  /** 用户签约状态 */
@@ -89,6 +94,7 @@ interface H5APIEcoCityAicStatusResponse {
89
94
  /** 姓名 */
90
95
  real_name: string;
91
96
  }
97
+
92
98
  export declare class BizlicXjjH5APIServiceClient extends YZHclient {
93
99
  constructor(conf: {
94
100
  dealer_id: string;
@@ -97,11 +103,22 @@ export declare class BizlicXjjH5APIServiceClient extends YZHclient {
97
103
  des3_key: string;
98
104
  private_key: string;
99
105
  yzh_public_key: string;
100
- sign_type: "rsa" | "sha256";
106
+ sign_type: 'rsa' | 'sha256';
101
107
  base_url?: string;
108
+ timeout?: number;
102
109
  });
103
- H5PreCollectBizlicMsg(req: H5PreCollectBizlicMsgRequest, cb?: (error: null | string, rep: H5PreCollectBizlicMsgResponse) => void): Promise<H5PreCollectBizlicMsgResponse>;
104
- H5APIGetStartUrl(req: H5APIGetStartUrlRequest, cb?: (error: null | string, rep: H5APIGetStartUrlResponse) => void): Promise<H5APIGetStartUrlResponse>;
105
- H5APIEcoCityAicStatus(req: H5APIEcoCityAicStatusRequest, cb?: (error: null | string, rep: H5APIEcoCityAicStatusResponse) => void): Promise<H5APIEcoCityAicStatusResponse>;
110
+ H5PreCollectBizlicMsg(
111
+ req: H5PreCollectBizlicMsgRequest,
112
+ cb?: (error: null | string, rep: H5PreCollectBizlicMsgResponse) => void
113
+ ): Promise<H5PreCollectBizlicMsgResponse>;
114
+ H5APIGetStartUrl(
115
+ req: H5APIGetStartUrlRequest,
116
+ cb?: (error: null | string, rep: H5APIGetStartUrlResponse) => void
117
+ ): Promise<H5APIGetStartUrlResponse>;
118
+ H5APIEcoCityAicStatus(
119
+ req: H5APIEcoCityAicStatusRequest,
120
+ cb?: (error: null | string, rep: H5APIEcoCityAicStatusResponse) => void
121
+ ): Promise<H5APIEcoCityAicStatusResponse>;
106
122
  }
123
+
107
124
  export {};
@@ -1,22 +1,23 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ 'use strict';
2
+ Object.defineProperty(exports, '__esModule', { value: true });
3
3
  exports.BizlicXjjH5APIServiceClient = void 0;
4
- const client_1 = require("../../common/client");
4
+ const client_1 = require('../../common/client');
5
5
  class BizlicXjjH5APIServiceClient extends client_1.default {
6
+ // eslint-disable-next-line no-useless-constructor
6
7
  constructor(conf) {
7
8
  super(conf);
8
9
  }
9
10
  // H5PreCollectBizlicMsg 工商实名信息录入
10
11
  async H5PreCollectBizlicMsg(req, cb) {
11
- return this.request("post", "/api/aic/new-economy/api-h5/v1/collect", req, { encryption: false }, cb);
12
+ return this.request('post', '/api/aic/new-economy/api-h5/v1/collect', req, { encryption: false }, cb);
12
13
  }
13
14
  // H5APIGetStartUrl 预启动
14
15
  async H5APIGetStartUrl(req, cb) {
15
- return this.request("get", "/api/aic/new-economy/api-h5/v1/h5url", req, { encryption: false }, cb);
16
+ return this.request('get', '/api/aic/new-economy/api-h5/v1/h5url', req, { encryption: false }, cb);
16
17
  }
17
18
  // H5APIEcoCityAicStatus 查询个体工商户状态
18
19
  async H5APIEcoCityAicStatus(req, cb) {
19
- return this.request("get", "/api/aic/new-economy/api-h5/v1/status", req, { encryption: false }, cb);
20
+ return this.request('get', '/api/aic/new-economy/api-h5/v1/status', req, { encryption: false }, cb);
20
21
  }
21
22
  }
22
23
  exports.BizlicXjjH5APIServiceClient = BizlicXjjH5APIServiceClient;
@@ -1,24 +1,28 @@
1
- import YZHclient from "../../common/client";
1
+ import YZHclient from '../../common/client';
2
2
  /** GetDailyOrderFileRequest 查询日订单文件请求 */
3
3
  interface GetDailyOrderFileRequest {
4
4
  /** 订单查询日期, 格式:yyyy-MM-dd */
5
5
  order_date: string;
6
6
  }
7
+
7
8
  /** GetDailyOrderFileResponse 查询日订单文件返回 */
8
9
  interface GetDailyOrderFileResponse {
9
10
  /** 下载地址 */
10
11
  order_download_url: string;
11
12
  }
13
+
12
14
  /** GetDailyBillFileV2Request 查询日流水文件请求 */
13
15
  interface GetDailyBillFileV2Request {
14
16
  /** 所需获取的日流水日期,格式:yyyy-MM-dd */
15
17
  bill_date: string;
16
18
  }
19
+
17
20
  /** GetDailyBillFileV2Response 查询日流水文件返回 */
18
21
  interface GetDailyBillFileV2Response {
19
22
  /** 下载地址 */
20
23
  bill_download_url: string;
21
24
  }
25
+
22
26
  /** ListDealerRechargeRecordV2Request 平台企业预付业务服务费记录请求 */
23
27
  interface ListDealerRechargeRecordV2Request {
24
28
  /** 开始时间,格式:yyyy-MM-dd */
@@ -26,11 +30,13 @@ interface ListDealerRechargeRecordV2Request {
26
30
  /** 结束时间,格式:yyyy-MM-dd */
27
31
  end_at: string;
28
32
  }
33
+
29
34
  /** ListDealerRechargeRecordV2Response 平台企业预付业务服务费记录返回 */
30
35
  interface ListDealerRechargeRecordV2Response {
31
36
  /** 预付业务服务费记录 */
32
37
  data: RechargeRecordInfo[];
33
38
  }
39
+
34
40
  /** RechargeRecordInfo 预付业务服务费记录信息 */
35
41
  interface RechargeRecordInfo {
36
42
  /** 平台企业 ID */
@@ -40,9 +46,9 @@ interface RechargeRecordInfo {
40
46
  /** 预付业务服务费记录 ID */
41
47
  recharge_id: string;
42
48
  /** 预付业务服务费 */
43
- amount: string;
49
+ amount: number;
44
50
  /** 实际到账金额 */
45
- actual_amount: string;
51
+ actual_amount: number;
46
52
  /** 创建时间 */
47
53
  created_at: string;
48
54
  /** 资金用途 */
@@ -52,6 +58,7 @@ interface RechargeRecordInfo {
52
58
  /** 平台企业付款银行账号 */
53
59
  recharge_account_no: string;
54
60
  }
61
+
55
62
  /** ListDailyOrderRequest 查询日订单数据请求 */
56
63
  interface ListDailyOrderRequest {
57
64
  /** 订单查询日期, 格式:yyyy-MM-dd格式:yyyy-MM-dd */
@@ -65,6 +72,7 @@ interface ListDailyOrderRequest {
65
72
  /** 如果为 encryption,则对返回的 data 进行加密 */
66
73
  data_type: string;
67
74
  }
75
+
68
76
  /** ListDailyOrderResponse 查询日订单数据返回 */
69
77
  interface ListDailyOrderResponse {
70
78
  /** 总数目 */
@@ -72,6 +80,7 @@ interface ListDailyOrderResponse {
72
80
  /** 条目信息 */
73
81
  list: DealerOrderInfo[];
74
82
  }
83
+
75
84
  /** DealerOrderInfo 平台企业支付订单信息 */
76
85
  interface DealerOrderInfo {
77
86
  /** 综合服务主体 ID */
@@ -115,6 +124,7 @@ interface DealerOrderInfo {
115
124
  /** 完成时间 */
116
125
  finished_time: string;
117
126
  }
127
+
118
128
  /** ListDailyBillRequest 查询日流水数据请求 */
119
129
  interface ListDailyBillRequest {
120
130
  /** 流水查询日期 */
@@ -126,6 +136,7 @@ interface ListDailyBillRequest {
126
136
  /** 如果为 encryption,则对返回的 data 进行加密 */
127
137
  data_type: string;
128
138
  }
139
+
129
140
  /** ListDailyBillResponse 查询日流水数据返回 */
130
141
  interface ListDailyBillResponse {
131
142
  /** 总条数 */
@@ -133,6 +144,7 @@ interface ListDailyBillResponse {
133
144
  /** 条目信息 */
134
145
  list: DealerBillInfo[];
135
146
  }
147
+
136
148
  /** DealerBillInfo 流水详情 */
137
149
  interface DealerBillInfo {
138
150
  /** 综合服务主体 ID */
@@ -166,26 +178,31 @@ interface DealerBillInfo {
166
178
  /** 备注 */
167
179
  remark: string;
168
180
  }
181
+
169
182
  /** GetDailyOrderFileV2Request 查询日订单文件(支付和退款订单)请求 */
170
183
  interface GetDailyOrderFileV2Request {
171
184
  /** 订单查询日期, 格式:yyyy-MM-dd */
172
185
  order_date: string;
173
186
  }
187
+
174
188
  /** GetDailyOrderFileV2Response 查询日订单文件(支付和退款订单)返回 */
175
189
  interface GetDailyOrderFileV2Response {
176
190
  /** 下载地址 */
177
191
  url: string;
178
192
  }
193
+
179
194
  /** ListBalanceDailyStatementRequest 查询余额日账单数据请求 */
180
195
  interface ListBalanceDailyStatementRequest {
181
196
  /** 账单查询日期 格式:yyyy-MM-dd */
182
197
  statement_date: string;
183
198
  }
199
+
184
200
  /** ListBalanceDailyStatementResponse 查询余额日账单数据返回 */
185
201
  interface ListBalanceDailyStatementResponse {
186
202
  /** 条目信息 */
187
203
  list: StatementDetail[];
188
204
  }
205
+
189
206
  /** StatementDetail 余额账单信息详情 */
190
207
  interface StatementDetail {
191
208
  /** 账单 ID */
@@ -223,6 +240,7 @@ interface StatementDetail {
223
240
  /** 项目名称 */
224
241
  project_name: string;
225
242
  }
243
+
226
244
  export declare class DataServiceClient extends YZHclient {
227
245
  constructor(conf: {
228
246
  dealer_id: string;
@@ -231,15 +249,38 @@ export declare class DataServiceClient extends YZHclient {
231
249
  des3_key: string;
232
250
  private_key: string;
233
251
  yzh_public_key: string;
234
- sign_type: "rsa" | "sha256";
252
+ sign_type: 'rsa' | 'sha256';
235
253
  base_url?: string;
254
+ timeout?: number;
236
255
  });
237
- ListDailyOrder(req: ListDailyOrderRequest, cb?: (error: null | string, rep: ListDailyOrderResponse) => void): Promise<ListDailyOrderResponse>;
238
- GetDailyOrderFile(req: GetDailyOrderFileRequest, cb?: (error: null | string, rep: GetDailyOrderFileResponse) => void): Promise<GetDailyOrderFileResponse>;
239
- GetDailyOrderFileV2(req: GetDailyOrderFileV2Request, cb?: (error: null | string, rep: GetDailyOrderFileV2Response) => void): Promise<GetDailyOrderFileV2Response>;
240
- ListDailyBill(req: ListDailyBillRequest, cb?: (error: null | string, rep: ListDailyBillResponse) => void): Promise<ListDailyBillResponse>;
241
- GetDailyBillFileV2(req: GetDailyBillFileV2Request, cb?: (error: null | string, rep: GetDailyBillFileV2Response) => void): Promise<GetDailyBillFileV2Response>;
242
- ListDealerRechargeRecordV2(req: ListDealerRechargeRecordV2Request, cb?: (error: null | string, rep: ListDealerRechargeRecordV2Response) => void): Promise<ListDealerRechargeRecordV2Response>;
243
- ListBalanceDailyStatement(req: ListBalanceDailyStatementRequest, cb?: (error: null | string, rep: ListBalanceDailyStatementResponse) => void): Promise<ListBalanceDailyStatementResponse>;
256
+ ListDailyOrder(
257
+ req: ListDailyOrderRequest,
258
+ cb?: (error: null | string, rep: ListDailyOrderResponse) => void
259
+ ): Promise<ListDailyOrderResponse>;
260
+ GetDailyOrderFile(
261
+ req: GetDailyOrderFileRequest,
262
+ cb?: (error: null | string, rep: GetDailyOrderFileResponse) => void
263
+ ): Promise<GetDailyOrderFileResponse>;
264
+ GetDailyOrderFileV2(
265
+ req: GetDailyOrderFileV2Request,
266
+ cb?: (error: null | string, rep: GetDailyOrderFileV2Response) => void
267
+ ): Promise<GetDailyOrderFileV2Response>;
268
+ ListDailyBill(
269
+ req: ListDailyBillRequest,
270
+ cb?: (error: null | string, rep: ListDailyBillResponse) => void
271
+ ): Promise<ListDailyBillResponse>;
272
+ GetDailyBillFileV2(
273
+ req: GetDailyBillFileV2Request,
274
+ cb?: (error: null | string, rep: GetDailyBillFileV2Response) => void
275
+ ): Promise<GetDailyBillFileV2Response>;
276
+ ListDealerRechargeRecordV2(
277
+ req: ListDealerRechargeRecordV2Request,
278
+ cb?: (error: null | string, rep: ListDealerRechargeRecordV2Response) => void
279
+ ): Promise<ListDealerRechargeRecordV2Response>;
280
+ ListBalanceDailyStatement(
281
+ req: ListBalanceDailyStatementRequest,
282
+ cb?: (error: null | string, rep: ListBalanceDailyStatementResponse) => void
283
+ ): Promise<ListBalanceDailyStatementResponse>;
244
284
  }
285
+
245
286
  export {};
@@ -1,38 +1,51 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ 'use strict';
2
+ Object.defineProperty(exports, '__esModule', { value: true });
3
3
  exports.DataServiceClient = void 0;
4
- const client_1 = require("../../common/client");
4
+ const client_1 = require('../../common/client');
5
5
  class DataServiceClient extends client_1.default {
6
+ // eslint-disable-next-line no-useless-constructor
6
7
  constructor(conf) {
7
8
  super(conf);
8
9
  }
9
10
  // ListDailyOrder 查询日订单数据
10
11
  async ListDailyOrder(req, cb) {
11
- return this.request("get", "/api/dataservice/v1/orders", req, { encryption: (req === null || req === void 0 ? void 0 : req.data_type) === "encryption" }, cb);
12
+ return this.request(
13
+ 'get',
14
+ '/api/dataservice/v1/orders',
15
+ req,
16
+ { encryption: (req === null || req === void 0 ? void 0 : req.data_type) === 'encryption' },
17
+ cb
18
+ );
12
19
  }
13
20
  // GetDailyOrderFile 查询日订单文件
14
21
  async GetDailyOrderFile(req, cb) {
15
- return this.request("get", "/api/dataservice/v1/order/downloadurl", req, { encryption: false }, cb);
22
+ return this.request('get', '/api/dataservice/v1/order/downloadurl', req, { encryption: false }, cb);
16
23
  }
17
24
  // GetDailyOrderFileV2 查询日订单文件(支付和退款订单)
18
25
  async GetDailyOrderFileV2(req, cb) {
19
- return this.request("get", "/api/dataservice/v1/order/day/url", req, { encryption: false }, cb);
26
+ return this.request('get', '/api/dataservice/v1/order/day/url', req, { encryption: false }, cb);
20
27
  }
21
28
  // ListDailyBill 查询日流水数据
22
29
  async ListDailyBill(req, cb) {
23
- return this.request("get", "/api/dataservice/v1/bills", req, { encryption: (req === null || req === void 0 ? void 0 : req.data_type) === "encryption" }, cb);
30
+ return this.request(
31
+ 'get',
32
+ '/api/dataservice/v1/bills',
33
+ req,
34
+ { encryption: (req === null || req === void 0 ? void 0 : req.data_type) === 'encryption' },
35
+ cb
36
+ );
24
37
  }
25
38
  // GetDailyBillFileV2 查询日流水文件
26
39
  async GetDailyBillFileV2(req, cb) {
27
- return this.request("get", "/api/dataservice/v2/bill/downloadurl", req, { encryption: false }, cb);
40
+ return this.request('get', '/api/dataservice/v2/bill/downloadurl', req, { encryption: false }, cb);
28
41
  }
29
42
  // ListDealerRechargeRecordV2 查询平台企业预付业务服务费记录
30
43
  async ListDealerRechargeRecordV2(req, cb) {
31
- return this.request("get", "/api/dataservice/v2/recharge-record", req, { encryption: false }, cb);
44
+ return this.request('get', '/api/dataservice/v2/recharge-record', req, { encryption: false }, cb);
32
45
  }
33
46
  // ListBalanceDailyStatement 查询余额日账单数据
34
47
  async ListBalanceDailyStatement(req, cb) {
35
- return this.request("get", "/api/dataservice/v1/statements-daily", req, { encryption: false }, cb);
48
+ return this.request('get', '/api/dataservice/v1/statements-daily', req, { encryption: false }, cb);
36
49
  }
37
50
  }
38
51
  exports.DataServiceClient = DataServiceClient;