@mamindom/contracts 1.0.192 → 1.0.200
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/events/auth/user-authenticated.interface.d.ts +2 -0
- package/dist/events/orders/index.d.ts +1 -0
- package/dist/events/orders/index.js +1 -0
- package/dist/events/orders/order-side-effects.interface.d.ts +67 -0
- package/dist/events/orders/order-side-effects.interface.js +2 -0
- package/dist/gen/banner.d.ts +18 -27
- package/dist/gen/calculation.d.ts +21 -10
- package/dist/gen/calculation.js +1 -1
- package/dist/gen/cart.d.ts +31 -0
- package/dist/gen/cart.js +1 -0
- package/dist/gen/coupon.d.ts +1 -0
- package/dist/gen/delivery_settings.d.ts +0 -3
- package/dist/gen/notification.d.ts +33 -2
- package/dist/gen/notification.js +18 -1
- package/dist/gen/order.d.ts +29 -1
- package/dist/gen/order.js +1 -0
- package/dist/gen/payment.d.ts +10 -4
- package/dist/gen/payment.js +1 -0
- package/dist/gen/pickup.d.ts +7 -0
- package/dist/gen/post.d.ts +3 -0
- package/dist/gen/post_comment.d.ts +1 -0
- package/dist/gen/product.d.ts +0 -13
- package/dist/gen/promotion.d.ts +2 -0
- package/dist/gen/shop_filters.d.ts +0 -1
- package/dist/gen/site_settings.d.ts +4 -0
- package/dist/proto/banner.proto +8 -29
- package/dist/proto/calculation.proto +39 -8
- package/dist/proto/cart.proto +47 -0
- package/dist/proto/coupon.proto +3 -0
- package/dist/proto/delivery_settings.proto +3 -3
- package/dist/proto/notification.proto +39 -2
- package/dist/proto/order.proto +43 -1
- package/dist/proto/payment.proto +17 -2
- package/dist/proto/pickup.proto +7 -0
- package/dist/proto/post.proto +5 -0
- package/dist/proto/post_comment.proto +5 -2
- package/dist/proto/product.proto +4 -11
- package/dist/proto/promotion.proto +4 -0
- package/dist/proto/shop_filters.proto +1 -1
- package/dist/proto/site_settings.proto +6 -0
- package/events/auth/otp-requested.interface.ts +3 -4
- package/events/auth/user-authenticated.interface.ts +3 -0
- package/events/orders/index.ts +1 -0
- package/events/orders/order-side-effects.interface.ts +82 -0
- package/gen/banner.ts +16 -29
- package/gen/calculation.ts +26 -14
- package/gen/cart.ts +38 -0
- package/gen/coupon.ts +1 -0
- package/gen/delivery_settings.ts +0 -3
- package/gen/notification.ts +63 -2
- package/gen/order.ts +38 -1
- package/gen/payment.ts +16 -4
- package/gen/pickup.ts +7 -0
- package/gen/post.ts +3 -0
- package/gen/post_comment.ts +1 -0
- package/gen/product.ts +1 -16
- package/gen/promotion.ts +2 -0
- package/gen/shop_filters.ts +1 -4
- package/gen/site_settings.ts +4 -0
- package/package.json +1 -1
- package/proto/banner.proto +8 -29
- package/proto/calculation.proto +39 -8
- package/proto/cart.proto +47 -0
- package/proto/coupon.proto +3 -0
- package/proto/delivery_settings.proto +3 -3
- package/proto/notification.proto +39 -2
- package/proto/order.proto +43 -1
- package/proto/payment.proto +17 -2
- package/proto/pickup.proto +7 -0
- package/proto/post.proto +5 -0
- package/proto/post_comment.proto +5 -2
- package/proto/product.proto +4 -11
- package/proto/promotion.proto +4 -0
- package/proto/shop_filters.proto +1 -1
- package/proto/site_settings.proto +6 -0
package/gen/post_comment.ts
CHANGED
package/gen/product.ts
CHANGED
|
@@ -125,7 +125,6 @@ export interface ProductListItemResponse {
|
|
|
125
125
|
activePromo?: ProductPromoInfo | undefined;
|
|
126
126
|
weightKg: number;
|
|
127
127
|
updatedAt: string;
|
|
128
|
-
/** Артикул із 1С. Неунікальний, на відміну від sku, тож зберігається окремо. */
|
|
129
128
|
article1c?: string | undefined;
|
|
130
129
|
}
|
|
131
130
|
|
|
@@ -463,19 +462,7 @@ export interface UpdateProductRequest {
|
|
|
463
462
|
colorHex?: string | undefined;
|
|
464
463
|
manualRating?: number | undefined;
|
|
465
464
|
weightKg?: number | undefined;
|
|
466
|
-
guid1c?:
|
|
467
|
-
| string
|
|
468
|
-
| undefined;
|
|
469
|
-
/**
|
|
470
|
-
* Явне очищення списків.
|
|
471
|
-
*
|
|
472
|
-
* У proto3 `repeated` не відрізняє «не передано» від «передано порожнім»,
|
|
473
|
-
* тож порожній масив сам по собі означає «не чіпати». Раніше цього
|
|
474
|
-
* розрізнення не було: клієнт, який не надіслав `images`, отримував від
|
|
475
|
-
* gateway [] — і всі фото товару видалялися разом із файлами в S3.
|
|
476
|
-
*
|
|
477
|
-
* Той самий підхід уже застосований в UpdateProductVariantRequest.
|
|
478
|
-
*/
|
|
465
|
+
guid1c?: string | undefined;
|
|
479
466
|
clearImages: boolean;
|
|
480
467
|
clearCategories: boolean;
|
|
481
468
|
clearStickers: boolean;
|
|
@@ -644,9 +631,7 @@ export interface ProductGroupMember {
|
|
|
644
631
|
colorHex: string;
|
|
645
632
|
price: number;
|
|
646
633
|
status: ProductStatus;
|
|
647
|
-
/** Потрібен вітрині: перемикач кольору веде на картку сусіда за ЧПУ. */
|
|
648
634
|
slug: string;
|
|
649
|
-
/** Чи є що купити — сусід без залишку показується неактивним, а не зникає. */
|
|
650
635
|
inStock: boolean;
|
|
651
636
|
}
|
|
652
637
|
|
package/gen/promotion.ts
CHANGED
|
@@ -287,6 +287,8 @@ export interface UpdatePromotionRequest {
|
|
|
287
287
|
cascadeSteps?: string | undefined;
|
|
288
288
|
bundlePrice?: number | undefined;
|
|
289
289
|
bundleSize?: number | undefined;
|
|
290
|
+
replaceConditions?: boolean | undefined;
|
|
291
|
+
replaceExclusions?: boolean | undefined;
|
|
290
292
|
}
|
|
291
293
|
|
|
292
294
|
export interface UpdatePromotionRequest_NameEntry {
|
package/gen/shop_filters.ts
CHANGED
|
@@ -47,10 +47,7 @@ export interface ShopFilterOption {
|
|
|
47
47
|
value: string;
|
|
48
48
|
label: string;
|
|
49
49
|
count: number;
|
|
50
|
-
slug?:
|
|
51
|
-
| string
|
|
52
|
-
| undefined;
|
|
53
|
-
/** Для розмірів: атрибут-джерело значення (вкладки у фільтрі «Розмір»). */
|
|
50
|
+
slug?: string | undefined;
|
|
54
51
|
groupSlug?: string | undefined;
|
|
55
52
|
groupLabel?: string | undefined;
|
|
56
53
|
}
|
package/gen/site_settings.ts
CHANGED
|
@@ -40,6 +40,8 @@ export interface SiteSettingsResponse {
|
|
|
40
40
|
facebookUrl?: string | undefined;
|
|
41
41
|
telegramUrl?: string | undefined;
|
|
42
42
|
updatedAt: string;
|
|
43
|
+
workingHours?: string | undefined;
|
|
44
|
+
workingHoursNote?: string | undefined;
|
|
43
45
|
}
|
|
44
46
|
|
|
45
47
|
export interface GetSiteSettingsRequest {
|
|
@@ -54,6 +56,8 @@ export interface UpdateSiteSettingsRequest {
|
|
|
54
56
|
clearInstagramUrl: boolean;
|
|
55
57
|
clearFacebookUrl: boolean;
|
|
56
58
|
clearTelegramUrl: boolean;
|
|
59
|
+
workingHours?: string | undefined;
|
|
60
|
+
workingHoursNote?: string | undefined;
|
|
57
61
|
}
|
|
58
62
|
|
|
59
63
|
export const CONTENT_V1_PACKAGE_NAME = "content.v1";
|
package/package.json
CHANGED
package/proto/banner.proto
CHANGED
|
@@ -182,6 +182,10 @@ message UpdateBannerSlideRequest {
|
|
|
182
182
|
|
|
183
183
|
optional string styling = 13;
|
|
184
184
|
optional int32 sort_order = 14;
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
bool clear_buttons = 15;
|
|
188
|
+
bool clear_links = 16;
|
|
185
189
|
}
|
|
186
190
|
|
|
187
191
|
message DeleteBannerSlideRequest {
|
|
@@ -201,7 +205,6 @@ message UpdateSlideOrderRequest {
|
|
|
201
205
|
message GetBannersByPlacementRequest {
|
|
202
206
|
BannerPlacement placement = 1;
|
|
203
207
|
optional string category_id = 2;
|
|
204
|
-
optional string lang = 3;
|
|
205
208
|
}
|
|
206
209
|
|
|
207
210
|
message PublicBannerResponse {
|
|
@@ -214,12 +217,12 @@ message PublicBannerResponse {
|
|
|
214
217
|
message PublicSlideResponse {
|
|
215
218
|
string image = 1;
|
|
216
219
|
optional string mobile_image = 2;
|
|
217
|
-
|
|
218
|
-
|
|
220
|
+
map<string, string> title = 3;
|
|
221
|
+
map<string, string> subtitle = 4;
|
|
219
222
|
|
|
220
|
-
repeated
|
|
223
|
+
repeated BannerSlideButton buttons = 5;
|
|
221
224
|
optional ElementPosition buttons_position = 6;
|
|
222
|
-
repeated
|
|
225
|
+
repeated BannerSlideLink links = 7;
|
|
223
226
|
optional ElementPosition links_position = 8;
|
|
224
227
|
optional string links_layout = 9;
|
|
225
228
|
|
|
@@ -259,27 +262,3 @@ message BannerSlideLink {
|
|
|
259
262
|
string href = 2;
|
|
260
263
|
optional string category_id = 3;
|
|
261
264
|
}
|
|
262
|
-
|
|
263
|
-
message PublicBannerSlideButton {
|
|
264
|
-
string text = 1;
|
|
265
|
-
string href = 2;
|
|
266
|
-
optional string variant = 3;
|
|
267
|
-
optional string background_color = 4;
|
|
268
|
-
optional string text_color = 5;
|
|
269
|
-
optional string border_color = 6;
|
|
270
|
-
optional string border_radius = 7;
|
|
271
|
-
optional string font_size = 8;
|
|
272
|
-
optional string padding_x = 9;
|
|
273
|
-
optional string padding_y = 10;
|
|
274
|
-
optional string font_size_mobile = 11;
|
|
275
|
-
optional string padding_x_mobile = 12;
|
|
276
|
-
optional string padding_y_mobile = 13;
|
|
277
|
-
optional string text_align = 14;
|
|
278
|
-
optional string text_align_mobile = 15;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
message PublicBannerSlideLink {
|
|
282
|
-
string text = 1;
|
|
283
|
-
string href = 2;
|
|
284
|
-
optional string category_id = 3;
|
|
285
|
-
}
|
package/proto/calculation.proto
CHANGED
|
@@ -7,15 +7,44 @@ import "common_promo.proto";
|
|
|
7
7
|
service PromoCalculationService {
|
|
8
8
|
rpc ValidateAndCalculate(ValidateAndCalculateRequest) returns (ValidateAndCalculateResponse);
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
|
|
11
|
+
rpc ValidateCoupon(ValidateCouponRequest) returns (ValidateCouponResponse);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
message ValidateCouponRequest {
|
|
15
|
+
string code = 1;
|
|
16
|
+
string user_id = 2;
|
|
17
|
+
|
|
18
|
+
repeated CartItem items = 3;
|
|
19
|
+
double order_total = 4;
|
|
20
|
+
bool is_first_order = 5;
|
|
21
|
+
int32 order_count = 6;
|
|
22
|
+
repeated string user_groups = 7;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
message ValidateCouponResponse {
|
|
26
|
+
bool usable = 1;
|
|
27
|
+
|
|
28
|
+
string reason = 2;
|
|
29
|
+
|
|
30
|
+
bool permanent = 3;
|
|
31
|
+
double discount_amount = 4;
|
|
32
|
+
|
|
33
|
+
double min_order_amount = 5;
|
|
11
34
|
}
|
|
12
35
|
|
|
13
36
|
message CartItem {
|
|
14
37
|
string product_id = 1;
|
|
38
|
+
|
|
39
|
+
|
|
15
40
|
string category_id = 2;
|
|
41
|
+
|
|
16
42
|
string brand_id = 3;
|
|
17
43
|
int32 quantity = 4;
|
|
18
44
|
double price = 5;
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
repeated string category_ids = 6;
|
|
19
48
|
}
|
|
20
49
|
|
|
21
50
|
message ValidateAndCalculateRequest {
|
|
@@ -35,13 +64,22 @@ message ValidateAndCalculateResponse {
|
|
|
35
64
|
double final_total = 3;
|
|
36
65
|
|
|
37
66
|
repeated AppliedPromotion applied_promotions = 4;
|
|
67
|
+
|
|
68
|
+
|
|
38
69
|
optional AppliedCoupon applied_coupon = 5;
|
|
39
70
|
|
|
40
71
|
optional string error_message = 6;
|
|
72
|
+
|
|
41
73
|
|
|
42
74
|
optional string coupon_error = 7;
|
|
43
75
|
|
|
76
|
+
|
|
77
|
+
optional string coupon_error_reason = 10;
|
|
78
|
+
|
|
44
79
|
repeated GiftSuggestion gift_suggestions = 8;
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
repeated AppliedCoupon applied_coupons = 9;
|
|
45
83
|
}
|
|
46
84
|
|
|
47
85
|
message GiftSuggestion {
|
|
@@ -65,10 +103,3 @@ message AppliedCoupon {
|
|
|
65
103
|
double discount_amount = 4;
|
|
66
104
|
}
|
|
67
105
|
|
|
68
|
-
message ApplyPromotionRequest {
|
|
69
|
-
string user_id = 1;
|
|
70
|
-
string order_id = 2;
|
|
71
|
-
double discount_amount = 3;
|
|
72
|
-
optional string coupon_code = 4;
|
|
73
|
-
repeated string promotion_ids = 5;
|
|
74
|
-
}
|
package/proto/cart.proto
CHANGED
|
@@ -8,6 +8,7 @@ service CartService {
|
|
|
8
8
|
rpc GetCart(GetCartRequest) returns (CartResponse);
|
|
9
9
|
|
|
10
10
|
rpc AddItem(AddItemRequest) returns (CartResponse);
|
|
11
|
+
rpc AddItems(AddItemsRequest) returns (AddItemsResponse);
|
|
11
12
|
rpc UpdateItemQty(UpdateItemQtyRequest) returns (CartResponse);
|
|
12
13
|
rpc RemoveItem(RemoveItemRequest) returns (CartResponse);
|
|
13
14
|
rpc ClearCart(ClearCartRequest) returns (SuccessResponse);
|
|
@@ -56,6 +57,11 @@ message CartItem {
|
|
|
56
57
|
double line_discount = 14;
|
|
57
58
|
double line_total = 15;
|
|
58
59
|
string size = 16;
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
bool unavailable = 17;
|
|
63
|
+
|
|
64
|
+
int32 available_stock = 18;
|
|
59
65
|
}
|
|
60
66
|
|
|
61
67
|
message AppliedPromotion {
|
|
@@ -80,9 +86,13 @@ message AppliedCertificate {
|
|
|
80
86
|
string error = 6;
|
|
81
87
|
}
|
|
82
88
|
|
|
89
|
+
|
|
83
90
|
message AppliedBonuses {
|
|
84
91
|
double available = 1;
|
|
92
|
+
|
|
85
93
|
double applied = 2;
|
|
94
|
+
|
|
95
|
+
double requested = 3;
|
|
86
96
|
}
|
|
87
97
|
|
|
88
98
|
message Recipient {
|
|
@@ -116,6 +126,7 @@ message CartTotals {
|
|
|
116
126
|
double promo_discount = 2;
|
|
117
127
|
double coupon_discount = 3;
|
|
118
128
|
double certificate_applied = 4;
|
|
129
|
+
|
|
119
130
|
double bonuses_applied = 5;
|
|
120
131
|
double shipping_cost = 6;
|
|
121
132
|
double grand_total = 7;
|
|
@@ -165,6 +176,10 @@ message WishlistItem {
|
|
|
165
176
|
|
|
166
177
|
message WishlistResponse {
|
|
167
178
|
repeated WishlistItem items = 1;
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
bool ok = 2;
|
|
182
|
+
string error_message = 3;
|
|
168
183
|
}
|
|
169
184
|
|
|
170
185
|
message CartOwner {
|
|
@@ -193,6 +208,34 @@ message AddItemRequest {
|
|
|
193
208
|
int32 quantity = 4;
|
|
194
209
|
}
|
|
195
210
|
|
|
211
|
+
message AddItemInput {
|
|
212
|
+
string product_id = 1;
|
|
213
|
+
string variant_id = 2;
|
|
214
|
+
int32 quantity = 3;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
message AddItemsRequest {
|
|
219
|
+
CartOwner owner = 1;
|
|
220
|
+
repeated AddItemInput items = 2;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
message AddItemResult {
|
|
224
|
+
string product_id = 1;
|
|
225
|
+
string variant_id = 2;
|
|
226
|
+
bool ok = 3;
|
|
227
|
+
|
|
228
|
+
string reason = 4;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
message AddItemsResponse {
|
|
232
|
+
bool ok = 1;
|
|
233
|
+
Cart cart = 2;
|
|
234
|
+
string error_message = 3;
|
|
235
|
+
repeated AddItemResult results = 4;
|
|
236
|
+
string error_code = 5;
|
|
237
|
+
}
|
|
238
|
+
|
|
196
239
|
message UpdateItemQtyRequest {
|
|
197
240
|
CartOwner owner = 1;
|
|
198
241
|
string variant_id = 2;
|
|
@@ -266,6 +309,8 @@ message SetCheckoutDraftRequest {
|
|
|
266
309
|
bool has_delivery = 8;
|
|
267
310
|
bool has_payment = 9;
|
|
268
311
|
bool has_comment = 10;
|
|
312
|
+
|
|
313
|
+
bool has_do_not_call = 11;
|
|
269
314
|
}
|
|
270
315
|
|
|
271
316
|
message RecalculateRequest {
|
|
@@ -291,6 +336,8 @@ message CartResponse {
|
|
|
291
336
|
bool ok = 1;
|
|
292
337
|
Cart cart = 2;
|
|
293
338
|
string error_message = 3;
|
|
339
|
+
|
|
340
|
+
string error_code = 4;
|
|
294
341
|
}
|
|
295
342
|
|
|
296
343
|
message SuccessResponse {
|
package/proto/coupon.proto
CHANGED
|
@@ -18,7 +18,8 @@ message DeliverySettingsResponse {
|
|
|
18
18
|
|
|
19
19
|
double default_declared_value = 3;
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
|
|
22
|
+
reserved 4;
|
|
22
23
|
|
|
23
24
|
string updated_at = 5;
|
|
24
25
|
}
|
|
@@ -29,8 +30,7 @@ message UpdateDeliverySettingsRequest {
|
|
|
29
30
|
optional double default_item_weight_kg = 1;
|
|
30
31
|
optional double free_shipping_threshold = 2;
|
|
31
32
|
optional double default_declared_value = 3;
|
|
32
|
-
|
|
33
|
-
bool clear_np_sender_warehouse_ref = 5;
|
|
33
|
+
reserved 4, 5;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
message ListCarriersRequest {}
|
package/proto/notification.proto
CHANGED
|
@@ -44,6 +44,35 @@ service NotificationLogsService {
|
|
|
44
44
|
rpc ListLogs(ListLogsRequest) returns (ListLogsResponse);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
|
|
48
|
+
service NotificationConsentService {
|
|
49
|
+
rpc VerifyUnsubscribeToken(VerifyUnsubscribeTokenRequest) returns (VerifyUnsubscribeTokenResponse);
|
|
50
|
+
rpc ApplyUnsubscribe(ApplyUnsubscribeRequest) returns (ApplyUnsubscribeResponse);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
message VerifyUnsubscribeTokenRequest {
|
|
54
|
+
string token = 1;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
message VerifyUnsubscribeTokenResponse {
|
|
58
|
+
bool ok = 1;
|
|
59
|
+
string error_message = 2;
|
|
60
|
+
optional string email = 3;
|
|
61
|
+
optional string user_id = 4;
|
|
62
|
+
repeated string unsubscribed_from = 5;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
message ApplyUnsubscribeRequest {
|
|
66
|
+
string token = 1;
|
|
67
|
+
repeated string categories = 2;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
message ApplyUnsubscribeResponse {
|
|
71
|
+
bool ok = 1;
|
|
72
|
+
string error_message = 2;
|
|
73
|
+
repeated string categories = 3;
|
|
74
|
+
}
|
|
75
|
+
|
|
47
76
|
service TelegramChatsService {
|
|
48
77
|
rpc ListChats(ListChatsRequest) returns (ListChatsResponse);
|
|
49
78
|
rpc UpsertChat(UpsertChatRequest) returns (TelegramChatResponse);
|
|
@@ -240,6 +269,9 @@ enum CampaignRecipientStatusEnum {
|
|
|
240
269
|
RECIPIENT_FAILED = 3;
|
|
241
270
|
RECIPIENT_SKIPPED_OPT_OUT = 4;
|
|
242
271
|
RECIPIENT_SKIPPED_NO_CONTACT = 5;
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
RECIPIENT_SENDING = 6;
|
|
243
275
|
}
|
|
244
276
|
|
|
245
277
|
service BrandingService {
|
|
@@ -373,6 +405,9 @@ message UpsertTemplateRequest {
|
|
|
373
405
|
string body_text = 9;
|
|
374
406
|
string variables_json = 10;
|
|
375
407
|
bool is_active = 11;
|
|
408
|
+
|
|
409
|
+
|
|
410
|
+
optional string actor_id = 12;
|
|
376
411
|
}
|
|
377
412
|
|
|
378
413
|
message UpdateTemplateRequest {
|
|
@@ -380,8 +415,10 @@ message UpdateTemplateRequest {
|
|
|
380
415
|
optional string title = 2;
|
|
381
416
|
optional string subject = 3;
|
|
382
417
|
optional string content_json = 4;
|
|
383
|
-
|
|
384
|
-
|
|
418
|
+
|
|
419
|
+
|
|
420
|
+
optional string body_html = 5;
|
|
421
|
+
optional string body_text = 6;
|
|
385
422
|
optional string variables_json = 7;
|
|
386
423
|
optional bool is_active = 8;
|
|
387
424
|
|
package/proto/order.proto
CHANGED
|
@@ -23,6 +23,7 @@ service OrderService {
|
|
|
23
23
|
rpc RemoveTag(RemoveTagRequest) returns (OrderResponse);
|
|
24
24
|
|
|
25
25
|
rpc EditItems(EditItemsRequest) returns (OrderResponse);
|
|
26
|
+
rpc PreviewRecalculation(PreviewRecalculationRequest) returns (PreviewRecalculationResponse);
|
|
26
27
|
rpc SetTrackingNumber(SetTrackingNumberRequest) returns (OrderResponse);
|
|
27
28
|
|
|
28
29
|
rpc ApplyRecalculation(ApplyRecalculationRequest) returns (OrderResponse);
|
|
@@ -248,7 +249,10 @@ message Order {
|
|
|
248
249
|
OrderPayment payment = 10;
|
|
249
250
|
OrderTotals totals = 11;
|
|
250
251
|
|
|
251
|
-
|
|
252
|
+
|
|
253
|
+
reserved 12;
|
|
254
|
+
repeated string promo_codes = 27;
|
|
255
|
+
|
|
252
256
|
string certificate_code = 13;
|
|
253
257
|
bool do_not_call = 14;
|
|
254
258
|
string comment = 15;
|
|
@@ -418,6 +422,33 @@ message EditItemsRequest {
|
|
|
418
422
|
string id = 1;
|
|
419
423
|
repeated OrderItemInput items = 2;
|
|
420
424
|
string actor_id = 3;
|
|
425
|
+
|
|
426
|
+
|
|
427
|
+
bool accept_discount_change = 4;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
message PreviewRecalculationRequest {
|
|
432
|
+
string id = 1;
|
|
433
|
+
repeated OrderItemInput items = 2;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
message DiscountChange {
|
|
437
|
+
|
|
438
|
+
string kind = 1;
|
|
439
|
+
string name = 2;
|
|
440
|
+
double before = 3;
|
|
441
|
+
double after = 4;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
message PreviewRecalculationResponse {
|
|
445
|
+
bool ok = 1;
|
|
446
|
+
string error_message = 2;
|
|
447
|
+
OrderTotals before = 3;
|
|
448
|
+
OrderTotals after = 4;
|
|
449
|
+
repeated DiscountChange discount_changes = 5;
|
|
450
|
+
|
|
451
|
+
bool discounts_decreased = 6;
|
|
421
452
|
}
|
|
422
453
|
|
|
423
454
|
message ApplyRecalculationRequest {
|
|
@@ -429,8 +460,11 @@ message ApplyRecalculationRequest {
|
|
|
429
460
|
double coupon_discount = 6;
|
|
430
461
|
double certificate_applied = 7;
|
|
431
462
|
double bonuses_used = 8;
|
|
463
|
+
|
|
432
464
|
double shipping_cost = 9;
|
|
433
465
|
double grand_total = 10;
|
|
466
|
+
|
|
467
|
+
string idempotency_key = 11;
|
|
434
468
|
}
|
|
435
469
|
|
|
436
470
|
message SetTrackingNumberRequest {
|
|
@@ -445,12 +479,20 @@ message ReorderOrderRequest {
|
|
|
445
479
|
string user_id = 2;
|
|
446
480
|
}
|
|
447
481
|
|
|
482
|
+
message ReorderSkippedItem {
|
|
483
|
+
string product_id = 1;
|
|
484
|
+
string variant_id = 2;
|
|
485
|
+
|
|
486
|
+
string reason = 3;
|
|
487
|
+
}
|
|
488
|
+
|
|
448
489
|
message ReorderResponse {
|
|
449
490
|
bool ok = 1;
|
|
450
491
|
string cart_id = 2;
|
|
451
492
|
int32 added = 3;
|
|
452
493
|
int32 skipped = 4;
|
|
453
494
|
string error = 5;
|
|
495
|
+
repeated ReorderSkippedItem skipped_items = 6;
|
|
454
496
|
}
|
|
455
497
|
|
|
456
498
|
message ListHistoryRequest {
|
package/proto/payment.proto
CHANGED
|
@@ -12,6 +12,9 @@ service PaymentService {
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
rpc Capture(CaptureRequest) returns (PaymentResponse);
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
rpc MarkPaidOffline(MarkPaidOfflineRequest) returns (PaymentResponse);
|
|
15
18
|
|
|
16
19
|
rpc Cancel(CancelRequest) returns (PaymentResponse);
|
|
17
20
|
|
|
@@ -52,6 +55,10 @@ message Payment {
|
|
|
52
55
|
int64 captured_at = 16;
|
|
53
56
|
int64 cancelled_at = 17;
|
|
54
57
|
int64 refunded_at = 18;
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
string capture_source = 19;
|
|
61
|
+
string capture_note = 20;
|
|
55
62
|
}
|
|
56
63
|
|
|
57
64
|
message PaymentProviderInfo {
|
|
@@ -62,8 +69,7 @@ message PaymentProviderInfo {
|
|
|
62
69
|
string description = 5;
|
|
63
70
|
|
|
64
71
|
bool configured = 6;
|
|
65
|
-
|
|
66
|
-
// 0 для звичайних провайдерів. Фронт показує «до N платежів» без env-синхронізації.
|
|
72
|
+
|
|
67
73
|
int32 installment_max_parts = 7;
|
|
68
74
|
}
|
|
69
75
|
|
|
@@ -119,6 +125,15 @@ message CaptureRequest {
|
|
|
119
125
|
string actor_id = 3;
|
|
120
126
|
}
|
|
121
127
|
|
|
128
|
+
message MarkPaidOfflineRequest {
|
|
129
|
+
string id = 1;
|
|
130
|
+
|
|
131
|
+
double amount = 2;
|
|
132
|
+
|
|
133
|
+
string note = 3;
|
|
134
|
+
string actor_id = 4;
|
|
135
|
+
}
|
|
136
|
+
|
|
122
137
|
message CancelRequest {
|
|
123
138
|
string id = 1;
|
|
124
139
|
string reason = 2;
|
package/proto/pickup.proto
CHANGED
|
@@ -33,12 +33,15 @@ message PickupPointResponse {
|
|
|
33
33
|
optional string code1c = 9;
|
|
34
34
|
optional string schedule = 10;
|
|
35
35
|
bool show_on_contacts = 11;
|
|
36
|
+
bool is_pickup = 12;
|
|
37
|
+
int32 sort_order = 13;
|
|
36
38
|
}
|
|
37
39
|
|
|
38
40
|
message GetPickupPointsRequest {
|
|
39
41
|
optional bool is_active = 1;
|
|
40
42
|
optional string city = 2;
|
|
41
43
|
optional bool show_on_contacts = 3;
|
|
44
|
+
optional bool is_pickup = 4;
|
|
42
45
|
}
|
|
43
46
|
|
|
44
47
|
message GetPickupPointsResponse {
|
|
@@ -60,6 +63,8 @@ message CreatePickupPointRequest {
|
|
|
60
63
|
optional string code1c = 8;
|
|
61
64
|
optional string schedule = 9;
|
|
62
65
|
optional bool show_on_contacts = 10;
|
|
66
|
+
optional bool is_pickup = 11;
|
|
67
|
+
optional int32 sort_order = 12;
|
|
63
68
|
}
|
|
64
69
|
|
|
65
70
|
message UpdatePickupPointRequest {
|
|
@@ -74,6 +79,8 @@ message UpdatePickupPointRequest {
|
|
|
74
79
|
optional string code1c = 9;
|
|
75
80
|
optional string schedule = 10;
|
|
76
81
|
optional bool show_on_contacts = 11;
|
|
82
|
+
optional bool is_pickup = 12;
|
|
83
|
+
optional int32 sort_order = 13;
|
|
77
84
|
}
|
|
78
85
|
|
|
79
86
|
message DeletePickupPointRequest {
|
package/proto/post.proto
CHANGED
package/proto/post_comment.proto
CHANGED
|
@@ -42,8 +42,11 @@ message CommentResponse {
|
|
|
42
42
|
message GetCommentsRequest {
|
|
43
43
|
PaginationRequest pagination = 1;
|
|
44
44
|
|
|
45
|
-
optional string post_id = 2;
|
|
46
|
-
optional CommentStatus status = 3;
|
|
45
|
+
optional string post_id = 2;
|
|
46
|
+
optional CommentStatus status = 3;
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
bool public_view = 4;
|
|
47
50
|
}
|
|
48
51
|
|
|
49
52
|
message GetCommentsResponse {
|
package/proto/product.proto
CHANGED
|
@@ -189,7 +189,7 @@ message ProductListItemResponse {
|
|
|
189
189
|
|
|
190
190
|
string updated_at = 25;
|
|
191
191
|
|
|
192
|
-
|
|
192
|
+
|
|
193
193
|
optional string article1c = 26;
|
|
194
194
|
}
|
|
195
195
|
|
|
@@ -451,14 +451,7 @@ message UpdateProductRequest {
|
|
|
451
451
|
optional double weight_kg = 26;
|
|
452
452
|
optional string guid1c = 27;
|
|
453
453
|
|
|
454
|
-
|
|
455
|
-
//
|
|
456
|
-
// У proto3 `repeated` не відрізняє «не передано» від «передано порожнім»,
|
|
457
|
-
// тож порожній масив сам по собі означає «не чіпати». Раніше цього
|
|
458
|
-
// розрізнення не було: клієнт, який не надіслав `images`, отримував від
|
|
459
|
-
// gateway [] — і всі фото товару видалялися разом із файлами в S3.
|
|
460
|
-
//
|
|
461
|
-
// Той самий підхід уже застосований в UpdateProductVariantRequest.
|
|
454
|
+
|
|
462
455
|
bool clear_images = 28;
|
|
463
456
|
bool clear_categories = 29;
|
|
464
457
|
bool clear_stickers = 30;
|
|
@@ -618,9 +611,9 @@ message ProductGroupMember {
|
|
|
618
611
|
double price = 7;
|
|
619
612
|
ProductStatus status = 8;
|
|
620
613
|
|
|
621
|
-
|
|
614
|
+
|
|
622
615
|
string slug = 9;
|
|
623
|
-
|
|
616
|
+
|
|
624
617
|
bool in_stock = 10;
|
|
625
618
|
}
|
|
626
619
|
|
package/proto/promotion.proto
CHANGED
|
@@ -302,6 +302,10 @@ message UpdatePromotionRequest {
|
|
|
302
302
|
optional string cascade_steps = 25;
|
|
303
303
|
optional double bundle_price = 26;
|
|
304
304
|
optional int32 bundle_size = 27;
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
optional bool replace_conditions = 28;
|
|
308
|
+
optional bool replace_exclusions = 29;
|
|
305
309
|
}
|
|
306
310
|
|
|
307
311
|
message DeletePromotionRequest {
|