@mamindom/contracts 1.0.114 → 1.0.116

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.
@@ -299,6 +299,15 @@ export interface GetProductsRequest {
299
299
  attributeValueIds: string[];
300
300
  brandIds: string[];
301
301
  productIds: string[];
302
+ promotionFilter?: PromotionFilter | undefined;
303
+ }
304
+ export interface PromotionFilter {
305
+ includeProductIds: string[];
306
+ includeCategoryIds: string[];
307
+ includeBrandIds: string[];
308
+ excludeProductIds: string[];
309
+ excludeCategoryIds: string[];
310
+ excludeBrandIds: string[];
302
311
  }
303
312
  export interface ProductPromoInfo {
304
313
  id: string;
@@ -342,8 +342,18 @@ export interface RemovePromotionProductsRequest {
342
342
  export interface GetPromotionEligibleProductIdsRequest {
343
343
  promotionId: string;
344
344
  }
345
+ /**
346
+ * Returns the full membership of the promotion (NOT resolved to a flat list).
347
+ * Catalog-service joins these (UNION include − exclude) using its own data.
348
+ */
345
349
  export interface GetPromotionEligibleProductIdsResponse {
346
- productIds: string[];
350
+ includeProductIds: string[];
351
+ includeCategoryIds: string[];
352
+ includeBrandIds: string[];
353
+ excludeProductIds: string[];
354
+ excludeCategoryIds: string[];
355
+ excludeBrandIds: string[];
356
+ exists?: boolean | undefined;
347
357
  }
348
358
  export interface GetActivePromotionsSnapshotRequest {
349
359
  }
@@ -1,4 +1,5 @@
1
1
  import { Observable } from "rxjs";
2
+ import { PromotionFilter } from "./product";
2
3
  export declare const protobufPackage = "catalog.v1";
3
4
  export interface GetShopFiltersRequest {
4
5
  categoryId: string;
@@ -13,6 +14,11 @@ export interface GetShopFiltersRequest {
13
14
  priceMax?: number | undefined;
14
15
  inStock?: boolean | undefined;
15
16
  search?: string | undefined;
17
+ /**
18
+ * Обмеження множини товарів акцією — фасети рахуються тільки
19
+ * по товарах, що належать поточній акції.
20
+ */
21
+ promotionFilter?: PromotionFilter | undefined;
16
22
  }
17
23
  export interface GetShopFiltersResponse {
18
24
  brands: ShopFilterOption[];
@@ -284,6 +284,16 @@ message GetProductsRequest {
284
284
  repeated string attribute_value_ids = 10;
285
285
  repeated string brand_ids = 11;
286
286
  repeated string product_ids = 12;
287
+ optional PromotionFilter promotion_filter = 13;
288
+ }
289
+
290
+ message PromotionFilter {
291
+ repeated string include_product_ids = 1;
292
+ repeated string include_category_ids = 2;
293
+ repeated string include_brand_ids = 3;
294
+ repeated string exclude_product_ids = 4;
295
+ repeated string exclude_category_ids = 5;
296
+ repeated string exclude_brand_ids = 6;
287
297
  }
288
298
 
289
299
  message ProductPromoInfo {
@@ -376,8 +376,16 @@ message GetPromotionEligibleProductIdsRequest {
376
376
  string promotion_id = 1;
377
377
  }
378
378
 
379
+ // Returns the full membership of the promotion (NOT resolved to a flat list).
380
+ // Catalog-service joins these (UNION include − exclude) using its own data.
379
381
  message GetPromotionEligibleProductIdsResponse {
380
- repeated string product_ids = 1;
382
+ repeated string include_product_ids = 1;
383
+ repeated string include_category_ids = 2;
384
+ repeated string include_brand_ids = 3;
385
+ repeated string exclude_product_ids = 4;
386
+ repeated string exclude_category_ids = 5;
387
+ repeated string exclude_brand_ids = 6;
388
+ optional bool exists = 7;
381
389
  }
382
390
 
383
391
  // ─── Active promotions snapshot (for cross-service enrichment) ───────────────
@@ -4,9 +4,10 @@ syntax = "proto3";
4
4
  package catalog.v1;
5
5
 
6
6
  import "common.proto";
7
+ import "product.proto";
7
8
 
8
9
  service ShopFilterService {
9
-
10
+
10
11
  rpc GetShopFilters (GetShopFiltersRequest) returns (GetShopFiltersResponse);
11
12
  }
12
13
 
@@ -23,6 +24,10 @@ message GetShopFiltersRequest {
23
24
  optional double price_max = 6;
24
25
  optional bool in_stock = 7;
25
26
  optional string search = 8;
27
+
28
+ // Обмеження множини товарів акцією — фасети рахуються тільки
29
+ // по товарах, що належать поточній акції.
30
+ optional PromotionFilter promotion_filter = 9;
26
31
  }
27
32
 
28
33
 
package/gen/product.ts CHANGED
@@ -313,6 +313,16 @@ export interface GetProductsRequest {
313
313
  attributeValueIds: string[];
314
314
  brandIds: string[];
315
315
  productIds: string[];
316
+ promotionFilter?: PromotionFilter | undefined;
317
+ }
318
+
319
+ export interface PromotionFilter {
320
+ includeProductIds: string[];
321
+ includeCategoryIds: string[];
322
+ includeBrandIds: string[];
323
+ excludeProductIds: string[];
324
+ excludeCategoryIds: string[];
325
+ excludeBrandIds: string[];
316
326
  }
317
327
 
318
328
  export interface ProductPromoInfo {
package/gen/promotion.ts CHANGED
@@ -373,8 +373,18 @@ export interface GetPromotionEligibleProductIdsRequest {
373
373
  promotionId: string;
374
374
  }
375
375
 
376
+ /**
377
+ * Returns the full membership of the promotion (NOT resolved to a flat list).
378
+ * Catalog-service joins these (UNION include − exclude) using its own data.
379
+ */
376
380
  export interface GetPromotionEligibleProductIdsResponse {
377
- productIds: string[];
381
+ includeProductIds: string[];
382
+ includeCategoryIds: string[];
383
+ includeBrandIds: string[];
384
+ excludeProductIds: string[];
385
+ excludeCategoryIds: string[];
386
+ excludeBrandIds: string[];
387
+ exists?: boolean | undefined;
378
388
  }
379
389
 
380
390
  export interface GetActivePromotionsSnapshotRequest {
@@ -7,6 +7,7 @@
7
7
  /* eslint-disable */
8
8
  import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
9
9
  import { Observable } from "rxjs";
10
+ import { PromotionFilter } from "./product";
10
11
 
11
12
  export const protobufPackage = "catalog.v1";
12
13
 
@@ -22,7 +23,14 @@ export interface GetShopFiltersRequest {
22
23
  priceMin?: number | undefined;
23
24
  priceMax?: number | undefined;
24
25
  inStock?: boolean | undefined;
25
- search?: string | undefined;
26
+ search?:
27
+ | string
28
+ | undefined;
29
+ /**
30
+ * Обмеження множини товарів акцією — фасети рахуються тільки
31
+ * по товарах, що належать поточній акції.
32
+ */
33
+ promotionFilter?: PromotionFilter | undefined;
26
34
  }
27
35
 
28
36
  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.114",
4
+ "version": "1.0.116",
5
5
  "main": "./dist/src/index.js",
6
6
  "types": "./dist/src/index.d.ts",
7
7
  "exports": {
@@ -284,6 +284,16 @@ message GetProductsRequest {
284
284
  repeated string attribute_value_ids = 10;
285
285
  repeated string brand_ids = 11;
286
286
  repeated string product_ids = 12;
287
+ optional PromotionFilter promotion_filter = 13;
288
+ }
289
+
290
+ message PromotionFilter {
291
+ repeated string include_product_ids = 1;
292
+ repeated string include_category_ids = 2;
293
+ repeated string include_brand_ids = 3;
294
+ repeated string exclude_product_ids = 4;
295
+ repeated string exclude_category_ids = 5;
296
+ repeated string exclude_brand_ids = 6;
287
297
  }
288
298
 
289
299
  message ProductPromoInfo {
@@ -376,8 +376,16 @@ message GetPromotionEligibleProductIdsRequest {
376
376
  string promotion_id = 1;
377
377
  }
378
378
 
379
+ // Returns the full membership of the promotion (NOT resolved to a flat list).
380
+ // Catalog-service joins these (UNION include − exclude) using its own data.
379
381
  message GetPromotionEligibleProductIdsResponse {
380
- repeated string product_ids = 1;
382
+ repeated string include_product_ids = 1;
383
+ repeated string include_category_ids = 2;
384
+ repeated string include_brand_ids = 3;
385
+ repeated string exclude_product_ids = 4;
386
+ repeated string exclude_category_ids = 5;
387
+ repeated string exclude_brand_ids = 6;
388
+ optional bool exists = 7;
381
389
  }
382
390
 
383
391
  // ─── Active promotions snapshot (for cross-service enrichment) ───────────────
@@ -4,9 +4,10 @@ syntax = "proto3";
4
4
  package catalog.v1;
5
5
 
6
6
  import "common.proto";
7
+ import "product.proto";
7
8
 
8
9
  service ShopFilterService {
9
-
10
+
10
11
  rpc GetShopFilters (GetShopFiltersRequest) returns (GetShopFiltersResponse);
11
12
  }
12
13
 
@@ -23,6 +24,10 @@ message GetShopFiltersRequest {
23
24
  optional double price_max = 6;
24
25
  optional bool in_stock = 7;
25
26
  optional string search = 8;
27
+
28
+ // Обмеження множини товарів акцією — фасети рахуються тільки
29
+ // по товарах, що належать поточній акції.
30
+ optional PromotionFilter promotion_filter = 9;
26
31
  }
27
32
 
28
33