@mamindom/contracts 1.0.140 → 1.0.141
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/audit.d.ts +0 -6
- package/dist/gen/banner.d.ts +0 -1
- package/dist/gen/bonus_settings.d.ts +0 -7
- package/dist/gen/brand.d.ts +0 -1
- package/dist/gen/bundle.d.ts +0 -9
- package/dist/gen/search.d.ts +0 -8
- package/dist/gen/shop_filters.d.ts +7 -19
- package/dist/proto/audit.proto +6 -6
- package/dist/proto/banner.proto +1 -1
- package/dist/proto/bonus_settings.proto +4 -5
- package/dist/proto/brand.proto +1 -1
- package/dist/proto/bundle.proto +9 -14
- package/dist/proto/search.proto +1 -2
- package/dist/proto/shop_filters.proto +15 -11
- package/gen/audit.ts +5 -21
- package/gen/banner.ts +0 -1
- package/gen/bonus_settings.ts +0 -7
- package/gen/brand.ts +1 -4
- package/gen/bundle.ts +0 -9
- package/gen/search.ts +0 -10
- package/gen/shop_filters.ts +11 -28
- package/package.json +1 -1
- package/proto/audit.proto +6 -6
- package/proto/banner.proto +1 -1
- package/proto/bonus_settings.proto +4 -5
- package/proto/brand.proto +1 -1
- package/proto/bundle.proto +9 -14
- package/proto/search.proto +1 -2
- package/proto/shop_filters.proto +15 -11
package/dist/gen/audit.d.ts
CHANGED
|
@@ -4,14 +4,10 @@ export interface LogActionRequest {
|
|
|
4
4
|
actorId?: string | undefined;
|
|
5
5
|
actorName?: string | undefined;
|
|
6
6
|
actorEmail?: string | undefined;
|
|
7
|
-
/** e.g. "order.cancelled", "product.price_changed" */
|
|
8
7
|
action: string;
|
|
9
|
-
/** e.g. "order", "product", "role" */
|
|
10
8
|
targetType: string;
|
|
11
9
|
targetId?: string | undefined;
|
|
12
|
-
/** human-readable summary */
|
|
13
10
|
summary?: string | undefined;
|
|
14
|
-
/** serialized JSON snapshot (small!) */
|
|
15
11
|
beforeJson?: string | undefined;
|
|
16
12
|
afterJson?: string | undefined;
|
|
17
13
|
ip?: string | undefined;
|
|
@@ -27,9 +23,7 @@ export interface ListAuditRequest {
|
|
|
27
23
|
targetType?: string | undefined;
|
|
28
24
|
targetId?: string | undefined;
|
|
29
25
|
action?: string | undefined;
|
|
30
|
-
/** "orders" matches order.* etc */
|
|
31
26
|
actionGroup?: string | undefined;
|
|
32
|
-
/** ISO date */
|
|
33
27
|
from?: string | undefined;
|
|
34
28
|
to?: string | undefined;
|
|
35
29
|
}
|
package/dist/gen/banner.d.ts
CHANGED
|
@@ -118,7 +118,6 @@ export interface UpdateBannerRequest {
|
|
|
118
118
|
name: {
|
|
119
119
|
[key: string]: string;
|
|
120
120
|
};
|
|
121
|
-
/** empty = не оновлювати; non-empty = заміна повного списку плейсментів. */
|
|
122
121
|
placements: BannerPlacement[];
|
|
123
122
|
status?: boolean | undefined;
|
|
124
123
|
sortOrder?: number | undefined;
|
|
@@ -1,16 +1,9 @@
|
|
|
1
1
|
import { Observable } from "rxjs";
|
|
2
2
|
export declare const protobufPackage = "promo.v1";
|
|
3
3
|
export interface BonusSettingsResponse {
|
|
4
|
-
/** Курс нарахування бонусів від суми замовлення (0.02 = 2%). */
|
|
5
4
|
earnRate: number;
|
|
6
|
-
/** Курс списання бонусів (1 бонус = N грн, default 1.0). */
|
|
7
5
|
redeemRate: number;
|
|
8
|
-
/** Мінімальна сума замовлення для нарахування бонусів (0 = без обмеження). */
|
|
9
6
|
minOrderForEarn: number;
|
|
10
|
-
/**
|
|
11
|
-
* Максимальний відсоток від суми замовлення, який можна оплатити бонусами
|
|
12
|
-
* (1.0 = до 100%, 0.5 = до 50%; 0 — без обмеження).
|
|
13
|
-
*/
|
|
14
7
|
maxRedeemShare: number;
|
|
15
8
|
updatedAt: string;
|
|
16
9
|
}
|
package/dist/gen/brand.d.ts
CHANGED
package/dist/gen/bundle.d.ts
CHANGED
|
@@ -85,7 +85,6 @@ export interface CreateBundleRequest {
|
|
|
85
85
|
};
|
|
86
86
|
items: BundleItemPayload[];
|
|
87
87
|
createdById: string;
|
|
88
|
-
/** NEW */
|
|
89
88
|
displayPlacements: DisplayPlacement[];
|
|
90
89
|
priceMode: PriceMode;
|
|
91
90
|
requireAllInStock: boolean;
|
|
@@ -140,7 +139,6 @@ export interface UpdateBundleRequest {
|
|
|
140
139
|
[key: string]: string;
|
|
141
140
|
};
|
|
142
141
|
items: BundleItemPayload[];
|
|
143
|
-
/** NEW */
|
|
144
142
|
displayPlacements: DisplayPlacement[];
|
|
145
143
|
priceMode?: PriceMode | undefined;
|
|
146
144
|
requireAllInStock?: boolean | undefined;
|
|
@@ -300,7 +298,6 @@ export interface BundleDetailResponse {
|
|
|
300
298
|
originalPrice: number;
|
|
301
299
|
finalPrice: number;
|
|
302
300
|
inStock: boolean;
|
|
303
|
-
/** NEW */
|
|
304
301
|
displayPlacements: DisplayPlacement[];
|
|
305
302
|
priceMode: PriceMode;
|
|
306
303
|
requireAllInStock: boolean;
|
|
@@ -374,24 +371,18 @@ export interface BundleItemAvailability {
|
|
|
374
371
|
inStock: boolean;
|
|
375
372
|
}
|
|
376
373
|
export interface ExportBundlesResponse {
|
|
377
|
-
/** JSON string or CSV string */
|
|
378
374
|
content: string;
|
|
379
375
|
format: string;
|
|
380
376
|
count: number;
|
|
381
377
|
}
|
|
382
378
|
export interface GenerateBundleCollageRequest {
|
|
383
379
|
bundleId: string;
|
|
384
|
-
/** Optional: override cell pixel size (default 400) */
|
|
385
380
|
cellSize?: number | undefined;
|
|
386
381
|
}
|
|
387
382
|
export interface GenerateBundleCollageResponse {
|
|
388
|
-
/** Public CDN/S3 URL of the collage JPEG */
|
|
389
383
|
url: string;
|
|
390
|
-
/** S3 object key */
|
|
391
384
|
key: string;
|
|
392
|
-
/** Final image width in pixels */
|
|
393
385
|
width: number;
|
|
394
|
-
/** Final image height in pixels */
|
|
395
386
|
height: number;
|
|
396
387
|
bundleId: string;
|
|
397
388
|
}
|
package/dist/gen/search.d.ts
CHANGED
|
@@ -130,10 +130,6 @@ export interface ListZeroResultsResponse {
|
|
|
130
130
|
export interface ClearZeroResultsRequest {
|
|
131
131
|
}
|
|
132
132
|
export declare const CATALOG_V1_PACKAGE_NAME = "catalog.v1";
|
|
133
|
-
/**
|
|
134
|
-
* SearchService — окремий сервіс під autocomplete та керування пошуком
|
|
135
|
-
* (синоніми, популярні запити). Логіка та індекс живуть у catalog-service.
|
|
136
|
-
*/
|
|
137
133
|
export interface SearchServiceClient {
|
|
138
134
|
/** ─── Public (autocomplete) ─────────────────────────────────────────────── */
|
|
139
135
|
suggest(request: SuggestRequest): Observable<SuggestResponse>;
|
|
@@ -153,10 +149,6 @@ export interface SearchServiceClient {
|
|
|
153
149
|
listZeroResults(request: ListZeroResultsRequest): Observable<ListZeroResultsResponse>;
|
|
154
150
|
clearZeroResults(request: ClearZeroResultsRequest): Observable<SuccessResponse>;
|
|
155
151
|
}
|
|
156
|
-
/**
|
|
157
|
-
* SearchService — окремий сервіс під autocomplete та керування пошуком
|
|
158
|
-
* (синоніми, популярні запити). Логіка та індекс живуть у catalog-service.
|
|
159
|
-
*/
|
|
160
152
|
export interface SearchServiceController {
|
|
161
153
|
/** ─── Public (autocomplete) ─────────────────────────────────────────────── */
|
|
162
154
|
suggest(request: SuggestRequest): Promise<SuggestResponse> | Observable<SuggestResponse> | SuggestResponse;
|
|
@@ -3,10 +3,6 @@ import { PromotionFilter } from "./product";
|
|
|
3
3
|
export declare const protobufPackage = "catalog.v1";
|
|
4
4
|
export interface GetShopFiltersRequest {
|
|
5
5
|
categoryId: string;
|
|
6
|
-
/**
|
|
7
|
-
* Поточно застосовані фільтри. Counts по кожному facet рахуються
|
|
8
|
-
* з виключенням саме того facet — щоб лічильники реагували на вибір.
|
|
9
|
-
*/
|
|
10
6
|
brandIds: string[];
|
|
11
7
|
colorIds: string[];
|
|
12
8
|
sizeIds: string[];
|
|
@@ -14,19 +10,9 @@ export interface GetShopFiltersRequest {
|
|
|
14
10
|
priceMax?: number | undefined;
|
|
15
11
|
inStock?: boolean | undefined;
|
|
16
12
|
search?: string | undefined;
|
|
17
|
-
/**
|
|
18
|
-
* Обмеження множини товарів акцією — фасети рахуються тільки
|
|
19
|
-
* по товарах, що належать поточній акції.
|
|
20
|
-
*/
|
|
21
13
|
promotionFilter?: PromotionFilter | undefined;
|
|
22
|
-
/** Динамічні атрибути окрім color/size (матеріал, виробник тощо). */
|
|
23
14
|
attributeValueIds: string[];
|
|
24
|
-
/**
|
|
25
|
-
* Явний прапор "ціновий фільтр активний". Без нього неможливо
|
|
26
|
-
* відрізнити "користувач не вибирав" від "обрав від 0".
|
|
27
|
-
*/
|
|
28
15
|
priceActive?: boolean | undefined;
|
|
29
|
-
/** 'uk' | 'ru' — для локалізації labels у відповіді (дефолт uk). */
|
|
30
16
|
locale?: string | undefined;
|
|
31
17
|
}
|
|
32
18
|
export interface GetShopFiltersResponse {
|
|
@@ -36,7 +22,13 @@ export interface GetShopFiltersResponse {
|
|
|
36
22
|
attributes: ShopFilterAttribute[];
|
|
37
23
|
priceMin: number;
|
|
38
24
|
priceMax: number;
|
|
39
|
-
|
|
25
|
+
subcategories: ShopFilterSubcategory[];
|
|
26
|
+
}
|
|
27
|
+
export interface ShopFilterSubcategory {
|
|
28
|
+
id: string;
|
|
29
|
+
slug: string;
|
|
30
|
+
label: string;
|
|
31
|
+
count: number;
|
|
40
32
|
}
|
|
41
33
|
export interface ShopFilterOption {
|
|
42
34
|
value: string;
|
|
@@ -51,10 +43,6 @@ export interface ShopFilterColorOption {
|
|
|
51
43
|
}
|
|
52
44
|
export interface ShopFilterAttribute {
|
|
53
45
|
slug: string;
|
|
54
|
-
/**
|
|
55
|
-
* Локалізована назва атрибута (на стороні gateway вже згорнута у
|
|
56
|
-
* одну рядкову label згідно locale запиту).
|
|
57
|
-
*/
|
|
58
46
|
label: string;
|
|
59
47
|
values: ShopFilterOption[];
|
|
60
48
|
}
|
package/dist/proto/audit.proto
CHANGED
|
@@ -11,11 +11,11 @@ message LogActionRequest {
|
|
|
11
11
|
optional string actor_id = 1;
|
|
12
12
|
optional string actor_name = 2;
|
|
13
13
|
optional string actor_email = 3;
|
|
14
|
-
string action = 4;
|
|
15
|
-
string target_type = 5;
|
|
14
|
+
string action = 4;
|
|
15
|
+
string target_type = 5;
|
|
16
16
|
optional string target_id = 6;
|
|
17
|
-
optional string summary = 7;
|
|
18
|
-
optional string before_json = 8;
|
|
17
|
+
optional string summary = 7;
|
|
18
|
+
optional string before_json = 8;
|
|
19
19
|
optional string after_json = 9;
|
|
20
20
|
optional string ip = 10;
|
|
21
21
|
optional string user_agent = 11;
|
|
@@ -32,8 +32,8 @@ message ListAuditRequest {
|
|
|
32
32
|
optional string target_type = 4;
|
|
33
33
|
optional string target_id = 5;
|
|
34
34
|
optional string action = 6;
|
|
35
|
-
optional string action_group = 7;
|
|
36
|
-
optional string from = 8;
|
|
35
|
+
optional string action_group = 7;
|
|
36
|
+
optional string from = 8;
|
|
37
37
|
optional string to = 9;
|
|
38
38
|
}
|
|
39
39
|
|
package/dist/proto/banner.proto
CHANGED
|
@@ -118,7 +118,7 @@ message UpdateBannerRequest {
|
|
|
118
118
|
string id = 1;
|
|
119
119
|
optional string slug = 2;
|
|
120
120
|
map<string, string> name = 3;
|
|
121
|
-
|
|
121
|
+
|
|
122
122
|
repeated BannerPlacement placements = 4;
|
|
123
123
|
optional bool status = 5;
|
|
124
124
|
optional int32 sort_order = 6;
|
|
@@ -10,14 +10,13 @@ service BonusSettingsService {
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
message BonusSettingsResponse {
|
|
13
|
-
|
|
13
|
+
|
|
14
14
|
double earn_rate = 1;
|
|
15
|
-
|
|
15
|
+
|
|
16
16
|
double redeem_rate = 2;
|
|
17
|
-
|
|
17
|
+
|
|
18
18
|
double min_order_for_earn = 3;
|
|
19
|
-
|
|
20
|
-
// (1.0 = до 100%, 0.5 = до 50%; 0 — без обмеження).
|
|
19
|
+
|
|
21
20
|
double max_redeem_share = 4;
|
|
22
21
|
|
|
23
22
|
string updated_at = 5;
|
package/dist/proto/brand.proto
CHANGED
package/dist/proto/bundle.proto
CHANGED
|
@@ -42,7 +42,6 @@ service BundleService {
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
|
|
45
|
-
// ─── Enums ────────────────────────────────────────────────────────────────────
|
|
46
45
|
|
|
47
46
|
enum BundleStatus {
|
|
48
47
|
BUNDLE_STATUS_UNSPECIFIED = 0;
|
|
@@ -83,7 +82,6 @@ enum RuleOperator {
|
|
|
83
82
|
}
|
|
84
83
|
|
|
85
84
|
|
|
86
|
-
// ─── Requests ─────────────────────────────────────────────────────────────────
|
|
87
85
|
|
|
88
86
|
message GetBundlesRequest {
|
|
89
87
|
PaginationRequest pagination = 1;
|
|
@@ -122,7 +120,7 @@ message CreateBundleRequest {
|
|
|
122
120
|
repeated BundleItemPayload items = 15;
|
|
123
121
|
string created_by_id = 16;
|
|
124
122
|
|
|
125
|
-
|
|
123
|
+
|
|
126
124
|
repeated DisplayPlacement display_placements = 17;
|
|
127
125
|
PriceMode price_mode = 18;
|
|
128
126
|
bool require_all_in_stock = 19;
|
|
@@ -155,7 +153,7 @@ message UpdateBundleRequest {
|
|
|
155
153
|
|
|
156
154
|
repeated BundleItemPayload items = 16;
|
|
157
155
|
|
|
158
|
-
|
|
156
|
+
|
|
159
157
|
repeated DisplayPlacement display_placements = 17;
|
|
160
158
|
optional PriceMode price_mode = 18;
|
|
161
159
|
optional bool require_all_in_stock = 19;
|
|
@@ -252,7 +250,6 @@ message AddCrossSellLinkRequest {
|
|
|
252
250
|
}
|
|
253
251
|
|
|
254
252
|
|
|
255
|
-
// ─── Responses ────────────────────────────────────────────────────────────────
|
|
256
253
|
|
|
257
254
|
message GetBundlesResponse {
|
|
258
255
|
repeated BundleListItemResponse items = 1;
|
|
@@ -312,7 +309,7 @@ message BundleDetailResponse {
|
|
|
312
309
|
double final_price = 19;
|
|
313
310
|
bool in_stock = 20;
|
|
314
311
|
|
|
315
|
-
|
|
312
|
+
|
|
316
313
|
repeated DisplayPlacement display_placements = 21;
|
|
317
314
|
PriceMode price_mode = 22;
|
|
318
315
|
bool require_all_in_stock = 23;
|
|
@@ -360,26 +357,25 @@ message BundleItemAvailability {
|
|
|
360
357
|
}
|
|
361
358
|
|
|
362
359
|
message ExportBundlesResponse {
|
|
363
|
-
string content = 1;
|
|
360
|
+
string content = 1;
|
|
364
361
|
string format = 2;
|
|
365
362
|
int32 count = 3;
|
|
366
363
|
}
|
|
367
364
|
|
|
368
365
|
message GenerateBundleCollageRequest {
|
|
369
366
|
string bundle_id = 1;
|
|
370
|
-
|
|
367
|
+
|
|
371
368
|
optional int32 cell_size = 2;
|
|
372
369
|
}
|
|
373
370
|
|
|
374
371
|
message GenerateBundleCollageResponse {
|
|
375
|
-
string url = 1;
|
|
376
|
-
string key = 2;
|
|
377
|
-
int32 width = 3;
|
|
378
|
-
int32 height = 4;
|
|
372
|
+
string url = 1;
|
|
373
|
+
string key = 2;
|
|
374
|
+
int32 width = 3;
|
|
375
|
+
int32 height = 4;
|
|
379
376
|
string bundle_id = 5;
|
|
380
377
|
}
|
|
381
378
|
|
|
382
|
-
// ── Bulk Lookup ──────────────────────────────────────────────────────────────
|
|
383
379
|
|
|
384
380
|
message BulkLookupBundlesRequest {
|
|
385
381
|
repeated string slugs = 1;
|
|
@@ -396,7 +392,6 @@ message BulkLookupBundlesResponse {
|
|
|
396
392
|
repeated BundleLookupResult results = 1;
|
|
397
393
|
}
|
|
398
394
|
|
|
399
|
-
// ── Bundle Related Products ──────────────────────────────────────────────────
|
|
400
395
|
|
|
401
396
|
enum BundleRelatedType {
|
|
402
397
|
BUNDLE_RELATED_TYPE_UNSPECIFIED = 0;
|
package/dist/proto/search.proto
CHANGED
|
@@ -4,8 +4,7 @@ package catalog.v1;
|
|
|
4
4
|
|
|
5
5
|
import "common.proto";
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
// (синоніми, популярні запити). Логіка та індекс живуть у catalog-service.
|
|
7
|
+
|
|
9
8
|
service SearchService {
|
|
10
9
|
// ─── Public (autocomplete) ───────────────────────────────────────────────
|
|
11
10
|
rpc Suggest (SuggestRequest) returns (SuggestResponse);
|
|
@@ -15,8 +15,7 @@ service ShopFilterService {
|
|
|
15
15
|
message GetShopFiltersRequest {
|
|
16
16
|
string category_id = 1;
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
// з виключенням саме того facet — щоб лічильники реагували на вибір.
|
|
18
|
+
|
|
20
19
|
repeated string brand_ids = 2;
|
|
21
20
|
repeated string color_ids = 3;
|
|
22
21
|
repeated string size_ids = 4;
|
|
@@ -25,18 +24,16 @@ message GetShopFiltersRequest {
|
|
|
25
24
|
optional bool in_stock = 7;
|
|
26
25
|
optional string search = 8;
|
|
27
26
|
|
|
28
|
-
|
|
29
|
-
// по товарах, що належать поточній акції.
|
|
27
|
+
|
|
30
28
|
optional PromotionFilter promotion_filter = 9;
|
|
31
29
|
|
|
32
|
-
|
|
30
|
+
|
|
33
31
|
repeated string attribute_value_ids = 10;
|
|
34
32
|
|
|
35
|
-
|
|
36
|
-
// відрізнити "користувач не вибирав" від "обрав від 0".
|
|
33
|
+
|
|
37
34
|
optional bool price_active = 11;
|
|
38
35
|
|
|
39
|
-
|
|
36
|
+
|
|
40
37
|
optional string locale = 12;
|
|
41
38
|
}
|
|
42
39
|
|
|
@@ -48,7 +45,15 @@ message GetShopFiltersResponse {
|
|
|
48
45
|
repeated ShopFilterAttribute attributes = 4;
|
|
49
46
|
double price_min = 5;
|
|
50
47
|
double price_max = 6;
|
|
51
|
-
|
|
48
|
+
|
|
49
|
+
repeated ShopFilterSubcategory subcategories = 7;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
message ShopFilterSubcategory {
|
|
53
|
+
string id = 1;
|
|
54
|
+
string slug = 2;
|
|
55
|
+
string label = 3;
|
|
56
|
+
int32 count = 4;
|
|
52
57
|
}
|
|
53
58
|
|
|
54
59
|
message ShopFilterOption {
|
|
@@ -66,8 +71,7 @@ message ShopFilterColorOption {
|
|
|
66
71
|
|
|
67
72
|
message ShopFilterAttribute {
|
|
68
73
|
string slug = 1;
|
|
69
|
-
|
|
70
|
-
// одну рядкову label згідно locale запиту).
|
|
74
|
+
|
|
71
75
|
string label = 2;
|
|
72
76
|
repeated ShopFilterOption values = 3;
|
|
73
77
|
}
|
package/gen/audit.ts
CHANGED
|
@@ -13,21 +13,11 @@ export const protobufPackage = "audit.v1";
|
|
|
13
13
|
export interface LogActionRequest {
|
|
14
14
|
actorId?: string | undefined;
|
|
15
15
|
actorName?: string | undefined;
|
|
16
|
-
actorEmail?:
|
|
17
|
-
| string
|
|
18
|
-
| undefined;
|
|
19
|
-
/** e.g. "order.cancelled", "product.price_changed" */
|
|
16
|
+
actorEmail?: string | undefined;
|
|
20
17
|
action: string;
|
|
21
|
-
/** e.g. "order", "product", "role" */
|
|
22
18
|
targetType: string;
|
|
23
|
-
targetId?:
|
|
24
|
-
|
|
25
|
-
| undefined;
|
|
26
|
-
/** human-readable summary */
|
|
27
|
-
summary?:
|
|
28
|
-
| string
|
|
29
|
-
| undefined;
|
|
30
|
-
/** serialized JSON snapshot (small!) */
|
|
19
|
+
targetId?: string | undefined;
|
|
20
|
+
summary?: string | undefined;
|
|
31
21
|
beforeJson?: string | undefined;
|
|
32
22
|
afterJson?: string | undefined;
|
|
33
23
|
ip?: string | undefined;
|
|
@@ -44,14 +34,8 @@ export interface ListAuditRequest {
|
|
|
44
34
|
actorId?: string | undefined;
|
|
45
35
|
targetType?: string | undefined;
|
|
46
36
|
targetId?: string | undefined;
|
|
47
|
-
action?:
|
|
48
|
-
|
|
49
|
-
| undefined;
|
|
50
|
-
/** "orders" matches order.* etc */
|
|
51
|
-
actionGroup?:
|
|
52
|
-
| string
|
|
53
|
-
| undefined;
|
|
54
|
-
/** ISO date */
|
|
37
|
+
action?: string | undefined;
|
|
38
|
+
actionGroup?: string | undefined;
|
|
55
39
|
from?: string | undefined;
|
|
56
40
|
to?: string | undefined;
|
|
57
41
|
}
|
package/gen/banner.ts
CHANGED
|
@@ -129,7 +129,6 @@ export interface UpdateBannerRequest {
|
|
|
129
129
|
id: string;
|
|
130
130
|
slug?: string | undefined;
|
|
131
131
|
name: { [key: string]: string };
|
|
132
|
-
/** empty = не оновлювати; non-empty = заміна повного списку плейсментів. */
|
|
133
132
|
placements: BannerPlacement[];
|
|
134
133
|
status?: boolean | undefined;
|
|
135
134
|
sortOrder?: number | undefined;
|
package/gen/bonus_settings.ts
CHANGED
|
@@ -11,16 +11,9 @@ import { Observable } from "rxjs";
|
|
|
11
11
|
export const protobufPackage = "promo.v1";
|
|
12
12
|
|
|
13
13
|
export interface BonusSettingsResponse {
|
|
14
|
-
/** Курс нарахування бонусів від суми замовлення (0.02 = 2%). */
|
|
15
14
|
earnRate: number;
|
|
16
|
-
/** Курс списання бонусів (1 бонус = N грн, default 1.0). */
|
|
17
15
|
redeemRate: number;
|
|
18
|
-
/** Мінімальна сума замовлення для нарахування бонусів (0 = без обмеження). */
|
|
19
16
|
minOrderForEarn: number;
|
|
20
|
-
/**
|
|
21
|
-
* Максимальний відсоток від суми замовлення, який можна оплатити бонусами
|
|
22
|
-
* (1.0 = до 100%, 0.5 = до 50%; 0 — без обмеження).
|
|
23
|
-
*/
|
|
24
17
|
maxRedeemShare: number;
|
|
25
18
|
updatedAt: string;
|
|
26
19
|
}
|
package/gen/brand.ts
CHANGED
|
@@ -20,10 +20,7 @@ export interface BrandResponse {
|
|
|
20
20
|
metaTitle: { [key: string]: string };
|
|
21
21
|
metaDescription: { [key: string]: string };
|
|
22
22
|
guid1c?: string | undefined;
|
|
23
|
-
imageId?:
|
|
24
|
-
| string
|
|
25
|
-
| undefined;
|
|
26
|
-
/** Кількість АКТИВНИХ товарів бренду (для shop UI). */
|
|
23
|
+
imageId?: string | undefined;
|
|
27
24
|
productCount: number;
|
|
28
25
|
}
|
|
29
26
|
|
package/gen/bundle.ts
CHANGED
|
@@ -94,7 +94,6 @@ export interface CreateBundleRequest {
|
|
|
94
94
|
metaDescription: { [key: string]: string };
|
|
95
95
|
items: BundleItemPayload[];
|
|
96
96
|
createdById: string;
|
|
97
|
-
/** NEW */
|
|
98
97
|
displayPlacements: DisplayPlacement[];
|
|
99
98
|
priceMode: PriceMode;
|
|
100
99
|
requireAllInStock: boolean;
|
|
@@ -145,7 +144,6 @@ export interface UpdateBundleRequest {
|
|
|
145
144
|
metaTitle: { [key: string]: string };
|
|
146
145
|
metaDescription: { [key: string]: string };
|
|
147
146
|
items: BundleItemPayload[];
|
|
148
|
-
/** NEW */
|
|
149
147
|
displayPlacements: DisplayPlacement[];
|
|
150
148
|
priceMode?: PriceMode | undefined;
|
|
151
149
|
requireAllInStock?: boolean | undefined;
|
|
@@ -320,7 +318,6 @@ export interface BundleDetailResponse {
|
|
|
320
318
|
originalPrice: number;
|
|
321
319
|
finalPrice: number;
|
|
322
320
|
inStock: boolean;
|
|
323
|
-
/** NEW */
|
|
324
321
|
displayPlacements: DisplayPlacement[];
|
|
325
322
|
priceMode: PriceMode;
|
|
326
323
|
requireAllInStock: boolean;
|
|
@@ -402,7 +399,6 @@ export interface BundleItemAvailability {
|
|
|
402
399
|
}
|
|
403
400
|
|
|
404
401
|
export interface ExportBundlesResponse {
|
|
405
|
-
/** JSON string or CSV string */
|
|
406
402
|
content: string;
|
|
407
403
|
format: string;
|
|
408
404
|
count: number;
|
|
@@ -410,18 +406,13 @@ export interface ExportBundlesResponse {
|
|
|
410
406
|
|
|
411
407
|
export interface GenerateBundleCollageRequest {
|
|
412
408
|
bundleId: string;
|
|
413
|
-
/** Optional: override cell pixel size (default 400) */
|
|
414
409
|
cellSize?: number | undefined;
|
|
415
410
|
}
|
|
416
411
|
|
|
417
412
|
export interface GenerateBundleCollageResponse {
|
|
418
|
-
/** Public CDN/S3 URL of the collage JPEG */
|
|
419
413
|
url: string;
|
|
420
|
-
/** S3 object key */
|
|
421
414
|
key: string;
|
|
422
|
-
/** Final image width in pixels */
|
|
423
415
|
width: number;
|
|
424
|
-
/** Final image height in pixels */
|
|
425
416
|
height: number;
|
|
426
417
|
bundleId: string;
|
|
427
418
|
}
|
package/gen/search.ts
CHANGED
|
@@ -165,11 +165,6 @@ export interface ClearZeroResultsRequest {
|
|
|
165
165
|
|
|
166
166
|
export const CATALOG_V1_PACKAGE_NAME = "catalog.v1";
|
|
167
167
|
|
|
168
|
-
/**
|
|
169
|
-
* SearchService — окремий сервіс під autocomplete та керування пошуком
|
|
170
|
-
* (синоніми, популярні запити). Логіка та індекс живуть у catalog-service.
|
|
171
|
-
*/
|
|
172
|
-
|
|
173
168
|
export interface SearchServiceClient {
|
|
174
169
|
/** ─── Public (autocomplete) ─────────────────────────────────────────────── */
|
|
175
170
|
|
|
@@ -206,11 +201,6 @@ export interface SearchServiceClient {
|
|
|
206
201
|
clearZeroResults(request: ClearZeroResultsRequest): Observable<SuccessResponse>;
|
|
207
202
|
}
|
|
208
203
|
|
|
209
|
-
/**
|
|
210
|
-
* SearchService — окремий сервіс під autocomplete та керування пошуком
|
|
211
|
-
* (синоніми, популярні запити). Логіка та індекс живуть у catalog-service.
|
|
212
|
-
*/
|
|
213
|
-
|
|
214
204
|
export interface SearchServiceController {
|
|
215
205
|
/** ─── Public (autocomplete) ─────────────────────────────────────────────── */
|
|
216
206
|
|
package/gen/shop_filters.ts
CHANGED
|
@@ -13,36 +13,16 @@ export const protobufPackage = "catalog.v1";
|
|
|
13
13
|
|
|
14
14
|
export interface GetShopFiltersRequest {
|
|
15
15
|
categoryId: string;
|
|
16
|
-
/**
|
|
17
|
-
* Поточно застосовані фільтри. Counts по кожному facet рахуються
|
|
18
|
-
* з виключенням саме того facet — щоб лічильники реагували на вибір.
|
|
19
|
-
*/
|
|
20
16
|
brandIds: string[];
|
|
21
17
|
colorIds: string[];
|
|
22
18
|
sizeIds: string[];
|
|
23
19
|
priceMin?: number | undefined;
|
|
24
20
|
priceMax?: number | undefined;
|
|
25
21
|
inStock?: boolean | undefined;
|
|
26
|
-
search?:
|
|
27
|
-
|
|
28
|
-
| undefined;
|
|
29
|
-
/**
|
|
30
|
-
* Обмеження множини товарів акцією — фасети рахуються тільки
|
|
31
|
-
* по товарах, що належать поточній акції.
|
|
32
|
-
*/
|
|
33
|
-
promotionFilter?:
|
|
34
|
-
| PromotionFilter
|
|
35
|
-
| undefined;
|
|
36
|
-
/** Динамічні атрибути окрім color/size (матеріал, виробник тощо). */
|
|
22
|
+
search?: string | undefined;
|
|
23
|
+
promotionFilter?: PromotionFilter | undefined;
|
|
37
24
|
attributeValueIds: string[];
|
|
38
|
-
|
|
39
|
-
* Явний прапор "ціновий фільтр активний". Без нього неможливо
|
|
40
|
-
* відрізнити "користувач не вибирав" від "обрав від 0".
|
|
41
|
-
*/
|
|
42
|
-
priceActive?:
|
|
43
|
-
| boolean
|
|
44
|
-
| undefined;
|
|
45
|
-
/** 'uk' | 'ru' — для локалізації labels у відповіді (дефолт uk). */
|
|
25
|
+
priceActive?: boolean | undefined;
|
|
46
26
|
locale?: string | undefined;
|
|
47
27
|
}
|
|
48
28
|
|
|
@@ -53,7 +33,14 @@ export interface GetShopFiltersResponse {
|
|
|
53
33
|
attributes: ShopFilterAttribute[];
|
|
54
34
|
priceMin: number;
|
|
55
35
|
priceMax: number;
|
|
56
|
-
|
|
36
|
+
subcategories: ShopFilterSubcategory[];
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface ShopFilterSubcategory {
|
|
40
|
+
id: string;
|
|
41
|
+
slug: string;
|
|
42
|
+
label: string;
|
|
43
|
+
count: number;
|
|
57
44
|
}
|
|
58
45
|
|
|
59
46
|
export interface ShopFilterOption {
|
|
@@ -71,10 +58,6 @@ export interface ShopFilterColorOption {
|
|
|
71
58
|
|
|
72
59
|
export interface ShopFilterAttribute {
|
|
73
60
|
slug: string;
|
|
74
|
-
/**
|
|
75
|
-
* Локалізована назва атрибута (на стороні gateway вже згорнута у
|
|
76
|
-
* одну рядкову label згідно locale запиту).
|
|
77
|
-
*/
|
|
78
61
|
label: string;
|
|
79
62
|
values: ShopFilterOption[];
|
|
80
63
|
}
|
package/package.json
CHANGED
package/proto/audit.proto
CHANGED
|
@@ -11,11 +11,11 @@ message LogActionRequest {
|
|
|
11
11
|
optional string actor_id = 1;
|
|
12
12
|
optional string actor_name = 2;
|
|
13
13
|
optional string actor_email = 3;
|
|
14
|
-
string action = 4;
|
|
15
|
-
string target_type = 5;
|
|
14
|
+
string action = 4;
|
|
15
|
+
string target_type = 5;
|
|
16
16
|
optional string target_id = 6;
|
|
17
|
-
optional string summary = 7;
|
|
18
|
-
optional string before_json = 8;
|
|
17
|
+
optional string summary = 7;
|
|
18
|
+
optional string before_json = 8;
|
|
19
19
|
optional string after_json = 9;
|
|
20
20
|
optional string ip = 10;
|
|
21
21
|
optional string user_agent = 11;
|
|
@@ -32,8 +32,8 @@ message ListAuditRequest {
|
|
|
32
32
|
optional string target_type = 4;
|
|
33
33
|
optional string target_id = 5;
|
|
34
34
|
optional string action = 6;
|
|
35
|
-
optional string action_group = 7;
|
|
36
|
-
optional string from = 8;
|
|
35
|
+
optional string action_group = 7;
|
|
36
|
+
optional string from = 8;
|
|
37
37
|
optional string to = 9;
|
|
38
38
|
}
|
|
39
39
|
|
package/proto/banner.proto
CHANGED
|
@@ -118,7 +118,7 @@ message UpdateBannerRequest {
|
|
|
118
118
|
string id = 1;
|
|
119
119
|
optional string slug = 2;
|
|
120
120
|
map<string, string> name = 3;
|
|
121
|
-
|
|
121
|
+
|
|
122
122
|
repeated BannerPlacement placements = 4;
|
|
123
123
|
optional bool status = 5;
|
|
124
124
|
optional int32 sort_order = 6;
|
|
@@ -10,14 +10,13 @@ service BonusSettingsService {
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
message BonusSettingsResponse {
|
|
13
|
-
|
|
13
|
+
|
|
14
14
|
double earn_rate = 1;
|
|
15
|
-
|
|
15
|
+
|
|
16
16
|
double redeem_rate = 2;
|
|
17
|
-
|
|
17
|
+
|
|
18
18
|
double min_order_for_earn = 3;
|
|
19
|
-
|
|
20
|
-
// (1.0 = до 100%, 0.5 = до 50%; 0 — без обмеження).
|
|
19
|
+
|
|
21
20
|
double max_redeem_share = 4;
|
|
22
21
|
|
|
23
22
|
string updated_at = 5;
|
package/proto/brand.proto
CHANGED
package/proto/bundle.proto
CHANGED
|
@@ -42,7 +42,6 @@ service BundleService {
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
|
|
45
|
-
// ─── Enums ────────────────────────────────────────────────────────────────────
|
|
46
45
|
|
|
47
46
|
enum BundleStatus {
|
|
48
47
|
BUNDLE_STATUS_UNSPECIFIED = 0;
|
|
@@ -83,7 +82,6 @@ enum RuleOperator {
|
|
|
83
82
|
}
|
|
84
83
|
|
|
85
84
|
|
|
86
|
-
// ─── Requests ─────────────────────────────────────────────────────────────────
|
|
87
85
|
|
|
88
86
|
message GetBundlesRequest {
|
|
89
87
|
PaginationRequest pagination = 1;
|
|
@@ -122,7 +120,7 @@ message CreateBundleRequest {
|
|
|
122
120
|
repeated BundleItemPayload items = 15;
|
|
123
121
|
string created_by_id = 16;
|
|
124
122
|
|
|
125
|
-
|
|
123
|
+
|
|
126
124
|
repeated DisplayPlacement display_placements = 17;
|
|
127
125
|
PriceMode price_mode = 18;
|
|
128
126
|
bool require_all_in_stock = 19;
|
|
@@ -155,7 +153,7 @@ message UpdateBundleRequest {
|
|
|
155
153
|
|
|
156
154
|
repeated BundleItemPayload items = 16;
|
|
157
155
|
|
|
158
|
-
|
|
156
|
+
|
|
159
157
|
repeated DisplayPlacement display_placements = 17;
|
|
160
158
|
optional PriceMode price_mode = 18;
|
|
161
159
|
optional bool require_all_in_stock = 19;
|
|
@@ -252,7 +250,6 @@ message AddCrossSellLinkRequest {
|
|
|
252
250
|
}
|
|
253
251
|
|
|
254
252
|
|
|
255
|
-
// ─── Responses ────────────────────────────────────────────────────────────────
|
|
256
253
|
|
|
257
254
|
message GetBundlesResponse {
|
|
258
255
|
repeated BundleListItemResponse items = 1;
|
|
@@ -312,7 +309,7 @@ message BundleDetailResponse {
|
|
|
312
309
|
double final_price = 19;
|
|
313
310
|
bool in_stock = 20;
|
|
314
311
|
|
|
315
|
-
|
|
312
|
+
|
|
316
313
|
repeated DisplayPlacement display_placements = 21;
|
|
317
314
|
PriceMode price_mode = 22;
|
|
318
315
|
bool require_all_in_stock = 23;
|
|
@@ -360,26 +357,25 @@ message BundleItemAvailability {
|
|
|
360
357
|
}
|
|
361
358
|
|
|
362
359
|
message ExportBundlesResponse {
|
|
363
|
-
string content = 1;
|
|
360
|
+
string content = 1;
|
|
364
361
|
string format = 2;
|
|
365
362
|
int32 count = 3;
|
|
366
363
|
}
|
|
367
364
|
|
|
368
365
|
message GenerateBundleCollageRequest {
|
|
369
366
|
string bundle_id = 1;
|
|
370
|
-
|
|
367
|
+
|
|
371
368
|
optional int32 cell_size = 2;
|
|
372
369
|
}
|
|
373
370
|
|
|
374
371
|
message GenerateBundleCollageResponse {
|
|
375
|
-
string url = 1;
|
|
376
|
-
string key = 2;
|
|
377
|
-
int32 width = 3;
|
|
378
|
-
int32 height = 4;
|
|
372
|
+
string url = 1;
|
|
373
|
+
string key = 2;
|
|
374
|
+
int32 width = 3;
|
|
375
|
+
int32 height = 4;
|
|
379
376
|
string bundle_id = 5;
|
|
380
377
|
}
|
|
381
378
|
|
|
382
|
-
// ── Bulk Lookup ──────────────────────────────────────────────────────────────
|
|
383
379
|
|
|
384
380
|
message BulkLookupBundlesRequest {
|
|
385
381
|
repeated string slugs = 1;
|
|
@@ -396,7 +392,6 @@ message BulkLookupBundlesResponse {
|
|
|
396
392
|
repeated BundleLookupResult results = 1;
|
|
397
393
|
}
|
|
398
394
|
|
|
399
|
-
// ── Bundle Related Products ──────────────────────────────────────────────────
|
|
400
395
|
|
|
401
396
|
enum BundleRelatedType {
|
|
402
397
|
BUNDLE_RELATED_TYPE_UNSPECIFIED = 0;
|
package/proto/search.proto
CHANGED
|
@@ -4,8 +4,7 @@ package catalog.v1;
|
|
|
4
4
|
|
|
5
5
|
import "common.proto";
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
// (синоніми, популярні запити). Логіка та індекс живуть у catalog-service.
|
|
7
|
+
|
|
9
8
|
service SearchService {
|
|
10
9
|
// ─── Public (autocomplete) ───────────────────────────────────────────────
|
|
11
10
|
rpc Suggest (SuggestRequest) returns (SuggestResponse);
|
package/proto/shop_filters.proto
CHANGED
|
@@ -15,8 +15,7 @@ service ShopFilterService {
|
|
|
15
15
|
message GetShopFiltersRequest {
|
|
16
16
|
string category_id = 1;
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
// з виключенням саме того facet — щоб лічильники реагували на вибір.
|
|
18
|
+
|
|
20
19
|
repeated string brand_ids = 2;
|
|
21
20
|
repeated string color_ids = 3;
|
|
22
21
|
repeated string size_ids = 4;
|
|
@@ -25,18 +24,16 @@ message GetShopFiltersRequest {
|
|
|
25
24
|
optional bool in_stock = 7;
|
|
26
25
|
optional string search = 8;
|
|
27
26
|
|
|
28
|
-
|
|
29
|
-
// по товарах, що належать поточній акції.
|
|
27
|
+
|
|
30
28
|
optional PromotionFilter promotion_filter = 9;
|
|
31
29
|
|
|
32
|
-
|
|
30
|
+
|
|
33
31
|
repeated string attribute_value_ids = 10;
|
|
34
32
|
|
|
35
|
-
|
|
36
|
-
// відрізнити "користувач не вибирав" від "обрав від 0".
|
|
33
|
+
|
|
37
34
|
optional bool price_active = 11;
|
|
38
35
|
|
|
39
|
-
|
|
36
|
+
|
|
40
37
|
optional string locale = 12;
|
|
41
38
|
}
|
|
42
39
|
|
|
@@ -48,7 +45,15 @@ message GetShopFiltersResponse {
|
|
|
48
45
|
repeated ShopFilterAttribute attributes = 4;
|
|
49
46
|
double price_min = 5;
|
|
50
47
|
double price_max = 6;
|
|
51
|
-
|
|
48
|
+
|
|
49
|
+
repeated ShopFilterSubcategory subcategories = 7;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
message ShopFilterSubcategory {
|
|
53
|
+
string id = 1;
|
|
54
|
+
string slug = 2;
|
|
55
|
+
string label = 3;
|
|
56
|
+
int32 count = 4;
|
|
52
57
|
}
|
|
53
58
|
|
|
54
59
|
message ShopFilterOption {
|
|
@@ -66,8 +71,7 @@ message ShopFilterColorOption {
|
|
|
66
71
|
|
|
67
72
|
message ShopFilterAttribute {
|
|
68
73
|
string slug = 1;
|
|
69
|
-
|
|
70
|
-
// одну рядкову label згідно locale запиту).
|
|
74
|
+
|
|
71
75
|
string label = 2;
|
|
72
76
|
repeated ShopFilterOption values = 3;
|
|
73
77
|
}
|