@dodobrands/pos-receipts-plugin-contracts 5.12.8 → 5.12.10

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.
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../../../shared/pos-plugins-shared-models/src/Business.ts","../../../shared/pos-plugins-shared-models/src/Country.ts","../src/CountrySpecificData.ts","../src/PrintParams.ts","../src/Receipt.ts"],"sourcesContent":["export { Business } from '@dodobrands/pos-plugins-shared-models';\nexport { Country, CountryIsoCode } from '@dodobrands/pos-plugins-shared-models';\n\nexport * from './cashCollection/DepositCashOptions';\nexport * from './cashCollection/Money';\nexport * from './cashCollection/WithdrawCashOptions';\nexport * from './CashRegisterSettings';\nexport * from './CountrySpecificData';\nexport * from './HandleRefundRequest';\nexport * from './HandleSaleRequest';\nexport * from './ICashRegister';\nexport * from './IDigitalReceipt';\nexport * from './InitializationOptions';\nexport * from './MakeZReportOptions';\nexport * from './PrintedReceipt';\nexport * from './PrintedRefundReceipt';\nexport * from './PrintParams';\nexport * from './PrintTextOptions';\nexport * from './Receipt';\nexport * from './Taxpayer';\n","/**\n * Enum with supported business types.\n */\nexport enum Business {\n\t/**\n\t * Dodo Pizza business.\n\t */\n\tDodoPizza = `dodoPizza`,\n\t/**\n\t * Drinkit business.\n\t */\n\tDrinkit = `drinkit`,\n\t/**\n\t * Doner42 business.\n\t */\n\tDoner42 = `doner42`,\n}\n","/**\n * Country model\n */\nexport interface Country {\n\tcode: CountryIsoCode;\n}\n\n/** Country code based on [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_numeric)\n * @example 643, 705, 566\n */\nexport type CountryIsoCode = number;\n\nexport enum KnownCountryCodes {\n\tBelarus = 112,\n\tKazakhstan = 398,\n\tRussia = 643,\n\tUzbekistan = 860,\n}\n","export type ProductSpecificData = UzbekistanProductData | KazakhstanProductData | null;\n\nexport interface UzbekistanProductData {\n\t/** Identification code of products and services for Uzbekistan */\n\tikpu: string;\n\t/** 0 - resail; 1 - own production; 2 - service */\n\townerType?: OwnerType;\n\t/** code of measurement type */\n\tunits: string;\n\t/** related with ikpu */\n\tbarcode: string;\n}\n\nexport enum OwnerType {\n\tResail = 0,\n\tOwnProduction = 1,\n\tService = 2,\n}\n\nexport interface KazakhstanProductData {\n\t/** Identification code of products */\n\tgtin?: string;\n\tntin?: string;\n}\n","export interface PrintParams {\n\t/** Has true value when receipt was sent to plugin in background for building Digital version of receipt */\n\tWithoutPaper: boolean;\n\tDigitalReceiptNotificationPreference: DigitalReceiptNotificationPreference;\n}\n\n/** The way we can notify the client about the receipt for the accepted order. */\nexport enum DigitalReceiptNotificationPreference {\n\t/** Client did not specify how they want to receive digital receipt. Default value. Should be set as `NotSpecified` when the receipt is expected to be NOT digital. */\n\tNotSpecified = `NotSpecified`,\n\t/** Client selected 'I don't want a receipt' */\n\tNone = `None`,\n\t/** Client selected 'I want the receipt on my email' */\n\tEmail = `Email`,\n\t/** Client selected 'I want the receipt link by phone via SMS' */\n\tPhoneSms = `PhoneSms`,\n}\n","/* eslint-disable @typescript-eslint/no-magic-numbers */\nimport { type KazakhstanProductData, type UzbekistanProductData } from './CountrySpecificData';\nimport { type Taxpayer } from './Taxpayer';\n\nexport interface Receipt {\n\t/** Order for this receipt */\n\tOrder: Order;\n\t/** Customer information */\n\tCustomer: Customer;\n\t/** Taxpayer information */\n\tTaxpayer: Taxpayer;\n\t/** Cash register from which the receipt is printed */\n\tCashRegister: CashRegister;\n\t/** Previous receipts that were printed for this order, including refunds */\n\tPreviousReceipts: PreviousReceipt[];\n\t/** Information about the organization that printed the receipt */\n\tOrganization: Organization;\n\t/** Information about the store in which the purchase is occurring */\n\tStore: Store;\n\n\t/** Information needed for the loyalty program. */\n\tLoyalty?: Loyalty;\n\n\t/** Cash from the customer (if paid in cash) */\n\tCashFromCustomer: number;\n\n\t/** Information about the person taking the order. */\n\tCashier?: Cashier;\n\n\t/** Url of the image to print on the receipt. */\n\tImage?: Image;\n}\n\nexport interface Cashier {\n\t/** Cashier name */\n\tName: string;\n\n\t/** Cashier INN in russia and its analogues in other countries. */\n\tTaxIdentificationNumber?: string;\n}\n\nexport interface Image {\n\t/** Url of the image to print on the receipt. */\n\tUrl?: string;\n\n\t/** Image data in base64 format. (ONLY FOR RUSSIA ATOL) */\n\tBase64Data?: string;\n}\n\nexport interface Loyalty {\n\t/** Customer Phone number */\n\tPhoneNumber: string;\n\t/** Amount of the bonus points awarded for the loyalty program. */\n\tAwardedBonus: number;\n}\n\nexport interface Order {\n\t/** Internal order identifier */\n\tId: string;\n\t/** Order number seen by customers (e.g. \"1-3\") */\n\tNumber: string; // from OrderNumber\n\t/** Current time in ISO 8601 format (e.g. \"2021-04-30T10:50:00.0000000+04:00\") */\n\tCreateDate: string;\n\t/** Products in cart */\n\tProducts: Product[];\n\tPrice: OrderPrice;\n\t/** @deprecated Please switch to PaymentTypeEnum. */\n\tPaymentType: 'Cash' | 'BankCard';\n\tPaymentTypeEnum: PaymentType;\n\tOrderSource: OrderSource;\n\n\t/** Current time in ISO 8601 format (e.g. \"2021-04-30T10:50:00.0000000+04:00\") */\n\tDeliveryDate?: string;\n\tOrderType: OrderType;\n}\n\nexport enum OrderType {\n\tDelivery = 1,\n\tPickup = 2,\n\tStationary = 3,\n\tPersonalFood = 4,\n\tShopWindowSupply = 5,\n}\n\n/** Shows the source from where the order has been taken. */\nexport enum OrderSource {\n\tTelephone = 0,\n\tSite = 1,\n\tRestaurant = 2,\n\tDefectOrder = 3,\n\tMobile = 4,\n\t/** Shift manager order from call center. */\n\tPizzeria = 5,\n\tAggregator = 6,\n\tKiosk = 7,\n}\n\n/** Shows how the order has been paid. Please expect frequent updates in the future. */\nexport enum PaymentType {\n\tCash = 0,\n\tBankCard = 1,\n\tInternetAcquiring = 2,\n\tAggregator = 3,\n}\n\nexport interface OrderPrice {\n\t/** The total price of the order (how much the customer actually paid) */\n\tTotalPrice: number;\n\t/** Total discount for the entire order (excluding discounts for individual products in the order) */\n\tDiscount: number;\n\t/** Rounded cash amount the customer pays for an order (if paid in cash). Used only in countries with special rules for rounding cash */\n\tRoundedCashAmount?: number;\n}\n\nexport interface Product {\n\t/** Internal product identifier */\n\tId: string;\n\t/** The product's name */\n\tName: string;\n\t/** The quantity of this product in the order */\n\tQuantity: number;\n\tPricePerProduct: ProductPrice;\n\t/** List of ingredients removed from the product */\n\tRemovedIngredients: string[];\n\t/** Additional ingredients added to the product */\n\tAddedIngredients: AddedIngredient[];\n\n\t/** The marking data used in some countries to pass scanned barcode value to the cash register. */\n\tMarking?: MarkingCodes;\n\n\t/** The product excise information */\n\tExcise?: {\n\t\tisExcise: boolean;\n\t};\n\n\t/** Additional data that can be defined for specific country */\n\tCountrySpecific?: {\n\t\tUzbekistan?: UzbekistanProductData;\n\t\tKazakhstan?: KazakhstanProductData;\n\t};\n}\n\nexport interface ProductPrice {\n\t/** Price for 1 product excluding discount but with added ingredients */\n\tPrice: number;\n\t/** Discount for 1 product (excluding the discount for the entire order) */\n\tDiscount: number;\n\tTaxes: Tax[];\n}\n\nexport interface Tax {\n\t/** Type of tax: value added or sales */\n\tType: 'VAT' | 'Sales' | 'Unknown';\n\t/** Rate in percents */\n\tRate: number;\n\t// TODO add later: Value: number\n}\n\nexport interface AddedIngredient {\n\t/** Ingredient name */\n\tName: string;\n\t/** The amount of ingredients added in portions */\n\tQuantity: number;\n\t/** Ingredient price added to the product */\n\tPrice: number;\n}\n\nexport interface Customer {\n\t/** The name of the customer that he gave to the cashier */\n\tName: string;\n\t/** Customer's mailing address, which he set in his personal account */\n\tEmail: string | null;\n\t/** Any additional identifiers, e.g. customer's Tax Identification Number */\n\tIdentifiers: { [index: string]: string };\n}\n\nexport interface CashRegister {\n\t/** Internal cash register identifier */\n\tUUId: string;\n\t/** */\n\tNumber: string;\n\t/** To calculate or not to calculate VAT */\n\tShouldCalculateTax: boolean;\n}\n\nexport interface PreviousReceipt {\n\t/** ID of the receipt returned by the POS printer. `null` if a print error has occurred. It is temporary field. Then it will be removed. Use `Identifier` instead of `Id` */\n\tId: number | null;\n\t/** Printed receipt type: sales receipt or refund receipt */\n\tType: 'Sell' | 'Refund';\n\t/** Date in format ISO 8601 (e.g. 2021-04-30T10:50:00.0000000+04:00) */\n\tPrintDateTime: string;\n\t/** ID of the receipt returned by the POS printer */\n\tIdentifier: string | null;\n\n\tCashboxId: string;\n\n\t/** Data returned by cash register after printing receipt */\n\tCashRegisterOutput?: string;\n\t/** Previous receipt payment type */\n\tPaymentType: PaymentType;\n}\n\nexport interface Organization {\n\t/** Full name of the organization */\n\tName: string;\n\t/** Legal address */\n\tAddress: string;\n\t/** Organization payment details */\n\tRequisites: { [index: string]: string };\n}\n\nexport interface Store {\n\t/** Actual address */\n\tAddress: string;\n}\n\ntype RussiaMarkingCode = {\n\t/** Russian country iso code */\n\tcountry: 643;\n\t/** In Russia it's the string of digits, letters, special symbols and group separator. */\n\tmarkingCode: string;\n};\n\ntype BelarusMarkingCodes = {\n\t/** Belarus country iso code */\n\tcountry: 112;\n\t/** Маркировка унифицированными контрольными знаками (УКЗ) */\n\tukzCode?: string;\n\t/** Маркировка средствами идентификации (СИ) */\n\tsiCode?: string;\n\t/** Маркировка с использованием штрихкода GTIN */\n\tgtinCode?: string;\n};\n\ntype ArmeniaMarkingCode = {\n\t/** Armenia country iso code */\n\tcountry: 51;\n\t/** In Armenia it's the string of digits letters, special symbols and group separator. */\n\tmarkingCode: string;\n};\n\ntype UzbekistanMarkingCode = {\n\t/** Uzbekistan country iso code */\n\tcountry: 860;\n\t/** In Uzbekistan it's the string of digits letters, special symbols and group separator. */\n\tmarkingCode: string;\n};\n\nexport type MarkingCodes =\n\t| RussiaMarkingCode\n\t| BelarusMarkingCodes\n\t| ArmeniaMarkingCode\n\t| UzbekistanMarkingCode\n\t| undefined;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACGO,IAAK,WAAL,kBAAKA,cAAL;AAINA,YAAA,WAAA,IAAY;AAIZA,YAAA,SAAA,IAAU;AAIVA,YAAA,SAAA,IAAU;AAZC,SAAAA;AAAA,GAAA,YAAA,CAAA,CAAA;;;AEUL,IAAK,YAAL,kBAAKC,eAAL;AACN,EAAAA,sBAAA,YAAS,KAAT;AACA,EAAAA,sBAAA,mBAAgB,KAAhB;AACA,EAAAA,sBAAA,aAAU,KAAV;AAHW,SAAAA;AAAA,GAAA;;;ACNL,IAAK,uCAAL,kBAAKC,0CAAL;AAEN,EAAAA,sCAAA,kBAAe;AAEf,EAAAA,sCAAA,UAAO;AAEP,EAAAA,sCAAA,WAAQ;AAER,EAAAA,sCAAA,cAAW;AARA,SAAAA;AAAA,GAAA;;;ACqEL,IAAK,YAAL,kBAAKC,eAAL;AACN,EAAAA,sBAAA,cAAW,KAAX;AACA,EAAAA,sBAAA,YAAS,KAAT;AACA,EAAAA,sBAAA,gBAAa,KAAb;AACA,EAAAA,sBAAA,kBAAe,KAAf;AACA,EAAAA,sBAAA,sBAAmB,KAAnB;AALW,SAAAA;AAAA,GAAA;AASL,IAAK,cAAL,kBAAKC,iBAAL;AACN,EAAAA,0BAAA,eAAY,KAAZ;AACA,EAAAA,0BAAA,UAAO,KAAP;AACA,EAAAA,0BAAA,gBAAa,KAAb;AACA,EAAAA,0BAAA,iBAAc,KAAd;AACA,EAAAA,0BAAA,YAAS,KAAT;AAEA,EAAAA,0BAAA,cAAW,KAAX;AACA,EAAAA,0BAAA,gBAAa,KAAb;AACA,EAAAA,0BAAA,WAAQ,KAAR;AATW,SAAAA;AAAA,GAAA;AAaL,IAAK,cAAL,kBAAKC,iBAAL;AACN,EAAAA,0BAAA,UAAO,KAAP;AACA,EAAAA,0BAAA,cAAW,KAAX;AACA,EAAAA,0BAAA,uBAAoB,KAApB;AACA,EAAAA,0BAAA,gBAAa,KAAb;AAJW,SAAAA;AAAA,GAAA;","names":["Business","OwnerType","DigitalReceiptNotificationPreference","OrderType","OrderSource","PaymentType"]}
1
+ {"version":3,"sources":["../src/index.ts","../../../shared/pos-plugins-shared-models/src/Business.ts","../../../shared/pos-plugins-shared-models/src/Country.ts","../src/CountrySpecificData.ts","../src/PrintParams.ts","../src/Receipt.ts"],"sourcesContent":["export { Business } from '@dodobrands/pos-plugins-shared-models';\nexport { Country, CountryIsoCode } from '@dodobrands/pos-plugins-shared-models';\n\nexport * from './cashCollection/DepositCashOptions';\nexport * from './cashCollection/Money';\nexport * from './cashCollection/WithdrawCashOptions';\nexport * from './CashRegisterSettings';\nexport * from './CountrySpecificData';\nexport * from './HandleRefundRequest';\nexport * from './HandleSaleRequest';\nexport * from './ICashRegister';\nexport * from './IDigitalReceipt';\nexport * from './InitializationOptions';\nexport * from './MakeZReportOptions';\nexport * from './PrintedReceipt';\nexport * from './PrintedRefundReceipt';\nexport * from './PrintParams';\nexport * from './PrintTextOptions';\nexport * from './Receipt';\nexport * from './Taxpayer';\n","/**\n * Enum with supported business types.\n */\nexport enum Business {\n\t/**\n\t * Dodo Pizza business.\n\t */\n\tDodoPizza = `dodoPizza`,\n\t/**\n\t * Drinkit business.\n\t */\n\tDrinkit = `drinkit`,\n\t/**\n\t * Doner42 business.\n\t */\n\tDoner42 = `doner42`,\n}\n","/**\n * Country model\n */\nexport interface Country {\n\tcode: CountryIsoCode;\n}\n\n/** Country code based on [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_numeric)\n * @example 643, 705, 566\n */\nexport type CountryIsoCode = number;\n\nexport enum KnownCountryCodes {\n\tBelarus = 112,\n\tKazakhstan = 398,\n\tRussia = 643,\n\tUzbekistan = 860,\n}\n","export type ProductSpecificData = UzbekistanProductData | KazakhstanProductData | null;\n\nexport interface UzbekistanProductData {\n\t/** Identification code of products and services for Uzbekistan */\n\tikpu: string;\n\t/** 0 - resail; 1 - own production; 2 - service */\n\townerType?: OwnerType;\n\t/** code of measurement type */\n\tunits: string;\n\t/** related with ikpu */\n\tbarcode: string;\n}\n\nexport enum OwnerType {\n\tResail = 0,\n\tOwnProduction = 1,\n\tService = 2,\n}\n\nexport interface KazakhstanProductData {\n\t/** Identification code of products */\n\tgtin?: string;\n\tntin?: string;\n}\n","export interface PrintParams {\n\t/** Has true value when receipt was sent to plugin in background for building Digital version of receipt */\n\tWithoutPaper: boolean;\n\tDigitalReceiptNotificationPreference: DigitalReceiptNotificationPreference;\n}\n\n/** The way we can notify the client about the receipt for the accepted order. */\nexport enum DigitalReceiptNotificationPreference {\n\t/** Client did not specify how they want to receive digital receipt. Default value. Should be set as `NotSpecified` when the receipt is expected to be NOT digital. */\n\tNotSpecified = `NotSpecified`,\n\t/** Client selected 'I don't want a receipt' */\n\tNone = `None`,\n\t/** Client selected 'I want the receipt on my email' */\n\tEmail = `Email`,\n\t/** Client selected 'I want the receipt link by phone via SMS' */\n\tPhoneSms = `PhoneSms`,\n}\n","/* eslint-disable @typescript-eslint/no-magic-numbers */\nimport { type KazakhstanProductData, type UzbekistanProductData } from './CountrySpecificData';\nimport { type Taxpayer } from './Taxpayer';\n\nexport interface Receipt {\n\t/** Order for this receipt */\n\tOrder: Order;\n\t/** Customer information */\n\tCustomer: Customer;\n\t/** Taxpayer information */\n\tTaxpayer: Taxpayer;\n\t/** Cash register from which the receipt is printed */\n\tCashRegister: CashRegister;\n\t/** Previous receipts that were printed for this order, including refunds */\n\tPreviousReceipts: PreviousReceipt[];\n\t/** Information about the organization that printed the receipt */\n\tOrganization: Organization;\n\t/** Information about the store in which the purchase is occurring */\n\tStore: Store;\n\n\t/** Information needed for the loyalty program. */\n\tLoyalty?: Loyalty;\n\n\t/** Cash from the customer (if paid in cash) */\n\tCashFromCustomer: number;\n\n\t/** Information about the person taking the order. */\n\tCashier?: Cashier;\n\n\t/** Url of the image to print on the receipt. */\n\tImage?: Image;\n}\n\nexport interface Cashier {\n\t/** Cashier name */\n\tName: string;\n\n\t/** Cashier INN in russia and its analogues in other countries. */\n\tTaxIdentificationNumber?: string;\n}\n\nexport interface Image {\n\t/** Url of the image to print on the receipt. */\n\tUrl?: string;\n\n\t/** Image data in base64 format. (ONLY FOR RUSSIA ATOL) */\n\tBase64Data?: string;\n}\n\nexport interface Loyalty {\n\t/** Customer Phone number */\n\tPhoneNumber: string;\n\t/** Amount of the bonus points awarded for the loyalty program. */\n\tAwardedBonus: number;\n}\n\nexport interface Order {\n\t/** Internal order identifier */\n\tId: string;\n\t/** Order number seen by customers (e.g. \"1-3\") */\n\tNumber: string; // from OrderNumber\n\t/** Current time in ISO 8601 format (e.g. \"2021-04-30T10:50:00.0000000+04:00\") */\n\tCreateDate: string;\n\t/** Products in cart */\n\tProducts: Product[];\n\tPrice: OrderPrice;\n\t/** @deprecated Please switch to PaymentTypeEnum. */\n\tPaymentType: 'Cash' | 'BankCard';\n\tPaymentTypeEnum: PaymentType;\n\tOrderSource: OrderSource;\n\n\t/** Current time in ISO 8601 format (e.g. \"2021-04-30T10:50:00.0000000+04:00\") */\n\tDeliveryDate?: string;\n\tOrderType: OrderType;\n}\n\nexport enum OrderType {\n\tDelivery = 1,\n\tPickup = 2,\n\tStationary = 3,\n\tPersonalFood = 4,\n\tShopWindowSupply = 5,\n}\n\n/** Shows the source from where the order has been taken. */\nexport enum OrderSource {\n\tTelephone = 0,\n\tSite = 1,\n\tRestaurant = 2,\n\tDefectOrder = 3,\n\tMobile = 4,\n\t/** Shift manager order from call center. */\n\tPizzeria = 5,\n\tAggregator = 6,\n\tKiosk = 7,\n}\n\n/** Shows how the order has been paid. Please expect frequent updates in the future. */\nexport enum PaymentType {\n\tCash = 0,\n\tBankCard = 1,\n\tInternetAcquiring = 2,\n\tAggregator = 3,\n}\n\nexport interface OrderPrice {\n\t/** The total price of the order (how much the customer actually paid) */\n\tTotalPrice: number;\n\t/** Total price of the order excluding tax */\n\tTotalPriceWithoutTax?: number;\n\t/** Total discount for the entire order (excluding discounts for individual products in the order) */\n\tDiscount: number;\n\t/** Total sales tax amount for the order */\n\tSaleTax?: number;\n\t/** Rounded cash amount the customer pays for an order (if paid in cash). Used only in countries with special rules for rounding cash */\n\tRoundedCashAmount?: number;\n}\n\nexport interface Product {\n\t/** Internal product identifier */\n\tId: string;\n\t/** The product's name */\n\tName: string;\n\t/** The quantity of this product in the order */\n\tQuantity: number;\n\tPricePerProduct: ProductPrice;\n\t/** List of ingredients removed from the product */\n\tRemovedIngredients: string[];\n\t/** Additional ingredients added to the product */\n\tAddedIngredients: AddedIngredient[];\n\n\t/** The marking data used in some countries to pass scanned barcode value to the cash register. */\n\tMarking?: MarkingCodes;\n\n\t/** The product excise information */\n\tExcise?: {\n\t\tisExcise: boolean;\n\t};\n\n\t/** Additional data that can be defined for specific country */\n\tCountrySpecific?: {\n\t\tUzbekistan?: UzbekistanProductData;\n\t\tKazakhstan?: KazakhstanProductData;\n\t};\n}\n\nexport interface ProductPrice {\n\t/** Price for 1 product excluding discount but with added ingredients */\n\tPrice: number;\n\t/** Discount for 1 product (excluding the discount for the entire order) */\n\tDiscount: number;\n\tTaxes: Tax[];\n}\n\nexport interface Tax {\n\t/** Type of tax: value added or sales */\n\tType: 'VAT' | 'Sales' | 'Unknown';\n\t/** Rate in percents */\n\tRate: number;\n\t// TODO add later: Value: number\n}\n\nexport interface AddedIngredient {\n\t/** Ingredient name */\n\tName: string;\n\t/** The amount of ingredients added in portions */\n\tQuantity: number;\n\t/** Ingredient price added to the product */\n\tPrice: number;\n}\n\nexport interface Customer {\n\t/** The name of the customer that he gave to the cashier */\n\tName: string;\n\t/** Customer's mailing address, which he set in his personal account */\n\tEmail: string | null;\n\t/** Any additional identifiers, e.g. customer's Tax Identification Number */\n\tIdentifiers: { [index: string]: string };\n}\n\nexport interface CashRegister {\n\t/** Internal cash register identifier */\n\tUUId: string;\n\t/** */\n\tNumber: string;\n\t/** To calculate or not to calculate VAT */\n\tShouldCalculateTax: boolean;\n}\n\nexport interface PreviousReceipt {\n\t/** ID of the receipt returned by the POS printer. `null` if a print error has occurred. It is temporary field. Then it will be removed. Use `Identifier` instead of `Id` */\n\tId: number | null;\n\t/** Printed receipt type: sales receipt or refund receipt */\n\tType: 'Sell' | 'Refund';\n\t/** Date in format ISO 8601 (e.g. 2021-04-30T10:50:00.0000000+04:00) */\n\tPrintDateTime: string;\n\t/** ID of the receipt returned by the POS printer */\n\tIdentifier: string | null;\n\n\tCashboxId: string;\n\n\t/** Data returned by cash register after printing receipt */\n\tCashRegisterOutput?: string;\n\t/** Previous receipt payment type */\n\tPaymentType: PaymentType;\n}\n\nexport interface Organization {\n\t/** Full name of the organization */\n\tName: string;\n\t/** Legal address */\n\tAddress: string;\n\t/** Organization payment details */\n\tRequisites: { [index: string]: string };\n}\n\nexport interface Store {\n\t/** Actual address */\n\tAddress: string;\n}\n\ntype RussiaMarkingCode = {\n\t/** Russian country iso code */\n\tcountry: 643;\n\t/** In Russia it's the string of digits, letters, special symbols and group separator. */\n\tmarkingCode: string;\n};\n\ntype BelarusMarkingCodes = {\n\t/** Belarus country iso code */\n\tcountry: 112;\n\t/** Маркировка унифицированными контрольными знаками (УКЗ) */\n\tukzCode?: string;\n\t/** Маркировка средствами идентификации (СИ) */\n\tsiCode?: string;\n\t/** Маркировка с использованием штрихкода GTIN */\n\tgtinCode?: string;\n};\n\ntype ArmeniaMarkingCode = {\n\t/** Armenia country iso code */\n\tcountry: 51;\n\t/** In Armenia it's the string of digits letters, special symbols and group separator. */\n\tmarkingCode: string;\n};\n\ntype UzbekistanMarkingCode = {\n\t/** Uzbekistan country iso code */\n\tcountry: 860;\n\t/** In Uzbekistan it's the string of digits letters, special symbols and group separator. */\n\tmarkingCode: string;\n};\n\nexport type MarkingCodes =\n\t| RussiaMarkingCode\n\t| BelarusMarkingCodes\n\t| ArmeniaMarkingCode\n\t| UzbekistanMarkingCode\n\t| undefined;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACGO,IAAK,WAAL,kBAAKA,cAAL;AAINA,YAAA,WAAA,IAAY;AAIZA,YAAA,SAAA,IAAU;AAIVA,YAAA,SAAA,IAAU;AAZC,SAAAA;AAAA,GAAA,YAAA,CAAA,CAAA;;;AEUL,IAAK,YAAL,kBAAKC,eAAL;AACN,EAAAA,sBAAA,YAAS,KAAT;AACA,EAAAA,sBAAA,mBAAgB,KAAhB;AACA,EAAAA,sBAAA,aAAU,KAAV;AAHW,SAAAA;AAAA,GAAA;;;ACNL,IAAK,uCAAL,kBAAKC,0CAAL;AAEN,EAAAA,sCAAA,kBAAe;AAEf,EAAAA,sCAAA,UAAO;AAEP,EAAAA,sCAAA,WAAQ;AAER,EAAAA,sCAAA,cAAW;AARA,SAAAA;AAAA,GAAA;;;ACqEL,IAAK,YAAL,kBAAKC,eAAL;AACN,EAAAA,sBAAA,cAAW,KAAX;AACA,EAAAA,sBAAA,YAAS,KAAT;AACA,EAAAA,sBAAA,gBAAa,KAAb;AACA,EAAAA,sBAAA,kBAAe,KAAf;AACA,EAAAA,sBAAA,sBAAmB,KAAnB;AALW,SAAAA;AAAA,GAAA;AASL,IAAK,cAAL,kBAAKC,iBAAL;AACN,EAAAA,0BAAA,eAAY,KAAZ;AACA,EAAAA,0BAAA,UAAO,KAAP;AACA,EAAAA,0BAAA,gBAAa,KAAb;AACA,EAAAA,0BAAA,iBAAc,KAAd;AACA,EAAAA,0BAAA,YAAS,KAAT;AAEA,EAAAA,0BAAA,cAAW,KAAX;AACA,EAAAA,0BAAA,gBAAa,KAAb;AACA,EAAAA,0BAAA,WAAQ,KAAR;AATW,SAAAA;AAAA,GAAA;AAaL,IAAK,cAAL,kBAAKC,iBAAL;AACN,EAAAA,0BAAA,UAAO,KAAP;AACA,EAAAA,0BAAA,cAAW,KAAX;AACA,EAAAA,0BAAA,uBAAoB,KAApB;AACA,EAAAA,0BAAA,gBAAa,KAAb;AAJW,SAAAA;AAAA,GAAA;","names":["Business","OwnerType","DigitalReceiptNotificationPreference","OrderType","OrderSource","PaymentType"]}
package/dist/index.d.cts CHANGED
@@ -315,8 +315,12 @@ declare enum PaymentType {
315
315
  interface OrderPrice {
316
316
  /** The total price of the order (how much the customer actually paid) */
317
317
  TotalPrice: number;
318
+ /** Total price of the order excluding tax */
319
+ TotalPriceWithoutTax?: number;
318
320
  /** Total discount for the entire order (excluding discounts for individual products in the order) */
319
321
  Discount: number;
322
+ /** Total sales tax amount for the order */
323
+ SaleTax?: number;
320
324
  /** Rounded cash amount the customer pays for an order (if paid in cash). Used only in countries with special rules for rounding cash */
321
325
  RoundedCashAmount?: number;
322
326
  }
package/dist/index.d.ts CHANGED
@@ -315,8 +315,12 @@ declare enum PaymentType {
315
315
  interface OrderPrice {
316
316
  /** The total price of the order (how much the customer actually paid) */
317
317
  TotalPrice: number;
318
+ /** Total price of the order excluding tax */
319
+ TotalPriceWithoutTax?: number;
318
320
  /** Total discount for the entire order (excluding discounts for individual products in the order) */
319
321
  Discount: number;
322
+ /** Total sales tax amount for the order */
323
+ SaleTax?: number;
320
324
  /** Rounded cash amount the customer pays for an order (if paid in cash). Used only in countries with special rules for rounding cash */
321
325
  RoundedCashAmount?: number;
322
326
  }
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../shared/pos-plugins-shared-models/src/Business.ts","../../../shared/pos-plugins-shared-models/src/Country.ts","../src/CountrySpecificData.ts","../src/PrintParams.ts","../src/Receipt.ts"],"sourcesContent":["/**\n * Enum with supported business types.\n */\nexport enum Business {\n\t/**\n\t * Dodo Pizza business.\n\t */\n\tDodoPizza = `dodoPizza`,\n\t/**\n\t * Drinkit business.\n\t */\n\tDrinkit = `drinkit`,\n\t/**\n\t * Doner42 business.\n\t */\n\tDoner42 = `doner42`,\n}\n","/**\n * Country model\n */\nexport interface Country {\n\tcode: CountryIsoCode;\n}\n\n/** Country code based on [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_numeric)\n * @example 643, 705, 566\n */\nexport type CountryIsoCode = number;\n\nexport enum KnownCountryCodes {\n\tBelarus = 112,\n\tKazakhstan = 398,\n\tRussia = 643,\n\tUzbekistan = 860,\n}\n","export type ProductSpecificData = UzbekistanProductData | KazakhstanProductData | null;\n\nexport interface UzbekistanProductData {\n\t/** Identification code of products and services for Uzbekistan */\n\tikpu: string;\n\t/** 0 - resail; 1 - own production; 2 - service */\n\townerType?: OwnerType;\n\t/** code of measurement type */\n\tunits: string;\n\t/** related with ikpu */\n\tbarcode: string;\n}\n\nexport enum OwnerType {\n\tResail = 0,\n\tOwnProduction = 1,\n\tService = 2,\n}\n\nexport interface KazakhstanProductData {\n\t/** Identification code of products */\n\tgtin?: string;\n\tntin?: string;\n}\n","export interface PrintParams {\n\t/** Has true value when receipt was sent to plugin in background for building Digital version of receipt */\n\tWithoutPaper: boolean;\n\tDigitalReceiptNotificationPreference: DigitalReceiptNotificationPreference;\n}\n\n/** The way we can notify the client about the receipt for the accepted order. */\nexport enum DigitalReceiptNotificationPreference {\n\t/** Client did not specify how they want to receive digital receipt. Default value. Should be set as `NotSpecified` when the receipt is expected to be NOT digital. */\n\tNotSpecified = `NotSpecified`,\n\t/** Client selected 'I don't want a receipt' */\n\tNone = `None`,\n\t/** Client selected 'I want the receipt on my email' */\n\tEmail = `Email`,\n\t/** Client selected 'I want the receipt link by phone via SMS' */\n\tPhoneSms = `PhoneSms`,\n}\n","/* eslint-disable @typescript-eslint/no-magic-numbers */\nimport { type KazakhstanProductData, type UzbekistanProductData } from './CountrySpecificData';\nimport { type Taxpayer } from './Taxpayer';\n\nexport interface Receipt {\n\t/** Order for this receipt */\n\tOrder: Order;\n\t/** Customer information */\n\tCustomer: Customer;\n\t/** Taxpayer information */\n\tTaxpayer: Taxpayer;\n\t/** Cash register from which the receipt is printed */\n\tCashRegister: CashRegister;\n\t/** Previous receipts that were printed for this order, including refunds */\n\tPreviousReceipts: PreviousReceipt[];\n\t/** Information about the organization that printed the receipt */\n\tOrganization: Organization;\n\t/** Information about the store in which the purchase is occurring */\n\tStore: Store;\n\n\t/** Information needed for the loyalty program. */\n\tLoyalty?: Loyalty;\n\n\t/** Cash from the customer (if paid in cash) */\n\tCashFromCustomer: number;\n\n\t/** Information about the person taking the order. */\n\tCashier?: Cashier;\n\n\t/** Url of the image to print on the receipt. */\n\tImage?: Image;\n}\n\nexport interface Cashier {\n\t/** Cashier name */\n\tName: string;\n\n\t/** Cashier INN in russia and its analogues in other countries. */\n\tTaxIdentificationNumber?: string;\n}\n\nexport interface Image {\n\t/** Url of the image to print on the receipt. */\n\tUrl?: string;\n\n\t/** Image data in base64 format. (ONLY FOR RUSSIA ATOL) */\n\tBase64Data?: string;\n}\n\nexport interface Loyalty {\n\t/** Customer Phone number */\n\tPhoneNumber: string;\n\t/** Amount of the bonus points awarded for the loyalty program. */\n\tAwardedBonus: number;\n}\n\nexport interface Order {\n\t/** Internal order identifier */\n\tId: string;\n\t/** Order number seen by customers (e.g. \"1-3\") */\n\tNumber: string; // from OrderNumber\n\t/** Current time in ISO 8601 format (e.g. \"2021-04-30T10:50:00.0000000+04:00\") */\n\tCreateDate: string;\n\t/** Products in cart */\n\tProducts: Product[];\n\tPrice: OrderPrice;\n\t/** @deprecated Please switch to PaymentTypeEnum. */\n\tPaymentType: 'Cash' | 'BankCard';\n\tPaymentTypeEnum: PaymentType;\n\tOrderSource: OrderSource;\n\n\t/** Current time in ISO 8601 format (e.g. \"2021-04-30T10:50:00.0000000+04:00\") */\n\tDeliveryDate?: string;\n\tOrderType: OrderType;\n}\n\nexport enum OrderType {\n\tDelivery = 1,\n\tPickup = 2,\n\tStationary = 3,\n\tPersonalFood = 4,\n\tShopWindowSupply = 5,\n}\n\n/** Shows the source from where the order has been taken. */\nexport enum OrderSource {\n\tTelephone = 0,\n\tSite = 1,\n\tRestaurant = 2,\n\tDefectOrder = 3,\n\tMobile = 4,\n\t/** Shift manager order from call center. */\n\tPizzeria = 5,\n\tAggregator = 6,\n\tKiosk = 7,\n}\n\n/** Shows how the order has been paid. Please expect frequent updates in the future. */\nexport enum PaymentType {\n\tCash = 0,\n\tBankCard = 1,\n\tInternetAcquiring = 2,\n\tAggregator = 3,\n}\n\nexport interface OrderPrice {\n\t/** The total price of the order (how much the customer actually paid) */\n\tTotalPrice: number;\n\t/** Total discount for the entire order (excluding discounts for individual products in the order) */\n\tDiscount: number;\n\t/** Rounded cash amount the customer pays for an order (if paid in cash). Used only in countries with special rules for rounding cash */\n\tRoundedCashAmount?: number;\n}\n\nexport interface Product {\n\t/** Internal product identifier */\n\tId: string;\n\t/** The product's name */\n\tName: string;\n\t/** The quantity of this product in the order */\n\tQuantity: number;\n\tPricePerProduct: ProductPrice;\n\t/** List of ingredients removed from the product */\n\tRemovedIngredients: string[];\n\t/** Additional ingredients added to the product */\n\tAddedIngredients: AddedIngredient[];\n\n\t/** The marking data used in some countries to pass scanned barcode value to the cash register. */\n\tMarking?: MarkingCodes;\n\n\t/** The product excise information */\n\tExcise?: {\n\t\tisExcise: boolean;\n\t};\n\n\t/** Additional data that can be defined for specific country */\n\tCountrySpecific?: {\n\t\tUzbekistan?: UzbekistanProductData;\n\t\tKazakhstan?: KazakhstanProductData;\n\t};\n}\n\nexport interface ProductPrice {\n\t/** Price for 1 product excluding discount but with added ingredients */\n\tPrice: number;\n\t/** Discount for 1 product (excluding the discount for the entire order) */\n\tDiscount: number;\n\tTaxes: Tax[];\n}\n\nexport interface Tax {\n\t/** Type of tax: value added or sales */\n\tType: 'VAT' | 'Sales' | 'Unknown';\n\t/** Rate in percents */\n\tRate: number;\n\t// TODO add later: Value: number\n}\n\nexport interface AddedIngredient {\n\t/** Ingredient name */\n\tName: string;\n\t/** The amount of ingredients added in portions */\n\tQuantity: number;\n\t/** Ingredient price added to the product */\n\tPrice: number;\n}\n\nexport interface Customer {\n\t/** The name of the customer that he gave to the cashier */\n\tName: string;\n\t/** Customer's mailing address, which he set in his personal account */\n\tEmail: string | null;\n\t/** Any additional identifiers, e.g. customer's Tax Identification Number */\n\tIdentifiers: { [index: string]: string };\n}\n\nexport interface CashRegister {\n\t/** Internal cash register identifier */\n\tUUId: string;\n\t/** */\n\tNumber: string;\n\t/** To calculate or not to calculate VAT */\n\tShouldCalculateTax: boolean;\n}\n\nexport interface PreviousReceipt {\n\t/** ID of the receipt returned by the POS printer. `null` if a print error has occurred. It is temporary field. Then it will be removed. Use `Identifier` instead of `Id` */\n\tId: number | null;\n\t/** Printed receipt type: sales receipt or refund receipt */\n\tType: 'Sell' | 'Refund';\n\t/** Date in format ISO 8601 (e.g. 2021-04-30T10:50:00.0000000+04:00) */\n\tPrintDateTime: string;\n\t/** ID of the receipt returned by the POS printer */\n\tIdentifier: string | null;\n\n\tCashboxId: string;\n\n\t/** Data returned by cash register after printing receipt */\n\tCashRegisterOutput?: string;\n\t/** Previous receipt payment type */\n\tPaymentType: PaymentType;\n}\n\nexport interface Organization {\n\t/** Full name of the organization */\n\tName: string;\n\t/** Legal address */\n\tAddress: string;\n\t/** Organization payment details */\n\tRequisites: { [index: string]: string };\n}\n\nexport interface Store {\n\t/** Actual address */\n\tAddress: string;\n}\n\ntype RussiaMarkingCode = {\n\t/** Russian country iso code */\n\tcountry: 643;\n\t/** In Russia it's the string of digits, letters, special symbols and group separator. */\n\tmarkingCode: string;\n};\n\ntype BelarusMarkingCodes = {\n\t/** Belarus country iso code */\n\tcountry: 112;\n\t/** Маркировка унифицированными контрольными знаками (УКЗ) */\n\tukzCode?: string;\n\t/** Маркировка средствами идентификации (СИ) */\n\tsiCode?: string;\n\t/** Маркировка с использованием штрихкода GTIN */\n\tgtinCode?: string;\n};\n\ntype ArmeniaMarkingCode = {\n\t/** Armenia country iso code */\n\tcountry: 51;\n\t/** In Armenia it's the string of digits letters, special symbols and group separator. */\n\tmarkingCode: string;\n};\n\ntype UzbekistanMarkingCode = {\n\t/** Uzbekistan country iso code */\n\tcountry: 860;\n\t/** In Uzbekistan it's the string of digits letters, special symbols and group separator. */\n\tmarkingCode: string;\n};\n\nexport type MarkingCodes =\n\t| RussiaMarkingCode\n\t| BelarusMarkingCodes\n\t| ArmeniaMarkingCode\n\t| UzbekistanMarkingCode\n\t| undefined;\n"],"mappings":";AAGO,IAAK,WAAL,kBAAKA,cAAL;AAINA,YAAA,WAAA,IAAY;AAIZA,YAAA,SAAA,IAAU;AAIVA,YAAA,SAAA,IAAU;AAZC,SAAAA;AAAA,GAAA,YAAA,CAAA,CAAA;;;AEUL,IAAK,YAAL,kBAAKC,eAAL;AACN,EAAAA,sBAAA,YAAS,KAAT;AACA,EAAAA,sBAAA,mBAAgB,KAAhB;AACA,EAAAA,sBAAA,aAAU,KAAV;AAHW,SAAAA;AAAA,GAAA;;;ACNL,IAAK,uCAAL,kBAAKC,0CAAL;AAEN,EAAAA,sCAAA,kBAAe;AAEf,EAAAA,sCAAA,UAAO;AAEP,EAAAA,sCAAA,WAAQ;AAER,EAAAA,sCAAA,cAAW;AARA,SAAAA;AAAA,GAAA;;;ACqEL,IAAK,YAAL,kBAAKC,eAAL;AACN,EAAAA,sBAAA,cAAW,KAAX;AACA,EAAAA,sBAAA,YAAS,KAAT;AACA,EAAAA,sBAAA,gBAAa,KAAb;AACA,EAAAA,sBAAA,kBAAe,KAAf;AACA,EAAAA,sBAAA,sBAAmB,KAAnB;AALW,SAAAA;AAAA,GAAA;AASL,IAAK,cAAL,kBAAKC,iBAAL;AACN,EAAAA,0BAAA,eAAY,KAAZ;AACA,EAAAA,0BAAA,UAAO,KAAP;AACA,EAAAA,0BAAA,gBAAa,KAAb;AACA,EAAAA,0BAAA,iBAAc,KAAd;AACA,EAAAA,0BAAA,YAAS,KAAT;AAEA,EAAAA,0BAAA,cAAW,KAAX;AACA,EAAAA,0BAAA,gBAAa,KAAb;AACA,EAAAA,0BAAA,WAAQ,KAAR;AATW,SAAAA;AAAA,GAAA;AAaL,IAAK,cAAL,kBAAKC,iBAAL;AACN,EAAAA,0BAAA,UAAO,KAAP;AACA,EAAAA,0BAAA,cAAW,KAAX;AACA,EAAAA,0BAAA,uBAAoB,KAApB;AACA,EAAAA,0BAAA,gBAAa,KAAb;AAJW,SAAAA;AAAA,GAAA;","names":["Business","OwnerType","DigitalReceiptNotificationPreference","OrderType","OrderSource","PaymentType"]}
1
+ {"version":3,"sources":["../../../shared/pos-plugins-shared-models/src/Business.ts","../../../shared/pos-plugins-shared-models/src/Country.ts","../src/CountrySpecificData.ts","../src/PrintParams.ts","../src/Receipt.ts"],"sourcesContent":["/**\n * Enum with supported business types.\n */\nexport enum Business {\n\t/**\n\t * Dodo Pizza business.\n\t */\n\tDodoPizza = `dodoPizza`,\n\t/**\n\t * Drinkit business.\n\t */\n\tDrinkit = `drinkit`,\n\t/**\n\t * Doner42 business.\n\t */\n\tDoner42 = `doner42`,\n}\n","/**\n * Country model\n */\nexport interface Country {\n\tcode: CountryIsoCode;\n}\n\n/** Country code based on [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_numeric)\n * @example 643, 705, 566\n */\nexport type CountryIsoCode = number;\n\nexport enum KnownCountryCodes {\n\tBelarus = 112,\n\tKazakhstan = 398,\n\tRussia = 643,\n\tUzbekistan = 860,\n}\n","export type ProductSpecificData = UzbekistanProductData | KazakhstanProductData | null;\n\nexport interface UzbekistanProductData {\n\t/** Identification code of products and services for Uzbekistan */\n\tikpu: string;\n\t/** 0 - resail; 1 - own production; 2 - service */\n\townerType?: OwnerType;\n\t/** code of measurement type */\n\tunits: string;\n\t/** related with ikpu */\n\tbarcode: string;\n}\n\nexport enum OwnerType {\n\tResail = 0,\n\tOwnProduction = 1,\n\tService = 2,\n}\n\nexport interface KazakhstanProductData {\n\t/** Identification code of products */\n\tgtin?: string;\n\tntin?: string;\n}\n","export interface PrintParams {\n\t/** Has true value when receipt was sent to plugin in background for building Digital version of receipt */\n\tWithoutPaper: boolean;\n\tDigitalReceiptNotificationPreference: DigitalReceiptNotificationPreference;\n}\n\n/** The way we can notify the client about the receipt for the accepted order. */\nexport enum DigitalReceiptNotificationPreference {\n\t/** Client did not specify how they want to receive digital receipt. Default value. Should be set as `NotSpecified` when the receipt is expected to be NOT digital. */\n\tNotSpecified = `NotSpecified`,\n\t/** Client selected 'I don't want a receipt' */\n\tNone = `None`,\n\t/** Client selected 'I want the receipt on my email' */\n\tEmail = `Email`,\n\t/** Client selected 'I want the receipt link by phone via SMS' */\n\tPhoneSms = `PhoneSms`,\n}\n","/* eslint-disable @typescript-eslint/no-magic-numbers */\nimport { type KazakhstanProductData, type UzbekistanProductData } from './CountrySpecificData';\nimport { type Taxpayer } from './Taxpayer';\n\nexport interface Receipt {\n\t/** Order for this receipt */\n\tOrder: Order;\n\t/** Customer information */\n\tCustomer: Customer;\n\t/** Taxpayer information */\n\tTaxpayer: Taxpayer;\n\t/** Cash register from which the receipt is printed */\n\tCashRegister: CashRegister;\n\t/** Previous receipts that were printed for this order, including refunds */\n\tPreviousReceipts: PreviousReceipt[];\n\t/** Information about the organization that printed the receipt */\n\tOrganization: Organization;\n\t/** Information about the store in which the purchase is occurring */\n\tStore: Store;\n\n\t/** Information needed for the loyalty program. */\n\tLoyalty?: Loyalty;\n\n\t/** Cash from the customer (if paid in cash) */\n\tCashFromCustomer: number;\n\n\t/** Information about the person taking the order. */\n\tCashier?: Cashier;\n\n\t/** Url of the image to print on the receipt. */\n\tImage?: Image;\n}\n\nexport interface Cashier {\n\t/** Cashier name */\n\tName: string;\n\n\t/** Cashier INN in russia and its analogues in other countries. */\n\tTaxIdentificationNumber?: string;\n}\n\nexport interface Image {\n\t/** Url of the image to print on the receipt. */\n\tUrl?: string;\n\n\t/** Image data in base64 format. (ONLY FOR RUSSIA ATOL) */\n\tBase64Data?: string;\n}\n\nexport interface Loyalty {\n\t/** Customer Phone number */\n\tPhoneNumber: string;\n\t/** Amount of the bonus points awarded for the loyalty program. */\n\tAwardedBonus: number;\n}\n\nexport interface Order {\n\t/** Internal order identifier */\n\tId: string;\n\t/** Order number seen by customers (e.g. \"1-3\") */\n\tNumber: string; // from OrderNumber\n\t/** Current time in ISO 8601 format (e.g. \"2021-04-30T10:50:00.0000000+04:00\") */\n\tCreateDate: string;\n\t/** Products in cart */\n\tProducts: Product[];\n\tPrice: OrderPrice;\n\t/** @deprecated Please switch to PaymentTypeEnum. */\n\tPaymentType: 'Cash' | 'BankCard';\n\tPaymentTypeEnum: PaymentType;\n\tOrderSource: OrderSource;\n\n\t/** Current time in ISO 8601 format (e.g. \"2021-04-30T10:50:00.0000000+04:00\") */\n\tDeliveryDate?: string;\n\tOrderType: OrderType;\n}\n\nexport enum OrderType {\n\tDelivery = 1,\n\tPickup = 2,\n\tStationary = 3,\n\tPersonalFood = 4,\n\tShopWindowSupply = 5,\n}\n\n/** Shows the source from where the order has been taken. */\nexport enum OrderSource {\n\tTelephone = 0,\n\tSite = 1,\n\tRestaurant = 2,\n\tDefectOrder = 3,\n\tMobile = 4,\n\t/** Shift manager order from call center. */\n\tPizzeria = 5,\n\tAggregator = 6,\n\tKiosk = 7,\n}\n\n/** Shows how the order has been paid. Please expect frequent updates in the future. */\nexport enum PaymentType {\n\tCash = 0,\n\tBankCard = 1,\n\tInternetAcquiring = 2,\n\tAggregator = 3,\n}\n\nexport interface OrderPrice {\n\t/** The total price of the order (how much the customer actually paid) */\n\tTotalPrice: number;\n\t/** Total price of the order excluding tax */\n\tTotalPriceWithoutTax?: number;\n\t/** Total discount for the entire order (excluding discounts for individual products in the order) */\n\tDiscount: number;\n\t/** Total sales tax amount for the order */\n\tSaleTax?: number;\n\t/** Rounded cash amount the customer pays for an order (if paid in cash). Used only in countries with special rules for rounding cash */\n\tRoundedCashAmount?: number;\n}\n\nexport interface Product {\n\t/** Internal product identifier */\n\tId: string;\n\t/** The product's name */\n\tName: string;\n\t/** The quantity of this product in the order */\n\tQuantity: number;\n\tPricePerProduct: ProductPrice;\n\t/** List of ingredients removed from the product */\n\tRemovedIngredients: string[];\n\t/** Additional ingredients added to the product */\n\tAddedIngredients: AddedIngredient[];\n\n\t/** The marking data used in some countries to pass scanned barcode value to the cash register. */\n\tMarking?: MarkingCodes;\n\n\t/** The product excise information */\n\tExcise?: {\n\t\tisExcise: boolean;\n\t};\n\n\t/** Additional data that can be defined for specific country */\n\tCountrySpecific?: {\n\t\tUzbekistan?: UzbekistanProductData;\n\t\tKazakhstan?: KazakhstanProductData;\n\t};\n}\n\nexport interface ProductPrice {\n\t/** Price for 1 product excluding discount but with added ingredients */\n\tPrice: number;\n\t/** Discount for 1 product (excluding the discount for the entire order) */\n\tDiscount: number;\n\tTaxes: Tax[];\n}\n\nexport interface Tax {\n\t/** Type of tax: value added or sales */\n\tType: 'VAT' | 'Sales' | 'Unknown';\n\t/** Rate in percents */\n\tRate: number;\n\t// TODO add later: Value: number\n}\n\nexport interface AddedIngredient {\n\t/** Ingredient name */\n\tName: string;\n\t/** The amount of ingredients added in portions */\n\tQuantity: number;\n\t/** Ingredient price added to the product */\n\tPrice: number;\n}\n\nexport interface Customer {\n\t/** The name of the customer that he gave to the cashier */\n\tName: string;\n\t/** Customer's mailing address, which he set in his personal account */\n\tEmail: string | null;\n\t/** Any additional identifiers, e.g. customer's Tax Identification Number */\n\tIdentifiers: { [index: string]: string };\n}\n\nexport interface CashRegister {\n\t/** Internal cash register identifier */\n\tUUId: string;\n\t/** */\n\tNumber: string;\n\t/** To calculate or not to calculate VAT */\n\tShouldCalculateTax: boolean;\n}\n\nexport interface PreviousReceipt {\n\t/** ID of the receipt returned by the POS printer. `null` if a print error has occurred. It is temporary field. Then it will be removed. Use `Identifier` instead of `Id` */\n\tId: number | null;\n\t/** Printed receipt type: sales receipt or refund receipt */\n\tType: 'Sell' | 'Refund';\n\t/** Date in format ISO 8601 (e.g. 2021-04-30T10:50:00.0000000+04:00) */\n\tPrintDateTime: string;\n\t/** ID of the receipt returned by the POS printer */\n\tIdentifier: string | null;\n\n\tCashboxId: string;\n\n\t/** Data returned by cash register after printing receipt */\n\tCashRegisterOutput?: string;\n\t/** Previous receipt payment type */\n\tPaymentType: PaymentType;\n}\n\nexport interface Organization {\n\t/** Full name of the organization */\n\tName: string;\n\t/** Legal address */\n\tAddress: string;\n\t/** Organization payment details */\n\tRequisites: { [index: string]: string };\n}\n\nexport interface Store {\n\t/** Actual address */\n\tAddress: string;\n}\n\ntype RussiaMarkingCode = {\n\t/** Russian country iso code */\n\tcountry: 643;\n\t/** In Russia it's the string of digits, letters, special symbols and group separator. */\n\tmarkingCode: string;\n};\n\ntype BelarusMarkingCodes = {\n\t/** Belarus country iso code */\n\tcountry: 112;\n\t/** Маркировка унифицированными контрольными знаками (УКЗ) */\n\tukzCode?: string;\n\t/** Маркировка средствами идентификации (СИ) */\n\tsiCode?: string;\n\t/** Маркировка с использованием штрихкода GTIN */\n\tgtinCode?: string;\n};\n\ntype ArmeniaMarkingCode = {\n\t/** Armenia country iso code */\n\tcountry: 51;\n\t/** In Armenia it's the string of digits letters, special symbols and group separator. */\n\tmarkingCode: string;\n};\n\ntype UzbekistanMarkingCode = {\n\t/** Uzbekistan country iso code */\n\tcountry: 860;\n\t/** In Uzbekistan it's the string of digits letters, special symbols and group separator. */\n\tmarkingCode: string;\n};\n\nexport type MarkingCodes =\n\t| RussiaMarkingCode\n\t| BelarusMarkingCodes\n\t| ArmeniaMarkingCode\n\t| UzbekistanMarkingCode\n\t| undefined;\n"],"mappings":";AAGO,IAAK,WAAL,kBAAKA,cAAL;AAINA,YAAA,WAAA,IAAY;AAIZA,YAAA,SAAA,IAAU;AAIVA,YAAA,SAAA,IAAU;AAZC,SAAAA;AAAA,GAAA,YAAA,CAAA,CAAA;;;AEUL,IAAK,YAAL,kBAAKC,eAAL;AACN,EAAAA,sBAAA,YAAS,KAAT;AACA,EAAAA,sBAAA,mBAAgB,KAAhB;AACA,EAAAA,sBAAA,aAAU,KAAV;AAHW,SAAAA;AAAA,GAAA;;;ACNL,IAAK,uCAAL,kBAAKC,0CAAL;AAEN,EAAAA,sCAAA,kBAAe;AAEf,EAAAA,sCAAA,UAAO;AAEP,EAAAA,sCAAA,WAAQ;AAER,EAAAA,sCAAA,cAAW;AARA,SAAAA;AAAA,GAAA;;;ACqEL,IAAK,YAAL,kBAAKC,eAAL;AACN,EAAAA,sBAAA,cAAW,KAAX;AACA,EAAAA,sBAAA,YAAS,KAAT;AACA,EAAAA,sBAAA,gBAAa,KAAb;AACA,EAAAA,sBAAA,kBAAe,KAAf;AACA,EAAAA,sBAAA,sBAAmB,KAAnB;AALW,SAAAA;AAAA,GAAA;AASL,IAAK,cAAL,kBAAKC,iBAAL;AACN,EAAAA,0BAAA,eAAY,KAAZ;AACA,EAAAA,0BAAA,UAAO,KAAP;AACA,EAAAA,0BAAA,gBAAa,KAAb;AACA,EAAAA,0BAAA,iBAAc,KAAd;AACA,EAAAA,0BAAA,YAAS,KAAT;AAEA,EAAAA,0BAAA,cAAW,KAAX;AACA,EAAAA,0BAAA,gBAAa,KAAb;AACA,EAAAA,0BAAA,WAAQ,KAAR;AATW,SAAAA;AAAA,GAAA;AAaL,IAAK,cAAL,kBAAKC,iBAAL;AACN,EAAAA,0BAAA,UAAO,KAAP;AACA,EAAAA,0BAAA,cAAW,KAAX;AACA,EAAAA,0BAAA,uBAAoB,KAApB;AACA,EAAAA,0BAAA,gBAAa,KAAb;AAJW,SAAAA;AAAA,GAAA;","names":["Business","OwnerType","DigitalReceiptNotificationPreference","OrderType","OrderSource","PaymentType"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dodobrands/pos-receipts-plugin-contracts",
3
- "version": "5.12.8",
3
+ "version": "5.12.10",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -10,6 +10,7 @@
10
10
  "main": "./dist/index.cjs",
11
11
  "module": "./dist/index.js",
12
12
  "types": "./dist/index.d.ts",
13
+ "author": "POS",
13
14
  "exports": {
14
15
  "import": {
15
16
  "types": "./dist/index.d.ts",
@@ -32,8 +33,7 @@
32
33
  "scripts": {
33
34
  "build": "tsup src/index.ts --format cjs,esm --dts --clean --sourcemap",
34
35
  "lint": "eslint \"{**/*,*}.{ts,tsx,js,jsx,json,mjs,cjs}\"",
35
- "lint:fix": "yarn lint --fix",
36
- "publish": "yarn npm publish"
36
+ "lint:fix": "yarn lint --fix"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@dodobrands/pos-plugins-shared-models": "workspace:*",