@dodobrands/pos-receipts-plugin-contracts 5.13.1 → 5.13.2
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/dist/index.cjs +1 -1
- package/dist/index.d.cts +26 -1
- package/dist/index.d.ts +26 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var r=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var e=Object.getOwnPropertyNames;var N=Object.prototype.hasOwnProperty;var b=(a,t)=>{for(var o in t)r(a,o,{get:t[o],enumerable:!0})},A=(a,t,o,f)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of e(t))!N.call(a,i)&&i!==o&&r(a,i,{get:()=>t[i],enumerable:!(f=R(t,i))||f.enumerable});return a};var D=a=>A(r({},"__esModule",{value:!0}),a);var P={};b(P,{Business:()=>x,DigitalReceiptNotificationPreference:()=>z,KnownCountryCodes:()=>l,OrderSource:()=>p,OrderType:()=>m,OwnerType:()=>g,PaymentMode:()=>n,PaymentSource:()=>s,PaymentStatus:()=>k,PaymentType:()=>v,RefundSource:()=>h});module.exports=D(P);var x=(a=>(a.DodoPizza="dodoPizza",a.Drinkit="drinkit",a.Doner42="doner42",a))(x||{}),l=(a=>(a[a.Belarus=112]="Belarus",a[a.Kazakhstan=398]="Kazakhstan",a[a.Russia=643]="Russia",a[a.Uzbekistan=860]="Uzbekistan",a[a.Kyrgyzstan=417]="Kyrgyzstan",a))(l||{}),g=(a=>(a[a.Resail=0]="Resail",a[a.OwnProduction=1]="OwnProduction",a[a.Service=2]="Service",a))(g||{}),n=(a=>(a.Card="Card",a.QR="QR",a))(n||{}),s=(a=>(a[a.RestaurantCashier=0]="RestaurantCashier",a[a.Kiosk=1]="Kiosk",a))(s||{}),k=(a=>(a.NotFound="NotFound",a.PaymentPending="PaymentPending",a.PaymentCompleted="PaymentCompleted",a.RefundPending="RefundPending",a.RefundCompleted="RefundCompleted",a.NotNeeded="NotNeeded",a))(k||{}),h=(a=>(a.RestaurantCashier="RestaurantCashier",a.RefundJob="RefundJob",a.Kiosk="Kiosk",a))(h||{}),m=(a=>(a[a.Delivery=1]="Delivery",a[a.Pickup=2]="Pickup",a[a.Stationary=3]="Stationary",a[a.PersonalFood=4]="PersonalFood",a[a.ShopWindowSupply=5]="ShopWindowSupply",a))(m||{}),p=(a=>(a[a.Telephone=0]="Telephone",a[a.Site=1]="Site",a[a.Restaurant=2]="Restaurant",a[a.DefectOrder=3]="DefectOrder",a[a.Mobile=4]="Mobile",a[a.Pizzeria=5]="Pizzeria",a[a.Aggregator=6]="Aggregator",a[a.Kiosk=7]="Kiosk",a))(p||{}),v=(a=>(a[a.Cash=0]="Cash",a[a.BankCard=1]="BankCard",a[a.InternetAcquiring=2]="InternetAcquiring",a[a.Aggregator=3]="Aggregator",a))(v||{});var z=(i=>(i.NotSpecified="NotSpecified",i.None="None",i.Email="Email",i.PhoneSms="PhoneSms",i))(z||{});0&&(module.exports={Business,DigitalReceiptNotificationPreference,KnownCountryCodes,OrderSource,OrderType,OwnerType,PaymentMode,PaymentSource,PaymentStatus,PaymentType,RefundSource});
|
package/dist/index.d.cts
CHANGED
|
@@ -73,6 +73,11 @@ interface KyrgyzstanProductData {
|
|
|
73
73
|
/** `product` — if entry is resold, `service` — if entry is prepared in-house. */
|
|
74
74
|
entryType?: 'product' | 'service';
|
|
75
75
|
}
|
|
76
|
+
|
|
77
|
+
type Message = {
|
|
78
|
+
content: string;
|
|
79
|
+
} & MessageMetadata;
|
|
80
|
+
type MessageWith<T> = Message & T;
|
|
76
81
|
type MessageMetadata = {
|
|
77
82
|
area?: string;
|
|
78
83
|
};
|
|
@@ -142,6 +147,11 @@ type OperationIdentifiers = TransactionIdIdentifier | RRNIdentifier | {
|
|
|
142
147
|
|
|
143
148
|
type PaymentInfo = OperationIdentifiers;
|
|
144
149
|
|
|
150
|
+
declare enum PaymentMode {
|
|
151
|
+
Card = "Card",
|
|
152
|
+
QR = "QR"
|
|
153
|
+
}
|
|
154
|
+
|
|
145
155
|
type QRIdType = 'qrId';
|
|
146
156
|
type HTMLContentType = 'htmlContent';
|
|
147
157
|
type QRIdData = {
|
|
@@ -164,6 +174,11 @@ type HTMLContentData = {
|
|
|
164
174
|
type QRData = QRIdData | HTMLContentData;
|
|
165
175
|
|
|
166
176
|
type TextSlipType = 'text';
|
|
177
|
+
/**
|
|
178
|
+
* Represents the slip type for CARD payment request
|
|
179
|
+
* In the future it could be extended with other types like 'html' or 'pdf'
|
|
180
|
+
*/
|
|
181
|
+
type SlipType = TextSlipType;
|
|
167
182
|
type TextSlipData = {
|
|
168
183
|
type: TextSlipType;
|
|
169
184
|
textLines: string[];
|
|
@@ -201,6 +216,10 @@ type CardPaymentResult = {
|
|
|
201
216
|
*/
|
|
202
217
|
card: CardInfo | null;
|
|
203
218
|
};
|
|
219
|
+
/**
|
|
220
|
+
* Represents the result of a payment operation.
|
|
221
|
+
*/
|
|
222
|
+
type PaymentResult<T extends PaymentMode = PaymentMode.Card> = T extends PaymentMode.Card ? CardPaymentResult : T extends PaymentMode.QR ? QrPaymentResult : never;
|
|
204
223
|
|
|
205
224
|
/**
|
|
206
225
|
* The result of a payment operation for an order.
|
|
@@ -216,6 +235,10 @@ type CardRefundResult = BaseRefundResult & {
|
|
|
216
235
|
slip: SlipData | null;
|
|
217
236
|
};
|
|
218
237
|
type QrRefundResult = BaseRefundResult;
|
|
238
|
+
/**
|
|
239
|
+
* Represents the result of a refund operation.
|
|
240
|
+
*/
|
|
241
|
+
type RefundResult<T extends PaymentMode = PaymentMode.Card> = T extends PaymentMode.Card ? CardRefundResult : T extends PaymentMode.QR ? QrRefundResult : never;
|
|
219
242
|
|
|
220
243
|
/**
|
|
221
244
|
* The result of a refund operation for an order.
|
|
@@ -278,6 +301,8 @@ interface Receipt {
|
|
|
278
301
|
Cashier?: Cashier;
|
|
279
302
|
/** Url of the image to print on the receipt. */
|
|
280
303
|
Image?: Image;
|
|
304
|
+
/** @internal */
|
|
305
|
+
IdempotencyKey: string;
|
|
281
306
|
}
|
|
282
307
|
interface Cashier {
|
|
283
308
|
/** Cashier name */
|
|
@@ -727,4 +752,4 @@ declare enum DigitalReceiptNotificationPreference {
|
|
|
727
752
|
PhoneSms = "PhoneSms"
|
|
728
753
|
}
|
|
729
754
|
|
|
730
|
-
export { type AddedIngredient, Business, type CashRegister, type CashRegisterSettings, type Cashier, type Country, type CountryIsoCode, type Customer, type DepositCashOptions, DigitalReceiptNotificationPreference, type DigitalReceiptView, type DigitalReceiptViewType, type Fields, type HandleRefundRequest, type HandleRefundRequestClear, type HandleSaleRequest, type HandleSaleRequestClear, type ICashRegister, type IDigitalReceipt, type Image, type InitializationOptions, type JobRefundInfo, type KazakhstanProductData, type KioskPaymentInfo, type KioskRefundInfo, KnownCountryCodes, type KyrgyzstanProductData, type Loyalty, type MakeZReportOptions, type MarkingCodes, type Money, type Order, type OrderPrice, OrderSource, OrderType, type Organization, OwnerType, PaymentType, type PreviousReceipt, type PrintParams, type PrintTextOptions, type PrintedFiscalReceipt, type PrintedNonFiscalReceipt, type PrintedReceipt, type PrintedRefundReceipt, type Product, type ProductPrice, type ProductSpecificData, type Receipt, type ReceiptPaymentInfo, type ReceiptRefundInfo, type RestaurantCashierPaymentInfo, type RestaurantCashierRefundInfo, type Store, type Tax, type Taxpayer, type UzbekistanProductData, type WithdrawCashOptions };
|
|
755
|
+
export { type AddedIngredient, Business, type CardInfo, type CardPaymentResult, type CardRefundResult, type CashRegister, type CashRegisterSettings, type Cashier, type Country, type CountryIsoCode, type CreateScopeOptions, type Customer, type DepositCashOptions, DigitalReceiptNotificationPreference, type DigitalReceiptView, type DigitalReceiptViewType, type ErrorMessageMetadataWith, type Fields, type HTMLContentData, type HTMLContentType, type HandleRefundRequest, type HandleRefundRequestClear, type HandleSaleRequest, type HandleSaleRequestClear, type ICashRegister, type IDigitalReceipt, type ILogger, type Image, type InitializationOptions, type JobRefundInfo, type KazakhstanProductData, type KioskPaymentInfo, type KioskRefundInfo, 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 RestaurantCashierPaymentInfo, type RestaurantCashierRefundInfo, type SlipData, type SlipType, type Store, type Tax, type Taxpayer, type TextSlipData, type TextSlipType, type UzbekistanProductData, type WithdrawCashOptions };
|
package/dist/index.d.ts
CHANGED
|
@@ -73,6 +73,11 @@ interface KyrgyzstanProductData {
|
|
|
73
73
|
/** `product` — if entry is resold, `service` — if entry is prepared in-house. */
|
|
74
74
|
entryType?: 'product' | 'service';
|
|
75
75
|
}
|
|
76
|
+
|
|
77
|
+
type Message = {
|
|
78
|
+
content: string;
|
|
79
|
+
} & MessageMetadata;
|
|
80
|
+
type MessageWith<T> = Message & T;
|
|
76
81
|
type MessageMetadata = {
|
|
77
82
|
area?: string;
|
|
78
83
|
};
|
|
@@ -142,6 +147,11 @@ type OperationIdentifiers = TransactionIdIdentifier | RRNIdentifier | {
|
|
|
142
147
|
|
|
143
148
|
type PaymentInfo = OperationIdentifiers;
|
|
144
149
|
|
|
150
|
+
declare enum PaymentMode {
|
|
151
|
+
Card = "Card",
|
|
152
|
+
QR = "QR"
|
|
153
|
+
}
|
|
154
|
+
|
|
145
155
|
type QRIdType = 'qrId';
|
|
146
156
|
type HTMLContentType = 'htmlContent';
|
|
147
157
|
type QRIdData = {
|
|
@@ -164,6 +174,11 @@ type HTMLContentData = {
|
|
|
164
174
|
type QRData = QRIdData | HTMLContentData;
|
|
165
175
|
|
|
166
176
|
type TextSlipType = 'text';
|
|
177
|
+
/**
|
|
178
|
+
* Represents the slip type for CARD payment request
|
|
179
|
+
* In the future it could be extended with other types like 'html' or 'pdf'
|
|
180
|
+
*/
|
|
181
|
+
type SlipType = TextSlipType;
|
|
167
182
|
type TextSlipData = {
|
|
168
183
|
type: TextSlipType;
|
|
169
184
|
textLines: string[];
|
|
@@ -201,6 +216,10 @@ type CardPaymentResult = {
|
|
|
201
216
|
*/
|
|
202
217
|
card: CardInfo | null;
|
|
203
218
|
};
|
|
219
|
+
/**
|
|
220
|
+
* Represents the result of a payment operation.
|
|
221
|
+
*/
|
|
222
|
+
type PaymentResult<T extends PaymentMode = PaymentMode.Card> = T extends PaymentMode.Card ? CardPaymentResult : T extends PaymentMode.QR ? QrPaymentResult : never;
|
|
204
223
|
|
|
205
224
|
/**
|
|
206
225
|
* The result of a payment operation for an order.
|
|
@@ -216,6 +235,10 @@ type CardRefundResult = BaseRefundResult & {
|
|
|
216
235
|
slip: SlipData | null;
|
|
217
236
|
};
|
|
218
237
|
type QrRefundResult = BaseRefundResult;
|
|
238
|
+
/**
|
|
239
|
+
* Represents the result of a refund operation.
|
|
240
|
+
*/
|
|
241
|
+
type RefundResult<T extends PaymentMode = PaymentMode.Card> = T extends PaymentMode.Card ? CardRefundResult : T extends PaymentMode.QR ? QrRefundResult : never;
|
|
219
242
|
|
|
220
243
|
/**
|
|
221
244
|
* The result of a refund operation for an order.
|
|
@@ -278,6 +301,8 @@ interface Receipt {
|
|
|
278
301
|
Cashier?: Cashier;
|
|
279
302
|
/** Url of the image to print on the receipt. */
|
|
280
303
|
Image?: Image;
|
|
304
|
+
/** @internal */
|
|
305
|
+
IdempotencyKey: string;
|
|
281
306
|
}
|
|
282
307
|
interface Cashier {
|
|
283
308
|
/** Cashier name */
|
|
@@ -727,4 +752,4 @@ declare enum DigitalReceiptNotificationPreference {
|
|
|
727
752
|
PhoneSms = "PhoneSms"
|
|
728
753
|
}
|
|
729
754
|
|
|
730
|
-
export { type AddedIngredient, Business, type CashRegister, type CashRegisterSettings, type Cashier, type Country, type CountryIsoCode, type Customer, type DepositCashOptions, DigitalReceiptNotificationPreference, type DigitalReceiptView, type DigitalReceiptViewType, type Fields, type HandleRefundRequest, type HandleRefundRequestClear, type HandleSaleRequest, type HandleSaleRequestClear, type ICashRegister, type IDigitalReceipt, type Image, type InitializationOptions, type JobRefundInfo, type KazakhstanProductData, type KioskPaymentInfo, type KioskRefundInfo, KnownCountryCodes, type KyrgyzstanProductData, type Loyalty, type MakeZReportOptions, type MarkingCodes, type Money, type Order, type OrderPrice, OrderSource, OrderType, type Organization, OwnerType, PaymentType, type PreviousReceipt, type PrintParams, type PrintTextOptions, type PrintedFiscalReceipt, type PrintedNonFiscalReceipt, type PrintedReceipt, type PrintedRefundReceipt, type Product, type ProductPrice, type ProductSpecificData, type Receipt, type ReceiptPaymentInfo, type ReceiptRefundInfo, type RestaurantCashierPaymentInfo, type RestaurantCashierRefundInfo, type Store, type Tax, type Taxpayer, type UzbekistanProductData, type WithdrawCashOptions };
|
|
755
|
+
export { type AddedIngredient, Business, type CardInfo, type CardPaymentResult, type CardRefundResult, type CashRegister, type CashRegisterSettings, type Cashier, type Country, type CountryIsoCode, type CreateScopeOptions, type Customer, type DepositCashOptions, DigitalReceiptNotificationPreference, type DigitalReceiptView, type DigitalReceiptViewType, type ErrorMessageMetadataWith, type Fields, type HTMLContentData, type HTMLContentType, type HandleRefundRequest, type HandleRefundRequestClear, type HandleSaleRequest, type HandleSaleRequestClear, type ICashRegister, type IDigitalReceipt, type ILogger, type Image, type InitializationOptions, type JobRefundInfo, type KazakhstanProductData, type KioskPaymentInfo, type KioskRefundInfo, 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 RestaurantCashierPaymentInfo, type RestaurantCashierRefundInfo, 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 t=(a=>(a.DodoPizza="dodoPizza",a.Drinkit="drinkit",a.Doner42="doner42",a))(t||{}),o=(a=>(a[a.Belarus=112]="Belarus",a[a.Kazakhstan=398]="Kazakhstan",a[a.Russia=643]="Russia",a[a.Uzbekistan=860]="Uzbekistan",a[a.Kyrgyzstan=417]="Kyrgyzstan",a))(o||{}),r=(a=>(a[a.Resail=0]="Resail",a[a.OwnProduction=1]="OwnProduction",a[a.Service=2]="Service",a))(r||{}),f=(a=>(a.Card="Card",a.QR="QR",a))(f||{}),x=(a=>(a[a.RestaurantCashier=0]="RestaurantCashier",a[a.Kiosk=1]="Kiosk",a))(x||{}),l=(a=>(a.NotFound="NotFound",a.PaymentPending="PaymentPending",a.PaymentCompleted="PaymentCompleted",a.RefundPending="RefundPending",a.RefundCompleted="RefundCompleted",a.NotNeeded="NotNeeded",a))(l||{}),g=(a=>(a.RestaurantCashier="RestaurantCashier",a.RefundJob="RefundJob",a.Kiosk="Kiosk",a))(g||{}),n=(a=>(a[a.Delivery=1]="Delivery",a[a.Pickup=2]="Pickup",a[a.Stationary=3]="Stationary",a[a.PersonalFood=4]="PersonalFood",a[a.ShopWindowSupply=5]="ShopWindowSupply",a))(n||{}),s=(a=>(a[a.Telephone=0]="Telephone",a[a.Site=1]="Site",a[a.Restaurant=2]="Restaurant",a[a.DefectOrder=3]="DefectOrder",a[a.Mobile=4]="Mobile",a[a.Pizzeria=5]="Pizzeria",a[a.Aggregator=6]="Aggregator",a[a.Kiosk=7]="Kiosk",a))(s||{}),k=(a=>(a[a.Cash=0]="Cash",a[a.BankCard=1]="BankCard",a[a.InternetAcquiring=2]="InternetAcquiring",a[a.Aggregator=3]="Aggregator",a))(k||{});var h=(i=>(i.NotSpecified="NotSpecified",i.None="None",i.Email="Email",i.PhoneSms="PhoneSms",i))(h||{});export{t as Business,h as DigitalReceiptNotificationPreference,o as KnownCountryCodes,s as OrderSource,n as OrderType,r as OwnerType,f as PaymentMode,x as PaymentSource,l as PaymentStatus,k as PaymentType,g as RefundSource};
|