@arbiwallet/contracts 1.0.215 → 1.0.217
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_manager.ts +100 -1
- package/gen/exchange_core.ts +32 -0
- package/package.json +1 -1
- package/proto/crm_manager.proto +69 -0
- package/proto/exchange_core.proto +19 -0
package/gen/crm_manager.ts
CHANGED
|
@@ -37,6 +37,7 @@ export interface ManagerRecord {
|
|
|
37
37
|
permissions: string[];
|
|
38
38
|
isSuperAdmin: boolean;
|
|
39
39
|
sectionPermissions: SectionPermission[];
|
|
40
|
+
officeIds: string[];
|
|
40
41
|
}
|
|
41
42
|
|
|
42
43
|
export interface RoleRecord {
|
|
@@ -70,6 +71,7 @@ export interface CreateManagerRequest {
|
|
|
70
71
|
status: CrmManagerRecordStatus;
|
|
71
72
|
roleNames: string[];
|
|
72
73
|
sectionPermissions: SectionPermission[];
|
|
74
|
+
officeIds: string[];
|
|
73
75
|
}
|
|
74
76
|
|
|
75
77
|
export interface CreateManagerResponse {
|
|
@@ -91,6 +93,8 @@ export interface UpdateManagerRequest {
|
|
|
91
93
|
roleNames: string[];
|
|
92
94
|
sectionPermissions: SectionPermission[];
|
|
93
95
|
replaceSectionPermissions: boolean;
|
|
96
|
+
replaceOfficeIds: boolean;
|
|
97
|
+
officeIds: string[];
|
|
94
98
|
}
|
|
95
99
|
|
|
96
100
|
export interface UpdateManagerResponse {
|
|
@@ -113,6 +117,67 @@ export interface ListRolesResponse {
|
|
|
113
117
|
roles: RoleRecord[];
|
|
114
118
|
}
|
|
115
119
|
|
|
120
|
+
export interface OfficeRecord {
|
|
121
|
+
id: string;
|
|
122
|
+
code: string;
|
|
123
|
+
name: string;
|
|
124
|
+
address: string;
|
|
125
|
+
city: string;
|
|
126
|
+
country: string;
|
|
127
|
+
isActive: boolean;
|
|
128
|
+
createdAtUnixMs: number;
|
|
129
|
+
updatedAtUnixMs: number;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export interface ListOfficesRequest {
|
|
133
|
+
page: number;
|
|
134
|
+
limit: number;
|
|
135
|
+
search: string;
|
|
136
|
+
includeInactive: boolean;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export interface ListOfficesResponse {
|
|
140
|
+
offices: OfficeRecord[];
|
|
141
|
+
page: number;
|
|
142
|
+
limit: number;
|
|
143
|
+
totalCount: number;
|
|
144
|
+
pages: number;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export interface CreateOfficeRequest {
|
|
148
|
+
code: string;
|
|
149
|
+
name: string;
|
|
150
|
+
address: string;
|
|
151
|
+
city: string;
|
|
152
|
+
country: string;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export interface CreateOfficeResponse {
|
|
156
|
+
office: OfficeRecord | undefined;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export interface UpdateOfficeRequest {
|
|
160
|
+
officeId: string;
|
|
161
|
+
code: string;
|
|
162
|
+
name: string;
|
|
163
|
+
address: string;
|
|
164
|
+
city: string;
|
|
165
|
+
country: string;
|
|
166
|
+
isActive: boolean;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export interface UpdateOfficeResponse {
|
|
170
|
+
office: OfficeRecord | undefined;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export interface DeactivateOfficeRequest {
|
|
174
|
+
officeId: string;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export interface DeactivateOfficeResponse {
|
|
178
|
+
success: boolean;
|
|
179
|
+
}
|
|
180
|
+
|
|
116
181
|
export const CRM_MANAGER_PACKAGE_NAME = "crm_manager";
|
|
117
182
|
|
|
118
183
|
export interface CrmManagerAdminServiceClient {
|
|
@@ -125,6 +190,14 @@ export interface CrmManagerAdminServiceClient {
|
|
|
125
190
|
deleteManager(request: DeleteManagerRequest): Observable<DeleteManagerResponse>;
|
|
126
191
|
|
|
127
192
|
listRoles(request: ListRolesRequest): Observable<ListRolesResponse>;
|
|
193
|
+
|
|
194
|
+
listOffices(request: ListOfficesRequest): Observable<ListOfficesResponse>;
|
|
195
|
+
|
|
196
|
+
createOffice(request: CreateOfficeRequest): Observable<CreateOfficeResponse>;
|
|
197
|
+
|
|
198
|
+
updateOffice(request: UpdateOfficeRequest): Observable<UpdateOfficeResponse>;
|
|
199
|
+
|
|
200
|
+
deactivateOffice(request: DeactivateOfficeRequest): Observable<DeactivateOfficeResponse>;
|
|
128
201
|
}
|
|
129
202
|
|
|
130
203
|
export interface CrmManagerAdminServiceController {
|
|
@@ -145,11 +218,37 @@ export interface CrmManagerAdminServiceController {
|
|
|
145
218
|
): Promise<DeleteManagerResponse> | Observable<DeleteManagerResponse> | DeleteManagerResponse;
|
|
146
219
|
|
|
147
220
|
listRoles(request: ListRolesRequest): Promise<ListRolesResponse> | Observable<ListRolesResponse> | ListRolesResponse;
|
|
221
|
+
|
|
222
|
+
listOffices(
|
|
223
|
+
request: ListOfficesRequest,
|
|
224
|
+
): Promise<ListOfficesResponse> | Observable<ListOfficesResponse> | ListOfficesResponse;
|
|
225
|
+
|
|
226
|
+
createOffice(
|
|
227
|
+
request: CreateOfficeRequest,
|
|
228
|
+
): Promise<CreateOfficeResponse> | Observable<CreateOfficeResponse> | CreateOfficeResponse;
|
|
229
|
+
|
|
230
|
+
updateOffice(
|
|
231
|
+
request: UpdateOfficeRequest,
|
|
232
|
+
): Promise<UpdateOfficeResponse> | Observable<UpdateOfficeResponse> | UpdateOfficeResponse;
|
|
233
|
+
|
|
234
|
+
deactivateOffice(
|
|
235
|
+
request: DeactivateOfficeRequest,
|
|
236
|
+
): Promise<DeactivateOfficeResponse> | Observable<DeactivateOfficeResponse> | DeactivateOfficeResponse;
|
|
148
237
|
}
|
|
149
238
|
|
|
150
239
|
export function CrmManagerAdminServiceControllerMethods() {
|
|
151
240
|
return function (constructor: Function) {
|
|
152
|
-
const grpcMethods: string[] = [
|
|
241
|
+
const grpcMethods: string[] = [
|
|
242
|
+
"listManagers",
|
|
243
|
+
"createManager",
|
|
244
|
+
"updateManager",
|
|
245
|
+
"deleteManager",
|
|
246
|
+
"listRoles",
|
|
247
|
+
"listOffices",
|
|
248
|
+
"createOffice",
|
|
249
|
+
"updateOffice",
|
|
250
|
+
"deactivateOffice",
|
|
251
|
+
];
|
|
153
252
|
for (const method of grpcMethods) {
|
|
154
253
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
155
254
|
GrpcMethod("CrmManagerAdminService", method)(constructor.prototype[method], method, descriptor);
|
package/gen/exchange_core.ts
CHANGED
|
@@ -258,6 +258,26 @@ export interface GetTransactionsResponse {
|
|
|
258
258
|
summary: GetTransactionsSummaryItem[];
|
|
259
259
|
}
|
|
260
260
|
|
|
261
|
+
export interface GetExchangeDealHistoryStatisticsRequest {
|
|
262
|
+
dateFrom?: string | undefined;
|
|
263
|
+
dateTo?: string | undefined;
|
|
264
|
+
amountFrom?: number | undefined;
|
|
265
|
+
amountTo?: number | undefined;
|
|
266
|
+
inputCurrency?: string | undefined;
|
|
267
|
+
outputCurrency?:
|
|
268
|
+
| string
|
|
269
|
+
| undefined;
|
|
270
|
+
/** no_payment | with_payment | with_exchange | completed */
|
|
271
|
+
status?: string | undefined;
|
|
272
|
+
search?: string | undefined;
|
|
273
|
+
page?: number | undefined;
|
|
274
|
+
pageSize?: number | undefined;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
export interface GetExchangeDealHistoryStatisticsResponse {
|
|
278
|
+
items: ExchangeDealStateByCalculation[];
|
|
279
|
+
}
|
|
280
|
+
|
|
261
281
|
export interface GetExchangePaymentRefsByCalculationIdsRequest {
|
|
262
282
|
calculationIds: string[];
|
|
263
283
|
}
|
|
@@ -326,6 +346,10 @@ export interface ExchangeCoreServiceClient {
|
|
|
326
346
|
|
|
327
347
|
getTransactions(request: GetTransactionsRequest): Observable<GetTransactionsResponse>;
|
|
328
348
|
|
|
349
|
+
getExchangeDealHistoryStatistics(
|
|
350
|
+
request: GetExchangeDealHistoryStatisticsRequest,
|
|
351
|
+
): Observable<GetExchangeDealHistoryStatisticsResponse>;
|
|
352
|
+
|
|
329
353
|
getExchangePaymentRefsByCalculationIds(
|
|
330
354
|
request: GetExchangePaymentRefsByCalculationIdsRequest,
|
|
331
355
|
): Observable<GetExchangePaymentRefsByCalculationIdsResponse>;
|
|
@@ -370,6 +394,13 @@ export interface ExchangeCoreServiceController {
|
|
|
370
394
|
request: GetTransactionsRequest,
|
|
371
395
|
): Promise<GetTransactionsResponse> | Observable<GetTransactionsResponse> | GetTransactionsResponse;
|
|
372
396
|
|
|
397
|
+
getExchangeDealHistoryStatistics(
|
|
398
|
+
request: GetExchangeDealHistoryStatisticsRequest,
|
|
399
|
+
):
|
|
400
|
+
| Promise<GetExchangeDealHistoryStatisticsResponse>
|
|
401
|
+
| Observable<GetExchangeDealHistoryStatisticsResponse>
|
|
402
|
+
| GetExchangeDealHistoryStatisticsResponse;
|
|
403
|
+
|
|
373
404
|
getExchangePaymentRefsByCalculationIds(
|
|
374
405
|
request: GetExchangePaymentRefsByCalculationIdsRequest,
|
|
375
406
|
):
|
|
@@ -401,6 +432,7 @@ export function ExchangeCoreServiceControllerMethods() {
|
|
|
401
432
|
"completeExchangeDeal",
|
|
402
433
|
"cancelExchangeDeal",
|
|
403
434
|
"getTransactions",
|
|
435
|
+
"getExchangeDealHistoryStatistics",
|
|
404
436
|
"getExchangePaymentRefsByCalculationIds",
|
|
405
437
|
"getExchangeDealRefsByCalculationIds",
|
|
406
438
|
"getExchangeDealStatesByCalculationIds",
|
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.217",
|
|
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_manager.proto
CHANGED
|
@@ -7,6 +7,10 @@ service CrmManagerAdminService {
|
|
|
7
7
|
rpc UpdateManager (UpdateManagerRequest) returns (UpdateManagerResponse);
|
|
8
8
|
rpc DeleteManager (DeleteManagerRequest) returns (DeleteManagerResponse);
|
|
9
9
|
rpc ListRoles (ListRolesRequest) returns (ListRolesResponse);
|
|
10
|
+
rpc ListOffices (ListOfficesRequest) returns (ListOfficesResponse);
|
|
11
|
+
rpc CreateOffice (CreateOfficeRequest) returns (CreateOfficeResponse);
|
|
12
|
+
rpc UpdateOffice (UpdateOfficeRequest) returns (UpdateOfficeResponse);
|
|
13
|
+
rpc DeactivateOffice (DeactivateOfficeRequest) returns (DeactivateOfficeResponse);
|
|
10
14
|
}
|
|
11
15
|
|
|
12
16
|
enum CrmManagerRecordStatus {
|
|
@@ -35,6 +39,7 @@ message ManagerRecord {
|
|
|
35
39
|
repeated string permissions = 11;
|
|
36
40
|
bool is_super_admin = 12;
|
|
37
41
|
repeated SectionPermission section_permissions = 13;
|
|
42
|
+
repeated string office_ids = 14;
|
|
38
43
|
}
|
|
39
44
|
|
|
40
45
|
message RoleRecord {
|
|
@@ -68,6 +73,7 @@ message CreateManagerRequest {
|
|
|
68
73
|
CrmManagerRecordStatus status = 7;
|
|
69
74
|
repeated string role_names = 8;
|
|
70
75
|
repeated SectionPermission section_permissions = 9;
|
|
76
|
+
repeated string office_ids = 10;
|
|
71
77
|
}
|
|
72
78
|
|
|
73
79
|
message CreateManagerResponse {
|
|
@@ -89,6 +95,8 @@ message UpdateManagerRequest {
|
|
|
89
95
|
repeated string role_names = 10;
|
|
90
96
|
repeated SectionPermission section_permissions = 11;
|
|
91
97
|
bool replace_section_permissions = 12;
|
|
98
|
+
bool replace_office_ids = 13;
|
|
99
|
+
repeated string office_ids = 14;
|
|
92
100
|
}
|
|
93
101
|
|
|
94
102
|
message UpdateManagerResponse {
|
|
@@ -109,3 +117,64 @@ message ListRolesRequest {}
|
|
|
109
117
|
message ListRolesResponse {
|
|
110
118
|
repeated RoleRecord roles = 1;
|
|
111
119
|
}
|
|
120
|
+
|
|
121
|
+
message OfficeRecord {
|
|
122
|
+
string id = 1;
|
|
123
|
+
string code = 2;
|
|
124
|
+
string name = 3;
|
|
125
|
+
string address = 4;
|
|
126
|
+
string city = 5;
|
|
127
|
+
string country = 6;
|
|
128
|
+
bool is_active = 7;
|
|
129
|
+
int64 created_at_unix_ms = 8;
|
|
130
|
+
int64 updated_at_unix_ms = 9;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
message ListOfficesRequest {
|
|
134
|
+
int32 page = 1;
|
|
135
|
+
int32 limit = 2;
|
|
136
|
+
string search = 3;
|
|
137
|
+
bool include_inactive = 4;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
message ListOfficesResponse {
|
|
141
|
+
repeated OfficeRecord offices = 1;
|
|
142
|
+
int32 page = 2;
|
|
143
|
+
int32 limit = 3;
|
|
144
|
+
int32 total_count = 4;
|
|
145
|
+
int32 pages = 5;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
message CreateOfficeRequest {
|
|
149
|
+
string code = 1;
|
|
150
|
+
string name = 2;
|
|
151
|
+
string address = 3;
|
|
152
|
+
string city = 4;
|
|
153
|
+
string country = 5;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
message CreateOfficeResponse {
|
|
157
|
+
OfficeRecord office = 1;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
message UpdateOfficeRequest {
|
|
161
|
+
string office_id = 1;
|
|
162
|
+
string code = 2;
|
|
163
|
+
string name = 3;
|
|
164
|
+
string address = 4;
|
|
165
|
+
string city = 5;
|
|
166
|
+
string country = 6;
|
|
167
|
+
bool is_active = 7;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
message UpdateOfficeResponse {
|
|
171
|
+
OfficeRecord office = 1;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
message DeactivateOfficeRequest {
|
|
175
|
+
string office_id = 1;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
message DeactivateOfficeResponse {
|
|
179
|
+
bool success = 1;
|
|
180
|
+
}
|
|
@@ -21,6 +21,8 @@ service ExchangeCoreService {
|
|
|
21
21
|
|
|
22
22
|
rpc GetTransactions(GetTransactionsRequest) returns (GetTransactionsResponse);
|
|
23
23
|
|
|
24
|
+
rpc GetExchangeDealHistoryStatistics(GetExchangeDealHistoryStatisticsRequest) returns (GetExchangeDealHistoryStatisticsResponse);
|
|
25
|
+
|
|
24
26
|
|
|
25
27
|
rpc GetExchangePaymentRefsByCalculationIds(GetExchangePaymentRefsByCalculationIdsRequest) returns (GetExchangePaymentRefsByCalculationIdsResponse);
|
|
26
28
|
rpc GetExchangeDealRefsByCalculationIds(GetExchangeDealRefsByCalculationIdsRequest) returns (GetExchangeDealRefsByCalculationIdsResponse);
|
|
@@ -324,6 +326,23 @@ message GetTransactionsResponse {
|
|
|
324
326
|
repeated GetTransactionsSummaryItem summary = 5;
|
|
325
327
|
}
|
|
326
328
|
|
|
329
|
+
message GetExchangeDealHistoryStatisticsRequest {
|
|
330
|
+
optional string date_from = 1;
|
|
331
|
+
optional string date_to = 2;
|
|
332
|
+
optional double amount_from = 3;
|
|
333
|
+
optional double amount_to = 4;
|
|
334
|
+
optional string input_currency = 5;
|
|
335
|
+
optional string output_currency = 6;
|
|
336
|
+
optional string status = 7; // no_payment | with_payment | with_exchange | completed
|
|
337
|
+
optional string search = 8;
|
|
338
|
+
optional int32 page = 9;
|
|
339
|
+
optional int32 page_size = 10;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
message GetExchangeDealHistoryStatisticsResponse {
|
|
343
|
+
repeated ExchangeDealStateByCalculation items = 1;
|
|
344
|
+
}
|
|
345
|
+
|
|
327
346
|
message GetExchangePaymentRefsByCalculationIdsRequest {
|
|
328
347
|
repeated string calculation_ids = 1;
|
|
329
348
|
}
|