@arbiwallet/contracts 1.0.208 → 1.0.210
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/crm_auth.ts +7 -0
- package/gen/crm_manager.ts +10 -0
- package/gen/exchange_rates.ts +40 -0
- package/package.json +1 -1
- package/proto/crm_auth.proto +7 -0
- package/proto/crm_manager.proto +10 -0
- package/proto/exchange_rates.proto +28 -0
package/gen/crm_auth.ts
CHANGED
|
@@ -55,6 +55,12 @@ export interface CrmGetMeRequest {
|
|
|
55
55
|
accessToken: string;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
+
export interface SectionPermission {
|
|
59
|
+
section: string;
|
|
60
|
+
view: boolean;
|
|
61
|
+
edit: boolean;
|
|
62
|
+
}
|
|
63
|
+
|
|
58
64
|
export interface CrmManagerResponse {
|
|
59
65
|
id: string;
|
|
60
66
|
email: string;
|
|
@@ -68,6 +74,7 @@ export interface CrmManagerResponse {
|
|
|
68
74
|
roles: string[];
|
|
69
75
|
permissions: string[];
|
|
70
76
|
isSuperAdmin: boolean;
|
|
77
|
+
sectionPermissions: SectionPermission[];
|
|
71
78
|
}
|
|
72
79
|
|
|
73
80
|
export interface CrmAuthSessionResponse {
|
package/gen/crm_manager.ts
CHANGED
|
@@ -17,6 +17,12 @@ export enum CrmManagerRecordStatus {
|
|
|
17
17
|
UNRECOGNIZED = -1,
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
export interface SectionPermission {
|
|
21
|
+
section: string;
|
|
22
|
+
view: boolean;
|
|
23
|
+
edit: boolean;
|
|
24
|
+
}
|
|
25
|
+
|
|
20
26
|
export interface ManagerRecord {
|
|
21
27
|
id: string;
|
|
22
28
|
email: string;
|
|
@@ -30,6 +36,7 @@ export interface ManagerRecord {
|
|
|
30
36
|
roles: string[];
|
|
31
37
|
permissions: string[];
|
|
32
38
|
isSuperAdmin: boolean;
|
|
39
|
+
sectionPermissions: SectionPermission[];
|
|
33
40
|
}
|
|
34
41
|
|
|
35
42
|
export interface RoleRecord {
|
|
@@ -62,6 +69,7 @@ export interface CreateManagerRequest {
|
|
|
62
69
|
avatarUrl: string;
|
|
63
70
|
status: CrmManagerRecordStatus;
|
|
64
71
|
roleNames: string[];
|
|
72
|
+
sectionPermissions: SectionPermission[];
|
|
65
73
|
}
|
|
66
74
|
|
|
67
75
|
export interface CreateManagerResponse {
|
|
@@ -81,6 +89,8 @@ export interface UpdateManagerRequest {
|
|
|
81
89
|
status: CrmManagerRecordStatus;
|
|
82
90
|
replaceRoles: boolean;
|
|
83
91
|
roleNames: string[];
|
|
92
|
+
sectionPermissions: SectionPermission[];
|
|
93
|
+
replaceSectionPermissions: boolean;
|
|
84
94
|
}
|
|
85
95
|
|
|
86
96
|
export interface UpdateManagerResponse {
|
package/gen/exchange_rates.ts
CHANGED
|
@@ -63,6 +63,32 @@ export interface GetExchangeRatesResponse {
|
|
|
63
63
|
result?: string | undefined;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
+
export interface MarketRate {
|
|
67
|
+
id: string;
|
|
68
|
+
updatedAt: string;
|
|
69
|
+
inputCurrency: string;
|
|
70
|
+
outputCurrency: string;
|
|
71
|
+
rate: number;
|
|
72
|
+
market?: string | undefined;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface GetMarketRatesRequest {
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface GetMarketRatesResponse {
|
|
79
|
+
exist: boolean;
|
|
80
|
+
rates: MarketRate[];
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export interface GetMarketRateRequest {
|
|
84
|
+
id: string;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export interface GetMarketRateResponse {
|
|
88
|
+
exist: boolean;
|
|
89
|
+
rate?: MarketRate | undefined;
|
|
90
|
+
}
|
|
91
|
+
|
|
66
92
|
export interface PrimeRate {
|
|
67
93
|
id: string;
|
|
68
94
|
inputCurrencyId: string;
|
|
@@ -324,6 +350,10 @@ export interface ExchangeRatesServiceClient {
|
|
|
324
350
|
|
|
325
351
|
getExchangeRates(request: GetExchangeRatesRequest): Observable<GetExchangeRatesResponse>;
|
|
326
352
|
|
|
353
|
+
getMarketRates(request: GetMarketRatesRequest): Observable<GetMarketRatesResponse>;
|
|
354
|
+
|
|
355
|
+
getMarketRate(request: GetMarketRateRequest): Observable<GetMarketRateResponse>;
|
|
356
|
+
|
|
327
357
|
getCustomRates(request: GetCustomRatesRequest): Observable<GetCustomRatesResponse>;
|
|
328
358
|
|
|
329
359
|
updateCustomRate(request: UpdateCustomRateRequest): Observable<UpdateCustomRateResponse>;
|
|
@@ -374,6 +404,14 @@ export interface ExchangeRatesServiceController {
|
|
|
374
404
|
request: GetExchangeRatesRequest,
|
|
375
405
|
): Promise<GetExchangeRatesResponse> | Observable<GetExchangeRatesResponse> | GetExchangeRatesResponse;
|
|
376
406
|
|
|
407
|
+
getMarketRates(
|
|
408
|
+
request: GetMarketRatesRequest,
|
|
409
|
+
): Promise<GetMarketRatesResponse> | Observable<GetMarketRatesResponse> | GetMarketRatesResponse;
|
|
410
|
+
|
|
411
|
+
getMarketRate(
|
|
412
|
+
request: GetMarketRateRequest,
|
|
413
|
+
): Promise<GetMarketRateResponse> | Observable<GetMarketRateResponse> | GetMarketRateResponse;
|
|
414
|
+
|
|
377
415
|
getCustomRates(
|
|
378
416
|
request: GetCustomRatesRequest,
|
|
379
417
|
): Promise<GetCustomRatesResponse> | Observable<GetCustomRatesResponse> | GetCustomRatesResponse;
|
|
@@ -420,6 +458,8 @@ export function ExchangeRatesServiceControllerMethods() {
|
|
|
420
458
|
"updatePrimeRate",
|
|
421
459
|
"deletePrimeRate",
|
|
422
460
|
"getExchangeRates",
|
|
461
|
+
"getMarketRates",
|
|
462
|
+
"getMarketRate",
|
|
423
463
|
"getCustomRates",
|
|
424
464
|
"updateCustomRate",
|
|
425
465
|
"getBybitRateProfit",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arbiwallet/contracts",
|
|
3
3
|
"descriptions": "Generate and manage smart contracts for ArbiWallet",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.210",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit"
|
|
7
7
|
},
|
package/proto/crm_auth.proto
CHANGED
|
@@ -53,6 +53,12 @@ message CrmGetMeRequest {
|
|
|
53
53
|
string access_token = 1;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
+
message SectionPermission {
|
|
57
|
+
string section = 1;
|
|
58
|
+
bool view = 2;
|
|
59
|
+
bool edit = 3;
|
|
60
|
+
}
|
|
61
|
+
|
|
56
62
|
message CrmManagerResponse {
|
|
57
63
|
string id = 1;
|
|
58
64
|
string email = 2;
|
|
@@ -66,6 +72,7 @@ message CrmManagerResponse {
|
|
|
66
72
|
repeated string roles = 10;
|
|
67
73
|
repeated string permissions = 11;
|
|
68
74
|
bool is_super_admin = 12;
|
|
75
|
+
repeated SectionPermission section_permissions = 13;
|
|
69
76
|
}
|
|
70
77
|
|
|
71
78
|
message CrmAuthSessionResponse {
|
package/proto/crm_manager.proto
CHANGED
|
@@ -15,6 +15,12 @@ enum CrmManagerRecordStatus {
|
|
|
15
15
|
CRM_MANAGER_RECORD_STATUS_DISABLED = 2;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
message SectionPermission {
|
|
19
|
+
string section = 1;
|
|
20
|
+
bool view = 2;
|
|
21
|
+
bool edit = 3;
|
|
22
|
+
}
|
|
23
|
+
|
|
18
24
|
message ManagerRecord {
|
|
19
25
|
string id = 1;
|
|
20
26
|
string email = 2;
|
|
@@ -28,6 +34,7 @@ message ManagerRecord {
|
|
|
28
34
|
repeated string roles = 10;
|
|
29
35
|
repeated string permissions = 11;
|
|
30
36
|
bool is_super_admin = 12;
|
|
37
|
+
repeated SectionPermission section_permissions = 13;
|
|
31
38
|
}
|
|
32
39
|
|
|
33
40
|
message RoleRecord {
|
|
@@ -60,6 +67,7 @@ message CreateManagerRequest {
|
|
|
60
67
|
string avatar_url = 6;
|
|
61
68
|
CrmManagerRecordStatus status = 7;
|
|
62
69
|
repeated string role_names = 8;
|
|
70
|
+
repeated SectionPermission section_permissions = 9;
|
|
63
71
|
}
|
|
64
72
|
|
|
65
73
|
message CreateManagerResponse {
|
|
@@ -79,6 +87,8 @@ message UpdateManagerRequest {
|
|
|
79
87
|
CrmManagerRecordStatus status = 8;
|
|
80
88
|
bool replace_roles = 9;
|
|
81
89
|
repeated string role_names = 10;
|
|
90
|
+
repeated SectionPermission section_permissions = 11;
|
|
91
|
+
bool replace_section_permissions = 12;
|
|
82
92
|
}
|
|
83
93
|
|
|
84
94
|
message UpdateManagerResponse {
|
|
@@ -20,6 +20,9 @@ service ExchangeRatesService {
|
|
|
20
20
|
|
|
21
21
|
rpc GetExchangeRates(GetExchangeRatesRequest) returns (GetExchangeRatesResponse);
|
|
22
22
|
|
|
23
|
+
rpc GetMarketRates(GetMarketRatesRequest) returns (GetMarketRatesResponse);
|
|
24
|
+
rpc GetMarketRate(GetMarketRateRequest) returns (GetMarketRateResponse);
|
|
25
|
+
|
|
23
26
|
rpc GetCustomRates(GetCustomRatesRequest) returns (GetCustomRatesResponse);
|
|
24
27
|
rpc UpdateCustomRate(UpdateCustomRateRequest) returns (UpdateCustomRateResponse);
|
|
25
28
|
|
|
@@ -80,6 +83,31 @@ message GetExchangeRatesResponse {
|
|
|
80
83
|
optional string result = 2;
|
|
81
84
|
}
|
|
82
85
|
|
|
86
|
+
message MarketRate {
|
|
87
|
+
string id = 1;
|
|
88
|
+
string updated_at = 2;
|
|
89
|
+
string input_currency = 3;
|
|
90
|
+
string output_currency = 4;
|
|
91
|
+
double rate = 5;
|
|
92
|
+
optional string market = 6;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
message GetMarketRatesRequest {}
|
|
96
|
+
|
|
97
|
+
message GetMarketRatesResponse {
|
|
98
|
+
bool exist = 1;
|
|
99
|
+
repeated MarketRate rates = 2;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
message GetMarketRateRequest {
|
|
103
|
+
string id = 1;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
message GetMarketRateResponse {
|
|
107
|
+
bool exist = 1;
|
|
108
|
+
optional MarketRate rate = 2;
|
|
109
|
+
}
|
|
110
|
+
|
|
83
111
|
message PrimeRate {
|
|
84
112
|
string id = 1;
|
|
85
113
|
string input_currency_id = 2;
|