@mamindom/contracts 1.0.72 → 1.0.74

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.
@@ -5,7 +5,6 @@ package catalog.v1;
5
5
  import "common.proto";
6
6
 
7
7
 
8
-
9
8
  service ProductService {
10
9
 
11
10
  rpc GetProducts (GetProductsRequest) returns (GetProductsResponse);
@@ -31,8 +30,8 @@ service ProductService {
31
30
  rpc GetProductSizeCharts (GetProductSizeChartsRequest) returns (GetProductSizeChartsResponse);
32
31
 
33
32
 
34
- rpc CreateProductVariant (CreateProductVariantRequest) returns (ProductVariantResponse);
35
- rpc UpdateProductVariant (UpdateProductVariantRequest) returns (ProductVariantResponse);
33
+
34
+
36
35
  rpc DeleteProductVariant (DeleteProductVariantRequest) returns (DeleteResponse);
37
36
 
38
37
 
@@ -50,6 +49,20 @@ service ProductService {
50
49
  rpc BulkUpdateSortOrder (BulkUpdateSortOrderRequest) returns (SuccessResponse);
51
50
 
52
51
  rpc BulkSetPopular (BulkSetPopularRequest) returns (SuccessResponse);
52
+
53
+
54
+ rpc CreateProductGroup (CreateProductGroupRequest) returns (ProductGroupResponse);
55
+ rpc UpdateProductGroup (UpdateProductGroupRequest) returns (ProductGroupResponse);
56
+ rpc DeleteProductGroup (DeleteProductGroupRequest) returns (SuccessResponse);
57
+ rpc GetProductGroup (GetProductGroupRequest) returns (ProductGroupResponse);
58
+ rpc GetProductGroups (GetProductGroupsRequest) returns (GetProductGroupsResponse);
59
+ rpc AddProductToGroup (AddProductToGroupRequest) returns (SuccessResponse);
60
+ rpc RemoveProductFromGroup (RemoveProductFromGroupRequest) returns (SuccessResponse);
61
+
62
+
63
+ rpc CreateProductVariant (CreateProductVariantRequest) returns (ProductVariantDetailResponse);
64
+ rpc UpdateProductVariant (UpdateProductVariantRequest) returns (ProductVariantDetailResponse);
65
+ rpc GetProductVariant (GetProductVariantRequest) returns (ProductVariantDetailResponse);
53
66
  }
54
67
 
55
68
 
@@ -113,6 +126,7 @@ message ProductListItemResponse {
113
126
  string id = 1;
114
127
  string sku = 2;
115
128
  string slug = 3;
129
+
116
130
  ProductStatus status = 4;
117
131
 
118
132
  map<string, string> name = 5;
@@ -131,6 +145,9 @@ message ProductListItemResponse {
131
145
  optional string barcode = 14;
132
146
  optional string video_url = 15;
133
147
  int32 viewed = 16;
148
+ bool is_popular = 17;
149
+ optional string group_id = 18;
150
+ optional string color_hex = 19;
134
151
  }
135
152
 
136
153
 
@@ -170,6 +187,11 @@ message ProductDetailResponse {
170
187
  repeated ProductStickerResponse stickers = 27;
171
188
  optional string barcode = 28;
172
189
  repeated ProductSizeChartResponse size_charts = 29;
190
+ bool is_popular = 30;
191
+ optional string group_id = 31;
192
+ map<string, string> color_label = 32;
193
+ optional string color_hex = 33;
194
+ repeated ProductGroupMember group_siblings = 34;
173
195
  }
174
196
 
175
197
 
@@ -286,6 +308,9 @@ message CreateProductRequest {
286
308
  optional string barcode = 21;
287
309
  repeated string size_chart_ids = 22;
288
310
  optional string video_url = 23;
311
+ optional string group_id = 24;
312
+ map<string, string> color_label = 25;
313
+ optional string color_hex = 26;
289
314
  }
290
315
 
291
316
  message UpdateProductRequest {
@@ -316,6 +341,9 @@ message UpdateProductRequest {
316
341
  optional int32 sort_order = 19;
317
342
  optional string barcode = 20;
318
343
  optional string video_url = 21;
344
+ optional string group_id = 22;
345
+ map<string, string> color_label = 23;
346
+ optional string color_hex = 24;
319
347
  }
320
348
 
321
349
  message DeleteProductRequest {
@@ -350,23 +378,7 @@ message BulkDeleteProductsRequest {
350
378
  }
351
379
 
352
380
 
353
- message CreateProductVariantRequest {
354
- string product_id = 1;
355
- string sku = 2;
356
- optional double price = 3;
357
- int32 stock = 4;
358
- map<string, string> options = 5;
359
- optional string barcode = 6;
360
- }
361
381
 
362
- message UpdateProductVariantRequest {
363
- string id = 1;
364
- optional string sku = 2;
365
- optional double price = 3;
366
- optional int32 stock = 4;
367
- map<string, string> options = 5;
368
- optional string barcode = 6;
369
- }
370
382
 
371
383
  message DeleteProductVariantRequest {
372
384
  string id = 1;
@@ -462,4 +474,175 @@ message BulkUpdateSortOrderRequest {
462
474
  message BulkSetPopularRequest {
463
475
  repeated string product_ids = 1;
464
476
  bool popular = 2;
477
+ }
478
+
479
+ message ProductGroupResponse {
480
+ string id = 1;
481
+ map<string, string> name = 2;
482
+ repeated ProductGroupMember products = 3;
483
+ }
484
+
485
+ message ProductGroupMember {
486
+ string product_id = 1;
487
+ string sku = 2;
488
+ map<string, string> name = 3;
489
+ string main_image = 4;
490
+ map<string, string> color_label = 5;
491
+ string color_hex = 6;
492
+ double price = 7;
493
+ ProductStatus status = 8;
494
+ }
495
+
496
+ message CreateProductGroupRequest {
497
+ map<string, string> name = 1;
498
+ repeated string product_ids = 2;
499
+ }
500
+
501
+ message UpdateProductGroupRequest {
502
+ string id = 1;
503
+ map<string, string> name = 2;
504
+ }
505
+
506
+ message DeleteProductGroupRequest {
507
+ string id = 1;
508
+ }
509
+
510
+ message GetProductGroupRequest {
511
+ string id = 1;
512
+ }
513
+
514
+ message GetProductGroupsRequest {
515
+ PaginationRequest pagination = 1;
516
+ }
517
+
518
+ message GetProductGroupsResponse {
519
+ repeated ProductGroupResponse items = 1;
520
+ PaginationMeta meta = 2;
521
+ }
522
+
523
+ message AddProductToGroupRequest {
524
+ string group_id = 1;
525
+ string product_id = 2;
526
+ map<string, string> color_label = 3;
527
+ string color_hex = 4;
528
+ }
529
+
530
+ message RemoveProductFromGroupRequest {
531
+ string group_id = 1;
532
+ string product_id = 2;
533
+ }
534
+
535
+ message ProductVariantDetailResponse {
536
+ string id = 1;
537
+ string product_id = 2;
538
+ string sku = 3;
539
+ optional string barcode = 4;
540
+ int32 sort_order = 5;
541
+
542
+
543
+ double price = 6;
544
+ optional double old_price = 7;
545
+ int32 stock = 8;
546
+
547
+
548
+ map<string, string> options = 9;
549
+
550
+
551
+ map<string, string> name = 10;
552
+ map<string, string> short_description = 11;
553
+ map<string, string> description = 12;
554
+
555
+ map<string, string> meta_title = 13;
556
+ map<string, string> meta_description = 14;
557
+
558
+ string main_image = 15;
559
+ optional string main_image_id = 16;
560
+ optional string video_url = 17;
561
+ repeated ProductImageResponse images = 18;
562
+
563
+ repeated ProductAttributeResponse attributes = 19;
564
+
565
+ VariantOverrides overrides = 20;
566
+ }
567
+
568
+ message VariantOverrides {
569
+ bool has_own_price = 1;
570
+ bool has_own_name = 2;
571
+ bool has_own_description = 3;
572
+ bool has_own_short_description = 4;
573
+ bool has_own_meta_title = 5;
574
+ bool has_own_meta_description = 6;
575
+ bool has_own_main_image = 7;
576
+ bool has_own_images = 8;
577
+ bool has_own_attributes = 9;
578
+ bool has_own_video = 10;
579
+ bool has_own_old_price = 11;
580
+ }
581
+
582
+
583
+ message CreateProductVariantRequest {
584
+ string product_id = 1;
585
+ string sku = 2;
586
+ optional string barcode = 3;
587
+ int32 sort_order = 4;
588
+
589
+ optional double price = 5;
590
+ optional double old_price = 6;
591
+ int32 stock = 7;
592
+
593
+ map<string, string> options = 8;
594
+ map<string, string> name = 9;
595
+ map<string, string> short_description = 10;
596
+ map<string, string> description = 11;
597
+ map<string, string> meta_title = 12;
598
+ map<string, string> meta_description = 13;
599
+
600
+ optional string main_image = 14;
601
+ optional string main_image_id = 15;
602
+ optional string video_url = 16;
603
+ repeated ProductImagePayload images = 17;
604
+ repeated string attribute_value_ids = 18;
605
+ }
606
+
607
+
608
+ message UpdateProductVariantRequest {
609
+ string id = 1;
610
+ optional string sku = 2;
611
+ optional string barcode = 3;
612
+ optional int32 sort_order = 4;
613
+
614
+ optional double price = 5;
615
+ optional double old_price = 6;
616
+ optional int32 stock = 7;
617
+
618
+ map<string, string> options = 8;
619
+
620
+ map<string, string> name = 9;
621
+ map<string, string> short_description = 10;
622
+ map<string, string> description = 11;
623
+ map<string, string> meta_title = 12;
624
+ map<string, string> meta_description = 13;
625
+
626
+ optional string main_image = 14;
627
+ optional string main_image_id = 15;
628
+ optional string video_url = 16;
629
+ repeated ProductImagePayload images = 17;
630
+ repeated string attribute_value_ids = 18;
631
+
632
+
633
+ bool clear_price = 30;
634
+ bool clear_old_price = 31;
635
+ bool clear_name = 32;
636
+ bool clear_description = 33;
637
+ bool clear_short_description = 34;
638
+ bool clear_meta_title = 35;
639
+ bool clear_meta_description = 36;
640
+ bool clear_main_image = 37;
641
+ bool clear_images = 38;
642
+ bool clear_attributes = 39;
643
+ bool clear_video = 40;
644
+ }
645
+
646
+ message GetProductVariantRequest {
647
+ string id = 1;
465
648
  }