@mamindom/contracts 1.0.167 → 1.0.169
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/product.d.ts +1 -0
- package/dist/gen/search.d.ts +18 -0
- package/dist/gen/search.js +2 -0
- package/dist/proto/account.proto +35 -41
- package/dist/proto/attribute.proto +37 -48
- package/dist/proto/audit.proto +33 -33
- package/dist/proto/auth.proto +9 -15
- package/dist/proto/banner.proto +17 -27
- package/dist/proto/bonus_settings.proto +11 -16
- package/dist/proto/brand.proto +16 -24
- package/dist/proto/bundle.proto +46 -58
- package/dist/proto/calculation.proto +28 -34
- package/dist/proto/cart.proto +84 -90
- package/dist/proto/category.proto +21 -30
- package/dist/proto/common.proto +6 -7
- package/dist/proto/common_post.proto +4 -4
- package/dist/proto/coupon.proto +43 -56
- package/dist/proto/crm_calculation.proto +47 -57
- package/dist/proto/delivery.proto +67 -69
- package/dist/proto/delivery_settings.proto +27 -36
- package/dist/proto/faq.proto +30 -43
- package/dist/proto/manager.proto +44 -32
- package/dist/proto/media.proto +9 -19
- package/dist/proto/notification.proto +76 -111
- package/dist/proto/order.proto +142 -151
- package/dist/proto/product.proto +3 -1
- package/dist/proto/search.proto +24 -0
- package/dist/proto/size_chart.proto +17 -19
- package/dist/proto/warehouse.proto +4 -5
- package/gen/product.ts +1 -0
- package/gen/search.ts +31 -0
- package/package.json +1 -1
- package/proto/account.proto +35 -41
- package/proto/attribute.proto +37 -48
- package/proto/audit.proto +33 -33
- package/proto/auth.proto +9 -15
- package/proto/banner.proto +17 -27
- package/proto/bonus_settings.proto +11 -16
- package/proto/brand.proto +16 -24
- package/proto/bundle.proto +46 -58
- package/proto/calculation.proto +28 -34
- package/proto/cart.proto +84 -90
- package/proto/category.proto +21 -30
- package/proto/common.proto +6 -7
- package/proto/common_post.proto +4 -4
- package/proto/coupon.proto +43 -56
- package/proto/crm_calculation.proto +47 -57
- package/proto/delivery.proto +67 -69
- package/proto/delivery_settings.proto +27 -36
- package/proto/faq.proto +30 -43
- package/proto/manager.proto +44 -32
- package/proto/media.proto +9 -19
- package/proto/notification.proto +76 -111
- package/proto/order.proto +142 -151
- package/proto/product.proto +3 -1
- package/proto/search.proto +24 -0
- package/proto/size_chart.proto +17 -19
- package/proto/warehouse.proto +4 -5
|
@@ -2,33 +2,28 @@ syntax = "proto3";
|
|
|
2
2
|
|
|
3
3
|
package promo.v1;
|
|
4
4
|
|
|
5
|
-
|
|
6
5
|
service BonusSettingsService {
|
|
7
|
-
rpc GetBonusSettings
|
|
8
|
-
rpc UpdateBonusSettings
|
|
6
|
+
rpc GetBonusSettings(GetBonusSettingsRequest) returns (BonusSettingsResponse);
|
|
7
|
+
rpc UpdateBonusSettings(UpdateBonusSettingsRequest) returns (BonusSettingsResponse);
|
|
9
8
|
}
|
|
10
9
|
|
|
11
|
-
|
|
12
10
|
message BonusSettingsResponse {
|
|
11
|
+
double earn_rate = 1;
|
|
12
|
+
|
|
13
|
+
double redeem_rate = 2;
|
|
13
14
|
|
|
14
|
-
double earn_rate = 1;
|
|
15
|
-
|
|
16
|
-
double redeem_rate = 2;
|
|
17
|
-
|
|
18
15
|
double min_order_for_earn = 3;
|
|
19
|
-
|
|
20
|
-
double max_redeem_share = 4;
|
|
21
16
|
|
|
22
|
-
|
|
23
|
-
}
|
|
17
|
+
double max_redeem_share = 4;
|
|
24
18
|
|
|
19
|
+
string updated_at = 5;
|
|
20
|
+
}
|
|
25
21
|
|
|
26
22
|
message GetBonusSettingsRequest {}
|
|
27
23
|
|
|
28
|
-
|
|
29
24
|
message UpdateBonusSettingsRequest {
|
|
30
|
-
optional double earn_rate
|
|
31
|
-
optional double redeem_rate
|
|
25
|
+
optional double earn_rate = 1;
|
|
26
|
+
optional double redeem_rate = 2;
|
|
32
27
|
optional double min_order_for_earn = 3;
|
|
33
|
-
optional double max_redeem_share
|
|
28
|
+
optional double max_redeem_share = 4;
|
|
34
29
|
}
|
package/proto/brand.proto
CHANGED
|
@@ -2,26 +2,22 @@ syntax = "proto3";
|
|
|
2
2
|
|
|
3
3
|
package catalog.v1;
|
|
4
4
|
|
|
5
|
-
|
|
6
5
|
import "common.proto";
|
|
7
6
|
|
|
8
|
-
|
|
9
7
|
service BrandService {
|
|
10
|
-
rpc GetBrands
|
|
11
|
-
rpc GetBrand
|
|
12
|
-
|
|
13
|
-
rpc CreateBrand (CreateBrandRequest) returns (BrandResponse);
|
|
14
|
-
rpc UpdateBrand (UpdateBrandRequest) returns (BrandResponse);
|
|
15
|
-
rpc DeleteBrand (DeleteBrandRequest) returns (DeleteResponse);
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
rpc UpsertBrands (UpsertBrandsRequest) returns (UpsertBrandsResponse);
|
|
19
|
-
}
|
|
8
|
+
rpc GetBrands(GetBrandsRequest) returns (GetBrandsResponse);
|
|
9
|
+
rpc GetBrand(GetBrandRequest) returns (BrandResponse);
|
|
20
10
|
|
|
11
|
+
rpc CreateBrand(CreateBrandRequest) returns (BrandResponse);
|
|
12
|
+
rpc UpdateBrand(UpdateBrandRequest) returns (BrandResponse);
|
|
13
|
+
rpc DeleteBrand(DeleteBrandRequest) returns (DeleteResponse);
|
|
14
|
+
|
|
15
|
+
rpc UpsertBrands(UpsertBrandsRequest) returns (UpsertBrandsResponse);
|
|
16
|
+
}
|
|
21
17
|
|
|
22
18
|
message BrandSyncItem {
|
|
23
|
-
string brand_guid = 1;
|
|
24
|
-
string name = 2;
|
|
19
|
+
string brand_guid = 1;
|
|
20
|
+
string name = 2;
|
|
25
21
|
}
|
|
26
22
|
|
|
27
23
|
message UpsertBrandsRequest {
|
|
@@ -31,7 +27,7 @@ message UpsertBrandsRequest {
|
|
|
31
27
|
|
|
32
28
|
message BrandUpsertResult {
|
|
33
29
|
string guid = 1;
|
|
34
|
-
string status = 2;
|
|
30
|
+
string status = 2;
|
|
35
31
|
optional string reason = 3;
|
|
36
32
|
optional string id = 4;
|
|
37
33
|
}
|
|
@@ -40,14 +36,12 @@ message UpsertBrandsResponse {
|
|
|
40
36
|
repeated BrandUpsertResult results = 1;
|
|
41
37
|
}
|
|
42
38
|
|
|
43
|
-
|
|
44
39
|
message BrandResponse {
|
|
45
40
|
string id = 1;
|
|
46
41
|
string slug = 2;
|
|
47
42
|
string name = 3;
|
|
48
43
|
optional string image = 4;
|
|
49
44
|
|
|
50
|
-
|
|
51
45
|
map<string, string> description = 5;
|
|
52
46
|
map<string, string> meta_title = 6;
|
|
53
47
|
map<string, string> meta_description = 7;
|
|
@@ -55,11 +49,9 @@ message BrandResponse {
|
|
|
55
49
|
optional string guid_1c = 8;
|
|
56
50
|
optional string image_id = 9;
|
|
57
51
|
|
|
58
|
-
|
|
59
52
|
int32 product_count = 10;
|
|
60
53
|
}
|
|
61
54
|
|
|
62
|
-
|
|
63
55
|
message GetBrandsRequest {
|
|
64
56
|
PaginationRequest pagination = 1;
|
|
65
57
|
optional string search = 2;
|
|
@@ -73,18 +65,18 @@ message GetBrandsResponse {
|
|
|
73
65
|
|
|
74
66
|
message GetBrandRequest {
|
|
75
67
|
string id = 1;
|
|
76
|
-
optional string slug = 2;
|
|
68
|
+
optional string slug = 2;
|
|
77
69
|
}
|
|
78
70
|
|
|
79
71
|
message CreateBrandRequest {
|
|
80
72
|
string slug = 1;
|
|
81
73
|
string name = 2;
|
|
82
74
|
optional string image = 3;
|
|
83
|
-
|
|
75
|
+
|
|
84
76
|
map<string, string> description = 4;
|
|
85
77
|
map<string, string> meta_title = 5;
|
|
86
78
|
map<string, string> meta_description = 6;
|
|
87
|
-
|
|
79
|
+
|
|
88
80
|
optional string guid_1c = 7;
|
|
89
81
|
optional string image_id = 8;
|
|
90
82
|
}
|
|
@@ -94,7 +86,7 @@ message UpdateBrandRequest {
|
|
|
94
86
|
optional string slug = 2;
|
|
95
87
|
optional string name = 3;
|
|
96
88
|
optional string image = 4;
|
|
97
|
-
|
|
89
|
+
|
|
98
90
|
map<string, string> description = 5;
|
|
99
91
|
map<string, string> meta_title = 6;
|
|
100
92
|
map<string, string> meta_description = 7;
|
|
@@ -103,4 +95,4 @@ message UpdateBrandRequest {
|
|
|
103
95
|
|
|
104
96
|
message DeleteBrandRequest {
|
|
105
97
|
string id = 1;
|
|
106
|
-
}
|
|
98
|
+
}
|
package/proto/bundle.proto
CHANGED
|
@@ -5,44 +5,42 @@ package catalog.v1;
|
|
|
5
5
|
import "common.proto";
|
|
6
6
|
|
|
7
7
|
service BundleService {
|
|
8
|
-
rpc GetBundles
|
|
9
|
-
rpc GetBundle
|
|
10
|
-
rpc CreateBundle
|
|
11
|
-
rpc UpdateBundle
|
|
12
|
-
rpc DeleteBundle
|
|
8
|
+
rpc GetBundles(GetBundlesRequest) returns (GetBundlesResponse);
|
|
9
|
+
rpc GetBundle(GetBundleRequest) returns (BundleDetailResponse);
|
|
10
|
+
rpc CreateBundle(CreateBundleRequest) returns (BundleDetailResponse);
|
|
11
|
+
rpc UpdateBundle(UpdateBundleRequest) returns (BundleDetailResponse);
|
|
12
|
+
rpc DeleteBundle(DeleteBundleRequest) returns (DeleteResponse);
|
|
13
13
|
|
|
14
|
-
rpc AddBundleItem
|
|
15
|
-
rpc RemoveBundleItem
|
|
16
|
-
rpc UpdateBundleItem
|
|
17
|
-
rpc BulkAddBundleItems
|
|
14
|
+
rpc AddBundleItem(AddBundleItemRequest) returns (BundleDetailResponse);
|
|
15
|
+
rpc RemoveBundleItem(RemoveBundleItemRequest) returns (BundleDetailResponse);
|
|
16
|
+
rpc UpdateBundleItem(UpdateBundleItemRequest) returns (BundleDetailResponse);
|
|
17
|
+
rpc BulkAddBundleItems(BulkAddBundleItemsRequest) returns (BundleDetailResponse);
|
|
18
18
|
|
|
19
|
-
rpc AddBundleRule
|
|
20
|
-
rpc RemoveBundleRule
|
|
21
|
-
rpc ApplyBundleRules
|
|
19
|
+
rpc AddBundleRule(AddBundleRuleRequest) returns (SuccessResponse);
|
|
20
|
+
rpc RemoveBundleRule(RemoveBundleRuleRequest) returns (SuccessResponse);
|
|
21
|
+
rpc ApplyBundleRules(ApplyBundleRulesRequest) returns (BundleDetailResponse);
|
|
22
22
|
|
|
23
|
-
rpc GetBundlesByProduct
|
|
23
|
+
rpc GetBundlesByProduct(GetBundlesByProductRequest) returns (GetBundlesResponse);
|
|
24
24
|
|
|
25
|
-
rpc BulkUpdateBundleStatus
|
|
26
|
-
rpc BulkDeleteBundles
|
|
25
|
+
rpc BulkUpdateBundleStatus(BulkUpdateBundleStatusRequest) returns (SuccessResponse);
|
|
26
|
+
rpc BulkDeleteBundles(BulkDeleteBundlesRequest) returns (SuccessResponse);
|
|
27
27
|
|
|
28
|
-
rpc CheckBundleAvailability
|
|
28
|
+
rpc CheckBundleAvailability(CheckBundleAvailabilityRequest) returns (BundleAvailabilityResponse);
|
|
29
29
|
|
|
30
|
-
rpc CloneBundle
|
|
31
|
-
rpc ExportBundles
|
|
30
|
+
rpc CloneBundle(CloneBundleRequest) returns (BundleDetailResponse);
|
|
31
|
+
rpc ExportBundles(ExportBundlesRequest) returns (ExportBundlesResponse);
|
|
32
32
|
|
|
33
|
-
rpc AddCrossSellLink
|
|
33
|
+
rpc AddCrossSellLink(AddCrossSellLinkRequest) returns (SuccessResponse);
|
|
34
34
|
|
|
35
|
-
rpc GenerateBundleCollage
|
|
35
|
+
rpc GenerateBundleCollage(GenerateBundleCollageRequest) returns (GenerateBundleCollageResponse);
|
|
36
36
|
|
|
37
|
-
rpc BulkLookupBundles
|
|
37
|
+
rpc BulkLookupBundles(BulkLookupBundlesRequest) returns (BulkLookupBundlesResponse);
|
|
38
38
|
|
|
39
|
-
rpc GetBundleRelatedProducts
|
|
40
|
-
rpc SetBundleRelatedProducts
|
|
41
|
-
rpc RemoveBundleRelatedProduct
|
|
39
|
+
rpc GetBundleRelatedProducts(GetBundleRelatedProductsRequest) returns (GetBundleRelatedProductsResponse);
|
|
40
|
+
rpc SetBundleRelatedProducts(SetBundleRelatedProductsRequest) returns (SuccessResponse);
|
|
41
|
+
rpc RemoveBundleRelatedProduct(RemoveBundleRelatedProductRequest) returns (SuccessResponse);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
46
44
|
enum BundleStatus {
|
|
47
45
|
BUNDLE_STATUS_UNSPECIFIED = 0;
|
|
48
46
|
BUNDLE_STATUS_DRAFT = 1;
|
|
@@ -81,8 +79,6 @@ enum RuleOperator {
|
|
|
81
79
|
RULE_OPERATOR_ALL = 1;
|
|
82
80
|
}
|
|
83
81
|
|
|
84
|
-
|
|
85
|
-
|
|
86
82
|
message GetBundlesRequest {
|
|
87
83
|
PaginationRequest pagination = 1;
|
|
88
84
|
optional string search = 2;
|
|
@@ -120,7 +116,6 @@ message CreateBundleRequest {
|
|
|
120
116
|
repeated BundleItemPayload items = 15;
|
|
121
117
|
string created_by_id = 16;
|
|
122
118
|
|
|
123
|
-
|
|
124
119
|
repeated DisplayPlacement display_placements = 17;
|
|
125
120
|
PriceMode price_mode = 18;
|
|
126
121
|
bool require_all_in_stock = 19;
|
|
@@ -153,7 +148,6 @@ message UpdateBundleRequest {
|
|
|
153
148
|
|
|
154
149
|
repeated BundleItemPayload items = 16;
|
|
155
150
|
|
|
156
|
-
|
|
157
151
|
repeated DisplayPlacement display_placements = 17;
|
|
158
152
|
optional PriceMode price_mode = 18;
|
|
159
153
|
optional bool require_all_in_stock = 19;
|
|
@@ -241,7 +235,7 @@ message CloneBundleRequest {
|
|
|
241
235
|
message ExportBundlesRequest {
|
|
242
236
|
optional BundleStatus status = 1;
|
|
243
237
|
optional BundleType bundle_type = 2;
|
|
244
|
-
string format = 3;
|
|
238
|
+
string format = 3;
|
|
245
239
|
}
|
|
246
240
|
|
|
247
241
|
message AddCrossSellLinkRequest {
|
|
@@ -249,8 +243,6 @@ message AddCrossSellLinkRequest {
|
|
|
249
243
|
string anchor_product_id = 2;
|
|
250
244
|
}
|
|
251
245
|
|
|
252
|
-
|
|
253
|
-
|
|
254
246
|
message GetBundlesResponse {
|
|
255
247
|
repeated BundleListItemResponse items = 1;
|
|
256
248
|
PaginationMeta meta = 2;
|
|
@@ -275,7 +267,6 @@ message BundleListItemResponse {
|
|
|
275
267
|
double final_price = 13;
|
|
276
268
|
bool in_stock = 14;
|
|
277
269
|
|
|
278
|
-
|
|
279
270
|
BundleType bundle_type = 15;
|
|
280
271
|
repeated DisplayPlacement display_placements = 16;
|
|
281
272
|
}
|
|
@@ -309,7 +300,6 @@ message BundleDetailResponse {
|
|
|
309
300
|
double final_price = 19;
|
|
310
301
|
bool in_stock = 20;
|
|
311
302
|
|
|
312
|
-
|
|
313
303
|
repeated DisplayPlacement display_placements = 21;
|
|
314
304
|
PriceMode price_mode = 22;
|
|
315
305
|
bool require_all_in_stock = 23;
|
|
@@ -357,42 +347,40 @@ message BundleItemAvailability {
|
|
|
357
347
|
}
|
|
358
348
|
|
|
359
349
|
message ExportBundlesResponse {
|
|
360
|
-
string content = 1;
|
|
350
|
+
string content = 1;
|
|
361
351
|
string format = 2;
|
|
362
352
|
int32 count = 3;
|
|
363
353
|
}
|
|
364
354
|
|
|
365
355
|
message GenerateBundleCollageRequest {
|
|
366
356
|
string bundle_id = 1;
|
|
367
|
-
|
|
357
|
+
|
|
368
358
|
optional int32 cell_size = 2;
|
|
369
359
|
}
|
|
370
360
|
|
|
371
361
|
message GenerateBundleCollageResponse {
|
|
372
|
-
string url = 1;
|
|
373
|
-
string key = 2;
|
|
374
|
-
int32 width = 3;
|
|
375
|
-
int32 height = 4;
|
|
362
|
+
string url = 1;
|
|
363
|
+
string key = 2;
|
|
364
|
+
int32 width = 3;
|
|
365
|
+
int32 height = 4;
|
|
376
366
|
string bundle_id = 5;
|
|
377
367
|
}
|
|
378
368
|
|
|
379
|
-
|
|
380
369
|
message BulkLookupBundlesRequest {
|
|
381
370
|
repeated string slugs = 1;
|
|
382
371
|
}
|
|
383
372
|
|
|
384
373
|
message BundleLookupResult {
|
|
385
|
-
string slug
|
|
374
|
+
string slug = 1;
|
|
386
375
|
string bundle_id = 2;
|
|
387
|
-
string name_uk
|
|
388
|
-
bool
|
|
376
|
+
string name_uk = 3;
|
|
377
|
+
bool found = 4;
|
|
389
378
|
}
|
|
390
379
|
|
|
391
380
|
message BulkLookupBundlesResponse {
|
|
392
381
|
repeated BundleLookupResult results = 1;
|
|
393
382
|
}
|
|
394
383
|
|
|
395
|
-
|
|
396
384
|
enum BundleRelatedType {
|
|
397
385
|
BUNDLE_RELATED_TYPE_UNSPECIFIED = 0;
|
|
398
386
|
BUNDLE_RELATED_TYPE_CROSS_SELL = 1;
|
|
@@ -402,13 +390,13 @@ enum BundleRelatedType {
|
|
|
402
390
|
}
|
|
403
391
|
|
|
404
392
|
message BundleRelatedItem {
|
|
405
|
-
string product_id
|
|
406
|
-
string sku
|
|
407
|
-
string slug
|
|
393
|
+
string product_id = 1;
|
|
394
|
+
string sku = 2;
|
|
395
|
+
string slug = 3;
|
|
408
396
|
map<string, string> name = 4;
|
|
409
|
-
string main_image
|
|
410
|
-
double price
|
|
411
|
-
int32
|
|
397
|
+
string main_image = 5;
|
|
398
|
+
double price = 6;
|
|
399
|
+
int32 total_stock = 7;
|
|
412
400
|
BundleRelatedType type = 8;
|
|
413
401
|
}
|
|
414
402
|
|
|
@@ -418,10 +406,10 @@ message GetBundleRelatedProductsRequest {
|
|
|
418
406
|
}
|
|
419
407
|
|
|
420
408
|
message GetBundleRelatedProductsResponse {
|
|
421
|
-
repeated BundleRelatedItem cross_sell
|
|
422
|
-
repeated BundleRelatedItem up_sell
|
|
423
|
-
repeated BundleRelatedItem bought_together
|
|
424
|
-
repeated BundleRelatedItem popular
|
|
409
|
+
repeated BundleRelatedItem cross_sell = 1;
|
|
410
|
+
repeated BundleRelatedItem up_sell = 2;
|
|
411
|
+
repeated BundleRelatedItem bought_together = 3;
|
|
412
|
+
repeated BundleRelatedItem popular = 4;
|
|
425
413
|
}
|
|
426
414
|
|
|
427
415
|
message SetBundleRelatedProductsRequest {
|
|
@@ -431,7 +419,7 @@ message SetBundleRelatedProductsRequest {
|
|
|
431
419
|
}
|
|
432
420
|
|
|
433
421
|
message RemoveBundleRelatedProductRequest {
|
|
434
|
-
string bundle_id
|
|
422
|
+
string bundle_id = 1;
|
|
435
423
|
string related_product_id = 2;
|
|
436
|
-
BundleRelatedType type
|
|
424
|
+
BundleRelatedType type = 3;
|
|
437
425
|
}
|
package/proto/calculation.proto
CHANGED
|
@@ -4,65 +4,59 @@ package promo.v1;
|
|
|
4
4
|
|
|
5
5
|
import "common_promo.proto";
|
|
6
6
|
|
|
7
|
-
|
|
8
7
|
service PromoCalculationService {
|
|
9
|
-
|
|
10
|
-
rpc ValidateAndCalculate (ValidateAndCalculateRequest) returns (ValidateAndCalculateResponse);
|
|
8
|
+
rpc ValidateAndCalculate(ValidateAndCalculateRequest) returns (ValidateAndCalculateResponse);
|
|
11
9
|
|
|
12
|
-
|
|
13
|
-
rpc ApplyPromotion (ApplyPromotionRequest) returns (SuccessResponse);
|
|
10
|
+
rpc ApplyPromotion(ApplyPromotionRequest) returns (SuccessResponse);
|
|
14
11
|
}
|
|
15
12
|
|
|
16
|
-
|
|
17
13
|
message CartItem {
|
|
18
|
-
string product_id
|
|
14
|
+
string product_id = 1;
|
|
19
15
|
string category_id = 2;
|
|
20
|
-
string brand_id
|
|
21
|
-
int32
|
|
22
|
-
double price
|
|
16
|
+
string brand_id = 3;
|
|
17
|
+
int32 quantity = 4;
|
|
18
|
+
double price = 5;
|
|
23
19
|
}
|
|
24
20
|
|
|
25
|
-
|
|
26
21
|
message ValidateAndCalculateRequest {
|
|
27
|
-
string
|
|
28
|
-
repeated CartItem items
|
|
29
|
-
double
|
|
30
|
-
optional string coupon_code
|
|
31
|
-
bool
|
|
32
|
-
int32
|
|
33
|
-
repeated string user_groups
|
|
34
|
-
repeated string coupon_codes
|
|
22
|
+
string user_id = 1;
|
|
23
|
+
repeated CartItem items = 2;
|
|
24
|
+
double order_total = 3;
|
|
25
|
+
optional string coupon_code = 4;
|
|
26
|
+
bool is_first_order = 5;
|
|
27
|
+
int32 order_count = 6;
|
|
28
|
+
repeated string user_groups = 7;
|
|
29
|
+
repeated string coupon_codes = 8;
|
|
35
30
|
}
|
|
36
31
|
|
|
37
32
|
message ValidateAndCalculateResponse {
|
|
38
|
-
bool
|
|
39
|
-
double discount_amount = 2;
|
|
40
|
-
double final_total
|
|
33
|
+
bool is_valid = 1;
|
|
34
|
+
double discount_amount = 2;
|
|
35
|
+
double final_total = 3;
|
|
41
36
|
|
|
42
37
|
repeated AppliedPromotion applied_promotions = 4;
|
|
43
|
-
optional AppliedCoupon
|
|
38
|
+
optional AppliedCoupon applied_coupon = 5;
|
|
44
39
|
|
|
45
|
-
optional string error_message = 6;
|
|
40
|
+
optional string error_message = 6;
|
|
46
41
|
}
|
|
47
42
|
|
|
48
43
|
message AppliedPromotion {
|
|
49
|
-
string promotion_id
|
|
44
|
+
string promotion_id = 1;
|
|
50
45
|
string promotion_name = 2;
|
|
51
46
|
double discount_amount = 3;
|
|
52
47
|
}
|
|
53
48
|
|
|
54
49
|
message AppliedCoupon {
|
|
55
|
-
string coupon_id
|
|
56
|
-
string code
|
|
57
|
-
string promotion_id
|
|
50
|
+
string coupon_id = 1;
|
|
51
|
+
string code = 2;
|
|
52
|
+
string promotion_id = 3;
|
|
58
53
|
double discount_amount = 4;
|
|
59
54
|
}
|
|
60
55
|
|
|
61
|
-
|
|
62
56
|
message ApplyPromotionRequest {
|
|
63
|
-
string
|
|
64
|
-
string
|
|
65
|
-
double
|
|
66
|
-
optional string coupon_code
|
|
67
|
-
repeated string promotion_ids
|
|
57
|
+
string user_id = 1;
|
|
58
|
+
string order_id = 2;
|
|
59
|
+
double discount_amount = 3;
|
|
60
|
+
optional string coupon_code = 4;
|
|
61
|
+
repeated string promotion_ids = 5;
|
|
68
62
|
}
|