@platfformx/proto-contracts 1.2.8 → 1.2.10
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.
|
@@ -2,11 +2,11 @@ import { Observable } from "rxjs";
|
|
|
2
2
|
export declare const protobufPackage = "product.v1";
|
|
3
3
|
export interface CreateProductRequest {
|
|
4
4
|
title: string;
|
|
5
|
+
categoryId: string;
|
|
5
6
|
description?: string | undefined;
|
|
6
7
|
price: number;
|
|
7
|
-
images: string[];
|
|
8
|
-
categoryId: string;
|
|
9
8
|
quantity: number;
|
|
9
|
+
images: string[];
|
|
10
10
|
variants: ProductVariant[];
|
|
11
11
|
}
|
|
12
12
|
export interface ProductVariant {
|
|
@@ -15,7 +15,8 @@ export interface ProductVariant {
|
|
|
15
15
|
sku: string;
|
|
16
16
|
}
|
|
17
17
|
export interface GetProductRequest {
|
|
18
|
-
productId
|
|
18
|
+
productId?: string | undefined;
|
|
19
|
+
slug?: string | undefined;
|
|
19
20
|
}
|
|
20
21
|
export interface GetProductsRequest {
|
|
21
22
|
categoryId?: string | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platfformx/proto-contracts",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.10",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"scripts": {
|
|
23
23
|
"build": "tsc",
|
|
24
|
-
"generate": "mkdirp src/gen/ts && globstar -- protoc -I=proto proto/**/*.proto --ts_proto_out=./src/gen/ts --ts_proto_opt=nestJs=true,esModuleInterop=true"
|
|
24
|
+
"generate": "mkdirp src/gen/ts && globstar -- protoc -I=proto proto/**/*.proto --ts_proto_out=./src/gen/ts --ts_proto_opt=nestJs=true,esModuleInterop=true,useOptionalProperties=all"
|
|
25
25
|
},
|
|
26
26
|
"keywords": [],
|
|
27
27
|
"author": "",
|
|
@@ -12,21 +12,22 @@ service ProductService {
|
|
|
12
12
|
|
|
13
13
|
message CreateProductRequest{
|
|
14
14
|
string title = 1;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
string category_id = 2;
|
|
16
|
+
optional string description = 3;
|
|
17
|
+
double price = 4;
|
|
18
|
+
int32 quantity = 5;
|
|
19
|
+
repeated string images = 6;
|
|
20
|
+
repeated ProductVariant variants = 7;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
message ProductVariant {
|
|
24
24
|
optional string color = 1;
|
|
25
|
-
optional string size =2;
|
|
25
|
+
optional string size = 2;
|
|
26
26
|
string sku = 3;
|
|
27
27
|
}
|
|
28
28
|
message GetProductRequest {
|
|
29
|
-
string product_id = 1;
|
|
29
|
+
optional string product_id = 1;
|
|
30
|
+
optional string slug = 2;
|
|
30
31
|
}
|
|
31
32
|
|
|
32
33
|
message GetProductsRequest {
|