@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.
Files changed (58) hide show
  1. package/dist/gen/product.d.ts +1 -0
  2. package/dist/gen/search.d.ts +18 -0
  3. package/dist/gen/search.js +2 -0
  4. package/dist/proto/account.proto +35 -41
  5. package/dist/proto/attribute.proto +37 -48
  6. package/dist/proto/audit.proto +33 -33
  7. package/dist/proto/auth.proto +9 -15
  8. package/dist/proto/banner.proto +17 -27
  9. package/dist/proto/bonus_settings.proto +11 -16
  10. package/dist/proto/brand.proto +16 -24
  11. package/dist/proto/bundle.proto +46 -58
  12. package/dist/proto/calculation.proto +28 -34
  13. package/dist/proto/cart.proto +84 -90
  14. package/dist/proto/category.proto +21 -30
  15. package/dist/proto/common.proto +6 -7
  16. package/dist/proto/common_post.proto +4 -4
  17. package/dist/proto/coupon.proto +43 -56
  18. package/dist/proto/crm_calculation.proto +47 -57
  19. package/dist/proto/delivery.proto +67 -69
  20. package/dist/proto/delivery_settings.proto +27 -36
  21. package/dist/proto/faq.proto +30 -43
  22. package/dist/proto/manager.proto +44 -32
  23. package/dist/proto/media.proto +9 -19
  24. package/dist/proto/notification.proto +76 -111
  25. package/dist/proto/order.proto +142 -151
  26. package/dist/proto/product.proto +3 -1
  27. package/dist/proto/search.proto +24 -0
  28. package/dist/proto/size_chart.proto +17 -19
  29. package/dist/proto/warehouse.proto +4 -5
  30. package/gen/product.ts +1 -0
  31. package/gen/search.ts +31 -0
  32. package/package.json +1 -1
  33. package/proto/account.proto +35 -41
  34. package/proto/attribute.proto +37 -48
  35. package/proto/audit.proto +33 -33
  36. package/proto/auth.proto +9 -15
  37. package/proto/banner.proto +17 -27
  38. package/proto/bonus_settings.proto +11 -16
  39. package/proto/brand.proto +16 -24
  40. package/proto/bundle.proto +46 -58
  41. package/proto/calculation.proto +28 -34
  42. package/proto/cart.proto +84 -90
  43. package/proto/category.proto +21 -30
  44. package/proto/common.proto +6 -7
  45. package/proto/common_post.proto +4 -4
  46. package/proto/coupon.proto +43 -56
  47. package/proto/crm_calculation.proto +47 -57
  48. package/proto/delivery.proto +67 -69
  49. package/proto/delivery_settings.proto +27 -36
  50. package/proto/faq.proto +30 -43
  51. package/proto/manager.proto +44 -32
  52. package/proto/media.proto +9 -19
  53. package/proto/notification.proto +76 -111
  54. package/proto/order.proto +142 -151
  55. package/proto/product.proto +3 -1
  56. package/proto/search.proto +24 -0
  57. package/proto/size_chart.proto +17 -19
  58. package/proto/warehouse.proto +4 -5
