@arbiwallet/contracts 1.0.292 → 1.0.294
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 +43 -0
- package/gen/referral.ts +69 -0
- package/package.json +1 -1
- package/proto/crm_manager.proto +34 -0
- package/proto/referral.proto +46 -0
package/gen/crm_manager.ts
CHANGED
|
@@ -44,6 +44,12 @@ export interface ManagerRecord {
|
|
|
44
44
|
role: string;
|
|
45
45
|
permissionsVersion: number;
|
|
46
46
|
canCrossOffice: boolean;
|
|
47
|
+
telegramUsername: string;
|
|
48
|
+
telegramId: string;
|
|
49
|
+
isTelegramActivated: boolean;
|
|
50
|
+
notifyAllExchanges: boolean;
|
|
51
|
+
notifyAllPayments: boolean;
|
|
52
|
+
notifyAllPayouts: boolean;
|
|
47
53
|
}
|
|
48
54
|
|
|
49
55
|
export interface RoleRecord {
|
|
@@ -114,6 +120,10 @@ export interface CreateManagerRequest {
|
|
|
114
120
|
fullName: string;
|
|
115
121
|
canCrossOffice: boolean;
|
|
116
122
|
customPermissions: string[];
|
|
123
|
+
telegramUsername: string;
|
|
124
|
+
notifyAllExchanges: boolean;
|
|
125
|
+
notifyAllPayments: boolean;
|
|
126
|
+
notifyAllPayouts: boolean;
|
|
117
127
|
}
|
|
118
128
|
|
|
119
129
|
export interface CreateManagerResponse {
|
|
@@ -142,6 +152,10 @@ export interface UpdateManagerRequest {
|
|
|
142
152
|
canCrossOffice?: boolean | undefined;
|
|
143
153
|
replaceCustomPermissions: boolean;
|
|
144
154
|
customPermissions: string[];
|
|
155
|
+
telegramUsername: string;
|
|
156
|
+
notifyAllExchanges?: boolean | undefined;
|
|
157
|
+
notifyAllPayments?: boolean | undefined;
|
|
158
|
+
notifyAllPayouts?: boolean | undefined;
|
|
145
159
|
}
|
|
146
160
|
|
|
147
161
|
export interface UpdateManagerResponse {
|
|
@@ -249,6 +263,25 @@ export interface PrealoadManagerForSearchResponse {
|
|
|
249
263
|
item?: SearchManagerItem | undefined;
|
|
250
264
|
}
|
|
251
265
|
|
|
266
|
+
export interface GetNotificationRecipientsRequest {
|
|
267
|
+
eventType: string;
|
|
268
|
+
assignedManagerId: string;
|
|
269
|
+
actorManagerId: string;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
export interface NotificationRecipient {
|
|
273
|
+
managerId: string;
|
|
274
|
+
email: string;
|
|
275
|
+
telegramId: string;
|
|
276
|
+
telegramUsername: string;
|
|
277
|
+
isTelegramActivated: boolean;
|
|
278
|
+
reason: string;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
export interface GetNotificationRecipientsResponse {
|
|
282
|
+
recipients: NotificationRecipient[];
|
|
283
|
+
}
|
|
284
|
+
|
|
252
285
|
export interface GetManagerForServiceRequest {
|
|
253
286
|
managerId: string;
|
|
254
287
|
}
|
|
@@ -283,6 +316,8 @@ export interface CrmManagerAdminServiceClient {
|
|
|
283
316
|
|
|
284
317
|
getManager(request: GetManagerRequest): Observable<GetManagerResponse>;
|
|
285
318
|
|
|
319
|
+
getNotificationRecipients(request: GetNotificationRecipientsRequest): Observable<GetNotificationRecipientsResponse>;
|
|
320
|
+
|
|
286
321
|
createManager(request: CreateManagerRequest): Observable<CreateManagerResponse>;
|
|
287
322
|
|
|
288
323
|
updateManager(request: UpdateManagerRequest): Observable<UpdateManagerResponse>;
|
|
@@ -321,6 +356,13 @@ export interface CrmManagerAdminServiceController {
|
|
|
321
356
|
request: GetManagerRequest,
|
|
322
357
|
): Promise<GetManagerResponse> | Observable<GetManagerResponse> | GetManagerResponse;
|
|
323
358
|
|
|
359
|
+
getNotificationRecipients(
|
|
360
|
+
request: GetNotificationRecipientsRequest,
|
|
361
|
+
):
|
|
362
|
+
| Promise<GetNotificationRecipientsResponse>
|
|
363
|
+
| Observable<GetNotificationRecipientsResponse>
|
|
364
|
+
| GetNotificationRecipientsResponse;
|
|
365
|
+
|
|
324
366
|
createManager(
|
|
325
367
|
request: CreateManagerRequest,
|
|
326
368
|
): Promise<CreateManagerResponse> | Observable<CreateManagerResponse> | CreateManagerResponse;
|
|
@@ -373,6 +415,7 @@ export function CrmManagerAdminServiceControllerMethods() {
|
|
|
373
415
|
"listManagers",
|
|
374
416
|
"batchGetManagersByIds",
|
|
375
417
|
"getManager",
|
|
418
|
+
"getNotificationRecipients",
|
|
376
419
|
"createManager",
|
|
377
420
|
"updateManager",
|
|
378
421
|
"deleteManager",
|
package/gen/referral.ts
CHANGED
|
@@ -215,6 +215,15 @@ export interface BatchGetExchangeReferralSummariesResponse {
|
|
|
215
215
|
summaries: ExchangeReferralSummary[];
|
|
216
216
|
}
|
|
217
217
|
|
|
218
|
+
export interface BatchGetCommissionsByExchangeIdsRequest {
|
|
219
|
+
walletUserId: string;
|
|
220
|
+
exchangeIds: string[];
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
export interface BatchGetCommissionsByExchangeIdsResponse {
|
|
224
|
+
items: ReferralCommissionItem[];
|
|
225
|
+
}
|
|
226
|
+
|
|
218
227
|
export interface ApplyExchangeCompletedRequest {
|
|
219
228
|
exchangeId: string;
|
|
220
229
|
walletUserId: string;
|
|
@@ -275,6 +284,40 @@ export interface ListCommissionsResponse {
|
|
|
275
284
|
limit: number;
|
|
276
285
|
}
|
|
277
286
|
|
|
287
|
+
export interface CreatePersonalBonusRequest {
|
|
288
|
+
walletUserId: string;
|
|
289
|
+
amount: string;
|
|
290
|
+
currency: string;
|
|
291
|
+
reason?: string | undefined;
|
|
292
|
+
comment?: string | undefined;
|
|
293
|
+
createdBy?: string | undefined;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
export interface PersonalBonusItem {
|
|
297
|
+
id: number;
|
|
298
|
+
profileId: number;
|
|
299
|
+
amount: string;
|
|
300
|
+
currency: string;
|
|
301
|
+
reason?: string | undefined;
|
|
302
|
+
comment?: string | undefined;
|
|
303
|
+
createdBy?: string | undefined;
|
|
304
|
+
createdAt: string;
|
|
305
|
+
updatedAt: string;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
export interface ListPersonalBonusesRequest {
|
|
309
|
+
walletUserId: string;
|
|
310
|
+
page?: number | undefined;
|
|
311
|
+
limit?: number | undefined;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
export interface ListPersonalBonusesResponse {
|
|
315
|
+
items: PersonalBonusItem[];
|
|
316
|
+
total: number;
|
|
317
|
+
page: number;
|
|
318
|
+
limit: number;
|
|
319
|
+
}
|
|
320
|
+
|
|
278
321
|
export interface CreatePayoutRequest {
|
|
279
322
|
walletUserId: string;
|
|
280
323
|
amount: string;
|
|
@@ -408,12 +451,20 @@ export interface ReferralServiceClient {
|
|
|
408
451
|
request: BatchGetExchangeReferralSummariesRequest,
|
|
409
452
|
): Observable<BatchGetExchangeReferralSummariesResponse>;
|
|
410
453
|
|
|
454
|
+
batchGetCommissionsByExchangeIds(
|
|
455
|
+
request: BatchGetCommissionsByExchangeIdsRequest,
|
|
456
|
+
): Observable<BatchGetCommissionsByExchangeIdsResponse>;
|
|
457
|
+
|
|
411
458
|
applyExchangeCompleted(request: ApplyExchangeCompletedRequest): Observable<ApplyExchangeCompletedResponse>;
|
|
412
459
|
|
|
413
460
|
applyExchangeCancelled(request: ApplyExchangeCancelledRequest): Observable<ApplyExchangeCancelledResponse>;
|
|
414
461
|
|
|
415
462
|
listCommissions(request: ListCommissionsRequest): Observable<ListCommissionsResponse>;
|
|
416
463
|
|
|
464
|
+
createPersonalBonus(request: CreatePersonalBonusRequest): Observable<PersonalBonusItem>;
|
|
465
|
+
|
|
466
|
+
listPersonalBonuses(request: ListPersonalBonusesRequest): Observable<ListPersonalBonusesResponse>;
|
|
467
|
+
|
|
417
468
|
createPayout(request: CreatePayoutRequest): Observable<ReferralPayoutResponse>;
|
|
418
469
|
|
|
419
470
|
confirmPayout(request: ConfirmPayoutRequest): Observable<ReferralPayoutResponse>;
|
|
@@ -500,6 +551,13 @@ export interface ReferralServiceController {
|
|
|
500
551
|
| Observable<BatchGetExchangeReferralSummariesResponse>
|
|
501
552
|
| BatchGetExchangeReferralSummariesResponse;
|
|
502
553
|
|
|
554
|
+
batchGetCommissionsByExchangeIds(
|
|
555
|
+
request: BatchGetCommissionsByExchangeIdsRequest,
|
|
556
|
+
):
|
|
557
|
+
| Promise<BatchGetCommissionsByExchangeIdsResponse>
|
|
558
|
+
| Observable<BatchGetCommissionsByExchangeIdsResponse>
|
|
559
|
+
| BatchGetCommissionsByExchangeIdsResponse;
|
|
560
|
+
|
|
503
561
|
applyExchangeCompleted(
|
|
504
562
|
request: ApplyExchangeCompletedRequest,
|
|
505
563
|
):
|
|
@@ -518,6 +576,14 @@ export interface ReferralServiceController {
|
|
|
518
576
|
request: ListCommissionsRequest,
|
|
519
577
|
): Promise<ListCommissionsResponse> | Observable<ListCommissionsResponse> | ListCommissionsResponse;
|
|
520
578
|
|
|
579
|
+
createPersonalBonus(
|
|
580
|
+
request: CreatePersonalBonusRequest,
|
|
581
|
+
): Promise<PersonalBonusItem> | Observable<PersonalBonusItem> | PersonalBonusItem;
|
|
582
|
+
|
|
583
|
+
listPersonalBonuses(
|
|
584
|
+
request: ListPersonalBonusesRequest,
|
|
585
|
+
): Promise<ListPersonalBonusesResponse> | Observable<ListPersonalBonusesResponse> | ListPersonalBonusesResponse;
|
|
586
|
+
|
|
521
587
|
createPayout(
|
|
522
588
|
request: CreatePayoutRequest,
|
|
523
589
|
): Promise<ReferralPayoutResponse> | Observable<ReferralPayoutResponse> | ReferralPayoutResponse;
|
|
@@ -568,9 +634,12 @@ export function ReferralServiceControllerMethods() {
|
|
|
568
634
|
"getReferredUserIds",
|
|
569
635
|
"batchGetDirectReferrersByUserIds",
|
|
570
636
|
"batchGetExchangeReferralSummaries",
|
|
637
|
+
"batchGetCommissionsByExchangeIds",
|
|
571
638
|
"applyExchangeCompleted",
|
|
572
639
|
"applyExchangeCancelled",
|
|
573
640
|
"listCommissions",
|
|
641
|
+
"createPersonalBonus",
|
|
642
|
+
"listPersonalBonuses",
|
|
574
643
|
"createPayout",
|
|
575
644
|
"confirmPayout",
|
|
576
645
|
"updatePayout",
|
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.294",
|
|
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
|
@@ -5,6 +5,7 @@ service CrmManagerAdminService {
|
|
|
5
5
|
rpc ListManagers (ListManagersRequest) returns (ListManagersResponse);
|
|
6
6
|
rpc BatchGetManagersByIds (BatchGetManagersByIdsRequest) returns (BatchGetManagersByIdsResponse);
|
|
7
7
|
rpc GetManager (GetManagerRequest) returns (GetManagerResponse);
|
|
8
|
+
rpc GetNotificationRecipients (GetNotificationRecipientsRequest) returns (GetNotificationRecipientsResponse);
|
|
8
9
|
rpc CreateManager (CreateManagerRequest) returns (CreateManagerResponse);
|
|
9
10
|
rpc UpdateManager (UpdateManagerRequest) returns (UpdateManagerResponse);
|
|
10
11
|
rpc DeleteManager (DeleteManagerRequest) returns (DeleteManagerResponse);
|
|
@@ -52,6 +53,12 @@ message ManagerRecord {
|
|
|
52
53
|
string role = 18;
|
|
53
54
|
int32 permissions_version = 19;
|
|
54
55
|
bool can_cross_office = 20;
|
|
56
|
+
string telegram_username = 21;
|
|
57
|
+
string telegram_id = 22;
|
|
58
|
+
bool is_telegram_activated = 23;
|
|
59
|
+
bool notify_all_exchanges = 24;
|
|
60
|
+
bool notify_all_payments = 25;
|
|
61
|
+
bool notify_all_payouts = 26;
|
|
55
62
|
}
|
|
56
63
|
|
|
57
64
|
message RoleRecord {
|
|
@@ -122,6 +129,10 @@ message CreateManagerRequest {
|
|
|
122
129
|
string full_name = 12;
|
|
123
130
|
bool can_cross_office = 13;
|
|
124
131
|
repeated string custom_permissions = 14;
|
|
132
|
+
string telegram_username = 15;
|
|
133
|
+
bool notify_all_exchanges = 16;
|
|
134
|
+
bool notify_all_payments = 17;
|
|
135
|
+
bool notify_all_payouts = 18;
|
|
125
136
|
}
|
|
126
137
|
|
|
127
138
|
message CreateManagerResponse {
|
|
@@ -150,6 +161,10 @@ message UpdateManagerRequest {
|
|
|
150
161
|
optional bool can_cross_office = 17;
|
|
151
162
|
bool replace_custom_permissions = 18;
|
|
152
163
|
repeated string custom_permissions = 19;
|
|
164
|
+
string telegram_username = 20;
|
|
165
|
+
optional bool notify_all_exchanges = 21;
|
|
166
|
+
optional bool notify_all_payments = 22;
|
|
167
|
+
optional bool notify_all_payouts = 23;
|
|
153
168
|
}
|
|
154
169
|
|
|
155
170
|
message UpdateManagerResponse {
|
|
@@ -256,6 +271,25 @@ message PrealoadManagerForSearchResponse {
|
|
|
256
271
|
optional SearchManagerItem item = 1;
|
|
257
272
|
}
|
|
258
273
|
|
|
274
|
+
message GetNotificationRecipientsRequest {
|
|
275
|
+
string event_type = 1;
|
|
276
|
+
string assigned_manager_id = 2;
|
|
277
|
+
string actor_manager_id = 3;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
message NotificationRecipient {
|
|
281
|
+
string manager_id = 1;
|
|
282
|
+
string email = 2;
|
|
283
|
+
string telegram_id = 3;
|
|
284
|
+
string telegram_username = 4;
|
|
285
|
+
bool is_telegram_activated = 5;
|
|
286
|
+
string reason = 6;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
message GetNotificationRecipientsResponse {
|
|
290
|
+
repeated NotificationRecipient recipients = 1;
|
|
291
|
+
}
|
|
292
|
+
|
|
259
293
|
message GetManagerForServiceRequest {
|
|
260
294
|
string manager_id = 1;
|
|
261
295
|
}
|
package/proto/referral.proto
CHANGED
|
@@ -18,9 +18,12 @@ service ReferralService {
|
|
|
18
18
|
rpc GetReferredUserIds(GetReferredUserIdsRequest) returns (GetReferredUserIdsResponse);
|
|
19
19
|
rpc BatchGetDirectReferrersByUserIds(BatchGetDirectReferrersByUserIdsRequest) returns (BatchGetDirectReferrersByUserIdsResponse);
|
|
20
20
|
rpc BatchGetExchangeReferralSummaries(BatchGetExchangeReferralSummariesRequest) returns (BatchGetExchangeReferralSummariesResponse);
|
|
21
|
+
rpc BatchGetCommissionsByExchangeIds(BatchGetCommissionsByExchangeIdsRequest) returns (BatchGetCommissionsByExchangeIdsResponse);
|
|
21
22
|
rpc ApplyExchangeCompleted(ApplyExchangeCompletedRequest) returns (ApplyExchangeCompletedResponse);
|
|
22
23
|
rpc ApplyExchangeCancelled(ApplyExchangeCancelledRequest) returns (ApplyExchangeCancelledResponse);
|
|
23
24
|
rpc ListCommissions(ListCommissionsRequest) returns (ListCommissionsResponse);
|
|
25
|
+
rpc CreatePersonalBonus(CreatePersonalBonusRequest) returns (PersonalBonusItem);
|
|
26
|
+
rpc ListPersonalBonuses(ListPersonalBonusesRequest) returns (ListPersonalBonusesResponse);
|
|
24
27
|
rpc CreatePayout(CreatePayoutRequest) returns (ReferralPayoutResponse);
|
|
25
28
|
rpc ConfirmPayout(ConfirmPayoutRequest) returns (ReferralPayoutResponse);
|
|
26
29
|
rpc UpdatePayout(UpdatePayoutRequest) returns (ReferralPayoutResponse);
|
|
@@ -218,6 +221,15 @@ message BatchGetExchangeReferralSummariesResponse {
|
|
|
218
221
|
repeated ExchangeReferralSummary summaries = 1;
|
|
219
222
|
}
|
|
220
223
|
|
|
224
|
+
message BatchGetCommissionsByExchangeIdsRequest {
|
|
225
|
+
string wallet_user_id = 1;
|
|
226
|
+
repeated string exchange_ids = 2;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
message BatchGetCommissionsByExchangeIdsResponse {
|
|
230
|
+
repeated ReferralCommissionItem items = 1;
|
|
231
|
+
}
|
|
232
|
+
|
|
221
233
|
message ApplyExchangeCompletedRequest {
|
|
222
234
|
string exchange_id = 1;
|
|
223
235
|
string wallet_user_id = 2;
|
|
@@ -278,6 +290,40 @@ message ListCommissionsResponse {
|
|
|
278
290
|
int32 limit = 4;
|
|
279
291
|
}
|
|
280
292
|
|
|
293
|
+
message CreatePersonalBonusRequest {
|
|
294
|
+
string wallet_user_id = 1;
|
|
295
|
+
string amount = 2;
|
|
296
|
+
string currency = 3;
|
|
297
|
+
optional string reason = 4;
|
|
298
|
+
optional string comment = 5;
|
|
299
|
+
optional string created_by = 6;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
message PersonalBonusItem {
|
|
303
|
+
int64 id = 1;
|
|
304
|
+
int64 profile_id = 2;
|
|
305
|
+
string amount = 3;
|
|
306
|
+
string currency = 4;
|
|
307
|
+
optional string reason = 5;
|
|
308
|
+
optional string comment = 6;
|
|
309
|
+
optional string created_by = 7;
|
|
310
|
+
string created_at = 8;
|
|
311
|
+
string updated_at = 9;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
message ListPersonalBonusesRequest {
|
|
315
|
+
string wallet_user_id = 1;
|
|
316
|
+
optional int32 page = 2;
|
|
317
|
+
optional int32 limit = 3;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
message ListPersonalBonusesResponse {
|
|
321
|
+
repeated PersonalBonusItem items = 1;
|
|
322
|
+
int32 total = 2;
|
|
323
|
+
int32 page = 3;
|
|
324
|
+
int32 limit = 4;
|
|
325
|
+
}
|
|
326
|
+
|
|
281
327
|
message CreatePayoutRequest {
|
|
282
328
|
string wallet_user_id = 1;
|
|
283
329
|
string amount = 2;
|