syntax = "proto3";
import "google/protobuf/timestamp.proto";

message AcceptedResponse {
   string Id = 1;
}
message AddItemCheckResponse {
   CheckItemDto CheckItem = 1;
   CheckMiniDto Check = 2;
}
message AddItemCommand {
   string OutletId = 1; // default value could not be applied: 00000000-0000-0000-0000-000000000000
   string CheckId = 2;
   CheckCreateModel Check = 3;
   CheckItemModel Item = 4;
   string CourseId = 5;
   string PinOverride = 6;
   string XCorrelationId = 7;
}
message AddOnProductModel {
   string VariantId = 1; // default value could not be applied: 00000000-0000-0000-0000-000000000000
   string AddOnGroupId = 2; // default value could not be applied: 00000000-0000-0000-0000-000000000000
   string Quantity = 3;
   string FreeAmount = 4;
   string UnitQuantity = 5;
}
message BadRequestResponse {
   string Message = 1;
   string ErrorCode = 2; // default value could not be applied: 00000000-0000-0000-0000-000000000000
}
enum CardPaymentErrorTypes {
   Aborted = 0;
   Busy = 1;
   Cancel = 2;
   DeviceOut = 3;
   InsertedCard = 4;
   InProgress = 5;
   LoggedOut = 6;
   MessageFormat = 7;
   NotAllowed = 8;
   NotFound = 9;
   PaymentRestriction = 10;
   Refusal = 11;
   UnavailableDevice = 12;
   UnavailableService = 13;
   InvalidCard = 14;
   UnreachableHost = 15;
   WrongPIN = 16;
   TransactionUnknown = 17;
   TransactionAbandoned = 18;
   VerificationNotPossible = 19;
   TimeOut = 20;
   Duplicate = 21;
   Ancon = 22;
   InsufficientBalance = 23;
   Unknown = -1;
}
message CheckCreateModel {
   OrderFormats OrderFormat = 1;
   SalesLocationTypes SalesLocationType = 2;
   string SalesLocationId = 3; // default value could not be applied: 00000000-0000-0000-0000-000000000000
   int32 GuestCount = 4;
   string CollectionTicketId = 5;
}
message CheckItemDto {
   string Id = 1; // default value could not be applied: 00000000-0000-0000-0000-000000000000
   .google.protobuf.Timestamp Created = 2;
   .google.protobuf.Timestamp Modified = 3;
   Quantity Quantity = 4;
   Quantity UnitQuantity = 5;
   Unit Unit = 6;
   PricePerUnit ProductPriceInclTax = 7;
   PricePerUnit ProductPriceExclTax = 8;
   string KitchenMessage = 9;
   DiscountValue Discount = 10;
   string CheckPaymentId = 11;
   .google.protobuf.Timestamp PaidAt = 12;
   string CheckId = 13;
   CheckItemStatuses Status = 14;
   PricePerUnit ProductMaterialCostExclTax = 15;
   .google.protobuf.Timestamp TicketedAt = 16;
   string TicketedTenantUserId = 17;
   string CourseName = 18;
   int32 CoursePosition = 19;
   string UpsellGroupId = 20;
   OrderedProduct Product = 21;
   DiscountInfo DiscountInfo = 22;
   string ParentItemId = 23;
   string Tag = 24;
   repeated CheckTaxDto Taxes = 25;
   repeated CheckItemProductModificationDto Modifications = 26;
   repeated CheckItemDto CheckItems = 27;
   string PricePresetId = 28;
   Money TotalPriceInclTax = 29;
   bool IsPrepaid = 30;
   string UsedAccountId = 31;
   repeated CheckItemSubAddOnProductDto AddOnProducts = 32;
}
message CheckItemModel {
   string VariantId = 1; // default value could not be applied: 00000000-0000-0000-0000-000000000000
   string Quantity = 2;
   string UnitQuantity = 3;
   string KitchenMessage = 4;
   CheckItemPriceModel Price = 5;
   string UpsellGroupId = 6;
   repeated ProductItemModificationModel Modifications = 7;
   string Tag = 8;
   bool IsPrepaid = 9;
   repeated SubProductSpecificationModel SubProductSpecification = 10;
   repeated AddOnProductModel AddOnProducts = 11;
}
message CheckItemPriceModel {
   string UnitPrice = 1;
   string AdditionalPrice = 2;
}
message CheckItemProductModificationDto {
   string Id = 1; // default value could not be applied: 00000000-0000-0000-0000-000000000000
   .google.protobuf.Timestamp Created = 2;
   .google.protobuf.Timestamp Modified = 3;
   ProductModification Modification = 4;
}
enum CheckItemStatuses {
   // this is a composite/flags enumeration
   None = 0;
   Forwarded = 1;
   Ticketed = 2;
   Preview = 4;
   Locked = 8;
   Stopped = 16;
   Incomplete = 32;
}
message CheckItemSubAddOnProductDto {
   string Id = 1; // default value could not be applied: 00000000-0000-0000-0000-000000000000
   .google.protobuf.Timestamp Created = 2;
   .google.protobuf.Timestamp Modified = 3;
   Quantity Quantity = 4;
   Quantity UnitQuantity = 5;
   Unit Unit = 6;
   string PricePresetId = 7;
   PricePerUnit ProductPriceInclTax = 8;
   PricePerUnit ProductPriceExclTax = 9;
   DiscountValue Discount = 10;
   CheckItemStatuses Status = 11;
   PricePerUnit ProductMaterialCostExclTax = 12;
   OrderedProduct Product = 13;
   DiscountInfo DiscountInfo = 14;
   string AddOnGroupId = 15; // default value could not be applied: 00000000-0000-0000-0000-000000000000
   string AddOnGroupName = 16;
   Quantity FreeAmount = 17;
   SortPosition Position = 18;
   repeated CheckTaxDto Taxes = 19;
   string KitchenMessage = 20;
   LocalizedString AddOnGroupLocalizedCustomerFacingNames = 21;
}
message CheckMiniDto {
   string Id = 1; // default value could not be applied: 00000000-0000-0000-0000-000000000000
   int64 TicketNumber = 2;
   string CustomName = 3;
   int64 CustomTicketNumber = 4;
   int32 GuestCount = 5;
   string CollectionTicketId = 6;
   OrderFormats OrderFormat = 7;
}
enum CheckPaymentStatuses {
   Processing = 0;
   Completed = 1;
   Error = 2;
   AnconError = 3;
   Cancelled = 4;
   Authorized = 5;
   None = -1;
}
message CheckTaxDto {
   string Id = 1; // default value could not be applied: 00000000-0000-0000-0000-000000000000
   .google.protobuf.Timestamp Created = 2;
   .google.protobuf.Timestamp Modified = 3;
   UsedTax Tax = 4;
}
message CreatedResponse {
   string Id = 1; // default value could not be applied: 00000000-0000-0000-0000-000000000000
}
enum DateTimeKind {
   Unspecified = 0;
   Utc = 1;
   Local = 2;
}
enum DayOfWeek {
   Sunday = 0;
   Monday = 1;
   Tuesday = 2;
   Wednesday = 3;
   Thursday = 4;
   Friday = 5;
   Saturday = 6;
}
message DiscountInfo {
   string DiscountId = 1;
   string DiscountName = 2;
}
enum DiscountTypes {
   Percentage = 0;
   Currency = 1;
}
message DiscountValue {
   string Value = 1;
   DiscountTypes Type = 2;
}
message ErrorResponse {
   string ErrorCode = 1;
   string Message = 2;
   string XCorrelationId = 1001;
   int64 Timestamp = 1002;
}
enum JTokenType {
   None = 0;
   Object = 1;
   Array = 2;
   Constructor = 3;
   Property = 4;
   Comment = 5;
   Integer = 6;
   Float = 7;
   String = 8;
   Boolean = 9;
   Null = 10;
   Undefined = 11;
   Date = 12;
   Raw = 13;
   Bytes = 14;
   Guid = 15;
   Uri = 16;
   TimeSpan = 17;
}
message LocalizedString {
   map<string,string> Translations = 1;
}
message LockedResponse {
   string ObjectId = 1; // default value could not be applied: 00000000-0000-0000-0000-000000000000
   string ObjectType = 2;
   string Timeout = 3;
   string Reason = 4;
}
enum MenuTreeTypes {
   Default = 0;
   Custom = 1;
}
enum MetadataTypes {
   Product = 0;
}
enum MewsInfoTypes {
   Room = 0;
   Reservation = 1;
}
message ModifyCheckItemQuantityCommand {
   string OutletId = 1; // default value could not be applied: 00000000-0000-0000-0000-000000000000
   string CheckId = 2; // default value could not be applied: 00000000-0000-0000-0000-000000000000
   string CheckItemId = 3; // default value could not be applied: 00000000-0000-0000-0000-000000000000
   string Quantity = 4;
   ModifyMode Mode = 5;
   string PinOverride = 6;
   string XCorrelationId = 7;
}
message ModifyCheckItemQuantityCommandResponse {
   CheckItemDto CheckItem = 1;
}
enum ModifyMode {
   None = 0;
   Set = 1;
   Add = 2;
   Subtract = 3;
}
message Money {
   string Amount = 1;
   string CurrencyCode = 2;
}
message MultiCreatedResponse {
   repeated string Ids = 1;
}
message MultiSuccessResponse {
   repeated string Ids = 1;
}
message Name {
   string Value = 1;
}
message NoContentResponse {
}
message NotFoundResponse {
   string Message = 1;
   string ErrorCode = 2; // default value could not be applied: 00000000-0000-0000-0000-000000000000
}
enum OrderFormats {
   // this is a composite/flags enumeration
   None = 0;
   EatIn = 1;
   TakeAway = 2;
   TableOrder = 4;
   Delivery = 8;
   DriveThru = 16;
   System = 32;
   PreGenerated = 64;
   BoxPickup = 128;
   All = 159;
   SystemAll = 191;
}
message OrderedProduct {
   string ProductId = 1; // default value could not be applied: 00000000-0000-0000-0000-000000000000
   string ProductName = 2;
   ProductTypes ProductType = 3;
   string VariantId = 4; // default value could not be applied: 00000000-0000-0000-0000-000000000000
   string VariantName = 5;
   VariantTypes VariantType = 6;
   bool HasVariants = 7;
   string ProductGroupId = 8; // default value could not be applied: 00000000-0000-0000-0000-000000000000
   string ProductGroupName = 9;
   string GlassesPerBottle = 10;
   bool UseBasePrice = 11;
   bool IsSystemProduct = 12;
   string ProductNumber = 13;
   string VariantNumber = 14;
   SortPosition Position = 15;
   StorageInformation StorageInfo = 16;
   Quantity SubProductQuantity = 17;
   string SubProductId = 18;
   LocalizedString LocalizedProductNames = 19;
   LocalizedString LocalizedVariantNames = 20;
}
enum PaymentMethodTypes {
   None = 0;
   Custom = 1;
   Adyen = 2;
   Cash = 3;
   Rounding = 4;
   Tip = 5;
   Invoice = 6;
   Cashback = 7;
   Mews = 8;
   GiftCards = 9;
   External = 10;
   Deliverect = 11;
   Wallet = 12;
   Retain24GiftCard = 13;
   Nets = 14;
   MpsGiftCard = 15;
   Manual = 16;
   Como = 17;
   StammyWallet = 18;
   Surfboard = 19;
   Maitres = 20;
   PrePayment = 21;
   Simulated = 22;
   CurrencyDifference = 23;
}
enum PaymentTypes {
   UNUSED = 0;
   Full = 1;
   CertainAmount = 2;
   CertainItems = 3;
}
message PricePerUnit {
   Money UnitPrice = 1;
   Money AdditionalPrice = 2;
}
message ProductAddOnGroup {
   string Id = 1; // default value could not be applied: 00000000-0000-0000-0000-000000000000
   string Name = 2;
   LocalizedString LocalizedCustomerFacingNames = 3;
}
message ProductIngredient {
   string Id = 1; // default value could not be applied: 00000000-0000-0000-0000-000000000000
   Name Name = 2;
   LocalizedString LocalizedNames = 3;
}
message ProductItemModificationModel {
   string Modification = 1;
   string IngredientId = 2;
   string AddOnGroupId = 3;
   string ReplaceId = 4;
   string Description = 5;
   string Quantity = 6;
   string FreeAmount = 7;
}
message ProductModification {
   string Modification = 1;
   Money Cost = 2;
   Money MaterialCost = 3;
   SortPosition Position = 4;
   ProductIngredient Ingredient = 5;
   ProductIngredient Replacement = 6;
   ProductAddOnGroup AddOnGroup = 7;
   Quantity Quantity = 8;
   Quantity FreeAmount = 9;
}
enum ProductShareTypes {
   Standard = 0;
   OutletSpecific = 1;
}
enum ProductTypes {
   Standard = 0;
   GlassBottle = 1;
   Volume = 2;
   Weight = 3;
   TimeBased = 4;
   GiftCard = 5;
   Wallet = 6;
   MultiProduct = 7;
   Retain24GiftCard = 8;
   MpsGiftCard = 9;
   StammyWallet = 10;
}
message ProtobufRequest {
   string XCorrelationId = 1001;
   oneof subtype {
      AddItemCommand AddItemCommand = 1;
      ModifyCheckItemQuantityCommand ModifyCheckItemQuantityCommand = 2;
   }
}
message ProtobufResponse {
   string XCorrelationId = 1001;
   int64 Timestamp = 1002;
   oneof subtype {
      ErrorResponse ErrorResponse = 1;
      SuccessResponse SuccessResponse = 2;
      AcceptedResponse AcceptedResponse = 3;
      BadRequestResponse BadRequestResponse = 4;
      CreatedResponse CreatedResponse = 5;
      LockedResponse LockedResponse = 7;
      MultiCreatedResponse MultiCreatedResponse = 8;
      MultiSuccessResponse MultiSuccessResponse = 9;
      NoContentResponse NoContentResponse = 10;
      NotFoundResponse NotFoundResponse = 11;
      RequestErrorResponse RequestErrorResponse = 14;
      UnhandledErrorResponse UnhandledErrorResponse = 15;
      AddItemCheckResponse AddItemCheckResponse = 16;
      ModifyCheckItemQuantityCommandResponse ModifyCheckItemQuantityCommandResponse = 17;
   }
}
message Quantity {
   string Value = 1;
}
enum ReceiptReceiverTypes {
   UNUSED = 0;
   Cashier = 1;
   Customer = 2;
}
message RequestErrorResponse {
}
enum SalesLocationTypes {
   None = 0;
   Table = 1;
   Pos = 2;
   Express = 3;
}
message Size {
   int32 Height = 1;
   int32 Width = 2;
   int32 Length = 3;
}
message SortPosition {
   int32 Position = 1;
}
message StorageInformation {
   int32 Temperature = 1;
   Size Size = 2;
}
message SubProductSpecificationModel {
   string SubProductId = 1; // default value could not be applied: 00000000-0000-0000-0000-000000000000
   string SubProductVariantId = 2; // default value could not be applied: 00000000-0000-0000-0000-000000000000
}
message SuccessResponse {
   string Message = 1;
}
enum TaxTypes {
   UNUSED = 0;
   VAT = 1;
   SalesTax = 2;
}
message TaxValue {
   TaxTypes Type = 1;
   string Rate = 2;
}
message UnhandledErrorResponse {
   string Message = 1;
}
message Unit {
   string Name = 1;
   UnitTypes Type = 2;
}
enum UnitTypes {
   Pieces = 0;
   Weight = 1;
   Volume = 2;
   Time = 3;
}
message UsedTax {
   string TaxId = 1; // default value could not be applied: 00000000-0000-0000-0000-000000000000
   TaxValue TaxValue = 2;
}
enum VariantTypes {
   Standard = 0;
   Glass = 1;
   Bottle = 2;
   Volume = 3;
   Weight = 4;
   TimeBased = 5;
   TopUp = 6;
   MultiProduct = 7;
}
