@sakura-skytree/leaf-eats-contracts 1.2.2 → 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;
@@ -99,9 +115,13 @@ export interface RestaurantServiceClient {
99
115
 
100
116
  getRestaurantCategories(request: GetRestaurantCategoriesRequest): Observable<GetRestaurantCategoriesResponse>;
101
117
 
118
+ deleteCategory(request: DeleteCategoryRequest): Observable<DeleteCategoryResponse>;
119
+
102
120
  createMenuItem(request: CreateMenuItemRequest): Observable<CreateMenuItemResponse>;
103
121
 
104
122
  getMenuItems(request: GetMenuItemsRequest): Observable<GetMenuItemsResponse>;
123
+
124
+ deleteMenuItem(request: DeleteMenuItemRequest): Observable<DeleteMenuItemResponse>;
105
125
  }
106
126
 
107
127
  export interface RestaurantServiceController {
@@ -124,6 +144,10 @@ export interface RestaurantServiceController {
124
144
  | Observable<GetRestaurantCategoriesResponse>
125
145
  | GetRestaurantCategoriesResponse;
126
146
 
147
+ deleteCategory(
148
+ request: DeleteCategoryRequest,
149
+ ): Promise<DeleteCategoryResponse> | Observable<DeleteCategoryResponse> | DeleteCategoryResponse;
150
+
127
151
  createMenuItem(
128
152
  request: CreateMenuItemRequest,
129
153
  ): Promise<CreateMenuItemResponse> | Observable<CreateMenuItemResponse> | CreateMenuItemResponse;
@@ -131,6 +155,10 @@ export interface RestaurantServiceController {
131
155
  getMenuItems(
132
156
  request: GetMenuItemsRequest,
133
157
  ): Promise<GetMenuItemsResponse> | Observable<GetMenuItemsResponse> | GetMenuItemsResponse;
158
+
159
+ deleteMenuItem(
160
+ request: DeleteMenuItemRequest,
161
+ ): Promise<DeleteMenuItemResponse> | Observable<DeleteMenuItemResponse> | DeleteMenuItemResponse;
134
162
  }
135
163
 
136
164
  export function RestaurantServiceControllerMethods() {
@@ -140,8 +168,10 @@ export function RestaurantServiceControllerMethods() {
140
168
  "createRestaurant",
141
169
  "createCategory",
142
170
  "getRestaurantCategories",
171
+ "deleteCategory",
143
172
  "createMenuItem",
144
173
  "getMenuItems",
174
+ "deleteMenuItem",
145
175
  ];
146
176
  for (const method of grpcMethods) {
147
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.2",
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;