@yunzhanghu/sdk-nodejs 0.0.4 → 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.
- package/README.md +6 -4
- package/example/apiUserSign.js +1 -1
- package/example/authentication.js +1 -1
- package/example/bizlicXjjH5.js +1 -1
- package/example/bizlicXjjH5Api.js +4 -1
- package/example/dataService.js +1 -1
- package/example/h5UserSign.js +1 -1
- package/example/invoice.js +1 -1
- package/example/payment.js +1 -1
- package/example/tax.js +1 -1
- package/package.json +1 -1
- package/src/common/client.ts +4 -3
- package/src/services/apiusersign/index.ts +1 -1
- package/src/services/authentication/index.ts +1 -1
- package/src/services/bizlicxjjh5/index.ts +2 -2
- package/src/services/bizlicxjjh5api/index.ts +2 -2
- package/src/services/dataservice/index.ts +1 -1
- package/src/services/h5usersign/index.ts +1 -1
- package/src/services/index.ts +9 -9
- package/src/services/invoice/index.ts +49 -1
- package/src/services/payment/index.ts +1 -1
- package/src/services/tax/index.ts +1 -1
- package/yzh/common/client.d.ts +1 -1
- package/yzh/common/client.js +4 -4
- package/yzh/services/apiusersign/index.d.ts +1 -1
- package/yzh/services/apiusersign/index.js +3 -3
- package/yzh/services/authentication/index.d.ts +1 -1
- package/yzh/services/authentication/index.js +3 -3
- package/yzh/services/bizlicxjjh5/index.d.ts +2 -2
- package/yzh/services/bizlicxjjh5/index.js +3 -3
- package/yzh/services/bizlicxjjh5api/index.d.ts +2 -2
- package/yzh/services/bizlicxjjh5api/index.js +3 -3
- package/yzh/services/dataservice/index.d.ts +1 -1
- package/yzh/services/dataservice/index.js +3 -3
- package/yzh/services/h5usersign/index.d.ts +1 -1
- package/yzh/services/h5usersign/index.js +3 -3
- package/yzh/services/index.d.ts +9 -9
- package/yzh/services/index.js +10 -10
- package/yzh/services/invoice/index.d.ts +33 -1
- package/yzh/services/invoice/index.js +7 -3
- package/yzh/services/payment/index.d.ts +1 -1
- package/yzh/services/payment/index.js +3 -3
- package/yzh/services/tax/index.d.ts +1 -1
- 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 对象(以
|
|
80
|
-
const client = new yunzhanghu.
|
|
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)
|
package/example/apiUserSign.js
CHANGED
package/example/bizlicXjjH5.js
CHANGED
|
@@ -3,7 +3,10 @@ const config = require("./conf/config.js")
|
|
|
3
3
|
|
|
4
4
|
// 个体工商户注册(云账户新经济 H5+API)
|
|
5
5
|
|
|
6
|
-
const bizlicxjjh5api = new yzhAPI.
|
|
6
|
+
const bizlicxjjh5api = new yzhAPI.BizlicXjjH5APIServiceClient({
|
|
7
|
+
...config,
|
|
8
|
+
base_url: "https://api-aic.yunzhanghu.com/",
|
|
9
|
+
})
|
|
7
10
|
|
|
8
11
|
// 工商实名信息录入
|
|
9
12
|
bizlicxjjh5api
|
package/example/dataService.js
CHANGED
package/example/h5UserSign.js
CHANGED
package/example/invoice.js
CHANGED
package/example/payment.js
CHANGED
package/example/tax.js
CHANGED
package/package.json
CHANGED
package/src/common/client.ts
CHANGED
|
@@ -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.
|
|
73
|
+
const encryptParams = this.generatorRequestParams(resReq)
|
|
73
74
|
// 生成请求实例,配置 Header
|
|
74
75
|
const instance = getInstance({
|
|
75
|
-
request_id:
|
|
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
|
|
124
|
+
private generatorRequestParams(params: string) {
|
|
124
125
|
try {
|
|
125
126
|
const t = Date.now().toString()
|
|
126
127
|
const m = this.mess()
|
|
@@ -17,7 +17,7 @@ interface H5GetStartUrlRequest {
|
|
|
17
17
|
/** 跳转 URL */
|
|
18
18
|
return_url: string
|
|
19
19
|
/** H5 页面 Title */
|
|
20
|
-
|
|
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
|
|
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
|
-
|
|
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
|
|
131
|
+
export class BizlicXjjH5APIServiceClient extends YZHclient {
|
|
132
132
|
constructor(conf: {
|
|
133
133
|
dealer_id: string
|
|
134
134
|
broker_id: string
|
package/src/services/index.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export { Util } from "../common/utils"
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
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
|
|
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
|
|
425
|
+
export class PaymentClient extends YZHclient {
|
|
426
426
|
constructor(conf: {
|
|
427
427
|
dealer_id: string
|
|
428
428
|
broker_id: string
|
package/yzh/common/client.d.ts
CHANGED
package/yzh/common/client.js
CHANGED
|
@@ -225,12 +225,12 @@ class YZHClient {
|
|
|
225
225
|
}
|
|
226
226
|
// 基础请求:进行请求实例生成 Header,动态设置、请求体包装等偏底层操作
|
|
227
227
|
doRequest(method, action, req) {
|
|
228
|
-
|
|
228
|
+
const { request_id, ...resReq } = req;
|
|
229
229
|
// 请求参数加密
|
|
230
|
-
const encryptParams = this.
|
|
230
|
+
const encryptParams = this.generatorRequestParams(resReq);
|
|
231
231
|
// 生成请求实例,配置 Header
|
|
232
232
|
const instance = (0, http_1.default)({
|
|
233
|
-
request_id:
|
|
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
|
-
|
|
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
|
|
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.
|
|
3
|
+
exports.ApiUserSignServiceClient = void 0;
|
|
4
4
|
const client_1 = require("../../common/client");
|
|
5
|
-
class
|
|
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.
|
|
26
|
+
exports.ApiUserSignServiceClient = ApiUserSignServiceClient;
|
|
@@ -130,7 +130,7 @@ interface GetBankCardInfoResponse {
|
|
|
130
130
|
/** 云账户是否支持向该银行支付 */
|
|
131
131
|
is_support: boolean;
|
|
132
132
|
}
|
|
133
|
-
export declare class
|
|
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.
|
|
3
|
+
exports.AuthenticationClient = void 0;
|
|
4
4
|
const client_1 = require("../../common/client");
|
|
5
|
-
class
|
|
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.
|
|
42
|
+
exports.AuthenticationClient = AuthenticationClient;
|
|
@@ -16,7 +16,7 @@ interface H5GetStartUrlRequest {
|
|
|
16
16
|
/** 跳转 URL */
|
|
17
17
|
return_url: string;
|
|
18
18
|
/** H5 页面 Title */
|
|
19
|
-
|
|
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
|
|
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.
|
|
3
|
+
exports.BizlicXjjH5ServiceClient = void 0;
|
|
4
4
|
const client_1 = require("../../common/client");
|
|
5
|
-
class
|
|
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.
|
|
18
|
+
exports.BizlicXjjH5ServiceClient = BizlicXjjH5ServiceClient;
|
|
@@ -46,7 +46,7 @@ interface H5APIGetStartUrlRequest {
|
|
|
46
46
|
/** 跳转 URL */
|
|
47
47
|
return_url: string;
|
|
48
48
|
/** H5 页面 Title */
|
|
49
|
-
|
|
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
|
|
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.
|
|
3
|
+
exports.BizlicXjjH5APIServiceClient = void 0;
|
|
4
4
|
const client_1 = require("../../common/client");
|
|
5
|
-
class
|
|
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.
|
|
22
|
+
exports.BizlicXjjH5APIServiceClient = BizlicXjjH5APIServiceClient;
|
|
@@ -223,7 +223,7 @@ interface StatementDetail {
|
|
|
223
223
|
/** 项目名称 */
|
|
224
224
|
project_name: string;
|
|
225
225
|
}
|
|
226
|
-
export declare class
|
|
226
|
+
export declare class DataServiceClient extends YZHclient {
|
|
227
227
|
constructor(conf: {
|
|
228
228
|
dealer_id: string;
|
|
229
229
|
broker_id: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.DataServiceClient = void 0;
|
|
4
4
|
const client_1 = require("../../common/client");
|
|
5
|
-
class
|
|
5
|
+
class DataServiceClient extends client_1.default {
|
|
6
6
|
constructor(conf) {
|
|
7
7
|
super(conf);
|
|
8
8
|
}
|
|
@@ -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.
|
|
38
|
+
exports.DataServiceClient = DataServiceClient;
|
|
@@ -73,7 +73,7 @@ interface H5UserReleaseResponse {
|
|
|
73
73
|
/** 是否解约成功 */
|
|
74
74
|
status: string;
|
|
75
75
|
}
|
|
76
|
-
export declare class
|
|
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.
|
|
3
|
+
exports.H5UserSignServiceClient = void 0;
|
|
4
4
|
const client_1 = require("../../common/client");
|
|
5
|
-
class
|
|
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.
|
|
26
|
+
exports.H5UserSignServiceClient = H5UserSignServiceClient;
|
package/yzh/services/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export { Util } from "../common/utils";
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
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";
|
package/yzh/services/index.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
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, "
|
|
7
|
+
Object.defineProperty(exports, "ApiUserSignServiceClient", { enumerable: true, get: function () { return apiusersign_1.ApiUserSignServiceClient; } });
|
|
8
8
|
var authentication_1 = require("./authentication");
|
|
9
|
-
Object.defineProperty(exports, "
|
|
9
|
+
Object.defineProperty(exports, "AuthenticationClient", { enumerable: true, get: function () { return authentication_1.AuthenticationClient; } });
|
|
10
10
|
var dataservice_1 = require("./dataservice");
|
|
11
|
-
Object.defineProperty(exports, "
|
|
11
|
+
Object.defineProperty(exports, "DataServiceClient", { enumerable: true, get: function () { return dataservice_1.DataServiceClient; } });
|
|
12
12
|
var h5usersign_1 = require("./h5usersign");
|
|
13
|
-
Object.defineProperty(exports, "
|
|
13
|
+
Object.defineProperty(exports, "H5UserSignServiceClient", { enumerable: true, get: function () { return h5usersign_1.H5UserSignServiceClient; } });
|
|
14
14
|
var invoice_1 = require("./invoice");
|
|
15
|
-
Object.defineProperty(exports, "
|
|
15
|
+
Object.defineProperty(exports, "InvoiceClient", { enumerable: true, get: function () { return invoice_1.InvoiceClient; } });
|
|
16
16
|
var payment_1 = require("./payment");
|
|
17
|
-
Object.defineProperty(exports, "
|
|
17
|
+
Object.defineProperty(exports, "PaymentClient", { enumerable: true, get: function () { return payment_1.PaymentClient; } });
|
|
18
18
|
var tax_1 = require("./tax");
|
|
19
|
-
Object.defineProperty(exports, "
|
|
19
|
+
Object.defineProperty(exports, "TaxClient", { enumerable: true, get: function () { return tax_1.TaxClient; } });
|
|
20
20
|
var bizlicxjjh5api_1 = require("./bizlicxjjh5api");
|
|
21
|
-
Object.defineProperty(exports, "
|
|
21
|
+
Object.defineProperty(exports, "BizlicXjjH5APIServiceClient", { enumerable: true, get: function () { return bizlicxjjh5api_1.BizlicXjjH5APIServiceClient; } });
|
|
22
22
|
var bizlicxjjh5_1 = require("./bizlicxjjh5");
|
|
23
|
-
Object.defineProperty(exports, "
|
|
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
|
|
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.
|
|
3
|
+
exports.InvoiceClient = void 0;
|
|
4
4
|
const client_1 = require("../../common/client");
|
|
5
|
-
class
|
|
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.
|
|
38
|
+
exports.InvoiceClient = InvoiceClient;
|
|
@@ -333,7 +333,7 @@ interface ConfirmBatchOrderRequest {
|
|
|
333
333
|
/** ConfirmBatchOrderResponse 批次确认响应 */
|
|
334
334
|
interface ConfirmBatchOrderResponse {
|
|
335
335
|
}
|
|
336
|
-
export declare class
|
|
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.
|
|
3
|
+
exports.PaymentClient = void 0;
|
|
4
4
|
const client_1 = require("../../common/client");
|
|
5
|
-
class
|
|
5
|
+
class PaymentClient extends client_1.default {
|
|
6
6
|
constructor(conf) {
|
|
7
7
|
super(conf);
|
|
8
8
|
}
|
|
@@ -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.
|
|
50
|
+
exports.PaymentClient = PaymentClient;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.TaxClient = void 0;
|
|
4
4
|
const client_1 = require("../../common/client");
|
|
5
|
-
class
|
|
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.
|
|
18
|
+
exports.TaxClient = TaxClient;
|