@yunzhanghu/sdk-nodejs 1.0.28 → 1.0.29

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 CHANGED
@@ -68,9 +68,7 @@ OpenSSL-> rsa -in private_key.pem -pubout -out pubkey.pem
68
68
  - [H5 签约](./example/h5UserSign.js)
69
69
  - [API 签约](./example/apiUserSign.js)
70
70
  - [签约信息上传](./example/uploadusersign.js)
71
- - 个体工商户注册
72
- - [云账户新经济 H5](./example/bizlicXjjH5.js)
73
- - [云账户新经济 H5+API](./example/bizlicXjjH5Api.js)
71
+ - [订单税费试算](./example/calculatelabor.js)
74
72
  - [实时支付](./example/payment.js)
75
73
  - [异步通知](./example/notify.js)
76
74
  - [对账文件获取](./example/dataService.js)
@@ -239,6 +239,7 @@ authentication
239
239
  notify_url: 'https://www.example.com',
240
240
  ref: 'test019011901',
241
241
  resident_type:"1",
242
+ permit_card:"H12345678",
242
243
  })
243
244
  .then((data) => {
244
245
  if (data.code === '0000') {
@@ -44,6 +44,8 @@ invoice
44
44
  request_id: 'requestIdExample123456789',
45
45
  dealer_id: config.dealer_id,
46
46
  broker_id: config.broker_id,
47
+ start_date: '2026-01-01',
48
+ end_date: '2026-01-26',
47
49
  })
48
50
  .then((data) => {
49
51
  if (data.code === '0000') {
@@ -79,6 +81,8 @@ invoice
79
81
  remark: '',
80
82
  receive_emails: ['username1@example.com'],
81
83
  invoice_media: '1',
84
+ start_date: '2026-01-01',
85
+ end_date: '2026-01-26',
82
86
  })
83
87
  .then((data) => {
84
88
  if (data.code === '0000') {
@@ -86,3 +86,33 @@ taxClearRefundClient
86
86
  // 发生异常
87
87
  console.log(err.toString())
88
88
  })
89
+
90
+ // 查询税费退补涉及劳动者
91
+ taxClearRefundClient
92
+ .GetRefundTaxLaborInfo({
93
+
94
+ /**
95
+ * @param {string} request-id:请求 ID,请求的唯一标识
96
+ * 建议平台企业自定义 request-id,并记录在日志中,便于问题发现及排查
97
+ * 如未自定义 request-id,将使用 SDK 中的 UUID 方法自动生成。注意:UUID 方法生成的 request-id 不能保证全局唯一,推荐自定义 request-id
98
+ */
99
+ broker_id: config.broker_id,
100
+ dealer_id: config.dealer_id,
101
+ tax_month: '2025-10',
102
+ batch_id: '10313232135454132',
103
+ offset: 0,
104
+ length: 500,
105
+ })
106
+ .then((data) => {
107
+ if (data.code === '0000') {
108
+ // 操作成功
109
+ console.log('操作成功 ', data.data)
110
+ } else {
111
+ // 失败返回
112
+ console.log('失败返回 ', 'code:' + data.code + ' message:' + data.message + ' request_id:' + data.request_id)
113
+ }
114
+ })
115
+ .catch((err) => {
116
+ // 发生异常
117
+ console.log(err.toString())
118
+ })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yunzhanghu/sdk-nodejs",
3
- "version": "1.0.28",
3
+ "version": "1.0.29",
4
4
  "description": "云账户 SDK for Node.js",
5
5
  "main": "yzh/index.js",
6
6
  "scripts": {
@@ -106,6 +106,8 @@ interface UserExemptedInfoRequest {
106
106
  image_urls: string[];
107
107
  /** 外籍人员类型 */
108
108
  resident_type: string;
109
+ /** 港澳台通行证号码 */
110
+ permit_card: string;
109
111
  }
110
112
 
111
113
  /** UserExemptedInfoResponse 上传非居民身份证验证名单信息返回 */
@@ -30,6 +30,10 @@ interface GetInvoiceAmountRequest {
30
30
  broker_id: string;
31
31
  /** 平台企业 ID */
32
32
  dealer_id: string;
33
+ /** 查询开始日期 */
34
+ start_date: string;
35
+ /** 查询结束日期 */
36
+ end_date: string;
33
37
  }
34
38
 
35
39
  /** GetInvoiceAmountResponse 查询可开具发票额度和发票开具信息返回 */
@@ -64,6 +68,10 @@ interface ApplyInvoiceRequest {
64
68
  receive_emails: string[];
65
69
  /** 发票介质 */
66
70
  invoice_media: string;
71
+ /** 查询开始日期 */
72
+ start_date: string;
73
+ /** 查询结束日期 */
74
+ end_date: string;
67
75
  }
68
76
 
69
77
  /** ApplyInvoiceResponse 发票开具申请返回 */
@@ -132,6 +132,58 @@ interface GetRefundTaxInfoRequest {
132
132
  batch_id: string;
133
133
  }
134
134
 
135
+ /** GetRefundTaxLaborInfoRequest 查询税费退补涉及劳动者请求 */
136
+ interface GetRefundTaxLaborInfoRequest {
137
+ /** 综合服务主体 ID */
138
+ broker_id: string;
139
+ /** 平台企业 ID */
140
+ dealer_id: string;
141
+ /** 批次号 */
142
+ batch_id: string;
143
+ /** 税款所属期 */
144
+ tax_month: string;
145
+ /** 偏移量 */
146
+ offset: number;
147
+ /** 每页返回条数 */
148
+ length: number;
149
+ }
150
+
151
+ /** GetRefundTaxLaborInfoResponse 查询税费退补涉及劳动者返回 */
152
+ interface GetRefundTaxLaborInfoResponse {
153
+ /** 税款所属期 */
154
+ tax_month: string;
155
+ /** 批次号 */
156
+ batch_id: string;
157
+ /** 批次生成时间 */
158
+ batch_create_time: string;
159
+ /** 退补税劳动者数量 */
160
+ labor_num: string;
161
+ /** 退补税订单数量 */
162
+ order_num: string;
163
+ /** 总数据条数 */
164
+ total_num: string;
165
+ /** 退补税劳动者明细 */
166
+ labor_refund_info: LaborRefundInfo[];
167
+ }
168
+
169
+ /** LaborRefundInfo 退补税劳动者明细 */
170
+ interface LaborRefundInfo {
171
+ /** 劳动者姓名 */
172
+ real_name: string;
173
+ /** 劳动者证件号 */
174
+ id_card: string;
175
+ /** 本批次退补给劳动者税费总额 */
176
+ refund_tax: string;
177
+ /** 退补税状态 */
178
+ tax_refund_status: string;
179
+ /** 劳动者收款账户 */
180
+ receiving_account: string;
181
+ /** 劳动者收款账号 */
182
+ receiving_channel: string;
183
+ /** 退补税费时间 */
184
+ refund_tax_finished_time: string;
185
+ }
186
+
135
187
  export class TaxClearRefundClient extends YZHclient {
136
188
  // eslint-disable-next-line no-useless-constructor
137
189
  constructor(conf: {
@@ -190,4 +242,18 @@ export class TaxClearRefundClient extends YZHclient {
190
242
  );
191
243
  }
192
244
 
245
+ // GetRefundTaxLaborInfo 查询税费退补涉及劳动者
246
+ async GetRefundTaxLaborInfo(
247
+ req: GetRefundTaxLaborInfoRequest,
248
+ cb?: (error: null | string,rep: GetRefundTaxLaborInfoResponse)=>void
249
+ ): Promise<GetRefundTaxLaborInfoResponse> {
250
+ return this.request(
251
+ 'get',
252
+ '/api/payment/v1/query-clear-labor-info',
253
+ req,
254
+ {encryption: false },
255
+ cb
256
+ );
257
+ }
258
+
193
259
  }
@@ -105,6 +105,8 @@ interface UserExemptedInfoRequest {
105
105
  image_urls: string[];
106
106
  /** 外籍人员类型 */
107
107
  resident_type: string;
108
+ /** 港澳台通行证号码 */
109
+ permit_card: string;
108
110
  }
109
111
 
110
112
  /** UserExemptedInfoResponse 上传非居民身份证验证名单信息返回 */
@@ -29,6 +29,10 @@ interface GetInvoiceAmountRequest {
29
29
  broker_id: string;
30
30
  /** 平台企业 ID */
31
31
  dealer_id: string;
32
+ /** 查询开始日期 */
33
+ start_date: string;
34
+ /** 查询结束日期 */
35
+ end_date: string;
32
36
  }
33
37
 
34
38
  /** GetInvoiceAmountResponse 查询可开具发票额度和发票开具信息返回 */
@@ -63,6 +67,10 @@ interface ApplyInvoiceRequest {
63
67
  receive_emails: string[];
64
68
  /** 发票介质 */
65
69
  invoice_media: string;
70
+ /** 查询开始日期 */
71
+ start_date: string;
72
+ /** 查询结束日期 */
73
+ end_date: string;
66
74
  }
67
75
 
68
76
  /** ApplyInvoiceResponse 发票开具申请返回 */
@@ -131,6 +131,58 @@ interface GetRefundTaxInfoRequest {
131
131
  batch_id: string;
132
132
  }
133
133
 
134
+ /** GetRefundTaxLaborInfoRequest 查询税费退补涉及劳动者请求 */
135
+ interface GetRefundTaxLaborInfoRequest {
136
+ /** 综合服务主体 ID */
137
+ broker_id: string;
138
+ /** 平台企业 ID */
139
+ dealer_id: string;
140
+ /** 批次号 */
141
+ batch_id: string;
142
+ /** 税款所属期 */
143
+ tax_month: string;
144
+ /** 偏移量 */
145
+ offset: number;
146
+ /** 每页返回条数 */
147
+ length: number;
148
+ }
149
+
150
+ /** GetRefundTaxLaborInfoResponse 查询税费退补涉及劳动者返回 */
151
+ interface GetRefundTaxLaborInfoResponse {
152
+ /** 税款所属期 */
153
+ tax_month: string;
154
+ /** 批次号 */
155
+ batch_id: string;
156
+ /** 批次生成时间 */
157
+ batch_create_time: string;
158
+ /** 退补税劳动者数量 */
159
+ labor_num: string;
160
+ /** 退补税订单数量 */
161
+ order_num: string;
162
+ /** 总数据条数 */
163
+ total_num: string;
164
+ /** 退补税劳动者明细 */
165
+ labor_refund_info: LaborRefundInfo[];
166
+ }
167
+
168
+ /** LaborRefundInfo 退补税劳动者明细 */
169
+ interface LaborRefundInfo {
170
+ /** 劳动者姓名 */
171
+ real_name: string;
172
+ /** 劳动者证件号 */
173
+ id_card: string;
174
+ /** 本批次退补给劳动者税费总额 */
175
+ refund_tax: string;
176
+ /** 退补税状态 */
177
+ tax_refund_status: string;
178
+ /** 劳动者收款账户 */
179
+ receiving_account: string;
180
+ /** 劳动者收款账号 */
181
+ receiving_channel: string;
182
+ /** 退补税费时间 */
183
+ refund_tax_finished_time: string;
184
+ }
185
+
134
186
  export declare class TaxClearRefundClient extends YZHclient {
135
187
  constructor(conf: {
136
188
  dealer_id: string;
@@ -155,6 +207,10 @@ export declare class TaxClearRefundClient extends YZHclient {
155
207
  req: GetRefundTaxInfoRequest,
156
208
  cb?: (error: null | string, rep: RefundTaxData) => void
157
209
  ): Promise<RefundTaxData>;
210
+ GetRefundTaxLaborInfo(
211
+ req: GetRefundTaxLaborInfoRequest,
212
+ cb?: (error: null | string, rep: GetRefundTaxLaborInfoResponse) => void
213
+ ): Promise<GetRefundTaxLaborInfoResponse>;
158
214
  }
159
215
 
160
216
  export {};
@@ -37,5 +37,15 @@ class TaxClearRefundClient extends client_1.default {
37
37
  cb
38
38
  );
39
39
  }
40
+ // GetRefundTaxLaborInfo 查询税费退补涉及劳动者
41
+ async GetRefundTaxLaborInfo(req, cb) {
42
+ return this.request(
43
+ 'get',
44
+ '/api/payment/v1/query-clear-labor-info',
45
+ req,
46
+ { encryption: (req === null || req === void 0 ? void 0 : req.data_type) === 'encryption' },
47
+ cb
48
+ );
49
+ }
40
50
  }
41
51
  exports.TaxClearRefundClient = TaxClearRefundClient;