@yunzhanghu/sdk-nodejs 0.0.3 → 1.0.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.
Files changed (44) hide show
  1. package/README.md +6 -4
  2. package/example/apiUserSign.js +1 -1
  3. package/example/authentication.js +1 -1
  4. package/example/bizlicXjjH5.js +1 -1
  5. package/example/bizlicXjjH5Api.js +4 -1
  6. package/example/dataService.js +1 -1
  7. package/example/h5UserSign.js +1 -1
  8. package/example/invoice.js +1 -1
  9. package/example/payment.js +1 -1
  10. package/example/tax.js +1 -1
  11. package/package.json +1 -1
  12. package/src/common/client.ts +4 -3
  13. package/src/services/apiusersign/index.ts +1 -1
  14. package/src/services/authentication/index.ts +1 -1
  15. package/src/services/bizlicxjjh5/index.ts +2 -2
  16. package/src/services/bizlicxjjh5api/index.ts +2 -2
  17. package/src/services/dataservice/index.ts +3 -3
  18. package/src/services/h5usersign/index.ts +1 -1
  19. package/src/services/index.ts +9 -9
  20. package/src/services/invoice/index.ts +49 -1
  21. package/src/services/payment/index.ts +2 -2
  22. package/src/services/tax/index.ts +1 -1
  23. package/yzh/common/client.d.ts +1 -1
  24. package/yzh/common/client.js +4 -4
  25. package/yzh/services/apiusersign/index.d.ts +1 -1
  26. package/yzh/services/apiusersign/index.js +3 -3
  27. package/yzh/services/authentication/index.d.ts +1 -1
  28. package/yzh/services/authentication/index.js +3 -3
  29. package/yzh/services/bizlicxjjh5/index.d.ts +2 -2
  30. package/yzh/services/bizlicxjjh5/index.js +3 -3
  31. package/yzh/services/bizlicxjjh5api/index.d.ts +2 -2
  32. package/yzh/services/bizlicxjjh5api/index.js +3 -3
  33. package/yzh/services/dataservice/index.d.ts +1 -1
  34. package/yzh/services/dataservice/index.js +5 -5
  35. package/yzh/services/h5usersign/index.d.ts +1 -1
  36. package/yzh/services/h5usersign/index.js +3 -3
  37. package/yzh/services/index.d.ts +9 -9
  38. package/yzh/services/index.js +10 -10
  39. package/yzh/services/invoice/index.d.ts +33 -1
  40. package/yzh/services/invoice/index.js +7 -3
  41. package/yzh/services/payment/index.d.ts +1 -1
  42. package/yzh/services/payment/index.js +4 -4
  43. package/yzh/services/tax/index.d.ts +1 -1
  44. package/yzh/services/tax/index.js +3 -3
package/README.md CHANGED
@@ -55,8 +55,8 @@ OpenSSL-> rsa -in private_key.pem -pubout -out pubkey.pem
55
55
 
56
56
  ### 通过源码包安装
57
57
 
