@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.
- package/dist/gen/product.d.ts +9 -0
- package/dist/gen/promotion.d.ts +11 -1
- package/dist/gen/shop_filters.d.ts +6 -0
- package/dist/proto/product.proto +10 -0
- package/dist/proto/promotion.proto +9 -1
- package/dist/proto/shop_filters.proto +6 -1
- package/gen/product.ts +10 -0
- package/gen/promotion.ts +11 -1
- package/gen/shop_filters.ts +9 -1
- package/package.json +1 -1
- package/proto/product.proto +10 -0
- package/proto/promotion.proto +9 -1
- package/proto/shop_filters.proto +6 -1
package/dist/gen/product.d.ts
CHANGED
|
@@ -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;
|
package/dist/gen/promotion.d.ts
CHANGED
|
@@ -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
|
-
|
|
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[];
|
package/dist/proto/product.proto
CHANGED
|
@@ -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
|
|
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
|
-
|
|
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 {
|
package/gen/shop_filters.ts
CHANGED
|
@@ -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?:
|
|
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
package/proto/product.proto
CHANGED
|
@@ -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 {
|
package/proto/promotion.proto
CHANGED
|
@@ -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
|
|
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) ───────────────
|
package/proto/shop_filters.proto
CHANGED
|
@@ -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
|
|