@mamindom/contracts 1.0.65 → 1.0.67

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.
@@ -0,0 +1,265 @@
1
+ syntax = "proto3";
2
+
3
+ package catalog.v1;
4
+
5
+ import "common.proto";
6
+
7
+ service BundleService {
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
+
14
+ rpc AddBundleItem (AddBundleItemRequest) returns (BundleDetailResponse);
15
+ rpc RemoveBundleItem (RemoveBundleItemRequest) returns (BundleDetailResponse);
16
+ rpc UpdateBundleItem (UpdateBundleItemRequest) returns (BundleDetailResponse);
17
+
18
+
19
+ rpc AddBundleRule (AddBundleRuleRequest) returns (SuccessResponse);
20
+ rpc RemoveBundleRule (RemoveBundleRuleRequest) returns (SuccessResponse);
21
+ rpc GetBundlesByProduct (GetBundlesByProductRequest) returns (GetBundlesResponse);
22
+
23
+
24
+ rpc BulkUpdateBundleStatus (BulkUpdateBundleStatusRequest) returns (SuccessResponse);
25
+ rpc BulkDeleteBundles (BulkDeleteBundlesRequest) returns (SuccessResponse);
26
+
27
+
28
+ rpc CheckBundleAvailability (CheckBundleAvailabilityRequest) returns (BundleAvailabilityResponse);
29
+ }
30
+
31
+
32
+ enum BundleStatus {
33
+ BUNDLE_STATUS_UNSPECIFIED = 0;
34
+ BUNDLE_STATUS_DRAFT = 1;
35
+ BUNDLE_STATUS_ACTIVE = 2;
36
+ BUNDLE_STATUS_INACTIVE = 3;
37
+ }
38
+
39
+ enum DiscountType {
40
+ DISCOUNT_TYPE_UNSPECIFIED = 0;
41
+ DISCOUNT_TYPE_PERCENTAGE = 1;
42
+ DISCOUNT_TYPE_FIXED_AMOUNT = 2;
43
+ }
44
+
45
+
46
+ message GetBundlesRequest {
47
+ PaginationRequest pagination = 1;
48
+ optional string search = 2;
49
+ optional BundleStatus status = 3;
50
+ optional string product_id = 4;
51
+ }
52
+
53
+ message GetBundleRequest {
54
+ string id = 1;
55
+ optional string slug = 2;
56
+ }
57
+
58
+ message CreateBundleRequest {
59
+ optional string slug = 1;
60
+ BundleStatus status = 2;
61
+
62
+ map<string, string> name = 3;
63
+ map<string, string> short_description = 4;
64
+ map<string, string> description = 5;
65
+
66
+ optional string main_image = 6;
67
+ optional string main_image_id = 7;
68
+
69
+ DiscountType discount_type = 8;
70
+ double discount_value = 9;
71
+ optional double fixed_price = 10;
72
+
73
+ bool is_exclusive = 11;
74
+ optional int32 sort_order = 12;
75
+
76
+ map<string, string> meta_title = 13;
77
+ map<string, string> meta_description = 14;
78
+
79
+ repeated BundleItemPayload items = 15;
80
+ string created_by_id = 16;
81
+ }
82
+
83
+ message UpdateBundleRequest {
84
+ string id = 1;
85
+ optional string slug = 2;
86
+ optional BundleStatus status = 3;
87
+
88
+ map<string, string> name = 4;
89
+ map<string, string> short_description = 5;
90
+ map<string, string> description = 6;
91
+
92
+ optional string main_image = 7;
93
+ optional string main_image_id = 8;
94
+
95
+ optional DiscountType discount_type = 9;
96
+ optional double discount_value = 10;
97
+ optional double fixed_price = 11;
98
+
99
+ optional bool is_exclusive = 12;
100
+ optional int32 sort_order = 13;
101
+
102
+ map<string, string> meta_title = 14;
103
+ map<string, string> meta_description = 15;
104
+
105
+ repeated BundleItemPayload items = 16;
106
+ }
107
+
108
+ message DeleteBundleRequest {
109
+ string id = 1;
110
+ }
111
+
112
+ message BundleItemPayload {
113
+ string product_id = 1;
114
+ optional string variant_id = 2;
115
+ int32 quantity = 3;
116
+ optional DiscountType item_discount_type = 4;
117
+ optional double item_discount_value = 5;
118
+ int32 sort_order = 6;
119
+ }
120
+
121
+ message AddBundleItemRequest {
122
+ string bundle_id = 1;
123
+ BundleItemPayload item = 2;
124
+ }
125
+
126
+ message RemoveBundleItemRequest {
127
+ string bundle_id = 1;
128
+ string item_id = 2;
129
+ }
130
+
131
+ message UpdateBundleItemRequest {
132
+ string bundle_id = 1;
133
+ string item_id = 2;
134
+ optional int32 quantity = 3;
135
+ optional DiscountType item_discount_type = 4;
136
+ optional double item_discount_value = 5;
137
+ optional int32 sort_order = 6;
138
+ }
139
+
140
+ message AddBundleRuleRequest {
141
+ string bundle_id = 1;
142
+ string rule_type = 2;
143
+ string target_id = 3;
144
+ repeated string excluded_product_ids = 4;
145
+ }
146
+
147
+ message RemoveBundleRuleRequest {
148
+ string bundle_id = 1;
149
+ string rule_id = 2;
150
+ }
151
+
152
+ message GetBundlesByProductRequest {
153
+ string product_id = 1;
154
+ optional BundleStatus status = 2;
155
+ }
156
+
157
+ message BulkUpdateBundleStatusRequest {
158
+ repeated string bundle_ids = 1;
159
+ BundleStatus status = 2;
160
+ }
161
+
162
+ message BulkDeleteBundlesRequest {
163
+ repeated string bundle_ids = 1;
164
+ }
165
+
166
+ message CheckBundleAvailabilityRequest {
167
+ string bundle_id = 1;
168
+ }
169
+
170
+
171
+ message GetBundlesResponse {
172
+ repeated BundleListItemResponse items = 1;
173
+ PaginationMeta meta = 2;
174
+ }
175
+
176
+ message BundleListItemResponse {
177
+ string id = 1;
178
+ string slug = 2;
179
+ BundleStatus status = 3;
180
+ map<string, string> name = 4;
181
+ string main_image = 5;
182
+
183
+ DiscountType discount_type = 6;
184
+ double discount_value = 7;
185
+ optional double fixed_price = 8;
186
+
187
+ bool is_exclusive = 9;
188
+ int32 sort_order = 10;
189
+
190
+ int32 item_count = 11;
191
+ double original_price = 12;
192
+ double final_price = 13;
193
+ bool in_stock = 14;
194
+ }
195
+
196
+ message BundleDetailResponse {
197
+ string id = 1;
198
+ string slug = 2;
199
+ BundleStatus status = 3;
200
+ int32 sort_order = 4;
201
+
202
+ map<string, string> name = 5;
203
+ map<string, string> short_description = 6;
204
+ map<string, string> description = 7;
205
+
206
+ string main_image = 8;
207
+ optional string main_image_id = 9;
208
+
209
+ DiscountType discount_type = 10;
210
+ double discount_value = 11;
211
+ optional double fixed_price = 12;
212
+
213
+ bool is_exclusive = 13;
214
+
215
+ map<string, string> meta_title = 14;
216
+ map<string, string> meta_description = 15;
217
+
218
+ repeated BundleItemResponse items = 16;
219
+ repeated BundleRuleResponse rules = 17;
220
+
221
+ double original_price = 18;
222
+ double final_price = 19;
223
+ bool in_stock = 20;
224
+ }
225
+
226
+ message BundleItemResponse {
227
+ string id = 1;
228
+ string product_id = 2;
229
+ optional string variant_id = 3;
230
+ int32 quantity = 4;
231
+ optional DiscountType item_discount_type = 5;
232
+ optional double item_discount_value = 6;
233
+ int32 sort_order = 7;
234
+
235
+
236
+ map<string, string> product_name = 8;
237
+ string product_image = 9;
238
+ string product_sku = 10;
239
+ double product_price = 11;
240
+ int32 product_stock = 12;
241
+ double item_final_price = 13;
242
+ }
243
+
244
+ message BundleRuleResponse {
245
+ string id = 1;
246
+ string rule_type = 2;
247
+ string target_id = 3;
248
+ repeated string excluded_product_ids = 4;
249
+
250
+
251
+ map<string, string> target_name = 5;
252
+ }
253
+
254
+ message BundleAvailabilityResponse {
255
+ bool available = 1;
256
+ repeated BundleItemAvailability items = 2;
257
+ }
258
+
259
+ message BundleItemAvailability {
260
+ string product_id = 1;
261
+ optional string variant_id = 2;
262
+ int32 required_quantity = 3;
263
+ int32 available_quantity = 4;
264
+ bool in_stock = 5;
265
+ }
@@ -19,6 +19,8 @@ message SizeChartResponse {
19
19
  string id = 1;
20
20
  map<string, string> name = 2;
21
21
  string content = 3;
22
+ string image_url = 4;
23
+ string image_id = 5;
22
24
  }
23
25
 
24
26
  message GetSizeChartsResponse {
@@ -33,12 +35,16 @@ message GetSizeChartRequest {
33
35
  message CreateSizeChartRequest {
34
36
  map<string, string> name = 1;
35
37
  string content = 2;
38
+ string image_url = 3;
39
+ string image_id = 4;
36
40
  }
37
41
 
38
42
  message UpdateSizeChartRequest {
39
43
  string id = 1;
40
44
  map<string, string> name = 2;
41
45
  string content = 3;
46
+ string image_url = 4;
47
+ string image_id = 5;
42
48
  }
43
49
 
44
50
  message DeleteSizeChartRequest {