@platfformx/proto-contracts 1.2.8 → 1.2.9

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: string;
18
+ productId?: string | undefined;
19
+ slug?: string | undefined;
19
20
  }
20
21
  export interface GetProductsRequest {
21
22
  categoryId?: string | undefined;
@@ -7,7 +7,7 @@ export interface FilePayload {
7
7
  }
8
8
  export interface UploadFilesRequest {
9
9
  files: FilePayload[];
10
- folder: string;
10
+ folder?: string | undefined;
11
11
  }
12
12
  export interface UploadFilesResponse {
13
13
  urls: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platfformx/proto-contracts",
3
- "version": "1.2.8",
3
+ "version": "1.2.9",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -12,21 +12,22 @@ service ProductService {
12
12
 
13
13
  message CreateProductRequest{
14
14
  string title = 1;
15
- optional string description = 2;
16
- double price = 3;
17
- repeated string images = 4;
18
- string category_id = 5;
19
- int32 quantity = 6;
20
- repeated ProductVariant variants = 7;
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 {
@@ -15,7 +15,7 @@ message FilePayload {
15
15
 
16
16
  message UploadFilesRequest {
17
17
  repeated FilePayload files = 1;
18
- string folder = 2;
18
+ optional string folder = 2;
19
19
  }
20
20
 
21
21
  message UploadFilesResponse {