@platfformx/proto-contracts 1.2.25 → 1.2.26
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.
|
@@ -12,11 +12,17 @@ export interface SearchProductsResponse {
|
|
|
12
12
|
currentPage: string;
|
|
13
13
|
}
|
|
14
14
|
export interface IndexProductRequest {
|
|
15
|
-
products: Product
|
|
15
|
+
products: Product | undefined;
|
|
16
16
|
}
|
|
17
17
|
export interface IndexProductResponse {
|
|
18
18
|
ok: boolean;
|
|
19
19
|
}
|
|
20
|
+
export interface IndexProductsRequest {
|
|
21
|
+
products: Product[];
|
|
22
|
+
}
|
|
23
|
+
export interface IndexProductsResponse {
|
|
24
|
+
ok: boolean;
|
|
25
|
+
}
|
|
20
26
|
export interface DeleteProductRequest {
|
|
21
27
|
productId: string;
|
|
22
28
|
}
|
|
@@ -39,11 +45,13 @@ export declare const SEARCH_V1_PACKAGE_NAME = "search.v1";
|
|
|
39
45
|
export interface SearchServiceClient {
|
|
40
46
|
searchProducts(request: SearchProductsRequest): Observable<SearchProductsResponse>;
|
|
41
47
|
indexProduct(request: IndexProductRequest): Observable<IndexProductResponse>;
|
|
48
|
+
indexProducts(request: IndexProductsRequest): Observable<IndexProductsResponse>;
|
|
42
49
|
deleteProduct(request: DeleteProductRequest): Observable<DeleteProductResponse>;
|
|
43
50
|
}
|
|
44
51
|
export interface SearchServiceController {
|
|
45
52
|
searchProducts(request: SearchProductsRequest): Promise<SearchProductsResponse> | Observable<SearchProductsResponse> | SearchProductsResponse;
|
|
46
53
|
indexProduct(request: IndexProductRequest): Promise<IndexProductResponse> | Observable<IndexProductResponse> | IndexProductResponse;
|
|
54
|
+
indexProducts(request: IndexProductsRequest): Promise<IndexProductsResponse> | Observable<IndexProductsResponse> | IndexProductsResponse;
|
|
47
55
|
deleteProduct(request: DeleteProductRequest): Promise<DeleteProductResponse> | Observable<DeleteProductResponse> | DeleteProductResponse;
|
|
48
56
|
}
|
|
49
57
|
export declare function SearchServiceControllerMethods(): (constructor: Function) => void;
|
|
@@ -13,7 +13,7 @@ exports.protobufPackage = "search.v1";
|
|
|
13
13
|
exports.SEARCH_V1_PACKAGE_NAME = "search.v1";
|
|
14
14
|
function SearchServiceControllerMethods() {
|
|
15
15
|
return function (constructor) {
|
|
16
|
-
const grpcMethods = ["searchProducts", "indexProduct", "deleteProduct"];
|
|
16
|
+
const grpcMethods = ["searchProducts", "indexProduct", "indexProducts", "deleteProduct"];
|
|
17
17
|
for (const method of grpcMethods) {
|
|
18
18
|
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
19
19
|
(0, microservices_1.GrpcMethod)("SearchService", method)(constructor.prototype[method], method, descriptor);
|
package/package.json
CHANGED
|
@@ -5,6 +5,7 @@ package search.v1;
|
|
|
5
5
|
service SearchService {
|
|
6
6
|
rpc SearchProducts (SearchProductsRequest) returns (SearchProductsResponse);
|
|
7
7
|
rpc IndexProduct (IndexProductRequest) returns (IndexProductResponse);
|
|
8
|
+
rpc IndexProducts (IndexProductsRequest) returns (IndexProductsResponse);
|
|
8
9
|
rpc DeleteProduct (DeleteProductRequest) returns (DeleteProductResponse);
|
|
9
10
|
}
|
|
10
11
|
|
|
@@ -23,12 +24,19 @@ message SearchProductsResponse {
|
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
message IndexProductRequest {
|
|
26
|
-
|
|
27
|
+
Product products = 1;
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
message IndexProductResponse {
|
|
30
31
|
bool ok = 1;
|
|
31
32
|
}
|
|
33
|
+
message IndexProductsRequest {
|
|
34
|
+
repeated Product products = 1;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
message IndexProductsResponse {
|
|
38
|
+
bool ok = 1;
|
|
39
|
+
}
|
|
32
40
|
|
|
33
41
|
message DeleteProductRequest {
|
|
34
42
|
string product_id = 1;
|