Update proto definitions
This commit is contained in:
@@ -1,39 +1,124 @@
|
|||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
package ozon.products;
|
package ozon.products;
|
||||||
|
import "google/protobuf/timestamp.proto";
|
||||||
|
|
||||||
option go_package = "./ozon/products";
|
option go_package = "./ozon/products";
|
||||||
|
|
||||||
service ProductsService {
|
service ProductsService {
|
||||||
// Retrieves a list of products based on the provided request.
|
// Retrieves a list of products based on the provided request.
|
||||||
rpc GetListOfProducts(GetListOfProductsRequest) returns (stream OzonProductItem);
|
rpc GetListOfProducts(GetListOfProductsRequest) returns (stream ProductDetails);
|
||||||
}
|
}
|
||||||
|
|
||||||
message GetListOfProductsRequest{
|
message GetListOfProductsRequest{
|
||||||
message Filter {
|
|
||||||
repeated string offer_id = 1; // List of offer IDs to filter products
|
|
||||||
repeated int64 product_id = 2; // List of product IDs to filter products
|
|
||||||
string visibility = 3; // Visibility status of the products
|
|
||||||
}
|
}
|
||||||
|
|
||||||
message Body {
|
message ProductDetails {
|
||||||
Filter filter = 1; // Filter criteria for the request
|
repeated string barcodes = 1;
|
||||||
|
repeated string color_image = 2;
|
||||||
|
repeated Commission commissions = 3;
|
||||||
|
google.protobuf.Timestamp created_at = 4;
|
||||||
|
string currency_code = 5;
|
||||||
|
int64 description_category_id = 6;
|
||||||
|
int32 discounted_fbo_stocks = 7;
|
||||||
|
repeated Error errors = 8;
|
||||||
|
bool has_discounted_fbo_item = 9;
|
||||||
|
int64 id = 10;
|
||||||
|
repeated string images = 11;
|
||||||
|
repeated string images360 = 12;
|
||||||
|
bool is_archived = 13;
|
||||||
|
bool is_autoarchived = 14;
|
||||||
|
bool is_discounted = 15;
|
||||||
|
bool is_kgt = 16;
|
||||||
|
bool is_prepayment_allowed = 17;
|
||||||
|
bool is_super = 18;
|
||||||
|
string marketing_price = 19;
|
||||||
|
string min_price = 20;
|
||||||
|
ModelInfo model_info = 21;
|
||||||
|
string name = 22;
|
||||||
|
string offer_id = 23;
|
||||||
|
string old_price = 24;
|
||||||
|
string price = 25;
|
||||||
|
PriceIndex price_indexes = 26;
|
||||||
|
repeated string primary_image = 27;
|
||||||
|
repeated Source sources = 28;
|
||||||
|
Status statuses = 29;
|
||||||
|
Stock stocks = 30;
|
||||||
|
int64 type_id = 31;
|
||||||
|
google.protobuf.Timestamp updated_at = 32;
|
||||||
|
string vat = 33;
|
||||||
|
VisibilityDetails visibility_details = 34;
|
||||||
|
double volume_weight = 35;
|
||||||
|
|
||||||
|
message Error {
|
||||||
|
string code = 1;
|
||||||
|
string message = 2;
|
||||||
|
repeated ErrorText texts = 3;
|
||||||
|
|
||||||
|
message ErrorText {
|
||||||
|
string lang = 1;
|
||||||
|
string text = 2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64 marketplace_id = 1; // ID of the marketplace
|
message ModelInfo {
|
||||||
Body body = 2; // Body containing the filter criteria
|
int64 model_id = 1;
|
||||||
|
int64 count = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
message OzonProductItem {
|
message Commission {
|
||||||
message Quants {
|
string name = 1;
|
||||||
string quant_code = 1; // Code representing the quant
|
double value = 2;
|
||||||
uint32 quant_size = 2; // Size of the quant
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool archived = 1; // Indicates if the product is archived
|
message PriceIndex {
|
||||||
bool has_fbo_stocks = 2; // Indicates if there are FBO stocks available
|
PriceIndexExternal external = 1;
|
||||||
bool has_fbs_stocks = 3; // Indicates if there are FBS stocks available
|
PriceIndexOzon ozon = 2;
|
||||||
bool is_discounted = 4; // Indicates if the product is discounted
|
PriceIndexSelfMarketplace self_marketplace = 3;
|
||||||
string offer_id = 5; // Unique identifier for the offer
|
|
||||||
uint32 product_id = 6; // Unique identifier for the product
|
message PriceIndexExternal {
|
||||||
repeated Quants quants = 7; // List of quants associated with the product
|
double min_price = 1;
|
||||||
string test = 8; // Additional test field, purpose not specified
|
string currency = 2;
|
||||||
|
double price_index = 3;
|
||||||
|
}
|
||||||
|
message PriceIndexOzon {
|
||||||
|
double min_price = 1;
|
||||||
|
string currency = 2;
|
||||||
|
double price_index = 3;
|
||||||
|
}
|
||||||
|
message PriceIndexSelfMarketplace {
|
||||||
|
double min_price = 1;
|
||||||
|
string currency = 2;
|
||||||
|
double price_index = 3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
message Source {
|
||||||
|
string source = 1;
|
||||||
|
string source_name = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message Status {
|
||||||
|
string state = 1;
|
||||||
|
string state_name = 2;
|
||||||
|
string state_tooltip = 3;
|
||||||
|
string state_sys_name = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message Stock {
|
||||||
|
repeated StockItem stocks = 1;
|
||||||
|
|
||||||
|
message StockItem {
|
||||||
|
int32 present = 1;
|
||||||
|
int32 reserved = 2;
|
||||||
|
string type = 3;
|
||||||
|
string shipment_type = 4;
|
||||||
|
int64 sku = 5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
message VisibilityDetails {
|
||||||
|
bool visible = 1;
|
||||||
|
string reason = 2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user