58
- 1. 前往 [Github 仓库](https://github.com/YunzhanghuOpen/sdk-nodejs) 下载源码压缩包;
59
- 2. 解压源码包到您项目的合适位置;
58
+ 1. 前往 [Github 仓库](https://github.com/YunzhanghuOpen/sdk-nodejs) 下载源码压缩包;
59
+ 2. 解压源码包到您项目的合适位置;
60
60
  3. 在您的代码中引用对应模块代码,可参考示例。
61
61
 
62
62
  ## 快速使用
@@ -76,8 +76,8 @@ OpenSSL-> rsa -in private_key.pem -pubout -out pubkey.pem
76
76
  ```
77
77
  const yunzhanghu = require("@yunzhanghu/sdk-nodejs")
78
78
 
79
- // 实例化要请求的 client 对象(以 Invoice 为例)
80
- const client = new yunzhanghu.Invoice({
79
+ // 实例化要请求的 client 对象(以 InvoiceClient 为例)
80
+ const client = new yunzhanghu.InvoiceClient({
81
81
  // 为了保护密钥安全,建议将密钥配置到环境变量中或配置文件中。
82
82
  // 请勿在代码中使用硬编码密钥,可能导致密钥暴露,存在安全隐患。
83
83
 
@@ -104,6 +104,8 @@ client
104
104
  .GetInvoiceAmount({
105
105
  dealer_id: process.env.DEALER_ID,
106
106
  broker_id: process.env.BROKER_ID,
107
+ // 可自定义 Header 中的 request-id,建议将 request-id 记录在日志中
108
+ // request_id:'req1678257009001'
107
109
  })
108
110
  .then((data) => {
109
111
  console.log("data", data)
@@ -3,7 +3,7 @@ const config = require("./conf/config.js")
3
3
 
4
4
  // API 签约
5
5
 
6
- const apiusersign = new yzhAPI.Apiusersign(config)
6
+ const apiusersign = new yzhAPI.ApiUserSignServiceClient(config)
7
7
 
8
8
  // 获取协议预览 URL
9
9
  apiusersign
@@ -5,7 +5,7 @@ const path = require("path")
5
5
 
6
6
  // 用户信息验证
7
7
 
8
- const authentication = new yzhAPI.Authentication(config)
8
+ const authentication = new yzhAPI.AuthenticationClient(config)
9
9
 
10
10
  // 银行卡四要素鉴权请求(下发短信验证码)
11
11
  authentication
@@ -3,7 +3,7 @@ const config = require("./conf/config.js")
3
3
 
4
4
  // 个体工商户注册(云账户新经济 H5)
5
5
 
6
- const bizlicxjjh5 = new yzhAPI.Bizlicxjjh5({
6
+ const bizlicxjjh5 = new yzhAPI.BizlicXjjH5ServiceClient({
7
7
  ...config,
8
8
  base_url: "https://api-aic.yunzhanghu.com/",
9
9
  })
@@ -3,7 +3,10 @@ const config = require("./conf/config.js")
3
3
 
4
4
  // 个体工商户注册(云账户新经济 H5+API)
5
5
 
6
- const bizlicxjjh5api = new yzhAPI.Bizlicxjjh5api({...config,base_url: "https://api-aic.yunzhanghu.com/"})
6
+ const bizlicxjjh5api = new yzhAPI.BizlicXjjH5APIServiceClient({
7
+ ...config,
8
+ base_url: "https://api-aic.yunzhanghu.com/",
9
+ })
7
10
 
8
11
  // 工商实名信息录入
9
12
  bizlicxjjh5api
@@ -3,7 +3,7 @@ const config = require("./conf/config.js")
3
3
 
4
4
  // 对账文件获取
5
5
 
6
- const dataService = new yzhAPI.Dataservice(config)
6
+ const dataService = new yzhAPI.DataServiceClient(config)
7
7
 
8
8
  // 查询日订单文件
9
9
  dataService
@@ -3,7 +3,7 @@ const config = require("./conf/config.js")
3
3
 
4
4
  // H5 签约
5
5
 
6
- const h5usersign = new yzhAPI.H5usersign(config)
6
+ const h5usersign = new yzhAPI.H5UserSignServiceClient(config)
7
7
 
8
8
  // 预申请签约
9
9
  h5usersign
@@ -3,7 +3,7 @@ const config = require("./conf/config.js")
3
3
 
4
4
  // 发票开具
5
5
 
6
- const invoice = new yzhAPI.Invoice(config)
6
+ const invoice = new yzhAPI.InvoiceClient(config)
7
7
 
8
8
  // 查询平台企业已开具和待开具发票金额
9
9
  invoice
@@ -1,7 +1,7 @@
1
1
  const yzhAPI = require("../yzh/index.js")
2
2
  const config = require("./conf/config.js")
3
3
  // 实时支付
4
- const payment = new yzhAPI.Payment(config)
4
+ const payment = new yzhAPI.PaymentClient(config)
5
5
 
6
6
  // 银行卡实时支付
7
7
  payment
package/example/tax.js CHANGED
@@ -2,7 +2,7 @@ const yzhAPI = require("../yzh/index.js")
2
2
  const config = require("./conf/config.js")
3
3
 
4
4
  // 个人所得税扣缴明细表
5
- const tax = new yzhAPI.Tax(config)
5
+ const tax = new yzhAPI.TaxClient(config)
6
6
 
7
7
  // 下载个人所得税扣缴明细表
8
8
  tax
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yunzhanghu/sdk-nodejs",
3
- "version": "0.0.3",
3
+ "version": "1.0.0",
4
4
  "description": "云账户 SDK for Node.js",
5
5
  "main": "yzh/index.js",
6
6
  "scripts": {
@@ -68,11 +68,12 @@ export class YZHClient {
68
68
 
69
69
  // 基础请求:进行请求实例生成 Header,动态设置、请求体包装等偏底层操作
70
70
  private doRequest(method: string, action: string, req: any): Promise<ResponseData> {
71
+ const { request_id, ...resReq } = req
71
72
  // 请求参数加密
72
- const encryptParams = this.generatorResquestParams(req)
73
+ const encryptParams = this.generatorRequestParams(resReq)
73
74
  // 生成请求实例,配置 Header
74
75
  const instance = getInstance({
75
- request_id: req?.request_id ?? this.mess(),
76
+ request_id: request_id ?? this.mess(),
76
77
  dealer_id: this.dealer_id,
77
78
  base_url: this.base_url,
78
79
  })
@@ -120,7 +121,7 @@ export class YZHClient {
120
121
  * @param {object} params
121
122
  * @returns {*} object
122
123
  */
123
- private generatorResquestParams(params: string) {
124
+ private generatorRequestParams(params: string) {
124
125
  try {
125
126
  const t = Date.now().toString()
126
127
  const m = this.mess()
@@ -76,7 +76,7 @@ interface ApiUserSignReleaseResponse {
76
76
  status: string
77
77
  }
78
78
 
79
- export class Apiusersign extends YZHclient {
79
+ export class ApiUserSignServiceClient extends YZHclient {
80
80
  constructor(conf: {
81
81
  dealer_id: string
82
82
  broker_id: string
@@ -161,7 +161,7 @@ interface GetBankCardInfoResponse {
161
161
  is_support: boolean
162
162
  }
163
163
 
164
- export class Authentication extends YZHclient {
164
+ export class AuthenticationClient extends YZHclient {
165
165
  constructor(conf: {
166
166
  dealer_id: string
167
167
  broker_id: string
@@ -17,7 +17,7 @@ interface H5GetStartUrlRequest {
17
17
  /** 跳转 URL */
18
18
  return_url: string
19
19
  /** H5 页面 Title */
20
- custom_title: number
20
+ customer_title: number
21
21
  }
22
22
 
23
23
  /** H5GetStartUrlResponse 预启动返回 */
@@ -96,7 +96,7 @@ interface NotifyH5EcoCityAicRequest {
96
96
  type: number
97
97
  }
98
98
 
99
- export class Bizlicxjjh5 extends YZHclient {
99
+ export class BizlicXjjH5ServiceClient extends YZHclient {
100
100
  constructor(conf: {
101
101
  dealer_id: string
102
102
  broker_id: string
@@ -49,7 +49,7 @@ interface H5APIGetStartUrlRequest {
49
49
  /** 跳转 URL */
50
50
  return_url: string
51
51
  /** H5 页面 Title */
52
- custom_title: number
52
+ customer_title: number
53
53
  }
54
54
 
55
55
  /** H5APIGetStartUrlResponse 预启动返回 */
@@ -128,7 +128,7 @@ interface NotifyH5APIEcoCityAicRequest {
128
128
  type: number
129
129
  }
130
130
 
131
- export class Bizlicxjjh5api extends YZHclient {
131
+ export class BizlicXjjH5APIServiceClient extends YZHclient {
132
132
  constructor(conf: {
133
133
  dealer_id: string
134
134
  broker_id: string
@@ -242,7 +242,7 @@ interface StatementDetail {
242
242
  project_name: string
243
243
  }
244
244
 
245
- export class Dataservice extends YZHclient {
245
+ export class DataServiceClient extends YZHclient {
246
246
  constructor(conf: {
247
247
  dealer_id: string
248
248
  broker_id: string
@@ -265,7 +265,7 @@ export class Dataservice extends YZHclient {
265
265
  "get",
266
266
  "/api/dataservice/v1/orders",
267
267
  req,
268
- { encryption: req?.data_type === " encryption" },
268
+ { encryption: req?.data_type === "encryption" },
269
269
  cb
270
270
  )
271
271
  }
@@ -301,7 +301,7 @@ export class Dataservice extends YZHclient {
301
301
  "get",
302
302
  "/api/dataservice/v1/bills",
303
303
  req,
304
- { encryption: req?.data_type === " encryption" },
304
+ { encryption: req?.data_type === "encryption" },
305
305
  cb
306
306
  )
307
307
  }
@@ -96,7 +96,7 @@ interface NotifyH5UserSignRequest {
96
96
  phone: string
97
97
  }
98
98
 
99
- export class H5usersign extends YZHclient {
99
+ export class H5UserSignServiceClient extends YZHclient {
100
100
  constructor(conf: {
101
101
  dealer_id: string
102
102
  broker_id: string
@@ -1,10 +1,10 @@
1
1
  export { Util } from "../common/utils"
2
- export { Apiusersign } from "./apiusersign"
3
- export { Authentication } from "./authentication"
4
- export { Dataservice } from "./dataservice"
5
- export { H5usersign } from "./h5usersign"
6
- export { Invoice } from "./invoice"
7
- export { Payment } from "./payment"
8
- export { Tax } from "./tax"
9
- export { Bizlicxjjh5api } from "./bizlicxjjh5api"
10
- export { Bizlicxjjh5 } from "./bizlicxjjh5"
2
+ export { ApiUserSignServiceClient } from "./apiusersign"
3
+ export { AuthenticationClient } from "./authentication"
4
+ export { DataServiceClient } from "./dataservice"
5
+ export { H5UserSignServiceClient } from "./h5usersign"
6
+ export { InvoiceClient } from "./invoice"
7
+ export { PaymentClient } from "./payment"
8
+ export { TaxClient } from "./tax"
9
+ export { BizlicXjjH5APIServiceClient } from "./bizlicxjjh5api"
10
+ export { BizlicXjjH5ServiceClient } from "./bizlicxjjh5"
@@ -110,6 +110,40 @@ interface GetInvoiceStatusResponse {
110
110
  waybill_number: string[]
111
111
  }
112
112
 
113
+ /** GetInvoiceInformationRequest 查询发票信息请求 */
114
+ interface GetInvoiceInformationRequest {
115
+ /** 发票申请编号 */
116
+ invoice_apply_id: string
117
+ /** 发票申请单 ID */
118
+ application_id: string
119
+ }
120
+
121
+ /** GetInvoiceInformationResponse 查询发票信息返回 */
122
+ interface GetInvoiceInformationResponse {
123
+ /** 发票信息 */
124
+ information: InformationDataInfo[]
125
+ }
126
+
127
+ /** InformationDataInfo 查询发票信息返回 */
128
+ interface InformationDataInfo {
129
+ /** 货物或应税劳务、服务名称 */
130
+ goods_services_name: string
131
+ /** 发票号码 */
132
+ invoice_num: string
133
+ /** 发票代码 */
134
+ invoice_code: string
135
+ /** 不含税金额 */
136
+ price_amount: string
137
+ /** 税额 */
138
+ tax_amount: string
139
+ /** 税率 */
140
+ tax_rate: string
141
+ /** 价税合计 */
142
+ price_tax_amount: string
143
+ /** 开票日期 */
144
+ invoiced_date: string
145
+ }
146
+
113
147
  /** BankNameAccount 系统支持的开户行及账号 */
114
148
  interface BankNameAccount {
115
149
  /** 开户行及账号 */
@@ -191,7 +225,7 @@ interface NotifyInvoiceDoneRequest {
191
225
  reject_reason: string
192
226
  }
193
227
 
194
- export class Invoice extends YZHclient {
228
+ export class InvoiceClient extends YZHclient {
195
229
  constructor(conf: {
196
230
  dealer_id: string
197
231
  broker_id: string
@@ -243,6 +277,20 @@ export class Invoice extends YZHclient {
243
277
  )
244
278
  }
245
279
 
280
+ // GetInvoiceInformation 查询发票信息
281
+ async GetInvoiceInformation(
282
+ req: GetInvoiceInformationRequest,
283
+ cb?: (error: null | string, rep: GetInvoiceInformationResponse) => void
284
+ ): Promise<GetInvoiceInformationResponse> {
285
+ return this.request(
286
+ "post",
287
+ "/api/invoice/v2/invoice-information",
288
+ req,
289
+ { encryption: false },
290
+ cb
291
+ )
292
+ }
293
+
246
294
  // GetInvoiceFile 下载 PDF 版发票
247
295
  async GetInvoiceFile(
248
296
  req: GetInvoiceFileRequest,
@@ -422,7 +422,7 @@ interface ConfirmBatchOrderRequest {
422
422
  /** ConfirmBatchOrderResponse 批次确认响应 */
423
423
  interface ConfirmBatchOrderResponse {}
424
424
 
425
- export class Payment extends YZHclient {
425
+ export class PaymentClient extends YZHclient {
426
426
  constructor(conf: {
427
427
  dealer_id: string
428
428
  broker_id: string
@@ -469,7 +469,7 @@ export class Payment extends YZHclient {
469
469
  "get",
470
470
  "/api/payment/v1/query-order",
471
471
  req,
472
- { encryption: req?.data_type === " encryption" },
472
+ { encryption: req?.data_type === "encryption" },
473
473
  cb
474
474
  )
475
475
  }
@@ -44,7 +44,7 @@ interface GetUserCrossResponse {
44
44
  is_cross: boolean
45
45
  }
46
46
 
47
- export class Tax extends YZHclient {
47
+ export class TaxClient extends YZHclient {
48
48
  constructor(conf: {
49
49
  dealer_id: string
50
50
  broker_id: string
@@ -39,7 +39,7 @@ export declare class YZHClient {
39
39
  * @param {object} params
40
40
  * @returns {*} object
41
41
  */
42
- private generatorResquestParams;
42
+ private generatorRequestParams;
43
43
  /**
44
44
  * 生成签名(RSA-SHA256)
45
45
  * @param {string} data 经过加密后的具体数据
@@ -225,12 +225,12 @@ class YZHClient {
225
225
  }
226
226
  // 基础请求:进行请求实例生成 Header,动态设置、请求体包装等偏底层操作
227
227
  doRequest(method, action, req) {
228
- var _a;
228
+ const { request_id, ...resReq } = req;
229
229
  // 请求参数加密
230
- const encryptParams = this.generatorResquestParams(req);
230
+ const encryptParams = this.generatorRequestParams(resReq);
231
231
  // 生成请求实例,配置 Header
232
232
  const instance = (0, http_1.default)({
233
- request_id: (_a = req === null || req === void 0 ? void 0 : req.request_id) !== null && _a !== void 0 ? _a : this.mess(),
233
+ request_id: request_id !== null && request_id !== void 0 ? request_id : this.mess(),
234
234
  dealer_id: this.dealer_id,
235
235
  base_url: this.base_url,
236
236
  });
@@ -272,7 +272,7 @@ class YZHClient {
272
272
  * @param {object} params
273
273
  * @returns {*} object
274
274
  */
275
- generatorResquestParams(params) {
275
+ generatorRequestParams(params) {
276
276
  try {
277
277
  const t = Date.now().toString();
278
278
  const m = this.mess();
@@ -67,7 +67,7 @@ interface ApiUserSignReleaseResponse {
67
67
  /** 是否解约成功 */
68
68
  status: string;
69
69
  }
70
- export declare class Apiusersign extends YZHclient {
70
+ export declare class ApiUserSignServiceClient extends YZHclient {
71
71
  constructor(conf: {
72
72
  dealer_id: string;
73
73
  broker_id: string;
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Apiusersign = void 0;
3
+ exports.ApiUserSignServiceClient = void 0;
4
4
  const client_1 = require("../../common/client");
5
- class Apiusersign extends client_1.default {
5
+ class ApiUserSignServiceClient extends client_1.default {
6
6
  constructor(conf) {
7
7
  super(conf);
8
8
  }
@@ -23,4 +23,4 @@ class Apiusersign extends client_1.default {
23
23
  return this.request("post", "/api/sign/v1/user/release", req, { encryption: false }, cb);
24
24
  }
25
25
  }
26
- exports.Apiusersign = Apiusersign;
26
+ exports.ApiUserSignServiceClient = ApiUserSignServiceClient;
@@ -130,7 +130,7 @@ interface GetBankCardInfoResponse {
130
130
  /** 云账户是否支持向该银行支付 */
131
131
  is_support: boolean;
132
132
  }
133
- export declare class Authentication extends YZHclient {
133
+ export declare class AuthenticationClient extends YZHclient {
134
134
  constructor(conf: {
135
135
  dealer_id: string;
136
136
  broker_id: string;
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Authentication = void 0;
3
+ exports.AuthenticationClient = void 0;
4
4
  const client_1 = require("../../common/client");
5
- class Authentication extends client_1.default {
5
+ class AuthenticationClient extends client_1.default {
6
6
  constructor(conf) {
7
7
  super(conf);
8
8
  }
@@ -39,4 +39,4 @@ class Authentication extends client_1.default {
39
39
  return this.request("get", "/api/payment/v1/card", req, { encryption: false }, cb);
40
40
  }
41
41
  }
42
- exports.Authentication = Authentication;
42
+ exports.AuthenticationClient = AuthenticationClient;
@@ -16,7 +16,7 @@ interface H5GetStartUrlRequest {
16
16
  /** 跳转 URL */
17
17
  return_url: string;
18
18
  /** H5 页面 Title */
19
- custom_title: number;
19
+ customer_title: number;
20
20
  }
21
21
  /** H5GetStartUrlResponse 预启动返回 */
22
22
  interface H5GetStartUrlResponse {
@@ -59,7 +59,7 @@ interface H5EcoCityAicStatusResponse {
59
59
  /** 姓名 */
60
60
  real_name: string;
61
61
  }
62
- export declare class Bizlicxjjh5 extends YZHclient {
62
+ export declare class BizlicXjjH5ServiceClient extends YZHclient {
63
63
  constructor(conf: {
64
64
  dealer_id: string;
65
65
  broker_id: string;
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Bizlicxjjh5 = void 0;
3
+ exports.BizlicXjjH5ServiceClient = void 0;
4
4
  const client_1 = require("../../common/client");
5
- class Bizlicxjjh5 extends client_1.default {
5
+ class BizlicXjjH5ServiceClient extends client_1.default {
6
6
  constructor(conf) {
7
7
  super(conf);
8
8
  }
@@ -15,4 +15,4 @@ class Bizlicxjjh5 extends client_1.default {
15
15
  return this.request("get", "/api/aic/new-economy/h5/v1/status", req, { encryption: false }, cb);
16
16
  }
17
17
  }
18
- exports.Bizlicxjjh5 = Bizlicxjjh5;
18
+ exports.BizlicXjjH5ServiceClient = BizlicXjjH5ServiceClient;
@@ -46,7 +46,7 @@ interface H5APIGetStartUrlRequest {
46
46
  /** 跳转 URL */
47
47
  return_url: string;
48
48
  /** H5 页面 Title */
49
- custom_title: number;
49
+ customer_title: number;
50
50
  }
51
51
  /** H5APIGetStartUrlResponse 预启动返回 */
52
52
  interface H5APIGetStartUrlResponse {
@@ -89,7 +89,7 @@ interface H5APIEcoCityAicStatusResponse {
89
89
  /** 姓名 */
90
90
  real_name: string;
91
91
  }
92
- export declare class Bizlicxjjh5api extends YZHclient {
92
+ export declare class BizlicXjjH5APIServiceClient extends YZHclient {
93
93
  constructor(conf: {
94
94
  dealer_id: string;
95
95
  broker_id: string;
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Bizlicxjjh5api = void 0;
3
+ exports.BizlicXjjH5APIServiceClient = void 0;
4
4
  const client_1 = require("../../common/client");
5
- class Bizlicxjjh5api extends client_1.default {
5
+ class BizlicXjjH5APIServiceClient extends client_1.default {
6
6
  constructor(conf) {
7
7
  super(conf);
8
8
  }
@@ -19,4 +19,4 @@ class Bizlicxjjh5api extends client_1.default {
19
19
  return this.request("get", "/api/aic/new-economy/api-h5/v1/status", req, { encryption: false }, cb);
20
20
  }
21
21
  }
22
- exports.Bizlicxjjh5api = Bizlicxjjh5api;
22
+ exports.BizlicXjjH5APIServiceClient = BizlicXjjH5APIServiceClient;
@@ -223,7 +223,7 @@ interface StatementDetail {
223
223
  /** 项目名称 */
224
224
  project_name: string;
225
225
  }
226
- export declare class Dataservice extends YZHclient {
226
+ export declare class DataServiceClient extends YZHclient {
227
227
  constructor(conf: {
228
228
  dealer_id: string;
229
229
  broker_id: string;
@@ -1,14 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Dataservice = void 0;
3
+ exports.DataServiceClient = void 0;
4
4
  const client_1 = require("../../common/client");
5
- class Dataservice extends client_1.default {
5
+ class DataServiceClient extends client_1.default {
6
6
  constructor(conf) {
7
7
  super(conf);
8
8
  }
9
9
  // ListDailyOrder 查询日订单数据
10
10
  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);
11
+ return this.request("get", "/api/dataservice/v1/orders", req, { encryption: (req === null || req === void 0 ? void 0 : req.data_type) === "encryption" }, cb);
12
12
  }
13
13
  // GetDailyOrderFile 查询日订单文件
14
14
  async GetDailyOrderFile(req, cb) {
@@ -20,7 +20,7 @@ class Dataservice extends client_1.default {
20
20
  }
21
21
  // ListDailyBill 查询日流水数据
22
22
  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);
23
+ return this.request("get", "/api/dataservice/v1/bills", req, { encryption: (req === null || req === void 0 ? void 0 : req.data_type) === "encryption" }, cb);
24
24
  }
25
25
  // GetDailyBillFileV2 查询日流水文件
26
26
  async GetDailyBillFileV2(req, cb) {
@@ -35,4 +35,4 @@ class Dataservice extends client_1.default {
35
35
  return this.request("get", "/api/dataservice/v1/statements-daily", req, { encryption: false }, cb);
36
36
  }
37
37
  }
38
- exports.Dataservice = Dataservice;
38
+ exports.DataServiceClient = DataServiceClient;
@@ -73,7 +73,7 @@ interface H5UserReleaseResponse {
73
73
  /** 是否解约成功 */
74
74
  status: string;
75
75
  }
76
- export declare class H5usersign extends YZHclient {
76
+ export declare class H5UserSignServiceClient extends YZHclient {
77
77
  constructor(conf: {
78
78
  dealer_id: string;
79
79
  broker_id: string;
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.H5usersign = void 0;
3
+ exports.H5UserSignServiceClient = void 0;
4
4
  const client_1 = require("../../common/client");
5
- class H5usersign extends client_1.default {
5
+ class H5UserSignServiceClient extends client_1.default {
6
6
  constructor(conf) {
7
7
  super(conf);
8
8
  }
@@ -23,4 +23,4 @@ class H5usersign extends client_1.default {
23
23
  return this.request("post", "/api/sdk/v1/sign/release", req, { encryption: false }, cb);
24
24
  }
25
25
  }
26
- exports.H5usersign = H5usersign;
26
+ exports.H5UserSignServiceClient = H5UserSignServiceClient;
@@ -1,10 +1,10 @@
1
1
  export { Util } from "../common/utils";
2
- export { Apiusersign } from "./apiusersign";
3
- export { Authentication } from "./authentication";
4
- export { Dataservice } from "./dataservice";
5
- export { H5usersign } from "./h5usersign";
6
- export { Invoice } from "./invoice";
7
- export { Payment } from "./payment";
8
- export { Tax } from "./tax";
9
- export { Bizlicxjjh5api } from "./bizlicxjjh5api";
10
- export { Bizlicxjjh5 } from "./bizlicxjjh5";
2
+ export { ApiUserSignServiceClient } from "./apiusersign";
3
+ export { AuthenticationClient } from "./authentication";
4
+ export { DataServiceClient } from "./dataservice";
5
+ export { H5UserSignServiceClient } from "./h5usersign";
6
+ export { InvoiceClient } from "./invoice";
7
+ export { PaymentClient } from "./payment";
8
+ export { TaxClient } from "./tax";
9
+ export { BizlicXjjH5APIServiceClient } from "./bizlicxjjh5api";
10
+ export { BizlicXjjH5ServiceClient } from "./bizlicxjjh5";
@@ -1,23 +1,23 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Bizlicxjjh5 = exports.Bizlicxjjh5api = exports.Tax = exports.Payment = exports.Invoice = exports.H5usersign = exports.Dataservice = exports.Authentication = exports.Apiusersign = exports.Util = void 0;
3
+ exports.BizlicXjjH5ServiceClient = exports.BizlicXjjH5APIServiceClient = exports.TaxClient = exports.PaymentClient = exports.InvoiceClient = exports.H5UserSignServiceClient = exports.DataServiceClient = exports.AuthenticationClient = exports.ApiUserSignServiceClient = exports.Util = void 0;
4
4
  var utils_1 = require("../common/utils");
5
5
  Object.defineProperty(exports, "Util", { enumerable: true, get: function () { return utils_1.Util; } });
6
6
  var apiusersign_1 = require("./apiusersign");
7
- Object.defineProperty(exports, "Apiusersign", { enumerable: true, get: function () { return apiusersign_1.Apiusersign; } });
7
+ Object.defineProperty(exports, "ApiUserSignServiceClient", { enumerable: true, get: function () { return apiusersign_1.ApiUserSignServiceClient; } });
8
8
  var authentication_1 = require("./authentication");
9
- Object.defineProperty(exports, "Authentication", { enumerable: true, get: function () { return authentication_1.Authentication; } });
9
+ Object.defineProperty(exports, "AuthenticationClient", { enumerable: true, get: function () { return authentication_1.AuthenticationClient; } });
10
10
  var dataservice_1 = require("./dataservice");
11
- Object.defineProperty(exports, "Dataservice", { enumerable: true, get: function () { return dataservice_1.Dataservice; } });
11
+ Object.defineProperty(exports, "DataServiceClient", { enumerable: true, get: function () { return dataservice_1.DataServiceClient; } });
12
12
  var h5usersign_1 = require("./h5usersign");
13
- Object.defineProperty(exports, "H5usersign", { enumerable: true, get: function () { return h5usersign_1.H5usersign; } });
13
+ Object.defineProperty(exports, "H5UserSignServiceClient", { enumerable: true, get: function () { return h5usersign_1.H5UserSignServiceClient; } });
14
14
  var invoice_1 = require("./invoice");
15
- Object.defineProperty(exports, "Invoice", { enumerable: true, get: function () { return invoice_1.Invoice; } });
15
+ Object.defineProperty(exports, "InvoiceClient", { enumerable: true, get: function () { return invoice_1.InvoiceClient; } });
16
16
  var payment_1 = require("./payment");
17
- Object.defineProperty(exports, "Payment", { enumerable: true, get: function () { return payment_1.Payment; } });
17
+ Object.defineProperty(exports, "PaymentClient", { enumerable: true, get: function () { return payment_1.PaymentClient; } });
18
18
  var tax_1 = require("./tax");
19
- Object.defineProperty(exports, "Tax", { enumerable: true, get: function () { return tax_1.Tax; } });
19
+ Object.defineProperty(exports, "TaxClient", { enumerable: true, get: function () { return tax_1.TaxClient; } });
20
20
  var bizlicxjjh5api_1 = require("./bizlicxjjh5api");
21
- Object.defineProperty(exports, "Bizlicxjjh5api", { enumerable: true, get: function () { return bizlicxjjh5api_1.Bizlicxjjh5api; } });
21
+ Object.defineProperty(exports, "BizlicXjjH5APIServiceClient", { enumerable: true, get: function () { return bizlicxjjh5api_1.BizlicXjjH5APIServiceClient; } });
22
22
  var bizlicxjjh5_1 = require("./bizlicxjjh5");
23
- Object.defineProperty(exports, "Bizlicxjjh5", { enumerable: true, get: function () { return bizlicxjjh5_1.Bizlicxjjh5; } });
23
+ Object.defineProperty(exports, "BizlicXjjH5ServiceClient", { enumerable: true, get: function () { return bizlicxjjh5_1.BizlicXjjH5ServiceClient; } });
@@ -101,6 +101,37 @@ interface GetInvoiceStatusResponse {
101
101
  /** 快递单号 */
102
102
  waybill_number: string[];
103
103
  }
104
+ /** GetInvoiceInformationRequest 查询发票信息请求 */
105
+ interface GetInvoiceInformationRequest {
106
+ /** 发票申请编号 */
107
+ invoice_apply_id: string;
108
+ /** 发票申请单 ID */
109
+ application_id: string;
110
+ }
111
+ /** GetInvoiceInformationResponse 查询发票信息返回 */
112
+ interface GetInvoiceInformationResponse {
113
+ /** 发票信息 */
114
+ information: InformationDataInfo[];
115
+ }
116
+ /** InformationDataInfo 查询发票信息返回 */
117
+ interface InformationDataInfo {
118
+ /** 货物或应税劳务、服务名称 */
119
+ goods_services_name: string;
120
+ /** 发票号码 */
121
+ invoice_num: string;
122
+ /** 发票代码 */
123
+ invoice_code: string;
124
+ /** 不含税金额 */
125
+ price_amount: string;
126
+ /** 税额 */
127
+ tax_amount: string;
128
+ /** 税率 */
129
+ tax_rate: string;
130
+ /** 价税合计 */
131
+ price_tax_amount: string;
132
+ /** 开票日期 */
133
+ invoiced_date: string;
134
+ }
104
135
  /** BankNameAccount 系统支持的开户行及账号 */
105
136
  interface BankNameAccount {
106
137
  /** 开户行及账号 */
@@ -139,7 +170,7 @@ interface SendReminderEmailRequest {
139
170
  /** SendReminderEmailResponse 发送发票扫描件压缩包下载链接邮件返回 */
140
171
  interface SendReminderEmailResponse {
141
172
  }
142
- export declare class Invoice extends YZHclient {
173
+ export declare class InvoiceClient extends YZHclient {
143
174
  constructor(conf: {
144
175
  dealer_id: string;
145
176
  broker_id: string;
@@ -154,6 +185,7 @@ export declare class Invoice extends YZHclient {
154
185
  GetInvoiceAmount(req: GetInvoiceAmountRequest, cb?: (error: null | string, rep: GetInvoiceAmountResponse) => void): Promise<GetInvoiceAmountResponse>;
155
186
  ApplyInvoice(req: ApplyInvoiceRequest, cb?: (error: null | string, rep: ApplyInvoiceResponse) => void): Promise<ApplyInvoiceResponse>;
156
187
  GetInvoiceStatus(req: GetInvoiceStatusRequest, cb?: (error: null | string, rep: GetInvoiceStatusResponse) => void): Promise<GetInvoiceStatusResponse>;
188
+ GetInvoiceInformation(req: GetInvoiceInformationRequest, cb?: (error: null | string, rep: GetInvoiceInformationResponse) => void): Promise<GetInvoiceInformationResponse>;
157
189
  GetInvoiceFile(req: GetInvoiceFileRequest, cb?: (error: null | string, rep: GetInvoiceFileResponse) => void): Promise<GetInvoiceFileResponse>;
158
190
  SendReminderEmail(req: SendReminderEmailRequest, cb?: (error: null | string, rep: SendReminderEmailResponse) => void): Promise<SendReminderEmailResponse>;
159
191
  }
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Invoice = void 0;
3
+ exports.InvoiceClient = void 0;
4
4
  const client_1 = require("../../common/client");
5
- class Invoice extends client_1.default {
5
+ class InvoiceClient extends client_1.default {
6
6
  constructor(conf) {
7
7
  super(conf);
8
8
  }
@@ -22,6 +22,10 @@ class Invoice extends client_1.default {
22
22
  async GetInvoiceStatus(req, cb) {
23
23
  return this.request("post", "/api/invoice/v2/invoice/invoice-status", req, { encryption: false }, cb);
24
24
  }
25
+ // GetInvoiceInformation 查询发票信息
26
+ async GetInvoiceInformation(req, cb) {
27
+ return this.request("post", "/api/invoice/v2/invoice-information", req, { encryption: false }, cb);
28
+ }
25
29
  // GetInvoiceFile 下载 PDF 版发票
26
30
  async GetInvoiceFile(req, cb) {
27
31
  return this.request("post", "/api/invoice/v2/invoice/invoice-pdf", req, { encryption: false }, cb);
@@ -31,4 +35,4 @@ class Invoice extends client_1.default {
31
35
  return this.request("post", "/api/invoice/v2/invoice/reminder/email", req, { encryption: false }, cb);
32
36
  }
33
37
  }
34
- exports.Invoice = Invoice;
38
+ exports.InvoiceClient = InvoiceClient;
@@ -333,7 +333,7 @@ interface ConfirmBatchOrderRequest {
333
333
  /** ConfirmBatchOrderResponse 批次确认响应 */
334
334
  interface ConfirmBatchOrderResponse {
335
335
  }
336
- export declare class Payment extends YZHclient {
336
+ export declare class PaymentClient extends YZHclient {
337
337
  constructor(conf: {
338
338
  dealer_id: string;
339
339
  broker_id: string;
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Payment = void 0;
3
+ exports.PaymentClient = void 0;
4
4
  const client_1 = require("../../common/client");
5
- class Payment extends client_1.default {
5
+ class PaymentClient extends client_1.default {
6
6
  constructor(conf) {
7
7
  super(conf);
8
8
  }
@@ -20,7 +20,7 @@ class Payment extends client_1.default {
20
20
  }
21
21
  // GetOrder 查询单笔订单信息
22
22
  async GetOrder(req, cb) {
23
- return this.request("get", "/api/payment/v1/query-order", req, { encryption: (req === null || req === void 0 ? void 0 : req.data_type) === " encryption" }, cb);
23
+ return this.request("get", "/api/payment/v1/query-order", req, { encryption: (req === null || req === void 0 ? void 0 : req.data_type) === "encryption" }, cb);
24
24
  }
25
25
  // GetDealerVARechargeAccount 查询平台企业汇款信息
26
26
  async GetDealerVARechargeAccount(req, cb) {
@@ -47,4 +47,4 @@ class Payment extends client_1.default {
47
47
  return this.request("post", "/api/payment/v1/confirm-batch", req, { encryption: false }, cb);
48
48
  }
49
49
  }
50
- exports.Payment = Payment;
50
+ exports.PaymentClient = PaymentClient;
@@ -38,7 +38,7 @@ interface GetUserCrossResponse {
38
38
  /** 跨集团标识 */
39
39
  is_cross: boolean;
40
40
  }
41
- export declare class Tax extends YZHclient {
41
+ export declare class TaxClient extends YZHclient {
42
42
  constructor(conf: {
43
43
  dealer_id: string;
44
44
  broker_id: string;
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Tax = void 0;
3
+ exports.TaxClient = void 0;
4
4
  const client_1 = require("../../common/client");
5
- class Tax extends client_1.default {
5
+ class TaxClient extends client_1.default {
6
6
  constructor(conf) {
7
7
  super(conf);
8
8
  }
@@ -15,4 +15,4 @@ class Tax extends client_1.default {
15
15
  return this.request("post", "/api/tax/v1/user/cross", req, { encryption: false }, cb);
16
16
  }
17
17
  }
18
- exports.Tax = Tax;
18
+ exports.TaxClient = TaxClient;