@mamindom/contracts 1.0.73 → 1.0.75

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/gen/product.ts CHANGED
@@ -108,6 +108,8 @@ export interface ProductListItemResponse {
108
108
  videoUrl?: string | undefined;
109
109
  viewed: number;
110
110
  isPopular: boolean;
111
+ groupId?: string | undefined;
112
+ colorHex?: string | undefined;
111
113
  }
112
114
 
113
115
  export interface ProductListItemResponse_NameEntry {
@@ -146,6 +148,10 @@ export interface ProductDetailResponse {
146
148
  barcode?: string | undefined;
147
149
  sizeCharts: ProductSizeChartResponse[];
148
150
  isPopular: boolean;
151
+ groupId?: string | undefined;
152
+ colorLabel: { [key: string]: string };
153
+ colorHex?: string | undefined;
154
+ groupSiblings: ProductGroupMember[];
149
155
  }
150
156
 
151
157
  export interface ProductDetailResponse_NameEntry {
@@ -188,6 +194,11 @@ export interface ProductDetailResponse_MetaKeywordsEntry {
188
194
  value: string;
189
195
  }
190
196
 
197
+ export interface ProductDetailResponse_ColorLabelEntry {
198
+ key: string;
199
+ value: string;
200
+ }
201
+
191
202
  export interface ProductImageResponse {
192
203
  id: string;
193
204
  url: string;
@@ -320,6 +331,9 @@ export interface CreateProductRequest {
320
331
  barcode?: string | undefined;
321
332
  sizeChartIds: string[];
322
333
  videoUrl?: string | undefined;
334
+ groupId?: string | undefined;
335
+ colorLabel: { [key: string]: string };
336
+ colorHex?: string | undefined;
323
337
  }
324
338
 
325
339
  export interface CreateProductRequest_NameEntry {
@@ -347,6 +361,11 @@ export interface CreateProductRequest_MetaDescriptionEntry {
347
361
  value: string;
348
362
  }
349
363
 
364
+ export interface CreateProductRequest_ColorLabelEntry {
365
+ key: string;
366
+ value: string;
367
+ }
368
+
350
369
  export interface UpdateProductRequest {
351
370
  id: string;
352
371
  sku?: string | undefined;
@@ -369,6 +388,9 @@ export interface UpdateProductRequest {
369
388
  sortOrder?: number | undefined;
370
389
  barcode?: string | undefined;
371
390
  videoUrl?: string | undefined;
391
+ groupId?: string | undefined;
392
+ colorLabel: { [key: string]: string };
393
+ colorHex?: string | undefined;
372
394
  }
373
395
 
374
396
  export interface UpdateProductRequest_NameEntry {
@@ -396,6 +418,11 @@ export interface UpdateProductRequest_MetaDescriptionEntry {
396
418
  value: string;
397
419
  }
398
420
 
421
+ export interface UpdateProductRequest_ColorLabelEntry {
422
+ key: string;
423
+ value: string;
424
+ }
425
+
399
426
  export interface DeleteProductRequest {
400
427
  id: string;
401
428
  }
@@ -426,34 +453,6 @@ export interface BulkDeleteProductsRequest {
426
453
  productIds: string[];
427
454
  }
428
455
 
429
- export interface CreateProductVariantRequest {
430
- productId: string;
431
- sku: string;
432
- price?: number | undefined;
433
- stock: number;
434
- options: { [key: string]: string };
435
- barcode?: string | undefined;
436
- }
437
-
438
- export interface CreateProductVariantRequest_OptionsEntry {
439
- key: string;
440
- value: string;
441
- }
442
-
443
- export interface UpdateProductVariantRequest {
444
- id: string;
445
- sku?: string | undefined;
446
- price?: number | undefined;
447
- stock?: number | undefined;
448
- options: { [key: string]: string };
449
- barcode?: string | undefined;
450
- }
451
-
452
- export interface UpdateProductVariantRequest_OptionsEntry {
453
- key: string;
454
- value: string;
455
- }
456
-
457
456
  export interface DeleteProductVariantRequest {
458
457
  id: string;
459
458
  }
@@ -530,6 +529,276 @@ export interface BulkSetPopularRequest {
530
529
  popular: boolean;
531
530
  }
532
531
 
532
+ export interface ProductGroupResponse {
533
+ id: string;
534
+ name: { [key: string]: string };
535
+ products: ProductGroupMember[];
536
+ }
537
+
538
+ export interface ProductGroupResponse_NameEntry {
539
+ key: string;
540
+ value: string;
541
+ }
542
+
543
+ export interface ProductGroupMember {
544
+ productId: string;
545
+ sku: string;
546
+ name: { [key: string]: string };
547
+ mainImage: string;
548
+ colorLabel: { [key: string]: string };
549
+ colorHex: string;
550
+ price: number;
551
+ status: ProductStatus;
552
+ }
553
+
554
+ export interface ProductGroupMember_NameEntry {
555
+ key: string;
556
+ value: string;
557
+ }
558
+
559
+ export interface ProductGroupMember_ColorLabelEntry {
560
+ key: string;
561
+ value: string;
562
+ }
563
+
564
+ export interface CreateProductGroupRequest {
565
+ name: { [key: string]: string };
566
+ productIds: string[];
567
+ }
568
+
569
+ export interface CreateProductGroupRequest_NameEntry {
570
+ key: string;
571
+ value: string;
572
+ }
573
+
574
+ export interface UpdateProductGroupRequest {
575
+ id: string;
576
+ name: { [key: string]: string };
577
+ }
578
+
579
+ export interface UpdateProductGroupRequest_NameEntry {
580
+ key: string;
581
+ value: string;
582
+ }
583
+
584
+ export interface DeleteProductGroupRequest {
585
+ id: string;
586
+ }
587
+
588
+ export interface GetProductGroupRequest {
589
+ id: string;
590
+ }
591
+
592
+ export interface GetProductGroupsRequest {
593
+ pagination: PaginationRequest | undefined;
594
+ }
595
+
596
+ export interface GetProductGroupsResponse {
597
+ items: ProductGroupResponse[];
598
+ meta: PaginationMeta | undefined;
599
+ }
600
+
601
+ export interface AddProductToGroupRequest {
602
+ groupId: string;
603
+ productId: string;
604
+ colorLabel: { [key: string]: string };
605
+ colorHex: string;
606
+ }
607
+
608
+ export interface AddProductToGroupRequest_ColorLabelEntry {
609
+ key: string;
610
+ value: string;
611
+ }
612
+
613
+ export interface RemoveProductFromGroupRequest {
614
+ groupId: string;
615
+ productId: string;
616
+ }
617
+
618
+ export interface ProductVariantDetailResponse {
619
+ id: string;
620
+ productId: string;
621
+ sku: string;
622
+ barcode?: string | undefined;
623
+ sortOrder: number;
624
+ price: number;
625
+ oldPrice?: number | undefined;
626
+ stock: number;
627
+ options: { [key: string]: string };
628
+ name: { [key: string]: string };
629
+ shortDescription: { [key: string]: string };
630
+ description: { [key: string]: string };
631
+ metaTitle: { [key: string]: string };
632
+ metaDescription: { [key: string]: string };
633
+ mainImage: string;
634
+ mainImageId?: string | undefined;
635
+ videoUrl?: string | undefined;
636
+ images: ProductImageResponse[];
637
+ attributes: ProductAttributeResponse[];
638
+ overrides: VariantOverrides | undefined;
639
+ }
640
+
641
+ export interface ProductVariantDetailResponse_OptionsEntry {
642
+ key: string;
643
+ value: string;
644
+ }
645
+
646
+ export interface ProductVariantDetailResponse_NameEntry {
647
+ key: string;
648
+ value: string;
649
+ }
650
+
651
+ export interface ProductVariantDetailResponse_ShortDescriptionEntry {
652
+ key: string;
653
+ value: string;
654
+ }
655
+
656
+ export interface ProductVariantDetailResponse_DescriptionEntry {
657
+ key: string;
658
+ value: string;
659
+ }
660
+
661
+ export interface ProductVariantDetailResponse_MetaTitleEntry {
662
+ key: string;
663
+ value: string;
664
+ }
665
+
666
+ export interface ProductVariantDetailResponse_MetaDescriptionEntry {
667
+ key: string;
668
+ value: string;
669
+ }
670
+
671
+ export interface VariantOverrides {
672
+ hasOwnPrice: boolean;
673
+ hasOwnName: boolean;
674
+ hasOwnDescription: boolean;
675
+ hasOwnShortDescription: boolean;
676
+ hasOwnMetaTitle: boolean;
677
+ hasOwnMetaDescription: boolean;
678
+ hasOwnMainImage: boolean;
679
+ hasOwnImages: boolean;
680
+ hasOwnAttributes: boolean;
681
+ hasOwnVideo: boolean;
682
+ hasOwnOldPrice: boolean;
683
+ }
684
+
685
+ export interface CreateProductVariantRequest {
686
+ productId: string;
687
+ sku: string;
688
+ barcode?: string | undefined;
689
+ sortOrder: number;
690
+ price?: number | undefined;
691
+ oldPrice?: number | undefined;
692
+ stock: number;
693
+ options: { [key: string]: string };
694
+ name: { [key: string]: string };
695
+ shortDescription: { [key: string]: string };
696
+ description: { [key: string]: string };
697
+ metaTitle: { [key: string]: string };
698
+ metaDescription: { [key: string]: string };
699
+ mainImage?: string | undefined;
700
+ mainImageId?: string | undefined;
701
+ videoUrl?: string | undefined;
702
+ images: ProductImagePayload[];
703
+ attributeValueIds: string[];
704
+ }
705
+
706
+ export interface CreateProductVariantRequest_OptionsEntry {
707
+ key: string;
708
+ value: string;
709
+ }
710
+
711
+ export interface CreateProductVariantRequest_NameEntry {
712
+ key: string;
713
+ value: string;
714
+ }
715
+
716
+ export interface CreateProductVariantRequest_ShortDescriptionEntry {
717
+ key: string;
718
+ value: string;
719
+ }
720
+
721
+ export interface CreateProductVariantRequest_DescriptionEntry {
722
+ key: string;
723
+ value: string;
724
+ }
725
+
726
+ export interface CreateProductVariantRequest_MetaTitleEntry {
727
+ key: string;
728
+ value: string;
729
+ }
730
+
731
+ export interface CreateProductVariantRequest_MetaDescriptionEntry {
732
+ key: string;
733
+ value: string;
734
+ }
735
+
736
+ export interface UpdateProductVariantRequest {
737
+ id: string;
738
+ sku?: string | undefined;
739
+ barcode?: string | undefined;
740
+ sortOrder?: number | undefined;
741
+ price?: number | undefined;
742
+ oldPrice?: number | undefined;
743
+ stock?: number | undefined;
744
+ options: { [key: string]: string };
745
+ name: { [key: string]: string };
746
+ shortDescription: { [key: string]: string };
747
+ description: { [key: string]: string };
748
+ metaTitle: { [key: string]: string };
749
+ metaDescription: { [key: string]: string };
750
+ mainImage?: string | undefined;
751
+ mainImageId?: string | undefined;
752
+ videoUrl?: string | undefined;
753
+ images: ProductImagePayload[];
754
+ attributeValueIds: string[];
755
+ clearPrice: boolean;
756
+ clearOldPrice: boolean;
757
+ clearName: boolean;
758
+ clearDescription: boolean;
759
+ clearShortDescription: boolean;
760
+ clearMetaTitle: boolean;
761
+ clearMetaDescription: boolean;
762
+ clearMainImage: boolean;
763
+ clearImages: boolean;
764
+ clearAttributes: boolean;
765
+ clearVideo: boolean;
766
+ }
767
+
768
+ export interface UpdateProductVariantRequest_OptionsEntry {
769
+ key: string;
770
+ value: string;
771
+ }
772
+
773
+ export interface UpdateProductVariantRequest_NameEntry {
774
+ key: string;
775
+ value: string;
776
+ }
777
+
778
+ export interface UpdateProductVariantRequest_ShortDescriptionEntry {
779
+ key: string;
780
+ value: string;
781
+ }
782
+
783
+ export interface UpdateProductVariantRequest_DescriptionEntry {
784
+ key: string;
785
+ value: string;
786
+ }
787
+
788
+ export interface UpdateProductVariantRequest_MetaTitleEntry {
789
+ key: string;
790
+ value: string;
791
+ }
792
+
793
+ export interface UpdateProductVariantRequest_MetaDescriptionEntry {
794
+ key: string;
795
+ value: string;
796
+ }
797
+
798
+ export interface GetProductVariantRequest {
799
+ id: string;
800
+ }
801
+
533
802
  export const CATALOG_V1_PACKAGE_NAME = "catalog.v1";
534
803
 
535
804
  export interface ProductServiceClient {
@@ -561,10 +830,6 @@ export interface ProductServiceClient {
561
830
 
562
831
  getProductSizeCharts(request: GetProductSizeChartsRequest): Observable<GetProductSizeChartsResponse>;
563
832
 
564
- createProductVariant(request: CreateProductVariantRequest): Observable<ProductVariantResponse>;
565
-
566
- updateProductVariant(request: UpdateProductVariantRequest): Observable<ProductVariantResponse>;
567
-
568
833
  deleteProductVariant(request: DeleteProductVariantRequest): Observable<DeleteResponse>;
569
834
 
570
835
  updateProductGlobalOrder(request: UpdateProductGlobalOrderRequest): Observable<SuccessResponse>;
@@ -582,6 +847,26 @@ export interface ProductServiceClient {
582
847
  bulkUpdateSortOrder(request: BulkUpdateSortOrderRequest): Observable<SuccessResponse>;
583
848
 
584
849
  bulkSetPopular(request: BulkSetPopularRequest): Observable<SuccessResponse>;
850
+
851
+ createProductGroup(request: CreateProductGroupRequest): Observable<ProductGroupResponse>;
852
+
853
+ updateProductGroup(request: UpdateProductGroupRequest): Observable<ProductGroupResponse>;
854
+
855
+ deleteProductGroup(request: DeleteProductGroupRequest): Observable<SuccessResponse>;
856
+
857
+ getProductGroup(request: GetProductGroupRequest): Observable<ProductGroupResponse>;
858
+
859
+ getProductGroups(request: GetProductGroupsRequest): Observable<GetProductGroupsResponse>;
860
+
861
+ addProductToGroup(request: AddProductToGroupRequest): Observable<SuccessResponse>;
862
+
863
+ removeProductFromGroup(request: RemoveProductFromGroupRequest): Observable<SuccessResponse>;
864
+
865
+ createProductVariant(request: CreateProductVariantRequest): Observable<ProductVariantDetailResponse>;
866
+
867
+ updateProductVariant(request: UpdateProductVariantRequest): Observable<ProductVariantDetailResponse>;
868
+
869
+ getProductVariant(request: GetProductVariantRequest): Observable<ProductVariantDetailResponse>;
585
870
  }
586
871
 
587
872
  export interface ProductServiceController {
@@ -639,14 +924,6 @@ export interface ProductServiceController {
639
924
  request: GetProductSizeChartsRequest,
640
925
  ): Promise<GetProductSizeChartsResponse> | Observable<GetProductSizeChartsResponse> | GetProductSizeChartsResponse;
641
926
 
642
- createProductVariant(
643
- request: CreateProductVariantRequest,
644
- ): Promise<ProductVariantResponse> | Observable<ProductVariantResponse> | ProductVariantResponse;
645
-
646
- updateProductVariant(
647
- request: UpdateProductVariantRequest,
648
- ): Promise<ProductVariantResponse> | Observable<ProductVariantResponse> | ProductVariantResponse;
649
-
650
927
  deleteProductVariant(
651
928
  request: DeleteProductVariantRequest,
652
929
  ): Promise<DeleteResponse> | Observable<DeleteResponse> | DeleteResponse;
@@ -682,6 +959,46 @@ export interface ProductServiceController {
682
959
  bulkSetPopular(
683
960
  request: BulkSetPopularRequest,
684
961
  ): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
962
+
963
+ createProductGroup(
964
+ request: CreateProductGroupRequest,
965
+ ): Promise<ProductGroupResponse> | Observable<ProductGroupResponse> | ProductGroupResponse;
966
+
967
+ updateProductGroup(
968
+ request: UpdateProductGroupRequest,
969
+ ): Promise<ProductGroupResponse> | Observable<ProductGroupResponse> | ProductGroupResponse;
970
+
971
+ deleteProductGroup(
972
+ request: DeleteProductGroupRequest,
973
+ ): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
974
+
975
+ getProductGroup(
976
+ request: GetProductGroupRequest,
977
+ ): Promise<ProductGroupResponse> | Observable<ProductGroupResponse> | ProductGroupResponse;
978
+
979
+ getProductGroups(
980
+ request: GetProductGroupsRequest,
981
+ ): Promise<GetProductGroupsResponse> | Observable<GetProductGroupsResponse> | GetProductGroupsResponse;
982
+
983
+ addProductToGroup(
984
+ request: AddProductToGroupRequest,
985
+ ): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
986
+
987
+ removeProductFromGroup(
988
+ request: RemoveProductFromGroupRequest,
989
+ ): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
990
+
991
+ createProductVariant(
992
+ request: CreateProductVariantRequest,
993
+ ): Promise<ProductVariantDetailResponse> | Observable<ProductVariantDetailResponse> | ProductVariantDetailResponse;
994
+
995
+ updateProductVariant(
996
+ request: UpdateProductVariantRequest,
997
+ ): Promise<ProductVariantDetailResponse> | Observable<ProductVariantDetailResponse> | ProductVariantDetailResponse;
998
+
999
+ getProductVariant(
1000
+ request: GetProductVariantRequest,
1001
+ ): Promise<ProductVariantDetailResponse> | Observable<ProductVariantDetailResponse> | ProductVariantDetailResponse;
685
1002
  }
686
1003
 
687
1004
  export function ProductServiceControllerMethods() {
@@ -701,8 +1018,6 @@ export function ProductServiceControllerMethods() {
701
1018
  "assignSizeChartsToProduct",
702
1019
  "removeSizeChartFromProduct",
703
1020
  "getProductSizeCharts",
704
- "createProductVariant",
705
- "updateProductVariant",
706
1021
  "deleteProductVariant",
707
1022
  "updateProductGlobalOrder",
708
1023
  "updateProductCategoryOrder",
@@ -712,6 +1027,16 @@ export function ProductServiceControllerMethods() {
712
1027
  "exportProducts",
713
1028
  "bulkUpdateSortOrder",
714
1029
  "bulkSetPopular",
1030
+ "createProductGroup",
1031
+ "updateProductGroup",
1032
+ "deleteProductGroup",
1033
+ "getProductGroup",
1034
+ "getProductGroups",
1035
+ "addProductToGroup",
1036
+ "removeProductFromGroup",
1037
+ "createProductVariant",
1038
+ "updateProductVariant",
1039
+ "getProductVariant",
715
1040
  ];
716
1041
  for (const method of grpcMethods) {
717
1042
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
package/gen/size_chart.ts CHANGED
@@ -69,6 +69,13 @@ export interface BulkAssignSizeChartRequest {
69
69
  brandIds: string[];
70
70
  }
71
71
 
72
+ export interface BulkRemoveSizeChartRequest {
73
+ sizeChartId: string;
74
+ productIds: string[];
75
+ categoryIds: string[];
76
+ brandIds: string[];
77
+ }
78
+
72
79
  export interface GetSizeChartsRequest {
73
80
  pagination: PaginationRequest | undefined;
74
81
  }
@@ -87,6 +94,8 @@ export interface SizeChartServiceClient {
87
94
  deleteSizeChart(request: DeleteSizeChartRequest): Observable<DeleteResponse>;
88
95
 
89
96
  bulkAssignSizeChart(request: BulkAssignSizeChartRequest): Observable<SuccessResponse>;
97
+
98
+ bulkRemoveSizeChart(request: BulkRemoveSizeChartRequest): Observable<SuccessResponse>;
90
99
  }
91
100
 
92
101
  export interface SizeChartServiceController {
@@ -113,6 +122,10 @@ export interface SizeChartServiceController {
113
122
  bulkAssignSizeChart(
114
123
  request: BulkAssignSizeChartRequest,
115
124
  ): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
125
+
126
+ bulkRemoveSizeChart(
127
+ request: BulkRemoveSizeChartRequest,
128
+ ): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
116
129
  }
117
130
 
118
131
  export function SizeChartServiceControllerMethods() {
@@ -124,6 +137,7 @@ export function SizeChartServiceControllerMethods() {
124
137
  "updateSizeChart",
125
138
  "deleteSizeChart",
126
139
  "bulkAssignSizeChart",
140
+ "bulkRemoveSizeChart",
127
141
  ];
128
142
  for (const method of grpcMethods) {
129
143
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mamindom/contracts",
3
3
  "description": "proto",
4
- "version": "1.0.73",
4
+ "version": "1.0.75",
5
5
  "main": "./dist/src/index.js",
6
6
  "types": "./dist/src/index.d.ts",
7
7
  "exports": {