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