@mamindom/contracts 1.0.193 → 1.0.201
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/category.d.ts +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 +75 -2
- package/dist/gen/notification.js +34 -1
- package/dist/gen/order.d.ts +29 -1
- package/dist/gen/order.js +1 -0
- package/dist/gen/payment.d.ts +30 -4
- package/dist/gen/payment.js +3 -0
- package/dist/gen/post.d.ts +3 -0
- package/dist/gen/post_comment.d.ts +1 -0
- package/dist/gen/product.d.ts +21 -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 +2 -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/category.proto +1 -0
- package/dist/proto/coupon.proto +3 -0
- package/dist/proto/delivery_settings.proto +3 -3
- package/dist/proto/notification.proto +84 -2
- package/dist/proto/order.proto +43 -1
- package/dist/proto/payment.proto +49 -2
- package/dist/proto/post.proto +5 -0
- package/dist/proto/post_comment.proto +5 -2
- package/dist/proto/product.proto +12 -11
- package/dist/proto/promotion.proto +4 -0
- package/dist/proto/shop_filters.proto +1 -1
- package/dist/proto/site_settings.proto +4 -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/category.ts +1 -0
- package/gen/coupon.ts +1 -0
- package/gen/delivery_settings.ts +0 -3
- package/gen/notification.ts +136 -2
- package/gen/order.ts +38 -1
- package/gen/payment.ts +49 -4
- package/gen/post.ts +3 -0
- package/gen/post_comment.ts +1 -0
- package/gen/product.ts +19 -16
- package/gen/promotion.ts +2 -0
- package/gen/shop_filters.ts +1 -4
- package/gen/site_settings.ts +2 -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/category.proto +1 -0
- package/proto/coupon.proto +3 -0
- package/proto/delivery_settings.proto +3 -3
- package/proto/notification.proto +84 -2
- package/proto/order.proto +43 -1
- package/proto/payment.proto +49 -2
- package/proto/post.proto +5 -0
- package/proto/post_comment.proto +5 -2
- package/proto/product.proto +12 -11
- package/proto/promotion.proto +4 -0
- package/proto/shop_filters.proto +1 -1
- package/proto/site_settings.proto +4 -0
package/dist/gen/payment.d.ts
CHANGED
|
@@ -19,6 +19,8 @@ export interface Payment {
|
|
|
19
19
|
capturedAt: number;
|
|
20
20
|
cancelledAt: number;
|
|
21
21
|
refundedAt: number;
|
|
22
|
+
captureSource: string;
|
|
23
|
+
captureNote: string;
|
|
22
24
|
}
|
|
23
25
|
export interface PaymentProviderInfo {
|
|
24
26
|
key: string;
|
|
@@ -27,11 +29,9 @@ export interface PaymentProviderInfo {
|
|
|
27
29
|
supportsInstallment: boolean;
|
|
28
30
|
description: string;
|
|
29
31
|
configured: boolean;
|
|
30
|
-
/**
|
|
31
|
-
* Для installment-провайдерів — максимум частин оплати (з конфігу `parts`).
|
|
32
|
-
* 0 для звичайних провайдерів. Фронт показує «до N платежів» без env-синхронізації.
|
|
33
|
-
*/
|
|
34
32
|
installmentMaxParts: number;
|
|
33
|
+
environment: string;
|
|
34
|
+
blockedByMode: boolean;
|
|
35
35
|
}
|
|
36
36
|
export interface CreateInvoiceRequest {
|
|
37
37
|
orderId: string;
|
|
@@ -77,6 +77,12 @@ export interface CaptureRequest {
|
|
|
77
77
|
amount: number;
|
|
78
78
|
actorId: string;
|
|
79
79
|
}
|
|
80
|
+
export interface MarkPaidOfflineRequest {
|
|
81
|
+
id: string;
|
|
82
|
+
amount: number;
|
|
83
|
+
note: string;
|
|
84
|
+
actorId: string;
|
|
85
|
+
}
|
|
80
86
|
export interface CancelRequest {
|
|
81
87
|
id: string;
|
|
82
88
|
reason: string;
|
|
@@ -142,6 +148,20 @@ export interface UpdateProviderConfigRequest {
|
|
|
142
148
|
fields: ProviderConfigPatch[];
|
|
143
149
|
actorId: string;
|
|
144
150
|
}
|
|
151
|
+
export interface GetPaymentsModeRequest {
|
|
152
|
+
}
|
|
153
|
+
export interface SetPaymentsModeRequest {
|
|
154
|
+
mode: string;
|
|
155
|
+
actorId: string;
|
|
156
|
+
confirmation: string;
|
|
157
|
+
}
|
|
158
|
+
export interface PaymentsModeResponse {
|
|
159
|
+
ok: boolean;
|
|
160
|
+
mode: string;
|
|
161
|
+
updatedAt: number;
|
|
162
|
+
updatedBy: string;
|
|
163
|
+
blockedProviders: string[];
|
|
164
|
+
}
|
|
145
165
|
export declare const PAYMENT_V1_PACKAGE_NAME = "payment.v1";
|
|
146
166
|
export interface PaymentServiceClient {
|
|
147
167
|
createInvoice(request: CreateInvoiceRequest): Observable<PaymentResponse>;
|
|
@@ -149,6 +169,7 @@ export interface PaymentServiceClient {
|
|
|
149
169
|
getPaymentByOrder(request: GetPaymentByOrderRequest): Observable<PaymentResponse>;
|
|
150
170
|
listPayments(request: ListPaymentsRequest): Observable<ListPaymentsResponse>;
|
|
151
171
|
capture(request: CaptureRequest): Observable<PaymentResponse>;
|
|
172
|
+
markPaidOffline(request: MarkPaidOfflineRequest): Observable<PaymentResponse>;
|
|
152
173
|
cancel(request: CancelRequest): Observable<PaymentResponse>;
|
|
153
174
|
refund(request: RefundRequest): Observable<PaymentResponse>;
|
|
154
175
|
syncStatus(request: SyncStatusRequest): Observable<PaymentResponse>;
|
|
@@ -157,6 +178,8 @@ export interface PaymentServiceClient {
|
|
|
157
178
|
toggleProvider(request: ToggleProviderRequest): Observable<ToggleProviderResponse>;
|
|
158
179
|
getProviderConfig(request: GetProviderConfigRequest): Observable<ProviderConfigResponse>;
|
|
159
180
|
updateProviderConfig(request: UpdateProviderConfigRequest): Observable<ProviderConfigResponse>;
|
|
181
|
+
getPaymentsMode(request: GetPaymentsModeRequest): Observable<PaymentsModeResponse>;
|
|
182
|
+
setPaymentsMode(request: SetPaymentsModeRequest): Observable<PaymentsModeResponse>;
|
|
160
183
|
}
|
|
161
184
|
export interface PaymentServiceController {
|
|
162
185
|
createInvoice(request: CreateInvoiceRequest): Promise<PaymentResponse> | Observable<PaymentResponse> | PaymentResponse;
|
|
@@ -164,6 +187,7 @@ export interface PaymentServiceController {
|
|
|
164
187
|
getPaymentByOrder(request: GetPaymentByOrderRequest): Promise<PaymentResponse> | Observable<PaymentResponse> | PaymentResponse;
|
|
165
188
|
listPayments(request: ListPaymentsRequest): Promise<ListPaymentsResponse> | Observable<ListPaymentsResponse> | ListPaymentsResponse;
|
|
166
189
|
capture(request: CaptureRequest): Promise<PaymentResponse> | Observable<PaymentResponse> | PaymentResponse;
|
|
190
|
+
markPaidOffline(request: MarkPaidOfflineRequest): Promise<PaymentResponse> | Observable<PaymentResponse> | PaymentResponse;
|
|
167
191
|
cancel(request: CancelRequest): Promise<PaymentResponse> | Observable<PaymentResponse> | PaymentResponse;
|
|
168
192
|
refund(request: RefundRequest): Promise<PaymentResponse> | Observable<PaymentResponse> | PaymentResponse;
|
|
169
193
|
syncStatus(request: SyncStatusRequest): Promise<PaymentResponse> | Observable<PaymentResponse> | PaymentResponse;
|
|
@@ -172,6 +196,8 @@ export interface PaymentServiceController {
|
|
|
172
196
|
toggleProvider(request: ToggleProviderRequest): Promise<ToggleProviderResponse> | Observable<ToggleProviderResponse> | ToggleProviderResponse;
|
|
173
197
|
getProviderConfig(request: GetProviderConfigRequest): Promise<ProviderConfigResponse> | Observable<ProviderConfigResponse> | ProviderConfigResponse;
|
|
174
198
|
updateProviderConfig(request: UpdateProviderConfigRequest): Promise<ProviderConfigResponse> | Observable<ProviderConfigResponse> | ProviderConfigResponse;
|
|
199
|
+
getPaymentsMode(request: GetPaymentsModeRequest): Promise<PaymentsModeResponse> | Observable<PaymentsModeResponse> | PaymentsModeResponse;
|
|
200
|
+
setPaymentsMode(request: SetPaymentsModeRequest): Promise<PaymentsModeResponse> | Observable<PaymentsModeResponse> | PaymentsModeResponse;
|
|
175
201
|
}
|
|
176
202
|
export declare function PaymentServiceControllerMethods(): (constructor: Function) => void;
|
|
177
203
|
export declare const PAYMENT_SERVICE_NAME = "PaymentService";
|
package/dist/gen/payment.js
CHANGED
|
@@ -19,6 +19,7 @@ function PaymentServiceControllerMethods() {
|
|
|
19
19
|
"getPaymentByOrder",
|
|
20
20
|
"listPayments",
|
|
21
21
|
"capture",
|
|
22
|
+
"markPaidOffline",
|
|
22
23
|
"cancel",
|
|
23
24
|
"refund",
|
|
24
25
|
"syncStatus",
|
|
@@ -27,6 +28,8 @@ function PaymentServiceControllerMethods() {
|
|
|
27
28
|
"toggleProvider",
|
|
28
29
|
"getProviderConfig",
|
|
29
30
|
"updateProviderConfig",
|
|
31
|
+
"getPaymentsMode",
|
|
32
|
+
"setPaymentsMode",
|
|
30
33
|
];
|
|
31
34
|
for (const method of grpcMethods) {
|
|
32
35
|
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
package/dist/gen/post.d.ts
CHANGED
|
@@ -252,6 +252,9 @@ export interface UpdatePostRequest {
|
|
|
252
252
|
tagIds: string[];
|
|
253
253
|
images: PostImagePayload[];
|
|
254
254
|
updatedById: string;
|
|
255
|
+
clearCategories: boolean;
|
|
256
|
+
clearTags: boolean;
|
|
257
|
+
clearImages: boolean;
|
|
255
258
|
}
|
|
256
259
|
export interface UpdatePostRequest_TitleEntry {
|
|
257
260
|
key: string;
|
package/dist/gen/product.d.ts
CHANGED
|
@@ -104,7 +104,6 @@ export interface ProductListItemResponse {
|
|
|
104
104
|
activePromo?: ProductPromoInfo | undefined;
|
|
105
105
|
weightKg: number;
|
|
106
106
|
updatedAt: string;
|
|
107
|
-
/** Артикул із 1С. Неунікальний, на відміну від sku, тож зберігається окремо. */
|
|
108
107
|
article1c?: string | undefined;
|
|
109
108
|
}
|
|
110
109
|
export interface ProductListItemResponse_NameEntry {
|
|
@@ -172,6 +171,9 @@ export interface ProductDetailResponse {
|
|
|
172
171
|
weightKg: number;
|
|
173
172
|
article1c?: string | undefined;
|
|
174
173
|
barcodes: string[];
|
|
174
|
+
seoText: {
|
|
175
|
+
[key: string]: string;
|
|
176
|
+
};
|
|
175
177
|
}
|
|
176
178
|
export interface ProductDetailResponse_NameEntry {
|
|
177
179
|
key: string;
|
|
@@ -209,6 +211,10 @@ export interface ProductDetailResponse_ColorLabelEntry {
|
|
|
209
211
|
key: string;
|
|
210
212
|
value: string;
|
|
211
213
|
}
|
|
214
|
+
export interface ProductDetailResponse_SeoTextEntry {
|
|
215
|
+
key: string;
|
|
216
|
+
value: string;
|
|
217
|
+
}
|
|
212
218
|
export interface ProductImageResponse {
|
|
213
219
|
id: string;
|
|
214
220
|
url: string;
|
|
@@ -396,6 +402,9 @@ export interface CreateProductRequest {
|
|
|
396
402
|
};
|
|
397
403
|
colorHex?: string | undefined;
|
|
398
404
|
weightKg?: number | undefined;
|
|
405
|
+
seoText: {
|
|
406
|
+
[key: string]: string;
|
|
407
|
+
};
|
|
399
408
|
}
|
|
400
409
|
export interface CreateProductRequest_NameEntry {
|
|
401
410
|
key: string;
|
|
@@ -421,6 +430,10 @@ export interface CreateProductRequest_ColorLabelEntry {
|
|
|
421
430
|
key: string;
|
|
422
431
|
value: string;
|
|
423
432
|
}
|
|
433
|
+
export interface CreateProductRequest_SeoTextEntry {
|
|
434
|
+
key: string;
|
|
435
|
+
value: string;
|
|
436
|
+
}
|
|
424
437
|
export interface UpdateProductRequest {
|
|
425
438
|
id: string;
|
|
426
439
|
sku?: string | undefined;
|
|
@@ -461,20 +474,13 @@ export interface UpdateProductRequest {
|
|
|
461
474
|
manualRating?: number | undefined;
|
|
462
475
|
weightKg?: number | undefined;
|
|
463
476
|
guid1c?: string | undefined;
|
|
464
|
-
/**
|
|
465
|
-
* Явне очищення списків.
|
|
466
|
-
*
|
|
467
|
-
* У proto3 `repeated` не відрізняє «не передано» від «передано порожнім»,
|
|
468
|
-
* тож порожній масив сам по собі означає «не чіпати». Раніше цього
|
|
469
|
-
* розрізнення не було: клієнт, який не надіслав `images`, отримував від
|
|
470
|
-
* gateway [] — і всі фото товару видалялися разом із файлами в S3.
|
|
471
|
-
*
|
|
472
|
-
* Той самий підхід уже застосований в UpdateProductVariantRequest.
|
|
473
|
-
*/
|
|
474
477
|
clearImages: boolean;
|
|
475
478
|
clearCategories: boolean;
|
|
476
479
|
clearStickers: boolean;
|
|
477
480
|
clearAttributes: boolean;
|
|
481
|
+
seoText: {
|
|
482
|
+
[key: string]: string;
|
|
483
|
+
};
|
|
478
484
|
}
|
|
479
485
|
export interface UpdateProductRequest_NameEntry {
|
|
480
486
|
key: string;
|
|
@@ -500,6 +506,10 @@ export interface UpdateProductRequest_ColorLabelEntry {
|
|
|
500
506
|
key: string;
|
|
501
507
|
value: string;
|
|
502
508
|
}
|
|
509
|
+
export interface UpdateProductRequest_SeoTextEntry {
|
|
510
|
+
key: string;
|
|
511
|
+
value: string;
|
|
512
|
+
}
|
|
503
513
|
export interface SetManualRatingRequest {
|
|
504
514
|
id: string;
|
|
505
515
|
manualRating?: number | undefined;
|
|
@@ -620,9 +630,7 @@ export interface ProductGroupMember {
|
|
|
620
630
|
colorHex: string;
|
|
621
631
|
price: number;
|
|
622
632
|
status: ProductStatus;
|
|
623
|
-
/** Потрібен вітрині: перемикач кольору веде на картку сусіда за ЧПУ. */
|
|
624
633
|
slug: string;
|
|
625
|
-
/** Чи є що купити — сусід без залишку показується неактивним, а не зникає. */
|
|
626
634
|
inStock: boolean;
|
|
627
635
|
}
|
|
628
636
|
export interface ProductGroupMember_NameEntry {
|
package/dist/gen/promotion.d.ts
CHANGED
|
@@ -278,6 +278,8 @@ export interface UpdatePromotionRequest {
|
|
|
278
278
|
cascadeSteps?: string | undefined;
|
|
279
279
|
bundlePrice?: number | undefined;
|
|
280
280
|
bundleSize?: number | undefined;
|
|
281
|
+
replaceConditions?: boolean | undefined;
|
|
282
|
+
replaceExclusions?: boolean | undefined;
|
|
281
283
|
}
|
|
282
284
|
export interface UpdatePromotionRequest_NameEntry {
|
|
283
285
|
key: string;
|
|
@@ -29,6 +29,7 @@ export interface SiteSettingsResponse {
|
|
|
29
29
|
updatedAt: string;
|
|
30
30
|
workingHours?: string | undefined;
|
|
31
31
|
workingHoursNote?: string | undefined;
|
|
32
|
+
sizeCategorySlugs?: string | undefined;
|
|
32
33
|
}
|
|
33
34
|
export interface GetSiteSettingsRequest {
|
|
34
35
|
}
|
|
@@ -43,6 +44,7 @@ export interface UpdateSiteSettingsRequest {
|
|
|
43
44
|
clearTelegramUrl: boolean;
|
|
44
45
|
workingHours?: string | undefined;
|
|
45
46
|
workingHoursNote?: string | undefined;
|
|
47
|
+
sizeCategorySlugs?: string | undefined;
|
|
46
48
|
}
|
|
47
49
|
export declare const CONTENT_V1_PACKAGE_NAME = "content.v1";
|
|
48
50
|
export interface SettingsServiceClient {
|
package/dist/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
|
-
}
|
|
@@ -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/dist/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/dist/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 {}
|
|
@@ -44,6 +44,80 @@ 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
|
+
|
|
54
|
+
service NewsletterService {
|
|
55
|
+
rpc Subscribe(NewsletterSubscribeRequest) returns (NewsletterSubscribeResponse);
|
|
56
|
+
rpc ListSubscribers(ListNewsletterSubscribersRequest) returns (ListNewsletterSubscribersResponse);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
message NewsletterSubscribeRequest {
|
|
60
|
+
string email = 1;
|
|
61
|
+
optional string locale = 2;
|
|
62
|
+
optional string source = 3;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
message NewsletterSubscribeResponse {
|
|
66
|
+
bool ok = 1;
|
|
67
|
+
string error_message = 2;
|
|
68
|
+
|
|
69
|
+
bool already_subscribed = 3;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
message ListNewsletterSubscribersRequest {
|
|
73
|
+
int32 page = 1;
|
|
74
|
+
int32 limit = 2;
|
|
75
|
+
optional string search = 3;
|
|
76
|
+
|
|
77
|
+
optional bool active = 4;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
message NewsletterSubscriberItem {
|
|
81
|
+
string id = 1;
|
|
82
|
+
string email = 2;
|
|
83
|
+
string locale = 3;
|
|
84
|
+
string source = 4;
|
|
85
|
+
bool active = 5;
|
|
86
|
+
string created_at = 6;
|
|
87
|
+
optional string unsubscribed_at = 7;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
message ListNewsletterSubscribersResponse {
|
|
91
|
+
repeated NewsletterSubscriberItem items = 1;
|
|
92
|
+
int32 total = 2;
|
|
93
|
+
int32 page = 3;
|
|
94
|
+
int32 limit = 4;
|
|
95
|
+
int32 active_total = 5;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
message VerifyUnsubscribeTokenRequest {
|
|
99
|
+
string token = 1;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
message VerifyUnsubscribeTokenResponse {
|
|
103
|
+
bool ok = 1;
|
|
104
|
+
string error_message = 2;
|
|
105
|
+
optional string email = 3;
|
|
106
|
+
optional string user_id = 4;
|
|
107
|
+
repeated string unsubscribed_from = 5;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
message ApplyUnsubscribeRequest {
|
|
111
|
+
string token = 1;
|
|
112
|
+
repeated string categories = 2;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
message ApplyUnsubscribeResponse {
|
|
116
|
+
bool ok = 1;
|
|
117
|
+
string error_message = 2;
|
|
118
|
+
repeated string categories = 3;
|
|
119
|
+
}
|
|
120
|
+
|
|
47
121
|
service TelegramChatsService {
|
|
48
122
|
rpc ListChats(ListChatsRequest) returns (ListChatsResponse);
|
|
49
123
|
rpc UpsertChat(UpsertChatRequest) returns (TelegramChatResponse);
|
|
@@ -240,6 +314,9 @@ enum CampaignRecipientStatusEnum {
|
|
|
240
314
|
RECIPIENT_FAILED = 3;
|
|
241
315
|
RECIPIENT_SKIPPED_OPT_OUT = 4;
|
|
242
316
|
RECIPIENT_SKIPPED_NO_CONTACT = 5;
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
RECIPIENT_SENDING = 6;
|
|
243
320
|
}
|
|
244
321
|
|
|
245
322
|
service BrandingService {
|
|
@@ -373,6 +450,9 @@ message UpsertTemplateRequest {
|
|
|
373
450
|
string body_text = 9;
|
|
374
451
|
string variables_json = 10;
|
|
375
452
|
bool is_active = 11;
|
|
453
|
+
|
|
454
|
+
|
|
455
|
+
optional string actor_id = 12;
|
|
376
456
|
}
|
|
377
457
|
|
|
378
458
|
message UpdateTemplateRequest {
|
|
@@ -380,8 +460,10 @@ message UpdateTemplateRequest {
|
|
|
380
460
|
optional string title = 2;
|
|
381
461
|
optional string subject = 3;
|
|
382
462
|
optional string content_json = 4;
|
|
383
|
-
|
|
384
|
-
|
|
463
|
+
|
|
464
|
+
|
|
465
|
+
optional string body_html = 5;
|
|
466
|
+
optional string body_text = 6;
|
|
385
467
|
optional string variables_json = 7;
|
|
386
468
|
optional bool is_active = 8;
|
|
387
469
|
|