@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
package/dist/proto/product.proto
CHANGED
|
@@ -15,6 +15,18 @@ service ProductService {
|
|
|
15
15
|
rpc DeleteProduct (DeleteProductRequest) returns (DeleteResponse);
|
|
16
16
|
rpc SetManualRating (SetManualRatingRequest) returns (SuccessResponse);
|
|
17
17
|
|
|
18
|
+
|
|
19
|
+
rpc UpsertProducts (UpsertProductsRequest) returns (UpsertProductsResponse);
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
rpc UpsertPrices (UpsertPricesRequest) returns (UpsertPricesResponse);
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
rpc UpsertCharacteristics (UpsertCharacteristicsRequest) returns (UpsertCharacteristicsResponse);
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
rpc UpsertStocks (UpsertStocksRequest) returns (UpsertStocksResponse);
|
|
29
|
+
|
|
18
30
|
|
|
19
31
|
rpc BulkUpdateStatus (BulkUpdateStatusRequest) returns (SuccessResponse);
|
|
20
32
|
rpc BulkUpdateCategory (BulkUpdateCategoryRequest) returns (SuccessResponse);
|
|
@@ -54,27 +66,25 @@ service ProductService {
|
|
|
54
66
|
rpc BulkLookupProducts (BulkLookupProductsRequest) returns (BulkLookupProductsResponse);
|
|
55
67
|
rpc BulkLookupVariants (BulkLookupVariantsRequest) returns (BulkLookupVariantsResponse);
|
|
56
68
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
rpc RemoveProductFromGroup (RemoveProductFromGroupRequest) returns (SuccessResponse);
|
|
69
|
+
rpc CreateProductGroup (CreateProductGroupRequest) returns (ProductGroupResponse);
|
|
70
|
+
rpc UpdateProductGroup (UpdateProductGroupRequest) returns (ProductGroupResponse);
|
|
71
|
+
rpc DeleteProductGroup (DeleteProductGroupRequest) returns (SuccessResponse);
|
|
72
|
+
rpc GetProductGroup (GetProductGroupRequest) returns (ProductGroupResponse);
|
|
73
|
+
rpc GetProductGroups (GetProductGroupsRequest) returns (GetProductGroupsResponse);
|
|
74
|
+
rpc AddProductToGroup (AddProductToGroupRequest) returns (SuccessResponse);
|
|
75
|
+
rpc RemoveProductFromGroup (RemoveProductFromGroupRequest) returns (SuccessResponse);
|
|
65
76
|
|
|
66
77
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
78
|
+
rpc CreateProductVariant (CreateProductVariantRequest) returns (ProductVariantDetailResponse);
|
|
79
|
+
rpc UpdateProductVariant (UpdateProductVariantRequest) returns (ProductVariantDetailResponse);
|
|
80
|
+
rpc GetProductVariant (GetProductVariantRequest) returns (ProductVariantDetailResponse);
|
|
70
81
|
|
|
71
82
|
|
|
72
83
|
|
|
73
|
-
rpc AssignVariantSizeCharts (AssignVariantSizeChartsRequest) returns (SuccessResponse);
|
|
74
|
-
rpc RemoveVariantSizeChart (RemoveVariantSizeChartRequest) returns (SuccessResponse);
|
|
75
|
-
rpc GetVariantSizeCharts (GetVariantSizeChartsRequest) returns (GetProductSizeChartsResponse);
|
|
84
|
+
rpc AssignVariantSizeCharts (AssignVariantSizeChartsRequest) returns (SuccessResponse);
|
|
85
|
+
rpc RemoveVariantSizeChart (RemoveVariantSizeChartRequest) returns (SuccessResponse);
|
|
86
|
+
rpc GetVariantSizeCharts (GetVariantSizeChartsRequest) returns (GetProductSizeChartsResponse);
|
|
76
87
|
|
|
77
|
-
// ─── Product colors (нова ієрархія: Product → Color → Variant) ──────────────
|
|
78
88
|
rpc CreateProductColor (CreateProductColorRequest) returns (ProductColorResponse);
|
|
79
89
|
rpc UpdateProductColor (UpdateProductColorRequest) returns (ProductColorResponse);
|
|
80
90
|
rpc DeleteProductColor (DeleteProductColorRequest) returns (DeleteResponse);
|
|
@@ -170,7 +180,7 @@ message ProductListItemResponse {
|
|
|
170
180
|
int32 review_count = 21;
|
|
171
181
|
repeated ProductStickerResponse stickers = 22;
|
|
172
182
|
optional ProductPromoInfo active_promo = 23;
|
|
173
|
-
|
|
183
|
+
|
|
174
184
|
double weight_kg = 24;
|
|
175
185
|
}
|
|
176
186
|
|
|
@@ -221,7 +231,7 @@ message ProductDetailResponse {
|
|
|
221
231
|
optional float manual_rating = 37;
|
|
222
232
|
optional ProductPromoInfo active_promo = 38;
|
|
223
233
|
repeated ProductColorResponse colors = 39;
|
|
224
|
-
|
|
234
|
+
|
|
225
235
|
double weight_kg = 40;
|
|
226
236
|
}
|
|
227
237
|
|
|
@@ -451,8 +461,9 @@ enum ProductStatus {
|
|
|
451
461
|
PRODUCT_STATUS_UNSPECIFIED = 0;
|
|
452
462
|
PRODUCT_STATUS_DRAFT = 1;
|
|
453
463
|
PRODUCT_STATUS_ACTIVE = 2;
|
|
454
|
-
PRODUCT_STATUS_INACTIVE = 3;
|
|
455
|
-
PRODUCT_STATUS_ARCHIVED = 4;
|
|
464
|
+
PRODUCT_STATUS_INACTIVE = 3;
|
|
465
|
+
PRODUCT_STATUS_ARCHIVED = 4;
|
|
466
|
+
PRODUCT_STATUS_MODERATION = 5;
|
|
456
467
|
}
|
|
457
468
|
|
|
458
469
|
enum RelatedProductType {
|
|
@@ -630,7 +641,7 @@ message ProductVariantDetailResponse {
|
|
|
630
641
|
|
|
631
642
|
optional string color_id = 21;
|
|
632
643
|
|
|
633
|
-
|
|
644
|
+
|
|
634
645
|
double weight_kg = 22;
|
|
635
646
|
}
|
|
636
647
|
|
|
@@ -673,7 +684,7 @@ message CreateProductVariantRequest {
|
|
|
673
684
|
repeated ProductImagePayload images = 17;
|
|
674
685
|
repeated string attribute_value_ids = 18;
|
|
675
686
|
optional string color_id = 19;
|
|
676
|
-
|
|
687
|
+
|
|
677
688
|
optional double weight_kg = 20;
|
|
678
689
|
}
|
|
679
690
|
|
|
@@ -702,7 +713,7 @@ message UpdateProductVariantRequest {
|
|
|
702
713
|
repeated ProductImagePayload images = 17;
|
|
703
714
|
repeated string attribute_value_ids = 18;
|
|
704
715
|
optional string color_id = 19;
|
|
705
|
-
|
|
716
|
+
|
|
706
717
|
optional double weight_kg = 20;
|
|
707
718
|
|
|
708
719
|
|
|
@@ -740,8 +751,6 @@ message GetVariantSizeChartsRequest {
|
|
|
740
751
|
}
|
|
741
752
|
|
|
742
753
|
|
|
743
|
-
// ─── Bulk lookup by SKU / barcode ─────────────────────────────────────────────
|
|
744
|
-
|
|
745
754
|
enum IdentifierType {
|
|
746
755
|
IDENTIFIER_TYPE_UNSPECIFIED = 0;
|
|
747
756
|
IDENTIFIER_TYPE_SKU = 1;
|
|
@@ -768,29 +777,24 @@ message BulkLookupProductsResponse {
|
|
|
768
777
|
repeated ProductLookupResult results = 1;
|
|
769
778
|
}
|
|
770
779
|
|
|
771
|
-
// ─── Bulk lookup variants by ID (for cart price snapshot) ────────────────────
|
|
772
|
-
//
|
|
773
|
-
// Використовується cart-service для отримання актуальної ціни саме за варіантом
|
|
774
|
-
// (variant.price якщо has_own_price, інакше product.price). Повертає достатньо
|
|
775
|
-
// для побудови line snapshot: ціна/стара ціна/назва/sku/stock/main_image.
|
|
776
780
|
|
|
777
781
|
message VariantLookupResult {
|
|
778
782
|
string variant_id = 1;
|
|
779
783
|
string product_id = 2;
|
|
780
784
|
string sku = 3;
|
|
781
785
|
bool found = 4;
|
|
782
|
-
|
|
786
|
+
|
|
783
787
|
double price = 5;
|
|
784
788
|
optional double old_price = 6;
|
|
785
789
|
int32 stock = 7;
|
|
786
790
|
bool has_own_price = 8;
|
|
787
|
-
|
|
791
|
+
|
|
788
792
|
string name_uk = 9;
|
|
789
793
|
string main_image = 10;
|
|
790
794
|
optional string color_id = 11;
|
|
791
|
-
|
|
795
|
+
|
|
792
796
|
double weight_kg = 12;
|
|
793
|
-
|
|
797
|
+
|
|
794
798
|
string size = 13;
|
|
795
799
|
}
|
|
796
800
|
|
|
@@ -803,7 +807,6 @@ message BulkLookupVariantsResponse {
|
|
|
803
807
|
}
|
|
804
808
|
|
|
805
809
|
|
|
806
|
-
// ─── Product colors ──────────────────────────────────────────────────────────
|
|
807
810
|
|
|
808
811
|
message ProductColorImagePayload {
|
|
809
812
|
string url = 1;
|
|
@@ -881,4 +884,111 @@ message ReorderProductColorsRequest {
|
|
|
881
884
|
message ColorSortOrderItem {
|
|
882
885
|
string color_id = 1;
|
|
883
886
|
int32 sort_order = 2;
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
|
|
890
|
+
message ProductSyncItem {
|
|
891
|
+
string product_guid = 1;
|
|
892
|
+
string sku = 2;
|
|
893
|
+
map<string, string> name = 3;
|
|
894
|
+
optional string brand_value_guid = 4;
|
|
895
|
+
repeated string attribute_value_guids = 5;
|
|
896
|
+
repeated string characteristic_guids = 6;
|
|
897
|
+
repeated string category_guids = 7;
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
message UpsertProductsRequest {
|
|
901
|
+
repeated ProductSyncItem items = 1;
|
|
902
|
+
string sync_id = 2;
|
|
903
|
+
string created_by = 3;
|
|
904
|
+
string color_property_guid = 4;
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
message ProductUpsertResult {
|
|
908
|
+
string guid = 1;
|
|
909
|
+
string status = 2;
|
|
910
|
+
optional string reason = 3;
|
|
911
|
+
optional string id = 4;
|
|
912
|
+
int32 attributes_linked = 5;
|
|
913
|
+
int32 attributes_skipped = 6;
|
|
914
|
+
int32 variants_created = 7;
|
|
915
|
+
int32 variants_updated = 8;
|
|
916
|
+
int32 variants_skipped = 9;
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
message UpsertProductsResponse {
|
|
920
|
+
repeated ProductUpsertResult results = 1;
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
message PriceSyncItem {
|
|
924
|
+
string product_guid = 1;
|
|
925
|
+
optional string characteristic_guid = 2;
|
|
926
|
+
double price = 3;
|
|
927
|
+
optional double old_price = 4;
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
message UpsertPricesRequest {
|
|
931
|
+
repeated PriceSyncItem items = 1;
|
|
932
|
+
string sync_id = 2;
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
message PriceUpsertResult {
|
|
936
|
+
string guid = 1;
|
|
937
|
+
string status = 2;
|
|
938
|
+
optional string reason = 3;
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
message UpsertPricesResponse {
|
|
942
|
+
repeated PriceUpsertResult results = 1;
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
|
|
946
|
+
message CharacteristicPropertyLink {
|
|
947
|
+
string property_guid = 1;
|
|
948
|
+
string value_guid = 2;
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
message CharacteristicSyncItem {
|
|
952
|
+
string characteristic_guid = 1;
|
|
953
|
+
map<string, string> name = 2;
|
|
954
|
+
repeated CharacteristicPropertyLink properties = 3;
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
message UpsertCharacteristicsRequest {
|
|
958
|
+
repeated CharacteristicSyncItem items = 1;
|
|
959
|
+
string sync_id = 2;
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
message CharacteristicUpsertResult {
|
|
963
|
+
string guid = 1;
|
|
964
|
+
string status = 2;
|
|
965
|
+
optional string reason = 3;
|
|
966
|
+
optional string id = 4;
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
message UpsertCharacteristicsResponse {
|
|
970
|
+
repeated CharacteristicUpsertResult results = 1;
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
|
|
974
|
+
message StockSyncItem {
|
|
975
|
+
string product_guid = 1;
|
|
976
|
+
optional string characteristic_guid = 2;
|
|
977
|
+
string warehouse_guid = 3;
|
|
978
|
+
int32 quantity = 4;
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
message UpsertStocksRequest {
|
|
982
|
+
repeated StockSyncItem items = 1;
|
|
983
|
+
string sync_id = 2;
|
|
984
|
+
}
|
|
985
|
+
|
|
986
|
+
message StockUpsertResult {
|
|
987
|
+
string guid = 1;
|
|
988
|
+
string status = 2;
|
|
989
|
+
optional string reason = 3;
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
message UpsertStocksResponse {
|
|
993
|
+
repeated StockUpsertResult results = 1;
|
|
884
994
|
}
|
|
@@ -19,28 +19,27 @@ service PromotionService {
|
|
|
19
19
|
rpc GetActivePromotions (GetActivePromotionsRequest) returns (GetActivePromotionsResponse);
|
|
20
20
|
rpc GetActivePromotionsSnapshot (GetActivePromotionsSnapshotRequest) returns (GetActivePromotionsSnapshotResponse);
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
|
|
23
23
|
rpc GetPromotionProducts (GetPromotionProductsRequest) returns (GetPromotionProductsResponse);
|
|
24
24
|
rpc GetPromotionEligibleProductIds (GetPromotionEligibleProductIdsRequest) returns (GetPromotionEligibleProductIdsResponse);
|
|
25
25
|
rpc AddPromotionProducts (AddPromotionProductsRequest) returns (SuccessResponse);
|
|
26
26
|
rpc RemovePromotionProducts (RemovePromotionProductsRequest) returns (SuccessResponse);
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
|
|
29
29
|
rpc GetPromotionCategories (GetPromotionCategoriesRequest) returns (GetPromotionCategoriesResponse);
|
|
30
30
|
rpc SetPromotionCategories (SetPromotionCategoriesRequest) returns (SuccessResponse);
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
|
|
33
33
|
rpc GetPromotionBrands (GetPromotionBrandsRequest) returns (GetPromotionBrandsResponse);
|
|
34
34
|
rpc SetPromotionBrands (SetPromotionBrandsRequest) returns (SuccessResponse);
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
|
|
37
37
|
rpc GetPromotionBundles (GetPromotionBundlesRequest) returns (GetPromotionBundlesResponse);
|
|
38
38
|
rpc AddPromotionBundles (AddPromotionBundlesRequest) returns (SuccessResponse);
|
|
39
39
|
rpc RemovePromotionBundles (RemovePromotionBundlesRequest) returns (SuccessResponse);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
// ─── Enums ────────────────────────────────────────────────────────────────────
|
|
44
43
|
|
|
45
44
|
enum PromotionType {
|
|
46
45
|
PROMOTION_TYPE_UNSPECIFIED = 0;
|
|
@@ -99,7 +98,6 @@ enum ExclusionEntityType {
|
|
|
99
98
|
}
|
|
100
99
|
|
|
101
100
|
|
|
102
|
-
// ─── Condition / Exclusion payloads ───────────────────────────────────────────
|
|
103
101
|
|
|
104
102
|
message PromotionConditionPayload {
|
|
105
103
|
ConditionLogic logic_type = 1;
|
|
@@ -126,7 +124,6 @@ message PromotionExclusionResponse {
|
|
|
126
124
|
}
|
|
127
125
|
|
|
128
126
|
|
|
129
|
-
// ─── Main response ────────────────────────────────────────────────────────────
|
|
130
127
|
|
|
131
128
|
message PromotionResponse {
|
|
132
129
|
string id = 1;
|
|
@@ -178,7 +175,6 @@ message PromotionResponse {
|
|
|
178
175
|
}
|
|
179
176
|
|
|
180
177
|
|
|
181
|
-
// ─── List ─────────────────────────────────────────────────────────────────────
|
|
182
178
|
|
|
183
179
|
message GetPromotionsRequest {
|
|
184
180
|
PaginationRequest pagination = 1;
|
|
@@ -188,8 +184,8 @@ message GetPromotionsRequest {
|
|
|
188
184
|
optional string category_id = 5;
|
|
189
185
|
optional string date_from = 6;
|
|
190
186
|
optional string date_to = 7;
|
|
191
|
-
optional string sort_by = 8;
|
|
192
|
-
optional string sort_dir = 9;
|
|
187
|
+
optional string sort_by = 8;
|
|
188
|
+
optional string sort_dir = 9;
|
|
193
189
|
}
|
|
194
190
|
|
|
195
191
|
message GetPromotionsResponse {
|
|
@@ -216,7 +212,6 @@ message PromotionListItem {
|
|
|
216
212
|
}
|
|
217
213
|
|
|
218
214
|
|
|
219
|
-
// ─── CRUD requests ───────────────────────────────────────────────────────────
|
|
220
215
|
|
|
221
216
|
message GetPromotionRequest {
|
|
222
217
|
string id = 1;
|
|
@@ -314,7 +309,6 @@ message UpdatePromotionStatusRequest {
|
|
|
314
309
|
}
|
|
315
310
|
|
|
316
311
|
|
|
317
|
-
// ─── Bulk apply ───────────────────────────────────────────────────────────────
|
|
318
312
|
|
|
319
313
|
message BulkApplyToCategoriesRequest {
|
|
320
314
|
string promotion_id = 1;
|
|
@@ -322,7 +316,6 @@ message BulkApplyToCategoriesRequest {
|
|
|
322
316
|
}
|
|
323
317
|
|
|
324
318
|
|
|
325
|
-
// ─── Active promotions ────────────────────────────────────────────────────────
|
|
326
319
|
|
|
327
320
|
message GetActivePromotionsRequest {
|
|
328
321
|
PaginationRequest pagination = 1;
|
|
@@ -335,7 +328,6 @@ message GetActivePromotionsResponse {
|
|
|
335
328
|
}
|
|
336
329
|
|
|
337
330
|
|
|
338
|
-
// ─── Products ─────────────────────────────────────────────────────────────────
|
|
339
331
|
|
|
340
332
|
message PromotionProductItem {
|
|
341
333
|
string id = 1;
|
|
@@ -376,8 +368,7 @@ message GetPromotionEligibleProductIdsRequest {
|
|
|
376
368
|
string promotion_id = 1;
|
|
377
369
|
}
|
|
378
370
|
|
|
379
|
-
|
|
380
|
-
// Catalog-service joins these (UNION include − exclude) using its own data.
|
|
371
|
+
|
|
381
372
|
message GetPromotionEligibleProductIdsResponse {
|
|
382
373
|
repeated string include_product_ids = 1;
|
|
383
374
|
repeated string include_category_ids = 2;
|
|
@@ -388,7 +379,6 @@ message GetPromotionEligibleProductIdsResponse {
|
|
|
388
379
|
optional bool exists = 7;
|
|
389
380
|
}
|
|
390
381
|
|
|
391
|
-
// ─── Active promotions snapshot (for cross-service enrichment) ───────────────
|
|
392
382
|
|
|
393
383
|
message GetActivePromotionsSnapshotRequest {}
|
|
394
384
|
|
|
@@ -402,14 +392,14 @@ message ActivePromotionSnapshotItem {
|
|
|
402
392
|
optional string seo_slug = 7;
|
|
403
393
|
optional string starts_at = 8;
|
|
404
394
|
optional string ends_at = 9;
|
|
405
|
-
|
|
395
|
+
|
|
406
396
|
repeated string product_ids = 10;
|
|
407
397
|
repeated string category_ids = 11;
|
|
408
398
|
repeated string brand_ids = 12;
|
|
409
399
|
repeated string excluded_product_ids = 13;
|
|
410
400
|
repeated string excluded_category_ids = 14;
|
|
411
401
|
repeated string excluded_brand_ids = 15;
|
|
412
|
-
|
|
402
|
+
|
|
413
403
|
map<string, string> product_labels = 16;
|
|
414
404
|
map<string, string> product_label_colors = 17;
|
|
415
405
|
}
|
|
@@ -420,7 +410,6 @@ message GetActivePromotionsSnapshotResponse {
|
|
|
420
410
|
}
|
|
421
411
|
|
|
422
412
|
|
|
423
|
-
// ─── Categories ───────────────────────────────────────────────────────────────
|
|
424
413
|
|
|
425
414
|
message GetPromotionCategoriesRequest {
|
|
426
415
|
string promotion_id = 1;
|
|
@@ -436,7 +425,6 @@ message SetPromotionCategoriesRequest {
|
|
|
436
425
|
}
|
|
437
426
|
|
|
438
427
|
|
|
439
|
-
// ─── Brands ───────────────────────────────────────────────────────────────────
|
|
440
428
|
|
|
441
429
|
message GetPromotionBrandsRequest {
|
|
442
430
|
string promotion_id = 1;
|
|
@@ -452,7 +440,6 @@ message SetPromotionBrandsRequest {
|
|
|
452
440
|
}
|
|
453
441
|
|
|
454
442
|
|
|
455
|
-
// ─── Bundles ──────────────────────────────────────────────────────────────────
|
|
456
443
|
|
|
457
444
|
message GetPromotionBundlesRequest {
|
|
458
445
|
string promotion_id = 1;
|
package/dist/proto/rbac.proto
CHANGED
|
@@ -3,17 +3,17 @@ syntax = "proto3";
|
|
|
3
3
|
package rbac.v1;
|
|
4
4
|
|
|
5
5
|
service RbacService {
|
|
6
|
-
|
|
6
|
+
|
|
7
7
|
rpc ListPermissions(ListPermissionsRequest) returns (ListPermissionsResponse);
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
|
|
10
10
|
rpc ListRoles(ListRolesRequest) returns (ListRolesResponse);
|
|
11
11
|
rpc GetRole(GetRoleRequest) returns (RbacRole);
|
|
12
12
|
rpc CreateRole(CreateRoleRequest) returns (RbacRole);
|
|
13
13
|
rpc UpdateRole(UpdateRoleRequest) returns (RbacRole);
|
|
14
14
|
rpc DeleteRole(DeleteRoleRequest) returns (DeleteRoleResponse);
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
|
|
17
17
|
rpc AssignAccountRole(AssignAccountRoleRequest) returns (AssignAccountRoleResponse);
|
|
18
18
|
rpc GetAccountPermissions(GetAccountPermissionsRequest) returns (GetAccountPermissionsResponse);
|
|
19
19
|
}
|
|
@@ -71,7 +71,7 @@ message UpdateRoleRequest {
|
|
|
71
71
|
optional string name = 2;
|
|
72
72
|
optional string description = 3;
|
|
73
73
|
optional string color = 4;
|
|
74
|
-
|
|
74
|
+
|
|
75
75
|
repeated string permission_keys = 5;
|
|
76
76
|
bool replace_permissions = 6;
|
|
77
77
|
}
|
|
@@ -86,8 +86,7 @@ message DeleteRoleResponse {
|
|
|
86
86
|
|
|
87
87
|
message AssignAccountRoleRequest {
|
|
88
88
|
string account_id = 1;
|
|
89
|
-
|
|
90
|
-
// і дозволи беруться з системної.
|
|
89
|
+
|
|
91
90
|
optional string custom_role_id = 2;
|
|
92
91
|
}
|
|
93
92
|
|
|
@@ -100,10 +99,9 @@ message GetAccountPermissionsRequest {
|
|
|
100
99
|
}
|
|
101
100
|
|
|
102
101
|
message GetAccountPermissionsResponse {
|
|
103
|
-
|
|
104
|
-
// Може містити "*" — повний доступ (ADMIN).
|
|
102
|
+
|
|
105
103
|
repeated string permission_keys = 1;
|
|
106
|
-
|
|
104
|
+
|
|
107
105
|
string role_slug = 2;
|
|
108
106
|
string role_name = 3;
|
|
109
107
|
}
|
package/dist/proto/search.proto
CHANGED
|
@@ -6,42 +6,41 @@ import "common.proto";
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
service SearchService {
|
|
9
|
-
|
|
9
|
+
|
|
10
10
|
rpc Suggest (SuggestRequest) returns (SuggestResponse);
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
|
|
13
13
|
rpc ListSynonyms (ListSynonymsRequest) returns (ListSynonymsResponse);
|
|
14
14
|
rpc CreateSynonym (CreateSynonymRequest) returns (SynonymResponse);
|
|
15
15
|
rpc UpdateSynonym (UpdateSynonymRequest) returns (SynonymResponse);
|
|
16
16
|
rpc DeleteSynonym (DeleteSynonymRequest) returns (DeleteResponse);
|
|
17
17
|
rpc SyncSynonymsToTypesense (SyncSynonymsRequest) returns (SuccessResponse);
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
|
|
20
20
|
rpc ListPopularQueries (ListPopularQueriesRequest) returns (ListPopularQueriesResponse);
|
|
21
21
|
rpc CreatePopularQuery (CreatePopularQueryRequest) returns (PopularQueryResponse);
|
|
22
22
|
rpc UpdatePopularQuery (UpdatePopularQueryRequest) returns (PopularQueryResponse);
|
|
23
23
|
rpc DeletePopularQuery (DeletePopularQueryRequest) returns (DeleteResponse);
|
|
24
24
|
rpc ReorderPopularQueries (ReorderPopularQueriesRequest) returns (SuccessResponse);
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
|
|
27
27
|
rpc ListZeroResults (ListZeroResultsRequest) returns (ListZeroResultsResponse);
|
|
28
28
|
rpc ClearZeroResults (ClearZeroResultsRequest) returns (SuccessResponse);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
// ─────────────────────────── Suggest (public) ─────────────────────────────
|
|
32
31
|
|
|
33
32
|
message SuggestRequest {
|
|
34
33
|
string q = 1;
|
|
35
|
-
int32 limit = 2;
|
|
36
|
-
bool only_in_stock = 3;
|
|
37
|
-
string locale = 4;
|
|
34
|
+
int32 limit = 2;
|
|
35
|
+
bool only_in_stock = 3;
|
|
36
|
+
string locale = 4;
|
|
38
37
|
}
|
|
39
38
|
|
|
40
39
|
message SuggestProduct {
|
|
41
40
|
string id = 1;
|
|
42
41
|
string sku = 2;
|
|
43
42
|
string slug = 3;
|
|
44
|
-
string name = 4;
|
|
43
|
+
string name = 4;
|
|
45
44
|
string main_image = 5;
|
|
46
45
|
double price = 6;
|
|
47
46
|
optional double old_price = 7;
|
|
@@ -62,10 +61,9 @@ message SuggestResponse {
|
|
|
62
61
|
repeated SuggestProduct products = 2;
|
|
63
62
|
repeated SuggestCategory categories = 3;
|
|
64
63
|
repeated string popular_queries = 4;
|
|
65
|
-
int32 total = 5;
|
|
64
|
+
int32 total = 5;
|
|
66
65
|
}
|
|
67
66
|
|
|
68
|
-
// ─────────────────────────── Synonyms (admin) ─────────────────────────────
|
|
69
67
|
|
|
70
68
|
enum SynonymType {
|
|
71
69
|
SYNONYM_MULTI_WAY = 0;
|
|
@@ -118,7 +116,6 @@ message DeleteSynonymRequest {
|
|
|
118
116
|
message SyncSynonymsRequest {
|
|
119
117
|
}
|
|
120
118
|
|
|
121
|
-
// ───────────────────────── Popular queries (admin) ────────────────────────
|
|
122
119
|
|
|
123
120
|
message PopularQueryResponse {
|
|
124
121
|
string id = 1;
|
|
@@ -163,10 +160,9 @@ message ReorderPopularQueryItem {
|
|
|
163
160
|
int32 sort_order = 2;
|
|
164
161
|
}
|
|
165
162
|
|
|
166
|
-
// ─────────────────────── Zero-result analytics (admin) ─────────────────────
|
|
167
163
|
|
|
168
164
|
message ListZeroResultsRequest {
|
|
169
|
-
optional int32 limit = 1;
|
|
165
|
+
optional int32 limit = 1;
|
|
170
166
|
}
|
|
171
167
|
|
|
172
168
|
message ZeroResultItem {
|