@prodoctors/contracts 1.1.2 → 1.1.4

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/sales.ts CHANGED
@@ -23,6 +23,14 @@ export enum SaleStatus {
23
23
  UNRECOGNIZED = -1,
24
24
  }
25
25
 
26
+ export enum SaleSource {
27
+ SALE_SOURCE_UNSPECIFIED = 0,
28
+ SALE_SOURCE_POS = 1,
29
+ SALE_SOURCE_WEB = 2,
30
+ SALE_SOURCE_ADMIN = 3,
31
+ UNRECOGNIZED = -1,
32
+ }
33
+
26
34
  export enum PaymentMethod {
27
35
  PAYMENT_METHOD_UNSPECIFIED = 0,
28
36
  PAYMENT_METHOD_CASH = 1,
@@ -80,6 +88,8 @@ export interface SaleOrder {
80
88
  soldAt: Timestamp | undefined;
81
89
  createdAt: Timestamp | undefined;
82
90
  updatedAt: Timestamp | undefined;
91
+ shiftId?: string | undefined;
92
+ source: SaleSource;
83
93
  }
84
94
 
85
95
  export interface SaleReturnItem {
@@ -112,6 +122,7 @@ export interface SaleReturn {
112
122
  returnedAt: Timestamp | undefined;
113
123
  createdAt: Timestamp | undefined;
114
124
  updatedAt: Timestamp | undefined;
125
+ shiftId?: string | undefined;
115
126
  }
116
127
 
117
128
  export interface WriteOffItem {
@@ -141,6 +152,7 @@ export interface WriteOff {
141
152
  items: WriteOffItem[];
142
153
  createdAt: Timestamp | undefined;
143
154
  updatedAt: Timestamp | undefined;
155
+ shiftId?: string | undefined;
144
156
  }
145
157
 
146
158
  export interface CreateSaleItemInput {
@@ -170,6 +182,8 @@ export interface CreateSaleOrderRequest {
170
182
  note?: string | undefined;
171
183
  soldAt?: Timestamp | undefined;
172
184
  items: CreateSaleItemInput[];
185
+ shiftId?: string | undefined;
186
+ source?: SaleSource | undefined;
173
187
  }
174
188
 
175
189
  export interface UpdateSaleOrderRequest {
@@ -188,6 +202,7 @@ export interface UpdateSaleOrderRequest {
188
202
  changeAmount?: string | undefined;
189
203
  note?: string | undefined;
190
204
  soldAt?: Timestamp | undefined;
205
+ shiftId?: string | undefined;
191
206
  }
192
207
 
193
208
  export interface ListSaleOrdersRequest {
@@ -197,6 +212,8 @@ export interface ListSaleOrdersRequest {
197
212
  customerId?: string | undefined;
198
213
  status?: SaleStatus | undefined;
199
214
  receiptNumber?: string | undefined;
215
+ shiftId?: string | undefined;
216
+ source?: SaleSource | undefined;
200
217
  }
201
218
 
202
219
  export interface ListSaleOrdersResponse {
@@ -224,6 +241,7 @@ export interface CreateSaleReturnRequest {
224
241
  reason?: string | undefined;
225
242
  returnedAt?: Timestamp | undefined;
226
243
  items: CreateSaleReturnItemInput[];
244
+ shiftId?: string | undefined;
227
245
  }
228
246
 
229
247
  export interface UpdateSaleReturnRequest {
@@ -233,6 +251,7 @@ export interface UpdateSaleReturnRequest {
233
251
  totalAmount?: string | undefined;
234
252
  reason?: string | undefined;
235
253
  returnedAt?: Timestamp | undefined;
254
+ shiftId?: string | undefined;
236
255
  }
237
256
 
238
257
  export interface ListSaleReturnsRequest {
@@ -241,6 +260,7 @@ export interface ListSaleReturnsRequest {
241
260
  saleOrderId?: string | undefined;
242
261
  customerId?: string | undefined;
243
262
  processedById?: string | undefined;
263
+ shiftId?: string | undefined;
244
264
  }
245
265
 
246
266
  export interface ListSaleReturnsResponse {
@@ -266,6 +286,7 @@ export interface CreateWriteOffRequest {
266
286
  reason: WriteOffReason;
267
287
  note?: string | undefined;
268
288
  items: CreateWriteOffItemInput[];
289
+ shiftId?: string | undefined;
269
290
  }
270
291
 
271
292
  export interface UpdateWriteOffRequest {
@@ -275,6 +296,7 @@ export interface UpdateWriteOffRequest {
275
296
  createdById?: string | undefined;
276
297
  reason?: WriteOffReason | undefined;
277
298
  note?: string | undefined;
299
+ shiftId?: string | undefined;
278
300
  }
279
301
 
280
302
  export interface ListWriteOffsRequest {
@@ -282,6 +304,7 @@ export interface ListWriteOffsRequest {
282
304
  branchId?: string | undefined;
283
305
  createdById?: string | undefined;
284
306
  reason?: WriteOffReason | undefined;
307
+ shiftId?: string | undefined;
285
308
  }
286
309
 
287
310
  export interface ListWriteOffsResponse {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prodoctors/contracts",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "description": "Protobuf definitions and generated Typescript types for ProDoctors",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
package/proto/sales.proto CHANGED
@@ -15,6 +15,13 @@ enum SaleStatus {
15
15
  SALE_STATUS_REFUNDED = 4;
16
16
  }
17
17
 
18
+ enum SaleSource {
19
+ SALE_SOURCE_UNSPECIFIED = 0;
20
+ SALE_SOURCE_POS = 1;
21
+ SALE_SOURCE_WEB = 2;
22
+ SALE_SOURCE_ADMIN = 3;
23
+ }
24
+
18
25
  enum PaymentMethod {
19
26
  PAYMENT_METHOD_UNSPECIFIED = 0;
20
27
  PAYMENT_METHOD_CASH = 1;
@@ -70,6 +77,8 @@ message SaleOrder {
70
77
  google.protobuf.Timestamp sold_at = 17;
71
78
  google.protobuf.Timestamp created_at = 18;
72
79
  google.protobuf.Timestamp updated_at = 19;
80
+ optional string shift_id = 20;
81
+ SaleSource source = 21;
73
82
  }
74
83
 
75
84
  message SaleReturnItem {
@@ -102,6 +111,7 @@ message SaleReturn {
102
111
  google.protobuf.Timestamp returned_at = 11;
103
112
  google.protobuf.Timestamp created_at = 12;
104
113
  google.protobuf.Timestamp updated_at = 13;
114
+ optional string shift_id = 14;
105
115
  }
106
116
 
107
117
  message WriteOffItem {
@@ -131,6 +141,7 @@ message WriteOff {
131
141
  repeated WriteOffItem items = 7;
132
142
  google.protobuf.Timestamp created_at = 8;
133
143
  google.protobuf.Timestamp updated_at = 9;
144
+ optional string shift_id = 10;
134
145
  }
135
146
 
136
147
  message CreateSaleItemInput {
@@ -160,6 +171,8 @@ message CreateSaleOrderRequest {
160
171
  optional string note = 13;
161
172
  optional google.protobuf.Timestamp sold_at = 14;
162
173
  repeated CreateSaleItemInput items = 15;
174
+ optional string shift_id = 16;
175
+ optional SaleSource source = 17;
163
176
  }
164
177
 
165
178
  message UpdateSaleOrderRequest {
@@ -178,6 +191,7 @@ message UpdateSaleOrderRequest {
178
191
  optional string change_amount = 13;
179
192
  optional string note = 14;
180
193
  optional google.protobuf.Timestamp sold_at = 15;
194
+ optional string shift_id = 16;
181
195
  }
182
196
 
183
197
  message ListSaleOrdersRequest {
@@ -187,6 +201,8 @@ message ListSaleOrdersRequest {
187
201
  optional string customer_id = 4;
188
202
  optional SaleStatus status = 5;
189
203
  optional string receipt_number = 6;
204
+ optional string shift_id = 7;
205
+ optional SaleSource source = 8;
190
206
  }
191
207
 
192
208
  message ListSaleOrdersResponse {
@@ -214,6 +230,7 @@ message CreateSaleReturnRequest {
214
230
  optional string reason = 7;
215
231
  optional google.protobuf.Timestamp returned_at = 8;
216
232
  repeated CreateSaleReturnItemInput items = 9;
233
+ optional string shift_id = 10;
217
234
  }
218
235
 
219
236
  message UpdateSaleReturnRequest {
@@ -223,6 +240,7 @@ message UpdateSaleReturnRequest {
223
240
  optional string total_amount = 4;
224
241
  optional string reason = 5;
225
242
  optional google.protobuf.Timestamp returned_at = 6;
243
+ optional string shift_id = 7;
226
244
  }
227
245
 
228
246
  message ListSaleReturnsRequest {
@@ -231,6 +249,7 @@ message ListSaleReturnsRequest {
231
249
  optional string sale_order_id = 3;
232
250
  optional string customer_id = 4;
233
251
  optional string processed_by_id = 5;
252
+ optional string shift_id = 6;
234
253
  }
235
254
 
236
255
  message ListSaleReturnsResponse {
@@ -256,6 +275,7 @@ message CreateWriteOffRequest {
256
275
  WriteOffReason reason = 4;
257
276
  optional string note = 5;
258
277
  repeated CreateWriteOffItemInput items = 6;
278
+ optional string shift_id = 7;
259
279
  }
260
280
 
261
281
  message UpdateWriteOffRequest {
@@ -265,6 +285,7 @@ message UpdateWriteOffRequest {
265
285
  optional string created_by_id = 4;
266
286
  optional WriteOffReason reason = 5;
267
287
  optional string note = 6;
288
+ optional string shift_id = 7;
268
289
  }
269
290
 
270
291
  message ListWriteOffsRequest {
@@ -272,6 +293,7 @@ message ListWriteOffsRequest {
272
293
  optional string branch_id = 2;
273
294
  optional string created_by_id = 3;
274
295
  optional WriteOffReason reason = 4;
296
+ optional string shift_id = 5;
275
297
  }
276
298
 
277
299
  message ListWriteOffsResponse {