@sakura-skytree/leaf-eats-contracts 1.2.1 → 1.2.3

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/restaurant.ts CHANGED
@@ -42,6 +42,14 @@ export interface GetRestaurantCategoriesResponse {
42
42
  categories: Category[];
43
43
  }
44
44
 
45
+ export interface DeleteCategoryRequest {
46
+ id: string;
47
+ }
48
+
49
+ export interface DeleteCategoryResponse {
50
+ ok: boolean;
51
+ }
52
+
45
53
  export interface CreateMenuItemRequest {
46
54
  title: string;
47
55
  imageUrl: string;
@@ -62,6 +70,14 @@ export interface GetMenuItemsResponse {
62
70
  items: CategoryItems[];
63
71
  }
64
72
 
73
+ export interface DeleteMenuItemRequest {
74
+ id: string;
75
+ }
76
+
77
+ export interface DeleteMenuItemResponse {
78
+ ok: boolean;
79
+ }
80
+
65
81
  export interface Restaurant {
66
82
  id: string;
67
83
  name: string;
@@ -83,7 +99,8 @@ export interface Product {
83
99
  }
84
100
 
85
101
  export interface CategoryItems {
86
- category: Category | undefined;
102
+ id: string;
103
+ title: string;
87
104
  products: Product[];
88
105
  }
89
106
 
@@ -98,9 +115,13 @@ export interface RestaurantServiceClient {
98
115
 
99
116
  getRestaurantCategories(request: GetRestaurantCategoriesRequest): Observable<GetRestaurantCategoriesResponse>;
100
117
 
118
+ deleteCategory(request: DeleteCategoryRequest): Observable<DeleteCategoryResponse>;
119
+
101
120
  createMenuItem(request: CreateMenuItemRequest): Observable<CreateMenuItemResponse>;
102
121
 
103
122
  getMenuItems(request: GetMenuItemsRequest): Observable<GetMenuItemsResponse>;
123
+
124
+ deleteMenuItem(request: DeleteMenuItemRequest): Observable<DeleteMenuItemResponse>;
104
125
  }
105
126
 
106
127
  export interface RestaurantServiceController {
@@ -123,6 +144,10 @@ export interface RestaurantServiceController {
123
144
  | Observable<GetRestaurantCategoriesResponse>
124
145
  | GetRestaurantCategoriesResponse;
125
146
 
147
+ deleteCategory(
148
+ request: DeleteCategoryRequest,
149
+ ): Promise<DeleteCategoryResponse> | Observable<DeleteCategoryResponse> | DeleteCategoryResponse;
150
+
126
151
  createMenuItem(
127
152
  request: CreateMenuItemRequest,
128
153
  ): Promise<CreateMenuItemResponse> | Observable<CreateMenuItemResponse> | CreateMenuItemResponse;
@@ -130,6 +155,10 @@ export interface RestaurantServiceController {
130
155
  getMenuItems(
131
156
  request: GetMenuItemsRequest,
132
157
  ): Promise<GetMenuItemsResponse> | Observable<GetMenuItemsResponse> | GetMenuItemsResponse;
158
+
159
+ deleteMenuItem(
160
+ request: DeleteMenuItemRequest,
161
+ ): Promise<DeleteMenuItemResponse> | Observable<DeleteMenuItemResponse> | DeleteMenuItemResponse;
133
162
  }
134
163
 
135
164
  export function RestaurantServiceControllerMethods() {
@@ -139,8 +168,10 @@ export function RestaurantServiceControllerMethods() {
139
168
  "createRestaurant",
140
169
  "createCategory",
141
170
  "getRestaurantCategories",
171
+ "deleteCategory",
142
172
  "createMenuItem",
143
173
  "getMenuItems",
174
+ "deleteMenuItem",
144
175
  ];
145
176
  for (const method of grpcMethods) {
146
177
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sakura-skytree/leaf-eats-contracts",
3
- "version": "1.2.1",
3
+ "version": "1.2.3",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/",
@@ -10,9 +10,11 @@ service RestaurantService {
10
10
 
11
11
  rpc CreateCategory(CreateCategoryRequest) returns(CreateCategoryResponse);
12
12
  rpc GetRestaurantCategories(GetRestaurantCategoriesRequest) returns(GetRestaurantCategoriesResponse);
13
+ rpc DeleteCategory(DeleteCategoryRequest) returns(DeleteCategoryResponse);
13
14
 
14
15
  rpc CreateMenuItem(CreateMenuItemRequest) returns(CreateMenuItemResponse);
15
16
  rpc GetMenuItems(GetMenuItemsRequest) returns(GetMenuItemsResponse);
17
+ rpc DeleteMenuItem(DeleteMenuItemRequest) returns(DeleteMenuItemResponse);
16
18
  }
17
19
 
18
20
  message GetRestaurantsResponse {
@@ -46,6 +48,13 @@ message GetRestaurantCategoriesResponse {
46
48
  repeated Category categories = 1;
47
49
  }
48
50
 
51
+ message DeleteCategoryRequest {
52
+ string id = 1;
53
+ }
54
+ message DeleteCategoryResponse {
55
+ bool ok = 1;
56
+ }
57
+
49
58
  message CreateMenuItemRequest {
50
59
  string title = 1;
51
60
  string imageUrl = 2;
@@ -63,6 +72,13 @@ message GetMenuItemsResponse {
63
72
  repeated CategoryItems items = 1;
64
73
  }
65
74
 
75
+ message DeleteMenuItemRequest {
76
+ string id = 1;
77
+ }
78
+ message DeleteMenuItemResponse {
79
+ bool ok = 1;
80
+ }
81
+
66
82
  message Restaurant {
67
83
  string id = 1;
68
84
  string name = 2;
@@ -84,6 +100,7 @@ message Product {
84
100
  }
85
101
 
86
102
  message CategoryItems {
87
- Category category = 1;
88
- repeated Product products = 2;
103
+ string id = 1;
104
+ string title = 2;
105
+ repeated Product products = 3;
89
106
  }