diff --git a/product/proto/admin/product.proto b/product/proto/admin/product.proto index e964f2f..26ce74f 100644 --- a/product/proto/admin/product.proto +++ b/product/proto/admin/product.proto @@ -19,6 +19,27 @@ service Product { body: "*" }; } + rpc Items(ItemsReq) returns (ItemsResp) { + option (google.api.http) = { + get: "/admin/v3/product" + }; + } +} + +message ItemsReq { + string name = 1 [(buf.validate.field).string = {max_len: 256}]; + uint32 page = 2 [(buf.validate.field) = { + ignore: IGNORE_IF_ZERO_VALUE, + uint32: {gte: 1} + }]; + uint32 page_size = 3 [(buf.validate.field) = { + ignore: IGNORE_IF_ZERO_VALUE, + uint32: {gte: 1, lte: 100} + }]; +} + +message ItemsResp { + repeated Item items = 1; } message AddReq {