@devline-smart-taxi/common 2.3.26 → 2.3.27
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/dist/dto/create-trip.dto.d.ts +1 -0
- package/dist/dto/create-trip.dto.js +9 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/proto/car-class-proto-path.d.ts +1 -0
- package/dist/proto/car-class-proto-path.js +4 -0
- package/dist/proto/car-class-proto-path.ts +3 -0
- package/dist/proto/car-class.proto +93 -0
- package/dist/proto/matching.proto +1 -0
- package/dist/proto/trip.proto +1 -0
- package/package.json +1 -1
|
@@ -71,6 +71,15 @@ __decorate([
|
|
|
71
71
|
(0, class_validator_1.Max)(180),
|
|
72
72
|
__metadata("design:type", Number)
|
|
73
73
|
], CreateTripDto.prototype, "destinationLongitude", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, swagger_1.ApiProperty)({
|
|
76
|
+
description: 'Car class ID',
|
|
77
|
+
example: '550e8400-e29b-41d4-a716-446655440000',
|
|
78
|
+
}),
|
|
79
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
80
|
+
(0, class_validator_1.IsUUID)(),
|
|
81
|
+
__metadata("design:type", String)
|
|
82
|
+
], CreateTripDto.prototype, "carClassId", void 0);
|
|
74
83
|
__decorate([
|
|
75
84
|
(0, swagger_1.ApiProperty)({
|
|
76
85
|
description: 'Payment method',
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -48,3 +48,4 @@ __exportStar(require("./dto/withdraw-balance.dto"), exports);
|
|
|
48
48
|
__exportStar(require("./dto/get-transactions.dto"), exports);
|
|
49
49
|
__exportStar(require("./proto/balance-proto-path"), exports);
|
|
50
50
|
__exportStar(require("./proto/rating-proto-path"), exports);
|
|
51
|
+
__exportStar(require("./proto/car-class-proto-path"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const carClassProtoPath: string;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package car_class;
|
|
4
|
+
|
|
5
|
+
import "common.proto";
|
|
6
|
+
|
|
7
|
+
// ==========================================
|
|
8
|
+
// 1. SERVICES
|
|
9
|
+
// ==========================================
|
|
10
|
+
service CarClassService {
|
|
11
|
+
rpc CreateCarClass (CreateCarClassRequest) returns (CarClassResponse);
|
|
12
|
+
rpc UpdateCarClass (UpdateCarClassRequest) returns (CarClassResponse);
|
|
13
|
+
rpc DeleteCarClass (common.IdRequest) returns (common.SuccessResponseResult);
|
|
14
|
+
// Public — faqat name qaytadi
|
|
15
|
+
rpc GetAllCarClasses (common.NoParams) returns (CarClassPublicListResponse);
|
|
16
|
+
rpc GetCarClassById (common.IdRequest) returns (CarClassPublicResponse);
|
|
17
|
+
// Admin — to'liq data
|
|
18
|
+
rpc GetAllCarClassesAdmin (common.NoParams) returns (CarClassListResponse);
|
|
19
|
+
rpc GetCarClassByIdAdmin (common.IdRequest) returns (CarClassResponse);
|
|
20
|
+
// Service-to-service — narx olish (ServiceOnly)
|
|
21
|
+
rpc GetCarClassPricing (common.IdRequest) returns (CarClassPricingResponse);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// ==========================================
|
|
25
|
+
// 2. REQUESTS
|
|
26
|
+
// ==========================================
|
|
27
|
+
message CreateCarClassRequest {
|
|
28
|
+
string name = 1;
|
|
29
|
+
string description = 2;
|
|
30
|
+
float basePrice = 3;
|
|
31
|
+
float pricePerKm = 4;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
message UpdateCarClassRequest {
|
|
35
|
+
string id = 1;
|
|
36
|
+
optional string name = 2;
|
|
37
|
+
optional string description = 3;
|
|
38
|
+
optional float basePrice = 4;
|
|
39
|
+
optional float pricePerKm = 5;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// ==========================================
|
|
43
|
+
// 3. RESPONSES
|
|
44
|
+
// ==========================================
|
|
45
|
+
|
|
46
|
+
// Public — faqat id va name
|
|
47
|
+
message CarClassPublicData {
|
|
48
|
+
string id = 1;
|
|
49
|
+
string name = 2;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
message CarClassPublicResponse {
|
|
53
|
+
int32 statusCode = 1;
|
|
54
|
+
string message = 2;
|
|
55
|
+
CarClassPublicData data = 3;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
message CarClassPublicListResponse {
|
|
59
|
+
int32 statusCode = 1;
|
|
60
|
+
string message = 2;
|
|
61
|
+
repeated CarClassPublicData data = 3;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// Admin — to'liq data
|
|
65
|
+
message CarClassData {
|
|
66
|
+
string id = 1;
|
|
67
|
+
string name = 2;
|
|
68
|
+
string description = 3;
|
|
69
|
+
float basePrice = 4;
|
|
70
|
+
float pricePerKm = 5;
|
|
71
|
+
bool isActive = 6;
|
|
72
|
+
string createdAt = 7;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
message CarClassResponse {
|
|
76
|
+
int32 statusCode = 1;
|
|
77
|
+
string message = 2;
|
|
78
|
+
CarClassData data = 3;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
message CarClassListResponse {
|
|
82
|
+
int32 statusCode = 1;
|
|
83
|
+
string message = 2;
|
|
84
|
+
repeated CarClassData data = 3;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// Service-to-service — narx ma'lumotlari
|
|
88
|
+
message CarClassPricingResponse {
|
|
89
|
+
int32 statusCode = 1;
|
|
90
|
+
string message = 2;
|
|
91
|
+
float basePrice = 3;
|
|
92
|
+
float pricePerKm = 4;
|
|
93
|
+
}
|
|
@@ -21,6 +21,7 @@ message SearchNearbyDriversRequest {
|
|
|
21
21
|
double lng = 2; // Longitude (-180 dan 180 gacha)
|
|
22
22
|
optional int32 limit = 3; // Max natijalar soni (default: 10, max: 50)
|
|
23
23
|
optional double radius_km = 4; // Qidiruv radiusi km da (default: 5, max: 100)
|
|
24
|
+
optional string car_class_id = 5; // CarClass bo'yicha filter
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
message NearbyDriver {
|
package/dist/proto/trip.proto
CHANGED