@be-link/pos-cli-nodejs 0.0.128 → 0.0.129

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@be-link/pos-cli-nodejs",
3
- "version": "0.0.128",
3
+ "version": "0.0.129",
4
4
  "description": "正向订单服务Nodejs客户端",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,7 +1,10 @@
1
1
  import { Service } from './types';
2
2
  import BaseService from '../service';
3
+ import { IPositiveOrderInvoice } from '../../../types';
3
4
  declare class OrderCoreService extends BaseService implements Service.OrderCoreController {
4
5
  protected prefixUrl: string;
6
+ updateOrderInvoice(request: IPositiveOrderInvoice): Promise<string>;
7
+ orderCreateInvoice(request: Service.Request.createOrderInvoice): Promise<string>;
5
8
  onRefundTrigger(request: Service.Request.onRefundTrigger): Promise<void>;
6
9
  orderCreate(request: Service.Request.orderCreate): Promise<Service.Response.orderCreate>;
7
10
  thirdOrderInfoConfirmed(request: Service.Request.thirdOrderInfoConfirmed): Promise<void>;
@@ -10,6 +10,12 @@ class OrderCoreService extends service_1.default {
10
10
  super(...arguments);
11
11
  this.prefixUrl = '/core';
12
12
  }
13
+ updateOrderInvoice(request) {
14
+ return (0, http_1.callApi)(this.getApiUrl(this.updateOrderInvoice), request);
15
+ }
16
+ orderCreateInvoice(request) {
17
+ return (0, http_1.callApi)(this.getApiUrl(this.orderCreateInvoice), request);
18
+ }
13
19
  onRefundTrigger(request) {
14
20
  return (0, http_1.callApi)(this.getApiUrl(this.onRefundTrigger), request);
15
21
  }
@@ -1,6 +1,36 @@
1
1
  import * as PosConstants from 'vitality-meta/enums/pos';
2
+ import * as DTO from '../../../types';
2
3
  export declare namespace Service {
3
4
  namespace Request {
5
+ interface createOrderInvoice {
6
+ /** 快照:订单ID */
7
+ tradeOrderId: string;
8
+ /** 开票类型 */
9
+ invoiceType: string;
10
+ /** 发票抬头 */
11
+ invoiceHeader: string;
12
+ /** 发票抬头类型 */
13
+ invoiceHeaderType: string;
14
+ /** 税号 */
15
+ taxNumber: string;
16
+ /** address */
17
+ address: string;
18
+ /** 注册电话 */
19
+ mobile: string;
20
+ /** 开户银行 */
21
+ bankBase: string;
22
+ /** 银行账号 */
23
+ bankAccount: string;
24
+ /** 收货地址 */
25
+ receivingExtraInfo?: {
26
+ /** 收货地址 */
27
+ receivingAddress?: string;
28
+ /** 收件人 */
29
+ receivingName?: string;
30
+ /** 收件电话 */
31
+ receivingMobile?: string;
32
+ };
33
+ }
4
34
  interface orderCreate {
5
35
  /** 基础信息 */
6
36
  basicInfo: {
@@ -183,6 +213,16 @@ export declare namespace Service {
183
213
  }
184
214
  }
185
215
  interface OrderCoreController {
216
+ /**
217
+ * 订单发票修改
218
+ * @path /core/update-order-invoice
219
+ */
220
+ updateOrderInvoice(request: DTO.IPositiveOrderInvoice): Promise<string>;
221
+ /**
222
+ * 订单发票创建
223
+ * @path /core/order-create-invoice
224
+ */
225
+ orderCreateInvoice(request: Request.createOrderInvoice): Promise<string>;
186
226
  /**
187
227
  * 订单创建
188
228
  * @path /core/order-create
@@ -664,6 +664,18 @@ export declare namespace Service {
664
664
  }
665
665
  /** 用户维度查询 */
666
666
  interface QueryByUserController {
667
+ /**
668
+ * list开票记录
669
+ * @returns 开票记录
670
+ * @path /query/user/list-order-invoice
671
+ */
672
+ listOrderInvoice(request: Request.getOrderInvoiceRequest): Promise<DTO.IPositiveOrderInvoice[]>;
673
+ /**
674
+ * 根据订单id查询开票记录
675
+ * @returns 开票记录
676
+ * @path /query/user/get-order-invoice-by-order-id
677
+ */
678
+ getOrderInvoiceByOrderId(orderId: string): Promise<DTO.IPositiveOrderInvoice>;
667
679
  /**
668
680
  * 根据订单id查询订单
669
681
  * @path /query/user/get-order-by-id
@@ -3,6 +3,8 @@ import { Service } from './types';
3
3
  import * as DTO from '../../../types';
4
4
  declare class QueryByUserService extends BaseService implements Service.QueryByUserController {
5
5
  protected prefixUrl: string;
6
+ listOrderInvoice(request: Service.Request.getOrderInvoiceRequest): Promise<DTO.IPositiveOrderInvoice[]>;
7
+ getOrderInvoiceByOrderId(orderId: string): Promise<DTO.IPositiveOrderInvoice>;
6
8
  getOrderById<K extends (keyof DTO.QueryDataBlockTypeMap)[]>(request: Service.Request.getOrderById<K>): Promise<DTO.QueryDataRes<K>>;
7
9
  queryOrderByIdList<K extends (keyof DTO.QueryDataBlockTypeMap)[]>(request: Service.Request.queryOrderByIdList<K>): Promise<DTO.QueryDataRes<K>[]>;
8
10
  queryUserOrder<K extends (keyof DTO.QueryDataBlockTypeMap)[]>(request: Service.Request.queryUserOrder<K>): Promise<DTO.QueryDataRes<K>[]>;
@@ -10,6 +10,12 @@ class QueryByUserService extends service_1.default {
10
10
  super(...arguments);
11
11
  this.prefixUrl = '/query/user';
12
12
  }
13
+ listOrderInvoice(request) {
14
+ return (0, http_1.callApi)(this.getApiUrl(this.listOrderInvoice), request);
15
+ }
16
+ getOrderInvoiceByOrderId(orderId) {
17
+ return (0, http_1.callApi)(this.getApiUrl(this.getOrderInvoiceByOrderId), orderId);
18
+ }
13
19
  getOrderById(request) {
14
20
  return (0, http_1.callApi)(this.getApiUrl(this.getOrderById), request);
15
21
  }
package/types.d.ts CHANGED
@@ -864,6 +864,10 @@ export interface IPositiveOrderInvoice {
864
864
  bankBase: string;
865
865
  /** 银行账号 */
866
866
  bankAccount: string;
867
+ /** url */
868
+ url: string;
869
+ /** 开票方 */
870
+ invoiceBase: string;
867
871
  /** 收货地址 */
868
872
  receivingExtraInfo?: {
869
873
  /** 收货地址 */