@barumetric/contracts 1.4.3 → 1.4.5

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.
@@ -53,6 +53,24 @@ export interface CreateListingResponse {
53
53
  id: string;
54
54
  }
55
55
 
56
+ export interface UpdateListingRequest {
57
+ id: string;
58
+ userId: string;
59
+ title: string;
60
+ description?: string | undefined;
61
+ price?: number | undefined;
62
+ categoryId: string;
63
+ latitude?: number | undefined;
64
+ longitude?: number | undefined;
65
+ videoUrl?: string | undefined;
66
+ status?: string | undefined;
67
+ attributes?: { [key: string]: any } | undefined;
68
+ }
69
+
70
+ export interface UpdateListingResponse {
71
+ id: string;
72
+ }
73
+
56
74
  export interface GetListingRequest {
57
75
  id: string;
58
76
  }
@@ -125,7 +143,7 @@ export interface ListingsServiceClient {
125
143
 
126
144
  createListing(request: CreateListingRequest): Observable<CreateListingResponse>;
127
145
 
128
- updateListing(request: CreateListingRequest): Observable<CreateListingResponse>;
146
+ updateListing(request: UpdateListingRequest): Observable<UpdateListingResponse>;
129
147
 
130
148
  deleteListing(request: DeleteListingRequest): Observable<DeleteListingResponse>;
131
149
  }
@@ -148,8 +166,8 @@ export interface ListingsServiceController {
148
166
  ): Promise<CreateListingResponse> | Observable<CreateListingResponse> | CreateListingResponse;
149
167
 
150
168
  updateListing(
151
- request: CreateListingRequest,
152
- ): Promise<CreateListingResponse> | Observable<CreateListingResponse> | CreateListingResponse;
169
+ request: UpdateListingRequest,
170
+ ): Promise<UpdateListingResponse> | Observable<UpdateListingResponse> | UpdateListingResponse;
153
171
 
154
172
  deleteListing(
155
173
  request: DeleteListingRequest,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barumetric/contracts",
3
- "version": "1.4.3",
3
+ "version": "1.4.5",
4
4
  "description": "Protobuf definitions and generated TypeScript types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -11,7 +11,7 @@ service ListingsService {
11
11
  rpc GetListingsByCategory (GetListingsByCategoryRequest) returns (GetListingsByCategoryResponse);
12
12
 
13
13
  rpc CreateListing (CreateListingRequest) returns (CreateListingResponse);
14
- rpc UpdateListing (CreateListingRequest) returns (CreateListingResponse);
14
+ rpc UpdateListing (UpdateListingRequest) returns (UpdateListingResponse);
15
15
  rpc DeleteListing (DeleteListingRequest) returns (DeleteListingResponse);
16
16
  }
17
17
 
@@ -32,6 +32,24 @@ message CreateListingResponse {
32
32
  string id = 1;
33
33
  }
34
34
 
35
+ message UpdateListingRequest {
36
+ string id = 1;
37
+ string user_id = 2;
38
+ string title = 3;
39
+ optional string description = 4;
40
+ optional float price = 5;
41
+ string category_id = 6;
42
+ optional float latitude = 7;
43
+ optional float longitude = 8;
44
+ optional string video_url = 9;
45
+ optional string status = 10;
46
+ optional google.protobuf.Struct attributes = 11;
47
+ }
48
+
49
+ message UpdateListingResponse {
50
+ string id = 1;
51
+ }
52
+
35
53
  message GetListingRequest {
36
54
  string id = 1;
37
55
  }