@platfformx/proto-contracts 1.3.11 → 1.3.12

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.
@@ -1,5 +1,11 @@
1
1
  import { Observable } from "rxjs";
2
2
  export declare const protobufPackage = "search.v1";
3
+ export interface SearchSimilarProductsRequest {
4
+ productId: string;
5
+ }
6
+ export interface SearchSimilarProductsResponse {
7
+ hits: Product[];
8
+ }
3
9
  export interface IndexCategoryRequest {
4
10
  category: Category | undefined;
5
11
  }
@@ -84,6 +90,7 @@ export interface SearchServiceClient {
84
90
  indexCategory(request: IndexCategoryRequest): Observable<IndexCategoryResponse>;
85
91
  indexCategories(request: IndexCategoriesRequest): Observable<IndexCategoriesResponse>;
86
92
  deleteCategory(request: DeleteCategoryRequest): Observable<DeleteCategoryResponse>;
93
+ searchSimilarProducts(request: SearchSimilarProductsRequest): Observable<SearchSimilarProductsResponse>;
87
94
  }
88
95
  export interface SearchServiceController {
89
96
  searchProducts(request: SearchProductsRequest): Promise<SearchProductsResponse> | Observable<SearchProductsResponse> | SearchProductsResponse;
@@ -94,6 +101,7 @@ export interface SearchServiceController {
94
101
  indexCategory(request: IndexCategoryRequest): Promise<IndexCategoryResponse> | Observable<IndexCategoryResponse> | IndexCategoryResponse;
95
102
  indexCategories(request: IndexCategoriesRequest): Promise<IndexCategoriesResponse> | Observable<IndexCategoriesResponse> | IndexCategoriesResponse;
96
103
  deleteCategory(request: DeleteCategoryRequest): Promise<DeleteCategoryResponse> | Observable<DeleteCategoryResponse> | DeleteCategoryResponse;
104
+ searchSimilarProducts(request: SearchSimilarProductsRequest): Promise<SearchSimilarProductsResponse> | Observable<SearchSimilarProductsResponse> | SearchSimilarProductsResponse;
97
105
  }
98
106
  export declare function SearchServiceControllerMethods(): (constructor: Function) => void;
99
107
  export declare const SEARCH_SERVICE_NAME = "SearchService";
@@ -22,6 +22,7 @@ function SearchServiceControllerMethods() {
22
22
  "indexCategory",
23
23
  "indexCategories",
24
24
  "deleteCategory",
25
+ "searchSimilarProducts",
25
26
  ];
26
27
  for (const method of grpcMethods) {
27
28
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platfformx/proto-contracts",
3
- "version": "1.3.11",
3
+ "version": "1.3.12",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -13,6 +13,14 @@ service SearchService {
13
13
  rpc IndexCategories (IndexCategoriesRequest) returns (IndexCategoriesResponse);
14
14
  rpc DeleteCategory (DeleteCategoryRequest) returns (DeleteCategoryResponse);
15
15
 
16
+ rpc SearchSimilarProducts (SearchSimilarProductsRequest) returns (SearchSimilarProductsResponse);
17
+ }
18
+
19
+ message SearchSimilarProductsRequest {
20
+ string product_id = 1;
21
+ }
22
+ message SearchSimilarProductsResponse {
23
+ repeated Product hits = 1;
16
24
  }
17
25
 
18
26
  message IndexCategoryRequest {