@yunzhanghu/sdk-nodejs 0.0.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintignore +4 -0
- package/.eslintrc.json +19 -0
- package/.husky/pre-commit +7 -0
- package/LICENSE +201 -0
- package/README.md +114 -0
- package/example/apiUserSign.js +70 -0
- package/example/authentication.js +142 -0
- package/example/bizlicXjjH5.js +46 -0
- package/example/bizlicXjjH5Api.js +65 -0
- package/example/conf/config.js +30 -0
- package/example/dataService.js +98 -0
- package/example/h5UserSign.js +68 -0
- package/example/invoice.js +91 -0
- package/example/notify.js +36 -0
- package/example/package.json +12 -0
- package/example/payment.js +186 -0
- package/example/tax.js +34 -0
- package/package.json +47 -0
- package/prettier.config.js +32 -0
- package/src/common/client.ts +367 -0
- package/src/common/exception/yzhSDKHttpException.ts +32 -0
- package/src/common/http/index.ts +57 -0
- package/src/common/utils/index.ts +18 -0
- package/src/index.ts +1 -0
- package/src/services/apiusersign/index.ts +125 -0
- package/src/services/authentication/index.ts +247 -0
- package/src/services/bizlicxjjh5/index.ts +129 -0
- package/src/services/bizlicxjjh5api/index.ts +169 -0
- package/src/services/dataservice/index.ts +315 -0
- package/src/services/h5usersign/index.ts +145 -0
- package/src/services/index.ts +10 -0
- package/src/services/invoice/index.ts +257 -0
- package/src/services/payment/index.ts +523 -0
- package/src/services/tax/index.ts +77 -0
- package/src/typings.d.ts +1 -0
- package/tsconfig.json +25 -0
- package/yzh/common/client.d.ts +119 -0
- package/yzh/common/client.js +314 -0
- package/yzh/common/exception/yzhSDKHttpException.d.ts +10 -0
- package/yzh/common/exception/yzhSDKHttpException.js +21 -0
- package/yzh/common/http/index.d.ts +6 -0
- package/yzh/common/http/index.js +51 -0
- package/yzh/common/utils/index.d.ts +14 -0
- package/yzh/common/utils/index.js +11 -0
- package/yzh/index.d.ts +1 -0
- package/yzh/index.js +4 -0
- package/yzh/services/apiusersign/index.d.ts +86 -0
- package/yzh/services/apiusersign/index.js +26 -0
- package/yzh/services/authentication/index.d.ts +153 -0
- package/yzh/services/authentication/index.js +42 -0
- package/yzh/services/bizlicxjjh5/index.d.ts +76 -0
- package/yzh/services/bizlicxjjh5/index.js +18 -0
- package/yzh/services/bizlicxjjh5api/index.d.ts +107 -0
- package/yzh/services/bizlicxjjh5api/index.js +22 -0
- package/yzh/services/dataservice/index.d.ts +243 -0
- package/yzh/services/dataservice/index.js +38 -0
- package/yzh/services/h5usersign/index.d.ts +90 -0
- package/yzh/services/h5usersign/index.js +26 -0
- package/yzh/services/index.d.ts +10 -0
- package/yzh/services/index.js +23 -0
- package/yzh/services/invoice/index.d.ts +158 -0
- package/yzh/services/invoice/index.js +34 -0
- package/yzh/services/payment/index.d.ts +358 -0
- package/yzh/services/payment/index.js +50 -0
- package/yzh/services/tax/index.d.ts +55 -0
- package/yzh/services/tax/index.js +18 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Dataservice = void 0;
|
|
4
|
+
const client_1 = require("../../common/client");
|
|
5
|
+
class Dataservice extends client_1.default {
|
|
6
|
+
constructor(conf) {
|
|
7
|
+
super(conf);
|
|
8
|
+
}
|
|
9
|
+
// ListDailyOrder 查询日订单数据
|
|
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);
|
|
12
|
+
}
|
|
13
|
+
// GetDailyOrderFile 查询日订单文件
|
|
14
|
+
async GetDailyOrderFile(req, cb) {
|
|
15
|
+
return this.request("get", "/api/dataservice/v1/order/downloadurl", req, { encryption: false }, cb);
|
|
16
|
+
}
|
|
17
|
+
// GetDailyOrderFileV2 查询日订单文件(支付和退款订单)
|
|
18
|
+
async GetDailyOrderFileV2(req, cb) {
|
|
19
|
+
return this.request("get", "/api/dataservice/v1/order/day/url", req, { encryption: false }, cb);
|
|
20
|
+
}
|
|
21
|
+
// ListDailyBill 查询日流水数据
|
|
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);
|
|
24
|
+
}
|
|
25
|
+
// GetDailyBillFileV2 查询日流水文件
|
|
26
|
+
async GetDailyBillFileV2(req, cb) {
|
|
27
|
+
return this.request("get", "/api/dataservice/v2/bill/downloadurl", req, { encryption: false }, cb);
|
|
28
|
+
}
|
|
29
|
+
// ListDealerRechargeRecordV2 查询平台企业预付业务服务费记录
|
|
30
|
+
async ListDealerRechargeRecordV2(req, cb) {
|
|
31
|
+
return this.request("get", "/api/dataservice/v2/recharge-record", req, { encryption: false }, cb);
|
|
32
|
+
}
|
|
33
|
+
// ListBalanceDailyStatement 查询余额日账单数据
|
|
34
|
+
async ListBalanceDailyStatement(req, cb) {
|
|
35
|
+
return this.request("get", "/api/dataservice/v1/statements-daily", req, { encryption: false }, cb);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.Dataservice = Dataservice;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import YZHclient from "../../common/client";
|
|
2
|
+
/** H5UserPresignRequest 预申请签约请求 */
|
|
3
|
+
interface H5UserPresignRequest {
|
|
4
|
+
/** 平台企业 ID */
|
|
5
|
+
dealer_id: string;
|
|
6
|
+
/** 综合服务主体 ID */
|
|
7
|
+
broker_id: string;
|
|
8
|
+
/** 姓名 */
|
|
9
|
+
real_name: string;
|
|
10
|
+
/** 证件号码 */
|
|
11
|
+
id_card: string;
|
|
12
|
+
/** 证件类型 0:身份证 2:港澳居民来往内地通行证 3:护照 5:台湾居民来往大陆通行证 */
|
|
13
|
+
certificate_type: number;
|
|
14
|
+
}
|
|
15
|
+
/** H5UserPresignResponse 预申请签约返回 */
|
|
16
|
+
interface H5UserPresignResponse {
|
|
17
|
+
/** 用户 ID(废弃字段) */
|
|
18
|
+
uid: string;
|
|
19
|
+
/** H5 签约 token */
|
|
20
|
+
token: string;
|
|
21
|
+
}
|
|
22
|
+
/** H5UserSignRequest 申请签约请求 */
|
|
23
|
+
interface H5UserSignRequest {
|
|
24
|
+
/** H5 签约 token */
|
|
25
|
+
token: string;
|
|
26
|
+
/** H5 页面主题颜色 */
|
|
27
|
+
color: string;
|
|
28
|
+
/** 回调 URL 地址 */
|
|
29
|
+
url: string;
|
|
30
|
+
/** 跳转 URL */
|
|
31
|
+
redirect_url: string;
|
|
32
|
+
}
|
|
33
|
+
/** H5UserSignResponse 申请签约返回 */
|
|
34
|
+
interface H5UserSignResponse {
|
|
35
|
+
/** H5 签约页面 URL */
|
|
36
|
+
url: string;
|
|
37
|
+
}
|
|
38
|
+
/** GetH5UserSignStatusRequest 获取用户签约状态请求 */
|
|
39
|
+
interface GetH5UserSignStatusRequest {
|
|
40
|
+
/** 平台企业 ID */
|
|
41
|
+
dealer_id: string;
|
|
42
|
+
/** 综合服务主体 ID */
|
|
43
|
+
broker_id: string;
|
|
44
|
+
/** 姓名 */
|
|
45
|
+
real_name: string;
|
|
46
|
+
/** 证件号码 */
|
|
47
|
+
id_card: string;
|
|
48
|
+
}
|
|
49
|
+
/** GetH5UserSignStatusResponse 获取用户签约状态返回 */
|
|
50
|
+
interface GetH5UserSignStatusResponse {
|
|
51
|
+
/** 签约时间 */
|
|
52
|
+
signed_at: string;
|
|
53
|
+
/** 用户签约状态 */
|
|
54
|
+
status: number;
|
|
55
|
+
}
|
|
56
|
+
/** H5UserReleaseRequest 用户解约(测试账号专用接口)请求 */
|
|
57
|
+
interface H5UserReleaseRequest {
|
|
58
|
+
/** 综合服务主体 ID */
|
|
59
|
+
broker_id: string;
|
|
60
|
+
/** 平台企业 ID */
|
|
61
|
+
dealer_id: string;
|
|
62
|
+
/** 姓名 */
|
|
63
|
+
real_name: string;
|
|
64
|
+
/** 证件号码 */
|
|
65
|
+
id_card: string;
|
|
66
|
+
/** 证件类型 0:身份证 2:港澳居民来往内地通行证 3:护照 5:台湾居民来往大陆通行证 */
|
|
67
|
+
certificate_type: number;
|
|
68
|
+
}
|
|
69
|
+
/** H5UserReleaseResponse 用户解约(测试账号专用接口)返回 */
|
|
70
|
+
interface H5UserReleaseResponse {
|
|
71
|
+
/** 是否解约成功 */
|
|
72
|
+
status: string;
|
|
73
|
+
}
|
|
74
|
+
export declare class H5usersign extends YZHclient {
|
|
75
|
+
constructor(conf: {
|
|
76
|
+
dealer_id: string;
|
|
77
|
+
broker_id: string;
|
|
78
|
+
app_key: string;
|
|
79
|
+
des3_key: string;
|
|
80
|
+
private_key: string;
|
|
81
|
+
yzh_public_key: string;
|
|
82
|
+
sign_type: "rsa" | "sha256";
|
|
83
|
+
base_url?: string;
|
|
84
|
+
});
|
|
85
|
+
H5UserPresign(req: H5UserPresignRequest, cb?: (error: null | string, rep: H5UserPresignResponse) => void): Promise<H5UserPresignResponse>;
|
|
86
|
+
H5UserSign(req: H5UserSignRequest, cb?: (error: null | string, rep: H5UserSignResponse) => void): Promise<H5UserSignResponse>;
|
|
87
|
+
GetH5UserSignStatus(req: GetH5UserSignStatusRequest, cb?: (error: null | string, rep: GetH5UserSignStatusResponse) => void): Promise<GetH5UserSignStatusResponse>;
|
|
88
|
+
H5UserRelease(req: H5UserReleaseRequest, cb?: (error: null | string, rep: H5UserReleaseResponse) => void): Promise<H5UserReleaseResponse>;
|
|
89
|
+
}
|
|
90
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.H5usersign = void 0;
|
|
4
|
+
const client_1 = require("../../common/client");
|
|
5
|
+
class H5usersign extends client_1.default {
|
|
6
|
+
constructor(conf) {
|
|
7
|
+
super(conf);
|
|
8
|
+
}
|
|
9
|
+
// H5UserPresign 预申请签约
|
|
10
|
+
async H5UserPresign(req, cb) {
|
|
11
|
+
return this.request("post", "/api/sdk/v1/presign", req, { encryption: false }, cb);
|
|
12
|
+
}
|
|
13
|
+
// H5UserSign 申请签约
|
|
14
|
+
async H5UserSign(req, cb) {
|
|
15
|
+
return this.request("get", "/api/sdk/v1/sign/h5", req, { encryption: false }, cb);
|
|
16
|
+
}
|
|
17
|
+
// GetH5UserSignStatus 获取用户签约状态
|
|
18
|
+
async GetH5UserSignStatus(req, cb) {
|
|
19
|
+
return this.request("get", "/api/sdk/v1/sign/user/status", req, { encryption: false }, cb);
|
|
20
|
+
}
|
|
21
|
+
// H5UserRelease 用户解约(测试账号专用接口)
|
|
22
|
+
async H5UserRelease(req, cb) {
|
|
23
|
+
return this.request("post", "/api/sdk/v1/sign/release", req, { encryption: false }, cb);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.H5usersign = H5usersign;
|
|
@@ -0,0 +1,10 @@
|
|
|
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";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
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;
|
|
4
|
+
var utils_1 = require("../common/utils");
|
|
5
|
+
Object.defineProperty(exports, "Util", { enumerable: true, get: function () { return utils_1.Util; } });
|
|
6
|
+
var apiusersign_1 = require("./apiusersign");
|
|
7
|
+
Object.defineProperty(exports, "Apiusersign", { enumerable: true, get: function () { return apiusersign_1.Apiusersign; } });
|
|
8
|
+
var authentication_1 = require("./authentication");
|
|
9
|
+
Object.defineProperty(exports, "Authentication", { enumerable: true, get: function () { return authentication_1.Authentication; } });
|
|
10
|
+
var dataservice_1 = require("./dataservice");
|
|
11
|
+
Object.defineProperty(exports, "Dataservice", { enumerable: true, get: function () { return dataservice_1.Dataservice; } });
|
|
12
|
+
var h5usersign_1 = require("./h5usersign");
|
|
13
|
+
Object.defineProperty(exports, "H5usersign", { enumerable: true, get: function () { return h5usersign_1.H5usersign; } });
|
|
14
|
+
var invoice_1 = require("./invoice");
|
|
15
|
+
Object.defineProperty(exports, "Invoice", { enumerable: true, get: function () { return invoice_1.Invoice; } });
|
|
16
|
+
var payment_1 = require("./payment");
|
|
17
|
+
Object.defineProperty(exports, "Payment", { enumerable: true, get: function () { return payment_1.Payment; } });
|
|
18
|
+
var tax_1 = require("./tax");
|
|
19
|
+
Object.defineProperty(exports, "Tax", { enumerable: true, get: function () { return tax_1.Tax; } });
|
|
20
|
+
var bizlicxjjh5api_1 = require("./bizlicxjjh5api");
|
|
21
|
+
Object.defineProperty(exports, "Bizlicxjjh5api", { enumerable: true, get: function () { return bizlicxjjh5api_1.Bizlicxjjh5api; } });
|
|
22
|
+
var bizlicxjjh5_1 = require("./bizlicxjjh5");
|
|
23
|
+
Object.defineProperty(exports, "Bizlicxjjh5", { enumerable: true, get: function () { return bizlicxjjh5_1.Bizlicxjjh5; } });
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import YZHclient from "../../common/client";
|
|
2
|
+
/** GetInvoiceStatRequest 查询平台企业已开具和待开具发票金额请求 */
|
|
3
|
+
interface GetInvoiceStatRequest {
|
|
4
|
+
/** 综合服务主体 ID */
|
|
5
|
+
broker_id: string;
|
|
6
|
+
/** 平台企业 ID */
|
|
7
|
+
dealer_id: string;
|
|
8
|
+
/** 查询年份 */
|
|
9
|
+
year: number;
|
|
10
|
+
}
|
|
11
|
+
/** GetInvoiceStatResponse 查询平台企业已开具和待开具发票金额返回 */
|
|
12
|
+
interface GetInvoiceStatResponse {
|
|
13
|
+
/** 平台企业 ID */
|
|
14
|
+
dealer_id: string;
|
|
15
|
+
/** 综合服务主体 ID */
|
|
16
|
+
broker_id: string;
|
|
17
|
+
/** 已开具发票金额 */
|
|
18
|
+
invoiced: string;
|
|
19
|
+
/** 待开具发票金额 */
|
|
20
|
+
not_invoiced: string;
|
|
21
|
+
}
|
|
22
|
+
/** GetInvoiceAmountRequest 查询可开具发票额度和发票开具信息请求 */
|
|
23
|
+
interface GetInvoiceAmountRequest {
|
|
24
|
+
/** 综合服务主体 ID */
|
|
25
|
+
broker_id: string;
|
|
26
|
+
/** 平台企业 ID */
|
|
27
|
+
dealer_id: string;
|
|
28
|
+
}
|
|
29
|
+
/** GetInvoiceAmountResponse 查询可开具发票额度和发票开具信息返回 */
|
|
30
|
+
interface GetInvoiceAmountResponse {
|
|
31
|
+
/** 可开票额度 */
|
|
32
|
+
amount: string;
|
|
33
|
+
/** 系统支持的开户行及账号 */
|
|
34
|
+
bank_name_account: BankNameAccount[];
|
|
35
|
+
/** 系统支持的货物或应税劳务、服务名称 */
|
|
36
|
+
goods_services_name: GoodsServicesName[];
|
|
37
|
+
}
|
|
38
|
+
/** ApplyInvoiceRequest 发票开具申请请求 */
|
|
39
|
+
interface ApplyInvoiceRequest {
|
|
40
|
+
/** 发票申请编号 */
|
|
41
|
+
invoice_apply_id: string;
|
|
42
|
+
/** 综合服务主体 ID */
|
|
43
|
+
broker_id: string;
|
|
44
|
+
/** 平台企业 ID */
|
|
45
|
+
dealer_id: string;
|
|
46
|
+
/** 申请开票金额 */
|
|
47
|
+
amount: string;
|
|
48
|
+
/** 发票类型 */
|
|
49
|
+
invoice_type: string;
|
|
50
|
+
/** 开户行及账号 */
|
|
51
|
+
bank_name_account: string;
|
|
52
|
+
/** 货物或应税劳务、服务名称 */
|
|
53
|
+
goods_services_name: string;
|
|
54
|
+
/** 发票备注 */
|
|
55
|
+
remark: string;
|
|
56
|
+
}
|
|
57
|
+
/** ApplyInvoiceResponse 发票开具申请返回 */
|
|
58
|
+
interface ApplyInvoiceResponse {
|
|
59
|
+
/** 发票申请单 ID */
|
|
60
|
+
application_id: string;
|
|
61
|
+
/** 发票张数 */
|
|
62
|
+
count: string;
|
|
63
|
+
}
|
|
64
|
+
/** GetInvoiceStatusRequest 查询发票开具申请状态请求 */
|
|
65
|
+
interface GetInvoiceStatusRequest {
|
|
66
|
+
/** 发票申请编号 */
|
|
67
|
+
invoice_apply_id: string;
|
|
68
|
+
/** 发票申请单 ID */
|
|
69
|
+
application_id: string;
|
|
70
|
+
}
|
|
71
|
+
/** GetInvoiceStatusResponse 查询发票开具申请状态返回 */
|
|
72
|
+
interface GetInvoiceStatusResponse {
|
|
73
|
+
/** 申请结果 */
|
|
74
|
+
status: string;
|
|
75
|
+
/** 发票张数 */
|
|
76
|
+
count: string;
|
|
77
|
+
/** 价税合计 */
|
|
78
|
+
price_tax_amount: string;
|
|
79
|
+
/** 不含税金额 */
|
|
80
|
+
price_amount: string;
|
|
81
|
+
/** 税额 */
|
|
82
|
+
tax_amount: string;
|
|
83
|
+
/** 发票类型 */
|
|
84
|
+
invoice_type: string;
|
|
85
|
+
/** 购方名称 */
|
|
86
|
+
customer_name: string;
|
|
87
|
+
/** 纳税人识别号 */
|
|
88
|
+
customer_tax_num: string;
|
|
89
|
+
/** 购方地址、电话 */
|
|
90
|
+
customer_address_tel: string;
|
|
91
|
+
/** 开户行及账号 */
|
|
92
|
+
bank_name_account: string;
|
|
93
|
+
/** 货物或应税劳务、服务名称 */
|
|
94
|
+
goods_services_name: string;
|
|
95
|
+
/** 发票备注 */
|
|
96
|
+
remark: string;
|
|
97
|
+
/** 邮寄类型 */
|
|
98
|
+
post_type: string;
|
|
99
|
+
/** 快递单号 */
|
|
100
|
+
waybill_number: string[];
|
|
101
|
+
}
|
|
102
|
+
/** BankNameAccount 系统支持的开户行及账号 */
|
|
103
|
+
interface BankNameAccount {
|
|
104
|
+
/** 开户行及账号 */
|
|
105
|
+
item: string;
|
|
106
|
+
/** 是否为默认值 */
|
|
107
|
+
default: boolean;
|
|
108
|
+
}
|
|
109
|
+
/** GoodsServicesName 系统支持的货物或应税劳务、服务名称 */
|
|
110
|
+
interface GoodsServicesName {
|
|
111
|
+
/** 货物或应税劳务、服务名称 */
|
|
112
|
+
item: string;
|
|
113
|
+
/** 是否为默认值 */
|
|
114
|
+
default: boolean;
|
|
115
|
+
}
|
|
116
|
+
/** GetInvoiceFileRequest 下载 PDF 版发票请求 */
|
|
117
|
+
interface GetInvoiceFileRequest {
|
|
118
|
+
/** 发票申请编号 */
|
|
119
|
+
invoice_apply_id: string;
|
|
120
|
+
/** 发票申请单 ID */
|
|
121
|
+
application_id: string;
|
|
122
|
+
}
|
|
123
|
+
/** GetInvoiceFileResponse 下载 PDF 版发票返回 */
|
|
124
|
+
interface GetInvoiceFileResponse {
|
|
125
|
+
/** 下载地址 */
|
|
126
|
+
url: string;
|
|
127
|
+
/** 文件名称 */
|
|
128
|
+
name: string;
|
|
129
|
+
}
|
|
130
|
+
/** SendReminderEmailRequest 发送发票扫描件压缩包下载链接邮件请求 */
|
|
131
|
+
interface SendReminderEmailRequest {
|
|
132
|
+
/** 发票申请编号 */
|
|
133
|
+
invoice_apply_id: string;
|
|
134
|
+
/** 发票申请单 ID */
|
|
135
|
+
application_id: string;
|
|
136
|
+
}
|
|
137
|
+
/** SendReminderEmailResponse 发送发票扫描件压缩包下载链接邮件返回 */
|
|
138
|
+
interface SendReminderEmailResponse {
|
|
139
|
+
}
|
|
140
|
+
export declare class Invoice extends YZHclient {
|
|
141
|
+
constructor(conf: {
|
|
142
|
+
dealer_id: string;
|
|
143
|
+
broker_id: string;
|
|
144
|
+
app_key: string;
|
|
145
|
+
des3_key: string;
|
|
146
|
+
private_key: string;
|
|
147
|
+
yzh_public_key: string;
|
|
148
|
+
sign_type: "rsa" | "sha256";
|
|
149
|
+
base_url?: string;
|
|
150
|
+
});
|
|
151
|
+
GetInvoiceStat(req: GetInvoiceStatRequest, cb?: (error: null | string, rep: GetInvoiceStatResponse) => void): Promise<GetInvoiceStatResponse>;
|
|
152
|
+
GetInvoiceAmount(req: GetInvoiceAmountRequest, cb?: (error: null | string, rep: GetInvoiceAmountResponse) => void): Promise<GetInvoiceAmountResponse>;
|
|
153
|
+
ApplyInvoice(req: ApplyInvoiceRequest, cb?: (error: null | string, rep: ApplyInvoiceResponse) => void): Promise<ApplyInvoiceResponse>;
|
|
154
|
+
GetInvoiceStatus(req: GetInvoiceStatusRequest, cb?: (error: null | string, rep: GetInvoiceStatusResponse) => void): Promise<GetInvoiceStatusResponse>;
|
|
155
|
+
GetInvoiceFile(req: GetInvoiceFileRequest, cb?: (error: null | string, rep: GetInvoiceFileResponse) => void): Promise<GetInvoiceFileResponse>;
|
|
156
|
+
SendReminderEmail(req: SendReminderEmailRequest, cb?: (error: null | string, rep: SendReminderEmailResponse) => void): Promise<SendReminderEmailResponse>;
|
|
157
|
+
}
|
|
158
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Invoice = void 0;
|
|
4
|
+
const client_1 = require("../../common/client");
|
|
5
|
+
class Invoice extends client_1.default {
|
|
6
|
+
constructor(conf) {
|
|
7
|
+
super(conf);
|
|
8
|
+
}
|
|
9
|
+
// GetInvoiceStat 查询平台企业已开具和待开具发票金额
|
|
10
|
+
async GetInvoiceStat(req, cb) {
|
|
11
|
+
return this.request("get", "/api/payment/v1/invoice-stat", req, { encryption: false }, cb);
|
|
12
|
+
}
|
|
13
|
+
// GetInvoiceAmount 查询可开具发票额度和发票开具信息
|
|
14
|
+
async GetInvoiceAmount(req, cb) {
|
|
15
|
+
return this.request("post", "/api/invoice/v2/invoice-amount", req, { encryption: false }, cb);
|
|
16
|
+
}
|
|
17
|
+
// ApplyInvoice 发票开具申请
|
|
18
|
+
async ApplyInvoice(req, cb) {
|
|
19
|
+
return this.request("post", "/api/invoice/v2/apply", req, { encryption: false }, cb);
|
|
20
|
+
}
|
|
21
|
+
// GetInvoiceStatus 查询发票开具申请状态
|
|
22
|
+
async GetInvoiceStatus(req, cb) {
|
|
23
|
+
return this.request("post", "/api/invoice/v2/invoice/invoice-status", req, { encryption: false }, cb);
|
|
24
|
+
}
|
|
25
|
+
// GetInvoiceFile 下载 PDF 版发票
|
|
26
|
+
async GetInvoiceFile(req, cb) {
|
|
27
|
+
return this.request("post", "/api/invoice/v2/invoice/invoice-pdf", req, { encryption: false }, cb);
|
|
28
|
+
}
|
|
29
|
+
// SendReminderEmail 发送发票扫描件压缩包下载链接邮件
|
|
30
|
+
async SendReminderEmail(req, cb) {
|
|
31
|
+
return this.request("post", "/api/invoice/v2/invoice/reminder/email", req, { encryption: false }, cb);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.Invoice = Invoice;
|