@platfformx/proto-contracts 1.2.11 → 1.2.13

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,14 +5,6 @@ export interface CreateProductRequest {
5
5
  categoryId: string;
6
6
  description?: string | undefined;
7
7
  price: string;
8
- quantity: number;
9
- images: string[];
10
- variants: ProductVariant[];
11
- }
12
- export interface ProductVariant {
13
- color?: string | undefined;
14
- size?: string | undefined;
15
- sku: string;
16
8
  }
17
9
  export interface GetProductRequest {
18
10
  productId?: string | undefined;
@@ -29,14 +21,13 @@ export interface GetProductsResponse {
29
21
  export interface UpdateProductRequest {
30
22
  productId: string;
31
23
  title?: string | undefined;
32
- price?: number | undefined;
24
+ price?: string | undefined;
33
25
  description?: string | undefined;
34
- stock?: number | undefined;
35
26
  categoryId?: string | undefined;
36
- images: string[];
37
27
  }
38
28
  export interface DeleteProductRequest {
39
29
  productId: string;
30
+ force?: boolean | undefined;
40
31
  }
41
32
  export interface DeleteProductResponse {
42
33
  success: boolean;
@@ -47,7 +38,7 @@ export interface ProductResponse {
47
38
  title: string;
48
39
  description?: string | undefined;
49
40
  categoryId: string;
50
- price: number;
41
+ price: string;
51
42
  images: string[];
52
43
  status: string;
53
44
  rating: number;
@@ -55,6 +46,12 @@ export interface ProductResponse {
55
46
  createdAt: string;
56
47
  updatedAt: string;
57
48
  }
49
+ /** Shared */
50
+ export interface ProductStock {
51
+ color?: string | undefined;
52
+ size?: string | undefined;
53
+ sku: string;
54
+ }
58
55
  /** IMAGES */
59
56
  export interface AddProductImagesRequest {
60
57
  productId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platfformx/proto-contracts",
3
- "version": "1.2.11",
3
+ "version": "1.2.13",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -24,21 +24,12 @@ message CreateProductRequest{
24
24
  string category_id = 2;
25
25
  optional string description = 3;
26
26
  string price = 4;
27
- int32 quantity = 5;
28
- repeated string images = 6;
29
- repeated ProductVariant variants = 7;
30
27
  }
31
28
 
32
- message ProductVariant {
33
- optional string color = 1;
34
- optional string size = 2;
35
- string sku = 3;
36
- }
37
29
  message GetProductRequest {
38
30
  oneof identifier {
39
31
  string product_id = 1;
40
32
  string slug = 2;
41
-
42
33
  }
43
34
  }
44
35
 
@@ -54,17 +45,14 @@ message GetProductsResponse {
54
45
  message UpdateProductRequest {
55
46
  string product_id = 1;
56
47
  optional string title = 2;
57
- optional double price = 3;
48
+ optional string price = 3;
58
49
  optional string description = 4;
59
- optional int32 stock = 5;
60
50
  optional string category_id = 6;
61
-
62
- repeated string images = 7;
63
-
64
51
  }
65
52
 
66
53
  message DeleteProductRequest {
67
54
  string product_id = 1;
55
+ optional bool force = 2;
68
56
  }
69
57
 
70
58
  message DeleteProductResponse {
@@ -76,16 +64,21 @@ message ProductResponse{
76
64
  string title = 3;
77
65
  optional string description = 4;
78
66
  string category_id = 5;
79
- double price = 6;
80
- repeated string images = 7;
81
- string status = 8;
82
- float rating = 9;
83
- int32 review_count = 10;
84
- string created_at = 11;
85
- string updated_at = 12;
67
+ string price = 6;
68
+ repeated string images = 8;
69
+ string status = 9;
70
+ float rating = 10;
71
+ int32 review_count = 11;
72
+ string created_at = 12;
73
+ string updated_at = 13;
74
+ }
75
+ // Shared
76
+ message ProductStock {
77
+ optional string color = 1;
78
+ optional string size = 2;
79
+ string sku = 3;
86
80
  }
87
81
 
88
-
89
82
  // IMAGES
90
83
  message AddProductImagesRequest {
91
84
  string product_id = 1;