@platfformx/proto-contracts 1.1.12 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package product;
|
|
4
|
+
|
|
5
|
+
service ProductService {
|
|
6
|
+
rpc CreateProduct (CreateProductRequest) returns (ProductResponse);
|
|
7
|
+
rpc UpdateProduct (UpdateProductRequest) returns (ProductResponse);
|
|
8
|
+
rpc DeleteProduct (DeleteProductRequest) returns (DeleteProductResponse);
|
|
9
|
+
rpc GetProduct(GetProductRequest) returns (ProductResponse);
|
|
10
|
+
rpc GetProducts(GetProductsRequest) returns (GetProductsResponse);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
message CreateProductRequest{
|
|
14
|
+
string title = 1;
|
|
15
|
+
optional string description = 2;
|
|
16
|
+
double price = 3;
|
|
17
|
+
repeated string images = 4;
|
|
18
|
+
int32 stock = 5;
|
|
19
|
+
string category_id = 7;
|
|
20
|
+
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
message GetProductRequest {
|
|
24
|
+
string product_id = 1;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
message GetProductsRequest {
|
|
28
|
+
optional string category_id = 1;
|
|
29
|
+
int32 page = 2;
|
|
30
|
+
int32 limit = 3;
|
|
31
|
+
}
|
|
32
|
+
message GetProductsResponse {
|
|
33
|
+
repeated ProductResponse products = 1;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
message UpdateProductRequest {
|
|
37
|
+
string product_id = 1;
|
|
38
|
+
optional string title = 2;
|
|
39
|
+
optional double price = 3;
|
|
40
|
+
repeated string images = 4;
|
|
41
|
+
optional string description = 5;
|
|
42
|
+
optional int32 stock = 6;
|
|
43
|
+
optional string category_id = 7;
|
|
44
|
+
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
message DeleteProductRequest {
|
|
48
|
+
string product_id = 1;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
message DeleteProductResponse {
|
|
52
|
+
bool success = 1;
|
|
53
|
+
}
|
|
54
|
+
message ProductResponse{
|
|
55
|
+
string id = 1;
|
|
56
|
+
string slug = 2;
|
|
57
|
+
string title = 3;
|
|
58
|
+
optional string description = 4;
|
|
59
|
+
string category_id = 5;
|
|
60
|
+
double price = 6;
|
|
61
|
+
repeated string images = 7;
|
|
62
|
+
string status = 8;
|
|
63
|
+
float rating = 9;
|
|
64
|
+
int32 review_count = 10;
|
|
65
|
+
string created_at = 11;
|
|
66
|
+
string updated_at = 12;
|
|
67
|
+
}
|