@platfformx/proto-contracts 1.3.10 → 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
|
}
|
|
@@ -7,7 +13,7 @@ export interface IndexCategoryResponse {
|
|
|
7
13
|
ok: boolean;
|
|
8
14
|
}
|
|
9
15
|
export interface IndexCategoriesRequest {
|
|
10
|
-
|
|
16
|
+
categories: Category[];
|
|
11
17
|
}
|
|
12
18
|
export interface IndexCategoriesResponse {
|
|
13
19
|
ok: boolean;
|
|
@@ -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
|
@@ -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 {
|
|
@@ -24,7 +32,7 @@ message IndexCategoryResponse {
|
|
|
24
32
|
}
|
|
25
33
|
|
|
26
34
|
message IndexCategoriesRequest {
|
|
27
|
-
repeated Category
|
|
35
|
+
repeated Category categories = 1;
|
|
28
36
|
}
|
|
29
37
|
|
|
30
38
|
message IndexCategoriesResponse {
|