@mamindom/contracts 1.0.168 → 1.0.170

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 (53) hide show
  1. package/dist/gen/calculation.d.ts +1 -0
  2. package/dist/gen/cart.d.ts +1 -0
  3. package/dist/proto/account.proto +35 -41
  4. package/dist/proto/attribute.proto +37 -48
  5. package/dist/proto/audit.proto +33 -33
  6. package/dist/proto/auth.proto +9 -15
  7. package/dist/proto/banner.proto +17 -27
  8. package/dist/proto/bonus_settings.proto +11 -16
  9. package/dist/proto/brand.proto +16 -24
  10. package/dist/proto/bundle.proto +46 -58
  11. package/dist/proto/calculation.proto +30 -34
  12. package/dist/proto/cart.proto +85 -90
  13. package/dist/proto/category.proto +21 -30
  14. package/dist/proto/common.proto +6 -7
  15. package/dist/proto/common_post.proto +4 -4
  16. package/dist/proto/coupon.proto +43 -56
  17. package/dist/proto/crm_calculation.proto +47 -57
  18. package/dist/proto/delivery.proto +67 -69
  19. package/dist/proto/delivery_settings.proto +27 -36
  20. package/dist/proto/faq.proto +30 -43
  21. package/dist/proto/manager.proto +44 -32
  22. package/dist/proto/media.proto +9 -19
  23. package/dist/proto/notification.proto +76 -111
  24. package/dist/proto/order.proto +142 -151
  25. package/dist/proto/size_chart.proto +17 -19
  26. package/dist/proto/warehouse.proto +4 -5
  27. package/gen/calculation.ts +1 -0
  28. package/gen/cart.ts +1 -0
  29. package/package.json +1 -1
  30. package/proto/account.proto +35 -41
  31. package/proto/attribute.proto +37 -48
  32. package/proto/audit.proto +33 -33
  33. package/proto/auth.proto +9 -15
  34. package/proto/banner.proto +17 -27
  35. package/proto/bonus_settings.proto +11 -16
  36. package/proto/brand.proto +16 -24
  37. package/proto/bundle.proto +46 -58
  38. package/proto/calculation.proto +30 -34
  39. package/proto/cart.proto +85 -90
  40. package/proto/category.proto +21 -30
  41. package/proto/common.proto +6 -7
  42. package/proto/common_post.proto +4 -4
  43. package/proto/coupon.proto +43 -56
  44. package/proto/crm_calculation.proto +47 -57
  45. package/proto/delivery.proto +67 -69
  46. package/proto/delivery_settings.proto +27 -36
  47. package/proto/faq.proto +30 -43
  48. package/proto/manager.proto +44 -32
  49. package/proto/media.proto +9 -19
  50. package/proto/notification.proto +76 -111
  51. package/proto/order.proto +142 -151
  52. package/proto/size_chart.proto +17 -19
  53. package/proto/warehouse.proto +4 -5
