syntax = "proto3";

package svc.product.v1;

import "types/v1/cursor.proto";
import "types/v1/price.proto";
import "types/v1/product.proto";

option go_package = "svc/product/v1;productv1";

service ProductService {
  rpc ListProduct(ListProductRequest) returns (ListProductResponse);
}

message ListProductRequest {
  types.v1.Cursor cursor = 1;
  int32 limit = 2;
  string category = 3;

  // filters
  optional types.v1.Product.Scope scope = 400;
}

message ListProductResponse {
  types.v1.Cursor next = 1;
  message ListItem {
    types.v1.Product product = 1;
    repeated types.v1.Price prices = 2;
  }
  repeated ListItem items = 2;
  types.v1.Product default_product = 3;
}
