@mamindom/contracts 1.0.144 → 1.0.146
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/attribute.d.ts +40 -0
- package/dist/gen/attribute.js +1 -0
- package/dist/gen/brand.d.ts +19 -0
- package/dist/gen/brand.js +8 -1
- package/dist/gen/bundle.d.ts +0 -2
- package/dist/gen/cart.d.ts +0 -28
- package/dist/gen/category.d.ts +26 -0
- package/dist/gen/category.js +1 -0
- package/dist/gen/delivery.d.ts +0 -1
- package/dist/gen/delivery_settings.d.ts +0 -4
- package/dist/gen/faq.d.ts +0 -6
- package/dist/gen/manager.d.ts +0 -12
- package/dist/gen/notification.d.ts +0 -71
- package/dist/gen/order.d.ts +0 -29
- package/dist/gen/page.d.ts +0 -5
- package/dist/gen/payment.d.ts +0 -22
- package/dist/gen/pickup.d.ts +0 -9
- package/dist/gen/product.d.ts +108 -11
- package/dist/gen/product.js +5 -0
- package/dist/gen/promotion.d.ts +0 -16
- package/dist/gen/rbac.d.ts +0 -16
- package/dist/gen/search.d.ts +0 -14
- package/dist/gen/seo_filter.d.ts +0 -57
- package/dist/gen/shop_filters.d.ts +0 -5
- package/dist/gen/users.d.ts +0 -9
- package/dist/gen/warehouse.d.ts +34 -0
- package/dist/gen/warehouse.js +28 -0
- package/dist/proto/attribute.proto +35 -0
- package/dist/proto/brand.proto +25 -0
- package/dist/proto/bundle.proto +2 -2
- package/dist/proto/cart.proto +5 -14
- package/dist/proto/category.proto +26 -0
- package/dist/proto/delivery.proto +1 -6
- package/dist/proto/delivery_settings.proto +4 -4
- package/dist/proto/faq.proto +3 -10
- package/dist/proto/manager.proto +3 -5
- package/dist/proto/notification.proto +33 -56
- package/dist/proto/order.proto +9 -21
- package/dist/proto/page.proto +1 -3
- package/dist/proto/payment.proto +8 -14
- package/dist/proto/pickup.proto +7 -9
- package/dist/proto/product.proto +144 -34
- package/dist/proto/promotion.proto +9 -22
- package/dist/proto/rbac.proto +7 -9
- package/dist/proto/search.proto +10 -14
- package/dist/proto/seo_filter.proto +17 -36
- package/dist/proto/shop_filters.proto +1 -3
- package/dist/proto/users.proto +5 -8
- package/dist/proto/warehouse.proto +38 -0
- package/dist/src/proto/paths.d.ts +1 -0
- package/dist/src/proto/paths.js +1 -0
- package/gen/attribute.ts +48 -0
- package/gen/brand.ts +35 -1
- package/gen/bundle.ts +1 -5
- package/gen/cart.ts +1 -35
- package/gen/category.ts +34 -0
- package/gen/delivery.ts +0 -1
- package/gen/delivery_settings.ts +0 -4
- package/gen/faq.ts +0 -12
- package/gen/manager.ts +1 -17
- package/gen/notification.ts +5 -98
- package/gen/order.ts +0 -33
- package/gen/page.ts +0 -5
- package/gen/payment.ts +0 -34
- package/gen/pickup.ts +2 -19
- package/gen/product.ts +148 -28
- package/gen/promotion.ts +3 -33
- package/gen/rbac.ts +1 -25
- package/gen/search.ts +0 -22
- package/gen/seo_filter.ts +3 -74
- package/gen/shop_filters.ts +0 -5
- package/gen/users.ts +1 -20
- package/gen/warehouse.ts +67 -0
- package/package.json +1 -1
- package/proto/attribute.proto +35 -0
- package/proto/brand.proto +25 -0
- package/proto/bundle.proto +2 -2
- package/proto/cart.proto +5 -14
- package/proto/category.proto +26 -0
- package/proto/delivery.proto +1 -6
- package/proto/delivery_settings.proto +4 -4
- package/proto/faq.proto +3 -10
- package/proto/manager.proto +3 -5
- package/proto/notification.proto +33 -56
- package/proto/order.proto +9 -21
- package/proto/page.proto +1 -3
- package/proto/payment.proto +8 -14
- package/proto/pickup.proto +7 -9
- package/proto/product.proto +144 -34
- package/proto/promotion.proto +9 -22
- package/proto/rbac.proto +7 -9
- package/proto/search.proto +10 -14
- package/proto/seo_filter.proto +17 -36
- package/proto/shop_filters.proto +1 -3
- package/proto/users.proto +5 -8
- package/proto/warehouse.proto +38 -0
|
@@ -6,14 +6,9 @@ import "common.proto";
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
service SeoFilterService {
|
|
9
|
-
// ─── Public ──────────────────────────────────────────────────────────────
|
|
10
9
|
|
|
11
|
-
// Резолв ЧПУ-URL → metadata + canonical. Викликається SSR Next.js для
|
|
12
|
-
// кожного category/[[...filters]] запиту. Якщо combo не знайдено —
|
|
13
|
-
// повертає isIndexed=false і автогенерований fallback metadata.
|
|
14
10
|
rpc ResolveSeoFilter (ResolveSeoFilterRequest) returns (ResolveSeoFilterResponse);
|
|
15
11
|
|
|
16
|
-
// ─── Admin ───────────────────────────────────────────────────────────────
|
|
17
12
|
|
|
18
13
|
rpc ListSeoFilters (ListSeoFiltersRequest) returns (ListSeoFiltersResponse);
|
|
19
14
|
rpc GetSeoFilter (GetSeoFilterRequest) returns (SeoFilterResponse);
|
|
@@ -21,30 +16,24 @@ service SeoFilterService {
|
|
|
21
16
|
rpc UpdateSeoFilter (UpdateSeoFilterRequest) returns (SeoFilterResponse);
|
|
22
17
|
rpc DeleteSeoFilter (DeleteSeoFilterRequest) returns (DeleteResponse);
|
|
23
18
|
|
|
24
|
-
|
|
25
|
-
// швидкого створення SeoFilter з адмін-форми "Автопідказки".
|
|
19
|
+
|
|
26
20
|
rpc SuggestSeoFilters (SuggestSeoFiltersRequest) returns (SuggestSeoFiltersResponse);
|
|
27
21
|
|
|
28
|
-
// Список усіх індексованих SeoFilter URL — для побудови sitemap.xml.
|
|
29
|
-
// Повертає одночасно uk+ru сегменти (denormalized) + category slug.
|
|
30
22
|
rpc ListIndexedForSitemap (ListIndexedForSitemapRequest) returns (ListIndexedForSitemapResponse);
|
|
31
23
|
}
|
|
32
24
|
|
|
33
|
-
// ─────────────────────────── Domain types ────────────────────────────────
|
|
34
25
|
|
|
35
|
-
// Частина combo. Однаковий формат і у DB (combo_parts JSON), і у gRPC.
|
|
36
|
-
// type: 'brand'|'price'|'color'|'size'
|
|
37
26
|
message FilterPart {
|
|
38
27
|
string type = 1;
|
|
39
|
-
|
|
28
|
+
|
|
40
29
|
optional string value_id = 2;
|
|
41
30
|
optional string value_slug = 3;
|
|
42
|
-
|
|
31
|
+
|
|
43
32
|
optional int32 price_min = 4;
|
|
44
33
|
optional int32 price_max = 5;
|
|
45
34
|
}
|
|
46
35
|
|
|
47
|
-
|
|
36
|
+
|
|
48
37
|
message LocaleStrings {
|
|
49
38
|
string uk = 1;
|
|
50
39
|
string ru = 2;
|
|
@@ -66,40 +55,35 @@ message SeoFilterResponse {
|
|
|
66
55
|
int64 updated_at = 13;
|
|
67
56
|
}
|
|
68
57
|
|
|
69
|
-
// ─────────────────────────── Resolve (public) ────────────────────────────
|
|
70
58
|
|
|
71
59
|
message ResolveSeoFilterRequest {
|
|
72
60
|
string category_id = 1;
|
|
73
|
-
|
|
74
|
-
// ["brend-cybex", "cina-1000-5000"]. Caller гарантує що порядок canonical.
|
|
61
|
+
|
|
75
62
|
repeated string url_segments = 2;
|
|
76
|
-
string locale = 3;
|
|
63
|
+
string locale = 3;
|
|
77
64
|
}
|
|
78
65
|
|
|
79
66
|
message ResolveSeoFilterResponse {
|
|
80
|
-
|
|
67
|
+
|
|
81
68
|
bool found = 1;
|
|
82
|
-
|
|
83
|
-
// запис знайдено (наприклад, isIndexed=false manual override).
|
|
69
|
+
|
|
84
70
|
bool is_indexed = 2;
|
|
85
71
|
LocaleStrings title = 3;
|
|
86
72
|
LocaleStrings description = 4;
|
|
87
73
|
LocaleStrings h1 = 5;
|
|
88
|
-
|
|
74
|
+
|
|
89
75
|
string canonical_path = 6;
|
|
90
|
-
|
|
91
|
-
// запиту до products (categoryId + filter ids).
|
|
76
|
+
|
|
92
77
|
repeated FilterPart resolved_parts = 7;
|
|
93
78
|
}
|
|
94
79
|
|
|
95
|
-
// ─────────────────────────── List (admin) ────────────────────────────────
|
|
96
80
|
|
|
97
81
|
message ListSeoFiltersRequest {
|
|
98
82
|
PaginationRequest pagination = 1;
|
|
99
83
|
optional string category_id = 2;
|
|
100
84
|
optional bool is_indexed = 3;
|
|
101
85
|
optional bool is_auto = 4;
|
|
102
|
-
|
|
86
|
+
|
|
103
87
|
optional string search = 5;
|
|
104
88
|
}
|
|
105
89
|
|
|
@@ -112,7 +96,6 @@ message GetSeoFilterRequest {
|
|
|
112
96
|
string id = 1;
|
|
113
97
|
}
|
|
114
98
|
|
|
115
|
-
// ─────────────────────────── Create / Update ─────────────────────────────
|
|
116
99
|
|
|
117
100
|
message CreateSeoFilterRequest {
|
|
118
101
|
string category_id = 1;
|
|
@@ -135,21 +118,20 @@ message DeleteSeoFilterRequest {
|
|
|
135
118
|
string id = 1;
|
|
136
119
|
}
|
|
137
120
|
|
|
138
|
-
// ─────────────────────────── Suggestions (admin) ─────────────────────────
|
|
139
121
|
|
|
140
122
|
message SuggestSeoFiltersRequest {
|
|
141
123
|
string category_id = 1;
|
|
142
|
-
int32 limit = 2;
|
|
124
|
+
int32 limit = 2;
|
|
143
125
|
}
|
|
144
126
|
|
|
145
127
|
message SuggestSeoFilterCandidate {
|
|
146
|
-
|
|
128
|
+
|
|
147
129
|
repeated FilterPart combo_parts = 1;
|
|
148
|
-
|
|
130
|
+
|
|
149
131
|
int32 score = 2;
|
|
150
|
-
|
|
132
|
+
|
|
151
133
|
bool already_exists = 3;
|
|
152
|
-
|
|
134
|
+
|
|
153
135
|
LocaleStrings preview_segments = 4;
|
|
154
136
|
}
|
|
155
137
|
|
|
@@ -157,10 +139,9 @@ message SuggestSeoFiltersResponse {
|
|
|
157
139
|
repeated SuggestSeoFilterCandidate items = 1;
|
|
158
140
|
}
|
|
159
141
|
|
|
160
|
-
// ─────────────────────────── Sitemap (public) ────────────────────────────
|
|
161
142
|
|
|
162
143
|
message ListIndexedForSitemapRequest {
|
|
163
|
-
|
|
144
|
+
|
|
164
145
|
optional int32 limit = 1;
|
|
165
146
|
optional string after_id = 2;
|
|
166
147
|
}
|
|
@@ -60,9 +60,7 @@ message ShopFilterOption {
|
|
|
60
60
|
string value = 1;
|
|
61
61
|
string label = 2;
|
|
62
62
|
int32 count = 3;
|
|
63
|
-
|
|
64
|
-
// (brend-<slug>, kolir-<slug>, rozmir-<slug>). Якщо slug ще не
|
|
65
|
-
// згенеровано через backfill — пусто, frontend fallback на id.
|
|
63
|
+
|
|
66
64
|
optional string slug = 4;
|
|
67
65
|
}
|
|
68
66
|
|
package/dist/proto/users.proto
CHANGED
|
@@ -31,24 +31,24 @@ service UsersService {
|
|
|
31
31
|
rpc ExportUserData(ExportUserDataRequest) returns (ExportUserDataResponse);
|
|
32
32
|
rpc DeleteAccount(DeleteAccountRequest) returns (DeleteAccountResponse);
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
|
|
35
35
|
rpc GetFamily(GetFamilyRequest) returns (GetFamilyResponse);
|
|
36
36
|
rpc AddChild(AddChildRequest) returns (ChildResponse);
|
|
37
37
|
rpc UpdateChild(UpdateChildRequest) returns (ChildResponse);
|
|
38
38
|
rpc RemoveChild(RemoveChildRequest) returns (RemoveChildResponse);
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
|
|
41
41
|
rpc GetPregnancy(GetPregnancyRequest) returns (GetPregnancyResponse);
|
|
42
42
|
rpc UpdatePregnancy(UpdatePregnancyRequest) returns (GetPregnancyResponse);
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
|
|
45
45
|
rpc GetCart(GetCartRequest) returns (GetCartResponse);
|
|
46
46
|
rpc UpsertCartItem(UpsertCartItemRequest) returns (GetCartResponse);
|
|
47
47
|
rpc RemoveCartItem(RemoveCartItemRequest) returns (GetCartResponse);
|
|
48
48
|
rpc ClearCart(ClearCartRequest) returns (ClearCartResponse);
|
|
49
49
|
rpc SyncCart(SyncCartRequest) returns (GetCartResponse);
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
|
|
52
52
|
rpc AdminUpdateCustomer(AdminUpdateCustomerRequest) returns (AdminUpdateCustomerResponse);
|
|
53
53
|
}
|
|
54
54
|
|
|
@@ -97,7 +97,7 @@ message AdminUpdateCustomerRequest {
|
|
|
97
97
|
string id = 1;
|
|
98
98
|
optional string first_name = 2;
|
|
99
99
|
optional string last_name = 3;
|
|
100
|
-
|
|
100
|
+
|
|
101
101
|
optional string internal_note = 4;
|
|
102
102
|
}
|
|
103
103
|
|
|
@@ -249,7 +249,6 @@ message DeleteAccountResponse {
|
|
|
249
249
|
bool ok = 1;
|
|
250
250
|
}
|
|
251
251
|
|
|
252
|
-
// ── Family ───────────────────────────────────────────────────────────────────
|
|
253
252
|
|
|
254
253
|
enum Gender {
|
|
255
254
|
BOY = 0;
|
|
@@ -300,7 +299,6 @@ message RemoveChildResponse {
|
|
|
300
299
|
bool ok = 1;
|
|
301
300
|
}
|
|
302
301
|
|
|
303
|
-
// ── Pregnancy ────────────────────────────────────────────────────────────────
|
|
304
302
|
|
|
305
303
|
message GetPregnancyRequest {
|
|
306
304
|
string user_id = 1;
|
|
@@ -315,7 +313,6 @@ message UpdatePregnancyRequest {
|
|
|
315
313
|
int32 week = 2;
|
|
316
314
|
}
|
|
317
315
|
|
|
318
|
-
// ── Cart ─────────────────────────────────────────────────────────────────────
|
|
319
316
|
|
|
320
317
|
message CartItemVariant {
|
|
321
318
|
string key = 1;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package catalog.v1;
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
service WarehouseService {
|
|
7
|
+
rpc UpsertWarehouses (UpsertWarehousesRequest) returns (UpsertWarehousesResponse);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
message WarehouseSyncItem {
|
|
11
|
+
string warehouse_guid = 1;
|
|
12
|
+
string name = 2;
|
|
13
|
+
|
|
14
|
+
string code1c = 3;
|
|
15
|
+
optional string pf_code = 4;
|
|
16
|
+
optional string address = 5;
|
|
17
|
+
optional string phone = 6;
|
|
18
|
+
|
|
19
|
+
optional bool is_retail = 7;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
message UpsertWarehousesRequest {
|
|
23
|
+
repeated WarehouseSyncItem items = 1;
|
|
24
|
+
string sync_id = 2;
|
|
25
|
+
|
|
26
|
+
string online_warehouse_code = 3;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
message WarehouseUpsertResult {
|
|
30
|
+
string guid = 1;
|
|
31
|
+
string status = 2;
|
|
32
|
+
optional string reason = 3;
|
|
33
|
+
optional string id = 4;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
message UpsertWarehousesResponse {
|
|
37
|
+
repeated WarehouseUpsertResult results = 1;
|
|
38
|
+
}
|
package/dist/src/proto/paths.js
CHANGED
|
@@ -23,6 +23,7 @@ exports.PROTO_PATHS = {
|
|
|
23
23
|
SEO_FILTER: (0, node_path_1.join)(__dirname, '../../proto/seo_filter.proto'),
|
|
24
24
|
PICKUP: (0, node_path_1.join)(__dirname, '../../proto/pickup.proto'),
|
|
25
25
|
PRODUCT_REVIEW: (0, node_path_1.join)(__dirname, '../../proto/product_review.proto'),
|
|
26
|
+
WAREHOUSE: (0, node_path_1.join)(__dirname, '../../proto/warehouse.proto'),
|
|
26
27
|
COMMON_PROMO: (0, node_path_1.join)(__dirname, '../../proto/common_promo.proto'),
|
|
27
28
|
CALCULATION: (0, node_path_1.join)(__dirname, '../../proto/calculation.proto'),
|
|
28
29
|
COUPON: (0, node_path_1.join)(__dirname, '../../proto/coupon.proto'),
|
package/gen/attribute.ts
CHANGED
|
@@ -11,6 +11,47 @@ import { DeleteResponse, PaginationMeta, PaginationRequest, SuccessResponse } fr
|
|
|
11
11
|
|
|
12
12
|
export const protobufPackage = "catalog.v1";
|
|
13
13
|
|
|
14
|
+
export interface AttributeSyncValueItem {
|
|
15
|
+
valueGuid: string;
|
|
16
|
+
value: { [key: string]: string };
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface AttributeSyncValueItem_ValueEntry {
|
|
20
|
+
key: string;
|
|
21
|
+
value: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface AttributeSyncItem {
|
|
25
|
+
propertyGuid: string;
|
|
26
|
+
name: { [key: string]: string };
|
|
27
|
+
isColor: boolean;
|
|
28
|
+
values: AttributeSyncValueItem[];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface AttributeSyncItem_NameEntry {
|
|
32
|
+
key: string;
|
|
33
|
+
value: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface UpsertAttributesRequest {
|
|
37
|
+
items: AttributeSyncItem[];
|
|
38
|
+
syncId: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface AttributeUpsertResult {
|
|
42
|
+
guid: string;
|
|
43
|
+
status: string;
|
|
44
|
+
reason?: string | undefined;
|
|
45
|
+
id?: string | undefined;
|
|
46
|
+
valuesCreated: number;
|
|
47
|
+
valuesUpdated: number;
|
|
48
|
+
valuesFailed: number;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface UpsertAttributesResponse {
|
|
52
|
+
results: AttributeUpsertResult[];
|
|
53
|
+
}
|
|
54
|
+
|
|
14
55
|
export interface GetAllAttributesWithValuesRequest {
|
|
15
56
|
}
|
|
16
57
|
|
|
@@ -240,6 +281,8 @@ export interface AttributeServiceClient {
|
|
|
240
281
|
getAllAttributesWithValues(
|
|
241
282
|
request: GetAllAttributesWithValuesRequest,
|
|
242
283
|
): Observable<GetAllAttributesWithValuesResponse>;
|
|
284
|
+
|
|
285
|
+
upsertAttributes(request: UpsertAttributesRequest): Observable<UpsertAttributesResponse>;
|
|
243
286
|
}
|
|
244
287
|
|
|
245
288
|
export interface AttributeServiceController {
|
|
@@ -313,6 +356,10 @@ export interface AttributeServiceController {
|
|
|
313
356
|
| Promise<GetAllAttributesWithValuesResponse>
|
|
314
357
|
| Observable<GetAllAttributesWithValuesResponse>
|
|
315
358
|
| GetAllAttributesWithValuesResponse;
|
|
359
|
+
|
|
360
|
+
upsertAttributes(
|
|
361
|
+
request: UpsertAttributesRequest,
|
|
362
|
+
): Promise<UpsertAttributesResponse> | Observable<UpsertAttributesResponse> | UpsertAttributesResponse;
|
|
316
363
|
}
|
|
317
364
|
|
|
318
365
|
export function AttributeServiceControllerMethods() {
|
|
@@ -335,6 +382,7 @@ export function AttributeServiceControllerMethods() {
|
|
|
335
382
|
"bindAttributeToCategory",
|
|
336
383
|
"unbindAttributeFromCategory",
|
|
337
384
|
"getAllAttributesWithValues",
|
|
385
|
+
"upsertAttributes",
|
|
338
386
|
];
|
|
339
387
|
for (const method of grpcMethods) {
|
|
340
388
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
package/gen/brand.ts
CHANGED
|
@@ -11,6 +11,27 @@ import { DeleteResponse, PaginationMeta, PaginationRequest } from "./common";
|
|
|
11
11
|
|
|
12
12
|
export const protobufPackage = "catalog.v1";
|
|
13
13
|
|
|
14
|
+
export interface BrandSyncItem {
|
|
15
|
+
brandGuid: string;
|
|
16
|
+
name: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface UpsertBrandsRequest {
|
|
20
|
+
items: BrandSyncItem[];
|
|
21
|
+
syncId: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface BrandUpsertResult {
|
|
25
|
+
guid: string;
|
|
26
|
+
status: string;
|
|
27
|
+
reason?: string | undefined;
|
|
28
|
+
id?: string | undefined;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface UpsertBrandsResponse {
|
|
32
|
+
results: BrandUpsertResult[];
|
|
33
|
+
}
|
|
34
|
+
|
|
14
35
|
export interface BrandResponse {
|
|
15
36
|
id: string;
|
|
16
37
|
slug: string;
|
|
@@ -123,6 +144,8 @@ export interface BrandServiceClient {
|
|
|
123
144
|
updateBrand(request: UpdateBrandRequest): Observable<BrandResponse>;
|
|
124
145
|
|
|
125
146
|
deleteBrand(request: DeleteBrandRequest): Observable<DeleteResponse>;
|
|
147
|
+
|
|
148
|
+
upsertBrands(request: UpsertBrandsRequest): Observable<UpsertBrandsResponse>;
|
|
126
149
|
}
|
|
127
150
|
|
|
128
151
|
export interface BrandServiceController {
|
|
@@ -135,11 +158,22 @@ export interface BrandServiceController {
|
|
|
135
158
|
updateBrand(request: UpdateBrandRequest): Promise<BrandResponse> | Observable<BrandResponse> | BrandResponse;
|
|
136
159
|
|
|
137
160
|
deleteBrand(request: DeleteBrandRequest): Promise<DeleteResponse> | Observable<DeleteResponse> | DeleteResponse;
|
|
161
|
+
|
|
162
|
+
upsertBrands(
|
|
163
|
+
request: UpsertBrandsRequest,
|
|
164
|
+
): Promise<UpsertBrandsResponse> | Observable<UpsertBrandsResponse> | UpsertBrandsResponse;
|
|
138
165
|
}
|
|
139
166
|
|
|
140
167
|
export function BrandServiceControllerMethods() {
|
|
141
168
|
return function (constructor: Function) {
|
|
142
|
-
const grpcMethods: string[] = [
|
|
169
|
+
const grpcMethods: string[] = [
|
|
170
|
+
"getBrands",
|
|
171
|
+
"getBrand",
|
|
172
|
+
"createBrand",
|
|
173
|
+
"updateBrand",
|
|
174
|
+
"deleteBrand",
|
|
175
|
+
"upsertBrands",
|
|
176
|
+
];
|
|
143
177
|
for (const method of grpcMethods) {
|
|
144
178
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
145
179
|
GrpcMethod("BrandService", method)(constructor.prototype[method], method, descriptor);
|
package/gen/bundle.ts
CHANGED
|
@@ -255,10 +255,7 @@ export interface CloneBundleRequest {
|
|
|
255
255
|
|
|
256
256
|
export interface ExportBundlesRequest {
|
|
257
257
|
status?: BundleStatus | undefined;
|
|
258
|
-
bundleType?:
|
|
259
|
-
| BundleType
|
|
260
|
-
| undefined;
|
|
261
|
-
/** "json" | "csv" */
|
|
258
|
+
bundleType?: BundleType | undefined;
|
|
262
259
|
format: string;
|
|
263
260
|
}
|
|
264
261
|
|
|
@@ -287,7 +284,6 @@ export interface BundleListItemResponse {
|
|
|
287
284
|
originalPrice: number;
|
|
288
285
|
finalPrice: number;
|
|
289
286
|
inStock: boolean;
|
|
290
|
-
/** NEW */
|
|
291
287
|
bundleType: BundleType;
|
|
292
288
|
displayPlacements: DisplayPlacement[];
|
|
293
289
|
}
|
package/gen/cart.ts
CHANGED
|
@@ -74,10 +74,6 @@ export interface DeliveryDraft {
|
|
|
74
74
|
pickupPointId: string;
|
|
75
75
|
cost: number;
|
|
76
76
|
freeShipping: boolean;
|
|
77
|
-
/**
|
|
78
|
-
* Область з City.region — клієнт передає при виборі міста, щоб
|
|
79
|
-
* потім order-service зміг записати в snapshot замовлення.
|
|
80
|
-
*/
|
|
81
77
|
region: string;
|
|
82
78
|
}
|
|
83
79
|
|
|
@@ -213,22 +209,12 @@ export interface SetCommentRequest {
|
|
|
213
209
|
}
|
|
214
210
|
|
|
215
211
|
export interface SetCheckoutDraftRequest {
|
|
216
|
-
owner:
|
|
217
|
-
| CartOwner
|
|
218
|
-
| undefined;
|
|
219
|
-
/**
|
|
220
|
-
* Усі поля опціональні — оновлюються лише ті, що передані (proto3 default
|
|
221
|
-
* означає "не міняти"). Recalculate виконується одноразово в кінці.
|
|
222
|
-
*/
|
|
212
|
+
owner: CartOwner | undefined;
|
|
223
213
|
recipient: Recipient | undefined;
|
|
224
214
|
delivery: DeliveryDraft | undefined;
|
|
225
215
|
payment: PaymentDraft | undefined;
|
|
226
216
|
comment: string;
|
|
227
217
|
doNotCall: boolean;
|
|
228
|
-
/**
|
|
229
|
-
* Прапори "очистити поле" — щоб відрізнити default proto-значення
|
|
230
|
-
* від явного запиту прибрати, бо у proto3 порожній string === unset.
|
|
231
|
-
*/
|
|
232
218
|
hasRecipient: boolean;
|
|
233
219
|
hasDelivery: boolean;
|
|
234
220
|
hasPayment: boolean;
|
|
@@ -281,11 +267,6 @@ export interface CartServiceClient {
|
|
|
281
267
|
|
|
282
268
|
removePromo(request: RemovePromoRequest): Observable<CartResponse>;
|
|
283
269
|
|
|
284
|
-
/**
|
|
285
|
-
* ApplyCertificate — поки stub. Реальна перевірка номіналу/балансу
|
|
286
|
-
* потребує синхронізації з 1С (фаза інтеграцій).
|
|
287
|
-
*/
|
|
288
|
-
|
|
289
270
|
applyCertificate(request: ApplyCertificateRequest): Observable<CartResponse>;
|
|
290
271
|
|
|
291
272
|
removeCertificate(request: RemoveCertificateRequest): Observable<CartResponse>;
|
|
@@ -302,11 +283,6 @@ export interface CartServiceClient {
|
|
|
302
283
|
|
|
303
284
|
setComment(request: SetCommentRequest): Observable<CartResponse>;
|
|
304
285
|
|
|
305
|
-
/**
|
|
306
|
-
* Batch-set всіх checkout-полів одним викликом + ОДИН Recalculate.
|
|
307
|
-
* Фронт під час оформлення замовлення викликає це замість 4 окремих set-*.
|
|
308
|
-
*/
|
|
309
|
-
|
|
310
286
|
setCheckoutDraft(request: SetCheckoutDraftRequest): Observable<CartResponse>;
|
|
311
287
|
|
|
312
288
|
recalculate(request: RecalculateRequest): Observable<CartResponse>;
|
|
@@ -335,11 +311,6 @@ export interface CartServiceController {
|
|
|
335
311
|
|
|
336
312
|
removePromo(request: RemovePromoRequest): Promise<CartResponse> | Observable<CartResponse> | CartResponse;
|
|
337
313
|
|
|
338
|
-
/**
|
|
339
|
-
* ApplyCertificate — поки stub. Реальна перевірка номіналу/балансу
|
|
340
|
-
* потребує синхронізації з 1С (фаза інтеграцій).
|
|
341
|
-
*/
|
|
342
|
-
|
|
343
314
|
applyCertificate(request: ApplyCertificateRequest): Promise<CartResponse> | Observable<CartResponse> | CartResponse;
|
|
344
315
|
|
|
345
316
|
removeCertificate(request: RemoveCertificateRequest): Promise<CartResponse> | Observable<CartResponse> | CartResponse;
|
|
@@ -356,11 +327,6 @@ export interface CartServiceController {
|
|
|
356
327
|
|
|
357
328
|
setComment(request: SetCommentRequest): Promise<CartResponse> | Observable<CartResponse> | CartResponse;
|
|
358
329
|
|
|
359
|
-
/**
|
|
360
|
-
* Batch-set всіх checkout-полів одним викликом + ОДИН Recalculate.
|
|
361
|
-
* Фронт під час оформлення замовлення викликає це замість 4 окремих set-*.
|
|
362
|
-
*/
|
|
363
|
-
|
|
364
330
|
setCheckoutDraft(request: SetCheckoutDraftRequest): Promise<CartResponse> | Observable<CartResponse> | CartResponse;
|
|
365
331
|
|
|
366
332
|
recalculate(request: RecalculateRequest): Promise<CartResponse> | Observable<CartResponse> | CartResponse;
|
package/gen/category.ts
CHANGED
|
@@ -11,6 +11,33 @@ import { DeleteResponse, SuccessResponse } from "./common";
|
|
|
11
11
|
|
|
12
12
|
export const protobufPackage = "catalog.v1";
|
|
13
13
|
|
|
14
|
+
export interface CategorySyncItem {
|
|
15
|
+
categoryGuid: string;
|
|
16
|
+
parentGuid?: string | undefined;
|
|
17
|
+
name: { [key: string]: string };
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface CategorySyncItem_NameEntry {
|
|
21
|
+
key: string;
|
|
22
|
+
value: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface UpsertCategoriesRequest {
|
|
26
|
+
items: CategorySyncItem[];
|
|
27
|
+
syncId: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface CategoryUpsertResult {
|
|
31
|
+
guid: string;
|
|
32
|
+
status: string;
|
|
33
|
+
reason?: string | undefined;
|
|
34
|
+
id?: string | undefined;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface UpsertCategoriesResponse {
|
|
38
|
+
results: CategoryUpsertResult[];
|
|
39
|
+
}
|
|
40
|
+
|
|
14
41
|
export interface GetAllCategoriesRequest {
|
|
15
42
|
}
|
|
16
43
|
|
|
@@ -209,6 +236,8 @@ export interface CategoryAdminServiceClient {
|
|
|
209
236
|
updateCategoryOrder(request: UpdateCategoryOrderRequest): Observable<SuccessResponse>;
|
|
210
237
|
|
|
211
238
|
getAllCategories(request: GetAllCategoriesRequest): Observable<GetAllCategoriesResponse>;
|
|
239
|
+
|
|
240
|
+
upsertCategories(request: UpsertCategoriesRequest): Observable<UpsertCategoriesResponse>;
|
|
212
241
|
}
|
|
213
242
|
|
|
214
243
|
export interface CategoryAdminServiceController {
|
|
@@ -235,6 +264,10 @@ export interface CategoryAdminServiceController {
|
|
|
235
264
|
getAllCategories(
|
|
236
265
|
request: GetAllCategoriesRequest,
|
|
237
266
|
): Promise<GetAllCategoriesResponse> | Observable<GetAllCategoriesResponse> | GetAllCategoriesResponse;
|
|
267
|
+
|
|
268
|
+
upsertCategories(
|
|
269
|
+
request: UpsertCategoriesRequest,
|
|
270
|
+
): Promise<UpsertCategoriesResponse> | Observable<UpsertCategoriesResponse> | UpsertCategoriesResponse;
|
|
238
271
|
}
|
|
239
272
|
|
|
240
273
|
export function CategoryAdminServiceControllerMethods() {
|
|
@@ -247,6 +280,7 @@ export function CategoryAdminServiceControllerMethods() {
|
|
|
247
280
|
"deleteCategory",
|
|
248
281
|
"updateCategoryOrder",
|
|
249
282
|
"getAllCategories",
|
|
283
|
+
"upsertCategories",
|
|
250
284
|
];
|
|
251
285
|
for (const method of grpcMethods) {
|
|
252
286
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
package/gen/delivery.ts
CHANGED
package/gen/delivery_settings.ts
CHANGED
|
@@ -11,13 +11,9 @@ import { Observable } from "rxjs";
|
|
|
11
11
|
export const protobufPackage = "delivery.v1";
|
|
12
12
|
|
|
13
13
|
export interface DeliverySettingsResponse {
|
|
14
|
-
/** Дефолтна вага позиції у кг — fallback коли catalog не повертає weight. */
|
|
15
14
|
defaultItemWeightKg: number;
|
|
16
|
-
/** Поріг безкоштовної доставки в грн (0 = вимкнено). */
|
|
17
15
|
freeShippingThreshold: number;
|
|
18
|
-
/** Дефолтна оголошена вартість на одиницю товару у грн (для страхування НП). */
|
|
19
16
|
defaultDeclaredValue: number;
|
|
20
|
-
/** Reference відправника у НП (вибране warehouse адміністратором у settings). */
|
|
21
17
|
npSenderWarehouseRef?: string | undefined;
|
|
22
18
|
updatedAt: string;
|
|
23
19
|
}
|
package/gen/faq.ts
CHANGED
|
@@ -193,14 +193,10 @@ export interface BulkSetPopularFaqRequest {
|
|
|
193
193
|
export const CONTENT_V1_PACKAGE_NAME = "content.v1";
|
|
194
194
|
|
|
195
195
|
export interface FaqServiceClient {
|
|
196
|
-
/** Storefront */
|
|
197
|
-
|
|
198
196
|
getFaqStorefront(request: GetFaqStorefrontRequest): Observable<GetFaqStorefrontResponse>;
|
|
199
197
|
|
|
200
198
|
searchFaq(request: SearchFaqRequest): Observable<SearchFaqResponse>;
|
|
201
199
|
|
|
202
|
-
/** Admin — categories */
|
|
203
|
-
|
|
204
200
|
getFaqCategories(request: GetFaqCategoriesRequest): Observable<GetFaqCategoriesResponse>;
|
|
205
201
|
|
|
206
202
|
getFaqCategory(request: FaqCategoryIdRequest): Observable<FaqCategoryResponse>;
|
|
@@ -213,8 +209,6 @@ export interface FaqServiceClient {
|
|
|
213
209
|
|
|
214
210
|
reorderFaqCategories(request: ReorderFaqRequest): Observable<SuccessResponse>;
|
|
215
211
|
|
|
216
|
-
/** Admin — items */
|
|
217
|
-
|
|
218
212
|
getFaqItems(request: GetFaqItemsRequest): Observable<GetFaqItemsResponse>;
|
|
219
213
|
|
|
220
214
|
getFaqItem(request: FaqItemIdRequest): Observable<FaqItemResponse>;
|
|
@@ -231,16 +225,12 @@ export interface FaqServiceClient {
|
|
|
231
225
|
}
|
|
232
226
|
|
|
233
227
|
export interface FaqServiceController {
|
|
234
|
-
/** Storefront */
|
|
235
|
-
|
|
236
228
|
getFaqStorefront(
|
|
237
229
|
request: GetFaqStorefrontRequest,
|
|
238
230
|
): Promise<GetFaqStorefrontResponse> | Observable<GetFaqStorefrontResponse> | GetFaqStorefrontResponse;
|
|
239
231
|
|
|
240
232
|
searchFaq(request: SearchFaqRequest): Promise<SearchFaqResponse> | Observable<SearchFaqResponse> | SearchFaqResponse;
|
|
241
233
|
|
|
242
|
-
/** Admin — categories */
|
|
243
|
-
|
|
244
234
|
getFaqCategories(
|
|
245
235
|
request: GetFaqCategoriesRequest,
|
|
246
236
|
): Promise<GetFaqCategoriesResponse> | Observable<GetFaqCategoriesResponse> | GetFaqCategoriesResponse;
|
|
@@ -265,8 +255,6 @@ export interface FaqServiceController {
|
|
|
265
255
|
request: ReorderFaqRequest,
|
|
266
256
|
): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
|
|
267
257
|
|
|
268
|
-
/** Admin — items */
|
|
269
|
-
|
|
270
258
|
getFaqItems(
|
|
271
259
|
request: GetFaqItemsRequest,
|
|
272
260
|
): Promise<GetFaqItemsResponse> | Observable<GetFaqItemsResponse> | GetFaqItemsResponse;
|