@@ -14,7 +14,6 @@ service OrderService {
14
14
  rpc UpdateStatus(UpdateStatusRequest) returns (OrderResponse);
15
15
  rpc CancelOrder(CancelOrderRequest) returns (OrderResponse);
16
16
 
17
-
18
17
  rpc ArchiveOrder(ArchiveOrderRequest) returns (OrderResponse);
19
18
  rpc UnarchiveOrder(UnarchiveOrderRequest) returns (OrderResponse);
20
19
 
@@ -26,19 +25,16 @@ service OrderService {
26
25
  rpc EditItems(EditItemsRequest) returns (OrderResponse);
27
26
  rpc SetTrackingNumber(SetTrackingNumberRequest) returns (OrderResponse);
28
27
 
29
-
30
28
  rpc ApplyRecalculation(ApplyRecalculationRequest) returns (OrderResponse);
31
29
 
32
-
33
30
  rpc SetCrmOrderId(SetCrmOrderIdRequest) returns (OrderResponse);
34
-
31
+
35
32
  rpc ConfirmPickup(ConfirmPickupRequest) returns (OrderResponse);
36
33
 
37
34
  rpc ReorderOrder(ReorderOrderRequest) returns (ReorderResponse);
38
35
 
39
36
  rpc ListHistory(ListHistoryRequest) returns (ListHistoryResponse);
40
37
 
41
-
42
38
  rpc AggregateByCustomers(AggregateByCustomersRequest) returns (AggregateByCustomersResponse);
43
39
 
44
40
  rpc GetStats(GetStatsRequest) returns (GetStatsResponse);
@@ -129,9 +125,9 @@ message AggregateByCustomersRequest {
129
125
  message CustomerOrderAggregate {
130
126
  string user_id = 1;
131
127
  int32 orders_count = 2;
132
-
128
+
133
129
  string total_sum = 3;
134
-
130
+
135
131
  optional string last_order_at = 4;
136
132
  }
137
133
 
@@ -139,80 +135,79 @@ message AggregateByCustomersResponse {
139
135
  repeated CustomerOrderAggregate items = 1;
140
136
  }
141
137
 
142
-
143
138
  message OrderItem {
144
- string id = 1;
145
- string product_id = 2;
146
- string variant_id = 3;
147
- string sku = 4;
148
- string name = 5;
149
- string image_url = 6;
150
- int32 quantity = 7;
151
- double price = 8;
139
+ string id = 1;
140
+ string product_id = 2;
141
+ string variant_id = 3;
142
+ string sku = 4;
143
+ string name = 5;
144
+ string image_url = 6;
145
+ int32 quantity = 7;
146
+ double price = 8;
152
147
  double line_discount = 9;
153
- double line_total = 10;
154
- bool in_stock = 11;
155
- string size = 12;
148
+ double line_total = 10;
149
+ bool in_stock = 11;
150
+ string size = 12;
156
151
  }
157
152
 
158
153
  message OrderRecipient {
159
- bool is_different_from_customer = 1;
154
+ bool is_different_from_customer = 1;
160
155
  string first_name = 2;
161
- string last_name = 3;
162
- string phone = 4;
163
- string email = 5;
156
+ string last_name = 3;
157
+ string phone = 4;
158
+ string email = 5;
164
159
  }
165
160
 
166
161
  message OrderDelivery {
167
- string method = 1;
168
- string city_ref = 2;
169
- string city_name = 3;
170
- string warehouse_ref = 4;
171
- string warehouse_name = 5;
172
- string address = 6;
162
+ string method = 1;
163
+ string city_ref = 2;
164
+ string city_name = 3;
165
+ string warehouse_ref = 4;
166
+ string warehouse_name = 5;
167
+ string address = 6;
173
168
  string pickup_point_id = 7;
174
- double shipping_cost = 8;
175
- string ttn = 9;
176
- string tracking_url = 10;
177
- string estimated_date = 11;
169
+ double shipping_cost = 8;
170
+ string ttn = 9;
171
+ string tracking_url = 10;
172
+ string estimated_date = 11;
178
173
  string shipment_status = 12;
179
-
180
- string region = 13;
174
+
175
+ string region = 13;
181
176
  }
182
177
 
183
178
  message OrderPayment {
184
- string provider = 1;
185
- string provider_invoice_id = 2;
186
- string status = 3;
187
- double amount = 4;
188
- string idempotency_key = 5;
189
- string payment_url = 6;
190
- int64 hold_at = 7;
191
- int64 captured_at = 8;
192
- int64 cancelled_at = 9;
193
- int64 refunded_at = 10;
194
-
195
- double captured_amount = 11;
196
- double refunded_amount = 12;
179
+ string provider = 1;
180
+ string provider_invoice_id = 2;
181
+ string status = 3;
182
+ double amount = 4;
183
+ string idempotency_key = 5;
184
+ string payment_url = 6;
185
+ int64 hold_at = 7;
186
+ int64 captured_at = 8;
187
+ int64 cancelled_at = 9;
188
+ int64 refunded_at = 10;
189
+
190
+ double captured_amount = 11;
191
+ double refunded_amount = 12;
197
192
  }
198
193
 
199
194
  message OrderNote {
200
- string id = 1;
201
- string author_id = 2;
195
+ string id = 1;
196
+ string author_id = 2;
202
197
  string author_name = 3;
203
- string text = 4;
204
- int64 created_at = 5;
198
+ string text = 4;
199
+ int64 created_at = 5;
205
200
  }
206
201
 
207
202
  message OrderHistoryEntry {
208
- string id = 1;
209
- string action = 2;
203
+ string id = 1;
204
+ string action = 2;
210
205
  string from_value = 3;
211
- string to_value = 4;
212
- string actor_id = 5;
206
+ string to_value = 4;
207
+ string actor_id = 5;
213
208
  string actor_name = 6;
214
- string payload = 7;
215
- int64 created_at = 8;
209
+ string payload = 7;
210
+ int64 created_at = 8;
216
211
  }
217
212
 
218
213
  message OrderTag {
@@ -220,31 +215,31 @@ message OrderTag {
220
215
  }
221
216
 
222
217
  message OrderCustomerSnapshot {
223
- string user_id = 1;
224
- string guest_id = 2;
218
+ string user_id = 1;
219
+ string guest_id = 2;
225
220
  string first_name = 3;
226
- string last_name = 4;
227
- string phone = 5;
228
- string email = 6;
221
+ string last_name = 4;
222
+ string phone = 5;
223
+ string email = 6;
229
224
  }
230
225
 
231
226
  message OrderTotals {
232
- double items_subtotal = 1;
233
- double promo_discount = 2;
234
- double coupon_discount = 3;
227
+ double items_subtotal = 1;
228
+ double promo_discount = 2;
229
+ double coupon_discount = 3;
235
230
  double certificate_applied = 4;
236
- double bonuses_used = 5;
237
- double bonuses_earned = 6;
238
- double shipping_cost = 7;
239
- double grand_total = 8;
231
+ double bonuses_used = 5;
232
+ double bonuses_earned = 6;
233
+ double shipping_cost = 7;
234
+ double grand_total = 8;
240
235
  }
241
236
 
242
237
  message Order {
243
- string id = 1;
244
- string order_number = 2;
245
- string status = 3;
246
- string source = 4;
247
- int32 version = 5;
238
+ string id = 1;
239
+ string order_number = 2;
240
+ string status = 3;
241
+ string source = 4;
242
+ int32 version = 5;
248
243
 
249
244
  OrderCustomerSnapshot customer = 6;
250
245
  OrderRecipient recipient = 7;
@@ -253,61 +248,57 @@ message Order {
253
248
  OrderPayment payment = 10;
254
249
  OrderTotals totals = 11;
255
250
 
256
- string promo_code = 12;
257
- string certificate_code = 13;
258
- bool do_not_call = 14;
259
- string comment = 15;
260
- string cancel_reason = 16;
251
+ string promo_code = 12;
252
+ string certificate_code = 13;
253
+ bool do_not_call = 14;
254
+ string comment = 15;
255
+ string cancel_reason = 16;
261
256
 
262
- string manager_id = 17;
263
- string manager_name = 18;
264
- repeated string tags = 19;
257
+ string manager_id = 17;
258
+ string manager_name = 18;
259
+ repeated string tags = 19;
265
260
 
266
- int64 created_at = 20;
267
- int64 updated_at = 21;
261
+ int64 created_at = 20;
262
+ int64 updated_at = 21;
268
263
 
269
-
270
264
  repeated OrderNote notes = 22;
271
265
 
272
-
273
- int64 archived_at = 23;
266
+ int64 archived_at = 23;
274
267
 
275
-
276
268
  string cancelled_by = 24;
277
269
 
278
270
  string crm_order_id = 25;
279
-
280
- int64 sale_recorded_at = 26;
281
- }
282
271
 
272
+ int64 sale_recorded_at = 26;
273
+ }
283
274
 
284
275
  message CreateOrderRequest {
285
276
  string idempotency_key = 1;
286
- string user_id = 2;
287
- string guest_id = 3;
288
- string source = 4;
289
- string cart_id = 5;
277
+ string user_id = 2;
278
+ string guest_id = 3;
279
+ string source = 4;
280
+ string cart_id = 5;
290
281
  }
291
282
 
292
283
  message CreateManualOrderRequest {
293
284
  string idempotency_key = 1;
294
- string source = 2;
295
- string created_by_id = 3;
285
+ string source = 2;
286
+ string created_by_id = 3;
296
287
 
297
288
  OrderCustomerSnapshot customer = 4;
298
- OrderRecipient recipient = 5;
289
+ OrderRecipient recipient = 5;
299
290
  repeated OrderItemInput items = 6;
300
291
  OrderDelivery delivery = 7;
301
- OrderPayment payment = 8;
292
+ OrderPayment payment = 8;
302
293
 
303
294
  string promo_code = 9;
304
- string comment = 10;
295
+ string comment = 10;
305
296
  }
306
297
 
307
298
  message OrderItemInput {
308
299
  string product_id = 1;
309
300
  string variant_id = 2;
310
- int32 quantity = 3;
301
+ int32 quantity = 3;
311
302
  double price_override = 4;
312
303
  }
313
304
 
@@ -320,8 +311,8 @@ message GetOrderByNumberRequest {
320
311
  }
321
312
 
322
313
  message ListOrdersRequest {
323
- int32 page = 1;
324
- int32 limit = 2;
314
+ int32 page = 1;
315
+ int32 limit = 2;
325
316
  string status = 3;
326
317
  string source = 4;
327
318
  string manager_id = 5;
@@ -329,94 +320,94 @@ message ListOrdersRequest {
329
320
  string payment_provider = 7;
330
321
  string delivery_method = 8;
331
322
  string sku_query = 9;
332
- int64 date_from = 10;
333
- int64 date_to = 11;
323
+ int64 date_from = 10;
324
+ int64 date_to = 11;
334
325
  double total_from = 12;
335
- double total_to = 13;
326
+ double total_to = 13;
336
327
  string sort_by = 14;
337
328
  string sort_dir = 15;
338
-
339
- int32 archived_filter = 16;
329
+
330
+ int32 archived_filter = 16;
340
331
  }
341
332
 
342
333
  message ListUserOrdersRequest {
343
334
  string user_id = 1;
344
- int32 page = 2;
345
- int32 limit = 3;
346
- string status = 4;
335
+ int32 page = 2;
336
+ int32 limit = 3;
337
+ string status = 4;
347
338
  }
348
339
 
349
340
  message ListOrdersResponse {
350
341
  repeated Order items = 1;
351
- int32 total_items = 2;
352
- int32 total_pages = 3;
353
- int32 current_page = 4;
354
- int32 per_page = 5;
342
+ int32 total_items = 2;
343
+ int32 total_pages = 3;
344
+ int32 current_page = 4;
345
+ int32 per_page = 5;
355
346
  }
356
347
 
357
348
  message UpdateStatusRequest {
358
- string id = 1;
359
- string status = 2;
360
- string reason = 3;
361
- string actor_id = 4;
349
+ string id = 1;
350
+ string status = 2;
351
+ string reason = 3;
352
+ string actor_id = 4;
362
353
  string actor_name = 5;
363
-
354
+
364
355
  string cancelled_by = 6;
365
356
  }
366
357
 
367
358
  message CancelOrderRequest {
368
- string id = 1;
369
- string reason = 2;
370
- string actor_id = 3;
359
+ string id = 1;
360
+ string reason = 2;
361
+ string actor_id = 3;
371
362
  string actor_name = 4;
372
-
363
+
373
364
  string cancelled_by = 5;
374
365
  }
375
366
 
376
367
  message SetCrmOrderIdRequest {
377
- string id = 1;
368
+ string id = 1;
378
369
  string crm_order_id = 2;
379
370
  }
380
371
 
381
372
  message ConfirmPickupRequest {
382
- string id = 1;
383
- string actor_id = 2;
373
+ string id = 1;
374
+ string actor_id = 2;
384
375
  string actor_name = 3;
385
376
  }
386
377
 
387
378
  message ArchiveOrderRequest {
388
- string id = 1;
389
- string actor_id = 2;
379
+ string id = 1;
380
+ string actor_id = 2;
390
381
  string actor_name = 3;
391
382
  }
392
383
 
393
384
  message UnarchiveOrderRequest {
394
- string id = 1;
395
- string actor_id = 2;
385
+ string id = 1;
386
+ string actor_id = 2;
396
387
  string actor_name = 3;
397
388
  }
398
389
 
399
390
  message AssignManagerRequest {
400
- string id = 1;
401
- string manager_id = 2;
391
+ string id = 1;
392
+ string manager_id = 2;
402
393
  string manager_name = 3;
403
- string actor_id = 4;
394
+ string actor_id = 4;
404
395
  }
405
396
 
406
397
  message AddNoteRequest {
407
- string id = 1;
408
- string text = 2;
409
- string author_id = 3;
398
+ string id = 1;
399
+ string text = 2;
400
+ string author_id = 3;
410
401
  string author_name = 4;
411
402
  }
412
403
 
413
404
  message AddTagRequest {
414
- string id = 1;
405
+ string id = 1;
415
406
  string tag = 2;
416
407
  }
417
408
 
418
409
  message RemoveTagRequest {
419
- string id = 1;
410
+ string id = 1;
420
411
  string tag = 2;
421
412
  }
422
413
 
@@ -428,7 +419,7 @@ message EditItemsRequest {
428
419
 
429
420
  message ApplyRecalculationRequest {
430
421
  string id = 1;
431
- string source = 2;
422
+ string source = 2;
432
423
  string actor_id = 3;
433
424
  repeated OrderItemInput items = 4;
434
425
  double promo_discount = 5;
@@ -436,27 +427,27 @@ message ApplyRecalculationRequest {
436
427
  double certificate_applied = 7;
437
428
  double bonuses_used = 8;
438
429
  double shipping_cost = 9;
439
- double grand_total = 10;
430
+ double grand_total = 10;
440
431
  }
441
432
 
442
433
  message SetTrackingNumberRequest {
443
- string id = 1;
434
+ string id = 1;
444
435
  string ttn = 2;
445
436
  string tracking_url = 3;
446
437
  string actor_id = 4;
447
438
  }
448
439
 
449
440
  message ReorderOrderRequest {
450
- string id = 1;
441
+ string id = 1;
451
442
  string user_id = 2;
452
443
  }
453
444
 
454
445
  message ReorderResponse {
455
- bool ok = 1;
456
- string cart_id = 2;
457
- int32 added = 3;
458
- int32 skipped = 4;
459
- string error = 5;
446
+ bool ok = 1;
447
+ string cart_id = 2;
448
+ int32 added = 3;
449
+ int32 skipped = 4;
450
+ string error = 5;
460
451
  }
461
452
 
462
453
  message ListHistoryRequest {
@@ -468,7 +459,7 @@ message ListHistoryResponse {
468
459
  }
469
460
 
470
461
  message OrderResponse {
471
- bool ok = 1;
472
- Order order = 2;
462
+ bool ok = 1;
463
+ Order order = 2;
473
464
  string error_message = 3;
474
465
  }
@@ -4,26 +4,24 @@ package catalog.v1;
4
4
 
5
5
  import "common.proto";
6
6
 
7
-
8
7
  service SizeChartService {
9
- rpc GetSizeCharts (GetSizeChartsRequest) returns (GetSizeChartsResponse);
10
- rpc GetSizeChart (GetSizeChartRequest) returns (SizeChartResponse);
11
- rpc CreateSizeChart (CreateSizeChartRequest) returns (SizeChartResponse);
12
- rpc UpdateSizeChart (UpdateSizeChartRequest) returns (SizeChartResponse);
13
- rpc DeleteSizeChart (DeleteSizeChartRequest) returns (DeleteResponse);
14
-
15
-
16
- rpc BulkAssignSizeChart (BulkAssignSizeChartRequest) returns (SuccessResponse);
17
- rpc BulkRemoveSizeChart (BulkRemoveSizeChartRequest) returns (SuccessResponse);
18
- rpc GetSizeChartAssignments (GetSizeChartRequest) returns (SizeChartAssignmentsResponse);
8
+ rpc GetSizeCharts(GetSizeChartsRequest) returns (GetSizeChartsResponse);
9
+ rpc GetSizeChart(GetSizeChartRequest) returns (SizeChartResponse);
10
+ rpc CreateSizeChart(CreateSizeChartRequest) returns (SizeChartResponse);
11
+ rpc UpdateSizeChart(UpdateSizeChartRequest) returns (SizeChartResponse);
12
+ rpc DeleteSizeChart(DeleteSizeChartRequest) returns (DeleteResponse);
13
+
14
+ rpc BulkAssignSizeChart(BulkAssignSizeChartRequest) returns (SuccessResponse);
15
+ rpc BulkRemoveSizeChart(BulkRemoveSizeChartRequest) returns (SuccessResponse);
16
+ rpc GetSizeChartAssignments(GetSizeChartRequest) returns (SizeChartAssignmentsResponse);
19
17
  }
20
18
 
21
19
  message SizeChartResponse {
22
20
  string id = 1;
23
21
  map<string, string> name = 2;
24
- string content = 3;
25
- string image_url = 4;
26
- string image_id = 5;
22
+ string content = 3;
23
+ string image_url = 4;
24
+ string image_id = 5;
27
25
  }
28
26
 
29
27
  message GetSizeChartsResponse {
@@ -38,16 +36,16 @@ message GetSizeChartRequest {
38
36
  message CreateSizeChartRequest {
39
37
  map<string, string> name = 1;
40
38
  string content = 2;
41
- string image_url = 3;
42
- string image_id = 4;
39
+ string image_url = 3;
40
+ string image_id = 4;
43
41
  }
44
42
 
45
43
  message UpdateSizeChartRequest {
46
44
  string id = 1;
47
45
  map<string, string> name = 2;
48
46
  string content = 3;
49
- string image_url = 4;
50
- string image_id = 5;
47
+ string image_url = 4;
48
+ string image_id = 5;
51
49
  }
52
50
 
53
51
  message DeleteSizeChartRequest {
@@ -78,4 +76,4 @@ message SizeChartAssignmentsResponse {
78
76
  repeated string brand_ids = 1;
79
77
  repeated string category_ids = 2;
80
78
  repeated string product_ids = 3;
81
- }
79
+ }
@@ -2,15 +2,14 @@ syntax = "proto3";
2
2
 
3
3
  package catalog.v1;
4
4
 
5
-
6
5
  service WarehouseService {
7
- rpc UpsertWarehouses (UpsertWarehousesRequest) returns (UpsertWarehousesResponse);
6
+ rpc UpsertWarehouses(UpsertWarehousesRequest) returns (UpsertWarehousesResponse);
8
7
  }
9
8
 
10
9
  message WarehouseSyncItem {
11
10
  string warehouse_guid = 1;
12
11
  string name = 2;
13
-
12
+
14
13
  string code1c = 3;
15
14
  optional string pf_code = 4;
16
15
  optional string address = 5;
@@ -28,9 +27,9 @@ message UpsertWarehousesRequest {
28
27
 
29
28
  message WarehouseUpsertResult {
30
29
  string guid = 1;
31
- string status = 2;
30
+ string status = 2;
32
31
  optional string reason = 3;
33
- optional string id = 4;
32
+ optional string id = 4;
34
33
  }
35
34
 
36
35
  message UpsertWarehousesResponse {
@@ -37,6 +37,7 @@ export interface ValidateAndCalculateResponse {
37
37
  appliedPromotions: AppliedPromotion[];
38
38
  appliedCoupon?: AppliedCoupon | undefined;
39
39
  errorMessage?: string | undefined;
40
+ couponError?: string | undefined;
40
41
  }
41
42
 
42
43
  export interface AppliedPromotion {
package/gen/cart.ts CHANGED
@@ -111,6 +111,7 @@ export interface Cart {
111
111
  totals: CartTotals | undefined;
112
112
  updatedAt: number;
113
113
  expiresAt: number;
114
+ couponError?: string | undefined;
114
115
  }
115
116
 
116
117
  export interface WishlistItem {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mamindom/contracts",
3
3
  "description": "proto",
4
- "version": "1.0.168",
4
+ "version": "1.0.170",
5
5
  "main": "./dist/src/index.js",
6
6
  "types": "./dist/src/index.d.ts",
7
7
  "exports": {