@sakura-skytree/leaf-eats-contracts 1.2.7 → 1.2.9

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 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
- ok: boolean;
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
- cartProducts: CartProduct[];
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
@@ -43,13 +43,15 @@ export interface GetProductByIdRequest {
43
43
  }
44
44
 
45
45
  export interface GetProductByIdResponse {
46
- product: Product | undefined;
46
+ product?: Product | undefined;
47
47
  }
48
48
 
49
49
  export interface GetProductsByIdsRequest {
50
+ ids: string[];
50
51
  }
51
52
 
52
53
  export interface GetProductsByIdsResponse {
54
+ products: Product[];
53
55
  }
54
56
 
55
57
  export interface Product {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sakura-skytree/leaf-eats-contracts",
3
- "version": "1.2.7",
3
+ "version": "1.2.9",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/",
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
- bool ok = 1;
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 CartProduct cart_products = 1;
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
@@ -44,15 +44,15 @@ message GetProductByIdRequest {
44
44
  }
45
45
 
46
46
  message GetProductByIdResponse {
47
- Product product = 1;
47
+ optional Product product = 1;
48
48
  }
49
49
 
50
50
  message GetProductsByIdsRequest {
51
-
51
+ repeated string ids = 1;
52
52
  }
53
53
 
54
54
  message GetProductsByIdsResponse {
55
-
55
+ repeated Product products = 1;
56
56
  }
57
57
 
58
58
  message Product {