import "common.proto";

message CStoreMarketing_GetFrontPageConfig_Request {
	optional .StoreBrowseContext context = 1;
	optional .StoreBrowseItemDataRequest data_request = 2;
}

message CStoreMarketing_GetFrontPageConfig_Response {
	optional .CStorePageCluster cluster = 1;
}

message CStoreMarketing_GetItemsToFeature_Request {
	optional .StoreBrowseContext context = 1;
	optional .StoreBrowseItemDataRequest data_request = 2;
	optional .CStoreMarketing_GetItemsToFeature_Request_SpotlightFilter include_spotlights = 5;
	optional bool include_dailydeals = 6;
	optional int32 include_top_specials_count = 7;
	optional bool include_purchase_recommendations = 8;
	repeated .StoreItemID additional_purchase_item_ids = 9;
}

message CStoreMarketing_GetItemsToFeature_Request_SpotlightFilter {
	optional string location = 1;
	optional string category = 2;
	optional int32 genre_id = 3;
}

message CStoreMarketing_GetItemsToFeature_Response {
	repeated .CStoreMarketing_GetItemsToFeature_Response_Spotlight spotlights = 1;
	repeated .StoreCapsule daily_deals = 2;
	repeated .StoreCapsule specials = 3;
	repeated .StoreCapsule purchase_recommendations = 4;
}

message CStoreMarketing_GetItemsToFeature_Response_Spotlight {
	optional .StoreItemID item_id = 1;
	optional .StoreItem associated_item = 2;
	optional string spotlight_template = 3;
	optional string spotlight_title = 4;
	optional string spotlight_body = 5;
	optional string asset_url = 6;
	optional string spotlight_link_url = 7;
	optional uint32 start_date = 8;
	optional uint32 end_date = 9;
}

message CStorePageCluster {
	repeated .CStorePageCluster_CapsuleList capsule_lists = 1;
	optional .StoreCapsule takeover = 2;
	repeated .CStorePageCluster_Asset assets = 3;
	repeated .CStorePageCluster_Asset custom_assets = 4;
	optional string layout = 5;
	repeated .CStorePageCluster_Field fields = 6;
}

message CStorePageCluster_Asset {
	optional string asset_name = 1;
	optional string asset_path = 2;
}

message CStorePageCluster_CapsuleList {
	optional string name = 1;
	repeated .StoreCapsule capsules = 2;
	optional int32 max_visible = 3;
	optional int32 max_unreleased = 4;
}

message CStorePageCluster_Field {
	optional string name = 1;
	optional string value = 2;
}

message StoreCapsule {
	optional .StoreItemID item_id = 1;
	optional .StoreItem item = 2;
}

service StoreMarketing {
	// bConstMethod=true, ePrivilege=2, eWebAPIKeyRequirement=1
	rpc GetFrontPageConfig (.CStoreMarketing_GetFrontPageConfig_Request) returns (.CStoreMarketing_GetFrontPageConfig_Response);
	// bConstMethod=true, ePrivilege=2, eWebAPIKeyRequirement=1
	rpc GetItemsToFeature (.CStoreMarketing_GetItemsToFeature_Request) returns (.CStoreMarketing_GetItemsToFeature_Response);
}

