@arbiwallet/contracts 1.0.230 → 1.0.232
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/exchange_rates.ts +9 -2
- package/gen/user.ts +51 -0
- package/package.json +1 -1
- package/proto/exchange_rates.proto +19 -12
- package/proto/user.proto +33 -0
package/gen/exchange_rates.ts
CHANGED
|
@@ -216,9 +216,16 @@ export interface UpdateBybitRateProfitResponse {
|
|
|
216
216
|
error?: string | undefined;
|
|
217
217
|
}
|
|
218
218
|
|
|
219
|
+
export interface AuthManagerContext {
|
|
220
|
+
managerId: string;
|
|
221
|
+
officeIds: string[];
|
|
222
|
+
canCrossOffice: boolean;
|
|
223
|
+
requestId?: string | undefined;
|
|
224
|
+
clientType?: string | undefined;
|
|
225
|
+
}
|
|
226
|
+
|
|
219
227
|
export interface CalculateExchangeRequest {
|
|
220
|
-
|
|
221
|
-
managerId?: string | undefined;
|
|
228
|
+
authManagerContext?: AuthManagerContext | undefined;
|
|
222
229
|
inputCurrency: string;
|
|
223
230
|
outputCurrency: string;
|
|
224
231
|
currencyForAmount: string;
|
package/gen/user.ts
CHANGED
|
@@ -262,6 +262,35 @@ export interface EnsureTelegramUserRequest {
|
|
|
262
262
|
lastName?: string | undefined;
|
|
263
263
|
}
|
|
264
264
|
|
|
265
|
+
export interface CreateMonikaCustomerRequest {
|
|
266
|
+
telegramId?: string | undefined;
|
|
267
|
+
whatsapp?: string | undefined;
|
|
268
|
+
telegramUsername?: string | undefined;
|
|
269
|
+
username?: string | undefined;
|
|
270
|
+
firstName?: string | undefined;
|
|
271
|
+
lastName?: string | undefined;
|
|
272
|
+
refCode?: string | undefined;
|
|
273
|
+
advChannel?: string | undefined;
|
|
274
|
+
utmId?: string | undefined;
|
|
275
|
+
code?: string | undefined;
|
|
276
|
+
utmDataJson?: string | undefined;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
export interface CreateMonikaCustomerResponse {
|
|
280
|
+
success: boolean;
|
|
281
|
+
jwt: string;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
export interface FindMonikaCustomerRequest {
|
|
285
|
+
lookupValue: string;
|
|
286
|
+
filterBy?: string | undefined;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
export interface FindMonikaCustomerResponse {
|
|
290
|
+
success: boolean;
|
|
291
|
+
jwt?: string | undefined;
|
|
292
|
+
}
|
|
293
|
+
|
|
265
294
|
export interface UpdateLanguageByTelegramIdRequest {
|
|
266
295
|
telegramId: string;
|
|
267
296
|
language: string;
|
|
@@ -464,6 +493,14 @@ export interface UserServiceClient {
|
|
|
464
493
|
|
|
465
494
|
ensureTelegramUser(request: EnsureTelegramUserRequest): Observable<TelegramUserLanguageResponse>;
|
|
466
495
|
|
|
496
|
+
/** Monika-compatible customer create endpoint payload (local Wallet source of truth). */
|
|
497
|
+
|
|
498
|
+
createMonikaCustomer(request: CreateMonikaCustomerRequest): Observable<CreateMonikaCustomerResponse>;
|
|
499
|
+
|
|
500
|
+
/** Monika-compatible customer lookup by filter_by or customer id. */
|
|
501
|
+
|
|
502
|
+
findMonikaCustomer(request: FindMonikaCustomerRequest): Observable<FindMonikaCustomerResponse>;
|
|
503
|
+
|
|
467
504
|
updateLanguageByTelegramId(request: UpdateLanguageByTelegramIdRequest): Observable<TelegramUserLanguageResponse>;
|
|
468
505
|
|
|
469
506
|
/** Реферальная ссылка MONETA по telegram_id → ref_code → https://arbi.exchange/contacts/qr?code=… */
|
|
@@ -615,6 +652,18 @@ export interface UserServiceController {
|
|
|
615
652
|
request: EnsureTelegramUserRequest,
|
|
616
653
|
): Promise<TelegramUserLanguageResponse> | Observable<TelegramUserLanguageResponse> | TelegramUserLanguageResponse;
|
|
617
654
|
|
|
655
|
+
/** Monika-compatible customer create endpoint payload (local Wallet source of truth). */
|
|
656
|
+
|
|
657
|
+
createMonikaCustomer(
|
|
658
|
+
request: CreateMonikaCustomerRequest,
|
|
659
|
+
): Promise<CreateMonikaCustomerResponse> | Observable<CreateMonikaCustomerResponse> | CreateMonikaCustomerResponse;
|
|
660
|
+
|
|
661
|
+
/** Monika-compatible customer lookup by filter_by or customer id. */
|
|
662
|
+
|
|
663
|
+
findMonikaCustomer(
|
|
664
|
+
request: FindMonikaCustomerRequest,
|
|
665
|
+
): Promise<FindMonikaCustomerResponse> | Observable<FindMonikaCustomerResponse> | FindMonikaCustomerResponse;
|
|
666
|
+
|
|
618
667
|
updateLanguageByTelegramId(
|
|
619
668
|
request: UpdateLanguageByTelegramIdRequest,
|
|
620
669
|
): Promise<TelegramUserLanguageResponse> | Observable<TelegramUserLanguageResponse> | TelegramUserLanguageResponse;
|
|
@@ -702,6 +751,8 @@ export function UserServiceControllerMethods() {
|
|
|
702
751
|
"getSupportChatLastRead",
|
|
703
752
|
"setSupportChatLastRead",
|
|
704
753
|
"ensureTelegramUser",
|
|
754
|
+
"createMonikaCustomer",
|
|
755
|
+
"findMonikaCustomer",
|
|
705
756
|
"updateLanguageByTelegramId",
|
|
706
757
|
"getReferralLinkByTelegramId",
|
|
707
758
|
"getReferralLinkByUserId",
|
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.232",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit"
|
|
7
7
|
},
|
|
@@ -216,19 +216,26 @@ message UpdateBybitRateProfitResponse {
|
|
|
216
216
|
optional string error = 3;
|
|
217
217
|
}
|
|
218
218
|
|
|
219
|
-
message
|
|
220
|
-
string
|
|
221
|
-
|
|
219
|
+
message AuthManagerContext {
|
|
220
|
+
string manager_id = 1;
|
|
221
|
+
repeated string office_ids = 2;
|
|
222
|
+
bool can_cross_office = 3;
|
|
223
|
+
optional string request_id = 4;
|
|
224
|
+
optional string client_type = 5;
|
|
225
|
+
}
|
|
222
226
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
optional
|
|
231
|
-
optional double
|
|
227
|
+
message CalculateExchangeRequest {
|
|
228
|
+
optional AuthManagerContext auth_manager_context = 1;
|
|
229
|
+
|
|
230
|
+
string input_currency = 2;
|
|
231
|
+
string output_currency = 3;
|
|
232
|
+
string currency_for_amount = 4;
|
|
233
|
+
double amount = 5;
|
|
234
|
+
optional double adjustment = 6;
|
|
235
|
+
optional double promo_discount = 7;
|
|
236
|
+
optional string customer_id = 8;
|
|
237
|
+
optional bool disable_rounding = 9;
|
|
238
|
+
optional double fixed_rate = 10;
|
|
232
239
|
}
|
|
233
240
|
|
|
234
241
|
message CalculateExchangeResult {
|
package/proto/user.proto
CHANGED
|
@@ -31,6 +31,10 @@ service UserService {
|
|
|
31
31
|
rpc SetSupportChatLastRead (SetSupportChatLastReadRequest) returns (SetSupportChatLastReadResponse);
|
|
32
32
|
// Telegram bot microservice: upsert user by telegram_id (registration TELEGRAM).
|
|
33
33
|
rpc EnsureTelegramUser (EnsureTelegramUserRequest) returns (TelegramUserLanguageResponse);
|
|
34
|
+
// Monika-compatible customer create endpoint payload (local Wallet source of truth).
|
|
35
|
+
rpc CreateMonikaCustomer (CreateMonikaCustomerRequest) returns (CreateMonikaCustomerResponse);
|
|
36
|
+
// Monika-compatible customer lookup by filter_by or customer id.
|
|
37
|
+
rpc FindMonikaCustomer (FindMonikaCustomerRequest) returns (FindMonikaCustomerResponse);
|
|
34
38
|
rpc UpdateLanguageByTelegramId (UpdateLanguageByTelegramIdRequest) returns (TelegramUserLanguageResponse);
|
|
35
39
|
// Реферальная ссылка MONETA по telegram_id → ref_code → https://arbi.exchange/contacts/qr?code=…
|
|
36
40
|
rpc GetReferralLinkByTelegramId (GetReferralLinkByTelegramIdRequest) returns (GetReferralLinkByTelegramIdResponse);
|
|
@@ -296,6 +300,35 @@ message EnsureTelegramUserRequest {
|
|
|
296
300
|
optional string last_name = 4;
|
|
297
301
|
}
|
|
298
302
|
|
|
303
|
+
message CreateMonikaCustomerRequest {
|
|
304
|
+
optional string telegram_id = 1;
|
|
305
|
+
optional string whatsapp = 2;
|
|
306
|
+
optional string telegram_username = 3;
|
|
307
|
+
optional string username = 4;
|
|
308
|
+
optional string first_name = 5;
|
|
309
|
+
optional string last_name = 6;
|
|
310
|
+
optional string ref_code = 7;
|
|
311
|
+
optional string adv_channel = 8;
|
|
312
|
+
optional string utm_id = 9;
|
|
313
|
+
optional string code = 10;
|
|
314
|
+
optional string utm_data_json = 11;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
message CreateMonikaCustomerResponse {
|
|
318
|
+
bool success = 1;
|
|
319
|
+
string jwt = 2;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
message FindMonikaCustomerRequest {
|
|
323
|
+
string lookup_value = 1;
|
|
324
|
+
optional string filter_by = 2;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
message FindMonikaCustomerResponse {
|
|
328
|
+
bool success = 1;
|
|
329
|
+
optional string jwt = 2;
|
|
330
|
+
}
|
|
331
|
+
|
|
299
332
|
message UpdateLanguageByTelegramIdRequest {
|
|
300
333
|
string telegram_id = 1;
|
|
301
334
|
string language = 2;
|