@devline-smart-taxi/common 2.3.81 → 2.3.82

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.
@@ -22,6 +22,12 @@ service BranchService {
22
22
  rpc GetMyBranches (common.NoParams) returns (MyBranchResponse);
23
23
  rpc DeleteBranch (common.IdRequest) returns (common.SuccessResponseResult);
24
24
  rpc DeactivateBranch (common.IdRequest) returns (common.SuccessResponseResult);
25
+ rpc GetGlobalCommission (common.NoParams) returns (CommissionResponse);
26
+ rpc UpdateGlobalCommission (UpdateGlobalCommissionRequest) returns (common.SuccessResponseResult);
27
+ rpc GetBranchCommission (common.IdRequest) returns (BranchCommissionResponse);
28
+ rpc UpdateBranchCommission (UpdateBranchCommissionRequest) returns (common.SuccessResponseResult);
29
+ rpc ClearBranchCommission (common.IdRequest) returns (common.SuccessResponseResult);
30
+ rpc GetDriverEffectiveCommission (GetDriverEffectiveCommissionRequest) returns (DriverEffectiveCommissionResponse);
25
31
  }
26
32
 
27
33
  // ==========================================
@@ -36,6 +42,7 @@ message UpdateBranchRequest {
36
42
  string id = 1;
37
43
  optional string name = 2;
38
44
  optional string region = 3;
45
+ optional double driverCommissionRate = 4;
39
46
  }
40
47
 
41
48
  message GetAllBranchesRequest {
@@ -44,6 +51,19 @@ message GetAllBranchesRequest {
44
51
  optional string search = 3;
45
52
  }
46
53
 
54
+ message UpdateGlobalCommissionRequest {
55
+ double driverCommissionRate = 1;
56
+ }
57
+
58
+ message UpdateBranchCommissionRequest {
59
+ string id = 1;
60
+ double driverCommissionRate = 2;
61
+ }
62
+
63
+ message GetDriverEffectiveCommissionRequest {
64
+ string driverId = 1;
65
+ }
66
+
47
67
  // ==========================================
48
68
  // 3. RESPONSE MESSAGES
49
69
  // ==========================================
@@ -75,6 +95,7 @@ message BranchData {
75
95
  string createdAt = 6;
76
96
  optional string updatedAt = 7;
77
97
  repeated string manager_ids = 8;
98
+ optional double driverCommissionRate = 9;
78
99
  }
79
100
 
80
101
  message MyBranchResponse {
@@ -82,3 +103,40 @@ message MyBranchResponse {
82
103
  string message = 2;
83
104
  repeated BranchData data = 3;
84
105
  }
106
+
107
+ message CommissionData {
108
+ double driverCommissionRate = 1;
109
+ }
110
+
111
+ message CommissionResponse {
112
+ int32 statusCode = 1;
113
+ string message = 2;
114
+ CommissionData data = 3;
115
+ }
116
+
117
+ message BranchCommissionData {
118
+ string branchId = 1;
119
+ optional double branchCommissionRate = 2;
120
+ double globalCommissionRate = 3;
121
+ double effectiveCommissionRate = 4;
122
+ }
123
+
124
+ message BranchCommissionResponse {
125
+ int32 statusCode = 1;
126
+ string message = 2;
127
+ BranchCommissionData data = 3;
128
+ }
129
+
130
+ message DriverEffectiveCommissionData {
131
+ string driverId = 1;
132
+ optional string branchId = 2;
133
+ optional double branchCommissionRate = 3;
134
+ double globalCommissionRate = 4;
135
+ double effectiveCommissionRate = 5;
136
+ }
137
+
138
+ message DriverEffectiveCommissionResponse {
139
+ int32 statusCode = 1;
140
+ string message = 2;
141
+ DriverEffectiveCommissionData data = 3;
142
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devline-smart-taxi/common",
3
- "version": "2.3.81",
3
+ "version": "2.3.82",
4
4
  "description": "Reusable NestJS common library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",