@mamindom/contracts 1.0.111 → 1.0.113

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.
@@ -295,6 +295,7 @@ export interface GetProductsRequest {
295
295
  priceMax?: number | undefined;
296
296
  sortBy?: string | undefined;
297
297
  attributeValueIds: string[];
298
+ brandIds: string[];
298
299
  }
299
300
  export interface GetProductsResponse {
300
301
  items: ProductListItemResponse[];
@@ -464,7 +465,7 @@ export interface DeleteProductVariantRequest {
464
465
  id: string;
465
466
  }
466
467
  export interface GetRelatedProductsRequest {
467
- productId: string;
468
+ productId?: string | undefined;
468
469
  type?: RelatedProductType | undefined;
469
470
  productSlug?: string | undefined;
470
471
  }
@@ -29,7 +29,7 @@ export interface GetReviewsResponse {
29
29
  meta: PaginationMeta | undefined;
30
30
  }
31
31
  export interface CreateReviewRequest {
32
- productId: string;
32
+ productId?: string | undefined;
33
33
  authorName: string;
34
34
  authorEmail: string;
35
35
  body: string;
@@ -2,6 +2,17 @@ import { Observable } from "rxjs";
2
2
  export declare const protobufPackage = "catalog.v1";
3
3
  export interface GetShopFiltersRequest {
4
4
  categoryId: string;
5
+ /**
6
+ * Поточно застосовані фільтри. Counts по кожному facet рахуються
7
+ * з виключенням саме того facet — щоб лічильники реагували на вибір.
8
+ */
9
+ brandIds: string[];
10
+ colorIds: string[];
11
+ sizeIds: string[];
12
+ priceMin?: number | undefined;
13
+ priceMax?: number | undefined;
14
+ inStock?: boolean | undefined;
15
+ search?: string | undefined;
5
16
  }
6
17
  export interface GetShopFiltersResponse {
7
18
  brands: ShopFilterOption[];
@@ -280,6 +280,7 @@ message GetProductsRequest {
280
280
  optional string sort_by = 9;
281
281
 
282
282
  repeated string attribute_value_ids = 10;
283
+ repeated string brand_ids = 11;
283
284
  }
284
285
 
285
286
  message GetProductsResponse {
@@ -425,9 +426,9 @@ enum RelatedProductType {
425
426
  }
426
427
 
427
428
  message GetRelatedProductsRequest {
428
- string product_id = 1;
429
+ optional string product_id = 1;
429
430
  optional RelatedProductType type = 2;
430
- optional string product_slug = 3;
431
+ optional string product_slug = 3;
431
432
  }
432
433
 
433
434
  message RelatedProductItem {
@@ -48,11 +48,11 @@ message GetReviewsResponse {
48
48
 
49
49
 
50
50
  message CreateReviewRequest {
51
- string product_id = 1;
52
- string author_name = 2;
53
- string author_email = 3;
54
- string body = 4;
55
- int32 rating = 5;
51
+ optional string product_id = 1;
52
+ string author_name = 2;
53
+ string author_email = 3;
54
+ string body = 4;
55
+ int32 rating = 5;
56
56
  optional string product_slug = 6;
57
57
  }
58
58
 
@@ -13,6 +13,16 @@ service ShopFilterService {
13
13
 
14
14
  message GetShopFiltersRequest {
15
15
  string category_id = 1;
16
+
17
+ // Поточно застосовані фільтри. Counts по кожному facet рахуються
18
+ // з виключенням саме того facet — щоб лічильники реагували на вибір.
19
+ repeated string brand_ids = 2;
20
+ repeated string color_ids = 3;
21
+ repeated string size_ids = 4;
22
+ optional double price_min = 5;
23
+ optional double price_max = 6;
24
+ optional bool in_stock = 7;
25
+ optional string search = 8;
16
26
  }
17
27
 
18
28
 
package/gen/product.ts CHANGED
@@ -309,6 +309,7 @@ export interface GetProductsRequest {
309
309
  priceMax?: number | undefined;
310
310
  sortBy?: string | undefined;
311
311
  attributeValueIds: string[];
312
+ brandIds: string[];
312
313
  }
313
314
 
314
315
  export interface GetProductsResponse {
@@ -479,7 +480,7 @@ export interface DeleteProductVariantRequest {
479
480
  }
480
481
 
481
482
  export interface GetRelatedProductsRequest {
482
- productId: string;
483
+ productId?: string | undefined;
483
484
  type?: RelatedProductType | undefined;
484
485
  productSlug?: string | undefined;
485
486
  }
@@ -43,7 +43,7 @@ export interface GetReviewsResponse {
43
43
  }
44
44
 
45
45
  export interface CreateReviewRequest {
46
- productId: string;
46
+ productId?: string | undefined;
47
47
  authorName: string;
48
48
  authorEmail: string;
49
49
  body: string;
@@ -12,6 +12,17 @@ export const protobufPackage = "catalog.v1";
12
12
 
13
13
  export interface GetShopFiltersRequest {
14
14
  categoryId: string;
15
+ /**
16
+ * Поточно застосовані фільтри. Counts по кожному facet рахуються
17
+ * з виключенням саме того facet — щоб лічильники реагували на вибір.
18
+ */
19
+ brandIds: string[];
20
+ colorIds: string[];
21
+ sizeIds: string[];
22
+ priceMin?: number | undefined;
23
+ priceMax?: number | undefined;
24
+ inStock?: boolean | undefined;
25
+ search?: string | undefined;
15
26
  }
16
27
 
17
28
  export interface GetShopFiltersResponse {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mamindom/contracts",
3
3
  "description": "proto",
4
- "version": "1.0.111",
4
+ "version": "1.0.113",
5
5
  "main": "./dist/src/index.js",
6
6
  "types": "./dist/src/index.d.ts",
7
7
  "exports": {
@@ -280,6 +280,7 @@ message GetProductsRequest {
280
280
  optional string sort_by = 9;
281
281
 
282
282
  repeated string attribute_value_ids = 10;
283
+ repeated string brand_ids = 11;
283
284
  }
284
285
 
285
286
  message GetProductsResponse {
@@ -425,9 +426,9 @@ enum RelatedProductType {
425
426
  }
426
427
 
427
428
  message GetRelatedProductsRequest {
428
- string product_id = 1;
429
+ optional string product_id = 1;
429
430
  optional RelatedProductType type = 2;
430
- optional string product_slug = 3;
431
+ optional string product_slug = 3;
431
432
  }
432
433
 
433
434
  message RelatedProductItem {
@@ -48,11 +48,11 @@ message GetReviewsResponse {
48
48
 
49
49
 
50
50
  message CreateReviewRequest {
51
- string product_id = 1;
52
- string author_name = 2;
53
- string author_email = 3;
54
- string body = 4;
55
- int32 rating = 5;
51
+ optional string product_id = 1;
52
+ string author_name = 2;
53
+ string author_email = 3;
54
+ string body = 4;
55
+ int32 rating = 5;
56
56
  optional string product_slug = 6;
57
57
  }
58
58
 
@@ -13,6 +13,16 @@ service ShopFilterService {
13
13
 
14
14
  message GetShopFiltersRequest {
15
15
  string category_id = 1;
16
+
17
+ // Поточно застосовані фільтри. Counts по кожному facet рахуються
18
+ // з виключенням саме того facet — щоб лічильники реагували на вибір.
19
+ repeated string brand_ids = 2;
20
+ repeated string color_ids = 3;
21
+ repeated string size_ids = 4;
22
+ optional double price_min = 5;
23
+ optional double price_max = 6;
24
+ optional bool in_stock = 7;
25
+ optional string search = 8;
16
26
  }
17
27
 
18
28