@barumetric/contracts 1.2.0 → 1.2.1

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.
@@ -7,6 +7,7 @@
7
7
  /* eslint-disable */
8
8
  import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
9
9
  import { Observable } from "rxjs";
10
+ import { Empty } from "./google/protobuf/empty";
10
11
 
11
12
  export const protobufPackage = "categories.v1";
12
13
 
@@ -146,7 +147,7 @@ export interface DeleteAttributeRequest {
146
147
  id: string;
147
148
  }
148
149
 
149
- export interface GetTreeResponse {
150
+ export interface GetAllCategoriesResponse {
150
151
  categories: Category[];
151
152
  }
152
153
 
@@ -253,9 +254,9 @@ export interface EnumValueInput {
253
254
  export const CATEGORIES_V1_PACKAGE_NAME = "categories.v1";
254
255
 
255
256
  export interface CategoriesServiceClient {
256
- /** Получить дерево категорий */
257
+ /** Получить все категории */
257
258
 
258
- getTree(request: GetTreeRequest): Observable<GetTreeResponse>;
259
+ getAllCategories(request: Empty): Observable<GetAllCategoriesResponse>;
259
260
 
260
261
  /** Получить категорию по ID */
261
262
 
@@ -295,9 +296,11 @@ export interface CategoriesServiceClient {
295
296
  }
296
297
 
297
298
  export interface CategoriesServiceController {
298
- /** Получить дерево категорий */
299
+ /** Получить все категории */
299
300
 
300
- getTree(request: GetTreeRequest): Promise<GetTreeResponse> | Observable<GetTreeResponse> | GetTreeResponse;
301
+ getAllCategories(
302
+ request: Empty,
303
+ ): Promise<GetAllCategoriesResponse> | Observable<GetAllCategoriesResponse> | GetAllCategoriesResponse;
301
304
 
302
305
  /** Получить категорию по ID */
303
306
 
@@ -357,7 +360,7 @@ export interface CategoriesServiceController {
357
360
  export function CategoriesServiceControllerMethods() {
358
361
  return function (constructor: Function) {
359
362
  const grpcMethods: string[] = [
360
- "getTree",
363
+ "getAllCategories",
361
364
  "getCategory",
362
365
  "getCategoryBySlug",
363
366
  "getAttributes",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barumetric/contracts",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "Protobuf definitions and generated TypeScript types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -5,8 +5,8 @@ package categories.v1;
5
5
  import "google/protobuf/empty.proto";
6
6
 
7
7
  service CategoriesService {
8
- // Получить дерево категорий
9
- rpc GetTree (GetTreeRequest) returns (GetTreeResponse);
8
+ // Получить все категории
9
+ rpc GetAllCategories (google.protobuf.Empty) returns (GetAllCategoriesResponse);
10
10
 
11
11
  // Получить категорию по ID
12
12
  rpc GetCategory (GetCategoryRequest) returns (GetCategoryResponse);
@@ -118,7 +118,7 @@ message DeleteAttributeRequest {
118
118
 
119
119
  // Ответы
120
120
 
121
- message GetTreeResponse {
121
+ message GetAllCategoriesResponse {
122
122
  repeated Category categories = 1;
123
123
  }
124
124