@mamindom/contracts 1.0.161 → 1.0.163

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.
@@ -30,12 +30,20 @@ export interface SuggestCategory {
30
30
  name: string;
31
31
  productCount: number;
32
32
  }
33
+ export interface SuggestRedirect {
34
+ type: string;
35
+ id: string;
36
+ slug: string;
37
+ name: string;
38
+ }
33
39
  export interface SuggestResponse {
34
40
  query: string;
35
41
  products: SuggestProduct[];
36
42
  categories: SuggestCategory[];
37
43
  popularQueries: string[];
38
44
  total: number;
45
+ isFallback: boolean;
46
+ redirect?: SuggestRedirect | undefined;
39
47
  }
40
48
  export interface SynonymResponse {
41
49
  id: string;
@@ -123,6 +131,31 @@ export interface ListZeroResultsResponse {
123
131
  }
124
132
  export interface ClearZeroResultsRequest {
125
133
  }
134
+ export interface CurationResponse {
135
+ id: string;
136
+ query: string;
137
+ pinnedProductIds: string[];
138
+ hiddenProductIds: string[];
139
+ isActive: boolean;
140
+ createdAt: string;
141
+ updatedAt: string;
142
+ }
143
+ export interface ListCurationsRequest {
144
+ search?: string | undefined;
145
+ isActive?: boolean | undefined;
146
+ }
147
+ export interface ListCurationsResponse {
148
+ items: CurationResponse[];
149
+ }
150
+ export interface UpsertCurationRequest {
151
+ query: string;
152
+ pinnedProductIds: string[];
153
+ hiddenProductIds: string[];
154
+ isActive: boolean;
155
+ }
156
+ export interface DeleteCurationRequest {
157
+ id: string;
158
+ }
126
159
  export declare const CATALOG_V1_PACKAGE_NAME = "catalog.v1";
127
160
  export interface SearchServiceClient {
128
161
  suggest(request: SuggestRequest): Observable<SuggestResponse>;
@@ -138,6 +171,9 @@ export interface SearchServiceClient {
138
171
  reorderPopularQueries(request: ReorderPopularQueriesRequest): Observable<SuccessResponse>;
139
172
  listZeroResults(request: ListZeroResultsRequest): Observable<ListZeroResultsResponse>;
140
173
  clearZeroResults(request: ClearZeroResultsRequest): Observable<SuccessResponse>;
174
+ listCurations(request: ListCurationsRequest): Observable<ListCurationsResponse>;
175
+ upsertCuration(request: UpsertCurationRequest): Observable<CurationResponse>;
176
+ deleteCuration(request: DeleteCurationRequest): Observable<DeleteResponse>;
141
177
  }
142
178
  export interface SearchServiceController {
143
179
  suggest(request: SuggestRequest): Promise<SuggestResponse> | Observable<SuggestResponse> | SuggestResponse;
@@ -153,6 +189,9 @@ export interface SearchServiceController {
153
189
  reorderPopularQueries(request: ReorderPopularQueriesRequest): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
154
190
  listZeroResults(request: ListZeroResultsRequest): Promise<ListZeroResultsResponse> | Observable<ListZeroResultsResponse> | ListZeroResultsResponse;
155
191
  clearZeroResults(request: ClearZeroResultsRequest): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
192
+ listCurations(request: ListCurationsRequest): Promise<ListCurationsResponse> | Observable<ListCurationsResponse> | ListCurationsResponse;
193
+ upsertCuration(request: UpsertCurationRequest): Promise<CurationResponse> | Observable<CurationResponse> | CurationResponse;
194
+ deleteCuration(request: DeleteCurationRequest): Promise<DeleteResponse> | Observable<DeleteResponse> | DeleteResponse;
156
195
  }
157
196
  export declare function SearchServiceControllerMethods(): (constructor: Function) => void;
158
197
  export declare const SEARCH_SERVICE_NAME = "SearchService";
@@ -33,6 +33,9 @@ function SearchServiceControllerMethods() {
33
33
  "reorderPopularQueries",
34
34
  "listZeroResults",
35
35
  "clearZeroResults",
36
+ "listCurations",
37
+ "upsertCuration",
38
+ "deleteCuration",
36
39
  ];
37
40
  for (const method of grpcMethods) {
38
41
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
@@ -82,7 +82,7 @@ message AttributeWithValuesResponse {
82
82
  map<string, string> name = 4;
83
83
  string display_type = 5;
84
84
  int32 sort_order = 6;
85
- optional string guid_1c = 7;
85
+ optional string guid1c = 7;
86
86
  bool is_filterable = 8;
87
87
  repeated AttributeValueResponse values = 9;
88
88
  }
@@ -129,7 +129,7 @@ message AttributeResponse {
129
129
  map<string, string> name = 4;
130
130
  string display_type = 5;
131
131
  int32 sort_order = 6;
132
- optional string guid_1c = 7;
132
+ optional string guid1c = 7;
133
133
  bool is_filterable = 8;
134
134
  }
135
135
 
@@ -154,7 +154,7 @@ message CreateAttributeRequest {
154
154
  map<string, string> name = 3;
155
155
  string display_type = 4;
156
156
  int32 sort_order = 5;
157
- optional string guid_1c = 6;
157
+ optional string guid1c = 6;
158
158
  bool is_filterable = 7;
159
159
  }
160
160
 
@@ -178,7 +178,7 @@ message AttributeValueResponse {
178
178
  string attribute_id = 2;
179
179
  map<string, string> value = 3;
180
180
  optional string meta = 4;
181
- optional string guid_1c = 5;
181
+ optional string guid1c = 5;
182
182
  }
183
183
 
184
184
  message GetAttributeValuesRequest {
@@ -193,7 +193,7 @@ message CreateAttributeValueRequest {
193
193
  string attribute_id = 1;
194
194
  map<string, string> value = 2;
195
195
  optional string meta = 3;
196
- optional string guid_1c = 4;
196
+ optional string guid1c = 4;
197
197
  }
198
198
 
199
199
  message UpdateAttributeValueRequest {
@@ -26,6 +26,11 @@ service SearchService {
26
26
 
27
27
  rpc ListZeroResults (ListZeroResultsRequest) returns (ListZeroResultsResponse);
28
28
  rpc ClearZeroResults (ClearZeroResultsRequest) returns (SuccessResponse);
29
+
30
+
31
+ rpc ListCurations (ListCurationsRequest) returns (ListCurationsResponse);
32
+ rpc UpsertCuration (UpsertCurationRequest) returns (CurationResponse);
33
+ rpc DeleteCuration (DeleteCurationRequest) returns (DeleteResponse);
29
34
  }
30
35
 
31
36
 
@@ -56,12 +61,23 @@ message SuggestCategory {
56
61
  int32 product_count = 4;
57
62
  }
58
63
 
64
+
65
+ message SuggestRedirect {
66
+ string type = 1;
67
+ string id = 2;
68
+ string slug = 3;
69
+ string name = 4;
70
+ }
71
+
59
72
  message SuggestResponse {
60
73
  string query = 1;
61
74
  repeated SuggestProduct products = 2;
62
75
  repeated SuggestCategory categories = 3;
63
76
  repeated string popular_queries = 4;
64
- int32 total = 5;
77
+ int32 total = 5;
78
+
79
+ bool is_fallback = 6;
80
+ optional SuggestRedirect redirect = 7;
65
81
  }
66
82
 
67
83
 
@@ -176,3 +192,34 @@ message ListZeroResultsResponse {
176
192
 
177
193
  message ClearZeroResultsRequest {
178
194
  }
195
+
196
+
197
+ message CurationResponse {
198
+ string id = 1;
199
+ string query = 2;
200
+ repeated string pinned_product_ids = 3;
201
+ repeated string hidden_product_ids = 4;
202
+ bool is_active = 5;
203
+ string created_at = 6;
204
+ string updated_at = 7;
205
+ }
206
+
207
+ message ListCurationsRequest {
208
+ optional string search = 1;
209
+ optional bool is_active = 2;
210
+ }
211
+
212
+ message ListCurationsResponse {
213
+ repeated CurationResponse items = 1;
214
+ }
215
+
216
+ message UpsertCurationRequest {
217
+ string query = 1;
218
+ repeated string pinned_product_ids = 2;
219
+ repeated string hidden_product_ids = 3;
220
+ bool is_active = 4;
221
+ }
222
+
223
+ message DeleteCurationRequest {
224
+ string id = 1;
225
+ }
package/gen/search.ts CHANGED
@@ -44,12 +44,21 @@ export interface SuggestCategory {
44
44
  productCount: number;
45
45
  }
46
46
 
47
+ export interface SuggestRedirect {
48
+ type: string;
49
+ id: string;
50
+ slug: string;
51
+ name: string;
52
+ }
53
+
47
54
  export interface SuggestResponse {
48
55
  query: string;
49
56
  products: SuggestProduct[];
50
57
  categories: SuggestCategory[];
51
58
  popularQueries: string[];
52
59
  total: number;
60
+ isFallback: boolean;
61
+ redirect?: SuggestRedirect | undefined;
53
62
  }
54
63
 
55
64
  export interface SynonymResponse {
@@ -157,6 +166,36 @@ export interface ListZeroResultsResponse {
157
166
  export interface ClearZeroResultsRequest {
158
167
  }
159
168
 
169
+ export interface CurationResponse {
170
+ id: string;
171
+ query: string;
172
+ pinnedProductIds: string[];
173
+ hiddenProductIds: string[];
174
+ isActive: boolean;
175
+ createdAt: string;
176
+ updatedAt: string;
177
+ }
178
+
179
+ export interface ListCurationsRequest {
180
+ search?: string | undefined;
181
+ isActive?: boolean | undefined;
182
+ }
183
+
184
+ export interface ListCurationsResponse {
185
+ items: CurationResponse[];
186
+ }
187
+
188
+ export interface UpsertCurationRequest {
189
+ query: string;
190
+ pinnedProductIds: string[];
191
+ hiddenProductIds: string[];
192
+ isActive: boolean;
193
+ }
194
+
195
+ export interface DeleteCurationRequest {
196
+ id: string;
197
+ }
198
+
160
199
  export const CATALOG_V1_PACKAGE_NAME = "catalog.v1";
161
200
 
162
201
  export interface SearchServiceClient {
@@ -185,6 +224,12 @@ export interface SearchServiceClient {
185
224
  listZeroResults(request: ListZeroResultsRequest): Observable<ListZeroResultsResponse>;
186
225
 
187
226
  clearZeroResults(request: ClearZeroResultsRequest): Observable<SuccessResponse>;
227
+
228
+ listCurations(request: ListCurationsRequest): Observable<ListCurationsResponse>;
229
+
230
+ upsertCuration(request: UpsertCurationRequest): Observable<CurationResponse>;
231
+
232
+ deleteCuration(request: DeleteCurationRequest): Observable<DeleteResponse>;
188
233
  }
189
234
 
190
235
  export interface SearchServiceController {
@@ -235,6 +280,16 @@ export interface SearchServiceController {
235
280
  clearZeroResults(
236
281
  request: ClearZeroResultsRequest,
237
282
  ): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
283
+
284
+ listCurations(
285
+ request: ListCurationsRequest,
286
+ ): Promise<ListCurationsResponse> | Observable<ListCurationsResponse> | ListCurationsResponse;
287
+
288
+ upsertCuration(
289
+ request: UpsertCurationRequest,
290
+ ): Promise<CurationResponse> | Observable<CurationResponse> | CurationResponse;
291
+
292
+ deleteCuration(request: DeleteCurationRequest): Promise<DeleteResponse> | Observable<DeleteResponse> | DeleteResponse;
238
293
  }
239
294
 
240
295
  export function SearchServiceControllerMethods() {
@@ -253,6 +308,9 @@ export function SearchServiceControllerMethods() {
253
308
  "reorderPopularQueries",
254
309
  "listZeroResults",
255
310
  "clearZeroResults",
311
+ "listCurations",
312
+ "upsertCuration",
313
+ "deleteCuration",
256
314
  ];
257
315
  for (const method of grpcMethods) {
258
316
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mamindom/contracts",
3
3
  "description": "proto",
4
- "version": "1.0.161",
4
+ "version": "1.0.163",
5
5
  "main": "./dist/src/index.js",
6
6
  "types": "./dist/src/index.d.ts",
7
7
  "exports": {
@@ -82,7 +82,7 @@ message AttributeWithValuesResponse {
82
82
  map<string, string> name = 4;
83
83
  string display_type = 5;
84
84
  int32 sort_order = 6;
85
- optional string guid_1c = 7;
85
+ optional string guid1c = 7;
86
86
  bool is_filterable = 8;
87
87
  repeated AttributeValueResponse values = 9;
88
88
  }
@@ -129,7 +129,7 @@ message AttributeResponse {
129
129
  map<string, string> name = 4;
130
130
  string display_type = 5;
131
131
  int32 sort_order = 6;
132
- optional string guid_1c = 7;
132
+ optional string guid1c = 7;
133
133
  bool is_filterable = 8;
134
134
  }
135
135
 
@@ -154,7 +154,7 @@ message CreateAttributeRequest {
154
154
  map<string, string> name = 3;
155
155
  string display_type = 4;
156
156
  int32 sort_order = 5;
157
- optional string guid_1c = 6;
157
+ optional string guid1c = 6;
158
158
  bool is_filterable = 7;
159
159
  }
160
160
 
@@ -178,7 +178,7 @@ message AttributeValueResponse {
178
178
  string attribute_id = 2;
179
179
  map<string, string> value = 3;
180
180
  optional string meta = 4;
181
- optional string guid_1c = 5;
181
+ optional string guid1c = 5;
182
182
  }
183
183
 
184
184
  message GetAttributeValuesRequest {
@@ -193,7 +193,7 @@ message CreateAttributeValueRequest {
193
193
  string attribute_id = 1;
194
194
  map<string, string> value = 2;
195
195
  optional string meta = 3;
196
- optional string guid_1c = 4;
196
+ optional string guid1c = 4;
197
197
  }
198
198
 
199
199
  message UpdateAttributeValueRequest {
@@ -26,6 +26,11 @@ service SearchService {
26
26
 
27
27
  rpc ListZeroResults (ListZeroResultsRequest) returns (ListZeroResultsResponse);
28
28
  rpc ClearZeroResults (ClearZeroResultsRequest) returns (SuccessResponse);
29
+
30
+
31
+ rpc ListCurations (ListCurationsRequest) returns (ListCurationsResponse);
32
+ rpc UpsertCuration (UpsertCurationRequest) returns (CurationResponse);
33
+ rpc DeleteCuration (DeleteCurationRequest) returns (DeleteResponse);
29
34
  }
30
35
 
31
36
 
@@ -56,12 +61,23 @@ message SuggestCategory {
56
61
  int32 product_count = 4;
57
62
  }
58
63
 
64
+
65
+ message SuggestRedirect {
66
+ string type = 1;
67
+ string id = 2;
68
+ string slug = 3;
69
+ string name = 4;
70
+ }
71
+
59
72
  message SuggestResponse {
60
73
  string query = 1;
61
74
  repeated SuggestProduct products = 2;
62
75
  repeated SuggestCategory categories = 3;
63
76
  repeated string popular_queries = 4;
64
- int32 total = 5;
77
+ int32 total = 5;
78
+
79
+ bool is_fallback = 6;
80
+ optional SuggestRedirect redirect = 7;
65
81
  }
66
82
 
67
83
 
@@ -176,3 +192,34 @@ message ListZeroResultsResponse {
176
192
 
177
193
  message ClearZeroResultsRequest {
178
194
  }
195
+
196
+
197
+ message CurationResponse {
198
+ string id = 1;
199
+ string query = 2;
200
+ repeated string pinned_product_ids = 3;
201
+ repeated string hidden_product_ids = 4;
202
+ bool is_active = 5;
203
+ string created_at = 6;
204
+ string updated_at = 7;
205
+ }
206
+
207
+ message ListCurationsRequest {
208
+ optional string search = 1;
209
+ optional bool is_active = 2;
210
+ }
211
+
212
+ message ListCurationsResponse {
213
+ repeated CurationResponse items = 1;
214
+ }
215
+
216
+ message UpsertCurationRequest {
217
+ string query = 1;
218
+ repeated string pinned_product_ids = 2;
219
+ repeated string hidden_product_ids = 3;
220
+ bool is_active = 4;
221
+ }
222
+
223
+ message DeleteCurationRequest {
224
+ string id = 1;
225
+ }