package/proto/cart.proto CHANGED
@@ -15,7 +15,6 @@ service CartService {
15
15
  rpc ApplyPromo(ApplyPromoRequest) returns (CartResponse);
16
16
  rpc RemovePromo(RemovePromoRequest) returns (CartResponse);
17
17
 
18
-
19
18
  rpc ApplyCertificate(ApplyCertificateRequest) returns (CartResponse);
20
19
  rpc RemoveCertificate(RemoveCertificateRequest) returns (CartResponse);
21
20
 
@@ -26,12 +25,11 @@ service CartService {
26
25
  rpc SetDeliveryDraft(SetDeliveryDraftRequest) returns (CartResponse);
27
26
  rpc SetPaymentDraft(SetPaymentDraftRequest) returns (CartResponse);
28
27
  rpc SetComment(SetCommentRequest) returns (CartResponse);
29
-
28
+
30
29
  rpc SetCheckoutDraft(SetCheckoutDraftRequest) returns (CartResponse);
31
30
 
32
31
  rpc Recalculate(RecalculateRequest) returns (CartResponse);
33
32
 
34
-
35
33
  rpc CalculateCrm(CalculateCrmRequest) returns (crm.v1.CalculateCartResponse);
36
34
 
37
35
  rpc MergeGuestToUser(MergeGuestToUserRequest) returns (CartResponse);
@@ -41,73 +39,72 @@ service CartService {
41
39
  rpc GetWishlist(WishlistOwnerRequest) returns (WishlistResponse);
42
40
  }
43
41
 
44
-
45
42
  message CartItem {
46
- string product_id = 1;
47
- string variant_id = 2;
48
- string color_id = 3;
49
- string sku = 4;
50
- string name = 5;
51
- string image_url = 6;
52
- string slug = 7;
53
- string category_id = 8;
54
- string brand_id = 9;
55
- int32 quantity = 10;
56
- double price = 11;
57
- double price_old = 12;
43
+ string product_id = 1;
44
+ string variant_id = 2;
45
+ string color_id = 3;
46
+ string sku = 4;
47
+ string name = 5;
48
+ string image_url = 6;
49
+ string slug = 7;
50
+ string category_id = 8;
51
+ string brand_id = 9;
52
+ int32 quantity = 10;
53
+ double price = 11;
54
+ double price_old = 12;
58
55
  double line_subtotal = 13;
59
56
  double line_discount = 14;
60
- double line_total = 15;
61
- string size = 16;
57
+ double line_total = 15;
58
+ string size = 16;
62
59
  }
63
60
 
64
61
  message AppliedPromotion {
65
- string promotion_id = 1;
66
- string promotion_name = 2;
62
+ string promotion_id = 1;
63
+ string promotion_name = 2;
67
64
  double discount_amount = 3;
68
65
  }
69
66
 
70
67
  message AppliedCoupon {
71
- string coupon_id = 1;
72
- string code = 2;
73
- string promotion_id = 3;
68
+ string coupon_id = 1;
69
+ string code = 2;
70
+ string promotion_id = 3;
74
71
  double discount_amount = 4;
75
72
  }
76
73
 
77
74
  message AppliedCertificate {
78
- string code = 1;
79
- double nominal = 2;
80
- double balance = 3;
81
- double applied = 4;
82
- bool verified = 5;
83
- string error = 6;
75
+ string code = 1;
76
+ double nominal = 2;
77
+ double balance = 3;
78
+ double applied = 4;
79
+ bool verified = 5;
80
+ string error = 6;
84
81
  }
85
82
 
86
83
  message AppliedBonuses {
87
84
  double available = 1;
88
- double applied = 2;
85
+ double applied = 2;
89
86
  }
90
87
 
91
88
  message Recipient {
92
- bool is_different_from_customer = 1;
89
+ bool is_different_from_customer = 1;
93
90
  string first_name = 2;
94
- string last_name = 3;
95
- string phone = 4;
96
- string email = 5;
91
+ string last_name = 3;
92
+ string phone = 4;
93
+ string email = 5;
97
94
  }
98
95
 
99
96
  message DeliveryDraft {
100
- string method = 1;
101
- string city_ref = 2;
102
- string city_name = 3;
97
+ string method = 1;
98
+ string city_ref = 2;
99
+ string city_name = 3;
103
100
  string warehouse_ref = 4;
104
101
  string warehouse_name = 5;
105
- string address = 6;
102
+ string address = 6;
106
103
  string pickup_point_id = 7;
107
- double cost = 8;
108
- bool free_shipping = 9;
109
-
110
- string region = 10;
104
+ double cost = 8;
105
+ bool free_shipping = 9;
106
+
107
+ string region = 10;
111
108
  }
112
109
 
113
110
  message PaymentDraft {
@@ -115,23 +112,23 @@ message PaymentDraft {
115
112
  }
116
113
 
117
114
  message CartTotals {
118
- double items_subtotal = 1;
119
- double promo_discount = 2;
120
- double coupon_discount = 3;
121
- double certificate_applied = 4;
122
- double bonuses_applied = 5;
123
- double shipping_cost = 6;
124
- double grand_total = 7;
125
- double bonuses_to_earn = 8;
115
+ double items_subtotal = 1;
116
+ double promo_discount = 2;
117
+ double coupon_discount = 3;
118
+ double certificate_applied = 4;
119
+ double bonuses_applied = 5;
120
+ double shipping_cost = 6;
121
+ double grand_total = 7;
122
+ double bonuses_to_earn = 8;
126
123
  }
127
124
 
128
125
  message Cart {
129
- string cart_id = 1;
130
- string user_id = 2;
131
- string guest_id = 3;
126
+ string cart_id = 1;
127
+ string user_id = 2;
128
+ string guest_id = 3;
132
129
  repeated CartItem items = 4;
133
130
  repeated AppliedPromotion applied_promotions = 5;
134
- repeated AppliedCoupon applied_coupons = 6;
131
+ repeated AppliedCoupon applied_coupons = 6;
135
132
  repeated string promo_codes = 7;
136
133
  AppliedCertificate certificate = 8;
137
134
  AppliedBonuses bonuses = 9;
@@ -139,32 +136,30 @@ message Cart {
139
136
  DeliveryDraft delivery = 11;
140
137
  PaymentDraft payment = 12;
141
138
  string comment = 13;
142
- bool do_not_call = 14;
139
+ bool do_not_call = 14;
143
140
  CartTotals totals = 15;
144
- int64 updated_at = 16;
145
- int64 expires_at = 17;
141
+ int64 updated_at = 16;
142
+ int64 expires_at = 17;
146
143
  }
147
144
 
148
-
149
145
  message WishlistItem {
150
- string product_id = 1;
151
- string variant_id = 2;
152
- string sku = 3;
153
- string name = 4;
154
- string image_url = 5;
155
- string slug = 6;
156
- double price = 7;
157
- bool in_stock = 8;
158
- int64 added_at = 9;
146
+ string product_id = 1;
147
+ string variant_id = 2;
148
+ string sku = 3;
149
+ string name = 4;
150
+ string image_url = 5;
151
+ string slug = 6;
152
+ double price = 7;
153
+ bool in_stock = 8;
154
+ int64 added_at = 9;
159
155
  }
160
156
 
161
157
  message WishlistResponse {
162
158
  repeated WishlistItem items = 1;
163
159
  }
164
160
 
165
-
166
161
  message CartOwner {
167
- string user_id = 1;
162
+ string user_id = 1;
168
163
  string guest_id = 2;
169
164
  }
170
165
 
@@ -183,36 +178,36 @@ message ClearCartRequest {
183
178
  }
184
179
 
185
180
  message AddItemRequest {
186
- CartOwner owner = 1;
187
- string product_id = 2;
188
- string variant_id = 3;
189
- int32 quantity = 4;
181
+ CartOwner owner = 1;
182
+ string product_id = 2;
183
+ string variant_id = 3;
184
+ int32 quantity = 4;
190
185
  }
191
186
 
192
187
  message UpdateItemQtyRequest {
193
- CartOwner owner = 1;
188
+ CartOwner owner = 1;
194
189
  string variant_id = 2;
195
- int32 quantity = 3;
190
+ int32 quantity = 3;
196
191
  }
197
192
 
198
193
  message RemoveItemRequest {
199
- CartOwner owner = 1;
194
+ CartOwner owner = 1;
200
195
  string variant_id = 2;
201
196
  }
202
197
 
203
198
  message ApplyPromoRequest {
204
199
  CartOwner owner = 1;
205
- string code = 2;
200
+ string code = 2;
206
201
  }
207
202
 
208
203
  message RemovePromoRequest {
209
204
  CartOwner owner = 1;
210
- string code = 2;
205
+ string code = 2;
211
206
  }
212
207
 
213
208
  message ApplyCertificateRequest {
214
209
  CartOwner owner = 1;
215
- string code = 2;
210
+ string code = 2;
216
211
  }
217
212
 
218
213
  message RemoveCertificateRequest {
@@ -221,7 +216,7 @@ message RemoveCertificateRequest {
221
216
 
222
217
  message ApplyBonusesRequest {
223
218
  CartOwner owner = 1;
224
- double amount = 2;
219
+ double amount = 2;
225
220
  }
226
221
 
227
222
  message RemoveBonusesRequest {
@@ -246,22 +241,22 @@ message SetPaymentDraftRequest {
246
241
  message SetCommentRequest {
247
242
  CartOwner owner = 1;
248
243
  string comment = 2;
249
- bool do_not_call = 3;
244
+ bool do_not_call = 3;
250
245
  }
251
246
 
252
247
  message SetCheckoutDraftRequest {
253
248
  CartOwner owner = 1;
254
-
249
+
255
250
  Recipient recipient = 2;
256
251
  DeliveryDraft delivery = 3;
257
252
  PaymentDraft payment = 4;
258
253
  string comment = 5;
259
- bool do_not_call = 6;
254
+ bool do_not_call = 6;
260
255
 
261
- bool has_recipient = 7;
262
- bool has_delivery = 8;
263
- bool has_payment = 9;
264
- bool has_comment = 10;
256
+ bool has_recipient = 7;
257
+ bool has_delivery = 8;
258
+ bool has_payment = 9;
259
+ bool has_comment = 10;
265
260
  }
266
261
 
267
262
  message RecalculateRequest {
@@ -270,7 +265,7 @@ message RecalculateRequest {
270
265
 
271
266
  message MergeGuestToUserRequest {
272
267
  string guest_id = 1;
273
- string user_id = 2;
268
+ string user_id = 2;
274
269
  }
275
270
 
276
271
  message WishlistOwnerRequest {
@@ -278,12 +273,11 @@ message WishlistOwnerRequest {
278
273
  }
279
274
 
280
275
  message WishlistItemRequest {
281
- string user_id = 1;
276
+ string user_id = 1;
282
277
  string product_id = 2;
283
278
  string variant_id = 3;
284
279
  }
285
280
 
286
-
287
281
  message CartResponse {
288
282
  bool ok = 1;
289
283
  Cart cart = 2;
@@ -2,39 +2,30 @@ syntax = "proto3";
2
2
 
3
3
  package catalog.v1;
4
4
 
5
-
6
-
7
-
8
-
9
5
  import "common.proto";
10
6
 
11
-
12
7
  service CategoryAdminService {
13
- rpc GetCategoryTree (GetCategoryTreeRequest) returns (GetCategoryTreeResponse);
14
-
15
- rpc GetCategory (GetCategoryRequest) returns (CategoryResponse);
16
- rpc CreateCategory (CreateCategoryRequest) returns (CategoryResponse);
17
- rpc UpdateCategory (UpdateCategoryRequest) returns (CategoryResponse);
18
-
19
-
20
- rpc DeleteCategory (DeleteCategoryRequest) returns (DeleteResponse);
21
-
22
-
23
- rpc UpdateCategoryOrder (UpdateCategoryOrderRequest) returns (SuccessResponse);
8
+ rpc GetCategoryTree(GetCategoryTreeRequest) returns (GetCategoryTreeResponse);
24
9
 
25
- rpc GetAllCategories (GetAllCategoriesRequest) returns (GetAllCategoriesResponse);
10
+ rpc GetCategory(GetCategoryRequest) returns (CategoryResponse);
11
+ rpc CreateCategory(CreateCategoryRequest) returns (CategoryResponse);
12
+ rpc UpdateCategory(UpdateCategoryRequest) returns (CategoryResponse);
26
13
 
27
- rpc GetAllCategoriesLight (GetAllCategoriesRequest) returns (GetAllCategoriesLightResponse);
14
+ rpc DeleteCategory(DeleteCategoryRequest) returns (DeleteResponse);
28
15
 
16
+ rpc UpdateCategoryOrder(UpdateCategoryOrderRequest) returns (SuccessResponse);
29
17
 
30
- rpc UpsertCategories (UpsertCategoriesRequest) returns (UpsertCategoriesResponse);
31
- }
18
+ rpc GetAllCategories(GetAllCategoriesRequest) returns (GetAllCategoriesResponse);
32
19
 
20
+ rpc GetAllCategoriesLight(GetAllCategoriesRequest) returns (GetAllCategoriesLightResponse);
21
+
22
+ rpc UpsertCategories(UpsertCategoriesRequest) returns (UpsertCategoriesResponse);
23
+ }
33
24
 
34
25
  message CategorySyncItem {
35
26
  string category_guid = 1;
36
- optional string parent_guid = 2;
37
- map<string, string> name = 3;
27
+ optional string parent_guid = 2;
28
+ map<string, string> name = 3;
38
29
  }
39
30
 
40
31
  message UpsertCategoriesRequest {
@@ -44,7 +35,7 @@ message UpsertCategoriesRequest {
44
35
 
45
36
  message CategoryUpsertResult {
46
37
  string guid = 1;
47
- string status = 2;
38
+ string status = 2;
48
39
  optional string reason = 3;
49
40
  optional string id = 4;
50
41
  }
@@ -75,14 +66,14 @@ message GetAllCategoriesLightResponse {
75
66
  repeated CategoryLight items = 1;
76
67
  }
77
68
  message GetCategoryTreeRequest {
78
- string lang = 1;
69
+ string lang = 1;
79
70
  }
80
71
 
81
72
  message CategoryTreeNode {
82
73
  string id = 1;
83
74
  string parent_id = 2;
84
75
  string slug = 3;
85
- string name = 4;
76
+ string name = 4;
86
77
  string image = 5;
87
78
  repeated CategoryTreeNode children = 6;
88
79
  }
@@ -101,7 +92,7 @@ message CategoryResponse {
101
92
 
102
93
  map<string, string> name = 7;
103
94
  map<string, string> description = 8;
104
-
95
+
105
96
  map<string, string> meta_title = 9;
106
97
  map<string, string> meta_description = 10;
107
98
  map<string, string> meta_keywords = 11;
@@ -113,7 +104,7 @@ message CategoryResponse {
113
104
 
114
105
  message GetCategoryRequest {
115
106
  string id = 1;
116
- optional string slug = 2;
107
+ optional string slug = 2;
117
108
  }
118
109
 
119
110
  message CreateCategoryRequest {
@@ -125,7 +116,7 @@ message CreateCategoryRequest {
125
116
 
126
117
  map<string, string> name = 6;
127
118
  map<string, string> description = 7;
128
-
119
+
129
120
  map<string, string> meta_title = 8;
130
121
  map<string, string> meta_description = 9;
131
122
  map<string, string> meta_keywords = 10;
@@ -145,7 +136,7 @@ message UpdateCategoryRequest {
145
136
 
146
137
  map<string, string> name = 7;
147
138
  map<string, string> description = 8;
148
-
139
+
149
140
  map<string, string> meta_title = 9;
150
141
  map<string, string> meta_description = 10;
151
142
  map<string, string> meta_keywords = 11;
@@ -166,4 +157,4 @@ message CategoryOrderItem {
166
157
 
167
158
  message UpdateCategoryOrderRequest {
168
159
  repeated CategoryOrderItem items = 1;
169
- }
160
+ }
@@ -10,17 +10,16 @@ message DeleteResponse {
10
10
  bool success = 1;
11
11
  }
12
12
 
13
-
14
13
  message PaginationRequest {
15
- int32 page = 1;
16
- int32 limit = 2;
14
+ int32 page = 1;
15
+ int32 limit = 2;
17
16
  }
18
17
 
19
18
  message PaginationMeta {
20
- int32 total_items = 1;
19
+ int32 total_items = 1;
21
20
  int32 total_pages = 2;
22
21
  int32 current_page = 3;
23
22
  int32 per_page = 4;
24
- optional double price_min = 5;
25
- optional double price_max = 6;
26
- }
23
+ optional double price_min = 5;
24
+ optional double price_max = 6;
25
+ }
@@ -11,13 +11,13 @@ message DeleteResponse {
11
11
  }
12
12
 
13
13
  message PaginationRequest {
14
- int32 page = 1;
14
+ int32 page = 1;
15
15
  int32 limit = 2;
16
16
  }
17
17
 
18
18
  message PaginationMeta {
19
- int32 total_items = 1;
20
- int32 total_pages = 2;
19
+ int32 total_items = 1;
20
+ int32 total_pages = 2;
21
21
  int32 current_page = 3;
22
- int32 per_page = 4;
22
+ int32 per_page = 4;
23
23
  }
@@ -4,118 +4,105 @@ package promo.v1;
4
4
 
5
5
  import "common_promo.proto";
6
6
 
7
-
8
7
  service CouponService {
9
- rpc GetCoupons (GetCouponsRequest) returns (GetCouponsResponse);
10
- rpc GetCoupon (GetCouponRequest) returns (CouponResponse);
11
- rpc CreateCoupon (CreateCouponRequest) returns (CouponResponse);
12
- rpc UpdateCoupon (UpdateCouponRequest) returns (CouponResponse);
13
- rpc DeactivateCoupon (DeactivateCouponRequest) returns (SuccessResponse);
14
-
15
-
16
- rpc GenerateCoupons (GenerateCouponsRequest) returns (GenerateCouponsResponse);
17
-
18
-
19
- rpc ExportCoupons (ExportCouponsRequest) returns (ExportCouponsResponse);
20
- rpc ImportCoupons (ImportCouponsRequest) returns (ImportCouponsResponse);
21
- }
8
+ rpc GetCoupons(GetCouponsRequest) returns (GetCouponsResponse);
9
+ rpc GetCoupon(GetCouponRequest) returns (CouponResponse);
10
+ rpc CreateCoupon(CreateCouponRequest) returns (CouponResponse);
11
+ rpc UpdateCoupon(UpdateCouponRequest) returns (CouponResponse);
12
+ rpc DeactivateCoupon(DeactivateCouponRequest) returns (SuccessResponse);
22
13
 
14
+ rpc GenerateCoupons(GenerateCouponsRequest) returns (GenerateCouponsResponse);
15
+
16
+ rpc ExportCoupons(ExportCouponsRequest) returns (ExportCouponsResponse);
17
+ rpc ImportCoupons(ImportCouponsRequest) returns (ImportCouponsResponse);
18
+ }
23
19
 
24
20
  message CouponResponse {
25
- string id = 1;
21
+ string id = 1;
26
22
  string promotion_id = 2;
27
- string code = 3;
23
+ string code = 3;
28
24
 
29
- optional int32 usage_limit_total = 4;
25
+ optional int32 usage_limit_total = 4;
30
26
  optional int32 usage_limit_per_user = 5;
31
- int32 usage_count = 6;
27
+ int32 usage_count = 6;
32
28
 
33
- bool is_active = 7;
34
- optional string expires_at = 8;
29
+ bool is_active = 7;
30
+ optional string expires_at = 8;
35
31
 
36
32
  string created_at = 9;
37
33
  }
38
34
 
39
-
40
35
  message GetCouponsRequest {
41
- PaginationRequest pagination = 1;
42
- optional string promotion_id = 2;
43
- optional bool is_active = 3;
44
- optional string search = 4;
36
+ PaginationRequest pagination = 1;
37
+ optional string promotion_id = 2;
38
+ optional bool is_active = 3;
39
+ optional string search = 4;
45
40
  }
46
41
 
47
42
  message GetCouponsResponse {
48
43
  repeated CouponResponse items = 1;
49
- PaginationMeta meta = 2;
44
+ PaginationMeta meta = 2;
50
45
  }
51
46
 
52
-
53
47
  message GetCouponRequest {
54
48
  string id = 1;
55
- optional string code = 2;
49
+ optional string code = 2;
56
50
  }
57
51
 
58
-
59
52
  message CreateCouponRequest {
60
53
  string promotion_id = 1;
61
- string code = 2;
54
+ string code = 2;
62
55
 
63
- optional int32 usage_limit_total = 3;
64
- optional int32 usage_limit_per_user = 4;
65
- optional string expires_at = 5;
66
- bool is_active = 6;
56
+ optional int32 usage_limit_total = 3;
57
+ optional int32 usage_limit_per_user = 4;
58
+ optional string expires_at = 5;
59
+ bool is_active = 6;
67
60
  }
68
61
 
69
-
70
62
  message UpdateCouponRequest {
71
63
  string id = 1;
72
64
 
73
- optional int32 usage_limit_total = 2;
74
- optional int32 usage_limit_per_user = 3;
75
- optional string expires_at = 4;
76
- optional bool is_active = 5;
65
+ optional int32 usage_limit_total = 2;
66
+ optional int32 usage_limit_per_user = 3;
67
+ optional string expires_at = 4;
68
+ optional bool is_active = 5;
77
69
  }
78
70
 
79
-
80
71
  message DeactivateCouponRequest {
81
72
  string id = 1;
82
73
  }
83
74
 
84
-
85
75
  message GenerateCouponsRequest {
86
76
  string promotion_id = 1;
87
- int32 count = 2;
77
+ int32 count = 2;
88
78
 
89
-
90
- optional string prefix = 3;
91
- optional int32 random_length = 4;
79
+ optional string prefix = 3;
80
+ optional int32 random_length = 4;
92
81
 
93
- optional int32 usage_limit_per_user = 5;
94
- optional string expires_at = 6;
82
+ optional int32 usage_limit_per_user = 5;
83
+ optional string expires_at = 6;
95
84
  }
96
85
 
97
86
  message GenerateCouponsResponse {
98
- int32 generated = 1;
87
+ int32 generated = 1;
99
88
  }
100
89
 
101
-
102
90
  message ExportCouponsRequest {
103
91
  string promotion_id = 1;
104
- optional bool active_only = 2;
92
+ optional bool active_only = 2;
105
93
  }
106
94
 
107
95
  message ExportCouponsResponse {
108
- string csv_content = 1;
96
+ string csv_content = 1;
109
97
  }
110
98
 
111
-
112
99
  message ImportCouponsRequest {
113
100
  string promotion_id = 1;
114
- string csv_content = 2;
101
+ string csv_content = 2;
115
102
  }
116
103
 
117
104
  message ImportCouponsResponse {
118
- int32 imported = 1;
119
- int32 skipped = 2;
120
- repeated string errors = 3;
105
+ int32 imported = 1;
106
+ int32 skipped = 2;
107
+ repeated string errors = 3;
121
108
  }