@mamindom/contracts 1.0.110 → 1.0.112

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.
@@ -464,8 +464,9 @@ export interface DeleteProductVariantRequest {
464
464
  id: string;
465
465
  }
466
466
  export interface GetRelatedProductsRequest {
467
- productId: string;
467
+ productId?: string | undefined;
468
468
  type?: RelatedProductType | undefined;
469
+ productSlug?: string | undefined;
469
470
  }
470
471
  export interface RelatedProductItem {
471
472
  productId: string;
@@ -22,17 +22,19 @@ export interface GetReviewsRequest {
22
22
  pagination: PaginationRequest | undefined;
23
23
  productId?: string | undefined;
24
24
  status?: ReviewStatus | undefined;
25
+ productSlug?: string | undefined;
25
26
  }
26
27
  export interface GetReviewsResponse {
27
28
  items: ReviewResponse[];
28
29
  meta: PaginationMeta | undefined;
29
30
  }
30
31
  export interface CreateReviewRequest {
31
- productId: string;
32
+ productId?: string | undefined;
32
33
  authorName: string;
33
34
  authorEmail: string;
34
35
  body: string;
35
36
  rating: number;
37
+ productSlug?: string | undefined;
36
38
  }
37
39
  export interface ReviewIdRequest {
38
40
  id: string;
@@ -222,6 +222,7 @@ export interface CartItemDto {
222
222
  quantity: number;
223
223
  variants: CartItemVariant[];
224
224
  snapshot: CartItemSnapshot | undefined;
225
+ snapshotJson: string;
225
226
  }
226
227
  export interface GetCartRequest {
227
228
  userId: string;
@@ -425,8 +425,9 @@ enum RelatedProductType {
425
425
  }
426
426
 
427
427
  message GetRelatedProductsRequest {
428
- string product_id = 1;
429
- optional RelatedProductType type = 2;
428
+ optional string product_id = 1;
429
+ optional RelatedProductType type = 2;
430
+ optional string product_slug = 3;
430
431
  }
431
432
 
432
433
  message RelatedProductItem {
@@ -36,8 +36,9 @@ message ReviewResponse {
36
36
 
37
37
  message GetReviewsRequest {
38
38
  PaginationRequest pagination = 1;
39
- optional string product_id = 2;
40
- optional ReviewStatus status = 3;
39
+ optional string product_id = 2;
40
+ optional ReviewStatus status = 3;
41
+ optional string product_slug = 4;
41
42
  }
42
43
 
43
44
  message GetReviewsResponse {
@@ -47,11 +48,12 @@ message GetReviewsResponse {
47
48
 
48
49
 
49
50
  message CreateReviewRequest {
50
- string product_id = 1;
51
- string author_name = 2;
52
- string author_email = 3;
53
- string body = 4;
54
- int32 rating = 5;
51
+ optional string product_id = 1;
52
+ string author_name = 2;
53
+ string author_email = 3;
54
+ string body = 4;
55
+ int32 rating = 5;
56
+ optional string product_slug = 6;
55
57
  }
56
58
 
57
59
 
@@ -323,6 +323,7 @@ message CartItemDto {
323
323
  int32 quantity = 3;
324
324
  repeated CartItemVariant variants = 4;
325
325
  CartItemSnapshot snapshot = 5;
326
+ string snapshot_json = 6;
326
327
  }
327
328
 
328
329
  message GetCartRequest {
package/gen/product.ts CHANGED
@@ -479,8 +479,9 @@ export interface DeleteProductVariantRequest {
479
479
  }
480
480
 
481
481
  export interface GetRelatedProductsRequest {
482
- productId: string;
482
+ productId?: string | undefined;
483
483
  type?: RelatedProductType | undefined;
484
+ productSlug?: string | undefined;
484
485
  }
485
486
 
486
487
  export interface RelatedProductItem {
@@ -34,6 +34,7 @@ export interface GetReviewsRequest {
34
34
  pagination: PaginationRequest | undefined;
35
35
  productId?: string | undefined;
36
36
  status?: ReviewStatus | undefined;
37
+ productSlug?: string | undefined;
37
38
  }
38
39
 
39
40
  export interface GetReviewsResponse {
@@ -42,11 +43,12 @@ export interface GetReviewsResponse {
42
43
  }
43
44
 
44
45
  export interface CreateReviewRequest {
45
- productId: string;
46
+ productId?: string | undefined;
46
47
  authorName: string;
47
48
  authorEmail: string;
48
49
  body: string;
49
50
  rating: number;
51
+ productSlug?: string | undefined;
50
52
  }
51
53
 
52
54
  export interface ReviewIdRequest {
package/gen/users.ts CHANGED
@@ -280,6 +280,7 @@ export interface CartItemDto {
280
280
  quantity: number;
281
281
  variants: CartItemVariant[];
282
282
  snapshot: CartItemSnapshot | undefined;
283
+ snapshotJson: string;
283
284
  }
284
285
 
285
286
  export interface GetCartRequest {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mamindom/contracts",
3
3
  "description": "proto",
4
- "version": "1.0.110",
4
+ "version": "1.0.112",
5
5
  "main": "./dist/src/index.js",
6
6
  "types": "./dist/src/index.d.ts",
7
7
  "exports": {
@@ -425,8 +425,9 @@ enum RelatedProductType {
425
425
  }
426
426
 
427
427
  message GetRelatedProductsRequest {
428
- string product_id = 1;
429
- optional RelatedProductType type = 2;
428
+ optional string product_id = 1;
429
+ optional RelatedProductType type = 2;
430
+ optional string product_slug = 3;
430
431
  }
431
432
 
432
433
  message RelatedProductItem {
@@ -36,8 +36,9 @@ message ReviewResponse {
36
36
 
37
37
  message GetReviewsRequest {
38
38
  PaginationRequest pagination = 1;
39
- optional string product_id = 2;
40
- optional ReviewStatus status = 3;
39
+ optional string product_id = 2;
40
+ optional ReviewStatus status = 3;
41
+ optional string product_slug = 4;
41
42
  }
42
43
 
43
44
  message GetReviewsResponse {
@@ -47,11 +48,12 @@ message GetReviewsResponse {
47
48
 
48
49
 
49
50
  message CreateReviewRequest {
50
- string product_id = 1;
51
- string author_name = 2;
52
- string author_email = 3;
53
- string body = 4;
54
- int32 rating = 5;
51
+ optional string product_id = 1;
52
+ string author_name = 2;
53
+ string author_email = 3;
54
+ string body = 4;
55
+ int32 rating = 5;
56
+ optional string product_slug = 6;
55
57
  }
56
58
 
57
59
 
package/proto/users.proto CHANGED
@@ -323,6 +323,7 @@ message CartItemDto {
323
323
  int32 quantity = 3;
324
324
  repeated CartItemVariant variants = 4;
325
325
  CartItemSnapshot snapshot = 5;
326
+ string snapshot_json = 6;
326
327
  }
327
328
 
328
329
  message GetCartRequest {