@dodobrands/pos-receipts-plugin-contracts 5.15.2 → 5.16.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/CHANGELOG.md +4 -0
- package/README.en.md +2 -0
- package/README.md +2 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +10 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 5.16.0
|
|
4
|
+
|
|
5
|
+
Added `FiscalStage` enum (`FullSettlementWithPayment` / `Advance` / `FullSettlementAfterAdvance`) and optional `fiscalStage` on `HandleSaleRequestClear` (and `FiscalStage` on `Receipt`) to expose the sale's fiscal stage to plugins.
|
|
6
|
+
|
|
3
7
|
## 5.12.6
|
|
4
8
|
|
|
5
9
|
Added product GTIN for Kazakhstan
|
package/README.en.md
CHANGED
|
@@ -28,6 +28,8 @@ Start by exploring [`src/ICashRegister.ts`](./src/ICashRegister.ts).
|
|
|
28
28
|
|
|
29
29
|
The `Receipt` type contains complete information about the order, customer, taxes, organization, and country-specific marking data (Russia, Belarus, Uzbekistan, Kazakhstan).
|
|
30
30
|
|
|
31
|
+
`HandleSaleRequest` carries an optional `fiscalStage` field (`FiscalStage`: `FullSettlementWithPayment` | `Advance` | `FullSettlementAfterAdvance`) — the fiscal stage of the sale, taken from the GetCheck data.
|
|
32
|
+
|
|
31
33
|
---
|
|
32
34
|
|
|
33
35
|
## Related Packages
|
package/README.md
CHANGED
|
@@ -28,6 +28,8 @@ export interface ICashRegister {
|
|
|
28
28
|
|
|
29
29
|
Тип `Receipt` содержит полную информацию о заказе, покупателе, налогах, организации и страно-специфичных данных маркировки (Россия, Беларусь, Узбекистан, Казахстан).
|
|
30
30
|
|
|
31
|
+
`HandleSaleRequest` содержит опциональное поле `fiscalStage` (`FiscalStage`: `FullSettlementWithPayment` \| `Advance` \| `FullSettlementAfterAdvance`) — стадия фискализации продажи, берётся из данных GetCheck.
|
|
32
|
+
|
|
31
33
|
---
|
|
32
34
|
|
|
33
35
|
## Смежные пакеты
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var r=Object.defineProperty;var
|
|
1
|
+
"use strict";var r=Object.defineProperty;var A=Object.getOwnPropertyDescriptor;var N=Object.getOwnPropertyNames;var b=Object.prototype.hasOwnProperty;var u=(t,i)=>{for(var o in i)r(t,o,{get:i[o],enumerable:!0})},B=(t,i,o,n)=>{if(i&&typeof i=="object"||typeof i=="function")for(let a of N(i))!b.call(t,a)&&a!==o&&r(t,a,{get:()=>i[a],enumerable:!(n=A(i,a))||n.enumerable});return t};var d=t=>B(r({},"__esModule",{value:!0}),t);var P={};u(P,{Business:()=>e,CertificateType:()=>s,DigitalReceiptNotificationPreference:()=>g,FiscalStage:()=>k,KnownCountryCodes:()=>l,OrderSource:()=>z,OrderType:()=>p,OwnerType:()=>f,PaymentMode:()=>m,PaymentSource:()=>v,PaymentStatus:()=>x,PaymentType:()=>R,RefundSource:()=>h});module.exports=d(P);var e=(t=>(t.DodoPizza="dodopizza",t.Drinkit="drinkit",t))(e||{}),l=(t=>(t[t.Belarus=112]="Belarus",t[t.Kazakhstan=398]="Kazakhstan",t[t.Russia=643]="Russia",t[t.Uzbekistan=860]="Uzbekistan",t[t.Kyrgyzstan=417]="Kyrgyzstan",t))(l||{}),f=(t=>(t[t.Resail=0]="Resail",t[t.OwnProduction=1]="OwnProduction",t[t.Service=2]="Service",t))(f||{}),m=(t=>(t.Card="Card",t.QR="QR",t))(m||{}),v=(t=>(t[t.RestaurantCashier=0]="RestaurantCashier",t[t.Kiosk=1]="Kiosk",t))(v||{}),x=(t=>(t.NotFound="NotFound",t.PaymentPending="PaymentPending",t.PaymentCompleted="PaymentCompleted",t.RefundPending="RefundPending",t.RefundCompleted="RefundCompleted",t.NotNeeded="NotNeeded",t))(x||{}),h=(t=>(t.RestaurantCashier="RestaurantCashier",t.RefundJob="RefundJob",t.Kiosk="Kiosk",t))(h||{}),k=(t=>(t[t.FullSettlementWithPayment=0]="FullSettlementWithPayment",t[t.Advance=1]="Advance",t[t.FullSettlementAfterAdvance=2]="FullSettlementAfterAdvance",t))(k||{}),s=(t=>(t[t.B2B=1]="B2B",t))(s||{}),p=(t=>(t[t.Delivery=1]="Delivery",t[t.Pickup=2]="Pickup",t[t.Stationary=3]="Stationary",t[t.PersonalFood=4]="PersonalFood",t[t.ShopWindowSupply=5]="ShopWindowSupply",t))(p||{}),z=(t=>(t[t.Telephone=0]="Telephone",t[t.Site=1]="Site",t[t.Restaurant=2]="Restaurant",t[t.DefectOrder=3]="DefectOrder",t[t.Mobile=4]="Mobile",t[t.Pizzeria=5]="Pizzeria",t[t.Aggregator=6]="Aggregator",t[t.Kiosk=7]="Kiosk",t))(z||{}),R=(t=>(t[t.Cash=0]="Cash",t[t.BankCard=1]="BankCard",t[t.InternetAcquiring=2]="InternetAcquiring",t[t.Aggregator=3]="Aggregator",t))(R||{});var g=(a=>(a.NotSpecified="NotSpecified",a.None="None",a.Email="Email",a.PhoneSms="PhoneSms",a))(g||{});0&&(module.exports={Business,CertificateType,DigitalReceiptNotificationPreference,FiscalStage,KnownCountryCodes,OrderSource,OrderType,OwnerType,PaymentMode,PaymentSource,PaymentStatus,PaymentType,RefundSource});
|
package/dist/index.d.cts
CHANGED
|
@@ -296,6 +296,12 @@ declare enum RefundSource {
|
|
|
296
296
|
Kiosk = "Kiosk"
|
|
297
297
|
}
|
|
298
298
|
|
|
299
|
+
declare enum FiscalStage {
|
|
300
|
+
FullSettlementWithPayment = 0,
|
|
301
|
+
Advance = 1,
|
|
302
|
+
FullSettlementAfterAdvance = 2
|
|
303
|
+
}
|
|
304
|
+
|
|
299
305
|
interface Taxpayer {
|
|
300
306
|
/** A tax identification number. It is used for value added tax purposes.
|
|
301
307
|
* The formal name may differ from country to country: It could be NIP for Poland, INN for Russia, or VAT number.
|
|
@@ -330,6 +336,7 @@ interface Receipt {
|
|
|
330
336
|
Image?: Image;
|
|
331
337
|
/** Information about the certificate used for the purchase. */
|
|
332
338
|
CertificateInfo?: CertificateInfo;
|
|
339
|
+
FiscalStage: FiscalStage;
|
|
333
340
|
/** @internal */
|
|
334
341
|
IdempotencyKey: string;
|
|
335
342
|
}
|
|
@@ -623,6 +630,8 @@ interface HandleSaleRequestClear {
|
|
|
623
630
|
printParams: PrintParams;
|
|
624
631
|
/** Optional payment context — provider, status and source at the time of printing. */
|
|
625
632
|
paymentInfo?: ReceiptPaymentInfo;
|
|
633
|
+
/** Optional fiscal stage of the sale (prepayment vs full settlement). */
|
|
634
|
+
fiscalStage?: FiscalStage;
|
|
626
635
|
}
|
|
627
636
|
|
|
628
637
|
interface InitializationOptions {
|
|
@@ -747,4 +756,4 @@ declare enum DigitalReceiptNotificationPreference {
|
|
|
747
756
|
PhoneSms = "PhoneSms"
|
|
748
757
|
}
|
|
749
758
|
|
|
750
|
-
export { type AddedIngredient, Business, type CardInfo, type CardPaymentResult, type CardRefundResult, type CashRegister, type CashRegisterSettings, type Cashier, type CertificateInfo, CertificateType, type Country, type CountryIsoCode, type CreateScopeOptions, type Customer, type DepositCashOptions, DigitalReceiptNotificationPreference, type DigitalReceiptView, type DigitalReceiptViewType, type ErrorMessageMetadataWith, type Fields, type FiscalizationPayload, type HTMLContentData, type HTMLContentType, type HandleRefundRequest, type HandleRefundRequestClear, type HandleSaleRequest, type HandleSaleRequestClear, type ICashRegister, type IDigitalReceipt, type ILogger, type Image, type InitializationOptions, type KazakhstanProductData, KnownCountryCodes, type KyrgyzstanProductData, type Loyalty, type MakeZReportOptions, type MarkingCodes, type Message, type MessageMetadata, type MessageMetadataWith, type MessageWith, type Money, type OperationIdentifiers, type Order, type OrderPaymentResult, type OrderPrice, type OrderRefundResult, OrderSource, OrderType, type Organization, OwnerType, type PaymentInfo, PaymentMode, type PaymentProvider, type PaymentResult, PaymentSource, PaymentStatus, PaymentType, type PreviousReceipt, type PrintParams, type PrintTextOptions, type PrintedFiscalReceipt, type PrintedNonFiscalReceipt, type PrintedReceipt, type PrintedRefundReceipt, type Product, type ProductPrice, type ProductSpecificData, type QRData, type QRIdData, type QRIdType, type QrPaymentResult, type QrRefundResult, type Receipt, type ReceiptPaymentInfo, type ReceiptRefundInfo, type RefundInfo, type RefundResult, RefundSource, type RussiaProductData, type SlipData, type SlipType, type Store, type Tax, type Taxpayer, type TextSlipData, type TextSlipType, type UzbekistanProductData, type WithdrawCashOptions };
|
|
759
|
+
export { type AddedIngredient, Business, type CardInfo, type CardPaymentResult, type CardRefundResult, type CashRegister, type CashRegisterSettings, type Cashier, type CertificateInfo, CertificateType, type Country, type CountryIsoCode, type CreateScopeOptions, type Customer, type DepositCashOptions, DigitalReceiptNotificationPreference, type DigitalReceiptView, type DigitalReceiptViewType, type ErrorMessageMetadataWith, type Fields, FiscalStage, type FiscalizationPayload, type HTMLContentData, type HTMLContentType, type HandleRefundRequest, type HandleRefundRequestClear, type HandleSaleRequest, type HandleSaleRequestClear, type ICashRegister, type IDigitalReceipt, type ILogger, type Image, type InitializationOptions, type KazakhstanProductData, KnownCountryCodes, type KyrgyzstanProductData, type Loyalty, type MakeZReportOptions, type MarkingCodes, type Message, type MessageMetadata, type MessageMetadataWith, type MessageWith, type Money, type OperationIdentifiers, type Order, type OrderPaymentResult, type OrderPrice, type OrderRefundResult, OrderSource, OrderType, type Organization, OwnerType, type PaymentInfo, PaymentMode, type PaymentProvider, type PaymentResult, PaymentSource, PaymentStatus, PaymentType, type PreviousReceipt, type PrintParams, type PrintTextOptions, type PrintedFiscalReceipt, type PrintedNonFiscalReceipt, type PrintedReceipt, type PrintedRefundReceipt, type Product, type ProductPrice, type ProductSpecificData, type QRData, type QRIdData, type QRIdType, type QrPaymentResult, type QrRefundResult, type Receipt, type ReceiptPaymentInfo, type ReceiptRefundInfo, type RefundInfo, type RefundResult, RefundSource, type RussiaProductData, type SlipData, type SlipType, type Store, type Tax, type Taxpayer, type TextSlipData, type TextSlipType, type UzbekistanProductData, type WithdrawCashOptions };
|
package/dist/index.d.ts
CHANGED
|
@@ -296,6 +296,12 @@ declare enum RefundSource {
|
|
|
296
296
|
Kiosk = "Kiosk"
|
|
297
297
|
}
|
|
298
298
|
|
|
299
|
+
declare enum FiscalStage {
|
|
300
|
+
FullSettlementWithPayment = 0,
|
|
301
|
+
Advance = 1,
|
|
302
|
+
FullSettlementAfterAdvance = 2
|
|
303
|
+
}
|
|
304
|
+
|
|
299
305
|
interface Taxpayer {
|
|
300
306
|
/** A tax identification number. It is used for value added tax purposes.
|
|
301
307
|
* The formal name may differ from country to country: It could be NIP for Poland, INN for Russia, or VAT number.
|
|
@@ -330,6 +336,7 @@ interface Receipt {
|
|
|
330
336
|
Image?: Image;
|
|
331
337
|
/** Information about the certificate used for the purchase. */
|
|
332
338
|
CertificateInfo?: CertificateInfo;
|
|
339
|
+
FiscalStage: FiscalStage;
|
|
333
340
|
/** @internal */
|
|
334
341
|
IdempotencyKey: string;
|
|
335
342
|
}
|
|
@@ -623,6 +630,8 @@ interface HandleSaleRequestClear {
|
|
|
623
630
|
printParams: PrintParams;
|
|
624
631
|
/** Optional payment context — provider, status and source at the time of printing. */
|
|
625
632
|
paymentInfo?: ReceiptPaymentInfo;
|
|
633
|
+
/** Optional fiscal stage of the sale (prepayment vs full settlement). */
|
|
634
|
+
fiscalStage?: FiscalStage;
|
|
626
635
|
}
|
|
627
636
|
|
|
628
637
|
interface InitializationOptions {
|
|
@@ -747,4 +756,4 @@ declare enum DigitalReceiptNotificationPreference {
|
|
|
747
756
|
PhoneSms = "PhoneSms"
|
|
748
757
|
}
|
|
749
758
|
|
|
750
|
-
export { type AddedIngredient, Business, type CardInfo, type CardPaymentResult, type CardRefundResult, type CashRegister, type CashRegisterSettings, type Cashier, type CertificateInfo, CertificateType, type Country, type CountryIsoCode, type CreateScopeOptions, type Customer, type DepositCashOptions, DigitalReceiptNotificationPreference, type DigitalReceiptView, type DigitalReceiptViewType, type ErrorMessageMetadataWith, type Fields, type FiscalizationPayload, type HTMLContentData, type HTMLContentType, type HandleRefundRequest, type HandleRefundRequestClear, type HandleSaleRequest, type HandleSaleRequestClear, type ICashRegister, type IDigitalReceipt, type ILogger, type Image, type InitializationOptions, type KazakhstanProductData, KnownCountryCodes, type KyrgyzstanProductData, type Loyalty, type MakeZReportOptions, type MarkingCodes, type Message, type MessageMetadata, type MessageMetadataWith, type MessageWith, type Money, type OperationIdentifiers, type Order, type OrderPaymentResult, type OrderPrice, type OrderRefundResult, OrderSource, OrderType, type Organization, OwnerType, type PaymentInfo, PaymentMode, type PaymentProvider, type PaymentResult, PaymentSource, PaymentStatus, PaymentType, type PreviousReceipt, type PrintParams, type PrintTextOptions, type PrintedFiscalReceipt, type PrintedNonFiscalReceipt, type PrintedReceipt, type PrintedRefundReceipt, type Product, type ProductPrice, type ProductSpecificData, type QRData, type QRIdData, type QRIdType, type QrPaymentResult, type QrRefundResult, type Receipt, type ReceiptPaymentInfo, type ReceiptRefundInfo, type RefundInfo, type RefundResult, RefundSource, type RussiaProductData, type SlipData, type SlipType, type Store, type Tax, type Taxpayer, type TextSlipData, type TextSlipType, type UzbekistanProductData, type WithdrawCashOptions };
|
|
759
|
+
export { type AddedIngredient, Business, type CardInfo, type CardPaymentResult, type CardRefundResult, type CashRegister, type CashRegisterSettings, type Cashier, type CertificateInfo, CertificateType, type Country, type CountryIsoCode, type CreateScopeOptions, type Customer, type DepositCashOptions, DigitalReceiptNotificationPreference, type DigitalReceiptView, type DigitalReceiptViewType, type ErrorMessageMetadataWith, type Fields, FiscalStage, type FiscalizationPayload, type HTMLContentData, type HTMLContentType, type HandleRefundRequest, type HandleRefundRequestClear, type HandleSaleRequest, type HandleSaleRequestClear, type ICashRegister, type IDigitalReceipt, type ILogger, type Image, type InitializationOptions, type KazakhstanProductData, KnownCountryCodes, type KyrgyzstanProductData, type Loyalty, type MakeZReportOptions, type MarkingCodes, type Message, type MessageMetadata, type MessageMetadataWith, type MessageWith, type Money, type OperationIdentifiers, type Order, type OrderPaymentResult, type OrderPrice, type OrderRefundResult, OrderSource, OrderType, type Organization, OwnerType, type PaymentInfo, PaymentMode, type PaymentProvider, type PaymentResult, PaymentSource, PaymentStatus, PaymentType, type PreviousReceipt, type PrintParams, type PrintTextOptions, type PrintedFiscalReceipt, type PrintedNonFiscalReceipt, type PrintedReceipt, type PrintedRefundReceipt, type Product, type ProductPrice, type ProductSpecificData, type QRData, type QRIdData, type QRIdType, type QrPaymentResult, type QrRefundResult, type Receipt, type ReceiptPaymentInfo, type ReceiptRefundInfo, type RefundInfo, type RefundResult, RefundSource, type RussiaProductData, type SlipData, type SlipType, type Store, type Tax, type Taxpayer, type TextSlipData, type TextSlipType, type UzbekistanProductData, type WithdrawCashOptions };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var i=(t=>(t.DodoPizza="dodopizza",t.Drinkit="drinkit",t))(i||{}),o=(t=>(t[t.Belarus=112]="Belarus",t[t.Kazakhstan=398]="Kazakhstan",t[t.Russia=643]="Russia",t[t.Uzbekistan=860]="Uzbekistan",t[t.Kyrgyzstan=417]="Kyrgyzstan",t))(o||{}),r=(t=>(t[t.Resail=0]="Resail",t[t.OwnProduction=1]="OwnProduction",t[t.Service=2]="Service",t))(r||{}),n=(t=>(t.Card="Card",t.QR="QR",t))(n||{}),e=(t=>(t[t.RestaurantCashier=0]="RestaurantCashier",t[t.Kiosk=1]="Kiosk",t))(e||{}),l=(t=>(t.NotFound="NotFound",t.PaymentPending="PaymentPending",t.PaymentCompleted="PaymentCompleted",t.RefundPending="RefundPending",t.RefundCompleted="RefundCompleted",t.NotNeeded="NotNeeded",t))(l||{}),f=(t=>(t.RestaurantCashier="RestaurantCashier",t.RefundJob="RefundJob",t.Kiosk="Kiosk",t))(f||{}),m=(t=>(t[t.FullSettlementWithPayment=0]="FullSettlementWithPayment",t[t.Advance=1]="Advance",t[t.FullSettlementAfterAdvance=2]="FullSettlementAfterAdvance",t))(m||{}),v=(t=>(t[t.B2B=1]="B2B",t))(v||{}),x=(t=>(t[t.Delivery=1]="Delivery",t[t.Pickup=2]="Pickup",t[t.Stationary=3]="Stationary",t[t.PersonalFood=4]="PersonalFood",t[t.ShopWindowSupply=5]="ShopWindowSupply",t))(x||{}),h=(t=>(t[t.Telephone=0]="Telephone",t[t.Site=1]="Site",t[t.Restaurant=2]="Restaurant",t[t.DefectOrder=3]="DefectOrder",t[t.Mobile=4]="Mobile",t[t.Pizzeria=5]="Pizzeria",t[t.Aggregator=6]="Aggregator",t[t.Kiosk=7]="Kiosk",t))(h||{}),k=(t=>(t[t.Cash=0]="Cash",t[t.BankCard=1]="BankCard",t[t.InternetAcquiring=2]="InternetAcquiring",t[t.Aggregator=3]="Aggregator",t))(k||{});var s=(a=>(a.NotSpecified="NotSpecified",a.None="None",a.Email="Email",a.PhoneSms="PhoneSms",a))(s||{});export{i as Business,v as CertificateType,s as DigitalReceiptNotificationPreference,m as FiscalStage,o as KnownCountryCodes,h as OrderSource,x as OrderType,r as OwnerType,n as PaymentMode,e as PaymentSource,l as PaymentStatus,k as PaymentType,f as RefundSource};
|