@prodoctors/contracts 1.13.0 → 1.14.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/branch.ts +3 -0
- package/package.json +1 -1
- package/proto/branch.proto +3 -0
- package/proto/inventory.proto +344 -344
- package/proto/reservation.proto +207 -207
- package/proto/shift.proto +143 -143
package/proto/reservation.proto
CHANGED
|
@@ -1,207 +1,207 @@
|
|
|
1
|
-
syntax = "proto3";
|
|
2
|
-
|
|
3
|
-
package reservation.v1;
|
|
4
|
-
|
|
5
|
-
import "google/protobuf/timestamp.proto";
|
|
6
|
-
import "common.proto";
|
|
7
|
-
|
|
8
|
-
enum WebReservationStatus {
|
|
9
|
-
WEB_RESERVATION_STATUS_UNSPECIFIED = 0;
|
|
10
|
-
WEB_RESERVATION_STATUS_CREATED = 1;
|
|
11
|
-
WEB_RESERVATION_STATUS_CONFIRMED = 2;
|
|
12
|
-
WEB_RESERVATION_STATUS_READY = 3;
|
|
13
|
-
WEB_RESERVATION_STATUS_COMPLETED = 4;
|
|
14
|
-
WEB_RESERVATION_STATUS_CANCELLED = 5;
|
|
15
|
-
WEB_RESERVATION_STATUS_EXPIRED = 6;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
enum WebOrderStatus {
|
|
19
|
-
WEB_ORDER_STATUS_UNSPECIFIED = 0;
|
|
20
|
-
WEB_ORDER_STATUS_CREATED = 1;
|
|
21
|
-
WEB_ORDER_STATUS_CONFIRMED = 2;
|
|
22
|
-
WEB_ORDER_STATUS_READY = 3;
|
|
23
|
-
WEB_ORDER_STATUS_COMPLETED = 4;
|
|
24
|
-
WEB_ORDER_STATUS_CANCELLED = 5;
|
|
25
|
-
WEB_ORDER_STATUS_EXPIRED = 6;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
message WebReservation {
|
|
29
|
-
string id = 1;
|
|
30
|
-
string reservation_number = 2;
|
|
31
|
-
WebReservationStatus status = 3;
|
|
32
|
-
|
|
33
|
-
string product_id = 4;
|
|
34
|
-
string product_batch_id = 5;
|
|
35
|
-
string branch_id = 6;
|
|
36
|
-
optional string customer_id = 7;
|
|
37
|
-
|
|
38
|
-
optional string order_id = 8;
|
|
39
|
-
|
|
40
|
-
string product_name = 9;
|
|
41
|
-
string pharmacy_name = 10;
|
|
42
|
-
|
|
43
|
-
string customer_name = 11;
|
|
44
|
-
string phone = 12;
|
|
45
|
-
optional string comment = 13;
|
|
46
|
-
optional string city = 14;
|
|
47
|
-
|
|
48
|
-
int32 quantity = 15;
|
|
49
|
-
string unit_price = 16;
|
|
50
|
-
string total_price = 17;
|
|
51
|
-
string source = 18;
|
|
52
|
-
|
|
53
|
-
google.protobuf.Timestamp created_at = 19;
|
|
54
|
-
google.protobuf.Timestamp expires_at = 20;
|
|
55
|
-
google.protobuf.Timestamp updated_at = 21;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
message CreateWebReservationRequest {
|
|
59
|
-
string product_id = 1;
|
|
60
|
-
string product_batch_id = 2;
|
|
61
|
-
string branch_id = 3;
|
|
62
|
-
|
|
63
|
-
optional string order_id = 4;
|
|
64
|
-
|
|
65
|
-
string product_name = 5;
|
|
66
|
-
string pharmacy_name = 6;
|
|
67
|
-
|
|
68
|
-
string customer_name = 7;
|
|
69
|
-
string phone = 8;
|
|
70
|
-
optional string comment = 9;
|
|
71
|
-
optional string city = 10;
|
|
72
|
-
|
|
73
|
-
int32 quantity = 11;
|
|
74
|
-
string unit_price = 12;
|
|
75
|
-
string total_price = 13;
|
|
76
|
-
optional string source = 14;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
message ListWebReservationsRequest {
|
|
80
|
-
common.v1.PaginationRequest pagination = 1;
|
|
81
|
-
optional WebReservationStatus status = 2;
|
|
82
|
-
optional string branch_id = 3;
|
|
83
|
-
optional string phone = 4;
|
|
84
|
-
optional string reservation_number = 5;
|
|
85
|
-
optional string order_id = 6;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
message ListWebReservationsResponse {
|
|
89
|
-
repeated WebReservation items = 1;
|
|
90
|
-
common.v1.PaginationMeta meta = 2;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
message UpdateWebReservationStatusRequest {
|
|
94
|
-
string id = 1;
|
|
95
|
-
WebReservationStatus status = 2;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
message WebOrderItem {
|
|
99
|
-
string id = 1;
|
|
100
|
-
string reservation_id = 2;
|
|
101
|
-
|
|
102
|
-
string product_id = 3;
|
|
103
|
-
string product_batch_id = 4;
|
|
104
|
-
string branch_id = 5;
|
|
105
|
-
|
|
106
|
-
string product_name = 6;
|
|
107
|
-
string pharmacy_name = 7;
|
|
108
|
-
|
|
109
|
-
int32 quantity = 8;
|
|
110
|
-
string unit_price = 9;
|
|
111
|
-
string total_price = 10;
|
|
112
|
-
|
|
113
|
-
WebReservationStatus status = 11;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
message WebOrder {
|
|
117
|
-
string id = 1;
|
|
118
|
-
string order_number = 2;
|
|
119
|
-
WebOrderStatus status = 3;
|
|
120
|
-
|
|
121
|
-
string customer_name = 4;
|
|
122
|
-
string phone = 5;
|
|
123
|
-
optional string comment = 6;
|
|
124
|
-
optional string city = 7;
|
|
125
|
-
|
|
126
|
-
string source = 8;
|
|
127
|
-
int32 total_items = 9;
|
|
128
|
-
string total_price = 10;
|
|
129
|
-
|
|
130
|
-
google.protobuf.Timestamp created_at = 11;
|
|
131
|
-
google.protobuf.Timestamp expires_at = 12;
|
|
132
|
-
google.protobuf.Timestamp updated_at = 13;
|
|
133
|
-
|
|
134
|
-
repeated WebOrderItem items = 14;
|
|
135
|
-
|
|
136
|
-
// Buyurtma bajariladigan dorixona (bitta order = bitta filial).
|
|
137
|
-
optional string branch_id = 15;
|
|
138
|
-
optional string pharmacy_name = 16;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
message GetWebOrderByNumberRequest {
|
|
142
|
-
string order_number = 1;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
message FulfillWebOrderRequest {
|
|
146
|
-
string order_id = 1;
|
|
147
|
-
optional string cashier_id = 2;
|
|
148
|
-
string payment_method = 3; // PaymentMethod (CASH/CARD/...)
|
|
149
|
-
optional string paid_amount = 4;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
message CreateWebOrderItem {
|
|
153
|
-
string product_id = 1;
|
|
154
|
-
string product_batch_id = 2;
|
|
155
|
-
string branch_id = 3;
|
|
156
|
-
|
|
157
|
-
string product_name = 4;
|
|
158
|
-
string pharmacy_name = 5;
|
|
159
|
-
|
|
160
|
-
int32 quantity = 6;
|
|
161
|
-
string unit_price = 7;
|
|
162
|
-
string total_price = 8;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
message CreateWebOrderRequest {
|
|
166
|
-
string customer_name = 1;
|
|
167
|
-
string phone = 2;
|
|
168
|
-
optional string comment = 3;
|
|
169
|
-
optional string city = 4;
|
|
170
|
-
optional string source = 5;
|
|
171
|
-
|
|
172
|
-
repeated CreateWebOrderItem items = 6;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
message ListWebOrdersRequest {
|
|
176
|
-
common.v1.PaginationRequest pagination = 1;
|
|
177
|
-
optional WebOrderStatus status = 2;
|
|
178
|
-
optional string phone = 3;
|
|
179
|
-
optional string order_number = 4;
|
|
180
|
-
optional string branch_id = 5;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
message ListWebOrdersResponse {
|
|
184
|
-
repeated WebOrder items = 1;
|
|
185
|
-
common.v1.PaginationMeta meta = 2;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
message UpdateWebOrderStatusRequest {
|
|
189
|
-
string id = 1;
|
|
190
|
-
WebOrderStatus status = 2;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
service WebReservationService {
|
|
194
|
-
rpc CreateWebReservation(CreateWebReservationRequest) returns (WebReservation);
|
|
195
|
-
rpc GetWebReservation(common.v1.IdRequest) returns (WebReservation);
|
|
196
|
-
rpc ListWebReservations(ListWebReservationsRequest) returns (ListWebReservationsResponse);
|
|
197
|
-
rpc UpdateWebReservationStatus(UpdateWebReservationStatusRequest) returns (WebReservation);
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
service WebOrderService {
|
|
201
|
-
rpc CreateWebOrder(CreateWebOrderRequest) returns (WebOrder);
|
|
202
|
-
rpc GetWebOrder(common.v1.IdRequest) returns (WebOrder);
|
|
203
|
-
rpc GetWebOrderByNumber(GetWebOrderByNumberRequest) returns (WebOrder);
|
|
204
|
-
rpc ListWebOrders(ListWebOrdersRequest) returns (ListWebOrdersResponse);
|
|
205
|
-
rpc UpdateWebOrderStatus(UpdateWebOrderStatusRequest) returns (WebOrder);
|
|
206
|
-
rpc FulfillWebOrder(FulfillWebOrderRequest) returns (WebOrder);
|
|
207
|
-
}
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package reservation.v1;
|
|
4
|
+
|
|
5
|
+
import "google/protobuf/timestamp.proto";
|
|
6
|
+
import "common.proto";
|
|
7
|
+
|
|
8
|
+
enum WebReservationStatus {
|
|
9
|
+
WEB_RESERVATION_STATUS_UNSPECIFIED = 0;
|
|
10
|
+
WEB_RESERVATION_STATUS_CREATED = 1;
|
|
11
|
+
WEB_RESERVATION_STATUS_CONFIRMED = 2;
|
|
12
|
+
WEB_RESERVATION_STATUS_READY = 3;
|
|
13
|
+
WEB_RESERVATION_STATUS_COMPLETED = 4;
|
|
14
|
+
WEB_RESERVATION_STATUS_CANCELLED = 5;
|
|
15
|
+
WEB_RESERVATION_STATUS_EXPIRED = 6;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
enum WebOrderStatus {
|
|
19
|
+
WEB_ORDER_STATUS_UNSPECIFIED = 0;
|
|
20
|
+
WEB_ORDER_STATUS_CREATED = 1;
|
|
21
|
+
WEB_ORDER_STATUS_CONFIRMED = 2;
|
|
22
|
+
WEB_ORDER_STATUS_READY = 3;
|
|
23
|
+
WEB_ORDER_STATUS_COMPLETED = 4;
|
|
24
|
+
WEB_ORDER_STATUS_CANCELLED = 5;
|
|
25
|
+
WEB_ORDER_STATUS_EXPIRED = 6;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
message WebReservation {
|
|
29
|
+
string id = 1;
|
|
30
|
+
string reservation_number = 2;
|
|
31
|
+
WebReservationStatus status = 3;
|
|
32
|
+
|
|
33
|
+
string product_id = 4;
|
|
34
|
+
string product_batch_id = 5;
|
|
35
|
+
string branch_id = 6;
|
|
36
|
+
optional string customer_id = 7;
|
|
37
|
+
|
|
38
|
+
optional string order_id = 8;
|
|
39
|
+
|
|
40
|
+
string product_name = 9;
|
|
41
|
+
string pharmacy_name = 10;
|
|
42
|
+
|
|
43
|
+
string customer_name = 11;
|
|
44
|
+
string phone = 12;
|
|
45
|
+
optional string comment = 13;
|
|
46
|
+
optional string city = 14;
|
|
47
|
+
|
|
48
|
+
int32 quantity = 15;
|
|
49
|
+
string unit_price = 16;
|
|
50
|
+
string total_price = 17;
|
|
51
|
+
string source = 18;
|
|
52
|
+
|
|
53
|
+
google.protobuf.Timestamp created_at = 19;
|
|
54
|
+
google.protobuf.Timestamp expires_at = 20;
|
|
55
|
+
google.protobuf.Timestamp updated_at = 21;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
message CreateWebReservationRequest {
|
|
59
|
+
string product_id = 1;
|
|
60
|
+
string product_batch_id = 2;
|
|
61
|
+
string branch_id = 3;
|
|
62
|
+
|
|
63
|
+
optional string order_id = 4;
|
|
64
|
+
|
|
65
|
+
string product_name = 5;
|
|
66
|
+
string pharmacy_name = 6;
|
|
67
|
+
|
|
68
|
+
string customer_name = 7;
|
|
69
|
+
string phone = 8;
|
|
70
|
+
optional string comment = 9;
|
|
71
|
+
optional string city = 10;
|
|
72
|
+
|
|
73
|
+
int32 quantity = 11;
|
|
74
|
+
string unit_price = 12;
|
|
75
|
+
string total_price = 13;
|
|
76
|
+
optional string source = 14;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
message ListWebReservationsRequest {
|
|
80
|
+
common.v1.PaginationRequest pagination = 1;
|
|
81
|
+
optional WebReservationStatus status = 2;
|
|
82
|
+
optional string branch_id = 3;
|
|
83
|
+
optional string phone = 4;
|
|
84
|
+
optional string reservation_number = 5;
|
|
85
|
+
optional string order_id = 6;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
message ListWebReservationsResponse {
|
|
89
|
+
repeated WebReservation items = 1;
|
|
90
|
+
common.v1.PaginationMeta meta = 2;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
message UpdateWebReservationStatusRequest {
|
|
94
|
+
string id = 1;
|
|
95
|
+
WebReservationStatus status = 2;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
message WebOrderItem {
|
|
99
|
+
string id = 1;
|
|
100
|
+
string reservation_id = 2;
|
|
101
|
+
|
|
102
|
+
string product_id = 3;
|
|
103
|
+
string product_batch_id = 4;
|
|
104
|
+
string branch_id = 5;
|
|
105
|
+
|
|
106
|
+
string product_name = 6;
|
|
107
|
+
string pharmacy_name = 7;
|
|
108
|
+
|
|
109
|
+
int32 quantity = 8;
|
|
110
|
+
string unit_price = 9;
|
|
111
|
+
string total_price = 10;
|
|
112
|
+
|
|
113
|
+
WebReservationStatus status = 11;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
message WebOrder {
|
|
117
|
+
string id = 1;
|
|
118
|
+
string order_number = 2;
|
|
119
|
+
WebOrderStatus status = 3;
|
|
120
|
+
|
|
121
|
+
string customer_name = 4;
|
|
122
|
+
string phone = 5;
|
|
123
|
+
optional string comment = 6;
|
|
124
|
+
optional string city = 7;
|
|
125
|
+
|
|
126
|
+
string source = 8;
|
|
127
|
+
int32 total_items = 9;
|
|
128
|
+
string total_price = 10;
|
|
129
|
+
|
|
130
|
+
google.protobuf.Timestamp created_at = 11;
|
|
131
|
+
google.protobuf.Timestamp expires_at = 12;
|
|
132
|
+
google.protobuf.Timestamp updated_at = 13;
|
|
133
|
+
|
|
134
|
+
repeated WebOrderItem items = 14;
|
|
135
|
+
|
|
136
|
+
// Buyurtma bajariladigan dorixona (bitta order = bitta filial).
|
|
137
|
+
optional string branch_id = 15;
|
|
138
|
+
optional string pharmacy_name = 16;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
message GetWebOrderByNumberRequest {
|
|
142
|
+
string order_number = 1;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
message FulfillWebOrderRequest {
|
|
146
|
+
string order_id = 1;
|
|
147
|
+
optional string cashier_id = 2;
|
|
148
|
+
string payment_method = 3; // PaymentMethod (CASH/CARD/...)
|
|
149
|
+
optional string paid_amount = 4;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
message CreateWebOrderItem {
|
|
153
|
+
string product_id = 1;
|
|
154
|
+
string product_batch_id = 2;
|
|
155
|
+
string branch_id = 3;
|
|
156
|
+
|
|
157
|
+
string product_name = 4;
|
|
158
|
+
string pharmacy_name = 5;
|
|
159
|
+
|
|
160
|
+
int32 quantity = 6;
|
|
161
|
+
string unit_price = 7;
|
|
162
|
+
string total_price = 8;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
message CreateWebOrderRequest {
|
|
166
|
+
string customer_name = 1;
|
|
167
|
+
string phone = 2;
|
|
168
|
+
optional string comment = 3;
|
|
169
|
+
optional string city = 4;
|
|
170
|
+
optional string source = 5;
|
|
171
|
+
|
|
172
|
+
repeated CreateWebOrderItem items = 6;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
message ListWebOrdersRequest {
|
|
176
|
+
common.v1.PaginationRequest pagination = 1;
|
|
177
|
+
optional WebOrderStatus status = 2;
|
|
178
|
+
optional string phone = 3;
|
|
179
|
+
optional string order_number = 4;
|
|
180
|
+
optional string branch_id = 5;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
message ListWebOrdersResponse {
|
|
184
|
+
repeated WebOrder items = 1;
|
|
185
|
+
common.v1.PaginationMeta meta = 2;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
message UpdateWebOrderStatusRequest {
|
|
189
|
+
string id = 1;
|
|
190
|
+
WebOrderStatus status = 2;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
service WebReservationService {
|
|
194
|
+
rpc CreateWebReservation(CreateWebReservationRequest) returns (WebReservation);
|
|
195
|
+
rpc GetWebReservation(common.v1.IdRequest) returns (WebReservation);
|
|
196
|
+
rpc ListWebReservations(ListWebReservationsRequest) returns (ListWebReservationsResponse);
|
|
197
|
+
rpc UpdateWebReservationStatus(UpdateWebReservationStatusRequest) returns (WebReservation);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
service WebOrderService {
|
|
201
|
+
rpc CreateWebOrder(CreateWebOrderRequest) returns (WebOrder);
|
|
202
|
+
rpc GetWebOrder(common.v1.IdRequest) returns (WebOrder);
|
|
203
|
+
rpc GetWebOrderByNumber(GetWebOrderByNumberRequest) returns (WebOrder);
|
|
204
|
+
rpc ListWebOrders(ListWebOrdersRequest) returns (ListWebOrdersResponse);
|
|
205
|
+
rpc UpdateWebOrderStatus(UpdateWebOrderStatusRequest) returns (WebOrder);
|
|
206
|
+
rpc FulfillWebOrder(FulfillWebOrderRequest) returns (WebOrder);
|
|
207
|
+
}
|