@prodoctors/contracts 1.1.1 → 1.1.3
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 +6 -0
- package/gen/sales.ts +12 -0
- package/package.json +1 -1
- package/proto/inventory.proto +19 -13
- package/proto/sales.proto +12 -0
package/gen/inventory.ts
CHANGED
|
@@ -101,6 +101,8 @@ export interface Product {
|
|
|
101
101
|
packageUnit: UnitType;
|
|
102
102
|
unitsPerPackage: number;
|
|
103
103
|
allowFractionalSale: boolean;
|
|
104
|
+
taxMxikCode?: string | undefined;
|
|
105
|
+
taxPackageCode?: string | undefined;
|
|
104
106
|
}
|
|
105
107
|
|
|
106
108
|
export interface ProductBarcode {
|
|
@@ -172,6 +174,8 @@ export interface CreateProductRequest {
|
|
|
172
174
|
packageUnit?: UnitType | undefined;
|
|
173
175
|
unitsPerPackage?: number | undefined;
|
|
174
176
|
allowFractionalSale?: boolean | undefined;
|
|
177
|
+
taxMxikCode?: string | undefined;
|
|
178
|
+
taxPackageCode?: string | undefined;
|
|
175
179
|
}
|
|
176
180
|
|
|
177
181
|
export interface UpdateProductRequest {
|
|
@@ -196,6 +200,8 @@ export interface UpdateProductRequest {
|
|
|
196
200
|
packageUnit?: UnitType | undefined;
|
|
197
201
|
unitsPerPackage?: number | undefined;
|
|
198
202
|
allowFractionalSale?: boolean | undefined;
|
|
203
|
+
taxMxikCode?: string | undefined;
|
|
204
|
+
taxPackageCode?: string | undefined;
|
|
199
205
|
}
|
|
200
206
|
|
|
201
207
|
export interface ListProductsRequest {
|
package/gen/sales.ts
CHANGED
|
@@ -80,6 +80,7 @@ export interface SaleOrder {
|
|
|
80
80
|
soldAt: Timestamp | undefined;
|
|
81
81
|
createdAt: Timestamp | undefined;
|
|
82
82
|
updatedAt: Timestamp | undefined;
|
|
83
|
+
shiftId?: string | undefined;
|
|
83
84
|
}
|
|
84
85
|
|
|
85
86
|
export interface SaleReturnItem {
|
|
@@ -112,6 +113,7 @@ export interface SaleReturn {
|
|
|
112
113
|
returnedAt: Timestamp | undefined;
|
|
113
114
|
createdAt: Timestamp | undefined;
|
|
114
115
|
updatedAt: Timestamp | undefined;
|
|
116
|
+
shiftId?: string | undefined;
|
|
115
117
|
}
|
|
116
118
|
|
|
117
119
|
export interface WriteOffItem {
|
|
@@ -141,6 +143,7 @@ export interface WriteOff {
|
|
|
141
143
|
items: WriteOffItem[];
|
|
142
144
|
createdAt: Timestamp | undefined;
|
|
143
145
|
updatedAt: Timestamp | undefined;
|
|
146
|
+
shiftId?: string | undefined;
|
|
144
147
|
}
|
|
145
148
|
|
|
146
149
|
export interface CreateSaleItemInput {
|
|
@@ -170,6 +173,7 @@ export interface CreateSaleOrderRequest {
|
|
|
170
173
|
note?: string | undefined;
|
|
171
174
|
soldAt?: Timestamp | undefined;
|
|
172
175
|
items: CreateSaleItemInput[];
|
|
176
|
+
shiftId?: string | undefined;
|
|
173
177
|
}
|
|
174
178
|
|
|
175
179
|
export interface UpdateSaleOrderRequest {
|
|
@@ -188,6 +192,7 @@ export interface UpdateSaleOrderRequest {
|
|
|
188
192
|
changeAmount?: string | undefined;
|
|
189
193
|
note?: string | undefined;
|
|
190
194
|
soldAt?: Timestamp | undefined;
|
|
195
|
+
shiftId?: string | undefined;
|
|
191
196
|
}
|
|
192
197
|
|
|
193
198
|
export interface ListSaleOrdersRequest {
|
|
@@ -197,6 +202,7 @@ export interface ListSaleOrdersRequest {
|
|
|
197
202
|
customerId?: string | undefined;
|
|
198
203
|
status?: SaleStatus | undefined;
|
|
199
204
|
receiptNumber?: string | undefined;
|
|
205
|
+
shiftId?: string | undefined;
|
|
200
206
|
}
|
|
201
207
|
|
|
202
208
|
export interface ListSaleOrdersResponse {
|
|
@@ -224,6 +230,7 @@ export interface CreateSaleReturnRequest {
|
|
|
224
230
|
reason?: string | undefined;
|
|
225
231
|
returnedAt?: Timestamp | undefined;
|
|
226
232
|
items: CreateSaleReturnItemInput[];
|
|
233
|
+
shiftId?: string | undefined;
|
|
227
234
|
}
|
|
228
235
|
|
|
229
236
|
export interface UpdateSaleReturnRequest {
|
|
@@ -233,6 +240,7 @@ export interface UpdateSaleReturnRequest {
|
|
|
233
240
|
totalAmount?: string | undefined;
|
|
234
241
|
reason?: string | undefined;
|
|
235
242
|
returnedAt?: Timestamp | undefined;
|
|
243
|
+
shiftId?: string | undefined;
|
|
236
244
|
}
|
|
237
245
|
|
|
238
246
|
export interface ListSaleReturnsRequest {
|
|
@@ -241,6 +249,7 @@ export interface ListSaleReturnsRequest {
|
|
|
241
249
|
saleOrderId?: string | undefined;
|
|
242
250
|
customerId?: string | undefined;
|
|
243
251
|
processedById?: string | undefined;
|
|
252
|
+
shiftId?: string | undefined;
|
|
244
253
|
}
|
|
245
254
|
|
|
246
255
|
export interface ListSaleReturnsResponse {
|
|
@@ -266,6 +275,7 @@ export interface CreateWriteOffRequest {
|
|
|
266
275
|
reason: WriteOffReason;
|
|
267
276
|
note?: string | undefined;
|
|
268
277
|
items: CreateWriteOffItemInput[];
|
|
278
|
+
shiftId?: string | undefined;
|
|
269
279
|
}
|
|
270
280
|
|
|
271
281
|
export interface UpdateWriteOffRequest {
|
|
@@ -275,6 +285,7 @@ export interface UpdateWriteOffRequest {
|
|
|
275
285
|
createdById?: string | undefined;
|
|
276
286
|
reason?: WriteOffReason | undefined;
|
|
277
287
|
note?: string | undefined;
|
|
288
|
+
shiftId?: string | undefined;
|
|
278
289
|
}
|
|
279
290
|
|
|
280
291
|
export interface ListWriteOffsRequest {
|
|
@@ -282,6 +293,7 @@ export interface ListWriteOffsRequest {
|
|
|
282
293
|
branchId?: string | undefined;
|
|
283
294
|
createdById?: string | undefined;
|
|
284
295
|
reason?: WriteOffReason | undefined;
|
|
296
|
+
shiftId?: string | undefined;
|
|
285
297
|
}
|
|
286
298
|
|
|
287
299
|
export interface ListWriteOffsResponse {
|
package/package.json
CHANGED
package/proto/inventory.proto
CHANGED
|
@@ -86,10 +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
|
-
|
|
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
|
+
}
|
|
93
95
|
|
|
94
96
|
message ProductBarcode {
|
|
95
97
|
string id = 1;
|
|
@@ -157,10 +159,12 @@ message CreateProductRequest {
|
|
|
157
159
|
optional string cost_price = 15;
|
|
158
160
|
optional string image_url = 16;
|
|
159
161
|
optional UnitType base_unit = 17;
|
|
160
|
-
optional UnitType package_unit = 18;
|
|
161
|
-
optional int32 units_per_package = 19;
|
|
162
|
-
optional bool allow_fractional_sale = 20;
|
|
163
|
-
|
|
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
|
+
}
|
|
164
168
|
|
|
165
169
|
message UpdateProductRequest {
|
|
166
170
|
string id = 1;
|
|
@@ -181,10 +185,12 @@ message UpdateProductRequest {
|
|
|
181
185
|
optional string cost_price = 16;
|
|
182
186
|
optional string image_url = 17;
|
|
183
187
|
optional UnitType base_unit = 18;
|
|
184
|
-
optional UnitType package_unit = 19;
|
|
185
|
-
optional int32 units_per_package = 20;
|
|
186
|
-
optional bool allow_fractional_sale = 21;
|
|
187
|
-
|
|
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
|
+
}
|
|
188
194
|
|
|
189
195
|
message ListProductsRequest {
|
|
190
196
|
common.v1.PaginationRequest pagination = 1;
|
|
@@ -323,4 +329,4 @@ service StockMovementService {
|
|
|
323
329
|
rpc CreateStockMovement(CreateStockMovementRequest) returns (StockMovement);
|
|
324
330
|
rpc GetStockMovementById(common.v1.IdRequest) returns (StockMovement);
|
|
325
331
|
rpc ListStockMovements(ListStockMovementsRequest) returns (ListStockMovementsResponse);
|
|
326
|
-
}
|
|
332
|
+
}
|
package/proto/sales.proto
CHANGED
|
@@ -70,6 +70,7 @@ message SaleOrder {
|
|
|
70
70
|
google.protobuf.Timestamp sold_at = 17;
|
|
71
71
|
google.protobuf.Timestamp created_at = 18;
|
|
72
72
|
google.protobuf.Timestamp updated_at = 19;
|
|
73
|
+
optional string shift_id = 20;
|
|
73
74
|
}
|
|
74
75
|
|
|
75
76
|
message SaleReturnItem {
|
|
@@ -102,6 +103,7 @@ message SaleReturn {
|
|
|
102
103
|
google.protobuf.Timestamp returned_at = 11;
|
|
103
104
|
google.protobuf.Timestamp created_at = 12;
|
|
104
105
|
google.protobuf.Timestamp updated_at = 13;
|
|
106
|
+
optional string shift_id = 14;
|
|
105
107
|
}
|
|
106
108
|
|
|
107
109
|
message WriteOffItem {
|
|
@@ -131,6 +133,7 @@ message WriteOff {
|
|
|
131
133
|
repeated WriteOffItem items = 7;
|
|
132
134
|
google.protobuf.Timestamp created_at = 8;
|
|
133
135
|
google.protobuf.Timestamp updated_at = 9;
|
|
136
|
+
optional string shift_id = 10;
|
|
134
137
|
}
|
|
135
138
|
|
|
136
139
|
message CreateSaleItemInput {
|
|
@@ -160,6 +163,7 @@ message CreateSaleOrderRequest {
|
|
|
160
163
|
optional string note = 13;
|
|
161
164
|
optional google.protobuf.Timestamp sold_at = 14;
|
|
162
165
|
repeated CreateSaleItemInput items = 15;
|
|
166
|
+
optional string shift_id = 16;
|
|
163
167
|
}
|
|
164
168
|
|
|
165
169
|
message UpdateSaleOrderRequest {
|
|
@@ -178,6 +182,7 @@ message UpdateSaleOrderRequest {
|
|
|
178
182
|
optional string change_amount = 13;
|
|
179
183
|
optional string note = 14;
|
|
180
184
|
optional google.protobuf.Timestamp sold_at = 15;
|
|
185
|
+
optional string shift_id = 16;
|
|
181
186
|
}
|
|
182
187
|
|
|
183
188
|
message ListSaleOrdersRequest {
|
|
@@ -187,6 +192,7 @@ message ListSaleOrdersRequest {
|
|
|
187
192
|
optional string customer_id = 4;
|
|
188
193
|
optional SaleStatus status = 5;
|
|
189
194
|
optional string receipt_number = 6;
|
|
195
|
+
optional string shift_id = 7;
|
|
190
196
|
}
|
|
191
197
|
|
|
192
198
|
message ListSaleOrdersResponse {
|
|
@@ -214,6 +220,7 @@ message CreateSaleReturnRequest {
|
|
|
214
220
|
optional string reason = 7;
|
|
215
221
|
optional google.protobuf.Timestamp returned_at = 8;
|
|
216
222
|
repeated CreateSaleReturnItemInput items = 9;
|
|
223
|
+
optional string shift_id = 10;
|
|
217
224
|
}
|
|
218
225
|
|
|
219
226
|
message UpdateSaleReturnRequest {
|
|
@@ -223,6 +230,7 @@ message UpdateSaleReturnRequest {
|
|
|
223
230
|
optional string total_amount = 4;
|
|
224
231
|
optional string reason = 5;
|
|
225
232
|
optional google.protobuf.Timestamp returned_at = 6;
|
|
233
|
+
optional string shift_id = 7;
|
|
226
234
|
}
|
|
227
235
|
|
|
228
236
|
message ListSaleReturnsRequest {
|
|
@@ -231,6 +239,7 @@ message ListSaleReturnsRequest {
|
|
|
231
239
|
optional string sale_order_id = 3;
|
|
232
240
|
optional string customer_id = 4;
|
|
233
241
|
optional string processed_by_id = 5;
|
|
242
|
+
optional string shift_id = 6;
|
|
234
243
|
}
|
|
235
244
|
|
|
236
245
|
message ListSaleReturnsResponse {
|
|
@@ -256,6 +265,7 @@ message CreateWriteOffRequest {
|
|
|
256
265
|
WriteOffReason reason = 4;
|
|
257
266
|
optional string note = 5;
|
|
258
267
|
repeated CreateWriteOffItemInput items = 6;
|
|
268
|
+
optional string shift_id = 7;
|
|
259
269
|
}
|
|
260
270
|
|
|
261
271
|
message UpdateWriteOffRequest {
|
|
@@ -265,6 +275,7 @@ message UpdateWriteOffRequest {
|
|
|
265
275
|
optional string created_by_id = 4;
|
|
266
276
|
optional WriteOffReason reason = 5;
|
|
267
277
|
optional string note = 6;
|
|
278
|
+
optional string shift_id = 7;
|
|
268
279
|
}
|
|
269
280
|
|
|
270
281
|
message ListWriteOffsRequest {
|
|
@@ -272,6 +283,7 @@ message ListWriteOffsRequest {
|
|
|
272
283
|
optional string branch_id = 2;
|
|
273
284
|
optional string created_by_id = 3;
|
|
274
285
|
optional WriteOffReason reason = 4;
|
|
286
|
+
optional string shift_id = 5;
|
|
275
287
|
}
|
|
276
288
|
|
|
277
289
|
message ListWriteOffsResponse {
|