@devline-smart-taxi/common 2.3.31 → 2.3.33
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/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/proto/bonus-campaign-proto-path.d.ts +1 -0
- package/dist/proto/bonus-campaign-proto-path.js +4 -0
- package/dist/proto/bonus-campaign-proto-path.ts +3 -0
- package/dist/proto/bonus_campaign.proto +97 -0
- package/dist/proto/trip.proto +1 -0
- package/dist/proto/user.proto +7 -0
- package/dist/proto/wallet-proto-path.d.ts +1 -0
- package/dist/proto/wallet-proto-path.js +4 -0
- package/dist/proto/wallet-proto-path.ts +3 -0
- package/dist/proto/wallet.proto +48 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -32,3 +32,5 @@ export * from './dto/get-transactions.dto';
|
|
|
32
32
|
export * from './proto/balance-proto-path';
|
|
33
33
|
export * from './proto/rating-proto-path';
|
|
34
34
|
export * from './proto/car-class-proto-path';
|
|
35
|
+
export * from './proto/wallet-proto-path';
|
|
36
|
+
export * from './proto/bonus-campaign-proto-path';
|
package/dist/index.js
CHANGED
|
@@ -49,3 +49,5 @@ __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
51
|
__exportStar(require("./proto/car-class-proto-path"), exports);
|
|
52
|
+
__exportStar(require("./proto/wallet-proto-path"), exports);
|
|
53
|
+
__exportStar(require("./proto/bonus-campaign-proto-path"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const bonusCampaignProtoPath: string;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package bonus_campaign;
|
|
4
|
+
|
|
5
|
+
import "common.proto";
|
|
6
|
+
|
|
7
|
+
// ==========================================
|
|
8
|
+
// 1. SERVICES
|
|
9
|
+
// ==========================================
|
|
10
|
+
|
|
11
|
+
service BonusCampaignService {
|
|
12
|
+
rpc CreateCampaign (CreateCampaignRequest) returns (CampaignResponse);
|
|
13
|
+
rpc UpdateCampaign (UpdateCampaignRequest) returns (CampaignResponse);
|
|
14
|
+
rpc GetCampaignById (GetCampaignByIdRequest) returns (CampaignResponse);
|
|
15
|
+
rpc GetAllCampaigns (GetAllCampaignsRequest) returns (CampaignListResponse);
|
|
16
|
+
rpc DeleteCampaign (DeleteCampaignRequest) returns (common.SuccessResponseResult);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// ==========================================
|
|
20
|
+
// 2. COMMON MESSAGES
|
|
21
|
+
// ==========================================
|
|
22
|
+
|
|
23
|
+
enum CampaignType {
|
|
24
|
+
CAMPAIGN_TYPE_UNSPECIFIED = 0;
|
|
25
|
+
REFERRAL = 1;
|
|
26
|
+
TRIP_COUNT = 2;
|
|
27
|
+
PROMO_CODE = 3;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
message CampaignData {
|
|
31
|
+
string id = 1;
|
|
32
|
+
string type = 2; // REFERRAL, TRIP_COUNT, PROMO_CODE
|
|
33
|
+
float amount = 3;
|
|
34
|
+
optional string promoCodeString = 4;
|
|
35
|
+
optional string startDate = 5;
|
|
36
|
+
optional string endDate = 6;
|
|
37
|
+
bool isActive = 7;
|
|
38
|
+
string createdAt = 8;
|
|
39
|
+
optional string updatedAt = 9;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// ==========================================
|
|
43
|
+
// 3. REQUESTS
|
|
44
|
+
// ==========================================
|
|
45
|
+
|
|
46
|
+
message CreateCampaignRequest {
|
|
47
|
+
string type = 1;
|
|
48
|
+
float amount = 2;
|
|
49
|
+
optional string promoCodeString = 3;
|
|
50
|
+
optional string startDate = 4;
|
|
51
|
+
optional string endDate = 5;
|
|
52
|
+
bool isActive = 6;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
message UpdateCampaignRequest {
|
|
56
|
+
string id = 1;
|
|
57
|
+
optional string type = 2;
|
|
58
|
+
optional float amount = 3;
|
|
59
|
+
optional string promoCodeString = 4;
|
|
60
|
+
optional string startDate = 5;
|
|
61
|
+
optional string endDate = 6;
|
|
62
|
+
optional bool isActive = 7;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
message GetCampaignByIdRequest {
|
|
66
|
+
string id = 1;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
message GetAllCampaignsRequest {
|
|
70
|
+
int32 page = 1;
|
|
71
|
+
int32 limit = 2;
|
|
72
|
+
optional string type = 3;
|
|
73
|
+
optional bool isActive = 4;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
message DeleteCampaignRequest {
|
|
77
|
+
string id = 1;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// ==========================================
|
|
81
|
+
// 4. RESPONSES
|
|
82
|
+
// ==========================================
|
|
83
|
+
|
|
84
|
+
message CampaignResponse {
|
|
85
|
+
int32 statusCode = 1;
|
|
86
|
+
string message = 2;
|
|
87
|
+
CampaignData data = 3;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
message CampaignListResponse {
|
|
91
|
+
repeated CampaignData data = 1;
|
|
92
|
+
int32 total = 2;
|
|
93
|
+
int32 page = 3;
|
|
94
|
+
int32 limit = 4;
|
|
95
|
+
int32 statusCode = 5;
|
|
96
|
+
string message = 6;
|
|
97
|
+
}
|
package/dist/proto/trip.proto
CHANGED
package/dist/proto/user.proto
CHANGED
|
@@ -21,6 +21,7 @@ service UserService {
|
|
|
21
21
|
rpc RefreshToken (RefreshTokenRequest) returns (TokenResponse);
|
|
22
22
|
rpc BlockUser (Id) returns (common.SuccessResponseResult);
|
|
23
23
|
rpc GetMyProfile (common.NoParams) returns (UserResponse);
|
|
24
|
+
rpc ApplyReferralCode (ApplyReferralCodeRequest) returns (common.SuccessResponseResult);
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
// ==========================================
|
|
@@ -42,6 +43,8 @@ message UserData {
|
|
|
42
43
|
bool hasDataConsent = 12;
|
|
43
44
|
bool isBlocked = 13;
|
|
44
45
|
optional string profilePhotoUrl = 14;
|
|
46
|
+
optional string referralCode = 15;
|
|
47
|
+
optional string referredById = 16;
|
|
45
48
|
}
|
|
46
49
|
|
|
47
50
|
message Id{
|
|
@@ -100,6 +103,10 @@ message RefreshTokenRequest {
|
|
|
100
103
|
string refreshToken = 1;
|
|
101
104
|
}
|
|
102
105
|
|
|
106
|
+
message ApplyReferralCodeRequest {
|
|
107
|
+
string referralCode = 1;
|
|
108
|
+
}
|
|
109
|
+
|
|
103
110
|
// ==========================================
|
|
104
111
|
// 4. RESPONSES
|
|
105
112
|
// ==========================================
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const walletProtoPath: string;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package wallet;
|
|
4
|
+
|
|
5
|
+
import "common.proto";
|
|
6
|
+
|
|
7
|
+
// ==========================================
|
|
8
|
+
// 1. SERVICES
|
|
9
|
+
// ==========================================
|
|
10
|
+
|
|
11
|
+
service WalletService {
|
|
12
|
+
rpc GetMyWallet (GetMyWalletRequest) returns (WalletResponse);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// ==========================================
|
|
16
|
+
// 2. COMMON MESSAGES
|
|
17
|
+
// ==========================================
|
|
18
|
+
|
|
19
|
+
message WalletTransactionData {
|
|
20
|
+
string id = 1;
|
|
21
|
+
float amount = 2;
|
|
22
|
+
string type = 3; // e.g. REFERRAL_BONUS, TRIP_PAYMENT, 5_TRIPS_BONUS
|
|
23
|
+
string description = 4;
|
|
24
|
+
string createdAt = 5;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
message WalletData {
|
|
28
|
+
float balance = 1;
|
|
29
|
+
repeated WalletTransactionData transactions = 2;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// ==========================================
|
|
33
|
+
// 3. REQUESTS
|
|
34
|
+
// ==========================================
|
|
35
|
+
|
|
36
|
+
message GetMyWalletRequest {
|
|
37
|
+
string clientId = 1;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// ==========================================
|
|
41
|
+
// 4. RESPONSES
|
|
42
|
+
// ==========================================
|
|
43
|
+
|
|
44
|
+
message WalletResponse {
|
|
45
|
+
int32 statusCode = 1;
|
|
46
|
+
string message = 2;
|
|
47
|
+
WalletData data = 3;
|
|
48
|
+
}
|