233 lines
5.0 KiB
Protocol Buffer
233 lines
5.0 KiB
Protocol Buffer
syntax = "proto3";
|
|
package messages;
|
|
option go_package = "git.k6n.net/go-cart-actor/proto;messages";
|
|
|
|
import "google/protobuf/any.proto";
|
|
import "google/protobuf/timestamp.proto";
|
|
|
|
message ClearCartRequest {}
|
|
|
|
message AddItem {
|
|
uint32 item_id = 1;
|
|
int32 quantity = 2;
|
|
int64 price = 3;
|
|
int64 orgPrice = 9;
|
|
string sku = 4;
|
|
string name = 5;
|
|
string image = 6;
|
|
int32 stock = 7;
|
|
int32 tax = 8;
|
|
string brand = 13;
|
|
string category = 14;
|
|
string category2 = 15;
|
|
string category3 = 16;
|
|
string category4 = 17;
|
|
string category5 = 18;
|
|
string disclaimer = 10;
|
|
string articleType = 11;
|
|
string sellerId = 19;
|
|
string sellerName = 20;
|
|
string country = 21;
|
|
string saleStatus = 24;
|
|
optional string outlet = 12;
|
|
optional string storeId = 22;
|
|
optional uint32 parentId = 23;
|
|
string cgm = 25;
|
|
optional google.protobuf.Timestamp reservationEndTime = 26;
|
|
}
|
|
|
|
message RemoveItem { uint32 Id = 1; }
|
|
|
|
message ChangeQuantity {
|
|
uint32 Id = 1;
|
|
int32 quantity = 2;
|
|
}
|
|
|
|
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;
|
|
string id = 2;
|
|
optional string name = 3;
|
|
optional string address = 4;
|
|
optional string city = 5;
|
|
optional string zip = 6;
|
|
optional string country = 7;
|
|
}
|
|
|
|
message PickupPoint {
|
|
string id = 1;
|
|
optional string name = 2;
|
|
optional string address = 3;
|
|
optional string city = 4;
|
|
optional string zip = 5;
|
|
optional string country = 6;
|
|
}
|
|
|
|
message RemoveDelivery { uint32 id = 1; }
|
|
|
|
message SetUserId {
|
|
string userId = 1;
|
|
}
|
|
|
|
message LineItemMarking {
|
|
uint32 id = 1;
|
|
uint32 type = 2;
|
|
string marking = 3;
|
|
}
|
|
|
|
message RemoveLineItemMarking {
|
|
uint32 id = 1;
|
|
}
|
|
|
|
message SubscriptionAdded {
|
|
uint32 itemId = 1;
|
|
string detailsId = 3;
|
|
string orderReference = 4;
|
|
}
|
|
|
|
message PaymentStarted {
|
|
string paymentId = 1;
|
|
uint32 version = 2;
|
|
int64 amount = 3;
|
|
string currency = 4;
|
|
string provider = 5;
|
|
optional string method = 6;
|
|
optional google.protobuf.Timestamp startedAt = 7;
|
|
}
|
|
|
|
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 CreateCheckoutOrder {
|
|
string terms = 1;
|
|
string checkout = 2;
|
|
string confirmation = 3;
|
|
string push = 4;
|
|
string validation = 5;
|
|
string country = 6;
|
|
}
|
|
|
|
message OrderCreated {
|
|
string orderId = 1;
|
|
string status = 2;
|
|
}
|
|
|
|
message Noop {
|
|
// Intentionally empty - used for ownership acquisition or health pings
|
|
}
|
|
|
|
message InitializeCheckout {
|
|
string orderId = 1;
|
|
string status = 2;
|
|
bool paymentInProgress = 3;
|
|
}
|
|
|
|
message InventoryReserved {
|
|
string id = 1;
|
|
string status = 2;
|
|
optional string message = 3;
|
|
}
|
|
|
|
message AddVoucher {
|
|
string code = 1;
|
|
int64 value = 2;
|
|
repeated string voucherRules = 3;
|
|
string description = 4;
|
|
}
|
|
|
|
message RemoveVoucher { uint32 id = 1; }
|
|
|
|
message UpsertSubscriptionDetails {
|
|
optional string id = 1;
|
|
string offeringCode = 2;
|
|
string signingType = 3;
|
|
google.protobuf.Any data = 4;
|
|
}
|
|
|
|
message PreConditionFailed {
|
|
string operation = 1;
|
|
string error = 2;
|
|
google.protobuf.Any input = 3;
|
|
}
|
|
|
|
message GiftcardItem {
|
|
int64 value = 1;
|
|
string deliveryDate = 2;
|
|
string recipient = 3;
|
|
string recipientType = 4;
|
|
string message = 5;
|
|
optional google.protobuf.Any designConfig = 6;
|
|
}
|
|
|
|
message AddGiftcard {
|
|
GiftcardItem giftcard = 1;
|
|
}
|
|
|
|
message RemoveGiftcard {
|
|
uint32 id = 1;
|
|
}
|
|
|
|
message Mutation {
|
|
oneof type {
|
|
ClearCartRequest clear_cart = 1;
|
|
AddItem add_item = 2;
|
|
RemoveItem remove_item = 3;
|
|
ChangeQuantity change_quantity = 4;
|
|
SetDelivery set_delivery = 5;
|
|
SetPickupPoint set_pickup_point = 6;
|
|
RemoveDelivery remove_delivery = 7;
|
|
SetUserId set_user_id = 8;
|
|
LineItemMarking line_item_marking = 9;
|
|
RemoveLineItemMarking remove_line_item_marking = 10;
|
|
SubscriptionAdded subscription_added = 11;
|
|
PaymentDeclined payment_declined = 12;
|
|
ConfirmationViewed confirmation_viewed = 13;
|
|
CreateCheckoutOrder create_checkout_order = 14;
|
|
OrderCreated order_created = 15;
|
|
Noop noop = 16;
|
|
InitializeCheckout initialize_checkout = 17;
|
|
InventoryReserved inventory_reserved = 18;
|
|
AddVoucher add_voucher = 19;
|
|
RemoveVoucher remove_voucher = 20;
|
|
UpsertSubscriptionDetails upsert_subscription_details = 21;
|
|
PreConditionFailed pre_condition_failed = 22;
|
|
AddGiftcard add_giftcard = 23;
|
|
RemoveGiftcard remove_giftcard = 24;
|
|
PaymentStarted payment_started = 25;
|
|
PaymentCompleted payment_completed = 26;
|
|
PaymentEvent payment_event = 27;
|
|
}
|
|
}
|