@prodoctors/contracts 1.1.6 → 1.2.0
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.
- package/gen/inventory.ts +1 -0
- package/gen/sales.ts +10 -0
- package/package.json +1 -1
- package/proto/inventory.proto +30 -29
- package/proto/sales.proto +6 -0
package/gen/inventory.ts
CHANGED
package/gen/sales.ts
CHANGED
|
@@ -205,6 +205,11 @@ export interface UpdateSaleOrderRequest {
|
|
|
205
205
|
shiftId?: string | undefined;
|
|
206
206
|
}
|
|
207
207
|
|
|
208
|
+
export interface CancelSaleOrderRequest {
|
|
209
|
+
id: string;
|
|
210
|
+
reason?: string | undefined;
|
|
211
|
+
}
|
|
212
|
+
|
|
208
213
|
export interface ListSaleOrdersRequest {
|
|
209
214
|
pagination: PaginationRequest | undefined;
|
|
210
215
|
branchId?: string | undefined;
|
|
@@ -367,6 +372,8 @@ export interface SaleOrderServiceClient {
|
|
|
367
372
|
|
|
368
373
|
getCashierSalesSummary(request: CashierSalesSummaryRequest): Observable<CashierSalesSummaryResponse>;
|
|
369
374
|
|
|
375
|
+
cancelSaleOrder(request: CancelSaleOrderRequest): Observable<SaleOrder>;
|
|
376
|
+
|
|
370
377
|
deleteSaleOrder(request: IdRequest): Observable<BoolResponse>;
|
|
371
378
|
}
|
|
372
379
|
|
|
@@ -385,6 +392,8 @@ export interface SaleOrderServiceController {
|
|
|
385
392
|
request: CashierSalesSummaryRequest,
|
|
386
393
|
): Promise<CashierSalesSummaryResponse> | Observable<CashierSalesSummaryResponse> | CashierSalesSummaryResponse;
|
|
387
394
|
|
|
395
|
+
cancelSaleOrder(request: CancelSaleOrderRequest): Promise<SaleOrder> | Observable<SaleOrder> | SaleOrder;
|
|
396
|
+
|
|
388
397
|
deleteSaleOrder(request: IdRequest): Promise<BoolResponse> | Observable<BoolResponse> | BoolResponse;
|
|
389
398
|
}
|
|
390
399
|
|
|
@@ -396,6 +405,7 @@ export function SaleOrderServiceControllerMethods() {
|
|
|
396
405
|
"getSaleOrderById",
|
|
397
406
|
"listSaleOrders",
|
|
398
407
|
"getCashierSalesSummary",
|
|
408
|
+
"cancelSaleOrder",
|
|
399
409
|
"deleteSaleOrder",
|
|
400
410
|
];
|
|
401
411
|
for (const method of grpcMethods) {
|
package/package.json
CHANGED
package/proto/inventory.proto
CHANGED
|
@@ -86,12 +86,12 @@ message Product {
|
|
|
86
86
|
google.protobuf.Timestamp updated_at = 22;
|
|
87
87
|
optional string image_url = 23;
|
|
88
88
|
UnitType base_unit = 24;
|
|
89
|
-
UnitType package_unit = 25;
|
|
90
|
-
int32 units_per_package = 26;
|
|
91
|
-
bool allow_fractional_sale = 27;
|
|
92
|
-
optional string tax_mxik_code = 28;
|
|
93
|
-
optional string tax_package_code = 29;
|
|
94
|
-
}
|
|
89
|
+
UnitType package_unit = 25;
|
|
90
|
+
int32 units_per_package = 26;
|
|
91
|
+
bool allow_fractional_sale = 27;
|
|
92
|
+
optional string tax_mxik_code = 28;
|
|
93
|
+
optional string tax_package_code = 29;
|
|
94
|
+
}
|
|
95
95
|
|
|
96
96
|
message ProductBarcode {
|
|
97
97
|
string id = 1;
|
|
@@ -112,18 +112,19 @@ message ProductBatch {
|
|
|
112
112
|
google.protobuf.Timestamp expiry_date = 5;
|
|
113
113
|
optional google.protobuf.Timestamp manufacture_date = 6;
|
|
114
114
|
string purchase_price = 7;
|
|
115
|
-
string selling_price = 8;
|
|
116
|
-
int32 initial_quantity = 9;
|
|
117
|
-
int32 remaining_quantity = 10;
|
|
118
|
-
BatchStatus status = 11;
|
|
119
|
-
optional string purchase_item_id = 12;
|
|
120
|
-
optional Product product = 13;
|
|
115
|
+
string selling_price = 8;
|
|
116
|
+
int32 initial_quantity = 9;
|
|
117
|
+
int32 remaining_quantity = 10;
|
|
118
|
+
BatchStatus status = 11;
|
|
119
|
+
optional string purchase_item_id = 12;
|
|
120
|
+
optional Product product = 13;
|
|
121
121
|
google.protobuf.Timestamp created_at = 14;
|
|
122
122
|
google.protobuf.Timestamp updated_at = 15;
|
|
123
|
-
int32 purchase_package_quantity = 16;
|
|
124
|
-
int32 units_per_package = 17;
|
|
125
|
-
optional string selling_price_per_base_unit = 18;
|
|
126
|
-
|
|
123
|
+
int32 purchase_package_quantity = 16;
|
|
124
|
+
int32 units_per_package = 17;
|
|
125
|
+
optional string selling_price_per_base_unit = 18;
|
|
126
|
+
int32 reserved_quantity = 19;
|
|
127
|
+
}
|
|
127
128
|
|
|
128
129
|
message StockMovement {
|
|
129
130
|
string id = 1;
|
|
@@ -159,12 +160,12 @@ message CreateProductRequest {
|
|
|
159
160
|
optional string cost_price = 15;
|
|
160
161
|
optional string image_url = 16;
|
|
161
162
|
optional UnitType base_unit = 17;
|
|
162
|
-
optional UnitType package_unit = 18;
|
|
163
|
-
optional int32 units_per_package = 19;
|
|
164
|
-
optional bool allow_fractional_sale = 20;
|
|
165
|
-
optional string tax_mxik_code = 21;
|
|
166
|
-
optional string tax_package_code = 22;
|
|
167
|
-
}
|
|
163
|
+
optional UnitType package_unit = 18;
|
|
164
|
+
optional int32 units_per_package = 19;
|
|
165
|
+
optional bool allow_fractional_sale = 20;
|
|
166
|
+
optional string tax_mxik_code = 21;
|
|
167
|
+
optional string tax_package_code = 22;
|
|
168
|
+
}
|
|
168
169
|
|
|
169
170
|
message UpdateProductRequest {
|
|
170
171
|
string id = 1;
|
|
@@ -185,12 +186,12 @@ message UpdateProductRequest {
|
|
|
185
186
|
optional string cost_price = 16;
|
|
186
187
|
optional string image_url = 17;
|
|
187
188
|
optional UnitType base_unit = 18;
|
|
188
|
-
optional UnitType package_unit = 19;
|
|
189
|
-
optional int32 units_per_package = 20;
|
|
190
|
-
optional bool allow_fractional_sale = 21;
|
|
191
|
-
optional string tax_mxik_code = 22;
|
|
192
|
-
optional string tax_package_code = 23;
|
|
193
|
-
}
|
|
189
|
+
optional UnitType package_unit = 19;
|
|
190
|
+
optional int32 units_per_package = 20;
|
|
191
|
+
optional bool allow_fractional_sale = 21;
|
|
192
|
+
optional string tax_mxik_code = 22;
|
|
193
|
+
optional string tax_package_code = 23;
|
|
194
|
+
}
|
|
194
195
|
|
|
195
196
|
message ListProductsRequest {
|
|
196
197
|
common.v1.PaginationRequest pagination = 1;
|
|
@@ -329,4 +330,4 @@ service StockMovementService {
|
|
|
329
330
|
rpc CreateStockMovement(CreateStockMovementRequest) returns (StockMovement);
|
|
330
331
|
rpc GetStockMovementById(common.v1.IdRequest) returns (StockMovement);
|
|
331
332
|
rpc ListStockMovements(ListStockMovementsRequest) returns (ListStockMovementsResponse);
|
|
332
|
-
}
|
|
333
|
+
}
|
package/proto/sales.proto
CHANGED
|
@@ -194,6 +194,11 @@ message UpdateSaleOrderRequest {
|
|
|
194
194
|
optional string shift_id = 16;
|
|
195
195
|
}
|
|
196
196
|
|
|
197
|
+
message CancelSaleOrderRequest {
|
|
198
|
+
string id = 1;
|
|
199
|
+
optional string reason = 2;
|
|
200
|
+
}
|
|
201
|
+
|
|
197
202
|
message ListSaleOrdersRequest {
|
|
198
203
|
common.v1.PaginationRequest pagination = 1;
|
|
199
204
|
optional string branch_id = 2;
|
|
@@ -349,6 +354,7 @@ service SaleOrderService {
|
|
|
349
354
|
rpc GetSaleOrderById(common.v1.IdRequest) returns (SaleOrder);
|
|
350
355
|
rpc ListSaleOrders(ListSaleOrdersRequest) returns (ListSaleOrdersResponse);
|
|
351
356
|
rpc GetCashierSalesSummary(CashierSalesSummaryRequest) returns (CashierSalesSummaryResponse);
|
|
357
|
+
rpc CancelSaleOrder(CancelSaleOrderRequest) returns (SaleOrder);
|
|
352
358
|
rpc DeleteSaleOrder(common.v1.IdRequest) returns (common.v1.BoolResponse);
|
|
353
359
|
}
|
|
354
360
|
|