import { InvoiceConfig, Order, OrderDiscount, OrderInvoice, OrderItem, OrderPayment, RefundPayload, UploadInvoice, UploadVoidInvoice, WebestOptions } from '../../models'; import { InvoiceCarrierType, InvoiceProvider, PaymentType } from '../../enums'; export interface ApplyInvoiceNumberRequest { invoiceProvider?: InvoiceProvider; storeId: string; clientId: string; officeId: string; apiKey?: string; } export interface TakeInvoiceNumberRequest { invoiceProvider?: InvoiceProvider; storeId: string; clientId: string; officeId: string; applyId: string; apiKey?: string; webestOptions?: WebestOptions; } export interface QueryOfficeInfoRequest { invoiceProvider?: InvoiceProvider; storeId: string; clientId: string; officeId: string; apiKey?: string; webestOptions?: WebestOptions; } /** * @deprecated * InvoiceProvider.mirle 無此API */ export interface QueryLoveCodeRequest { invoiceProvider?: InvoiceProvider; storeId: string; clientId: string; officeId: string; apiKey?: string; } export interface UploadInvoiceRequest { storeId: string; orderId: string; receiptIssuedAt: number; totalAmount: number; items: OrderItem[]; discount?: OrderDiscount; paymentType: PaymentType; invoiceConfig: InvoiceConfig; invoice: Partial; salesAmountExcludeTax: number; exemptTaxSalesAmount: number; zeroTaxSalesAmount: number; taxAmount: number; /** * 通關方式:1=非經海關出口, 2=經海關出口 * 若為零稅發票,必填 */ customsClearanceMark?: string; /** * 參照加值型及非加值型營業稅法第 7 條: * 71:第一款 外銷貨物 * 72:第二款 與外銷有關之勞務,或在國內提供而在國外使用之勞務 * 73:第三款 依法設立之免稅商店銷售與過境或出境旅客之貨物 * 74:第四款 銷售與保稅區營業人供營運之貨物或勞務 * 75:第五款 國際間之運輸。但外國運輸事業在中華民國境內經營國際運輸業務者,應以各該國對中華民國國際運輸事業予以相等待遇或免徵類似稅捐者為限 * 76:第六款 國際運輸用之船舶、航空器及遠洋漁船 * 77:第七款 銷售與國際運輸用之船舶、航空器及遠洋漁船所使用之貨物或修繕勞務 * 78:第八款 保稅區營業人銷售與課稅區營業人未輸往課稅區而直接出口之貨物 * 79:第九款 保稅區營業人銷售與課稅區營業人 * 若為零稅發票,必填。 */ zeroTaxRateReason?: string; } export interface UploadVoidInvoiceRequest { storeId: string; officeId: string; invoice: Partial; receiptVoidedAt: number; invoiceProvider?: InvoiceProvider; clientId?: string; apiKey?: string; webestOptions?: WebestOptions; } export interface UploadInvoiceByStoreIdRequest { storeId: string; invoiceNumber: string; } export interface UploadVoidInvoiceByStoreIdRequest { storeId: string; invoiceNumber: string; } export interface GetInvoiceConfigRequest { storeId: string; } export interface CreateOrderRequest { storeId: string; item: Order; } export interface BuyerInvoicePreference { buyerId: string | null; loveCode: string | null; carrierId: string | null; carrierType: InvoiceCarrierType; } export interface AttachPaymentRequest { storeId: string; orderId: string; /** 由kiosk開立發票 */ uploadInvoice?: UploadInvoice; item: OrderPayment; /** 櫃檯、自助結帳機結帳 */ unpaid?: boolean; /** 發票由POS開立時,消費者選擇的統編、捐贈碼或載具偏好 */ buyerInvoicePreference?: BuyerInvoicePreference; } export interface RegisterIssueInvoiceRequest { storeId: string; orderId: string; item: OrderInvoice; } export interface VoidOrderRequest { storeId: string; orderId: string; uploadVoidInvoice?: UploadVoidInvoice; item: RefundPayload; }