@sakura-skytree/leaf-eats-contracts 1.2.7 → 1.2.8
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/gen/cart.ts +3 -9
- package/gen/menu.ts +2 -0
- package/package.json +1 -1
- package/proto/cart.proto +4 -8
- package/proto/menu.proto +2 -2
package/gen/cart.ts
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
/* eslint-disable */
|
|
8
8
|
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
|
9
9
|
import { Observable } from "rxjs";
|
|
10
|
+
import { Product } from "./menu";
|
|
10
11
|
|
|
11
12
|
export const protobufPackage = "cart.v1";
|
|
12
13
|
|
|
@@ -16,7 +17,7 @@ export interface AddToCartRequest {
|
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
export interface AddToCartResponse {
|
|
19
|
-
|
|
20
|
+
product: Product | undefined;
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
export interface GetCartRequest {
|
|
@@ -24,14 +25,7 @@ export interface GetCartRequest {
|
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
export interface GetCartResponse {
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export interface CartProduct {
|
|
31
|
-
productId: string;
|
|
32
|
-
title: string;
|
|
33
|
-
imageUrl: string;
|
|
34
|
-
price: number;
|
|
28
|
+
items: Product[];
|
|
35
29
|
}
|
|
36
30
|
|
|
37
31
|
export const CART_V1_PACKAGE_NAME = "cart.v1";
|
package/gen/menu.ts
CHANGED
package/package.json
CHANGED
package/proto/cart.proto
CHANGED
|
@@ -2,6 +2,8 @@ syntax = "proto3";
|
|
|
2
2
|
|
|
3
3
|
package cart.v1;
|
|
4
4
|
|
|
5
|
+
import "menu.proto";
|
|
6
|
+
|
|
5
7
|
service CartService {
|
|
6
8
|
rpc AddToCart(AddToCartRequest) returns(AddToCartResponse);
|
|
7
9
|
rpc GetCart(GetCartRequest) returns(GetCartResponse);
|
|
@@ -13,7 +15,7 @@ message AddToCartRequest {
|
|
|
13
15
|
}
|
|
14
16
|
|
|
15
17
|
message AddToCartResponse {
|
|
16
|
-
|
|
18
|
+
menu.v1.Product product = 1;
|
|
17
19
|
}
|
|
18
20
|
|
|
19
21
|
message GetCartRequest {
|
|
@@ -21,12 +23,6 @@ message GetCartRequest {
|
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
message GetCartResponse {
|
|
24
|
-
repeated
|
|
26
|
+
repeated menu.v1.Product items = 1;
|
|
25
27
|
}
|
|
26
28
|
|
|
27
|
-
message CartProduct {
|
|
28
|
-
string product_id = 1;
|
|
29
|
-
string title = 2;
|
|
30
|
-
string image_url = 3;
|
|
31
|
-
float price = 4;
|
|
32
|
-
}
|
package/proto/menu.proto
CHANGED