@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.
package/gen/product.ts CHANGED
@@ -107,6 +107,9 @@ export interface ProductListItemResponse {
107
107
  barcode?: string | undefined;
108
108
  videoUrl?: string | undefined;
109
109
  viewed: number;
110
+ isPopular: boolean;
111
+ groupId?: string | undefined;
112
+ colorHex?: string | undefined;
110
113
  }
111
114
 
112
115
  export interface ProductListItemResponse_NameEntry {
@@ -144,6 +147,11 @@ export interface ProductDetailResponse {
144
147
  stickers: ProductStickerResponse[];
145
148
  barcode?: string | undefined;
146
149
  sizeCharts: ProductSizeChartResponse[];
150
+ isPopular: boolean;
151
+ groupId?: string | undefined;
152
+ colorLabel: { [key: string]: string };
153
+ colorHex?: string | undefined;
154
+ groupSiblings: ProductGroupMember[];
147
155
  }
148
156
 
149
157
  export interface ProductDetailResponse_NameEntry {
@@ -186,6 +194,11 @@ export interface ProductDetailResponse_MetaKeywordsEntry {
186
194
  value: string;
187
195
  }
188
196
 
197
+ export interface ProductDetailResponse_ColorLabelEntry {
198
+ key: string;
199
+ value: string;
200
+ }
201
+
189
202
  export interface ProductImageResponse {
190
203
  id: string;
191
204
  url: string;
@@ -318,6 +331,9 @@ export interface CreateProductRequest {
318
331
  barcode?: string | undefined;
319
332
  sizeChartIds: string[];
320
333
  videoUrl?: string | undefined;
334
+ groupId?: string | undefined;
335
+ colorLabel: { [key: string]: string };
336
+ colorHex?: string | undefined;
321
337
  }
322
338
 
323
339
  export interface CreateProductRequest_NameEntry {
@@ -345,6 +361,11 @@ export interface CreateProductRequest_MetaDescriptionEntry {
345
361
  value: string;
346
362
  }
347
363
 
364
+ export interface CreateProductRequest_ColorLabelEntry {
365
+ key: string;
366
+ value: string;
367
+ }
368
+
348
369
  export interface UpdateProductRequest {
349
370
  id: string;
350
371
  sku?: string | undefined;
@@ -367,6 +388,9 @@ export interface UpdateProductRequest {
367
388
  sortOrder?: number | undefined;
368
389
  barcode?: string | undefined;
369
390
  videoUrl?: string | undefined;
391
+ groupId?: string | undefined;
392
+ colorLabel: { [key: string]: string };
393
+ colorHex?: string | undefined;
370
394
  }
371
395
 
372
396
  export interface UpdateProductRequest_NameEntry {
@@ -394,6 +418,11 @@ export interface UpdateProductRequest_MetaDescriptionEntry {
394
418
  value: string;
395
419
  }
396
420
 
421
+ export interface UpdateProductRequest_ColorLabelEntry {
422
+ key: string;
423
+ value: string;
424
+ }
425
+
397
426
  export interface DeleteProductRequest {
398
427
  id: string;
399
428
  }
@@ -424,34 +453,6 @@ export interface BulkDeleteProductsRequest {
424
453
  productIds: string[];
425
454
  }
426
455
 
427
- export interface CreateProductVariantRequest {
428
- productId: string;
429
- sku: string;
430
- price?: number | undefined;
431
- stock: number;
432
- options: { [key: string]: string };
433
- barcode?: string | undefined;
434
- }
435
-
436
- export interface CreateProductVariantRequest_OptionsEntry {
437
- key: string;
438
- value: string;
439
- }
440
-
441
- export interface UpdateProductVariantRequest {
442
- id: string;
443
- sku?: string | undefined;
444
- price?: number | undefined;
445
- stock?: number | undefined;
446
- options: { [key: string]: string };
447
- barcode?: string | undefined;
448
- }
449
-
450
- export interface UpdateProductVariantRequest_OptionsEntry {
451
- key: string;
452
- value: string;
453
- }
454
-
455
456
  export interface DeleteProductVariantRequest {
456
457
  id: string;
457
458
  }
@@ -528,6 +529,276 @@ export interface BulkSetPopularRequest {
528
529
  popular: boolean;
529
530
  }
530
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
+
531
802
  export const CATALOG_V1_PACKAGE_NAME = "catalog.v1";
532
803
 
533
804
  export interface ProductServiceClient {
@@ -559,10 +830,6 @@ export interface ProductServiceClient {
559
830
 
560
831
  getProductSizeCharts(request: GetProductSizeChartsRequest): Observable<GetProductSizeChartsResponse>;
561
832
 
562
- createProductVariant(request: CreateProductVariantRequest): Observable<ProductVariantResponse>;
563
-
564
- updateProductVariant(request: UpdateProductVariantRequest): Observable<ProductVariantResponse>;
565
-
566
833
  deleteProductVariant(request: DeleteProductVariantRequest): Observable<DeleteResponse>;
567
834
 
568
835
  updateProductGlobalOrder(request: UpdateProductGlobalOrderRequest): Observable<SuccessResponse>;
@@ -580,6 +847,26 @@ export interface ProductServiceClient {
580
847
  bulkUpdateSortOrder(request: BulkUpdateSortOrderRequest): Observable<SuccessResponse>;
581
848
 
582
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>;
583
870
  }
584
871
 
585
872
  export interface ProductServiceController {
@@ -637,14 +924,6 @@ export interface ProductServiceController {
637
924
  request: GetProductSizeChartsRequest,
638
925
  ): Promise<GetProductSizeChartsResponse> | Observable<GetProductSizeChartsResponse> | GetProductSizeChartsResponse;
639
926
 
640
- createProductVariant(
641
- request: CreateProductVariantRequest,
642
- ): Promise<ProductVariantResponse> | Observable<ProductVariantResponse> | ProductVariantResponse;
643
-
644
- updateProductVariant(
645
- request: UpdateProductVariantRequest,
646
- ): Promise<ProductVariantResponse> | Observable<ProductVariantResponse> | ProductVariantResponse;
647
-
648
927
  deleteProductVariant(
649
928
  request: DeleteProductVariantRequest,
650
929
  ): Promise<DeleteResponse> | Observable<DeleteResponse> | DeleteResponse;
@@ -680,6 +959,46 @@ export interface ProductServiceController {
680
959
  bulkSetPopular(
681
960
  request: BulkSetPopularRequest,
682
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;
683
1002
  }
684
1003
 
685
1004
  export function ProductServiceControllerMethods() {
@@ -699,8 +1018,6 @@ export function ProductServiceControllerMethods() {
699
1018
  "assignSizeChartsToProduct",
700
1019
  "removeSizeChartFromProduct",
701
1020
  "getProductSizeCharts",
702
- "createProductVariant",
703
- "updateProductVariant",
704
1021
  "deleteProductVariant",
705
1022
  "updateProductGlobalOrder",
706
1023
  "updateProductCategoryOrder",
@@ -710,6 +1027,16 @@ export function ProductServiceControllerMethods() {
710
1027
  "exportProducts",
711
1028
  "bulkUpdateSortOrder",
712
1029
  "bulkSetPopular",
1030
+ "createProductGroup",
1031
+ "updateProductGroup",
1032
+ "deleteProductGroup",
1033
+ "getProductGroup",
1034
+ "getProductGroups",
1035
+ "addProductToGroup",
1036
+ "removeProductFromGroup",
1037
+ "createProductVariant",
1038
+ "updateProductVariant",
1039
+ "getProductVariant",
713
1040
  ];
714
1041
  for (const method of grpcMethods) {
715
1042
  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.72",
4
+ "version": "1.0.74",
5
5
  "main": "./dist/src/index.js",
6
6
  "types": "./dist/src/index.d.ts",
7
7
  "exports": {