syntax = "proto3"; package checkout_messages; option go_package = "git.k6n.net/go-cart-actor/proto/checkout;checkout_messages"; import "google/protobuf/any.proto"; import "google/protobuf/timestamp.proto"; message SetDelivery { string provider = 1; repeated uint32 items = 2; optional PickupPoint pickupPoint = 3; string country = 4; string zip = 5; optional string address = 6; optional string city = 7; } message SetPickupPoint { uint32 deliveryId = 1; PickupPoint pickupPoint = 2; } message PickupPoint { string id = 2; optional string name = 3; optional string address = 4; optional string city = 5; optional string zip = 6; optional string country = 7; } message RemoveDelivery { uint32 id = 1; } message PaymentStarted { string paymentId = 1; int64 amount = 3; string currency = 4; string provider = 5; optional string method = 6; optional google.protobuf.Timestamp startedAt = 7; repeated uint32 items = 2; } message PaymentCompleted { string paymentId = 1; string status = 2; int64 amount = 3; string currency = 4; optional string processorReference = 5; optional google.protobuf.Timestamp completedAt = 6; } message PaymentDeclined { string paymentId = 1; string message = 2; optional string code = 3; } message PaymentEvent { string paymentId = 1; string name = 2; bool success = 3; google.protobuf.Any data = 4; } message ConfirmationViewed { google.protobuf.Timestamp viewedAt = 1; } message OrderCreated { string orderId = 1; string status = 2; google.protobuf.Timestamp createdAt = 3; } message InitializeCheckout { string orderId = 1; uint64 cartId = 2; uint32 version = 3; google.protobuf.Any cartState = 4; } message InventoryReserved { string id = 1; string status = 2; optional string message = 3; } message Mutation { oneof type { SetDelivery set_delivery = 1; SetPickupPoint set_pickup_point = 2; RemoveDelivery remove_delivery = 3; PaymentDeclined payment_declined = 4; ConfirmationViewed confirmation_viewed = 5; OrderCreated order_created = 7; InitializeCheckout initialize_checkout = 9; InventoryReserved inventory_reserved = 10; PaymentStarted payment_started = 11; PaymentCompleted payment_completed = 12; PaymentEvent payment_event = 13; } }